having error while running fuzzy controller and fuzzy set of matlab 2017 in matlab 2023?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
2 inputs and 1 output with mamdani rule.
6 commentaires
Sam Chak
le 25 Juil 2025
Your FIS generates a saturation surface. What specific error did you get in MATLAB R2023?
Réponses (1)
Sam Chak
le 25 Juil 2025
Modifié(e) : Sam Chak
le 25 Juil 2025
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 commentaires
Sam Chak
le 28 Juil 2025
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)
Voir également
Catégories
En savoir plus sur Fuzzy Logic in Simulink dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!