RDS-TR- 1 0-82 AN ADAPTIVE CONTROL STRATEGY FOR COMP3UTER-BASED MANIPULATORS 1 IL J.' Chung C. S.;i. Lee August 1982 CENTER FOR ROBOTICS AND INTEGRATED MAINUFACTURING Robot Systems Division COLLEGE OF ENGINEERING THE UNIVERSITY OF MICHIGAN ANN ARBOR, MICHIGAN 48109 1 This work was supported In part by the National Science Foundation Grant ECS-8106954 and the Robot Systems Division of the Center for Robotics and Integrated Manufacturhig (CRIM) at The University of Michigan, Ann rbor, MI. Any opinions, findings, and conclusions or recommendations expressed In this publication are those of the authors and do not necessarily reflect the views of the funding agencies.

TABLE OF CONTENTS 1. Introduction.......... *...,............*...................................................... 2 2. Adaptive Control Formulation............................................................................ 3 2.1. Dynamic Models of M anipulators............................................*.,........... 3 2.2. Perturbation Equations of Motion...................5................................ 6 2.3. Parameter Identification of The Perturbation Equations................... 7 2.4. Controller Design for The Perturbation Equations of Motion...........o. 10 3. Computer Simulation: A Three-jointed PUMA Robot Arm........................... 12 4. Conclusion............................................................................................................. 21 5. References...................................................................................................... 37

RSD-TR10-82 1 Abstract This report focuses on the study of an adaptive control method based on the perturbation equations in the vicinity of a desired trajectory. The highly coupled nonlinear dynamic equations of a manipulator are expanded in the vicinity of a preplanned joint trajectory to obtain the perturbation equations. These perturbation equations are then used to design a feedback control law about the desired trajectory. The torques for the joint actuators consist of nominal torques computed from the Newton-Euler equations of motion and the variational torques computed from the perturbation equations. Since the parameters in the perturbation equations are unknown and also slowly time-varying, a recursive least square identification scheme is used to perform on-line parameter identification. The parameters of the perturbation equations and the feedback gains of the controller are updated and adjusted in each sampling period successively to obtain the necessary control effort. This adaptive control strategy reduces the manipulator control problem from a nonlinear control to controlling a linear control system about a desired trajectory. Furthermore, a clear advantage of such formulation is that the nominal and variational torques can be computed separately and simultaneously. Computer simulation studies of a three-jointed PUMA robot arm are performed on a VAX-11/780 computer to illustrate the performance of this adaptive control strategy.

2 RSD-TR 10-82 1. Introduction Most automated manufacturing tasks are done by special purpose machines which are designed to perform their prespecified functions in a manufacturing process. The inflexibility of these machines makes the computer-controlled manipulators more attractive and cost effective in various manufacturing and assembly tasks. With the advancement of computer technology, a new generation of computer-based robots is emerging. This report deals with the control problem of these computer-based manipulators. Given the equations of motion of a manipulator, the control problem Is to find appropriate torques/forces to servo all the joints of the manipulator in real-time to track a desired trajectory as closely as possible. Several control methods are available in accomplishing this task. Most notable of these are in [1-15]. Current Industrial practice employs conventional servomechanism to control present day manipulators. An n-jointed manipulator is being modeled as "n" separate joint manipulators. Each joint subsystem is controlled independently by simple servomechanIsm technique. However, the motion dynamics of an "n" degree-of-freedom manipulator is inherently nonlinear and can only be described by a set of "n" highly coupled nonlinear second order ordinary differential equations. Furthermore, the relationship between the workspace coordinates and the joint coordinates is given by complex trigonometric transformations. Hence the servomechanism approach models the varying dynamics of a manipulator inadequately and neglects the coupling effects of the joints. As a result, these manipulators move at slow speeds with unnecessary vibrations. To maintain good performance over a wide range of motions and payloads, adaptive control methods may prove suitable. Among various adaptive methods, Model Referenced Adaptive Control (MRAC) is the most widely used and relatively easy to implement. In the MRAC method proposed by [10], a linear second-order time Robot Systems Division Introduction

RSD-TR1 0-82 3 invariant differential equation was used as the reference model for each degree of freedom. The manipulator is controlled by adjusting position and velocity feedback gains to follow the reference model. To adjust position and velocity gains, the steepest descent method was used as the adaptive algorithm. In this case it is not easy to design a stable adaptive control law. Consequently stability analysis is critical. Unfortunately this stability analysis is very difficult because of the nonlinearitles and complexity of fhe dynamic equations of a manipulator. In order to extend the capabilities of manipulators and improve their overall dynamic performance, there is a need to investigate and develop better adaptive control strategies that provide better control solutions to current control methods. The main goal of this report is to present the design and development of an adaptive control strategy which yields high performance over wide range of manipulator motions and payloads. In the following sections, vectors are in boldface lower case alphabets while matrices are in boldface upper case alphabets. 2. Adaptive Control Formulation In this section, we discuss the dynamic models of a manipulator that are useful for the purpose of control and briefly present the proposed adaptive control method. Major issues of the approach are discussed. 2.1. Dynamic Models of Manipulators A priori information needed for control is a set of differential equations describing the dynamic behavior of a manipulator. Two main approaches are used by most researchers to systematically derive the dynamic model of a manipulator - the Lagrange-Euler (L-E) and the Newton-Euler (N-E) formulations. Bejczy [4] based on the Lagrangian formulation has shown that the dynamic equations of motion for a six-jointed manipulator (Stanford arm) are highly nonlinear and conRobot Systems Division Adaptive Control Formulation

4 RSD-TR10-82 sists of inertia loading, coupling reaction forces between joints and gravity loading effects. However, the dynamic equations of motion as formulated by the Lagrange-Euler method have been shown to be computationally inefficient, and real-time control based on the "complete" dynamic model has been found difficult to achieve if not impossible [3,4,15]. In general, the Lagrange-Euler equations of motion for an n-Jointed manipulator can be expressed in matrix vector notation as: D(~) t9 + H(t9,i3) +G (i5) = T (1) where T Is an nxl external applied torques for joint actuators, 6 is the joint angles, & is the joint velocities, i is an nxl joint acceleration vector, G(i3) is an nxl gravitational force vector, H(a3,-) Is an nxl Coriolis and Centrifugal force vector and D(3) is an nxn acceleration-related matrix. The joint torques as computed from Eq. 1 are of order O(n3). For a six-Jointed PUMA manipulator, it involves about 102,740 multiplications and 78,479 additions to compute the Joint torques per trajectory set point [1 5]. To improve the speed of computation, simplified sets of equations have been used by other investigators. In general, these models simplify the underlying physics by neglecting the Coriolis and Centrifugal force terms. The resulting controlled manipulator has suboptimal dynamic performance restricting arm movement to slow speeds. At high speeds, the neglected terms become significant, making the accurate position control of the arm more difficult. For this reason, in most cases the performance specifications of computer-controlled manipulators have been relatively low so that relatively simple control methods are adequate. An approach which has the advantage of both speed and accuracy was based on the N-E formulation [16]. This formulation yields a set of forward and backward recursive equations which can be applied to the robot links sequentially. The forward recursive equations compute the kinematics information (angular veloRobot Systems Division Adaptive Control Formulation

RSD-TR1 0-82 city, angular acceleration, linear acceleration, total force and moment) of each link from the base coordinate system to the end-effector while the backward recursive equations compute the necessary torque to be applied at each joint actuator from the end-effector to the base coordinate system. Because of the nature of the N-E formulation and its method of systematically computing the joint torques, the computations are of order O(n). These equations Involve about 690 multiplications and 621 additions for a six-jointed PUMA manipulator per trajectory set point. The formulation takes about 3 ms to compute the feedback joint torques using a PDP 11/45 computer [15]. This may be fast enough for real-time control (depending on the arm's natural frequency) if one does not need to process other external sensor feedback signals. Due to its recursive in nature, it is very difficult to obtain a set of closed form differential equations -from the N-E formulation. Consequently it is difficult to design an optimum control system using the N-E equations of motion. We shall use the N-E equations of motion to compute the nominal torques along a preplanned trajectory and the L-E equations of motion to derive the perturbation equations of motion in the next section. 2.2. Perturbation Equations of Motion As mentioned earlier, most feedback control laws are based on simplified dynamic equations. However the approach works well only at slow speeds of movement. At high speeds of movement the Coriolis and Centrifugal forces are major components of the dynamic equations. The error in the computed torques can not be corrected with feedback because of excessive requirements on the required correction torques. If one uses the complete Lagrange-Euler equations of motion to obtain a nonlinear feedback control law, the computation of the control law may become increasingly plagued by the large quantity of "number crunching". A better control solution is to use the perturbation feedback control to control the Robot Systems Division Adaptive Control Formulation

6 RSD-TR 10-82 manipulator in the vicinity of a desired trajectory. In general the dynamic model of a manipulator can be described as In Eq. 1. Define x = [3,15jT and u ='r. Then the dynamic equations of a manipulator can be rewritten as: x(t) = f(x(t),u(t),t) (2) where x(t) E R2n, u(t) E Rn, t E R+, f: R2n x Rn x R+ -, R2n and continuously differentiable, and n Is the number of degree of freedom of the manipulator. With this formulation, the objective is to find a feedback control law u(t) = g(x(t)) such that the closed loop control system x(t) = f(x(t),g(x(t)),t) is asymptotically stable and tracks the desired trajectory as closely as possible with wide range of payloads. Since the- above equations of motion describe the complete robot arm dynamics, the desired torques for each trajectory set point can be computed (in openloop fashion) "quite accurately" from the N-E equations of motion. These computed torques can be treated as the nominal torque values. Because of the existence of modeling errors and the disturbances In the system, an appropriate variable feedback gains adjustment algorithm must be devised. If the dynamic model is relatively accurate, then the joint errors will be small and the dynamic equations of a manipulator can be expanded in the vicinity of a known nominal trajectory set points to obtain the associated perturbation.equations. Suppose that given a nominal trajectory from a trajectory planning system, the nominal torques un(t) can be computed rapidly from the N-E equations of motion using the nominal states Xn(t) from a planned trajectory, then un(t) and xn(t) satisfy Eq. 2 or: Robot Systems Division Adaptive Control Formulation

RSD-TR1 0-82 7 Ar (t) = f(xn(t),Un(t),t) (3) Using the Taylor series expansion on Eq. 2 about the "nominal" trajectory and subtracting Eq. 3 from it, we obtain: 6x(t) = Vxf In 6x(t) + Vuf I.6u(t) (4) where Vxf I,n and Vuf I, are the gradients of f(x,u,t) evaluating at xn and un respectively, 6x(t) = x(t) - xn(t), and du(t) = u(t) - un(t). Let Vf I - A(t).and Vu In- B(t), then we have the associated perturbation equations for this control system: 6x(t) = A(t) 6x(t) + B(t) 5u(t) (5) As a result of this formulation, the control problem of a manipulator is reduced to determining 6u(t) which drives 6x(t) to zero. The torques for the Joint actuators consist of nominal torques un(t) computed from the N-E equations of motion and the variational torques 5u(t) computed from the feedback control law associated with the perturbation equations. The main advantage of this formulation is the reduction of a nonlinear control system problem to a linear control system problem about a nominal trajectory and 6u(t) is only responsible for providing control efforts which compensate the necessary correction torques for small deviation from the nominal trajectory. The proposed control block diagram is shown in Figure 1. 2.3. Parameter Identification of The Perturbation Equations The design of a feedback control law, 6u(t) = h(6x(t)) = K(t)6x(t), about the nominal trajectory is still quite difficult because the unknown parameters in the perturbation equations are slowly time-varying. Thus parameter identification techniques and adaptive mechanism must be used to identify the unknown parameters A(t) and B(t) in Eq. 5. Robot Systems Division Adaptive Control Formulation

8 RSD-TR 10-82 The problem of Identification can be formulated as an evaluation of a system model representing the essential aspects of an existing system and presenting knowledge of that system in a usable form. So it is not expected that an exact mathematical description of the physical system need to be obtained but a model "fitted" so that an adaptive control may be obtained. The mathematical approaches used in the identification scheme are either of the deterministic or stochastic types. Most commercial robots use Incremental encoder to measure the angular positions and velocities. This greatly reduces the measurement noise. Because of this reason we choose the deterministic approach to make the prolilem simpler. In this case the noise present in the manipulator is assumed to be negligible and the uncertain parameters of the perturbation equations can be identified u~sing simple methods. The choice of model structure is one of the most Important steps in the formulation of the Identification problem. The choice will influence the identification characteristics such as the computational effort, the way in which the results of the identification can be used In subsequent operation. Due to the assumed digital computer application for identification and subsequent control, a linear discretetime model must be obtained from 6x(t)=A(t)6x(t)+B(t)6u(t). Let 6x(t) = x(t) and 6u(t) = u(t). Using Euler transformation to discretize Eq. 5, we obtain the following discrete-time linear equations: x(k+ 1 )=A(k) x(k) + B(k) u(k) (6) y(k) =x(k) (7) all(k) ~ a1p(k) b11(k) bin(k). a.......~ (8) A(Rk). S t.; B(k)A= C apl(k) ~ - app(k) bpl(k).. bpn(k) Robot Systems Division Adaptive Control Formulation

RSD-TR1 0-82 9 where p = 2n, x(k) and y(k) are 2nxl perturbed state and output vectors respectively, u(k) is an nxl control input vector, A(k) and B(k) are 2nx2n and 2nxn matrices respectively, and n is the number of Joint of the manipulator. With this model, 6n2 parameters need to be identified. Among various identification methods applicable to the above model, we choose the recursive least square parameter identification method (RLS) because this method Is conceptually simpler and relatively easy to implement with high speed of adaptation. In this identification mechanism, we make the following assumptions: (1) The parameters of the system is slowly time-varying but its variation speed is much slower than the adaptation speed. (2) All the state variables x = (i3,j)T of Eq. 6 are measurable. (3) Measurement noise is negligible. By expanding Eq. 6 term by term, we obtain the following scalar equations: xl(k+l) = all(k)xl(k) + a12(A)x2(k) + + alp(k)xp(k) + b11 (k)u1 (k) + b12(k)u2(k) +'' + bi n(k)un(k) xp(k+1) = apl(k)xl(k) + ap2(k)x2(k) +'' + app(k)xp(k) (9) + bl (k)ul (k) + bp2(kuk) ) +k) + bp,(k)un(k) Define:'1i/k = [all(k), a2i(k),', alp(k), bil(k), *, bn(k)]T (1O0) =k = [X1 (k), x2(k), x, Xp(k), Ul(k),''*', un(k)]T (11) Robot Systems Division Adaptive Control Formulation

10 RSD-TR 1 0-82 x(A) = [xl(k), x2(k),, xp(k)] T = [Yl1 k, Y2ke,- Y Y pk1T Eq. 9 can be rewritten as follow: Ylk+l=f - kln/k where I = 1,2,-..p and p = 2n (13) Based on the above Input/output relationship, the recursive least square parameter identification algorithm is found to be: 13ik+1 = 1i1k -Pk(k [jPkkk + r]-1 [oik - Ylk+-1] (1 4) Pk+1 - [Pk - PkOk [ckPkyk + r]-1?oTPk] r1 (15) where;Ik+1 is the estimated values of 63k+1 and r is a weighting factor between 0 and 1. The use of r Is common when tracking slowly time-varying system parameters. In this RLS parameter identification method, both the model and the dynamic system have the same input u(k) and the estimated model parameters lIk+1 are adjusted as a function of the error between the output yk+1 from the actual system as in Eq. 13 and the output y15~ik from the reference model. 2.4. Controller Design for The Perturbation Equations of Motion The parameters of the perturbation equations of motion obtained from the identification scheme can sometimes yield unstable system when applied to optimum control system design. The reason is that numerical solutions could be sensitive to deviations of the model parameter values from their true values. If the system parameter identification and the control design are performed in each sampling period successively, then the control system obtained will be stable asymptotically. Since the identification and control approaches for multi-input multioutput (MIMO) system require considerable amounts of computational time, we Robot Systems Division Adaptive Control Formulation

RSD-TR 10-82 11 would like to keep all algorithms to moderate complexity. For designing the controller for the perturbation equations, many suitable control schemes can be applied. Simple position-integral-derivative (PID) controller or pole-assignment can be used. Another method is the use of linear quadratic (LQ) method to generate control laws. Consider the discrete time-varying linear system with the following well known performance criterion: 1 1 (16) J1 = x(N)Sx(N) + xT x + uk)Ru(k) (16) The optimal control input u(k) which minimizes the above criterion Is given by: u(k) = -K(k)x(k) (1 7) where K(k) = R + BT(k)P(k+1 )B(k) BT(k)P(k+1 )A(k) (18) P(k) = AT(k)P(k+1)A(k) + Q - BT(k)P(k+1)A(k)K(k) (19) and P(N) = S (20) The optimal control law can be obtained only by solving the discrete Riccati equations in backward and in this particular situation (i.e., simultaneous identification and control), It is very difficult to use the above criterion because of computation time limitation. To overcome this problem, we consider another performance criterion, namely one step control, subject to the above discrete time-varying system, J2(k) = xr(k+l )Qx(k+1) + uT(k)Ru(k)] (21) Then the optimal control input u(k) based on the above criterion is given by: Robot Systems Division Adaptive Control Formulation

12 RSD-TR 1 082 u(k)= -K(k)x(k) (22) where K(k) = R + BT(k)QB(k) BT(k)QA(k) (23) in this case, we minimize the performance criterion J2(k) by finding the input u(k) which minimizes the immediate loss. The optimal control is obtained under the assumptions that the system parameters have been identified quite accurately. The parameters used in Eqs. 22-23 are from the RLS identification scheme. It is known that this adaptive controller tunes the parameters of the system for an optimal control input. 3. Computer Simulation: A Three-jointed PUMA Robot Arm In this section, a computer simulation study of a three-jointed PUMA manipulator was carried out on a VAX 11-780 computer to evaluate the validity of the use of the perturbation equations and the performance of the proposed adaptive control strategy. In general, a Lagrange-Euler formulation for a manipulator can be written as D(f') i5 + H(G,3) +~G(G) ='. If the Lagrange-Euler formulation of a three-jointed PUMA manipulator based on the 4x4 homogeneous transformation matrices [Pau8l][Lee82] is expanded in general terms, the following equations are obtained: D11 1 + D1212 + D13+03 + H111,31 + 2H1128112 + 2H1132163 + H122'2 + 2H1231323 + H13332 + G1 = T1 D2111 + D22'32 + D23133 + H211132 + 2H21261 112 + 2H213~133 +RH2222 + 2H223Sy2te3 + H233Cmt+ 22=t2 Robot Systems Division Computer Simulation

RSD-TR1 0-82 13 D31if1 + D32?32 + D33,3 + H311i31 + 2H31261t92 + 2H313it1j03 + H322'2 + 2H323i323 + H333'2 + G3 = T3 The dynamic coefficients of the above equations ( i.e. D's, H's, G's ) can be rewritten as follow: (1) The coefficients of D(9) are: D11 =J111 + J133 + J21C2 + 2J214a2C2 + J222S2 + J233 + 2J234d2 + J244(ajCj + di) + J311(SISI - 2S3C3S2C2 + CIC) + J322 + J333(S3 2 + 2s3C3S2C2 + C3S2) + J344(a2C2 + d2) + 2J334(a2S3C2 + a2C3S2C2) D22 = J211 + J222 + 2J214a2 + J244a2 + J311 + J333 + J344a2 + 2J334a2S3 D33 = J331 + J333 D12 = D21 = J213S2 + J214d2S2 + J234a2S2 + J244a2d2S2 + J344a2d2S2 + J334d2(S3S2 - C3C2) D13 = D31 = J334d2(S3S2 -.C3C2) D23 = D32 = J311 + J333 + J334a2S3 (2) The coefficients of H('O,6) are: H112 = H122 = J213C2 + J214d2C2 + J234a2C2 + J244a2d2C2 + J344a2d2C2 + J334d2(S3C2 + C3S2) H133 = J334d2(S3C2 + C3S2) Robot Systems Division Computer Simulation

14 RSD-TR 10-82 H211 = J211S2C2 - J222S2C2 + 2J214a2S2c2 + J244a2S2C2 + (J333-J311)(S3S2C2 + S3C3S2 - S3C3C2 - C33SC2) +J344a2.S2C2 + J334(2a2S3S2C2 + a2C3S2 -a2C3C22) H222 = 0 H233 = J334a2C3 H311 = (J333-J311)(S3S2C2 + S3C3S? -S3C3CI C:S2C2) + J334(a2S3S2C2 - a2C3C2) H322 = -J334a2C3 H333 = 0 H112 = -H211 H113 = -H311 H123 = H133 H212 = 0 H213 = 0 H223 = -H322 H312 = 0 H313 = 0 H323 = 0 (3) The coefficients of G(-) are: Robot Systems Division Computer Simulation

RSD-TR10-82 16 G1 = 0 G2 = -(a2934C2 + a2924C2 + S3933C2 + C3933S2 + C2921) G3 = -g33(S3C2 + C3S2) where SI = sin(Oi) C, = cos(C-/) [gll g12 g13]T = [mg1l m1gl migzl] and g = 9.8062m/sec2 Jl l J112 J113 J114 J1 2 J/22 JI23 J/24 J J/13 Ji23 J133 J/34 J/14 J124 J/S4 J/44'I/xx + lyIy +'lzz + m+ mx1 m1x/z1 m/x _Imxll+ Ilyy y + +Izz mly2 ~ml~rl. ml/7l2 ml/-Z ml/'lxx ~ O 1 = 0 /Iyy O; we assume the products of inertia are negligible. 0 0 Iizz S ( = (, l,) is the position vector of the center of mass of link i with respect to the jth coordinate system. The state equations of a three-jointed PUMA manipulator can be obtained by simple manipulations of Eq. 1. Define the inverse matrix of the acceleration-related Robot Systems Division Computer Simulation

16 RSD-=TR 1 0-82 matrix as follow: D11 D12 D13 0a11 012 a13 D( )- =1 D12 D22 D23 =1 12 022 023 D13 D23 D33 a13 a23 a33 then the dynamic equations of a PUMA manipulator become:., 1 11 12 C13 I-2 Cj12 a22 a23 X 3 a13 aX23 a33 1221922 fH1 33112 + 2H1 12A?a +2H1 1361+% f 2H1236i3S Ial lc a12 a13 [ 1+T1 1 a=12 a22 a23 2 + r2 a13 a23 a33 [3+ 73 If the state variables and the Inputs are defined as: X1 = d1,4 = 16i U1 = T1 X2 ='02 X =;92 U2 = T2 X3 = 53 x6 =i U3 = T3 then the following state equations for a three-jointed PUMA manipulator are obtained: X1 = f1(x) = X4 = f2(x) = x5 Y = f3(x) = X6: = f4(X) - a11(P1+u1) + al2(2+-u2) + a13(P3+U3) Robot Systems Division Computer Simulation

RSD-TR10-82 17 - = f5() = a12(Q1 +U1) + C22(Q2+U2) + a23(i3+U3) = f6s() = a13(f1 +U1) + a23(#2+U2) + a33(#3+U3) Applying the Taylor series expansion to the above equations in the vicinity of a nominal (or desired) trajectory and neglecting the higher order terms, the perturbation equations 6x(t) = A(t)6x(t) + B(t)6u(t) are obtained. For convenience, let 6x-x and 6u-u, then the following equations are obtained: x(t) = A(t)x(t) +B(t)u(t) where x(t) = xactuai(t) - Xnominal(t) U(t) = Uactual(t) - Unominal(t) 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 A(t) = af4(x) af4(x) caf4(x) 0f4(x) f4(x) at xn Un OX2' x3 CxX4 axS aO6 0 fs(x) 0fs(X) af5(X) afs(x) 0f5 (x) ax2 ax3 ax4 axS aX6 af6(x) af6(X) af6(x) af6() a f6 (x) ax2 ax3 OX4 aX6 aX6 0 0 0 0 0 0 0 0 0 B(t) =at Xn Ur fB(t) 4(x) af4(x) f4(x) at xn, un dul 0u2 Ou3 Of6(x) Odf(x) af5(x) au, 0u2 au3 0f6(x):f6(x) 0f6(x) dul au2 8U3 Robot Systems Division Computer Simulation

18 RSD-TR 10-82 We simulated the proposed adaptive control strategy and compared it with the PD control method based on the computed torque technique [15] for various loading conditions for the given trajectory. The numerical values used in this simulation are: diag Q = [0.1, 0.1, 0.1, 0.1, 0.1, 0.1] diag R = 0.000001, 0.000001, 0.000001] and the initial values-of the unknown parameters in the perturbation equations are chosen to be: diag A(O) - [0.5, 0.5, 0.5, 0.5, 0.5, 0.5] 0 0 0 1 0 0 B(0)= 0 0 0 0 1 0 0 0 0 0 1 diag P(O) =- 1500, 00,,, 1500]9 x 9 The off-diagonal terms of the above matrices are set to be zero and the weighting factor, r, In Eqs. 14-15 is set to 0.95. Also the control gains K. and Kp of the PD controller are set to 20 and 100 respectively. With reference to the robot arm dynamic equation, the physical geometric parameters used in this simulation are: dl =.664 meter a2 -.432 meter d2 =.1 495 meter m = [2.27, 15.91, 11.36] Kg Robot Systems Division Computer Simulation

RSD-TR10-82 19 daig 11 = [ 0.0071, 0.0267, 0.0267] Kg-meter2 daig 12 = [ 0.1 000, 0.7300, 0.8025] Kg-meter2 daig 13 = [ 0.0222, 0.2160, 0.2245] Kg-meter2 Pl = [ 0., -0.664, 0.]T meter P2 = [ 0.432,0 0., 0.1495]T meter p3= 0., o., 0.]T meter Sl = [ O., 0, 0.073]rT meter 2 - [ -0.432, 0., O.]T meter s3 = [ 0. 0, 0. 0.1]T meter where p / is the position vector of the origin of the i-i th frame with respect to the ith coordinate system and s/ is the position vector of the center of mass of link i with respect to the ith coordinate system. In the N-E formulation, there are several geometric parameter values need to be measured from the arm's structural configuration. Among these values are the location of the center of mass and the inertia tensor matrix of each link. It is relatively difficult to get the exact values of the inertia tensor matrices because of the asymmetry of the links of a PUMA robot arm and the non-uniform distribution of its masses (mainly from the DC motors). In this simulation, we assume that the dynamic equations of a PUMA manipulator are known exactly except inertia tensor matrices. We also assume that the robot arm does not know the weight of the loads when it picks them up. Robot Systems Division Computer Simulation

20 RSD-TR10-82 In the simulation, the three-Jointed manipulator moves from an initial Joint angles'1/nIt/al =0~, 450, 450) to a final joint angles'Ofna (90, -4650, 135~). The required time for this motion Is 1 second. In this trajectory, the PUMA robot arm is fully stretched at 0.5 seconds. At this position, (01,52,193) = ( 450, 00, 900), the torques due to the gravity have the maximum values and the absolute values of joint velocity of the arm also becomes the maximum. The accelerations are sharply changed from the maximum values to the minimum values or vice versa. To show the validity of the use of the perturbation equations, the nominal joint position values, velocity values and torques are perturbed with small error. When the manipulator picks up the maximum load (f2.3Kg), the position and velocity errors - from the proposed adaptive controller are less than one degree for all trajectory set points. For this reason, the perturbed error is set to be one degree for all joints. As shown in Figures 2-4, the contributions of the higher order terms resulted from the linearization are negligible for all the motion trajectories. Hence the perturbed equation of motion derived are valid for all trajectory. Figure 5 shows the computer simulation program implementation flow chart. The simulation results are shown in Figures 6-11 and tabulated in Table 1. In Table 1, the performance of both controllers are compared for three different load conditions: (a) No-load and 10% error in inertia tensor matrix, (b) Half of maximum load and 10% error in inertia tensor matrix and (c) Maximum load and 10% error in inertia tensor matrix. In each case 10% error in inertia matrices means ~10 % error about its measured inertial values. For all the above cases, the adaptive controller shows better performance than the PD controller with constant feedback gains. The maximum error of each joint was calculated by assuming that link 2 and link 3 are each 0.5 meter long. Let the maximum absolute errors of joint one, joint two and joint three be el, e2, and e3 respectively, then the resulting maximum error for the worst case can be found to be V/e + (e2 + e3)Z. When the PUMA robot arm picks up maximum load, the magnitude of the applied torques are increased considerably, Robot Systems Division Computer Simulation

RSD-TR1 0-82 21 especially in joint two (see Figures 12-14 ). So we can expect relatively larger error in joint two as compared with other two joints (see Table 1). The comparison of the final position errors from these two controllers for the same trajectory Is tabulated in Table 1. Given A(O) and B(O), the performance of the adaptive controller is quite sensitive to the Q, R and P(O) values in Eqs. 14-15 and 21-23. In general, it is not easy to determine the proper values to achieve better performance. It is also difficult to figure out the correlations of these values with the overall performance of the controller especially in MIMO system because of the complexity of the dynamic eguations of thePUMA robot arm. 4. Conclusion An adaptive control based on the perturbation theory has been presented with computer simulation of a three-jointed PUMA robot arm. The proposed adaptive control was found to perform better for various loading conditions than the simple PD controller based on the computed torque technique. The torques for the joint actuators consist of nominal torques computed from the N-E equations of motion and the variational torques computed from the feedback control law associated with the perturbation equations. A clear advantage of such formulation is that the nominal torques and the variational torques can be computed separately and simultaneously. Robot Systems Division Computer Simulation

0 0 f+'+ robot link parameters Disturbances (A Trajectory Newton-EulerRobot Evironm l 6U(k)ll C-)) A(k), _.(k) Figure 1 Control Block Diagram| 5o' M)ais P*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~() 0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~e~..

RSD-TR10-82 23 (1) Set k = 0 where k is the kth sampling period. (2) Determine'5d[k], 2i9d[k] and -9d[k] from a preplanned trajectory. Also determine above values for the next sampling period. (3) Compute the nominal torques Un(k) using the Newton-Euler equations of motion. (4) Determine the applied torques Ua(k) = Un(k) + 6U(k). (5) Compute the coefficients of the dynamic equations of a PUMA manipulator using the Lagrange-Euler equations of motion as in Eq. 1. (6) Integrate the dynamic equations of a PUMA manipulator derived from the Lagrange-Euler equations of motion using the 4th order Runge-Kutta method. The outputs are ai[Ak+ 1 ] and a9[k+ 1]. (7) Compute position and velocity errors. X[k+ 1 ] = C a[k+ 11 - d[k+ 1 ],,a[K+1] - 1dC[k+ 1 ]T (8) Using 6X[k+1] and &U[k] and the identification algorithm as in Eqs. 14-15, update the parameters of the system as in Eq. 5. (9) Using the updated parameters, compute the control gains as In Eq. 23 and the perturbed inputs 6U(k+1). (10)Set k = k + 1. (1 1) Is k = N? ( Total of N sampling periods ). If yes, Stop. Else go to step 2. Figure 2 Flow-Chart of Computer Simulation for the Proposed Controller Robot Systems Division Computer Simulation

24 RSD-TR 10-82 16;.00 60 Nominal Term * First Order Term 9. 600 90 Higher Order Terms U a, 38200 (0 -9.600 -t6,00 0. 000. 000.'OO.6000.8000 t 1 000 Timhe (Sec) Figure 3 Contributions of the First Order Term and the Higher Order Terms in the Linearization of the Dynamic Model ( Joint 1 ) Robot Systems Division Computer Simulation

RSD.-TR 10-82 25 t6.00 O Nominal Term * First Order Term 9.600 I] Higher Order Terms As 3,200 LI -3.200 C( -9 600 -16.00 - 0. 000.2000 t,000.6000 oo.8000 000 T 1 mne (Sec) Figure 4 Contributions of the First Order Term and the Higher Order Terms in the Linearization of the Dynamic Model (Joint 2 ) Robot Systems Division Computer Simulation

26 RSD-TR 10-82 16,00 60 Nominal Term * First Order Term 9.600 Uf Higher Order Terms U,n 3,200 - ai i / (p -9.600 -9. 600 - 0000.000. 0ooo,00.6000.8000 t.000 Time (Sec) Figure 5 Contributions of the First Order Term and the Higher Order Terms in the Linearization of the Dynamic Model ( Joint 3 ) Robot Systems Division Computer Simulation

0 O+31 co ~~~~~~PD Controller Adaptive Controller I,<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ o0d Various Trajectory Tracking Final Position Trajectory Tracking Final Position ) Loading Joint Max. Error Max. Error Error Max. Error Max. Error Error Conditions (degree) (mm) (mm) (degree) (mm) (mm) No load and 1 0. 1858 3.24 1.59 0.1436 2.51 2.39 10% error 2 0.3234 5.64 0.45 0.0810 1.41 0.99 in inertia tensor 3 0.5214 4.55 0.49 0.0765 0.67 0.58 1/2 max. load 1 0.2286 3.99 2.17 0.0460 0.80 0.12 and 107. error 2 0.4351 7.59 0.24 0.2818 4.92, 4.64 In inertia tensor 3 0.7774 6.78 1.75 0.1076 0.94 0.31 Max. load 1 0.2719 4.75 2.49. 0.0771 1.35 0.75 and 107. error 2 0.5042 8.80 1.02 0.3988 6.96 6.32 In inertia tensor 3 0.9008 7.86 2.69 0.0663 0.58 0.07 O~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0 0 Table 1 Comparison of Controllers'CD F+ C,) Is 5' N

28 RSD-TR,10-82 1.200 Joint 1 o Joint 2.7200 I Joint 3 L:J 0e200 L 0 i.7200 -t1.200 0 000.2000.tOOO.6000.8000 t 1000 Time (sec) Figure 6 PD Controller: Case (a) Robot Systems Division Computer Simulation

RSD-TR10-82 29 t.200 * Joint 1 0 Joint 2,7200 4(b4 1 JI Joint 3 C, (b L o_ aHo 0 O - 7200 - 0. ~000.2000. SOO.6000.8000 t o oo Ti me ( sec) Figure 7 PD Controller: Case (b) Robot Systems Division Computer Simulation

30 RSD-TR 10-82 t.200 * Joint 1 0 Joint 2.7200 4 7200 I Joint 3 a c -,72 00 - 0 2t I 0 / o0 0 000 0 oo000.6o000 o8000 t1.oOO Tine (sec) Figure 8 PD Controller: Case (c) Robot Systems Division Computer Simulation

RSD-TR1 0-82 31.6000.3600 4b t0o0 - 0 L Ld -. 1200OO.60.80 t Robot 9ytm AdaptivevControslero* J Soint 1 o -.3600 0 Joint2 UI Joint 3 -.6 0.00....... 0.000.2000,o000 o6000.8000 1,000 Time (sec) Figure 9 Adaptive Controller: Case (a) Robot Systems Division Computer Simulation

32 RSD-TR10-82.6000.3600,t200 LA -.t200* Joint 1 rs a -.3600 - 0 Joint 2 II Joint 3 -.6000 o.000.2000 LOOO.6000.8000 1.000 Tv me (sec) Figure 10 Adaptive Controller: Case (b) Robot Systems Division Computer Simulation

RSD-TR10-82 33.6000.3600 o CJ EL r - 0I Joint 3 RobtysmTime ( C sec) Figure 11 Adaptive Controller: Case (c) Robot Systems Division Computer Simulation

34 RSD-TR 1 0-82 107.6 - * No Load Uf.Max. Load 65. LI 7 23, 37 L -t8,72-60. 82 -0Z9 -,O02. 00 2000 O.6000.8000 t 000 Time (sec) Figure 12 Variation of the Applied Torque ( Joint 1 ) Robot Systems Division Computer Simulation

RSD-TR1 0-82 35 -3.713 No Load 2't1.9 7 II Max, Load II 0.000.2000 If000.6000.8000 t1.000 Tie ( sec) Figure 13 Variation of the Applied Torque (Joint 2) Robot Systems Division Com puter Simu lation

36 R.SD-TR 1 0-82 -2,692 * No Load ][ Max. Load -6.86Lt-15,21 -19.38 -23.55 0 000.2000,tOO.6000.8000 t1.000 Ti me (sec) Figure 14 Variation of the Applied Torque ( Joint 3 ) Robot Systems Division Computer Simulation

RSD-TR1 0-82 37 5. References 1. Whitney, D. E., "Resolved Motion Rate Control of Manipulators and Human Prostheses," IEEE Transactions on Man-Machine System, Vol. MMS-10, No. 2, June 1969, pp 47-53. 2. Kahn, M. E., Roth, B., "The Near-Minimum-Time Control of Open-Loop Articulated Kinematic Chains," Transaction of the ASME, Journal of Dynamic Systems, Measurement and Control, Vol. 93, Sep. 1971, pp 164-1 72. 3. Paul, R., "Modeling, Trajectory Calculation and Servoing of a Computer Controlled Arm," Stanford Artificial Intelligence Laboratory, A.I. Memo 1 77, Sep. 1972. 4. Bejczy, A. K., "Robot Arm Dynamics and Control," Technical Memorandum 33669, Jet Propulsion Laboratory, Feb. 1974. 5. Albus, J. S., "A New Approach to Manipulator Control: The Cerebellar Model Articulation Controller (CMAC)," Transaction of the ASME, Journal of Dynamic Systems, Measurement and Control, Vol. 97, Sep. 1 975, pp 220-227. 6. Hemani, H., Camana, P. C., "Nonlinear Feedback in Simple Locomotion System," IEEE Transactions on Automatic Control, Vol. AC-19, Dec. 1976, pp 855-860. 7. Saridis, G. N., Stephanou, H. E., "A Hierarchical Approach to the Control of a Prosthetic Arm," IEEE Transactions on Systems, Man, and Cybernetics, Vol. SMC-7, No. 6, 1977, pp. 40 7-420. 8. Young, K. K. D., "Controller Design for a Manipulator Using Theory of Variable Structure Systems," IEEE Transactions on Systems, Man, and Cybernetics, Vol. SMC-8, No. 2, Feb. 1978, pp. 101-109. 9. Saridis, G. N., Lee, C. S. G., "An Approximation Theory of Optimal Control for Trainable Manipulators," IEEE Transactions on Systems, Man and Cybernetics, Robot Systems Division Reference

38 F tSD-TR1 0-82 Vol. SMC-9, no. 3, March 1979, pp 152-159. 10. Dubowsky, S., DesForges, D. T., "The Application of Model Referer iced Adaptive Control to Robotic Manipulators," Transaction of the ASME, Journ al of Dynamic Systems, Measurement and Control, Vol. 101, Sep. 1979, pp 193- 200. 11. Luh, J. Y. S., Walker, M. W., Paul, R., "Resolved-Acceleration Contr( 31 of Mechanical Manipulators", IEEE Transactions on Automatic Control, Vol. AC-25, No. 3, June 1980, pp 468-474. 12. Horowitz, R., Tomizuku, M., "An Adaptive Control Scheme for Meche inical Manipulator - Compensation of Nonlinearity and Decoupling Control," The Dynamic systems and Control Division Paper of the ASME Winter Annual Meetir ig at Chicago, Nov. 16-21, 1980. 13. Turney, J. L., Mudge, T. N, Lee, C. S. G., "Equivalence of Two F ormulation for Robot Arm Dynamics," SEL Report No. 142, Dec. 1980. 1 4. Koivo, A. J., Guo, T. H., "Control of Robotic Manipulator with Adapti re Controller," The 20th IEEE Conference on Decision and Control, San Diego, CA., Dec. 16-18 1981, pp. 271 -276. 115. Lee, C. S. G., Chung, M. J., Turney, J. L., Mudge, T. N., "On t he Control of Mechanical Manipulators," Proceedings of the Sixth IFAC Conferei ice in Estimation and Parameter Identification, Washington D.C., June 1982, pp.. 1454-1459. 16. Luh, J. Y. S., Walker, M. W., Paul, R., "On-line Computational Schemes for Mechanical Manipulators," Transaction of the ASME, Journal of Dynamic systems, Measurement and Control, Vol. 102, June 1 980, pp 67-76. 1 7. Astrom, K. J., Eykhoff, P., "System Identification - A Survey," Auto matica, Vol. 7, 1971,pp 123-162. 18. Landau, Y. D., "Adaptive Control - the Model Reference Appro ach," MarcelDekker, Inc, 1979. Robot Systems Division Reference

RSD-TR10' -82 39 19. Isermann, R., (Ed.) "Identification and System Parameter Estimation," Proceedings of the Fifth IFAC Symposium, Damstadt, Federal Republic of Germany, Vol. 1, Sep. 24-28 1979. 20. Lee, C. S. G., Lee, B. H., Nigam, R., " An Efficient Formulation of Robot Arm Dynamics for Control and Computer Simulation," CRIM Technical Report RSDTR-8-82, The University of Michigan, August, 1982. 21. Paul, R. P., "Robot Manipulators: Mathematics, Programs and Control," M. I. T. Press, 1 981. 22. Lee, C. S. G., "Fundamental of Robotics," to be published by Addison-Wiley Pub. Co.. Robot Systems Division Reference

UNIVLIibI IT YUV MIUMIUAN 3 9015 02827 4945 THE UNIVERSITY OF MICHIGANDATE DUE 3/1-i 1