Two online optimizers for SLAC's SPEAR3 storage ring, where measurements are slow and noisy and the machine drifts while you tune it. MG-GPO screens evolutionary candidates with a Gaussian-process surrogate so only promising settings reach the machine; RCDS-S adds a probabilistic safety model so tuning can follow a drifting optimum without crossing an operator-set threshold. Both ran on the live ring: MLST 2020 (co-first author) and PRAB 2022 (first author).
- −1.66 mA/minloss-rate objective in ~480 evaluations; PSO −1.48
- 151evaluations to −2.9 mA/min injection efficiency; PSO −2.2
- 60 → 50 µmsafety thresholds held by RCDS-S over two live rounds
Why
Online tuning is sequential decision-making against an expensive, noisy black box: an injection-efficiency point takes about 17 seconds, a generation of thirty about 8.5 minutes, and swarm or genetic optimizers waste many of those. Drift is the second problem: performance decays over a long user run, and conventional optimizers propose settings too poor to run outside machine-study shifts.
MG-GPO: a GP filter on an evolutionary search
Each generation amplifies the current non-dominated set with PSO-style flocking, polynomial mutation and SBX crossover into 300–1,200 candidates per thirty-point generation on the machine. One Gaussian process per objective scores each candidate by the lower confidence bound μ − κσ, and non-dominated sorting with crowding distance picks the thirty to measure; κ shrinks by a fixed ratio per generation (κ₀ = 2, ρ = 0.9). The GP only ranks what the operators propose, so the overhead stays under 8 seconds per generation against 8.5 minutes of measurement.

RCDS-S: safe tuning under drift
RCDS-S keeps the conjugate-direction outer loop of RCDS and makes the line search safety-aware. The objective is assumed Lipschitz, so each observation bounds the expected value nearby; noise and drift, modelled as a Gaussian random walk whose variance grows with time, turn that bound into the probability that a point is still below the threshold. Along each direction it samples only where that probability clears a set level, taking the farthest such point; if nothing qualifies it relaxes the level in steps, then abandons the direction. Its Lipschitz constant and drift rate come from prior scans; too small risks violations, too large loses the drifting optimum.
Results


- Vertical emittance via loss rate. 13 skew quadrupoles: MG-GPO reached −1.66 mA/min in about 480 evaluations, near the best loss rate seen on SPEAR3 in recent studies; PSO reached −1.48.
- Dynamic aperture via injection efficiency. 8 chromaticity-preserving sextupole knobs: MG-GPO reached about −2.9 mA/min in 151 evaluations against −2.2 for PSO; the measured 50%-loss kick voltage rose from 0.76 to 0.9 kV.

- RCDS-S on the ring. Kicker-bump matching with one kicker modulated sinusoidally to impose a known drift, at 5 µm noise. Two rounds, thresholds 60 µm then 50 µm: RCDS-S followed the drift and kept its trial solutions under the line where plain RCDS crossed it. A few small violations occurred in both rounds (a Lipschitz constant carried over from simulation), and the paper does not recommend the method for high-risk applications.
What I did. MG-GPO was conceived by Xiaobiao Huang, who wrote the original Matlab code; I co-developed it, led the online experiments on SPEAR3, wrote the ring's Python online-optimization toolkit (spear3-opt-pkg) and maintain the public MG-GPO repository. MLST 2020 is co-first-authored with Minghao Song, equal contribution. RCDS-S I led and first-authored, with Minghao Song and Xiaobiao Huang.
Objectives are as defined in the papers (negated loss rate normalized to 500 mA; negated injection efficiency, arbitrary units). The RCDS-S runs were machine-study tests, not routine operation. MG-GPO's GP step ran in Python's GPy via Teeport.