Skip to content

WP16: Digital Twin Phase 1 - lumped-mass tether dynamics, twin-to-twin sync, controller MC (T7-focused) - #33

Merged
HeliCorgi merged 5 commits into
masterfrom
wp16-digital-twin
Jul 23, 2026
Merged

WP16: Digital Twin Phase 1 - lumped-mass tether dynamics, twin-to-twin sync, controller MC (T7-focused)#33
HeliCorgi merged 5 commits into
masterfrom
wp16-digital-twin

Conversation

@HeliCorgi

Copy link
Copy Markdown
Owner

Owner-directed WP16 (spec WP list extended by owner instruction - sec.10 disclosure). TRL unchanged; T7 stays OPEN; every claim tagged [DT-v1: lumped-mass tether, aligned dipole, twin-to-twin]; no operational-twin claims (no real asset exists - this demonstrates the assimilation machinery).

What this adds: N=8 lumped-mass tether (slack-capable spring-dashpot, Hill-frame gravity gradient, WP13 aligned-dipole Lorentz forcing, RK4 with documented chain-eigenfrequency margin, energy audit, divergence guards), twin-to-twin sync layer (perturbed truth twin + 4-state Joseph-form EKF, duty-schedule pushback), adsc_twin MC with per-status divergence accounting, 2 new ctest suites (22/22 green on gcc+clang).

Findings (in-model, honest): (1) fixed 75% duty: 12.0% [8.2%, 17.2%] non-converged vs 0.0% for phase-gated/constant - naive duty cycling can excite libration; the eta_libration knob is bookkeeping, not a stability mechanism (T7 narrative completed, still OPEN); (2) c_hat (effective pitch damping) is weakly observable - sensitivity ratio I_eff:c ~ 2.8e6:1, test restructured to observable quantities with the filter's honest uncertainty asserted (variance must NOT collapse); (3) dumbbell limit agrees with the T7 1-DOF reference with a documented RK4-vs-DOP853 model-family offset.

Defect-kill record (pre-merge): EnergySpike guard false positives (FP round-off + slack-kink; recalibrated energy-scale-relative, guard-not-dead verified), duplicate SyncReport (renamed - the mission.hpp twin was an unrelated WP2 concept, honest deviation from the merge instruction), ambiguous overload, MC silent-truncation accounting, unobservable-equivalence test premise, -Werror unused variable. Independent python cross-checks at every stage; final DT-honesty adversarial pass: zero blockers.

Sanitizer job: --timeout 900 + wp9_flightlike excluded (timing test meaningless under ASan; pre-existing 30+min hang documented).

🤖 Generated with Claude Code

HeliCorgi and others added 5 commits July 23, 2026 20:48
… sync (C++)

Owner-directed WP16 (T7-focused DT extension; spec WP list extended by owner
instruction, disclosed per sec.10). TRL unchanged; T7 stays OPEN - controllers
are PROPOSALS evaluated in-model; every claim tagged
[DT-v1: lumped-mass tether, aligned dipole, twin-to-twin].

- NEW tether module (include/adsc/tether.hpp, src/tether.cpp): N=8 lumped-mass
  bead chain, spring-dashpot segments with slack (no compression), Hill-frame
  gravity gradient, per-segment Lorentz force reusing the WP13 aligned-dipole
  constants (|cos i| Lenz drag), capped motional-EMF current. RK4 fixed step
  with the chain-maximum eigenfrequency stability margin (~8x) documented;
  energy audit (Jacobi-style invariant, drift reported per orbit); divergence
  guards (angle/velocity/overstrain/energy-spike). EnergySpike guard is
  energy-scale-calibrated (e_floor = 1e-9 mu L^2 n^2, absolute gate, warmup,
  EMA seeded above FP noise) after the pre-push adversarial review reproduced
  false positives on round-off and benign sub-mm slack-kink crossings; a
  forced-blowup case verifies the guard is not dead. Controllers: C1
  phase-gated current (energy-pumping cutoff), C2 fixed duty (the honest
  successor comparison for the eta_libration bookkeeping knob).
- NEW twin sync layer (include/adsc/twin.hpp, src/twin.cpp): truth-twin with
  perturbed {EA, damping, current efficiency} + noisy angle/tension sensors;
  4-state EKF [theta, thetadot, I_eff, c_hat] (Joseph-form, house style);
  Virtual-to-Real = duty-schedule pushback; gamma documented honestly as a
  TUNABLE assumed pitch-damping absorbed by q_c_hat (NOT a faithful reduction
  of the axial dashpot - review finding).
- NEW adsc_twin binary (src/main_twin.cpp): dumbbell-limit validation vs the
  T7 study 1-DOF table (eps=0.106 bounded [3,20] deg with the RK4-vs-DOP853
  model-family offset noted; eps=0.80 tumbles o45 in [0.02,0.5] orbit) + MC
  (N=200 default, deterministic SplitMix64) over tether dispersions with
  PER-STATUS divergence accounting (Wilson CIs; truncated runs excluded from
  clean-pool percentiles, n_clean reported) -> generated/wp16_twin.{csv,md}
  + wp16_twin_schema.md.
- NEW tests/test_tether.cpp + tests/test_twin.cpp (ctest tether, twin):
  energy conservation, slack never pushes, dumbbell-limit vs T7 reference,
  guard trip/not-dead cases, EKF covariance health + convergence, determinism.
- CMakeLists: 3 targets; tools/regenerate_all.sh: adsc_twin step, labels
  renumbered. Evidence pack regenerated (new PLACEHOLDER inventory).

Round-1 note: wp16 artifacts are emitted by CI and committed next (the
documented no-local-toolchain flow). Independent numeric cross-check
(python replica) verified the equations, tolerances, guard behavior, and
EKF Jacobians pre-push; adversarial review PASS after the guard repair.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…chema_md overload (round-1 CI compile errors)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…al c_true) - restructured to observable quantities + honest weak-observability finding

Test #14 (block 2 of tests/test_twin.cpp) required the EKF's c_hat to converge
to the truth twin's axial dashpot c_true. That is an unobservable equivalence:
c_hat is the reduced model's TUNABLE effective pitch-damping (gamma=c_hat/(2*mu)),
a different physical quantity from the per-segment AXIAL dashpot c_true, which
produces ~zero direct pitch damping in near-rigid rotation. A from-scratch
Python cross-check (_tasks_local/wp16_xcheck.py) confirms it two ways: the truth
twin's free-decay rate is ~10 orders below gamma, and the angle measurement is
~2.7e6x more sensitive (noise-normalized) to i_eff_true than to c_true; the
tension channel that does respond to c_true is not connected to c_hat by the
measurement model (H(1,3)=0). So c_hat has no data-driven reason to reach c_true
- converging would be luck, not correctness.

Restructured block 2 to assert observable quantities and report c_hat honestly:
  - I_eff (strongly observable via Lorentz-torque magnitude) must improve on the
    generic prior AND land < 0.30 (replica ~0.16-0.21; a <0.15 pin was checked
    against the replica and rejected as not achievable);
  - theta_rmse < 2.0 deg, median NIS finite, covariance symmetric+PD every step;
  - c_hat only required to stay FINITE, BOUNDED (|c_hat| < 0.5, ~10x prior), and
    with its variance NOT collapsing to spurious certainty (min P(3,3) > 1e-4) -
    the filter must know it does not know c_hat.

TwinSyncReport (twin.hpp) gains final_c_hat/final_I_eff/min_c_hat_variance/
cov_spd_all_steps, populated in run_twin_sync (twin.cpp). Documented the
weak-observability finding in the TwinSyncReport comment, the emitted
wp16_twin_schema.md twin_sync section, and the c_hat_rel_err row note
(src/main_twin.cpp). Bounds are honest replica-derived slack bounds, not
tuned-to-green pins. [DT-v1]

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lears -Werror=unused-variable

The restructured test #14 dropped the old c_err0 computation that consumed
c_hat_guess0, leaving it referenced only in a comment. Fold it into the
bounded-c_hat assert so the "within 10x the prior guess" bound is
self-documenting and the variable is used.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Byte-for-byte from the green CI run's artifact upload (documented
no-local-toolchain flow): dumbbell-limit validation vs the T7 1-DOF
reference, controller-comparison MC with per-status divergence accounting
(Wilson CIs, clean-pool percentiles, n_clean), twin-sync report incl. the
weak-observability note [DT-v1].

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@HeliCorgi
HeliCorgi merged commit 0b17f1b into master Jul 23, 2026
12 checks passed
@HeliCorgi
HeliCorgi deleted the wp16-digital-twin branch July 23, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant