Module 6 - Fuzzy Logic and Inference
Module 6 - Fuzzy Logic and Inference
The aim of this chapter is to introduce the concept of fuzzy set and find its relationship
with crisp set (also known as classical set).
A = {a1 , a2 , . . . , an } (7.1)
A set can also be represented by the property of its element like the following:
that is, set A contains all x belonging to X that have the property P .
For example: A ={x, such that they have three technical departments each}.
A set A can also be indicated by its characteristic function as follows:
1, if x belongs to A,
μA (x) = (7.3)
0, if x does not belong to A.
102 SOFT COMPUTING:Fundamentals and Applications
1. ∅: It indicates an empty set (also known as null set) that does not contain any
element.
3. x ∈
/ A: It represents a condition that an element x of the Universal set X does not
belong to set A.
4. A ⊆ B: It is used to indicate that set A is a subset of set B, that is, each element of
A is also an element of B but the reverse may not be true.
6. A = B: It states that the sets: A and B are equal, that is, both of them contain the
same elements. If A ⊆ B and B ⊆ A, then A = B.
9. A ⊃ B: It states that the set A is a proper superset of set B, for which both the
conditions: A ⊇ B and A = B are to be satisfied. It means that set A contains at
least one element that is missing in set B.
10. |A|: It indicates the cardinality of set A, which is defined as the total number of
elements present in that set. For example, in case of a singleton set A = {a1 }, |A| = 1.
11. p(A): It represents the power set of A, which is nothing but the maximum number of
subsets including the null that can be constructed from the set A. Let us consider that
set A contains three elements, that is, A = {a1 , a2 , a3 }. The subsets (8 in number),
those can be constructed from the set A are: {a1 }, {a2 }, {a3 }, {a1 , a2 }, {a1 , a3 },
{a2 , a3 }, {a1 , a2 , a3 }, {∅}. Now, the cardinality of set A, that is, |A| = 3 and that of
p(A) is given by |p(A)| = 2|A| = 23 = 8.
Crisp Sets 103
A − B = {x|x ∈ A and x ∈
/ B} (7.4)
X X
A−B c
A B A
(a) (b)
Figure 7.1: The diagrams showing the complements of a set: (a) relative complement, (b) absolute
complement.
difference between the Universal set X and set A as given below (refer to Fig. 7.1(b)).
Ā = Ac = X − A = {x|x ∈ Xand x ∈
/ A}. (7.5)
A B
X
A B
1. Law of involution:
A=A
2. Laws of commutativity:
A∪B = B∪A
A∩B = B∩A
Fuzzy Sets 105
3. Laws of associativity:
(A ∪ B) ∪ C = A ∪ (B ∪ C)
(A ∩ B) ∩ C = A ∩ (B ∩ C)
4. Laws of distributivity:
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
5. Laws of idempotence/tautology:
A∪A = A
A∩A = A
6. Laws of absorption:
A ∪ (A ∩ B) = A
A ∩ (A ∪ B) = A
7. Laws of identity:
A∪X =X
A∩X =A
A∪∅=A
A∩∅=∅
8. De Morgan’s Laws:
(A ∪ B) = A ∩ B
(A ∩ B) = A ∪ B
9. Law of contradiction:
A∩A=∅
A∪A =X
106 SOFT COMPUTING:Fundamentals and Applications
Fuzzy
set
Figure 7.4: A schematic representation of fuzzy set.
According to
Figure 7.5: A diagram used for explaining the concept of crisp set and fuzzy set.
Note: Belief measure of a set A (denoted by bel(A)) is nothing but its degree of sup-
port or certainty or evidence [83]. On the other hand, plausibility measure of the set A
(represented by pl(A)) is defined as the complement of the belief of the complement of A,
that is, pl(A) = 1 − bel(Ā). Now, ignorance is determined as 1 − {bel(A) + bel(Ā)}. If
bel(A) + bel(Ā) = 1, then ignorance turns out to be equal to 0 and belief becomes equal
to plausibility (that is, bel(A) = pl(A)). Here, we can use probability measure. On the
other hand, if ignorance becomes non-zero, we will have to use plausibility (also known
as possibility) measure, which is equivalent to fuzzy set.
n
A(x) = μA (xi )/xi , (7.9)
i=1
108 SOFT COMPUTING:Fundamentals and Applications
1.0
0.0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Days
Figure 7.6: Representation of a discrete fuzzy set (that is, medium atmospheric temperature).
represented as follows:
M = 0.05/1 + 0.2/2 + 0.3/3 + 0.4/4 + 0.55/5 + 0.7/6 + 0.875/7 + 1.0/8 + 0.875/9 + 0.7/10 +
0.55/11 + 0.4/12 + 0.3/13 + 0.2/14 + 0.05/15.
The + sign does not indicate any algebraic sum but collection of the pairs of elements and
their membership values used to represent a fuzzy set. Fig. 7.6 shows the above represen-
tation in a plot. It is important to note that it can also be expressed as follows:
M = {(1, 0.05), (2, 0.2), (3, 0.3), (4, 0.4), (5, 0.55), (6, 0.7), (7, 0.875), (8, 1.0), (9, 0.875),
(10, 0.7), (11, 0.55), (12, 0.4), (13, 0.3), (14, 0.2), (15, 0.05)}.
1.0 1.0
0.75
μ μ 0.5
0.0 0.0
x x
(a) (b)
Figure 7.7: Schematic view showing (a) convex and (b) non-convex membership function distributions.
function distributions. Various types of membership function distributions are in use, some
of them are discussed below.
1.0
0.0
a b c
x
lows:
x−a c−x
μtriangle = max(min( , ), 0). (7.12)
b−a c−b
Thus, μtriangle values are set equal to 0.0, 1.0 and 0.0 at x = a, x = b and x = c,
respectively.
1.0
0.0
a b c d
x
Figure 7.9: Trapezoidal membership function distribution.
x−a d−x
μtrapezoidal = max(min( , 1, ), 0). (7.13)
b−a d−c
The membership function values at x = a, x = b, x = c and x = d are set equal to
0.0, 1.0, 1.0 and 0.0, respectively.
1.0
0.0
m
x
Figure 7.10: Gaussian membership function distribution.
At the point x = m, μGaussian comes out to be equal to 1.0 and as the value of x
deviates more and more from m, the value of μGaussian tends towards 0.0.
0.0
c
x
Figure 7.11: Bell-shaped membership function distribution.
• Sigmoid Membership: A sigmoid function (shown in Fig. 7.12) can also be used
as membership function of a fuzzy set. It is denoted by Sigmoid (x; a, b) and its
membership function μsigmoid is expressed as follows:
1
μsigmoid = , (7.16)
1 + e−a(x−b)
where a indicates the slope of the distribution. Thus, μsigmoid becomes equal to 0.5,
at x = b. Moreover, it tends towards 0.0 and 1.0, as x approaches to 0.0 and a value
higher than b, respectively.
1.0
μ 0.5
0.0
b
x
1.0
Crisp set representation
0.66 Fuzzy set representation
μ
0.33
0.0
6.45 6.50 6.55 7.00 7.05 7.10 7.15
Time
Figure 7.13: A schematic view showing the difference between crisp and fuzzy sets.
the range of 0.0 to 1.0. Thus, if Mr. Z meets Mr. Y at 7.05 pm, then also it will be said
that he has met his friend at 7.00 pm with the membership value μ = 0.666, and so on. A
crisp set has a fixed boundary, whereas the boundary of a fuzzy set is vague in nature.
1. α-cut of a fuzzy set A(x): It is a set consisting of elements x of the Universal set
X, whose membership values are either greater than or equal to the value of α (refer
to Fig. 7.14). It is denoted by the symbol α μA (x). Thus, α-cut of a fuzzy set A(x) is
expressed as follows:
α
μA (x) = {x|μA (x) ≥ α}. (7.17)
Similarly, strong α-cut of a fuzzy set A(x) is represented like the following:
α+
μA (x) = {x|μA (x) > α}. (7.18)
Fuzzy Sets 113
1.0
A(x)
μ (x)
Α
α
0.0
2 4 6 8 10
x
Figure 7.14: α-cut of a fuzzy set.
Example:
The membership function distribution of a fuzzy set is assumed to follow a Gaussian
distribution with mean m = 100 and standard deviation σ = 20. Determine 0.6-cut
of this distribution.
The Gaussian membership function distribution can be expressed as follows:
1
μ= 1 x−m 2
e2( σ )
After substituting the value of μ = 0.6 in the above equation and taking log (ln) on
both the sides, we get
1 x−100 2
ln e 2 ( 20
)
= ln 1.6667
We simplify the above relationship and solve to get the range of x, which is found to
be as follows: (79.7846, 120.2153). It is called the 0.6-cut (refer to Fig. 7.15).
1.0
0.6
μ
0.0
79.7846 m 120.2153
x
Figure 7.15: 0.6-cut of a fuzzy set.
114 SOFT COMPUTING:Fundamentals and Applications
2. Support of a fuzzy set A(x): It is defined as the set of all x ∈ X, such that
μA (x) > 0. It is indicated by supp(A) and can be represented as follows:
Thus, the support of a fuzzy set is nothing but its strong 0-cut.
3. Scalar cardinality of a fuzzy set A(x): It is denoted by |A(x)| and can be defined
like the following:
|A(x)| = μA (x) (7.20)
x∈X
Example:
Let us consider a fuzzy set A(x) as follows:
5. Height of a fuzzy set A(x): It is denoted by h(A) and defined as the largest of
membership values of the elements contained in that set.
6. Normal fuzzy set: A fuzzy set A(x) is called normal, if its height h(A) = 1.0.
7. Sub-normal fuzzy set: A fuzzy set A(x) is known as a sub-normal fuzzy set, if
1.0
0.625
μ A(x)
0.0
x
Figure 7.16: Sub-normal fuzzy set.
1. Proper subset of a fuzzy set: Let us consider two fuzzy sets: A(x) and B(x),
such that all x ∈ X. The fuzzy set A(x) is called the proper subset of B(x), if
μA (x) < μB (x). It can be represented as follows:
Example:
Let us consider the following two fuzzy sets:
2. Equal fuzzy sets: Two fuzzy sets: A(x) and B(x) are said to be equal, if μA (x) =
μB (x) for all x ∈ X. It is expressed as follows:
Note: Two fuzzy sets: A(x) and B(x) are said to be un-equal, if μA (x) = μB (x) for
at least one x ∈ X.
Example:
Let us consider the following two fuzzy sets:
3. Complement of a fuzzy set A(x): It is denoted by Ā(x) and defined with respect
to the Universal set X as follows:
1.0
μ A(x)
A(x)
0.0
2 4 6 8 10
x
Figure 7.17: Complement of a fuzzy set.
Example:
Let us consider a fuzzy set A(x):
Its complement Ā(x) = {(x1 , 0.9), (x2 , 0.8), (x3 , 0.7), (x4 , 0.6)}.
4. Intersection of fuzzy sets: Intersection of two fuzzy sets: A(x) and B(x) for all
x ∈ X, is denoted by (A ∩ B)(x) and its membership function value is determined as
follows (refer to the shaded area of Fig. 7.18):
A(x) B(x)
1.0
μ 1111
0000
intersection 0000
1111
0000
1111
0000
1111
0000
1111
0000
1111
0.0 0000
1111
2 4 6 8 10
Example:
Let us consider the following two fuzzy sets:
Fuzzy Sets 117
A(x) B(x)
1.0 11111111
00000000
00000000
11111111
00000000
11111111
00000000
11111111
00000000
11111111
00000000
11111111
μ 00
11
00000000
11111111
00
11
00
11
00000000
11111111
00
11
00
11
union 00000000
11111111
00
11
00
11
00000000
11111111
00
11
00
11
00000000
11111111
00
11
00
11
00000000
11111111
00
11
00
11
0.0 00000000
11111111
00
11
2 4 6 8 10
Example:
Let us consider the following two fuzzy sets:
Now, A(x).B(x) = {(x1 , 0.05), (x2 , 0.14), (x3 , 0.24), (x4 , 0.36)}.
Example:
Let us consider a fuzzy set A(x):
If d = 0.2, then d.A(x) = {(x1 , 0.02), (x2 , 0.04), (x3 , 0.06), (x4 , 0.08)}.
8. Power of a fuzzy set: The p-th power of a fuzzy set A(x) yields another fuzzy set
Ap (x), whose membership value can be determined as follows:
Now, for p = 2,
A2 (x) = {(x1 , 0.01), (x2 , 0.04), (x3 , 0.09), (x4 , 0.16)}.
9. Algebraic sum of two fuzzy sets A(x) and B(x): It is determined as follows:
Now, A(x) + B(x) = {(x1 , 0.55), (x2 , 0.76), (x3 , 0.86), (x4 , 0.94)}.
Fuzzy Sets 119
10. Bounded sum of two fuzzy sets A(x) and B(x): It is defined like the following:
A(x) ⊕ B(x) = {(x, μA⊕B (x)), x ∈ X}, (7.30)
where μA⊕B (x) = min{1, μA (x) + μB (x)}.
Example:
Let us consider the following two fuzzy sets:
Now, A(x) ⊕ B(x) = {(x1 , 0.6), (x2 , 0.9), (x3 , 1.0), (x4 , 1.0)}.
11. Algebraic difference of two fuzzy sets A(x) and B(x): It will give rise to a new
fuzzy set as given below.
A(x) − B(x) = {(x, μA−B (x)), x ∈ X}, (7.31)
where μA−B (x) = μA∩B̄ (x).
Example:
Let us consider the following two fuzzy sets:
Now, A(x) B(x) = {(x1 , 0), (x2 , 0), (x3 , 0.1), (x4 , 0.3)}.
13. Cartesian product of two fuzzy sets: Let us consider two fuzzy sets: A(x) and
B(y) defined on the Universal sets X and Y , respectively. The Cartesian product of
fuzzy sets: A(x) and B(y) is denoted by A(x) × B(y), such that x ∈ X and y ∈ Y . It
is determined, so that the following condition is satisfied.
μA×B (x, y) = min(μA (x), μB (y)). (7.33)
Example:
Let us consider the following two fuzzy sets:
120 SOFT COMPUTING:Fundamentals and Applications
14. Composition of fuzzy relations: Let A = [aij ] and B = [bjk ] be two fuzzy relations
expressed in the matrix form. Composition of these two fuzzy relations, that is, C is
represented by
C = A ◦ B, (7.34)
such that it can be expressed in the matrix form:
where
Example:
Let us consider the following two fuzzy relations:
0.2 0.3
A = [aij ] =
0.5 0.7
0.3 0.6 0.7
B = [bjk ] =
0.1 0.8 0.6
A ∪ A = X.
A ∪ A = X.
122 SOFT COMPUTING:Fundamentals and Applications
2. Law of contradiction:
As per crisp set,
A ∩ A = ∅.
A ∩ A = ∅.
It happens due to the fact that an element belongs to both a fuzzy set as well as its com-
plement. For example, if the apple is red with membership value 0.8 (that is, μred(apple) =
0.8), it is also not red (red) with membership value of 0.2 (that is, μred (apple) = 0.2) (refer
to Fig. 7.20). Fig. 7.20(a) shows the violation of the law of excluded middle, whereas the
x x
(a) (b)
Figure 7.20: Two properties of crisp sets violated by the fuzzy sets, such as (a) Law of excluded middle,
(b) Law of contradiction.
reason behind violation of the law of contradiction can be understood from Fig. 7.20(b).
1 n
H(A) = − [μA (xi )log{μA (xi )} + {1 − μA (xi )}log{1 − μA (xi )}] (7.35)
n i=1
Example:
Let A(x) be a fuzzy set in a discrete universe of discourse as given below.
A(x) = {(x1 , 0.1), (x2 , 0.3), (x3 , 0.4), (x4 , 0.5)}. Calculate its entropy value.
Summary 123
The value of entropy, H(A) = − 14 [{0.1 × log(0.1) + 0.9 × log(0.9)} + {0.3 × log(0.3) + 0.7 ×
log(0.7)} + {0.4 × log(0.4) + 0.6 × log(0.6)} + {0.5 × log(0.5) + 0.5 × log(0.5)}] = 0.2499
Now, let us consider two fuzzy sets: A(x) and B(x) defined in the same discrete universe
of discourse X = {x1 , x2 , . . . , xn }, whose membership values are denoted by μA (xi ) and
μB (xi ), respectively, where i = 1, 2, . . . , n.
The inaccuracy of the fuzzy set B(x) can be measured with respect to the fuzzy set A(x)
as follows [85]:
1 n
I(A; B) = − [μA (xi )log(μB (xi )) + (1 − μA (xi ))log(1 − μB (xi ))] (7.36)
n i=1
Example:
Let us consider the following two fuzzy sets in the same discrete universe of discourse:
A(x) = {(x1 , 0.1), (x2 , 0.2), (x3 , 0.3), (x4 , 0.4)}
B(x) = {(x1 , 0.5), (x2 , 0.7), (x3 , 0.8), (x4 , 0.9)}
Determine inaccuracy of the fuzzy set B(x) with respect to the fuzzy set A(x).
The inaccuracy of B(x) with respect to A(x), I(A; B) = − 14 [{0.1 × log(0.5) + 0.9 ×
log(0.5)} + {0.2 × log(0.7) + 0.8 × log(0.3)} + {0.3 × log(0.8) + 0.7 × log(0.2)} + {0.4 ×
log(0.9) + 0.6 × log(0.1)}] = 0.4717
7.4 Summary
This chapter has been summarized as follows:
1. An introduction is given to crisp sets, which are the sets having fixed boundaries. The
notations used in set theory have been listed. After defining a few crisp set operations
(such as difference, intersection, union), different properties of crisp sets have been
stated.
2. The concept of fuzzy sets has been introduced. Fuzzy sets are the sets with vague
boundaries. It is important to mention that a crisp set is a special case of the more
general concept of a fuzzy set. A fuzzy set may be either discrete or continuous in na-
ture. Some of the frequently-used membership function distributions for representing
the fuzzy sets are discussed, in detail. After defining a few terms related to fuzzy sets
(namely α-cut, support, scalar cardinality, core, height, and others), some of their
standard operations are explained in detail.
3. It deals with the measures of fuzziness and inaccuracy of fuzzy sets.
7.5 Exercise
1. Justify the following statements:
(i) Every set is the subset of both itself as well as the Universal set.
124 SOFT COMPUTING:Fundamentals and Applications
A(x) = {(x1 , 0.2), (x2 , 0.25), (x3 , 0.3), (x4 , 0.35), (x5 , 0.4)}
B(x) = {(x1 , 0.3), (x2 , 0.32), (x3 , 0.4), (x4 , 0.45), (x5 , 0.5)}
Determine inaccuracy of the fuzzy set B(x) with respect to the fuzzy set A(x).
Chapter 8
This chapter deals with two of the most important applications of fuzzy set theory, which
are developed in the forms of reasoning tool and clustering technique.
8.1 Introduction
The concept of fuzzy set theory has been used in a number of ways, such as Fuzzy Logic Con-
troller (FLC), fuzzy clustering algorithms, fuzzy mathematical programming, fuzzy graph
theory, and others. Out of all such applications, the FLC is the most popular one, due to
the following reasons: (i) ease of understanding and implementations, (ii) ability to handle
uncertainty and imprecision. Moreover, an exact mathematical formulation of the prob-
lem is not essential for development of an FLC. This feature makes it a natural choice for
solving complex real-world problems, which are either difficult to model mathematically or
the mathematical model becomes highly non-linear. Two important tools developed based
on the fuzzy set theory, namely fuzzy logic controller and fuzzy clustering algorithm are
explained below in detail.
VN NR FR VFR
LT AL A ART RT
1 2 3 4
I (m)
1
−90 −45 0 45 90
LT AL A ART RT
O (degrees)
Figure 8.1: A diagram showing some membership function distributions of input and output variables of
an FLC.
It is obvious that the number of rules to be present in the rule base will increase, as the
number of linguistic terms used to represent the variables increases (to ensure a better
accuracy in prediction). Moreover, computational complexity of the controller will increase
with the number of rules. For an easy implementation in either the software or hardware, the
number of rules present in the RB should be as small as possible. Realizing this fact, some
investigators have also tried to design and develop a hierarchical FLC, in which the number
of rules will be kept to the minimum [87, 88]. It has been observed that the performance of
an FLC largely depends on the RB and optimizing the DB is a fine tuning process [89]. An
FLC does not have an in-built optimization module. An external optimizer is to be used to
develop its optimal KB through a proper tuning and this helps to improve the performance.
eling, such as Mamdani Approach [86] is characterized by its high interpretability and
low accuracy, whereas the aim of precise fuzzy modeling like Takagi and Sugeno’s Ap-
proach [90], is to obtain high accuracy but at the cost of interpretability. Interpretability
of a fuzzy modeling is defined as its capability to express the behavior of a system in an
understandable form. It is generally expressed in terms of compactness, completeness, con-
sistency and transparency. The accuracy of a fuzzy model indicates how closely it can
represent the modeled system. The working principles of both these approaches are briefly
explained below.
Defuzzification Actions
module
Fuzzy Process
Fuzzy
inference to be
rule base controlled
engine
Fuzzification Conditions
module
FLC
• The condition (also known as antecedent) and action (also called consequent)
variables needed to control a process are identified and measurements are taken of all
the condition variables.
• The measurements taken in the previous step are converted into appropriate fuzzy
sets to express measurement uncertainties. This process is known as fuzzification.
• The fuzzified measurements are then used by inference engine to evaluate the control
rules stored in the fuzzy rule base and a fuzzified output is determined.
128 SOFT COMPUTING:Fundamentals and Applications
• The fuzzified output is then converted into a single crisp value. This conversion is
called de-fuzzification. The de-fuzzified values represent the actions to be taken by
the FLC in controlling the process.
The fuzzy reasoning process is illustrated in Figure 8.3. Let us assume for simplicity that
Rule 1
s1 s2 f
Rule 2
s1* s1 s2* s2 f
μC
f
U
f
only two fuzzy control rules (out of many rules present in the rule base) are being fired as
given below, for a set of inputs: (s1∗ , s2∗ ).
Rule 1: IF s1 is A1 AND s2 is B1 THEN f is C1
Rule 2: IF s1 is A2 AND s2 is B2 THEN f is C2
If s1∗ and s2∗ are the inputs for fuzzy variables: s1 and s2 and if μA1 and μB1 are the
membership function values for A and B, respectively, then the grade of membership of
s1∗ in A1 and that of s2∗ in B1 are represented by μA1 (s1∗ ) and μB1 (s2∗ ), respectively, for
rule 1. Similarly, for rule 2, μA2 (s1∗ ) and μB2 (s2∗ ) are used to represent the membership
Fuzzy Logic Controller 129
function values. The firing strengths of the first and second rules are calculated as follows:
There are several methods of defuzzification (refer to Fig. 8.4), which are explained below.
0.5 0.5
3
μ 0.3 μ 0.3
2
1 4 5 6
0.0 0.0
1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10
Output Output
(a) (b)
0.5
μ 0.3
0.0
1 2 3 4 5 6 7 8 9 10
Output
(c)
Figure 8.4: Different methods of defuzzification: (a) center of sums method, (b) centroid method, (c)
mean of maxima method.
where Uf is the output of the controller, A(αj ) represents the firing area of j-th rule,
p is the total number of the fired rules and fj represents the center of the area.
2. Centroid Method: The total area of the membership function distribution used to
represent the combined control action is divided into a number of standard sub-areas,
130 SOFT COMPUTING:Fundamentals and Applications
whose area and the center of area can be determined easily (refer to Fig. 8.4(b)). The
crisp output of the controller can be calculated using the expression given below.
N
Ai fi
Uf = i=1
N
, (8.5)
i=1 Ai
where N indicates the number of small areas or regions, Ai and fi represent the area
and center of area, respectively, of i-th small region.
A Numerical Example:
Fig. 8.5 shows a typical problem scenario related to navigation of a mobile robot in the
presence of four moving obstacles. The directions of movement of the obstacles are shown
O O4
1
O
3
O
2
in the figure. The obstacle O2 is found to be the most critical one. Our aim is to develop
a fuzzy logic-based motion planner that will be able to generate the collision-free path for
the robot. There are two inputs, namely the distance between the robot and the obstacle
(D) and angle ( GSO2 ) for the motion planner and it will generate one output, that is,
deviation. Distance is represented using four linguistic terms, namely Very Near (VN),
Near (NR), Far (FR) and Very Far (VFR), whereas the input: angle and output: deviation
are expressed with the help of five linguistic terms, such as Ahead (A), Ahead Left (AL),
Fuzzy Logic Controller 131
VFR RT
1.0 VN NR FR 1.0 LT AL ART
A
μ μ
0.0 0.0
0.1 0.8 1.5 2.2 −90 −45 0 45 90
Distance (m) Deviation (degrees)
RT
1.0 LT AL ART
A
0.0
−90 −45 0 45 90
Angle (degrees)
Left (LT), Ahead Right (ART) and Right (RT). Fig. 8.6 shows the DB of the FLC. The rule
base of the fuzzy logic-based motion planner is given in Table 8.1. Determine the output -
Angle
LT AL A ART RT
VN A ART AL AL A
Distance NR A A RT A A
FR A A ART A A
VFR A A A A A
deviation for the set of inputs: distance D = 1.04 m and angle GSO2 = 30 degrees, using
Mamdani Approach. Use different methods of defuzzification.
Solution:
The inputs are:
The distance of 1.04 m may be called either N R (Near) or F R (Far). Similarly, the input
angle of 30 degrees can be declared either A (Ahead) or ART (Ahead Right). Fig. 8.7 shows
a schematic view used to determine the membership value, corresponding to the distance
of 1.04 m. Using the principle of similar triangle, we can write the following relationship:
x 1.5−1.04
1.0 = 1.5−0.8
132 SOFT COMPUTING:Fundamentals and Applications
NR
1.0 x
0.8 1.5
1.04
Figure 8.7: A schematic view used to determine the membership value corresponding to the distance of
1.04 m.
From the above expression, x is found to be equal to 0.6571. Thus, the distance of 1.04 m
may be declared N R with a membership value of 0.6571, that is, μN R = 0.6571. Similarly,
the distance of 1.04 m can also be called F R with a membership value of 0.3429, that is,
μF R = 0.3429.
In the same way, an input angle of 30 degrees may be declared either A with a membership
value of 0.3333 (that is, μA = 0.3333) or ART with a membership value of 0.6667 (that is,
μART = 0.6667).
For the above set of inputs, the following four rules are being fired from a total of 20:
If Distance is NR AND Angle is A Then Deviation is RT
If Distance is NR AND Angle is ART Then Deviation is A
If Distance is FR AND Angle is A Then Deviation is ART
If Distance is FR AND Angle is ART Then Deviation is A
The strengths (α values) of the fired rules are calculated as follows:
α1 = min (μN R , μA )) = min (0.6571, 0.3333)) = 0.3333
α2 = min (μN R , μART )) = min (0.6571, 0.6667)) = 0.6571
α3 = min (μF R , μA )) = min (0.3429, 0.3333)) = 0.3333
α4 = min (μF R , μART )) = min (0.3429, 0.6667)) = 0.3429
The fuzzified outputs corresponding to above four fired rules are shown in Fig. 8.8. Fig. 8.9
shows the union of the fuzzified outputs, corresponding to the above four fired rules.
The above fuzzified output cannot be used as a control action and its crisp value has been
determined using the following methods of defuzzification:
1. Center of Sums Method
Fig. 8.10 shows the Center of Sums Method of defuzzification. The shaded region
corresponding to each fired rule is shown in this figure. The values of area and center
of area of the above shaded regions are also given in this figure, in a tabular form. The
crisp output U of above four fired rules can be calculated as follows (refer to equation
(8.4)):
12.5 × 71 + 39.7089 × 0.0 + 25.0 × 45.0 + 25.5699 × 0.0
U =
12.5 + 39.7089 + 25.0 + 25.5699
Fuzzy Logic Controller 133
1.0 1.0
NR A RT
1
111111
000000
0.0 0.0 000000
111111
000000
111111
0.3333
0.8 1.5 0 45 45 90
1.0 1.0
NR
ART
11111111111
00000000000
A
00000000000
11111111111
00000000000
11111111111
2
00000000000
11111111111 0.6571
00000000000
11111111111
0.0
0.8 1.5 0 45
0.0
00000000000
11111111111
−45 45
1.0
FR A ART
3
11111111111
00000000000
0.0 00000000000
11111111111 0.3333
0.8 1.5 0 45 0 90
1.0 1.0
FR ART A
4
11111111111
00000000000
00000000000
11111111111
00000000000
11111111111 0.3429
0.8 1.5
0.0
0 45
0.0
00000000000
11111111111
−45 45
Figure 8.8: The fuzzified outputs corresponding to four different fired rules.
134 SOFT COMPUTING:Fundamentals and Applications
1.0 A ART RT
0.6571
111111111111111
000000000000000
000000000000000
111111111111111
0.3429 111111111111111
000000000000000
000000000000000
111111111111111
0.0 111111111111111
0.3333
000000000000000
−45 0 45 90
Deviation (degrees)
Figure 8.9: Combined fuzzified output considering all four fired rules.
= 19.5809
Therefore, the robot should deviate by 19.5809 degrees towards right with respect to
the line joining the present position of the robot and the goal to avoid collision with
the obstacle.
2. Centroid Method
The shaded region representing the combined output corresponding to above four fired
rules (refer to Fig. 8.9) has been divided into a number of regular sub-regions, whose
area and center of area can easily be determined. For example, the shaded region of
Fig. 8.9 has been divided into four sub-regions (two triangles and two rectangles) as
shown in Fig. 8.11. The values related to area and center of area of the above four
sub-regions are shown in this figure, in a tabular form. In this method, the crisp
output U can be obtained like the following (refer to equation (8.5)):
A
U = ,
B
where A = 9.7151 × (−25.2860) + 20.2788 × 0.0 + 2.3588 × 20.2870 + 24.8540 × 52.7153,
B = 9.7151 + 20.2788 + 2.3588 + 24.8540.
Therefore, U turns out to be equal to 19.4450.
Thus, the robot should deviate by 19.4450 degrees towards right with respect to the
line joining the present position of the robot and the goal to avoid collision with the
obstacle.
3. Mean of Maxima
Fig. 8.12 shows the fuzzified output of the controller for the above four fired rules.
From this figure, it is observed that the maximum value of membership (that is,
0.6571) has occurred in a range of deviation angle starting from −15.4305 to 15.4305
degrees. Thus, its mean is coming out to be equal to 0.0. Therefore, the crisp output
U of the controller becomes equal to 0.0, that is, U = 0.0. The robot will move along
the line joining its present position and the goal.
Fuzzy Logic Controller 135
1.0 A ART RT
0.6571
111111111111111
000000000000000
000000000000000
111111111111111
0.3429 111111111111111
000000000000000
000000000000000
111111111111111
0.0 111111111111111
000000000000000
0.3333
−45 0 45 90
Deviation (degrees)
Fired
Shaded region Area Center of area
rule
111111
000000
1
000000
111111
000000
111111 12.5 71
000000
111111
45 90
1111111111
0000000000
0000000000
1111111111
2
0000000000
1111111111
0000000000
1111111111
39.7089 0
0000000000
1111111111
−45 45
3 1111111111
0000000000
0000000000
1111111111 25 45
01111111111
000000000090
0000000000
1111111111
4
0000000000
1111111111
0000000000
1111111111 25.5699 0
000000000045
1111111111
−45
1.0 A ART RT
1111111111111111
0000000000000000
0.6571 0000000000000000
1111111111111111
2
0000000000000000
1111111111111111
3
0000000000000000
1111111111111111
0.3429
1
0.01111111111111111
0.3333
0000000000000000
−45 0 30 45
4
90
−15.4305
15.4305 Crisp Output
Deviation (degrees)
0000
1111
0000
1111
2
0000 0.6571
1111 20.2788 0
0000
1111
0000
1111
−15.4305 15.4305
000
111
0.3238 111
000
111
2.3588 20.2870
00030
3
15.4305
0.33 111111111
000000000
4 33 111111111
000000000
000000000
111111111
24.8540 52.7153
15.4305 90
1.0 A ART RT
0.6571
111111111111111
000000000000000
000000000000000
111111111111111
0.3429 111111111111111
000000000000000
000000000000000
111111111111111
0.0 111111111111111
0.3333
000000000000000
−45 0 45 90
−15.4305 15.4305
Deviation (degrees)
A Numerical Example:
A fuzzy logic-based expert system is to be developed that will work based on Takagi and
Sugeno’s approach to predict the output of a process. The DB of the FLC is shown in
Fig. 8.13. As there are two inputs: I1 and I2 , and each input is represented using three
linguistic terms (for example, LW , M , H for I1 and N R, F R, V F R for I2 ), there is a
maximum of 3 × 3 = 9 feasible rules. The output of i-th rule, that is, y i (i = 1, 2, . . . , 9) is
expressed as follows:
y i = f (I1 , I2 ) = aij I1 + bik I2 ,
138 SOFT COMPUTING:Fundamentals and Applications
LW M H NR FR VFR
1.0 1.0
μ μ
0.0 0.0
5.0 10.0 15.0 1.0 2.0 3.0
I I
1 2
LW: Low NR: Near
I1 = 6.0
I2 = 2.2.
The input I1 of 6.0 unit can be called either LW (Low) or M (Medium). Similarly, the
second input I2 of 2.2 unit may be declared either F R (Far) or V F R (Very Far). Fig. 8.14
shows a schematic view used to determine the membership value corresponding to the first
input I1 = 6.0.
1.0
LW
1.0 x
0.0
5 6 10
Figure 8.14: A schematic view used to determine the membership value corresponding to I1 = 6.0.
Using the principle of similar triangle, we can write the following relationship:
x 10−6
1.0 = 10−5
From the above expression, x is coming out to be equal to 0.8. Thus, the input I1 = 6.0
may be called LW with a membership value of 0.8, that is, μLW = 0.8.
Fuzzy Logic Controller 139
Similarly, the same input I1 = 6.0 may also be called M with a membership value of 0.2,
that is, μM = 0.2.
In the same way, the input I2 = 2.2 may be declared either F R with a membership value
of 0.8 (that is, μF R = 0.8) or V F R with a membership value of 0.2 (that is, μV F R = 0.2).
For the above set of inputs, the following four combinations of input variables are being
fired from a total of nine.
I1 is LW and I2 is FR,
I1 is LW and I2 is VFR,
I1 is M and I2 is FR,
I1 is M and I2 is VFR.
Now, the weights: w1 , w2 , w3 and w4 of the first, second, third and fourth combination of
fired input variables, respectively, have been calculated as follows:
w1 = μLW × μF R = 0.8 × 0.8 = 0.64
w2 = μLW × μV F R = 0.8 × 0.2 = 0.16
w3 = μM × μF R = 0.2 × 0.8 = 0.16
w4 = μM × μV F R = 0.2 × 0.2 = 0.04
The functional consequent values: y 1 , y 2 , y 3 and y 4 of the first, second, third and fourth
combination of fired input variables can be determined like the following:
y 1 = I1 + 2I2 = 6.0 + 2 × 2.2 = 10.4
y 2 = I1 + 3I2 = 6.0 + 3 × 2.2 = 12.6
y 3 = 2I1 + 2I2 = 2 × 6.0 + 2 × 2.2 = 16.4
y 4 = 2I1 + 3I2 = 2 × 6.0 + 3 × 2.2 = 18.6
Therefore, the output y of the controller can be determined as follows (refer to equation
(8.7)):
w1 y 1 + w2 y 2 + w3 y 3 + w4 y 4
y =
w1 + w2 + w3 + w4
0.64 × 10.4 + 0.16 × 12.6 + 0.16 × 16.4 + 0.04 × 18.6
=
0.64 + 0.16 + 0.16 + 0.04
= 12.04
I
1
I2 Fuzzy
I3 Logic O
Controller
(FLC)
In
Figure 8.15: A schematic view showing the inputs and output of an FLC.
process. The above problem of rule explosion is known as the curse of dimensionality.
Due to this reason, it becomes difficult to develop a suitable FLC for controlling a complex
real-world problem involving many variables, such as weather forecasting.
To overcome this difficulty, hierarchical FLC was developed by Raju et al. [91], in which a
higher dimensional FLC is considered to be a combination of some lower dimensional fuzzy
logic systems connected in a hierarchical fashion. Fig. 8.16 shows the schematic view of a
hierarchical FLC [87].
O
I 1
1 FLS O
I2 1 2 O
FLS 3
I 2
3 FLS
3
I
4
O O =O
n−2 n−1
FLS
I n−1
n
As there are n input variables, let us consider (n − 1) fuzzy logic systems as shown in
Fig. 8.16. Two input variables (say I1 and I2 ) are fed to first Fuzzy Logic System (FLS)
and it produces an output O1 . This output O1 along with another input variable (say I3 )
are then fed to the second FLS. This process will continue until all the input variables are
utilized.
As we consider only two inputs for each of the FLSs and each variable is expressed using
m fuzzy sets, m2 rules are to be designed for each FLS. Moreover, there are (n − 1) such
FLSs. Thus, a total of (n − 1)m2 ( in place of mn ) rules are necessary to develop the
FLC completely, which clearly indicates that the number of rules of the hierarchical FLC
increases linearly with the number of input variables n.
It is important to mention that the input variables pass through different number of
Fuzzy Logic Controller 141
FLSs. For example, I1 and I2 pass through all (n − 1) FLSs, whereas In passes through
only (n − 1)-th FLS. It clearly indicates that different weights are put on different input
variables depending on their contributions towards the output of the controller. The most
important input is passed through all (n − 1) FLSs and the least important input may be
passed through (n − 1)-th FLS only. It is to be mentioned that the importance of an input
is generally determined through a sensitivity analysis, the principle of which is discussed
below.
1. Once the controller has been developed, we carry out an experiment, in which we
vary the input variables by different amounts, say 0.1%, 1.0%, 10.0% etc. and note
down the outputs of the controller. Using the above information, we can determine
the sensitivity of the controller using equation (8.8) [92].
2. Let us consider a simple FLC having two inputs: I1 and I2 and one output, say O.
The input-output relationship can be expressed like the following.
O = f (I1 , I2 ). (8.9)
We change the input I1 by a small amount δI1 and determine the change in output
using the Mean-Value Theorem, as follows [87]:
where I1 is a point lying in the range of (I1 , I1 + δI1 ). Now, it is clear from the above
∂f
equation that if | ∂I 1
| > 1, then δO > δI1 ; otherwise, δO < δI1 . Thus, the contribution
of I1 on the output O can be determined. In the similar way, sensitivity analysis of
the second variable I2 can also be conducted.
• The rules are expressed in terms of IF . . . T HEN form. Thus, it becomes easier for
the user to understand the control action.
• The performance of an FLC depends mainly on its Knowledge Base (KB) and design-
ing a proper KB of an FLC is not an easy task. The designer should have a thorough
knowledge of the process to be controlled.
• The number of rules of an FLC depends on number of variables and that of the
linguistic terms used to represent each variable. Thus, computational complexity
of an FLC increases, when it is developed for controlling a process involving many
variables.
L − dimensional space
N data points
the level of cluster fuzziness. Let us represent the membership matrix by [μ] and it has the
dimension of N × C. Thus, the membership value of i-th data point with j-th cluster is
represented by μij . It is to be noted that μij lies in the range of (0.0, 1.0) and it follows the
condition given below.
C
μij = 1.0 (8.12)
j=1
As the Euclidean distance is considered for dissimilarity measure, the objective function of
the optimization problem can be written as follows:
C
N
F (μ, C) = μgij d2ij , (8.13)
j=1 i=1
where dij is the Euclidean distance between i-th point and j-th cluster, that is calculated
like the following: dij = ||cj − xi ||. Now, to accommodate the constraints given in equation
(8.12), the above objective function can be re-written as follows:
C
N
N
C
F (μ, C, λ1 , . . . , λN ) = μgij d2ij + λi ( μij − 1.0), (8.14)
j=1 i=1 i=1 j=1
1
μij = 2 . (8.16)
C dij g−1
m=1 ( dim )
It is to be noted that the cluster centers and membership values can be updated using the
above equations (8.15) and (8.16).
The FCM algorithm consists of the following steps:
• Step 3: Initialize the N × C sized membership matrix [μ] at random, such that
μij ∈ [0.0, 1.0] and Cj=1 μij = 1.0, for each i.
• Step 4: Calculate k-th dimension of j-th cluster center CCjk using the expression
given below. N g
i=1 μij xik
CCjk = N g . (8.17)
i=1 μij
• Step 5: Calculate the Euclidean distance between i-th data point and j-th cluster
center like the following:
dij = (CCj − xi ). (8.18)
• Step 6: Update fuzzy membership matrix [μ] according to dij . If dij >0, then
1
μij = 2 . (8.19)
C dij g−1
m=1 ( dim )
If dij = 0, then the data point coincides with j-th cluster center CCj and it will have
the full membership value, that is, μij = 1.0.
• Step 7: Repeat from Step 4 to Step 6 until the changes in [μ] turn out to be less than
some pre-specified values.
Using this algorithm, fuzzy clusters of the data set will be generated. The boundaries of
the clusters may be such, that there will be some overlapping of two or more clusters. It is
important to mention that the performance of the algorithm depends on initial membership
values selected at random.
A Numerical Example:
Table 8.2 contains the coordinates of ten points lying on a free-form surface shown in
Fig. 8.18. Carry out clustering using the fuzzy C-means algorithm. Assume g = 1.25 and
termination criterion = 0.01.
Fuzzy Clustering 145
Solution:
Number of data points to be clustered N = 10
Dimensions of the data L = 3
Level of cluster fuzziness g = 1.25
Let us assume that the number of clusters to be made C = 2. Let us also suppose that
a membership matrix [μ] of size 10 × 2 is generated at random, as given below.
⎡ ⎤
0.680551 0.319449
⎢ 0.495150 0.504850 ⎥
⎢ ⎥
⎢ 0.821897 0.178103 ⎥
⎢ ⎥
⎢ ⎥
⎢ 0.303795 0.696205 ⎥
⎢ ⎥
⎢ 0.333966 0.666034 ⎥
[μ] = ⎢
⎢
⎥
⎥
⎢ 0.431538 0.568462 ⎥
⎢ ⎥
⎢ 0.415384 0.584616 ⎥
⎢ ⎥
⎢ 0.509643 0.490357 ⎥
⎢ ⎥
⎣ 0.469850 0.530150 ⎦
0.189164 0.810836
Now, the first dimension of first cluster center CC11 is determined like the following:
N g
i=1 μi1 xi1
CC11 = N g
i=1 μi1
A
= ,
B
Z X
Y
1
μ11 = d
2 ,
1+( d11 ) g−1
12
d11 = (0.487404 − 0.2)2 + (0.412837 − 0.4)2 + (0.543316 − 0.6)2 = 0.293221526,
where
d12 = (0.55486 − 0.2)2 + (0.459073 − 0.4)2 + (0.477262 − 0.6)2 = 0.380105056.
1
Therefore, μ11 = d11 8 = 0.888564, corresponding to g = 1.25. The values of other
1+( d )
12
elements of [μ] can be calculated in the same way and these are found to be as follows:
Fuzzy Clustering 147
⎡ ⎤
0.888564 0.111436
⎢ 0.909207 0.090793 ⎥
⎢ ⎥
⎢ 0.376533 0.623467 ⎥
⎢ ⎥
⎢ ⎥
⎢ 0.142926 0.857074 ⎥
⎢ ⎥
⎢ 0.217307 0.782693 ⎥
[μ] = ⎢
⎢
⎥
⎥
⎢ 0.922229 0.077771 ⎥
⎢ ⎥
⎢ 0.060962 0.939038 ⎥
⎢ ⎥
⎢ 0.562085 0.437915 ⎥
⎢ ⎥
⎣ 0.788303 0.211697 ⎦
0.232446 0.767554
It completes one iteration of the algorithm and this will continue until the termination
criterion: change in μ, that is, Δμ ≤ is reached.
After a few iterations, the cluster-centers will be obtained as follows:
and the values of membership grades are determined like the following:
⎡ ⎤
0.999999 0.000001
⎢ 0.997102 0.002898 ⎥
⎢ ⎥
⎢ 0.001223 0.998777 ⎥
⎢ ⎥
⎢ ⎥
⎢ 0.000008 0.999992 ⎥
⎢ ⎥
⎢ 0.351332 0.648668 ⎥
[μ] = ⎢
⎢
⎥
⎥
⎢ 0.999992 0.000008 ⎥
⎢ ⎥
⎢ 0.002764 0.997236 ⎥
⎢ ⎥
⎢ 0.992437 0.007563 ⎥
⎢ ⎥
⎣ 0.999452 0.000548 ⎦
0.001836 0.998164
Thus, the first cluster will be composed of 1-st, 2-nd, 6-th, 8-th and 9-th data points and
the second cluster will contain 3-rd, 4-th, 5-th, 7-th and 10-th data points.
0.5 = e−αd
During clustering, the point having the minimum total entropy may be selected as the
cluster center.
Clustering Algorithm:
Let us suppose that [T ] is the input data set containing N points and each data point has
L dimensions. Thus, [T ] is an N × L matrix. The clustering algorithm consists of the
following steps:
• Step 2: Identify xi that has the minimum Ei value and select it (xi,min ) as the cluster
center.
• Step 3: Put xi,min and the data points having similarity with xi,min greater than β
(which is a threshold value of similarity) in a cluster and remove them from [T ].
In the above algorithm, entropy has been defined in such a way that a data point, which
is far away from the rest of the data, may also be selected as a cluster center. It may happen
so, because a very distant point (from the rest of the data points) may have a low value of
entropy. To overcome this, another parameter γ (in %) is introduced, which is nothing but
a threshold used to declare a cluster to be a valid one. After the clustering is over, we count
the number of data points lying in each cluster and if this number becomes greater than
or equal to γ% of total number of data points, we declare this cluster to be a valid one.
Otherwise, these data points, which are unable to form a valid cluster, will be declared as
the outliers.
A Numerical Example:
The coordinates of ten points lying on a free-form surface are found to be as shown in
Table 8.2. Carry out fuzzy clustering based on their similarity and entropy values. Assume
β = 0.5 and γ = 10%.
Solution:
We first calculate Euclidean distances between the points using equation (8.20). As there
are 10 points, a total of 10 × 10 = 100 distances are possible and they can be expressed as
a 10 × 10 matrix. It is to be noted that out of these 100 distances, there are 10 diagonal
elements (such as d00 , d11 , d22 , d33 , . . . , d99 ), whose values are equal to 0.0. Thus, there are
effectively 100 − 10 = 90 elements, whose numerical values are non-zero. As the distance
between the points i and j, that is, dij is the same with that between the points j and i,
that is, dji , a total of 10 C2 = 45 distance values are to be really calculated. Table 8.3 shows
those Euclidean distance values. The mean of the distance values, that is, d is found to be
equal to 0.518373. The value of α is determined using equation (8.22) and it is seen to be
150 SOFT COMPUTING:Fundamentals and Applications
equal to 1.337160. The similarity values are also calculated using equation (8.21) and those
are also shown in Table 8.3. The entropy values of the data points are then calculated using
equation (8.24) and those are found to be like the following:
E0 = 8.285456, E1 = 8.665640,
E2 = 8.815512, E3 = 8.568537,
E4 = 8.516900, E5 = 8.348550,
E6 = 8.490743, E7 = 8.686420,
E8 = 8.560217, E9 = 8.632634.
It is observed from the above values of entropy that 0-th point has the least entropy and
thus, it is declared to be the first cluster center. Now, corresponding to a threshold value
of similarity β = 0.5, 1-st, 4-th, 5-th, 7-th and 8-th points are found to make cluster with
the 0-th point. The remaining points are as follows: 2-nd, 3-rd, 6-th, 9-th. Out of these
four points, the 6-th point is seen to have the least value of entropy. Thus, it is declared
as the center of second cluster. For β = 0.5, 2-nd, 3-rd and 9-th points are found to make
cluster with the 6-th point. As all ten points have been clustered (the first cluster contains
six point and the second cluster consists of four points), the number of outliers is found to
be equal to zero.
easily identified, as its density of points is higher than that of the outside. The density of
noise-region is generally less than that of a cluster. A cluster is declared to be a valid one,
if each point of it has a minimum number of neighborhood points. It is to be noted that
DBSCAN could outperform CLARANS algorithm in terms of its ability to form clusters of
arbitrary shapes.
8.4 Summary
This chapter has been summarized as follows:
1. Fuzzy set theory has been used in a number of ways. Out of all such applications, the
present chapter concentrates on two of them, namely fuzzy reasoning and clustering.
2. Fuzzy logic controller is a potential tool for dealing with imprecision and uncertainty.
Two of the most popular forms of fuzzy logic controller, such as Mamdani Approach
and Takagi & Sugeno’s Approach, have been explained in this chapter. Mamdani
Approach is characterized by its high interpretability and low accuracy, whereas the
aim of Takagi & Sugeno’s Approach is to obtain a high accuracy, which may be possible
to achieve at the cost of interpretability.
3. The number of rules of an FLC increases exponentially with the number of variables,
which increases computational complexity of the algorithm. Due to this problem of
rule explosion, a conventional FLC is unable to solve complex real-world problems
involving a large number of variables. To overcome this difficulty, the concept of
hierarchical FLC has been introduced, in which the number of rules is reduced signif-
icantly.
4. Clustering is a powerful tool for data mining. The clusters may be either crisp (having
well-defined and fixed boundaries) or fuzzy (having vague boundaries) in nature. This
chapter deals with the fuzzy clusters only.
5. The principles of fuzzy C-means algorithm and entropy-based fuzzy clustering algo-
rithms have been explained, in detail. Entropy-based fuzzy clustering algorithm is
more flexible compared to the fuzzy C-means algorithm. The performances of clus-
tering algorithms are seen to be data-dependent.
8.5 Exercise
1. Explain briefly the principle of Mamdani Approach of fuzzy logic controller. State its
advantages and disadvantages.
LW M H LW M H LW M H
1.0 1.0 1.0
μ μ μ
I I O
1 2
I2
LW M H
LW LW LW M
I1 M LW M H
H M H H
controller is shown in Table 8.4. Determine the output of the controller for a set of
inputs: I1 = 1.6, I2 = 22.0. Use the following methods of defuzzification: (i) Center
of sums method, (ii) Centroid method, (iii) Mean of maxima method.
8. An expert system based on Takagi and Sugeno’s approach of FLC is to be developed
to predict the output of a process. The membership function distributions of the
input and output variables are shown in Fig. 8.20. As there are two inputs: I1 and
I2 , and each input is represented using three linguistic terms (such as, LW , M , H),
there is a maximum of 3 × 3 = 9 feasible rules. The output of i-th rule, that is, y i
(i = 1, 2, . . . , 9) is expressed as follows: