Marc J. Richard Li Cheng ... Vol.ll, No.1 Richard & Cheng: Controlling Robot Manipulators by Dynamic Programming 21 ...... [3] Bellan RE, Dreyfuss SE.
ACTA MECHANICA SINICA, Vol.ll, No.l, February 1995 Science Press, Beijing, China Allerton Press, INC., New York, U.S.A.
ISSN 0567-7718
CONTROLLING ROBOT MANIPULATORS BY DYNAMIC PROGRAMMING Marc J. Richard Li Cheng (Department of Mechanical Engineering, Universitd Laval, Ste-Foy, Qudbec, Canada GIK 7P4) ABSTRACT: A certain number of considerations should be taken into account in the dynamic control of robot manipulators as highly complex non-linear systems. In this article, we provide a detailed presentation of the mechanical and electrical implications of robots equipped with DC motor actuators. This model takes into account all non-linear aspects of the system. Then, we develop computational algorithms for optimal control based on dynamic programming. The robot's trajectory must be predefined, but performance criteria and constraints applying to the system are not limited and we may adapt them freely to the robot and the task being studied. As an example, a manipulator arm with 3 degrees of freedom is analyzed. K E Y W O R D S : dynamic programming, robot manipulators, optimal control, dynamic modelling method
I. I N T R O D U C T I O N Researchers have been interested in optimal control of robot manipulators for more t h a n 20 years (one of the first articles on the subject was by K a h n and R o t h [1], but no methods developed to date have offered a definite solution. The method presented in this article obtains its inspiration mainly from the work of Singh and Leu [2] and only addresses the second level of the control hierarchy, t h a t is, the one controlling trajectory planning. Thus, we do not consider the lower level problems, namely the process of following a trajectory, which must operate on-line in order to compensate for all system disturbances. Being freed from the i m p o r t a n t constraint of on-line operation, we may use far more realistic dynamic models. Thus our m e t h o d will only be applicable off-line. T h e general problem of optimal control to be solved by dynamic p r o g r a m m i n g concerns 2n variables (n corresponding to the number of degrees of freedom of the robot). Present d a t a processing capacities are insufficient for dealing with this kind of problem (especially for robots with multiple degrees of freedom). On the other hand, the initial definition of the trajectory makes it possible to solve an optimization problem on only two variables, such as the position and the velocity of a given joint. In practice, this constraint is not too restrictive since several tasks accomplished by industrial robots must follow predefined trajectories. For instance, there is the case of "blind" robots without external sensors t h a t must move while still avoiding surrounding obstacles. W h e n the geometric trajectory of the robot is known, the optimal control is applied on the velocity and acceleration of each joint. Received 22 August 1994
Vol.ll, No.1 Richard & Cheng: Controlling Robot Manipulators by Dynamic Programming 21 Fortunately, dynamic programming[ a] also enjoys a number of advantages. It especially allows us to take into account non-linear terms over the entire trajectory. Hence it is not necessary to linearize the system, so we gain additional accuracy. Furthermore, it provides us with greater freedom for applying constraints to the system and in choosing performance indices. For instance, it enables us to limit velocities, torques, and even the derivatives of accelerations ("jerks") so as to protect the robot against mechanical failures and, at the same time, increase the system reliability. In addition, we are no longer limited to minimizing time, which is a most disputable performance index in evaluating equipment productivity. Finally, a detailed analysis of the effects of constraints on generalized torques has made it possible to accelerate the convergence and increase the accuracy of the Singh and Leu algorithms. II. T H E D Y N A M I C
MODELLING
OF ROBOT
MANIPULATORS
Robot manipulators are complex mechanisms and their modelling is always a delicate matter, especially when dynamic phenomena are taken into consideration. When robot joints are operated at high speed and undergo fast accelerations, centrifugal and Coriolis forces may no longer be neglectable since they affect the behavior of t h e system. Furthermore, due to their geometry, interactions between various bodies in t h e robot often are too important to allow a separate analysis of each joint. The dynamic modelling method studied in this work is first developed by Vukobratovic and Potkonjak [4]. This method takes into account all the non-linearities of the system and it also includes the actuators in order to enhance the model. We have the following standard equations for defining the mathematical model of the mechanical part of the robot manipulator
u = M(q)gl + H ( q , it)
(1)
where
1 .T tOM(q) il - G(q) H ( q , el) = M(q)cl - ~q Oq and G(q) is the gravitational force vector, M ( q ) is the inertia matrix. By working with this dynamic model, the robot control can be defined. However, the actuators are not directly controlled by torques and forces. For instance, with electric drivers, the controlling vector is composed of input voltages. In order to apply the control algorithm to a robot manipulator, we must include the actuators into the dynamic model. For industrial robots, several types of actuators powered mainly by electric or hydraulic energy can be found. In this paper, we are only concerned with actuators having DC-fed drivers. These drivers are increasingly used in robot architecture due to their wide versatility; the only limit to their use comes from their low power-to-weight ratio, especially in a heavy environment. Since the speed and torque of the drivers must be varied throughout the entire trajectory, D C drivers in a transient state are represented as follows [5,6,11]
v(t) = L -di(t) ~ + Ri(t) + KbNvit(t)
(2)
u(t) = K t N t i ( t ) - J~l(t) " Fq(t)
(3)
22
ACTA MECHANICA SINICA
1995
where, L - - DO driver rotor inductance [HI, R - - rotor resistance [g2], J - - m o m e n t of inertia of the rotor: J = J r N c N , [kg- m2], F - - viscous friction coefficient: F = F m N , Nc iN. m / r a d / s ] , N . - - ratio of angular velocity of the driver to the velocity reductor, Nt - - torque reduction ratio, Kb - - m o t o r back E M F constant [V/rad/s], K t - - m o t o r torque constant iN. m/A], i(t) - - rotor electric intensity [A], ~/(t) - - o u t p u t angular velocity [rad/s], ~(t) - - output angular acceleration [rad/s2], u ( t ) - - useful torque produced by driver at output iN.m], v ( t ) - - rotor input voltage (driver control variable) iV]. DC drivers are therefore defined by a system of equations having three degrees of freedom. But if the rotor inductance is negligible [6,12], we m a y eliminate the intensity i(*) of the preceding formulas and reduce the system to only two degrees of freedom for each actuator ~(t) -- a q ( t ) + by(t) + c u ( t )
(4)
with a--
b-
KtKbNtN,, RJ K,N, RJ
F J
1
d
where the p a r a m e t e r s a, b and c are constant for each driver. It is often useful to compute certain intermediary d a t a such as the total torque produced by the actuator and the intensity of the current flowing through each coil. We must then use the following three relations T ----u - diag(J)it + diag(F)//
(5)
i : [diag(KtNt)]-lT
(6)
v = diag(R)i + diag(KbNv)~/
(7)
where, T is the total torque produced by the electric actuator (including the acceleration of rotor inertia and viscous friction torque); i is the input current of the coil. We will use this model in order to simulate the behavior of actuators in a robot manipulator. It only remains to include the m a t h e m a t i c a l model of the' actuators into the model of the robot. We will then obtain a more accurate dynamic model and will be able to use it for constructing the control algorithm. Let us first use the m a t h e m a t i c a l model of the mechanical system with the actuators (equipped with DC drivers) u = i~
+ H
~l = A q + B y + C u
(8) (9)
And if we combine the two models = A q + B y + C[M~I + H I
(10)
Then we isolate the control vector v v = B - I [ ( I - C M ) ~ - Ai7 - C H ]
(11)
Vol.ll, No.1 Richard & Cheng: Controlling Robot Manipulators by Dynamic Programming 23 Now we have a complete and reliable model of the robot manipulator and we may now turn to the problem of optimal control. III. O P T I M A L C O N T R O L OF R O B O T M A N I P U L A T O R S The problem of optimal control consists of finding the control v(t) that optimizes the following general performance index
J = K(x(ts), v(ts) +
L(x(t), v(t))dt
(12)
where, x(t) - - vector of state variables of the mechanical system, v(t) - - control vector (input voltage of drivers). We must now formulate the optimal control problem with equations developed in the preceding section. However, the use of a computer in calculating optimal control requires the discretization of the preceding equations. The symbol At(k) represents the time elapsed during the discretization interval [k, k + 1] where k is the trajectory point of discretization and 0 < k < N - 1 is the number of discretized segments of the trajectory. Let us first define all the kinematic equations of the robot that will be used eventually for calculating the evolution of the generalized coordinates along the trajectory
p(k) = r
(13)
where p represents the vector position of the end effector of the robot manipulator (defined in the robot cartesian workspace). The expected trajectory is defined at each discretized points k with an equality constraint G(p(k)) = 0 (14) Then, the complete dynamic model of the robot manipulator can be represented as
+> This equation provides the value of the control voltages directly. But since we must check constraints on torques produced by the actuators and since the computation of currents must precede the computation of energy consumption, it is preferable to substitute the following three equations for Eq.(15). Vectors T and i are the intermediate results and function of the state variables
T(k)--u(k)+diag(F)tl(k)+diag(J)
[[q(k +~_~(k)l) -//(k)]]
i(k) = [diag(KtNt)]-lT(k)
(16) (17)
v(k) = diag(R)i(k) + diag(kbNv)~l(k) (18) We note that p, q, u, T, i and v have the dimension R ~, and diag(F), diag(J), diag(ktNt), diag(kbN,), diag(R)r n• In the control algorithm we include three types of limits on the robot performance: i) Generalized admissible velocity limits Qmln(q(k), ~l(k))