International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Direct (FDTO) Versus Indirect (FOTD) Methodsin Real-Life Applications of PDE Optimal Control:
Load Changes for Fuel Cells
Hans Josef Peschjointly with
Armin Rund, Kurt Chudej, Johanna Kerler, Kati Sternberg
Chair of Mathematics in Engineering SciencesUniversity of Bayreuth, Bayreuth, Germany
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Motivation: Optimal load changes for fuel cell systems
Molten Carbonate Fuel Cell
cellstack
Hotmodule[MTU CFC Solutions, IPF Berndt]
2002-2005
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
catalyticburner
mixeranode
anode inlet
cathode inlet
anode exhaust
cathodeexhaust
exhaust air inletrecirculation
cathode
2D cross-flow design
CO32-
solid
Motivation: Optimal load changes for fuel cell systems
28 quasi-linear partial integro-differential-algebraic equations with non-standard non-linear boundary conditions
[Sundmacher][Heidebrecht]
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Outline
A glimpse on the theory
A glimpse on the numerics
Direct and indirect solution: MCFC
Conclusions
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Outline
A glimpse on the theory
A glimpse on the numerics
Direct and indirect solution: MCFC
Conclusions
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
subject to
An example: Optimal stationary temperature distribution
Elliptic optimal control problemwith distributed control
Necessary conditions
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
with linear and continuous solution operatorsubject to
An example: Optimal stationary temperature distribution
Elliptic optimal control problemwith distributed control
Optimization problem in Hilbert space
Necessary conditions
Necessary condition: variational inequality
bilinear form linear form
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Necessary condition: variational inequality
Optimization problem in Hilbert space
Necessary conditions
adjoint operator
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Description with the adjoint solution operator
Necessary conditions
Description with the adjoint state
adjoint state pointwiseevaluation
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
The formal Lagrange technique
Defining the Lagrange function and twice formal integration by parts
Differentiation in the direction of , resp.
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Optimality system: semi-linear elliptic, distributed + boundary control
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Outline
A glimpse on the theory
A glimpse on the numerics
Direct and indirect solution: MCFC
Conclusions
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Methods for PDE constrained optimization
The general problem
The aims
concepts for real-life application
small constanteffort of simulation
effort of optimization
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
capture as much structure
of ( P )as possibleon discrete
level( Ph )
First Discretize then Optimize vs. First Optimize then Discretize
First discretize then optimize (FDTO) or DIRECT
First optimize then discretize (FOTD) or INDIRECT
Questions
appropriate choice of and ansatz for ?
appropriate choice of and ansatz for ?
appropriate ansatz for adjoint variables and multipliers?
Solvelarge scale
NLP
Solvecoupled PDE
system
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
First Discretize then Optimize vs. First Optimize then Discretize
First discretize then optimze (FDTO):replace all quantities of the infinite dimensional optimization problemby finite dimensional substitutes and solve an NLP
First optimze then discretize (FOTD):Derive optimality conditions of the infinite dimensional system,discretize the optimality system and find solution of the discretizedoptimality system
In general
Ideal: discrete concept for which both approaches commuteDiscontinuous Galerkin methods
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Outline
A glimpse on the theory
A glimpse on the numerics
Direct and indirect solution: MCFC
Modelling aspects
FDTO_2D
FDTO_1D
FOTD_1D
Conclusions
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Modelling aspectsand
the Engineering approachFDTO_2D
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
catalyticburner
mixeranode
solid
anode inlet
cathode inlet
anode exhaust
cathodeexhaust
exhaust air inletrecirculation
cathode
Configuration and function of MCFC
2D cross-flow design
controllable
controllable
controllable
load changesinput
boundary conditionsby ODAE
slow
statevariable
fastvery fastalgebraic
[Heidebrecht] [Sundmacher]
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
0 0.1 1.1 11.1 111.1 1111.1
using control
optimal controlsimulation
0.8 sec
0 0.1 1.1 11.1 111.1 1111.1scaled time
using controls
optimal controlsimulation
0.4 sec
scaled time
cell voltage 0.7 0.6for a load change
[Sternberg]
Optimal load changes. Computation by FDTO_2D
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
anode gas temperature cathode gas temperature
[2.8 ≈ 560 °C]
[3.2 ≈ 680 °C]
Numerical results: simulation of load change (FDTO_2D)
reforming reactions are endothermicoxidation reaction is exothermic
reduction reaction is endothermic
flow directions
[Chudej, Sternberg]
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
[2.8 ≈ 560 °C]
[3.2 ≈ 680 °C]
solid temperature
Numerical results: simulation of load change (FDTO_2D)
flow directionsin anode
and cathode
[Chudej, Sternberg]
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
with
Pareto performance index:
Numerical results: optimal control of fast load change (FDTO_2D)while temperature gradients stay small
fast
slow
on
on
0.7 0.6
instead of state constraint
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Modelling aspectsand
the Engineering approachFDTO_1D
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
O2
N2
U
e-
CO32-
H2 + CO32- H2O + CO2 + 2e-
CO + CO32- 2CO2 + 2e-
½O2 + CO2 + 2e- CO32-
CH4 + H2O CO + 3H2
CO + H2O CO2 + H2
CH4
H2O
Cathode
Anode
Elektrolyte
Mixer
Catalyticburner
Anode gas channel
Cathode gas channel
Recirculation
Exhaust
1D counter-flow design
Air inlet
Reforming reactionCH4 + 2 H2O CO2 + 4 H2
Configuration of MCFC for 1D counter-flow design
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
O2
N2
U
e-
CO32-
H2 + CO32- H2O + CO2 + 2e-
CO + CO32- 2CO2 + 2e-
½O2 + CO2 + 2e- CO32-
CH4 + H2O CO + 3H2
CO + H2O CO2 + H2
Cathode
Elektrolyte
CH4
H2O
Anode
Anode gas channel
Cathode gas channel
Configuration and function of MCFC
Recirculation
Exhaust
Mixer
Catalyticburner
Oxidation reaction
1D counter-flow design
Air inlet
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
U
e-
CO32-
O2
N2
½O2 + CO2 + 2e- CO32-
CH4 + H2O CO + 3H2
CO + H2O CO2 + H2H2 + CO3
2- H2O + CO2 + 2e-
CO + CO32- 2CO2 + 2e-
CH4
H2O
Cathode
Anode
Elektrolyte
Mixer
Catalyticburner
Anode gas channel
Cathode gas channel
Recirculation
Exhaust
Reduction reaction
1D counter-flow design
Air inlet
Configuration of MCFC for 1D counter-flow design
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
U
e-
O2
N2
½O2 + CO2 + 2e- CO32-
CH4 + H2O CO + 3H2
CO + H2O CO2 + H2H2 + CO3
2- H2O + CO2 + 2e-
CO + CO32- 2CO2 + 2e-
CH4
H2O
Cathode
Anode
Elektrolyte
Mixer
Catalyticburner
Anode gas channel
Cathode gas channel
Recirculation
Exhaust
1D counter-flow design
Air inlet
CO32-
Configuration of MCFC for 1D counter-flow design
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
U
e-
O2
N2
½O2 + CO2 + 2e- CO32-
CH4 + H2O CO + 3H2
CO + H2O CO2 + H2H2 + CO3
2- H2O + CO2 + 2e-
CO + CO32- 2CO2 + 2e-
CH4
H2O
Cathode
Anode
Elektrolyte
Mixer
Catalyticburner
Anode gas channel
Cathode gas channel
Recirculation
Exhaust
Reactant
1D counter-flow design
Air inlet
Fuel gas
CO32-
Configuration of MCFC for 1D counter-flow design
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
CO32-
O2
N2
½O2 + CO2 + 2e- CO32-
CH4 + H2O CO + 3H2
CO + H2O CO2 + H2H2 + CO3
2- H2O + CO2 + 2e-
CO + CO32- 2CO2 + 2e-
U
e-
Recirculation
Exhaust
CH4
H2O
Cathode
Anode
Elektrolyte
Mixer
Catalyticburner
Anode gas channel
Cathode gas channel
only ions can movethrough electrolyte
German Federal Pollution Control Act: Air
1D counter-flow design
Air inlet
Configuration of MCFC for 1D counter-flow design
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
1D counter-flow design
CO32-
O2
N2
½O2 + CO2 + 2e- CO32-
CH4 + H2O CO + 3H2
CO + H2O CO2 + H2H2 + CO3
2- H2O + CO2 + 2e-
CO + CO32- 2CO2 + 2e-
U
e-
Recirculation
Exhaust
CH4
H2O
Cathode
Anode
Elektrolyte
Mixer
Catalyticburner
Anode gas channel
Cathode gas channel
Air inlet
Configuration of MCFC for 1D counter-flow design
controls
4
2
1
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Numerical approach (fact sheet)
• States: smooth in space direction, but high gradients in time: semi-discretization in space (N fixed grid points) upwind formulas to preserve the conservation laws adaptive time steps large scale index 1 DAE system fully implicit multistep variable order method ode15s (MATLAB) with simplified Newton method for the non-linear systems and Jacobian by automatic differentiation numerical differentiation of gradient for optimization (Quasi-Newton) • Choice of consistent initial data by computing stationary initial values by a multi-level discretization (from coarse to fine grids)
State solver (equivalent to the reduced problem)
Numerical optimization via FDTO_1D (Method 1: semi-discretization)
[Rund]
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Numerical simulation of a load change (state solver)
zoom
[Rund]
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Numerical optimization via FDTO_1D (Method 1: semi-discretization)
anode cathode solid
temperatures
molar fraction H2O 4 major controls cell voltage
uncontrolled
controlled
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
The Engineering approachFDTO_1D
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Numerical optimization via FDTO_1D (Method 2: full-discretization)
Numerical approach (fact sheet)• States: semi-discretization in space (N fixed grid points) upwind formulas to preserve the conservation laws fixed time steps on a logarithmic grid: implicit Euler huge scale index 1 DAE system trajectories are not absolutely continuous functions
automatic differentiation of gradient for optimization (AMPL+IPOPT)
state constraints • Choice of consistent initial data by computing stationary initial values in the entire space-time cylinder
State solver (equivalent to the non-reduced problem)
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Numerical optimization via FDTO_1D (Method 2: full-discretization)
molar flow density
molar flow density
solid temperature
capability of handlingstate constraints
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
How to apply adjoint-based methods on real-life problems?
FOTD_1D
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
The equations: gas channels and solid
molar fractions
gas temperature
solid temperature
molar flow densities
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
The equations: burner and mixer
The catalytic burneris fed by the anode and cathode outlet
The mixer is described by a system of ODAE
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
The equations: potential fields
currents current densities
cell voltage
potentials
input datafor load changes
plus appropriate initial and boundary conditions for all equations
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
• Assumption on existence of multipliers of sufficient regularity formal Lagrange technique (67 multipliers) • Derivation of directional derivatives partial integration, differentiation symbolic or automatic differentiation of source terms
• Variational argument structure of adjoint system (type of PDE/ODE/DAE preserved) partial derivatives of states in source terms due to quasilinearity ODEs with spatial integrals in right hand sides Coupled staggered system of variational inequalities to determine optimal control laws no projection formulae, but gradient of objective function (for gradient or Newton method)
Necessary conditions (fact sheet)
[Rund]
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Lagrangianhy
perb
olic
eqs
.
para
bolic
eqs
.
alge
brai
c an
d
diff
eren
tial-
alge
brai
c eq
s.
ordi
nary
inte
gr-
diff
eren
tial e
qs.
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Necessary conditions (summary)
Adjoint state solver
control
control
BC
OUT
OUTcontrol
control
BC
BC
BC
OUT
AE
PDE
PDE
PDE
PDE
PDE
PDE OUT
AE
DAE
DAE
anode
anode
cathode
cathode
burner
burner
mixer
mixerbyvariationalinequalities
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Numerical solution via FOTD_1D
Numerical methodology for optimization (fact sheet)
• Backward sweep method: staggered solution of optimality system efficient for many time steps (different time scales) good initial guesses for non-linear solver drawback: inferior convergence properties
• Choice of iterative method: Quasi-Newton (use gradient) superlinear convergence no second derivatives
• SQP methods are hardly applicable (2nd order information required)
[Rund]
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Numerical results via FOTD_1D
[Rund]
load change after 0.1. sec
regularization:
41 lines in space
767 time steps
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Conclusion (FDTO-semi / FDTO-full / FOTD)
FDTO-semi
FDTO-full
FOTD
hu
man
re
sou
rces
alg
ori
thm
ic
effi
cien
y
reli
abli
ty
accu
racy
1D
application of ADonly for implicit solver
2D FDTO-semi 2D is a challengein any case
application of ADstate constraints
application of AD state constraints
miscellaneous
_
. .
. . +
+
+ +
+
+
+
_ _
_
_
_
?
. .
. . . .
. .
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
The Fuel Cell Team
Prof. Kai Sundmacher Dr.-Ing.h.c. Joachim Berndt Dr.-Ing. Peter Heidebrecht
Prof. Kurt Chudej Dr. Kati Sternberg
Prof. Michael Mangold†
Dr. Armin Rund Johanna Kerler
International Symposium on Mathematical ProgrammingAugust 20-24, 2012, Berlin, Germany
Thank you for your attention