tikhonov_regularization — damped least squares near the reach singularity

Concept

Tikhonov regularization (damped least squares, DLS) is the numerical lever the controller pulls to
keep a near-singular matrix invertible: it replaces 1/σ with σ/(σ² + λ²), trading exactness for a
bounded inverse as σ → 0. It appears in two places that look unrelated until you read both — the
damped J⊕ pseudoinverse (utils/robot.py) and the coordinated Γ velocity solve
(GNC/breve_controller.py) — so this page documents the shared idea; the per-file pages document each site.

COM vs base — read this first

The regularization does NOT damp "the base" — the first channel it touches is the COM velocity v_c

A documentation agent confused the system center of mass with the base spacecraft body. They are
different channels, and only one of them is damped by the Γ solve.

  • p_c is the system CENTER OF MASS position — the whole-system circumcentroidal mass center, which
    shifts as the arm slews. It is computed kinematically by Pinocchio FK as p_c = as_col3(self.data.com[0])
    at utils/robot.py:137 — a KINEMATIC quantity, never damped directly.
  • The BASE is the free-flyer spacecraft body frame. Its error channels are the base attitude z_b (a
    pointing versine) and the base angular rate omega_b. These are a different channel from the COM.
  • The coordinated (circumcentroidal, ) reduced velocity solved by the damped Γ system is
    y = [v_c, omega_b, nu_e_oplus], assembled at GNC/breve_controller.py:479 — and v_c (COM velocity)
    is the FIRST block
    . So when the Γ-Tikhonov term adds λ²I, the leading block it regularizes is the
    COM velocity, not the base.
  • One-line correction: Tikhonov on the Γ solve damps the COM velocity v_c first; it does not
    “damp the base.”

What this spans

  • utils/robot.py (robot) — the damped J⊕ inverse: the middle (Tikhonov) tier of the 3-tier
    damped_inverse, applied to the circumcentroidal EE Jacobian.
  • GNC/breve_controller.py (breve_controller) — the damped Γ velocity solve in
    reconstruct_generalized_velocity: the normal-equations form (ΓᵀΓ + λI) v = Γᵀ y that recovers the full
    generalized velocity from y = [v_c, omega_b, nu_e_oplus].
  • Thesis: the same DLS trick guards two singular maps that go singular together (the Γ/J⊕
    lower-right block); the damping band acts on the COM velocity channel (v_c leads y) and the EE
    inverse — never directly on the base — and its λ is keyed to the live distance-to-singularity s_min_G.

Constituent pages

Down-links to the per-file pages that hold each part’s contract:

  • robotGiordanoRobot: owns damped_inverse (3-tier) and regularized_svd (the Tikhonov tier), plus
    the raw witnesses s_min_J / s_min_G. The equations live here; the controllers consume self.dyn.*.
  • breve_controllerBreveController: owns reconstruct_generalized_velocity, the Γ-Tikhonov solve,
    and the conditioning ramp that reads s_min_G. The canonical onset footgun lives on its page
    (breve_controller > Footguns).

Mechanism (where it lives in code)

Site 1 — Tikhonov on the J⊕ inverse (the middle tier of three):

  • damped_inverse is the 3-tier dispatcher: exact/Moore-Penrose above soft_floor → Tikhonov between the
    floors → hold-last (last_J_plus_inv) at/below hard_floorutils/robot.py:217.
  • regularized_svd is the Tikhonov tier: s_inv = s/(s² + λ²) with λ = max(damping, soft_floor − s_min)
    utils/robot.py:249 (the s_inv formula at utils/robot.py:255).

Site 2 — Tikhonov on the Γ velocity solve (acts on the COM channel):

  • reconstruct_generalized_velocity builds y = [v_c, omega_b, nu_e_oplus]GNC/breve_controller.py:479.
  • It solves the regularized normal equations (ΓᵀΓ + λI) v = Γᵀ y with λ = max(damping, floor² − s_min_G²),
    s_min_G = self.dyn.s_min_GGNC/breve_controller.py:488 / solve at GNC/breve_controller.py:490. Because
    v_c is the leading block of y, the damping acts on the COM velocity channel.
  • The Γ top block is what maps [v_b, omega_b, qdot] → v_cutils/robot.py:294 (assembled into
    Γ at utils/robot.py:297); this is why a Γ-side perturbation lands on v_c.

Why the singularity is real, not a logging artifact:

  • The raw witnesses s_min_J (utils/robot.py:286) and s_min_G (utils/robot.py:298) come straight from
    sigma_min_and_cond on the undamped J⊕ / Γ — they are independent of the regularization, which only
    shapes the commanded inverse. The controller logs them with the explicit note that the ramp drives off
    s_min_G only — GNC/breve_controller.py:502 (and s_min_J as the physical witness at
    GNC/breve_controller.py:504). So when both witnesses collapse in lockstep, the singularity is physical.

Evidence

The daily checkin overlaid 9 controller variants on the same logged mission (run_PM0314, 2026-06-21). The
three figures below isolate the COM channel the damped Γ solve actually touches, and the s_min_G signal
that sets λ.


COM position error p_c across 9 controller variants — the kinematic COM channel, never damped directly.


COM velocity error v_c — the channel the damped Γ solve (ΓᵀΓ + λI)v = Γᵀy acts on directly (v_c leads y).


Distance-to-singularity s_min_G — the live signal that sets λ = max(damping, floor² − s_min_G²).

Figure provenance

Produced by the daily checkin pipeline (analysis/analysis_YAMLs/templates/checkin.yamlOrchestrator,
run_PM0314, 2026-06-21) and copied into wiki/assets/ by validation/place_wiki_evidence.py. Numbers come
from the pipeline reducer, never re-derived here (see .claude/rules/MEASUREMENT.md).

The rejected low-onset variant. Lowering the Γ-Tikhonov onset
(controller.base.gamma_regularization.floor) from 0.05 → 0.020 makes EE tracking look spectacular — but
only by flying the arm through a sustained reach singularity. On the full targeting-ON mission: pe_p99
0.178→0.107 (−40%) and pe_median 0.156→0.074 (−52%), yet s_min_J min collapses 0.0279→1.44e-6 with
99.6% of the operational window below the 0.025 safety floor, s_min_G collapses in lockstep (1.43e-6),
reach p99 over-extends 0.32→0.465 m, coverage falls below the 0.99 gate, and base attitude z_b triples.
Committed write-ups (gitignored): logs/logs_Jun19_26/CLAIMS.md (the REJECT adjudication, ~19:30 EDT entry),
logs/logs_Jun21_26/CLAIMS.md, and the run report logs/logs_Jun21_26/full_control_single/run/reports/run_PM0528/report.tex.
The canonical footgun for this onset lives on breve_controller > Footguns.

Footguns

p_c (COM) is not the base — the damped Γ solve touches v_c first

An agent reading only breve_controller.py may say “the regularization damps the base.” It does not: the
first block of y = [v_c, omega_b, nu_e_oplus] is the COM velocity, and the Γ top block maps to v_c
(utils/robot.py:294). p_c itself is a pure Pinocchio-FK kinematic output (utils/robot.py:137) — it
shifts as the arm slews and is never damped directly.

Removing the damping "improves" p_c only by destroying the protective singular margin

The onset is regime-dependent. With camera targeting OFF, lowering the onset improves conditioning
(a targeting-OFF probe showed s_min_J frac_below 0.597→0.027). With targeting ON, the same change
collapses it (s_min_J min → 1.4e-6, 99.6% sub-floor): the damping band is the only thing holding
the camera-pose demand off the reach-singular wall. A lower onset that looks like a p_c/pe win is
over-extending the arm into a rank-1 singularity. Incumbent onset 0.05 STAYS (REJECT, 4-lens adversarial).
Never tune this onset on a targeting-OFF proxy. (logs/logs_Jun19_26/CLAIMS.md; breve_controller > Footguns.)

The witnesses are independent of the reg — a lockstep collapse is a real singularity

s_min_J / s_min_G (utils/robot.py:286,298) are computed on the undamped maps; Tikhonov only shapes the
commanded inverse. So if s_min_J and s_min_G both crater together, the matrix really is singular — it is
not a damping/logging artifact. (GNC/breve_controller.py:502-504.)

Equations & references

Key equations mirrored from current_sota — the math source of truth; see there for derivations.

Layer 1 — Tikhonov regularization (squared, variable damping) — §6.2, eq (6.3):

Layer 3 — damped inverse (three-tier) — §6.4, eq (6.5):

References:

  • Singularity handling & conditioning — Layer 1 Tikhonov Γ regularization and Layer 3 the 3-tier damped
    J⊕ inverse s_i/(s_i² + λ_J²) (§6, §6.2, §6.4): current_sota > 6.
  • eq↔code cross-check (reconstruct/damped_inverse ↔ §6): generated_reports/GNC/cross_check.md.

robot · breve_controller · circumcentroidal_control · com_vs_base · coupled_dynamics · speed_gain_derate · terminology