Professional Documents
Culture Documents
4 Chapter Four
Fuzzy Logic and Fuzzy Control
This chapter reviews the history of Fuzzy Logic and Fuzzy systems. A brief
explanation of fuzzy sets, fuzzy operators and fuzzy relations will be given.
Different methods of Defuzzifiction methods will be explained and a comparison
between these methods will be done. This chapter also explains how to construct a
Fuzzy Logic Controller (FLC). The aim of this chapter is not to be complete in
itself, but to provide the parts of fuzzy set theory which are necessary to
understand the remainder of this thesis.
4.1 Introduction
This chapter contains the basics of fuzzy set theory that are necessary for a
correct understanding of the rest of this thesis. If the reader is already familiar
with the field of fuzzy set theory, this chapter may contain nothing new. It serves
as an introduction to fuzzy set theory. It starts with a section about what fuzzy sets
are and how they are related to classical (conventional) set theory. After this, a
number of properties of fuzzy sets are given. Important definitions related to fuzzy
sets are explained. The union and intersection of fuzzy sets, and the complement
of fuzzy sets, are presented. A final section summarizes this chapter
.
.
28
Chapter Four: Fuzzy Logic and Fuzzy Control .
Where:
x : is the height of a person.
MTall(x): is the membership of a person of the height x to the set “Tall”.
Assume there are two persons one with the height of 169.5 cm while the
other has the height 170.5 cm. According to this method of classification it is clear
that the first person is classified as “Short” while the second person is classified as
“Tall”. This seems unreasonable because the difference in height between those
two persons is only 1 cm. This problem can be solved by introducing a region of
uncertainty between the two sets as shown in figure 4.1. But a new problem
appears. Those people with heights within this region will not be classified as a
member of either set.
.
.
29
Chapter Four: Fuzzy Logic and Fuzzy Control .
1
Tall
Membership
0
150 160 170 180 190
Hieght (cm)
1
Short Tall
Membership
0
150 160 170 180 190
Height (cm)
.
.
30
Chapter Four: Fuzzy Logic and Fuzzy Control .
1 Short Tall
Membership
0
150 160 170 180 190
Height (cm)
This new term called the membership degree that shows to which degree a
certain element belongs to a certain set. An element with membership degree of
“1” completely belongs to the set while an element with membership of “0” does
not belong at all to that set. And other elements will have a membership degree
between 0 and 1 as shown in figure 4.2.
.
.
31
Chapter Four: Fuzzy Logic and Fuzzy Control .
Membership
0
0 1 2 3 4 5 6
Universe of Discourse
0
0 1 2 3 4 5 6
Universe of Discourse
Width of a fuzzy set: is defined as the length of its support. In figure 4.4,
the “Width” of the fuzzy set “Normal” is equal to 22-18=4.
Nucleus (Core) of Fuzzy Set: is defined as the interval of all elements with
membership degree equal to one. In figure 4.4, the “Core” of the fuzzy
set “Normal” is the interval [19,21]. The “Core” of a fuzzy set could be
mathematically represented by the following equation:
Core (A) = { x X | MA(x) = 1 } (4.3)
Where:
A: is a fuzzy set.
X: is the universe of discourse.
MA: is the membership degree of the fuzzy set A.
Peak of Fuzzy Set: if the fuzzy set has only one element with membership
degree equal to one, then this element is called the “Peak” of that set.
In figure 4.4, the “Peak” of the fuzzy set “Warm” is 22 ºC.
1
Membership
0
16 17 18 19 20 21 22 23 24
Temperature (°C)
min ( MA , MB ) -- a
MA MB =
{ .
MA MB
max ( 0, MA + MB -1 )
-- b
-- c
(4.4)
Equations 4.4.a and 4.4.b are more frequently used than other methods of
calculation. General forms of “Intersection” are represented by triangular norm
(T-norms) see appendix B fore more details. Figure 4.5 shows the “Intersection”
of two fuzzy sets using the frequently used representations given in equations 4.4.
.
.
34
Chapter Four: Fuzzy Logic and Fuzzy Control .
A B
1
Membership
0.5
0
0 1 2 3
Universe of Discourse
c
1
Membership
b
0
0 1 2 3
Universe of Discourse
Equations 4.5.a and 4.5.b are more frequently used than other methods of
calculation. General forms of “Union” are represented by triangular conorms (T-
conorms or S-norms) see appendix B for more details. Figure 4.6 shows the
“Union” of two fuzzy sets using the frequently used representations given in
equations 4.5.
A B
1
Membership
0.5
0
0 1 2 3
Universe of Discourse
1
c
Membership
0.5 a
0
0 1 2 3
Universe of Discourse
.
.
36
Chapter Four: Fuzzy Logic and Fuzzy Control .
Comp(A) = A = 1 - MA (4.6)
Where:
A : is the complement of the fuzzy set A.
A
1
Membership
0.5
0
0 1 2 3 4
Universe of Discourse
Complement of A
1
Membership
0.5
0
0 1 2 3 4
Universe of Discourse
.
.
37
Chapter Four: Fuzzy Logic and Fuzzy Control .
The previous rule represents a part of the relation between the “Error” and
the “Change of Error” as inputs to the controller, and the “Control Signal” as an
output of the controller. It is clear that this rule has a similar action to the
conventional PD controller. Of course this rule is not enough to represent all the
states of inputs, so a group of rules are used to represent most (if not all) the
possible states of inputs. These rules are referred to as the rule-base.
.
.
38
Chapter Four: Fuzzy Logic and Fuzzy Control .
Rule-1
E CE .
Min
PS PB PS PB
PS PB
Rule-2
E CE .
Max
Min
PS PB
Output
.
.
39
Chapter Four: Fuzzy Logic and Fuzzy Control .
Rule-
A
E CE .
Product
PS PB
PS PB PS PB
Rule-
B
CE .
E
Max
Product
PS PB
Output
.
.
40
Chapter Four: Fuzzy Logic and Fuzzy Control .
This is the same type of fuzzy rule considered thus far in this thesis. An
example of such a fuzzy control rule is:
If Error is PBig and Change of Error is PSmall then Control Signal is PBig
Mamdani and co-workers used this type of fuzzy rules and were the first
ones to report in literature on the applications of fuzzy logic in control and
therefore this type is termed as “Mamdani-rules”.
.
.
41
Chapter Four: Fuzzy Logic and Fuzzy Control .
It is noted that the consequents of these fuzzy rules are functions (fk) of the
inputs xi. An example of the Sugeno type of rules is:
control is where two fuzzy rules co-exist in the rule-base used for the
control of a robot and the input “obstacle in front” is considered:
-if obstacle in front then go left
-if obstacle in front then go right
It is clear that a major confusion will occur due to this inconsistency.
- Continuity: for a rule base to be continuous its rules should fulfil the
following condition: (rules with “adjacent” antecedents have “adjacent”
consequences). Two fuzzy sets are called “adjacent” to each other if they
are overlapping. This means if there is a small change in the inputs this
leads to a corresponding small change in the outputs and vice versa.
0.5
centroid
bisector
LOM
MOM
SOM
-10 -8 -6 -4 -2 0 2 4 6 8 10
.
.
44
Chapter Four: Fuzzy Logic and Fuzzy Control .
.
.
45
Chapter Four: Fuzzy Logic and Fuzzy Control .
4.6 Summary
Fuzzy sets are sets without sharp (crisp) boundaries. Membership of a fuzzy
set is a grade in the interval [0, 1]. Fuzzy sets can be used to model linguistic
labels, where the “vagueness” of the label is modelled by the non-crisp boundaries
of the fuzzy set used to represent that label.
The history of Fuzzy Logic and Fuzzy systems has been reviewed. Fuzzy
sets, fuzzy operators and fuzzy relations are explained. Different methods of
Defuzzifiction methods are shown and a comparison between these methods is
done. This chapter also explained how to construct a Fuzzy Logic Controller
(FLC).
.
.
46
Chapter Four: Fuzzy Logic and Fuzzy Control .
4.7 References
1 L.A. Zadeh (1965). Fuzzy sets. Information and control, 8, pp 338-353.
2 L.A. Zadeh (1994). Soft computing and fuzzy logic. IEEE Software, pp
48-56.
3 D. Driankov, et al, (1993). An Introduction to Fuzzy Control. Springer-
Verlag.
4 E.H. Mamdani, (1974). Applications of fuzzy algorithm for simple
dynamic plant. Proceedings IEE, 121, 12, pp 1585-1588.
5 S. Assilian, (1974). Artificial Intelligence Techniques in the Control of
Real Dynamic Systems. PhD Thesis, Queen Mary College, University of
London, London, UK.
6 E.H. Mamdani and S. Assilian, (1975). An experiment in linguistic
synthesis with a fuzzy logic controller. International Journal of Man-
Machine Studies, Vol. 7, pp 1-13.
7 T. Takagi and M. Sugeno, (1983). Derivation of fuzzy control rules from
human operator’s control actions. E.Sanchez and Gupta , pp. 55-60.
8 Matlab, (2006). Fuzzy Logic ToolBox user’s guide, Matlab ver 7.3, The
MathWorks, Inc.
.
.
47