The second way of solving (3.1) is to keep and optimize all variables: ∆s and ∆u, i.e. avoid the aforementioned condensing procedure. This leaves far more variables in the problem. However, compared to the condensed, dense QP (3.9), the problem described in (3.1) is highly structured. This structure can be exploited to yield a computational complexity of O N(nx+nu)3, i.e. linear
in number of intervals N, but cubic in number of states and controls. On the other side, in the nonlinear MPC condensing based approach is free of
O(n3
x)computations at the cost of increased complexity in number of intervals
–O(N3)– because of the factorization of reduced Hessian. In the MHE, the
partial condensing suffers fromO(n3
x)computations as well, unfortunately.
Interior point methods can significantly reduce the execution time of the QP solution, and consequently execution time of an RTI, for long prediction horizons compared to the condensing based approaches. The exploration of this banded structure in the solution of nonlinear control problems was first proposed in [4] and for linear MPC in [5].
As for the active-set solvers, the primal barrier interior point methods might require an expensive Phase I procedure to obtain a feasible initial guess. One of the successful fast implementations for linear MPC based on primal barrier
method is presented in [97]. On the other hand, the primal-dual interior methods (IPMs) do not require expensive Phase I procedure and showed to be successful in practice [49]. A structure exploiting QP solver for linear MPC based on Mehrotra’s [98] primal-dual IPM is presented in [5]. Following the ideas from that paper, more optimized implementations for embedded MPC-like QPs are derived [99, 100].
The sparse QP (3.1) can be cast in the following general QP form: min w 1 2w0Hw+g0w, (3.57a) s.t. Fw=be, (3.57b) Cw≤bi, (3.57c)
with stacked stage variables w = [w00, w01, . . . , w0N]0. The stage variables are
defined as wk = [∆s0k, ∆u0k]0, k = 0, . . . , N−1 and wN = ∆sN. In the primal-
dual IPMs, the inequality constraints (3.57c) are relaxed with slack variables t:
Cw+t=bi, t≥0,
where t is the vector of slack variables t= [t0
0, t01, . . . , t0N]0. The KKT conditions
for the relaxed QP can be put in the compact form Hw+F0λ+C0µ+g −Fw+be −Cw−t+bi hµ, ti =0, with µ≥0, t≥0. (3.58) Therein, the vectors of the Lagrangian multipliers are denoted as λ = [λ00, λ01, . . . , λ0N−1]0, µ= [µ00, µ01, . . . , µ0N]0and .
The KKT system (3.58) is typically solved with a Newton-like algorithm. The algorithm generates a sequence of iterates where the search direction is
STRUCTURE EXPLOITING INTERIOR POINT METHOD SOLVERS 71 computed as H F0 C0 −F −C −I Dt Dµ ∆w ∆λ ∆µ ∆t = rH rF rC rt | {z } r , (3.59)
where Dµ = diag(µ)and Dt = diag(t). The vector of residuals r is specific
for a particular IPM implementation [49, 47]. Elimination of ∆t followed by elimination of ∆µ yields a reduced system
H + C0DµD−1t C F0 −F ∆w ∆λ = rH− C0Dt−1(Dµrc+rt) rF . (3.60) Given the block diagonal structure ofHand the special block structure of the
matrixC, the upper left block in the coefficient matrix in (3.60) retains the same
block structure as the matrixH. Another way around, the reduced system (3.60)
has exactly the same structure as an unconstrained QP, e.g. the sparse QP (3.1) without the inequality constraints. In [5] it is shown that with suitable grouping of ∆wkand ∆λk, e.g. ξ= [∆λ00, ∆w00, ∆λ01, ∆ . . . , ∆w0N]0, the reduced system can
be cast in a symmetric block tri-diagonal form where the coefficient matrix reads I I Q˜0 ˜S0 −A00 ∗ ˜R0 −B00 ∗ ∗ ... I I Q˜N . (3.61)
Such a system can be efficiently solved by a discrete Riccati-like recursion. Efficient implementations for factorization of the block tri-diagonal matrices exhibitsO(N(nx+nu)3)complexity. We refer for implementation details in
the MPC context to [5], and to [33] for implementation details related to an MHE solver. Let us observe briefly that the sub-problem (3.60) is always of the same structure and dimensions for one particular sparse QP (3.1) during the whole iteration process. An equality constrained QP (3.3) that is a sub-problem in the active-set methods is always changing the structure as constraints and bounds are (re)moved from the working set. For a software implementation
it means that for a particular inequality constrained QP, only one subroutine needs to be coded. This makes the reduced system particularly interesting for extreme software optimizations for embedded (linear) MPC, as explored in [96, 100, 101, 102].
An alternative approach to solution of (3.58) further reduces (3.60) applying the Schur complement for the zero block in the coefficient matrix [97, 99]. The approach yields the further reduced system with a block tri-diagonal coefficient matrix. The linear system can be solved with Riccati-like recursion at the same complexity – O(N(nx+nu)3). On the linear algebra level, this
approach allows for better structure exploitation and code optimizations than original implementation [5]. In particular, in [99] is studied how implementation can be optimized based on the sparsity of the weighting matrices and type of constraints involved in an OCP.
Unlike the active-set QP solvers, the interior-point methods show limited capabilities for warm-starting from which the MPC applications might profit. Warm-staring strategies for fast MPC exist and for more details on this topic we refer to [103, 104]. In practice, IPMs in general need much less iterations than active-set solvers and the number of iterations is independent of the number of active constraints. However, one IPM iteration of a structure exploiting QP solver for MPC is in general more costly than one iteration of a dense active-set solver employed to solve the condensed QP. An advantage that is attractive from purely theoretical point of view is the polynomial complexity in number of iterations of the IPMs. In contrast, the theoretical worst-case complexity for the active-set methods is exponential.