Page 166 - MATLAB an introduction with applications
P. 166

Control Systems ———  151

                   Example E3.11: For the closed-loop system defined by

                                Cs   =    1
                                  ()
                                       2
                                Rs    s +ζ     1
                                          2 s +
                                  ()
                   (a) plot the unit-step response curves c(t) for æ =0, 0.1, 0.2, 0.4, 0.5, 0.6, 0.8, and 1.0. ù  is normalized to 1.
                                                                                         n
                   (b) plot a three-dimensional plot of (a).
                   Solution:
                       >> % Two-dimensional plot and three-dimensional plot of unit-step
                       >> %response curves for the standard second-order system with wn =1
                       >> %and zeta = 0, 0.1, 0.2, 0.4, 0.5, 0.6, 0.8, and 1.0
                       >> t=0:0.2:10;
                       >> zeta= [0 0.1 0.2 0.4 0.5 0.6 0.8 1.0];
                       >> for n=1:8;
                       >> num= [0 0 1];
                       >> den= [1 2*zeta (n) 1];
                       >> [y (1:51, n), x, t] = step (num, den, t);
                       >> end
                       >> %Two-dimensional diagram with the command plot (t, y)
                       >> plot (t, y)
                       >> grid
                       >> title (‘Plot of unit-step response curves’)
                       >> xlabel (‘t Sec’)
                       >> ylabel (‘Response’)
                       >> text (4.1, 1.86, ‘\zeta=0’)
                       >> text (3.0, 1.7,‘0.1')
                       >> text (3.0, 1.5,‘0.2’)
                       >> text (3.0, 1.22,‘0.4')
                       >> text (2.9, 1.1,‘0.5’)
                       >> text (4.0, 1.08,‘0.6')
                       >> text (3.0, 0.9, ‘0.8’)
                       >> text (4.0, 0.9,‘1.0')
                       >> %For three-dimensional plot, we use the command mesh (t, eta, y’)
                       >> mesh (t, eta, y’)
                       >> title (‘Three-dimensional plot of unit-step response curves’)
                       >> xlabel (‘t Sec’)
                       >> ylabel (‘\zeta’)
                       >> zlabel (‘Response’)









                   F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09
   161   162   163   164   165   166   167   168   169   170   171