Constraints violation in MPC design

조회 수: 6 (최근 30일)
Osamah Ali Mohammed Saad
Osamah Ali Mohammed Saad 2023년 10월 24일
댓글: Osamah Ali Mohammed Saad 2023년 12월 8일
I am building a mpc on MATLAB/Simulink. I applied some equality and inequality constraints to the controller (states and unputs); however, there are inequality state constraints that are violated. What might be the reason behind that?

채택된 답변

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2023년 10월 27일
The more constraints you are adding, the smaller the solutions space, the harder it gets for the solver to find a solution. If your constraints are too restrictive, you may be asking the controller to solve an infeasible optimization problem. You can easily check if that's the case by making sure that your constraints are soft. And always make sure to check the exit flag status to see if the controller was actually able to solve the problem or not.
  댓글 수: 15
Jordan Olson
Jordan Olson 2023년 12월 7일
@Osamah Ali Mohammed Saad Thanks for uploading your files! I took a look through them and simulated the controller on my end, and I'm not seeing any constraint violation. State 3 (SOC) is the only state with constraints in the code you provided, it looks like all the others are commented out. State 3 stays within its hard constraints ([0.1, 1]) during the entire simulation.
All the constraints on the MVs appear to be satisfied as well, except for some very small violations of the RateMin constraint on MV 3 (mass flow), which is a soft constraint.
Could you elaborate on what constraint violations you are seeing on your end?
Osamah Ali Mohammed Saad
Osamah Ali Mohammed Saad 2023년 12월 8일
Thank you Jordan for your response. A custom inequalities constraints file is used to apply softened state constraints. These constraints are violated, but the slack variable value remains unchanged (0 = unused). However, when I reduce the sampling time, the solver is able to detect the constraints violation and uses the slack variable accordingly.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by