SIMULINK Time Optimization

조회 수: 1 (최근 30일)
Jacob
Jacob 2011년 12월 20일
Hello,
I want to optimize my SIMULINK model (run from an .m script) so that based on initial parameters I can quickly hone in on a final value by adjusting the simulation time. But I want the simulation to also be very accurate (down to about 10^-5), but in order to do so it takes a whole lot of time, and can run into a never-ending loop based on how I am running it.
Is there an easy way to do this?
Thanks, Jake

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 12월 21일
In the "Sinks" library, there is a block called "Stop Simulation". You can construct a logic (e.g. compare your output against 10e-5). If the logic is true, it will stop the simulation.
You can set your simulation's stop time as inf (infinite) and rely on the logic to stop the simulation. If you log the simulation time "tout", you can find out what exact time it stopped.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Manual Performance Optimization에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by