How to improve the simulation speed of a system slowed by the addition of a Fuzzy System
4 views (last 30 days)
Show older comments
The simulation became slow after adding fuzzy system. How can I fix this without effect my system please ?
1 Comment
Daniel
on 5 Nov 2024
Edited: Daniel
on 5 Nov 2024
@Ahmed Alshamrany, could you provide a little more detail on the fuzzy system?
Does it use fixed-point data types, for instance?
Does it set a particular step size in your model that might be faster than the model is running otherwise?
Is the fuzzy system itself complicated?
Is the system a separate file, such as a referenced model or a referenced subsystem?
A screenshot, model files, or indicating what blocks you removed and added might help as well.
Answers (1)
Sam Chak
on 26 Apr 2025
If your fuzzy system is of the Mamdani type (as is the case for 99% of beginner users), and it has many inputs, membership functions, and rules, this can significantly slow down the simulation, especially when running in Simulink. Simplifying the fuzzy system by reducing the number of membership functions and rules, or even converting it to a Sugeno-type fuzzy system generally helps.
In the past, users of fuzzy systems in Simulink were advised to approximate the fuzzy control surfaces using 2-D Lookup Table or n-D Lookup Table blocks to improve execution speed. Since R2024b, the Fuzzy PID Controller block has been introduced, which is capable of converting a fuzzy system into a lookup table with precomputed outputs.
Example 1

Example 2

0 Comments
See Also
Categories
Find more on Fuzzy Logic in Simulink 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!