Hard constraint bounds for non linear constraints in MPC

7 次查看(过去 30 天)
The Custom Constraint Fcn file in MPC toolbox enables us to give nonlinear constraints to the optimizer. The function is as follows:
function [C, Ceq, dCdy, dCdu, dCddu, dCdslack, dCeqdy, dCeqdu, dCeqddu, dCeqdslack] = mpcCustomConstraintFcn (y, yref, u, uref, du, v, slack)
However, these constraints are soft constrains by default. Any idea on how to make them hard constraints?
  2 个评论
John D'Errico
John D'Errico 2018-9-1
Typically most tools in MATLAB, or any language that works in floating point arithmetic, must allow a small amount of slop, a tolerance constraint, wherein the constraint may actually be exceeded by a small amount that is less than the tolerance. Much of the time, that excess is tiny, on the order of floating point trash.
A problem arises when your equations are ill-conditioned. Then the slop becomes magnified, and difficult to maintain the desired limits.
However, does your use of the word hard bounds mean that you wish to do more than that? Do you want to see strict inequalities, thus of the form C(X)>0, as opposed to C(X)>=0?
As I said above, floating point trash can get into all numerical computations done with floating point arithmetic. So asking for s strict inequality is quite difficult to do. Even asking for a solution that strictly obeys a nonlinear inequality of the form C(X)>=0, with no tolerance allowed for exceeding the bound is difficult.
neha
neha 2018-9-2
Hello John,
Thanks so much for your reply. What you said makes sense and I understand what you are trying to convey.
However, my issue is slightly different. In MPC toolbox, in general for all constraint, we have this constraint softening factor V (ECR): See Constraint Softening section
The V (ECR) here lets me manipulate relative magnitude of a tolerable violation. Now I have this feature to constraint the direct inputs and outputs, but when I want to do it for certain non linear constraints that I am imposing. I am sure the feature exists, but I dont know how to access it.

请先登录,再进行评论。

回答(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