How to implement the linear output function in Takagi–Sugeno Fuzzy System?

조회 수: 2 (최근 30일)
m
m 2013년 4월 10일
답변: Sam Chak 2024년 9월 27일
hi, i want to implement Takagi Sugeno model in matlab using FIS, how can i set this rule:
"if x is large and y is small, then z=x+y+2"
of course i can add "If (x is large) and (y is small) then (Z is '...')", but i cannot add "x+y+2", how can i do it?
thanks so much

답변 (1개)

Sam Chak
Sam Chak 2024년 9월 27일
Hi @m
To describe the equation (a flat plane surface), use the syntax 'linear', [1 1 2] in the addMF() command for the output z.
%% Sugeno fuzzy system
fis = sugfis;
%% Fuzzy Inputs, x and y
fis = addInput(fis, [0+eps 1], 'Name', 'x');
fis = addMF(fis, 'x', 'linsmf', [0 1], 'Name', 'large'); % Large fuzzy set
fis = addInput(fis, [0+eps 1], 'Name', 'y');
fis = addMF(fis, 'y', 'linzmf', [0 1], 'Name', 'small'); % Small fuzzy set
%% Fuzzy Output, z = 1·x + 1·y + 2
fis = addOutput(fis, [2 4], 'Name', 'z');
fis = addMF(fis, 'z', 'linear', [1 1 2], 'Name', 'Eq1');
%% Rule: If (x is large) and (y is small), Then (Z is Eq1 = x + y + 2)
rule = "x==large & y==small => z=Eq1";
fis = addRule(fis, rule);
%% The surface
opt = gensurfOptions('NumGridPoints', 101);
gensurf(fis, opt), grid on, grid minor, zlim([2 4])

카테고리

Help CenterFile Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by