Professional Documents
Culture Documents
3customized Real-Time Interior-Point Methods
3customized Real-Time Interior-Point Methods
In these results, the convexification is shown to be lossless for optimal R represents the vehicle’s mass, T ∈ R3 is the thrust force, g ∈ R3
trajectories without active state constraints or with momentarily active corresponds to gravitational acceleration, α ∈ R is a positive
state constraints (on a finite number of time instances). In [19], these constant that describes the mass flow rate, ω ∈ R3 is the planet’s
results are extended to optimal trajectories with active velocity rotational rate vector, and Sω ∈3×3 is a skew symmetric matrix
constraints on finite time intervals. Finally, the theory is extended to describing the cross-product operation [8]. The components of r are
allow for continuously active polytopic state constraints in [32]. defined as follows: r1 corresponds to the downrange, r2 corresponds to
Therefore, the second contribution of this paper is to present an crossrange, and r3 is the altitude. All of the initial conditions for the
extension of lossless convexification for trajectories with simulta- system are specified and denoted with a subscript zero. The vehicle is
neously active velocity-bound constraints and thrust-pointing required to land softly on the surface; thus, the final positions and
constraints. This extension is important because the results for the test velocities are specified (without loss of generality) and are denoted
flights in 2013 [29,36] make use of trajectories that are simultaneously with a subscript f:
limited by speed and thrust direction. More specifically, the test rocket
was at its maximum velocity for more than 75% of its descent [31]. rt0 r0 ; vt0 v0 ; mt0 m0 ;
Thus, the theory presented herein is necessary to guarantee that the r3 tf 0; vtf 0 (2)
optimal solutions to the convexified PDG problem demonstrated in the
test flights are also optimal for the original PDG problem. Thus, the final range, crossrange, and mass are free; however, the
Finally, it is not sufficient for the PDG algorithm to be fast on a final mass cannot be less than the dry mass md , of the vehicle; that is,
Downloaded by NASA JET PROPULSION LABORATORY on June 13, 2018 | http://arc.aiaa.org | DOI: 10.2514/1.G001480
modern desktop processor. The PDG problem must be rapidly solved mtf ≥ md . There are a number of additional constraints that any
on a radiation-hardened flight processor. Such “rad-hard” processors feasible trajectory must satisfy. A velocity upper-bound constraint
are significantly slower and have architectural differences that make keeps the vehicle’s thrusters operating in a safe (subsonic) regime.
them more robust to radiation-induced damage. For example, a state- Given a velocity upper bound V c , the speed constraint is given by
of-the-art flight processor has a clock speed of 200 MHz, an order of
magnitude slower than the average desktop processor. As a result, the kvtk ≤ V c (3)
runtimes of the customized PDG algorithm are characterized on a
BAE RAD750 flight processor. Runtimes on the order of 0.7 s are Second, the glideslope constraint keeps the vehicle in an inverted cone
achieved, indicating the appropriateness of the PDG algorithm for with its tip at the landing point [9,10]:
onboard implementation on rad-hard processors.
The paper is organized as follows: Sec. II gives a summary of the tan γkr1 t; r2 tk ≤ r3 t (4)
PDG problem formulation; Sec. III describes the real-time IPM
algorithm used; Sec. IV describes the automated solver generation for in which γ ∈ 0; 90 deg is the minimum admissible glideslope angle.
real-time implementation; Sec. V established the proof of lossless The control constraints define the feasible thrust regime via an
convexification with active velocity and thrust-pointing constraints; upper and a lower bound. A lower bound is needed because engines
Sec. VI presents simulated numerical results; Sec. VI.C presents typically cannot operate reliably below a certain throttle level. The
experimental solver timing results on flight-like processors; and upper bound exists because arbitrarily large thrusts are impossible.
Sec. VII summarizes the conclusions of this research.
0 < ρ1 ≤ kTtk ≤ ρ2 (5)
II. Fuel-Optimal PDG for Planetary Pinpoint Landing
This constraint is not convex due to the lower-bound
This section summarizes the formulation of the optimal control constraint (Fig. 1).
problem for fuel-optimal PDG along with earlier convexification Finally, we consider the thrust-pointing constraint given by
results [8–10,19]. The section concludes with the discretization of the
convex optimal control problem, which produces a finite- n^ T Tt ≥ kTtk cos θ (6)
dimensional second-order cone-programming (SOCP) problem
[21]. This material is needed for the extended convexification results in which n^ ∈ R3 is a unit vector describing a desired pointing
with active constraints. direction and θ ∈ 0; π is a specified angle that represents the size of
the feasible thrust-pointing arc about n. ^ This constraint is convex
A. Review of the Fuel-Optimal PDG Problem Formulation when θ ≤ π∕2 and nonconvex when θ > π∕2. The unit vector and
The PDG problem is a finite-time-horizon optimal control problem angle define a cone in which the thrust vector must reside. Such a
where fuel-optimal trajectories are sought that satisfy the relevant constraint arises due to sensors (such as a camera) that must keep the
state and control constraints imposed by the vehicle capabilities and ground in its field of view.
mission requirements. We assume that 1) the only forces acting on the Obtaining a fuel-optimal trajectory for the PDG problem is
vehicle are due to the control thrust and gravity (i.e., there are equivalent to maximizing the mass of the vehicle at landing.
negligible aerodynamic forces, which is particularly true on Mars due Therefore, the fuel-optimal PDG problem is given by Problem 1
to its low atmospheric density); 2) the vehicle is sufficiently close to Problem 1: Nonconvex Fuel-Optimal PDG Problem
the surface to warrant a flat planet model, in which the acceleration
due to gravity is constant; and 3) the vehicle’s attitude control is of maximize: J mtf
sufficiently high bandwidth that the translational and rotational
dynamics can be decoupled. As a consequence of the last assumption, subject to: rt
_ vt; rt0 r0 ; r3 tf 0
we do not include the attitude dynamics in the formulation, and Tt
assume that any lander orientation needed to obtain the desired thrust vt
_ − Sω2 rt − 2Sωvt − g;
mt
vector can be obtained instantaneously. The translational equations
of motion under these assumptions are vt0 v0 ; vtf 0
_ −αkTtk;
mt mt0 m0 ; md ≤ mtf
rt
_ vt;
0 < ρ1 ≤ kTtk ≤ ρ2 ; n^ T Tt ≥ kTtk cos θ
Tt
vt
_ − Sω2 r − 2Sωv − g; kvtk ≤ V c ; tan γkr1 t; r2 tk ≤ r3 t
mt
_
mt −αkTtk (1)
B. Lossless Convexification of the Fuel-Optimal PDG Problem
in which r ∈ R3 is the position of the vehicle relative to some planet- As stated, Problem 1 is highly constrained and nonconvex. There
fixed coordinate frame, v ∈ R3 is the corresponding velocity, m ∈ are three sources of nonconvexity in the formulation: 1) the lower
DUERI ET AL. 199
Fig. 1 Feasible set of controls with pointing constraints and upper/lower norm bounds for a two-dimensional control vector.
the interaction between thrust and mass, and 3) the thrust-pointing z_t −ασt
mt
constraint (if θ > π∕2). In general, such problems do not have closed-
form solutions and must be solved numerically. Because convex which results in a linear equality constraint. Up to this point, all
problems can be solved to global optimality using polynomial-time operations have resulted in lossless convexifications. However, the
IPM algorithms, converting the problem to a convex form offers upper- and lower-bound constraints on Γ in Eq. (5) become
significant computational advantages, which motivate the following nonconvex due to this choice of variables. Thus, a Taylor series
discussion on the convexification of the problem. approximation is applied to convexify these constraints. The
First, consider the nonconvex control domain. Applying the resulting convex control constraints in the transformed variables are
convexification in [8,10], the convexified PDG problem is presented
9
in Problem 2, in which Γ ∈ R is a new slack variable that relaxes the kutk ≤ σt; n^ T ut ≥ σt cos θ =
control constraints by lifting the control space. −z
ρ1 e 0 1 − zt − z0 t ≤ σt ∀ t ∈ 0; tf
Problem 2: Fuel-Optimal PDG Problem with Lossless Convexi- ;
σt ≤ ρ2 e−z0 1 − zt − z0 t
fication of the Control Constraints
in which z0 t lnm0 − αρ2 t. An analysis of the error incurred
maximize: J mtf through this approximation can be found in [31]. Combining all of the
subject to: rt
_ vt; rt0 r0 ; r3 tf 0 convexifications introduced, the fuel-optimal PDG problem becomes
the following convex optimization problem:
Tt Problem 3: Convexified Fuel-Optimal PDG Problem
vt
_ − Sω2 rt − 2Sωvt − g;
mt
vt0 v0 ; vtf 0 maximize: J ztf
_ −αΓt;
mt mt0 m0 ; md ≤ mtf subject to: r_tvt; rt0 r0 ; r3 tf 0
n Tt ≥ Γ cos θ;
^T kTtk ≤ Γt; 0 < ρ1 ≤ Γt ≤ ρ2 vtut−Sω
_ 2 rt−2Sωvt−g;
Then, the mass dynamics become Then, the discretized dynamics in Problem 3 can be expressed as
200 DUERI ET AL.
unconstrained or linearly constrained and that are not quadratically concerns. Finally, numerous algorithmic choices must be made while
constrained. For example, if the variable w is unconstrained, it is implementing an IPM. As demonstrated via Monte Carlo simulations
replaced by two variables in the positive cone, w w − w− in and flight tests [6,29], the algorithmic choices documented here are
which w ≥ 0 and w− ≥ 0. If the variable is linearly constrained (i. effective and robust. Hence, we believe that presenting the details of this
e., hT w ≤ d), then we let w w − w− as before; and, rigorously verified algorithm can prove useful for engineers to
implement IPMs for many control system applications in aerospace
hT w − w− ws d; where w ≥ 0; w− ≥ 0; ws ≥ 0 (e.g., [11,37,38]) and other fields.
Generally, the objective of an SOCP solver is to find an optimal
solution of the primal problem, given (in canonical form) by Eq. (8).
Definition 2: A second-order cone (SOC), KS ⊂ Rn1 , formed by
The next important problem is the dual optimization problem, which
an n-dimensional vector q and a nonnegative scalar w is a convex set
is given by
defined by
maximize: bT y
KS fw; q∶kqk ≤ w; q ∈ R ; w ∈ R gn
(7)
subject to: AT y s c;
Any convex quadratic inequality or norm inequality constraint can be s ∈ K where K K (9)
expressed as a variable in a second-order cone, potentially by adding
a slack variable similar to w. For example, expressing the maximum in which the goal of the dual problem is to find a y ∈ Rp and
speed constraint is done as follows. First, a new slack variable vs is s ∈ K ⊂ Rn that maximize bT y, and the last constraint on s can be
prepended to the velocity vector to form an SOC: rewritten as s ∈ K because K is composed of purely self-dual cones
(i.e., positive linear cones and SOCs are self-dual). It is also useful to
h i note that the duality gap xT s cT x − bT y ≥ 0 for any feasible
vs
∈ KS primal–dual pair x, (y; s) [21]. Also, when a strictly feasible primal–
vt
dual pair exists (i.e., a pair that satisfies the equality constraints and
lies strictly inside the cone K), the duality gap is zero for any optimal
and so vs ≥ kvtk by Eq. (7). Then, the maximum speed constraint is
primal–dual pair; that is, xT s cT x − bT y 0 [22]. Therefore,
enforced by imposing the duality gap can be used to quantify the current iterate’s proximity
to the optimal solution.
vs ≤ V c
A. Interior Point Methods
The inequality constraint is converted into an equality constraint by
making use of one additional slack variable, ws ≥ 0: A primal–dual path-following IPM is used to solve the primal and
dual problems together [39,40]. A detailed discussion of IPM algorithms
vs ws V c can be found in [20,22,39–45]. In the following, the key components of
the IPM algorithm implemented in this research are given.
After assigning each PDG variable and necessary slack variable to a
1. Homogenous Self-Embedding
positive cone or SOC, these variables are collected into a global
solution variable x ∈ Rn . Finally, a straightforward, but tedious, This section presents a lifted version of the combined primal and
process produces the A matrix along with the b and c vectors such that dual problems that has two key benefits. The first is that there is a
Problem 3 is expressed in the following standard form [21,22]: readily available feasible solution. The second benefit is that the
solution of this lifted formulation fully describes the properties of the
original primal problem. Given an initial guess, (x0 , s0 , y0 , τ0 , κ 0 ), the
minimize: cT x
homogeneous self-embedded form of the SOCP [22,46], whose
subject to: Ax b; relationship to the original primal and dual problems is clarified by
theorem 1, is
x∈K (8)
minimize: βν
in which c ∈ Rn maps the solution variable to a cost, A ∈ Rp×n
relates solution variables to constraint equations with b ∈ Rp on the subject to: Ax − bτ − rp ν 0;
right side, and K is given by − AT y cτ − s − rd ν 0;
K KlL × KS1 × : : : × KSm bT y − cT x − κ − rg ν 0;
rTp y rTd x rg τ −β;
in which l and m are the resulting amount of positive cones and SOCs,
respectively. x; s ∈ K; τ; κ ≥ 0 (10)
DUERI ET AL. 201
Ax − bτ − rp ν 0;
bT Δy − cT Δx − Δκ rg ν − bT y − cT x − κ;
−AT y cτ − s − rd ν 0;
XΔSe SΔXe νμ0 e − Exs ;
bT y − cT x − κ − rg ν 0;
κΔτ τΔκ νμ0 − κτ − Eκτ (14)
xT s 0 μ;
κτ 0 μ; in which Exs ∈ Rn and Eκτ ∈ R are approximations (given
subsequently) to the second-order terms ΔXΔSe and ΔκΔτ,
μ μ0 ν ≥ 0 (11) respectively. Also, the ΔX and ΔS matrices are formed in the same
fashion as X and S in Eq. (13). In its current form, the problem cannot
in which μ is a perturbation on the system of equations formed by be reliably and efficiently solved as shown in [44], and so cone
the constraints in Eqs. (10), ν becomes a given parameter, and μ0 is scalings are introduced that make it so.
given by
4. Nesterov–Todd Scalings
xT s τ0 κ 0 Nesterov and Todd introduced a set of symmetric scalings that are
μ0 0 0 inexpensive to compute and make the problem numerically well
ml1
conditioned [47]. An important property of scaling matrices is that
The solution to the system of Eqs. (11) is unique for nonzero values of they do not change the cone or the central path. Consider the ith linear
μ [22]; therefore, for each positive μ, there exists a unique solution of or second-order cone and define scaling variables G GT and θ ≥ 0
the system that can be found by using numerical techniques (such as as follows [47]:
Newton’s method). Moreover, as μ → 0 (or, equivalently, ν → 0), the s
solution of the perturbed problem converges to the solution of the siT Qsi
original problem in Eqs. (10). It is worth noting that the condition θ2
xiT Qxi
μ 0 is a necessary and sufficient condition for the optimality of
convex programs and that it is equivalent to the Karush–Kuhn–
Tucker conditions for the lifted problem in Eqs. (10) [26,44]. The in which Q 1 for linear cones and
solutions (xμ , sμ , yμ , τμ , κ μ ) for any nonnegative μ define the central
path. The difference between one IPM and another lies primarily in Q diag1; −1; : : : ; −1
how one tracks the central path toward the unperturbed system
solution. for second-order cones. Similarly, G 1 for linear cones and
202 DUERI ET AL.
e qe qT Given the above relationships, Δx; Δs; Δy; Δτ; Δκ are found by
G −Q first computing Δy and substituting it into Eqs. (17–20) as follows:
1 eT q
x i θGxi ; si θG−1 si Equation (21) can be solved efficiently by making use of the
Sherman–Morrison formula [44,48]. Let P^ AD2 AT . Then it can be
This operation can be repeated for every linear and quadratic cone shown that the solution to Eq. (21) is found by solving the following
in the variables x and s. The scaled solution variables result from two linear systems for v0 and v1 :
concatenating all of the scaled cones to form x and s, producing
^ 0l
Downloaded by NASA JET PROPULSION LABORATORY on June 13, 2018 | http://arc.aiaa.org | DOI: 10.2514/1.G001480
Pv (22)
x ΘGx;
~ ~ −1 s
s ΘG
~ −1 . Then it can be shown that the following relations α minfrαx ; rαs ; rατ ; rακ ; 1g
Let D ΘG
also hold [44]:
in which 0 < r < 1 is close to one (e.g., r 0.995), and αx , αs , ατ , and
κ are the maximum values of α such that
Δx D2 r20 AT Δy − cΔτ (19)
xαx Δx ∈ intK; sαs Δs ∈ intK; ατ τ Δτ > 0; κ ακ Δκ > 0
r30 aT1 Δy The value of α can further be reduced to keep the next iterate in a
Δτ (20) prescribed neighborhood of the central path, for example, by using
a2
self-regular proximity measures as in [22]. For the PDG problem,
in which however, further limiting was not needed because convergence is
reliable with the maximum Newton step-size method.
r5 After the predicted search direction is obtained, the predicted
r20 r2 ΘG −1 r4 ;
~ X r30 r3 cT D2 r20 ;
τ complementarity gap is
κ
a1 −b AD2 c; a2 cT D2 c gp x αΔxp T s αΔsp κ Δκ p τ Δτp
τ
DUERI ET AL. 203
in which subscript p indicates the solution with Exs and Eκτ equal to Embedded systems typically operate in environments with stringent
zero. The new centering parameter ν is then taken to be [44] real-time requirements and limited memory. Many problems that
2 naturally occur in engineering tend to translate into sparse optimization
gp gp problems, such as discretized control problems [50]. For this reason, a
ν T (24)
x s κτ k 1 solver should minimize memory usage and number of arithmetic
operations by leveraging the problem structure and sparsity. Moreover,
The predicted Newton directions are then used to approximate the autonomous systems rely on the results of onboard optimization to
second-order terms: safely operate, and so it is also important to minimize logical branches
for ease of verification as well as for increased computational speed.
Exs ΔX~ p ΔS~p e (25) In general, sparse linear algebra operations (like sparse matrix–
matrix multiplication) reduce the total number of elementary
operations but increase the cost of each operation; in other words, the
number of operations is reduced by avoiding the addition and
Eκτ Δκ p Δτp (26) multiplication of zeros, but it is necessary to determine how the
remaining nonzero elements interact. In explicit coding, software is
where automatically generated to perform certain specific, otherwise
computationally expensive, tasks. Thus, much of the logic associated
Downloaded by NASA JET PROPULSION LABORATORY on June 13, 2018 | http://arc.aiaa.org | DOI: 10.2514/1.G001480
Because the problem size is known, the exact amount of memory that problems is the subject of ongoing research; however, it is noted that
is necessary to solve P is statically allocated, removing the need for the authors have successfully and repeatedly landed a rocket using
dynamic memory allocation altogether. This property is highly approximately 750 variables.
valued in aerospace engineering software development practice. It
eliminates memory leaks and overflows, and, more important,
reduces the complexity of flight software verification. V. Maximum-Divert Powered-Descent Guidance
Furthermore, the generated code is free of the logical operations In this section, the preceding convexification results are extended
introduced by sparse algorithms. This is accomplished by keeping to show that the control convexification presented in Sec. II.B is
track of nonzero element interactions and generating code that lossless when both the state constraints and the thrust-pointing
handles sparse operations directly. That is, once the interaction constraints are simultaneously active. The primary objective is to
between two nonzero elements has been determined, one line of C theoretically validate the control convexification used to obtain the
code is generated to directly and correctly handle the interaction trajectories that were flown in 2012–2014.
without any logic. Figure 2 illustrates the procedure for generating a First, a theoretical extension of the PDG algorithm is presented. The
customized solver for a given problem class. This customized sparse need for this extension was encountered during the terrestrial test flights
framework supports the IPM algorithm described in Sec. III, which is of the customized PDG algorithm [51]. Specifically, the speed of the test
also included in the generated code. rocket in lateral flight was limited to 90 km∕hr. While performing the
Explicit coding is also used to avoid certain expensive operations, one kilometer divert, the rocket would reach this speed limit and then
such as finding a suitable R via AMD and some matrix remain at it, even for segments with active thrust-pointing constraints;
multiplications. Note that R in Eq. (28) depends only on the sparsity that is, the speed and thrust-pointing constraints were simultaneously
structure of P^ [49]. Further, recall that P^ AD2 AT , strA is active. Previous results for lossless control convexification of the
bounded from above by some A0 , and strD relies solely on K K0 . constrained PDG problem [19,32] did not include simultaneously active
Thus, there is an upper bound on strP ^ for each problem class. The thrust-pointing and speed constraints. Further, the thrust-pointing
permutation matrix corresponding to this upper bound is found when constraint can also be continuously active. Hence, the lossless
the custom solver is generated and is then hard coded into the solver. convexification results for the PDG problem, which theoretically prove
Furthermore, because R represents a similarity transformation, the that the solution of the convexified problem is also an optimal solution
matrix multiplication RPR ^ T in Eq. (28) and all of the matrix-vector for the original nonconvex PDG problem, must be extended to include
continuously and simultaneously active thrust-pointing and speed
multiplications involving R in Eqs. (29) and (30) are treated as known
constraints.
elementwise mappings. For example, given a similarity mapping,
Second, near term planetary exploration missions may leverage
existing landing systems, thereby limiting the amount of propellant
0 1
R available for diverts. For so-called multi-X landing strategies [31], in
1 0 which the divert goal is not to reach the center of a landing ellipse but
simply to escape large, known hazards in the landing ellipse, it is maximum conditions, complementary slackness conditions, and
beneficial to determine the largest divert possible given a fixed transversality conditions. The Hamiltonian and the Lagrangian are
amount of propellant [19].
As a result, the extension of lossless convexification for the PDG Htpr tT vtpv tT Tt∕mt−g−αpm tΓt (31)
problem with simultaneously and continuously active speed and
thrust-pointing constraints is presented for the maximum-divert PDG
Lt Ht λ1 tkTtk2 − Γ2 t λ2 tρ1 − Γt
Downloaded by NASA JET PROPULSION LABORATORY on June 13, 2018 | http://arc.aiaa.org | DOI: 10.2514/1.G001480
Note that, if the pointing constraint is satisfied with strict inequality, complementary slackness), and hence ν_ t 0. Thus, the first term is
then λ4 t 0 and the proof in [19] is recovered. As such, it is always zero. Hence, either νt 0 or vt
_ 0. Each case is now
assumed that the pointing constraint holds with equality throughout considered.
the remainder of the proof; that is, Case 1: Suppose that νt 0. Then pr t 0 because
p_ v t 0. The first transversality condition implies p0 0.
n^ T Tt Γt cos θ (33) Additionally, the Hamiltonian can be rewritten as
Then, using assumption 1, one obtains Γt n^ T Tt∕ cos θ. Ht χtTt − pTv tg 0
As a result, the pointwise maximum principle becomes
n^ T Because the switching function χ t 0, it must be that
maximize: pTv t∕mt − αpm t Tt pTv tg 0. Note that pv t is aligned with the unit vector n. ^ By
cos θ
assumption 2, n^ is not orthogonal to g, and hence pTv tg 0 implies
subject to: ρ1 ≤ Γt ≤ ρ2 ; kTtk ≤ Γt pv t 0. This subsequently implies that pm t 0, which violates
the nontriviality condition of optimal control (see theorem 15 in
Upon defining the switching function, [32]). Hence, νt ≠ 0.
Case 2: Suppose νt ≠ 0, which implies that the velocity con-
Downloaded by NASA JET PROPULSION LABORATORY on June 13, 2018 | http://arc.aiaa.org | DOI: 10.2514/1.G001480
pTv t n^ T straint is active. This means that v_ T tvt 0, and hence vt
_ 0
χ t − αpm t
mt cos θ [using Eq. (38)]. Then Tt mtg. The pointwise maximum
condition reduces to
it is clear that kTtk Γt whenever χ t ≠ 0 because the
(maximizing) cost function drives optimal values of Tt to the maximize∶ − αpm tΓt
kTtk ≤ Γt constraint boundary, thereby making it an equality.
Thus, assume χ t 0 on an interval; this implies that the cost subject to∶ ρ1 ≤ Γt ≤ ρ2 ; kTtk ≤ Γt; n^ T mtg Γtcos θ
function equals zero. Solving for pv t when χ t 0 gives
by using Eq. (33). If pm t > 0, then Γt should be made as small as
n^ possible (i.e., Γt kTtk). In the following, it is proven that this is
pv t αmtpm t the case. Combining Eqs. (31) and (32) with Tt mtg,
cos θ
αpm t α pTv tTt Note that, because p_ v t 0, pr −2νtvt. Thus,
λ4 t and λ_ 4 t (34)
cos θ cos θ m2 t
−2νtkvtk2 αpm tΓt
Differentiating pv with respect to time gives
Because νt < 0, kvtk > 0, α > 0, and Γt > 0, it must be that
pm t > 0. Thus, kTtk Γt and ρ1 ≤ kTtk ≤ ρ2 by
p_ v t mtλ
_ 4 t mtλ4 tn
_ ^ (35) assumption 3, which contradicts the original hypothesis. Thus, it
has been shown by contradiction that the thrust magnitude constraint
This implies that p_ v t is a vector along n.
^ Substituting Eq. (34) into holds with equality everywhere along the optimal trajectory.□
Eq. (35) and taking the norm yields Finally, as in Sec. II.C, the time-varying mass dynamics can be
rigorously approximated with convex dynamics and constraints [8–
kp_ v tk jmtλ
_ 4 t mλ4 tj;
_ 10]. The resulting convexified maximum-divert PDG problem is then
pm t pTv tTt given by Problem 5.
− α Γt
2 α ;
cos θmt
For cases in which the target landing site uses all available fuel (as
cos θ
is the case with the terrestrial test flights), the lossless convexification
α pTv tTt has been proven when the speed and thrust-pointing constraints are
− αΓtp t (36)
j cos θj m
mt simultaneously active. Thus, Problem 5 produces the same solutions
as Problem 1.
Next, note that χ t 0 ⇒ χ tTt 0, which combined with Problem 5: Convex Relaxation of the Maximum-Divert PDG
Eq. (33), implies that Problem
Table 2 Simulation parameters to activate over continuous intervals of the trajectory. The PDG
parameters of Table 2 are used.
Parameter Value
For the fuel optimal PDG problem, the lander begins at an altitude
g 0 0 3.7114 T m∕s2
of 2 km and must traverse approximately 8 km to reach its final
m0 2000 kg
mf 1700 kg destination at the origin. This final condition forces the lander to
n^ 0 0 1 T travel over a horizontal distance that is four times greater than its
θ 45 deg altitude (Fig. 3). Moreover, the fuel allocation is selected so that the
ρ1 2500 N vehicle runs out of fuel just as it lands, making the origin one of its
ρ2 25000 maximal diverts.
I sp 220 s Figure 4 shows that the velocity constraint is active over a
Vc 130 m∕s continuous interval of the trajectory (between approximately 60 and
r0 7000 4000 2000 T m
v0 120 0 −50 T m∕s 84 s). In addition, the thrust-pointing constraint is active at the same
time as the velocity constraint from 60 to 74 s. Thus, this trajectory is
an example of the convexification theory presented in this paper.
The lower and upper thrust constraints are satisfied, despite the fact
constraints is demonstrated. A divert trajectory is planned using the that the lower thrust bound originally defined a nonconvex thrust
convexified PDG algorithm of Problem 5. All of the constraints are regime (Fig. 5). Thus, the convex relaxation of the control space is a
Downloaded by NASA JET PROPULSION LABORATORY on June 13, 2018 | http://arc.aiaa.org | DOI: 10.2514/1.G001480
satisfied, thereby showing that the solution of the convexified lossless convexification of the original, nonconvex problem, despite
problem is a feasible solution of the original nonconvex Problem 1 . having continuous subarcs of active velocity (state) constraints in
Because the convexified problem is a relaxation of the original addition to simultaneously active thrust-pointing constraints.
problem, all solutions of Problem 1 are also solutions of the Finally, the trajectory for a problem with the same initial
convexified problem. Thus, it suffices to show that the optimal conditions and constraints is obtained by switching to the maximum-
solution to the relaxed problem is feasible for the original problem to divert cost function defined in Problem 5. The differences between
show that it is also an optimal solution of the original problem. the two trajectories are tiny and reflect the convergence tolerances for
Second, in Sec. VI.B, the effectiveness of the general IPM for the solvers (Fig. 6). This result was expected because maximum-
SOCPs of Sec. III and the advantages of customization as described divert problems are also minimum-fuel problems when fuel is the
in Sec. IV are demonstrated. For a range of PDG problem sizes, the limiting factor for the trajectory (and it typically is).
general IPM and customized IPMs are compared with several
publicly available and noncustomized IPMs for SOCPs. The PDG
problem size is changed by increasing the number of discrete time
steps. A customized IPM is automatically generated for each PDG
problem size using the methods in Sec. IV.
In short, the general IPM presented in this paper achieves the same
runtimes as the best of the publicly available IPMs for small-to-
medium problem sizes. The customized solver is twice as fast as
general IPMs for the smallest problems, which decreases to a 10%
speed advantage for medium-to-large problems. This decrease is
expected, as discussed in Sec. IV: eventually, the increased rate of
instruction cache misses outweighs the benefits of eliminating the
logic and for-loops of the noncustomized sparse linear algebra
routines.
Finally, in Sec. VI.C, the runtime performance of the customized
IPM is characterized on a 200 MHz flight processor. Runtimes on the
order of 0.7 s are achieved, which are suitable for using the PDG
algorithm onboard a lander.
A. Example of Convexified PDG Fig. 4 Velocity and thrust-pointing profiles for fuel optimal trajectory.
A Mars powered-descent scenario is considered with a When n^ T u kuk cos θ, the thrust-pointing constraint is active. Dashed
conservative velocity upper bound to force the velocity constraint lines represent constraint boundaries.
4000
3000
z (m)
2000
1000
10000
0
4000
3000 5000
2000
1000
0 0 x (m) Fig. 5 Thrust magnitude and mass time histories. The thrust upper
y (m) and lower bounds are represented by dashed and dash-dotted lines,
Fig. 3 Three-dimensional overview of fuel optimal trajectory. respectively.
208 DUERI ET AL.
−1 ECOS
10
General Bsocp
−2
10
tangent planes. The SOC for the speed constraint remains. Runtime possible. An active constraint has at least one time step in which the
data were collected for both the parser and the solver. associated slack variable is zero. Colloquially, the solution “rides”
Third, for the purposes of comparison with results in Sec. IV.B, the each inequality constraint at least once.
problem’s size parameters are n 403, the number of KL cones is The stressing problem is a speed-limited divert, as discussed in the
263, and the number of KS cones is 35. All KS are four dimensional. companion paper [31]. The maximum-thrust-angle, maximum-speed,
In addition, there are 286 equality constrains, which is the number of and maximum-thrust constraints are all active. Because of the desire to
rows in A in Eq. (8). This problem size lies approximately between activate the maximum-speed constraint (it is the sole SOC state
the first two points of Fig. 7. However, as noted, there are fewer constraint), the resulting divert trajectory approximates a straight line
second-order cones than in the benchmark problem. from initial position to final position. This straight-line behavior, in
Fourth, a stressing instantiation of the PDG problem is desired. turn, necessarily deactivates the glideslope constraint. The behavior
“Stressing” in this context does not mean size: given the speed of also deactivates the minimum-thrust constraint as follows. The thrust
flight processors, a smaller-size problem would likely be flown. profile is essentially “bang-off-bang” in magnitude. During the “off”
Instead, the goal is to have as many inequality constraints active as portion, the vehicle is coasting at maximum speed with thrust that
cancels weight. Because the minimum thrust is less than the vehicle
weight at all points in the trajectory, allowing the vehicle to “fall,”
minimum thrust is never needed.
Fifth, because the stressing problem rides the maximum-speed
Downloaded by NASA JET PROPULSION LABORATORY on June 13, 2018 | http://arc.aiaa.org | DOI: 10.2514/1.G001480
Fig. 10 Performance of the customized solver on a flight processor for a small, stressing PDG problem as a function of time-of-flight.
210 DUERI ET AL.
with distance to the feasibility boundary. If the time of flight is the whole processor to itself, but would be running in the background
infeasible, the runtime to certify infeasibility can also vary widely. with, for example, 25–30% processor availability. In this case, the
Therefore, the runtime characterization is for a range of times of flight effective runtime per time of flight increases to approximately 2.5 s,
from well within the infeasible range to well within the feasible range. which is still suitable for onboard implementation [54].
For this problem, a value of t 42.1748 s was empirically
determined. Note that this value will vary with the number of points in
the time discretization. The times of flight tested are centered on this VII. Conclusions
t and go from 29.7998 s to 54.5498 s in 0.25 s steps, producing 100 Convexification theory has been extended for maximal-divert
times of flight. These times of flight stretch sufficiently far into the PDG problems to allow for continuously active state constraints in
feasible range for the runtime to exhibit a steady-state behavior. addition to simultaneously active thrust-pointing constraints. This
Similarly, they stretch far enough into the infeasible range that the theoretical achievement enabled terrestrial test flights, in which the
apparent variations in runtime are captured. Also, these times give velocity constraint is active for continuous intervals along the
both an infeasible and a feasible time of flight within 0.125 s of t . trajectory. Furthermore, a fast and reliable solver implementation was
Seventh, to average out any runtime variations due to intermittent developed in order to exploit the lossless convexification of the
maintenance tasks of the operating system, the PDG calculation is problem in real time and onboard the test vehicle.
repeated 25 times for each of the 100 times of flight. Finally, the developed solver, in both general and custom imple-
Finally, a complication in compiling the customized solver for the mentations, was demonstrated on a radiation-hardened flight processor.
Downloaded by NASA JET PROPULSION LABORATORY on June 13, 2018 | http://arc.aiaa.org | DOI: 10.2514/1.G001480
target processor and operating system was that the default As might be expected in practice, the solver runtimes for a small,
optimization level -O0 had to be used for reliable performance. stressing powered-descent guidance problem were characterized.
Nonetheless, many other individual optimization flags were Future work will include tailoring the customization to unique aspects
enforced, as well as the appropriate -march option. of flight processors and performing a more extensive characterization of
runtime across a range of powered-descent scenarios. Nonetheless, it
2. Runtime Results has been shown that even running in the background on a flight
The main result is shown in Fig. 10a, which shows mean runtimes processor, an optimal powered-descent trajectory could be calculated in
for the customized solver for the stressing PDG problem as a function approximately 2.5 s, which is attractive for onboard implementation. In
of time of flight. Mean solver runtimes vary between approximately short, it may be argued that the initial feasibility of solving for a
0.4 s and 1.3 s for solutions with duality gaps that are less than powered-descent trajectory onboard a spacecraft using real-time convex
1 × 10−9 . Observe that simply scaling a 3 ms runtime from Fig. 8 by optimization has been demonstrated, maturing the technology readiness
3.4 GHz/200 MHz gives 0.051 s, which underestimates the runtimes level of the proposed method.
by an order of magnitude.
Before discussing these results further, consider Fig. 10c, which
shows the variations from the mean runtime for each of the times of Acknowledgments
flight. Observe that the variations are clustered around 0 ms and are This research was supported in part by Jet Propulsion Laboratory
uncorrelated with the mean runtimes in Fig. 10a and with feasibility. (JPL), California Institute of Technology, Contract No. 1492781. Part of
These independent, small variations from the mean show that no this research was performed at JPL, California Institute of Technology,
intermittent tasks were meaningfully interrupting the solver. Also, under a contract with the National Aeronautics and Space Administration.
because the magnitudes of the variations from the mean are <1%, the Parts of this research are funded by Office of Naval Research Grant
mean runtimes can accurately be referred to simply as “runtimes.” No. N00014-14-1-0314 and National Science Foundation Grant
In addition, over all of the 2500 PDG trajectory optimizations, the No. CNS-1619729. The authors thank Tim Canham of JPL, who
parser runtime averaged 2.1 ms per trajectory with variations of only supported the runtime characterization on a flight processor. We are
several microseconds. This repeatable runtime for the parser is grateful for our collaborators Lars Blackmore of SpaceX; John M.
expected because it only encodes data: its computations are not Carson, David S. Bayard, and Jordi Casoliva of JPL; Stephen Boyd of
affected by feasibility or infeasibility. Stanford University; Jacob Mattingley of Metamarkets; and Ping Lu of
Comparing Figs. 10a and 10b, it is clear (and expected) that, for Iowa State for their valuable comments and insights. We would also like to
feasible trajectories, runtime is effectively the number of iterations thank the anonymous reviewers, whose comments were very useful in
multiplied by the average time for an iteration. It is also expected that improving the quality of the paper.
more iterations are required to converge as the time of flight
approaches the feasibility boundary from the feasible side. To obtain
an average time per iteration, note that for times of flight larger than References
50 s, the number of iterations is 11 and the runtime is almost constant [1] Mendeck, G. F., and Craig, L. E., “Entry Guidance for the 2011 Mars
(there is a slight downward trend). Computing an average runtime per Science Laboratory Mission,” AIAA Atmospheric Flight Mechanics
iteration from these times-of-flight and multiplying by the number of Conference and Exhibit, AIAA Paper 2011-6639, 2011, pp. 8–11.
iterations produces the estimates shown in Fig. 10a. The two outliers doi:10.2514/6.2011-6639
in the estimates are an area for future investigation. [2] Steltzner, A., “Overview of the Mars Science Laboratory Entry,
Considering the left side of Fig. 10a, the time to determine Descent, and Landing System,” AIAA/AAS Spaceflight Mechanics
infeasibility is uncorrelated with number of iterations, which is not Meeting, AAS Paper AAS 13-236, Kauai, HI, 2013.
unexpected because each iteration can move to a significantly different [3] Way, D. W., Powell, R. W., Chen, A., Steltzner, A. D., San Martin, A. M.,
Burkhart, P. D., and Mendeck, G. F., “Mars Science Laboratory: Entry,
area of the solution domain. Moreover, it can take 50% longer to Descent, and Landing System Performance,” IEEE Aerospace
determine infeasibility than to calculate a barely-feasible trajectory. Conference, Inst. of Electrical and Electronics Engineers Paper
The noncustomized, general solver was also tested. All the AERO.2007.352821, March 2006, pp. 1–19.
characteristics displayed in Fig. 10 are identical for the general solver doi:10.1109/AERO.2007.352821
on a flight processor, except that the time to determine infeasibility is [4] Ploen, S., Açıkmeşe, B., and Wolf, A., “A Comparison of Powered
relatively constant at 1.55 s. More important, because the -O3 Descent Guidance Laws for Mars Pinpoint Landing,” AIAA GNC
compile flag could not be enforced in the current implementation of Conference and Exhibit, AIAA Paper 2006-6676, 2006.
the customized solver, customization gives only a 16% speed doi:10.2514/6.2006-6676
improvement over the general solver on this flight processor. A 50% [5] Eren, U., Dueri, D., and Açıkmeşe, B., “Constrained Reachability and
Controllability Sets for Planetary Precision Landing via Convex
improvement was obtained on a desktop processor. Optimization,” Journal of Guidance, Control, and Dynamics, Vol. 38,
Nonetheless, it has been shown that per time of flight, infeasibility No. 11, 2015, pp. 2067–2083.
or an optimal trajectory can be calculated in approximately 0.7 s (i.e., [6] Wolf, A. A., Tooley, J., Ploen, S., Ivanov, M., Acikmese, B., and
the average of all 2500 solver runtimes) on a state-of-the-art Gromov, K., “Performance Trades for Mars Pinpoint Landing,” IEEE
radiation-hardened flight processor. In practice, PDG would not have Aerospace Conference, Inst. of Electrical and Electronics Engineers
DUERI ET AL. 211
Paper AERO.2006.1655793, 2006, pp. 1–0. [27] Frick, D., Domahidi, A., and Morari, M., “Embedded Optimization for
doi:10.1109/AERO.2006.1655793 Mixed Logical Dynamical Systems,” Computers and Chemical
[7] Johnson, A., Montgomery, J., and Matthies, L., “Vision Guided Landing Engineering, Vol. 72, Jan. 2015, pp. 21–33, A Tribute to Ignacio E.
of an Autonomous Helicopter in Hazardous Terrain,” Proceedings of Grossmann.
IEEE International Conference on Robotics and Automation (ICRA), doi:10.1016/j.compchemeng.2014.06.005
IEEE Publ., Piscataway, NJ, 2005, pp. 3966–3971. [28] Açıkmeşe, B., Aung, M., Casoliva, J., Mohan, S., Johnson, A., Scharf,
doi:10.1109/ROBOT.2005.1570727 D., Masten, D., Scotkin, J., Wolf, A., and Regehr, M. W., “Flight Testing
[8] Açıkmeşe, B., and Ploen, S. R., “Convex Programming Approach to of Trajectories Computed by G-FOLD: Fuel Optimal Large Divert
Powered Descent Guidance for Mars Landing,” Journal of Guidance, Guidance Algorithm for Planetary Landing,” AAS/AIAA Spaceflight
Control and Dynamics, Vol. 30, No. 5, 2007, pp. 1353–1366. Mechanics Meeting, AAS Paper 13-386, 2013.
doi:10.2514/1.27553 [29] Scharf, D. P., Regehr, M. W., Dueri, D., Açıkmeşe, B., Vaughan, G. M.,
[9] Açıkmeşe, B., Carson, J., and Blackmore, L., “Lossless Convexification Benito, J., Ansari, H., Aung, M., Johnson, A., Masten, D., Nietfeld, S.,
of Non-Convex Control Bound and Pointing Constraints of the Soft Casoliva, J., and Mohan, S., “ADAPT Demonstrations of Onboard
Landing Optimal Control Problem,” IEEE Transactions on Control Large-Divert Guidance with a VTVL Rocket,” IEEE Aerospace
Systems Technology, Vol. 21, No. 6, 2013, pp. 2104–2113. Conference, Inst. of Electrical and Electronics Engineers Paper
doi:10.1109/TCST.2012.2237346 AERO.2014.6836462, 2014.
[10] Blackmore, L., Açıkmeşe, B., and Scharf, D. P., “Minimum Landing doi:10.1109/AERO.2014.6836462
Error Powered Descent Guidance for Mars Landing Using Convex [30] “JPL, Masten Space Systems, and University of Texas, First Flight
Optimization,” Journal of Guidance, Control and Dynamics, Vol. 33, Testing of Real-Time G-FOLD, Guidance for Fuel Optimal Large
Downloaded by NASA JET PROPULSION LABORATORY on June 13, 2018 | http://arc.aiaa.org | DOI: 10.2514/1.G001480
[48] Hager, W. W., “Updating the Inverse of a Matrix,” SIAM Review, Vol. 31, Specialist Conference, AAS Paper 2008-6426, 2008.
No. 2, June 1989, pp. 221–239. doi:10.2514/6.2008-6426
doi:10.1137/1031049 [52] Tutuncu, R. H., Toh, K. C., and Todd, M. J., “Solving Semidefinite-
[49] Amestoy, P. R., Davis, T. A., and Duff, I. S., “Algorithm 837: AMD, An Quadratic-Linear Problems Using SDPT3,” Mathematical Program-
Approximate Minimum Degree Ordering Algorithm,” ACM Transactions ming, Vol. 95, No. 2, Feb. 2003, pp. 189–217.
on Mathematical Software, Vol. 30, No. 3, Sept. 2004, pp. 381–388. [53] Sturm, J., “Using SeDuMi 1.02, a MATLAB Toolbox for Optimization
doi:10.1145/1024074 over Symmetric Cones,” Optimization Methods and Software, Vols. 11–
[50] Açıkmeşe, B., and Blackmore, L., “Lossless Convexification for a Class 12, 1999, pp. 625–653, Ver. 1.05.
of Optimal Control Problems with Nonconvex Control Constraints,” [54] Scharf, D., Ploen, S., and Açikmeşe, B., “Interpolation-Enhanced
Automatica, Vol. 47, No. 2, 2011, pp. 341–347. Powered Descent Guidance for Onboard Nominal, Off-Nominal, and
doi:10.1016/j.automatica.2010.10.037 Multi-X Scenarios,” AIAA Guidance, Navigation, and Control
[51] Açıkmese, B., Blackmore, L., Scharf, D. P., and Wolf, A., Conference, AIAA Paper 2015-0850, 2015.
“Enhancements on the Convex Programming Based Powered Descent doi:10.2514/6.2015-0850
Guidance Algorithm for Mars Landing,” AIAA/AAS Astrodynamics
Downloaded by NASA JET PROPULSION LABORATORY on June 13, 2018 | http://arc.aiaa.org | DOI: 10.2514/1.G001480