k step ahead simulation in simulink subsystems
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponses (3)
Fangjun Jiang
le 18 Août 2011
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.
0 commentaires
Guy Rouleau
le 18 Août 2011
If your model is linear or close to, you might be interested in the Model Predictive Control Toolbox:
0 commentaires
Sergio
le 19 Août 2011
1 commentaire
Fangjun Jiang
le 19 Août 2011
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
Voir également
Catégories
En savoir plus sur Schedule Model Components dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!