1 The Direct Multiple Shooting Approach for Optimal Control Problems
1.3 B OCK ’s Direct Multiple Shooting Method for Optimal Control
Like for the single shooting approach, the basis of multiple shooting can be found in solution methods for BVPs, compare[45, 53, 196]. In the context of OCPs the direct multiple shooting idea goes back to work of HANSGEORGBOCK[46, 201]. It is a hybrid method of the aforemen-
tioned approaches in the sense that it combines the advantages of collocation and direct single shooting. I.e., discretizing the state trajectory allows the incorporation of a priori knowledge of the process via state initialization, while still solving underlying IVPs and, therefore, being able to rely on efficient adaptive solvers[5, 6, 22, 80, 200]. Furthermore, with direct multiple shooting stability of the solution is heavily improved and the influences of nonlinearities are compensated[8]. All numerical computations of OCPs within this thesis are performed using the direct multiple shooting softwareMUSCOD-II. A detailed description of it can be found in [160].
Let us consider the OCPs (1.1) or (1.2), assuming all appearing functions to be twice contin- uously differentiable with respect to the unknowns of the problem. Again we discretize the controls u(·) on a (coarse) time grid to obtain a computationally tractable representation of our original problem. Therefore, let
t0< t1< . . . < tN = tf
be a (not necessarily equidistant) partition of T = [t0, tf] as in (1.14), that we will denote as
the shooting grid{ti} from now on. To keep notations simple, in the following we assume this grid to coincide with the grid induced by the point constraints r(·) as introduced in (1.1e). Of course, all methodological ideas presented now can be derestricted to hold for differing shooting and constraint grids. On each interval [ti, ti+1], 0 ¶ i ¶ N − 1, we use a control
CHAPTER 1 T H E D I R E C T M U L T I P L E S H O O T I N G A P P R O A C H
discretization (1.15), i.e., ui(t) = ϕi(t, qi),
with base functionsϕi:[ti, ti+1]×Rnqi → R that need not be equal for each component of the control trajectory. We require local support of the base functions to ensure separability of the discretized problem. For certain discretization types, e.g., piecewise linear control base func- tions, one may claim continuity of the control trajectory even after discretization. Therefore one has to add continuity conditions on u(·) in all points of the shooting grid {ti}. Obviously, the choice of control discretization typeϕ·(·) directly influences the quality of the approxi- mated solution to the original OCP. More information on that can be found in, e.g.,[138]. Additional to the control discretization that is equivalent to the direct single shooting approach in Section 1.2.3, we use a parameterization of the dynamic and algebraic state trajectories x(·) and z(·) on the shooting grid {ti}. To that end, we introduce auxiliary initial values six ∈ Rnx, sz
i ∈ R
nz, 0 ¶ i ¶ N −1, with sx
0 = x0, s0z= z0to obtain N separated IVPs on the time intervals
[ti, ti+1] ⊂ T , i.e., ˙ xi(t) = f (t, xi(t), zi(t), ϕi(t, qi); p) ∀t ∈ [ti, ti+1], 0 ¶ i ¶ N − 1, (1.17a) 0= g (t, xi(t), zi(t), ϕi(t, qi); p) ∀t ∈ [ti, ti+1], 0 ¶ i ¶ N − 1, (1.17b) xi(t) = six, (1.17c) zi(t) = siz. (1.17d)
As in direct single shooting, this allows to apply sophisticated integrators to obtain the solutions on each time interval, see[5, 6, 23]. We have to assure consistency of the algebraic equations
0= g (t, xi(t), zi(t), ϕi(t, qi); p) ∀t ∈ [ti, ti+1], 0 ¶ i ¶ N − 1. (1.18) Additionally, we have to insert matching conditions as in collocation to ensure continuity of transitions between adjacent intervals, i.e., of the state trajectories x(·) over the entire horizon T,
0= xi(ti+1; ti, six, siz, qi) − six+1, 0 ¶ i ¶ N − 1. (1.19) Therein, the term xi(ti+1; ti, six, siz, qi) denotes the terminal value of the integrated trajectory, i.e., the solution of the IVP (1.17), in the interval[ti, ti+1] when the initial values sx
i , s z i and control values qi are chosen.
The resulting vector of unknowns of the multiple shooting approach for the OCP (1.1) is given by
w = sdef 0x, s0z, q0, . . . , sNx−1, sNz−1, qN−1, sNx, s z
N ∈ R(N+1)nx+(N+1)nz+nq (1.20) The number of unknowns in w can be reduced to the number of unknowns in the single shooting approach by applying condensing techniques. An extensive introduction to that topic can be found in[137, 160].
In the multi-stage case of OCP (1.2) with free transition times tj between adjacent stages an additional time transformation as in (1.8) is necessary for constructing the final NLP. This
T H E D I R E C T M U L T I P L E S H O O T I N G A P P R O A C H CHAPTER 1 t0 tf s0 State x(·) Control u(·) t1 t2 t3 . . . tN−1 q0 q1 q2 q3 qN−2 qN−1 t0 tf s0 State x(·) Control u(·) t1 t2 t3 . . . tN−1 q0 q1 q2 q3 qN−2 qN−1 s1 s2 s3 sN−1 sN sN−2 s1 s2 s3 sN−2 sN−1 sN
Figure 1.3: Illustration of the direct multiple shooting approach for OCPs. The top figure shows the initial situation of the method. An initialization of the shooting nodes is chosen and the matching conditions of the IVPs are possibly violated. The bottom figure then shows a con- verged solution of the resulting NLP with satisfied matching conditions.
requires the reformulation of the DAE description of the state on model stage j, 0 ¶ j ¶ M −1, following dxj dτ(τ) def = hjfj(t(τ, hj), xj(τ), zj(τ), ϕj(τ, qj); p), (1.21a) 0= gj(t(τ, hj), xj(τ), zj(τ), ϕj(τ, qj); p). (1.21b) The multiple shooting idea then is applicable to every model stage j using Nj shooting nodes, resulting in a vector of unknowns per stage that is given by
wj= sdef jx,0, sjz,0, qj,0, . . . , sjx,N j−1, s z j,Nj−1, qj,Nj−1, s x j,Nj, s z j,Nj, hj, (1.22) eventually yielding w = wjdef 0¶ j¶M−1. (1.23)
In both cases (1.1) and (1.2) the objective function is separable, making it computable sep- arately on each corresponding interval and model stage. The path constraint function c(·) is discretized to hold only on the multiple shooting grid{ti}, i.e.,
0 ¶ ci(ti, six, s z
i,ϕi(ti, qi); p), 0 ¶ i ¶ N, (1.24)
where N = PjNj denotes the total number of shooting nodes for discretizing the time hori- zon T . This discretization generally enlarges the feasible set of solutions to the discretized OCP in comparison with the original continuous one. It certainly affects the optimal solution
CHAPTER 1 T H E D I R E C T M U L T I P L E S H O O T I N G A P P R O A C H
in a way such that there may occur constraint violations between grid points. In most appli- cation instances those violations are negligible. If they have a severe influence on the solution or if feasibility is necessary on the entire time horizon T , they might be overcome by choos- ing adapted, finer multiple shooting grids or using semi-infinite programming techniques for tracking constraint violations[203, 204].
The resulting NLP of the direct multiple shooting method after applying the presented ideas reads min sx,sz,q N X i=0 Ei(ti, six, siz, qi; p) (1.25a) s.t. 0= xi(ti+1; ti, six, siz, qi) − six+1, 0 ¶ i ¶ N − 1, (1.25b) 0= gi(ti, six, siz, qi; p), 0 ¶ i ¶ N − 1, (1.25c) 0 ¶ ci(ti, six, s z i,ϕi(ti, qi); p), 0 ¶ i ¶ N , (1.25d) 0 µ ri(ti, six, s z i,ϕi(ti, qi)), 0 ¶ i ¶ N , (1.25e)
where Ei(·) summarizes the separately computed objective function of each interval.
This NLP incorporates more variables than the direct single shooting NLP, but the special structure of this program can be exploited efficiently. This is especially due to the separability of the objective function and the constraints c(·) and r(·) with respect to the unknowns (si, qi), which follows from the control discretization (1.15). Only the matching conditions (1.19) couple unknowns on adjacent shooting nodes.
Eventually, constrained NLP or specially tailored SQP techniques[162] are employed to solve (1.25), including an efficient exploitation of structures in the NLP and the efficient treatment of algebraic terms through relaxations[161]. Therein, the principle of Internal Numerical Dif-
ferentiation (IND)is used to derive the sensitivities of the ODE or DAE solution [5, 6] and a
condensingalgorithm[46, 162] to obtain small dense Quadratic Programs (QPs) that are solved
within each SQP iteration to progress towards the NLP solution. For further details we refer to, e.g.,[5, 73, 84, 137, 160, 161, 162, 230]. Here, we would only like to mention one advantage of the direct multiple shooting approach that will be beneficial for the computations of Chapter 3. Because control functions, constraints, and multiple shooting variables are—preferably— discretized on a common grid, the HESSian of the LAGRANGian L(·) is block-structured for
linearly coupled point constraints (1.1e)/(1.2f). When i 6= j ∇2L(w1, . . . , wN)
∂ wi∂ wj
= 0
holds for the variable vectors wj, j= 0, . . . , M − 1. This allows applying BROYDEN-FLETCHER- GOLDFARB-SHANNO(BFGS) updates to every single multiple shooting block[46]. These high-
rank updatestypically lead to a fast accumulation of higher order information and, thus, to
fast convergence[191].
Alternative methods to the condensing approach include the use of structure-exploiting linear algebra, complementary condensing[139], or nonsmooth NEWTONtechniques[96]
T H E D I R E C T M U L T I P L E S H O O T I N G A P P R O A C H CHAPTER 1
1.4 Summary
In this introductory chapter we defined the classes of OCPs that are crucial for the remain- ing work in thesis. The underlying dynamic processes of the problems are modeled by ODE systems. In particular, we addressed multi-stage OCPs that we will return to in the following chapter.
We surveyed numerical approaches for solving this class of problems. Our method of choice for the remainder of the thesis is the direct multiple shooting method, a state-of-the-art simultane- ous approach for solving optimization and simulation tasks at the same time. Direct multiple shooting combines the advantages of direct single shooting and collocation, creating highly structured NLPs, allowing the use of sophisticated adaptive solvers for the included IVPs, and thus yielding excellent convergence properties.