Section Links
X 0 1 2 3 4 5 6 7 8

C4CM
Section Two


Mars Pathfinder
___

7. GRABET Orbits
8. Earth Escape
9. Mars Capture
10. Mars Pathfinder
SECTION TWO
Interplanetary Mission Logo
OPTIMIZING INTERPLANETARY TRAJECTORIES
ABSTRACT

Interplanetary trajectories are typically too nonlinear to be modeled directly, much less optimized, easily. The problem is so nonlinear, in fact, that none of the proven optimization algorithms work, and a totally random scheme called genetic programming must be used. The purpose of this report is to show that an interplanetary trajectory can in fact be solved, and optimized, without resorting to any optimization methods at all. The method has been proven valid on a computer simulation of the Earth to Mars trajectory, which finds a more efficient mission profile than any other optimization technique. This is done by simply modeling the algorithm on some of the fundamental rules of orbital mechanics. This is not only an effective way to structure an algorithm but provides many more insights into the dynamics of the problem than statistical/optimization or random/gentic schemes. You can try the program itself, called Mars Pathfinder 1.0. There is also a full blown windows version with illustrations, graphical printouts, help files, and lots more design inputs called version 2.0. (NOTE: These two programs and all the other material on this website is exactly as it was when I was expelled; since then I have been working on the rest of the material here.) You can download an introduction to Orbital Mechanics here. It has the technical material on this program and the complete source code in the appendix. Another book follows the original derivations of orbital mechanics from the 1600's to the modern era, and shows how all this research ties into Relativity Theory. You can get this second book here. It has the technical material on this program and the complete source code in the appendix.

Trajectory Correction Maneuvers

It is generally accepted that the most efficient way to apply a thrust to a spacecraft is along the current velocity vector. Doing so applies 100% of the fuel energy to increasing velocity. Thus, if you want an efficient trajectory, you plan on applying all thrusts along the respective velocity vectors. The art is to design the flight path so that the resulting changes in the orbital path alter the architecture of the orbit in a way that is advantageous to the overall mission objectives.

An in-line thrust alters the orbit in different ways, depending on where it is applied. Consider a Hohmann Transfer from Earth to Mars, in which the objective is to find a neighboring trajectory that reaches Mars faster and with less fuel. An extra thrust at periapse increases the eccentricity and the semimajor axis of the orbit (unless otherwise noted, all thrusts are forward to speed up and not in reverse to slow down), the reverse action of aerobraking. This increases the distance traveled going to, say a true anomaly of pi/2. Applying a thrust at pi/2 also elongates the orbit, but only after traveling to that point along the original ellipse, which is the shortest distance from periapse. Plus, the shape of the orbit changes most dramatically at apoapse, causing the Hohmann Transfer ellipse and the flight path of Mars to intersect much sooner. The geometry of the problem is thus used to good advantage, in setting up the final mission profile.

The Hohmann Transfer from Earth to Mars

The Hohmann Transfer Orbit from Earth to Mars

A spacecraft on an elliptical transfer orbit travels fastest at periapse and slowest at apoapse. The segment of the trajectory from periapse to a true anomaly of pi/2 is not only geometrically efficient, as noted previously, but also energy efficient. Applying available thrust at pi/2 increases the velocity on the slower part of the trajectory, compelling the spacecraft to reach the target much faster than if the same thrust were applied at periapse. Applying this thrust anywhere before or after pi/2 on the Hohmann ellipse increases the velocity less because more of the energy is going into changing the orientation of the orbit in space - which is helpful, but not as effective as spending all of this energy in elongating the orbit, which is what happens if the thrust is applied at pi/2.

These simple principles of orbital mechanics indicate the efficacy of applying a major thrust at a true anomaly of pi/2, as the best way to use a little extra thrust to do better than a straight Hohmann Transfer. Moreover, at the far end of the trajectory, the elongated transfer orbit turns out to have a more advantageous approach to Mars and the geometry at that point makes in possible to reach a final parking orbit around Mars more easily.

The transfer orbit has a true anomaly of about pi/2 at approximately the same position as the Earth-Mars conjunction. Henceforth this pi/2 point will be called "conjunction" and the thrust will be applied there, even though the final mission plan will not be exactly at conjunction.

Program Architecture

This paper is about trying to optimize an interplanetary trajectory without resorting to any sort of third party nonlinear optimization algorithms. However, there is nothing to prevent the completed trajectory - optimized thought it may already be - from being further refined by a nonlinear routine. This is not a contradiction because if the program is structured right, additional degrees of freedom can be added, and the whole thing solved by a nonlinear problem solver. The simpler the base problem to be solved, the more degrees of freedom that can be handled by the nonlinear algorithm - keeping in mind that the interplanetary problem, without such strategies as noted above, is already too complex for a nonlinear program and can be solved only by the most general of all processes, the genetic algorithm.

These are issues of programming architecture and mission design. Most Mars missions have a flight path correction right after leaving Earth's Sphere of Influence (SOI), to fine tune the long heliocentric ellipse to Mars. Similarly, there are typically thrusts just outside of Mars' SOI to set the spacecraft on the exact path for landing on Mars at a specific longitude and latitude. The mission design tool, developed here, has no such thrusts but the routine can easily be altered to add a thrust there, since the integration stops near each SOI for a change of coordinates. Other critical points are accessible for small thrust corrections like this, and are well suited for a nonlinear optimizer since they can be programmed with a confident range for equality and inequality constraints, such that all values in any given range will always generate a result.

It should be noted that the genetic algorithm approach is needed in so many interplanetary analyses because every single part of the whole problem is very nonlinear. Consequently, it is very important to establish a robust nominal trajectory, from which all variations in constraints result in solutions. The nominal trajectory, then, must be firmly grounded in fundamental orbital mechanics for it to have the kind of solution that can later be subtly modified at many intermediate points.

The choice of conjunction (e.g. a true anomaly of pi/2) would seem to be a strong constraint on the problem, which being so inflexible would make the method seem much less an optimization. The rest of the routine, however, is programmed so that the thrust at the place called conjunction is nothing more than an acknowledgement that the spacecraft at some point in transit from Earth to Mars is at a specific distance from the sun. The true anomaly at which this happens completely flexible, and the routine is free to apply the mid-course thrust (which can be set to equal zero) at the most efficacious point. Thus, specifying a priori that a major thrust is to be applied "at conjunction" is not a constraint at all, other than having the intention of applying a thrust in the general area of pi/2 radians of true anomaly.

A last comment on programming strategy is to note that only central forces are simulated - e.g. no radiation pressure or atmospheric drag - in order to make it possible to do reverse integration. There is nothing wrong with adding these affects once the final optimized trajectory has been found, after which point the entire mission can be integrated straight from start to finish using the original code segments almost as is. The idea here is to leave such refinements to subsequent program and code refinements, and to focus here upon the basic trajectory and its numerical solution. Likewise, all thrusts are assumed to be point thrusts, while the code is always written to make it simple to modify for other types of thrust.

Hyperbolic Earth Escape from Parking Orbit

Hyperbolic Earth Escape from Parking Orbit

Two Point Boundary Value Problem

The nice thing about planning a priori a thrust near conjunction (and this value can be zeroed out by the user as an input) is that the mission is divided into two problems, conjunction-to Earth and conjunction-to Mars. Starting at a single point, the trajectory is integrated backward to Earth (the model having only central forces) and forward to Mars. The final "approach" to Earth is not necessarily at periapse for the Hohmann Transfer; nor the Mars landing at apoapse - as noted before, these are variables for the problem, which makes the starting point at conjunction a flexible quantity that is nothing more than a common point on the trajectory from Earth to Mars.

It is helpful to consider the whole algorithm at this point. A general time frame for a Mars mission is determined, and the exact ephemeredes of the planets is used to find the coordinates for a true anomaly of pi/2 on a two body Hohmann Transfer. The starting values of the problem are simply the epoch time of this position, with the spacecraft at the specified point on the Hohmann Transfer. The trajectory to Earth is first optimized from that time and position (in effect varying the true anomaly for an optimal "approach" to Earth, integrating back in time), often requiring a fractional thrust to be applied at conjunction. This thrust is applied to the original state vector, and from there the integration is completed to Mars. The Mars approach is a far more difficult problem to solve, even numerically, and requires a fractional adjustment to the time at conjunction. Once this part of the problem is solved, the state vector is adjusted at conjunction and the Earth trajectory is optimized again. At which point a complete, optimized trajectory is established.

The program accepts an input for thrust at conjunction, then finds the fastest flight path to Mars. Once an acceptable time of flight is determined, the starting time can be adjusted slightly to suit a specific mission plan - e.g. time of Earth departure. This is limited to a small window on the order of weeks, and the original optimal time solution is modified at the cost of extra thrust. These types of solutions, as slight variations from a robust nominal trajectory, would be the time when non-central forces could be added (integrating the entire trajectory forward in time, via a modified algorithm), and other such parameters as required by mission planning. The purpose of this report is to build a model to satisfy these requirements, in finding an optimal trajectory from Earth to Mars.

Coordinate Systems and Numerical Accuracy

The most numerically accurate way to calculate the trajectory is to integrate the motion with respect to the respective central bodies, and to add perturbing forces from third bodies. Always integrating versus central bodies makes the reverse integration possible as well. Another advantage of integrating versus central bodies is that barycenter calculations are not necessary, more so if a numerically stable equation is used for the third body perturbations. It is not difficult to show that this is the most accurate way, stopping the integration at SOI and changing coordinates. The third body perturbation is done using (Vallado 7-32)

Although another, perhaps more accurate, equation is (Vallado 7-33)

The code is set up so that additional perturbing bodies can be added, requiring a few more lines of code for each new body. The final approach within the SOI does not include any other perturbations other than from the sun, although these too could be included.

There are several practical reasons for modeling the trajectory near Earth and Mars in coordinates centered at the respective planet. (There is no loss of numerical accuracy to do so.) Telemetry data near Earth - and now, near Mars as well - is available in local coordinates. Having the same units in the computer model avoids careless errors, makes last minute rush problem analyses and decisions easier, and allows seamless use of real time data by the spacecraft itself for autonomous decision making at critical points in the mission.

Conjunction to Parking Orbit

The trajectories to Earth and Mars are both first integrated from conjunction to the planet's Sphere of Influence (SOI). It is not difficult to target Earth's SOI, but Mars is a much smaller planet and the step size of the integrator must be fixed so that the routine does not go right past Mars (which is easy for the program to do because the step size is so big by that time). Once the SOI is achieved, there is a transfer of coordinates and the mission is continued in the local coordinates, to completion.

Hohmann Transfer between Parking Orbits

Hohmann Transfer between Parking Orbits

The key feature in the final part of the flight path after SOI is that the Runge Kutta 7/8 variable step integrator is used to select extremal trajectories. The integrator is designed to stop at every point at which significant changes have been detected in the problem - e.g. significant variations in the forces on the spacecraft, or changes in the parameters of the trajectory - so this saves the algorithm the trouble of having to make such a determination. This makes for a very fast and efficient routine, on the order of Artificial Intelligence because of how the integrator is able, in selecting the most sensitive points on the trajectory, to greatly expedite the convergence of the algorithm to a global minimum.

Every attempted approach trajectory must have a solution, or at least a numerical value, in an optimized routine like this. A one dimensional search routine is used to determine increments of thrust to apply at the starting point. When the central body is close, each stop of the routine calculates a two body Hohmann Transfer to the final parking orbit, and assigns this value to that point. When the trajectory is past the target, the minimum value is assigned to the flight path and the initial thrust at SOI is incremented accordingly, seeking a global minimum to the approach.

The flight path is modeled in this way so that the program can try and find a mission that takes advantage of gravity assist from the target planet. For Earth escape, a small gravity assist adds velocity to the spacecraft. For Mars capture, the "free return" profile of the desired trajectory helps to slow down the spacecraft ~ dramatically, if the algorithm is able to find the closed zero velocity curve for the sun-Mars system. This kind of approach profile is more probable, with a large reduction in thrust, with the kind of geometry in the flight path that happens with a major thrust at conjunction. This thrust not only gets the spacecraft to Mars much faster, but upon reaching Mars has a favorable geometry that saves just as much - if not more - thrust, in the final approach. Moreover, being a free return type of trajectory, the tragic pitfalls of a typical Mars landing are mitigated.


________________________________
your banner could be here


© 2004 WH Clark