Professional Documents
Culture Documents
16th Triennial World Congress, Prague, Czech Republic
16th Triennial World Congress, Prague, Czech Republic
16th Triennial World Congress, Prague, Czech Republic
PREDICTIVE COMPUTED-TORQUE
CONTROL OF A PUMA 560 MANIPULATOR
ROBOT
Abstract: This paper describes the integration of constrained predictive control and
computed-torque control, and its application on a six degree-of-freedom PUMA
560 manipulator arm. The real-time implementation was based on SIMULINK,
with the predictive controller and the computed-torque control law implemented
in the C programming language. The constrained predictive controller solved a
quadratic programming problem at every sampling interval, which was as short
as 10 ms, using a prediction horizon of 150 steps and an 18th order state space
model. Copyright c 2005 IFAC
229
the waist, shoulder, and elbow, while three smaller Notice that, as a result of using the feedback
motors position the orientation of the wrist. The linearising transformation (4), the tracking error
PUMA 560 has a large reach, and can achieve dynamics are given by a linear state equation
impressive acceleration. Originally designed for with constant coefficients. The feedback linearis-
assembly and manipulation tasks, the PUMA arm ing transformation (4) can be inverted to give
is now widely adopted by academic institutions for
τ = M (q)(q̈d − u) + N (q, q̇). (7)
research purposes.
This is the computed-torque control law. An outer
loop controller is often used. The role of the outer
loop controller is to provide the input u. For
example, PD and PID and LQR computed-torque
controllers have been proposed as outer loop con-
trollers (Lewis et al., 2004). The computed-torque
control technique is known to perform well when
the robot arm parameters are known fairly accu-
rately. Fortunately, the dynamics of the PUMA
560 manipulator are well known and reported.
The inverse dynamics and Denavit-Hartenberg
arm parameters employed in this work are based
on those reported in (Lewis et al., 2004) and
(Corke and Armstrong-Helouvry, 1994).
Fig. 1. PUMA robot manipulator arm 2.2 The predictive control problem
230
outputs ẑ(k+i|k) from a reference trajectory r(k+ Cz A
i|k) and also it penalises changes in the future ..
manipulated inputs ∆û(k + i|k). Define the cost
.
Cz A m
function as follows ψ=
m+1 ,
Cz A
..
.
p
X Cz A p
V (k) = ||ẑ(k + i|k) − r(k + i|k)||2Q(i) Cz B
i=1 ..
m−1 .
m−1
X
X
+ ||∆û(k + i|k)||2R(i) , (10) i
Cz A B
i=0
i=0
m
X
Υ= i ,
Cz A B
i=0
where the prediction and control horizons are p
..
and m, respectively, Q(i) and R(i) are output .
and input weight matrices, respectively. The cost Xp−1
function can also be written as follows: Cz A i B
i=0
Cz B . . . 0
V (k) = ||Z(k) − T (k)||2Q + ||∆U (k)||2R , (11) AB + B . . .
0
.. .. ..
.
m−1. .
X
where
i
A B ... B
i=0
Θ=X m .
ẑ(k + 1|k)
Ai B ... AB + B
i=0
Z(k) = ..
. .. .. .
..
. .
ẑ(k + p|k)
Xp−1 p−m
X
r̂(k + 1|k)
Ai B ... Cz A i B
T (k) = ..
(12) i=0 i=0
.
Define
r̂(k + p|k)
ε(k) = T (k) − ψx(k) − Υu(k − 1). (15)
∆û(k|k)
∆U (k) = ..
. ,
Now the following can be obtained:
∆û(k + m − 1|k)
231
u(k) ≥ umin (k) 3. IMPLEMENTATION AND RESULTS
u(k) ≤ umax (k)
|∆u(k)| ≤ ∆umax (k) 3.1 Hardware configuration
(21)
z(k) ≥ zmin (k)
The original Mark II controller of this PUMA
z(k) ≤ zmax (k). arm has been retrofitted to enable control from
This optimisation problem can be expressed as a personal computer. Special purpose TRC041
follows: retrofit cards (Mark V Automation Inc., 2000)
are installed in the backplane of the Mark II
min θT φθ + ϕT θ, (22) controller. Custom-made cables are used to inter-
face the TRC041 cards and a Q8 data acquisition
subject to
board (Quanser Consulting Inc., 2003a), which is
Ωθ ≤ ω, (23) connected to the PCI interface of the personal
where θ = ∆U (k), φ = H, ϕ = −ϑ. Expressions computer. An Intel Pentium 4 2.4 GHz personal
for matrix Ω and vector ω are obtained from computer running the Windows 2000 operating
Equations (21) and (14). system is used to control the arm. Servo torques
are controlled by the Mark II controller, with
reference values sent as analog voltages from the
personal computer through the Q8 board. The
Q8 board receives encoder and potentiometer sig-
2.3 The state space model employed nals from the TRC041 and is interfaced with
SIMULINK.
The linear tracking dynamics (6) can be discre-
tised using the zero order hold method with sam-
pling interval h to yield, ignoring the unmeasured
3.2 Software configuration
disturbance input w, the following discrete time
model:
Figure 2 shows a SIMULINK diagram of the
xd (k + 1) = Ad xd (k) + Bd u(k) real-time control scheme. MATLAB’s Real Time
(24) Workshop and Wincon (Quanser Consulting Inc.,
y(k) = Cd xd (k)
2003b) were used to generate and execute real-
where k is an integer time index, xd (k) = time code.
[e(kh) ė(kh)]T is the discrete time state vec-
tor, y(k) = e(kh) is the output vector, and
Ad , Bd , Cd , Dd are discrete time model matrices.
Define
∆u(k) = u(k) − u(k − 1)
(25)
∆x(k) = x(k) − x(k − 1).
A convenient augmented model can be obtained
as follows:
x(k + 1) = Ax(k) + B∆u(k)
(26)
y(k) = Cx(k) Fig. 2. SIMULINK system implementing the real-
time control scheme
where
∆xd (k) The computed torque control law given by Equa-
x(k) =
y(k) tion (7) was implemented by means of a SIMULINK
Ad 0126 S-function written in C (The Mathworks, Inc.,
A=
Cd A d I 6 (27) 2001). The predictive algorithm has been imple-
Bd mented in the C programming language and in-
B= terfaced to SIMULINK through an S-function.
Cd B d
The implemented predictive control algorithm is
C = [01212 I6 ]
described in Table 1. The algorithm uses linear
This augmented 18th order model was used by state space models of the form given in Equa-
the real-time predictive controller employed in tion (26). The algorithm follows the formulation
this work. If the system is at steady state, then given in section 2.2. A public domain quadratic
∆x(0) = 0. As y(0) is the initial position of the programming (QP) algorithm by K. Schittkowski
system, x(0) is known. This augmented model is was employed (Schittkowski, 1992). The controller
therefore easily initialized, which is an advantage tuning parameters can be set through the S-
over the general state space model (24). function interface.
232
Table 1. Predictive control algorithm prediction horizon p, the control horizon m, and
implemented by S-function the input and output weights uwt and ywt.
0
3.3 Constraints qd1
−0.5 q1
The feedback input to the predictive controller is −1
1
q
The tuning parameters associated with the pre- This paper describes the integration of con-
dictive controller are the sampling period h, the strained predictive control and computed-torque
233
control, and its application in real-time to control Mark V Automation Inc. (2000). TRC004 User’s
a 6-DOF PUMA manipulator arm. Manual.
Poignet, P. and M. Gautier (2000). Nonlinear
It is felt by the authors that the work reported
model predictive control of a robot manip-
here is a good start in exploring the benefits of
ulator. In: Proc. 6th International Workshop
using predictive computed-torque control on the
on Advanced Motion Control. Nagoya, Japan.
PUMA arm. However, the tuning reported in this
pp. 401 – 406.
paper can be improved. A significant improvement
Quanser Consulting Inc. (2003a). Q8 Data Acqui-
in performance could be achieved with a faster
sition System: WinCon Support and Installa-
control computer. This is because the sampling
tion Guide, Version 1.0.
period could be made shorter and, conversely, the
Quanser Consulting Inc. (2003b). WinCon 4.1
prediction horizon longer.
User’s Manual, Version 1.2.
Constraints can be placed on the input and output Schittkowski, K. (1992). Quadratic Programming
of the predictive controller. This is useful since, in implementation - C version translated from
theory, it is possible to prevent the manipulator Fortran Version 1.4 (March 1987) - C transla-
from moving too far away from the reference tra- tion 1992, modified by M.J.D. Powel (Univer-
jectory. It is also possible to include information sity of Cambridge), A.L. Tits, J.L. Zhou and
about future reference trajectories in the predic- C. Lawrence (University of Maryland). Math-
tive control computations, such that the controller ematisches Institut, Universitaet Bayreuth,
can optimally anticipate future changes in the Germany.
reference trajectory. This feature may be useful The Mathworks, Inc. (2001). Writing S-Functions.
when the manipulator is required to do repeti- The Mathworks, Inc.
tive tasks. These capabilities give constrained pre- Torres, S., J.A. Mendez, L. Acosta, M. Sigut, G.N.
dictive control a significant advantage over PID Marichal and L. Moreno (2001). A predictive
computed-torque control which can not optimally control algorithm with interpolation for a ro-
handle constraints on input or output variables, or bot manipulator with constraints. In: Proc.
information about future reference trajectories. 2001 IEEE Int. Conference on Control Appli-
cations. Mexico City, Mexico. pp. 536 – 541.
5. ACKNOWLEDGEMENTS
REFERENCES
Bemporad, A., T. Tarn and N. Xi (1997). Pre-
dictive path parameterization for constrained
robot control. IEEE Trans. on Control Sys-
tems Technology 7(6), 648–656.
Corke, P.I. and B. Armstrong-Helouvry (1994). A
search for consensus among model parame-
ters reported for the PUMA 560 robot. In:
Proc. IEEE Conf. Robotics and Automation.
pp. 1608–1613.
Lewis, F.L., D.M. Dawson and C.T. Abdallah
(2004). Robot Manipulator Control. Marcel
Dekker.
Maciejowski, J.M. (2002). Predictive control with
constraints. Prentice Hall.
234