fuzzy fuzzification and defuzzification

7,310 views 38 slides Dec 04, 2019
Slide 1
Slide 1 of 38
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38

About This Presentation

it illustrates what is fuzzy logic and the methods of fuzzification and defuzzification


Slide Content

1of 38
FUZZY LOGIC
Menoufia University
Faculty of Electronic Engineering
11/2019

2of 38
Agenda
Introduction to Fuzzy01
Fuzzification Methods 02
Defuzzification Methods 03
References 04

3of 38
What Fuzzy Systems?
Confused
vague
blurred

4of 38
Human
knowledge-based
Rule-based
Fuzzy
IF AND
THEN
distance
speed
acceleration
small
speedis declining
maintain
IF distanceperfect AND
speedis declining
THEN increase acceleration
speed [m/s]

5of 38
Types of fuzzy systems
Fuzzy systems with
fuzzifier and defuzzifier
pure fuzzy system
its inputsand outputsare
fuzzysets (natural languages)
in engineering systems the
inputs and outputs are real-
valued variables.
problem
Takagi-Sugeno-Kang
(TSK) fuzzy systems
problem
1-mathematical formula may not
provide a natural framework of
human knowledge.
2-there is notmuch freedomleft to
apply different principles in fuzzy

6of 38
aself-parkingcarin1983
Nissanhasapatentsaves
fuel
FUZZY
App.
The fuzzy washing machines
were the first major consumer
products in Japan around
1990
themostadvancedsubway
systemonearthin1987

7of 38
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

8of 38
Classification of fuzzy sets
Convex
fuzzy set
Non-Convex
fuzzy set
Normal
fuzzy set
Sub-normal
fuzzy set

9of 38
Types of membership function
��=
�,�≤�
�−�
�−�
,�≤�≤�
�−�
�−�
,�≤�≤�
�,�≥�
Triangular
��=
�,�≤�
�−�
�−�
,�≤�≤�
�,�≤�≤�
�−�
�−�
,�≤�≤�
�,�≥�
Trapezoidal
��=���
−�−�
�
�??????
�
Gaussian

10of 38
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-vesmall zero +vesmall+vebig +vebig
constant -vebig-vesmall zero +vesmall+vebig
growing -vebig -vebig-vesmall zero +vesmall
speed [m/s]

11of 38
speed [m/s]
Knowledge
Rule base
Distance to next car [ m ]
v.small small perfect big v.big
Speed
Change
[�
�
]
declining-vesmallzero +vesmall+vebig+vebig
constant-vebig-vesmall zero +vesmall+vebig
growing -vebig-vebig-vesmall zero +vesmall
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 smallAND speed is declining
THENacceleration zero
Rule 2:IF distance issmallAND speed is constant
THEN acceleration negative small
Rule 3:IF distance isperfectAND speed is declining
THEN acceleration positive small
Rule 4:IF distance is perfectAND speed is constant
THEN acceleration zero
max
Take
min

12of 38
Defuzzification using Weighted average

13of 38
Fuzzification Methods
Genetic Algorithm
Angular fuzzy sets
Rank ordering
Inductive
Reasoning
Intuition Neural Networks
Inference

14of 38
Intuition
ownintelligenceand understanding.
contextualand semanticknowledge.
linguistic truth values.
(see Zadeh, 1972).
1

15of 38
Inference 2
We wish to deduce a conclusion, given a body of facts and knowledge.
the one we illustrate here relates to our formal knowledge of geometry and geometric shapes
U = {(A,B,C) | A ≥ B ≥ C ≥ 0 ; A + B + C = 180◦}
Isosceles triangle (I) �
??????�,�,�=�−
�
��°
���(�−�,�−�)
Right triangle (R) �
??????�,�,�=�−
�
��°
|�−��°|
Other triangles (O) �
��,�,�=�−���
�
��°
����−�,�−�,
�
��°
|�−��°|t
Types of triangles:

16of 38
e.g4-1 Define the triangle for the figure shown in Figure with
the three given angles.

17of 38
Rank ordering 3
Preference is determined by pairwise comparisons
these determine the ordering of the membership.
Suppose 1000 peoplerespond to a questionnaireabout
their pairwise preferences among five colors, X = {red,
orange, yellow, green, blue}. Define a fuzzy set as A
on the universe of colors “best color.”

18of 38
Angular fuzzy sets 4
The linguistic terms
1-Fully anticlockwise (FA) ??????=
??????
�
2-Partially anticlockwise (PA) ??????=
??????
�
3-No rotation (NR) ??????=�
4-Partially clockwise (PC) ??????=−
??????
�
5-Fully clockwise (FC) ??????=−
??????
�
The angular fuzzy set
universe angles
repeating every 2Πcycles.
linguistic values vary with θ on the unit circle
membership values μ(θ).

19of 38
�
��=����??????
??????????????????�??????�=??????��??????
Angular fuzzy membership function
�
��
�
The values for membership functions

20of 38
Neural networks 5
Aneuralnetworkisatechnique
thatseekstobuildanintelligent
programusingmodelsthatsimulate
theworkingnetworkofthe
neuronsinthehumanbrain

21of 38
Genetic Algorithm 6
Genetic algorithm (GA) uses the concept of Darwin’s theory
of evolution “survival of the fittest.” postulated that the new
classes of living things came into existence through
the processof reproduction, selection, crossover, and
mutationamong existing organisms.
selection cross-over mutation
Fitness
Function
Initial
Population

22of 38
Inductive Reasoning 7

23of 38
EntropyInduction

24of 38
Inductive Reasoning 7
Theinductionisperformedbytheentropy
minimizationprinciple,whichclustersmost
optimallytheparameterscorrespondingto
theoutputclasses[DeLucaandTermini,
1972].
Particular General
usefulfor complex static systems
not useful for dynamicsystems
1-subdivide our dataset into membership functions
2-determine a threshold line with an entropy
minimization
3-startthe segmentationprocess by moving an
imaginary thresholdvalue x between x1 and x2
4-calculate entropy for each value of x.

25of 38
Defuzzification Methods
Centre of
largest area
Mean–max
membership
Weighted average
Maxima
Max-membership Centre
of sums
Centroid
method

26of 38
Lambda Cut (??????
??????��)
Properties of Lambda Cut Sets:
1-�∪�
�=�
�∪�
�
2-�∩�
�=�
�∩�
�
3-ഥ�
�≠�
���������??????���������=�.�
4-??????�??????�≤�(�),���??????��(�)������������
??????��=
�.�
�
�
+
�.�
�
�
+
�.�
�
�
+
�.�
�
�
+
�.�
�
�
,�����
�.�
�
�.�=
�
�
�
+
�
�
�
+
�
�
�
+
�
�
�
+
�
�
�

27of 38
Max-membership 1
�

This method is given by the expression
�(�

)≥�(�)
This method is also referred as height method

28of 38
Arailroadcompanyintendstolayanewraillineina
particularpartofacounty.Thewholeareathroughwhichthenewlineis
passingmustbepurchasedforright-of-wayconsiderations.Itissurveyed
inthreestretches,andthedataarecollectedforanalysis.Thesurveyed
datafortheroadaregivenbythesets,�
1,�
2,�
3,Wherethesetsare
definedontheuniverseofright-of-waywidths,inmeters.Fortherailroad
topurchasetheland,itmusthaveanassessmentoftheamountoflandto
bebought.Thethreesurveysonright-of-waywidthareambiguous,
however,becausesomeofthelandalongtheproposedrailwayrouteis
alreadypublicdomainandwillnotneedtobepurchased.Additionally,the
originalsurveysaresoold(circa1860)thatsomeambiguityexistson
boundariesandpublicright-of-wayforoldutilitylinesandoldroads.The
threefuzzysets,�
1,�
2,�
3,showninthefollowingfigures,respectively,
representtheuncertaintyineachsurveyastothemembershipofright-of-
waywidth,inmeters,inprivatelyownedland.Wenowwanttoaggregate
thesethreesurveyresultstofindthesinglemostnearlyrepresentative
right-of-waywidth(z)toallowtherailroadtomakeitsinitialestimateofthe
right-of-waypurchasingcost.Wewanttofind??????

.
Ex. 10
P.112

29of 38
Centroid method 2
also called center of area, center of gravity).
it is the most prevalent and physically
appealing of all the defuzzification methods
�

=
׬����??????
׬���??????
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
�

=�.��

30of 38
Weighted average 3
This method only for symmetrical output
membership function.
each membership function in the obtained output
by its largest membership Value.
�

=
σ�(�)�
σ�(�)
�

=
�.��.�+�.��+(��.�)
�.�+�.�+�
�

=�.���
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
�

=�.���

31of 38
Mean–max membership 4
This method is related to max-membershipWhich
needs a single point, while Mean–max
membershipcan be a range.
�

=
�+�
�
=�.��
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
�

=�.��
�

=
�+�
�

32of 38
Centre of sums 5
This is one of the most commonly used
defuzzification technique. In this method, the
overlapping area is counted twice
�
�=�.��.��+�=�.�
�
�=�.��.��+�=�.�
�
�=��.��+�=�
�

=
�.��.�+�.��+(��.�)
�.�+�.�+�
=��
�

=
σ
�=�
�
�
��
�
σ
�=�
�
�
�
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
�

=5m
�
1
�
2
�
3

33of 38
Center of largest area 6
�

=
׬�
��
���??????
׬�
��
��??????
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
�

=4.9m
�
1
�
2
If the output fuzzy set has at least two convex subregions,
Then ??????

is calculated using the centroid method.
�
??????: is the convex subregion that has the largest area

34of 38
Maxima 7
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
Z

=6
First of Maxima Method (FOM)
1
2
Z

=7
Last of Maxima Method (LOM)
3
Z

=
6+7
2
=6.5
Mean of Maxima Method (MOM)

35of 38
Defuzzification Methods
Centre of
largest area
Mean–max
membership
Weighted average
Maxima
Max-membership Centre
of sums
Centroid
method
�

=�.��
�

=�.���
�

=�.��
�

=��
�

=�.��
????????????��

=��
�??????��

=��
�??????��

=�.��

36of 38
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].

37of 38
Slide 1 : [1] man thinking [2] working man
Slide 6 : [2]subway
Slide 7 : [1]sensor [2]system to be controlled
Slide 10 : [1]car
Slide 21 : [1]block diagram of genetic algorithm[2]Steps in Genetic Algorithms
Slide 23 : [1]deductive & inductive reasoning[2]entropy [3]ice and water
Sources of images

38of 38
Thank You
Nourhan Selem Salm