Has anybody seen this warning before? I can't troubleshoot it. Parameter precision loss occurred for 'X0'.......

10 views (last 30 days)
Getting the following warning. Think it is possibly the external input of an integrator block. Want to turn off Warning but boss doesn't want to because we want to check for other signal precision loss. When error is asserted it doesn't show any suspects. Note: 'X0' does not appear to be a parameter that we define.
Warning: Parameter precision loss occurred for 'X0'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'.

Answers (1)

Sebastian Castro
Sebastian Castro on 7 Aug 2015
This happens when you use a parameter value whose specified value/data type is more accurate than what the Simulink model is actually using.
For example, look at the image below. If you have a parameter whose value is 1.5 but your signal/state is an integer value, you have a precision loss and the first output of that integrator is actually 2.
- Sebastian
  3 Comments
Sebastian Castro
Sebastian Castro on 7 Aug 2015
No problem!
Does your MATLAB version give you a hyperlink to the block that's causing the problem -- or, at least, the name of the block? That may be a good place to start searching.
Robert McNabb
Robert McNabb on 7 Aug 2015
Here is that image from previous message.
Using 2012a for this program. "Detect precision loss:" was set to Warning so changed it to Error. However, when it flags the error the source is unknown and it doesn't highlight a block. It is a very complicated model with hundreds of masks, libraries, and associated m-files.

Sign in to comment.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!