Defuzzification To Scalars
Defuzzification To Scalars
Defuzzification To Scalars
λ-cuts on fuzzy relations obey certain properties, just as λ-cuts on fuzzy sets do
(Equation (4.1)), as given in Equation (4.2):
1. . (R
∼
∪∼
S)λ = Rλ ∪ Sλ (4.2a)
2. . (R
∼
∩∼
S)λ = Rλ ∩ Sλ (4.2b)
3. . (R ) = R
∼ λ ∼λ
(4.2c)
4. . For any λ ≤ α, 0 ≤ α ≤ 1, then Rα ⊆ Rλ (4.2d)
DEFUZZIFICATION TO SCALARS
As mentioned in the introduction, there may be situations where the output of a fuzzy
process needs to be a single scalar quantity as opposed to a fuzzy set. Defuzzification is the
conversion of a fuzzy quantity to a precise quantity, just as fuzzification is the conversion
of a precise quantity to a fuzzy quantity. The output of a fuzzy process can be the logical
union of two or more fuzzy membership functions defined on the universe of discourse of
the output variable. For example, suppose a fuzzy output comprises two parts: (1) C ∼1
,a
trapezoidal shape (Figure 4.11a) and (2) C∼ 2 , a triangular membership shape (Figure 4.11b).
The union of these two membership functions, that is, C ∼
=C
∼1
∪C∼2
, involves the max
operator, which graphically is the outer envelope of the two shapes shown in Figure 4.11a
and b; the resulting shape is shown in Figure 4.11c. Of course, a general fuzzy output
m m
1 1
0.5
0 2 4 6 8 10 z 0 6 8 10 z
(a) (b)
m
0.5
0 2 4 6 8 10 z
(c)
FIGURE 4.11
Typical fuzzy process output: (a) first part of fuzzy output; (b) second part of fuzzy output; and (c)
union of both parts.
DEFUZZIFICATION TO SCALARS 99
process can involve many output parts (more than two), and the membership function
representing each part of the output can have shapes other than triangles and trapezoids.
Further, as Figure 4.11a shows, the membership functions may not always be normal. In
general, we can have
k
C
∼k
= C
∼i
=C∼
. (4.3)
i=1
Among the many methods that have been proposed in the literature in recent years,
seven are described here for defuzzifying fuzzy output functions (membership functions)
(Hellendoorn and Thomas, 1993). Four of these methods are first summarized and illus-
trated in two examples, then the additional three methods are described and illustrated in
two other examples.
1. Max membership principle: Also known as the height method , this scheme is limited
to peaked output functions. This method is given by the algebraic expression
where denotes an algebraic integration. This method is shown in Figure 4.13.
3. Weighted average method: The weighted average method is the most frequently used
in fuzzy applications since it is one of the more computationally efficient methods.
Unfortunately, it is usually restricted to symmetrical output membership functions. It
is given by the algebraic expression
μC (z) · z
∗
z =
∼ , (4.6)
μC (z)
∼
where denotes the algebraic sum and where z is the centroid of each symmetric
membership function. This method is shown in Figure 4.14. The weighted aver-
age method is formed by weighting each membership function in the output by its
m
1
z* z
FIGURE 4.12
Max membership defuzzification method.
100 MEMBERSHIP FUNCTIONS, FUZZIFICATION, AND DEFUZZIFICATION
m
1
FIGURE 4.13
z* z Centroid defuzzification method.
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 , B , and B
∼1 ∼ 2 ∼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 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 boundaries and public right-of-way for old utility lines and old roads. The
three fuzzy sets, B , B , and B
∼1 ∼2 ∼3
, shown in Figures 4.16–4.18, respectively, represent
the uncertainty in each survey as to the membership of right-of-way width, in meters, in
privately owned land.
1
0.9
0.5
0 a b z
FIGURE 4.14
Weighted average method of defuzzification.
DEFUZZIFICATION TO SCALARS 101
0 a z* b z
FIGURE 4.15
Mean max membership defuzzification method.
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 of
the right-of-way purchasing cost. Using Equations (4.5)–(4.7) and the preceding three
fuzzy sets, we want to find z∗ .
According to the centroid method, Equation (4.5), z∗ can be found using
μB (z) · z dz
∗
z = ∼
μB (z) dz
∼
1 3.6 4 5.5
z − 3.0
= (0.3z)z dz + (0.3)z dz + z dz + (0.5)z dz
0 1 3.6 2 4
6 7 8
+ (z − 5)z dz + z dz + (8 − z) z dz
5.5 6 7
5.5
1 3.6
z − 3.6
4
÷ (0.3z) dz + (0.3) dz + dz + (0.5) dz
0 1 3.6 2 4
8
6
z − 5.5 7
7−z
+ dz + dz + dz
5.5 2 6 7 2
= 4.9 m,
m
0.3
0 1 2 3 4 5 z (m)
FIGURE 4.16
Fuzzy set B
∼1
: public right-of-way width (z ) for survey 1.
102 MEMBERSHIP FUNCTIONS, FUZZIFICATION, AND DEFUZZIFICATION
0.5
2 3 4 5 6 7 z (m)
FIGURE 4.17
Fuzzy set B
∼2
: public right-of-way width (z ) for survey 2.
0.5
3 4 5 6 7 8 z (m)
FIGURE 4.18
Fuzzy set B
∼3
: public right-of-way width (z ) for survey 3.
0.5
0.3
z*
0 1 2 3 4 5 6 7 8 z
FIGURE 4.19
The centroid method for finding z * .
Example 4.4. Many products, such as tar, petroleum jelly, and petroleum, are extracted
from crude oil. In a newly drilled oil well, three sets of oil samples are taken and tested
for their viscosity. The results are given in the form of the three fuzzy sets B , B , and
∼1 ∼2
B
∼3
, all defined on a universe of normalized viscosity, as shown in Figures 4.22–4.24.
Using Equations (4.4)–(4.6), we want to find the most nearly representative viscosity
value for all three oil samples, and hence find z∗ for the three fuzzy viscosity sets.
DEFUZZIFICATION TO SCALARS 103
0.5
0.3 z*
0 1 2 3 4 5 6 7 8 z
FIGURE 4.20
The weighted average method for finding z * .
0.5
0.3 z*
0 1 2 3 4 5 6 7 8 z
FIGURE 4.21
The mean max membership method for finding z * .
0.5
0 1 2 3 4 5 z
FIGURE 4.22
Membership in viscosity of oil sample 1, B
∼1
.
0.5
0 1 2 3 4 5 z
FIGURE 4.23
Membership in viscosity of oil sample 2, B
∼2
.
104 MEMBERSHIP FUNCTIONS, FUZZIFICATION, AND DEFUZZIFICATION
0.5
0 1 2 3 4 5 z
FIGURE 4.24
Membership in viscosity of oil sample 3, B
∼3
.
0.5
z*
0 1 2 3 4 5 z
FIGURE 4.25
Logical union of three fuzzy sets B , B , and B
∼1 ∼2 ∼3
.
To find z∗ using the centroid method, we first need to find the logical union of the
three fuzzy sets. This is shown in Figure 4.25. Also shown in Figure 4.25 is the result
of the max membership method, Equation (4.4). For this method, we see that μB (z∗ )
∼
has three locations where the membership equals unity. This result is ambiguous and,
in this case, the selection of the intermediate point is arbitrary, but it is closer to the
centroid of the area shown in Figure 4.25. There could be other compelling reasons to
select another value in this case; perhaps, max membership is not a good metric for this
problem.
According to the centroid method, Equation (4.5),
μB (z)z dz
z∗ = ∼
μB (z) dz
∼
1.5 1.8 2 2.33
= (0.67z)z dz + (2 − 0.67z)z dz + (z − 1)z dz + (3 − z)z dz
0 1.5 1.8 2
3 5
+ (0.5z − 0.5)z dz + (2.5 − 0.5z)z dz
2.33 3
1.5 1.8 2 2.33
÷ (0.67z) dz + (2 − 0.67z) dz + (z − 1) dz + (3 − z) dz
0 1.5 1.8 2
3 5
+ (0.5z − 0.5) dz + (2.5 − 0.5z) dz
2.33 3
= 2.5 m.
DEFUZZIFICATION TO SCALARS 105
0.5
z*
0 1 2 3 4 5 z
FIGURE 4.26
Centroid value z * for three fuzzy oil samples.
m
0.5
a b z* c
0 1 2 3 4 5 z
FIGURE 4.27
Weighted average method for z * .
The centroid value obtained, z∗ , is shown in Figure 4.26.
According to the weighted average method, Equation (4.6),
(1 × 1.5) + (1 × 2) + (1 × 3)
z∗ = = 2.25 m,
1+1+1
and is shown in Figure 4.27.
Three other popular methods that are worthy of discussion because of their appear-
ance in some applications are the center of sums, center of largest area, and first of
maxima methods (Hellendoorn and Thomas, 1993). These methods are now developed.
5. Center of sums: This is faster than many defuzzification methods that are currently in
use, and the method is not restricted to symmetric membership functions. This process
involves the algebraic sum of individual output fuzzy sets, say C ∼1
and C∼2
, instead of
their union. Two drawbacks to this method are that the intersecting areas are added
twice, and the method also involves finding the centroids of the individual membership
functions. The defuzzified value z∗ is given as follows:
n
μCk (z) z z dz
∼
z∗ = n
k=1
, (4.8)
μCk (z) z dz
∼
k=1
where the symbol z is the distance to the centroid of each of the respective membership
functions.
106 MEMBERSHIP FUNCTIONS, FUZZIFICATION, AND DEFUZZIFICATION
1.0
C
~1
0.5
0 2 4 6 8 10 z
(a)
m m
1.0 1.0
C
~2
0.5 0.5
0 2 4 6 8 10 z 0 2 4 6 8 10 z
z*
(b) (c)
FIGURE 4.28
Center of sums method: (a) first membership function; (b) second membership function; and (c)
defuzzification step.
This method is similar to the weighted average method, Equation (4.6), except that
in the center of sums method the weights are the areas of the respective member-
ship functions whereas in the weighted average method the weights are individual
membership values. Figure 4.28 is an illustration of the center of sums method.
6. Center of largest area: If the output fuzzy set has at least two convex subregions, then
the center of gravity (i.e., z∗ is calculated using the centroid method, Equation 4.5) of
the convex fuzzy subregion with the largest area is used to obtain the defuzzified value
z∗ of the output. This is shown graphically in Figure 4.29, and given algebraically as
μCm (z)z dz
∼
∗
z = , (4.9)
μCm (z) dz
∼
where C ∼m
is the convex subregion that has the largest area making up C ∼k
. This
condition applies in the case when the overall output C ∼k
is nonconvex. And, in the
∗
case when C ∼k
is convex, z is the same quantity as determined by the centroid method
or the center of largest area method (because then there is only one convex region).
7. First (or last) of maxima: This method uses the overall output or union of all individual
output fuzzy sets C ∼k
to determine the smallest value of the domain with maximized
membership degree in C ∼k
. The equations for z∗ are as follows.
DEFUZZIFICATION TO SCALARS 107
1.0
0.5
0 2 4 6 8 10 z
z*
FIGURE 4.29
Center of largest area method (outlined with bold lines), shown for a nonconvex C
∼k
.
hgt(C
∼k
) = sup μCk (z). (4.10)
∼
z∈Z
In Equations (4.10)–(4.12) the supremum (sup) is the least upper bound and the
infimum (inf) is the greatest lower bound. Graphically, this method is shown in
Figure 4.30, where, in the case illustrated in the figure, the first max is also the
last max and, because it is a distinct max, is also the mean max. Hence, the methods
presented in Equations (4.4) (max or height), (4.7) (mean max), (4.11) (first max), and
(4.12) (last max) all provide the same defuzzified value, z∗ , for the particular situation
illustrated in Figure 4.30.
1.0
0.5
0 2 4 6 8 10 z
z*
FIGURE 4.30
First of max (and last of max) method.
108 MEMBERSHIP FUNCTIONS, FUZZIFICATION, AND DEFUZZIFICATION
0.5
0.3
0 1 2 3 4 5 6 7 8 z
z*
FIGURE 4.31
Center of sums result for Example 4.5.
The problems illustrated in Examples 4.3 and 4.4 are now continued to illustrate
the last three methods presented.
Example 4.5. Continuing with Example 4.3 on the railroad company planning to lay a
new rail line, we will calculate the defuzzified values using the (1) center of sums method,
(2) center of largest area, and (3) first maxima and last maxima.
According to the center of sums method, Equation (4.8), z∗ will be as follows:
with the result shown in Figure 4.31. The center of largest area method, Equation (4.9),
provides the same result (i.e., z∗ = 4.9) as the centroid method, Equation (4.5), because
the complete output fuzzy set is convex, as seen in Figure 4.32. According to the first of
maxima and last of maxima methods, Equations (4.11) and (4.12), z∗ is shown as z1∗ and
z2∗ , respectively, in Figure 4.33.
Example 4.6. Continuing with Example 4.4 on the crude oil problem, the center of sums
method, Equation (4.8), produces a defuzzified value for z∗ of
which is shown in Figure 4.34. In the center of largest area method, we first determine the
areas of the three individual convex fuzzy output sets, as seen in Figure 4.35. These areas
are 1.02, 0.46, and 1.56 square units, respectively. Among them, the third area is largest,
so the centroid of that area will be the center of the largest area. The defuzzified value is
calculated to be z∗ = 3.3:
0.67
+ 2.33 [0.5 × 0.67(1 + 0.67)] + 3.66(0.5 × 2 × 1)
2
z∗ = = 3.3 m.
[0.5 × 0.67(1 + 0.67)] + (0.5 × 2 × 1)
Finally, one can see graphically in Figure 4.36 that the first of maxima and last of max-
ima, Equations (4.11) and (4.12), give different values for z∗ , namely, z∗ = 1.5 and 3.0,
respectively.
DEFUZZIFICATION TO SCALARS 109
0.5
0.3
0 1 2 3 4 5 6 7 8 z
z* = 4.9
FIGURE 4.32
Output fuzzy set for Example 4.5 is convex.
0.5
0.3
0 1 2 3 4 5 6 7 8 z
z1* z2*
FIGURE 4.33
First of maxima solution (z 1 * = 6) and last of maxima solution (z2 ∗ = 7).
0.5
0 1 2 3 4 5 z
z*
FIGURE 4.34
Center of sums solution for Example 4.6.
110 MEMBERSHIP FUNCTIONS, FUZZIFICATION, AND DEFUZZIFICATION
0.5
(1) (2) (3)
0 1 2 3 4 5 z
z*
FIGURE 4.35
Center of largest area method for Example 4.6.
0.5
z* z*
0 1 2 3 4 5 z
FIGURE 4.36
First of maxima gives z∗ = 1.5 and last of maxima gives z∗ = 3.
SUMMARY
This chapter has introduced the various features and forms of a membership function and
the idea of fuzzyifying scalar quantities to make them fuzzy sets. The primary focus of the
chapter, however, has been to explain the process of converting from fuzzy membership
functions to crisp formats – a process called defuzzification. Defuzzification is necessary
because, for example, we cannot instruct the voltage going into a machine to increase
“slightly,” even if this instruction comes from a fuzzy controller – we must alter its voltage
by a specific amount. Defuzzification is a natural and necessary process. In fact, there
is an analogous form of defuzzification in mathematics where we solve a complicated
problem in the complex plane: find the real and imaginary parts of the solution and then
decomplexify the imaginary solution back to the real numbers space (Bezdek, 1993).
There are numerous other methods for defuzzification that have not been presented here.
A review of the literature will provide the details on some of these (see, for example,
Filev and Yager, 1991; Yager and Filev, 1993).
The following is a natural question to ask: Of the seven defuzzification methods
presented, which is the best? One obvious answer to the question is that it is context-
or problem dependent. To answer this question in more depth, Hellendoorn and Thomas
(1993) have specified five criteria against which to measure the methods. These criteria