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 rampconditioning_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 ofK/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_scaleand the γ-scaled base torque. - breve_controller — the per-block γ gates, the
K/Dimpedance 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_Gis logged by robot.) - Consumer 1 — base attitude wrench (impedance):
compute_tau_b_oplusmultiplies the PD torque by γ when conditioning is on —GNC/breve_core_controller.py:92. - Consumer 2 — arm/base gain gates:
arm_gain_scalereturns γ iffbase.conditioning.enable and arm.derate.gain—GNC/breve_controller.py:262;base_gain_scalereturns γ iffbase.derate.gain—GNC/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_gainsreturnγ·D, γ·K—GNC/breve_controller.py:329and:334; the working RHS buildsK_breve/D_brevefrom these derated blocks —GNC/breve_controller.py:382. The reduced accelerationv_breve_dotthen solves against the same deratedD—GNC/breve_controller.py:454. - Consumer 2 (EE wrench):
compute_omega_e_oplusformsP = −JᵀK x̃with the (γ-derated) armK—GNC/breve_controller.py:276. - Anti-windup gate: the EE pose integral is skipped when
conditioning_scale(s_min_G) < arm.integral.scale_gate—GNC/breve_controller.py:195(insideupdate_x_e_integral—GNC/breve_controller.py:174). Links ee_pose_error_antiwindup. - Consumer 3 — speed derate (the rejected mechanism, still wired in guidance):
derate_desired_by_gammascales the CoM commandv_c·γ, a_c·γ², ω_b·γ—GNC/base_guidance.py:141; gated on the same Option-A flag atGNC/base_guidance.py:131. The near-singular attitude blendblend_base_goal_by_conditioningreads the same γ —GNC/base_guidance.py:151.
Evidence
- Diagnostics record the live ramp per step as
gamma_scale/cond_scalein 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 fromcurrent_sota.md§6.3) andGNC/INSIGHTS.md[derate]. - Option-A collapse (one ramp, not two):
blend_base_goal_by_conditioningonce drove off a separates_min_J/J⁺axis and now reads the sames_min_G(per F4:Γsingular iffJ_ν_eis) — 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 lagx̃_ss → (1/γ) x̃_ssand 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_scaleand 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
sigmais 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 legacycontroller.com.speed_derating.enablegate is
inert config; the live gate iscontroller.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-tierJ⊕) 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.
Related
tikhonov_regularization · ee_pose_error_antiwindup · circumcentroidal_control · breve_controller · breve_core_controller · base_guidance · robot · sampling · terminology