having error while running fuzzy controller and fuzzy set of matlab 2017 in matlab 2023?
1 次查看(过去 30 天)
显示 更早的评论
2 inputs and 1 output with mamdani rule.
6 个评论
Sam Chak
2025-7-25
Your FIS generates a saturation surface. What specific error did you get in MATLAB R2023?
回答(1 个)
Sam Chak
2025-7-25
编辑:Sam Chak
2025-7-25
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 个评论
Sam Chak
2025-7-28
Good, @shilpam malik! This represents another step forward. We can explore other approaches. If you have the mathematical model of the system in Simulink, whether in State-space or Transfer Function form, please provide it here. I can reconstruct it to investigate the fuzzy control issue.
The following examples will give you an idea of how the mathematical model appears:
State-space model (generally described using 4 matrices, A, B, C, D):
sys = rss(2)
Transfer function model (generally described as a rational function, which is a ratio of two polynomials):
Gp = tf(sys)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fuzzy Logic in Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!