Tải bản đầy đủ (.pdf) (39 trang)

05 interval tools for ODEs and DAEs swim08 nedialkov

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (257.05 KB, 39 trang )

Interval Tools for ODEs and DAE s
Ned Nedialkov
Department of Computing and Software
McMaster University, Hamilton, Ontario
Canada
SWIM 2008
Montpellier, France
19 June 2008
Outline
Interval me thods for IVP ODEs
The initial value problem
Software
Applications
Theory
The VNODE-LP solver
Motivation
Overview
Performance
On solving DAEs
Pryce’s structural analysis
Work to date
Conclusion
1
The IVP Problem
We conside r the IVP
y

(t) = f(y), y(t
0
) = y
0


, y ∈ R
n
, t ∈ R
The initial condition can be in an interval vector, y
0
∈ y
0
We denote the solution by y(t; t
0
, y
0
)
y(t; t
0
, y
0
)
t
0
t
2
y
y
2
y
3
y
1
t
1

t
3
t
y
0
Denote
y(t; t
0
, y
0
) =

y(t; t
0
, y
0
) | y
0
∈ y
0

Compute y
j
such that
y(t
j
; t
0
, y
0

) ⊆ y
j
at points
t
0
< t
1
< t
2
< · · · < t
N
= t
end
2
Software
package year author(s) language avai l .
AWA 1988 R. Lohner Pascal-XSC 
ADIODES 1997 O. Stauning C++ 
COSY 1997 M. Berz, K. Makino Fortran 
C++ interface 
VNODE 2001 N. Nedialkov C++ 
VODESIA 2003 S. Dietrich Fortran-XSC
VSPODE 2005 Y. Lin, M. Stadtherr C++
ValEncIA-IVP 2005 V. Rauh, E. Auer C++ 
VNODE-LP 2006 N. Nedialkov C++ 
The automatic differentiation (AD) packages TADIFF and FADBAD, and
now
FADBAD++ (O. Stauning, C. Bendtsen) , are instrumental in
VNODE, VSPODE, ValEncIA-IVP, and VNOD E-LP
3

Applications
Long-term stability of particle accelerators (1998–) M. Berz, K. Makino
Rigorous shadowing (2001) W. Hayes
Computing eigenvalue bounds (2003) B. M. Brown, M. Langer, M. Marletta,
C. Tretter, M. Wagenhofer
Multibody simulations (2004) E. Auer, A. Kec skem´ethy, M. T¨andl, H.
Traczinski
Reliable surface intersection (2004) H. Mukundan, K. H. Ko, T. Maekawa,
T. Sakkalis, N. M. Patrikalakis
Parameter and state estimation (2004) M. Kieffer, E. Walter;
(2005) N. Ramdani, N. Meslem, T. Ra¨ıssi, Y. Candau
Robust evaluation of differential geometry properties (2005) Chih-kuo Lee
Chemical engineering (2005) Lin, Stadtherr
Rigorous parameter reconstruction for differential equations with noisy data
(2007) Johnson, Tucker
. . .
4
Theory
One step of a “traditional” method
Suppose that we have computed y
j
at t
j
such that
y(t
j
; t
0
, y
0

) ⊆ y
j
y
t
tight bounds
a priori bounds
Algorithm I validates existenc e
and uniqueness and c ompu tes an
a priori enclosure

y
j
such that
y(t; t
j
, y
j
) ⊆

y
j
for all t ∈ [t
j
, t
j+1
]
Algorithm II compute s a tighter
enclosure
y
j+1



y
j
5
Taylor coefficients
Denote
f
[0]
(y) = y
f
[i]
(y) =
1
i

∂f
[i−1]
∂y
f

(y), for i ≥ 1
Given the IVP
y

(t) = f(y), y(t
j
) = y
j
,

the ith Taylor coefficient (TC) of y(t) at t
j
satisfies
y
(i)
(t
j
)
i!
= f
[i]
(y
j
)
We require at most O(k
2
) work to compute f
[1]
(y
j
), f
[2]
(y
j
), . . . , f
[k]
(y
j
)
Given stepsize h, one can generate scaled TCs, i.e. h

i
f
[i]
(y
j
)
6
Computing a priori bounds
High-Order Enclosure (HOE) method (NN, Jackson & Pryce)
Main result: If y
j
∈ int(

y
j
) and
y
j
+
k−1

i=1
(t − t
j
)
i
f
[i]
(y
j

) + (t − t
j
)
k
f
[k]
(

y
j
) ⊆

y
j
for all t ∈ [t
j
, t
j+1
] and all y
j
∈ y
j
, then
y(t; t
j
, y
j
) ∈ y
j
+

k−1

i=1
(t − t
j
)
i
f
[i]
(y
j
) + (t − t
j
)
k
f
[k]
(

y
j
)
for all t ∈ [t
j
, t
j+1
] and all y
j
∈ y
j

When k = 1, we obtain the method in AWA, but it restricts the stepsizes
similarly to Euler’s method
7
Computing tight bounds
Interval Taylor Series (ITS) Method
Using

y
j
, compute a tighter enclosure y
j+1
:
y(t
j+1
; t
0
, y
0
) ⊆ y
j+1
Basic approach: Taylor series + remainder term
We can compute
y
j+1
=
k−1

i=0
h
i

j
f
[i]
(
y
j
) + h
k
j
f
[k]
(

y
j
),
but the width is
w(y
j+1
) ≥ w(y
j
), and usu al l y w(y
j+1
) > w(y
j
),
even if the solutions are contracting (“naive” me thod)
8
Use the mean-value evaluation: for any y
j

, y
j
∈ y
j
,
k−1

i=0
h
i
j
f
[i]
(y
j
) + h
k
j
f
[k]
(

y
j
)

k−1

i=0
h

i
j
f
[i]
(y
j
) + h
k
j
f
[k]
(

y
j
) +

k−1

i=0
h
i
j
∂f
[i]
∂y
(y
j
)


(y
j
− y
j
)
=:
y
j+1
= u
j+1
+ z
j+1
+ S
j
(y
j
− y
j
)
y
j+1
by
j
t
j
t
j+1
t
True solutions
u

j+1
+ z
j+1
y
j
Can follow contracting solutions, but wrapping effect
9
Wrapping effect
{ r | r ∈ r }
Sr
{ Sr | r ∈ r }
{ Sr | r ∈ r }
{ Sr | r ∈ r }
10
Reducing the wrapping effect
On each step, represent the enclosure in the form
y
j
∈ { y
j
+ A
j
r
j
| r
j
∈ r
j
}, A
j

∈ R
n×n
nonsingular
Instead of computing
y
j+1
= u
j+1
+ z
j+1
+
S
j
(y
j
− y
j
),
compute
y
j+1
= u
j+1
+ z
j+1
+ (S
j
A
j
)r

j
r
j+1
=

A
−1
j+1
(S
j
A
j
)

r
j
+ A
−1
j+1

z
j+1
− m(z
j+1
)

,
where r
0
= y

0
− y
0
, A
0
= I, m(·) is midpoint
How to select A
j+1
?
11
The Parallelepiped Method
A
j+1
= m(S
j
A
j
)
The A
j
usually become ill c on ditioned
Lohner’s QR Method
A
j+1
= Q
j+1
from the QR factorization Q
j+1
R
j+1

= m(S
j
A
j
)
We enclose in a moving orthogonal coordin ate system
We can always “match” the longest edge of the enclosed set
The QR method provides better stab i l i ty than the parallelep i ped method
(NN, K. Jackson)
12
Taylor model s
Major source of overestimation in traditional methods is the dependency
problem
Taylor models (
COSY, VSPODE) help to reduce it
Let F be t he set of continuous functions on x ∈ IR
n
to R,
let p : R
n
→ R be a polynomial of ord er m, and
let r be an interval
x
T
g
g(x)
A Taylor model is

f ∈ F | f(x) ∈ p(x) +r for all x ∈ x


Arithmetic operations and elementary
functions can be implemented on
Taylor models
13
Taylor models in VSPODE
The IVP problem is
y

= f

y(t), θ

, y(t
0
) = y
0
∈ y
0
, θ ∈ θ (parameter)
Set
T
y
0
=

m(y
0
) + (y
0
− m(y

0
)), [0, 0]

, T
θ
=

m(θ) + (θ − m(θ)), [0, 0]

Assume at t
j
y(t
j
; t
0
, y
0
, θ) ∈
T
y
j
= p
j
(y
0
, θ) + v
j
(p
j
is a polynomial)

At t
j+1
,
y(t
j+1
; t
j
, y
j
, θ) ∈
k−1

i=0
h
i
j
f
[i]
(
y
j
, θ) + h
k
j
f
[k]
(

y
j

, θ)

k−1

i=0
h
i
j
f
[i]
(
p
j
+ v
j
, T
θ
) + z
j+1
14
Enclosures grow as in the “naive” TS method, but likely much slower
Apply the mean-value theorem to the f
[i]
:
y(t
j+1
; t
j
, y
j

, θ) ∈
k−1

i=0
h
i
j
f
[i]
(p
j
, T
θ
) + z
j+1

 
p
j+1
(y
0
,θ)+u
j+1
+

k−1

i=0
h
i

j
∂f
[i]
∂y
(y
j
, θ)


 
S
j
v
j
To reduce wrapping effect from S
j
v
j
, use the representation
T
y
j
= p
j
(y
0
, θ) + B
j
w, w ∈ w
j

, B
j
∈ R
n×n
is nonsingular
Recall: in Lohner’s method the solution is in
{ y
j
+ A
j
r | r ∈ r
j
}
For the next step, B
j+1
and w
j+1
are computed like in Lohner’s method
15
The VNODE-LP Solver
Motivation
In general, interval methods prod uce rigorous results
If we miss including a single roundoff error, they may not be rigorous
Goal: produce an interval ODE solver such th at it can be verified for
correctness by a human expert
VNODE-LP is produce d entirely using Literate Programming (D. Knuth)
and CWEB (D. Knuth, S. Levy)
web file(s)
source
code

latex file
ctangle
cweave
Theory and code can be checked for correctness at the same time
16
Overview
VNODE-LP computes boun ds on
y

= f(t, y), y(t
0
) ∈ y
0
, t ∈ [t
0
, t
end
]
(or t ∈ [t
end
, t
0
])
VNODE-LP implements:
• Algorithm I: HOE method
• Algorithm II: Hermite-Obreschkoff method (NN)
• Variable stepsi ze control
• Constant order: typical valu es can be between 20 and 30
• Improved wrapping effect control compared to VNODE
In general, applicable with point initial condi ti on s , or interval initial

conditions with a sufficiently small width
17
Packages and platforms
VNODE-LP builds on
PROFIL/BIAS or FILIB++ (interval arithmetic)
Specified at compile time
FADBAD++ (automatic differentiation)
LAPACK and BLAS (linear algebra)
Installs with gcc:
IA OS Arch
FILIB++ Linux x86
Solaris Sparc
PROFIL Linux x86
Solaris Sparc
Mac OSX PowerPC
Windows with Cygwin x86
18
Performance
Experiments on 3 GHz dual core Pentium, 2GB RAM, 4 MB L2 Cache;
Fedora Linux, gcc version 4.1.1 with -O2; with PROFIL/BIAS
Work versus order
Lorenz system
y

1
= 10(y
2
− y
1
)

y

2
= y
1
(28 − y
3
) − y
2
y

3
= y
1
y
2
− 8/3 y
3
y(0) = (15, 15, 36)
T
, t ∈ [0, 20]
integrated with atol = rtol = 10
−7
, . . . , 10
−13
19
10
-2
10
-1

10
0
10
1
10
2
5 10 15 20 25 30 35 40 45 50
CPU time
order
10
-7
10
-8
10
-9
10
-10
10
-11
10
-12
10
-13
(a) log
10
(CPU time) vs. order
0.05
0.1
0.15
0.2

0.25
0.3
0.35
0.4
0.45
0.5
0.55
0.6
10 15 20 25 30 35
CPU time
order
10
-7
10
-8
10
-9
10
-10
10
-11
10
-12
10
-13
(b) CPU time vs. order
20
Work versus problem size
DETEST problem C3
y


=












−2 1 0 0 · · · 0
1 −2 1 0 · · · 0
0 1 −2 1 · · · 0
.
.
.
0 · · · 1 −2 1
0 · · · 0 1 −2













y
with y(0) = (1, 0, . . . , 0)
T
We integrate with problem sizes n = 40, 60, . . . , 300 for t ∈ [0, 5]
Order is 20, atol = rtol = 10
−12
For each n, VNODE-LP takes 8 steps
21
10
-1
10
0
10
1
10
2
10
3
260 200 140 100 80 60 40
CPU time/step (s)
n
The computing time grows like n
3
22
Stiff problems
We integrate Van der Pol’s equation (written as a first-order system)

y

1
= y
2
y

2
= µ(1 − y
2
1
)y
2
− y
1
with
y(0) = (2, 0)
T
, t
end
= 200.
Number of steps and CPU time used by VNODE-LP:
µ steps time (secs)
10
1
2377 0.8
10
2
11697 3.6
10

3
126459 36.1
10
4
1180844 336.4
We need an efficient method for stiff problems!
23
Interval initial conditions
Lorenz example with
y(0) ∈




15 + [ −10
−4
, 10
−4
]
15 + [ −10
−4
, 10
−4
]
36 + [ −10
−4
, 10
−4
]





-20
-15
-10
-5
0
5
10
15
20
25
0 1 2 3 4 5 6
y
1
t
lower bound
upper bound
-20
-15
-10
-5
0
5.7 5.8 5.9 6 6.1 6.2
y
1
t
bounds
midpoint

Bounds on y
1
versus t
24

×