QP_MPC2QP – Conversion of MPC problem to quadratic programming
Block SymbolLicensing group: ADVANCED
Function Description
Quadratic Programming (QP) is a standard technique which suites very well to solve
model based predictive control (MPC) problems [9]. Quadratic Programming is
an optimization technique that minimizes the sum of quadratic form and linear
form.
The QP_MPC2QP block converts a linear MPC problem with quadratic optimization criterion to a quadratic programming problem. The block is compatible with the block QP_UPDATE and the QP solver QP_OASES.
MPC problem formulation
The MPC problem consists of a discrete linear time invariant state space model
where is the state vector, is the input vector, is the disturbance vector and is the output vector. Matrices , , and are referenced by inputs uA, uBu, uBv and uC. The model based predictive control problem is formulated as an optimization problem – minimization of the quadratic optimality criterion (cost function) in the form
(15.2) |
where symmetric and positive (semi-)definite matrices and and the vector are referenced by inputs uQ, uR and uW, and is the prediction horizon (input np).
Additional constraints on the state and the output may be required for the minimization process:
For detailed derivation, see the PDF version of this manual.
Inputs
np | Prediction horizon 1 1000000 | Long (I32) |
nc | Control horizon 1 1000000 | Long (I32) |
uA | Input reference to system matrix A | Reference |
uBu | Input reference to input matrix Bu of control vector u | Reference |
uBv | Input reference to input matrix Bv of disturbance vector v | Reference |
uC | Input reference to output matrix C | Reference |
uQ | Input reference to symmetric matrix Q in cost function | Reference |
uW | Input reference to vector W in cost function | Reference |
uR | Input reference to symmetric matrix R in cost function | Reference |
ul | Input reference to integer index vector l | Reference |
uH | Input reference to Hessian matrix H | Reference |
uGx | Input reference to part of gradient vector G corresponding to state vector x | Reference |
uGv | Input reference to part of gradient vector G corresponding to disturbance vector v | Reference |
uGw | Intput reference to part of gradient vector G corresponding to vector W | Reference |
uSuL | Input reference to work matrix Su*L | Reference |
uSv | Input reference to work matrix Sv | Reference |
uT | Input reference to work matrix T | Reference |
uScuL | Input reference to work matrix Scu*L | Reference |
uScv | Input reference to work matrix Scv | Reference |
uTc | Input reference to work matrix Tc | Reference |
uWORK | Input reference to matrix WORK | Reference |
HLD | Hold | Bool |
Outputs
yA | Output reference to system matrix A | Reference |
yBu | Output reference to input matrix Bu of control vector u | Reference |
yBv | Output reference to input matrix Bv of disturbance vector v | Reference |
yC | Output reference to output matrix C | Reference |
yQ | Output reference to symmetric matrix Q in cost function | Reference |
yW | Output reference to vector W in cost function | Reference |
yR | Output reference to symmetric matrix R in cost function | Reference |
yl | Output reference to integer index vector l | Reference |
yH | Output reference to Hessian matrix H | Reference |
yGx | Output reference to part of gradient vector G corresponding to state vector x | Reference |
yGv | Output reference to part of gradient vector G corresponding to disturbance vector v | Reference |
yGw | Output reference to part of gradient vector G corresponding to vector W | Reference |
ySuL | Output reference to work matrix Su*L | Reference |
ySv | Output reference to work matrix Sv | Reference |
yT | Output reference to work matrix T | Reference |
yScuL | Output reference to work matrix Scu*L | Reference |
yScv | Output reference to work matrix Scv | Reference |
yTc | Output reference to work matrix Tc | Reference |
yWORK | Output reference to matrix WORK | Reference |
E | Error indicator | Bool |
[Back to top] [Up] [Next]
2023 © REX Controls s.r.o., www.rexygen.com