Page 141 - Mechatronics with Experiments
P. 141

CLOSED LOOP CONTROL  127
                                  of difference equations and inverse Z-transform of z-domain transfer functions to
                                  obtain difference equations. For real-time algorithmic implementation, we need the
                                  difference equation form of the controller.
                                                          u(z)      aTz −1
                                                              =
                                                          e(z)  1 − (1 − aT)z −1
                                                                    a.T
                                                              =
                                                                z − (1 − aT)
                                                                      a
                                                              =                                (2.216)
                                                                ((z − 1)∕T) + a
                                  Notice the substitution relationship between s and z using this approximation
                                                         a         a
                                                            ⟶                                  (2.217)
                                                        s + a    z−1  + a
                                                                 T
                                                                z − 1
                                                           s ⟶       ;  z = sT + 1             (2.218)
                                                                  T
                               (ii) Backward difference approximation:
                                  Another possible approximation is to use the backward difference rule

                                                  u(kT) = u(kT − T) + T [−au(kT) + ae(kT)]     (2.219)
                                  Again, the above equation is in a form suitable for real-time implementation in
                                  software. In order to obtain a more generic relationship for this type of approximation,
                                  let us take the Z-transform of the above equation,
                                                            −1
                                                      u(z) = z u(z) − Ta u(z) + Ta e(z)        (2.220)
                                                                 −1
                                                        (1 + Ta − z )u(z) = Ta e(z)            (2.221)
                                                      u(z)      Ta          zTa
                                                          =            =
                                                      e(z)  1 + Ta − z −1  z − 1 + Taz
                                                              a
                                                          =                                    (2.222)
                                                            z−1  + a
                                                            zT
                                  The backward approximation is equivalent to the following substitution between s
                                  and z,
                                                              a         a
                                                                 ⟶                             (2.223)
                                                            s + a    z−1  + a
                                                                      Tz
                                                                     z − 1
                                                                s ⟶                            (2.224)
                                                                      Tz
                              (iii) Trapezoidal approximation (Tustin’s method, bilinear transformation)
                                  Finally, we will consider the trapezoidal rule approximation among the finite differ-
                                  ence approximations to the integration,
                                                     T
                                    u(kT) = u(kT − T) +  [−a[u(kT − T) + u(kT)] + [a(e(kT − T) + e(kT)]] (2.225)
                                                     2
                                  Similarly, we take the Z-transform of the above equation,
                                                             T
                                                 zu(z) = u(z) +  [−a(1 + z)u(z) + a(1 + z)e(z)]  (2.226)
                                                             2
                                                   [   Ta         ]      T ⋅ a
                                                    z +  (1 + z) − 1 u(z) =  (1 + z)e(z)       (2.227)
                                                       2                  2
   136   137   138   139   140   141   142   143   144   145   146