Page 209 -
P. 209

192                                       Computed-Torque Control

                                                                          (3)


            with the tracking error defined as

                                         e=q d-q.                         (4)



            b. Desired Trajectory

            Let the desired trajectory q d(t) have the components


                                     θ 1d=g 1  sin (2πt/T)
                                     θ 2d=g 2  cos (2πt/T)                (5)


            with period T=2 s and amplitudes g i=0.1 rad≈6 deg. For good tracking select
            the time constant of the closed-loop system as 0.1 s. For critical damping, this
            means that K v=diag{k v}, K P=diag{k p}, where




                                                                          (6)




            It is important to realize that the selection of controller parameters such as the
            PD gains depends on the performance objectives-in this case, the period of the
            desired trajectory.


            c. Computer Simulation
            Let us simulate the computed-torque controller using program TRESP in
            Appendix B. Simulation using commercial packages such as MATLAB and
            SIMNON is quite similar.
              The subroutines needed for TRESP are shown in Figure 4.4.2. They are
            worth examining closely. Subroutine SYSINP (ITx, t) is called once per Runge-
            Kutta integration period and generates the reference trajectory q d(t), as well
            as q d(t), and q d(t). Note that the reference signal should be held constant
            during each integration period.








            Copyright © 2004 by Marcel Dekker, Inc.
   204   205   206   207   208   209   210   211   212   213   214