My Simulink model is creating to many samples, how can I solve this?

8 次查看(过去 30 天)
I've got a Simulink model to simulate an engine. The model works good, but it is creating to many samples. This makes the model really slow and makes that I can only see about 0.5 second of the 50 seconds I'm simulating in the scopes. I can plot the signals via output block in Matlab, so I can confirm the model is working.
I've tried using a Fixed-Step in the Configuration Parameters but this only gets errors when I change something.

回答(1 个)

Dennie
Dennie 2016-2-22
Basically, your simulink model is solving differential equations. If you make the step-size too large as you can do with fixed-step solvers, the differential equations cannot be solved within the error tolerances. This results in model errors. You can use rate transition blocks to your output blocks to limit the logged data points. But large models will generally use a lot of CPU power and can run slowly. You can try to optimize the model or to adjust the simulation tolerances, but this is a more advanced function.
Second point, in the simulink scopes, you can remove the data history limit in the configuration window. This will show you all the information in the scopes.
Hope this helps,
Dennie

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by