2001.2.15 Mars Society/AIAA Mars Pathfinder 2.0 paper

After my Mars seminar, I transformed the one-screen DOS program (145 kb) into a full Windows program with help screen, color printouts, and options to experiment with.  I wrote it up in a formal paper – the Mars Society had already accepted my abstract – and submitted it to the AIAA. They put it on their “grad student projects” site.  The Department made them take it down ASAP. The paper was never published. By this time, I had also created an elaborate Mars Pathfinder website with free downloads. 

—

Page 1

OPTIMIZING THE EARTH TO MARS TRAJECTORY

William H. Clark II, P.E., MSE

The interplanetary trajectory from Earth to Mars is difficult to solve numerically. Typically a problem with four or more unknowns requires a genetic algorithm to solve, the problem being intractable to any other nonlinear optimization methods. This paper shows how an Earth to Mars trajectory with twenty five unknowns can be solved directly, without the use of any nonlinear optimization methods whatsoever. The basic method finds a trajectory which is either thirty days faster than the nominal Hohmann Transfer (i.e. using the same total thrust as a Hohmann), or a trajectory which has the same time of flight as the Hohmann but uses 10% less total thrust. Simple variations to this model lead to even better results, but are not in the scope of this report. This report is intended to show how the optimization algorithm is constructed and how it arrives at a fast, efficient solution.

INTRODUCTION

The simplest and most efficient interplanetary trajectory is the Hohmann Transfer, which is the standard to which all other solutions are compared. The Earth to Mars trajectory, the topic of this report, had no analytical solution. The problem must be modeled on the computer and numerically integrated. A typical NASA mission has four thrusts: the initial thrust at Earth plus four Trajectory Correction Maneuvers (TCMs). A simple trajectory with just two thrusts can be solved only with the benefit of a nonlinear optimization routine, whereas anything more complex must be solved in stages by methods using genetic algorithms.

The patched conic method forms the basis for all interplanetary trajectories, by which the flight path is set up in specific configurations according to the forces acting upon the spacecraft (s/c). When the s/c is close to Earth, the central force is Earth and the Sun is a third perturbing body. This changes at the Sphere of Influence (SOI), after which time the Sun is the central body and Earth and Mars are perturbing bodies. Then at Mars’ SOI, the central force is Mars and the Sun is a third perturbing body. The transitions between planet centered and heliocentric coordinates is more than a convenience reference, but also the most accurate way to represent the forces from all perturbing bodies.


Page 2

The trajectory to Mars from Earth is optimized in this paper without the benefit of any nonlinear optimization method. The two point boundary value problem with free time and position at both end points is separated into two independent problems with a common, fixed end point, approximately at conjunction. The algorithm then considers variations from the Hohmann Transfer, and converges directly to the solution. The method is accurate and fast, and generates an optimal solution that is either 10% better than the Hohmann in terms of total thrust or total time of flight.

The algorithm is compact and converges rapidly, the entire optimization taking less than thirty seconds on a 333 MhZ personal computer. This is many orders of magnitude faster than other methods of solution working on problems of a comparable difficulty. A total of 25 variables are optimized in this method. Such an algorithm would be useful for on board flight adjustments by a semi autonomous s/c, being able to perform real time calculations that currently can only be performed by mainframe computers at flight control on Earth. Also, many additional degrees of freedom can be added to this basic algorithm, and the entire problem then solved more accurately and efficiently with the use of traditional nonlinear optimization methods. That is, for a problems with more than twenty five variables (e.g. a 3D simulation), this algorithm generates a nominal solution much closer to the optimum than the usual starting point, the Hohmann Transfer. Finally, the solution method is not abstract but easily visualized conceptually, giving the model and the algorithm a realistic aspect that makes it easy to imagine the forces, the bodies, and the overall characteristics of the entire problem. By comparison, the genetic algorithm is wholly statistical and uses a completely random way to arrive at the solution.

ESTABLISHING THE BENCHMARK

As the computer model was being constructed, starting from a simple Hohmann Transfer between Earth and Mars in circular orbits, a standard was used to test the results before going on to the next, more complicated elaboration of the model. The standard used was the Hohmann Transfer, by which the s/c makes the transit from Earth to Mars in exactly 180 degrees of heliocentric longitude. Two thrusts are required, on at either end of the trajectory:

$$\begin{aligned} \text{dV1} &= 2.944\text{ km/sec} \ \text{dV2} &= 2.649\text{ km/sec} \ \text{total} &= 5.593\text{ km/sec} \ \text{time} &= 260\text{ days} \end{aligned}$$

Ultimately, the model was for the 2001 Earth to Mars trajectory, starting in a 200 km parking orbit at Earth and ending in a 100 km parking orbit at Mars. All motion is assumed coplanar and Earth and Mars are in the true elliptical orbits. Table 1 shows a range of values for a given TCM at conjunction.


Page 3

Table 1 Trajectory Parameters versus the Hohmann Transfer

DeltaV, km/sec time, days total deltaV, km/sec
1.2 214.224 6.764
1.1 216.133 6.511
1.0 218.019 6.308
0.9 220.063 6.157
0.8 222.766 5.779
0.7 225.131 5.645
0.6 228.339 5.625
0.5 231.510 5.283
0.4 235.749 5.381
0.3 240.580 5.202
0.2 247.730 5.131
0.1 262.190 5.157

NOTE: The Hohmann Transfer time is 260 days and 5.593 km/sec

THE MID COURSE CORRECTION

The unique aspect of the algorithm is that a major thrust is done at conjunction, or about half way to Mars from Earth. (Use of “conjunction” throughout this report is meant to signify an approximate location, at about 90 degrees from start in the trajectory, which coincides with the Earth-Mars conjunction in this particular situation.) There are several reasons why conjunction was chosen:

  • The s/c travels slowest in the second half of the trajectory, so the greatest benefit from a major thrust would be if this thrust were applied at conjunction
  • A thrust applied at a true anomaly of 90 degrees (e.g. conjunction for this particular problem is a 94 degrees) acts to elongate the elliptical orbit. A thrust applied at any other point in the trajectory acts to rotate the orbit in space. An elongated orbit is by far the best configuration as it causes the transfer orbit to intersect the path of Mars for a shorter time of flight.
  • The bi-elliptic transfer orbit is actually more efficient than a Hohmann, but is usually not used because it has a much longer time of flight. In this situation, separating the problem at conjunction and applying a large thrust there makes the solution into a bi-elliptic transfer orbit, where the geometry of both parts is favorable to the goal of finding a faster, more efficient trajectory.

Page 4

BASIC FORMULATION

The flight path from Earth to Mars has seven specific reference points, as follows:

  1. A 200 km Earth parking orbit
  2. The beginning of the interplanetary trajectory, near Earth but not necessarily at the initial parking orbit
  3. Earth’s SOI
  4. The Earth-Mars conjunction
  5. The end of the interplanetary trajectory, near Mars but not necessarily at the final parking orbit
  6. A 100 km Mars parking orbit

The objective of the analysis is optimization of this fixed flight path between two points of constant energy, i.e. the designated parking orbits around Earth and Mars. The mission profile allows for a maximum of five thrusts. Typically, the optimal path begins with a small Hohmann Transfer from Earth parking orbit to a slightly higher orbit, then a main thrust to escape Earth gravity, followed by a mid-course correction at conjunction, and a small Hohmann Transfer at Mars into the final parking orbit around Mars.

It is assumed that a Hohmann Transfer can reach the intermediate “targeting” orbits most effectively, and that the thrusts for this planet centered trajectory can be approximated using two body equations of motion. The s/c enters the circular targeting orbit, from which it begins the integrated interplanetary trajectory with a large instantaneous thrust.

The flight path is integrated between the respective targeting orbit end points with three interruptions: one at each planet’s SOI, and a third at conjunction. Within the SOI the integration uses planet centered coordinates and the sun as a perturbing third body. Otherwise, the coordinates are heliocentric with the motion of the s/c perturbed by Earth and Mars.

Throughout this analysis, all thrusts are aligned to the direction of motion. This is the most efficient thrust, transferring all energy to velocity and not wasting any energy on changes in the shape or orientation of the orbit itself. In so doing, all three major tangential thrusts increase the ellipticity of the orbit (for reasons noted earlier); again, to get the most out of the thrust in velocity.


Page 5

EQUATIONS OF MOTION

The equations of motion are the standard Newtonian formulation for a gravitation force between two bodies. The perturbation by the third body is calculated using

$$a = – Gm_1\mathbf{r}2/r{12}^3 + Gm_3 (\mathbf{r}{23}/r{23}^3 – \mathbf{r}{13}/r{13}^3) \qquad (1.1)$$

The integration is divided into two problems, both starting with the same state vector (coordinates and position) at or near conjunction. The motion of the s/c is integrated back in time to reach Earth (all forces are central forces, so integration with a negative time step is OK), with a variable magnitude and direction to optimize both trajectories, independently.

The computer model is for elliptical, coplanar motion of the primaries using the J2000 ephemeredes. The position of the primaries – i.e. Earth and Mars – is propagated using two body dynamical equations, with the inclination of Mars’ orbit to the ecliptic set to zero.

The integration is performed by a Runge-Kutta variable step (7/8) integrator set to a tolerance of 10E-12, to give a consistent accuracy of 12 to 13 significant digits. The integration step is not altered externally with the exception of when the trajectory nears the SOI so the integration can be stopped as near to the SOI as possible to transfer the coordinates.

BOUNDARY VALUE PROBLEMS

The computer algorithm is set up to optimize each half of the flight path independently. A fixed thrust is applied at conjunction, then the minimum thrust to reach parking orbit is determined. The “terminal” thrust is assumed to have three components: a large thrust to circularize at the targeting orbit, and two small thrusts to reach the final parking orbit via the Hohmann Transfer. Typically, the large thrust is combined with one of the two small thrusts, into one instantaneous thrust.

Hr numerical implementation of this strategy necessitates the creation of a unique mapping in the vicinity of the target. Since the objective is to find a global minimum, it is essential that every thrust value applied at conjunction generate a total thrust to reach parking orbit. This total thrust need not be accurate to 13 significant digits except near the actual minimum. However, it must have a constant slope downward to the minimum from all directions so that a one dimensional line search can find the minimum easily. A cross section of the mapping created for this purpose in the algorithm is shown in Figure 1.


Page 6

[Diagram: Figure 1 Mapping the Earth Escape trajectory]

  • Vertical Axis: terminal thrust
  • Horizontal Axis: Shows Earth in the center with a 200 km parking orbit circle around it, target quadrant below and to the right of Earth, and SOI boundary line to the right.
  • Trajectory & Zones: A dashed trajectory line starts from a cross-shaped icon labeled spacecraft at the top left and curves down toward Earth/target quadrant. Four vertical zones (A, B, C, D) show a sloped “well” funneling downward to a minimum point right at the target quadrant near Earth.

Figure 1 Mapping the Earth Escape trajectory

The energy/thrust “well” simulated by the algorithm returns a terminal thrust in such a way that it drives the final endpoint to the quadrant noted in Figure 1. This is a point on the far side of the planet from which the s/c approaches, located at or near the final parking orbit itself.

NUMERICAL OPTIMIZATION

The first objective of the algorithm is to find the initial conditions for Earth, Mars, and the s/c. It has already been established that the integration will begin at conjunction, for the specific case of the first conjunction of the J2000 ephemeredes. See Figure 2.

The hypothesis to be tested assumes that the conjunction to Earth trajectory on a Hohmann Transfer ellipse is already optimal, so it is only necessary to find the initial position of Earth, i.e. 94 degrees before conjunction. To find the starting point of the s/c, it’s path on the transfer ellipse is found at 96 days (the time for Earth to reach conjunction in the Hohmann Transfer) after periapse, i.e. when its position is coincident with Earth.


Page 7

[Flowchart: Figure 2 Determining the Initial State]

  • subroutine INITIAL
  • $\Downarrow$
  • Find 2001 Earth-Mars conjunction
  • $\Downarrow$
  • Transform coordinates to a 2-body Hohmann transfer orbit
  • $\Downarrow$
  • Earth at t=0 on Hohmann ellipse is the positive x-axis
  • $\Downarrow$
  • Find the phase angle of Earth at conjunction in J2000 epoch
    TC = time earth takes to get to conjunction from t=0
  • $\Downarrow$
  • Find coordinates of s/c on Hohmann ellipse in 2-body system
    for s/c to go from Earth at t=0 to t=TC
  • $\Downarrow$
  • Initial conditions for s/x with Earth and Mars at
    first conjunction in J2000 epoch

Figure 2 Determining the Initial State

The integration is done in two parts: back in time from conjunction to Earth and forward in time from conjunction to Mars. Earth and Mars are incremented by their two body equations of motion, along elliptical coplanar paths using mean motion. The s/c is integrated with either the Sun or a planet as the central body, and the other major bodies perturbing.

As indicated in Figure 3, the trajectory to Earth is optimized only once. Both endpoints of the trajectory are known (i.e. conjunction and a 200 km parking orbit around Earth), so once the minimum thrust trajectory is found that half of the problem is solved.


Page 8

The conjunction to Mars part of the trajectory has one fixed endpoint at conjunction and the other point variable. The time of flight to Mars is a function of the thrust applied at the mid-course correction at conjunction. The starting position of Mars is varied so that the s/c intersects Mars. This is the part of the trajectory that is most susceptible to improvement and is therefore more closely evaluated in the optimizing routine.

Conjunction to Earth

The technique for optimizing the conjunction to Earth flight path is shown in Figure 3. The initial state of the s/c is integrated back in time to Earth’s SOI. Then the coordinates are changed from heliocentric to geocentric and the path is integrated until the range from Earth is increasing.

[Flowchart: Figure 3 Targeting Earth from Conjunction]

  • Header: subroutine HAWKEYE
  • Top Step: subroutine INITIAL (dV = 0) $\Downarrow$
  • Loop Entry (Conjunction / heliocentric):
    • Left side label: numerical integration
    • Step 1 (variable time step to 2*SOI): subroutine TAILHOOKE $\Downarrow$
    • Step 2 (fixed time step to Earth SOI / geocentric)
    • Step 3 (variable time step to varies): subroutine EARTH
    • Bottom transition (2-body Hohmann transfer to 200 km parking orbit)
  • Decision Triangle: MIN?
    • If no $\rightarrow$ goes up right branch $\Uparrow$ through subroutine TRAPE (increment dV) $\rightarrow$ dV1 = dV1 + dv $\rightarrow$ loops back to Conjunction.

Figure 3 Targeting Earth from Conjunction


Page 9

The integration is done with a Runge-Kutta 7/8 variable step integrator. At each step the thrust needed to reach the 200 km final parking orbit is calculated (i.e. the orbit is circularized, then a small Hohmann Transfer is done to the final parking orbit). This is shown in Figure 4, a representation of the final, optimal trajectory near Earth.

[Diagram: Figure 5 Earth Escape Geometry]

  • Shows a central black circle (Earth) surrounded by inner and outer orbital paths.
  • Labels:
    • parking orbit (inner circle around Earth)
    • dv1 (arrow pointing counter-clockwise at top of inner parking orbit)
    • Hohmann Transfer (curve transferring from inner orbit to outer orbit)
    • phasing orbit (outer circular/elliptical path)
    • dv2 (arrow at bottom of orbit where the hyperbolic escape trajectory branches upwards)
    • hyperbolic escape (steep line exiting to the top)

Figure 5 Earth Escape Geometry

It is assumed that the integrator stops for any significant changes in conditions on the s/c, thus no intermediate targeting orbits need to be considered. As the s/c nears Earth, the lowest total trust is saved in an array and when the range to Earth begins to increase, the loop is terminated and the minimum thrust scenario is retrieved from the array as the optimal trajectory.

After a single trajectory is optimized, the total thrust is compared to the total thrust of the previous run. If it is decreasing, the thrust at conjunction is decreased (and vice versa) and another trajectory is evaluated. The mapping described in Figure 1 is such that the global minimum is always in the direction of a negative gradient, so all the iterative loop must do is to conduct a one dimensional search until the minimum is reached within a specified tolerance.


Page 10

Conjunction to Mars

The method by which the conjunction to Mars flight path is optimized is shown in Figure 5.

[Flowchart: Figure 6 Targeting Mars]

  • Header: subroutine HAWKEYM
  • Top Step: subroutine INITIAL (dØ = 0) $\Downarrow$
  • Loop Entry (Conjunction / heliocentric):
    • Left side label: numerical integration
    • Step 1 (variable time step to 2*SOI): subroutine TAILHOOKE $\Downarrow$
    • Step 2 (fixed time step to Mars SOI / geocentric)
    • Decision Triangle 1: reach SOI?
      • If no $\rightarrow$ goes up right branch $\Uparrow$ to increment dØ $\rightarrow$ dØ1 = dØ1 + dØ $\rightarrow$ loops back to Conjunction.
      • If yes $\rightarrow$ shift state vector @ SOI around circumference of SOI
    • Step 3 (variable time step to varies): subroutine PHOENIX
    • Bottom transition (2-body Hohmann transfer to 100 km parking orbit)
  • Decision Triangle 2: MIN? (save min. of all iterations)

Figure 6 Targeting Mars

The first objective is to adjust the phase angle of Mars at conjunction so the s/c path intersects Mars’ SOI. This is a highly nonlinear problem and it cannot be solved by direct method used for the trajectory to Earth. Instead, once the state vector of the s/c is known at SOI, it is assumed that a small TCM can be done in real time to target any point on the SOI in the immediate neighborhood. Modifying the tolerances in the code can make the solution exact, at the cost of perhaps doubling the computational time. This was not done in the distribution copy of the program so the program can run on a PC in


Page 11

less than 60 seconds. In any event, the maximum possible error is 4 hours in the time of flight. The total thrust is not affected because of how the algorithm is structured.

CONCLUSION

The algorithm used to optimize the Earth to Mars trajectory is simple, direct, and has a rapid convergence to a global minimum. The code is adaptable in that (1) additional perturbations from other major planets can be added easily; (2) additional user defined features can be added to further minimize the time/thrust; e.g. by allowing a retrograde parking orbit at Mars or additional gravity assist and either planet by allowing a lower fly by altitude than the respective parking orbits; (3) the routine is easily adaptable to parallel processing, as large blocks of code can be executed independently; and (4) the approximation made to the trajectory at Mars SOI – the only such approximation in the whole algorithm – is made at this point in the flight path because this is where, on actual missions, final approach adjustments are made to target a specific latitude and longitude, so the code can be easily modified to allow for this possibility in future versions. You can view the entire source code and download a compiled version of the program at http://whcii.home.mindspring.com

REFERENCES

Bate, Mueller, White, “Fundamentals of Astrodynamics.” Dover Publications, 1971

Battin, Richard, “An Introduction to the Mathematics and Methods of Astrodynamics,” AIAA Education Series, 1999

Danby, J.M.A., “Fundamentals of Celestial Mechanics,” Willmann-Bell, 1992

Jefferys, William, Class Notes for Celestial Mechanics I at the Univ. of Texas at Austin, fall of 2000

Kaplan, Marshall, “Modern Spacecraft Dynamics and Control,” John Wiley and Sons, 1976

Roy, A.E. “Orbital Motion,” Adam Hilger, 1988

Vallado, David, “Fundamentals of Astrodynamics and Applications,” McGraw-Hill, 1997

Vaughan, R., Kailemeyn, P., Spencer D., Braun. R., “Navigation Flight Operations for Mars Pathfinder,” AAS Paper 98-145, February 1998

Copyright 2002 by William H. Clark II All rights reserved.