k step ahead simulation in simulink subsystems

Hi, I am wondering if I can simulate whithin a Simulink model a subsystem with a predefined simulation time. I want to implement a predictor in a subsystem that runs k steps ahead and gives its state at each time step of the root Simulink model.
Regards, Sergio

답변 (3개)

Fangjun Jiang
Fangjun Jiang 2011년 8월 18일

0 개 추천

You can put the rest of the model into an Enabled Subsystem or Triggered Subsystem block. Let the simulation run but only enable or trig the subsystem after k steps.
Guy Rouleau
Guy Rouleau 2011년 8월 18일

0 개 추천

If your model is linear or close to, you might be interested in the Model Predictive Control Toolbox:
Sergio
Sergio 2011년 8월 19일

0 개 추천

@Guy. It´s a MPC strategy but the model is nonlinear and implemented in Simulnk. At each step (root) I need a prediction of k steps ahead (subsystem). @Fangjun. I want the model runs at each step, not triggered at a certain k. I will take then the output of the subsystem at each k, but it has simulated for a longer time. To be clear, at each step I will put in the model the initial conditions...
Suggestions?

댓글 수: 1

It sounds like you have to split them into two models and write a script to automate it. Something like:
for j=1:100;
sim('MPC_model',...);
% read result data from MPC_model simulation
% set initial condition for root model using data from MPC_model simulation
sim('Root_model');
end

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품

태그

질문:

2011년 8월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by