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

9 views (last 30 days)
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

Accepted Answer

Arkadiy Turevskiy
Arkadiy Turevskiy on 19 Mar 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 Comments
Arkadiy Turevskiy
Arkadiy Turevskiy on 20 Mar 2014
What do you mean exactly when you say "can't any more linearize Simulink model"? What error message are you getting exactly?
July
July on 23 Mar 2014
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

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!