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
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.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Controller Creation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!