Simout and solver step time
显示 更早的评论
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
回答(1 个)
Sulaymon Eshkabilov
2019-5-26
0 个投票
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Scopes and Data Logging 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!