Page 99 - Mechatronics with Experiments
P. 99

CLOSED LOOP CONTROL  85
                             data is to plot the 20 log |G(jw)| as y-axis versus ∠(G(jw)) as the x-axis, where w is
                                                  10
                             parameterized along the plot. A frequency response can be expressed as
                                                       G(jw) = |G(jw)|∠(G(jw))                  (2.89)

                             Log magnitude (20 log |G(jw)|)versus phase angle (∠(G(jw))) plots of various elements
                                                10
                                                            ®
                             are shown in Figure 2.32. A MATLAB program to generate the plot for Figures 2.30–2.32
                             is shown below.
                             K0 = 10.0 ;
                             z1 = 1.0  ;
                             p1 = 1.0 ;

                             num1 = [K0]    ; den1 = [1]     ; sys1=tf(num1,den1) ;  % Ko
                             num2 = [1]     ; den2 = [1  0]  ; sys2=tf(num2,den2) ;  % 1/s
                             num3 = [1 0]   ; den3 = [1]     ; sys3=tf(num3,den3) ;  % s
                             num4= [1]      ; den4 = [1/p1  1]; sys4=tf(num4,den4) ;  % 1/(s/p1+1)
                             num5= [1/z1 1]  ; den5 = [1]    ; sys5=tf(num5,den5) ;  % (s/z1+1)
                             psi = 0.25;  w_n = 1.0 ;
                             num6=[w_nˆ2] ; den6=[1  2*psi*w_n  w_nˆ2]; sys6=tf(num6,den6) ;
                             psi = 0.5;  w_n = 1.0 ;
                             num7=[w_nˆ2] ; den7=[1  2*psi*w_n  w_nˆ2]; sys7=tf(num7,den7) ;
                             psi = 0.75;  w_n = 1.0 ;
                             num8=[w_nˆ2] ; den8=[1  2*psi*w_n  w_nˆ2]; sys8=tf(num8,den8) ;
                             psi = 0.25;  w_n = 1.0 ;
                             num9=[1  2*psi*w_n  w_nˆ2];  den9=[w_nˆ2] ; sys9=tf(num9,den9) ;
                             psi = 0.5;  w_n = 1.0 ;
                             num10=[1  2*psi*w_n  w_nˆ2];  den10=[w_nˆ2] ;  sys10=tf(num10,den10) ;
                             psi = 0.75;  w_n = 1.0 ;
                             num11=[1  2*psi*w_n  w_nˆ2];  den11=[w_nˆ2] ; sys11=tf(num11,den11) ;
                             figure(1) ; grid on;                 % Bode Plots
                             subplot(3,3,1) ;  bode(sys1); grid on;
                             subplot(3,3,2) ;  bode(sys2); grid on;
                             subplot(3,3,3) ;  bode(sys3); grid on;
                             subplot(3,3,4) ;  bode(sys4); grid on;
                             subplot(3,3,5) ;  bode(sys5); grid on;
                             subplot(3,3,7) ;  bode(sys6);  hold on; bode(sys7);  hold on;
                                              bode(sys8);  hold on;grid on;
                             subplot(3,3,8) ;  bode(sys9);  hold on; bode(sys10);  hold on;
                                              bode(sys11); hold on;grid on;
                             figure(2) ; grid off;              % Nyquist (Polar) plots
                             subplot(3,3,1) ;  nyquist(sys1); grid off;
                             subplot(3,3,2) ;  nyquist(sys2); grid off;
                             subplot(3,3,3) ;  nyquist(sys3); grid off;
                             subplot(3,3,4) ;  nyquist(sys4); grid off;
                             subplot(3,3,5) ;  nyquist(sys5); grid off;
                             subplot(3,3,7) ;  nyquist(sys6);  hold on; nyquist(sys7);  hold on;
                                              nyquist(sys8);  hold on; grid off;
                             subplot(3,3,8) ;  nyquist(sys9);  hold on; nyquist(sys10);  hold on;
                                              nyquist(sys11); hold on; grid off;

                             figure(3) ; grid off;               % Log Magnitude versus Phase plots
                             subplot(3,3,1) ;  nichols(sys1); grid off;
                             subplot(3,3,2) ;  nichols(sys2); grid off;
                             subplot(3,3,3) ;  nichols(sys3); grid off;
                             subplot(3,3,4) ;  nichols(sys4); grid off;
                             subplot(3,3,5) ;  nichols(sys5); grid off;
   94   95   96   97   98   99   100   101   102   103   104