Concepts of Soft Computing c78
Concepts of Soft Computing c78
Defuzzification
T : X × [0, 1] → X,
where A = (x, µ A(x))µ A(x) ∈ [0, 1], x ∈ X is the fuzzy set and the transformed
crisp set is A. In case of defuzzification of a fuzzy number to corresponding crisp
value, the transformation is considered as
T : × [0, 1] →
ã → T (ã) = x ∗
But there exists no specific approach for the choice of defuzzified crisp value;
instead, the defuzzification method needs to be selected with respect to the system
of the practical problem. Various defuzzification methods exist and may be found in
Zimmermann (2001), Lee (2006) and Sivanandam and Deepa (2012). In this chapter,
we have mainly discussed four types of defuzzification, viz., max-membership, cen-
troid methods, weighted-average, and mean–max methods. Further, MATLAB pro-
grams with respect to the defuzzification methods have also been included in the
present context.
In this regard, the defuzzification methods have been discussed in the next section.
7.1.1 Aggregation
Using Program 7.1, the aggregated fuzzy set with respect to four fuzzy sets is
obtained and the corresponding MATLAB plot is depicted in Fig. 7.3.
Input:
>> aggregate(4)
Enter the fuzzy set 1
Select 1 for triangular or 2 for trapezoidal or 3 for Gaussian fuzzy sets
1
Enter a TFN (a,b,c)
[-7, -5, 1]
Enter membership scaling factor between 0 to 1 for triangular type fuzzy set
0.5
Enter the fuzzy set 2
Select 1 for triangular or 2 for trapezoidal or 3 for Gaussian fuzzy sets
2
Enter a TrFN (a,b,c,d)
[-3, 1, 5, 6]
Enter membership scaling factor between 0 to 1 for trapezoial type fuzzy set
0.9
Enter the fuzzy set 3
Select 1 for triangular or 2 for trapezoidal or 3 for Gaussian fuzzy sets
2
Enter a TrFN (a,b,c,d)
[5, 6, 8, 9]
Enter membership scaling factor between 0 to 1 for trapezoial type fuzzy set
1
Enter the fuzzy set 4
Select 1 for triangular or 2 for trapezoidal or 3 for Gaussian fuzzy sets
3
Enter a GFN (a,b,c)
[-2, 3, 4]
Enter membership scaling factor between 0 to 1 for Gaussian type fuzzy set
0.7
Output:
7.1 Defuzzification Methods 121
The max-membership method gives the defuzzified point as the crisp value x ∗ ∈ X
having maximum membership value ∀x ∈ X . In this regard, the membership or
characteristic value corresponding to defuzzified point x ∗ ∈ X satisfies
Using Eq. (7.2), the GFN attends its maximum membership value 1 at x = 2.
Accordingly, the defuzzified crisp value x ∗ is 2.
In order to make max-membership method effective, we have written a MATLAB
code for computation of defuzzified crisp value in Program 7.2.
%Max-membership defuzzification
function maxmem(n)
%n is the number of fuzzy sets
%mf is the membership function of aggregated fuzzy set
[x,mf] = aggregate(n);
maxm = max(mf);
p = length(mf);
z = 0;
for i = 1:p
if(mf(i) == maxm)
z = x(i);
end
end
disp('The defuzzified crisp value is:');
disp(z);
end
Input:
>> maxmem(2)
Enter the fuzzy set 1
Select 1 for triangular or 2 for trapezoidal or 3 for Gaussian fuzzy sets
3
Enter a GFN (a,b,c)
[-5, 2, 3]
Enter membership scaling factor in interval [0,1] for Gaussian type fuzzy set
0.8
Enter the fuzzy set 2
Select 1 for triangular or 2 for trapezoidal or 3 for Gaussian fuzzy sets
1
Enter a TFN (a,b,c)
[-2, 2, 7]
Enter membership scaling factor in interval [0,1] for triangular type fuzzy set
1
Output:
The defuzzified crisp value is:
2
It may be noted that the integration is the usual algebraic integration. Accordingly,
based on Eq. (7.3), MATLAB code for performing defuzzification using centroid
method has been given in Program 7.3.
%Centroid defuzzification
function fcentroid(n)
%n is the number of fuzzy sets
%mf is the membership function of aggregated fuzzy set
z = 0;
[x,mf] = aggregate(n);
nx = length(x);
z = (sum(mf(1:nx).*x(1:nx))/(sum(mf(1:nx))));
disp('The defuzzified crisp value is:');
disp(z);
end
Input:
>> fcentroid(3)
Enter the fuzzy set 1
Select 1 for triangular or 2 for trapezoidal or 3 for Gaussian fuzzy sets
1
Enter a TFN (a,b,c)
[4, 5, 6]
Enter membership scaling factor in interval [0,1] for triangular type fuzzy set
0.2
Enter the fuzzy set 2
Select 1 for triangular or 2 for trapezoidal or 3 for Gaussian fuzzy sets
2
7.1 Defuzzification Methods 125
Output:
The defuzzified crisp value is:
-2.9882
Here, we have x ∗ ∈ X as
n
i=1 µC ( x̄ i ) · x̄ i
x∗ = n , (7.5)
i=1 µC ( x̄ i )
where x̄i is the centroid of maximum for each ith membership function of the aggre-
gated fuzzy set.
n
Further, i=1 represents the algebraic sum with respect to membership functions
of n fuzzy sets. The method seems appealing but has a limitation that it may be
applicable only in case of fuzzy sets having symmetric membership functions.
a+b
x∗ = . (7.5)
2
MATLAB command to obtain the defuzzification point using mean–max method
is “z = defuzz(x,mf,‘mom’)”, where “mf” is the aggregated membership function
corresponding to “x”.
There exist various other defuzzification methods. Readers may refer defuzzi-
fication commands in MATLAB for the other defuzzification techniques based on
bisector, middle, smallest, and largest of maximum methods.
Exercise
1. Define MATLAB function “wedavg” to compute defuzzification of fuzzy set
using weighted-average method.
References
H. Hellendoorn, C. Thomas, Defuzzification in fuzzy controllers. J. Intell. Fuzzy Syst. 1(2), 109–123
(1993)
G.J. Klir, B. Yuan, Fuzzy Sets and Fuzzy Logic, Theory and Applications (Prentice Hall, London,
2008)
K.H. Lee, First Course on Fuzzy Theory and Applications (Springer, New York, 2006)
S.N. Sivanandam, S.N. Deepa, Principles of Soft Computing (Wiley India Pvt. Ltd., New Delhi,
2012)
H.J. Zimmermann, Fuzzy control, in Fuzzy Set Theory—And Its Applications (Springer, Dordrecht,
1996), pp. 203–240
H.J. Zimmermann, Fuzzy Set Theory and Its Applications (Springer, New York, 2001)
Chapter 8
Interval System of Linear Equations
Ax = b, (8.1)
where A is the linear relation coefficient matrix having dimension m × n, b is the right-
hand side vector having m elements, and x is the solution vector having n variables.
But due to insufficiency and incompleteness of data, the parameters in such system
of equations may be uncertain which leads to uncertain system of linear equations.
According to Chaps. 1 and 3, the uncertainty may be handled using interval analysis
and fuzzy set approaches.
Note: Any fuzzy system of linear equations may be converted into appropriate ISLEs
since a fuzzy number is approximately represented by a set of closed intervals using
α-cut.
where [A] is the linear interval coefficient matrix having dimension m × n, [b] is the
interval vector of size m, and [x] is the corresponding solution vector consisting of n
variables. Further, Eq. (8.2) may be written as
n
[ai j ] = [bi ].
j=1
8.2.1.1 Method I
If the elements of coefficient interval matrix [A] in Eq. (8.5) are positive, that is,
∀a i j , āi j ∈ + for i, j = 1, 2, . . . , n, and then Eq. (8.5) may be further written as
a 11 x 1 + a 12 x 2 + . . . + a 1n x n = b1
a 21 x 1 + a 22 x 2 + . . . + a 2n x n = b2
.. , (8.6a)
.
a n1 x 1 + a n2 x 11 + . . . + a nn x 11 = bn
ā11 x̄ 1 + ā12 x̄ 2 + . . . + ā1n x̄ n = b̄1
ā21 x̄ 1 + ā22 x̄ 2 + . . . + ā2n x̄ n = b̄2
.. . (8.6b)
.
ān1 x̄ 1 + ān2 x̄ 2 + . . . + ānn x̄ n = b̄n
Accordingly, it may be noted that the ISLE in Eq. (8.3) gets converted to crisp
system of linear equations having double dimension. For instance, in case of a 2 ×
2 ISLE, Eq. (8.7) gets reduced to 4 × 4 crisp system of linear equation as
⎛ ⎞⎧ ⎫ ⎧ ⎫
a 11 a 12 0 0 ⎪ ⎪ x ⎪ ⎪ b ⎪
⎜a ⎨ 1⎪ ⎬ ⎪⎨ 1⎪ ⎬
⎜ 21 a 22 0 0 ⎟⎟ x b
⎝ 0
2 = 2 . (8.8)
0 ā11 ā12 ⎠⎪
⎪ x̄ ⎪ ⎪ b̄ ⎪
⎩ 1⎪ ⎭ ⎪⎩ 1⎪ ⎭
0 0 ā21 ā22 x̄2 b̄2
a 22 b1 − a 12 b2
x1 = , (8.9a)
a 11 a 22 − a 12 a 21
ā22 b̄1 − ā12 b̄2
x̄1 = , (8.9b)
ā11 ā22 − ā12 ā21
a b − a 21 b1
x 2 = 11 2 , (8.9c)
a 11 a 22 − a 12 a 21
ā11 b̄2 − a 21 b̄1
x2 = . (8.9d)
ā11 ā22 − ā12 ā21
Solution: Using Eqs. (8.8), (8.10) gets converted to crisp system of linear equations.
8.2 Interval System of Equations 133
⎛ ⎞⎧ ⎫ ⎧ ⎫
4 5 0 0 ⎪ ⎪ x ⎪ ⎪ 40 ⎪
⎜6 ⎨ 1⎪ ⎬ ⎪⎨ ⎪ ⎬
⎜ 4 0 0⎟⎟ x 43
⎝0
2 = .
0 6 8 ⎠⎪⎪ x̄ ⎪ ⎪ 67 ⎪
⎩ 1⎪ ⎭ ⎪⎩ ⎪ ⎭
0 0 7 5 x̄2 55
Accordingly, using Eqs. (8.9a, 8.9b, 8.9c, and 8.9d), the bounds of solution vector
are obtained as [x1 ] = [3.9286, 4.0385] and [x2 ] = [4.8571, 5.3462].
Program 8.1: MATLAB program for solving interval system of linear equations
using Eq. (8.8).
Input:
Enter the dimension of coefficient matrix A
2
Enter the lower bound of each element of interval aij:
[4 5; 6 4]
Enter the upper bound of each element of interval aij:
[6 8;7 5]
Enter the lower bounds of interval vector b:
[40;43]
Enter the upper bounds of interval vector b:
[67;55]
134 8 Interval System of Linear Equations
Output:
The crisp coefficient matrix is
A= 4 5 0 0
6 4 0 0
0 0 6 8
0 0 7 5
The crisp right-hand side vector is
b = 40
43
67
55
x= 3.9286
4.8571
4.0385
5.3462
8.2.1.2 Method II
Equation (8.8) may further be written in terms of lower and upper bounds, systems
of linear equations as given below:
a 11 a 12 x1 b1
,= (8.11a)
a 21 a 22 x2 b2
ā11 ā12 x̄1 b̄1
= . (8.11b)
ā21 ā22 x̄2 b̄2
a 22 b1 − a 12 b2
x1 = ,
a 11 a 22 − a 12 a 21
ā22 b̄1 − ā12 b̄2
x̄1 = ,
ā11 ā22 − ā12 ā21
a b − a 21 b1
x 2 = 11 2 ,
a 11 a 22 − a 12 a 21
ā11 b̄2 − ā21 b̄1
x̄2 = ,
ā11 ā22 − ā12 ā21
Program 8.2: A MATLAB program for solving interval system of linear equations
using Eqs. (8.11a, 8.11b).
Input:
Enter the dimension of coefficient matrix A
2
Enter the lower bound of each element of interval aij:
[4 5; 6 4]
Enter the lower bound of each element of interval aij:
[6 8;7 5]
Enter the upper bounds of interval vector b:
[40;43]
Enter the upper bounds of interval vector b:
[67;55]
Output:
The lower and upper bounds of solution vector x
xl = 3.9286
4.8571
xu = 4.0385
5.3462
If the elements of coefficient interval matrix [A] are either positive or negative, that
is, ∀a i j , āi j ∈ + or a i j , āi j ∈ − for i, j = 1, 2, . . . , n.
136 8 Interval System of Linear Equations
Fig. 8.1 A three-stepped bar with force applied at the free end
8.2 Interval System of Equations 137
Solution: Using finite element method for the three-stepped bar under static con-
dition yields the interval system of equation as given in (Behera and Chakraverty
2013)
⎛ ⎞
[1.2492, 1.4071] −[0.5544, 0.6262] 0
⎝ −[0.5544, 0.6262] [1.0126, 1.1524] −[0.4582, 0.5262] ⎠
0 −[0.4582, 0.5262] [0.4582, 0.5262]
⎧ ⎫ ⎧ ⎫ .
⎨ [u 2 , ū 2 ] ⎬ ⎨ 0 ⎬
× 107 [u 3 , ū 3 ] = 0 .
⎩ ⎭ ⎩ ⎭
[u 4 , ū 4 ] [7500, 12500]
Program 8.3: A MATLAB program for solving interval system of linear equations
using Method III.
138 8 Interval System of Linear Equations
Input:
Enter the dimension of coefficient matrix A
3
Enter the lower bound of each element of interval aij:
[1.2492 -0.6262 0;-0.6262 1.0126,-0.5262;0 -0.5262 0.4582]
Enter the upper bound of each element of interval aij:
[1.4071 -0.5544 0;-0.5544 1.1524 -0.4582; 0 -0.4582 0.5262]
Enter the lower bounds of interval vector b:
[0;0;7500]
Enter the upper bounds of interval vector b:
[0;0;12500]
Output:
The crisp coefficient matrix is
A = 1.2492 -0.5544 0 0 0 0
8.2 Interval System of Equations 139
The methods considered may not yield tighter interval bounds. Readers interested
in having more detail usage of various methods for solving interval system of linear
equations are encouraged to see the references Rohn (1989), Neumaier (1990) and
Chakraverty et al. (2017)
Similar procedures involving interval computations may be applied to solve fuzzy
system of linear equations using α-cut approach. As such, literature viz. (Abbasbandy
et al. 2006), (Behera and Chakraverty 2015), and the references mentioned therein
may be referred for solving fuzzy system of equations.
Exercise
1. Solve the ISLE [A][x] = [b], where the coefficient matrix and vector is given
by
[9, 11] −[3.9, 4.1] [26, 30]
[A] = and [b] = .
−[3.9, 4.1] [15, 16] [35, 39]
References
S. Abbasbandy, E. Reza, J. Ahmad, LU decomposition method for solving fuzzy system of linear
equations. Appl. Math. Comput. 172, 633–643 (2006)
D. Behera, S. Chakraverty, Fuzzy finite element analysis of imprecisely defined structures with
fuzzy nodal force. Eng. Appl. Artif. Intell. 26(10), 2458–2466 (2013)
D. Behera, S. Chakraverty, New approach to solve fully fuzzy system of linear equations using
single and double parametric form of fuzzy numbers. Sadhana 40, 35–49 (2015)
S. Chakraverty, M. Hladík, N.R. Mahato, A sign function approach to solve algebraically interval
system of linear equations for nonnegative solutions. Fundam. Inform. 152, 13–31 (2017)
S. Das, S. Chakraverty, Numerical solution of interval and fuzzy system of linear equations. Appl.
Appl. Math. 7, 334–356 (2012)
E. Hansen, On the solution of linear algebraic equations with interval coefficients. Linear Algebra
Appl. 2, 153–165 (1969)
P.T. Kahl, Solving narrow-interval linear equation systems is NP-hard. MS thesis. University of
Texas at El Paso, 1996
V. Kreinovich, A.V. Lakeyev, J. Rohn, P.T. Kahl, Computational Complexity and Feasibility of Data
Processing and Interval Computations, vol. 10 (Springer, 2013)
A. Neumaier, Interval Methods for Systems of Equations, vol. 37 (Cambridge University Press,
1990)
J. Rohn, Systems of linear interval equations. Linear Algebr. Appl. 126, 39–78 (1989)
S.P. Shary, A new technique in systems analysis under interval uncertainty and ambiguity. Reliable
Comput. 8, 321–418 (2002)