How can I get the final value of the cost function from MPC block?

Hi everybody,
As the MPC control action is obtained by solving the optimization problem, my question is how can I get the final value the cost function after the minimizing procedure is finish?
Secondly, how can I minimize a variable which it is not a measured output?
Thanks in advanced

 Respuesta aceptada

Arkadiy Turevskiy
Arkadiy Turevskiy el 19 de Mzo. de 2014
1. Optimal cost is an optional block output as explained in the reference document, just search this page for "optimal cost".
2. For the unmeasured outputs, you can specify constraints just as you do for measured ones, see this example .

3 comentarios

Thanks a lot Arkadiy, But right now I have another problem, the building MPC design task can't any more linearize the simulink model. how can I fix it? Do you think the installation of the free toolbox(YALMIP) can cause this?
What do you mean exactly when you say "can't any more linearize Simulink model"? What error message are you getting exactly?
The problem is solved. As you know, one of the steps to creat MPC controller in the MPC design tool is to linearize the model of simulink. It stoped work when I install a free optimazation toolbox because it contains name-clash on the linearize function (linearize.m). The pb is solved by deleting this file. Thank you one more time

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 19 de Mzo. de 2014

Comentada:

el 23 de Mzo. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by