How to design constant membership functions (singletons) for the output of a Mamdani fuzzy system?

12 visualizzazioni (ultimi 30 giorni)
I want design fuzzy logic controller with output as constant membership function.But in mamdani method constant membership function is not available.I need help....... I have attached the reference copy of my project

Risposte (1)

Sam Chak
Sam Chak il 27 Set 2024
This is a decade-old question, but it is indeed possible to implement a Mamdani fuzzy system (MamFIS) for the output using a constant membership function (also known as a singleton in fuzzy terminology). The key is to use the triangular membership function. The result will be exactly the same as that produced by the Takagi–Sugeno fuzzy system (SugFIS), because the singleton-based SugFIS is a special case of MamFIS.
In the following example, the singleton-based MamFIS produces a 100% linear surface, exactly the same as the SugFIS, resulting in . Personally, I prefer the singleton-based MamFIS because plotting output membership functions for SugFIS is still not supported, despite the introduction of the plotmf() command in R2006a.
%% 100% Mamdani fuzzy system
fis = mamfis;
%% Fuzzy Inputs, x and y
fis = addInput(fis, [0+eps 1], 'Name', 'x');
fis = addMF(fis, 'x', 'linzmf', [0 1], 'Name', 'small'); % Small fuzzy set for x
fis = addMF(fis, 'x', 'linsmf', [0 1], 'Name', 'large'); % Large fuzzy set for x
fis = addInput(fis, [0+eps 1], 'Name', 'y');
fis = addMF(fis, 'y', 'linzmf', [0 1], 'Name', 'small'); % small fuzzy set for y
fis = addMF(fis, 'y', 'linsmf', [0 1], 'Name', 'large'); % large fuzzy set for y
figure
subplot(211)
plotmf(fis, 'input', 1), grid on
subplot(212)
plotmf(fis, 'input', 2), grid on
sgtitle('Inputs membership functions')
%% Fuzzy Output using Constant membership functions
fis = addOutput(fis, [0 2], 'Name', 'z');
fis = addMF(fis, 'z', 'trimf', [0 0 0], 'Name', 'small');
fis = addMF(fis, 'z', 'trimf', [1 1 1], 'Name', 'mean');
fis = addMF(fis, 'z', 'trimf', [2 2 2], 'Name', 'big');
figure
plotmf(fis, 'output', 1, 10001), grid on, xlim([-1 3])
title('Output membership functions')
%% Rule
rules = [
"x==small & y==small => z=small"
"x==small & y==large => z=mean"
"x==large & y==small => z=mean"
"x==large & y==large => z=big"
];
fis = addRule(fis, rules);
%% The surface
figure
opt = gensurfOptions('NumGridPoints', 51);
gensurf(fis, opt), grid on, grid minor, % zlim([2 4])
title('Linear Surface using singleton-based MamFIS')

Categorie

Scopri di più su Fuzzy Logic Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by