Terminal Weights to nlmpc

20 visualizaciones (últimos 30 días)
Saskia Putri
Saskia Putri el 3 de Mzo. de 2023
Comentada: Saskia Putri el 8 de Mzo. de 2023
Hello everyone,
I am planning to add terminal weights and terminal constraints to my NMPC code. However, I am not sure how to define the cost function using the standard with additional terminal cost. Can anyone help me with this?
Thank you
Best,

Respuesta aceptada

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis el 3 de Mzo. de 2023
Editada: Emmanouil Tzorakoleftherakis el 8 de Mzo. de 2023
For nonlinear mpc, the easiest way to do that is to use the multistage formulation and block. Then you can set constraints/cost for the final stage to accomplish what you need. Here is an example that you can use as a reference.
You could also do the same with the generic nonlinear MPC formulation that you are currently using, but it is a bit more complex. An example that you can follow is here. Here, you would need to provide constraints and weights as vectors for the entire prediction horizon, for each time step. So you can see how much more convenient the multistage formulation is where you have the flexibility to define cost/constraints at every stage/time step.
For linear MPC you can just set the desired weights in the standard cost and then call setterminal.
  6 comentarios
Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis el 8 de Mzo. de 2023
You should be able to do that. That would make the weights time varying, so you would need to provide them at runtime (here is the doc explanation for this). I cannot think of an existing example with nonlinear mpc that does that, but here is a linear mpc one. The concept is similar.
Saskia Putri
Saskia Putri el 8 de Mzo. de 2023
Thank you very much!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Model Predictive Control Toolbox en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by