Professional Documents
Culture Documents
0.68
Low High
0.32
0
Crisp Inputs X=0.32 Y=0.61 t
3
Inference
⚫ Rule1: low(x)=0.68, low(y)=0.39 => Rule strength
high(z)=MIN(0.68,0.39)=0.39
1
Low High
0.61
0.39
0
t
5
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
6
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
7
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
8
• Air-conditioning involves the delivery of air which can be warmed or cooled and have
its humidity raised or lowered.
• Consider Johnny’s air-conditioner which has five control switches: COLD, COOL,
PLEASANT, WARM and HOT. The corresponding speeds of the motor controlling the
fan on the air-conditioner has the graduations: MINIMAL, SLOW, MEDIUM, FAST and
BLAST.
16
• The rules governing the air-conditioner are as follows:
RULE 1:
IF TEMP is COLD THEN SPEED is MINIMAL
RULE 2:
IF TEMP is COOL THEN SPEED is SLOW
RULE 3:
IF TEMP is PLEASANT THEN SPEED is MEDIUM
RULE 4:
IF TEMP is WARM THEN SPEED is FAST
RULE 5:
IF TEMP is HOT THEN SPEED is BLAST
17
The temperature graduations are related
to Johnny’s perception of ambient Temp COLD COOL PLEASANT WARM HOT
(0C).
temperatures.
0 Y* N N N N
where: 5 Y Y N N N
(0<A(x)<1) 12.5 N Y* N N N
15 N Y N N N
22.5 N N N Y* N
N : temp value is not a member of the set
(A(x)=0) 25 N N N Y N
27.5 N N N N Y
30 N N N N Y*
18
Johnny’s perception of the speed of Rev/sec MINIMAL SLOW MEDIUM FAST BLAST
0 Y* N N N N
10 Y N N N N
where: 20 Y Y N N N
(0<A(x)<1) 40 N Y N N N
50 N N Y* N N
80 N N N Y Y
90 N N N N Y
N : temp value is not a member of
the set (A(x)=0) 100 N N N N Y*
19
• The analytically expressed membership for the reference fuzzy subsets for the
temperature are:
• COLD:
for 0 ≤ t ≤ 10 COLD(t) = – t / 10 + 1
• SLOW:
for 0 ≤ t ≤ 12.5 SLOW(t) = t / 12.5
for 12.5 ≤ t ≤ 17.5 SLOW(t) = – t / 5 + 3.5
20
Temperature Fuzzy Sets
1
0.9
0.8 Cold
Truth Value
0.7
0.6 Cool
0.5 Pleasent
0.4
0.3
Warm
0.2 Hot
0.1
0
0 5 10 15 20 25 30
Temperature Degrees C
21
• The analytically expressed membership for the reference fuzzy subsets for the temperature are:
• MINIMAL:
for 0 ≤ v ≤ 30 COLD(t) = – v / 30 + 1
• SLOW:
for 10 ≤ v ≤ 30 SLOW(t) = v / 20 – 0.5
for 30 ≤ v ≤ 50 SLOW(t) = – v / 20 + 2.5
22
Speed Fuzzy Sets
1
0.8 MINIMAL
Truth Value
0.6 SLOW
MEDIUM
0.4
FAST
0.2 BLAST
0
0 10 20 30 40 50 60 70 80 90 100
Speed
23
⚫ Consider an air conditioning system that determine the best
circulation level by sampling temperature and moisture levels. The
inputs are the current temperature and moisture level. The fuzzy
system outputs the best air circulation level: “none”, “low”, or “high”.
The following fuzzy rules are used:
24
Inference
⚫ suppose that the system has measured temperature and moisture
levels and mapped them to the fuzzy values of .7 and .1 respectively.
The system now infers the truth of each fuzzy rule. To do this a simple
method called MAX-MIN is used. This method sets the fuzzy value of
the THEN clause to the fuzzy value of the IF clause. Thus, the method
infers fuzzy values of 0.7, 0.1, and 0.1 for rules 1, 2, and 3 respectively.
25
Composition
⚫ Combines all fuzzy conclusions obtained by inference into a single
conclusion. Since different fuzzy rules might have different
conclusions, consider all rules.
⚫ each inference suggests a different action
⚫ rule 1 suggests a "high" circulation level
⚫ A simple MAX-MIN method of selection is used where the maximum fuzzy value
of the inferences is used as the final conclusion. So, composition selects a fuzzy
value of 0.7 since this was the highest fuzzy value associated with the inference
conclusions. 26
Defuzzification
⚫ Convert the fuzzy value obtained from composition into a “crisp”
value. This process is often complex since the fuzzy set might
not translate directly into a crisp value.Defuzzification is
necessary, since controllers of physical systems require discrete
signals.
⚫ composition outputs a fuzzy value of 0.7. This imprecise value is not directly
useful since the air circulation levels are “none”, “low”, and “high”. The
defuzzification process converts the fuzzy output of 0.7 into one of the air
circulation levels. In this case it is clear that a fuzzy output of 0.7 indicates
that the circulation should be set to “high”. 27