Slower simulation than usual
19 次查看(过去 30 天)
显示 更早的评论
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/527664/image.png)
I have run the Profiler, and it says the simulation took 53.52 seconds:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/527669/image.png)
However, the simulation in fact took 7 minutes for 0.100s simulation time, observable by the Diagnostic Viewer:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/527674/image.png)
When the simulation runs at regular speed, the processor uses much more power:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/527679/image.png)
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 个评论
Walter iacomacci
2021-2-22
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.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Configure and View Diagnostics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!