Main Content

Zero-crossing control

Description

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

Category: Solver

Settings

Default: Use local settings

Use local settings

Zero-crossing detection is enabled on a block-by-block basis. For a list of applicable blocks, see Simulation Phases in Dynamic Systems

To enable zero-crossing detection for a block, open the Block Parameters dialog box and select Enable zero-crossing detection.

Enable all

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

Disable all

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

Tips

  • 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 zero-crossing detection 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 zero-crossing detection setting for individual blocks.

Dependencies

Variable-Step Solver

This parameter is always enabled when the solver Type is Variable-step.

When you use a variable-step solver, setting Zero-crossing control to either Use local settings or Enable all enables these parameters:

Fixed-Step Solver

To enable this parameter when the solver Type is Fixed-step, select Enable zero-crossing detection for fixed-step solver.

Programmatic Use

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Related Topics