EOFReal-Time Loop OperationVERIFIEDStg 1Stg 2

Unified Cross-Mode Block-EOF Predictive Control

Spatio-temporal Block-EOF with ZOH ridge, extended/regime Grams, wind prior & FX-DM.

Overview & Role

Learns coupled cross-mode spatio-temporal predictors (B modes x P lags) inside cacaopc-mkEOFPF and applies them with zero changes to applyEOFPF. Unpriored high-order blocks automatically stay on diagonal AR bootstrap until avail_samples >= eof_req, preventing underdetermined (N < D) cross-mode overfitting.

Combines five composable extensions: EOF/ZOH (ZOH-centered ridge, recommended ON for Stage 1 and OFF for Stage-2 high-pass residuals), EOF/MEM (exponentially forgotten chunk Gram beyond NBtrain), EOF/REG (multi-anchor regime-weighted Gram library), EOF/WIND (windlayers Fourier-space physics-Gram Bayesian prior + automatic wind-switch rescue), and EOF/FX (Pass-2 Filtered-X DM plant for unshaped ringing DMs).

Compute Units / Entry Points: cacao-fpsexec-cacaopc-mkEOFPFcacao-fpsexec-cacaopc-applyEOFPFeoflin_phys.c

Verified Highlights:

Option Variants (CODE/OPT)

Option CodeBehavior & UsageMain Flags
EOF/BASEStandard sliding-window Block-EOF (`--pf-mode eof --pf-blocksize 64`).--predictive --pf-mode --pf-blocksize --pf-order --pf-reg
EOF/ZOHZOH-centered ridge toward `[I; 0; ...]` preventing DC-gain collapse (Stg1 ON, Stg2 OFF).--pf-zoh-ridge --pf-zoh-ridge2
EOF/MEMExtended-memory chunk-Gram accumulator remembering beyond rolling `NBtrain`.--pf-gram-halflife
EOF/REGMulti-anchor (`K <= 16`) regime-weighted Gram library with similarity floor kappa.--pf-regime-kmax
EOF/WIND`windlayers` Fourier physics-Gram prior + instant wind-switch empirical Gram decay.--windlayers1 --pf-dmmodes1 --pf-n-prior --pf-wl-switch-decay
EOF/FXPass-2 Filtered-X regressor convolution through `H_eff` for unshaped ringing DMs.--pf-fx1 --pf-fx2

Dependencies & Calibration Chain

Selected Algorithm
★ Current Entry
EOFRT Operation
Unified Cross-Mode Block-EOF Predictive Control
Interaction / Exclusion Note: Mutually exclusive predictive controller (--pf-mode eof vs --pf-mode ar): selecting EOF turns PF/AR off.
Interaction / Exclusion Note: Do not combine sub-option EOF/FX (Filtered-X coordinates) directly with EOF/WIND (pure-delay physics Gram): when PRESH + PSOL/MIMO already linearize the plate, use EOF/WIND without --pf-fx1.

CLI Flags, Environment Variables & FPS Parameters

LayerOption (Links to Reference)DefaultDescription
CLI Flag--predictiveOFFEnable PSOL predictive control on Stage 1 (AO3k) and Stage 2 (SCExAO)
CLI Flag--pf-modearPredictive filter architecture: ar (diagonal) or eof (block cross-mode)
CLI Flag--pf-blocksize128Cross-mode Block-EOF coupled mode block size B
CLI Flag--pf-order8Predictive filter temporal lookback tap order P
CLI Flag--pf-reg0.005Stage-1 / default Tikhonov ridge regularization parameter lambda
CLI Flag--pf-reg2matches --pf-regOptional Stage-2 SCExAO Tikhonov regularization lambda override
CLI Flag--pf-maxnorm2—Optional per-row ||F_m||_2^2 noise amplification cap override
CLI Flag--pf-zoh-ridge—Stage-1 mkEOFPF ZOH-centered ridge regularization toggle (ON/OFF)
CLI Flag--pf-zoh-ridge2—Stage-2 mkEOFPF ZOH-centered ridge regularization toggle (ON/OFF)
CLI Flag--pf-gram-halflife0Stage-1 extended-memory chunk-Gram exponential half-life [frames] (0=sliding; 60000 in DEFAULT)
CLI Flag--pf-regime-kmax0Regime-weighted Gram library max cluster anchor count K (0=off, <=16; 8 in DEFAULT)
CLI Flag--pf-fx1—Stage-1 Pass-2 Filtered-X EOF DM impulse kernel FITS
CLI Flag--pf-fx2—Stage-2 Pass-2 Filtered-X EOF DM impulse kernel FITS
CLI Flag--pf-dmmodes1—Stage-1 DM modal basis FITS cube for windlayers Fourier physics Gram
CLI Flag--pf-n-prior1024Equivalent sample weight N_prior for Stage-1 windlayers physics Gram
CLI Flag--pf-wl-switch-decay0.20Empirical Gram decay multiplier applied upon windlayers switch trigger
CACAO_* EnvCACAO_PF_BLOCKSIZE128Block-EOF coupled modal block size B
CACAO_* EnvCACAO_PF_ZOH_RIDGE(unset)mkEOFPF ZOH-centered ridge regularization toggle (ON/OFF)
CACAO_* EnvCACAO_PF_GRAM_HALFLIFE0Extended-memory chunk-Gram exponential half-life [frames] (0=sliding)
CACAO_* EnvCACAO_PF_DM_KERNEL(unset)Pass-2 Filtered-X EOF DM impulse kernel FITS (H_diag / H_mimo)
CACAO_* EnvCACAO_PF_WL_LAYERS(unset)Live mlt-windlayers layer SHM stream consumed by mkEOFPF physics Gram
CACAO_* EnvCACAO_PF_DMMODES(unset)DM modal basis cube FITS for mkEOFPF Fourier-space physics Gram
CACAO_* EnvCACAO_PF_N_PRIOR1024.0Equivalent sample weight N_prior for windlayers physics-Gram prior
CACAO_* EnvCACAO_PF_WL_SWITCH_DECAY0.20Empirical Gram decay multiplier upon windlayers switch trigger
CACAO_* EnvCACAO_PF_REGIME_KMAX0Regime-weighted Gram library max anchor count K (0=off, <=16)
CACAO_* EnvCACAO_PF_REGIME_KAPPA0.10Regime-weighted Gram similarity blending floor kappa
CACAO_* EnvCACAO_PF_REGIME_BW3.0Regime-weighted Gram Gaussian kernel bandwidth
CACAO_* EnvCACAO_PF_REGIME_RLIM4.0Regime-weighted Gram leader-clustering new-anchor radius threshold
CACAO_* EnvCACAO_PF_DIFF_NMODE0Leading modes solved in temporal-difference EOF space (0=off)
CACAO_* EnvCACAO_PF_DIFF_ORDER0Difference-space EOF lookback tap order (0=diagorder, 2..64)
CACAO_* EnvCACAO_PF_DIFF_REG0.05Difference-space EOF relative Tikhonov lambda
CACAO_* EnvCACAO_PF_DIFF_MAXDCGAIN0.9995Difference-space EOF exact self-DC gain (0.9..0.99995)
FPS (cacao)mkEOFPF.PForder8EOF lookback tap order (1..64)
FPS (cacao)mkEOFPF.diagorder16bootstrap diag AR order (1..64)
FPS (cacao)mkEOFPF.blocksize128coupled mode block size B (1..512)
FPS (cacao)mkEOFPF.PFlatency2.4prediction horizon [frames]
FPS (cacao)mkEOFPF.NBtrain16384sliding PSOL training window [frames]
FPS (cacao)mkEOFPF.minsamples12000min frames for cross-mode EOF
FPS (cacao)mkEOFPF.reglambda1.0e-4EOF relative Tikhonov lambda
FPS (cacao)mkEOFPF.zoh_ridgeONcenter ridge toward ZOH identity map (vs zero)
FPS (cacao)mkEOFPF.gram_halflife0.0extended-memory Gram half-life [frames] (0=sliding NBtrain)
FPS (cacao)mkEOFPF.n_prior1024.0windlayers physics-Gram prior sample weight (0=off)
FPS (cacao)mkEOFPF.wl_switch_decay0.25empirical Gram discount on wind switch (0..1)
FPS (cacao)mkEOFPF.regime_kmax0max regime Gram library anchors (0=off, 2..16=on)
FPS (cacao)mkEOFPF.dm_kernel—optional Pass-2 H_diag/H_mimo FITS for Filtered-X EOF
FPS (cacao)mkEOFPF.diff_nmode0leading modes solved in temporal-difference space (0=off)
FPS (cacao)mkEOFPF.out.var_red_oos_pct0.0out-of-sample variance reduction vs ZOH [%]
FPS (cacao)mkEOFPF.out.overfit_ratio0.0OOS/in-sample predicted RMS ratio
FPS (cacao)applyEOFPF.nthreads4OpenMP threads across blocks

Implementation, Tests & Related Reports

Source Files

Verification Tests

Related Staged Technical Reports