필터 지우기
필터 지우기

Cost function for MPC controller in Simulink

조회 수: 23 (최근 30일)
Raj Kumar Muniyandi
Raj Kumar Muniyandi 2019년 4월 4일
이동: Walter Roberson 2024년 2월 12일
Hey guys !
I am working on designing a mpc controller using the MPC controller simulink block !
But i don't know where to define the cost function for the optimizer ?
  댓글 수: 3
jana nassereddine
jana nassereddine 2023년 3월 28일
yes, please, same question
akram amri
akram amri 2024년 2월 10일
이동: Walter Roberson 2024년 2월 12일
Did you solve the problem? If so, can you please give me the code?

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

답변 (2개)

Jordan Olson
Jordan Olson 2024년 2월 12일
The cost function for the MPC is defined within the MPC object that's provided as a parameter of the Simulink block, not on the Simulink block itself.
For linear and adaptive MPC, a standard linear cost function is used. You tune the cost function by modifying various weights using any of the following methods:
  • Modify controller weights in MATLAB, as discussed here
  • Enable online tuning weights in the block parameters of the MPC Controller block
  • [Linear MPC only] Tune weights interactively using the MPC Designer app (this app is opened when clicking the "Design" button in the block parameters of the MPC Controller block)
For nonlinear and nonlinear multistage MPC, you can specify a custom cost function (defined as a MATLAB function). The process for defining a custom cost function for nonlinear MPC is defined here.

akram amri
akram amri 2024년 2월 12일
When I run MPC code to control an asynchronous machine, I get this type of error "global declaration not resolved to a data store memory block registered via the ports and data manager" What should I do?
  댓글 수: 1
Jordan Olson
Jordan Olson 2024년 2월 12일
This issue seems unrelated to the original MPC question. Please consult a different MATLAB Answers thread or contact Technical Support.

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

카테고리

Help CenterFile Exchange에서 Model Predictive Control Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by