Inequality constraint cause infeasible results in NMPC

1 回表示 (過去 30 日間)
Mert Buyukkopru
Mert Buyukkopru 2023 年 1 月 5 日
編集済み: Mert Buyukkopru 2023 年 1 月 6 日
I built an NMPC controller for a quarter-car system with linear state functions. The controller will give feasible results when equality constraints are specified. However, once inequality constraints were defined in a function, the controller gave infeasible results.
ValidateFcns results are OK for both constraints. Is there any problem with the definition of inequalities in the custom inequality function ?
Equality Constraints:
ManipulatedVariables(i).Min/Max= -/+5000
Inequality Constraints:
u(2)−5000≤0 / u(2)+5000≤0
cineq = [U(2) - 5000; U(2) + 5000;]

回答 (1 件)

Torsten
Torsten 2023 年 1 月 5 日
Your constraints say that a number should be >= -5000 (Min/Max constraint) and that it should be <= -5000 (U(2)+5000). That's hard to handle for a solver. Just set U(2) = -5000 in your optimization problem.
  3 件のコメント
Torsten
Torsten 2023 年 1 月 5 日
5000<u(2)<-5000 := a*(x(2)- x(4))<u(2)<-a*(x(2)- x(4))
Do you know a number that is greater than 5000 and smaller than -5000 ? I don't.
Mert Buyukkopru
Mert Buyukkopru 2023 年 1 月 6 日
編集済み: Mert Buyukkopru 2023 年 1 月 6 日
Yes, you are right. I modified the inequalities with the ones I use. But there are still some problem.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeModel Predictive Control Toolbox についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by