Fuzzy terminologies: All you need to know
Fuzzy set is a natural way to deal with the imprecision.
Much real world representation relies on significance
rather than precision. Fuzzy logic is the best way to deal
with them. Fuzzy set is an extension of crisp set.
Alternatively, we can represent the fuzzy set using
tuple notation as,
A = { (1, 0.3), (2,1.0), (3, 0.3), (4, 0.0) }
In each tuple, the first value represents the element of
the set, and the second value represents its
membership in the set.
In a similar way, the membership value assigned by the
second function would be,
B = { (1, 0.7), (2,1.0), (3, 0.7), (4, 0.2) }
And finally, the third function will assign membership
value to the elements as shown below:
C = { (1, 0.9), (2,1.0), (3, 0.9), (4, 0.4) }
As we can see, the same elements have different
membership values for different functions.
It is quite obvious from the shape of the Gaussians that
if the element is in the centre of the gaussian, it will be
assigned the highest membership value, and as we
move away, the membership value decreases. As the
spread of gaussian increases, more and more elements
fall in the set and the elements near to edges are
assigned smaller and smaller membership values.
Fuzzy terminologies
Fuzzy terminologies define the properties of fuzzy sets. A complete
set of fuzzy terminologies is discussed here.
Support:
The support of a fuzzy set A is the set of all points x ∈ X such that
Support( A ) = { x | μA(x) > 0, x ∈ X }
μA(x) > 0
Graphically, we can define support of fuzzy set as,
Support of fuzzy set
Note: Support of fuzzy set is its Strong 0-cut (Discussed in the later
part of this article)
Core:
The core of a fuzzy set A is the set of all points x ∈ X such that μA(x) =
Core( A ) = { x | μA(x) = 1, x ∈ X }
1
All fuzzy sets might not have a core present in them.
The core of fuzzy set
Height of Fuzzy Set: It is defined as the largest membership value
of the elements contained in that set. It may not be 1 always. If the
core of the fuzzy set is non-empty, then the height of the fuzzy set is
1.
Boundary:
Boundary comprises those elements x of the universe such that 0 <
Boundary( A ) = { x | 0 < μA(x) < 1 , x ∈ X }
μA(x) < 1
We can treat boundary as the difference between support and core.
Graphically, it is represented as
The boundary of fuzzy set
Normality:
A fuzzy set A is normal if its core is non-empty.
In other words, a fuzzy set is normal if its height is 1
Sub-normal Fuzzy set: For a sub-normal fuzzy set, h( A ) < 1,
where h( A ) represents the height of the fuzzy set / highest
membership value in the fuzzy set.
Normality of fuzzy set
Crossover points:
A crossover point of a fuzzy set A is a point x ∈ X at which μA(x) = 0.5
Crossover( A ) = { x | μA(x) = 0.5 }
Graphically, we can represent it as
Cross-over points of fuzzy set
Bandwidth:
For a fuzzy set, the bandwidth (or width) is defined as the distance
between the two unique crossover points.
Bandwidth( A ) = |x1 – x2|
Where, μA(x1) = μA(x2) = 0.5
Graphically,
The bandwidth of fuzzy set
Fuzzy singleton:
A fuzzy set whose core is a single point in X with μ A(x) = 1, is called
a fuzzy singleton. In other words, if the fuzzy set is having only one
element with a membership value of 1, then it is called a fuzzy
singleton.
|A| = { μA(x) = 1 }
Graphically,
Fuzzy singleton
Symmetry:
Fuzzy set A is symmetric if its membership function around a centre
i.e. μA(x + c) = μA(x – c), ∀x ∈ X
point x = c is symmetric
Triangular, Trapezoidal, Gaussian etc. are mostly symmetric. This is
more natural to represent the membership than a non-symmetric
shape.
Symmetric fuzzy sets
Alpha cut:
The α-cut of a fuzzy set A is a crisp set defined by Aα = { x | μA(x) ≥
α}
Strong α-cut of a fuzzy set A is a crisp set defined by Aα+ = { x |
μA(x) > α }
Alpha cut in fuzzy set
The set Aα=0.2 contains all the elements from x 1 to xn, including
both end values
The set Aα=0.5 contains all the elements from x 2 to xm, including
both end values
The set Aα=1.0 contains all the elements from x 3 to xk, including
both end values
α1 > α2 then Aα1 ⊆ Aα2
For different values of α, we get different crisp sets. In general, if
Cardinality:
Scalar cardinality:
Scalar cardinality is defined by the summation of membership
values of all elements in the set. For the data given in the table,
| A | = Σx ∊ X { μA(x) }
|Senior| = 0.3 + 0.9 + 1 + 1 = 3.2
Relative cardinality:
|| A || = | A | / | X |
|| Senior || = 3.2 / 9 = 0.356
Fuzzy cardinality:
| A |F = { (α , μAα(x)) }
| Senior |F = { (4, 0.3), (3, 0.9), (2, 1.0) }
Fuzzy relation – Definition, types and
operations
A be a fuzzy set on universe X and B be a fuzzy set on
universe Y, then the Cartesian product between fuzzy
sets A and B will result in a fuzzy relation R which is
contained with the full Cartesian product space or it is a
subset of the cartesian product of fuzzy subsets.
Formally, we can define fuzzy relation as,
R=AxB
and
R ⊂ (X x Y)
where the relation R has a membership function,
μ (x, y) = μA B(x, y) = min( μA(x), μB(y) )
R x
A binary fuzzy relation R(X, Y) is called a bipartite
graph if X ≠ Y.
A binary fuzzy relation R(X, Y) is called directed
graph or digraph if X = Y. , which is denoted as R(X,
X) = R(X ) 2
Let A = {a , a , …, a } and B = {b , b , .., b }, then the
1 2 n 1 2 m
fuzzy relation between A and B is described by
the fuzzy relation matrix as,
We can also consider fuzzy relation as a mapping from
the cartesian space (X, Y) to the interval [0, 1]. The
strength of this mapping is represented by the
membership function of the relation for every tuple μ R(x, y)
Example:
Given A = { (a , 0.2), (a , 0.7), (a , 0.4) } and B = { (b ,
1 2 3 1
0.5), (b , 0.6)}, find the relation over A x B
2
Fuzzy relation
Fuzzy relations are very important because they can
describe interactions between variables.
Example: A simple example of a binary fuzzy relation
on X = {1, 2, 3}, called ”approximately equal” can be
defined as
R(1, 1) = R(2, 2) = R(3, 3) = 1
R(1, 2) = R(2, 1) = R(2, 3) = R(3, 2) = 0.8
R(1, 3) = R(3, 1) = 0.3
The membership function and relation matrix of R are
given by
R¯(x,y)=⎧⎩⎨1,0.7,0.3,ifx=yif|x−y|=1if|x−y|=2
Operations on fuzzy relation:
For our discussion, we will be using the following two
relation matrices:
Union:
R ∪ S = { (a, b), μA B(a, b) }
∪
μR S(a, b) = max( μR(a, b), μS(a, b))
∪
μR S(x , y ) = max( μR( x , y ), μS( x , y ))
∪ 1 1 1 1 1 1
= max(0.8, 0.4) = 0.8
μR S(x , y ) = max( μR( x , y ), μS( x , y ))
∪ 1 2 1 2 1 2
= max(0.1, 0.0) = 0.1
μR S(x , y ) = max( μR( x , y ), μS( x , y ))
∪ 1 3 1 3 1 3
= max(0.1, 0.9) = 0.9
μR S(x , y ) = max( μR( x , y ), μS( x , y ))
∪ 1 4 1 4 1 4
max(0.7, 0.6) = 0.7
.
.
.
μR S(x , y ) = max( μR( x , y ), μS( x , y ) )
∪ 3 4 3 4 3 4
= max(0.8, 0.5) = 0.8
Thus, the final matrix for union operation would be,
Fuzzy Composition: Max-min and Max-product
BY CODECRUCKS · PUBLISHED 24/07/2021 · UPDATED 08/03/2023
Composition of fuzzy relation is defined over two fuzzy relations.
Fuzzy composition
Fuzzy composition can be defined just as it is for crisp (binary)
relations. Suppose R is a fuzzy relation on X × Y, S is a fuzzy relation
on Y × Z, and T is a fuzzy relation on X × Z; then,
Fuzzy Max–Min composition is defined as:
Fuzzy Max–Product composition is defined as:
et us try to understand it with the help of an example.
The fuzzy max-min approach is identical to that of
the crisp max-min composition.
Example:
X = {x , x }, Y = {y , y }, and Z = {z , z , z }. Consider
1 2 1 2 1 2 3
the following fuzzy relations:
Find the resulting relation, T which relates elements of
universe X to elements of universe Z, i.e., defined on
Cartesian space X × Z
Using Max-Min composition and
Using Max-Product composition
Solution:
So ultimately, we have to find the elements of the
matrix,
From the given relations R and S,
μ (x , z ) = max ( min( μ (x , y ), μ (y , z )), min( μ (x , y ),
T 1 1 R 1 1 S 1 1 R 1 2
μ (y , z )) )
S 2 1
= max(min(0.7, 0.8), min(0.6, 0.1)) = max(0.7, 0.1) =
0.7
μ (x , z ) = max ( min( μ (x , y ), μ (y , z )), min( μ (x , y ),
T 1 2 R 1 1 S 1 2 R 1 2
μ (y , z )) )
S 2 2
= max(min(0.7, 0.5), min(0.6, 0.6)) = max(0.5, 0.6) =
0.6
μ (x , z ) = max ( min( μ (x , y ), μ (y , z )), min( μ (x , y ),
T 1 3 R 1 1 S 1 3 R 1 2
μ (y , z )) )
S 2 3
= max(min(0.7, 0.4), min(0.6, 0.7)) = max(0.4, 0.6) =
0.6
μ (x , z ) = max ( min( μ (x , y ), μ (y , z )), min( μ (x , y ),
T 2 1 R 2 1 S 1 1 R 2 2
μ (y , z )) )
S 2 1
= max(min(0.8, 0.8), min(0.3, 0.1)) = max(0.8, 0.1) =
0.8
μ (x , z ) = max ( min( μ (x , y ), μ (y , z )), min( μ (x , y ),
T 2 2 R 2 1 S 1 2 R 2 2
μ (y , z )) )
S 2 2
= max(min(0.8, 0.5), min(0.3, 0.6)) = max(0.5, 0.3) =
0.5
μ (x , z ) = max ( min( μ (x , y ), μ (y , z )), min( μ (x , y ),
T 2 3 R 2 1 S 1 3 R 2 2
μ (y , z )) )
S 2 3
= max(min(0.8, 0.4), min(0.3, 0.7)) = max(0.4, 0.3) =
0.4
Max-Product Composition:
μ (x , z ) = max ( (μ (x , y ) × μ (y , z )), ( μ (x , y ) × μ (y ,
T 1 1 R 1 1 S 1 1 R 1 2 S 2
z )) )
1
= max((0.7 × 0.8), (0.6 × 0.1)) = max(0.56, 0.06) = 0.56
μ (x , z ) = max ( ( μ (x , y ) × μ (y , z )), ( μ (x , y ) × μ (y ,
T 1 2 R 1 1 S 1 2 R 1 2 S 2
z )) )
2
= max( (0.7 × 0.5), (0.6 × 0.6)) = max(0.35, 0.36) = 0.36
μ (x , z ) = max ( ( μ (x , y ) × μ (y , z )), ( μ (x , y ) × μ (y ,
T 1 3 R 1 1 S 1 3 R 1 2 S 2
z )) )
3
= max((0.7 × 0.4), (0.6 × 0.7)) = max(0.28, 0.42) = 0.42
μ (x , z ) = max ( ( μ (x , y ) × μ (y , z )), ( μ (x , y ) × μ (y ,
T 2 1 R 2 1 S 1 1 R 2 2 S 2
z )) )
1
= max((0.8 × 0.8), min(0.3 × 0.1)) = max(0.64, 0.03) =
0.64
μ (x , z ) = max ( ( μ (x , y ) × μ (y , z )), ( μ (x , y ) × μ (y ,
T 2 2 R 2 1 S 1 2 R 2 2 S 2
z )) )
2
= max((0.8 × 0.5), (0.3 × 0.6)) = max(0.4, 0.18) = 0.40
μ (x , z ) = max ( ( μ (x , y ) × μ (y , z )), ( μ (x , y ) × μ (y ,
T 2 3 R 2 1 S 1 3 R 2 2 S 2
z )) )
3
= max((0.8 × 0.4), (0.3 × 0.7)) = max(0.32, 0.21) = 0.32
Fuzzy Membership Function:
The fuzzy membership function is the graphical way of
visualizing the degree of membership of any value in a
given fuzzy set. In the graph, X-axis represents the
universe of discourse and the Y-axis represents the
degree of membership in the range [0, 1]
Triangular membership function:
This is one of the most widely accepted and used
membership functions (MF) in fuzzy controller design.
The triangle which fuzzifies the input can be defined by
three parameters a, b and c, where c defines the base
and b defines the height of the triangle.
Trivial case:
Here, in the diagram, X-axis represents the input from
the process (such as air conditioner, washing machine,
etc.) and the Y axis represents the corresponding fuzzy
value.
If input x = b, then it is having full membership in the
given set. So,
μ(x) = 1, if x = b
And if the input is less than a or greater than b, then it
does belong to the fuzzy set at all, and its membership
value will be 0
μ(x) = 0, x < a or x > c
x is between a and b:
If x is between a and b, as shown in the figure, its
membership value varies from 0 to 1. If it is near a, its
membership value is close to 0, and if x is near b, its
membership value gets close to 1.
We can compute the fuzzy value of x using a similar
triangle rule,
μ(x) = (x – a) / (b – a), a≤x≤b
x is between b and c:
If x is between b and c, as shown in the figure, its
membership value varies from 0 to 1. If it is near b, its
membership value is close to 1, and if x is near c, its
membership value gets close to 0.
We can compute the fuzzy value of x using a similar
triangle rule,
μ(x) = (c – x) / (c – b), b≤x≤c
Combine all together:
We can combine all the above scenarios in single
equation as,
Triangular membership function
Example: Triangular membership function
Determine μ, corresponding to x = 8.0
For the given values of a, b and c, we have to compute
the fuzzy value corresponding to x = 8. Using the
equation of the triangular membership function,
Thus, x = 8 will be mapped to a fuzzy value of 0.5 using
the given triangle fuzzy membership function
Trapezoidal membership function:
The trapezoidal membership function is defined by four
parameters: a, b, c and d. Span b to c represents the
highest membership value that element can take. And if
x is between (a, b) or (c, d), then it will have a
membership value between 0 and 1.
We can apply the triangle MF if elements are in
between a to b or c to d.
It is quite obvious to combine all together as,
There are two special forms of trapezoidal function
based on the openness of function. They are known as
R-function (Open right) and L-function (Left open).
Shape and parameters of both functions are depicted
here:
Example: Trapezoidal membership function
Determine μ, corresponding to x = 3.5
Gaussian membership function:
A Gaussian MF is specified by two parameters {m, σ}
and can be defined as follows.
Gaussian membership function
In this function, m represents the mean / center of the
gaussian curve and σ represents the spread of the
curve. This is a more natural way of representing the
data distribution, but due to mathematical complexity,
it is not much used for fuzzification.
Example: Gaussian membership function
Determine μ corresponding to x = 9, m = 10 and σ =
3.0
Defuzzification methods:
Lambda Cut Method
Maxima Methods
Height method
First of maxima (FoM)
Last of maxima (LoM)
Mean of maxima (MoM)
Weighted average method
Centroid methods
Center of gravity method (CoG)
Center of sum method (CoS)
Center of area method (CoA)
Lambda Cut Method:
This Lambda-cut set A is also called the alpha-cut set.
λ
Lambda-cut method is applicable to derive the crisp
value of a fuzzy set or fuzzy relation.
In this method, a fuzzy set A is transformed into a crisp
set A for a given value of λ (0 ≤ λ ≤ 1) as,
λ
A = { x | μA ≥ λ }
λ (x)
Example – 1: Lambda-cut for Fuzzy Set
A = { (x , 1.0), (x , 0.5) , (x , 0.3) , (x , 0.4) }
1 2 3 4
For λ = 1: A = { x }
1 1
For λ = 0.5: A = { x , x }
0.5 1 2
For λ = 0.4: A = { x , x , x }
1 1 2 4
Maxima methods for defuzzification: FoM, LoM
and MoM
BY CODECRUCKS · PUBLISHED 21/08/2021 · UPDATED 08/03/2023
Maxima methods are quite simple but not as trivial as lambda cut
methods. Maxima methods rely on the position of maximum
membership of an element at a particular position in a fuzzy set.
The set of methods under maxima methods we will be discussing
here are:
Height method
First of maxima (FoM)
Last of maxima (LoM)
Mean of maxima (MoM)
Height method:
This method is based on the Max-membership principle and is
μC(x*) ≥ μC(x), ∀x ∈ X
defined as follows.
Note: This method is applicable when height is
unique.
Example:
First of Maxima (FoM) method:
Determine the smallest value of the domain with
maximized membership degree
∗
FoM = First of Maxima: x = min{ x | μ (x) = h(C) }
C
ast of Maxima (LoM) method:
Determine the largest value of the domain with
maximized membership degree
∗
LoM = Last of Maxima: x = max{ x | μ (x) = h(C) }
C
Example: First of Maxima and Last of Maxima
Find the defuzzification value for a given fuzzy set
∗
First of Maxima: x = 1
∗
Last of Maxima: x = 6
Middle of Maxima (MoM) method:
In order to find the middle of maxima, we have to find
the “middle” of elements with maximum membership
value
Where, M ={ x | μ (x ) = h(C) }, Or M is the set of points
i C i
having the highest membership value
Example: Middle of maxima
Find the deffuizified value for a given fuzzy set using
the middle of the maxima method:
∗
x = (a + b) / 2
∗
x = (2 + 5) / 2
∗
x = 3.5
Weighted average method for defuzzification
Weighted average method is one of the simplest and widely
used defuzzification technique.
This method is also alternatively called ”Sugeno defuzzification”
method.
Formed by weighting each functions in the output by its respective
maximum membership value
This method is applicable to fuzzy sets with symmetrical ou
tput membership functions and yields results that are quite
similar to the COA method.
This method requires less computational power. The maxim
um membership value
Procedure results very close to the COA method Less
computationally intensive
Note: The method can be used only
for symmetrical output membership functions.
Example:
Find defuzzified value for given aggregated fuzzy
output set using weighted average method:
The fuzzified value using weighted average
defuzzification method is computed as,
As discussed, the center of each symmetric fuzzy
output function is multiplied by the height of the
function.
x = ((0.7 × 3) + (1.0 × 7)) / (0.7 + 1.0)
*
∗
x = 5.941
Center of Gravity (CoG) method for
defuzzification
Center of Gravity (CoG) is the most prevalent and physically
appealing of all the defuzzification methods [Sugeno, 1985, Lee
1990]
The basic principle in the CoG method is to find the point x ∗ where a
vertical line would slice the aggregate into two equal masses.
If μ is defined with continuous MF:
C
∫ μ (x) dx denotes the area of the region bounded by the
C
curve C.
If μC is defined with discrete MF:
CoG: A geometrical method of calculation
This method returns a precise value depending on
the fuzzy set‘s center of gravity. The overall area of the
membership function distribution used to describe the
combined control action is divided into a number of
sub-areas (such as triangle, trapezoidal etc.).
The area and center of gravity, or centroid, of each sub
regions, are calculated. Then the sum of all these sub-
areas is used to determine the defuzzified value for a
discrete fuzzy set
Let A and x denote the area and center of gravity of i-th
i i
sub-region.
A =∫ μ (x) dx and n is the number of geometrical
i C
components
Example:
o compute the crisp value corresponding to the above
output fuzzy sets, we shall create aggregate output by
placing them on the same axis
To compute the area covered by these aggregated
fuzzy sets, we need to compute the equation of each
line forming the region
Equation of line ab:
(y – y ) / (x – x ) = (y – y ) / (x – x )
1 1 2 1 2 1
For line ab, (x , y ) = (0, 0) and (x , y ) = (1, 0.5)
1 1 2 2
(y – 0) / (x – 0) = (0.5 – 0) / (1 – 0)
y / x = 0.5 / 1
y = 0.5x
Line ranges from [0, 1] on X-axis
Equation of line bc:
(y – y ) / (x – x ) = (y – y ) / (x – x )
1 1 2 1 2 1
For line ab, (x , y ) = (1, 0.5) and (x , y ) = (3.5, 0.5)
1 1 2 2
The horizontal line has a slope zero, and for any value
of x, the y coordinate will remain unchanged. So, for
line bc
y = 0.5
Line ranges from [1, 3.5] on X-axis
Equation of line cd:
(y – y ) / (x – x ) = (y – y ) / (x – x )
1 1 2 1 2 1
For line ab, (x , y ) = (3.5, 0.5) and (x , y ) = (4, 0.8)
1 1 2 2
(y – 0.5) / (x – 3.5) = (0.8 – 0.5) / (4 – 3.5)
(y – 0.5) / (x – 3.5) = 0.3 / 0.5
y=(3x / 5) – (8 / 5)
The line ranges from [3.5, 4] on X-axis
Equation of line de:
(y – y ) / (x – x ) = (y – y ) / (x – x )
1 1 2 1 2 1
For line ab, (x , y ) = (4, 0.8) and (x , y ) = (6, 0.8)
1 1 2 2
The horizontal line has a slope zero, and for any value
of x, the y coordinate will remain unchanged. So, for
line bc
y = 0.8
Line ranges from [4, 6] on X-axis
Equation of line ef:
(y – y ) / (x – x ) = (y – y ) / (x – x )
1 1 2 1 2 1
For line ab, (x , y ) = (6, 0.8) and (x , y ) = (8, 0)
1 1 2 2
(y – 0.8) / (x – 6) = (0 – 0.8) / (8 – 6)
(y – 0.8) / (x – 6) = (-0.8 / 2)
y = -0.4x + 3.2
Line ranges from [6, 8] on X-axis
Summary of line equations:
Putting all these values in the equation for the CoG
method,
= 4.151