Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
2007/11/16
DFG Research Center MATHEONMathematics for key technologies
Index determination in DAEsusing AD techniques
Dagmar MonettHumboldt University Berlin
joint work with Andreas Griewank and René Lamour
6th European Workshop on Automatic DifferentiationINRIA Sophia-Antipolis, France
D. Monett: Index Determination in DAEs using AD techniques 2
MATHEON
MATHEON - Mathematics for key technologies: Modeling, simulation and optimization of real-world processes
MATHEON is a Research Centre funded by the DFGDFG: Deutsche Forschung Gemeinschaft (German Research Foundation)
MATHEON Total budget: 8,75 Million Euros per year
Since May 2002
D. Monett: Index Determination in DAEs using AD techniques 3
Motivation
Freie Universität BerlinInstitute of Mathematics and Computer Science
Humboldt-Universität zu BerlinInstitute of Mathematics and Institute of Computer Science
Technische Universität Berlin Host universityInstitute of Mathematics
Weierstraß Institute for Applied Analysis and Stochastics
Zuse Institute Berlin (ZIB)
MATHEON Supporting Institutions:
D. Monett: Index Determination in DAEs using AD techniques 4
Our Project
MATHEON Application Area:D: Circuit simulation and opto-electronic devices
Project:
D7: Numerical simulation of integrated circuits for future chip generations
Project Head:
Andreas Griewank
D. Monett: Index Determination in DAEs using AD techniques 5
Current tendencies
Current tendencies in the development of integrated circuitsIncreasing demand for multi-functional circuits on various fields of application (e.g. telecommunications, automotive industry)Miniaturization trends overcome existing
circuit design methodsEquivalent circuit models contain hundreds
of parametersComplete physical interpretation of the parameters is not possibleSurrounding circuitry influences the switching behavior of the devicesCircuit design with nanometer scale devices: the inclusion of semiconductor equations models directly into the circuit equations is preferable
D. Monett: Index Determination in DAEs using AD techniques 6
Coupled systems of DAEs and PDEs
Challenges, drawbacks
Refined modeling process of the coupling between circuit and device systems is requiredInnovative modeling concepts and a rigorous mathematical analysis are needed for the development of new simulation methods
Analysis and stable treatment of such systems may involve high order derivativesSolving methods may be both difficult numerically and highly complex depending on the system’s characteristics
Current algorithms for computing the tractability index of abstract DAEs need more accurate calculation of derivatives
D. Monett: Index Determination in DAEs using AD techniques 7
Index determination and consistent initialization
State of the art
The tractability index can be computed based on a matrix sequence with suitable chosen projectorsExistent algorithm for the index computation uses numerical differentiation
Consistent initialization is crucial for the numerically integration to be successful
D. Monett: Index Determination in DAEs using AD techniques 8
Index determination
DAEs given by the general equation:
Coefficients
with are continuous matrix functions
Well matched condition
If the coefficients and are well matched,then the DAE‘s leading term is stated properly.[R.März. The index of linear differential algebraic equations with properly stated leadingterms. Results Math. 42 (2002) 308-338]
D. Monett: Index Determination in DAEs using AD techniques 9
Index determination
Continuous matrix function sequence
where:projector function
projector function
reflexive generalized inverse of
reflexive generalized inverse of
and well matched
The projector fulfils
[R.Lamour. Index Determination and Calculation of Consistent Initial Values for DAEs. Computers and
Mathematics with Applications, 50:1125-1140, 2005]
D. Monett: Index Determination in DAEs using AD techniques 10
Index determination
Algorithm to realize the matrix sequenceCoefficients and are checked to be well matched
The suitable chosen projectors should satisfy
QR factorizations with column pivoting over matrices of Taylor polynomials help in the computation of both the reflexive generalized inverses and the projectors
The differentiations (approximations of the matrices , and ) are performed using easy-to-use drivers from the C++ package ADOL-C.
The time differentiations in the matrix sequence are computed via a shift operator over Taylor series
The matrix sequence is computed until the matrix is nonsingular
D. Monett: Index Determination in DAEs using AD techniques 11
AD using ADOL-C
daeIndexDet.cppExample1.h
adolc.lib
daeIndexDet.exe
indexdet.lib
matrixseq.h
daeIndexDet: A program for the index determination in DAEs
using the indexdet library and the ADOL-C package for Automatic Differentiation
D. Monett: Index Determination in DAEs using AD techniques 12
Other definitions
Trajectory:
Dynamic:
DAE:
D. Monett: Index Determination in DAEs using AD techniques 13
Example
Trajectory:
D. Monett: Index Determination in DAEs using AD techniques 14
Example
Trajectory:
D. Monett: Index Determination in DAEs using AD techniques 15
Example
Trajectory:
Dynamic:
DAE:
D. Monett: Index Determination in DAEs using AD techniques 16
AD using ADOL-C
User class
Globalparameters
daeIndexDet.cpp
problem dimensions, t0,x(t), d(x(t),t), f(z(t),x(t),t) with z(t)=d‘(x(t),t)
E.g. print out parameters,degree of Taylor coefficients
‘asectra‘active section and calculation of the
trajectory, x(t)
‘asecdyn‘active section and calculation of the dynamic, d(x(t),t)and ist derivative
z(t)=d‘(x(t),t) usingshift operator
‘asecdae‘active section and calculation of the DAE, f(z(t),x(t),t)
Constructmatrices
A, B, and D
tag 0forward mode
tag 1forward and
reverse modes
tag 2forward and
reverse modes
active and passive variables,initial Taylor coefficients of t
Taylor coefficients of independent (i.e., t)and dependent variables (i.e. x(t))
active and passive variables,initial Taylor coefficients of x(t) and t
Taylor coefficients of independent(i.e., t and x(t)) and dependent variables (i.e. d(x(t),t)) and adjoints
active and passive variables,initial Taylor coefficients of d‘(x(t),t), x(t) and t
Taylor coefficients of independent(i.e., d‘(x(t),t) and x(t)) and dependent variables (i.e. f(z(t),x(t),t)) and adjoints
ADOL-C
D. Monett: Index Determination in DAEs using AD techniques 17
Active section to compute the trajectory
User class
Globalparameters
daeIndexDet.cpp
problem dimensions, t0,x(t), d(x(t),t), f(z(t),x(t),t) with z(t)=d‘(x(t),t)
E.g. print out parameters,degree of Taylor coefficients
‘asectra‘active section and calculation of the
trajectory, x(t)
‘asecdyn‘active section and calculation of the dynamic, d(x(t),t)and ist derivative
z(t)=d‘(x(t),t) usingshift operator
‘asecdae‘active section and calculation of the DAE, f(z(t),x(t),t)
Constructmatrices
A, B, and D
tag 0forward mode
tag 1forward and
reverse modes
tag 2forward and
reverse modes
active and passive variables,initial Taylor coefficients of t
Taylor coefficients of independent (i.e., t)and dependent variables (i.e. x(t))
active and passive variables,initial Taylor coefficients of x(t) and t
Taylor coefficients of independent(i.e., t and x(t)) and dependent variables (i.e. d(x(t),t)) and adjoints
active and passive variables,initial Taylor coefficients of d‘(x(t),t), x(t) and t
Taylor coefficients of independent(i.e., d‘(x(t),t) and x(t)) and dependent variables (i.e. f(z(t),x(t),t)) and adjoints
ADOL-C
D. Monett: Index Determination in DAEs using AD techniques 18
Active section to compute the trajectory
Taylor coefficients of the independent variable :
Taylor coefficients of the dependent variable :
with initial values given by the user (E.g. ).
ADOL-Cforwardmode
D. Monett: Index Determination in DAEs using AD techniques 19
Active section to compute the dynamic
User class
Globalparameters
daeIndexDet.cpp
problem dimensions, t0,x(t), d(x(t),t), f(z(t),x(t),t) with z(t)=d‘(x(t),t)
E.g. print out parameters,degree of Taylor coefficients
‘asectra‘active section and calculation of the
trajectory, x(t)
‘asecdyn‘active section and calculation of the dynamic, d(x(t),t)and ist derivative
z(t)=d‘(x(t),t) usingshift operator
‘asecdae‘active section and calculation of the DAE, f(z(t),x(t),t)
Constructmatrices
A, B, and D
tag 0forward mode
tag 1forward and
reverse modes
tag 2forward and
reverse modes
active and passive variables,initial Taylor coefficients of t
Taylor coefficients of independent (i.e., t)and dependent variables (i.e. x(t))
active and passive variables,initial Taylor coefficients of x(t) and t
Taylor coefficients of independent(i.e., t and x(t)) and dependent variables (i.e. d(x(t),t)) and adjoints
active and passive variables,initial Taylor coefficients of d‘(x(t),t), x(t) and t
Taylor coefficients of independent(i.e., d‘(x(t),t) and x(t)) and dependent variables (i.e. f(z(t),x(t),t)) and adjoints
ADOL-C
D. Monett: Index Determination in DAEs using AD techniques 20
Active section to compute the dynamic
Taylor coefficients of the independent variables and :
with initial values
Taylor coefficients of the dependent variable :
ADOL-Cforwardmode
D. Monett: Index Determination in DAEs using AD techniques 21
Computing d’
How to compute ? Apply shift operator to !!
We know:
for a Taylor polynomial . Then
The matrix of adjoints is used to
compute the Jacobian matrix ADOL-Creverse mode
D. Monett: Index Determination in DAEs using AD techniques 22
Active section to compute the DAE
User class
Globalparameters
daeIndexDet.cpp
problem dimensions, t0,x(t), d(x(t),t), f(z(t),x(t),t) with z(t)=d‘(x(t),t)
E.g. print out parameters,degree of Taylor coefficients
‘asectra‘active section and calculation of the
trajectory, x(t)
‘asecdyn‘active section and calculation of the dynamic, d(x(t),t)and ist derivative
z(t)=d‘(x(t),t) usingshift operator
‘asecdae‘active section and calculation of the DAE, f(z(t),x(t),t)
Constructmatrices
A, B, and D
tag 0forward mode
tag 1forward and
reverse modes
tag 2forward and
reverse modes
active and passive variables,initial Taylor coefficients of t
Taylor coefficients of independent (i.e., t)and dependent variables (i.e. x(t))
active and passive variables,initial Taylor coefficients of x(t) and t
Taylor coefficients of independent(i.e., t and x(t)) and dependent variables (i.e. d(x(t),t)) and adjoints
active and passive variables,initial Taylor coefficients of d‘(x(t),t), x(t) and t
Taylor coefficients of independent(i.e., d‘(x(t),t) and x(t)) and dependent variables (i.e. f(z(t),x(t),t)) and adjoints
ADOL-C
D. Monett: Index Determination in DAEs using AD techniques 23
Active section to compute the DAE
Taylor coefficients of the independent variable
Taylor coefficients of the dependent variable
The matrix of adjoints is used to
compute the Jacobian matrix
ADOL-Cforwardmode
ADOL-Creverse mode
D. Monett: Index Determination in DAEs using AD techniques 24
Constructing matrices A, B, and D
User class
Globalparameters
daeIndexDet.cpp
problem dimensions, t0,x(t), d(x(t),t), f(z(t),x(t),t) with z(t)=d‘(x(t),t)
E.g. print out parameters,degree of Taylor coefficients
‘asectra‘active section and calculation of the
trajectory, x(t)
‘asecdyn‘active section and calculation of the dynamic, d(x(t),t)and ist derivative
z(t)=d‘(x(t),t) usingshift operator
‘asecdae‘active section and calculation of the DAE, f(z(t),x(t),t)
Constructmatrices
A, B, and D
tag 0forward mode
tag 1forward and
reverse modes
tag 2forward and
reverse modes
active and passive variables,initial Taylor coefficients of t
Taylor coefficients of independent (i.e., t)and dependent variables (i.e. x(t))
active and passive variables,initial Taylor coefficients of x(t) and t
Taylor coefficients of independent(i.e., t and x(t)) and dependent variables (i.e. d(x(t),t)) and adjoints
active and passive variables,initial Taylor coefficients of d‘(x(t),t), x(t) and t
Taylor coefficients of independent(i.e., d‘(x(t),t) and x(t)) and dependent variables (i.e. f(z(t),x(t),t)) and adjoints
ADOL-C
D. Monett: Index Determination in DAEs using AD techniques 25
Matrices A, B, and D
The Jacobian matrix has the form:
Then:
(from )
: Pointer to a vector of Taylor coefficients.
(from )
D. Monett: Index Determination in DAEs using AD techniques 26
Experiment: Computation timeElapsed running time by the program varying the number of Taylor
coefficients for the Hessenberg1 example(averages over 20 independent runs)
0
0,1
0,2
0,3
0,4
0,5
0,6
0,7
1 2 3 4 5 10 30 50 70 90 110 130 160 190 230 270 310
Nr. of Taylor coefficients
Elap
sed
runn
ing
time
(sec
)
Computation of derivatives by ADOL-C, as well as the running time of the algorithm that determines the index (for the Hessenberg example)
Overall computation time does not exceed a second (~500 Taylor coefficients)
Robustness: >10000 Taylor coefficients, computation time slightly greater than 6 minutes
Quadratic grow?
D. Monett: Index Determination in DAEs using AD techniques 27
Experiment: Memory requirementsTape sizes varying the number of Taylor coefficients
for the Hessenberg example
0
500
1000
1500
2000
2500
3000
3500
3 13 103 186 193 203 303 403 503 1003 5003 10003
Nr. of Taylor coefficients
Siz
e (K
B)
vs_tap vs_tape1 vs_tape2
Size of the tapes used by ADOL-C for evaluating the underlying functions and their derivatives
The size of a tape depends on the program code segment that is to be automatic differentiated
For a large number of Taylor coefficients the size of the tapes remains acceptable
D. Monett: Index Determination in DAEs using AD techniques 28
Project focus
Already achieved
Modification of the algorithm to calculate the index. Successfulapplication of AD for calculating all derivatives
More accurate results in academic and test examples from the literature were obtainedVery efficient runtime behavior of the algorithms that use AD for these test problems
Both algorithm performance and robustness successfully tested for thousands of Taylor coefficients
Development of new matrix-algebra operations to deal with AD (e.g. implementation of special matrix-matrix multiplications or QR decomposition of matrices of Taylor polynomials)
User friendly C++ implementation and related documentation of all used programs, headers, and classes
D. Monett: Index Determination in DAEs using AD techniques 29
Project focus
Short/long term next workProper extensions of the algorithm for consistent initialization
Extension of AD functionalities for these purposes
Comparison with the already existent algorithm for index determinationApplication to more complex (real) problems
Extended comparisons concerning accuracy
Comparison AD vs. other methods
D. Monett: Index Determination in DAEs using AD techniques 30
Index determination in DAEsusing AD techniques
Dagmar MonettHumboldt University [email protected]
6th European Workshop on Automatic DifferentiationINRIA Sophia-Antipolis, France