Is there any way to graph the MPC cost function?

조회 수: 7 (최근 30일)
Milad Shojaee
Milad Shojaee 2023년 10월 25일
Hello, I want to graph the MPC cost function and see how it converges. Does MPC object give you the information about the cost function data? How about MPC designer App? Is there any section in which I can see the cost function convergence graph? Thanks
  댓글 수: 1
Sam Chak
Sam Chak 2023년 10월 25일
Do you have the mathematical formula for the MPC cost function? If the formula is a mathematical function of the states and inputs, , then I believe you can manually plot it out with plot(t, J). Have you tried that?

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

답변 (1개)

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2023년 10월 27일
If you are designing the controller in MATLAB, all 'move' functions have an info argument which containts the cost value (see here).
Same goes for the blocks in Simulink, see for example here.

카테고리

Help CenterFile Exchange에서 Refinement에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by