Simout and solver step time

9 Ansichten (letzte 30 Tage)
Daniel Weber
Daniel Weber am 25 Mai 2019
Hello,
I'm currently trying to plot Simulink data (for cosmetic reasons) in MATLAB. For that I'm using the simout block.
I have multiple simout blocks in the same subsystem, and some of them work as intended, with data-time pairs corresponding to the auto timestep of the solver. The plot with the exported data in the workspace looks exactly like on the Simulink scope.
On the other hand there are some blocks where the graphs don't match, and the step time in this data is constant 0.01, which looks makes the signals look bad.
I attached the following picture where you can see two graphs, which should be identical (zoomed in as far as I could on the left scope).
Does someone know how to fix these issues? I already played with the sample times of the model/ blocks but nothing changes.
Thanks in advance,
Daniel
test.png

Antworten (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov am 26 Mai 2019
Hi Daniel,
Your chosen time step 0.01 is showed up in your right zoomed in plot that is correct and can't be ideal step function as shown in your left scope's plot. If you decrease the step size (0.001 or 0.0001 or even smaller) the slope (shown in your right plot) gets steeper and comes closer to the ideal step, but never be an ideal step function.
Good luck.

Kategorien

Mehr zu General Applications 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