Skip to content

Audit held-yaw step instability and gate continuous rebaseline - #635

Merged
cmccomb merged 6 commits into
masterfrom
codex/held-yaw-620
Oct 23, 2026
Merged

cmccomb merged 6 commits into
masterfrom
codex/held-yaw-620

Conversation

@cmccomb

@cmccomb cmccomb commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Scope

This is an evidence and rebaseline increment toward #620. It does not close the published one-degree held-heading gap or change its qualified status.

  • Extend the pinned R2025b 0.01/0.005/0.0025 s source study to phase seed 2, restore the input after each run, and report heading events, yaw, speed, PTO torque, work, and matched wave samples for all three seeds.
  • Advance each 250 s physical Python trajectory independently from the pinned HDF5 and generated phases at 0.0025 s, archive its raw trace, and compare it with the source without prescribed states, forces, or event times.
  • Predeclare full-duration source-stability limits and add a separate 0.01/0.005 s continuous-heading source gate pinned to the exact corrected Applications commit proposed upstream.
  • Run the public physical Python path for the same three full-duration continuous-heading seas at 0.005 s and require yaw, speed, PTO torque, wave, and work parity with each refined source trace. Both source and physical outcomes are reported for every seed even when a gate fails.

Measured seed-2 result

The local published-step MATLAB rerun reproduces the archived seed-2 trajectory to numerical precision. At 0.01/0.005/0.0025 s, MATLAB self-selected heading updates are 52/51/39 and PTO work is 1990.936/2045.774/1521.927 J. The half-to-quarter source change is 0.125657 rad yaw, 0.024061 rad/s speed, 2887.33 N m torque, and -25.606% work, with identical waves at common samples.

At 0.0025 s, independent Python selects 57 events and absorbs 2681.039 J, 76.161% above the MATLAB quarter-step work. A further independent Python refinement to 0.00125 s absorbs 1746.504 J (-34.857%), so its held-heading path also lacks demonstrated step convergence. The archived seed-1 and seed-3 source refinements likewise fail the predeclared limits. PARITY.md records all three quarter-step physical comparisons and keeps the case qualified.

Verification

  • Local R2025b seed-2 source runs at all three steps; published-step yaw agrees with the archived reference within 4.1e-15 rad.

  • Local public physical runs for seeds 1, 2, and 3 at 0.0025 s, plus seed 2 at 0.00125 s.

  • tools/oswec_held_yaw_step_audit.py reproduced the archived seed-1 and seed-3 source refinements and evaluated the new seed-2 run.

  • The three-seed held-heading CI audit completed and uploaded all source and physical traces. Every source step pair fails its predeclared stability gate; the audit jobs succeed because this workflow records evidence rather than promoting parity. The separate corrected continuous-heading CI gate now passes for all three seeds at the PR head.

  • Independently advanced local 0.005 s physical runs for all three corrected seas finished from the pinned HDF5 and generated phases. Compared at common samples with the archived 0.01 s continuous-source traces, their largest yaw, speed, torque, wave, and work gaps are 1.26e-5 rad, 2.88e-6 rad/s, 0.345 N m, 8.98e-14 m, and 0.00352%. These cross-step numbers are provisional; the CI gate will compare against matched 0.005 s source trajectories.

  • The first corrected-source CI run produced complete MATLAB 0.01/0.005 s traces for all three seeds. Every uploaded artifact passes the exact repaired source audit with --enforce, and the full-duration public physical pytest passes against each matched 0.005 s trace. That CI run reported failure because a NumPy boolean JSON serialization error prevented its audit summaries from being written. Commit fd5a8f32 fixes the error; the fresh three-seed CI run passed all source-stability and matched-source physical gates at the PR head.

  • An independent local R2025b seed-2 run at 0.005 s reproduces the CI source result to numerical precision. The three-seed source self-change and independently advanced Python versus matched source gaps are:

    Seed Source yaw / torque / work change Physical yaw / torque / work gap
    1 2.07e-5 rad / 0.572 N m / +0.00129% 8.19e-6 rad / 0.227 N m / -0.000671%
    2 1.83e-5 rad / 0.439 N m / -0.00654% 8.27e-6 rad / 0.199 N m / +0.00302%
    3 1.07e-5 rad / 0.215 N m / +0.0000107% 4.14e-6 rad / 0.0815 N m / -0.00000428%

    Maximum source speed self-change is 4.77e-6 rad/s; maximum physical speed gap is 1.89e-6 rad/s. Every source pair sees the same wave at common samples, and the maximum physical wave gap is below 1e-13 m.

  • The same two-line continuous-heading change is now maintained as a patch in wec-sim-python and is being rerun against the unchanged pinned Applications input in PR #640. The published one-degree case remains qualified.

The corrected continuous-heading case now has a stable source and passes the independently advanced public physical path for all three full-duration seeds in durable CI. It has no discrete held-heading events: the source and Python both update coefficients continuously. The original one-degree held-heading case remains an auditable numerical regression and the OSWEC parity badge remains qualified while the upstream correction is under review.

@cmccomb
cmccomb marked this pull request as ready for review October 23, 2026 00:43
@cmccomb
cmccomb merged commit e7a0b1c into master Oct 23, 2026
12 of 15 checks passed
@cmccomb
cmccomb deleted the codex/held-yaw-620 branch October 23, 2026 01:12
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