Nonsingleton input - A Fuzzy logic problem
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Fuzzy Logic in Simulink finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!