Warning message from signals comparing

1 Ansicht (letzte 30 Tage)
Sergio Rueda
Sergio Rueda am 8 Mär. 2018
Bearbeitet: Sara Nadeau am 12 Mär. 2018
Hi folks, I built a suspension system model in simulink to diagnose faults, then I put some failures in the model, to observe its performance. I compared the two signals (100% functional model, model with fauilures)in the simulation data inspector, and now i want to make a code that generates a warning alert when the difference between this signals exceeds 10%, I tried exporting the data from Simulation Data Inspector, but I didn't know who to compare. I want to know if there is a function that compares data from structs or directly from simulink.
Sorry for my english. Thanks

Antworten (1)

Sara Nadeau
Sara Nadeau am 12 Mär. 2018
Bearbeitet: Sara Nadeau am 12 Mär. 2018
Based on my understanding of what you want to do, I think that the Simulation Data Inspector programmatic interface should help. Have you looked into using Simulink.sdi.compareRuns?
You can use the RelTol parameter of the Simulink.sdi.Signal objects for the relevant signals to set your 10% (0.1) tolerance.
Use the Simulink.sdi.DiffRunResult object returned by Simulink.sdi.compareRuns to access the relevant Simulink.sdi.DiffSignalResult objects. The Match parameter of the Simulink.sdi.DiffSignalResult object indicates whether the difference resulting from the comparison fell within the specified tolerance.
The example Analyze Simulation Data with Signal Tolerances on the Simulink.sdi.compareRuns page should help fill in the details.

Kategorien

Mehr zu Load Signal Data for Simulation finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by