Você está na página 1de 5

Proceedings of the 2005 IEEE Conference on Control Applications Toronto, Canada, August 28-31, 2005

TA1.4

Motion Control of Two-Link Flexible-Joint Robot, Using Backstepping, Neural Networks, and Indirect Method
Withit Chatlatanagulchai and Peter H. Meckl, Member, IEEE

AbstractWe present a state-feedback control of a two-link flexible-joint robot. The control algorithm does not require the mathematical model representing the robot. Three-layer neural networks approximate the unknown plant functions. The neural network weights are adapted on-line. We use backstepping control structure together with variable structure control to provide robustness to all uncertainties. We have included experimental results to show the effectiveness of the control algorithm.

I. INTRODUCTION E are interested in motion control of a flexible-joint robot for several reasons. First, the joint flexibility exists in most robots. It arises from driving components such as actuators, gear teeth, or transmission belts. In some applications, the designers incorporate flexible joints into their products intentionally to absorb impact force and to reduce damage to the parts from accidental collision. Second, control designers should explicitly include joint flexibility in their design because joint resonant frequencies, which are located within the control bandwidth, can be excited and cause severe oscillations. The experiment in [1] suggested that the designers should consider joint flexibility in both modeling and control design. Controller design of two-link flexible-joint robot is challenging due to two main reasons. First, its EulerLagrange model is much more complicated than those of rigid-joint or one-link flexible-joint robot. Second, the number of degrees of freedom is twice the number of control inputs. The control inputs do not directly apply to the links. Instead, the control inputs directly apply to the motors that connect to the links via flexible-joint dynamics. This results in the loss of some important structural properties that apply for rigid-joint robots, such as matching property between nonlinearities and the inputs, passivity from inputs to link velocities. There exist some well-established control designs for flexible-joint robots. In [2], they transform the dynamic model of the flexible-joint robot into the standard singular perturbation model, by using link position as slow variable and joint torque as fast variable. Controller is a composite of slow and fast control. Slow-control input, which adds damping to the system, drives the closed-loop system to a
Manuscript received January 31, 2005. The authors are with Motion and Vibration Control Laboratory, School of Mechanical Engineering, Purdue University, West Lafayette, IN 479072088 USA (e-mail: chatlata@purdue.edu, meckl@purdue.edu; phone: 765494-0539; fax: 765-494-5686 ).

quasi-steady state system that has the structure of a rigidjoint robot. Then, fast-control input can be designed using available techniques for the rigid-joint robot. To avoid having to measure the joint torque signal, you may consult [3] for the design of an observer. Reference [4] shows an alternative singular perturbation model by using tracking error of motor shaft as fast variable. Reference [5] extends the work in [2] to the case where model uncertainties exist in the system. They use radial basis function networks to estimate unknown functions, and use discontinuous variablestructure controller to provide the closed-loop system with robustness for the estimation errors. In this paper, we consider the trajectory-tracking task of a two-link flexible-joint robot in the horizontal plane. The controller algorithm does not require a closed-form mathematical model of the robot. We use a three-layer neural network to estimate each unknown function. Uncertainties come from the estimation of plant functions, actuator nonlinearities, and external disturbance. We use a smooth version of variable structure controller to provide robustness to the system, under the assumption that all uncertainties are bounded by unknown bounds. Backstepping structure provides a way to insert control effort to each subsystem. We are able to control the trajectory of the robot effectively using link angular position, link angular velocity, motor angular position, and motor angular velocity. Existing work usually requires, in addition to the quantities above, link angular acceleration and jerk, or flexible-joint torque. Throughout this paper, unless otherwise specified, we have the following definition. Definition 1: We denote by < any suitable norm. When it is required to be specific, we denote any p-norm by < P . The symbol < F denotes the Frobenius norm, i.e. given a matrix 2 2 A, the Frobenius norm is given by A F = tr ( AT A ) = aij . , i j We organize this paper as follows. Section II contains some information on the robot and the experiment setup. Section III contains three-layer neural network background and controller design. Section IV contains experimental results. Section V is a conclusion of the paper. II. A TWO-LINK FLEXIBLE-JOINT ROBOT Fig. 1 depicts a robot, for which we are designing the controller. The robot operates in the horizontal plane, has two links and two motors. Input torque u1 is applied to the first motor, which drives the first sprocket through a chain. The sprocket is attached to the first link via the first torsional spring that provides joint flexibility. The second motor is

0-7803-9354-6/05/$20.00 2005 IEEE

601

situated on the first link. Input torque u2 is applied to the second motor which drives the second sprocket. The second sprocket is attached to the second link via the second torsional spring. Note that the second motors shaft does not share the same axis with the axis of rotation of the second link. This setting is more practical than the shared-axis cases commonly treated in existing literature.
1st motors encoder 1st motor 1st links encoder 2nd motors encoder 2nd motor 1st link 2nd links encoder

relative angular position of the second motor. If we let T T  ,  T be x1 = [ x11 , x12 ] = [1 , 2 ] and x2 = [ x21 , x22 ] = 1 2 state vectors representing link position and velocity, T   T be x3 = [ x31 , x32 ] = [ 3 , 4 ] and x4 = [ x41 , x42 ] = 3 , 4 state vectors representing motor position and velocity, and T u = [ u1 , u2 ] be input vector representing input torque, the equations of motion of this robot can be put in the following state space form: 1 = x2 + d a1 ( x4 ) , x

2 = f 2 ( x2 ) + g 2 ( x2 ) ( x3 + d a 2 ( x4 ) ) , x 3 = x4 + d a 3 ( x4 ) , x

(1)

 4 = f 4 ( x4 ) + g 4 ( x4 ) ( u + d a 4 ( x4 ) ) , x y = x1 , where xi = { x11 , x12 ,! , xi1 , xi 2 } ; f2 , f4 \2 and 2 2 g2 , g4 \ are vectors and matrices that contain smooth T functions; d ai ( x4 ) = [ d ai1 , d ai 2 ] is an additive disturbance vector that may depend on all states. In the next section, we will design a controller for the system in the form of (1), where f 2 , f 4 , g 2 , and g 4 are unknown. The disturbance d ai is bounded by an unknown constant.
III. CONTROLLER DESIGN

2nd link

Fig. 1. Photograph of the two-link flexible-joint robot in our laboratory.

There are four optical encoders; each measures angular positions of the two links and the two motors. Angular velocities are obtained from numerical differentiation of the position signals. Two current amplifiers supply current to the two motors. Fig. 2 depicts the overall experiment setup. We use Labview 7.1, Labview Real-Time Module, and Labview FPGA Module to perform hardware-in-the-loop experiment. The data acquisition board is National Instruments PCI7831R.
Real Time Target
Pentium 4, 2.8 GHz
Position Signals

A. Three-Layer Neural Network Each unknown scalar function is estimated by a threelayer neural network in Fig. 3.
v1T Z
T v2 Z

z1
z2

v11 v12

s (< )

w1
s (< )

w2

#
zn

g ( z1 , z2 ,! , zn )

Robot
Current Amplifiers
Controller Output Signals

#
l

#
s (< )

wl

vl n T vl Z 1 v l ( n +1)
n +1

wl +1

Encoders

Uploaded Programs

Real-Time Results

Fig. 3. A three-layer neural network. The square represents node whose output contains adjustable parameters.

Host Computer
Pentium 4, 3.6 GHz

Variables in the network can be defined as follows:

V = [ v1 , v2 ,! , vl ] \ ( n +1)l ,
T

Z = [ z1 , z2 ,! , zn ,1] \ n +1 ,
T

n +1 vi = vi1 , vi 2 ,! , vi ( n +1) \ , i = 1, 2,! , l ,

We let 1 be absolute angular position of the first link, 2 be relative angular position of the second link, 3 be absolute angular position of the first motor, and 4 be

Fig. 2. Diagram showing overall experiment setup.

T T s ( v1 \ l +1 , S (V T Z ) = Z ) , s ( v2 Z ) ,! , s ( vlT Z ) ,1 T

602

W = [ w1 , w2 ,! , wl , wl +1 ] \ l +1 ,
T

s ( < ) can be any appropriate activation function that is a non-constant, bounded and monotone increasing continuous function. We use a sigmoid function s ( x ) = 1/ (1 + e x ) , x \ .
This network can uniformly approximate any scalarvalued continuous function to any arbitrary accuracy with some constant ideal weights W * , V * , and some appropriate number of hidden-layer nodes, l * , as was proved in [6]. From the universal approximation property, we have g ( z1 , z2 ,! , zn ) = W *T S (V *T Z ) + , (2) where < U is approximation error with unknown U > 0 provided that g ( ) is defined on a compact set z . Note that the foregoing statement is only to assure the existence of ideal weights and ideal number of hidden-layer nodes. The appropriate number of hidden-layer nodes, in practice, can be found from trial and error with the problem in consideration. The ideal weights generally are unknown. However, in system identification application, the ideal weights are typically assumed constant and bounded as in the following Assumption. Assumption 1: On the compact set z , the ideal neural network weights W * , V * are constant and bounded by W * WU , V * VU , i = 1,! , m , where WU and VU F are unknown. Note that the neural network weight V appears nonlinearly. According to [7], approximators that are nonlinear in their parameters can achieve the same level of approximation accuracy as those that are linear and usually require fewer number of adjusting parameters. However, since the parameter appears nonlinearly, the parametertuning law is usually more complicated. and V be the Since ideal weights are unknown, let W * * estimates of W and V , respectively. The estimate of the function g is given by TS V T Z . ( z1 , z2 ,! , z n ) = W g (3)

g (W ,V , z1 , z2 ,! , zn ) = W T S (V T Z ) \.

     =W  =V and V , important since from Assumption 1, W therefore the weight adaptation laws can be easily designed using this linear structure.
B. Backstepping and Variable Structure Controller

In this section, we design a controller that can achieve globally uniformly ultimately bounded tracking error; the ultimate bound can be made arbitrarily small by adjusting design parameters. We require the following assumptions. Assumption 2: The additive disturbance d aik ( x4 ) , where i = 1,! , 4, k = 1, 2, is bounded by d aik ( x4 ) < d aikU , where d aikU is an unknown constant. Assumption 3: There exists a known constant g ijkU > 0 such that gijk () g ijkU , i = 2, j = 1, 2, k = 1, 2. Assumption 4: The desired trajectory x1d is sufficiently smooth. The control objective is to make output y = x1 follow desired trajectory x1d as closely as possible, while all the signals in the closed-loop system are bounded. For convenience, we drop arguments of some functions where appropriate. In backstepping design, we try to reduce the error between actual state and desired state of each subsystem having the tracking error be the error of the first subsystem. Let T ei = [ ei1 , ei 2 ] = xi xid , i = 1,! , 4 be those errors. Step 1: Let the virtual control law of the first subsystem be T 1d + u2 dvsc = [ x21d , x22 d ] , x2 d = c1e1 + x where c1 is a design parameter, u2 dvsc is variable structure control law to be designed. From Assumption 2, we have the following inequality

{ d } { d
a1k k =1 k =1

a1kU

}.

We let the variable structure control law be in the form T u2 dvsc = [u2 dvsc1 , u2 dvsc 2 ] , where e 2 arctan 1 j , u2 dvscj = K 1j 1j approximates is a small positive design parameter, K
1j

By using Lemma 3.6 in [8], the differences between neural network outputs with ideal and estimated weights are given by S 'V  T (S T S (V T Z ) W *T S (V *T Z ) = W T Z ) W (4) 'V T Z + d , TS +W
u

1j

{ d
k =1

a1kU

}.

= S (V  =W  =V W *, V V *, S T Z ) \ l +1 , where W ' = diag {s ' , s ' ,! , s ' , 0} \ (l +1)(l +1) , S


1 2

The time derivative of the error of the first subsystem becomes 1 = x 1 x 1d = ( x2 + d a1 ) x 1d = e2 c1e1 + u2 dvsc + d a1 . e
Step 2: Let the virtual control law of the second subsystem be T 1 x 2 d u3dvsc ] = [ x31d , x32 d ] . 2 x3d = g [e1 + c2 e2 + f 2

i' = s ' (v iT Z ) = s
x

d [ s ( za )] dza z

\, i = 1, 2,! , l ,
iT z a =v

From (2), (5), Assumption 2, and Assumption 3, we have

s ( x) = 1/(1 + e ), x \. The residual term du is bounded by ' + W * S 'V TS T Z + W * . du V * ZW


F F 1

duf2 j + f2 j + dug2 jk x3dk


k =1 2

}
}

(5) where

+ g2 jk x3 dk + g 2 jk d a 2 k
k =1 k =1

} {
2

*T K2 j 2 j ,

 and V  appear linearly in (4). This is Note that W

603

* * K2 j = V f2 j

, W f*2 j , W f*2 j
2 * g 2 jk

+ f2 jU + { g 2 jkU d a 2 kU },
k =1 2 2 * g 2 jk g 2 jkU

{ V
2 k =1

* g 2 jk

}, { W }, { W } + { }
k =1 k =1 1 k =1
2j

' T S 2 j = Z f W f f
2j 2j

' V T , S f 2 j f 2 j Z f 2 j , 1,
F

{ Z
2 k =1 2 k =1

g 2 jk

' T S W g 2 jk g 2 jk x3 dk

}, { S
2 k =1
T

' g 2 jk

T Z x V g 2 jk g 2 jk 3 dk ,

. { x }
3 dk

The variable structure control law is given by

u3 dvsc = [u3dvsc1 , u3dvsc 2 ] \ 2 ,


where

T , u3dvscj = K 2j 2j e2 j 2 ' T ' T S ) Z f 2 jW Z f 2 jW f 2 j S f 2 j F arctan ( f 2j f 2j F 2 j e 2 2j ' V ' V T Z T Z S arctan ( ) S f2j f 2j f 2j 2 j f 2 j f 2 j f 2 j e2 j 2 arctan ( ) 2 j 2 2 T ' Z g2 jk Wg2 jk S g 2 jk x3 dk F k =1 . 2 j = e2 j 2 ' T S Z g2 jk W <arctan ( ) g 2 jk g 2 jk x3 dk F 2 j k =1 2 2 ' V T Z x S g 2 jk g 2 jk g 2 jk 3 dk k =1 2 e2 j ' V T Z x S ) <arctan ( 2 j k =1 g2 jk g 2 jk g2 jk 3dk 2 e2 j 2 2 { x3dk } arctan ( { x3dk }) k =1 2 j k =1 2 j is a small positive design parameter, K 2 j approximates * K2 j . The time derivative of the error of the second subsystem becomes 2 = x 2 x 2 d e

 T (S  T (S g 211 W g112 W g 211 g 211 g 112 g 112 ' V ' V T Z ) T Z ) S S g 211 g 211 g 211 g 112 g 112 g 112 ' T ' T T S T S W W g 211 g 211Vg 211 Z g 211 g 112 g 112Vg 112 Z g 112 dug112 dug 211 + x3d T T  (S  (S g122 W g121 W g 122 g 122 g 121 g 121 ' T ' T Z ) S g122V S g 121Vg121 Z g121 ) g 122 g 122 T ' T T ' T  Wg121 S g121Vg121 Z g121 Wg122 S g122Vg122 Z g122 d dug122 ug121 e1 c2 e2 + u3dvsc + g 2 d a 2 + g 2 ( x3 x3 d ). Step 3: Let the virtual control law of the third subsystem be T 3d + u4 dvsc = [ x41d , x42 d ] , x4 d = g 2U e2 c3 e3 + x
g 212U g where g 2U = 211U . g 221U g 222U Similar to Step 1, we let the variable structure control be T in the form u4 dvsc = [u4 dvsc1 , u4 dvsc 2 ] , where e 2 arctan 3 j , u4 dvscj = K 3j 3j The time derivative of the error of the third subsystem is given by 3 = g 2U e2 c3 e3 + e4 + u4 dvsc + d a 3 . e Step 4: Let the desired control law be T 1 x 4 4 d u5dvsc ] = [u1 , u2 ] . u = g [e3 + c4 e4 + f 4

4 , The time derivative of the error of the last subsystem, e can be derived similar to Step 2. The variable structure control law, u5 dvsc , remains similar to that in Step 2 by replacing x3dk with uk . We use the following -modification weight updating laws:  S ' V T Z )z W ], W = [( S
fij wfij fij fij fij fij ij wfij fij

 V

fij

' T S vfij [ Z fijW fij fij zij

], vfijV fij

 ' T W gijk = wgijk [( S gijk S gijk Vgijk Z gijk ) x(i +1) dk zij wgijk Wgijk ],  T ' V gijk = vgijk [ Z gijk Wgijk S gijk x(i +1) dk zij vgijk Vgijk ],  K ij = kij [ij zij kij K ij ], where wfij , vfij , wgijk , vgijk , kij > 0; i = 2, 4; j = 1, 2; k = 1, 2. The > 0 terms in the update laws are used to ,V , K from growing unboundedly by maintaining prevent W their values around their initial values. Definition 2: We define ( <* ) = ( <) (  < ) where ( <* ) is the actual or ideal value, (  < ) is estimated error, and ( < ) is the estimated value. Using a Lyapunov function

2 d + g 2 x3d g 2 x3 d + g 2 x3 d g 2 x3d = ( f 2 + g 2 ( x3 + d a 2 ) ) x
1 x 2 d + g 2 d u3dvsc ]] + g 2 d a 2 2 [ g 2 = f2 x [e1 + c2 e2 + f 2 2 ) x3d + g 2 ( x3 x3 d ) +( g 2 g

S ' V  T (S T T ' T f 21 W f 21 f 21 f 21 f 21 Z f 21 ) W f 21 S f 21V f 21 Z f 21 duf 21 = T ' T T ' T S V   (S f 22 W f 22 f 22 f 22 f 22 Z f 22 ) W f 22 S f 22V f 22 Z f 22 d uf 22

604

4 2 2 1 1  T 1  V = eiT ei + W gijk wgijk Wgijk + 2 i =1 j =1 k =1 2

x11 , x11d ( rad )


1.5 1

x11

x12 , x12 d ( rad ) 0.6 x12 d x12


0.4 0.2 0

1 1 1  T 1   T 1 V   T 1 V  tr V tr V gijk vgijk gijk + W fij wfijW fij + fij vfij fij 2 2 j =1 2

0.5 0 -0.5 -1 0

1  T 1  + K ij kij K ij , 2 and the following facts  TW = W  2+ W 2W

x11d
50
-3

-0.2 100

f21
2

(a)

W* V
* 2 F

 W  V
2 F

W* ,
5
* 2 F

10

x 10

Time ( s )

150

-0.4

50
-3

f22

(b)

100

2 0

x 10

Time ( s )

150

 V  = V 2tr V
T

{ }

2 F

+ V 2

2 F

,
0 -5

-2 -4 -6

arctan 0.2785 , \, and after some straightforward but lengthy derivation, we obtain the derivative of the Lyapunov function as  V + , V where > 0 and 0. From this point on, it can be shown using standard  ,W  ,V  are nonlinear analysis that the error trajectories e, K globally uniformly ultimately bounded. The ultimate bound, all-time exponential-decay upper bound, as well as the time when the trajectories enter the ultimate bound can also be found, but are omitted here. 0
IV. EXPERIMENTAL RESULTS All design parameters are as follows: l = 3, wf = vf = wg = vg = 10, k = 1, ci = 5,

f41
0.3 0.2 0.1 0 -0.1

50

(c)

100

Time ( s )

150

f42
0.05 0 -0.05 -0.1 -0.15

50

(d)

100

Time ( s )

150

50

u1
1000 500

(e)

100

Time ( s )

150

50

u2

(f)

100

Time ( s )

150

400 200 0

-200 -400

-500

50

wf = vf = wg = vg = k = 0.1, = 1.
All initial values are set to 0.1. Sampling period is 10 ms. The desired trajectory is obtained from passing square wave signal of amplitude 3 and 40-second period into the filter 1/( s + 2)3 . Experimental results are given in Fig. 4. The control system achieves good overall tracking performance as can be seen from the results in parts (a) and (b). Both link angular positions 1 and 2 are able to follow their desired trajectories quite closely. Parts (c) to (f) show estimated values of the unknown functions. Parts (g) and (h) are control inputs to the two current amplifiers. Their values can be converted to voltage by multiplying with 10 / 216 / 2. V. CONCLUSION We present a state-feedback control of a two-link flexible joint robot. The control system consists of three-layer neural networks, backstepping controller, and variable structure controller. The controller achieves good tracking performance. However, we designed the controller based on the assumption that the actual plant is in a nonlinear form (1). The actual robot may not belong exactly to this form, which may degrade the controller performance. The future work includes finding the effect of this situation.

(g)

100

Time ( s )

150

-600

50

(h)

100

Time ( s )

150

Fig. 4. Experiment result in 140 seconds. (a) 1 versus its desired trajectory 1d . (b) 2 versus its desired trajectory 2 d . (c) Estimated function f21. . (e) Estimated function f . (f) Estimated (d) Estimated function f 22 41 . (g) Control input u . (h) Control input u . function f 42 1 2

REFERENCES
[1] L. M. Sweet and M. C. Good, Re-definition of the robot motion control problem: effects of plant dynamics drive system constraints, and user requirements, Proc. of 23rd IEEE Conf. on Decision and Control, Las Vegas, NV, 1984, pp. 724-731. M. W. Spong, Modeling and control of elastic joint robots, Trans. ASME J. Dynamic Systems, Measurement and Control, vol. 109, no. 4, pp. 310-319, 1987. S. Nicosia, P. Tomei, and A. Tornambe, A nonlinear observer for elastic robots, IEEE J. Robot. Automat., vol. 4, no. 1, pp. 45-52, 1988. S. S. Ge, Adaptive control design for flexible joint manipulators, Automatica, vol. 32, no. 2, pp. 273-278, 1996. S. S. Ge, T. H. Lee, and C. J. Harris, Adaptive Neural Network Control of Robotic Manipulators. Singapore: World Scientific Publishing, 1998, ch. 7. K. I. Funahashi, On the approximate realization of continuous mappings by neural networks, Neural Networks, vol. 2, pp. 183-192, 1989. A. R. Barron, Universal approximation bounds for superpositions of a sigmoid function, IEEE Trans. Inform. Theory, vol. 39, no. 3, pp. 930-945, 1993. S. S. Ge, C. C. Hang, T. H. Lee, and T. Zhang, Stable Adaptive Neural Network Control. The Netherlands: Kluwer, 2002.

[2]

[3]

[4] [5]

[6]

[7]

[8]

605

Você também pode gostar