Page 177 - MATLAB an introduction with applications
P. 177

162 ———  MATLAB: An Introduction with Applications










                                                        Unit-ramp response
                                     10



                                      8
                                     output

                                     and  6
                                     input

                                     Unit-ramp  4  Unit-ramp input




                                      2                         Output



                                      0
                                       0         2        4        6         8        10
                                                             t Sec

                                                 Fig. E3.15 Unit-ramp response


                   Example E3.16: A higher-order system is defined by
                                             2
                                  ()
                                Cs   =     7s + 16s + 10
                                            3
                                                 2
                                       4
                                  ()
                                Rs    s + 5s + 11s + 16s + 10
                   (a) plot the unit-step response curve of the system using MATLAB
                   (b) obtain the rise time, peak time, maximum overshoot and settling time using MATLAB.
                   Solution:
                        >> %Unit-step response curve
                       >> num=[0 0 7 16 10];
                       >> den=[1 5 11 16 10];
                       >> t=0:0.02:20;
                       >> [y,x,t]=step(num,den,t);
                       >> plot(t, y)
                       >> grid







                   F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09
   172   173   174   175   176   177   178   179   180   181   182