The Fuzzy Logic Controller: An alternative design scheme?

The Fuzzy Logic Controller: An alternative design scheme?

F o r u m o n Fuzziness The Fuzzy Logic Controller: An Alternative Design Scheme? S. D a l e y and K.F. Gill Department of Mechanical Engineering, Un...

809KB Sizes 0 Downloads 31 Views

Recommend Documents

No documents
F o r u m o n Fuzziness

The Fuzzy Logic Controller: An Alternative Design Scheme? S. D a l e y and K.F. Gill Department of Mechanical Engineering, University of Leeds, Leeds LS2 9JT, U.K. A method is presented to improve system reliability in

Fuzzy Logic Controller applications. It is based upon a stability constraint formulated from Lyapunov's second method as applied to discrete systems. As the method requires a mathematical description of the plant, the performance of a Fuzzy Logic Controller is compared with a conventional design in the presence of considerable plant mismatch. This investigation is carried out on a flexible communications satellite and regions are identified in which the Fuzzy Logic Controller's performance is superior.

Stephen Daley was born in Morecambe, England in 1959. He received the B.Sc. degree in Mechanical Engineering from Preston Polytechnic in 1981. He is currently working on a Ph.D. thesis on fuzzy logic control within the Mechanical Engineering Department of the University of Leeds. His further research interests lie in the field of adaptive control.

1. Introduction The basic idea behind the introduction of a Fuzzy Logic Controller was to model the strategy of a human controller for ill-defined systems. In this study its application in more general terms is investigated in an attempt to observe any advantages it may possess over controllers designed in a conventional way. It is the opinion of the authors that any control scheme must be robust to be of practical use and hence must include an attempt at a stability analysis based on the plant knowledge available. Therefore it is an essential requirement that "safe" operating regions be identified for all the parameters used in a controller design. The impact on system performance of parameter variations was implied by Braae and Rutherford [10], illustrating the dominant role of the scaling factors that link the Fuzzy Logic Controller to the "real" world. A method is proposed in Section 4 for selecting these scaling factors based upon a stability constraint.

2. The Fuzzy Logic Controller K.F. Gill obtained his engineering training with a company manufacturing large steam turbine and alternating equipment for the electrical power supply industry. His academic training was gained at the University of Durham and the University of Birmingham. He was awarded the degrees of B.Sc. in 1955, M.Sc. in 1958 and Ph.D. in 1961. From 1961 Dr Gill was a Senior Scientific Officer at the Admiralty Weapons Establishment, Portland. For the last 21 years he has been a Lecturer, then Senior Lecturer at the University of Leeds, teaching control engineering and engineering dynamics to undergraduate students reading for an honours degree in Mechanical Engineering. North-Holland Computers in Industry 6 (1985) 3-14

The fuzzy control algorithm used (Appendix A) is written in general terms for a monotonic system with two measurements and one input, it is based upon those first suggested by Mamdani [1,2]. The foundation stones for these were laid by Zadeh [3-5], who offered a means of translating linguistically expressed imprecise statements into a clearly defined mathematical representation. The control algorithm is constructed by a series of fuzzy conditional statements of the form: If "A OR B is Big" AND " C is Small" then " D is Medium" linked by the connective OR (Else).

0166-3615/85/$03.30 © 1985 Elsevier Science Publishers B.V. (North-Holland)

4

Forum on Fuzziness

Computers in lndustrv

This translation is performed by making use of the following fuzzy set operations: (1) The Union of the fuzzy subsets A and B of the universe of discourse E is denoted by A U B, with a membership function defined by

value A' of A is known, then the corresponding value of B' can be obtained by making use of the compositional rule of inference

B'=A'oR=A'o(A×B).

~tAu s( e) = max[l~A( e ); I~s( e )] e ~ E. (The membership function ~tA(e ) ~ [0, 1] where e is a generic element of E and A is a fuzzy set, the value indicates to what extent e is an element of A) This corresponds to the connective " O R " . (2) The Intersection of the fuzzy subsets A and B is denoted A • B with a membership function defined by:

ttans(e)=rnin[PA(e); tLn(e)]e~ E. This corresponds to the connective " A N D " . (3) The Complement of a fuzzy subject A is denoted "A with a membership function defined by: #,A(e) = 1 - irA(e). This corresponds to the negation " N O T " . (4) A fuzzy Relation R from U = { x } to V = { y } is a fuzzy set on the cartesian product U x V characterised by a function of t~R(x, Y), by which each pair (x, y) is assigned a number in [0, 1] indicating to what extent the relation is true in (x, y). (5) In the case of binary fuzzy relation, (N.B. defined on n-ary fuzzy relation in the product space U 1 × U 2 × U3... × U") the Composition of two fuzzy relations A and B is denoted by B o A and is defined as a fuzzy relation in U × V whose membership function is related to those of A and B by:

IXS°A(X, y ) = m a x [ m i n ~t4(x, v); I~s(v, y ) ] . V

(N.B. A and B are relations from U = { x } to Q={v) and Q = { v } to V = { y } respectively.) It is now apparent how the fuzzy conditional statement can be translated. For example " I f A then B " is the relation R = A × B whose membership function is defined by:

t,.(., v)= =

v) v,

v.

If such a relation R is given and the subset

3. Theoretical Analysis and Parameter Selection The most conventional stability analysis was undertaken by Kickert and Mamdani [6]. The fuzzy logic algorithm can be considered as a multilevel relay and consequently non-linear control analytical techniques can be applied. The method of analysis chosen was that of the describing function. However, it is concluded that the procedure has a limited range of applicatiom A more general approach, they suggest, will be obtained by investigations of the underlying logical structure such as those carried out by Tong [7,8]. Since its introduction, a limited number of plants have been successfully controlled by a Fuzzy Logic Controller [9], but there has been little mentioned about the criteria used in parameter selection. As a consequence, Braae and Rutherford produced a paper discussing parameter selection and adjustment in detail [10]. The parameters they considered were:

(1) The fuzzy language - One problem is the choice of terms (e.g. PB-positive Big) to represent the variation of any linguistic variable {e.g. "Error"). They suggest that this should be a compromise between flexibility (high resolution) and simplicity l low resolution) typically between two and ten values. Each base variable has also to be assigned a number of discrete elements (e.g. - 7 --, + 7) to represent the actual value (the real range of which will be known based on a prior process knowledge). This number of elements should be sufficiently large to accommodate narrow fuzzy sets. bul kept low to reduce storage requirements. In any practical application, the measurements used as inputs of the Fuzzy Logic Controller will be noisy. So fuzzy sets should be selected to be sufficiently large to avoid undue noise transmission from the base variable to linguistic variable. The variable domains are chosen on a trial and observation basis until the closed loop trajectory fits just inside the domain.

Computers in Industry

(2) The set of linguistic rules - To examine the rules, Braae and Rutherford choose to track the system trajectory through the linguistic elements (e.g. PB) whose membership values are maximal at a sample instant. This is a point on the linguistic phase plane. In this way, the rules used during any run are explicitly defined and may be altered if desired. The major changes are obtained by altering the scale factors, done on a trial and observation basis until the trajectory converges on the equilibrium state. Minor adjustment is made by changing the linguistic elements of the appropriate rules. Thus selection of improved rules at each state relies heavily on an intuitive feel for the behaviour of the closed loop system. It will be noted that the success of any particular controller structure is heavily dependent upon the value of the scaling factors. It is, therefore, surprising that there has been only one attempt in the literature to identify a suitable parameter space in the choice of scaling factors. Procyk [11] defined two constraints to enable scale factor choice: (a) Error tolerance is the largest or smallest value in error that can be accommodated without initiating a rule modification in the adaptive controller (rules are modified when they lead to a bad response which is monitored by a performance index). Error Tol. = __+0.5 + G E where G E is the scaling factor on the error. (b) Change in error tolerance is the largest change in the direction of the origin that can be accommodated without initiating a rule modification.

S. Daley, K.F. Gill / Fuzz)' Logic Controller

restricted, as the tolerances are related to the set point magnitude. These statements have clearly been formulated from empirical data and thus give no indication of the system response or limitations of use.

4. Scale Factor Selection from Lyapunov's Second Method A more rigorous analytical selection procedure can be developed from use of Lyapunov's second method. This provides a means for determining the stability of a system without explicitly solving the state space, thus lifting the restriction noted by Kickert and Mamdani [6] that the linear parts of the system must be of second order when using a phase plane analysis.

4.1. Underlying Theory Consider Lyapunov's method as applied to discrete-time systems: A single input continuous plant of the form:

Jc = Ax + Bu

(1)

can be represented in discrete form as:

x((k+l)T}=A,x{kT}+B,u{kT}

(2)

where x is the state vector, u is the plant input, A 1 - e Ar, B a = A - l { e ' 4 v - I } B and T i s the sample time. Asymptotic stability is guaranteed if a positive definite discrete Lyapunov function, V { x ( k T ) } can be found such that the difference equation AV{ x ( k T ) ) / A t is negative definite.

AV{x(kT)) At

T

(3) nb. of principal interest is only the sign of

Change in Error Tol. = _+2.5 + GC

AT{ x( kT)}/zXt

where GC is the scaling factor on the change of error.

consider the quadratic form:

The values 0.5 and 2.5 are functions of the performance index. Procyk suggests that a suitable value for the error tolerance is 5% of the set-point, and for the change in error tolerance is 1 / 2 to 1/5 of the error tolerance. It is suggested also that the G U (scale factor on controller output) should be about one-third of the maximum possible process input. Although the final choice is still subjective, it is

5

V( x ( k V ) } =

xr(kT)ex(kT)

(4)

where P is a symmetric positive definite matrix (consequently V ( x ( k T ) } is a positive definite function). Substitution of Eqs. (4) and (2) in Eq. (3) yields:

AV{ x( k T ) } = xV( k T ) ( ArlPA I - P )x( k T ) +u2(kT)BTpB,

+2u(kr)

PA,x(kT)

(5)

6

Forum on Fuzziness

Computers in Industry

4.2. Application to a Fuzzy Logic Controller

It is apparent that the more negative AV{ x(kT)}, the more rapid the convergence to the equilibrium state. Consequently, it is desirable to obtain the value of u that causes AV{x(kT)} to be a minimum. Thus, equating a(AV)/Ou to zero: Umin ~

-[BrpAIx(kT)][BrPBI] -1

To enable use of the aforestated theory, a fuzzy logic controller must be modelled as a multilevel relay [6]. The relay is simply achieved by entering all the input states to the algorithm and observing the subsequent deterministic outputs (obtained from the output fuzzy set by choosing that output value at which the membership function is maximal). The result of this process for the controller structure of Appendix A is shown in Fig. 1. By the very nature of the multilevel relay, there are restrictions on the process input, u. In practice, also, there will be a restriction on the upper limit of u. thus the choice of GU is not entirely arbitrary. However, in choosing u in accordance with Eq. (6), no restriction has been assumed. Thus urn,n is related to the actual process input ' u ' by introducing the variable 'a'.

(6)

As 82(AV)/au 2= 2B(PB 1 (i.e. > 0), this is the minimum value. Substituting Eq. (6) into (5): AV( x ( k Z ) }man xT( k T )( ArlPA1 - P ) x( k T ) =

'

_

(7) which can be written as:

(8)

x ( k T ) ),.,n = - x T W x

where

u = Umi, +--a.

W= P - A ~ P A 1 + ATpB,( B~PB,)-XBTpA1

Substitution of equation (9) into (5):

is the stationary algebraic Riccatti equation.

AV{ x ( k T ) } = A V { x ( k T ) } m i , -+ a : B [ P B ,

. . . . . . . . .". .~. . .

(9)

,RIABLE I

X

X2 (R

,+6)

(+6,+6,-7) Fig. 1. The Fuzzy Logic Controller Modelled as a Multilevel Relay.

2

~

X~

(10)

Computers in IndustO,

S. Daley, K.F. Gill / Fuzzy Logic Controller

7

\x

CONTROL RULES

!

XZ

Xl

Fig. 2. The Structure of the Fuzzy Logic Controller.

This indicates that it is possible for AV( x(kT)} to become positive, so the value of ' a ' is critical. Therefore:

AV(x(kr)}mi" + a2B(PB1 < 0 or

{(BTpB])-lxTWx}I/2]>IV[

(11)

(The upper critical surface is shown in Fig. 3 when the controller of Appendix A and Fig. 2 is used on the satellite of Section 5.) Therefore, the multilevel relay must fall within these surfaces. Its position being governed by the value of the scaling factors (assuming GU is fixed by maximum input available) as

(14)

x = Gx*

Thus by substituting

a=

{(eCpB,)

_]xrW x } 1/2

(12)

into Eq. (9), two critical surfaces are obtained for process input which represent the boundaries between asymptotic stability and possible instability. u ,, ~- - ( BTpA,x)( BTpB1 1

-

)-1

xTwx}

1/2

.

(13)

(-a,-b,+e) Uc(fE,SCI

x = 2G where k = diag(x*)

X2(GC) {*a.÷b,-c)

XI(GE)

Fig. 3. The Upper Critical Surface for Input Torque U. [The typical form of the critical surface: a and b are functions of GE and GC respectively; c, d, and e are functions of both GE and

GC.]

where G = diag(1/Gl, 1/G2, 1/G 3.... l/G,,) and G, is the scaling factor on controller input xn, x* represents the discrete states of the fuzzy base variables discussed in Section 3. If eq. (14) is substituted into Eq. (13), it is clear that a parameter space can be identified for the scaling factors for which asymptotic stability is guaranteed. The ease at which this can be done will depend upon the number of inputs to the fuzzy algorithm. The most stable solution (considering the scaling factors to be the only variables) will occur when u = Umin for all states x*. This, of course, is unlikely to happen in practice, but the closest to it can be identified. The method presented below for doing this can be applied generally, but will require increasing amounts of computer time, as the number of inputs to the fuzzy algorithm increases. Let Umi. = Umlr, where Umlr is the value of the multilevel relay for a particular state x. Rewriting Eq. (14) as:

andGr=(1

1 G~ ) G 1 ' G 2 ....

Substituting in Eq. (6) yields Um,r = - (BrPB,) -'BrPA,2G

(15)

8

Forum on Fuzziness

Uonq~utepzs" in Indust(v

The solution to Eq. (15) is unlimited for any particular discrete state but if x k is the matrix constructed from the k th state considered and U~ the corresponding value of Umlr then the set of n simultaneous equations can be formed: G/1

Thus if each possible combination of states is solved simultaneously the average solution vector G will yield the smallest value of 'a'. Consequently the number of intersections of the multilevel relay and the critical surfaces will be miniraised. This procedure can be readily implemented on a digital computer and may also be applied to multi-input systems.

5. A Practical Application: Satellite Control

G.-'

0.00606

.

--

(,.509

Fig. 4. The Satellite Type (a) and Block Diagram (b).

The investigation is undertaken on a flexible satellite with uncoupled axes as analysed in [13],

Computers in Industry

S. Daley, K.F. Gill / Fuzzy Logic Controller

typically the Hawker Siddeley Dynamics vehicle OTS launched early in 1978. The governing dynamical equations are: t~ = 0.00604 ¢ + wza 0.076~" and y = 0 + 0.076a. =

(16)

Where w,2 = 4.509 rad 2 s -2, 0 is the centre body rotation due to rigid body motion, a is the centre body rotation due to flexural motion and y is the actual rotation. ~" is the input torque produced by reaction jets. The satellite type and block diagram is shown in Fig. 4. The system is to be controlled as in Fig. 2 with ~-= u. It is well known that modelling inaccuracies can cause anomalous behaviour in satellite control [17], therefore the main concern of this study is the controller response to parameter changes. To further test the robustness a mismatch condition is introduced by designing the controller based upon a rigid body model. It is assumed that y and ~ are available from on-board instruments.GU is chosen as 0.07 giving a maximum torque input of 0.49 Nm. A selection of 0.01 s for T guarantees good sampled-data reconstruction.

9

_ 1-00 I

2

~.~l'

\

,

/~",,

,

~_~_o 5o1_ l

,

~,

' TIME(SECS} ILO

FUZZY LOGIC

-1-00 t_

LO,OLJ p= 2o,o

oo

i I,,

,,,ME (SECS)

FUZZY LO6K

/*0 0 II

I

560 580 600

i

620

I,

6/*0 660

1

I

680 700

5.1. Scaling Factors for Rigid Body Motion Because of the mismatch condition the analysis is carried out on the "known" information of:

Fig. 5. The System Response with the Fuzzy Logic Controller, [Scaling factors: GE = 9 × 10 4, GC = 21 x 10 4, Initial displacement: 0.4 radians].

xT= [0, 0]

W is chosen as the unit matrix and the Riccatti equation is solved using the iterative techniques of Hewer [14] and Smith [15]. The Hewer algorithm is initialised using the method suggested by Armstrong and Rublein [16]. The solution matrix is:

p= [lOl.O [

0.5

0.5] 10.0

and the technique described in Section 4.1 yields the scaling factors

GE = 9 X 104 GC-- 21 × 104.

With these values the multilevel relay only intersects the critical surfaces close to the origin for the model available. This suggests a stable response until the origin is approached.

5.2. Comparison with a State Feedback Controller The system response to the scaling factors GE = 9 × 10 4 and GC = 21 × 10 4 and initial displacement of 0.4 radians is shown in Fig. 5. To enable performance comparisons to be made the fuzzy logic controller is compared with a controller based upon state feedback and Lyapunov's second method [12]. The controller is in the form

10

Forum on Fuzziness

Computers in Industry

1.00 STATE FEEDBACK 0.50

~=

\,

o.oo

I

2~'--/,0

t

I

60

80

.I

100

t 120

~TIME(SEES) 1t.O

F-0.50

However the fuzzy logic controller does converge to a greater pointing accuracy (note the state feedback convergence cannot be reduced by reducing the deadband). To further test the robustness of the controllers the system parameters are regarded as variables and the governing equations therefore become:

& + k2a = k3r

and -1,00

y = O + k3~.

F{

30.0

First the effect of increasing the magnitude of the solar arrays is investigated. As they are increased the system response to both controllers obviously becomes more sluggish, however, the pointing accuracy decreased more for the state feedback con-

STATE FEEDBACK

i

20'01-

×

L0:0~ 10.0

0400

TIME(SEES)

_ -10'0

0'050 C¢

-20.0

.-a ILl I--"

g

I

(30.0 ,

II+0

160

I,

I

I

180

200

220

i

I

2t,.O 260

I

0-000

I.--F--

m-~

I

,

iO 20 ~ ~ 0 0

,/U--i--"~T~ME(SEES) 120 1~0

280

Fig. 6. The System Response with the State Feedback Controller. [Feedback matrix K = [302.0, 1526.0]].

-.J

-0.050 FUZZ"/ LOGIC

L,q

-

0.100

of a relay with deadband, & ~'=

t 0 -t

q>6 Iql<6 q< -8

Where T is the controller output torque, t = 0.49 N m and the disturbance is given by q = -Kx. Using the approach described in the above reference and the values 0~c = 0.1, 8c = 0.9 the feedback matrix is calculated as: K = [302.0

1526.0].

The system response to this controller is shown in Fig. 6. Clearly both controllers cope well with the mismatch condition but the state feedback controller's transient convergence is superior.

o.o[ / 20.0 22(3

o.0

. I I

/

[

TIME (SEES)

_

FUZZY

Fig. 7. The System Response with the Fuzzy Logic Controller With an Increased Magnitude of Solar Arrays.

S. Daley, K.F Gill / Fuzzy Logic Controller

Computers in Industry

ll

0.100

6.00

STATEFEEDBACK 0.050 (:~

o.ooo I--

(=3

,'•-."x io

~

,

iA /'~ A

A. A

~TIME(SEES}

i"Io

STATEFEEDBACK

t,..00

-

2-00

~-

0.00

(SEES)

~_ -2.00 "3,

-o.oso

~<

-/..00

t~

-6.00

tP

-0.100

Fig. 8. The System Response with the State Feedback Controller With an Increased Magnitude of Solar Arrays.

Fig. 10. The System Response to a 100 Times Panel Thickness Reduction and a Reduction in Centre Body Size with the State Feedback Controller.

troller. Figs. 7 and 8 show the response to a tenfold increase in array surface area for which K 1 = 15.66 × 10 5, K2 = 0.268 and K 3 --- 3.75 × 10 2. It is apparent that the state feedback controller may violate the required pointing accuracy.

The greatest difference is observed when the solar array thickness is reduced dramatically. Figs. 9 and 10 show the responses to a 100 times panel thickness reduction and reduction in centre body size K 1=1.764, K 2 = 3 3 . 1 5 X 1 0 -4 and K 3= 4.358. The fuzzy logic controller is clearly superior but the system is far outside practical design considerations. When a reduction in array length is considered, which could occur in practice if the arrays were struck by debris, the responses improve similarly. It is interesting to note for this reduction the steady state error is of the same order for both controllers.

1.00F

-- 0'50L 0.001 ~

/~

/"%.t~ - - *

100 ,00 ,2 0- 300

-osoI

i

_ TIME (SEES)

s00

Fuzzy LOfilC

6. Discussion and Conclusion -1.00 L

80.0F

~

60.0~

20.0

IIII,,IAI IME

,ilvll llI l

(SEES)

g_,0.0,5.0 ;°°'°.6.0

,

7.0

FUZZY LOGIE I

B.O

9.0

!

10.0

Fig. 9. The System Response to a 100 Times Panel Thickness Reduction and a Reduction in Centre Body Size with the Fuzzy Logic Controller.

The contents of this paper were prompted in an effort to improve system reliability in fuzzy logic controller applications. Present approaches are based upon modelling the strategy of a human controller where a reliable mathematical description of the process is difficult to obtain. With this approach there are certain drawbacks: (a) It is implicitly assumed that significant changes do not occur during operation. (b) There is evidence to suggest that operators do not always report their control strategy reliably [18]. (c) The subjectivity in choosing certain control parameters and the necessity for their on-line tuning may result in extensive damage to the plant. Thus it is felt that some parameter space must be

12

Forum on Fuzziness

Computers in lndusto'

[7] R.M. Tong, Analysis of fuzzy control algorithms using the relation matrix. Int. J. Man-Machine Stud. 8 (1976) 679-686. [8] R.M. tong, Analysis and control of fuzzy systems using finite discrete relations. Int. J. Control 27 (1978) 431-440. [9] E.H. Mamdani, Advances in the linguistic synthesis of fuzzy controllers. Int. J, Man-Machine Stud. 8 (1976) 669-678. [10] M. Braae and D.A. Rutherford, Selection of parameters for a fuzzy logic controller. Fuzzv Sets and Systems 2 (1979) 185-199. [11] T.J. Procyk, A self-organizing controller for dynamic processes. Ph.D. thesis, University of London (1977). [12] E.H. Smith and K.F. Gill, Flexible space vehicle control based on state observation and l_,yapunov's method in Dynamics and control of non-rigid spacecraft, Proc. of E.S.A Symposium, Frascati, Italy, 24-26 May, 1976, pp. 213-220. [13] D.R. Smart, K.F. Gill, J.M. Gething and J.A. Holt~ Dynamic analysis of flexible space vehicles having uncoupled control axes. Aero. Journ. Royal Aero. Society 78 (1974) 560-569. [14] G.A. Hewer, An iterative technique for the computation of the steady state gain for the discrete optimal regulator. I,E.E.E. Trans. Automatic Control, AC-16 (1971) 382-282. [15] R.A. Smith, Matrix equation X A + B X = C . S.I.A.M. L Appl. Math. 16 (1968) 198-207. [16] E.S. Armstrong and G.T. Rublein, A stabilization algorithm for linear discrete constant systems. I.E.E.E. Trans. Automatic control, AC-21 (1978) 629-631. [17] P.W. Likins, Interactive problems between the dynamics and control system for non-rigid spacecraft, in Dynamics and control of non-rigid spacecraft. Proc. of E.S.A. Symposium, Frascati, Italy, 24-26 May, 1976. pp. 265--271. [18] L. Bainbridge, The process controller, in: W.TI Singleton (Ed,), The Analysis of Practical Skills, Vol. I, (1975).

identified whereby the controller can be used with relative confidence. It has been shown how this can be done using Lyapunov's second method to identify a stable choice of scaling factors regardless of the rest of the controller structure. Following this design procedure the performance of the controller is investigated under considerable plant variation and compared to a conventional design. It has been shown that some areas do exist where the Fuzzy Logic Controller performs better, although a more quantitative analysis would give a more complete picture. However for the plant investigated the wide variation in parameter size, required to obtain a significant difference in performance between the two controllers, is perhaps outside practical design considerations. References [1] E.H. Mamdani, Application of fuzzy algorithms for control of simple dynamic plant. Proc. I.E.E. 121 (12) (1974) 1585-1588, [2] E.H. Mamdani and S. Assilian, An experiment in Linguistic synthesis with a fuzzy logic controller. Int. J. ManMachine Stud. 7 (1975) 1-13. [3] L.A. Zadeh, Fuzzy sets, Inf. and Control 8 (1965) 338-353. [4] L.A. Zadeh, Fuzzy Algorithms. Inf. and Control 12 (1968) 94-102, [5] L.A. Zadeh, Outline of a new approach to the analysis of complex systems and decision processes. I.E.E.E. Trans. Syst. Man. and Cyb, SMC-3 (1973) 28-44. [6] W.LM. Kickert and E.H. Mamdani, Analysis of a fuzzy logic controller. Fuzzy Sets and Systems 1 (1978) 29-44.

Appendix A

The Fuzzy Control Algorithm The input to the controller is the state x 2 and the state x 1, the output from the controller is the input to the process u. xl is quantised into 13 points ranging from maximum negative state through zero state to maximum positive state. The zero state is further divided into negative zero state (NO-just below set point) andpositivezerostate(PO~ustabovethesetpoint).The ~zzy ~t~rxlisshownbelow: PB PM PS PO NO NS NM NB

-6 0 0 0 0 0 0 0.2 1.0

-5 0 0 0 0 0 0 0.7 0.8

-4 0 0 0 0 0 0.1 1.0 0.4

-3 0 0 0 0 0 0.5 0.7 0.1

-2 0 0 0 0 0.1 1.0 0.2 0

-1 0 0 0 0 0.6 0.8 0 0

-0 0 0 0 0 1.0 0.3 0 0

+0 0 0 0.3 1,0 0 0 0 0

1 0 0 0.8 0.6 0 0 0 0

2 0 0.2 1.0 0.1 0 0 0 0

3 0.1 0,7 0.5 0 0 0 0 0

4 0.4 1.0 0.1 0 0 0 0 0

5 0.8 0.7 0 0 0 0 0 0

6 1.0 0.2 0 0 0 0 0 0

S. Daley, K.F Gill / Fuzzy Logic Controller

Computers in Industry

13

x 2 is similarly q u a n t i s e d b u t there is no further division of the zero. The fuzzy set for x2 is shown below: PB PM PS NO NS NM NB

-6 0 0 0 0 0 0.2 1.0

-5 0 0 0 0 0 0.7 0.8

-4 0 0 0 0 0.2 1.0 0.4

-3 0 0 0 0 0.7 0.7 0.1

-2 0 0 0 0 1.0 0.2 0

-1 0 0 0 0.5 0.9 0 0

0 0 0 0 1.0 0 0 0

1 0 0 0.9 0.5 0 0 0

2 0 0.2 1.0 0 0 0 0

3 0.1 0.7 0.7 0 0 0 0

4 0.4 1.0 0.2 0 0 0 0

5 0.8 0.7 0 0 0 0 0

6 1.0 0.2 0 0 0 0 0

T h e process input u is q u a n t i s e d into 15 points. The fuzzy set i s s h o w n b e l o w : PB PM PS NO NS NM NB

-7 0 0 0 0 0 0 1.0

-6 0 0 0 0 0 0.2 0.8

-5 0 0 0 0 0 0.7 0.4

-4 0 0 0 0 0.1 1.0 0.1

-3 0 0 0 0 0.4 0.7 0

-2 0 0 0 0 0.8 0.2 0

-1 0 0 0 0.2 1.0 0 0

The fuzzy sets listed in the p r e c e d i n g are subjective b u t logic applies constraints on the choice. T h e same can be said for the set of rules that follow which represent a desired transient trajectory of a lightly d a m p e d system. If x~ is NB then If x 2 is N O T (PS O R P M O R PB) u is PB ELSE If x~ is N B then if x 2 is PS u is P M ELSE If x~ is NB then if x 2 is ( P M O R PB) u is PS ELSE If x 1 is N M then if x 2 is (NB O R N M O R NS) u is PB ELSE If x 1 is N M then if x 2 is N O u is P M ELSE If x l is N M then if x 2 is PS u is PS

0 0 0 0.4 1.0 0.4 0 0

1 0 0 1.0 0.2 0 0 0

2 0 0.2 0.8 0 0 0 0

3 0 0.7 0.4 0 0 0 0

4 0.1 1.0 0.1 0 0 0 0

5 0.4 0.7 0 0 0 0 0

ELSE If xa is N M then if x 2 is P M u is N O ELSE If X 1 is N M then if x z is PB u is N S ELSE If x 1 is N S then if x 2 is ( N B O R N M O R NS) u is P M ELSE If x I is N S then if x 2 is N O u is N O ELSE If x~ is N S then if x 2 is PS u is N S ELSE If x 1 is N S then if x 2 is P M u 1s N M ELSE If x~ is N S then if x 2 is PB u is N B

6 0.8 0.2 0 0 0 0 0

7 1.0 0 0 0 0 0 0

14

Forum on Fuzziness

Computers in Industry

ELSE

ELSE

If x 1 is P M t h e n if x 2 is N O u is N M

If x~ is N o t h e n if x 2 is A N Y u is N O ELSE

ELSE

I f x 1 is P M t h e n if x 2 is (PS O R P M O R PB) u is N B

If x 1 is P O t h e n if xz is A N Y u is N O ELSE

ELSE

If x I is PS t h e n if x 2 is N S u 1s N O

If x~ is P B t h e n if x 2 is N B u as N S ELSE

ELSE

If x I is PS t h e n if x 2 is N B u is PB

I f x 1 is PB t h e n if x2 is ( N M O R N S ) u is N M ELSE

ELSE

If x~ is PS t h e n if x 2 is N M /3 1s PS

If x I is PB t h e n if x 2 is N O T ( N M O R N S O R N B ) u is N B ELSE

ELSE

If x 1 is PS t h e n if x 2 is ( N S O R N O ) u is N O

I f x 1 is P M t h e n if x 2 is N B u is PS ELSE

ELSE

If x I is PS t h e n if x 2 is (PS O R P M ) u is N M

If x 1 is P M t h e n if x z is N M u is N O ELSE

ELSE I f x I is P M t h e n if x 2 is N S u is N S

If x z is PS t h e n if x 2 is PB u 1s N B