Virtual accelerators and digital twins are increasingly essential tools for accelerator operations, controls development and verification, and model-based optimization. However, current implementations are often tightly coupled to specific simulation codes, facilities, and applications, resulting in fragmented, ad hoc solutions that are difficult to reuse or extend. To address this, we expand the LUME Python package to include standardized implementation and deployment of virtual accelerators and digital twins across heterogeneous simulation backends and control system interfaces. At the core of this change is the introduction of LUMEModel abstraction, which defines a fixed, simulator-agnostic API and a variable system that encodes metadata such as units and data types/validation. This design enables standardized interaction with physics-based simulators, surrogate models, and differentiable simulations, while supporting both Python-native workflows and IOC-based operation via EPICS using the lume-pva package. Facility- and simulator-specific details are encapsulated through extensible transformer layers, allowing consistent control-system semantics to be mapped onto diverse simulation engines. We describe the LUMEModel architecture, variable system, and package ecosystem, and present representative use cases including model interchangeability, staged and chained simulators, and continuous integration testing. This work will make implementing and using virtual accelerators easier and more flexible.
Although beam emittance is critical for the performance of high-brightness accelerators, optimization is often time limited as emittance calculations, commonly done via quadrupole scans, are typically slow. Such calculations are a type of multipoint query, i.e. each query requires multiple secondary measurements. Traditional black-box optimizers such as Bayesian optimization are slow and inefficient when dealing with such objectives as they must acquire the full series of measurements, but return only the emittance, with each query. We propose a new information-theoretic algorithm, Multipoint-BAX, for black-box optimization on multipoint queries, which queries and models individual beam-size measurements using techniques from Bayesian Algorithm Execution (BAX). Our method avoids the slow multipoint query on the accelerator by acquiring points through a virtual objective, i.e. calculating the emittance objective from a fast learned model rather than directly from the accelerator. We use Multipoint-BAX to minimize emittance at the Linac Coherent Light Source (LCLS) and the Facility for Advanced Accelerator Experimental Tests II (FACET-II). In simulation, our method is 20× faster and more robust to noise compared to existing methods. In live tests, it matched the hand-tuned emittance at FACET-II and achieved a 24 lower emittance than hand-tuning at LCLS. Our method represents a conceptual shift for optimizing multipoint queries, and we anticipate that it can be readily adapted to similar problems in particle accelerators and other scientific instruments.
Ultrafast electron diffraction using MeV energy beams(MeV-UED) has enabled unprecedented scientific opportunities in the study of ultrafast structural dynamics in a variety of gas, liquid and solid state systems. Broad scientific applications usually pose different requirements for electron probe properties. Due to the complex, nonlinear and correlated nature of accelerator systems, electron beam property optimization is a time-taking process and often relies on extensive hand-tuning by experienced human operators. Algorithm based efficient online tuning strategies are highly desired. Here, we demonstrate multi-objective Bayesian active learning for speeding up online beam tuning at the SLAC MeV-UED facility. The multi-objective Bayesian optimization algorithm was used for efficiently searching the parameter space and mapping out the Pareto Fronts which give the trade-offs between key beam properties. Such scheme enables an unprecedented overview of the global behavior of the experimental system and takes a significantly smaller number of measurements compared with traditional methods such as a grid scan. This methodology can be applied in other experimental scenarios that require simultaneously optimizing multiple objectives by explorations in high dimensional, nonlinear and correlated systems.
Particle accelerators support a wide array of scientific, industrial, and medical applications. To meet the needs of these applications, accelerator physicists rely heavily on detailed simulations of the complicated particle beam dynamics through the accelerator. One of the most computationally expensive and difficult-to-model effects is the impact of Coherent Synchrotron Radiation (CSR). As a beam travels through a curved trajectory (e.g. due to a bending magnet), it emits radiation that in turn interacts with the rest of the beam. At each step through the trajectory, the electromagnetic field introduced by CSR (called the CSR wakefield) needs to computed and used when calculating the updates to the positions and momenta of every particle in the beam. CSR is one of the major drivers of growth in the beam emittance, which is a key metric of beam quality that is critical in many applications. The CSR wakefield is very computationally intensive to compute with traditional electromagnetic solvers, and this is a major limitation in accurately simulating accelerators. Here, we demonstrate a new approach for the CSR wakefield computation using a neural network solver structured in a way that is readily generalizable to new setups. We validate its performance by adding it to a standard beam tracking test problem and show a ten-fold speedup along with high accuracy.
Current and future experiments at LCLS require XFEL pulse trains of variable time separation. The cavity based XFEL (CBXFEL) project requires multiple pulses separated by 220 ns, the X-ray Laser Oscillator (XLO) uses 15 ns spaced pulse trains and Matter under Extreme Conditions (MEC) experiments need a shortly spaced (less than 5 ns) pulse trains. In this proceeding, we discuss the LCLS multibunch improvement plan and report on its recently status and progress.
We present a novel nonlinear laser shaping technique to increase X-ray Free Electron Laser brightness and preliminary results estimate an improvement of 25% in emittance relative to the standard configuration of the LCLS-II.
SLAC is developing the Lightsource Unified Modeling Environment (LUME) for efficient modeling of X-ray free electron laser (XFEL) performance. This project takes a holistic approach starting with the simulation of the electron beams, to the production of the photon pulses, to their transport through the optical components of the beamline, to their interaction with the samples and the simulation of the detectors, and finally followed by the analysis of simulated data. LUME leverages existing, well-established simulation codes, and provides standard interfaces to these codes via open-source Python packages. Data are exchanged in standard formats based on openPMD and its extensions. The platform is built with an open, well-documented architecture so that science groups around the world can contribute specific experimental designs and software modules, advancing both their scientific interests and a broader knowledge of the opportunities provided by the exceptional capabilities of X-ray FELs.
Machine learning (ML) models of accelerator systems ('surrogate models') are able to provide fast, accurate predictions of accelerator physics phenomena. However, approaches to date typically do not include measured input diagnostics, such as the initial beam distributions, which are critical for accurately representing the beam evolution through the system. In addition, these inputs often vary over time, and models that can account for these changing conditions are needed. As beam time for measurements is often limited, simulations are in some cases needed to provide sufficient training data. These typically represent the designed machine before construction; however, the behavior of the installed components may be quite different due to changes over time or static differences that were not modeled. Therefore, surrogate models that can leverage both simulation and measured data successfully are needed. We introduce an approach based on convolutional neural networks that uses the drive laser distribution and scalar settings as inputs for a photoinjector system model (here, the linac coherent light source II, LCLS-II, injector frontend). The model is able to predict scalar beam parameters and the transverse beam distribution downstream, taking into account the impact of time-varying non-uniformities in the initial transverse laser distribution. We also introduce and evaluate a transfer learning procedure for adapting the surrogate model from the simulation domain to the measurement domain, to account for differences between the two. Applying this approach to our test case results in a model that can predict test sample outputs within a mean absolute percent error of 9%. This is a substantial improvement over the model trained only on simulations, which has an error of 261% when applied to measured data. While we focus on the LCLS-II Injector frontend, these approaches for improving ML-based online modeling of injector systems could be easily adapted to other accelerator facilities.
With the advent of increased computational resources and improved algorithms, machine learning-based models are being increasingly applied to complex problems in particle accelerators. However, such data-driven models may provide overly confident predictions with unknown errors and uncertainties. For reliable deployment of machine learning models in high-regret and safety-critical systems such as particle accelerators, estimates of prediction uncertainty are needed along with accurate point predictions. In this investigation, we evaluate Bayesian neural networks (BNN) as an approach that can provide accurate predictions along with reliably quantified uncertainties for particle accelerator problems, and compare their performance with bootstrapped ensembles of neural networks. We select three accelerator setups for this evaluation: a storage ring, a photoinjector, and a linac. The problems span different data volumes and dimensionalities (e.g., scalar predictions as well as image outputs). It is found that BNN provide accurate predictions of the mean along with reliable estimates of predictive uncertainty across the test cases. In this vein, BNN may offer an attractive alternative to deterministic deep learning tools to generate accurate predictions with quantified uncertainties in particle accelerator applications.
Particle accelerators are used in a wide array of industrial, medical, and scientific applications. Accurate system models can be useful in experiment planning and in operation of these systems, for example, in model-based tuning schemes. To this end, machine learning is increasingly being applied for modeling particle accelerators, and neural networks are a popular choice of modeling paradigm as they can handle the large data sets and high-dimensional data that is common in this domain, such as particle beam images, spectra. However, for their deployment in high-regret and safety-critical systems, estimates of the predictive uncertainty are essential. Here we evaluate Bayesian Neural Networks to provide accurate predictions, with quantified uncertainties for particle accelerator systems. We select problems across different accelerator designs (a storage ring, a beam line for a free electron laser and an injector system). The cases also have diverse data volumes and formats, e.g. particle beam phase space images and scalar parameters. We show that Bayesian Neural Networks provide accurate predictions with reliable uncertainty estimates across diverse accelerator problems.
High-fidelity physics simulations are powerful tools in the design and optimization of charged particle accelerators. However, the computational burden of these simulations often limits their use in practice for design optimization and experiment planning. It also precludes their use as online models tied directly to accelerator operation. We introduce an approach based on machine learning to create nonlinear, fast-executing surrogate models that are informed by a sparse sampling of the physics simulation. The models are 10^6 to 10^7 times more efficient to execute.We also demonstrate that these models can be reliably used with multi-objective optimization to obtain orders-of-magnitude speedup in initial design studies and experiment planning. For example, we required 132 times fewer simulation evaluations to obtain an equivalent solution for our main test case, and initial studies suggest that between 330 to 550 times fewer simulation evaluations are needed when using an iterative retraining process. Our approach enables new ways for high-fidelity particle accelerator simulations to be used, at comparatively little computational cost.
Particle accelerators are used in a wide array of medical, industrial, and scientific applications. To meet the needs of these applications, the controllable settings of the accelerator are often optimized to produce specific particle beam parameters, both during the initial design of the system and on-the-fly during operation (i.e. "tuning"). For example, at the Linac Coherent Light Source (LCLS) at the SLAC National Accelerator Laboratory, settings are adjusted for each scientific experiment to create custom electron beam shapes and energies. At present, this process relies heavily on manual tuning by human operators and simplified analytic models that do not fully capture the system behavior. There is growing interest in using machine learning to help model and control accelerators like the LCLS. Here, we discuss ongoing work in using machine learning to create fast-executing, accurate surrogate models that can aid this tuning process.
Machine learning (ML) is a subfield of artificial intelligence. The term applies broadly to a collection of computational algorithms and techniques that train systems from raw data rather than a priori models. ML techniques are now technologically mature enough to be applied to particle accelerators, and we expect that ML will become an increasingly valuable tool to meet new demands for beam energy, brightness, and stability. The intent of this white paper is to provide a high-level introduction to problems in accelerator science and operation where incorporating ML-based approaches may provide significant benefit. We review ML techniques currently being investigated at particle accelerator facilities, and we place specific emphasis on active research efforts and promising exploratory results. We also identify new applications and discuss their feasibility, along with the required data and infrastructure strategies. We conclude with a set of guidelines and recommendations for laboratory managers and administrators, emphasizing the logistical and technological requirements for successfully adopting this technology. This white paper also serves as a summary of the discussion from a recent workshop held at SLAC on ML for particle accelerators.
The LCLS-II free-electron laser will be an upgrade of the existing Linac Coherent Light Source (LCLS), including a 4GeV CW superconducting linac based on the TESLA technology. The high quality factor of the cavity makes it very sensitive to vibrations. The shift of its eigenfrequency (i.e., detuning) will be compensated by the power source in order to assure a constant accelerating voltage. Significant variations of the forward power are expected which result in coupler kick variations induced by the fundamental power coupler. In this work we estimate the magnitude of trajectory jitter caused by these variations. High precision 3D field maps including standing and traveling-wave components for a cavity with the LCLS-II coupler design are presented.