Slower simulation than usual
35 views (last 30 days)
Show older comments
Hi all
I am running a simulation in Simulink. Usually the simulation takes about 15 minutes in real-time for 60 seconds of simulation time. But sometimes, the simulation takes a really long time for no apparent reason. Then it takes 7 minutes to simulate only 0.100 seconds...
When it is simulating so slowly, the MATLAB Simulink task uses very little CPU:
I have run the Profiler, and it says the simulation took 53.52 seconds:
However, the simulation in fact took 7 minutes for 0.100s simulation time, observable by the Diagnostic Viewer:
When the simulation runs at regular speed, the processor uses much more power:
So I was wondering why Simulink simulates so slowly, uses so little CPU, and even the Simulink Profiler seems to be mistaken about the simulation time? I was not able to find a root cause to make the model run at normal speed again... I have tried rebooting MATLAB or the computer, I have closed all Scope windows, forced a new model compile, ...
Thanks much,
Jonas
2 Comments
Walter iacomacci
on 22 Feb 2021
Hey there Jonas, I hope you are having a nice day. I read the problem you are having but sometimes this could happen depending on the model you are simulating. Actually most of the cases when things like this happen is not fault of the software but of the model you are trying to simulate or even the settings of your simulation, so if you could post more information about the model you are simulating and also the solver configuration you are using in your settings we could figure out the solution for your problem.
Answers (0)
See Also
Categories
Find more on Configure and View Diagnostics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!