%% Simulacion sistema continuo con efecto del ZOH y compensación polo-cero clear close all s=tf('s'); Tm=0.01; %% Análisis de la compensación con funcion de transferencia % del ZOH normalizado respecto al periodo T Gzoh = (2/Tm)/(s + (2/Tm)); GZOH = (1 - exp(-s*Tm))/s; figure; bode(Gzoh); grid legend('ZOH = (2/T)/(s + (2/T))') z=tf('z',Tm); Cz=2*z/(z + 1); figure; bode(Cz); grid legend('C(z) = 2*z/(z + 1)') % Aproximando Gzoh por Tustin se tiene: Gzoh_dn=(1/2)*(z + 1)/z; figure; bode(Gzoh_dn); grid legend('Gzoh(z) = (1/2)*(z + 1)/z') Gcomp_n=Cz*Gzoh_dn; figure; bode(Gcomp_n); grid close all %% Análisis de la compensación con funcion de transferencia % del ZOH sin normalizar Gzoh = Tm/(1 + (s*Tm/2)); figure; bode(Gzoh); grid legend('ZOH = T/(1 + s*T/2)') z=tf('z',Tm); Cz=(1/Tm)*(2*z/(z + 1)); figure; bode(Cz); grid legend('C(z) = 2*z/(z + 1)') % Aproximando Gzoh por Tustin se tiene: Gzoh_dsn=(Tm/2)*(z + 1)/z; figure; bode(Gzoh_dsn); grid legend('Gzoh(z) = (T/2)*(z + 1)/z') Gcomp_sn=Cz*Gzoh_dsn; figure; bode(Gcomp_sn); grid