0% found this document useful (0 votes)
19 views6 pages

Fuzzy Logic in Pid Gain Scheduling

The document presents a method for using fuzzy logic in the gain scheduling of PID controllers to enhance control over nonlinear systems. It describes how fuzzy logic can be employed to tune PID parameters based on different operating points, thereby addressing the limitations of traditional PID and fuzzy controllers. The proposed approach combines off-line tuning with on-line adjustments, utilizing fuzzy rules based on plant output and reference signals to improve performance in varying conditions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

Fuzzy Logic in Pid Gain Scheduling

The document presents a method for using fuzzy logic in the gain scheduling of PID controllers to enhance control over nonlinear systems. It describes how fuzzy logic can be employed to tune PID parameters based on different operating points, thereby addressing the limitations of traditional PID and fuzzy controllers. The proposed approach combines off-line tuning with on-line adjustments, utilizing fuzzy rules based on plant output and reference signals to improve performance in varying conditions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/265060015

FUZZY LOGIC IN PID GAIN SCHEDULING

Article

CITATIONS READS

27 148

2 authors, including:

Heikki Koivo
Aalto University
44 PUBLICATIONS 640 CITATIONS

SEE PROFILE

All content following this page was uploaded by Heikki Koivo on 12 May 2015.

The user has requested enhancement of the downloaded file.


1 of 5

FUZZY LOGIC IN PID GAIN SCHEDULING

Pauli Viljamaa and Heikki N. Koivo


Control Engineering Laboratory, Tampere University of Technology
P.O. Box 692, FIN - 33101 Tampere, Finland
Fax +358 31 316 2340, e-mail: [email protected]

Keywords: gain scheduling, fuzzy logic, nonlinear control

Abstract: An approach, where fuzzy logic is used in gain scheduling of PID controller, is proposed. The PID controller
is tuned at a number of operating points with IMC tuning rules based on a simple linear model. The tunings and the oper-
ating points are collected to a fuzzy rule base. The plant output and the reference signal are used as scheduling variables
by the fuzzy logic. The proposed controller structure is used to control a very nonlinear simulation model.

1 Introduction
The most widely used controller in industrial applications is PID-controller (proportional-integral-derivative). It is easy
to tune and it has good disturbance attenuation properties. A disadvantage of the PID controller is that it is linear and can
not successfully control a plant, which has strong nonlinearities.
In fuzzy logic (FL) control [1], [2], PD-type and PI-type FL controllers are the best-known counterparts of the PID con-
troller. They are used to achieve better performance with nonlinear processes. Good experiences have been obtained espe-
cially with the PD-type FL controllers in servo applications [3], [4]. However, the standard FL controller, which has the
error and the change in the error as inputs and the control signal or its change as an output, can not react to changes in the
operating point. The FL controller needs more information to compensate nonlinearities when the operation conditions
change. When the number of the fuzzy logic inputs is increased, the dimension of the rule base increases too. Thus, the
maintenance of the rule base is more time-consuming. An other disadvantage of the FL controllers is the lack of system-
atic, effective and useful design methods, which can use a priori knowledge of the plant dynamics.
Deficiencies of the PID controller and the FL controller can be solved by combining them together. Fuzzy logic can be
used to tune the PID controller on-line if the response of the closed loop system is not acceptable [5]. In this approach, the
fuzzy logic can change the controller parameters even if the dynamics is not changed. This is not desirable.
In this paper, fuzzy logic is used to schedule off-line tuned parameters based on the system operating point. This is
closer to the conventional gain scheduling [6] than the method proposed in [5]. The fuzzy reasoning is based on the plant
output, the reference signal and a table of the off-line tuned PID parameters. Thus, the different dynamics of the system
can be taken into account in different operating conditions. However, the dimension of the rule base can be kept small,
which helps the maintenance.

2 Problem Statement
Consider a nonlinear, time-invariant, single-input single-output plant

x· (t) = f(x(t), u(t)) y(t) = g(x(t), u(t)) (1)


n
where u(t) is a control input and y(t) is an output of the plant at time t , and x(t) ∈ R is a state vector of dimension n .
The vector f and the scalar g are sufficiently smooth nonlinear functions of x(t) and u(t) .
0 0
The plant can be linearized at a steady-state operating point (u ,x ) to a linear state space presentation
0 0 0 0 0 0 0 0
x̃(t) = f x(x , u ) x̃(t) + f u(x , u ) ũ(t) ỹ(t) = g x(x , u ) x̃(t) + g u(x , u ) ũ(t) (2)
0 0 0 0 0
where x̃(t) , ũ(t) and ỹ(t) are small deviations from the linearization point x , u and y = g(x , u ) , and f x , f u , g x
and g u are partial derivatives.
When the nonlinearities of the plant are not very strong, the linear model of the plant is quite an accurate description of
the plant in whole operating area, and a linear controller design based on the model can successfully be used to control the
plant. When the linear model is defined at several different operating points, a model at an operating point can be chosen
as a nominal model of the plant, and an uncertainty of the nominal model can be defined based on the other models. Thus,
the linear controller can be designed based on the nominal model so that the uncertainty is taken into account to achieve
robustness of the feedback system [7]. The controller can even be a simple PID-controller for which many efficient design

Third European Congress on Fuzzy and Intelligent Technologies EUFIT’95,


Aachen, Germany, August 28−31, 1995. (accepted for public.)
2 of 5

methods are developed.


The nonlinearities of the plant can be so strong that acceptable performance of the feedback system can not be achieved
with any linear controller. A straightforward solution is to schedule the parameters of the linear controller which are tuned
at different operating points. The controller uses the parameters which are tuned at the nearest operating point of the cur-
rent operating point.
This gain scheduling can be implemented also by fuzzy logic. It has a natural, linguistic interpretation of the scheduling:
if the current operating point is near the upper area then use loose tuning. In this paper a fuzzy logic approach is studied.

3 IMC-Tuning of PID-Controller
In internal model control (IMC) structure, the controller is designed to act as an inverse of the model of the plant [7].
An IMC filter is used to make the controller realizable. For some linear plants the result is the PID-controller,

U(s) = K P  1 + ------- + T D s E(s)


1
(3)
 TI s 

where K P , T I and T D are the proportional gain, integral time and derivative time, respectively, U(s) and E(s) are
Laplace transforms of the control signal and the error between the reference signal and the plant output.
Thus, the IMC approach can be used to tune PID-controller easily. For an second order transfer function model

2
kω n
Y(s) = ---------------------------------------- U(s) (4)
2 2
s + 2ζω n s + ω n

where k is the gain, ζ is the damping ratio, and ω n is the natural frequency, the IMC approach produces a PID-tuning

2ζ 2ζ 1
K P = ------------- T I = ------ T D = ------------- (5)
λkω n ωn 2ζω n

where λ is the tuning parameter which means the time constant of the closed loop system.
In this paper, a variation of the PID-controller proposed by Clarke [8] is used because of its better derivative part. The
controller is of the form

KP TD s
U(s) = K P  1 + ------- E(s) – ---------------------- Y(s)
1
(6)
Ts I
1 + aT D s

where a is the filtering constant at the interval (0,1) , and Y(s) is Laplace transform of the plant output. The implemen-
tation of the derivative part is more realistic than in (3). The low pass filter reduces the effect of the measurement noise,
and only the plant output, which is continuous, is differentiated.
The controller can be discretized with an approximation s ≈ ( 1 – d ) ⁄ h , where h is the sampling interval, and d is the
delay operator. Thus, the discretized controller is of the form

u PI(k) = u PI(k – 1) + K P  ∆e(k) + ----- e(k) , u min ≤ u PI(k) ≤ u max


h
 TI 
TD (7)
u D(k) = ------------------- ( au D(k – 1) – K P ∆y(k) )
h + aT D
u(k) = u PI(k) + u D(k), u min ≤ u(k) ≤ u max

where k is a sampling time, e(k) = r(k) – y(k) is the error signal, ∆e(k) = e(k) – e(k – 1) and ∆y(k) = y(k) – y(k – 1)
are the differences. The control signal is restricted to the interval [ u min, u max ] .

4 Gain Scheduling with Fuzzy Logic


Consider next the gain scheduling, where the table of the parameters is created off-line, beforehand, and the controller
changes its parameters on-line based on the current operating point and the table. The currently used parameters are func-
tions of the plant output and in this paper also a function of the reference signal, θ(y(k), r(k)) (Fig. 1). The reference signal
is included to get better response for big changes in the reference signal. Thus, the fuzzy logic uses tighter or looser tuning
based on the next operating point immediately after the setpoint change.
The fuzzy logic rule-base must include rules of the form
3 of 5

FL
1

θ(y(k), r(k)) 0.5

r(k)
u(k) y(k) 0
PID Plant r1 r2 r3 r

Grade of membership
1

0.5
Fig. 1. Gain scheduling with fuzzy logic. The reference signal is used as a
scheduling variable too. 0
y1 y2 y
Table 1 1
Rule base of an example fuzzy logic
rule 0.5
if r is about r 1 and y is about y 1 then θ is about p 1
0
if r is about r 1 and y is about y 2 then θ is about p 2 p1 p2 p3 p4 θ
if r is about r 2 and y is about y 1 then θ is about p 3
if r is about r 2 and y is about y 2 then θ is about p 1 Fig. 2. The form of membership functions. Trapezoids and triangles are
if r is about r 3 and y is about y 1 then θ is about p 3 used for inputs of the fuzzy logic and singletons for output of the fuzzy
logic.
if r is about r 3 and y is about y 2 then θ is about p 4

if r is medium and y is big then K P is small and T I is medium and T D is big.


Three two-dimensional rule tables can be used. Because the tuning of the parameters is based on the linear models of
the plant, and the model parameters are estimated at several separate operating points, the plant output will have the same
number of fuzzy sets as the number of the models. The membership functions can be triangles and trapezoids (Fig. 2), the
corner points of which are the operating points where the parameters of the models are estimated. The fuzzy sets and the
membership functions of the reference signal will be identical with the plant output. Singletons are used as membership
functions for the output of the fuzzy logic (Fig. 2).
The fuzzy logic used in this paper is parametrized so that the corner points of the membership functions is defined in a
vector and the content of the rules and the places of the singletons are defined in a matrix. For example, a fuzzy logic,
which has three fuzzy sets for the first input r and two fuzzy sets for the second input y with the rules described in Table
1, can be parametrized with

p 1 p3 p 3
pr = r 1 r 2 r3 py = y1 y2 Pθ = (8)
p 2 p1 p 4

The membership functions are then those displayed in Fig. 2.


The fuzzy reasoning is made in three steps, firstly fuzzification
µ r(k) = F(r(k), p r) µ y(k) = F(y(k), p y) (9)

where F(·, ·) is a fuzzifier, which computes values of all the membership functions and returns them in a column vector,
secondly relation
T
R(k) = µ y(k) µ r (k) (10)

which implements the fuzzy and-operation at the premise part of the rules with product [9], and thirdly defuzzification

n n n n n n
K P(k) = ∑ ∑ P Pi, j R i, j(k) T I( k ) = ∑ ∑ P Ii, j R i, j(k) T D(k) = ∑ ∑ PDi, j Ri, j(k) (11)
i = 1j = 1 i = 1j = 1 i = 1j = 1

which is realized by weighted sum. Here n is the number of the fuzzy sets for y and the matrices P P , P I and P D define
the rule base and the places of the singletons for K P , T I and T D (See P θ in (8)).
4 of 5

5 Tuning of the PID+FL Structure


For the unknown plant (1), the tuning of the controller first requires model identification. The number of the linear mod-
els needed depends on behavior of the nonlinearity of the plant. When the nonlinearity is unknown, the models can first
be estimated in the neighborhoods of the minimum and the maximum of the control signal, u min and u max , and then at
some points distributed uniformly in the interval [ u min, u max ] . The modelling is performed collecting input-output data
form the test and using some parameter estimation algorithm. In each test the mean value of the plant output is selected
as the operating point of the model and it is stored.
The parameters of the PID-controller are determined based on the models. If strong nonlinearities occur in the control
parameters, more models are estimated where required to obtain more accurate approximation of the controller parameters
with the fuzzy logic. Finally, the PID-controller is tuned n different operating points, defined with vector

py = y0 y0 … y0 (12)
1 2 n

in the ascending order and the tuning parameters written in the matrix form

K P1 K P2 … K Pn
Θ = T I1 T I2 … T In (13)
T D1 T D2 … T Dn

in the same order. The PID-controller can be tuned by IMC-tuning rules or by any other tuning method.
The corner points of the membership functions are p y for the plant output and p r = p y for the reference signal. The
content of the rules and the places of the singletons are
P P i, j = w y Θ 1, i + w r Θ 1, j P I i, j = w y Θ 2, i + w r Θ 2, j P D i, j = w y Θ 3, i + w r Θ 3, j (14)

where w y and w r are weights of the plant output and the reference signal. Values w y ≈ 0.9 and w r = 1 – w y can be used.

6 Simulation Example
A nonlinear plant of the form

x 2(t)
x· (t) = y(t) = x 1(t) (15)
– 0.25x 1(t) – 0.70x 2(t) + ( 4.75 – 4.50x 1(t) )u(t)
T
where x(t) = x 1(t) x 2(t) and 0 ≤ u(t) ≤ 1 , is used in simulations. The plant is stable, but its dynamics change dramat-
ically over the operation range, which can be easily seen from the open loop step responses. The plant can not be controlled
successfully by any single linear controller.
The PID parameters, which should be used at each operating point can be computed from the linearized model by (5),
but the plant (15) has been assumed to be unknown in the simulations. Thus, linear models of the plant are first determined.
The model parameters have been estimated from input-output data which has been sampled with sampling interval
h = 0.5 s. The control signal has been in neighborhood of 0.05, 0.25, 0.5, 0.75 and in addition in two auxiliary points in
0.0025 and 0.025. These correspond to the following corner points of membership functions

p r = p y = 0.05 0.33 0.50 0.86 0.95 0.97 (16)

which means that almost the whole varying interval of the plant output [ 0, 1 ] is covered.
The PID parameters tuned at these operating points are

0.0308 0.0427 0.0562 0.1622 0.3000 0.4173


Θ = 2.6848 1.9024 1.4710 0.5152 0.2893 0.2059 (17)
1.4275 1.4512 1.4459 1.4493 1.4253 1.2773
when λ = 5 . The places of the singletons are computed from (5) and (14), where w y = 0.85 and w r = 0.15 . The other
parameters used in the simulations are the filtering constant of Clarke’s PID a = 0.01 and sampling interval h = 0.5 .
5 of 5

y FL(t), —, y fixed(t), --, r(t), ·· y FL(t), —, y fixed(t), --, r(t), ··


1 1
0.75 0.75
0.5 0.5
0.25 0.25
0 0
0 50 100 150 200 250 300 0 20 40 60 80 100 120
u FL(t), —, u fixed(t), -- u FL(t), —, u fixed(t), --
1 1
0.75 0.75
0.5 0.5
0.25 0.25
0 0
0 50 100 150 200 250 300 0 20 40 60 80 100 120
t t

Fig. 3. Step responses of the closed loop systems, when the change in the Fig. 4. Step responses of the closed loop systems, when the change in the
reference signal is 0.1. Parameters of the fixed PID are KP = 0.0875 , reference signal is 0.5. Parameters of the fixed PID are K P = 0.0875 ,
T I = 0.9432 and T D = 1.4286 . ( λ = 5 , a = 0.01 , h = 0.5 ) T I = 0.9432 and T D = 1.4286 . ( λ = 5 , a = 0.01 , h = 0.5 )

In Fig. 3, the reference signal covers the whole operation range with small 0.1 steps with 30 s intervals. The response
of the closed loop system is compared with the response of the fixed parameter PID controller, which is tuned based on
0
the linear model at operation point y = 0.7 . The fixed parameter PID is too tight in the lower area and too loose in the
upper area, but the response of fuzzy logic scheduled PID is consistently good.
In the second simulation, the size of the step is increased to 0.5. Without the weight of the reference signal, an overshoot
would occur in the step from 1.0 to 0.5, but the response is good, when the weight is used as can be seen in Fig. 4. The
fuzzy logic produces tight control parameters near y = 1 . Without the weight w r , a big change in the reference signal
and the tight control parameters cause the control action changed to the area where looser control parameters should be
used. But, looser tuning is used just after the plant output has moved to that area and the overshoot can not be avoided.

7 Conclusion
An approach, where fuzzy logic is used in gain scheduling of the PID controller for nonlinear systems, has been pro-
posed. The PID controller is tuned off-line at different operating points with help of IMC tuning rules. Also other tuning
methods can be used. The tuning parameters and the operating points are written to a fuzzy logic rule base. The fuzzy logic
changes PID parameters as a function of the operating point during the control. The parameters are not only a function of
the plant output, but also the reference signal is taken into account. This causes that the fuzzy logic changes the parameters
immediately after a big change in the reference signal. The control is either looser or tighter based on the next operating
point. Thus, overshoots can be avoided. The method has been tested in simulations. A second order nonlinear model was
used in the simulations. The resulting performance was much better than the performance of the fixed parameter PID con-
troller.
The gain scheduling is useful, when the plant is strongly nonlinear but time-invariant. Thus, a simple linear controller
can used successfully. When the parameters of the plant do not change in the course of time, the time-consuming tuning
task is not needed to be repeated often. The gain scheduling can be presented in clear linguistic form by the fuzzy logic.
Different scheduling variables are easy to be taken into account with the fuzzy logic.

References
[1] C. C. Lee, “Fuzzy logic in control systems: Fuzzy logic controller—part II,” IEEE Trans. Syst. Man Cybern., vol. 20, no. 2, pp. 419−435, 1990.
[2] D. Driankov, H. Hellendoorn and M. Reinfrank, An Introduction to Fuzzy Control. New York: Springer-Verlag, 1993.
[3] J. Franssila and H. N. Koivo, “Fuzzy control of an industrial robot in transputer environment,” IEEE Int. Conf. on Industrial Electronics, Control,
Instrumentation and Automation, San Diego, 1992, pp. 624−629.
[4] A. Makkonen and H. N. Koivo, “Fuzzy control of a nonlinear servomotor model,” 3rd Int. Workshop on Advanced Motion Control, Berkley, CA,
USA, March 20−23, 1994. pp. 833−841.
[5] Z. Y. Zhao, M. Tomizuka and S. Isaka, “Fuzzy gain scheduling of PID controllers,” IEEE Trans. Syst. Man Cybern., vol. 23, no. 5, 1392−1398, 1993.
[6] K. J. Åström and B. Wittenmark, Adaptive Control. Reading MA: Addison-Wesley, 1989.
[7] M. Morari and E. Zafiriou, Robust Process Control. New Jersey: Prentice-Hall, 1989.
[8] D. Clarke, “Automatic tuning of PID regulators,” Expert Systems and Optimisation in Process Control, Technical Press, Aldershot, England, 1986.
[9] M. M. Gupta and J. Qi, “Theory of T-norms and fuzzy inference methods,” Fuzzy Sets and Systems, 40, 431−450, 1991.

View publication stats

You might also like