Real-Time Optimization For Large Scale Nonlinear Processes - DIEHL
Real-Time Optimization For Large Scale Nonlinear Processes - DIEHL
zur
der
Naturwissenschaftlich-Mathematischen Gesamtfakultät
der
Ruprecht-Karls-Universität
Heidelberg
vorgelegt von
aus Hamburg
Keywords
Boundary Value Problems, Constrained Gauss-Newton, Dierential Algebraic Equations,
Direct Multiple Shooting, Distillation Columns, Dynamic Chemical Processes, Embedding
Techniques, Index One DAEs, Large-Scale Systems, Newton Type Methods, Nonlinear
Model Predictive Control, Optimal Feedback Control, Periodic Control, Real-Time Opti-
mization
Acknowledgements
I thank my advisors Prof. Dr. Dr. h.c. Hans Georg Bock and Dr. Johannes Schlöder, Inter-
disziplinäres Zentrum für Wissenschaftliches Rechnen (IWR), University of Heidelberg, for
their excellent support over the last three years, and for their contribution to major ideas of
the presented real-time optimization scheme. It was a pleasure to build on their extraor-
dinary knowledge in the area of dynamic optimization, and their open minded attitude
towards applied research deeply inuenced my view on mathematics and its applications.
I also thank Prof. Dr. Frank Allgöwer, Institute for Systems Theory in Engineering (IST),
University of Stuttgart, for the direct and indirect support that he provided for my work.
His enthusiasm initially convinced me to enter the area of Nonlinear Model Predictive
Control, and his talent to ask the right questions at the right time did decisively inuence
the course of my work.
I owe an enormous debt of gratitude to Rolf Findeisen from the IST, for his willing-
ness and extraordinary ability to explain engineering issues to a numerical analyst, which
helped considerably to make a fruitful and lasting collaboration possible. I want to thank
him and Dr. Ilknur Uslu and Stefan Schwarzkopf from the Institut für Systemdynamik
und Regelungstechnik (ISR), University of Stuttgart, for many inspiring discussions and
for their commitment to our project, the experimental application of nonlinear model pre-
dictive control to a pilot plant distillation column at ISR. All experimental results with
the distillation column were obtained together with them. Furthermore, I want to thank
Prof. Dr.-Ing. Dr. h.c. mult. Ernst Dieter Gilles, Dr.-Ing. Achim Kienle and Erik Stein,
Max-Planck-Institut für Dynamik komplexer technischer Systeme, Magdeburg, for support
of the project.
Many people have directly or indirectly contributed to the success of this work: rst
and foremost, I thank Dr. Daniel Leineweber, who not only introduced me into the world
of numerical process optimization, but also continued to be a constant source of advice. I
had the chance to build on the software in the simulation and optimization group at IWR,
especially on his well structured software package MUSCOD-II, which signicantly helped
towards the successful realization of the numerical methods developed in this thesis. I
also thank Andreas Schäfer, the coauthor of MUSCOD-II, for many invaluable discussions
about implementation details, and for his generous willingness to help with diverse software
problems. It was a pleasure to share a room with him.
I am grateful to Tobias Bürner, who provided valuable help in the area of parameter
and state estimation. Dr. Zoltan Nagy from Babes-Bolyai University, Cluj, Romania, de-
veloped large parts of the employed distillation model during a research stay in Heidelberg,
and I want to thank him and Rolf Findeisen for the productive time we had together in
Heidelberg. Moritz Wendt from the Institut für Prozess- und Anlagentechnik , Technical
University Berlin, gave helpful advice about the modelling of hydrodynamics.
In the very nal phase of this work, several colleagues helped with proofread-
ing and critical remarks. I especially thank Wolfgang Bangerth, Ulrich Brandt-
Pollmann, Dr. Chrys Correa, Julia Hartmann, Dr. Ekaterina Kostina, Jan Schrage and
Dr. Michael Winckler.
I heartily thank our group's secretary Margret Rothfuÿ for her contribution to the
friendly environment in the workgroup, and our system administrator Thomas Kloepfer
for many hours he spent helping me in various respects. I like to extend my thanks to the
other people of the group for creating the open and constructive atmosphere that made
my time there very pleasant.
Here I like to express my gratitude to Prof. Dr. Dr. h.c. mult. Willi Jäger for having
incited my interest in applied mathematics through his inspiring introductory lectures and
for his support and advice at several stages of my career. I thank him and the managing
board of directors of the IWR for creating a great environment for doing interdisciplinary
research. I have been particularly lucky to be a member of the IWR's postgraduate program
Modeling and Scientic Computing in Mathematics and Natural Sciences (Chairman:
Prof. Dr. Dr. h.c. Hans Georg Bock), which provided many inspiring interdisciplinary
contacts.
Financial support by the Deutsche Forschungsgemeinschaft (DFG) within this post-
graduate program as well as within the DFG-Schwerpunktprogramm Real-Time Opti-
mization of Large Systems in the project Echtzeit-Optimierung bei groÿen nichtlinearen
DAE Modellen der Verfahrenstechnik am Beispiel gekoppelter Destillationskolonnen is
gratefully acknowledged.
Finally, I happily thank my friends, my at mates, my family and my girlfriend Anne
for the wonderful support and encouragement at home.
Contents
Acronyms xi
List of Selected Symbols xiii
Introduction 1
1 Real-Time Optimal Control 9
1.1 Optimal Control Problems in DAE . . . . . . . . . . . . . . . . . . . . . . 9
1.1.1 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.2 A Guiding Example: Continuous Stirred Tank Reactor . . . . . . . . . . . 12
1.2.1 Dynamic Model of the CSTR . . . . . . . . . . . . . . . . . . . . . 12
1.2.2 The Optimal Control Problem . . . . . . . . . . . . . . . . . . . . . 15
1.3 Optimal Feedback Control . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.3.1 Linearized Neighboring Feedback Control . . . . . . . . . . . . . . . 18
1.3.2 Innite Horizon Problems . . . . . . . . . . . . . . . . . . . . . . . 19
1.4 Nonlinear Model Predictive Control . . . . . . . . . . . . . . . . . . . . . . 21
1.4.1 Schemes to Ensure Nominal Stability . . . . . . . . . . . . . . . . . 21
1.4.2 Alternative Feedback Strategies . . . . . . . . . . . . . . . . . . . . 24
vii
viii CONTENTS
4 Real-Time Iterations 53
4.1 Practical Real-Time Optimal Control . . . . . . . . . . . . . . . . . . . . . 53
4.1.1 A Conventional Approach . . . . . . . . . . . . . . . . . . . . . . . 54
4.1.2 The Real-Time Iteration Idea . . . . . . . . . . . . . . . . . . . . . 55
4.2 The Initial Value Embedding . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.3 Real-Time Iterations on Shrinking Horizons . . . . . . . . . . . . . . . . . 58
4.3.1 A Real-Time Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 59
4.3.2 Comparison with Linearized Neighboring Feedback Control . . . . . 60
4.3.3 Problems with Free Final Time . . . . . . . . . . . . . . . . . . . . 62
4.4 Real-Time Iterations on Moving Horizons . . . . . . . . . . . . . . . . . . . 63
4.4.1 Shift Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.4.2 Warm Start Technique . . . . . . . . . . . . . . . . . . . . . . . . . 65
xi
List of Selected Symbols
xiii
xiv List of Selected Symbols
1
2 Introduction
past prediction horizon
x(t) predicted
state
current state
x0
optimized
controls
past controls u0 u(t)
t0 t0+δ ... t0 +T
Figure 1: The principle of model predictive control: The optimization problem at time t0 ,
for the current system state x0 .
In the industry, however, NMPC is still being perceived as an academic concept rather
than a practicable control strategy, and in a recent survey, Qin and Badgwell [QB00]
report only 88 NMPC applications worldwide, only 5 of which are based on rst principle
models. As detailed nonlinear process models are increasingly being used for the design
+
of industrial processes (see, e.g. Pantelides and Barton [PB93], Ross et al. [RBP 99],
or Sorensen [Sor99]) they may, as a byproduct, also become easily available for NMPC
applications.
The diculty of solving the arising optimal control problems in real-time, however, is
widely regarded as the principal impediment to a practical application of NMPC. In their
survey, Qin and Badgwell [QB00] point out that speed and the assurance of a reliable
solution in real-time are major limiting factors in existing applications.
In this thesis, we present a new approach to respond to the challenge of real-time
optimization in NMPC.
Dynamic optimization algorithms based on the direct solution approach have proven
to be particularly successful for the practical solution of constrained optimal control prob-
lems. In the direct approach, the originally innite optimal control problem is parame-
terized to yield a nite dimensional Nonlinear Programming (NLP) problem, that can be
solved eciently by highly developed variants of sequential quadratic programming (SQP)
(Han [Han76] and Powell [Pow78]). A variety of strategies for formulating the nite di-
mensional NLP exists. The approaches can roughly be classied into sequential and simul-
taneous solution strategies.
Sequential Approach
The sequential approach parameterizes the control trajectory and eliminates the cor-
responding state trajectory from the optimization problem by a numerical solution of
the dynamic model equations (cf. Hicks and Ray [HR71], Sargent and Sullivan [SS78],
Kraft [Kra85]). Only the control parameters remain as degrees of freedom in the NLP. Sim-
ulation and optimization calculations are performed sequentially , one after the other. The
approach can easily be coupled with advanced simulation tools and is applied in many prac-
tical o-line applications (cf. e.g. Pantelides et al. [PSV94], Vassiliadis [VSP94a, VSP94b],
Engl et al. [EKKvS99]; an overview of existing software packages can be found in Binder
+
et al. [BBB 01]).
Many real-time optimization schemes for NMPC are based on the sequential approach.
We particularly mention the so called multistep, Newton-type control algorithm that was
proposed by Li and Biegler [LB89] and de Oliveira and Biegler [OB95b] and which cor-
responds to a constrained Gauss-Newton method. This approach was often applied for
numerical tests of NMPC, see e.g. Abel et al. [ADM95] and M'hamdi et al. [MHAM96]. A
sequential approach was also used, e.g., by Weber [Web95] and Chen [Che97]. For a large-
scale application of the sequential approach in real-time optimization see also Kronseder
et al. [KvSB01].
Sequential optimization schemes for NMPC suer from the drawback that poor initial
guesses for the control trajectory may lead the predicted state trajectories far away from
desired reference trajectories. This often causes an unnecessarily strong nonlinearity of
the resulting NLPs and poor convergence behaviour, especially for unstable systems. In
some cases, an open-loop simulation on a longer horizon is even impossible (see Fig 8.4 in
Chap. 8 for an example).
Simultaneous Approach
The simultaneous approach avoids this diculty by parameterizing both, the control and
the state trajectory, and by solving the dynamic model equations and the control op-
timization problem simultaneously in a large constrained NLP. The parameterized state
trajectory becomes a part of the optimization variables, and instability and nonlinearity
of the dynamic model can be better controlled.
4 Introduction
Many researchers have applied collocation in order to parameterize the dynamic model
(see e.g. Tsang et al. [THE75], Bock [Boc83], Biegler [Bie84], Cuthrell and Biegler [CB89],
Schulz [Sch96]), resulting in very large, but also very sparse NLPs. The collocation ap-
proach has been proposed for the solution of NMPC optimization problems by Biegler
in [Bie00].
A second simultaneous approach to optimal control, the direct multiple shooting
method, was presented by Plitt in 1981 [Pli81]. This method forms the basis for our
real-time algorithm. The optimization horizon of interest is divided into a number of
subintervals with local control parameters, and the dynamic model equations are solved
independently on each of these subintervals, cf. Chap. 2. Continuity of the state trajectory
from one interval to the next is enforced on the NLP level only, thus oering the possi-
bility to deal with unstable and strongly nonlinear system models, as collocation. The
method has long been known as a fast o-line optimization method in ODE and DAE (see
e.g. Bock et al. [BP84, BES88, Boc87, BBLS99], Tanartkit and Biegler [TB95, TB96],
+
Leineweber [Lei96, Lei99], Petzold et al. [PRG 97], Hinsberger et al. [HMP96, Hin98]).
Recently, the direct multiple shooting method was proposed for real-time optimization
problems and NMPC. Santos et al. [SOB95] emphasize the strength of the method in
dealing with unstable modes and apply it to an NMPC simulation example, the Tennesse
Eastman problem (Downs and Vogel [DV93]), but do not address the question of real-time
feasibility. Leineweber et al. [LBS97] proposes a scheme for the fast reoptimization of batch
processes after large disturbances and presents an application example from biochemical
engineering.
In the last year, an experimental feasibility study of NMPC based on the conventional
+
direct multiple shooting method has been presented by Santos et al. [SAC 00, San00],
for an experimentally simulated unstable continuous stirred tank reactor. The nonlinear
rst principle model consists of four dierential states and two controls. Choosing short
prediction horizons, optimization times of a few seconds are realized, which is suciently
fast for the considered example.
Despite these successful applications of direct multiple shooting to real-time optimiza-
tion, the use of an algorithm that was essentially designed for o-line use certainly has
its limits, and this fact is reected in the moderate system sizes of the above examples.
Large scale problems with strict real-time constraints have therefore not been treated in
experimental application examples so far.
3. Perform iterations.
4. Stop when a termination criterion is satised (or when the time limit is reached)
The focus is on chosing an ecient o-line method and to formulate the optimization
problems in such a way that the real-time requirements can be met. Note that a delay of
one sampling time is present in this scheme.
1. Prepare the k -th real-time iteration as far as possible without knowledge of the k -th
data.
2. When the k -th data are available, modify the problem, and perform quickly those
calculations that are necessary to obtain the rst control value.
This approach does only perform one iteration per sampling time and thus allows to reduce
the sampling times considerably. Furthermore, the feedback step 2 is itself much shorter
than a full iteration, so that the response delay can practically be avoided. Note that
the scheme still oers the advantages of a fully nonlinear treatment of the optimization
problems.
The approach can only perform well if the iteration scheme has good contraction prop-
erties this is typically the case for simultaneous approaches like direct multiple shooting
and if the problem modications are implemented in such a way that they have minimal
interference on the iterates.
6 Introduction
The idea to dovetail the solution iterations by employing the initial value embedding
idea was rst proposed by Bock et al. [BDLS00], with a focus on shrinking horizon pro-
cesses. The initial value embedding strategy without a dovetailing of iterations and pro-
cess was implemented in a rst version of the on-line direct multiple shooting method
(Diehl [Die98]), and several numerical feasibility studies have been carried out with this
algorithm: in Diehl et al. [DBLS99] real-time feasibility of the NMPC of a continuous
stirred tank reactor is shown for rather long control horizons (cf. Sec 1.2); in Nagy et
+ + +
al. [NFD 00], Allgöwer et al. [AFN 00], and Findeisen et al. [FAD 00] the NMPC of a
large scale process control example, namely a binary distillation column, is considered, and
real-time feasibility is demonstrated in numerical simulations.
In this thesis we present the newly developed real-time iteration scheme and inves-
tigate the contraction properties of the approach, and present experimental results that
have been obtained by an application of the developed algorithm to the NMPC of a pilot
plant distillation column at the Institut für Systemdynamik und Regelungstechnik (ISR),
University of Stuttgart, employing a sti DAE optimization model with over 200 states.
We mention here that several singular features of algorithm have been presented by
other researchers in the area of practical real-time optimization.
In particular, a one-iteration scheme has been proposed by Li and Biegler [LB89], for the
sequential approach. Their scheme, however, did not include the initial value embedding
strategy for the initialization from one problem to the next, and it seems that the scheme
was not further pursued in application examples. In a subsequent paper, de Oliveira and
Biegler [OB95a] focus on the converged form of the algorithm, which essentially equals a
1
conventional Gauss-Newton method for the sequential approach.
In the application of conventional optimization schemes to on-line control, the question
of how to initialize subsequent problems has found some attention in the literature. Lieb-
man [LEL92] observes that warm starts of the optimization algorithm can save up to 80%
1 Note
that it would be possible to combine the initial value embedding idea with a sequential approach,
though it is not as straightforward as for simultaneous approaches.
7
computation time, cf. also Biegler and Rawlings [BR91]. A shift strategy that accounts for
the movement of the optimization horizon forward in time is proposed, e.g., by de Oliveira
and Biegler [OB95a] for the sequential approach.
5. Chapter 5 contains the major theoretical results of this thesis. After a review of the
convergence properties for general o-line Newton type methods in Sec. 5.1, we show
contractivity of the real-time iterates for the on-line problem on shrinking horizons
(Sec. 5.2). The contractivity result is exploited to investigate the properties of the
on-line solution, compared to the optimal o-line solution.
multiple shooting method in a new setting, leading to the division into preparation
and feedback phase. However, a newly developed Gauss-Newton approach for least
squares integrals is presented in Sec. 6.4, which can be employed for both, the o-
and the on-line direct multiple shooting method.
7. Experimental results are presented in Chapter 7. The study involves the NMPC of a
pilot plant distillation column using a sti dierential algebraic optimization model
with over 200 states. We develop the system model and describe how the system
parameters were determined using experimental data from the real column. The
experimental results demonstrate that NMPC with a large scale process model is
feasible.
8. To demonstrate the power and versatility of the proposed real-time iteration scheme,
we present in Chapter 8 numerical simulations for an unstable periodic control exam-
ple, namely an airborne kite. Control aim is to let the kite y loopings. A new kite
model is developed and a periodic orbit determined. Numerical tests show the real-
time feasibility and an astonishing robustness of the real-time optimization approach
even for large disturbances.
9. We nally conclude this thesis with a summary and an outlook of interesting future
developments.
The developed real-time algorithm, that has also been presented in some publications
+ + +
(Bock et al. [BDS 00], Diehl et al. [DBS 01, DUF 01]), is currently considered for use in
an industrial application.
Chapter 1
In this chapter we will rst introduce a general class of optimal control problems for which
our algorithms are designed, and review some theory regarding optimal feedback control
and nonlinear model predictive control.
Here, x ∈ R nx and z ∈ R nz denote the dierential and the algebraic state vectors, re-
spectively, u ∈ R u is the vector valued control function, whereas p ∈ R p is a vector of
n n
Objective Functional
Let us introduce a general Bolza type objective functional on a time horizon [t0 , tf ] with
start time t0 and nal time tf
tf
L(x(t), z(t), u(t), p, t) dt + E(x(tf ), z(tf ), p, tf ),
t0
where L is often called the Lagrange term, and E the Mayer term of the objective. This
objective functional denes the overall costs that shall be minimized.
9
10 Real-Time Optimal Control
Typically, the distance from the reference trajectory is measured by the integral of a
squared dierence, that may be weighted by a positive denite matrix Q, so that the
integral
tf
1
Q 2 · (l(x(t), z(t), u(t), p, t) − lr (t, p))22 dt
t0
1
shall be minimized.
By redening l(x(t), z(t), u(t), p, t), we can assume that Q=I and lr (p, t) = 0, ∀ t ∈
[t0 , tf ]. By also introducing a least squares Mayer term with a vector valued residual
function e(x(tf ), z(tf ), p, tf ) ∈ R ne , the general form of an objective functional in least
squares form is given as
tf
l(x(t), z(t), u(t), p, t)22 dt + e(x(tf ), z(tf ), p, tf )22 .
t0
This form can be exploited for the ecient solution of the optimization problems by a
Gauss-Newton approach that is presented in Section 6.4.
The most common form of this constraint type are minimum and maximum values for the
controls, but also e.g. safety restrictions on the system state may enter here. In addition,
terminal equality or inequality constraints
r e (x(tf ), z(tf ), p, tf ) = 0
r i (x(tf ), z(tf ), p, tf ) ≥ 0
may be imposed, e.g. to specify that a semi-batch process should stop when the tank is
full. In some nonlinear model predictive control formulations, the terminal constraints help
to guarantee nominal stability (cf. Sec. 1.4.1).
One constraint that plays an important role in the presented algorithms is the initial
value constraint
x(t0 ) = x0 .
1 We nl
use the denition l22 := 2
i=1 li .
1.1 Optimal Control Problems in DAE 11
We will also treat the xed parameters p and the initial time t0 as if they were constrained
variables:
p = p̄
t0 = t̄0
x x0
x̃ := p
and initial condition x̃0 := p̄ ,
t̃ t̄0
and introducing the augmented dierential equation B̃(·) x̃˙ = f˜(·) with
B(·) 0 0 f (·)
B̃(·) := 0 Inp 0 , and f˜(·) := 0 ,
0 0 1 1
the original formulation of the initial value problem formulation can be recaptured if the
clock variable t̃(t) is inserted wherever a direct dependence of the time t was present.
Note, however, that the trivial additional dierential equations are treated indepen-
dently from the others in the numerical solution procedures, for reasons of eciency. Fur-
thermore, only those parameters p that may have dierent values at practically relevant
process conditions should be kept in this way, whereas all denitely known parameters can
be taken as constants that are hidden in the problem functions.
As the optimization problem has become time independent, the time horizon of interest
may start at t0 = 0. Let us dene T to be the horizon length.
If the nal time tf should be xed, this can now be achieved by formulating a terminal
equality constraint
r e (x̃(T )) := t̃(T ) − tf = 0.
Note that in this case the duration T depends implicitly on the initial value x̃0 , because
at a feasible solution tf = t̃(T ) = t̃(0) + T = t̄0 + T , so that T = tf − t̄0 .
12 Real-Time Optimal Control
T
Poc (x0 ) : min L(x(t), z(t), u(t)) dt + E(x(T ), z(T )) (1.1a)
u(·), x(·), 0
z(·), (T )
subject to
x(0) − x0 = 0, (1.1d)
e
r (x(T ), z(T )) = 0, (1.1e)
The length T may either be xed, or appear as a degree of freedom in the optimization
problem.
Solving the optimal control problem (1.1) for an initial value x0 we obtain optimal tra-
∗ ∗ ∗
jectories x (t; x0 ) and z (t; x0 ) and an open-loop optimal control u (t; x0 ), for t ∈ [0, T (x0 )].
In order to keep the dependency of the optimal trajectories on the initial value x0 in mind,
we have taken them as additional arguments to the solution functions.
We shall now introduce as a guiding example an optimal control problem from chemical
engineering, which will be cited several times in this thesis for illustrative purposes.
The feed inow has temperature ϑ0 and contains only cyclopentadiene (substance A)
with concentration cA0 . Its ow rate V̇ can be controlled. In order to keep the liquid tank
volume constant, the outow is kept at the same rate as the inow. The outow contains a
remainder of cyclopentadiene, the product cyclopentenol (substance B), and two unwanted
by-products, cyclopentanediol (substance C) and dicyclopentadiene (substance D), with
concentrations cA , cB , cC , and cD . The scheme for this so-called van der Vusse reaction is
given as
1 k
2 k
A −→ B −→ C
k3
2A −→ D.
The reaction rates ki depend on the reactor temperature ϑ via an Arrhenius law
Ei
ki (ϑ) = ki0 · exp , i = 1, 2, 3.
ϑ/o C + 273.15
The temperature ϑK in the cooling jacket is held down by an external heat exchanger
whose heat removal rate Q̇K can be controlled. As the substances C and D are unwanted
and do not react further, it is not necessary to keep track of their concentrations.
14 Real-Time Optimal Control
The nonlinear ODE model can be derived from component balances for the substances
A and B in the aqueous solution, and from enthalpy balances for the reactor and cooling
jacket:
V̇
c˙A = (cA0 − cA ) −k1 (ϑ)cA −k3 (ϑ)c2A
VR
V̇
c˙B = − cB +k1 (ϑ)cA −k2 (ϑ)cB
VR
V̇ kw AR (1.2)
ϑ̇ = (ϑ0 − ϑ) + (ϑK − ϑ)
VR ρCp VR
1
1
ϑ˙K = Q̇K + kw AR (ϑ − ϑK ) .
mK CP K
Here, CP K and Cp denote the heat capacities of coolant and aqueous solution, ρ the solu-
tion's density, H1 ,H2 , and H3 the reaction enthalpies. Values of these parameters as well
as for the Arrhenius coecients ki0 and Ei for i = 1, 2, 3 and the employed reactor specic
quantities (volume VR , surface AR and heat transfer coecient kW for cooling jacket and
coolant mass mK ) are listed in Table 1.1. By introducing the system state x and the
control vector u as
cA
cB V̇
x=
ϑ
and u= VR
Q̇K
ϑK
we can summarize Eqs. (1.2) as
ẋ = f (x, u).
cB |S
The result of a steady state optimization of the yield
cA0
=
with respect to the design
parameter ϑ0 (feed temperature) and the two controls yields the steady state and controls
2.1402 mol
l
1.0903 mol 14.19 h−1
xS = l
114.19 ◦ C and uS = .
−1113.5 kJ
h
112.91 ◦ C
We will take this steady state as a desired reference value in the optimal control problem
that follows please note that it is of no importance in the following that xS , uS was itself
the result of an optimization; the only property that is important for the optimal control
problem is that f (xS , uS ) = 0.
Note that we do not introduce the constant system parameters as additional variables,
because we assume that they will never be subject to changes.
1.2 A Guiding Example: Continuous Stirred Tank Reactor 15
and
0.5h2 0
R := .
0 5.0 · 10−7 kJ−2 h2
3
1
2
x
1
0 200 400 600 800 1000 1200 1400 1600 1800 2000
1.5
1
2
x
0.5
0 200 400 600 800 1000 1200 1400 1600 1800 2000
120
110
x3
100
0 200 400 600 800 1000 1200 1400 1600 1800 2000
120
110
x4
100
0 200 400 600 800 1000 1200 1400 1600 1800 2000
25
20
1
u
15
10
0 200 400 600 800 1000 1200 1400 1600 1800 2000
0
−1000
2
u
−2000
0 200 400 600 800 1000 1200 1400 1600 1800 2000
time [s]
Figure 1.2: Example solution of the optimization problem (1.3). The rst four graphs show
∗
the optimal state trajectories x (t; x0 ) and the last two the optimal control trajectories
∗
u (t; x0 ).
1.3 Optimal Feedback Control 17
T
min L (x(t), u(t)) dt (1.3)
u(·),x(·) 0
subject to
1.0 mol
l
0.5 mol
x0 := l (1.4)
100 ◦ C
100 ◦ C
x∗ (t; x1 ) = x∗ (t1 + t; x0 )
z ∗ (t; x1 ) = z ∗ (t1 + t; x0 ) ∀ t ∈ [0, T (x1 )].
∗ ∗
u (t; x1 ) = u (t1 + t; x0 )
18 Real-Time Optimal Control
By chosing t = 0 and formulating the last identity for all t1 ∈ [0, T (x0 )], we can conversely
yield the optimal control trajectory u(·; x0 ) by
Hence, the result of the precomputation can be captured in an optimal feedback control
f
(cf. [BH69]) function u that is dened as
This function may be used as a feedback control that leads to the closed-loop DAE system
by the linearization
where
∂uf ∗
K(t) := (x (t; x0 ))
∂x
∗
that is dened for all t ∈ [0, T (x0 )]. Note that the constant term u (t; x0 ) is equal to
f ∗ ∗ ∗
u (x (t; x0 )) = u (0; x (t; x0 )) due to the principle of optimality. The derivative or gain
matrix K, if it exists, can eciently be calculated by using rst and second derivative
1.3 Optimal Feedback Control 19
information along the reference trajectory x∗ (·; x0 ), z ∗ (·; x0 ), and u∗ (·; x0 ), see e.g. Bryson
and Ho [BH69].
The method can be extended to the case that the derivative K does not exist in a strict
sense, e.g. in the case of bang-bang controls, but where it is still possible to use deriva-
tive information along a reference trajectory. Numerical techniques to compute linearized
neighboring feedback controls have been developed, e.g., by Pesch [Pes78], Krämer-Eis et
al. [KE85, KEB87], and Kugelmann and Pesch [KP90a, KP90b]. Linearized neighboring
techniques have been applied for on-line control of batch reactors, e.g., by Terwiesch and
Agarwal [TA94].
Note that the approximations provided by these techniques are only valid in the neigh-
borhood of a reference trajectory. If the real-system has moved far away from the reference
trajectory during process development, the approximation of the optimal feedback control
may become very poor and may drive the system even into directions opposite to what is
desired. Cf. Sec. 4.3.2 and Example 4.4.
x := xS + 0(x0 − xS ),
that interpolate between the steady state xS and the disturbed initial value x0 from (1.4).
f ∗
The graphs for u (x ) := u (0; x ) have been obtained by a numerical solution of the
optimal control problem (1.3) (which we take as an approximation for T = ∞) for 141
lnfc
initial values x , 0 ∈ {−0.20, −0.19, . . . , 1.19, 1.20}, whereas u (x ) := uS +K(0)(x −xS )
is based on a linearization of uf (·) at the steady state xS . For a closed-loop trajectory due
to a linearized neighboring feedback technique, cf. Example 4.4.
In our considerations about optimal feedback control we have assumed that the horizon
length T of the optimization problem (1.1) is a variable in the optimization problem that
is either determined by some constraints or a real degree of freedom. In this case we speak
of shrinking horizon problems, because the time horizon T is shrinking during optimal
process development, as we have seen by the principle of optimality for subarcs. In chemical
engineering this problem type arises typically for batch or semi-batch processes, in robotics
e.g. for time optimal maneuvers.
25
20
1
u
15
4000
2000
2
0
u
−2000
−4000
0 0.2 0.4 0.6 0.8 1
ε
Figure 1.3: Optimal (solid) and linearized neighboring feedback controls (dashed), for the
initial values x := xS + 0(x0 − xS ) of Example 1.1. The dots indicate the optimal feedback
controls for the steady state xS (0 = 0) and the disturbed value x0 (0 = 1) (cf. Fig. 1.2,
t = 0)
Nominal Stability
∞
For steady state tracking problems with an objective
0
L(x(t), z(t), u(t)) dt that satises
L(x, z, u) > 0 for all (x, z, u) = (xS , zS , uS ) and L(xS , zS , uS ) = 0 at the steady state, the
principle of optimality ensures nominal stability of the corresponding closed-loop system,
as the optimal cost function
∞
V∞ (x0 ) := L(x∗∞ (t; x0 ), z∞
∗
(t; x0 ), u∗∞(t; x0 )) dt,
0
if it remains nite, serves as a Lyapunov function (as dened e.g. in [Son90]) for the
closed-loop system.
1
To sketch the idea of the nominal stability proof, let us assume that V∞ (·) ∈ C and
∗ 0
that u∞ (·; x0 ) ∈ C ∀ x0 , and furthermore that the level sets of V∞ (·) are compact in R nx .
First note that V∞ (xS ) = 0 and V∞ (x0 ) > 0, x0 = xS . It will now be shown that
d
V∞ (xcl (t)) < 0, ∀ xcl (t) = xS , (1.6)
dt
so that the only accumulation point of the closed-loop trajectory xcl (t), t ∈ [0, ∞), can be
xS . As the level sets are compact, an accumulation point must exist, so that asymptotic
1.4 Nonlinear Model Predictive Control 21
stability follows. To show the descent property (1.6), rst note that the closed-loop trajec-
∗
tory xcl (·) for the initial value x0 coincides with the optimal trajectory x∞ (·; x0 ). Therefore
it needs only to be shown that
d
V∞ (x∗∞ (t; x0 )) < 0, ∀ x∗∞ (t; x0 ) = xS . (1.7)
dt
Dierentiation of the identity
t
V∞ (x∗∞ (t; x0 )) = V∞ (x0 ) − L(x∗∞ (τ ; x0 ), z∞
∗
(τ ; x0 ), u∗∞ (τ ; x0 )) dτ,
0
d
V∞ (x∗∞ (t; x0 )) = −L(x∗∞ (t; x0 ), z∞
∗
(t; x0 ), u∗∞ (t; x0 )) < 0, ∀ x∗∞ (t; x0 ) = xS .
dt
can serve as a Lyapunov function of the closed-loop system, as for innite horizon problems.
For an overview of such schemes, we refer to the articles by Mayne [May96, May00] or De
Nicolao, Magni, and Scattolini [DMS00]. Here, we will briey introduce three of these
schemes. All three have in common that the so called monotonicity property [DMS00]
holds in a neighborhood ΩT of the steady state xS :
VT (x) ≤ VT−δ (x), ∀ δ ≥ 0, δ ≤ T, x ∈ ΩT . (1.8)
Nominal stability follows together with the principle of optimality for subarcs, which states
that
δ
VT (x0 ) = L(x∗T (t; x0 ), zT∗ (t; x0 ), u∗T (t; x0 )) dt + VT−δ (x∗T (δ; x0 ))
0
∗
so that (using x0 = xT (0; x0 ))
VT (x∗T (δ; x0 )) − VT (x∗T (0; x0 )) ≤ VT−δ (x∗T (δ; x0 )) − VT (x∗T (0; x0 ))
δ
= − 0 L(x∗T (t; x0 ), zT∗ (t; x0 ), u∗T (t; x0 )) dt.
Dierentiating this inequality by δ we can deduce that
d
V (x∗T (0; x0 ))
dt T
= ∂VT
∂x
(x∗T (0; x0 )) ẋ∗T (0; x0 )
≤ −L(x∗T (0; x0 ), zT∗ (0; x0 ), u∗T (0; x0 )) < 0, ∀ x0 = xS .
Let us now choose x0 := xcl (t) to be one state of the closed-loop trajectory, at time t. The
time development of the nominal closed-loop system obeys the same DAE as the model;
∗
because at time t the dierential system state is xcl (t) = x0 = xT (0; x0 ) and the closed-
f ∗
loop control is chosen to be uT (xcl (t)) := uT (0; x0 ), the algebraic state also coincides with
∗
the start of the optimal trajectory: zcl (t) = zT (0; x0 ) (due to the algebraic consistency
condition); therefore, the time derivatives coincide:
r e (x(T )) := x(T ) − xS ,
where xS is the dierential part of the desired steady state, and to employ no nal penalty
E(x(T )). Nominal stability for nonlinear continuous time systems was proven by Mayne
and Michalska [MM90]. The monotonicity property (1.8) follows from the fact that the
∗ ∗ ∗
optimal solution xT−δ (t; x0 ), zT−δ (t; x0 ), and uT−δ (t; x0 ) of a problem Poc,T−δ (x0 ) on a short
horizon [0, T−δ] can be prolonged to a feasible trajectory of the problem Poc,T (x0 ) on a long
∗ ∗
horizon [0, T ], by adding for t ∈ [T −δ, T ] the nal parts xT (t; x0 ) := xS , zT (t; x0 ) := zS ,
∗
and uT (t; x0 ) := uS , that have no additional costs, cf. Fig.1.4.
1.4 Nonlinear Model Predictive Control 23
x∗T−δ (t)
x0
u∗T−δ (t)
xS , uS
T −δ T
Figure 1.4: Monotonicity property for the zero terminal constraint (ZTC) scheme: the
solution trajectories of problem Poc,T−δ (x0 ) can be prolonged to feasible trajectories for
problem Poc,T (x0 ) without increasing the objective.
where x̂(t; x(T )) and ẑ(t; x(T )) are the trajectories corresponding to the following closed-
loop initial value problem on the horizon [T, ∞):
˙
B(·) · x̂(t) = f (x̂(t), ẑ(t), K(x̂(t))),
0 = g(x̂(t), ẑ(t), K(x̂(t))),
x̂(T ) = x(T ).
The function K : R nx → R nu is chosen so as to stabilize the system in the vicinity of the
steady state (typically by a LQR control law for the system linearization). The nal state
i
constraint r (x(T )) ≥ 0 must constrain x(T ) so that all predicted closed-loop trajectories
x̂(t; x(T )), ẑ(t; x(T )), and û(t; x(T )) := K(x̂(t; x(T ))) remain feasible and have nite costs.
The monotonicity property (1.8) follows from the fact that a prolongation of the horizon
from [0, T −δ] to [0, T ] only increases the degrees of freedom; the new degrees of freedom,
the controls u(t) for t ∈ [T −δ, T ], can still be chosen to be u(t) = K(x(t)), which would
yield equal costs as for the short horizon. A practical implementation of this approach must
i
overcome the nontrivial problems of determining the nal state constraint r (x(T )) ≥ 0,
and the on-line computation of the innite integral to determineE(x(T )). Note, however,
that the computation of a nite horizon approximation of E(x(T )) can be very cheap even
on relatively long horizons, if adaptive implicit DAE solvers are used, as the stepsizes in
the vicinity of the steady state can be made very large. We have employed such a scheme
for the control experiments with a distillation column that are presented in Chap. 7, where
the trivial closed-loop law K(·) := uS could be chosen because the system is stable.
to the solution of a corresponding deterministic optimal control problem (see e.g. Bryson
and Ho, [BH69]), a fact that leads to the separation theorem or certainty-equivalence prin-
ciple [Sim56, JT61] for linear systems. Nonlinear stochastic optimal control problems,
however, are dicult to solve even for moderate system sizes.
Robust Control
The area of so called robust control techniques is vast and has undergone rapid development
in the last two decades. Roughly spoken, robust control techniques aim at designing
rc
feedback control laws u (x) that are not only able to stabilize a nominal system model,
but that show a good control performance for a whole set of perturbed/disturbed systems.
For an introduction into linear robust control techniques we refer to Zhou et al. [ZDG96]
or to Morari [Mor87]. Though robust control theory is highly developed for linear systems,
only a few extensions exist that take explicitly nonlinear system models into account. The
question of robustness of NMPC is mostly unsolved. Some preliminary steps have been
outlined for example in [OM94, MM93, YP93], and even some approaches exist that try
to synthesize robust NMPC controllers, e.g. Chen et al. [CSA97] (cf. also [May00]).
Chapter 2
In this chapter we will present, as a rst step towards the numerical solution of the optimal
control problem (1.1), the so called direct multiple shooting parameterization which is
the basis for all algorithms presented later in this thesis. The direct multiple shooting
parameterization transforms the original innite optimal control problem Poc (x0 ) (1.1) into
a nite dimensional Nonlinear Programming (NLP) problem that we will denote by P (x0 ).
The direct multiple shooting method is originally due to Bock and Plitt [Pli81, BP84],
and its most recent form has been developed by Leineweber [Lei99] and implemented
in his optimal control package MUSCOD-II, which also forms the basis for the actual
implementation of the real-time algorithms presented in this work.
27
28 Direct Multiple Shooting
q4 • • s5 •
s4 •
q3 • s3 •
u(τ ) x(τ )
q2 • s2 •
q1 • s1 •
q0• s0 •
0 τ1 τ2 τ3 τ4 1 0 τ1 τ2 τ3 τ4 1
τ τ
and approximate the control u(τ ) by a piecewise constant control representation, i.e., we
set
with N vectors qi ∈ R nu , as sketched on the left hand side of Fig. 2.1. For completeness,
we set as control at the nal time
u(1) := qN := qN −1 ,
where the vector qN is introduced for notational convenience only and will not be regarded
as a new parameter, but just as a second name for qN −1 . Note that the point value u(1)
of the control may directly inuence the nal algebraic state z(1) (that is determined by
g(x(1), z(1), u(1)) = 0) and can therefore not be neglected in the case of DAE models.
It is possible to use other, possibly higher order control parameterizations on the in-
tervals (e.g. linear or cubic polynomials), but it is of crucial importance for the direct
multiple shooting method that the control parameterization has local support on the mul-
tiple shooting intervals [τi , τi+1 ], so that the control parameters have a local inuence only
(cf. Sec. 6.1).
Where continuity of the controls is desired, the control can e.g. be treated as an
additional dierential system state whose time derivative can be controlled.
we will denote dierential and algebraic node values. For brevity we will often combine
x z
them in the vectors si := (si , si ).
All but the last node value serve as initial values for N independent relaxed initial value
problems on the intervals [τi , τi+1 ]:
B(·) · ẋi (τ ) = T f (xi (τ ), zi (τ ), qi ) (2.3)
τ − τi
0 = g(xi (τ ), zi (τ ), qi ) − exp −β g(sxi , szi , qi ) (2.4)
τi+1 − τi
xi (τi ) = sxi . (2.5)
The decaying subtrahend in (2.4) with β > 0 is deliberately introduced to facilitate an e-
x z
cient DAE solution for initial values and controls si , si , qi that may temporarily violate the
x z
consistency conditions (1.1c) (note that (si , si , qi ) is per denition a consistent initial value
for the relaxed initial value problem). This modication (Bock et al. [BES88]), is commonly
referred to as a relaxed DAE formulation, cf. Schulz et al. [SBS98], Leineweber [Lei99].
The solutions of these initial value problems are N independent trajectories xi (τ ), zi (τ )
on [τi , τi+1 ], which are a function of si and qi only. In order to keep this dependency in
mind, we will denote them often by xi (τ ; si , qi ) and zi (τ ; si , qi ). See the right hand side of
Fig. 2.1 for an illustration.
By substituting the independent trajectories xi (τ ), zi (τ ) into the Lagrange term L in
Eq. (1.1a) we can simultaneously calculate the integral objective contributions Li (si , qi )
that are given by
τi+1
Li (si , qi ) := T L(xi (τ ), zi (τ ), qi )) dτ. (2.6)
τi
The introduction of the values sxi and szi has introduced non-physical degrees of freedom
that have to be removed by corresponding equality constraints in the NLP. First, we have
to require that the relaxation terms in the relaxed DAE formulation (2.4) vanish, i.e.,
formulate the algebraic consistency conditions
The rst dierential node value sx0 is required to be equal to the initial value x0 of the
optimization problem:
s0 = x0 . (2.9)
Together, the constraints (2.7), (2.8), and (2.9) remove the additional degrees of freedom
which were introduced with the parameters si , i = 0, . . . , N . It is by no means necessary
that these constraints are satised during the optimization iterations on the contrary, it
is a crucial feature of the direct multiple shooting method that it can deal with infeasible
initial guesses of the variables si .
30 Direct Multiple Shooting
h(sxi , szi , qi ) ≥ 0, i = 0, 1, . . . , N.
Note that it would be equally possible to use a ner grid for the discretization of the path
constraints.
N −1
P (x0 ) : min Li (sxi , szi , qi ) + E(sxN , szN ) (2.10a)
q0 , . . . , qN −1 , i=0
s0 , . . . , sN
subject to
sx0 − x0 = 0, (2.10d)
This is the NLP problem formulation that we will use as a reference in the following
chapters. For a visualization of the NLP variables, see Fig. 2.2. It turns out that the NLP
has a very favourable sparse structure, due to the fact that all constraint functions and the
additive terms of the objective function each depend only on a small number of variables,
and conversely, each variable appears only in a few problem functions.
To conveniently write the NLP (2.10) in a shorter form let us introduce the vectors
q0 s0
.. .. q
∈ R q, ∈ R s, ∈ R nw
n n
q := . s := . and w :=
s
qN −1 sN
q1
q2
sN
q0
qN−1
s3
s2
s0 s1
shooting formulation, the continuity conditions (2.10b) enforce that T is constant over the
whole horizon; its initial value, however, is free , in contrast to the other initial values x0 .
To capture problems with variable T in the above NLP formulation, we therefore only have
to modify the initial value constraint sx0 − x0 = 0 to (Inx | 0)sx0 − x0 = 0 (note that x0 ∈ R nx
n +1
and si ∈ R x ).
x
where the function G has the useful property that its Jacobian ∂G ∂s
with respect to the
∂G
dependent variables, s, is invertible. To see this, note that is lower block triangular
∂s
Inx
∂g ∂g
∂sx ∂sz0
∂x0 (τ1 )
0
0 (τ1 )
− ∂sx − ∂x∂s Inx
0
z
0
..
.
∂xN−1(τN)
− ∂sx − ∂x∂sN−z 1(τN) Inx
N−1 N−1
∂g ∂g
∂sx
N ∂szN
3
sx1
2
1
0 10 20 30 40 50 60 70 80 90 100
1.5
2
1
x
s
0.5
0 10 20 30 40 50 60 70 80 90 100
120
110
sx3
100
0 10 20 30 40 50 60 70 80 90 100
120
110
sx4
100
0 10 20 30 40 50 60 70 80 90 100
25
20
q1
15
10
0 10 20 30 40 50 60 70 80 90 100
0
−1000
2
q
−2000
0 10 20 30 40 50 60 70 80 90 100
node index i
Figure 2.3: Content of NLP variables in the direct multiple shooting method, corresponding
to the solution of Figure 1.2. The dots in the rst four graphs indicate the multiple shooting
node values si , the last two graphs show the piecewise constant controls qi .
The overall number of continuity constraints (2.10b) is Nnx = 400, the initial value
constraint (2.10d) has dimension nx = 4. Together, they form ns constraints, so that
nw − ns = 604 − 404 = 200 = nq eective degrees of freedom remain. The values for all 604
multiple shooting variables at the solution of problem P (x0 ), with x0 according to (1.4), are
visualized in Figure 2.3.
Chapter 3
This chapter is aimed at the preparation of our numerical methods for the solution of
neighboring optimization problems in real-time. We will therefore consider not only one
single NLP problem, but a parameterized family of optimization problems
G(t, w) = 0
P (t) : min F (t, w) subject to
w ∈ R nw H(t, w) ≥ 0
2
with C functions F : R × R w → R , G : R × R w → R G , and H : R × R w →
n n n n
R . Please note that the scalar homotopy parameter t has no relation to the physical
nH
time t. It can be thought of as a one dimensional analog for the initial value x0 that
distinguishes between dierent optimization problems P (x0 ) as they arise in the multiple
shooting parameterization. The vector w can be regarded as the multiple shooting variables
q0 , . . . , qN −1 , s0 , . . . , sN .
We will rst review in Sec. 3.1 some conditions which allow to decide if a point w ∗ (t) is
a (local) solution of an optimization problem P (t) for xed t. In Section 3.2 we will review
a result from parametric optimization that allows to conclude that the solution manifold
w ∗ (t) is continuous and piecewise dierentiable with respect to t, in all benign points
w ∗ (t) that satisfy rather mild conditions. The nondierentiable points are those points
where the set of binding inequalities changes.
The so called Sequential Quadratic Programming (SQP) method is an approach to
∗
nd a (local) minimum w (t) of a problem P (t) for xed homotopy parameter t. It will
be introduced in Sec. 3.3. We also show in Sec. 3.4 that its prototype algorithm, the so
called exact Hessian SQP method , when applied to an optimization problem P (t + 0) and
∗
initialized with the solution of problem P (t), is able to provide a prediction for w (t+0) that
2
is of O(0 ), even if the set of binding inequalities changes at the point t. This astonishing
property, however, requires a slight reformulation of the optimization problems, which leads
directly to the idea of the initial value embedding strategy, a crucial feature of the real-time
iteration approach presented in Chap. 4.
35
36 Local Optimality and SQP Methods
G(w) = 0
min F (w) subject to (3.1)
w ∈ R nw H(w) ≥ 0
∂G
T
∇w G(w) := ∂w
(w) .
G(w)
G̃(w) := .
H act (w)
Note that the active set may be dierent at dierent feasible points w.
Regular points are feasible points w that satisfy the condition that the Jacobian of
the active constraints, ∇G̃(w)T , has full rank, i.e., that all rows of ∇G̃(w)T are linearly
independent.
To investigate local optimality in the presence of constraints, it is very useful to intro-
duce the Lagrangian multiplier vectors λ ∈ R nG and µ ∈ R nH , that are also called adjoint
variables , as they correspond one-to-one to the constraint functions G and H , and to dene
the so called Lagrangian function L by
We will now state a variant of the Karush-Kuhn-Tucker necessary conditions for local
∗
optimality of a point w . These conditions have been rst derived by Karush in 1939 [Kar39]
and independently by Kuhn and Tucker in 1951 [KT51]. (A proof of the following two
theorems can be found in virtually any textbook on nonlinear programming, e.g. Bazaara
and Shetty [BS79] or Nocedal and Wright [NW99].) For brevity, we will restrict our
attention to regular points only.
3.1 Local Optimality Conditions 37
∇w L(w ∗, λ∗ , µ∗ ) = 0 (3.3a)
G(w ∗) = 0, (3.3b)
H(w ∗) ≥ 0, (3.3c)
µ∗ ≥ 0, (3.3d)
µ∗j Hj (w ∗ ) = 0, j = 1, 2, . . . , nH . (3.3e)
act ∗ H s.act
H (w ) =: (w ∗).
H w.act
A KKT point for which all active constraints are strongly active is said to satisfy the strict
complementarity condition.
Quadratic Programs
One special class of optimization problem plays a preeminent role in the SQP algo-
rithms that are presented later in this chapter and deserves some remarks: quadratic pro-
grams (QP) are those optimization problems (3.1) that have a quadratic objective function
and linear constraint functions, i.e., problems of the type
1 T b + Bw = 0
min w Aw + aT w subject to (3.4)
w ∈ R nw 2 c + Cw ≥ 0
with vectors a ∈ R w , b ∈ R nG , c ∈ R nH , A ∈ R nw × R nw , B ∈ R nG × R nw ,
n
and matrices
and C ∈ R H × R w .
n n
A variety of highly developed algorithms to solve QPs exists, and the success of SQP
type methods is to a large part due to the fact that QPs are very eciently solvable.
38 Local Optimality and SQP Methods
The conditions (3.3) for a point (w ∗ , λ∗ , µ∗ ) to be a KKT point of the above QP are:
Aw ∗ + a − B T λ∗ − C T µ∗ = 0
b + Bw ∗ = 0,
c + Cw ∗ ≥ 0,
µ∗ ≥ 0,
µ∗j (cj + Cj,·w ∗ ) = 0, j = 1, 2, . . . , nH .
For QPs without inequalites, the KKT conditions can be written in the compact form
A BT w∗ −a
= .
B 0 −λ∗ −b
The matrix on the left hand side is called the KKT matrix. It is invertible, if B has full
rank nG and A is positive denite on the null space of B , as stated in the following lemma.
The invertibility of the KKT matrix implies that the equality constrained QP has a unique
KKT point.
is invertible.
A short proof of this lemma can be found in Nocedal and Wright [NW99, Lemma 16.1].
The existence and uniqueness of a KKT point can also be shown for inequality con-
strained QPs, e.g. under the two additional assumptions that the feasible set is non-empty,
T T
and that the combined constraint matrix (B , C ) has full rank nG +nH . We will encounter
such a uniquely solvable quadratic programming problem in Theorem 3.4.
First, however, let us review sucient conditions for a KKT point to be a strict local
optimizer.
• w∗ is a regular point,
• the Hessian matrix ∇w2 L(w ∗, λ∗ , µ∗ )1 is positive denite on the null space Ns of the
linearized strongly active constraints
s ∗ G
G̃ (w ) := (w ∗),
H s.act
it holds that
Remark: The sucient conditions of the theorem are called strong second order su-
cient conditions, because weaker sucient conditions exists, which require only the positive
2 ∗ ∗ ∗
deniteness of ∇w L(w , λ , µ ) on a cone
We have chosen the strong formulation, as it turns out that the strong second order su-
cient conditions for optimality, as stated in Theorem 3.3, have the desirable property that
∗ ∗ ∗
a KKT point (w , λ , µ ) that satises them is stable against perturbations in the problem
functions F, G and H, as we will investigate in the following section.
G(t, w) = 0
min F (t, w) subject to (3.6)
w ∈ R nw H(t, w) ≥ 0
We restrict our attention to the subset of points (t, w ∗ (t)) from Σloc that satisfy the strong
second order sucient conditions of Theorem 3.3. The main result of this section is that
1 Here ∂2 L
we use the denition ∇w2 L := ∂w 2 .
40 Local Optimality and SQP Methods
the points (w ∗ (t), λ∗ (t), µ∗ (t)) form a continuous and piecewise dierentiable curve on this
subset, if an additional technical assumption is satised. For a much more detailed discus-
sion of the properties of the set Σloc we refer to the book on parametric optimization by
Guddat, Guerra Vasquez and Jongen [GVJ90].
Before we formulate this theorem, we will give a simple example for illustration.
1 2
min w subject to −t + sinh(w) ≥ 0
w∈R 2
1
w (t)
0
*
−1
−2
−3
−5 0 5
satises the strict complementarity condition for the multiplier vector δµw.act
∗ of the in-
equality constraints.
Then there exists an 0>0 and a dierentiable curve v : [0, 0) → R nw × R nG × R nH ,
w ∗ (t)
t → λ∗ (t)
µ∗ (t)
of KKT points that satisfy the sucient optimality conditions of Theorem 3.3 for the
corresponding problems P (t), t ∈ [0, 0). At t=0 the one sided derivative of this curve is
given by
δw∗ δw∗
w ∗ (t) − w ∗(0) δλ∗ δλ∗
1 ∗ s.act
λ (t) − λ (0) =
∗ := δµ∗
lim
t→0,t>0 t .
∗ ∗
µ (t) − µ (0) δµ∗ w.act
δµ∗
0
Remark 1: Note that the QP (3.7) always has a unique solution (δw∗ , δλ∗ , δµ∗
s.act
, δµw.act
∗ ).
2
This is due to the positive deniteness of ∇w L on the null space of the equality constraint
sT
matrix ∇w G̃ , the feasibility of the QP (δw = 0 is feasible), and the fact that the constraint
s.act
matrix (∇w G, ∇w H , ∇w H w.act ) has full rank due to the assumption that w ∗ (0) is a regular
point.
42 Local Optimality and SQP Methods
Remark 2: The only further requirement in addition to the sucient conditions of The-
orem 3.3 is the technical assumption of strict complementarity in the solution of the
QP (3.7). It is needed to guarantee that there exists an 0>0 so that the active set of the
local solutions of P (t) does not change for t ∈ (0, 0).
Remark 3: The theorem treats only the existence of the right hand side of the solution
∗ ∗ ∗
curve (w (t), λ (t), µ (t)) on the interval t ∈ [0, 0). If the strict complementarity condition
s.act
T
1 2 ∂
min δw ∇ L δw +
T
− ∇w L δw
δw∈Rnw 2 w ∂G
∂t
− + ∇w GT δw = 0
∂H s.act ∂t (3.8)
+ (∇w H s.act ) δw = 0.
T
subject to − ∂t
− ∂H w.act + (∇w H w.act )T δw ≥ 0,
∂t
∗ −δw ∗
w (t) − w ∗ (0) −δλ
∗
1 ∗
lim λ (t) − λ∗ (0) =
−δµ s.act
∗ .
t→0,t<0 t
µ∗ (t) − µ∗ (0) −δµw.act
∗
This is an immediate consequence of the theorem, applied to the reversed problem family
P
(t) := P (−t).
Remark 4: If the reference point (w ∗(0), λ∗ (0), µ∗ (0)) itself satises the strict comple-
w.act
mentarity condition, then no weakly active constraints H exist, and the original and
inverted QP, (3.7) and (3.8), do not contain any inequality constraints. Therefore, the
assumption of strict complementarity in the QP solution is trivially satised for both
problems, and the solution curve exists on both sides, for t ∈ (−0 , 0). Furthermore, from
symmetry follows that the QP solutions coincide (up to a sign change),
δw∗ −δw∗
δλ∗ = −δλ
∗ ,
δµ∗s.act −δµs.act
∗
3
δw ⋅t
*
2
−δ w’ ⋅ t
w (t)
*
0
*
−1
−2
−3
−5 0 5
t
Figure 3.2: Two sided derivative of the solution manifold w ∗ (t) of Example 3.1.
1
min δw 2 subject to −1 + δw ≥ 0,
δw ∈ R 2
which corresponds to the right hand side derivatives of w ∗ (t), µ∗ (t) for t → 0, t > 0.
Conversely, the inverted quadratic programming subproblem (3.8) is
1
min δw 2 subject to 1 + δw ≥ 0,
δw ∈ R 2
δw∗
= 0 and δµw.act
∗ = 0.
This solution corresponds to the (inverted) derivatives of w ∗ (t), µ∗ (t) for t → 0, t < 0. The
two sides of the derivative are illustrated in Figure 3.2.
44 Local Optimality and SQP Methods
∆wk ∆wk
∆yk = ∆λk := λ̃k − λk
∆µk µ̃k − µk
is obtained from the solution point (∆wk , λ̃k , µ̃k ) of the following quadratic program
1
min ∆w T Ak ∆w + ∇w F (wk )T ∆w
∆w ∈ Ωk 2
(3.10)
G(wk ) + ∇w G(wk )T ∆w = 0
subject to
H(wk ) + ∇w H(wk )T ∆w ≥ 0
Existing SQP methods dier mainly by the choice of the steplength αk , the choice of
the so called Hessian matrix Ak and the choice of the set Ωk ⊂ R w . The iterates yk
n
according to Eq. (3.9) form a sequence that is expected to converge towards a KKT point
y ∗ = (w ∗ , λ∗ , µ∗ ) of the NLP. In practice, the iterations are stopped when a prespecied
convergence criterion is fullled.
We will in this section introduce only one SQP method that is theoretically very appeal-
ing: the full step exact Hessian SQP method, that was rst introduced by Wilson [Wil63].
Ak := ∇w2 L(wk , λk , µk ).
To see why this choice is advantageous, let us rst regard an equality constrained problem.
In this case, the necessary optimality conditions for the QP solution (∆wk , λ̃k ) are
∇w L(wk , λk ) ∂ ∇w L(wk , λk ) ∆wk
+ = 0,
G(wk ) ∂(w, λ) G(wk ) ∆λk
∇w L(w, λ) ∇w F (w) − ∇w G(w)λ
= = 0.
G(w) G(w)
This equivalence proves that the full step exact Hessian SQP method shows the same
excellent local convergence behaviour as the Newton-Raphson method, in the vicinity of
∗ ∗
a solution (w , λ ) of the KKT system. Note, however, that it is necessary to start with
a good initial guess not only for the primal variables w, but also for the multipliers λ.
Fortunately, it turns out that the initial guess λ0 of the multipliers is not as crucial as the
initial guess w0 for the primal variables, due to the special structure of the KKT system.
This is expressed in the following theorem (for a proof we refer to Fletcher [Fle87]).
is invertible, then the sequence of iterates generated by the full step exact Hessian SQP
method, i.e., the sequence (wk , λk ) of iterates that satises
∇w2 L(wk , λk ) −∇w G(wk ) wk+1 − wk ∇w F (wk )
= −
∇w G(wk )T 0 λk+1 G(wk )
wk+1 − w ∗ wk − w ∗ 2
λk+1 − λ∗ ≤ C λk − λ∗
Let us now assume that we formulate the rst QP 3.10 for the determination of ∆y0 ,
∗
initialized at y0 = y , with some Hessian matrix A0 . The necessary conditions of optimality
for the QP solution (∆w0 , λ̃0 , µ̃0 ) are
It can be seen that (∆w0 , λ̃0 , µ̃0 ) = (0, λ∗ , µ∗ ) satises these conditions, and assuming
positive deniteness of A0 on the null space of the equality constraints ∇w G(w ∗ )T , this
solution is also the unique optimum of the QP: multipliers and active set are detected
∗
from knowledge of w only. We may therefore infer that even in a neighborhood of a
∗
local optimum w , the multipliers and active set can be determined by the SQP algorithm,
under a weak positive deniteness assumption on the matrix A0 . This can indeed be
(w ∗, λ∗ , µ∗ ) satises the second order sucient conditions
proven, under the condition that
of Theorem 3.3 and the strict complementarity condition. For a detailed discussion and a
proof we refer to Robinson [Rob74].
t − t̆ = 0
P̆ (t̆) : min F (t, w) subject to G(t, w) = 0 (3.14)
t ∈ R , w ∈ R nw
H(t, w) ≥ 0
Remark: The rst order prediction provided by the exact Hessian SQP is equivalent to
one step of the Euler predictor pathfollowing method in parametric optimization [GVJ90,
Sec. 3.3, p. 73].
Proof: For a proof rst note that ∇w̆2 L̆ = ∇w̆2 L due to the linearity of the constraint
t − 0 = 0, so that the value of the additional multiplier λt plays no role in the QP (3.10).
∗ ∗ ∗
Furthermore, it can easily be seen that (w̆ (0), λ̆ (0), µ (0)) satises the sucient optimal-
∗ ∗ ∗
ity conditions of Theorem 3.3 for problem P̆ (0) if and only if (w (0), λ (0), µ (0)) satises
∗
them for problem P (0), and λt (0) =
∂
∂t
L(0, w ∗(0), λ∗(0), µ∗ (0)).
The QP (3.10) for the rst SQP iterate can be written in the form
1 ∂ ∂F 1 ∂2L 2
min ∆w T ∇w2 L∆w + ∆t ∇w LT ∆w + ∇w F T ∆w + ∆t + ∆t
∆t,∆w 2 ∂t ∂t 2 ∂t2
∆t − 0 = 0
subject to G + ∂t ∆t + ∇w GT ∆w = 0
∂G
H + ∂H∂t
∆t + ∇w H T ∆w ≥ 0,
where all functions and derivatives are evaluated at the point t = 0, w ∗ (0), λ∗ (0) and µ∗ (0).
The variable ∆t = 0 can directly be eliminated, and using the fact that G(0, w ∗(0)) = 0
act
and H (0, w ∗ (0)) = 0 as well as the fact that
2
we can formulate the equivalent QP (dropping the constant
∂F
∂t
0 + 12 ∂∂tL2 02 in the objective)
1 ∂
min ∆w T ∇w2 L∆w + 0 ∇w LT ∆w + (∇w Gλ∗ (0) + ∇w H µ∗ (0))T ∆w
∆w 2 ∂t
∂G
∂t
0 + ∇w GT ∆w = 0
act
0 + ∇w H act ∆w ≥ 0
∂H T
subject to
inact ∂H inact
∂t
T
H + ∂t 0 + ∇w H inact ∆w ≥ 0,
3.4 SQP for a Parameterized Problem Family 49
The conditions (3.3) according to Theorem 3.1 for a triple (∆w, λ, µ) to be a KKT point
∗ ∗
of this QP problem are, using λ = λ (0) + ∆λ and µ = µ (0) + ∆µ:
∂
∇w2 L∆w + 0 ∇w L − ∇w G∆λ − ∇w H ∆µ = 0, (3.15a)
∂t
∂G
0 + ∇w GT ∆w = 0, (3.15b)
∂t
∂H s.act
0 + ∇w H s.act ∆w
T
≥ 0, (3.15c)
∂t
∂H w.act
0 + ∇w H w.act ∆w
T
≥ 0, (3.15d)
∂t
inact
∂H T
H inact + 0 + ∇w H inact ∆w ≥ 0, (3.15e)
∂t
µ∗,s.act (0) + ∆µs.act ≥ 0, (3.15f )
∆µw.act ≥ 0, (3.15g)
∆µinact ≥ 0, (3.15h)
∗ s.act ∂H s.act s.act T
(µ (0) + ∆µ)j 0 + ∇w H ∆w = 0, (3.15i)
∂t j
w.act
∂H
∆µw.act 0 + ∇w H w.act ∆w
T
j = 0, (3.15j)
∂t j
inact
∂H
∆µinact
T
j H inact + 0 + ∇w H inact ∆w = 0. (3.15k)
∂t j
By assuming that ∆w , ∆µ can be made arbitrarily small by choosing 0 small, we can assume
inact T
inact
that H + ∂H∂t 0 + ∇w H inact ∆w > 0 and therefore drop (3.15e), and replace (3.15k)
by ∆µj
inact
= 0. Additionally, we conclude that (µ∗ (0) + ∆µ)js.act > 0, so that (3.15i)
and (3.15c) can be replaced by
∂H s.act
0 + ∇w H s.act ∆w = 0.
T
∂t
∆w ∆λ ∆µ
δw∗ := , δλ∗ := , and δµ∗ := ,
0 0 0
50 Local Optimality and SQP Methods
∂
∇w2 Lδw∗ + ∇w L − ∇w Gδλ∗ − ∇w H δµ∗ = 0,
∂t
∂G
+ ∇w GT δw∗ = 0,
∂t
∂H s.act
+ ∇w H s.act δw∗
T
= 0,
∂t
∂H w.act
+ ∇w H w.act δw∗
T
≥ 0,
∂t
δµw.act
∗ ≥ 0,
∂H w.act
δµ∗ w.act w.act T
j + ∇w H δw∗ = 0,
∂t j
δµinact
∗ = 0,
which are exactly the KKT conditions for the QP (3.7) that is formulated in Theorem 3.4.
By the unique existence of this solution we conrm our assumption that ∆w and ∆µ can
be made arbitrarily small by chosing 0 suciently small.
1
w +∆w
0 t*=0.5
*
*
w =0.48
−1
−2
−3
−5 0 5
*
t +ε
Figure 3.3: First step ∆w of exact Hessian SQP method for Example 3.1, as a function of
∗ ∗
0, for the initialization t = 0.5, w = 0.48 = arcsin(0.5).
1 2 t − t̆ = 0
min w subject to
t ∈ R ,w ∈ R 2 −t + sinh(w) ≥ 0
1
min ∆w T (1 − tanh(w ∗ )w ∗ ∆w + w ∗ ∆w
∆t ∈ R , ∆w ∈ R 2
∆t − 0 = 0
subject to
−t + sinh(w ) − ∆t + cosh(w ∗ ) ∆w ≥ 0,
∗ ∗
∆t = 0,
w∗ t∗ −sinh(w ∗ )+
∆w = max(− 1−tanh(w ∗ )w ∗ , cosh(w ∗ )
),
w ∗ +(1−tanh(w ∗ )w ∗ )∆w
µ̃ = cosh(w ∗ )
Real-Time Iterations
In this chapter we will develop the main algorithmic ideas of our real-time iteration ap-
proach. We will rst present in Sec. 4.1 the challenges that every real-time optimal control
scheme has to face, and motivate the idea of the real-time iteration scheme. In Sec. 4.2 we
present the initial value embedding approach for perturbed problems, that arises quite nat-
urally in the framework of the direct multiple shooting method. The algorithm is described
in Sec. 4.3 for shrinking horizon problems, and in Sec. 4.4 for moving horizon problems,
that are typical for practical NMPC applications.
After the presentation of the real-time iteration idea in this chapter, we will in Chap. 5
prove that the proposed approach leads to a contractive algorithm under suitable condi-
tions, and in Chap. 6 we will have a close look at one real-time iteration.
• First, it is not the innite optimal control problem from Sec. 1.1.1 that is solved, but
a parameterized, nite dimensional formulation of it. In our approach it is the NLP
from Sec. 2.2 that arises after the direct multiple shooting parameterization, which
was denoted P (x0 (t)).
53
54 Real-Time Iterations
durations δi = ti+1 − ti that are long enough to perform the necessary computations
for the solution of problem P (x0 (ti )).
Note that in this framework the optimal control corresponding to the system state
x0 (ti ) at time ti is usually only available at time ti+1 , after the computations have been
performed. This leads to a delay that may result in poor real-time performance, if the
sampling intervals δi are not short enough.
x0 (ti+1 ) already at time ti and to solve the
In principle, it is possible to predict the state
corresponding problem P (x0 (ti+1 )) during the time interval [ti , ti+1 ], so that at time ti+1
the optimal solution for the problem P (x0 (ti+1 )) is already available. However, unpredicted
disturbances that have occured in the interval [ti , ti+1 ] are not taken into account, so that
the feedback delay of one sampling time is still present.
3
1
2
x
1
0 200 400 600 800 1000 1200 1400 1600 1800 2000
1.5
1
2
x
0.5
0 200 400 600 800 1000 1200 1400 1600 1800 2000
120
110
x3
100
0 200 400 600 800 1000 1200 1400 1600 1800 2000
120
110
x4
100
0 200 400 600 800 1000 1200 1400 1600 1800 2000
25
20
1
u
15
10
0 200 400 600 800 1000 1200 1400 1600 1800 2000
0
−1000
2
u
−2000
0 200 400 600 800 1000 1200 1400 1600 1800 2000
time [s]
Figure 4.1: State and control trajectories of a conventional NMPC scheme, compared with
optimal feedback control (which is dotted).
The reason for the poor performance of the conventional NMPC scheme is that we have to
wait a long time until a feedback to disturbances is delivered, and in the meantime we have
to apply a rather arbitrary, uncorrected control. Would it not be possible to use some other
feedback control that is not necessarily optimal, but better than the uncorrected values?
In Example 3.3 at the end of Chap. 3 we have seen that the rst QP solution of a full step
exact Hessian SQP algorithm provides already a rather good approximation of the exact
solution, if the algorithm is initialized in a neighborhood of this solution. Motivated by
this observation, we conclude that in a real-time scenario it would probably be better
to use the result of this rst correction instead of waiting until the SQP algorithm has
converged (without reacting to disturbances). After the rst SQP iteration, there would
already be the chance to react to new disturbances and if no further disturbance occurs,
the algorithm could continue to improve the outcome of the previous iterates. Compared
56 Real-Time Iterations
with the conventional approach, our real-time algorithm diers therefore in two important
respects:
• We restrict the number of solution iterations that are performed for each problem to
one single SQP iteration , allowing to reduce the sampling intervals δi to a minimum.
This approach is only possible if we ensure that the subsequent optimization problems
are carefully initialized in order to maintain the excellent convergence properties of
the direct multiple shooting method in the absence of disturbances.
• Secondly, we divide the necessary computations during each real-time iteration into
a (long) preparation phase that can be performed without knowledge of x0 , and a
considerably shorter feedback phase that allows to make the delay even shorter than
the sampling time δi . As this remaining delay is typically orders of magnitude smaller
than δi , we will in the following neglect it and assume that the result of each real-time
iteration is immediately available, and that the sampling time δi is only needed to
prepare the following real-time iteration.
Both algorithmic features are based on an initialization strategy that can be understood
as an initial value embedding , which will be described in the following section.
q10
q10
15 initialization 15
first iterate first iterate=initialization
4000 4000
2000 2000
q2
0
2
q0
0 0
−2000 −2000
−4000 −4000
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
ε ε
Figure 4.2: First order correction in q01 and q02 after initial value embedding as a function of
0, for two dierent initializations: on the left hand side the algorithm was initialized with
the steady state trajectory, on the right hand side with the outcome of the rst iterate for
0=1 from the left hand side. The exact solution manifold (cf. Fig. 1.3) is dotted.
x := xS + 0(x0 − xS ),
that interpolate between the steady state xS and the disturbed initial value x0 (cf. Exam-
ple 1.1). Let us initialize the SQP algorithm with the steady state trajectory, which is the
solution of P (xS ) (0 = 0). The number nw of NLP variables is 604, as discussed in Ex-
ample 2.1. We restrict our attention only to the rst control vector, q0 . A comparison of
the rst correction in q0 after the initial value embedding with the exact solution manifold
(cf. Example 1.1) is shown on the left hand side of Fig. 4.2 for dierent values of 0; this
illustrates that the initial value embedding strategy provides a rst order approximation of
the exact solution manifold, that takes active set changes into account (cf. lower left graph
of Fig. 4.2). On the right hand side of Fig. 4.2 we investigate what happens if we choose the
rst iterate itself as an initialization of the algorithm, so that we obtain a second iterate.
Note that the rst iterate itself is not the solution of any problem, so that the manifold of
second iterates does not touch the exact solution manifold at a reference point, as before.
But it can be seen that in the vicinity of 0 = 1 it provides already a quite good approximation
of the exact solution manifold.
58 Real-Time Iterations
N −1
Pk (xk ) : min Li (sxi , szi , qi ) + E(sxN , szN ) (4.1a)
qk , . . . , qN −1 , i=k
sk , . . . , sN
subject to
sxk − xk = 0, (4.1d)
Note that P0 (x0 )corresponds to the original problem P (x0 ) formulated in (2.10).
Clearly, if we have found a solutionyk∗ = (wk∗ , λ∗k , µ∗k ) of problem Pk (xk ), and if the state
xk+1 corresponds to the predicted optimal value on this trajectory, i.e., xk+1 = (sxk+1 )∗k , the
∗
restriction of the solution to the remaining horizon provides the solution yk+1 for the shrunk
problem Pk+1 (xk+1 ), which is a good initialization also for disturbed initial values xk+1 + 0,
4.3 Real-Time Iterations on Shrinking Horizons 59
when the initial value embedding is employed. Let us introduce the shrink operator Sk ,
that just removes the rst components qk , sk and the corresponding multipliers from a
vector yk = (wk , λk , µk ), i.e., the operator that projects the variables and multipliers of
Pk (·) to the variable and multiplier space of Pk+1(·). Using Sk , the above statement can
be expressed as
∗
yk+1 = Sk yk∗.
1. At the moment tk that xk is known, perform the prepared real-time iteration (based
k
on a linearization at yk and the initial value embedding idea) towards the solution of
Pk (xk ). This yields the rst order correction ykk+1.
k+1
2. Give the resulting value of the rst control vector (qk )k (which is contained in the
k+1
vector yk ) immediately as a control to the plant.
3. Shrink the rst order correction ykk+1 to the variable space of the new problem Pk+1(·),
i.e., dene the new iterate
k+1
yk+1 := Sk ykk+1.
4. Prepare the rst iterate of problem Pk+1 (·) as far as possible without knowledge of
k+1
xk+1 , using the shrunk vector yk+1 as an initialization.
Note that in our algorithm the rst two steps do only need a very short computation time
compared to the fourth step (cf. Chap. 6).
3
1
2
x
1
0 200 400 600 800 1000 1200 1400 1600 1800 2000
1.5
1
2
x
0.5
0 200 400 600 800 1000 1200 1400 1600 1800 2000
120
110
x3
100
0 200 400 600 800 1000 1200 1400 1600 1800 2000
120
110
x4
100
0 200 400 600 800 1000 1200 1400 1600 1800 2000
25
20
1
u
15
10
0 200 400 600 800 1000 1200 1400 1600 1800 2000
0
−1000
2
u
−2000
0 200 400 600 800 1000 1200 1400 1600 1800 2000
time [s]
Figure 4.3: State and control trajectories of the real-time iteration approach. The dotted
lines, that are nearly identical, show the trajectory due to optimal feedback control.
In linearized neighboring feedback control, usually the assumption is made that the
active set does not change during the on-line QP solutions, so that the QP can largely be
4.3 Real-Time Iterations on Shrinking Horizons 61
presolved, leaving only one matrix vector multiplication that has to be performed on-line:
the control uk on the interval [tk , tk+1 ] is given by uk = ūk − Kk (xk − x̄k ), where ūk is the
nominal control, and the matrix Kk is the precomputed gain matrix . Virtually no on-line
computations have to be performed in this case, and very short sampling times can be
realized.
For larger deviations in xk − x̄k , however, this may lead to control responses that exceed
the control bounds therefore we present here a modied linearized feedback control scheme
that solves the prepared QPs on-line, so that all linearized constraints can be taken into
account, when active set changes occur. Note that bounds are linear constraints and
therefore exactly satised in each QP solution. The dierence to the real-time iteration
scheme is that all control responses are based on the same system linearization, at the
0
reference solution y0 . This algorithm would proceed as follows:
0 0 0 0 0
Based on the reference solution y0 = (w0 , λ0 , µ0 ) and on its subvectors yk =
0
Sk Sk−1 . . . S1 y0 (that are the solutions of the nominal problems Pk (x̄k )), prepare the rst
QP solution of the problems Pk (·) as far as possible without knowledge of xk . Then perform
for for k = 0, . . . , N − 1 the following cycle:
1. At the moment tk that xk is known, perform the prepared QP solution towards the
solution of Pk (xk ). This yields the rst order correction yk1 .
2. Give the resulting value of the rst control vector (qk )1k (which is contained in the
1
vector yk ) immediately as a control to the plant.
Note that this linearized neighboring feedback control scheme is very closely related to
linear model predictive control on shrinking horizons, as it is based on a linear system
model, and only a QP has to be solved in each iteration. It is superior to what is commonly
called linear model predictive control, however, in the respect that nonlinearities of the
system equations along the nominal trajectory are taken into account, and that the Hessian
matrix does not only represent a quadratic objective, but the full second order information
1
of the Lagrangian function along the nominal trajectory. Note that the values yk are rst
∗
order approximations of the optimal solutions yk of the full nonlinear problems Pk (xk ), i.e.,
yk1 − yk∗ = O(xk − x̄k 2 ), due to the initial value embedding.
The low computational on-line cost of linearized neighboring feedback control, however,
comes along with the inability to adapt to large deviations from the nominal solution (i.e.,
for big xk − x̄k ), as the system nonlinearity is not taken into account in the on-line
context.
3
1
2
x
1
0 200 400 600 800 1000 1200 1400 1600 1800 2000
1.5
1
2
x
0.5
0 200 400 600 800 1000 1200 1400 1600 1800 2000
120
110
x3
100
0 200 400 600 800 1000 1200 1400 1600 1800 2000
120
110
x4
100
0 200 400 600 800 1000 1200 1400 1600 1800 2000
25
20
1
u
15
10
0 200 400 600 800 1000 1200 1400 1600 1800 2000
0
−1000
2
u
−2000
0 200 400 600 800 1000 1200 1400 1600 1800 2000
time [s]
Figure 4.4: Linearized neighboring feedback control: state and control trajectories, com-
pared with the real-time iteration trajectories (dotted). Both schemes coincide on the rst
interval, but the linearized neighboring scheme does not take nonlinearities into account.
Table 4.1. Note that the two schemes coincide on the rst interval, where they both use
the same initialization (cf. Fig. 4.2). In the linearized neighboring feedback control, this
initialization is kept for the whole trajectory, whereas it is continuously updated during the
real-time iteration cycles.
Table 4.1: Performance of dierent real-time strategies, measured in terms of the objective
function, from Examples 4.1, 4.3, and 4.4.
one component, and the formulation (4.1) of the optimization problem Pk (xk ) needs to be
modied only at the initial value constraint (4.1d), which is changed to
(Inx |0)sxk − xk = 0.
As before, the principle of optimality holds, so that a solution of problem Pk (xk ) provides
a solution of the shrunk problem Pk+1 (xk+1 ), if xk+1 corresponds to the predicted value
(Inx |0)sxk+1. If disturbances occur, the initial value embedding and real-time iteration
scheme can be applied without modications; however, it should be kept in mind that the
interval durations may now change during the real-time iterations.
Apart from the shrinking problem formulation as described above, there exists an in-
teresting second possibility to formulate the series of optimization problem on a shrinking
horizon with free nal time: instead of the problems P0 (x0 ), P1 (x1 ), . . . , PN −1 (xN −1 ) with
shrinking multiple shooting interval numbers, we can consider always the same multiple
shooting discretization and regard only one type of parameterized problem, P (·) = P0 (·),
i.e., we treat successively P (x0 ), P (x1 ), . . . , P (xN −1 ). In this case it is not straightforward
how to initialize the subsequent real-time iterations. One way would be to take the vari-
able and multipliers from the previous iterate without any modication, i.e., to perform
successive warm starts and to rely on the approximation capacities of the initial value em-
bedding (cf. Sec. 4.4.2). Though such a scheme can be successful in practical applications,
especially for short sampling times, it is dicult to prove convergence, as it will be done
for the shrinking problem formulation in Chap. 5.
We will present two basic strategies how to proceed from one optimization problem
to the next. Both show their advantages in dierent circumstances: the rst, the shift
strategy, is especially advantageous for periodic or time dependent processes, as it considers
the movement of the horizon in time explicitly. The second strategy, the warm start, is
especially useful in applications where the multiple shooting intervals are chosen to be
considerably longer than the sampling times.
wkk+1 = (q0 , q1 , . . . , qN −2 , qN −1 ; s0 , s1 , . . . , sN −2 , sN −1 , sN )
then the shift initialization sets
• One straightforward way is to keep the old values at their place, i.e., to initialize
new
qN −1 := qN −1 , snew
N −1 := sN −1 , and snew
N := sN ,
which has the advantage that the only infeasibility that is introduced into a feasible
trajectory is the violation of the continuity condition at the start of the last interval,
i.e., at τN −1 .
• A second possibility would be to solve the DAE on the new last interval, starting
new
with sN , and employing the control qN −1 , which yields the nal value sN (sN , qN −1 )
for dierential and algebraic states, i.e., we initialize:
new
qN −1 := qN −1 , snew
N −1 := sN , and snew new new new
N := sN (sN −1 , qN −1 ).
In this case, both the continuity condition and the algebraic consistency condition at
τN −1 are fulllled, if the previous solution was feasible: for the continuity condition
this is trivially true, and for the consistency condition note that previously, at τN ,
0 = g(sN , qN ) = g(sN , qN −1 ), as qN −1 provides per denition the control qN at the
nal multiple shooting node. However, path and terminal constraints may be violated
new
by the new nal value sN .
4.4 Real-Time Iterations on Moving Horizons 65
• Yet another possibility is to solve the DAE on the last interval starting at sN , but to
employ a dierent control than qN −1 . Though this may sacrice algebraic consistency
at τN −1 , this strategy may be advantageous, e.g. for periodic processes, where a time
dependent nominal control may be taken. This strategy was employed for the periodic
control example of Chap. 8.
Note that the initial violation of constraints is naturally treated in the direct multiple
shooting framework and does not create any additional diculty in the following SQP
iterations. During the real-time iterations the outcome of the previous iterate will usually
not be feasible anyway, and additional infeasibility is introduced by initial values xk that
are not in accordance with the predictions.
O(xk+1 − xk 2 ), if an exact Hessian SQP method is used. To shed more light on this
desirable property, we regard the (unsolved) problem P (xk+1) as a member in a family
of perturbed problems P (xk + 0(xk+1 − xk )), where a solution for 0 = 0 exists, and the
solution for 0=1 is desired (cf. Example 4.2). The warm start strategy therefore has a
very natural connection to the initial value embedding strategy.
same problem, so that the standard convergence properties of SQP methods can be ex-
pected. This observation motivates a new look on the real-time iteration idea: rather
than interpreting the real-time iterations as many prematurely stopped solution attempts
of subsequent optimization problems, we regard them as a continuous series of SQP it-
erates with the particularity that one parameter, the initial value x0 , is slightly modied
during the iterations. This interpretation captures very well the philosophy of the real-
time iterations; in every practical implementation of a real-time iteration algorithm it has
meticulously to be taken care that the initialization from one problem to the next does
preserve all informations that are necessary to guarantee the convergence properties of an
o-line method. This is most easily realized for the warm start strategy.
with a frequency that can be considerably higher than that of the major nonlinear iterates.
Only at the end of each major SQP iteration, say at the time points tk , all updated data
are transferred from the SQP process to the feedback process, and simultaneously the the
current system state x0 (tk ) is given to the SQP process, to modify the next major real-time
iteration. The scheme can be visualized as follows:
Note that between the updates (that occur only at the major sampling times tk ) the
feedback is based on a linear system model that is obtained by a linearization along the
best available predicted trajectory, similar to the linearized neighboring feedback control
scheme that was presented in Sec. 1.3.1.
1
overall CPU time per iteration
CPU time [s]
0.5
0
0 200 400 600 800 1000 1200 1400 1600 1800 2000
time [s]
Figure 4.5: Preparation and feedback times for the real-time iterations for the moving
horizon CSTR scenario of Example 4.5, on an AMD Athlon processor with 1009 MHz.
The horizon length was chosen to be N = 100 multiple shooting intervals.
large scale applications the lion's share of the computational cost is incurred by the DAE
solution, which does not contribute to the response time, so that the immediate feedback
is indeed orders of magnitude smaller than the overall computation time (cf. Figs. 7.7
and 7.16 in Chap. 7). Details on the separation into preparation and feedback phase are
given in Chap. 6.
Chapter 5
In the last chapter we have presented a new scheme for the approximate solution of op-
timization problems in real-time, which shows very promising performance in numerical
examples. From the previous discussion, however, it is far from clear how this scheme
behaves theoretically.
To motivate why this is important, let us imagine that we apply the real-time iteration
scheme in a NMPC framework to stabilize a system, and that the real system coincides
with the employed system model. If the subsequent optimization problems could be solved
exactly in real-time, proofs exist that ensure nominal stability of the closed-loop system
for dierent NMPC schemes (cf. Sec. 1.4). Now the question arises if it is also possible
to establish nominal stability results if the optimization problems are not solved exactly,
but with our real-time iteration scheme. Otherwise, it may be possible that the real-time
controller does not stabilize the system, but drives it in the worst case even away from
the desired operating point: linearization errors may increase from iteration to iteration,
and the approximations to the exact solutions may become worse and worse. We will
show that this need not be feared, and we will prove that the real-time iterations deliver
approximations of the exact solutions that become better and better, under reasonable
conditions.
Unfortunately, standard convergence results for o-line SQP methods cannot be ap-
plied, because each real-time iteration belongs to a dierent optimization problem. Never-
theless, we will start the chapter in Sec. 5.1 by reviewing the local convergence properties
for a class of o-line optimization algorithms that are commonly referred to as Newton
type methods, which comprise the exact Hessian SQP method and the Constrained Gauss-
Newton method. We will then in Sec. 5.2 present the real-time iteration scheme in a new
setting, which allows to compare the real-time iterates on shrinking horizons with those
of the o-line method. This makes it possible to prove contractivity of the real-time iter-
ations. We usually avoid the term convergence in the real-time framework on shrinking
horizons, because the iterates stop after N cycles, when the time horizon of interest is over.
69
70 Contractivity of the Real-Time Iterations
The principal result is that the real-time iteration scheme on shrinking horizons is
contracting under the same sucient conditions as the corresponding o-line scheme. This
result can conceptually be generalized to the shift strategy on innite moving horizons and
allows to conclude that the real-time iteration scheme leads to a convergent closed-loop
behaviour in this case. Finally, in Sec. 5.3 we investigate how far the result of the real-time
iterations deviates from the theoretical optimal solutions.
Throughout the chapter we will assume that the iterates are started suciently close
to a KKT point that satises the sucient conditions of Theorem 3.3 and the strict com-
plementarity condition, so that we can assume that the active set is known and we can
restrict our attention to equality constrained problems. Furthermore, we will assume that
the variables w can be split into free variables q ∈ R q and dependent ones s ∈ R s , so
n n
that the o-line optimization problem on the full horizon of interest can be formulated as
follows:
we can formulate necessary optimality conditions of rst order, according to Theorem 3.1:
∇q F (q, s) − ∇q G(q, s)λ
∇(q,s,−λ) L(q, s, λ) = ∇s F (q, s) − ∇s G(q, s)λ = 0. (5.2)
G(q, s)
Let us dene for later convenience the vector y ∈ Rn with n := nq + ns + ns and the
function R : D ⊂ D̂ × R s → R
n n
as
q ∇q F (q, s) − ∇q G(q, s)λ
y := s and R(y) := ∇s F (q, s) − ∇s G(q, s)λ , (5.3)
−λ G(q, s)
5.1 The O-Line Problem 71
y k+1 = y k + ∆y k , (5.4)
∂R k
R(y k ) + (y )∆y k = 0, (5.5)
∂y
∂2L ∂2L T ∂G T
∇q L ∂q 2 ∆q k
∇s L +
∂q∂s ∂q
∂2L ∂2L ∂G T ∆sk = 0. (5.6)
∂q∂s ∂s2 ∂s
G(q, s) ∂G ∂G
0 −∆λk
∂q ∂s
We have seen in Sec. 3.3.1 that these Newton-Raphson iterates are identical to the full step
exact Hessian SQP method.
The Newton type methods considered in this chapter dier from the exact Newton-
∂2L
Raphson method in the way that the exact Hessian is replaced by a (symmetric)
∂(q,s)2
approximation
Aqq ATqs
A(y) = ,
Aqs Ass
∂G T
Aqq ATqs
∂q
∂G T
J(y) := Aqs Ass . (5.7)
∂s
∂G ∂G
∂q ∂s
0
For our Newton type method, Eq. (5.5) is replaced by the approximation
with l : D̂ → R nl , nl ≥ 1, a vector valued function. For this case, the Hessian approxima-
tion A is dened to be
T
∂l ∂l
A(q, s) := . (5.10)
∂(q, s) ∂(q, s)
∂2L ∂2L
The error
∂(q,s)2
−A can be quantied by calculation of
∂(q,s)2
T
nl n
∂2L ∂l ∂l ∂ 2 li s
∂ 2 Gi
− = li + λ i .
∂(q, s)2 ∂(q, s) ∂(q, s) i=1
∂(q, s)2 i=1 ∂(q, s)2
T
∗ ∂l
∇s F − ∇s Gλ = l(q ∗ , s∗ ) − ∇s Gλ∗ = 0,
∂s
so that
∂l T ∗ ∗
λ∗ = −∇s G−1 l(q , s ) = O (l(q ∗ , s∗ )) ,
∂s
which allows to conclude that
2
∂ L
− A(q ∗
, s ∗
)) = O (l(q ∗ , s∗ )) .
∂(q, s)2
Thus we expect the Gauss-Newton method to work well for small residual vectors l(q, s).
Note that A(q, s) is independent of the multiplier vector λ.
Remark: The least squares function l(q, s) needs not to be a mapping into a nite
dimensional space R l , but may more generally be a mapping into any Hilbert space H . If
n
·, ·H is the inner product in H, the least squares objective function of Eq. (5.9) is then
written as
1
F (q, s) = l(q, s), l(q, s)H ,
2
and the Gauss-Newton approximation of the Hessian in Eq. (5.10) is given by the symmetric
matrix
∂l ∂l
A(q, s)ij := Re , ,
∂(q, s)i ∂(q, s)j H
where the indices i, j run through all components of (q, s). Note that this matrix is nite
dimensional, which allows to treat this general case with the presented numerical methods.
In Sec. 6.4 it is shown how to compute A(q, s) eciently in the presence of integral least
squares terms as introduced in Sec. 1.1.
5.1 The O-Line Problem 73
R(y) = 0. (5.12)
Additionally, we suppose that the rst step ∆y 0 := −J(y 0 )−1 R(y 0 ) starting at an initial
guess y0 is suciently small, so that
ω
δ0 := κ + ∆y 0 < 1 (5.13c)
2
and that
0 ∆y 0
D0 := y ∈ R | y − y ≤
n
⊂ D. (5.13d)
1 − δ0
Under these conditions the sequence of Newton type iterates (y k ) dened by Eq. (5.11)
∗
remains inside D0 and converges towards a y ∈ D0 satisfying the sytem (5.12), R(y ∗) = 0.
Proof: Slightly modifying a proof that can be found in Bock [Boc87], we rst show that
k k
the norm of the steps ∆y contracts, and show then that (y ) is a Cauchy sequence. The
contraction can be shown as follows:
1 δ0k
y k+m − y k ≤ ∆y k ≤ ∆y 0 , ∀ k, m ≥ 0. (5.15)
1 − δ0 1 − δ0
In particular,
1
y m − y 0 ≤ ∆y 0 , ∀m ≥ 0.
1 − δ0
Therefore, (y k )
is a Cauchy sequence that remains inside the compact set D0 and hence
∗ −1
converges towards a limit point y . By continuity of R and J ,
so that R(y ∗ ) = 0.
We will state a second, stricter form of the above theorem, which is applicable to opti-
mization problems only, and implies local convergence of the Newton type iterates towards
a strict local minimum. Before this second version of the theorem can be formulated, we
have to give an explicit formula for the inverse of the approximate derivative J(y).
Lemma 5.2 (Inverse of the KKT Matrix)
Let us assume that J(y) is a matrix as dened in Eq. (5.7), i.e.,
∂G T
Aqq ATqs
∂q
∂G T
J(y) = Aqs Ass
∂s
∂G ∂G
∂q ∂s
0
∂G
with ∂s invertible, and let us also assume that the so called reduced Hessian matrix
∂G
−T Aqq ATqs I
Ar (y) := I − ∂G
T
∂G
−1 (5.16)
∂q ∂s Aqs Ass − ∂s ∂G
∂q
is positive denite. Then the inverse of J(y) exists and is given by the formula
with
I
∂G
−1
− ∂G
C1 (y) := ∂s (5.18)
∂G
−T
−1
∂q
− ∂s
Aqs − Ass ∂G
∂s
∂G
∂q
5.1 The O-Line Problem 75
and
0 0 0
∂G
−1
C2 (y) := 0
∂G
−1
0 . (5.19)
∂G
−T ∂G
−T∂s
0 ∂s − ∂s Ass ∂s
Remark: Note that the assumptions of this lemma coincide with those of Lemma 3.2,
with the constraint matrix B set to B = ( | ). They are also closely related to the
∂G ∂G
∂q ∂s
sucient optimality conditions of Theorem 3.3. The positive deniteness of Ar will be
used in the proof of Theorem 5.3 to show that the Newton type iterates converge towards
a local minimum.
Proof: The invertibility follows from Lemma 3.2. The inversion formula (5.17) can be
veried by checking that
We also assume boundedness of C1 and C2 as dened in Eqs. (5.18) and (5.19) on D:
and
Let us dene β := βC1 βA βC1 + βC2 . Let us suppose that a Lipschitz condition
−1
−2
−4
Newton
−5
−6
0 1 2 3 4 5 6 7
index k
Figure 5.1: Convergence rates for o-line Newton type methods, for the solution of Exam-
ple 5.1. Comparison of Newton and Gauss-Newton method, when started at the steady
state trajectory.
Additionally, we assume as in Theorem 5.1 that the rst step ∆y 0 := −J(y 0 )−1 R(y 0 )
0
starting at an initial guess y is suciently small, so that
ω
δ0 := κ + ∆y 0 < 1 (5.20f )
2
and that
∆y 0
0
D0 := y ∈ R | y − y ≤
n
⊂ D. (5.20g)
1 − δ0
Under these circumstances the Newton type iterates (y k ) according to Eq. (5.8) converge
∗ ∗ ∗ ∗
towards a KKT point y = (q , s , λ ) ∈ D whose primal part (q ∗ , s∗ ) is a strict local
minimum of Problem (5.1).
T
time horizon with duration
N
, and assume that the computation time for the k -th real-time
iteration is δk , k=1 δk = T (this is e.g. the case if all iterations take the same
and that
time δ and the time horizon of interest has the length T = Nδ ). The multiple shooting
points are chosen so that the times tk := T τk satisfy tk − tk−1 = δk , i.e.,
k
t0 = 0, tk = δi , for k = 1, . . . , N.
i=1
Let x0 , x1 , . . . , xN denote the dierential system states of the real system at times
t0 , t1 , . . . , tN , that serve as initial values for the parameterized optimization problems
Pk (xk ) of shrinking length, as dened in Sec. 4.3, Eq. (4.1).
At time t0 the state x0 is known, and the initial value embedding strategy quickly yields
the control value u0 that will be implemented on the rst time interval, up to time t1 . At
time t1 the next immediate feedback has been prepared, and is applied to the shrunk
problem P1 (x1 ). If the model and the real system coincide, the new system state x1 is
identical to the nal value x(t1 ) of the initial value problem
sx1 = x1 .
78 Contractivity of the Real-Time Iterations
Let us now regard the original problem P0 (x0 ) on the full horizon, but with an additional
constraint that xes the control q0 on the rst interval to be equal to the implemented
0 0 1
value u0 = q0 + ∆q0 = q0 . This problem then contains the constraints
which constrain sx0 , sz0 , q0 and sx1 uniquely. In the solution, sx1 = x1 , because the relaxed
initial value problem
from the correct value x(t1 ), due to the DAE relaxation. We will disregard this slight
dierence that is only present in the relaxed DAE case (and that could even be interpreted
as a slight superiority of the real implementation over the xed control formulation, which
we only introduce here for theoretical purposes).
Let us therefore assume in the remaining part of this chapter that the real-time itera-
q0 , . . . , qN −1
tions on shrinking horizons are identical to a subsequent xing of the controls
in the original o-line optimization problem (5.1), which we denoted by P (x0 ) or P0 (x0 ).
0
For notational convenience, we will in the following dene P := P0 (x0 ) = P (x0 ) to be
k
the original (o-line) problem, and denote by P the problems with more and more xed
controls that are generated during the real-time iterations and which are equivalent to the
shrinking horizon problems Pk (xk ). A visualization of the outcome of the rst two real-time
iterations is given in Figures 5.2 and 5.3.
k
The series of problems P , k = 0, . . . , N are given by
k G(q, s) = 0,
P : min F (q, s) subject to
q,s qi − ui = 0, i = 0, . . . , k − 1.
5.2 The On-Line Problem 79
q11
q21
s1
q10 N
x1
1
s13 qN−1
s10 s11 s12
t0 t1 t2 t3 tN
Figure 5.2: NLP variable content after the rst real-time iteration. The next optimization
1
problem, P , is formulated by xing the rst control value q0 , which implicitly xes the
value x1 .
q20
s21
s22 s23
x2
s20 q21
t0 t1 t2
Figure 5.3: NLP variable content after the second real-time iteration. The problem P2 can
be formulated by xing q0 and q1 , which implicitly xes x2 .
80 Contractivity of the Real-Time Iterations
(Recall that q = (q0 , q1 , . . . , qN −1 ).) In a shorter formulation, we will also write these
problems as
k G(q, s) = 0,
P : min F (q, s) s.t. T
q,s Qk1 (q − uk ) = 0.
Here, the matrices Qk1 ∈ R nq ×mk , mk = knu , are of the form
k Imk
Q1 := , (5.21)
0
and the vectors u k ∈ R nq are dened as
u0
.. q0 − u0
T .
uk := . , with Qk1 (q − uk ) = .. ,
uk−1
qk−1 − uk−1
∗
so that the last components of uk , that are introduced only for later notational convenience,
N
can carry arbitrary values. Note that in the last problem P no degrees of freedom remain,
as all components of q are xed.
Multiplying the rst component of this vector by the orthogonal matrix (Q1 |Q2 )T ∈ R nq ×nq
yields
−λQ + QT1 ∇q L
QT2 ∇q L
∇s L =0
G(q, s)
QT1 (q − u)
and it can be seen that the upper part can always be made zero by choosing
λQ := QT1 ∇q L.
Therefore, the trivial rst condition can be omitted in the formulation of the necessary
conditions for optimality of the modied problem and we do not have to regard the addi-
tional multipliers λQ . This allows us to treat the modied problem in the same primal-dual
space of y ∈ R
n
as the original problem, with n = nq + ns + ns . Dening the essential part
of the residual of the necessary optimality conditions to be
T
QT1 (q − u) Q1 (q − u) 0
QT2 ∇q L 0 QT2
R̃(y) :=
=
+
R(y)
∇s L 0 I
G(q, s) 0 I
and provide an approximation of this derivative which uses the approximation J(y) of the
original problem
QT1 0
0 QT2
˜
J(y) := +
0
J(y)
I
0T I
Q1 0 0 (5.25)
QT A T T T ∂G T
2 qq Q2 Aqs Q2 ∂q
= ∂G T
.
Aqs Ass ∂s
∂G ∂G
∂q ∂s
0
for the original (o-line) problem (5.1). Then the derivative approximation J˜ : D → R n
of the modied problem (5.22) satises the two conditions
˜ −1 ˜ ∂ R̃
1
J(y ) J(y 2 ) − (y 2 ) ≤ κ < 1, ∀ y1 , y2 ∈ D, and (5.26a)
∂y
˜ ˜ 3)
J(y1 )−1 J(y
˜ 2 ) − J(y ≤ ωy2 − y3 , ∀ y1 , y2 , y3 ∈ D, (5.26b)
Remark: These two bounds correspond to the properties (5.13a) and (5.13b) in Theo-
rem 5.1.3, thus allowing to conclude that the contraction inequality
ω
∆y k+1 ≤ κ + ∆y k ∆y k
2
also holds for the modied problem. This implies that the optimization problem does not
become less tractable from the algorithmic viewpoint when we add additional constraints.
However, we do not address the question a suitable problem initialization, yet.
To prove the theorem, let us rst give an explicit formula of the inverse ˜ −1.
J(y)
Lemma 5.5 (KKT Inverse for the Modied Problem)
The inverse of the matrix ˜
J(y) as dened in Eq. (5.25) is given by the formula
I I
−QT2 Aqq Q1 I
˜ −1
J(y) =Q
−Aqs Q1
,
(5.27)
C̃1 Ã−1
r C̃ T
1 + C̃ 2 I
− ∂q Q1
∂G
I
with
Q1 Q2
Q := I ,
I
QT2
C̃1 (y) := I C1 (y)Q2, (5.28b)
I
and
QT2 Q2
C̃2 (y) := I C2 (y) I , (5.28c)
I I
where Ar (y), C1 (y), and C2 (y) are dened as in Lemma 5.2 for the original problem.
5.2 The On-Line Problem 83
I
QT A Q QT A Q QT AT QT ∂G T
˜ Q=
J(y)
2 qq 1 2 qq 2 2 qs 2 ∂q
.
Aqs Q1 ∂G T
Aqs Q2 Ass ∂s
∂G ∂G ∂G
Q
∂q 1
Q
∂q 2 ∂s
0
The inverse of the lower-right part of this matrix can be obtained by an application of
Lemma 5.2 (using Q2 Q2 = I). Its inverse is given as
T
T
−1
QT2 Aqq Q2 QT2 ATqs QT2 ∂G
∂q
Aqs Q2 Ass ∂G T = C̃1 (y)Ã−1 T
r (y)C̃1 (y) + C̃2 .
∂s
∂G ∂G
Q
∂q 2 ∂s
0
Therefore,
I I
QT2 Aqq Q1 I
˜ Q
J(y) = ,
−1 T
C̃1 Ãr C̃1 + C̃2 Aqs Q1 I
∂G
Q
∂q 1
I
which is the inverse of the rightmost block Frobenius matrix in formula (5.27).
Proof of Theorem 5.4: Note that C̃1 (y) and C̃2 (y) as dened in Eqs. (5.28b) and (5.28c)
are projections of C1 (y) and C2 (y), so that their (spectral) matrix norm satises
and
By the interlacing property (see e.g. [Wil65], pp. 103104), the eigenvalues
λ̃1 (y), . . . , λ̃(nq −m) (y) of the submatrix Ãr (y) must lie in the spectrum of Ar (y), i.e.,
λ̃k (y) ∈ [λ1 (y), λnq (y)]. In particular, λ1 (y) ≤ λ̃1 (y) for the smallest eigenvalues. The
84 Contractivity of the Real-Time Iterations
inverse of the smallest eigenvalue corresponds to the spectral norm of the inverse of a
positive denite matrix, so that we deduce that
1 1
Ãr (y)−1 = ≤ = A−1
r (y) ≤ βA , ∀y ∈ D.
λ̃1 (y) λ 1 (y)
This allows to nd a bound on the central part of the inverse J˜(y)−1 in formula (5.27):
T
C̃1 (y)Ãr (y)−1C̃1 (y) + C̃2 (y) ≤ βC1 βA βC1 + βC2 = β, ∀y ∈ D.
and
˜−1 ˜ 3)
˜ 2 ) − J(y
J (y1 ) J(y
= β J(y2 ) − J(y3 ) ≤ ωy2 − y3 , ∀y1 , y2 , y3 ∈ D.
uk := q k , k = 0, . . .
Note that the rst problem P0 has no additional constraint, because
and corre- m0 = 0,
0
sponds to the original o-line problem (5.1) that was treated in Sec. 5.1. In contrast to P ,
1 2
the problems P , P , . . . are only generated during the iterations and therefore depend on
0
the initialization y and on the chosen Newton type method.
k k
Each problem P is equivalent to nding the zero of a function R as follows:
T
Qk1 (q − uk )
Qk T ∇ L
Rk (y) :=
2 q = 0.
∇s L
G(q, s)
1 Note, however, that for ODE models a feasible solution is already obtained after the N -th iterate.
86 Contractivity of the Real-Time Iterations
Note that the necessary optimality conditions R0 (y) = 0 correspond to the o-line condition
k
R(y) = 0 that was dened in Eq. (5.3) in Sec. 5.1.1. The derivative approximation J (y)
is dened according to Eq. (5.25) to be
T
Qk1 0
0 Qk T
J k (y) =
0
+ 2
J(y),
I
0 I
∆y k := −J k (y k )−1 Rk (y k ). (5.30)
∗ 0 ∆y 0 ω
y ∈ D0 = y ∈ R | y − y ≤
n
⊂ D, δ0 = κ + ∆y 0.
1 − δ0 2
Remark: Though this theorem uses the term convergence and regards the innite
sequence y k
, it is not the behaviour for k→∞ that causes the diculty, as from k = N
N
on we treat always the same optimization problem P ; the diculty lies in showing that
1 2 N
the rst iterates y , y , . . . , y remain in the set D0 .
Proof: We will follow the lines of the proof of Theorem 5.1. Note that the rst step ∆y 0
of the real-time iterations coincides with the rst step of the o-line iterations. Therefore,
∗ ∗ ∗ ∗
to prove convergence towards a limit point y = (q , s , λ ), we only have to show that the
contraction propery
ω
∆y k+1 ≤ κ + ∆y k ∆y k (5.31)
2
is satised for the real-time iterates. In a second step, we will show that the primal part
(q ∗ , s∗ ) of the limit point is feasible.
In Theorem 5.4 in Sec. 5.2.2 we have already shown that xing of components does not
increase the constants κ<1 and ω that are used to prove the contraction property for a
single optimization problem. This means that all derivative approximations J k satisfy the
bounds (5.13a) and (5.13b).
But how to compare the steps ∆y k and ∆y k+1 that correspond to dierent residual
k k+1
functions R and R ?
5.2 The On-Line Problem 87
k
The trick to prove the contraction property (5.31) is to treat two subsequent steps ∆y
k+1 k+1
and ∆y as if they were belonging to the same optimization problem P with residual
k+1
function R . If this is true, Eq. (5.14) can directly be used to prove the contraction
property. This trick is paradoxical because it assumes that the constraint
T T
Qk+1
1 (q − uk+1) = Qk+1
1 (q − q k+1 ) = 0
is already dened before the iterate y k+1 = (q k+1 , sk+1, λk+1 ) is computed, i.e., before q k+1
is known!
Fortunately, it can be shown that the step ∆y k is not changed, if it would have been
dened by
instead of
∆y k := −J k (y k )−1 Rk (y k )
k
as in Eq. (5.30). To see this, note that ∆y is the unique solution of Rk (y k )+J k (y k )∆y k = 0.
k+1 k
We will show that it also satises R (y ) + J k+1 (y k )∆y k = 0.
Rk+1 (y k ) + J k+1 (y k ) ∆y k
k+1 T
Qk+1
T k
(q −q k+1
) Q1 k+1 k
1 k+1 T k+1 T k+1 T T k+1 T∂G T q −q
Q2 ∇ L Q2 Aqq Q2 Aqs Q2 ∂q k+1 k
= q + s −s
∇s L Aqs Ass ∂G T
∂s λk −λk+1
G(q, s) ∂G ∂G
0
∂q
∂s
0 ∂G T
Qk+1 T ∇ q L A qq A T
qs
∇s L +
∂q
= 2 ∂G T ∆y k
I A qs A ss ∂s
G(q, s) ∂G ∂G
0
I ∂q ∂s
0 ∂G T
ΠT Qk T ∇ q L A qq A T
qs
∇s L +
∂q
= k 2 ∂G T ∆y k
I A qs A ss ∂s
G(q, s) ∂G ∂G
0
I
∂q ∂s
0 T kT kT T k T∂G T
ΠT Q2 ∇q L
k Q A
2 qq Q A
2 qs Q 2 ∂q
= k ∇s L + ∂G T
∆y k
I Aqs Ass ∂s
G(q, s) ∂G ∂G
I 0
∂q ∂s
0
ΠTk 0
= 0 = 0.
I
0
I
88 Contractivity of the Real-Time Iterations
sx1
2
1
0 10 20 30 40 50 60 70 80 90 100
1.5
2
1
x
s
0.5
0 10 20 30 40 50 60 70 80 90 100
120
110
3
x
s
100
0 10 20 30 40 50 60 70 80 90 100
120
110
4
x
s
100
0 10 20 30 40 50 60 70 80 90 100
25
20
1
q
15
10
0 10 20 30 40 50 60 70 80 90 100
0
−1000
q2
−2000
0 10 20 30 40 50 60 70 80 90 100
node index k
Figure 5.4: Limit point w∗ of the real-time iteration approach (with Gauss-Newton it-
erations) in Example 5.2, which is very similar to the exact o-line solution (dotted, cf.
Fig. 2.3).
∗
Therefore, the iterations converge towards a limit point y ∈ D0 . To show that this
k0
point is feasible, note that at some problem P no more components can be xed (to
k0 = N in the real-time
be specic, iterations for the multiple shooting method), so that
R = R , ∀ k ≥ k0 . Therefore
k k0
−1
−2
−4
Newton
−5
−6
0 1 2 3 4 5 6 7
index k
Figure 5.5: Convergence rates for Newton type methods, for the real-time iterations of
Example 5.2. Comparison of Newton and Gauss-Newton method. The dotted lines indicate
the convergence rates for the o-line solution (cf. Example 5.1).
2δ0 ∆y 0 ω
y ∗ − y0∗ ≤ , δ0 = κ + ∆y 0 . (5.32)
1 − δ0 2
Proof: We make use of the fact that the iterates for the solution of the o-line problem as
in Theorem 5.3 and the real-time iterations (y k ) coincide on y 0 and y 1 before they separate.
90 Contractivity of the Real-Time Iterations
As they have the same contraction constants κ<1 and ω, also δ0 is identical for both.
Using the property (5.15) from the proof of Theorem 5.1 for the Newton type iterates
1 δ0k
y k+m − y k ≤ ∆y k ≤ ∆y 0 , ∀ k, m ≥ 0,
1 − δ0 1 − δ0
we deduce that
δ0
y ∗ − y 1 = lim y 1+m − y 1 ≤ ∆y 0 .
m→∞ 1 − δ0
∗ 0
For the o-line solution y0 of P , the same inequality holds, so that
2δ0
y ∗ − y0∗ ≤ y ∗ − y 1 + y0∗ − y 1 ≤ ∆y 0 .
1 − δ0
anyway, as the problem does not change anymore). Note that the iterates converge in
typical application problems much faster than the horizon shrinks (e.g. Example 5.2).
This allows to conclude that the real-time iterates practically provide an optimal solution
yk∗ of a problem P k with a relatively small k < N , i.e., for a problem with a slightly
shortened horizon only.
∆y 0 ≤ β0,
Proof: We make use of the fact that Rx̄0 (y 0) = Rx̄0 (ȳ0∗ ) = 0 and calculate ∆y 0 directly:
∆y 0 = −J(y 0 )−1 R 0
x0 (y )
0 0
0 0
= −J(y 0 )−1
R (y 0
) + = J(y 0 )−1
−0
.
x̄ 0
0
0 0
The proof is completed by using J(y 0)−1 ≤ β as shown in the proof of Theorem 5.3.
As an immediate consequence of this lemma and of Theorem 5.7, we obtain the following:
κ + ω2 β0
y ∗ − y0∗ ≤ 2 β0,
1 − (κ + ω2 β0)
and for an exact Newton method of second order in the size of the disturbance
ω
y ∗ − y0∗ ≤ β 2
02 .
1− ω
2
β0
Denoting the limit point of the real-time iterations by y ∗ = (q ∗ , s∗ , λ∗ ), and the optimal
∗
o-line solution by y0 = (q0∗ , s∗0 , λ∗0 ), the loss of optimality can be bounded by
1
F (q ∗ , s∗ ) − F (q0∗ , s∗0 ) ≤ BR y ∗ − y0∗2 . (5.33)
2
Proof: ∗ ∗ ∗ ∗
First note that not only the point (q0 , s0 ), but also the point (q , s ) is feasible
∗ ∗ ∗ ∗
according to Theorem 5.6, i.e., G(q0 , s0 ) = G(q , s ) = 0. Therefore, we can compare the
values of the Lagrangian function L(q, s, λ) = F (q, s) − λ G(q, s) that coincide with the
T
1
L(y ∗)−L(y0∗) = 0 ∂L (y ∗ + t1 (y ∗ − y0∗ )) (y ∗ − y0∗ ) dt1
1 ∂y ∗0
= 0 R(y0 + t1 (y ∗ − y0∗ ))T (y ∗−y0∗ ) dt1
1 t ∗ ∗ ∗ ∗ ∗
T
∗ ∗
= 0 0 1 ∂R ∂y
(y 0 + t 2 (y −y 0 ))(y −y 0 ) dt2 (y −y0 ) dt1
T
1 t
= (y ∗−y0∗ )T 0 0 1 ∂R ∂y
(y ∗
0 + t2 (y ∗
−y ∗
0 )) dt2 dt ∗ ∗
1 (y −y0 )
1
L(y ∗)−L(y0∗) ≤ Br y ∗−y0∗2 .
2
2
∗ ∗ κ + ω2 β0
F (q , s ) − F (q0∗ , s∗0 ) ≤ 2Br β 02 , (5.34)
1 − (κ + ω2 β0)
and for an exact Newton method of fourth order in the size of the disturbance:
Br ω 2 β 4
F (q ∗ , s∗ ) − F (q0∗ , s∗0 ) ≤
4
2 0 . (5.35)
2 1 − 2 β0
ω
Chapter 6
In this chapter we describe in detail what computations are necessary to perform one real-
time iteration, and we show how these computations can be performed eciently. Starting
with the current iterate of the variables (w, λ, µ), we describe how to nally arrive at the
solution (∆w, λ̃, µ̃) of the QP (3.10), that allows to generate the next iterate. Though most
parts of the algorithm are well known, we present all details here, to be able to show what
is meant by the separation into preparation and feedback phase, which is important for
the real-time iterations. The feedback phase comprises only a small fraction of the overall
computations, which can be found in Subsections 6.5.2 and 6.5.2 for two alternative QP
solution approaches.
We will start the chapter by briey investigating the structure of the nonlinear pro-
gramming problem in Sec. 6.1, and show how this structure leads to a favourable structure
of the QP that has to be generated and solved in each cycle. In our approach, QP genera-
tion and QP solution are intertwined, so that we cannot clearly separate these two steps.
In Sec. 6.2 we show that only a so called partially reduced QP has to be generated if some
solution steps are performed in advance, and in Sec. 6.3 we will explain how the remaining
sensitivities can be computed eciently. We closely follow the lines of Leineweber [Lei99],
who developed the employed partial reduction strategy.
We present two alternative approaches to solve the partially reduced QP: in Sec. 6.5
we describe the so called condensing technique, which we actually used for the presented
numerical examples, and which condenses the large, but structured QP into a small, but
unstructured QP, which is then solved by standard techniques. The alternative approach
presented in Sec. 6.6 does directly attack the large structured QP by a dynamic program-
ming approach that leads to a Riccati recursion. Both methods allow to perform the
most expensive steps before the actual value of x0 is known, thus allowing to prepare an
immediate feedback. Finally, we give a summary of the necessary computation steps
93
94 A Close Look at one Real-Time Iteration
per real-time iteration, and show that the algorithm can be interpreted as a successive
generation of approximated optimal feedback control laws.
1
N N −1
2 i=0 ∆wiT Ai ∆wi + i=0 ∇wi Li (sxi , szi , qi )T ∆wi
min (6.1a)
∆w0 , . . . , ∆wN +∇(sxN ,szN ) E(sxN , szN )T ∆(sxN , szN )
subject to
∂xi (τi+1 )
sxi+1 − xi (τi+1 ) + ∆sxi+1 − ∆wi = 0, i = 0, . . . , N − 1, (6.1b)
∂wi
∂g ∂g ∂g
g(sxi , szi , qi ) + x ∆sxi + z ∆szi + ∆qi = 0, i = 0, . . . , N, (6.1c)
∂si ∂si ∂qi
sx0 − x0 + ∆sx0 = 0, (6.1d)
∂r e
r e (sxN , szN ) + x z
∆(sxN , szN ) = 0, (6.1e)
∂(sN , sN )
∂r i
r i (sxN , szN ) + ∆(sxN , szN ) ≥ 0, (6.1f )
∂(sxN , szN )
∂h
h(sxi , szi , qi ) + ∆wi ≥ 0, i = 0, . . . , N. (6.1g)
∂wi
∆qN − ∆qN −1 = 0 (6.1h)
1 We recall here that qN := qN −1 is only introduced for notational convenience and has to be eliminated
again. Due to the linearity of the constraint qN = qN −1 it does not aect the Hessian matrix.
6.2 The Partial Reduction Technique 95
It is a crucial feature of our algorithm that this QP is never generated directly. Instead,
following the partial reduction approach developed by Leineweber [Lei99], rst only the
z
linearized consistency conditions (6.1c) are generated that allow to eliminate ∆si from the
QP, as will be described in the following section.
the DAE system. The solution dzi Dis Diq of this system allows to construct the
vector and matrix
0 I 0
di := dzi Di := Dis Diq ,
x
and
0 0 I
that are called the range space and null space component of the linearized consistency
conditions, because
and
∂r e z ∂r e
r e := r e (sxN , szN ) + d , (Re,x |Re,q ) := DN ,
∂szN N ∂wN
∂r i ∂r i
r i := r i (sxN , szN ) + z dzN , (Ri,x |Ri,q ) := DN ,
∂sN ∂wN
for the constraints, so that we can formulate the following reduced QP that is equivalent
to (6.1)
N 1 1
i=0 { 2 ∆si Qi ∆si + 2 ∆qi Ri ∆qi
xT x T
min T (6.5a)
∆sx0 , . . . , ∆sxN +∆qiT Si ∆sxi + gix T ∆sxi + giq ∆qi }
∆q0 , . . . , ∆qN
subject to
In partial reduction approaches the full space Hessian blocks Ai are never computed. There-
T
fore, the terms Di Ai di are usually dropped in the denitions (6.3), causing only a minor
x z
change, as di are proportional to g(si , si , qi ), which are expected to be close to zero near
a solution. However, in Sec. 6.4 we present a newly developed approach to compute e-
T
ciently approximations of both, the reduced Hessian Di Ai Di and the gradient contribution
DiT Ai di , that is based on a Gauss-Newton approach for least squares integrals. But let us
rst describe how the linearized continuity conditions (6.5b) of the partially reduced QP
can be generated eciently.
6.3 Ecient Sensitivity Computation 97
∂xi (τi+1 )
∂(sxi , szi , qi )
0 I 0
∂xi (τi+1 ) z
di Dis Diq
x
k i Xi Yi := x z
∂(si , si , qi )
0 0 I
3
that are actually needed to formulate the partially reduced QP (6.5). This saves a consid-
erable amount of computational eort for problems with a large share of algebraic variables.
Before we describe this approach in detail, a remark is in order about how to generally
approach the problem of computing derivatives of a DAE solver output.
derivative information, if the integrator accuracy is not chosen extraordinarily high; if such
an accuracy is feasible at all, this will cause excessive computation times.
An approach which avoids the drawbacks of END is the so called Internal Numerical
Dierentiation (IND) as described by Bock [Boc81]. The idea is to freeze the discretiza-
tion scheme for the neighboring trajectories, so that the output becomes a dierentiable
function of the inputs. This allows to perform the DAE solution even with low accuracy,
without jeopardizing the accuracy of the derivative approximation. The frozen discretiza-
tion scheme is usually adapted to the nominal trajectory.
In addition, much eort can be saved if the perturbed trajectories are computed simul-
taneously, as many matrix evaluations and factorizations then need to be performed only
once for all trajectories.
A related approach that may be interpreted as the analytical limit of IND [Boc83]
is to solve the sensitivity equations along the nominal system trajectory. We will briey
describe how this approach can be used to compute directional derivatives.
ẋi (τ ) = f (xi (τ ), zi (τ ), qi ),
τ −τi
−β τ
0 = g(xi (τ ), zi (τ ), qi ) − e i+1 −τi g(sxi , szi , qi ),
xi (τi ) = sxi .
Dierentiation of this system with respect to the initial values and control parameters
(sxi , szi , qi ) and a multiplication from the right by the matrix (di |Di ) yields a linear matrix
DAE. Dening the matrix functions
∂xi (τ )
ki (τ ) Xi (τ ) Yi (τ ) := ∂(sx z d i Di ,
i ,si ,qi )
∂zi (τ )
The consistent initial value for the algebraic matrix kiz Xiz Yiz is
This linear matrix DAE can be solved simultaneously with the original initial value prob-
lem (2.3)-(2.5), as it is done e.g. in the version of the advanced BDF integrator DAESOL
(Bauer [Bau00]) that we used for most computations that are presented in this thesis. The
nal values are then used to dene
gix
gi :=
giq
in (6.3a), i.e., how to compute the directional derivatives of the objective integrals
τi+1
Li (sxi , szi , qi ) = L(xi (τ ), zi (τ ), qi )) dτ.
τi
with a vector valued function l(·), there exists a possibility to obtain a cheap approximation
of the Hessian blocks Ai by an extension of the Gauss-Newton approach to least squares
integrals. This approximation is good if the residual l(·) and if the multipliers λ, and µ
are close to zero (cf. the discussion in Sec. 5.1.2).
To derive an expression for the Gauss-Newton approximation of the full Hessian let
us neglect the constraint contributions and regard only the objective contribution of the
Hessian that is
τi+1
∇2(sxi ,szi ,qi) l(xi (τ ), zi (τ ), qi )22 dτ.
τi
where
∂xi (τ ) ∂xi (τ ) ∂xi (τ )
∂sx ∂szi ∂qi
∂l(xi (τ ), zi (τ ), qi ) i
∂zi (τ ) ∂zi (τ ) ∂zi (τ )
Ji (τ ) := ∂sx ∂szi
.
∂(x, z, u) i ∂qi
0 0 I
τi+1
DiT Ai Di =2 DiT Ji (τ )T Ji (τ )Di dτ.
τi
Fortunately the matrix products Ji (τ )Di are cheaply available, if directional derivatives
are calculated as described in the previous section. Using the notation of that section,
Ji (τ )Di can be seen to have the simple form
Xi (τ ) Yi (τ )
∂l(xi (τ ), zi (τ ), qi ) Xiz (τ ) Yiz (τ ) .
Ji (τ )Di = J˜i (τ ) :=
∂(x, z, u)
0 I
6.5 QP Solution by a Condensing Approach 101
as dened in Eq. (6.3a) can also be calculated exactly, without ever computing the full
Hessian approximation. For the exact computation of the reduced obejctive gradient (6.3)
T
we also need the terms Di Ai di . A multiplication of Eq. (6.7) from the left and the right
T
with Di and di yields
τi+1
∂l(xi (τ ), zi (τ ), qi ) ki (τ )
DiT Ai di =2 J˜i (τ ) T
dτ.
τi ∂(x, z) kiz (τ )
so that
τi+1
∂l(xi (τ ), zi (τ ), qi ) ki (τ )
gi := 2 J˜i (τ ) T
l(xi (τ ), zi (τ ), qi ) + dτ.
τi ∂(x, z) kiz (τ )
The matrix J˜i (τ ) can be computed simultaneously with the DAE solution. The integral
can be calculated by using a suitable integration formula. Note that the evaluation of the
integrand is very cheap compared to the computations necessary for the DAE solution.
Furthermore, if an interpolation of the sensitivity matrices is employed in the DAE solver,
the integrand can be evaluated at arbitrary points on the interval, without the necessity to
stop the integration routine (cf. Bock and Schlöder [BS81]); these evaluation points are in
particular independent of the stepsizes of the DAE solver.
We have implemented this extension of the Gauss-Newton method, which delivers
the Hessian approximation at virtually no additional costs, in the current version of
the optimal control package MUSCOD-II, in conjunction with the implicit DAE solver
DAESOL [BBS99, Bau00].
condensed QP. In a second step, the initial value constraint (6.5c) will be used to eliminate
∆sx0 , so that a fully reduced QP in the variables ∆q := (∆q0 , . . . , qN −1 ) only needs to be
solved by a standard QP solver. Finally, the solution of the fully reduced QP is expanded
to yield the solution in variable and multiplier space of the partially reduced QP.
∆sx1 ∆sx0
.. ∆q0
∆w1
, with ∆w1 := . x , and ∆w2 := .. .
∆w2 ∆sN .
∆qN ∆qN −1
By introducing
c1 I
c2 −X1 I
c3 −X2 I
b1 := .. , B11 := .. .. ,
. . .
cN −XN −1 I
0 I
and
−X0 −Y0
−Y1
−Y2
B12 := .. ,
.
−YN −1
−I
1
min 2
∆w1T A11 ∆w1 + ∆w1T A12 ∆w2
∆w1 ,∆w2 (6.8)
+ 12 ∆w2T A22 ∆w2 + aT1 ∆w1 + aT2 ∆w2
subject to
The idea of the condensing approach is to exploit the invertibility of B11 to eliminate ∆w1
by
−1
∆w1 = −B11 (B12 ∆w2 + b1 ) =: M∆w2 + m (6.9)
1 b̃ + B̃∆w2 = 0
min ∆w2T Ã∆w2 + ãT ∆w2 s.t. (6.10a)
∆w2 2 c̃ + C̃∆w2 ≥ 0
with
The generation of the condensed QP can be achieved eciently by recursive techniques that
have been introduced by Bock and Plitt [Pli81, BP84]. They are described in Appendix E.
1
min 2
∆sx0 T Ãss ∆sx0 + 12 ∆q T Ãqq ∆q
∆sx
0 ,∆q (6.10b)
+∆sx0 T Ãsq ∆q + ãTs ∆sx0 + ãTq ∆q
subject to
sx0 − x0 + ∆sx0 = 0
b̃r + B̃rs ∆sx0 + B̃rq ∆q = 0
c̃ + C̃s ∆sx0 + C̃q ∆q ≥ 0.
1
min 2
∆q T Ãqq ∆q + (x0 − sx0 )T Ãsq + ãTq ∆q (6.11)
∆q
subject to
b̃r + B̃rs (x0 − sx0 ) + B̃rq ∆q = 0
c̃ + C̃s (x0 − sx0 ) + C̃q ∆q ≥ 0.
This dense QP can be solved by a standard QP solver. It is of rather small size compared
to the original uncondensed QP (6.8), and bears nearly no sparsity. We usually employ
4
QPSOL by Gill, Murray, Saunders, and Wright [GMSW83], a routine that makes use of
an active set strategy and is able to cope with indenite Hessian matrices. Note that in
principle even large parts of the fully reduced QP (6.11) can be precomputed before x0
x
is available, if matrix factorizations based on the active set for x0 = s0 are calculated in
advance, as proposed in [BDLS00].
The solution of the fully reduced QP are the optimal values for ∆q0 , . . . , ∆qN −1 . The
value of ∆q0 plays a crucial role in the real-time context, as it is this control that is given
directly to the real system as an immediate feedback.
Remark: The fact that an active set strategy is used to determine the active set carries
some danger in the real-time context, as it is well known that the worst case complex-
ity of such an algorithm can be exponential in the number of variables (cf. Klee and
Minty [KM72]). Experience shows, however, that the computational burden of this dense
QP solution is bounded in practice. In typical applications of our real-time algorithms it is
considerably smaller than the eort needed for the rst condensing step, which itself needs
only a small share of the overall time of a full real-time iteration cycle. A theoretically
appealing alternative to active set strategies is provided by Interior-Point Methods (IPM),
4 QPSOL is available as a NAG routine under the name E04NAF.
6.5 QP Solution by a Condensing Approach 105
that have polynomial run time bounds. For an introduction into IPM algorithms and
their application to quadratic programs we refer e.g. to Nocedal and Wright [NW99] or
Wright [Wri97].
by computing
That (∆w2 , λ̃2 , µ̃) is a solution of the condensed QP can be seen by comparing the KKT
conditions of (6.10b) with those of (6.11).
∆w1 = M∆w2 + m
and
−T
λ̃1 = B11 (A11 ∆w1 + A12 ∆w2 + a1 − B21
T
λ̃2 − C1T µ̃). (6.12)
To justify Eq (6.12) let us formulate the stationarity condition of the Lagrange gradient of
the uncondensed QP (6.8) as follows:
The rst condition is equivalent to Eq. (6.12), whereas the second can be seen to be satised,
if Lagrange stationarity with respect to ∆w2 is attained in the condensed QP (6.10a):
0 = Ã∆w2 + ã − B̃ T λ̃2 − C̃ T µ̃
= (M T A11 M + M T A12 + AT12 M + A22 )∆w2 + M T A11 m + AT12 m
+M T a1 + a2 − (B21 M + B22 )T λ̃2 − (C1 M + C2 )T µ̃
= A22 ∆w2 + AT12 ∆w1 + a2 − B22 T
λ̃2 − C2T µ̃
+M T {A11 ∆w1 + A12 ∆w2 + a1 − B21 T
λ̃2 − C1T µ̃}
= A22 ∆w2 + AT12 ∆w1 + a2 − B12 T
λ̃1 − B22
T
λ̃2 − C2T µ̃.
The expansion step can eciently be performed by a backwards recursion that is e.g.
described by Leineweber [Lei99]. We mention here that the partial reduction approach
z
does not allow to recapture the multipliers λi of the algebraic consistency conditions,
because this would require knowledge of derivatives that are not computed. Fortunately,
these multipliers are of minor importance in our real-time iteration scheme, as the current
multiplier values only enter the next QP formulation through the Hessian approximation.
If the extended Gauss-Newton approach is used, the multiplier values do not matter at all
in the QP formulation.
N −1
{ 12 ∆qiTRi ∆qi + ∆qiTSi ∆sxi + gix T∆sxi + giq ∆qi
T
min (6.14)
∆sx0 , . . . , ∆sxN i=0
+ 12 ∆sxi TQi ∆sxi } + 1
∆sxNT QN ∆sxN + xT
gN ∆sxN
∆q0 , . . . , ∆qN−1 2
subject to
1
ΠN (∆sxN ) := ∆sxN T QN ∆sxN + gN
xT
∆sxN (6.15)
2
6.6 A Riccati Recursion Approach 107
x
of the nal node, we construct the so called optimal cost-to-go function ΠN −1 (∆sN −1 ) of
x
the previous stage, by choosing for each value ∆sN −1 the control ∆qN −1 that optimizes
the added costs to go to the nal stage, i.e., the sum of the stage costs and the nal stage
costs ΠN . This procedure is repeated for ΠN −2 down to Π0 . At each step the following
small optimization problem
1 xT 1
Πi (∆sxi ) := min
x
∆si Qi ∆sxi + ∆qiT Ri ∆qi + ∆qiT Si ∆sxi
∆si+1 ,∆qi 2 2
T
+gi ∆si + giq ∆qi + Πi+1 (∆sxi+1 )
xT x
(6.16)
subject to
ci+1 + ∆sxi+1 − Xi ∆sxi − Yi ∆qi = 0
is solved. It turns out that the cost-to-go functions Πi (∆sxi ) remain quadratic functions, a
fact that makes the dynamic programming approach so ecient. Let us therefore write
1
Πi (∆sxi ) = ∆sxi T Pi ∆sxi + pTi ∆sxi + πi , for i = 0, . . . , N.
2
The algorithm that we propose for the real-time solution of the QP consists of three steps,
rst a backwards recursion that prepares the second step (the immediate feedback), and
nally a forward recursion which recovers the full QP solution.
x
PN := QN , pN := gN , and πN = 0.
For the recursion step, let us assume that the optimal cost-to-go function Πi+1 (∆sxi+1 ) has
already been computed, i.e., that the matrix Pi+1 , the vector pi+1 and the scalar πi+1 are
known. The QP (6.16) can be solved as follows: rst we eliminate
1
∆sxi T Qi ∆sxi + 12 ∆qiT Ri ∆qi + ∆qiT Si ∆sxi
T
Fi (∆sxi , ∆qi , ∆sxi+1 ) := 2
+ gix T ∆sxi + giq ∆qi
+ 12 ∆sxi+1 T Pi+1 ∆sxi+1 + pTi+1 ∆sxi+1 + πi+1
that becomes
1
Fi (·) = 2
∆qiT (Ri + YiT Pi+1 Yi )∆qi
+((Si + YiT Pi+1 Xi )∆sxi + giq − YiT Pi+1 ci+1 + YiT pi+1 )T ∆qi
+ 12 ∆sxi T (Qi + XiT Pi+1 Xi )∆sxi + gix T ∆sxi + cTi+1 Pi+1 ci+1
−cTi+1 Pi+1 Xi ∆sxi − pTi+1 ci+1 + pTi+1 Xi ∆sxi + πi+1 .
108 A Close Look at one Real-Time Iteration
which inserted into the objective function Fi gives the optimal cost-to-go according to
(6.16) as
1
Πi (∆sxi ) = ∆sxi T Pi ∆sxi + pTi ∆sxi+1 + πi
2
with
Pi := Qi + XiT Pi+1 Xi
−(Si + YiT Pi+1 Xi )T (Ri + YiT Pi+1 Yi )−1 (Si + YiT Pi+1 Xi ),
πi := πi+1 + cTi+1 Pi+1 ci+1 − pTi+1 ci+1 − (giq − YiT Pi+1 ci+1 + YiT pi+1 )T ·
(Ri + YiT Pi+1 Yi )−1 (giq − YiT Pi+1 ci+1 + YiT pi+1 ).
The values πi+1 are irrelevant for the determination of ∆sxi+1 and ∆qi ; therefore they are
usually omitted. The matrix recursion formula for Pi is also known as the discrete-time
Riccati matrix equation for time-varying systems.
The only quantities that have to be stored for subsequent use in the forward recur-
sion are the matrices K0 , . . . , KN −1 and P0 , . . . , PN , and the vectors k0 , . . . , kN −1 and
p0 , . . . , pN .
and can immediately be given to the plant. The control response can be interpreted as
the rst part of the forward recursion that will be described in the following. However, we
stress the fact that it is only the above matrix vector multiplication and vector addition
that needs to be performed to deliver the part of the QP solution, ∆q0 , that is actually
needed for the approximate optimal feedback control response.
This computation requires only nu ×nx +nu oating point operations which can certainly
be considered an immediate feedback, when compared to the complete real-time iteration
cycle, which needs many orders of magnitude higher computational eort.
6.6 A Riccati Recursion Approach 109
and
∂Πi (∆sxi )
λ̃xi = = Pi ∆sxi + pi .
∂∆sxi
• Active set changes during the QP solution are rather expensive in the Riccati ap-
proach, as each active set change would require a full backwards and forward recur-
sion. In practical implementations, the Riccati recursion is therefore usually imple-
mented in conjunction with an interior-point method (IPM) to treat the inequalities
(cf. [Ste95, Wri96, RWR98]). But even the IPM approach requires some complete
recursions until the QP solution is found, and is therefore not strictly in line with
our idea of an immediate feedback, that takes active set changes into account.
Though the condensing approach works well in current applications, we want to point out
that it has its limits, especially for long horizon lenghts N, and that a solution scheme
that employs the Riccati recursion with an interior-point method, as e.g. developed by
Steinbach [Ste95] for the multiple shooting method, promises to oer advantages in the
real-time context and deserves further investigation.
110 A Close Look at one Real-Time Iteration
1. Partial reduction: Linearize the consistency conditions and resolve the linear system
z x
to eliminate the ∆si as a linear function of ∆si and ∆qi , as described in Sec. 6.2
2. DAE solution and derivative generation: Linearize the continuity conditions by solv-
ing the relaxed initial value problems and computing directional derivatives with
x
respect to ∆si and ∆qi following the scheme of Sec. 6.3. Simultaneously, compute
the gradient of the objective function, and the Hessian approximation according to
the Gauss-Newton approach described in Sec. 6.4. Linearize also the remaining point
constraints.
3. First condensing step: Using the linearized continuity conditions, eliminate the vari-
x x
ables ∆s1 , . . . ∆sN . Project the objective gradient onto the space of the remaining
x
variables ∆s0 , ∆q0 , . . . , ∆qN −1 , and also the Hessian and the linearized point con-
straints.
4. Step generation: at the moment that x0 is known, perform the second condensing step
and solve the fully reduced QP with an ecient dense QP solver using an active set
strategy. The solution yields the nal values of ∆q0 , . . . , ∆qN −1 . The value q0 + ∆q0
can immediately be given as a control to the real-system.
5. Expansion: Expand the fully reduced QP solution to yield the full QP solution
(∆w, λ̃, µ̃). Based on this QP solution, pass over to the next SQP iterate and go
back to step 1.
I) Feedback phase: After observation of the current value x0 perform only step 4 and
apply the resulting value of q0 + ∆q0 immediately to the real process. Maintain the
new control value during some process duration δ which is suciently long to perform
all calculations of one cycle.
The feedback phase itself is typically orders of magnitude shorter than the preparation
phase (cf. Fig 7.7). Thus, our algorithm can be interpreted as the successive generation of
immediate feedback laws (cf. Sec. 4.4.2) that take state and control inequality constraints
on the complete horizon into account. Experience with the investigated large scale examples
shows that the active set does not change much from one cycle to the next so that the
computation time for the feedback is bounded and very small in practice.
Chapter 7
As an application example for the proposed real-time iteration schemes we consider the
control of a high purity binary distillation column. We have performed a variety of closed-
loop experiments at a pilot plant distillation column that is located at the Institut für
Systemdynamik und Regelungstechnik (ISR) of the University of Stuttgart. All experi-
ments were carried out in collaboration with Dr. Ilknur Uslu, Stefan Schwarzkopf, and
Rolf Findeisen. Financial support by the Deutsche Forschungsgemeinschaft (DFG) within
the DFG-Schwerpunktprogramm Real-Time Optimization of Large Systems is gratefully
acknowledged.
In rst numerical tests, the feasibility of the real-time optimization scheme could be
+
shown, with computation times in the range of seconds for a 164th order model [DBS 01],
and the practical applicability was conrmed in a rst series of closed-loop experi-
+
ments [DUF 01]; however, the observed closed-loop performance suered from oscillations
that were due to time delays in the real plant, that have not been captured by the 164th
order distillation model. We therefore improved the model by including hydrodynamic
eects that have been responsible for the time delays, resulting in a considerably stier
and larger system model. We will in this chapter present new numerical and experimental
results that have been obtained with this improved system model. Parts of the presenta-
+
tion, especially of the experimental setup, follow the lines of a previous paper [DUF 01],
from which originate also the Figures 7.1, 7.8, and 7.9.
113
114 Control of a Distillation Column
DCS PC Workstation
40
Dvol
L vol
28
F vol ; xF 21
14
Tank 1 Tank 2 1
B vol
conguration, the process inputs that are available for control purposes are the heat input
to the reboiler, Q, and the reux ow rate Lvol . Control aim is to maintain high purity
specications for the distillate and bottom product streams Dvol and Bvol .
The column is controlled by a distributed control system (DCS), that is used for the
lower level control and data acquisition. Basic control loops for the levels, the ow rates,
and the heat input are realized on the DCS system. To implement more advanced con-
trol schemes the DCS is connected to a PC from and to which direct access from UNIX
workstations is possible.
Condenser
D
VN LN +1
VN −1 LN
·
·
·
V NF LNF +1
F
VNF −1 LNF
·
·
·
V1 L2
V0 L1
B
Reboiler
The molar concentrations of the liquid uxes are equal to the tray concentrations X1 ,
whereas the vapor uxes' molar concentrations are denoted by Y1 for C = 0, 1, . . . , N .
116 Control of a Distillation Column
We assume that the pressures P1 of reboiler, trays and condenser are constant, as well
v v
as the volume holdups n0 and nN +1 of reboiler and condenser. The liquid volume holdups
nv1 of the trays may vary. All volume holdups are related to the molar holdups n1 by
nv1 = V m (X1 , T1 ) n1 for C = 0, . . . , N + 1,
The molar volumes V m (X1 , T1 ) of the liquid mixture are specied in Appendix B.
To determine the (constant) pressures we assume that the condenser pressure is xed
to the outside pressure, i.e., PN +1 = Ptop whereas the pressures P1 on the trays and the
reboiler are calculated under the assumption of constant pressure drop from tray to tray,
i.e.,
P1 = P1+1 + ∆P1 C = N, N − 1, . . . , 2, 1, 0.
The tray temperatures T1 are implicitly dened by the assumption that the sum of the
partial pressures equals the total pressure on each tray, i.e.,
where the partial pressures Pks (T1 ) are computed according to the Antoine Equation, as
specied in Appendix B.
The derivative of the temperature with respect to time, Ṫ1 , is given by the implicit
function theorem:
To account for non-ideality of the trays and other unmodelled eects we have introduced
the tray eciencies α1 for C = 1, 2, . . . , N to calculate the composition Y1 of the vapor ow
out of tray C as a linear combination of the ideal vapor composition on the tray and the
incoming vapor composition from the tray below, i.e.,
P1s (T1 )
Y 1 = α1 X1 + (1 − α1 ) Y1−1 , C = 1, . . . , N,
P1
P1s (T0 )
starting with
P0
Y0 = X0 . The concentration of the liquid outow D at the top of the
column is equal to the condenser concentration XN +1 .
Mass balances: The dierential equations that determine the change of the molar
holdups n1 of the trays are given by the mass conservation for C = 1, 2, . . . , NF − 1, NF +
1, . . . , N
ṅ1 = V1−1 − V1 + L1+1 − L1 , (7.2)
and for C = NF by
where F is the molar inow on the feed tray, that can be determined from the volume feed
ow Fvol , the Methanol concentration XF in the feed and its temperature TF via
and
ṅN +1 = VN − D − LN +1 . (7.5)
The assumption that reboiler and condenser volume nv0 and nvN +1 are xed leads to two
further equations for C = 0, N + 1
∂V m
0= ṅv1 m
= V (X1 , T1 )ṅ1 + (Ẋ1 , Ṫ1 )T n1 , (7.6)
∂(X, T )
that allow to eliminate ṅ0 and ṅN +1 . Therefore, n0 and nN +1 are chosen to be no dierential
variables.
The liquid reux stream Lvol from the condenser is controlled and allows to determine
LN +1 via
on the trays C = 1, 2, . . . , NF − 1, NF + 1, . . . , N ,
Enthalpy balances: With the liquid and vapor stream enthalpies abbreviated as h1 :=
L
hL (X1 , T1 ) and hV1 := hV (Y1 , T1 , P1 ) for C = 0, . . . , N (see Appendix B), we can formulate
the enthalpy balance in the reboiler that allows to determine the vapor stream V0 :
∂hL0 ∂hL
ṅ0 hL0 + n0 Ẋ0 + 0 Ṫ0 = Q − Qloss − V0 hV0 + L1 hL1 − BhL0 . (7.11)
∂X0 ∂T0
Here Q is the applied heat input, and with Qloss we account for possible heat losses in the
reboiler. The enthalpy balances for the trays C = 1, 2, . . . , NF − 1, NF + 1, . . . , N − 1 are
∂hL ∂hL
ṅ1 hL1 + n1
Ẋ
∂X 1
+
Ṫ
∂T 1
= V1−1 hV1−1 − V1 hV1 + L1+1 hL1+1
(7.12)
−L1 hL1 ,
3
L1 V m (X1 , T1 ) = W1 (nv1 − nref
1 ) , C = 1, . . . , N,
2 (7.15)
and can be derived by an analysis of the gravity ow over a horizontal weir with vertical
walls, that is given in Appendix B.
trays and condenser form the 122 components of the algebraic state vector z =
(L1 , . . . , LN , V1 , . . . , VN , T0 , . . . , TN +1 )T .1 Note that many algebraic variables that can
L s
easily be eliminated (as e.g. h1 , Pk (T1 ), V0 , etc.) do not count as algebraic variables in
this formulation.
The two components of the control vector u = (Lvol , Q)T are the volumetric reux ow
Lvol , and the heat input Q,
that determines implicitly the molar vapor ux V0 out of the
v v ref
reboiler. All remaining system parameters, i.e., n0 , Ptop , nN +1 , ∆P0,... ,N , n1,... ,N , α1,... ,N ,
Fvol , XF , W1,... ,N , TF , Qloss , and TC , can be subsumed in a vector p.
The equations (7.7)(7.10) and (7.2)(7.3) are the 82 dierential equations f, and
(7.15), (7.12)(7.14), and (7.1) form the 122 algebraic equations g of the system.
After substituting ṅ1 in Eqs. (7.7)(7.10) and dividing these equations by n1 , we can
summarize the DAE system, which has index one, in the following form:
1 The equilibrium temperature of the condenser mixture may help to dene the temperature of the
reux by TC := TN +1 when TC is not specied. Otherwise, this last algebraic variable could be eliminated
without changing the dynamics.
120 Control of a Distillation Column
subject to
f (xS , zS , um , p) = 0,
g(xS , zS , um , p) = 0,
7.2 Determination of the System Parameters 121
40
35
30
tray number
25
20
15
10
0
60 70 80 90 100
o
temperature [ C]
Figure 7.3: Comparison of temperature measurements and estimated steady state temper-
ature prole (solid line).
where the constraints ensure that only steady states are allowed. The positive denite
weighting matrix Q would ideally be the inverse of the covariance matrix of the tempera-
ture measurements, that can be expected to be diagonal with equal entries. For the NMPC
performance tests, however, we have explicitly given more weight to the controlled tem-
peratures, T28 and T14 , by a factor of ten, to avoid steady state oset due to model-plant
mismatch.
T
min T z(t) − T m (t)2Q dt (7.20)
x(·),z(·),p 0
122 Control of a Distillation Column
71
T28 [ C] 70
o
69
68
0 1000 2000 3000 4000 5000
89
[oC]
88
14
87
T
86
0 1000 2000 3000 4000 5000
5
Lvol [l/h]
4.5
4
0 1000 2000 3000 4000 5000
3
Q [kW]
2.5
2
0 1000 2000 3000 4000 5000
time [s]
Figure 7.4: Comparison of measured (noisy) and simulated trajectories (smooth) of the
temperatures T28 and T14 , for a small step change in the reux Lvol .
subject to
If the dynamic experiment starts in steady state, we add the steady state constraint
74 8
6
[ C]
[l/h]
72
o
vol
28
70
T
L
2
68 0
0 500 1000 1500 2000 2500 0 500 1000 1500 2000 2500
92 3
90
[ C]
Q [kW]
o
2.5
88
14
T
86
2
0 500 1000 1500 2000 2500 0 500 1000 1500 2000 2500
time [s] time [s]
Figure 7.5: Comparison of measured (noisy) and simulated trajectories (smooth), for an
a posteriori test with a control scenario which involves large but short reux variations
(right). The dotted lines show for comparison a simulation with an equilibrium model,
which does not capture hydrodynamic eects.
In Fig. 7.4, simulated and measured proles for the temperatures T28 and T14 are shown,
for an experiment involving a step change in the reux Lvol , and starting at the nominal
operating conditions. The compared temperature proles show that the medium time scale
dynamics are captured well by the model.
An a posteriori test of the model can be seen on the right hand side of Fig. 7.5, where a
simulation was performed using the same control proles as in a closed-loop experiment (cf.
Fig. 7.14), with very large steps in Lvol . The time horizon is shorter and the comparison
shows that the model does roughly capture short time scale eects that are due to hydro-
dynamics, in contrast to an equilibrium model, that cannot reproduce the corresponding
+
delays (dotted line) (cf. [DUF 01]).
tray temperatures , which correspond directly to the concentrations via the Antoine equa-
T
tion. In the following we will use the projection T̃ z := (T28 , T14 ) to extract the controlled
ref ref
T
temperatures from the vector z , and dene T̃ref := T28 , T14 = ( 70 ◦ C, 88 ◦ C )T for
the desired setpoints.
f (xS , zS , uS , p) = 0,
g(xS , zS , uS , p) = 0,
T̃ zS − T̃ref = 0.
Here the last equation restricts the steady state to satisfy the inferential control aim of
keeping the temperatures at the xed reference values. The necessary degrees of freedom
are provided by the two components of the steady state controls uS . This approach was
+ +
used in the rst series of numerical and experimental tests [DBS 01, DUF 01].
where the second term is introduced for regularization, with a small diagonal weighting
matrix
0.05 ◦ C h l−1 0
R= .
0 0.05 C kW−1
◦
7.3 Optimal Control Problem Formulation 125
Problem Formulation
The resulting optimal control problem is formulated as follows:
t0 +Tp 2
min T̃ z(t) − T̃ref + R(u(t) − uS )22 dt (7.22)
u(·),x(·),p,uS t0 2
Initial values for the dierential states and values for the system parameters are prescribed:
x(t0 ) = x0 ,
p = p0 .
where h := (D, B)T is the function calculating the uxes D and B out of condenser and
reboiler according to the model equations which cannot become negative. This implicitly
provides upper limits to the controls.
The steady state control uS is determined implicitly by the requirements that u is
constant on the long prediction interval
T̃ z(t0 + Tp ) − T̃ref = 0.
126 Control of a Distillation Column
74 74
T28 [ C]
[oC]
72 72
o
28
70 70
T
68 68
0 500 1000 1500 2000 0 500 1000 1500 2000
T14 [ C]
[oC]
90 90
o
14
T
85 85
0 500 1000 1500 2000 0 500 1000 1500 2000
Lvol [l/h]
Lvol [l/h]
5 5
0 0
0 500 1000 1500 2000 0 500 1000 1500 2000
3 3
Q [kW]
Q [kW]
2.5 2.5
2 2
0 500 1000 1500 2000 0 500 1000 1500 2000
time [s] time [s]
Figure 7.6: Numerical simulation of a closed-loop response after a reux breakdown of ve
minutes and snapshot of a predicted trajectory (dotted). The right hand side shows the
rst 2100 seconds of the predicted trajectory, for the solution of the optimization problem
at time t=400 seconds. The remaining 34500 seconds of the prediction horizon are not
shown.
As the control interval length is 6 times longer than the desired sampling time, the
initialization strategy for subsequent real-time iterations was chosen to be the warm start
strategy (cf. Sec. 4.4.2). For the Hessian approximation we have chosen the Gauss-Newton
approach for least squares integrals that is described in Sec. 6.4.
7.4 Experimental Setup 127
CPU [ms]
CPU [s]
20
50
10
0 0
0 500 1000 1500 2000 0 500 1000 1500 2000
time [s] time [s]
Figure 7.7: CPU times for the full real-time iteration cycles and time that is needed in the
feedback phase, for the numerical experiment in Fig. 7.6.
As a rst numerical test of the closed-loop algorithm we consider the following scenario:
starting at the nominal operating conditions, a reux breakdown happens and leaves the
−1
control inputs xed to Lvol =0.5 l h and Q=2.5 kW for a duration of ve minutes. After
these ve minutes the plant can again be controlled by the NMPC scheme. The optimizer
works all the time, even if the feedback is not given to the simulated plant. The closed-loop
behaviour is shown in Fig. 7.6.
The necessary CPU times for each real-time iteration, as well as the recorded response
times are shown in Fig. 7.7. Note that the response times are roughly two orders of
magnitude smaller than the CPU time for one iteration.
ref ref
T14 , T28 Q, Lvol T14 , T28
NMPC column 11
00
Fvol , T21 , Q, Lvol
EKF
x0 , XF , Fvol
mated and measured temperature proles can be found in Fig. 7.15 note that only the
temperatures T14 , T21 and T28 are available to the state estimator.
The described EKF type algorithm is currently extended by Bürner to a moving horizon
estimator [Bür01]. This new algorithm so far with a horizon length of 10 seconds only
was already employed for one of the closed-loop experiments, which involved a step change
in XF (cf. Fig. 7.12). The performance in the estimation of XF can be seen in Fig. 7.13.
The large estimation oset is due to model-plant mismatch.
The three processes data acquisition, state estimation and real-time optimization
were running independently and communicating only via input and output les, in such
a way that a breakdown of one component did not cause an immediate breakdown of the
others. Missing new inputs were simply replaced by old values. This construction made the
whole system suciently stable against unexplained delays in the data transfer between
the UNIX workstation and the PC. Figure 7.8 shows the overall controller/plant/estimator
setup.
7.5 Experimental Results 129
ref
T28 XF , F
− PI T28
Lvol
column T14
ref
T14
−
PI Q
NMPC PI
70.4 70.4
70.2 70.2
T28 [oC]
T28 [ C]
o
70 70
69.8 69.8
69.6 69.6
0 1000 2000 3000 4000 0 1000 2000 3000 4000
90 90
[oC]
T14 [ C]
o
88 88
14
T
86 86
0 1000 2000 3000 4000 0 1000 2000 3000 4000
5 5
Lvol [l/h]
Lvol [l/h]
4 4
3 3
0 1000 2000 3000 4000 0 1000 2000 3000 4000
2.6 2.6
Q [kW]
Q [kW]
2.4 2.4
2.2 2.2
2 2
0 1000 2000 3000 4000 0 1000 2000 3000 4000
time [s] time [s]
Figure 7.10: Feed ow change: Comparison of real-time iteration NMPC with a conven-
tional PI controller, for a step reduction of 10 % in the feed ow Fvol .
nominal value. Again, the NMPC performance is considerably better, having completed
the transition 1000 seconds after the feed ow change, and with a maximum deviation
◦
in T28 of 0.3 C. This is in sharp contrast to the PI performance, which has a maximum
◦
deviation of 0.8 C, and which did not even complete the transition to the new steady state
3500 seconds after the step change.
NMPC PI
71 71
T28 [oC]
T28 [ C]
70.5 70.5
o
70 70
T14 [ C]
o
88 88
14
T
86 86
0 1000 2000 3000 4000 0 1000 2000 3000 4000
6 6
Lvol [l/h]
Lvol [l/h]
5 5
4 4
3 3
0 1000 2000 3000 4000 0 1000 2000 3000 4000
3 3
Q [kW]
Q [kW]
2.5 2.5
2 2
0 1000 2000 3000 4000 0 1000 2000 3000 4000
time [s] time [s]
Figure 7.11: Feed ow change: Comparison of real-time iteration NMPC with a conven-
tional PI controller, for a feed ow step change by 20 % (from -10% to +10 % of the
nominal value).
in the presence of model-plant mismatch, which has been increased due to the change in
XF . Note that the NMPC performance depends crucially on the quality of the on-line
state and parameter estimates, as the jump in XF has to be detected correctly to yield an
appropriate response. For a comparison of estimated and real values of XF , see Fig. 7.13. It
can be seen that it took roughly 600 seconds to detect the composition change completely.
NMPC PI
70.5 70.5
T28 [oC]
T28 [ C]
o
70 70
69.5 69.5
0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000
90 90
[oC]
T14 [ C]
o
88 88
14
T
86 86
0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000
6 6
Lvol [l/h]
Lvol [l/h]
5 5
4 4
3 3
0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000
3 3
Q [kW]
Q [kW]
2.5 2.5
2 2
0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000
time [s] time [s]
Figure 7.12: Feed concentration change: Comparison of real-time iteration NMPC with a
conventional PI controller, for a feed concentration change from XF = 0.32 to XF = 0.275.
the inputs for ve minutes, setting the reux to a very small value of Lvol = 0.5 l/h. At
time t = 1000 sec., the reux breakdown is assumed to be over, so that feedback can again
be applied to the column. The closed-loop responses of NMPC and PI controllers are
+
shown in Fig. 7.14 (this result can also be found in [DUF 01]). Note that both controllers
start with the same system state at t = 1000 sec.; the PI performance is worse than the
◦ ◦
NMPC scheme, as T28 is increasing up to 72 C, whereas it only increases to 71.3 C for
the NMPC scheme, and the disturbance eects last until 3000 sec. after the disturbance,
compared to less than 2000 sec. for NMPC.
Valve Saturation: The micro reux breakdown that happens for both scenarios in the
feedback phase is due to valve saturation , i.e., due to the fact that the lling level of the
reux drum was shortly becoming too low because more reux L was desired than the
amount of vapor ow VN entering the condenser (cf. Fig. 7.2). This causes an automatic
7.5 Experimental Results 133
0.3
XF [−]
0.25
0.2
0 1000 2000 3000 4000
time [s]
Figure 7.13: On-line estimate of XF (solid), compared to the real value (dashed), in the
scenario of Fig. 7.12.
stop of the reux pump. In the NMPC scheme, this phenomenon should have been avoided
by the constraint D ≥ 0, i.e., the requirement that the distillate outow remains non-
negative (note that in the model the condenser hold up is assumed constant). However,
due to model-plant mismatch, the constraint was violated in the real-plant even though it
was satised in the model prediction. To account for the uncertainty, we have sharpened
−5 kmol
the constraint to D ≥ 0.2 · 10 in the following experiments, to provide a security
sec
margin of 10 % of the nominal value of D . For the PI controllers, there is no easy way
to circumvent valve saturation in the presence of large disturbances; therefore we did not
perform the large disturbance scenario with the PI controllers.
NMPC PI
72 72
T28 [oC]
T28 [oC]
71 71
70 70
90 90
T14 [oC]
T14 [oC]
88 88
86 86
0 2000 4000 6000 0 2000 4000 6000
8 8
6 6
[l/h]
Lvol [l/h]
4 4
vol
L
2 2
0 0
0 2000 4000 6000 0 2000 4000 6000
3 3
Q [kW]
Q [kW]
2.5 2.5
2 2
0 2000 4000 6000 0 2000 4000 6000
time [s] time [s]
Figure 7.14: Reux breakdown: Comparison of real-time iteration NMPC with a con-
ventional PI controller, after a reux breakdown of 5 minutes. At time t=1000 s both
closed-loop scenarios start at the same state.
no estimation diculties exist. The poorest performance occurred in the feed composition
change scenario, where the state estimator was not able to track the system parameter
XF instantly. On the other hand, the NMPC scheme shows good performance when con-
straints play a role, which are dicult to handle with a PI control scheme. Especially
the closed-loop response of the large disturbance scenario shows interesting features and
deserves further analysis. We will have a closer look at the observed real-time performance,
and we will also compare the experimentally observed trajectory with computations that
have been performed a posteriori.
Observed Computation Times: Let us rst have a look on the computation times
under experimental conditions. We measure not only the overall time for each real-time
iteration, but also the response time, i.e., the time between the moment that the current
7.5 Experimental Results 135
NMPC Profile
74
40
[oC]
72
28
T
35
70
90
14
88 25
T
tray number
86
0 1000 2000 3000 4000 5000
20
8
6
Lvol [l/h]
4 15
2
0
0 1000 2000 3000 4000 5000 10
4
3
Q [kW]
1 0
0 1000 2000 3000 4000 5000 60 70 80 90 100
time [s] temperature [oC]
Figure 7.15: Large disturbance scenario. Left: Closed-loop response. Feedback starts only
at time t = 1500 seconds. The temperature prole at this time is shown on the right hand
side (+), together with the estimated prole (solid) and compared to the nominal prole
(dots/dashed).
observed state x0 is given to the optimizer, and the moment that the control response is
available for the data transfer to the column. Both time measurements were done externally
(from a MATLAB environment), i.e., they are not CPU times in the strict sense, but the
overall times that the computations required under the given CPU load conditions. The
observed times can be seen in Fig. 7.16. Note that due to the fact that the communication
sampling rate was technically restricted to be not shorter than 10 seconds, the immediate
response may in our realization have taken up to 10 seconds until it arrives at the distillation
column, depending on the phase dierence of the (self-synchronizing) optimizer and the
data transfer system.
136 Control of a Distillation Column
Comp.time [ms]
Comp.time [s]
400
20
10 200
0 0
0 1000 2000 3000 4000 0 1000 2000 3000 4000
time [s] time [s]
Figure 7.16: Overall computation times for the full real-time iteration cycles and the time
that is needed in the feedback phase, for the large disturbance experiment (cf. Fig. 7.15).
Prediction Horizon Contents: To analyse the working of the NMPC controller better,
we will have a look at the predicted control trajectory at the time point t = 1500 seconds,
and compare it to the nal closed-loop response, in Fig. 7.17. It can be seen that the
predicted and real trajectory dier signicantly. This is mainly caused by the fact that
the control horizon of 600 seconds is too short to capture all necessary control actions for
a disturbance as large as the one considered.
We will compare the experimentally observed performance with a simulated closed-loop
trajectory, and with the optimal solution, according to the model.
Optimal Solution: For completeness, the experimental and simulated closed-loop tra-
jectories are compared with a theoretical o-line result, namely with the optimal open-loop
trajectory, that can be seen on the right column of Fig. 7.18. It can be seen that the ex-
perimental and simulated closed-loop trajectories show considerable similarity with the
theoretically optimal solution.
The computation of the optimal trajectory with the o-line multiple shooting method
required 23 major SQP iterations with a CPU time of 3356 seconds (AMD Athlon processor
with 1009 MHz), where the control horizon was chosen to consist of 45 multiple shooting
intervals, each of 30 seconds length. Note that the computation time for this problem is
in the same order as the whole process duration.
7.5 Experimental Results 137
T28 [oC]
72 72
o
70 70
0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000
94 94
92 92
T14 [ C]
T14 [oC]
90 90
o
88 88
86 86
0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000
8 8
6 6
[l/h]
Lvol [l/h]
4 4
vol
L
2 2
0 0
0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000
4 4
3 3
Q [kW]
Q [kW]
2 2
1 1
0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000
time [s] time [s]
Figure 7.17: Comparison of experimental closed-loop trajectory (left) with the NMPC
prediction horizon at time t = 1500 seconds (right).
138 Control of a Distillation Column
T28 [oC]
T28 [oC]
72 72 72
o
70 70 70
T14 [oC]
T14 [oC]
90 90 90
o
88 88 88
86 86 86
0 1000 2000 3000 0 1000 2000 3000 0 1000 2000 3000
8 8 8
6 6 6
[l/h]
Lvol [l/h]
Lvol [l/h]
4 4 4
vol
L
2 2 2
0 0 0
0 1000 2000 3000 0 1000 2000 3000 0 1000 2000 3000
4 4 4
3 3 3
Q [kW]
Q [kW]
Q [kW]
2 2 2
1 1 1
0 1000 2000 3000 0 1000 2000 3000 0 1000 2000 3000
time [s] time [s] time [s]
In order to demonstrate the versatility of the proposed real-time iteration scheme we present
here the control of an airborne kite as a periodic control example. The kite is held by two
lines which allow to control the lateral angle of the kite, see Fig. 8.1. By pulling one line
the kite will turn in the direction of the line being pulled. This allows an experienced kite
pilot to y loops or similar gures. The aim of our automatic control is to make the kite
y a gure that may be called a lying eight, with a cycle time of 8 seconds (see Fig. 8.2).
The corresponding orbit is not open-loop stable, so that feedback has to be applied during
the ight we will show simulation results where our proposed real-time iteration scheme
was used to control the kite, with a sampling time of one second.
d 2p F
p̈ = = .
dt2 m
Let us introduce polar coordinates θ , φ, r :
p1 r sin(θ) cos(φ)
p = p2 = r sin(θ) sin(φ) .
p3 r cos(θ)
139
140 Control of a Looping Kite
et
el
Note that the distance r between pilot and kite is usually constant during ight, and θ is
the angle that the lines form with the vertical. In these coordinates, p̈ looks as follows
d ∂p ∂p ∂p
p̈ = θ̇ + φ̇ + ṙ
dt ∂θ ∂φ ∂r
∂p ∂p ∂p ∂2p ∂2p ∂2p
= θ̈ + φ̈ + r̈ + 2 θ̇2 + 2 φ̇2 + 2 ṙ 2 (8.1)
∂θ ∂φ ∂r ∂θ ∂φ ∂r
∂2p ∂2p ∂2p
+ 2 φ̇θ̇ + 2 ṙθ̇ + 2 ṙφ̇.
∂φ∂θ ∂r∂θ ∂r∂φ
Let us introduce a local right handed coordinate system with the three basis vectors
cos(θ) cos(φ) − sin(φ) sin(θ) cos(φ)
eθ = cos(θ) sin(φ) , eφ = cos(φ) , and er = sin(θ) sin(φ) .
− sin(θ) 0 cos(θ)
In this coordinate system, the partial derivatives of p with respect to θ , φ, r become
∂p ∂p ∂p
= reθ , = r sin(θ)eφ , and = er ,
∂θ ∂φ ∂r
and
Dening
Fθ := F · eθ , Fφ := F · eφ , and Fr := F · er ,
Fθ
r θ̈ − r sin(θ) cos(θ)φ̇2 + 2ṙ θ̇ = ,
m
Fφ
r sin(θ)φ̈ + 2r cos(θ)φ̇θ̇ + 2 sin(θ)ṙ φ̇ = ,
m
Fr
r̈ − r θ̇2 − r sin2 (θ)φ̇2 = . (8.2)
m
If the length of the lines, denoted by r , is kept constant, all terms involving time derivatives
of r will drop out. Furthermore, the last equation (8.2) will become redundant, as the
force in the radial direction will be augmented by a constraint force contribution Fc , so
that Eq. (8.2) is automatically satised when the augmented force Fr := Fr − Fc replaces
Fr , with Fc = Fr + r θ̇2 + r sin2 (θ)φ̇2 . In this case the equations of motion1 simplify to
Fθ
θ̈ = + sin(θ) cos(θ)φ̇2 , (8.3)
rm
Fφ
φ̈ = − 2 cot(θ)φ̇θ̇. (8.4)
rm
gra
In our model, the force vector F = F + F aer consists of two contributions, the grav-
gra aer gra
itational force F and the aerodynamic force F . In cartesian coordinates, F =
(0, 0, −mg)T with g = 9.81 m s−2 being the earth's gravitational acceleration. In local
coordinates we therefore have
1 Note
that the validity of these equations requires that Fc = Fr + rθ̇2 + r sin2 (θ)φ̇2 ≥ 0, as a line can
only pull, not push.
142 Control of a Looping Kite
from the kite's inertial frame. Under this assumption the kite's longitudinal axis is always
in line with the eective wind vector we := w − ṗ, where w = (vw , 0, 0) is the wind as seen
T
from the earth system, and ṗ the kite velocity. If we introduce a unit vector el pointing
from the front towards the trailing edge of the kite (cf. Fig. 8.1), we therefore assume that
we
el = .
we
The transversal axis of the kite can be described by a perpendicular unit vector et that is
pointing from the left to the right wing tip. Clearly, it is orthogonal to the longitudinal
axis, i.e.,
et · we
et · el = = 0. (8.5)
we
The orientation of the transversal axis et against the lines' axis (which is given by the
vector er ) can be inuenced by the length dierence ∆l of the two lines. If the distance
between the two lines' xing points on the kite is d, then the vector from the left to the
right xing point is det , and the projection of this vector onto the lines' axis should equal
∆l (being positive if the right wingtip is farther away from the pilot), i.e., ∆l = d et · er .
Let us dene the lateral angle ψ to be
∆l
ψ = arcsin .
d
We will assume that we control this angle ψ directly. It determines the orientation of et
which has to satisfy:
∆l
et · er = = sin(ψ). (8.6)
d
A third requirement that et should satisfy is that
we × et
(el × et ) · er = · er > 0, (8.7)
we
8.1 The Dual Line Kite Model 143
which takes account of the fact that the kite is always in the same orientation with respect
to the lines.
How to nd a vector et that satises these requirements (8.5)(8.7)? Using the projec-
tion wep of the eective wind vector we onto the tangent plane spanned by eθ and eφ ,
wep := eθ (eθ · we ) + eφ (eφ · we ) = we − er (er · we ),
we can dene the orthogonal unit vectors
wep
ew := and eo := er × ew ,
wep
so that (ew , eo , er ) form an orthogonal right-handed coordinate basis. Note that in this
basis the eective wind we has no component in eo direction, as
The two vectors el × et and el are the directions of aerodynamic lift and drag, respectively.
To compute the magnitudes Fl and Fd of lift and drag we assume that the lift and drag
coecients Cl and Cd are constant, so that we have
1 1
Fl = ρwe 2 ACl and Fd = ρwe 2 ACd ,
2 2
144 Control of a Looping Kite
F aer = Fl (el × et ) + Fd el
The system parameters that have been chosen for the simulation model are listed in Ta-
T
ble 8.1. Dening the system state x := (θ, θ̇, φ, φ̇) and the control u := ψ we can summa-
rize the system equations (8.3)(8.4) in the short form
ẋ = f (x, u),
with
θ̇
F aer (θ, θ̇, φ, φ̇, ψ)
θ + sin(θ) + sin(θ) cos(θ)φ̇2
g
f ((θ, θ̇, φ, φ̇)T , ψ) :=
rm r .
φ̇
Fφaer (θ, θ̇, φ, φ̇, ψ)
− 2 cot(θ)φ̇θ̇
rm
30
40
3
50 7
θ [deg]
2 0/8 4 6
60
70 5
1
80
90
60 40 20 0 −20 −40 −60
φ [deg]
Figure 8.2: Periodic orbit plotted in the φ − θ−plane, as seen by the kite pilot. The dots
separate intervals of one second.
40
θ [deg]
60
80
d θ / dt [deg/s]
0 1 2 3 4 5 6 7 8
−50
50
0 1 2 3 4 5 6 7 8
50
φ [deg]
0
−50
d φ / dt [deg/s]
0 1 2 3 4 5 6 7 8
50
0
−50
0 1 2 3 4 5 6 7 8
10
ψ [deg]
−10
0 1 2 3 4 5 6 7 8
time [s]
Figure 8.3: Periodic orbit: system states and control ψ plotted for one period T =8 s .
Note that θ and θ̇ oscillate with double frequency.
146 Control of a Looping Kite
30
40
50
θ [deg]
60
70
80
90
60 40 20 0 −20 −40 −60
φ [deg]
The solution trajectories x(t) can be regarded as functions of the initial value x0 . Note that
for x0 = xr (0) the solution is identical to the reference trajectory xr (t). The sensitivity
matrices
∂x(t)
W (t) := (xr (0)), t ∈ [0, T ],
∂x0
can therefore be obtained as the solution of the matrix initial value problem:
∂f
Ẇ (t) = (xr (t), ur (t)) · W (t) ∀t ∈ [0, T ],
∂x
W (0) = Inx .
The nal value W (T ) is called the monodromy matrix . It characterizes the sensitivity of the
nal state of each period with respect to the initial value. Asymptotically stable periodic
orbits are characterized by a monodromy matrix whose eigenvalues (also called Floquet
Multipliers) all have a modulus smaller than one, which means that initial disturbances
are damped out during the cycles. For a proof see e.g. Amann [Ama83].
8.3 The Optimal Control Problem 147
A numerical computation of W (T ) for the kite model along the chosen periodic orbit
yields
3.0182 2.4014 0.9587 −0.1307
3.3399 2.5500 0.0054 −0.3935
W (T ) =
−2.7170 −1.8596 0.8436 0.5072 ,
−2.8961 −2.0491 0.5601 0.4640
containing two eigenvalues that have a modulus bigger than one. This conrms that the
system is asymptotically unstable in the periodic reference orbit.
A hard constraint is given by the fact that we do not want the kite to crash onto the
ground (θ = 90 degrees), and for security, we require a path constraint function
h(x, u) := 75 deg − θ
to be positive. Using these denitions, we formulate the following optimal control problem
on the moving horizon [t0 , t0 + 2T ]:
t0 +2T
min L(x(t), u(t), t) dt (8.8)
u(·),x(·) t0
subject to
30
40
50
θ [deg]
60
70
80
90
60 40 20 0 −20 −40 −60
φ [deg]
Figure 8.5: Closed-loop control applied to the undisturbed system, simulation of 100 peri-
ods. Numerical errors are attenuated by very small control responses (with u(t) − ur (t) in
−2
the order of 10 degree) and do not accumulate.
30
40
50
θ [deg]
60
70
80
90
60 40 20 0 −20 −40 −60
φ [deg]
Figure 8.6: Closed-loop response to a small disturbance in θ̇ that changes from −1 deg/s to
+5 deg/s at time t = 1.0 seconds. After one period the disturbance is nearly attenuated.
30
40
50
θ [deg]
60
70
80
90
60 40 20 0 −20 −40 −60
φ [deg]
30
40
50
θ [deg]
60
70
80
90
60 40 20 0 −20 −40 −60
φ [deg]
Figure 8.8: Open-loop response to the same disturbance as in Fig. 8.7, at time t = 3.5 sec-
onds. Five seconds after the disturbance the kite crashes onto the ground (θ =90 degrees).
30
40
50
θ [deg]
60
70
80
90
60 40 20 0 −20 −40 −60
φ [deg]
Figure 8.9: Closed-loop response to a strong disturbance in θ̇ that changes from 20 deg/s
to a value of −7 deg/s at time t = 4.0 seconds. After two periods the disturbance is
completely attenuated.
8.4 Closed-Loop Simulations 151
30
40
50
θ [deg]
60
70
80
90
60 40 20 0 −20 −40 −60
φ [deg]
Figure 8.10: Closed-loop trajectory for the weak disturbance test, simulated over 100
periods.
As a last test we apply random noise of various magnitude to the system: disturbances
happen with probability p = 10% s−1 , and they simultaneously disturb all 4 components
of the system state, with independent magnitudes that are characterized by the standard
deviations
sθ = 0.9 deg, sθ̇ = 0.9 deg s−1 , sφ = 0.6 deg, and sφ̇ = 0.6 deg s−1
sθ = 4.5 deg, sθ̇ = 4.5 deg s−1 , sφ = 3 deg, and sφ̇ = 3 deg s−1
for the strong disturbance test. For each scenario, we have carried out simulations for
100 periods (i.e., for 800 seconds). The resulting φ − θ−plots can be seen in Fig. 8.10 for
the weak disturbance scenario, and in Fig. 8.11 for the strong disturbance scenario. While
the weak scenario shows how nicely the closed-loop system behaves even in the presence
of moderate disturbances, the strong disturbance scenario is certainly at the limits of
the applicability of the chosen control approach, as the disturbances sometimes push the
system state out of the state bounds specied in the optimization problem (θ ≤ 75 degrees).
The resulting infeasibility of the optimization problems was cushioned by the relaxation
strategy of the QP solver. However, this does not give any guarantee for the working of
our approach in the presence of severe disturbances. Instead, a scheme employing soft
constraint formulations should be employed.
The computation time for each real-time iteratiion cycle did not exceed the sampling
time of one second in all simulations and averaged to 0.45 seconds with a standard deviation
152 Control of a Looping Kite
30
40
50
θ [deg]
60
70
80
90
60 40 20 0 −20 −40 −60
φ [deg]
Figure 8.11: Closed-loop trajectory for the strong disturbance test, simulated over 100
periods.
of 0.02 seconds (on a Compaq Alpha XP1000 workstation). The immediate feedback took
in average one tenth of this value, 0.05 seconds.
Conclusions and Outlook
153
154 Conclusions and Outlook
• The real-time iteration scheme is contracting under the same conditions as the o-
line method (Theorem 5.6). This means: if the full horizon optimization problem
and a given initialization satisfy the sucient conditions for local convergence of the
o-line Newton type method, then the real-time iteration scheme is contracting.
• The iterates approach the optimal solution on the remaining horizon, with
a velocity that depends on the contraction rate (Corollary 5.8). Due to the excellent
contraction properties of the direct multiple shooting method, this means that after
a few iterations the real-time solution is practically identical to the exact solution on
the remaining horizon.
times for each real-time iteration are below 20 seconds, and the realized feedback times are
under practical conditions below 400 milliseconds. The experimentally observed closed-
loop behaviour shows good performance, especially for large disturbances.
The study proves that NMPC using large scale process models is feasible under practical
conditions, when the real-time iteration scheme is used (Chap. 7).
Outlook
Within this thesis, we have demonstrated the practical feasibility of NMPC using large scale
detailed process models. Several future developments of numerical methods for NMPC
come to mind, which may extend its area of applicability.
Parallelization
A parallelization of the developed algorithm, which has already been achieved for the o-
line direct multiple shooting method, promises to reduce computation times considerably.
The method is particularly well suited for parallel computation, since the most expensive
part of the algorithm, the integrations and sensitivity computations, are decoupled on
dierent multiple shooting intervals and can be performed in parallel [GB94, BS01]. For
the distillation model developed in this thesis, processor eciencies in the range of 80 %
for 8 nodes have been observed. Only minor modications have to be made to adapt the
existing parallel version of the o-line method to the real-time iteration context.
Reduced Approach
Another interesting future development is to employ a reduction approach that exploits the
initial value constraint and the continuity conditions for an ecient derivative computation
in the multiple shooting method. The approach, that is originally due to Schlöder [Sch88],
has long been successfully applied to large scale parameter estimation problems (see e.g.
Dieses [Die01] for recent developments and applications). An application of the approach
to the described Gauss-Newton method for optimal control is possible and promises large
savings in computation times in the sensitivity generation, thus allowing to further reduce
sampling times. The reduced approach is fully compatible with most algorithmic ideas of
156 Conclusions and Outlook
this thesis, especially with the initial value embedding and the dovetailing of the solution
iterations with the process development. However, the separation into preparation and
feedback phase cannot be realized as easily as before, as some parts of the DAE sensitivity
calculation can only be performed after the initial value x0 is known.
The approach would be especially ecient for models with large dierential state di-
mensions and a relatively small number of control parameters.
Periodic Control
In the last numerical example we showed the feasibility of an NMPC approach designed to
control an unstable periodic system. Given the existing optimization scheme, the stabilizing
periodic feedback law was easily obtained by a straightforward periodic formulation of the
least squares objective. In the area of periodic control, the use of NMPC techniques may
allow new periodic process designs that have so far been avoided, and an application of
the developed numerical methods to this problem class deserves further investigation.
Appendix A
We will here describe the variant of the Extended Kalman Filter (EKF) that was used for
the state estimation in the experimental tests of Chap. 7. For an introduction into current
developments in the area of nonlinear state estimation we refer e.g. to Muske and Edgar
[ME96] or to Rao and Rawlings [RR00]. We also refer to an overview article by Binder et
+
al. [BBB 01] that discusses some aspects of state estimation, and to the work of Bürner
on numerical methods of moving horizon state estimation [Bür01].
In contrast to a standard Extended Kalman Filter (EKF), our variant is able to treat
bounds on the system state, a feature that can be crucial for the practical applicability
of the algoritm. We will rst formulate the on-line estimation problem in Sec. A.1 and
introduce the EKF type algorithm in Sec. A.2, and afterwards motivate it by heuristic
arguments in Sec. A.3.
In the following, we are interested only in the values x(tk +δ) and z(tk ) of this solution. Let
us denote them by Xk (xk ) and Zk (xk ), where the constant control values uk are accounted
for by the index k . As some of the states can be measured, let us also introduce the
measurement function
hk (xk ) := Hx xk + Hz Zk (xk )
157
158 An Extended Kalman Filter Variant
with constant matrices Hx and Hz . For the distillation model with temperature mea-
surements we have set Hx = 0, and chosen Hz such that it just extracts the measured
temperatures from the algebraic state vector.
∞
The undisturbed system development {yk , xk }k=0 with an initial value x0 under a given
∞
control sequence {uk }k=0 can then be described by the equations
Stochastic Formulation
The necessity to estimate the system state arises because the real system does not coincide
with the model. To account for this, we model the discrete time system as a stochastic
system, and we also assume that the measurements are distorted by noise. Let us therefore
regard the discrete time stochastic system and measurement model
xk+1 = Xk (xk ) + wk ,
(A.3)
yk = hk (xk ) + vk .
The state disturbance and measurement noise sequences {wk }∞
k=0 and {vk }∞
k=0 are assumed
to be independent and identically distributed, both with zero mean and known (positive
denite) covariance matrices
2. Compute a QR decomposition
Pk
−1 =: Q̂R̂ (A.4)
Σv 2 H
with R̂ upper triangular and of full rank (note that this is always possible as Pk is
nonsingular). Obtain a corrected dierential state value
0
x
:= x̂k − R̂−1 Q̂T −1 . (A.5)
Σv 2 (h − yk )
3. To avoid a violation of upper and lower bounds (that may make the DAE solution
impossible), solve
min R̂(x − x
)22 subject to xLB ≤ x ≤ xUB .
x
Denote the solution by x̃. Once the active set and x̃ are known, dene a matrix Q1 =
(e1 , e2 , . . . , ena ) consisting of na unit vectors ei corresponding to the na components
of the active set, so that the equivalent problem
min R̂(x − x
)22 subject to QT1 (x − x̃) = 0, (A.6)
x
can be formulated (which has the solution x̃ itself ). Denote by Q2 the orthonor-
mal complement to Q1 , (Q1 |Q2 ) is an orthonormal (permutation) matrix.
so that
R = R̂.
∂Xk (x̃)
4. Compute x̂k+1 := Xk (x̃) and G := ∂ x̃
.
with R̄ non-singular.
6. Compute
0
Pk+1 := Q̃T −1 .
Σw 2
Note that our algorithm produces predictive estimates x̂k+1 with knowledge of the k -th
measurement yk (and the control value uk ) only.
160 An Extended Kalman Filter Variant
Derivative Generation
∂Xk
The function Xk (xk ) and its derivative
∂xk
can eciently be computed by a DAE solver
using the principle of internal numerical dierentiation (IND) (cf. Sec. 6.3). We use the
DAE solver DAESOL [Bau00]. The computation of hk (xk ) = Hx xk +Hz Zk (xk ) requires the
determination of consistent algebraic variables Zk (xk ) that satisfy g(xk , Zk (xk ), uk ) = 0.
This is achieved in our implementation by a (damped) Newton's method which causes
very little computational eort compared to the DAE solution. By the implicit function
∂hk
theorem, the derivative can be evaluated to be
∂xk
−1
∂hk ∂g ∂g
= Hx + Hz .
∂xk ∂z ∂x
Pk (x − x̂k )
−1
F (x, x̄) := Σv 2 (hk (x) − yk )
−1
Σw 2 (x̄ − Xk (x))
that represents the costs on stage k, given a past state estimate x̂k and a weighting matrix
Pk . The idea is to approximately summarize the optimal value
To obtain this approximation, we will linearize the system, as only then it is possible to
summarize the optimal stage costs in a quadratic function (using the discrete time Kalman
lter idea).
The linearization of problem (A.7) does not only concern the function F, as usual
in EKF algorithms, but also the constraints, which have to be converted into appropriate
equality constraints to make the problem truly linear. The procedure of the previous section
can be regarded as a dovetailing of the problem linearization and the linear Kalman lter
algorithm.
We linearize the problem during the solution procedure, as described in the previous
section: let us linearize hk (x) at the point x̂k to yield the approximation h+H(x− x̂k ) (step
1), then let us choose a point x̃ (the outcome of the QP solution, steps 2 and 3) at which
A.3 Heuristic Motivation 161
we linearize Xk (x) to yield the linearization x̂k+1 + G(x− x̃) = x̂k+1 + G(x̂k − x̃) + G(x− x̂k )
(step 4). We can therefore approximate F (x, x̄) by the linear function
˜ x − x̂k
f + (F̃x |F̃x̄ )
x̄ − x̂
k+1
0 Pk 0
− 12 − 12 x − x̂k
= Σv (h − yk ) + Σv H 0 .
− 12 − 12 − 12
x̄ − x̂k+1
−Σw G(x̂k − x̃) −Σw G Σw
Fixing also the active set we transform the inequality constraints into equalities
QT1 (x − x̃) = 0,
so that the linearization of problem (A.7) can be written as
2
x − x̂k
˜
min f + (F̃x |F̃x̄ ) subject to QT1 (x − x̃) = 0,
x x̄ − x̂k+1 2
with
0 Pk
1 1
f¯ := f˜ + F̃x (x̃ − x̂k ) = Σ−
v (h − yk )
2 + Σ− 2
v H
(x̃ − x̂k ). (A.9)
0 0
= (Q̄|Q̃)
0 I 0 I 0 Pk+1
0
with R
0 Q̂ 0 R̄ R
y
min ¯+
f .
y Q̃ T
0 I 0 I 0 Pk+1 x̄− x̂k+1 2
162 An Extended Kalman Filter Variant
if
Q
T 0 Q̂T 0
Q̃ T
f¯ = 0.
0 I 0 I
Q̂T 0 R̂(x̃ − x
)
f¯ =
0 I 0
−T
Q
R̂(x̃ − x
) = R
(R̂Q2 )T R̂(x̃ − x
)
T
min R̂(x̃ − x
) + R̂Q2 y22.
y
Note that at the solution y = 0 the gradient of the objective with respect to y is
2(R̂Q2 )T R̂(x̃ − x
), which is zero due to the necessary optimality conditions.
Appendix B
1
Vkm (T ) := expbk (1 + exp(1−T /ck ) (dk )).
ak
The molar volume coecients ak , bk , ck , dk b are given in Table B.1.
163
164 Details of the Distillation Model
Enthalpy coecients
−1 −2
k h1,k [K ] h2,k [K
] h3,k [K−3 ] Tkc [K] Pkc [Pa] Ωk
−2 −5 6
1 18.31 1.713 10 6.399 10 512.6 8.096 10 0.557
−2 −5 6
2 31.92 4.49 10 9.663 10 536.7 5.166 10 0.612
h
y
w
where the ow constant W and the reference volume nref are constant. For a derivation,
let us regard the gravity ow over a horizontal weir of width w with vertical walls, where
the water level is at height h over the lower edge of the weir, as depicted in Figure B.1.
The liquid level h can be determined from the excess volume on the tray, if its ground area
A is known:
nv − nref
h= .
A
Introducing a coordinate y that starts at the liquid surface and measures the depth, we
can determine the (horizontal) water velocity v(y) due to gravity by Bernoulli's equation
1 2
ρv = ρgy,
2
√
where ρ is the mass density and g the gravity constant. Note that v(y) = 2gy is inde-
pendent of the liquid's density ρ. The overall outow rate Lvol can now be determined by
an integration over y from the top level (y = 0) down to the weir's upper edge (y = h):
h √ h 1 √ 3
Lvol = v(y)wdy = w 2g 0 y 2 dy = w 2g 23 h 2
0
√ 3
3
3
= w 2g 23 A− 2 nv − nref 2 =: W nv − nref 2 .
The real values of the ow width w depend on the tray geometry (see e.g. Lockett [Loc86]).
However, since we know that the geometry of the bubble cap trays in the pilot plant
distillation column is dierent from ideal trays, we use the Francis weir formula as a
ref
heuristic scheme only, and estimate the two parameters W and n by using dynamic
experimental data.
Appendix C
In this appendix we will give a proof of Theorem 3.4 from Sec. 3.2. A similar proof of the
theorem can be found in [GVJ90, Theorem 3.3.4 and Corollary 3.3.1 (2)].
w.act
To prove the theorem, let us subdivide the weakly active constraints H into those
w.act,+ w.act,+ w.act,0 w.act,0
components H with δµ∗ > 0 and those H with δµ∗ = 0 in the solution
of QP (3.7), i.e., we write
w.act H w.act,+
H (t, w) =: (t, w).
H w.act,0
We will see that this is the function of active constraints for all P (t) on t ∈ (0, 0), and
furthermore, that all these constraints are strongly active on (0, 0). Let us therefore consider
the family of equality constrained problems
with Lagrangian function L̄(t, w, λ̄) := F (t, w) − λ̄T Ḡ(t, w). The system of necessary
optimality conditions 3.3 for these problems can be stated as
∗ ∗ ∇w L̄(t, w ∗ (t), λ̄∗ (t))
∇(w,λ̄) L̄(t, w (t), λ̄ (t)) = = 0. (C.1)
−Ḡ(w ∗ (t))
167
168 Proof of Theorem 3.4
The matrix
2 ∗ ∗ ∇w2 L̄(t, w ∗ (t), λ̄∗ (t)) −∇w Ḡ(t, w ∗(t))
∇(w, λ̄) L̄(t, w (t), λ̄ (t)) =
−∇w Ḡ(t, w ∗ (t))T 0
−1 ∂
∂ w ∗(t) 2 ∗ ∗
= − ∇(w, L̄(t, w (t), λ̄ (t)) ∇ L̄(t, w ∗(t), λ̄∗(t)). (C.2)
∂t λ̄∗(t) λ̄)
∂t (w,λ̄)
By comparing the necessary optimality conditions 3.3 for the quadratic programming prob-
lem (3.7) with Eq. (C.2) for t=0 it can be veried that
w∗ ∗
w δw∗
λ∗ δλ∗
∗s.act
∂ µ ∂ λ̄ ∗ δµs.act
(0) = (0) = w.act,+
∗ .
∂t µ ∗w.act,+
∗w.act,0
∂t
δµ∗
µ 0 0
∗inact
µ 0 0
We will show that the restriction of this curve to the interval t ∈ [0, 0) is the desired curve
v of strictly optimal KKT points of the corresponding problems P (t).
For this aim we
∗ ∗
show that the points w (t), t ∈ [0, 0), are feasible and that the multipliers µ (t) remain
non-negative for t ∈ [0, 0).
169
if 0 is chosen suciently small. The total derivative of the zero part H w.act,0 of the weakly
active constraints with respect to t is the vector
d w.act,0 ∂H w.act,0
T
D := H (0, w ∗(0)) = + ∇w H w.act,0 δw∗ > 0,
dt ∂t
whose components are positive due to the strict complementarity assumption for the solu-
tion of the quadratic programming problem (3.7). Therefore,
if 0 is chosen suciently small. Taking into account that all other constraints are contained
∗
in the vector Ḡ, and exploiting the fact that Ḡ(w (t)) = 0 along the curve, we can conclude
∗
that w (t) are feasible points for all t ∈ [0, 0).
Conversely, let us check that the multipliers µ∗ (t) remain non-negative for t ∈ [0, 0).
∗s.act
From continuity we can conclude that µ > 0, t ∈ [0, 0), and from δµw.act,+
∗ > 0 we
conclude that
µ∗w.act,+ = δµw.act,+
∗ t + O(t2 ) ≥ 0, ∀t ∈ [0, 0).
The multipliers µ∗w.act,0 and µ∗inact are identical to zero on the curve. Therefore, the points
∗ ∗ ∗
(w (t), λ (t), µ (t)) are KKT points for t ∈ [0, 0).
Furthermore, we can ensure by continuity of the rst and second order partial
∗ ∗ ∗ 2 ∗ ∗ ∗
derivatives ∇w,λ,µ L(t, w (t), λ (t), µ (t)) and ∇w,λ,µ L(t, w (t), λ (t), µ (t)) that the two
remaining conditions of Theorem 3.3 (regularity and positive deniteness on the lin-
earized strongly active constraints), are satised at all points on the curve v, by
choosing 0 suitably small. Note that the set Ḡ of strongly active constraints on the
curve (w ∗ (t), λ∗ (t), µ∗ (t)), t ∈ (0, 0), comprises always the set G̃s of strongly active
∗ ∗ ∗
constraints at the point (w (0), λ (0), µ (0)). As the Hessian is positive denite on the null
s
space of the linearized constraints G̃ , it is also positive denite on the null space of the
∗ ∗ ∗
linearized strongly active constraints at a point (w (t), λ (t), µ (t)), which is a subspace.
Appendix D
We will prove Theorem 5.3 in two steps: rst it is shown that the assumptions of The-
∗
orem 5.1 are met and that the iterates therefore converge towards a KKT point y , and
secondly it is shown that this point also satises the sucient conditions of optimality as
stated in Theorem 3.3.
Using the inversion formula (5.17)
from Lemma 5.2 and the bounds (5.20a), (5.20b), and (5.20c), a bound on the norm of the
−1
inverse of J on the domain D can be established:
J(y1 )−1 ≤ βC1 βA βC1 + βC2 = β < ∞, ∀ y1 ∈ D.
−1
From continuity of J(y), J(y) is continuous on D . Using the denition (5.7) of J and
∂R
the full form of as shown in Eq. (5.6), we can conclude with assumption (5.20e) that
∂y
∂R ∂ 2
L κ
J(y2 ) − (y2 ) =A(y2 ) − (y ) ≤ , ∀ y2 ∈ D,
∂y ∂(q, s)2
2 β
and therefore that the rst condition (5.13a) of Theorem 5.1 is satised:
J(y1 )−1 J(y2 ) − ∂R (y2 ) ≤ κ < 1, ∀ y1 , y2 ∈ D.
∂y
Assumption (5.20d) ensures that condition (5.13b) of Theorem 5.1 is also satised:
J(y1 )−1 (J(y2 ) − J(y3 )) ≤ ωy2 − y3 , ∀ y1 , y2 , y3 ∈ D.
This allows to apply Theorem 5.1 to conclude that the iterates converge towards a point
y ∗ ∈ D0 ⊂ D which satises R(y ∗ ) = 0.
∗
To prove that this point y is not only a regular KKT point, but also satises the
sucient conditions of optimality according to Theorem 3.3, it suces to show that the
171
172 Proof of Theorem 5.3
2
Hessian matrix ∇(q,s) L(q ∗ , s∗ , λ∗ ) is positive denite on the null space of the linearized
constraints ∇(q,s) G(q ∗ , s∗ ). For this scope rst note that the null space of the linearized
constraints is spanned by the matrix
I
∂g
−1 ,
− ∂s
∂g
∂q
and therefore it only needs to be shown that the reduced exact Hessian
∂2L ∂2L T
∂g
−T ∂q 2 I
∂q∂s
∂g
−1
Are (y ∗ ) :=
T
I − ∂g
∂q ∂s
∂2L ∂2L
− ∂s
∂g
∂q
∂q∂s ∂s2
is positive denite. To show this, let us introduce the homotopy Aα : [0, 1] → R (nq ×nq )
so that
∂g
−T ∂ 2 L I
Aα − Ar = I − ∂g
T
α ∂(q,s)2 − A ∂g
−1
∂q ∂s − ∂s
∂g
∂q
κ ακ
≤ βC1 α βC1 ≤ .
βC1 βA βC1 + βC2 βA
−1
−1 −1
A−1
α = Ar − (Ar − Ar A−1
r Aα ) = I − (I − A−1
r Aα ) Ar
and
I − A−1 −1
r Aα = Ar (Ar − Aα )
≤ A−1
r Ar − Aα
ακ
≤ βA = ακ ≤ κ < 1.
βA
As A0 = Ar is positive denite and Aα remains invertible for all α ∈ [0, 1], none of the
eigenvalues of Aα can become negative on the way from α = 0 to α = 1, so that in
particular A1 = Are is positive denite.
Appendix E
For the rst step of the condensing approach that was introduced in Sec. 6.5, some matrix
products and sums have to be computed that involve the block sparse matrices B11 , B12 ,
B21 , B22 , A11 , A12 , and A22 , as dened in Sec. 6.5. We will show how the sparsity can be
exploited to perform these computations eciently.
−1 −1
The matrix M := −B11 B12 and the vector m := −B11 b1 can be calculated as follows.
Computing
and for j = 0, . . . , N − 1
The condensed Hessian matrix à := M T A11 M + M T A12 + AT12 M + A22 of the condensed
QP can be eciently computed if the structure of A and M is exploited. Computing
Ãss := N T
i=0 Xi|0 Qi Xi|0 ,
Ãs,j T
:= Xj|0 SjT + N T
Xk|0 Qk Yk|j , for j = 0, . . . , N,
N k=j+1 T
Ãi,i := Ri + k=i+1 Yk|i Qk Yk|i , for i = 0, . . . , N,
Ãi,j T T
:= Yj|i Sj + N T
k=j+1 Yk|i Qk Yk|j , for 0 ≤ i < j ≤ N,
Ã
i,N −1 := Ãi,N −1 + Ãi,N , for i = 0, . . . , N − 2,
173
174 The Recursive Condensing Technique
and Ã
s,N −1 := Ãs,N −1 + Ãs,N as well as Ã
N −1,N −1 := ÃN −1,N −1 + ÃN −1,N + ÃTN −1,N + ÃN,N ,
we can dene
Ãss Ãs,0 ··· Ãs,N −2 Ã
s,N −1
ÃTs,0 Ã0,0 ··· Ã0,N −2 Ã
0,N −1
. .. .
à := .. . .. .
T
Ãs,N −2 Ã0,N −2 · · ·
T
ÃN −2,N −2 Ã
N −2,N −1
T T T
Ã
s,N −1 Ã
0,N −1 · · · Ã
N −2,N −1 Ã
N −1,N −1
N
T
and for j = 0, . . . , N
T
N
T
and
ã
N −1 := ãN −1 + ãN .
c̃i = hi + Hix mi , C̃i := Hix Xi|0 |Hix Yi|0 | . . . |Hix Yi|i−1 |Hiq |0| . . . ,
c̃N = hN + HNx mN ,
+
[ABQ 99] F. Allgöwer, T. A. Badgwell, J. S. Qin, J. B. Rawlings, and S. J. Wright.
Nonlinear predictive control and moving horizon estimation An introductory
overview. In P. M. Frank, editor, Advances in Control, Highlights of ECC'99,
pages 391449. Springer, 1999.
+
[AFN 00] F. Allgöwer, R. Findeisen, Z. Nagy, M. Diehl, H.G. Bock, and J.P. Schlöder.
Ecient nonlinear model predictive control for large scale constrained pro-
cesses. In Proceedings of the Sixth International Conference on Methods and
Models in Automation and Robotics, pages 4354. Miedzyzdroje, Poland, 2000.
[Bau00] I. Bauer. Numerische Verfahren zur Lösung von Anfangswertaufgaben und zur
Generierung von ersten und zweiten Ableitungen mit Anwendungen bei Opti-
mierungsaufgaben in Chemie und Verfahrenstechnik. PhD thesis, University
of Heidelberg, 2000.
+
[BBB 01] T. Binder, L. Blank, H.G. Bock, R. Bulirsch, W. Dahmen, M. Diehl,
T. Kronseder, W.Marquardt, J.P. Schlöder, and O. v.Stryk. Introduction
to model based optimization of chemical processes on moving horizons. In
M. Groetschel, S.O. Krumke, and J. Rambau, editors, Online Optimization of
Large Scale Systems: State of the Art. Springer, 2001.
[BBLS99] H.G. Bock, I. Bauer, D.B. Leineweber, and J.P. Schlöder. Direct multiple
shooting methods for control and optimization of dae in chemical engineering.
In F. Keil, W. Mackens, H. Voÿ, and J. Werther, editors, Scientic Computing
in Chemical Engineering II, volume 2, pages 218, Berlin, 1999. Springer.
175
176 BIBLIOGRAPHY
[BDLS00] H.G. Bock, M. Diehl, D. Leineweber, and J.P. Schlöder. A direct multiple
shooting method for real-time optimization of nonlinear DAE processes. In
F. Allgöwer and A. Zheng, editors, Nonlinear Predictive Control, volume 26
of Progress in Systems Theory, pages 246267, Basel, 2000. Birkhäuser.
+
[BDS 00] H.G. Bock, M. Diehl, J.P. Schlöder, F. Allgöwer, R. Findeisen, and Z. Nagy.
Real-time optimization and nonlinear model predictive control of processes
governed by dierential-algebraic equations. In ADCHEM2000 - International
Symposium on Advanced Control of Chemical Processes, volume 2, pages 695
703, Pisa, 2000.
[BES88] H.G. Bock, E. Eich, and J.P. Schlöder. Numerical solution of constrained
least squares boundary value problems in dierential-algebraic equations. In
K. Strehmel, editor, Numerical Treatment of Dierential Equations. Teubner,
Leipzig, 1988.
[BH69] A. E. Bryson and Y.-C. Ho. Applied Optimal Control. Ginn and Company,
Waltham, Massachusetts, 1969.
[BP84] H.G. Bock and K.J. Plitt. A multiple shooting algorithm for direct solution
of optimal control problems. In Proc. 9th IFAC World Congress Budapest.
Pergamon Press, 1984.
[BS81] H.G. Bock and J.P. Schlöder. Numerical solution of retarded dierential equa-
tions with state-dependent time lags, volume 61. Z. angew. Math. Mech., 1981.
[BS96] D.P. Bertsekas and S.E. Shreve. Stochastic Optimal Control: The Discrete
Time Case. Athena Scientic, Belmont, MA, 1996.
[BS01] H.G. Bock and J.P. Schlöder. An ecient multiple shooting based reduced
sqp strategy for large-scale dynamic process optimization. Comp. Chem. Eng.,
2001. in preparation.
[CB89] J.E. Cuthrell and L.T. Biegler. Simultaneous optimization and solution me-
thods for batch reactor proles. Comp. & Chem. Eng., 13(1/2):4962, 1989.
[CSA97] H. Chen, C.W. Scherer, and F. Allgöwer. A game theoretic approach to non-
linear robust receding horizon control of constrained systems. In Proc. Amer.
Contr. Conf., pages 30733077, Albuquerque, 1997.
178 BIBLIOGRAPHY
[DBLS99] M. Diehl, H.G. Bock, D.B. Leineweber, and J.P. Schlöder. Ecient direct mul-
tiple shooting in nonlinear model predictive control. In F. Keil, W. Mackens,
H. Voÿ, and J. Werther, editors, Scientic Computing in Chemical Engineering
II, volume 2, pages 218227, Berlin, 1999. Springer.
+
[DBS 01] M. Diehl, H.G. Bock, J.P. Schloeder, R. Findeisen, Z. Nagy, and F. Allgoewer.
Real-time optimization and nonlinear model predictive control of processes
governed by dierential-algebraic equations. J. Proc. Contr., 2001.
[Die98] M. Diehl. A direct multiple shooting method for the optimization and control
of chemical processes. Master's thesis, University of Heidelberg, 1998.
[Die01] Angelika Dieses. Numerical methods for optimization problems in water ow
and reactive solute transport processes of xenobiotics in soils. Technical Report
SFB Preprint 2001-07, University of Heidelberg, 2001. Ph.D. Thesis.
[DR96] I. S. Du and J. K. Reid. The design of MA48: A code for the direct solution
of sparse unsymmetric linear systems of equations. ACM Trans. Math. Softw.,
22:187226, 1996.
+
[DUF 01] M. Diehl, I. Uslu, R. Findeisen, S. Schwarzkopf, F. Allgöwer, H.G. Bock,
T. Bürner, E.D. Gilles, A. Kienle, J.P. Schlöder, and E. Stein. Real-time
optimization of large scale process models: Nonlinear model predictive control
of a high purity distillation column. In M. Groetschel, S.O. Krumke, and
J. Rambau, editors, Online Optimization of Large Scale Systems: State of the
Art. Springer, 2001.
[DV93] J.J. Downs and E.F. Vogel. A plant-wide industrial process control problem.
Comp. & Chem. Eng., 17:245255, 1993.
[FA00] R. Findeisen and F. Allgöwer. Nonlinear model predictive control for index
one DAE systems. In F. Allgöwer and A. Zheng, editors, Nonlinear Predictive
Control, pages 145162. Birkhäuser, 2000.
+
[FAD 00] R. Findeisen, F. Allgöwer, M. Diehl, H.G. Bock, J.P. Schlöder, and Z. Nagy.
Ecient nonlinear model predictive control. submitted, 2000.
[JT61] P.D. Joseph and J.T. Tou. On linear control theory. Trans. AIEE, 80(18),
1961.
[Kal60] R.E. Kalman. A new approach to linear ltering and prediction problems.
Trans. ASME, J. Basic Engineering, pages 3545, March 1960.
[KE93] K.-U. Klatt and S. Engell. Rührkesselreaktor mit Parallel- und Folgereaktion.
In S. Engell, editor, Nichtlineare Regelung Methoden, Werkzeuge, Anwendun-
gen. VDI-Berichte Nr. 1026, pages 101108. VDI-Verlag, Düsseldorf, 1993.
[KEB87] P. Krämer-Eis and H.G. Bock. Numerical treatment of state and control
constraints in the computation of feedback laws for nonlinear control problems.
In P. Deuhard et al., editor, Large Scale Scientic Computing, pages 287306.
Birkhäuser, 1987.
[KM72] V. Klee and G.J. Minty. How good is the simplex algorithm? In O. Shisha,
editor, Inequalities, volume III, pages 159175. Academic Press, New York,
1972.
[KP90a] B. Kugelmann and H.J. Pesch. New general guidance method in constrained
optimal control, part 1: Numerical method. J. Optimization Theory and Ap-
plication, 67(3):421435, 1990.
[KP90b] B. Kugelmann and H.J. Pesch. New general guidance method in constrained
optimal control, part 2: Application to space shuttle guidance. J. Optimization
Theory and Application, 67(3):437446, 1990.
[KvSB01] T. Kronseder, O. von Stryk, and R. Bulirsch. Towards nonlinear model based
predictive optimal control of large-scale process models with application to air
BIBLIOGRAPHY 181
[LB89] W.C. Li and L.T. Biegler. Multistep, newton-type control strategies for con-
strained nonlinear processes. Chem. Eng. Res. Des., 67:562577, 1989.
[LBS97] D.B. Leineweber, H.G. Bock, and J.P. Schlöder. Fast direct methods for real-
time optimization of chemical processes. In Proc. 15th IMACS World Congress
on Scientic Computation, Modelling and Applied Mathematics Berlin, Berlin,
1997. Wissenschaft- und Technik-Verlag.
[Lei99] D.B. Leineweber. Ecient reduced SQP methods for the optimization of chem-
ical processes described by large sparse DAE models, volume 613 of Fortschr.-
Ber. VDI Reihe 3, Verfahrenstechnik. VDI Verlag, Düsseldorf, 1999.
[LEL92] M.J. Liebman, T.F. Edgar, and L.S. Lasdon. Ecient data reconciliation and
estimation for dynamic processes using nonlinear programming techniques.
Comp. & Chem. Eng., 16(10/11):963986, 1992.
[LM68] E.B. Lee and L. Markus. Foundations of Optimal Control Theory. Wiley, New
York, 1968.
[May00] D.Q. Mayne. Nonlinear model predictive control: Challenges and opportuni-
ties. In F. Allgöwer and A. Zheng, editors, Nonlinear Predictive Control, vol-
ume 26 of Progress in Systems Theory, pages 2344, Basel, 2000. Birkhäuser.
[ME96] K.R. Muske and T.F. Edgar. Nonlinear state estimation. In M.A. Henson
and D.E. Seborg, editors, Nonlinear Process Control, pages 311370. Prentice
Hall, 1996.
[MM90] D.Q. Mayne and H. Michalska. Receding horizon control of nonlinear systems.
IEEE Trans. Automat. Contr., 35(7):814824, 1990.
[MM93] H. Michalska and D.Q. Mayne. Robust receding horizon control of constrained
nonlinear systems. IEEE Trans. Automat. Contr., AC-38(11):16231633, 1993.
[Mor87] M. Morari. Robust process control. Chem. Eng. Res. Des., 65:462479, 1987.
+
[NFD 00] Z. Nagy, R. Findeisen, M. Diehl, F. Allgöwer, H.G. Bock, S. Agachi, J.P.
Schlöder, and D.B. Leineweber. Real-time feasibility of nonlinear predictive
control for large scale processes a case study. In Proc. of ACC 2000, Chicago,
2000. in press.
[OM94] S. de Oliveira and M. Morari. Robust model predictive control for nonlinear
systems. In Proc. 33rd IEEE Conf. Decision Contr., pages 35613566, Lake
Buena Vista, FL, December 1994. IEEE.
[PB93] C.C. Pantelides and P.I. Barton. Equation oriented dynamic simulation: Cur-
rent status and future perspectives. Comp. Chem. Eng., 17S:S263S285, 1993.
+
[PRG 97] L. Petzold, J.B. Rosen, P.E. Gill, L.O. Jay, and K. Park. Numerical optimal
control of parabolic PDEs using DASOPT. In Biegler, Coleman, Conn, and
Santosa, editors, Large Scale Optimization with Applications, Part II. Springer,
1997.
BIBLIOGRAPHY 183
[QB96] S.J. Qin and T.A. Badgwell. An overview of industrial model predictive control
technology. In J.C. Kantor, C.E. Garcia, and B. Carnahan, editors, Fifth
International Conference on Chemical Process Control CPC V, pages 232
256. American Institute of Chemical Engineers, 1996.
[QB00] S.J. Qin and T.A. Badgwell. An overview of nonlinear model predictive con-
trol applications. In F. Allgöwer and A. Zheng, editors, Nonlinear Predictive
Control, volume 26 of Progress in Systems Theory, pages 370392, Basel, 2000.
Birkhäuser.
+
[RBP 99] R. Ross, V. Bansal, J.D. Perkins, E.N. Pistikopoulos, J.M.G. van Schijndel,
and G.L.M. Koot. Optimal design and control of an industrial distillation
system. Comput. Chem. Eng., 23(SS):S875S878, 1999.
[RL91] O. Rosen and R. Luus. Evaluation of gradients for piecewise constant optimal
control. Comput. Chem. Engng, 15:273281, 1991.
[RMM94] J.B. Rawlings, E.S. Meadows, and K.R. Muske. Nonlinear model predictive
control: A tutorial and survey. In Proc. Int. Symp. Adv. Control of Chemical
Processes, ADCHEM, Kyoto, Japan, 1994.
[RR00] C.V. Rao and J.B. Rawlings. Nonlinear moving horizon state estimation. In
F. Allgöwer and A. Zheng, editors, Nonlinear Predictive Control, pages 4569.
Birkhäuser, 2000.
[RWR98] C.V. Rao, S.J. Wright, and J.B. Rawlings. Application of interior-point me-
thods to model predictive control. J. Opt. Theory and Appl., 99:723757,
1998.
+
[SAC 00] L. O. Santos, P. Afonso, J. Castro, N. M.C. de Oliveira, and L. T. Biegler.
On-line implementation of nonlinear MPC: An experimental case study. In
ADCHEM2000 - International Symposium on Advanced Control of Chemical
Processes, volume 2, pages 731736, Pisa, 2000.
[SBS98] V.H. Schulz, H.G. Bock, and M.C. Steinbach. Exploiting invariants in the
numerical solution of multipoint boundary value problems for daes. SIAM J.
Sci. Comp., 19:440467, 1998.
[Sch96] V.H. Schulz. Reduced SQP methods for large-scale optimal control problems in
DAE with application to path planning problems for satellite mounted robots,
volume 96-12 of IWR-Preprint. University of Heidelberg, 1996. Ph.D. thesis.
[Sim56] H.A. Simon. Dynamic programming under uncertainty with a quadratic cri-
terion function. Econometrica, 24:7481, 1956.
[Son90] E.D. Sontag. Mathematical Control Theory. Springer-Verlag, New York, 1990.
[Sor99] E. Sorensen. A cylic operating policy for batch distillation - theory and prac-
tice. Comput. Chem. Eng., 23 (4-5):533542, 1999.
[Ste95] M.C. Steinbach. Fast recursive SQP methods for large-scale optimal control
problems. Ph.d. thesis, University of Heidelberg, 1995.
[THE75] T.H. Tsang, D.M. Himmelblau, and T.F. Edgar. Optimal control via colloca-
tion and non-linear programming. Int. J. Control, 1975.
[VSP94a] V.S. Vassiliadis, R.W.H. Sargent, and C.C. Pantelides. Solution of a class
of multistage dynamic optimization problems. 1. problems without path con-
straints. Ind. Eng. Chem. Res., 10(33):21112122, 1994.
BIBLIOGRAPHY 185
[VSP94b] V.S. Vassiliadis, R.W.H. Sargent, and C.C. Pantelides. Solution of a class of
multistage dynamic optimization problems. 2. problems with path constraints.
Ind. Eng. Chem. Res., 10(33):21222133, 1994.
[YP93] T. H. Yang and E. Polak. Moving horizon control of nonlinear systems with
input saturation, disturbances and plant uncertainty. Int. J. Contr., 58(4):875
903, 1993.
[ZDG96] K. Zhou, J.C. Doyle, and K. Glover. Robust and optimal control. Prentice-Hall,
1996.