Page 190 - MATLAB an introduction with applications
P. 190

Control Systems ———  175

                            20log K = 7 dB
                   or               K = 2.23
                   Example E3.23: Obtain the state-space representation of the following system using MATLAB.
                                  Cs  =     35s +  7  .
                                   ( )
                                   ()
                                  Rs    s + 5s + 36s +  7
                                         3
                                             2
                   Solution:
                   A MATLAB program to obtain a state-space representation of this system is given below.
                   % MATLAB Program
                       >> num=[0 0 35 7];
                       >> den=[1 5 36 7];
                       >> g=tf(num,den)

                   Transfer function:
                                             +
                                          35s 7
                                      ∧     ∧
                                              +
                                                   +
                                        +
                                     s3 5s 2 36s 7
                       >> [A,B,C,D]=tf2ss(num,den)
                   A =
                       –5 –36 –7
                         1   0   0
                         0   1   0
                   B =
                         1
                         0
                         0
                   C =
                         0  35   7
                   D =
                         0


                   From the MATLAB output, we obtain the following state space equations:
                                                   7 
                                   x       −   5 − 36 −   x   1  
                                   x   1   =    1  0  0     x 1    
                                                         +
                                                           0 u
                                    2                2   
                                                           0  
                                                       3 
                                   x    3       0  1  0     x    
                                             x 
                                              1
                                            
                                      y = [0  7] x 2  + [0]u
                                            
                                             x 
                                            
                                              3



                   F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09
   185   186   187   188   189   190   191   192   193   194   195