3.5.53Guidance, Navigation & Control (GNC)

Powered descent guidance — G-FOLD algorithm (convex optimization)

2,137 words10 min readdifficulty · medium3 backlinks

80/20 CORE: G-FOLD turns the "how do I land a rocket on a pinpoint using minimum fuel while never violating thrust limits, glide-slope, and physics" problem into a convex optimization — which computers can solve reliably and fast to the global optimum. The trick (its Nobel-worthy move) is a change of variables + lossless convexification that removes the non-convex thrust lower bound.


The Problem (WHAT are we solving?)

WHY convex? Non-convex problems can have many local minima; a solver might return a "landing" that's not the best, or fail to converge in the ~1 second you have during descent. A convex problem has one minimum, and interior-point methods find it in guaranteed polynomial time. G-FOLD = "Guidance for Fuel Optimal Large Diverts."


Dynamics From First Principles (HOW)

State: position r(t)R3\mathbf{r}(t)\in\mathbb{R}^3, velocity v=r˙\mathbf{v}=\dot{\mathbf r}, mass m(t)m(t).

Newton's 2nd law with gravity g\mathbf g (constant, near-planet) and thrust T\mathbf T:

mv˙=T+mgm\,\dot{\mathbf v} = \mathbf T + m\,\mathbf g

Fuel is burned proportional to thrust magnitude (rocket equation, differential form). With exhaust velocity ve=Ispg0v_e=I_{sp}\,g_0, define α=1/ve\alpha = 1/v_e:

m˙=αT\dot m = -\alpha\,\|\mathbf T\|

The villain: the constraint TTmin\|\mathbf T\| \ge T_{\min} (engines can't throttle below a floor) defines the region outside a sphere — a non-convex set. Also mm multiplying v˙\dot{\mathbf v} makes the dynamics nonlinear.


Step 1 — Change of Variables (kill the nonlinearity)

Divide the acceleration equation by mm. Define:

a=Tm(acceleration command),Γ=Tm (slack),z=lnm\mathbf a = \frac{\mathbf T}{m}\quad(\text{acceleration command}), \qquad \Gamma = \frac{\|\mathbf T\|}{m}\ (\text{slack}), \qquad z = \ln m

Then v˙=a+g\dot{\mathbf v} = \mathbf a + \mathbf glinear in the new control a\mathbf a.

Mass: z˙=m˙m=αTm=αΓ\dot z = \dfrac{\dot m}{m} = -\alpha\,\dfrac{\|\mathbf T\|}{m} = -\alpha\,\Gamma — also linear.

The thrust bounds, divided by mm, become TminmaTmaxm\frac{T_{\min}}{m}\le \|\mathbf a\| \le \frac{T_{\max}}{m}, and we introduce slack Γ\Gamma with:

aΓ,TminmΓTmaxm\|\mathbf a\| \le \Gamma, \qquad \frac{T_{\min}}{m}\le \Gamma \le \frac{T_{\max}}{m}


Step 2 — Lossless Convexification (the genius move)

The remaining nonlinearity is ΓTminm=Tminez\Gamma \ge \frac{T_{\min}}{m}=T_{\min}e^{-z}. We linearize the exponential to a second-order Taylor form that is still convex:

Tminez0[1(zz0)+12(zz0)2]ΓTmaxez0[1(zz0)]T_{\min}e^{-z_0}\Big[1-(z-z_0)+\tfrac12(z-z_0)^2\Big] \le \Gamma \le T_{\max}e^{-z_0}\big[1-(z-z_0)\big]

where z0(t)z_0(t) is the mass along a reference (no-thrust) trajectory. All constraints are now convex (second-order cone / linear).


Step 3 — The Convex Program

How to solve: discretize time into NN nodes → a finite-dimensional SOCP → solve with an interior-point method (ECOS, SDPT3). Do a line search over tft_f (flight time) since the problem is convex for fixed tft_f; the fuel-vs-tft_f curve is unimodal.

Figure — Powered descent guidance — G-FOLD algorithm (convex optimization)

Worked Example A — Vertical 1-D landing (feel the physics)

Lander at rz=100r_z=100 m, vz=20v_z=-20 m/s, g=3.71g=-3.71 m/s² (Mars). Ignore mass change; Tmax/m=12T_{\max}/m = 12 m/s², Tmin/m=3T_{\min}/m=3 m/s².

Q: Can it stop before ground? Max deceleration available =123.71=8.29= 12-3.71=8.29 m/s² (thrust up, gravity down). Distance to stop from 20 m/s: d=v22a=4002(8.29)=24.1d=\frac{v^2}{2a}=\frac{400}{2(8.29)}=24.1 m <100<100 m. ✔ Why this step? We compare "shortest stopping distance at full thrust" against available altitude — if it fits, a fuel-optimal solution exists.

Fuel-optimal shape: minimum-fuel ⇒ bang-bang in Γ\Gamma: coast (or min-thrust) then full-thrust brake at the last moment. Why? Burning early wastes propellant fighting gravity longer; the optimizer delays the burn — G-FOLD reproduces the classic "suicide burn."


Worked Example B — Why glide-slope matters

Target at origin; lander approaching from the side at 30° above horizontal, but a ridge occupies angles below 40°. Set θgs=45°\theta_{\text{gs}}=45° so [rx,ry]tan45°(rz)=rz\|[r_x,r_y]\| \le \tan45°\,(r_z)= r_z.

At rz=200r_z = 200 m the lander must be within 200 m horizontal radius. Why this step? The cone forces the trajectory to stay above a safe descent funnel — a convex constraint (a cone is convex), so it slots straight into the SOCP with no penalty to tractability.


Common Mistakes (Steel-man + Fix)


Flashcards

What does G-FOLD stand for?
Guidance for Fuel-Optimal Large Diverts.
Which constraint makes powered descent non-convex?
The thrust lower bound TTmin\|\mathbf T\|\ge T_{\min} (outside-a-sphere = non-convex set).
What substitution linearizes the mass dynamics?
z=lnmz=\ln m, giving z˙=αΓ\dot z=-\alpha\Gamma.
Define the acceleration control and slack variables.
a=T/m\mathbf a=\mathbf T/m and Γa\Gamma\ge\|\mathbf a\| with Γ\Gamma representing T/m\|\mathbf T\|/m.
What is "lossless convexification"?
Relaxing a=Γ\|\mathbf a\|=\Gamma to aΓ\|\mathbf a\|\le\Gamma; provably the optimum still hits equality, so no optimality is lost.
Why is the relaxation lossless?
The cost Γdt\int\Gamma\,dt minimizes Γ\Gamma, forcing Γ=a\Gamma=\|\mathbf a\| at the optimum (Pontryagin).
What class of convex problem is discretized G-FOLD?
A Second-Order Cone Program (SOCP).
Why can't tft_f be a variable in the convex solve?
It makes dynamics bilinear/non-convex; handle it via an outer 1-D line search.
Objective for minimum-fuel landing?
Minimize 0tfΓdt\int_0^{t_f}\Gamma\,dt (equivalently maximize final mass m(tf)m(t_f)).
Shape of the fuel-optimal thrust profile?
Bang-bang: min-thrust/coast then a final full-thrust braking burn ("suicide burn").
What is the glide-slope constraint and why convex?
[rx,ry]tanθgs(rzrz,land)\|[r_x,r_y]\|\le\tan\theta_{gs}(r_z-r_{z,land}); it's a cone, which is a convex set.
Why is m˙=αT\dot m=-\alpha\|\mathbf T\| with α=1/(Ispg0)\alpha=1/(I_{sp}g_0)?
Thrust =m˙fuelve=\dot m_{fuel}v_e, so mass-loss rate =T/ve=αT=\|\mathbf T\|/v_e=\alpha\|\mathbf T\|.

Recall Feynman: explain to a 12-year-old

Imagine you're landing a video-game rocket and you must touch the exact "X" with zero speed, using as little fuel as possible. The engine can't idle super low — it's either off or above a minimum push. That "either off or strong-ish" rule makes the puzzle tricky, with lots of possible landings, and computers get confused. G-FOLD is a clever rewrite: instead of tracking the actual push, we track push ÷ weight, and we let the computer pretend the push can be anything up to a chosen budget number Γ\Gamma. Because we're rewarded for keeping the budget small, the computer naturally uses exactly the push it needs — no cheating. Now the puzzle has one best answer, and the computer finds it fast enough to steer a real rocket down safely.


Connections

  • Pontryagin Minimum Principle — proves the bang-bang & lossless result.
  • Convex Optimization and Second-Order Cone Programming — the solver machinery.
  • Tsiolkovsky Rocket Equation — source of m˙=αT\dot m=-\alpha\|\mathbf T\|.
  • Interior-Point Methods (ECOS/SDPT3) — polynomial-time global solve.
  • Apollo Lunar Descent Guidance — the polynomial-thrust predecessor G-FOLD improves on.
  • Model Predictive Control — G-FOLD re-solved each cycle = MPC for landing.
  • SpaceX Falcon 9 Landing and Mars EDL — real deployments.

Concept Map

goal

governed by

thrust eqn

fuel burn

nonlinear via m

Tmin floor

fixed by

a equals T/m

z equals ln m

fixed by

yields

yields

removes Tmin

solved by

achieves

Powered Descent Guidance

Soft pinpoint landing min fuel

Rocket dynamics Newton plus fuel burn

m dv/dt equals T plus mg

dm/dt equals minus alpha norm T

Non-convex and nonlinear

Thrust bound Tmin le norm T le Tmax

Change of variables

dv/dt equals a plus g linear

dz/dt equals minus alpha Gamma linear

Lossless convexification

Convex optimization problem

Interior-point global optimum fast

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Socho tumhe ek rocket ko exactly ek marked point pe, zero speed ke saath, aur minimum fuel me land karana hai (jaise SpaceX ka Falcon ya Mars lander). Problem yeh hai ki engine ko ek minimum thrust ke niche throttle nahi kar sakte — matlab thrust ya to strong hoga ya bilkul off. Yeh "TminT_{min} floor" wali condition ek non-convex set banati hai (ek sphere ke bahar ka region), aur mass bhi 1/m1/m ki wajah se dynamics nonlinear kar deti hai. Non-convex problem me bahut saare local minima hote hain, solver confuse ho jaata hai aur real-time (~1 second) me reliable answer nahi milta.

G-FOLD ka jaadu do steps me hai. Pehla: variable change — hum a=T/m\mathbf a=\mathbf T/m aur z=lnmz=\ln m lete hain. Log lene se mass ki equation z˙=αΓ\dot z=-\alpha\Gamma linear ban jaati hai. Dusra: lossless convexification — hum a=Γ\|\mathbf a\|=\Gamma ko relax karke aΓ\|\mathbf a\|\le\Gamma likh dete hain (yeh ek cone hai, convex). Proof (Pontryagin) kehta hai ki optimum pe hamesha equality hold karegi, isliye kuch bhi "lose" nahi hota. Ab pura problem ek SOCP (Second-Order Cone Program) ban jaata hai jise computer guaranteed global optimum tak, fast, solve kar leta hai.

Intuition yeh hai: fuel cost Γdt\int\Gamma\,dt ko minimize karne me solver Γ\Gamma ko chota rakhna chahta hai, isliye woh khud-ba-khud Γ\Gamma ko a\|\mathbf a\| ke barabar le aata hai — koi cheating nahi. Aur fuel-optimal answer aksar bang-bang hota hai: pehle coast/min-thrust, phir last moment pe poora full-thrust braking burn (famous "suicide burn"). Glide-slope cone b

Go deeper — visual, from zero

Test yourself — Guidance, Navigation & Control (GNC)

Connections