here - jeppe juul

41

Upload: others

Post on 09-Feb-2022

24 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Here - Jeppe Juul

Low energy trajectories to the Moonby Jeppe Søgaard Juul

December 2008

Supervisor:Poul Hjorth

Department of Mathematics:Technical University of Denmark

Internal Supervisor:Mogens Høgh JensenNNiels Bohr Institute

University of Copenhagen

Page 2: Here - Jeppe Juul

”The moon is the first milestoneon the road to the stars”

Arthur C. Clarke

i

Page 3: Here - Jeppe Juul

Abstract

A new design strategy for finding low energy trajectories from Earth orbit to Moon orbit throughthe first Lagrange point has been developed. The found trajectories are very close to the the-oretical minimum values of ∆v necessary to go from Earth orbit to L1 and from L1 to Moonorbit. However, a large velocity change at L1 gives the most fuel effective trajectory a total ∆vof 4369.5 m/s.

As part of the project, seven different one step integrators have been compared, with six ofthese being symplectic integrators. It was found that the integrator, which approximated theflow of the restricted three body system the fastest and most accurately, was the non-symplectic4th order Runge-Kutta Method.

ii

Page 4: Here - Jeppe Juul

Contents

1 Introduction 1

2 Hamiltonian mechanics 1

3 The Earth-Moon system 23.1 Equations of motion in a synodic frame . . . . . . . . . . . . . . . . . . . . . . . 23.2 Effective potential and the Lagrange points . . . . . . . . . . . . . . . . . . . . . 33.3 Theoretical minimum for ∆v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

4 Existing trajectory designs 54.1 Direct transfer: Hohmann . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54.2 Weak stability boundaries: Belbruno-Miller . . . . . . . . . . . . . . . . . . . . . 54.3 L1 hyperbolic transit orbits: Topputo . . . . . . . . . . . . . . . . . . . . . . . . . 5

5 Trajectory design 55.1 Trajectories from the Earth approaching L1 . . . . . . . . . . . . . . . . . . . . . 75.2 Trajectories from L1 approaching the Earth . . . . . . . . . . . . . . . . . . . . . 85.3 Optimizing the trajectories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.4 Trajectory from L1 to Moon orbit . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

6 Numerical integrators 96.1 Numerical integrators and orders . . . . . . . . . . . . . . . . . . . . . . . . . . . 96.2 Partitioned methods and symplectic integrators . . . . . . . . . . . . . . . . . . . 106.3 Symmetric integrators and composition methods . . . . . . . . . . . . . . . . . . 116.4 Splitting methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136.5 Choice of integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

7 Results 167.1 Earth-L1 leg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167.2 L1-Moon leg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177.3 Total Earth-Moon trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

8 Discussion 17

9 Possible improvements on the trajectory designs 18

10 Conclusion 19

11 Acknowledgements 20

References 20

A MATLAB files: Finding trajectories 22A.1 Trajectories from Earth approaching L1 . . . . . . . . . . . . . . . . . . . . . . . 22A.2 Trajectories from L1 approaching the Earth . . . . . . . . . . . . . . . . . . . . . 22A.3 Optimizing the trajectories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23A.4 Subfunction: Createsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25A.5 Subfunction: Findmatches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27A.6 Subfunction: Etadot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29A.7 Subfunction: Etadotreverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

iii

Page 5: Here - Jeppe Juul

B MATLAB files: The best integrator 30B.1 Main program integrating and comparing . . . . . . . . . . . . . . . . . . . . . . 30B.2 Symplectic Euler integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31B.3 Störmer/Verlet integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32B.4 4th order Runge-Kutta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33B.5 2nd order splitting method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33B.6 4th order splitting method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34B.7 6th order splitting method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34B.8 8th order splitting method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35B.9 phi1 and phi2 used to the splitting methods . . . . . . . . . . . . . . . . . . . . . 36

iv

Page 6: Here - Jeppe Juul

1 Introduction

The space race, inspired by the Cold War between the Soviet Union and the United States, ledto an increased interest in the exploration of the Moon. The landing of the first humans on theMoon in 1969 is generally viewed as the culmination of the space race. After the mid-1970s onlyfew spacecrafts has reached Moon orbit, among these the Japanese ’Hiten’ spacecraft (1990) andthe European ’Smart 1’ spacecraft (2003).

On January 14, 2004, U.S. President George W. Bush called for a plan to return mannedmissions to the Moon by 2020 [12]. NASA is now planning for the construction of a permanentoutpost at one of the lunar poles [13]. Russia and the People’s Republic of China have alsoexpressed plans for exploring the Moon. Like NASA, China hopes to land people on the Moonby 2020 [21].

This renewed interest in Moon expeditions calls for new low-energy trajectories going fromlow Earth orbit to Moon orbit. Especially for unmanned expeditions, where time of flight isnot a central issue, much propellant can be saved by using special trajectories that exploit thephysical structure of the Earth-Moon system [11].

In this project a new method of finding low energy trajectories between Earth and Moonorbit is developed, using the programming language MATLAB. Before this, basic concepts ofHamiltonian mechanics and the Earth-Moon system are explained and the most importantexisting trajectory designs are described. In the search for low energy trajectories numericalintegration plays a crucial part. The theory of numerical one-step integrators will therefore bedescribed, with special attention being paid to symplectic integrators. The integrator, whichapproximates the trajectories fastest and most accurately, will be found systematically.

I have not previously had an analytical mechanics course, nor worked with numerical inte-grators or the programming language MATLAB. The project thus gave me an opportunity towork with an area of physics that was new to me and also allowed me to acquire new skills inmathematics and programming.

2 Hamiltonian mechanics

In this section the basic concepts of Hamiltonian mechanics will be stated briefly without furtherproofs. The section is primarily based on [5], [6] and [8].

For a conservative mechanical system the Lagrangian L is defined as the kinetic energy minusthe potential energy. If the state of the system can be completely described by the generalizedcoordinates q and velocities q, the Euler-Lagrange equations

ddt

∂L

∂q− ∂L

∂q= 0 (1)

are equivalent to Newton’s second law, and thus determines the flow of the system in phasespace.

Instead of describing the system by (q, q), one can carry out the Legendre transformation

(q, q) ↔ (q,p) given by p =∂L

∂qif

∂2L

∂q∂q6= 0. (2)

Here p is called the generalized momentum.In the variables (q,p) the Euler-Lagrange equations are equivalent to Hamilton’s equations:

p = −∂H

∂qand q =

∂H

∂p, (3)

1

Page 7: Here - Jeppe Juul

where the Hamiltonian H is defined as

H = p · q − L. (4)

Defining the column vector η =(

pq

)we can write the Hamilton’s equations (3) compactly

η = J−1∇H(η) where J =[

0 I−I 0

]. (5)

The matrix J is called the symplectic matrix. If the function η(t) is a solution to (5) withstarting value η(0) = η0 in phase space, we define the flow ϕt(η0) of the system as the mapthat associates η0 with η(t). That is

ϕt(η0) = η(t) if η(0) = η0. (6)

The Hamiltonian will be conserved along the flow of the system, i.e. the quantity H(η(t)) willhave the same value for all t.

The Jacobian ∂ϕt

∂η of the flow of any Hamiltonian satisfies the relation

∂ϕt

∂η

T

J∂ϕt

∂η= J, (7)

with J given by (5). All maps with Jacobians satisfying (7) are called symplectic maps.

3 The Earth-Moon system

3.1 Equations of motion in a synodic frame

If all other celestial objects are neglected, the Moon and the Earth rotate about their center ofmass in approximately circular Kepler orbits confined to a two dimensional plane. If the massesof the two objects are denoted me and mm we can define the Earth-Moon parameter as [11] [20]

µ =mm

me + mm= 0.0121506683. (8)

We will observe the rotating system in the non-inertial reference frame [10] with origo at thecenter of mass and same angular frequency as the system, which we will normalize to 1. If thedistance between the Earth and the Moon is also normalized to 1, the two bodies will be locatedon the x-axis at the points (−µ, 0) and (1− µ, 0) (see figure 1).

This is called the synodic frame. Given the Earth-Moon distance and period, one cancalculate the unit of length, velocity and time in this frame [20]

unit length = 384, 405 kmunit velocity = 1.0232 km/s (9)

unit time = 4.348 days.

The kinetic energy of a satellite of unit mass moving in this frame will be

K(x, y, x, y) =12((x− y)2 + (y + x)2

). (10)

2

Page 8: Here - Jeppe Juul

Figure 1: The synodic frame of the Earth-Moon system has origo in the center ofmass, and rotates with normalized angular frequency so both the Earth and the Moonare situated on the x-axis.

Using Newton’s gravitational potential energy where the gravitational constant is normalized to1, the Lagrangian will be given by [11]

L = K − V =12((x− y)2 + (y + x)2

)+

1− µ√(x + µ)2 + y2

+µ√

(x + µ− 1)2 + y2. (11)

The generalized momenta can be found using (2)

px = x− y, py = y + x ⇔ x = px + y, y = py − x, (12)

px and py are thus the components of the velocity of the satellite in the inertial frame. Now,the Hamiltonian can be found using (4).

H =p2

x + p2y

2+ pxy − pyx−

1− µ√(x + µ)2 + y2

− µ√(x + µ− 1)2 + y2

. (13)

The right hand side of (12) can be identified as the equations of motion for x and y. For px andpy the equations of motion can be found using (3)

px = −∂H

∂x= py +

(1− µ)(x + µ)

((x + µ)2 + y2)3/2+

µ(x + µ− 1)

((x + µ− 1)2 + y2)3/2(14)

py = −∂H

∂y= −px +

(1− µ)y

((x + µ)2 + y2)3/2+

µy

((x + µ− 1)2 + y2)3/2. (15)

As in all other Hamiltonian systems, the Hamiltonian (13) is conserved along the flow. ThereforeC = −H/(2 · 1.20322) is also conserved. This quantity is called the Jacobi-integral. [19]

3.2 Effective potential and the Lagrange points

When the satellite is stationary in the synodic frame we see from (12) that the generalizedmomenta will simply be given by px = −y and py = x. If this is inserted in the Hamiltonian(13) we see that the result equals the Hamiltonian minus 1

2(x2 + y2). The expression is thereforedenoted the effective potential (see figure 2)

Veff = −x2 + y2

2− 1− µ√

(x + µ)2 + y2− µ√

(x + µ− 1)2 + y2. (16)

3

Page 9: Here - Jeppe Juul

Figure 2: Left: The effective potential with the five Lagrange points. Right: Thesatellite can not enter regions where the effective potential is higher than the valueof the Hamiltonian of the satellite. Figure taken from [11].

As 12(x2 + y2) is always positive, we have H > Veff . If the satellite starts at a point i phase

space with Hamiltonian H, this inequality defines the region of space where the satellite canmove.

The extrema of Veff corresponds to equilibrium points in the synodic frame, i.e. pointswhere the satellite can remain stationary with respect to the Moon and the Earth. Five suchpoints exist, called the Lagrange points. The Lagrange point L1 is located between the Moonand the Earth, approximately at (x, y) = (1− (µ/3)1/3, 0). [4]

3.3 Theoretical minimum for ∆v

The Hamiltonian of a satellite orbiting the Earth at an altitude of 167 km can be found using(13) and simple Newtonian calculations. If the same calculations are carried out for a satelliteorbiting the Moon at an altitude of 100 km, one gets [19]

HEarth orbit = −29.227 HMoon orbit = −2.752. (17)

When the satellite travels from the Earth to the Moon, we see from figure 2 that it must crossa point in phase space with Veff greater or equal to Veff evaluated in the first Lagrange pointL1. Because H ≥ Veff the Hamiltonian must at that point satisfy

HL1 ≥ Veff

∣∣∣L1

= −x2

2− 1− µ

x + µ− µ

|x + µ− 1|

∣∣∣x=1−(µ

3)1/3

= −1.594, (18)

where (8) has been used.The only way the Hamiltionian can change from -29.227 in Earth orbit to -1.594 at L1, is

through one or more velocity changes ∆v along the way. From (13) it is seen that such anacceleration will change the Hamiltonian by an amount ∆H

∆H = |∆v|2 + ∆v · v (19)

where v is the velocity of the satellite in the inertial frame. Thus, the Hamiltonian is changedthe most if the acceleration and velocity are parallel, and if the acceleration is carried out whenthe satellite has the greatest velocity. This is when the satellite is closest to the Earth.

Using (17), (18) and (19) the lowest theoretical value of ∆vEL, necessary to get the satellitefrom Earth orbit to L1, can be calculated. Using the same procedure velocity change ∆vLM

4

Page 10: Here - Jeppe Juul

necessary for the satellite to go from L1 to Moon orbit can be found. The sum of these isdenoted ∆vEM . [19]

∆vEL = 3099 m/s ∆vLM = 622 m/s ⇒ ∆vEM = 3721 m/s. (20)

4 Existing trajectory designs

So far it has not been possible to find a trajectory from Earth orbit to Moon orbit, using onlythe minimum ∆v given by (20). To find such a trajectory many design strategies have beenproposed. In this section I will describe some of the more important of these. In table 1 fuelcost and typical flight times for different types of trajectories are shown.

4.1 Direct transfer: Hohmann

The simplest and the fastest type of trajectory is the direct transfer, including the Hohmanntransfer. A large burn sends a satellite from low Earth orbit to an elliptic trajectory, whichcrosses the orbit of the Moon. If the timing is right, the satellite will end up with a distance tothe Moon corresponding to the radius of the desired final orbit and with a velocity tangential tothe Moon. Another burn is then performed to slow the satellite down, causing it to enter Moonorbit. [18]

4.2 Weak stability boundaries: Belbruno-Miller

Belbruno and Miller have found a class of trajectories where the gravitational pull from the Sunis taken into account along with that of the Moon and the Earth. This system is called therestricted four body problem [2]. Regions in phase space where gravitational attractions of theSun, the Moon and the Earth tend to balance are called weak stability boundaries (WSB) [9].The second Lagrange point L2 is in such a region.

From low Earth orbit the satellite is accelerated, causing it to fly by the Moon and continuingapproximately four Earth-Moon distances into the WSB region. Here a small burn is performedto put the satellite into a ballistical lunar captured trajectory. That is, an unstable elliptic orbitwith low eccentricity. Then a final maneuver is performed to put the satellite into circular orbit.[3] [1] [18] [20]

4.3 L1 hyperbolic transit orbits: Topputo

As oppose to the WSB trajectories, that pass close by L2, Topputo has developed a designstrategy where the satellite passes close by the first Lagrange point, L1. A linearization of theequations of motion (12), (14) and (15) shows that the satellite close to L1 will follow hyperbolictransit orbits.

The trajectory from Earth orbit to Moon orbit is split into two legs: The Earth-L1 leg andthe L1-moon leg. Both legs are found by solving a two-point boundary value problem for therestricted three body problem using the Lambert three-body arc method [20]. The solutionsare trajectories with very long flight-time, but especially in the L1-Moon leg much propellant issaved (see table 1).

5 Trajectory design

Having studied existing trajectory designs, I have developed my own design and written aMATLAB program to find the trajectories.

5

Page 11: Here - Jeppe Juul

Trajectory Total ∆vEM Earth injection ∆vEL Moon injection ∆vLM Flight timeMinimum 3721 m/s 3099 m/s 622 m/s Not foundHohmann 3959 m/s 3140 m/s 819 m/s 5 daysBelbruno-Miller 3838 m/s 3187 m/s 651 m/s 3 monthsTopputo 3895 m/s 3265 m/s 630 m/s 8 months

Table 1: Propellant requirements and typical flight times for different types of tra-jectories going from Earth orbit (167 km altitude) to moon orbit (100 km altitude).All ∆v are in m/s. [19] [20]

As in the Topputo method described in subsection 4.3, I let the trajectory pass through thefirst Lagrange point L1. The trajectory can therefore be split up into an Earth-L1 leg and aL1-Moon leg. As opposed to Topputo, I will not find these legs by solving a two-point boundaryvalue problem.

Instead I will find a lot of trajectories going from Earth orbit out in space, and a lot oftrajectories ending at the point L1 with a velocity toward the Moon. The trajectories startingin Earth orbit are integrated forward in time and the trajectories that end in L1 are integratedbackward in time. At the intersections between these two types of trajectories the ∆vtransfer

necessary to go from one trajectory to the other is calculated (see figure 3). If ∆vtransfer isadded to the velocity change ∆vEarth the satellite performed in Earth orbit, the total change ofvelocity ∆vEL necessary to go from Earth orbit to L1 is found.

Figure 3: Trajectories starting in Earth orbit are integrated forward in time, andtrajectories ending in L1 are integrated backwards in time. At the intersections the∆vtransfer necessary to go from one trajectory to the other is calculated. This changeof velocity, along with the ∆vEarth that made the satellite leave Earth orbit, amountsto the total ∆vEL to get from the Earth to L1.

In this design it is ensured that the main velocity change, ∆vEarth, takes place when thesatellite is orbiting the Earth, which results in the greatest change of the Hamiltonian (seesection 3.3).

When low ∆vEL trajectories are found, the same procedure is carried out for the L1-Moonleg. This time the trajectories starting at L1 are integrated forward in time, and the trajectoriesending in Moon orbit are integrated backwards in time. In the end the Earth-L1 leg and theL1-Moon leg are connected to one another via a change of velocity ∆vL1.

The MATLAB-program finding trajectories going from Earth orbit to L1 is made up of threeparts:

6

Page 12: Here - Jeppe Juul

1. The first gives different satellites orbiting the Earth the burn ∆vEarth, and stores infor-mation of the resulting trajectories.

2. The second starts at L1 and integrates backwards in time in different directions andusing different initial velocities. For every Earth-trajectory that is crossed, the programcalculates ∆vEL, and the matches with the lowest values are stored.

3. The third repeats the two first parts with increased accuracy and resolution, now onlyusing initial values lying close to those yielding the lowest ∆vEL.

In the next three sections the three parts of the program are described in detail. The codefor the three parts can be found in appendix A.1, A.2 and A.3. In section 5.4 it is described howto change the program in order to find trajectories going from L1 to the moon. The discussionof how to integrate the equations of motion (12), (14) and (15) fastest and most accurately issaved for section 6.

5.1 Trajectories from the Earth approaching L1

The first task in this part of the program is to choose a number of initial values η0 the satellitecan have after the burn ∆vEarth is performed.

The satellite can orbit the Earth either clockwise or counterclockwise, and the change ofvelocity ∆vEarth can be carried out while the angle θ1 has any value between 0 and 2π (seefigure 4). The change of velocity should be ∆vEarth ≈ 3099 m/s (see section 4) but can varyslightly in magnitude. The angle θ2 between the burn and the velocity of the satellite can takeany (small) value. This gives four degrees of freedom when constructing the initial values η0 ofthe trajectory.

Choosing 10 different values of ∆vEarth, 63 values of θ1 and 5 values of θ2 a total numberof 6300 different initial values are used. These are chosen in such a way that the resultingtrajectories differ from each other as much as possible, and so the values H(η0) are close to thatof HL1 found in (18).

Figure 4: The satellite can start out at any angle θ1 in the orbit of the Earth androtate either clockwise or counterclockwise. The velocity change ∆vEarth can varyslightly in magnitude and can be applied at different small angles θ2. Varying theseparameters 6300 different initial values of the satellite were selected.

I choose to integrate the trajectories for a period of 100 ’days’, or until the satellite eithercrashes into the Earth or the Moon, or until the absolute value of the x- or y-component ofthe trajectory exceeds 1.5, corresponding to 1.5 times the distance between the Earth and theMoon. If this happens the satellite is considered to have escaped the Earth-Moon system, andSun-perturbations ought to be taken into account.

7

Page 13: Here - Jeppe Juul

Information on the trajectories should be stored in a way that uses as little memory aspossible and allows the second part of the program to easily search for the lowest ∆vtransfer.By storing the information in different matrices corresponding to different (x, y)-values, onlythe information of points with the right (x, y)-values has to be searched in the second part ofthe program. Therefore, for each point {(x, y)|x, y ∈ Z/200 ∧ |x|, |y| < 1.5} a matrix is createdin the cell array called ’system’. For a fixed number of points nopoints along each trajectorythe (x, y)-components of η(t) are rounded to the nearest part in 200, and in the correspondingmatrix in ’system’ the velocity vector of the satellite is stored along with the time t and a numberto identify the initial value η0 of the trajectory.

The number of points nopoints is chosen such that information of only one or two η(t) isstored in each matrix the trajectory passes.

The resolution of the cell array ’system’ is set to ∆x = 1/200. This resolution is chosenby considering the advantages and disadvantages of a high resolution. With a high resolution(small ∆x) the number of stored points has to be higher, and more memory is required. Usinga low resolution, there is an increased risk that two trajectories, that are thought to intersect,actually only pass by each other with a distance d < ∆x. This effect will lead to wrong resultsfor the found ∆vEL and the error will be largest close to the earth, as the effective potential (16)has the largest gradient in this area. I therefore choose to disregard all transfers closer than 0.1to the Earth.

5.2 Trajectories from L1 approaching the Earth

When the trajectory of a satellite ends at L1, only two degrees of freedom are available forconstructing the final values ηfinal of the trajectory. These are the direction angle and magnitudeof the velocity at L1. Choosing 63 different direction angles and 25 different velocities, a totalnumber of 1575 final values are used.

The trajectories are integrated 100 ’days’ backward in time, or until the satellite eithercollides with the Earth or the Moon, or the absolute value of the x- or y-component of thetrajectory exceeds 1.5.

For the number nopoints of points along each trajectory the (x, y)-components of η(t) arerounded to the nearest part in 200, and the corresponding matrix in ’system’ is identified.This matrix contains information of all trajectories starting in Earth orbit, that in a pointclose to (x, y) intersect the trajectory ending in L1. For each set of information the ∆vtransfer

is calculated and added to the corresponding ∆vEarth to get ∆vEL. The minimum value of∆vEL is saved in a new matrix called ’matches’, along with information about η0 and ηfinal

of the intersecting trajectories, the point (x, y) and the integration time before and after theintersection.

In the end the 2000 matches with lowest ∆vEL are picked out and all other matches weredeleted.

5.3 Optimizing the trajectories

In this part of the program the matches found in section 5.2 are integrated again, using smallerstep size h and smaller ∆x. Furthermore the trajectories in the matches are varied to optimizethe final result for the velocity change. The program can be split into 6 parts:

1. First the matches that are to be optimized are selected. These are the 20 best matches,which do not share the same initial values both in Earth orbit and at L1. This way itis ensured that the same trajectories are not optimized several times. For each of the 20matches the following actions are carried out:

8

Page 14: Here - Jeppe Juul

2. The accuracy and resolution are increased by decreasing ∆x and the step size h.

3. The integration times ’tmaxEL’ and ’tmaxLE’ are set to be 4.3 days after the intersectionoccurs in the match.

4. 27 initial values in Earth orbit and 9 initial values at L1 are computed in a way, so that theyare close to the initial values η0 used in the original match. Using these in the integration,the optimal initial values are found, and the original match is therefore optimized.

5. From the 27 initial Earth values a new cell array ’system’ is generated, and using the 9initial L1 values the matches with lowest ∆vEL are found and stored.

6. For the best match found under point 5, the steps 3-5 are repeated. This way the optimizedtrajectory is again optimized, decreasing ∆vEL further.

5.4 Trajectory from L1 to Moon orbit

The trajectory going from L1 to Moon orbit using the smallest velocity change ∆vLM is foundusing the same procedure as the trajectory going from Earth orbit to L1. However, a few changeshave to be made.

First of all, forward time integration now has to be used for the trajectories starting at L1,and backward time integration is used for the trajectories starting in Moon orbit.

Furthermore, the distance between the Moon and L1 is far smaller than the distance betweenthe Earth and L1, and the size of the ’system’ should therefore be reduced correspondingly. Thesatellite is now said to have left the system if the x-component of the trajectory becomes lessthan 0.8 or more than 1.2, or if the absolute value of the y-component of the trajectory exceeds0.2. For the same reasons the resolution of the ’system’ has to be increased, and ∆x is thereforedecreased to 5 · 104 instead of 5 · 103.

Because of the higher resolution and because the gradient of the effective potential is smallerclose to the Moon than equally close to the Earth, only the transfers closer than 0.02 to themoon are disregarded. For the Earth-L1 leg all transfers closer than 0.1 to the Earth weredisregarded.

6 Numerical integrators

6.1 Numerical integrators and orders

Numerical integrators are used to approximate the flow over time of a system of differentialequations. In this paper, only systems of first order ordinary differential equations with noexplicit time dependence will be considered. The equations of motion (3) of a Hamiltoniansystem will be of this form, if the Hamiltonian has no explicit time dependence.

A one-step numerical integrator is a map Φh(η0), which associates the point η0 in phasespace with a point close to ϕh(η0) defined by (6). Here h is the step size in time t. The smallerh is chosen to be, the closer Φh(η0) will be to ϕh(η0). A one-step method is said to have orderp if the distance between Φh(η0) and ϕh(η0) for small h is of order O(hp+1). [5]

Φh(η0) = ϕh(η0) +O(hp+1) for h → 0. (21)

Typically, the difference between H(Φh(η0)) and H(ϕh(η0)) will also be of O(hp+1). The totaldifference after n iterations will thus be of the order:

H(Φnh(η0))−H(ϕnh(η0)) = n · O(hp+1) = O(nhp+1) = O(thp). [14] (22)

9

Page 15: Here - Jeppe Juul

Most often order considerations are based on Taylor-expansions. Throughout the project allmaps will be assumed analytical, thus making Taylor expansions possible to any order.

6.1.1 Example: Explicit 4th order Runge-Kutta

The Runge-Kutta methods is an important class of one-step integrators. For the system η =f(η), an explicit 4th order Runge-Kutta method is given by:

Φh(η) = = η +h

6(k1 + 2k2 + 2k3 + k4) where

k1 = f(η) =ddt

η

k2 = f(η +h

2k1) =

ddt

η +h

2d2

dt2η (23)

k3 = f(η +h

2k2) =

ddt

η +h

2d2

dt2η +

h2

2d3

dt3η (24)

k4 = f(η + hk3) =ddt

η + hd2

dt2η +

h2

2d3

dt3η +

h3

4d4

dt4η. (25)

Inserting k1 − k4 and collecting terms of h we get

Φh(η) = η + hddt

η +h2

2d2

dt2η +

h3

6d3

dt3η +

h4

24d4

dt4η. (26)

This is exactly the first 5 terms of the Taylor expansion of ϕh(η). The next leading term willbe of order O(h5) making this the difference between ϕh(η) and Φh(η). Thus this Runge-Kuttamethod is indeed of order 4. The method is explicit because all iteration steps can be calculateddirectly without solving any non-trivial equations.

6.2 Partitioned methods and symplectic integrators

A one step integrator is symplectic if it satisfies the symplecticity condition (7)

∂Φh

∂η

T

J∂Φh

∂η= J (27)

Symplectic integrators give rise to long time energy conservation (see figure 5). The proof ofthis is comprehensive, but can be found in e.g. [14] and [5].

Symplecticity is sometimes obtained using partitioned Runge-Kutta methods, where some ofthe variables of η are integrated using one Runge-Kutta method, and the rest are treated withanother Runge-Kutta method.

6.2.1 Example: Symplectic Euler method

The symplectic Euler method is a partitioned Runge-Kutta method of first order [5]. The p andthe q variables of η are integrated using two different Runge-Kutta methods giving the mapΦh(η0) the form

Φh(η0) = η0 =(

p1

q1

)=

(p0 − h∂H

∂q (p1, q0)q0 + h∂H

∂p (p1, q0)

). (28)

10

Page 16: Here - Jeppe Juul

Figure 5: Long time energy conservation of symplectic integrators. In short periodsof time the 4th order Runge Kutta integrator conserves energy better than the firstorder symplectic Euler, but in longer timescales the latter conserves energy betterdue to its symplecticy. The plot is generated using the restricted three body problemwith a step size in time h = 0.0004

Note that it is an implicit method, as p1 must be found by solving the equation (28). To showthe symplecticity of the method the Jacobian ∂Φh(η)

∂η = ∂η1∂η0

must be computed. Differentiating(28) with respect to η0 yields

∂η1

∂η0

=

[ ∂p1∂p0

∂p1∂q0

∂q1∂p0

∂q1∂q0

]=

[1− hHqp

∂p1∂p0

−hHqq − hHqp∂p1∂q0

hHpp∂p1∂q0

1 + hHpq + hHpp∂p1∂q0

], (29)

where Hij is the second partial derivative of H with respect to i and j evaluated in (p1, q0).Solving the four equations the Jacobian is found to be

∂η1

∂η0

=1

(1 + hHqp)2

[1 −hHqq

hHpp (1 + hHpq)2 − h2HqqHpp

]. (30)

It is now a simple matter to show that the symplecticity condition (27) is satisfied.

6.3 Symmetric integrators and composition methods

For a one-step integrator Φh, the adjoint Φ∗h is defined as the inverse map with negative timestep:

Φ∗h = Φ−1

−h (31)

The adjoint defines a new integator that will be of same order as Φh [5]. An integrator issymmetric if it equals its adjoint Φh = Φ∗

h. We will show that the order of symmetric integratorsalways will be even. If the method is symmetric and of order p we have from (21)

Φ∗h(η0) = Φh(η0) = ϕ(η0) + C(η0)h

p+1 +O(hp+2). (32)

If the local error of Φ∗h is denoted e∗, we have

e∗(η0) = Φ∗h(η0)− ϕ(η0) = C(η0)h

p+1 +O(hp+2). (33)

11

Page 17: Here - Jeppe Juul

If this error is projected back by Φ−h the result e(η0) will be given by

e(η0) = Φ−h(Φ∗h(η0))− Φ−h(ϕ(η0))

= η0 −(η0 + C(ϕ(η0))(−h)p+1 +O(hp+2)

)= (−1)pC(ϕ(η0))h

p+1 +O(hp+2)= (−1)pC(η0)h

p+1 +O(hp+2), (34)

where the last equality arises because C(η0) = C(ϕ(η0))(1 + O(h)). Likewise, e and e∗ musthave the same leading term [14]. For this to be true we see from (34) and (33) that p must beeven.

A way to develop symmetric integrators is to use composition methods Ψh:

Ψh = Φγsh ◦ Φγs−1h ◦ . . . ◦ Φγ1h where γ1 + . . . + γs = 1. (35)

If the components Φi is a method of order p, the local errors at each step (see figure 6) will be

e1 = C(η0) · γp+11 hp+1 +O(hp+2)

e2 = C(η1) · γp+12 hp+1 +O(hp+2)

...es = C(ηs−1) · γp+1

s hp+1 +O(hp+2). (36)

To leading order the error E of Ψh will be the sum of the local errors. Generally, a composition

Figure 6: (a) Composition Ψh with the three components Φγ2h, Φγ2h and Φγ3h. (b)Each step Φγih has an error ei, giving the total error E. To leading order E will bethe sum of the eis. Figure reconstructed from [5].

method will therefore be of same order as its components, but if

γp+11 + . . . + γp+1

s = 0 (37)

we see that the total error will have no term of order O(hp+1) and the composition method Ψh

will at least be of order p + 1.A composition of symplectic integrators will also be symplectic. This is easily shown for a

composition Φ2 ◦ Φ1 by inserting the Jacobian into (27)

∂Φ2(Φ1(η))∂η

T

J∂Φ2(Φ1(η))

∂η=

(∂Φ2(Φ1(η))

∂Φ1(η)∂Φ1(η)

∂η

)T

J∂Φ2(Φ1(η))

∂Φ1(η)∂Φ1(η)

∂η

=∂Φ1(η)

∂η

T ∂Φ2(Φ1(η))∂Φ1(η)

T

J∂Φ2(Φ1(η))

∂Φ1(η)∂Φ1(η)

∂η(38)

=∂Φ1(η)

∂η

T

J∂Φ1(η)

∂η= J.

12

Page 18: Here - Jeppe Juul

6.3.1 Example: Störmer/Verlet

The Störmer/Verlet method Ψh is the composition of the symplectic Euler (28) with its adjoint[5]. It is easy to show that it is a symmetric method:

Ψh = Φh/2 ◦ Φ∗h/2 = Φh/2 ◦ Φ−1

−h/2 (39)

Ψ∗h = Ψ−1

−h =(Φ−h/2 ◦ Φ−1

h/2

)−1= Φh/2 ◦ Φ−1

−h/2 = Ψh, (40)

and due to its symmetry it has order 2.Because the Störmer/Verlet method is composed of symplectic integrators, it is itself sym-

plectic.

6.4 Splitting methods

Another way to approximate the flow of a Hamiltonian system η = J−1∇H, is to split it intoa sum of two or more systems, η = J−1∇

(H [1] + . . . + H [n]

), each of which can be solved

explicitly (see figure 7).

Figure 7: If the vector field can be split into two or more components for which theflow can be found explicitly, a splitting method can be developed.

If the exact flow of η = J−1∇(H [i](η) is called ϕ[i]t , a one step integrator that approximates

the flow ϕh of the total system is

Φh = ϕ[n]h ◦ . . . ◦ ϕ

[1]h . (41)

By Taylor expansion it is found that both ϕh(η0) and Φh(η0) can be expressed as η0 +hJ−1∇H(η0) + O(h2). Thus they only differ at order O(h2), and a general non-symmetricsplitting method is therefore of order 1. [14]

However, one can construct a symmetric splitting as follows

Φ2ndh = ϕ

[1]h/2 ◦ . . . ◦ ϕ

[n]h/2 ◦ ϕ

[n]h/2 ◦ . . . ◦ ϕ

[1]h/2. (42)

Due to its symmetry it must be of order 2 (see section 6.3).From the second order symmetric splitting method, it is possible to construct integrators of

arbitrarily high orders, using composition methods. A fourth order method can be constructedin the following way

Φ4thh = Φ2nd

γ1h ◦ Φ2ndγ2h ◦ Φ2nd

γ3h where γ1 = γ3 =1

2− 21/3, γ2 = − 21/3

2− 21/3. (43)

13

Page 19: Here - Jeppe Juul

Inserting (43) into (37) shows that the method is at least of order 3, but due to its symmetry itmust be of order 4. Likewise, a method of order 6 can be constructing by

Φ6thh = Φ4nd

γ1h ◦ Φ4ndγ2h ◦ Φ4nd

γ3h where γ1 = γ3 =1

2− 21/5, γ2 = − 21/5

2− 21/5. (44)

Generally, a splitting method of order p + 2 can be constructed by composition of integrators oforder p using the γs:

γ1 = γ3 =1

2− 21

p+1

, γ2 =2

1p+1

2− 21

p+1

, (45)

which satisfies (37). [5]Because splitting methods are compositions of flows of Hamiltonian systems, and because

such flows are always symplectic (see (7)), splitting methods are always symplectic.

6.5 Choice of integrator

To find the best integrator to use in this project, all of the above mentioned integrators havebeen constructed in MATLAB (see appendix B)

Symplectic Euler and Störmer/Verlet are the only implicit integrators described above. In-stead of having MATLAB solve the implicit equations at every iteration, I have solved theequations by hand, thereby making the programs consist only of function evaluations.

In order to construct the splitting methods, the Hamiltonian (13) must be split into two ormore Hamiltonians for which the equations of motion can be solved analytically. This has, tomy best knowledge, never been done before for the Hamiltonian (13), and this is the subject ofnext subsection. In subsection 6.5.2 the integrators are compared to each other.

6.5.1 Splitting the Hamiltonian and solving equations of motion

One way of splitting the Hamiltonian into two, resulting in simple analytical expressions for ϕ[1]t

and ϕ[2]t is

H [1] =p2

x

2+

p2y

2+ pxy − pyx−

72x2 + 2xy (46)

H [2] = − 1− µ√(x + µ)2 + y2

− µ√(x + µ− 1)2 + y2

+72x2 − 2xy, (47)

yielding the equations of motions:

H [1] : η = J−1∇H [1] =

0 1 7 −2−1 0 −2 01 0 0 10 1 −1 0

η (48)

H [2] : η = J−1∇H [2] =

− (x+µ)(1−µ)

((x+µ)2+y2)3/2 −µ(x+µ−1)

((x+µ−1)2+y2)3/2 − 7x + 2y

− y(1−µ)

((x+µ)2+y2)3/2 − yµ((x+µ−1)2+y2)3/2 + 2x

00

. (49)

The terms of −72x2 + 2xy are added and subtracted in (46) and (47) in order to give the matrix

in (48) simple eigenvalues. In this case the values -2, -1, 1 and 2.

14

Page 20: Here - Jeppe Juul

Now the equations of motion may be solved to give [17]

ϕ[1]t (η0) = C1

−43−12

e2t + C2

1−10−1

et + C3

113−4−7

e−t + C4

81−3−2

e−2t

ϕ[2]t (η0) =

[− (x(0)+µ)(1−µ)

((x(0)+µ)2+y(0)2)3/2 −µ(x(0)+µ−1)

((x(0)+µ−1)2+y(0)2)3/2 − 7x(0) + 2y(0)]t + px(0)[

− y(0)(1−µ)

((x(0)+µ)2+y(0)2)3/2 −y(0)µ

((x(0)+µ−1)2+y(0)2)3/2 + 2x(0)]t + py(0)

x(0)y(0)

.

The constants C1-C4 in ϕ[1] are determined using the initial values η(0)

6.5.2 Comparison of integrators

Comparing the numerical methods, the satellite was set to start at η0 ≈ (0 , 10.62929 , 0.00488 , 0),corresponding to a location 167 km above the surface of the earth, with a value of the Hamilto-nian close to (18).

For each integrator the trajectory was integrated from t = 0 to t = 23.04, corresponding to100 days, using time steps ranging from h = 0.004 to h = 2.5 · 10−6. The integration time ona 2.4 GHz dual core computer was found for each integration. The final energy was comparedto the initial energy, and the position in phase space was compared to a position obtained byintegrating the same problem to the limit of double precision. The results are shown in figure 8.

Figure 8: The errors in energy (left) and phase space (right) for each integrator asa function of stepsize in time (upper) and total integration time (lower) for eachintegrator. For very small h the accuracy is limited by rounding errors in MATLAB.For integration times above seven seconds the 4th order Runge-Kutta method is seento be most accurate.

15

Page 21: Here - Jeppe Juul

It is seen that for relatively large step sizes h, the integrators with higher orders are closestto the right energy and point in phase space. However, for very small h, all integrators haveproblems getting closer than 10−4 of the ’correct’ η. This is due to rounding errors in MATLAB,and could be avoided by enhancing the precision. However, this would increase the integrationtime drastically, and I therefore choose not to do this.

It appears that the 4th order Runge-Kutta method is not affected by the rounding errors tothe same extent as the other methods. This is because each time step only involves 5 calculations.In comparison the 8th order splitting method involves 81 calculations.

The two lower plots of figure 8 show that the second order splitting method is the mostaccurate for integration times below approximately seven seconds, while 4th order Runge Kuttais most accurate for integration times of more than seven seconds. This is surprising, as theRunge-Kutta method is the only non-symplectic integrator used. However, figure 5 shows thatthe long-time energy conservation of the symplectic integrators are relevant only for longertimescales and larger h.

Based on the results displayed in figure 8, I chose to use the 4th order Runge-Kutta methodwith h = 10−4 in the first two parts of the MATLAB program, described in section 5.1 and 5.2.According to the results this integrator gives an integration time of approximately 17 secondsper trajectory and an accuracy in energy and phase space after 100 ’days’ of approximately 10−5

and 10−3, respectively.In the third part of the program, described in section 5.3 the accuracy should be enhanced,

so I choose to use a step size h = 2 ·10−5 giving an integration time of approximately 70 secondsand an accuracy in energy and phase space of approximately 10−8 and 10−5, respectively.

7 Results

7.1 Earth-L1 leg

Of the 6300 different trajectories starting in Earth orbit 2521 were integrated for the full 100days, 4310 trajectories ended up colliding with the Earth or the Moon and 201 ended up leavingthe system. Of the 1575 trajectories starting at L1 927 were integrated for the full 100 days,443 trajectories ended up colliding with the Earth or the Moon and 205 ended up leaving thesystem.

Before the optimization described in section 5.3, the match with the minimum velocity changehad ∆vEL = 3065 m/s. The match with the 20th lowest velocity change had ∆vEL = 3088 m/s.This is to be compared to the theoretical minimum ∆vEL = 3099 m/s. This, and all otherresults, are discussed in section 8.

After the 20 best results had been optimized, higher values for the velocity change wereobtained. The velocity changes and flight times of the three best optimized matches are shownin table 2 together with the velocity the satellite ends up having at L1. All of the 20 optimizedtrajectories have the velocity 650 m/s at L1 and angles of direction within 0.3 degrees of eachother.

Velocity change ∆vEL ∆vEarth ∆vtransfer Velocity at L1 Flight time3096.8 m/s 3080 m/s 16.8 m/s 650 m/s 83.3 days3106.9 m/s 3080 m/s 26.8 m/s 650 m/s 83.1 days3115.8 m/s 3076 m/s 39.8 m/s 650 m/s 137.6 days

Table 2: Data of the three trajectories going from Earth orbit to L1 having the lowestvelocity change.

16

Page 22: Here - Jeppe Juul

7.2 L1-Moon leg

Of the 6300 different trajectories starting in Earth orbit 529 were integrated for the full 100 days,5385 trajectories ended up colliding with the Moon or the Earth, and 386 ended up leaving thesystem. Of the 1575 trajectories starting at L1 985 were integrated for the full 100 days, 479trajectories ended up colliding with the Earth or the Moon, and 111 ended up leaving the system.

Before optimization the match with the minimum velocity change had ∆vLM = 614.4 m/s,with the theoretical minimum being ∆vLM = 622 m/s. The match with the 20th lowest velocitychange had ∆vEL = 616.5 m/s.

After the optimization, higher values for the velocity change of the best matches were againobtained. The velocity changes and flight times of the three best optimized matches are shownin table 3 along with the velocity the satellite ends up having at L1. For all of the 20 optimizedmatches the velocities at L1 were between 8.64 m/s and 9.28 m/s, and the angles of directionwere within 0.5 degrees of each other.

Velocity change ∆vLM ∆vMoon ∆vtransfer Velocity at L1 Flight time620.5 m/s 616 m/s 4.5 m/s 8.66 m/s 68.4 days620.5 m/s 616 m/s 4.5 m/s 8.67 m/s 100.2 days621.3 m/s 615 m/s 6.3 m/s 8.99 m/s 163.0 days

Table 3: Data of the three trajectories going from L1 to Moon orbit having the lowestvelocity change.

7.3 Total Earth-Moon trajectory

When connecting the Earth-L1 leg and the L1-Moon leg, a velocity change ∆vL1 is needed atL1.

The total velocity change ∆vEM = ∆vEL + ∆vL1 + ∆vLM can be minimized by choosingdifferent combinations of Earth-L1 trajectories and L1-Earth trajectories. It is found that theminimum ∆vEM is obtained when the trajectory with the lowest ∆vEL is combined with thetrajectory with the lowest ∆vLM .

The data for the trajectory going from Earth orbit to Moon orbit with the lowest ∆vEM

is listed in table 4 along with the theoretical minimum as found in section 3.3. In figure 9 thetrajectory is plotted in the synodic frame.

Trajectory Total ∆vEM ∆vEL ∆vL1 ∆vLM Flight timeFound 4369.5 m/s 3096.8 m/s 652.2 m/s 620.5 m/s 151.7 daysminimum 3721 m/s 3099 - 622 m/s -

Table 4: Data of the full Earth-Moon trajectory with lowest ∆vEM along with thetheoretical minimum.

8 Discussion

Many of the integrated trajectories ended up colliding with the Earth or the Moon, especiallyin the case of the L1-Moon leg. This can be understood in the following way: If the Earth isignored, the satellite would, when it is accelerated from Moon orbit, enter an elliptic orbit withperigee 100 km above the surface of the Moon. The presence of the Earth will, of course, modifythis trajectory, and in many cases the satellite will be displaced more than 100 km (2.6 · 10−4

17

Page 23: Here - Jeppe Juul

Figure 9: The Earth-L1 trajectory with the lowest ∆vEL = 3096.8 m/s is plottedin the synodic frame along with the L1-Moon trajectory with the lowest ∆vLM =620.5 m/s. The velocity change at L1 is ∆vL1 = 652.2 m/s, giving the total ∆vEM

= 4369.5 m/s.

unit lengths) in the direction of the Moon, and therefore collide with it. The same effect ispresent, though less prominent, in the Earth-L1 leg.

In both the Earth-L1 and the L1-Moon leg, the 20 optimized matches have velocities andangles of direction very similar to each other. This indicates that the found trajectories are closeto each other in phase space, and therefore not independent of each other. This also explainswhy all combinations of matches from the Earth-L1 leg and the L1-Moon leg had about thesame, very high ∆vL1.

Both before and after the optimization, ∆vEL and ∆vLM are lower than the theoreticalminimum values (see table 4). This is due to the fact that the resolution of the ’system’ is finite.When two trajectories are within ∆x from each other, they are thought to intersect, but if theyinstead pass by each other in parallel at a distance d < δx, a velocity change can be ’saved’proportional to the change of the effective potential (16) between the trajectories. That this isindeed what has happened is shown in figure 10.

This also explains why both ∆vEL and ∆vLM increase during the optimization described insection 5.3. Here ∆x is decreased by a factor of 10, and ∆vEL and ∆vLM therefore approachthe theoretical minimum values. If the resolution is increased further, the velocity change wouldexceed the minimum values.

9 Possible improvements on the trajectory designs

The most obvious way to improve the trajectory design strategy is to implement a minimizationof the velocity change at L1 in the program. This could be done as illustrated in figure 11:

The cell-array ’system’ is still created for both the Earth and the Moon using the sametechniques as described in section 5.1. In the second part of the program, described in section5.2, the minimum ∆vEL and ∆vLM are found for each initial value at L1. Afterwards, a new

18

Page 24: Here - Jeppe Juul

Figure 10: At the points where the trajectory going from Earth is thought to intersectthe trajectory coming from L1 (backward in time), they are actually passing eachother in parallel. Since the value of the effective potential changes between thetrajectories, a velocity change can be ’saved’ causing the calculated ∆vEL and ∆vLM

to be lower than the theoretical minimum values.

program could pair different trajectories from the two legs, searching for the lowest possible totalvelocity change ∆vEM = ∆vEL + ∆vL1 + ∆vLM .

Another way to extend the project would be to compare more integrators than the sevendescribed in section 6, or one could vary the step size h during the integration, so the smalleststep size is used when the gradient of the effective potential is largest. This way fewer integrationsteps are necessary to obtain the same accuracy on the results.

Figure 11: Proposal for a new trajectory design strategy incorporating the minimiza-tion of ∆vL1: For each of the trajectories going from L1 and approaching either theEarth or the Moon, the velocity change to go into orbit (∆vEL or ∆vLM ) is foundusing the same methods as described in section 5.2. Afterwards these results aresearched for the minimum ∆vEM = ∆vEL + ∆vL1 + ∆vLM

19

Page 25: Here - Jeppe Juul

10 Conclusion

If all other celestial objects than the Earth and the Moon are neglected, the motion of a satellitein the synodic frame will be governed by the equations of motion (12), (14) and (15), with theHamiltonian (13) conserved along the flow. The equilibrium points of this chaotic, dynamicalsystem are called Lagrange points.

The theoretical minimum ∆vEM necessary to get a satellite from Earth orbit (167 km al-titude) to Moon orbit (100 km altitude) is 3721 m/s, and the corresponding trajectory passesthrough the first Lagrange point L1. This trajectory has not been found.

In order to find a low energy trajectory going from Earth orbit to L1, 6300 initial values inEarth orbit have been numerically integrated 100 days forward in time and 1575 initial values atL1 have been numerically integrated 100 days backward in time. At the intersections betweenthese two types of trajectories, the total ∆vEL to go from Earth orbit to L1 was calculated.For the best results the calculations were repeated with better accuracy and resolution. Thetrajectory with the lowest velocity change found this way had ∆vEL = 3096.8 m/s, which islower than the theoretical minimum of 3099 m/s.

The procedure was repeated for a satellite going from L1 to Moon orbit. Here, the trajectorywith the lowest velocity change had ∆vLM = 620.5 m/s, the theoretical minimum being 622 m/s.The found velocity changes are lower than the theoretical minima because a finite resolutionwas used in the numerical models.

When the Earth-L1 and L1-Moon trajectories are put together, an extra velocity change∆vL1 has to be performed. Due to this, the most fuel efficient trajectory found, going fromEarth orbit to Moon orbit, has the total velocity change of ∆vEM = 4369.5 m/s. This is muchhigher that the lowest theoretical value of 3721 m/s. A future model should therefore implementa minimization of ∆vL1 along with ∆vEL and ∆vLM .

To find the one-step integrator, which fastest and most accurately approximates the flow ofthe equations of motion, seven different one step integrators were considered. Six of these weresymplectic integrators, meaning that they satisfy the symplecticity condition (27) and give riseto long time energy conservation. Despite the properties of symplectic integrators, the mostefficient integrator proved to be the non-symplectic, 4th order one step Runge-Kutta integrator,which was therefore used in the project.

11 Acknowledgements

This project would have been impossible without the help and guidance from my supervisor PoulHjorth from the Department of Mathematics, Technically University of Denmark. I also wish tothank my internal supervisor Mogens Høgh Jensen from the Niels Bohr Institute, University ofCopenhagen. Furthermore a special thanks to Charlotte Strandkvist, University of Cambridge,for invaluable support and profitable discussions of the report and to Art Director KennethDahlin, oprust.dk, for design of the front page.

References

[1] Belbruno E A and Miller J: Sun-pertubed Earth-to-Moon transfers with ballistic capture;Journal of Guidance, Control, and Dynamics, Vol 16 No 4 p. 770-775, 1993

[2] Belbruno E A: The dynamical mechanism of ballistic lunar capture transfers in the four-body problem from the perspective of invariant manifolds and Hill’s regions; CRM ResearchReport 270, Centre de Recerca Matematica, Institute d’Estudis Catalans, Barcelona, 1994

20

Page 26: Here - Jeppe Juul

[3] Belbruno E A: Capture Dynamics and Chaotic Motions in Celestial Mechanics; PrincetonUniversity Press, New Jersey, 2004

[4] Cornish N: The Lagrange Points Unpublished notes, Montana, 1999

[5] Hairer E et. al.: Geometric Numerical Integration. Structure-Preserving Algorithms forOrdinary Differential Equations; Springer, Berlin, 2002

[6] Hjorth P and Nordkvist, N: Classical Mechanics and Symplectic Integration; Unpublishedlecture notes, Technical University of Denmark, 2002

[7] Hjorth P: A few concepts from Analytical Mechanics; Unpublished lecture notes, TechnicalUniversity of Denmark, 2008

[8] Goldstein Poole and Safko: Classical Mechanics third edition; Addison Wesley, San Fran-cisco, 2002

[9] Johnson M D and Belbruno E A: Reduction of Lunar Landing Fuel Requirements by UtilizingLunar Ballistic Capture; Ann. N.Y. Acad. Sci. 1065, p. 139-151, 2005

[10] Knudsen, J M, Hjorth P G: Elements of Newtonian Mechanics 3rd ed.; Springer, Berlin,2000

[11] Marsden J and Ross S: New methods in celestial mechanics and mission design; Bulletin ofthe am. math. soc., V 43, No 1, p. 43.73, 2005

[12] NASA: President Bush Offers New Vision For NASA; Press release. (2004-12-14) Retrievedon 12 April 2007.

[13] NASA: NASA Unveils Global Exploration Strategy and Lunar Architecture; Press release.(2006-12-04) Retrieved on 12 April 2007.

[14] Nordkvist N: Constrained Mechanical Systems; Unpublished Master Thesis, Technical Uni-versity of Denmark, 2004

[15] Prado A F B A: Traveling between the Lagrangian Points and the Earth; Acta AstronauticaVol 39, No 7 p. 483-486, 1996

[16] Ross S D: Design of a Multi-Moon Orbiter ; 13th AAS/AIAA Space Flight Mechanics Meet-ing, Ponce, Puerto Rico, Paper AAS 03-143, 2003

[17] Strogatz S H: Nonlinear Dynamics and Chaos; Westview press, Cambridge, 1994

[18] Sweetser T H: Several Ways to Leave for Luna; AAS/AIAA Astrodynamics Specialist Con-ference, 1995

[19] Sweetser T H: An estimate of the global minimum DV needed for earth-moon transfer ; Adv.Astrounaut Sci, V 75, No 1; 1999

[20] Topputo F et. al.: Earth-to-Moon Low Energy Transfers Targeting L1 Hyperbolic TransitOrbits; Ann. N.Y. Acad. Sci. 1065, p. 55-76, 2005

[21] http://www.cnn.com/2003/TECH/space/11/29/china.moon.ap/index.html

21

Page 27: Here - Jeppe Juul

A MATLAB files: Finding trajectories

A.1 Trajectories from Earth approaching L1

%going from earth orbit approaching L1, storing data for the trajectories.clear; tic;global mu vconvert lconvert deltavstep nodeltav lowestdeltav

%Define constantsmu = 0.0121506683; %earth moon parameterlconvert = 3.84405E8; %unit length in meterstconvert = 375677; %unit time in s = 4.348 dayesvconvert = lconvert/tconvert;tmaxEL = 100/4.348; %Integrationtime - 4.348 converts into daysh = 1*10^(-4); %stepsize in timedeltax = 5E-3; %resolution in the coordinate system ’system’nopointsEL = 1.8*tmaxEL/deltax; %Number of points on each trajectory stored

%Generate 6300 different initial values from earth orbitstartvaluesEL = [];theta1step = 0.1;theta2step = 0.02;deltavstep = 8;nodeltav = 10;lowestdeltav = 3060;

for deltav = [lowestdeltav:deltavstep:lowestdeltav+deltavstep...*(nodeltav-1)]/vconvert

for direction = [1 -1]for theta1 = 0:theta1step:2*pi;

for theta2 = -0.04:theta2step:0.04startvaluesEL(1:4,numel(startvaluesEL)/4+1) =...

[direction;theta1;theta2;deltav]; %store starting valuesend

endend

end

%the integration is done in the subfunction ’createearthsystem’system = createearthsystem(deltax,h,tmaxEL,startvaluesEL(:,:),nopointsEL);

%the results are stored.save matfiles/EL.mat

toc;

A.2 Trajectories from L1 approaching the Earth

%going from L1 searching for intersecting EL-trajectories giving low v_EL.clear; tic

22

Page 28: Here - Jeppe Juul

load ’matfiles/EL.mat’ %Load workspace of earthL1 mainly the ’system’

tmaxLE = 100/4.348; %Integrationtime - 4.34 is to get it in daysnopointsLE = 1*tmaxLE/deltax; %Points where we search for intersectionsL1x = 1-(mu/3)^(1/3); %Location of first Lagrange pointstartvaluesLE = [];h = 10^-4; %stepsize in time

%Generate 1575 different initial values from L1 (which are actually end values)thetastep = 0.05;vstep1 = 10;for theta = 1/2*pi:thetastep:3/2*pi

for v = [[2.5:vstep1:182.5],[200 300 400 500 650 1000]]/vconvertstartvaluesLE(1:4,numel(startvaluesLE)/4+1) ...

= [v*cos(theta);v*sin(theta)-L1x;L1x;0]; %store starting valuesend

end

%The integration and searching is done in the subfunction ’findearthmaches’matches = findearthmatches(deltax,h,tmaxLE,startvaluesLE,...

startvaluesEL,system,nopointsLE);

%At this point there is no longer any need for the ’system’clear system

%The results are stored.save matfiles/LE.mat

matches(1,:)

toc

A.3 Optimizing the trajectories

%Optimizes matches found in ’L1earth.m’ and enhances resolution and accuracyclear; ticglobal lowestdeltav nodeltav deltavstep

load ’matfiles/LE.mat’ %Load matches found in ’L1earth.m’steps = 2; %Number of times each trajectory should be optimizedmoonresults = zeros(20,15); %Empty where the results will be

%Pick out matches to optimize - not the same two trajectories twicematchesooptimize = matches(1,:);for i1 = 2:length(matches)

if min((matchesooptimize(:,2)-matches(i1,2)).^2...+(matchesooptimize(:,3)-matches(i1,3)).^2) ~= 0

matchesooptimize(numel(matchesooptimize)/7+1,1:7) = matches(i1,:);end

23

Page 29: Here - Jeppe Juul

end

for i2 = 1:20 %The 20 best matches are optimized one by one.load ’matfiles/LE.mat’ %Load matches found in ’L1earth.m’h = 2E-5; %Accuracy is increasednodeltav = 3; %Number of different velocity changes used in startvaluesdeltax = 1E-3; %Resolution is enhancedmatchtooptimize = matchesooptimize(i2,:);for i3 = 1:steps

tmaxEL = matchtooptimize(4)+1; %Integrate a bit further than last matchtmaxLE = matchtooptimize(5)+1;nopointsEL = tmaxEL/deltax; %Number of points on each trajectory storednopointsLE = tmaxLE/deltax; %Points where we search for intersections

%Generate new Earth start values near the one in the matchstartEL = startvaluesEL(:,matchtooptimize(2));startvaluesEL = [];theta1step = theta1step/2;theta2step = theta2step/2;deltavstep = deltavstep/2;lowestdeltav = startEL(4)*vconvert-deltavstep;

for deltav = [-deltavstep:deltavstep:deltavstep]/vconvertfor theta1 = [-theta1step:theta1step:theta1step];

for theta2 = [-theta2step:theta2step:theta2step];startvaluesEL(1:4,numel(startvaluesEL)/4+1) = [startEL(1);...

startEL(2)+theta1;startEL(3)+theta2;startEL(4)+deltav];end

endend

%Generate new LM start values near the one in the matchstartLE = startvaluesLE(:,matchtooptimize(3));startvaluesLE = [];vbefore = sqrt(startLE(1)^2+(startLE(2)+L1x)^2);thetabefore = acos(startLE(1)/vbefore);vstep = 0.1*vbefore;thetastep = thetastep/2;

for v = -vstep:vstep:vstep1for theta = -thetastep:thetastep:thetastep

startvaluesLE(1:4,numel(startvaluesLE)/4+1) = ...[(vbefore+v)*cos(thetabefore+theta);...(vbefore+v)*sin(thetabefore+theta)-L1x;L1x;0];

endend

%Create a new system from the 27 Earth start valuessystem = createearthsystem(deltax,h,tmaxEL,startvaluesEL,nopointsEL);

24

Page 30: Here - Jeppe Juul

system_match_step = [i2 i3] %Display information in the command window

%Find matches using the 9 L1 start valuesoptimizedmatches = findearthmatches(deltax,h,tmaxLE,...

startvaluesLE,startvaluesEL,system,nopointsLE);

clear system %At this point there is no longer need for the ’system’

%If we have found any matches, the best will be the new one to optimizeif numel(optimizedmatches > 0)

matchtooptimize = optimizedmatches(1,:);else

matchtooptimize = ones(1,7);break

end

%Display information in the command windowinttime = toc;matchtooptimize_step_vector = [i2 i3 round(inttime/60) matchtooptimize]

end

%The results for each match is stored in the matrix earthresultsearthresults(i2,:) = [matchtooptimize startvaluesEL(:,matchtooptimize(2))’...

startvaluesLE(:,matchtooptimize(3))’];end

save matfiles/optimizeE.mat

A.4 Subfunction: Createsystem

function SY = createearthsystem(deltax,h,tmaxEL,startvaluesEL,nopointsEL)%creates the cell array ’system’ with the trajectories from the start values.global mu vconvert lconvert

%Constants and startvaluescrashearth = 0;escapethesystem = 0;noofstartvalues = numel(startvaluesEL)/4; %Number of Earth-startvalues (6300)r0 = (167+6378.14)*1000/lconvert; %Radius of initial Earth orbitv0 = 7802.75/vconvert; %Velocity necessary to orbit in 100 km altitudexmax = 1.5; %If max(|x|,|y|) exceeds xmax the satellite has escaped the systemx = [-xmax:deltax:xmax];clear system;system = cell(length(x)); %Empty cell array with resolution deltax is createdscale = (length(x)+1)/2; %The place in system where origo is.

%Integration and storingfor trajEL = 1:noofstartvalues

25

Page 31: Here - Jeppe Juul

breakif1 = 0;

%The initial eta is found from the startvalueseta0x = r0*cos(startvaluesEL(2,trajEL))-mu;eta0y = r0*sin(startvaluesEL(2,trajEL));eta0px = - startvaluesEL(1,trajEL)*(v0*sin(startvaluesEL(2,trajEL))...

+ startvaluesEL(4,trajEL)*sin(startvaluesEL(2,trajEL)...+ startvaluesEL(3,trajEL))) - eta0y;

eta0py = startvaluesEL(1,trajEL)*(v0*cos(startvaluesEL(2,trajEL))...+ startvaluesEL(4,trajEL)*cos(startvaluesEL(2,trajEL)...+ startvaluesEL(3,trajEL))) + eta0x;

etai = [eta0px;eta0py;eta0x;eta0y];

for i1 = 1:nopointsELfor i2=1:round(tmaxEL/(h*nopointsEL)) %Integrate between stored points

k1 = etadot(etai);k2 = etadot(etai + h*k1/2);k3 = etadot(etai + h*k2/2);k4 = etadot(etai + h*k3);etai = etai+h*(k1+2*k2+2*k3+k4)/6; %One step Runge-Kutta

%If we crashed into the Earth or Moon, integration is stoppedif (etai(3)+mu-1)^2+etai(4)^2 < 2.04E-5 || ...

(etai(3)+mu)^2+etai(4)^2 < 2.75E-4breakif1 = 1;crashearth = crashearth+1;break

endend

%If we have escaped the system, integration is stoppedif breakif1 == 1 || abs(etai(3))>xmax || abs(etai(4))>xmax

escapethesystem = escapethesystem+1;break

end

xval = scale+round(etai(3)/deltax); %x-location in the systemyval = scale+round(etai(4)/deltax); %y-location in the systemtimeEL = tmaxEL*i1/nopointsEL; %time since we left Earth orbit

%Momentum, trajectory number and time is stored in the ’system’system{xval,yval}(numel(system{xval,yval})/4+1,1:4) = ...

[etai(1) etai(2) trajEL timeEL];end

%information of the proces is displayed in the command windowinttime = toc;[trajEL noofstartvalues round(inttime/60) crashearth escapethesystem]

end

26

Page 32: Here - Jeppe Juul

%Delete points too close to the Earth. - Maches here are not trustworthytooclose = round(0.1/deltax);for i1 = -tooclose:tooclose

for i2= -tooclose:tooclosesystem{scale+i1,scale+i2} = [];

endend

%Delete points too close to the Moon. - Maches here are not trustworthytooclose = 0.05;for i1 = scale+round((1-mu-tooclose)/deltax):scale+round((1-mu+tooclose)/deltax)

for i2= scale+round(-tooclose/deltax):scale+round(tooclose/deltax)system{i1,i2} = [];

endend

%The only output of the function is ’system’SY = system;

A.5 Subfunction: Findmatches

function MA = findearthmatches...(deltax,h,tmaxLE,startvaluesLE,startvaluesEL,system,nopointsLE)

%Finds trajectories ending in L1 and searchs for low v_EL earth-intersectionsglobal mu vconvert lowestdeltav nodeltav deltavstep %lconvert

%Constants and startvaluescrashearth = 0;escapethesystem = 0;xmax = 1.5; %If max(|x|,|y|) exceeds xmax the satellite has escaped the systemx = [-xmax:deltax:xmax];scale = (length(x)+1)/2; %The place in system where origo is.earthmatches = [];noofELstartvalues = numel(startvaluesEL)/4; %Number of Earth-startvalues (6300)noofLEstartvalues = numel(startvaluesLE)/4;%Number of Earth-startvalues (1575)

%Integration and searchingfor trajLE = 1:noofLEstartvalues

breakif1 = 0;etai = startvaluesLE(:,trajLE); %Initial eta is found from LE-startvaluesfor i1 = 1:nopointsLE

for i2=1:round(tmaxLE/(h*nopointsLE)) %Integrate between search-pointsk1 = etadotreverse(etai);k2 = etadotreverse(etai + h*k1/2);k3 = etadotreverse(etai + h*k2/2);k4 = etadotreverse(etai + h*k3);etai = etai+h*(k1+2*k2+2*k3+k4)/6; %Runge-Kutta backwards in time

27

Page 33: Here - Jeppe Juul

%If we crashed into the Earth or Moon, integration is stoppedif (etai(3)+mu)^2+etai(4)^2 < 2.75E-4 || ...

(etai(3)+mu-1)^2+etai(4)^2 < 2.04E-5breakif1 = 1;crashearth = crashearth+1;break

endend

%If we have escaped the system, integration is stoppedif breakif1 == 1 || abs(etai(3))>xmax || abs(etai(4))> xmax

escapethesystem = escapethesystem+1;break

endxval = scale+round(etai(3)/deltax); %x-location in the systemyval = scale+round(etai(4)/deltax); %y-location in the system

%For all trajectories in the relevant ’system’ array, v_EL is calculatedif numel(system{xval,yval}) > 0

totaldvvector = deltavstep*floor(system{xval,yval}(:,3)*nodeltav.../noofELstartvalues)+lowestdeltav... %v_Earth is calculated+ sqrt((system{xval,yval}(:,1)+etai(1)).^2 ...+ (system{xval,yval}(:,2)...+ etai(2)).^2)*vconvert; %v_transfer is calculated

[totaldv place] = min(totaldvvector); %The minium v_EL is foundtime = tmaxLE*i1/nopointsLE; %time since we left L1

%For lowest v_EL store information of startvalues, time and placeearthmatches(numel(earthmatches)/7+1,1:7) = ...

[totaldv system{xval,yval}(place,3) trajLE...system{xval,yval}(place,4) time etai(3:4)’];

endend

%only the best 2000 earthmatches should be storedbestearthmatches = [];if numel(earthmatches)>1

for bestresult = 1:2000[best placeforbest] = min(earthmatches(:,1));bestearthmatches(bestresult,:) = earthmatches(placeforbest,:);earthmatches(placeforbest,1) = 10000;

endearthmatches = bestearthmatches;

end

%information of the proces is displayed in the command windowtid = toc;[trajLE noofLEstartvalues round(tid/60) crashearth escapethesystem]

28

Page 34: Here - Jeppe Juul

if numel(earthmatches) > 0earthmatches(1,1)

endend

%the output is the 2000 best matchesMA = earthmatches;

A.6 Subfunction: Etadot

function F = etadot(eta) %Used for Runge-Kutta integration forward in timeglobal mu

F = [eta(2) - (eta(3)+mu)*(1-mu)/((eta(3)+mu)^2+eta(4)^2)^(3/2) ...- (eta(3)-1+mu)*mu/((eta(3)-1+mu)^2+eta(4)^2)^(3/2) ;...- eta(1) - eta(4)*(1-mu)/((eta(3)+mu)^2+eta(4)^2)^(3/2) ...- eta(4)*mu/((eta(3)-1+mu)^2+eta(4)^2)^(3/2) ;...eta(1) + eta(4);...eta(2) - eta(3)];

end

A.7 Subfunction: Etadotreverse

function F = etadotreverse(eta) %For Runge-Kutta integration backward in timeglobal mu

F = [-eta(2) - (eta(3)+mu)*(1-mu)/((eta(3)+mu)^2+eta(4)^2)^(3/2)...- (eta(3)-1+mu)*mu/((eta(3)-1+mu)^2+eta(4)^2)^(3/2) ;...eta(1) - eta(4)*(1-mu)/((eta(3)+mu)^2+eta(4)^2)^(3/2)...- eta(4)*mu/((eta(3)-1+mu)^2+eta(4)^2)^(3/2) ;...eta(1) - eta(4) ;...eta(2) + eta(3)];

end

29

Page 35: Here - Jeppe Juul

B MATLAB files: The best integrator

B.1 Main program integrating and comparing

%integrating 100 days using different integrators and comparing the accuracyclearglobal mu

%Constants and starting values valuesmu = 0.0121506683; %earth moon parametertmax = 100/4.348; %integration timeeta0 = [0;10.629291524829641;0.004875645093426;0]; % [px;py;x;y]trueE = (eta0(1)^2+eta0(2)^2)/2 + eta0(1)*eta0(4) - eta0(2)*eta0(3) ...

-(1-mu)/((eta0(3)+mu)^2+eta0(4)^2)^(1/2)- mu/((eta0(3)-1+mu)^2+eta0(4)^2)^(1/2);

%Integrationsfor n=-4:1:6

h = 10^(-4)/exp(-log(40)/5)*exp(-n*log(40)/5);SE(n+5,:) = SymplecticEuler(eta0,h,tmax)SV(n+5,:) = StormerVerlet(eta0,h,tmax)RK(n+5,:) = RungeKutta4th(eta0,h,tmax)S2(n+5,:) = Splitting2nd(eta0,h,tmax)S4(n+5,:) = Splitting4th(eta0,h,tmax)S6(n+5,:) = Splitting6th(eta0,h,tmax)S8(n+5,:) = Splitting8th(eta0,h,tmax)

end

trueeta = S4(11,2:5) %set as the ’correct’ eta-valuefor n = 1:11

SEdeltaeta(n) = norm(SE(n,2:5)-trueeta)SVdeltaeta(n) = norm(SV(n,2:5)-trueeta)RKdeltaeta(n) = norm(RK(n,2:5)-trueeta)S2deltaeta(n) = norm(S2(n,2:5)-trueeta)S4deltaeta(n) = norm(S4(n,2:5)-trueeta)S6deltaeta(n) = norm(S6(n,2:5)-trueeta)S8deltaeta(n) = norm(S8(n,2:5)-trueeta)

end

%Plot the differences in E and eta as a function of h and integrationtimesubplot(2,2,1)loglog(SE(:,1),abs(SE(:,6)-trueE),’s-’,SV(:,1),abs(SV(:,6)-trueE),’o-’...

,RK(:,1),abs(RK(:,6)-trueE),’*-’,S2(:,1),abs(S2(:,6)-trueE),’^-’...,S4(:,1),abs(S4(:,6)-trueE),’.-’,S6(:,1),abs(S6(:,6)-trueE),’v-’...,S8(:,1),abs(S8(:,6)-trueE),’+-’)

xlabel(’h’); ylabel(’\Delta E’);axis([2*10^-6 2*10^-3 3*10^(-13) 2])title(’Error in energy depending on step size in time’)

subplot(2,2,2)loglog(SE(:,1),SEdeltaeta,’s-’,SV(:,1),SVdeltaeta,’o-’,RK(:,1),RKdeltaeta,’*-’...

30

Page 36: Here - Jeppe Juul

,S2(:,1),S2deltaeta,’^-’,S4(:,1),S4deltaeta,’.-’...,S6(:,1),S6deltaeta,’v-’,S8(:,1),S8deltaeta,’+-’)

xlabel(’h’); ylabel(’\Delta \eta’)axis([2*10^-6 2*10^-3 8*10^(-7) 1.5])title(’Error in phase space depending on step size in time’)

subplot(2,2,3)loglog(SE(:,7),abs(SE(:,6)-trueE),’s-’,SV(:,7),abs(SV(:,6)-trueE),’o-’...

,RK(:,7),abs(RK(:,6)-trueE),’*-’,S2(:,7),abs(S2(:,6)-trueE),’^-’...,S4(:,7),abs(S4(:,6)-trueE),’.-’,S6(:,7),abs(S6(:,6)-trueE),...’v-’,S8(:,7),abs(S8(:,6)-trueE),’+-’)

xlabel(’integrationtime’); ylabel(’\Delta E’);axis([0.3 2000 3*10^(-13) 2])title(’Error in energy depending on integration time’)

subplot(2,2,4)loglog(SE(:,7),SEdeltaeta,’s-’,SV(:,7),SVdeltaeta,’o-’,RK(:,7),RKdeltaeta,’*-’...

,S2(:,7),S2deltaeta,’^-’,S4(:,7),S4deltaeta,’.-’...,S6(:,7),S6deltaeta,’v-’,S8(:,7),S8deltaeta,’+-’)

xlabel(’integrationtime’); ylabel(’\Delta \eta’)axis([0.3 2000 8*10^(-7) 1.5])title(’Error in phase space depending on integration time’)legend(’Symplectic Euler’,’Störmer Verlet’,’4th order Runge Kutta’,...

’2nd order Splitting’,’4th order Splitting’,...’6th order Splitting’,’8th order Splitting’)

B.2 Symplectic Euler integrator

%Symplectic Euler Methodfunction SE = SymplecticEuler(eta0,h,tmax)global mutic;t = [0:h:tmax];etai = eta0;

%Integrationfor i=1:length(t)

k1 = findingk1(h,etai);l1 = [etai(1)+h*k1(1)+etai(4);etai(2)+h*k1(2)-etai(3)];etai = etai + h* [k1 ; l1];

endE = (etai(1)^2+etai(2)^2)/2 + etai(1)*etai(4) - etai(2)*etai(3) -...

(1-mu)/((etai(3)+mu)^2+etai(4)^2)^(1/2)- mu/((etai(3)-1+mu)^2+etai(4)^2)^(1/2);inttime = toc;SE = [h etai’ E inttime];end

%subfunction to each iterationfunction subk = findingk1(h,etai)

31

Page 37: Here - Jeppe Juul

global musubk = 1/(1+h^2)*[1 h;-h 1]*...

[etai(2) - (etai(3)+mu)*(1-mu)/((etai(3)+mu)^2+etai(4)^2)^(3/2) ...- (etai(3)-1+mu)*mu/((etai(3)-1+mu)^2+etai(4)^2)^(3/2) ;...-etai(1) - etai(4)*(1-mu)/((etai(3)+mu)^2+etai(4)^2)^(3/2) ...- etai(4)*mu/((etai(3)-1+mu)^2+etai(4)^2)^(3/2)];

end

B.3 Störmer/Verlet integrator

%Störmer Verlet Methodfunction SV = StormerVerlet(eta0,h,tmax)global mutic;t = [0:h:tmax];etai = eta0;

%Integrationfor i=1:length(t)

k2 = findingk2(h,etai);l2 = [etai(1)+h*k2(1)/2+etai(4);etai(2)+h*k2(2)/2-etai(3)];l1 = findingl1(h,l2,k2,etai);k1 = findingk1(h,l1,l2,k2,etai);etai = etai + h* [(k1+k2)/2 ; (l1+l2)/2];

end

E = (etai(1)^2+etai(2)^2)/2 + etai(1)*etai(4) - etai(2)*etai(3) ...-(1-mu)/((etai(3)+mu)^2+etai(4)^2)^(1/2)- mu/((etai(3)-1+mu)^2+etai(4)^2)^(1/2);

inttime = toc;SV = [h etai’ E inttime];end

%subfunctions to each iterationfunction subk2 = findingk2(h,etai)global musubk2 = 1/(4+h^2)*[4 2*h;-2*h 4]*...

[etai(2) - (etai(3)+mu)*(1-mu)/((etai(3)+mu)^2+etai(4)^2)^(3/2) ...- (etai(3)-1+mu)*mu/((etai(3)-1+mu)^2+etai(4)^2)^(3/2) ;...-etai(1) - etai(4)*(1-mu)/((etai(3)+mu)^2+etai(4)^2)^(3/2) ...- etai(4)*mu/((etai(3)-1+mu)^2+etai(4)^2)^(3/2)];

end

function subl1 = findingl1(h,l2,k2,etai)global musubl1 = 1/(4+h^2)*[4 2*h;-2*h 4]*...

[etai(1)+h*k2(1)/2 + etai(4)+h*l2(2)/2 ;...etai(2)+h*k2(2)/2 - (etai(3)+h*l2(1)/2)];

end

32

Page 38: Here - Jeppe Juul

function subk1 = findingk1(h,l1,l2,k2,etai);global musubk1 = [etai(2)+h*k2(2)/2 - ((etai(3)+h*(l1(1)+l2(1))/2)+mu)*(1-mu)/...

(((etai(3)+h*(l1(1)+l2(1))/2)+mu)^2+(etai(4)+h*(l1(2)+l2(2))/2)^2)^(3/2) ...- ((etai(3)+h*(l1(1)+l2(1))/2)-1+mu)*mu/(((etai(3)+h*(l1(1)+l2(1))/2)-1+mu)^2 ...+(etai(4)+h*(l1(2)+l2(2))/2)^2)^(3/2) ;...-(etai(1)+h*k2(1)/2) - (etai(4)+h*(l1(2)+l2(2))/2)*(1-mu)/...(((etai(3)+h*(l1(1)+l2(1))/2)+mu)^2+(etai(4)+h*(l1(2)+l2(2))/2)^2)^(3/2) ...- (etai(4)+h*(l1(2)+l2(2))/2)*mu/(((etai(3)+h*(l1(1)+l2(1))/2)-1+mu)^2 ...+(etai(4)+h*(l1(2)+l2(2))/2)^2)^(3/2)];

end

B.4 4th order Runge-Kutta

function RK = RungeKutta4th(eta0,h,tmax)global mutic;t = [0:h:tmax];etai = eta0;

for i=1:length(t)k1 = etadot(etai);k2 = etadot(etai + h*k1/2);k3 = etadot(etai + h*k2/2);k4 = etadot(etai + h*k3);etai = etai+h*(k1/6+2*k2/6+2*k3/6+k4/6);

endE = (etai(1)^2+etai(2)^2)/2 + etai(1)*etai(4) - etai(2)*etai(3)...

- (1-mu)/((etai(3)+mu)^2+etai(4)^2)^(1/2) - mu/((etai(3)-1+mu)^2+etai(4)^2)^(1/2);inttime = toc;RK = [h etai’ E inttime];end

function F = etadot(eta)global muF = [eta(2) - (eta(3)+mu)*(1-mu)/((eta(3)+mu)^2+eta(4)^2)^(3/2)...

- (eta(3)-1+mu)*mu/((eta(3)-1+mu)^2+eta(4)^2)^(3/2) ;...-eta(1) - eta(4)*(1-mu)/((eta(3)+mu)^2+eta(4)^2)^(3/2)...- eta(4)*mu/((eta(3)-1+mu)^2+eta(4)^2)^(3/2) ;...eta(1) + eta(4) ;...eta(2) - eta(3)];

end

B.5 2nd order splitting method

%2nd order splittingfunction S2 = Splitting2nd(eta0,h,tmax)global mutic;t = [0:h:tmax];

33

Page 39: Here - Jeppe Juul

etai = eta0;

%Integrationfor i=1:length(t)

eta1 = phi1(etai,h/2);eta2 = phi2(eta1,h);etai = phi1(eta2,h/2);

end

E = (etai(1)^2+etai(2)^2)/2 + etai(1)*etai(4) - etai(2)*etai(3)...- (1-mu)/((etai(3)+mu)^2+etai(4)^2)^(1/2) - mu/((etai(3)-1+mu)^2+etai(4)^2)^(1/2);

inttime = toc;S2 = [h etai’ E inttime];end

B.6 4th order splitting method

%4th order splittingfunction S4 = Splitting4th(eta0,h,tmax)global mutic;t = [0:h:tmax];etai = eta0;gamma = [1/(2-2^(1/3)) -2^(1/3)/(2-2^(1/3)) 1/(2-2^(1/3))];

%Integrationfor i=1:length(t)

for j=1:3eta1 = phi1(etai,gamma(j)*h/2);eta2 = phi2(eta1,gamma(j)*h);etai = phi1(eta2,gamma(j)*h/2);

endend

E = (etai(1)^2+etai(2)^2)/2 + etai(1)*etai(4) - etai(2)*etai(3)...- (1-mu)/((etai(3)+mu)^2+etai(4)^2)^(1/2) - mu/((etai(3)-1+mu)^2+etai(4)^2)^(1/2);

inttime = toc;S4 = [h etai’ E inttime];end

B.7 6th order splitting method

%6th order splittingfunction S6 = Splitting6th(eta0,h,tmax)global mutic;t = [0:h:tmax];etai = eta0;gamma4 = [1/(2-2^(1/3)) -2^(1/3)/(2-2^(1/3)) 1/(2-2^(1/3))];gamma6 = [1/(2-2^(1/5)) -2^(1/5)/(2-2^(1/5)) 1/(2-2^(1/5))];

34

Page 40: Here - Jeppe Juul

%Integrationfor i=1:length(t)

for k=1:3for j=1:3

eta1 = phi1(etai,gamma6(k)*gamma4(j)*h/2);eta2 = phi2(eta1,gamma6(k)*gamma4(j)*h);etai = phi1(eta2,gamma6(k)*gamma4(j)*h/2);

endend

end

E = (etai(1)^2+etai(2)^2)/2 + etai(1)*etai(4) - etai(2)*etai(3) - (1-mu)/...((etai(3)+mu)^2+etai(4)^2)^(1/2) - mu/((etai(3)-1+mu)^2+etai(4)^2)^(1/2);

inttime = toc;S6 = [h etai’ E inttime];end

B.8 8th order splitting method

%8th order splittingfunction S8 = Splitting8th(eta0,h,tmax)global mutic;t = [0:h:tmax];etai = eta0;gamma4 = [1/(2-2^(1/3)) -2^(1/3)/(2-2^(1/3)) 1/(2-2^(1/3))];gamma6 = [1/(2-2^(1/5)) -2^(1/5)/(2-2^(1/5)) 1/(2-2^(1/5))];gamma8 = [1/(2-2^(1/7)) -2^(1/7)/(2-2^(1/7)) 1/(2-2^(1/7))];

%Integrationfor i=1:length(t)

for l=1:3for k=1:3

for j=1:3eta1 = phi1(etai,gamma8(l)*gamma6(k)*gamma4(j)*h/2);eta2 = phi2(eta1,gamma8(l)*gamma6(k)*gamma4(j)*h);etai = phi1(eta2,gamma8(l)*gamma6(k)*gamma4(j)*h/2);

endend

endend

E = (etai(1)^2+etai(2)^2)/2 + etai(1)*etai(4) - etai(2)*etai(3) - (1-mu)/...((etai(3)+mu)^2+etai(4)^2)^(1/2) - mu/((etai(3)-1+mu)^2+etai(4)^2)^(1/2);

inttime = toc;S8 = [h etai’ E inttime];end

35

Page 41: Here - Jeppe Juul

B.9 phi1 and phi2 used to the splitting methods

function F = phi1(eta0,t)Pinv = [-3 -2 -8 -1 ; -8 -14 -22 -6 ; 0 2 2 -2 ; 1 -2 -4 3]/12;C = Pinv*eta0;F = C(1)*[-4;3;-1;2]*exp(2*t) + C(2)*[1;-1;0;-1]*exp(t) ...

+ C(3)*[11;3;-4;-7]*exp(-t) + C(4)*[8;1;-3;-2]*exp(-2*t);end

function F = phi2(eta,t)global muF = [-((eta(3)+mu)*(1-mu)/((eta(3)+mu)^2+eta(4)^2)^(3/2) + (eta(3)-1+mu)*mu/...

((eta(3)-1+mu)^2+eta(4)^2)^(3/2) +7*eta(3)-2*eta(4))*t+eta(1) ;...-(eta(4)*(1-mu)/((eta(3)+mu)^2+eta(4)^2)^(3/2) ...+ eta(4)*mu/((eta(3)-1+mu)^2+eta(4)^2)^(3/2) -2*eta(3))*t + eta(2);...eta(3);...eta(4) ];

end

36