You are on page 1of 41

Design of Washing Machine

and Air Conditioner


Dr. Ramkumar P.B
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

Low(x) = 0.68, High(x) = 0.32, Low(y) = 0.39, High(y) = 0.61 2


Create rule base
⚫ Rule 1: If x is low AND y is low Then z is high

⚫ Rule 2: If x is low AND y is high Then z is low

⚫ Rule 3: If x is high AND y is low Then z is low

⚫ Rule 4: If x is high AND y is high Then z is high

3
Inference
⚫ Rule1: low(x)=0.68, low(y)=0.39 => Rule strength
high(z)=MIN(0.68,0.39)=0.39

⚫ Rule2: low(x)=0.68, high(y)=0.61 =>


low(z)=MIN(0.68,0.61)=0.61

⚫ Rule3: high(x)=0.32, low(y)=0.39 =>


low(z)=MIN(0.32,0.39)=0.32

⚫ Rule4: high(x)=0.32, high(y)=0.61 =>


high(z)=MIN(0.32,0.61)=0.32
4
Composition
•Low(z) = MAX(rule2, rule3) = MAX(0.61, 0.32) = 0.61
•High(z) = MAX(rule1, rule4) = MAX(0.39, 0.32) = 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

Fuzzy set Fast Fuzzy set Dangerous

7
Fuzzy logic proposition: X is fast or Y is dangerous

0 10 20 30 40 50 60 70 80

0 0 0.05 0.1 0.15 0.2 0.3 0.7 1 1

10 0.01 0.05 0.1 0.15 0.2 0.3 0.7 1 1

20 0.02 0.05 0.1 0.15 0.2 0.3 0.7 1 1

30 0.05 0.05 0.1 0.15 0.2 0.3 0.7 1 1

40 0.1 0.1 0.1 0.15 0.2 0.3 0.7 1 1

50 0.4 0.4 0.4 0.4 0.4 0.4 0.7 1 1

60 0.8 0.8 0.8 0.8 0.8 0.8 0.8 1 1

70 0.9 0.9 0.9 0.9 0.9 0.9 0.9 1 1

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.

• An air-conditioner is an apparatus for controlling, especially lowering, the temperature


and humidity of an enclosed space. An air-conditioner typically has a fan which
blows/cools/circulates fresh air and has cooler, and the cooler is under thermostatic
control. Generally, the amount of air being compressed is proportional to the ambient
temperature.

• 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

Y : temp value belongs to the set 10 N Y N N N

(0<A(x)<1) 12.5 N Y* N N N

15 N Y N N N

Y* : temp value is the ideal member to the 17.5 N N Y* N N


set (A(x)=1)
20 N N N Y 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

the motor is as follows: (RPM)

0 Y* N N N N

10 Y N N N N
where: 20 Y Y N N N

Y : temp value belongs to the set 30 N Y* N N N

(0<A(x)<1) 40 N Y N N N

50 N N Y* N N

Y* : temp value is the ideal member 60 N N N Y N

to the set (A(x)=1) 70 N N N Y* 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

• etc… all based on the linear equation:


y = ax + b

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

• etc… all based on the linear equation:


y = ax + b

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:

1. If the room is hot, circulate the air a lot.

2. If the room is cool, do not circulate the air.

3. If the room is cool and moist, circulate the air slightly.


⚫ A knowledge engineer determines membership functions that map temperatures
to fuzzy values and map moisture measurements to fuzzy values.

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

⚫ rule 2 suggests turning off air circulation

⚫ rule 3 suggests a "low" 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

You might also like