single-valued constant membership function

hi
how to define the output fuzzy set as fuzzy singletons - which mean's that the output membership function is single-valued constant as in picture below .
So in Matlab for example I want to set "PS" MF to 4 , Which type of MF should I choose and which value or Params[ ] should I set to it?

8 件のコメント

Maria
Maria 2014 年 12 月 13 日
any answer ???
Guillaume
Guillaume 2014 年 12 月 13 日
編集済み: Guillaume 2014 年 12 月 13 日
Is this associated with a particular toolbox?
Because I have no idea what a 'membership function' is.
You'll probably get more answers if you also give an example of inputs and expected output.
Maria
Maria 2014 年 12 月 13 日
the fuzzy controller that I tried to design is with two inputs (error and change of error ) and one output , the membership function of inputs are same and shown in figure below the output must be single-valued constant with values NB=-0.76 , NM=-0.5 , NS=-0.232 , Z=0 , PS=0.22 , PM=0.87 , PB= 0.9
the problem is how to implement the membership function of output as single-valued .
inputs membership functions
thanks a lot
Image Analyst
Image Analyst 2014 年 12 月 14 日
It probably has to do with the fuzzy toolbox, which I've added to the Product List, just in case. I don't think there are a lot (or any) fuzzy experts who participate in this forum, at least not that I can remember.
Maria
Maria 2014 年 12 月 14 日
thanks a lot
but I thinks this matter is related to Matlab more then Fuzzy which is how to make the output of MF as single-valued constant , I think it is related to Matlab toolbox .
Guillaume
Guillaume 2014 年 12 月 14 日
Maria, for us, non-fuzzy logic people, you'll have to express your problem in a non-fuzzy logic way. As I said, I've no idea what a 'membership function' is and I've also no idea what your graph represent.
The best thing is to give us an example of inputs as matrices or vectors or anything that we can just copy and paste into matlab and the expected result (again as something that we can generate in matlab).
Siddhant Gudhe
Siddhant Gudhe 2015 年 8 月 17 日
Maria, use triangular membership function only( trimf), but instead of defining its params as [-20 0 20], make it as [20 20 20]. You will get an singleton membership function at 20.
Truong Nhu
Truong Nhu 2019 年 12 月 31 日
Thank you so much Siddhant Gudhe, you're right !

サインインしてコメントする。

回答 (3 件)

Image Analyst
Image Analyst 2014 年 12 月 14 日

0 投票

Perhaps this:
function test2
clc;
for k = 1 : 20
x = randi(20, 1, 1); % Get random input value.
mf = SetMembership(x); % Find out which it's closest to.
fprintf('%d is closest to %d\n', x, mf);
end
function mf = SetMembership(x)
% Define values for NB through PB.
dividers = -12 : 4 : 12; % -12, -8, -4, 0, 4, 8, 12
% Find out which one x is closest to
distances = abs(dividers - x);
% Find the min distance and what index it occurs at
[minDistance, indexOfMin] = min(distances);
% return the value of the dividers at that index
mf = dividers(indexOfMin);
Output:
16 is closest to 12
14 is closest to 12
8 is closest to 8
20 is closest to 12
15 is closest to 12
13 is closest to 12
19 is closest to 12
13 is closest to 12
16 is closest to 12
18 is closest to 12
16 is closest to 12
5 is closest to 4
13 is closest to 12
14 is closest to 12
16 is closest to 12
12 is closest to 12
15 is closest to 12
8 is closest to 8
14 is closest to 12
7 is closest to 8
Liyana
Liyana 2017 年 3 月 27 日

0 投票

you could choose linear or constant type of mf
kohila ramkumar
kohila ramkumar 2018 年 6 月 5 日

0 投票

IF YOU ARE CREATE SUGENO FUZZY SYSTEM. IT IS HAVING CONSTANT MEMBERSHIP FUNCTION

カテゴリ

ヘルプ センター および File ExchangeFuzzy Logic in Simulink についてさらに検索

質問済み:

2014 年 12 月 13 日

コメント済み:

2019 年 12 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by