← Projects
Guidance and optimization [PRJ-01] · 01 / 04

6-DOF powered descent guidance

Independent project 1,000-run Monte Carlo · 3D replay

Fuel-optimal landing guidance for a single-engine reusable rocket, solved with six-degree-of-freedom (6-DOF) successive convexification and tracked by time-varying LQR, landing within limits on 1,000 of 1,000 Monte Carlo runs.

Launch 3D replay ↗

[PRJ-01]Monte Carlo run 848 (largest initial position dispersion) replayed at 2× speed: flown trajectory colored by speed with every 2 s receding-horizon re-plan shown as a ghost path.

Summary

What I built

  1. 01What

    I built fuel-optimal landing guidance for a single-engine reusable rocket and flew it closed-loop in a six-degree-of-freedom (6-DOF) simulation.

  2. 02How

    Penalized Trust Region (PTR) successive convexification (SCvx) solves the free-final-time trajectory from a 3-DOF lossless convexification (LCvx) warm start and re-plans every 2 s. Time-varying LQR (TVLQR) tracks the trajectory at 50 Hz against a 200 Hz truth plant with wind, engine lag, and navigation error.

  3. 03Outcome

    All 1,000 of 1,000 Monte Carlo landings met every touchdown limit with 0.94 m CEP95 and a 127 ms median re-solve against a 1 s budget. Without in-flight re-guidance, 983 of 1,000 runs landed.

Results

[PRJ-01] Measured
MC landings
1000 / 1000
Touchdown CEP95
0.94 m
Median re-solve
127 ms
  • Monte Carlo landings within touchdown limits (re-guidance + TVLQR, 1,000 runs)1000 / 1000 (95% CI 99.6–100.0%)
  • Touchdown miss distance: CEP50 / CEP95 / worst0.44 m / 0.94 m / 1.30 m
  • Touchdown vertical speed: median / worst (2.5 m/s limit)1.30 / 1.58 m/s
  • Touchdown tilt: p99 / worst (5° limit)0.47° / 0.82°
  • In-flight re-solve time: median / p99 / worst (1 s budget)127 / 307 / 397 ms (0 / 8,905 over budget)
  • One-shot ablation without re-guidance (same 1,000 runs)983 / 1000, CEP95 1.49 m
  • Peak in-flight tilt p99: aero vs vacuum guidance model (20° plan limit)24.1° vs 30.9°
  • 3× dispersion stress sweep (300 runs): re-guidance vs one-shot91.7% vs 34.3%
  • Open-loop propagation error of SCvx trajectory (4 scenarios)0.08–0.42 mm
  • 6-DOF propellant above 3-DOF LCvx lower bound (4 scenarios)0.4–8.0%
  • PTR iterations from 3-DOF warm start / mean full solve time10–19 iterations / 312 ms (28 ms/iter)
System

Architecture

  1. 01lcvx.py

    3-DOF lossless convexification SOCP with final-time line search. Measures relaxation tightness on every solve (1 of 240 nodes > 1e-4, median gap 2e-7) and supplies the fuel lower bound and warm start.

  2. 02dynamics.py + discretize.py

    6-DOF quaternion equations of motion with analytic Jacobians checked via complex-step differentiation, plus batched derivative-form First-Order-Hold (FOH) discretization without matrix inverses.

  3. 03scvx.py

    Penalized Trust Region (PTR) loop compiled once via CVXPY DPP (Clarabel backend) so each iteration only updates parameters. Unit scaling puts states at O(1) and soft exact-penalty path margins keep re-plans feasible.

  4. 04tvlqr.py + closedloop.py

    12-state error-state TVLQR projected via quaternion tangent map Ξ(q) with hover regulator terminal cost, paired with receding-horizon re-guidance every 2 s over the fixed 1 s compute budget.

  5. 05truth.py + montecarlo.py

    200 Hz RK4 truth plant with engine lag, gimbal rate limits, wind/gusts, dispersed mass/aero, and navigation bias and noise across 1,000-run campaigns, a 7,938-point divert envelope, and 3× stress sweeps.

Design decisions

  1. D01

    Nondimensional length, time, and mass scaling brings position, velocity, mass, and thrust to O(1), keeping trust-region radii, virtual controls, and convergence checks well-conditioned.

  2. D02

    Derivative-form FOH sensitivities avoid inverting state transition matrices across discretization intervals.

  3. D03

    Soft exact-penalty guidance cones (zero penalty in every cold solve) keep re-plans feasible when disturbances push the vehicle slightly past a planned margin.

  4. D04

    A trimmed terminal gate at 2 m altitude and 1 m/s descent decouples touchdown speed from altitude error.

  5. D05

    Four-way ablation shows re-guidance removes the miss tail while nominal aerodynamics in the guidance model hold peak in-flight tilt near the planned 20° envelope.

Evidence

Figures

6 plots and captures. Select any figure to view it at full resolution.

[Fig. 01] Four 6-DOF guidance scenarios. Solved trajectories across nominal, crossrange, and divert profiles under attitude and thrust constraints.
[Fig. 02] 1,000-run Monte Carlo touchdown scatter. Touchdown dispersion for receding-horizon re-guidance + TVLQR (1000/1000, CEP95 0.94 m) versus the one-shot baseline.
[Fig. 03] Divert envelope (7,938 initial conditions). Feasible landing initial conditions with propellant contours; outside the dashed boundary, 3-DOF LCvx infeasibility certifies 6-DOF infeasibility.
[Fig. 04] Guidance model ablation (aero vs vacuum). Adding nominal aerodynamics to the onboard guidance model reduces p99 peak in-flight tilt from 30.9° to 24.1°.
[Fig. 05] Dispersion stress sweep (up to 3×). Landing success rate versus dispersion scale: re-guidance holds 91.7% at 3× dispersions versus 34.3% one-shot.
[Fig. 06] 3-DOF lossless convexification baseline. Relaxation tightness and optimal propellant lower bound used to warm-start 6-DOF PTR.
Scope

Limits

What the model assumes and what this work does not show.

  1. L01

    Notional rigid-body vehicle with constant inertia (no propellant slosh, flex modes, or engine start transient; flat non-rotating Earth).

  2. L02

    Navigation is modeled as truth plus bias and noise instead of a full onboard sensor estimator.

  3. L03

    Solve times are measured in Python, CVXPY, and Clarabel on a laptop against a 1 s budget; no flight-hardware WCET claim is made.

  4. L04

    TVLQR omits actuator lag and integral action; gains were tuned against Monte Carlo dispersions instead of loop-margin synthesis.

Run it

Reproduce

Run the tests and regenerate every figure from the repository.

$ uv sync
$ make test
$ uv run pdg fly --scenario crossrange
$ make all
Next project · 02 / 04

Fault-tolerant quadrotor NMPC