Contents
% Asignatura: Filtros y Convertidores de señal. % Autor: Alejandro Fernández Hernández
Práctica 1 (Ejercicio 3): Control de un convertidor Buck-Boost.
Enunciado: Diseñar el regulador en tiempo continuo más apropiado para controlar la tensión de salida del convertidor frente a variaciones en el ciclo de trabajo d. Representar el diagrama de Bode y la respuesta en el tiempo. Posteriormente realizar un modelo Simulink en el que se vea la respuesta ante una onda cuadrada.
clear all; close all; clc; % Filtros y Convertidores de Señal
Definir Parámetros
Definimos los parámetros del convertidor Buck-Boost:
Vg=30; L=260*10^(-6); R=10; C=160*10^(-6); D=0.6; Leq=L/(1-D)^2; Vo=Vg*(D/(1-D)); fc=150*10^(3); % Definimos la función de transferencia del convertidor Buck-Boost: s=tf('s'); Gd=(-(Vg*D/(1-D)^2)/(1+Leq*s/R+s^2*Leq*C))+((Vg+(Vg*D)/(1-D))/(1-D))*(1/(1+Leq*s/R+s^2*Leq*C)) figure; bode(Gd) LazoCerrado=Gd/(1+Gd) figure step(LazoCerrado)
Gd = 0.00195 s^2 + 1.219 s + 7500 ------------------------------------------------------------ 6.76e-12 s^4 + 8.45e-09 s^3 + 5.464e-05 s^2 + 0.0325 s + 100 Continuous-time transfer function. LazoCerrado = 1.318e-14 s^6 + 2.472e-11 s^5 + 1.675e-07 s^4 + 0.0001933 s^3 + 0.6444 s^2 + 365.6 s + 7.5e05 ----------------------------------------------------------------------------- 4.57e-23 s^8 + 1.142e-19 s^7 + 1.399e-14 s^6 + 2.608e-11 s^5 + 1.724e-07 s^4 + 0.0001986 s^3 + 0.6564 s^2 + 372.1 s + 7.6e05 Continuous-time transfer function.
Estudio en Discreto
% Introducimos en el script el regulador calculado por SISOTOOL: PID=36.793*((1+0.0007*s)*(1+0.0022*s))/(s*(1+3.2e-5*s)); Ts=1/(150e3); % A continuación, discretizamos el convertidor y el regulador por los % métodos ZOH y TUSTIN: Gdzoh=c2d(Gd,Ts,'zoh') PIDzoh=c2d(PID,Ts,'zoh') GdTustin=c2d(Gd,Ts,'Tustin') PIDTustin=c2d(Gd,Ts,'Tustin') % Representamos en una misma gráfica, el diagrama de bode del sistema % contínuo, y el diagrama de bode de los sistemas discretos equivalentes, % por ZOH y TUSTIN. PlantaC=Gd*PID PlantaDzoh=Gdzoh*PIDzoh PlantaDTustin=GdTustin*PIDTustin figure; hold on, bode(PlantaC), bode(PlantaDzoh), bode(PlantaDTustin), legend show, hold off,
Gdzoh = 0.006401 z^3 - 0.006382 z^2 - 0.006382 z + 0.006366 --------------------------------------------------- z^4 - 3.991 z^3 + 5.974 z^2 - 3.975 z + 0.9917 Sample time: 6.6667e-06 seconds Discrete-time transfer function. PIDzoh = 1.771 z^2 - 3.521 z + 1.751 --------------------------- z^2 - 1.812 z + 0.8119 Sample time: 6.6667e-06 seconds Discrete-time transfer function. GdTustin = 0.003198 z^4 + 1.384e-05 z^3 - 0.006382 z^2 - 1.275e-05 z + 0.003185 -------------------------------------------------------------------- z^4 - 3.991 z^3 + 5.974 z^2 - 3.975 z + 0.9917 Sample time: 6.6667e-06 seconds Discrete-time transfer function. PIDTustin = 0.003198 z^4 + 1.384e-05 z^3 - 0.006382 z^2 - 1.275e-05 z + 0.003185 -------------------------------------------------------------------- z^4 - 3.991 z^3 + 5.974 z^2 - 3.975 z + 0.9917 Sample time: 6.6667e-06 seconds Discrete-time transfer function. PlantaC = 1.105e-07 s^4 + 0.0002771 s^3 + 0.6267 s^2 + 845.1 s + 2.759e05 ------------------------------------------------------------------------- 2.163e-16 s^6 + 7.03e-12 s^5 + 1.02e-08 s^4 + 5.568e-05 s^3 + 0.0357 s^2 + 100 s Continuous-time transfer function. PlantaDzoh = 0.01133 z^5 - 0.03384 z^4 + 0.02238 z^3 + 0.02257 z^2 - 0.03359 z + 0.01114 ------------------------------------------------------------------------ z^6 - 5.803 z^5 + 14.02 z^4 - 18.04 z^3 + 13.04 z^2 - 5.024 z + 0.8052 Sample time: 6.6667e-06 seconds Discrete-time transfer function. PlantaDTustin = 1.023e-05 z^8 + 8.855e-08 z^7 - 4.082e-05 z^6 - 2.583e-07 z^5 + 6.111e-05 z^4 + 2.51e-07 z^3 - 4.066e-05 z^2 - 8.123e-08 z + 1.014e-05 ------------------------------------------------------------------------ z^8 - 7.983 z^7 + 27.88 z^6 - 55.64 z^5 + 69.41 z^4 - 55.41 z^3 + 27.65 z^2 - 7.884 z + 0.9835 Sample time: 6.6667e-06 seconds Discrete-time transfer function.
Diagrama de Bode
% Introducimos los reguladores calculados con Sisotool y representamos el % diagrama de bode de las distintas plantas: z=tf('z'); w=(z-1)/Ts; Czoh=22.979*(((1+0.0066*w)*(1+0.00041*w))/(w*(1+2.5e-5*w))) CTustin=34.106*(((1+0.0053*w)*(1+0.00045*w))/(w*(1+2.5e-5*w))) PlantaD2zoh=Gdzoh*Czoh PlantaD2Tustin=GdTustin*CTustin figure; hold on, bode(PlantaC), bode(PlantaD2zoh), bode(PlantaD2Tustin), legend show, hold off,
Czoh = 2.764e-15 z^2 - 5.479e-15 z + 2.716e-15 --------------------------------------- 1.111e-15 z^2 - 1.926e-15 z + 8.148e-16 Sample time: unspecified Discrete-time transfer function. CTustin = 3.615e-15 z^2 - 7.172e-15 z + 3.557e-15 --------------------------------------- 1.111e-15 z^2 - 1.926e-15 z + 8.148e-16 Sample time: unspecified Discrete-time transfer function. PlantaD2zoh = 1.769e-17 z^5 - 5.271e-17 z^4 + 3.472e-17 z^3 + 3.523e-17 z^2 - 5.222e-17 z + 1.729e-17 ------------------------------------------------------------------------ 1.111e-15 z^6 - 6.361e-15 z^5 + 1.514e-14 z^4 - 1.917e-14 z^3 + 1.362e-14 z^2 - 5.149e-15 z + 8.081e-16 Sample time: 6.6667e-06 seconds Discrete-time transfer function. PlantaD2Tustin = 1.156e-17 z^6 - 2.289e-17 z^5 - 1.18e-17 z^4 + 4.578e-17 z^3 - 1.11e-17 z^2 - 2.289e-17 z + 1.133e-17 ---------------------------------------------------------------------------- 1.111e-15 z^6 - 6.361e-15 z^5 + 1.514e-14 z^4 - 1.917e-14 z^3 + 1.362e-14 z^2 - 5.149e-15 z + 8.081e-16 Sample time: 6.6667e-06 seconds Discrete-time transfer function.