Circular constraint matrices in a Model Predictive Control application
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hello I need some help constructing the Q,l and r matrices for a circular constraint using cplexqcp in an MPC application. I'm using cplexqcp with a Matlab interface to solve this, where the constraint is to be given as: z'*Q*z + l'*z <= r. And z=[x(k+1) x(k+2) .. x(k+N+1) u(k) u(k+1) .. u(k+N) e(k) e(k+1) .. e(k+N)]'. Whre x is the state vector x=[x1 x2 x3 x4 x5 x6 x7]', u is the input vector u=[u1 u2 u3 u4]' and e a scalar slack variable.
The constraint is: (x-x_ref)^2 + (y-y_ref)^2 <= w, where w is the radius of the circle. The system has 7 states, 4 inputs and a slack variable and a prediction horizon of 30, thus the decision variable has (7+4+1)*30 = 360 variables. Since the reference is changing at each step in the horizon I should get 30 constraints, of the form given above (just a slightly different value for the ref's at each step). I just can't seem to construct the matrices correctly, r becoms 30x1, l 30x360 but Q becomes 360x360 which cplexqcp deems to be wrong (which it probably is). Anyone can help me out a little bit?
Best regards MC
Answers (0)
This question is closed.
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!