Main Content

Parameter Quantization Advisor

Inspect numerical issues related to parameter quantization


The Parameter Quantization Advisor app provides additional details on numerical issues related to parameter quantization. Using this app, you can:

  • Filter quantization issues resulting from parameter overflow, underflow, and precision loss.

  • Sort quantization issues based on bits of error, absolute error, or relative error.

  • Explore in detail the effects of parameter quantization on your model.

Screenshot of Parameter Quantization Advisor app.

Open the Parameter Quantization Advisor App

  • Diagnostic Viewer: From a numeric diagnostic warning or error, under Suggested Actions, click Open.


expand all

Use the Parameter Quantization Advisor to explore parameter precision loss in a feedback controller model.

Open the fxpdemo_feedback model.


Check that parameter diagnostics are enabled. In the Configuration Parameters dialog, under Diagnostics > Data Validity, set the Detect precision loss parameter diagnostic to warning.

Simulate the model.

The Diagnostic Viewer displays a warning for parameter precision loss.

Parameter precision loss diagnostic warning message.

To inspect details of this diagnostic in the Parameter Quantization Advisor, from Suggested Actions, click Open.

Screenshot of Parameter Quantization Advisor app.

The app displays details of the parameter precision loss that occurred in fxpdemo_feedback/Denominator Terms. In this example, the model has only precision loss issues, as indicated by a blue square in the Quantization Issue column of the table. You can also use the app to explore overflow and underflow issues.

Four coefficients in the Discrete FIR Filter block named Denominator Terms experienced precision loss. The table shows the dialog value entered for each parameter and the corresponding quantized value of each parameter. You can sort the table by bits of error, absolute error, or relative error.

The Parameter Details pane contains additional details for the parameter experiencing numeric issues, including the location in the model and the name, dimension, and complexity of the parameter. The table displays the data type of the parameter in the dialog and the data type of the parameter at run time along with the minimum, maximum, and precision representable by these data types.


  • Update the diagram or simulate the model to view messages in the Diagnostic Viewer.

  • The Parameter Quantization Advisor app reports information for these quantization issues:

    Diagnostics set to none are also reported in the app.

  • The Parameter Quantization Advisor reports details on quantization issues for tunable and nontunable parameters that experience quantization loss.

  • You can inspect one parameter at a time in the Parameter Quantization Advisor. To inspect a different parameter, open a new instance of the app from a message in the Diagnostic Viewer.

Version History

Introduced in R2022b