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

 채택된 답변

Arkadiy Turevskiy
Arkadiy Turevskiy 2014년 3월 19일

0 개 추천

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

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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2014년 3월 19일

댓글:

2014년 3월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by