Professional Documents
Culture Documents
Fuzzy PID Controller: Design, Performance Evaluation, and Stability Analysis
Fuzzy PID Controller: Design, Performance Evaluation, and Stability Analysis
www.elsevier.com/locate/ins
a
National Aeronautics and Space Administration, Johnson Space Center, Mail Code ER2,
Houston, TX 77058-3696, USA
b
Department of Electrical and Computer Engineering, University of Houston,
Houston, TX 77204-4793, USA
Received 8 November 1998; received in revised form 22 May 1999; accepted 29 October 1999
Abstract
This paper presents a design for a new fuzzy logic proportional-integral-derivative
(PID) controller. The main motivation for this design was to control some known
nonlinear systems, such as robotic manipulators, which violate the conventional as-
sumption of the linear PID controller. This controller is developed by rst describing the
discrete-time linear PID control law and then progressively deriving the steps necessary
to incorporate a fuzzy logic control mechanism into the modications of the PID
structure. The nal version of this new fuzzy PID controller is a computationally e-
cient analytic scheme suitable for implementation in a real-time closed-loop digital
control. Numerous computer simulations are included to demonstrate the eectiveness
of the controller for both linear and nonlinear systems. Finally, a brief analysis is
presented to prove that the controller has bounded-input/bounded-output (BIBO)
stability. 2000 Elsevier Science Inc. All rights reserved.
*
Corresponding author. Fax: +1-713-743-4444.
E-mail address: ogmen@uh.edu (H. Ogmen).
0020-0255/00/$ - see front matter 2000 Elsevier Science Inc. All rights reserved.
PII: S 0 0 2 0 - 0 2 5 5 ( 9 9 ) 0 0 1 2 7 - 9
250 J. Carvajal et al. / Information Sciences 123 (2000) 249270
1. Introduction
There are many systems, such as robotic manipulators, which have some
unique physical characteristics that are dicult to address mathematically. The
natural dynamics of a robotic manipulator are coupled nonlinear equations
subject to complicated friction and damping eects [4]. For example, the inertia
terms of a robot arm are functions of the conguration of each joint and are
coupled. The basic kinematic terms for revolute joints have coupled and
transcendental terms. The Coriolis and centrifugal acceleration terms produce
nonlinear velocity terms. Even the simplest Coulomb friction model is non-
linear and dicult to model mathematically. Moreover, the physical parame-
ters are time-varying as the components wear out or the sensors drift away
from their expected operating characteristics.
The main task of a controller is to nd a suitable set of commands that can
cause the system to smoothly reach the desired state with minimal deviations.
For many complex systems, the governing equations are coupled nonlinear
equations subject to various dampings. As such, the controlled system equa-
tions for the general case are complex, and, therefore, the controller must be
able to eectively incorporate nonlinear properties and unmodeled eects into
its basic design.
The most common industrial controllers are the proportional-integral-de-
rivative (PID) controllers [3]. They have well understood properties and mature
design methods. The classical PID control law provides the basis for the design
technique developed in this paper. Since the implementation of most modern
control systems is in a computer processor, the conventional PID control law
must be converted into a digital version in applications. The general continu-
ous-time PID controller has the expression
Z
_
utcmd KP et KI et dt KD et; 1:1
2 1 z1
s ; 1:3
T 1 z1
J. Carvajal et al. / Information Sciences 123 (2000) 249270 251
_
where T > 0 is the sampling period, and the substitution of Ez for sEs, to
produce
T 1 z1 _
U zcmd KP Ez KI Ez KD Ez: 1:4
2 1 z1
Eliminating the denominator yields
T _
U zcmd 1 z1 KP Ez1 z1 KI 1 z1 Ez KD Ez
2
1 z1 : 1:5
This equation can be converted back to the discrete-time domain using the
inverse z transformation to produce
T
unT cmd unT T cmd KP enT enT T KI enT
2
_
enT T KD enT
_
enT T ; 1:6
where n 0; 1; 2; . . . By rearranging terms, this equation can be expressed as
T T
unT cmd unT T cmd KP enT KI enT 2KI enT
2 2
T
KP enT T KI enT T
2
_
KD enT _
enT T : 1:7
Let
TKI
K~P KP ; 1:8
2
K~I KI T ; 1:9
so that Eq. (1.7) can be expressed as
unT cmd unT T cmd K~I enT K~P enT enT T
_
KD enT _
enT T : 1:10
This is the nal discrete controller equation to be used below. A special
fuzzy logic form of Eq. (1.10) will be developed later to yield a more powerful
and robust controller for various systems in which the plant is not actually
linear.
If a problem is not well understood and cannot be precisely described
mathematically, but has good general ``rules-of-thumb'' on how to control it, a
fuzzy logic controller often works well [9]. The design engineer rst determines
the membership functions and linguistic denitions to capture the desired
252 J. Carvajal et al. / Information Sciences 123 (2000) 249270
the problem, and is usually straightforward to design. However, the other two
components are not as so. A fuzzication unit is used to transform the nu-
merical input signal into some fuzzy values, while a defuzzication step is used
to transform the nal fuzzy value into an output signal from the controller.
These two processes require heuristic rules and membership functions to encode
the desired system response characteristics and controller dynamics. It is not
obvious what these fuzzy transformations should be based upon only some
basic understanding of the physical system. This is a signicant problem in the
design of various fuzzy controllers, and is the basic justication for the reason of
using the well-known PID controller as the underlying structure for our new
design. This is to be further discussed in Section 2.
Diering from the existing fuzzy PI [11], PD [7], PI + D [8], PD + I [6], and
(PI + D)2 [10], herewith we develop a full-scale fuzzy PID controller of the same
type, with its control performance evaluation and stability analysis given al-
together in the paper.
_
eD KD enT _
enT T 2:3
represent the tracking error, change in error, and change in error rate, re-
spectively. Eq. (1.10) is then written as
Ducmd eI eP eD ; 2:4
and the incremental control output is
Ducmd ucmd nT ucmd nT T : 2:5
The three error terms are comparable to the input signals shown in Fig. 1.
As presented in Fig. 2, the simplest input membership function used for eI ,
eP , and eD in the fuzzication process are the same, and have two straight lines
followed by constant hold when the values exceed some predetermined
threshold. The threshold parameter, L, is specied to dene the maximum and
minimum values for the fuzzication process. For example, for an input value
254 J. Carvajal et al. / Information Sciences 123 (2000) 249270
where i is the number of rules. For our controller design, this formula reduces
to
lR1 n` lR2 n lR7 p lR8 p`
Ducmd ;
lR1 lR2 lR3 lR6 lR7 lR8
2:7
where lR1 is the degree (membership value) from rule R1, and so on.
As there are three dierent input components in the control law corre-
sponding to the proportional, integral, and dierential terms, it is necessary to
view all the possible combinations as a cube with a limiting edge value of L.
Fig. 4 represents the three-dimensional cube with the boundaries drawn at the
value of L.
As shown in Fig. 5, the defuzzication rules will be constructed by dividing
the cube into 48 sectors with known characteristics (note that there are some
sectors on the back sides of the cube which cannot be seen from the front of the
gure). Fig. 6 shows a single sector of the fuzzy cube labeled Sector 1.
In Sector 1, the following boundaries can be seen:
0 6 eP 6 L; 2:8
256 J. Carvajal et al. / Information Sciences 123 (2000) 249270
0 6 eD 6 L; 2:9
0 6 eI 6 L: 2:10
Furthermore, the corresponding error relations are:
J. Carvajal et al. / Information Sciences 123 (2000) 249270 257
eD 6 eP ; 2:11
eD 6 eI ; 2:12
eI 6 eP : 2:13
By using Fig. 2 and the mathematical formulas for the straight lines that
dene the memberships functions, the individual membership functions can be
expressed as
eP L
eP n ; 2:14
2L
eI L
eI n ; 2:15
2L
eD L
eD n ; 2:16
2L
eP L
eP p ; 2:17
2L
eI L
eI p ; 2:18
2L
eD L
eD p : 2:19
2L
258 J. Carvajal et al. / Information Sciences 123 (2000) 249270
By examining the regions dened by Sector 1 from Fig. 6, along with Fig. 2,
it is clear that all the negative terms are less than 1/2 and all the positive terms
are greater than 1/2. The positive membership relationships can now be ex-
pressed as
1=2 6 eD p 6 eP p; 2:20
1=2 6 eD p 6 eI p; 2:21
1=2 6 eI p 6 eP p: 2:22
Furthermore, by observing that a larger negative number subtracted from L is
less than a smaller negative number subtracted from L, the negative relation-
ships can be stated as
1=2 P eD n P eP n; 2:23
1=2 P eD n P eI n; 2:24
1=2 P eI n P eP n: 2:25
It is now possible to evaluate Eq. (2.7) for a control output. By using the
minimum function for the fuzzy ``and'' (t-norm) operation, the result from
each rule is expressed in Table 1.
By summing the equations in the third column of Table 1 for the denomi-
nator and the fth column for the numerator, the incremental control formula
for Sector 1 is obtained as
L4eP 2eD
Ducmd : 2:26
38L 4eP 2eI
As the maximum value that the eI , eP or eD term can have is L, the limiting
value for this control action is L. This is what would be expected from the
fuzzication functions.
Table 1
The fuzzy PID control values for Sector 1
Rule Minimum Membership Output Numerator
of rule equation
(R1) eP n eP =2 L=2 L eP L=2 L2 =2
(R2) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R3) eI n eI =2 L=2 L=3 eI L=6 L2 =6
(R4) eI n eI =2 L=2 L=3 eI L=6 L2 =6
(R5) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R6) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R7) eD n eD =2 L=2 L=3 eD L=6 L2 =6
(R8) eD p eD =2 L=2 L eD L=2 L2 =2
J. Carvajal et al. / Information Sciences 123 (2000) 249270 259
Since this case was for Sector 1, the procedure needs to be repeated for all of
the cases similar to it. Altogether, there are eight cases out of 48 where the eP is
greater than either of the other two terms. Although similar, they are not quite
the same. Four more sectors are necessary to be discussed in detail, and the rest
can be omitted as they produce the same results as the others.
The next region to be analyzed is Sector 2. As seen in Fig. 7, the boundaries
are dened as
0 6 eP 6 L; 2:27
0 6 eD 6 L; 2:28
0 6 eI 6 L: 2:29
For Sector 2, the membership relationships are
0 6 eP n 6 eD n 6 eI n 6 1=2; 2:30
1=2 6 eI p 6 eD p 6 eP p 6 1: 2:31
By using these relationships, the result from each rule is expressed in Table 2.
By summing the formulas in the third column of Table 2 for the denomi-
nator and the fth column for the numerator, the control formula for Sector 2
is obtained as
L4eP 2eI
Ducmd : 2:32
38L 4eP 2eD
Table 2
The fuzzy PID control values for Sector 2
Rule Minimum Membership Output Numerator
of rule equation
(R1) eP n eP =2 L=2 L eP L=2 L2 =2
(R2) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R3) eD n eD =2 L=2 L=3 eD L=6 L2 =6
(R4) eI n eI =2 L=2 L=3 eI L=6 L2 =6
(R5) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R6) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R7) eD n eD =2 L=2 L=3 eD L=6 L2 =6
(R8) eI p eI =2 L=2 L eI L=2 L2 =2
The procedure will now be repeated for Sector 3. In this sector, the
boundaries and the membership relationships are dened as
0 6 eP 6 L; 2:33
0 6 eD 6 L; 2:34
L 6 eI 6 0; 2:35
0 6 eP n 6 eD n 6 eI p 6 1=2; 2:36
1=2 6 eI n 6 eD p 6 eP p 6 1: 2:37
By using these relationships, the result from each rule in Sector 3 is expressed in
Table 3.
For this sector, incremental control formula is obtained as
L4eP 2eI
Ducmd : 2:38
38L 4eP 2eD
Note that this is the same as Eq. (2.26) and a pattern is beginning to develop.
The procedure will now be repeated for Sector 4. In this sector, the
boundaries and membership relationships are dened as
0 6 eP 6 L; 2:39
0 6 eD 6 L; 2:40
L 6 eI 6 0; 2:41
0 6 eP n 6 eI p 6 eD n 6 1=2; 2:42
1=2 6 eD p 6 eI n 6 eP p 6 1: 2:43
J. Carvajal et al. / Information Sciences 123 (2000) 249270 261
Table 3
The fuzzy PID control values for Sector 3
Rule Minimum Membership Output Numerator
of rule equation
(R1) eP n eP =2 L=2 L eP L=2 L2 =2
(R2) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R3) eD n eD =2 L=2 L=3 eD L=6 L2 =6
(R4) eI n eI =2 L=2 L=3 eI L=6 L2 =6
(R5) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R6) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R7) eD n eD =2 L=2 L=3 eD L=6 L2 =6
(R8) eI p eI =2 L=2 L eI L=2 L2 =2
By using these relationships, the result from each rule in Sector 4 is expressed in
Table 4.
For this case, the control formula is obtained as
L4eP 4eI 2eI
Ducmd : 2:44
38L 4eP 2eI
Table 4
The fuzzy PID control values for Sector 4
Rule Minimum Membership Output Numerator
of rule equation
(R1) eP n eP =2 L=2 L eP L=2 L2 =2
(R2) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R3) eD n eD =2 L=2 L=3 eD L=6 L2 =6
(R4) eD p eD =2 L=2 L=3 eD L=6 L2 =6
(R5) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R6) eP n eP =2 L=2 L=3 eP L=6 L2 =6
(R7) eP p eI =2 L=2 L=3 eI L=6 L2 =6
(R8) eI p eI =2 L=2 L eI L=2 L2 =2
262 J. Carvajal et al. / Information Sciences 123 (2000) 249270
This new fuzzy PID controller is now examined for its ability to control
linear and nonlinear plants, and to evaluate its performance in comparison
with the corresponding conventional PID controller tuned by trial and error.
The rst system to be tested is a third-order linear system with a transfer
function
s1
H s : 3:1
s3 9s2 26s 24
This system can be converted into a statespace representation as
2 3 2 3
0 1 0 0
x_ 4 0 0 1 5x 4 0 5u; 3:2
24 26 9 1
y 1 1 0 x 3:3
and simulated using the MATLAB language.
J. Carvajal et al. / Information Sciences 123 (2000) 249270 263
KI KIc T ; 3:5
KD KDc =T 3:6
were employed to account for changes in the sampling time.
For this system, our best choice of continuous PID controller gains are 0.78
for the proportional term, 120 for the integral term, and 0.0002 for the de-
rivative term. The sampling time is 0.01 s and the desired setpoint value is 4:0.
Next, the fuzzy PID system is simulated using the same PID gains with a single
fuzzy controller gain of 4.5 and the threshold parameter L of 780 found by trial
and error. The rst plot shown in Fig. 8 presents the results from these two
simulations. As expected, both controllers produce excellent trajectories. To
investigate the robustness of the two controllers, the cases were redone with the
value for the integral gain is reduced by one tenth. This represents an imple-
mentation error in the hardware (Fig. 9). The fuzzy controller reached the
desired setpoint an order of magnitude faster than the linear controller, im-
plying that the fuzzy controller is more robust in terms of hitting the setpoint in
a reasonable amount of time.
Since the PID controller is known to perform well for regular lower-order
linear systems, an unstable third-order nonminimum phase system with a
transfer function of
s2 s 2
H s 3:7
s3 3s2 10s 24
was then examined. Simulated as before, our best choice of gains are 10.5 for
the proportional term, 20 000 for the integral term, and 0.0005 for the der-
rivative term. Since this is more sensitive to time changes, the time step is set at
T 0:001 s. The desired setpoint value is 10.0 and the threshold parameter L is
780. Fig. 10 presents the output from this simulation. As seen, the fuzzy PID
controller did produce a good trajectory. On the contrary, the conventional
linear controller could not produce reasonable results and is not presented in
the example.
Next, three nonlinear systems are simulated using trapezoidal integration.
These cases progress from simple functions to more complex ones, and the time
step is xed to be 0.1 s. For all the cases, the fuzzy PID controller does produce
good trajectories but no set of grains were found for the conventional PID
controllers which could track the setpoint, hence, no results are presented here.
The rst, and very simple nonlinear system is
_ 0:0001j yt j ut:
yt 3:8
For this equation, the desired setpoint value is 5:0 and the threshold pa-
rameter L 10. The best controller gains found by trial and error tuning are
0.7 for the proportional term, 1.3 for the integral term, and 0.01 for the der-
ivation term. Fig. 11 presents the output from this simulation.
Next, a nonlinear system is
p
_ yt j yt j ut:
yt 3:9
The desired setpoint value is 6.0 and the threshold parameter L 350. Using
trial and error tuning, the best controller gains for this simulation are 2 for the
proportional term, 5 for the integral term, and 0.0002 for the derivative term.
Fig. 12 presents the output from this simulation. Note how this system con-
verges to the set point in very few iterations, and it was quite easy to nd gain
combinations that worked to produce an acceptable response. For this ex-
ample, the system was surprisingly insensitive to a range of gain combinations.
The last and most complex nonlinear case investigated is
p
_ yt sin2
yt j yt j ut: 3:10
The desired setpoint value is 4.0 and the threshold parameter L 500. The best
choice of controller gains for this simulation are 1.8 for the proportional term,
1.8 for the integral term, and 0.008 for the derivative term. Fig. 13 presents the
output from this simulation. Unlike the previous cases, nding a set of gains
that worked for this case was not easy, and the fuzzy PID system required
careful tuning to get the solution presented here.
4. Stability analysis
Consider the nonlinear feedback system shown in Fig. 14. This system can
be expressed as
e1 u1 S2 e2 ; 4:1
e2 u2 S1 e1 ; 4:2
where the error terms are bounded, admissible, causal functions. This generally
requires that the innite integral of the function raised to some power is nite.
Suppose there exist constants L1 , L2 , M1 , and M2 , such that
kS1 e1 k 6 M1 L1 ke1 k; 4:3
e2 nT unT ; 4:8
u1 nT rnT ; 4:9
u2 unT T ; 4:10
S2 e2 N e2 nT : 4:12
The controller equations are examined next. First, by examining the equa-
tions for Sector 1, with the condition of 0 6 eD 6 eI 6 eP 6 L, Eq. (4.11) can be
written as
L4eP 2eD
kS1 e1 nT k 6 KPID
; 4:13
38L 4e 2e
P I
Next, let the values Me, Mr, and Ma be dened as the superium of the absolute
value of the error, the error rate, and the error acceleration signals. Namely,
Me sup j enT j; 4:15
nP0
_
Ma sup j enT _
enT T j: 4:17
nP0
These new values can be applied to the initial denitions of the controller terms
to produce the bounds
j eI j 6 K~I Me 6 K~I L; 4:18
j eD j 6 KD Ma 6 2KD L; 4:20
J. Carvajal et al. / Information Sciences 123 (2000) 249270 269
where the conditions from Eqs. (2.27)(2.29) have been used. Next, Eq. (4.9) is
rearranged to produce
KPID L4K~P
kS1 e1 nT k 6
38L 8K~P L 4K~I L
4KD
je1 nT j je1 nT T j L : 4:21
4K~P
Note that this equation can be written in a form similar to Eq. (4.3) with the
rst term dened as
KPID K~P
L1 ; 4:22
62L 2K~P K~I
and the rest of the constant terms grouped into M1 . Eq. (4.10) can also be
written as
L2 kN k: 4:23
By applying the small gain theorem, the stability condition for Sector 1 can
be found as
KPID K~P
kN k < 1: 4:24
62L 2K~P K~I
This process is repeated for the other sectors to yield the combined condition
set as
KPID K~P
kN k < 1; 4:25
62L 2K~P minK~I ; KD
KPID K~I
kN k < 1; 4:26
62L 2K~I minK~P ; KD
KPID KD
kN k < 1: 4:27
62L 2KD minK~I ; K~P
The value of the plant output kN k must also be bounded, so the given non-
linear system has a nite gain. Conditions (4.25)(4.27) together provide the
BIBO stability criteria for the fuzzy PID controller design for a given bounded
system.
270 J. Carvajal et al. / Information Sciences 123 (2000) 249270
5. Conclusions
References
[1] M. Brown, C. Harris, Neurofuzzy Adaptive Modeling and Control, Prentice-Hall, Englewood
Clis, NJ, 1994.
[2] G. Chen, Conventional and fuzzy PID controllers: an overview, International Journal of
Intelligent and Control Systems 1 (1996) 235246.
[3] G. Chen, H. Ying, BIBO stability of nonlinear fuzzy PI control systems, Journal of Intelligent
and Fuzzy Systems 5 (1997) 245256.
[4] J. Craig, Adaptive Control of Mechanical Manipulators, Addison-Wesley, Reading, MA,
1988.
[5] C. Harris, C. Moore, M. Brown, Intelligent Control: Aspects of Fuzzy Logic and Neural Nets,
World Scientic, River Edge, NJ, 1993.
[6] H. Malki, D. Feigenspan, D. Misir, G. Chen, Fuzzy PID control of a exible-joint robot arm
with uncertainties from time-varying loads, IEEE Transactions on Control Systems Technol-
ogy 5 (1997) 371378.
[7] H. Malki, H. Li, G. Chen, New design and stability analysis of a fuzzy proportional-derivative
control system, IEEE Transactions on Fuzzy Systems 2 (1995) 245254.
[8] D. Misir, H. Malki, G. Chen, Design and analysis of a fuzzy proportional-integral-derivative
controller, International Journal of Fuzzy Sets and Systems 79 (1996) 297314.
[9] W. Pedrycz, Fuzzy Control and Fuzzy Systems, second ed., Wiley, New York, NY, 1993.
[10] P. Sooraksa, G. Chen, Mathematical modeling and fuzzy control for exible link robots,
Mathematical and Computer Modeling, vol. 27 (1998) 7393.
[11] H. Ying, W. Siler, J. Buckley, Fuzzy control theory: a nonlinear case, Automatica 26 (1990)
513520.
[12] P. Sooraksa, G. Chen Fuzzy (Pl + D)2 Control for exible robot arms, Proc. IEEE Int. Conf.
on Control Appl., Deerborn, MI, Sept. 1518, pp. 536541, 1996.