Main Content

Zero-crossing control


Enables zero-crossing detection during model simulation. For most models, this speeds up simulation by enabling the solver to take larger time steps.

Category: Solver


Default: Use local settings

Use local settings

Specifies that zero-crossing detection be enabled on a block-by-block basis. For a list of applicable blocks, see Simulation Phases in Dynamic Systems

To specify zero-crossing detection for one of these blocks, open the block's parameter dialog box and select the Enable zero-crossing detection option.

Enable all

Enables zero-crossing detection for all blocks in the model.

Disable all

Disables zero-crossing detection for all blocks in the model.


  • For most models, enabling zero-crossing detection speeds up simulation by allowing the solver to take larger time steps.

  • If a model has extreme dynamic changes, disabling this option can speed up the simulation but can also decrease the accuracy of simulation results. See Zero-Crossing Detection for more information.

  • Selecting Enable all or Disable all overrides the local zero-crossing detection setting for individual blocks.


This parameter is enabled for both Variable-step and Fixed-step solvers. For fixed-step solvers, Enable zero-crossing detection for fixed-step solver should be enabled.

Selecting either Use local settings or Enable all enables the following parameters:

  • Time tolerance

  • Number of consecutive zero crossings

  • Algorithm

Command-Line Information

Parameter: ZeroCrossControl
Value: 'UseLocalSettings' | 'EnableAll' | 'DisableAll'
Default: 'UseLocalSettings'

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Related Topics