100% found this document useful (2 votes)
260 views380 pages

Fast Numerical Methods For Mixed-Integer Nonlinear Model-Predictive Control

Método numérico para resolver ecuaciones no lineales mixtas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
100% found this document useful (2 votes)
260 views380 pages

Fast Numerical Methods For Mixed-Integer Nonlinear Model-Predictive Control

Método numérico para resolver ecuaciones no lineales mixtas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 380

Christian Kirches

Fast Numerical Methods for Mixed-Integer


Nonlinear Model-Predictive Control
VIEWEG+TEUBNER RESEARCH
Advances in Numerical Mathematics
Herausgeber | Editors:
Prof. Dr. Dr. h. c. Hans Georg Bock
Prof. Dr. Dr. h. c. Wolfgang Hackbusch
Prof. Mitchell Luskin
Prof. Dr. Dr. h. c. Rolf Rannacher
Christian Kirches

Fast Numerical Methods


for Mixed-Integer Nonlinear
Model-Predictive Control

VIEWEG+TEUBNER RESEARCH
Bibliographic information published by the Deutsche Nationalbibliothek
The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie;
detailed bibliographic data are available in the Internet at http://dnb.d-nb.de.

Dissertation Heidelberg University, 2010

1st Edition 2011

All rights reserved


© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
Editorial Office: Ute Wrasmann | Anita Wilke
Vieweg+Teubner Verlag is a brand of Springer Fachmedien.
Springer Fachmedien is part of Springer Science+Business Media.
www.viewegteubner.de

No part of this publication may be reproduced, stored in a retrieval system


or transmitted, in any form or by any means, electronic, mechanical, pho-
tocopying, recording, or otherwise, without the prior written permission of
the copyright holder.

Registered and/or industrial names, trade names, trade descriptions etc. cited in this publica-
tion are part of the law for trade-mark protection and may not be used free in any form or by
any means even if this is not specifically marked.

Cover design: KünkelLopka Medienentwicklung, Heidelberg


Printed on acid-free paper
Printed in Germany

ISBN 978-3-8348-1572-9
Acknowledgments

„Aber in der Beschäftigung selbst Vergnügen finden


— dies ist das Geheimnis des Glücklichen!“

Sophie Mereau

This work was presented to the combined faculty for mathematics and
natural sciences of Heidelberg University as a doctoral thesis in mathemat-
ics on July 23rd , 2010, and was successfully defended on November 2nd .

My deeply felt gratitude for their excellent support goes to my teachers


and mentors Professor Dr. Dr. h.c. Hans Georg Bock and Professor Dr. Ger-
hard Reinelt, as well as Dr. Sebastian Sager and Dr. Johannes P. Schlöder.
Their extensive knowledge laid the essential foundation for this thesis. With
their warm and open–minded spirit and the friendly and cooperative atmo-
sphere they maintain in their research groups, they made my work in the
past three years a pleasure.

Many members of the work group Simulation and Optimization as well


as the junior research group Mathematical and Computational Optimization
have made significant contributions to the creation and success of this work.
Among them, it is my desire to say a special thank you to Jan Albersmeyer,
Dörte Beigel, Chris Hoffmann, Andreas Potschka and Leo Wirsching. Over
countless cups of coffee they gave many and much needed inspirations and
contributed to the progress of this work during many discussions. Without
you, it wouldn’t have been even half the fun, but certainly twice the time.
Moreover, I would like to point out Alexander Buchner and Florian Kehrle,
who both made most valuable contributions during their diploma theses.

For their support in proof–reading of this thesis I owe thanks to Sebastian


Sager and Johannes Schlöder. For any remaining errors I assume the sole
reponsibility. I cordially thank Margret Rothfuss and Thomas Klöpfer for
their valuable support with all organisational and technical issues.
vi Acknowledgments

Financial support by Heidelberg University, the Steinbeis–Transferzen-


trum 582 „Simulation und Optimierung“, the DFG Graduate School 220
“Heidelberg Graduate School of Mathematical and Computational Methods
for the Sciences”, and the 7. Framework Programme of the European Union
under contract no FP7-ICT-2009-4 248940 is gratefully acknowledged.

To my parents Claus and Ulrike, my brother Michael and my sister Anja


I wish to say a big thank you for your love and support throughout.

My final lines go to my girlfriend Simone Evke. Thank you for your love,
for your patience and support whenever my mind was entangled in upper
and lower triangles, and for every plan for the future we made up together.

Christian Kirches
Abstract

This work aims at the investigation and development of fast numerical meth-
ods for nonlinear mixed–integer optimal control and model–predictive con-
trol problems. A new algorithm is developed based on the direct multiple
shooting method for optimal control and on the idea of real–time itera-
tions, and using a convex reformulation and relaxation of dynamics and
constraints of the original predictive control problem. This algorithm relies
on theoretical results and is based on a nonconvex Sequential Quadratic
Programming method and a new active set method for nonconvex paramet-
ric quadratic programming. It achieves real–time capable control feedback
though block structured linear algebra for which we develop new matrix
updates techniques. The applicability of the developed methods is demon-
strated on several applications.

This thesis presents novel results and advances over previously estab-
lished techniques in a number of areas as follows:
• We develop a new algorithm for mixed–integer nonlinear model–
predictive control. It consists of a combination of Bock’s direct multi-
ple shooting method, a reformulation based on partial outer convexifi-
cation and relaxation of the integer controls, a rounding scheme, and
a real–time iteration scheme.
• For this new algorithm we establish an interpretation in the frame-
work of inexact Newton–type methods and give a proof of local con-
tractivity assuming an upper bound on the sampling time, implying
nominal stability of this new algorithm.
• We propose a convexification of path constraints directly depending
on integer controls that guarantees feasibility after rounding, and in-
vestigate the properties of the obtained nonlinear programs. We show
that these programs can be treated favorably as Mathematical Pro-
gram with Vanishing Constraints, a young and challenging class of
nonconvex problems.
• We describe a Sequential Quadratic Programming method and de-
velop a new parametric active set method for the arising nonconvex
viii Abstract

quadratic subproblems. This method is based on strong stationarity


conditions for Mathematical Program with Vanishing Constraints un-
der certain regularity assumptions. We further present a heuristic for
improving stationary points of the nonconvex quadratic subproblems
to global optimality.
• The mixed–integer control feedback delay is determined by the com-
putational demand of our active set method. We describe a block
structured factorization that is tailored to Bock’s direct multiple
shooting method. It has favorable run time complexity for problems
with long horizons or many controls unknowns, as is the case for
mixed–integer optimal control problems after outer convexification.
• We develop new matrix update techniques for this factorization that
reduce the run time complexity of all but the first active set iteration
by one order.
• All developed algorithms are implemented in a software package that
allows for the generic, efficient solution of nonlinear mixed–integer
optimal control and model–predictive control problems using the de-
veloped methods.
Contents

Figures, Tables, and Acronyms xiii

0 Introduction 1

1 The Direct Multiple Shooting Method for Optimal Control 13


1.1 Problem Formulations . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.2 Solution Methods for Optimal Control Problems . . . . . . . . 18
1.3 The Direct Multiple Shooting Method for Optimal Control . . 24
1.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

2 Mixed–Integer Optimal Control 31


2.1 Problem Formulations . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.2 Mixed–Integer Nonlinear Programming . . . . . . . . . . . . . . 32
2.3 Outer Convexification and Relaxation . . . . . . . . . . . . . . . 41
2.4 Rounding Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.5 Switch Costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

3 Constrained Nonlinear Programming 61


3.1 Constrained Nonlinear Programming . . . . . . . . . . . . . . . 61
3.2 Sequential Quadratic Programming . . . . . . . . . . . . . . . . 66
3.3 Derivative Generation . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.4 Initial Value Problems and Sensitivity Generation . . . . . . . 80
3.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

4 Mixed–Integer Real–Time Iterations 89


4.1 Real–Time Optimal Control . . . . . . . . . . . . . . . . . . . . . 89
4.2 The Real–Time Iteration Scheme . . . . . . . . . . . . . . . . . . 92
4.3 Contractivity of Real–Time Iterations . . . . . . . . . . . . . . . 99
x Contents

4.4 Mixed–Integer Model Predictive Control . . . . . . . . . . . . . 103


4.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

5 Outer Convexification of Constraints 117


5.1 Constraints Depending on Integer Controls . . . . . . . . . . . 117
5.2 Lack of Constraint Qualification . . . . . . . . . . . . . . . . . . 120
5.3 Mathematical Programs with Vanishing Constraints . . . . . . 127
5.4 An MPVC Lagrangian Framework . . . . . . . . . . . . . . . . . 131
5.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

6 A Nonconvex Parametric SQP Method 141


6.1 SQP for Nonconvex Programs . . . . . . . . . . . . . . . . . . . . 141
6.2 Parametric Quadratic Programs . . . . . . . . . . . . . . . . . . 148
6.3 A Primal–Dual Parametric Active Set Strategy . . . . . . . . . 151
6.4 Parametric Quadratic Programming for Nonconvex Problems 163
6.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

7 Linear Algebra for Block Structured QPs 175


7.1 Block Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
7.2 Survey of Existing Methods . . . . . . . . . . . . . . . . . . . . . 179
7.3 A Factorization for Structured KKT Systems with Many Con-
trols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
7.4 Properties and Extensions . . . . . . . . . . . . . . . . . . . . . . 195
7.5 Computational Complexity . . . . . . . . . . . . . . . . . . . . . . 200
7.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

8 Updates for the Block Structured Factorization 205


8.1 Matrix Updates Overview . . . . . . . . . . . . . . . . . . . . . . 205
8.2 Updating the Block Local Reductions . . . . . . . . . . . . . . . 211
8.3 Modifying the Block Tridiagonal Factorization . . . . . . . . . 229
8.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

9 Numerical Results 237


9.1 Mixed–Integer Optimal Control with Switch Costs . . . . . . . 238
9.2 Mixed–Integer NMPC Scheme Contractivity . . . . . . . . . . . 249
9.3 OCPs and NLPs with Vanishing Constraints . . . . . . . . . . . 263
9.4 Block Structured Factorization and Updates . . . . . . . . . . . 274
9.5 Application: A Predictive Cruise Controller . . . . . . . . . . . 289

A Implementation 321
Contents xi

A.1 Multiple–Shooting Real–Time Online Optimization Method . 321


A.2 Block Structured Parametric Quadratic Programming Code . 340

Bibliography 347
List of Figures

1.1 Illustration of the direct single shooting discretization. . . . . 22


1.2 Illustration of the direct multiple shooting discretization. . . 27

2.1 Inner and outer convexification. . . . . . . . . . . . . . . . . . . 40


2.2 Relation of the four auxiliary problems. . . . . . . . . . . . . . . 44
2.3 Sum–up rounding minimizing the integral deviation. . . . . . 53
2.4 Convex reformulation of the switch cost constraint. . . . . . . 58

3.1 Butcher tableau of the classical 4th order explicit RK method. 82

4.1 Schematic of idealized real–time optimal control. . . . . . . . 90


4.2 Schematic of the conventional NMPC approach. . . . . . . . . 91
4.3 Schematic of the real–time iteration approach. . . . . . . . . . 92
4.4 Schematic of the mixed–integer real–time iteration approach. 104

5.1 Condition number for a vanishing constraint and bound. . . . 124


5.2 Infeasible and suboptimal SQP steps. . . . . . . . . . . . . . . . 125
5.3 Feasible sets obtained by linearization in a feasible iterate. . 126
5.4 Feasible sets obtained by linearization in an infeasible iterate. 127
5.5 Feasible sets of various reformulations of an MPVC. . . . . . . 131
5.6 Index sets for a vanishing constraint. . . . . . . . . . . . . . . . 132
5.7 Areas of violation of constraint qualifications. . . . . . . . . . . 137

6.1 Locally and globally optimal points of a convex QPVC. . . . . 147


6.2 The piecewise affine homotopy path. . . . . . . . . . . . . . . . 155
6.3 Active set rules for MPVC strong stationarity. . . . . . . . . . . 168
6.4 Active set rules with global optimality heuristic. . . . . . . . . 169

7.1 Dynamic programming view of the HPSC factorization. . . . . 200

9.1 Relaxed optimal solutions of problem (9.2). . . . . . . . . . . . 241


xiv List of Figures

9.2 SUR-0.5 solutions of problem (9.2). . . . . . . . . . . . . . . . . 242


9.3 Switch cost penalizing optimal solutions of problem (9.3). . . 247
9.4 Switch cost constraining optimal solutions of problem (9.3). 248
9.5 Relaxed optimal solution for problem (9.4). . . . . . . . . . . . 250
9.6 Vector fields showing steady states of problem (9.4). . . . . . 250
9.7 Sum–up rounding integer solution for problem (9.6). . . . . . 253
9.8 Maximal underestimators of κ and ω for example (9.6). . . . 254
9.9 Components of the κ–condition term for example (9.4). . . . . 255
9.10 Contracting mixed–integer RTI for example (9.6), δt = 0.05s. 256
9.11 Contracting mixed–integer RTI for example (9.6). . . . . . . . 260
9.12 Mixed–integer RTI failing to control example (9.6). . . . . . . 261
9.13 Phase space diagrams of mixed–integer RTI for problem (9.6). 262
9.14 Phase space diagrams of mixed–integer RTI for problem (9.6). 262
9.15 Schematic of a single robot with states and controls. . . . . . 263
9.16 Predefined paths to be completed by the swarm of ten robots. 264
9.17 Snapshots of the optimal solution to problem (9.10). . . . . . 267
9.18 Coordinates and forces in the single-track vehicle model. . . 274
9.19 Double–lane change maneuvre. . . . . . . . . . . . . . . . . . . . 279
9.20 Optimal solutions of problem (9.33) for m = 20 and m = 160. 281
9.21 Average per–iteration QP runtimes for problem (9.33). . . . . 286
9.22 Exemplary nonlinear truck engine characteristics. . . . . . . . 295
9.23 Exemplary real–world 3D map data describing road conditions. 296
9.24 Convexifications of the indicated engine torque constraint. . 302
9.25 Feasible sets of the vanishing constraints for the truck model. 303
9.26 Schematic of the nonconvex feasible set for the vehicle velocity. 303
9.27 Optimal engine torque and gear choice on a sloped road. . . 306
9.28 Optimal engine torque and gear choice on speed limited road. 307
9.29 Compensatory effect after inner convexification. . . . . . . . . 308
9.30 Results for the predictive cruise controller problem. . . . . . 313
9.31 Details of figure 9.30 for a section of 6 kilometers length. . . 314
9.32 Results for the predictive cruise controller problem. . . . . . 317
9.33 QPVC iterations required to compute the control feedback. . 318

A.1 Modular architecture of the software MuShROOM. . . . . . . . . 322


A.2 Input and output files of the MuShROOM software. . . . . . . . . 323
A.3 An exemplary MuShROOM problem description in MATLAB. . . 330
A.5 An exemplary MuShROOM C model file. . . . . . . . . . . . . . . . 331
A.7 Output of the command line interface to MuShROOM. . . . . . . 334
A.8 An exemplary NMPC loop using the C interface to MuShROOM. 339
List of Figures xv

A.9 Control flow of the QP solver module qpHPSC. . . . . . . . . . . 342


A.10 Output of some exemplary active set iterations by qpHPSC. . . 343
List of Tables

2.1 Optimal solutions for the convex switch cost reformulation. . 59

6.1 Possible active set exchanges for QPVCs. . . . . . . . . . . . . . 172

7.1 FLOP counts for the HPSC factorization. . . . . . . . . . . . . . 201


7.2 FLOP counts per shooting node for the HPSC backsolve. . . . 202
7.3 Active–set dependent FLOP counts for the HPSC backsolve. . 203
7.4 Memory requirements of the HPSC factorization. . . . . . . . 203

9.1 Objective function values and infeasibilities for problem (9.2). 240
9.2 Solutions for problem (9.3) limiting the number of switches. 245
9.3 Solutions for problem (9.3) penalizing the number of switches. 246
9.4 Objectives and infeasibilities for problem (9.6) after SUR-0.5. 252
9.5 Upper bounds on δt for example (9.6). . . . . . . . . . . . . . . 257
9.6 Variables of the robot path coordination NLP problem. . . . . 265
9.7 Solutions for the NLP formulation (9.10) obtained with IPOPT. 269
9.8 Solutions for problem (9.14) obtained with MuShROOM. . . . . . 272
9.9 Controls used in the single–track vehicle model. . . . . . . . . 275
9.10 Coordinates and states used in the single–track vehicle model. 276
9.11 Parameters used in the single–track vehicle model. . . . . . . 278
9.12 Optimal solutions of problem (9.33). . . . . . . . . . . . . . . . . 282
9.13 Properties of the uncondensed QPs for problem (9.33). . . . . 284
9.14 Properties of the condensed QPs for problem (9.33). . . . . . 285
9.15 Average per–iteration QP solver runtime for problem (9.33). 287
9.16 Controls of the truck model. . . . . . . . . . . . . . . . . . . . . . 291
9.17 Differential states of the truck model. . . . . . . . . . . . . . . . 292
9.18 Parameters of the truck model. . . . . . . . . . . . . . . . . . . . 294

A.1 Available algorithmic variants for modules of MuShROOM. . . . 322


A.2 Algorithmic settings in the MATLAB model description file. . 326
xviii List of Tables

A.3 Data fields of the MATLAB model description file. . . . . . . . 327


A.4 Call arguments of the routine setModelFunction. . . . . . . . 328
A.5 Fields of the model function call arguments structure. . . . . 329
A.6 Valid input and output fields in the arguments structure. . . . 329
A.7 Possible return codes of a model function. . . . . . . . . . . . . 332
A.8 MuShROOM command line switches. . . . . . . . . . . . . . . . . . 333
A.9 Columns of the textual output provided by MuShROOM. . . . . . 334
A.10 Functions of the C interface to the MuShROOM software. . . . . 335
A.12 Static model description structure. . . . . . . . . . . . . . . . . 337
A.13 Iteration data structure. . . . . . . . . . . . . . . . . . . . . . . . 337
A.15 Main data structures of the block structured QPVC solver. . . 341
A.17 Columns of the per–iteration textual output of the qpHPSC code. 344
A.18 Functions of the C interface to the code qpHPSC. . . . . . . . . 344
A.19 Available KKT solvers for the block structured KKT system. . 345
List of Acronyms

ACQ Abadie Constraint Qualification


BDF Backward Differentiation Formula
BFGS Broyden–Fletcher–Goldfarb–Shanno
BVP Boundary Value Problem
CQ Constraint Qualification
DAE Differential Algebraic Equation
DFP Davidon–Fletcher–Powell
END External Numerical Differentiation
EQP Equality Constrained Quadratic Program
FLOP Floating–Point Operation
GCQ Guignard Constraint Qualification
HPSC Hessian Projection Schur Complement
IND Internal Numerical Differentiation
IVP Initial Value Problem
KKT Karush–Kuhn–Tucker
LICQ Linear Independence Constraint Qualification
LLSCC Lower Level Strict Complementarity Condition
LMPC Linear Model Predictive Control
LP Linear Program
MFCQ Mangasarian–Fromovitz Constraint Qualification
MILP Mixed–Integer Linear Program
MINLP Mixed–Integer Nonlinear Program
MIOC Mixed–Integer Optimal Control
MIOCP Mixed–Integer Optimal Control Problem
MIQP Mixed–Integer Quadratic Program
MPBVP Multi–Point Boundary Value Problem
MPC Model Predictive Control
MPCC Mathematical Program with Complementarity Constraints
MPEC Mathematical Program with Equilibrium Constraints
MPVC Mathematical Program with Vanishing Constraints
NLP Nonlinear Program
NMPC Nonlinear Model Predictive Control
OCP Optimal Control Problem
xx List of Acronyms

ODE Ordinary Differential Equation


PQP Parametric Quadratic Program
QP Quadratic Program
QPVC Quadratic Program with Vanishing Constraints
RTI Real–Time Iteration
SOS Special Ordered Set
SQP Sequential Quadratic Programming
0 Introduction

A dynamic process in the spirit of this work is a naturally occurring or specif-


ically designed phenomenon whose properties, varying in time, can be ob-
served, measured, and affected by external manipulation. It is an old and
natural question to then ask for a description of the special way in which
such a process should be affected in order to serve an intended purpose.
The development and availability of mathematical methods for the simula-
tion and optimization of dynamic processes has had an enormous impact
on our lives in the past that until today continues to rise. An ever growing
number of increasingly complex dynamic processes from various scientific
disciplines such as biology, chemistry, economy, engineering, and physics
can be simulated and optimized for various criteria.

Certain features of a dynamic process however make this optimization


task harder to conduct from a mathematical and computational point of
view. One such feature is the presence of controls that may attain one of
an only finite selection of different values. One may think here of a simple
switch that either enables or disables a certain part or property of the dy-
namic process. As long as this process is running, the decision on whether to
turn this switch on or off can obviously be made afresh at every instant. The
question we ask here is this: How to operate this switch in a way that allows
the dynamic process to achieve a certain prescribed goal, without violating
certain other prescribed constraints? Certainly, even if we limit the number
of times the switch may be operated, there are a great many of different
possibilities to consider and it is in general all but clear what an optimal an-
swer might look like. Moreover, we may find ourselves in a hurry to decide
on a switching strategy as the process keeps running while we ponder on
this question. A late decision may prevent the process from reaching the de-
sired goal. Worse yet, the process may violate critical constraints relevant
to our safety.

This doctoral thesis in applied mathematics is meant to be understood as


one new step towards real–time optimal control of dynamic processes that
can be affected by both continuous and discrete controls.

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8_1,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
2 0 Introduction

Optimal Control

The optimization of dynamic processes that are in our case described by


systems of Ordinary Differential Equations (ODEs) or Differential Algebraic
Equations (DAEs) is referred to as the discipline of optimal control. For
the numerical solution of optimal control problems, direct methods and in
particular simultaneous or all–at–once methods have emerged as the meth-
ods of choice for most practical applications [27, 112]. Amongst them, di-
rect collocation methods [10, 26, 101] and direct multiple shooting methods
[36, 134, 167] are the most prominent ones. Using a discretization of the
infinite–dimensional control space by a finite number of control parame-
ters, these methods transform the optimal control problem into a large and
possibly structured Nonlinear Program (NLP). Efficient numerical methods
are based on the exploitation of this structure, see chapter 7 of this the-
sis. We refer to e.g. [134] for Sequential Quadratic Programming (SQP)
type active set methods [100, 170] and e.g. [27] for interior point methods
[91, 113, 155].

Model–Predictive Control

The idea of Model Predictive Control (MPC) is to determine an optimal con-


trol at time instant t 0 by solving an optimal control problem on a prediction
horizon [t 0 , t 0 + h]. The solution of this problem depends on an observation
or estimate of the actual mode of operation of the physical process. It yields
optimal values for the process controls that are fed back to the physical pro-
cess for a short time δt . Meanwhile, a new optimal control problem is solved
for the next prediction horizon [t 0 + δt, t 0 + δt + h] that moved forward in
time by δt . Continuous repetition of this scheme amounts to solving under
real–time conditions a sequence of optimal control problems on a moving
horizon, based on varying process observations. This opens up the possibil-
ity of reacting to disturbances and unforeseen changes in the behavior of
the physical process.

Linear MPC has over the past decades matured to widespread applicabil-
ity in a large number of industrial scenarios. See for example the reviews
[77], [171] and the overviews found in [7], [46], [177] and [217]. It is fre-
quently the case that nonlinear models, derived from first principles such
as fundamental physical, mechanical, or chemical laws, lead to more ac-
curate models of the actual process under consideration. Overviews over
Introduction 3

theoretical investigation of Nonlinear Model Predictive Control (NMPC)


can be found in [8, 152, 178] and overview over nonlinear applications
in [147, 171]. The computational speed and reliability of algorithms for
NMPC has seen considerable improvement by major algorithmic develop-
ments found e.g. in [51, 52] for SQP type methods, later transferred to inte-
rior point methods in e.g. [224].

Mixed–Integer Optimal Control

Process controls with a finite number of admissible values arise naturally in


a large number of relevant applications. Immediately obvious examples are
valves in chemical plants that can either be open or closed, gear shifts in
vehicles that select between several available transmission ratios, or design
and operational alternatives, e.g. choosing a vessel or tray to fill or deplete.
Here, a large potential for optimization is found as the combinatorial na-
ture of the problem frequently eludes engineering intuition, and the vast
number of possible modes of operation is hard to explore in an exhaustive
way. The discipline of Mixed–Integer Optimal Control (MIOC), also referred
to as mixed–logic dynamic optimization or hybrid optimal control by differ-
ent authors, addresses optimal control problems of this structure. A first
application, namely the optimal choice of discrete acceleration in a subway
train, has already been considered in the early eighties [35]. Applications in
chemical operations research are ample, see [40, 94, 161, 183, 185, 195],
and for vehicle control problems we refer to e.g. [80, 103, 122, 209]. Mixed–
integer control problems in biology can be found e.g. in [130, 183, 196].

Mixed–Integer Programming

Algorithmic approaches differentiate between state dependent i.e., implic-


itly defined discrete decisions, also referred to as implicit switches, and
explicitly controllable switches which in the following are referred to as bi-
nary or integer controls. Algorithms and applications for state dependent
switches can be found e.g. in [40, 60, 118, 156, 208].

Several authors are concerned with Mathematical Program with Com-


plementarity Constraints (MPCC) or Mathematical Program with Equi-
librium Constraints (MPEC) reformulations of time–invariant discrete de-
cisions in optimization and optimal control problems. We refer to e.g.
4 0 Introduction

[16, 173, 174, 193] for problem formulations, numerical methods, and ap-
plications.

We will in the following be exclusively concerned with explicitly control-


lable switches, i.e., binary or integer valued control functions that may
vary over time. One way of approaching Mixed–Integer Optimal Control
Problems (MIOCPs) is to apply a direct, simultaneous method in order
to obtain a discretized counterpart, a Mixed–Integer Nonlinear Program
(MINLP). The class of MINLPs has been proven N P –hard [78]. Hence, as-
suming P = N P , there exist MINLP instances that cannot be solved on a
deterministic machine in polynomial time. In addition, the high accuracy re-
quired for many problems may potentially require a fine control discretiza-
tion, leading to a large number of binary or integer variables in the resulting
MINLP, thus adding to its difficulty and increasing the computational effort
required to find a solution. Several authors have solved MIOC problems
by branching techniques [80], dynamic programming [42, 103], relaxation
and penalization [179], or optimization of switching times [81]. Progress to-
wards the efficient solution of MIOCPs has been made recently by a convex-
ification and relaxation scheme [183, 189] with guaranteed lower bounds.
Despite the high complexity of MIOC problems from a theoretical point
of view, it allows to solve many problem instances of practical relevance
without exponential computational effort. This scheme has found successful
application to a number of problems e.g. in biology [130, 131], chemistry
[141, 185], and automotive control [122, 187].

Mixed–Integer Model–Predictive Control

As we have seen, model predictive control is a well established technique


in the linear case and has become computationally tractable in real–time in
the nonlinear case in the last decade. At the same time, process controls
with a finite number of admissible values arise naturally in a large number
of applications where predictive control would be of high relevance to cur-
rent industrial practice, while it is a challenging task to apply MINLP tech-
niques for their solution. Consequentially, real–time capable mixed–integer
model–predictive control techniques are scarcely considered in the litera-
ture, certainly due to the inherent difficulty of the problem class and the
apparent lack of fundamental results. As an example, in the representative
proceedings collection [148] not a single contribution on mixed–integer al-
gorithms or applications in MPC can be found. In [7] several approaches to
Introduction 5

mixed–integer linear MPC are reported that rely on Mixed–Integer Quadra-


tic Program (MIQP) solvers. Related techniques have recently been applied
by [21] to a wireless sensor feedback problem. MPC for hybrid systems is
addressed in [46] by MIQP techniques or piecewise affine models. A mixed–
integer formulation is used in [142] to prioritize two competing objectives
in a linear vehicle MPC application. An MPC problem with optimal back-
off robustification is considered by [199] who solve the resulting bi–level
optimization problem using a reformulation of the lower–level problem’s
optimality conditions that involves complementarity constraints.

Aims and Contributions of this Thesis

The aim of this thesis is to develop an efficient numerical algorithm, un-


derlying theory, and an actual implementation of a numerical method for
real–time capable model predictive control of nonlinear dynamic processes
with both continuous and integer–valued controls. To this end, this thesis
presents novel results and advances over previously established techniques
in a number of areas. They are described in more detail in the following.

Mixed–Integer Nonlinear Model Predictive Control

In this thesis we develop a new algorithm for mixed–integer nonlin-


ear model–predictive control. It combines Bock’s direct multiple shooting
method [36, 167] and the real–time iteration scheme [51, 52] with a re-
formulation of the integer part of the predictive control problem based on
outer convexification [183] and relaxation of both the dynamics and the con-
straints with respect to the discrete controls. Based on the contractivity
statement for classical real–time iterations, we show that the mixed–integer
real–time iteration scheme can be interpreted as an inexact Newton–type
method. The inexactness conveys the application of the rounding scheme
taking place after each Newton–type iteration. Using this idea we give a
formal proof of local convergence of real–time iterations in the presence of
rounding schemes that relies on contractivity conditions for inexact New-
ton–type methods. The established contractivity condition allows to derive
a bound on the sampling time of the mixed–integer model–predictive control
scheme that ensures nominal stability of this new algorithm.
6 0 Introduction

Switch Costs

An important property of dynamic process models with discrete controls is


the cost incurred by operating a discrete switch. Here we may be interested
in limiting or penalizing the number of switch operations, or in approximat-
ing fast transient behavior of the dynamic process by state discontinuities.
This question has e.g. been considered in [42] for a dynamic programming
framework, and is often included in the modeling of hybrid systems with im-
plicit, i.e., state dependent switches [40, 60, 118, 156, 208]. Limitations of
these approaches often apply to changes of the number and relative order
in time of the switch events. The inclusion of switch costs in direct meth-
ods for optimal control is seldom considered. We propose an Mixed–Integer
Linear Program (MILP) switch cost formulation that determines an integer
feasible solution from a relaxed but fractional one obtained using the outer
convexification reformulation. We develop a convexification for this MILP
formulation that can be readily included in a direct multiple shooting dis-
cretization of the Optimal Control Problem (OCP) and hence allows to im-
mediately obtain relaxed solutions that satisfy a switch cost constraint. Our
formulation in addition avoids attracting fractional solutions of the relaxed
problem.

Convexification and Relaxation

The outer convexification and relaxation method [183] did not previously
consider path constraints directly depending on a binary or integer con-
trol function. We propose a new reformulation of point constraints and dis-
cretized path constraints directly depending on integer controls. This refor-
mulation guarantees feasibility after rounding of the relaxed optimal solu-
tion obtained for the discretized OCP. The properties of the obtained NLPs
are investigated for the first time, and explanations for frequently observed
ill–behavedness of SQP and Quadratic Program (QP) methods on these pro-
grams are given. We identify sources of lack of constraint qualification, ill–
conditioning, infeasible steps, and cycling of active set method. Addressing
these issues we show that the arising NLPs can instead be treated favorably
as Mathematical Programs with Vanishing Constraints (MPVCs), a young
and challenging class of nonconvex nonlinear problems that commonly arise
in truss optimization and only recently attracted increased research inter-
est on its own [3, 105, 109]. The connection to mixed–integer convexifica-
tion and relaxation approaches however is, to the best of our knowledge, a
Introduction 7

new contribution. We show that certain strong regularity assumptions for


MPVCs are satisfied for the NLPs arising from outer convexification of path
constraints. This regularity allows to retain the concept of Karush–Kuhn–
Tucker (KKT) based local optimality.

A Nonconvex Parametric SQP Method

We describe a concrete realization of a nonconvex SQP framework due to


[193] and develop a new nonconvex parametric active set method derived
from the convex case presented in [25, 67] and is method is based on strong
stationarity conditions for MPVC. This method is applied to the noncon-
vex quadratic subproblems, called Quadratic Programs with Vanishing Con-
straints (QPVCs) in this thesis, that arise from outer convexification of path
constraints. Parametric programming techniques are used to enable highly
efficient warm starts of this method required to iterate in the nonconvex
feasible set. We further present a heuristic for improving strongly station-
ary points of the nonconvex quadratic subproblems to global optimality that
is based on a sufficient condition for global optimality.

Block Structured Linear Algebra

The mixed–integer control feedback delay is determined by the computa-


tional demand of our QPVC active set method. The QP and QPVC subprob-
lems for discretized, convexified, and relaxed MIOCPs divert from quadratic
subproblems typically encountered in optimal control in that the vector of
unknowns frequently comprises many more control parameters than differ-
ential states. This has a significant impact on the block structure of the
problems. We show that classical condensing methods [36, 167] are inap-
propriate for structure exploitation in this situation.
Addressing this issue, we present a block structured factorization derived
from [202, 204] that is tailored to the block structure of the QP’s KKT ma-
trices induced by Bock’s direct multiple shooting method. Our factorization
can be applied equally well to time discrete systems with separable con-
2
straints. Its run time complexity of O (mn3 ) and in particular of O (mnq ) is
favorable for predictive control problems with large horizon lengths m or
many controls unknowns nq . This is the particular case arising for mixed–
integer optimal control problems after reformulation using the outer con-
vexification approach.
8 0 Introduction

Matrix Update Techniques

We develop and prove new block structured matrix update techniques for
the block structured factorization that reduce the run time complexity of all
but the first active set iteration by one order to O (mn2 ), making our method
attractive also for dynamic systems with more than a few differential states.
We stress the novelty of these update techniques for the case of block struc-
tured KKT matrices by quoting [158] who state that “In some areas of ap-
plication, the KKT matrix [...] contains special structure. For instance, the
QPs that arise in optimal control and MPC have banded matrices [...] When
active–set methods are applied to this problem, however, the advantages of
bandedness and sparsity are lost after just a few updates of the basis.” For
the case of KKT matrices with block diagonal Hessian and block bi–diagonal
constraints, we improve upon the described situation by providing basis up-
dates that fully maintain the block structure. Our techniques are based on a
combination of existing QR, Schur complement, and Cholesky updates and
generate no fill–in.

Analysis of Computational Demand

Targetting embedded systems, it is of vital importance to be able to specify


the computational demand of all employed algorithms. To this end, an effort
has been made in this thesis to analyze the number of floating–point opera-
tions required by the core QP algorithms to compute the control feedback,
and to relate this number to the properties of the MIOCP under investiga-
tion.

Software Package

All developed algorithms are implemented in two software packages, named


MuShROOM and qpHPSC, which together allow for the generic and fast solu-
tion of nonlinear mixed–integer optimal control and model–predictive con-
trol problems.

Case Studies

The main theoretical contributions of this thesis, being the mixed–integer


real–time iteration scheme and its sampling time bound ensuring local con-
tractivity, the outer convexification of path constraints and the treatment
Introduction 9

of the resulting NLPs as MPVCs, the nonconvex SQP and active set QP al-
gorithms, and the block structured factorization with matrix updates, are
demonstrated at the example of several mixed–integer optimal control prob-
lems and – where possible – compared to existing algorithmic approaches.

Realtime Predictive Cruise Control

A challenging predictive cruise control problem with high relevance to cur-


rent and future research efforts in the automotive industry is investigated.
Increasing fuel prices, scarcity of unclaimed natural resources, and grow-
ing awareness for environmental concerns leads to consistently increasing
efforts in energy saving. One particular concern is the comparably high fuel
consumption of heavy–duty trucks for long–distance transportations [209].
It can be observed that significant savings can be realized by appropriate
adaptation of the truck’s mode of operation to road and traffic conditions
[103, 209]. In particular, an intelligent choice of velocity and gear shift
points based on in–advance knowledge of road conditions bears a signifi-
cant potential for reducing operational costs.
The underlying mathematical problem however turns out to be hard to ap-
proach under real–time conditions. A predictive optimization problem with
both discrete and continuous unknowns needs to be solved on–board the
truck. As the optimal gear is decided upon not only for the instant, but for a
prediction of the future that can be as distant as 4000 meters or around 200
seconds at full traveling speed, the combinatorial explosion of the number
of possible gear shift patterns is a major difficulty and obstacle. Drastically
reducing the maximum allowed number of gear shifts would sacrifice much
of the potential for optimization, though.
The optimal control feedback has to be provided in real–time in order to
be able to adapt to ever changing exterior conditions such as changes of
the road’s slope and curvature, but also to react to more critical conditions
such as suddenly arising traffic conditions. Hence, the delay between obser-
vations of the truck’s mode of operation and various exterior conditions on
the one hand, and the availability of the computed control feedback on the
other hand shall be as small as possible. Industrial demands here are in the
range of some tens of milliseconds. The computational power of the equip-
ment available for this task on–board the truck remains limited, however.
Previous research has considered this and closely related problems with-
out taking multiple discrete gear shifts into account [209], or by applying ex-
10 0 Introduction

haustive search algorithms of the dynamic programming type [42, 80, 103]
that do either require precomputation of the optimal solution or do not meet
the computational resource constraints.
In this thesis, this predictive cruise control problem is solved for the first
time under demanding real–time constraints. The resulting algorithms are
presently considered for application in an ongoing industrial cooperation.

Thesis Overview

This thesis is laid out in nine chapters and one appendix as follows.
In chapter 1 we introduce Optimal Control Problems (OCPs) for dynamic
processes described by systems of Ordinary Differential Equations (ODEs).
We survey numerical methods for the algorithmic solution of such prob-
lems, and settle on multiple shooting methods. We present in great detail
Bock’s direct multiple shooting method for optimal control, and give point-
ers to new developments in this thesis affecting various components of this
method.
Chapter 2 is concerned with Mixed–Integer Optimal Control Problems, a
class of optimal control problems with both continuous and discrete con-
trols. After a brief survey of possible algorithmic approaches towards solv-
ing problems of this class, we describe the outer convexification and relax-
ation approach. This approach allows to obtain a local solution of a Mixed–
Integer Optimal Control Problem (MIOCP) or an approximation thereof by
solving a single, continuous, but possibly larger OCP without observing ex-
ponential run time in practice. We present bounds on the quality of the
approximation of the optimal control and ODE state trajectories. An ex-
tension of the MIOCP problem class including the notion of switch costs
is presented. A Mixed–Integer Linear Program (MILP) formulation is devel-
oped that computes an integer feasible control trajectory satisfying a switch
cost constraint from a relaxed optimal but possibly fractional one. In order
to include the switch cost constraint in the OCP itself, a convexification of
this formulation is developed. It avoids attracting fractional solutions and
maintains separability, thus allowing for integration into the direct multiple
shooting method.
In chapter 3 we cover the theory of Nonlinear Programming (NLP) and
present Sequential Quadratic Programming (SQP) algorithms for the solu-
tion of the discretized, convexified, and relaxed MIOCP. Numerical methods
Introduction 11

for the solution of Initial Value Problems (IVPs) required to evaluate certain
direct multiple shooting NLP constraints and for derivative and sensitivity
generation are briefly presented.

In chapter 4 we describe algorithmic extensions of the direct multiple


shooting method to Nonlinear Model Predictive Control (NMPC) problems.
We introduce the concepts of real–time iterations and the online active–set
strategy and mention major theoretical results such as conditions for local
contractivity and a sketch of the proof due to [51]. We extend the real–
time iteration scheme to mixed–integer NMPC problems for the first time.
Two rounding schemes and warm start strategies are presented. We give
a formal proof of local contractivity of the developed mixed–integer real–
time iteration scheme that is based on the interpretation of our algorithm
as an inexact Newton–type method. A bound on the mixed–integer NMPC
sampling time ensuring local contractivity is derived based on this proof.

Previous work on outer convexification and relaxation schemes for


MIOCPs has not considered constraints directly depending on the discrete
controls. In chapter 5 we investigate for the first time the structure of NLPs
obtained by direct discretization of a MIOCP with constraints treated by the
outer convexification and relaxation approach of chapter 2. We show that
important Constraint Qualifications (CQs) are violated and identify reasons
for various convergence problems observed for descent based methods such
as SQP. The obtained NLPs are identified as Mathematical Programs with
Vanishing Constraints (MPVCs), a challenging class of problems that has
only recently attracted increased research interest. We present a Nonlinear
Programming framework for MPVCs. For MIOCPs with constraints treated
by outer convexification, we show that a replacement CQ holds under rea-
sonable assumptions. This allows us to retain the concept of Karush–Kuhn–
Tucker (KKT) based local optimality.

Chapter 6 presents a new SQP method for MPVCs that carries the noncon-
vexity of the problem over to the local subproblems. A new parametric active
set strategy for the solution of a sequence of those local subproblems, which
are referred to as Quadratic Programs with Vanishing Constraints (QPVCs).
Strong MPVC stationarity conditions are used to derive active set exchange
rules that allow to find a strongly stationary point on the nonconvex feasi-
ble set of a QPVC. Even though QPVCs must be considered as nonconvex
problems, global optimality can be verified locally, and a heuristic is pre-
sented that exploits this knowledge to improve strongly stationary points
up to global optimality.
12 0 Introduction

In chapter 7 the focus is put on sparse and block structured linear al-
gebra for QPVCs with many control parameters due to outer convexifica-
tion of MIOCP constraints. We survey existing approaches for exploiting
the arising block structures and evaluate their applicability. We continue by
presenting a factorization of the QPVC’s KKT system that is tailored to the
case of many control parameters and is free of any fill–in, called the Hessian
Projection Schur Complement (HPSC) factorization in this thesis. It has a fa-
vorable runtime complexity for problems with long prediction horizons and
for MIOCPs reformulated by outer convexification. Properties, applicability,
and extensions of this factorization are investigated in detail, and the run
time and storage space requirements are examined.
Matrix update for factorizations are of vital importance for the efficiency
of any active set method. The rate at which QPVC solutions can be computed
effectively determines the control feedback delay of the mixed–integer
NMPC controller. Chapter 8 is concerned with detailed proofs of new matrix
updates for the HPSC factorization that reduce the runtime complexity in
terms of the number of unknowns by one order.
Chapter 9 presents numerical results for all new algorithms and makes
comparisons to existing methods at the example of several mixed–integer
optimal control and mixed–integer NMPC problems. In an extensive indus-
trial case study, a challenging mixed–integer nonlinear model predictive
control problem is solved under demanding real–time constraints. We show
that by using the developed numerical methods, this problem could even be
solved on an embedded system with limited computational resources.
This thesis is closed by appendix A, containing details on the implemen-
tation of the developed algorithms within the software packages MuShROOM
and qpHPSC.

Computing Environment

All computational results and run times presented in this thesis have
been obtained on a 64–bit Ubuntu© Linux™ 9.10 system powered by an
Intel© Core™ i7 920 CPU at 2.67 GHz, with 6 GB main memory available.
A single core of the available four physical cores of the CPU has been used.
All source code is written in ANSI C99 and compiled using version 4.4.1
of the GNU C/C++ compiler collection, with applicable machine–specific
optimization flags enabled.
1 The Direct Multiple Shooting Method for
Optimal Control

In this chapter we consider a class of continuous optimal control problems.


We survey different numerical solution approaches that introduce compu-
tationally tractable variants of this problem and discuss their usefulness
for the purpose of this thesis. A method particularly suitable is the direct
multiple shooting method of section 1.2.5, the foundation for all further al-
gorithms presented in this thesis.

1.1 Problem Formulations


Definition 1.1 (Continuous Optimal Control Problem)
A continuous optimal control problem is a constrained infinite–dimensional optimiza-
tion problem of the form

min ϕ(x (·), u(·)) (1.1)


x (·),u(·)

s. t. ẋ (t) = f (t, x (t), u(t)), t ∈T,


0  c(t, x (t), u(t)), t ∈T,
0  r ({x (t i )}), {t i } ⊂ T ,
x def
in which we determine a dynamic process x : T → n on a time horizon T =
[t 0 , t f ] ⊂ , described by a system of Ordinary Differential Equations (ODEs) with
x u x u
right hand side f : T × n × n → n , affected by a control u : T → n , such
that we minimize a performance index ϕ : X × U →  and satisfy path constraints
x u c x r
c : T × n × n → n and point constraints r : (n )m+1 → n on a finite number
m + 1 of grid points {t i } ⊂ T , 0  i  m. 

x
In definition 1.1 we have modeled a time dependent process x : T → n ,
def
t → x (t) on the time horizon T = [t 0 , t f ] ⊂  by a system of ODEs

ẋ (t) = f (t, x (t), u(t)), t ∈T. (1.2)

This dynamic process can be affected by a control input u(t) at any time.
u def
We assume the function u : T → n to be measurable and define U = {u :

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8_2,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
14 1 The Direct Multiple Shooting Method

u
T → n | u measurable} to be the set of all such control functions. The
variable x (t) describes the system state of this process at any time t ∈ T ,
def x
and we define X = {x : T → n } to be the set of all state trajectories.
To ensure existence and uniqueness of the ODE system’s solution, we as-
x u x
sume f : T × n × n → n to be piecewise Lipschitz continuous. The
nx u c
constraint function c : T ×  × n → n restricts the set of admissi-
ble state and control trajectories x (·) and u(·). It may contain mixed path
and control constraints, restrict the set of initial values x (t 0 ), and contain
boundary conditions for the trajectories. Finally, the point constraint func-
x r
tion r : (n )m+1 → n imposes point–wise constraints on the states in a
finite number m + 1 of grid points {t i } ⊂ T , 0  i  m that may be coupled
in time. Possible uses are the specification of boundary conditions such as
initial and terminal states or periodicity constraints. The presented Optimal
Control Problem (OCP) clearly is an infinite–dimensional optimization prob-
lem, the unknowns to be determined being the control trajectory u(·) and
the resulting state trajectory x (·) of the process.

Problem (1.1) can be extended and specialized to include a large num-


ber of additional characteristics. The following concretizations of the above
problem class can easily be incorporated by reformulations:

Objective Functions of Bolza and Least–Squares Type

The performance index ϕ(x (·), u(·)) evaluated on the time horizon T usually
is a general objective function that consists of an integral contribution, the
Lagrange type objective with integrand l (t, x (t), u(t)), and an end–point
contribution, the Mayer type objective m(t f , x (t f )),
 tf
ϕ(x (·), u(·)) = l (t, x (t), u(t)) d t + m(t f , x (t f )). (1.3)
t0

Least–squares objective functions are of particular interest in tracking prob-


lems where they minimize a weighted measure of deviation from a desired
path in state space, and they can be employed for numerical regularization
of the control trajectory u(t). The general form is
 tf
 2
ϕ(x (·), u(·)) = ||r (t, x (t), u(t))||22 d t + m(t f , x (t f ))2 . (1.4)
t0
1.1 Problem Formulations 15

The Gauß–Newton approximation that exploits the particular form of this


objective function is presented in section 3.2.3.

Constraint Types

We distinguish several different types of constraints by the structure of the


constraint function c(·). Decoupled constraints do not couple different time
points of the state or control trajectories. They may be imposed on the entire
horizon

0  c(x (t), u(t)), t ∈T,

or on grid points {t i }0im ⊂ T only,

0  c(x (t i )), 0  i  m.

Exploiting their property of separability is crucial in the design of efficient


numerical methods as presented in chapter 7. Coupled constraints

0  c(x (t 0 ), . . . , x (t m ))

couple the process states in finitely many different points t i ∈ T , 0  i  m


of the horizon. We refer to {t i } as a constraint grid in this case. Boundary
constraints impose restrictions on the trajectories only in the initial and the
final point of the horizon,

0  c(x (t 0 ), x (t f )),

and a special instance are periodicity constraints

0 = π0 (x (t 0 )) − πf (x (t f )),

wherein π0 and πf may e.g. contain permutations of the state vector’s com-
ponents. Both types of constraints can be reformulated as decoupled con-
straints e.g. by introducing an augmented state vector x̂ = [ x r ] holding
the constraint residuals,
 
f (t, x (t), u(t))
fˆ(t, x̂ (t), u(t)) = , (1.5)
0
rk (t k ) = ck (x (t k )).
16 1 The Direct Multiple Shooting Method

An appropriately chosen decoupled terminal constraint can then be imposed


on the augmented state vector,

0  c(r0 (t f ), . . . , rm (t f )). (1.6)

In some Nonlinear Model Predictive Control (NMPC) applications, zero ter-


minal constraints

r (x (t f )) = x (t f ) − x steady = 0,

where x steady is the differential steady state of the process, help to guarantee
nominal stability [153]. Initial value constraints

x (t 0 ) = x 0

play a special role in the real–time iteration scheme presented in chapter 4


and the parametric Sequential Quadratic Programming (SQP) and Quadra-
tic Programming (QP) algorithms of chapter 6.

Variable Time Horizons

Problem (1.1) is given on a fixed time horizon T = [t 0 , t f ] ⊂  for simplic-


ity. Free initial times or free end times, and thus time horizons of variable
length, are easily realized by the time transformation

def def
t(τ) = t 0 + hτ, h = tf − t0. (1.7)

that allows to restate the OCP on the normalized horizon τ ∈ [0, 1] ⊂ ,

min ϕ(x (·), u(·), h) (1.8)


x (·),u(·),h
 
s. t. ẋ (τ) = h · f t(τ), x (t(τ)), u(t(τ)) , τ ∈ [0, 1],
 
0  c x (t(·)), u(t(·)), h .

Global Parameters

p
A vector of model parameters p ∈ n describing global properties of the
dynamic process and its environment may enter the objective function, the
ODE system, and the constraints,
1.1 Problem Formulations 17

min ϕ(x (·), u(·), p) (1.9)


x (·),u(·),p

s. t. ẋ (t) = f (t, x (t), u(t), p), t ∈ T ,


0  c(x (·), u(·), p).

Model parameters can either be regarded as special control functions that


are constant on the whole of T , or can be replaced by introducing an aug-
mented state vector
 
x
x̂ =
p

with augmented ODE right hand side function


 
f (t, x (t), u(t), p)
fˆ(t, x̂ (t), u(t)) = .
0

Depending on the choice of the method in a numerical code, either formula-


tion may be more efficient. Note however that only those model parameters
that actually attain different values under practically relevant process con-
ditions should be included in the problem formulation in this way. Parame-
ters that attain one constant value under all thinkable conditions should not
be exposed to the problem formulation, but rather be considered part of the
model equations.

Linear Semi–Implicit Differential Algebraic Equations

The dynamic process in problem (1.1) is described by a system of ODEs. We


may extend this class to that of semi–implicit index one Differential Alge-
x
braic Equation (DAE) systems with differential states x (·) ∈ n and alge-
nz
braic states z(·) ∈  satisfying

A(t, x (t), z(t), u(t), p) ẋ (t) = f (t, x (t), z(t), u(t), p), t ∈ T , (1.10)
0 = g (t, x (t), z(t), u(t), p), t ∈ T .

Here the left hand side matrix A(·) and the Jacobian g z (·) are assumed to be
regular. We may then regard the algebraic state trajectory z(·) as an implicit
function z(t) = g −1 (t, x (t), u(t), p) of the differential state and control tra-
jectories.
18 1 The Direct Multiple Shooting Method

We refer to [4, 5, 15, 61, 166] for the numerical solution of semi–implicit
index one DAE systems. In [133, 191] partial reduction techniques for the
algebraic states are presented in an SQP framework.

1.2 Solution Methods for Optimal Control Problems

For the solution of optimal control problems of type (1.1) several different
methods have been developed. They differ in the choice of the optimization
space, the applied type of discretization, the precision of the obtained op-
timal solutions, the computational demand of the method that limits the
size of the problem instances that can be treated in a given amount of
time, and finally in the ease of implementation as a numerical code. We
mention indirect methods based on Pontryagin’s Maximum Principle, and
review dynamic programming, based on Bellman’s Principle of Optimality.
Direct methods are presented in greater detail, and we distinguish collo-
cation methods from shooting methods here. Finally, the direct multiple
shooting method is presented as a hybrid approach combining the advan-
tages of both direct methods. We go into more detail here, as all numerical
algorithms presented in this thesis are based on and focused on direct mul-
tiple shooting.

1.2.1 Indirect Methods

Indirect methods are based on Pontryagin’s Maximum Principle and opti-


mize in an infinite–dimensional function space. Necessary conditions of op-
timality are used to transform the optimal control problem into a Multi–Point
Boundary Value Problem (MPBVP), which can then be solved by appropri-
ate numerical methods. For very special small cases, an analytical solution
is also possible. Indirect methods are therefore suitable for a theoretical
analysis of a problem’s solution structure. They yield highly accurate solu-
tions for the optimal control profile, as the infinite–dimensional problem is
solved and no approximation of the control functions took place. This is in
sharp contrast to direct methods, which are discussed below. As all control
degrees of freedom vanish in the MPBVP to be solved, indirect methods
appear attractive for optimal control problems with a large number of con-
trols, such a convexified Mixed–Integer Optimal Control Problems (MIOCPs)
discussed in chapter 2.
1.2 Solution Methods for Optimal Control Problems 19

The disadvantages of indirect methods are quite obvious, however. The


necessary conditions of optimality have to be derived analytically for every
problem instance, and require several different special cases to be distin-
guished. In particular, general path and control constraints c(·) frequently
lead to an a priori unknown structure of the optimal solution. This labori-
ous derivation possibly has to be repeated for even small changes of initial
conditions, parameters, or for small changes of the problem’s structure,
e.g. the introduction of an additional constraint, as the optimal solution’s
structure often is very sensitive to changes of the problem data. In addition,
this derivation is difficult if not practically impossible for problem instances
with more than a few states and controls. Finally, the solution of the MP-
BVP typically requires initial guesses to be available for all variables, which
are often difficult to obtain especially for the adjoint variables associated
with the constraints. For the numerical solution of the MPBVP, a Nonlin-
ear Programming method may be applied. For its convergence, it is cru-
cial that these initial guesses even come to lie inside the domain of local
convergence. Consequentially, the numerical solution of an optimal control
problem using indirect methods cannot be fully automated. It remains an in-
teractive process, requiring insight into the problem and paperwork for the
specific instance to be solved. Due to these inconveniences, indirect meth-
ods have not emerged as the tool of choice for fast or even online numerical
solution of optimal control problems.

1.2.2 Dynamic Programming

Dynamic Programming is based on Bellman’s principle of optimality, which


states that “an optimal policy has the property that whatever the initial state
and initial decision are, the remaining decisions must constitute an optimal
policy with regard to the state resulting from the first decision” [18].
Theorem 1.1 (Principle of Optimality)
 
Let x  (·), u  (·) be an optimal solution on the interval T = [t 0 , t f ] ⊂ , and let t̂ ∈ T
 
be a point on that interval. Then x  (·), u  (·) is an optimal solution on [ t̂, t f ] ⊆ T

for the initial value x̂ = x ( t̂). 

Put in brief words, Bellman’s principle states that any subarc of an opti-
mal solution is optimal. The converse is not true in general, i.e., the concate-
nation of optimal solutions on a partition of the interval T is not necessarily
an optimal solution on the whole interval T . We refer to [23] for an exten-
sive treatment of the applications of the Dynamic Programming approach to
20 1 The Direct Multiple Shooting Method

optimal control and only briefly describe the algorithm here. Based on the
principle of optimality, we define the cost–to–go function
Definition 1.2 (Continuous Cost–to–go Function)
On an interval [ t̂, t f ] ⊂ T ⊂  the cost–to–go function ϕ for problem (1.1) with a
Bolza type objective is defined as
 
tf

def
ϕ( t̂, x̂ ) = min 
l(x (t), u(t)) d t + m(x (t f ))  x ( t̂) = x̂ , x (·), u(·) feasible . 

Imposing a time grid on the horizon T ,

t 0 < t 1 < . . . < t m−1 < t m = t f , (1.11)

a recursive variant of the cost–to–go function can be defined as follows.


Definition 1.3 (Recursive Cost–to–go Function)
In the point t k , k ∈ {0, . . . , m − 1} the recursive cost–to–go function ϕ for problem
(1.1) with a Bolza type objective is defined as

 t k+1
def
ϕ(t k , x k ) = min l(x (t), u(t)) d t + ϕ(t k+1 , x k+1 ) (1.12)
tk


 x (t ) = x , x (·), u(·) feasible .
 k k

def
The recursion ends in k = m, t m = t f with ϕ(t m , x m ) = m(x m ). 

Using this recursive definition, the optimal objective function values to-
gether with the values of the optimal state trajectory x (·) and control tra-
jectory u(·) can be computed in the grid points t k by backward recursion,
starting with k = m and proceeding to k = 0. The minimization problem
(1.12) has to be solved for each time interval [t k , t k+1 ] and for all feasi-
ble initial values x k . The resulting cost–to–go function value together with
the corresponding optimal control u k have to be tabulated in state space
for use in the next backward recursion step, which requires the choice of
discretizations for the sets of feasible values of x k and u k .
Dynamic Programming has been used in some Model Predictive Control
(MPC) applications, cf. [103, 42], and has the advantage of searching the
entire state space, thus finding a globally optimal solution. The technique
suffers from the “curse of dimensionality”, though, and delivers sufficiently
fast run times for tiny problem instances only. Control algorithms based
1.2 Solution Methods for Optimal Control Problems 21

on Dynamic Programming also lack extendability because a slight increase


of the problem’s dimensions, e.g. by using a more sophisticated model of
the process, frequently induces an unacceptable growth of the required run
time.

1.2.3 Direct Single Shooting

In contrast to indirect approaches, direct methods are based on a discretiza-


tion of the infinite–dimensional OCP (1.1) into a finite–dimensional nonlinear
optimization problem.
In direct single shooting one chooses to regard the state trajectory as a
dependent value of the controls u(·), and to solve an Initial Value Problem
(IVP) using an ODE or DAE solver to compute it. To this end, a finite–
dimensional discretization
  q
q = q0 , q1 , . . . , q m−1 ∈ m×n ,

of the control trajectory u(·) on T = [t 0 , t m ] is chosen for the solution of the


IVP

ẋ (t) = f (t, x (t), u(t)), t ∈T, (1.13)


x (t 0 ) = s0 ,

e.g. by using piecewise constant functions (nq = nu )

u(t) = q i , t ∈ [t i , t i+1 ] ⊂ T , 0  i  m. (1.14)

From this approach an Nonlinear Program (NLP) in the nx + mnq unknowns

def  
v = s0 , q0 , q1 , . . . , q m−1

is obtained which can be solved using e.g. the SQP techniques presented
in chapter 3. Control and path constraints frequently are discretized and
enforced on the control discretization grid only, or may be included in the
objective using penalty terms.
The direct single shooting method suffers from a number of drawbacks.
As only the initial state and the control variables enter the NLP, initializa-
tion of the state trajectory using prior knowledge about the process is not
possible. Further, for a chosen initialization of x o and the controls u , the
22 1 The Direct Multiple Shooting Method

Figure 1.1: Illustration of the direct single shooting discretization applied to the op-
timal control problem.

IVP’s solution need not even exist, e.g. due to a singularity in time. Even if
it exists, it possibly cannot be computed numerically due to propagation of
errors over the course of the integration. Typically, to guarantee existence
of a numerical solution of highly nonlinear or unstable ODEs, an initial guess
of these variables is required that is already very close to the true optimal
solution. Such a guess may of course be hard to obtain. The convergence
speed of the NLP solver is effectively governed by the amount of nonlinear-
ity present in the ODE system, and single shooting methods cannot improve
upon this situation. Finally, even well–conditioned IVPs may induce unsta-
ble Boundary Value Problems (BVPs), and a small step in the initial value x 0
may result in a large step in the ODE’s solution x (·) or induce large viola-
tions of constraints. This behavior is a challenge for derivative–based NLP
methods.
Still, direct single shooting is often used in practice as the idea is easy to
grasp, the implementation is straightforward, and the resulting NLP has a
small number of unknowns only.

1.2.4 Direct Collocation

Collocation methods for BVPs go back to the works [182, 211] and one of
the first works on direct collocation for OCPs is [210]. Collocation methods
discretize both the states and the controls on a fine grid of m intervals with
k collocation points per interval. To this end, the ODE system

ẋ (t) = f (t, x (t), u(t)), t ∈T,


1.2 Solution Methods for Optimal Control Problems 23

is replaced by a k-point collocation scheme that introduces a discretiza-


tion using k state vectors of dimension nx per interval [t i , t i+1 ], 0  i 
m − 1, coupled by nonlinear equality constraints. Algebraic variables z(t)
in DAE systems can be treated by enforcing the discretized condition
0 = g (t, x (t), z(t), u(t)) on the collocation grid points. Path and point con-
straints are included in a similar way. Summing up, we obtain from direct
collocation methods a large but sparse NLP in the (km + 1)nx + kmnu un-
knowns
def  
v = x 0 , u0 , x 1 , u1 , . . . , x km−1 , u km−1 , x km ,

which can be solved with NLP methods such as sparse interior point meth-
ods or tailored Sequential Quadratic Programming methods. Refinements
and applications of direct collocation can be found in e.g. [10, 26, 101, 194,
206, 225].
In contrast to direct single shooting, collocation allows to initialize the
state trajectory variables, thereby allowing more a–priori knowledge about
the process and its optimal solution to enter the problem. Small violations of
the matching conditions over the course of the NLP solution help dampen
the spreading of perturbations. Although the resulting NLP is very large,
efficient solution methods exist, e.g. [215].
A drawback of collocation methods is the difficulty to include adaptivity
of the ODE or DAE solution process. This concept is of particular impor-
tance for the treatment of highly nonlinear or stiff systems, which require
small step sizes in a priori unknown regions of the time horizon, and thus
high values of m in the collocation approach. In addition, certain collocation
schemes may exhibit highly oscillatory behavior on singular arcs of the op-
timal control, cf. [112], which may degrade the NLP solver’s performance,
and which can be overcome by elaborate regularization approaches only.
Direct multiple shooting methods, to be presented in the next section, over-
come these limitations by making efficient use of state–of–the–art adaptive
ODE and DAE solvers, cf. [5, 4, 15, 61, 166], thereby decoupling state and
control discretization. Finally, the large–scale sparse NLP obtained from the
collocation discretization of the OCP is most efficiently solved by interior–
point methods that can easily apply sparse linear algebra, cf. [28, 215]. For
most model predictive control tasks, though, active set methods are pre-
ferred as detailed in chapter 4 due to their better warm starting abilities
[13, 138]. The sparsity patterns introduced by collocation however are not
easily exploited in active set methods.
24 1 The Direct Multiple Shooting Method

1.2.5 Direct Multiple Shooting

First descriptions of multiple shooting methods for the solution of BVPs can
be found in [29, 30, 31, 43, 162]. The direct multiple shooting method for
OCP goes back to the works of [36, 167]. Direct multiple shooting meth-
ods are hybrids of direct collocation and direct single shooting approaches,
as they discretize the state trajectory, but still rely on solving IVPs. They
typically have an advantage over direct collocation methods in that they
easily allow to use of highly efficient adaptive solvers for the IVPs, e.g.
[5, 4, 15, 61, 166]. Contrary to single shooting, the initialization of the state
trajectory variables is easily possible, also permitting infeasible initializa-
tions. Stability of both the IVP and the BVP solution process is improved. In
addition, computational experience shows that nonlinearity present in the
BVP is diminished, thus improving the speed of convergence [6].
The remainder of this chapter is exclusively concerned with the direct
multiple shooting method for optimal control, which serves as the founda-
tion for all algorithms to be presented in this thesis.

1.3 The Direct Multiple Shooting Method for Optimal


Control

The direct multiple shooting method for optimal control has its origins in
the diploma thesis [167], supervised by Hans Georg Bock, and was first
published in [36]. Extensions can be found in e.g. [4, 34, 51, 133, 134, 191].
The direct multiple shooting code MUSCOD-II is described in detail in [132],
and the direct multiple shooting code MuShROOM developed as part of this
thesis is described in appendix A.
We consider the numerical solution of the following class of OCPs that
have been introduced in the previous sections together with various possi-
ble extensions:
 tf
min m(t f , x (t f )) + l(t, x (t), u(t)) d t (1.15a)
x (·),u(·)
t0

s. t. ẋ (t) = f (t, x (t), u(t)), t ∈T, (1.15b)


eq
0 = ri (t i , x (t i )), {t i }0inr ⊂ T , (1.15c)
0  ri (t i , x (t i )),
in
{t i }0inr ⊂ T , (1.15d)
0  c(t, x (t), u(t)) t ∈T, (1.15e)
1.3 The Direct Multiple Shooting Method for Optimal Control 25

in which we minimize a Bolza type objective function (1.15a) of a dynamic


def
process x (·) defined on the horizon T = [t 0 , t f ] ⊂  in terms of an ODE
system with right hand side function f (1.15b). The process is controlled by
a control trajectory u(·) subject to optimization. It shall satisfy certain in-
equality path constraints c(·) (1.15e) as well as equality and inequality point
constraints ri (·) (1.15c, 1.15d) imposed on a constraint grid {t i } ⊂ T of nr
points on T . We expect all functions to be twice continuously differentiable
with respect to the unknowns of problem (1.15).

1.3.1 Control Discretization

In order to obtain a computationally tractable representation of the infinite–


dimensional control trajectory u(·) we introduce a discretization of u(·) on
the control horizon T by partitioning T into m not necessarily equidistant
intervals

t 0 < t 1 < . . . < t m−1 < t m = t f (1.16)

that define the shooting grid {t i }. For simplicity of exposition, we assume


it to coincide with the constraint grid of the point constraints used in the
introduction of this chapter and in (1.15). Note however that the presenta-
tion to follow can be extended to differing grids for the controls and point
constraints.

On each interval [t i , t i+1 ], 0  i  m − 1, we choose base functions bi j :


q
T × ni j →  for each component 1  j  nu of the control trajectory. To
ensure separability of the discretization the bi j shall have local support, and
q
n
are parameterized by a vector of finitely many control parameters q i j ∈  i j .
Popular choices for the base functions include piecewise constant controls
q
( n i j = 1)

q
bi j : [t i , t i+1 ] × ni j −→ , (t, qi j ) → qi j ,

piecewise linear controls (nqi j = 2)

q t i+1 − t t − ti
bi j : [t i , t i+1 ] × ni j −→ , (t, q i j ) → qi j 1 + qi j 2 ,
t i+1 − t i t i+1 − t i

or piecewise cubic spline controls (nqi j = 4)


26 1 The Direct Multiple Shooting Method


4 k−1
q
ni j t − ti
bi j : [t i , t i+1 ] ×  −→ , (t, q i j ) → qi j k βk
k=1
t i+1 − t i

with appropriately chosen spline function coefficients β . Evidently, the type


of discretization may be chosen differently for each of the nu components of
the control trajectory.

For the ease of notation we introduce an additional discretized control


bm (t m , q m ) in the last point t m of the shooting grid {t i }, which shall be im-
plicitly fixed to the final control value of the previous shooting interval,

def
bm (t m , q m ) = bm−1 (t m , q m−1 ). (1.17)

For certain choices of the control discretization, e.g. for piecewise linear
controls, continuity of the discretized control trajectory may be desired. This
can be enforced by imposing additional control continuity conditions for the
trajectory u j (t) in all points of the control discretization grid {t i },

0 = bi j (t i+1 , q i ) − bi+1, j (t i+1 , q i+1 ), 0  i  m − 1. (1.18)

The choice of the control discretization obviously affects the quality of the
discretized OCP’s solution approximation that of the infinite–dimensional
one, see e.g. [122].

1.3.2 State Parameterization

In addition to the control discretization, and notably different from single


shooting described in section 1.2.3, we also introduce a parameterization
of the state trajectory x (·) on the shooting grid {t i } that yields m IVPs with
x
initial values si ∈ n on the intervals [t i , t i+1 ] of the horizon T ,

ẋ i (t) = f (t, x i (t), bi (t, q i )), t ∈ [t i , t i+1 ], 0  i  m − 1, (1.19a)


x i (t) = si . (1.19b)

In order to ensure continuity of the obtained trajectory x (·) on the whole of


T , we introduce m − 1 additional matching conditions

0 = x i (t i+1 ; t i , si , q i ) − si+1 , 0  i  m − 1. (1.20)


1.3 The Direct Multiple Shooting Method for Optimal Control 27

Here, the expression x i (t i+1 ; t i , si , q i ) denotes the final value x (t i+1 ) ob-
tained as the solution of the IVP (1.19) on the interval [t i , t i+1 ] when
starting in the initial value x (t i ) = si and applying the control trajectory
u(t) = bi (t, q i ) on [t i , t i+1 ]. The evaluation of the residual of constraint
(1.20) thus requires the solution of an IVP by an appropriate numerical
method, see [5, 4, 15, 61] and chapter 3.

Figure 1.2: Illustration of the direct multiple shooting discretization applied to the
optimal control problem. On the left, all shooting nodes were initialized
identically and the solution of the m IVPs violates the matching condi-
tions. On the right, the matching conditions are fulfilled after conver-
gence of the NLP solver.

More generally, the IVPs (1.19) together with the matching conditions
(1.20) may be replaced by a sufficiently smooth but otherwise arbitrarily
chosen mapping

0 = ji (t i , t i+1 , si , si+1 , q i , q i+1 ), 0  i  m − 1. (1.21)

In particular, the Jacobians of the mappings ji with respect to the subse-


quent state si+1 or the control q i+1 need not necessarily be regular. This
effectively increases the number of degrees of freedom of the discretized
optimal control problem. In case of singularity of ji with respect to si+1 ,
we allow for discontinuities of the state trajectory x (·), while singularity of
ji with respect to q i+1 is just a generalization of choosing a discontinuous
control discretization.

q
The resulting vector of (m + 1)nx + mnq unknowns, assuming ni j to be
identical for all nodes and controls, is denoted by

def
 
v = s0 q0 . . . sm−1 q m−1 sm . (1.22)
28 1 The Direct Multiple Shooting Method

1.3.3 Constraint Discretization

The inequality path constraint c(·) is discretized by enforcing it in the points


{t i } of the shooting grid only,

0  ci (t i , si , bi (t i , q i )), 0  i  m. (1.23)

This discretization will in general enlarge the feasible set of the discretized
optimal control problem compared to that of the continuous one, and will
thus affect the obtained optimal solution. For most real–world problems, it
can be observed that an optimal trajectory (x  (·), u  (·)) obtained as solu-
tion of the discretized problem shows only negligible violations of the path
constraints c(·) in the interior of shooting intervals if those are enforced on
the shooting nodes. If significant violations are observed or strict feasibil-
ity on the whole of T is of importance, remaining violations can sometimes
be treated successfully by choosing an adapted, possibly finer shooting grid
{t i }. Alternatively, a semi–infinite programming algorithm for tracking of
constraint violations in the interior of shooting intervals is discussed in
[168, 169].

1.3.4 The Nonlinear Problem

The discretized optimal control problem resulting from application of the


direct multiple shooting discretization to problem (1.15) reads


m
min l i (t i , si , q i ) (1.24)
s,q
i=0

s. t. 0 = x i (t i+1 ; t i , si , q i ) − si+1 , 0  i  m − 1,
eq
0 = ri (t i , si , bi (t i , q i )), 0  i  m,
0  ri (t i , si , bi (t i , q i )),
in
0  i  m,
0  ci (t i , si , bi (t i , q i )), 0  i  m.

Here we have written the Mayer term m(t m , sm ) as final term l m (t m , sm , q m )


of the objective.
Constrained nonlinear programming theory and the SQP method for the
solution of problem (1.24) are presented in chapter 3. In chapter 4, we
present the concept of real–time iterations that improves the efficiency of
SQP methods applied to solve NMPC problems. In chapter 6 we present a
1.4 Summary 29

nonconvex SQP method for a special class of NLPs obtained from the dis-
cretization of convexified MIOCPs. The quadratic subproblems arising in
this SQP method are studied and an active set algorithm for ttheir solution
is presented.

1.3.5 Separability

We refer to a function of problem (1.24) as separable if it coupling of un-


knowns (si , q i ) and (s j , q j ) on different nodes 0  i, j  m, i = j by this
function is either absent or linear. In this case, the Jacobians of that func-
tion with respect to (s , q) show block structure. The property of separability
is crucial for the design of efficient linear algebra for the solution of prob-
lem (1.24) by derivative–based algorithms. Chapters 7 and 8 are concerned
with techniques and contributions of this thesis to the efficient exploitation
of structures in problem (1.24).
By choice of the control discretization and the state parameterization, the
objective function and the constraints ci and ri are separable with respect
to the unknowns (si , q i ) on the shooting grid nodes. Unknowns on adjacent
nodes of the shooting grid are coupled by the matching conditions (1.20)
exclusively.

1.4 Summary

In this chapter we have defined a class of optimal control problems for dy-
namic processes modeled by systems of ODE or semi–implicit index one
DAE systems and have described various extensions of this problem class.
A survey of numerical approaches for the solution of problems of this class
considered direct and indirect as well as sequential and simultaneous ap-
proaches. We presented in more detail the direct multiple shooting method
for optimal control, a hybrid approach that can be located between sin-
gle shooting and collocation methods. It is known for its excellent conver-
gence properties, yields a highly structured NLP, but allows at the same
time the use of state–of–the–art adaptive solvers for the IVPs. The resulting
discretized OCPs are best treated by SQPs methods which will be investi-
gated from different points of view in several places in this thesis.
2 Mixed–Integer Optimal Control

In this chapter we extend the problem class of continuous optimal control


problems discussed in chapter 1 to include control functions that may at
each point in time attain only a finite number of values from a discrete set.
We briefly survey different approaches for the solution of the discretized
Mixed–Integer Optimal Control Problem (MIOCP), such as Dynamic Pro-
gramming, branching techniques, and Mixed–Integer Nonlinear Program-
ming methods. These approaches however turn out to be computationally
very demanding already for off–line optimal control, and this fact becomes
even more apparent in a real–time on–line context. The introduction of an
outer convexification and relaxation approach for the MIOCP class allows to
obtain an approximation of the MIOCP’s solution by solving only one single
but potentially much larger continuous optimal control problem using the
techniques of chapter 1. We describe theoretical properties of this problem
reformulation that provide bounds on the loss of optimality for the infinite
dimensional MIOCP. Rounding schemes are presented for the discretized
case that maintain these guarantees. We develop techniques for the intro-
duction of switch costs into the class of MIOCPs and give reformulations
that allow for a combination with direct multiple shooting and outer con-
vexification.

2.1 Problem Formulations

We consider in this chapter the extension of the Optimal Control Problem


(OCP) class of chapter 1 to the following class of Mixed–Integer Optimal
Control Problems (MIOCPs).

Definition 2.1 (Mixed–Integer Optimal Control Problem)


A Mixed–Integer Optimal Control Problem (MIOCP) is a continuous optimal control
problem with integer feasibility requirement on a subset of the control trajectories
of the following form:

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8_3,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
32 2 Mixed–Integer Optimal Control

 tf

min x (t f , m(t f )) + l(t, x (t), u(t), w (t)) dt (2.1)


x (·),u(·),w (·)
t0

s. t. ẋ (t) = f (t, x (t), u(t), w (t)), t ∈T,


eq
0 = ri (t i , x (t i )), {t i }0inr ⊂ T ,
0  riin (t i , x (t i )), {t i }0inr ⊂ T ,
0  c(t, x (t), u(t), w (t)), t ∈T,
nw
w (t) ∈ Ω ⊂  , t ∈T, |Ω| = nΩ < ∞.

In addition to the conventions of definition 1.1, the dynamic process x (·) is affected
w
by an additional vector–valued control function w : T → Ω ⊂ n , t → w (t) which
def nΩ w
only attains values from a finite discrete set Ω = {ω , . . . , ω } ⊂ n with cardinality
1

|Ω| = nΩ < ∞. 

This problem class differs from the class of OCPs treated in chapter 1 by
the integer feasibility requirement imposed on the additionally introduced
control function w : T → Ω. Here nw denotes the number of scalar integer
control functions, and nΩ denotes the finite number of discrete choices the
vector valued integer control trajectory w (·) can attain at each point in
time. For the discussion in this chapter, we restrict the problem class (2.1)
to binary control functions w (t) ∈ {0, 1}n , i.e., nΩ = 2n .
w w

Remark 2.1 (Restriction to Binary Control Functions)


The restriction to binary control functions is not substantial as it is possible to re-
v
formulate any MIOCP involving integer control functions v(t) ∈ {v 1 , . . . , v n } ⊂  by
transformation of the model functions to v̂(t) ∈ {1, . . . , nv } ⊂  and letting
v
def


log 2n

v̂(t) = 1 + 2i w i (t). (2.2)


i=1

This reformulation requires


log2 nv binary control functions w i (t) to replace v(t).

2.2 Mixed–Integer Nonlinear Programming

2.2.1 Discretization to a Mixed–Integer Nonlinear Program

A straightforward approach to solving problem (2.1) is to apply one of the


discretization approaches for optimal control presented in chapter 1, i.e.,
collocation or direct shooting methods. The discretization variables intro-
duced for a piecewise constant discretization of the integer control function
2.2 Mixed–Integer Nonlinear Programming 33

w (·) then inherit the integrality property. This approach yields a Mixed–
Integer Nonlinear Program (MINLP) in place of the continuous NLP (1.24).
The multiple shooting discretization of this problem is given in the following
definition.
Definition 2.2 (Multiple Shooting Discretized MIOCP)
The multiple shooting discretized counterpart of the mixed–integer optimal control
problem (2.1) with binary control functions is


m
min l i (t i , si , q i , wi ) (2.3)
s,q,w
i=0

s. t. 0 = x i (t i+1 ; t i , si , bi (t i , q i ), wi ) − si+1 , 0  i  m − 1,
eq
0 = ri (t i , si , bi (t i , q i ), wi ), 0  i  m,
0 riin (t i , si , bi (t i , q i ), wi ), 0  i  m,
0  ci (t i , si , bi (t i , q i ), wi ), 0  i  m,
w
wi ∈ {0, 1}n , 0  i  m. 

This multiple shooting discretized MIOCP can be cast as a MINLP as follows.

Definition 2.3 (Mixed–Integer Nonlinear Program)


A Mixed–Integer Nonlinear Program (MINLP) is a Nonlinear Program (NLP) in the
x w
unknowns x ∈ n and w ∈ n with binary feasibility requirement imposed on w ,

min f (x , w ) (2.4)
x ,w

s. t. 0 = g (x , w ),
0  h(x , w ),
w
w ∈ {0, 1}n . 

Note that in this formulation w contains the binary control variables wi of


all shooting nodes 0  i  m − 1, thus nw has grown by a factor m compared
to the last section.

The class of MINLP problems is N P –hard [78]. Hence, there exist in-
stances of problem (2.4) than cannot be solved in polynomial runtime on a
deterministic machine. Moreover, this fact serves as a first indicator that
computing exact solutions to problems of practical interest in real–time is
likely to be a most challenging task. In this section we briefly mention var-
ious approaches targeted either at solving the MIOCP or the MINLPs to
optimality, or at approximating a local or global solution.
34 2 Mixed–Integer Optimal Control

2.2.2 Enumeration Techniques

Full Enumeration

A naïve approach to solving (2.4) is to fix the binary control variables for


every possible choice of w and solve a continuous optimal control problem.
The solution process either indicates infeasibility of the problem given the
chosen w , or yields an optimal objective function value f (w ). The MINLP’s
optimal solution is choice w  that resulted in the smallest objective of the
associated continuous problem. It is a global solution if all solvable contin-
uous OCPs have been solved to global optimality.
The obvious drawback of this approach is the exponentially increasing
w
number of 2n continuous optimal control problems that have to be solved.
Even for a scalar binary control function, the optimal solutions of 2m mul-
tiple shooting discretized NLPs need to be computed. The computational
effort very quickly becomes prohibitive.

Dynamic Programming

The principle and technique of dynamic programming has already been


presented in section 1.2.2 for continuous optimal control problems. There
we needed to choose a discretization of the continuous control space. For
the integer controls w (·), this discretization is given in a natural way and
from this point of view, mixed–integer optimal control problems are obvi-
ous candidates for treatment by dynamic programming approaches. Still,
the curse of dimensionality prevents computational access to problems with
more than a few system states.
Some examples of MIOCPs that have been solved using dynamic program-
ming techniques with applications in the automotive control area can be
found in [42, 103]. Fulfilling real–time constraints on the computation times
has however been shown to be possible only by precomputation or by dras-
tically reducing the search space.

2.2.3 Branching Techniques

Branch & Bound

Branch & Bound is a general framework for the solution of combinatorial


problems that improves upon full enumeration of the search space. The fun-
2.2 Mixed–Integer Nonlinear Programming 35

damental idea is to perform a tree search in the space of binary or integer


variables, and to solve a continuous linear or nonlinear problem in every
node of the tree. The search tree’s root node holds a complete relaxation of
the (mixed–)integer problem. Descending the tree’s branches to its leaves,
more and more integer variables get fixed to one of the admissible choices.
This amounts to recursively partitioning the original problem into multiple
smaller subproblems, each giving a lower bound for the objective of all leaf
problem on the branch. The minimum of the optimal solutions found for
these subproblems is the optimal solution of the original problem.

The recursive partitioning process can be bounded whenever a subprob-


lem is found to be infeasible or an integer solution is found for it. In the
first case, further branching is unneccesary as all problems on the subtree
will be infeasible as well. In the second case, an upper bound to the original
problem’s objective is found. Subproblems with higher objective – being a
lower bound — need not be branched on as all subproblems on the subtree
will be suboptimal as well.

In practice, good heuristics for the choice of the next subproblem and the
selection of fractional variables to branch on are crucial to quickly obtain
feasible solutions and tight upper bounds. This avoids visits to all possible
subproblems, in which case Branch & Bound would degenerate to full enu-
meration again. Such heuristics frequently must be tailored to the specific
problem under investigation, and details can be found in e.g. [58, 140].

The first Branch & Bound algorithm for integer linear programming is
due to [49, 128]. Extensions to convex nonlinear mixed–integer problems
can e.g. be found in [19, 39, 135, 136].

Branch & Cut

The fixation of binary or integer variables to a selected admissible value in


the above Branch & Bound algorithm can be regarded as the introduction
of additional inequality constraints x i  x i and x i 
x i respectively for
a fractional relaxed optimal solution x  . These constraints cut off a part
of the feasible set of the preceding problem, and this concept is further
generalized in the Branch & Cut method that adds cutting planes to the
subproblems as the method descends the search tree’s branches.

In the linear case, the optimal solution is known to coincide with a vertex
of the convex hull of the feasible set. The algorithm then aims at adding
36 2 Mixed–Integer Optimal Control

cutting planes to the subproblems until the convex hull in a neighborhood


of the optimal integer solution is approximated well enough for the relaxed
solution to be integer.
Earliest sources for cutting planes methods can be found in [48, 90].
Again, the determination of strong cutting planes that retain all integer
solutions and invalidate as much as possible of the relaxed feasible set is
crucial and subject of intense research efforts, see e.g. [95, 110, 159, 207].
The application of Branch & Cut to nonlinear integer programs is subject to
ongoing research, see [159, 207].
In the case of a MIOCP, every tree node would hold a separate continuous
optimal control problem, and a full evaluation of the search tree would have
to be carried out to find an optimal mixed–integer control feedback. Clearly,
the achievable run times are not likely to be competitive. An application of
a Branch & Bound technique to an offline time optimal MIOCP can be found
in [80].

2.2.4 Outer Approximation

Outer Approximation

The Outer Approximation method due to [59] was developed for convex
MINLPs explicitly. It aimed at avoiding the potentially large number of NLPs
to be solved in a branching method by replacing them with more accessi-
ble Mixed–Integer Linear Programs (MILPs), for which advanced techniques
and solvers have been readily available. To this end, an alternating sequence
of MILPs, called master problems, and NLPs is solved. Therein, the MILP
yields an integer solution and a lower bound to the original problem’s solu-
tion while the NLP with fixed integer variables yields — if feasible — yields
an upper bound and a new linearization point, improving the outer approx-
imation of the convex feasible set by linearizations of the constraints.
For applications of Outer Approximation to MIOCPs with time–indepen-
dent binary variables we refer to [93, 160].

Generalized Bender’s Decomposition

Generalized Bender’s decomposition, first described by [79], is older than


outer approximation and a straightforward comparison reveals that it is
identical except for a weaker formulation of the master program, e.g. [74].
2.2 Mixed–Integer Nonlinear Programming 37

LP/NLP based Branch & Bound

The number of MILPs to be solved in an Outer Approximation method


can possibly be further reduced by an LP/NLP based branch & Bound, cf.
[38, 135, 172]. A single master MILP problem is solved by a Branch & Bound
type method. An NLP is then solved for every feasible point giving a possibly
tightened upper bound to the original problem’s solution. Linearizations of
the constraints in the obtained solution are added to the outer approxima-
tion of the feasible set, and pending subproblems in the Branch & Bound
search tree are updated appropriately before continuing the descent along
the tree’s branches.

2.2.5 Reformulations

The difficulty of the problem class (2.1) comes from the integer restrictions
on some of the control variables. The idea of replacing the integrality re-
quirement by adding one or more constraints to the continuous formulation
therefore is of obvious appeal. To this end, several propositions can be found
in the literature.

Relaxation and Homotopies

A first approach is to replace for w i ∈ {0, 1} by the set of constraints

w i (1 − w i ) = 0, w i ∈ [0, 1] ⊂ .

The feasible sets coincide, and the reformulation thus is exact. As the first
constraint is nonconvex, the feasible set is disjoint, and Linear Indepen-
dence Constraint Qualification (LICQ) is violated, descent based methods
such as Sequential Quadratic Programming (SQP) show bad performance
on this reformulation. This situation can be ameliorated to a certain extent
by introducing the formulation

w i (1 − w i )  β, w i ∈ [0, 1] ⊂ ,

together with a homotopy β → 0+ . This technique has found applications in


the field of Mathematical Programs with Equilibrium Constraints (MPECs),
cf. [16, 137, 144, 173, 174]. Geometrically motivated reformulations of less
general applicability have been proposed by e.g. [173] for the feasible set
38 2 Mixed–Integer Optimal Control

{(0, 1), (1, 0)} ⊂ 2 and homotopies for relaxation are applied here as well.
In [137] the Fischer–Burmeister function

F FB (w1 , w2 ) = w1 + w2 − w12 + w22

which is zero if (w1 , w2 ) is binary feasible, is used to extend an SQP method


to treat MPECs. We’ll revisit some of these reformulations in chapter 5.
The disadvantage of virtually all reformulation for Nonlinear Model Pre-
dictive Control (NMPC) is that they involve a homotopy parameter that
needs to be driven to zero or infinity in order to approach the MIOCP’s
solution. This requires the solution of multiple optimal control problems at
an increased computational effort. Moreover, the homotopy steps can in ge-
neral not be determined a priori, such that bounds on the computation time
for the solution of an MIOCP cannot be established.

Convexification and Relaxation

As we have seen, all presented methods require for the case of MIOCP the
solution of a potentially large number of discretized optimal control sub-
problems. In view of the fast solution times required for the computation
of the control feedback, such techniques are unlikely to be successful ap-
proaches for fast mixed–integer NMPC. We therefore continue our presenta-
tion with the introduction of a convexification and relaxation approach that
serves to obtain a good approximation of a local solution of the discretized
MIOCP by solving only a single but possibly larger discretized OCP.

Convexification and relaxation approaches aim at reformulating (2.4) as


a purely continuous NLP for which computationally highly efficient solu-
tion methods exist and are presented in the sequel of this thesis. The cru-
cial point here is that the reformulation should be as tight as possible in
the sense that the feasible set is enlarged as little as possible compared to
the original MINLP. The reader is referred to e.g. [125] for reformulations
of a number of popular combinatorial problems. We mention here two ap-
proaches named inner convexification and outer convexification that have
found application to MINLPs arising from the discretization of MIOCPs in
e.g. [130, 131, 141, 183, 185], and our contributions [119, 120, 122, 187].
The term convexification in the following refers to a convex reformulation
of the dynamics – and later also the constraints – of problem (2.4) with re-
spect to the integer control. All other parts of the discretized optimal control
2.2 Mixed–Integer Nonlinear Programming 39

problem remain untouched and hence possibly nonlinear and/or nonconvex.


In this sense the techniques to be presented are partial convexifications
of the problem with respect to a selected subset of the unknowns only. In
the next section we study in detail the outer convexification and relaxation
technique.

Inner Convexification

A naïve idea for transforming problem (2.1) into a purely continuous NLP is
to simply drop the integrality requirement on the unknown w . This requires
that all model functions, comprising the objective function, the Ordinary
Differential Equation (ODE) system’s right hand side function, and all con-
straint functions can be evaluated in fractional points of the space of un-
knowns, and yield meaningful results that do not prevent optimal solutions
from being found. The locally optimal solution found for the NLP obtained
by the inner convexification approach will in general not be an integer one.
Guarantees for integer feasibility of a rounded solution in the neighborhood
of the locally optimal one can in general not be derived, nor can bounds
on the loss of optimality be given. This approach has been used for mixed–
integer optimal control in e.g. [80] in combination with a branching algo-
rithm to overcome the mentioned problems.

Outer Convexification

Outer convexification due to [183] introduces a new binary variable ωi ∈


{0, 1} (note the subscript index) for each choice ωi (indicated by a super-
script index) contained in the set Ω of feasible choices for the discrete con-
trol. All model functions directly depending on the integer control function
w (·) are partially convexified, i.e., convexified with respect to this integer
control only. The introduced binary variables ωi act as convex multipliers.
Replacing the binary variables ωi by relaxed ones αi ∈ [0, 1] ⊂  is referred
to as relaxation. The outer convexification reformulation ensures that even
after relaxation all model functions are evaluated in integer feasible choices
from the set Ω only. Bounds on the loss of optimality can be established
as will be shown in the next section. In addition, we develop here and in
chapter 5 the application of outer convexification to constraints directly
depending on a binary or integer control function, and show how integer
feasibility can be guaranteed after rounding of the possibly fractional solu-
tion obtained for the NLP. For certain optimal control problems that enjoy
40 2 Mixed–Integer Optimal Control

a bang–bang property, the convexified and relaxed OCP’s locally optimal


solution itself can be shown to be an optimal solution of the MIOCP.

Example 2.1 (Inner and Outer Convexification)


To stress the difference between the two proposed convexification approaches for
nonlinear functions, we exemplarily study the function f (x, w) = (x − 3w)2 depend-
ing on the continuous variable x ∈  and the integer variable w ∈ . The graph
g r f w (x) of this function for integer and relaxed choices of w is shown in figure 2.1.
Inner convexification of f (x, w) with respect to the integer variable w effectively
means dropping the integer constraint on w . Outer convexification of f (x, w), here
for the choices w ∈ Ω = {ω1 , ω2 , ω3 } = {−1, 0, 1}, yields after relaxation
def
f OC (x, α) = α1 f (x, −1) + α2 f (x, 0) + α3 f (x, 1),
1 = α1 + α2 + α3 , α ∈ [0, 1]3 .

If f contributes to the objective function, inner convexification results for relaxed


choices of w in objective function values unattainable for integer choices. If the
graph of f denotes the border of the feasible set, inner convexification leads to
constraint violations for relaxed choices of w . Outer convexification offers a remedy
for both situations, as we will see in the next section.

10 10

5 5

0 0
-2 0 2 -2 0 2
(a) Inner convexification of f (x, w). (b) Outer convexification of f (x, w).

Figure 2.1: Inner and outer convexification at the example f (x, w) = (x −


3w)2 . (—) shows the function’s graph for the integer choices w ∈
{−1, 0,
 1} and (—) shows the function’s graph in the relaxed choices
w ∈ − 34 , − 12 , − 14 , 14 , 12 , 34 for inner convexification and corresponding
 
3 1 1 1 1 3 3 1 1 1 1 3
choices α ∈ ( , , 0), ( , , 0), ( , , 0), (0, , ), (0, , ), (0, , ) for
4 4 2 2 4 4 4 4 2 2 4 4
outer convexification.
2.3 Outer Convexification and Relaxation 41

2.3 Outer Convexification and Relaxation

In this section we investigate the approximation of solutions of MIOCPs by


solving a convexified and relaxed counterpart problem. To this end it is cru-
cial to derive maximal lower bounds on the attained objective value in order
to judge on the quality of the obtained solution. For nonlinear or nonconvex
problems, the relaxed solution will in general not be binary feasible and the
optimal objective function value can in general not be attained by a binary
feasible solution.

The results of this section were first presented in [183] and apply to
the infinite–dimensional MIOCP prior to any discretization taking place. We
present bounds on the objective function and the constraint residuals of
the optimal solutions obtained when applying the outer convexification ap-
proach to the MIOCP. We also state the bang–bang principle which allows
to deduce binary feasibility and optimality of relaxed solutions for certain
linear optimal control problems.

2.3.1 Convexified and Relaxed Problems

For the presentation of theoretical results we restrict ourselves to the fol-


lowing more limited problem class of MIOCPs.

Definition 2.4 (Binary Nonlinear Problem)


The class of binary nonlinear optimal control problems is the following subclass of
(2.1),

min ϕ(x (·), u(·), w (·)) (BN)


x (·),u(·),w (·)

s. t. ẋ (t) = f (x (t), u(t), w (t)), t ∈ T ,


x (t 0 ) = x 0 ,
w
w (t) ∈ {0, 1}n , t ∈T. 

Here we consider the minimization of an objective function computed from


the trajectories of an unconstrained Initial Value Problem (IVP) controlled
by continuous and binary control functions. The set of admissible choices for
w
the binary control here is Ω = {0, 1}n and the set members ωi enumerate
all nΩ = 2n possible assignments of binary values to the components of
w

w (t).
42 2 Mixed–Integer Optimal Control

Definition 2.5 (Relaxed Nonlinear Problem)


The relaxed nonlinear variant of (BN) is the continuous optimal control problem

min ϕ(x (·), u(·), w (·)) (RN)


x (·),u(·),w (·)

s. t. ẋ (t) = f (x (t), u(t), w (t)), t ∈ T ,


x (t 0 ) = x 0 ,
w
w (t) ∈ [0, 1]n , t ∈T. 

Clearly due to the relaxation that equals the inner convexification approach
described above, the right hand side function f (·) will be evaluated in non–
integer choices for the relaxed binary control w (t).

We now introduce counterparts to the above two problems obtained by


w
applying outer convexification to the set Ω = {0, 1}n of discrete choices.
For each choice w (t) = ω ∈ Ω we introduce a new binary control function
i

ωi (t) indicating whether or not the choice ωi was made at time t ∈ T .


Definition 2.6 (Binary Convexified Linear Problem)
The binary convexified linear problem is the following convexified counterpart of
problem (BN),
w

2n
min ϕ(x (·), u(·), ωi ) ωi (·) (BC)
x (·),u(·),ω(·)
i=1
w

2n
s. t. ẋ (t) = f (x (t), u(t), ωi ) ωi (t), t ∈ T ,
i=1

x (t 0 ) = x 0 ,
nw
ω(t) ∈ {0, 1}2 , t ∈T,
w

2n
1= ωi (t), t ∈T. (2.5)
i=1 

Here the constant parameters ωi indicate evaluation of the right hand side
f (·) in the admissible choice w (t) = ωi . The Special Ordered Set (SOS)
type 1 property holds for the trajectory of convex multipliers ω(·) and is
enforced by the additionally imposed constraint (2.5).

Definition 2.7 (Special Ordered Set Property)


We say that the variables ω1 , . . . , ωn fulfill the special ordered set type 1 property if
they satisfy
2.3 Outer Convexification and Relaxation 43


n
ωi = 1, ωi ∈ {0, 1}, 1  i  n. (SOS1)
i=1 

The relaxed counterpart problem to (BC) is given in the following definition.

Definition 2.8 (Relaxed Convexified Linear Problem)


The relaxed convexified linear problem is the convexified counterpart of (RN) and
the relaxed counterpart of (BC), the continuous optimal control problem
w

2n
min ϕ(x (·), u(·), ωi ) αi (·) (RC)
x (·),u(·),α(·)
i=1
w

2n
s. t. ẋ (t) = f (x (t), u(t), ωi ) αi (t), t ∈ T ,
i=1

x (t 0 ) = x 0 ,
nw
α(t) ∈ [0, 1]2 , t ∈T,
w

2n
1= αi (t), t ∈T. 
i=1

Remark 2.2 (Combinatorial Explosion)


The convexified problems (BC) and (RC) involve a number of control functions ω(·)
resp. α(·) that grows exponentially with the number nw of binary control trajecto-
ries w (·) in problem (BN). Still for most practical problems it is possible to eliminate
many binary combinations for w (·) that are physically meaningless or can be logi-
cally excluded. The number of binary controls after convexification is e.g. linear in
nw in the applications [119, 120, 122, 183, 185, 209]. A second consequence of this
convexification is the need for tailored structure exploiting algorithms that can treat
problems with a large number of control parameters efficiently. We revisit this ques-
tion when we discuss such methods in chapter 7.

Remark 2.3 (Scalar Binary Control Functions)


For scalar binary control functions w(·) with nw = 1 the nonlinear and the convex-
ified formulation have the same number of control functions. If the problems (BN)
and (RN) are affine linear in w (·), the nonlinear and the convexified formulations
are identical.

Remark 2.4 (Elimination using the SOS1 Constraint)


The SOS1 constraint allows the elimination of one binary control function ωi (·),
44 2 Mixed–Integer Optimal Control

(BN) (BC)
convexification

relaxation relaxation

(RN) (RC)

Figure 2.2: Relation of the four auxiliary problems.

which can be replaced by


w

2n
ωi (t) = 1 − ω j (t), t ∈T. (2.6)
j=1
j=i

The same is obviously true for the relaxed counterpart function α(·). In mixed–
integer linear programming, this elimination is usually avoided as it destroys to a
certain extent the sparsity structure present in the constraints matrices. For the di-
rect multiple shooting discretization, this elimination has shown itself to be of advan-
tage for some MIOCPs. Sparsity of the node constraint Jacobians is usually not ex-
ploited and the number of active set iterations spent in the Quadratic Program (QP)
subproblem solution tends to become smaller.

2.3.2 The Bang–Bang Principle

The convexified relaxed control trajectories αi (·) may be optimal on the


boundary or in the interior of [0, 1] ⊂ . In this section we use the bang–
bang principle to show that for a certain subclass of optimal control prob-
lems, the relaxed optimal solutions come to lie on the boundary of the unit
hypercube and are thus binary feasible without any further effort. We con-
sider linear control problems of the following structure.
Definition 2.9 (Linear Control Problem)
The problem

ẋ (t) = A(t)x (t) + B(t)u(t), t ∈ T , (2.7)


x (t 0 ) = x 0 ,
u lo  u(t)  u up , t ∈T,
2.3 Outer Convexification and Relaxation 45

u
is referred to as a linear control problem. The function u : T → n , t → u(t) shall
be measurable and satisfy lower and upper bounds u lo and u up . The matrix functions
x x x u
A : T → n ×n , B : T → n ×n shall be continuous. 

We require the definition of the controllable set, and define further two
classes U meas and U bb of control functions as follows.
Definition 2.10 (Controllable Set)
x
The controllable set at time t ∈ T is the set of all points x 0 ∈ n that can be steered
back to the origin x (t) = 0 in time t by control functions from a given set U ,
  
C (U , t) = x 0 ∈ n  ∃u(·) ∈ U : x (t; x 0 , u(·)) = 0
def x
(2.8)

The controllable set is defined to be the union of all controllable sets at time t ,
def

C (U ) = C (U , t) (2.9)
t>0 

Definition 2.11 (Set of measurable control functions)


The set U meas of measurable control functions is defined as
  
U meas = u : T → n  u(·) measurable .
def u
(2.10)


Definition 2.12 (Set of bang–bang control functions)


The set U bb of bang–bang control functions is defined as
  
U bb = u : T → n  t ∈ T , 1  i  nu : ui (t) = ui ∨ ui (t) = ulo
def u up
i
. (2.11)


With these definitions, the bang–bang principle can be stated as follows.


Theorem 2.1 (Bang–bang principle)
For the class of linear control problems (2.7) it holds that

C (U meas , t) = C (U bb , t) t > 0. (2.12)

This set is compact, convex, and continuous in t . 

Proof Proofs can be found in [104] and [146]. 

An immediate consequence of theorem 2.1 is that binary feasible and


optimal solutions to a linear time–optimal MIOCP coincide with optimal so-
lutions of the OCP obtained using the outer convexification and relaxation
46 2 Mixed–Integer Optimal Control

reformulation, cf. [122, 183, 184, 185, 187] for applications. On a given dis-
cretization grid, this holds for the discretized OCP’s solution except in the
neighborhood of switching points of the convex multiplier trajectories α(·).
If those do not fall onto grid points of the control discreization grid, frac-
tional solutions may be obtained on the corresponding shooting interval, cf.
[122, 183].
Remark 2.5 (Bang–Bang Optimal Problems and Active Set Methods)
Exploiting the bang–bang property also in the numerical methods used to solve the
convexified and relaxed NLP is crucial to achieve maximum computational efficiency.
Controls that enter linearly should be removed from a major part of the involved
linear algebra by suitable active set methods as soon as they attain one of the two
extremal values. We revisit this question in chapter 7.

2.3.3 Bounds on the Objective Function

For nonlinear or nonconvex problems, the bang–bang principle 2.1 does not
hold, and the relaxed solution will in general not be binary feasible. In this
setion, bounds on the objective function gap and the constraint residual gap
are presented that correlate the auxiliary problems to each other.
Theorem 2.2 (Objective functions of (BN) and (BC))
The binary nonlinear problem (BN) has an optimal solution (x  , u  , w  ) if and only
if the binary convexified problem (BC) has an optimal solution (x  , u  , ω ). Their
objective function values ϕ BN and ϕ BC are identical. 

Proof A proof can be found in [183]. 

Theorem 2.2 holds for the pair of binary problems only and is in general
not true for the pair of relaxed problems. This is evident as the feasible set
of (RN) will in general be larger than that of (RC) as could already be seen
in example 2.1. We can however relate the solutions of (BC) and (RC) to
each other, which shows the advantage of the convexified formulation (RC)
over the nonlinear formulation (RN).
Theorem 2.3 (Objective functions of (BC) and (RC))
Let (x  , u  , α ) be an optimal solution of the relaxed convexified problem (RC) with
objective function value ϕ RC . Then for every
> 0 there exists a binary feasible con-
trol function ω
and a state trajectory x
such that (x
, u  , ω
) is a feasible solution
of (BC) with objective function value ϕ
BC and it holds that ϕ
BC  ϕ RC +
. 

Proof A proof can be found in [183]. 


2.3 Outer Convexification and Relaxation 47

A synthesis of the interrelations of the optimal solutions of the four auxil-


iary problems can now be given in the form of the following theorem.

Theorem 2.4 (Objective Functions of the Auxiliary Problems)


Let (x  , u  , α ) be an optimal solution of the relaxed convexified problem (RC) with
objective function value ϕ RC . Then for every
> 0
w
1. there exists a binary feasible 2n –dimensional control function ω
and a state
trajectory x
such that (x
, u  , ω
) is a feasible solution of (BC) with objective
function value ϕ
BC ,

2. there exists a binary feasible nw –dimensional control function w


such that
(x
, u  , w
) is a feasible solution of (BN) with objective function value ϕ
BN ,

3. it holds for the objective function values that

ϕ RN  ϕ RC  ϕ
BC = ϕ
BN  ϕ RC +
. 

Proof A proof can be found in [183]. 

The optimal solution of an OCP can thus be approximated arbitrarily close


by a feasible solution on the boundary of the feasible region of the relaxed
control functions.

2.3.4 Bounds on the Infeasibility

The four auxiliary problems formulation in section 2.3.1 depart from the
more general class of MIOCPs in a single but critical way: We have so far
assumed that no path constraints are present.

Binary Control Independent Path Constraints

Concerning the introduction of path constraints, we distinguish two sub-


stantially different cases. For inequality path constraints c(x (·), u(·), p) that
do not explicitly depend on the binary control function w (·), these con-
straints can be satisfied to any prescribed tolerance with bang–bang con-
trols w̃ (·) by virtue of theorem 2.4 as the state trajectory x (·) can be ap-
proximated arbitrarily close.
48 2 Mixed–Integer Optimal Control

General Path Constraints

If the binary control function w (·) enters the path constraints c(·) explicitly,
the picture is different. The bang–bang control ω(·) may lead to violations
of the path constraints that could be satisfied by the relaxed trajectory α(·)
and moreover, the original problem may not even have a binary feasible
solution as the following example due to [183, 186] shows.
Example 2.2 (Path constraints depending on a binary control function)
Consider for problem (BN) the one–dimensional control constraint
 
1 − 10−n − w(t)
0  c(w (t)) = , n  1.
w(t) − 10−n

These constraints exclude all binary feasible solutions for w(·), while the relaxed
problem (RC) may still have a feasible solution in the interior of T × [0, 1].

Outer Convexification of Constraints

One remedy is to extend the outer convexification approach to those con-


straint functions that directly depend on the binary control. For the above
example 2.2 this results in the following formulation with convex relaxed
multiplier functions α1 (·), α2 (·) ∈ [0, 1] and four constraints instead of two,
⎡ ⎤
⎢ α1 (t)(1 − 10−n ) ⎥
⎢ −α2 (t)10−n ⎥
0c OC
(w (t)) = ⎢

⎥,
⎥ n  1, α1 (t) + α2 (t) = 1.
⎣ α2 (t)(1 − 10−n ) ⎦
−α1 (t)10−n

In this variant a feasible solution does not exist even for the convexified and
relaxed problem (RC), which immediately allows to verify infeasibility of the
original problem (BN). This reformulation however has a number of implica-
tions for the NLPs obtained from transferring (2.3) into its convexified and
relaxed counterpart problem. Chapters 5 and 6 are dedicated to this issue.

2.4 Rounding Strategies

For practical computations we will usually be interested in solving the con-


vexified relaxed counterpart problem (RC) by means of one of the optimal
2.4 Rounding Strategies 49

control problem solving algorithms of chapter 1, and construct an integer


feasible solution from the relaxed optimal one. To this end we discuss in this
section the construction and application of rounding schemes. We assume a
relaxed optimal solution α (·) of the convexified relaxed problem (RC) to be
available. In general, α (·) will not be binary feasible, and so we are inter-
ested in the reconstruction of binary feasible solutions. We present direct
and sum–up rounding schemes due to [183] that respect the SOS1 property,
and give a bound due to [186, 188] on the loss of optimality of the rounded
solution.

2.4.1 The Linear Case

We first consider rounding strategies in the case of nw binary control func-


tions w (·) entering linearly, in which case no convexification is required
and relaxation can be applied immediately. We first define the two rounding
strategies.
Definition 2.13 (Direct Rounding)
Let α (·) be the solution of (RC). Then the direct rounding solution ω(t) = pi ∈
def

w
{0, 1}n for t ∈ [t i , t i+1 ] on the grid {t i }, 0  i  m is defined by
  t i+1
def 1 if αj (t) dt  12 ,
pi, j = ti 1  j  nw . (2.13)
0 otherwise. 

Definition 2.14 (SUR–0.5 Rounding)


Let α (·) be the solution of (RC). Then the sum–up rounding solution ω(t) = pi ∈
def

w
{0, 1}n for t ∈ [t i , t i+1 ] on the grid {t i }, 0  i  m obtained by applying strategy
SUR–0.5 is defined by
  t i+1 i−1
def 1 if t αj (t) dt − k=0 pk, j  12 ,
pi, j = 0 1  j  nw . (2.14)
0 otherwise. 

Direct rounding is immediately obvious, but does not exploit the fact that
the p j belong to a control trajectory in time. Figure 2.3 illustrates the idea
of sum–up rounding which strives to minimize the deviation of the control
integrals at any point t on the time horizon T ,
 
 t 
 
 ω(τ) − α(τ) dτ .
 t 
0
50 2 Mixed–Integer Optimal Control

This strategy is easily extended to non–equidistant discretizations of the


control. The following theorem allows to estimate the deviation from the
relaxed optimal control based on the granularity of the control discretization
if the strategy SUR–0.5 is applied.
Theorem 2.5 (Sum–up Rounding Approximation of the Control Integral)
w
Let α(t) : T × [0, 1]n be a measurable function. Define on a given approximation
def w
grid {t i }, 0  i  m, a binary control trajectory ω(t) = pi ∈ {0, 1}n for t ∈ [t i , t i+1 ]
  t i+1 i−1
def 1 if α j (t) dt − pk, j δt k  12 δt i ,
pi, j = t0 k=0
1  j  nw (2.15)
0 otherwise.

Then it holds for all t ∈ T that


 
 t 
  1
 ω(τ) − α(τ) dτ  max δt i . (2.16)
 t  2 i
0 ∞ 

Proof A proof can be found in [186]. 

For control affine systems, the deviation of the state trajectory after
rounding x (t; x 0 , ω(·)) from the relaxed optimal one x (t; x 0 , α(·)) can be
bounded using the following important result based on theorem 2.5 and
Gronwall’s lemma.
Theorem 2.6 (Sum–up Rounding of the State Trajectory)
def
Let two initial value problems be given on the time horizon T = [t 0 , t f ],

ẋ (t) = A(t, x(t))α(t), t ∈T, x (t 0 ) = x 0 ,


ẏ(t) = A(t, y(t))ω(t), t ∈T, y(t 0 ) = y0 ,
w x
for given measurable functions α(t), ω(t) : T → [0, 1]n and for A : T × n →
x w
n × n differentiable. Assume that there exist constants C, L ∈ + such that it
holds for t ∈ T almost everywhere that
 
 d 
 A(t, x (t))  C,
 dt 
   
A(t, x (t)) − A(t, y(t))  L  x (t) − y(t) ,

x
and assume that A(·, x (·)) is essentially bounded on T × n by a constant M ∈ + .
Assume further that there exists a constant
> 0 such that it holds for all t ∈ T that
 
 t 
 
 ω(s) − α(s) ds 
.
 0 
2.4 Rounding Strategies 51

Then it holds for all t ∈ T that


    
 y(t) − x (t)   y − x  + (M + C(t − t ))
exp(L(t − t )). (2.17)
0 0 0 0


Proof A proof can be found in [186]. 

2.4.2 The Nonlinear Case

In the presence of SOS1 constraints that arise from outer convexification,


the above rounding strategies are not directly applicable as the rounded so-
lution ω(·) may violate the SOS1 property. More specifically, the SOS1 prop-
erty e.g. is satisfied after rounding if there exists for all t ∈ T a component
αj (t)  12 of the relaxed optimal trajectory α (t). The following modifica-
tions of the above two schemes are proposed in [183, 186].
Definition 2.15 (Direct SOS1 Rounding)
Let α (·) be the solution of (RC). Then the direct SOS1 rounding solution ω(t) =
def

w
pi ∈ {0, 1}n for t ∈ [t i , t i+1 ] ⊂ T on the grid {t i }, 0  i  m is defined for 1  j  nw
by
⎧  t i+1  t i+1
1 if (∀k : α̃i j (t) dt  t α̃ik (t) dt)
def
⎨  tti+1
i  t i+1
i
pi, j = ∧ (∀k, αi j (t) dt = t α̃ik (t) dt : j < k), (2.18)
⎩ ti i

0 otherwise.

This rounding strategy chooses for each shooting interval the largest re-
laxed optimal choice q̃i, j amongst all choices 1  j  nw . If the index j of the
largest choice is not unique, smaller indices are arbitrarily preferred. The
equivalent for sum–up rounding is given in the following definition.
Definition 2.16 (SOS1–SUR Rounding)
Let α (·) be the solution of (RC). Let further control differences p̂i j for the j -th step
of sum–up rounding be defined as
 ti
i−1
αj (t) dt −
def
p̂i, j = pk, j . (2.19)
t0 k=0

def
Then the sum–up rounding solution ω(t) = pi for t ∈ [t i , t i+1 ] ⊂ T on the grid {t i },
0  i  m obtained by applying strategy SOS1–SUR–0.5 is defined for 1  j  nw by

def 1 if (∀k : p̂i, j  p̂i,k ) ∧ (∀k, p̂i, j = p̂i,k : j < k),
pi, j = (2.20)
0 otherwise.

52 2 Mixed–Integer Optimal Control

The following variant of theorem 2.5 holds for the control approximation
obtained from application of the SOS1–SUR–0.5 rounding scheme to the
relaxed optimal control trajectory.
Theorem 2.7 (SOS1–SUR–0.5 Approximation of the Control Integral)
w
Let α(t) : T × [0, 1]n be a measurable function. Define on a given approximation
def w
grid {t i }, 0  i  m, a binary control trajectory ω(t) = pi ∈ {0, 1}n for t ∈ [t i , t i+1 ]
by

def 1 if (∀k : p̂i, j  p̂i,k ) ∧ (∀k, p̂i, j = p̂i,k : j < k),
pi, j = (2.21)
0 otherwise.

where 1  j  nw . Then it holds for all t ∈ T that


 
 t 
 
 ω(τ) − α(τ) dτ  (nw − 1) max δt i . (2.22)
 t  i
0 ∞ 

Proof A proof is given in [186]. 


Remark 2.6
It is conjectured that the factor nw − 1 in (2.22) is not tight.

2.4.3 The Discretized Case

In contrast to the discussion of the previous sections, the convexified re-


laxed problem is solved e.g. using a direct discretization of the control tra-
jectory ω(·). The optimization space is thus restricted to a finite number m
of degrees of freedom for the relaxed control trajectory ω(·), parameterized
w
by control parameters q i ∈ Ω ⊂ n on a control grid {t i } ⊂ T with m + 1
grid points,

ωi (t) = q i t ∈ [t i , t i+1 ) ⊂ T , 0  i  m − 1. (2.23)

The integer control parameters q i are convexified and relaxed, leading to


the introduction of nΩ control trajectories α(·) parameterized by control
Ω
parameters q i ∈ {0, 1}n on each node of the grid. In general, the solution

q obtained will not be a vertex of the binary hypercube. A special property
that sets the situation apart from more generic MINLPs is then exploited by
any of the sum–up rounding strategies. The control parameters qi j ∈ [0, 1],
0  i  m are for any given j discretizations of the same discretized binary
control trajectory ω j (·) in different time points t i ∈ T , and the rounding
strategies take this knowledge into account.
2.5 Switch Costs 53

1 1 0.5

Integral gap
q̃ (t i )

q(t i )
0.5 0.5 0

0 0 -0.5
20 40 20 40 20 40
Index i Index i Index i

Figure 2.3: Sum–up rounding minimizes the deviation of the control integrals. On
this equidistant grid, the integral gap never exceeds one half.

2.5 Switch Costs

In this section we are concerned with the introduction of switch costs into
the problem class (2.1) in order to avoid solutions that show frequent switch-
ing of the binary control trajectory.

2.5.1 Frequent Switching

Theorem 2.4 is a theoretical result for the infinite–dimensional OCP. The


optimal solution may have to switch infinitely often between the two ex-
tremal values on the finite horizon T in order to attain the relaxed frac-
tional solution’s objective and state trajectory x (·). Hence, frequent switch-
ing of the binary control may be part of the actual optimal solution of the
infinite–dimensional MIOCP, in which case it is referred to as chattering
or Zeno’s phenomenon, referring to the ancient Greek philosopher Zeno of
Elea (Ζήνων ὁ ᾿Ελεάτης) who was the first to give examples of obviously
paradoxical statements drawing attention to the interpretative difficulties
in this situation.
Remark 2.7 (Zeno’s Phenomenon)
Theorem 2.4 holds for the infinite–dimensional optimization problems prior to any
discretization. If a relaxed optimal control trajectory w (·) has singular or path con-
strained arcs, i.e., parts of the optimal trajectory attain values in the interior of the
w
relaxed feasible set [0, 1]n , the bang–bang optimal trajectory approximating it may
have to switch between the extremal points infinitely often on a finite time horizon.

The first example of an optimal control problem with a solution that shows
Zeno’s phenomenon was given in [76]. Chattering of an integer control may
54 2 Mixed–Integer Optimal Control

be undesirable from a point of view of the process under control, and the
inclusion of switch costs in the MIOCPs then becomes a modeling issue. For
example, the change of a discrete decisions might take some process time to
complete, incur some operational cost that is to be kept as low as possible,
or may be discouraged due to mechanical wear–off in the physical device
realizing the switch, e.g. in a valve or a gearbox [42, 103]. Closely related is
the problem of seeking for sparse controls that switch only a limited number
of times and remain on the lower bound for most of the time, e.g. when
optimizing the application of drugs over time during medical treatment [63].
We summarize under the term switch costs three different but related
settings. First, the number of switches permitted on the time horizon may
be bounded from above by a number smaller than the number m of avail-
able control discretization intervals. Second, it may be desirable to penal-
ize the occurrence of a switch by a positive contribution to the problem’s
objective, striving for a pareto–optimal solution that constitutes a compro-
mise between maximum performance and minimum operation of the switch.
Third, operating a switch may trigger fast transients in the dynamic process
states. One possible way of representing these transients is by approxima-
tion using state discontinuities. For the case of implicitly defined, i.e., state
dependent switches this is discussed e.g. in [156, 40, 118]. For the case
of externally operated switches, i.e., here discretized time–varying control
functions with a finite number of admissible values, such state jumps occur
in the discretization points.
It is immediately evident that any inclusion of positive costs of switches of
a binary or integer control, either by penalization of the number of switches
in the objective function or by limiting the number of switches through an
additionally imposed constraint, prevents Zeno’s phenomenon from occur-
ring as the resulting solution would show infinite cost in the first case and
be infeasible in the second case.

2.5.2 Switch Costs in a MILP Formulation

This observation leads us to discuss the inclusion of switch costs on a dis-


cretization of the binary convexified linear problem (BC). Here, the optimal
solution can switch only a finite number of times, at most once in each of
the control discretization grid points. Still, frequent switching of the binary
control trajectory may occur after sum–up rounding of the discretized solu-
tion on singular or path constrained arcs of the convexified relaxed optimal
2.5 Switch Costs 55

solution. For fine discretizations, the inclusion of switch costs may have a
significant impact on the shape of optimal solutions.

Instead of applying a sum–up rounding strategy to the relaxed OCP solu-


tion we proposed in [190] to solve the MILP
 
 i # $ 
  
min max max  q̃ jk − p jk δt j  (2.24)
p 1knΩ 0im−1  
j=0


s. t. 1= pik , 0  i  m − 1,
k=1

m−1 
σk  p − p  Ω
ik i+1,k , 0  k  n ,
i=0
Ω
pi ∈ {0, 1}n . 0 i  m−1

that computes a binary feasible solution ω(·) from a relaxed optimal one
α (·) subject to givens limits σ j > 0, 1  j  nw for the number σ j of
switches of the binary control trajectory ω j (·) after rounding. Here q i ∈
Ω
[0, 1]n , 0  i  m − 1 denote the control parameters of a relaxed optimal
Ω
solution of a direct discretization of (BC), and let pi ∈ {0, 1}n denote the
rounded solution respecting switch costs.

The relaxed solution serves as an excellent initial guess that is very cheap
to obtain. A combinatorial Branch & Bound algorithm is developed for this
problem in [190] that exploits this information to gain significant computa-
tional speed–ups.

In view of the inherent complexity of this MILP and the fast computa-
tion times required for mixed–integer NMPC we focus in the following on
an approximate switch cost formulation that can be readily included in the
convexified and relaxed OCP.

2.5.3 Switch Costs for Outer Convexification

In this section we develop a switch cost formulation that is suitable for inclu-
sion into the convexified relaxed problem (RC) and fits into a direct multiple
shooting discretization. The key issues here are maintaining differentiability
and separability of the problem formulation.
56 2 Mixed–Integer Optimal Control

We introduce the following discretized variant of the auxiliary problem


(BC) with switch costs as shown in definition 2.17. Herein, a discretization
on a fixed grid {t i } with m nodes,

def
ω(t) = q i ∈ Ω t ∈ [t i , t i+1 ), 0  i  m − 1, (2.25)

is assumed for the binary convexified control trajectory ω(·), and we remind
def
the reader of the convenience definition ω(t m ) = q m = q m−1 . The addition-
ally introduced variable σ counts the number of changes in each component
of the discretized binary control trajectory ω(·) over time. The number of
switches may be constrained by an upper limit σmax or included in the ob-
jective function using a weighting penalization factor π. We further denote
by (RCS) the relaxed counterpart problem of (BCS) which only differs in
Ω
q i ∈ [0, 1]n , 0  i  m − 1. (RCS)

Definition 2.17 (Discretized Problem (BC) with Switch Costs)


The multiple shooting discretization of the binary convexified linear problem with
switch costs is the following extension of problem (BC),


m nΩ

min l i (t i , si , ω ) qi j +
j
πjσj (BCS)
s,q
i=0 j=1 j=1



s. t. 0= x i (t i+1 ; t i , si , ω j ) qi j − si+1 , 0  i  m − 1,
j=1

s0 = x 0 ,
Ω
q i ∈ {0, 1}n , 0  i  m − 1,


1= qi j , 0  i  m − 1,
j=1


m−1
 
σj = q − qi, j  , 1  j  nΩ ,
i+1, j
i=0

σ j  σ j,max , 1  j  nΩ . 

2.5.4 Reformulations

In the following, we address several issues with the problem formulation


(BCS). The defining constraint for σ is nondifferentiable with respect to q ,
2.5 Switch Costs 57

and we present two reformulations that overcome this. Second, the behav-
ior of (RCS) after relaxation of the binary requirement is studied. Finally,
the above formulation obviously comprises a coupled constraint connect-
ing control parameters from adjacent shooting intervals. This impairs the
separability property of the NLP’s Lagrangian and we present a separable
reformulation in order to maintain computational efficiency.

Differentiable Reformulation

Addressing the issue of nondifferentiability, we use a reformulation intro-


ducing slack variables for the constraint defining σk , 1  k  nΩ as in


m−1
1
σk = 2
δi, j , (2.26)
i=0

δi, j  qi+1, j − qi, j ,


δi, j  qi, j − qi+1, j .

Here, positivity of the slacks δi, j is ensured by the two additionally in-
troduced constraints. This moves the nondifferentiability to the active set
method solving the NLP. At least one of the two constraints on the positive
differences δi, j will be active at any time.

Note that the introduction of switch costs by this formulations introduces


for each of the m · nΩ convex multipliers one additional control parame-
ter into the NLP. Linear algebra techniques for solution of the discretized
MIOCP that are tailored to problems with many control parameters are pre-
sented in chapter 7.

After relaxation of the convex multipliers qi, j emerging from the outer
convexification approach, the above differential reformulation has the draw-
back of attracting fractional solutions. As an example, the relaxed optimal
1
solution qi j = for all intervals 0  i  m − 1 and j = 1, 2 should be rec-
2
ognized as a “switching” solution, as the sum–up rounding strategy would
yield a rounded control alternating between zero and one. The differences of
adjacent relaxed optimal control parameters are zero however, which yields
σ = 0.
58 2 Mixed–Integer Optimal Control

Convex Reformulation

In order to address this issue, we develop a new second approach mak-


ing use of a convex reformulation of the nondifferentiability. For two binary
control parameters qi, j and qi+1, j adjacent in the time discretization of the
control trajectory, the switch cost σi, j is given by the expression

def
σi, j = αi, j (qi, j + qi+1, j ) + βi, j (2 − qi, j − qi+1, j ), αi, j + βi, j = 1, (2.27)

in which αi, j and βi, j are binary convex multipliers introduced as additional
degrees of freedom into the optimization problem. Note that the SOS1 con-
straint can again be used to eliminate the multiplier βi, j ,

σi, j = (2αi, j − 1)(qi, j + qi+1, j − 1) + 1. (2.28)

Under minimization of the switch cost, this expression yields the solutions
listed in table 2.1a. Figure 2.4a depicts the evaluation points and values.

For the relaxed problem (RCS), this convex reformulation ensures that
fractional solutions are assigned a nonzero cost, in particular any fractional
solution is more expensive than the nonswitching binary ones, and that the
switching binary solutions are assigned the highest cost. Table 2.1b shows
the switch costs under minimization for fractional values of the relaxed con-
trol parameters. The convexification envelope is depicted in figure 2.4b.

1 1
σi, j σi, j

0 0
1 1 1 1
w̃ i, j w̃ i+1, j w̃ i, j w̃ i+1, j
0 0

(a) Switch costs for binary controls. (b) Switch costs for relaxed controls.

Figure 2.4: Convex reformulation of the switch cost constraint for two binary con-
trols adjacent in the time discretization.

Numerical results obtained from this strategy look promising as detailed


in chapter 9. The connection to the MILP (2.24) yet remains to be clarified.
2.5 Switch Costs 59

1 1
qi, j qi+1, j αi, j βi, j σ
2 i, j
qi, j + qi+1, j αi, j βi, j σ
2 i, j

0 0 1 0 0 <1 1 0 <1
0 1 free free 1 =1 free free 1
1 0 free free 1 >1 0 1 <1
1 1 0 1 0
(a) Switch costs for binary controls. (b) Switch costs for relaxed controls.

Table 2.1: Binary and relaxed optimal solutions for the convex switch cost reformu-
lation.

Separable Reformulation for Direct Multiple Shooting

Separability of the objective function and all constraint functions with re-
spect to the discretization in time is a crucial property of the direct multiple
shooting discretization. It introduces a block structure into the discretized
OCP that can be exploited very efficiently as detailed in chapter 7. The only
coupling between adjacent shooting intervals allowed so far has been the
consistency condition imposed on the IVP solutions in the shooting nodes.

Separability of the above differential reformulation can be recovered by


formally introducing an augmented vector of differential states x̂ = [ x d ]
together with the augmented matching condition
⎡ ⎤

⎣ x i (t i+1 ; t i , si , ω j ) qi j − si+1 ⎦
j=1 = 0. (2.29)
q i − q i+1 − d

This matching condition deviates from the classical direct multiple shooting
method [36, 167] in that it depends on the control parameter vector of the
subsequent shooting interval. In chapter 7 we investigate structured linear
algebra techniques for SQP subproblems with many control parameters that
support this generalized type of matching condition. The separable linear
reformulation reads


m−1 nΩ
1
σ= 2
δi j , δi  di  −δi , 0  i  m − 1. (2.30)
i=0 j=1

Separability of the convex reformulation can be recovered in a similar way.


60 2 Mixed–Integer Optimal Control

2.6 Summary

In this chapter we have been concerned with reformulations of MIOCPs that


allow for the efficient numerical solution or approximation. Focus has been
put on a convex reformulation of the MIOCP with respect to the binary or
integer control. After relaxation, this reformulation allows to obtain an ap-
proximation to a solution of an MIOCP by solving only a single continuous
but possibly larger OCP. This is due to the fact that the convexified OCP’s
optimal solution can be approximated with arbitrary quality by a control
trajectory on the boundary of the feasible set. For a discretization of this
reformulated OCP, bounds on the loss of optimality and on the infeasibility
of those constraints independent of the integer control can be shown. Con-
straints directly depending on the integer control are considered in chapter
5. Rounding schemes were presented that in the case of fractional optimal
solutions of the relaxed OCP allow to reconstruct an integer feasible solu-
tion with a known bound on the loss of optimality. We have considered an
MILP formulation replacing sum–up rounding in the case of upper limits
constraining the permitted number of switches. A convexification and relax-
ation has been developed for this formulation that does not attract fractional
solutions of the convexified relaxed OCP. It further maintains separability
of the objective and constraints functions, and can thus be included in a
direct multiple shooting discretization of the OCP. The presented switch
cost formulations double the number of control parameters emerging out of
the convex reformulation. Linear algebra techniques for the solution of the
discretized OCP with many control parameters are considered in chapter 7.
3 Constrained Nonlinear Programming

We have already briefly touched nonlinear programming in the last two


chapters, in which we introduced the multiple shooting discretized opti-
mal control problem, a Nonlinear Program (NLP), and presented the outer
convexification and relaxation approach that allows to compute approxima-
tions to local Mixed–Integer Optimal Control Problem (MIOCP) solutions by
solving a reformulated and discretized but possibly much larger Optimal
Control Problem (OCP). This chapter is concerned with theory and numeri-
cal methods for the solution of NLPs and equips the reader with definitions
and algorithms required for the following chapters of this thesis. We present
optimality conditions characterizing locally optimal solutions and introduce
Sequential Quadratic Programming (SQP) methods for the iterative solu-
tion of NLPs. The evaluation of the matching condition constraints of the
discretized optimal control problem requires the solution of Initial Value
Problems (IVPs). To this end, we present one step methods for non–stiff
Ordinary Differential Equations (ODEs) and discuss the efficient and consis-
tent computation of sensitivities of IVPs solutions. The familiar reader may
wish to continue with chapter 4 rightaway, and refer back to this chapter
should the need arise.

3.1 Constrained Nonlinear Programming

In this section we prepare our investigation of SQP methods for the solu-
tion of the discretized optimal control problem by repeating definitions of a
number of terms commonly arising in constrained nonlinear programming
for further reference. We give an overview over major results characterizing
optimal solutions of NLPs. These can be found in any standard textbook on
nonlinear programming, e.g. [24, 72, 158].

3.1.1 Definitions

This section is concerned with the solution of constrained nonlinear pro-


grams of the general form given in definition 3.1.

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8_4,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
62 3 Constrained Nonlinear Programming

Definition 3.1 (Nonlinear Program)


An optimization problem of the general form

min f (x ) (3.1)
x ∈n

s. t. g (x ) = 0,
h(x )  0,
g
with objective function f : n → , equality constraints g : n → n , and inequality
h
constraints h : n → n is called a Nonlinear Program. 

The functions f , g , and h are assumed to be twice continuously differ-


entiable with respect to x . We are interested in finding a point x  ∈ n
that satisfies all constraints and minimizes, in a neighborhood, the objec-
tive function. To this end, we define the subset of feasible points of problem
(3.1).
Definition 3.2 (Feasible Point, Feasible Set)
A point x ∈ n is called a feasible point of problem (3.1) if it satisfies the constraints

g (x ) = 0,
h(x )  0.

The set of all feasible points of problem (3.1) is denoted by


def % &
F = x ∈ n | g (x ) = 0, h(x )  0 ⊆ n . (3.2)


Applying this definition, we may restate problem (3.1) as a pure minimiza-


tion problem over a set F with possibly complicated shape,

min f (x ).
x ∈F

For any point of the feasible set, the active set denotes the subset of inequal-
ity constraints that are satisfied to equality.

Definition 3.3 (Active Constraint, Active Set)


Let x ∈ n be a feasible point of problem (3.1). An inequality constraint hi , i ∈
{1, . . . , nh } ⊂ , is called active if hi (x ) = 0 holds. It is called inactive otherwise. The
set of indices of all active constraints
def
A(x ) = {i | hi (x ) = 0} ⊆ {1, . . . , nh } ⊂  (3.3)

is called the active set associated with x . 


3.1 Constrained Nonlinear Programming 63

The restriction of the inequality constraint function h onto the active in-
equality constraints is denoted by hA : n → |A| , x → hA (x ).
Constraint Qualifications (CQs) ensure a certain well–behavedness of the
feasible set in a neighborhood of a feasible point x ∈ F . We often require
the set of active constraints to be linear independent.
Definition 3.4 (Linear Independence Constraint Qualification, Regular Point)
We say that Linear Independence Constraint Qualification (LICQ) holds for problem
(3.1) in x ∈ n if it holds that
 
g x (x )
rank   = ng + nhA . (3.4)
hA x (x )

Then, x is referred to as a regular point of problem (3.1). 

In irregular points, constraints in the active set A are linearly dependent.


Numerical methods then frequently require that a linear independent sub-
set W ⊂ A is chosen, referred to as the working set.
Finally, we have the following formal definition of a local solution to prob-
lem (3.1). In the next section, alternative conditions will be given that can
be used to devise numerical algorithms for finding candidate points for local
solutions.
Definition 3.5 (Locally Optimal Point)
A point x  ∈ F ⊆ n is called a locally optimal point of problem (3.1) if there exists
an open ball B
(x  ) with
> 0 such that

∀x ∈ B
(x  ) ∩ F : f (x )  f (x  ).

If in addition it holds that

∀x ∈ B
(x  ) ∩ F , x = x  : f (x ) > f (x  )

then x  is called a strict local optimum of problem (3.1). 

3.1.2 First Order Necessary Optimality Conditions

In order to state necessary optimality conditions for a candidate point x to


be a locally optimal solution of (3.1), we require the following definitions.
Definition 3.6 (Lagrangian Function)
x g h
The function L : n × n × n → ,

def
L(x , λ, μ) = f (x ) − λ T g (x ) − μ T h(x ) (3.5)
64 3 Constrained Nonlinear Programming

g h
with Lagrange multipliers λ ∈ n and μ ∈ n is called the Lagrangian (function)
of problem (3.1). 

The following famous theorem independently found by [114, 126] spec-


ifies necessary conditions for local optimality of a regular point that are
based on definition 3.6. We will return to this theorem in chapter 6 and
consider it again under weaker assumptions.
Theorem 3.1 (Karush–Kuhn–Tucker Conditions)
Let x  ∈ n be a locally optimal point of problem (3.1), and assume that LICQ holds
g h
in x  . Then there exist Langrange multipliers λ ∈ n and μ ∈ n such that the
following conditions are satisfied:

0 = L x (x  , λ , μ ),
0 = g (x  ),
0  h(x  ),
0  μ ,
0 = μ h(x  ).
T

The point (x  , λ , μ ) is then referred to as a Karush–Kuhn–Tucker (KKT) point. 

Proof Proofs under LICQ can be found in any standard textbook on nonlin-
ear programming, such as [72, 158]. 

The condition μ h(x  ) = 0 in theorem 3.1 is referred to as complemen-


T

tarity condition. It specifies that Lagrange multipliers for inactive inequality


constraints shall be zero. This condition may be sharpened as follows.
Definition 3.7 (Strict Complementarity)
Let x  ∈ n be a locally optimal point of problem (3.1) and let λ ∈ ng , μ ∈ nh be
Lagrange multipliers such that the conditions of theorem 3.1 are satisfied. We say
that strict complementarity holds in (x  , λ , μ ) if μi > 0 for all active constraints
hi . 

Active constraints in violation of strict complementarity are called weakly


active.
Definition 3.8 (Weakly Active Constraint)
Let x  ∈ n be a locally optimal point of problem (3.1) and let λ ∈ ng , μ ∈ nh
be some Lagrange multipliers such that the conditions of theorem 3.1 are satisfied.
Then a constraint hi (x  )  0 is called stongly active or binding if hi (x  ) = 0 and
μi > 0. The constraint hi is called weakly active if hi (x  ) = 0 and μi = 0 for all μ
satisfying the KKT conditions. 
3.1 Constrained Nonlinear Programming 65

For a given point KKT point x  there may be many choices of λ and μ
that satisfy the KKT condition of theorem 3.1. Under LICQ and strict com-
plementarity, uniqueness of the Lagrange multipliers in a KKT point can be
shown. For the design of most derivative based algorithms for constrained
nonlinear optimization, LICQ thus is the CQ assumed most often.

Theorem 3.2 (Uniqueness of Lagrange Multipliers)


Let x  be a locally optimal point of problem (3.1), and let λ ∈ ng , μ ∈ nh be
Lagrange multipliers such that the conditions of theorem 3.1 are satisfied. Let LICQ
hold in x  and let strict complementarity hold in (x  , λ , μ ). Then it holds that the
values λ and μ are unique. 

Proof For the equality constraints and the subset of active inequality con-
straints, this is evident from linear independence of the gradients g x (x  )
and (hA ) x (x  ). For the inactive inequality constraints, μi = 0 for i ∈
/ A(x  )
is enforced by strict complementarity. 

3.1.3 Second Order Conditions

A necessary and a sufficient condition for local optimality that both use
second order derivative information are given in this section. We require
the definition of the reduced or null–space Hessian.

Definition 3.9 (Reduced Hessian)


x g h x z
Let (x , λ, μ) ∈ n × n × n be a primal–dual point and let Z(x ) ∈ n ×n be a
column basis of the null space of the active constraints in x . The projection of the
Hessian L x x (x , λ, μ) of the Lagrangian onto the null space of the active constraints,

def
H red (x , λ, μ) = Z T (x ) L x x (x , λ, μ) Z(x ), (3.6)

is called the reduced Hessian. 

Theorem 3.3 (Second Order Necessary Conditions)


x
Let x  ∈ n be a locally optimal point of problem (3.1). Let LICQ hold in x  and let
g h
λ ∈ n , μ ∈ n be the unique Lagrange multipliers such that the KKT conditions
are satisfied. Then it holds that the reduced Hessian is positive semidefinite,
z
∀d ∈ {Z(x  )dz | dz ∈ n } : d T L x x (x  , λ , μ ) d  0. 

Proof A proof can be found in [158]. 


66 3 Constrained Nonlinear Programming

Theorem 3.4 (Strong Second Order Sufficient Conditions)


Let x  ∈ n be a feasible point of problem (3.1) and let λ ∈ ng , μ ∈ nh be Lagrange
multipliers such that the KKT conditions are satisfied. Further, let the reduced Hes-
sian be positive definite,
z
∀d ∈ {Z(x  )dz | dz ∈ n } \ {0} : d T L x x (x  , λ , μ ) d > 0.

Then x  is a locally strictly optimal point of problem (3.1). 

Proof A proof can be found in [158]. 

3.1.4 Stability

We are concerned with the stability of a KKT point under small perturba-
tions of the problem data in (3.1). Under strict complementarity, the active
set can be shown to remain invariant for small perturbations of the solution.
To this end we consider the perturbed problem

min f (x ,
) (3.7)
x ∈n

s. t. g (x ,
) = 0,
h(x ,
)  0

with perturbation parameter


> 0 for the objective function and the con-
straint functions. Further, let the problem functions f , g , and h be continu-
ously differentiable with respect to the disturbation parameter
.
Theorem 3.5 (Stability)
Consider the perturbed problem (3.7), and assume that for
= 0 this problem co-
incides with problem (3.1). Let (x  , λ , μ ) be a regular point satisfying both strict
complementarity and the assumptions of theorem 3.4 in
= 0. Then there exists an
x g h
open interval V (0) ⊂ , an open ball W (x  , λ , μ ) ⊂ n × n × n , and a continu-

ously differentiable mapping ϕ : V → W such that x (
) is a strict local minimum of
(3.7) and ϕ(
) = (x  (
), λ (
), μ (
)) is the unique KKT point of (3.7) in W . The set
A(x  (0)) of active inequality constraints remains unchanged in x  (
). 

Proof A proof can be found in [34]. 

3.2 Sequential Quadratic Programming

In this section we introduce two SQP methods, the full–step exact Hessian
SQP method and the constrained Gauß–Newton method, and mention their
3.2 Sequential Quadratic Programming 67

local convergence properties. They may be used to solve OCPs of the class
(1.1) after a direct multiple shooting discretization.

SQP methods for constrained nonlinear programming were first proposed


by [221]. The first practically successful implementations are due to [100,
170]. For a more extensive treatment of the underlying theory and possible
algorithmic variants we refer to the textbooks [72, 158]. Descriptions of an
SQP method tailored to the direct multiple shooting method can be found
e.g. in [132, 134]. Further extensions for large scale systems are described
e.g. in [6, 191].

3.2.1 Basic Algorithm

SQP methods are iterative descent–based methods for finding a KKT point
of problem (3.1) by computing a sequence of iterates {(x k , λk , μk )} starting
in an initial guess (x 0 , λ0 , μ0 ). The steps are found from the minimization of
local quadratic models of the Lagrangian function on a linearization of the
feasible set in the most recent iterate.
Definition 3.10 (Local Quadratic Subproblem)
x g h
The local quadratic subproblem in (x k , λk , μk ) ∈ n × n × n for problem (3.1) is
given by

1 T T
min 2
δx k B k δx k + δx k b k (3.8)
δx k ∈D k

s. t. g (x k ) + g x (x k )δx k = 0,
h(x k ) + h x (x k )δx k  0.

The matrix B k denotes the Hessian L x x (x k , λk , μk ) of the Lagrangian or a suitable


approximation thereof, and the vector b k denotes the gradient f x (x k ) of the objective
function. The set D k ⊆ n may be used to further restrict the set of permitted steps.

The solution δx k of (3.8) is used as a step direction to obtain the next iterate
x k+1 ,
def
x k+1 = x k + αk δx k . (3.9)

SQP methods differ in the choice of the Hessian B k or its approximation,


in the choice of the set D k of candidate steps, and in the way the length
αk ∈ (0, 1] ⊂  of the step is determined. We refer the reader to [72, 158]
for details. By construction of b k the duals λ̂k and μ̂k obtained from the
68 3 Constrained Nonlinear Programming

solution of (3.8) are the new SQP dual iterates after a full step αk = 1, thus
we have
def
λk+1 = (1 − αk )λk + αk λ̂k , (3.10)
def
μk+1 = (1 − αk )μk + αk μ̂k .

For a proof we refer to e.g. [132]. The sequence of SQP iterates can be
shown to converge to a KKT point of (3.1) under certain conditions as de-
tailed below. In practice, it is terminated once a prescribed convergence
criterion is satisfied.

Algorithm 3.1: A basic SQP algorithm.


input : x 0 , λ0 , μ0
output: x  , λ , μ
while ¬terminate(x k , λk , μk ) do
Evaluate b k , g , g x , h, h x in x k ;
Evaluate B k in (x k , λk , μk );
Determine D k ⊆ n ;
Solve subproblem (3.8) for (δx k , λ̂k , μ̂k );
Determine step length αk ∈ (0, 1];
x k+1 = x k + αk δx k ;
λk+1 = (1 − αk )λk + αk λ̂k ;
μk+1 = (1 − αk )μk + αk μ̂k ;
k = k + 1;
end

3.2.2 The Full Step Exact Hessian SQP Method

The full step exact Hessian SQP method is named for its choice

B k = L x x (x k , λk , μk ), (3.11)
k
D = , n

αk = 1

of the algorithmic parameters described in section 3.2.1. It can be shown to


be equivalent to Newton–Raphson iterations applied to the KKT conditions.
3.2 Sequential Quadratic Programming 69

Theorem 3.6 (Equivalence of SQP and Newton’s method)


Let B k (x k , λk , μk ) = L x x (x k , λk , μk ), D k = n , and αk = 1 for all k  1. Then the SQP
method is equivalent to Newton’s method. 

For equality constrained problems, this can be seen from the KKT conditions
of the local quadratic subproblem (3.8),

T
B k δx k + b k − λ̂k g x (x k ) = 0, (3.12)
k k
g (x ) + g x (x )δx = 0. k

After substitution λ̂k = λk + δλk (3.12) may be written as

T
B k δx k + L x (x k , λk , μk ) − δλk g x (x k ) = 0, (3.13)
k k k
g (x ) + g x (x )δx = 0.

This is the Newton–Raphson iteration for (δx k , δλk ) on the KKT system of
(3.8),
    
L x (x k , λk , μk ) d L x (x k , λk , μk ) δx k
+ = 0. (3.14)
g (x k ) d(x , λ) g (x k ) δλk

The local convergence rate of the full step exact Hessian SQP method in the
neighborhood of a KKT point thus is quadratic. Good initial guesses for x 0
are required, though. The following theorem shows that such guesses are
not required for the Lagrange multipliers λ0 .

Theorem 3.7 (Convergence of the full step exact Hessian SQP Method)
Let (x  , λ ) satisfy theorem 3.4. Let (x 0 , λ0 ) be chosen such that x 0 is sufficiently
close to x  and that the KKT matrix of (3.8) is regular. Then the sequence of iter-
ates generated by the full step exact Hessian SQP method shows local q–quadratic
convergence to (x  , λ ). 

Proof A proof can be found in [72]. 

In the presence of inequality constraints, if theorem 3.4 and strict com-


plementarity hold, then the active set does not change in a neighborhood
of the KKT point. Indeed, under these assumptions even if B k only is some
positive definite approximation of the exact Hessian, both the optimal active
set and the optimal Lagrange multipliers λ , μ can be identified knowing
the primal optimal solution x  only [51, 180].
70 3 Constrained Nonlinear Programming

3.2.3 The Gauß-Newton Approximation

The Gauß–Newton approximation of the Hessian is applicable to NLPs with


objective function of the structure


nr
f (x ) = 1
2
||r (x )||22 = 1
2
ri2 (x ), (3.15)
i=1

x r
where r : n → n , x → r (x ) is a vector valued residual function. The
gradient f x is


nr
f x (x ) = ri (x )ri x (x ) = r xT (x )r (x ), (3.16)
i=1

and the Hessian of this objective is


nr  
f x x (x ) = ri Tx (x )ri x (x ) + ri (x )ri x x (x ) (3.17)
i=1

nr
= r xT (x )r x (x ) + ri (x )ri x x (x ).
i=1

The first part of the Hessian f x x can be calculated only from gradient infor-
mation and in addition often dominates the second order contribution in the
case of small residuals r (x ) or because the model is almost linear close to
the solution. This gives rise to the approximation

def
BGN (x ) = r xT (x )r x (x ) (3.18)

which is independent of the Lagrangian multipliers belonging to x . The er-


ror in this approximation can be shown to be of order O (||r (x  )||), which
leads us to expect the Gauß–Newton method to perform well for small resid-
uals r (x ). For more details on the constrained Gauß–Newton method as an
important special case of SQP methods applicable to NLPs with the objec-
tive function (3.15) we refer to [34].

Note that the Gauß–Newton approximation can be applied separately to


the Hessian blocks Bik , 0  i  m of the direct multiple shooting system.
3.2 Sequential Quadratic Programming 71

3.2.4 BFGS Hessian Approximation

The BFGS (Broyden–Fletcher–Goldfarb–Shanno) approximation belongs to


a larger family of quasi–Newton update formulas, of which it is presently
considered the most effective one. One possible way to derive it is the fol-
lowing. Starting with an existing symmetric and positive definite Hessian
approximation B k , that need not necessarily be a BFGS one, we compute
the new approximation B k+1 as

T T T
k+1 def B k δx k δx k B k δ f xk δ f xk
B =B − k
T
+ T
(3.19)
δx k B k δx k δ f xk δx k

wherein δx k is the step from x k to x k+1 and δ f xk is the associated gradient


change f x (x k+1 ) − f x (x k ). Different derivations of this update formula can
be found in the original papers [41, 71, 87, 198] as well as in the textbooks
[72, 158].

For larger dimensions nx , and thus larger and possibly dense Hessian ap-
proximations B k , the limited memory variant L-BFGS of this approximation
is attractive. Instead of storing the matrix B k , a limited number l of his-
torical vector pairs (δx i , δ f xi ), k − l + 1  i  k, is stored from which the
approximation B k is rebuilt. In each SQP iteration the oldest vector pair is
replaced by the current step and gradient step. While B k could in principle
be computed by repeated application of (3.19), this requires O (l 2 nx ) mul-
tiplications and we refer to e.g. [158] for compact representations of the
L-BFGS update that reduce the computational effort to only O (lnx ) multipli-
cations.

This approximation scheme has also proved itself successful for ill–
conditioned problems and for initial guesses far away from the optimal so-
lution, in which case outdated secant information unrelated to the locally
optimal solution would accumulate in a conventional BFGS approximation.

It is of vital importance to note that the rank two update (3.19) can be
applied independently to each Hessian block Bik , 0  i  m of the direct
multiple shooting system. This leads to a rank 2m update for the NLP that
significantly improves the convergence speed of the SQP method as first
noted in [36].
72 3 Constrained Nonlinear Programming

3.2.5 Local Convergence

We are interested in sufficient conditions for local convergence for general


SQP methods that produce a series of iterates

y k+1 = y k + δ y k = y k − M(y k )r (y k ) (3.20)

towards a root y  of the function r : D → n , D ⊆ n , with r (y  ) = 0. Here


r

the matrices M(y k ) denote approximations of the inverse of the Jacobians


J(y k ) of the residuals r (y k ). In the case of SQP methods, r is the gradient
of the Lagrangian and M a suitable approximation of the inverse of the
Hessian of the Lagrangian.

We define the set of Newton pairs of the iteration (3.20) as follows.

Definition 3.11 (Set of Newton Pairs)


The set N of Newton pairs is defined as

def % &
N = (y1 , y2 ) ∈ D × D | y2 = y1 − M(y1 )r (y1 ) . (3.21)


We require two definitions concerned with the quality of the approxima-


tions M(y k ) to J −1 (y k ).

Definition 3.12 (ω–Condition)


The approximation M satisfies the ω–condition in D if there exists ω < ∞ such that
for all t ∈ [0, 1] ⊂  and all (y1 , y2 ) ∈ N it holds that
   
 M(y )(J(y + t(y − y )) − J(y ))(y − y )  ωt  y − y 2 . (3.22)
2 1 2 1 1 1 2 1 2


Definition 3.13 (Compatibility or κ–Condition)


The approximation M satisfies the κ–condition in D if there exists κ < 1 such that
for all (y1 , y2 ) ∈ N it holds that
   
 M(y )(I − J(y )M(y ))r (y )  κ  y − y  . (3.23)
2 1 1 1 1 2


def
With this, we define with δ y k = −M(y k )r (y k ) the constant
 
def
δk = κ + ω δ y k  (3.24)
2
3.2 Sequential Quadratic Programming 73

and the closed ball


 

= δ y 0  /(1 − δ0 ).
def def
D0 (y 0 ) = B
(y 0 ), (3.25)

We are now prepared to state a local contraction theorem for the se-
quence {y k } of SQP iterates.
Theorem 3.8 (Local Contraction Theorem)
Let M satisfy the ω– and κ–conditions and let y 0 ∈ D . If δ0 < 1 and D 0 (y 0 ) ⊂ D ,
then y k ∈ D 0 (y 0 ) and {y k } → y  ∈ D 0 (y 0 ) with convergence rate
       
δ y k+1   δ k δ y k  = κ δ y k  + ω δ y k 2 . (3.26)
2

Furthermore, the following a–priori estimates hold for j  1,

  j
δk   k+ j
δ0  
 y k+ j − y    δ y k   δ y 0  . (3.27)
1−δ k 1−δ0

If M(y) is continuous and regular in y  then r (y  ) = 0. 

Proof The proof can be found in [34]. 

We will make use of this local contraction theorem in chapter 4 to proof


convergence of the real–time iteration scheme and its mixed–integer exten-
sion.

3.2.6 Termination Criterion

In algorithm 3.1 we have left open the issue of finding a suitable termination
criterion. Certainly, due to approximation errors in the derivatives and due
to finite precision and conditioning issues we will in general be able to iden-
tify a primal–dual point (x k , λk , μk ) that is satisfies the optimality conditions
only to a certain prescribed tolerance. In [133] it has been proposed to use
the KKT tolerance

 g g
 n n
kkttol(x , λ, μ) =  f x (x , λ, μ T δx ) +
def
|λi g i (x )| + |μi hi (x )|.
i=1 i=1
(3.28)

We terminate the SQP iterations once a prescribed threshold value kktacc,


e.g. kktacc = 10−8 is satisfied for some iteration k,

kkttol(x k , λk , μk ) < kktacc. (3.29)


74 3 Constrained Nonlinear Programming

3.2.7 Scaling

The step direction, step length, and the termination criterion are susceptible
to scaling of the unknowns and of the objective function and the constraints
functions. Most NLP algorithm therefore either determine appropriate scale
factors automatically, or provide a means for the user to specify suitable
x g h
positive scale factors σx ∈ n , σf ∈ , σg ∈ n , σh ∈ n . The equivalent
NLP

min σg f˜(Σx x ) (3.30)


x ∈n

s. t. σg,i g̃ i (Σx x ) = 0, 1  i  ng ,
σh,i h̃i (Σx x )  0, 1  i  nh ,

is then solved in place of the original one (3.1). Here Σx = diag σx and f˜(·),
g̃(·), and h̃(·) are appropriately rescaled counterparts of the original prob-
lem functions. In order to avoid rounding and cutoff errors to be introduced
due to limited machine precision, the scale factors should be chosen as pos-
itive powers of two which can be represented exactly and allow for fast and
lossless multiplication and division.

3.3 Derivative Generation

The numerical optimization algorithms presented in this thesis strongly rely


on the availability of derivative information for the various functions model-
ing the controlled process. This includes gradients, directional derivatives,
full Jacobian matrices, and second order derivative information in the form
of exact or approximate Hessians. In this section we survey several numer-
ical and algorithmic strategies to obtain such derivatives and study their
respective precisions and efficiencies. For further details, we refer to e.g.
[4] and the textbook [92].

3.3.1 Analytical Derivatives

Using analytical derivatives of model functions assumes that a symbolic ex-


pression of the derivative is available, e.g. in the form of an expression tree.
Elementary differentiation rules known from basic calculus are applied to
the operators and elementary functions at the tree nodes in order to derive
3.3 Derivative Generation 75

a symbolic expression for the desired derivative. While this process can eas-
ily be carried out manually, it is cumbersome for larger model functions and
has been automated in computer algebra systems like Maple V [150] and
Mathematica [222]. These tools also readily provide facilities to translate
the symbolic derivative expression into e.g. Fortran or C source code.

Analytical derivatives of model functions obviously are exact up to ma-


chine precision. A symbolic expression may however not always be available
or its transferral to a computer algebra system may be difficult to accom-
plish. Second, the obtained symbolic expression for the derivative may not
be optimally efficient in terms of evaluation time, as demonstrated by the
classical example

'
n
f (x 1 , . . . , x n ) = xi
i=1

due to [200]. Here, the gradient’s entries ( f x )i consist of all partial products
that omit one factor x i , while the Hessian’s entries ( f x x )i j are the partial
products that omit any two factors x i , x j . The efficient reuse of common
subexpressions is up to the compiler that translates the possibly inefficient
symbolic expression into machine code.

3.3.2 Finite Difference Approximations

Directional derivatives f x d of a function f : n → m , x → f (x ) into a


direction d ∈ n may be approximated in a point x 0 ∈ n based on the
Taylor series expansion of f in x 0 ,

f (x 0 + hd) = f (x 0 ) + h f x (x 0 )d + O(h2 ), (3.31)

which yields the one–sided finite difference scheme

f (x 0 + hd) − f (x 0 )
fx d = + O(h), (3.32)
h
Combination with a second Taylor series expansion with negative increment
h yields the improved central difference scheme

f (x 0 + hd) − f (x 0 − hd)
fx d = + O(h2 ). (3.33)
2h
76 3 Constrained Nonlinear Programming

Finite difference schemes are generally easy to implement as they only


rely on repeated evaluations of the model function f in perturbed evalua-
tion points x 0 ± hd . This does not require knowledge about the internals of
the representation of f other than the assurance of sufficient differentiabil-
ity. The computation of a single directional derivative f x (x 0 )d ∈ m for a
direction d ∈ n comes at the cost of only two function evaluations. The full
Jacobian matrix f x (x 0 ) ∈ m×n is available at 2n function evaluations.

The precision of finite difference approximations crucially depends on the


magnitude h||d|| of the increments. For larger increments, the truncation
error incurred by neglecting the higher–order terms of the Taylor series ex-
pansion become predominant, while for tiny increments cancellation errors
due to limited machine precision become predominant. Though dependent
1
on the actual function f , the recommended perturbations are h||d|| = eps 2
1
for one–sided and h||d|| = eps 3 for central finite difference schemes. The
number of significant digits of the obtained derivative approximation is at
most one half of that of the function values for one–sided schemes, and at
most two thirds for central schemes.

3.3.3 Complex Step Approximation

Cancellation errors introduced into finite difference approximations of


derivatives can be avoided by using complex arithmetic. As first noted by
[145], we can evaluate the function f˜ : n → m obtained from f and ap-
ply perturbations ı̂hd to the imaginary part of x 0 + 0ı̂ ∈ . The directional
derivative may be obtained as

f (x 0 + ı̂hd)
f x (x 0 )d = ℑ + O(h2 ). (3.34)
h

As the perturbation is applied to the imaginary part this approach does not
suffer from cancellation errors. The perturbation magnitude h||d|| should be
chosen small but representable, e.g. h||d|| = 10−100 .

For the complex step approximation to be applicable, the model func-


tion f has to be analytic and the symbolic representation has to support
evaluation in the complex domain. The use of linear algebra subroutines
may prevent this. The computational efficiency of the complex step approx-
imation depends on the availability of native hardware support for complex
arithmetic on the computational platform in use.
3.3 Derivative Generation 77

3.3.4 Automatic Differentiation

Like symbolic differentiation to obtain analytical expressions for the deriva-


tives, automatic differentiation is based on the idea of decomposing the
function f into a concatenation of certain elemental functions. The deriva-
tive is obtained by systematic application of the chain rule. Unlike in sym-
bolic differentiation, this procedure is not applied to the symbolic expres-
sion tree, but instead takes place while evaluating the function f itself in a
given point x 0 . Pioneering works in the field of automatic differentiation are
[115, 218], and for a comprehensive reference we refer to [92].

Principle

The idea of representing the function f as a concatenation of elemental


functions is sharpened by the following definition.

Definition 3.14 (Factorable Function)


Let L be a finite set of real–valued elemental functions ϕi : n → , x → ϕ(x ). A
function f : n → m , x → f (x ) is called a factorable function iff there exists a
finite sequence {ϕ1−n , . . . , ϕk }, k  m, such that it holds:

1. For 1  i  n the function ϕi−n = πni is the projection on the i -th component
of the evaluation point x ∈ n ,

2. For 1  i  m the function ϕk−m+i = πm i


is the projection on the i -th component
of the evaluation result y = f (x ) ∈ m ,

3. For 1  i  k − m the function ϕi is constant or a concatenation of one or


more functions ϕ j with 1 − n  j  i − 1, i.e., of functions preceding ϕi in the
concatenation sequence. 

For simplicity, we assumed scalar valued elemental functions ϕi here,


though these can in principle be vector valued functions as well if it is of
computational advantage to treat for example linear algebra operations on
vectors or matrices as elemental. Using a representation of a factorable
function f by a sequence {ϕ1−n , . . . , ϕk }, the function f can be evaluated by
algorithm 3.2.
78 3 Constrained Nonlinear Programming

Algorithm 3.2: Zero order forward sweep of automatic differentiation.


input : ϕ1−n , . . . , ϕk , x 0
output: y = f (x 0 )
v[1−n:0] = x [1:n] ;
for i = 1 : k do
vi = ϕi (v j≺i );
end
y[1:m] = v[k−m+1:k] ;

Forward Mode of Automatic Differentiation

The forward mode of automatic differentiation is used to compute a (for-


ward) directional derivative ẏ = f x (x 0 )ẋ . The required procedure is algo-
rithm 3.3.

Algorithm 3.3: First order forward sweep of automatic differentiation.


input : ϕ1−n , . . . , ϕk , x 0 , ẋ
output: y = f (x 0 ), ẏ = f x (x 0 )ẋ
v[1−n:0] = x [1:n] ;
v̇[1−n:0] = ẋ [1:n] ;
for i = 1 : k do
vi = ϕ
i (v j≺i );
v̇i = j≺i (ϕi ) v j (v j≺i ) · v̇ j ;
end
y[1:m] = v[k−m+1:k] ;
ẏ[1:m] = v̇[k−m+1:k] ;

Comparing this algorithm to the zero order forward sweep, we see that
the directional derivative information is initialized with the direction ẋ ∈ n .
Along with the nominal evaluation of the function sequence ϕ , derivative
information is accumulated in v̇ by application of the chain rule to the ele-
mental functions ϕi . Algorithm 3.3 can easily be extended to compute multi-
ple directional derivatives in one sweep. The overall computational effort is
3
bounded by 1+ nd function evaluations [92], where nd is the number of for-
2
ward directions. The computed derivative is exact within machine precision,
while slightly more expensive than finite difference approximations.
3.3 Derivative Generation 79

Reverse Mode of Automatic Differentiation

The reverse mode of automatic differentiation is used to compute an adjoint


directional derivative x̄ = ȳ T f x (x 0 ). This is achieved by applying the chain
rule to the function’s evaluation procedure executed in reverse order, i.e.,
in a backward sweep. The required procedure is algorithm 3.4.

Algorithm 3.4: First order backward sweep of automatic differentia-


tion.
input : ϕ1−n , . . . , ϕk , v , x 0 , ȳ
output: y = f (x 0 ), x̄ = ȳ T f x (x 0 )
v̄[1−n:k−m] = 0;
v̄[k−m+1:k] = ȳ[1:m] ;
foreach j ≺ i do v̄ j += v̄i · (ϕi ) v j (v j≺i );
x̄ [1:n] = v̄[0:n] ;

In the backward sweep procedure, the directional derivative information


is initialized with the adjoint direction λ ∈ m . Each intermediate deriva-
tive value v̄ j accumulates derivative information from all intermediate val-
ues vi to which v j contributes during a function evaluation, i.e., during a
zero order forward sweep. This procedure can easily be extended to simul-
taneous computation of multiple adjoint derivatives as well. The results v j ,
j = 1 − n, . . . , k of the intermediate function evaluations need to be known in
advance before algorithm 3.4 can be executed. Thus, a backward sweep is
usually preceded by a zero order forward sweep evaluating the function f .
3 5
The computational effort is bounded by + nd function evaluations [92],
2 2
where nd is the number of adjoint directions. As this bound does not de-
pend on the number n of independent variables, the computation of adjoint
derivatives is especially cheap if m  n.

3.3.5 Second Order Derivatives

Occasionally we will require second order derivatives of model functions.


These can be computed efficiently by combining two sweeps of automatic
differentiation on the function f as follows. The forward directional deriva-
tive ẋ obtained from a first order forward sweep can be viewed as a function
f˙ of the forward direction ẋ ,

f˙(x 0 , ẋ ) = f x (x 0 )ẋ . (3.35)


80 3 Constrained Nonlinear Programming

Application of the reverse sweep of automatic differentiation to f˙ in the


¯ ) yields
point (x 0 , ẋ ) for the adjoint direction (ȳ, ẋ

¯ḟ (x , ẋ ) = ȳ T  f (x )ẋ  = ȳ T f (x )ẋ + ẋ¯ T f (x ), (3.36)


0 x 0 x xx 0 x 0

an automatic differentiation scheme that can be used to compute the


second–order directional derivative ȳ T f x x ẋ of f in x 0 .
Computing second–order derivatives using finite difference approxima-
1
tions leads to precisions of only about eps 4 ≈ 10−4 , and is considerably
more expensive. Using the complex step method is possible only for first
order derivatives, but its combination with finite differences for the second
1
order reduces the approximation error to about eps 2 ≈ 10−8 . In [92], Tay-
lor coefficient propagation schemes are described that also allow for the
efficient computation of higher order derivatives.

3.4 Initial Value Problems and Sensitivity Generation

The evaluation of the dynamic process x (t) on the time horizon T requires
the solution of IVPs on the shooting intervals. In this section, we present
Runge–Kutta methods as popular representatives of one–step methods for
non–stiff ODEs.

3.4.1 Runge–Kutta Methods for ODE IVPs

We start by recalling the definition of a parameter dependent IVP on


T = [t 0 , t f ] ⊂  with initial value x 0 ∈ n , a time–independent parame-
p x p
ter vector p ∈ n , and ODE right hand side function f : T × n × n →
x
n , (t, x (t), p) → ẋ(t),
 
ẋ (t) = f t, x (t), p , t ∈ T , (3.37)
x (t 0 ) = x 0 .
x
We assume f to be Lipschitz continuous on T ×n , which ensures existence,
uniqueness, and continuous differentiability of the IVP’s solution x (t) on
the whole of T . For methods applicable to piecewise Lipschitz continuous
functions with implicitly defined discontinuities we refer to e.g. [156, 40,
118]. One–step methods for the approximate solution of this class of IVPs
can be defined as follows.
3.4 Initial Value Problems and Sensitivity Generation 81

Definition 3.15 (One–Step Method)


Let (t 0 , x 0 ) be an initial time and value for IVPs (3.37) and let a discretization grid
{t k }, 0  k  N be given. A one–step method for the solution of (3.37) is given by
a function Φ(t, h, x ) which defines a sequence of approximations {ηk } to the exact
def
solutions {x (t k )} of (3.37) on the discretization grid {t k } by starting in (t 0 , η0 ) =
(t 0 , x 0 ) and applying the iteration scheme
def
  def
ηk+1 = ηk + hk Φ t k , hk , ηk , hk = t k+1 − t k , 0  k  N − 1. (3.38)


Within this framework, Runge–Kutta methods, named for the authors of


[127, 181], are one–step methods with a generating function Φ of the fol-
lowing special structure.
Definition 3.16 (Runge–Kutta Method)
A Runge–Kutta method with s ∈  stages is a one–step method with the generating
function


s #
s $
def def
Φ(t, h, x ) = ci k i , k i = f t + αi h, x + h Bi j k j , (3.39)
i=1 j=1

where c ∈ s , α ∈ s , and B ∈ s×s are suitably chosen coefficients. 

Appropriately chosen coefficients and number of stages yield a consistent


and stable Runge–Kutta method of convergence order p  1 if f is suffi-
ciently often continuously differentiable, as stated by the following proposi-
tion.
Definition 3.17 (Consistency, Stability, Convergence)
A one–step method Φ is called a consistent method if the consistency error or local
discretization error τ satisfies

def x (t + h) − x (t)
lim sup ||τ (t, h, x )|| = 0, τ(t, h, x ) = − Φ (t, h, x ) . (3.40)
h→0 t∈T h

It is said to have consistency order p if ||τ(h)|| ∈ O (hp ).

A one–step method Φ is called convergent if


def
lim sup || (t, h, x )|| = 0, (t, h, x ) = η − x (t + h). (3.41)
h→0 t∈T

It is said to have convergence order p if || (h)|| ∈ O (hp ).

A one–step method Φ is called stable if there exists κ < ∞ such that || (h)|| 
κ ||τ(h)||. 
82 3 Constrained Nonlinear Programming

Proposition 3.1 (Consistency, Stability, s Convergence of RK methods)


A Runge–Kutta method is consistent if i=1 ci = 1. It is stable if the ODE’s right hand
side function f is Lipschitz continuous. A consistent and stable method is convergent
with order p if it is consistent with order p. 

Proof Proofs can be found in any standard textbook on numerical analysis,


e.g. [205]. 

For general coefficient matrices B, (3.39) is an implicit definition of the


vectors k i that requires the solution of a system of nonlinear equations. A
Runge–Kutta method is said to be of the explicit type if the rows of B can
be reordered to form a lower triangular matrix of rank s − 1. This allows
for iterative computation of the values k i . Algorithm 3.5 implements a basic
explicit Runge–Kutta method on a given discretization grid {t k } with N + 1
grid points.

Algorithm 3.5: A basic explicit Runge–Kutta method.


input : f , x 0 , p , {t k }k=0:N
output: {ηk }
η0 = x 0 ;
for k = 0 : N − 1 do
hk = t k+1 − t k ;
 s−1 
for i = 1 : s do k i = f t k + αi hk , ηk + hk Bi j k j , p ;
s j=1
ηk+1 = ηk + hk i=1 ci k i ;
end

The method’s coefficients are commonly given in the form of a so–called


Butcher tableau [45], and the tableau of the classical explicit 4th order
method is shown in figure 3.1. Other well–known explicit methods include
Euler’s method, Heun’s method, and Simpson’s rule.

0
1 1
2 2
1 1
2
0 2
1 0 0 1
1 1 1 1
6 3 3 6

Figure 3.1: Butcher tableau of the classical 4th order explicit RK method.
3.4 Initial Value Problems and Sensitivity Generation 83

The choice of the discretization grid {t k } is critical for the accuracy


of the obtained approximation to x (t N ). A number of authors have ex-
tended these classical methods to provide various error estimates, see e.g.
[55, 65, 66, 213]. A continuous representation of the discrete solution {ηk }
on the grid may be desirable in order to evaluate functions of the trajec-
tory x (·) independent of the discretization grid {t k }. To address this issue,
interpolation polynomials of a certain smoothness and with various error
estimates have been described by e.g. [64, 163, 197]. For further details,
we refer to these works and the references found therein.

3.4.2 Sensitivities of Initial Value Problems

The computation of the Lagrangian gradient and Hessian of (1.24) obtained


from the direct multiple shooting discretization requires the computation of
first- and second–order sensitivities of the IVP’s solution with respect to the
unknowns. In this section, we discuss several numerical approaches for the
computation of forward and adjoint directional sensitivities. Emphasis is put
on the discussion of methods that satisfy the principle of Internal Numerical
Differentiation (IND) [32, 33].

Perturbed Trajectories

A straightforward approach to obtain sensitivities of the IVP’s solution x (t f )


with respect to the initial values x 0 and parameters p is to apply one of the
finite difference procedures of section 3.3.2 to the IVP solution method. For
x p
one–sided finite differences in directions d x ∈ n and d p ∈ n , we obtain

η(t f ; t 0 , x 0 + hd x , p + hd p ) − η(t f ; t 0 , x 0 , p)
x d (t f ; t 0 , x 0 , p) = (3.42)
h
+ O(tol/h) + O(h)

where η(t f ; t, x ) denotes the approximation of the IVP’s solution x (t f ) ob-


tained when starting at time t with initial values x , and tol is the local
error bound, i.e., the integration tolerance. From (3.42) it can be seen that
1
the optimal perturbation is h = tol 2 , which reveals that very tight inte-
gration tolerances, i.e., very fine discretization grids {t k }, are required to
obtain sufficiently precise approximations of the IVP sensitivities.
84 3 Constrained Nonlinear Programming

This approach is referred to as External Numerical Differentiation (END),


as it treats the IVP solution method as a “black box” to which finite differ-
ences are applied externally. Indeed in (3.42) we have implicitly assumed
x
the numerical method to be a sufficiently smooth mapping η : T × n →
x
n , (t 0 , x 0 ) → η(t f ). For most numerical codes actually available, this as-
sumption however is not satisfied. For the unperturbed initial values (x 0 , p)
and the perturbed ones (x 0 + hd x , p + hd p ), nondifferentiabilities and even
discontinuities of the mapping η are introduced by adaptive and possibly
different choices of the discretization grids {t k }, the use of pivoting in lin-
ear algebra subroutines, and the use of iterative or inexact solvers.

The Principle of Internal Numerical Differentiation

The principle of Internal Numerical Differentiation (IND) was introduced in


[32] and is based on the idea of differentiating the discretization scheme
used to compute an approximation of the nominal solution. This encom-
passes the need to fix for the perturbed evaluations all adaptive components
of the mapping η to those settings that were used for the unperturbed eval-
uation. As this selective freeze of adaptive components requires access to
the numerical code, the differentiation procedure actually becomes an in-
ternal component of that numerical code. The approximation (3.42) is in
this case identical to the simultaneous solution of

f (t, x (t) + hx d , p + hd p ) − f (t, x (t), p)


ẋ d (t) = , t ∈T, (3.43)
h
x d (t 0 ) = d.

together with the IVP (3.37). The expected local approximation error for x d
1 1
is reduced to O (tol) + O (eps 2 ) if h is chosen such that h||x d || ∈ O (eps 2 ).

Thus IND results in a considerable increase in precision of the derivatives


for low tolerances tol and delivers derivatives that are consistent with the
discretization scheme. The possibility of using lower tolerances results in
considerable speedups of the sensitivity generation. For applications of the
IND principle to extrapolation schemes and linear multistep methods we
refer to [34]. A discussion of arbitrary–order forward and adjoint sensitivity
generation according to the IND principle in the variable order variable step
size Backward Differentiation Formula (BDF) method DAESOL-II is found in
[4].
3.4 Initial Value Problems and Sensitivity Generation 85

Variational Differential Equations

A second possibility of computing IVP sensitivities is to solve the variational


differential equations along with the ODE. The sensitivity IVP into directions
x p
d x ∈ n and d p ∈ n reads

ẋ d (t) = f x (t, x (t), p) · x d (t) + f p (t, x (t), p) · d p , t ∈T, (3.44)


x
x d (t 0 ) = d ,

assuming the initial value x 0 to be independent of p . Here again the IND


principle is fulfilled only if both the IVP and the variational system (3.44)
are solved simultaneously using the same adaptively chosen discretization
scheme. For all linear methods it can be shown that this approach is the
limit case of the finite difference approach for h → 0, cf. [34]. The expected
local approximation error for x d is further reduced to O (tol). This approach
also allows to exploit sparsity patterns in the Jacobians f x and f p of the ODE
system’s right hand side.

Adjoint Sensitivities by Automatic Differentiation

x p
Adjoint sensitivities x̄ d ∈ n , p̄d ∈ n of the discretization scheme for IVP
x
(3.37) into a direction d̄ ∈ n can be computed by applying the reverse
mode of automatic differentiation, cf. section 3.3.4. For an explicit Runge–
Kutta method (3.39), this yields for N  k  1 the adjoint iteration schemes

def def
x̄ dN = d̄, x̄ dk−1 = x̄ dk − hk−1 Φ̄x (t k−1 , hk−1 , x k−1 ), (3.45a)
def def
p̄dN = 0, p̄dk−1 = p̄dk +h k−1 p
Φ̄ (t k−1 k−1
,h ,x k−1
), (3.45b)

with the adjoint one–step method’s generating functions Φ̄x and Φ̄p being

def

s
def
Φ̄x (t, h, x ) = k̄ ix , k̄ ix = −d̄iT f x (t i , x i , p), (3.46a)
i=1
s
def p p def
Φ̄p (t, h, x ) = k̄ i , k̄ i = d̄iT f p (t i , x i , p). (3.46b)
i=1
86 3 Constrained Nonlinear Programming

Therein, we have used the shortcut notation d̄i to denote the adjoint direc-
tion of the i -th stage,

def

s
d̄i = ci x̄ d (t) − h B ji k̄ xj . (3.47)
j=i+1

A detailed derivation can be found in [34]. The evaluation points (t i , x i , p)


of f x are chosen as in the nominal scheme (3.39), which requires these
point to be stored during the nominal solution for later reuse during the
computation of adjoint directional sensitivities (taping). Adjoint directional
derivatives d̄iT f x ,p of the ODE system’s right hand side can be computed by
backward mode of automatic differentiation, section 3.3.4, by multiplication
with a sparse Jacobian f x if this can be done efficiently, or by directional
finite difference approximations.

Adjoint Variational Differential Equations

The described approach can be interpreted as the integration of the adjoint


system

ẋ d (t) = − f x T (t, x (t), p) · x d (t) t ∈T, (3.48a)


x d (t f ) = d̄,
ṗd (t) = − f p T (t, x (t), p) · d̄ t ∈T, (3.48b)
pd (t f ) = 0,

backwards in time using a special Runge–Kutta method. Certain methods


such as the classical 4th order method are self–adjoint in the sense that
Φ̄x in (3.46a) actually is the generating function Φ in (3.39), cf. [34]. The
principle of IND is satisfied in this case. Note however that if system (3.48a)
is solved forwards in time, i.e., simultaneously with the nominal IVP, then
the obtained adjoint sensitivity in general is only an approximation of the
inverse of the discretization scheme’s adjoint and does not not satisfy the
principle of IND, cf. again [34].
3.5 Summary 87

3.4.3 Second Order Sensitivities

The automatic differentiation approach of section 3.3.5 can be applied to


Runge–Kutta methods to compute a directional second order sensitivity

dx
d̄ T (t f ; t 0 , x 0 , p) d (3.49)
dx 0 , p

into directions d ∈ n +n , d̄ ∈ n of the IVP solution. During the forward


x p x

sweep the sensitivities x d (t ik ) have to be stored in addition to the evaluation


points (t ik , x ik ), 1  i  s , 0  k  N . In the backward sweep, these are used
to evaluate directional derivatives of f x x , f x p , and f p p .
The computation of a second order adjoint directional derivative as re-
quired for the computation of the exact Hessian of the Lagrangian requires
a forward sweep through the Runge–Kutta scheme with nx + nq canonical
directions d , and a single backward sweep with the Lagrangian multipliers
d̄ = λm
i of the matching conditions.

3.5 Summary

In this chapter we have briefly reviewed the theory of nonlinear program-


ming and have introduced SQP algorithms for the solution of NLPs in an
active–set framework. Several different approximation schemes for the Hes-
sian of the Lagrangian have been presented that avoid the costly computa-
tion of second order derivatives. The evaluation of the multiple shooting dis-
cretized OCP’s matching condition constraints requires the solution of IVPs.
To this end, we have briefly presented Runge–Kutta methods for non–stiff
ODEs. Derivative and sensitivity generation for these methods according to
the principle of IND have been discussed.
4 Mixed–Integer Real–Time Iterations

In this chapter we present an algorithmic framework for mixed–integer Non-


linear Model Predictive Control (NMPC) that builds on the MIOCP and NLP
techniques and algorithms of the previous chapters. We present the real–
time iteration scheme for moving horizons, cf. [51, 53] that allows to deal
with challenges every real–time on–line optimal control algorithm has to
face. Conditions for local contractivity of this algorithm are given. As one
central part of this thesis we develop a new real–time iteration scheme for
mixed–integer NMPC problems treated by the outer convexification refor-
mulation of the previous chapter. Relying on local contractivity of the clas-
sical real–time iteration scheme, we give a proof of local contractivity for
the mixed–integer case in the presence of an arbitrary rounding scheme.
A sufficient condition coupling the contractivity statement to the sampling
time is derived and an upper bound on the allowable sampling time is given
that depends on Lipschitz and boundedness properties of the problem.

4.1 Real–Time Optimal Control

In an online optimal control application, we aim at solving not only one sin-
gle instance of the optimal control problem, but rather a sequence of such
problems. At every time instant t , an optimal control problem as described
in chapter 1 with an initial value x 0 (t) representing the differential state of
the process has to be solved instantaneously. The resulting optimal control
u  (t) is fed back to the process at time t . Hence, the trajectory u  (·, x 0 (·))
constitutes an optimal feedback control.

4.1.1 Conventional NMPC Approach

Practical implementations obviously deviate from this idealized description


in several points. First, it is not the optimal control problem that is solved at
every time instant, but rather a finite dimensional approximation obtained
by one of the approaches presented in chapter 1. Second, the solution u  (t)

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8_5,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
90 4 Mixed–Integer Real–Time Iterations

past future

x 0 (t)

x (t)
x  (·)

u  (·)

t t +h

Figure 4.1: Idealized real–time optimal control. For the observed process state x 0 (t)
the infinite–dimensional predictive control problem is solved instanta-
neously and the optimal control u  (t) is fed back to the process at time
t , steering it to an optimal state trajectory x  (·).

cannot be obtained instantaneously, but requires some computation time


to pass until it is available for feedback to the process under control. The
optimal control problems thus are solved only at discrete sampling times t 0 ,
t 1 , . . . with durations δt 0 , δt 1 , . . . at least as long as the solution of the next
optimal control problem takes.

As a consequence, the optimal control is available for feedback with a de-


lay only. If the sampling intervals are not short enough, this delay may im-
pact the performance of the process controller to an unacceptable degree.
On the other hand, the computational effort of solving an optimal control
problem determines an unavoidable minimal delay. This delay in addition is
not known in advance and theoretically may not even be bounded at all if
iterative numerical methods are employed. Practical implementations there-
fore must use a prescribed stopping criterion.

The described conventional NMPC scheme may exhibit bad performance


as sudden disturbances of the process state x (t) can be accounted for in the
optimal control problem only after a worst case delay of δt . In the mean-
time, a rather arbitrary and certainly suboptimal control unrelated to the
actual process state is fed back to the process.
4.1 Real–Time Optimal Control 91

past future

x (t 1 )

x (t 0 )

u  (t 1 )
u  (t 0 )

δt 0
t0 t1 t2 t3 t4 ... t +h

Figure 4.2: The conventional NMPC approach. The optimal feedback control u  (t 0 )
for the process state x (t 0 ) is available only after a computational delay
of δt 0 and is fed back to the process for the time interval [t 1 , t 2 ]. In
the meantime, a rather arbitrary and suboptimal control is applied. The
feedback control u  (t 0 ) therefore is unrelated to the process state x (t 1 )
that has since deviated from the optimal trajectory.

4.1.2 The Idea of Real–Time Iterations

It is the fundamental idea of the real–time iteration scheme, cf. [51, 53], to
use a predictor x pred (t + δt) of the process state x (·) at the time instant t +
δt when the computed control u  (t) is anticipated to be ready for feedback
to the process. First, a careful initialization of the SQP method used to solve
the discretized optimal control problem allows to reduce the computational
effort to only one SQP iteration for each problem. Second, a separation of
the computations necessary to obtain the feedback control into three phases
is made, two of which can be completed in advance without knowledge of
the actual process state. This approach reduces the feedback delay δt by
orders of magnitude.

Figure 4.3 depicts the real–time iteration scheme setting. A tangential


prediction of the process state x (t 1 ) based on the old one x (t 0 ) provides
an improved initializer for the computation of the control feedback u(t 1 ).
The deviation of this feedback from the actually optimal one u  (t 1 ) is dimin-
ished as the feedback delay δt 0 is drastically reduced by the three–phase
computation.
92 4 Mixed–Integer Real–Time Iterations

past future

x pred (t 1 )
x 0 (t 1 ) x 0 (t 1 + δt 1 )
x (t 0 )

u  (t 1 + δt 1 )
u  (t 1 )

t0 t1 t2 t3 t4 ... t +h

Figure 4.3: The real–time iteration scheme for a piecewise constant control dis-
cretization of the predictive control problem. A first order predictor of
the process state in t 1 is used as an initialization for the computation
of the feedback control u  (t 1 ). The feedback delay δt 1 and thus the
feedback duration for the unrelated and suboptimal control is drastically
reduced by the three–phase computation. Consequentially, the actually
optimal feedback control u  (t 1 + δt 1 ) does not deviate much from the
computed one.

4.2 The Real–Time Iteration Scheme

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 τ ∈ ,

min f (x , τ) (4.1)
x ,τ

s. t. 0 = g (x , τ),
0  h(x , τ),
4.2 The Real–Time Iteration Scheme 93

under the assumptions of chapter 3. The primal–dual solution points


(x  (τ), λ (τ), μ (τ)) form a continuous 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 or-
def
der conditions of theorem 3.4 are satisfied. Assume further that the step δ =
(δx  , δλ , μ ) obtained from the solution of the Quadratic Program (QP)
1
min 2
δx T Bδx + δx T b (4.2)
δx

s. t. 0 = (g x δx ) t + (g x ) Tx δx ,
T
0 = (hstrong
x
) t + (hstrong
x
) x δx ,
T
0  (hweak
x
) t + (hweak
x
) x δx ,
def def
satisfies strict complementarity. Herein B = L x x and b = (L x ) t are both evaluated in
the KKT point (x  (0), λ (0), μ (0)) and hstrong and hweak denote the restrictions of h
onto the strongly resp. weakly active constraints.

Then there exists


> 0 and a differentiable curve
x g h
γ : [0,
] → n × n × n , τ → (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 δ . 

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 τ̂ ∈ . The


addition of this constraint to problem (4.1) allows for a transition between
two subsequent NLPs of the parametric 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.
94 4 Mixed–Integer Real–Time Iterations

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 theo-
rem 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). 

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 or-


der 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 paramet-
ric QP methods. The approach here in to compute the first order predictor
(δx  (τ1 ), δλ (τ1 ), δμ (τ1 )) by solving the parametric QP on τ ∈ [0, 1] ⊂ 
for its solution in τ = 1,

1
min 2
δx T B(τ)δx + δx T b(τ) (4.4)
δx

s. t. 0 = g x (τ)δx + g (τ),
0  h x (τ)δ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
4.2 The Real–Time Iteration Scheme 95

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 consistutes 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 op-
timal control, the parametric variable is the initial process state sk that is
fixed to the measured or estimated actual process state x 0 (t k ) by a triv-
ial linear equality constraint. For the direct multiple shooting discretization
(1.24) this initial value embedding for problem P(t 0 ) reads


m
min l i (t i , si , q i ) (4.5)
s,q
i=0

s. t. 0 = x i (t i+1 ; t i , si , q i ) − si+1 , 0  i  m − 1,
eq
0 = ri (t i , si , bi (t i , q i )), 0  i  m,
0  ri (t i , si , bi (t i , q i )),
in
0  i  m,
0  ci (t i , si , bi (t i , q i )), 0  i  m,
0 = s0 − x 0 (t ). 0

Given an optimal solution (s  (x 0 (t k )), q  (x 0 (t k ))) to the discretized optimal


control problem P(t k ) for the process state x 0 (t k ), the first full step com-
puted by the exact Hessian SQP method for the neighboring problem with
new embedded initial value x 0 (t k+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 , q m−1 , sm ) re-


quired for the first iteration of the SQP algorithm on the multiple shooting
discretization of the current problem is available. Depending on the char-
acteristics of the problem instance under investigation, different strategies
for obtaining an initializer from the previous real–time iteration’s solution
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
96 4 Mixed–Integer Real–Time Iterations

prediction horizon in a computationally 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 x 0 (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 re-
maining 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

v k = (s0 , q0 , . . . , sm−1 , q m−1 , sm ),

the outcome of the first SQP iteration for the NLP with embedded initial
value x 0 (t k ) or equivalently the outcome of the k-th iteration of the real–
time iteration scheme, to initialize the next iteration with v k+1 as follows,
def
v k+1 = (s1 , q1 , . . . , sm−1 , q m−1 , sm , q m−1
new
, smnew ).
new new
The new state and control values q m−1 and sm can be chosen according to
different strategies.
new
1. An obvious choice is q m−1 = q m−1 and smnew = sm . The only infeasibility
introduced for iteration k + 1 into a feasible trajectory from iteration
k is the potentially violated matching condition

x (t m ; t m−1 , sm−1 , q m−1 ) = sm .

new
2. A new state value sm that satisfies the matching condition can be
determined at the expense of solving an IVP on the new last shooting
interval

new
ẋ m−1 (t) = f (t, x (t), b(t, q m−1 ), p), t ∈ [t m−1 , t m ] ⊂ ,
x m−1 (t m−1 ) = sm−1 .
new
employing the control parameter value q m−1 . Path and terminal con-
straints may still be violated by this initialization.
4.2 The Real–Time Iteration Scheme 97

Note however that constraint violations can be treated in a natural way


in a direct multiple shooting framework and do not introduce additional
difficulties.

The shift in the primal variables carries over to that of the dual variables,
of the computed node function values and linearizations, and depending on
the approximation scheme also to the Hessian.

Warm Start Strategy

For short horizons and problem instances whose solution characteristics are
dominated by terminal constraints or the Mayer–term objective that possi-
bly are introduced to cover the neglegted cost of an infinite prediction hori-
zon, the solutions of the subsequent problems may show similar features.
In this case a better initialization of the NLP variables may be provided by
v k+1 = v k . The initial value embedding then introduces an infeasibility and
the obtained first SQP iterate is exactly the first order predictor of theo-
rem 4.2 if an exact Hessian method is used. In this warm start strategy, the
sampling times also decouple from the shooting grid discretization, i.e., the
discretization can be chosen coarser than the control feedback.

4.2.4 Local Feedback Laws

The real–time iteration scheme with warm start strategy can be seen as a
generator of linear local feedback laws. In this sense, it’s sampling rate can
be fully decoupled from that of the control feedback. The linear feedback
controller evaluates the most recently generated feedback law, a compu-
tationally very cheap operation, until the real–time iteration scheme has
computed a more recent feedback law based on new function evaluations
and linearizations [51]. This idea can be extended to adaptive reevaluation
and relinearization of different parts of the discretized OCP, and has been
realized in a so–called multi–level iteration scheme, see e.g. [37, 123].

Parts of the real–time iteration scheme can in priciple be transferred to


interior–point methods, see e.g. [224, 225], although the excellent warm
starting capabilities of active set methods are not maintained and the com-
puted tangential predictors are inferior across active set changes [54].
98 4 Mixed–Integer Real–Time Iterations

4.2.5 Immediate Feedback

The quadratic subproblem solved for the step δv = (δs , δq ) in each real–
time iteration on a moving horizon reads

1
min 2
δv T B(v )δv + δv T b(v ) (4.6)
δv

s. t. 0 = g v (v )δv + g (v ),
0  h v (v )δv + h(v ),
0 = s0 + δs0 − x 0 (t k ).

It is noteworthy that problem (4.6) depends on the actual or estimated pro-


cess state x 0 (t k ) only in the initial value embedding constraint. This sug-
gests that the overwhelming part of problem (4.5) can be set up without
knowledge of x 0 (t k ). In particular, the evaluation and linearization of all
functions — except the linear embedding constraint — as well as the compu-
tation or approximation of the Hessian can be carried out before knowledge
of x 0 (t k ) is required. This includes the solution of the IVPs and the gen-
eration of IVPs sensitivities with respect to the unknowns s and q , a task
that usually contributes significantly to the control feedback delay in con-
ventional NMPC. The follwing three–phase setup for a real–time iteration
realizes this advantage:

1. Preparation: Prepare the solution of (4.6) as far as possible without


knowledge of x 0 (t k ).

2. Feedback : Solve problem (4.6) for the control feedback δq0 on the
first multiple shooting interval and feed it back to the process.

3. Transition: Complete the solution of (4.6) for the full vector δv of


unknowns and make the transition to the new QP subproblem for t k+1 .

In addition, any exploitation of the direct multiple shooting structure hidden


in problem (4.6), such as by condensing methods [36, 51, 132, 167] or by
block structured linear algebra [202] can take place at this stage of the
algorithm. We will see in chapter 7 how the immediate feedback property
can be extended to the QP solver’s block structured linear algebra to further
reduce the feedback delay.
4.3 Contractivity of Real–Time Iterations 99

4.3 Contractivity of Real–Time Iterations

Nominal stability of the closed–loop NMPC system when using the real–
time iteration scheme to compute control feedback is of vital importance
in order to ensure that the NMPC controller does not accidentally drive
the controlled process away from a desired point of operation. This section
sketches a proof of contractivity of the real–time iteration scheme due to
[51]. In the next section we rely on this proof to derive conditions for local
contractivity of our new mixed–integer extension to the real–time iteration
scheme.

4.3.1 Fixed Control Formulation

In the previous section we have derived the real–time iteration scheme from
a special SQP method for a family of parametric NLPs, performing one SQP
iteration for each problem. We now consider the real–time iteration scheme
first on a shrinking horizon of initial length m and assume sampling times
δt k that sum up to the horizon length h such that the predictive control
problem has been solved after the k-th feedback and the horizon has shrunk
to zero length.

We assume throughout this section that the real–time iterations be started


sufficiently close to a KKT point of the problems, such that the active set is
known. Assuming strict complementarity to hold, we may restrict our pre-
sentation to equality–constrained problems. We denote by P(t 0 ) the problem
for the first control feedback on the full horizon of length m,

min f (s, q ) (4.7)


s,q

s. t. 0 = g (s, q ),
0 = s0 − x 0 (t 0 ),

satisfying the standard assumptions of chapter 3. We further assume regu-


larity of g s which allows us to regard the vector s as dependent variables on
the vector of unknowns q . After the first SQP iteration, the control feedback
u0 = q0 +δq0 is known and the next problem P(t 1 ) is obtained from P(t 0 ) by
fixing the unknown q0 to the realized value. Problem P(t 1 ) thus comprises
the following constraints:
100 4 Mixed–Integer Real–Time Iterations

0 = s0 − x 0 (t 0 ), (initial value embedding) (4.8)


0 = x 0 (t 1 ; t 0 , s0 , q0 ) − s1 , (matching condition)
0 = q0 − u0 . (control fixation)

Due to linearity, the correct values for s0 and q0 will be found already after
the first SQP iteration on problem P(t 1 ). This shows that fixing q0 is com-
pletely equivalent to solving P(t 1 ) on a shrinked horizon of length m−1. For
the case of Differential Algebraic Equation (DAE) dynamics see [51].
Based on this conclusion we define the sequence {P(t k )}k of problems for
0  k  m as

min f (s, q ) (4.9)


s,q

s. t. 0 = g (s, q ),
0 = sk − x 0 (t k ),
0 = qi − ui , 0  i  k − 1.

For k  m no degrees of freedom remain in the problems P(t k ) of this se-


quence, as the horizon length has shrunk to zero.

4.3.2 Contraction Constants

We are interested in the tractability of the problems P(t k ) by a Newton–


type method. In particular, the problems P(t k ) should not become more and
more difficult to solve as we keep adding constraints that fix more and more
degrees of freedom. To this end, the contraction constants ω and κ of sec-
tion 3.2.5 need to be investigated for the problems P(t k ). We first consider
contractivity of the off–line problem P(t 0 ) for the Newton–type iterations

def
y k+1 = y k + δ y k = y k − M(y k )r (y k ) (4.10)

wherein r (y k ) denotes the Lagrangian gradient of problem (4.7) in the


primal–dual point y k = (x k , λk ) and M(y k ) denotes the inverse of the KKT
matrix J(y k ), an approximation to the inverse of the exact Hessian KKT
matrix in y k .
Theorem 4.3 (Off–Line Convergence)
Assume that the inverse M(y) of the KKT matrix J(y) exists and that M(y) be
x g
bounded by β < ∞ on the whole of a domain D ⊆ n × n ,
4.3 Contractivity of Real–Time Iterations 101

∀y ∈ D : ||M(y)||  β. (4.11)

Let J be Lipschitz on D with constant ω/β < ∞,

∀y1 , y2 ∈ D : β||J(y1 ) − J(y2 )||  ω||y1 − y2 ||. (4.12)

Assume further that the deviation of the Hessian approximation B(y) from the exact
Hessian L x x (y) is bounded by κ/β < 1/β on D ,

∀y ∈ D : β||B(y) − L x x (y)||  κ < 1. (4.13)

Finally, let the assumptions of the local contraction theorem 3.8 hold; let in particular
the first step δ y 0 starting in an initial guess y 0 be sufficiently small such that
 
def
δ0 = κ + ω δ y 0  < 1. (4.14)
2

Then the sequence of Newton–type iterates {y k } converges to a KKT point y  whose


primal part x  is a strict local minimum of problem (4.7). 

Proof A proof can be found in [51]. 

The following theorem shows that this property carries over to all prob-
lems of the sequence.
Theorem 4.4 (Contraction Constants of the On–Line Problems)
Let the sufficient local convergence conditions (4.3) hold for problem P(t 0 ) (4.7).
Then the inverse Jacobian approximations M for the problems P(t k ) satisfy the κ–
and ω–conditions of definition 3.12 and 3.13 with the same values of κ and ω. 

Proof A proof can be found in [51]. 

4.3.3 Contractivity

We now consider contractivity of the sequence {y k }k of iterates computed


by the real–time iteration scheme as more and more control parameters
are fixed in the sequence {P(t k )}k of problems. Each problem P(t k ) of this
sequence is equivalent to finding the root y  = (s  , q  , λ ) of the Lagrangian
gradient function
⎡ ⎤
⎢ P1 (q − u ) ⎥
k k

⎢Pk Lq (s , q, λ)⎥
r (y) = ⎢ ⎥
def
2
⎢ L (s , q, λ) ⎥ . (4.15)
⎣ s ⎦
g (s , q)
102 4 Mixed–Integer Real–Time Iterations

Herein, the vector


  q
u k = u0 . . . u k−1 0 . . . 0 ∈ m·n (4.16)

contains the determined feedback controls of the k − 1 completed real–time


iterations. The projectors P1k and P2k project onto the already determined
fixed part q0 , . . . , q k−1 and the unknown free part q k , . . . , q m−1 of the control
q
parameters q ∈ m·n respectively,

def
 
P1k q k = q0k . . . q k−1
k
0 ... 0 , (4.17)
def
 
P2k q k = 0 . . . 0 q kk . . . q m−1
k
.

Theorem 4.5 (Contractivity of the Real–Time Iterations)


Let the sufficient local contraction conditions of theorem 4.3 hold for the off–line
problem P(t 0 ). Then the sequence of real–time iterates contracts to a feasible point
y  ∈ D0 . 

Proof Key to the proof of this theorem is the observation that the step

def
δ y k = −M k (y k )r k (y k ) (4.18)

in the Newton–type iteration does not change if it is instead defined by

def
δ y k = −M k+1 (y k )r k+1 (y k ), (4.19)

i.e., if the residual function and inverse Jacobian approximation of the next
problem P(t k+1 ) are used in which the feedback control parameter q k to be
determined in problem P(t k ) under investigation is already known. To see
this, we only need to show

0 = r k+1 (y k ) + J k+1 (y k )δ y k (4.20)


⎡ ⎤ ⎡ ⎤
Pk+1 (q k − q k+1 )⎥ ⎢ P1k+1 0 0 ⎡ ⎤
⎢ 1 ⎥ k+1
− qk ⎥
⎢ Pk+1 Lq (s k , q k ) ⎥ ⎢Pk+1 Bq q Pk+1 B T Pk+1 g T ⎥ ⎢ q
=⎢⎢
2 ⎥+⎢ 2 2 qs 2 q ⎥⎢
⎣ s
k+1
− sk ⎥⎦.
⎣ L s (s k , q k ) ⎥ ⎢
⎦ ⎣ Bq s Bs s g sT ⎥ ⎦ −(λk+1 − λk )
g (s k , q k ) gq gs 0

Observe now that we have in particular for the already determined control
parameters

P1k+1 (q k − q k+1 ) + P1k+1 (q k+1 − q k ) = 0. (4.21)


4.4 Mixed–Integer Model Predictive Control 103

Hence, any two subsequent real–time iterations can be treated as if they


belonged to the same problem P(t k+1 ). The contractivity property then di-
rectly follows from the local contraction theorem 3.8. The full proof can be
found in [51]. 

4.4 Mixed–Integer Model Predictive Control

In this section we develop a new algorithm for mixed–integer model pre-


dictive control. It is established from a synthesis of the convexification and
relaxation approach of chapter 2 and the real–time iteration scheme for
NMPC of the previous sections. We transfer rounding schemes to real–time
iterations in order to come up with a fast mixed–integer nonlinear model
predictive control algorithm. We show for the first time that this algorithm
can be interpreted as an inexact SQP method. Using this framework, condi-
tions are derived under which contractivity of the mixed–integer real–time
iteration scheme is guaranteed.
104 4 Mixed–Integer Real–Time Iterations

past future

x 0 (t 1 )
x 0 (t 1 + δt 1 )

1 w  (t 1 + δt 1 )

w  (t 1 )
0

t0 t1 t2 t3 t4 ... t +h

Figure 4.4: The mixed–integer real–time iteration scheme for a piecewise constant
control discretization of a binary control function. The relaxed optimal
feedback control w  (t 1 ) is rounded to a binary feasible one according
to a rounding scheme. The resulting deviation of the process state x (t)
from the computed optimal state trajectory can be bounded by a suitable
choice of the discretization grid.

Figure 4.4 depicts the new mixed–integer variant of the real–time itera-
tion scheme for the case of a single binary control. The computed integer
feedback control w (t 1 ) is available for feedback to the process after a very
small feedback delay only, and thus does not deviate much from the theo-
retically optimal feedback w  (t 1 ). It is rounded to a binary feasible control
feedback that is applied to the process for the duration of the preparation
phase of the next real–time iteration.
Several questions obviously arise. An appropriate rounding scheme
should ensure binary or integer feasibility of the control while trying to
approximate as closely as possible the relaxed optimal solution. Rounding
the control results in a deviation of the state trajectory from the optimal one
that is attainable only by a fractional control, and this deviation is coupled
to the discretization grid granularity. Investigation of the contractivity prop-
erties of the resulting mixed–integer real–time iteration scheme is crucial
in order to guarantee nominal stability. Ideally, the contractivity argument
should yield an estimated upper bound on the allowable sampling times of
the scheme.
4.4 Mixed–Integer Model Predictive Control 105

4.4.1 Mixed–Integer Real–Time Iterations

For one modified Newton–type iteration of the mixed–integer real–time iter-


ation scheme we introduce the notation
def
y k+1 = y k − M k (y k )r k (y k ) + e k (y k ), (4.22)
def
δ ỹ k = −M k (y k )r k (y k ) + e k (y k ).

Herein, the vector e k (y k ) denotes the modification applied to the new iter-
ate after the step δ y k , required in order to obtain an integer feasible control
part q kk+1 of the new iterate y k+1 . Assuming binary controls q k and noting
that after the Newton–type iteration for problem P(t k ) only the k–th control
is rounded, we have for the modification e k (y k ) the identity
  q
e k (y k ) = 0 . . . 0 ekk (ykk ) 0 . . . 0 ∈ m·n , (4.23)

q
wherein ekk (ykk ) ∈ n with bounds on ||ekk (ykk )|| possibly depending on the
actual rounding scheme applied. The introduced modification obviously af-
fects the classical real–time iteration scheme argument in several ways as
follows:

• The new fixed control q kk+1 = q kk + δ q̃ kk to be determined after the


Newton–type iteration for problem P(t k ) can be found according to
one of several possible rounding schemes.

• The fixation of q kk+1 in problem P(t k+1 ) to a possibly different value


than that of the true next Newton–type iterate q k + δq k introduces a
deviation of the process state x (t k+1 ) from the predicted one sk+1 .

• Note that in problem P(t k+1 ) the correct values of skk and q kk are still
identified after the first Newton–type iteration for that problem as the
two embedding constraints (4.8) remain linear.

• Nominal stability of this mixed–integer real–time iteration scheme is


covered by the proofs due to [51], see theorem 4.5. Therein the so-
lution of P(t k+1 ) is identified with the solution of P(t k ) assuming the
controls q k to already be fixed to the outcome of the Newton–type step
for P(t k ). Hence, the implications of modifying this Newton–type step
in a rounding scheme need to be studied.

These topics are addressed one by one in the following sections.


106 4 Mixed–Integer Real–Time Iterations

4.4.2 Rounding Schemes

We are interested in obtaining after the k–th iteration from q kk and the New-
ton–type step δq kk a binary feasible new mixed–integer real–time iterate
q kk+1 . Analogous to the rounding schemes of chapter 2 for off–line MIOCPs,
two different on–line rounding schemes may be conceived that define a mod-
ified step δ q̃ kk to a new binary feasible feedback control q kk+1 .

Direct Rounding

The direct rounding scheme of definition 2.13 can immediately be trans-


ferred to the case of model–predictive control by defining the control part
δ q̃ kk of the step δ ỹ k to the new binary feasible mixed–integer real–time iter-
ate y k+1 according to

1 − qkk if qkk j + δq kk j > 12 ,
1  j  nΩ
def
δq̃kk j = (4.24)
− qkk j otherwise.

Direct rounding does not take into account the accumulated past deviation
from the relaxed optimal control trajectory incurred by rounding. This situ-
ation is improved by sum–up rounding as has been shown in chapter 2.

Sum–Up Rounding

The sum–up rounding strategy can be adapted to mixed–integer real–time


iterations by introducing a memory of the past rounding decisions for 1 
j  nΩ according to
 k k−1
def 1 − qkk j if i=0 qi j δt
i i
− q̃ii j δt i  12 δt k ,
δq̃kk j = i=0
(4.25)
− qkk j otherwise.

Note that this rounding strategy can be implemented without the need
for a memory of all past mixed–integer real–time iterates. For the case of
SOS1–constraints due to convexification of nonlinearly entering integer con-
trols, these rounding strategies need to be adapted to maintain feasibility
as shown in chapter 2.
4.4 Mixed–Integer Model Predictive Control 107

4.4.3 Initial Value Embedding

The fixation of q kk+1 in problem P(t k+1 ) to a possibly different value than
that of the true next Newton–type iterate q k + δq k introduces a deviation of
the process state x (t k+1 ) from the predicted one sk+1 . Two possibilities to
address this can be thought of.

1. The deviation can be considered as an additional source of distur-


bances of the actual process under control. A worst–case estimate
of the disturbance is provided by Gronwall’s inequality using the
rounded control q kk+1 = q kk + δ q̃ kk ,
 
 s ; t k , skk , q kk+1 , p)
k+1 − x k (t
k+1
(4.26)
 
 L δq̃ kk − δq kk  exp(L(t k+1 − t k )).

Here L is the local Lipschitz constant of f . Hence for this approach


to yield satisfactory performance of the mixed–integer real–time iter-
ation scheme, the sampling time δt k and thus the granularity of the
control discretization must be fine enough.

2. A new prediction of the state sk+1 can be computed at the expense


of one IVP solution on the k–th shooting interval using the rounded
control q kk+1 = q kk + δ q̃ kk

ẋ k (t) = f (t, x (t), q kk+1 , p), t ∈ [t k , t k+1 ] ⊂ , (4.27)


x k (t k ) = skk+1 .

This introduces an infeasibility of the matching condition constraint


for node sk+1 which can be naturally treated in the direct multiple
shooting framework, as has already been noticed for the shift strategy.

4.4.4 Contractivity

We next investigate contractivity of the mixed–integer real–time iteration


scheme. Nominal stability of this mixed–integer real–time iteration scheme
is covered by the proofs due to [51] if the argument of identifying the so-
lution of P(t k+1 ) with the solution of P(t k ) assuming the controls q k to be
fixed to the outcome of the Newton–type step for P(t k ) made in theorem
4.5 remains valid. In particular, if there exists an inexact inverse KKT matrix
108 4 Mixed–Integer Real–Time Iterations

M̃ k (y k ) satisfying both the assumptions of the local contraction theorem 3.8


and the condition

δ ỹ k = δ y k + e k (y k ) = − M̃ k (y k )r k (y k ), (4.28)

then the mixed–integer real–time iteration scheme can be written as New-


ton–type iterations

y k+1 = y k − M̃ k (y k )r k (y k ) (4.29)

and by the assumed properties of the inexact matrix M̃ k local contractivity


of the off–line problem, invariance of the contraction constants, and con-
tractivity of the (then mixed–integer) real–time iterations follow from the
presentation of the previous section.

Theorem 4.6 (Local Contractivity of Mixed–Integer Real–Time Iterations)


Assume that the modified Newton matrices M̃ k (y k ) satisfying

δ y k + e k (y k ) = − M̃ k (y k )r k (y k ) (4.30)

exist, and let M̃ k (y k ) satisfy the κ–condition with κ < 1. Then the mixed–integer
real–time iteration scheme contracts to a feasible and integer feasible point y  . 

We first address the question of existence of the matrix M̃ k (y k ) modifying


the Newton–type step δ y k such that it includes the rounding of the possibly
fractional control component q kk+1 of the new iterate y k+1 . The following
lemma shows that a construction of this modified matrix in y k is possible
using symmetric updates of rank one or two.

Lemma 4.1 (Construction of M̃ k )


Let y k be a non–stationary point of problem P(t k ) and let M k (y k ) denote the approx-
imation to the inverse of the Jacobian of problem P(t k ) in the point y k , giving the
Newton–type step
def
δ y k = −M k (y k )r k (y k ).

Let e k (y k ) denote an arbitrary but fixed modification of the step δ y k . Then the mod-
ified matrix M̃ k (y k ) satisfying

def
δ ỹ k = δ y k + e k (y k ) = − M̃ k (y k )r k (y k )
4.4 Mixed–Integer Model Predictive Control 109

exists. If e k (y k ) T r k (y k ) = 0 it is given by the symmetric rank one update

def e k (y k )e k (y k ) T
M̃ k (y k ) = M k (y k ) − , (4.31)
e k (y k ) T r k (y k )
and it is otherwise given by the symmetric rank two (DFP) update
  # $
def T T
M̃ k (y k ) = I − γk δ ỹ k r k (y k ) T M k (y k ) I − γk r k (y k )δ ỹ k − γk δ ỹ k δ ỹ k ,
(4.32)
def kT
γ = 1/(δ ỹ
k
r (y )).
k k


Proof The proof is given by verifying the modified Newton–type step prop-
erty. If e k (y k ) T r k (y k ) = 0 we have

− M̃ k (y k )r k (y k )
( )
e k (y k )e k (y k ) T
k k
= − M (y ) − k k T k k r k (y k )
e (y ) r (y )
e k (y k ) T r k (y k )
= − M k (y k )r k (y k ) + e k (y k )
e k (y k ) T r k (y k )
k
= δ y + e (y ) k k

= δ ỹ k .

T
Otherwise, if δ ỹ k r k (y k ) = 0 we have

− M̃ k (y k )r k (y k )
#  # T
$
= I − γk δ ỹ k r k (y k ) T M k (y k ) I − γk r k (y k )δ ỹ k
T
$
−γk δ ỹ k δ ỹ k r k (y k )
   
= I − γk δ ỹ k r k (y k ) T M k (y k ) r k (y k ) − r k (y k ) + δ ỹ k
= δ ỹ k .

T T
If finally δ ỹ k r k (y k ) = −δ ỹ k J k (y k )δ y = 0 then δ y = 0 by regularity of
the exact KKT matrix J k (y k ) and y k was a stationary point. 

For the next problem P(t k+1 ), which is set up in the new iterate y k+1 with
integer feasible control q kk+1 , we assume that control to be fixed by intro-
110 4 Mixed–Integer Real–Time Iterations

duction of an additional constraint in the approximation J̃ k+1 (y k+1 ) and con-


sequentially in its inverse M̃ k+1 (y k+1 ) as has been detailed in section 4.3.
Having shown existence of the modified matrix M̃ k producing the mixed–
integer real–time iteration step, we are now interested in the contractivity
properties of that matrix. To this end, we derive a condition under which the
κ–condition of definition 3.13 is satisfied.
Lemma 4.2 (κ–Condition for M̃ k )
Let the the assumptions of theorem 4.3 be satisfied with constants β and κM . Assume
further that there exists a constant
< 1 − κM such that the exact Jacobian J k (y k )
satisfies

β||J k (y k )e k (y k )|| 
||δ y k + e k (y k )||. (4.33)

Then the modified inverse M̃ k satisfies the κ–condition with κM̃ = κM +


< 1. 

Proof We evaluate the κ–condition (definition 3.13) for the modified matrix
M̃ k assuming that M k satisfies it with constant κM ,
 
|| M̃ k (y k+1 ) I − J k (y k ) M̃ k (y k ) r k (y k )||
 
= || M̃ k (y k+1 ) r k (y k ) − J k (y k ) M̃ k (y k )r k (y k ) ||
 
= || M̃ k (y k+1 ) r k (y k ) + J k (y k )δ ỹ k ||
 
= || M̃ k (y k+1 ) r k (y k ) + J k (y k )δ y k + J k (y k )e k (y k ) ||
  
= || M̃ k (y k+1 ) I − J k (y k )M k (y k ) r k (y k ) + J k (y k )e k (y k ) ||
 
= || M̃ k (y k+1 ) I − J k (y k )M k (y k ) r k (y k ) + M̃ k (y k+1 )J k (y k )e k (y k )||
 
 || M̃ k (y k+1 ) I − J k (y k )M k (y k ) r k (y k )|| + || M̃ k (y k+1 )J k (y k )e k (y k )||
 κM ||δ ỹ k || + || M̃ k (y k+1 )|| ||J k (y k )e k (y k )||
 κM ||δ ỹ k || + β||J k (y k )e k (y k )||.

Under the assumptions made, this results in the estimate


 
|| M̃ k (y k+1 ) I − J k (y k ) M̃ k (y k ) r k (y k )||  (κM +
)||δ ỹ k ||.

which is the κ–condition of definition 3.13 for M̃ k with a constant κ M̃ =


κM +
. 

It remains to be shown that the quantity J k (y k )e k (y k ) can indeed be made


small enough such that
satisfies the bound κM +
< 1. The next lemma
4.4 Mixed–Integer Model Predictive Control 111

def
establishes a coupling of this quantity to the length δt k = t k+1 − t k of the
k–th multiple shooting interval [t k , t k+1 ] ⊂  and shows that this quantity
vanishes along with δt .

Lemma 4.3 (Sampling Time κ–Condition for M̃ k )


There exists a length δ t̂ k > 0 of the k–th multiple shooting interval such that the
κ–condition of lemma 4.2 is satisfied for all δt k ∈ (0, δ t̂ k ). 

Proof Observing the direct multiple shooting structure of the Jacobian J k


we compute J k (y k )e k (y k ) explicitly as follows in (4.34), see also chapter 7
for details on the block structure.
Observe now that after outer convexification the convex control multipli-
ers q enter linearly in the objective, the dynamics, and the constraints. We
thus have Bqq = 0. We further assume that bounds on the control parameter
q to be rounded are inactive, as no rounding would occur otherwise. The
SOS1 equality constraint is not affected by rounding. Finally, point and dis-
cretized path constraints treated by outer convexification are independent
q q
of q . We thus have Rk ek = 0.
⎡ ⎤⎡ ⎤ ⎡ ⎤
.. . .
⎢ . ⎥ ⎢ .. ⎥
⎢ ⎥ .
.
⎢ ⎥ ⎢ ⎥ ⎢ sq q ⎥
⎢ Bkss
sq
Bk Rks T Gks T ⎥ ⎢ 0 ⎥ ⎢ Bk ek ⎥
⎢ ⎥ ⎢ q ⎥ ⎢ qq q ⎥
⎢ qs
Bk
qq qT
Bk Rk Gk
qT ⎥ ⎢e ⎥ ⎢ B e ⎥
⎢ ⎥ ⎢ k ⎥ ⎢ kq qk ⎥
k k k ⎢
J (y )e (y ) = ⎢
k
Rks Rk
q ⎥ ⎢ 0 ⎥ = ⎢ R e ⎥ (4.34)
⎥⎢ ⎥ ⎢ k k ⎥
⎢ Gks Gk
q
−I ⎥ ⎢ 0 ⎥ ⎢ Gqeq ⎥
⎢ ⎥⎢ ⎥ ⎢ k k ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
−I Bk+1 ⎥⎢0⎥ ⎢ 0 ⎥
ss

⎣ ..
⎦ ⎣ . ⎦ ⎣ . ⎦
. . .
. .

For the remaining two terms we derive estimates depending on δt k = t k+1 −


t k . To this end, we denote by x k (t k+1 ; t k , sk , q k ) the solution of the IVP


nq
ẋ (t) = qk,i f (t, x (t), ωi ), t ∈ [t k , t k+1 ],
i=1

x (t k ) = sk .

and introduce integral forms for the linear time–variant IVPs for the sensi-
tivities of the IVP solution with respect to sk
 t k+1
nq
dx (t k+1 ) dx (t)
=I+ qk,i f x (t, x (t), ωi ) dt,
dsk tk i=1
dsk
112 4 Mixed–Integer Real–Time Iterations

and for the sensitivities of the IVP solution with respect to q k ,


 nq
t k+1
dx (t k+1 ) dx (t)
= qk,i f x (t, x (t), ω ) i
+ f (t, x (t), ω i
)eiT dt.
dq k tk i=1
dq k

For their solutions we observe by Lipschitz continuity of f that for t k+1 → t k


it holds that

dx (t k+1 ) dx (t k+1 )
→I and → 0.
dsk dq k

We evaluate the two remaining nonzero terms in the Jacobian vector prod-
q
uct. First, we have for Gk

q d   dx k (t k+1 )
Gk = x k (t k+1 ; t k , sk , q k ) − sk+1 = (4.35)
dq dq k
q q q def sq
that Gk ek → 0ek = 0 for δk = t k+1 − t k → 0. Second, we have for Bk that
* t k+1
+
sq d2  
Bk = l(t, x (t), q k ) dt − λ T
x k (t k+1 ; t k , sk , q k ) − sk+1
dsk dq k tk
 t k+1
dx (t) d2 x k (t k+1 )
= l x q (t, x (t), q k ) dt − λ T . (4.36)
tk
dsk dsk dq k

sq
We further investigate the second term contributing to Bk which is again
defined by a linear time–variant IVP,
 nq
t k+1
d2 x k (t k+1 ) d dx (t)
= qk,i f x (t, x (t), ωi ) + f (t, x (t), ωi )eiT dt
dsk dq k dsk t i=1
dq k
k
 t k+1 nq (
dx (t) T dx (t)
= qk,i f x x (t) (4.37)
t i=1
ds k dq k
k
)
d2 x (t) dx (t)
+qk,i f x (t) + f x (t) eiT dt,
dsk dq k dsk

wherein we have omitted all but the leading argument of f . The limit be-
havior for t k+1 → t k is
4.4 Mixed–Integer Model Predictive Control 113

d2 x k (t k+1 )
→ 0.
dsk dq
def
Again by continuity of the integrand, we observe for δk = t k+1 − t k → 0 that
sq q q
Bk ek → 0ek = 0.
This shows ||J k (y k )e k || → 0 for δt → 0. By continuity in t k+1 there ex-
ists
 a shooting  interval length δ t̂ such that for all δt < δ t̂ it holds that
β  J k (y k )e k  <
for any
> 0. This completes the proof. 

Hence, by the proved lemmas, all assumptions of the contractivity theo-


rem 4.6 for our mixed–integer real–time iteration scheme can actually be
satisfied. In particular, for a shifting strategy we would need to chose a suit-
ably fine choice of the control discretization, leading to a short sampling
time during which rounding of the control causes a deviation of the pro-
cess trajectory from the predictor. For a warm start strategy, the control
discretization is independent of the sampling time. As long as the sampling
time is short enough to satisfy lemma 4.3, the discretization may be chosen
coarser.

4.4.5 Upper Bounds on the Sampling Time

We can extend the proof of the last theorem in order to derive a simple
and accessible upper bound on the sampling time δt to be chosen for the
mixed–integer real–time iteration scheme. We only consider problems with
sq
vanishing cross–term Bk of the Hessian of the Lagrangian here.

Theorem 4.7 (Sampling Time for Contractivity of M̃ k )


Let the approximate inverse of the KKT matrix in the new iterate be bounded by
β > 0,

|| M̃ k (y)||  β ∀y ∈ D,

and let the ODE system’s right hand sides after outer convexification f (t, x (t), ωi )
be bounded by bf̃ > 0,
x
|| f (t, x , ωi )||  bf̃ ∀t ∈ T , x ∈ X ⊂ n ,

and satisfy a Lipschitz condition


x
|| f (t, x 1 , ωi ) − f (t, x 2 , ωi )||  Af̃ ||x 1 − x 2 || ∀t ∈ T , x 1 , x 2 ∈ X ⊂ n .
114 4 Mixed–Integer Real–Time Iterations

 
Assume further that Bk = 0. Then the term  M̃ k (y k+1 )J k (y k )e k (y k ) satisfies with
sq

def
δt = t k+1 − t k
 
 M̃ k (y k+1 )J k (y k )e k (y k )  β b δt exp(A δt). (4.38)
f̃ f̃


q q
Proof In order to consider estimates of the nonzero vector component Gk ek
we first require the explicit solution to the sensitivity IVPs w.r.t. q k . Observe
that the explicit solution to the linear time varying IVP in integral form
 t1
u(t 1 ) = 0 + A(t)u(t) + b(t) dt, t1 > t0
t0

is
 t1
*  t
+ * t1
+
u(t 1 ) = b(t) exp − A(s) ds dt exp A(t) dt , t1 > t0.
t0 t0 t0

q
By comparison of terms this gives for Gk in (4.35) the explicit solution

 t k+1
*  t
+ * t k+1
+
q
Gk = f (t)eiT exp − qk,i f x (s) ds dt exp f x (t) dt .
tk tk tk

   t1
Using the estimate u(t 1 )  ||A(t)|| ||u(t)|| + ||b(t)|| dt for the general
 q 
t0
explicit solution, we have for the first component’s norm G  that k
 q q 
G e   b δt exp(A δt),
k k f̃ f̃
 
from e k (y k )  1 guaranteed by rounding, and by using the assumed
bound and Lipschitz constant on f (·). 

We will see a practical application of this statement in chapter 9.


It is worth noting that the above contractivity statements and estimates
crucially rely on the direct multiple shooting parameterization of the IVP
that limits the effect of rounding q kk to the interval [t k , t k + δt k ]. A single
shooting method would have to solve the IVP after rounding on the entire
remaining horizon [t k , t f ]. Even if that solution existed, convergence of the
Boundary Value Problem (BVP) might suffer from the potentially exponential
deviation of the state trajectory on the long time horizon.
4.5 Summary 115

4.4.6 Mixed–Integer Real–Time Iteration Algorithm

We can summarize the developed mixed–integer real–time iteration scheme


in the following algorithm:

1. Prepare the solution of problem P(t k ) as far as possible without knowl-


edge of the actual observed or estimated process state x 0 (t k ).
2. As soon as an observation or estimate x 0 (t k ) is available, compute the
feedback control q k by completing the prepared Newton–type itera-
tion using the current iterate y k as an initializer. This yields a first
order corrector δ y k .
3. Apply a rounding scheme to the potentially fractional feedback control
parameters q k,0 on the first shooting interval and feed the rounded
control back to the process.
4. Define the new primal–dual iterate y k+1 that will serve as an initializer
for the next problem P(t k+1 ) using a shift or warm start strategy.
5. Increase k by one and start over in point 1.

As seen in section 4.2, step 2. of the above algorithm essentially involves


the efficient solution of a QP or a parametric QP making use of the cur-
rent iterate as an initializer. We need to make sure, though, that this solu-
tion completes as fast as required to maintain local contractivity and thus
nominal stability of the scheme. Appropriate techniques are presented in
chapters 7 and 8.

4.5 Summary

In this chapter we have presented the real–time iteration scheme for fast
NMPC using active–set based NLP methods such as Sequential Quadratic
Programming to repeatedly compute feedback controls based on a multiple
shooting discretization of the predictive control problem. The underlying
algorithmic ideas have been described and NLP theory has been studied
as necessary to sketch a proof of local contractivity of the real–time itera-
tion scheme. We have developed a new extension to the real–time iteration
scheme that is applicable to mixed–integer NMPC problems. We have fur-
ther derived a new sufficient condition for local contractivity of the mixed–
integer real–time iterations. The proof relies on the existing contractivity
statement for the continuous case. There, such a statement could be shown
116 4 Mixed–Integer Real–Time Iterations

under the assumption that the repeatedly fixed controls are indeed fixed
onto the exact outcome of the last Newton–type step. To make this frame-
work accessible, we showed existence of a theoretical modification to the
approximate inverse KKT matrix that provides the Newton–type step includ-
ing the contribution due to a rounding scheme being applied afterwards.
The proof of existence relies on a symmetric rank one or Broyden type rank
two update. We derived a sufficient condition for the modified KKT matrix
to satisfy the κ–condition for local contractivity, and showed that this con-
dition can actually be satisfied by a sampling time chosen small enough. A
dependency on the granularity of the binary or integer control discretization
along the lines of chapter 2 has thus been established also for mixed–integer
Model Predictive Control. Vice versa, we showed that, if appropriate bounds
and Lipschitz constants on certain model functions are available, an upper
bound on the sampling time can be derived.
5 Outer Convexification of Constraints

In this chapter, we take a closer look at combinatorial issues raised by ap-


plying outer convexification to constraints that directly depend on a discrete
control. We describe several undesirable phenomena that arise when treat-
ing such problems with a Sequential Quadratic Programming (SQP) method,
and give explanations based on the violation of Linear Independence Con-
straint Qualification (LICQ). We show that the Nonlinear Programs (NLPs)
can instead be treated favorably as Mathematical Programs with Vanishing
Constraints (MPVCs), a class of challenging problems with complementary
constraints and nonconvex feasible set. We give a summary of a Lagrangian
framework for MPVCs due to [3] and others, which allows for the design of
derivative based descent methods for the efficient solution of MPVCs in the
next chapter.

5.1 Constraints Depending on Integer Controls

We have seen in chapter 2 that for Mixed–Integer Optimal Control Problems


(MIOCPs) with integer or binary controls that directly enter one or more of
the constraints, rounding the relaxed optimal solution to a binary one is
likely to violate these constraints.

5.1.1 The Standard Formulation after Outer Convexification

Having applied outer convexification to the binary vector of controls w (·) ∈


w
{0, 1}n , a constraint g directly depending on w (t) can be written as con-
straining the convexified residual


nw  
w̃ i (t) · g (t, x (t), ωi , p)  0, t ∈T, (5.1)
i=1

nw
w̃ i (t) = 1, t ∈T.
i=1

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8_6,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
118 5 Outer Convexification of Constraints

This ensures that the constraint function g (·) is evaluated in integer feasible
controls ωi only. While in addition it is obvious that any rounded solution de-
rived from the relaxed optimal one will be feasible, this formulation leads to
relaxed optimal solutions that show compensation effects. Choices w̃ i (t) > 0
for some 1  i  nw that are infeasible with respect to g (ωi ) can be com-
pensated for by nonzero choices w̃ j (t) > 0 that are not part of the MIOCP’s
solution.

5.1.2 Outer Convexification of Constraints

In chapter 2 we already mentioned that this issue can be resolved by ap-


plying the outer convexification technique not only to the process dynamics
but also to the affected constraints. This amounts to the substitution of

g (t, x (t), u(t), w (t), p)  0, t ∈T, (5.2)


nw
w (t) ∈ {0, 1} , t ∈ T ,

by

w̃ i (t) · g (t, x (t), ωi , p)  0, t ∈ T , 1  i  nw , (5.3)

w

nw
w̃ (t) ∈ [0, 1]n , w̃ i (t) = 1, t ∈T.
i=1

It is immediately clear that an optimal solution satisfying the constraints g


w
for some relaxed optimal control w̃ ∈ [0, 1]n will also satisfy these con-
straints for any rounded binary control. This convexification of the con-
straints g does not introduce any additional unknowns into the discretized
MIOCP. The increased number of constraints is put in context by the ob-
servation that the majority of the convexified constraints can be considered
inactive as the majority of the components of w̃ is likely to be active at zero.
Active set methods are an appropriate tool to exploit this property. As con-
straints of type (5.3) violate LICQ in w̃ i (t) = 0, we briefly survey further
alternative approaches at maintaining feasibility of g after rounding, before
we investigate the structure of (5.3) in more detail.
5.1 Constraints Depending on Integer Controls 119

5.1.3 Relaxation and Homotopy

In the spirit of a Big–M method for feasibility determination [158], the con-
straints g can be relaxed using a relaxation parameter M > 0,

g (t, x (t), ωi , p)  −M (1 − w̃ i (t)), t ∈ T , 1  i  nw , (5.4)


nw
nw
w̃ (t) ∈ [0, 1] , w̃ i (t) = 1, t ∈T.
i=1

Clearly for w̃ i (t) = 1 feasibility of the constraints g (ωi ) is enforced while


for w̃ i (t) = 0 the constraint g (ωi ) does not affect the solution if M is chosen
large enough. This approach has been followed e.g. by [179]. The drawback
of this formulation is the fact that the choice of the relaxation parameter M
is a priori unclear. In addition, the relaxation enlarges the feasible set of the
Optimal Control Problem (OCP) unnecessarily, thereby possibly attracting
fractional relaxed solutions of the OCP due to compensation effects.

5.1.4 Perspective Cuts

A recently emerging idea based on disjunctive programming [93] is to em-


ploy a reformulation based on perspective cuts for a constraint w · g(x)  0
depending on a continuous variable x ∈ [0, x up ] ⊂  and a binary variable
w ∈ {0, 1},

0  λg(x/λ), (5.5)
0  x  λx , up

λ ∈ [0, 1] ⊂ .

Clearly again for λ = 1 the original constraint on x is enforced, while for


λ = 0 is can be seen by Taylor’s expansion of λg(x/λ) that the constraint is
always satisfied. For simplicity of notation let us assume for a moment that
g(x(t), w (t)) be a scalar constraint function depending on a scalar state
trajectory x(t). The proposed reformulation then reads
120 5 Outer Convexification of Constraints


x̃ i (t)
w̃ i (t) · g ,ω i
 0, t ∈T, 1  i  nw , (5.6)
w̃ i (t)
w̃ i (t) · x up  x̃ i (t), t ∈ T , 1  i  nw ,

nw
up
x̃ i (t) ∈ [0, x ], x̃ i (t) = x(t), t ∈T, 1  i  nw ,
i=1

w

nw
w̃ (t) ∈ [0, 1]n , w̃ i (t) = 1, t ∈T.
i=1

Here we have introduced slack variables x̃ i (t), 1  i  nw for the state


x(t). Clearly if w̃ i (t) = 1 the constraint g(ωi ) will be satisfied by x̃ i (t) and
thus by x(t), while if w̃ i (t) = 0 this constraint does not affect the solution.
This reformulation is promising as LICQ holds for the resulting convexi-
fied NLPs on the whole of the feasible set if it held for the original one. As
the number of unknowns increased further due to introduction of the slack
variables x̃ i (t), structure exploiting methods tailored to the case of many
control parameters become even more crucial for the performance of the
mixed–integer OCP algorithm. In addition, a connection between the con-
vex combination x̃ (t) of the state trajectory x(t) and the convexification of
the dynamics must be established.

5.2 Lack of Constraint Qualification

In this section we investigate numerical properties of an NLP with a con-


straint depending on integer or binary variables that has been treated by
outer convexification as proposed in section 5.1.2. We show that certain
constraint qualifications are violated which are commonly assumed to hold
by numerical codes for the solution of NLPs. Linearization of constraints
treated by outer convexification bears significant potential for severe ill–
conditioning of the generated linearized subproblems, as has been briefly
noted by [3] in the context of truss optimization, and we exemplarily investi-
gate this situation. Finally, extensive numerical studies [116] have revealed
that SQP methods attempting to solve MPVCs without special consideration
of the inherent combinatorial structure of the feasible set are prone to very
frequent cycling of the active set. We present an explanation of this phe-
nomenon for the case of linearizations in NLP–infeasible iterates of the SQP
method.
5.2 Lack of Constraint Qualification 121

5.2.1 Constraint Qualifications

The local optimality conditions of theorem 3.1 were given under the assump-
tion that LICQ holds in the candidate point x  in order to ensure a certain
wellbehavedness of the feasible set in its neighborhood. The Karush–Kuhn–
Tucker (KKT) theorem (3.1) can however be proven under less restrictive
conditions, and various Constraint Qualifications (CQs) differing in strength
and applicability have been devised by numerous authors. We present in the
following four popular CQs in order of decreasing strength which will be of
interest during the investigation of MPVCs in section 5.3.

We first require the definitions of the tangent and the linearized cone.

Definition 5.1 (Tangent Cone, Linearized Cone)


Let x ∈ n be a feasible point of problem (3.1). The set
  
T (x , F ) = d ∈ n  ∃{x k } ⊆ F , {t k } → 0+ : x k → x ,
def 1
tk
(x k − x ) → d (5.7)

is called the Bouligand tangent cone of the set F in the point x . The set
    
L(x ) = d ∈ n  g x (x ) d = 0, hA x (x ) d  0
def T T
(5.8)

is called the linearized cone of problem (3.1) in x . 

The dual T (x , F ) of the tangent cone is also referred to as the normal cone
of F in x . In the next section, these cones will play a role in characterizing
the shape of the feasible set in a neighborhood of the point x .

Definition 5.2 (Constraint Qualifications)


Let x ∈ n be a feasible point of problem (3.1). We say that

• Linear Independence Constraint Qualification (LICQ) [143] holds in x if the


Jacobian
 
g x (x )
  (LICQ)
hA x (x )

has full row rank.

• Mangasarian–Fromovitz Constraint Qualification (MFCQ) [149] holds in x if


the Jacobian g x (x ) has full row rank and there exists d ∈ n such that

T
g x (x ) d = 0, (MFCQ)
  T
hA x (x ) d > 0.
122 5 Outer Convexification of Constraints

• Abadie Constraint Qualification (ACQ) [1] holds in x if

T (x , F ) = L(x ). (ACQ)

• Guignard Constraint Qualification (GCQ) [97] holds in x if

T (x , F ) = L(x ) . (GCQ)


In definition 5.2, each CQ implies the next weaker one,

LICQ =⇒ MFCQ =⇒ ACQ =⇒ GCQ

whereas the converse never holds. Proofs of theorem 3.1 assuming each of
the above CQs as well as counterexamples for the converse cases can e.g.
be found in [1, 165].

5.2.2 Checking Constraint Qualifications

We start by checking a minimal exemplary problem for constraint qualifica-


tion according to definition 5.2.

Example 5.1 (Violation of Constraint Qualifications)


Consider the scalar constraint x 1 · g(x 2 )  0 together with its associated simple
bound x 1  0. Here, the possibly nonlinear constraint g on x 2 vanishes if x 1 is
chosen to be exactly zero. The Jacobian C found from a linearization of these two
constraints with respect to the unknown x = (x 1 , x 2 ) reads
 
g(x 2 ) x 1 · g x (x 2 )
C=
1 0

We now observe the following:

1. In all points satisfying x 1 = 0 the Jacobian C becomes singular and LICQ is


violated. All other points satisfy LICQ.

2. In x 1 = 0, g(x 2 ) = 0 we have

0 0
C= .
1 0

There is no vector d ∈ 2 such that C T d > 0, which shows that MFCQ is


violated in these points. All other points satisfy MFCQ.
5.2 Lack of Constraint Qualification 123

3. In x 1 = 0, g(x 2 ) = 0 we have the linearized cone

L(x ) = +
0
× .

The Bouligand tangent cone is the union of two convex cones

T (x , F ) = (+
0
× +
0
) ∪ ({0} × −
0
),

which shows that ACQ is violated in this point. All other points satisfy ACQ by
implication.
4. Observe that for the duals of the above cones it holds that

L(x ) = T (x , F ) = +
0
× {0},

which finally shows that of the four introduced CQs, GCQ is the only one to
hold on the entire feasible set.

These finding lead us to the following remark about CQs for NLPs with
constraints treated by Outer Convexification.
Remark 5.1 (Violation of CQs)
For constraints treated by Outer Convexification, LICQ is violated if the binary con-
trol variable associated with a vanishing constraint is zero. If in addition the vanish-
ing constraint is active at its lower or upper bound, MFCQ and ACQ are violated as
well. As GCQ holds, locally optimal points are still KKT points.

5.2.3 Ill–Conditioning

We continue by investigating the numerical behavior of example 5.1 in a


neighborhood of the area of violation of LICQ.
Example 5.2 (Ill–conditioning)
Consider again the constraints of example 5.1. As x 1 approaches zero, and thus the
area of violation of LICQ, the Jacobian C approaches singularity and its condition
number approaches infinity. Due to roundoff and truncation errors inevitably expe-
rienced by any numerical algorithm, a weakly active bound x 1  0 may be satisfied
with a certain error only. If for example x 1 = 10−12 instead of x 1 = 0, the condition
number of C is 1/x 1 = 1012 if the vanishing constraint g is active. If the constraint
g is inactive, the condition number even grows larger along with the constraint’s
residual.

The condition numbers of C obtained for this example if g x (x 2 ) = 1 are


shown in figure 5.1. We summarize our findings concerning ill–conditioning
of the linearized subproblems with the following remark.
124 5 Outer Convexification of Constraints

0
2 4

2 2
6
4
4 4
8
-5 6
6 6
8 10
log10 x 1

8 8
10 12

-10 10 10
14
12
12 12
16
14
14 14
-15 16
16 16
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
log10 g(x 2 )

Figure 5.1: Logarithm of the Jacobian’s condition number (log10 cond C ) for a van-
ishing constraint x 1 · g(x 2 )  0 and a simple bound x 1  0, depending on
the residuals g(x 2 ) and x 1 .

Remark 5.2 (Ill–conditioning)


In a neighborhood of the area of violation of LICQ, linearizations of constraints
treated by Outer Convexification are ill–conditioned. For small perturbations
> 0
of a binary control variable that is active at zero in the true solution, the condition
number of the Jacobian obtained from linearization of the constraint is at least 1/
.

5.2.4 Infeasible and Suboptimal Steps

Due to the combinatorial structure of the feasible set, constraint lineariza-


tions may fail to approximate its structure. Figure 5.2 shows the mismatch
of linearized feasible sets and the local neighborhood of the NLP’s feasi-
ble set in a linearization point x that satisfies g i (x ) = 0, hi (x ) = 0. As
clearly visible, both infeasible and suboptimal step decisions (δg , δh) may
be taken by a descent based optimization method working on the linearized
representation of the feasible set.
Remark 5.3 (Infeasible and Suboptimal Steps)
Linearizations of the feasible set of constraints treated by outer convexification may
lead to infeasible NLP iterates if step decisions are made based on the linearizations.
5.2 Lack of Constraint Qualification 125

δx2 δx2 δx2

δx1 δx1 δx1

(a) x 1 > 0, g(x 2 ) > 0 (b) x 1 > 0, g(x 2 ) = 0 (c) x 1 = 0, g(x 2 ) < 0

δx2 δx2 δx2

δx1 δx1 δx1

(d) x 1 = 0, g(x 2 ) = 0 (e) x 1 = 0, g(x 2 ) > 0 (f) x 1 > 0, g(x 2 ) < 0

Figure 5.2: Linearized feasible sets ( ) entering the QP subproblems lead to infea-
|||

sible and suboptimal steps of the SQP method. Actually globally feasible
steps (
) for the NLP. In cases (a), (c), (d), and (f), the QP subproblem
may determine an NLP–infeasible step. In cases (a), (b), (e), and (f), the
determined step may be suboptimal.

5.2.5 Cycling of Active Set Methods

This third example uses a geometrical interpretation of the ill–conditioning


observed numerically in example 5.2 in order to explain frequently observed
cycling of the active set when solving problems with constraints treated by
Outer Convexification with standard active set methods.
Example 5.3 (Cycling of Active Set Methods)
Consider again the pair of constraints

c(x ) = x 1 · g(x 2 )  0,
x 1  0,

and their linearization in x ,


126 5 Outer Convexification of Constraints

g(x 2 )δx 1 + x 1 g x (x 2 )δx 2  −x 1 g(x 2 ),


δx 1  −x 1 .

For a linearization point x that is not degenerate, i.e., x 1 > 0, this may be written as

 −x 1 if x is feasible, i.e., g(x 2 ) > 0, def g x (x 2 )
δx 1 + βδx 2 β = x1 ∈ .
 −x 1 if x is infeasible, i.e., g(x 2 ) < 0, g(x 2 )

Figure 5.3 shows the linearized feasible set of the quadratic subprob-
lem for an SQP iterate that is feasible. With β → 0, which means x 1 → 0
or g(x 2 ) → ∞, the angle between the two constraints approaches π
and the corner of the feasible set becomes degenerate. The resulting ill–
conditioning of the linearization was also observed numerically in figure
5.1.
Figure 5.4 shows the linearized feasible set for an infeasible SQP iter-
ate. In contrast to the previous case, with β → 0 the angle between the
constraints approaches 0 and the feasible set is spike-shaped. Besides ill–
conditioning, this may potentially result in many tiny steps being made by
an active set method if the stationary point is located near the spike’s pin-
point. This phenomenon is known as “zig–zagging”.

δx2 δx2

δx1 δx1
feasible feasible

(a) g x (x 2 ) > 0. (b) g x (x 2 ) < 0.

Figure 5.3: Feasible sets of the subproblems obtained by linearization in a feasible


iterate. The common feasible subset of both constraints is indicated by
(
) while parts feasible for one of the two constraints only are indicated
by (
).
5.3 Mathematical Programs with Vanishing Constraints 127

δx2 δx2

δx1 δx1
infeasible infeasible

(a) g x (x 2 ) < 0. (b) g x (x 2 ) > 0.

Figure 5.4: Feasible sets of the quadratic subproblems obtained by linearization in


an iterate that is infeasible with respect to the vanishing constraint, i.e.,
g(x 2 ) < 0.

Remark 5.4 (Cycling of the Active Set)


Linearizations of a constraint treated by Outer Convexification in SQP iterates with
binary control variables close to zero or large residuals of the constraint will lead to
degenerate corners of the feasible set polytope. If the linearization point is infeasi-
ble, an active set method solving the linearized subproblem is likely to suffer from
zig–zagging.

Remark 5.5 (Bang–Bang Optimal Controls)


For optimal control problems that enjoy a bang–bang property (theorem 2.1), the
described situation will actually be the one encountered most often. Close to the
optimal solution, in each SOS1 set all but one relaxed control variable will be ex-
actly zero for an active set method in exact arithmetic. In floating–point arithmetic,
their values will be close to the machine precision eps, which results in severe ill–
conditioning and spike shaped feasible sets.

5.3 Mathematical Programs with Vanishing Constraints

Theoretical and numerical challenges introduced into the NLP by outer con-
vexification of constraints depending on binary or integer controls have
been exemplarily studied in this section. Our findings clearly justify the
need for deeper investigation of the combinatorial structure of such NLPs
128 5 Outer Convexification of Constraints

in order to take the structure into account in the design of a tailored SQP
algorithm.

The findings of the first section lead us to investigate NLPs with con-
straints treated by outer convexification from a different point of view.
In this section we introduce the problem class of Mathematical Programs
with Vanishing Constraints (MPVCs), highly challenging nonconvex prob-
lems that have only recently attracted increased research interest. This
problem class provides a framework for analysis of the shortcomings of the
standard Lagrangian approach at solving MPVCs, and yields new station-
arity conditions for a separated, i.e., non–multiplicative formulation of the
vanishing constraints that will in general be much more well conditioned.

Pioneering work on the topic of MPVCs was brought forward only re-
cently by [3, 106, 107]. In these works, MPVCs were shown to constitute
a challenging class of problems, as standard constraint qualifications such
as LICQ and MFCQ turn out to be violated for most problem instances. In
the thesis [105] an exhaustive treatment of the theoretical properties of
MPVCs can be found. The theoretical results presented in this section are
a summary of those parts of [109] and the aforementioned works that are
required for the numerical treatment of NLPs with constraints treated by
outer convexification.

5.3.1 Problem Formulations

Definition 5.3 (Nonlinear Program with Vanishing Constraints)


The following NLP with l  1 complementary inequality constraints

min f (x ) (5.9)
x ∈n

s. t. g i (x ) · hi (x )  0, 1  i  l,
h(x )  0

is called a Mathematical Program with Vanishing Constraints (MPVC). 

The objective function f : n →  and the constraint functions g i , hi :  →


, 1  i  l are expected to be at least twice continuously differentiable. The
domain of feasibility of problem (5.9) may be further restricted by a stan-
dard nonlinear constraint function c(x) 0, including equality constraints.
Such constraints do not affect the theory and results to be presented in this
chapter, and we omit them for clarity of exposition.
5.3 Mathematical Programs with Vanishing Constraints 129

Constraint Logic Reformulation

It is easily observed that the constraint functions g i (x ) do not impact the


question of feasibility of an arbitrary point x ∈ n iff hi (x ) = 0 holds. The
constraint g i is the said to have vanished in the point x . This observation
gives rise to the following constraint logic reformulation.
Remark 5.6 (Constraint Logic Reformulation for MPVCs)
Problem (5.9) can be equivalently cast as an NLP with m logic constraints,

min f (x ) (5.10)
x ∈n

s. t. hi (x ) > 0 =⇒ g i (x )  0, 1  i  m,
h(x )  0.

The logical implication though appears to be unsuitable for derivative based


numerical methods. We will however see in the sequel of this chapter that
it can be realized in the framework of an active set method for Quadratic
Programming.

Equilibrium Constraint Reformulation

MPVCs can be related to the well studied class of Mathematical Programs


with Equilibrium Constraints (MPECs) through the following reformulation.
Remark 5.7 (MPEC Reformulation for MPVCs)
Problem (5.9) can be equivalently cast as an MPEC by introduction of a vector ξ ∈ l
of slack variables,

min f (x ) (5.11)
x ∈n

s. t. ξi · hi (x ) = 0, 1  i  l,
h(x )  0,
ξ  0,
g (x ) − ξ  0.

Although this opens up the possibility of treating (5.9) using preexisting


MPECs algorithms designed for interior point methods by e.g. [17, 139,
173] and for active set methods by e.g. [75, 111], this reformulation suffers
from the fact that the additionally introduced vector ξ of slack variables is
undefined if hi (x  ) = 0 holds for some index i in an optimal solution x  .
130 5 Outer Convexification of Constraints

In fact, MPECs are known to constitute an even more difficult class than
MPVCs, as both LICQ and MFCQ are violated in every feasible point [47].
Consequentially, standard NLP sufficient conditions for optimality of x  as
presented in section 3.1.3 do not hold. If on the other hand hi (x  ) = 0 for
all indices 1  i  l , we could as well have found the same solution x  by
including all vanishing constraints g i as standard constraints, which allows
to treat problem (5.9) as a plain NLP.

Relaxation Method

It has frequently been proposed to solve problem (5.9) by embedding it


into a family of perturbed problems. The vanishing constraint that causes
violation of constraint qualifications is relaxed,

min f (x ) (5.12)
x ∈n

s. t. g i (x ) · hi (x )  −τ, 1  i  l,
h(x )  0,

where the scalar τ  0 is the relaxation parameter. For τ > 0, problem


(5.12) is regular in its solution. The level of exactness of this relaxation is
investigated e.g. in [109].

Embedding Relaxation Method

A more general relaxation of the vanishing constraint g i (x ) · hi (x )  0 is


proposed in [105, 109] that works by embedding it into a function ϕ satis-
fying

ϕ(a, b) = 0 ⇐⇒ b  0, a · b  0,

and introducing a relaxation parameter τ together with a family of functions


ϕ τ (a, b) for which it holds that ϕ τ (a, b) → ϕ(a, b) for τ → 0. It is argued
that smooth functions ϕ necessarily lead to lack of LICQ and MFCQ, and the
use of a family of nonsmooth functions is proposed and convergence results
are obtained similar in spirit to those of [175, 192] for MPECs.

Finally, two remarks are in order about the applicability of the surveyed
reformulations.
5.4 An MPVC Lagrangian Framework 131

g −ξ g

F F F

h h h

τ → 0+

(a) Feasible set of original (b) Feasible set of MPEC (c) Feasible set of relaxed
problem (5.9). reformulation. problem (5.12), τ =
0.1.

Figure 5.5: Feasible sets of various reformulations of problem (5.9).

Remark 5.8 (Ill–Conditioning of Reformulations)


The ill–conditioning investigated in section 5.2.3, inherent to the multiplicative for-
mulation of the vanishing constraint, is not resolved by either of the two relaxation
methods.

Remark 5.9 (Relaxation of Constraints)


Relaxation methods require the problem’s objective and constraint functions to be
valid outside the feasible set originally described by problem (5.9). As we will see
in chapter 9, this may lead to evaluations of model functions outside the physically
meaningful domain. If relaxation methods are employed, it is important to allow for
such evaluations in a way that does not prevent the true solution from being found.

5.4 An MPVC Lagrangian Framework

In the following we present an analysis of the standard Lagrangian approach


presented in section 3.1, applied to problem (5.9) as derived by [3, 106] and
related works. An alternative Lagrangian function that introduces separate
multipliers for the two parts of a vanishing constraint is introduced that
removes the major source of ill–conditioning. Stationarity and optimality
conditions are presented.
132 5 Outer Convexification of Constraints

5.4.1 Notation and Auxiliary Problems

We first require some notation to be defined. The notion of an active set for
problem MPVC requires some extension as shown in the following definition
of index sets.
Definition 5.4 (Index Sets)
Let x ∈ n be a feasible point. In a neighborhood B
(x ) of x , the set {1, . . . , l} ⊂ 
of indices of the l vanishing constraints is partitioned into the following index sets:
def def
I+ = {i | hi (x ) > 0}, I+0 = {i | hi (x ) > 0, g i (x ) = 0}, (5.13)
def
I++ = {i | hi (x ) > 0, g i (x ) > 0},
def def
I0 = {i | hi (x ) = 0}, I0+ = {i | hi (x ) = 0, g i (x ) > 0},
def
I00 = {i | hi (x ) = 0, g i (x ) = 0},
def
I0− = {i | hi (x ) = 0, g i (x ) < 0}. 

I0+ I++

I00 h
I+0

I0−

Figure 5.6: Index sets for a vanishing constraint. (


) indicates the feasible set.

An interpretation of the index sets as parts of the feasible set is depicted


in figure 5.6. In a neighborhood of x , the feasible set of problem (5.9) can
then be expressed as
% 
F = x ∈ n  hI0+ (x )  0, hI00 (x )  0, hI0− (x ) = 0, (5.14)
&
gI+0 (x )  0, ∀i ∈ I00 : g i (x ) · hi (x )  0 .
5.4 An MPVC Lagrangian Framework 133

Clearly, the combinatorial structure of F is induced by exactly those con-


straints that are found in I00 . If on the other hand I00 = , then F is the
feasible set of a plain NLP and any combinatorial aspect disappears.
Based on (5.9) we further define two auxiliary NLPs, a tightened and a
relaxed one, as follows.
Definition 5.5 (Tightened Nonlinear Problem)
Let x ∈ n be a feasible point of (5.9). In a neighborhood B
(x ) of x , the tightened
problem (TNLP) is defined as

min f (x ) (TNLP)
x ∈n

s. t. hI0+ (x )  0, hI00 (x ) = 0, hI0− (x ) = 0,


gI+0 (x )  0, gI00 (x )  0. 

Definition 5.6 (Relaxed Nonlinear Problem)


Let x ∈ n be a feasible point of (5.9). In a neighborhood B
(x ) of x , the relaxed
problem (RNLP) is defined as

min f (x ) (RNLP)
x ∈n

s. t. hI0+ (x )  0, hI00 (x )  0, hI0− (x ) = 0,


gI+0 (x )  0. 

Both problems depart from the original problem (5.9) in those vanishing
constraints imposed on x that are contained in the critical index set I00 in
x . Given a partition {I1 ; I2 } of the critical set I00 into two subsets I1 and I2 ,

I1 ∪ I2 = I00 , I1 ∩ I2 = ,

the branch problem for {I1 ; I2 }, first used in [107, 109], requires the van-
ishing constraints in I1 to be feasible, g i (x )  0, and the constraints in I2
to have vanished, hi (x ) = 0.

Definition 5.7 (Branch Problem)


Let x ∈ n be a feasible point of (5.9), and let {I1 ; I2 } be a partition of I00 . In a neigh-
borhood B
(x ) of x , the branch problem (BNLP{I1 , I2 }) for {I1 ; I2 } is defined as

min f (x ) (BNLP{I1 , I2 })
x ∈n

s. t. hI0+ (x )  0, hI1 (x )  0, hI2 (x ) = 0, hI0− (x ) = 0,


gI+0 (x )  0, gI1 (x )  0. 
134 5 Outer Convexification of Constraints

There obviously exist |P (I00 )| = 2|I00 |  2l different branch problems.

Lemma 5.1 (Feasible Sets of the Auxiliary Problems)


For the feasible sets of the auxiliary problems, the following relations hold:

1.
, 2. 3. 4.
 5.
FTNLP = FBNLP{J1 ;J2 } ⊂ FBNLP{I1 ;I2 } ⊂ F = FBNLP{J1 ;J2 } ⊂ FRNLP . (5.15)
J1 ∪J2 =I00 J1 ∪J2 =I00 
J1 ∩J2 = J1 ∩J2 =

Proof For 1., consider that for every constraint i ∈ {1, . . . , l} there ex-
ists a partition with i ∈ J1 and one with i ∈ J2 . Hence g i (x )  0 and
hi (x ) = 0 hold for the intersection set, satisfying (TNLP). The reverse di-
rection is obvious. Inclusion 2. is obvious as the intersection includes the
case {I1 ; I2 } = {J1 ; J2 }. Inclusion 3. is obvious as any choice of I2 =  is
a proper restriction of F . Forming the union of feasible sets of the branch
problem lifts any restrictions imposed by choosing a specific J2 = , and we
get equivalence 4. Finally, problem (RNLP) allows for a violation of vanish-
ing constraints contained in I00 in a neighborhood of x , which justifies 5. 

5.4.2 Lack of Constraint Qualification for MPVCs

The initial observation that the constraints found in I00 induce the combi-
natorial nature of MPVCs gives rise to the following constraint qualification
for MPVC.
Definition 5.8 (Lower Level Strict Complementarity Condition)
Let x ∈ n be a feasible point of problem (5.9). If I00 =  in x , we say that Lower
Level Strict Complementarity (LLSCC) holds for problem (5.9) in x . 

This complementarity condition is too restrictive, though, and will not be


satisfied on the entire feasible set by most interesting MPVC problem in-
stances. The same has been observed for strict complementarity conditions
for MPECs as well, cf. [144].

If LLSCC is violated, the feasible set F has a combinatorial structure


and the constraints of (5.9) inevitably are degenerate. Constraint qualifica-
tions commonly encountered in nonlinear programming are thus violated,
as could already be seen in the first section of this chapter.

Lemma 5.2 (Violation of LICQ)


Let x ∈ n be a feasible point of (5.9), and let I0 = . Then LICQ is violated in x . 
5.4 An MPVC Lagrangian Framework 135

Proof For any i ∈ I0 we have hi (x ) = 0 and thus (g i · hi ) x (x ) = g i (x ) ·


(hi ) x (x ), i.e., the gradient of (g i ·hi )(x )  0 is a multiple of that of hi (x )  0.
Since both constraints are active in x , LICQ is violated. 

Lemma 5.3 (Violation of MFCQ)


Let x ∈ n be a feasible point of (5.9), and let I00 ∪ I0− = . Then MFCQ is violated
in x . 

T
Proof For any i ∈ I00 we have (g i · hi ) x (x ) = 0, so (g i · hi ) x (x ) d = 0 for all
vectors d ∈ n , hence MFCQ is violated. For any i ∈ I0− and for any d ∈ n
T T
which satisfies (hi ) x (x ) d  0 we find (g i · hi ) x (x ) d  0, hence MFCQ is
violated in this case, too. 

In order to investigate the remaining CQs we require a representation of


the tangent cone and the linearized cone of the feasible set of (5.9), which
is given by the following lemma.

Lemma 5.4 (Tangent and Linearized Cone of MPVC)


For MPVCs, it holds that
 
TMPVC (x , F ) = TBNLP{J1 ;J2 } (x , F ) ⊆ LBNLP{J1 ;J2 } (x ) = LMPVC (x ). 
J1 ∪J2 =I00 J1 ∪J2 =I00
J1 ∩J2 = J1 ∩J2 =

Proof A proof of this relation can be found in [105]. 

As can be seen, the tangent cone of (5.9) is the union of finitely many NLP
tangent cones. Consequentially it is in general a non–polyhedral and non–
convex set that does not coincide with the convex and polyhedral linearized
cone, in which case ACQ is violated. Necessary conditions for ACQ to hold
for problem (5.9) can be found in [105]. Under reasonable assumptions, only
GCQ can be shown to hold for (5.9).

Theorem 5.1 (Sufficient Condition for GCQ)


Let x ∈ n be a feasible point of (5.9), and let LICQ for the auxiliary problem (TNLP)
hold in x . Then GCQ holds in x for problem (5.9). 

Proof A proof can be found in [105]. 

This gives rise to the introduction of the following constraint qualification.


136 5 Outer Convexification of Constraints

Definition 5.9 (MPVC Linear Independence Constraint Qualification)


Let x ∈ n be a feasible point of problem (5.9). We say that MPVC–Linear Indepen-
dence Constraint Qualification holds in x if the Jacobian
⎡   ⎤
hI0 x (x )
⎢  ⎥
⎢ g ⎥
⎣  I+0  x (x ) ⎦ (5.16)
gI00 x (x )

has full row rank. 

Using this definition we can restate theorem 5.1 by saying that for a fea-
sible point of problem (5.9), MPVC–LICQ is a sufficient condition for GCQ to
hold. Consequentially, under MPVC–LICQ a locally optimal point of problem
(5.9) satisfies the KKT conditions of theorem 3.1.

Remark 5.10 (Strength of MPVC–LICQ)


The assumption of MPVC–LICQ is sometimes held for too strong, e.g. in the analo-
gous case of MPECs, while on the other hand the classical KKT theorem cannot be
shown to hold for MPVCs under less restrictive CQs.

For the case of constraints treated by outer convexification however, it is reason-


able to assume GCQ and thus MPVC–LICQ to hold. Here, hI0 holds active simple
lower bounds on the convex multipliers, while gI00 and gI+0 hold active vanishing
constraints independent of the convex multipliers. This allows us to retain the con-
cept of iterating towards KKT based local optimality.

5.4.3 An MPVC Lagrangian Framework

The standard Lagrangian function according to definition 3.6 for problem


5.9 reads

def

l
L(x , λ) = f (x ) − λhT h(x ) − λgh,i g i (x )hi (x ), (5.17)
i=1

wherein λh ∈ l and λgh ∈ l denote the Lagrange multipliers for the con-
straints h(x )  0 and g i (x ) · hi (x )  0 respectively. The multiplicative rep-
resentation of the vanishing constraints has been shown to be the source of
severe ill–conditioning in section 5.2. We introduce a modification of (5.17)
that separates the vanishing constraints’ parts g and h.
5.4 An MPVC Lagrangian Framework 137

g g g

h h h

(a) LICQ (b) MFCQ (c) LLSCC

Figure 5.7: Areas of violation of constraint qualifications (


). The feasible set is in-
dicated by (
).

Definition 5.10 (MPVC Lagrangian Function)


x
The function Λ : n × l × l → ,

def
Λ(x , μg , μh ) = f (x ) − μhT h(x ) − μgT g (x ) (5.18)

with x ∈ n and μg , μh ∈ l is called the MPVC Lagrangian (function) of problem


(5.9). 

Based on the KKT conditions for the auxiliary problem (RNLP) we define
the notion of strong MPVC stationarity.

Definition 5.11 (Strong Stationarity)


Let x  ∈ n be a feasible point of (5.9). The point x  is called a strongly station-
ary point of (5.9) if it is stationary for the relaxed auxiliary problem (RNLP) in the
classical sense. There exist MPVC multipliers μg ∈ l and μh ∈ l such that

Λ x (x  , μg , μh ) = 0, (5.19)

μh,I0+  0, μh,I00  0, μh,I+ = 0,


μg,I+0  0, μg,I++ = 0, μg,I0 = 0. 

The strongly stationary points of an MPVC can be shown to coincide with


the KKT points, as mentioned before.
138 5 Outer Convexification of Constraints

Theorem 5.2 (Strong Stationarity)


Let x  ∈ n be a feasible point of problem (5.9). Then it holds that x  is a KKT point
of problem (5.9) satisfying theorem 3.1 if and only if x  is a strongly stationary point
of problem (5.9). 

Proof A proof can be found in [3]. 

Hence, if the assumptions for theorem (3.1) are satisfied, strong station-
arity is a necessary condition for local optimality.
Theorem 5.3 (First Order Necessary Optimality Condition under GCQ)
Let x  ∈ n be a locally optimal point of (5.9) and let GCQ hold in x  . Then x  is a
strongly stationary point of (5.9). 

Proof Every locally optimal point satisfying GCQ is a KKT point by theorem
3.1. Every KKT point is strongly stationary by theorem 5.2 

Theorem 5.3 can be recast using the newly introduced notion of MPVC–
LICQ as follows. In addition, we have uniqueness of the MPVC multipliers
analogous to the case of LICQ for NLPs.
Theorem 5.4 (First Order Necessary Optimality Cond. under MPVC–LICQ)
Let x  ∈ n be a locally optimal point of (5.9) and let MPVC–LICQ hold in x  . Then x 
is a strongly stationary point of (5.9). The MPVC–multipliers μg and μh are unique.

Proof MPVC–LICQ implies GCQ by definition. Uniqueness of the MPVC–


multipliers follows from linear independence of the gradients. 

We have thus obtained a constrained nonlinear programming framework


for MPVC under the strong assumption of MPVC–LICQ. We have however
shown that this CQ may be assumed to hold for NLPs with constraints
treated by outer convexification. The separation of the vanishing constraint
functions g and h resolves ill–conditioning of the Jacobian and consequen-
tially the undesirable phenomena examined in section 5.2.
Less restrictive stationarity conditions, such as the notions of Mor-
dukhovich– or M–stationarity and Clarke– or C–stationarity, are derived in
[105]. They do not require GCQ to hold for (5.9) but instead only assume
GCQ for all branch problems, which is referred to as MPVC–GCQ. As strong
stationarity cannot be expected to constitute a necessary condition for opti-
mality under such CQs, M–stationary points are not necessarily KKT points
of problem (5.9). Vice versa, it holds that every strongly stationary point
is an M–stationary point. Again both notions of stationarity coincide if the
critical index set I00 is empty.
5.5 Summary 139

5.4.4 Second Order Conditions

Second-order necessary and sufficient conditions for local optimality of a


candidate point can be devised under MPVC–LICQ, similar to those of the-
orems 3.3 and 3.4 that hold for NLPs under LICQ. They are based on the
MPVC reduced Hessian, defined analogously to the reduced Hessian of the
Lagrangian in definition 3.9.
Theorem 5.5 (Second Order Necessary Optimality Condition)
Let x  be a locally optimal point of problem (5.9), and let MPVC–LICQ hold in x  .
Then it holds that

∀d ∈ LMPVC (x  ) : d T Λ x x (x  , μg , μh ) d  0,

where μg and μh are the MPVC–multipliers satisfying strong stationarity. 

Proof A proof can be found in [105]. 


Theorem 5.6 (Second Order Sufficient Optimality Condition)
Let (x  , μg , μh ) be a strongly stationary point of problem (5.9). Further, let

∀d ∈ LMPVC (x  ) \ {0} : d T Λ x x (x  , μg , μh ) d > 0,

hold. Then x  is a locally strictly optimal point of problem (5.9). 

Proof A proof can be found in [105]. 

5.5 Summary

In this chapter we have investigated the theoretical properties of NLPs


with constraints that arise from the application of outer convexification to
MIOCP constraints directly depending on a binary or integer control vari-
able. CQs frequently assumed to hold in the design of descent based NLP al-
gorithms, such as LICQ and MFCQ, have been shown to be violated by such
NLPs. Consequences for the convergence behavior of such algorithms have
been examined and new explanations for phenomena such as numerical ill–
conditioning, infeasible steps, and cycling of the active set have been given.
The NLPs under investigation have been identified as MPVCs for the first
time, a challenging and very young problem class whose feasible set has
a nonconvex combinatorial structure. An constrained nonlinear program-
ming framework for MPVCs has been presented that allows to retain the
KKT theorem and resolves a major cause of numerical ill–conditioning by
introducing a Lagrangian function with separated constraint parts.
6 A Nonconvex Parametric SQP Method

The real–time iteration scheme described for Nonlinear Model Predictive


Control (NMPC) in chapter 4 was based on the idea of repeatedly perform-
ing a single iteration of a Newton–type method to compute control feedback.
We have seen that it can be combined with the convexification and relax-
ation method of chapter 2 to develop a new mixed–integer real–time itera-
tion scheme. For Mixed–Integer Optimal Control Problems (MIOCPs) with
constraints depending directly on an integer control, that method yields an
Nonlinear Program (NLP) with vanishing constraints as seen in chapter 5.
In this chapter we develop a new Sequential Quadratic Programming (SQP)
method to solve the arising class of NLPs with vanishing constraints in an
active–set framework. It generates a sequence of local quadratic subprob-
lems inheriting the vanishing constraints property from the NLP. These lo-
cal subproblems are referred to as Quadratic Programs with Vanishing Con-
straints (QPVCs) and are the subproblems to be solved in the mixed–integer
real–time iteration scheme. For this purpose, we develop a new active set
strategy that finds strongly stationary points of a QPVC with convex objec-
tive function but nonconvex feasible set. This active set strategy is based
on the idea of using parametric quadratic programming techniques to effi-
ciently move between convex subsets of the QPVC’s nonconvex feasible set.
Strongly stationary points of QPVCs are locally optimal, and we develop a
heuristic that improves these points to global optimality.

6.1 SQP for Nonconvex Programs

Current research on numerical methods for the solution of Mathematical


Programs with Vanishing Constraints (MPVCs) mainly focuses on regular-
ization schemes for interior point methods, cf. [3, 105, 106, 107], as con-
vergence analyses available for Mathematical Programs with Equilibrium
Constraints (MPECs) can often be readily transferred to the case of MPVC.
SQP methods for a broader class of nonlinear problems with combinatorial
structure, such as MPECs and bi–level optimization problems, have been
considered in [193] and have been found to require a means of finding and

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8_7,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
142 6 A Nonconvex Parametric SQP Method

verifying a stationary or locally optimal solution of the nonconvex subprob-


lems. For the SQP framework described there, [109] conjectures that MPVC
strong stationarity conditions under MPVC–LICQ could be used to design an
active set based method for the subproblems.
In this section, we pursue this idea and develop a parametric SQP meth-
ods on nonconvex feasible sets and show how it can be used for the so-
lution of NLPs with vanishing constraints, arising from the application of
the convexification and relaxation approach of chapter 2 to MIOCPs with
constraints directly depending on binary or integer controls.

6.1.1 SQP on Nonconvex Feasible Sets

Extensions of SQP methods to nonconvex problems with combinatorial


structure are e.g. described in [193]. We consider the NLP

min f (x ) (6.1)
x ∈n

s. t. g (x ) ∈ F ,

where the feasible set F is assumed to show a combinatorial structure. Note


g
that F ⊂ n here is a subset of the image space of the constraint function
g . Given a primal–dual point (x , λ), the SQP subproblem reads
1
min δx T L x x (x , λ)δx + f x (x )δx (6.2)
δx ∈D ⊆n 2

s. t. g (x ) + g x (x )δx ∈ F .

We are hence interested in the assumptions that need to be imposed on the


shape of the structurally nonconvex and nonlinear feasible set F of problem
(6.1) in order to establish local convergence of the SQP method.
Definition 6.1 (Local Star Shape)
A set F is called locally star–shaped in a feasible point x ∈ F if there exists a ball
B
(x ) such that it holds that

∀x ∈ F ∩ B
(x ), α ∈ [0, 1] ⊂  : αx + (1 − α)x ∈ F ∩ B
(x ). (6.3)


It is easily verified that convex sets as well as finite intersections and finite
unions of closed convex sets are locally star–shaped. Under the restriction of
local starshapedness, convergence is established by the following theorem.
6.1 SQP for Nonconvex Programs 143

Theorem 6.1 (Local Convergence of SQP)


Let x  be a stationary point of (6.1), and let the feasible set F be locally star–shaped
in g (x  ). Let strict complementary hold in x  with Lagrange multipliers λ and let
the reduced Hessian be positive definite in (x  , λ ). Then the exact Hessian SQP
method shows local q–quadratic convergence to the stationary point x  . 

Proof A proof can be found in [193]. 

These are indeed just the strong second order sufficient conditions of theo-
rem 3.4 and the local convergence theorem 3.7. Strict complementarity per-
mits the extension to inequality constraints as already mentioned. Finally,
local star shape of the feasible set according to definition 6.1 guarantees
that the stationary point (x  , λ ) indeed is unique in a local neighborhood.

6.1.2 Nonconvex Subproblems

The local subproblems generated by the SQP method described in the pre-
vious section are Quadratic Programs (QPs) with combinatorial structure of
the feasible set. For the combinatorial NLP (6.1) we assume that there exist
finitely many subsets Fi , 1  i  nF that are of simpler, convex shape such
that a descent–based method is able to find a locally optimal solution of the
subproblems

1 T
min 2
x Hx + xTg (6.4)
x

s. t. Ax + b ∈ Fi ,

if given a feasible initializer in Fi .


Local optimality of a candidate point x  for the subproblems must be
linked to local optimality of the combinatorial NLP (6.1). In particular, if
(6.1) has a locally optimal point x  , this point should satisfy Ax  + b ∈ Fi
for at least one of the subproblems (6.4). Vice versa, if x  is a locally opti-
mal point for one of the subproblems (6.4), and if this point is also locally
optimal for all subproblems j that satisfy x  ∈ F j , then x  should be a lo-
cally optimal point of (6.1), cf. [193]. An obvious sufficient condition for both
requirements to hold is that

F

n
F= Fi . (6.5)
i=1
144 6 A Nonconvex Parametric SQP Method

Note that in general the subsets Fi cover F will not form a partition of F ,
i.e., they need not be pairwise disjoint but may overlap each other. In partic-
ular, if F is closed the subsets Fi will be closed and share boundary points
with adjacent ones. This gives rise to the notion of adjacent subproblems as
follows.
Definition 6.2 (Adjacent Subproblems)
x
A local subproblem on a subset Fi ⊂ F is called adjacent to a point x ∈ n if x ∈ Fi
holds. Two subproblems on subsets Fi , F j , i = j are called adjacent if a locally
optimal point x  of subproblem i satisfies x  ∈ F j . 

Starting with an initial guess and an associated initial subproblem with


convex feasible set Fi ⊂ F the nonconvex SQP step is computed as follows:
After finding a locally optimal point x  ∈ Fi using an active set method, opti-
mality is checked for each adjacent subproblem. If optimality does not hold
for one or more adjacent subproblems, one of those is chosen and the so-
lution is continued therein. This procedure is iterated until local optimality
holds for a subproblem and all adjacent ones.
Theorem 6.2 (Finite Termination)
For convex subproblems with regular solutions, the described decomposition proce-
dure terminates after a finite number of iterations with either a local minimizer or
an infeasible subproblem. 

Proof A proof can be found in [193]. 

Several points need to be addresses in more detail in order to make this


approach viable. First, it is obviously critical for the performance of the
nonconvex SQP method that the convex subsets Fi of the feasible set F be
chosen as large as possible in order to avoid frequent continuations of the
solution process. Second, as F is nonconvex, such continuations certainly
cannot be avoided at all, and the active set method used to solve the sub-
problem should thus allow for efficient warm starts. Finally, both the veri-
fication of local optimality and the decision on an adjacent subproblem to
continue the solution process need to exploit multiplier information in order
to make efficient progress towards a locally optimal solution of (6.1).

6.1.3 SQP for a Special Family of MPVCs

We are concerned with applying the presented nonconvex SQP framework


to the particular case of MPVCs obtained by outer convexification of dis-
cretized MIOCPs.
6.1 SQP for Nonconvex Programs 145

Local Convergence

By theorem 5.2 the notion of stationarity in theorem 6.1 can under MPVC–
LICQ be substituted by the equivalent MPVC strong stationarity condition
of definition 5.11. The notion of strict complementarity then refers to the
MPVC multipliers. The Hessian approximation methods of chapter 3 can
be readily used also to approximate the Hessian of the MPVC Lagrangian.
In the BFGS case, the well–defined MPVC multiplier step is used in place
of the potentially unbounded Lagrange multiplier step. Finally, note that
the feasible sets obtained for the MPVCs are indeed locally star–shaped by
lemma 5.4.

Quadratic Programs with Vanishing Constraints

The local subproblems to be solved in each iteration of the nonconvex SQP


method for MPVCs obtained by outer convexification of discretized MIOCPs
are referred to as Quadratic Programs with Vanishing Constraints (QPVCs),
to be defined next.

Definition 6.3 (Quadratic Program with Vanishing Constraints)


The following extension of problem (6.8)

1 T
min 2
x Hx + xTg (6.6)
x ∈D ⊆n

s. t. 0  Ax − b,
0  (Ci x − ci )(Di x − di ) 1  i  l,
0  D x − d,

where C , D ∈ l×n and c, d ∈ l , is called a Quadratic Program with Vanishing


Constraints (QPVC). 

Herein, the affine linear parts


def
g (x ) = C x − c,
def
h(x ) = Dx − d

take the role of the controlling constraint h(x )  0 and the vanishing con-
straint g (x )  0 of the previous chapter.
146 6 A Nonconvex Parametric SQP Method

A Sufficient Condition for Local Optimality

A remarkable result from [105] holds for MPVCs with convex objective and
affine linear parts of the vanishing constraints, which in particular includes
QPVCs with positive semidefinite Hessian H . Although the problem class of
QPVCs must truly be considered nonconvex due to the shape of its feasi-
ble set, the strong stationarity conditions of definition 5.11 are indeed also
sufficient conditions for local optimality.
Theorem 6.3 (QPVC First Order Sufficient Optimality Condition)
Let the objective function f be convex and let g , h be affine linear in problem (5.9).
Further, let x  be a strongly stationary point of problem (5.9). Then x  is a locally
optimal point of problem (5.9). 

Proof A proof can be found in [105]. 

As equivalence to the Karush–Kuhn–Tucker (KKT) conditions strong sta-


tionarity has already been shown to be a necessary condition, the notions
of stationarity and local optimality of the subproblems’ solutions therefore
coincide for QPVCs.

A Sufficient Condition for Global Optimality

Figure 6.1 depicts two QPVCs that immediately reveal the difference be-
tween local and global optimality on the nonconvex feasible set. In par-
ticular, an active vanishing constraint that is not permitted to vanish may
cause local minima different from the global one as can be seen from figure
6.1b. This observation is a motivation of the following sufficient condition
for global optimality due to [105].
Theorem 6.4 (Sufficient Global Optimality Condition)
Let the objective function f be convex and let g , h be affine linear in problem (5.9).
Further, let x  be a strongly stationary point of problem (5.9). Then if μh,I0−  0 and
μg,I+0 = 0, it holds that x  is a globally optimal point of problem (5.9). 

Proof A proof can be found in [105]. 

Adjacency for QPVCs

The nonconvex SQP framework of section 6.1.1 introduced the notion of


adjacency for the convex subsets of the feasible set. Local optimality of a
6.1 SQP for Nonconvex Programs 147

g g


h h


(a) A QPVC with a single optimal point. (b) A QPVC with a locally and a globally opti-
mal point.

Figure 6.1: Locally and globally optimal points of a convex QPVC.

candidate point on the border of one convex subset needs to be verified


for all adjacent convex subsets. For the case of QPVCs, borders of convex
subsets are defined by active vanishing constraints g i (x ) = 0, i.e., by those
constraints found in the index subset I+0 of the active set, and by active
controlling constraints hi (x ) = 0 if the vanishing constraint is infeasible,
i.e., by those constraints found in the index subset I0− . We introduce the
following definition of adjacency.
Definition 6.4 (Adjacency)
Let C 1 ⊂ FQPVC and C 2 ⊂ FQPVC be convex subsets of the feasible set FQPVC of problem
(6.6). Assume that A1 and A2 are the active sets for all points of these subsets,

∀x ∈ C k : A(x ) = Ak , k ∈ {1, 2}. (6.7)

Then the two convex subsets are called QPVC–adjacent if there exists a vanishing
constraint 1  i  l such that constraint i is active in A1 but has vanished in A2 , and
the active sets are otherwise identical,

I0−
2
= I0−
1
∪ {i}, I+0
2
= I+0
1
\ {i},
I00
2
= I00
1
, I0+
2
= I0+
1
, I++
2
= I++
1
. 

Loosely speaking, two convex subsets are adjacent if a vanishing constraint


that is active in one of them has vanished in the other.
148 6 A Nonconvex Parametric SQP Method

6.2 Parametric Quadratic Programs

We have seen in chapter 4 that the real–time iteration scheme, by perform-


ing only one SQP iteration per control feedback, essentially solves a se-
quence of closely related QPs. Parametric quadratic programming offers a
convenient framework for relating two subsequent QPs to each other by an
affine linear homotopy. We will in the sequel of this chapter see that this
relation can also be exploited to efficiently move between convex subsets
of the feasible set of a QPVC. Our presentation of the most important facts
about Parametric Quadratic Programs (PQPs) is guided by [25], [67], and
[216].

6.2.1 Parametric Quadratic Programs

The constrained nonlinear optimization theory of chapter 3 obviously holds


for the special case of a QP. Some results can be strengthened by convexity
of the objective and affine linearity of the constraints, as detailed in this
section.
Definition 6.5 (Quadratic Program)
The standard form of a Quadratic Program is the problem

1 T
min 2
x Hx + xTg (6.8)
x ∈n

s. t. Ax  b,

where g ∈ n is the linear term, H ∈ n×n is the symmetric quadratic term or


Hessian matrix, A ∈ m×n is the constraint matrix, b ∈ m is the constraint right-
hand side vector. 

Definition 6.6 (Convexity)


A QP is called convex iff the quadratic term H ∈ n×n is positive semidefinite, and
strictly convex iff H is positive definite. It is called nonconvex otherwise. 

If feasible, strictly convex QPs have a unique solution. Local optimality


can be determined by the KKT conditions of theorem 3.1, and global opti-
mality follows from strict convexity. For convex QPs, this solution still exists
but is not necessarily unique. For nonconvex QPs, the problem of determin-
ing whether a feasible point is a globally optimal solution of (6.8) is N P –
hard, cf. [157]. In the following, we restrict our presentation to convex QPs,
and to strictly convex QPs where it is appropriate.
The problem class of PQPs is defined as follows.
6.2 Parametric Quadratic Programs 149

Definition 6.7 (Parametric Quadratic Program)


p
The QP in standard form depending on a parameter p ∈ n

1 T
min 2
x Hx + x T g (p) (6.9)
x ∈n

s. t. Ax  b(p),

with gradient g and constraints right hand side b vector being affine functions of
the parameter p ,

def def
g (p) = g0 + Gp, b(p) = b0 + Bp,
p p
where G ∈ n×n , B ∈ m×n , is called a Parametric Quadratic Program. 

For any fixed value of p problem (6.9) becomes a QP in standard form, and
the results presented in the previous section remain valid. The purpose of
formulating and solving a PQP instead of an ordinary QP is to exploit prior
p
knowledge of the QP’s solution in p0 ∈ n to infer the solution for another
p
parameter p1 ∈ n .
Definition 6.8 (Set of Feasible Parameters)
p
The set P of parameters p ∈ n feasible for problem (6.9) is defined as
 p  
P = p ∈ n  F (p) =  ⊆ n
def p
(6.10)

where F (p) denotes the feasible set of the QP obtained from (6.9) for the parame-
ter p . 

Affine linearity and continuity of the homotopy path in p induce convexity


and closedness of the set P of feasible parameters.
Theorem 6.5 (Set of Feasible Parameters)
The set P of feasible parameters is convex and closed. 

Proof A proof can be found e.g. in [22, 67]. 

There is more structure to the set P , which can be partitioned using the
optimal solution’s active set as membership criterion.
Definition 6.9 (Critical Region)
Let P be the set of feasible homotopy parameters of a strictly convex PQP. Let
x  (p) denote the optimal solution of the QP in p ∈ P , and denote by A(x  (p)) the
associated active set. The set

C (A) = {p ∈ P | A = A(x  (p))} ⊆ P


def
(6.11)

is called the critical region of P for the index set A ⊆ {1, . . . , m} ⊂ . 


150 6 A Nonconvex Parametric SQP Method

The critical regions partition the set of feasible parameters as detailed by


the following theorem.

Theorem 6.6 (Partition of the Set of Feasible Parameters)


Let C (Ai ) denote the critical regions of a strictly convex PQP for the active sets
Ai ∈ P ({1, . . . , m}), 1  i  2m . Then the following holds:
1. The closures cl C (Ai ) are closed convex polyhedra.

2. Their interiors are pairwise disjoint,

∀i = j : C (Ai )◦ ∩ C (A j )◦ = . (6.12)

3. The set P is the union of all closures,


m

2

P= cl C (Ai ). (6.13)
i=1 

Proof A proof can e.g. be found in [67, 154]. 

As a result, the optimal solution x  and the associated objective function


are piecewise affine linear functions of p as they are affine linear functions
of p on every critical region C (Ai ) in P , a result that can be found e.g. in
[20, 70, 154, 223].
Restricting the considered class of PQPs to that of vector–valued homo-
topies is not a limitation if the destination parameter of the homotopy is
known in advance. An appropriate problem transformation is provided by
the following theorem.

Theorem 6.7 (Matrix–Valued Homotopy)


Consider a PQP with Hessian matrix H or constraints matrix A being affine functions
of the homotopy parameter p ,

1 T
min 2
x H(p)x + x T g (p) (6.14)
x ∈n

s. t. A(p)x  b(p),

where
def def
H(p) = H0 + ΔH p, A(p) = A0 + ΔAp,
p p
with ΔH ∈ n×n×n , ΔA ∈ m×n×n . Given an arbitrary but fixed homotopy destina-
tion point p1 ∈ P , problem (6.14) can be reformulated to a PQP in standard form
6.3 A Primal–Dual Parametric Active Set Strategy 151

def def
with Hessian H̃ = H(p1 ) and constraints matrix à = A(p1 ) by letting

def
b̃(p) = b0 + Bp + ΔA(p1 − p)x , (6.15a)
def T
g̃ (p) = g0 + Gp − ΔH(p1 − p)x + (ΔA(p1 − p)) λ, (6.15b)

such that the optimal solutions (x  (p), λ (p)) in p0 and p1 do not change. 

np
Proof The KKT conditions (3.1) of problem (6.14) in p ∈  read

(A0 + ΔAp)x − (b0 + Bp)  0,


(H0 + ΔH p)x + (g0 + G p) − (A0 + ΔAp) T λ = 0,
λ  0,
λ ((A0 + ΔAp)x − (b0 + Bp)) = 0.
T

Defining vectors g̃ (p) and b̃(p) depending on the homotopy parameter p as


above, these conditions may equivalently be written as

(A0 + ΔAp1 )x − b̃(p)  0,


(H0 + ΔH p1 )x + g̃ (p) − (A0 + ΔAp1 ) T λ = 0,
λ  0,
T
λ ((A0 + ΔAp1 )x − b̃(p)) = 0.

which are the KKT conditions of a PQP in standard form with gradient and
constraint right hand side homotopy, but with matrices fixed in the homo-
topy point p1 . 

6.3 A Primal–Dual Parametric Active Set Strategy

Active set methods exploit the notion of an active or working set selecting a
subset of linear independent inequality constraints that are assumed to be
satisfied to equality. A sequence of iterates {x k } towards the solution of the
QP is computed by solving for each step the Equality Constrained Quadratic
Program (EQP) obtained from restricting the QP to the current working
set W (x k ). This task involves the solution of a system of linear equations
and appropriate techniques to accomplish this are considered in chapter 7.
Based on its solution, the working set is updated by adding or removing
a blocking constraint, until a linear independent subset of the active set
belonging to the QP’s optimal solution has been found.
152 6 A Nonconvex Parametric SQP Method

6.3.1 Active Set Methods

Active set approaches usually are evaluated under the following aspects
concerning their efficiency, and in this section we present a parametric
primal–dual active set method due to [25, 67] for the solution of parametric
QPs that is notably distinguished from more classical active set methods in
several points.

Finding a Feasible Point

This usually is the first requirement to start an active set method. Between
one third and one half of the total effort of solving a QP is typically spent for
finding an initial feasible guess [88]. The task of identifying such an initial
guess is usually referred to as phase one. Several different approaches exist,
such as the solution of an auxiliary Linear Program (LP) or the relaxation of
constraints in a homotopy, cf. [158].

In SQP methods and in Model Predictive Control (MPC), a series of closely


related QPs is solved. For each QP, the preceding QP’s solution is an obvi-
ous candidate for a feasible point, a warm starting technique. Changes to
the constraint matrix A or vector b may render this candidate infeasible,
though, mandating a phase one run. Our active set algorithm is able to start
in any predefined primal point.

Determining the Active Set Exchange

This action is necessary whenever more than one component of the dual vec-
tor λ indicates non–optimality. Different pivoting strategies such as choos-
ing the constraint with the lowest index (lexical pivoting) or with the most
negative value λi are in use. Our algorithm adds and removes constraints
in the order they appear on the homotopy path, thereby avoiding the need
for pivoting strategies.

Ensuring Linear Independence of the Active Set

Whenever a constraint is added to the active set, linear dependence must


be verified and its maintenance may require removing another active con-
straint. There may in addition be degenerate points in which the full active
6.3 A Primal–Dual Parametric Active Set Strategy 153

set is linearly dependent and thus will not be fully identified. Repeated ad-
dition and removal of constraints may happen with steps of zero length in
between if such a point is reached, a situation that has already been investi-
gated from the NLP point of view in section 5.2. Ultimately, the method may
revisit an active set without having made significant progress in the primal–
dual iterate (x , λ). The method is said to be cycling, possibly infinitely.

Depending on the class of QPs treated, the cycling phenomenon is either


ignored or treated by simple heuristics. The EXPAND strategy [85] used by
many codes [73, 84, 86] perturbs constraints in order to ensure progress
in the primal–dual variables, but was shown to fail on specially crafted in-
stances [98]. Our active set method monitors positive progress on the ho-
motopy path and can easily detect and resolve linear dependence. In the
case of ties, cycling may occur and resolution techniques are presented by
[216].

KKT Solution and Matrix Updates

Solving the EQP to find the primal–dual step involves a factorization and
backsolve with the KKT matrix associated with the current active set. Com-
puting this factorization is necessary after each change of the active set,
and usually comes at the cost of O (n3 ) floating–point operations where n
denotes the number of unknowns in the QP. Exploiting structure and spar-
sity is crucial for the efficiency of the active set method. For certain factor-
izations, it is possible to compute the factorization only once and recover it
in O (n2 ) operations by using matrix updates after each active set change.
These issues are considered in chapters 7 and 8.

6.3.2 A Primal–Dual Parametric Active Set Strategy

We now present a parametric active set method due to [25, 67] that com-
putes optimal solutions (x  (τ), λ (τ)) = (x  (p(τ)), λ (p(τ))) of a PQP along
def

a homotopy path between given parameters p0 , p1 ∈ P ,

def def
p(τ) = p0 + τδp, δp = p1 − p0 , τ ∈ [0, 1] ⊂ , (6.16)

given the optimal solution (x  (0), λ (0)) of the PQP in τ = 0, i.e., for the
p
initial parameter p0 ∈ n . Gradient and residual can be reparameterized
154 6 A Nonconvex Parametric SQP Method

as functions of the scalar homotopy parameter τ,

def def
b(τ) = b0 + B(p0 + τδp), g (τ) = g0 + G(p0 + τδp). (6.17)

In addition, the distance to the homotopy end point is written as

def
δb(τ) = b(1) − b(τ) = (1 − τ)Bδp, (6.18)
def
δg (τ) = g (1) − g (τ) = (1 − τ)Gδp.

Rationale

The basic idea of the parametric active set strategy to be presented is to


move along the homotopy path from the known solution in τ = 0 to the solu-
tion sought in τ = 1 while maintaining both primal and dual feasibility, i.e.,
optimality of the iterates. This is accomplished by computing homotopies

x  (τ) : [0, 1] → n , (6.19)



λ (τ) : [0, 1] →  , m

W (τ) : [0, 1] → {1, . . . , m} ⊂ ,

that satisfy the KKT theorem 3.1 in every point τ ∈ [0, 1] ⊂  and start
in the known point (x  (0), λ (0)) with the working set W (0) = W (x  (0)).
Regularity of the KKT matrix implies that x  (·) and λ (·) are piecewise affine
and that x  (·) in addition is continuous by theorem 6.6. Hence there exist
k  2 primal–dual points (x i , λi ) ∈ n+m which for 2  i  k − 1 are located
on the common boundaries of pairs (Ci−1 , Ci ) of critical regions, such that
for τ ∈ [τi , τi+1 ], 1  i  k − 1 it holds that

x  (τ) = x i + (τ − τi )δx i , x (τ1 ) = x  (0), (6.20)


 
λ (τ) = λi + (τ − τi )δλi , λ(τ1 ) = λ (0),
x (τi+1 ) = x (τi ) + (τi+1 − τi )δx i .

Figure 6.2 depicts this situation in the space P of feasible homotopy param-
eters.
6.3 A Primal–Dual Parametric Active Set Strategy 155

C4 p1
τ5 = 1
τ4

C3

τ3

C2
p0
τ2 τ1 = 0
C1

Figure 6.2: The piecewise affine homotopy path.

A Primal–Dual Iteration

In the first iteration k = 1, the algorithm starts for τ1 = 0 in the given opti-
mal solution (x 1 , λ1 ) = (x  (0), λ (0)). The initial working set W 1 is chosen
as a linear independent subset of the active set A(x 1 ).

In iteration k  1, the primal–dual step direction (δx , δλ) is obtained as


the solution of the linear system
    
T
H AW −δx δg (τk )
=
k
(6.21)
AW k δλW k −δbW k (τk )

for the point τk ∈ [0, 1] ⊂  on the homotopy path. Appropriate techniques


are investigated in chapter 7. The maximum step length maintaining primal
feasibility is found from
 
bi (τk ) − Ai x 
k
αprim
def
= min i∈ k k
/ W ∧ Ai δx − δbi (τ ) < 0 . (6.22)
Ai δx − δbi (τk ) 

Constraints i satisfying this minimum are called primal blocking constraints.


Likewise the maximum step maintaining dual feasibility is found from
156 6 A Nonconvex Parametric SQP Method


λj 
k
αdual
def
= min −  k
j ∈ W ∧ δλ j < 0 , (6.23)
δλ  j

and constraints j satisfying this minimum are called dual blocking con-
straints. By choosing
 
def
αk = min 1 − τk , αprim
k k
, αdual (6.24)

we move onto the closest blocking constraint on the remainder [τk , 1] of


the homotopy path,

def def def


x k+1 = x k + αk δx , λk+1 = λk + αk δλ, τk+1 = τk + αk . (6.25)

To find the new working set, we distinguish the following three cases:

1. An inactive constraint i enters the working set if τk+1 = τk + αprim


k
:
Linear independence of the new working set can be checked by solv-
ing
    
T
H AW v a
=
k
(6.26)
AW k w 0

def
where a T = Ai is the constraint row i of A entering the working set.
def
If v = 0 the new working set W k+1 = W k ∪ {i} is linear independent.
Linear dependence of the active set is indicated by v = 0. If then
w  0, the PQP is infeasible for all τ  τk+1 . Otherwise, by removing
the constraint
 
λk+1 
j = argmin
j
 k
j ∈ W ∧ wj > 0 (6.27)
w  j

def
from the active set we can restore linear independence of W k+1 =
W k ∪ {i} \ { j}. In addition, we set
def def def
λk+1
i = λk+1
j /w j , λk+1
j = 0, k+1
λW k+1 k+1
k = λW k − λ i wW k . (6.28)

2. An active constraint j leaves the working set if τk+1 = τk + αdual


k
:
Boundedness of the new EQP can be checked by solving
6.3 A Primal–Dual Parametric Active Set Strategy 157

    
T
H AW v 0
=
k
. (6.29)
AW k w −e j

If w = 0, boundedness is maintained. Semidefiniteness of the Hessian


is indicated by w = 0. If then Av  0, the PQP step is unbounded for
all τ  τk+1 . Otherwise, by adding the constraint
 
bi (τk+1 ) − Ai x (k+1) 
i = argmin i∈
 / W ∧ Ai v < 0
k
(6.30)
A v
i

we can restore boundedness of the EQP for the new working set
def
W k+1 = W k ∪ {i} \ { j}.
3. The optimal solution (x  (1), λ (1)) = (x k+1 , λk+1 ) at the end of the
homotopy path is found if τk+1 = 1.
def
If τk+1 < 1 the algorithm continues with k = k + 1 in the new iterate.

Remark 6.1 (Checks for Boundedness)


In our implementation qpHPSC, the check 2. for boundedness has not been included
as the feasible set F is known to be bounded in advance. Both the process state
trajectory and the control trajectory reside in bounded domains.

6.3.3 Proof of the Algorithm

In this section we give proofs for the individual steps of the described para-
metric active set strategy. Variants can be found in [25] and [67].

Theorem 6.8 (Linear Independence Test)


Let the constraint matrix AW be linear independent, and let constraint row a T enter
the active set. Then the new constraint matrix is linear independent iff
    
T
H AW v a
= (6.31)
AW w 0

has a solution v = 0. 

Proof If AW and a T are linear dependent, the point (0, w ) is a solution of


(6.31). Uniqueness implies there exists no further solution with v = 0. If
on the other hand A and a T are linear independent, there does not exist a
solution to (6.31) with v = 0. By theorem 3.1 a solution with v = 0 must
exist. 
158 6 A Nonconvex Parametric SQP Method

Theorem 6.9 (Infeasibility Test)


Let the constraint matrix AW be linear independent, and let constraint row a T enter
the active set. Let (x (τk ), λ(τk )) be the optimal solution in a point τk ∈ [0, 1] ⊂ .
If (6.31) has a solution v = 0, w  0, the PQP is infeasible for all τ > τk . 

Proof Assume some x ∈ n to satisfy AW x  bW (τ) for some τ > τk . Then


the relation

a T x  w T bW (τ) (6.32)

holds by linear dependence of a T on AW . On the other hand, we have infea-


sibility beyond τk of the constraint j to be added,

b j (τ) > a T (x + τδx ) = w T AW (x + τδx ) = w T bW (τ) ∀τ ∈ (τk , 1].


(6.33)

Since x ∈ n was chosen feasible but otherwise arbitrary, constraint j re-


mains infeasible for τ > τk as long as all constraints in W remain feasible.
By continuity of the piecewise affine solution and by convexity of the set
P of feasible homotopy parameters, infeasibility of the PQP for all τ > τk
follows. 

Theorem 6.10 (Restoring Linear Independence)


Let the constraint matrix AW be linear independent, and let constraint row a T enter
the active set. Let (x (τk ), λ(τk )) be the optimal solution in τk ∈ [0, 1] ⊂ . Let (6.31)
have a solution v = 0 and w with w j > 0 for some j ∈ {1, . . . , m}. Then the matrix
def
AŴ with Ŵ = W \ { j} where
 
λ j (τk ) 
def
j = argmin  j∈W : w >0 (6.34)
wj 
j

is linear independent from a T . 

Proof The stationarity condition of theorem 3.1 holds for (x (τk ), λ(τk )),

H x (τk ) + g (τk ) = AW
T
λ(τk ), (6.35)

Multiplying the linear dependence relation by some μ  0 and subtracting


from (6.35) yields

H x (τk ) + g (τk ) = μa + AW
T
(λ(τk ) − μw ). (6.36)
- ./ 0
def
= λ̂
6.3 A Primal–Dual Parametric Active Set Strategy 159

We find that the coefficients (μ, λ̂) are also dual feasible solutions if λ̂  0.
The largest μ satisfying this requirement is found as
 
λ j (τk ) 
def
μ = min  ∀j ∈ W : w > 0 . (6.37)
w  j
j

As the dual of the minimizing constraint j is reduced to zero, λ j = 0, it


def
can be removed from the active set W . For the active set Ŵ = W \ { j} the
constraint row a T to be added is linear independent from AŴ , as w j > 0
holds. 

Theorem 6.11 (Continuation after Restored Linear Independence)


Let the assumptions of theorem 6.10 be satisfied and let the primal blocking con-
straint in τprim be unique. Then there exists τ2 ∈ (τprim , 1] such that the constraint j
removed from the active set remains inactive for all τ ∈ (τprim , τ2 ]. 

Proof The step δx for the segment [τk , τprim ] of the homotopy path [0, 1]
satisfies

AW x (τ) = bW (τ) τ ∈ [τk , 1],


Ai x (τ) < bi (τ) τ ∈ [τprim , 1],

such that by linear dependence of Ai on AW

T
wW bW (τ) < bi (τ) τ ∈ [τprim , 1]. (6.38)

def
The next segment [τprim , τ2 ] for the working set W̃ = W ∪ {i} \ { j} is chosen
such that

AW̃ x (τ) = bW̃ (τ) τ ∈ [τprim , τ2 ].

def
Again by linear dependence we have for the working set Ŵ = W \ { j}

T
b j (τ) = wŴ bŴ (τ) + w j A j x (τ)τ ∈ [τprim , τ2 ], (6.39)

By combining (6.38) and (6.39) and noting w j > 0 by theorem 6.10 we find

w j b j (τ) < w j A j x (τ) τ ∈ [τprim , τ2 ],


160 6 A Nonconvex Parametric SQP Method

which shows that the removed constraint j remains feasible and strictly
inactive. 

Remark 6.2 (Ties)


If the primal blocking constraint is not unique, i.e., more than one constraint is hit
in the same point τprim > τ on the homotopy path, the PQP is said to have primal
ties in τprim . In this situation, additional computational effort is required to identify a
new active set that permits a step of nonzero length to be made before the removed
constraint becomes active again.

For typical MPC problems computational evidence suggests that ties fre-
quently can be circumvented by choice of suitable starting points and by
sorting heuristics for the constraints in question. We refer to [216] for an-
alytical methods to resolve ties in PQPs and do not further consider this
situation. In our code qpHPSC we currently detect ties but do no take spe-
cial action to resolve them, and have so far not experienced any numerical
problems.
Theorem 6.12 (Finite Termination)
If the PQP has no ties, the parametric quadratic active set algorithm terminates after
finitely many steps. 

Proof There exist at most 2m critical regions associated with the active
sets Ai , 1  i  2m , and by theorem 6.6 every point τ ∈ [0, 1] belongs to
at most two critical regions as no primal ties exist. By theorem 6.11 a step
of positive length in τ on the homotopy path is made after every active set
change involving the addition of a primal blocking constraint to the current
active set. Thus after at most 2m active set changes, the end point τ = 1 of
the homotopy path is reached. 

In practice, exponential run time of the parametric active set method is


observed on specially crafted problem instances only.

6.3.4 Finding a Feasible Initializer

A Phase One Procedure

The described algorithm assumes that the optimal solution (x  (0), λ (0)) in
the start τ = 0 of the homotopy path be known. This allows for highly effi-
cient hot–starting of the QP solution if the solution of a closely related QP
6.3 A Primal–Dual Parametric Active Set Strategy 161

has already been computed for some purpose. If not, the following auxil-
iary QP

1 T
min 2
x Hx (6.40)
x ∈n

s. t. Ax  0,

with optimal solution (x  , λ ) = (0, 0) can be used together with the homo-
topy

def
g (τ) = τg (p1 ),
def
b(τ) = τb(p1 ),

from the auxiliary QP (6.40) to the one whose solution is sought. This pro-
cedure effectively describes a phase one type approach for our PQP al-
gorithm that achieves feasibility simultaneously with optimality in the end
point τ = 1 of the homotopy.

Starting in an Arbitrary Guess

Theorem 6.7 actually hints at a more general initialization and hot starting
approach that can be realized in the framework of our PQP method. Given
an primal–dual point (x̂ , λ̂) ∈ n+m that satisfies only dual feasibility and
complementary slackness, e.g.

λ̂  0, λ T (Ax̂ − b) = 0, (6.41)

but is otherwise chosen arbitrarily, the following modification of the gradi-


ent and residual

b̂(τ) = b(τ) − A(x − x̂ ), (6.42)


T
ĝ (τ) = g (τ) + H(x − x̂ ) − A (λ − λ̂)

makes (x̂ , λ̂) the optimal solution of the modified QP in τ. This is easily
verified by checking theorem 3.1. The working set W (x̂ ) needs to be chosen
appropriately. The modification (6.42) can be applied before starting the
PQP algorithm to the purpose of using (x̂ , λ̂) as an initial guess of the PQP’s
solution in τ = 1. Moreover, it can in principle be applied to the QP’s right
hand side in any point τ ∈ [0, 1) of the homotopy path during the execution
162 6 A Nonconvex Parametric SQP Method

of the described PQP algorithm. We will make extensive use of this property
in section 6.4.

6.3.5 Parametric Quadratic Programming for SQP Methods

Linearizations

In an SQP method in iteration k  1 the homotopy accomplishes the tran-


sition from the previous SQP iterate (x k , λk ) found from the known optimal
solution of the PQP in τ = 0 to the next SQP iterate (x k+1 , λk+1 ) found from
the optimal solution in τ = 1 to be computed.

The Hessian H and constraints matrix A will in general differ in τ = 0


and τ = 1 as they have been updated or recomputed by a linearization in
the k-th iterate. By virtue of theorem 6.7 the PQP can be reformulated to
use the new matrix data only.

Bounds

In SQP methods, the quadratic subproblem usually is set up to deliver the



primal step x QP = δx SQP
k
to be added to the SQP algorithm’s current it-
k
erate x SQP . This is convenient for globalization methods that potentially
shrink the SQP step length but maintain the direction. Roundoff errors that
have accumulated during the QP’s solution may lead to tiny nonzero resid-
uals bi − δx ik for active simple bounds i . If a parametric active set method
is used to infer the quadratic subproblem’s solution from the known one
of the previous SQP iteration’s quadratic subproblem, one observes that
these errors disturb the next right hand side homotopy step computed as
δb = b(τ1 ) − (x k+1 − b(τ0 )), leading to “chattering” of the bounds. The
determination of the primal step length τprim (6.22) on the homotopy path
is then prone to flipping signs in the denominator, making the active set
method numerically unstable. This leads us to the following remark.

Remark 6.3 (Setup of the PQP Subproblem)


If active set PQP methods are used to solve the QP subproblems in an SQP method,

these subproblems should be set up to deliver the new iterate x QP = x SQP
k+1
instead.

In this case, the right hand side homotopy step for the simple bounds
need not be computed, as δb(τ) = b(τ1 ) − b(τ0 ) = 0.
6.4 Parametric Quadratic Programming for Nonconvex Problems 163

6.4 Parametric Quadratic Programming for Nonconvex


Problems

We develop an extension of the presented parametric active set strategy to


the case of QPVCs. We restrict our discussion to the following special class
of QPVC.
Definition 6.10 (QPVC with Constraints Vanishing on a Bound)
The restricted problem class of a QP with constraints vanishing on a bound is given
by

1 T
min 2
x Hx + xTg (6.43)
x ∈n

s. t. 0  x ξi (bi − Ai x ), 1  i  l,
x ξ  0,

where ξ ∈ {1, . . . , n}l ⊂  is a fixed index vector selecting the controlling component
x ξi of the unknown x ∈ n for each of the vanishing constraints 1  i  l . 

In problem (6.43), any of the l constraints Ax − b  0 vanishes if the as-


sociated component of the unknown x is active at its lower bound x = 0.
Standard linear affine constraints are omitted from problem (6.43) for clar-
ity of exposition. They do not affect the ensuing presentation of the noncon-
vex PQP strategy as long as the feasible set of (6.43) remains connected if
it is not empty. Note that the consideration of (6.43) is not a true restriction
of the applicability of our methods, as the following slack reformulation can
be used to transform (6.6) to the restricted form.
Definition 6.11 (Slack Reformulation of QPVC)
The slack reformulation of a QPVC to the restricted form (6.43) is given by

1 T
min 2
x Hx + xTg (6.44)
x ,s

s. t. C x − s  d,
−C x + s  −d,
0  si (bi − Ai x ), 1  i  l,
s  0,

where s ∈ l is a vector of slack variables. 

Note that (6.44) still has a strictly convex objective if H is positive definite,
as the slack is never a free unknown. In the case of QPVCs arising from
outer convexification and relaxation of constraints direct depending on an
164 6 A Nonconvex Parametric SQP Method

integer control, s in (6.44) and x ξ in (6.43) take the role of the relaxed
convex multipliers α of chapter 2.

6.4.1 Nonconvex Primal Strategy

We are concerned with devising a primal active set exchange strategy for
the vanishing constraints of QPVC (6.43).

Primal Blockings

The feasible set F of (6.43) is nonconvex as detailed in section 5.4, and can
be partitioned in at most 2l convex subsets Ci , each one associated with
unique subset Vi ∈ P ({1, . . . , l}) of vanishing constraints that are feasible
and ViC of vanishing constraints that have vanished,

def
Ci = {x ∈ n | (i ∈ Vi ∧ Ai x  bi ) ∨ (i ∈ ViC ∧ x ξi = 0)}. (6.45)

An exhaustive search of these convex subsets by solving up to 2l smaller


standard QPs is prohibitive and would indeed lead our efforts in applying
outer convexification and relaxation to the MIOCP ad absurdum, as has al-
ready been noticed in section 5.4.
We instead modify the active set exchange rule (6.22) for primal block-
ing constraints and adapt it to the nonconvex shape of the feasible set as
follows,

def bi (τk ) − Ai x
k
αprim = min (6.46)
Ai δx − δbi (τk )


i∈
 / (W ∪ I0 ) ∧ (Ai δx − δbi (τ ) < 0) .
k k

Using the primal test (6.46), a vanishing constraint i becomes active only
if it is primally blocking and the associated control variable x ξi is nonzero,
i.e., the constraint i ∈ I+ is not permitted to vanish beyond its bound. If the
controlling variable is zero, i.e., i ∈ I0 , the vanishing constraint is free to
vanish and reappear as indicated by the unknowns x . In addition, as soon
as its associated controlling variable hits its simple lower bound any active
vanishing constraint also vanishes and is removed from the active set W k .
This ensures I00 =  after all primal blockings, i.e., no bound or constraint
6.4 Parametric Quadratic Programming for Nonconvex Problems 165

ever enters the critical subset I00 of the active set. Hence these two kinds
of move between adjacent convex subsets is naturally accomplished by the
primal exchange strategy.

Primal Continuation after Infeasibility

The described strategy allows to move between the convex subsets of the
feasible set as long as the piecewise affine homotopy path does not cross
the boundary of the nonconvex feasible set F into infeasibility before the
end τ = 1 of the homotopy has been reached. In the latter case, infeasibility
of the PQP by theorem 6.9 is detected by the parametric active set method
of section 6.3. For the case of a QPVC this means that for τ = 1 no strongly
stationary point is located in the current convex critical region. Two cases
can be distinguished here.

1. The blocking part of the critical region’s boundary is defined by an


active regular constraint. In this case the QPVC actually is infeasible
if no vanishing constraint is found in I+0 .

2. The blocking constraint is a vanishing constraint becoming active and


entering the index set I+0 . A strongly stationary point could possibly
be found if the constraint were allowed to vanish.

In both cases, let A and X denote the active sets for the constraints and
simple bounds associated with this critical region, and let j ∈ I+0 ⊆ A
denote an active vanishing constraint. The solution may be continued in
the adjacent critical region associated with the active set A \ { j} for the
constraints and X ∪ {i}, i = ξ j for the simple bounds on the unknowns.
The controlling variable x j is set to zero. In this critical region, the active
vanishing constraint blocking the progress of the homotopy has vanished.
Maintenance of linear independence may require removal of an additional
constraint from A or X .

This procedure effectively describes a primal continuation of the homo-


topy in a critical region that does not share a common boundary with the one
the homotopy path terminated in. This involves a modification of the primal
point x , the active set, and consequentially also the dual point. Numerical
techniques to realize this continuation in the framework of the parametric
active set method of section 6.3 are developed in the sequel of this section.
166 6 A Nonconvex Parametric SQP Method

6.4.2 Nonconvex Dual Strategy

We are concerned with devising a dual active set exchange strategy for
the vanishing constraints of QPVC (6.43). In accordance with the notation
of chapter 5 we denote the MPVC multipliers of the vanishing constraints
Ai x  b by μg and those of the controlling variables’ simple bounds x ξ  0
by μh .

Dual Blockings

By theorem 6.3, for a QPVC strong stationarity is equivalent to local opti-


mality. In order to detect dual blocking constraints whose removal allows
the homotopy path to make progress towards optimality, the dual blocking
constraints rule (6.23) is modified according to the optimal multiplier signs
known from the notion of strong MPVC stationarity introduced by definition
5.11, which is repeated here for convenience.
Definition 6.12 (Strong Stationarity)
A feasible point x ∈ n of an MPVC is called strongly stationary if it holds that

Λ x (x , μ) = 0, (6.47)
μh,I0+  0, μh,I00  0, μh,I+ = 0,
μg,I+0  0, μg,I++ = 0, μg,I0 = 0. 

As I00 =  is guaranteed by the primal strategy, the only index set rel-
evant for the dual exchange of vanishing constraints is the set I0− of van-
ishing constraints that are infeasible and were permitted to vanish as the
associated controlling variable is zero. The following QPVC dual active set
exchange rule for simple bounds prevents the affected controlling variables
from leaving their lower bounds.
 
λj 
τ dual def
= min −  j ∈ W \ I ∧ δλ < 0 .
k
(6.48)
δλ 
0− j
j

Dual Continuation

An additional modification to the dual exchange strategy is required in two


places, namely whenever moving from one of the two convex subsets of a
scalar vanishing constraint’s nonconvex feasible set to the other one. As
6.4 Parametric Quadratic Programming for Nonconvex Problems 167

we will see in the next section, this modification has a close connection
to the question of global optimality of the MPVC strongly stationary point
identified by this QPVC active set strategy.
1. MPVC strong stationarity requires μg,i = 0 for an active vanishing
constraint i ∈ I+0 entering I0− via I00 , i.e., if the controlling variable
was free and is about to enter its lower bound, causing the vanishing
constraint i to actually vanish beyond its bound. Then, if we had μg,i >
0 in I+0 , the homotopy path shows a dual discontinuity which can be
treated as shown in the sequel of this section.
2. Likewise μh,i  0 is required for a controlling variable active at its
lower bound in I0− entering I0+ via I00 , i.e., if the associated van-
ishing constraint reappears. We find that a dual discontinuity of the
homotopy path occurs if we had μh,i < 0 in I0− .
The resulting active set strategy is depicted in figure 6.3 as a state machine.
Nodes show the index sets, subsets of the active set, and arcs show the
primal and dual conditions for transition of a simple bound or a vanishing
constraint from one index set to the other.

6.4.3 A Heuristic for Global Optimality

A sufficient condition for global optimality of a QPVCs due to [105] can be


established. As a consequence, the QPVC subproblems generated by our
nonconvex SQP method can actually be solved to global optimality, as is the
case for standard convex QP subproblems with positive semidefinite Hes-
sian matrices. The sequence of SQP iterates thus actually inherits the lo-
cal convergence properties of the corresponding standard Lagrangian SQP
method.
Theorem 6.13 (Global Optimality Conditions)
Let the objective function f be convex and let g , h be affine linear in problem (5.9).
Further, let x  be a strongly stationary point of problem (5.9). Then if μh,I0−  0 and
μg,I+0 = 0, it holds that x  is a globally optimal point of problem (5.9). 

Proof A proof can be found in [105]. 

Theorem 6.13 indicates that the active set strategy for MPVC strong sta-
tionarity presented in the previous section can potentially be improved fur-
ther. Note that the global optimality conditions of the above theorem corre-
spond to the two conditions for a dual discontinuity of the homotopy path.
168 6 A Nonconvex Parametric SQP Method

xi  0
I0+ I++
μh, j < 0

g i (x )  0 μg, j < 0 g i (x )  0 μg, j < 0

x ξi  0 ∧ μg,i = 0

I00 I+0
μh, j < 0

μg, j > 0 g i (x )  0 ∧ μh,ξi  0

I0−

Figure 6.3: Active set exchange rules for MPVC strong stationarity. Constraints
never remain in the state I00 which is shown for clarity only. Dotted
lines indicate convex feasible subsets.

In detail, a dual discontinuity arises if and only if the affected active vanish-
ing constraint or simple bound has an MPVC multiplier in violation of the
sufficient conditions for global optimality.

This observation leads to the following modification of the primal active


set strategy. Whenever a vanishing constraint Ai x  bi becomes active and
is about to enter the index set I+0 because its controlling variable x ξi is
nonzero, the associated MPVC multiplier μg,i would violate the sufficient
global optimality conditions. We then choose to immediately continue the
solution in an adjacent convex critical region of the feasible set in which the
primal blocking constraint has vanished, if such a region exists. This can be
realized in the same way as primal continuation after infeasibility has been
realized in the previous section. The resulting active set strategy is depicted
in figure 6.4 again as a state machine. Due to our global optimality heuristic,
the arc from I+0 to I0− has no counterpart in the reverse direction.
6.4 Parametric Quadratic Programming for Nonconvex Problems 169

xi  0
I0+ I++
μh, j < 0

g i (x )  0 μg, j < 0 g i (x )  0 μg, j < 0

I00 I+0

g i (x )  0
μg, j > 0 continue in x ξi = 0
∧ μh,ξi  0

I0−

Figure 6.4: Active set exchange rules for MPVC strong stationarity with heuristic
for global optimality. Constraints never remain in the states I00 and I+0
which are shown for clarity only. Due to our global optimality heuristic,
the arc from I+0 to I0− has no counterpart arc in the reverse direction.

Resolution of Degeneracy

Forcing x ξi = 0 and adding this simple lower bound to the active set may
cause linear dependence of the active constraints. A first attempt at resolv-
ing this is to use the linear dependence check and resolution procedure of
section 6.3.

In the case of SOS1 constraints, however, it is possible that the only ac-
tive constraints potentially resolving the degeneracy are the simple lower
bounds on variables x ξ j , j = i , controlling vanishing constraints, and it is
further possible that all vanishing constraints j = i actually have vanished.
In this situation, one of these simple bounds has to be removed from the
active set, and the associated vanishing constraint has to reappear, i.e., to
be made feasible by continuing in an adjacent critical region after a primal
170 6 A Nonconvex Parametric SQP Method

discontinuity. The criterion of theorem 6.10 does not provide information on


which simple bound to remove from the active set, though, as there is no
signedness requirement on MPVC strong stationarity of the multipliers μh in
I0− . In this situation, problem dependent resolution heuristics are required
to step in and indicate a vanishing constraint resolving the degeneracy.
1. Based on the sufficient optimality criterion a simple bound with mul-
tiplier μh,i < 0 can be chosen.
2. Another possibility is to choose the vanishing constraint j = i that
would show the smallest violation of feasibility if x ξ j were nonzero,
and thus leads to the smallest primal discontinuity,

def
j = argmin{b j − A j x | j ∈ I0− }. (6.49)

3. The move to an adjacent convex feasible region could be rejected and


the blocking vanishing constraint enters the set I+0 in violation of the
sufficient optimality conditions.

6.4.4 Continuations for a Parametric Active Set Method

The primal and dual strategies of the previous section require the paramet-
ric active set method to cope with both primal and dual discontinuities of
the homotopy path. As mentioned before, these can be regarded as restarts
of the method in a different convex critical section of the nonconvex feasible
set that is adjacent to the previous one in the sense of definition 6.4.
We now present two numerical techniques that make these continuations
possible in a highly efficient way. The underlying idea is that any arbitrary
primal–dual point can serve as an initializer for the parametric active set
method in τ = 0 as long as it satisfies all KKT conditions. The techniques
to be presented guarantee this by modifying the right hand side homotopy
from the initial gradient and right hand side g (0), b(0) to the final one g (1),
b(1) to make sure that all KKT conditions in the new starting point are
satisfied.

Primal Continuation

The primal continuation, used a) if infeasibility of the QPVC in the current


convex subset is diagnosed, and b) in the heuristic for global optimality if a
6.4 Parametric Quadratic Programming for Nonconvex Problems 171

vanishing constraint is primally blocking, requires a primal variable x ξi to


jump to zero. The feasibility gap after letting x ξi = 0 can be computed as

def max{b j − A j x , 0} if x ξ j > 0
b̂ j = 1  j  l, (6.50)
0 otherwise.

and the new initial right hand side is

def
b(0) = b(τprimal ) − b̂. (6.51)

Setting the MPVC multiplier μh,ξi of the simple bound entering the active
set as x ξi = 0 to some positive value bounded away from zero has proven
useful in order to avoid primal ties in the ensuing active set iterations. The
introduced stationarity defect is easily covered by modifying the gradient
g (0) analogously to the following dual continuation.

Dual Continuation

The dual continuation requires either of the MPVC multipliers μg,i or μh,ξi to
jump to zero. The stationarity gap after letting e.g. μg,i = 0 can be computed
as
def
ĝ = H x + g (τdual ) − A T μg − μh (6.52)

and the new initial gradient is

def
g (0) = g (τdual ) − ĝ (6.53)

satisfying

def
0 = H x + g (0) − A T μg − μh . (6.54)

Dual feasibility is always maintained even after a dual discontinuity.

The computational effort of continuing in an adjacent critical section is


thus limited to the computation of at most three matrix–vector products and
in the case of the primal continuation a recomputation or an update of the
KKT system’s factorization.
172 6 A Nonconvex Parametric SQP Method

6.4.5 Active Set Exchange Rules Summary

In this section, we collect the exchange rules for the parametric active set
strategy solving a QPVC.

blocking index sets action


kind type from to

primal bound I++ I0+ conventional


I+0 I00 move to I0− , dual discontinuity if μg,i = 0
happens if global heuristic not used

primal vanishing I++ I+0 if global heuristic used: continue in I0−


constraint otherwise: conventional
I0+ I00 move to I0−
I0− I00 move to I0+ , dual discontinuity if μh,i < 0

dual bound I0+ I++ conventional


I00 I+0 never happens; no constraint ever is in I00
I0− — never happens due to dual step decision

dual vanishing I+0 I++ conventional; happens if global heuristic


constraint is not used
I00 I0+ never happens; no constraint ever is in I00

Table 6.1: Possible active set exchanges in the parametric active set strategy for
QPVCs.

6.5 Summary

In this chapter we developed a parametric nonconvex SQP method for


the efficient numerical solution of discretized MIOCPs with vanishing con-
straints arising from outer convexification of constraints directly depending
on a binary or integer control parameter. This method relies on solving the
generated nonconvex subproblems to local optimality on a convex subset
of their feasible sets, and continuing resp. verifying the solution in all adja-
cent convex subsets. For MIOCPs the local subproblems generated by our
SQP method are QPs with convex objective and affine linear vanishing con-
straints (QPVCs). Though these are truly nonconvex problems, KKT points
of QPVCs are locally optimal solutions that can be found by an appropri-
6.5 Summary 173

ate active set method. We have introduced a primal–dual parametric active


set method that efficiently computes solutions to a sequence of convex QPs.
This method can be used in a natural way to find locally optimal solutions
of a sequence of QPVCs restricted to a convex subset of the nonconvex fea-
sible set. To this end, the shape of the feasible set and the MPVC strong
stationarity conditions are accounted for in the definition of the closest pri-
mal and dual blocking constraints. Using the adjacency relation for QPVCs
we developed a continuation method that allows to efficiently move between
adjacent convex subsets. This enables the parametric active set strategy to
find a locally optimal solution that can be repetitively verified or improved
in all adjacent convex feasible subsets. We further described a heuristic for
finding a globally optimal point, based on a sufficient condition for global
optimality of convex MPVC. This heuristic relies on problem instance spe-
cific information in one particular case arising if moving from one convex
feasible subset to another adjacent one causes linear dependence of the
active set.
7 Linear Algebra for Block Structured QPs

In this chapter we survey linear algebra techniques for efficiently solving


Quadratic Programs (QPs) and Quadratic Programs with Vanishing Con-
straints (QPVCs) with block structure due to direct multiple shooting. After
a review of existing techniques, we present a novel algorithmic approach
tailored to QPs with many control parameters due to the application of outer
convexification. Our approach consists of a block structured factorization
of the Karush–Kuhn–Tucker (KKT) systems that completes in O (mn3 ) opera-
tions without generating any fill–in. It is derived from a combined null–space
range–space method due to [202]. All operations on the KKT factorization
required for the parametric active set algorithm for QPVC of chapter 6 are
presented in detail, and efficient implementations are discussed. We investi-
gate the run time complexity of this algorithm, the number of floating–point
operations required for the individual steps of the presented factorization
and backsolve, and give details on the memory requirements.
In chapter 8, the presented KKT factorization is further improved to a
runtime complexity of O (mn2 ) for all but the first iteration of the active set
method.

7.1 Block Structure

In this section we have a closer look at the block structure of the QPs stem-
ming from the direct multiple shooting discretization of the Optimal Control
Problem (OCP), given in the following definition.
Definition 7.1 (Direct Multiple Shooting Quadratic Program)
The quadratic program obtained from a local quadratic model of the Lagrangian of
the direct multiple shooting Nonlinear Program (NLP) (1.24) is


m
 
1 T
min v Hi v i
2 i
+ v iT gi (7.1)
v
i=0

s. t. ri  Ri v i , 0  i  m,
hi = Gi v i + Pi+1 v i+1 , 0  i  m − 1.

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8_8,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
176 7 Linear Algebra for Block Structured QPs

v
Herein v i ∈ ni denote the m vectors of unknowns. The Hessian blocks are denotes
v v v
by Hi ∈ ni ×ni and gradients by gi ∈ ni . Linearized point constraints are denoted
nri ×nvi r
by matrices Ri ∈  and right hand side vectors ri ∈ ni . Linearized matching
h ×nv
conditions are written using sensitivity matrices Gi ∈ n i and coupling matrices
nh ×nvi+1 nhi
Pi ∈  with right hand side vectors hi ∈  . 

In a direct multiple shooting discretization we will usually have identical


dimensions nvi = nx + nq for all nodes 0  i  m and assume one matching
condition per Ordinary Differential Equation (ODE) state, i.e., nhi = nx .

Two different structure exploiting approaches at solving QP (7.1) can be


distinguished. Condensing methods apply variants of Gaussian elimination
to the block diagonal Hessian H and the block bi–diagonal constraints ma-
trix with entries from R, G , and P to obtain a dense but considerably smaller
QP. This is then solved with a structure–free active set method. Condensing
methods for direct multiple shooting are presented in section 7.2.1.
One may also conceive active set methods on the large QP, wherein the
block structure is exploited by the KKT system factorization in every iter-
ation of the active set loop. The challenge here lies with the varying size
and structure of the KKT matrix over the course of active set changes. For
a given active set A(v ), the QP (7.1) is reduced to a purely equality con-
strained QP as follows.
Definition 7.2 (Direct Multiple Shooting Equality Constrained QP)
The Equality Constrained Quadratic Program (EQP) obtained from the direct multi-
ple shooting QP (7.1) for a given active set A(v ) (cf. definition 3.3) is


m
 
1 T
min v Hi v i
2 i
+ v iT gi (7.2)
v
i=0

s. t. riA = RiA v i , 0  i  m,
hi = Gi v i + Pi+1 v i+1 , 0  i  m − 1.

The notation RiA and riA denotes the restriction of Ri and ri on the rows resp. ele-
ments of the constraints in the active set A(v ). 

The KKT system associated with this EQP according to theorem 3.1 is
given in definition 7.3 on page 177. The performance of active set meth-
ods crucially depends on the ability to efficiently exploit simple bounds on
the unknown v . In particular when treating Mixed–Integer Optimal Control
Problems (MIOCPs) by outer convexification, many relaxed binary control
parameters in resulting NLPs and QP will be active at their lower or upper
7.1 Block Structure 177

bound. Active simple bounds correspond to components vi that can imme-


diately be eliminated from the KKT system (7.3). This reduces the computa-
tional effort of the ensuing factorization.
Definition 7.3 (KKT System of the Direct Multiple Shooting EQP)
For a given active set A(v ) the KKT system of problem (7.2) reads
⎡ T ⎤⎡ ⎤ ⎡ ⎤
H0 R A G0T
⎢ A 0 ⎥ ⎢ −v0 ⎥ ⎢ g0 ⎥
⎢R0 ⎥ ⎢ μA ⎥ ⎢−r A ⎥
⎢ ⎥⎢ 0 ⎥ ⎢ 0 ⎥
⎢ G0 P1 ⎥ ⎢ λ ⎥ ⎢ −h ⎥
⎢ ⎥⎢ 0⎥ ⎢ 0⎥
⎢ T
P1T H1 R1A G1T ⎥⎢
⎢ ⎥ ⎢ −v1 ⎥ ⎢ g1 ⎥
⎢ ⎥ ⎢ A⎥ ⎢
= ⎢ A⎥

⎢ R1A
..
. ⎥ ⎢ μ1 ⎥ ⎥ ⎢−r1 ⎥
(7.3)
⎢ ⎥⎢
⎢ ⎥ ⎢ .. ⎥ ⎢ . ⎥
⎢ .. ⎥⎢ . ⎥ ⎢ . ⎥
⎥ ⎢ . ⎥
⎢ G1 . Pm ⎥⎢ ⎥ ⎢ ⎥
⎢ A T ⎥ ⎣ −v m ⎦ ⎣ gm ⎦
⎣ PmT Hm Rm ⎦
A
Rm μAm
−rmA

rA
with Lagrange multipliers μA
i
∈ ni of the linearized decoupled point constraints
nx
and λi ∈  of the linearized matching conditions. 

To gain additional insight into the structure of simple bounds, we define


the multiple shooting QP with simple bounds on v and derive the more de-
tailed KKT system.
Definition 7.4 (Direct Multiple Shooting QP with Simple Bounds)
The quadratic program obtained from a local quadratic model of the Lagrangian of
the direct multiple shooting NLP (1.24) is


m
 
1 T
min v Hi v i
2 i
+ v iT gi (7.4)
v
i=0

s. t. li  vi  ui , 0  i  m,
ri  Ri v i , 0  i  m,
hi = Gi v i + Pi+1 v i+1 , 0  i  m − 1. 

In the following, the active set A(v ) refers to the active linear inequality
constraints only. We introduce the active set X (v) of active simple bounds
on the unknown v by straightforward extension of definition 3.3, and denote
by F (v ) its complement set in the index set of all simple bounds.
Definition 7.5 (Active Simple Bound, Active Set of Simple Bounds)
Let x ∈ n be a feasible point of problem (7.4). A simple bound on v i j , 0  i  m,
1  j  nvi is called active if v i j = l i j or v i j = ui j holds. It is called inactive otherwise.
178 7 Linear Algebra for Block Structured QPs

The set of indices of all active simple bounds


def
X (v ) = {(i, j) | v i j = l i j ∨ v i j = ui j } ⊂ 0 ×  (7.5)

is called the active set of the simple bounds associated with v . We denote by F (v)
the complement of X (v ) in the set {(i, j) | 0  i  m, 1  j  nvi }. 

Definition 7.6 (Direct Multiple Shooting EQP with Simple Bounds)


The EQP obtained from the direct multiple shooting QP (7.4) for a given active set
A(v) is

m
 
1 T
min v Hi v i
2 i
+ v iT gi (7.6)
v
i=0

s. t. bi = IiX v i , 0  i  m,
ri = RiA v i , 0  i  m,
hi = Gi v i + Pi+1 v i+1 , 0  i  m − 1.

The matrices IiX contain the subsets of rows of the identity matrix I belonging to
active simple bounds. The vectors bi contain an element–wise combination of the
entries of the vectors l i and u i as indicated by the current set X of fixed unknowns,
i.e., active simple bounds. 

Definition 7.7 (KKT System of Direct Multiple Shooting EQP with Bounds)
For a given active set A(v ) the KKT system of problem (7.6) reads
⎡ T T ⎤
H FF H FX RAF G F ⎡ ⎤ ⎡ F⎤
⎢ 0X F 0X X X X T 0AX T 0X T ⎥ −v0F g
⎢H0 H0 I0 R0 G0 ⎥ ⎢ X ⎥ ⎢ 0X ⎥
⎢ X X
⎥ ⎢−v0 ⎥ ⎢ g0 ⎥
⎢ I0 ⎥⎢ X⎥ ⎢ X ⎥
⎢ AF AX ⎥ ⎢ ν0 ⎥ ⎢−b0 ⎥
⎢R ⎥ ⎢ A⎥ ⎢ A⎥
⎢ 0F R0X ⎥ ⎢ μ ⎥ ⎢ −r ⎥
⎢G F X ⎥⎢ 0 ⎥ ⎢ 0 ⎥
⎢ 0 G0 P1 P1 ⎥ ⎢ λ0 ⎥ ⎢ −h0 ⎥
⎢ F T FF FX AF T F T ⎥⎢
⎢ P H H R G ⎥ ⎢ −v F ⎥ ⎢ F⎥
⎥⎢ 1 ⎥ ⎢ g1 ⎥
1 1 1 1 1
⎢ T T T T
⎥ ⎢−v X ⎥ ⎢ X⎥
X XF XX XX AX X
⎢ P H H I R G
⎢ 1 1 1 1 1 1
⎥⎢ 1 ⎥ ⎢ ⎥ g1 ⎥
⎥⎢ νX ⎥ = ⎢ ⎥
XX
⎢ I1
−b1X ⎥
⎢ ⎥⎢ 1 ⎥ ⎢
⎢ ⎥ ⎢ μA ⎥ ⎢ ⎥
⎥⎢ 1 ⎥ ⎢ −r ⎥
. A
⎢ R1AF R1AX
.
. ⎢ 1 ⎥
⎢ ⎥⎢
⎢ ⎥ ⎢ .. ⎥ ⎢ . ⎥
⎢ . ⎥⎢ . ⎥ ⎢ . ⎥
⎥ ⎢ . ⎥
⎢ G1F G1X
. F X ⎥⎢
⎢ . Pm Pm ⎥ ⎢ −v F ⎥

⎢ F⎥
⎢ g ⎥
⎢ F T FF FX AF T ⎥ ⎢ ⎥ ⎢ mX ⎥
⎢ Pm Hm Hm Rm ⎥⎢ m
⎢ X T X F X X X X T AX T ⎥ ⎢
−v m ⎥ ⎢
X⎥
gm ⎥
⎢ Pm Hm Hm Im Rm ⎥⎣ X⎦ ⎢ ⎣−bX ⎦

⎢ XX ⎥ ν m m
⎣ Im ⎦
AF AX
μAm −rmA
Rm Rm

X
Here, νiX ∈ n are the Lagrange multipliers of the active simple bounds. The set
superscripts A, F , and X denote the subsets of rows (first) and columns (second) of
the matrices, while an asterisk () indicates that all rows are chosen. 
7.2 Survey of Existing Methods 179

From system (7.7) we can already see that v iX can be easily determined.
Possible factorizations of the remainder of system (7.7) should exploit its
symmetry and block banded structure, and generate as little fill–in as pos-
sible outside the band of block matrices.

7.2 Survey of Existing Methods

In this section we survey existing structure exploiting methods for either


the preprocessing of QP (7.1) or for the factorization of the EQP’s KKT sys-
tem (7.3). We present condensing methods and Riccati recursion as block
structured techniques, and generic sparse approaches such as LB L T and LU
factorizations. All presented methods will be evaluated with regard to their
runtime complexity in terms of the number of control parameters nq and
the length m of the discretization grid. Both may be large in mixed–integer
Model Predictive Control (MPC) problems. Emphasis is put on the applica-
bility of the structure exploitation in conjunction with active set methods as
discussed in chapters 4 and 6. Where available, we mention representative
implementations of the presented techniques.

7.2.1 Condensing

Condensing algorithms for direct multiple shooting have been first de-
scribed by [34, 36, 162, 167] and later extended in e.g. [134, 191]. A detailed
description can be found in [132]. We start by reordering the unknown

v = (s0 , q0 , . . . , sm−1 , q m−1 , sm )

of QP (7.1) to separate the additionally introduced node values v2 from the


single shooting values v1 as follows,

def def
v1 = (s0 , q0 , . . . , q m−1 ), v2 = (s1 , . . . , sm ). (7.7)
180 7 Linear Algebra for Block Structured QPs

Assuming classical multiple shooting coupling matrices Pi = [ Pis ] = [ −I 0 ]


q
Pi
this yields for QP (7.1) the reordered constraints matrix
⎡ q

G0s G0 −I
⎢ ⎥
⎢ q
G1 G1s −I ⎥
⎢ ⎥
⎢ .. .. .. ⎥
⎢ . . . ⎥
⎢ ⎥
⎢ q
Gm−1 Gm−1 −I ⎥
s
⎢ ⎥
⎢ Rs Rq ⎥. (7.8)
⎢ 0 0 ⎥
⎢ q
R1 R1s ⎥
⎢ ⎥
⎢ . . ⎥
⎢ .. .. ⎥
⎢ ⎥
⎢ q
Rm−1 s
Rm−1 ⎥
⎣ ⎦
s
Rm

Here, superscripts s and q denote the subset of columns of the matrices be-
longing to the states and controls respectively. We may now use the negative
identity matrix blocks of the matching condition equalities as pivots to for-
mally eliminate the additionally introduced multiple shooting state values v2
from system (7.8), analogous to Gaussian elimination. From this elimination
procedure the dense constraint matrix
⎡ q

G0s G0 −I
⎢ s s q q ⎥
⎢ G 1 G0 G1s G0 G1 −I ⎥
⎢ ⎥
⎢ .. .. .. .. .. ⎥
⎢ . . . . . ⎥
  ⎢ m−1 ⎥

G −I def ⎢ Γ0 Γ 1 G0
m−1 q q
Γ2 G1 · · · Gm−1
m−1 q
−I ⎥
=⎢ ⎥ (7.9)
R q ⎥
⎢ R0s R0 ⎥
⎢ s s s q q ⎥
⎢ R 1 G0 R 1 G0 R1 ⎥
⎢ ⎥
⎢ .. .. .. .. ⎥
⎣ . . . . ⎦
q q q
s
Rm Γ0m−1 Rm
s
Γ1m−1 G0 Rm s
Γ2m−1 G1 · · · Rms
Gm−1

j
is obtained, with sensitivity matrix products Γi defined as

⎨ 1 Gs =
j
def
j def G sj · . . . · Gis if 0  i  j  m − 1,
Γi = l=i l (7.10)

I if i > j.
7.2 Survey of Existing Methods 181

From (7.9) we deduce that, after this elimination step, the transformed QP
in terms of the two parts v1 and v2 of the unknown reads
 T     T  
1 v1 H 11 H 12 v1 v g1
min T + 1 (7.11)
v1 ,v2 2 v2 H 12 H 22 v2 v2 g2
s. t. 0 = G v1 − I v2 − h,
0  Rv1 − r ,

wherein the Hessian blocks and the gradient are obtained by reordering
H and g . The right hand side vectors h and r are computed by applying
the Gaussian elimination steps to h and r . System (7.11) lends itself to the
elimination of the unknown v2 . By this step we arrive at the condensed QP

1
min v T H v1
2 1
+ v1T g (7.12)
v1

s. t. 0  Rv1 − r

with the following dense Hessian matrix and gradient obtained from substi-
tution of v2 in the objective of (7.11)

T T T
H = H 11 + H 12 G + G H 12 + G H 22 G, (7.13a)
T T T
g = g1 + G g 2 − 2(H 12 h + G H 22 h). (7.13b)

The matrix multiplications required for the computation of these values are
easily laid out to exploit the block structure of G and H , cf. [132]. The dense
QP (7.12) can be solved using one of the widely available numerical codes
for dense Quadratic Programming, such as QPOPT [86] or qpOASES [68]. In
addition, from the above elimination steps one easily recovers v2 from the
solution v1 of the condensed QP (7.12),

v2 = Gv1 − h. (7.14)

Implementations of condensing techniques can e.g. be found in the multiple


shooting code for optimal control MUSCOD-II [132, 134].

Remark 7.1 (Runtime Complexity of Condensing)


The computation of (7.9) and of H evidently takes O (m3 n3 ) operations, where
n = nx + nq . Hence condensing techniques are efficient for problems with short
horizons, i.e., small values of m. The resulting condensed QP (7.12) has nx + mnq un-
182 7 Linear Algebra for Block Structured QPs

knowns, which makes condensing techniques attractive for QPs with considerably
more states than control parameters, i.e., nq  nx .
Remark 7.2 (Variant for the Case of Many Controls)
If condensing methods are used at all for MIOCPs with nq > nx after outer con-
vexification, the computation of the chains of sensitivity matrices should at least be
rearranged to postpone the prolongations onto the control space as long as possible,
e.g.
# $ # #  q  $$
Γkj+1 G j = Gks · . . . · G sj+1 G j instead of Γkj+1 G j = Gks Gk+1
q q q s
. . . G sj+1 G j . . .

This usually is not the case for existing implementations of condensing methods,
which use the second formulation preferable in the case nq  nx .

For comparative studies, the above variant of condensing is realized in


the multiple shooting real–time online optimization method MuShROOM, see
appendix A and the numerical results in chapter 9.

Potentially Active Bounds Strategy

We have so far ignored simple bounds on the additionally introduced direct


multiple shooting states s1 , . . . , sm . Under the condensing elimination pro-
cedure, these become linear constraints depending on all predecessor node
states and controls. The computation of their Jacobians comes at the cost
of O (m2 n3 ) and their inclusion in the condensed QP would lead to an un-
necessarily large constraints dimension. In [133] it has therefore been pro-
posed to use a potentially active bounds strategy. In each Sequential Qua-
dratic Programming (SQP) iteration, the condensed quadratic subproblem is
solved without computing or including the condensed bounds on s1 , . . . , sm .
If the optimal solution after the blowup step is found to violate one of the
simple bounds – this test is fast –, only the condensed Jacobians for the vio-
lating simple state bounds are computed and the QP is resolved with the old
solution serving as a hot starting guess. The included bounds are remem-
bered for the subsequent SQP iterations, allowing the QP subproblems to
gradually grow as required to maintain feasibility of the multiple shooting
node states.

7.2.2 Riccati Recursion

The solution of QP (7.1) can be attacked in the framework of dynamic pro-


gramming, which leads to a Riccati recursion scheme. Our presentation can
7.2 Survey of Existing Methods 183

be found in [51] and we refer to [202, 176] for algorithmic variants and
further details.

Starting with the cost function

def
Φm (sm ) = 12 smT Hmss sm + smT gm (7.15)

for the last shooting node, the cost–to–go function for any node 0  i  m−1
is constructed from that of the successor node i + 1 as the solution of the
small QP in the following unknown v i = (si , q i )

1 T
min v Hi v i
2 i
+ v iT gi + Φi+1 (si+1 ) (7.16)
q i ,si+1

s. t. Gi v i + Pi+1 v i+1 = hi .

which yields for any given state si the optimal control choice q i minimizing
the cost–to–go to si+1 and recursively to the final node m. As the objective
function of the m − 1 QPs remains quadratic, this procedure is efficient.

In a backward sweep running in node i = m − 1 and running to the initial


node i = 0, the state vectors si+1 are eliminated using the matching condi-
tion. This allows to derive an analytic expression for the solution q i (si ) of
the small equality constrained QP (7.16), and thus for the cost to go func-
tions Φi (si ). The actual value s0 is the measured or estimated process state,
and needs to be known only after the backward sweep has been completed.
From s0 , the sequence of optimal control parameters q and the new state
trajectory values s can be determined. We refer to [51] for details on the
involved linear algebra operations.

Remark 7.3 (Applicability of Riccati recursion)


As Riccati recursion makes no provisions for treating inequality constraints, it can
either be applied to solve purely equality constrained QPs, or it can be used as a
KKT solver inside the active set loop by applying it to the equality constrained sub-
problem (EQP) for a given active set. Matrix update techniques are not applicable,
however, and the runtime complexity remains at O (mn3 ).

Riccati recursion techniques have primarily found application in interior


point methods, cf. [14, 102, 176, 177]. The dual active set code QPSchur
[12] applies related Schur complement techniques that allow for matrix up-
dates. In section 7.3 we present in detail a factorization related to Riccati
recursion. Matrix updates for this factorization are derived in chapter 8.
184 7 Linear Algebra for Block Structured QPs

7.2.3 Symmetric Indefinite Factorization

Direct methods for the solution of system (7.3) have gained increased inter-
est because arbitrary sparsity patterns of the KKT matrix to be factorized
can be exploited more easily. An appropriate choice for system (7.3) are
symmetric indefinite factorizations K = LBL T , where L is a lower triangu-
lar factor and B is a block diagonal matrix with 2 × 2 pivot blocks on the
diagonal that capture the indefiniteness of the KKT system [44, 158].

Symmetric indefinite factorizations have become the workhorses for most


interior point methods, e.g. [82, 212, 214, 215]. The drawback that usually
makes these factorizations ineffective for use in active set methods is the
lack of fast matrix updates procedures, cf. [129]. This means that the factors
L and B of the KKT matrix K cannot be recovered in a computationally
inexpensive way after an active set change, but have to be recomputed from
scratch.

The dense symmetric indefinite factorization code DSYTRF is available as


part of the publicly available Linear Algebra Package (LAPACK) [9]. Highly
efficient sparse codes are the multifrontal symmetric indefinite solvers MA27
[57] and MA57 [56] which are part of the Harwell Subroutine Library (HSL).

7.2.4 LU Factorization

LU factorization codes do not take advantage of the symmetry of the KKT


system, but provide facilities for matrix updates after active set changes.
Appropriate techniques can be found in [62, 220].

The banded dense LU factorization code DGBTRF is available as part of the


publicly available Linear Algebra Package (LAPACK) [9] and can exploit a
considerable part of the sparsity present in the multiple shooting structured
KKT system (7.3) for small sizes n and larger numbers m of the KKT blocks,
i.e., when the block banded matrix is nearly component–wise banded. If un-
symmetric pivoting is used, the bandwidth of the L factor cannot be bounded
and the factorization fills in, cf. [89].

Multifrontal LU factorizations exploting arbitrary sparsity patterns are


provided e.g. by the software package UMFPACK [50]. Matrix updates to
sparse factorizations tend to fill in over the course of a few active set
changes, then requiring recomputation of the LU decomposition from
7.3 A Factorization for Structured KKT Systems with Many Controls 185

scratch. This approach is explored in the code QPBLU for large–scale Quadra-
tic Programming by [108] and coworkers. Here, updates of the LU factor-
ization are computed using LUMOD, cf. [62] and also [220] for the underlying
elementary transformations.

7.3 A Factorization for Structured KKT Systems with


Many Controls

In this section we present a factorization of the KKT matrix of the direct


multiple shooting QP (7.6) that is particularly suitable for the case of many
control parameters. It works on the block structure of the KKT matrix, and
is free of fill–in effects. The approach to be presented is based on previous
work on a family of combined Hessian projection and Schur complement
reductions of the multiple shooting QP in [201, 202, 203]. Extension of these
works to tree–structured QPs can be found in [204]. The application of the
presented factorization to MIOCPs has been first shown in [119, 120].
We present the individual steps of this new factorization for one selected
shooting node indexed by i . The described steps have to be performed for
all nodes 0  i  m. To avoid having to specially treat the first (i = 0) and
last (i = m) shooting nodes, we define the following empty extra matrices
and vectors with appropriate dimensions,
def def def
P0 = 0, λ−1 = 0, λ̃−1 = 0,
def def def def
Gm = 0, Pm+1 = 0, hm = 0, λm = 0.

7.3.1 Fixed Variables Step

We start by solving in system (7.7) for the step of the subset v iX of the primal
unknowns v i fixed to their simple upper or lower bounds. This yields

IiX (−v iX ) = −biX (7.17)

which trivially reduces to v iX = biX . Hence, any fixed component of v i moves


exactly onto the bound it is fixed to. From the stationarity conditions for giX
in system (7.7) we may recover the bounds multipliers νiX once v i , λi−1 , λi ,
and μAi are known

T X T T
νiX = giX − RiAX μA
i − Gi λi − PiX λi−1 + HiX F v iF + HiX X v iX . (7.18)
186 7 Linear Algebra for Block Structured QPs

7.3.2 Hessian Projection Step

Assuming regularity of the current active set A(v), the number of active
decoupled point constraints does not exceed the number of free unknowns.
This allows us to perform a QR decomposition of the transpose of the de-
coupled point constraints matrix RiAF . We write this decomposition as a TQ
decomposition that is obtained from a QR decomposition by transposition
reversal of the order of columns of the QR factors,
   
RiAF Q i = 0 Ti , Q i = Zi Yi (7.19)

The orthogonal matrix Q i ∈ ni ×ni is separated into column orthogonal


v v

Y Z
bases Yi ∈ ni ×n and Zi ∈ ni ×n of the range space Y and the null space
v v

Y Y
Z of RiAF respectively. The matrix Ti ∈ n ×n is a southeast triangular fac-
tor. Accordingly, we partition the step of the free subset v iF of the primal
Y
unknowns v i into components v i and v iZ ,

v iF = Yi v iY + Zi v iZ . (7.20)

Using this relation to solve the primal feasibility condition for decoupled
point constraints in system (7.7) for the range space part of v iF yields

Ti v iY = riA − RiAX v iX (7.21)

which requires a backsolve with the southeast triangular factor Ti . We con-


tinue by projecting the remaining equations of system (7.7) onto the null
space of the free variables part RiAF of the decoupled point constraints by
Y
multiplication with YiT from the left. Substituting Yi v i for v iF in the station-
F
arity conditions for gi of system (7.7) we find

T T T
Yi T PiF λi−1 − Yi T HiF F Yi v iY − Yi T HiF F Zi v iZ + Yi T RiAF μA T F
i + Yi Gi λi
= Yi T giF + Yi T HiF X v iX (7.22)

from which we may recover the point constraint multipliers μA


i using a back-
solve with TiT once v iZ , λi−1 , and λi are known

 F T T 
TiT μA T
i = Yi gi + Hi v i + HiF X v iX − GiF λi − PiF λi−1 .
FF F
(7.23)

Y
Finally, substituting Yi v i +Zi v iZ for v iF in the matching conditions and Zi v iZ
for v iF in the stationarity conditions of system (7.7) we find
7.3 A Factorization for Structured KKT Systems with Many Controls 187

T T T
ZiT PiF λi−1 − ZiT HiF F Zi v iZ + ZiT RiAF μA T F
i + Zi Gi λi (7.24a)
= ZiT giF + ZiT HiF F Yi v iY + ZiT HiF X v iX ,
GiF Zi v iZ + Pi+1
F Z
Zi+1 v i+1 (7.24b)
= hi − GiF Yi v iY − GiX v iX − Pi+1
F Y
Yi+1 v i+1 − X X
Pi+1 v i+1 .

For further treatment of these equations in the Schur complement step to


follow, let us define null space projections as follows:

H̃i = ZiT HiF F Zi ,


def
(7.25a)

G̃i = GiF Zi ,
def

P̃i = PiF Zi ,
def

 
g̃i = ZiT giF + HiF F Yi v iY + HiF X v iX ,
def
(7.25b)

h̃i = hi − GiF Yi v iY − Pi+1


F Y
− GiX v iX − Pi+1
X X
def
Yi+1 v i+1 v i+1 . (7.25c)

With this notation, the system of equations (7.24a) reduces to

P̃iT λi−1 − H̃i v iZ + G̃iT λi = g̃i , (7.26a)


G̃i v iZ + Z
P̃i+1 v i+1 = h̃i . (7.26b)

The remaining system to be solved for v Z and λ can be put in matrix form,
⎡ ⎤⎡ ⎤ ⎡ ⎤
H̃0 G̃0T Z
⎢ ⎥ ⎢−v0 ⎥ ⎢ g̃0 ⎥
⎢ G̃0 P̃1 ⎥ ⎢ λ0 ⎥ ⎢ −h̃0 ⎥
⎢ ⎥⎢
⎢ P̃1T H̃1 G̃1T ⎥ ⎢−v Z ⎥ ⎢ ⎥
⎢ ⎥⎢ 1 ⎥ ⎢ g̃1 ⎥
⎢ .. ⎥ ⎢ λ ⎥ = ⎢ −h̃ ⎥
⎥ ⎢
⎥. (7.27)
⎢ G̃1 . ⎥⎢
⎥⎢ . ⎥ ⎢ 1⎥
1

⎢ .. ⎥ . ⎥ ⎢ .. ⎥
⎣ . P̃m ⎦ ⎣ . ⎦ ⎣ . ⎦
Z
P̃mT H̃m −v m g̃m

7.3.3 Schur Complement Step

Solving (7.26a) for the null space part v iZ of the free subset v iF of the primal
unknowns, we find
 
H̃i v iZ = P̃iT λi−1 + G̃iT λi − g̃i , (7.28)
188 7 Linear Algebra for Block Structured QPs

which yields v iZ , assuming knowledge of the matching condition duals λ.


Inserting this relation into (7.26b) and collecting for λi yields

G̃i H̃i−1 P̃iT λi−1 + (G̃i H̃i−1 G̃iT + P̃i+1 H̃i+1


−1 T −1 T
P̃i+1 )λi + P̃i+1 H̃i+1 G̃i+1 λi+1
= G̃i H̃i−1 g̃i + P̃i+1 H̃i+1
−1
g̃i+1 + h̃i . (7.29)

Assuming positive definiteness of the Hessian blocks Hi on the null space


Z of the active simple bounds and point constraints, we may employ a
Cholesky decomposition UiT Ui = H̃i of the projected Hessian. We define the
following symbols to simplify the notation of (7.29):

Ĝi = G̃i Ui−1 , P̂i = P̃i Ui−1 , ĝi = Ui−T g̃i ,


def def def
(7.30)
def def def
Ai = Ĝi ĜiT + P̂i+1 P̂i+1
T
, Bi = Ĝi P̂iT , a i = Ĝi ĝi + P̂i+1 ĝi+1 + h̃i .

With this, relation (7.28) for v iZ can be written as


 
Ui v iZ = P̂iT λi−1 + ĜiT λi − ĝi (7.31)

and (7.29) simplifies to

T
Bi λi−1 + Ai λi + Bi+1 λi+1 = a i (7.32)

which can be put in matrix form as


⎡ ⎤
A0 B1 T
⎢ ⎥
⎢ .. ⎥
⎢ B1 A1 . ⎥
⎢ ⎥ λ = a. (7.33)
⎢ .. ⎥
⎣ . Bm−1 T ⎦
Bm−1 Am−1

7.3.4 Block Tridiagonal Factorization and Backsolve

The linear system (7.33) is symmetric by construction and positive definite


under reasonable assumptions, see theorem 7.1 on page 196. It has block
tridiagonal shape and can be factorized by a tailored Cholesky decomposi-
tion [9] as follows. We may assume w.l.o.g. the following shape
 
V0 D1
V1,...,m−1
7.3 A Factorization for Structured KKT Systems with Many Controls 189

of the Cholesky factor of matrix (7.33). Here we have separated the upper
triangular diagonal block V0 ∈ n0 ×n0 and its off–diagonal block row D1 ∈
h h

n0 ×n1 from the Cholesky factor V1,...,m−1 of the remainder of the system.
h h

From this we obtain for system (7.33) the representation


    
V0T 0 V0 D1 V0T V0 V0T D1
= . (7.34)
D1T V1,...,m−1
T
0 V1,...,m−1 D1T V0 D1T D1 + V1,...,m−1
T
V1,...,m−1

This yields the identities

V0T V0 = A0 , V0T D1 = [ B1T 0 ... 0 ] , (7.35)

and the recursion

T
V1,...,m−1 V1,...,m−1 = A1,...,m−1 − D1T D1 . (7.36)

Observe now that the block column D1 consists of zero blocks except for
the single side–diagonal block entry V0−T B1T , and observe further that the
block product D1T D1 affects the block A1 of the remainder A1,...,m−1 of system
(7.33) only. Hence the block structure is carried over to the Cholesky factor,
which allows us to apply the presented identities to the subsequent blocks
1 to m − 1 as well. This is summarized in the following block tridiagonal
Cholesky decomposition procedure to be carried out in ascending order for
all nodes 0  i  m − 1:

ViT Vi = Ai , (7.37a)
 
ViT Di+1 = Bi+1 T
0 ... 0 if i  m − 2, (7.37b)
Ai+1 = Ai+1 − T
Di+1 Di+1 if i  m − 2. (7.37c)

Using this decomposition the solution of system (7.33) to find the vector λ of
matching condition duals is now straightforward according to the following
recurrence relation:

ViT λ̃i = a i − Di−1


T
λ̃i−1 0  i  m − 1, (7.38a)
Vi λi = λ̃i − Di λi+1 m − 1  i  0. (7.38b)
190 7 Linear Algebra for Block Structured QPs

7.3.5 Efficient Implementation

The arrangement and number of matrix and vector operations required


to compute the operations of the Hessian Projection Schur Complement
(HPSC) factorization and backsolve can be further improved, as detailed
in this section.
The performance of a literal implementation of the presented relations
suffers from two problems. First, hidden common subexpressions are not
exploited. Second and more significant, linear algebra operations on sub-
sets of the rows and columns of the involved matrices as selected by the
current active set result in widely inferior performance as highly efficient
Level 2 and Level 3 BLAS routines, e.g. available from the ATLAS library
[219], cannot be employed. To ameliorate this situation, we introduce inter-
mediates
 
ji,1 = Hi Yi v iY + v iX + gi ,
def
(7.39a)
def
ji,2 = ji,1 − PiT λi−1 − GiT λi , (7.39b)

Zi Ui−1 ,
def
Ji = (7.39c)

which can be computed efficiently. Precomputing (7.39c) additionally saves


two backsolves with Ui in the computation of the Schur complements Ĝi
and P̂i . Using these intermediate values, the right hand side of the block
tridiagonal system reads

def F
ĝi = JiT ji,1 , (7.40)
def
a i = Ĝi ĝi + P̂i+1 ĝi+1 + Gi v i + Pi+1 v i+1 − hi (7.41)

and the backsolve steps (7.18), (7.23), and (7.31) reduce to

Zi v iZ = Ji JiT ji,2
F
, (7.42a)
 
HiF F
Zi v iZ ,
def
ji,3 = ji,2 + (7.42b)
HiX F
TiT μA T F
i = Yi ji,3 , (7.42c)
X T
νi = ji,3 − RiAX μi . (7.42d)

with an additional intermediate term j3 . In (7.42b), indexed access to a sub-


set of the columns of Hi is required, but the accessed columns are con-
7.3 A Factorization for Structured KKT Systems with Many Controls 191

tinuous, allowing at least the use of Level 1 BLAS. Indexed linear algebra
operations on the subsets of the intermediates j1 , j2 , and j3 can be avoided
by copying the affected vector elements to continuous storage in only O (n)
additional memory access operations.
The HPSC factorization is given in algorithm 7.2. The described improved
backsolve with the factorization is summarized in algorithm 7.1. Both algo-
rithms are implemented in our structure exploiting QP code qpHPSC, see
appendix A.

7.3.6 Testing for Degeneracy and Boundedness

The tests for linear independence of the new active set and for positive
definiteness of the new Hessian, given in theorem 6.8, require a backsolve
with a special right hand side that has only a single nonzero block. In this
section we describe a tailored backsolve procedure for the degeneracy test.

Testing for Degeneracy

Testing for linear independence of the new active set requires a backsolve
with the following special right hand side:
1. If the constraint entering the active set is point constraint row k of
node j , we have for 0  i  m

RAj,k if i = j,
g = 0, h = 0, b = 0, ri = (7.43)
0 otherwise.

2. If the constraint entering the active set is a simple bound on variable


x k of node j , we have 0  i  m

ek if i = j,
g = 0, h = 0, r = 0, bi = (7.44)
0 otherwise.

As constraints only affect a single node in the block structured QP (7.4), the
block vector has a single nonzero block only. This property may be exploited
to speed up the linear independence test as follows.
Let a point constraint in node j become active, and let r j = RA
def
j,k denote
Y
the new constraint row k of RA X
j . We find v = 0 for all blocks, v i = 0 for all
192 7 Linear Algebra for Block Structured QPs

i = j , and v Y −1
j = T j r j . The intermediate terms introduced in section 7.3.5
simplify to

def H j Yj v Y
j + g j if i = j,
ji,1 = (7.45a)
0 otherwise,
def
ji,2 = ji,1 − PiT λi−1 + GiT λi . (7.45b)

For the block tridiagonal system’s right hand side we find



⎨0 if i < j − 1 or i > j,
Y
ai = P̂ j ĝ j + P F Y v
j j if i = j − 1, (7.46)
⎩ j
F Y
Ĝ j ĝ j + G j Y j v j if i = j.

The forward sweep then yields λ̃i = 0 for all i < j − 1, while we cannot
infer λi = 0 from any of the backward sweep steps. At this point no further
significant savings can be made.

If a simple bound on the unknown x k of node j becomes active, the new


constraint row to be tested is ek , 0  k  nx . We find v iX = 0 for all i = j , and
Y Y −1
vXj = ek . Further, v i = 0 for all i = j , and v j = −T j rk . Thus, we effectively
test for linear independence after adding the previously fixed column k of
the point constraints RiA of this node. The intermediate term ji,1 introduced
in section 7.3.5 simplifies to
  
def Hi Yi v iY + ek + gi if i = j,
ji,1 = (7.47)
0 otherwise.

With this, the argument continues as above.

Testing for Boundedness

The HPSC factorization does not allow for significant savings to be made
when testing for boundedness of the Parametric Quadratic Program (PQP)
after a constraint has left the active set.

In our implementation of the block structured parametric active set code


qpHPSC we assume the null space Hessian matrix blocks ZiT HiF F Zi to be
positive definite for all occurring active sets. Tests for positive definiteness,
7.3 A Factorization for Structured KKT Systems with Many Controls 193

i.e., for boundedness of the PQP are thus omitted. This is additionally jus-
tified by noting that in an MPC problem formulation, all system states and
control parameters typically reside in bounded domains.

Algorithm 7.1: The backsolve with the HPSC factorization.


input : HPSC factorization T , Y , Z, U, V, D ,
KKT system blocks H , G , P , RAX ,
KKT right hand side g , b, r , h.
output : KKT solution v , λ, μ, ν .
for i = 0 : m do
v iX = biX ;
 
v iF = Yi Ti \ ri − RiAX biX ;
j1 = Hi v i + gi ;
ĝi = ViT jiF ;
if i > 0 then λi−1 = Ĝi−1 ĝi−1 + P̂i ĝi + Gi−1 v i−1 + Pi v i − hi−1 ;
end
λ0 = V0T \λ0 ;
for i = 1 : m − 1 do 
λi = ViT \ λi − DiT λi−1 ;
end
λm−1 = Vm−1 \λm−1 ;
for i = m − 2 : 0 do
 
λi = Vi \ λi − Di+1 λi+1 ;
end
for i = 0 : m do
if i < m then j1 −= GiT λi ;
if i > 0 then j1 −= PiT λi−1 ;
ṽ iZ = Ji JiT j1F ;
v i += v iZ ;
j1 += [ HiF F HiX F ] T ṽ iZ ;
μAi
= TiT \YiT j1F ;
T
νi = j1X − RiAX μi ;
end
194 7 Linear Algebra for Block Structured QPs

Algorithm 7.2: The HPSC factorization for the multiple shooting EQP’s
KKT system.
input : KKT system blocks H F F , G F , P F , RAF .
output : HPSC factorization T , Y , Z, U, V, D .
for i = 0 : m do
T
[Ti , Yi , Zi ] = tq(RiAF );
Ui = chol(ZiT HiF F Zi );
Ji = Zi /Ui ;
if i < m then Ĝi = GiF Ji ;
if i > 0 then P̂i = PiF Ji ;
end
A0 = 0 ;
for i = 0 : m − 1 do
Ai += Ĝi ĜiT + P̂i+1 P̂i+1
T
;
Vi = chol(Ai );
if i < m − 1 then
Di+1 = ViT \P̂i+1 ĜiT ;
Ai+1 = −Di+1T
Di+1 ;
end
end

7.3.7 A Simplification based on Conjugacy

If the Hessian blocks HiF F are positive definite for all occuring active sets,
and the QP thus is strictly convex, a simplification of the presented fac-
torization and backsolve procedure can be derived based on conjugacy, cf.
[158].

Instead of computing a TQ decomposition of the constraints matrices Ri


as in section 7.3.2, the idea here is to compute a column orthogonal base Q i
of RiAF satisfying
 
Q iT HiF F Q i = I, RiAF Q i = 0 Ti . (7.48)

This means that the columns of Q i are additionally required to be conjugate


with respect to the Hessian block HiF F of the free variables. The matrix Q i
can be constructed easily from a TQ decomposition of Ri
 
RiAF Q̃ i = 0 T̃i (7.49)
7.4 Properties and Extensions 195

and a Cholesky decomposition of the symmetric positive definite product


Q̃ iT HiF F Q̃ i = Li LiT . Then (7.48) is satisfied with

Q i = Q̃ i L−T , Ti = T̃i L−T .


def def
(7.50)

Partitioning Q i into null–space and range–space column orthogonal bases Zi


and Yi as in section 7.3.2 we get the following identities to be exploited in
both the factorization and the backsolve steps:

ZiT HiF F Zi = I, ZiT HiF F Yi = 0, YiT HiF F Yi = I. (7.51)

The HPSC factorization simplifies as follows. In the Hessian projection


step we find

F
= HiF X v iX + gi , F
def def
H̃i = I, ji,1 g̃i = ZiT ji,1 . (7.52)

As the projected Hessian is the identity, the Schur complement step in-
cluding the Cholesky decomposition of the projected Hessian vanishes com-
pletely,

Ĝi = G̃i , P̂i = P̃i , ĝi = g̃i , (7.53)

and the block tridiagonal system factorization can proceed immediately.


An efficient implementation of the backsolve with the computed simplified
HPSC factorization differs from section 7.3.5 in

Zi v iZ = Zi ZiT ji,2
F
, (7.54a)

TiT μi = v iY F
+ YiT ji,2 , (7.54b)
X T
νi = ti,2 − RiX μi + HiX F Zi v iZ . (7.54c)

7.4 Properties and Extensions

In this section we investigate the applicability and numerical stability of the


presented HPSC factorization. Pivoting of the applied factorizations as well
as iterative refinement of the obtained solution are mentioned. A dynamic
programming interpretation of the HPSC factorization as given in [202] is
stated.
196 7 Linear Algebra for Block Structured QPs

7.4.1 Applicability

The following theorem shows that, given a KKT system with direct multiple
shooting block structure, the HPSC factorization is as widely applicable as
the popular null space method for solving the KKT system of a dense QP.

Theorem 7.1 (Applicability of the HPSC Factorization)


The HPSC factorization is applicable to a KKT system with

1. direct multiple shooting block structure,

2. linear independent active constraints (LICQ, definition 3.4),

3. positive definite Hessian on the null space of the active set. 

Proof Assumption (2.) implies regularity of the RiAF and thus existence of
the TQ decompositions. Assumption (3.) guarantees the existence of the
Cholesky decompositions of the projected Hessian blocks H̃i = ZiT HiF F Zi .
It remains to be shown that the block tridiagonal system (7.33) which we
denote by K is positive definite. To this end, observe that we have for (7.33)
the representation
⎡ ⎤
A0 B1T
⎢ ⎥
⎢ B1 A1 B2T ⎥
⎢ ⎥
K =⎢ .. ⎥ (7.55)
⎢ B2 A2 .⎥
⎣ ⎦
.. ..
. .
⎡ ⎤⎡ ⎤⎡ ⎤
G0 P1 GT
⎢ ⎥ ⎢H̃0 ⎥ ⎢ 0T ⎥
⎢ G1 P 2 ⎥⎢ H̃1 ⎥ ⎢ P1 G1T ⎥
⎢ ⎥
=⎢ .. ⎥ ⎢ ⎥⎢ ⎥
⎢ G2 . ⎥ ⎢ H̃2 ⎥⎢ P2T G2T ⎥
⎣ ⎦⎣ ..
⎦⎣
.. ..

. .. . . .
def
= M H̃ M T .

By assumption (3.) we have positive definiteness of all diagonal blocks H̃i of


H̃ and hence of H̃ itself, i.e., it holds that

∀w = 0 : w T H̃ w > 0. (7.56)

By assumption (2.) the matrix M of equality matching conditions has full


row rank and for all v = 0 it holds that w = M T v = 0. Hence
7.4 Properties and Extensions 197

T
∀v = 0 : (M T v ) H̃(M T v ) = v T (M H̃ M T )v = v T K v > 0 (7.57)

which is the condition for positive definiteness of the system K . This com-
pletes the proof. 

7.4.2 Uniqueness

We investigate the uniqueness of the HPSC factorization.


Theorem 7.2 (Uniqueness of the HPSC Factorization)
The HPSC factorization is unique up to the choice of the signs of the reverse diagonal
entries of the southeast triangular factors Ti , and up to the choice of the orthonormal
null space column basis vectors Zi . 

Proof The employed Cholesky factorizations are unique. Thus the unique-
ness properties of the initial block QR factorizations carry over to the HPSC
T
factorization. The thin TQ factorizations RiAF Yi = Ti are unique up to the
signs of the reverse diagonal elements of the Ti and the choice of Zi is free
subject to orthonormality of Q i = [ Zi Yi ]. For proofs of the uniqueness prop-
erties of Cholesky and QR factorizations we refer to e.g. [89]. 

7.4.3 Stability

In this section, we address the stability of the HPSC factorization. We are


interested in the propagation of roundoff errors in the gradient g and right
hand side (b, r , h) through the backsolve with a HPSC factorization to the
primal–dual step (v , λ, μ, ν ).
Like condensing methods and Riccati iterations, the HPSC factorization
fixes parts of the pivoting sequence, which may possibly lead to stability
problems for ill–conditioned KKT systems. The Mathematical Program with
Vanishing Constraints (MPVC) Lagrangian formalism introduced in chap-
ter 6 has been introduced specifically to eliminate the major source of ill–
conditioning in the targeted class of problems, QPs resulting from MIOCPs
treated by outer convexification. Furthermore, all employed factorizations
of the matrix blocks are stable under the assumptions of theorem 7.1. The
use of a Schur complement step in section 7.3.3 still mandates caution for
problems with ill–conditioned matching condition Jacobians. This may po-
tentially be the case for processes with highly nonlinear dynamics on dif-
ferent time scales. For the numerical results presented in chapter 9, no
198 7 Linear Algebra for Block Structured QPs

problems were observed after use of the MPVC Lagrangian formalism. In


the following we briefly mention iterative refinement and opportunities for
pivoting of the involved factorizations to improve the backsolve’s accuracy,
should the need arise.

Pivoting

Pivoting algorithms can be incorporated into the HPSC factorization in sev-


eral places to help with the issue of ill–conditioning. Possible extensions
include a pivoted QR decomposition of the point constraints,
T  
ΠRi RiAF Q i = 0 Ti . (7.58)

and a symmetrically pivoted block cholesky decomposition of the null space


Hessian
T
ΠH
i H̃i Πi = Ui Ui .
H T
(7.59)

We refer to [89] and the references found therein for details. The most
promising option probably is symmetric block pivoting of the block tridi-
agonal Cholesky decomposition of system (7.33). This last option requires
cheap condition estimates of the diagonal blocks Ai and can be shown to
produce at most one additional off-diagonal block in system (7.33).

Iterative Refinement

A different possibility to diminish the error in the KKT system’s solution


found using the backsolve algorithm 7.1 is to apply iterative refinement, cf.
[89]. This allows to increase the number of significant digits of the primal–
dual step from n to N · n at the expense of N − 1 additional backsolves with
the residuals. The procedure is given in algorithm 7.3. Iterative refinement
has been included in our implementation qpHPSC, see appendix A.

7.4.4 A Dynamic Programming Interpretation

In [202] a dynamic programming interpretation of system (7.1) is given as


shown in figure 7.1. The KKT factorization determines the unknowns (x i , u i )
on the range spaces of the point constraints defined by Ri , ei . The null space
7.4 Properties and Extensions 199

Algorithm 7.3: Iterative refinement of a backsolve with the HPSC fac-


torization.
input : HPSC factorization H = (T , Y , Z, U, V, D),
KKT system blocks K = (H, G, P, R),
KKT right hand side k = (g , b, r , h),
N
output : KKT solution v , λ, μ, ν .
[v, λ, μ, ν ] = 0;
δk = k ;
for i = 1 : N do
[v, λ, μ, ν ] += hpsc_backsolve(H, K, δk);
δk = kkt_multiply(H, [v , λ, μ, ν ]) − δk ;
end

part remains free and are defined as the result of optimization problems on
the manifolds
def
 u

Ni (x ) = u ∈ n | Rix x + Riu u = ei .

We further define the manifolds of feasible states under the mapping defined
by Gi , Pi+1 , hi ,
def
 x

Si (x i+1 , u i+1 ) = x ∈ n | ∃u ∈ N (x ) : Gix x + Giu u + Pi+1
x
x i+1 + Pi+1
u
u i+1 = hi ,

and the manifold of feasible controls for a given feasible initial state x i
alike,
def
 
Ui (x i , x i+1 , u i+1 ) = u ∈ N (x i ) | Gix x i + Giu u + Pi+1
x
x i+1 + Pi+1
u
u i+1 = hi .

For a given state x m−1 , the optimal control u m−1 , steering the process to
the terminal state x m ∈ Sm is now chosen according to Bellman’s principle
as minimizer of the objective ϕ
% &
u m−1 (x m−1 ) = argmin ϕm−1 (u, x m−1 , x m ) | u ∈ Um−1 (x m−1 , x m ) .
u

As can be seen, this control can be determined locally, i.e., without consid-
eration of the unknowns 0  i  m − 2, once we have found x m−1 . In the
same spirit, all further values can be found during a backward sweep start-
ing with i = m − 2 as solutions of local optimization problems depending on
200 7 Linear Algebra for Block Structured QPs

u0 u1

x1 x2 xm
x0 G0 , P1 , h0 G1 , P2 , h1 ...

R0 , e0 R1 , e1 Rm , e m

Figure 7.1: Dynamic programming interpretation of the HPSC factorization.

the preceeding state. For 0  i  m − 2 we have


% &
u i (x i ) = argmin ϕi (u, x i , x i+1 ) | u ∈ Ui (x i , x i+1 , u i+1 ) .
u

The initial state x 0 is finally found by minimizing over S0 , and determines all
other unknowns. In the case of Nonlinear Model Predictive Control (NMPC),
S0 only contains one element, the estimated or measured system state em-
bedded by the initial value embedding constraint.

7.5 Computational Complexity

In this section we investigate the computational effort in computing the


HPSC factorization and performing a backsolve to find the primal–dual step.

7.5.1 Floating–Point Operations

We investigate the runtime complexity of the HPSC factorization in terms


of the number of shooting nodes m, the number of control parameters nq
which may be high after application of outer convexification to a MIOCP,
and the number of states nx which is assumed to be reasonably small.
We denote for a single shooting node by n the sum nx +nq , by nF and nX the
numbers of free and fixed unknowns, by nR and nR A the total number and the
number of active point constraints, and finally by nZ and nY the dimensions
of the null space and the range space of the active point constraints. For the
purpose of complexity estimates, it obviously holds that nR A = n , n +n =
Y Z Y

n and n + n = n.
F F X
7.5 Computational Complexity 201

In the following, a Floating–Point Operation (FLOP) is understood to com-


prise a floating–point multiplication and addition at once. The exact number
of FLOPs spent in a numerical code is implementation dependent and may
vary by a constant factor, but not in complexity, from the numbers given
below. In all FLOP counts, we drop lower order terms that are independent
of the problem’s dimensions.

Cost of a Factorization

The QR decomposition of the transposed active point constraints Jacobians


RiAF takes nrA 2 (n − 13 nrA ) FLOPs, whereafter nY = nrA under rank assump-
tions. The particular case of MIOCPs with constraints treated by outer con-
vexification mandates discussion. We may assume nr = C nq vanishing con-
straints where C is a small constant, e.g. C = 2. Under MPVC–LICQ, at most
nrA = C of these can be active for each SOS1 set per shooting node, which
1
results in C 2 (n − C) ∈ O (n) FLOPs. The operation counts for all further
3
steps of algorithm 7.2 can be found in table 7.1. Overall, the runtime com-
plexity of the factorization is O (mn3 ) and in particular O (mn) + O (mn2 nx )
under MPVC–LICQ for MIOCPs treated by outer convexification.

Step FLOPs

QR decomposition C 2 (n − C3 )
Projected Hessian nZ nF (nZ + nF )
1 Z3
Cholesky decomposition
3
n
2
Temporary J1 nF nZ
Schur complements 2nx nF nZ
Tridiagonal blocks 2 nx 3
7 x3
Cholesky decomposition
3
n

Table 7.1: FLOP counts per shooting node for the HPSC factorization, algorithm 7.2.

Cost of a Backsolve

The operation counts for all steps of the backsolve algorithm 7.1 with the
HPSC factorization can be found in table 7.2. Overall, the computational
202 7 Linear Algebra for Block Structured QPs

effort is bounded by m(15n2 + O (n)). It is obvious that the computational ef-


fort crucially depends on the relative size of the range space and null space
of the active constraints as well as on the number of free and fixed un-
knowns. In table 7.3, upper bounds on the runtime complexity for different
assumptions on the active set’s dimensions nX and nY are listed.
The backsolve’s runtime complexity grows quadratically in the number
of states and controls. The growth rate is significantly lower for the de-
pendency on the number nq of control parameters. This is appropriate for
MIOCPs treated by outer convexification, which tend to have more control
parameters than differential states.

Step FLOPs

Fixed variables step —


2
Range space step nF nX + nY + nF nY + nY
Temporary j1 n2 + n
Temporary ĝ i nZ nF
Right hand side a i 2nx nZ + 2nx n + n
Matching condition multipliers 4nx 2 + nx
Temporary j2 2nx n
Null space step 2nZ nF
Temporary j3 nZ n
2
Point constraint multipliers n Y + nY n F
Simple bounds multipliers n n + nX
X Y

Table 7.2: FLOP counts per shooting node for a backsolve with the HPSC factoriza-
tion, algorithm 7.1.

The backsolve completes faster as more variables are fixed to at their


upper or lower bounds, i.e., as nX approaches n and nF approaches zero.
For MIOCPs treated by outer convexification, most control parameters will
be active at either bound, cf. also theorem 2.1. Note that the limit case
nx = n, nY = 0 violates Linear Independence Constraint Qualification (LICQ)
and allows further savings as we have λ = 0 for the matching conditions
multipliers. The FLOP bound in table 7.3 is put in parentheses. Concerning
point constraints in the case of MIOCPs treated by outer convexification, the
majority of constraints are likely of the vanishing constraint type and will
not enter the active set. The gains in the backsolve runtime for increasing
numbers of active constraints are small, though.
7.6 Summary 203

Active Set FLOP bound in terms of nx , nq

nX = 0, nY = 0 15nx 2 + 5nq 2 + 16nx nq


nX = 0, nY = 3n 13.9nx 2 + 4.6nq 2 + 14.4nx nq
nX = 3n , nY = 0 12.6nx 2 + 3.3nq 2 + 11.8nx nq
nX = 3n , nY = 3n 11.7nx 2 + 3nq 2 + 10.7nx nq
nX = n , nY = 0 (9nx 2 + nq 2 + 6nx nq )

Table 7.3: FLOP bounds for a backsolve with the HPSC factorization depending on
the active set. Lower order terms are dropped.

7.5.2 Memory Requirements

The memory requirements of the matrices and factors computed by the


HPSC factorization according to algorithm 7.2 can be found in table 7.4.
All matrices are allocated with their worst case dimensions such that re-
allocations during the active set iterations are not necessary. For simplic-
ity and as the dimension of the block local factors can be expected to be
small, triangular factors are held in square matrix storage where one half
of the storage space is never touched. The overall memory footprint of the
HPSC factorization is m(4n2 + 2nx n + 2nx 2 + O (n)) which is bounded by
m(8n2 + O(n)).

Matrix Ti Qi Ui Ji Ĝi P̂i Vi Di


Y F Z F x x x
rows n n n n n n n nx
columns nY nF nZ nZ nZ nZ nx nx
doubles allocated n2 n2 n2 n2 nx n nx n nx 2 nx 2

Table 7.4: Memory requirements per shooting node for the matrices and factors
computed by the HPSC factorization, algorithm 7.1.

7.6 Summary

In this section, we have examined in detail the block structure of the quadra-
tic subproblems induced by the multiple shooting discretization. We have
surveyed block structured algorithms for its solution, such as condensing
204 7 Linear Algebra for Block Structured QPs

that preprocesses the block structured QP into a smaller but dense one,
and Riccati iterations which can be derived by a dynamic programming ar-
gument. Factorizations of the QP’s KKT system that exploit arbitrary spar-
sity patterns, such as LDL T and LU decompositions, have been mentioned.
Examination of these menthods showed that they either are inappropriate
for OCPs with many control parameters, cannot easily be incorporated in
active set methods, or are likely to suffer from fill–in after a few iterations
of the active set method.
To address this issue, we have presented a new block structured factoriza-
tion of the QP’s KKT system that can for the case of MIOCPs be computed
efficiently in O (mn) + O (mn2 nx ) operations, and is thus ideally suited for
long horizons and problems with many control parameters. We have investi-
gated a computationally efficient implementation of this factorization in the
context of the parametric active set method for QPVCs of chapter 6 that has
been realized in our block structured QP code qpHPSC. We have derived a
simplification based on conjugacy applicable to problems with positive def-
inite Hessian. Memory requirements and floating point operations for all
parts of the factorization algorithm and the backsolve algorithm have been
presented in detail.
8 Matrix Updates for the Block Structured
Factorization

The ability to update the Karush–Kuhn–Tucker (KKT) system’s factorization


after addition or deletion of a constraint or simple bound is of vital impor-
tance for the efficiency of any active–set method, as described in section 6.3.
The Hessian Projection Schur Complement (HPSC) factorization of the KKT
system introduced in the previous chapter combines block local TQ decom-
positions, Cholesky decompositions, and Schur complements. A block tridi-
agonal Cholesky decomposition of the remaining symmetric positive definite
system completes the factorization. In [201, 202, 203] a closely related fac-
torization was used in an interior–point method. These methods typically
perform few but expensive iterations using a modification of the KKT sys-
tem of the entire Quadratic Program’s in each iteration, and thus by design
do not require matrix updates.
In this chapter we show how established matrix update techniques, also
referred to as basis repair techniques, can be transferred from dense ma-
trices and active–set methods to the block structure of the KKT system of
direct multiple shooting Quadratic Programs (QPs) and to the HPSC factor-
ization. The aim is to make the HPSC factorization applicable for use in a
fast block structured active–set method. We derive matrix updates for all
four cases of active set changes, namely adding or deleting a simple bound
and for adding or deleting a point constraint. These update techniques allow
to infer a factorization of the KKT matrix from the preceding one after the
active set has changed. Using these updates we design a block structured
active set method that computes the feedback control parameters with a
run time complexity of only O (mn2 ) after an initial factorization has been
computed.

8.1 Matrix Updates Overview

Techniques for updating the factorizations of matrices with various proper-


ties have been studied for many years, and a multitude of updates tailored

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8_9,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
206 8 Updates for the Block Structured Factorization

to special situations have been developed. A good overview over QR and


Cholesky techniques is already found in [83]. In this section we briefly in-
troduce the fundamental ideas behind some selected techniques to promote
an initial understanding of the matrix updates issue. We mention Givens
plane rotations and orthogonal eliminations as an important tool to modify
the pattern of nonzero entries of an arbitrary matrix in a numerically sta-
ble way. They will be used throughout this chapter in order to restore the
triangular shape of certain matrix factors.

8.1.1 Existing Techniques

In this section we briefly present the principal ideas behind selected ex-
isting matrix updates for Cholesky and QR factorizations to familiarize the
reader with the issues and techniques of updating matrix factors. We refer
to [83] for proofs of correctness and details on numerical stability, alterna-
tive approaches, and a comparison of their computational effort.

Appending a Row and Column to a Cholesky Factorization

A Cholesky factorization A = R T R of a symmetric positive definite matrix A


can be updated after adding a row and column to A,
      
A a RT 0 R r RT R RT r
= = . (8.1)
aT α rT  0T  r T R r T r + 2

From this relation we easily determine expressions for the new column en-
tries r and  of the updated Cholesky factor,

r = R−T a, (8.2)
1
T
 = (α − r r ) . 2

Positive definiteness of A is maintained only if α > r T r . From (8.1) it can


also be seen that removing the last row and column of A is virtually free as
the Cholesky factor R simply looses the last row and column as well.

Rank 1 Modifications of a Cholesky Factorization

Another frequently needed modification of Cholesky factorization is a rank


one modification A ± α · aa T , α > 0 to the entire symmetric positive definite
8.1 Matrix Updates Overview 207

matrix. This modification is called an update if the dyadic product is added,


and a downdate if it is subtracted. For a rank one update, the identity
 
 1
 α 12 a T
α a R
2
T = R T R + αaa T (8.3)
R

provides factors of the updated matrix which are rectangular and whose
pattern of nonzero entries does not show upper triangular shape. Orthog-
onal eliminations can be used to restore the shape and yield an updated
Cholesky factor. A downdate can be realized by observing
    
rT  r R α aT
= (8.4)
RT 0  0 a RT R

wherein the entries r and  of the first column of the extended factor are
chosen as in (8.2). The extended factor is specifically constructed to allow
the use of orthogonal eliminations for the transformation of the factors on
the left hand side to the new shape
 1    
0T α 2 0 R α αa T
1 1 1 = T  (8.5)
R T α 2 a α 2 α 2 aT αa R R + αaa T

which yields the new Cholesky factor R satisfying the desired identity
R T R = R T R − αaa T . Positive definiteness is again maintained only if
α > rT r.

Appending a Row to a QR Factorization

For the QR factorization we start by discussing the addition of a row to the


matrix A ∈ m×n with m  n and full column rank. We can easily extend the
QR factorization of A to include the new row a T ,
⎡ ⎤
    R
A Q1 Q2 0 ⎢ ⎥
= ⎣ 0 ⎦. (8.6)
aT 0T 0T 1
aT

Orthogonality of the new matrix Q is obviously maintained, and we can


again apply orthogonal eliminations to obtain the upper triangular factor R
and clear the row a T in the null space block below. Deleting an arbitrary row
208 8 Updates for the Block Structured Factorization

is possible for example by reversal of this process. The row of Q in question


is transformed to the unit vector en by applying orthogonal eliminations,
and the triangular shape of R is restored by the same means after removal
of the row.

Appending a Column to a QR Factorization

The addition of a column a to the matrix A ∈ m×n with m  n and full


column rank of the extended matrix [ A a ] is possible by observing
⎡ ⎤
   ⎢ R r⎥
A a = Q1 Q2 ⎣0 T  ⎦ (8.7)
0 0

where Q1 has gained a row from Q2 . This allows to compute the new ele-
ments r and  of the triangular factor by exploiting orthogonality of Q to
find
 
r
Q1 a
T
= . (8.8)


Deleting an arbitrary column from A destroys the triangular shape of the


factor R after its corresponding column has been deleted. The shape can
again be restored by applying orthogonal eliminations to Q and R.

8.1.2 Orthogonal Eliminations

As seen in the previous section, orthogonal eliminations realized by Givens


plane rotations are an important tool used to modify the pattern of nonzero
elements in matrix factors. They play a central role in the construction of
updated matrix factors from existing ones.

Definition 8.1 (Givens Matrix)


For a given angle ϕ ∈ [0, 2π) and indices i, j with 1  i < j  n, the Givens matrix
j
Oi (ϕ) ∈ n×n is defined as
8.1 Matrix Updates Overview 209

⎡ ⎤
Ii−1
⎢ ⎥
⎢ cos ϕ sin ϕ ⎥
⎢ ⎥
=⎢ ⎥.
j def
Oi (ϕ) ⎢ I j−i−1 ⎥ (8.9)
⎢ − sin ϕ cos ϕ ⎥ 
⎣ ⎦
In− j

j j
Multiplication of Oi with a vector from the right (Oi v ) represents a clock-
wise rotation of the (i, j) plane by the angle ϕ , while multiplication from
j
the left ( v T Oi ) represents a counterclockwise rotation in a standard right–
handed coordinate system. Givens matrices can be constructed to zero out
a single element of a vector by modifying another single element only.
j
Definition 8.2 (Orthogonal Eliminations Oi )
j
The orthogonal elimination matrix Oi (v ) ∈ n×n , 1  i, j  n, i = j for a vector
v ∈ n is defined element–wise as

vi / if (k, l) = (i, i) ∨ (k, l) = ( j, j),



 j  def ⎨ j /
v if (k, l) = (i, j),
Oi (v ) kl = −v j / if (k, l) = ( j, i), (8.10)



⎩1 if k = l ∧ k = i ∧ k = j,
0 otherwise,

def

with  = vi2 + v 2j . 

From the above definition it can be seen that orthogonal elimination ma-
trices can actually be constructed without the need to evaluate trigonomet-
ric functions in order to compute the angle ϕ . The following lemma formally
states the properties of orthogonal elimination matrices.

Lemma 8.1 (Identities for the Orthogonal Eliminations)


j
The orthogonal elimination matrix Oi (v ) of definition 8.2 satisfies the following iden-
tities:
j j T
1. Orthogonality: Oi (v )Oi (v ) = I .
j
 
2. Modification of element i : Oi (v )v i =  .
 j 
3. Elimination of element j : Oi (v )v = 0.
j
 j

4. All elements except i and j remain unmodified: Oi (v)v = vk , k = i, k = j .
k

Proof Easily verified by direct calculation. 


210 8 Updates for the Block Structured Factorization

j
In particular, the multiplication from the left Oi A applies the Givens rota-
jT
tion to all columns of A, while the multiplication from the right AOi applies
it to all rows of A. Algorithm 8.1 is an exemplary way of computing and
storing an orthogonal elimination that eliminates v j by modifying vi . It re-
quires four multiplications and a square root. In [89, 99] details on the fast
and numerically stable computation of orthogonal elimination matrices can
be found that improve algorithm 8.1 and are used in our implementation
qpHPSC.

Algorithm 8.1: Computing and storing an orthogonal elimination ma-


trix.
input : v ∈ m , i , j
 : c, s
output
 = vi2 + v 2j ;
c = vi / ;
s = v j / ;

Orthogonal eliminations can be applied to all rows or columns of a matrix


A ∈ m×n in only 4mn multiplications by exploiting their special structure.
Algorithm 8.2 exemplarily shows how an orthogonal elimination can be ap-
plied to all columns of a matrix. A row–wise version of this algorithm is
easily derived. Alternatively, algorithm 8.2 can be applied to A T and then
also yields the transpose of the desired result. In [99], a more elaborate
storage and multiplication scheme is discussed that requires only 3mn mul-
tiplications.

Algorithm 8.2: Orthogonal elimination in all columns of a matrix.


input : A ∈ m×n , c , s, i , j
j
output : A = Oi (v )A
for k = 1 : n do
a = Aik ;
b = A jk ;
Aik = ac + bs;
A jk = bc − as;
end
8.2 Updating the Block Local Reductions 211

8.1.3 Applications

For dense active set range space and null space methods it is known that a
sequence of a QR decomposition and a Cholesky decomposition can be up-
dated properly after active set changes. A description of the necessary steps
for a dense null space active set method can be found e.g. in [67, 158]. Up-
date techniques for the LU factorization can be found in [62] and are used
in an active set method in [108], but are not relevant for the HPSC factor-
ization. Schur complement updates are used in a dual active set method by
[12] that assumes a block diagonal Hessian.

8.2 Updating the Block Local Reductions

In this section, we derive matrix updates for the block local reductions of the
HPSC factorization for all four cases of active set changes. The first steps
of the matrix updates concerning the TQ decomposition and the Cholesky
decomposition of the null space Hessian are known from the dense null
space method, cf. [158] and the description of an actual implementation
in [67]. The extensions to the Schur complement step and the block tridi-
agonal Cholesky decomposition are new contributions and have first been
published in [121]. Matrix updates for the block tridiagonal Cholesky de-
composition of the reduced symmetric positive definite system (7.33) are
treated in the next section.

8.2.1 Preliminaries

Notation

In the following, we denote by the list of matrices

def
K(A) = (H, R, G, P)

the block structured KKT system 7.7 on page 178 for a given active set A.
We further denote by the list of matrices

def
H(A) = (T , Z, Y , U, Ĝ, P̂, V, D)
212 8 Updates for the Block Structured Factorization

an associated HPSC factorization of the block structured KKT system K(A).


We further distinguish by an asterisk ( ) a factorization or matrix after the
update from its counterpart before the update.

Permutations

We are concerned with modifications of the HPSC factorization of chapter 7


after a permutation of the vector of unknowns. Such permutations will allow
us to make assumptions about the index position of the unknown affected
by a matrix update.
Theorem 8.1 (HPSC Factorization after Permutation of the Unknowns)
Let H be a HPSC factorization of the block structured KKT system K(A) =
F ×nF 
be permutation matrices such that x iF = Πi x iF
def
(H, R, G, P). Further, let Πi ∈ ni i

are the permuted vectors of free unknowns. Then a HPSC factorization H of the
permuted KKT system K (A) is given by

Yi = Πi Yi , Zi = Πi Zi ,
def def
(8.11)

while the matrices T  , U  , Ĝ  , P̂  , V  and D  of the new factorization H are identical


to those of the old one H. 

Proof We first consider the block matrix entries of the permuted KKT sys-
tem K . For invariance of the KKT system under the permutations Πi of the
free unknowns x iF , it holds that

  
RiAF = RiAF ΠiT , =⇒ RiAF x iF = RiAF ΠiT Πi x iF = RiAF x iF ,
  
GiF = GiF ΠiT , =⇒ GiF x iF = GiF ΠiT Πi x iF = GiF x iF ,
  
PiF = PiF ΠiT , =⇒ PiF x iF = PiF ΠiT Πi x iF = PiF x iF ,
 T   T
HiF F = Πi HiF F ΠiT , =⇒ x iF HiF F x iF = x iF ΠiT ΠHiF F ΠiT Πi x iF
T
= x iF HiF F x iF .

For the first step of the HPSC factorization, the block local TQ factorizations
of the free unknowns part of the active point constraints’ Jacobians RiAF ,
observe
     
0 Ti = RiAF Zi Yi = RiAF ΠiT Πi Zi Yi (8.12)
- ./ 0
=I
      
= RiAF Πi Zi Πi Yi = RiAF Zi Yi = 0 Ti ,
8.2 Updating the Block Local Reductions 213

which proves the relations (8.11) for Yi , Zi and invariance of the southest
triangular factor Ti = Ti . For the Cholesky factors Ui of the projected Hes-
sians H̃i , we find

Ui Ui = Zi HiF F Zi = ZiT ΠiT (Πi HiF F ΠiT )Πi Zi = ZiT HiF F Zi = UiT Ui ,
T T
- ./ 0 - ./ 0
=I =I
(8.13)

hence the Cholesky factors Ui of the permuted KKT system’s HPSC factor-
ization are identical to the factors Ui of the original one. The Schur comple-
ments Ĝi and P̂i are unaffected as well,

 
Ĝi = GiF Zi Ui−1 = (GiF ΠiT )Πi Zi Ui−1 = GiF Zi Ui−1 = Ĝi ,
def
(8.14)
- ./ 0
=I
 
P̂i PiF Zi Ui−1 (PiF Zi Ui−1 = PiF Zi Ui−1 = P̂i .
def
= = ΠiT )Πi
- ./ 0
=I

This evidently carries over to the blocks Ai and Bi of the positive definite
block tridiagonal system (7.33) on page 188,

T T T T
Ai = Ĝi Ĝi + P̂i P̂i = Ĝi Ĝi + P̂i P̂i = Ai ,
def
(8.15)
T T
Bi = Ĝi P̂i = Ĝi P̂i = Bi ,
def

and hence also to the Cholesky factor blocks Vi , Di of this system. This
completes the proof. 

Note finally that permutations of the fixed part v iX of the unknowns do not
affect the factorization. The Lagrange multipliers νiX of the active simple
bounds must be permuted accordingly.

Projectors

We will frequently need to remove the last row or column of a matrix, re-
flecting the fact that the number of free unknowns, or the size of the range
space or null space of a TQ decomposition has decreased by one. To this
end, we introduce the projector I that serves to cut a column or a row off a
matrix A, and give a proof of two useful properties of this projector.
214 8 Updates for the Block Structured Factorization

Definition 8.3 (Projector I)


Let A ∈ m×n be an arbitrary matrix. The column cutting projection AI and the row
cutting projection I T A are defined as
 
def In−1 def
 
I= ∈ n×n−1 , I T = Im−1 0 ∈ m−1×m . (8.16)
0T


Lemma 8.2 (Identities for the Projectors)


The projector I of definition 8.3 satisfies the following identities.
 
1. For all A = Ã a ∈ m×n it holds that AI = Ã ∈ m×n−1 , i.e., the matrix A
looses the last column.
 
à T
2. For all A = T
∈ n×m it holds that I T A T = Ã ∈ m−1×n , i.e., the matrix A
aT
looses the last row.

3. For regular triangular A ∈ n×n it holds that if I T AI is regular then


 T −1
I AI = I T A−1 I.
4. For O ∈ O (n, ) it holds O II T O T = I − oo T where o is the last column of O .

Proof Identities 1. and 2. are easily verified by direct calculation. To prove


3. we write
   
à a1 −1 def B̃ b1
A= , A =B=
a2T a3 b2T b3

such that I T AI = Ã and I T A−1 I = B̃. For the inverse we have the defining
relation AB = I , implying ÃB̃ + a1 b2T = I and Ã−1 = B̃ holds iff a1 = 0
or b2 = 0. This includes, but is not limited to, the case of lower or upper
triangular matrices A, as claimed. Finally to prove 4. we let O = [ Õ o ] such
that O I = Õ and find

I = OO T = Õ Õ T + oo T = O II T O T + oo T . 

Algorithms

In the following, all matrix updates are also summarized in the form of al-
gorithms, on which we have several remarks to be made concerning their
presentation and efficiency.
8.2 Updating the Block Local Reductions 215

We make use of a function givens(v , i, j) that computes a Givens rotation


eliminating v j by modifying vi , and a function apply(L, s, c, i, j) that applies
a Givens rotation defined by s, c to the elements i and j of all rows of a given
list L of matrices. Any extra checks required for the first node i = 1 and the
last node i = m have been omitted for clarity of exposition. The numbers nF ,
nY , and nZ are understood to refer to the dimensions prior to the active set
change. In the same spirit, all KKT blocks refer to the KKT matrix associated
with the active set prior to the update.
Truly efficient implementations require some further modifications that
have been excluded in order to improve readability. For example, one would
frequently make use of a temporary rolling column to avoid having to en-
large certain matrices prior to applying a sequence of Givens rotations. Also,
the eliminations of those elements that define the Givens rotations would be
applied already during computation of the Givens rotation in order to guar-
antee exact zeros in the eliminated components. These improvements are
realized in our implementation qpHPSC. The runtime complexity bound of
O(mn2 ) is still satisfied by all simplified algorithms.

8.2.2 Adding a Simple Bound

If a simple bound viFj = bi j becomes active, we may assume w.l.o.g. that the
unknown to be fixed is the last component j = nF F
i of v i . This can be ensured
by applying a suitable permutation to the unknown v iF and the matrix Q i ,
cf. theorem 8.1. In the following theorem we show how to restore the block
local reductions of a HPSC factorization for the new KKT matrix with active
simple bound on viFj .

Theorem 8.2 (Adding a Simple Bound to the Block Local Reductions)


Let H(A) be a HPSC factorization of the KKT system K(A). Let the simple bound
vi j = bi j on the last free component j = nF
i
of the unknown of node 0  i  m be
inactive in A, and denote by A the otherwise identical active set with activated
simple bound. Assume further that A satisfies Linear Independence Constraint
Qualification (LICQ). Then there exists a HPSC factorization H (A ) of the KKT ma-
trix K (A ) that satisfies

Qi = I T Q i OZT I, Ti = Ti OT I, (8.17a)


Ui= I OU Ui OZ I,
T
(8.17b)
   
Ĝi ĝ = Ĝi OUT , P̂i p̂ = P̂i OUT , (8.17c)

Ai−1 = Ai−1 − p̂ p̂ ,
T
Ai = Ai − ĝ ĝ ,
T
Bi = Bi − ĝ p̂ T
(8.17d)
216 8 Updates for the Block Structured Factorization

where OZT with subsequences OZ and OT , and OU are appropriately chosen se-
quences of Givens rotations. 

Proof We first consider relation (8.17a) for the TQ factorization matri-


ces Zi , Yi , and Ti . We add the simple bound’s constraint row vector
e = (0, . . . , 0, 1) to the extended constraints matrix of node i , comprising
the simple bounds and the decoupled point constraints
⎡ ⎤ ⎡ T T ⎤
eT 0T   tZ tY
⎢ ⎥ Z Y ⎢ ⎥
⎣ 0 IiX ⎦ i i X = ⎣ IiX ⎦ . (8.18)
AF AX Ii AX
Ri Ri Ti Ri

def def def


Herein, t T = e T Q i , i.e., tZT = e T Zi and tYT = e T Yi . The right hand side of
(8.18) has lost the southeast triangular shape present in Ti , hence (8.18)

does not yet provide a proper TQ factorization of RiAF . In order to restore
this shape we eliminate the elements of t using a sequence OZ OT of nF i −1
Givens rotations
T T Z T
OZ = O21 O32 · . . . · OnnZ −1 ,
def
(8.19)
Z T T F T
OnnF −1 ,
def
OT = OnnZ +1 O32 · ... ·
 
def OZ
OZT = OT ,
I

that serve to transform t T = (tZT , tYT ) into the unit row vector e T ,
⎡ ⎤ ⎡ T T ⎤
t T
t T   0 0 1  

⎢ Z Y ⎥ OZT ⎢ IiX
⎢ X ⎥ X ⎥ def
⎣ Ii ⎦ =⎣ Ii ⎦ =  .
I 0 Ti RiAX
0 Ti RiAX Ti r RiAX

The last nF Z
i − n rotations of the sequence OT introduce a reverse subdiago-
nal into Ti . By shifting Ti to the left we obtain the new TQ factor Ti and the
null space dimension shrinks by one. The remaining column r belongs the
now fixed component vi j of the unknown and enters RiAX to form the new

fixed part of the active point constraints matrix RiAX . Having applied the
Givens rotations to the right hand side of (8.18) we do so in the same way
for the left hand side to recover equality and find the new null space and
range space bases Zi and Yi ,
8.2 Updating the Block Local Reductions 217

⎡ ⎤
   Zi y Y 0  
Zi Yi OZT ⎢ ⎥ def Zi Yi
=⎣ 0 0 1 ⎦=  .
IiX I IiX
IiX
(8.20)

This yields the identity


 
Zi Yi = Qi = I T Q i OZT I, (8.21)

which proves the relations (8.17a) for the TQ factorization matrices Zi , Yi ,
and Ti .
We next consider the reduced Hessian’s Cholesky factor Ui (8.17b). We
have separated the first nZ − 1 rotations of the sequence OZT as they affect
the new null space basis matrix Zi only, such that (8.21) can be for the new
null space basis Zi as

Zi = I T Zi OZ I. (8.22)

The projected Hessian’s new Cholesky factor Ui is found from


Ui Ui = Zi HiF F Zi = I T OZT ZiT I(I T HiF F I)I T Zi OZ I
T T
(8.23)
   
I 0 I 0
= I T OZT ZiT HiF F Z O I.
0 0
T
0T 0 i Z

Apparently the terms II T obstruct the reuse of the existing Cholesky fac-
torization ZiT HiF F Zi = UiT Ui . Observe now that the last row of the matrix
Zi OZ I is zero as can be seen from (8.20) and is cut off in the definition of
Zi in (8.22). We may therefore replace the terms II T in (8.23) by I without
impacting equality and find

Ui Ui = Zi HiF F Zi = I T OZT ZiT HiF F Zi OZ I
T T
(8.24)
T
=I T
OZT UiT Ui OZ I = (Ui OZ I) Ui OZ I.

Hence the new factor would be Ui OZ I which is no longer a Cholesky factor


as it is non–square and has an additional subdiagonal of nonzero elements
introduced by OZ . The upper triangular shape is restored by a second se-
quence of nZ − 1 Givens rotations denoted by OU ,

Z
OU = OnnZ −1 · . . . · O32 O21 ,
def
(8.25)
218 8 Updates for the Block Structured Factorization

and constructed to eliminate each subdiagonal element in Ui OZ I using the


diagonal element located directly above. The last row becomes zero and is

cut off, which yields the Cholesky factor Ui of Zi HiF F Zi ,
T

Ui = I T OU Ui OZ I. (8.26)

This proves relation (8.17b) for the Cholesky factor Ui of the reduced Hes-

sian HiF F .
The updates (8.17c) to the projected sensitivity matrices Ĝi and P̂i can be
computed constructively from Zi and Ui as

 −1
  −1
Ĝi = GiF Zi Ui = GiF I I T Zi OZ I I T OU Ui OZ I (8.27)
 −1
= GiF (II T )Zi OZ I I T OU Ui OZ I

which by replacing again the first occurrence of II T by I becomes

 −1
= GiF Zi OZ I I T OU Ui OZ I (8.28)

and according to 3. in lemma 8.2 becomes,

 −1
= GiF Zi OZ II T OU Ui OZ I (8.29)
 
F −1 T
= Gi Zi OZ II OZ Ui OU I
T T

def
and with 4. in lemma 8.2, letting z = (OZ )[:,nZ ] , this becomes

 
= GiF Zi I − z z T Ui−1 OUT I (8.30)
   
= GiF Zi Ui−1 OUT I − GiF Zi z z T Ui−1 OUT I
 
= Ĝi OUT I − GiF Zi z z T Ui−1 OUT I .

Consider now that z T Ui−1 OU


T
is the last row of the inverse of the updated
upper triangular factor OU Ui OZ . This row is zero by construction of OU ,
except for the last element which is cut off, hence

Ĝi = Ĝi OUT I. (8.31)

The corresponding relation P̂i = P̂i OU


T
I is shown in exactly the same way.
8.2 Updating the Block Local Reductions 219

This finally proves the claimed relations (8.17c). For the tridiagonal system
blocks Ai−1 , Ai and Bi in (8.17d) affected by the updates to Ĝi and P̂i we
find constructively that

T
 T
Ai = Ĝi Ĝi + P̂i+1 P̂i+1
T
= Ĝi ORT I Ĝi OUT I + P̂i+1 P̂i+1
T
(8.32)
 
= Ĝi OUT II T OU ĜiT + P̂i+1 P̂i+1
T

def
which again by 4. in lemma 8.2 and u T = (OU )[nZ ,:] is

 
= Ĝi I − u u T ĜiT + P̂i+1 P̂i+1
T
(8.33)
T
= Ĝi ĜiT − (Ĝi u)(Ĝi u) + P̂i+1 P̂i+1
T

T
= Ai − (Ĝi u)(Ĝi u)
def
= Ai − ĝ ĝ T , ĝ = Ĝi u.

By the same argument we find

Ai−1 = Ai−1 − p̂ p̂ T , Bi = Bi − ĝ p̂ T .


def
p̂ = P̂i u, (8.34)

This proves the relations (8.17d) for the tridiagonal system blocks Ai−1 , Ai ,
and Bi . 

The resulting factorization update procedure is summarized in in algo-


rithm 8.3 on page 227. The modifications to A and B of system (7.7) take
the form of an subtraction of a dyadic product from a 2 × 2 subblock as can
be seen by writing

⎡ ⎤ ⎡ ⎤
.. .. .. .. ⎡ ⎤ ⎡ ⎤T
⎢ . . ⎥ ⎢ . . ⎥ . .
⎢ ⎥ ⎢ ⎥ ⎢ .. ⎥ ⎢ .. ⎥
⎢. .  ⎥ ⎢. . ⎥ ⎢ ⎥ ⎢ ⎥
⎢ . Ai−2 Bi−1
 T ⎥ ⎢ . Ai−2 Bi−1 T ⎥ ⎢0⎥ ⎢0⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ B  A B  T ⎥ ⎢ Bi−1 Ai−1 Bi T ⎥ ⎢ p̂ ⎥ ⎢ p̂ ⎥
⎢ i−1 i−1 i ⎥=⎢ ⎥+⎢ ⎥·⎢ ⎥ .
⎢ Bi Ai Bi+1 T ⎥ ⎢ Bi Ai Bi+1 T ⎥ ⎢ ĝ ⎥ ⎢ ĝ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ .. ⎥ ⎢ .. ⎥ ⎢0⎥ ⎢0⎥
⎢ .⎥ ⎢ .⎥ ⎢ ⎥ ⎢ ⎥
⎢ Bi+1 Ai+1 ⎥ ⎢ Bi+1 Ai+1 ⎥ ⎣.⎦ ⎣.⎦
⎣ .. ..
⎦ ⎣ .. .
⎦ . .
.. . .
. . .

A suitable downdate to the block tridiagonal Cholesky factorization is de-


rived in section 8.3.2.
220 8 Updates for the Block Structured Factorization

8.2.3 Adding a Point Constraint

If a point constraint on the unknown v i of node i becomes active, it can be


appended to the list of previously active point constraints, as their relative
order is of no significance. In the following theorem we show how to restore
the block local reductions of a HPSC factorization for the new KKT matrix
with active point constraint on v i .

Theorem 8.3 (Adding a Point Constraint to the Block Local Reductions)


Let H(A) be a HPSC factorization of the KKT system K(A). Let the point constraint
(Ri ) j v i  ri j on the unknown v i of node 0  i  m be inactive in the active set A, and
denote by A the otherwise identical active set with activeated point constraint. As-
sume further that A satisfies LICQ. Then there exists a HPSC factorization H (A )
of the KKT matrix K (A ) that satisfies
 
    0 Ti
Zi y = Zi OZ , Yi = y Yi Ti = (8.35a)
τ (RiF ) j Yi
Ui = I T OU Ui OZ I (8.35b)
   
Ĝi ĝ = Ĝi OUT P̂i p̂ = P̂i OUT (8.35c)

Ai−1 = Ai−1 − p̂ p̂ ,T
Ai = Ai − ĝ ĝ ,
T
Bi = Bi − ĝ p̂ ,
T
(8.35d)

where
 OZ and
 OU are appropriately chosen sequences of Givens rotations, and τ =
 F 
Ri, j Zi OZ . 

Proof We first consider the relations (8.35a) for the matrices Zi , Yi , and
Ti of the TQ factorization of the active point constraints. If an inactive point
constraint 1  j  nri on node i becomes active, the row vector r T = (RiF ) j
def

is appended to the bottom of the matrix of active point constraints RiAF and
its TQ factorization
   
RiAF   0 Ti
Zi Yi = , (8.36)
rT tZT tYT

wherein t T = r T Q i , i.e., tZT = r T Zi and tYT = r T Yi . To restore the southeast


triangular shape of the right hand side of (8.36), a series of nZ − 1 Givens
rotations
T T Z T
OZ = O21 O32 · . . . · OnnZ −1
def
(8.37)
8.2 Updating the Block Local Reductions 221

is applied, eliminating all entries of tZ outside the triangular shape,


    
0 Ti OZ 0 0 Ti  
0 Ti
def
= = . (8.38)
tZT tYT I 0 T τ tYT

The factor Ti gains a row and column as the range space dimension in-
creases and the null space dimension decreases, To maintain equality in
(8.36) we apply the sequence OZ also to the left hand side,
 
   OZ
RiAF Zi Yi (8.39)
I
  def   
= RiAF Zi y Yi = RiAF Zi Yi

from which find the bases Zi and Yi ,


   
Zi y = Zi OZ , Yi = y Yi . (8.40)

This proves the relations (8.35a) for the TQ factorization matrices Zi , Yi ,
and Ti . The projected Hessian factor Ui would be


Ui Ui = Zi HiF F Zi = I T OZT ZiT HiF F Zi OZ I = I T OZT UiT Ui OZ I, (8.41)
T T

and similar to section 8.2.2 the upper triangular shape of Ui OZ I is lost in


(8.41) and needs to be recovered by the sequence

def Z
OU = OnnZ −1 · . . . · O23 O12 , (8.42)

again resulting in

Ui = I T OU Ui OZ I.
def
(8.43)

This shows relation (8.35b) for the reduced Hessian’s Cholesky factor Ui .
With this result the proof of the remaining relations (8.35c) for Ĝi and P̂i
and (8.35d) for Âi−1 , Âi , and B̂i proceeds exactly as in section 8.2.2. 

The resulting factorization update procedure is summarized in algorithm


8.4 on page 228.
222 8 Updates for the Block Structured Factorization

8.2.4 Deleting a Simple Bound

If a simple bound on viXj becomes inactive on node i , we may assume w.l.o.g.


that the unknown to be freed from its bound is the first component j = 1
of the fixed unknowns v iX , and that it becomes the new last component
nF + 1 of the free unknowns v iF . This can again be ensured by applying a
suitable permutation to the unknown v iX and the matrix Q i , cf. theorem 8.1.
In the following theorem we show how to restore the block local reductions
of a HPSC factorization for the new KKT matrix with inactive simple bound
on viXj .

Theorem 8.4 (Deleting a Simple Bound from the Block Local Reductions)
Let H(A) be a HPSC factorization of the KKT system K(A). Let the simple bound on
X
the first fixed component vi1 of the unknown v i of node 0  i  m be active in A, and

denote by A the otherwise identical active set with inactivated simple bound. Then
there exists a HPSC factorization H (A ) of the KKT matrix K (A ) that satisfies
     
Zi z z Yi Yi
Zi = , = OT , (8.44a)
0T ζ ζ 0T 1
   
0 Ti = Ti (RiX )1 OT , (8.44b)
 
 Ui u
Ui = , u = Ui−T Zi T (HiF F z + hζ), (8.44c)
0T 
3
 = z T (HiF F z + hζ) + ζ(h T z + ηζ) − u T u
  
Ĝi = Ĝi ĝ with ĝ = (GiF z − Ĝu)/, (8.44d)
  
P̂i = P̂i p̂ with p̂ = (PiF z − P̂ u)/,

Ai−1 = Ai−1 + p̂ p̂ T , (8.44e)


Ai = Ai + ĝ ĝ ,T

Bi = Bi + ĝ p̂ T ,

where OT is an appropriately chosen sequence of Givens rotations. 


Proof We again consider the TQ factorization of RiAF first. In the extended
constraints matrix
    
IiX Zi Yi IiX
= , (8.45)
RiF RiX IiX 0 Ti RiX

the row belonging to the simple bound is removed on the left hand side.
Consequentially, the first column of RiX belonging to the unknown vi1
X
to be
8.2 Updating the Block Local Reductions 223

freed from its bound becomes the last one of Ti on the right hand side,
⎡ ⎤
 
 Zi Yi  

IiX ⎢ ⎥ IiX
X ⎣ 1 ⎦=  . (8.46)
RiF r1X Ri  0 Ti r1X RiX
IiX
 
The southeast triangular shape of the factor Ti r1X is restored by a se-
quence of nY Givens rotations

F T Z T
OT = OnnF +1 · . . . · OnnZ +1
+2
def
(8.47)

by eliminating each element on the reverse subdiagonal using the element


to the right thereby transforming the first column to zero,
   
Ti r1X 0 Ti
def
OT = . (8.48)

This proves relation (8.44b) for the new southeast triangular TQ factor Ti .

To maintain equivalence in (8.46) we apply the sequence OT to the left


hand side as well. By construction this sequence leaves Zi unaffected, but
affects the first column of Yi which becomes the new last one of Zi as the
null space dimension grows by one,
    
Zi Yi I Z z Yi  
= Zi Yi
def
= (8.49)
1 OT 0T ζ y T

This proves relations (8.44a) and (8.44b) for the null space and range space
bases Zi and Yi .

In order to prove relation (8.44c) for Ui , we denote the elements of the

new last row and column of the Hessian HiF F by a known row/column vec-
tor h and a known scalar η for the new diagonal element. For the Hessian’s
Cholesky factor Ui yet to be determined, these are denoted by an unknown
column vector u and an unknown scalar  for the new diagonal element,
   
 HiF F h Ui u
HiF F Ui
def def
= , = . (8.50)
hT η 0T 

For the new projected Hessian factor Ui we find from expanding the pro-

jected Hessian Zi HiF F Zi  = Ui Ui to
T T
224 8 Updates for the Block Structured Factorization

     
Zi T 0 HiF F h Zi z Ui T Ui Ui T u
= (8.51)
zT ζ hT η 0T ζ u Ui u u +  2
T T

that we can compute the factor’s new column entries u and  from the

entries h and η of HiF F as follows,

UiT u = Zi T (HiF F z + hζ), (8.52a)



 = z T (HiF F z + hζ) + ζ(h T z + ηζ) − u T u. (8.52b)

This proves relation (8.44c) for the projected Hessian Cholesky factor Ui .
We next consider the Schur complement relations (8.44d). Since the ini-
tial nZ columns of Zi and Ui are identical to those of Zi and Ui , we find for
 
the Schur complements Ĝi and P̂i that Ĝi = Ĝi ĝ where ĝ is an additional
column that can be found as follows:

Ĝi Ui = GiF Zi (8.53)
   
  Ui u   Zi z
F X
⇐⇒ Ĝi ĝ = G i g1
0T  0T ζ
   
⇐⇒ Ĝi Ui Ĝi u + ĝ  = GiF Zi GiF z + g1X ζ

with g1X denoting the first column of the fixed variables part GiX of Gi . Solv-
ing for ĝ yields

ĝ  = (GiF z + g1X ζ − Ĝu)/. (8.54)

This proves relation (8.44d) for Ĝi and the proof for P̂i can be carried out
in the same way.
Finally, to show relation (8.44e) for the tridiagonal system blocks Ai−1 ,
Ai ,
and Bi we compute

T
Ai = Ĝi Ĝi + P̂i+1 P̂i+1
T
= Ĝi ĜiT + ĝ ĝ T + P̂i+1 P̂i+1
T
= Ai + ĝ ĝ T . (8.55)

The block Ai is thus affected by a rank one update, and identical relations
hold for Ai−1 and Bi . This completes the proof. 

The resulting factorization update procedure is summarized in algorithm


8.5 on page 228. Observe now that the rank one modification to the 2 × 2
subblock of the block tridiagonal system has positive sign as the active set
8.2 Updating the Block Local Reductions 225

shrinks. A suitable update to the block tridiagonal Cholesky factorization is


derived in section 8.3.

8.2.5 Deleting a Point Constraint

If a decoupled point constraint on node i becomes inactive, a row j is re-


moved from RiAF . In the following theorem we show how to restore the
block local reductions of a HPSC factorization for the new KKT matrix with
inactive point constraint.

Theorem 8.5 (Deleting a Point Constraint from the Block Local Reductions)
Let H(A) be a HPSC factorization of the KKT system K(A). Let the point constraint
(Ri )[ j,:] v i  ri j on the unknown v i of node 0  i  m be active in A, and denote by A
the otherwise identical active set with inactive point constraint. Then there exists a
HPSC factorization H (A ) of the KKT matrix K (A ) satisfying
     
Zi = Zi z , z Yi = Yi OT , 0 Ti = Ti OT , (8.56a)
     
Ui u u U −T Z T H F F z
Ui = with = 3 Ti FiF i , (8.56b)
0T   z Hi z − u T u
 
Ĝi = Ĝi ĝ  with ĝ  = (GiF z − Ĝu)/, (8.56c)
 
P̂i = P̂i p̂  with p̂ =
(PiF z − P̂ u)/,
Ai−1 = Ai−1 + p̂ p̂ T
, Ai = Ai + ĝ  ĝ  T , Bi = Bi + ĝ  p̂  T , (8.56d)

where OT is an appropriately chosen sequence of Givens rotations. 

Proof We again start with the proof of relation (8.56a) for the TQ factor-
ization matrices Zi , Yi , and the southeast triangular factor Ti . The row j
of RiAF belonging to the point constraint to be inactivated is removed from
both RiAF and the triangular factor Ti in the TQ factorization. This yields

   
RiAF Zi Yi = 0 T̃i (8.57)

where the triangular shape of T̃i has been destroyed by the removal of row
j . We restore it using the series of nY − j Givens rotations

def nY − j+1 T T
OT = OnY − j · . . . · O12 . (8.58)
226 8 Updates for the Block Structured Factorization

Applied to the right hand side of (8.57) this transformation results in


 
  I  
0 0 Ti
def
0 T̃i = . (8.59)
OT

We find that Ti shrinks by one row and column reflecting the increased
dimension of the null space. Applying OT to the right hand side of (8.57) to
maintain equality, the null space basis Zi remains unaffected we obtain
 
  InZ   def  
Zi Yi = Zi z Yi = Zi Yi . (8.60)
OT

This proves relation (8.56a) for the TQ factorization matrices Zi , Yi , and
Ti .

Relation (8.56b) for the Cholesky factor Ui of the projected Hessian

Zi T HiF F Zi
is derived as follows. Denoting the new elements of the Hes-
sian factor again with a vector u and a scalar  ,
 
Ui u
Ui = , (8.61)
0T 

we determine the new column entries of the Hessian factor Ui similar to
8.2.4 from
 
 T    Ui T Ui Ui T u
Zi z HiF F Zi z = . (8.62)
u Ui u u +  2
T T


Observing HiF F = HiF F as the set of active simple bounds did not change,
this yields

u = Ui−T Zi T HiF F z, = z T HiF F z − u T u. (8.63)

This proves relation (8.56b) for the Cholesky factor Ui of the reduced Hes-
sian.

Finally, relation (8.56c) for the Schur complements Ĝi and P̂i can again
 
be found constructively in the form Ĝi = Ĝi ĝ as the initial nZ columns
of Zi and Ui remained unchanged. Here again ĝ is an additional column that
is determined as follows. From
8.2 Updating the Block Local Reductions 227

     
Ĝi ĝ u i = GiF Zi ⇐⇒ Ĝi Ui Ĝi u + ĝ  = GiF Zi GiF z (8.64)

we determine that new column by solving for ĝ ,

ĝ = (GiF z − Ĝi u)/. (8.65)

With this result for Ĝi and the analogous one for P̂i relation (8.56c) is shown
and the proof of relation (8.56d) for the tridiagonal system blocks Ai−1 , Ai ,
and Bi proceeds as in section 8.2.4. 

The resulting update procedure is summarized in algorithm 8.6 on


page 229.

Algorithm 8.3: Matrix updates adding a simple bound to the active set.
input : K, H, i
output : H
t = Q i [nF ,:] ;
for k = 1 : nZ − 1 do
[s, c] = givens(t , k + 1, k);
[t , Q i , Ui ] = apply([t , Q i , Ui ], s, c, k + 1, k);
end
 
Ti = zeros(nY , nZ ) Ti ;
for k = nZ : nF − 1 do
[s, c] = givens(t , k + 1, k);
[t , Q i , Ti ] = apply([t , Q i , Ti ], s, c, k + 1, k);
end
Ti = Ti [:,nZ :nF −1] ;
for k = 1 : nZ − 1 do
[s, c] = givens(U[:,k] , k, k + 1);
[UiT , Ĝi , P̂i ] = apply([UiT , Ĝi , P̂i ], s, c, k, k + 1);
end
Ui = Ui [1:nZ −1,1:nZ −1] ;
ĝ = Ĝi [:,nZ ] ; p̂ = P̂i [:,nZ ] ;
Ĝi = Ĝi [:,1:nZ −1] ; P̂i = P̂i [:,1:nZ −1] ;
[V, D] = block_tri_choldown(V, D, ĝ , p̂, i);
228 8 Updates for the Block Structured Factorization

Algorithm 8.4: Matrix updates adding a point constraint.


input : K, H, i, j
output : H
t = Ri [ j,F ] Q i ;
for k = 1 : nZ − 1 do
[s, c] = givens(t , k + 1, k);
[t , Q i , Ui ] = apply([t , Q i , Ui ], s, c, k + 1, k);
end
 
Ti = zeros(nY , 1) Ti ; t[nZ +1:nF ] ;
for k = 1 : nZ − 1 do
[s, c] = givens(U[:,k] , k, k + 1);
[UiT , Ĝi , P̂i ] = apply([UiT , Ĝi , P̂i ], s, c, k, k + 1);
end
Ui = Ui [1:nZ −1,1:nZ −1] ;
ĝ = Ĝi [:,nZ ] ; p̂ = P̂i [:,nZ ] ;
Ĝi = Ĝi [:,1:nZ −1] ; P̂i = P̂i [:,1:nZ −1] ;
[V, D] = block_tri_choldown(V, D, ĝ , p̂, i);

Algorithm 8.5: Matrix updates deleting a simple bound.


input : K, H, i, j

output4 :H 5
AX
Ti = Ti Ri [:,1] ;
 
Q i = Q i zeros(nF , 1); zeros(1, nF ) 1 ;
for k = 1 : nY do
[s, c] = givens(Ti [:,k] , nY + 2 − k, nY + 1 − k);
[Ti , Yi ] = apply([Ti , Yi ], s, c, nY + 2 − k, nY + 1 − k);
end
Ti = Ti [:,2:nY +1] ;
[z; ζ] = Q i [:,nZ +1] ;
[h; η] = [HiF X [:,1] ; HiX X [1,1] ];
u = UiT \(ZiT HiF F z + hζ);
 = sqrt(z T HiF F z + ζ(h T z + ηζ) − u T u);
 
Ui = Ui u; zeros(1, nZ )  ;
ĝ = (GiF z + GiX [:,1] ζ − Ĝu)/ ; p̂ = (PiF z + PiX [:,1] ζ − P̂ u)/ ;
   
Ĝi = Ĝi ĝ ; P̂i = P̂i p̂ ;
[V, D] = block_tri_cholup(V, D, ĝ , p̂, i);
8.3 Modifying the Block Tridiagonal Factorization 229

Algorithm 8.6: Matrix updates deleting a point constraint.


input : K, H, i, j

 :H
output 
Ti = Ti [1: j−1,:] Ti [ j+1:nY ,:] ;
for k = j : nY − 1 do
[s, c] = givens(Ti [k,:] , nY − k + 1, nY − k);
[Ti , Yi ] = apply([Ti , Yi ], s, c, nY − k + 1, nY − k);
end
Ti = Ti [:,2:nY ] ;
[z; ζ] = Q i [:,nZ +1] ;
u = UiT \(ZiT HiF F z);
 = sqrt(z T HiF F z − u T u);
 
Ui = Ui u; zeros(1, nZ )  ;
ĝ = (GiF z − Ĝu)/ ; p̂ = (PiF z − P̂ u)/ ;
   
Ĝi = Ĝi ĝ ; P̂i = P̂i p̂ ;
[V, D] = block_tri_cholup(V, D, ĝ , p̂, i);

8.3 Modifying the Block Tridiagonal Factorization

We conclude the presentation of the block structured update procedures


by deriving the update and a downdate procedure for the tridiagonal block
Cholesky factorization of system (7.33). In detail, our update will treat a
rank one modification of some or all blocks Ai together with the appropriate
rank one modification of the affected subdiagonal blocks Bi . As we have
seen, this situation arises as common final part of all four cases of active set
changes, where two blocks Ai−1 and Ai are updated or downdated together
with the interleaving subdiagonal block Bi .

To this end, the shape restoration approach initially presented in section


8.1.1 for a dense Cholesky factorization cannot be applied to the block tridi-
agonal system, as the zero pattern cannot be represented by a single dyadic
product. Hence, efficient exploitation of the tridiagonal structure is neces-
sary to individually apply the rank one update to every diagonal and side
diagonal block.
230 8 Updates for the Block Structured Factorization

8.3.1 A Rank 1 Update

In order to derive O(mn2 ) algorithms for both procedures instead, we carry


out a single step of the block tridiagonal Cholesky factorization of section
7.3.4, incorporating the addition or subtraction of the dyadic product.
Theorem 8.6 (Update to a Block Tridiagonal Cholesky Factorization)
Let (A, B) with Ai ∈ n×n , 0  i  m − 1 and Bi ∈ n×n , 1  i  m − 1 be the diagonal
and subdiagonal blocks of a positive definite block tridiagonal system. Let (A , B )
be a positive rank one modification of (A, B) defined by vectors yi ∈ n ,

Ai = Ai + yi yiT , 0  i  m − 1, (8.66)


Bi = Bi + yi−1 yiT , 1  i  m − 1.

Further, let (V, D) be the upper triangular and subdiagonal blocks of the Cholesky
factorization of (A, B). Then it holds that the Cholesky factorization (V  , D  ) of
(A , B ) is obtained from (V, D) as

Vi = OiT Vi + oi ziT , 0  i  m − 1, (8.67)


Di = Oi−1
T −T
(Di + Vi−1 zi−1 yiT ), 1  i  m − 1,

with vectors zi defined by the recursion formula

−T
z0 = y 0 , zi = δi−1 (DiT Vi−1 zi−1 − yi ), 1  i  m − 2, (8.68)

and the sequences OVi of Givens rotations eliminating the diagonal of ViT denoted
by the matrix
 
oiT
def δi
OVi = . (8.69)
Oi −δi Vi−T yi


Proof For updating the diagonal blocks we employ a variant of method C3


described in [83]. Forming a sequence OV of Givens rotations

def
OV = O12 O23 · . . . · On−1
n
(8.70)

to eliminate the diagonal elements of V0T , we restore the lower triangular


shape of the following system:
    
z0 V0T T
o21 22 V0 T 0
= . (8.71)
1 0T O11 o12 r T δn
- ./ 0
=OV
8.3 Modifying the Block Tridiagonal Factorization 231

Correctness can be verified by multiplying each side of (8.71) by its trans-


pose and comparing entries, which yields the identity V0T V0 + z0 z0T = V0 V0 .
T

For the new Cholesky factor we find V0


T
= V0T O11 + z0 o21
T
as claimed. Be-
sides, the following identities hold:

o12 = −δn V0−T z0 o21 = r 22 = δn (8.72)

From the block tridiagonal Cholesky algorithm we have the identity D1 =
V0 −T B1 T which gives D1 = O11
−1 −T
V0 (B1T + z0 y1T ). The difficulty here lies with
−1
finding O11 , as O11 is not orthogonal. To address this issue, we expand the
above identity to
       
T −T
D1 T
o21 O11 0 1 B1T + z0 y1T T
O11 D1 + O11 V0 z0 y1T
= = .
d T
22 o12 V0−T −V0−T z0 0 T
o12 T −T
D1 + o12 V0 z0 y1T

Herein, we have exploited orthogonality of OV and formed the inverse ex-


plicitly. We find that the columns of D1 are affected by the Givens sequence
like the rows of V1 ,

D1 = O11
T
(D1 + V0−T z0 y1T ) (8.73)

as claimed. We now compute D1 D1 , the new downdate to the following
T

diagonal block A1 . By orthogonality of OV we have with v = V0−T z0


def

T
O11 O11 T
= I − o12 o12 = I − δn2 v v T (8.74)

and can express D1 D1 as


T

D1 D1 = (D1T + y1 v T )O11 O11


T T
(D1 + v y1T ) (8.75)
= (D1T + y1 v T )(D1 + v y1T ) − δn2 (D1T v + y1 v T v)(v T D1 + v T v y1T ).

By expanding, collecting identical terms, and using the identity 1−δn2 v T v =


δn2 which is easily verified using (8.72) and orthogonality of OV , we find

D1 D1 = D1T D1 + δn2 (D1T v − y1 )(D1T v − y1 ) T + y1 y1T .


T
(8.76)

Using this relation, the update of the next diagonal block A1 reads

V1 V1 = A1 − D1 D1 + y1 y1T = A1 − D1T D1 − z1 z1T


T T
(8.77)
= V1T V1 − z1 z1T
232 8 Updates for the Block Structured Factorization

with a vector z1 = δn (D1T V0−T z0 − y1 ) as claimed. Closing the loop by contin-


uing with the update of V1 , we eventually obtain the claimed relations for
all further blocks by repeating the argument for the nodes 1, . . . , m − 1. This
completes the proof. 

All required computations can be carried out in at most O(n2 ) operations


per block, where n is the size of the square matrices Ai or Bi . The update
sequence obviously can start at any block i  0, but must always run until
the last block m−1 has been updated. The number of nodes affected is m−i ,
thus the total runtime complexity is bounded by O(mn2 ). A summary of this
update procedure for the block tridiagonal Cholesky factorization is given
in algorithm 8.7.

Algorithm 8.7: Updating a block tridiagonal Cholesky decomposition.


input : V , D , g , p , i
output : V  , D 
for j = i : m do
v = V j−1
T
\p ;
V j−1 = [p T ; V j−1 ];
p = D Tj v − g ;
D j = [zeros(1, nx ); D j + v g T ];
d = [1; zeros(nx , 1)];
for k = 1 : nx do
[s, c] = givens(V j−1 [k,:] , k, k + 1);
[V j−1
T
, D Tj , d T ] = apply([V j−1
T
, D Tj , d T ], s, c, k, k + 1);
end
V j−1 = V j−1 [1:nx ,:] ;
D j = D j [1:nx ,:] ;
p = d[nx ] p ;
g = 0;
end

8.3.2 A Rank 1 Downdate

In this section, we finally derive a rank one downdate procedure for the
block tridiagonal Cholesky factorization of system (7.33), to be used when
adding a simple bound or decoupled point constraint to the active set. The
8.3 Modifying the Block Tridiagonal Factorization 233

derivation is technically equivalent to that for the rank one update of sec-
tion 8.3 and differs only in several minor steps. As the obtained downdate
formulas are slightly different, we give the full derivation for completeness
here.

Theorem 8.7 (Downdate to a Block Tridiagonal Cholesky Factorization)


Let (A, B) with Ai ∈ n×n , 0  i  m − 1 and Bi ∈ n×n , 1  i  m − 1 be the diagonal
and subdiagonal blocks of a positive definite block tridiagonal system. Let (A , B )
be a negative rank one modification of (A, B) defined by vectors yi ∈ n ,

Ai = Ai − yi yiT , 0  i  m − 1, (8.78)


Bi = Bi − yi−1 yiT , 1  i  m − 1.

Further, let (V, D) be the upper triangular and subdiagonal blocks of the Cholesky
factorization of (A, B). Then it holds that the Cholesky factorization (V  , D  ) of (A, B)
is obtained from (V, D) as

Vi = Oi Vi , 0  i  m − 1, (8.79)

Di = (Oi−1 − −T
oi−1 δ1 (Vi−1 zi−1 ) T )(Di − −T
Vi−1 zi−1 yi ), 1  i  m − 1,
n

with vectors zi defined by the recursion formula

1 −T −T
z0 = y 0 , zi = δn
(Vi−1 zi−1 ) T (Di − Vi−1 zi−1 yi ) − δn yi , 1  i  m − 2, (8.80)

and the sequences OVi of Givens rotations eliminating the diagonal of ViT denoted
by the matrix
 
def Oi oi
OVi = . (8.81)
ziT Vi−1 δi


Proof For downdating the diagonal blocks we again employ method C3 of


[83], who for a downdate now form
 
v V0
(8.82)
δn 0 T
3  
with v = V0−T z0 , δn =
def def
1 − v T v , and project v T δn onto the unit row
vector enT by applying a sequence of Givens plane rotations

def
OV = On+1
1 n−1
· . . . · On+1 n
· On+1 (8.83)
234 8 Updates for the Block Structured Factorization

to (8.82), yielding
    
O11 o12 v V0 0 V0
= . (8.84)
T
o21 22 δn 0 T 1 z0T
- ./ 0
= OV

Correctness can be verified by multiplying each side of (8.84) by its trans-


pose and comparing entries, which yields the identity and V0 V0 = V0T V0 −
T

 
z0 z0 . From (8.84) we get for V0 the expression V0 = O11 V0 and the identity
T

o21 = v to be used in the next section. As in section 8.3 we expand the iden-
−T
tity D1 = V0 B1 to exploit orthogonality of OV and by forming the inverse
T

of (8.82) explicitly we find


  ⎡ ⎤  ⎡ ⎤
D1 0 V0−T 0 D1 − v y1T
= OV ⎣ ⎦ = OV ⎣ 1 T ⎦ (8.85)
d
1
δn
− δ1 v T V0−T B1T − z0 y1T − δ v (D1 − v y1T )
n n

As claimed, D1 is updated and its rows are affected by the Givens sequence
like the rows of V0 . A nontrivial dyadic term is added, though, due to non–
orthogonality of O11 . We now compute D1 D1 for the third step. We note
T

1/(1 − v v) = 1/δn = 1/22 .


T 2 2

D1 D1 = B1 V0−1 O11


−1 −T −T 
T T
O11 V0 B1 (8.86)

= B1 V0−1 (I − o21 o21


T −1 −T  T
) V0 B1
 
B1 V0−1 I + δn−2 v v T V0−T B1
T
=
= (D1T − y1 v T )(D1 − v y1T ) + δn−2 (D1T v − y1 v T v)(v T D1 − v T v y1T )

Here we have exploited orthogonality of OV and applied the Sherman–


Morrison formula to find (O11 T
O11 )−1 . Expanding, collecting identical terms
and using the identity 1 + δn v v = δn−2 we find
−2 T

D1 D1 = D1T D1 + δn−2 (D1T v − y1 )(D1T v − y1 ) T − y1 y1T


T
(8.87)

Using this relation, the downdate of the next diagonal block A1 reads

V1 V1 = A1 − D1 D1 − y1 y1T


T T
(8.88)
= A1 − D1T D1 − z1 z1T = V1T V1 − z1 z1T

1
with a vector z1 = (D1T v − y1 ). This vector can be written more conve-
δn
niently as
8.4 Summary 235

1
z1T = δn
v T (D1 − v y1T ) − δn y1 (8.89)

which allows to reuse intermediate terms from (8.85). Closing the loop
by continuing with the downdate of V1 , we eventually obtain the claimed
relations for all further blocks by repeating the argument for the nodes
1, . . . , m − 1. This completes the proof. 

A summary of this downdate procedure for the block tridiagonal Cholesky


factorization is given in algorithm 8.8 on page 235.

Algorithm 8.8: Downdating a block tridiagonal Cholesky decomposi-


tion.
input : V , D , g , p , i
output : V  , D 
for j = i : m do
v = V j−1
T
\p ;
if v T v > 1 then error("positive definiteness lost");
δn = sqrt(1 − v T v );
p = v T D j /δn − g δn ;
g = 0;
V j−1 = [V j−1 ; zeros(1, nx )];
D j = [D j ; −v T D j /δn ];
v = [v; δn ];
for k = nx : −1 : 1 do
[s, c] = givens(v , nx + 1, k);
[v T , V j−1
T
, D Tj ] = apply([v T , V j−1
T
, D Tj ], s, c, nx + 1, k);
end
V j−1 = V j−1 [1:nx ,:] ;
D j = D j [1:nx ,:] ;
end

8.4 Summary

In this section we derived fast matrix updates for the HPSC factorization
presented in chapter 7. We covered all four cases of active set changes that
can arise when solving the QP with direct multiple shooting block structure
by an active set method, namely addition or removal of a simple bound and
addition or removal of a decoupled point constraint. We gave formal proofs
236 8 Updates for the Block Structured Factorization

of the matrix update procedures based on established techniques due to


[83, 158], and provided efficient algorithmic realizations. All presented ma-
trix updates have a runtime complexity that is bounded by O (mn2 ) and are
implemented in our numerical code qpHPSC, see appendix A. The algorithmic
techniques presented in this chapter are key to giving fast control feedback
in Nonlinear Model Predictive Control (NMPC) problems with many control
parameters, such as mixed–integer problems treated by outer convexifica-
tion.
9 Numerical Results

In this chapter we present mixed–integer optimal control problems and


mixed–integer model predictive control problems of the form of definition
2.1. They serve as example applications used to demonstrate the various
theoretical results and the applicability and performance of the new algo-
rithms presented in this thesis.
In section 9.1 a switched–mode dynamic system is considered to study
both the sum–up rounding approximation theorem and the convexified
switch costs formulation of chapter 2 at its example. The problem’s relaxed
optimal solution after partial outer convexification features bang–bang arcs,
a path–constrained arc, and a singular arc and sum–up rounding solutions
chatter on the later ones. Solutions obtained by penalization and constrain-
ing of switches of the integer control are presented.
In section 9.2 we study the contractivity estimate for the mixed–integer
real–time iteration scheme of chapter 4 at the example of a nonlinear sys-
tem with instable steady state. We derive bounds, Lipschitz constants, and
estimates of the contractivity constants required to evaluate the sampling
time estimate. The behavior of the mixed–integer Nonlinear Model Predic-
tive Control (NMPC) scheme is examined for various sampling times and is
found to be in good accordance with our estimate.
In section 9.3 we investigate an autonomous robot path–following and
communication problem that is frequently studied in the literature and give
an Mathematical Program with Vanishing Constraints (MPVC) reformula-
tion of this problem. We show that the nonconvex active set method devel-
oped in this thesis is indeed able solve this problem to optimality. We study
the consequences of constraint violation at the example of an interior point
method that fails to solve a significant number of problem instances if no
appropriate reformulation of the MPVC is used. Our implementation is com-
petitive both in terms of computation time and quality of the obtained locally
optimal solutions.
In section 9.4, a Mixed–Integer Optimal Control Problem (MIOCP) mod-
elling a time–optimal test driving scenario is presented and the newly devel-
oped structure exploiting linear algebra techniques are compared against

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8_10,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
238 9 Numerical Results

various alternative possibilities of solving the block structured Karush–


Kuhn–Tucker (KKT) systems. A detailed investigation of the run times for a
large number of problem instances reveals that our algorithmic techniques
have significant performance advantages for all but the smallest problem
instances.

Finally, we consider a nonlinear model–predictive cruise controller includ-


ing predictive gear shifts, a challenging real–world industrial problem, in
section 9.5. A vehicle model is derived from first principles and parame-
terized by real–world data. The combinatorial nature of the engine speed
constraint depending on the selected gear is identified and a vanishing con-
straint formulation is adopted after examination of the reformulations pro-
posed in chapter 5. The algorithmic techniques for long prediction horizons
and many control parameters developed in chapter 7 and 8 are applied to
this problem in order to achieve sampling times and control feedback delays
small enough to verify that our techniques are indeed capable of solving this
problem on–board the truck under demanding real–time constraints even on
a supposed hardware platform with limited computational power.

9.1 Mixed–Integer Optimal Control with Switch Costs

In this section we investigate a nonlinear switched dynamic system intro-


duced in [60]. We present a MIOCP formulation due to [186] and solve
it using the outer convexification and relaxation approach. The problem’s
relaxed optimal solution features bang–bang arcs, a path constrained arc,
and a singular arc. Convergence of the integer feasible sum–up rounding
solution’s objective to that of the relaxed Optimal Control Problem (OCP)
with increasingly fine discretizations of the control trajectory is investi-
gated. The sum–up rounding solutions show chattering behavior on the
path–constrained and the singular arc. We apply our convexified switch cost
formulation to this problem in order to penalize frequent switching and to
obtain solutions that switch only a predefined number of times.

9.1.1 Problem Formulation

We consider a nonlinear MIOCP formulation of the investigated problem on


def def
the time horizon T = [t 0 , t f ] = [0, 1] ⊂  as presented in [186] is given
in (9.1).
9.1 Mixed–Integer Optimal Control with Switch Costs 239

min x 3 (t f ) (9.1)
x (·),w (·)

x 1 (t)
s. t. ẋ 1 (t) = − sin(w1 (t))
sin(1)
   
+ x 1 (t) + x 2 (t) w22 (t) + x 1 (t) − x 2 (t) w33 (t), t ∈ T ,
 
ẋ 2 (t) = x 1 (t) + 2x 2 (t) w1 (t)
 
+ x 1 (t) − 2x 2 (t) w2 (t)
  
+ x 1 (t)x 2 (t) − x 3 (t) w22 (t) − w23 (t)
 
+ x 1 (t) + x 2 (t) w3 (t), t ∈T,
ẋ 3 (t) = x 12 (t) + x 22 (t), t ∈T,
x 1 (t)  0.4, t ∈T,
def
w (t) ∈ {(1, 0, 0), (0, 1, 0), (0, 0, 1)} = Ω, t ∈T,
 
x (t 0 ) = 12 , 12 , 0 .

3 MIOCP can be relaxed by letting w (t) ∈ [0, 1] and requiring


3
This
i=1 w i (t) = 1 for all t ∈ T . This relaxation amounts to inner convexifi-
cation of the problem and yields a nonlinear continuous OCP.

The nonlinear Ordinary Differential Equation (ODE) system (9.1) has been
specially construction to include a number of nonlinearities that become ap-
parent in an inner convexification formulation that relaxes the binary con-
trol vector w (t), but vanish if the ODE dynamics are evaluated in binary
feasible choices ωi ∈ Ω only. In the outer convexification reformulation, we
introduce one binary control trajectory ωi (t) ∈ {0, 1} for all t ∈ T per choice
ωi found in the set Ω, and relax these trajectories to αi (t) ∈ [0, 1] for all
t ∈ T . The resulting problem is given in (9.2).

min x 3 (t f ) (9.2)
x (·),α(·)

s. t. ẋ 1 (t) = −x 1 (t)α1 (t)


+ (x 1 (t) + x 2 (t))α2 (t)
+ (x 1 (t) − x 2 (t))α3 (t), t ∈T,
ẋ 2 (t) = (x 1 (t) + 2x 2 (t))α1 (t)
+ (x 1 (t) − 2x 2 (t))α2 (t)
+ (x 1 (t) + x 2 (t))α3 (t), t ∈T,
240 9 Numerical Results

ẋ 3 (t) = x 12 (t) + x 22 (t), t ∈T,


x 1 (t)  0.4, t ∈T,
α(t) ∈ [0, 1]3 , t ∈T,
3
αi (t) = 1, t ∈T,
i=1
 
x (t 0 ) = 12 , 12 , 0 .

Problem (9.2) is by construction identical to the switched system introduced


in [60] with an additional path constraint on x 1 (t) introduced to obtain a
path–constrained arc.

9.1.2 Optimal Solutions

In table 9.1 the objective function values x 3 (t f ) and the remaining infeasibil-
ity of the optimal solution for the relaxed problem after outer convexification
with respect to the integer control w (t) (9.2), and for the integer feasible so-
lution obtained from the partially convexified relaxed one by application of
sum–up rounding can be found for increasingly fine control discretizations
m. All problems have been solved to an acceptable KKT tolerance of 10−10 .
As can be seen clearly from table 9.1, the sum–up rounding solution’s objec-
tive converges to that of the partially convexified relaxed problem while the
infeasibility of the control–independent path constraint converges to zero.

Convexified relaxed Sum–up rounding


m Objective Infeasibility Objective Infeasibility Switches
−13 −2
20 0.9976458 1.19 · 10 1.050542 5.29 · 10 9
40 0.9956212 3.93 · 10−13 0.9954084 2.13 · 10−4 12
80 0.9955688 1.50 · 10−14 0.9957063 1.37 · 10−4 23
160 0.9955637 1.66 · 10−14 0.9956104 4.66 · 10−5 47
320 0.9955615 1.16 · 10−12 0.9958528 2.91 · 10−4 93

Table 9.1: Objective function values and infeasibilities of the outer convexified re-
laxed problem (9.2), and the integer feasible solutions obtained from the
latter by sum–up rounding.

This would not be the case if we had applied sum–up rounding to the
solution of the original nonlinear problem (9.1). Due to sum–up rounding of
9.1 Mixed–Integer Optimal Control with Switch Costs 241

1 1 1
x 1 (t)

x 2 (t)

x 3 (t)
0.5 0.5 0.5

0 0 0
0 0.5 1 0 0.5 1 0 0.5 1
t t t
(a) State x 1 (·) for m = 20. (b) State x 2 (·) for m = 20. (c) State x 3 (·) for m = 20.

1 1 1
α1 (t)

α2 (t)

α3 (t)
0.5 0.5 0.5

0 0 0
0 0.5 1 0 0.5 1 0 0.5 1
t t t
(d) Control α1 (·) for m = 20. (e) Control α2 (·) for m = 20. (f) Control α3 (·) for m = 20.

1 1 1
x 3 (t)
x 1 (t)

x 2 (t)

0.5 0.5 0.5

0 0 0
0 0.5 1 0 0.5 1 0 0.5 1
t t t
(g) State x 1 (·) for m = 320. (h) State x 2 (·) for m = 320. (i) State x 3 (·) for m = 320.

1 1 1
α1 (t)

α2 (t)

α3 (t)

0.5 0.5 0.5

0 0 0
0 0.5 1 0 0.5 1 0 0.5 1
t t t
(j) Control α1 (·) for m = 320. (k) Control α2 (·) for m = 320. (l) Control α3 (·) for m = 320.

Figure 9.1: Relaxed optimal solutions of the partially convexified problem (9.2) for
discretizations m = 20 and m = 320 of the control trajectory.
242 9 Numerical Results

2 3

w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(a) SUR-0.5 state trajectory x (·) for m = 20. (b) SUR-0.5 control trajectory ω(·) for m =
20. Control has 9 switches.
2 3

w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(c) SUR-0.5 state trajectory x (·) for m = 40. (d) SUR-0.5 control trajectory ω(·) for m =
40. Control has 12 switches.
2 3
w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(e) SUR-0.5 state trajectory x (·) for m = 80. (f) SUR-0.5 control trajectory ω(·) for m = 80.
Control has 23 switches.
2 3
w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(g) SUR-0.5 state trajectory x (·) for m = 160. (h) SUR-0.5 control trajectory ω(·) for m =
160. Control has 47 switches.
2 3
w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(i) SUR-0.5 state trajectory x (·) for m = 320. (j) SUR-0.5 control trajectory ω(·) for m =
320. Control has 93 switches.

Figure 9.2: Sum–up rounding solutions of problem (9.2) for increasingly fine control
discretizations m = 20, 40, 80, 160, 320. Sum–up rounding state tra-
jectories are colored as x 1 (t) (—), x 2 (t) (—), and x 3 (t) (—). Chattering
between w(t) = 2 and w(t) = 3 occurs on the path constrained arc and
chattering between w(t) = 1 and 3 w(t) = 2 on the singular arc. The inte-
ger control trajectory w(t) = i=1 iαi (t) is shown in the right column.
9.1 Mixed–Integer Optimal Control with Switch Costs 243

the control, the state trajectory x 1 (t) violates the path constraint x 1 (t) 
0.4 on the path–constrained arc.
The solutions to the partially convexified and relaxed problem (9.2) are
also depicted in figure 9.1 for two choices m = 20 and m = 320 of the
control trajectory. Figure 9.2 shows the sum–up rounding solutions corre-
sponding to table 9.1. On the path–constrained arc and the singular arc,
sum–up rounding leads to chattering of the integer control trajectory.

9.1.3 Switch Cost Formulation

Being interested in solutions to problem (9.1) that avoid frequent switchs


of the integer control trajectory w (t), we address the chattering behavior
of the solutions to problem (9.2) using our convex switch cost formulation
of section 2.5. The appropriate formulation after a direct multiple shooting
def
discretization for problem (9.2) on a horizon T = [0, 1] divided into m inter-
vals [t i , t i+1 ] ⊂ T , 0  i  m − 1, of length 1/m is given in equation (9.3),


m−1 3
min x m,3 + π σi, j (9.3a)
x ,α,σ,a
i=0 j=1

s. t. 0 = x i (t i+1 ; x i , αi ) − x i+1 , 0  i  m − 1, (9.3b)


x i,1  0.4, 0  i  m,
αi ∈ [0, 1] , 3
0  i  m − 1,

3
αi j = 1, 0  i  m − 1,
j=1
1 
x0 = , 1,0
2 2
,
σi, j = ai, j (αi, j + αi+1, j ) 0  i  m − 1,
+ (1 − ai, j )(2 − αi, j − αi+1, j ), 1  j  3, (9.3c)

m−1 3
σmax  σi, j , (9.3d)
i=0 j=1

a i ∈ [0, 1]3 , 0  i  m − 1.

Therein, the ODE representation of this switched nonlinear system is hid-


den in the matching condition notation (9.3b). Changes in one of the three
244 9 Numerical Results

relaxed convex multipliers α j at time t i ∈ T is indicated by σi, j > 0 accord-


ing to our convex switch cost formulation (9.3c). The accumulated sum of
switch costs is penalized by a penalty factor π > 0 in the objective (9.3a)
and constrained by an admissible maximum σmax > 0 in (9.3d). Obviously
the penalty factor π may be chosen as zero or the admissible maximum σmax
may be chosen sufficiently large if it is desired to remove either of the two
possibilities from the formulation.

9.1.4 Switch Cost Penalizing and Constraining Solutions

In its convexified switch cost formulation, problem (9.3) is solved using a


discretization of m = 100 control intervals and for various penalizations
π = 2 p , −10  p  3, and switch cost constraints 8  σmax  12. Objec-
tive function values, the number of switches, and the number of fractional
convex relaxed control multipliers αi, j are listed in table 9.3 for the penal-
ization and in table 9.2 for the constraining of switches. For comparison, the
sum–up rounding solution obtained for (9.2) and m = 100 yields an objective
function value of 0.956409 and switches 29 times.
The penalization approach (9.3) to reduce the total number of switches
yields integer feasible results, consequentially with an integer number of
switches, for π  2−7 . For smaller penalizations, fractional relaxed results
are obtained and integer feasible ones are computed by sum–up rounding.
The number of switches coincides with the rounded–up number of switches
computed for the relaxed solution. As has already been observed in [183]
for the case of relaxations of MIOCPs, the penalization approach does not
allow immediate conclusions on the relation between the penalization π
and the resulting optimal solution to be established. In particular, heavy pe-
nalizations p  1 attracted solutions switching more frequently than those
obtained for 2−4  p  2−1 .
Numerical results obtained using the constraining approach enforcing a
strict upper bound σmax on the total number of switches are listed in table
9.2 for 9  σmax  12. For tighter constraints, our Sequential Quadratic
Programming (SQP) method failed to converge due to infeasible Quadratic
Program (QP) subproblems. Ill–conditioning of the L–BFGS approximation
of the Hessian of the Lagrangian is one reason for this behavior. Approxi-
mating the curvature of the convex switch cost formulation (9.3c) using a
secant update accumulates ill–conditioned information similar to the situa-
tion investigated in chapter 5 for the Jacobian of complementary inequal-
9.1 Mixed–Integer Optimal Control with Switch Costs 245

ities. We may expect significantly improved convergence behavior of our


convex switch cost formulation constraining the total number of switches if
an exact Hessian SQP method is used.

An overview over all computed switch cost penalizing or constraining so-


lutions to problem (9.3) is shown in table 9.3. For example using a penaliza-
tion of p = 2−8 for the total switch cost, the number of switches is reduced to
5 or 17% of the original 29 switches, at the cost of increasing the objective
function value x 2 (t f ) to 1.124183 or 118% of the original value 0.956409.

9.1.5 Summary

In this section we presented a MIOCP formulation for a nonlinear switched


dynamic system which in its outer convexification reformulation coincides
with a problem due to [60]. Its relaxed solution featured bang–bang arcs,
a path–constrained arc, and a singular arc. Sum–up rounding on increas-
ingly fine control discretizations has been investigated and shown to ap-
proximate the relaxed solution’s objective as expected from theorem 2.4.
The obtained integer feasible control trajectories showed chattering behav-
ior on the path–constrained and the singular arc. The convex switch cost
formulation proposed in chapter 2 was used to compute relaxed solutions to
the (partially) convexified reformulation that penalize or constrain switches
of the control trajectory. With both approaches we obtained integer feasible
control trajectories with only a limited number of switches and analyzed the
increase in the objective function’s value. Future work includes the compu-
tation of tighter switch cost constraining solutions using an exact Hessian
SQP method avoiding ill–conditioned secant updates.

Constraint Convexified relaxed Sum–up rounding


σmax = Objective # Sw. # Frac. Objective Infeasibility # Sw.

9 1.025428 9 5 1.043467 0 10
10 1.020497 10 9 1.017587 1.80 · 10−4 11
11 1.015846 11 10 1.017741 7.00 · 10−5 11
12 1.011306 12 13 1.007177 3.27 · 10−4 13

Table 9.2: Solutions constraining the number of switches found for problem (9.3)
and m = 100 using our convex switch cost formulation.
246 9 Numerical Results

Penalty π Convexified relaxed Sum–up rounding


= 2p , p = Objective # Sw. # Frac. Objective Infeasibility # Sw.

3 1.337647 3 0 dto. – dto.


2 1.385266 3 0 dto. – dto.
1 1.232517 2 0 dto. – dto.
0 1.456469 2 0 dto. – dto.
−1 1.693815 1 0 dto. – dto.
−2 1.813649 1 0 dto. – dto.
−3 1.847532 1 0 dto. – dto.
−4 1.813649 1 0 dto. – dto.
−5 1.456299 2 0 dto. – dto.
−6 1.362813 2 0 dto. – dto.
−7 1.310834 3 0 dto. – dto.
−8 1.129062 5.50 2 1.124183 1.36 · 10−4 5
−9 1.021471 8.51 6 1.020104 2.17 · 10−4 9
−10 1.004172 9.78 7 1.003216 3.29 · 10−4 10

Table 9.3: Solutions penalizing the number of switches found for problem (9.3) and
m = 100 using our convex switch cost formulation.
9.1 Mixed–Integer Optimal Control with Switch Costs 247

2 3

w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(a) SUR-0.5 state trajectory x (·) for π = 2−6 . (b) SUR-0.5 control trajectory ω(·) for π =
2−6 .

2 3

w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(c) SUR-0.5 state trajectory x (·) for π = 2−7 . (d) SUR-0.5 control trajectory ω(·) for π =
2−7 .

2 3
w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(e) SUR-0.5 state trajectory x (·) for π = 2−8 . (f) SUR-0.5 control trajectory ω(·) for π =
2−8 .

2 3
w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(g) SUR-0.5 state trajectory x (·) for π = 2−9 . (h) SUR-0.5 control trajectory ω(·) for π =
2−9 .

2 3
w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(i) SUR-0.5 state trajectory x (·) for π = 2−10 . (j) SUR-0.5 control trajectory ω(·) for π =
2−10 .

Figure 9.3: Selected sum–up rounding solutions of problem (9.3) penalizing the total
switch cost for m = 100 and penalties of π = 2−6 to π = 2−10 on the
switch cost of the convexified relaxed problem. Sum–up rounding state
trajectories are colored as x 1 (t) (—), x 2 (t) (—), and x 3 (t) (—).
248 9 Numerical Results

2 3

w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(a) SUR-0.5 state trajectory x (·) for σmax = 9. (b) SUR-0.5 control trajectory α(·) for σmax =
9. Control has 10 switches.

2 3

w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(c) SUR-0.5 state trajectory x (·) for σmax = (d) SUR-0.5 control trajectory α(·) for σmax =
10. 10. Control has 11 switches.

2 3
w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(e) SUR-0.5 state trajectory x (·) for σmax = (f) SUR-0.5 control trajectory α(·) for σmax =
11. 11. Control has 11 switches.

2 3
w(t)
x (t)

1 2
0 1
0 0.5 1 0 0.5 1
t t
(g) SUR-0.5 state trajectory x (·) for σmax = (h) SUR-0.5 control trajectory α(·) for σmax =
12. 12. Control has 13 switches.

Figure 9.4: Selected sum–up rounding solutions of problem (9.3) constraining the
total number of switches for m = 100 and constraints σmax = 9 to
σmax = 12 on the number of switches of the convexified relaxed prob-
lem’s solution. If the relaxed solutions are not integer feasible, sum–
up rounding solutions may switch slightly more often. Sum–up rounding
state trajectories are colored as x 1 (t) (—), x 2 (t) (—), and x 3 (t) (—).
9.2 Mixed–Integer NMPC Scheme Contractivity 249

9.2 Mixed–Integer NMPC Scheme Contractivity

In this section we study the application of the contractivity estimates for the
mixed–integer real–time iteration scheme of chapter 4 at the example of a
small but nonlinear and instable problem due to [51]. We demonstrate again
the outer convexification reformulation and the sum–up rounding approx-
imation. We derive certain bounds, Lipschitz constants, and contractivity
constants for this example. The mixed–integer real–time iteration contrac-
tivity theorem and the resulting sampling time bound are evaluated and
numerical computations are performed for its verification.

9.2.1 Problem Formulation

We consider this problem in a mixed–integer variant (9.4) in which the con-


trol w(t) is allowed to assume one of the discrete choices {−1, 0, 1} only,
 3
1
min 2
x 2 (t) + w 2 (t) dt (9.4)
x(·),w(·)
0
s. t. ẋ(t) = (1 + x(t)) x(t) + w(t), t ∈ [0, 3],
x(0) = x meas ,
x(3) = 0,
x(t) ∈ [−1, 1], t ∈ [0, 3],
w(t) ∈ {−1, 0, 1}, t ∈ [0, 3].

Given an estimated or observed initial state x meas of the process x(t) on


0s  t  3s the purpose of the formulation (9.4) is to steer x(·) back into its
steady–state x(·) = 0 by applying an additive control w(·). The optimal con-
trol trajectory achieving this for an initial value of x(0) = 0.05 is depicted
in figure 9.5 on page 250.

The steady–state is instable, i.e., any slight deviation


> 0 will trigger a
run–away of the process. This is depicted in figure 9.6 for an initial value of
x(0) = 0.05 and no control applied. The process can be steered back into
its steady state as long as

 0 if x(t) > 0,
ẋ(t) = (1 + x(t))x(t) + w(t) (9.5)
 0 if x(t) < 0,
250 9 Numerical Results

can be satisfied within the bounds of w(t). The applicable control w(·) is
bounded by −1 and 1, hence the steady state can be reached only for

|(1 + x(t))x(t)| < 1


4   5
⇐⇒ x(t) ∈ − 12 − 25 , − 12 + 2
5
≈ [−1.618, 0.618].

In the real–time iteration scheme, the first preparation and feedback


phase pass without an appropriate control being available for feedback to

0.1
w(t) 0.1
x(t)

0.05 0

-0.1
0
0 1 2 3 0 1 2 3
t [s] t [s]
(a) Differential state trajectory x(·). (b) Relaxed piecewise constant optimal con-
trol trajectory w(·).

Figure 9.5: Relaxed optimal solution for problem (9.4), steering the process back
from an initial value x(0) = 0.05 into its unstable steady state.

1 1

0 0

-1 -1

-2 -2
0 1 2 3 0 1 2 3

(a) Instable steady state x(t) = 0 and the sta-(b) States below x(t) = + 5) can be 1
(−1
2
ble one x(t) = −1; no control applied steered back to the steady state using
u(t)  −1.

Figure 9.6: Vector fields showing stable and instable steady state of problem (9.4).
9.2 Mixed–Integer NMPC Scheme Contractivity 251

the process. In this case, the runaway behavior further reduces the set of
admissible initial values that can be steered back to the instable steady
state.

We apply the outer convexification reformulation to the objective function


and the dynamics of problem (9.4) that depend on the integer control w(·).
In problem (9.6) three convex control multipliers named w−1 (·), w0 (·) and
w1 (·) are introduced for the admissible integer choices of w(·) as follows,
 3
1
min 2
x 2 (t) + w−1 (t) + w1 (t) dt (9.6)
x(·),w (·)
0
s. t. ẋ(t) = (1 + x(t)) x(t) − w−1 (t) + w1 (t), t ∈ [0, 3],
x(0) = x meas ,
x(3) = 0,
x(t) ∈ [−1, 1], t ∈ [0, 3],
w (t) ∈ {0, 1} ,
3
t ∈ [0, 3],

1
w i (t) = 1, t ∈ [0, 3].
i=−1

The convex multiplier w0 (t) lends itself to straightforward elimination, mak-


ing the SOS–1 constraint an inequality constraint.

As the steady state is inherently instable, we cannot expect an integer


control in {−1, 0, 1} applied on a fixed discretization grid to steer the pro-
cess back to its steady state. We instead desire the process to be kept in a
close neighborhood of the steady state and expect that frequent integer con-
trol feedback needs to be applied to counteract the runaway behavior. This
is shown in table 9.4 and figure 9.7 again for an initial value of x(0) = 0.05
and choices of increasingly fine equidistant control discretizations. The inte-
ger feasible SUR–0.5 solution succeeds in approximating the solution of the
relaxed convexified problem (9.6), while the relaxed nonlinear one shows a
much lower objective, as expected from theorem 2.4. Note that for m = 320
the sum–up rounding objective is actually better than that of the convexified
relaxed problem, but at the price of violating the end–point constraint. For
all relaxed convexified solutions, one of the m relaxed controls is fractional
as the optimal time for switching from −1 to 0 does not coincide with the
control discretization grid point times. This could be further improved by a
switching time optimization, see e.g. [122, 183], in which the shooting in-
252 9 Numerical Results

terval durations are subject to optimization while the controls are fixed to
the SUR-0.5 solution values.

Relaxed Non- Relaxed Convexified RC and SUR–0.5


m linear Objective Objective Objective Infeasibility
−3 −2 +1
20 3.1952 · 10 2.7054 · 10 2.3484 · 10 1.7060 · 10+1
40 3.1397 · 10−3 2.6014 · 10−2 6.7006 · 10−2 3.1365 · 10−1
80 3.1140 · 10−3 2.5774 · 10−2 4.3250 · 10−2 3.5548 · 10−1
160 3.1018 · 10−3 2.5708 · 10−2 3.0076 · 10−2 8.5880 · 10−2
320 3.0958 · 10−3 2.5696 · 10−2 2.5471 · 10−2 9.2865 · 10−2
640 3.0928 · 10−3 2.5691 · 10−2 2.5810 · 10−2 4.2590 · 10−3
1280 3.0913 · 10−3 2.5691 · 10−2 2.5809 · 10−2 4.2590 · 10−3

Table 9.4: Objective functions and 1–norms of infeasibilities of the solutions to prob-
lem (9.6) shown in figure 9.7. With increasingly finer granularity of the
control discretization, the SUR-0.5 solution succeeds in approaching fea-
sibility of the end point constraint and approximating the objective of the
convexified relaxed problem. The relaxed convexified solution showed one
fractional control for all investigated choices of m.

9.2.2 Constants

Problem (9.4) is simple enough to permit carrying out an explicit derivation


of certain Lipschitz constants and bounds that will be required in the fol-
lowing to demonstrate the contractivity estimate developed for our mixed–
integer real–time iteration scheme.

• The bound on the ODE system’s right hand side after convexifica-
tion f˜(t, x(t)) = x 2 (t) + x(t) on the domain (t, x) ∈ D (x 0 ) = [0, 3] ×
def

[−1, x 0 ] depending on the parameter x 0 > −1 is


def 
sup |x 2 + x| = |x 02 + x 0 | = bf̃ (x 0 ), bf̃ (− 12 + 1
2
5) = 1. (9.7)
D

• The local Lipschitz constant on the ODE system’s right hand side after
convexification f˜(t, x(t)) on D (x 0 ) is

def  
sup |2x + 1| = |2x 0 + 1| = Af̃ (x 0 ), Af̃ (− 12 + 1
2
5) = 5. (9.8)
D
9.2 Mixed–Integer NMPC Scheme Contractivity 253

1 1

w(t)
x(t)

0.5 0
0 -1
0 1 2 3 0 1 2 3
t [s] t [s]
(a) State trajectory x(·) for m = 20. (b) SUR-0.5 control trajectory w(·) for m = 20.
0 1

w(t)
x(t)

-0.5 0

-1 -1
0 1 2 3 0 1 2 3
t [s] t [s]
(c) State trajectory x(·) for m = 40. (d) SUR-0.5 control trajectory w(·) for m = 40.
1 1
w(t)
x(t)

0.5 0
0 -1
0 1 2 3 0 1 2 3
t [s] t [s]
(e) State trajectory x(·) for m = 80. (f) SUR-0.5 control trajectory w(·) for m = 80.
0 1
w(t)
x(t)

-0.5 0

-1 -1
0 1 2 3 0 1 2 3
t [s] t [s]
(g) State trajectory x(·), m = 160. (h) SUR-0.5 control trajectory w(·), m = 160.
1 1
w(t)
x(t)

0.5 0
0 -1
0 1 2 3 0 1 2 3
t [s] t [s]
(i) State trajectory x(·), m = 320. (j) SUR-0.5 control trajectory w(·), m = 320.
0.1 1
w(t)
x(t)

0 0
-0.1 -1
0 1 2 3 0 1 2 3
t [s] t [s]
(k) State trajectory x(·), m = 640. (l) SUR-0.5 control trajectory w(·), m = 640.

Figure 9.7: Sum–up rounding integer solution for problem (9.6) attempting to keep
the process in a neighborhood of its instable steady state, starting from
an initial value of x(0) = 0.05 Solutions are shown for different granu-
larities m = 20, 40, 80, 160, 320, 640 of the control discretization.
254 9 Numerical Results

• The two contraction constants κ and ω of theorem 4.3 and the bound
β on the norm of M̃ k+1 (y k+1 ) are not easily derived explicitly. We in-
stead compute underestimates after every SQP iteration of the classi-
cal real–time iteration scheme on the problem (9.6) using definitions
3.12 and 3.13. The maximal underestimators obtained over 100 real–
time iterations for various initial values and control discretizations are
shown in figure 9.8 from which we determine κ  0.34 and ω  0.56.
The norm bound β depends on m and we find β = 26.67 for m = 20.

1 1

0.5 0.5
κ

0 0
-0.5 0 0.5 -0.5 0 0.5
x meas x meas

(a) Estimates of contraction constant κ. (b) Estimates of contraction constant ω.

Figure 9.8: Maximal underestimators of the contraction constants κ and ω accord-


ing to definitions 3.12 and 3.13 for the convexified example (9.6), com-
puted for various initial values x meas and control discretizations m = 20
(· · · ), m = 40 (· · · ), m = 80 (· · · ), and m = 160 (· · · ).

It is worth noting that figure 9.8 reveals a frequently observed advantage


of direct multiple shooting. As the number m of introduced multiple shooting
nodes increases, the nonlinearity of the boundary value problem estimated
by ω decreases, which helps to improve the speed of convergence. For a
special case proof of this property see [6].

9.2.3 Sampling Time Estimate

In figure 9.9 primal state and control component and dual matching con-
dition Lagrange multiplier components of the Newton step modification
q
M̃ k+1 (y k+1 )J k (y k )e k (y k ) can be seen for the worst–case choice ek = 1 and
increasingly fine control discretizations, i.e., shorter sampling times δt .
Clearly, the primal component sk+1 and the dual one λk belonging to the
9.2 Mixed–Integer NMPC Scheme Contractivity 255

matching condition coupling to shooting node k + 1 dominate the step mod-


ification.

1 1

0.5
0.5
0

-0.5 0
0 20 40 60 80 0 20 40 60 80
Shooting Node Shooting Node

(a) Primal part; state and control components (b) Matching condition Lagrange multiplier
alternate. part.

Figure 9.9: State and control part and matching condition Lagrange multiplier part
of the term M̃ k+1 (y k+1 )J k (y k )e k (y k ) for the first mixed–integer real–time
q
iteration of the example problem (9.4). The modification ek = 1 and m =
10 (· · · ), m = 20 (· · · ), m = 40 (· · · ), m = 80 (· · · ) shooting intervals
were chosen. The components of the additional vector term arising in
the κ–condition due to the inexactness introduced to cover rounding of
the control approach zero as the length of the first shooting interval
decreases.

With the determined constants, the estimate provided by theorem 4.7 in


chapter 4 yields an upper bound on δt determined by the solution of

2
β b f˜ δt exp(A f˜ δt) < ω
(1 − κ)2 , (9.9)

for δt , which is not analytically available. For m = 20 shooting intervals and


using the worst–case constants at hand, i.e., κ = 0.34, ω = 0.56, β = 26.67,
1 1
 
and if choosing x(t)  − + 5 for all t which leads to b f˜ = 1 and Ad̃ = 5,
2 2
this estimate evaluates to δt < 0.052s. Hence we may expect the mixed–
integer real–time iteration scheme to successfully control the process for
a choice of m = 20 and e.g. δt = 0.05. Figure 9.11 shows the trajectory
and controls produced by 2000 seconds of mixed–integer real–time itera-
tions with δt = 0.05, i.e., 40,000 iterations. The process is successfully kept
in a small neighborhood of the instable steady state x = 0 (figure 9.10a)
with a maximum deviation of about 0.03 (figure 9.10b). The computed inte-
ger control trajectory chatters between the three admissible values (figure
256 9 Numerical Results

9.10d). A discrete Fourier transformation of the control trajectory (figure


9.10c) clearly reveals periodicity of the obtained control.

1
0.1

x(t)
x(t)

0 0
-0.1
-1
0 500 1000 1500 2000 1000 1005 1010
t [s] t [s]
(a) State trajectory x(·) for δt = 0.05s. (b) Details of the state trajectory for t ∈
[1000s, 1010s].

1 1
w(t)
0.5 0

0 -1
0 5 10 1000 1005 1010
f [Hz] t [s]
(c) Amplitude spectrum of control trajectory (d) Details of the control trajectory for t ∈
w(·). [1000s, 1010s].

Figure 9.10: 2000 seconds of successfully contracting mixed–integer real–time itera-


tions that keep the process (9.6) in a neighborhood of its instable steady
state, starting from an initial value of x(0) = 0.05. As expected from the
contractivity estimate, the mixed–integer real–time iteration scheme is
able to control the process for a sampling time of δt = 0.05s. The chat-
tering integer control exhibits two significant frequencies as shown by
the amplitude spectrum obtained by discrete Fourier transformation of
the computed integer control trajectory in figure 9.10c.

Note, however, that the bound δt < 0.052s is neither a necessary nor
a sufficient condition and will in general not be tight, as we have under-
estimated the contraction constants κ and ω, overestimated the quantity
(1−κ)||Δỹ k ||, and overestimated the actually applying bounds and Lipschitz
constants by choice of D . In addition, larger bounds on the sampling times
δt are obtained if more restrictive upper bounds imposed on the deviation
of x(·) from zero can be satisfied. Figures 9.11 and 9.12 show trajectories
and controls produced with gradually growing sampling times δt . It is eas-
ily seen that the mixed–integer real–time iteration scheme is able to keep
the process in a close neighborhood of the instable steady state as long as
the perturbation of the system state due to rounding does indeed satisfy the
increasingly strict bounds imposed by the larger sampling times.
9.2 Mixed–Integer NMPC Scheme Contractivity 257

For the example (9.4, 9.6) at hand, we have chosen to track the instable
steady state for which, due to the exponential runaway behavior of the pro-
cess, we may expect the derived estimate to be quite close to the actual
bounds on δt that can be observed by numerical computations. Indeed we
can analyze the solution obtained for the first sampling time δt = 0.15s that
lead to failure of the scheme. We find from figure 9.12 that the offending
perturbation of the process is x 0 = 0.3875, leading to the maximal underes-
timators κ = 0.14 and ω = 0.56 for the contraction constants as seen from
figure 9.8, and to b f˜ = 0.54 and A f˜ = 1.78 derived from equations (9.7) and
(9.8). Indeed, for these constants our mixed–integer real–time iteration con-
tractivity estimate yields the (certainly not tight) upper bound δt < 0.140s,
indicating in agreement with our numerical observations that the chosen
sampling time of 0.15s is too large to expect contractivity of the scheme if
faced with a deviation of 0.3875.

9.2.4 Observations

Two noteworthy observations can be made about the obtained integer feed-
back control trajectories. First, in figures 9.10, 9.11 and 9.12 discrete
Fourier transformations of the chattering control trajectories are shown in
place of the actual trajectory that could not possibly be represented in print.
From these figures, it can be easily seen that all stable feedback schemes
generate controls that exhibit two distinct periodic chattering frequencies.
In contrary, the control does not exhibit such a periodicity for all diverging
schemes, as indicated by the obvious lack of a distinct peak in the amplitude
spectrum.

x 0,max 0.618 0.5 0.4 0.3875 0.3 0.2 0.1

κ 0.34 0.17 0.15 0.15 0.15 0.15 0.15


b f˜ 1.00 0.75 0.56 0.54 0.39 0.24 0.11
A f˜ 2.24 2.00 1.80 1.78 1.60 1.40 1.20

δt max in s 0.052 0.101 0.136 0.140 0.185 0.275 0.489

Table 9.5: Upper bounds on δt for example (9.6), depending on upper bounds on
x(t). The values ω = 0.56 and β = 26.67 are independent of the bound
on x(t).
258 9 Numerical Results

Second, phase diagrams of the process state and integer feedback con-
trol as shown in figures 9.13 lead us to the observation that for all stable
schemes, one or more small neighborhoods of process states can be associ-
ated with each admissible integer control. The chattering feedback control
trajectories could essentially be generated by a finite state machine with
four states (figure 9.13a for δt = 0.05s) or three states (figures 9.13c and
9.13d for δt  0.1s). In figure 9.13b for δt = 0.075s an overlay of both
is observed as the sampling time increases. In contrary, this phenomenon
cannot be observed for any of the diverging schemes in figure 9.14. Both
observations certainly merit further detailed investigations.
Figure 9.11 shows 2000 seconds of successfully contracting mixed–
integer real–time iterations that keep the process (9.6) in a neighborhood
of its instable steady state, starting from an initial value of x(0) = 0.05.
The mixed–integer real–time iteration scheme is able to control the process
also for the larger sampling times δt = 0.075s, δt = 0.1s, and δt = 0.125s.
The maximum deviation of the process trajectory from the instable steady
state x(t) = 0 remains bounded by ±0.1, such that the obtained estimate
δt < 0.052 is overly conservative.
Figure 9.12 shows non–contracting mixed–integer real–time iterations
failing to keep the process (9.6) in a neighborhood of its instable steady
state, starting from an initial value of x(0) = 0.05. As expected from the
contractivity estimate, the mixed–integer real–time iteration scheme fails
for sampling times δt  0.15. Note how the amplitude spectrum no longer
exhibits any significant frequency of the erratically chattering integer con-
trol. The scheme fails to contract and runaway of the process is observed
within the time bound of 2000 seconds once the respective bound seen from
table 9.5 is violated. Starting with δt = 0.15s in figure 9.12, the system’s be-
havior becomes more and more erratic and fails to track the instable steady
state.

9.2.5 Summary

In this section we investigated the newly developed mixed–integer real–time


iteration scheme of chapter 4 at the example of a small nonlinear system due
to [51] that shows finite–time blowup of the solution if left uncontrolled. This
system was to be kept in a neighborhood of its instable steady state applying
one of three possible integer control choices. The simplicity of the problem
allowed to explicitly derive certain bounds and Lipschitz constants and we
9.2 Mixed–Integer NMPC Scheme Contractivity 259

provided numerical estimates of required contractivity constants. The devel-


oped sampling time estimate was applied to the problem and the obtained
sampling time of 0.05s yielded a highly periodic chattering integer control
that kept the system stable over the whole of the examined period of 2000
seconds. Tighter bounds on the maximum deviation from the instable steady
state led to larger admissible sampling times and corresponding solutions
were presented. In accordance with the predictions made by our developed
sampling time estimate, the mixed–integer real–time iteration scheme failed
to control the investigated system as soon as its deviation from the instable
steady state violated the boundedness assumption used to derive the sam-
pling time estimate. Future work includes the more detailed investigation
of the chattering behavior of the obtained integer feedback controls.
260 9 Numerical Results

1
0.1

x(t)
x(t)

0 0
-0.1
-1
0 500 1000 1500 2000 1000 1005 1010
t [s] t [s]
(a) State trajectory x(·) for δt = 0.075s. (b) State trajectory details for [1000s, 1010s].
1 1

w(t)
0.5 0

0 -1
0 5 10 1000 1005 1010
f [Hz] t [s]
(c) Amplitude spectrum of control trajectory (d) Details of the control trajectory for t ∈
w(·). [1000s, 1010s].
1
0.1
x(t)
x(t)

0 0
-0.1
-1
0 500 1000 1500 2000 1000 1005 1010
t [s] t [s]
(e) State trajectory x(·) for δt = 0.1s. (f) State trajectory details for [1000s, 1010s].
1 1
w(t)

0.5 0

0 -1
0 5 10 1000 1005 1010
f [Hz] t [s]
(g) Amplitude spectrum of control trajectory (h) Details of the control trajectory for t ∈
w(·). [1000s, 1010s].
1
0.1
x(t)
x(t)

0 0
-0.1
-1
0 500 1000 1500 2000 1000 1005 1010
t [s] t [s]
(i) State trajectory x(·) for δt = 0.125s. (j) State trajectory details for [1000s, 1010s].
1 1
w(t)

0.5 0

0 -1
0 5 10 1000 1005 1010
f [Hz] t [s]
(k) Amplitude spectrum of control trajectory (l) Details of the control trajectory for t ∈
w(·). [1000s, 1010s].
Figure 9.11: Contracting mixed–integer real–time iterations for example (9.6).
9.2 Mixed–Integer NMPC Scheme Contractivity 261

1 1
x(t)

x(t)
0 0

-1 -1
0 100 200 300 370 375 380 385
t [s] t [s]
(a) State trajectory x(·) for δt = 0.15s. (b) State trajectory near point of divergence.
1 1

w(t)
0.5 0

0 -1
0 5 10 370 375 380 385
f [Hz] t [s]
(c) Amplitude spectrum of control trajectory (d) Control trajectory near point of diver-
w(·). gence.
1 1
x(t)

x(t)

0 0
-1 -1
0 200 400 550 555 560 565
t [s] t [s]
(e) State trajectory x(·) for δt = 0.175s. (f) State trajectory near point of divergence.
1 1
w(t)

0.5 0

0 -1
0 5 10 550 555 560 565
f [Hz] t [s]
(g) Amplitude spectrum of control trajectory (h) Control trajectory near point of diver-
w(·). gence.
1 1
x(t)

x(t)

0 0

-1 -1
0 200 400 600 800 860 865 870 875
t [s] t [s]
(i) State trajectory x(·) for δt = 0.2s. (j) State trajectory near point of divergence.
1 1
w(t)

0.5 0

0 -1
0 5 10 860 865 870 875
f [Hz] t [s]
(k) Amplitude spectrum of control trajectory (l) Control trajectory near point of diver-
w(·). gence.
Figure 9.12: Mixed–integer real–time iterations failing to control example (9.6).
262 9 Numerical Results

Figure 9.13: Phase space diagrams of the mixed–integer real–time iterates for grad-
ually increasing sampling times. Choices δt = 0.05s, 0.075s, 0.1s,
0.125s for the sampling time succeed in controlling the system (9.6).

Figure 9.14: Phase space diagrams of the mixed–integer RTI for gradually increasing
sampling times. Choices δt = 0.15s, 0.175s, 0.2s for the sampling time
result in state trajectories that ultimately violate the estimated upper
bound on x(t) derived from the choice of δt and diverge.
9.3 OCPs and NLPs with Vanishing Constraints 263

9.3 OCPs and NLPs with Vanishing Constraints

In this section we investigate an autonomous robot path–following and


communication problem that has frequently been studied in the litera-
ture, see e.g. [2] and the references found therein. We give an Nonlinear
Program (NLP) formulation of this problem that includes vanishing con-
straints that model communication restrictions. These constraints violate
constraint qualifications and lead to severe ill–conditioning as detailed in
chapter 5. We give a reformulation of this problem as an ODE dynamic op-
timal control problem with vanishing constraints. We show that the noncon-
vex active set SQP method developed in this thesis is indeed able solve this
problem to optimality, even though it is unrelated to the outer convexifica-
tion reformulation for which our method has been developed. We compared
the obtained solutions to those obtained for the ill–posed NLP formulation
using the popular interior point method IPOPT [214, 215].

9.3.1 A Multiple Robot Path Coordination Problem

The multiple robot path coordination problem arises in autonomous explo-


ration and surveillance of areas by a swarm of autonomous vehicles referred
to as robots. These robots shall traverse the designated area on predefined
paths and can decide autonomously on acceleration or braking. The swarm

s
a, v
y

Figure 9.15: Schematic of a single robot with states and controls.

of n > 1 robots shall maintain a communication network which, for the pur-
pose of our investigation, is modelled by a maximum transmission or com-
munication radius T > 0, and a minimum connectivity K > 0. At all times,
264 9 Numerical Results

each of the n robots may communicate with one or more of the other robots
inside its communication radius. The swarm is expected to maintain connec-
tivity by ensuring at all times that each robot can communicate with at least
K other robots. The goal is for all robots to reach the final point of their re-
spective predefined paths under these constraints. This of course may mean
for some of the robots to advance slower or to wait in appropriate positions
in order to uphold connectivity of the entire swarm.

4
y

0
0 2 4 6 8 10
x

Figure 9.16: Predefined paths to be completed by the swarm of ten robots, cf. [2].

In this section, we present a variant of an NLP formulation for this prob-


lem due to [2] and develop an ODE dynamic optimal control problem formu-
lation with vanishing constraints. Obviously, decreasing the communication
radius T or increasing the connectivity requirement K increases the diffi-
culty of this problem as the set of feasible solutions shrinks until the prob-
lem becomes infeasible for too small values of T or too large values of K . A
specific instance of this problem for n = 10 robots is given by the predefined
paths whose cartesian coordinates (x, y) ∈ 2 in the plane are described by
the piecewise cubic spline paths found in [124].

9.3.2 NLP Problem Formulation and Solution

Our NLP formulation of this multiple robot path coordination problem is


given in (9.10).
9.3 OCPs and NLPs with Vanishing Constraints 265

min hm (9.10a)
a,c,s ,
v,x ,y,h


3
s. t. x i, j = αx, j,k,l (si, j − τ j,k−1 )l ∀i, j, si, j ∈ [τ j,k−1 , τ jk ],
l=0
(9.10b)

3
yi, j = αy, j,k,l (si, j − τ j,k−1 )l ∀i, j, si, j ∈ [τ j,k−1 , τ jk ],
l=0
(9.10c)
0 = x m j − ex, j ∀ j, (9.10d)
0 = ym j − ey, j ∀ j, (9.10e)
n
K ci, j1 , j2 − 1 ∀i, j1 , (9.10f)
j2 =1

0  (T − di, j1 , j2 )ci, j1 , j2 ∀i, j1 , j2 , (9.10g)


h
si, j = si−1, j + (v
2 i, j−1
+ vi, j ) ∀i, j, (9.10h)

vi, j = vi−1, j + hai, j ∀i, j, (9.10i)


0  si, j  τ j,5 ∀i, j, (9.10j)
0  vi, j  0.5 ∀i, j, (9.10k)
−1  ai, j  0.5 ∀i, j, (9.10l)
0  ci, j  1 ∀i, j. (9.10m)

Symbol Dimension Description

a m×n ai, j is the acceleration of robot j in [τi−1 , τi ]


c m×n×n ci, j1 , j2 > 0 if robots j1 and j2 can communicate at time τi
h 1 The length in seconds of each of the m time intervals
s m×n si, j is the spline position parameter of robot j at time τi
v m×n vi, j is the tangential velocity of robot j at time τi
(x , y) m×n (x i, j , yi, j ) are the cartesian coordinates of robot j at τi

Table 9.6: Variables of the NLP formulation for the robot path coordination problem.
266 9 Numerical Results

An overview of the variables used in this formulation can be found in


table 9.6. In all equations we assume i ∈ {1, . . . , m}, j, j1 , j2 ∈ {1, . . . , n}. In
addition, we define the initial positions, velocities, and start point of the
spline parameterization as
def def def
s0, j = 0, v0, j = 0, τ j,0 = 0. (9.11)

We further require the definitions of the two distance functions di, j of robot
j to the endpoint and di, j1 , j2 of robot j1 to robot j2 ,

def

di, j = (x i j − ex, j )2 + ( yi j − ey, j )2 , (9.12a)
def

di, j1 , j2 = (x i, j1 − x i, j2 )2 + ( yi, j1 − yi, j2 )2 , (9.12b)

wherein (ex, j , ey, j ) ∈ 2 are the terminal points of the n spline paths.
In problem (9.10) we have discretized the time horizon required for com-
pletion of the scenario into m > 0 intervals of equidistant length h subject
to optimization The optimal objective then is t max = hm. Constraints (9.10b)
and (9.10c) determine the cartesian coordinates of robot j at time point i re-
quired for distance computations, given the robot’s advance si j on the spline
path. Constraints (9.10d) and (9.10e) ensure that all robots actually have ar-
rived at their final destinations (ex, j , ey, j ) at the end of the time horizon. The
mentioned communication constraint is (9.10f) which requires each robot j1
to be within the communication range of at least K other robots. This com-
munication range is computed in (9.10g) which forces the communication
flag ci, j1 , j2 to zero if the pair ( j1 , j2 ) of robots is farther apart than the trans-
mission radius T . This constraint takes the shape of a vanishing constraint
as presented in chapter 5. Note that in this case there is no outer convexi-
fication reformulation behind this constraint. Constraint (9.10h) and (9.10i)
are discretizations of the integration of the acceleration and the tangential
velocity v(t) along the spline path. Constraints (9.10j), (9.10k), and (9.10l)
impose simple upper and lower bounds on the position of the robot on the
spline path, the tangential velocity of the robot, and the acceleration of the
robot.
Snapshots of the optimal solution of this particular problem for T = 2.5
and K = 2 at different times t ∈ [t 0 , t f ] are shown in figure 9.17. Circles
denote the communication radius of each robot. Note the active communi-
cation constraint for the lower right robot at t ∈ [0.6h, 0.7h] and at t = 0.9h.
Problem (9.10) is a variation of the formulation presented in [2]. It dif-
9.3 OCPs and NLPs with Vanishing Constraints 267

(a) t = 0s. (b) t = 0.1h. (c) t = 0.2h.

(d) t = 0.3h. (e) t = 0.4h. (f) t = 0.5h.

(g) t = 0.6h. (h) t = 0.7h. (i) t = 0.8h.

(j) t = 0.9h. (k) t = t f .

Figure 9.17: Snapshots of the optimal solution to problem (9.10) for a communica-
tion radius T = 2.5 and constraint K = 2 at different times t ∈ [0s, t f ],
where t f = h = 7.995748s.

fers in allowing for fractional objective function values t max = hm whereas


the reference employed a formulation that is restriced to integral ones. In
order to achieve better comparability to our ODE dynamic formulation, we
introduced acceleration of the robots as independent variables and modified
268 9 Numerical Results

(9.10h) accordingly, whereas the reference imposed a secant constraint on


the velocities.

Choice of Initial Values

Problem (9.10) may for certain choices of the constraint parameters T and
K have several local minima due to nonlinearity of the spline paths. The
choice of initial values therefore is crucial to maintain comparability. We
choose for all computations

a = 0, c = 1, s = 0, v = 1, (x , y) = (0, 0). (9.13)

NLP Solutions by IPOPT

Choosing a discretization of m = 10 intervals and a swarm of n = 10 robots,


the NLP formulation of this problem has 1461 unknowns and 920 inequal-
ity constraints, 450 of which are vanishing constraints, and 380 equality
constraints.

The time optimal solution for this formulation in absence of any commu-
nication constraint (i.e., K = 0), and hence in absence of any combinatorial
structure in the problem, is 7.99575 seconds after 30 interior point itera-
tions. Table 9.7 lists the solutions found by IPOPT (version 3.6) for choices
of the maximal communication distance T from 2 to 5 in steps of one half,
and for choices of the communication constraint K from 1 to 9. For all prob-
lem instances that could be solved successfully, the objective function t max
is shown together with the number of required interior point iterations.

Failure to converge to a locally optimal solution is indicated by (F).


For these instances IPOPT without exception terminates with the message
“Restoration phase converged to a feasible point that is unacceptable to the
filter for the original problem. Restoration phase in the restoration phase
failed.”, indicating high degeneracy, wrong derivatives, or lack of constraint
qualification as is the case for the problem at hand. Empty cells belong to
instances that have been found infeasible by the AMPL presolve step.

From table 9.7 it can be clearly deduced that the violations of constraint
qualification due to the combinatorial structure of the problem pose a sig-
nificant challenge to this pure NLP solver. For low values of the commu-
nication constraint K that do not cut off a significant part of the possible
9.3 OCPs and NLPs with Vanishing Constraints 269

T Communication Constraint K
1 2 3 4 5 6 7 8 9

2.0 (F)
6512

2.5 (F) 24.1320 26.2376 33.2259


2935 2233 2026 1755

3.0 (F) (F) (F) 20.2341 22.3159


200 160 185 1774 1202

3.5 (F) (F) (F) (F) 17.9407


2415 1533 1691 1022 1045

4.0 7.99575 7.99575 7.99575 (F) (F) 25.7857 25.8223 42.5870


1580 868 2412 866 1905 406 506 417

4.5 (F) (F) 7.99575 (F) 7.99575 7.99575 7.99575 30.9573 37.4242
166 126 1197 164 409 993 1363 73 55

5.0 7.99575 7.99575 7.99575 7.99575 (F) 7.99575 7.99575 7.99575 20.4304
339 397 363 379 91 474 373 567 41

Table 9.7: Objective function values and iteration counts for the locally optimal so-
lutions found by AMPL and IPOPT (version 3.6) for NLP (9.10). Failure to
converge to a locally optimal solution is indicated by (F). Solutions that
are better than the ones found by our software package MuShROOM are
printed in boldface, all others are inferior ones or are identical.

combinatorial choices, the iteration counts grow noticably and failures of


convergence can be observed for 15 of the 41 instances. In addition, incon-
sistencies can be seen in table 9.7 for instances (T, K) = (4.0, 4), (4.0, 5),
(4.5, 4) and (5.0, 4) which failed to converge to a locally optimal solution
even though all adjacent instances did.

We close this investigation with the important note that the observed be-
havior of IPOPT is expected and can be understood from our analysis in
chapter 5. We refer to e.g. [3, 105] for techniques for numerically efficient
treatment of vanishing constraints in an interior point method; techniques
that clearly cannot be expected to be present in the default configuration of
IPOPT.
270 9 Numerical Results

9.3.3 Dynamic Optimal Control Problem Formulation and Solution

We now give an ODE dynamic optimal control problem formulation for (9.10)
that fits into the general problem class (1.15) of chapter 1.

min h (9.14)
a(·),s (·),v(·)
c(·),x (·),y(·),h

s. t. ṡ j (t) = hv j (t), t ∈ T , ∀ j,
v̇ j (t) = ha j (t), t ∈ T , ∀ j,

3
x j (t) = αx, j,k,l (s j (t) − τ j,k−1 )l , t ∈ T , ∀ j,
l=0

s j (t) ∈ [τ j,k−1 , τ jk ],

3
y j (t) = αy, j,k,l (s j (t) − τ j,k−1 )l , t ∈ T , ∀ j,
l=0

s j (t) ∈ [τ j,k−1 , τ jk ],
0 = x j (t f ) − ex, j ∀ j,
0 = y j (t f ) − ey, j ∀ j,
n
K c j1 , j2 (t) − 1, t ∈ T , ∀ j1 ,
j2 =1
 
0  T − d j1 , j2 (t) c j1 , j2 (t), t ∈ T , ∀ j1 , j2 ,
0  s j (t)  τ j,5 , t ∈ T , ∀ j,
0  v j (t)  0.5, t ∈ T , ∀ j,
−1  a j (t)  0.5, t ∈ T , ∀ j,
0 = s j (t 0 ) ∀ j,
0 = v j (t 0 ) ∀ j,
0  c j (t)  1, t ∈ T , ∀ j.

In all equations we again assume i ∈ {1, . . . , m}, j, j1 , j2 ∈ {1, . . . , n}, and


def
the normalized time horizon is T = [0, 1] ⊂ . Note again the vanishing
constraint defining the communication function c j1 , j2 (t) for the pair ( j1 , j2 ) of
robots. After applying a direct multiple shooting discretization with m = 10
9.3 OCPs and NLPs with Vanishing Constraints 271

shooting intervals, all constraints are enforced in the shooting nodes only,
as was the case for the time–discrete NLP (9.10). The ODE defining s(·) and
v(·) is solved by a fixed–step 4th–order Runge–Kutta method, differing from
(9.10) which used a single Euler step. As the exact solution to the ODEs is
quadratic in a j (t) which is constant on each shooting interval, the obtained
numerical solutions are identical up to machine precision.

Optimal Control Problem Solutions by MuShROOM

The ODE dynamic optimal control problem formulation (9.14) with n = 10


robots has nx = 21 differential state trajectories (including the Lagrangian
objective) and nu = 55 control trajectories. The multiple shooting discretiza-
tion of the OCP with m = 10 multiple shooting intervals has 836 unknowns,
550 inequality constraints of which 450 are vanishing constraints, and 10
equality constraints.
The time optimal solution for this formulation in absence of any commu-
nication constraint (i.e., K = 0), and hence in absence of any combinatorial
structure in the problem, is 7.995748 seconds after 14 SQP iterations and
agrees up to the sixth digit with the one found by IPOPT for the NLP formu-
lation. Table 9.8 lists the solutions found by our nonconvex SQP method of
chapter 6 for choices of the maximal communication distance T from 2 to 5
in steps of one half, and for choices of the communication constraint K from
1 to 9.
For all problem instances that could be solved successfully, the objective
function t max is shown together with the number of SQP and nonconvex SQP
iterations. Failure to converge to a locally optimal solution due to infeasibil-
ity of a Quadratic Program with Vanishing Constraints (QPVC) subproblem
is indicated by (F). Again, empty cells belong to instances that have been
found infeasible by the AMPL presolve step.
As can be seen from table 9.8 our nonconvex active set method succeeds
in identifying an optimal solution of problem (9.14) for 38 of the 41 in-
stances, and finds the globally optimal one resp. one that equals or beats
the one identified by IPOPT in 36 of the 41 instances. Notably different from
the previous table 9.7, we manage to find a solution for all cases with low
values of K that contain most of the combinatorial structure of the feasi-
ble set. Most QPVC iteration counts are smaller than the respective interior
point iteration counts, which shows a performance advantage given that an
active set exchange is significantly cheaper than an interior point iteration.
272 9 Numerical Results

T Communication Constraint K
1 2 3 4 5 6 7 8 9

2.0 28.0376
15/1254

2.5 7.99575 7.99575 33.5581 52.44043


14/1014 15/728 10/914 13/1004

3.0 7.99575 7.99575 9.88516 10.01863 (F)


13/818 14/659 19/773 47/11257

3.5 7.99575 7.99575 7.99575 8.97033 17.9407


13/751 13/760 14/792 23/1823 15/1294

4.0 7.99575 7.99575 7.99575 7.99575 7.99575 12.1859 25.8223 42.5870


13/644 13/645 13/658 13/667 13/725 13/649 9/1096 15/1459

4.5 7.99575 7.99575 7.99575 7.99575 7.99575 7.99575 7.99575 16.7284 (F)
13/658 12/632 13/636 13/630 13/692 18/951 14/1035 14/1381

5.0 7.99575 7.99575 7.99575 7.99575 7.99575 7.99575 7.99575 7.99575 (F)
13/624 13/599 13/602 13/594 13/625 13/652 13/773 12/891

Table 9.8: Objective function values and SQP and QPVC iteration counts for the lo-
cally optimal solutions found for problem (9.14) by the software package
MuShROOM developed in this thesis. Instances found to be infeasible by the
AMPL presolve step have not been evaluated. Termination due to infeasi-
bility of a QPVC subproblem is indicated by (F). Solutions better than the
ones found by IPOPT are printed in boldface, all others are identical or
inferior ones.

We fail to identify a solution for the largest feasible choice of K in three


cases, and converge to a locally optimal solution that is inferior to the one
found by IPOPT in two further cases. This may be attributed to the lack of an
efficient globalization strategy in our nonconvex SQP algorithm, which has
been omitted from the investigations in this thesis in view of the targeted
model–predictive application.

9.3.4 Summary

In this section we investigated an NLP and an OCP formulation of a multi–


robot pathfinding and communication problem frequently considered in the
literature, cf. e.g. [2] and the references found therein. The problem fea-
tures combinatorial constraints on the communication ability of the robot
9.3 OCPs and NLPs with Vanishing Constraints 273

swarm and can in its NLP or direct multiple shooting discretized OCP vari-
ant be cast as a MPVC. By varying the communication radius and connec-
tivity constraint, 41 feasible instances of this problem were created. We
demonstrated the findings of our investigation in chapter 5 at the exam-
ple of a popular interior point method without provision for MPVC and —
as expected — found this method to fail on a significant number of the ex-
amined problem instances. It should be noted that appropriate relaxation
schemes as e.g. briefly presented in chapter 5 can be employed to ensure
convergence of interior point method on MPVC, cf. e.g. [3, 105] for details.
We examined the numerical behavior of our developed nonconvex SQP and
active set QP algorithms and could solve to optimality all but three problem
instances. Future work includes a globalization method for our nonconvex
SQP algorithm that promises to allow for the solution of the remaining three
unsolved instances.
274 9 Numerical Results

9.4 Block Structured Factorization and Updates

In this section we investigate the performance of our block structured ac-


tive set QP solver qpHPSC at the example of a nonlinear time optimal mixed–
integer control problem treated in the papers [119, 120, 122, 187] and in
[80, 81] who also gives run times for a branch & bound based solution ap-
proach and a switching time optimization approach.

9.4.1 Vehicle Model

We give a brief description of the nonlinear vehicle dynamics that can be


found in more detail in e.g. [80, 122]. We consider a single-track model,
derived under the simplifying assumption that rolling and pitching of the
car body can be neglected. Consequentially, only a single front and rear
wheel are modeled, located in the virtual center of the original two wheels.
Motion of the car body is considered on the horizontal plane only.

Figure 9.18: Coordinates and forces in the single-track vehicle model. The figure
aligns with the vehicle’s local coordinate system while dashed vectors
denote the earth-fixed coordinate system chosen for computations.

Four controls represent the driver’s choice on steering and velocity, and
are listed in table 9.9. We denote with wδ the steering wheel’s angular ve-
locity. The force FB controls the total braking force, while the accelerator
pedal position ϕ is translated into an accelerating force according to the
torque model presented in (9.25). Finally, the selected gear μ influences
the effective engine torque’s transmission ratio. The single-track dynamics
are described by a system of ordinary differential equations. The individual
system states are listed in table 9.10. Figure 9.18 visualizes the choice of
coordinates, angles, and forces. Equations of motion are derived as follows.
9.4 Block Structured Factorization and Updates 275

Name Description Domain Unit

wδ Steering wheel angular velocity [−0.5, 0.5] rad


s
FB Total braking force [0, 1.5 · 104 ] N
ϕ Accelerator pedal position [0, 1] –
μ Selected gear {1, . . . , nμ } –

Table 9.9: Controls used in the single–track vehicle model.

The center of gravity is denoted by the coordinate pair (cx , cy ) which is


obtained by integration over the directional velocity,
 
ċx (t) = v(t) cos ψ(t) − β(t) , (9.15a)
 
ċy (t) = v(t) sin ψ(t) − β(t) . (9.15b)

Acceleration is obtained from the sum of forces attacking the car’s mass m
in the direction of driving,

1 # μ
  
v̇(t) = Flr − FAx cos β(t) + Flf cos δ(t) + β(t) (9.16)
m
   $
− Fsr − FAy sin β(t) − Fsf sin δ(t) + β(t) .

The steering wheel’s angle is obtained from the corresponding controlled


angular velocity,

δ̇(t) = wδ . (9.17)

The slip angle’s change is controlled by the steering wheel and counter-
acted by the sum of forces attacking perpendicular to the car’s direction of
driving. The forces’ definitions are given in (9.21ff).

1 #   
β̇(t) = wz (t) − Flr − FAx sin β(t) + Flf sin δ(t) + β(t) (9.18)
m v(t)
   $
+ Fsr − FAy cos β(t) + Fsf cos δ(t) + β(t) .

The yaw angle is obtained by integrating over its change wz ,

ψ̇(t) = wz (t), (9.19)

which in turn is the integral over the sum of forces attacking the front wheel
276 9 Numerical Results

Name Description Unit

cx Horizontal position of the car m


cy Vertical position of the car m
m
v Magnitude of directional velocity of the car
s
δ Steering wheel angle rad
β Side slip angle rad
ψ Yaw angle rad
rad
wz Yaw angle velocity
s

Table 9.10: Coordinates and states used in the single–track vehicle model.

in direction perpendicular to the car’s longitudinal axis of orientation,

1 
ẇz (t) = Fsf lf cos δ(t) − Fsr lsr − FAy eSP + Flf lf sin δ(t) . (9.20)
Izz

We now list and explain the individual forces used in this ODE system. We
first discuss lateral and longitudinal forces attacking at the front and rear
wheels. In view of the convex reformulation we’ll undertake later, we con-
sider the gear μ to be fixed and denote dependencies on the selected gear
by a superscript μ. The side (lateral) forces on the front and rear wheels
as functions of the slip angles αf and αr according to the so-called magic
formula due to [164] are
#  $
def
Fsf,sr (αf,r ) = Df,r sin Cf,r arctan Bf,r αf,r − Ef,r (Bf,r αf,r − arctan(Bf,r αf,r )) , (9.21)

The front slip and rear slip angles are obtained from
( )
def lf ψ̇(t) − v(t) sin β(t)
αf = δ(t) − arctan , (9.22a)
v(t) cos β(t)
( )
def lr ψ̇(t) + v(t) sin β(t)
αr = arctan . (9.22b)
v(t) cos β(t)

The longitudinal force at the front wheel is composed from braking force FBf
and resistance due to rolling friction FRf

def
Flf = −FBf − FRf . (9.23)

Assuming a rear wheel drive, the longitudinal force at the rear wheel is
9.4 Block Structured Factorization and Updates 277

given by the transmitted engine torque Mwheel and reduced by braking force
μ
FBr and rolling friction FRr . The effective engine torque Mmot is transmitted
twice. We denote by igμ the gearbox transmission ratio corresponding to the
selected gear μ, and by it the axle drive’s fixed transmission ratio. R is the
rear wheel radius.

μ def
igμ it μ
Flr = Mmot (ϕ) − FBr − FRr . (9.24)
R
The engine’s torque, depending on the acceleration pedal’s position ϕ , is
modeled as follows:

μ def μ μ
Mmot (ϕ) = f1 (ϕ) f2 (wmot ) + (1 − f1 (ϕ)) f3 (wmot ), (9.25a)
def
f1 (ϕ) = 1 − exp(−3 ϕ), (9.25b)
def 2
f2 (wmot ) = −37.8 + 1.54 wmot − 0.0019 wmot , (9.25c)
def
f3 (wmot ) = −34.9 − 0.04775 wmot . (9.25d)

μ
Here, wmot is the engines rotary frequency in Hertz. For a given gear μ it is
computed from

μ def
igμ it
wmot = v(t). (9.26)
R
The total braking force FB is controlled by the driver. The distribution to
front and rear wheels is chosen as

def 2 def 1
FBf = FB , FBr = FB . (9.27)
3 3
The braking forces FRf and FRr due to rolling resistance are obtained from

def m lr g def m lf g
FRf (v) = fR (v) , FRr (v) = fR (v) , (9.28)
lf + lr lf + lr

where the velocity-dependent amount of friction is modeled by

fR (v) = 9 · 10−3 + 7.2 · 10−5 v + 5.038848 · 10−10 v 4 .


def
(9.29)

Finally, drag force due to air resistance is given by FAx , while we assume
278 9 Numerical Results

Name Description Value Unit

A Effective flow surface 1.437895 m2


Bf Pacejka tyre model stiffness factor (front) 10.96 –
Br Pacejka tyre model stiffness factor (rear) 12.67 –
Cf , C r Pacejka tyre model shape factor (front, rear) 1.3 –
Df Pacejka tyre model peak value (front) 4560.40 –
Dr Pacejka tyre model peak value (rear) 3947.81 –
Ef , Er Pacejka tyre model curvature factor (front, rear) −0.5 –
Izz Vehicle’s moment of inertia 1752 kg m2
R Wheel radius 0.302 m
cw Air drag coefficient 0.3 –
eSP Distance of drag mount point to center of gravity 0.5 m
kg
g Gravity force 9.81 m s2
igμ Gearbox torque transmission ratio various –
it Engine torque transmission ratio 3.91 –
lf Distance of front wheel to center of gravity 1.19016 m
lr Distance of rear wheel to center of gravity 1.37484 m
m Mass of vehicle 1239 kg
 Air density 1.249512 kg
m3

Table 9.11: Parameters used in the single–track vehicle model.

that no sideward drag forces (e.g. side wind) are present.

def def
FAx = 12 cw Av 2 (t), FAy = 0. (9.30)

The values and units of all model parameters can be found in table 9.11.

Track Model

The double-lane change maneuver presented in [80, 81, 122] is realized by


def
constraining the car’s position onto a prescribed track at any time t ∈ T =
[t 0 , t f ], see Figure 9.19.
Starting in the left position with an initial prescribed velocity, the driver
is asked to manage a change of lanes modeled by an offset of 3.5 meters in
the track. Afterwards he is asked to return to the starting lane. This maneu-
ver can be regarded as an overtaking move or as an evasive action taken
9.4 Block Structured Factorization and Updates 279

Figure 9.19: Track constraints of the double–lane change maneuvre for which a
time–optimal solution is sought in problem (9.33).

to avoid hitting an obstacle suddenly appearing on the straight lane. The


constraints Pl (x) and Pu (x) are given by the following piecewise splines as-
suming a width of B = 1.5 meters for the vehicle,

0 if x ∈ [0, 44],



⎪ 13.5(x − 44)3 if x ∈ [44.0, 44.5],



⎨ 13.5(x − 45)3 + 3.5 if x ∈ [44.5, 45.0],
def
Pl (x) = 3.5 if x ∈ [45.0, 70.0], (9.31a)



⎪ 13.5(70 − x)3 + 3.5 if x ∈ [70.0, 70.5],



⎩ 13.5(71 − x)3 if x ∈ [70.5, 71],
0 if x ∈ [71, 140],

1.9 if x ∈ [0, 15],



⎪ 14.6(x − 15)3 + 1.9 if x ∈ [15.0, 15.5],



⎨ 14.6(x − 16)3 + 5.55 if x ∈ [15.5, 16.0],
def
Pu (x) = 5.55 if x ∈ [16.0, 94.0], (9.31b)



⎪ 13.4(94 − x)3 + 5.55 if x ∈ [94.0, 94.5],



⎩ 13.4(95 − x)3 + 2.2 if x ∈ [94.5, 95.0],
2.2 if x ∈ [95, 140].

9.4.2 Mixed–Integer Time–Optimal Control Problem

Problem Formulation

We denote with x the state vector of the ODE system and by f the corre-
sponding right-hand side function as described in section 9.4.1. The vector
280 9 Numerical Results

u shall be the vector of continuous controls, whereas the integer control


μ(·) will be written in a separate vector,
def
 
x (t) = cx (t) cy (t) v(t) δ(t) β(t) ψ(t) wz (t) , (9.32a)
def
 
u(t) = wδ (t) FB (t) ϕ(t) , (9.32b)
def
 
w (t) = μ(t) . (9.32c)

With this notation, the resulting mixed-integer optimal control problem


reads
 tf
min tf + wδ2 (t) dt (9.33a)
x (·),u(·),w (·),t f
0
 
s.t. ẋ (t) = f t, x (t), u(t), w (t) t ∈ [t 0 , t f ], (9.33b)
6 7
cy (t) ∈ Pl (cx (t)) + 0.75, Pu (cx (t)) − 0.75 t ∈ [t 0 , t f ], (9.33c)
wδ (t) ∈ [−0.5, 0.5] t ∈ [t 0 , t f ], (9.33d)
FB (t) ∈ [0, 1.5 · 104 ] t ∈ [t 0 , t f ], (9.33e)
ϕ(t) ∈ [0, 1] t ∈ [t 0 , t f ], (9.33f)
μ(t) ∈ {1, . . . , nμ } t ∈ [t 0 , t f ], (9.33g)
 
x (t 0 ) = −30, free, 10, 0, 0, 0, 0 , (9.33h)
cx (t f ) = 140, (9.33i)
ψ(t f ) = 0. (9.33j)

By employing the objective function (9.33a) we strive to minimize the to-


tal time t f required to traverse the test course, and to do so with minimal
steering effort wδ (t). At any time, the car must be positioned within the test
course’s boundaries; this requirement is formulated by the double inequal-
ity path constraint (9.33c). The system’s initial values are fixed in (9.33h)
with the exception of the car’s initial vertical position on the track, which
remains a free variable only constrained by the track’s boundary. Finally,
constraints (9.33i, 9.33j) guarantee that the car actually arrives at the end
of the test course driving straight ahead.

Solutions

The ODE system is solved using a fixed–step Runge–Kutta method with 20


steps per shooting interval. We use one–sided finite difference approxima-
tions to the derivatives of all model functions.
9.4 Block Structured Factorization and Updates 281

6
4
cy (t)

2
0
0 20 40 60 80 100 120 140
cx (t)
(a) Car’s trajectory on track, m = 20. Corners are cut as path constraints are enforced in the
shooting nodes only.
40
0.1

ψ(t)
v(t)

20 0
-0.1
0
0 2 4 6 0 2 4 6
t t
(b) Car’s velocity. (c) Car’s yaw angle.
0.1 4
wδ (t)

μ(t)

0
2
-0.1
0 2 4 6 0 2 4 6
t t
(d) Steering wheel angular velocity. (e) Selected gear.
6
4
cy (t)

2
0
0 20 40 60 80 100 120 140
cx (t)
(f) Car’s trajectory on track, m = 160. Constraints are active in the track’s corners.
40
0.1
ψ(t)
v(t)

20 0
-0.1
0
0 2 4 6 0 2 4 6
t t
(g) Car’s velocity. (h) Car’s yaw angle.
0.1 4
wδ (t)

μ(t)

0
2
-0.1
0 2 4 6 0 2 4 6
t t
(i) Steering wheel angular velocity. (j) Selected gear.

Figure 9.20: Optimal solution of problem (9.33) for m = 20 and m = 160.


282 9 Numerical Results

The Hessian is approximated by a limited–memory BFGS scheme with a


memory length of l = 15 in order to avoid accumulation of ill–conditioned
secant information due to the rapidly changing curvature of the path con-
straint.

All QP subproblem are solved to an optimality tolerance of 10−8 by our


block structured parametric active set method qpHPSC. The NLP problem is
solved to a KKT tolerance of 10−10 . The optimal solutions of problem (9.33)
for m = 20 and m = 160 direct multiple shooting intervals are shown in
figure 9.20. The discretization of the path constraint enforcing the track’s
boundaries has a significant influence on the minimal objective function
value that can be attained, as corners can be cut for low values of m. Table
9.12 lists for nμ = 4 and various choices of m the problem’s dimensions, i.e.,
the number of unknowns nvar and the number of equality and inequality con-
straints ncon , together with the obtained optimal solution t f , the 2-norm of
the remaining infeasibility, and the number nfrac of fractional relaxed convex
multipliers for the integer control. The number of SQP iterations and active
set QP iterations is given along with the overall computation time. Total CPU
time grows roughly quadratically with the number m of multiple shooting
nodes, as the runtime per SQP iteration is O (m) (in sharp contrast to classi-
cal condensing methods) and the number of SQP iterations to convergence
appears to grow roughly linearly with m. Using our block structured active
set QP method qpHPSC, over 90 percent of this time is spent in the solution
of the ODE system and the computation of sensitivities.

Dimensions Solution Computation


m nvar ncon Objective t f Infeasibility nfrac SQP QP CPU Time

20 336 64 6.781176 1.83 · 10−11 0 71 567 00m 04.3s


40 656 124 6.791324 2.65 · 10−11 0 142 1485 00m 16.7s
80 1296 244 6.795562 3.03 · 10−12 0 237 3434 00m 56.3s
160 2576 484 6.804009 2.22 · 10−12 3 334 8973 02m 47.7s

Table 9.12: Optimal solutions of problem (9.33) for nμ = 4 as in [80, 81, 122]. With
increasily fine discretization of the path constraint modelling the track,
the time optimal objective increases as cutting of corners is reduced.
9.4 Block Structured Factorization and Updates 283

9.4.3 Comparison of Structure and Sparsity

In table 9.13 an account of the number of unknowns and constraints of


the NLP obtained from the direct multiple shooting discretization, outer
convexification, and relaxation of the MIOCP (9.33) is given. In addition,
the amount of sparsity present in the Hessian and the constraints Jacobian
of the resulting QP subproblem is listed. All compared algorithms work on
this large structured QP subproblem. The classical condensing algorithm
preprocesses it into a smaller but densely populated one. Its dimensions
and sparsity can be compared to the original one by using table 9.14.
As can be seen, the condensed Hessian matrix is densely populated and
does not contain any remaining structural zero elements. The condensed
constraints Jacobian matrix is populated to almost 40%. With increasing
length or granularity m of the multiple shooting discretization, the number
of nonzero elements grows twice as fast in the condensed constraints Ja-
cobian compared to the block structured one. The dense active set method
QPOPT however is not able to exploit the remaining sparsity but instead com-
putes dense factors of this constraints Jacobian. Note in addition that the
simple bounds on the additionally introduced shooting node values s1 , . . . , sm
would become linear constraints after condensing as mentioned in chapter
7, and are thus omitted from the initial condensed problem.
In addition, as an be seen in table 9.15 the runtime complexity of O (m2 )
leads to long condensing run times for larger values of m that make this al-
gorithmic approach at structure exploitation unattractive for long horizons
or fine discretization of the control trajectory. With increasing number of
nq = 3 + nμ control parameters, the advantage of eliminating the addition-
ally introduced shooting node variables is clearly surpassed by the disad-
vantage of loosing the structural properties of the problem. The number nx
of matching conditions used to eliminate the additionally introduced shoot-
ing node values s1 , . . . , sm is hidden by the dominant dimension nq of the
control parameters q0 , . . . , q m−1 that remain in the QP’s matrices.

9.4.4 Comparison of Runtimes

We study the run time of various combinations of numerical codes for the
solution of the direct multiple shooting block structured QP, which include
1. The classical condensing algorithm for the block structured QP com-
bined with the dense null–space active set QP solver QPOPT [86] with
284 9 Numerical Results

default settings. This algorithmic approach is taken e.g. in the soft-


ware package MUSCOD-II [132, 134].

2. Our parametric active set method qpHPSC with dense, sparse, and
block structured solvers for the structured KKT system:

• The block structured Hessian Projection Schur Complement


(HPSC) factorization of chapter 7 with the matrix update tech-
niques of chapter 8.

• The block structured HPSC factorization of chapter 7 without


matrix updates but otherwise identical settings.

• The sparse multifrontal symmetric indefinite code MA57 [56], with


standard settings.

m nμ Hessian of the Lagrangian Jacobian of the Constraints


Size Elements Nonzeros Rows Elements Nonzeros

20 4 336 112,896 5262 4.7% 264 88,704 1906 2.1%


8 420 176,400 7878 4.5% 264 110,880 2465 2.2%
12 504 254,016 11,918 4.7% 264 133,056 3024 2.3%
16 588 345,744 16,254 4.7% 264 155,232 3584 2.3%

40 4 656 430,336 10,382 2.4% 524 343,744 3806 1.1%


8 820 672,400 15,814 2.4% 524 429,680 4924 1.1%
12 984 968,256 22,718 2.3% 524 515,616 6044 1.2%
16 1148 1,317,904 31,934 2.4% 524 601,552 7166 1.2%

80 4 1296 1,679,616 20,622 1.2% 1044 1,353,024 7607 0.6%


8 1620 2,624,400 30,950 1.2% 1044 1,691,280 9845 0.6%
12 1944 3,779,136 46,478 1.2% 1044 2,029,536 12,087 0.6%
16 2268 5,143,824 60,478 1.2% 1044 2,367,792 14,325 0.6%

160 4 2576 6,635,776 41,048 0.6% 2084 5,368,384 15,208 0.3%


8 3220 10,368,400 62,316 0.6% 2084 6,710,480 19,688 0.3%
12 3864 14,930,496 92,208 0.6% 2084 8,052,576 24,169 0.3%
16 4508 20,322,064 121,924 0.6% 2084 9,394,672 28,648 0.3%

Table 9.13: Numbers of NLP (equiv. QP) unknowns and constraints, and percentage
of nonzero elements in the Hessian and constraints Jacobian of the QP
for problem (9.33), listed for various choices of the number m of multiple
shooting intervals and the number nq = 3 + nμ of control parameters.
9.4 Block Structured Factorization and Updates 285

• The unsymmetric multifrontal LU code UMFPACK [50], with stan-


dard settings. Symmetry of the KKT system cannot be exploited
here and two backsolves with the unsymmetric factors are re-
quired.

3. Our parametric active set method qpHPSC with the following LAPACK
[9] routines as reference KKT solvers:

• The banded unsymmetric LU code DGBTRF, with the same restric-


tions that apply to UMFPACK.

• The dense symmetric indefinite code DSYTRF that does not exploit
any structure and will therefore yield inferior performance.

m nμ Hessian of the Lagrangian Jacobian of the Constraints


Size Elements Nonzeros Rows Elements Nonzeros

20 4 130 16,900 16,900 100% 64 (264) 8,320 3117 37%


8 264 55,440 55,440 100% 64 (264) 13,440 5036 37%
12 290 84,100 84,100 100% 64 (264) 18,560 6955 37%
16 370 136,900 136,900 100% 64 (264) 23,680 8875 37%

40 4 250 62,500 62,500 100% 124 (524) 31,000 11,017 36%


8 410 168,100 86,010 100% 124 (524) 50,840 18,055 36%
12 570 324,900 324,900 100% 124 (524) 70,680 24,095 36%
16 730 532,900 532,900 100% 124 (524) 90,520 32,137 36%

80 4 490 240,100 240,100 100% 244 (1044) 119,560 41,218 34%


8 810 656,100 656,100 100% 244 (1044) 197,640 68,096 34%
12 1130 1,276,900 1,276,900 100% 244 (1044) 275,720 94,978 34%
16 1450 2,102,500 2,102,500 100% 244 (1044) 353,800 121,856 34%

160 4 970 940,900 940,900 100% 484 (2084) 469,480 159,219 34%
8 1610 2,592,100 2,592,100 100% 484 (2084) 779,240 264,179 34%
12 2250 5,062,500 5,062,500 100% 484 (2084) 1,089,000 369,140 34%
16 2890 6,022,760 6,022,760 100% 484 (2084) 1,398,760 474,099 34%

Table 9.14: Numbers of unknowns and constraints, and percentage of nonzero ele-
ments in the condensed Hessian and condensed constraints jacobian of
the QP (cf. section 7.2.1) for problem (9.33), listed for various choices of
the number m of multiple shooting intervals and the number nq = 3 + nμ
of control parameters. Structure and sparsity are lost as the number of
control parameters increases.
286 9 Numerical Results

Figure 9.21 and table 9.15 summarize the computational effort required
by each of the investigated QP solving algorithms for increasingly fine dis-
cretizations m of the control and an increasing number of available gear
choices nμ i.e., control parameters nq = 3 + nμ per shooting interval.

60
Time in ms

40

20

0
20,4

20,8

20,12

20,16

40,4

40,8

40,12

40,16

80,4

80,8

80,12

80,16

160,4

160,8

160,12

160,16
m, nμ

Figure 9.21: Average runtime in milliseconds (ms) per QP solver iteration for prob-
lem (9.33), depending on the numbers (m, nμ ) of multiple shooting in-
tervals m and control parameters nμ . ( ◦ ) qpHPSC with matrix updates,
( + ) qpHPSC without updates, (  ) MA57, (  ) LAPACK DGBTRF, ( × + )
QPOPT on the condensed QP without runtime spent in condensing, ( ) 
UMFPACK. Runtime for LAPACK DSYTRF is not shown.

As expected, due to the runtime complexity of O (m3 n3 ) classical condens-


ing and the dense active set QP solver quickly fall behind in performance
as either of the problem dimensions increases. Quadratic growth of the
condensing runtime in both m and nq can be observed from the third col-
umn. For the smallest instances, the banded LU decomposition provided by
LAPACK is sufficient for structure exploitation and even shows linear runtime
growth in m. Its absolute performance falls behind as m or nq get larger. All
structure or sparsity exploiting approaches show linear growth of the run-
time in m. The performance of MA57 and UMFPACK falls behind as the problem
instances get larger. This can be explained by the densely populated Initial
Value Problem (IVP) sensitivity matrices generated by the direct multiple
shooting method. Generic sparse solvers are more appropriately employed
in conjunction with collocation methods that yield much larger but sparsely
populated sensitivity matrices. UMFPACK in addition cannot exploit the KKT
system’s symmetry and requires two backsolves with the unsymmetric fac-
tors. Matrix updates could be realized for the unsymmetric sparse LU fac-
torization provided by UMFPACK, though, see e.g. [108]. Fill–in is however
reported to happen.
9.4 Block Structured Factorization and Updates 287

The HPSC factorization with updates developed in this thesis may be re-
garded as a suitable substitute for structure exploitation in direct multiple
shooting, and yields without exception the fastest run times among all in-
vestigated structure exploiting KKT solvers. This is true even without the
application of our new update techniques, which reduce the runtime by a
further factor of at most 2 for all investigated problem instances. A particu-
lar and unique feature of the HPSC factorization developed in this thesis is
the very small and linear growth of the runtime with increasing number nq

Condensing QPOPT1 qpHPSC qpHPSC MA57 UMFPACK LAPACK LAPACK


μ
m n (once) +upd. DGBTRF DSYTRF

20 4 4.49 0.247 0.737 0.457 1.366 1.396 1.734 35.89


8 7.14 0.359 0.632 0.439 1.992 6.119 2.664 57.63
12 10.3 0.365 0.765 0.426 2.550 6.129 4.116 108.6
16 14.0 0.656 0.681 0.447 3.316 6.487 7.488 125.5

40 4 24.9 1.010 1.035 0.717 2.589 9.588 3.426 225.4


8 42.6 1.392 1.130 0.750 3.429 11.58 5.304 380.3
12 64.0 1.916 1.154 0.751 4.832 11.88 14.12 666.0
16 90.6 2.763 1.234 0.797 6.299 13.09 14.15 1621

80 4 158 4.337 1.922 1.261 4.995 19.21 6.204 —2


8 289 5.478 2.161 1.384 6.637 23.11 9.360
12 451 9.101 2.703 1.402 9.278 23.97 14.31
16 662 15.60 2.327 1.502 12.17 26.39 27.32

160 4 1128 17.10 3.755 2.410 10.18 38.90 13.55 —2


8 2224 26.92 4.115 2.601 13.88 46.35 22.67
12 3577 38.04 4.311 2.706 19.21 47.25 30.78
16 5322 55.30 4.586 2.907 25.39 53.79 59.06

Table 9.15: Average runtime in milliseconds (ms) per QP solver iteration for prob-
lem (9.33), depending on the number nq of control parameters and the
number m of multiple shooting intervals. Averages have been taken over
the first 30 SQP iterations.
1
The QPOPT per iteration runtime applies to the condensed QP whose
computation requires additional runtime as indicated by the third col-
umn.
2
LAPACK DSYTRF performance has not been investigated for m = 80 and
m = 160.
288 9 Numerical Results

of control parameters. The largest investigated dimension nq = 16 makes


the additional speedup gained by the matrix updates most apparent, but at
the same time shows that much larger control dimension could be treated
without significant loss in computational performance. The dense active set
solver QPOPT yields faster per iteration run times only for the smallest prob-
lem instances, albeit at the cost of the condensing preprocessing step. Con-
densing costs the runtime equivalent of at least 20 and at most 100 itera-
tions of QPOPT, or at least 10 and at most 2000 iterations of our code qpHPSC
for the investigated problem instances. Our approach is easily competitive
against recently emerging code generation approaches, e.g. [151]. Therein,
an average iteration time of 425μs for an KKT system with 1740 nonzero
elements is reported on a 1.7 GHz machine. For comparison, our problem
instance m = 20, nμ = 4 has a KKT matrix of 9074 nonzero elements (well
over 5 times more) and we achive a quite similar average iteration time of
457μs on a very similar machine about 1.5 times faster, running at 2.6 GHz.

9.4.5 Summary

In this section we investigated a MIOCP from automobile test driving and


varied the problem’s size by increasing the number nμ of available gears and
the granularity m of the control discretization. At the example of this prob-
lem we examined the performance of our new active set QP code qpHPSC
with block structured factorization and matrix updates and compared it to
the classical condensing algorithm coupled with the dense active set QP
code QPOPT as well as to various structure exploiting linear algebra codes
used to solve the structured QP’s KKT system. For optimal control problems,
our new algorithm allows for the efficient treatment of problems with very
long horizons or very fine discretizations of the control that could not be
treated before. Consequentially for Model Predictive Control (MPC) prob-
lems it promises faster sampling times as the condensing preprocessing
step is eliminated, and allows much longer prediction horizons to be treated
under tight runtime constraints. Convex reformulations of MIOCPs that em-
ploy a large number of block local control parameters acting as convex mul-
tipliers pose a significant challenge to the classical condensing algorithm
that effectively prevented larger problem instances from being solved ef-
ficiently. Such problems greatly benefit from the newly developed HPSC
factorization with matrix updates.
9.5 Application: A Predictive Cruise Controller 289

9.5 Application: A Predictive Cruise Controller

In this section we apply the numerical theory and algorithms developed in


this thesis to a challenging real–world industrial problem: real–time capable
nonlinear model–predictive control of a heavy–duty truck including predic-
tive choice of gears based on a 3D profile of the traveled roads.

9.5.1 Overview

Human drivers of heavy-duty trucks ideally control their vehicles in pursuit


of maintaining a desired velocity, keeping the fuel consumption at a mini-
mum. To this end, the driver repetitively chooses the truck’s input controls,
comprising engine torque, braking torque, and gear choice, according to
human experience and anticipation of estimated road and traffic conditions.
In this paper we present a novel numerical method for model-predictive
control of heavy-duty trucks, acting as a cruise controller including fully au-
tomatic gear choice. The combination of nonlinear dynamics, constraints,
and objective, with the hybrid nature of the gear choice makes this problem
extremely difficult.
Coupled to a navigation system providing a 3D digital map of the road
sections ahead of the truck, it is able to compute an optimal choice of con-
trols not only with respect to the current system state but also with re-
spect to anticipated future behavior of the truck on the prediction horizon.
The presented algorithm is based on the direct multiple-shooting method
for the efficient solution of optimal control problems constrained by ODEs
or DAEs. Optimal control feedback to the truck is computed from the suc-
cessive solution of a sequence of nonlinear programs resulting from the
multiple-shooting discretization of the optimal control problem. Encourag-
ing real-time capable feedback rates are achieved by exploitation of problem
structures and similarities of the sequentially obtained solutions.
Today’s heavy duty trucks feature a powertrain that is composed of sev-
eral units. A diesel engine acts as driving unit, while several braking devices
such as engine brakes, a retarder, and service brakes exist. Engine brak-
ing works by generating a retarding torque using the diesel engine. Unlike
the service brakes, engine brakes and also the retarder don’t suffer from
wearout. Under normal circumstances, their usage is preferred over using
the service brakes. The powertrain is also equipped with an automated man-
ual gearbox with eight to sixteen gears.
290 9 Numerical Results

In many cases an experienced truck driver chooses to accelerate, brake,


or shift gears based on his ability to predict future load changes of the
powertrain. In this, his chooses the operation point of the truck in a fashion
suited to an oncoming period of time rather than for the current observable
system state only. For example, the driver might shift down just right in
time before entering a steep slope, knowing that initiating the relatively
long lasting process of gear shifting later during the climb would cause too
large a decrease in the truck’s velocity. Also acceleration and braking of the
truck can be adapted to the road conditions by an experienced driver. For
instance, it may be desirable to gain speed while cruising through a valley in
order to build up momentum for the next oncoming hill. Speed limit zones
or slower drivers in front of the truck may require braking maneuvers or
downshift of the gear as well.
It becomes clear that cruise controllers that operate solely on the
knowledge of the truck’s current system state inevitably will make con-
trol decisions inferior to those of an experienced heavy-duty truck driver
[42, 209, 103]. The presented paper aims at the design and implementation
of a cruise control system for heavy-duty trucks that predicts the behavior
of the truck over a longer prediction horizon, taking into account informa-
tion about the conditions of the road section ahead. To this end, we describe
a novel numerical algorithm that repeatedly computes a set of controls for
the truck that are optimal with respect to a performance criterion evaluated
over the course of a prediction horizon. The algorithm thereby imitates the
behavior of an experienced driver who repeatedly adapts his acceleration,
brake, and gear choice to the desired velocity as well as the observed road
and traffic conditions.

9.5.2 Dynamic Truck Model

This section holds a description of a 1D truck model with track slope and
curvature information, introduced in different variants in [42, 103, 209] that
has been used for all computations. More background information on mod-
elling in automotive engineering can be found e.g. in [117].
We start the presentation of the truck model with the control inputs to
be optimized later. The truck’s acceleration is governed by the indicated
engine torque, whose rate of change Rind can be controlled. The total brak-
ing torque’s rate of change Rbrk can be controlled as well. The actual truck
system uses three separate sources of brake torques: engine brake torque
9.5 Application: A Predictive Cruise Controller 291

MEB , retarder torque Mret , and service brakes torque MSB , all with separate
state-dependent upper bounds.
def
Mbrk (s) = iT ( y)MEB (s) + Mret (s) + MSB (s) (9.34)

It is not necessary to separate these sources within the model used for opti-
mization, though. We rather chose to perform an a-posteriori separation into
three brake torques once the optimal sum Mbrk (s) has been decided upon.
This opens up the additional possibility of modeling hierarchical brake sys-
tems e.g. to prefer using the retarder Mret over using the engine brakes MEB ,
which again are preferred over using the service brakes MSB . Finally, the
gear y enters the problem as an integer control variable that chooses from
the available gearbox transmission ratios iT ( y) and corresponding degrees
of efficiency ηT ( y). The list of controls influencing the truck’s behavior is
given in table 9.16.

Name Description Unit Domain

Rind Indicated engine torque rate Nm/s [Rind,min , Rind,max ]


Rbrk Brake torque rate Nm/s [Rbrk,min , Rbrk,max ]
y Gear – {1, . . . , ymax }

Table 9.16: Controls of the truck model.

The ODE system of the truck model comprises four differential states.
def
The location s ∈ S = [s0 , sf ] (in meters) on the map is chosen as the indepen-
dent variable. This limits the model’s applicability to the domain of strictly
positive velocities. Time t(s) depending on position s and velocity v(s) are
recaptured using the differential equation

1
ṫ(s) = , t(s0 ) = 0. (9.35)
v(s)

The truck’s velocity is computed from the summation of accelerating


torques Macc , braking torques Mbrk , and resisting torques Mair and Mroad
due to turbulent and rolling friction. The parameter m denotes the truck’s
mass. The rear axle’s transmission ratio is denoted by iA while the static
rear tire radius is rstat . The acceleration is given by
292 9 Numerical Results


1 iA  
v̇(s) = Macc − Mbrake − Mair − Mroad . (9.36)
m v(s) rstat

For rate-limited controls, we control the corresponding rates of change and


recover the actual control values as follows.

1
Ṁind (s) = Rind (s), (9.37a)
v(s)
1
Ṁbrk (s) = Rbrk (s). (9.37b)
v(s)

The consumed amount of fuel is given by

1
Q̇(s) = Q fuel (Mind (s), neng (s)) (9.38)
v(s)

where Q fuel gives the specific consumption rate depending on the indicated
engine torque and engine speed. In table 9.17 the list of differential states
of this vehicle model is given.

Name Description Unit Domain

t Time s 
v Velocity m/s (0, vmax ]
Mind Indicated engine torque Nm [0, Mind,max ]
Mbrk Total brake torque Nm [0, Mbrk,max ]
Q Fuel consumption l [0, ∞)

Table 9.17: Differential states of the truck model.

In the above system of differential equations, several terms are still miss-
ing and are computed from fixed algebraic formulas as follows. The accel-
erating torque Macc is computed from the corresponding control depending
on the transmission ratio iT ( y) and the degree of efficiency ηT ( y) of the
selected gear y ,

def
Macc (s) = iT ( y) ηT ( y) Mind (s). (9.39)

The sum of braking torques Mbrk is computed from Mret and MEB , increased
by resisting torques due to friction Mfric in the engine. The value neng de-
notes the engine’s speed in revolutions per minute.
9.5 Application: A Predictive Cruise Controller 293

def
Mbrake (s) = iT ( y)MEB (s) + Mret (s) + MSB (s) + iT ( y) Mfric (neng (s)). (9.40)

Additional braking torques, independent of the selected gear, due to tur-


bulent friction Mair and road conditions Mroad are taken into account. The
parameter A denotes the truck’s effective flow surface, while cw is the aero-
dynamic shape coefficient and air the density of air,

def 1
Mair (s) = 2
cw A air v 2 (s). (9.41)

The road conditions term accounts for rolling friction with coefficient fr and
downhill force depending on the slope γ(s) available from the 3D map data
of the road. The parameter g is the gravity constant.

def
Mroad (s) = m g (sin γ(s) + fr cos γ(s)). (9.42)

Finally, the engine’s speed in revolutions per minute, depending on the se-
lected gear y , can be recaptured from the truck’s current velocity,

def iA iT ( y(s)) 60 [s]


neng (s) = v(s) . (9.43)
rstat 2π

Table 9.18 holds the list of fixed model parameters. The truck engine’s char-
acteristics are defined by the functions Mind,max , Mbrk,max , and Mfric giving the
maximum indicated torque, braking torque amd torque loss due to friction,
all depending on the engine speed neng .

In addition, the specific fuel consumption rate Q fuel depends on both Mind
and neng . Representative examples of those functions are shown in figure
9.22.

9.5.3 Environment Model

The truck system is subjected to various environmental conditions changing


over time as the position s of the truck advances. The unique feature of this
predictive truck control problem is the changing slope γ(s) and curvature
κ(s) of the road. This information is obtained from a 3D map available in
electronic form on board the truck. Positioning information is made avail-
able with the help of the Global Positioning System (GPS) and allows to map
a position s on the track to cartesian coordinates (x, y) and road conditions
(γ, κ). Figure 9.23 shows a representative section of 3D map data.
294 9 Numerical Results

On the prediction horizon, the truck system needs to respect certain me-
chanical constraints, such as velocity and engine speed limits. Beside the
bounds on the truck controls given in table 9.16 and on the truck system’s
differential states listed in table 9.17, the truck’s velocity v(s) is subject to
several constraints, the most significant ones being the velocity limits im-
posed by law,

v(s)  vlaw (s) ∀s ∈ S . (9.44)

From the available 3D map data, the predictive optimal control algorithm,
the curvature κ(s) of the road at position s is extracted and converted to a
maximum allowable velocity vcurve (s),

v(s)  vcurve (κ(s)) ∀s ∈ S . (9.45)

The indicated and brake torques must respect state-dependent upper limits
as specified by the engine characteristics
 
0  Mind (s)  Mind,max neng (s) s ∈ S, (9.46a)
 
0  Mbrk (s)  Mbrk,max neng (s) s ∈ S. (9.46b)

Name Description Unit

A Front facing area m2


cw Aerodynamic shape coefficient –
fr Coefficient of rolling friction –
γ(s) Road’s slope rad
g Gravity constant m/s2
iA ( y) Rear axle transmission ratio –
iT ( y) Gearbox transmission ratio –
κ(s) Road’s curvature –
m Vehicle mass kg
neng,min Minimum engine speed 1/min
neng,max Maximum engine speed 1/min
ηT Gearbox degree of efficiency –
air Air density kg/m3
rstat Static rear tire radius m

Table 9.18: Parameters of the truck model.


9.5 Application: A Predictive Cruise Controller 295

3000 -500

-1000

2000 -1500

Mbrk,max [Nm]
Mind,max [Nm]

-2000

1000 -2500

-3000

0 -3500
500 1000 1500 2000 500 1000 1500 2000
neng [1/min] neng [1/min]
(a) Maximum indicated engine torque Mind (b) Maximum engine brake torque MEB and
depending on the engine speed neng . retarder torque Mret depending on the en-
gine speed neng .

400

300
Mfric [Nm]

200

100

0
500 1000 1500 2000
neng [1/min]
(c) Torque loss due to friction Mfric depending (d) Specific fuel consumption rate Q fuel de-
on the engine speed neng . pending on the indicated engine torque
Mind and the engine speed neng .

Figure 9.22: Exemplary nonlinear truck engine characteristics.


296 9 Numerical Results

-50 0 50 100 150 200 -0.05 0 0.05

200 200
150 150
100 100
z [m]

z [m]
50 50
0 0
-1 -1
-50 -50

0 0
1 1
×10 4 0 ×10 4 0
-1 1 -1 1
y [m] y [m]
×104 ×104
x [m] x [m]
(a) 3D map data colored by height profile. (b) 3D map data colored by slope profile.

0.1
Slope γ

-0.1
0 1 2 3 4 5 6 7 8
Position s [m] ×104

(c) Slope profile of 3D map data.

0.1
Curvature κ

-0.1
0 1 2 3 4 5 6 7 8
Position s [m] ×104

(d) Curvature profile of 3D map data.

Figure 9.23: Exemplary real–world 3D map data describing road conditions for the
truck predictive control problem on a track of over 80 kilometers
length. Sharp spikes in the curvature profile 9.23d correspond to ma-
jor changes in the general direction of travelling in figures 9.23a and
9.23b.
9.5 Application: A Predictive Cruise Controller 297

Finally, the engine’s revolutionary speed neng , depending on the truck’s


velocity and the selected gear, must stay within prescribed limits according
to the engine’s specification,
 
neng,min  neng v(s), y(s)  neng,max ∀s ∈ S . (9.47)

9.5.4 Design of a Performance Index

We’re interested in computing continuous optimal control trajectories


Rind (·), Rbrk (·) and an integer optimal control trajectory y(·) on a section S of
a track described by parameters γ(·) and κ(·) varying in space such that the
truck completes this track satisfying a chosen compromise between minimal
energy consumption and earliest arrival time. The integral cost criterion to
be minimized in each of the successive steps of the moving horizon pre-
dictive control algorithm is composed of a weighted sum of three different
objectives.

1. Deviation from a desired velocity:


The deviation of the truck’s observed velocity from the desired one is
penalized in a least-squares sense over the length H of the prediction
def
horizon S = [s0 , s0 + H] starting at the truck’s current position s0 on
the road,
 s0 +H
def  2
Φdev = v(s) − vdes (s) ds. (9.48)
s0

This computation of a profile of desired velocities to be tracked by the


predictive controller is automated and will in general match the maxi-
mum velocity permitted by law. For sharp bends of the road, a heuris-
tic is applied to adapt the velocity to be tracked to the truck’s physical
capabilities. This avoids large residuals of the objective that impede
the numerical behavior of the Gauss–Newton least squares tracking.
In addition, several parameters of this heuristic can be exposed to the
truck driver to grant some additional freedom for adaptation to en-
vironmental conditions such as traffic or weather extending over the
premises made by the predictive control algorithm.
2. Fuel consumption:
The fuel consumption is identified from the specific fuel consumption
rate map exemplarily shown in figure 9.22d, and is minimized by the
298 9 Numerical Results

objective contribution
 s0 +H
def 1  
Φfuel = Q neng (s), Mind (s) ds. (9.49)
s0
v(s)

3. Driving comfort :

Rapid changes of the indicated engine torque degrade the driving


comfort as experienced by the truck driver:
 s0 +H
def 1  2
Φcomf = Rind (s) + Rbrk (s) ds. (9.50)
s0
v(s)

This objective part can be seen as tracking zero acceleration in ab-


sence of slope, or as a control regularization from a numerical point
of view.

Weighting the objective function contributions and summing up, we obtain


the combined objective function

def
Φ = λ1 Φdev + λ2 Φfuel + λ3 Φcomf . (9.51)

The weighting factor λ3 is chosen to be comparably small in our computa-


tions. The choice of λ1 and λ2 allows for a gradual selection of a compro-
mise between meeting the desired velocity that can even be chosen on–line
by the truck driver who may prefer to travel faster at the cost of increased
fuel consumption or, being ahead of his schedule, may prefer to save on fuel
by following an economic operating mode of the truck at the cost of longer
travel times. For more details on the investigation of pareto–optimality of
mixed–integer control problems we refer to our paper [141].

9.5.5 Mixed–Integer Optimal Control Problem

Problem Formulation

The MIOCP resulting from the presented vehicle and environment model is
given in (9.54). We summarize the state vectors
 
x (s) = v(s) Mind (s) Mbrk Q(s) t(s) (9.52)
9.5 Application: A Predictive Cruise Controller 299

and the continuous controls vectors


 
u(s) = Rind (s) Rbrk (s) (9.53)

and denote by w (s) = y(s) the gear choice control. In (9.54) the ODE system
(9.54b) comprises the vehicle ODE model derived in section 9.5.2. The en-
gine speed constraints (9.54e) depends on the integer control y(s) in (9.54f).

min λ1 Φdev + λ2 Φfuel + λ3 Φcomf (9.54a)


x (·),u(·),w (·)

s. t. ẋ(s) = f (s, x (s), u(s), w (s), p) s ∈ S , (9.54b)


v(s)  vlaw (s) s ∈ S,
v(s)  vcurve (s) s ∈ S,
Mind (s) ∈ [0, Mind,max (v(s), y(s))] s ∈ S, (9.54c)
Mbrk (s) ∈ [0, Mind,brk (v(s), y(s))] s ∈ S, (9.54d)
Rind (s) ∈ [Rind,min , Rind,max ] s ∈ S,
Rind (s) ∈ [Rbrk,min , Rbrk,max ] s ∈ S,
neng (v(s), y(s)) ∈ [neng,min , neng,max ] s ∈ S. (9.54e)
y
y(s) ∈ {1, . . . , n } s ∈ S. (9.54f)

Outer Convexification Reformulation

We first address the reformulation of this MIOCP using outer convexification


of the objective and ODE dynamics with respect to the integer gear choice,
and relaxation of the introduced binary convex multipliers. We introduce ny
binary control functions ω j (·) ∈ {0, 1}, 1  j  ny each indicating whether
the j -th gear is selected at location s ∈ S on the prediction horizon, together
with their relaxed counterpart functions α j (·) ∈ [0, 1] ⊂ . From these the
selected gear may be computed as


ny
y(s) = jα j (s), s ∈ S, (9.55)
j=1

and is integral if the multipliers α j (s) are binary. We convexify the contribut-
ing term Φfuel of the objective (9.51) of problem (9.54) with respect to the
integer control y(·) as follows,
300 9 Numerical Results


1
s0 +H ny
def
 
Φfuel (s) = α j (s)Q neng (v(s), j), Mind (s) ds, (9.56)
s0
v(s) j=1

while the contributing terms Φdev and Φcomf are independent of w(t) and
hence remains unchanged. We further convexify the dynamics of problem
(9.54) with respect to the integer control y(·) as follows,


ny
ẋ(s) = α j (s) f (s, x (s), u(s), j, p) ∀s ∈ S , (9.57)
j=1

where the gear choice constraint (9.54f) is replaced by


ny
α j (s) ∈ [0, 1], 1  j  ny , α j (s) = 1, ∀s ∈ S . (9.58)
j=1

The torque constraints (9.54c) and (9.54d) are written as


ny
0 Mind (s)  α j (s)Mind,max (v(s), j), (9.59a)
j=1


ny
0 Mbrk (s)  α j (s)Mbrk,max (v(s), j). (9.59b)
j=1

Reformulations of the Engine Speed Constraint

In chapter 5 we have proposed several possible reformulations of path con-


straints directly depending on an integreal control. For the engine speed
constraint (9.47) depending on the gear choice y(s), we study again three
of the proposed reformulations.

Inner Convexification We briefly look at the effect of treating y(s) as a


continuous variable, referred to as inner convexification of the gear choice
in this works. This modelling approach results in the formulation

neng,min  neng (v(s), y(s))  neng,max , y(s) ∈ [1, ny ] ⊂ . (9.60)

From an engineering point of view, inner convexification amounts to as-


suming an idealized continuous transmission gearbox that is able to run on
9.5 Application: A Predictive Cruise Controller 301

arbitrary ratios of the engine speed and the vehicle resp. wheel speed. An
appropriate formulation might also introduce the engine speed neng (s) as a
free control trajectory on S subject to optimization, and impose a transmis-
sion ratio constraint,

neng (s) rstat 2π


iT,min   iT,max , neng (s) ∈ [neng,min , neng,max ]. (9.61)
v(s) iA 60 [s]

This formulation is appropriate for vehicles with a built–in CVT (continu-


ously variable transmission) drive, but for gearboxes with a finite number
ny of available gears, several issues arise. Optimal solutions computed us-
ing this modelling approach need to to be “rounded” towards an actually
available transmission ratio resp. engine speed. Bounds on the loss of opti-
mality or feasibility of the rounded solution cannot be given. As an example,
in figure 9.24 the constraint on Mind (s) is shown in its inner convexification
reformulation i.e., with the gear choice y(s) treated as continuous control,
and in its outer convexification formulation. Constraint violations for frac-
tional gear choices caused by the inner convexification reformulation are
clearly visible in figure 9.24a and are avoided in figure 9.24b. Finally, en-
gine and vehicle characteristics most often represented as tabulated and
interpolated data need to be extended to physically unavailable transmis-
sion ratios in a sufficiently often continuously differentiable way in order to
make the mathematical model of both engine and vehicle evaluatable.

Standard Formulation after Outer Convexification We next consider


the formulation of (9.47) after outer convexification of the objective and
dynamics with respect to the integer gear choice,


ny
neng,min  α j (s)neng (v(s), j)  neng,max . (9.62)
j=1

Here, outer convexification with respect to y(s) is applied to the engine


speed neng (v(s), y(s)), and the constraint is imposed on the engine speed
obtained by evaluation of the convex combination. Contrary to the inner con-
vexification approach, this formulation relieves us from the need to evaluate
the engine and vehicle model functions for fractional gear choices. Observe
though that the engine speed neng (v(s), j) resulting for an individual (par-
tially) selected gear j with a j (s) > 0 may violate either bound as long as
there exists another gear k compensating for this violation in the summed-
302 9 Numerical Results

2500 2500

2400 2400
Mind,max [Nm]

Mind,max [Nm]
2300 2300

2200 2200

2100 2100

2000 2000
10 15 20 25 10 15 20 25
v [m/s] v [m/s]
(a) Inner convexification. (b) Outer convexification.

Figure 9.24: Inner and outer convexification of the indicated engine torque con-
straint for two adjacent gears. Constraint violations for fractional gear
choices caused by the inner convexification reformulation are clearly
visible.

up residual (9.62). This effect is shown in figure 9.29 on page 308 for the
mixed–integer optimal control scenario of figure 9.28, page 307.

Outer Convexification of the Constraint In this thesis we proposed for


the first time to apply outer convexification also to the path constraint di-
rectly depending on the integer control,
 
0  α j (s) neng (v(s), j) − neng,min , 1  j  ny , (9.63a)
 
0  α j (s) neng,max − neng (v(s), j) . (9.63b)

Instead of a single constraint on the engine speed resulting from a convex


combination, we now impose a separate constraint on the engine speed for
each available gear. Clearly, if α j (s) = 0 and gear j is not chosen at point
s ∈ S , the two constraints (9.63) are feasible regardless of the actual velocity
v(s). If α j (s) > 0 and gear j enters the convex combination, feasibility of the
associated engine speed neng (v(s), j) is required.

Different from the previous formulation, this requirement must be sat-


9.5 Application: A Predictive Cruise Controller 303

40
v [m/s]
20

0
5 10 15
y

Figure 9.25: Feasible vehicle speeds v(s) for a given choice y(s) = j of the gear. The
figure reveals the combinatorial structure of the feasible set created
by the constraints neng,min  neng (v(s), j)  neng,max that vanish if the
associated convex multiplier α j (s) is zero.

α1 v α1 v

α2 α2

α3 α3
α4 α4

(a) Feasible velocities v(s) for (b) Feasible velocities for con-
four gears. vex combinations of two ad-
jacent gears.

Figure 9.26: Schematic of the nonconvex feasible set for the vehicle velocity v de-
scribed by the engine control reformulation (9.63) with four gears
ny
(ny = 4). Arrows indicate axes of the space (v, α) ∈ + × [0, 1] . The
feasible set is depicted in 9.26a for integral choices of the gear (α j = 1
for some 1  j  ny , αk = 0 for all k = j ), and in 9.26b for convex com-
binations formed between two adjacent gears, i.e., an SOS 2 constraint
imposed on the convex multipliers α j , 1  j  ny .
304 9 Numerical Results

isfied even though the convex multiplier α j (s) might be less than 1. Con-
sequentially, the individual engine speeds of all gears entering the convex
combination are indeed feasible on their own. Rounding of a fractional re-
laxed optimal solution to the partially convexified problem (9.54) hence does
not violate the critical engine speed constraint.

9.5.6 Exemplary Mixed–Integer Optimal Control Scenarios

In this section we present MIOCP solutions to problem (9.54) that demon-


strate the predictive nature of the modelled cruise controller at the example
of two short road sections with a steep slope and a speed limit imposed.
Compensation effects of the standard constraint formulation after outer
convexification are investigated.

Example: Steep Slope Scenario

Figure 9.27 on page 306 shows the optimal solution to a mixed–integer opti-
mal control scenario on a road section of two kilometers length with a steep
slope of 8% for 500 meters, starting at 500 meters into the section. No cur-
vature is present. The desired velocity is set at vdes = 80 km/h = 22.2 m/s
as indicated in figure 9.27a, while the initial velocity at the start of the sce-
nario is set to 19 m/s. Objective function weights are chosen as λdev = 10−2 ,
λfuel = 10−2 , λcomf = 10−4 such that contribution tracking the desired ve-
locity dominates the objective. The truck enters the slope with a velocity
exceeding the desired one, as can be seen in figure 9.27a. This happens in
order to maximize the remaining exit velocity after the slope has been tack-
led. Figure 9.27b shows the accumulated fuel consumption. In figure 9.27c
the effective torque Mind (s) − Mbrk (s) can be seen together with its engine
speed dependent upper bound. Figure 9.27d shows the associated torque
rate. In figure 9.27e downshifting of the gear from 13 down to 10 can be
seen in order to maintain an engine speed of over 1500 1/min seen in figure
9.27f, as the velocity drops from 25 m/s down to 13 m/s at the exit of the
slope. The fast acceleration sequence starting at 1000 meters into the sec-
tion is accompanied by rapid upshifting to the highest gear number 16 as
the desired velocity has been reached again.
9.5 Application: A Predictive Cruise Controller 305

Example: Speed Limit Scenario

In figure 9.28 on page 307, the slope has been replaced by a speed limit
of 40 km/h and the truck’s initial speed has been set to 40 km/h as well.
Acceleration and braking can be seen in figure 9.28a and 9.28c to minimize
the time until the entry of the speed limit zone. This zone is crossed at the
lowest possible engine speed in order to save fuel. The acceleration back to
the desired velocity is accompanied by upshift of the gear to keep the engine
speed above 1500 1/min again, while the remainder of the road section is
completed at around 800 1/min in gear 16 as the desired velocity has been
reached.

Example: Compensatory Effects

In figure 9.29 on page 308 the choice convex multipliers α(s) for the gear
y(s) can be seen if the first example of figure 9.28 is solved with the stan-
dard formulation (9.62) of the engine speed constraint (9.47) after outer
convexification, instead of using the vanishing constraint formulation pro-
posed in this thesis. Figure 9.29 shows for each of the 16 available gears
the resulting engine speed if a (partial) selection of the respective gear is
indicated by the convex relaxed multipliers α(s). Compensatory effects are
clearly revealed. They allow for a selection of infeasible gears violating the
engine speed constraints (e.g. gears 5 to 9 in figure 9.29), if this violation is
compensated for by (partial) selection of other gears that either do not hit
the engine speed constraint or violate the opposite constraint (e.g. gears 14
to 16) such that violations cancel out in (9.62)
306 9 Numerical Results

25 3

20 2
v [m/s]

Q [l]
15 1

10 0
0 500 1000 1500 2000 0 500 1000 1500 2000
s [m] s [m]
(a) Velocity v(s), and desired velocity vdes . (b) Consumed fuel Q(s).
3000
500

R [Nm/s]
2000
M [Nm]

1000
-500

0
0 1000 2000 0 1000 0 1000 2000 0 1000
s [m] s [m]
(c) Engine torque Mind (s) − Mbrk (s), and path (d) Engine torque rate Rind (s) − Rbrk (s).
constraint Mind,max enforced in shooting
nodes only.
16 2000
neng [1/min]

14
1500
12
y

10 1000

8
500
0 500 1000 1500 2000 0 1000 2000 0 1000
s [m] s [m]
(e) Convexified relaxed gear choice y(s), and (f) Engine speed neng (s).
envelope of admissible gears.
Figure 9.27: Optimal engine torque and gear choice computed for problem (9.54)
with outer convexification and relaxation applied to dynamics and path
constraints. On a road section of two kilometers length with a slope
of 8% for one kilometer, the controller aims at a compromise between
maintaining a velocity of 80 km/h and burning as little fuel as possible.
The entry velocity exceeds the desired one in figure 9.28a in order to
maximize the exit velocity that drops due to the steep slope. Downshifts
from gear 13 to gear 10 in figure 9.28e keep the engine speed above
1500 1/min in figure 9.28f. Once the slope has been tackled, the highest
available gear 16 is selected and the engine speed drops to 800 1/min
in order to save fuel while maintaining the desired velocity.
9.5 Application: A Predictive Cruise Controller 307

25 2

20
v [m/s]

Q [l]
1
15

10 0
0 500 1000 1500 2000 0 500 1000 1500 2000
s [m] s [m]
(a) Velocity v(s), and desired velocity vdes . (b) Consumed fuel Q(s).

4000
500

R [Nm/s]
2000
M [Nm]

0
-500

-2000
0 1000 2000 0 1000 0 1000 2000 0 1000
s [m] s [m]
(c) Torque Mind (s) − Mbrk (s), and path con- (d) Torque rate Rind (s) − Rbrk (s)
straint Mind,max enforced in shooting nodes
only.

16 2000
neng [1/min]

14
1500
12
y

10 1000

8
500
0 500 1000 1500 2000 0 1000 2000 0 1000
s [m] s [m]
(e) Convexified relaxed gear choice y(s), and (f) Engine speed neng (s).
envelope of admissible gears at velocity
v(s).

Figure 9.28: Optimal engine torque and gear choice computed for problem (9.54)
with outer convexification and relaxation applied to dynamics and path
constraints. On a road section of two kilometers length with a speed
limit of 40 km/h imposed for a section of 500 meters, the controller
aims at maintaining a velocity of 80 km/h.
308 9 Numerical Results

neng ( y 5 )

neng ( y 6 )

neng ( y 7 )
0 1000 2000 0 1000 2000 0 1000 2000
s [m] s [m] s [m]
(a) Gear 5. (b) Gear 6. (c) Gear 7.

neng ( y 10 )
neng ( y 8 )

neng ( y 9 )

0 1000 2000 0 1000 2000 0 1000 2000


s [m] s [m] s [m]
(d) Gear 8. (e) Gear 9. (f) Gear 10.
neng ( y 11 )

neng ( y 12 )

neng ( y 13 )

0 1000 2000 0 1000 2000 0 1000 2000


s [m] s [m] s [m]
(g) Gear 11. (h) Gear 12. (i) Gear 13.
neng ( y 14 )

neng ( y 15 )

neng ( y 16 )

0 1000 2000 0 1000 2000 0 1000 2000


s [m] s [m] s [m]
(j) Gear 14. (k) Gear 15. (l) Gear 16.

Figure 9.29: Compensatory effects arising for inner convexification of the engine
speed constraint at the example of figure 9.28. Engine speeds associ-
ated with each partially selected gear are indicated and can be seen to
violate phyical limits.
9.5 Application: A Predictive Cruise Controller 309

9.5.7 Mixed–Integer Predictive Control Results

We finally present mixed–integer model–predictive control results for their


cruise controller using the above MIOCP formulation. Using a prediction
horizon of 2000 meters length, discretized into m = 40 direct multiple shoot-
ing intervals of 50 meters length each, we compute mixed–integer feedback
control trajectories for a south german highway of 150 kilometers length.
We give feedback every 10 meters and use the warm starting strategy of
section 4.2.3 for initialization.

In figure 9.30 spread across pages 311 to 313 the highway’s slope profile,
the realized feedback controls, and the obtained system states are shown
for the entire distance of 150 kilometers. For this solution, we chose λdev =
10−2 , λfuel = 10−2 , and λcomf = 10−4 to obtain a speed–oriented behavior of
the cruise controller.

We can see in figure 9.30d that the desired velocity vdes of 80 km/h is kept
during the majority of the truck’s journey. Minor deviations are accepted to
prevent unnecessary acceleration or braking maneuvres that would impact
the driver’s comfort and burn additional fuel. Major deviations have to be
accepted on steep sloped parts of the highway that make it impossible for
the truck to sustain the desired velocity at a load of m = 40 metric tonnes.
Gear 12 is selected most of as seen in figure 9.30g, keeping the engine speed
neng well above 1500 rpm to ensure maximum responsiveness of the truck
according to its engine characteristics. This of course comes at the cost of
increased fuel consumption. Sloped parts of the highway see very regular
downshift and upshift sequences of the gear as the truck enters and exits
the sloped sections. The highest available gear 16 is occasionally chosen on
flat sections to save on fuel if the desired velocity has already been reached.

In figure 9.31 on page 314, details of this feedback solution can be stud-
ied for a highway section of 6 kilometers length starting after a traveled
distance of 54 kilometers. Here, a steep slope of two kilometers length is
present with the relative altitude of the highway rising to 400 meters, up
from around 230 meters above the truck’s initial position, see figure 9.31b.
The predictive nature of the controller’s behavior can be seen clearly. In
figure 9.31c the velocity can be seen to rise above the desired velocity
well before the truck actually enters the steep sloped section. This ame-
liorates the exit velocity that nonetheless drops to about 40 km/h down
from over 90 km/h. The engine runs at maximum indicated torque (figure
9.31e) and the total amount of consumed fuel rises (figure 9.31d) accord-
310 9 Numerical Results

ingly. Downshifts of the gear seen in figure 9.31g keep the engine’s speed
around 1500 rpm as seen in figure 9.31h, the engine’s most efficient mode
of operation. An upshift sequence ending at the highest available gear 16
completes the studied excerpt once the steep slope has been crossed suc-
cessfully. As already noted above, the predictive controller returns to gear
12 as the desired velocity has been reached again.
Figure 9.32 shows mixed–integer feedback control trajectories for the
same scenario with modified objective function weights λdev = 10−3 , λfuel =
10−1 , and λcomf = 10−4 to achieve a more fuel consumption aware behav-
ior of the predictive cruise controller. Consequentially, the highest available
gear 16 is chosen significantly more frequently, leading to an overall engine
speed that is much lower than before. Downshift and upshift sequences dur-
ing sloped parts of the highway are more prominent, and less chattering of
the gear choice is observed in figure 9.32g. The fuel consumption over 150
kilometers has been noticeably reduced (figure 9.32c). This of course comes
at the cost of larger deviations from the desired velocity (figure 9.32d).

9.5.8 Computational Demand

We finally investigate the computational demand of our mixed–integer


model–predictive cruise controller at the example of the results presented
in figure 9.30 on page 313. The number of iterations of our QPVC active
set method is shown in figure 9.33a. The problem’s dimensions are m = 40,
nx = 3, and nq = 17. Clearly, at least one iteration is performed per feed-
back phase of the mixed–integer real–time iteration scheme. Most iteration
counts remain below 20, with few exceptions attributed to searching adja-
cent convex feasible subsets for improvements towards global optimality as
described in chapter 6.
The computational effort of the feedback phase of our mixed–integer real–
time iteration scheme is shown in figure 9.33b and is closely correlated
with the number of QPVC iterations. This indicates that the runtime of the
HPSC factorization and updates is dominated by the length m = 40 of the
direct multiple shooting grid. Approximately 500 μs are spent per active set
iteration, such that the total feedback delay remains below 10 milliseconds
for most mixed–integer feedback controls computed.
0.1

γ
0

-0.1
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(a) Slope γ(s).

1000

500

Height [m]
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104
9.5 Application: A Predictive Cruise Controller

(b) Height.

100

50

Q [l]
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(c) Total fuel consumption Q(s).


311
30
312

20

10

v [m/s]
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(d) Velocity v(s) with desired velocity vdes (s) = 80 km/h and maximal velocity vmax = 100 km/h.

5000

M [Nm]
-5000
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(e) Torque Mind (s) − Mbrk (s).

500

R [Nm/s]
-500

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(f) Torque rate Rind (s) − Rbrk (s) with bounds.


9 Numerical Results
15
10

y
5

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(g) Selected gear y(s) out of 16 available gears.

2000

1000

neng [1/min]
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(h) Engine speed neng (s) at selected gear y(s).


Figure 9.30: Simulated mixed–integer model–predictive control results for the predictive cruise controller problem on a
9.5 Application: A Predictive Cruise Controller

southern German highway section of 150 kilometers length.


313
314 9 Numerical Results

0.1 1000

Height [m]
0 500
γ

-0.1 0
5.4 5.6 5.8 6 5.4 5.6 5.8 6
s [m] ×10 4
s [m] ×104

(a) Slope γ(s). (b) Height.


30
100
v [m/s]

20

Q [l]
50
10

0 0
5.4 5.6 5.8 6 5.4 5.6 5.8 6
s [m] ×10 4
s [m] ×104

(c) Velocity v(s). (d) Consumed fuel Q(s).


4000 500
R [Nm/s]
M [Nm]

0
2000

-500
0
5.4 5.6 5.8 6 5.4 5.6 5.8 6
s [m] ×104 s [m] ×104

(e) Torque Mind (s) − Mbrk (s). (f) Torque rate Rind (s) − Rbrk (s).

15 2000
neng [1/min]

10
y

5 1000

5.4 5.6 5.8 6 5.4 5.6 5.8 6


s [m] ×104 s [m] ×104

(g) Gear y(s). (h) Engine speed neng (s).


Figure 9.31: Simulated mixed–integer model–predictive control results for the pre-
dictive cruise controller problem on a highway in southern Germany
presented in figure 9.30. Details are shown for a sloped section of 6
km length at 54 km into the track. Climbing the steep slope causes the
truck with a mass of 40,000 kg to slow down below 40 km/h. The predic-
tive cruise controller anticipates this and accelerates to the maximum
permitted velocity just before the steep slope starts. Downshifts of the
gear y keep the engine speed neng up, maintaining the maximum pos-
sible torque Mind . More economic low engine speeds are chosen by an
appropriate upshift as the slope decreases, saving on fuel.
0.1

γ
0

-0.1
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(a) Slope γ(s).

1000

500

Height [m]
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104
9.5 Application: A Predictive Cruise Controller

(b) Height.

100

50

Q [l]
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(c) Total fuel consumption Q(s).


315
30
316

20

10

v [m/s]
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(d) Velocity v(s) with desired velocity vdes (s) = 80 km/h and maximal velocity vmax = 100 km/h.

5000

M [Nm]
-5000
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(e) Torque Mind (s) − Mbrk (s).

500

R [Nm/s]
-500

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(f) Torque rate Rind (s) − Rbrk (s) with bounds.


9 Numerical Results
15
10

y
5

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(g) Selected gear y(s) out of 16 available gears.

2000

1000

neng [1/min]
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
s [m] ×104

(h) Engine speed neng (s) at selected gear y(s).


9.5 Application: A Predictive Cruise Controller

Figure 9.32: Simulated mixed–integer model–predictive control results for the predictive cruise controller problem on a
southern German highway section of 150 kilometers length. The desired and permitted velocities are vdes =
80 km/h and vmax = 100 km/h. A prediction horizon of H = 2000 m length was used, discretized into m = 40
direct multiple shooting intervals. Control feedback was given every 10 m. Objective function weights λdev =
10−3 , λfuel = 10−1 , and λcomf = 10−4 were chosen and yield a compromise between speed–oriented and fuel–
saving behavior. In figure 9.32h it can be seen that truck is operated at much lower engine speeds than in
the previous set of results. The highest available gear 16 is selected in figure 9.32g unless slopes require
acceleration or braking maneuvers. Consequentially, the total amount of fuel consumed is reduced in figure
9.32c. This comes at the cost of much larger deviations from the desired velocity in figure 9.32d.
317
318 9 Numerical Results

60
QPVC Iterations

40

20

0
0 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000

SQP Iteration
(a) Number of QPVC iterations for the results of figure 9.30.
Feedback Time [ms]

40

20

0
0 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000

SQP Iteration
(b) Overall per–SQP iteration runtime of the QPVC solver for the results of figure 9.30.

Figure 9.33: Number of QPVC iterations required to compute the mixed–integer con-
trol feedback of the predictive cruise controller (m = 40 shooting in-
tervals, horizon length H = 2000 m, feedback given every 10 m, 16
available gears). Major spikes in the number of QPVC iterations are
caused by searching adjacent convex feasible sets in order to improve
an identified stationary point.

Concerning real–time capability of the presented algorithm, consider


that for a feedback granularity of 10 meters as employed for the pre-
sented results, the feedback has to be ready after at most 10[m]/v(s) sec-
onds, e.g. after 360 ms at v(s) = 100 km/h. Reserving half of this time
for the preparation phase, our QPVC method is real–time capable below
180 ms · 500 μs/iteration, i.e., 360 iterations on the desktop machine used
for the presented computations. Considering that most mixed–integer feed-
back controls could be computed in 20 QPVC iterations, and given the ad-
9.5 Application: A Predictive Cruise Controller 319

ditional possibility to constrain our primal–dual parametric algorithm to 20


iterations while still obtaining a physically meaningful iterate, we come up
with a rough estimate of a factor 15 that an industrial target device could be
slower than our desktop machine. We finally note that a condensing method
on this problem would require a computation time in excess of ten sec-
onds, though attributed to the preparation phase of the real–time iteration
scheme, before the computation of a feedback control could be started.

9.5.9 Summary

In this section we have applied the new algorithmic techniques developed


in this thesis, including the mixed–integer real–time iteration scheme, the
nonconvex active set method for QPVCs, and the block structured HPSC fac-
torization, to a challenging predictive cruise control problem of high rele-
vance to current industrial practice. We have formulated a vehicle model in-
cluding nonlinear dynamics, and various nonlinear physical constraints e.g.
on engine torque and velocity. On a prediction horizon supplied with look–
ahead information on the road conditions, an optimal control problem has
been formulated to minimize a nonlinear objective function composed from
several contributing terms, motivated by the predictive cruise controller’s
goals such as tracking of a prescribed velocity or minimizing fuel consump-
tion. The described problem becomes a combinatorial one by including the
optimal choice of transmission ratio and associated gearbox degree of effi-
ciency, assuming, in contrast to a CVT drive, a gearbox with a fixed number
of available gears. We have considered the gear choice in each discretiza-
tion point on the whole of the prediction horizon, which led to a large search
space prohibiting the use of exhaustive search techniques.
Previous work has attacked this predictive control problem using dynamic
programming techniques, or by considering only a single gear shift on the
prediction horizon. We have demonstrated that the techniques developed in
this thesis allow for a computationally very efficient solution of this mixed–
integer model–predictive control problem. We achieved mixed–integer con-
trol feedback times as low as one millisecond, staying below 10 milliseconds
for most feedback computations and below 50 milliseconds for all scenarios
investigated.
A Implementation

A.1 The Multiple–Shooting Real–Time Online


Optimization Method MuShROOM

The mixed–integer optimal control algorithm developed and presented in


this thesis has been implemented in C as the “multiple shooting real–time
online optimization method”, short MuShROOM. This section contains a brief
discussion of the modular architecture, data structures, model functions
and problem description, and the command line based user interface of this
software.

A.1.1 Software Architecture

Modular Architecture

We have adopted the paradigm of two central data structures containing the
static description of the Mixed–Integer Optimal Control Problem (MIOCP)
model on the one hand, and the iterative data for the mixed–integer real–
time iteration scheme on the other hand. The algorithmic components of this
scheme can be naturally separated into five modules as depicted in figure
A.1 that have read access to the static model description, and read/write ac-
cess to the iterative data. While this paradigm does not provide per–module
protection of data, it gives the freedom to change data access patterns as
algorithms continue to be developed.

Algorithmic Variants

The five modules depicted in figure A.1 are abstract placeholders for one of
several concrete implementations of the respective module. Currently avail-
able implementations are listed in table A.1. For the evaluation module, the
integrator module, and the SQP module, only one standard implementation
is available. The Hessian approximation can be chosen as appropriate for

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
322 A Implementation

Evaluator Integrator

read
Model description Hessian

read/write
Iteration data SQP

QP

Figure A.1: Modular architecture of the software MuShROOM.

the problem instance under investigation. The Gauß–Newton Hessian re-


quires a least–squares objective. Two QP solver modules are available that
provide the classical condensing algorithm and the parametric active set
strategy for QPVCs. Details on the latter can be found in section A.2.

Module Variants Description

Evaluator EvaluatorStd Standard module for evaluation of multiple


shooting model functions and derivatives

Hessian HessianDiagonal Diagonal approximation of the Hessian


HessianGaussNewton Gauß–Newton approximation
HessianBFGS BFGS approximation
HessianLBFGS Limited–memory BFGS approximation

Integrator IntegratorRK Explicit fixed–step Runge–Kutta method

SQP SqpStdSolver Standard SQP method

QP QpCondenseSolver Condensing QP solver;


the condensed QP is solved by QPOPT [86]
QpHPSCSolver Parametric active–set QP solver for QPVCs;
see section A.2 for details

Table A.1: Available algorithmic variants for modules of MuShROOM.


A.1 Multiple–Shooting Real–Time Online Optimization Method 323

A.1.2 Description, Implementation, and Solution of a Problem

This section describes the interface of the MuShROOM software exposed to


the user implementing a MIOCP problem instance. We present the layout
and creation of all input files required to describe and implement an optimal
control problem. We further address to different ways of using the MuShROOM
software in order to solve the problem, namely using the command line
interface or using a set of C functions provided for this purpose.

Input and Output

An Optimal Control Problem (OCP) is described by a MATLAB file holding


the static model description, and a shared object file holding all compiled C
model functions, i.e., the ODE system’s right hand side function, the objec-
tive function terms, and all constraint functions. Furthermore, concrete im-
plementations of the five algorithmic modules are made available as shared
objects as well and can be selected via the MATLAB model description. The
solution of an OCP is made available both in MATLAB and in plain text for-
mat. If the command line interface is used, the iterative solution process
can be followed on the screen. This setup is depicted in figure A.2 and will
be explained in more detail in the ensuing sections.

MATLAB problem description MATLAB results file

Shared object holding


MuShROOM Text results file
C model functions

Shared objects
C interface Console output
holding algorithms

Figure A.2: Input and output files of the MuShROOM software.

MATLAB Problem Description

The problem description is read from a MATLAB file which is expected to


contain a structured variable named model with structure fields as listed
324 A Implementation

in table A.3. The dimensions notation indicates the MATLAB array type ex-
pected; {·} denotes a cell array and (·) denotes a vector or matrix. The
flags structure mandates some more detailed explanation. The software
supports two–sided point constraints (rtype 3) only if the two residuals are
affine linear, i.e., their jacobians coincide. A point constraint can be de-
clared as a vanishing constraint by associating it with the lower bound of an
unknown on the same shooting node via the flag vanish.

Possible values for the algorithm fields are listed in table A.1. The indi-
vidual algorithms accept several options and settings as listed in table A.2.
Options inappropriate for the selected algorithmic module are silently ig-
nored.

C Model Functions

All model functions are expected to be implemented as callable C func-


tions residing in the shared object file specified in the MATLAB problem
description. The shared object is expected to export a single function int
initialize (model) that is called by the MuShROOM software to obtain func-
tion pointers to all model functions. The shared object is expected to make
these function pointers known by calling for each required function and for
each shooting node or interval the callback function

modelSetFunction (model, function, range, kind, level,


pointer);

with arguments as described in table A.4. The ODE nominal right hand side
and one nominal objective function term are mandatory. A Mayer type ob-
jective can be set on the final shooting node only. For all functions, deriva-
tives in the form of dense Jacobians may optionally be provided. Unavail-
able dense Jacobians are approximated by one–sided finite differences. For
the ODE system’s right hand side, sparse Jacobians or dense directional
forward derivatives may be provided in addition. Unavailable directional
forward derivatives of the ODE system’s right hand side are computed by
multiplication with the sparse (preferred) or dense (discouraged) Jacobian,
or are approximated by directional one–sided finite differences.

All model functions are expected to have the C signature

int function (args)


A.1 Multiple–Shooting Real–Time Online Optimization Method 325

regardless of their type and level. They all accept the same call arguments
structure args with fields listed in table A.5 as single argument, and to re-
turn a success or error code according to table A.7. The valid input fields
and expected output fields of this arguments structure depending on the
model function and type are listed in table A.6. Jacobians of the function’s
value are stored in either dense column–major format or in sparse triplets
format. Directional derivatives are always stored in dense format and are
used for the ODE system’s right hand side function only. The point con-
straint functions evaluation two–sided point constraint (rtype 3) compute
two residuals. The single Jacobian is computes in the lower residual, such
that two–sided point constraints must always be affine linear. The extended
matching condition functions couple ( x (t i+1 ), u i ) and (si+1 , i i+1 ) values be-
longing to shooting node i + 1 and the two adjacent shooting intervals
[t i , t i+1 ] and [t i+1 , t i+2 ]. Consequentially, Jacobians with respect to the four
inputs must be computed.

An Exemplary Model

An exemplary MATLAB file for the very simple NMPC problem


 3
min x 2 (t) + u2 (t) dt (A.1)
x(·),u(·)
0
s. t. ẋ(t) = (1 + x(t))x(t) + u(t), t ∈ [0, 3],
x(0) = x meas ,
x(3) = 0,
x(t) ∈ [−1, 1], t ∈ [0, 3],
u(t) ∈ [−1, 1], t ∈ [0, 3].

that properly sets up a model description structure is given in figure A.3.


An exemplary C file for problem (A.1) that makes use of the documented
functions is given in figure A.5. As can be seen, nominal functions and
dense Jacobian functions for the ODE system’s right hand side, a least–
squares objective, and an end–point constraint are implemented, and are
registered with MuShROOM during initialization of the shared object contain-
ing this model.
326 A Implementation

Field Type Def. Description

integrator
.steps double 20 Number of integrator steps

hessian
.limit int 30 Memory length of the L–BFGS Hessian
.levmar double 0.0 Levenberg–Marquardt regularization of the
Gauß–Newton Hessian

sqpsolver
.kktacc double 10−6 Acceptable KKT tolerance for termination
.itmax int 100 Maximum number of SQP iterations

qpsolver
.featol double 10−8 Tolerance for violation of QP constraints
.opttol double 10−8 Optimality tolerance for QP solution
.ranktol double 10−14 Active set degeneracy tolerance
.itmax int 104 Maximum number of QP solver iterations
.subsolver string QpHPSCSolver: KKT solver for the block structured
KKT system; see section A.2 for possible values
QpCondenseSolver: QP solver for the condensed
QP; must be QpOptSolver to use QPOPT [86]

.expand int 50 QPOPT anti–cycling strategy setting


.feaitmax int 104 QPOPT max. number of phase one iterations
.relax double 1.1 QPOPT infeasible constraints relaxation factor
.print int 0 QPOPT print level for iterations

.updates int 1 qpHPSC flag to enable/disable matrix


updates; effective only for KKTSolverHPSC.
.kktcheck int 0 qpHPSC debug consistency checks
.refine int 0 qpHPSC number of iterative refinement steps
.print_iter int 0 qpHPSC print level for iterations
.print_primal int 0 qpHPSC print level for primal blocking tests
.print_dual int 0 qpHPSC print level for dual blocking tests
.print_degen int 0 qpHPSC print level for degeneracy resolution

Table A.2: Algorithmic settings in the MATLAB model description file.


A.1 Multiple–Shooting Real–Time Online Optimization Method 327

Field Dimen. Type Description

library 1 string Name of shared object file

algorithm.?.name
evaluator 1 string Name of the Evaluate module to use
hessian 1 string Name of the Hessian module to use
integrator 1 string Name of the Integrator module to use
sqpsolver 1 string Name of the SQP module to use
qpsolver 1 string Name of the QP module to use

dim.lsq 1 int Dim. l of the least–squares obj. l(·) ∈ l


dim.nodes 1 int Number m of multiple shooting nodes
p
dim.p 1 int Number np of global parameters p ∈ n
q
dim.q 1 int Number n of control parameters q ∈ n
q
r
dim.r ( m) int Numbers ni of point constraints ri (·) ∈ ni
r

nx
dim.x 1 int Number n of differential states x (·) ∈ 
x

flags.rtype {m}(nri ) int Types of the point constraints ri (·);


0 : lower, 1 : upper, 2 : both, 3 : equality
flags.vanish {m}(nri ) int Index of bound controlling ri j (·) as a
vanishing constraint; −1 for a normal one
flags.xspec 1 int Initialization of the shooting node states;
0 : given, 1 : interpolation, 2 : integration
flags.ive 1 int Enable or disable initial–value embedding

min, max.p ( np ) double Lower and upper bound for parameters p


min, max.q {m}(nq ) double L. and u. bound for control parameters q i
min, max.t 1 double Start and end of time horizon
min, max.x {m}(nx ) double L. and u. bound for shooting node states si
p
val.p (n ) double Initial values for parameters p
val.q {m}(nq ) double Initial value for control parameters q i
val.x {m}(nx ) double Initial value for node states si

sca.p ( np ) double Scale factors for parameters p


sca.q {m}(nq ) double Scale factors for control parameters q i
sca.r {m}(nri ) double Scale factors for point constraint residuals ri
sca.x {m}(nx ) double Scale factors for node states si

fix.q {m}(nq ) int Fixation flags for control parameters q i


fix.x {m}(nx ) int Fixation flags for shooting node states si

Table A.3: Data fields of the MATLAB model description file.


328 A Implementation

Argument Possible Values Description

model Pointer to the static model description

function rightHandSide Sets the ODE right hand side function


leastSquaresObjective Sets the least–squares objective function
mayerObjective Sets the Mayer type objective function
pointConstraint Sets the decouple point constraint func.
continuityCondition Sets the ext. matching condition function

range allIntervals Selects all intervals


allNodes Select all nodes
endNode Select the last node
interiorNode Select all nodes except boundary nodes
startNode Select the first node or interval
any value 0  i  m Selects the single node 0  i  m
or the single interval 0  i  m − 1

kind C The function is a C function


finiteDifference The function should be approximated by
finite differences, available only if level
is not nominal.
sparseConvert The dense Jacobian should be computed
by converting the sparse one, available
only if level is denseJac.
sparseMultiply The directional derivative should be
computed by multiplication with the
sparse jacobian, available only if level is
fwdDirDer or adjDirDer.
denseMultiply The directional derivative should be
computed by multiplication with the
dense Jacobian, available only if level is
fwdDirDer or adjDirDer.

level nominal Nominal model function


denseJac Dense Jacobian function
sparseJac Sparse Jacobian function (ODE)
fwdDirDer Directional derivatives function (ODE)

pointer Pointer to the model function (kind=C)

Table A.4: Call arguments of the routine setModelFunction.


A.1 Multiple–Shooting Real–Time Online Optimization Method 329

Field Dimen. Type Description

t 1 double Model time t ∈ [t 0 , t f ]


x nx double Differential states x (t)
u nu double Controls u(t)
p np double Global model parameters p
f
res0 n double Function’s primary return value
res1 nf double Function’s secondary return value

dt n ×1
f
depends Derivative of res0 w.r.t. the time t
dx nf × n x depends Derivative of res0 w.r.t. the differential
states x (t)
du nf × n u depends Derivative of res0 w.r.t. the control u(t)

dir[3] (1, nx , nu ) × nd double (t, x , u) parts of the derivative directions


der nf × n d double Directional derivatives into directions dir

Table A.5: Fields of the model function call arguments structure args. The dimen-
sion nf is a placeholder for the function value’s actual dimension that
depends on the function type.

Function Level Arguments structure fields


t x x2 u u2 p res0 res1 dt dx dx2 du du2 dir der

rightHandSide nominal I I I I O
denseJac I I I I I O O O
sparseJac I I I I I O O O
fwdDirDer I I I I I I O

leastSquares- nominal I I I I O
Objective denseJac I I I I I O O O

mayer- nominal I I I I O
Objective denseJac I I I I I O O O

point- nominal I I I I O O
Constraint denseJac I I I I I O O O

continuity- nominal I I I I I I O
Condition denseJac I I I I I I I O O O O O

Table A.6: Valid input and output fields in the arguments structure for all functions
and levels. “I” denotes inputs and “O” denotes outputs. Empty fields are
unused and should not be read or written to by the called function.
330 A Implementation

model.library = ’libnmpc1’;

model.algorithm.condenser.name = ’CondenserDense’;
model.algorithm.evaluator.name = ’Evaluator’;
model.algorithm.hessian.name = ’HessianGaussNewton’;
model.algorithm.integrator.name = ’IntegratorRK’;
model.algorithm.sqpsolver.name = ’SqpStdSolver’;
model.algorithm.qpsolver.name = ’QpCondenseSolver’;

model.algorithm.hessian.levmar = 0.0;
model.algorithm.integrator.steps = int32(5);
model.algorithm.sqpsolver.itmax = int32(1000);
model.algorithm.sqpsolver.kktacc = 1e-8;

model.dim.nodes = int32(31);
model.dim.lsq = int32(2);
model.dim.p = int32(1);
model.dim.q = int32(1);
model.dim.x = int32(1);
model.dim.sos = int32(0);
model.dim.hf = int32(0);
model.dim.r(model.dim.nnodes) = int32(1);

model.min.t = 0.0;
model.max.t = 3.0;

model.min.of = 0.0;
model.max.of = 0.2;
model.sca.of = 1.0;
model.sca.may = 1.0;
model.sca.lsq(1:2) = 1.0;
model.sca.r{model.dim.nnodes}(1) = 1.0;
model.flags.rtype(model.dim.nnodes) = int32(3);
model.flags.xspec = 2;
model.flags.ive = 1;

for ii = 1:model.dim.nnodes
model.val.x(ii,1) = 0.05;
model.min.x(ii,1) = -1.0;

Figure A.3: An exemplary MuShROOM description of problem (A.1) in MATLAB (con-


tinued on page 331).
A.1 Multiple–Shooting Real–Time Online Optimization Method 331

model.max.x(ii,1) = 1.0;
model.sca.x(ii,1) = 1.0;
model.fix.x(ii,1) = 0;
end

for ii = 1:model.dim.nnodes-1
model.val.q(ii,1) = 0.0;
model.min.q(ii,1) = -1.0;
model.max.q(ii,1) = 1.0;
model.sca.q(ii,1) = 1.0;
model.fix.q(ii,1) = 0;
end

Figure A.4: An exemplary MuShROOM description of problem (A.1) in MATLAB (con-


tinued from page 330).

int ffcn (struct model_TNominalArgs *args) {


res(0) = (1.0 + x(0)) * x(0) + u(0);
return 0;
}

int ffcn_d (struct model_TDenseJacArgs *args) {


dx(0,0) = 2.0 * x(0) + 1.0;
du(0,0) = 1.0;
return 0;
}

int lsqfcn (struct model_TNominalArgs *args) {


res(0) = x(0);
res(1) = u(0);
return 0;
}

int lsqfcn_d (struct model_TDenseJacArgs *args) {


dx(0,0) = 1.0;
du(1,0) = 1.0;
return 0;
}

Figure A.5: An exemplary MuShROOM C model file for problem (A.1) (continued on
page 332).
332 A Implementation

int rdfcn_e (struct model_TNominalArgs *args) {


res(0) = x(0);
return 0;
}

int rdfcn_e_d (struct model_TDenseJacArgs *args) {


dx(0,0) = 1.0;
return 0;
}

int initialize (struct model_TModel *pModel) {


modelSetFunction (pModel, modelRightHandSide, modelAllIntervals,
modelC, modelNominal, ffcn);
modelSetFunction (pModel, modelRightHandSide, modelAllIntervals,
modelC, modelDenseJac, ffcn_d);
modelSetFunction (pModel, modelLeastSquaresObjective,
modelAllNodes, modelC, modelNominal, lsqfcn);
modelSetFunction (pModel, modelLeastSquaresObjective,
modelAllNodes, modelC, modelDenseJac, lsqfcn_d);
modelSetFunction (pModel, modelPointConstraint, modelEndNode,
modelC, modelNominal, rdfcn_e);
modelSetFunction (pModel, modelPointConstraint, modelEndNode,
modelC, modelDenseJac, rdfcn_e_d);
return 0;
}

Figure A.6: An exemplary MuShROOM C model file (continued from page 331).

Error code Description

<0 Indicates an error during the evaluation of the function.


=0 Indicates successful evaluation of the function.
growSparseMatrix Indicates insufficient storage space for a sparse Jacobian. The
caller should grow the storage space and retry evaluation.

Table A.7: Possible return codes of a model function.


A.1 Multiple–Shooting Real–Time Online Optimization Method 333

A.1.3 User Interface

Two user interfaces are provided for this software package. The command
line interface allows to solve off–line optimal control problems. The C inter-
face provides a facility for embedding measured or estimated system states
using the initial value embedding techniques, thus solving a simulated or
real on–line optimal control problem.

Command Line Interface

The MuShROOM software can be used through a command line interface in-
voked by the shell command
./mushroom problem [--switch[=value] ...]
where problem must be substituted by the full file name of a MATLAB prob-
lem description file. All algorithmic settings, tolerances, etc. are specified in
this MATLAB file as detailed in the previous section. One or more command
line switches from table A.8 may be specified in addition to the problem’s
name.

Switch Description

--[no]aset (Do not) print the active set after each SQP iteration
--continue Continue solution in iterate read from results file
--info Print information about the MuShROOM build, and quit
--plugin=filename Load an additional shared object (library) and initialize it
--verbose=p Set verbosity level of text output to p  0
--[no]writemodel (Do not) write a textual protocol of the model description

Table A.8: MuShROOM command line switches.

The output of MuShROOM if called using the command line interface for
problem (A.1) with embedded initial value x meas = 0 and the settings from
figure A.3 is shown in figure A.7. The individual columns of the textual out-
put are described in table A.9.

C Interface

The MuShROOM software can also be invoked from inside another program.
To this end, a selection of function calls are provided that deal with proper
334 A Implementation

it qp kkttol sobj infcon infmatch laggrd varstep mulstep


0 4.763137e-01 0.00e+00 5.85e-01
1 1 2.10e-01 4.630546e-02 1.33e-15 2.32e-01 4.318604e-02 2.42e+00 2.95e-01
2 1 8.25e-03 2.868694e-03 1.25e-16 2.34e-02 2.322964e-03 8.51e-01 2.47e-01
3 1 3.37e-04 2.535345e-03 1.57e-16 3.05e-04 2.219919e-04 1.15e-01 6.07e-02
4 1 8.66e-06 2.543811e-03 7.16e-19 1.59e-08 1.707440e-06 1.98e-03 1.89e-03
5 1 5.15e-10 2.543811e-03 4.05e-22 5.27e-13 1.895692e-08 8.35e-06 7.19e-06

it qp kkttol sobj infcon infmatch laggrd varstep mulstep


6 1 3.33e-14 2.543811e-03 6.31e-23 1.50e-16 3.278265e-10 9.77e-08 8.03e-08

Figure A.7: Output of the command line interface to MuShROOM for the exemplary
problem (A.1).

Column Description

it Running count of SQP iterations


qp Number of QP or QPVC solver iterations spent
kkttol Convergence criterion, satisfied if KKTTol < kktacc
sobj Scaled objective function to be minimized
infcon Infeasibility of the point and vanishing constraints
infmatch Infeasibility of the matching conditions
laggrd Euclidean norm of the gradient of the (MPVC–)Lagrangian
step Euclidean norm of the primal step
mulstep Euclidean norm of the dual step

Table A.9: Columns of the textual output provided by MuShROOM.

initialization, loading of the problem description, and execution of the SQP


iterations providing control feedback.

The C interface mirrors the software architecture described in this sec-


tion. All algorithmic modules as well as all model functions are contained in
shared object files, referred to as libraries, and the C interface provides fa-
cilities to load one or more libraries and maintains a list of loaded libraries.
The static model description is contained in a MATLAB file, and the C inter-
face can create and fill a model description structure given the name of a
MATLAB file. One or more sets of iterative data can be created and initial-
ized given a model description. To these data sets, the real–time iteration
scheme can be applied by way of three C interface functions mirroring the
A.1 Multiple–Shooting Real–Time Online Optimization Method 335

three phases of that scheme. The most important functions are listed in ta-
ble A.10 together with a brief explanation of their arguments. For a more
extensive description we refer to the program’s documentation.

Function Description

modelReadModel Load a model description from a MATLAB file


model Static model description structure to be initialized
file Open MATLAB file to read from
name Variable containing the model description

modelDelModel Delete a model description


model Initialized model description structure to be deleted

interfaceLoadLibraries Load all algorithm libraries found in a directory


libs Library structure to be initialized or appended
path Directory to be searched for algorithm modules

interfaceLoadLibrary Load a specific algorithm or model library


libs Library structure to be initialized or appended
name Full path and name of the shared object to be loaded

interfaceUnload- Unload all loaded algorithm or model libraries


Libraries
libs Library structure containing all loaded libraries

interfaceInitialize- Initialize all loaded algorithm or model libraries


Libraries
libs Library structure containing all loaded libraries
model Initialized static model description structure

interfaceFinalize- Finalize all loaded algorithm or model libraries.


Libraries
libs Library structure containing all loaded libraries

interfaceNewData Create an iterative data structure for a model


model Initialized static model description structure
data Iterative data structure to be initialized

interfaceDeleteData Delete an iterative data structure


model Initialized static model description structure
data Initialized iterative data structure to be deleted

Table A.10: Functions of the C interface to the MuShROOM software (continued on


page 336).
336 A Implementation

sqpStartup Initialize the SQP for the first iteration


sqpsolver SQP solver module instance
sqpdata SQP subset of the iterative data structure to use
start sqpColdStart/sqpWarmStart for a cold/warm start

sqpPrepareStep Preparation phase of an SQP iteration


sqpsolver SQP solver module instance
sqpdata SQP subset of the iterative data structure to use

sqpFeedbackStep Feedback phase of an SQP iteration


sqpsolver SQP solver module instance
sqpdata SQP subset of the iterative data structure to use
state Measured or estimated state to be embedded
control Control to be fed back to the process

sqpTransitionStep Transition phase of an SQP iteration


sqpsolver SQP solver module instance
sqpdata SQP subset of the iterative data structure to use

Table A.11: Functions of the C interface to the MuShROOM software (continued from
page 335).

Model Description Structure

The static model description data structure shown in table A.12 reflects
that of a MIOCP problem. It is initialized from a user provided problem
description and is not modified during the program’s execution.

Iteration Data Structure

The iteration data structure holds all values computed for one iteration
of the mixed–integer real–time iteration scheme. The evaluation modules
computes function values and derivatives in the current iterate and stores
the in the eval.fun and eval.der structures. The Hessian module com-
putes an node–wise approximation of the Hessian of the Lagrangian based
on these values, and stores the Hessian blocks in the structure hessian.
The sparse QP structure qp.sparse is populated with references to these
values. Depending on the selected QP solver, this QP is either solved di-
rectly by the QpHPSC module, or condensed to a smaller dense QP by the
QpCondense module, which can then be found in the qp.dense structure.
A.1 Multiple–Shooting Real–Time Online Optimization Method 337

The SQP module uses the solution of this Quadratic Program (QP) to popu-
late the sqp.iterStep and sqp.mulStep or sqp.iter and sqp.mul, depend-
ing on the setup of the QP.

Field Subfields Description

bndl of, q, x Lower bounds of the objective, control parameters, and node
states
bndu of, q, x Upper bounds of the objective, control parameters, and node
states
dim Problem dimensions
fix q, x Fixation flags for control parameters and node states
flag Miscellaneous flags, see text
func Pointers to the ANSI C model functions
init p, q, x Initial values of the model parameters, control parameters,
and node states
scal of, p, q, x Scale factors of the objective, the model parameters, control
parameters, and node states
time tmin, tmax Start and end time of the time horizon

Table A.12: Static model description structure.

Field Subfields Description

eval.fun bndl Residuals of the lower bounds


bndu Residuals of the upper bounds
may Mayer type objective function value
lsq Least–squares objective function value
match Residuals of the matching conditions
resl Residuals of the lower constraints
resu Residuals of the upper constraints

eval.der may Gradient of the Mayer type objective


lsq Jacobian of the least–squares objective
sens ODE sensitivity w.r.t. the initial values
coup Coupling matrix
res Jacobian of the constraints residuals

Table A.13: Iteration data structure (continued on page 338).


338 A Implementation

hessian qq Hessian of the Lagrangian w.r.t. the controls


qx, xq Mixed Hessian of the Lagrangian
xx Hessian of the Lagrangian w.r.t. the node states

qp.dense constraints Condensed constraints matrix


gradient Condensed gradient vector
hessian Condensed Hessian
resBndl Residuals of the lower bounds
resBndu Residuals of the upper bounds
resl Condensed residuals of the lower constraints
resu Condensed residuals of the upper constraints
activeSet Active set of the QP solution
dualPoint Dual solution of the condensed QP
primalPoint Primal solution of the condensed QP

qp.sparse conCoup Matching condition coupling Jacobians


conPoint Point constraint Jacobian
conSens Matching condition sensitivity Jacobians
gradient Node gradients of the objective
hessian Node Hessians of the Lagrangian
resBndl Node residuals of the lower bounds
resBndu Node residuals of the upper bounds
resMatch Node residuals of the matching conditions
resPointl Node residuals of the lower constraints
resPointu Node residuals of the upper constraints
activeSet Active set of the QP solution
dualPoint Dual solution of the QP
primalPoint Primal solution of the QP

sqp aset Active set


iter Primal iterate
iterStep Full primal step to next iterate
mul Dual iterate
mulStep Full dual step to next iterate
obj Objective function value
stepInfo Information about the current step

Table A.14: Iteration data structure (continued from page 337).


A.1 Multiple–Shooting Real–Time Online Optimization Method 339

An Exemplary NMPC Loop

An exemplary NMPC loop realizing the real–time iteration scheme using this
C interface to MuShROOM is given in figure A.8.

file = ioFileNew (MatlabFile, "model.mat", 0ul,


ioOpenRead|ioOpenExisting);
modelReadModel (&model, file, "model");
delete(file);

interfaceLoadLibrariesInPath (&libs, "");


interfaceLoadLibrary (&libs, "model.so");
interfaceInitializeLibraries (&libs, &model);
interfaceCreateInstances (&model.inst, &model);
interfaceNewData (&model, &data);

sqpStartup (model.inst.sqpsolver, &data.sqp, sqpColdStart);

while (data.sqp.stepInfo.uStatus != sqpStopped) {

sqpPrepareStep (model.inst.sqpsolver, &data.sqp);

// To do: obtain or estimate system state ’system_state’

sqpFeedbackStep (model.inst.sqpsolver, &data.sqp,


system_state, &control_feedback);

// To do: feed ’control_feedback’ back to process

sqpTransitionStep (model.inst.sqpsolver, &data.sqp);


}

interfaceDeleteData (&model, &data);


interfaceFinalizeLibraries (&libs);
modelDelModel (&model);
interfaceUnloadLibraries (&libs);

Figure A.8: An exemplary NMPC loop using the C interface to MuShROOM.


340 A Implementation

A.2 The Block Structured PQP Code qpHPSC

The parametric active set code qpHPSC is part of the MuShROOM software. Its
purpose is to efficiently compute optimal solutions of a sequence of paramet-
ric QPs with vanishing constraints and with block structure as induced by a
direct multiple shooting discretization. It can be used as a QP solver mod-
ule replacing the condensing and QPOPT modules. In addition, it can be used
as a stand–alone tool for Model Predictive Control (MPC) of discrete–time
linear systems with vanishing constraints. qpHPSC implements the paramet-
ric active set strategy of chapter 6 and its extension to the special class of
Quadratic Programs with Vanishing Constraints (QPVCs) obtained from ap-
plying Sequential Quadratic Programming (SQP) methods to a discretized
MIOCP with constraints treated by outer convexification. For the solution of
the KKT system, the HPSC factorization with matrix updates as developed
in chapters 7 and 8 is implemented along with interfaces to several dense
and sparse linear algebra packages for comparison purposes.

A.2.1 Software Architecture

The software architecture of qpHPSC is depicted in figure A.9. The main ac-
tive set loop is implemented and executed as detailed in chapter 6, with the
possibility to either update or recompute the factorization of the Karush–
Kuhn–Tucker (KKT) system using one of several KKT solvers. The main in-
ternal data structures of our implementation are listed in table A.15.

KKT Solvers

For the factorization of the block structured KKT system, one of several
available decomposition codes can be chosen by the user. Choices are two
applicable LAPACK routines for dense symmetric and banded unsymmetric
factorization [9], the sparse symmetric indefinite factorization code MA57
[56] of the Harwell Subroutine Library (HSL), and the unsymmetric multi-
frontal factorization code UMFPACK [50] may be used. The newly developed
Hessian Projection Schur Complement (HPSC) factorization of chapter 7 is
tailored to the direct multiple shooting block structure. Matrix updates for
the KKT system factorization are provided for this last factorization only, as
detailed in chapter 8. Note that matrix updates could in principle be real-
ized for a dense or sparse LU factorization of the structured KKT system as
well, as detailed in chapter 7 and done e.g. by [108].
A.2 Block Structured Parametric Quadratic Programming Code 341

Field Subfield Dim. Description

dim nnodes 1 Number m of multiple shooting nodes


nx m Numbers n of states+controls per node
nF m Numbers nri of point constraints
nG m Number of matching conditions
nP m Number of coupling conditions

aset.bidx, states m × n, nri Active set states of the simple bounds


and point constraints
aset.Fidx active m × | A| , | X | Indices of the active simple bounds
and point constraints
inactive m × | AC | , | F | Indices of the inactive/vanished simple
bounds and point constraints
vanish m × n, nri Mapping ξ of simple lower bounds to
vanishing constraints and vv.

mat F m × nri × n Decoupled point constraints Jac. Ri


G m × nx × n Matching condition sensitivities Gi
P m × nx × n Matching condition coupling mat. Pi
H m×n×n Hessian matrices Hi

current, f m×n Current, step, and final gradient on the


homotopy path
delta, bl, bu m×n Simple bounds on homotopy path
end el, eu m × nri Constraint residuals on homotopy path
h m × nx Matching condition residuals on path

iter x m×n Optimal primal iterate (s, q)


l m × nx Optimal matching condition mult. λ
m m × nri Optimal point constraints mult. μ
n m×n Optimal simple bounds mult. ν

kktmat F, Ff, m × ... Point constraint jacbobian blocks


C
Fx, Fi F , F AF , F AX , F A
G, Gf, Gx m × ... Matching condition sensitivity blocks
G, GF , GX
P, Pf, Px m × ... Matching condition coupling blocks
P, PF , PX
H, Hff, m × ... Hessian matrix blocks
Hxf, Hxx H , H FF , H X F , H X X

Table A.15: Main data structures of the block structured QPVC solver code qpHPSC
(continued on page 342).
342 A Implementation

kktrhs f,ff,fx m × n, nF
i
, nX
i
Gradient vectors g , g F , g X
ba m × nX
i
Active simple bounds bX
ea m × nA
i
Active point constraint residuals e A
ha m × nx Matching condition residuals h

kktsol x, xf, xx m × n, nF
i
, nX
i
Primal step δx
la m × nx Matching condition multipliers step δλ
ma m × nA
i
Active point constraints mult. step δμA
na m × nX
i
Active simple bounds mult. step δν X

Table A.16: Main data structures of the block structured QPVC solver code qpHPSC
(continued from page 341).

KKT Factorization HPSC Factorization

Blocking Constraints LAPACK DGBTRF

Step Length LAPACK DSYTRF

Degeneracy Handling UMFPACK

Homotopy Advance HSL MA57

KKT Update HPSC Update

Figure A.9: Control flow of the QP solver module qpHPSC. The two alternative loops
show recomputation or updating of the KKT system’s factorization after
an active set change.
A.2 Block Structured Parametric Quadratic Programming Code 343

A.2.2 C Interface

C Interface Functions

The C interface to the qpHPSC code is straightforward. We provide two func-


tions that start and continue the solution of a sequence of QPVCs, see
table A.18. The problem description is expected as detailed for the field
qp.sparse of the MuShROOM iterative data structure in table A.13. Upon suc-
cessful solution, the fields primalPoint, dualPoint and activeSet hold the
primal–dual optimal solution of the QPVC at the end of the homotopy path
together with the associated active set.

Output

At the user’s choice, the qpHPSC code provides an account of the steps and
active set exchanges performed. Some exemplary iterations are shown in
figure A.10 and the columns are further explained in table A.17. In iteration
1232 a continuation of the QPVC solution process in an adjacent convex
subset can be seen, indicated by a reset of the homotopy parameter.

it distance length ki ty no id vc sides case act regularity


1225 8.7174e-01 1.2826e-01 pr bd 9 1 . fr>up . . 8.9796e+08
1226 8.0012e-01 8.2157e-02 du bd 19 16 16 lo>fr . . na
1227 7.8728e-01 1.6045e-02 pr bd 19 15 15 fr>lo . . 2.9517e+07
1228 7.2650e-01 7.7206e-02 du bd 19 17 17 lo>fr . . na
1229 7.1765e-01 1.2181e-02 pr bd 19 16 16 fr>lo . . 5.1027e+07
1230 5.2708e-01 2.6555e-01 du bd 18 15 15 lo>fr . . na
1231 5.1628e-01 2.0490e-02 pr bd 18 14 14 fr>lo . . 1.7937e+07
1232 2.5533e-01 5.0544e-01 pr bd 17 14 14 fr>lo +0>0- deg 0.0000e+00
1.2822e-06 du bd 17 13 13 lo>fr +0>0- . na
1233 1.0000e+00 0.0000e+00 pr bd 17 13 13 fr>lo +0>0- deg 0.0000e+00
3.2162e-06 du bd 17 15 15 lo>fr +0>0- . na
1234 5.9516e-01 4.0484e-01 du bd 18 16 16 lo>fr . . na
1235 5.7512e-01 3.3666e-02 pr bd 18 15 15 fr>lo . . 2.0223e+07
1236 4.4086e-01 2.3344e-01 du bd 18 17 17 lo>fr . . na
1237 4.2675e-01 3.2023e-02 pr bd 18 16 16 fr>lo . . 3.5430e+07
1238 2.9008e-01 3.2025e-01 pr bd 10 1 . fr>up . . 9.2597e+08
1239 0.0000e+00 1.0000e+00 ub . . . . . . . opt

Figure A.10: Output of some exemplary active set iterations as provided by the
qpHPSC code.
344 A Implementation

Column Description

it Overall running count of QP iterations completed


distance Remaining distance 1 − τk to the end τ1 = 1 of the homotopy path
length Length of the step onto the next blocking constraint on the
remainder [τk , 1] of the homotopy path
ki The kind of a blocking; pr for primal and du for dual
ty The type of a blocking; bd: simple bound, pc: point constraint
no The shooting node of the blocking bound or constraint
id The index of the blocking bound or constraint on the shooting node
vc The associated vanishing constraint, if any
sides The active set exchange taking place
case The MPVC index set exchange taking place, if any
act deg for degeneracy resolution, inf for an infeasible problem,
and opt for the optimal solution at the end of the homotopy path
regularity The linear independence measure

Table A.17: Columns of the per–iteration textual output of the qpHPSC code.

Function Description

hpscHomotopyStart Start the solution of a new parametric QPVC


this Instance of the qpHPSC solver to use
data Pointer to a sparse QP data input/output structure
according to the field qp.sparse in table A.13

hpscHomotopyContinue Continue the solution of a started parametric QPVC


this Instance of the qpHPSC solver to use
data Pointer to a sparse QP data input/output structure
according to the field qp.sparse in table A.13

Table A.18: Functions of the C interface to the code qpHPSC.


A.2 Block Structured Parametric Quadratic Programming Code 345

KKT solver Software Ref. Str. Upd. Description

KKTSolverHPSC This thesis yes yes See chapters 7 and 8


KKTSolverBandLU DGBTRF [9] yes no Banded unsymm. LU
KKTSolverDenseLBL DSYTRF [9] no no Dense symmetric LB L T
KKTSolverMA57 HSL MA57 [56] yes no Sparse symmetric LB L T
KKTSolverUMFPACK UMFPACK [50] yes no Sparse unsymmetric LU

Table A.19: Available KKT solvers for the block structured KKT system. Note that the
dense LB L T decomposition yields inferior performance, and that dense
updates for a dense or sparse LU decomposition could be realized [108].
Bibliography

[1] J. Abadie. On the Kuhn–Tucker theorem. In J. Abadie and S. Vajda,


editors, Nonlinear Programming, pages 21–36. John Wiley & Sons,
Inc., New York, NY, 1967.
[2] P. Abichandani, H. Benson, and M. Kam. Multi-vehicle path coordina-
tion under communication constraints. In American Control Confer-
ence, pages 650–656, 2008.
[3] W. Achtziger and C. Kanzow. Mathematical programs with vanishing
constraints: optimality conditions and constraint qualifications. Ma-
thematical Programming Series A, 114:69–99, 2008.
[4] J. Albersmeyer. Adjoint based algorithms and numerical methods for
sensitivity generation and optimization of large scale dynamic sys-
tems. PhD thesis, Ruprecht–Karls–Universität Heidelberg, 2010.
[5] J. Albersmeyer and H. Bock. Sensitivity Generation in an Adaptive
BDF-Method. In H. G. Bock, E. Kostina, X. Phu, and R. Rannacher, ed-
itors, Modeling, Simulation and Optimization of Complex Processes:
Proceedings of the International Conference on High Performance
Scientific Computing, March 6–10, 2006, Hanoi, Vietnam, pages 15–
24. Springer Verlag Berlin Heidelberg New York, 2008.
[6] J. Albersmeyer and M. Diehl. The Lifted Newton Method and its Ap-
plication in Optimization. SIAM Journal on Optimization, 20(3):1655–
1684, 2010.
[7] F. Allgöwer and A. Zheng. Nonlinear Predictive Control, volume 26 of
Progress in Systems Theory. Birkhäuser, Basel Boston Berlin, 2000.
[8] F. Allgöwer, T. Badgwell, J. Qin, J. Rawlings, and S. Wright. Nonlin-
ear predictive control and moving horizon estimation – An introduc-
tory overview. In P. Frank, editor, Advances in Control, Highlights of
ECC’99, pages 391–449. Springer Verlag, 1999.
[9] E. Anderson, Z. Bai, C. Bischof, S. Blackford, J. Demmel, J. Don-
garra, J. Du Croz, A. Greenbaum, S. Hammarling, A. McKenney, and
D. Sorensen. LAPACK Users’ Guide. Society for Industrial and Ap-

C. Kirches, Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control,


DOI 10.1007/978-3-8348-8202-8,
© Vieweg+Teubner Verlag | Springer Fachmedien Wiesbaden GmbH 2011
348 Bibliography

plied Mathematics, Philadelphia, PA, 3rd edition, 1999. ISBN 0-


89871-447-8 (paperback).
[10] V. Bär. Ein Kollokationsverfahren zur numerischen Lösung allge-
meiner Mehrpunktrandwertaufgaben mit Schalt– und Sprungbedin-
gungen mit Anwendungen in der optimalen Steuerung und der
Parameteridentifizierung. Diploma thesis, Rheinische Friedrich–
Wilhelms–Universität Bonn, 1983.
[11] M. Bartlett. An inverse matrix adjustment arising in discriminant ana-
lysis. Annals of Mathematical Statistics, 22(1):107–111, 1951.
[12] R. Bartlett and L. Biegler. QPSchur: A dual, active set, schur com-
plement method for large-scale and structured convex quadratic pro-
gramming algorithm. Optimization and Engineering, 7:5–32, 2006.
[13] R. Bartlett, A. Wächter, and L. Biegler. Active set vs. interior point
strategies for model predicitve control. In Proceedings of the Ameri-
can Control Conference, pages 4229–4233, Chicago, IL, 2000.
[14] R. Bartlett, L. Biegler, J. Backstrom, and V. Gopal. Quadratic program-
ming algorithms for large-scale model predictive control. Journal of
Process Control, 12:775–795, 2002.
[15] I. Bauer. Numerische Verfahren zur Lösung von Anfangswertauf-
gaben und zur Generierung von ersten und zweiten Ableitungen mit
Anwendungen bei Optimierungsaufgaben in Chemie und Verfahren-
stechnik. PhD thesis, Ruprecht–Karls–Universität Heidelberg, 1999.
[16] B. Baumrucker and L. Biegler. MPEC strategies for optimization of
a class of hybrid dynamic systems. Journal of Process Control, 19
(8):1248 – 1256, 2009. ISSN 0959-1524. Special Section on Hybrid
Systems: Modeling, Simulation and Optimization.
[17] B. Baumrucker, J. Renfro, and L. Biegler. MPEC problem formula-
tions and solution strategies with chemical engineering applications.
Computers and Chemical Engineering, 32:2903–2913, 2008.
[18] R. Bellman. Dynamic Programming. University Press, Princeton, N.J.,
6th edition, 1957. ISBN 0-486-42809-5 (paperback).
[19] P. Belotti. Couenne: a user’s manual. Technical report, Lehigh Uni-
versity, 2009.
[20] A. Bemporad, F. Borrelli, and M. Morari. Model Predictive Control
Based on Linear Programming — The Explicit Solution. IEEE Trans-
Bibliography 349

actions on Automatic Control, 47(12):1974–1985, 2002.


[21] A. Bemporad, S. di Cairano, E. Henriksson, and K. Johansson. Hy-
brid model predictive control based on wireless sensor feedback: An
experimental study. International Journal of Robust and Nonlinear
Control, 20:209–225, 2010.
[22] A. Berkelaar, K. Roos, and T. Terlaky. Recent Advances in Sensitivity
Analysis and Parametric Programming, chapter 6: The Optimal Set
and Optimal Partition Approach to Linear and Quadratic Program-
ming, pages 6–1–6–45. Kluwer Publishers, Dordrecht, 1997.
[23] D. Bertsekas. Dynamic Programming and Optimal Control, volume 1
and 2. Athena Scientific, Belmont, MA, 1995.
[24] D. Bertsekas. Nonlinear Programming. Athena Scientific, Belmont,
MA, 2003.
[25] M. Best. An Algorithm for the Solution of the Parametric Quadratic
Programming Problem, chapter 3, pages 57–76. Applied Mathematics
and Parallel Computing. Physica-Verlag, Heidelberg, 1996.
[26] L. Biegler. Solution of dynamic optimization problems by successive
quadratic programming and orthogonal collocation. Computers and
Chemical Engineering, 8:243–248, 1984.
[27] L. Biegler. An overview of simultaneous strategies for dynamic op-
timization. Chemical Engineering and Processing, 46:1043–1053,
2007.
[28] L. Biegler, O. Ghattas, M. Heinkenschloss, and B. Bloemen Waan-
ders. Large-Scale PDE-Constrained Optimization, volume 30 of Lec-
ture Notes in Computational Science and Engineering. Springer Ver-
lag, Heidelberg, 2003.
[29] H. Bock. Numerische Optimierung zustandsbeschränkter parame-
terabhängiger Prozesse mit linear auftretender Steuerung unter An-
wendung der Mehrzielmethode. Diploma thesis, Universität zu Köln,
1974.
[30] H. Bock. Zur numerischen Behandlung zustandsbeschränkter
Steuerungsprobleme mit Mehrzielmethode und Homotopieverfahren.
Zeitschrift für Angewandte Mathematik und Mechanik, 57(4):T266–
T268, 1977.
[31] H. Bock. Numerical solution of nonlinear multipoint boundary value
350 Bibliography

problems with applications to optimal control. Zeitschrift für Ange-


wandte Mathematik und Mechanik, 58:407, 1978.
[32] H. Bock. Numerical treatment of inverse problems in chemical reac-
tion kinetics. In K. Ebert, P. Deuflhard, and W. Jäger, editors, Mod-
elling of Chemical Reaction Systems, volume 18 of Springer Series
in Chemical Physics, pages 102–125. Springer Verlag, Heidelberg,
1981. URL http://www.iwr.uni-heidelberg.de/groups/agbock/
FILES/Bock1981.pdf.
[33] H. Bock. Recent advances in parameter identification techniques
for ODE. In P. Deuflhard and E. Hairer, editors, Numerical Treat-
ment of Inverse Problems in Differential and Integral Equations,
pages 95–121. Birkhäuser, Boston, 1983. URL http://www.iwr.
uni-heidelberg.de/groups/agbock/FILES/Bock1983.pdf.
[34] H. Bock. Randwertproblemmethoden zur Parameteridentifizierung
in Systemen nichtlinearer Differentialgleichungen, volume 183 of
Bonner Mathematische Schriften. Rheinische Friedrich–Wilhelms–
Universität Bonn, 1987. URL http://www.iwr.uni-heidelberg.de/
groups/agbock/FILES/Bock1987.pdf.
[35] H. Bock and R. Longman. Computation of optimal controls on disjoint
control sets for minimum energy subway operation. In Proceedings of
the American Astronomical Society. Symposium on Engineering Sci-
ence and Mechanics, Taiwan, 1982.
[36] H. Bock and K. Plitt. A Multiple Shooting algorithm for direct
solution of optimal control problems. In Proceedings of the 9th
IFAC World Congress, pages 242–247, Budapest, 1984. Pergamon
Press. URL http://www.iwr.uni-heidelberg.de/groups/agbock/
FILES/Bock1984.pdf.
[37] H. Bock, M. Diehl, E. Kostina, and J. Schlöder. Constrained Optimal
Feedback Control for DAE. In L. Biegler, O. Ghattas, M. Heinken-
schloss, D. Keyes, and B. van Bloemen Waanders, editors, Real-Time
PDE-Constrained Optimization, chapter 1, pages 3–24. SIAM, 2007.
[38] P. Bonami, L. Biegler, A. Conn, G. Cornuéjols, I. Grossmann, C. Laird,
J. Lee, A. Lodi, F. Margot, N. Sawaya, and A. Wächter. An algorithmic
framework for convex mixed integer nonlinear programs. Discrete
Optimization, 5(2):186–204, 2009.
[39] B. Borchers and J. Mitchell. An improved Branch and Bound algo-
Bibliography 351

rithm for Mixed Integer Nonlinear Programming. Computers and Op-


erations Research, 21(4):359–367, 1994.
[40] U. Brandt-Pollmann. Numerical solution of optimal control problems
with implicitly defined discontinuities with applications in engineer-
ing. PhD thesis, Ruprecht–Karls–Universität Heidelberg, 2004.
[41] C. G. Broyden. The convergence of a class of double–rank minimiza-
tion algorithms. Journal of the Institute of Mathematics and its Appli-
cations, 6:76–90, 1970.
[42] A. Buchner. Auf Dynamischer Programmierung basierende nichtline-
are modellprädiktive Regelung für LKW. Diploma thesis, Ruprecht–
Karls–Universität Heidelberg, January 2010. URL http://mathopt.
de/PUBLICATIONS/Buchner2010.pdf.
[43] R. Bulirsch. Die Mehrzielmethode zur numerischen Lösung von nicht-
linearen Randwertproblemen und Aufgaben der optimalen Steue-
rung. Technical report, Carl–Cranz–Gesellschaft, Oberpfaffenhofen,
1971.
[44] J. Bunch and B. Parlett. Direct methods for solving symmetric indefi-
nite systems of linear equations. SIAM Journal of Numerical Analysis,
8(4):639–655, December 1971.
[45] J. Butcher. The Numerical Analysis of Ordinary Differential Equations:
Runge–Kutta and General Linear Methods. Wiley, 1987. ISBN 0-471-
91046-5 (paperback).
[46] E. Camacho and C. Bordons. Model Predictive Control. Springer
Verlag, London, 2004.
[47] Y. Chen and M. Florian. The nonlinear bilevel programming problem:
Formulations, regularity, and optimality conditions. Optimization, 32:
193–209, 1995.
[48] V. Chvatal. Edmonds polytopes and weakly Hamiltonian graphs. Ma-
thematical Programming, 5:29–40, 1973.
[49] R. Dakin. A tree-search algorithm for mixed integer programming
problems. The Computer Journal, 8:250–255, 1965.
[50] T. Davis. Algorithm 832: UMFPACK - an unsymmetric-pattern mul-
tifrontal method with a column pre-ordering strategy. ACM Trans.
Math. Software, 30:196–199, 2004.
[51] M. Diehl. Real-Time Optimization for Large Scale Nonlinear Pro-
352 Bibliography

cesses. PhD thesis, Ruprecht–Karls–Universität Heidelberg, 2001.


URL http://www.ub.uni-heidelberg.de/archiv/1659/.
[52] M. Diehl, H. Bock, J. Schlöder, R. Findeisen, Z. Nagy, and F. Allgöwer.
Real-time optimization and nonlinear model predictive control of pro-
cesses governed by differential-algebraic equations. J. Proc. Contr.,
12(4):577–585, 2002. URL http://www.iwr.uni-heidelberg.de/
groups/agbock/FILES/Diehl2002b.pdf.
[53] M. Diehl, H. Bock, and J. Schlöder. A real-time iteration scheme for
nonlinear optimization in optimal feedback control. SIAM Journal on
Control and Optimization, 43(5):1714–1736, 2005.
[54] M. Diehl, H. Ferreau, and N. Haverbeke. Efficient numerical methods
for nonlinear mpc and moving horizon estimation. In L. Magni, D. Rai-
mondo, and F. Allgöwer, editors, Nonlinear Model Predictive Control,
volume 384 of Springer Lecture Notes in Control and Information
Sciences, pages 391–417. Springer Verlag, Berlin, Heidelberg, New
York, 2009.
[55] J. Dormand and P. Prince. A reconsideration of some embedded
Runge–Kutta formulae. Journal of Computational and Applied Math-
ematics, 15(2):203–211, 1986.
[56] I. Duff. MA57 — a code for the solution of sparse symmetric definite
and indefinite systems. ACM Transactions on Mathematical Software,
30(2):118–144, 2004.
[57] I. Duff and J. Reid. The multifrontal solution of indefinite sparse sym-
metric linear equations. ACM Transactions on Mathematical Soft-
ware, 9(3):302–325, 1983.
[58] M. Dür and V. Stix. Probabilistic subproblem selection in branch-and-
bound algorithms. Journal of Computational and Applied Mathemat-
ics, 182(1):67–80, 2005.
[59] M. Duran and I. Grossmann. An outer-approximation algorithm for a
class of mixed-integer nonlinear programs. Mathematical Program-
ming, 36(3):307–339, 1986.
[60] M. Egerstedt, Y. Wardi, and H. Axelsson. Transition-time optimization
for switched-mode dynamical systems. IEEE Transactions on Auto-
matic Control, 51:110–115, 2006.
[61] E. Eich. Projizierende Mehrschrittverfahren zur numerischen Lö-
sung von Bewegungsgleichungen technischer Mehrkörpersysteme
Bibliography 353

mit Zwangsbedingungen und Unstetigkeiten. PhD thesis, Universität


Augsburg 1991, erschienen als Fortschr.-Ber. VDI Reihe 18 Nr. 109.
VDI-Verlag, Düsseldorf, 1992.
[62] S. Eldersveld and M. Saunders. A block-LU update for large scale lin-
ear programming. SIAM Journal of Matrix Analysis and Applications,
13:191–201, 1992.
[63] M. Engelhart. Modeling, simulation, and optimization of cancer
chemotherapies. Diploma thesis, Ruprecht–Karls–Universität Hei-
delberg, 2009. URL http://mathopt.uni-hd.de/PUBLICATIONS/
Engelhart2009.pdf.
[64] W. Enright. Continuous numerical methods for ODEs with defect con-
trol. Journal of Computational and Applied Mathematics, 125(1):159–
170, December 2001.
[65] E. Fehlberg. Klassische Runge-Kutta-Formeln fünfter und siebenter
Ordnung mit Schrittweiten-Kontrolle. Computing, 4:93–106, 1969.
[66] E. Fehlberg. Klassische Runge-Kutta-Formeln vierter und niedrigerer
Ordnung mit Schrittweiten-Kontrolle und ihre Anwendung auf
Wärmeleitungsprobleme. Computing, 6:61–71, 1970.
[67] H. Ferreau. An online active set strategy for fast solution of
parametric quadratic programs with applications to predictive en-
gine control. Diploma thesis, Ruprecht–Karls–Universität Heidel-
berg, 2006. URL http://homes.esat.kuleuven.be/~jferreau/pdf/
thesisONLINE.pdf.
[68] H. Ferreau, G. Lorini, and M. Diehl. Fast nonlinear model predic-
tive control of gasoline engines. In Proceedings of the IEEE Inter-
national Conference on Control Applications, Munich, pages 2754–
2759, 2006.
[69] H. Ferreau, H. Bock, and M. Diehl. An online active set strategy to
overcome the limitations of explicit MPC. International Journal of
Robust and Nonlinear Control, 18(8):816–830, 2008.
[70] A. Fiacco. Introduction to sensitivity and stability analysis in nonlin-
ear programming. Academic Press, New York, 1983.
[71] R. Fletcher. A new approach to variable metric algorithms. Computer
Journal, 13:317–322, 1970.
[72] R. Fletcher. Practical Methods of Optimization. Wiley, Chichester,
354 Bibliography

2nd edition, 1987. ISBN 0-471-49463-1 (paperback).


[73] R. Fletcher. Resolving degeneracy in quadratic programming. Nu-
merical Analysis Report NA/135, University of Dundee, Dundee, Scot-
land, 1991.
[74] C. Floudas. Nonlinear and Mixed-Integer Optimization - Fundamen-
tals and Applications. Topics in Chemical Engineering. University
Press, Oxford, 1995.
[75] M. Fukushima and P. Tseng. An implementable active–set algorithm
for computing a B–stationary point of a mathematical program with
linear complementarity constraints. SIAM Journal on Optimization,
12:724–739, 1999.
[76] A. Fuller. Study of an optimum nonlinear control system. Journal of
Electronics and Control, 15:63–71, 1963.
[77] C. Garcia and M. Morari. Internal model control. 1. a unifying review
and some new results. Ind. Eng. Chem. Process Des. Dev., 24:472–
484, 1985.
[78] M. Garey and D. Johnson. Computers and Intractability: A Guide to
the Theory of NP-Completeness. W.H. Freeman, New York, 1979.
[79] A. Geoffrion. Generalized Benders decomposition. Journal of Opti-
mization Theory and Applications, 10:237–260, 1972.
[80] M. Gerdts. Solving mixed-integer optimal control problems by
Branch&Bound: A case study from automobile test-driving with gear
shift. Optimal Control Applications and Methods, 26:1–18, 2005.
[81] M. Gerdts. A variable time transformation method for mixed-integer
optimal control problems. Optimal Control Applications and Methods,
27(3):169–182, 2006.
[82] E. Gertz and S. Wright. Object-oriented software for quadratic pro-
gramming. ACM Transactions on Mathematical Software, 29:58–81,
2003.
[83] P. Gill, G. Golub, W. Murray, and M. A. Saunders. Methods for mod-
ifying matrix factorizations. Mathematics of Computation, 28(126):
505–535, 1974.
[84] P. Gill, W. Murray, M. Saunders, and M. Wright. Procedures for opti-
mization problems with a mixture of bounds and general linear con-
straints. ACM Transactions on Mathematical Software, 10(3):282–
Bibliography 355

298, 1984.
[85] P. Gill, W. Murray, M. Saunders, and M. Wright. A practical anti-
cycling procedure for linearly constrained optimization. Mathema-
tical Programming, 45(1–3):437–474, 1989.
[86] P. Gill, W. Murray, and M. Saunders. User’s Guide For QPOPT 1.0: A
Fortran Package For Quadratic Programming, 1995.
[87] D. Goldfarb. A family of variable metric updates derived by variational
means. Mathematics of Computation, 24:23–26, 1970.
[88] D. Goldfarb and A. Idnani. A numerically stable dual method for solv-
ing strictly convex quadratic programs. Mathematical Programming,
27:1–33, 1983.
[89] G. Golub and C. van Loan. Matrix Computations. Johns Hopkins Uni-
versity Press, Baltimore, 3rd edition, 1996.
[90] R. Gomory. Outline of an algorithm for integer solutions to linar pro-
grams. Bulletin of the American Mathematical Society, 64:275–278,
1958.
[91] J. Gondzio. Multiple centrality corrections in a primal–dual interior
point method for linear programming. Computational Optimization
and Applications, 6:137–156, 1996.
[92] A. Griewank. Evaluating Derivatives, Principles and Techniques of
Algorithmic Differentiation. Number 19 in Frontiers in Applied Math-
ematics. SIAM, Philadelphia, 2000.
[93] I. Grossmann. Review of nonlinear mixed-integer and disjunctive
programming techniques. Optimization and Engineering, 3:227–252,
2002.
[94] I. Grossmann, P. Aguirre, and M. Barttfeld. Optimal synthesis of com-
plex distillation columns using rigorous models. Computers and Che-
mical Engineering, 29:1203–1215, 2005.
[95] M. Grötschel, L. Lovász, and A. Schrijver. Geometric Algorithms and
Combinatorial Optimization, volume 2 of Algorithms and Combina-
torics. Springer Verlag, 1988. ISBN 3-540-13624-X, 0-387-13624-X
(U.S.).
[96] J. Guddat, F. G. Vasquez, and H. Jongen. Parametric Optimization:
Singularities, Pathfollowing and Jumps. Teubner, Stuttgart, 1990.
[97] M. Guignard. Generalized Kuhn–Tucker conditions for mathematical
356 Bibliography

programming problems in a Banach space. SIAM Journal on Control,


7(2):232–241, 1969.
[98] J. Hall and K. McKinnon. The simplest examples where the simplex
method cycles and conditions where the EXPAND method fails to pre-
vent cycling. Mathematical Programming: Series A and B, 100(1):
133–150, 2004.
[99] S. Hammarling. A note on modifications to the givens plane rotation.
J. Inst. Maths Applics, 13:215–218, 1974.
[100] S. Han. Superlinearly convergent variable-metric algorithms for ge-
neral nonlinear programming problems. Mathematical Programming,
11:263–282, 1976.
[101] C. Hargraves and S. Paris. Direct trajectory optimization using nonlin-
ear programming and collocation. AIAA J. Guidance, 10(4):338–342,
1987.
[102] N. Haverbeke, M. Diehl, and B. de Moor. A structure exploiting
interior-point method for moving horizon estimation. In Proceedings
of the 48th IEEE Conference on Decision and Control (CDC09), pages
1–6, 2009.
[103] E. Hellström, M. Ivarsson, J. Aslund, and L. Nielsen. Look-ahead con-
trol for heavy trucks to minimize trip time and fuel consumption. Con-
trol Engineering Practice, 17:245–254, 2009.
[104] H. Hermes and J. Lasalle. Functional analysis and time optimal con-
trol, volume 56 of Mathematics in science and engineering. Academic
Press, New York and London, 1969.
[105] T. Hoheisel. Mathematical Programs with Vanishing Constraints. PhD
thesis, Julius–Maximilians–Universität Würzburg, July 2009.
[106] T. Hoheisel and C. Kanzow. First- and second-order optimality condi-
tions for mathematical programs with vanishing constraints. Applica-
tions of Mathematics, 52(6):459–514, 2007.
[107] T. Hoheisel and C. Kanzow. Stationary conditions for mathematical
programs with vanishing constraints using weak constraint qualifica-
tions. J. Math. Anal. Appl., 337:292–310, 2008.
[108] H. Huynh. A Large-Scale Quadratic Programming Solver Based On
Block-LU Updates of the KKT System. PhD thesis, Stanford Univer-
sity, 2008.
Bibliography 357

[109] A. Izmailov and M. Solodov. Mathematical programs with vanish-


ing constraints: Optimality conditions, sensitivity, and a relaxation
method. Journal of Optimization Theory and Applications, 142:501–
532, 2009.
[110] E. Johnson, G. Nemhauser, and M. Savelsbergh. Progress in linear
programming-based algorithms for integer programming: An exposi-
tion. INFORMS Journal on Computing, 12(1):2–23, 2000.
[111] J. Júdice, H. Sherali, I. Ribeiro, and A. Faustino. Complementarity
active-set algorithm for mathematical programming problems with
equilibrium constraints. Journal of Optimization Theory and Applica-
tions, 134:467–481, 2007.
[112] S. Kameswaran and L. Biegler. Simultaneous dynamic optimization
strategies: Recent advances and challenges. Computers and Chemi-
cal Engineering, 30:1560–1575, 2006.
[113] N. Karmarkar. A new polynomial time algorithm for linear program-
ming. Combinatorica, 4(4):373–395, 1984.
[114] W. Karush. Minima of functions of several variables with inequali-
ties as side conditions. Master’s thesis, Department of Mathematics,
University of Chicago, 1939.
[115] G. Kedem. Automatic differentiation of computer programs. ACM
Trans. on Math. Soft., 6:150–165, 1980.
[116] F. Kehrle. Optimal control of vehicles in driving simulators. Diploma
thesis, Ruprecht–Karls–Unversität Heidelberg, March 2010. URL
http://mathopt.de/PUBLICATIONS/Kehrle2010.pdf.
[117] U. Kiencke and L. Nielsen. Automotive Control Systems. Springer
Verlag, 2000.
[118] C. Kirches. A numerical method for nonlinear robust optimal control
with implicit discontinuities and an application to powertrain oscil-
lations. Diploma thesis, Ruprecht–Karls–Universität Heidelberg, Oc-
tober 2006. URL http://mathopt.de/PUBLICATIONS/Kirches2006.
pdf.
[119] C. Kirches, H. Bock, J. Schlöder, and S. Sager. Complementary
condensing for the direct multiple shooting method. To appear in
H. Bock, E. Kostina, H. Phu, and R. Rannacher, editors, Proceedings
of the Fourth International Conference on High Performance Scien-
tific Computing: Modeling, Simulation, and Optimization of Complex
358 Bibliography

Processes, Hanoi, Vietnam, March 2–6, 2009, Springer Verlag, 2011.


URL http://mathopt.de/PUBLICATIONS/Kirches2010a.pdf.
[120] C. Kirches, H. Bock, J. Schlöder, and S. Sager. Block structured qua-
dratic programming for the direct multiple shooting method for op-
timal control. Optimization Methods and Software, 26(2):239–257,
April 2011.
[121] C. Kirches, H. Bock, J. Schlöder, and S. Sager. A factorization with
update procedures for a KKT matrix arising in direct optimal control.
Mathematical Programming Computation, 3(4), Fall 2011 (to appear).
[122] C. Kirches, S. Sager, H. Bock, and J. Schlöder. Time-optimal con-
trol of automobile test drives with gear shifts. Optimal Control
Applications and Methods, 31(2):137–153, March/April 2010. URL
http://mathopt.de/PUBLICATIONS/Kirches2010.pdf.
[123] C. Kirches, L. Wirsching, S. Sager, and H. Bock. Efficient numerics
for nonlinear model predictive control. In M. Diehl, F. Glineur, E. Jar-
lebring, and W. Michiels, editors, Recent Advances in Optimization
and its Applications in Engineering, pages 449–459, Springer Verlag,
2010. URL http://mathopt.de/PUBLICATIONS/Kirches2010c.pdf.
[124] C. Kirches. Fast numerical methods for mixed–integer nonlinear
model–predictive control. PhD thesis, Ruprecht–Karls–Universität
Heidelberg, 2010. URL http://mathopt.de/PUBLICATIONS/
Kirches2010e.pdf.
[125] B. Korte and J. Vygen. Combinatorial Optimization. Springer Verlag,
Berlin Heidelberg New York, 3rd edition, 2006. ISBN 3-540-25684-9.
[126] H. Kuhn and A. Tucker. Nonlinear programming. In J. Neyman, ed-
itor, Proceedings of the Second Berkeley Symposium on Mathema-
tical Statistics and Probability, Berkeley, 1951. University of Califor-
nia Press.
[127] M. Kutta. Beitrag zur näherungsweisen Integration totaler Differen-
tialgleichungen. Zeitschrift für Mathematik und Physik, 46:435–453,
1901.
[128] A. Land and A. Doig. An automatic method of solving discrete pro-
gramming problems. Econometrica, 28:497–520, 1960.
[129] S. Lauer. SQP–Methoden zur Behandlung von Problemen mit in-
definiter reduzierter Hesse–Matrix. Diploma thesis, Ruprecht–Karls–
Universität Heidelberg, February 2010.
Bibliography 359

[130] D. Lebiedz, S. Sager, H. Bock, and P. Lebiedz. Annihilation of limit


cycle oscillations by identification of critical phase resetting stimuli
via mixed-integer optimal control methods. Physical Review Letters,
95:108303, 2005.
[131] D. Lebiedz, S. Sager, O. Shaik, and O. Slaby. Optimal control of self-
organized dynamics in cellular signal transduction. In Proceedings of
the 5th MATHMOD conference, ARGESIM-Reports, ISBN 3-901608-
25-7, Vienna, 2006.
[132] D. Leineweber. Analyse und Restrukturierung eines Verfahrens zur
direkten Lösung von Optimal-Steuerungsproblemen. Diploma thesis,
Ruprecht–Karls–Universität Heidelberg, 1995.
[133] D. Leineweber. Efficient reduced SQP methods for the optimization
of chemical processes described by large sparse DAE models, volume
613 of Fortschritt-Berichte VDI Reihe 3, Verfahrenstechnik. VDI Ver-
lag, Düsseldorf, 1999.
[134] D. Leineweber, I. Bauer, A. Schäfer, H. Bock, and J. Schlöder. An ef-
ficient multiple shooting based reduced SQP strategy for large-scale
dynamic process optimization (Parts I and II). Computers and Chemi-
cal Engineering, 27:157–174, 2003.
[135] S. Leyffer. Deterministic methods for mixed-integer nonlinear pro-
gramming. PhD thesis, University of Dundee, 1993.
[136] S. Leyffer. Integrating SQP and branch-and-bound for mixed integer
nonlinear programming. Computational Optimization and Applica-
tions, 18(3):295–309, 2001.
[137] S. Leyffer. Complementarity constraints as nonlinear equations: The-
ory and numerical experiences. Technical report, Argonne National
Laboratory, June 2003.
[138] S. Leyffer. The return of the active–set method. preprint ANL/MCS-
P1277-0805, Argonne National Laboratory, 9700 South Cass Avenue,
Argonne, IL 60439, USA, February 2005.
[139] S. Leyffer, G. López-Calva, and J. Nocedal. Interior methods for ma-
thematical programs with complementarity constraints. SIAM Jour-
nal on Optimization, 17(1):52–77, 2006.
[140] J. Linderoth and M. Savelsbergh. A computational study of branch
and bound search strategies for mixed integer programming. IN-
FORMS Journal on Computing, 11:173–187, 1999.
360 Bibliography

[141] F. Logist, S. Sager, C. Kirches, and J. van Impe. Efficient multiple


objective optimal control of dynamic systems with integer controls.
Journal of Process Control, 20(7):810–822, August 2010.
[142] C. Long and E. Gatzke. Model predictive control algorithm for priori-
tized objective inferential control of unmeasured states using propo-
sitional logic. Ind. Eng. Chem. Res., 44:3575–3584, 2005.
[143] D. Luenberger. Optimization by vector space methods. Wiley Pro-
fessional Paperback Series. John Wiley & Sons, Inc., New York, NY,
1969. ISBN 0471-18117-X (paperback).
[144] Z. Luo, J. Pang, and D. Ralph. Mathematical Programs with Equlib-
rium Constraints. Cambridge University Press, Cambridge, 1996.
[145] J. Lyness and C. Moler. Numerical differentiation of analytic func-
tions. SIAM Journal on Numerical Analysis, 4:202–210, 1967.
[146] J. Macki and A. Strauss. Introduction to optimal control theory.
Springer Verlag, Heidelberg, 1995.
[147] L. Magni, D. Raimondo, and F. Allgöwer, editors. Nonlinear Model
Predictive Control: Towards New Challenging Applications, volume
384 of Lecture Notes in Control and Information Sciences. Springer
Verlag, 2009.
[148] L. Magni, D. Raimondo, and F. Allgöwer, editors. Proceedings of the
international workshop on assessment and future directions of non-
linear model predictive control (NMPC’08), Pavia, Italy, September
5–9, 2008, volume 384 of Lecture Notes in Control and Information
Sciences, Berlin Heidelberg New York, 2009. Springer Verlag.
[149] O. Mangasarian and S. Fromovitz. Fritz John necessary optimal-
ity conditions in the presence of equality and inequality constraints.
Journal of Mathematical Analysis and Applications, 17:37–47, 1967.
[150] Maplesoft. Maple 13. Maplesoft, Inc., 2009.
[151] J. Mattingley and S. Boyd. Automatic code generation for real-time
convex optimization. In Y. Eldar and D. Palomar, editors, Convex Op-
timization in Signal Processing and Communications. Cambridge Uni-
versity Press, 2010.
[152] D. Q. Mayne. Nonlinear model predictive control: Challenges and op-
portunities. In F. Allgöwer and A. Zheng, editors, Nonlinear Predic-
tive Control, volume 26 of Progress in Systems Theory, pages 23–44,
Bibliography 361

Basel Boston Berlin, 2000. Birkhäuser.


[153] D. Q. Mayne and H. Michalska. Receding horizon control of nonlinear
systems. IEEE Transactions on Automatic Control, 35(7):814–824,
1990.
[154] D. Q. Mayne and S. Rakovic. Optimal control of constrained piece-
wise affine discrete-time systems. Computational Optimization and
Applications, 25:167–191, 2003.
[155] S. Mehrotra. On the implementation of a primal-dual interior point
method. SIAM Journal on Optimization, 2(4):575–601, 1992.
[156] K. Mombaur. Stability Optimization of Open-loop Controlled Walking
Robots. PhD thesis, Ruprecht–Karls–Universität Heidelberg, 2001.
URL http://www.ub.uni-heidelberg.de/archiv/1796.
[157] K. Murty. Some NP-complete problems in quadratic and nonlinear
programming. Mathematical Programming, 39:117–129, 1987.
[158] J. Nocedal and S. Wright. Numerical Optimization. Springer Verlag,
Berlin Heidelberg New York, 2nd edition, 2006. ISBN 0-387-30303-0
(hardcover).
[159] I. Nowak. Relaxation and Decomposition Methods for Mixed Integer
Nonlinear Programming. Birkhäuser, Basel Boston Berlin, 2005.
[160] J. Oldenburg. Logic–based modeling and optimization of discrete–
continuous dynamic systems, volume 830 of Fortschritt-Berichte VDI
Reihe 3, Verfahrenstechnik. VDI Verlag, Düsseldorf, 2005.
[161] J. Oldenburg, W. Marquardt, D. Heinz, and D. Leineweber. Mixed
logic dynamic optimization applied to batch distillation process de-
sign. AIChE Journal, 49(11):2900–2917, 2003.
[162] M. Osborne. On shooting methods for boundary value problems. Jour-
nal of Mathematical Analysis and Applications, 27:417–433, 1969.
[163] B. Owren and M. Zennaro. Derivation of efficient continuous explicit
Runge–Kutta methods. SIAM Journal on Scientific and Statistical
Computing, 13:1488–1501, 1992.
[164] H. Pacejka and E. Bakker. The magic formula tyre model. Vehicle
System Dynamics, 21:1–18, 1993.
[165] D. Peterson. A review of constraint qualifications in finite dimensional
spaces. SIAM Review, 15(3):639–654, July 1973.
362 Bibliography

[166] L. Petzold, S. Li, Y. Cao, and R. Serban. Sensitivity analysis of


differential-algebraic equations and partial differential equations.
Computers and Chemical Engineering, 30:1553–1559, 2006.
[167] K. Plitt. Ein superlinear konvergentes Mehrzielverfahren zur direk-
ten Berechnung beschränkter optimaler Steuerungen. Diplomarbeit,
Rheinische Friedrich–Wilhelms–Universität Bonn, 1981.
[168] A. Potschka. Handling path constraints in a direct multiple
shooting method for optimal control problems. Diploma the-
sis, Ruprecht–Karls–Universität Heidelberg, 2006. URL http://
apotschka.googlepages.com/APotschka2006.pdf.
[169] A. Potschka, H. Bock, and J. Schlöder. A minima tracking variant
of semi-infinite programming for the treatment of path constraints
within direct solution of optimal control problems. Optimization
Methods and Software, 24(2):237–252, 2009.
[170] M. Powell. Algorithms for nonlinear constraints that use Lagrangian
functions. Mathematical Programming, 14(3):224–248, 1978.
[171] S. Qin and T. Badgwell. Review of nonlinear model predictive control
applications. In B. Kouvaritakis and M. Cannon, editors, Nonlinear
model predictive control: theory and application, pages 3–32, London,
2001. The Institute of Electrical Engineers.
[172] I. Quesada and I. Grossmann. An LP/NLP based branch and bound
algorithm for convex MINLP optimization problems. Computers and
Chemical Engineering, 16:937–947, 1992.
[173] A. Raghunathan and L. Biegler. Mathematical programs with equi-
librium constraints (MPECs) in process engineering. Computers and
Chemical Engineering, 27:1381–1392, 2003.
[174] A. Raghunathan, M. Diaz, and L. Biegler. An mpec formulation for
dynamic optimization of distillation operations. Computers and Che-
mical Engineering, 28:2037–2052, 2004.
[175] D. Ralph and S. J. Wright. Some properties of regularization and pe-
nalization schemes for mpecs. Optimization Methods and Software,
19:527–556, 2004.
[176] C. Rao, S. Wright, and J. Rawlings. Application of interior-point me-
thods to model predictive control. Journal of Optimization Theory and
Applications, 99:723–757, 1998.
Bibliography 363

[177] J. Rawlings and D. Mayne. Model Predictive Control: Theory and De-
sign. Nob Hill Publishing, LLC, 2009.
[178] J. Rawlings, E. Meadows, and K. Muske. Nonlinear model predictive
control: A tutorial and survey. In Proc. Int. Symp. Adv. Control of
Chemical Processes, ADCHEM, Kyoto, Japan, 1994.
[179] A. Richards and J. How. Model predictive control of vehicle maneu-
vers with guaranteed completion time and robust feasibility. In Pro-
ceedings of the IEEE American Control Conference (ACC 2003), Den-
ver, CO, USA, June 4–6, 2003, volume 5, pages 4034–4040, 2003.
[180] S. Robinson. Perturbed kuhn-tucker points and rates of convergence
for a class of nonlinear programming algorithms. Mathematical Pro-
gramming, 7:1–16, 1974.
[181] C. D. T. Runge. Über die numerische Auflösung von Differentialgleich-
ungen. Mathematische Annalen, 46(2):167–178, 1895.
[182] R. Russell and L. Shampine. A collocation method for boundary value
problems. Numerische Mathematik, 19:1–28, 1972.
[183] S. Sager. Numerical methods for mixed–integer optimal control prob-
lems. Der andere Verlag, Tönning, Lübeck, Marburg, 2005. URL
http://sager1.de/sebastian/downloads/Sager2005.pdf. ISBN 3-
89959-416-9.
[184] S. Sager, H. Bock, M. Diehl, G. Reinelt, and J. Schlöder. Numerical
methods for optimal control with binary control functions applied to
a Lotka-Volterra type fishing problem. In A. Seeger, editor, Recent
Advances in Optimization (Proceedings of the 12th French-German-
Spanish Conference on Optimization), volume 563 of Lectures Notes
in Economics and Mathematical Systems, pages 269–289, Heidel-
berg, 2006. Springer Verlag.
[185] S. Sager, M. Diehl, G. Singh, A. Küpper, and S. Engell. Determin-
ing SMB superstructures by mixed-integer control. In K.-H. Wald-
mann and U. Stocker, editors, Proceedings OR2006, pages 37–44,
Karlsruhe, 2007. Springer Verlag.
[186] S. Sager, H. Bock, and M. Diehl. Solving mixed-integer con-
trol problems by sum up rounding with guaranteed integer gap.
Preprint, IWR, University of Heidelberg, 2008. URL http://www.ub.
uni-heidelberg.de/archiv/8384.
[187] S. Sager, C. Kirches, and H. Bock. Fast solution of periodic optimal
364 Bibliography

control problems in automobile test-driving with gear shifts. In Pro-


ceedings of the 47th IEEE Conference on Decision and Control (CDC
2008), Cancun, Mexico, pages 1563–1568, 2008. ISBN: 978-1-4244-
3124-3.
[188] S. Sager, H. Bock, and M. Diehl. The integer approximation error in
mixed-integer optimal control. To appear in Mathematical Program-
ming, 2011. URL http://mathopt.de/PUBLICATIONS/Sager2011.
pdf.
[189] S. Sager, G. Reinelt, and H. Bock. Direct methods with maximal
lower bound for mixed-integer optimal control problems. Mathema-
tical Programming, 118(1):109–149, 2009. URL http://mathopt.de/
PUBLICATIONS/Sager2009.pdf.
[190] S. Sager, M. Jung, and C. Kirches. Combinatorial Integral Approxima-
tion. Mathematical Methods of Operations Research, 73(3):363–380,
2011. URL http://mathopt.de/PUBLICATIONS/Sager2011a.pdf.
[191] A. Schäfer. Efficient reduced Newton-type methods for solu-
tion of large-scale structured optimization problems with applica-
tion to biological and chemical processes. PhD thesis, Ruprecht–
Karls–Universität Heidelberg, 2005. URL http://archiv.ub.
uni-heidelberg.de/volltextserver/volltexte/2005/5264/.
[192] S. Scholtes. Convergence properties of a regularization scheme for
mathematical programs with complementarity constraints. SIAM
Journal on Optimization, 11:918–936, 2001.
[193] S. Scholtes. Nonconvex structures in nonlinear programming. Oper-
ations Research, 52(3):368–383, May–June 2004.
[194] V. Schulz, H. Bock, and M. Steinbach. Exploiting invariants in the
numerical solution of multipoint boundary value problems for DAEs.
SIAM Journal on Scientific Computing, 19:440–467, 1998.
[195] C. Schweiger and C. Floudas. Interaction of design and control: Opti-
mization with dynamic models. In W. Hager and P. Pardalos, editors,
Optimal Control: Theory, Algorithms, and Applications, pages 388–
435. Kluwer Academic Publishers, 1997.
[196] O. Shaik, S. Sager, O. Slaby, and D. Lebiedz. Phase tracking and
restoration of circadian rhythms by model-based optimal control. IET
Systems Biology, 2:16–23, 2008.
[197] L. F. Shampine. Interpolation for Runge–Kutta formulas. SIAM Jour-
Bibliography 365

nal on Numerical Analysis, 22(5):1014–1027, October 1985.


[198] D. F. Shanno. Conditioning of Quasi–Newton methods for function
minimization. Mathematics of Computation, 24(111):647–656, July
1970.
[199] M. Soliman, C. Swartz, and R. Baker. A mixed-integer formulation
for back–off under constrained predictive control. Computers and
Chemical Engineering, 32:2409–2419, 2008.
[200] B. Speelpenning. Compiling fast partial derivatives of functions
given by algorithms. PhD thesis, University of Illinois at Urbana-
Champaign, 1980.
[201] M. Steinbach. A structured interior point SQP method for nonlin-
ear optimal control problems. In R. Bulirsch and D. Kraft, editors,
Computational Optimal Control, volume 115 of International Series
of Numerical Mathematics, pages 213–222. Birkhäuser, Basel Boston
Berlin, 1994. ISBN 0-8176-5015-6.
[202] M. Steinbach. Fast recursive SQP methods for large-scale optimal
control problems. PhD thesis, Ruprecht–Karls–Universität Heidel-
berg, 1995.
[203] M. Steinbach. Structured interior point SQP methods in optimal con-
trol. Zeitschrift für Angewandte Mathematik und Mechanik, 76(S3):
59–62, 1996.
[204] M. Steinbach. Tree–sparse convex programs. Mathematical Methods
of Operations Research, 56(3):347–376, 2002.
[205] J. Stoer and R. Bulirsch. Introduction to Numerical Analysis. Springer
Verlag, 1992.
[206] O. Stryk. Numerical solution of optimal control problems by direct
collocation. In Optimal Control: Calculus of Variations, Optimal Con-
trol Theory and Numerical Methods, volume 111, pages 129–143. Bu-
lirsch et al., 1993.
[207] R. Stubbs and S. Mehrotra. Generating convex quadratic inequalities
for mixed 0–1 programs. Journal of Global Optimization, 24:311–332,
2002.
[208] O. Stursberg and S. Engell. Optimal control of switched continu-
ous systems using mixed-integer programming. In 15th IFAC World
Congress, Barcelona, 2002. Paper Th-A06-4.
366 Bibliography

[209] S. Terwen, M. Back, and V. Krebs. Predictive powertrain control for


heavy duty trucks. In Proceedings of IFAC Symposium in Advances in
Automotive Control, pages 451–457, Salerno, Italy, 2004.
[210] T. Tsang, D. Himmelblau, and T. Edgar. Optimal control via collocation
and non-linear programming. International Journal on Control, 21:
763–768, 1975.
[211] G. Vainikko. On the stability and convergence of the collocation
method. Differentsial’nye Uravneniya, 1:244–254, 1965. (In Russian.
Translated in Differential Equations, 1 (1965), pp. 186–194).
[212] R. Vanderbei. LOQO: An interior point code for quadratic program-
ming. Optimization Methods and Software, 11(1–4):451–484, 1999.
[213] J. H. Verner. Explicit Runge–Kutta methods with estimates of the local
truncation error. SIAM Journal on Numerical Analysis, 15(4):772–
790, August 1978.
[214] A. Wächter. An Interior Point Algorithm for Large-Scale Nonlinear
Optimization with Applications in Process Engineering. PhD thesis,
Carnegie Mellon University, 2002.
[215] A. Wächter and L. Biegler. On the implementation of an interior-point
filter line-search algorithm for large-scale nonlinear programming.
Mathematical Programming, 106(1):25–57, 2006.
[216] X. Wang. Resolution of ties in parametric quadratic programming.
Master’s thesis, University of Waterloo, Ontario, Canada, 2004.
[217] Y. Wang and S. Boyd. Fast Model Predictive Control Using Online
Optimization. 2008.
[218] R. Wengert. A simple automatic derivative evaluation program. Com-
mun. ACM, 7(8):463–464, 1964.
[219] R. Whaley and A. Petitet. Minimizing development and maintenance
costs in supporting persistently optimized BLAS. Software: Practice
and Experience, 35(2):101–121, February 2005.
[220] J. Wilkinson. The Algebraic Eigenvalue Problem. Clarendon Press,
Oxford, 1965.
[221] R. Wilson. A simplicial algorithm for concave programming. PhD
thesis, Harvard University, 1963.
[222] Wolfram Research, Inc. Mathematica. Wolfram Research, Inc., Cham-
paign, Illinois, 5.0 edition, 2003.
Bibliography 367

[223] E. Zafiriou. Robust model predictive control of processes with hard


constraints. Computers & Chemical Engineering, 14(4–5):359–371,
1990.
[224] V. Zavala and L. Biegler. The advanced–step NMPC controller: op-
timality, stability and robustness. Automatica, 45(1):86–93, January
2009. submitted.
[225] V. Zavala, C. Laird, and L. Biegler. A fast computational framework for
large-scale moving-horizon estimation. In Proceedings of the 8th In-
ternational Symposium on Dynamics and Control of Process Systems
(DYCOPS), Cancun, Mexico, 2007.

You might also like