0% found this document useful (0 votes)
171 views33 pages

11 - Fuzzy Systems

The Mamdani fuzzy system is an early fuzzy system that uses fuzzy if-then rules to map fuzzy inputs to fuzzy outputs. It applies fuzzy rules using minimum or algebraic product operators, aggregates the rule outputs using maximum, and defuzzifies the aggregate output using centroid calculation to produce a crisp output. For example, a 4-rule 1-input 1-output Mamdani system is defined to map an age input to a life experience output using Gaussian membership functions and max-min composition with centroid defuzzification to generate the input-output curve.

Uploaded by

Sanyukta Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
171 views33 pages

11 - Fuzzy Systems

The Mamdani fuzzy system is an early fuzzy system that uses fuzzy if-then rules to map fuzzy inputs to fuzzy outputs. It applies fuzzy rules using minimum or algebraic product operators, aggregates the rule outputs using maximum, and defuzzifies the aggregate output using centroid calculation to produce a crisp output. For example, a 4-rule 1-input 1-output Mamdani system is defined to map an age input to a life experience output using Gaussian membership functions and max-min composition with centroid defuzzification to generate the input-output curve.

Uploaded by

Sanyukta Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Chapter 11

Fuzzy Systems

11.1 Introduction

The block diagram of a fuzzy system (FS) with one crisp (or fuzzy) input
and one crisp output is shown in Figure 11.1.1.

A fuzzy system consists of three core operations, namely applying fuzzy


if-then rules obtained from training (or expert knowledge) in which
membership functions are used to represent fuzzy rules; fuzzy
aggregation to induce a fuzzy conclusion from the consequences of all
the rules; and defuzzification of the fuzzy conclusion to a crisp output.

Figure 11.1.1 Block diagram of a fuzzy system.

A fuzzy system can take either crisp inputs or fuzzy inputs, but the
outputs produced are often fuzzy.

For practical applications, it is often required to have crisp outputs in


which defuzzification is required to extract a crisp value that
appropriately represents a fuzzy output.

In this chapter, three fuzzy systems are described and each of them
is illustrated by two design examples.

The differences between these three fuzzy systems lie in the


Page 11-2 Intelligent Computing

consequents of their fuzzy rules, and consequently their aggregation and


defuzzification procedures are different.

The Mamdani fuzzy system requires a defuzzification whereas the TSK


and Tsukamoto fuzzy systems do not require a defuzzification.

Fuzzy systems have applications in a variety of fields. An earlier


reference for fuzzy systems is given by [Jan9700].

11.2 Mamdani Fuzzy System

The Mamdani fuzzy system [Mam7501] is the earliest fuzzy system


among the three fuzzy systems described in this chapter.

Different 𝑇-norm operators (such as minimum, algebraic product) and


𝑆-norm operators (such as maximum, algebraic sum) can be used for
fuzzy reasoning.

Typical examples are min-max and product-max in which the latter has
been used due to its amenability to mathematical analysis.

For illustration, an example is shown in Figure 11.2.1 to explain how a


two-rule two-input one-output Mamdani fuzzy system derives an
overall output 𝑦 when subjected to two fuzzy inputs 𝑥 and 𝑥 .

Rule 1: If 𝐴 is low and 𝐴 is high then 𝐵 is low

Rule 2: If 𝐴 is high and 𝐴 is low then 𝐵 is high

The inferred output of each rule 𝐵 (for 𝑟 1 to 2) is a membership


function 𝜇 𝑦 cropped by the rule’s firing strength 𝑤 obtained
using (a) the minimum operator (as 𝑤 min 𝑤 , 𝑤 ) or (b) the

algebraic product operator (as 𝑤 𝑤 𝑤 ), where 𝑤 (for 𝑖 = 1,


2) denotes the peak of the intersection of the input 𝑗 with the
antecedent 𝑗 of the 𝑟th rule.
Chapter 11 Fuzzy Systems Page 11-3

The Mamdani fuzzy system aggregates all its rule’s membership


function outputs by taking the maximum operator before applying
defuzzification.

The Mamdani fuzzy system can take either crisp inputs or fuzzy inputs
(for example, fuzzy inputs 𝐴 and 𝐴 are used in Figure 11.2.1).

Antecedent 1 Antecedent 2 Consequence


1 A 1 A 1 B
11 12 1
0.5 0.5 0.5

0 0 0
0 50 100 −50 0 50 −10 0 10
x1 x2 y

1 A21 1 A22 1 B2
0.5 0.5 0.5

0 0 0
0 50 100 −50 0 50 −10 0 10
x x y
1 2
Input 1 Input 2 Output
1 A1 1 A2 1 y0
0.5 0.5 0.5
B
0 0 0
0 50 100 −50 0 50 −10 0 10
x x y
1 2

Figure 11.2.1 Mamdani fuzzy system (2-rule 2-input 1-output;


minimum operator for weights 𝑤 0.3733, 𝑤 0.2500; centroid
defuzzified output 𝑦 0.4815).

Design Example 11.1 (4-rule 1-input 1-output Mamdani fuzzy system)


Matlab

For a four-rule one-input one-output Mamdani fuzzy system, let 𝑋 be


the fuzzy input and 𝑌 be the fuzzy output of the system. The four rules
of the fuzzy system are defined by
Page 11-4 Intelligent Computing

Rule 1: If 𝑋 is very young then 𝑌 implies fair life experience

Rule 2: If 𝑋 is young then 𝑌 implies good life experience

Rule 3: If 𝑋 is old then 𝑌 implies very good life experience

Rule 4: If 𝑋 is very old then 𝑌 implies excellent life experience

The antecedent membership functions are defined as

𝜇 𝑥 GBellMF 𝑥, 10, 3, 0

𝜇 𝑥 GBellMF 𝑥, 20, 5, 30

𝜇 𝑥 GBellMF 𝑥, 20, 5, 70

𝜇 𝑥 GBellMF 𝑥, 10, 3, 100

where 𝑥 ∈ 0, 100 .

The consequent membership functions are defined as

𝜇 𝑦 GBellMF 𝑦, 1, 8, 0

𝜇 𝑦 GBellMF 𝑦, 1, 6, 2

𝜇 𝑦 GBellMF 𝑦, 2, 6, 5

𝜇 𝑦 GBellMF 𝑦, 2, 8, 9

where 𝑦 ∈ 0, 10 .

Use the max-min composition and the centroid defuzzification,


determine the overall input to output curve with a crisp input 𝑥.
Chapter 11 Fuzzy Systems Page 11-5

Solution

Figure E11.1.1(a)-(b) plots the membership function of input 𝑋 and


output 𝑌, where the input and output universes are [0, 100] and [0, 10],
respectively.

With max-min composition and the centroid defuzzification, the overall


input-output curve can be obtained as shown in Figure E11.1.1(c).

For examples,

a. At 𝑥 0, only the Rule 1 wins with a membership value of 1, the


defuzzified output is equal to the centroid of the output membership
function of the Rule 1 which is 0.6.
𝑤𝑎 𝑦 𝑤 𝑎 𝑦 𝑤 𝑎 𝑦 𝑤𝑎 𝑦 𝑤𝑎 𝑦
𝑦 𝑦 0.6
𝑤𝑎 𝑤 𝑎 𝑤 𝑎 𝑤𝑎 𝑤𝑎

b. At 𝑥 30, only the Rule 2 wins with a membership value of 1, the


defuzzified output is equal to the centroid of the output membership
function of the Rule 2 which is 2.0.
𝑤𝑎 𝑦 𝑤 𝑎 𝑦 𝑤 𝑎 𝑦 𝑤𝑎 𝑦 𝑤 𝑎 𝑦
𝑦 𝑦 2.0
𝑤𝑎 𝑤 𝑎 𝑤 𝑎 𝑤𝑎 𝑤 𝑎

c. At 𝑥 70, only the Rule 3 wins with a membership value of 1, the


defuzzified output is equal to the centroid of the output membership
function of the Rule 3 which is 5.0.
𝑤𝑎 𝑦 𝑤 𝑎 𝑦 𝑤 𝑎 𝑦 𝑤𝑎 𝑦 𝑤 𝑎 𝑦
𝑦 𝑦 5.0
𝑤𝑎 𝑤 𝑎 𝑤 𝑎 𝑤𝑎 𝑤 𝑎

d. At 𝑥 100, only the Rule 4 wins with a membership value of 1,


the defuzzified output is equal to the centroid of the output membership
function of the Rule 4 which is 8.4.
Page 11-6 Intelligent Computing

𝑤𝑎 𝑦 𝑤 𝑎 𝑦 𝑤 𝑎 𝑦 𝑤𝑎 𝑦 𝑤𝑎 𝑦
𝑦 𝑦 8.4
𝑤𝑎 𝑤 𝑎 𝑤 𝑎 𝑤𝑎 𝑤𝑎

e. At any 𝑥 where multiple input membership functions overlap,


multiple rules win each with a membership value of less than 1, the
output is then given by the centroid of the multiple overlapping output
membership functions each weighted by its input membership value. In
this example, one rule can win as shown in the cases 𝑎 to 𝑑 above or
two rules can win in the case 𝑓 below. 

f. At 𝑥 10, the Rule 1 wins with a membership value of 𝑤 0.5


in which the area and the centroid of its output membership function are,
respectively, 𝑎 1 and 𝑦 0.6 ; also, the Rule 2 wins with a
membership of 𝑤 0.5 in which the area and centroid of its output
membership function are, respectively, 𝑎 2 and 𝑦 2 .
According to the (10.6.9), the overall defuzzified centroid output is
𝑤𝑎 𝑦 𝑤 𝑎 𝑦 𝑤 𝑎 𝑦 𝑤𝑎 𝑦 𝑤𝑎 𝑦 𝑤 𝑎 𝑦
𝑦
𝑤𝑎 𝑤 𝑎 𝑤 𝑎 𝑤𝑎 𝑤𝑎 𝑤 𝑎
0.5 1 0.6 0.5 2 2
1.5333
0.5 1 0.5 2
Note that the output variable never reaches the minimum value 0 and
the maximum value 10 of the output universe.

Instead, the reachable minimum and maximum of the output variable


are determined by the centroids of the leftmost and rightmost
consequent membership functions, respectively (as can be seen from the
equation used to compute weight average).
Chapter 11 Fuzzy Systems Page 11-7

(a) Antecedent MFs of X

1
Membership Grade

0.8 very young young old very old


0.6
0.4
0.2
0
0 20 40 60 80 100
x
(b) Consequence MFs of Y

1
Membership Grade

0.8 fair good very good excellent


0.6
0.4
0.2
0
0 2 4 6 8 10
y

(c) Overall input/output


10

5
y

0
0 20 40 60 80 100
x

Figure E11.1.1 Mamdani fuzzy system (4-rule 1-input 1-output).


Page 11-8 Intelligent Computing

Design Example 11.2 (4-rule 2-input 1-output Mamdani fuzzy system)


Matlab

For a four-rule two-input one-output Mamdani fuzzy system, let 𝑋


and 𝑋 be the inputs and 𝑌 be the output of the system.

The four rules of the fuzzy system are defined by

Rule 1: If 𝑋 is cold and 𝑋 is cold then 𝑌 is very cold

Rule 2: If 𝑋 is cold and 𝑋 is warm then 𝑌 is cold

Rule 3: If 𝑋 is warm and 𝑋 is cold then 𝑌 is warm

Rule 4: If 𝑋 is warm and 𝑋 is warm then 𝑌 is very warm

The antecedent membership functions of 𝑋 are defined as

𝜇 𝑥 GBellMF 𝑥 , 20, 8, 5

𝜇 𝑥 GBellMF 𝑥 , 15, 8, 30

where 𝑥 ∈ 20, 30 .

The antecedent membership functions of 𝑋 are defined as

𝜇 𝑥 GBellMF 𝑥 , 20,10, 15

𝜇 𝑥 GBellMF 𝑥 , 25, 10, 30

where 𝑥 ∈ 20, 30 .

The consequent membership functions of 𝑌 are defined as

𝜇 𝑦 GBellMF 𝑦, 10, 8, 20

𝜇 𝑦 GBellMF 𝑦, 10, 8, 0
Chapter 11 Fuzzy Systems Page 11-9

𝜇 𝑦 GBellMF 𝑦, 7, 8, 17
𝜇 𝑦 GBellMF 𝑦, 6, 8, 30

where 𝑦 ∈ 20, 30 .

Using the max-min composition and the centroid defuzzification,


determine the overall input to output relationship with two crisp inputs
𝑥 and 𝑥 .

Solution

Figure E11.2.1 (a)-(c) plots the membership function of inputs 𝑋 and


𝑋 , and output 𝑌, where the input and output universes are all equal to
[20, 30].

With the max-min composition and the centroid defuzzification, the


overall input-output curve can be obtained as shown in Figure E11.2.1
(d).

For examples,

a. At 𝑥 15 and 𝑥 15 , only the Rule 1 wins with a


membership value of 1, the defuzzified output is equal to the centroid
of the output membership function of the Rule 1 which is 15.
𝑤𝑎 𝑦 𝑤 𝑎 𝑦 𝑤 𝑎 𝑦 𝑤𝑎 𝑦 𝑤𝑎 𝑦
𝑦 𝑦 15
𝑤𝑎 𝑤 𝑎 𝑤 𝑎 𝑤𝑎 𝑤𝑎

b. At 𝑥 10 and 𝑥 10, only the Rule 2 wins with a membership


value of 1, the defuzzified output is equal to the centroid of the output
membership function of the Rule 2 which is 0.0.
𝑤𝑎 𝑦 𝑤 𝑎 𝑦 𝑤 𝑎 𝑦 𝑤𝑎 𝑦 𝑤 𝑎 𝑦
𝑦 𝑦 0
𝑤𝑎 𝑤 𝑎 𝑤 𝑎 𝑤𝑎 𝑤 𝑎
Page 11-10 Intelligent Computing

(a) Antecedent MFs of x1

1
Membership Grade

cold warm

0.5

0
−20 −10 0 10 20 30
x
1
(b) Antecedent MFs of x2

1
Membership Grade

cold warm

0.5

0
−20 −10 0 10 20 30
x2

(c) Consequence MFs of y


1
Membership Grade

very cold cold warm very warm

0.5

0
−20 −10 0 10 20 30
y
(d) Overall input/output

20
10
y

0
−10
30
20 30
10 10 20
0 0
−10 −10
−20 −20
x x
2 1

Figure E11.2.1 Mamdani fuzzy system (4 rule 2-input 1-output).


Chapter 11 Fuzzy Systems Page 11-11

c. At 𝑥 25 and 𝑥 10 , only the Rule 3 wins with a


membership value of 1, the defuzzified output is equal to the centroid
of the output membership function of the Rule 3 which is 17.
𝑤𝑎 𝑦 𝑤 𝑎 𝑦 𝑤 𝑎 𝑦 𝑤𝑎 𝑦 𝑤 𝑎 𝑦
𝑦 𝑦 17
𝑤𝑎 𝑤 𝑎 𝑤 𝑎 𝑤𝑎 𝑤 𝑎

d. At 𝑥 25 and 𝑥 15, only the Rule 4 wins with a membership


value of 1, the defuzzified output is equal to the centroid of the output
membership function of the Rule 4 which is 27.
𝑤𝑎 𝑦 𝑤 𝑎 𝑦 𝑤 𝑎 𝑦 𝑤𝑎 𝑦 𝑤𝑎 𝑦
𝑦 𝑦 27
𝑤𝑎 𝑤 𝑎 𝑤 𝑎 𝑤𝑎 𝑤𝑎

e. At any 𝑥 and 𝑥 where multiple input membership functions


overlap, multiple rules win each with a membership value of less than
1, the output is then given by the centroid of the multiple overlapping
output membership functions each weighted by its input membership
value. In this example, one, two, and four rules can win.

f. At 𝑥 15 and 𝑥 10, the Rule 1 wins with a membership


value of 𝑤 min(0.5, 1.0) = 0.5 in which the area and centroid of its
output membership function are respectively, 𝑎 10 and 𝑦 15;
also, the Rule 3 wins with a membership value of 𝑤 min(0.5, 1.0)
= 0.5 in which the area and centroid of its output membership function
are respectively, 𝑎 14 and 𝑦 17. According to (10.6.9), the
overall defuzzified output can be expressed as
𝑤𝑎 𝑦 𝑤 𝑎 𝑦 𝑤 𝑎 𝑦 𝑤𝑎 𝑦 𝑤𝑎 𝑦 𝑤 𝑎 𝑦
𝑦
𝑤𝑎 𝑤 𝑎 𝑤 𝑎 𝑤𝑎 𝑤𝑎 𝑤 𝑎
0.5 10 15 0.5 14 17
3.6667
0.5 10 0.5 14
g. At 𝑥 15 and 𝑥 2.5, the Rule 1 wins with a membership
value of 𝑤 min(0.5, 0.85) = 0.5 in which the area and centroid of
Page 11-12 Intelligent Computing

its output membership function are respectively, 𝑎 10 and 𝑦


15; the Rule 2 wins with a membership value of min (0.5, 0.15) = 0.15
in which the area and centroid of its output membership function are
respectively, 𝑎 20 and 𝑦 0; the Rule 3 wins with a membership
value of 𝑤 min(0.5, 0.85) = 0.5 in which the centroid of its output
membership function are respectively, 𝑎 14 and 𝑦 17 ; the
Rule 4 wins with a membership value of 𝑤 min (0.5, 0.15) = 0.15
in which the area and centroid of its output membership function are
respectively, 𝑎 6 and 𝑦 27 . According to the (10.6.9), the
overall defuzzified output is
𝑤𝑎 𝑦 𝑤 𝑎 𝑦 𝑤 𝑎 𝑦 𝑤𝑎 𝑦
𝑦
𝑤𝑎 𝑤 𝑎 𝑤 𝑎 𝑤𝑎
0.5 10 15 0.15 20 0 0.5 14 17 0.15 6 27
0.5 10 0.15 20 0.5 14 0.15 6
4.2956

Note that the output variable never reaches the minimum (-20) and the
maximum (30) and of the output universe.

Instead, the reachable minimum and maximum of the output variable


are equal to the centroids of the leftmost and rightmost consequent
membership functions, respectively.

11.3 Tsukamoto Fuzzy System

In the Mamdani fuzzy system, the output requires defuzzification to


arrive at a crisp output.

In the Tsukamoto fuzzy system [Tsu7900] , no defuzzification is


required in which the consequent of each fuzzy if-then rule is
represented by a fuzzy set with a piecewise linear monotonic
membership function as shown in Figure 11.3.1.

For formulating derivatives required in gradient learning, smooth output


Chapter 11 Fuzzy Systems Page 11-13

membership functions such as sigmoidal membership functions defined


in (9.5.5) could be used to replace monotonic membership functions.

In the Tsukamoto fuzzy system, the output membership function of


each rule works like an input to output function with an input equal to
the rule’s firing strength 𝑤 and the output equal to the inferred output
𝑦.

Figure 11.3.1 gives an example to show the reasoning procedure for a


two-rule two-input one-output Tsukamoto fuzzy system with two crisp
inputs 𝑥 and 𝑥 .

Rule 1: If 𝑋 is high and 𝑋 is low then 𝑌 is 𝐵 .

Rule 2: If 𝑋 is low and 𝑋 is high then 𝑌 is 𝐵 .

1 1 w11 1
Membership Grade

w12 w1
0.5 0.5 0.5

y
1
0 0 0
0 10 20 −5 0 5 10 0 5
x x y
1 2

1 1 1
Membership Grade

w22

0.5 0.5 w 0.5 w2


21

y
2
0 0 0
0 10 20 −5 0 5 10 0 5
x1 x2 y

Figure 11.3.1 Tsukamoto fuzzy system (2-rule 2-input 1-output,


minimum operator for weights).
Page 11-14 Intelligent Computing

The inferred output of each rule 𝑦 is a crisp value induced by the rule’s
firing strength (𝑤 for 𝑖 = 1 to 𝑅=2) obtained using the minimum
operator or the algebraic product operator.

The Tsukamoto fuzzy system aggregates each rule’s output simply by


the method of weighted average as

∑ 𝑤𝑦 (11.3.1)
𝑦
∑ 𝑤
where 𝑦 is the output of the 𝑖th rule induced by the firing strength 𝑤
and membership function for 𝐵 for 𝑖=1 to 𝑅.

Similar to the TSK fuzzy system to be described next, the reasoning


procedure of the Tsukamoto fuzzy system does not follow strictly the
compositional rule of inference; the output is always crisp even when
the inputs are fuzzy.

Design Example 11.3 (4-rule 1-input 1-output Tsukamoto fuzzy system)

For a four-rule one-input one-output Tsukamoto fuzzy system, let 𝑋 be


the input and 𝑌 be the output of the system. Define the four-rule of the
fuzzy system as

Rule 1: If 𝑋 is very light then 𝑌 is 𝐵

Rule 2: If 𝑋 is light then 𝑌 is 𝐵

Rule 3: If 𝑋 is heavy then 𝑌 is 𝐵

Rule 4: If 𝑋 is very heavy then 𝑌 is 𝐵

The antecedent membership functions are defined as

𝜇 𝑥 GBellMF x, 4,10, 10
Chapter 11 Fuzzy Systems Page 11-15

𝜇 𝑥 GBellMF x, 3,10, 3

𝜇 𝑥 GBellMF x, 3,10,3

𝜇 𝑥 GBellMF x, 4,10,10

where 𝑥 ∈ [10, 10].

The consequent membership functions are defined as


𝑦
𝜇 𝑦 min 1, max ,0
2
𝑦 4
𝜇 𝑦 1 min 1, max ,0
2
𝑦 7
𝜇 𝑦 min 1, max ,0
3
𝑦
𝜇 𝑦 1 min 1, max 2, 0
3

where 𝑦 ∈ [0, 10].

Given the centroids of the four consequent membership functions as 0.6,


2.0, 5.0, and 8.4 respectively, use the weighted average as the
defuzzification scheme, determine the overall input-output curve with a
crisp input 𝑥.

Solution

Figure E11.3.1 (a)-(b) plot the membership functions of input 𝑋 and


output 𝑌, where the input and output universes are [-10, 10] and [0, 10],
respectively.

With the weighted average for defuzzification, the rule output and the
Page 11-16 Intelligent Computing

overall input-output curve can be obtained as plotted in Figure E11.3.1


(c)-(d).

(a) Antecedent MFs of x (b) Consequent MFs of y

1 1
Membership Grade

0.8 very light very heavy 0.8


0.6 light heavy 0.6
B B B B
1 2 4 3
0.4 0.4
0.2 0.2
0 0
−10 −5 0 5 10 0 5 10
x y
(c) Rule Output (d) Overall Input−Output
12 12
10 10
8 8
6 6
y

4 4
2 2
0 0
−10 −5 0 5 10 −10 −5 0 5 10
x x

Figure E11.3.1 Tsukamoto fuzzy system (4-rule 1-input 1-output).

For examples,

At 𝑥 8:

Rule Antecedent Consequent


1 𝜇 8 1⇒𝑤 1 𝜇 𝑦 𝑤 ⇒𝑦 2
2 𝜇 8 0⇒𝑤 0 𝜇 𝑦 𝑤 ⇒𝑦 6
3 𝜇 8 0⇒𝑤 0 𝜇 𝑦 𝑤 ⇒𝑦 7
4 𝜇 8 0⇒𝑤 0 𝜇 𝑦 𝑤 ⇒𝑦 9
Chapter 11 Fuzzy Systems Page 11-17

then
𝑤𝑦 𝑤 𝑦 𝑤 𝑦 𝑤𝑦 1 2 0 0 0
𝑦 2
𝑤 𝑤 𝑤 𝑤 1 0 0 0
At 𝑥 0.0:

Rule Antecedent Consequent


1 𝜇 0 0⇒𝑤 0.0 𝜇 𝑦 𝑤 ⇒𝑦 0.0
2 𝜇 0 0.5 ⇒ 𝑤 0.5 𝜇 𝑦 𝑤 ⇒𝑦 5.0
3 𝜇 0 0.5 ⇒ 𝑤 0.5 𝜇 𝑦 𝑤 ⇒𝑦 8.5
4 𝜇 0 0⇒𝑤 0.0 𝜇 𝑦 𝑤 ⇒𝑦 9.0
Then
𝑤𝑦 𝑤 𝑦 𝑤 𝑦 𝑤𝑦 0 0.5 5 0.5 8.5 0
𝑦
𝑤 𝑤 𝑤 𝑤 0 0.5 0.5 0
6.75

At 𝑥 6.0:

Rule Antecedent Consequent


1 𝜇 6 0.0 ⇒ 𝑤 0.0 𝜇 𝑦 𝑤 ⇒𝑦 0.0
2 𝜇 6 0.0 ⇒ 𝑤 0.0 𝜇 𝑦 𝑤 ⇒𝑦 6.0
3 𝜇 6 0.75 ⇒ 𝑤 0.75 𝜇 𝑦 𝑤 ⇒𝑦 9.0
4 𝜇 6 0.25 ⇒ 𝑤 0.25 𝜇 𝑦 𝑤 ⇒𝑦 8.0

then
𝑤𝑦 𝑤 𝑦 𝑤 𝑦 𝑤𝑦 0 0 0.75 9 0.25 8
𝑦
𝑤 𝑤 𝑤 𝑤 0 0 0.75 0.25
8.75
Page 11-18 Intelligent Computing

Design Example 11.4 (4-rule 2-input 1-output Tsukamoto fuzzy


system)

For a four-rule two-input one-output Tsukamoto fuzzy system, let 𝑋


and 𝑋 be the input and 𝑌 be the output of the system.

Define the four-rule of the system as

If 𝑋 is dry and 𝑋 is slow then 𝑌 is 𝐵

If 𝑋 is dry and 𝑋 is fast then 𝑌 is 𝐵

If 𝑋 is wet and 𝑋 is slow then 𝑌 is 𝐵

If 𝑋 is wet and 𝑋 is fast then 𝑌 is 𝐵

The antecedent membership functions of 𝑋 are defined as

𝜇 𝑥 GBellMF 𝑥 , 10, 8, 12

𝜇 𝑥 GBellMF 𝑥 , 10, 8, 8

where 𝑥 ∈ [10, 10].

The antecedent membership functions of 𝑋 are defined as

𝜇 𝑥 GBellMF 𝑥 , 4, 10, 2

𝜇 𝑥 GBellMF 𝑥 , 4, 10, 10

where 𝑥 ∈ [0, 10].

The consequent membership functions are defined by


𝑦
𝜇 𝑦 min 1, max ,0
2
𝑦 4
𝜇 𝑦 1 min 1, max ,0
2
Chapter 11 Fuzzy Systems Page 11-19

𝑦
𝜇 𝑦 min 1, max 1, 0
4
𝑦 7
𝜇 𝑦 1 min 1, max ,0
3

where 𝑦 ∈ [0, 20].

Using the minimum operator for weights, and the weighted average as
the defuzzification scheme, determine the overall input-output curve
with two crisp inputs 𝑥 and 𝑥 and the corresponding output y.

Solution

Figure E11.4.1 (a)-(c) plots the membership function of inputs 𝑋 and


𝑋 , and output 𝑌, with universes respectively equal to [-10, 10], [0, 10],
and [0, 10].

With the minimum operator for weights, and the weighted average for
defuzzification, the overall input-output curve can be obtained as shown
in Figure E11.4.1 (d).
Page 11-20 Intelligent Computing

(a) Antecedent MFs of x


1

1
Membership Grade

dry wet

0.5

0
−10 −5 0 5 10
x1
(b) Antecedent MFs of x2

1
Membership Grade

slow fast

0.5

0
0 2 4 6 8 10
x2

(c) Consequent MFs

1
Membership Grade

0.5 B1 B2 B3 B4

0
0 2 4 6 8 10
y
(d) Overall input/output

10

5
y

0
5
4 0
3 −4 −2
2 −6
1 −8
0 −10
x x
2 1

Figure E11.4.1 Tsukamoto fuzzy system (4-rule 2-input 1-output).


Chapter 11 Fuzzy Systems Page 11-21

For examples,

At 𝑥 8 and 𝑥 2, using the minimum operator for weights, we


obtain

Rule Antecedent Consequent


dry(8)=1.0, slow(2)=1.0
1 𝜇 𝑦 𝑤 ⇒𝑦 2
⇒ w1=min[dry(8),slow(2)]=1.0
dry(8)=1.0, fast(2)=0.0
2 𝜇 𝑦 𝑤 ⇒𝑦 6
⇒ w2=min[dry(8), fast(2)]=0.0
wet(8)=0.0, slow(2)=1.0
3 𝜇 𝑦 𝑤 ⇒𝑦 4
⇒w3=min[wet(8), slow(2)]=0.0
wet(8)=0.0, fast(2)=0.0
4 𝜇 𝑦 𝑤 ⇒𝑦 10
⇒ w4=min[wet(8), fast(2)]=0.0

then
𝑤𝑦 𝑤 𝑦 𝑤 𝑦 𝑤𝑦 1 2 0 6 0 4 0 10
𝑦
𝑤 𝑤 𝑤 𝑤 1 0 0 0
2

At 𝑥 2 and 𝑥 6, using the minimum operator for weights, we


obtain

Rule Antecedent Consequent


dry(2)=0.5, slow(6)=0.5
1 𝜇 𝑦 𝑤 ⇒𝑦 1
⇒ w1=min[dry(2), slow(6)]=0.5
dry(2)=0.5, fast(6)=0.5
2 𝜇 𝑦 𝑤 ⇒𝑦 5
⇒ w2=min[dry(2), fast(6)]=0.5
wet(2)=0.5, slow(6)=0.5
3 𝜇 𝑦 𝑤 ⇒𝑦 6
⇒ w3=min[wet(2), slow(6)]=0.5
Page 11-22 Intelligent Computing

wet(2)=0.5, fast(6)=0.5 𝜇 𝑦 𝑤 ⇒𝑦
4
⇒ w4=min[wet(2), fast(6)]=0.5 8.5

then
𝑤𝑦 𝑤 𝑦 𝑤 𝑦 𝑤𝑦
𝑦
𝑤 𝑤 𝑤 𝑤

0.5 1 0.5 5 0.5 6 0.5 8.5


5.125
0.5 0.5 0.5 0.5
At 𝑥 2 and 𝑥 8, using the minimum operator for weights, we
obtain

Rule Antecedent Consequent


1 dry(2)=0.5, slow(8)=0.0
𝜇 𝑦 𝑤 ⇒𝑦 0
⇒ w1=min[dry(2), slow(8)]=0.0
2 dry(2)=0.5, fast(8)=1.0
𝜇 𝑦 𝑤 ⇒𝑦 5
⇒ w2=min[dry(2), fast(8)]=0.5
3 wet(2)=0.5, slow(8)=0.0
𝜇 𝑦 𝑤 ⇒𝑦 4
⇒ w3=min[wet(2), slow(8)]=0.0
4 wet(2)=0.5, fast(8)=1.0
𝜇 𝑦 𝑤 ⇒𝑦 8.5
⇒ w4=min[wet(2), fast(8)]=0.5

then
𝑤𝑦 𝑤 𝑦 𝑤 𝑦 𝑤𝑦
𝑦
𝑤 𝑤 𝑤 𝑤

0.0 0 0.5 5 0.0 4 0.5 8.5


6.75
0.0 0.5 0.0 0.5
Chapter 11 Fuzzy Systems Page 11-23

11.4 TSK Fuzzy System

In the Mamdani fuzzy system, output defuzzification is required. In the


Takagi-Sugeno-Kang (TSK) fuzzy system [Tak8501], [Sug8810], the
consequent of fuzzy rules are directly generated from given input-output
data without requiring output defuzzification.

A fuzzy rule of a two-input (𝑥 , 𝑥 ) one-output (𝑦) TSK fuzzy system


has the following equivalent forms as

If 𝑋 is 𝐴 and 𝑋 is 𝐴 then 𝑌 𝑓 𝑋 ,𝑋 (11.4.1a)

If 𝑥 is 𝜇 𝑥 and 𝑥 is 𝜇 𝑥 then 𝑦 𝑓 𝑥 ,𝑥 (11.4.1b)

In (11.4.1a-b), 𝑥 ∈ 𝑋 , 𝑥 ∈ 𝑋 ; 𝑦 ∈ 𝑌 ; 𝐴 and 𝐴 are the


antecedent fuzzy sets; 𝜇 𝑥 is the membership function of 𝐴 at
𝑥 ; 𝜇 𝑥 is the membership function of 𝐴 at 𝑥 ; and 𝑦
𝑓 𝑥 , 𝑥 in the consequent is a crisp function.

In fact, 𝑓 𝑥 , 𝑥 can be a polynomial function of the input variables


𝑥 and 𝑥 and can be of any order to appropriately describe the output
of the system.

If 𝑓 𝑥 , 𝑥 is a 𝑁 th-order polynomial (𝑁 1), the resulting


fuzzy inference system is called a 𝑁th-order TSK fuzzy system.

For 𝑁 = 0, 𝑓 𝑥 , 𝑥 is a constant, this results in a zero-order TSK


fuzzy system, which can be viewed as a special case of (a) the Mamdani
fuzzy system in which each rule’s consequent is specified by a fuzzy
singleton; or (b) the Tsukamoto fuzzy system in which each rule’s
consequent is specified by a step function with the step located at the
constant.

Figure 11.4.1 shows the fuzzy reasoning procedure for a two-rule


two-input one-output first-order TSK fuzzy system with two crisp
inputs 𝑥 and 𝑥 .
Page 11-24 Intelligent Computing

1 1 w
Membership Grade
11

w
12
0.5 0.5

0 0
0 5 10 15 20 −5 0 5 10
x x
1 2

1 1
Membership Grade

0.5 0.5 w21

w
22
0 0
0 5 10 15 20 −5 0 5 10
x1 x2

Figure 11.4.1 TSK fuzzy system (2-rule 2-input 1-output).

Rule 1: If 𝑋 is high and 𝑋 is low then 𝑦 is 𝑓 𝑥 , 𝑥 .

Rule 2: If 𝑋 is low and 𝑋 is high then 𝑦 is 𝑓 𝑥 , 𝑥 .

Each rule in the consequent has a crisp output 𝑦 is equal to 𝑓 𝑥 , 𝑥


for r = 1, 2 as

𝑦 𝑎 𝑥 𝑎 𝑥 𝑐 (11.4.2)

𝑦 𝑎 𝑥 𝑎 𝑥 𝑐 (11.4.3)

Given inputs x1 and x2, the weights obtained by the antecedent


membership functions 𝜇 𝑥 and 𝜇 𝑥 of the Rule 1 are w11 and
w12, and the corresponding weights obtained by the antecedent
membership functions 𝜇 𝑥 and 𝜇 𝑥 of the Rule 2 are w21 and
w22. 𝑤 (for 𝑖 = 1, 2) denotes the peak of the intersection of the input
Chapter 11 Fuzzy Systems Page 11-25

𝑖 with the antecedent 𝑖 of the 𝑟th rule.

The inferred output of each rule yi (for 𝑖 =1 to 𝑅 (𝑅=2)) is a crisp


value induced by the rule’s firing strength 𝑤 obtained using the
minimum operator (as 𝑤 min(𝑤 ,𝑤 )) or the algebraic product
operator (as 𝑤 𝑤 𝑤 ).

The TSK fuzzy system avoids the centroid defuzzification as required


in the Mamdani fuzzy system by aggregating each rule’s output through
weighted average as

∑ 𝑤𝑦
𝑦 (11.4.4)
∑ 𝑤

In practice, weighted average is sometimes replaced by a weighted sum


to reduce computation, especially in the case of training a fuzzy system
with limited computing resource.

However, this simplification could lead to the loss of membership


function linguistic meanings unless the sum of firing strengths is close
to unity.

𝑦 ∑ 𝑤𝑦 (11.4.5)

Design Example 11.5 (4-rule 1-input 1-output TSK fuzzy system)


Matlab

For a four-rule one-input one-output first-order TSK fuzzy system, let


𝑋 be the input and 𝑌 be the output of the system, and the four rules of
the fuzzy system are defined by

Rule 1: If 𝑋 is very wet then y = 2x + 5

Rule 2: If 𝑋 is wet then y = 5x + 4

Rule 3: If 𝑋 is dry then y = 10x + 4


Page 11-26 Intelligent Computing

Rule 4: If 𝑋 is very dry then y = 3x 10

Define the antecedent membership functions as

very wet  x  = GBellMF  x,[3,10, 10]

wet  x  = GBellMF  x,[3.5,10, 3.5]

dry  x  = GBellMF( x,[3.5,10,3.5])

very dry  x  = GBellMF  x,[3,10,10]

where x  [10, 10].

Using the weighted average for defuzzification, determine the input-


output curve of the TSK fuzzy system with a crisp input 𝑥.

Solution

Figure E11.5.1 (top) plots the membership function of input 𝑋 with a


universe of [ 10, 10]. With the weighted average for defuzzification,
the input-output curve can be obtained as shown in Figure E11.5.1
(bottom). For examples,

At 𝑥 = 9:

Rule Antecedent Consequent


1 very wet(9) = 1.0  w1 = 1.0 y1 = 2(9) + 5 = 23
2 wet(9) = 0.0  w2 = 0.0 y2 = 5(9) + 4 = 41
3 dry(9) = 0.0  w3 = 0.0 y3 = 10(9) + 4 = 94
4 very dry(9) = 0.0  w4 = 0.0 y4 = 3(9) 10 = 37
Chapter 11 Fuzzy Systems Page 11-27

Using weighted average output, we have

y = (w1 y1 + w2 y2 + w3 y3 + w4 y4) / (w1 + w2 + w3 + w4)

= [1.0(23) + 0.0(41) + 0.0(94) + 0.0(37)] / (1.0 + 0.0 + 0.0 + 0.0)

= 23

1
Membership Grade

0.8 very wet wet dry very dry


0.6
0.4
0.2
0
−10 −5 0 5 10
x

50

0
y

−50

−100
−10 −5 0 5 10
x

Figure E11.5.1 TSK fuzzy system (4-rule 1-input 1-output).


Page 11-28 Intelligent Computing

At 𝑥 = 4:

Rule Antecedent Consequent


1 very wet(4) = 0.0  w1 = 0.0 y1 = 2(4) + 5 = 13
2 wet(4) = 1.0  w2 = 1.0 y2 = 5(4) + 4 = 16
3 dry(4) = 0.0  w3 = 0.0 y3 = 10(4) + 4 = 44
4 very dry(4) = 0.0  w4 = 0.0 y4 = 3(4) 10 = 22

Using weighted average output, we have

y = (w1 y1 + w2 y2 + w3 y3 + w4 y4) / (w1 + w2 + w3 + w4)

= [0.0(13) + 1.0(16) + 0.0(44) + 0.0(22)] / (0.0 + 1.0 + 0.0 + 0.0)

= 16

At 𝑥 = 0:

Rule Antecedent Consequent


1 very wet(0) = 0.0  w1 = 0.0 y1 = 2(0) + 5 = 5
2 wet(0) = 0.5  w2 = 0.5 y2 = 5(0) + 4 = 4
3 dry(0) = 0.5  w3 = 0.5 y3 = 10(0) + 4 = 4
4 very dry(0) = 0.0  w4 = 0.0 y4 = 3(0) 10 = 10

Using weighted average output, we have

y = (w1 y1 + w2 y2 + w3 y3 + w4 y4) / (w1 + w2 + w3 + w4)

= [0.0(5) + 0.5(4) + 0.5(4) + 0.0(10)] / (0.0 + 0.5 + 0.5 + 0.0) = 4


Chapter 11 Fuzzy Systems Page 11-29

Design Example 11.6 (4-rule 2-input 1-output TSK fuzzy system)


Matlab

For a four-rule two-input one-output first-order TSK fuzzy system, let


𝑋 and 𝑋 be the inputs and 𝑌 be the output of the system, and the
four rules of the fuzzy system are defined by

Rule 1: If 𝑋 is wet and 𝑋 is cold then y1 = x1 + x2  1

Rule 2: If 𝑋 is wet and 𝑋 is hot then y2 = 0.5 x1  x2

Rule 3: If 𝑋 is dry and 𝑋 is cold then y3 = 2 x1 + x2  2

Rule 4: If 𝑋 is dry and 𝑋 is hot then y4 =  x1 + 0.5 x2 + 1

Define the antecedent membership functions of 𝑋 as

 wet  x   GBellMF( x ,[5,10,-5])


1 1

dry  x   GBellMF( x , [5, 10, 5])


1 1

where x1  [5, 5].

Define the antecedent membership functions of 𝑋 as

cold  x   GBellMF( x ,[5,20, 7])


2 2

hot  x   GBellMF( x ,[5,20,3])


2 2

where x2  [5, 5].

Using the algebraic product operator for weights, and the weighted
average for defuzzification, determine the input-output curve for the
TSK fuzzy system with two crisp inputs 𝑥 and 𝑥 .

Solution
Page 11-30 Intelligent Computing

(a) Antecedent MFs of x1

1
Membership Grade

wet dry

0.5

0
−5 0 5
x
1
(b) Antecedent MFs of x2

1
Membership Grade

cold hot

0.5

0
−5 0 5
x2

(c) Overall input/output

0
y

−5

−10
5
5
0
0

x2 −5 −5
x
1

Figure E11.6.1 TSK fuzzy system (4-rule 2-input 1-output).


Chapter 11 Fuzzy Systems Page 11-31

Figure E11.6.1 (a)-(b) plot the membership functions of inputs 𝑋 and


𝑋 , with universes both equal to [-5, 5].

With the algebraic product operator for weights, and the weighted
average for defuzzification, the overall input-output curve can be
obtained as shown in Figure E11.6.1 (c).

For examples,

At x1 = 3, x2 = 4 and using algebraic product operator, we obtain

Rule Antecedent Consequent


wet(3) = 1.0, cold(4) = 1.0
1 y1 = (3) + (4) – 1 = 8
 w1 = 1.01.0 = 1.0
wet(3) = 1.0, hot(4) = 0.0
2 y2 = 0.5(3)  (4) = 2.5
 w2 = 1.00.0 = 0.0
dry(3) = 0.0, cold(4) = 1.0
3 y3 = 2(3) + (4) – 2 = 12
 w3 = 0.01.0 = 0.0
dry(3) = 0.0, hot(4) = 0.0
4 y4 =  (3) + 0.5(4) + 1 = 2
 w4 = 0.00.0 = 0.0

Using weighted average output, we have

y = (w1 y1 + w2 y2 + w3 y3 + w4 y4) / (w1 + w2 + w3 + w4)

= [1.0(8) + 0.0(2.5) + 0.0(12) + 0.0(2)]/(1.0 + 0.0 + 0.0 + 0.0) = 8


Page 11-32 Intelligent Computing

At x1 = 0, x2 = 2 and using algebraic product operator, we obtain

Rule Antecedent Consequent


wet(0) = 0.5, cold(2) = 0.0
1 y1 = (0) + (2) – 1 = 1
 w1 = 0.50.0 = 0.0
wet(0) = 0.5, hot(2) = 1.0
2 y2 = 0.5(0)  (2) = 2
 w2 = 0.51.0 = 0.5
dry(0) = 0.5, cold(2) = 0.0
3 y3 = 2(0) + (2) – 2 = 0
 w3 = 0.50.0 = 0.0
dry(0) = 0.5, hot(2) = 1.0
4 y4 =  (0) + 0.5(2) + 1 = 2
 w4 = 0.51.0 = 0.5

Using weighted average output, we have

y = (w1 y1 + w2 y2 + w3 y3 + w4 y4) / (w1 + w2 + w3 + w4)

= [0.0(1) + 0.5(2) + 0.0(0) + 0.5(2)]/(0.0 + 0.5 + 0.0 + 0.5) = 0

Unlike the Mamdani fuzzy system, the TSK fuzzy system does not
follow the compositional rule of inference strictly in its fuzzy reasoning
procedure.

The resultant overall system output via either weighted average or


weighted sum is always crisp, and unable to preserve fuzziness from its
input(s) to an output.

This creates a difficulty when the inputs to a TSK fuzzy system are
fuzzy and a fuzzy output is required. However, due to its simplicity, the
TSK fuzzy system is a popular choice for fuzzy modeling.
Chapter 11 Fuzzy Systems Page 11-33

11.5 Comparisons

Among the three fuzzy systems, differences exist in their consequent


parts, in which the Mamdani fuzzy system adopts membership functions
for outputs; the Tsukamoto fuzzy system adopts monotonic membership
functions (or input to output functions) for outputs; and the TSK fuzzy
system adopts polynomial functions for outputs.

The output membership functions of the three systems are differentiable


which facilitate gradient-based learning.

All the three systems use either the minimum operator or algebraic
product operator for determining firing strength of each rule.

The Mamdani fuzzy system uses the maximum operator for aggregation
of fuzzy outputs, and then computes the centroid of aggregated output
membership functions for defuzzification.

The Tsukamoto fuzzy system and the TSK fuzzy system both use a
weighted average for output defuzzification.

In the Mamdani fuzzy system, it is possible to compute the areas and


the centroids of the consequent membership functions of each rule in
advance.

Hence, the direct computation of the centroid of aggregated output


membership functions can be reduced to the computation of a simple
weighted average as in the other two fuzzy systems.

You might also like