speed_gain_derate — the conditioning ramp γ(s_min_G) and the derate stack

Concept

One scalar ramp γ = conditioning_scale(s_min_G) ∈ [σ_crit,1] softens the controller as it nears a
singularity. It earns a page because the single ramp is consumed in three places across two
controllers and the guidance layer, and the endorsed mechanism (gain/impedance derate) is easy to
confuse with the rejected one (speed derate). The per-file pages document each consumer; this page
documents the shared ramp and which mechanism is live.

What this spans

  • GNC/breve_core_controller.py (breve_core_controller) — owns the single ramp conditioning_scale(s_min_G) (Option A) and applies it to the base attitude wrench τ_b⊕.
  • GNC/breve_controller.py (breve_controller) — the per-block γ gates (arm_gain_scale / base_gain_scale), the impedance derate of K/D, and the anti-windup skip on the EE integral.
  • GNC/base_guidance.py (base_guidance) — the speed-derate path (derate_desired_by_gamma) and the attitude-blend, both driven off the same γ.
  • Thesis: scale the gains and the base wrench by γ (impedance derate) and let the slowdown be emergent; do not scale the command rate (speed derate). Speed-derate collapses the cruise-lag floor to ~1e-5 and over-extends the arm; γ-on-gains relaxes the equilibrium to a larger, well-conditioned lag instead.

Constituent pages

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

  • breve_core_controller — defines the one ramp conditioning_scale and the γ-scaled base torque.
  • breve_controller — the per-block γ gates, the K/D impedance derate, and the integral anti-windup gate.
  • base_guidance — the speed-derate of the CoM reference + the near-singular attitude blend (same γ, Option A).

Mechanism (where it lives in code)

The single ramp, then its three consumers:

  • The one rampγ = scale_by_svd(s_min_G, base.conditioning.sigma)GNC/breve_core_controller.py:80. Inherited by both subclasses; everything below calls this. (The underlying SVD ramp lives in sampling; s_min_G is logged by robot.)
  • Consumer 1 — base attitude wrench (impedance): compute_tau_b_oplus multiplies the PD torque by γ when conditioning is on — GNC/breve_core_controller.py:92.
  • Consumer 2 — arm/base gain gates: arm_gain_scale returns γ iff base.conditioning.enable and arm.derate.gainGNC/breve_controller.py:262; base_gain_scale returns γ iff base.derate.gainGNC/breve_controller.py:268. The gates are the per-block on/off switches for the gain derate.
  • Consumer 2 (applied): arm_breve_gains / base_breve_gains return γ·D, γ·KGNC/breve_controller.py:329 and :334; the working RHS builds K_breve/D_breve from these derated blocks — GNC/breve_controller.py:382. The reduced acceleration v_breve_dot then solves against the same derated DGNC/breve_controller.py:454.
  • Consumer 2 (EE wrench): compute_omega_e_oplus forms P = −JᵀK x̃ with the (γ-derated) arm KGNC/breve_controller.py:276.
  • Anti-windup gate: the EE pose integral is skipped when conditioning_scale(s_min_G) < arm.integral.scale_gateGNC/breve_controller.py:195 (inside update_x_e_integralGNC/breve_controller.py:174). Links ee_pose_error_antiwindup.
  • Consumer 3 — speed derate (the rejected mechanism, still wired in guidance): derate_desired_by_gamma scales the CoM command v_c·γ, a_c·γ², ω_b·γGNC/base_guidance.py:141; gated on the same Option-A flag at GNC/base_guidance.py:131. The near-singular attitude blend blend_base_goal_by_conditioning reads the same γ — GNC/base_guidance.py:151.

Evidence

  • Diagnostics record the live ramp per step as gamma_scale/cond_scale in the controller’s conditioning package — GNC/breve_controller.py:510 — so a run’s γ history is in the logs (read via the signal_measurement facade, not hand-rolled).
  • Rationale, the impedance-vs-speed A/B, and the cruise-lag-collapse finding live in generated_reports/math/derate_impedance_vs_speed.md (cited from current_sota.md §6.3) and GNC/INSIGHTS.md [derate].
  • Option-A collapse (one ramp, not two): blend_base_goal_by_conditioning once drove off a separate s_min_J/J⁺ axis and now reads the same s_min_G (per F4: Γ singular iff J_ν_e is) — see base_guidance > Footguns.

Footguns

Use gain (impedance) derate, NOT speed derate

Speed-derate (γ·ν_e, throttling the command) collapses the cruise-lag floor to ~1e-5 and over-extends
the arm — it cannot beat the steady-state lag growth. The endorsed mechanism scales the gains and the
base wrench
by γ: the restoring wrench is γ-invariant, so the equilibrium relaxes to a larger,
well-conditioned lag x̃_ss → (1/γ) x̃_ss and the arm goes slack rather than driving into the wall.
The slowdown is emergent, not commanded. (GNC/INSIGHTS.md [derate]; current_sota.md §6.3.)

One ramp, many consumers — change conditioning_scale and you move everything

conditioning_scale (GNC/breve_core_controller.py:80) feeds the base wrench, both gain gates, the EE
wrench, the integral anti-windup gate, and the guidance speed-derate/blend. Editing the ramp or its
sigma is a system-wide behaviour change — verify against all 5 baselines (max_abs_diff = 0.000e+00).

The speed-derate path is still wired but is NOT the headline mechanism

derate_desired_by_gamma (GNC/base_guidance.py:141) survives in guidance and runs when conditioning is
on; the live operating point relies on the gain derate. Don’t read the presence of the speed-derate
code as endorsement — see the danger callout. The legacy controller.com.speed_derating.enable gate is
inert config; the live gate is controller.base.conditioning.enable (Option A). (GNC/INSIGHTS.md [derate])

Distinct from Tikhonov Γ-regularization

This page is the global multiplier γ on gains / base wrench / command. It is not tikhonov_regularization,
which is the inverse-level squared damping added inside the Γ (and three-tier J⊕) solve. They are
different layers of the derate stack (current_sota.md §6.2 vs §6.3) and stack independently.

Equations & references

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

Impedance-derate ramp (scales gains, not the command) — §6.3, eq (6.4):

Why it’s emergent, not a throttle: softening relocates the cruise-lag floor (eq 4.14) to §4.5, eq (4.14):

References:

  • current_sota > 6 §6.2 — Layer 1, Tikhonov Γ regularization (the inverse-level damping — distinct layer).
  • current_sota > 6 §6.3 — Layer 2, impedance derate γ(σ_G) (this page): K_e,D_e → γK_e,γD_e, τ_b⊕ → γτ_b⊕, “impedance derate, not speed derate.” Symbol γ(σ_G)∈[σ_crit,1] in the §0.4 table.
  • current_sota > 6 §6.4 — Layer 3, damped three-tier J⊕ inverse.
  • eq↔code map: generated_reports/GNC/cross_check.md. Derivation + cascade A/B: generated_reports/math/derate_impedance_vs_speed.md.

tikhonov_regularization · ee_pose_error_antiwindup · circumcentroidal_control · breve_controller · breve_core_controller · base_guidance · robot · sampling · terminology