Beruflich Dokumente
Kultur Dokumente
Chapter 2
Fuzzy Logic Control
Dr. Mohamad Hafis Izran B Ishak
CMED
Faculty of Electrical Engineering
Universiti Teknologi Malaysia
hafis@fke.utm.my
Introduction
What is Fuzziness?
According to the Oxford English Dictionary,
The word fuzzy means blurred, fluffy, frayed or indistinct.
Precise Imprecise
Properties Properties
6
Features of Fuzzy Logic
8
Why Fuzzy Logic?
Fuzzy Logic can:
Represent vague language
naturally
Enrich not replace crisp sets
Allow flexible engineering
design
Improve model performance
Are simple to implement
And best of all they often
work!
10
More Questions!
What are fuzzy sets?
Why fuzzy sets?
What is the difference between a fuzzy set
and a crisp set?
Properties of fuzzy sets?
Relation of fuzzy sets to the real world?
How do you operate a fuzzy set on to another
fuzzy set similarly for fuzzy relations?
How could fuzzy sets be used in a real-world
application?
11
12
With Fuzzy Logic, Rules Can Be
Written in a More Natural Way.
Eg. of Rule-based System Eg. of Rule-based System
without Fuzzy Logic with Fuzzy Logic
-------------------------- --------------------------
If Temperature is 30oC If Temperature is HIGH
Then Switch ON Then Switch ON
Condenser to 80% Condenser HIGH
13
14
Definition of Fuzzy Sets
Some Facts on Fuzzy Sets
Fuzzy sets allow the elements in its set to have
partial membership.
Membership from 0 to 1.
15
mA
Membership value
Universe of u
discourse
16
Compare the Crisp Set and
Fuzzy Set
mA mA
Membership value
1.0
A A
1.0
0
u Universe of discourse u
17
F : U 0, 1
F u, m F u u U
value:
18
Definition of Fuzzy Sets
F m F ui / ui
or
F m F u I / u I m F u2 / u2 ... m F u N / u N
F mF , uI ,......
19
Universe of Discourse
20
Example of Universe of
Discourse for Persons Height
Membership Value,
HEIGHT,
140 150 160 170 180 H(cm)
21
A A A
idempotence
A A A
A (U [0,1]) A
identity
A A
A
A (U [0,1]) (U [0,1])
A B B A
commutativity
A B B A
Fuzzy Sets: ( A B ) C A ( B C )
associativity
( A B ) C A ( B C )
Properties A ( B C ) ( A B) ( B C )
distributivity
A ( B C ) ( A B) ( B C )
A A double complementation
A B A B
De Morgan' s law
A B A B
22
Video: Fuzzy Systems - What is Fuzzy
Logic?
F= 0.1/2+0.4/3+0.85/4+1.0/5+0.85/6+0.4/7+0.1/8
24
Definition of Fuzzy Sets
mF
Support set Support set
The support set of a fuzzy set F is the 1.0
crisp set of all points u in U such that
m F u 0 u
mA
Crossover point
1.0 Crossover point
The element u in U at which is
called the crossover point
0.5
when
m F u 0.5
u
Fuzzy singleton mA
A fuzzy singleton
A fuzzy set whose support is a
single point in U is referred to as a
fuzzy singleton.
u 25
Normalization mA
This process simply involves re- NORM(A)
scaling the membership function so 1
that its maximum value is 1, that is: A
m NORM A u m A u / maxm A u u U
0
u
26
Membership Functions
F= 0.1/2+0.4/3+0.85/4+1.0/5+0.85/6+0.4/7+0.1/8
1
f ( x)
1 ( x 5) 2
27
Membership Functions
28
Membership Functions
S-membership function
mA
0 for u a 1.0
2u a / b a 2 for a u b
S u; a, b, c
1 2u c / c b
2
for b u c 0.5
1 for u c
a b c u
mA
P - membership function 1.0
29
Membership Functions
Exercise 1 m
1
(1). Write down the mathematical
expression for the L-membership
0 U
a
function shown?
L-membership function
1
(2). Write down the mathematical
expression of this membership
function.
-1 0 2 4 5
31
Example 2
Let the universe of discourse be the interval [0,100] with Y
interpreted as age. A fuzzy set F of Y labeled middle age
may be defined as :
F y, m F y y y
What are the implications of the term middle-age?
32
The fuzzy set F might be defined using a T-function as :
0 for 0 y 30
y 30 / 15 for 30 y 45
mF y
60 y / 15 for 45 y 60
0 for 60 y 120
1.0
30 45 60
33
Exercise 2
Suppose a membership function to show young is
described by the following equation:
1.0 for 0 x 25
1
m( x ) for x 25
1 x 525 2
34
Youngness
35
36
Operations on Classical Sets
We can use Venn Diagrams to show
operations on classical sets.
Consider 2 sets: A and B on the
universe X.
X
A B
37
A B x | x Aor x B
Union:
X
B
A
A B x | x A and x B
Intersection:
X
B
A
38
Excluded Middle Laws
Law of the Excluded Middle
A A X
where X is the universe
Law of Contradiction
A A f
where f is an empty set or null set
De Morgans Laws
X
A B A B A
B
X
B
A B A B
A
1, x A
c A ( x)
0, x A
where cA expresses membership in set A for the
element x in the universe.
41
Intersection:
A B c A B ( x) c A c B min c A , c B
Complement: A c A ( x) 1 c A ( x)
Containment: A B c A ( x) c B ( x)
42