Basics of Orbital Mechanics II - OCW...

44
Basics of Orbital Mechanics II Modeling the Space Environment Manuel Ruiz Delgado European Masters in Aeronautics and Space E.T.S.I. Aeron ´ auticos Universidad Polit ´ ecnica de Madrid April 2008 Basics of Orbital Mechanics II – p. 1/24

Transcript of Basics of Orbital Mechanics II - OCW...

Page 1: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Basics of Orbital Mechanics II

Modeling the Space Environment

Manuel Ruiz Delgado

European Masters in Aeronautics and SpaceE.T.S.I. Aeronauticos

Universidad Politecnica de Madrid

April 2008

Basics of Orbital Mechanics II – p. 1/24

Page 2: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Basics of Orbital Mechanics II

Keplerian and Perturbed Motion

Magnitude of the Perturbations

Special Perturbations all, numericalEncke’s MethodCowell’s Method

General Perturbations some, analytical, approximateOsculating OrbitVariation of ParametersLagrange Equations potentialGauss Equations potential & not potential

General Perturbations: Analytical approx/Semianalytical

Numerical Integration

Basics of Orbital Mechanics II – p. 2/24

Page 3: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Keplerian and Perturbed Motion

r = −G (M + m)r

|r|3︸ ︷︷ ︸

Kepler Problem

+P1

m1− P2

m2︸ ︷︷ ︸

Perturbation

rk =

ak︷ ︸︸ ︷

−G (M + m)rk

|rk|3

rp = −G (M + m)rp

|rp|3+ ap

rp

rk

m

M

Usually, |ap| ≪ |ak| ⇒ rp ≃ rk How small?

Basics of Orbital Mechanics II – p. 3/24

Page 4: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Perturbations (LEO)

1e−008

1e−006

0.0001

0.01

1

100

10000

1e+006

0 100 200 300 400 500 600 700 800 900

Acc

eler

atio

n (m

/s2 )

Height (km)

Accelerations of the Satellite (BC=50)

Shuttle

ISS

KeplerJ2

C22Sun

MoonDrag (low)

Drag (high)Prad

Basics of Orbital Mechanics II – p. 4/24

Page 5: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Perturbations (GEO)

1e−008

1e−006

0.0001

0.01

1

100

10000

1e+006

0 5000 10000 15000 20000 25000 30000 35000 40000

Acc

eler

atio

n (m

/s2 )

Height (km)

Accelerations of the Satellite (BC=50)

GEOGPS

KeplerJ2

C22Sun

MoonDrag (low)

Drag (high)Prad

Basics of Orbital Mechanics II – p. 5/24

Page 6: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Encke’s Method

kepl

eria

n

perturbed

rk

δr

r0

v0

Epoch

rp

M

Compute only the differenceδr

rk = −µrk

|rk|3rp = −µ

rp

|rp|3+ ap

δr = rp − rk |δr| ≪ |rp|

Basics of Orbital Mechanics II – p. 6/24

Page 7: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Encke’s Method

kepl

eria

n

perturbed

rk

δr

r0

v0

Epoch

rp

M

Compute only the differenceδr

rk = −µrk

|rk|3rp = −µ

rp

|rp|3+ ap

δr = rp − rk |δr| ≪ |rp|

δr = rp − rk = −µrp

|rp|3+ µ

rk

|rk|3+ ap =

Basics of Orbital Mechanics II – p. 6/24

Page 8: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Encke’s Method

kepl

eria

n

perturbed

rk

δr

r0

v0

Epoch

rp

M

Compute only the differenceδr

rk = −µrk

|rk|3rp = −µ

rp

|rp|3+ ap

δr = rp − rk |δr| ≪ |rp|

δr = rp − rk = −µrp

|rp|3+ µ

rk

|rk|3+ ap =

δr = − µ

|rk|3δr +

µ

|rk|3

(

1 − |rk|3

|rp|3

)

rp + ap

Basics of Orbital Mechanics II – p. 6/24

Page 9: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Encke’s Method

Aboutf(q), cf. Battin, p. 389 and 449

kepl

eria

n

perturbed

rk

δr

r0

v0

Epoch

rp

M

Compute only the differenceδr

rk = −µrk

|rk|3rp = −µ

rp

|rp|3+ ap

δr = rp − rk |δr| ≪ |rp|

δr = rp − rk = −µrp

|rp|3+ µ

rk

|rk|3+ ap =

δr = − µ

|rk|3δr +

µ

|rk|3

(

1 − |rk|3

|rp|3

)

rp + ap

1 − |rk|3

|rp|3= −f(q) = −q

3 + 3q + q2

1 + (1 + q)3

2

q =δr · (δr− 2rp)

rp · rp

Basics of Orbital Mechanics II – p. 6/24

Page 10: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Encke’s Method

Aboutf(q), cf. Battin, p. 389 and 449

kepl

eria

n

perturbed

rk

δr

r0

v0

Epoch

rp

M

Compute only the differenceδr

rk = −µrk

|rk|3rp = −µ

rp

|rp|3+ ap

δr = rp − rk |δr| ≪ |rp|

δr = rp − rk = −µrp

|rp|3+ µ

rk

|rk|3+ ap =

δr = − µ

|rk|3δr +

µ

|rk|3

(

1 − |rk|3

|rp|3

)

rp + ap

1 − |rk|3

|rp|3= −f(q) = −q

3 + 3q + q2

1 + (1 + q)3

2

q =δr · (δr− 2rp)

rp · rp

δr = − µ

|rk|3δr− µ

|rk|3f(q) rp + ap

Basics of Orbital Mechanics II – p. 6/24

Page 11: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Encke’s Method

Aboutf(q), cf. Battin, p. 389 and 449

kepl

eria

n

Epoch∣∣2

perturbed

rp

M

Compute only the differenceδr

rk = −µrk

|rk|3rp = −µ

rp

|rp|3+ ap

δr = rp − rk |δr| ≪ |rp|

δr = rp − rk = −µrp

|rp|3+ µ

rk

|rk|3+ ap =

δr = − µ

|rk|3δr +

µ

|rk|3

(

1 − |rk|3

|rp|3

)

rp + ap

1 − |rk|3

|rp|3= −f(q) = −q

3 + 3q + q2

1 + (1 + q)3

2

q =δr · (δr− 2rp)

rp · rp

δr = − µ

|rk|3δr− µ

|rk|3f(q) rp + ap

if δr ↑, rectify: δr = 0

rk

∣∣1→ rk

∣∣2

Basics of Orbital Mechanics II – p. 6/24

Page 12: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Loss of Precision

REAL*4 = Single-Precision = 6-7 DIGITS

REAL*8 = Double-Precision = 15-16 DIGITS

0.100000000000000 E+00+ 0.123456789012345 E-10

= 0.100000000000000 E+00+ 0.000000000012345 E+00

= 0.100000000012345 E+00

0.123456789012345 E+00- 0.123456789000000 E+00

= 0.000000000012345 E+00

= 0.123450000000000 E-10

Basics of Orbital Mechanics II – p. 7/24

Page 13: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Loss of Precision

1 − |rk|3

|rp|3

REAL*4 = Single-Precision = 6-7 DIGITS

REAL*8 = Double-Precision = 15-16 DIGITS

0.100000000000000 E+00+ 0.123456789012345 E-10

= 0.100000000000000 E+00+ 0.000000000012345 E+00

= 0.100000000012345 E+00

0.123456789012345 E+00- 0.123456789000000 E+00

= 0.000000000012345 E+00

= 0.123450000000000 E-10

Basics of Orbital Mechanics II – p. 7/24

Page 14: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Cowell’s Formulation

Direct numerical integration of the equations

ODE: r = −µr

|r|3+ ap (r, r, t)

IC: t0, r0, r0

r = r (t, t0, r0, r0)

x =

x

y

z

vx

vy

vz

x =

vx

vy

vz

x

y

z

=

vx

vy

vz

− µr3 x + ax

− µr3 y + ay

− µr3 z + az

x = f (x, t)

Basics of Orbital Mechanics II – p. 8/24

Page 15: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Osculating Orbit - Variation of Parameters

perturbed

M

r0

v0

Epoch

Satellite inr0, v0 atEpocht0

Followsperturbedtrajectoryrp(t)

Basics of Orbital Mechanics II – p. 9/24

Page 16: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Osculating Orbit - Variation of Parameters

ke

pler

ian

perturbed

M

r0

v0

Epoch

Satellite inr0, v0 atEpocht0

Followsperturbedtrajectoryrp(t)

Osculating Orbitat r0, v0:

TheKeplerianorbit followed by the satelliteif all perturbationsbecome zero from thispoint on.

Basics of Orbital Mechanics II – p. 9/24

Page 17: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Osculating Orbit - Variation of Parameters

ke

pler

ian

oscu

lati

ng

perturbed

rp(t)

M

r0

v0

Epoch

Satellite inr0, v0 atEpocht0

Followsperturbedtrajectoryrp(t)

Osculating Orbitat r0, v0:

TheKeplerianorbit followed by the satelliteif all perturbationsbecome zero from thispoint on.

Osculating orbit elements can be used ascoordinates

r0,v0 , t0 ⇒ i,Ω, ω, a, e, τ , θ, t0

rp(t),vp(t) , t ⇒ i(t),Ω(t), ω(t), a(t), e(t), τ(t) , θ(t), t

Basics of Orbital Mechanics II – p. 9/24

Page 18: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Variation of Parameters:Fast/Slow variables

θM , Æ

ω

FastVariables:

θ, M , Æ, t

r(t) ,v(t)

SlowVariables:

i, Ω, ω, a, e, τ (M0)

Basics of Orbital Mechanics II – p. 10/24

Page 19: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Variation of Parameters:Secular/Periodic

Secular

Secular+ Long periodic

Secular+ Long periodic+ Short periodic

“Short” ∼ Orbital period

Orb

italP

aram

eter

t

Basics of Orbital Mechanics II – p. 11/24

Page 20: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Variation of Parameters - Lagrange

Variation of Parameters:

r = −µr

|r|3+ ap

r = r (i(t),Ω(t), ω(t), a(t), e(t), t)

x = ⌊i,Ω, ω, a, e, τ⌋T

x = f (x, t)

Lagrange Planetary Equations: Conservative perturbations

ap = ∇R R(i,Ω, ω, a, e,M0) M0 = n τ

x = ⌊i,Ω, ω, a, e,M0⌋T

x = f (x,∇R)

Basics of Orbital Mechanics II – p. 12/24

Page 21: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Lagrange Planetary Equations

Singularities forlow eccentricity

or inclination

di

dt=

1

na2√

1 − e2 sin i

(

cos i∂R

∂ω− ∂R

∂Ω

)

dt=

1

na2√

1 − e2 sin i

∂R

∂i

dt=

√1 − e2

na2 e

∂R

∂e− cos i

na2√

1 − e2 sin i

∂R

∂i

da

dt=

2

na

∂R

∂M0

de

dt=

1 − e2

na2 e

∂R

∂M0−

√1 − e2

na2 e

∂R

∂ω

dM0

dt= −1 − e2

na2 e

∂R

∂e− 2

na

∂R

∂a

Basics of Orbital Mechanics II – p. 13/24

Page 22: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Lagrange Planetary Equations

Singularities forlow eccentricity

or inclination

di

dt=

1

na2√

1 − e2 sin i

(

cos i∂R

∂ω− ∂R

∂Ω

)

dt=

1

na2√

1 − e2 sin i

∂R

∂i

dt=

√1 − e2

na2 e

∂R

∂e− cos i

na2√

1 − e2 sin i

∂R

∂i

da

dt=

2

na

∂R

∂M0

de

dt=

1 − e2

na2 e

∂R

∂M0−

√1 − e2

na2 e

∂R

∂ω

dM0

dt= −1 − e2

na2 e

∂R

∂e− 2

na

∂R

∂a

(

M = n − 1−e2

na2 e∂R∂e − 2

na∂R∂a

∣∣a

)

Basics of Orbital Mechanics II – p. 13/24

Page 23: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Lagrange VOP: Kozai’s Method

Separate disturbing potentialR into constant/periodic, and orders ofmagnitude:R = R1 + R2 + R3 + R4

R1 =3

2

µ J2 R2E

a3

(1

3− 1

2sin2 i

)(1 − e2

)1/2R2 = 0

R3 =3

2

µ J3 R3E

a4sin i

(

1 − 5

4sin2 i

)

e(1 − e2

)−5/2

sin ω

R4 =3

2

µ J2 R2E

a3

(a

r

)3(

1

3− 1

2sin2 i

)[

1 −(r

a

)3 (1 − e2

)−3/2

]

+

+1

2sin2 i cos 2 (ν + ω)

Only gravitational perturbationsJ2 (flattening) andJ3 (pear-shape)are included.

Basics of Orbital Mechanics II – p. 14/24

Page 24: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Lagrange VOP: Kozai’s Method (secular)

di

dt=

3

8n J3

(RE

p

)3

cos i(4 − 5 sin2 i

)sin2 i cos ω

da

dt= 0

dt= −3

2n J2

(RE

p

)2

cos i − 3

8n J3

(RE

p

)3(15 sin2 i − 4

)e cot i sin ω

dt=

3

4n J2

(RE

p

)2(4 − 5 sin2 i

)+

3

8n J3

(RE

p

)3 [(4 − 5 sin2 i

·(sin2 i − e2 cos2 i

)

e sin i+ 2 sin i

(13 − 15 sin2 i

)e

]

sin ω

de

dt= −3

8n J3

(RE

p

)3

sin i(4 − 5 sin2 i

) (1 − e2

)cos ω

dM

dt= n

[

1 +3

2J2

(RE

p

)2(

1 − 3

2sin2 i

)(1 − e2

)1/2]

− 3

8n J3

(RE

p

)3

sin i(4 − 5 sin2 i

) (1 − 4e2

)(1 − e2

)1/2

esin ω

Basics of Orbital Mechanics II – p. 15/24

Page 25: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Gauss Planetary Equations

Conservative and not conservative perturbations

Use the Orbital Frame forap

ap = ar ur + aθ uθ + az uz

Peric.

Sat.

hur

Ω

θ

uN

i

i

x1

y1

z1

Basics of Orbital Mechanics II – p. 16/24

Page 26: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Gauss Planetary Equations

Singularities for loweccentricity or inclination

di

dt=

r cos θ

na2√

1 − e2az

dt=

r sin θ

na2√

1 − e2 sin iaz

dt=

√1 − e2

na e

[

− cos θ ar + sin θ

(

1 +r

p

)

]

− r cos i sin θ

h sin iaz

da

dt=

2

n√

1 − e2

(

e sin θ ar +p

raθ

)

de

dt=

√1 − e2

na

[

sin θ ar +

(

cos θ +e + cos θ

1 + e cos θ

)

]

dM0

dt=

1

na2 e[(p cos θ − 2er) ar − (p + r) sin θ aθ]

M =n+ b

ah e[(p cos θ−2re) ar−(p+r) sin θ aθ]

Basics of Orbital Mechanics II – p. 17/24

Page 27: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Euler

t

y

y0

y(t1)

y1

t0 t1

h

y = f(y, t)

y0 = y(t0)

y1 = y0 + f [y(t0), t0] · h. . .

yn = yn−1 + f [yn−1, t0 + (n − 1)h] · h. . .

Error = O(h2)

Basics of Orbital Mechanics II – p. 18/24

Page 28: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Midpoint

t

y

y0

y(t1)

t0 t1

h

y = f(y, t)

y0 = y(t0)

Basics of Orbital Mechanics II – p. 19/24

Page 29: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Midpoint

y1

t

y

y0

y(t1)

t0 t1

h

y = f(y, t)

y0 = y(t0)

y1 = y0 + f [y(t0), t0] · h/2

Basics of Orbital Mechanics II – p. 19/24

Page 30: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Midpoint

y1

t

y

y0

y(t1)

t0 t1

h

y = f(y, t)

y0 = y(t0)

y1 = y0 + f [y(t0), t0] · h/2

y1 = f [y1, t0 + h/2]

Basics of Orbital Mechanics II – p. 19/24

Page 31: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Midpoint

y1

y2

t

y

y0

y(t1)

t0 t1

h

y = f(y, t)

y0 = y(t0)

y1 = y0 + f [y(t0), t0] · h/2

y1 = f [y1, t0 + h/2]

y2 = y0 + y1 · h. . .

Error = O(h3)

Basics of Orbital Mechanics II – p. 19/24

Page 32: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Runge-Kutta 4

tn tn+1h

yn

y(tn+1)

y = f(y, t)

Basics of Orbital Mechanics II – p. 20/24

Page 33: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Runge-Kutta 4

y1

tn tn+1h

yn

y(tn+1)

y = f(y, t)

k1 = h f (yn, tn) y1 = yn + k1/2

Basics of Orbital Mechanics II – p. 20/24

Page 34: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Runge-Kutta 4

y1

y2

tn tn+1h

yn

y(tn+1)

y = f(y, t)

k1 = h f (yn, tn) y1 = yn + k1/2

k2 = h f (y1, tn + h/2) y2 = yn + k2/2

Basics of Orbital Mechanics II – p. 20/24

Page 35: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Runge-Kutta 4

y1

y2

y3

tn tn+1h

yn

y(tn+1)

y = f(y, t)

k1 = h f (yn, tn) y1 = yn + k1/2

k2 = h f (y1, tn + h/2) y2 = yn + k2/2

k3 = h f (y2, tn + h/2) y3 = yn + k3

Basics of Orbital Mechanics II – p. 20/24

Page 36: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Runge-Kutta 4

y1

y2

y3

y4

tn tn+1h

yn

y(tn+1)

y = f(y, t)

k1 = h f (yn, tn) y1 = yn + k1/2

k2 = h f (y1, tn + h/2) y2 = yn + k2/2

k3 = h f (y2, tn + h/2) y3 = yn + k3

k4 = h f (y3, tn + h) y4 = yn + k4

Basics of Orbital Mechanics II – p. 20/24

Page 37: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Runge-Kutta 4

y1

y2

y3

y4

yn+1

tn tn+1h

yn

y(tn+1)

y = f(y, t)

k1 = h f (yn, tn) y1 = yn + k1/2

k2 = h f (y1, tn + h/2) y2 = yn + k2/2

k3 = h f (y2, tn + h/2) y3 = yn + k3

k4 = h f (y3, tn + h) y4 = yn + k4

yn+1 = yn + k1

6+ k2

3+ k3

3+ k4

6

Error = O(h5)

Basics of Orbital Mechanics II – p. 20/24

Page 38: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Burlish-Stoer

tn tn+1h

yn

y = f(y, t), yn, tn

Basics of Orbital Mechanics II – p. 21/24

Page 39: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Burlish-Stoer

b

b

b

b

b

b

b

b

b

b

b

b

b

bb

n = 2

n = 4n = 6

tn tn+1h

yn

y = f(y, t), yn, tn

Compute the intervalh with n stepshn , n =

k︷ ︸︸ ︷

2, 4, 6 . . .

Basics of Orbital Mechanics II – p. 21/24

Page 40: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Burlish-Stoer

b

b

b

b

b

b

b

b

b

b

b

b

b

bb

n = 2

n = 4n = 6

tn tn+1h

yn

h2

h6

h4

0

y

y = f(y, t), yn, tn

Compute the intervalh with n stepshn , n =

k︷ ︸︸ ︷

2, 4, 6 . . .

Basics of Orbital Mechanics II – p. 21/24

Page 41: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Numerical Methods: Burlish-Stoer

b

b

b

b

b

b

b

b

b

b

b

b

b

bb

n = 2

n = 4n = 6

tn tn+1h

yn

y(tn+1)

h2

h6

h4

0

y

Error =O(h2k+1

)

y = f(y, t), yn, tn

Compute the intervalh with n stepshn , n =

k︷ ︸︸ ︷

2, 4, 6 . . .

Polynomial extrapolation ton → ∞, h → 0

Basics of Orbital Mechanics II – p. 21/24

Page 42: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

Adaptive Stepsize Control

Set a truncation errorǫ and stepsizeh

Give a step with a method of ordern

Repeat the step with ordern + 1

If the difference is> ǫ, decreaseh

If the difference is< ǫ, increaseh

Each section of the curve is integrated with the maximumhcompatible withǫ

This reduces the number of steps, but may require more derivativeevaluations

Basics of Orbital Mechanics II – p. 22/24

Page 43: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

COWELL Program

Begin y = f(y, t)

Initializations

Input dataKB/File

ODE Integrator Call Int step Call Derivs

Compute elements

Compute Kepler

Save Data

INTTRAJ.DAT

OSCELEM.DAT

KEPTRAJ.DAT

Plot

End

aKep

agrav

a3Body

aDrag

aPrad...

Basics of Orbital Mechanics II – p. 23/24

Page 44: Basics of Orbital Mechanics II - OCW UPMocw.upm.es/ingenieria-aeroespacial/modeling-the-space-environment/... · Basics of Orbital Mechanics II Keplerian and Perturbed Motion Magnitude

ODE Integrator

Fixed Step

ti = ti−1 + ∆t

Dumb Integr Step Derivs

t = tf ?

Yes

No

Adaptive Stepsize

ti = ti−1 + ∆t

Adjust∆t

QS Integr Step Derivs

Error⋚ ǫ

t = tf ?

OK

Yes

> <No

Basics of Orbital Mechanics II – p. 24/24