My Simulink model is creating to many samples, how can I solve this?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (1)
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
0 comentarios
Ver también
Categorías
Más información sobre Simulink Coder 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!