Stability of numerical methods for differential-algebraic equations of higher index

10
Applied Numerical Mathematics 13 (1993) 5-14 North-Holland APNUM 420 Stability of numerical methods for differential-algebraic equations of higher index Martin Arnold University of Restock, Department of Mathematics, Postfach, 18051 Restock, Germany Received 21 September 1992 Revised 28 September 1992 Accepted 1 October 1992 Abstract Arnold, M., Stability of numerical methods for differential-algebraic equations of higher index, Applied Numerical Mathematics 13 (1993) 5-14. The solution of higher-index differential-algebraic systems does not depend continuously on perturbations of the algebraic part. Small errors that arise in the discretization of these systems can be amplified during integration and may result in very large errors in the numerical solution. For systems of index 2 we give bounds for the influence of perturbations on the analytical and the numerical solution that is computed by implicit Runge-Kutta methods. These bounds motivate a modification of the numerical method to make it more robust against errors arising in the implementation on a computer. Keywords. Differential-algebraic systems; perturbation index; implicit Runge-Kutta methods. 1. Introduction The numerical solution of higher-index differential-algebraic systems by standard software often causes severe problems (see e.g. [2]). One of the reasons for these difficulties is that-in contrast to ODE theory-small perturbations of the numerical solution (e.g. round-off errors or errors in the iterative solution of nonlinear equations) can drastically be amplified during integration. This leads to inexact numerical results, or the integration even totally breaks down. It is known that the amplification of perturbations in the numerical solution is the discrete analogue of the fact that the analytical solution does not depend continuously on perturbations of the differential-algebraic system. Correspondence to: M. Arnold, University of Restock, Department of Mathematics, Postfach, 18051 Restock, Germany. E-mail: [email protected],de. 016%9274/93/$06.00 0 1993 - Elsevier Science Publishers B.V. All rights reserved

Transcript of Stability of numerical methods for differential-algebraic equations of higher index

Page 1: Stability of numerical methods for differential-algebraic equations of higher index

Applied Numerical Mathematics 13 (1993) 5-14

North-Holland

APNUM 420

Stability of numerical methods for differential-algebraic equations of higher index

Martin Arnold University of Restock, Department of Mathematics, Postfach, 18051 Restock, Germany

Received 21 September 1992 Revised 28 September 1992 Accepted 1 October 1992

Abstract

Arnold, M., Stability of numerical methods for differential-algebraic equations of higher index, Applied Numerical Mathematics 13 (1993) 5-14.

The solution of higher-index differential-algebraic systems does not depend continuously on perturbations of the algebraic part. Small errors that arise in the discretization of these systems can be amplified during integration and may result in very large errors in the numerical solution. For systems of index 2 we give bounds for the influence of perturbations on the analytical and the numerical solution that is computed by implicit Runge-Kutta methods. These bounds motivate a modification of the numerical method to make it more robust against errors arising in the implementation on a computer.

Keywords. Differential-algebraic systems; perturbation index; implicit Runge-Kutta methods.

1. Introduction

The numerical solution of higher-index differential-algebraic systems by standard software often causes severe problems (see e.g. [2]). One of the reasons for these difficulties is that-in contrast to ODE theory-small perturbations of the numerical solution (e.g. round-off errors or errors in the iterative solution of nonlinear equations) can drastically be amplified during integration. This leads to inexact numerical results, or the integration even totally breaks down. It is known that the amplification of perturbations in the numerical solution is the discrete analogue of the fact that the analytical solution does not depend continuously on perturbations of the differential-algebraic system.

Correspondence to: M. Arnold, University of Restock, Department of Mathematics, Postfach, 18051 Restock, Germany. E-mail: [email protected],de.

016%9274/93/$06.00 0 1993 - Elsevier Science Publishers B.V. All rights reserved

Page 2: Stability of numerical methods for differential-algebraic equations of higher index

6 M. Arnold / Stability of higher-index DAEs

We therefore start with bounds for the influence of perturbations on the analytical solution of an index-2 system. Similar estimates are obtained for the numerical solution computed by implicit Runge-Kutta methods. A modification of the methods that decreases the influence of perturbations is discussed.

We have concentrated upon systems of index 2 until now, because the proofs of the estimates are already technically complicated for systems of index 2. But the basic ideas of our investigations could be extended to index-3 systems of Hessenberg form.

2. Perturbations in differential-algebraic systems of index 2

Let an initial value problem for a differential-algebraic system be given:

Y’(X) =f(y(x), z(x)), XE [x0, &_I, Y(Q) ‘Yo, z&J = 20,

0 =g(y(x)), g(Yo> = 0, [ Q](Yo, zo> = 0. (1)

We suppose, that (1) has a solution (y(x), z(x)), and that f and g are sufficiently differen- tiable and satisfy the index-2 condition,

[ s,f,] (77, 6) is nonsingular, II([g,L]h i))-lJI~M<mT (4

in a neighbourhood of (y(x), z(x)). (For convenience of representation we restrict ourselves to autonomous systems but the results remain valid in the nonautonomous case, too.)

Such systems occur in various applications, e.g. in optimal control theory and in trajectory prescribed path control problems [2]. In connection with estimates in Theorem 2.1 we consider also systems (1) that depend only linearly on the algebraic components, i.e. f(q, 5) =fo(~) + f,(q)b. Problems of this special type are closely related to ODES with invariants [3] and to systems of the form B( y)y ’ =f( y) that arise in electrical circuit analysis and in chemical reaction kinetics [6].

For functions (j%x>, f(x)> with

y^‘(x) =f(Y^(x), 2(x)) + 6(x), x E [x0, xe] >

O(x) =g(E(x)), 9(x0) = 90, .2(x0) =i,, (3)

and residuals that are continuous (6(x)) and continuously differentiable (e(x)), respectively, the estimate [5, p. 41

II j+> -Y(X)11 + II 2(x> - z(x)II G Co( II y^o-YOII + ~&ywlI +llWII)) (4)

with a constant Co that is independent of the perturbations follows straightforwardly from Gronwall’s Lemma if the expression at the right-hand side of (4) is sufficiently small: Because of (3) it holds that

Page 3: Stability of numerical methods for differential-algebraic equations of higher index

M. Arnold / Stability of higher-index DAEs 7

This system is (locally) uniquely solvable w.r.t. f(x) (see condition (2)). Inserting this expression for ,5?(x) in the differential part of (3) estimate (4) is obtained in a similar way as in ODE theory.

Systems (1) with linear functions f and g show that estimate (4) is optimal for the algebraic components t. I.e., these components do not depend continuously on small perturbations 13(x) of the algebraic part of (1). Because of estimate (4) system (1) is said to be of perturbation index 2. A more refined analysis gives, however, better estimates for the differential compo- nents y. The following theorem holds:

Theorem 2.1. (a)

(b)

There is a constant C, so that for all functions (y^(x), Z(x)> with (31, 6 E %‘([x,, x,1), 0 E G?“([x,, x,]), and 116(x) 11 G C,, x E [x,,, xel, the estimate

is satisfied for all x E [x0, xe] with D([) := (1) ~(5) II + 11 O’(C) 11j2, provided that the expres- sion at the right-hand side of (5) is sufficiently small (the constant C, may depend on C,>. P(s>:=I-[f*(g,f,)_‘g,I(y(s), z(s)) p re resents a projection into the tangent space of the surface (7: g(q) = O}, [.5, p. 351. In the special case f(q, 0 = f,,(q) + f,(q)& ( i.e. the system is linear in the algebraic components), estimate (5) holds with D(t) := 11 e(t) 1((l) S(S) II + 11 e’(t) II>.

Proof. The theorem is proved applying Gronwall’s Lemma to

U(X) := 1) ?(x> - [ fz(g,fJ1g](E(4 W(x))) -Y(X)11

(G(q) denotes the (locally) unique solution S of [g,f l(r, 5) = O>, [ll. 0

The following example that was constructed using an idea of [6l illustrates that the bounds of Theorem 2.1 are optimal:

Example 2.2. Consider the initial value problem

Y; =z1, 0 =y,, x E [O, 11,

Y; =q, 0 =y,,

y;=t;+z;,

Y(O) = (09 0, q’, z(O) = (0, qT,

with solution: y(x) = (0, 0, O)T, z(x) = (0, O)T.

(6)

Page 4: Stability of numerical methods for differential-algebraic equations of higher index

8 M. Arnold / Stability of higher-index DAEs

Let (small) positive constants A, 0, and E be given. For functions

the residuals in (3) are given by

S(x)=(- 0 sin:, 0 ~0s” & &

So we have

II& -Y,lI = W), IlW)ll = O(A),

II W II = Wh IlW>ll = o( 4)Y

1193(~)-Y3(~)lI =,[(A+ ;)‘I =O((llSII +llw)2)P

IIW -MII = o( A + %) = Will +IP’ll)*

A similar example illustrating Theorem 2.1(b) is obtained if y; = 212 + ti in (6) is substituted by

Yj =y2=1 -y,*,*

3. Perturbations in the numerical solution of differential-algebraic systems

If system (1) is solved numerically on a computer, then errors arise that can be interpreted as small perturbations: discretization errors, round-off errors and errors in the iterative solution of nonlinear systems of equations. In Section 2 it was shown that the solution does not depend continuously on these errors.

For a wide class of implicit Runge-Kutta methods the worst possible amplification of perturbations in the numerical solution is bounded in terms that are the discrete analogue of the estimates in Theorem 2.1. Runge-Kutta methods for differential-algebraic systems are studied in detail in [5]. Applied to system (1) a Runge-Kutta method with s stages is given by

Y n+l

h -yn = Cb,f(yp,, Z~~J,

i

zn+;-zn = cbjz;~l,

j

y(O n+l

h = Caijz~~l,

i j

o=g(y?!,), i=l,2 )...) s.

Page 5: Stability of numerical methods for differential-algebraic equations of higher index

M. Arnold / Stability of higher-index DAEs 9

We restrict ourselves to methods with nonsingular Runge-Kutta matrix A = (u,~). Then the method is well-defined:

Theorem 3.1. For sufficiently small stepsizes h the (nonlinear) system of Runge-Kutta equations (7) is (locally) 24 niquely solvable if ( y,, z,> satisfies

jIY,-Y(&)l( +II%--tkJIl GYO, IIdYJll~yoh

with a sufficiently small positive constant yo. It holds that

IIY n+l -YAI + c IIY% -Y,Il <const*(h+IIg(y,)ll +hll[g,f](y,y ~,)ll)~ i

i

Proof. Under the assumptions of computed by a simplified Newton (1,. . . , l)T @ (y,, zn> if the Jacobian

the theorem the stage vectors (yt$ r, zt! I)~=1 can method. The method converges in a neighbourhood of the Runge-Kutta equations is approximated by

be of

! \

J= --A @f*(Y,, G>

>

=%A) 0 I

@denotes the Kronecker product of matrices (see [5, p. 931 and [l]). 0

The computer solution (y^,, 2,) does not satisfy in general the Runge-Kutta equations (7) exactly but with (small) residuals 6, + 1, St! 1, 0:; r, on + 1, and a,(? 1:

9(i) n+l 5,

=

h

($9 n+l =g(y^zi,), i = 1, 2 ,..., s.

To simplify the notation we summarize the perturbations:

l in the differential part in

(8)

Page 6: Stability of numerical methods for differential-algebraic equations of higher index

10 M. Arnold / Stability of higher-index DAEs

l in the algebraic part in

l in the algebraic variables in

(T := II + c ll~~:,ll). i

To get estimates for the difference between sequence ($,, 2,) and the Runge-Kutta solution ( y,, z,J it must be guaranteed that both sequences remain in the neighbourhood of one and the same (analytical) solution of (1). Similar to the estimate of Theorem 3.1 the sequence (8,, 2,) is therefore supposed to satisfy the additional condition

with a constant that is independent of stepsize and residuals, and a small positive number y that represents the perturbations in one single step of integration (cf. Theorem 3.3 below). Condition (9) is satisfied e.g. with y = 6 + 8/h if the stage vectors ($tii, $!,>,S=, are computed with the simplified Newton method of Theorem 3.1 and the iteration is stopped after an arbitrary number of Newton steps (provided that stepsize and round-off errors are suffi- ciently small).

Example 3.2. The system of Example 2.2 is solved exactly by the implicit Euler method (method (7) with s = 1 and b, = a,, = 1): y, =y(xn), z, =z(x,>. For the sequence (j,, 2,) with

;,=\/z* cos +(2n - l)~, - sin i(2n - 1)~

the residuals are of size 6 = O(A) and 8 = O(O) (a = 0). It holds that

i.e. instead of 116(x) II and II e’(x) II in the difference of functions y&n>, B,(x) and z(x), i(x) the terms S and 8/h appear in the difference of sequences (y3J, (jj3,J and (z,>, (2,). A similar result can be obtained for the modified system of Example 2.2 that is linear w.r.t. z.

Examples 2.2 and 3.2 illustrate the close relationship between the estimates of Theorems 2.1 and 3.3. Example 3.2 shows furthermore that the bounds

A necessary condition for the convergence of method the stability function R(z) of the method must satisfy

lR(m)l=ll- Ch,aj+l, AP=(aj*,). i,k

of Theorem 3.3 are optimal. (7) is the contractivity condition, i.e.

PO)

Page 7: Stability of numerical methods for differential-algebraic equations of higher index

M. Arnold / Stability of higher-index DAEs 11

In the following theorem 1 R(m) I< 1 is supposed (convergence in the more complicated case 1 R(a) I= 1 is discussed in [5]).

Theorem 3.3. Let a method (7) with nonsingular Runge-Kutta matrix A be given that is consistent (i.e. C,b, = 1) and satisfies condition (10) with 1 R(m) I< 1.

(a) There is a constant C, so that for all sequences ( y^,, 2,) and <9:), 2;‘) with (81, (9), 6 < C,, and y = 6 + O/h the estimate

n-l

IkYnII Gl PChIlI+ mykLll +ha+fI+D i I

(11)

is satisfied for all n 2 0, x0 + nh <xe with D := (6 + 0/hj2 provided that the expression at the right-hand side of (11) is sufficiently small (C, may again depend on C, 1.

(bl In the special case f(q, 5) =f&T) +f,(v)l (’ t.e. the system is linear in the algebraic components) estimate (11) holds with D := INS + 8/h).

Furthermore in both cases the following estimates are satisfied:

II%-%I1 G(ll y^,,-yoll +(I%,-z,J +a+; +b

ll~(Y^,~-~~Y,~ll~~,(Ily”,-Y,lI+~~+~).

Proof. Similar to the proof of convergence in [5] the propagation of errors is studied separately for different parts of the sequences (8, - y,> and (2, - z,):

l II 9, - y, - [ f,(g,fJ’X y(x,>, z(x,>)(g(jJ - g( y,)) II, II dY^,J - g(y,) II, and II 2, - 2, II for part (a>,

l II P(y,)(j,, - [f,(g,f,>-‘gl(9,) -y,Jll, II g(Y^,> -dy,Jll, and II 2, -2, II for part (b) of the theorem. q

Remark. The methods of Theorem 3.3 are convergent. The global discretization error can be analyzed in the usual way: set (y^,, 2,) = (y(x,), z(x,)), then Theorem 3.3 bounds the global error in terms of the local discretization error (6, + i, u,, + 1> <St! 1 = 0, t3$! 1 = 0, a,‘? 1 = 0). Note that order r of convergence for the differential components y is obtained if the local error satisfies I( 6n+l (I= O(h’-‘) and I( P(x,)6,+, II = O(h’). Th is condition is less restrictive than the usual one from ODE theory (11 Sn+l iI= O(hP) f or methods of classical order p). Local error and order of convergence of implicit Runge-Kutta methods are studied in great detail in [5].

In Table 1 the results of Theorem 3.3 are summarized. Bounds for the full error of a computer solution y^, are given that include the discretization error (hP and h’, respectively) and errors that arise in the implementation of the Runge-Kutta methods.

For a given tolerance TOL, stepsize control algorithms of ODE solvers choose such stepsizes that the discretization error remains within the error bound. To ensure that the errors caused by the implementation of the method do not exceed tolerance TOL the bounds 6 for stopping the iterative solution of nonlinear systems of equations are set to E * TOL with a safety factor E (e.g. E = 0.01). Stepsize control and algorithms for the iterative solution of nonlinear systems in a solver for index-2 systems should (especially for small stepsizes h) take into account the

Page 8: Stability of numerical methods for differential-algebraic equations of higher index

12 M. Arnold / Stability of higher-index DAEs

Table 1

Error (19, - y(x,)ll of a computer solution

ODE

DAF! (index 2)

CO(hP + 6)

CO(h’+6+R+(8+;)2)

DAE (index 21, f linear w.r.t. z C, h’+~+~+O S+; ( ( 1)

additional error terms (6 + f3/hj2 and 0(S + e/h), respectively. Solutions for the algebraic components z can be computed with the same accuracy as for components y if systems

[g,f](L in> =0

are solved w.r.t. i, at all output points.

4. Modification of Runge-Kutta methods and numerical tests

Many of the different numerical methods for solving systems (1) are the straightforward discretization of other differential-algebraic systems that are analytically equivalent to (1). So, system (1) is equivalent to the ODE system

Y’=~(Y, G(Y)) with invariants 0 = g( y ), (12)

where G(y) denotes the solution 5 of [ g,f]( y, 5) = 0 since [g,f]( y, z) = g,(y) my’ = (d/dx)g( y> = 0. Following [3] (see also [4]) system (12) can be solved applying any usual method to the index-2 system,

Y’=~(Y, G(Y)) -g,‘(y)pu,

0 =g(y), (13)

that has the exact solution p(x) = 0 and is linear in the (new) algebraic variables CL.

Example 4.1. The modified Euler method is given by

Y n+l

-Yn =f(Yn+I, 2 h

n+l) -g3Yn+JPn+1,

0 =g(Yn+J, 0 = [ gyf](Y,+I? ?z+A*

The additional consideration of the “index-l condition”

O = &g(y) = [g,f](y, 2)

in these modified methods suggests that the influence of perturbations on the solution is much smaller than before. The results of Theorem 3.3 and Examples 3.2 and 4.2 prove this hypothesis for systems (1) that are nonlinear in the algebraic variables z if small stepsizes are used. So we

Page 9: Stability of numerical methods for differential-algebraic equations of higher index

M. Arnold / Stability of higher-index DAEs 13

y[ I] (differential component)

‘o-2-

z (algebraic component)

1 o-3

1

10-s

+ standard 0 . . . stabilized

+ 0

. . standard . . . stabilized

stepsize h stepsize h

Fig. 1. Global error for Example 4.2.

call these methods stabilized methods. They have, obviously, a larger numerical effort per step of integration. So it remains open whether it makes sense to use the stabilized methods if system (1) is already linear in the algebraic variables z.

Example 4.2. We applied both the standard and stabilized implicit Euler method with fixed stepsizes to an example of [7]. An artificial perturbation d(x) is introduced that vanishes for the analytical solution and is computed as the difference between sinx in extended-arithmetic (10 bytes) and sinx in single-arithmetic (4 bytes) (100d = 10e5, machine eps = 10-‘9):

y;=4yf-y;+z, Y; = (Y,Y, + 2z2)z. 100d = 4y, +y2 - 6 sinx, x E [OS, 0.61.

Exact solution: yl(x> = sinx, y2(x) = 2 sinx, z(x) = cosx. The plots of Fig. 1 show for large stepsizes similar results for both methods. (Note that the

numerical effort of the stabilized method is higher.) If the standard Euler method is used with stepsizes smaller than 10P4, then the perturbations dominate the discretization error (that is O(h) for both methods). The global error grows with 0(h-2> in the differential and O(h-‘) in the algebraic components. (We plotted the maximal global error over the whole interval Lx,, .L] = [OS, 0.61 since the global error in the algebraic variables z at x, = 0.6 is dominated by (d(0.6) - d(0.6 - hN/h, an expression that oscillates for h + 0.) The error of the stabilized method is of the same size as the perturbations.

The test results illustrate practical implications of the theoretically obtained results in Sections 2 and 3.

Page 10: Stability of numerical methods for differential-algebraic equations of higher index

14 M. Arnold / Stability of higher-index DAEs

References

[l] M. Arnold, K. Strehmel and R. Weiner, Small perturbations in differential-algebraic systems of index 2, BIT (submitted).

[2] K.E. Brenan, S.L. Campbell and L.R. Petzold, Numerical Solution of Initial-Value Problems in Differential-Alge- braic Equations (North-Holland, Amsterdam, 1989).

[3] C.W. Gear, Maintaining solution invariants in the numerical solution of ode’s, SIAM L Sci. Statist. Comput. 7 (1986) 734-743.

[4] C.W. Gear, B. Leimkuhler and G.K. Gupta, Automatic integration of Euler-Lagrange equations with con- straints, J. Comput. Appl. Math. 12-13 (1985) 77-90.

[S] E. Hairer, C. Lubich and M. Roche, The Numerical Solution of Differential-Algebraic Systems by Runge - Kutta Methods, Lecture Notes in Mathematics 1409 (Springer, Berlin, 1989).

[6] C. Lubich, Linearly implicit extrapolation methods for differential-algebraic systems, Numer. Math. 55 (1989) 197-211.

[7] R. Weiner, Private communication (1991).