Вы находитесь на странице: 1из 13

Journal of Intelligent and Robotic Systems 2:411-423, 1989. 9 1989 Kluwer Academic Publishers. Printed in the Netherlands.

411

Discrete-Time Modeling and Control of Robotic Manipulators


S. N I C O S I A , P. T O M E I Dipartimento di lngegneria Elettronica, Seconda Universit~ di Roma, Tor Vergata, Via Raimondo, 00173 Roma, Italy and A. T O R N A M B I ~ Fondazione Ugo Bordoni, Via Baldassarre Castiglione 59, 00142 Roma, Italy (Received: 15 February 1989; revised: 22 June 1989) Abstract. A general approach is presented to derive discrete-time models of robotic manipulators. Such models are obtained by applying numerical discretization techniques directly to the problem of the minimization of the Lagrange action functional. Although these models are in implicit form, they own a dynamic structure that allows us to design discrete-time feedback linearizing control laws. The proposed models and control algorithms are validated by simulation with reference to a three link robot. Key words. Robots, discrete-time modeling, discrete-time control, decoupling control.

1. Introduction
The dynamics of robotic manipulators has received considerable attention in the robotics literature. Various approaches, such as Lagrangian [1], recursive Lagrangian [2], and recursive Newton-Euler [3] have been proposed for the formulation of the manipulator dynamics. Robot manipulators have complicated behavior including interactions among multiple joints, nonlinear effects such as Coriolis and centrifugal forces, and varying inertia depending on the arm configuration. As higher performance in terms of speed and accuracy is pursued, these complicated dynamics become more prominent. Model-based algorithms can be used to obtain accurate control systems which take into account model complexities [4]. Most of the control laws, based on a continuous-time model of the manipulator, are usually implemented by means of microcomputers. So, in practice, the continuous control laws are discretized to allow their implementation on microcomputers. On the other hand, simulations and real tests have shown that the sampling time is critical to the feedback performance of robots [5]. A possible way to overcome this difficulty could be first to derive a discrete-time model and then to synthesize a suitable discrete-time control law. This way is surely more effective in the case of linear time invariant systems [6]. Some discrete models of robots are available in the literature. Tomizuka, Horowitz and Landau [7] discretized directly the equations of motion neglecting nonlinear

412

s. NICOSIA ET AL.

terms. Nicosia and Tomei [8] simply used a forward Euler discretization of the complete motion equations and obtained encouraging results with a discrete adaptive control law. Neuman and Tourassis [9] derived implicit discrete models from a discrete formulation of Lagrange equations, imposing the conservation of energy over each sampling period. The model proposed by Monaco and Normand-Cyrot [10] was based on a Volterra series expansion of the solution of the differential equations. In this paper, a general approach is presented to derive implicit discrete models, starting directly from the Lagrange action functional. In fact, as is well known, the motion equations of mechanical systems can be obtained by minimizing the Lagrange action functional [11]. This fact can be exploited to derive discrete models by applying numerical discretization techniques to the functional minimization problem. The so-derived discrete models are validated by simulation. They exhibit a satisfactory dynamic behavior, especially with respect to models obtained via discretization of the Lagrange differential equations. Moreover, such models own a structure that allows us to design discrete-time feedback linearizing control laws. These algorithms are obtained without making explicit the implicit discrete models. The remainder of the paper is devoted to illustrating the proposed modeling and control approaches by application to a three-link robot.

2. Background to Robot Modeling


We consider robotic manipulators with N degrees of freedom whose spatial position is completely defined by the generalized coordinate vector q = (ql . . . . . qN)T, where qi denotes the relative displacement between the adjacent links i and i - 1. The motion equations may be derived by a direct application of the Lagrangian method. Let L(q, O) be the Lagrangian function defined as

L(q, q) = T(q, ?1) - U(q),

(1)

where T(q, (7) is the kinetic energy and U(q) is the potential energy of the manipulator. The kinetic energy can be expressed as

T(q, q) = 89

O = ~

,ii
i=1 j = l

bij(q) q~qj,

(2)

where the inertia matrix B(q) is symmetric positive definite for any q. The Lagrangian equations may be obtained by minimizing the action functional

[II]
S = fil/L(q, O)dt
(3)

with respect to q ~ C2([t~, t:]), in which q(t~) and q(t:) represent, respectively, t h e initial and final positions of the robot. The solution of this minimization problem, that is the trajectory followed by the robot, is derived by solving the Lagrange differential equations d tSL dt 8q tSL 8q 0. (4)

DISCRETE-TIME CONTROL OF ROBOTIC MANIPULATORS

413

If external generalized forces ui are applied to the joints, the Lagrangian equations can be derived in a similar manner by associating a suitable potential energy to each force u~ [11]. Denoted by u = (ul, 9 9 9 UN)r, these equations take the form d dL dt ~r 0L ~q
u. (s)

Putting Equation (2) into (5), we get

B(q) i~ + a(q, q) = u,
where

(6)

a(q, q) -

c32L -0 ~q ~(t

~L Oq.

(7)

When the robot is controlled by means of a computer, the input u(t) is updated at each sampling instant by a digital-to-analog converter (DAC) and a holding device so that the input is piecewise constant

u(t) = u(kT)

= u(k),

k T <~ t < (k + 1) T,

(8)

where T represents the sampling time. The inputs to the computer are supplied by samplers and analog-to-digital converters (ADC) which act on the robot-measured variables. For simulation and/or control purposes, what we need is a model of the discretetime system consisting of the cascade connection of DAC, holder, robot, sampler, and ADC. We refer to this discrete-time system as the discrete-time robot. Usually, approximate models of the discrete-time robot are derived by applying numerical discretization procedures to (6). The most popular approaches are the backward and forward Euler algorithms [7, 8, 1 1]. Using these methods, the following equations are obtained:

backward model B(q(k


1)) (q(k + 1 ) - 2q(k) + q(k - 1)) Tz + (9)

Jorward model B(q(k + 1)) (q(k + 1 ) - 2q(k) + q(k - 1).~


T2 ) q'-

(lo)
+ a ( q ( k + 1), q(k + 1 ) q(k))
u(k + 1),

where the simplified notation q(k) is used in place of q(kT),

414

s. NICOSIAET AL.

3. The Proposed Discrete-Time Model


An alternative approach to deriving approximate models of the discrete-time robot consists of directly obtaining approximate solutions of the minimization of the functional (3)9 Let the initial state q(ti), ;t(t~)be fixed. Let the time interval [ti, tI] be fixed and decomposed in M subintervals of a constant width T. Denoting by

~k(k) = q(ti + kT)


and approximating the time-derivative with the backward difference if(k) - ~k(k - 1)

(11)

T
S~ in which S(W) =

q(t, + kT),
1).),

(12)

the integral (3) can be approximated by

T ~ L( ~k(k)'~k(k) - T ~b(k

(13,

~(o)]
@(1) ~k(M) .

V =

Thus, the problem of minimizing the functional (3) is reduced to the problem of minimizing function (13). As is well known, the solution of such a problem is obtained by solving the following difference equations dS(~) dW M = T ~ k=l

dL( ~(k)'~k(k)- 1 ~k(k))T


dW = 0 (14)

that are equivalent to aL (~b(1), ~b(1) ) --~ ~(0)

a~(o)
a~(k)

= 0,

(15)

dL ( ~k(k)' ~(k) - ~b(k 1)) +


1))

OL (~k(k +

1),

~k(k + l) - ~k(k)'~ T J

a~(k)

O,

(16)

aL( ~b(M)'~b(M)-~b(M-T
t~b(M)

O.

(17)

DISCRETE-TIME CONTROL OF ROBOTIC MANIPULATORS

415

Equations (16), together with the initial conditions 4(0) and 0(1), constitute the desired approximate model of the discrete-time robot. In the case where external forces are applied to the joints, (16) becomes

dO(k)

dO(k)

= - u(k),

08)
where u(k) = u(ti + kT). From (18), by using (1) and (2), we obtain r - 1), ~k(k)) - -~5 (B(O(k - B(O(k))(O(k) - O(k - 1))) in which r 1 ~ ~ dbo(O(k)) - 1), ~k(k)) = 2T 2 i=1 j = l d0(k) (O,(k) - Oi(k - l))(Oj(k) - Oj(k - I))
l
+ = 1))(0(k - u(k), + 1) 0(k)) -

(19)

du(0(k))
dO(k)

(20)

and Oi(k) stands for the ith component of vector 0 ( k ) . An alternative discrete-time model can be derived approximating q by the forward difference
O(k + l) 0(k)

it(t ~ + kT).

(21)

Following the same procedure, we obtain dL ( O(k)' O(k + I ) - 0 ( k ! ) T dL(O(k+ 1), 0(k) -- T O(k1).)
= u(k),

dO(k)
from which r
B(O(k

a0(k)

(22)

O(k + 1)) - T1---5 (B(O(k))(O(k + 1) -- 0(k))


-

(23)
1))(0(k) O(k 1)))
= - u(k),

where ~oe(O(k), O(k + 1)) = 2T 2 i=, j=,


x (0,(k + 1) -- O , ( k ) ) ( @ ( k
+

dO(k)

1) -- 0 j ( k ) )

au(o(k)) d0(k)

(24)

416
4. The Deeoupling Control L a w

S. NICOSIA ET AL.

The implicit discrete-time models derived in the previous section are described by equations of the following form q(~,(k - 1), ~b(k), ~b(k + 1)) = u(k). Denoting by ~ ___ R N x R N x R N the set of the points (~b(k such that det It~(kOq+ 1)] :/: 0, system (25) can be locally made explicit, for any point of ~, as ~(k + 1) = g(d/(k 1), ~b(k), u(k)). (27) (25)
1), ~ ( k ) , ~ ( k + 1))

(26)

Let us define the state variables Xl(k) = ~ b ( k - 1), x2(k) = ~O(k) (28)

and the output variables


y(k) = ~b(k-

1).

(29)

Equations (27) can be rewritten as


x ( k + 1) = f ( x ( k ) , u(k)), y(k) = h(x(k)),

(30)

where
x = [x r,x~] r, f = [x~,gr] r, h = xl.

Various works have been carried out on the problem of linearizing, by state feedback, discrete-time nonlinear systems such as (30) [13-16]. In our case, it is immediately recognized that by introducing the state feedback
u(k)

= r/(xt(k), x2(k), v(k)),

(31)

where v is the new input vector, system (30) is transformed into N decoupled linear systems
xl(k + 1) = x2(k), x2(k + 1) = v(k), y(k) = x,(k)

(32)

that consist of two consecutive delay elements. Note that, since y(k) = v(k - 2), the tracking problem for a given reference trajectory could be solved by adopting
v(k) = q,(k + 1).

(33)

In order to prevent the action of disturbances and parametric variations, it may be more convenient to shift the poles from the origin by using as the control law
v(k) = Aoxl(k) + Atxz(k ) + %(k),

(34)

where A0 and A 1 are constant diagonal matrices and vr(k) suitably depends upon the reference variables.

DISCRETE-TIME CONTROL OF ROBOTIC MANIPULATORS

'x3

I-0.4:0.6;0.451.
417

) x2

(~

[0.9:0:01

,~x I Fig. 1. Robot and trajectory consideredin the case study.

u (t) --~

u(k)

u (kT) Robot

q(t)
H

q(k) Sampler S,

Sampler IJ Zero ~ J ] holder 1 7

)1 Model (i0)
+

~I Model (19)

I
5. Case Study

Fig. 2. Blockdiagram of the simulated system.

In order to validate the discrete-time models and the control algorithms derived in the previous sections, some simulations were carried out for the robot schematically represented in Figure 1. It corresponds to a real three-degrees-of-freedom manipulator having links 0.5 m long. Models (10) and (19) have been taken into consideration in the first set of simulation runs. The inertia matrix B and the vector a that completely characterize the continuoustime model, are reported in the Appendix. The aim of the simulation was to compare the dynamic behavior of models (10) and (19) with the behavior of the discrete-time robot, when they are excited by the same inputs (see Figure 2). The tests were performed with reference to the straight line trajectory illustrated in Figure 1, assuming a trapezoidal velocity law with a maximum velocity of 0.75 m/s and a maximum acceleration of 0.75 m/s2; the sampling time was 10ms.

418 Cartesian coordinates Joint coordinates

S. NICOSIA ET AL.

[i r ] Xr rj
I

[ql
qr
~

Open loop control input

Robot inverse I

J Robot inverse I

13

Fig. 3. Scheme of the open loop control computation.

rad~/~~.5
--.5

q2qZ 2
i

1
"~ ~ \ \ \ \ . . . .

3 s

. . . . . ,

........................ q3

Fig. 4. Outputs of the discrete-time robot.

The desired trajectory, expressed in Cartesian coordinates, was used to produce the open-loop control input u(t), via the robot inverse kinematics and dynamics (see Figure 3). The results of the simulation runs are drawn in Figures 4-6. The outputs of the discrete-time robot, along the considered trajectory, are reported in Figure 4. Figures 5 and 6 show the differences between the outputs of the discrete-time robot and the outputs of models (10) and (19), respectively. The second set of simulations was devoted to test the accuracy of the decoupling control laws derived in Section 3. In particular, we referred to the algorithm obtained by using the backward model (19), namely
u(k) = 1 -~o.(x,(k), x~(k)) + - ~ x

(35)
x (B(v(k))(v(k) x2(k)) + B ( x 2 ( k ) ) ( x 2 ( k ) -

xt(k))).

The control v ( k ) was chosen as given in (34)


v(k) = Xrz(k + 1) + A o ( x , ( k ) xr,(k)) + A,(x2(k ) -

x~2(k)),

(36)

where A0 = diag [0.01], At = diag [0.2],

DISCRETE-TIME CONTROL OF ROBOTIC MANIPULATORS

419

rad .04 .02

-.02 -.04
e3

Fig. 5.

Errors with the discrete model (10).

rad .011
-oz

/ e3

/ 82

\ 81

Fig. 6.

Errors with the model (19).

so that the closed-loop poles are equal to 0.1, for each decoupled second-order system. The values of xi(k) and x~(k) were computed, using the sampled state variables of the robot and the sampled reference trajectory, according to
x,(k) =
=

x2(k) xr2(k ) -

Tq(k),

x2(k) = q ( k ) ,

Xr,(k )

Tqr(k),

xr2(k ) = q~(k).

However, in practical cases, the necessity of the sampled reference velocity qr(k) can be avoided. In fact, as exhibited by simulation tests, no significance variations arise ifxrj(k) is computed as xr,(k) = x r 2 ( k - 1). To reproduce the real operating conditions, a continuous model of the robot has been employed. The analog inputs of the robots are computed by using the discrete control law (35), (36) and a zero-order holding device. The block diagram of the simulated control system is reported in Figure 7. The simulation results, referred to the trajectory of Figure 1 and with a sampling time of 10ms, are drawn in Figures 8-10. Figures 8 and 9 show, respectively, the errors in joint coordinates and the corresponding torques along the trajectory. The absolute error in Cartesian coordinates is reported in Figure 10.

420

S. NICOSIA ET AL.

u(k)
I

u(t)

q (t)] q(t)J

q (k)

qckl]

J Comput. Hzero-orde~ Robot holder Ivl "1 o f U (k)

T
Fig. 7. Control system structure.

Sampler

mrad

e2

e3

i~/j <r. ~"A f-~

Fig. 8. Errors in joint coordinates.

Nm ~ ~ 2 / u U 32
....

....

~ ~ " ~ 3
111

Fig. 9. Torques applied to the joints.

mln

e t

.1
i

Fig. 10. Absolute error in Cartesian coordinates.

DISCRETE-TIME CONTROL OF ROBOTIC MANIPULATORS

421

The errors are of the order of 10 -4 rad in the joint coordinates and of 10 2 mm in the Cartesian coordinates, showing that the discrete control law works quite well. Indeed, the control algorithm obtained by discretizing the continuous-time decoupling control law led to a maximum error of 0.8mm along the same trajectory [17].

6. Conclusions
Usually, discrete models for robotic manipulators are obtained by the discretization of the differential equations of motion. In this paper, a different approach has been outlined in which, starting directly from the Lagrange functional, the discrete models are derived by applying numerical discretization techniques to the functional minimization problem. Moreover, a discrete-time feedback linearizing control law is presented that allows us an approximate decoupling of input-output variables of the robot. Simulation tests, performed with reference to a three-link robot, have given satisfactory results for the discrete modeling and, even more, for the discrete control, especially if compared with those related to control laws obtained via the discretization of continuous-time feedback algorithms. Our future works will regard the possibility of using more precise models and the application to flexible robots. Moreover, the robustness properties of the proposed approach will be investigated.

Appendix
Following the notations of(6), the nonzero elements of matrix B ( q ) and vector a(q, q), referred to the robot used in the simulation tests, are
bjl b22 = = hi + h2cos2(q2) + h3cos2(q2 + q3) W h 4 c o s ( q 2 ) c o s ( q 2 h5 + h4cos(q3), + q3),

b23 = b23 = b33 =


al a2 =
= _

h6 + h7cos(q3), b32, h8,


(c102 + c2q3)ql,
-~Clql 1 .2 + c3q3 1 .2 q2 + ']- c4,

a 3 --

- - ~ c 2 q I -- ~c3q 2 q- c5,

in which
c~ = -h2sin(2q2)
-h 3

sin(2(q2 + q3)) -- ha sin(2q2 + q3),

C2 = C3 =

- h 3sin(2(q2 + q3)) - h4cos(q2)sin(q2 + q3), -- h4 sin(q3),

422
c4 = C5 = h9cos(q2) + hl0COS(q2 + q3), hl0cos(q2 + q3).
i =

S. NICOSIA ET AL.

T h e n u m e r i c a l values o f the coefficients hi, hi = 23.3803, 3.7015, 84.899, 3.95, 213.6748, h2 = ha = h6 = h8 = hi0 = 10.4563, 7.9, 3.8774, 27.0278, 77.4326.

1 , . . . , lOare

h3 = h5 = h7 = h9 =

Acknowledgement
T h i s w o r k was s u p p o r t e d b y M P I funds.

References
1. Paul, R.P., Robot Manipulators: Mathematics, Programming and Control, MIT Press, Cambridge (1981). 2. Hollerbach, J.M., A recursive Lagrangian formulation of manipulator dynamics and a comparative study of dynamics formulation complexity, IEEE Trans. Systems, Man and Cybernetics SMC-10, 730-736 (1980). 3. Luh, J.Y.S., Walker, M.W. and Paul, R.P., On-line computational scheme for mechanical manipulators, A S M E J. Dynamics Systems, Measurement, and Control 102, 69-76 (1980). 4. Freund, E., Fast nonlinear control with arbitrary pole-placement for industrial robots and manipulators, Int. J. Robotics Res. 1, 65-78 (1982). 5. Chen, Y., Frequency response of discrete-time robot systems - Limitations of PD controllers and improvements by lag-lead compensation, Proc. IEEE Int. Conf. Robotics and Automation, Raleigh, pp. 464-472 (1987). 6. Landau, Y.D., Adaptive control techniques for robotic manipulators - The status of the art, IFAC Symp. Robot Control, Barcelona (1985). 7. Tomizuka, M., Horowitz, R. and Landau, Y.D., On the use of MRAC techniques for mechanical manipulators, 2nd lASTED Int. Symp. Modelling, Identification, Control and Robotics, Davos (I 982). 8. Nicosia, S. and Tomei, P., A discrete-time MRAS control for industrial robots, Proc. 7th IASTED Int. Symp. Robotics and Automation, Lugano, pp. 83-89 (1985). 9. Neuman, C.P. and Tourassis, V.D., Discrete dynamic robot models, IEEE Trans. Systems, Man, and Cybernetics SMC-15, 193-204 (1985). 10. Monaco, S. and Normand-Cyrot, D., Discrete time models for robot arm control, IFAC Symp. Robot Control, Barcelona (1985). 1I. Goldstein, H., Classical Mechanics, Addison-Wesley (1950). 12. Koivo, J.A. and Guo, T., Adaptive linear controller for robotic manipulators, 1EEE Trans. Automatic Control AC-28, 162-170 (1983). 13. Monaco, S. and Normand-Cyrot, D., Sur le commande non interactive des systkmes non lineaires en temps discret, Lectures Notes in Control and Information Sciences No. 63, Springer-Verlag (1984). 14. Grizzle, J.W., Feedback Linearization of Discrete Time Systems, Lectures Notes in Control and Information Sciences No. 83, Springer-Verlag (1986).

DISCRETE-TIME CONTROL OF ROBOTIC MANIPULATORS

423

15. Jakubczyk, B., Feedback linearization of discrete time systems, Systems and Control Lett. 9, 4I 1-416 (1987). 16. Lee, H. and Marcus, S.I., On input-output linearization of discrete-time nonlinear systems, Systems and Control Lett. 8, 249-259 (1987). 17. Nicosia, S., Nicol6, F. and Lentini, D., Dynamical control of industrial robots with elastic and dissipative joints, 8th 1FAC Triennial Worm Congress, Kyoto (1981).

Вам также может понравиться