Nonsingleton input - A Fuzzy logic problem
1 次查看(过去 30 天)
显示 更早的评论
Hi, i'm a new student of Fuzzy theory, and i'm trying to resolve the following Mamdani problem, considering that the input are nonsigleton.
I have 2 inputs: Temperature (low, medium, high) and price (low, medium, high), that are built using Gaussian and triangular functions, respectively:
%temperature
temperature=15:0.1:45;
tlow = gaussmf(temperature, [2.1 15]);%
tmedium = gaussmf(temperature, [2.1 24]);
thigh = gaussmf(temperature, [2.1 36.5]);
%price
price=1:0.1:6;
plow = trimf(price, [-0.3 1 2.4]);
pmedium = trimf(price, [1.7 3 4.3]);
phigh = trimf(price, [3.7 6 8.3]);
The output function of the problem is the soda consumption (low, medium, high), and is a triangular function:
consumption=500:0.1:6000;
clow = trimf(consumption, [-1000 500 2000]);
cmedium = trimf(consumption, [1500 3000 4500]);
chigh = trimf(consumption, [4000 6000 8000]);
Rules:
1) if TEMPERATURE is low and PRICE is low then CONSUMPTION is big;
2) if TEMPERATURE is low and PRICE is medium then CONSUMPTION is medium;
3) if TEMPERATURE is low and PRICE is high then CONSUMPTION is small;
4) if TEMPERATURE is medium and PRICE is low then CONSUMPTION is big;
5) if TEMPERATURE is medium and PRICE is medium then CONSUMPTION is medium;
6) if TEMPERATURE is medium and PRICE is high then CONSUMPTION is small;
7) if TEMPERATURE is high and PRICE is low then CONSUMPTION is big;
8) if TEMPERATURE is high and PRICE is medium then CONSUMPTION is medium;
9) if TEMPERATURE is high and PRICE is high then CONSUMPTION is small.
I know that first it is necessary calculate the firing level, but i don't know how. Somebody can help me with this problem?
2 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fuzzy Logic Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!