0% found this document useful (0 votes)
147 views

CH 4

This chapter introduces fuzzy logic control theory and the historical development of fuzzy logic. It discusses the basic structure of a fuzzy logic controller including fuzzification, fuzzy rules, and defuzzification. It also provides details on fuzzy sets and linguistic variables, explaining how fuzzy sets allow for degrees of truth between fully true and fully false. Membership functions are used to represent the level of membership in fuzzy sets.

Uploaded by

Zayneb Mohamed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
147 views

CH 4

This chapter introduces fuzzy logic control theory and the historical development of fuzzy logic. It discusses the basic structure of a fuzzy logic controller including fuzzification, fuzzy rules, and defuzzification. It also provides details on fuzzy sets and linguistic variables, explaining how fuzzy sets allow for degrees of truth between fully true and fully false. Membership functions are used to represent the level of membership in fuzzy sets.

Uploaded by

Zayneb Mohamed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 34

Chapter Four Fuzzy Logic Control Theory

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.

4.2 Historical Development of Fuzzy Logic


The literature in fuzzy control has been growing in recent years, making it
difficult to present a survey of the wide variety of applications.
Historically, the important milestones in the development of fuzzy control
may be summarized as follows:
1930, jan lukasiewicz, polish logician, described a three-valued
logic. With the third value he extended the range of truth values from
{0, 0.5,1} to all rational numbers in [0,1] , and finally to all numbers in
[0,1] .
1937, max black, quantum philosopher , published a paper called
"vagueness: an exercise in logic analysis" in the philosophy of science
journal. In this paper, he defined the first simple fuzzy set with what it
called membership curve [12].
1965, lotfi zahed, professor at university of California, Berkeley,
presented his first article describing fuzzy sets theory, a landmark paper
that gave the field it's name [113]. Zahed applied lukasiewicz'z logic to
every object in a set and worked out a complete algebra for fuzzy sets.
1973, Zahed puplished his second most influential paper, which he
calls the paper laid the framework for fuzzy control [14].
1974, Ebrahim Mamdani, and S.Assilian, of Queen Mary collage,
London, demonstrated a very simple controller based on fuzzy logic

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].

4.3 Introduction to Fuzzy Logic Theory

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

4.3.2 Fuzzy Sets


Fuzzy sets are a mathematical concept proposed by prof. L.A.Zadeh in
1965. In fuzzy sets theory, classical sets are called crisp sets. For fuzzy sets
X A ≡ µA is allowed to have values between 0 and 1 to represent different
degrees of membership for elements of a given set. Then, a fuzzy set in a
universe of discourse U is characterized by the membership function µA ,
which takes values in the interval [0,1] namely µ A : U → [0,1] . A fuzzy set
A in U may be represented as a set of ordered pairs of a generic element
u and its grade of membership µA as
A = {(u, µ A (u )) / u ∈ U }
When the membership space M =[0,1] contains only two points 0 and 1 .
then A is non fuzzy or crisp µA (u ) . is identical to the characteristic
function of a non fuzzy set. Elements with a zero degree of membership are

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

"integers close to zero" i.e.


A1 = 1,0 0 + 0.8 1 + 0.6 2 + 0.4 3 + 0.2 4
0r, fuzzy set A2 "integers approximately equal to 5" i.e.
A2 = 0.25 2 + 3 + 4 + 1.0 5 + 0.75 6 + 0.5 7 + 0.25 8
These fuzzy sets are presented in figure (4-1). note that, the shape of the
fuzzy set is defined by the user. Equation (4-2) is simply a discrete
description of the set shape. If u is continuous then the fuzzy set may be
expressed as:
A = ∫ µ (u ) u
u A
(4-3)

40
Chapter Four Fuzzy Logic Control Theory

Figure (4-1) Diagrammatic Representing of Fuzzy Speed

For the above state, assuming a continuous universe of discourse


U =[0,10 ], the fuzzy set A1 can be expressed by the function.
 u
1 − 0≤u≤5
A1 =  5
 0 u≥5

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.

Figure (4-2) : Fuzzy Sets of Different Shapes and Support

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}

4.3.2.1 Fuzzy sets and linguistic variables


In particular, can be employ fuzzy sets to present linguistic variables. A
linguistic variable can be regarded as a variable whose values are defined
in linguistic terms. A linguistic variable is characterized by a quintuple
(u , T (u ), U , G , M ) in which u is the name of variable; T (u ) is the term set
of u or set of names of linguistic values of u with each value being a
fuzzy number defined on U;G is a syntactic rule for generating the names
42
Chapter Four Fuzzy Logic Control Theory

of values of u , and M is a semantic rule for associating with each value


its meaning [21].
Consider a motor speed is interpreted as a linguistic variable, then its term
set T (speed ) could be: T ( speed ) = {Slow , Medium , Fast ,......... .}

Where, each term in T (speed ) is characterized by a fuzzy set in a universe


of discourse U =[0,1000 ]. We might interpret slow as a speed below about
400 rpm . Medium as a speed close to 550 rpm and fast as a speed above
about 700 rpm . These terms can be characterized as fuzzy sets whose
membership functions are shown in figure (4-3).

Figure (4-3): Definition of Fuzzy Sets A1 and A2

4.3.3 Basic Set Operations on Fuzzy Sets


As fuzzy set is denoted in terms of its membership function, then set
operations of fuzzy sets will be defined via their membership functions. A
variety of consistent definitions can be given, the following are the most
widely accepted for fuzzy logic control. Let A, B and C be three fuzzy

sets in U with membership functions µA , µB and µC respectively . The

basic connective operations in conventional set theory are those of


intersection, union and complement [22].

43
Chapter Four Fuzzy Logic Control Theory

4.3.3.1 Fuzzy set intersection (conjunction)

The membership function µ A ∩ B(u ) of the intersection A ∩ B is defined

by:
µC (u ) = µ A ∩ B(u ) = µ A t µB for u ∈U (4-6)

Where t is the triangular norm,


The t-norm has several interpretations in fuzzy logic such as intersection,
algebraic product, logarithmic product, inverse product, bounded product
and drastic product operations. Most frequently used is the intersection and
algebraic product operations.

Intersection: for which µ A ∩ B(u ) is the least of the individual

membership functions, µ A ∩ B(u ) = m in.{ µ A , µ B }


(4-7)

Algebraic product: for which µ A ∩ B(u ) Is the algebraic product of the


respective membership functions.
µ A ∩ B(u ) = µ A ∗ µ B (u ) (4-8)

4.3.3.2 Fuzzy set union (Disjunction)


The membership function µ A ∪ B(u ) of the union A ∪ B is defined by:
µ C (u) = µ A ∪ B(u ) = µ A (u ) S µ B (u ) for u ∈U
Where, S is the triangular Co-norm.
The S -norm has several intersections in fuzzy logic such as union,
algebraic sum, bounded sum, logarithmic sum, ratio sum, drastic sum and
disjoint sum operations. Most frequently used in the union and algebraic
sum operators.
Union : for which is the algebraic sum of the respective membership
functions

44
Chapter Four Fuzzy Logic Control Theory

µ A ∪ B(u ) = µ A (u ) S µ B (u ) = m ax.{ µ A (u ), µ B (u )} (4-


10)
Algebraic sum : for which µ A ∪ B(u ) is the algebraic sum of the respective
membership functions
µ A ∪ B(u) = µ A (u) S µ B (u) = µ A (u) + µ B (u ) − µ A (u) • µ B (u ) (4-
11)
Clearly, the t -norms and S -norms provide a wide range of models for
connectives for fuzzy sets, each selected as appropriate to the problem
domain.
4.3.3.3 Fuzzy set complement
The membership function µ A − (u ) of the complement of fuzzy set A is
defined by :
µ A − (u ) = 1 − µ A (u ) for u ∈U
4.3.4 Linguistic Hedges
A major reason behind using fuzzy logic in control engineering is the use
of qualitative linguistic expressions favored by human experts and
operators such as Very small or Rather big. In general, a value of a
linguistic variable is a composite term u1 , u 2 , u 3 , u 4 ,....... u n which is a
concatenation of atomic terms u1 , u 2 , u 3 , u 4 ,....... u n these atomic terms may
be divided into four categories [23]:
a) primary terms, which are the linguistic values of the specified linguistic
variable (e.g. small and big….etc.)
b) the connective And, Or and the negation Not.
c) Hedges such as Very, Most, Rather, Slightly, More or Less…etc.
d) Markers such as parenthesis.
The purpose of the hedges is to generate a larger set of values for a
linguistic variable from a small collection of primary terms through the
processes of intensifier or concentration.

45
Chapter Four Fuzzy Logic Control Theory

consider the concentrator operator (very ) is defined by:


very u = u 2 (4-13)
The operator (very) also can composed with itself, thus
very very u = (very u) 2 = u 4 (4-14)
Also when the fuzzy (slow ) on U = {0,200 ,400 ,600 ,800 ,1000 } is given
as:
slow = 1 / 0 + 0.7 / 200 + 0.3 / 400
very slow = (1) 2 / 0 + (0.7) 2 / 20 + (0.3) 2 / 40

= 1 / 0 + 0.49 / 200 + 0.09 / 400


= 1 / 0 + 0.5 / 200 + 0.1 / 400
Hence,
very very slow = very2 slow

very 2 slow = 1l 0 + 0.25 / 200 + 0.01/ 400

4.4 Fuzzy Relations


In control systems, relationships are defined between system inputs and
outputs. In fuzzy systems, these relationships or mappings are between
fuzzy variables, defined on different universes of discourse, through fuzzy
algorithms based upon collections of conditional statements which are of
the forms:
IF A(u ) THEN B( y ) (3-
15)
Which links the antecedent set A (defined by µ A (u ), u ∈U ) with the
consequent set B (defined by µB ( y ), y ∈Y ). This relation ( (R ) ) is
expressed in terms of the Cartesian product of set A and B ; R = A • B for
which its membership function is defined by:
min[µ A (u ), µ B ( y )] int er sec tion
µ R (u, y) = µ A • B(u, y) = 
 µ A (u ).µ B ( y ) a lg ebric product

(4-16)

46
Chapter Four Fuzzy Logic Control Theory

The membership function µR (u, y ) corresponding to the strength of


connection or correlation between u and y In the mapping [24].
Generally, for U ={u1 , u 2 , u 3 , u 4 ,....... u n } and Y ={ y1 , y 2 , y 3 , y 4 ,....... y m } ,

then equation (4-16) can be represented in matrix form as follows:

 µ R (u1 , y1 ) µ R (u1, y1 )   µ R (u1, y1 )


 
 µ R (u1 , y1 ) µ R (u1, y1 )   µ R (u1, y1 )
 
R=       (4-17)
     
 
 µ (u , y ) µ (u , y )   µ R (u1, y1 )
 R 1 1 R 1 1

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] .

4.4.1 Operation on Fuzzy Relations


Since the fuzzy relation from U to Y is a fuzzy set in U ×Y , the
operations for fuzzy sets can be used just as it. If R and S are fuzzy
relations in U ×Y , the operations are as follows:
Intersection:
R ∩ S ↔ µ R∩S (u, y ) = min .[ µ R (u, y ), µ S (u, y)] (4-
18)
Union:
R ∪ S ↔ µ R∪S (u, y ) = max .[ µ R (u, y), µ S (u, y)] (4-
19)
Complement:
R ↔ µ R (u, y) = 1 − µ R (u, y) (4-
20)

4.4.2 Composition of Fuzzy Relations


47
Chapter Four Fuzzy Logic Control Theory

If R a fuzzy relation in U ×Y and S is a fuzzy relation in Y × Z the


composition of R and S, R  S is a fuzzy relation in Y × Z as defined by :

SR ↔ µ RS(u,y)= m . .µ{R(u,y[)µ S(au,zm) ,} x] i n (4-21)

This composition uses " max ." and " min"operations, so it is called
Max./Min. composition.Consider that, U = {u1 , u 2 } and

Y = { y1 , y 2 , y 3 } and Z = {z1 , z 2 } If the fuzzy relation R and S are expressed


by the following matrices, the composition of R and S , R  S , is found as
follows. That iss, the composition corresponds to the ordinary product of
the matrices, but the min . operator replaces the product and the max .
operator replaces the sum:
z z
y y y y 1 2
u 1 2 3 1 0.5 0.8
R = 1 0.4 0.6 0 S =y
2 0.1
u 1
2 0.9 1 0.1 y
3 0 0.6

Then,
0.5 0.8
0.4 0.6 0 0.4 0.6
RS =  0.1 1 =
0.9 1 0.1 0.5 1
0 0.6

Many other kinds of compositions for fuzzy relations can be considered.


Therefore, reversing the "min" and "max" operators for the above max-min.
composition gives the min-max. composition such that:

SR ↔ µ RS(u,y)= m . .{µ R(u,[y) aµ S(mu,z) } x ] i n (4-22)

Also,

48
Chapter Four Fuzzy Logic Control Theory

RS = 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

4.4.3 Basic Properties of Fuzzy Relations:


Table (4-1) contain a list of the basic properties of operations with fuzzy
relations [25]. Since the properties of Union (∪) . intersection (∩) and
Complement (−) for fuzzy relations are the same as those for fuzzy sets,
we will not repeat them here.

49
Chapter Four Fuzzy Logic Control Theory

Table (4-1) : Basic Properties of Fuzzy Relations

4.4.4 Fuzzy Relation Equations:


Fuzzy relation plays an important role in areas such as system analysis and
the planning of fuzzy controllers. As in the previous section, if we let A be
a fuzzy set in U , and R be a fuzzy relation in U ×Y , the composition of
A and R , ( A  R ) , is defined as :

µ AR(y)= m . {A(. x)µµ [R(u,y) a,m ] x } i n (4-27)

The result is a fuzzy set B in Y . in other words,


A R = B (4-28)
If A as fuzzy input, B as fuzzy output and R as fuzzy system, then
equation (4-28) express a fuzzy system with fuzzy input and fuzzy output
as shown in figure (4-4).

50
Chapter Four Fuzzy Logic Control Theory

Figure (4-4) : Fuzzy System with Fuzzy Input and Output

4.5 Fuzzy Logic Controllers


Fuzzy logic controllers which are based on fuzzy set theory have been used
in growing numbers in recent years for applications in artificial
intelligence, computer science, control engineering, decision theory, pattern
recognition, robotics and aircraft control.
Fuzzy logic controllers (FLC) have a basic configuration illustrated in
figure (4-5). The principal elements or subsystems in FLC are the
fuzzification process, data base, control rule base and defuzzification
process [26].

Figure (4-5) : Basic Structure of FLC

4.5.1 Fuzzification Process


The fuzzification process performs a scale transformation (normalization)
or it maps the physical values of the current process state variables into a
51
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.

4.5.2 Control Rule Base


Parameters design of the rule base includes:
. choice of process state and control output variables.
. choice of the content of the rule-antecedent and the rule
. choice of term sets for the process state and control output variables.
. derivation of the set of rules.

4.5.2.1 Choice of variables and content of rules.


In general, fuzzy systems map an input fuzzy set to an output fuzzy set.
Fuzzy rules are the relation between the fuzzy sets. They usually are in the
form
If A and B Then C

In terms of fuzzy Associative Memory definition (FAM),


Each rule represents an association ( Ai , Bi C i ) Figure (4-6) shows a fuzzy
system using two antecedents and one consequence [19].
The fuzzy associative memories are a short hand matrix notation for
presenting the rule set.

52
Chapter Four Fuzzy Logic Control Theory

Figure (4-6) : FAM System Architecture

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.

Figure (4-7) : Fuzzy Associative Memory (full set)

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),

Where y SP , is the desired process output or set point.


y is the process output variable. and k is the sampling time.Based on the

above mentioned selections, these choices could be clarified as follows:

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 )

4.5.2.2 Choice of term set


The term set T ( x ) of a linguistic variable X is described as consisting of a
finite number of linguistic values which expressed as tuples of the form
(value sign, value magnitude), e.g. ( positive pig ), (negative small),..etc. in
this study, PD-like FLC is used. The meaning of tuple, in the case of a
PD-like FLC, can be summarized as follows: linguistic values of e with
negative sign means the current process output y (k ) have a value above the
set point y SP On the other hand , linguistic values of e with appositive sin
means that, the current values of y (k ) is below the set point. A linguistic
value of zero for e means that, the current process output is nearly at the
set point.[27]
linguistic values of e' with negative sign mean that, the current process
output y (k ) has decreased when compared with its previous value y (k −1)
on the other hand, linguistic value of e' with positive sign means that,
y (k ) . Has increased its value when compared with y (k −1) a linguistic
value of zero for e' means that, the current process output has not changed
from its previous 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.

b) Group1 : for this group of rules e is negative big or medium which


implies that y (k ) Is significantly above the set point. At the same time, e'
positive, this means that y is moving away from the set point. The control
output of this group is intended to slow down the system response to
minimize the system overshot.

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

d) Group3 : for this group of rules e is positive ( medium or big ) which


mean that y (k ) is significantly below the set point. At the same time e' is
negative, this mean that y (k ) is moving away from the set point. The
control output of this group is intended to slow down the system response
to minimize the system undershoot [27].

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

Figure (4-8) : The Block of FLC in Tabular Form

From another point of view, figure (4-8) can be divided into thee regions as
shown in figure (4-9) [26].

Figure (4-9): Different Regions in Tabular Form

These regions are summarized as follows:

58
Chapter Four Fuzzy Logic Control Theory

a) Region (1), corresponds to situations where error and error


change are of the same sign, and the controller modification whilst
varying in size ( diminishes towards region 2 ) always oppose the
error, figure (4-10) shows the phase trajectory for fuzzy logic control
in which the arrows indicate the direction of diminishes.
b) Region (2), is the zero modification region indicating that the
system is in the desired states requiring no modification to the
control rule base.
c) Region(3), corresponds to situations where error and error
change are of the opposite sign.

Figure (4-10) : Phase Trajectory of FLC


To ensure that control modifications do not generate divergent responses,
and are effectively initialized, some static over-rules are imposed:
a) if e and e' are almost zero then no control action. This rule ensure that
equilibrium is established when the set point is achieved.
b) If e and e' are of the same sign, the control action is of the same sign.
These rules ensure rapid convergence to set point.
c) The control rule base is symmetrical to improve convergence and
anticipate overshoot.

4.5.2.3 Derivation of rules

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

At point (1), e is PB and e' is ZE then a large is control required to


derive the closed loop response towards the set point generating an
improvement in rise time. Then this rule is typically written as :
IF e is PB and e' is ZE THEN u is PB

Figure (4-11) : Open Loop Response of Second Order Process

Whereas at point (3), e is NB and e' is ZE , to prevent large peak


overshoot, a NB control is recommended. Continuing with the other
maximum/minimum intersection points, a control rule base can be readily
generated as in table (4-2).
From figure (4-8) and table (4-2), both approaches, conclude to a similar
rule base.

61
Chapter Four Fuzzy Logic Control Theory

Table (4-2): Rule Table at The Chosen Points

4.5.3 Data Base


The two design parameters involved in the construction of the data base
are:
. choice of membership functions
. choice of scaling factors

4.5.3.1 Choice of membership functions


Suppose that, the term set
T (e) = T (e' ) = T (u ) ={NB , NM , NS , ZE , PS , PM , PB } , i.e. the term set
containing the linguistic values for the three linguistic variables, are the
same. In this case there is 21 membership functions representing the
meaning of each linguistic value from the above term set on the respective
domains e, e' , and u. for computational efficiency,

62
Chapter Four Fuzzy Logic Control Theory

efficient use of memory, and performance analysis requirements, a uniform


representation of the membership function is recommended. The uniform
representation can be achieved by employing membership functions with
uniform shape and parameter. The most popular choices for the shape of
the membership function include triangular, trapezoidal, and bell-shaped
functions. Although the parametric, functional description of the bell-
shaped membership function is the most economic one, the triangular-
shaped membership function gives better results [29]. This explain the
predominate use of this type of membership functions. Triangular shape
membership functions are shown in figure (4-12), where ui is the centroid
of the ith membership function and σi is a constant which determine the
spreadth of the ith membership function. For simplicity, it is assumed that
the membership functions are symmetrical and each one overlaps with the
adjacent functions by 50% .Once the shape of the membership function is
selected, one has to map each element of the term set on the domain of the
corresponding Linguistic variable.

Figure (4-12) : Seven Triangular Membership Functions

4.5.3.2 Choice of scaling factors


The use of normalized domains requires a scale transformation which maps

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].

4.5.4 Defuzzification Process


Defuzzification, is a process of converting the FLC inferred control actions
from fuzzy to crisp values. This process depends on the output fuzzy set
which is generated from the fired rules. the following methods are
commonly used:
. First-of-maxima (F.O.M) defuzzification
. Middle-of-maxima (M.O.M) defuzzification
. Center-of -area (C.O.M) defuzzification
. Weighted center-of-area (W.C.O.M) defuzzification
In the literature on fuzzy control, the terms used in describing the different
defuzzification methods vary from author to author. So when comparing
other literature sources with the described in this study, should pay
attention to the formal definitions of the defuzzification methods rather
than their names [3].
Each fired rule results in clipped fuzzy set, the height of the clipped fuzzy
set is equal to the degree of match of the antecedent.

4.5.4.1 First –of-maxima (F.O.M) defuzzzification

64
Chapter Four Fuzzy Logic Control Theory

First -of-maxima method determines uo as the first value of the clipped


fuzzy set which has maximum height. consider the clipped fuzzy sets
obtained from a four rules are as shown in figure (4-13). The clipped fuzzy
set which has a height of 0.7 is the maximum height membership. So
u o = −2.6

Figure (4-13) : First-of-Maximum Defuzzification

4.5.4.2 Middle–of-maxima (M.O.M) defuzzification


Middle–of-maximum is a very similar to First-of-Maxima. Instead of
determining uo to be the first maximum of the clipped fuzzy set, this
method takes middle of that maximum.

Figure (4-14) : Middle-of-Maxima Defuzzification

from the previous section, uo is considered as the middle of the clipped


fuzzy set which has 0.7 height as shown in figure (4-14) then u o = −2.0

65
Chapter Four Fuzzy Logic Control Theory

4.5.4.3 Center-of -area (C.O.M) defuzzification


The C.O.A method is the best well-known defuzzification method. In the
discrete case, the crisp output, uo is determined by:
i= n
∑ µ (ui ) × ui
i =1
uo = i= n (4-33)
∑ µ (ui )
i =1

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

Figure (4-15) : Center-of-Area Defuzzification

4.5.4.4 Weighted center-of-area (W.C.O.A)


In the discrete case, uo is determined by :
i= n
∑ µ k (ui ) × ui
i =1
uo = i= n (4-34)
∑ µ (ui )
k
i =1

66
Chapter Four Fuzzy Logic Control Theory

Where, k is the adjustable power of (DOF). When k is equal unity this


leads to C.O.A defuzzification. And when K takes very large value this
leads to M.O.M defuzzification.
for k = 1 , u o = 0.488 and for k = 2 , u o = 0.0488

But for k = 20 , u o = −180

4.6 Takagi-Sugeno (T-S) fuzzy system


Here present a notation for generalized T-S fuzzy system with center
average defuzzification. This fuzzy system is the general system used
through out this chapter to provide the fuzzy systems incorporated in fuzzy
control scheme. The system consists of a set of fuzzy rules in the following
form [30]:
i i
R (i ) : if x1 is A1 and …………and xn is An then
y = yi = ai.0 + ai,1 z1 ( x) +.......... . + ai, m − 1 z m − 1 ( x), i =1,......., r

Where A1i ,......... , Ani are fuzzy variables, x = [ x1 ,....., xn ] is the input

vector and yi is the consequence of i th the rule which is a linear

combination of the functions, z k ( x) ∈ R, k = 1,...., m −1 .Define

 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 

By using product inference, center-average, the output of the fuzzy system


can be expressed as:
y ( x) = z T ( x) Aξ ( x )

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
 

The output of the fuzzy system can be expressed as


y ( x) =θT ξ( x)

Where θ T is adjustable parameter vector composed of [ y1 , y 2 , ...., y r ]

(or equivalently [a1,0 , a2,0 ,...., a r ,0 ] ) of consequent parameters.

4.7 Mamdani- Type of Fuzzy Rules


Mamdani style inference is based on the work by Ebrahim Mamdani in
(1974) which was proposed as an attempt to control a stesm engine and
boiler combination by synthesizing a set of linguistic rules obtained from
the experienced human operators[32].
This type of rules was used in the first applications of fuzzy control, and
has the following general form:

68
Chapter Four Fuzzy Logic Control Theory

Ri : IF u1 is A1J and u 2 is A2k and ,..., and u n is Ani THEN

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
)

Which shows that the consequent of a fuzzy rule is a function ( f i) of the


fuzzy inference system (FIS) inputs, a linear function in the consequent or
which constant parameters.
The advantages of the Sugeno method are:
• It is computationally efficient.
• It works well with linear techniques (e.g., PID control).
• It works well with optimization and adaptive techniques.
• It has guaranteed continuity of the output surface.
• It is well- suited to mathematical analysis.

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

You might also like