Diagonal Autoregressive Predictive Control
Per-mode temporal AR(P) predictive filter trained online from PSOL telemetry.
Overview & Role
Solves independent per-mode ridge-regularized temporal linear predictors of order P over a rolling PSOL buffer (mkARPF) and applies predictions synchronously in applyARPF blended with the integrator via --pf-mix.
Low sample complexity (N ~ 256-2048) makes PF/AR fast to converge and serves as the built-in bootstrap fallback inside Block-EOF.
Compute Units / Entry Points: cacao-fpsexec-cacaopc-mkARPFcacao-fpsexec-cacaopc-applyARPF
Verified Highlights:
- Fast warmup (256 frames) and strong single-mode wind/vibration cancellation
Option Variants (CODE/OPT)
| Option Code | Behavior & Usage | Main Flags |
|---|---|---|
PF/AR | Diagonal per-mode AR(P) predictive controller. | --predictive --pf-mode --pf-order --pf-reg --pf-mix |
Dependencies & Calibration Chain
Upstream Calibrations & Inputs
Selected Algorithm
★ Current Entry
PF/ARRT Operation
Diagonal Autoregressive Predictive Control
Feeds & Enables Downstream
Interaction / Exclusion Note: Mutually exclusive predictive controller (--pf-mode ar vs --pf-mode eof): selecting PF/AR turns EOF off.
CLI Flags, Environment Variables & FPS Parameters
| Layer | Option (Links to Reference) | Default | Description |
|---|---|---|---|
| CLI Flag | --predictive | OFF | Enable PSOL predictive control on Stage 1 (AO3k) and Stage 2 (SCExAO) |
| CLI Flag | --pf-mode | ar | Predictive filter architecture: ar (diagonal) or eof (block cross-mode) |
| CLI Flag | --pf-order | 8 | Predictive filter temporal lookback tap order P |
| CLI Flag | --pf-reg | 0.005 | Stage-1 / default Tikhonov ridge regularization parameter lambda |
| CLI Flag | --pf-reg2 | matches --pf-reg | Optional Stage-2 SCExAO Tikhonov regularization lambda override |
| CLI Flag | --pf-mix | 0.90 | Predictive control mixing coefficient applied to both Stage 1 & Stage 2 |
| CLI Flag | --pf-mix1 | matches --pf-mix | Stage-1 AO3k predictive mixing coefficient override |
| CLI Flag | --pf-mix2 | matches --pf-mix | Stage-2 SCExAO predictive mixing coefficient override |
| CLI Flag | --pf-nbtrain1 | 2048 (ar) / 16384 (eof) | Stage-1 predictive filter training window length [frames] |
| CLI Flag | --pf-nbtrain2 | 2048 (ar) / 32768 (eof) | Stage-2 predictive filter training window length [frames] |
| CLI Flag | --pf-minsamples1 | 256 (ar) / 12000 (eof) | Stage-1 minimum PSOL samples before AR/EOF filter activates |
| CLI Flag | --pf-minsamples2 | 256 (ar) / 24000 (eof) | Stage-2 minimum PSOL samples before AR/EOF filter activates |
| CLI Flag | --pf-warmup-sec | 0 | Extra closed-loop warmup [s] before starting science integration |
| CLI Flag | --pf-mgain-exp | 0.50 | Stage-1/default modal PF mix rolloff exponent applied to mgainfact |
| CACAO_* Env | CACAO_PF_MODE | ar | Predictive filter mode: 'ar' (diagonal AR) or 'eof' (block cross-mode EOF) |
| CACAO_* Env | CACAO_PF_ORDER | 8 | Predictive filter temporal tap lookback order P |
| CACAO_* Env | CACAO_PF_DIAGORDER | 16 | Bootstrap diagonal AR tap order used during Block-EOF warmup |
| CACAO_* Env | CACAO_PF_NBTRAIN | 2048 | Rolling PSOL training window size [frames] for mkARPF / mkEOFPF |
| CACAO_* Env | CACAO_PF_MINSAMPLES | 256 | Minimum PSOL samples required before activating full AR/EOF filter |
| CACAO_* Env | CACAO_PF_UPDATEPERIOD | 4 (Stg1/3), 8 (Stg2) | Filter re-solve cadence [WFS frames] |
| CACAO_* Env | CACAO_PF_REG | 0.005 | Tikhonov ridge regularization parameter lambda for PF solver |
| CACAO_* Env | CACAO_PF_MAXNORM2 | (unset) | Optional per-row ||F_m||_2^2 filter norm ceiling |
| CACAO_* Env | CACAO_PF_MAXDCGAIN | (unset) | Optional mkEOFPF self-DC gain ceiling override |
| CACAO_* Env | CACAO_PF_MIX | 0.90 (Stg1/2), 0.50 (Stg3) | Predictive control mix weight [0..1] blending PF output with integrator |
| CACAO_* Env | CACAO_PF_MGAIN_EXP | 0.50 | Exponent rolling off PF mix across modes via mgainfact^exp |
| FPS (cacao) | mkARPF.PForder | 8 | AR filter tap order (1..64) |
| FPS (cacao) | mkARPF.PFlatency | 2.3 | prediction horizon [frames] |
| FPS (cacao) | mkARPF.NBtrain | 2048 | sliding PSOL training window [frames] |
| FPS (cacao) | mkARPF.minsamples | 512 | min samples before 1st solve |
| FPS (cacao) | mkARPF.reglambda | 0.005 | relative Tikhonov damping |
| FPS (cacao) | mkARPF.maxnorm2 | 1.35 | max ||w||_2^2 noise-gain cap |
| FPS (cacao) | mkARPF.maxdcgain | 0.985 | max |sum(w)| DC gain (<1) |
| FPS (cacao) | mkARPF.loopgain | 0.30 | filter EMA update gain |
| FPS (cacao) | applyARPF.rampsteps | 64 | fade-in ramp steps |
| FPS (cacao) | modalfilter.PF.enable | OFF | enable predictive filter |
| FPS (cacao) | modalfilter.PF.mixcoeff | 1.0 | mixing coeff |
Implementation, Tests & Related Reports
Source Files
- cacao:
AOloopControl_PredictiveControl/AOloopControl_PredictiveControl_mkARPF.c - cacao:
AOloopControl_PredictiveControl/AOloopControl_PredictiveControl_applyARPF.c
Verification Tests
test_11_whiteness_and_zpo.py