CH 4
CH 4
4.1 Introduction
The basic of fuzzy logic controller (FLCs) are presented in this chapter. A
brief introduction to fuzzy logic is given. A historical development of fuzzy
logic is also presented. The chapter illustrates the FLC structure including
fuzzification, fuzzy rules and defuzzification.
37
Chapter Four Fuzzy Logic Control Theory
regulate a model steam engine [15]. The results were better than using
numerical methods and modeling.
1982, P. Halmbland and J. Ostergaard,Danish engineers, installed a
fuzzy logic controller permanently in a cement kiln. This work was
published in a paper which attracted the attention of the fuzzy logic
community all over the world [16].
In the same year, interest in fuzzy logic was fading in the west
while the Japanese picked up the idea and started applying sugeno started
the early application of fuzzy logic in Japan.
1984, creation of the international fuzzy system Association IFSA in
Japan.
1985, Masaki Togai and Hiroyuki Watanabe, working at AT&T Bell
laboratories, built the first digital fuzzy ship, It processed 16 simple rules
in 12 .2 microsecond at rate of 0.8 million fuzzy logical interface per
second.
In the same year, S. Miyamoto and S. Yasunobu published their
first paper "Automatic train operation by a predictive fuzzy control" which
describes the operation of the Sandai subway system . the train started work
in 1987 after thousands of computer simulations and nearly two thousands
actual runs on the track [17].
1989, K. Hirto displayed a fuzzy robot arm that played two
dimensiomal ping-pong in real time. Also , T. Yamakawa demonstrated a
fuzzy system that balanced an inverted pendulum that can fall only left or
right [18].
1992, B. Kosko crystallized and formulated many concepts in fuzzy
set theory. He introduced the fuzzy associated memory (FAM) which is a
broader view of the fuzzy rules [19].
38
Chapter Four Fuzzy Logic Control Theory
Fuzzy logic rests on the fact that all things admit to certain degree of truth.
Fuzzy logic deals with ambiguities of the system. In the past, the classical
logic draw a sharp line between sets. In reality this line doesn't exist.
4.3.1 Classical Sets
A classical set is normally defined as a collection of objects (discrete or
continuous) u ∈U , that can be finite, countable or countable U is called
the universe of discourse. Each element can either belong or not belong to a
set A , A ⊂ U , By defining a characteristic function, X , (or membership
function) for a set 1 indicates complete membership and 0 non
membership . A classical set can be represented by a set of ordered pairs
(u ,0) or (u ,1) A binary valued characteristic function X A (u ) can be used
to represent whether the object u [20].
1 when u ∈A
X A (u ) =
(4-1)
0 when u ∉A
39
Chapter Four Fuzzy Logic Control Theory
not usually listed. When A is a discrete, finite, fuzzy set it may expressed
as:
A = µ A (u1 ) u1 + µ A (u 2 ) u 2 + ........ + µ A (u n ) u n
i= n
A = ∑ µ A (ui ) ui (4-
i =1
2)
Where (+) denotes the set theory union operating rather than arithmetic
sum. The oblique line (/) does not denote division , instead it denotes a
particular membership function to a value on the universe of discourse .
Consider the universe of discourse U ={0,1, 2,3,......, 10 } and a fuzzy set A1
40
Chapter Four Fuzzy Logic Control Theory
Then, the fuzzy set A1 contain the elements 1.0 0 , 0.7 1.5, 0.3 3.5......
etc,
Thus, the grade of the membership, µA (u ) , can be characterized by either a
set of discrete values or a function called membership function.
The support S ( A) , of a fuzzy set A , is the crisp set of all u ∈U such that
µ A (u ) > 0;
S ( A) = {u = U : µ A (u ) > 0} (4-
4)
In particular, the element u in U for which µ A = 0.5 Is called the crossover
point, and the fuzzy set whose support is single point in u with µ A = 1.0 is
referred to as a fuzzy singleton. A fuzzy set A has compact support if its
support is finite. Fuzzy sets may be represented in different shapes,
41
Chapter Four Fuzzy Logic Control Theory
figure (4-2) shows the most common shapes used which are the crisp,
triangular, trapezoidal, bell-shape and Gaussian sets. The first four sets
have a compact support, whereas the Gaussian function does not.
Triangular fuzzy sets have proved popular with fuzzy logic control . in the
context of control, the concept of compact support of fuzzy sets is
significant in generating algorithms which are stable.
The crisp set of elements that belong to the fuzzy set A at least to the
degree α is called the α − level set or α − cut .
Aα = {u ∈ U : µ A (u) > α } (4-5)
Then, for the fuzzy set A2 we have :
A(α =5) = {3,4,5,6,7} & A(α =0.75) = { 4,5,6,7} & A(α =1.0) = {5}
43
Chapter Four Fuzzy Logic Control Theory
by:
µC (u ) = µ A ∩ B(u ) = µ A t µB for u ∈U (4-6)
44
Chapter Four Fuzzy Logic Control Theory
45
Chapter Four Fuzzy Logic Control Theory
(4-16)
46
Chapter Four Fuzzy Logic Control Theory
This kind of matrix which expressed a fuzzy relation, is called the fuzzy
matrix. Since µR has values within the interval [0, 1] , elements of the
fuzzy matrix also have values within [0, 1] .
This composition uses " max ." and " min"operations, so it is called
Max./Min. composition.Consider that, U = {u1 , u 2 } and
Then,
0.5 0.8
0.4 0.6 0 0.4 0.6
RS = 0.1 1 =
0.9 1 0.1 0.5 1
0 0.6
Also,
48
Chapter Four Fuzzy Logic Control Theory
RS = S R (4-23)
The following are the most basic fuzzy relations for any u, y
Identity relation:
1; u =y
I ↔µ (u, y ) =
(4-24)
I u ≠y
0;
Zero Relation:
O ↔ µO (u, y ) = 0 (4-
25)
Universe Relation:
E ↔ µ E (u, y) = 1 (4-
26)
For U= {u1,u2 ,u3} and Y = { y1 , y 2 , y 3 } , The following are examples of the three
relations:
1 0 0 0 0 0 1 1 1
I = 0 1 0 , O = 0 0 0 , E = 1 1 1
0 0 1 0 0 0 1 1 1
49
Chapter Four Fuzzy Logic Control Theory
50
Chapter Four Fuzzy Logic Control Theory
normalized universe of discourse, it also converts the crisp input data into a
fuzzy set, in order to make it compatible with the fuzzy set representation
of the process state variables in the rule antecedent.
52
Chapter Four Fuzzy Logic Control Theory
For instance, the FAM of rule set of system contain two inputs: error and
change of error, and one output is shown in figure (4-7). The error change
variable contains three fuzzy sets, while the error variable and the control
action contain five fuzzy sets. A linguistic rule is fired for each pair of error
and error change.
If one has made the choice of designing a P-, PD-, PI-, or PID-like FLC,
this already implies the choice of process state and control output variables,
as well as the content of the rule antecedent and the rule consequent for
each of the rules. The process state variables representing the content of the
rule antecedent are selected amongst.
1) error, denoted by e
2) change of error, denoted by e'
The control output (process input) variables representing the rule
consequent are selected amongst:
1) control output, denoted by u ,
2) change of control output, denoted by ∆u
We know that:
53
Chapter Four Fuzzy Logic Control Theory
e( k ) = y SP ( k ) − y (k ), (4-
29)
e' ( k ) = e( k ) −e( k −1),
u ( k ) = ∆u ( k ) −u ( k −1),
a) P-like FLC
The symbolic representation of a rule for a P-like FLC is given as
IF e(k ) is (liguistic value ) THEN u (k ) is (linguistic value )
b) PD-like FLC
the equation giving a conventional PD-controller is
u = k P ⋅ e + k D ⋅ e' (4-
30)
Where, kP and kD are the proportional and differential gain coefficients.
Then a PD-like FLC consists of rules for each sampling time (k ) such that
IF e(k ) is (liguistic value ) and e' (k ) is (linguistic value )
THEN u (k ) is (linguistic value )
c) PI-like FLC
The equation giving a conventional PI-controller is
u = k P .e + k I . ∫ e . dt
Where, kP and kI are the proportional and integral gain coefficients.
When the derivative with respect to time is taken
∆u = k P ⋅ e' + k I ⋅ e (4-
31)
Then, the PI-like FLC consists of rules of the form:
IF e(k ) is (liguistic value ) and e' (k ) is (linguistic value )
THEN ∆u (k ) is (linguistic value )
54
Chapter Four Fuzzy Logic Control Theory
d) PID-lke FLC
The equation giving a conventional PID-controller is
u = k P .e + k D . e' + k I . ∫ e . dt
(4-32)
Where kP , kD and kI are the proportional, the differential and integral
gain coefficients. Then PID-like fuzzy controller has the following rule
form:
IF e(k ) is (liguistic value ) and e' (k ) is (linguistic value )
and ∫ e(k ) is (lingistic value ) THEN u (k ) is (linguistic value )
55
Chapter Four Fuzzy Logic Control Theory
linguistic value of u With positive sign means that, the control output for
the current sampling time u (k ) is larger than the previous control output
u ( k −1) a linguistic value with negative sign means a smaller value for
u (k ) than u ( k −1)
Suppose now that, the term set of e, e' and u all have been chosen equal
such that {NB , NM , NS , ZE , PS , PM , PB } let us return to the rule base of a
PD-like FLC and describe the operation meaning of the IF − THEN rules.
We will present the rule base in the table format shown in figure (4-8). The
set of rules can be divided into the following five groups.
a) Group 0: in this group of rules both e and e' are (positive or negative)
small, or zero. This means that, the current values of the process output
variable y has deviated from the set point but still close to it. The control
output u (k ) is also small or zero in magnitude and is intended to correct
small deviations from the set point. Therefore, the rules in this group are
related to the steady state behavior of the process.
c) Group2 : for this group of rules e is either close to the set point
( NS , ZE , PS ) or below it ( PM , PB ) at the same time e' positive . thus the
control output u (k ) of this group is intended to either speed up or slow
down the approach to the set point.
56
Chapter Four Fuzzy Logic Control Theory
e) Group4 : for this group of rules e either close to the set point
( PS , ZE , NS ) or above it ( NM , NB ) At the same time e' is negative thus
the control output u (k ) of this group is intended to either speed up or slow
down the approach to the set point.
In the context of the above five groups of rules, if one desires better control
resolution around the set point then one can consider a larger range of
linguistic values for NS , ZE .and PS ,e.g. PZE for positive zero, NZE for
negative zero, PVS for positive very small, NVS for negative very
small, ..etc. however, one should be aware of the fact that, the use of term
sets with larger size leads to an increase in the number of rules and
computation burden.
Consider that, if each of the term set of e and e' has 9 elements, then the
maximum number of rules is 81.
57
Chapter Four Fuzzy Logic Control Theory
From another point of view, figure (4-8) can be divided into thee regions as
shown in figure (4-9) [26].
58
Chapter Four Fuzzy Logic Control Theory
59
Chapter Four Fuzzy Logic Control Theory
There are two principal approaches to the derivation of fuzzy control rule
[28]:
a) the first :is a heuristic method in which a collection of fuzzy control
rules are formed by analyzing the behavior of a controlled process. The
control rules are derived in such a way that, the deviation from a desired
state can be corrected and the control objective can be achieved. The
derivation is purely heuristic in nature and relies on the qualitative
knowledge of process behavior.
b) The second: is basically a deterministic method which can
systematically determine the linguistic structure and parameters of the
fuzzy control rules that satisfy the control objectives and constrains.
Consider the open loop response of a second order of figure (4-11) for
which it is required to have a closed loop response which has a minimum
peak overshoot and fast rise time . Assume that, the input fuzzy variables
are the system error (e) and error change (e' ) , and the output fuzzy
variable (u ) . the universe of discourse of each fuzzy variable can be
quantized into a number of overlapping fuzzy sets . the number of fuzzy
sets for each fuzzy variable varies according to the application. A common
and reasonable number is an odd number (3,5,7......) . However, increasing
the number of fuzzy sets results in a corresponding increases in the number
of rules. A membership function is assigned to each fuzzy set. The
membership functions map the values into fuzzy values. Assuming seven
fuzzy linguistic values for (e, e' , u.......) , hence there are 7 × 7 = 49 possible
combinations of the antecedents generating a possible maximum of 49
rules.
Typically an expert would consider the cross-over and Max./Min. points of
the open loop system response shown in figure (4-11) and suggest
appropriate control actions at each point to generate a closed loop response
with minimum peak overshoot and fast rise time.
60
Chapter Four Fuzzy Logic Control Theory
61
Chapter Four Fuzzy Logic Control Theory
62
Chapter Four Fuzzy Logic Control Theory
63
Chapter Four Fuzzy Logic Control Theory
the physical values of the process state variables into a normalized domain.
This is called input normalization. Further more, output denormalization
maps the normalized value of the control output variables into their
respective physical domains. The scaling factors which describe the
particular input normalization and output denormalization play a role
similar to that of the gain coefficients in conventional controllers. The only
way for determination of the scaling factors is by heuristic, this approach
has a trial-and -error nature [22].
64
Chapter Four Fuzzy Logic Control Theory
65
Chapter Four Fuzzy Logic Control Theory
So, this method determines the center of the area below the combined
membership functions.
from the previous section and equation (4-33), uo is shown in figure (4-
15) and computed as :
0.7 × (−2) + 0.45 × 0 + 0.6 × 2 + 0.3 × 4 1
uo = = = 0.488
0.7 + 0.45 + 0.6 + 0.3 2.05
66
Chapter Four Fuzzy Logic Control Theory
Where A1i ,......... , Ani are fuzzy variables, x = [ x1 ,....., xn ] is the input
1 a a a
1,0 1,1 1, m − 1
z1 ( x) T
a 2,0 a
2,1
a
2, m − 1
z = ∈R
m
, A =
z ( x ) a a a
m − 1 r ,0 r ,1 r, m − 1
Where
ξT =[ξ1 , ξ 2 , ....., ξ r ]
67
Chapter Four Fuzzy Logic Control Theory
∏nj=1 u Ai ( x j )
j
ξi = r n
∑i =1 ∏ j =1 Ai
( u ( x j ))
j
With
n number of system inputs
r number of fuzzy rules
µAi ( x j )
j membership function values of input
4.6.1 Zero Order T-S Fuzzy System
Through out this chapter, using a zero order T-S fuzzy system to instigate
the adaptive fuzzy control algorithms. The zero order T-S fuzzy model is
detected from the previous general T-S model by using the constant yi as
the output of the fuzzy IF − THEN rules, or equivalently setting all the
continuous functions of Z equals to zero, i.e
1
0
z =
0
68
Chapter Four Fuzzy Logic Control Theory
yq is Bqp
Where
A1J ,...,A i
n are fuzzy sets of u
yq is the fuzzy set of the output
u and y are linguistic variables
The consequent of this type of rules is a symbolic one, like " the output is
Big".
The advantages of the Mamdani method are :
• It is intuitive.
• It has widespread acceptance.
• It is well suited to human input.
4.8 Sugeno-Type of Fuzzy Rules
The general form of the other rule, referred to as Sugeno-rules, because of
the introduction of those rules by Takagi and Sugeno (1982) and further
exploited by Sugeno and co-worers [32], is as follows:
Ri : IF u1 is A1J and u 2 is A2k and ,..., and u n is Ani
THEN y is f i
(u ,...,
1
u
2
)
69
Chapter Four Fuzzy Logic Control Theory
4.9 Summary
This chapter covers some historical aspects of fuzzy logic. It also present
an introduction to fuzzy logic. The chapter discusses the design of FLC
including fuzzification, fuzzy rules, membership functions, defuzzification,
Takagi-Sugeno (T-S) fuzzy system, Mamdani-type fuzzy rules and Sugeno-
type fuzzy rules.
70