A MATLAB Script For Optimal Single Impulse De-Orbit From Earth Orbits
A MATLAB Script For Optimal Single Impulse De-Orbit From Earth Orbits
This document describes a MATLAB script named deorbit_snopt that can be used to compute the
optimal impulsive maneuver required to de-orbit a spacecraft in a circular or elliptical Earth orbit. The
user provides the classical orbital elements of the initial orbit along with geodetic altitude and relative
flight path angle targets at the entry interface (EI).
This script solves this maneuver optimization problem using a simple shooting method. During the
solution process, the script numerically integrates the spacecraft equations of motion subject to the
Earth’s J 2 gravity coefficient. The numerical integration is performed using MATLAB’s ode45
function. The entry interface targets are computed with respect to an oblate, rotating Earth.
In this classic maneuver optimization problem, the maneuver true anomaly, the ECI components of the
maneuver delta-v vector and the flight time from the maneuver to the entry interface are the control
variables. The scalar magnitude of the de-orbit V is the objective function or performance index,
and the geodetic altitude and relative flight path angle at the entry interface are treated as nonlinear
equality constraints. The algorithm uses an initial guess determined from the analytic de-orbit solution
relative to a spherical, non-rotating Earth.
The deorbit_snopt script uses the SNOPT nonlinear programming algorithm to solve this orbital
mechanics problem. 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 software user’s guide.
When the deorbit_snopt script is started, the software will display the following screen which
allows the user to select a data file for processing.
The file type defaults to names with a *.in filename extension. However, you can select any
deorbit_snopt compatible ASCII data file. The next section describes the format and typical
contents of compatible input files.
page 1
Input data file
This section describes a typical input data file for the software. In the following discussion the actual
input file contents are in courier font and all explanations are in times italic font.
Each data item within an input file is preceded by one or more lines of annotation text. Do not delete
any of these annotation lines or increase or decrease the number of lines reserved for each comment.
However, you may change them to reflect your own explanation. The annotation line also includes the
correct units and when appropriate, the valid range of the input.
The first five lines of any input file are reserved for user comments. These lines are ignored by the
software. However the input file must begin with five and only five initial text lines.
*****************************************************
** impulsive de-orbit delta-v trajectory optimization
** de-orbit from initial circular orbit
** file ==> deorbit3.in March 19, 2010
*****************************************************
The first input is the calendar date of the impulsive maneuver. Be sure to include all four digits of the
calendar year.
The next series of inputs define the classical orbital elements of the initial Earth orbit. Notice that the
true anomaly is an initial guess for the location of the maneuver. The true anomaly initial guess for
elliptical Earth orbits should be 180 degrees.
**********************************************
orbital elements at time of impulsive maneuver
**********************************************
page 2
The software allows the user to specify lower and upper bounds for the optimal true anomaly of the
maneuver. The algorithm enforces an inequality constraint on the true anomaly according to
L U
where L and U are the user-defined lower and upper bounds, respectively.
The numerical values of these bounds are defined in the next two data items.
The final two items in the simulation file define the geodetic altitude and relative flight path angle
targets at the entry interface.
***********************************
entry interface mission constraints
***********************************
Program examples
page 3
total delta-v 144.014061 meters/second
page 4
flight time from maneuver to EI 30.06271094 minutes
The following is the output created by this MATLAB script for the optimal de-orbit from a typical
highly elliptical orbit (HEO).
****************************************
single impulse deorbit from Earth orbits
****************************************
page 5
calendar date 18-Mar-2010
Technical discussion
This section is a brief explanantion of the algorithms implemented in this MATLAB script.
y t
z
u t
consisting of the state variables y and the control variables u for any time t. In this discussion
vectors are denoted in bold.
The system dynamics are defined by a vector system of ordinary differential equations called the state
equations that can be represented as follows:
page 6
dy
y f y t , u t , p, t
dt
The initial dynamic variables at time t0 are defined by ψ0 ψ y t0 , u t0 , t0 and the terminal
conditions at the final time t f are defined by ψ f ψ y t f , u t f , t f . These conditions are called
the boundary values of the trajectory problem. The problem may also be subject to path constraints of
the form g y t , u t , t 0 .
The basic nonlinear programming problem (NLP) is to determine the control vector history and
problem parameters that minimize the scalar performance index or objective function given by
J y t0 , t0 , y t f , t f , p
In this classic maneuver optimization problem, the maneuver true anomaly, the ECI components of the
maneuver delta-v vector and the flight time from the maneuver to the entry interface are the control
variables. The scalar magnitude of the de-orbit V is the objective function, and the geodetic altitude
and relative flight path angle at the entry interface are the nonlinear equality constraints.
Initial guess
An initial guess for the scalar magnitude of the de-orbit delta-v and time-of-flight from the maneuver
location to the entry interface is determined using analytic solutions for these values relative to a non-
rotating, spherical Earth model and two-body or Keplerian motion. The analytic solution for circular
orbits in discussed in Appendix A and Appendix B contains the equations for elliptical orbits. Please
note that the elliptical orbit analytic solution assumes the de-orbit maneuver occurs at apogee (true
anomaly = 180 ). This is the typical true anomaly initial guess for de-orbit from elliptical orbits.
The initial guess for the de-orbit delta-v vector is aligned opposite (retrograde) to the unit velocity
vector on the initial Earth orbit at the maneuver location. This creates an impulsive velocity increment
in the Earth-centered-inertial (ECI) Cartesian coordinate system.
During the solution process, the deorbit_snopt script numerically propagates the spacecraft
trajectory from the maneuver time to the current estimate of the time at the entry interface. The system
of six first-order differential equations subject to Earth gravity is defined by
y1 v x y4
y 2 v y y5
y 2 v z y6
page 7
rx 3 J 2 req 5rz2
2
y 4 3 1 1 2
r 2 r 2 r
ry 3 J 2 req2 5rz2
y 5 1 1 2
r 3 2 r 2 r
rz 3 J 2 req 5rz2
2
y 6 1 3
r 3 2 r 2 r 2
where r rx2 ry2 rz2 y12 y22 y32 . In these equations and req are the gravitational constant
and equatorial radius of the Earth, and J 2 is the first order oblateness gravity coefficient.
At the entry interface, the algorithm computes the errors in the target constraints according to
h h p ht
p t
where h is the geodetic altitude and is the flight path angle relative to a rotating Earth. In these
equations, the p subscript indicates the value predicted by the software, and the t subscript is the target
value provided by the user. During the solution process, the SNOPT algorithm attempts to drive these
two errors to zero.
The equations for calculating the relative flight path coordinates from an ECI position and velocity
vectors is summarized in Appendix C. The algorithm used to calculate geodetic coordinates can be
found in Appendix D and Appendix E discusses the numerical method used to compute the pitch and
yaw orientation angles of the maneuver.
This section provides details about the MATLAB source code that solve this nonlinear programming
(NLP) problem using the SNOPT algorithm. MATLAB versions of SNOPT for several computer
platforms can be found at Professor Philip Gill’s University of California, San Diego 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.
The SNOPT algorithm requires an initial guess for the control variables. For this problem they are
given by
xg(1) = oevpo(6);
xg(2) = dvg(1);
xg(3) = dvg(2);
xg(4) = dvg(3);
xg(5) = dtof;
page 8
where xg(1) is the user’s initial guess for the true anomaly on the initial orbit at the time of the
impulsive maneuver. xg(2), xg(2) and xg(3) are the initial guesses for the ECI components of the
de-orbit impulse, and dtof is the initial guess for the transfer time from the maneuver to the entry
interface.
The algorithm also requires lower and upper bounds for the control variables. These are determined
from the initial guesses and user-defined true anomaly boundaries as follows:
xlwr(1) = ta_lower;
xupr(1) = ta_upper;
dvm = norm(dvg);
The algorithm also requires lower and upper bounds on the objective function. For this problem these
bounds are given by
flow(1) = 0.0d0;
fupp(1) = +Inf;
The following MATLAB code sets the lower and upper bounds for the two equality constraints
(geodetic altitude and relative flight path angle) at the entry interface.
flow(2) = 0.0d0;
fupp(2) = 0.0d0;
flow(3) = 0.0d0;
fupp(3) = 0.0d0;
[x, f, inform, xmul, fmul] = snopt(xg, xlwr, xupr, flow, fupp, 'deorbit_shoot');
page 9
where deorbit_shoot is the name of the MATLAB function that integrates the spacecraft equations
of motion and computes the current value of the objective function and the equality constraints at the
entry interface. The solution for the control variables is returned in the x vector and f is the converged
value of the objective function.
Algorithm Resources
“User’s Guide for SNOPT Version 6, A Fortran Package for Large-Scale Nonlinear Programming”,
Philip E. Gill, Walter Murray and Michael A. Saunders, December 2002.
“User’s Guide for SNOPT Version 7, A Fortran Package for Large-Scale Nonlinear Programming”,
Philip E. Gill, Walter Murray and Michael A. Saunders, March 20, 2006.
“Optimum Deboost Altitude for Specified Atmospheric Entry Angle”, Jerome M. Baker, Bruce E.
Baxter, and Paul D. Arthur, AIAA Journal, Vol. 1, No. 7, July 1963.
“Deboost from Circular Orbits”, A. H. Milstead, The Journal of the Astronautical Sciences, Vol. XIII,
No. 4, pp. 170-171, Jul-Aug., 1966.
Hypersonic and Planetary Entry Flight Mechanics, Vinh, Busemann and Culp, The University of
Michigan Press, 1980.
“On Autonomous Optimal Deorbit Guidance”, Morgan C. Baldwin, Binfeng Pan and Ping Lu, AIAA
2009-5667, AIAA Guidance, Navigation, and Control Conference, August 10-13, 2009.
“Autonomous Optimal Deorbit Targeting”, Donald J. Jezewski, AAS 91-136, AAS/AIAA Spaceflight
Mechanics Meeting, February 11-13, 1991.
“Analysis of the Accuracy of Ballistic Descent from a Circular Circumterrestrial Orbit”, Yu. G.
Sikharulidze and A. N. Korchagin, Cosmic Research, Vol. 40, No. 1, 2002, pp.75-87.
page 10
APPENDIX A
The scalar magnitude of the single impulsive maneuver required to de-orbit a spacecraft from an initial
circular orbit can be determined from the following expression
1 2 r 1 2 r 1
V Vce 1 Vci 1
r r
2
r
2
1 1
cos e cos e
where
hi req ri
r radius ratio
he req re
Vce local circular velocity at entry interface
he req re
Vci local circular velocity of initial circular orbit
h r
i eq
ri
This algorithm is described in the technical article, “Deboost from Circular Orbits”, A. H. Milstead,
The Journal of the Astronautical Sciences, Vol. XIII, No. 4, pp. 170-171, Jul-Aug., 1966. Additional
information can be found in Chapter 5 of Hypersonic and Planetary Entry Flight Mechanics by Vinh,
Busemann and Culp, The University of Michigan Press.
The true anomaly on the de-orbit trajectory at the entry interface e can be determined from the
following two equations
page 11
r ad 1 ed2
sin e
ed
ad 1 ed2 1
cos e
ed re ed
where
ed eccentricity of the de-orbit trajectory
The elapsed time-of-flight between perigee of the de-orbit trajectory and the entry true anomaly e is
given by
1 ed e 1 ed2 sin e
t e 2 tan 1 tan e d
2 1 ed 2 1 ed cos e
In this equation is the Keplerian orbital period of the de-orbit trajectory and is equal to 2 ad3 .
Therefore, the flight time between the de-orbit impulse and entry interface is given by
t t e t 180 t e
2
Finally, the orbital speed at the entry interface Ve can be determined from
2
Ve
re ad
page 12
APPENDIX B
The scalar magnitude of the impulsive delta-v for de-orbit from an initial elliptical orbit is given by
2rp 2 ra 1
V cos
re ra ra rp ra ra2 cos2 e
e
where
re geocentric radius at the entry altitude
ra ra re
rp rp re
The true anomaly at entry can be determined from the following series of equations.
r ad 1 ed2
sin e
ed
ad 1 ed2 1
cos e
ed re ed
where
ed eccentricity of the de-orbit trajectory
The time-of-flight between perigee and the entry true anomaly e is given by
page 13
1 1 ed e ed 1 ed2 sin e
t e 2 tan tan
2 1 ed 2 1 ed cos e
Therefore, the flight time between the de-orbit impulse time and entry is given by
t t e t 180 t e
2
2
Ve
re ad
page 14
APPENDIX C
Relative flight path coordinates are defined with respect to a rotating Earth. This set of coordinates
consist of the following elements;
r geocentric radius
V speed
flight path angle
geocentric declination
geographic longitude east
flight azimuth clockwise from north
The following are several useful equations that summarize the relationships between inertial and
relative flight path coordinates.
vr sin r vi sin i
where the r subscript denotes relative coordinates and the i subscript inertial coordinates.
The inertial speed can also be computed from the following expression
where all coordinates on the right-hand-side of these equations are relative to a rotating Earth.
page 15
The transformation of an Earth-centered inertial (ECI) position vector rECI to an Earth-centered fixed
(ECF) position vector rECF is given by the following vector-matrix operation
rECF T rECI
cos sin 0
T sin cos 0
0 0 1
and is the Greenwich apparent sidereal time at the moment of interest. Greenwich sidereal time is
given by the following expression:
g 0 et
where g 0 is the Greenwich sidereal time at 0 hours UT, e is the inertial rotation rate of the Earth,
and t is the elapsed time since 0 hours UT.
Finally, the flight path coordinates are determined from the following set of equations
r rECF
2
rECF
2
y
rECF
2
v vECF
2
vECF
2
y
vECF
2
z
tan 1 rECF , rECF y x
rECFz
sin 1
rECF
vRz
sin 1
v R
tan 1 vR , vR
y x
where
sin cos sin sin cos
v R sin cos 0 v ECF
cos cos cos sin sin
Please note that the two argument inverse tangent calculation is a four quadrant operation.
page 16
APPENDIX D
Geodetic Coordinates
The following diagram illustrates the geometric relationship between geocentric and geodetic
coordinates.
In this diagram, is the geocentric declination, is the geodetic latitude, r is the geocentric distance,
and h is the geodetic altitude. The exact mathematical relationship between geocentric and geodetic
coordinates is given by the following system of two nonlinear equations
c h cos r cos 0
s h sin r sin 0
req
c
1 2 f f 2 sin 2
s c 1 f
2
and req is the Earth equatorial radius (6378.14 kilometers) and f is the flattening factor for the Earth
(1/298.257).
In this MATLAB script, the geodetic latitude is determined using the following expression:
page 17
sin 2 1 1
f 2 sin 4 f 2
4
1 cos 2 1 1
hˆ rˆ 1 f 1 cos 4 f 2
2 4 16
In these equations, is the geocentric distance of the satellite, hˆ h / req and rˆ / req .
page 18
APPENDIX E
This MATLAB script provides the orientation angles of a de-orbit maneuver in a local-vertical-local-
horizontal (LVLH) coordinate system. The x-axis of the LVLH coordinate system is in the direction
of the negative unit angular momentum vector, the y-axis points in the direction of the unit h r
vector, and the z-axis is collinear with the unit position vector.
The matrix-vector operation for transforming an ECI unit pointing vector uˆ ECI to a unit pointing vector
in the LVLH system uˆ LVLH is as follows:
h hy hz
x
uˆ LVLH h r x h r y h r z uˆ ECI
rx ry rz
In this expression, r is the ECI position vector at the maneuver orbital location and h is the
corresponding angular momentum vector.
yaw tan 1 v xLVLH , v yLVLH
The pitch angle is positive above the local horizontal plane and negative below. The yaw angle is
measured positive in a direction to the right of the “forward” motion. The order of the rotations is yaw
and then pitch. The following diagram illustrates the geometry of these angles where V is the
orientation of the impulsive de-orbit delta-v.
page 19
page 20