Definition of consecutive zero crossings
Model Configuration Pane: Solver
The software defines zero crossings as consecutive if the time between events is smaller than an interval defined by the time tolerance. Consider a simulation in which the software detects zero crossings ZC1 and ZC2, bracketed at successive time steps t1 and t2.
The software considers the zero crossings consecutive when the interval dt between t1 and t2 is less than the product of the specified time tolerance timetol and the larger time t2.
dt < timetol * t2
The software counts the number of consecutive zero crossings detected and issues a diagnostic when the count exceeds the amount specified by the Number of consecutive zero crossings parameter. You can specify whether the diagnostic is a warning or an error using the Consecutive zero-crossings violation parameter. The counter resets when the simulation progresses without detecting another zero crossing long enough for the next zero crossing to be considered nonconsecutive.
10*128*eps| positive scalar number
Decreasing the time tolerance specifies a stricter definition for consecutive. A lower time tolerance can provide more flexibility for a model to recover from behaviors and conditions that result in many discontinuities.
For models that experience excessive zero crossings, consider increasing the value for the Number of consecutive zero crossings parameter to relax the condition for when the software issues a diagnostic about the number of detected zero crossings.
The table summarizes recommended values for this parameter based on considerations related to code generation.
|Safety precaution||No impact|
|Type: string | character vector|
|Value: positive scalar number|
Introduced before R2006a