필터 지우기
필터 지우기

How to initialize a SIMULINK simulation with initial trimmed states and control inputs?

조회 수: 2 (최근 30일)
J
J 2021년 1월 12일
답변: Vidip 2024년 2월 20일
I have a SIMULINK model that basically trims an airplane and the simulation stops when the airplane is trimmed. I would like to re-start the simulation from the trimmed conditions (states and inputs) without having to re-run the model which re-trim itself. Is there a way I can trigger a simulation reset right after the model is trimmed and use the trimmed states/inputs to initialize the reset simulation?
Thanks.

답변 (1개)

Vidip
Vidip 2024년 2월 20일
When you want to use final states data as the initial state for another simulation, consider selecting Save final operating point. The model operating point contains complete information about the simulation state, including block states, hidden block states, the state of the solver and execution engine, and output values for some blocks.
Also, the ‘Simulink.SimulationInput’ object allows you to make changes to a model and run simulations with those changes. These changes are temporarily applied to the model. Using a ‘Simulink.SimulationInput’ object, you can change initial state, model parameters, block parameters, external inputs, and variables. Through the ‘Simulink.SimulationInput’ object, you can also specify MATLAB® functions to run at the start and the end of each simulation by using the ‘setPreSimFcn’ function and the ‘setPostSimFcn’.
For further information, refer to the documentation links below:

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by