Authors:
- Fredrik Magnusson, Department of Automatic Control, Lund University
- Karl Berntorp, Department of Automatic Control, Lund University
- Björn Olofsson, Department of Automatic Control, Lund University
- Johan Åkesson, Modelon AB, Sweden
Dynamic optimization problems involving differential-algebraic equation (DAE) systems are traditionally solved while retaining the semi-explicit or implicit form of the DAE. We instead consider symbolically transforming the DAE into an ordinary differential equation (ODE) before solving the optimization problem using a collocation method. We present a method for achieving this, which handles DAE-constrained optimization problems. The method is based on techniques commonly used in Modelica tools for simulation of DAE systems.
The method is evaluated on two industrially relevant benchmark problems. The first is about vehicle trajectory generation and the second involves startup of power plants. The problems are solved using both the DAE formulation and the ODE formulation and the performance of the two approaches is compared.
The ODE formulation is shown to have roughly three times shorter execution time. We also discuss benefits and drawbacks of the two approaches.
Full text at: http://lup.lub.lu.se/luur/download?func=downloadFile&recordOId=4222337&fileOId=4253325
complete construction, environmental and economics information of biomass com...
Symbolic Transformations Reduce Size and Solve Time of Dynamic Optimization Problems
1. Symbolic Transformations of
Dynamic Optimization Problems
Fredrik Magnusson
Karl Berntorp, Björn Olofsson, and Johan Åkesson
Department of Automatic Control
Faculty of Engineering
Lund University, Sweden
March 12, 2014
2. Introduction
Optimization problems involving differential-algebraic
equation (DAE) systems traditionally solved retaining DAE
Consider instead symbolically transforming the DAE into
an ODE before solving the problem
Will discuss how and why, and present case studies
1 / 17
3. Dynamic optimization
Optimal control
Design optimization
Parameter estimation
State estimation
In practice quite different problems, but solution techniques can
be very similar.
2 / 17
4. JModelica.org
Developed in Lund, Sweden at Modelon AB and Lund
University
Targets both simulation and optimization
Optimica for optimization formulations
3 / 17
5. System dynamics notation
System dynamics modeled by a differential algebraic equation
(DAE) system of the form
F(t, ˙x(t),x(t), y(t),u(t), p) = 0.
t ∈ [t0,tf ] is time (endpoints free or fixed, but always finite)
x is vector of state variables
y is vector of algebraic variables
u is vector of control variables
p is vector of free parameters
DAE system is assumed to be of index one
4 / 17
6. Objective function and constraints
We want to minimize
tf
t0
L(τ, ˙x(τ),x(τ), y(τ),u(τ), p)dτ
while satisfying the DAE system and the constraints
he(t, ˙x(t),x(t), y(t),u(t), p) = 0,
hi(t, ˙x(t),x(t), y(t),u(t), p) ≤ 0,
∀t ∈ [t0,tf ].
5 / 17
7. Dynamic optimization problem
The result is the DAE-constrained optimization problem
minimize
tf
t0
L(τ, ˙x(τ),x(τ), y(τ),u(τ), p)dτ,
with respect to t0,tf , ˙x(t),x(t), y(t),u(t), p,
subject to F(t, ˙x(t),x(t), y(t),u(t), p) = 0,
x(t0) = 0,
he(t, ˙x(t),x(t), y(t),u(t), p) = 0,
hi(t, ˙x(t),x(t), y(t),u(t), p) ≤ 0,
∀t ∈ [t0,tf ].
6 / 17
8. Symbolic transformation
Instead of solving the DAE-constrained optimization
problem, transform it to an ODE-constrained problem
before solving
Achieved by eliminating algebraic variables through
causalization
Main benefit is reduced number of equations and variables
Main drawback is increased equation complexity
7 / 17
9. Dynamic optimization problem
The result is the
ODE
DAE-constrained optimization problem
minimize
tf
t0
L(τ, ˙x(τ),x(τ), y(τ),u(τ), p)dτ,
with respect to t0,tf , ˙x(t),x(t), y(t),u(t), p,
subject to F(t, ˙x,x, y,u, p) = 0, ˙x = f (t,x,u, p),
x(t0) = 0,
he(t, ˙x(t),x(t), y(t),u(t), p) = 0,
hi(t, ˙x(t),x(t), y(t),u(t), p) ≤ 0,
∀t ∈ [t0,tf ].
8 / 17
10. Causalization
Main step is DAE causalization
Permute variables and equations to get a block-lower
triangular (BLT) form of the DAE incidence matrix:
˙x1 y3 y1 ˙x2 y2
F2 ∗ 0 0 0 0
F4 ∗ ∗ ∗ 0 0
F1 0 ∗ ∗ 0 0
F5 0 0 ∗ ∗ 0
F3 ∗ ∗ 0 ∗ ∗
Solve for ˙x and y, symbolically or iteratively
9 / 17
11. Causalization cont.
We assume that all equation systems can be solved
symbolically (no algebraic loops)
The result is functions f and such that
˙x = f (t,x,u, p),
y = (t,x,u, p).
f is used to replace the DAE with an ODE
is inlined to eliminate y
10 / 17
12. Method properties
Less optimization variables, more complex expressions
Less sparse system, but minor issue when using e.g. local
collocation to solve optimization problem
Robustness with respect to trivial algebraic equation
modifications
Generalization is to only eliminate the algebraic variables
which can be solved for symbolically
11 / 17
13. Benchmark
Comparison of solving the original and transformed
problem using direct local collocation
Two case studies: optimal vehicle trajectory generation
and power plant startup
12 / 17
14. Vehicle trajectory generation
Generate trajectories minimizing duration of hairpin turn
Two chassis models: double and single track (DT & ST)
Two tire force models: friction ellipse and weighting
functions (FE & WF)
4 different models. Most complex has 21 states, 56
algebraic variables and 3 control variables.
Atypical Modelica model; flat implementation
13 / 17
15. Power plant startup
Optimize startup of combined cycle power plant
Model has 10 states, 128 algebraic variables and 1 control
variable.
Control variable is steam turbine load
Typical Modelica model; component-based
14 / 17
17. Conclusion
The transformation drastically reduces the size of the
problem
Reduced solution time, between 2 and 4 times for
considered cases
Especially useful for models involving a lot of simple
equations, as is typical for Modelica models
Seems to be beneficial also for atypical Modelica models,
despite lack of attention outside of the Modelica community
16 / 17