Fuzzy Logic English Lecture
Fuzzy Logic English Lecture
Overview:
Why Fuzzy
Fuzzy Logic and Sets
Fuzzy Reasoning
1
Vague concepts
- at least 1.80 m?
- could Frank be 1.78 m and be still tall?
- if Frank is a basketball player
is 1.80m still tall?
- if Frank is a kid of 10 years and 1.80 m
isn’t Frank very tall?
2
Fuzzy Logic - I
Fuzzy Logic - II
3
Fuzzy set
Crisp set (tall men):
Representing a domain
Fuzzy sets (men’s height):
4
Membership function
10
5
Fuzzy logic
11
12
6
Linguistic variables
13
14
7
Interpretation of hedges
15
Fuzzy rules
16
8
Fuzzy rule example
IF height is tall
THEN weight is heavy.
17
18
9
Applying fuzzy rules
19
Multiple antecedents
IF x is A AND y is B THEN z is C
IF x is A OR y is B THEN z is C
Use unification (OR) or intersection (AND) operations to
calculate a membership value for the whole antecedent.
AND: µC(z) = min(µA(x), µB(y))
OR: µC(z) = max(µA(x), µB(y))
20
10
Multiple consequents
IF x is A THEN y is B AND z is C
21
Fuzzy Events
Fuzzy probabilities:
What is the probability of meeting a tall man?
P(x is A) =
Where
µA(x) is the membership function of elements in A
P(x) is the probability of x
• (Empirical evidence)
22
11
Fuzzy probability
°C 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
P .002 .005 .005 .01 .04 .11 .15 .21 .16 .14 .11 .04 .01 .005 .002
23
Using hedges
0.8
24
12
Fuzzy Inference
25
Rule 1
w1
X is A1 y is B1
Rule 2 defuzzifier
X is A2 y is B2
w2
X
Fuzzy
…
aggregator y
Rule r
X is Ar y is Br
wr
26
13
Step 1: Fuzzification
27
28
14
Step 3: Result Aggregation
29
30
15
Step 4: Defuzzification (Mamdani)
31
Step 4: Defuzzification
32
16
Sugeno Fuzzy Models
33
Exercise
34
17
Rules
35
Mary?
36
18
Membership function: Exercise
Mary?
37
Mary?
38
19
Mamdani inference
39
Step 1: fuzzification
µgooddiet(2500) = 0,8
µhighexer(1000) = 0
µlowexer(1000) = 1
40
20
Step 2: rule evaluation
Rule1:
IF diet is poor (0,6) AND exercise is low (1) THEN risk
is high
µA∧B(x) = min(µA(x), µB(x)) = 0,6
Consequent is true to the same degree as the composition
of antecedent
µriskhigh(Mary) = 0,6
41
42
21
Step 2 (continuation)
43
Step 3: Aggregation
Note that “low” has been clipped down to zero, and “average” hasn’t
been clipped, because the derived µ was higher than the original
membership function.
The aggregate is simply the union of the three functions.
44
22
Step 4: Defuzzification
Centroid technique
COG = 70
45
Result
46
23
Advantages of Fuzzy Logic
47
48
24