longTauGnssCoupling: engine wiring for the coast-cap (--coast-cap, default off)#85
Closed
bobvan wants to merge 1 commit into
Closed
longTauGnssCoupling: engine wiring for the coast-cap (--coast-cap, default off)#85bobvan wants to merge 1 commit into
bobvan wants to merge 1 commit into
Conversation
…fault off) Feeds the scheduler-side coast-cap (PR #84) with real inputs so the adaptive coast is bounded by the DO's STOCHASTIC wander on hardware, targeting the tau~64-256s long-tau hump. Three parts: - do_state.derive_coast_tdev_from_char: log-log power-law fit of the DO's characterized freerun TDEV curve (tdev_ns_by_tau_s) -> (tdev_ref_ns, tdev_slope, 1.0) for coast_cap_from_tdev. - DOFreqEst.project_p22_coast(max_tau): predict-only P[2,2] over the coast (one O(max_tau) projection/epoch, precomputed table -> the coast_cap_from_p22 closure looks it up; addresses charlie's perf nit). Honest only with Q-from-char (PR #83). - engine: when --coast-cap, derive coast_tdev from the DO char -> DisciplineScheduler ctor; each epoch build the p22_at_tau closure from project_p22_coast and pass it to compute_adaptive_interval. --coast-cap-k-sigma sets the confidence factor. Scope: wires the COAST-CAP (tdev + p22). The graded taper (distance_to_lock) is left for the disciplineModeFsm work, which defines the convergence metric + thresholds. Only the main DOFreqEst servo path is wired; the CM_TDC path is unchanged. DEFAULT-OFF: --coast-cap absent -> coast_tdev=None + no per-call args -> compute_adaptive_interval byte-identical to today. Validate in closedLoopServoSim before enabling on hardware. 11 new tests (TDEV power-law fit incl WFM/RWFM/skips/source-pref; project_p22_coast quadratic-from-constant-freq, RWFM super-linear, length/index0/zero-tau). Full suite 1428 pass. Both flags verified in --help. Stacked on PR #84 (scheduler wiring); runtime-depends on PR #83 (honest Q[3,3]) for the p22 path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
Owner
Author
|
Superseded by #86 (longTau stack squashed into one PR per Bob, 2026-05-29). Engine wiring is included there. Closing tip-first to avoid the stacked-PR auto-close gotcha. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Feeds the scheduler-side coast-cap (#84) with real inputs so the adaptive coast is bounded by the DO's stochastic wander on hardware — the tau~64–256 s hump fix end-to-end. Behind
--coast-cap, default off.Stacked on #84 (scheduler API). Runtime-depends on #83 (honest Q[3,3]) for the
p22path.Three parts:
do_state.derive_coast_tdev_from_char— log-log power-law fit of the DO's characterized freerun TDEV curve (tdev_ns_by_tau_s) →(tdev_ref_ns, tdev_slope, 1.0)forcoast_cap_from_tdev.DOFreqEst.project_p22_coast(max_tau)— predict-only P[2,2] over the coast as a precomputed table (one O(max_tau) projection/epoch; thecoast_cap_from_p22closure looks it up — addresses Charlie's perf nit). Honest only with Q-from-char (qFromCharPerActuator: derive Q[3,3] (sigma_do_freq) from char ADEV #83).--coast-cap: derivecoast_tdevfrom the DO char →DisciplineSchedulerctor; each epoch build thep22_at_tauclosure fromproject_p22_coastand pass it tocompute_adaptive_interval.--coast-cap-k-sigmasets the confidence factor.Scope
distance_to_lock) is deferred to the disciplineModeFsm work, which defines the convergence metric + thresholds.--coast-capabsent.Test plan
project_p22_coastquadratic-from-constant-freq, RWFM super-linear, length/index0/zero-τ). Full suite 1428 passed. Both flags verified in--help.--coast-capon vs off — confirm the tau~64–256 s hump drops and the >60 s coast no longer diverges.Merge order: #83 + #80 → #84 → this → sim A/B → lab.
🤖 Generated with Claude Code