Control Systems Exercise Set
Control Systems Exercise Set
1. Linear algebra:
     (a) Consider the following differential equation
           and define x = [x1 x2 x3 ]T . Write this system in the form ẋ = Ax + Bu, give the
           corresponding matrices A and B, and compute the inverse of A.
     (b) For invertible matrices A and B, prove the following identities:
             (AB)−1 = B −1 A−1 ,
             (AB)T = B T AT ,
             A(I + BA)−1 = (I + AB)−1 A.
    Solution:
Since the last statement is true the earlier statements hold as well.
      i. ÿ + 2ẏ + u = 0,
      ii. ÿ + 2ẏ + u̇ + u = 0,
                                                 1
Exercise Set 7 - Control Systems (5ESD0)                                                       Oct 2021
iii. ÿ + 2ẏ + ü + u̇ + u = 0.
    Under the assumption that initial conditions equal to zeroes, do the following exercises—for
    each case (i. - iii.):
    (a) Derive a corresponding state-space model using the simulation diagram approach, then
        compute its transfer function (from the obtained state-space model representation).
    (b) Directly apply Laplace transform to the differential equation and obtain its transfer
        function. Compare the transfer functions you have obtained from (2a) and (2b).
    Solution:
              with                                   
                              0          1            0                                
                          A=                 ,    B=      ,         C= 1   0 ,   and D = 0 .
                              0         −2           −1
              We can compute the transfer function from the state-space representation using
                                                               −1             −1
                                           G(s) = C (sI − A)        B+D =
                                                                            s(s + 2)
         (b) Assume the zero initial conditions. We have
                                                       2
Exercise Set 7 - Control Systems (5ESD0)                                                    Oct 2021
     ii. (a) Again, we first sketch the simulation diagram which is given in Figure 2.
             We then observe that
                                              ẋ1 = x2 − u
                                              ẋ2 = −2ẋ1 − u = −2x2 + u
                                               y = x1
                                 ⊤
             With x = x1     x2        , we have that
                                                   (
                                                    ẋ   = Ax + Bu
                                                    y    = Cx + Du
             with                                 
                              0     1               −1                              
                        A=              ,     B=       ,        C= 1    0 ,   and D = 0 .
                              0    −2                1
             We can compute the transfer function from the state-space representation using
                                                           −1              (s + 1)
                                   G(s) = C (sI − A)            B+D =−
                                                                          s(s + 2)
                                                   y(s)     (s + 1)
                                                        =−          .
                                                   u(s)    s(s + 2)
     iii. (a) Again, we first sketch the simulation diagram which is given in Figure 3.
              We then observe that
                                                 ẋ1 = −2x1 + x2 + u
                                                 ẋ2 = −u
                                                   y = x1 − u
                                 ⊤
             With x = x1     x2        , we have that
                                                   (
                                                    ẋ   = Ax + Bu
                                                    y    = Cx + Du
                                                   3
Exercise Set 7 - Control Systems (5ESD0)                                          Oct 2021
           with                              
                           −2    1            1                              
                     A=             ,   B=        ,       C= 1   0 ,   and D = −1 .
                            0    0           −1
           We can compute the transfer function from the state-space representation using
                                                     −1            (s2 + s + 1)
                                G(s) = C (sI − A)         B+D =−
                                                                     s(s + 2)
                                          y(s)    (s2 + s + 1)
                                               =−
                                          u(s)      s(s + 2)
                                                 4
Exercise Set 7 - Control Systems (5ESD0)                                                                       Oct 2021
                                                              ẋ = Ax + Bu
                                                              y = Cx + Du
    where
                                                        
          −a1          −a2        ...         ...    −an              
                                                                      1
          1            0                             0             0
                                                      .. 
                                                        
                                  ..                                  
                                                                 B =  ...  ,
                                                                                                               
          0
       A=              1              .               . 
                                                         ,
                                                                      
                                                                                  C = b1   b2   . . . bn ,    D = b0
          .                      ..
                                                                      
          ..                                                        0
                                                         
                                       .       0      0 
               0       ...         0           1      0               0
                                                              ẋ = Ax + Bu
                                                              y = Cx + Du
    where
                                                      
            −p1              0         ...          0              
                                                                    c1
                                      ..           ..            c2 
            0           −p2              .          .                                                        
         A=                                           ,     B =  . ,         C= 1   1 ...     1 ,        D = c0
                                                                   
            .           ..            ..                          .. 
            ..
                                                       
                            .             .         0 
                   0        ...         0          −pn             cn
                                                                 5
Exercise Set 7 - Control Systems (5ESD0)                                                    Oct 2021
                                                       (s + 1)   −s − 1
                                          G(s) = −             = 2
                                                      s(s + 2)  s + 2s
              with
                                               
                           −2 0                  1                                       
                      Ac =        ,        Bc =     ,      Cc = −1         −1 ,   and Dc = 0 .
                            1 0                  0
                                                       (s + 1)   c1    c2
                                          G(s) = −             =    +
                                                      s(s + 2)   s    s+2
              with
                                                   
                             0    0               −0.5                                   
                     Am =             ,   Bm =          ,    Cm = 1         1 ,   and Dm = 0 .
                             0   −2               −0.5
          (c) Both representations have different system matrices, except for the feed-through
              term Dc = Dm = 0. To find the transformation matrix T , compute
                                                                 
                                      Bc Ac Bc = T Bm Am Bm .
              We then have
                                                                                     
                                                                  −1      0    −2
                                 T = Bc     Ac B c B m      Am B m         =            ,
                                                                             −1     1
                                                  6
Exercise Set 7 - Control Systems (5ESD0)                                                               Oct 2021
               with
                                                  
                            −2 0                    1                                        
                       Ac =        ,          Bc =     ,       Cc = 1    −1 ,         and Dc = −1 .
                             1 0                    0
               with
                                                      
                              0    0                −0.5                                      
                      Am   =           ,    Bm   =         ,    Cm = 1        1 ,      and Dm = −1 .
                              0   −2                 1.5
           (c) It can be observed that both representations have the same non-zero feed-through
               term Dc = Dm = −1. To find the transformation matrix T , compute
                                                                   
                                        Bc Ac Bc = T Bm Am Bm .
               We then have
                                                                                         2
                                                                                              
                                                                     −1        0     3
                                  T = Bc       Ac B c     Bm   Am Bm          =                    ,
                                                                                  −1    − 13
                                                        7
Exercise Set 7 - Control Systems (5ESD0)                                                               Oct 2021
    with
                                            
                     −2 0                     2                                        
                  A=        ,             B=     ,      C = 0.5       −0.5 ,     and D = −1 .
                      1 0                     0
Solution:
                                                            −1            −(s2 + s + 1)
                                   G(s) = C (Is − A)             B+D =                  ,
                                                                            s(s + 2)
which has poles and zeros equal to the obtained answers in questions (a) and (b).
  5. Linearisation:
     (a) The mathematical model of a stick-balancing problem is
                                                        8
Exercise Set 7 - Control Systems (5ESD0)                                                         Oct 2021
    (b) The mathematical model of a single-link robotic manipulator with a flexible joint is
        given by
                                 I θ̈1 (t) + mgl sin θ1 (t) + k(θ1 (t) − θ2 (t)) = 0
                                                       J θ̈2 (t) − k(θ1 (t) − θ2 (t)) = f (t),
          where θ1 (t), θ2 (t) are the angular positions at time t, I, J are the moments of inertia,
          m and l are the link mass and length, and k is the link spring constant.
            i. Determine the state-space equations by considering x = [θ1 θ̇1 θ2 θ̇2 ].
           ii. Linearize the system around the nominal operating point (xn , fn ).
    Solution:
          We can then linearize around the point θ = θ̇ = f = 0 using a first order Taylor
          approximation given by
                     g(x, u) ≈ g(x∗ , u∗ ) + ∇x g(x∗ , u∗ )(x − x∗ ) + ∇u g(x∗ , u∗ )(u − u∗ )
                                ≈ Alin x̄ + Blin ū
          where                                                               
                                                         0    1                0
                                               Alin   =          ,   Blin   =
                                                         1    0               −1
                                             ⊤
    (b)    i. If x = θ1   θ̇1     θ2    θ̇2       then
                                                   ˙ 
                                                                      x2
                                                                                     
                                                     θ1
                                                   θ¨1  − mgl sin(x1 )+k(x1 −x3 ) 
                                              ẋ =                     I
                                                   θ˙2  = 
                                                                                   
                                                                      x4             
                                                     ¨          f +k(x1 −x3 )
                                                     θ2                     J
              Assuming that the output variable is the link angular position, i.e., y = x1 , we
              have                                             
                                     C= 1 0 0 0 , D= 0