Wavefront ControlFEATURED STUDYPart I: Diag AR(4..64) | Part II: Cross-Mode Block-EOFBlock-EOF(128,8): Final Vis SR 81.1%Stg1 Vis SR 77.1% (+3.5 pp vs AR16)WFE 56.0 nmDiag AR(16) 81.0%Warm AR(32)*/AR(64)* 81.1/81.2%0 RT Timeouts

Hardware-in-the-loop comparison of Part I per-mode diagonal AR(4..64) and Part II full cross-mode transition-matrix Block-EOF(B=64/128, P=8) predictive controllers on Subaru AO3k + SCExAO + Lyot Coronagraph + LLOWFS.

Referenced Simulation Reports

Archived study runs (individual simulation pages retired; all plots, tables, and numerical findings preserved below):

ao3k_scexao_lowfs_closed ao3k_scexao_predictive_ar4 ao3k_scexao_predictive_ar8 ao3k_scexao_predictive_ar16 ao3k_scexao_predictive_ar32 ao3k_scexao_predictive_ar32_n4096 ao3k_scexao_predictive_ar64 ao3k_scexao_predictive_ar64_n4096 ao3k_scexao_predictive_ar16_w14s ao3k_scexao_predictive_ar16_matched_w14s ao3k_scexao_predictive_eof64_p8 ao3k_scexao_predictive_eof128_p8

Predictive Control Report: Per-Mode Diagonal AR(4..64) & Full Cross-Mode Block-EOF (VAR) Study

Controlled hardware-in-the-loop study on the cascaded Subaru 7.95 m AO3k + SCExAO + Lyot Coronagraph + Reflective-Lyot LLOWFS closed-loop benchmark comparing two generations of CACAO pseudo-open-loop (PSOL) predictive control:

Executive Findings — Both Diagonal AR(16) and Cross-Mode Block-EOF(B=128, P=8) Have Distinct, Complementary Roles:

  1. Per-Mode Diagonal AR(P) (B = 1, Part I): At rapid online startup (N_min = 256, N_train = 2048), Diagonal AR(16) is the clear Pareto optimum across AR(4)..AR(64): 81.03% Vis SR (+8.64 pp vs. Modal Integrator), 95.35% H SR, 56.1 nm final WFE, zero Subaru V-spider petal slips through a 1.85 um gust, at 24 us / frame and 32.6% CPU. Extending diagonal order to warm-start AR(32)* / AR(64)* (N = 4096) adds only +0.17 pp Vis SR at 14.1x CPU.
  1. Full Cross-Mode Transition Matrix Block-EOF(B=128, P=8) (Part II): Unlocking cross-mode advection coupling delivers a qualitative leap impossible for any per-mode diagonal AR(P) order. On 20 s walk-forward telemetry, Block-EOF beats diagonal AR(16) on 26 / 26 spatial blocks (Stage-1 Block 0: +81.6% vs. +45.6%) at ~3x lower L2 noise gain. In confounder-free closed loop on identical t = 14–19 s unseen turbulence (reg1 = 1e-4, reg2 = 1e-2, N_train = 16k / 32k), Block-EOF(B=128, P=8) cuts Stage-1 (AO3k) WFE by -5.6 nm (67.8 -> 62.2 nm, -15.7% variance), boosts Stage-1 Vis SR by +3.52 pp (73.63% -> 77.15%), reaches 81.06% Final Vis SR / 95.36% H SR (56.0 nm), deepens H-band coronagraphic raw contrast by 13.9% @ 15 l/D and 12.7% @ 20 l/D (-25.0% 5-sigma planet contrast), and cuts LLOWFS DM3 stroke by -40.6% (3.7 -> 2.2 nm) — running in 88–108 us / frame (102% CPU = 1.0 core, 0 RT timeouts) via automatic AR(16) cold-start bootstrapping.

1. Study Design & PSOL Predictive Control Architecture

All simulations execute real native MILK/CACAO real-time daemons in isolated /dev/shm/cacao_* sandboxes coupled to the GPU-fused 8.0 kHz (dt = 125 us) polychromatic Subaru optical bench (ao3k_scexao.bench, 0.60" Maunakea seeing, mV = mH = 6.0, 20% throughput, identical response matrices loaded from _work/ao3k_scexao_rm, deterministic atmospheric phase screen realization). To support both studies cleanly, we expanded ARPF_MAX_ORDER from 32 to 64 in mkARPF.c/applyARPF.c and implemented native real-time cross-mode Block-EOF daemons AOloopControl_PredictiveControl_mkEOFPF.c and _applyEOFPF.c:

flowchart LR
    WFS["PyWFS + mfilt<br/>modevalWFS & modevalDM"] --> PSOL["PSOL Reconstructor<br/>modevalOL = WFSfact*WFS - DM(t-d)"]
    PSOL --> BUFF["Double Buffer (256 fr)<br/>aolN_modevalOL_buff"]
    BUFF --> MK["Part I: mkARPF (Diag AR(P), B=1)<br/>Part II: mkEOFPF (Block-EOF VAR(P), B=64/128)"]
    MK --> MAT["Filter Matrix<br/>aolN_arPFmat [M x P] or<br/>aolN_eofPFmat [M x (P*B)]"]
    PSOL --> APP["Real-Time Inference (CPU SIMD/OMP)<br/>applyARPF (10-70 us) / applyEOFPF (76-108 us)"]
    MAT --> APP
    APP --> MIX["mfilt Blender (mix = 0.90)<br/>dmC = mix*(zpo - PF) + (1-mix)*Integ"]

2. Part I — Per-Mode Diagonal AR(4..64): Headline Optical & Coronagraphic Comparison

Archival Note: The 12 individual Nov-2026 legacy simulation pages (0.60" stationary frozen-flow, RC DM) analyzed in Parts I & II were retired from the live simulation catalog to keep it focused on current ALPAO plate-DM & realistic-perturbation runs. All diagnostic figures, summary tables, and machine-readable datasets (predictive_control_comparison.json, predictive_control_summary.csv) are preserved in full below.

Controller N_min / N_train Mem. Horizon (S1 / S2) Post-AO3k WFE (Tot / Dyn) Post-SCExAO WFE (Tot / Dyn) S1 Vis SR Final Vis SR Final H SR Coro Leak Planet 3–10 l/D 5-sig @ 5 l/D Archived Run ID
Modal Integrator — — 521.8 / 503.2 nm 69.2 / 67.4 nm 24.18% 72.40% 93.02% 3.60% 1.32e-04 6.47e-04 ao3k_scexao_lowfs_closed
PSOL AR(4) 256 / 2048 4 ms / 2 ms 451.3 / 228.7 nm 70.3 / 63.3 nm 32.63% 72.66% 92.91% 3.48% 1.40e-04 6.94e-04 ao3k_scexao_predictive_ar4
PSOL AR(8) 256 / 2048 8 ms / 4 ms 114.5 / 112.6 nm 62.1 / 61.4 nm 67.90% 78.29% 94.27% 3.18% 1.23e-04 6.15e-04 ao3k_scexao_predictive_ar8
PSOL AR(16) 256 / 2048 16 ms / 8 ms 70.4 / 69.8 nm 56.1 / 55.6 nm 71.95% 81.03% 95.35% 3.00% 1.06e-04 6.23e-04 ao3k_scexao_predictive_ar16
PSOL AR(32) 256 / 2048 32 ms / 16 ms 493.7 / 70.6 nm 65.0 / 59.1 nm 38.77% 76.27% 93.99% 3.18% 1.16e-04 6.51e-04 ao3k_scexao_predictive_ar32
**PSOL AR(32)* (N=1024/4096)** 1024 / 4096 32 ms / 16 ms 69.8 / 69.0 nm 56.2 / 55.6 nm 72.09% 81.15% 95.41% 2.95% 1.05e-04 6.23e-04 ao3k_scexao_predictive_ar32_n4096
PSOL AR(64) 256 / 2048 64 ms / 32 ms 493.9 / 71.7 nm 62.9 / 57.7 nm 38.73% 77.08% 94.31% 3.18% 1.12e-04 6.48e-04 ao3k_scexao_predictive_ar64
**PSOL AR(64)* (N=1024/4096)** 1024 / 4096 64 ms / 32 ms 70.8 / 70.0 nm 56.1 / 55.4 nm 71.47% 81.20% 95.42% 2.92% 1.05e-04 6.22e-04 ao3k_scexao_predictive_ar64_n4096
Interactive Optical & Coronagraphic Performance vs AR Order (2x3)
↓ Static PNG
Optical & Coronagraphic Performance vs AR Order (2x3)

Coronagraphic Planet Contrast & 5-Sigma Speckle Profile Breakdown (H-Band, 3.0 l/D Lyot Mask)

Controller 3 l/D Planet 5 l/D Planet 10 l/D Planet 15 l/D Planet 20 l/D Planet 5-sig @ 15 l/D 5-sig @ 20 l/D LLOWFS DM3 RMS
Integ. 6.31e-04 3.69e-04 4.45e-05 3.49e-05 2.77e-05 9.84e-05 4.47e-05 32.3 nm
AR(4) 6.35e-04 3.80e-04 4.67e-05 2.76e-05 2.32e-05 2.87e-05 4.08e-05 14.1 nm
AR(8) 6.15e-04 3.51e-04 4.24e-05 2.49e-05 1.86e-05 2.12e-05 1.86e-05 84.3 nm
AR(16) 5.78e-04 3.14e-04 4.01e-05 2.38e-05 1.74e-05 1.84e-05 1.33e-05 5.2 nm
AR(32) 5.98e-04 3.38e-04 4.03e-05 2.36e-05 1.93e-05 2.34e-05 3.35e-05 7.8 nm
AR(32)* 5.77e-04 3.14e-04 3.93e-05 2.29e-05 1.64e-05 1.77e-05 1.61e-05 4.4 nm
AR(64) 5.89e-04 3.28e-04 4.03e-05 2.46e-05 1.97e-05 2.30e-05 3.12e-05 10.4 nm
AR(64)* 5.77e-04 3.14e-04 3.87e-05 2.21e-05 1.59e-05 1.78e-05 1.61e-05 2.8 nm

Key coronagraphic takeaways:

3. Temporal Evolution, Peak-Gust Resilience & Subaru V-Spider Petal Physics

Because milkatmturb replays the exact same deterministic multi-layer Maunakea turbulence realization (raw WFE = 994.7–995.0 nm across all five default AR runs, with a major 1845 nm turbulence gust arriving at t = 4.4–4.9 s), the time series exposes a critical nonlinear stability boundary on the Subaru Nasmyth-IR pupil (four pupil islands separated by 51.75 deg V-spiders):

Controller Full Med. WFE (S1 / Fin) Early [0–1 s] (S1 / Fin) Steady [1.5–4.5 s] (S1 / Fin, P95) Peak Gust [4.5–5.0 s] (S1 / Fin, Max) Stg-1 Island ΔPetal PTV Petal Status
Integ. 475.9 / 66.1 nm 99.9 / 57.2 nm 533.5 / 70.4 nm (99.0) 570.8 / 78.3 nm (116.2) 377 nm Slips at t~1.1 s (large lag)
AR(4) 483.2 / 63.7 nm 175.9 / 72.1 nm 492.0 / 64.0 nm (71.3) 483.1 / 68.7 nm (126.2) 926 nm Slips -1 λ_J on Right island @ t~0.7 s
AR(8) 70.2 / 55.3 nm 72.9 / 55.9 nm 72.5 / 56.0 nm (63.8) 218.3 / 92.2 nm (204.1) 47 nm Locked 0–4.7 s; slips @ 1.85 µm gust
AR(16) 68.2 / 54.9 nm 71.4 / 55.6 nm 68.9 / 55.6 nm (63.5) 77.9 / 61.7 nm (70.9) 12 nm Zero petal slips across full 5.0 s
AR(32) 493.9 / 60.4 nm 488.6 / 76.8 nm 496.5 / 59.7 nm (67.0) 489.0 / 66.2 nm (76.2) 1143 nm Slips +1 λ_J on Left island at cold start
AR(32)* 67.6 / 54.8 nm 67.1 / 55.8 nm 69.2 / 55.9 nm (64.6) 76.6 / 57.4 nm (69.2) 15 nm Zero petal slips across full 5.0 s
AR(64) 494.6 / 60.2 nm 488.8 / 70.2 nm 497.1 / 59.7 nm (67.0) 487.1 / 65.7 nm (75.8) 1143 nm Slips +1 λ_J on Left island at cold start
AR(64)* 68.4 / 54.7 nm 68.3 / 55.9 nm 70.1 / 55.8 nm (64.5) 77.7 / 57.1 nm (69.5) 15 nm Zero petal slips across full 5.0 s
Temporal Evolution and Subaru V-Spider Petal OPD Maps (2x3)
Temporal Evolution and Subaru V-Spider Petal OPD Maps (2x3)

Notice how cleanly the 2D mean Stage-1 pupil maps diagnose each failure mode:

4. Learned AR(P) Filter Anatomy: Why AR(16) Unlocks Low-Order Phase Lead

Inspecting the actual converged aol1_arPFmat.fits and aol2_arPFmat.fits weight matrices reveals the exact mathematical mechanism governing AR(4) through AR(64) — the Cauchy–Schwarz tradeoff between phase lead and L2 noise amplification:

Controller Stg-1 Low-Order ‖w‖₂² Stg-1 Low-Order DC Stg-1 Eff. Lead -Σ k·w_k Stg-1 Tail Σ_{k≥8} w_k Stg-1 Med ‖w‖₂² Stg-2 Low-Order Eff. Lead Stg-1 / Stg-2 Lag ΔVar
AR(4) 0.699 0.985 -0.11 fr +0.000 0.478 -0.50 fr 19.5% / 20.0%
AR(8) 0.640 0.983 +1.04 fr +0.000 0.488 +0.13 fr 24.1% / 24.8%
AR(16) 0.534 0.983 +1.52 fr -0.315 0.486 +0.76 fr 29.4% / 28.1%
AR(32) 0.462 0.984 +1.55 fr -0.348 0.377 -0.66 fr 34.9% / 26.9%
AR(32)* 0.460 0.984 +1.49 fr -0.337 0.422 +0.77 fr 32.9% / 29.0%
AR(64) 0.419 0.983 +1.55 fr -0.329 0.430 -2.45 fr 33.7% / 29.4%
AR(64)* 0.468 0.983 +1.87 fr -0.367 0.365 +0.62 fr 36.3% / 28.8%
Learned AR Filter Impulse Responses, Cauchy-Schwarz Lead & Freq Response (2x2)
Learned AR Filter Impulse Responses, Cauchy-Schwarz Lead & Freq Response (2x2)

Why this single physical mechanism governs the entire AR(4)–AR(64) sweep:

  1. AR(4) is trapped by the L2 noise-gain constraint: To extrapolate a smooth low-order atmospheric mode forward by 2.40 frames using only 4 taps (0..3 ms), a finite-difference extrapolator requires steep opposing weights whose L2 norm exceeds maxnorm2 = 1.35. Regularization damping therefore forces AR(4) to w_lo = [0.66, 0.38, 0.10, -0.16] — an effective phase lead of -0.11 fr (it actually lags zero-order hold!) despite carrying the highest noise gain (||w||_2^2 = 0.699).
  2. AR(8) reaches half-compensation: Extending to 8 taps unlocks negative differentiating weights on taps k = 5..7, lifting effective lead to +1.04 fr while trimming ||w||_2^2 to 0.640.
  3. AR(16) unlocks full low-order phase lead at lower noise: Spreading the negative differentiating tail smoothly across k = 6..15 ms (sum(w[8:]) = -0.315) raises effective lead by +46% to +1.52 fr while simultaneously cutting low-order noise-gain squared by 17% (0.640 -> 0.534)! By Cauchy–Schwarz, doubling the negative-lobe baseline produces the same derivative slope with half the L2 weight energy.
  4. AR(32) hits atmospheric phase-lead saturation: Extending from 16 to 32 taps lowers ||w||_2^2 another 14% (0.462), but effective phase lead saturates at +1.55 fr (>98% of Stage-2 and >97% of Stage-1 tap energy lies inside the first 16 ms).
  5. AR(64) confirms tail exhaustion beyond 32 ms: Doubling again to 64 taps (64 ms @ Stage 1, 32 ms @ Stage 2) leaves default AR(64) phase lead identical to AR(32) (+1.55 fr, ||w||_2^2 = 0.419). In warm-start AR(64)*, tiny ~-0.005 tail weights around k = 35–50 ms raise the DC linear moment -sum(k * w_k) to +1.87 fr, yet its 5–60 Hz frequency-domain phase response overlaps AR(32)* tightly and only 1.48% (AR(64)*) to 1.92% (AR(64)) of total Stage-1 filter tap energy resides in taps k = 32..63, meaning the extra 32 parameters primarily fit finite-window estimation noise rather than physical frozen-flow wind transport.

5. Spatial Modal Spectra & Frequency-Domain Rejection (1 kHz & 2 kHz Telemetry)

Computing Welch temporal PSDs directly from the saved 5.0 s aol1_modevalWFS (1 kHz, 5000 frames) and aol2_modevalWFS (2 kHz, 10000 frames) cubes confirms where each AR order improves closed-loop rejection:

Temporal PSDs and Spatial Modal Residual Spectra (2x2)
Temporal PSDs and Spatial Modal Residual Spectra (2x2)

6. Bias–Variance Tradeoff, Sample Complexity & Cold-Start Warmup Catch-22

To rigorously separate in-sample fit from out-of-sample generalization, we ran a walk-forward evaluation of the exact mkARPF Wiener-ridge solver across P in {1, 2, 4, 8, 12, 16, 24, 32, 48, 64} and N_train in {256, 512, 1024, 2048} (training strictly on the first N_train frames and scoring out-of-sample on the second half of the 5.0 s clean PSOL telemetry):

Bias-Variance Tradeoff and Sample Complexity Scaling (2x2)
Bias-Variance Tradeoff and Sample Complexity Scaling (2x2)

Walk-Forward Out-of-Sample Lag Variance Reduction (In-Sample / Out-of-Sample / Overfitting Gap)

Stage & N_train AR(4) AR(8) AR(16) AR(32) AR(64) Diagnosis
Stage 1 (N=256, Cold Start) +26.2% / +17.6% (+8.6) +31.0% / +20.4% (+10.6) +35.9% / +21.3% (+14.6) +41.1% / +18.4% (+22.7) +45.3% / -8.0% (+53.2) AR(64) N/P=4: -8.0% (worse than ZOH!)
Stage 1 (N=1024, Warm Start) +22.5% / +20.1% (+2.4) +26.8% / +24.1% (+2.7) +31.2% / +27.8% (+3.4) +34.4% / +29.7% (+4.7) +37.2% / +28.1% (+9.1) AR(16)–AR(32) converge; AR(64) gap 9.1 pp
Stage 1 (N=2048, Full Window) +22.2% / +20.4% (+1.9) +26.3% / +24.4% (+1.8) +30.5% / +28.6% (+1.9) +33.4% / +31.0% (+2.5) +35.0% / +30.6% (+4.5) Peaks at AR(32); AR(64) dips -0.4 pp
Stage 2 (N=256, Cold Start) +27.0% / +24.0% (+3.0) +29.3% / +22.8% (+6.5) +33.3% / +20.9% (+12.3) +39.4% / +15.4% (+24.0) +48.4% / -1.0% (+49.4) AR(64) crashes to -1.0% (49 pp gap)
Stage 2 (N=2048, Full Window) +25.6% / +25.6% (-0.0) +26.4% / +25.8% (+0.6) +28.3% / +26.1% (+2.2) +29.5% / +25.8% (+3.7) +31.6% / +25.6% (+6.1) Peaks at AR(16); monotonic decline to AR(64)

Stage-1 Out-of-Sample Generalization by Spatial Mode Band (N_train = 2048)

Spatial Mode Band AR(4) Out-of-Sample AR(8) Out-of-Sample AR(16) Out-of-Sample AR(32) Out-of-Sample AR(64) Out-of-Sample
TT + Low (0–19) -81.03% -16.74% +38.84% +37.57% +34.85%
Mid (20–255) +21.47% +40.23% +43.09% +44.96% +44.65%
High (256–1964) +23.96% +24.75% +27.12% +29.70% +29.35%
All Modes (0–1964) +20.36% +24.44% +28.58% +30.99% +30.56%

Closed-Loop Verification: AR(32)*, AR(64)* & the AR(64) Warmup Catch-22

The walk-forward curves predict two distinct pathologies for high-order filters, both confirmed directly in closed loop:

  1. Matched warm-start (N_min = 1024, N_train = 4096) eliminates cold-start petal jumps on both AR(32)* and AR(64)*: On AR(32)*, Stage-1 WFE drops from 493.7 nm (488.6 nm static petal) to 69.8 nm and Final Vis Strehl jumps from 76.27% to 81.15%. On AR(64)*, Stage-1 WFE likewise drops from 493.9 nm to 70.8 nm and Final Vis Strehl rises from 77.08% to 81.20% (95.42% H-band SR).
  2. Asymptotic saturation beyond AR(16): Even with 2x larger training windows (4096 frames = 4.1 s @ Stage 1), AR(32)* beats default AR(16) by only +0.11 pp Vis SR, and doubling order again to AR(64)* adds just +0.06 pp Vis SR (+0.17 pp total above AR(16)) while Stage-1 Vis Strehl actually dips slightly (71.47% vs. 72.09% for AR(32)* and 71.95% for AR(16)).
  3. The AR(64) Warmup Catch-22: Attempting to satisfy the safe N_min / P = 32 rule directly for AR(64) by setting N_min = 2048 (2.05 s in plain integrator mode before activating prediction) also fails (74.44% Vis SR, 528.7 nm Post-AO3k WFE, 77.5 nm Final WFE) — because the Modal Integrator itself slips a Stage-1 petal around t ~ 1.1 s before AR(64) finishes collecting its warmup buffer! Setting N_min = 1024 (1.02 s) threads a razor-thin window right ahead of the integrator slip threshold (N_min / P = 16), proving that any on-sky deployment of P >= 32 requires progressive order staging (bootstrap rapidly with AR(16) at N = 256, then promote to higher order once N >= 4096 clean frames are buffered).

7. Real-Time Compute Scalability & Accuracy–Compute Pareto Frontier

All runs were profiled on the uncontended host (AMD EPYC 9755, OMP_NUM_THREADS=2 for mkARPF, single-thread SIMD for applyARPF, NVIDIA RTX PRO 6000 Blackwell for GPU optical propagation & MVM):

Controller mkARPF-1 p50 (CPU%) mkARPF-2 p50 (CPU%) applyARPF-1 p50 / p99 applyARPF-2 p50 / p99 mfilt-2 p50 Total PF CPU% Filter Mem (S1+S2) RT Timeouts
AR(4) 17.6 ms (3.1%) 11.1 ms (4.3%) 12.0 / 40.3 us 10.1 / 41.5 us 71.8 us 8.4% 50.3 KB 0
AR(8) 41.5 ms (7.6%) 27.1 ms (10.7%) 20.6 / 57.3 us 15.7 / 42.2 us 74.2 us 19.4% 100.6 KB 0
AR(16) 63.3 ms (10.8%) 48.6 ms (20.3%) 33.8 / 63.5 us 24.2 / 60.1 us 86.5 us 32.6% 201.2 KB 0
AR(32) 149.8 ms (28.1%) 96.0 ms (38.7%) 63.7 / 98.2 us 41.5 / 68.9 us 105.1 us 69.4% 402.5 KB 0
AR(32)* 242.0 ms (48.4%) 191.6 ms (73.7%) 63.5 / 105.5 us 40.8 / 80.7 us 118.3 us 124.5% 402.5 KB 0
AR(64) 554.0 ms (102.7%) 354.6 ms (139.9%) 118.7 / 149.1 us 77.8 / 113.0 us 159.9 us 246.7% 805.0 KB 0
AR(64)* 906.4 ms (181.5%) 710.8 ms (275.4%) 118.2 / 155.8 us 78.5 / 128.4 us 159.3 us 461.1% 805.0 KB 0
H-Band Coronagraphic PSFs and Real-Time Compute Scaling (2x3)
H-Band Coronagraphic PSFs and Real-Time Compute Scaling (2x3)

Key compute scalability conclusions:

8. Part II — Full Cross-Mode Transition Matrix Block-EOF (VAR(P)) vs. Per-Mode Diagonal AR(P)

8.1 Diagonal AR(P) vs. Original CACAO Empirical Orthogonal Functions (EOF)

Part I (Sections 2–7) evaluated per-mode diagonal AR(P) (cacaopc-mkARPF / cacaopc-applyARPF), where each output mode m predicts its own future amplitude a_m(t + d) exclusively from its own scalar history [a_m(t), ..., a_m(t - P + 1)] — a B = 1 diagonal restriction that ignores spatial cross-correlations between modes. In contrast, the original CACAO predictive controller (Guyon & Males 2017, Empirical Orthogonal Functions / EOF) fits a full vector auto-regressive (VAR(P)) cross-mode transition matrix F predicting each mode i from a coupled block of B spatial modes over P lookback steps (D = P * B predictors per output mode):

8.2 Offline 20.0 s Walk-Forward Study: Sample Complexity, Full-Pupil Gain & Noise-Gain Physics

Before running closed-loop hardware-in-the-loop trials, we recorded a clean 20.0 s PSOL telemetry cube (ao3k_scexao_tlm20s_ar16: 20,000 Stage-1 frames @ 1 kHz, 40,000 Stage-2 frames @ 2 kHz, zero petal slips) and evaluated diagonal AR(16) vs. cross-mode Block-EOF(B=64/128, P=8) strictly out-of-sample on the unseen final 5.0 s (t = 15–20 s):

Cross-Mode Block-EOF vs. Diagonal AR(16): 20 s Walk-Forward Physics (2x2)
Cross-Mode Block-EOF vs. Diagonal AR(16): 20 s Walk-Forward Physics (2x2)
Stage & Spatial Mode Band N_train Diag AR(16) (reg=5e-3) Diag AR(16) (Matched reg) Block-EOF (B=128, P=8) Cross-Mode Gain (Δpp vs. Matched)
Stage 1 — Block 0 (0–127, Low/Mid) 14,500 +45.63% +63.06% +81.60% +18.54 pp
Stage 1 — Block 1 (128–255) 14,500 +36.90% +38.62% +56.02% +17.40 pp
Stage 1 — Block 2 (256–383) 14,500 +24.38% +25.71% +41.39% +15.68 pp
Stage 1 — All 16 Blocks (0–1964) 14,500 +32.60% +34.14% +39.98% +5.84 pp
Stage 2 — Block 0 (0–127) 29,000 +19.38% +19.08% +29.03% +9.95 pp
Stage 2 — All 10 Blocks (0–1254) 29,000 +27.52% +27.51% +31.59% +4.08 pp

Key offline physics findings confirmed in Figure 7:

  1. Universal full-pupil gain (26 / 26 spatial blocks win): Cross-mode Block-EOF(B=128, P=8) outperforms both default and regularization-matched diagonal AR(16) on every single one of the 16 Stage-1 blocks and all 10 Stage-2 blocks, peaking at +81.5% out-of-sample lag variance reduction on Stage-1 Block 0 (cutting residual lag variance ~2.5x below default AR(16)).
  2. ~3x lower L2 noise gain at equal or better lag suppression: Sweeping regularization lam (Figure 7, bottom-left) proves that Cross-Mode EOF strictly dominates Diagonal AR(16) across the entire noise-gain Pareto curve — beating even unconstrained AR(16) (||w||_2^2 > 2.1) while maintaining ||F_m||_2^2 ~ 0.7–0.9.
  3. Sample-complexity threshold (N / D >= 8): At N_train = 2048 (N/D = 2), unbootstrapped Block-EOF(B=128, P=8) catastrophically overfits (-3526%), crossing strongly positive at N = 8192 (N/D = 8) and saturating near N = 12,000–14,500, while B = 64 (D = 512) converges 2x earlier (N >= 6,000).
  4. Direct signature of frozen-flow quadrature coupling: Inspecting the converged closed-loop aol1_eofPFmat.fits matrix (Figure 7, bottom-right) reveals crisp skew-symmetric quadrature wind-advection pairs — e.g., mode 50 <- mode 47 (+0.081) vs. mode 47 <- mode 50 (-0.076), (16 <-> 17), (3 <-> 4), (8 <-> 9) — with off-diagonal L2 energy rising smoothly with spatial frequency from 12.6% (Block 0) to 32.9% (Block 14) as k . v * d increases.

8.3 Matched 14.0 s-Warmup Closed-Loop Head-to-Head Comparison

To evaluate pure cross-mode transition-matrix performance in closed loop with zero regularization or warmup confounders, we ran four matched simulations with identical 14.0 s warmup (N_train = 16,384 @ Stage 1, 32,768 @ Stage 2) evaluated over the exact same 5.0 s unseen turbulence segment (t = 14–19 s, Raw WFE = 1055–1060 nm, zero petal slips, 0 real-time timeouts):

Controller (t = 14–19 s, N = 16k/32k) reg (S1 / S2) Post-AO3k WFE (Tot / Max) S1 Vis SR Post-SCExAO WFE Final Vis SR Final H SR Raw Coro (10 / 15 / 20 l/D) 5-sig @ 20 l/D LLOWFS DM3 RT Apply (S1/S2) Total PF CPU Archived Run ID
Diag AR(16) Default (reg=5e-3) 5e-3 / 5e-3 71.0 / 111 nm 71.55% 64.1 nm 76.62% 94.81% 2.59e-05 / 2.06e-05 / 7.05e-06 1.40e-05 3.56 nm 34 / 24 us 233% ao3k_scexao_predictive_ar16_w14s
Diag AR(16) Matched (reg 1e-4/1e-2) 1e-4 / 1e-2 67.8 / 98 nm 73.63% 56.9 nm 80.54% 95.21% 1.48e-05 / 8.62e-06 / 6.27e-06 1.60e-05 3.68 nm 34 / 24 us 235% ao3k_scexao_predictive_ar16_matched_w14s
Block-EOF(B=64, P=8) 1e-4 / 1e-2 61.9 / 82 nm 77.00% 57.0 nm 80.45% 95.26% 1.51e-05 / 8.45e-06 / 6.00e-06 1.36e-05 2.53 nm 86 / 76 us 70% ao3k_scexao_predictive_eof64_p8
Block-EOF(B=128, P=8) 1e-4 / 1e-2 62.2 / 82 nm 77.15% 56.0 nm 81.06% 95.36% 1.36e-05 / 7.43e-06 / 5.47e-06 1.20e-05 2.19 nm 108 / 88 us 102% ao3k_scexao_predictive_eof128_p8
Cross-Mode Block-EOF vs. Diagonal AR(16): Closed-Loop Comparison (2x3)
Cross-Mode Block-EOF vs. Diagonal AR(16): Closed-Loop Comparison (2x3)

Four decisive closed-loop conclusions emerge from Figure 8:

  1. Dramatic Stage-1 (AO3k) wind-lag breakthrough (+3.52 pp Vis SR, -5.6 nm WFE): On the 1 kHz Stage-1 loop — where temporal wind lag dominates the error budget — Block-EOF(B=128, P=8) slashes residual WFE from 67.8 nm (matched AR(16)) and 71.0 nm (default AR(16)) down to 62.2 nm (61.9 nm for B = 64), lifting Stage-1 Vis SR from 73.63% to 77.15% (and Stage-1 H-band Strehl from 93.53% to 94.48%). During the 2.22 um gust at t = 2.15 s, cross-mode advection trims the peak Stage-1 excursion by -29 nm (111 -> 82 nm) and raises Stage-1 tip/tilt PyWFS optical gain (selfRM g_opt) by +20% (0.483 -> 0.580).
  2. Post-SCExAO dark-hole & LLOWFS gains (-13.9% / -12.7% coronagraph contrast, -40.6% DM3 stroke): After Stage 2 (2 kHz), total pupil WFE is already close to the irreducible ~50 nm fitting + chromatic + photon floor, so removing temporal servo-lag variance improves final WFE from 56.9 nm -> 56.0 nm (80.54% -> 81.06% Vis SR, 95.36% H SR). Crucially, however, because wind-lag speckles concentrate coherently in the 10–20 l/D coronagraphic wind-butterfly halo, Block-EOF(B=128, P=8) deepens H-band raw contrast by 8.1% @ 10 l/D, 13.9% @ 15 l/D, and 12.7% @ 20 l/D (mean 5–20 l/D planet contrast -10.4%, 5-sigma @ 20 l/D -25.0%) while cutting Stage-3 LLOWFS DM3 stroke by -40.6% (3.68 -> 2.19 nm).
  3. Bonus discovery — stage-asymmetric regularization benefits diagonal AR(16) too: Comparing Diag AR(16) Default (reg = 5e-3 on both stages) against Diag AR(16) Matched (reg1 = 1e-4 on high-SNR Stage 1, reg2 = 1e-2 on lower-SNR Stage 2) reveals why Diag AR(16) at N = 32k dipped to 76.62% Vis SR: reg2 = 5e-3 pinned Stage-2 modes against ||w||_2^2 <= 1.35, triggering a brief Mode-298 ringing burst at t = 0.5–1.1 s. Raising reg2 -> 1e-2 and lowering reg1 -> 1e-4 completely eliminates that ringing and lifts diagonal AR(16) to 80.54% Vis SR.
  4. Real-time CPU feasibility (76–108 us inference, ~0.7–1.0 CPU core, 0 timeouts): Leveraging OpenBLAS dsyrk/dgemm + LAPACKE dpotrf at 1.0 s update cadence, Block-EOF(B=64, P=8) uses only 70% CPU (86 / 76 us apply, activates in 6.0 s) and Block-EOF(B=128, P=8) uses 102% CPU (108 / 88 us apply for 2.0M / 1.3M MACs per frame, activates in 12.0 s) — 2.3–3.4x LESS total CPU than scalar mkARPF running on the same N = 16k / 32k window (235% CPU)!

9. Operational Recommendations for CACAO / SCExAO

  1. For maximum steady-state ExAO & coronagraphic performance (stationary wind over >= 12 s), deploy Block-EOF(B=128, P=8) with progressive AR(16) cold-start bootstrapping (--pf-mode eof --pf-blocksize 128 --pf-order 8 --pf-reg 1e-4 --pf-reg2 1e-2 --pf-maxnorm2 2.0 --pf-nbtrain1 16384 --pf-nbtrain2 32768 --pf-minsamples1 12000 --pf-minsamples2 24000): it locks Subaru V-spider petals within 0.25 s via AR(16) cold-start, transitions bump-free into full cross-mode advection prediction at t = 12 s, delivers +3.5 pp Stage-1 Vis SR and 10–14% deeper 10–20 l/D dark-hole contrast over regularization-matched AR(16), and fits comfortably inside ~1.0 CPU core with < 110 us inference latency.
  2. For rapid wind shifts (6 s horizon) or tighter CPU budgets (< 0.7 core), use Block-EOF(B=64, P=8) (minsamples = 6000 / 12000): it captures virtually all of the Stage-1 cross-mode gain (61.9 nm WFE, 77.00% Stage-1 Vis SR) in half the convergence time and 68% of the CPU cost of B = 128.
  3. For immediate < 1 s cold-start diagonal operation (B = 1), adopt stage-asymmetric Diagonal AR(16) (--pf-order 16 --pf-reg 1e-4 --pf-reg2 1e-2, N_train = 2048–4096): it avoids both AR(4)/AR(8) lag-induced petal slips and AR(32)/AR(64) cold-start overfitting, while reg2 = 1e-2 prevents Stage-2 high-order ringing. Do not deploy diagonal AR(64) for broadband turbulence (< 0.2 pp gain over AR(16) at 14x CPU).
  4. Infrastructure landed in cacao, cacaosim, and cacao-work: Expanded ARPF_MAX_ORDER to 64 in mkARPF.c/applyARPF.c; implemented native real-time cacaopc-mkEOFPF + cacaopc-applyEOFPF (OpenBLAS/LAPACKE + OpenMP SIMD + decoupled diagorder = 16 cold-start bootstrap & smooth cross-fade); wired --pf-mode eof end-to-end into cacaoloop-ao3k-scexao.milk, sim-ao3k-scexao.milk, and cacaosim-ao-report.

Reproducibility & GitHub Provenance

All source repositories, simulation scripts, diagnostic figures, and machine-readable comparison tables (predictive_control_comparison.json, predictive_control_summary.csv) are open-source and reproducible end-to-end.

Open-Source GitHub Repositories & Commits

Repository Branch Commit Role in Simulation Stack
cacao-work main 928887c Integration workspace, AO3k+SCExAO bench/runner, pytest suite & web report publisher
cacaosim main ea844d5 GPU-fused & modular polychromatic AO hardware simulator, TUI & report engine
cacao feat/bash-engine b1e05fb Compute and Control for Adaptive Optics (acquireWFS, mlat, Hadamard RM, SVD CM, mfilt)
milk feat/bash-engine e32da09 Core FPS shared-memory engine, milk-script orchestrator, streamFITSlog & milk-perf-report
ImageStreamIO dev b6e2671 Low-latency POSIX/CUDA shared-memory image stream transport (milk submodule)
milk-mltools main dee9620 C telemetry indexing/sync, @calc JIT extensions, AO loop optimizer & polychromatic PSFR
AtmosphericTurbulenceSimul feat/bash-engine d095980 Multi-layer Maunakea frozen-flow & boiling atmospheric phase generator (milkatmturb)
OpticsMaterials feat/bash-engine c12df01 Optical material dispersion & air refractive-index library for milk
WFpropagate feat/bash-engine d65183d Fresnel & angular-spectrum wavefront propagation library for milk

CLI Commands to Reproduce Part I (Diagonal AR(4..64)) & Part II (Block-EOF)

cd ~/src/cacao-work
source env.sh

# 1. Part I: Per-mode Diagonal AR(4..64) baseline sweep (N_min=256, N_train=2048)
for P in 4 8 16 32 64; do
  ./scripts/run-ao3k-scexao.sh \
    --seeing 0.60 --phys-time 5.0 --oversample 4 --bench-mode fused \
    --predictive --pf-mode ar --pf-order ${P} \
    --load-rm _work/ao3k_scexao_rm --outdir _work/ao3k_scexao_predictive_ar${P} \
    --save-telemetry speckle
done

# 2. Part I: Warm-start ablations AR(32)* & AR(64)* (N_min=1024, N_train=4096)
for P in 32 64; do
  CACAO_PF_MINSAMPLES=1024 CACAO_PF_NBTRAIN=4096 \
    ./scripts/run-ao3k-scexao.sh \
      --seeing 0.60 --phys-time 5.0 --oversample 4 --bench-mode fused \
      --predictive --pf-mode ar --pf-order ${P} \
      --load-rm _work/ao3k_scexao_rm \
      --outdir _work/ao3k_scexao_predictive_ar${P}_n4096 \
      --save-telemetry speckle
done

# 3. Part II: Matched 14 s-warmup Diagonal AR(16) vs. Cross-Mode Block-EOF(B=64/128)
./scripts/run-ao3k-scexao.sh --seeing 0.60 --phys-time 5.0 --oversample 4 \
  --predictive --pf-mode ar --pf-order 16 --pf-reg 1e-4 --pf-reg2 1e-2 \
  --pf-maxnorm2 1.35 --pf-nbtrain1 16384 --pf-nbtrain2 32768 --pf-warmup-sec 14.0 \
  --load-rm _work/ao3k_scexao_rm \
  --outdir _work/ao3k_scexao_predictive_ar16_matched_w14s --save-telemetry speckle

./scripts/run-ao3k-scexao.sh --seeing 0.60 --phys-time 5.0 --oversample 4 \
  --predictive --pf-mode eof --pf-blocksize 128 --pf-order 8 \
  --pf-reg 1e-4 --pf-reg2 1e-2 --pf-maxnorm2 2.0 \
  --pf-nbtrain1 16384 --pf-nbtrain2 32768 \
  --pf-minsamples1 12000 --pf-minsamples2 24000 --pf-warmup-sec 14.0 \
  --load-rm _work/ao3k_scexao_rm \
  --outdir _work/ao3k_scexao_predictive_eof128_p8 --save-telemetry speckle

# 4. Compile this comparative Predictive Control Report & publish to Firebase Hosting
${PYTHON_BIN} ./scripts/build-predictive-control-report.py
./scripts/publish-ao-report.sh --project scexao-og _work/predictive_control_report

Interactive Report Dataset Explorer

Dataset Explorer Interactive Report Dataset Explorer

Telemetry & Data Files