Input and State Constraints in MPC problem solved by quadprog

5 views (last 30 days)
I'm working on a model predictive control problem in which there are constraints both on the input of the system and on the state variables. Since solvers like quadprog or mpcActiveSetSolve deal with the problem J = x'Hx + F'x, allowing to specify constraints only for the x variable (A*x <= b or the equality ones), which is in my case the input of the system for all the steps of the horizon (u bar as in the Cost_Function_LA.png), I don't know how to specify to the solver the constraints I put on the variables of the state.

Answers (1)

Ashok
Ashok on 4 Oct 2024
Hi Angelo,
The following procedure can be used to convert the state constraints into input constraints.
Consider the discrete-time state-space system with states, where is the state vector and is the input vector. Let the state constraints be . If N is the prediction horizon, the predicted states can be concatenated into a single matrix given by,
Where:
  • is equal to the initial state .
  • X and U are concatenated vectors, and .
  • Φ is constructed as: .
  • Γ is constructed as: .
On concatenating the state constraint relations at each time step and substituting , one may obtain the following inequality:
.
Where,
The above equation can be rearranged to obtain an input constraint relation.
The above relation is in the general form of inequality constraints, . The equivalent matrices for and can be identified to be,
You can refer to the attached MATLAB script for further assistance. To learn more about MPC matrices you can refer the following documentation page.
I hope this resolves your query!

Community Treasure Hunt

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

Start Hunting!