3.5.53 · D4Guidance, Navigation & Control (GNC)

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

3,420 words16 min readBack to topic

Before we start, here is the one picture the whole page leans on: the thrust set. Engines can push with magnitude anywhere between a floor and a ceiling , in any direction. That's the region between two circles (an annulus) — and its inner hole is what makes the problem hard.

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

Level 1 — Recognition

Exercise 1.1 — Name the villain

Q: Using the notation box above (so is vector length, thrust, acceleration command, gravity, and the ground-frame coordinates), of the four constraints below exactly one defines a non-convex set. Which, and why? (a) (b) (c) (d) .

Recall Solution

Answer: (b). A set is convex if the straight line joining any two of its points stays inside the set.

  • (a) is a solid disk (all thrust vectors no longer than ) — pick any two points inside, the segment stays inside. Convex.
  • (c) is a linear equality — a flat plane in state-space. Convex.
  • (d) is a cone opening upward (glide-slope). Convex.
  • (b) is everything outside a circle. Take one point on the left rim and one on the right rim: the segment between them passes straight through the forbidden hole in the middle. That escape from the set is the definition of non-convex. Look at the pink dashed chord in the figure above — its two pink endpoints sit on the allowed ring, but the dashed line between them dives through the yellow inner circle into the forbidden hole.

Exercise 1.2 — What each new symbol means

Q: In the change of variables, match each symbol to its plain meaning: , , , .

Recall Solution
  • — the acceleration command (thrust per unit mass; what the rocket actually feels).
  • — the slack magnitude that upper-bounds ; it's how hard we're throttling, in acceleration units.
  • — the log of mass, chosen so mass dynamics become linear.
  • — the fuel-cost rate: kg of mass lost per newton-second of thrust, expressed so .

Answer line — in one sentence ::: converts thrust magnitude into mass-loss rate; it is the reciprocal of exhaust speed .


Level 2 — Application

Exercise 2.1 — Can it stop? (1-D vertical, Mars)

Q: A lander is at altitude m descending, so its velocity is m/s (recall from the notation box: up is positive, so a downward speed of m/s is written ). Gravity magnitude (Mars). Maximum thrust gives (up-thrust). Ignore mass change. Using full up-thrust, what is the shortest stopping distance, and does it fit under the altitude? Also: what would have to be true about for stopping to be impossible?

Recall Solution

WHAT we do: find the largest net deceleration and use constant-acceleration kinematics. Sign handling first: up-thrust gives acceleration ; gravity gives . So the net upward acceleration while braking is WHY we can use the speed m/s: the stopping-distance formula uses the magnitude of velocity because — the sign disappears when squared. The velocity is signed (), but its square (kinetic-energy term) is direction-free, which is exactly why the formula only needs the speed . Since , yes — there's altitude to spare, so a feasible (indeed fuel-optimal) solution exists.

Edge case — when stopping is impossible: the net decelerating acceleration is . If , then : even at full throttle the engine cannot beat gravity, the lander keeps accelerating downward, and is undefined or negative — the feasibility check fails and no landing exists from that state. So the very first thing G-FOLD needs is a thrust ceiling above local gravity, .

Exercise 2.2 — Glide-slope radius

Q: Target at the origin (ground-frame coordinates from the notation box: horizontal, altitude). Glide-slope angle , so the constraint is , where is the horizontal distance from the target. At altitude m, what is the maximum allowed horizontal distance? Repeat for .

Recall Solution

WHAT the constraint says geometrically: at each altitude , the term is the radius of a horizontal circle the lander is allowed inside. Because that allowed radius grows linearly with height, stacking the circles makes an upward-opening cone whose tip sits at the target. The figure below plots exactly this: the vertical axis is altitude , the horizontal axis is offset , and the shaded wedge is the allowed funnel.

  • : , so radius m. In the figure, at the dotted line the yellow cone edge sits at m.
  • : , so radius m — the blue cone is narrower.

WHY tan and not sin: on the right triangle (altitude = adjacent vertical side, horizontal offset = opposite side, slant descent line = hypotenuse), . That ratio is the cone's slope, which is what we want to cap. A smaller makes a narrower, steeper funnel — safer against ridges but less room to maneuver.


Level 3 — Analysis

Exercise 3.1 — Why actually linearizes

Q: Starting from and , show that gives , and explain why the obvious alternative does not clean things up.

Recall Solution

Step — differentiate the log (WHAT): by the chain rule, Step — substitute the mass law (WHAT): WHY the log works: the acceleration law has in the denominator — that is the nonlinear coupling we must kill. The mass law's ratio is exactly the chain-rule derivative of . Feeding in , the 's combine into the clean control , and we get : constant times control, no state in a denominator. WHY fails (the concrete alternative): try it. . This still carries and separately — you cannot fold them into the single control without a leftover . So leaves a state-dependent factor and the dynamics stay nonlinear. Only the log produces the ratio that the control already matches — that is the sense in which the log is uniquely clean.

Exercise 3.2 — Lossless convexification, the sign argument

Q: We relaxed to . The objective is . Argue (at the level of "what would the optimizer do") that at the optimum wherever the throttle floor is inactive.

Recall Solution

Setup: at any instant, the constraints touching are and (throttle floor). The cost pays per unit time. Argument (WHY hugs ): suppose at some instant strictly. Then we could lower by a tiny amount without violating either lower bound. This reduces the cost integral by and — since enters the dynamics only through — also saves mass (raises final ), which is only better. So any strictly-slack is suboptimal: the optimizer presses down onto the tighter of its two floors. Where the floor is inactive (), the binding floor is , hence — the exact engine physics is recovered. That's why relaxing "costs nothing" = lossless. How Pontryagin closes the last gap (sketch, not just a citation): the hand-wave above assumes we may freely nudge down at a single instant. But is coupled to the state through the dynamics, so a purely local nudge could in principle be blocked. The Pontryagin Minimum Principle handles this properly: it forms the Hamiltonian and asks which minimizes pointwise along the optimal path. Working that minimization out shows the coefficient multiplying is strictly positive (it is plus a mass-costate term that stays positive), so is minimized by taking as small as its lower bounds allow — i.e. everywhere, ruling out any interval where floats strictly above. That positivity is the "no pathological case" guarantee.


Level 4 — Synthesis

Exercise 4.1 — Assemble the SOCP for a discretized node

Q: You discretize time into equal steps of length . Using forward Euler, write the update equations for , , from node to , and list every per-node constraint (including the throttle floor and ceiling) that keeps the discrete problem faithful to the annular thrust set — then say which are convex.

Recall Solution

Forward Euler = "new value = old value + step rate." Applying to each continuous law: Per-node constraints (the full list): Without the floor and ceiling lines, the discrete model would only cap thrust from above via the cone and lose the annulus entirely — so both are mandatory. Convexity check: the three Euler updates are linear equalities (flat sets → convex). are the convexified (Taylor) bounds from the parent note, so those two are convex. The two norm constraints are second-order cones — convex. Hence the whole discretized problem is an SOCP solvable by Interior-Point Methods. This is the bridge from continuous physics to what Convex Optimization / Second-Order Cone Programming solvers eat.

Exercise 4.2 — Fuel from the mass log

Q: A solve returns (initial mass 1000 kg) and . How much fuel (kg) was burned? Then, given , what is ?

Recall Solution

Step — undo the log (WHY): , so . Final mass: Initial mass kg. Fuel burned: Step — recover the objective: integrating over : Cross-check: is exactly the Tsiolkovsky ideal budget — reassuring that "minimize " literally minimizes velocity-change cost.


Level 5 — Mastery

Exercise 5.1 — Full 1-D bang-bang fuel comparison

Q: 1-D vertical descent on Mars. Why we ignore mass change here: over one short braking manoeuvre the mass barely changes (a few percent), so treating the thrust-to-mass ratios as constant is an excellent approximation that lets us solve by hand while still exposing the bang-bang structure; the full G-FOLD keeps the -dynamics, but the qualitative winner is the same. Sign convention (from the notation box): up is , so the start velocity m/s is a m/s descent; kinematics uses the speed because it enters squared. Start: m, m/s. . Available up-thrust accelerations: , . Compare two strategies by the fuel proxy (here = commanded up-thrust acceleration):

  • (A) Constant-thrust: find the single constant up-thrust that brings the speed to exactly at the ground.
  • (B) Bang-bang: coast at , then full-thrust for the final brake, arriving at ground with zero speed. Which burns less fuel proxy?
Recall Solution

Let up be positive. Net vertical acceleration under commanded up-thrust is .

Strategy A — constant thrust : we must kill m/s of descent over m of fall. The net decelerating acceleration is , and : Descent time s. Fuel proxy .

Strategy B — bang-bang. During coast : net accel (still speeding downward). During brake : net accel (decelerating). Let coast cover distance (speed grows from 30 to ), brake covers (speed ). Coast: (speed magnitude increases). Brake: . Set equal: . Then m/s. Times: coast s. Brake s. Fuel proxy .

Verdict: bang-bang wins, saving units of fuel proxy (). This is exactly the "coast-then-suicide-burn" that G-FOLD rediscovers, and why SpaceX Falcon 9 Landing and Mars EDL delay ignition. Burning early wastes propellant on gravity loss (holding altitude against for longer).

Exercise 5.2 — Where would you use MPC around this?

Q: G-FOLD gives one optimal trajectory from the current state. Real winds and model errors perturb the lander. In one paragraph, explain how Model Predictive Control wraps around G-FOLD, and why re-solving a convex problem makes this loop trustworthy in real time.

Recall Solution

Idea: Model Predictive Control re-plans repeatedly. At each control tick you measure the actual state , then re-solve the G-FOLD SOCP from that state to the target, apply only the first thrust command, discard the rest, and repeat next tick. Why convexity is the enabler: each re-solve is an SOCP with a unique global optimum reached by Interior-Point Methods in guaranteed bounded time — so within the ~1 s budget you always get a certifiably optimal, feasible plan, never a stuck local minimum. A non-convex re-solve could return garbage or time out mid-descent; convexity is what makes the closed loop safe to fly. This is the design lineage from Apollo Lunar Descent Guidance (open-loop polynomial) to modern re-solving guidance.


Flashcards

Why is non-convex?
It keeps points outside a circle; a segment joining two rim points crosses the forbidden hole (fails the convexity segment test).
When is the 1-D feasibility check impossible?
When : net deceleration , so full thrust cannot beat gravity and no landing exists.
Stopping distance formula used in feasibility checks?
with (speed squared, so sign of drops out).
Convert log-mass change to ?
.
Why does bang-bang beat constant thrust on fuel?
Constant thrust fights gravity longer (more gravity loss); delaying the burn to a short hard brake minimizes .