Page 145 - MATLAB an introduction with applications
P. 145

130 ———  MATLAB: An Introduction with Applications


                   3.10.2 Response to Initial Condition
                   Case 1: State Space Approach
                   Consider a system defined in state space given by
                           x    = Ax                                                                 ...(3.1)
                       x (0) = x o
                   Assuming that there is no external input acting on the system, the response x(t) knowing the initial condition
                   x(0) and that x is an n-vector, is obtained as follows:
                   Taking Laplace transform of both sides of Eq. (3.1), we obtain
                      s x(s) – x(0) = AX(s)                                                          ...(3.2)
                   Equation (3.2) can be rearranged as
                      s x(s) = AX(s) + x(0)                                                          ...(3.3)
                   Taking inverse Laplace transform of Eq. (3.3), we get
                       x    = Ax + x(0) ä(t)                                                         ...(3.4)
                   Defining   z    = x, Eq. (3.4) can be written as
                       z     = A  z   + x(0) ä(t)                                                    ...(3.5)
                   Integrating Eq. (3.5), we obtain
                       z    = A z + x(0) 1(t) = Az + B u                                             ...(3.6)
                   where     B = x(0)  and   u = 1(t)
                   Noting that   z   = x and x(t) =  z   (t), we have
                      x =  z    = A z + B u                                                          ...(3.7)
                   The response to initial condition is obtained by solving Eqs. (3.6) and (3.7).
                   The corresponding MATLAB command used to obtain the response curves are given as follows:
                     [x, z, t] = step (A, B, A, B);
                         x = [1 0 0 …0] * x’;
                        1
                         x = [1 0 0 …0] * x’;
                        2
                          .        .
                          .        .
                          .        .
                         x = [0 0 0 …1] * x’;
                        n
                        plot (t, x , x ,…, t, x
                                 1   2        n
                   Case 2: State Space Approach
                   Consider the system defined in state space is by
                       x    = Ax  x(0) = x 0                                                         ...(3.8)
                        y = Cx                                                                       ...(3.9)
                   where x is an n vector and y is an m vector.
                   By defining   z    = x                                                           ...(3.10)










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