Copyright © IFAC Robot Control, Nantes, France, 1997
AN ANALYTIC APPROACH TO FUZZY LOGIC ROBOT CONTROL SYNTHESIS
B. M. Novakovic, D. Majetic, N. Blaiicevic
FSB - University of Zagreb, Luciceva 5, PQ.B. 509, 10000 Zagreb, Croatia, Tel. (+ 385) 1 61 68354, Fax. (+ 385) 1 61 56940, E-mail:
[email protected]
Abstract : A new nonconventional analytic fuzzy logic robot control synthesis is proposed. For this purpose the following objectives are preferred and reached: (i) a new interpretation of the grade of membership or fuzziness of fuzzy control systems , (ii) a determination of a new analytic activation function, instead of using of min-max operators, (iii) a definition of a new analytic function that determines the positions of centres of output fuzzy sets, instead of definition of rule base, (iv) an introduction of an analytic defuzzification formula and Cv) an analytic fuzzy logic control synthesis of robot of RRTR - structure, using proposed analytic approach.
Keywords : analytic fuzzy control, interpretation of fuzziness , robot control, control synthesis, discrete-time domain.
I . INTRODUCTION
applications such as robot control, videorich multimedia and virtual reality, which can require many more rules of greater complexity operating in milliseconds. It becomes necessary to suggest ways to cope with a vexing problem in fuzzy logic: the exponential growth in rules as the number of variables increases (Kosko, 1996). This problem is solved in the paper by introducing of an analytic function that determines the positions of centres of output fuzzy sets in each mapping process, instead of definition of rule base. Thus, the paper approach is without any fuzzy logic rule. Just one: The rule that there are no rules.
Fuzzy sets are a generalization of conventional set theory that were introduced by Zadeh (1965), as a mathematical way to represent vagueness in everyday life. Fuzzy interpretations of data structures are very natural and intuitively plausible way to formulate and solve various problems. Meanwhile, the grade of membership or fuzziness has not been properly interpreted (Wang, 1996). Without a clear interpretation of fuzziness it is hard for a person to assign membership functions, or for a computer system to generate the memberships automatically or to get them from sensory devices. This suggests the better interpretation of fuzziness. It has been accepted in the paper and is resulted in a new shape and a new distribution of input fuzzy sets
In the conventional approach, the fuzzy logic controllers use the fixed shapes of fuzzy sets, usually in the form of triangles or trapezoids. Finding the best shape for a fuzzy set ( or patch) remains a hard problem. Adaptive fuzzy set schemes are discussed by Lotfi and Tsoi (1996), and by Novakovic (1995). In the paper a special kind of fuzzy set is derived,
Currently, fuzzy systems often apply where the number of inputs and outputs is small and events happen relatively slowly. Meanwhile, there are
371
sense, especially in the case of fuzzy logic control systems. For an example, let the FLC input variable is position error e(t\) = 0.25 , which belongs to the symmetric fuzzy set to the grade of membership ~ (e(t\» = 0.3. And, let the fuzzy set centre Ye = 0.5. Then, the input variable e(t2) = 0 .75 will have the same grade of membership ~ (e(t2» = 0.3. In the conventional FLC, the consequences will be the same in both cases, but it should be different to each other. That was the main motive power for including the new interpretation of fuzziness by employing of a first principle which will eliminate a such illogical possibili ty.
which can be adapted by changing of the parameters £ and~ . In contrast to the min-max operators used in many applications, in the paper an analytical activation function has been introduced. As the input variables of fuzzy control systems in robotics, or generally in mechanical systems (pacini and Kosko, 1992), we usually chose position error e(t) , velocity error 6(t), and previous control variable u(t), while the output variable is a robot control u(t+ 1), where t-is a discrete time. The rulebased applications of fuzzy l<1gic control systems in robotics are presented by Moudgal, at a/. (1994) . The main problem in the conventional synthesis of fuzzy controllers is to define fuzzy logic control rules. This problem is avoided in the paper by introducing of an analytic determination of position of centres of output fuzzy sets, instead of definition of a fuzzy rule base. As the contributions of this paper, the following items can be cited. A new shape and a new distribution of input fuzzy sets that can be adapted by parameters ~i and ~j (i=I, ... ,nJ , j=l, ... ,m), where nj is the number of fuzzy sets belonging to the j-th input variable, while m is the number of input variables. A new analytic function that determines the positions of centres of output fuzzy sets Yej, instead of conventional definition of fuzzy logic rule base. Finally, a new analytic fuzzy logic control synthesis for robot of RRTR - structure. This paper is organized as follows . Section 2 presents the process of synthesis of an analytic fuzzy logic control. Following the procedures from Section 2, the corresponding analytic fuzzy logic control of robot of RRTR - structure is designed in Section 3. Finally, the comments and conclusions are emphasized by Section 4.
The first principle: Each FLC input variable (positive or negative) belongs to the all of input fuzzy sets ( in positive or negative domain of universe of discourse, respectively), but to different grade of membership (different fuzziness), except in the regions (points) where the grade of membership is equal one or zero. It means that there are no two or more different amounts (positive or negative) of FLC input variable (in positive or negative domain of universe of discourse, respectively) that can have the same grade of membership to the same fuzzy set, except in the regions (points) where the grade of membership is equal one or zero. Definition of a new type of the Juzzy membership Junctions. In order to create a new fuzzification interface process, we first define a new type of the fuzzy membership functions Si (y), (i = 1, ... ,n), on a universe of discourse Y, y E Y, Fig. 1, that can be adapted by employing an adaptation parameter £i .
ta
tb
1~----~--~-'~~--'------'
0.5
2. ANALYTIC APPROACH TO FUZZY LOGIC
CONTROL A conventional Fuzzy Logic Control (FLC) is composed, as it is well known, by four principal elements: fuzzy rule base, fuzzification interface, fuzzy inference machine, and defuzzification interface. In this paper we consider multi-inputsingle-output (MlSO) fuzzy logic control system f: U ~ R m ~R , because a multi-output system, which has no output-input interactions, can always be separated into a collection of single-output systems.
0.5 to
2
1.5
1
Y
te
Fig. 1. A new type of the fuzzy membership function. Let Yoi denotes the beginning, and Ye. the end of the i-th fuzzy set, on the abscise axes, y, where Si(Yoi) = Si(Yei) = O. The points Yai and Yb. are determined by s;(y) = 1 , Yai ~ Y ~ Ybi . The fuzzy set centre is denoted by Yei , while the fuzzy set basis is Ti = Yei - Yoi . The adaptation parameter £i is defined by the equation:
2.1. The New Fuzzification Interface In the conventional fuzzification interface, in the case of symmetric input fuzzy sets, the two different amounts of FLC input variable which are symmetric to the centre of the corresponding input fuzzy set have the same grade of membership to this set. This interpretation of fuzziness is illogical in a natural
£i = (yei - Yoi) / (Ybi - Yai),
(£i > 1),
(1)
where 6. can be adapted by employing some of the parameter adaptation schemes. Following Fig.l, and
372
the equation calculation:
(1)
one
Yoi = Yei - T;l2 , Ybi
= Yei +Ti
can
use
the
Tji = ~ei - ~oi, where xioi = -1 , and ~ei = 1, but different adaptation parameter g!i , i = 1, ..,nj . This type of distribution of input fuzzy sets we call £ -fJ distribution of fuzzy sets. It is easy to conclude , that the first principle is satisfied by employing the E - P distribution of input fuzzy sets in Fig. 2.
following
Yai = Yei - Ti /2 E, ,
/2 Ei ,
Yei
= Yei + T;l2.
(2)
The adaptive i-th fuzzy set shape is defined by the equations:
Si (y) = (1- cos ( ( 2
1t
«Ei - 1 ) Ti ))) / 2 ,
Yoi
~
Y
~
Yai,
s, (y) = 1, Si (y)
= (1
« E, -
0.5
Ei ( Y - Yei + Ti 12 )) /
(3) - cos ( ( 2
1t
-0.5
Ei ( Yei + T, /2 - Y )) /
1 ) T i ))) / 2 ,
Yb,
~
Y
~
o b)
1
0.5
x
Fig.2.E-p distribution of input fuzzy sets Sex), P=O. l .
Yei.
Thus, the first objective of this paper ( a new interpretation of fuzziness by using of a new shape of fuzzy sets and a new distribution of input fuzzy sets) is reached by using the equations (1) to (4) and E-P distribution of input fuzzy sets in (5), Fig. 2.
In the case that Ei ~ 00 , the fuzzy set shape is cosine-triangle. For Ei ~ 1, the fuzzy set shape is cosine-rectangle. Otherwise (1 < E, < 00) , the fuzzy set shape is cosine-trapezoid. In the case that fuzzy set basis Ti is constant, a distance (Ybi - Yai ) is the function of the adaptive parameter Ei, which can be the function of the time.
2.2. The New Fuzzy Inference Machine
Input variable normalization. The second step of the creation of the new fuzzification interface process, is the normalization of input variables. Let U be the universe of discourse of all input variables Xj (j = 1, .. .,m) of FLC, and x) E U. The centres of input fuzzy sets are denoted by x)e" i = 1, ... , nj . The input variables Xj should be normalized by the equation:
The max and min operations, which are the most distinguished components of fuzzy theory, are not strongly supported by experimental evidence or theoretical consideration. Zadeh admitted that in some contexts the union/intersection operators should be algebraic sum/product rather than max/rnin operators, but he did not indicate how to determine which pair should be used when facing a new context (Wang, 1996). In order to create a new analytic inference algorithm in this paper, max/rnin operators will be replaced by sumlproduct operators.
where x) max is the maximum value of Xj on the universe of discourse U, and ~ is the normalization of x). In that case the new fuzzification interface uses the equations (1) to (3) and (4), with substitution Y by ~, and Ye, by ~ei , for calculation of the membership function sl,( ~ ) , i = 1, ... ,n) , of the j-th input variable, j = 1, ...,m , of the system.
In this sense, the new distribution of input fuzzy sets given in Fig. 2 is suitable for definition of a new type of an analytic inference algorithm. For this purpose the following consideration can be used. Since the first principle is satisfied by E - P distribution, Fig. 2, an input variable ~ belongs to each of input fuzzy set A J j , i = l , .. .,nj , j = l, ... ,m , with grade of membership ~ ), ( ~ ), and activates the corresponding output fuzzy set B) with degree W j . Activation function w) is defined by the equation :
Satisfaction of the first principle. The third and finale step of the creation of the new fuzzification interface process, is the satisfaction of the first principle. For this purpose we shall use a special distribution of input fuzzy sets, Fig. 2, with the following modification of the fuzzy set shape from (3): j
n)
L ~,( ~ ) SB) = i 1 ~
w) SB) .
(6)
In the equation (6) SBj is a membership function of an output fuzzy set Bj So, the activation function w) of the j-th output fuzzy set Bj ,
In this distribution the all input fuzzy sets have the same centre position ~e, = 0, and the same basis
373
~,
can be
j = 1, ... , m .
(7)
belonging to the j-th input variables computed by analytic fonn :
Since the input variables are normalized , it requires a determination of a gain Kej of output fuzzy set centre position. In general, an adaptive gain of output fuzzy set centre position can be computed by the equation : Kej = Urn Fj (1 + I ~ I aj) , (10)
The activation function (o)j denotes the grade of membership of input ~ to all of input fuzzy sets. Thus, the second objective of this paper (a determination of an analytical activation function for activation of output fuzzy sets, instead of using of min-max operators) is reached by using the equations (7).
where Urn is a maximal value of a control variable u, and Fj and aj are free parameters that should be obtained by simulation in each concrete case. There is no adaptation of a gain Kej of output fuzzy set centre position if parameter aj = O. Finally, the output fuzzy set centre position Ycj is determined by a product of contents of (9) and (l0) :
Instead of definition of fuzzy rules we shall define the function for analytically determination of the positions of centres of output fuzzy sets. Generally, one can introduce the function fcj~) , which maps input variable ~ to position of centre of output fuzzy set Ycj: YC) = L:)~) . Problem is to find out this function in each concrete case. For solution of this problem we propose the following intuitively consideration. Let start with Fig. 2 , from where we can derive the following statement. If the membership of input variable ~ i ( ~ ) is smaller , then distance ~ to zero is bigger. Consequently, the control error is bigger, and it implies that an amplitude of control variable should be bigger. Analogicaly, an absolute position of a centre of the corresponding output fuzzy set should be bigger. Following this consideration , amplitudes of nonnalized positions of output fuzzy sets centres can be computed by the equation:
Ycj = Urn Fj (1 + I ~
C)
I
=I
~ i ( ~)
) /
nj = 1 - (o)j / n) ,
(~
),
(8)
j = 1, ... , m,
YC) (t) = Kej (t) ( 1 - (o)j (t) / nj ) sgn
nj ) sgn ( ~ ).
(~
(t) ).
(12)
By employing correlation-product inference for determination of the output fuzzy set's shape Soj , we multiply the output fuzzy set shape SBj by (0)) : (13)
(9)
So, each input variable ~(t) activates the corresponding output fuzzy set Bj , to the degree (o)j (t), and this yields the output fuzzy set's shape Soj(y,t). The system then sums Soj(Y,t) to fonn the combined output fuzzy set' s shape : rn
where sgn(!S,j) = 1, if ~ > O , sgn(~) =-1 , if ~ < 0, and sgn ( ~) = 0, if ~ = O. A graphic realization of the equation (9), for P=O.I, is given in Fig. 3.
)
(14)
and with that the inference algorithm is finished.
~
iI !
I
~L l----_~O.-5--~O~---O~.5~--~1
b)
(0)) /
In the discrete-time-point t the activation function (o)j activates the j-th output fuzzy set Bj, belonging to the j-th input variables ~ , to a degree (o)j (t). At the same time the position of the centre of the output fuzzy set Bj is Ycj (t) :
where j = 1, ... , m. Taking into account that a sign of Y cj must be equal to a sign of ~ , the normalized positions of centres of output fuzzy sets can be calculated by the equations : Y CJ = ( 1 - (o)j / nj ) sgn
1!Ij ) ( 1 -
Thus, the third objective of this paper ( an introduce of an analytical function that determines the positions of centres of output fuzzy sets in each mapping process, instead of definition of rule base ) is reached by using the equations (11).
nj
I Y I = 1 - ( .L
(11)
Ycj = Ke) Ycj ,
2.3. The Defuzzijication Interface
In order to generate a non fuzzy output (a crisp value) of the system the centroid defuzzification method is employed (pacini and Kosko, 1992), for the discrete time point t:
x u(t+l)=Jyso( y, t)dy / Jso (y, t)dy,
Fig. 3. Centres Yc(x) of output fuzzy sets, p=O.l.
374
(15)
where the limits of integration correspond to the entire universe of discourse Y of control output values. Starting with the equation (15), one can develop an analytical method for computing a non fuzzy output (a crisp value) of the system. Further, the synthesis results are stated in the form of the proposition.
simulations results, as position and velocity errors of robot of RRTR - structure, are presented in Fig. 5 and Fig. 6.
Proposition 1. If xJ (t) (j=I, ... ,m) are FLC inputs
u(t+1 )
in the discrete time point t that are normalized by (4), and FLC input fuzzy sets are defined by (1) to (5), and Wj (t) is an activation"function from (7) that activates the j-th output fuzzy set Bj , belonging to the j-th input variable ~ , to a degree Wj (t), and Ycj (t), T j ,and Coj are centre, basis and adaptation parameter of the j-th output fuzzy set Bj , respectively, then a non fuzzy output of the FLC system u(t+ 1), can be computed by the centroid defuzzification method (15) in analytical form :
q (t) dq (t)
ROBOT u(t)
u(t+1)
dq(t)
u(t+ 1)
qw (t) dqw (t
Fig. 4. Scheme of the fuzzy logic control of robot.
m
m
Table 1. Initial Qarameters used in FLC ~nthesis Robot link no. Starting position [rad,m] Final position [rad,m] Starting and final velocity [ rad/s, m/s]
where Ycj (t) has to be calculated by (12) . In order to derive the proof of the proposition 1, we can follow the corresponding proof algorithm given by Pacini and Kosko (1992). Thus, the fourth objective of this paper ( employing of an analytic defuzzification formula as a function of positions of centres and shapes of output fuzzy sets and of activation functions ) is reached by using the equation (16) .
Profile of velocity Starting time point [ s] Final time point [s] Sampling period [ s ] Expected max. posit. error [ rad, m ] Expected max. veloc. error [ rad/s, m/s ] Expected max. control variable [ V l
3. ANALYTIC FUZZY LOGIC CONTROL OF ROBOT OF RRTR STRUCTIJRE The RRTR-structure of robot, which is considered in this section, is equal to the structure of the well known Stanford Manipulator. The corresponding physical parameters of this robot are presented by Novakovic (1996) . A fuzzy logic control (FLC) system of this robot, Fig. 4, maps robot position errors e(t), velocity errors e(t), and previous control variables u(t) (inputs of fuzzy logic controllers) to DC - motor control variables u(t+ 1) ( voltages as outputs ofFLC system).
1 (R)
2 (R)
3 (T)
4 (R)
0.0
0.785
0.01
0.0
2.267
2.965
0.3
1.395
00
0.0
0.0
0.0
cosine
cosine
cosme
cosine
0.0
0.0
0.0
0.0
1.5
I.5
I.5
I.5
0.015
0.015
0.015
0.015
0.05
0.05
0.05
0.02
0.3
0.3
0.3
0.3
35.0
25 .0
10.0
15.0
Table 2. Basic Qarameters of inQut fuzzy sets Fuzzy set no. 1 2 3
The nominal (desired) robot velocities have cosine shapes in the inner space. Four DC-motors adjust the robot positions and velocities, following the nominal (desired) robot positions and velocities. The interactions between robot links are compensated by tuning FLC parameters in simulation process during of simultaneously motions of all of four robot links.
4
5 6 7 8 9 10
Following the procedures in Section 2, and using the parameters from Tables 1 to 4 , the analytic fuzzy logic control of robot of RRTR structure is realised and tested through the simulations. The relevant
375
Adaptable parameter £ 1.00000001 1.Illll 1.25 1.66 2.5 5.0 10.0 20.0 50.0 100.0
Base of fuzzy set 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0
Fuzzy set centre 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
4. CONCLUSION
Table 3. Adaptable !3-parameters of input fuzzy sets Robot link no.
1 (R)
2 (R)
3 (T)
4 (R)
0 .15 0.1 0.1
0 .2 0.2 0.1
0 .15 0 .15 0 .15
0.5 0.18 0. 15
Table 4. Parameters of output fuzzy sets Robot link no.
1 (R)
2 (R)
3 (T)
4 (R)
FS base Te FS base Te FS base Tu
1.056 0.25 0.15 10.0 14.28 20.0 Eq.12 1.0 1.9 35.0
0 .'~42
0.25 0 .35 10.0 14.28 20.0 Eq.12 1.0 2.1 25.0
0 .395 0 .25 0.65 10.0 14.28 20 .0 Eq.12 1.0 4.0 10.0
1.0 0.25 0 .15 10.0 14.28 20.0 Eq. 12 1.0 2.0 15.0
Adap. par. Ee Adap. par. Ee Adap. par. Eu
FS centre Ye Gain param. a Gain F Gain Urn
0.02 , - -- - - , --
E~
0.01
,,
--;<=-:---
,
, ,,
,
In the paper the discrete-time-variable positions of centres of output fuzzy sets are introduced as arIalytic functions of input fuzzy system variables. It supports analytic procedures in FLC, and enables the elimination of fuzzy rule base. The arIalytic activation function is used instead of min-max operators. The number of FLC input variables and the number of input fuzzy sets are not limited, because there are no rules in the paper approach. On this way the vexing problem in fuzzy logic ( the exponential growth in rules as the number of variables increases ) is solved. The proposed adaptive fuzzy sets are useful for applications in the design of fuzzy logic controllers for industrial Future robots, using arI analytic procedure. directions of work opened up by these results include an adaptive fuzzy logic robot cO.!ltrol, and comparative studies of this FLC synthesis approach with other algorithms in variety of applications.
..,...-- - - - - ,- - - - ,
,
REFERENCES
Kosko, B. (1996). Fuzzy Engineering, Prentice Hall, Englewood Cliffs, N.J. Lotfi, A. and A.c. Tsoi (1996). Learning fuzzy ---inference system using an adaptive membership , . function scheme. IEEE Trans. on Systems, Man, and Cybernetics, Part B: Cybernetics, vol. 26 , no. 2, pp. 326 - 331. 80 100 60 40 20 Moudgal, Y.G., K.M. Passino and S. Yurkovich t a) (1994). Rule-based control for flexible-link robot IEEE Trans. on Control Systems Fig. 5. Simulation results: robot positIOn errors Technology, vol. 2, no. 4, pp.392-405. PE(t), arid t-is discrete time. Legend of lines B. (1995). An approach to design of an Novakovic, (from top to bottom) : link I (- - - ), link 2 (-), adaptive fuzzy set for fuzzy control. Proc. of 6th link 3 (- - -), arid link 4 (-). Intern. DAAAM Symp. , vol. 1, pp. 243-244, Teclmical University of Krakow, Krakow, Poland. 0.2 Novakovic, B. (1996). Discrete time neural network synthesis using input and output activation ~ functions. IEEE Trans. on Systems, Man, and 0.1 E Cy bernetics, Part B: Cybernetics, vol. 26, DO. 4, --0: pp. 533-541. "0 0 ~ I-< Pacini, P.J. and B. Kosko (1992). Adaptive fuzzy systems for target tracking. lEE Intelligent (.Ll -0.1 Systems Engineering, vol. 1, 00.1, pp. 3-21. Wang, P. (1996). The interpretation of fuzziness . -0.2 IEEE Trans. on Systems, Man , and Cy bernetics, 60 80 100 0 20 40 Part B: Cybernetics, vol. 26, DO. 2, pp. 321-326. L.A. (1965). Fuzzy sets. Information and Zadeh, b) t Control, vol. 8, pp. 338-352. Fig. 6. Simulation results: robot velocity errors VE(t), and t-is discrete time. Legend of lines (from top to bottom) : link I (- - - ), link 2 (-), link 3 (- - ), and link 4 (-).
"0
~ I-<
,
o .- - ---------
~
>
376