Wednesday, October 23, 2013

Compare Simulink Data

This post is related with 'Export Simulink Data to Matlab' since it is another way to compare the simulink data. In the post 'Export Simulink Data to Matlab' we created variables in Matlab in order to process the data. In this post, I will explain how to easily compare some characteristics of variables in Simulink enviroment.

Let's took the same example as in 'Export Simulink Data to Matlab':
Export Simulink Data to Matlab Example
Now, we want to use the 'Test Points' to collect the data and the 'Signal Logging' to export that data. (This was explained in the 'Export Simulink data to Matlab' post.
Test Points and Signal Logging in signal wires.
Now, in order to initializate the Simulation Data Inspector, the button  must be clicked.
After running the simulation, the Simulation Data Inspector tab will appear:

Simulation Data Inspector tab




And after clicking 'Simulation Data Inspector' the following window will appear:

Simulation Data Inspector window
Here we can see the signals, look for a crossing points, and also compare signals with simulation with other parameters.

Example1: Let's exactly detect the crossing between the two signals we have.
In the Simulation Data Inspector, we can select the data cursor and detect the exact crossing of a run.

Croissing point 1

Crossing point 2
Example2: Let's compare the signal by changing a resistance value:
If we change R1 from 10kOhm to 20kOhm, the output signals will appear at the window:

Simulation Data Inspector - Inspect Signals
Here, we can select/deselect the signals in order to visually compare them.
Furthermore, at the compare Signals tab, we can select the signals we want to compare and the simulator will give us the difference and the tolerance between them.

Simulation Data Inspector - Compare Signals
Finally, we can select to compare runs at the Compare Runs tab and the simulator will plot the comparison between the same signals at the different runs.

Simulation Data Inspector - Compare Runs
We can use this tool to process some Simulink data in an easy way. If we want to perform more difficult functions to the data, I would export it to Matlab enviroment.

Hope this help and any comment will be welcome!

Licencia Creative Commons

No comments :

Post a Comment