Low Performance when model is run from Simulink
조회 수: 5 (최근 30일)
이전 댓글 표시
I'm trying to run a model developed in Simulink, that outputs a "real time" animation.
When I open the model and run it from the Simulink window with the Run button, the animation is laggy and misses some feature, for example the Figure where it should be displayed doesn't open automatically.
However, when I don't open simulink and run the model from the Command Line direcly as
>> sim('ModelName.slx')
it works perfectly, with high frame rate and automatically opens the Figure.
From looking at the Task Manager, it seems that when the model is run with Simulink open, my laptop uses the integrated GPU, while in the other case it defaults to the (more powerful) dedicated GPU.
In the Graphics Settings, MATLAB is listed as "High Performance", meaning it will use the dedicated GPU, as it does. I tried to set the same parameter for Simulink, but I don't seem to find an executable so that I can add it to the program list (it probably hasn't got one since it stays 'under' the Matlab icon).
Does anyone has an idea how to solve this?
Thanks.
댓글 수: 0
답변 (1개)
Smit
2023년 2월 9일
Hi,
I understand you are observing low performance while running your model in Simulink. You have set your GPU to accelerate MATLAB’s executable, but it is not picking up the Simulink GUI.
You can set MATLAB and Simulink to use GPU acceleration as well.
For Simulink, you can use the GPU Coder to accelerate your model simulations. In the Simulink GUI, you can go to “Model Configuration Parameters” (Ctrl+E). In the “Simulation Target” section, you can select the “GPU acceleration” option and configure any additional parameters according to your requirements in the “GPU Acceleration” tab under “Simulation Target”.
참고 항목
카테고리
Help Center 및 File Exchange에서 Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!