A Highly Nonlinear Fuzzy Control Algorithm for Servo Systems Positioning

A Highly Nonlinear Fuzzy Control Algorithm for Servo Systems Positioning

Copyright © IFAC Intelligent Components and Instruments for Control Applications. Malaga. Spain. 1992 A HIGHLY NONLINEAR FUZZY CONTROL ALGORITHM FOR ...

1MB Sizes 0 Downloads 62 Views

Copyright © IFAC Intelligent Components and Instruments for Control Applications. Malaga. Spain. 1992

A HIGHLY NONLINEAR FUZZY CONTROL ALGORITHM FOR SERVO SYSTEMS POSITIONING R. Herrero, J. Landaluze, C.F. Nicolas and R. Reyero Departmenl o/Control Engineering.lJurlan. P.O. Box 146. E·20500. Mondragon (Guipuzcoa). Spain

Abstract. This paper proposes to apply new fuzzy control techniques for servo systems positioning, in order to improve performance of traditional Proportional and Proportional-Derivative position controllers . The proposed knowledge base generates better highly nonlinear controllers compared with other recent results . The behaviour of this controller includes nonlinear actions that correct operation under a wide range of set points .

Keywords. Fuzzy control; nonlinear control systems; motor control ; d. c . motors.

In order to evaluate this controller, we have worked with an

INTRODUCTION.

unloaded DC motor, the model TI-2952 from Inland, and a 5,000 pulses per revolution encoder. The fuzzy control

During the last years many authors have been working to solve the problem of positioning in motion control by means of fuzzy

algorithms were implemented with an i486/33 based PC/AT.

control algorithms CLi, 1989; Agiiero, 1990). The main

Two ISA cards, an encoder input card and a D/ A output card,

objective of these works was to improve the performance of

were used to close the position loop as described in figure I .

the fuzzy positioning systems versus Proportional (P) and Proportional plus Derivative (PD) controllers. Most of these works just attain the performance of the best tuned PD controllers. In this paper, we propose the use of innovative fuzzy control techniques as a way of obtaining oustanding performances over conventional controllers. These algorithms suit the sampling

Fig. 1. Position cofltrolloop.

period to the time constant of the motor, and the number of fuzzy sets and relevant rules to the required system dynamics.

DESCRIPTION OF CONTROL ALGORITHMS.

OBJECTIVES AND SYSTEM DESCRIPTION.

Conventional Linear Controllers.

The objective of this paper is to suggest a set of fuzzy control rules after comparing four different positioning algorithms when testing its transient and frequency responses. Two

The control law that characterizes P and PD controllers is the

of

well known

these controllers are conventional P and PD, while the other two controllers belong to the set of fuzzy algorithms. The

u(k) =

knowledge base of the first fuzzy controller reproduces the

Kp

[e(k)

+ Xd

(I)

deCk»)

behaviour of an optimal PD controller. The knowledge base of where

the second fuzzy algorithm generates a highly nonlinear fuzzy

u(k)

is the dynamic velocity set point fed into the

motor at kth sampling period, the signal error

controller, whose performance is far better than the previous

e(k)

is the

difference between the desired position set point and actual

algorithms and will be the main objective of this paper.

position of the motor, and the change of error deCk) is deCk) e(k) - e(k-I) . In particular, when Xd

93

=

is zero we have a P-

type controller. As Cl) is a linear equation, the characteristic

J.lU(u)

= max [min( ui' J.lUi(u) )

I

(3)

l~i~N

surface of this controller is a plane (graphical representation of control signals u in relation to e and de) . This surface is

Depending on the way the ith rule obtains a better degree of

represented in figure 2, when using unity parameters as

occurrence, the inferred consequent V consequent

will be closer to the

Vi' This corresponds to the sup-min inference

procedure . The relation (3) can be expressed as = max [min (
I

I

(4)

~j~n

where n is the different number of fuzzy sets defined in the space V and
-,

The control output sent to different processes is the centre of gravity of the figure described by the membership function of the inferred fuzzy control signal V. The equation is

Fig. 2. PD characteristic surface.

Fuzzy Controllers .

(5)

A fuzzy set A of a universe of discourse X is characterized by a membership function

J.lA: X

-->

[0,1], which

associates with each element x of X a number in the interval [0,1] . As the membership function is not restricted to a discrete

Every procedure referred to before is described in the

set {O,I} as occurs with the classical set, the fuzzy sets offer

references (Agiiero, 1990; Pedrycz, 1989; Lee, 1990; Sugeno,

treatment of vagueness and qualitative concepts.

1985; Huang, 1990; Mizumoto, 1988).

Fuzzy controllers are performed with the objective of replacing

Similar to the PD controller, our fuzzy controllers will have as

the experience of a human operator, and are implemented by

inputs the position error e and the derivative position error

an algorithm programmed into a computer. The human

de, and as output the velocity set point u. Each variable will be

operator infers a control action of a universe of discourse V

changed by a scale factor GE, GDE and GV, which will be

in relation to data examined in previous universes, E and DE

the only adjustable controller parameters to be changed and

when there are two . His experience, which will have vague

tuned. Then, the fuzzy controller inputs will be eo = GE' eo·

concepts such as "big", "small", "around -2", etc ., could be

and de o = GDE ' de o • instead of the actual error (eo·) and derivative error (de 0·)' In the same way, the real control fed

summarized as a knowledge base. This is a set of N rules as

into the system will be u o • = GV · U o instead of the control U o inferred by the fuzzy controller.

IF e is El AND de is DEI THEN u is VI IF e is Ez AND de i.s DEz THEN u is V 2

signal

The spaces of errors and derivative errors are divided into

IF e is EN AND de is DEN THEN u is V N

eleven fuzzy sets, so we will obtain 121 rules . These sets contain notions such as "around -5", "around -4", etc. The

Ei and DEi are fuzzy sets defined in the object spaces E and

membership functions have a triangular distribution with

DE (antecedents), but Vi are fuzzy sets in the space image V

equidistant vertices, as is shown in figure 3 .

(consequents) . Every set includes vague notions as mentioned before . If we consider the objects

eo and de 0' our fuzzy algorithm

will get the degree of suitability for each rule as a minimum of the antecedents membership function, namely

Based on the observed antecedents or inputs, the fuzzy controller deduces a fuzzy consequent V whose membership funtion is

Fig. 3. Membership functions in E and DE spaces.

94

The overlapping between sets is the minimum the

stationary

error

suppression,

as

0,,"

is

.

that assures

described

in

Mizumoto(l988) . The control signal space will be divided into eleven fuzzy sets

-~

-4

- J

-2

-1

+0

+1

+2

+J

+4

+5

-5

-5

-5

-5

-5

-5

-5

-4

-J

-2

-1

+0

-4

-5

-5

-5

-5

-5

-4

-J

-2

-1

+0

+1

-]

-5

-5

-5

-5

-4

-)

-2

-1

+0

+1

+2

-2

-5

-5

-5

-4

-)

-2

-1

+0

+1

+2

+]

(see figure 4) .

A

~ ~ ~

d.

A A

-1

-5

-5

-4

-J

-2

-1

+0

+1

+2

+)

+4

+0

-5

-4

-)

-2

-1

+0

+1

+2

+)

+4

+5

+1

-4

-)

-2

-1

+0

+1

+2

+)

+4

+5

+5

+2

-)

-2

-1

+0

+1

+2

+)

+4

+5

+5

+5

+J

-2

-1

+0

+1

+2

+)

+4

+5

+5

+5

+5

+4

-1

+0

+1

+2

+)

+4

+5

+5

+5

+5

+5

+5

+0

+1

+2

+)

+4

+5

+5

+5

+5

+5

+5

TABLE 1 LFC Knowledge Base. o

~

-.

i

~

~

The inputs and outputs of this table must not be considered as parameters, on the contrary these values are linguistic labels "around -5", "around -4", etc. This knowledge base contains a

Fig. 4. Membership functions in V space.

linear distribution of roles. It means that if one of the inputs "increases" one fuzzy category (for example

e

increases

In this case, in order to simplify the defuzzyfying mechanism,

"around +2" to "around +3"), while the other one remains

the overlapping between sets become zero. The inferred fuzzy

constant (for example

control will have the shape shown in figure 5 .

increases one fuzzy category (from "around +3" to "around

de = "around + I") the output also

+4") . That is why the obtained controller behaviour looks like a PO controller. We will refer to this controller as "Linear Fuzzy Controller" (LFC) . This controller is not a linear one

n -

because the composition role sup-min is an intrinsic non linear process. The characteristic surface of this controller can be n

seen

\f\

-

in

figure

6,

when

using

unity

parameters

GE=GOE=GU= 1. As we expressed before, this surface is similar to a PO one, but shows saturations by the corners because we use a finite number of fuzzy sets .

Fig. 5. Inferred Control without overlapping.

The centre of gravity of this figure can be computed by means of the following analytical procedure

uo =

where

ui

(6)

is the centre of gravity of each isosceles

Fig. 6. LFC characteristic surface.

trapezium , whose value coincides with the central value of maximum membership , and Ai is the area of each trapezium. These areas can be computed as a function of their height ,

The second Icnowledge base is founded on the previous one,

which is the degree of likelihood (Xi that corresponds to the

but includes a certain amount of modifications based on

ui . Then, it is very easy to conclude that the

heuristic reasoning in order to improve transient response to a

control signal

final control law is:

step change in the motor set point. The controller obtained with this knowledge base will be highly nonlinear, and we will refer to it as "Nonlinear Fuzzy Controller" (NFC) . The (7)

mentioned modifications have as a main objective to reduce the derivative effect when the response starts or stops, so that we obtain a faster acceleration both when the response begins and

Two fuzzy controllers will be implemented, with two different

when the actual position of the motor is close to set point and

knowledge bases. The first knowledge base is described in

deceleration is neccessary . The NFC knowledge base is that

table I .

described in table 2 .

95

.

d. -5

-4

-)

-5

-5

-5

-5

-4

-5

-5

-)

-5

-5

-2

-5

-5

-1

-5

-4

-)

'0

-5

-,

'1

- )

-)

'2

-1

-1

.. +)

'5

1.2

-,

-1

+0

+1

'2

+)

+•

+5

-5

-5

-5

-5

-5

-5

-5

-5

-)

-)

-)

-2

-1

-1

-. -. -. -. -. -. -. -5

-2

-4

-)

-)

-)

-2

-2

-2

-1

+0

"

"

-2

-1

-1

·0

'1

'2

+)

+)

-)

-2

-1

+0

"

'2

.)

-2

-1

+0

"

"

·2

.)

'0

+1

+2

+2

'2

' 2

+1

'1

'2

.)

.)

.)

' 5

'5

'5

'5

.. ., .)

' 5

.)

'5

-)

. )

'5

., ., ., ., +)

'5

.

"i .

-------

~

i

P PD LFC NFC

'5 +,

+5

'5

+5

.2

'5

'5

' 5

'5

'5

' 5

'5

'5

06

.0'

.08 time

.,.

.1 . 12 (MCon
.1•

. 18

.2

TABLE 2 NFC Knowledge Base.

Fig. 8. Step responses.

The most important difference related to the LFC is the rule

We see that the P, PD and LFC controllers produce a similar

"IF

e

is "around + 5" AND

de

response , as were previously supposed. The NFC algorithm

is "around -5"", whose

output is now "around +5" instead of "around +0" . With this

has a faster response, as we intended on introducing as a new

procedure we ignore the derivative effect when response

heuristic behaviour of this controller. In this case, the rise time

begins. The rest of the NFC knowledge base is performed

is half the time obtained with conventional linear controllers

while smoothly changing the control signal between that rule

and the LFC. The stationary error is even smaller because of

and the central rule, " IF e is "around +0" AND de is "around

the Coulomb friction.

+0" THEN u is "around +0" ", in order to eliminate the stationary errors. The characteristic surface of the

NFC is

The excellence of the NFC can be tested looking at figure 9,

shown in figure 7, once more using unity parameters .

which also shows control signals .

P

PD LFC NFC

Fig. 7. NFC characteristic surface. Fig. 9. Control signals.

P, PD and LFC algorithms give small and smooth control

EXPERIMENTAL RESULTS

outputs. NFC, however, initially gives a larger control signal The four controllers were previously tuned in order to obtain a

in order to accelerate the motor. When the position is near to

critically damped response when changing position set points

the

in 1 radian . The optimal parameters obtained using a sampling

decelerating the motor . The effect as a whole is a faster

period of I millisecond are

response .

set

point,

the

control

signal

is sharply

modified,

P:

~=0 . 94 Xd=O

Gains and phases of the output signals were analyzed,

PD :

~=\.\O Xd=1.15

compared with sinusoidal inputs of I radian of amplitude . The

LFC :

GU =2 .00 GE= 1.10 GDE=6 .00

related Bode diagrams are those described in figure 10, which

GU=2.00 GE=2.40 GDE=20 .0

shows that the bandwidths obtained with fuzzy controllers are

!"he obtained transient responses are shown in figure 8.

algorithms (9 Hz.) . The phase losses are also improved using

NFC:

far better (15 Hz .) than those obtained with P and PD fuzzy control algorithms, because they reach half the losses of classical P and PD controllers inside the bandwidths of LFC and NFC controllers.

96

to be similar, every sampling period the variables

~

\\\

-. f--f-- ______ _

... -. t - - f---10

eo· and

de o • must be double those obtained when the set point was W sint ' If we want eo and de o to have the same value in both transient responses, in order to verify similar rules, it is

\.

• • • • • • •

obvious that the initial scale factors GEsint and GDE sint must be reduced by half. On the other hand, the control signals "0·

f--f-

fed into process must be double, that is why the scale factor GU must be double . A summary of the variations that must be

10

contained in the algorithm are those described by the equations (8), (9) and (10) . . ..........~ .. .

\

l' oI

I

-00

f--- ______ _

-100

I:-- • . . . . . .

-120

t--

...,

". \". ..

P

.

~~c +--4-+-H-++Kf--="~,,-* ..\·~\' NFC ..

(8)

GDE

(9)

(10)

GU

1 11 10 fnoq~

GE

(Hz)

We name

the obtained controller as

Controller

of Variable

Parameters"

"Nonlinear Fuzzy

(NFCVP).

As

was

mentioned before, when the process is linear and the initial conditions are zero, the behaviour of this controller is similar to different set points. If the system has no offset, the

Fig. 10. Bode plots.

frequency response of the system becomes independent of the sinusoidal input signal. Nevertheless, the frequency response

Two different characteristics are pointed out to show efficiency

of the system could be different to the original NFC because

and correct functioning of the NFC controller: the number of

the parameters change continuously with sinusoidal set points.

rules and selected sampling period . The number of rules must be big enough to introduce additional heuristic behaviours, and

The Bode diagram of the

to obtain the characteristic surface described in figure 7. The

NFCVP appears in figure

11,

compared with those of the NFC and LFC algorithms.

sampling period must be small enough to permit the controller

._-

to generate sharply controlled responses as described in figure

i\

. ..\ \\

9 . Several tests performed both by simulation and experiments

.,

carried out in the laboratory, tell us that the minimum appropriate sampling period is half the time for the NFC controllers than those used in classical P and PD controllers.

.5

:.

For instance, if T is the settling time of a critical damped

f-0

classical controller, a sampling period of T/80 will make a

le--

NFC controller to have a settling time ofTI2 or less.

- - - - -

,

\

NFCVP LFC NFC

-------

1 1 10

frequency (Hz)

MODIFIED NFC ALGORITHM: VARIABLE PARAMETERS CONTROLLER Nevertheless,

a

controller like

NFC

could have

some

disadvantages, such as offering different dynamic responses to different set points. The only condition in which the behaviour could be considered appropriate is near the set point in which the controller was tuned. Because of that, the Bode Diagram is frequency (Hz)

very much dependent on the amplitude of the sinusoidal input signal. That is because set points \W) different to the tuned set point rN sint) make different trajectories in the transformed

Fig. 11 . Bode plots.

phase space (we refer to the space eo - de 0 and not to the real space eo· - de 0-~

.

It means that the evaluated rules also

We can see that the NFCVP gain is similar to the

become different. Then, changing the initial scale factors

NFC,

whereas the phase is lightly worse than described by LFC. The

(GE sint ' GDE sint and GU sint) with the set point evolution, this problem could be avoided properly .

changes introduced into the original algorithm produce nearly the same dynamic effect, responses.

For example, let us consider a set point W double the one used in the tuning process. If we expect the transient response

97

and obtain similar frequency

CONCLUSIONS An optimal control of positioning in DC motors can be obtained using fuzzy control algorithms, and subsequently improves

performance

reached

with

classical

position

controllers. In order to reach these objectives we need a number of suitable rules, a minimum sampling period and, of course, and efficient knowledge base . The irregular behaviour of the controller in different set points, due to the fact that is nonlinear, can be solved by simply redefining scale factors, as this does not change frequency response significantly .

REFERENCES E. Agilero,E. and others (1990). "Estudio de la Aplicabilidad de Tecnicas de Control Difoso en la Optimizacion del Control de una Maquina Herramienta" . VIII Congreso

INVEMA. October, 1990. San Sebastian. Li,Y. F. and C. C. Lau (1989) . "Development of Fuzzy Algorithmsfor Servo Systems" . IEEE Control Systems

Magazine, pp. 65-71. Pedrycz, W . (1989) . "Fuzzy Control and Fuzzy Systems" . Research. Studies Press Ltd. Lee C. C. (1990). "Fuzzy Logic in Control Systems: Fuzzy

Logic Controller". IEEE Transactions on Systems,

Man. and Cybernetics, vo!. 20, no. 2, pp. 404-435 . Andersen,T. R. and S. B. Nielsen (1985) . "An Efficient Single Output Fuzzy Control Algorithm for Adaptive Applications". Automatica, vo!. 21, no . 5, pp. 539-545 .

Sugeno, M. (1985) . "An Introductory Survey of Fuzzy Control". Information Sciences, no . 36, pp. 59-83 .

Ying,H ., W. Siler and 1. 1. Buckley (1990). "Fuzzy Control Theory: A Nonlinear Case". Automatica, vo!. 26, no . 3,

pp. 513-520. Huang,L. 1. and M. Tomizuka (1990) . "A Self-Paced Fuzzy Tracking Controller for Two-Dimensional Motion Control" . IEEE Transactions on Systems. Man. and

Cybernetics, vo!. 20, no. 5, pp . 1115-1124. Garcia,M . C . (1991). "Inteligencia Artificial en el Control de Procesos: Controladores Borrosos". Mundo

Electronico, Feb. 1991, pp . 42-49 . Mizumoto,M. (1988). "Fuzzy Controls Under Various Fuzzy Reasoning Methods" . Information Sciences, no. 45, pp.

129-151.

98