A Numerical Scheme for Ordinary Differential Equations Having Time ...

18 downloads 5061 Views 792KB Size Report
results ... even providing videos. For more infmwnation about the NASA STI. Program ... STI Help. Desk at (301) 621-0134. •. Phone the NASA. STI Help Desk at.
NASA/TM-2002-211776

A Numerical Scheme for Ordinary Differential Equations Having Time Varying and Nonlinear Coefficients on the State Transition Matrix

Robert

E. Bartels

Langley

August

Research

2002

Center,

Hampton,

Virginia

Based

The

NASA

STI

Program

Since its founding, NASA has been dedicated the advancement of aeronautics and space science. The NASA Scientific and Technical

Office

to

CONFERENCE

Langley NASA's

STI Program

Research scientific

Office

is operated

SPECIAL technical,

by

Center, the lead center for and technical information. The

TECHNICAL PUBLICATION. completed research or a major

Reports of significant

be of continuing reference value. NASA counterpart of peer-reviewed formal professional papers, but having less stringent limitations on manuscript length and extent of graphic presentations. MEMORANDUM.

Scientific

and technical findings that are preliminary or of specialized interest, e.g., quick release reports, working papers, and bibliographies that contain minimal annotation. Does not contain extensive

CONTRACTOR

REPORT.

Scientific

technical findings by NASA-sponsored contractors and grantees.

and

Englishscientific to NASA's

Specialized services that complement the STI Program Office's diverse offerings include creating custom thesauri, building customized databases, organizing and publishing research results

... even providing

For more

infmwnation

Program

Office,



Access

videos. about

the NASA

STI

see the following:

the NASA

STI Program

Home

Page

at http://www.sti.nasa.gov •

E-mail your question [email protected]



Fax your question to the NASA Desk at (301) 621-0134



Phone the NASA (301) 621-0390 Write

analysis.

PUBLICATION. Scientific, or historical information from

TECHNICAL TRANSLATION. language translations of foreign and technical material pertinent mission.

STI

phase of research that present the results of NASA programs and include extensive data or theoretical analysis. Includes compilations of significant scientific and technical data and information deemed to

TECHNICAL

Collected

NASA programs, projects, and missions, often concerned with subjects having substantial public interest.

NASA STI Program Office provides access to the NASA STI Database, the largest collection of aeronautical and space science STI in the world. The Program Office is also NASA's institutional mechanism for disseminating the results of its research and development activities. These results are published by NASA in the NASA Report Series, which includes the following report types:

PUBLICATION.

papers from scientific and technical conferences, symposia, seminars, or other meetings sponsored or co-sponsored by NASA.

Information (STI) Program Office plays a key part in helping NASA maintain this important role. The NASA

... in Profile

via the Intemet

STI Help

Desk

to

STI Help

at

to:

NASA STI Help Desk NASA Center for AeroSpace 7121 Standard Drive Hanover,

MD 21076-1320

Infommtion

NASA/TM-2002-211776

A Numerical Scheme for Ordinary Differential Equations Having Time Varying and Nonlinear Coefficients on the State Transition Matrix

Robert

E. Bartels

Langley

Research

Center,

National

Aeronautics

and

Hampton,

Space Administration Langley Research Center Hampton, Virginia 23681 2199

August

2002

Virginia

Based

Available from: NASA Center for AeroSpace 7121 Standard Drive Hanover, MD 21076-1320 (301) 621-0390

Information

(CASI)

National Technical Information 5285 Port Royal Road Springfield, VA 22161-2171 (703) 605-6000

Service (NTIS)

A numerical and

scheme nonlinear

for ordinary coefficients

differential equations having based on the state transition Robert

time varying matrix

E. Bartels

Abstract A variable order method of integrating initial value ordinary differential equations that is based on the state transition matrix has been developed. The method has been evaluated for linear time variant and nonlinear systems of equations. While it is more complex than most other methods, it produces exact solutions at arbitrary time step size when the time variation of the system can be modeled exactly by a polynomial. Solutions to several nonlinear problems exhibiting chaotic behavior have been computed. Accuracy of the method has been demonstrated by comparison with an exact solution and with solutions obtained by established methods.

Section 1.0. Introduction. Numerical methods to solve ordinary differential equations are at a state where efficient and accurate solutions are routine. Accuracy is often achieved by adapting time step size, which in some applications is inconvenient or impossible. It may not be possible to adapt time step size when the equations of dynamics are integrated while coupled to another solver (e.g. computational fluid dynamics desirable intervals.

(CFD) code). In other cases an arbitrarily large constant time step size may be such as when externally supplied data is applied to a system at constant time

One approach to address this dilemma has been the construction based on classical solutions. An exact numerical scheme based

of numerical schemes on the state transition

matrix (STM) is an example. One advantage of a scheme based on the STM is that it offers an exact solution of the system for arbitrary time step size. The ability to compute at arbitrary time step size is useful, for instance, when coupling a continuous system to a discretely sampled control system with discrete feed back. The system can be integrated with absolute accuracy between samples and discrete feed back with one or several steps, as required to capture the discrete nature of the problem. While numerical methods for time invariant systems based on the STM have been in use for many years 1, only recently has it been applied to time variant systems. 2 The present paper proposes a discrete form of the STM that has application nonlinear time varying (NLTV) Consider

to any linear time varying systems.

the simple first order differential 2 = A(t)x

where

X = (XI ,...,XN )T, Xn E R,

A e

R NxN

(LTV)

system,

and some

equation + B(t)u(t)

,Be

R NxN

(1) t > t o. Settingthe

dimensionof

the matrix B identical to matrix A is purely for convenience; the results are applicable to a matrix B of general form. In this paper the classical method of solving differential equations will be used to construct the numerical solution of equation (1). Between times

tm and tm+ h, where the solution

h is time step size, a discrete

approximation

will be performed

using

t m +h

x(tm + h) = _,(tm + h, t_)x(t_) + I _(tm + h,T)B(T)u(T)dT

(2)

t m

For any LTV system, series

the STM between

times tm and tm+ h is given by the Neumann

jr"

A(t_)jt

A(t 2)dt2dt _

(3) t "t'-f"

+h

tI A(tl)

tm

I

t2 A(t2)

I

tm

This result is called the Peano-Baker matrix A is constant, is this solution

A(_3)d_3d_2d_

1

-t.-...

tm

formula. Only in special equal to the more familiar

¢(t m +h,tm)-expL_.,t

Adt

cases, such as when the expression

=I+Ah+_(Ah)

2 +....

In all applications discussed in this paper, a discrete form of equation That solution may have some value if an approximation can be found accurate and robust.

Section discrete

2.0. Approximation of the A(t) matrix for an LTV analog to the continuous functions above.

X21 =x_(t

m-h)

,

u2_ = uo(t_ - h) The numerical polynomial

X2 =x_(t m)

,

Xl_ =x_(t m +h)

, u° = uo(tm) , u_, = uo(t_ + h)

solution

of equation

approximation

(1) can be obtained

of the matrix

system.

(3) will be used. that is efficient,

Consider

the

,...,

x2 =x_(t

,...,

u'/,= uo(t_ + rh)

by starting

m +rh)

with a term by term

A (t)

I

a_,l(r)=

c_,_,ir i-1 / hi-1 i=1

,

r=t-tm,r_(O,h)

(4)

for schemes of various order. For instance, one can define the O(A) scheme where A = I -1. The coefficients in equation (4) are constructed from discrete values of the terms

1

-I

of matrix A(t), that is c i n,z = ci n,z(an,l,...,

can be easily illustrate

evaluated

since A(t)

the use of equation

approximated

is known

an,z ) • These interpolation

for time steps at least up to tm+h. To

(4), the an,_ term of the continuous

by polynomial

expressions

polynomials

of orders

matrix A (t) can be

zero, one and two for _-_ (0, h) by the

following 0

O(0) scheme:

an,l (r) = c 1n,l

where

cl n,l = an,l

O(I)

an,l(r)=Cln,l+C2n,lr/h

where

Cln,l=an,l

scheme:

O(II) scheme:

2

an,_(r) =cln,_

0

,

1

0

C2n,l=an,l--an,l

/h 2

+C2n,IT/h+c3n,IT

where Cl n,l

_

In a similar manner, term by term. approximation method based

('ln,l0

,

C2

higher

--_

n,l

(.in,l

__(.in,

l

C3n,

order approximations

l

_

_:.o

(.in,l

of the matrix

.t_(.in,

l

A (t) can be constructed

The accuracy of this scheme is dependent on the accuracy of the of matrix A(t) since equation (3) is exact. Under certain circumstances on equation (3) will be an exact numerical scheme.

a

Section 2.1. Approximation of the STM for an LTV system. Using the results of section 2.0, an algorithm is constructed to compute successive terms of the Peano-Baker formula. Since polynomials of order A = I - 1 are used to approximate the matrix A(O term by term, the integration

of those

in a straight forward begins as follows:

The first two terms

manner.

(Crn,,)l = C,n,, /i

,

expressions

i=l,I

over

(tm ,tin + h) can be accomplished

are easily found.

The computation

n=l,N,

I=I,N

(5a)

n=l,N,

I=I,N

(5b)

I

_n,,(t_

+h,t_)=dn,,

+h_-'(G_,,)l

,

i=1

where

fin,z = 1 ifn

index ranging Equations and provide kernel

= 1 and fin,z = 0 otherwise.

from 1 to I. In equation

(5 a) and (5 b) compute the start of the STM.

of a recursion

that computes

The superscript

i in equations

(5a-b)

is an

(4) the same index i is used as an exponent.

the sum of the first two terms in the series The terms

(o-_,z)1 computed

the remaining

terms

in equation

equation

(3)

(5a) are the

of the STM.

Starting at the double integral (the third term in equation (3)) the following recursive algorithm computes the remaining integral terms and adds their contribution to the STM.

For j = O, J p

N

trrP-k+l_,1/(p ( 0, the outer subscript

( )1 denotes

( )1 denotes

= 0 with the third term

values

values

computed

in

from the previous

iteration of equations (6). There are a total ofJ + 3 terms of the Neumann series computed by this algorithm, combined from both sets of formulae, equations (5) and (6). For instance ifJ = 0, the first 3 terms are computed, namely the first two obtained from the former equations and that withj = 0 from the latter recursive formulae. When implemented, several indexing details are important. If/= 1, the index p ranging over 1 to (I-1) is computed once forp is computed once forp = 0. When I = 1, this solution

= 1, and the sequence

is just the exponential

with indexp

over (I-1) to 0+1)(I-1)

series for a constant

matrix

(i.e. exp(Ah))

or alternately a zero order approximation of a time varying A(t) matrix. Solution of an LTV system at this level of approximation corresponds simply to applying the exponential series of the steady state STM updated at each time step. Furthermore, when the O(0) scheme is used (I = 1) and J = -1 (i.e. only the first two terms computed), this algorithm is the explicit backward Euler method. Since this scheme uses as its basis an exact solution, it possible with enough terms to compute solutions using large time step sizes, as long as the matrix A (t) is sufficiently well behaved so as to be accurately approximated by a polynomial expansion. In the cases computed so far, relatively few terms in the series have been required

to achieve

very good accuracy.

It would be desirable to obtain a bound on the size of the leading order truncated term following the last of the J + 3 terms used in the computation. Denote the size of the leading order truncated term by Ej+s. While it may be possible to obtain Ej+s for any time

varyingsystemit is likely tobeundulyrestrictiveif basedonthemostgeneralformof theequationsabove.Ratherconsiderthe L × n order linear time invariant (LTI) equation dnxl - 2cixl, dt _ where

)_i , 1 = 1,..., L are the coefficients

empirically truncation

1 = I,...,L

of a diagonalized

system.

by the author that the largest value of the highest order term in the series error, using J + 3 terms of the series, will have for bound J+2

E j+3 _< h

c_

for

(_ilaaX)

o_ = {1 + int( J + 1)}

(J + 2)!

where

It has been found

)_n_x = max[l)_l,...,l)_L]]

of the matrix

(7)

n

• In the examples

that follow,

the largest

A(t) at each time step will be used as an estimate

magnitude

entry

of )_nl_x • By doing this,

the assumption is that this will result in a sufficiently accurate estimate of the truncation error. Equation (7) does not of course represent the total error in the scheme, which would

also include

the error in the approximation

in equation

(4).

The solution of the last term in equation (2) is facilitated by the fact that values of the STM at successive time steps are already available, which can be used to numerically evaluate the integral term. For constant step size h, write _

= _(t,_ + h,t,_)B(t,_)u(t,_)

=

+

=

+ =

A recursion relations.

for computing The vector

the vectors

of integrals

+ h, _1,,,..., _mz+2 can easily be constructed

is evaluated

by defining

from these

I _ R N where

t.,+h

I _Ii_(tm + h,T)B(T)u(T)dT tm

or an approximation

of this integral h

I

0

i=1

ciG

/hi-ldG

(8)

where

I-1 is the order,

_"= T - t m and the vector

2i = 2i (_1m,...,_m I+2) approximation

,

(equation

_lm,...,_m I+2 E R x , 2 i E R x . To illustrate (8)) can be evaluated

O(0) scheme:

I -= h21

O(I) scheme:

I-=h(21

This completes modification

development

for orders

+_22) of the method

of the procedure

where

21 = _2

where

21 =_2

that the linear and nonlinear

the procedure,

the

,

22 =_1__ The next section

outlines

system.

of the STM for an NLTV

= _4(t,x)x

dependence

zero and one by

for an LTV system.

for an NLTV

Section 2.3. Approximation in which

Suppose

2i has the functional

system.

Consider

now the case

+ B(t)u(t)

(9)

parts of the matrix

A(t, x) can be expressed

as

_4(t,x) = A(t) + Y(x) where

an,,--1 = an,,(t, _ -h)+

_F

an,,--° = an,,(t_)+Z°, ,'",

f_-11

F

an,, = an,, (G + rh) + f£,,

where

fL-) = fn,,(X(t_--h)) , Z°, = fn,,(X(tm)) ,'", fL = fn,,(X(t_+ rh)) and the coefficients _4(t,x)

can be found

the construction The nonlinear example,

1

0

an,z, an,z,..,

are the time varying

using equation

(4) where

of these coefficients terms

is a crucial

an,z are again approximated

now

part.

A local approximation

c_n,l = c_n,l(an°,l,...,an,l

step additional

explanation

by polynomial

expressions.

orders zero and one are given by

O(0) scheme:

an,l (z') = c 1n,l

O(I)

an,z (r) = cl n,z + c2 n,zr/ h

scheme:

0

where

0

c 1n,l = an,l + f£,l

where 0

0

cl n,, = an,, + f_,,

1

,

0

1

0

C2n,, = an,, -- an,, + fn,, -- f_,,

).

of

Because

is required. For

and z- _ (0, h) . The value of the solution therefore

the function

is f2,z = f_,z (y1), rest of the method

Section 3.0. computed. Example

x(t m + h) has not yet been

f2,z is not yet known.

where

21 = g(x°,...,x

follows

-_+_) is derived

that outlined

in the previous

Examples.

In this section

3.1. This example

computes j( =

t4x

This term is computed

solutions

the following ,

computed

and

by extrapolation,

from previous

solutions.

that The

section.

of LTV and NLTV

second

systems

are

order system

x(O) = O, 5c(0) = 1

or

¢=A4 where

computed

on t" 0 _

1. The exact solution

is given by the series

x(t) =

(6m - 5)(6m - 6)

k(t) =

(6m-5)(6m-6)

(6k-5)

t 6k-6

Figure 1 presents the error in the O(I), O(II), O(III) and O(IV) schemes compared with the second order implicit Euler method. Convergence to the exact solution is shown as the order of the approximation ofA (t) increases. The O(IV) scheme is exact to machine accuracy since the time variation of the matrix A (t) is exactly captured with a 4th order polynomial. This example illustrates one of the advantages sufficiently modeled with the order polynomial

of this method. If the time variation is used, the method is nearly insensitive to

the size of the time step. Using the O(IV) scheme in this example, any time step size is permissible since the exact solution is being computed. This aspect will be explored more fully in the next example.

__ _ ___ _ _______ .... e.... __,__

10° -

2nd ord. implicit Euler, 0(I) scheme, 0(11)scheme, 0(111) scheme, O(IV)scheme,

h=O.04 h=O.04 h=O.04 h=O.04 h=O.04

1 0 -2

% Errolr0-4

_A-" _c ,_

_ _ ._eoeeeO

_-J_--'.....

10 -° 10 -8 10 -1° 0

I

I

I

I

I

I

I

I

I

0.5 Figure

I

I

I

I

I

1

t

I

I

I

I

1.5

1. Percent

I

I

2

error.

Example 3.2. This example computes the response of a pitch/plunge apparatus initially oscillating as a sinusoid, due to a change in the torsion stiffness to ¼ its original value. The plunge

and initial torsion

N - m / tad. Ic/4

stiffness

are K h = 1.21 × 106 N

m andK_

The mass is m h = 26.64 kg, the mass pitch moment

= 0.086

actual

stiffness

kg

system

- m 2 ,

and the static offset is s_ = 0.378 kg - m.

set up to study transonic

flutter. 3 The functional

= 6.68 × 103

of inertia

is

These values

variation

are for an

of the torsion

is given by K_ = K_ (1 - f) + K_2 f

t_ < t < t_ +At

where f = @(1 - cos[_(t and t_ = 0.24 sec, modes

At = 0.01 sec. The natural

are 205.4 rad/sec

diagonalized,

The matrix

resulting

A(t)

and 299.3 rad/sec in the equation

has the values

- ta) / At]) frequencies

of the plunge

for t < t_. The second

and torsion

order system

is

--42189 0 0 -89580

fort_tl,

_ = 1-39298 L 10533

10533-50876

for t >_tl + At

and

/_=

,

b/ =

/

.

b/2

The generalized

variables

equations

are written

sufficient

number

equation

q_ and q2 roughly

in state variable

of terms

adjusted

correspond

form and solved

to pitch

and plunge.

using equations

at each time step to

ensure

These

(5) and (6) with a _