Main Content

Signal threshold

State value at which adaptive zero-crossing algorithm can stop bracketing

Model Configuration Pane: Solver

Description

The algorithm for zero-crossing detection with a variable-step solver detects the occurrence of a zero crossing and then locates the time at which the zero crossing occurred through a process called bracketing. In the bracketing process, the algorithm searches for the time at which the signal value crosses through zero. When you use the adaptive zero-crossing algorithm, the Signal threshold specifies a tolerance on the signal value. The signal threshold allows the adaptive algorithm to stop bracketing when the algorithm finds the time at which the signal value is close enough to zero.

Dependencies

To enable this parameter:

Settings

auto (default) | scalar number

By default, the adaptive algorithm automatically determines the signal threshold. The signal threshold must be a scalar number greater than or equal to zero.

Using a signal threshold that is too small can decrease simulation speed.

Using a larger signal threshold can increase simulation speed, especially in systems with strong chattering. Using a signal threshold that is too large can reduce the accuracy of simulation results.

Recommended Settings

The table summarizes recommended values for this parameter based on considerations related to code generation.

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: ZCThreshold
Value: 'auto' | scalar number greater than or equal to zero
Default: 'auto'

Version History

Introduced in R2008a