Documentation

When to Enable Zero-Crossing Detection

Whether or not to enable zero-crossing detection on state transitions can be a trade-off between accuracy and performance. Generally when detecting zero crossings, a Simulink® model accurately simulates mode changes without unduly reducing step size. However, for systems that exhibit chattering — frequent fluctuations between two modes of continuous operation — enabling zero-crossing detection may impact simulation time. Chattering requires a Simulink model to check for zero crossings in rapid succession, resulting in excessively small step sizes which can slow simulation. In these situations, you can disable zero-crossing detection, choose a different zero-crossing detection algorithm for your chart, or modify parameters that control the frequency of zero crossings in your Simulink model. See Preventing Excessive Zero Crossings in the Simulink User's Guide.

Was this topic helpful?