This document describes an improved direct multiple shooting approach combined with collocation and parallel computing to handle path constraints in dynamic nonlinear optimization problems. It combines direct multiple shooting with collocation discretization to transform the dynamic optimization problem into a nonlinear programming problem. The approach discretizes the time horizon into finite elements and applies collocation at the nodes. It then uses parallel computing to simulate each time interval independently. Case studies on controlling a Van der Pol oscillator and continuous stirred tank reactor are presented to demonstrate the method.
1. An Improved
Direct Multiple Shooting Approach
Combined with Collocation & Parallel Computing
to Handle Path Constraints in
Dynamic Nonlinear Optimization
Simulation and Optimal Processes (SOP) Group
Ilmenau University of Technology
Quoc Dong Vu & Pu Li
2. 2
Outline
• Dynamic Nonlinear Optimization and Direct
Multiple Shooting combined with Collocation
• Combined Approach DMS with Collocation
• Parallel computing
• Case studies
• Conclusions and future work
3. 3
Dynamic Nonlinear Optimization
, ,
0
0
min ( ), ( ), (1.a)
. . , ( ), ( ), 0 (1.b)
( ), ( ), 0 (1.c)
( ) (1.d)
( ) (1.e)
(1.f )
0 (1.g)
[ , ]
x u p
L U
L U
L U
f
x t u t p
s t F x x t u t p
G x t u t p
x x t x
u u t u
p p p
x x
t t t
F: vector of differential equations
G: vector of algebraic equations
x(t): state (dependent) variables
u(t): input (independent) variables
p: system parameters
x0: initial conditions of state variables
Constrained dynamic optimization problem:
4. 4
Nonlinear Dynamic
Optimization (DNO)
DMS scheme
Discretizing time horizon, parametrizing controls
and intial conditions on each subinterval.
Nonlinear Programing
Problem (NLP)
Direct Multiple Shooting (DMS)
t0 t1 t2 t3 t4=tf
u1
u0 u2 u3
x0
x0,1 x0,2 x0,3
p
uupper
xupper
ulower
xlower
t0 t1 t2 t3
u1
u0
u2
u3
x0
p
uupper
xupper
ulower
xlower
t4=tf
5. 5
Collocation on finite
elements (CFE):
Combined Approach DMS
with Collocation
0 0
1
, , 0
NC
j i j i i i
j
T t x t T t x t f x t u t t
ODE Solution:
0
0
( ) ( )
( )
NC
j i j
j
NC
k
j
j j k
j k
x T t x t
t t
T t
t t
• State trajectories
• Sensitivities computation
State path constraints
can be satisfied on inner
collocation points
6. are computed here
by simulation task
independently for
each time interval,
so parallel
computing is
applicable.
6
0
0
, ,
0
, 1,0
min ( , , ), , (2.a)
. . ( , , ), , 0 (2.b)
(2.c)
(2.d)
(2.e)
(2.f)
1,...,
NC:Numberof collocation points
NL: Numberof timeintervals
x u p
i
L U
L U
L U
i NC i
x x u p u p
s t c x x u p u p
x x x
u u u
p p p
x x
i NL
After discretization:
0
, , ,
dx dx dx
x
dx du dp
Path
constraints
handled for
all
collocation
points
Combined Approach using DMS
with Collocation
7. 7
SQP based optimization method
Solving model
equations with
Newton method
Calculation of
gradients
Middle stage
Lower stage
Optimization Layer
Simulation Layer
Value of
State variables
Gradients
IP based optimization method
Solving model
equations with
Newton method
(MS & collocation)
Calculation of
gradients
Optimization Layer
Simulation Layer
Values of
state
variables
Controls u, Parameters p
Initial x0
Combined Approach using DMS
with Collocation
8. 8
Simulation layer
• ci in each time interval is
independent from others,
so parallel programming
with MPI or/and
OpenMP can be applied.
• Employ Newton to solve model equations at each
time interval:
0
( , , ), , 0 (3)
1,..., ;
i
c x x u p u p
i NL
8
Combined Approach DMS
with Collocation
State path constraints
on inner collocation
points will be held.
t0 t1 t2 t3 t4=tf
x0
p
uupper
xupper
ulower
xlower
0
u 1
u 2
u 3
u
0,1
x 0,2
x 0,3
x
,0
NC
x ,1
NC
x ,2
NC
x ,3
NC
x
9. 9
Optimization layer:
9
0
0
, ,
, 1,0
min ( , , ), , (4.a)
(4.b)
(4.c)
(4.d)
(4.e)
1,...,
NC:Numberof collocation points
NL: Numberof timeintervals
x u p
L U
L U
L U
i NC i
x x u p u p
x x x
u u u
p p p
x x
i NL
Combined Approach DMS
with Collocation
at all collocation points
x
piecewise polynomials/constants
u
constants over time horizon
p
Continuity constraints
11. • Problem formulation:
3
2
1 2 1 2
2 1
2 2 2
3 1 2
1
min ( ) (5.a)
. . (1 ) (5.b)
(5.c)
(5.d)
( ) 0.5 (5.e)
0.3 ( ) 1.0 (5.f)
(0) [0, 1, 0] (5.g)
5.0 (5.h)
f
u
T
f
x t
s t x x x x u
x x
x x x u
x t
u t
x
t
11
Case studies:
control of Van der Pol Oscillator
* http://en.wikipedia.org/wiki/File:VanDerPolOscillator.png
Phase portrait of the
unforced Van der Pol
oscillator *
13. Case studies: Control of a CSTR
• Problem formulation:
13
2 2 2 2
1 1 2 2 1 1 2 2
,
0
0 1
1 2
0 0 2
2 0 2
2
1 3
0 0 3
3 0 2 2 3
2
1 3
1
min ( ) 100.0( ) 0.1( ) 0.1( ) (6.a)
. . (6.b)
exp( ) (6.c)
( ) 2
exp( ) ( )
0.5 2
(6
.
.d)
5 ; 0.87
f
t
s s s s
x u
p p
F x x x x u u u u dt
F u
s t x
r
F c x E
x k x
r x Rx
F T x H E U
x k x u x
r x C Rx r C
x m
2 3
1 2
1.0 / ; 290 350 ( )
85 115 / min ; 290 310 ( )
(0) [0.659, 0.877, 324.5] ( )
50.0(min)
6.e
6.f
6.g
f
x mol l x K
u l u K
x
t
* Source: http://upload.wikimedia.org/wikipedia/commons/thumb/b/be/Agitated_vessel.svg/408px-Agitated_vessel.svg.png
Cross-sectional
diagram of CSTR*
14. Case studies: CPU time
• CPU time:
14
CPU Time (ms)
Van der Pol Oscillator CSTR
without inner
point
constraints
with inner
point
constraints
with inner point
constraints
31 46
Serial Parallel
172 203
• CPU time with inner point constraints is longer
than the case without these constraints.
• CPU time with parallel computing in CSTR is
longer than serial case, since the time of data
transfer between threads is longer than
computing time.
15. 15
Errors-In-Variables (EIV) formulation:
0 ,0
-1
, , , -1
1 1 1
min (7.a)
. .
(7.b)
(7.c)
(7.d)
(7.e)
, , , , , 0
, , , 0
, , , 0
(7
j j j
T
M M
NS NS NK
j i j i y j i j i
j T
p u x y M M
j j i
j i j i u
j j j j j
j j j
j j
j i j i
L
j
j
U
j
y t y t W y t y t
F
u t u t W u t u t
s
f x t x t y t y t u t p
g x t y t u t p
h x t y t u t p
x t x
t
p p p
.f)
x(t): Unmeasured state variables
y(t): Measured state variables
yM (t), Measurements of output
uM (t): and input variables
h: Process restrictions
Wy,Wu: Known covariance matrices
NS: Number of data sets
NK: Number of measurement
points
Case studies:
parameter estimation problem
16. 16
Discretization with collocation on finite elements:
Note: It is assumed that the measurement points
coincide with the element positions.
, , , ,0 , , ,0
-1
, , ,0 , , , , ,0 , ,
, , , -1
1 1 1 1
, , ,
, , , , ,
, , , , ,
,
min (8.a)
, , (8.b
,
. ,
. )
0
, ,
j l j l i j l i
T
M M
NS NS NL NY
j l i j l i y j l i j l i
j j l i j l i j l
j j l i j l i
j T
p u x y M M
j j l i
j l
j l j l u j l j l
y y W y y
F F
u u W u u
g x y u p
h x
t
p
s
y u
(8.c)
(8.d)
wh
0
ere:
L U
j
j
j
p p p
f
g
g
Case studies:
parameter estimation problem
17. 1 1
2 2
3
1
1 1 1
1
1
2
2 2 2
2
2 1
3
3 3 3
3
3
3 2
4 1
1 4 1
4 1
5 2
1 5 2
5 2
6 3
1 6
5 3
(9.a)
1
(9.b)
1
(9.c)
1
(9.d)
(9.e)
ni na
ni na
ni na
V
G k G
Ka
P
Ki S
V
G k G
Ka
P
Ki M
V
G k G
Ka
P
Ki M
V G
E k E
K G
V G
E k E
K G
V G
E k E
K G
3
2 2 1 2
1 1 1
3
1
1
1 1 2
1 2 3 4
2 2 1 2 3 3 2
3 5
2
1 2 2
3 4 5 6
(9.f )
1
1
( )( )
( )( )
(9.g)
1 1
1 1
( )( ) ( )( )
(9.h)
1 1
kcat E M M
kcat E S M
Km
Km
M
M M M
S
Km Km Km Km
kcat E M M kcat E M P
Km Km
M
M M M P
Km Km Km Km
• The three-step
pathway parameters
estimation [3, 4]:
17
• 8 differential variables
of concentrations of
species in biochemical
reactions.
• 36 parameters need to
be estimated.
• 16 measured data
profiles.
Case studies:
parameter estimation problem
18. 18
AMIGO results DMS-COL results
Results with 36 parameters in high initials case:
Case studies:
parameter estimation problem
19. 19
Results with 36 parameters in low initials case:
AMIGO results DMS-COL results
Case studies:
parameter estimation problem
20. 20
The correlation matrix with 36 parameters (Source: AMIGO)
Case studies:
parameter estimation problem
22. 22
CPU time comparison
Case studies:
parameter estimation problem
CPU time (s)
AMIGO DMS-COL
Low High Low High
Serial Parallel Serial Parallel
20.9 19.3 51.6 44.5 IPOPT
48.7 8.8 196.8 24.7 Func.
146.8 127.9 69.6 28.1 248.4 69.2 Total
Intel Core i7-980, 6x 3.33GHz, 4GB RAM, Windows XP
23. Conclusions and future works
23
Conclusions
• The proposed DMS-COL method considers
state path constraints on inner collocation
points.
• Parallel computing efficiency depends on the
data transfer time between threads and
computing time of each thread.
Future works
• Study parallel computation with two stages.
• Test with more complicated examples.
24. Literature References
References
1. Bock, H. and Plitt, K. A multiple shooting algorithm for direct solution
of optimal control problems . In 9th IFAC World Congress, 1984,
242–247.
2. J. Tamimi and P. Li. A combined approach to nonlinear model
predictive control of fast systems, Journal of Process Control, 20,
2010, 1092-1102.
3. Eva Balsa-Canto and Julio R. Banga. AMIGO, a toolbox for
advanced model identification in systems biology using global
optimization. BIOINFORMATICS APPLICATIONS NOTE. Vol. 27 no.
16, 2011, 2311–2313.
4. Rodriguez-Fernandez M., Mendes P., Banga JR. A hybrid approach
for efficient and robust parameter estimation in biochemical pathways.
BioSystems, 83, 2006, 248-265.
24