Beruflich Dokumente
Kultur Dokumente
Definition of fuzzy
Fuzzy
logic:
Humans
= 36 C
{0,1}
{0,1}
Slow
Speed = 0
Fast
Speed = 1
bool speed;
get the speed
if ( speed == 0) {
// speed is slow
}
else {
// speed is fast
}
Name Height,
cm
Degree of
Membership
______________________________
Chris
208
Crisp sets
1
John
198
Mark
193
Bob
172
FUZZY SETS
Fuzzy Sets
Slowest
Slow
Fast
float speed;
get the speed
if ((speed >= 0.0)&&(speed < 0.25)) {
// speed is slowest
}
else if ((speed >= 0.25)&&(speed < 0.5))
{
// speed is slow
}
else if ((speed >= 0.5)&&(speed < 0.75))
{
// speed is fast
}
else // speed >= 0.75 && speed < 1.0
{
// speed is fastest
}
Fastest
FUZZY SETS
Name Height,
cm
Degree of
Membership
______________________________
Fuzzy sets
Chris
208
0.95
John
198
0.82
Mark
193
0.74
Bob
172
0.30
FUZZY SETS
MEMBERSHIP FUNCTIONS
Temp:
10
MEMBERSHIP FUNCTIONS
How
cool is 36 F ?
11
MEMBERSHIP FUNCTIONS
How
cool is 36 F ?
It is 30% Cool and 70% Freezing
0.7
0.3
12
FUZZY LOGIC
How do we use fuzzy membership functions in
predicate logic?
Fuzzy logic Connectives:
Fuzzy
Conjunction (AND),
Fuzzy Disjunction (OR),
13
FUZZY DISJUNCTION
AB = max(A, B)
AB = C "Quality C is the disjunction of
Quality A and B"
(AB = C) (C = 0.75)
14
FUZZY CONJUNCTION
AB = min(A, B)
AB = C "Quality C is the conjunction of
Quality A and B"
(AB = C) (C = 0.375)
15
16
17
0.7
0.9
0.7
19
0.9
0.7
20
FUZZY CONTROL
21
INPUTS: TEMPERATURE,
CLOUD COVER
Temp:
Cover:
22
OUTPUT: SPEED
23
RULES
24
Fuzzification: A crisp set of input data are gathered and converted to a fuzzy
set using fuzzy linguistic variables and membership functions. This step is
known as fuzzification.
Construct fuzzy rules
Perform fuzzy inference into the system. An inference is made based on a set
of rules.
Defuzzification: The resulting fuzzy output is mapped to a crisp output using
the membership functions.
F
25 % Cloud Cover ?
26
FUZZIFICATION:
CALCULATE INPUT MEMBERSHIP LEVELS
65
25%
0.2
27
RULES EVALUATION
If it's Sunny and Warm, drive Fast
Sunny(Cover)Warm(Temp)Fast(Speed)
28
DEFUZZIFICATION:
CONSTRUCTING THE OUTPUT
DEFUZZIFICATION:
CONSTRUCTING THE OUTPUT
DEFUZZIFICATION:
CONSTRUCTING THE OUTPUT
Speed
= weighted mean
= (0.2*25+...
31
DEFUZZIFICATION:
CONSTRUCTING THE OUTPUT
Speed
= weighted mean
= (0.2*25+0.7*75)/(0.9)
= 63.8 mph
32
The usage
Some Examples
Temperature
Controller
TEMPERATURE CONTROLLER
The problem
Change
Cold,
Low,
CONCLUSION
CONCLUSION
Fuzzy
36