How to design a fuzzy decision-making framework for a HVAC system incorporating 'Is Any' logic
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello there,
I am doing a fuzzy logic decision-making algorithm based on set of parameters
Input parameters:
- Temperature [freezing, cold, cool, comfortable, warm, hot, sweltering] cases = 7
- Humidity [too_dry, average, too_moist] cases =3
- Air quality index [good, fair, moderate, poor, very_poor] cases = 5
I have the crisp and fuzzy sets for each input parameter.
Output parameters:
- AC
- Heater
- Humidifier
- Window
one of the fuzzy logic conditiosn sets is as follows:
////////////////////////////////////////
Conditions set B:
IF in_aq (is good) & out_aq (is not good) /* window is closed*/
& in _temp (is warm/hot/sweltering) & out _temp (is any)
& in_humidity (is any) & out_humidity (is any)
THEN ac ON ELSE OFF
//////////////////////////////////////////////
The first line of the conditions set is easy to implement using the not operator, but where (is any) implied it means the condition will be listed as 3x4x4x3 =144 times.
is there any way to implemt the (is any) in different method to avoid the duplication?

댓글 수: 0
답변 (1개)
Sam Chak
2025년 4월 26일
In boolean logic, "is any" represents a conditional statement where if at least one condition within a set is true, the overall expression is true. This is often expressed using the logical OR operator. To avoid the complications of using the 'OR' logic in the mixed "AND" and "OR" fuzzy operators, it is necessary to create a multi-stage fuzzy system using the fistree() function.
The first stage incorporates three important input signals: indoor air quality, outdoor air quality, and indoor temperature, to determine whether to activate the air conditioner, irrespective of other less critical input readings such as outdoor temperature, indoor humidity, and outdoor humidity. The multi-stage fuzzy-controlled HVAC system can be structured as follows:
%% fis1
fis1 = mamfis('Name', 'fis1', 'NumInputs', 3, 'NumOutputs', 1);
fis1.Inputs(1).Name = "in_airQ";
fis1.Inputs(2).Name = "out_airQ";
fis1.Inputs(3).Name = "in_temp";
fis1.Outputs(1).Name = "state1";
%% fis2
fis2 = mamfis('Name', 'fis2', 'NumInputs', 7, 'NumOutputs', 4);
fis2.Inputs(1).Name = "in_airQ";
fis2.Inputs(2).Name = "out_airQ";
fis2.Inputs(3).Name = "in_temp";
fis2.Inputs(4).Name = "state1";
fis2.Inputs(5).Name = "out_temp";
fis2.Inputs(6).Name = "in_humid";
fis2.Inputs(7).Name = "out_humid";
fis2.Outputs(1).Name = "Window";
fis2.Outputs(2).Name = "Heater";
fis2.Outputs(3).Name = "Humidifier";
fis2.Outputs(4).Name = "state2";
%% fis3
fis3 = mamfis('Name', 'fis3', 'NumInputs', 2, 'NumOutputs', 1);
fis3.Inputs(1).Name = "state1";
fis3.Inputs(2).Name = "state2";
fis3.Outputs(1).Name = "AirCon";
%% connections
con1 = ["fis1/in_airQ", "fis2/in_airQ"];
con2 = ["fis1/out_airQ", "fis2/out_airQ"];
con3 = ["fis1/in_temp", "fis2/in_temp"];
con4 = ["fis1/state1", "fis2/state1"];
con5 = ["fis1/state1", "fis3/state1"];
con6 = ["fis2/state2", "fis3/state2"];
%% create a FIS Tree
tree = fistree([fis1 fis2 fis3], [con1; con2; con3; con4; con5; con6]);
plotfis(tree)
댓글 수: 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!
