You are on page 1of 7

Fuzzy-PID Controllers vs.

Fuzzy-PI Controllers
M. Santos*, S. Dormido**, J. M. de la Cruz*
*Dpto. de Informtica y Automtica. Facultad de Fsicas. (UCM)
**Dpto. de Informtica y Automtica. Facultad de Ciencias. (UNED)
Ciudad Universitaria s/n. 28040-MADRID (Spain). FAX: (34)-1-3944687
e-mail: msantos@eucmax.sim.ucm.es

Abstract
The synthesis of a control system includes both the
controller selection and the adjustment of its parameters.
In some cases, the type of controller might be more
complex or more general, like PID instead PI or PD, to
improve the control system performance. In all cases, the
tuning problem must be satisfactorily solved. On the other
hand, Fuzzy Control has made possible the establishment
of intelligent control. However, Fuzzy Logic Controllers
(FLC) are only used in simple configurations and their
analytic knowledge is still poor. In this paper, a
quantitative and qualitative study of fuzzy controllers is
done for the most complete case of a Fuzzy-PID. The
FLC-PID analytic performance is summarized in terms of
its three input variables, which allows us to obtain initial
values for the FLC-PID scale factors in terms of the
classical PID parameters. This initial tuning has been
tested for several systems and a qualitative tuning has
also been established. The advantages of the derivative
term are also examined.

1. Introduction
The need for simple advanced control alternatives
especially arises in the Control Process area, where most
of the real processes are generally complex and difficult to
model [1]. The application of Fuzzy Logic to a wide range
of control applications has made possible the
establishment of intelligent control in these areas [4], [5].
Its appeal, from the Process Control Theory point of view,
lies in the fact that this technique provides a good support
for translating the heuristic knowledge of the skilled
operator, expressed in linguistic terms, into computer
algorithms. Fuzzy Control solves real problems,
previously not tackled due to their complexity or to lack
of information [9].
However, Fuzzy Logic Controllers (FLC) are usually
applied with poor analytic knowledge of their behavior

and only in simple configurations. In fact, they normally


perform like PI or PD.
FLC-PI controllers are quite simple, though they are
the most widely used in practice and provide similar
results to conventional controllers. But in some
applications it may be useful to employ more general
controllers, which make it easier to reach the system
specifications and improve their performance, though they
can be also more difficult to tune.
The complete study of fuzzy controllers should involve
all the terms of conventional controllers. The third control
action must be included so as to consider the FLC-PID
case. Though the derivative term is not commonly
included -neither in the conventional case-, this allows us
to complete the development of Fuzzy controllers in a
similar way that of the classical ones. It also makes it
possible to obtain certain conclusions about their stability
and specifications.
But the main problem in the synthesis of a control
system is not only the selection of a specific controller but
also the adjustment of its parameters, to verify certain
given specifications for the controlled process.
In this paper an analytic study of the FLC-PID is
carried out in section 2, which allows us to establish an
equivalence between the FLC-PID and a conventional
PID; thus a tuning method is proposed for these fuzzy
controllers and is then evaluated. The qualitative analysis
is done in section 3. The behavior of these controllers is
compared with the FLC-PI type in section 4 and some
general conclusions are summarized in the last section.

2. Analytic study of the FLC-PID controller


The aim of a controller is to reach or maintain a
process in a specific state, by monitoring a set of variables
and selecting the adequate control actions.
The Fuzzy-PID controller performs like its classical
homonym, but both the input variables and the control
action are given in linguistic terms. The analytic
development of fuzzy controllers allows us to explain the
influence of each tuning parameter on the system

response, as well as to compare them to the conventional


one to obtain general results.
The incorporation of the derivative term provides a
new control action to the controller. In the fuzzy case,
increasing the number of input variables causes a rise in
the dimension of the rule table and, therefore, in the
complexity of the system; this makes its implementation
more complicated and can make difficult its analytic
study. For this reason, a PI is usually employed instead of
a PID in most applications of fuzzy control.
Figure 1 shows the basic diagram of an incremental
Fuzzy-PID controller, where error e -the difference
between the process output y, and the reference signal r-,
the error change ce, and the second error derivative ac,
are the input FLC variables, and the increment of the
control action u is the FLC output. The parameters
chosen to tune the FLC are the scale factors GE, GR, GA
and GU, gains which weight the input and output
variables respectively.

GR.ce(t)

Up
Up
Uz
Un
CEp
Up
Uz
Un
Un
CEn
Table 1. Control rules of the FLC-PID controller

The membership functions are defined in trapezoidal


form but are symmetrical from their center, L. Therefore,
the control action can be approximated by linear piece
functions [8]. The final control action can be calculated by
different defuzzification algorithms; two of them are used
here: linear (L) and non-linear (Center of Area COA),
which are given by the following expressions, where Uk is
the conclusion value corresponding to each control label
(P, Z, N), Nu the number of control terms, pk the center of
the membership associated to the control label k ( Lu or
0), and Ei, CEj, Ak are the membership value of the input
variables.
Nu

###uL =

Uk. pk

= (Up - Un). Lu

(1)

k =1

Nu

GE

d/dt

d/dt

ce

###uCOA

GR

u GU du

Fuzzy
Inference

ac GA

Figure 1. Fuzzy-PID controller and tuning


parameters
The set of rules which describes the FLC-PID behavior
have three antecedents and one consequent:
Ri: if GE.e is Ei and GR.ce is CEj and GA.ac is Ak
then u is Ui
where GE.e is the linguistic variable error (e) weighted by
its gain GE, GR.ce is the scaled change of the error and
GA.ac is the weighted second derivative of the error. The
conclusion is equal to the increment control action u. In
order to simplify this analysis, two primary fuzzy sets are
assigned to each one of the three input variables,
corresponding to the labels P (positive) and N (negative);
therefore, there are up to 8 control rules. The control
output has three labels adding the linguistic term Z (zero).
The subscript could represent whichever one of the labels
associated to each variable (Ep, En, Uz, etc.). The rules
are shown in Table 1.
GE.e(t)
GA.ac(t)

Ep
Ap

En
An

Ap

An

Uk. pk
k =1
Nu

Uk

(Up Un). Lu
(Up + Uz + Un)

k =1

(2)
Up =
or(min(Ep,CEp,Ap),min(Ep,CEp,An),min(Ep,CEn,Ap))
Un =
or(min(En,CEp,An),min(En,CEn,Ap),min(En,CEn,An))
Uz =
or (min (Ep, CEn, An), min (En, CEp, Ap))
After each one of the 8 rules has been evaluated
applying the connective and as the minimum, and the
Lukasiewicz or, six different conclusions can be obtained
for each rule. Therefore, there will be 48 zones of linear
control. These zones are given by the different relations
between the sign and the absolute value of each input. The
controller output for these zones is given in terms of the
input variables, according to the defuzzification algorithm
employed, replacing the expression for the membership
functions in each equation. The control output u(t) by
any defuzzification method, with Ke, Kc and Ka being
some equivalent coefficients obtained for each zone (see
Appendix), is:
u(t) = [Ke.GE.e(t)+Kc.GR.ce(t)+Ka.GA.ac(t)]

(3)

An in-depth study of these functions has allowed us to


establish an equivalence in each linear control zone
between the parameters of a conventional PID controller
(Ki, Kp, Kd), which also weight the variables e, ce and ac,
and the FLC-PID output coefficients [6].

This analytic development depends on the starting


configuration of the rule table since there are other sets of
rules which also correctly describe the behavior of the
FLC, producing a smooth action or a stronger control

Therefore, if we have some starting values calculated


by any systematic procedure, it makes it easier to analyze
the FLC behavior, although those parameters may not be
the best ones.

2.1 Equivalence between FLC-PID and PID


parameters

Performance index: The validity of these FLC-PID tuning


parameters will be determined by inspecting the system
response in the temporal domain. Both, a qualitative
analysis of the output, and the evaluation of following
performance indexes [5] will be considered:
2
t
- I1: quadratic error
I1 = 0 e( t ) . dt

Although the equivalent parameters of the FLC are


different for each one of the zones where the control is
linear, their variation range is bounded, and it is possible
to establish the limits of this variation both in terms of the
PID parameters or the FLC-PID parameters as shown in
the following expressions [3], [7],:
Linear Defuzzification Method: The range of variation of
the gains of the FLC is:
2Ki/3 ### GE.GU ### 2Ki
0 ### GR.GU ### 2Kp
0 ### GA.GU ### 2Kd
Based on the analysis of the output behavior in each
different control zone, the initial FLC gains can be
approximated by setting them to the following values:
GR = 2Kp/GU
GE = Ki/GU
GA = 2Kd/GU
(4)
Non-Linear Defuzzification Method: The range of
variation of the gains of the FLC is:
8Ki/3 ### GE.GU ### 8Ki
0 ### GR.GU ### 8Kp
0 ### GA.GU ### 8Kd
Therefore, a good approach to the initial parameters of
the FLC-PID controller is:
GR = 4Kp/GU
GE = 5.3Ki/GU
GA = 8Kd/GU
(5)
Even though this approach has been developed for this
specific FLC-PID controller, in the following section, we
will prove that they are also valid for other different
controllers and processes.

2.2 Initial parameters evaluation


One of the main problems that arises in this type of
regulator is the lack of systematic procedures for tuning.
The selection of the initial parameters of the FLC is
usually carried out by trial and error, as we can read in the
literature about the tuning of Fuzzy-PI or Fuzzy-PD
controllers [2]. This is a tedious and time-consuming task,
which makes it difficult to establish general results and
notably increases the design time.

- I2: normalized overshoot

I2 =

ymax r

- I3: rise time

r
I3 = min t / y(t) = 90% r

- I4: settling time

I4=min t/y(t) [95%r, 105%r]

These initial parameters have been tested for several


systems. First of all, a typical 4 order system with
monotonous response has been used [6]. It reflects the
behavior of most industrial systems. After its process
model has been estimated, the PID parameters (Kp, Ti and
Td) are calculated by any classical tuning technique in
order to control the process with certain specifications; in
this case, with the Ziegler-Nichols method, they are:
Kp = 1.6541;

Ti = 3.7; Td = 0.925

With these parameters, the FLC-PID tuning parameters


are calculated by equations (4) or (5), according to the
defuzzification method (linear or non linear). These
values and the response characteristics are shown in
Table 2, with their index values.
Contro
PID
FLC nonlinear
FLC linear
ller
defuzzification defuzzification
GE = 0.0447
Gains Kp = 1.6541 GE = 0.237
Ti = 3.7
GR = 0.661
GR = 0.3308
Td = 0.925
GA = 0.612
GA = 0.3060
22.0533
20.9341
23.1875
I1
0.1227
0.4434
0.1916
I2
(tp = 5.7)
(tp = 4.4)
(tp = 8)
2.9
4.8
I3 (sec) 4
10.6
I4 (sec) 7.4
Table 2. Response characteristics with a
conventional PID and with a FLC-PID (* tp:
pick time).
In order to verify the validity of the initial parameter
formulas, the index values have been obtained for
different systems. Table 3 shows simulated results for
three plants.

1
System

e 0.4 s

( s + 1)( s + 2 )
s+1
( s + 1)
GE = 0.252
GE = 0.3723 GE = 0.3720
GR = 0.0875 GR = 0.6
GR = 0.5454
Gains
GA = 0.42
GA = 0.131
GA = 0.10
14.1656
5.9647
12.255
I1
0.2466
0.3840
1.5484
I2
(tp = 4.9)
(tp = 2)
(tp = 0.9)
1.2
0.6
I3 (sec.) 3
5
4.8
I4 (sec.) 9.7
Table 3. Evaluation of initial tuning
parameters for different systems
Although these gains depend on the estimated model,
we are not looking for the most accurate parameters but
some starting values from which one can obtain the
specifications in few steps by qualitative tuning.

3. Qualitative study of the FLC-PID


The FLC structure described in Figure 1 is the starting
point for analyzing the qualitative behavior of the
FLC-PID controller. The influence of each gain (input and
output scale factors) is considered for several systems.
This study allows us to produce some results that may be
used as a guide in the adjustment of fuzzy controller
parameters.
The fuzzy system consists of a plant whose transfer
function is known or for which a good model exists, and a
fuzzy incremental PID controller. The models represent
the more usual dynamics of industrial processes.
In order to study the variations of the response with the
FLC scale factors, some initial values must be assigned to
these parameters in a previous phase. They are then varied
and the behavior of the system is observed.
y(t) = F[GE, GR, GA, GU, e(t), u(t)]
The controller has become more general. The number
of primary terms of the variables has been increased to 3
labels for input and 7 labels for output: PG, PM, PP, Z,
NP, NM, NG where G, M and P are the modifiers of Big,
Medium and Small. The characterization of the
membership functions is defined by trapezoidal functions,
that have 0.5 degree of completeness over their
corresponding universes.
Although this makes the analytic study quite
complicated, the qualitative behavior can be analyzed in
order to improve the performance when the application
requires a more complex controller. The validity of the

initial parameters is also proved for new cases, previously


not contemplated in the mathematical study.
The rule base consists of 27 rules of three antecedents
and one consequent that describes the behavior of the
controller. As the number of rules has been increased, the
difference between the results obtained depending on the
different interpretation for the connectives becomes more
evident, since they are several rules which generate the
same output. This difference is accentuated with the
non-linear defuzzification method. The next simulations
are computed with the Lukasiewicz or function for greater
simplicity.

3.1 Influence of the scale factor variation


The general effects on the index response of varying
the scale factors or gains, which weigh both the input and
output variables, can be summarized as follows
(k = constant, ###: increment):
GE GR GA GU
k
k
###

###

###

###

Effects on the response


k
Faster, more oscillatory.
Improves the transient reducing
the stationary error and rise time;
increases the risk of instability
Faster; may reduce the overshoot
in a narrow range of values;
increases the quadratic error.
Makes the performance more
sensitive around the set-point
Low dependence of the overshoot
and quadratic error. Increases the
rise time,reduces the settling time
Faster rise time, shorter integral
squared error; increases the
overshoot and settling time. The
most destabilizing, significantly
influences convergence.

3.2 Influence of the derivative gain GA


We are going to show the specific influence of the gain
of the derivative term on the system response for a given
plant. This also makes it possible to prove the formulas of
the initial parameters. The initial value of GA is 0.0306
(by (4)). As we can see (Figure 2), it is very close to the
optimum value, according to the next graphs which show
the behavior of that system when this gain changes within
an interval between 0 and 3.

Response (GA = 0 - 0.3)


GA=0.05
GA=0.1

GA=0
GA=0.3
r

GA=0.2

time.10

Fig. 2.1. Quadratic error

Fig. 2.2. Overshoot


Reponse (GA: 0.3 - 3)

-1
x10

-1
x10

GA=0.7

GA=3
GA=1

GA=0.3

time.10

Fig. 2.3. Rise time

Fig. 2.4. Settling time

The indexes of the system response show a complex


performance. In general, they all are increasing functions
of GA from a value near to the optimum point 0.2. The
low dependence on the overshoot and the quadratic error
with this factor is remarkable, as opposed to the great
variation in the settling time. The response is hardly
oscillatory except for very low values of this gain, or for
values higher than 2, so the stability of the system is
improved. Therefore, low values of GA (but not so low
that this action would be canceled) give a response within
the most usual specifications, however as this gain
increases, the response becomes much slower.
Figure 3 shows the system response and the control
action for different acceleration gain values. The rest of
the variables gains are set to the initial values (4) and only
this scale factor is changed.
The graph of the system response has been divided in
two intervals to show its variation with more detail since
its behavior is different for those intervals. The control
graph has become unified. The gain values are:

Figure 3.1. Response variation with the scale


factor of the error acceleration
Control
G A=3
G A=0
G A=1

G A=0.4

time.10

Figure 3.2. Control variation with the scale factor


of the error acceleration
Therefore, this qualitative tuning could not only be
applied in a first step to get some adequate parameters,
but it also allows us to establish a finer adjustment of the
initial parameters obtained by other analytic methods.

GA = 0, 0.05, 0.1, 0.2, 0.3, 0.4, 0.7, 1, 2, 3.

4. FLC-PID vs. FLC-PI

The derivative term is seldom employed even in


classical control, mainly due to the fact that it increases
sensibility to noise and that many times, a PI is good
enough. Although most of the regulator structures
incorporate this action, it is quite usual for the plant
operators to inhibit this function. However, this third error
variable gives a new control action to the fuzzy controller:
the derivative action. This derivative term makes it
possible:
- to complete the fuzzy controllers analysis in a similar
way to the classical controllers and to establish some
relationships between their parameters.
- to improve stability, since the derivative term can be a
great help for stabilizing the control system, which
remains one of the main problems of FLC.
- to give more flexibility to the FLC, since it allows us to
expand the variation range of other controller scale
factors within certain margins, making it easier to
reach the response system specifications and
improving its behavior.
It is also possible to prove that, in control laws,
canceling the derivative action in control equations (by
setting their coefficient GA = 0) does not produce a result
like a PI, since the relationship between the inputs and the
output is strongly non linear in spite of the fact that the
rule table of the FLC-PID may be practically reduced to
that of FLC-PI by removing the acceleration variable.
Response
FLC-PID

FLC-PI

Control

FLC-PID
FLC-PI

time.10

Figure 4.- Response of Fuzzy-PI and Fuzzy-PID


(with GA = 0) controllers
This result can be checked in Figure 4, where a
comparison is made between the system response with a
Fuzzy-PI, and that with a Fuzzy-PID controller with quite
similar rules except in the acceleration term, and where
the derivative action gain has been canceled.

5. Conclusions

The complete study of the fuzzy controllers should


involve all the terms that characterize the conventional
ones.
The addition of the derivative term makes it possible to
show the non-linear characteristic of the fuzzy controller,
as well as to enlarge the variation range of the other input
variables by means of their gains so as to improve the
controller behavior.
Analytic tuning formulas for Fuzzy-PID controllers
have been obtained. Therefore, initial parameters for these
controllers have been proposed for the different
defuzzification methods, and their validity has been
evaluated by simulation examples with satisfactory results.
On the other hand, the qualitative study of these
FLC-PID has helped to produce some rules for a finer
adjustment by means of the effects of these parameters on
the system response.
However, the subject of the design and tuning of
general fuzzy controllers is a problem that remains open.

Acknowledgments
This work has been partially supported by the Spanish
CICYT under project TAP94-0832-C02-01.

References
[1] K.J. Astrm, C.C. Hang, P. Person, W. K. Ho: Towards
intelligent PID control. Automatica 28, 1, 1-9, 1992.
[2] M. Braae, D.A. Rutherford: Selection of parameters for a
fuzzy logic controller. Fuzzy Sets Syst. 2, 3, 185-199, 1979.
[3] S. Dormido, M. Santos, A. P. de Madrid, F. Morilla:
Autosintona de controladores borrosos utilizando tcnicas
clsicas basadas en reguladores PID. Proc. of III FLAT,
Espaa, 1993, pp. 217-225.
[4] C.C. Lee, Fuzzy Logic in control systems: Fuzzy Logic
Controller - Part I, IEEE Trans. Syst. Man. Cybern., vol.
20, n.2, pp. 404-418, 1990.
[5] W. Pedrycz: Fuzzy Control and Fuzzy Systems. Research
Studies Press, England, 1993.
[6] M. Santos: Contribucin a las tcnicas de sintona de los
controladores basados en la Lgica Borrosa. Ph.D.
Dissertation, Department of Computer Science, Universidad
Complutense de Madrid, Espaa, 1994.
[7] M. Santos, S. Dormido, J.M. de la Cruz, J.A. Lpez Orozco:
Tuning of fuzzy controllers: application of the Relay
Method. Proc. of EUROSIM95, pp. 1131-1136, Ed.
Elsevier, N-H, 1995.
[8] H. Ying, W. Siler, J. J. Buckley: Fuzzy control theory: a
nonlinear case. Automatica 26, 3, 513-520, 1990.
[9] D.E. Thomas, B. Armstrong-Hlouvry: Fuzzy Logic ControlA Taxonomy of Demonstrated Benefits, Proc. of IEEE,
Engineering Applications of Fuzzy Logic, vol. 83, no. 3, pp.
407-422, 1994.

Appendix
FLC-PID Control laws in the linear control zones
(Non-Linear Defuzzification Method)
###u(t)
0.5Lu[ GE . e( t ) + GR. ce( t )]
4 L 2 GR. ce( t ) GA. ac( t )

0.5Lu[ GE . e( t ) + GR. ce( t )]


4 L GE . e( t ) 2 GR. ce( t )
0.5Lu[ 3GE . e( t ) GR. ce( t )]
4 L 2 GE . e( t ) GR. ce( t )
0.5Lu[ 3GE . e( t ) GA. ac( t )]
4 L 2 GE . e( t ) GA. ac( t )
0.5Lu[ 3GEe + 2 GRce + GAac]
4 L 2GE . e GR. ce

Zones
GE|e(t)|###GA|ac(t)|###
GR|ce(t)|
sg(ce) = sg(ac)

GA|ac(t)|###GE|e(t)|###
GR|ce(t)|
sg(e) = sg(ce)
GA|ac(t)|###GR|ce(t)|###
GE|e(t)|
sg(e) = sg(ce)
GR|ce(t)|###GA|ac(t)|###
GE|e(t)|
sg(e) = sg(ac)
GA|ac(t)|###GR|ce(t)|###
GE|e(t)|
sg(e) ### sg(ce)

0.5Lu[ 2GE . e + GR. ce + GA. ac] GA|ac(t)|###GE|e(t)|###


GR|ce(t)|
4 L GE . e 2 GR. ce
sg(e) ### sg(ce)
0.5Lu[ GE . e( t ) + GA. ac( t )]
4 L GE . e( t ) 2 GA. ac( t )

GR|ce(t)|###GE|e(t)|###
GA|ac(t)|
sg(e) = sg(ac)

0.5Lu[ 2GE . e + GE . ce + GA. ac] GE|e(t)|###GA|ac(t)|###


GR|ce(t)|
4 L 2 GE . e ( t ) 2 GA. ac( t )
sg(ce) ### sg(ac)
0.5Lu[ GE . e( t ) + GA. ac( t )]
4 L GR. ce( t ) 2 GA. ac( t )

GE|e(t)|###GR|ce(t)|###
GA|ac(t)|
sg(ce) = sg(ac)

0.5Lu[ 2 GE . e + GR. ce + GA. ac] GE|e(t)|###GR|ce(t)|###


GA|ac(t)|
4 L GR. ce( t ) 2 GA. ac( t )
sg(ce) ### sg(ac)
0.5Lu[ 2 GE . e + GR. ce + GA. ac] GR|ce(t)|###GE|e(t)|###
GA|ac(t)|
4 L GE . e( t ) 2 GA. ac( t )
sg(e) ### sg(ac)
0.5Lu[ 3GEe + GRce + 2 GAac]
4 L 2 GE . e( t ) GA. ac( t )

GR|ce(t)|###GA|ac(t)|###
GE|e(t)|
sg(e) ### sg(ac)

You might also like