Page 150 - MATLAB an introduction with applications
P. 150

Control Systems ———  135

                   The following MATLAB command is commonly used for obtaining the resonant peak and resonant
                   frequency:
                       [mag, phase, w] = bode (num, den, w)
                   or
                       [mag, phase, w] = bode (sys, w)
                       [Mp, k] = max (mag)                                                          ...(3.32)
                   resonant peak = 20 * log 10 (Mp)
                   resonant frequency = w (k)
                   The following lines are used in MATLAB program to obtain bandwidth:
                       n = 1
                   while 20 * log 10 (mag (n)) > –3
                       n = n + 1
                       end                                                                          ...(3.33)
                       bandwidth = w (n)


                    3.17  TRANSFORMATION OF SYSTEM MODELS

                   In this section, we consider two cases of transformation of system models:
                       1.   Transformation of system model from transfer function to state space
                       2.   Transformation of system model from state space to transfer function

                   3.17.1 Transformation of System Model from Transfer Function to State Space
                   The closed-loops transfer function can be written as
                            Y  ()  =  numeratorof polynomialins  =  num
                              s
                            U ()  denominator of polynomialins  den                                 ...(3.34)
                              s
                   The state space representation is obtained by the MATLAB command
                       [A, B, C, D] = tf 2ss (num, den)                                             ...(3.35)

                   3.17.2 Transformation of System Model from State Space to Transfer Function
                   The transfer function from state space equations is obtained by using
                   the MATLAB command:
                       [num, den] = ss2tf (A, B, C, D, iu)                                           (3.36)
                   where iu corresponds to the system with more than one input. iu is either 1, 2 or 3, where 1 implies input
                   u , 2 implies input u  and 3 implies input u 3 .
                    1
                                    2
                   For system with only one input, the MATLAB command
                       [num, den ] = ss2tf (A, B, C, D)                                             ...(3.37)
                   or
                       [num, den ] = ss2tf (A, B, C, D, 1)                                          ...(3.38)
                   may be used








                   F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09
   145   146   147   148   149   150   151   152   153   154   155