Fuzzy Controller for Generally Loaded DC Electric Motor

Fuzzy Controller for Generally Loaded DC Electric Motor

Copyright © IFAC Intelligent Components and Instruments for Control Applications, Malaga, Spain, 1992 FUZZY CONTROLLER FOR GENERALLY LOADED DC ELECTR...

1MB Sizes 1 Downloads 103 Views

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

FUZZY CONTROLLER FOR GENERALLY LOADED DC ELECTRIC MOTOR A. 80seolo*, C. Mangiavacchi**, F, Drius*** and M. Goiak*** *Zeltron SPA., V. Principe di Udine 114-30330 Camp%rmido, Italy **DEEJ. Department 0/ Electrical and Electronics Engineering and CompUler Science, University o/Trieste, V A. Valerio 10-34100 Triesle, Ilaly ***LASA Laboratory, DEE.I. University o/Triesle, Ilaly, VA. Valerio 10-34100 Triesle, Italy

Abstract. In the paper an application of the fuzzy logic to the control of an electric motor assigned to a generic activity, and therefore loaded in a unknouwn way, will be presented, pointing out with particular attention the tuning and optimization methods, based on neural networks. The developed controller, even if showing a particular interest in many applicative areas both industrial or not, will only represent an applicative example of the possibilities given by the proposed approach.

Keywords. Fuzzy Systems; Fuzzy Controller; Neural Network; Tuning.

In these circumstances it is obviously impossible to refer to the optimisation in terms of mathematics. A different operator would certainly use different options which would nevertheless lead to a similar global behaviour of the system. Different approaches are used to perform a time domain tuning of regulators. Beside the Ziegler-Nichols method based upon the stability limits of the system (Ziegler 1942_), the most known are those addressing the optimization of a performance index (Lopez 1967_) those based upon the pattern recognition (Kraus 1984) and those based upon the use of expert-systems (Litt 1991.). The latter include the fuzzy logic based expert control systems to which a growing interest is currently devoted both for speculation and application purposes (Mamdani 1974, 1984_)_ The fuzzy control systems can be basically divided in two main classes:

INTRODUCTION

This paper shows, by use of an applicative example, how a control system could be realized starting from simple considerations and aVOiding the need of an explicit identification of the process to be controlled. Such control system shall be able to tolerate large variations affecting the characteristics of the process under control, granting at the same time a global behaviour allowing many different applica tions. The possibility of developing a control system able to drive a general process to a defined dynamic behaviour, is strictly bound to the availability of dedicated procedures allowing to automatically tune the values of the controller parameters. More generally, such procedures shall show their capability to modify the regulator behaviour according to the characteristics of the process under control and how they evolve. G(s)

1

=K (1+ s Td + s Ti)

1)

(I)

Control systems in which the the fuzzy logic informs the realization of the regulator to the extent that this one is fully described by the fuzzy rules (Mamdani 1974, 1984_)_

2) Control systems in which the principles of the fuzzy logic inform the expert tuning of regulator parameters in accordance with the behaviour of the process under control (Litt 1991, Tzafestas 1990_)_

The PID controllers Eq.(I), are presently the most extensively used and their performances are generally reported to be satisfactory in many application fields. Nevertheless, when dealing with processes showing a time variant or a strongly non linear behaviour, the use of fixed structure and parameters regulators (like the PIDs) results in severe limitations. Particularly, the tuning of this type of regulator, aiming to reach the required time domain specifica tions in a closed loop, seems to ask the use of skills that could be regarded more as a sort of art than as a scientific activity. When different reasons don't allow the process under control to be modelled, the tuning process is performed by a skilled operator whose process knowledge is strong enough to optimize in a subjective form the control performances. The operator is not requested to know the theoretical ground on which the process is based, he is simply supposed to have a good experience on it and to intuitively perceive its behaviour.

This paper addresses a system belonging to the second class and will provide a description of a method whose use allows to improve the controller performances by means of an aided tuning procedure_

THE CONTROLLER

The controller we are introducing is a Fuzzy controller adapting the parameters of a generic PID regulator. This could be as well of fuzzy type, even if it could be looked as an adaptive control system working on error function and its derivative (Ying 1990_)_

99

oscillations that often could be generated under these conditions. : Subsystem 2

3)

Increasing the proportional term effect, its would be possible to reduce the leading time but the oscillations would increase. An example has been selected to support a clear and efficient description of the different sub-systems. It will be seen how, although related to a limiting application, this approach allows to discuss the method features avoiding to loose the needed character of total applicability of results. A speed regulator for a permanent magnet electrical motor has been selected. The motor will drive a time varying load and, under the above assumptions, the FS1 fuzzy controller will exclusively perform the control upon the integral action of the PlO. The FS1 controller input variables are the regulator input (set point - Sp) the process output (motor speed - Y) and an auxiliary Signal (V) . The FS1 internal variables are the error (Er), the error first derivative (dEr) and the V variable. V allows to monitor the existence of non-Iinearities potentially resulting, in the selected example, from the saturation of the power supply or from physical limits of the motor. In these circumstances V will be defined as:

RTd.OVd. OSCd

: Subsystem

- - --- - - --- - -- - -- -- - - - - -- -

-

----

- - - -

- - - - --

- -----

(2)

V=K-Ia Fig. 1 System Architeture.

where K is a constant and la the current value of the motor armature. In this case the FS1 controller provides only one output PI representing the weight of the integral action of the PID regulator. Three fuzzy sets N - Z - P have been defined for the values range of input variables, the abbreviation stand for negative, zero, positive. As well three fuzzy sets Z - PN PB have been defined for the values range of the output variables, the abbreviations stand for zero, positive normal,

The system architecture is shown in Fig. 1 where two different sub-systems can be recognised, the first properly devoted to the process con trol, the second to be used to optimize, when required, the performances of the first in stationary situations. A structure, very similar to those used for gain scheduling adaptive systems (Scattolini 1990), has been selected for the first sub-system, the real process controller. The aim is to reduce the complexity of the regulator granting at the same time satisfactory results in terms of global performances even for processes whose modelling would not be available or would result not affordable. The main difference between the controller we are introducing and a gain scheduling adaptive system is to be basically found in the mechanism driving the instantaneous selection of the control parameters. These, instead of being drawn from a given matrix, are supplied by a fuzzy system (FS1) built upon a set of rules deriving from the knowledge and intuitive perception of a generic skilled operator. The fuzzy system 1 IFS1) operates over the PlO parameters in order to minimize some of the inherent characteristics (overshoot, dumping and response time) of the error related to the system step response. The extended experience deriving from a reaction analysis of the generic process under the PID action performed by the regulator, could be used to define the rules for the parameters variation. The following heuristic consideration can be derived from the observation of the process behaviour :

positive big. The membership of fuzzy sets used in the fuzzy expert controller are shown in fig. 2.

N

~ ~

-I

N

- 10

'1z

1) When the overshoot is mainly caused by the integral term, a slight decrease of it, at the moment in which the system answer exceeds the set-point, can result in a significant reduction of the overshoot. On the other side, a slight increase during the leading edge can allow a reduction of the leading time.

0

1"N

P Er

0

0

10

P dEc. v

1"B 5

'PI

Fig.2 Input and Output Memebership Function of FS1

2) When the flatness of the step response is mainly caused by the derivative term, a slight increase of its value during the leading edge and the steady state could speed-up the system response and dampen the

The rules supporting FS1, deriving from the above declared criteria, are expressed in this example under the following form:

100

A key element to run a successful process, beside a proper system description and initial definition of fuzzy sets, is to select a sequence of examples able to fully represent the expected system behaviour. The required sequence could be originated in different ways, the most used methods are the following: a) the sequence is predefined by the expert b) the sequence is derived from dedicated laboratory experimentations c) the sequence is iteratively and heuristically derived from subsequent adjustments operated on to the plant. In the present example all the above methods will be used in different forms and times to automatically generate a sequence of examples. In respect of the former, this final sequence shall result in a global improvement of the system behaviour which would approach a given reference behaviour. The tuning procedures are usually performed as follows (see Fig. 1): the generic step response of the system is recorded together with the corresponding evolution of the auxiliary variable and PlO parameters. With reference to the above conditions, the global system performances are determined by evaluating at the same time how much far they are from the required performances set by the expert operator (OVd, DMPd, RTd). A sequence of weights is generated by the above information which infer into the FS2 together with those relating to the instantaneous error and to the aUxiliary variable. The new weights act upon the actual sequence of PlO parameters, by which the response under examination was originated, leading to the generation of the new sequence of examples allowing, in the expert opinion, the system to approach in a closer way the reference response. Next step in the tuning procedure is the determination of FS1 membership functions which allow to globally minimize the error on this new sequence. To this end FS1 is represented by use of a neural network whose inputs are the error, its derivative, and the auxiliary variable relating to the new examples sequence and whose output is the PlO parameters. The network representing FS1 is forced, during its learning procedure, performed by use of a modified back-propagation mechanism, to minimize the global error upon the examples sequence through a modification of input and output membership function . The new parameters enabling the optimization of the FS1 behaviour in respect to the given sequence, will be available at the end of the learning proced ure. A short description of the second sub-system composition is provided below.

TABLE 1 Rules of Fuzzy System 1 (FS1) Er

dEr

v

PI

N N P P

N P N P

PB PB

/ /

/ / / / / /

z

N P

N P

Z Z

z

/

z /

Z

Z PN PN

PN PB PB

The classical min-max inference mechanism suggested by Zadeh (Zadeh 1965.) is used and the defuzzify operations are based upon the determination of the center of gravity of the envelope of the output set. The fuzzy system FS1 is merely heuristic. It follows that, the process expert is supposed to find himself the input and output fuzzy sets. Many times, in spite of the soundness of its skills, the process operator reveals unable to transpose his experience in the correct definition of input and output membership functions, which is strictly needed to properly realize an expert control system. Because these reasons, the availability of controllers based upon a limited number of rules could be of greatest interest when dealing with system realization . Beside the quantity limitation, the rules shall be properly set and able to consistently cope with the phenomena involved in the process to be controlled. Controllers developed accordingly to the above reveal to be particularly suitable for integration in control systems whose HW platforms are base on general purposes microcontrollers. It follows the need to optimize and validate the system global behaviour using suitable criteria, i.e. minimizing the error over a known input-output sequence. These goals could be reached without changing the structure of the fuzzy model set by the expert through a global modification of the input and output fuzzy sets (Boscolo 1992.). This will be achieved by use of the second sub-system as indicated in Fig. 1 which will perform, when needed, a procedure of aided tuning for the above described controller. This second sub-system stay in an upper layer in respect to the controller which will be tuned through the minimization of a performance index (Le. the output standard deviation over an I/O sequence of known examples). The definition process of the FS1 parameters (new membership functions) is performed through the learning phase of expressly developed neural network. Interest is devoted to neural networks in this field because these structures are deemed able to autonomously "spot" even the rules informing the expert operator natural behaviour from which a given input-output sequence has been originated (Kosko 1992.). In this application the use of the neural network is aimed only to tune, for a defined sequence of examples, the parameters of a generic fuzzy system.

I/O Sequence Recorder

The main function of this block is to record, during a consistent interval of time, the patterns of input variables of the performances evaluator er, v, Sp) and the output variables (K, Ti, Td) of the FS1 fuzzy system controlling the PlO regulator. By this way the recorder is able to develop the actual I/O sequence on which the FS2 controller will operate.

Performances Eyaluator THE TUNING PROCESS

The existing litera ture provides differen t suggestions to evaluate the dynamic performances of a system (Maeda 1990.). In the above explained example, as well as in many applications, the overshoot level OV, the dumping DMP

The tuning process identifies the input and output membership functions able to find a global minimum in the output variance over a known sequence of input-output examples (Boscolo 1992.).

101

and the time response RT (expressed by the parameters shown in Fig. 3) have been deemed consistent enough to evaluate system performances.

To derive the rules describing FS2, criteria similar to those above explained have been used. These rules can be expressed as show in Table 2:

y

TABLE 2 Rules of Fuzzy System 2 (FS2)

El ....... . ... -

aRT N P P P

E3 Sp~---+------~--~~---=~--------

E2

/ / / / / / / / /

s

RT

E3-E2

OV= EI-Sp

DMP= El- E2

Fig. 3 Systems Performance Measurement

60V N N N N N N N P P P P P P

6DMP N N N N P P P N N N P P P

v

FCf

/

/

u

Z Z Z Z N P Z N P Z N P

Z N P

U U

E

I

u

/ / / / / / / / /

D D D U

u DB

u u

Fuzzy system 2

The new I/O sequence will result by multiplying the sequence of the PID actual parameters, (from which the last step response has been provided) by the corresponding factor defined by FS2.

The main function of the fuzzy system FS2 is to generate a new input-output sequence on which the tuning of FSl parameters will be performed. The FS2 system is based as well upon the above described criteria. The inputs of the Fuzzy system 2 can be divided in two classes: the first includes global parameters (see Fig. 3) while the second includes the errors and the aUxiliary variable. Peculiar global parameters are represented by the following differences that show how much the actual response is far from the required response expressed by the RTd, OVd, DMPd terms:

The neural network

The following paragraph illustrates the topology of the neural network expressly developed for the system. During the definition of its structure focus has been devoted in holding an explicite correspondance between the parameters defining the fuzzy input and output fuzzy sets of the system and the weights of the neural network. The global configuration of the resulting network is shown in Fig. 5 from which clearly appears how nodes performing the operations of sum, minimum, maximum and divisions have been used (Kosko 1992, Masuoka 1990.).

(3)

6RTk = RTd - RTk 60V k =OVd-OV k 6DMP k = DMPd - DMP k

(4)

(5)

In this example FS2 provides only one output which represents the weight to be used to transform the corresponding actual sequence of PID parameters (FSl output) into a new sequence to which a new tuning in teractions shall be applied. The Input and Output fuzzy sets of FS2 are show in Fig. 4.

Input Fi.1zzIfy N

Output Defuzzlfy

Er

~

N

-I -10

-1

P

0

'~

-1

P

DMP

r r rr

0.33

0.66

dEr

ov. RT 0 .1

0

PI

V

0

'I

v

Er

!O

N

Rules

1.2

I

\

B

Threshold

A

Functlons

T=4

B+A

B-A

FCT

Fig.4 Input and Output Memebership Function of FS2

Fig. 5 Neural Network Devoted to Tune FSl

102

w=_8_ B- A

The threshold functions, restricted to the first la yer of the network, cover a basic role into the realization of the input membership functions (these can be both saturation nonlinearities both sigmoids). The use of a threshold function alone allows to get decreasing and increasing type of membership functions, while two threshold functions shall be combined with a minimum operation when compound type membership functions are required. The rules are built using two minimum nodes (one each) allocated in the second layer. The output membership functions are realized using the maximum nodes (third layer) and are identified by two parameters: the area, corresponding to the fuzzy sets, and the center of gravity absdssa. The last two layers of the network are used to perform the defuzzify operation and to implement the calculation of the barycenter absdssa of the total envelope. The solution is reached by combining the output fuzzy sets following the min-max criteria. The definition of the neural network structure follows the calculation methodology which is used to derive in a fuzzy system the output value starting from the input values. Under this condition, the network structure reflects the structure of the fuzzy system that must be tuned (the FSl in the present application). A simple back-propagation algOrithm, properly modified to allow the use of nodes performing the minimum-maximum operations, is used in the learning phase of the network.

0.1

...... PlO

0.3

0,35

0,4

Tuned PlO Expen

PlO Exper1

Fig, 6 shows the typical patterns of t~e system step response with the motor driving the reference load and being controlled by the PID regulator tuned according to Ziegler Nichols or provided by a control system whose tuning was performed according only to the operator experience in which FSl operates only on the integral part leaving unchanged the original P & 0 values or being controlled by the regulator used in this application whose tuning was performed according the present suggested method after four interactions. Fig. 7 shows the step responses of the system whose tuning has been left unchanged under a load which has been consistently modified. The load changes have been a 300 % increase in the original inertia moment and a further friction effect, resulting in a constant term and in a term varying as square function of the motor speed. It clearly appears that, under the above conditions, the stability limits are nearly reached when the traditional PID regulator is used . The system here introduced, although not specifically tuned for this new load configuration, holds nevertheless an step response that is fully consistent with the needs of many real applications.

Motor Parameters

KF

0.25

Fig. 6 Step Response of the System With the Reference Load

The results arising from the application example are illustrated below. It must be noted that, to allow the method to be described as simply as posSible, only the weight of the PlO integral term has been modified . In spite of this limit, the resulting improvements reveal to be consistent even in presence of variations in the load driven by the motor. A reference system has been selected to evaluate how the process-regulator system behaves when changes occur in characteristics of the load driven by the motor. The system, whose parameters are shown below, is composed by a PlO regulator tuned according Ziegler-Nichols, by a motor and by a reference load .

La

0.2 Time (s)

OBTAINED RESULTS

Ra

0.15

=0.6W =6mH Nm =0.55 A

1,8,---------------------,

VMax = 110 V

1,6 1,4

Reference Load

1,2

~

-"'~..-="---_ _~_ _- , J - _

1 ................... .. ..;?

C

Nms B = 0.08-;;;d

-i

08 .................... .. .

C2 '

0,6

J =0.09 Kg m2

0,4

PIP Parameters

0,05

0,1

0,15

0,2

0,25

0,3

0,35

0,4

Time (s)

K = 30; Ti = 0.Q175 s Td = 0.004375 s

.... .. PlO

PlO &pen

Tuned PlO &pen

Fig. 7 Step Response of the System With Modified Load

103

REFERENCE Boscolo A.,Drius F. (1992). Computer aided tuning and validation of fuzzy system.

IEEE international conference on fuzzy system March 1992 San Diego. Kosko B. (1992).

Neural networks and fuzzy system. ed .Prentice Hall,New Jersey Kraus T.W., Myron T.J . (1984). Self tuning PID controller uses pattern recognition approach. Control Eng. June Litt J. (1991). An expert system to perform on line controller tuning. IEEE tran . Control System April LopezA.M., Miller J.A., Smith CL., Murrill P.W. (1967). Tuning controllers with error integral criteria. Instrumentation Technol. November Maeda M., Sato T., Mirakami S. (1990). Desing of the self tounig fuzzy controller.

Proceeding of the international conference on fuzzy logic and neural network June Mamdani E.H., Ortergaard J.J., Lembessis E. (1984). Use of fuzzy logic for implementation rule based control of industrial processes. Fuzzy set and decision analysis. Nort Holland New York Mamdani E.H. (1974). Applications of fu zzy algorithms for control of simple dynamics plant.

lEE proc N.21 Masuoka R., Watanabe N., Kawamura A., Owada Y., Asakawa K. (1990). Neurofuzzy system fuzzy inference using a structured neural network.

Proceeding of international confernce on fuzzy logic and neural networks Lsuka Japan July 1990 Scattolini R., Schiavoni N. (1990). Introduzione al controllo adattativo.

Automazione e Strumentazione October Tzafestas 5., Papanikolopoulos N.P. (1990). Incremental fuzzy expert PlO control. IEEE Trans. Indus. Electron. V.37 October Ying H., Siler W., BuckIey J.J. (1990). Fuzzy control theory: a nonlinear case. Automatica V.26 N3 Takagi T., Sugeno M. (1983). Derivation of fuzzy control rules from human operator' s control actions.

Proc. of IFAC Symp. on Fuzzy information,knowledge rapresentation and decision analysis Marseilles (France) Zadeh L.A. (1965). Fuzzy sets.

Inform . Contr . V .S Ziegler J.G., Nichols N .B. (1942). Optimun setting for automatic controllers.

Trans . A.S.M.E. V.64

104