You are on page 1of 9

Impulsive Hyperbolic Injection from a Circular Earth Park Orbit – NLP Method

This document is the user’s guide for a MATLAB script named hyper2_matlab which can be used to
determine the characteristics of the single impulsive maneuver required to transfer a spacecraft from an
initial circular Earth park orbit to a departure hyperbola. The algorithm implemented in this script is
based on the equations derived in Chapter 4 of Richard Battin’s classic text, Astronautical Guidance,
and Chapter 11 of An Introduction to the Mathematics and Methods of Astrodynamics, also written by
Professor Battin and published by the American Institute of Aeronautics and Astronautics (AIAA).

The Earth departure trajectory for interplanetary missions is usually defined by a “targeting
specification” which consists of twice the specific (per unit mass) orbital energy C3 , and the right
ascension   (RLA) and declination   (DLA) of the outgoing asymptote. These targets may be
supplied by a spacecraft customer or determined with a patched-conic or more sophisticated trajectory
analysis computer program that solves Lambert’s problem for interplanetary missions.

The hyper2_matlab.m MATLAB script determines the orbital elements and state vectors of the park
orbit and departure hyperbola at injection, and the injection delta-v vector and magnitude. This
information can be used as initial guesses for other trajectory simulations. This script uses the SNOPT
nonlinear programming (NLP) method to find the optimal coplanar or non-coplanar transfer maneuver.

This computer program assumes that the hyperbolic targets and orbital characteristics are in the same
Earth-centered-inertial (ECI) coordinate system. For example, targeting specs are often provided or
computed in an Earth mean equator and equinox of J2000 coordinate system (EME2000). For this
situation, the state vectors and orbital elements computed by this MATLAB script will also be with
respect to the EME2000 coordinate system.

Running the Script

The hyper2_matlab script will interactively prompt the user for the altitude and orbital inclination of
the circular Earth park orbit and the departure hyperbola characteristics. The following is a typical user
interaction with this MATLAB script.

please input the altitude of the circular Earth park orbit (kilometers)
? 185.32

please input the orbital inclination of the Earth park orbit (degrees)
(0 <= inclination <= 180)
? 28.5

please input the C3 of the departure hyperbola (kilometers^2/second^2)


(C3 > 0)
? 9.28

please input the right ascension of the outgoing asymptote (degrees)


(0 <= right ascension <= 360)
? 352.59

please input the declination of the outgoing asymptote (degrees)


? 38.5

Please note the proper units and valid data range for each input.

page 1
Script Output

The following is the script output for this non-coplanar example.


----------------------------------------------------------------------
Interplanetary Injection from a Circular Earth Park Orbit – NLP Method
----------------------------------------------------------------------

departure hyperbola characteristics


-----------------------------------

c3 9.280000 kilometers^2/second^2

asymptote right ascension 352.590000 degrees

asymptote declination 38.500000 degrees

orbital elements and state vector of park orbit at injection - opportunity #1


-----------------------------------------------------------------------------

sma (km) eccentricity inclination (deg) argper (deg)


+6.56346000000000e+03 +0.00000000000000e+00 +2.85000000000000e+01 +0.00000000000000e+00

raan (deg) true anomaly (deg) arglat (deg) period (min)


+2.62590000391829e+02 +3.12544908830941e+02 +3.12544908830941e+02 +8.81980522880484e+01

rx (km) ry (km) rz (km) rmag (km)


-4.78649275664045e+03 -3.85286985447614e+03 -2.30735522767897e+03 +6.56346000000000e+03

vx (kps) vy (kps) vz (kps) vmag (kps)


+3.85165475038245e+00 -6.29072335152133e+00 +2.51431627455823e+00 +7.79296034444086e+00

orbital elements and state vector of hyperbola at injection - opportunity #1


----------------------------------------------------------------------------

sma (km) eccentricity inclination (deg) argper (deg)


-4.29526337823278e+04 +1.15042824853112e+00 +3.97389482427168e+01 +3.12784284153612e+02

raan (deg) true anomaly (deg) arglat (deg)


+2.45683986407545e+02 +1.38556047267724e+01 +3.26639888880384e+02

rx (km) ry (km) rz (km) rmag (km)


-4.78649275664045e+03 -3.85286985447614e+03 -2.30735522767897e+03 +6.56346000000000e+03

vx (kps) vy (kps) vz (kps) vmag (kps)


+2.99280761783281e+00 -9.54679394718429e+00 +5.53554782769536e+00 +1.14341795446834e+01

injection delta-v vector and magnitude - opportunity #1


-------------------------------------------------------

x-component of delta-v -858.847133 meters/second


y-component of delta-v -3256.070596 meters/second
z-component of delta-v 3021.231553 meters/second

delta-v magnitude 4524.097061 meters/second

A script example with two injection opportunities can be found in Appendix A.

Trajectory Graphics

The hyper2_matlab MATLAB script will also create a graphics display of the park orbit and
departure hyperbola for each injection opportunity. The interactive graphic features of MATLAB
permit the user to rotate and zoom this display. These capabilities allow the user to interactively find the
best viewpoint as well as verify basic orbital geometry of the Earth park orbit and departure trajectory.

page 2
This script will also create a disk file of this graphics display with the name hyper2.eps. This file is a
color Postscript image with a TIFF preview. The name and other characteristics of this file can be
edited in line 608 of MATLAB source code;

print -depsc -tiff -r300 hyper2_matlab.eps

The following are two typical displays for this example. Each display is labeled with an Earth centered,
inertial coordinate system. The x-axis of this system is red, the y-axis is green and the z-axis is blue.
The outgoing asymptote is colored magenta, the park orbit traces are red, and the hyperbolic trajectories
are black. Please note the units for each coordinate axis are Earth radii (ER). The location of the
impulsive maneuver is marked with a small red circle.

Technical Discussion

This section describes the numerical algorithms implemented in this MATLAB script. The software
assumes an impulsive injection maneuver which implies an instantaneous change in velocity only. In
the following paragraph, i is the orbital inclination of the initial circular Earth park orbit and   is the
declination of the outgoing or launch hyperbola.

Whenever i    , there will be two coplanar opportunities to establish a departure hyperbola that will
satisfy the energy and orientation of the outgoing trajectory. One injection opportunity will occur while
the spacecraft is ascending and the other while the spacecraft is descending along the park orbit. For the
case where i    , there will be a single coplanar injection opportunity. Finally, for the case where
   i , there will be a single non-coplanar injection opportunity. Also note that for i    , the
impulsive maneuver occurs at perigee of the departure hyperbola.

page 3
A geocentric unit vector is the direction of the departure asymptote is given by

cos   cos   
ˆi   cos  sin  
  
 sin  
  
where
  right ascension of departure asymptote
   declination of departure asymptote

Departure delta-V

The velocity vector of the spacecraft on the initial circular orbit is given by

ˆ
v0  i
r

The velocity vector at any geocentric position vector r required to achieve a launch hyperbola defined
by v ,  and   is given by
1
v1  v  D  1 ˆi   D  1 ˆi r 
2

where
4
D  1

rv2 1  ˆi ˆi r 
and
cos  cos   sin  sin  cos i 
ˆi  sin  cos   cos  sin  cos i 
r  
 sin  sin i 

  cos  sin   sin  cos  cos i 


ˆi    sin  sin   cos  cos  cos i 
  
 cos  sin i 

In these equations,  is the right ascension of the ascending node, i is the orbital inclination,  is the
true anomaly at injection, r is the geocentric radius of the park orbit and v  C3 .

The impulsive injection v vector can be determined from the following expression

v  v1  v0

Finally, the scalar injection delta-v is v  v which is the value that this script attempts to minimize.
page 4
Orientation of the Earth park orbit and departure hyperbola

The orientation of the Earth park orbit and departure hyperbola at injection is computed using a two-
dimensional grid involving the park orbit right ascension of the ascending node (RAAN) and the true
anomaly of the impulsive maneuver on the park orbit.

The following is the MATLAB source code that computes the elements of this grid. In this code
snippet, nphi1 and nphi2 are the number of RAAN and true anomaly increments. Also, dphi1 and
dphi2 are the RAAN and true anomaly increments in radians, and phi01 and phi02 are the initial
values for the RAAN and park orbit true anomaly grid search.
% create two-dimensional grid

nsol = 0;

for i = 1:1:nphi1

for j = 1:1:nphi2

xg(1) = phi01 + dphi1 * (i - 1);

xg(2) = phi02 + dphi2 * (j - 1);

if (firstpass == 1)

xg = xg';

% bounds on control variables

xlwr(1) = - 2.0 * pi;


xupr(1) = + 2.0 * pi;

xlwr(2) = - 2.0 * pi;


xupr(2) = + 2.0 * pi;

xlwr = xlwr';
xupr = xupr';

% bounds on objective function

flow(1) = 0.0d0;

fupp(1) = +Inf;

firstpass = 0;

end

% compute current solution

[x, f, inform, xmul, fmul] = snopt(xg, xlwr, xupr, flow, fupp, 'hyperfunc');

x(1) = mod(x(1), 2.0 * pi);

x(2) = mod(x(2), 2.0 * pi);

nsol = nsol + 1;

dvwrk(nsol) = f;

xwrk1(nsol) = x(1);

xwrk2(nsol) = x(2);

end

end

page 5
This code illustrates how the initial guess vector xg is calculated, the setting of the lower and upper
bounds on the control variables, xlwr and xupr, the objective function, flow and fupp, and the actual
call to the SNOPT function. Note that 'hyperfunc' is the name of the MATLAB function that
computes the objective function. The following is the source code for this function.
function [f, g] = hyperfunc (x)

% hyperbolic injection delta-v objective function

% required by hyper2_matlab.m

% Orbital Mechanics with MATLAB

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

global mu xinc rpmag vinfm ihat_inf v0 v1 dv

% unload current values for raan and true anomaly (radians)

raan = x(1);

tanom = x(2);

% compute ir1 unit vector

ihat_r1(1) = cos(raan) * cos(tanom) - sin(raan) * sin(tanom) * cos(xinc);

ihat_r1(2) = sin(raan) * cos(tanom) + cos(raan) * sin(tanom) * cos(xinc);

ihat_r1(3) = sin(tanom) * sin(xinc);

% compute itheta1 unit vector

ihat_theta1(1) = -cos(raan) * sin(tanom) - sin(raan) * cos(tanom) * cos(xinc);

ihat_theta1(2) = -sin(raan) * sin(tanom) + cos(raan) * cos(tanom) * cos(xinc);

ihat_theta1(3) = cos(tanom) * sin(xinc);

% compute ECI park orbit velocity vector (kilometers/second)

v0(1) = sqrt(mu / rpmag) * ihat_theta1(1);

v0(2) = sqrt(mu / rpmag) * ihat_theta1(2);

v0(3) = sqrt(mu / rpmag) * ihat_theta1(3);

% compute ECI injection hyperbola velocity vector (kilometers/second)

d = sqrt(1.0 + 4.0 * mu / (rpmag * vinfm^2 * (1.0 + dot(ihat_inf, ihat_r1))));

v1(1) = 0.5 * vinfm * ((d + 1.0) * ihat_inf(1) + (d - 1.0) * ihat_r1(1));

v1(2) = 0.5 * vinfm * ((d + 1.0) * ihat_inf(2) + (d - 1.0) * ihat_r1(2));

v1(3) = 0.5 * vinfm * ((d + 1.0) * ihat_inf(3) + (d - 1.0) * ihat_r1(3));

% compute impulsive delta-v vector (kilometers/second)

dv = v1 - v0;

% load scalar objective function - delta-v magnitude (kilometers/second)

f(1) = norm(dv);

% no derivatives

g = [];

page 6
MATLAB versions of SNOPT for several computer platforms can be found at Professor Philip Gill’s
web site which is located at http://scicomp.ucsd.edu/~peg/. Professor Gill’s web site also includes a
PDF version of the SNOPT software user’s guide.

Algorithm Resources

“Design of Lunar and Interplanetary Ascent Trajectories”, Victor C. Clarke, Jr., JPL Technical Report
No. 32-30, March 15, 1962.

An Introduction to the Mathematics and Methods of Astrodynamics, Richard H. Battin, AIAA Education
Series, 1987.

Analytical Mechanics of Space Systems, Hanspeter Schaub and John L. Junkins, AIAA Education
Series, 2003.

Spacecraft Mission Design, Charles D. Brown, AIAA Education Series, 1992.

Orbital Mechanics, Vladimir A. Chobotov, AIAA Education Series, 2002.

“A Computer Simulation of the Orbital Launch Window Problem”, Archie C. Young and Pat R. Odom,
AIAA 67-615, 1967.

“Launch Parameters for Interplanetary Flights”, W. C. Riddell, American Rocket Society Journal,
December 1960.

page 7
Appendix A
Coplanar Hyperbolic Injection Example

This appendix summarizes the numerical data and trajectory graphics for an example that has two
interplanetary injection opportunities.
----------------------------------------------------------------------
Interplanetary Injection from a Circular Earth Park Orbit – NLP Method
----------------------------------------------------------------------

departure hyperbola characteristics


-----------------------------------

c3 9.280000 kilometers^2/second^2

asymptote right ascension 352.590000 degrees

asymptote declination 2.270000 degrees

orbital elements and state vector of park orbit at injection - opportunity #1


-----------------------------------------------------------------------------

sma (km) eccentricity inclination (deg) argper (deg)


+6.56346000000000e+03 +0.00000000000000e+00 +2.85000000000000e+01 +0.00000000000000e+00

raan (deg) true anomaly (deg) arglat (deg) period (min)


+3.48403265274183e+02 +2.14598147020527e+02 +2.14598147020527e+02 +8.81980522880484e+01

rx (km) ry (km) rz (km) rmag (km)


-5.95084599386116e+03 -2.12228647129169e+03 -1.77829673078451e+03 +6.56346000000000e+03

vx (kps) vy (kps) vz (kps) vmag (kps)


+3.20139664258426e+00 -6.41188588803180e+00 -3.06088383081367e+00 +7.79296034444086e+00

orbital elements and state vector of hyperbola at injection - opportunity #1


----------------------------------------------------------------------------

sma (km) eccentricity inclination (deg) argper (deg)


-4.29526337823279e+04 +1.15280692758590e+00 +2.85000008311863e+01 +2.14598145832179e+02

raan (deg) true anomaly (deg) arglat (deg)


+3.48403266475790e+02 +1.32355398958923e-07 +2.14598145964534e+02

rx (km) ry (km) rz (km) rmag (km)


-5.95084599386116e+03 -2.12228647129169e+03 -1.77829673078451e+03 +6.56346000000000e+03

vx (kps) vy (kps) vz (kps) vmag (kps)


+4.69723217337556e+00 -9.40780531723071e+00 -4.49106567337270e+00 +1.14341795446834e+01

injection delta-v vector and magnitude - opportunity #1


-------------------------------------------------------

x-component of delta-v 1495.835531 meters/second


y-component of delta-v -2995.919429 meters/second
z-component of delta-v -1430.181843 meters/second

delta-v magnitude 3641.219200 meters/second

orbital elements and state vector of park orbit at injection - opportunity #2


-----------------------------------------------------------------------------

sma (km) eccentricity inclination (deg) argper (deg)


+6.56346000000000e+03 +0.00000000000000e+00 +2.85000000000000e+01 +0.00000000000000e+00

raan (deg) true anomaly (deg) arglat (deg) period (min)


+1.76776720882949e+02 +2.50750351790664e+01 +2.50750351790664e+01 +8.81980522880484e+01

page 8
rx (km) ry (km) rz (km) rmag (km)
-6.07292195069729e+03 -2.10640961295102e+03 +1.32727717331632e+03 +6.56346000000000e+03

vx (kps) vy (kps) vz (kps) vmag (kps)


+2.94868470474099e+00 -6.37901964500105e+00 +3.36802580315903e+00 +7.79296034444086e+00

orbital elements and state vector of hyperbola at injection - opportunity #2


----------------------------------------------------------------------------

sma (km) eccentricity inclination (deg) argper (deg)


-4.29526337823283e+04 +1.15280692758590e+00 +2.85000110688105e+01 +2.50750256513229e+01

raan (deg) true anomaly (deg) arglat (deg)


+1.76776731737046e+02 +3.59999999988977e+02 +2.50750256403003e+01

rx (km) ry (km) rz (km) rmag (km)


-6.07292195069729e+03 -2.10640961295102e+03 +1.32727717331632e+03 +6.56346000000000e+03

vx (kps) vy (kps) vz (kps) vmag (kps)


+4.32644198903359e+00 -9.35958142464666e+00 +4.94172005793444e+00 +1.14341795446834e+01

injection delta-v vector and magnitude - opportunity #2


-------------------------------------------------------

x-component of delta-v 1377.757284 meters/second


y-component of delta-v -2980.561780 meters/second
z-component of delta-v 1573.694255 meters/second

delta-v magnitude 3641.219200 meters/second

Here’s the companion trajectory display for this example.

2
Z coordinate (ER)

-1

-2
-2
-3
0

-4 2

4
-2 -1 0 1 6
2 3 4
X coordinate (ER)

Y coordinate (ER)
page 9

You might also like