Page 140 - Mechatronics with Experiments
P. 140

126   MECHATRONICS
                              There are other methods such as trapezoidal approximation with frequency pre-warping,
                              zero order hold (ZOH) equivalent approximation, pole-zero mapping, and first-order equiv-
                              alence which are not discussed here.
                                   It should be quickly noted that as the sampling rate gets very large relative to the
                              bandwidth of the controller (i.e., 20 to 50 times larger), the differences between different
                              approximation methods becomes insignificant. Likewise, if the sampling frequency is not
                              very large relative to the bandwidth of the controller (i.e., 2 to 4 times larger than the con-
                              troller bandwidth), the differences between different approximations become significant.

                              2.13.1 Finite Difference Approximations

                              The basic concept in approximation of analog filters by digital filters is the finite dif-
                              ference approximation of differentiation and integration. Let us consider an error sig-
                              nal, e(t) and its differentiation and integration, and the samples of the error signal
                              {… , e(kT − T), e(kT), e(kT + T), …},
                                                     (   t     )
                                              d
                                                [e(t)],  e(  )d    ⟺ (e(kT), e(kT − T), …)      (2.207)
                                              dt      ∫
                                                       t o
                              Consider a first-order transfer function example,
                                                        u(s)         a
                                                            = G(s) =                            (2.208)
                                                        e(s)        s + a
                                                   ̇ u(t) + au(t) = ae(t)                       (2.209)
                                                                kT
                                                            =     [−au(  ) + ae(  )]d           (2.210)
                                                    u(t)| t=kT  ∫
                                                               0
                              Discretize the integration
                                                 kT−T                    kT
                                        u(kT) =      [−au(  ) + ae(  )]d   +  [−au(  ) + ae(  )]d    (2.211)
                                               ∫                       ∫
                                                0                       kT−T
                                                            kT
                                        u(kT) = u(kT − T) +   [−au(  ) + ae(  )]d               (2.212)
                                                         ∫
                                                           kT−T
                                   Now, we consider three different finite difference approximations where each one
                              makes a different approximation to the integration term in the above equation.

                                (i) Forward difference approximation:
                                               u(kT) = u(kT − T) + T[−au(kT − T) + ae(kT − T)]  (2.213)
                                               u(kT) = (1 − aT) u(kT − T) + aTe(kT − T)         (2.214)
                                   Notice that this equation can be easily implemented in software on a digital computer.
                                   At every control sampling period, all that is needed is the value of the output at the
                                   previous cycle and the error. The algorithm involves two multiplication and one
                                   addition operation.
                                       In order to develop a more generic relationship between the analog and digital
                                   controller approximate conversion, we take the Z-transform of the above difference
                                   equation,
                                                                  −1
                                                                             −1
                                                      [1 − (1 − aT)z ]u(z) = aTz e(z)           (2.215)
                                   Notice that a single sampling period of delay in a signal adds a z −1  to the transform
                                   of the signal. Likewise, an advance of a single sampling period in a signal adds a z
                                   to the transform of a signal. Using that principle, it is easy to take the Z-transform
   135   136   137   138   139   140   141   142   143   144   145