Coupled 2D circular-rim flexural+membrane facesheet PDE (dyn_mode = "plate") for the Stage-1 ALPAO 64×64 magnetic DM in cacaosim—with synchronized side-by-side 20 kHz video against SCExAO lab measurements (LepICSaBL-E), running at 98 μs p50 on CUDA with exact 0.000 μm CPU–CUDA parity while leaving the Stage-2 50×50 MEMS DM on independent RC dynamics.
Referenced Simulation Reports
No matching simulation reports staged locally yet.
ALPAO 64×64 Magnetic DM Spatiotemporal Facesheet Dynamics (dyn_mode = "plate")
- Physical Scope (Strict Hardware Separation): Models the Stage-1 Subaru AO3k ALPAO 64×64 magnetic voice-coil DM (
[dm.ao3k]) ONLY—continuous thin silicon facesheet (1.5 mmpitch,~96 mmcircular aperture, ~3,228 active actuators). Does not apply to the Stage-2 SCExAO 50×50 MEMS DM ([dm.scexao]), which retains independent high-bandwidth RC dynamics (dyn_mode = "rc",τ = 60 μs). - Empirical Reference: Calibrated directly against Olivier Guyon's 20 kHz / 20 ms SCExAO laboratory single-actuator poke measurement (YouTube: Deformable Mirror (DM) time response —
LepICSaBL-E) and published ALPAO DM3228/DM241 studies (Lozi et al. 2024; Le Bouquin et al. 2018; Boudjema et al. 2025; Laslandes et al. 2026). - Compiled Engine:
cacaosim(cacaosim_dm_engine.c+ single-SM shared-memorycacaosim_dm_cuda.cu), verified at0.000e+00 μmCPU–CUDA parity and98.3 μsp50 (10.17 kHz) per8 kHz(4×oversampled2 kHz,dt = 125 μs) tick—adding only~9%total runtime to the full Subaruao3k_scexao.benchDAG (390 Hzvs.426 Hzwith RC). Enabled by default on[dm.ao3k]inao3k_scexao.bench. - Companion Plate-DM Bench Runs:
ao3k_scexao_unmod12_mh8_opt(local artifact, omitted from web bundle) ·ao3k_scexao_s08_realistic_mod3(local artifact, omitted from web bundle) ·ao3k_stg1_opt_unmod_v2(local artifact, omitted from web bundle) · Simulator Options Reference
Key Takeaway: Direct 3D Fourier system identification (
|F(k, f)|²) on the SCExAO 20 kHz measurement video (LepICSaBL-E) reveals the exact physics of the ALPAO 64×64 magnetic facesheet: a1,000 Hzactuator foundation resonance (which naturally falls inside the1,000 Hztemporal null ofLepICSaBL-E's consecutive1 msexposure differences, explaining why finek = 6–10 c/pupripples dominate over low-ksloshing), combined membrane+flexural dispersion (c_m = 14.0 m/s,β = 0.0085 m²/s), localized voice-coil force excitation (plate_drive = "force"), a free circular rim (rim_bc = "free"), viscous decayγ₀ = 195 s⁻¹(τ = 5.1 ms), and exact1 msconsecutive-exposure boxcar differencing. Implementing this calibrated model incacaosim's single-SM CUDA shared-memory kernel reproduces the in-phaset = +2.2 msbullseye, expanding dispersive rings, rim reflections, and crispt = +11.5 msupper-right conjugate caustic at98 μsp50 per8 kHz(4×oversampled) tick (10.2 kHz,0.000e+00 μmCPU–CUDA parity, only+9%overhead in the fullao3k_scexao.benchoptical bench)—and is now the default for Stage-1[dm.ao3k]inao3k_scexao.bench.
1. Synchronized 20 kHz Video: Actual SCExAO Measurement vs. cacaosim Simulation
Both halves advance in exact 50 μs lockstep (20 kHz, synchronized at poke onset t = 0.00 ms) for a ~1 μm peak surface poke at actuator (19, 42), processed with the exact 1.0 ms consecutive-exposure boxcar difference (mean(t - 1 ms .. t) - mean(t - 2 ms .. t - 1 ms)) matching LepICSaBL-E:
- Left: Actual SCExAO June 2024 laboratory measurement on the ALPAO 64×64 magnetic DM (
LepICSaBL-E; top-row PyWFS camera panels horizontally mirrored to match the DM andcacaosimoptical orientation). - Right: Compiled
cacaosimsimulation (cacaosim-dm-poke-simwithdyn_mode = "plate",plate_drive = "force",rim_bc = "free",f0 = 1000 Hz,wave_c = 14.0 m/s,bend_beta = 0.0085 m²/s,damp_g0 = 195 s⁻¹,damp_g2 = 1.5,tau = 20 μs,plate_nsub = 2). - Rows & Columns: Top row = 4-pupil NIR Pyramid WFS
1 msexposure diff · Bottom row = DM surface shape1 msexposure diff · Left = Linear1×(±144 nm, saturating the~1 μmpoke tip just likeLepICSaBL-E) · Center = Linear50×(±2.88 nm) · Right = Per-frame Autoscale.
Synchronized Side-by-Side Key Frames (t = +0.5 ms to +11.5 ms)
Standalone cacaosim-Only 9-Timestamp Contact Sheet (t = +0.6 ms to +17.5 ms)
| Post-Poke Δt | Far-Ring Max |Δw₁ₘₛ| (18–36 act) |
Far-Ring RMS Δw₁ₘₛ |
|---|---|---|
+ 0.5 ms |
0.00 nm |
0.00 nm |
+ 1.5 ms |
0.34 nm |
0.03 nm |
+ 2.5 ms |
1.72 nm |
0.48 nm |
+ 3.5 ms |
4.28 nm |
1.37 nm |
+ 4.5 ms |
5.30 nm |
1.51 nm |
+ 6.0 ms |
3.41 nm |
1.07 nm |
+ 8.0 ms |
2.50 nm |
0.82 nm |
+10.0 ms |
2.52 nm |
0.62 nm |
+14.0 ms |
0.93 nm |
0.21 nm |
+18.0 ms |
0.31 nm |
0.11 nm |
Key physical milestones matching across both halves:
t = 0.0 → +2.0 ms: Saturated bright poke lasting2.0 ms(triangular width of two consecutive1 msexposure averages) with 4-quadrant PyWFS diffraction cross flares; initial compression ring detaching around(19, 42).t = +2.1 → +4.1 ms: Large, bold black/white bullseye ring expanding around the poke while faster dispersive flexural arcs (f ≈ 1500–2700 Hz) sweep across the upper-right quadrant and reach the far circular rim.t = +6.5 → +8.5 ms: Broad diagonal wave fronts in the lower-left crossing reflected arcs from the free circular rim into checkerboard interference in the upper-right.t = +10.0 → +14.0 ms: Reflected waves refocus into the conjugate caustic in the upper-right quadrant (mirror of the lower-left poke) and decay cleanly into circular eigenmodes (τ = 5.1 ms).
(Note on bottom-row difference during t = 0.3–1.8 ms: in the actual SCExAO video, the bottom row is reconstructed from the saturated PyWFS measurement and exhibits a bright/dark + pyramid cross imprint; in cacaosim, the bottom row renders the exact ground-truth pupil-masked DM facesheet surface.)
2. Instantaneous DM Surface Shape w(x, y, t) vs. 1 ms Time Derivative Δw₁ₘₛ(x, y, t)
While the SCExAO measurement video (LepICSaBL-E) displays the 1 ms consecutive-exposure difference (a temporal high-pass / band-pass derivative with nulls at 1,000 and 2,000 Hz), the science and coronagraph optical beam sees the actual instantaneous DM surface shape w(x, y, t). Comparing both side-by-side in lockstep at 20 kHz reveals:
- Permanent static poke dome (
w_DC = 563 nmpeak) rising with a+28.7%dynamic overshoot (725 nmatt = +0.25 ms) before settling into its continuous-facesheet equilibrium (45%neighbor coupling). - True instantaneous far-ring surface ripples are 3–14× larger than the 1 ms derivative—peaking at
20.9 nm(4.9 nmRMS across18–36 actatt = +2.20 ms) and remaining10.7 nmatt = +7.10 msand4.8 nmatt = +11.50 ms—because the1 msexposure boxcar difference heavily attenuates the dominant1,000–1,300 Hzmembrane wave. - Unfiltered dynamic surface error
w(t) − w_DC(top-right panel) isolates the exact transient optical wavefront error injected onto the science beam without boxcar-null distortion.
Multi-Timestamp Comparison: DM Surface Shape (1×, 50×, w − w_DC) vs. 1 ms Derivative (50×)
| Post-Poke Δt | Peak Surface max |w(t)| |
Far-Ring Instantaneous Shape |w| (18–36 act) |
Far-Ring 1 ms Derivative |Δw₁ₘₛ| (18–36 act) |
|---|---|---|---|
+ 0.25 ms |
714.2 nm |
0.10 nm (0.00 nm RMS) |
0.00 nm (0.00 nm RMS) |
+ 0.50 ms |
564.7 nm |
0.24 nm (0.00 nm RMS) |
0.00 nm (0.00 nm RMS) |
+ 1.00 ms |
562.8 nm |
0.14 nm (0.00 nm RMS) |
0.00 nm (0.00 nm RMS) |
+ 1.50 ms |
557.8 nm |
11.03 nm (0.76 nm RMS) |
0.34 nm (0.03 nm RMS) |
+ 2.20 ms |
579.4 nm |
20.88 nm (4.86 nm RMS) |
1.43 nm (0.37 nm RMS) |
+ 4.10 ms |
570.6 nm |
15.68 nm (4.62 nm RMS) |
5.68 nm (1.48 nm RMS) |
+ 7.10 ms |
566.7 nm |
10.68 nm (3.22 nm RMS) |
2.69 nm (0.85 nm RMS) |
+11.50 ms |
563.8 nm |
4.76 nm (1.27 nm RMS) |
2.15 nm (0.43 nm RMS) |
+16.00 ms |
563.5 nm |
1.73 nm (0.54 nm RMS) |
0.51 nm (0.16 nm RMS) |
3. Empirical System Identification & Physical Model
flowchart LR
CMD1["Stage-1 Cmd dm01disp<br/>64×64 ALPAO Magnetic DM"] --> RC1["Voice-Coil Driver<br/>τ = 20 μs"]
RC1 --> PDE["Coupled 2D Free-Rim Plate PDE<br/>dyn_mode = plate (3), drive = force<br/>f0 = 1000 Hz, c = 14.0 m/s, β = 0.0085"]
PDE -->|"d_act_pos (VRAM)"| G1["16-Tap Sub-Pitch Gather<br/>(Physical 45% Facesheet Coupling)"]
G1 --> BEAM["Optical Beam b_post_ao3k"]
CMD2["Stage-2 Cmd dm02disp<br/>50×50 SCExAO MEMS DM"] --> RC2["Independent 1st-Order RC<br/>dyn_mode = rc (1), τ = 60 μs"]
RC2 --> G2["16-Tap Gaussian Gather<br/>(Zero Facesheet Ripples)"]
G2 --> BEAM2["Optical Beam b_post_scexao"]
BEAM --> BEAM2
Governing Coupled 2D Flexural–Membrane PDE (dyn_mode = 3)
On the circular active actuator lattice Ω = { (ax, ay) : r ≤ 0.5 · min(nx, ny) + 0.5 } (a = 1.5 mm pitch, ~2 actuator guard ring outside the clear 60-actuator optical pupil), the facesheet displacement w(x, y, t) and velocity v = ∂w/∂t satisfy:
∂²w/∂t² + (2 γ₀ - 2 γ₂ a² ∇²) ∂w/∂t + (ω₀² - c_m² ∇² + β² ∇⁴) w = ω₀² u_f
- Voice-coil force drive (
plate_drive = "force", default): Applies a localized voice-coil forceω₀² u_f(flat ink-space—avoiding the unphysicalk⁴high-pass derivative spike of displacement-coupled forcing). Underrim_bc = "free", uniform piston has exact unit gain (w = 1.0000), while a single actuator naturally produces continuous-facesheet static neighbor coupling (nb/ctr = 0.45). Optionalplate_drive = "disp"(0) remains available when exact diagonalw = uequilibrium is desired. - Empirical dispersion & boxcar-null calibration (
|F(k, f)|²fromLepICSaBL-E): 3D spatiotemporal FFT of the actual SCExAO video reveals two crisp passbands separated by the exact1,000 Hzand2,000 Hznulls of consecutive1 msexposure differences (|H(f)| ∝ sin²(π f · 1 ms) / (π f)), with modal peaks climbing from1,400–1,467 Hz(k = 4–6 c/pup) →1,600 Hz(k = 8 c/pup) →2,200 Hz(k = 12 c/pup) →2,700 Hz(k = 16 c/pup). Calibrating the discrete 5-point-stencil dispersionω²(k) = ω₀² + c_m² λ(k) + β² λ²(k)yieldsf₀ = 1,000 Hz(matching ALPAO DM3228's ~1 kHz fundamental resonance and sitting cleanly on the first1 msboxcar null sok = 6–10 c/pupripples dominate late frames),c_m = 14.0 m/s,β = 0.0085 m²/s, andγ₀ = 195 s⁻¹(τ = 5.13 ms), with group velocity rising from8.9 m/s(5 c/pup) to13.1 m/s(15 c/pup).
4. Numerical Stability, Single-SM CUDA Architecture & Benchmarks
Exact Discrete CFL Sub-Stepping & Zero-Copy VRAM Handoff
Because the discrete 5-point Laplacian has maximum eigenvalue λ_max(−∇²_h) = 8, the exact discrete spectral upper bound on the 64×64 lattice is:
ω_max = sqrt(ω₀² + 8 (c_m/a)² + 64 (β/a²)²), γ_max = γ₀ + 8 γ₂
nsub = ceil(max(dt · ω_max / 1.15, dt · γ_max / 0.45))
With the calibrated ALPAO DM3228 stiffness (ω_max = 40,600 rad/s), symplectic velocity-first Verlet requires only nsub = 2 sub-steps at 20 kHz (dt = 50 μs), nsub = 18 at 2 kHz (dt = 500 μs), and nsub = 5 at 8 kHz (4× oversampling)—cutting GPU latency substantially compared to stiffer initial estimates while maintaining a 1.74× CFL stability margin and zero numerical dissipation.
On CUDA (cacaosim_dm_cuda.cu), all nsub sub-steps execute inside a single cooperative SM block (1,024 threads × 4 actuators/thread) holding s_w, s_v, s_e, s_lap, and s_mask in 69,632 B of dynamic __shared__ memory (cudaFuncSetAttribute), with precomputed coordinates (zero integer divisions in the inner loop), Jacobi-symmetric Laplacians, and only 2 __syncthreads() per substep. Subframe-averaged actuator positions write directly to d_act_pos in VRAM and feed kernel_dm_gather_opd without a host round-trip—achieving bit-exact 0.000e+00 μm CPU–CUDA parity.
Measured Latency (Standalone DM Kernel & Full ao3k_scexao.bench, OMP_NUM_THREADS=4, RTX PRO 6000)
| Compute Pipeline | CPU (4 threads) |
CUDA (NVIDIA RTX PRO 6000) |
|---|---|---|
| DM 20×20 RC → 128×128 OPD | 28.5 μs (35.05 kHz) |
12.6 μs (p50 13.2 μs, 79.33 kHz) |
DM 50×50 MEMS (dyn_mode=rc) → 256×256 OPD |
191.3 μs (5.23 kHz) |
25.4 μs (p50 25.6 μs, 39.32 kHz) |
DM 64×64 ALPAO (dyn_mode=plate, dt=125 μs / 4× ovs, nsub=5) → 256×256 OPD |
242.9 μs (4.12 kHz) |
98.4 μs (p50 98.3 μs, 10.17 kHz) |
Full ao3k_scexao.bench (4× ovs = 8 kHz ticks, 2 DMs, 2× 16-pt PyWFS, Lyot coro, LLOWFS, 7 PSF cams) — ao3k=rc vs. ao3k=plate |
— | 2,346 μs (426 Hz) → 2,564 μs (390 Hz, +9.3%) |
(In lockstep --fast-calib RM calibration, cacaosim_dm_step_static_plate() solves the exact SPD continuous-facesheet static equilibrium (ω₀² - c_m² ∇² + β² ∇⁴) w = ω₀² u via zero-allocation Conjugate Gradient in ~0.2 ms per poke so static calibration matches the dynamic plate PDE's exact t → ∞ response.)
5. Configuration Reference (.bench, FPS, TUI & options_schema.json)
All parameters are exposed identically across .bench INI files, milk-fpsexec-cacaosim-dmsim FPS parameters, cacaosim-CTRL TUI inspector, and the Simulator Options Reference:
.bench Key |
Default | Unit | Physical Meaning |
|---|---|---|---|
dyn_mode |
"rc" (1) |
enum | "instant" (0), "rc" (1), "osc" (2), or "plate" (3, ALPAO 64×64 opt-in) |
tau_us |
20.0 |
μs |
1st-order voice-coil current driver RC pre-filter time constant |
f0_hz |
1000.0 |
Hz |
Elastic actuator foundation natural frequency f₀ = ω₀ / 2π |
act_pitch_mm |
1.5 |
mm |
Physical inter-actuator spacing a (ALPAO DM3228 = 1.5 mm) |
wave_c |
14.0 |
m/s |
Facesheet membrane tension wave speed c_m |
bend_beta |
0.0085 |
m²/s |
Kirchhoff–Love flexural dispersion coefficient β = sqrt(D / ρh) |
damp_g0 |
195.0 |
s⁻¹ |
Viscous modal decay rate γ₀ (τ_damp = 1/γ₀ = 5.1 ms) |
damp_g2 |
1.5 |
pitch²/s |
Kelvin–Voigt Laplacian damping γ₂ (suppresses high-k grain) |
plate_drive |
"force" |
enum | "force" (1, physical voice-coil force) or "disp" (0, diagonal DC w = u) |
rim_bc |
"free" |
enum | "free" (1, Neumann edge) or "clamped" (0, Dirichlet bezel) |
Default ao3k_scexao.bench Configuration (ALPAO 64×64 = Plate, MEMS 50×50 = RC)
[dm.ao3k]
nact_x = 64
nact_y = 64
if_coupling = 0.08 # sub-pitch gather; plate PDE supplies 45% physical facesheet coupling
dyn_mode = "plate"
tau_us = 20.0
f0_hz = 1000.0
act_pitch_mm = 1.5
wave_c = 14.0
bend_beta = 0.0085
damp_g0 = 195.0
damp_g2 = 1.5
plate_drive = "force"
rim_bc = "free"
[dm.scexao]
nact_x = 50
nact_y = 50
if_coupling = 0.20
dyn_mode = "rc" # 50x50 MEMS DM remains independent high-speed RC
tau_us = 60.0
Reproducibility & GitHub Provenance
All video frames, side-by-side comparisons, contact sheets, Hovmöller wave plots, dispersion curves, and latency benchmarks on this page are produced directly from compiled cacaosim binaries:
cd ~/src/cacao-work && source env.sh
# 1. Build cacaosim with CUDA support & verify 100% unit + integration tests (0.000 um GPU parity)
./scripts/build-all.sh --only cacaosim
ctest --test-dir ../cacaosim/_build --output-on-failure
# 2. Run 20 kHz single-actuator poke simulation (ALPAO 64x64 plate DM + 160x160 NIR PyWFS)
../cacaosim/_build/cacaosim-dm-poke-sim --outdir _work/dm_ripple_demo
# 3. Render standalone 20 kHz MP4 & compile Technical Report + synchronized side-by-side video
"${PYTHON_BIN}" ./scripts/build-dm-dynamics-report.py --rerun-sim
# 4. Stage & deploy to Firebase Hosting (omit --build-only to deploy live)
./scripts/publish-ao-report.sh --build-only _work/dm_dynamics_report
Machine-Readable Artifacts
- dm_dynamics_metrics.json — Complete 20 kHz ripple decay telemetry, dispersion summary, 2 kHz CPU/CUDA latency benchmarks, and configuration metadata
- ripple_metrics.json — Raw 1 ms-diff far-ring ripple amplitude table emitted by
cacaosim-dm-ripple-video - dm_poke_actual_vs_sim_20khz.mp4 — Synchronized side-by-side Actual SCExAO (
LepICSaBL-E) vs.cacaosim20 kHz video (1640×616,396frames @10 fps=39.6 s) - dm_shape_vs_deriv_20khz.mp4 — Synchronized 20 kHz video comparing instantaneous DM surface shape
w(t)(1×,50×,w − w_DC) directly above its 1 ms derivative (912×798,396frames @10 fps=39.6 s) - dm_shape_vs_deriv_contact_sheet.png — 4×6 contact sheet comparing instantaneous DM surface shape (
1×,50×,w − w_DC) against the 1 ms derivative acrosst = +0.25 → +11.50 ms - dm_poke_sim_20khz.mp4 — Standalone 400-frame
cacaosim20 kHz video (808×542, H.264yuv420p)
Additional Diagnostic Figures
Telemetry & Data Files
| File | Format | Size |
|---|---|---|
dm_dynamics_metrics.json | JSON | 7.87 KB |
ripple_metrics.json | JSON | 1.93 KB |