Influencing solver max time step during simulink simulation

I am running a simulink model where I use the time-step as an input to a function, so I need a small maximum time-step to have accurate results. When my system reaches steady state, however, I freeze the function output values and the simulation keeps running at maximum time-step, without the need of reading out the system time-step. The problem is that since I need a small time-step, I have to set a small maximum time-step in my solver parameters so my simulation will still run very slowly even at steady-state.
My question is, is there a way to decrease the maximum time-step while the simulation is running, and increase it again when it's necessary? I tried using a dummy filter that is deactivated at steady-state which kind of does the job but the it is too slow and unstable when activated.
I am using a variable step 23s solver.
Any ideas on how to properly do that?

답변 (0개)

카테고리

도움말 센터File Exchange에서 Manual Performance Optimization에 대해 자세히 알아보기

질문:

2017년 5월 19일

편집:

2017년 5월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by