Page 153 - Modern Control Systems
P. 153

Section  2.9  The Simulation of Systems  Using  Control  Design  Software  127
                        «(/)                                    >•</)
                                         Step    System    Output
                                         input  |  G(s)
                                                                            •>  t
                                                  (a)



                                                         t  = T: user-supplied time vector
                         y(t)  =  output response at t   or
                                              G(s) =  sys
                          T  = simulation time           t  =  Tflna,: simulation final time
                                                                   (optional)

                                                     ][

                                             [y,T]=step(sys,t)
     FIGURE  2.73
     The step function.                           (b)




                                                           % This script computes the step
                                                           %  response of the traction motor
                                                           % wheel velocity
                                                           %
                                                           num=[5400]; den=[2 2.5 5402]; sys=rf(num,den);
                                                           t=[0:0.005:3];
                                                           [y,t]=step(sys,t);
                            Jlffi           i  Hizi        plot(t,y),grid
                                                           xlabel(Time  (s)')
                                                                          1
                          0                                ylabel('Wheel velocity )
                           0   0.5  1.0  1.5  2.0  2.5  3.0
                                     Time (s)
                                     (a)                                   (b)

                      FIGURE 2.74  (a) Traction motor wheel velocity step response, (b) m-file script.



                          If the only objective is to plot the output,y(t), we can use the step function  with-
                      out  left-hand  arguments  and  obtain  the  plot  automatically  with  axis  labels. If  we
                      need y{f)  for  any purpose  other  than plotting, we must  use the step  function  with
                      left-hand  arguments, followed  by the plot function  to plot y(t). We define  t as a row
                      vector containing  the times at which we wish the value  of the output variable  y(t).
                      We can also select t  —  /g nai, which results in a step response from  t  —  0 to t  —  ffmai
                      and the number  of intermediate points are selected  automatically.
                         The step response  of  the  electric  traction  motor  is shown  in Figure  2.74. As
                      expected,  the  wheel  velocity  response,  given  by y(t),  is  highly  oscillatory.  Note
                      that the output  is y(t)  s  o)(t).  m
   148   149   150   151   152   153   154   155   156   157   158