Fuzzy Logic
Fuzzy Logic
Fuzzy Logic
OVERVIEW
Future
WHAT IS FUZZY LOGIC?
Definition of fuzzy
Fuzzy – “not clear, distinct, or precise; blurred”
Slow Fast
Speed = 0 Speed = 1
bool speed;
get the speed
if ( speed == 0) {
// speed is slow
}
else {
// speed is fast
}
FUZZY LOGIC REPRESENTATION
Slowest
For every problem
[ 0.0 – 0.25 ]
must represent in
terms of fuzzy sets.
Slow
What are fuzzy [ 0.25 – 0.50 ]
sets?
Fast
[ 0.50 – 0.75 ]
Fastest
[ 0.75 – 1.00 ]
FUZZY LOGIC REPRESENTATION
CONT.
Neural Networks
systems.
FUZZY LOGIC IN CONTROL
SYSTEMS
Some Examples
Temperature Controller
Business
Hybrid Modeling
Expert Systems
More Definitions
Fuzzy logic is a set of mathematical principles for knowledge
representation based on degrees of membership.
14
Fuzzy Sets
The concept of a set is fundamental to mathematics.
15
Fuzzy Sets
Degree of Membership
Name Height, cm
Crisp Fuzzy
Chris 208 1 1.00
Mark 205 1 1.00
John 198 1 0.98
Tom 181 1 0.82
David 179 0 0.78
Mike 172 0 0.24
Bob 167 0 0.15
Steven 158 0 0.06
Bill 155 0 0.01
Peter 152 0 0.00
16
Crisp Vs Fuzzy Sets
Degree of
Crisp Sets
The x-axis represents the
Membership
1.0
universe 0.8 of discourse –
Tall Men
the range0.6 of all possible
values applicable
0.4
to a
0.2
chosen variable. In our case,
0.0
the variable 150 is the160
man 170 180 190 200 210
Height, cm
height. Degree
According
of
Membership
to this Fuzzy Sets
representation,
1.0 the universe
of men’s0.8heights consists of
0.6
all tall men.
0.4
The y-axis
0.2 represents the
membership value
160 of the
0.0
150 170 180 190 200 210
18
A Fuzzy Set has Fuzzy Boundaries
In the fuzzy theory, fuzzy set A of universe X is defined by
function µA(x) called the membership function of set A
19
Fuzzy Set Representation
Degree of
Membership Crisp Sets
1.0
0.8 Short Average Short
Tall
Tall Men
0.6
0.4
0.2
0.0
150 160 170 180 190 200 210
Height, cm
Degree of Fuzzy Sets
Membership
1.0
0.8
0.6 Short Average Tall
0.4
0.2 Tall
0.0
150 160 170 180 190 200 210
20
Fuzzy Set Representation
Typical functions that can be used to represent a fuzzy set
are sigmoid, gaussian and pi. However, these functions
increase the time of computation. Therefore, in practice,
most applications use linear fit functions.
(x)
X Fuzzy Subset A
1
0
Crisp Subset A Fuzziness Fuzziness x
21
Linguistic Variables and Hedges
At the root of fuzzy set theory lies the idea of linguistic
variables.
A linguistic variable is a fuzzy variable. For example,
the statement “John is tall” implies that the linguistic
variable John takes the linguistic value tall.
In fuzzy expert systems, linguistic variables are used in
fuzzy rules. For example:
IF wind is strong
THEN sailing is good
Bogd
an L.
IF project_duration is long Vrusi
as ©
THEN completion_risk is high 2006
22
Linguistic Variables and Hedges
The range of possible values of a linguistic variable
represents the universe of discourse of that variable. For
example, the universe of discourse of the linguistic variable
speed might have the range between 0 and 220 km/h and
may include such fuzzy subsets as very slow, slow, medium,
fast, and very fast.
Hedges are terms that modify the shape of fuzzy sets. They
include adverbs such as very, somewhat, quite, more or less
and slightly.
23
Linguistic Variables and Hedges
Degree of
Membership
1.0
Short Short
Tall
0.8
0.6 Average
0.4
Very Short Very
VeryTall
Tall
Tall
0.2
0.0
150 160 170 180 190 200 210
Height, cm
24
Linguistic Variables and Hedges
Mathematical
Hedge Expression Graphical Representation
25
Linguistic Variables and Hedges
Mathematical
Hedge Expression Graphical Representation
More or less A ( x )
Somewhat A ( x )
2 [A ( x )]2
if 0 A 0.5 Bogd
Indeed an L.
1 2 [1 A ( x )]2 Vrusi
if 0.5 < A 1 as ©
2006
26
CONCLUSION