How to add a 'Nonlinear MPC' block in a 'For Iterator' loop in Simulink?

4 vues (au cours des 30 derniers jours)
Enrica Soria
Enrica Soria le 9 Mai 2019
Commenté : Enrica Soria le 17 Mai 2019
I am working on a decentralized system and I need to run multiple MPC controllers in parallel. In my Simulink model I have a 'For Iterator' that contains a 'Nonlinear MPC' block. However, when running the simulation, I get the following error.
Error: " 'sim_model/Iterator/Nonlinear MPC Controller/MPC/NLMPC' has sample time '0.1'. Only constant (inf) or inherited (-1) sample times are allowed in 'iteraror' subsystem."
The 'Nonlinear MPC' block allows to set the following parameters:
nlmpc.png
I tried to set the sample time to 'inf' and '-1', instead of P.dt, but none of them is accepted (the error being "Expected Sample Time (Ts) to be positive.").
Is there any workaround?
  1 commentaire
Enrica Soria
Enrica Soria le 17 Mai 2019
The workaround I found consists in using the 'For Each iterator'.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by