Clear Filters
Clear Filters

How to fix the "simulation hits (1000) consecutive zero crossings" error in Simulink?

36 views (last 30 days)
I am getting an error like this !!
At time 0.43860273421579765, simulation hits (1000) consecutive zero crossings. Consecutive zero crossings will slow down the simulation or cause the simulation to hang.
Please suggest to solve this problem, my aim is actually use this fuzzy output to use in the control signal, but since i am getting this error, i cannot do that... please help

Answers (1)

Sam Chak
Sam Chak on 18 Jan 2024
I've partially recreated your Simulink model, and it looks quite similar to the Classical Sliding Mode Control System. The "simulation hits (1000) consecutive zero crossings" error occurs due to a built-in feature that identifies rapid zero crossings and ends the simulation. In your case, this is triggered by the discontinuous action from the Sign block, causing frequent state switches.
If you're confident in the correctness of the model, you can disable this detection feature by unchecking "Enable zero-crossing detection" in the "Block parameters menu" of the Sign block.

Categories

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

Products


Release

R2015a

Community Treasure Hunt

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

Start Hunting!