How to resolve "Out of Tolerance" in the Simulation Data Inspector?
3 views (last 30 days)
Show older comments
Hello,
Im comparing results of same TestCase between 2 different Matlab versions(2019 and 2021). My script outputs the Data Inspector HTML report which shows if there are differences between 2 TestCases. I've verified the comparision of 2 testcases has zero difference but the Max Diff Column in the Data Inspector shows values of 0.9,4,9 etc. for different signals.
I've loaded the File A and File B mat files in the data inspector and changed the global tolerance value to 0.1, 0.01,1 but that did not make any difference in the Out of Tolerance.
Can anyone provide suggestions for this ?
Thank you !
0 Comments
Answers (1)
Suman
on 24 Jul 2024
Edited: Suman
on 24 Jul 2024
Hi Yogi,
Here are some troubleshooting steps that you may try to understand the reason for the Max Diff values:
1. Ensure Proper Alignment of Signals
Make sure that the signals from both test cases are properly aligned in time. Any misalignment could cause the Data Inspector to interpolate the signals and to report differences even if the signals are identical. Please refer to this documentation for more details: https://www.mathworks.com/help/simulink/ug/how-the-simulation-data-inspector-tool-compares-time-series-data.html
2. Check Data Types and Precision
Verify that the data types and precision of the signals in both files are the same. Differences in data types (e.g., single vs. double) or precision can lead to discrepancies in the reported differences.
3. Comapre the differences in the signals without Data Inspector
% Load the MAT files
dataA = load('FileA.mat');
dataB = load('FileB.mat');
% Extract signals
signalA = dataA.signalA;
signalB = dataB.signalB;
% Compare the signals
difference = abs(signalA - signalB);
maxDifference = max(difference); % Check if the maxDifference is same as reported by SDI
4. Manually inspect the signals if possible to see where the discrepancy is coming from.
I hope this helps!
0 Comments
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!