3.5.52Guidance, Navigation & Control (GNC)

Optimal guidance — ZEM - ZEV formulation

1,926 words9 min readdifficulty · medium

WHAT are we solving?

We want a thrust/acceleration command a(t)\mathbf{a}(t) that flies a vehicle so that at the final time tft_f:

  • position hits a target: r(tf)=rf\mathbf{r}(t_f) = \mathbf{r}_f
  • (optionally) velocity matches: v(tf)=vf\mathbf{v}(t_f) = \mathbf{v}_f (needed for soft landing / rendezvous)

while spending minimum control effort: J=12ttfa(τ)2dτ.J = \tfrac{1}{2}\int_{t}^{t_f} \|\mathbf{a}(\tau)\|^2\, d\tau .

The dynamics (double integrator + gravity) over the coast: rcoast(tf)=r(t)+v(t)tgo+12gtgo2,\mathbf{r}_{coast}(t_f) = \mathbf{r}(t) + \mathbf{v}(t)\,t_{go} + \tfrac12 \mathbf{g}\,t_{go}^2, vcoast(tf)=v(t)+gtgo.\mathbf{v}_{coast}(t_f) = \mathbf{v}(t) + \mathbf{g}\,t_{go}.

So concretely: ZEM=rfrvtgo12gtgo2\boxed{\mathbf{ZEM} = \mathbf{r}_f - \mathbf{r} - \mathbf{v}\,t_{go} - \tfrac12\mathbf{g}\,t_{go}^2} ZEV=vfvgtgo\boxed{\mathbf{ZEV} = \mathbf{v}_f - \mathbf{v} - \mathbf{g}\,t_{go}}


HOW: Derivation from first principles

We use the double-integrator model (control is acceleration): r˙=v,v˙=a+g.\dot{\mathbf{r}} = \mathbf{v}, \qquad \dot{\mathbf{v}} = \mathbf{a} + \mathbf{g}.

Step 1 — Write the true final states with control included

Integrate the true dynamics from now (tt) to tft_f. Why? We need the actual endpoint as a function of the unknown a(τ)\mathbf{a}(\tau).

v(tf)=v+gtgocoast part+ttfa(τ)dτ.\mathbf{v}(t_f) = \underbrace{\mathbf{v} + \mathbf{g}\,t_{go}}_{\text{coast part}} + \int_t^{t_f}\mathbf{a}(\tau)\,d\tau.

Position needs a double integral; integrating by parts, r(tf)=r+vtgo+12gtgo2coast part+ttf(tfτ)a(τ)dτ.\mathbf{r}(t_f) = \underbrace{\mathbf{r}+\mathbf{v}t_{go}+\tfrac12\mathbf{g}t_{go}^2}_{\text{coast part}} + \int_t^{t_f}(t_f-\tau)\,\mathbf{a}(\tau)\,d\tau.

Why the (tfτ)(t_f-\tau) weight? Because acceleration applied early has more time to move the position — it accumulates through two integrations, leaving a lever-arm (tfτ)(t_f-\tau).

Step 2 — Impose the boundary conditions using ZEM/ZEV

Set r(tf)=rf\mathbf{r}(t_f)=\mathbf{r}_f, v(tf)=vf\mathbf{v}(t_f)=\mathbf{v}_f. Subtract the coast parts (= the ZEM/ZEV definitions): ttf(tfτ)a(τ)dτ=ZEM,ttfa(τ)dτ=ZEV.\int_t^{t_f}(t_f-\tau)\,\mathbf{a}(\tau)\,d\tau = \mathbf{ZEM},\qquad \int_t^{t_f}\mathbf{a}(\tau)\,d\tau = \mathbf{ZEV}.

Why this is beautiful: the two constraints are now expressed purely in terms of the coast errors. The control just has to "fill" ZEM and ZEV.

Step 3 — Minimize effort subject to those two integral constraints

Minimize J=12a2dτJ=\tfrac12\int\|\mathbf{a}\|^2 d\tau with two vector constraints. Introduce constant Lagrange multipliers λ1,λ2\boldsymbol\lambda_1,\boldsymbol\lambda_2: L=ttf[12a2λ1 ⁣ ⁣(tfτ)aλ2 ⁣ ⁣a]dτ.\mathcal L = \int_t^{t_f}\Big[\tfrac12\|\mathbf a\|^2 - \boldsymbol\lambda_1\!\cdot\!(t_f-\tau)\mathbf a - \boldsymbol\lambda_2\!\cdot\!\mathbf a\Big]d\tau. Pointwise stationarity L/a=0\partial\mathcal L/\partial\mathbf a = 0 gives the optimal linear-in-time profile: a(τ)=λ1(tfτ)+λ2.\mathbf a^*(\tau) = \boldsymbol\lambda_1 (t_f-\tau) + \boldsymbol\lambda_2. Why linear? The calculus of variations for a quadratic cost with these constraints forces the control to be an affine function of remaining time — the optimal profile is never "wild."

Step 4 — Solve the two moment equations at the current instant

Plug a\mathbf a^* back into the two constraints. Let s=tfτs=t_f-\tau, so ds=dτds=-d\tau, s:tgo0s:t_{go}\to 0: 0tgos(λ1s+λ2)ds=λ1tgo33+λ2tgo22=ZEM,\int_0^{t_{go}} s(\boldsymbol\lambda_1 s + \boldsymbol\lambda_2)\,ds = \boldsymbol\lambda_1\tfrac{t_{go}^3}{3}+\boldsymbol\lambda_2\tfrac{t_{go}^2}{2}=\mathbf{ZEM}, 0tgo(λ1s+λ2)ds=λ1tgo22+λ2tgo=ZEV.\int_0^{t_{go}} (\boldsymbol\lambda_1 s + \boldsymbol\lambda_2)\,ds = \boldsymbol\lambda_1\tfrac{t_{go}^2}{2}+\boldsymbol\lambda_2\,t_{go}=\mathbf{ZEV}.

Solve this 2×22\times2 system for λ1,λ2\boldsymbol\lambda_1,\boldsymbol\lambda_2, then the command applied NOW is a(t)=λ1tgo+λ2\mathbf a^*(t) = \boldsymbol\lambda_1 t_{go} + \boldsymbol\lambda_2. Doing the algebra:

Why 66 and 22? Solving the 2×22\times2: λ2=(6ZEM4tgoZEV)/tgo2\boldsymbol\lambda_2 = (6\,\mathbf{ZEM} - 4\,t_{go}\mathbf{ZEV})/t_{go}^2 etc.; combining gives coefficients 6/tgo26/t_{go}^2 and 2/tgo2/t_{go}. The signs differ because ZEM (position error) and ZEV (velocity error) must be corrected with opposite-tendency accelerations near the end.


Figure — Optimal guidance — ZEM - ZEV formulation

WHY these coefficients blow up (the tgo0t_{go}\to 0 story)

As tgo0t_{go}\to 0, 1/tgo21/t_{go}^2\to\infty. What this means physically: if you still have a miss with almost no time left, you need enormous acceleration to fix it — real thrusters saturate, so a good guidance system drives ZEM→0 early so the command stays bounded. This is why ZEM/ZEV is run as continuous feedback: each cycle recomputes ZEM/ZEV, so tiny residuals are killed while tgot_{go} is still large.


Worked Examples


Common Mistakes (Steel-manned)


Active Recall

Recall Test yourself (hidden)
  • Define ZEM and ZEV in words.
  • Why is the optimal acceleration profile linear in time?
  • Where do 66 and 22 come from?
  • What is the interception (PN) special case?
  • What happens to the command as tgo0t_{go}\to 0, and why do we run it as feedback?
What is ZEM (Zero-Effort-Miss)?
The position error at the final time if control is set to zero and the vehicle coasts under gravity only: rfrvtgo12gtgo2\mathbf{r}_f-\mathbf r-\mathbf v t_{go}-\tfrac12\mathbf g t_{go}^2.
What is ZEV (Zero-Effort-Velocity)?
The final-time velocity error if you coast with zero control: vfvgtgo\mathbf{v}_f-\mathbf v-\mathbf g t_{go}.
Full ZEM/ZEV optimal guidance law (position+velocity)?
ac=6tgo2ZEM2tgoZEV\mathbf a_c=\dfrac{6}{t_{go}^2}\mathbf{ZEM}-\dfrac{2}{t_{go}}\mathbf{ZEV}.
Position-only (interception) guidance law?
ac=3tgo2ZEM\mathbf a_c=\dfrac{3}{t_{go}^2}\mathbf{ZEM}, equivalent to Proportional Navigation with N=3N=3.
Why is the optimal command profile linear in tgot_{go}?
Minimizing a2\int\|a\|^2 with two integral (moment) constraints via calculus of variations forces a(τ)=λ1(tfτ)+λ2\mathbf a^*(\tau)=\boldsymbol\lambda_1(t_f-\tau)+\boldsymbol\lambda_2, an affine function of remaining time.
Why does the position term carry a (tfτ)(t_f-\tau) weight?
Because acceleration is double-integrated to affect position, giving a lever-arm equal to the remaining time.
Why do the coefficients blow up as tgo0t_{go}\to0?
1/tgo21/t_{go}^2\to\infty: a residual miss with no time left needs infinite accel; run as feedback so ZEM/ZEV are killed early while tgot_{go} is large.
What cost functional does ZEM/ZEV minimize?
Control effort J=12ttfa2dτJ=\tfrac12\int_t^{t_f}\|\mathbf a\|^2 d\tau (fuel/energy proxy).

Recall Feynman: explain to a 12-year-old

Imagine you're throwing a paper ball into a bin while walking. Every moment you ask: "If I let go RIGHT NOW, where would it land and how fast would it hit?" If it would land too far left, you nudge your throw right. If it would land too fast for a gentle drop, you ease off. ZEM is "how far off you'd land," ZEV is "how wrong your landing speed would be." The math just says: nudge harder when there's less time left, and balance fixing where you land against how gently.

Connections

  • Proportional Navigation — the 3/tgo2ZEM3/t_{go}^2\,\mathbf{ZEM} special case.
  • Calculus of Variations & Pontryagin's Minimum Principle — source of the linear costate profile.
  • Double Integrator Dynamics — the plant model used.
  • Time-to-go estimation — computing tgot_{go} is the practical hard part.
  • Powered Descent Guidance (Apollo E-Guidance) — historical ZEM/ZEV lander.
  • Lambert's Problem — related boundary-value targeting in orbital mechanics.
  • Optimal Control — LQR — same quadratic-effort minimization philosophy.

Concept Map

goal

integrate coast

integrate coast

scales

scales

coast miss

coast miss

adds lever-arm weight

early accel moves more

expressed via

solved

correction term

correction term

Min-effort optimal control

Final position and velocity constraints

Double integrator plus gravity

ZEM position error

ZEV velocity error

Time-to-go t_go

Weight t_f minus tau

Constraint integrals equal ZEM and ZEV

Weighted feedback steering command

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, ZEM/ZEV guidance ka core idea bahut seedha hai. Har instant pe aap ek prediction karte ho: "Agar main abhi steering (thrust) band kar du aur sirf gravity ke saath coast karu, toh final time pe main kitna miss karunga?" Position wala miss = ZEM (Zero-Effort-Miss), aur velocity wala error = ZEV (Zero-Effort-Velocity). Bas inhi do errors ko dekh kar aap acceleration command bana lete ho.

Jo formula aata hai woh hai ac=6tgo2ZEM2tgoZEVa_c = \frac{6}{t_{go}^2}\text{ZEM} - \frac{2}{t_{go}}\text{ZEV}. Yaha tgot_{go} matlab time-to-go (kitna time bacha hai). "6 to place, 2 to pace" yaad rakho — 6 wala term position sahi karta hai, 2 wala term speed sahi karta hai, aur unke signs opposite hote hain kyunki end ke paas dono ko balance karna padta hai. Agar sirf target ko hit karna hai (rocket interception), velocity match nahi chahiye, toh sirf ac=3tgo2ZEMa_c=\frac{3}{t_{go}^2}\text{ZEM} — yahi classic Proportional Nav

Go deeper — visual, from zero

Test yourself — Guidance, Navigation & Control (GNC)

Connections