6. 6 of 57
What Fuzzy Systems?
Confused
vague
blurred
7. 7 of 57
Fuzzy
he wrote that to handle biological systems "we need a radically
different kind of mathematics, the mathematics of fuzzy or cloudy
quantities which are not describable in terms of probability distributions"
1962
1965
Classical
control
Is a 160 m person is tall ?
True
Possibly True
9. 9 of 57
speed [m/s]
Human
knowledge-based
Rule-based
Fuzzy
IF AND
THEN
distance
speed
acceleration
small
speed is declining
maintain
IF distance perfect AND
speed is declining
THEN increase acceleration
10. 10 of 57
a self-parking car in 1983
Nissan has a patent saves
fuel
F U Z Z Y
App.
The fuzzy washing machines
were the first major consumer
products in Japan around
1990
the most advanced subway
system on earth in 1987
11. 11 of 57
Fuzzy Logic
Controller
Sensor
Fuzzification
Fuzzy
Inference
System
to be
controlled
Defuzzification
Membership
function of
input fuzzy set
Rule Base
Membership
function of
output fuzzy set
Feedback
12. 12 of 57
Defuzzification Methods
Centre of
largest area
Meanโmax
membership
Maxima
(MOM)
Max-membership Centre
of sums
Centroid
method
Approx. Centroid
method
13. 13 of 57
Mean of Maxima (MOM) 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 1 2 3 4 5 6 7 8
๐ต
Z
๐โ
=
๐ + ๐
๐ ๐โ =
๐ + ๐
๐
= ๐. ๐ ๐
14. 14 of 57
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 1 2 3 4 5 6 7 8
๐ต
Z
Centroid Method 2
also called center of area, center of gravity).
it is the most prevalent and physically appealing
of all the defuzzification methods
๐โ
=
๐. ๐ ร (๐ + ๐ + ๐) + ๐. ๐ ร (๐ + ๐) + ๐ ร (๐ + ๐)
(๐. ๐ ร ๐) + (๐. ๐ ร ๐) + (๐ ร ๐)
๐โ
= ๐. ๐๐ ๐
๐โ =
ฯ ๐(๐) ๐
ฯ ๐(๐)
16. 16 of 57
Autonomous driving car
distance
speed
acceleration
13 m
-2.5 m/s
?
Knowledge
Rule base
Distance to next car [ m ]
v.small small perfect big v.big
Speed
Change
[ ๐ ๐
]
declining -ve small zero +ve small +ve big +ve big
constant -ve big -ve small zero +ve small +ve big
growing -ve big -ve big -ve small zero +ve small
speed [m/s]
17. 17 of 57
speed [m/s]
Knowledge
Rule base
Distance to next car [ m ]
v.small small perfect big v.big
Speed
Change
[ ๐ ๐
]
declining -ve small zero +ve small +ve big +ve big
constant -ve big -ve small zero +ve small +ve big
growing -ve big -ve big -ve small zero +ve small
0.4 0.25
0.4
0.6
0.6
0.75
0.75
0.25
0.25
0.4
0.25
0.6
Rule 1: IF distance is small AND speed is declining
THEN acceleration zero
Rule 2: IF distance is small AND speed is constant
THEN acceleration negative small
Rule 3: IF distance is perfect AND speed is declining
THEN acceleration positive small
Rule 4: IF distance is perfect AND speed is constant
THEN acceleration zero
max
Take
min
20. 20 of 57
Washing Machine
40
30
?0
0.2
0.4
0.6
0.8
1
0 10 20 30 40 50 60 70 80 90 100
๐ต(weight)
Weight (g)
v.Light light Heavy V.heavy
0
0.2
0.4
0.6
0.8
1
0 10 20 30 40 50 60 70 80 90 100
ฮผ(Dirtiness)
Dirtiness (%)
Almost Clean Dirty Soiled Filthy
0
0.2
0.4
0.6
0.8
1
0 10 20 30 40 50 60 70 80 90 100
ฮผ(detergent)
Detergent (%)
v.Light little Much V.Much Maximum
Knowledge
Rule base
Weight [ Kg ]
V.Light Light Heavy V.Heavy
Dirtiness
Almost
Clean
V.Little Little Much Much
Dirty Little Little Much V.Much
Soiled Much Much V.Much Maximum
Filthy V.Much Much V.Much Maximum
weight
dirtiness
amount of
detergent output
21. 21 of 57
heavy dirty Much
heavy soiled V.Much
0
0.2
0.4
0.6
0.8
1
0 10 20 30 40 50 60 70 80 90 100
ฮผ(Dirtiness)
Dirtiness (%)
Almost Clean Dirty Soiled Filthy
0
0.2
0.4
0.6
0.8
1
0 10 20 30 40 50 60 70 80 90 100
๐ต(weight)
Weight (g)
v.Light light Heavy V.heavy
Light dirty little
Light soiled Much
0.4
0.4
0.40.8 0.80.6
0.60.2 0.20.2
0.6
0.2
Little 0.4
Much 0.6
V.Much 0.2
IF weight is light(0.4) AND dirtiness is dirty(0.8)
THEN detergent is little(0.4)
IF weight is light(0.4) AND dirtiness is soiled(0.2)
THEN detergent is Much(0.2)
IF weight is heavy(0.6) AND dirtiness is dirty(0.8)
THEN detergent is Much(0.6)
IF weight is heavy(0.6) AND dirtiness is soiled(0.2)
THEN detergent is V.Much(0.2)
25. 25 of 57
Service = 3
Food = 8
Rule 1 : IF Service is poor OR Food is rancid
THEN Tip is cheap
Rule 2 : IF Service is good THEN Tip is average
Rule 3 : IF Service is excellent OR Food is
delicious THEN Tip is generous
0.125
0.4
0
0
0.5
0.5
0.4
0.125
31. 31 of 57
Add the rules to the FIS05
Rule 1 : IF Service is poor OR Food is rancid
THEN Tip is cheap
Rule 2 : IF Service is good THEN Tip is average
Rule 3 : IF Service is excellent OR Food is
delicious THEN Tip is generous
1 - Index of membership function for first input
5 - Fuzzy operator (1 for AND, 2 for OR)
2 - Index of membership function for second input
3 - Index of membership function for output
4 - Rule weight
41. 41 of 57
Consider a system model is describe by:
๐ (๐) = ๐. ๐ ร ๐ (๐ โ ๐) + ๐(๐ โ ๐)
PI-Like FLC is designed to regulate this system around a set point of R=2. Five fuzzy sets are used
to represent the linguistic variables NB, NS, Z, PS and PB for the controller both input and output
variables. Triangular membership functions are used to represent these fuzzy sets and defined on the
normalized domain [-1,1] as shown in Fig. 1. The suggested rule-base is depicted in table. If the
measured parameters are obtained as y(k-1)=1.5 and u(k-1)=0.5,find the controller output signal
taking into account the actual domain of the controller variables is [-2, 2].
Knowledge
Rule base
e(k)
NB NS Z PS PB
โ ๐(๐)
NB NB NB NB NS Z
NS NB NB NS Z PS
Z NB NS Z PS PB
PS NS Z PS PB PB
PB Z PS PB PB PB
45. 45 of 57
PS Z PS
PS PS PB
Z Z Z
Z PS PS
0.1
0.1
0.10.85 0.850.9
0.90.15 0.150.1
0.85
0.15
IF e (k) is Z (0.1) AND โ๐(๐) is Z (0.85)
THEN โu(๐) is Z (0.1)
IF e (k) is Z (0.1) AND โ๐(๐) is PS (0.15)
THEN โu(๐) is PS (0.1)
IF e (k) is PS (0.9) AND โ๐(๐) is Z (0.85)
THEN โu(๐) is PS (0.85)
IF e (k) is PS (0.9) AND โ๐(๐) is PS (0.15)
THEN โu(๐) is PB (0.15)
Knowledge
Rule base
e(k)
NB NS Z PS PB
โ ๐(๐)
NB NB NB NB NS Z
NS NB NB NS Z PS
Z NB NS Z PS PB
PS NS Z PS PB PB
PB Z PS PB PB PB
Z 0.1
PS 0.85
PB 0.15
48. 48 of 57
Tank Level Control System
5 cm ?
0
0.25
0.5
0.75
1
1.25
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
๐ต(Level)
Liquid level (cm)
low okay high
0
0.5
1
-30 -25 -20 -15 -10 -5 0 5 10 15 20 25 30
๐ต(valvecontrol)
Valve control signal (%/s)
close fast no change open fast
Rule 1 : IF level is okay THEN valve is no change
Rule 2 : IF level is low THEN valve is open fast
Rule 3 : IF level is high THEN valve is close fast
Liquid level
Valve control
signal
55. 55 of 57
References
[1] L.-X. Wang, A Course in Fuzzy Systems and Control. Prentice Hall PTR, 1997.
[2] S. N. Sivanandam, S. Sumathi, and S. N. Deepa, Introduction to Fuzzy Logic using MATLAB.
Springer, 2006.
[3] T. J. Ross, Fuzzy Logic with Engineering Applications, 2nd ed. Wiley, 2004.
[4] Essam Nabil, โAutonomous driving car,โ March,2019, pp. 1โ13.[presentation].
[5] Essam Nabil, โFuzzy logic control system applications,โ March,2019, pp. 1-30 .[presentation].
[6] Essam Nabil, โTipping problem,โ March,2019, pp. 1โ18.[presentation].
56. 56 of 57
References
[7] โBuild Fuzzy Systems Using Fuzzy Logic Designer - MATLAB & Simulink.โ [Online]. Available:
https://www.mathworks.com/help/fuzzy/building-systems-with-fuzzy-logic-toolbox-
software.html. [Accessed: 22-Nov-2019].
[8] โBuild Fuzzy Systems at the Command Line - MATLAB & Simulink.โ [Online]. Available:
https://www.mathworks.com/help/fuzzy/working-from-the-command-line.html.
[Accessed: 22-Nov-2019]
[9] Essam Nabil, โTank control systemโ March,2019, pp. 1โ18.[presentation].
[10] Essam Nabil, โPID - Like Fuzzy Logic controlโ March,2019, pp. 1โ39.[presentation].