Getting error when building Fuzzy Logic on Simulink

17 views (last 30 days)
Hi
Could you please assist me I tried to build my Fuzzy Logic system on Simulink but when I try to build/run I get a warning "no rules fired for output 1 " basically I have 3 inputs of 3 sensors going into my Fuzzy Engine then the decision takes place in the Fuzzy Engine then it only has 1 ouput which must determine if there will be a forest fire outbreak or not , please find attached screenshots as I need help
Thanks

Accepted Answer

Sam Chak
Sam Chak on 5 Jan 2023
Edited: Sam Chak on 7 Jan 2023
My guts tell me that in one of the three fuzzy inputs {Temperature, Humidity, and Wind Speed}, the designed MFs did not cover the entire the universe of discourse. For example, say 0°C – 40°C is LowTemp MF, and 60°C – 100°C is HighTemp MF, but no MF is assigned for the mid range 30°C – 70°C. If the measured temperature is around 50°C, then "no rules fired for Output 1".
Can you show or post an image from the ruleview(fis) command? It would help to find the root cause of your case.
Edit: By viewing the inference process for your fuzzy system, I guess I have found the root cause of the warning.
Fig. 1: The inference process for your fuzzy system.
See my example of the Mamdani FIS below. If the values from both input are in the range , then it guarantees at least 3 rules will be triggered. In Fig. 2, a maximum of 8 out of 9 rules are triggered and the output value is 0.5 (from the centroid defuzzification method).
Fig. 2: 8 out of 9 rules are triggered and the output value is 0.5.
In Fig. 3, Input #1 is 0 and Input #2 is 1, but the output value is also 0.5. This happens because none of the rules is triggered, and the internal algorithm automatically set the defuzzified output value to its mean range value that is 0.5.
Fig. 3: No rules fired for output1 and the defuzzified output value set to its mean range value.
For the technical explanation, this happens because all designed MFs only cover the range , excluding and . Thus, since you used the OR operator in your rules, if any of the input value is either 0 or 1, then, no rules fired.
Suggested solution:
To prevent this, make sure the designed MFs cover the entire universe of discourse, as shown in Fig. 4.
Fig. 4: the designed MFs in the fuzzy inputs cover the entire universe of discourse, including the extremities {0} and {1}.
  3 Comments
Sam Chak
Sam Chak on 5 Jan 2023
Try showing the Rule Viewer (see sample image). Also, identify the set of input values that triggers the Warning message "no rules fired for Output 1".
fis = readfis('tipper');
ruleview(fis)
Warning: ruleview will be removed in a future release. Use the Fuzzy Logic Designer app instead.
Sam Chak
Sam Chak on 7 Jan 2023
I have updated my Answer to explain the cause of the problem, and a suggested solution is provided.
If you find the solution is helpful, please consider accepting ✔ and voting 👍 the Answer. Thanks a bunch! 🙏

Sign in to comment.

More Answers (1)

Ajay
Ajay on 6 Jan 2023
Good Day Sir
Please find attached rule finder , thanks

Categories

Find more on Fuzzy Logic in Simulink in Help Center and File Exchange

Tags

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!