Main Content

Detect underflow

Description

Select the diagnostic action when Simulink® detects a parameter underflow.

Category: Diagnostics

Settings

Default: none

none

Simulink software takes no action.

warning

Simulink software displays a warning.

error

Simulink software terminates the simulation and displays an error message.

Tips

  • Parameter underflow occurs when Simulink software encounters a parameter whose data type does not have enough precision to represent the parameter's ideal value because the ideal value is too small.

  • When parameter underflow occurs, casting the ideal non-zero value to the parameter's data type causes the modeled value to become zero.

  • Parameter underflow can occur for any data type, including floating-point, fixed-point, and integer data types. For example, the ideal value 1e-46 will quantize to zero for single-precision, half-precision, all integer types, and most commonly used fixed-point types.

  • The absolute quantization error will be small relative to the precision of the data type, but the relative quantization error will be 100%. Depending on how the parameter is used in your algorithm, the effects of underflow will be significant. For example, if the parameter is directly used in multiplication or division, then the impact of a 100% relative quantization error can be significant.

Command-Line Information

Parameter: ParameterUnderflowMsg
Value: 'none' | 'warning' | 'error'
Default: 'none'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionerror

Related Topics