T
A2=
(8-10)
were the coefficients of the difference equation.
A simulation of both the continuous and discrete versions of the lag-lead compensator
was conducted for verification of the discretization and for selection of a sampling time that
would best duplicate the performance of the continuous compensator. Initially, the continuous
controller response to a step input was determined via inverse Laplace transformation. In the
continuous time domain, the lag-lead controllers were functions of the system gain, K, the lag
and lead time constants, Ti and Td, and time, t, as in
H(t) = K + i -i- eV;)
Ti Td T dd (8-11)
The discrete difference equation (equation 8-7) was programmed for a simulated response to a
unit step input. A comparison was conducted for various values of Kc, Ti, and Td. Since vision
data was updated at 60 HZ, a discrete sampling time of 0.01667 sec (1/60 sec) was initially
chosen. Typical responses of the controllers along with the differences between the signals are
presented in Figure 8.3. For this presentation, the controller parameter values for the joint 0
position and vision controllers were used. Thus, these simulations were repeated for the final,
tuned controller parameters after the tuning process was complete. These plots indicated that
the discrete version of the lag-lead controller had a maximum error of 22 percent which
decreased to less than 0.6 percent in less than 0.08 sec or 5 sampling periods. These response
curves were used to verify that the discrete version of the lag-lead controller did adequately
imitate the performance of the continuous-time controller and that the theory of the continuous
domain controller could be used in tuning the discrete controller.
After the discretized version of the lag-lead compensator was verified, a section was
added to the software environment to aid in tuning the discrete lag-lead compensator. This
section calculated the coefficients of the difference equations from the analog parameters Ti, Td,