Relationships Between Input and Output Membership Functions Shapes in Fuzzy Systems

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

RELATIONSHIPS BETWEEN INPUT AND OUTPUT MEMBERSHIP

FUNCTIONS SHAPES IN FUZZY SYSTEMS

Approfondimento relativo al corso: Soft Computing

Lorenzo Tamellini, matr.708092


1) INTRODUCTION

In this work we will consider a simple fuzzy system, with one input and one output, and we will

focus on the relationships between different choices for the membership functions (MF) for both

the input and the output variables, taking into account also some different defuzzification

operators. We will do this using the FIS (Fuzzy Inference System) provided by Matlab.

The system we consider is a system which models proportionality between the input and the

output variables. In order to build the MF with “simple” numbers, the input variable will range from

0 to 9 and the output variable from 0 to 8, so that the proportionality constant is not 1, but 8/9.

Both the input and the output variables will have three MF: “Low”, “Medium”, “High”, and the rules

for the system will be:

1. “If (input1 is low) then (output1 is low)”

2. “If (input1 is medium) then (output1 is medium)”

3. “If (input1 is high) then (output1 is high)”

We will consider four shapes for the input variable:


1 Rectangle:
Matlab settings : Low = [0 0 3 3]; Medium = [3 3 6 6]; High = [6 6 9 9]

2 Triangle:
Low = [0 0 4.5]; Medium = [0 4.5 9]; High = [4.5 9 9];

3 Gauss’ Bell
Low = [1.25 0]; Medium = [1.25 4.5]; High = [1.25 9];

4 Trapeze
Low = [0 0 2 4]; Medium = [2 4 5 7]; High = [5 7 9 9];
For each of these shapes we will use four different shapes for the output variable:

1 Singleton:
Low = [0 0 0] ; Medium = [4 4 4] ; High = [8 8 8] ;

2 Triangle:
Low = [0 0 4] ; Medium = [0 4 8] ; High = [4 8 8] ;

3 Gauss’ Bell
Low = [1.2 0] ; Medium = [1.2 4] ; High = [1.2 8] ;

4 Trapeze
Low = [0 0 1 3.5] ; Medium = [1 3.5 4.5 7] ; High = [4.5 7 8 8];
and for each input-output shapes combination we will plot the output value of the system as a

function the input value, varying over all its value range. The output value will be obtained by

three different operators:

1. Centroid;

2. Largest of Maximum (LoM);

3. Medium of Maximum (MoM);

centroid

MoM

LoM

We will compare all these plots, looking for the core properties of these combinations, trying also

to get some “thumb rules” on the behaviour of the system, which would be useful when building

real systems.

After this, we will do the same for a system modelling inverse proportionality, in order to see what

changes in the plots varying the rules.

The rules of the inverse system will simply be:

1. “If (input1 is low) then (output1 is high)”

2. “If (input1 is medium) then (output1 is medium)”

3. “If (input1 is high) then (output1 is low)”


2) RESULTS

All the plots from this first system are shown at the end of this section.

From the input shape “Rectangle” we get a first result: using defuzzificator “centroid” means that

the output variable will never reach its border values (0 and 8), if its MFs have shapes different

from “Singleton”. This straight follows from the definition of “centroid” as an average: as soon as

some output values different from 0 (resp. 8) gets truth value different from 0, the final outcome

will be different from 0 ( resp. 8).

Moving to defuzzificator “LoM” and “MoM”, the only choice for the output’s shape that does not

allow the output to get its minimum and maximum value is “Trapeze”. This is again quite easy to

explain, thinking about the shape of “Trapeze”: as concerning defuzzificator “LoM”, since all the

values of the output variable between 0 and 1 belong to “Low” with truth degree 1, when the first

rule has truth degree 1 the Largest of Maximum is 1 (as shown in the next picture).

For the same reason, the output with “MoM” is 0.48 for input < 3 and 7.52 for input > 6 (see

picture below)
Looking at input shape “Triangle”, we see that output shape “Singleton” with defuzzificator

“Centroid” gets the right proportionality shape (more, it is the ONLY combination that gets it). The

other output shapes keep the output a continue and monotonically increasing function but make

the plot concave for small values of the input and convex for high values (the sequence concave-

convex is because of symmetry reasons). Again, when the output shape is not “Singleton”, the

output doesn’t get to its minimum and maximum value.

“MoM” still keeps the output function non decreasing but loses the continuity, showing a step

function behaviour. This is because of the definition of “MoM” as an average just of the outputs

with the maximum truth values; since all MFs “Medium” are symmetrical with respect to 4, the

output value for input between 2 and 7 is 4. (see picture below)

“LoM” gets a piecewise behaviour as well (for the same definition’s reasons of MoM), but even

loses the non decreasing property, and shows a particular trend (we shall say “LoM” shape), which

will be similar throughout all the tests.

We can also remark that both “LoM” and “MoM” plots are polygonal chains, except for when the

output shape is “Bell”: in this case, the polygonal chain becomes a piecewise curve, still keeping

the “LoM” shape.

Moving to the input shape “Trapeze”, we observe that the resulting plots can be obtained by those

from input shape “Triangle”, by adding constant intervals to the “Triangle” input/output plots,

where the “Trapeze” shape is constant, i.e. 0-2, 4-5, 7-9.


These outputs will be similar with the ones by the input shape “Bell”, which is actually a smooth

approximation of “Trapeze”; the only difference will be in the regularity of the plots: actually, the

shape “Bell” is not only continuous but also differentiable, and therefore the output plots will be

differentiable, too (previously they were only continuous).

The last remark is that using “LoM” or “MoM”, when the input and the output shapes are the

same, we always get the same plot.

Speaking about the inverse proportionality system, we can easily see that the plots for the output

of this system can be easily obtained by the previous’ one, with the expression:

output inv (x) = output dir (9 − x)


PROPORTIONALITY SYSTEM

Defuzzy\MF out Singletons Triangles Gauss bells Trapezes

centroid

Largest of Max.

Medium of Max

MF IN: RECTANGLE
Defuzzy\MF out Singletons Triangles Gauss bells Trapezes

centroid

Largest of Max.

Medium of

Max.

MF IN : TRIANGLE
Defuzzy\MF out Singletons Triangles Gauss bells Trapezes

centroid

Largest of Max.

Medium of

max.

MF IN : TRAP
Defuzzy\MF out Singletons Triangles Gauss bells Trapezes

centroid

Largest of Max.

Medium of

Max.

MF IN : BELL
INVERSE PROPORTIONALITY SYSTEM

Defuzzy\mf out Singletons Triangles Gauss bells Trapezes

Centroid

Largest of Max.

Medium of

Max.

MF IN : TRIANGLE
Defuzzy\mf out Singletons Triangles Gauss bells Trapezes

centroid

Largest of Max.

Medium of

Max.

MF IN : TRAP
3) CONCLUSIONS

In conclusion, we can state some facts about the relationships between input and output

MF shapes and the defuzzification operators, that would also be useful when building real

systems:

1. there are some basic shapes for the final outcome of the system, according to the

defuzzification operator used: “centroid” gets a kind of ramp (even if the output

shape is singleton, so a non-continuos MF shape! ), “MoM” a step function and

“LoM” that particular shape we pointed out before;

2. only some combinations of input-output shape and defuzzificator let the output

reach its minimum and maximum value:

a. any input – “Singleton” – any defuzzificator;

b. any input – any output but “Trapeze” – “LoM” or “MoM”;

in general it depends on these 3 factors. In particular “Triangle” – “Singleton” –

“Centroid” is the only combination able to get the correct plot, both in the

proportionality and inverse proportionality system (since the transformation rule is

true);

3. Changing the input shape can improve the regularity of the outcoming function; in

general we observe that the changes in the input shape reflect on the properties of

the output (e.g. moving from “Triangle” to “Trapeze” input shape).

You might also like