Page 196 - MATLAB an introduction with applications
P. 196

Control Systems ———  181


                                   x    1   −   1 − 1.5    x 1   1.5
                                                     +
                                      =             u
                                   x   2    2  0    x 2    0  
                                              x 
                                              1
                                       y =  [10 ] 
                                             x
                                            
                                              2
                   where u is the input and y is the output.
                   Solution:
                       >> % Unit-step response
                       >> A=[–1 –1.5;2 0];
                       >> B=[1.5;0];
                       >> C=[1 0];
                       >> D=[0];
                       >> y,x,t]=step(A,B,C,D);
                       >> plot(t,y)
                       >> grid
                       >> title(‘Unit–step response’)
                       >> xlabel(‘t Sec’)
                       >> ylabel(‘Output’)






                                                       Unit-step response
                                            0.6
                                            0.5
                                            0.4
                                            0.3
                                           Output  0.2

                                            0.1
                                             0
                                           – 0.1
                                           – 0.2
                                           – 0.3
                                              0     2    4     6    8    10    12
                                                            t Sec
                                                Fig. E3.29 (a) Unit-step response

                       >> % Unit-ramp response
                       >> A=[–1 –1.5; 2 0];
                       >> B=[1.5; 0];








                   F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09
   191   192   193   194   195   196   197   198   199   200   201