Professional Documents
Culture Documents
Fuzzy V Anil
Fuzzy V Anil
X
Fuzzifier
( X) Inference
Inference (Y) Defuzzifier Y
Fuzzifier Engine Defuzzifier
Engine
Fuzzy
Fuzzy
Knowledge
Knowledge
Base
Base
Fuzzification
Fuzzification
is the process of changing a real scalar value into a fuzzy value.
achieved with the different types of fuzzifiers (membership
functions).
0
10 30 50 70 90 110
Temp. (F°)
Membership Functions
Fuzzification
How cool is 36 F° ?
It is 30% Cool and 70% Freezing
0.7
0.3
0
10 30 50 70 90 110
Temp. (F°)
Fuzzification
Membership Functions
Membership Functions
The simplest membership functions are formed using straight lines.
The simplest is the triangular membership function, and it has the
function name trimf.
The trapezoidal membership function, trapmf, has a flat top and
really is just a truncated triangle curve. These straight line membership
functions have the advantage of simplicity.
Fuzzification
Membership Functions
Two membership functions are built on the Gaussian distribution
curve: a simple Gaussian curve and a two-sided composite of two
different Gaussian curves. The two functions are gaussmf and
gauss2mf. The generalized bell membership has the function name
gbellmf.
Membership Functions
Although the Gaussian membership functions and bell membership
functions achieve smoothness, they are unable to specify asymmetric
membership functions, which are important in certain applications.
Membership Functions
Polynomial based curves account for several of the membership
functions in the toolbox.
Three related membership functions are the Z, S, and Pi curves, all
named because of their shape. The function zmf is the asymmetrical
polynomial curve open to the left, smf is the mirror-image function
that opens to the right, and pimf is zero on both extremes with a rise
in the middle.
Fuzzy Logic Rule Base
Basil Hamed 10
Remarks
Basil Hamed 11
Fuzzy Logic Rule Base
Basil Hamed 12
Fuzzy Logic Rule Base
Basil Hamed 13
Fuzzy Logic Rule Base
Basil Hamed 14
EXAMPLE
Basil Hamed 15
EXAMPLE
Basil Hamed 16
Fuzzy Logic Rule Base
Basil Hamed 17
Fuzzy Logic Rule Base
Basil Hamed 18
Fuzzy Logic Process
“Crisp” Input Fuzzification
“Fuzzy” Input
Fuzzy Logic
-or-
F.A.M.
“Fuzzy” Output
De-Fuzzification “Crisp” Output
Basil Hamed 19
Fuzzy Inference Systems
Fuzzy inference (reasoning) is the actual
process of mapping from a given input to an
output using fuzzy logic.
Inference
Input Fuzzifier Defuzzifier Output
Engine
Fuzzy
Knowledge base
Fuzzy Inference Systems
Input Fuzzifier
Inference
Defuzzifier Output
Engine
Fuzzy
Knowledge base
The steps of fuzzy reasoning (inference operations upon fuzzy IF–THEN rules)
performed by FISs are:
1. Compare the input variables with the membership functions on the antecedent
part to obtain the membership values of each linguistic label. (this step is often
called fuzzification.)
3. Generate the qualified consequents (either fuzzy or crisp) or each rule depending
on the firing strength.
4. Aggregate the qualified consequents to produce a crisp output. (This step is called
defuzzification.)
Fuzzy Knowledge Base
Inference
Input Fuzzifier Defuzzifier Output
Engine
Fuzzy
Knowledge base
The rule base and the database are jointly referred to as the knowledge
base.
•a rule base containing a number of fuzzy IF–THEN rules;
•a database which defines the membership functions of the fuzzy sets
used in the fuzzy rules
Fuzzifier
Inference
Input Fuzzifier Defuzzifier Output
Engine
Fuzzy
Knowledge base
Inference Engine
Input Fuzzifier Defuzzifier Output
Engine
Fuzzy
Knowledge base
Fuzzy
Knowledge base
Fuzzy
Knowledge base
Basil Hamed 40
DEFUZZIFICATION
Defuzzification strategy is aimed at producing a non-fuzzy control
action, or can say defuzzification means the conversion of the
fuzzy output values into crisp values. For example, if we say "the
output force must be large" and large variable takes the values
between (70, 90) N, then what is the force will be needed 75 or 80
or …N, we can know what is the force we want by using
defuzzification method. There are different types of
defuzzification methods.
Basil Hamed 41
Inference
Input Fuzzifier Defuzzifier Output
Engine
Defuzzification
Fuzzy
Knowledge base
Basil Hamed 42
Inference
Defuzzification
Input Fuzzifier Defuzzifier Output
Engine
Fuzzy
Knowledge base
Basil Hamed 43
Inference
Defuzzification
Input Fuzzifier Defuzzifier Output
Engine
Fuzzy
Knowledge base
A ( z ) zdz
zCOA Z
,
Z
A ( z )dz
zdz
z BOA zMOM Z
,
A ( z )dz A ( z )dz ,
Z
dz
zBOA
where Z {z; A ( z ) *}
Basil Hamed 44
Centroid
It finds the point where a vertical line would slice
the aggregate set into two equal masses.
Mathematically this centre of gravity (COG) can be
expressed as:
x x dx
A
COG a
b
x dx
a
A
Centroid defuzzification method finds a point
representing the centre of gravity of the fuzzy set, A,
on the interval, ab.
A reasonable estimate can be obtained by
calculating it over a sample of points.
(x)
1.0
0.8
0.6 A
0.4
0.2
a b
0.0 X
150 160 170 180 190 200 210
Centre of gravity (COG):
(0 10 20) 0.1 (30 40 50 60) 0.2 (70 80 90 100) 0.5
COG 67.4
0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.5 0.5 0.5 0.5
Degree of
Membership
1.0
0.8
0.6
0.4
0.2
0.0
0 10 20 30 40 50 60 70 80 90 100
67.4 Z
Centroid
Basil Hamed 48
Defuzzification Methods
Max-membership principle
1
c(Z*) c(z) z Z
z* z
Centroid principle
1
c ( z ) zdz
z
*
c ( z )dz
z* z
Basil Hamed 49
Defuzzification Methods
c ( z ) z .9
z
* ~
c ( z ) .5
~
0 a b z
Mean-max membership
(middle-of-maxima method)
1
z * a b 2
0 a z* b z
Basil Hamed 51
Defuzzification Methods
Example 4.3:
A railroad company intends to lay a new rail line in a particular part of a
county. The whole area through which the new line is passing must be
purchased for right-of-way considerations. It is surveyed in three stretches,
and the data are collected for analysis. The surveyed data for the road are
given by the sets B~ 1,B~ 2 and B~ 3 , where the sets are defined on the universe of
right-of-way widths, in meters. For the railroad to purchase the land, it must
have an assessment of the amount of land to be bought. The three surveys
on the right-of-way width are ambiguous , however, because some of the
land along the proposed railway route is already public domain and will not
need to be purchased. Additionally, the original surveys are so old (circa
1860) that some ambiguity exists on the boundaries and public right-of-way
for old utility lines and old roads. The three fuzzy sets B~ 1,B~ 2 and B~ 3 , shown in
the figures below, represent the uncertainty in each survey as to the
membership of the right-of-way width, in meters, in privately owned land.
We now want to aggregate these three survey results to find the single most
nearly representative right-of-way width (z) to allow the railroad to make its
initial estimate
Basil Hamed 52
Defuzzification Methods
Basil Hamed 53
Defuzzification Methods
Centroid method:
z *
( z ) zdz
B
~
( z )dz
B
~
1 4 z 3
3.6 5.5 6 7 8
0 (. 3 z ) zdz 1 (. 3 z ) dz 3.6 2 4
zdz (. 5) zdz 5.5 z 5 zdz 6 zdz 7 8 z zdz
1 4 z 3
.3 z dz (.3)dz
3.6 5.5 6 7 8
dz (.5)dz ( z 5)dz dz (8 z )dz
0 1 3.6
2 4 5.5 6 7
4.9meters
Basil Hamed 54
Defuzzification Methods
Weighted-Average Method:
z *
.3 2.5 .5 5 1 6.5
5.41meters
.3 .5 1
Basil Hamed 55
Defuzzification Methods
Basil Hamed 56
Defuzzification Methods
Basil Hamed 57
Defuzzification Methods
Basil Hamed 58
Defuzzification Methods
z *
( z ) zdz
B
~
( z)dz
B
~
Basil Hamed 60
Defuzzification Methods
z *
1 1.5 1 2 1 3
2.25
111
Basil Hamed 61
Defuzzification Methods
Basil Hamed 62
Defuzzification Methods
Center of sums Method
Faster than any defuzzification method
Involves algebraic sum of individual output fuzzy sets,
instead of their union
Drawback: intersecting areas are added twice.
z C z dz
n
z k 1
z *
~k
C z dz
n
z k 1 ~k
Center of largest area: If the output fuzzy set has at least two
convex sub regions, then the center of gravity (i.e., z∗ is
calculated using the centroid method) of the convex fuzzy sub
region with the largest area is used to obtain the defuzzified
value z∗ of the output
Basil Hamed 64
First (or last) of maxima: This method uses the overall output
or union of all individual output fuzzy sets Ck to determine
the smallest value of the domain with maximized
membership degree in Ck.
Basil Hamed 65
Picking a Method
Basil Hamed 66