having error while running fuzzy controller and fuzzy set of matlab 2017 in matlab 2023?
6 Comments
Your FIS generates a saturation surface. What specific error did you get in MATLAB R2023?
Answers (1)
All five membership functions of Input 2 are defined in the range [-1, 1]. However, when Input 2 has a value of -1.77138 that is outside the range, none of the rules are triggered. Consequently, it returns the mid value of the Output range, that is (-1 + 1)/2 = 0, by default in Fuzzy Logic Toolbox.

To address the issue, make sure that the MFs are designed to cover the entire operating range of Input 2. For example, if the operating range is [-2, 2], the MFs should look like the following:

11 Comments
Do you mean, in MATLAB R2018, the FIS returns some non-zero value when the value of Input 2 is outside of the range [-1, 1]?
The FIS is expected to return zero (mean output value) because no rules fired. If it returns a non-zero value in R2018 when the input value of 1.77138 clearly lies outside of the input range [-1, 1], then you need to investigate further.
When the Derivative of Error is 1.77138, what is the input value of Error?
Categories
Find more on Fuzzy Logic Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

