Simout and solver step time

조회 수: 6 (최근 30일)
Daniel Weber
Daniel Weber 2019년 5월 25일
답변: Sulaymon Eshkabilov 2019년 5월 26일
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

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019년 5월 26일
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.

카테고리

Help CenterFile Exchange에서 Component-Based Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by