Improving runtime of Simulink model
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello,
I am working with a Simulink model that contains several MATLAB Function blocks and a 6-DOF block. The runtime for the model is relatively high (approximately 3-5 minutes in real time per second of simulation time) and I would like to optimize the model to improve this.
The main function that is being called includes a sub-function that creates a local structure (with nested fields) and returns it as an output to the top-level function; I believe that this may be the main driver of the slow runtime, but any other advice would be appreciated.
댓글 수: 0
답변 (1개)
Mark McBroom
2024년 4월 27일
Use Simulink Profiler to determine which part of the model is consuming the most execution time: https://www.mathworks.com/help/simulink/slref/simulinkprofiler.html?searchHighlight=simulink%20profiler&s_tid=srchtitle_support_results_1_simulink%20profiler
Adjusting solver settings can often improve performance. The Solver Profiler can help with this: https://www.mathworks.com/help/simulink/slref/solverprofiler.html
Accelerator and Rapid Accelerator modes can also help.
Thanks.
Mark.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Manual Performance Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!