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

7 visualizaciones (últimos 30 días)
Michiel Wolthaus
Michiel Wolthaus el 18 de Feb. de 2016
Respondida: Dennie el 22 de Feb. de 2016
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.

Respuestas (1)

Dennie
Dennie el 22 de Feb. de 2016
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

Categorías

Más información sobre General Applications en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by