% ***** MATLAB Code Starts Here %
%second_order_04_mat
%
PO_max = 25;
PO_min = 5;
Ts_max = 2;
Ts_min = 0.5;
wd = 12.6;
zeta_min = abs(log(PO_max/100))/sqrt(pi^2 + log(PO_max/100)^2);
zeta_max = abs(log(PO_min/100))/sqrt(pi^2 + log(PO_min/100)^2);
beta_max = acos(zeta_min);
beta_min = acos(zeta_max);
slope_max = tan(beta_max);
slope_min = tan(beta_min);
zeta_wn_max = -4/Ts_max;
zeta_wn_min = -4/Ts_min;
figure(1),clf,plot([zeta_wn_min zeta_wn_min],[-5 20],[zeta_wn_max zeta_wn_max],[-5 20],...
[-20 0],[wd wd],[-20 0],slope_min*[20 0],[-20 0],slope_max*[20 0]),...
axis([-20 5 -5 20]),axis('square'),plotax,xlabel('Real Axis'),ylabel('Imag Axis'),...
title('Locating Closed-Loop Poles in the s-plane to Satisfy Specifications')
zeta_wn = linspace(zeta_wn_min,zeta_wn_max,25);
for i = 1:length(zeta_wn)
figure(1),hold on,plot([zeta_wn(i) zeta_wn(i)],[slope_min*abs(zeta_wn(i)) min([wd slope_max*abs(zeta_wn(i))])],'k:'),hold off
end
text(-16,17,'PO_{min} = 5%'),text(-15,16,'\zeta_{max} = 0.6901'),text(-14,15,'\beta_{min} = 46.4 deg')
text(-7.5,17.5,'PO_{max} = 25%'),text(-7,16.5,'\zeta_{min} = 0.4037'),text(-6.5,15.5,'\beta_{max} = 66.2 deg')
text(-19,12,'\omega_{d-max} = 12.6 r/s')
text(-7.75,-1.5,'T_{s-min} = 0.5 s'),text(-7.75,-3,'Min \zeta\omega_n = -8')
text(-1.75,-1.5,'T_{s-max} = 2 s'),text(-1.75,-3,'Max \zeta\omega_n = -2')
%
% ***** MATLAB Code Stops Here
Click the
icon to return to the Dr. Beale's home page
Lastest revision on
Wednesday, June 7, 2006 12:09 PM