Based on these ideas we now derive the real–time iteration scheme as a special SQP method solving a sequence of NLPs differing only in a homotopy parameter that enters the problems via a linear embedding.
4.2.1 Parametric Sequential Quadratic Programming
We start by considering the family of NLPs parameterized by a homotopy parameter τ ∈ R, min
x ,τ f (x, τ) (4.1)
s. t. 0 = g(x, τ), 0¶ h(x,τ),
under the assumptions of chapter 3. The solution points (x?(τ), λ?(τ), µ?(τ)) form a contin- uous and piecewise differentiable curve if they satisfy strong second order conditions for all τ and if certain technical assumptions hold in addition as shown by theorem 4.1.
Theorem 4.1 (Piecewise Differentiability)
Let (x?(0), λ?(0), µ?(0)) be a KKT point of (4.1) such that the strong second order conditions of theorem 3.4 are satisfied. Assume further that the step δdef
= (δx?, δλ?, µ?) obtained from the solution of the Quadratic Program (QP)
min δx 1 2δx TBδx + δxTb (4.2) s. t. 0 = (gxδx )t+ (gx)Txδx , 0 = (hstrongx )t+ (hstrongx )Txδx , 0¶ (hweak x )t+ (hweakx ) T xδx ,
satisfies strict complementarity. Herein B def
= Lx x and b
def
= (Lx)t are both evaluated in the KKT point (x?
(0), λ?(0), µ?(0)) and hstrongand hweak denote the restrictions of h onto the strongly resp. weakly active constraints.
Then there exists " > 0 and a differentiable curve
γ : [0, "] → Rnx× Rng× Rnh, τ 7→ (x?(τ), λ?(τ), µ?(τ))
of KKT points for problem (4.1) in τ ∈ [0, "]. The one–sided derivative γτ(0) of the curve γ in
τ = 0+is given by the QP step δ. 4
Proof Proofs can be found in [51, 96].
Tangential Predictor
We now consider the family (4.1) of NLPs including the additional constraint
τ− ˆτ = 0 (4.3)
that fixes the free homotopy parameter to a prescribed value ˆτ ∈ R. The addition of this constraint to problem (4.1) allows for a transition between two subsequent NLPs of the para- metric family (4.1) for different values of the homotopy parameter τ. Derivatives with respect to τ are computed for the setup of the QP subproblem, such that a first order approximation of the solution manifold is provided already by the first SQP iterate.
Theorem 4.2 (Exact Hessian SQP First Order Predictor)
Let (x?
(0), λ?(0), µ?(0)) be a KKT point of problem (4.3) in ˆτ = 0 that satisfies theorem 3.4. Then the first step towards the solution of (4.3) in ˆτ > 0 sufficiently small, computed by a full step exact Hessian SQP method starting in the KKT point, equals ˆτγτ(0). 4
Proof A proof can be found in [51].
Due to its linearity, the additional embedding constraint (4.3) will already be satisfied after the first SQP iteration. The additional Lagrange multiplier introduced in the QP for this constraint does not play a role as the Hessian of the Lagrangian is unaffected.
Parametric Quadratic Programming
The change in ˆτ is assumed to be sufficiently small in theorem 4.2 in order to ensure that the active set of the first SQP subproblem is identical to that of the solution point x?(0). Under this assumption theorem 4.2 holds even for points x?(0) in which the active set changes. In practice, active set changes will occur anywhere on the homotopy path from one homotopy parameter τ0 to another τ1, and this situation is best addressed by parametric QP methods. The approach here in to compute the first order predictor (δx?(τ
1), δλ?(τ1), δµ?(τ1)) by solving the parametric QP on τ ∈ [0, 1] ⊂ R for its solution in τ = 1,
min δx 1 2δxTB(τ)δx + δxTb(τ) (4.4) s. t. 0 = gx(τ)δx + g (τ), 0¶ hx(τ)δx + h(τ),
and initializing the solution process with the known solution (δx?(τ
0), δλ?(τ0), δµ?(τ0)) = (0, 0, 0) in τ = 0. The predictor of theorem 4.2 can then be understood as the initial piece of a piecewise affine linear homotopy path that potentially crosses multiple active set changes. This approach has been investigated for Linear Model Predictive Control (LMPC) in e.g. [67, 69]. We consider properties of Parametric Quadratic Programs (PQPs) and an active set method for their efficient solution in chapter 6 after the implications of our mixed–integer convexification and relaxation approach for the structure of these PQPs has been investigated in chapter 5.
4.2.2 Initial Value Embedding
We have seen from theorem 4.2 that the first iterate of the exact Hessian SQP method con- sistutes a first order tangential predictor of the solution of an NLP given an initializer in the neighborhood. The augmented problem formulation (4.3) was used for this purpose. In our setting of real–time optimal control, the parametric variable is the initial process state skthat is fixed to the measured or estimated actual process state x0(tk) by a trivial linear equality constraint. For the direct multiple shooting discretization (1.28) this initial value embedding for problem P(t0) reads
min s,q m X i=0 li(ti, si, qi) (4.5) s. t. 0 = xi(ti+1; ti, si, qi) − si+1, 0¶ i ¶ m − 1, 0 = rieq(ti, si, bi(ti, qi)), 0¶ i ¶ m, 0¶ rin i (ti, si, bi(ti, qi)), 0¶ i ¶ m, 0¶ ci(ti, si, bi(ti, qi)), 0¶ i ¶ m, 0 = s0− x0(t0). Given an optimal solution (s?(x
0(tk)), q?(x0(tk))) to the discretized optimal control problem P(tk) for the process state x
0(tk), the first full step computed by the exact Hessian SQP method for the neighboring problem with new embedded initial value x0(tk+1) is a first order predictor of that NLP’s solution.
4.2.3 Moving Horizons
So far we have assumed that an initializer (s0, q0, . . . , sm−1, qm−1, sm) required for the first iteration of the SQP algorithm on the multiple shooting discretization of the current problem is available. Depending on the characteristics of the problem instance under investigation, different strategies for obtaining an initializer from the previous real–time iteration’s solu- tion can be designed. In the context of real–time optimal control we are usually interested in moving prediction horizons that aim to approximate an infinite prediction horizon in a com- putationally tractable way. Consequentially, the optimal control problems of the sequence can be assumed to all have the same horizon length m and differ only in the embedded initial value x0(t) at sampling time t. Strategies for this case and also the case of shrinking horizons can be found in [51].
Shift Strategy
The principle of optimality can be assumed to hold approximately also for the finite horizon if that horizon is chosen long enough such that the remaining costs can be safely neglected, e.g. because the controlled process has reached its desired state already inside the finite horizon. This is the motivation for the following shift strategy which uses the primal iterate
vk= (s
0, q0, . . . , sm−1, qm−1, sm),
the outcome of the first SQP iteration for the NLP with embedded initial value x0(tk) or equivalently the outcome of the k-th iteration of the real–time iteration scheme, to initialize the next iteration with vk+1as follows,
vk+1def
= (s1, q1, . . . , sm−1, qm−1, sm, qm−1new, smnew). The new state and control values qnew
m−1 and smnewcan be chosen according to different strate- gies.
1. An obvious choice is qm−1new = qm−1 and smnew = sm. The only infeasibility introduced