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
TAB 10
 Logo
MARS PATHFINDER SOURCE CODE
ABSTRACT
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 a flight path using the same total thrust as a Hohmann Transfer (i.e. the minimum energy trajectory in two body motion) or a trajectory which has the same time of flight as the Hohmann but uses 10% less total thrust. This report shows how the optimization algorithm is constructed and how it arrives at a solution using a relatively compact body of code that solves the problem to 12 significant digits in seconds on a personal computer. (NOTE: You can download versions 1.0 and 2.0 of the program on my resume page, at "Gravity Games." There's also a FREE book on orbital mechanics.)
The simplest and most efficient interplanetary trajectory is the Hohmann Transfer, the usual standard to which 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). At present, 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 genetic algorithm methods.
The patched conic method forms the basis for all interplanetary trajectory studies, 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 body 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. (The SOI is the point where the force from the central body and a third body are equal in magnitude.) 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.
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. It 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 by third party 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:
dV1 = 2.944 km/sec
dV2 = 2.649 km/sec
total = 5.593 km/sec
time = 260 days
The model solves 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 with Earth and Mars are in their true elliptical orbits. Table 1 shows a range of values for a given TCM at conjunction.
DeltaV, km/sectime, daystotal deltaV, km/sec
1.2214.2246.764
1.1216.1336.511
1.0218.0196.308
0.9220.0636.157
0.8222.7665.779
0.7225.1315.645
0.6228.3395.625
0.5231.5105.283
0.4235.7495.381
0.3240.5805.202
0.2247.7305.131
0.1262.1905.157
Table 1 Trajectory Parameters versus the Hohmann Transfer
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 at a true anomaly of 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.
Basic Formulation
The flight path from Earth to Mars has seven specific reference points, as follows:
A 200 km Earth parking orbit
The beginning of the interplanetary trajectory, near Earth but not necessarily at the initial parking orbit
Earth’s SOI
The Earth-Mars conjunction
The end of the interplanetary trajectory, near Mars but not necessarily at the final parking orbit
A 100 km Mars parking orbit
The objective of the analysis to optimize 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. 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.
Equations of Motion
The equations of motion are the standard Newtonian formulation for a gravitation force between two bodies. 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 into a new reference system.
The following flow charts will help to interpret the computer code. This is a greatly abbreviated version of the code, with many of the optimal values coded in instead of searched for; that makes the full version is very difficult to follow for somebody not expert in orbital mechanics. This code block illustrates the method, and shows how the efficient results were achieved.



C Last change: BC 15 Nov 2003 12:43 pm
c "Grabet" Orbits from Earth to Mars
c ~ Gravity Assisted Bi-Elliptic Transfer Orbits
c copyright 2003 william h. clark ii
c
CODE DELETED

________________________________
your banner could be here


© 2004 WH Clark