Page 147 - MATLAB an introduction with applications
P. 147

132 ———  MATLAB: An Introduction with Applications


                    3.12  ROOT LOCUS PLOTS

                   Consider the system equation
                                            ...
                                ( +
                               Ks   z  )(s +  z  ) (s +  z  )
                            1+      1     2      n  =  0                                            ...(3.17)
                                           ...
                               (s +  p 1 )(s +  p 2 ) (s +  p n  )
                   Equation (3.17) can be written as
                                num
                             +
                            1 K      =  0                                                           ...(3.18)
                                 den
                   where num is the numerator of the polynomial and den is the denominator polynomial, and K is the gain
                   (K > 0). The vector K contains all the gain values for which the closed loop poles are to be computed.
                   The root loci is plotted by using the MATLAB command
                       rlocus (num, den)
                   The gain vector K is supplied by the user.
                   The matrix r and gain vector K are obtained by the following MATLAB commands:
                       [r, k] = rlocus (num, den)
                       [r, k] = rlocus (num, den, k)
                       [r, k] = rlocus (A, B, C, D)
                       [r, k] = rlocus (A, B, C, D, K)                                              ...(3.19)
                       [r, k] = rlocus (sys)
                   In Eqs. (3.19), r has length K rows and length [den –1] columns containing the complex root locations.
                   For plotting the root loci, the MATLAB command plot (r, ‘ ’) is used.
                   The following MATLAB command are used for plotting the root loci with mark ‘0’ or ‘x’:
                       r = rlocus (num, den)
                       plot (r, ‘0’) or plot (r, ‘x’)
                   MATLAB provides its own set of gain values used to compute a root locus plot. It also uses the automatic
                   axis scaling features of the plot command.

                    3.13  BODE DIAGRAMS

                   Bode diagrams are rectangular plots. Bode diagram are also known as logarithmic plot and consist of two
                   graphs: the first one is a plot of the logarithmic of the magnitude of a sinusoidal transfer function, the
                   second one is a plot of the phase angle. Both these graphs are plotted against the frequency on a logarithmic
                   scale.
                   The MATLAB command “bode” obtains the magnitudes and phase angles of the frequency response of
                   continuous time, linear, time invariant systems.
                   The MATLAB bode commands commonly used are:

                       Bode(num, den)
                       bode(num, den, w)
                       bode(A, B, C, D)                                                             ...(3.20)
                       bode(A, B, C, D, w)
                       bode(sys)






                   F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09
   142   143   144   145   146   147   148   149   150   151   152