Accurate Zero-Crossing Detection
This example shows how zero-crossing detection works in Simulink®. Simulink uses zero-crossing detection to accurately simulate an abrupt model change or discontinuity without decreasing the solver time steps. For more information, see Zero-Crossing Detection.
In this model, a sine wave is input to an Abs block and a Saturation block. At exactly t = 5, a Switch block output changes from the Abs block output to Saturation block output.
The Abs, Saturation, and Switch block Enable zero-crossing detection parameter is selected, allowing Simulink to detect exactly when the Switch block changes its output. The solver steps to the exact time that switch occurs.
See Also
Abs | Saturation | Switch