Online Multi-Objective Particle Accelerator Optimization of the AWAKE Electron Beam Line for Simultaneous Emittance and Orbit Control

Multi-objective optimization is important for particle accelerators where various competing objectives must be satisfied routinely such as, for example, transverse emittance vs bunch length. We develop and demonstrate an online multi-time scale multi-objective optimization algorithm that performs real time feedback on particle accelerators. We demonstrate the ability to simultaneously minimize the emittance and maintain a reference trajectory of a beam in the electron beamline in CERN's Advanced Proton Driven Plasma Wakefield Acceleration Experiment (AWAKE).

Multi-objective optimization is important for particle accelerators where various competing objectives must be satisfied routinely such as, for example, transverse emittance vs bunch length. We develop and demonstrate an online multi-time scale multi-objective optimization algorithm that performs real time feedback on particle accelerators. We demonstrate the ability to simultaneously minimize the emittance and maintain a reference trajectory of a beam in the electron beamline in CERN's Advanced Proton Driven Plasma Wakefield Acceleration Experiment (AWAKE).
High energy particle accelerators are extremely powerful scientific tools, generating intense and extremely short charged particle beams and flashes of light for a wide range of research including material science and biology. Due to their size (typically > 1 km in length) and thousands of coupled components, accelerator operation, tuning, and optimization is challenging. Accelerators utilize magnets and their associated power sources to keep charged particle beams from diverging transversely and electromagnetic resonant radio frequency (RF) cavities and their associated RF amplifiers to focus and accelerate charged particle bunches longitudinally. The control of charged particle beams is a problem that lives in a 6 dimensional phase space given by (x, y, z, x , y , E) where z = (s−ct) with s the laboratory frame longitudinal coordinate along the axis of the accelerator, (x, y) the transverse particle location off axis, x = dx/ds, y = dy/ds measures of divergence, and E particle energy. These 6 dimensions are all coupled through various electromagnetic accelerator components and through the fields of the beams themselves.
Furthermore, both the components and the 6D distributions of the beams entering accelerators drift and change with time in unexpected ways and require continuous re-adjustment to maintain high beam quality. Because of their complexity, the performance of these machines is not easily quantified by a single number, there is usually a trade off between multiple objectives. For example, on a photocathode a trade off must be made between transverse emittance and bunch length because shorter bunches have higher charge density and therefore experience higher space charge forces that cause divergence 1 . Recently, multi-objective optimization approaches have been studied in simulation for RF cavity shape optimization to maximize shunt impedance while minimizing peak surface electric field 2 , for electron beam dynamics simulations of the Argonne Wakefield Accelerator Facility (AWA) 3 , and for 3D beam tracking in electrostatic beamlines 4 .
Such trade offs and control difficulties are present in all accelerators and require new advanced algorithms to quickly, accurately, automatically control and optimize charged particle beams. Machine learning (ML) methods have been used a) ascheink@lanl.gov to develop neural network-based longitudinal phase space (LPS), (z, E), diagnostics 5 . An automated algorithm has also been developed and tested in hardware on the CERN Super Proton Synchrotorn (SPS) for automated septum alignment 6 . Work has also begun on combining model-independent feedback algorithms with ML techniques to automatically control the LPS of charged particle beams, using the data-based ML methods to move quickly over large distances in parameter space, and using model-independent feedback methods to zoom in on optimal settings and to maintain them despite uncertainty and time variation of beams and components 7 .
The need for advanced control methods exists in all accelerators due to component and beam drift. A particular class of accelerators which could greatly benefit from fast, automated tuning are free electron lasers (FEL) which are extremely flexible machines providing flashes of light many orders of magnitude brighter than other existing light sources over a wide range of photon energies and pulse lengths, and are developing advanced techniques such as self seeding 8,9 . For example, the Linac Coherent Light Source 10 (LCLS) FEL provides a 0.28 to 11.2 keV photon energy range with 10 -50 fs pulse lengths, and the Swiss FEL 11 a 1.77 to 12.4 keV photon energy range with 0.2 -20 fs pulse lengths. Another example is plasma wakefield accelerators (PWFA), which are a class of machines that are studying methods to achieve an energy gain within meters for which traditional accelerators require several kilometers, and require precise control of the current profiles of accelerated bunches 12,13 .
In this work we demonstrate a general model-independent feedback algorithm which can be used for online multiobjective optimization for a wide range of particle accelerator problems by running multiple competing feedback loops simultaneously at multiple time scales. We demonstrate the strength of our algorithm by solving the multi-objective optimization problem of minimizing transverse electron beam size (σ x , σ y ) at the end of the electron beam line of CERN's Advanced Proton Driven Plasma Wakefield Acceleration Experiment (AWAKE) while maintaining a design orbit. In this approach, minimizing beam size was equivalent to minimizing emittance because only the optics at the beginning of the beam line were adjusted. Control of the electron bunch at the end of this beamline is important for the PWFA experiments that take place, sending electron bunches into the wakes gen- The first step was to demonstrate an ability to control the trajectory of the electron beam in the x-plane through 10 beam position monitors (BPM) starting with the BPMs labeled as BPM 039 through BPM 351 in figure 1, which will be referred to as BPM number 1 -10 below. Control of the trajectory was achieved by an iterative tuning of 10 horizontal steering magnets located directly in front of each BPM.
The iterative algorithm is based on a recently developed form 15 of a model-independent feedback tuning algorithm designed for high dimensional noisy systems 16 . Given a noisy measurementĈ of an analytically unknown cost function to be minimized, C, by adjusting a group of coupled parameters p = (p 1 , . . . , p m ), the method proceeds iteratively according to where each parameter p i has a unique dithering frequency ω i , α controls the dither size and may be increased to escape local minima, k is a feedback gain, increasing which may speed up convergence, and ∆ t 1 is chosen small enough such that (1) is a finite difference approximation of which results in minimization of the unknown function C (although only having access to its noise-corrupted measurements), according to the average dynamics 15,16 In this single objective case the goal was to minimize the X root mean square error (RMSE) between the trajectory and a target trajectory, as given during each iteration, n, by where BPM i (n) was the BPM measurement recorded at step n and BPM i,o was the desired orbit BPM reading. The algorithm proceeded by first introducing offsets in all steering magnets, M i (1), in order to create a large deviation from the target orbit and recording X RMSE (1). Each magnet was then adjusted iteratively according to (1) and a new value, X RMSE (2), was recorded. The tuning parameters used were: α = 0.15, k = 0.2, the ω i values were evenly distributed between 100 and 175 so that all of the frequencies were distinct and no single frequency was an integer multiple of the other, and ∆ t = 2π/(10×max{ω i }). The results of this optimization are shown in figure 2. It is clear that despite a large energy and therefore trajectory jitter due to the beam line's Klystron, the algorithm was able to achieve convergence within 30 steps. The next objective was to utilize two such feedbacks simultaneously, at two different time scales, for multi-objective optimization. One feedback was used to adjust two solenoids and three quadrupole magnets directly following the electron beam source, to minimize electron beam size at the end of the beam line. For this feedback we recorded beam images, as shown in figure 4, projected them onto the x and y axes, and then fit Gaussian distributions of the form and estimated beam size based on σ x and σ y as which was the cost to be minimized according to (1). The tuning parameters used for this feedback were: α = 0.1 for each Solenoid and α = 0.05 for each quadrupole magnet, k = 1.0, and ω i evenly distributed between 100 and 175, and ∆ t,2 = 2π/(31 × max{ω i }). These adjustments caused trajectory changes, driving the beam off of the beam-size detector or close to the available aperture. A second feedback, which has already been described above, running on a faster time scale, was simultaneously run to continuously adjust 10 steering magnets, based on 10 beam position monitor readings, to maintain a prescribed reference trajectory for the beam. The overall setup is shown in figure 1. The beam size feedback had a value of ∆ t,2 < ∆ t /3, and therefore ran at a different time scale from the trajectory maintaining feedback, 3 times slower, allowing for the steering magnets to quickly compensate for trajectory deviations caused by changes in the solenoid and quadrupole magnets.
The simultaneous evolution of all of the 15 components is shown in figure 3 alongside the evolution of the two objectives. By running the two feedback loops simultaneously we were able to solve the multi-objective problem: with weights w 1 = 0.2, w 2 = 1.0. This approach was able to  continuously re-adjust steering magnets attempting to maintain the target beam orbit, thereby keeping the beam on the screen and allowing the second feedback to minimize the beam size, resulting with a decrease over 2× more than what had previously been achieved, as shown in figure 4.
The experiment also demonstrated possible limitations of this model-independent feedback approach. Because the cost function was only based on maintaining a trajectory and minimizing beam size, it did not penalize beam loss. In figure 5 we plot the evolution of the beam size, σ xy together with the evolution of detector image sums, as well as a measurement of intensity given by sum/σ xy . As beam size is decreased and intensity is increased, it appears that we are also losing some of the beam. Future work would take into account additional information about the beam, including beam losses. This demonstration of the use of multiple feedbacks at various time scales for simultaneous multi-objective optimization for particle accelerators is a very general approach that is robust to noise and time-variation of components and beam properties. This general approach can be useful for a wide range of accelerator problems. One important example of this may be maintaining a desired beam trajectory and maximizing FEL output power while adjusting bunch energy, length, and charge. Such adjustments are frequently made at FELs when switching between different users, all of which have unique Xray frequency and pulse duration requirements, sometimes require many hours of expert tuning for large changes, and must be continuously adjusted during steady state operation due to beam and accelerator component fluctuations. The same is true of precisely tuned bunch current profiles at PWFAs.