Main Content

Zero-crossing control

Description

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

Category:Solver

Settings

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, seeSimulation Phases in Dynamic Systems

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

Enable all

Enables zero-crossing detectionfor 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 this option can speed up the simulation but can also decrease the accuracy of simulation results. SeeZero-Crossing Detectionfor more information.

  • SelectingEnable allorDisable alloverrides the local zero-crossing detection setting for individual blocks.

Dependencies

This parameter is enabled only if the solverTypeis set toVariable-step.

Selecting eitherUse local settingsorEnable allenables the following parameters:

  • Time tolerance

  • Number of consecutive zero crossings

  • Algorithm

Command-Line Information

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

Recommended Settings

Application Setting
Debugging No impact
Traceability No impact
Efficiency No impact
Safety precaution No impact

Related Topics