1 Types of Fuzzy Models
1 Types of Fuzzy Models
We can use fuzzy logic to build fuzzy models. In this chapter, we examine how this works.
The antecedent proposition is always a fuzzy proposition of the type ‘x is A’, where x is a linguistic
variable and A is a linguistic constant. (For example, it can be ‘if Temperature is high then . . ..) The
structure of the consequent proposition, however, depends on the model we use.
• In a linguistic fuzzy model, both the antecedent and the consequent are fuzzy propositions.
• The fuzzy relational model is an extension of the linguistic fuzzy model. Now, a fuzzy antecedent
can be coupled to multiple fuzzy propositions at the same time.
• In the Takagi-Sugeno (TS) fuzzy model, the consequent is a crisp function of the antecedent
variables.
Ri : if x is Ai then y is Bi . (2.1)
A linguistic variable L (for example ‘Temperature’) is defined as a set L = (x, A, X, g, m). Here, x is
the base variable, having the same name as the linguistic variable. A is the set of linguistic terms
(for example ‘cold’, ’normal’ and ‘warm’). X is the domain of x (for example, [−273, ∞)). Finally, g is a
syntactic rule for generating linguistic terms and m is a semantic rule that assigns to each linguistic
term its meaning. The latter two are in a way just formalities: we won’t consider them here.
It is often required that a linguistic term satisfies properties of coverage and semantic soundness. Cov-
erage means that each domain element x ∈ X is assigned to at least one fuzzy set Ai . (For example,
there isn’t a single temperature which is not either ‘cold’, ‘normal’ or ‘warm’.) A stronger requirement is
-coverage. This demands that each domain element x ∈ X is at least assigned to one fuzzy set Ai with
µAi (x) > . Next to this, semantic soundness relates to how well a system can distinguish between
different variables x. (For example, if a system can’t find the difference between a low temperature of 0◦
C and a low temperature of 5◦ C, then it is doesn’t have a lot of semantic soundness.)
1
The I operator can be either a fuzzy implication or a conjuction operator (t-norm). Fuzzy implication
is used when the rule has the form ‘A implies B’. Examples of fuzzy implications are the Lukasiewicz
implication and the Kleene-Diene implication, respectively defined as
I(µA (x), µB (y)) = min(1, 1−µA (x)+µB (y)) and I(µA (x), µB (y)) = max(1−µA (x), µB (y)). (2.3)
Alternatively, conjunction is used is when A ∧ B. That is, when A and B simultaneously hold. Examples
of t-norms are the minimum (also often referred to as the Mamdani ‘implication’ and the Larsen
‘implication’, respectively defined as
I(µA (x), µB (y)) = min(µA (x), µB (y)) and I(µA (x), µB (y)) = µA (x) · µB (y). (2.4)
So how do we use this? Well, let’s suppose we have a rule if x is Ai then y is Bi and we also know that
x is A0 , then we can find the set B 0 satisfying y is B 0 using
B 0 = A0 ◦ R. (2.5)
The question remains, what do we do if we have multiple rules/relations Ri ? In that case we have to
join them somehow to some joined relation R. When dealing with implications, we do this using an
intersection, like
K
\
R= Ri meaning that µR (x, y) = min µRi (x, y). (2.6)
1≤i≤K
i=1
If, however, we are dealing with conjunction, then the aggregated relation R is the union of the individual
relations Ri . So,
K
[
R= Ri meaning that µR (x, y) = max µRi (x, y). (2.7)
1≤i≤K
i=1
Basically, this number is an indication of how much A0 and Ai are alike. A big advantage of the Mamdani
method is that it does not require discretization of the domain. It can thus work with analytically defined
membership functions.
2.4 Defuzzification
We now know how to find an output fuzzy set B 0 , based on fuzzy rules. But usually, we don’t want to
know that some parameter y belongs to a fuzzy set B 0 . Instead, we want to know a value y0 . The process
of finding a value y0 from the knowledge that y is B 0 is called defuzzification.
2
There are two commonly used defuzzification methods: the center of gravity method and the mean of
maxima method. In the center of gravity (COG) method, we calculate the y-coordinate of the center
of gravity of the fuzzy set B 0 . This is done according to
PF R
j=1 µB (yj )yj µB 0 (y)y dy
0
0 0
y = cog(B ) = PF = YR . (2.10)
j=1 µB (yj )
0 µ 0 (y)
Y B
The first part of the above equation is used for discretized domains Y , whereas the second part is used
for continuous domains Y .
In the mean of maxima (MOM) method, we find all points where µB 0 (y) is at its maximum. We
then take the mean of all these points. In mathematical notation, we then have
0 0
y = mom(B ) = cog y|µB 0 (y) = max µB 0 (y) . (2.11)
y∈Y
In a way, the MOM method selects the ‘most probable’ output. It is often used with inference based
on fuzzy implications. On the other hand, the COG method is usually used together with Mamdani
inference.
Finally, there is also a third defuzzification, called fuzzy-mean defuzzification. It is often used after
Mamdani inference, to avoid the integration step from the COG method. When applying this method,
first the consequent fuzzy sets Bj are found, using
µBj (y) = (βi ∧ µBi (y)) . (2.12)
Instead of first using µB 0 (y) = max µBj (y) and then applying defuzzification, we now first apply defuzzi-
fication using bj = mom(Bj ). Now, a crisp output y0 is obtained by taking the weighted average of bj .
So,
PM
0 j=1 ωj bj
y = PM , where ωj = µB 0 (bj ). (2.13)
j=1 ωj
The weight ωj is thus the maximum of the degrees of fulfilment βi over all rules Ri with consequent Bj .
In this way, an integration over the domain is avoided.
3
3 Other kinds of fuzzy models
3.1 The singleton model
A special case of the linguistic fuzzy model is the singleton model. It is obtained when the consequence
fuzzy sets Bi are singleton sets. In this case, we can write the rules as
Ri : if x is Ai then y is bi . (3.1)
For the singleton method, defuzzification simply means applying the fuzzy-mean method. So we have
PK
βi bi
y = Pi=1
K
. (3.2)
i=1 βi
We can also generalize the singleton model to a class of functions called the basis functions expansion.
We now have
K
X
y= φi (x)bi . (3.3)
i=1
So, for the singleton model, φi (x) is simply the normalized degree of fulfillment of the rule antecedents.
Finally, we need to find the defuzzified output y. For that, we simply take the weighted mean of the
classes Bj . So,
PM
j=1 ωj bj
y = PM . (3.8)
j=1 ωj
4
Here, bj = cog(Bj ) is the centroid of Bj .
The main advantage of the relational model is that the input-output model can be fine-tuned without
changing the consequent fuzzy sets. Instead, you can simply adjust the values of rij in the rules of the
fuzzy system.
If the function fi (x) has an affine form (so fi (x) = ai T x + bi ), then the model is called an affine TS
model. To apply inference with the Takagi-Sugeno model, we simply use the fulfillment degrees. So,
PK PK PK T
i=1 βi yi i=1 βi fi (x) i=1 βi ai x + bi
y = PK = PK = PK . (3.10)
i=1 βi i=1 βi i=1 βi
where x(k) is the state, u(k) is the input and f is the state transition function. We can use a fuzzy
model to approximate f . However, it is usually hard to do this, since we can’t always measure the state x.
So instead, we usually use a fuzzy model to approximate the output y of the system. In the dynamic
TS model this is done according to rules of the form
if y(k) is Ai1 and y(k − 1) is Ai2 and . . . and y(k − ny + 1) is Ainy (3.12)
and u(k) is Bi1 and u(k − 1) is Bi2 and . . . and u(k − nu + 1) is Binu (3.13)
ny nu
X X
then y(k + 1) = aij y(k − j + 1) + bij u(k − j + 1) + ci . (3.14)
j=1 j=1
The values of nu and ny (i.e. how far we look back in time for the input/output) depend on the order of
the dynamic system.