1 of 24

Applying Bayesian Optimization to Achieve Optimum Cooling at the Low Energy RHIC Electron Cooling System

11/09/2021

Yuan Gao, Weijian (Lucy) Lin, Kevin Brown, Xiaofeng Gu,

Georg Hoffstaetter, John Morris, Sergei Seletskiy

2 of 24

2

Relativistic Heavy Ion Collider

  • Two 3.8 km counter-rotating supper-conducting rings;
  • 6 Interaction Regions (IR);

LEReC

3 of 24

3

  • LEReC is used to increase the luminosity, it was successfully improved the luminosity multifold in 2020 and 2021 runs.

  • 704 MHz e-bunches (grouped into 9 MHz macro-bunches) are produced from the photocathode and accelerated in the SRF cavity to the designed energy (1.6 MeV, 2 MeV).

  • Those e-bunches are delivered to the cooling sections (20 meter), where they co-travel with ion bunches.

LEReC System Overview

4 of 24

4

  • BPM Measurement errors;
  • An independent way to optimize the cooling performance.

Method

  • Bayesian Optimization (BO): a powerful tool for finding the extrema of objective functions that are expensive to evaluate;
  • It is called Bayesian because it uses the famous “Bayes’ theorem”

Motivations

Expensive function

Surrogate model

Acquisition function sampling

Update

Output

Criterion met?

5 of 24

5

Simulation Settings

  • A LEReC simulator is used to output the transverse cooling rate, taking the BPMs as the inputs.

  • Ions are assumed at the center position (x=0, y=0).

  • To get a quick idea of the optimization, BO takes only 2 parameters as the inputs, rms and std of the electron positions.

6 of 24

6

Simulation Results

  • An electron trajectory that has more overlapping with the ion beam produce faster cooling rate.

7 of 24

7

Experiment Settings

 

Goal

 

correctors

BPMs

8 of 24

8

  • Input: 4 BPMs, each has a range of [-3, 3] mm;
  • Objective: cooling rate;
  • 40 initial samples, go through the entire range randomly;
  • The objective exhibits a pattern, it favors input positions around 0.

Initial Sampling

9 of 24

9

 

Optimization Strategy in the Presence of Noise

10 of 24

10

 

Smoothing by Moving Average

Number

Number

11 of 24

11

  • Results are generated using an average window of 15 points;

Results

Number

12 of 24

12

  • The algorithm can tune electrons from the farthest positions to the center and maintain the trajectories.

Electron Positions Controlled by BO

13 of 24

  • Only picked first 4 BPMs as input parameters due to limited beam time

  • Real system: 16 BPMs in two cooling sections, other possible system parameters that effect cooling rate

  • algorithm that converges faster and consider more information/parameters of the real system
    • Physics-informed Gaussian Process Optimization
    • Contextual Gaussian Process Optimization

13

Future Work

Goal

14 of 24

  • A probability distribution over possible functions that fit a set of points
  • Mean function + Covariance function

14

Gaussian Process

Kernel

 

[Brochu et al, 2010]

15 of 24

  • Guide how input space should be explored during optimization
  • Combine predicted mean and variance from Gaussian Process model
    • Probability Improvement (PI)
    • Expected Improvement (EI)
    • Upper Confidence Bound (UCB)

15

Acquisition Function

 

[Brochu et al, 2010]

16 of 24

 

16

Physics-informed Gaussian Process Optimization

17 of 24

 

[Hanuka et al, 2020]

 

 

Physics-informed Gaussian Process Optimization

17

18 of 24

  • Test function: 4-dimensional Gaussian-like function centered at the origin
  • Both data-informed GP and physics-informed GP converges
  • Physics-informed is faster and more stable

Result comparison: Physics-informed GP

18

19 of 24

  •  

Normalized ion intensity and beam size vs. time

Time (s)

 

 

Contextual Gaussian Process (CGP) Optimization

19

[Krause & Ong, 2021]

Beam size

Ion intensity

20 of 24

  • Test function: sum of 4-dimensional Gaussian-like function centered at zero and periodic sinusoidal function
  • 20 initial samples are used to train the algorithms
  • Without CGP: GP model has no knowledge of the sinusoidal function, takes 4-dimensional inputs
  • With CGP: GP model takes 5-dimensional inputs, kernel is the sum of input kernel and context kernel

20

Test CGP: objective function with context

21 of 24

  • Without CGP: algorithm unable to converge due to varying context
  • With CGP: algorithm converges in 7 steps with 20 initial training samples

21

Result comparison: Contextual GP

22 of 24

22

  • The BO method is very effective in optimizing the cooling performance at LEReC

  • It also verifies the correctness of the traditional orbit correction program and the BPM calibrations

  • It opens many possibilities of trying different machine learning methods on optimizing performance for control tasks in the RHIC complex, as well as the future EIC
    • i.e. Coherent electron Cooling (CeC) experiment at RHIC

Conclusion & Outlook

23 of 24

23

Conclusion & Outlook

  • Machine learning for improving CeC operations

 

24 of 24

24

  • [1] Y. Gao, W. Lin, et al., Applying Bayesian Optimization to Achieve Optimum Cooling at the Low Energy RHIC Electron Cooling System, Manuscript submitted to Phys. Rev. Accel. Beams, Sept. 2021.
  • [2] E. Brochu, V. M. Cora, and N. de Freitas, A Tutorial on Bayesian Optimization of Expensive Cost Functions, with Application to Active User Modeling and Hierarchical Reinforcement Learning (2010), arXiv:1012.2599.
  • [3] A. Hanuka, X. Huang, J. Shtalenkova, et al., Physics model-informed gaussian process for online optimization of particle accelerators, Phys. Rev. Accel. Beams 24, 072802 (2021).
  • [4] A. Krause and C. Ong, Contextual gaussian process bandit optimization, in Advances in Neural Information Processing Systems (NIPS), Vol. 24, edited by J. Shawe-Taylor, R. Zemel, P. Bartlett, F. Pereira, and K. Q.Weinberger (Curran Associates, Inc., 2011).

References