Page 212 -
P. 212
4.4 Computed-Torque Control 195
Figure 4.4.2: Subroutines for simulation using TRESP.
Figure 4.4.3: Joint angles θ 1(t) and θ 2(t) (red).
Subroutine F(time, x, xp) is called by Runge-Kutta and contains the
continuous dynamics. This includes both the controller and the arm dynamics.
The state to be integrated is and the subroutine should
compute the state derivative x (i.e., xp, which signifies x—prime).
Subroutine CTL(x) contains the controller (3). Note the structure of this
subroutine. First, the tracking error e(t) and its derivative are computed. Then
M(q) and are computed. Finally, (3) is
manufactured.
Copyright © 2004 by Marcel Dekker, Inc.