Fuzzy sliding mode controller with fuzzy inputs

Fuzzy sliding mode controller with fuzzy inputs

FUZZY SLIDING MODE CONTROLLER WITH FUZZY INPUTS ... 14th World Congress ofTFAC Q-9c-03-2 Copyright© 1999 IrAC 14th Triennial World Congress, Beijin...

4MB Sizes 2 Downloads 100 Views

FUZZY SLIDING MODE CONTROLLER WITH FUZZY INPUTS ...

14th World Congress ofTFAC

Q-9c-03-2

Copyright© 1999 IrAC 14th Triennial World Congress, Beijing, P.R. China

Fuzzy Sliding IYfode Controller with Fuzzy Inputs Rainer Palrn Siemens AG Corporate Technology Information and Communications Dept. ZT IK 4 Otto-Hahn-Ring 6, 81730 Munich, Germany email: [email protected] Abstract: The paper deals with fuzzy signals in the control loop in the context of pure sliding mode control and fuzzy sliding mode control. With respect to specific effects coming up with the use of sensory information like noise or spat.ial dist.ribution of a signal it is of interest how the control loop acts in the presence of fuzzy signals. In this paper instationary fuzzy sets, especiaJly time variant membership function::> and their derivatives, are discussed. Copyright © 1999 IFAC Keywords: fuzzy control, sliding mode control, fuz""y inputs

1

Introduction

Proce~s signab which appear within the control loop are often found to be disturbed by different kinds of noise so that they have to be processed in a special way (e.g. filtering, regression analysis etc.) in order to obtain satisfactory control results. Koisy signals are more or less of ambiguous qualit.y because the level of confidence in a single measurement at a certain time event strongly depends on the dispersion of the signal. Koise can mainly occur at two main places in the control loop (see Fig. 1):

1. noise added to the control value

2. noise added to the system's output value.

y

Figure 1: Block scheme of a control loop with fuzzy signals In Fig. 1 the following notations hold: x(t) is the state vector, u is the manipulated variable, d are disturbances of the manipulated variable, y is the fuzzy output vector, C - (n - 1) x (n - 1) is a diagonal matrix, d is the vector of uncertainties of the sensory. Another type of ambiguity appears when, instead of a single sensor, a sensor array I::> employed whose individual subsensors provide different information (e.g.

different intensities of radiation). The output of a sensor array can be processed subsensor by subsensor. A more sophisticated way is to gather all sensor data to a dist.ribution that considers the subsensors and their individual level of information as a whole. The difference between the two types of signals is that the first one is represenLed by a time series of single values whereas the second t.ype provides a spatial distribution at a specific time event. The two types of signals can be treated in a unified way if 011e derives a probability distribution from the noisy signal. The question is how such ambiguous signals can be treated in a control loop. While using conventional controllers, the common way of dealing with such a signal is to compute the average of its distribution and provide the controller with this value. However, in this case the information about standard deviation and the higher moments gets lost. The use of fuzzy controllers becomes therefore advantageous where the distribution is interpreted as a . membership function of the fuzzy set "around x" where x is the mean value of the distribution. The scope of pure fuzzy systems including fuzzy signals has been extensively studied hy [Pedrycz 1992). Nevertbele~s, onc also should pay attention to the mixed case where some signals are crisp and ~ome are fuzzy. Thi~ is the case when the objective Xd is crisp and the output y, fed back via sensors, is fuzzy. The transformation of the noisy or spatial distributed signal into a fuzzy set is done as follows: i) Construction of a histogram from a probabilistic or spatial distribution of the signal to be considered, ii) Transformation of the histogram into a fuzzy set via normalization with respect to the maximum value of the histogram, iii) Feedback of the fuzzy signal to the controller input. The major reason why this option is worth investigating is to take into account. as much information describing the sig-

8619

Copyright 1999 IF AC

ISBN: 008 0432484

FUZZY SLIDING MODE CONTROLLER WITH FUZZY INPUTS ...

14th World Congress oflFAC

nal measured as possible. This informat.ion includes the confidence in a measurement represented by the stanoard oevill.tion of the distribution, the degree of deformation and asymmetry according to a Gaussian distribution represented by the higher moments of the distrihution and the occurance of IT10re than onc peak in the distribution. In fYager 1994J noisy input.s have also been discussed but not from an explicit control point of view. Although some methods exist to prove stability of fuzzy controlled systems [Tanaka 1992J all of these methods deal with crisp signals throughout the control loop. Therefore, it is of interest to find out corresponding methods for investigating stability and robustness of fuzzy cont.rolled systems in the case of fuzzy signals at the input of the controller. Normally, fuzzy sets are characterized by stationary and time invariant membership func:tions. However, in the context of fuzzy input signals the problem of time variant fuzzy set.s arises. Therefore, in section II some operations with regard to instationary fuzzy sets are defined especially the differentiation of a fuzzy set with respect to time. Section HI deals with fuzzy input.s applied to a fuzzy sliding mode controller which is of Mamdani structure [Kawaji 1991, Palm 1992). In [Palm 1994) these points have already been discussed for sliding mode control (SMC) and related control strategies i.e. SMC with boundary layer [Slotine 1985J.

2

Instationary fuzzy sets

Fuzzy sets with time variant paraIlleters Normally, fuzzy sets are considered t.o be fixed in time and therefore stationary sets. If, however, sorne parameters of a fuzzy set are changing with time one has to call this type of fuzzy sets instationary. Let, for example, a fuzzy set X(l) be described by a bell-shaped membership function ltx (x(t)) similar to a Gaussian probability distribution .

Vt

(1)

where x(f) is the LirllC variant mean, and 0"(1) is the time variant standard deviat.ion (width). Similar to a probability distribution we characterize the width of the membership function by a scaled deviation iT(t). The fuzzy set is normal which means Ilx(x(t) = :c(t) = 1. Since x(t) is a function of time the fuzzy set X moves along its universe of dicourse according to the velocity x(t) of the mean x(t) and the velocity a-(t) of the deviation 17(t). Thus, the dynamics of the membership function only depends on the two parameters x(t) and u(t). The representation of a time variable fuzzy set and its derivatives with respect to time by a finite number of parameters (in our case x(t) and u(t)) is very useful to bridge some gap!:> between cODventional and fuzzy system theory. However, t.he representation

a

(t+l)t)

X(t)

Figure 2: Motion of an inst.ationary bell-shaped membership function along the x -axis of the universe of discourse of a time variable fuzzy set X(t) in terms of its paIallletcrs is not a fuzzy seL. The question is: How does the velocity of a given t.ime variant fuzzy seL in terms of a. fuzzy set look like? This includes the prohlem of how derivatives of a fuzzy set with respect to time are defined. Differentiation of a. fuzzy set with respect to time The proposed definition by [Zimmermann 1991] of the differentiation of a fuzzy set does not. satisfy the problems arising for dynamical fuzzy sets with time variable paramet.ers. Therefore, a different definition of the derivative of a fuzzy set with respect to time has been proposed [Palm 199<1]: The differentiation of a crisp function x(t) with respect to time is defined by

'. _ r. x -

tmt:>.t-+O

x(t

+ ~t)

6.t

- x(t)

.

A regarding operation with respect to a fuzlIY set can be achieved as follows Consider a fixed pair ( It X (xi (t), xi (t). The behavior of a fixed pair (Jix(xi(t»), xi(t» with respect. t.o time is based OIl the following condition: V6.l Xi(t + At) = x;(t) + D..xi(t) and J1x(J/(t + 6.t» ::::: I1X(X'·(t». The fuzzy set X(t) is tlren defined as

(2) where Vk ;i:k(t) = Xi(t). This means, in t.he case of several points xk Ct) with the same velocity Xi (t) but different degrees ofmemhershipl1x(x k ) we choose the maximum degree of membership maxk{f/X (x k (t))} for i:'(l). This is justified because the fuz zy set X should be a normal set like X(t). Let us now apply definition (2) to a bell-shaped membership function (see fig. (2)). Let IlX(xi(t) and J1x(xi(t + 6.t») the membership functions for point xi at time t and t + 6.t,

8620

Copyright 1999 IFAC

ISBN: 0 08 043248 4

FUZZY SLIDING MODE CONTROLLER WITH FUZZY INPUTS ...

14th World Congress ofTFAC

respectively:

first formula of (3) and from (6) we directly obtain the corresponding fuzq set of the velocity

(x~(I)_.:[(t)-)2 2-.".(0 2

c

e-

f/x'(t+6!)

(3) (7)

(xi (t+~t)-x(t+c..i))l ;,j:°0'(t+At)2

For a process that is assumed to be approximately Gaussian distributed its bell-shaped membership function is computed by the estimation of mean x(t) and standard deviation a-(t). Knowing the time derivatives i(t) and &(t) it is therefore easy to compute the bellshaped membership function of its velocity as well (see (7)). For a lopsided (asymmetrical) but unimodal distribution a similar procedure holds: It is assumed that an asymmetrical membership function flX(Xi(t) with Xi E [XO, Xl] can be approximated by the left and right half of two symmetrical bell-shaped functions with the same mean xdt) == XR(t) == x max (l'x(x'(t))) but different standard deviations (TL(t) f. a-R(t). The left and right standard deviat.ion, respectively, is obtained by dividing the original membership function measured in two halves at x ma"·(l'x (",'(n» building up two symmetrical membership functions. From these two functions the standard devia.tions O"L(t) and O"R(t) are estimated resulting in two different membership functions J1X L and fLX R put together at Xma;c(l'x(xi(t)):

where

(4) From (.3) and (4) follows Xi

(t) - xli) (T( t)

."i(t

+ !J.t) J(i

- .i(i

+ !J.t)

+ !J.t)

\Vit.h the linear approximations

+ ~t)

Ri

+

~l)

Ri

(T{t+~t)

Ri

x;(t x(t

xi(t} + i:' . ~t x(t) + X . ~t (T(t) + Cr • b.t

(5)

one obtains the velocity (6) According to definition (2) the corresponding membership function for xi (t) can he obtained by 1. For ir = 0 one obtains Vi xi(t) = x(t) Since ILx (x(t)) == 1 we obtain, according to our definition with respect to .X", 'Vi IIX(i:i(t) l.

=

{:cl (1)-X [ (n)2

PX"

(Xi(t)) = e -

for

Xo::; Xi::;

xLlt) (8)

flXR(X'(l))

2. For 0- =I 0 one obtains 'Vi I1x(±;(t)) == I1X(X i (t». If 'Vi ;i;i(t) = x(i), as a special case, we obtain 'Vi fLxJi: i (t») = fLx(x(i)) == Px (x(t»

=e

Cri (t)-xB (-1))2

2a'J,C t )

for

XR(t) S xi S

Xl.

From the behavior of these apJ;>roximati?ns with rcspect to time the parameters XL(t) = XL(t), &L(t), a.nd o-R(t) are to be computed from which we obtain IlX(xi(t») with xi E [XO,Xl]

In practice, mapping /lx(x(l)) -l- /lX(X(l + 6..t») is complicated since the fuzzy sets measured are often not normal and even non-konvex. Therefore, a procedure J1XL(X'(t») = e dealing with mea.'lured fm:zy sets is proposed which simplifies both the procf:.<;sing of the f~]zzy set and the computation of its velocity. I-lXH(Xi(t)) = e Approximation of measured fuzzy sets with piecewise bell-shaped functions Dealing with an instationary fuzzy sigrHl.l and the rat.her complicated method of calculating the fuzzy set of its velocity out of the measurements requires a simplification of the whole procedure. This can be achieved through approximation of the signal distribution measured by means of hell-shaped functions. By means of this method one is able to approximate unimodal but asymmetrical distributions. VVith the approximation at time t and t + !J.t the fm;zy set of the velocity can be obtained easily. In order to deal with this problem we start wit.h the fuzzy set of the velocity of an inst.ationary hell-shaped fuzzy set whose parameters are mean x(t) and standard deviation (T(i). From the

'atpl

(+~(t)-£7 (1))2

20-1.(')

for;1;o::;

i,i:S" h(t) (9)

(xl(1)_lB~1)2

''"~(')

for

het) -s; xi -s;

Xl.

Figure (3) shows an example in which a zero mean Ga.ussian process y with standard deviation (Ty = 1 is multiplicativcly and additivdy affect cd by sinusoidal functions. The resulting stocha.stical process :r. consists therefore of a pure randoln process y and some nonstochastical signal components:

x(t)

= Q.5· sin(Q.8· t + 0.5)· Y + 4· sin(O.4· t).

The sample time for measuring x(t) is dt = 0.01s. In order to obtain the distribution p(x) of x for a spccifie time event t; 200 x( t) values are measured to fill in a histogram of 22 classes which corresponds to a time period of 2s. After gathering the distribution p(xk=t; each value of p(x) is normalized with respect to t.he maximum p(x)max of p(x). The result is a fuzzy set

8621

Copyright 1999 IF AC

ISBN: 008 0432484

FUZZY SLIDING MODE CONTROLLER WITH FUZZY INPUTS ...

14th World Congress ofTFAC

I~x (t;). On th~ other hand, p(X)t==ti provides mean differential equation of a nonlinear system and standard deviation of the distributions at the left. x(n)(t) = f(x, t) + g(x, t) - H + d (10) and right hand side of the maximum value of J1.X (t;) at time t;. From these parameters two approximated where x(t) = (x, X, ... , x(n-l))"r is the crisp state vecbell-shaped membership functions for the left and right tor, d are fuzzy disturbances, g(x, t) > 0, I(x, t) are part aff~ obt.ained in a straight forward way. The next nonlinear functions, and u is the crisp manipulated action is to perform the same steps for t = ti+1. From variable_ Further, let this information the velocities of the mean and the in( 11) dividual standard deviations have been calculated. Finally, according to (9) the membership function J1. X of be the observation equation (sensory equation) where the velocity o[ the fuzzy po~ition has been calculated. y is the fuzzy output vector, and cl is the fuzzy vector It should be noted that the information about the signs of uncertainties of the sensory. Equation (10) means of the veloci ties of the standard deviations aL and a R that x(n) is a fUl:zy value since d is a fuzzy scalar. In of the original fuzzy set is not preserved in the fuzzy (11) vector y is also a fuzzy signal originating from the set of the velocity. This is in contrast to the velocity fuzzy interpretatioIl of sensor ullcertaintic::; (see also of the ruaxirIlum value of the original fnzzy set whose Fig. I. Let sign and absolute value characterize the maximum of (12) El = Y - Xd = X + cl - Xd the resulting fuzzy velocity.

Timc'C 1

11

t

I

It

FdZ~ Set of Pos-ibon ~m"il5Ur1:d)

*=

." d/ ;\___

FlJ2rjset.of Posltion (talt.u1.d)

.,/

./

Fu:!'!y lel of VdtJody

)

(1:"'c~illl:l!dl

" ;--",

.

l

't 1 t

I

Fuzzy Set 01 Pn~iti .. no

'Position

Fun"! ~et VeIC'l~~

/

I

.

"-''-.

or

...

//'\\.

/

\

.

= ~ (n ~ l)x '.e(n-k-l)(13) t

k:::O

where e = ~ + d - Xd is the fuzzy scalar error, x is the crisp scalar position, d is the fuz~y scalar of position ullcertainty, Xd is the crisp scalar desired position, >. is a positive scalar value, s is a scalar fuzzy value. \Vith the help of the fuzzy value 5, the cross product s x s and a subsequent projection we define a fuzzy Lyapunov-like function

. >:

,

/:f,-

/ .~

FU2ZY S.taf

(Cilh:lhtl"'iI)

s = (djdt+),)(n-I)e

1~

Cmeil5ln'd)

(~:alcuhded'

X

--x

ii!

)(

Timl12

.

---"',

be the fuzzy error vector where Xd is the crisp vector of desired Htat-es. Further, let I(x, t) be a non linear function of the state vector x and of time t. Then, we formulate

x

X

1

X

V= -·s

'1

(14)

2

Figure 3: Approximation of measured membership functions and computation of their velocity

wherc s = 0 needs to be a stable diffcrential equation (sce below). Further, let the condition for stability be

v = s· S ::; 7] -

3

-7] .

s . sgn(s)

(15)

crisp positive value.

Fuzzy inputs and t he Fuzzy Sliding Mode Controller

The derivative of t.he fuzzy function V with respect to time can be obtained by forming the derivative of a fuzzy set mentioned above. The task is to fino a crisp Pure sliding mode control For a specific class of manipulated variable tl that satifies inequality (15). nonlinear systems there exist a robust control method From (10,11,13,15) we obtain called sliding mode control. This method copes very s-i; = S.(A-Xd(")+d1n)+d+ f+g·u) ::; -rp·sgn(s)(16) well ",..ith model uncertainties, parameter fluctuation and disturbances. A little change of pure sliding Illode in which only Xd(n) and u are cri:sp. Rewriting (16) wc control leads to sliding mode control witll boundary obtain layer. In addition to that it has been shown that fuzzy sgn(s).(A-xd(n)+d(n)+d+f)+1I+s9n(S)·g·-U ::; 0(1/) control, as it appears in Illany control applications, is an extension of the principle of sliding mode with ","-1 (n-l) \k (11-10) . N'ow,wech oose th e w h erei\ =61;=1 k /\·e boundary layer. In the following the bchavior of a control law cont.rolled system in the presence offuzzy values within the control loop will be discussed. We start with the u = _9- 1 . (j + -Us/id.) (18)

8622

Copyright 1999 IF AC

ISBN: 008 0432484

FUZZY SLIDING MODE CONTROLLER WITH FUZZY INPUTS ...

where

9 and

Vslide

i

are estimates of 9 and

f

14th World Congress ofIFAC

the deviation cision to be

and

= K,h:rl.e . sgn(s)

IT

of error e. \Ve define the tracking pre-

(19) (24)

representH the sliding modc controller. In order to determine stability of the system we introdnce the following crisp uppcr bounds E, v, F, DL D2, Omi,,, !3max >

\..,hich means that for Gaussian noisc the probability of a crisp measurement e* falling int.o the interval [-20-,20-] is P(e") == 0.95.

0:


<

E,

-Xd(n).

With these upper bounds, the condition X.rid.mM!

Fuzzy Sliding Mode Control It has been shown that a specific class of fuzzy controllers, e.g. PI and PD fuzzy controllers, work in a similar way as a sliding mode controller with boundary layer. In [Palm 1992] a fuzzy control method was presented which evaluates the distances of the state vector from the swit.ching line in the following way. \Vithin the normalized phase plane the distance

sg/!( -Xd(n»)

K,lidema.,,·

(20)

needs to satisfy

> !3max (E + '1J + F + Dl + D2 + 1/).(21)

(25)

Corresponding to the motion along a sliding surface in the cri,;p case one obtains for fuzzy errors the differential equation (see (1;')))

L

n-1 (

7t;

)

1 )/.

e(n-k-l)

is evaluated by means of the following control rules:

=0

k=O

The fuzzy set e is describe
IF IF

81'1:=

SI"

=NB

SN

= !Vkf

SN

= Pkf PB

THEN THEN

= PR

UN

UN UN 'UN UN

UN UN

= PM

= PS =- Z = NS

(26)

= NjI,l = lVE

where NB is Negative Big, NM i;; Negative Medium, NS is Negative Small, Zis Zero, PS is Positive Small, P~1 is Positive Medium, PB is Positive Big, and UN is the normalized control output. Although rather simple, this set of rule,; lead" to a very good cont.rol results even if the system to be controlled includes nonlinearities. As already pointed out, this comes from the close relationship between this kind of fuzzy controller and the sliding mode controller with boundary layer. These results ha.ve been obtained using crisp controller inputs. According to rule set (26) the corresponding denormalizeu version of the control law is

(23) Equivalent to the sliding mode in the crisp case the mean e of the error signal e goes t.o zero with a velocity depending OIl the slope A of the sliding surface. A \though the inpnts of the controller are fuzzy values similar to sliding mode with crisp controller inputs drastic changes of the control output still occur. This is due to the fact that. the control law (18) makes a crisp decision corresponding to the sign of the nlean (center of gravity) of s. However, regarding the tracking precision of the controlled system there is a difference between crisp and fuzzy inputs: For crisp inputs error e goes (theoretically) exponentially to zero. For fuzzy inputs this can only be shown for the mean e. This means that, in contrast to the crisp case, a finite tracking precision remains depending on the width of

IF

THEN THEN s,v = JVS THEN SN:::- Z THEN THEN .5N = PS

IF IF IF IF

"Ujuzz = K f v.i5z . sgn(s)

(27)

where KjU22 uenotes the denormalized absolut.e value of the defuzzified result obtained from the rules (26). Wit.h respect to fuzzy inputs control law (18) does not change very much although the eomputation of Kju z z in (27) is more complicated. One method of conlputing UN frorn fuzzy inputs is the following: According to (26) the membership functions tisNB, [.is,,""" PH,S' fl,,,,, P,ps, [.is PM , /-L'PB for SN and [.iUNR' f.iUNM' /.tUNS' /.luz, /J.UFS' /.tUFM' /-LuPB for UN arc defined. The inference step is performed by mea.ns of the max-min-compositioll which, by using the MamdaIli relatioll, ean be performed very easily rule by

8623

Copyright 1999 IF AC

ISBN: 008 0432484

FUZZY SLIDING MODE CONTROLLER WITH FUZZY INPUTS ...

14th World Congress oflFAC

in"",

NBNM~S

zt"

PSPMPB

lizA~:i:.;r

.~-~~ :

+.

0

0

+

~-~ ~-~ Kx1x1>
c.o.g. :

Figure 4: Comparison of fuzzy outputs originating from different. fllzzy inpuls with the same c.o.g. rule [Driankov 1996J. The complete fuzzy output set is then calculated through the union of the fuzzy output set obtained from each rule. Figure 1 5ho,.".5 a corresponding example of several fuzzy inputs with difl"erent shapes hut ident.ical mean values resulting in different output sets and, after defuzzification, different control outputs, too. This example shows that the output set of t.he controller reflects, to a. certain degree, shape and locat.ion of the fuzzy input.. On the other ha.nd, a reduction of a fuzzy input set to its mean value leads to a loss of information about the confidence about the input. signa.l. Simulation results The combination of fuzzy inputs with fuzzy sliding mode control has been tested with the help of a sin1.ple linear model of a 2nd order system

i

+ i:

=

Y = x+d;

=

Figure 5: Mixture of step response and sinusoidal response for fuzzy inputs

se/s, July 7-12 1991 , preprints vol. "engineering" pp.81-88 [Palm 1992] Palm R. (1992). Sliding Mode Fuzzy Control, IEEE International Conference on FlIzzy Systems 1992, Fuzz-IEEE'f)2 - Proceedings San Diego March 8-12, pp.519-526 [Palm 19941 Palm R., Driankov D. (1991). Fuzzy Inputs. IEEE lniernat,jonai Confcrcl1Ce 011 Fuzzy Systems 1994, Fuzz-IEEE'94 - Proceedings, Orlando/Florida June 26-29

sgn(s) (28) [Pedrycz 1992] Pedryc7, \V. (1992). FllZ7,Y Control and Fuzzy Systems, 2nd revised edition, Research with the error e = y - Xd' The noise d has been proStudies PuLl. duced by using a pseudo random generator providing a. mixture of uniform distributions which are predefined [Slotine 198,5] Slotine J.E. (1985). The Robust Control of Hobot Yranipulators. The lntern . .!ourll. of on several intervals. By the wa.y of a mixture of st.ep Robotics Research (AHT) , \/01.1 No.2 pp.49-64 response and sinusoidal response of the syst.em to be cont.rolled we show how the input lnembership fun c[Tanaka 1992] Tanaka K., Sugeno M. (1992). Stability tion for the normali7,eo SN internally behaves (sce Fig. Analysis and Design of Fuzzy Control Systems. 5). In this example we observe the largest asymmetrie" Fuzzy Sets and Systems 45, North-Holland, pp. in the starting phase and at the turning points of the 135-156 desired curve. [Yager 1994J Yagcr R.R., D.P. Filev (199'1) . Modeling Fuzz.y Logic Controllers Having Noisy Inputs. References IEEE in tern a.ti on al Conference on Fuzzy Systems, Fuzz-IEEE'94 - Proceedings, Orlando/Florida [Driankov 1996] D. Driankov , H. Hellendoorn , and M. June 1702-1707. Reinfrank (1996), An Introduction to FIl7,ZY Con[Zimmermann 1991] Zimmermann H. (1991). Fu'lzy trol, Springer Verlag, Berlin, second edition. Set Theory and its Applications. Kluver Aca[Kawaji 1991) S.Kawaji, N. Matsunaga: Fuzzy Contro l demic Publishers. Boston: Dortrecht. London. of VSS Type and its Robu~tness. IFSA'91 BrusUj

U

-[(fuzz'

8624

Copyright 1999 IFAC

ISBN: 0 08 043248 4