Beruflich Dokumente
Kultur Dokumente
TU Ilmenau
=
.
..
.
Fn (t, x(t), x(t))
TU Ilmenau
(1)
x 1 x2 + 2 = 0
(2)
1
2
= F2 F2 =
, ( see that, det
= 0).
x2 0
x
x
x 1
x 2
the Jacobian is a singular matrix irrespective of the values of x2 .
Observe that: in this example the derivative x 2 does not appear.
Introduction to Differential Algebraic Equations
TU Ilmenau
(3)
(4)
In this DAE:
equation (3) is a differential equation; while
equation (4) is an algebraic equation.
There are several engineering applications that have such model
equations.
TU Ilmenau
F
x
= A(t).
Remark
In general, if the Jacobian matrix F
x is non-singular (invertible),
then the system F (t, x, x)
= 0 can be transformed into an ordinary
differential equation (ODE) of the form x = f (t, x). Some numerical
solution methods for ODE models have been already discussed.
I Therefore, the most interesting case is when
Introduction to Differential Algebraic Equations
TU Ilmenau
F
x
is singular.
TU Ilmenau
= Fa F
Fa
C A =
(CA0 CA ) R1
V
Fa
C B = CB + R1 R2
V
F
a
C C = CC + R2
V
CB
0 = CA
Keq
0 = R2 k2 CB
Introduction to Differential Algebraic Equations
TU Ilmenau
(5)
(6)
(7)
(8)
(9)
(10)
TU Ilmenau
(DAE)
x 1 = x3
x 2 = x4
F
x1
ml
F
x 4 = g x2
l
0 = x2 + y 2 l 2 .
x 3 =
TU Ilmenau
TU Ilmenau
V C
(11)
(12)
(13)
0 = VE + VR + VC + VL
(14)
0 = iL iE
(15)
(16)
TU Ilmenau
x =
0 0 0 0
0 0 0 0
0 0 0 0
0 0 1 0
1 1 1 0
0 =
0 0 0 1
0
0
0
x
0
0
R
0
0 x + 1 VE
1
0
(17)
(18)
TU Ilmenau
x = Ax
(19)
0 = Bx + Dz.
(20)
TU Ilmenau
(21)
0 = g(t, x, z)
(22)
Note that the derivative of the variable z doesnt appear in the DAE.
Such a variable z is called an algebraic variable; while x is called a
differential variable.
The equation 0 = g(t, x, z) called algebraic equation or a
constraint.
Examples:
The DAE model given for the RLC circuit, the CSTR and the simple
pendulum are all semi-explicit form.
Introduction to Differential Algebraic Equations
TU Ilmenau
TU Ilmenau
I
O
GAH = m
O N
J
O
and GBH =
O Inm
(23)
TU Ilmenau
(24)
(25)
TU Ilmenau
(27)
(28)
N w1 (t) + N
p1
w2 (t) + N
(29)
p1
b2 (t) = 0.
(30)
p1
w2 (t) N
p1
(31)
b2 (t).
TU Ilmenau
(32)
Idea:
Attempt to transform the DAE into an ODE.
This can be chieved through repeated derivations of the algebraic
equations g(t, x, z) = 0 with respect to time t.
Definition
The minimum number of differentiation steps required to transform a
DAE into an ODE is known as the (differential) index of the DAE.
Introduction to Differential Algebraic Equations
TU Ilmenau
x 1 = x1 + 1
(x1 + 1)x2 + 2 = 0.
TU Ilmenau
TU Ilmenau
x = f (t, x, z)
(33)
0 = g(t, x, z).
(34)
g dx
+ g dz = 0. Hence, a semi-explicit DAE is of
x
h dti1 z dt
index 1 iff g
exists. That is, one differentiation step yields the
z
h i1 h i
h i1
g
g
g
g
differential equation: dz
=
(f
(t,
x,
z))
dt
z
x
z
t .
Since
g
t
TU Ilmenau
(35)
0 = g(t, x, z).
(36)
h i
if Jacobian matrix g
z singular (non-invertible), then the DAE is of
higher index.
I Since many applications have model equations as semi-explicit
DAEs, the discussion next is restricted to this form.
In the DAE above, if both f and g do not explicitly depend on time
t; i.e. f (t, x, z) = f (x, z) and g(t, x, z) = g(x, z), then the model is
an autonomous DAE.
Introduction to Differential Algebraic Equations
TU Ilmenau
(37)
0 = g(t, x, z).
(38)
Ideas of BDF:
I Select a time step h so that ti+1 = ti + h, i = 0, 1, 2, . . .
I Given xi = x(ti ) and zi = z(ti ), determine the value
xi+1 = x(ti+1 ) by using (extrapolating) values xi , xi1 , . . . , xim+1
of the current and earlier time instants of x(t).
I Simultaneously compute zi+1 = z(ti+1 ).
Introduction to Differential Algebraic Equations
TU Ilmenau
m
X
xi+1j Lj (t)
j=0
TU Ilmenau
()
But
P (ti+1 ) =
m
X
j=0
m
X
xi+1j L j (t)
j=1
m
X
xi+1j
j=1
Introduction to Differential Algebraic Equations
TU Ilmenau
L j (ti+1 )
1
+
f (ti+1 , xi+1 )
L 0 (ti+1 ) L 0 (ti+1 )
L j (ti+1 )
1
, bm =
.
L 0 (ti+1 )
hL 0 (ti+1 )
m
X
(39)
j=1
TU Ilmenau
(40)
zi z(ti ) O(hm )
TU Ilmenau
TU Ilmenau
Orthogonal Collocation
To collocate a function x(t) through another function p(t) = to
captur the properties of x(t) by using p(t).
In general, we use a simpler function p(t) to collocate x(t); eg., p(t)
can be a polynomial, a trigonometric function, etc.
polynomial and trigonometric functions are usually simpler to work
with. (The discussion here is restricted to polynomilas)
Weirstra Theorem
If x(t) is a continuous function on [a, b], then for any given > 0,
there is a polynomial p(t) such that
max |x(t) p(t)| <
atb
TU Ilmenau
p(ti ) = x(ti ) =: xi , i = 1, . . . , N.
for some selected time instants t1 , t2 , . . . , tN from the interval [a, b].
This property relates p(t) and x(t) and is known as interpolatory
property.
TU Ilmenau
TU Ilmenau
(41)
am tm
2
(42)
x2 = p(t2 ) = a0 + a1 t2 + . . . +
..
.
(43)
am tm
m+1 .
a0
1
t1
t21
. . . tm
x1
1
2
m a
x2 1
t
t
.
.
.
t
2
2
2 1
. = .
..
..
.. ..
.
.
. .
.
.
...
. .
am
1 tm+1 t2m+1 . . . tm
xm+1
m+1
Thus, if we known x1 , x2 , . . . , xm+1 then we can compute
a0 , a1 , . . . , am and vice-versa.
But, since x(t) is not yet known, x1 , x2 , . . . , xm+1 are unknown.
Introduction to Differential Algebraic Equations
TU Ilmenau
a0
a1
Hence, both
and .. are unkowns.
.
xm+1
am
To avoid working with two unknown vectors, we can define the
polynamial p(t) in a better way as:
x1
x2
..
.
p(t) =
m+1
X
xi Li (t)
(45)
i=1
m+1
Y
j=1
j 6= i
=
t tj
ti tj
TU Ilmenau
Properties:
Li (tj ) =
1, if i = j
0, if i 6= j
TU Ilmenau
TU Ilmenau
TU Ilmenau
PN
k=1 wk f (k ),
where:
i=1
W ( )p( )d =
a
N
X
wi p(i )
i=1
TU Ilmenau
1d
(46)
wi i
(47)
wi i2
(48)
i=1
wi
i=1
1
2 d
i=1
..
.
Z
0
Introduction to Differential Algebraic Equations
TU Ilmenau
2N d
(49)
X
i=1
wi i2N .
(50)
(51)
(52)
(53)
1
3
2
= w1 12 + w2 22 + . . . + wN N
..
.
1
2N
2N
= w1 12N + w2 22N + . . . + wN N
.
(54)
(55)
(56)
TU Ilmenau
Orthogonal polynomials
There is a simpler way if we use orthogonal polynomials.
I The concept of orthogonality requires a definition of scalar
product.
The scalar product of functions h and g with respect on the
interval [0, 1] is
Z 1
hh, gi =
h( )g( )d.
0
h( )g( )d = 0.
0
TU Ilmenau
Orthogonal polynomials...
Orthogonal polynomials on [0, 1] (as defined above) are known as
shifted Legendre polynomials.
n2
,n
4(4n2 1)
TU Ilmenau
= 0, 1, 2, . . .
Orthogonal polynomials...
The first four shifted Legendre orthogonal polynomials are
p0 ( ) = 1, p1 ( ) = 2 1, p2 ( ) = 6 2 6 + 1, p3 ( ) =
20 3 30 2 + 12 1.
Further important properties of orthogonal polynomials:
Given any set of orthogonal polynomials {p0 , p1 , p2 , . . .} the following
hold true:
Any finite set of orthogonal polynomials {p0 , p1 , . . . , pN 1 } is
linearly independent.
The polynomial PN is orthogonal to each of p0 , p1 , . . . , pN 1 .
Any non-zero polynomial q with degree deg(q) N 1 can be
written as a linear combination:
q( ) = c0 p0 ( ) + c1 p1 ( ) + . . . , cN 1 pN 1 ( )
where at least one of the scalars c0 , c1 , . . . , cN 1 is non-zero.
Introduction to Differential Algebraic Equations
TU Ilmenau
Orthogonal polynomials...
We demand the quadrature rule is exact for polynomials up to
degree 2N 1.
Let P ( ) be any polynomial of degree 2N 1.
Hence,
Z 1
N
X
I[P ] = QN [P ]
P ( )d =
wi P (i ).
0
i=1
TU Ilmenau
Orthogonal polynomials...
R
P
1
Now, from the equation 0 P ( )d = N
k=1 wk P (k ) it follows that
Z b
N
X
(pN ( )q( ) + r( )) d =
wi (pN (i )q(k ) + r(i )) .
a
i=1
Z b
N
N
b
X
X
)d =
pN ( )q( )d + r(
w
wi pN (i )q(i ) +
i r(i ).
a
a
i=1
i=1
|
{z
}
=0
TU Ilmenau
OrthogonalPpolynomials...
It follows that
N
k=1 wk pN (k )q(k )
= 0.
(?)
Theorem
If the quadrature nodes 1 , 2 , . . . , N are zeros of the N th degree
shifted Legendre polynomial pN ( ), then
all the roots 1 , 2 , . . . , N lie inside (0, 1);
the quadrature weights are determined from
Z 1
wi =
Li ( )d,
0
TU Ilmenau
Orthogonal polynomials...
TU Ilmenau
Orthogonal polynomials...
Theorem (Welsch & Glub 1969 )
The quadrature nodes 1 , 2 , . . . , N and weights w1 , w2 , . . . , wN can
be computed from the spectral factorization of
JN = V > V ; = diag(1 , 2 , . . . , N ), V V > = IN ;
of the
symmetric
tri-diagonal Jacobi matrix
a
0
b1
JN =
b1
a1
b2
.
.
b2
.
.
..
a
p N 2
bN 1
bN 1
aN 1
where
TU Ilmenau
Theorem ...
k = k , k = 1, . . . , N ;
2
wk =
e> V ek , k = 1, . . . , N,
(57)
(58)
where e1 , ek are the 1st and the kthe unit vectors of length N .
A Matlab program:
n = 5; format short
beta = .5./sqrt(1-(2*(1:n-1)).^(-2)); % recurr. coeffs
J = diag(beta,1) + diag(beta,-1)
% Jacobi matrix
[V,D] = eig(J);
% Spectral decomp.
tau = diag(D); [tau,i] = sort(tau); % Quad. nodes
w = 2*V(1,i).^2;
% Quad. weights
Introduction to Differential Algebraic Equations
TU Ilmenau
TU Ilmenau
TU Ilmenau
t2 = 0 + (10 0) 2 =
P4
i
xi Li (t). where
(t t2 )(t t3 )(t t4 )
(t1 t2 )(t1 t3 )(t1 t4 )
(t t1 )(t t3 )(t t4 )
(t2 t1 )(t2 t3 )(t2 t4 )
(t t1 )(t t2 )(t t4 )
(t3 t1 )(t3 t2 )(t3 t4 )
(t t1 )(t t2 )(t t3 )
.
(t4 t1 )(t4 t2 )(t4 t3 )
TU Ilmenau
(59)
(60)
(61)
(62)
(63)
0 = g(t, x, z)
(64)
N
X
i=1
N
X
i=1
TU Ilmenau
(k)
(65)
(j)
(66)
xi Li (t), k = 1, . . . , n;
zi Li (t), j = 1, . . . , m.
p (t) = f1 (t, p (t), p (t), . . . , p (t) , q (1) (t), q (2) (t), . . . , q (m) (
p(2) (t) = f2 (t, p(1) (t), p(2) (t), . . . , p(n) (t) , q (1) (t), q (2) (t), . . . , q (m) (
(1)
(1)
(2)
(n)
..
.
p(n) (t) = f1 (t, p(1) (t), p(2) (t), . . . , p(n) (t) , q (1) (t), q (2) (t), . . . , q (m) (
0 = g1 (t, p(1) (t), p(2) (t), . . . , p(n) (t) , q (1) (t), q (2) (t), . . . , q (m) (
(1)
(2)
(n)
0 = g2 (t, p (t), p (t), . . . , p (t) , q (1) (t), q (2) (t), . . . , q (m) (
..
.
0 = gm (t, p(1) (t), p(2) (t), . . . , p(n) (t) , q (1) (t), q (2) (t), . . . , q (m)
Introduction to Differential Algebraic Equations
TU Ilmenau
TU Ilmenau
4
X
(1)
i=1
TU Ilmenau
4
X
i=1
(2)
xi (t)Li (t)
TU Ilmenau
Resources - Literature
References:
U. M. Ascher, L. R. Petzold : Computer Methods for Ordinary
Differential Equations and Differential-Algebraic Equations. SIAM
1998.
K. E. Brenan, S. L. Campbell, and L.R. Petzold: (1996). Numerical
Solution of Initial-Value Problems in Differential-Algebraic Equations.,
SIAM, 1996.
Campbell, S. and Griepentrog, E., Solvability of General Differential
Algebraic Equations, SIAM J. Sci. Comput. 16(2) pp. 257-270, 1995.
M. S. Erik and G. Sderlind: Index Reduction in
Differential-Algebraic Equations Using Dummy Derivatives. SIAM
Journal on Scientific Computing, vol. 14, pp. 677-692, 1993.
C. W. Gear : Differential-algebraic index transformation. SIAM J.
Sci. Stat. Comp. Vol. 9, pp. 39 47, 1988.
Walter Gautschi: Orthogonal polynomials (in Matlab). Journal of
Computational and Applied Mathematics 178 (2005) 215 234
Introduction to Differential Algebraic Equations
Lloyd N. Trefethen: Is Gauss Quadrature Better than
TU Ilmenau
Clenshaw.Curtis? SIAM REVIEW, Vol. 50, No. 1, pp. 67 87, 2008.
TU Ilmenau