ControlFag. Practice,Vol. 2, No. 1, pp. 14%153,1994
0967-0661/94 $6.00 + 0.00 © 1994 Pcrgamon Press lad
Printed in Cheat Britain. All rights reserved.
A FUZZY-PI CONTROL STRATEGY A. De Carll, P. Llguori and A. Marronl Department of Computers and Systems Sciences, Universityof Rome "La Sapienza", Via Eudassiana 18,1-00184 Roma, Italy
Abstract: Fuzzy logic is used to attain the on-line adaptation of the parameter values for a proportional and integral control strategy. The design procedure of the fuzzy logic algorithm is firstly shown. Subsequently it is applied to a simulated system representative of a realistic controlled plant. A set of validation tests conclude the paper. Keywor.ds: Fuzzy control, PID control, non-linear control, anti-windup controller, parameter optimization.
1 - INTRODUCTION A proportional, integral and derivative control strategy is the simplest way for implementing a feedback control system. It is widely used in industrial regulators but it can also be applied to servo-systems. The parameters of a PID control strategy can be defined in different ways. In this paper, the parameters are the values of the proportional, integral and derivative actions combined in parallel to determine the amplitude of the forcing variable to the plant. The tuning of the parameters can be carried out by systematic procedures only if a feasible model of the plant is available. Since this situation very rarely occurs, heuristic rules are used for a suitable tuning of the parameters. In general, their values should be adjusted to attain a satisfactory behaviour of the controlled plant. Human experience has a fundamental role in relating the parameter values to the peculiarities of the controlled plant and its operating conditions. Variations of the controller parameter during the plant operation can be realized by different approaches. The fuzzy logic approach offers the simplest way to relate the experience achieved directly on the operation of the controlled plant to a simple device which automatically adapts 147
the value of the controller parameters to the operating conditions of the controlled plant. If a conventional PID control strategy is implemented by a microprocessor device, the fuzzy logic algorithm can be programmed by the same microprocessor device without any additional circuitry. Dedicated hardware could simplify the fuzzy logic implementation and reduce the computing time. This paper presents the design procedure of a new fuzzy logic algorithm for the on-line continuous variations of the parameters. These span a prefixed range to avoid instability problems in the controlled plant. A satisfactory accuracy of the parameter adaptation is obtained by referring the fuzzy subsets to the normalized values of the variables involved in the fuzzy logic. The scaling factors are determined on-line by an appropriate procedure. This new approach allows the value of the parameters to vary on-line during the transients of the controlled plant. The most relevant improvements of the plant behaviour are in fact noticed in connection with a rapid variation of the reference or disturbance variable. The proposed fuzzy logic procedure has been applied to an anti-windup controller. The validation tests have been carried out not only for step variations of the disturbance and the reference variables but also for sinusoidal variations of the reference
148
A. De CarlletaL
variable. Preliminary tests confirm relevant improvements obtained in transient behaviour of the plant.
the the
Although many papers on the parameter tuning of a PID regulator and on the fuzzy logic controller are available, only some papers will be mentioned in the bibliography. Astrom and Hagglund (1988) analyse in detail the PID control strategies applied to regulators. Rundqwist (1990) focuses the analysis on the windup problems. Astrom et a l i i (1993) present different adaptive tuning methods. De Carli et alii (1993) and Tzafestas and Papanikolopoulos (1990) propose some fuzzy logic methods for the on-line tuning of PID regulators. Zheng (1992) relates the characteristic parameter of a fuzzy controller to the performance of the controlled plant. Kwok et a l i i (1990) and Mizumoto (1992) propose some fuzzy controllers. Li and Lau (1989) apply a fuzzy logic controller to a servomotor.
controller. The K1 and K2 coefficients are worked out by the fuzzy logic device and used to adapt the Kp and Ki parameters to the operating conditions of the controlled plant. The value of the Kw parameter is set to an appropriate value when the other coefficients are tuned and the controlled plant is operating.
r
-'7"
I
I
L° 'Cl FUZZY LOGIC DEVICE
Fig. I
The real advantage of the proposed control strategy is to design the fuzzy rules independently from the fuzzy sets because all the involved variables are normalized and the scale factors are on-line worked out. The fuzzy rules are therefore designed taking into consideration the controlled plant behaviour whereas the fuzzy sets are only related to the desired accuracy.
I
Block diagram of the controlled system and of the fuzzy-PI control strategy.
The fuzzy procedure to adapt the Kp and Ki parameter values starts from their nominal values, i.e. Kp* and Ki* , and assumes that their variations span in a limited range. The actual value of the fuzzy-PI controller parameters can be indicated as follows: Kp = K~ + AKp
The modality to attain the on-line adaptation of the parameter values to the operating conditions of the controlled plant is the innovative contribution proposed by this paper.
2 - ON-LINE ADAPTATION OF THE CONTROLLER
PARAMETERS
The new procedure for adapting the values of the parameters moves from the structure of the controller proposed by Astrom and Hagglund. In this controller, an additional loop is used to avoid the integral windup when the actuator saturates. The adaptation of the parameters values is carried out by a separate device by implementing a fuzzy logic algorithm. Figure 1 shows the structure of the fuzzy-PI controller and points out the parameters involved in the tuning. Kp, Ki and Kw are the parameters of a conventional anti-windup Pl
K i = K~ + AK i in which AKp and AKi variation of the parameters.
indicate
The actual value of AKp worked out in terms of:
and
the
AKi is
-the nominal values of the parameters, i.e. Kp* and Ki*; -the value of the K1 and K2 coefficients worked out by the fuzzy logic device; -the Cp and Ci coefficients that fix the min-max range of the parameters variation. For instance, Cp = 2 means that Kp should vary between .5 Kp* and 2 Kp*. The variation of the Kp AKp, is given by: AKp=KIK;C
p
CpCp AKp = KI K~ 1 +
parameter, if K I _>O
if K 1 < 0
i.e.
149
A Fuzzy-PIConerolStrategy whereas the variation of the Ki parameter, i. e. A K i , is given by: AK i
=K2K~Ci
AKi=K2K~
Ci l+Ci
if K 2 ~O if K 2 < 0
The advantage of the new adaptation procedure is more clearly seen by considering that in the new fuzzy-PI controller the integral action is given by:
o
f
tKi('~ ) e('~) d'c
in which the Ki(t) parameter varies in terms of the operating conditions of the controlled plant, whereas in the conventional tuning the integral action is given by: K]
e (x) d't 0
where the Ki* coefficient is held at the nominal value,
3-THE
FUZZY LOGIC PROCEDURE
The fuzzy logic procedure processes the actual values of the error and its time derivative to compute the value of the K1 and K2 coefficients.
scaling factor is updated only when the operating conditions of the controlled plant are close to the steady-state operation. This condition is detected in terms of the activated fuzzy rules. The scaling factor is updated only if the activated fuzzy rules correspond to the s t e a d y - s t a t e operation. The scaling factor should be higher than a suitably defined threshold value to avoid even slight amplitude oscillations. The scaling factor of the time derivative is worked out in terms of the rise-time of the controlled plant step response, being the controller parameters set to the nominal values. A prefixed coefficient links the scaling factor of the error derivative to the scaling factor of the error variable. The normalization of the error variable and its time derivative allows the number of fuzzy sets to be reduced without reducing the accuracy. Furthermore, in this way, the controlled plant becomes more sensitive to the control action when the error variable has a small amplitude. Since the fuzziness of the measured values is smaller than the fuzziness of the rules, the fuzzification of the input variables is carried out as a singleton centred on the measured value. The inference is realized by the min-max approach and the defuzzification by applying the centroid approach.
4 - VALIDATION TESTS
Once the sampled value of the error variable is available, the value of its time derivative is worked out by a suitable algorithm that filters the higher frequency components and that works out the time derivative referring to the bandwidth of the controlled plant. Afterwards, the scaling factor of the error variable is worked out in order to define the fuzzy subsets in terms of the normalized error variable.
The proposed procedure has been applied to some dynamic systems to test the validity. In this paper, the results are related to a dynamic system characterised by an energy storage. Its transfer function has the following structure:
The scaling factor for normalizing the error variable is obtained by processing a set of its sampled values stored in a FIFO device. The maximum of the absolute value is firstly deduced. This value is compared with the previously stored one. If the new maximum value is higher than the previously stored one, the maximum value is updated and assumed as the new scaling factor. Conversely, if it is lower, the
The input and output variables represent the energy introduced into the system and drawn from it. The feedback control should reduce the effects of the disturbances that perturb the energy storage and should allow variations of the stored energy according to a prefixed tracking. The optimality conditions in the controlled plant behaviour are related to a step variation of the reference variable and/or to a stepwise
G(s)
-
k s ( s + p)
150
A. De Carli et al.
disturbance applied to the controlled variable. The overshoot and the rise time of the c o n t r o l l e d system step response are used to q u a l i f y the control strategy. The target is to m i n i m i z e both these quantities, although these requirements cause a c o n f l i c t i n g s i t u a t i o n in the design of the control strategy.
A p r o p o r t i o n a l and integral control strategy s h o u l d be applied to obtain at least the tracking of a linear ramp. The design of the c o n t r o l l e r s h o u l d be carried out by taking into account that the size of the actuator influences the b e h a v i o u r of the controlled system very much. In fact, an undersized actuator saturates during practically the entire t i m e interval in which a transient operating condition occurs in the c o n t r o l l e d plant. Due to the saturation of the actuator, the s e t t l i n g time increases and a higher excursion of the controlled variable could occur if the integral action remains active for the entire time interval. An oversized actuator increases the cost of the c o n t r o l l e d system and applies a forcing variable that could stress the structure of the plant. The correct size of the actuator is therefore f u n d a m e n t a l in the behaviour of the c o n t r o l l e d plant and cannot be neglected in the design of the controller. For the a f o r e m e n t i o n e d reasons, an antiwindup PI control strategy is very much recommended. The tuning of the Kw coefficient depends on the size of the actuator and s h o u l d be carried out after tuning the proportional and integral parameters.
obtained by applying the fuzzy-PI controller. These i m p r o v e m e n t s are noticed on the waveforms of not only the controlled variable but also of the forcing variable; both variables are taken into consideration and compared with the same waveforms obtained by the c o n v e n t i o n a l PI controller. A step disturbance applied directly to the controlled variable, and a step and a s i n u s o i d a l variation of the reference variable have been considered. Their a m p l i t u d e and frequency have been fixed so as to give a realistic d y n a m i c s of the controlled plant.
From the p r e l i m i n a r y tests it was deduced that the Cp and Ci coefficients s h o u l d be set to value equal to 5 and that the scaling factor of the time derivative of the error can be assumed to be six times larger than the scaling factor of the error variable.
The error variable has been normalized between the - 1 and + 1 values; its time derivative between the - 6 and + 6 values. The normalized error variable has been subdivided into 10 fuzzy subsets, and its time derivative into 9 subsets, whereas the K1 and K2 coefficients are d i v i d e d into 7 subsets.
Figure 2 shows the subsets previously mentioned variables related membership f u n c t i o n s .
The n o m i n a l value of the parameters, i.e. Kp* and Ki*, has been set by applying the c o n v e n t i o n a l procedure which allows the widest b a n d w i d t h and the flattest Bode plot of the closed loop gain to be obtained. These n o m i n a l values result: Kp* = 2.7 and Ki* = 2.7 when the parameters of the transfer f u n c t i o n plant result: k = 6 and p
-1
-6
=6.
The p r e l i m i n a r y tests were carried out to determine the range of the Kp and Ki parameters in c o n n e c t i o n with the s t a b i l i t y region of the c o n t r o l l e d plant. At the same time the scaling factor of the time d e r i v a t i v e of the error variable was also determined.
The purpose of the subsequent tests is to show the i m p r o v e m e n t s which can be
- 1.3
of and
the the
l +1 NORMALIZED I~,ROR VARIABLE
t +6 NORMALlY-r) TIME DERIVATIVE OF THE ERROR VARIABLE
K 1 , K2 COEFFICIENTS
+ 1.3
Fig. 2 -Membership functions of the variables involved in the fuzzy logic. Figure 3 illustrates the tables of the rules. The shaded area indicates the fuzzy rules
151
A Fuzzy-PI Control Strategy c l o s e r to the steady state o p e r a t i o n of the c o n t r o l l e d p la nt .
action, T hi s figure can also show that the c o n t r o l l e d variable has a s a t i s f a c t o r y shape even when the a n t i - w i n d u p act i on is not activated•
e N X B N B NM NS NZ PZ PS PM PB PXB
de dt
PXB
NS
Z
NM NB NB PB PB
PB
PS
Z
PB
Z
Z
NS NM NM PB PB
PB
PS
Z
PM
Z
PM PS NM NS PB 'PB
PB
P$
Z
NS
Z
PS
PB
NM
Z
PS
PB
PB PB NS NMI PS PM
NB
Z
PS
PB
PB
NXB
z
Ps
1,s ~
Z
CONTROLLED VARIABLE WAVEFORM 1.4 1.2
m
.6
d
.4
Z
~
.2
Z 0
0
,.d •
K I
~ •
:'Z" .~5:.IgJi'lPM PM" Z
• | o
. . .
•
..
°°
PBINM NM NS
Z
Z
~
Z
Ns
m3 m ~ i N ~
0
1
2
3
4 t
5 (~)
t
(~)
COEFFICIENT FORCING VARIABLE WAVEFORM 3
e N X B N B NM NS NZ PZ
dt
m
2
0
PXB
NB bib NB NM
Z
PB
PB PB
Z
Z
PB
NB NB bib NS
Z
PB
P B PB
Z
Z
~
PM
NB NB NM
Z
PB
PBI PB
Z
Z
z
Ps
~
r~s z ..~.!:z::~i.~,r~_.___._
z
z
z
z
~
P..~!.::.zi.~izi.:.m., P.
P.
z
NS
Z
Z
PB :I~I~::PI~ ::~: : : ~
NS
NB
NM
Z
Z
PB
PB
PB
Z
NB
Z
Z
PB
PB
PB
Z
NS NB bib NB
NXB
Z
Z
PB
PB
PB
Z
NM NB N B
Z •
de
PS PM PB PXB
• . ,
•
.|
•
• i . ' .
Z
~ 0 ~
-1 -2 0
1
2
3
4
|
K 2
Z
NM NB NB
NB
COEFFICIENT
Fig. 4 - C o n t r o l l e d and forcing variables of the c o n v e n t i o n a l PI c o n t r o l l e r (thin line) and the fuzzy-PI controller (thick line).
Fig. 3 - Tables of the rules.
F i g u r e 4 shows the waveforms of the c o n t r o l l e d v a r i a b l e and the forcing variable when a step v a r i a t i o n o f the reference var iab le and a step d i s t u r b a n c e are applied• T h e i r a m p l i t u d e has been l i m i t e d to avoi d the s a t u r a t i o n of the actuator. F i g u r e 5 shows the v a r i a t i o n s o f the Kp and K i parameters in the same oper a t i ng conditions.
VARIATIONS OF Kp AND Ki PARAMETERS 16
I
12
1
Kp Ki
0 F i g u r e 6 shows the same w a ve f or m s when the a m p l i t u d e of the step v a r i a t i o n of the reference v a r i a b l e is increased in order to cause the a c t u a t o r to saturate. The Kw c o e f f i c i e n t has been set at .1 value. The c o m p a r i s o n is p o s s i b l e since different line s t y l e s r e p r e s e n t the w a ve f or m s related to the c o n v e n t i o n a l , the new c o n t r o l l e r and the new c o n t r o l l e r w i t h o u t a n t i - w i n d u p
1
2
3
,
I
4
5 t (sec)
Fig. 5 - Variations of the Kp (thin line) and Ki (thick line) parameters.
Figure 7 sinusoidal variable.
shows the t racki ng o f the vari at i on of the reference
152
A. De Care et al.
Z 0
A first validation of the fuzzy-PI controller is given by the waveforms illustrated in Figures 4, 6, and 7. The figures showing the forcing variable waveforms outline the very general necessity of improving the actuator dynamics when innovative control strategies are applied.
CONTROLLED VARIABLE STEP RESPONSE
u~
0 0
1
2
3
4
t (~c)
5 - CONCLUSIONS
FORCING VARIABLE STEP RESPONSE 15 ,.d m 10 <
~
s
~ Z
0
U -5 ,Q -10 0
1
2
3
4
5
t (sec) Fig. 6 - Controlled and forcing variables of the conventional PI controller (thin line), the fuzzy-PI controller (dashed line) and the fuzzy-PI controller without antiwindup action (thick line).
CONTROLLED SINUSOIDAL e~ <
When very large transient conditions are involved in the controlled plant operation, it could be more convenient to improve the PI control strategy rather than to work out complicated dynamic models which require sophisticated control strategies.
VARIABLE RESPONSE
1.5 1
e~
0
~,-.1 0 ~
-.5 -I
Z -1.5 O L)
1
2
3
4
5
6
The PI control strategy remains a very valid approach to implementing a feedback control system. It can be used both by users without a solid background in automatic control and by experts. Also, the quality of the results in the controlled plant can be very different and the fulfilment of the requirements could involve only the fundamental aspects in the performance of the feedback system or the more- sophisticated ones related to the optimization of the plant behaviour when its dynamic has large variations. The design of a PI control strategy could be therefore very simple or elaborate, depending on the quality of the requirement.
7 8 t (see)
FORCING VARIABLE SINUSOIDAL RESPONSE 1.5 I
o
The fuzzy-PI controllers are in accordance with the first trend. In fact, all efforts are primarily concentrated in the knowledge of the effects of the proportional and integral control actions on the plant dynamics. The application of linguistic rules is in fact simpler than sophisticated identification and optimization procedures. The implementation of fuzzy controllers is also less complicated than the implementation of optimization algorithms. The advantage of the fuzzy controller approach is therefore very obvious in industrial plants.
~ -.5 ~
-I
~ -1.5 0
1
2
3
4
5
6
7
8
t (sec) Fig. 7 - Controlled and forcing variables of the conventional PI controller (thin line) and the fuzzy-PI controller (thick line).
From a design point of view, fuzzy controllers offer the opportunity of research work devoted to the development of more convenient rules for adapting the controller parameters. From an applicability point of view, fuzzy controllers require that the end users update their technical background knowledge. This is probably the most
A Fuzzy-Pl Control Strategy
difficult aspect nowadays, since the advantages of the new controllers are not sufficiently understood. This is an important task that may affect the success of the trend in PI controller applications. The design of a fuzzy-PI controller requires much work for testing the controlled plant behaviour and for deducing the suitable set of fuzzy rules. This effort is justified when real advantages are obtainable in the behaviour of a large plant or when it can be applied in very diffused plants. In both cases the cost of the new control strategy design s h o u l d be highly covered by the i m p r o v e m e n t s obtainable by use of the new controller.
REFERENCES Astrom K.J., and Hagglund T. (1988) A u t o m a t i c tuning of PID controllers. I n s t r u m e n t Society of America. Astrom K.J., Hagglund T., Hang C.C. and Ho W.K. (1993). Automatic tuning and adaptation for PID controllers - A survey, Control Engineering Practice, vol. I, n. 4, pag. 699. De Carli A., Marroni A. and Liguori P. (1993). An improved fuzzy regulator. Proceedings of IEEE International Workshop on Neuro-Fuzzy Control , pag. 260, Muroran. Kwok P.D., Tam P., Li C.K. and Wang P. (1990). L i n g u i s t PID controllers, IFAC World Congress , vol. 7, pag. 192, Tailin. Li Y.F. and Lau C.C. (1989). Development of fuzzy algorithms for servosystems, IEEE Control Systems Magazine, vol.9, n. 3. M i z u m o t o M. (1992). Realization od PID controls by fuzzy control methods. IEEE International Conference on Fuzzy S y s t e m s , pag.709, San Diego. R u n d q w i s t L. (1990). Anti-reset windup for PID controllers. IFAC World Congress, vol. 8, pag. 146, Tallin. Tzafestas S. and P a p a n i k o l o p o u l o s N.P. (1990). Incremental fuzzy exper PID control, IEEE Transactions on Industrial Electronics, vol. 37, n. 5. Zheng L. (1992). A practical guide to tune of PI like fuzzy controllers, IEEE
international Conference on Systems, pag.633, San Diego.
153 Fuzzy
The paper contains some results of research work partially supported by the Italian Ministry of Universtty, and Scientific and Technological Research in 1993.