Escolar Documentos
Profissional Documentos
Cultura Documentos
Applications
1
Example
2
Fuzzification
Two Inputs (x, y) and one output (z)
Membership functions:
low(t) = 1 - ( t / 10 )
high(t) = t / 10
0.68
Low High
0.32
0
Crisp Inputs X=0.32 Y=0.61 t
3
Low(x) = 0.68, High(x) = 0.32, Low(y) = 0.39, High(y) = 0.61
Create rule base
Rule 1: If x is low AND y is low Then z is high
1
Low High
0.61
0.39
0
t 6
Defuzzification Max
tf (t )dt
Center of Gravity C Min
Max
f (t )dt
Min
1
Low High
Center of Gravity
0.61
0.39
0
t
Crisp output 7
A Real Fuzzy Logic System
The subway in Sendai, Japan uses a fuzzy
logic control system developed by Serji
Yasunobu of Hitachi.
It took 8 years to complete and was finally put
into use in 1987.
8
Control System
Based on rules of logic obtained from train
drivers so as to model real human decisions
as closely as possible
9
The results of the fuzzy logic controller for the
Sendai subway are excellent!!
The train movement is smoother than most
other trains
Even the skilled human operators who
sometimes run the train cannot beat the
automated system in terms of smoothness or
accuracy of stopping
10
Fuzzy Logic
Interpretation Domain Fuzzy Sets
u _Fast u _Dangerous
0 0
0 0
10 0.01
10 0.05
20 0.02
20 0.1
30 0.05
30 0.15
40 0.1
40 0.2
50 0.4
50 0.3
60 0.8
60 0.7
70 0.9 70 1
80 1 80 1
11
Fuzzy logic proposition: X is fast or Y is dangerous
0 10 20 30 40 50 60 70 80
80 1 1 1 1 1 1 1 1 1
12
Homework:
13
Example II
14
Example II
Linguistic Linguistic Linguistic Linguistic
Variable Value Variable Value
x, T ( x),U , G, M
Name
Term Set
Universe
Syntactic Rule
Semantic Rule
16
Example
A linguistic variable is characterized by a quintuple
age
x, T ( x),U , G, M
Example semantic rule:
old, very old, not so old,
G(age) more or less young, M (old) u, old (u ) u [0,100]
quite young, very young
0 u [0,50]
1
old (u ) u 50 2
[0, 100] 1 5 u [50,100]
17
Example II
Linguistic Variable : temperature
Linguistics Terms (Fuzzy Sets) : {cold, warm, hot}
(x)
cold warm hot
1
20 60 x
18
Classical Implication
AB
A B A
T
B
T
A B
T
A
1
B
1
A B
1
T F F 1 0 0
F T T 0 1 1
F F T 0 0 1
19
AB
AB
A B
1 1 1
1 0 0
1 A ( x) B ( y ) 0 1 1
AB ( x, y) 0 0 1
B ( y) otherwise
A B A
1
B
1
A B
1
1 0 0
AB ( x, y) max 1 A ( x), B ( x) 0 1 1
0 0 1 20
A B AB
1 1 1
Modus Ponens 1 0 0
0 1 1
0 0 1
AB A B If A then B
A A A is true
B B B is true
21
A B If x is A then y is B.
antecedent consequence
or or
premise conclusion
22
Examples
A B If x is A then y is B.
A B If x is A then y is B.
R
Interpretations of A B
B B
xx xx
A A 25
R x, y AB x, y ?
Interpretations of A B
B B
xx xx
A 26
R x, y AB x, y ?
Interpretations of A B
A entails B (not A or B)
A coupled with B
• Material implication
A entails B
y y
R A B A B
• Propositional calculus
R A B A ( A B)
B
• Extended propositional calculus B
R A B (A B) B
• Generalization of modus ponens
xx xx
1 A ( x) B ( y )
R ( x, y)
B ( yA
) otherwise A 27
R x, y AB x, y ?
Interpretations of A B
A entails B (not A or B)
• Material implication
R A B A B R ( x, y) max 1 A ( x), B ( x)
• Propositional calculus
R A B A ( A B) R ( x, y) max 1 A ( x), min A ( x), B ( x)
• Extended propositional calculus
R A B (A B) B R ( x, y) max 1 max A ( x), B ( x) , B ( x)
• Generalization of modus ponens
1 A ( x) B ( y )
R ( x, y)
B ( y) otherwise 28
Generalized Modus Ponens
Rule: if x is A then y is B
Fact: x is A’
Conclusion: y is B’
29
Fuzzy Reasoning
Single Rule with Single Antecedent
Rule: if x is A then y is B
Fact: x is A’
Conclusion: y is B’
( x) ( y)
A A’ B
30
x y
R ( x, y) A ( x) B ( y)
Fuzzy Reasoning
Single Rule with Single Antecedent
Max-Min Composition
Rule: if x is A then y is B
B ( y) max x min A ( x), R ( x, y)
Fact: x is A’
x A ( x) R ( x, y)
x A ( x) A ( x) B ( y)
Conclusion: y is B’
x A ( x) A ( x) B ( y )
Firing
Strength Firing Strength
( x) ( y)
A A’ B
B 31
x y
R ( x, y) A ( x) B ( y)
Fuzzy Reasoning
Single Rule with Single Antecedent
Max-Min Composition
Rule: if x is A then y is B
B ( y) max x min A ( x), R ( x, y)
Fact: x is A’
x A ( x) R ( x, y)
x A ( x) A ( x) B ( y)
Conclusion: y is B’
x A ( x) A ( x) B ( y )
B A ( A B)
( x) ( y)
A A’ B
B 32
x y
Fuzzy Reasoning
Single Rule with Multiple Antecedents
Fact: x is A and y is B
Conclusion: z is C
33
Fuzzy Reasoning
Single Rule with Multiple Antecedents
Fact: x is A’ and y is B’
Conclusion: z is C’
( x) ( y) ( z)
A A’
B’ B C
34
x y z
R A B C
Rule: if x is A and y is B then z is C
Max-Min Composition
C ( y ) max x , y min A, B ( x, y ), R ( x, y, z )
x , y A, B ( x, y ) R ( x, y, z )
x, y A ( x) B ( y) A ( x) B ( y) C ( z)
x A ( x) A ( x) y B ( y ) B ( y ) C ( z )
Firing Strength
( x) ( y) ( z)
A A’
B’ B C
C 35
x y z
R A B C
Rule: if x is A and y is B then z is C
Max-Min Composition
C ( y ) max x , y min A, B ( x, y ), R ( x, y, z )
x , y A, B ( x, y ) R ( x, y, z )
C A
( x
) B y)
(
x, y (
A
x) A ( y) Bz) C
B ( A B C
x A ( x) A ( x) y B ( y ) B ( y ) C ( z )
Firing Strength
( x) ( y) ( z)
A A’
B’ B C
C 36
x y z
Fuzzy Reasoning
Multiple Rules with Multiple Antecedents
37
Rule1: if x is A1 and y is B1 then z is C1
Rule2: if x is A2 and y is B2 then z is C2
Fact: x is A’ and y is B’
Conclusion: z is C’
Fuzzy Reasoning
Multiple Rules with Multiple Antecedents
( x) ( y) ( z) C1
A’ A1 B1 B’
x y z
( x) ( y) ( z)
A’ A2 B2 B’ C2
x y z
38
Rule1: if x is A1 and y is B1 then z is C1
Rule2: if x is A2 and y is B2 then z is C2
Fact: x is A’ and y is B’
Conclusion: z is C’
Fuzzy Reasoning
Multiple Rules with Multiple Antecedents
Max-Min Composition
( x) ( y) ( z) C1
A’ A1 B1 B’
C1
x y z
( x) ( y) ( z)
A’ A2 B2 B’ C2
C2
x y z
Max
C A B R1 R2
( z)
A B R1 A B R2 C C1 C2
C1 C2 39
z
40
41