Main Content

Solve a quadratic programming problem using an interior-point algorithm

Using `mpcInteriorPointSolver`

, you can solve a quadratic
programming (QP) problem using a primal-dual interior-point algorithm with a Mehrotra
predictor-corrector. This function provides access to the built-in Model Predictive Control Toolbox™ interior-point QP solver.

Using an interior-point solver can provide superior performance for large-scale optimization problems, such as MPC applications that enforce constraints over large prediction and control horizons.

This solver is useful for:

Advanced MPC applications that are beyond the scope of Model Predictive Control Toolbox software.

Custom QP applications, including applications that require code generation.

Alternatively, you can also access the built-in active-set QP solver using `mpcActiveSetSolver`

.

`[`

finds an optimal solution `x`

,`exitflag`

]
= mpcInteriorPointSolver(`H`

,`f`

,`A`

,`b`

,`Aeq`

,`beq`

,`x0`

,`options`

)`x`

to a quadratic programming problem
by minimizing the objective function

$$J=\frac{1}{2}{x}^{\u22ba}Hx+{f}^{\u22ba}x$$

subject to inequality constraints $$Ax\le b$$ and equality constraints $${A}_{eq}x={b}_{eq}$$. `exitflag`

indicates the validity of
`x`

.

To determine whether

*H*is positive definite, use the`chol`

function.[~,p] = chol(H);

If

`p`

= 0, then`H`

is positive definite. Otherwise,`p`

is a positive integer.`mpcInteriorPointSolver`

provides access to the interior-point QP solver used by Model Predictive Control Toolbox software. Use this command to solve QP problems in your own custom MPC applications. For an example of a custom MPC application, see Solve Custom MPC Quadratic Programming Problem and Generate Code. This example uses`mpcActiveSetSolver`

, however, the workflow applies to`mpcInteriorPointSolver`

as well.

`mpcInteriorPointSolver`

solves the QP problem using an
interior-point method. For more information, see QP Solvers.

`mpcActiveSetSolver`

| `mpcInteriorPointOptions`

| `quadprog`

(Optimization Toolbox)