695
COMPARISON OF SELF-ORGANIZING FUZZY CONTROL WITH GENERALIZED PREDICTIVE CONTROL FOR ROBOTIC MANIPULATORS
Nurdan Bekiroglu, Yorgo Istefanopulos Electrical and Electronic Engineering Department, Bogazi~i University, 80815 Istanbul/TURKEY
Keywords: Manipulator, dynamics, inverse kinematics, SOC, GPC. Abstract: In this work, Self-Organizing Fuzzy Control (SOC) and Generalized Predictive Control (GPC) are compared and evaluated both for a two joint manipulator and for a three jOint redundant manipulator. In SOC, the controller tries to build fuzzy tables which summarize control actions required for certain error and change in error valLies . In GPC, on the other hand, a CARIMA (Controlled Auto-Regressive and Integrated Moving Average) model is assumed for each joint and a set of predicted outputs is generated by minimizing a quadratic function of the future errors. Using a receding horizon approach, the first element of the set of future controls is applied to the joint and the process is repeated at the next sampling interval.
INTRODUCTION
In the last decades, Automatic Control Theory (ACT) became a composition of strongly mathematical techniques, requiring preciSion, well-defined concepts and exact data . The basic common feature of these techniques is the need of a valid and accurate model of the system to be controlled. However, ACT has failed to cope with the practicalities of many industrial processes because of the lack of detailed structural knowledge of the process or the complexity of the model even under various approximations or the fact that a considerable amount of essential a priori information is available only in a qualitative form. On the other hand, in many cases the control of a process by a human operator is more successful than any automatic control, King-Mamdani 1977. Hence it is worthwhile to investigate a method of describing the operator's control strategy. The theory of fuzzy sets and algorithms developed by Zadeh 1965, can be used to evaluate the imprecise linguistic statements of the operator directly using a computer. Fuzzy Set Theory, therefore, is a theory about uncertainty and enables us to deal with nonprecise or ill-defined
696
statements in a mathematically strict sense. Fuzzy Control is based on a set of rules which are the conclusions of human experience, Tong 1977. However, when the system dynamics is complicated , the suitable fuzzy rules are not easy to obtain. In such a case, the initial fuzzy rules must be changed according to the system response. A fuzzy controller which can adjust and improve the initial rules is called Self-Organizing Fuzzy Controller, Ho-Un 1990. This can be applied to different systems such as SISO, MIMO, high order, nonlinear etc. In this work, SOC has been applied to robotic manipulators and its performance has been compared with the results of Generalized Predictive Control. A self-organizing controller tries to build fuzzy tables which summarize control actions required for certa in error and change in error values. In this work, the fuzzy tables consist of empty entries initially , but the controller fills up these entries using an incremental model and a performance measure which is a decision table , written to express the designer's idea of a tolerable response. In GPC, on the other hand, a CARlMA model is assumed for each joint and a set of predicted outputs is generated by minimizing a quadratic function of the future errors. Using a receding horizon approach, the first element of the set of future controls is applied to the joint and the process is repeated at the next sampling interval. In this method, the innovation term adds a high degree of intelligence to the control. Simulation results given in this paper are used to compare these two control schemes for robotic manipulators . SELF-ORGANIZING CONTROL Performance Measure: An adaptive or learning controller must be able to assess its own performance, in order to improve its control strategy . In SOC , the performance of the controller in relation to each process output is measured by the deviation of the actual response from the desired one . This deviation is a rough indication of the magnitude of desired corrections required at the output. So , the performance measure is some kind of a decision maker which issues the output correction required , from a knowledge of error and change in error. This can be summarized as : p( nT ) = IT { e( nT ), ce( nT ) }
(1 )
where e( nT ), ce( nT ), p( nT ) are the vectors of error, change in error and a measure of deviation from the desired trajectory, respectively.
697
The zero entries of the performance index table shown in Table, represent the set of states which require no correction . Table: The performance index table used in this work. Change in Error
-6 -5 -4 -6 -6 - 6 ' - 6 -5 -6 -6 -5 -4 -6 -5 -5 -3 -5 -5 -4 -2 -5 -4 -4 - 1 -4 -4 -3 -0 .01 - 4 : - 3 -3 0_01 - 4 ' - 3 -2
f---
...
e
W
f--
1 2
3
f---"4
-3
-2 - 2 - 31 - 2 - 1 -2 - 1 0
-1 0 6 0 5
0 0 0,
0 1 1
-3
0 1 2 3 4 -4 -4 - 3 - 3 -2 - 1 -4 -3 - 2 - 2 1 - 1 , - 1
-2 - 1
-5 -5 - 5, - 4 -4 -4 - 41 - 3
-3 -3 - 2 - 1 ~1TO -2 -2 - 1 - 1 - 1 1 0 -3 -3 - 1 - 1 0 0 oi 1 0 0 0 1 2 - 31 - 2 0 -2 - 1 0, 0 0 1 11 2 -1 -1 0 0 0 1 2 3 -1 0 0 0 0 2 3 3 0 0 0 1 1 3 3 4 1 1 1 2 2 3 4 4 1 1 2 3 3 4 4 5 5 5 1 2 2 3 I-~ 2 3 3 4 4 5 5; 6
-4h'!.
5
6
0 0 0 1 2
0 0
2 3 3
4 4 5 5 6 6
1 2 3 3
--
4 4 4 5 5
6 6 6
Credit Assignment: The output deviations should be translated into input corrections or reinforcements to the process that should have been applied during some control actions in the past leading up to the present poor performance. In order to do that, some sort of a model of the process is required. This model has to relate input changes to output changes, thus it is an incremental one. The derivation of incremental models for robotic manipulators is given in the following sections. Over which samples the input reinforcements should be applied depends on the dynamics of the process. High order processes with large time lags and delays, require control actions further back from the present to be rewarded. Fig .1 (Procyk-Mamdani 1979) shows how the performance measure and the model form the upper hierarchy of the sac with simple controller on the bottom level. e(nT) pInT) ce(nT)
Rule MOdifier GE
u(nT)
GCU
_ _ __
_ _ _ _ _ _ _ _ _ __ __
--l
Fig.1: Block diagram of a self-organizing fuzzy controller.
698
SCC for a Two Joint Manipulator: The dynamic equations used in this section are taken from Craig 1986. The length and mass of a link, the torque and angle of a joint are represented by li, mi. tj and 8j respectively (i=1,2). '2
"Cl = a6 8 1 + a782 - a2s282 - 2a2s28182 + a4c12 + aSc1
(2)
'2
"C2 = a7 8 1 + a1 8 2 + a2 s 28 1 + a4c12 2
(3) 2
where al = m2 12; a2 = m2h 12; a3 = (m1+ m 2)1 1; a4 = m2 12g; as = ga3 / h; a6 = (a1 +a3+2a2c2); a7 = (a1 +a2c2); 9 = 9.8m/s 2 ; Cj = cos 8j; Sj
= sin
8j;
Cjj = cos (8j-8j); Sjj = sin (0j-0j). In state space these equations have the form (Daley-Gill 1989): (4)
(5)
The partial derivatives of f( x , "C ) are taken with respect to x and "C ~x
.
af
af
"" T ox = T ~x + T ~t ax T at T
af
~x=(I-T-)
ax T
-1
af
. T-.~t=M~t
(6)
(7)
at T
where
o
0
af
(8)
-=
o
0
o
1
699
af a't T
-=
0
0
af2 a'tl
af2 a't2
0
0
af4 a'tl
af 4 a't2
l (9)
The dimension of M is 4x2 and it can not be used directly as a model matrix. So, only the position information is selected from M. Then,
(10)
GCU
GE
=[
GCU1
0 GClk
o
= [GEl 0
o
GE2
1
(11 )
1
+
( 12)
i=1,2
(13) (14 )
(15)
(16 ) where r is the rule-change and p is the performance measure, shown in Fig.1.
sac
for a Three Joint Redundant Manipulator:
Lagrangian Analysis is used to derive the dynamic equations, Bekiroglu 1991 . It is assumed that the three joint redundant manipulator carries a cylindrical load of mass mload and radius R1oad ' The length and mass of a link, the torque and angle of a joint are represented by li' mi' respectively (i=1,2,3).
'tj
and
0j
700
·2 A4 S 120 2
+
·2 - A4 S 1 20 1
·2 ASS 13 0 3
+
·2 A SS 23 0 3
(17)
·2 ·2 - ASS 13 8 1 - ASS 23 0 2
where
(18 )
(19)
(20)
(21)
(22 )
(23) In state space these equations have the form: X1
= 01
, x2
= 01
, x3
= 02
, X4
= 02
, Xs
= 83
Xs
= 83
(24)
x2 f2(
x=
f(
x,t
)
x ,t
)
X4
= f4(
x , 't
(25 ) )
Xs fs( )( , 't )
J
The procedure given in (10) - (16), is applied to these equations and a 3x3 incremental model matrix is obtained, Bekiroglu 1991.
701
GENERALIZED PREDICTIVE CONTROL CARIMA Model: The dynamic model of an N joint manipulator can be formulated as: t
= D(
..
. (26)
0 ) 0 + Q( 0 , 0 )
where D( 0 ) is NxN inertia matrix, Q( 0, 0 ) is an N-dimensional vector signifying Coriolis, Coulomb, centrifugal effects etc. A compensator of the following form is proposed for this model: .......
...... t
= O( 0 ) u + Q( 0 , 8)
(27)
wh e re u is the input vector to the compensated system. The joint dynamics will then be described by: ..
......
-1
....... .
.........
0= u-[D(0)] {[D(0) - D(0)]0+Q(0,0)-Q(0,0)} (28)
This compensated system can be modelled by N difference equations of the following form: (29)
where uj(k) and Yj(k) are the system input and output at the sampling instant k, d is the system time delay and A?(Z-1) and Bj(Z-1) are polynomials of degree n and m respectively in the backward shift operator z-1 . -- 1 + a·11 Z-1 + a·12 z-2 + .. .. ................ + a·In z-n A ~(Z-1) I
(30) (31)
The signal xj(k) is a disturbance term acting on the ith subsystem . Prediction Scheme: The optimal predictor presented in Kaynak-Hoyer 1988, is as follows: y(k) ""
= Ay(k-1) ......
+
B u(k-1)
(32)
where A and B are the estimated polynomials for A = z (1 + AD) and B. Then the error between the actual value and the estimated value is given by:
702
Y (k) = y(k) - y(k)
(33)
If this error is used as an innovation term for the prediction of y(k+ 1) , y . (k+ 1)
'"
'"
= y(k+ 1) + y(k) = Ay(k) + Bu(k) + y(k)
(34 )
is obtained . For the calculation of y*(k+j) , y(k) is used because y(k+j) is not available: y. (k+j) = y(k+j) + Y(k)
Control
; j=1,2, ......... .
( 35)
Algorithm:
In trajectory control of robotic manipulators, the desired trajectory is generally known beforehand. If the set r(k+j); j=1,2 ... .. is the desired trajectory, the aim is to ensure that the outputs y(k+j) are as close to r(k+j) as possible. In order to achieve this, the predicted values of the output are calculated by minimizing a quadratic function of the future predicted errors, assuming that after some control horizon NU the increments in control are zero. If the degrees of the polynomials AO and Bare 2 and 1 respectively and u(k+j) = u(k) j=1 , ..... ,N2-1 (where N2 is the maximum costing horizon), the following equations can be obtained:
(36) where g1
'"
(37)
= bo '"
"
g2 = (~o + ~ 1) - a1 g1
= (~O + ~ 1)
(38)
- a 19 2 - a2g 1
(39)
g4 = (bo + b 1) - a 19 3 - a2g2
(40)
g3 gs
'"
"
= (bo + b1)
(41 )
- a1g4 - a2g3
...-..
n1 =b1u(k-1) - a1y(k) - a2y(k-1) + y(k) n2 = - a1 n1 - a2y(k) + y(k) n3 = - a1 n 2 - a2n1 +y(k) n4 = - a 1n3 - a2n2 + y(k) ns = - a1 n 4 - a2n3 + y(k) N2
u(k) =
-1
N2
(I gf) {I 9 j[r(k+j) j=1
( 42) ( 43) (44) ( 45) (46)
j= 1
- njl}
(47)
703
SIMULATION RESULTS FOR THE TWO JOINT MANIPULATOR The parameters used in simulation are chosen as follows: mj= 3.0 kg, Ij= -
-
0.3 m, m1= 3.5 kg , m2= 2.5 kg, 11 = 0.33 m, 12= 0.27 m, GE 1 = 400, GE 2 = 350, GCE j= 1200, GCU j= 0.5, Uj= 10000, a1 = -2, a2= 1, bj= 5x1 0- 5 , h= 0.001 sec, ~ t= 0.01 sec, where i= 1,2 and j= 0,1. The bar sign" " represents the subjective values of the system parameters based on which the controller is designed .
First Desired Trajectory: 10 sec: xdes = 0.4 - 0.4 exp(- tl4 )
( 48)
Ydes = 0.6 exp(- tl10 )
(49)
Second Desired Trajectory: sec: xdes = 0.6 - 0.6 exp(- tl4 )
(50)
o-
o - 10
(51 )
Ydes = - 0.6 exp(- tl4 ) 10 - 20 sec: xdes = 0.6 exp(- (t-10)/4 )
(52) (53)
Ydes = 0.6 - 0.6 exp(- (t-10)/4 ) 20 - 30 sec: xdes = - 0.6 + 0.6 exp(- (t-20)/4 )
(54) (55)
Ydes = 0.6 exp(- (t-20)/4 )
The simulation results giving the end-effector position at x-y coordinate system, are shown from Fig.2 to Fig .5. The horizontal and vertical axes are the end-effector coordinates x and y in meters respectively.
SIMULATION RESULTS MANIPULATOR
FOR
THE
THREE
JOINT
REDUNDANT
The parameters used in simulation are chosen as foliows: mj= 3.0 kg, mload= 3.0 kg, Ij = ~.3 m, Rload=_ 0.05 m, m~= 3.5 kg, m2= 3.25 kg, m3= 2.75 kg, mload= 2.5 kg, 11 = 0.33 m, 12 = 0.3 m, 13 = 0.27 m, GE 1 = 300 , GE 2 = 350, GE3= 400, GCE 1= 9, GCE 2 = 11 , GCE3= 13, GCU 1= 20, GCU 2 = 23, GCU3= 25, Uj= 20000, a1= -2.2, a2= 0.7, bj= 5x10- 5 , h= 0.001 sec, ~t= 0.01 sec, m= 3. The input reinforcements are applied to the samples observed m steps ago.
704
First Desired Trajectory: o - 10 sec: xdes = 0.9 - 0.9 exp(- tl4 ) Ydes
=-
0.9 exp(- tl4 )
Second Desired Trajectory: sec: xdes = 0.9 - 0.9 exp(- tl4 )
(56) (57)
o - 10
Ydes = - 0.9 exp(- tl4 ) 10 - 20 sec : xdes = 0.9 exp(- (t-10)/4 ) Ydes
= 0.9
- 0.9 exp(- (t-10)/4 )
( 58) (59) (60) (61)
GCU values are changed to 30 for this trajectory. The simulation results at x-y coordinate system are shown from Fig.6 to Fig.9.
DISCUSSION This work shows that SOC is applicable to non linear, highly coupled, MIMO systems. In this control method, the designer requires some knowledge of the process in formulating the algorithm, for instance, knowledge of process speed, delay and magnitude of the response. However, only approximate values are required, since the controller is relatively insensitive to the environment and the setting of its parameters. The rule based structure of Fuzzy Control lends itself to a simple systematic method of modifying rules. In addition, a crude initial control policy which would guard against violent changes during adaptation, can be used. However, if the fuzzy tables are empty initially , they can be filled up effectively after several runs. The performance measure used in SOC is not process specific and can be formed easily. There are two important disadvantages of this method. The first one is that, the oscillatory behavior of SCC may be decreased by changing the gains and performance table but can not be removed completely. Secondly, deriving an incremental model may not always be easy . Instead of deriving incremental model matrix theoretically, a constant matrix may be assumed initially and the results may be observed. However, a trial and error method may take a long time and it may not give satisfactory results. Generalized Predictive Control algorithm, on the other hand, gives satisfactory results because the innovation term included in the
705
prediction scheme adds a high degree of intelligence to the control, enabling it to cope with the uncertainties and the nonlinearities. CONCLUSION
This work demonstrates that using an incremental model and a sequence of "per-sample" performance criteria, one can control nonlinear, highly coupled, MIMO systems such as robotic manipulators. However, the overall performance may not be satisfactory because of the oscillatory behavior which can not be removed completely. ACKNOWLEDGEMENT
This research has been supported by the Bogazi~i University Research Fund. REFERENCES
Bekiroglu N., 1991, "Comparative Evaluation of Fuzzy Control Schemes in Robotic Applications", M.S. Thesis. Electrical and Electronic Engineering. Bogazici University. Craig J. J., 1986, "Introduction to Robotics Mechanics and Control", Addison Wesley Publishing Company. Daley S., Gill K. F., 1989, "Comparison of a Fuzzy Logic Controller with a P+D Control Law", Transactions of the ASME, 111, 128-137. Ho J-M., Lin S-R., 1990, "A Learning Algorithm for Fuzzy SelfOrganizing Controller", IEEE International Workshop on Intelligent Motion Control, 90TH0272-5, 55-60. Kaynak 0 ., Hoyer H., 1988, "Predictive Control of a Robotic Arm", l.EAQ Robot Control (SYROCO'88), Pergamon Press pp: 213-218 . King P. J., Mamdani E. H., 1977, " The Application of Fuzzy Control Systems to Industrial Processes", Automatjca, 13, 235-242. Procyk T. J ., Mamdani E. H., 1979, "A Linguistic Self-Organ izing Process Controller", Automatica, 15, 15-30. Tong R. M., 1977, "A Control Engineering Review of Fuzzy Systems", Automatica, 13, 559-569 . Zadeh L. A., 1965, "Fuzzy Sets", Information and Control, 8, 338-353.
0.6
0.5 0.4
0.3
-0 .1
Fig.2:
o
sac
0.1
0.3
0 .2
0.4
for the 2-j manipulator, on 8th run.
-0 .1
o
0.1
0.2
0.3
Fig.3: GPC for the 2-j manipulator.
0.4
-.l
~
0.2 - 0.6
Fig.4:
-0.4
sac
-0.2 _ .2!) 0
0.2
for the 2-j manipulator, on 6th run.
Fig.5: GPC for the 2-j manipulator.
o
-0.2
0.2
0.4
0.6
0.8
1
o
-0.2
-0 . 2
-0 . 2
-0.4
-0.4
-0.6
- 0.6
-0.8
-0.8
- 1
- 1
Fig.S:
sac
for the 3-j manipulator, on 7th run .
0.2
0.4
0.6
0.8
Fig.7: GPC for the 3-j manipulator. -...l
o-...l
1
1
0.5
0.5
0.2
-0 . .::
1
-0.2
1
-0.5
-0.5
- 1
- 1
Fig.8:
sac
for the 3-j manipulator, on 5th run.
Fig.9: GPC for the 3-j manipulator.