Analysis of beam position monitor requirements with Bayesian Gaussian regression
Abstract
With a Bayesian Gaussian regression approach, a systematic method for analyzing a storage ring’s beam position monitor (BPM) system requirements has been developed. The ultimate performance of a ring-based accelerator, based on brightness or luminosity, is determined not only by global parameters, but also by local beam properties at some particular points of interest (POI). BPMs used for monitoring the beam properties, however, can not be located at these points. Therefore, the underlying and fundamental purpose of a BPM system is to predict whether the beam properties at POIs reach their desired values. The prediction process is a regression problem with BPM readings as the training data, but containing random noise. A Bayesian Gaussian regression approach can determine the probability distribution of the predictive errors, which can be used to conversely analyze the BPM system requirements. This approach is demonstrated by using turn-by-turn data to reconstruct a linear optics model, and predict the brightness degradation for a ring-based light source. The quality of BPMs was found to be more important than their quantity in mitigating predictive errors.
I introduction
The ultimate performance of a ring-based accelerator is determined not only by certain critical global parameters, such as beam emittance, but also by local properties of the beam at particular points of interest (POI). The capability of diagnosing and controlling local beam parameters at POIs, such as beam size and divergence, is crucial for a machine to achieve its design performance. Examples of POIs in a dedicated synchrotron light source ring include the undulator locations, from where high brightness X-rays are generated. In a collider, POIs are reserved for detectors in which the beam-beam luminosity is observed. However, beam diagnostics elements, such as beam position monitors (BPM) are generally placed outside of the POIs as the POIs are already occupied. An intuitive, but quantitatively unproven belief, is that the desired beam properties at the POIs can be achieved once the beam properties are well-controlled at the location of the BPMs.
Using observation data at BPMs to indirectly predict the beam properties at POIs is a regression problem and can be treated as a supervised learning process: BPM readings at given locations are used as a training dataset. Then a ring optics model with a set of quadrupole excitations as its arguments is selected as the hypothesis. From the dataset, an optics model needs to be generalized first. Based on the model, the unknown beam properties at POIs can be predicted. However, there exists some systematic error and random uncertainty in the BPMs’ readings, and the quantity of BPMs (the dimension of the training dataset) is limited. Therefore, the parameters in the reconstructed optics model have inherent uncertainties, as do the final beam property predictions at the POIs. The precision and accuracy of the predictions at the POIs depend on the quantity of BPMs, their physical distribution pattern around the ring, and their calibration, resolution, etc. When a BPM system is designed for a storage ring, however, it is more important to consider the inverse problem: i.e. How are the BPM system technical requirements determined in order to observe whether the ring achieves its desired performance? In this paper, we developed an approach to address this question with Bayesian Gaussian regression.
In statistics, a Bayesian Gaussian regression Rasmussen and Williams (2006); Bishop (2006) is a Bayesian approach to multivariate regression, i.e. regression where the predicted outcome is a vector of correlated random variables rather than a single scalar random variable. Every finite collection of the data has a normal distribution. The distribution of generalized arguments of the hypothesis is the joint distribution of all those random variables. Based on the hypothesis, a prediction can be made for any unknown dataset within a continuous domain. In our case, multiple BPMs’ readings are normally distributed around their real values. The standard deviations of the Gaussian distributions are BPM’s resolutions. A vector composed of quadrupoles’ mis-settings is the argument to be generalized. The prediction at the POIs is the function of this vector. The continuous domain is the longitudinal coordinate along a storage ring.
To further explain this approach, the remaining sections are outlined as follows: Sect. II introduces the relation between machine performance and beam diagnostics system capabilities. Sect. III explains the procedure to apply the Bayesian Gaussian regression in the ring optics model reconstruction, and the prediction of local optics properties at POIs. In Sect. IV, the National Synchrotron Light Source II (NSLS-II) storage ring and its BPM system are used to illustrate the application of this approach. Some discussion and a brief summary is given in Sect. V.
Ii machine performance and beam diagnostics capability
As mentioned previously, ultimate performance of a ring-based accelerator relies heavily on local beam properties at particular POIs. Consider a dedicated light source ring. Its ultimate performance is measured by the brightness of the X-rays generated by undulators. The brightness of undulator emission is determined by the transverse size of both the electron and photon beam and their angular divergence at their source points Lindberg and Kim (2015); Walker (2017); Chubar and Elleaume (1998); Hidas (2017). Therefore, the undulator brightness performance depends on the ring’s global emittance and the local transverse optics parameters,
(1) |
Here are the electron beam emittances, which represent the equilibrium between the quantum excitation and the radiation damping around the whole ring. are the Twiss parameters Courant and Snyder (1958), are the dispersion and its derivative at the undulators’ locations, is the electron beam energy spread and are the X-ray beam diffraction “waist size” and its natural angular divergence, respectively. The X-ray wavelength , is determined based on the requirements of the beam-line experiments, and is the undulator periodic length. The emittance was found to be nearly constant with small -beat (see Sect. IV). Therefore, monitoring and controlling the local POI’s Twiss parameters are crucial.
The final goal of beam diagnostics is to provide sufficient, accurate observations to reconstruct an online accelerator model. Modern BPM electronics can provide the beam turn-by-turn (TbT) data, which is widely used for the beam optics characterization and the model reconstruction. Based on the model, we can predict the beam properties not only at the locations of monitors themselves, but more importantly at the POIs. The capability of indirect prediction of the Twiss parameters at POIs eventually defines the BPM system requirements on TbT data acquisition. Based on Eq. (1), how precisely one can predict the bias and the uncertainty of Twiss parameters and at locations of undulators is the key problem in designing a BPM system. Therefore, to specify the technical requirements of a BPM system, the following questions need to be addressed: in order to make an accurate and precise prediction of beam properties at POIs, how many BPMs are needed? How should the BPMs be allocated throughout the accelerator ring, and how precise should the BPM TbT reading be?
In the following section a method of reconstructing the linear optics model, and determining the brightness performance for a ring-based light source will be discussed. For a collider ring, its luminosity is determined only by the beam sizes at the interaction points Herr and Muratori (2003). Gaussian regression analysis can therefore be applied to predict its and luminosity as well.
Iii Gaussian regression for model reconstruction and prediction
When circulating beam in a storage ring is disturbed, a BPM system can provide its TbT data at multiple longitudinal locations. TbT data of the BPMs can be represented as an optics model plus some random reading errors,
(2) |
here is the index of turns, is a variable dependent on turn number, is the envelope function of Twiss parameters at location, is the betatron tune, is the betatron phase, and is the BPM reading noise Calaga and Tomás (2004); Langner et al. (2016); Cohen-Solal (2010), which generally has a normal distribution. Based on the accelerator optics model defined in Eq. (2), we can extract a set of optics Twiss parameters at all BPM locations Castro-Garcia (1996); Irwin et al. (1999); Huang et al. (2005); Tomás et al. (2017). Recently, Ref. Hao et al. (2019) proposed using a Bayesian approach to infer the mean and uncertainty of Twiss parameters at BPMs simultaneously. The mean values of represent the most likely optics pattern. The random BPM reading error and the simplification of the optics model can result in some uncertainties, , in the inference process,
(3) |
here is a vector composed of all normalized quadrupole focusing strengths, and is the inference uncertainty. Unless otherwise stated, bold symbols, such as “”, are used to denote vectors and matrices throughout this paper. In accelerator physics, the deviation from the design model is often referred to as the -beat. From the point of view of model reconstruction, the -beat is due to quadrupole excitation errors and can be determined by
(4) |
where represents the quadrupoles’ nominal setting and is the nominal envelope function along . is the response matrix composed of elements observed by the BPMs. The dependency of on is not linear in a complete optics model. However, when quadrupole errors are small enough, the dependence can be approximated as a linear relation as illustrated in Fig. 1. The approximation holds for most operational storage rings, and other diffraction limited light sources under design or construction. A linear approximation allows us to use the linear regression approach for this process. Eq. (3) or (4) is a hypothesis with the unknown arguments or , which need to be generalized from BPM measurement data.
Given a set of inferred optics parameters s at multiple locations from BPM TbT data, the posterior probability of the quadrupole error distribution can be given according to Bayes theorem,
(5) | |||||
Here is referred to as the likelihood function,
(6) | |||||
Once the mean value of the optics measurement is extracted from the TbT data, a prior quadrupole excitation error distribution can be determined by comparing them against the design optics model Li et al. (2019),
(7) |
in which the variance of the prior distribution is linearly proportional to the mean value of the measured -beat,
(8) |
The coefficient can be computed based on the optics model either analytically or numerically before carrying out any measurement. In the NSLS-II ring, , i.e. a -beat corresponds to a distribution of quadrupole errors with the standard deviation .
Both the likelihood function and the prior distribution are generally normally distributed. Therefore, the posterior distribution is a normal distribution by summing over the arguments of the exponentials in Eq. (6) and (7),
(9) |
Here
(10) |
The identity matrix is used in Eq. (10) because all BPMs’ resolutions are assumed to have the same values . In reality, however, needs to be replaced with a diagonal matrix with different elements if the BPMs’ resolutions are different. The quadrupoles’ error distribution matrix needs to be processed in the same way if necessary. The mean value of the posterior, corresponding to the most likely quadrupole error distribution, can be used to implement the linear optics correction as explained in Ref. Li et al. (2019),
(11) |
where . Adding an extra term to prevent overfitting is known as the regularization technique. The posterior variance represents the uncertainty of quadrupole errors.
(12) |
Given -beats observed at , the posterior generalizes an optics model, in which the quadrupoles errors are normally distributed,
(13) |
with the mean value and the variance given by Eq. (11) and (12) respectively.
Thus far, the optics are measured at the locations of the BPMs, and the corresponding quadrupole error distributions are generalized based on the measurements. To confirm the machine brightness performance, we need to predict the beam properties at POIs. To do so, the output of all possible posterior quadrupole error distributions must be averaged,
(14) | |||||
Here is the predicted result at POIs’ locations given the measured at . The mean values and the variances of the predicted distributions at POIs are
(15) |
is the Jacobian matrix of the optics response to quadrupole errors observed at POIs. The difference between the mean value and the real at a POI is referred to as the predicted bias. By substituting the bias and the uncertainty back into Eq. (1), we can estimate how accurate the brightness could be measured for given BPMs’ resolutions. Based on the desired brightness resolution, we can determine the needed quantity and resolution of BPMs.
Iv Application to NSLS-II ring
In this section, we use the NSLS-II ring and its BPM system TbT data acquisition functionality to demonstrate the application of this approach. NSLS-II is a generation dedicated light source. All undulator source points (POIs) are located at non-dispersive straights. A typical photon energy from undulators is around 10 , with corresponding wavelengths around 0.124 . The undulators’ period length is 20 . The horizontal beam emittance is 0.9 including the contribution from 3 damping wigglers. The emittance coupling ratio can be controlled to less than 1%. At its 15 short straights centers, the Twiss parameters are designed to be as low as , and to generate the desired high brightness x-ray beam from the undulators.
The horizontal emittance growth with an optics distortion was studied by carrying out a lattice simulation. With -beat at a few percent, the corresponding and -distortions were generated by adding some normally distributed quadrupole errors based on Eq. (7) and (8). The horizontal emittance was found to grow slightly with the average -beats as illustrated in Fig. 2. When there is about a 1% horizontal -beat (), the emittance increases by only about 0.1%, which is negligible. Therefore, in the following calculation, the emittance was represented as a constant.
Degradation of an undulator brightness is determined by its local optics distortion which can be evaluated with Eq. (1). Multi-pairs of simulated were incorporated into the previously specified undulator parameters to observe the dependence of the X-ray brightness on the -beat (see Fig. 3). A change of approximately 1% of the in the transverse plane can degrade the brightness by about 1%. In other words, in order to resolve a 1% brightness degradation, the predictive errors of the ring optics (including the bias and uncertainty) at the locations of undulators should be less than 1%. Because multiple undulators are installed around the ring, the predicted performance needs to be evaluated at all POIs simultaneously.
There exist two types of errors in Eq. (2) which can introduce uncertainties in characterizing the optics parameters at BPMs. First, due to radiation damping, chromatic decoherence and nonlinearity, a disturbed bunched-beam trajectory is not a pure linear undamping betatron oscillation Meller et al. (1987). A reduced model (for example, assuming is a constant), will introduce systematic errors Malina et al. (2017); Carlà et al. (2016); Franchi et al. (2014); Langner et al. (2016). The second error source is the BPM TbT resolution limit, which results in random noise. At NSLS-II, the BPM TbT resolution at low beam current () is inferred as . When a order polynomial function is used to represent the turn-dependent amplitude , the inferred function resolution at BPMs can be reached as low as 0.5% Hao et al. (2019).
First we studied the dependence of predictive errors on the quantity of BPMs. A comprehensive simulation was set up to compare the Gaussian regression predictive errors with the real errors. A linear optics simulation code was used to simulate the distorted optics due to a set of quadrupole errors. The -beats observed at the BPMs were marked as the “real” values. On top the real values, 0.5% random errors were added to simulate one-time measurement uncertainty seen by the BPMs. A posterior distribution Eq. (11) and (12) of the quadrupole errors was obtained by reconstructing the optics model with the likelihood function Eq. (6), and the prior distribution (7) and (8). The predicted optics parameters with their uncertainties were then calculated based on another likelihood function between quadrupoles and the locations of undulators with Eq. (14).
The results of comparison are illustrated in Fig.4. As with any regression problem, the training data distribution (i.e. the BPM locations) should be as uniform as possible within the continuous domain. There are 30 cells in the NSLS-II ring, and each cell has 6 BPMs. Equal numbers of BPMs were selected from each cell to make the training data uniformly distributed. The goal was to predict all straights optics simultaneously. The predicted performance was therefore evaluated by averaging at multiple straight centers. Initially, one BPM was selected per cell. The number of selected BPMs was then gradually increased to observe the evolution of predictive errors. It was found that utilizing more BPMs improved the predicted performance, as expected. Both the bias and uncertainty were reduced with the quantity of BPMs. However, the improvement became less and less apparent once more than 4 BPMs per cell were used.
Next, we studied the effect of measurement resolution on the predictive errors. A similar analysis was carried out but with different -resolution as illustrated in Fig. 5. By observing Fig. 5, several conclusions can be drawn: (1) The degradation of the resolution reduced the accuracy of the generalized optics model. However, this can be improved by applying a more complicated optics model Hao et al. (2019). Thus, the BPM TbT resolution is the final limit on the resolution of parameters. In order to accurately and precisely predict the beam properties at POIs, improving the resolution of BPMs is crucial. (2) After a certain point, the predicted performance is not improved significantly with the quantity of BPMs as seen in both Fig 4 and 5. The advantage of reduction of predictive errors will gradually level out once enough BPMs are used. Meaning, the improvement in error reduction will eventually become negligible compared to the cost of adding more BPMs. The higher the resolution each individual BPM has, the less number of BPMs are needed. There should be a compromise between the required quality and quantity of BPMs to achieve an expected predictive accuracy. (3) The quality (resolution) is much more important than the quantity of BPMs from the point of view of optics characterization. For example, at NSLS-II, in order to resolve 1% brightness degradation, at least 120 BPMs with a resolution better than 1% are needed, or 90 BPMs with a 0.75% resolution, etc. Having more BPMs than is needed creates no obvious, significant improvement. Having 60 high precision (0.5% -resolution) BPMs yields a better performance than having 180 low precision (1%) BPMs in this example.
V Summary
A systematic approach has been proposed to analyze a BPM system’s technical requirements. The approach is based on the resolution requirements for monitoring a machine’s ultimate performance. The Bayesian Gaussian regression is useful in statistical data modelling, such as reconstructing a ring’s optics model from beam TbT data. The optics properties of the ring are contained in a collection of data having a normal distribution. It is worth noting that our approach is simplified as a linear regression by assuming a known linear dependence of optics distortion on quadrupole errors. If a ring’s optics are significantly different from the design model, this assumption is not valid, and the analysis may be not accurate either. In this case, we need to iteratively calculate the likelihood function by incorporating the posterior mean of quadrupole errors Eq. (11) and compare it to the optics model until the best convergence is reached. This was not discussed in this paper, however, because our analysis applies to machines whose optics are quite close to their design model.
In designing a beam diagnostics system for a ring, “frequentists” believe in installing as many high resolution BPMs as possible along a ring in order to best characterize beam properties accurately and precisely. Our analysis shows that having more BPMs does not always significantly improve diagnostics performance and is therefore not necessarily cost-effective for an accelerator design. Excessive BPMs often only provide redundant information. The predictive error of beam properties at POIs is not linearly proportional to the number of BPMs present. In the meantime, too many BPMs could introduce more impedance, making the collective effects worse. Using the Gaussian regression method, a reasonable compromise can be reached between the quality (resolution) and the quantity of BPMs, which can reduce the burden on the overall scope of an accelerator project.
Other important effects on X-ray brightness, which are not addressed in detail here, are the transverse linear coupling in the electron beam and the residual dispersion at the POIs. This approach can be applied here also, as the linear coupling can be characterized with beam TbT data Li et al. (2017), and the residual dispersion can be measured by averaging TbT data when beam energy varies. In a ring-based accelerator, BPMs are used for a multiple other purposes, such as orbit monitoring and optics characterization, etc. In this paper we only concentrated on a particular use case of TbT data to characterize the linear optics, and then to predict X-ray beam brightness performance. A similar analysis can be applied to the orbit stability, and dynamic aperture reduction due to -beat as well. An accelerator’s BPM system needs to satisfy several objectives simultaneously. Therefore the Gaussian regression approach could be extended to a higher dimension parameter space to achieve an optimal compromise among these objectives.
Acknowledgements.
We would like to thank Dr. O. Chubar, Dr. A. He, Dr. D. Hidas and Dr. T. Shaftan (BNL) for discussing the undulator brightness evaluation, and Dr. X. Huang (SLAC) for some fruitful discussion. This research used resources of the National Synchrotron Light Source II, a U.S. Department of Energy (DOE) Office of Science User Facility operated for the DOE Office of Science by Brookhaven National Laboratory under Contract No. DE-SC0012704. This work is also supported by the National Science Foundation under Cooperative Agreement PHY-1102511, the State of Michigan and Michigan State University.References
- Rasmussen and Williams (2006) C. Rasmussen and C. Williams, Gaussian Processes for Machine Learning (MIT Press, 2006).
- Bishop (2006) C. M. Bishop, Pattern Recognition and Machine Learning (Springer, 2006).
- Lindberg and Kim (2015) Ryan R. Lindberg and Kwang-Je Kim, “Compact representations of partially coherent undulator radiation suitable for wave propagation,” Phys. Rev. ST Accel. Beams 18, 090702 (2015).
- Walker (2017) R. Walker, “Potentialities and compromises in design of storage ring diffraction limited light sources,” in ICFA mini-workshop on nonlinear dynamics and collective effects in particle beam physics, Arcidosso, Italy, September 19-22 (2017).
- Chubar and Elleaume (1998) Oleg Chubar and P Elleaume, “Accurate and efficient computation of synchrotron radiation in the near field region,” in proc. of the EPAC98 Conference (1998) pp. 1177–1179.
- Hidas (2017) Dean Hidas, “Computation of Synchrotron Radiation on Arbitrary Geometries in 3D with Modern GPU, Multi-Core, and Grid Computing,” in Proceedings, 8th International Particle Accelerator Conference (IPAC 2017): Copenhagen, Denmark, May 14-19, 2017 (2017) p. WEPIK121.
- Courant and Snyder (1958) E. D. Courant and H. S. Snyder, “Theory of the alternating gradient synchrotron,” Annals Phys. 3, 1–48 (1958), [Annals Phys.281,360(2000)].
- Herr and Muratori (2003) W. Herr and B. Muratori, “Concept of luminosity,” in Intermediate accelerator physics. Proceedings, CERN Accelerator School, Zeuthen, Germany, September 15-26, 2003 (2003) pp. 361–377.
- Calaga and Tomás (2004) R. Calaga and R. Tomás, “Statistical analysis of rhic beam position monitors performance,” Phys. Rev. ST Accel. Beams 7, 042801 (2004).
- Langner et al. (2016) A. Langner, G. Benedetti, M. Carlà, U. Iriso, Z. Martí, J. Coello de Portugal, and R. Tomás, “Utilizing the beam position monitor method for turn-by-turn optics measurements,” Phys. Rev. Accel. Beams 19, 092803 (2016).
- Cohen-Solal (2010) Maurice Cohen-Solal, “Design, test, and calibration of an electrostatic beam position monitor,” Phys. Rev. ST Accel. Beams 13, 032801 (2010).
- Castro-Garcia (1996) P. Castro-Garcia, Luminosity and beta function measurement at the electron - positron collider ring LEP, Ph.D. thesis, CERN (1996).
- Irwin et al. (1999) J. Irwin, C. X. Wang, Y. T. Yan, K. L. F. Bane, Y. Cai, F. J. Decker, M. G. Minty, G. V. Stupakov, and F. Zimmermann, “Model-independent beam dynamics analysis,” Phys. Rev. Lett. 82, 1684–1687 (1999).
- Huang et al. (2005) X. Huang, S. Y. Lee, E. Prebys, and R. Tomlin, “Application of independent component analysis to Fermilab Booster,” Phys. Rev. ST Accel. Beams 8, 064001 (2005).
- Tomás et al. (2017) Rogelio Tomás, Masamitsu Aiba, Andrea Franchi, and Ubaldo Iriso, “Review of linear optics measurement and correction for charged particle accelerators,” Phys. Rev. Accel. Beams 20, 054801 (2017).
- Hao et al. (2019) Yue Hao, Yongjun Li, Michael Balcewicz, Leo Neufcourt, and Weixing Cheng, “Reconstruction of storage ring’s linear optics with Bayesian inference,” (2019), arXiv:1902.11157 [physics.acc-ph] .
- Li et al. (2019) Yongjun Li, Robert Rainer, and Weixing Cheng, “Bayesian approach for linear optics correction,” Phys. Rev. Accel. Beams 22, 012804 (2019).
- Meller et al. (1987) R. E. Meller, A. W. Chao, J. M. Peterson, Stephen G. Peggs, and M. Furman, “Decoherence of Kicked Beams,” (1987).
- Malina et al. (2017) L. Malina, J. Coello de Portugal, T. Persson, P. K. Skowroński, R. Tomás, A. Franchi, and S. Liuzzo, “Improving the precision of linear optics measurements based on turn-by-turn beam position monitor data after a pulsed excitation in lepton storage rings,” Phys. Rev. Accel. Beams 20, 082802 (2017).
- Carlà et al. (2016) Michele Carlà, Gabriele Benedetti, Thomas Günzel, Ubaldo Iriso, and Zeus Martí, “Local transverse coupling impedance measurements in a synchrotron light source from turn-by-turn acquisitions,” Phys. Rev. Accel. Beams 19, 121002 (2016).
- Franchi et al. (2014) A. Franchi, L. Farvacque, F. Ewald, G. Le Bec, and K. B. Scheidt, “First simultaneous measurement of sextupolar and octupolar resonance driving terms in a circular accelerator from turn-by-turn beam position monitor data,” Phys. Rev. ST Accel. Beams 17, 074001 (2014).
- Li et al. (2017) Yongjun Li, Lingyun Yang, and Weixing Cheng, “Characterization and control of linear coupling using turn-by-turn beam position monitor data in storage rings,” (2017), arXiv:1706.06022 [physics.acc-ph] .