Reconstruction of lattice parameters and beam momentum distribution from turn-by-turn beam position monitor readings in circular accelerators

C. S. Edmonds, J. Gratus, K. M. Hock, S. Machida, B. D. Muratori, R. G. Torromé, and A. Wolski Department of Physics, University of Liverpool, Liverpool L69 7ZE, United Kingdom Cockcroft Institute, Sci-Tech Daresbury, Keckwick Lane, Daresbury, Warrington WA4 4AD, United Kingdom Department of Physics, Lancaster University, Bailrigg, Lancaster LA1 4YB, United Kingdom Departamento de Matemática Universidade de São Paulo, São Paulo CEP 05508-090, Brazil ASTeC, STFC Rutherford Appleton Laboratory, Harwell Oxford, Didcot OX11 0QX, United Kingdom ASTeC, Sci-Tech Daresbury, Keckwick Lane, Daresbury, Warrington WA4 4AD, United Kingdom (Received 28 October 2013; published 2 May 2014)


I. INTRODUCTION
A bunch of particles injected into a circular accelerator with some transverse offset from the closed orbit will perform betatron oscillation about the closed orbit.In the absence of acceleration, beam position monitors (BPMs) will show that the amplitude of oscillation decreases with turn number.The amplitude of each particle in the bunch has not changed.The particles within the bunch have different betatron frequencies from each other so that their oscillations are no longer in phase after a number of turns.As a result, the centroid of the bunch moves towards the closed orbit.This effect is called decoherence.Decoherence impacts on accelerator performance and has been widely studied [1][2][3][4][5].Two main causes of decoherence may be identified when looking at the transverse dynamics of a circular accelerator.The first is the momentum spread of the bunch coupled with the chromaticity of the accelerator, whilst the second is the emittance of the bunch coupled with the transverse nonlinearities in the magnetic fields which make up the accelerator.
Decoherence is considered in the EMMA (electron machine with many applications) accelerator [6].The basis of the EMMA lattice is 42 focusing/defocusing quadrupole pairs (FODO).The dipole fields which guide particles around the ring are provided by introducing offsets to the transverse horizontal position of the quadrupoles which make up the FODO cells.There are no nonlinear fields (e.g.sextupole) included to control the chromaticity (Fig. 1), meaning that decoherence can be considered to be as a result of the bunch momentum spread only [7].A typical bunch rapidly decoheres within tens of turns.In this paper, a new technique of reconstructing the momentum distribution of a bunch of electrons from BPM measurement of the decohering bunch is described.Acceleration in EMMA is achieved by the use of 19 rf cavities distributed around the ring.We consider only the case where the rf cavities are turned off: operating the machine in this mode has proved useful for understanding a number of basic features of the dynamics.With the rf cavities turned off, particles ideally make no synchrotron oscillations and the beam energy can be assumed to be constant.In practice, particles can lose energy (slowly) through beam loading effects in the cavities; the impact of these effects is considered in the Appendix.
Standard techniques to measure the momentum distribution may be broadly divided into two groups.One group of techniques is largely limited to an estimation of the energy spread.They are based on the assumption that the particle distributions within a bunch are Gaussian in the transverse and longitudinal directions.Under these conditions, analytic solutions for the energy spread are available [1].The actual implementation can be based on BPM measurements [8,9] or radiation measurements [10,11].In these techniques, the detailed momentum distribution is not obtained.
The other group of techniques measures the momentum distribution.They are based on tomography [12][13][14].The measurement setup usually requires an rf cavity, a number of dipole magnets, scintillating screens and cameras.These techniques are not only able to measure the momentum distribution, but they can also reconstruct the longitudinal phase space.This group of techniques is usually destructive-the beam would not continue along the beam line after hitting a screen.
Most commonly, BPMs are used to measure the closed orbit distortion at a given location within a lattice, however they have been applied to measuring other dynamical attributes of an accelerator; for example, given known longitudinal dynamics, BPMs have been used to calculate the chromaticity of a lattice [15].We present a method for using BPM measurements to reconstruct a momentum distribution, and not just the spread, of a bunch when the lattice chromaticity is known.The method is valid when a bunch decoheres due to the momentum distribution of a bunch.It does not give the longitudinal phase space, but it is not destructive.
In Sec.II, the equations needed to reconstruct the momentum distribution from the BPM data are derived.In Sec.III, a technique to estimate from BPM data the Courant-Snyder parameters that are required for the momentum distribution reconstruction is presented.In Sec.IV, the reconstruction of momentum distribution is demonstrated with simulation data.In Sec.V, the methods are applied to obtain the momentum distribution from BPM data measured at the EMMA accelerator.In Sec.VI, we conclude with a summary of the main results.

II. FINDING THE MOMENTUM DISTRIBUTION
When a particle bunch is injected into a circular accelerator or storage ring with a large enough transverse offset from the closed orbit [as shown in Fig. 2(a)], then all particles within the bunch may be thought of as being at approximately the same starting phase of betatron oscillation.
The individual momenta of particles within the bunch are distributed around a mean value, which, coupled with the chromaticity of the lattice, gives a spectrum of betatron tunes.The range of phase advance per turn for particles results in the spreading of the particles in phase space as particles travel through an increasing number of turns [Fig.2(b)].Initially, a measurement of the position of the bunch center of mass (as would be observed with a BPM) remains consistent with the position of a single particle which has been tracked through an equal number of turns, and has starting conditions matching those of the bunch centroid.As the number of turns increases, the spreading of particles in phase space continues, a ring is formed around the closed orbit, and the center of mass of the bunch tends towards the position of the closed orbit [Figs.2(c) and 2(d)].
At any point within the lattice the transverse position of the centroid of a monoenergetic bunch is given on the nth turn by where, for a given transverse axis (horizontal or vertical), β y and ϕ 0 are the Courant-Snyder beta function and the phase of oscillation on the initial turn (n ¼ 0) at a given lattice location.J y and Q y are the action and the betatron tune, and are independent of the longitudinal position within the lattice.
To take into account the momentum spread of a bunch, Eq. (1) may be modified to where ξ y is the linear part of the chromaticity ð ∂Q y ∂δ Þ and δ ¼ ΔP P 0 is the fractional offset from a reference momentum, P 0 .ΦðδÞ is the momentum distribution weight function, which gives the relative contribution of different values of δ to the entire bunch.δ min and δ max are the minimum and maximum values of δ that are found within the bunch.In what follows, we assume that the exact shape of the momentum distribution is unknown.
In Eq. ( 2), the closed orbit dependence on momentum and the nonlinear terms of chromaticity are not accounted for.The first of these two factors may be neglected by considering only the vertical axis (for which dispersion is ideally 0), whilst the nonlinear terms of chromaticity should have little effect provided that both the width of the momentum distribution, ΦðδÞ, and the coefficients of the nonlinear chromaticity terms are small.
The discrete time Fourier transform of measurements made by BPMs can be used to reveal the frequency spectrum of particles within a bunch.If the source of the decoherence is the momentum spread of the bunch coupled with the chromaticity of the lattice, then an C. S. EDMONDS et al.
As the form of the momentum distribution is unknown, then using both phase space variables (coordinate and momentum) offers the advantage of being able to extract both the even and odd parts of the distribution.It is convenient to use normalized coordinates, f n , given by where p y;n is the transverse momentum of the bunch centroid measured with respect to the closed orbit transverse momenta along a given axis and α y is the Courant-Snyder alpha lattice parameter.When taking into account the momentum distribution of the bunch, the progression of the normalized coordinates of the bunch centroid with turn number (n) is given by e −i2πnðQ y þξ y δÞ ΦðδÞdδ: Note that in principle, ΦðδÞ can be a periodic function of δ, with period 1 ξ y .If Φðδ þ m ξ y Þ ¼ ΦðδÞ for integer m, then replacing the limits of the integral in Eq. ( 4) by δ min þ m ξ y and δ max þ m ξ y leads to the same set of values f n , for any values of m.This means that mathematically, we cannot determine ΦðδÞ uniquely for a set of observables f n .The best we can do is determine a function Φ p ðδÞ, that has periodicity ξ y .The important point here is that in the case of purely linear chromaticity, a BPM will observe the same frequency of oscillation for a particle with energy deviation δ þ m=ξ y (where m is an integer) as for a particle with energy deviation δ.It is therefore necessary to make some assumption about the range of energy deviation for particles in the beam; which is expressed in a change in the limits of the integral in Eq. (4) (from δ min and δ max to −1=2ξ y and 1=2ξ y ), and in replacing the function ΦðδÞ by the periodic function Φ p ðδÞ.With these replacements, Eq. ( 4) becomes 2ξ y e −i2πnðQ y þξ y δÞ Φ P ðδÞdδ: FIG. 2. Simulations showing the decoherence of a particle bunch in horizontal transverse phase space.A total of 4000 particles, with a Gaussian momentum distribution (σ ¼ 50 keV=c) around the central momentum of 12.1 MeV=c, are tracked through the EMMA lattice using ZGOUBI.The bunch centroid has an initial horizontal offset of 4 mm from the closed orbit position.Blue points show the location in phase space of individual particles, the single red point shows the position of an on momentum particle which, at injection, is located at the center of the bunch, and the red line shows the bunch center of mass (mean y position) for the specified turn.
In the case that − 1 2ξ y < δ min and δ max < 1 2ξ y , then ΦðδÞ and Φ p ðδÞ will be the same in the range − 1 2ξ y < δ < 1 2ξ y .At this point we observe that Eq. ( 5) is, formally, the inverse Fourier transform of the momentum distribution Φ P ðδÞ.We can consider f n to be the time domain representation of Φ P ðδÞ.It can be seen in Fig. 3 that a Gaussian distribution in Φ P ðδÞ leads to a Gaussian decoherence signal in the time domain, and that a uniform Φ P ðδÞ distribution leads to a sinc-like signal.
The chromaticity of EMMA (measured to be ∼ − 10 [6]) allows for a AE5% momentum spread in the range δ ¼ − 1 2ξ y to 1 2ξ y .Previously a momentum spread of 100 keV=c (at 15 MeV=c, giving a AE0.3% momentum spread) has been measured in the EMMA injection line [16].This means that Φ P ðδÞ should correspond to the actual momentum distribution of the bunch and should not be subject to the effects that would occur in the case that some particles have jδj > 1 2jξ y j .In the case of having an infinite number of samples of the BPM signal, the discrete time Fourier transform (DTFT) can give the momentum distribution, Φ P ðδÞ.For the finite number of BPM samples obtained experimentally, an estimate of the momentum distribution can be found by where N is the total number of turns of BPM data to which the calculation is applied, and assuming that the terms for the negative turn numbers may be found by considering the complex conjugate of f n , Finally, Eq. ( 6) may be written as f n e i2πnðQ y þξ y δÞ :

III. MEASUREMENT OF THE INITIAL PHASE AND LATTICE FUNCTIONS ALPHA AND BETA
The expression for reconstructing the momentum distribution given in Eq. ( 7) requires that the initial betatron oscillation phase, ϕ 0 , and the Courant-Snyder parameters, α y and β y , are known.In this section, we present a method for measuring these parameters where the amplitude of coherent betatron oscillations (measured by the BPMs) is damped because of decoherence.
Firstly, a rotation of −Ψ n is applied to the normalized phase space coordinates of Eq. (3), If Ψ n is the betatron phase advance between injection and the nth turn for a mono-energetic bunch (Ψ n ¼ 2πnQ y ), then g n is equal to the normalized phase space coordinates at turn zero (f 0 ) for all values of n.Accordingly, the argument of g n will be constant for all n, with value equal to the initial phase of the betatron oscillation, ϕ 0 .
In practice, y n and p y;n are found through using BPMs and Ψ n may be calculated after first finding the betatron tune, Q y , by applying the numerical analysis of the fundamental frequency (NAFF) correlator [17] to the BPM data.The design values of α y and β y at the BPM position are taken as initial estimates.
If the experimental values of α y and β y do not match the design values, then a plot of the argument of g n vs n will show an oscillation around ϕ 0 .A fitting procedure, which has the objective of minimizing the oscillation of argðg n Þ vs n around ϕ 0 and has α y and β y as free parameters, can be used to find the experimental values of α y and β y .
When the bunch has some momentum distribution, then the transverse coordinate and momentum, y n and p y;n , are described by FIG. 3. Plots of bunch centroid vs turn number.The way in which the particle beam decoheres is dependent not only upon the spread of momentum, but also the form of the momentum distribution.

C. S. EDMONDS et al.
Phys.Rev. ST Accel.Beams 17, 054401 (2014) In this case, Ψ n is the total phase advance between injection and the nth turn for an on-momentum particle (δ ¼ 0), with on-momentum further defined as being the momentum at which the mean betatron oscillation frequency is found.ψ n ðδÞ is the change in total phase advance due to a particle being off-momentum (δ ≠ 0), and is given by ψ n ðδÞ ¼ 2πnξ y δ.
To show that the argument of g n in Eq. ( 8) still gives the initial betatron phase when a bunch is not monoenergetic, the ratio of imaginary to real parts of g n is considered: It can be seen from Eq. ( 9) that if The conditions for Eq. ( 10) being true are that either the momentum distribution is symmetric around δ ¼ 0 [in which case Eq. ( 11) will be true for all n], or that the momentum distribution is nonsymmetrical but the values of ψ n ðδÞ are small and are within the linear part of the sine function in Eq. (10) [in which case Eq. ( 11) will be true for some limited range of n, 0 ≤ n ≤ N].

IV. SIMULATION
To demonstrate the ability to reconstruct a momentum distribution, the methods described in Secs.II and III are applied to data produced through simulation.A total of 4000 particles were tracked through 60 turns of a computer model of the EMMA lattice by using the ZGOUBI tracking code [18].The transverse dynamical variables of the input particles were distributed randomly on ellipses matched to the lattice at the point of injection and with the action of the individual particles governed by an exponential distribution of width corresponding to an emittance of 0.71 mm mrad [19].The bunch centroid at injection was located at the closed orbit position along the horizontal transverse axis, and had an offset of 4 mm from the closed orbit position along the vertical transverse axis.
A reference momentum of 12.1 MeV=c was set, and then a Gaussian distribution, with σ δ ¼ 0.001, used to give each particle a random fractional momentum offset, δ.
For each revolution of the bunch within the lattice, the mean offset for all particles of position and momentum from the respective transverse closed orbit values was recorded at a location corresponding to the position of one of the BPMs.With the given simulation input parameters, the effects of decoherence are clearly visible in Fig. 4. Applying the methods described in Sec.III for the calculation of the Courant-Snyder parameters to the bunch centroid tracking data, α y and β y where found to be −0.79434 and 0.39750 m respectively, which is less than 0.01% difference from the values obtained through the tracking of a single particle (α y = −0.79437and β y ¼ 0.39749 m).
The accurate reconstruction of the momentum distribution is dependent upon having enough turns to give good resolution in the DTFT integral range ð 1 ξ y Þ, and upon the amplitude of the BPM oscillation signal having approximately converged to zero at the turn number of truncation.In practice, the number of turns for which data are obtained is limited.Therefore, we investigate the effect of truncating the BPM signal at a reduced number of turns on the convergence of the reconstructed momentum distribution.
For truncation at a small number of turns, as shown in Fig. 5(a), the estimation of the discrete time Fourier transform is distorted by the truncation, and a sinc-like distribution is produced.As the number of turns increases, it is possible to resolve the features of the momentum distribution (Fig. 6), and the influence of truncation becomes less prominent.As it is known that the momentum distribution must have only positive values and that the side lobes of the transform are introduced by the truncation of the BPM signal, then only the positive part of the main lobe of the transformation is taken as being the reconstruction of the momentum distribution.
For each of the truncation settings, the reconstructed momentum distribution was used to reconstruct the simulated 60 turn BPM signal [through fitting the amplitude part of Eq. ( 2)].The mean absolute error is then calculated by finding the mean absolute difference between the simulated and reconstructed signal over the first 20 turns, which is taken as a measure of the accuracy of the momentum reconstruction.Figure 7 shows that in this case, the mean absolute error falls at a rate proportional to 1 N .
As a further example, and to show that a nonsymmetric momentum distribution may be reconstructed, the simulation was rerun with the particles in the bunch this time having a double peaked Gaussian momentum distribution.The exact form of the momentum probability distribution in this case was For this momentum distribution, the simulated BPM signal converged to approximately zero after around 90 turns.Calculating the Courant-Snyder parameters by using the simulated BPM signal gives α y ¼ −0.789 and β y ¼ 0.399 m, which is less than 1% difference from the values obtained through the tracking of a single particle at the mean particle momentum (α y ¼ −0.794 and β y ¼ 0.398 m).In this case, the greater differences between the methods of Courant-Snyder parameter calculation may, in part, be explained by considering the calculation method of the mean betatron tune.For the single peak Gaussian, the mean transverse oscillation frequency coincides with the peak frequency; for the double peak Gaussian, this is no longer the case.This results in a small error being introduced when the peak frequency is used in satisfying Eq. (11).Applying Eq. ( 7) to the full simulated BPM signal produces an accurate reconstruction of the input momentum distribution (Fig. 8).

V. MOMENTUM DISTRIBUTION MEASUREMENT IN EMMA
Within the EMMA lattice there are seventeen pairs of BPMs which are separated only by drift spaces and a vertical corrector magnet.Assuming that the vertical corrector produces only a dipole field, then these pairs of BPMs are appropriate for reconstructing the momentum distribution given that both y n and p y;n can be obtained by are the transverse vertical bunch centroid coordinates at BPMs 1 and 2 (respectively) measured with respect to the closed orbit.L is the length of the drift separating BPMs 1 and 2. In practice, the closed orbit is found by averaging the coordinate measured at each BPM over many turns.The fractional part of the betatron tune, Q y , was calculated using the NAFF of the signal data from individual BPMs.A value for the chromaticity was obtained from measurements of the tune as a function of beam momentum [6].Out of the seventeen BPM pairs identified as appropriate, three were selected for reconstructing the momentum distribution.Using more than three of the 17 pairs at once was not possible due to hardware limitations and the need to use some BPMs for other purposes.The momentum distribution reconstruction method was applied independently to the data obtained by each of the three BPM pairs selected, giving three independent momentum distribution measurements per single shot (from injection up until the 60th turn).
For 30 consecutive shots, the Courant-Snyder parameters were calculated at the position of the first BPM in each of the three pairs, giving the results shown in Table I.
Using the calculated Courant-Snyder parameters, the momentum distribution was then reconstructed. Figure 9 shows that there was good agreement of momentum distribution reconstruction between each of the three BPM pairs.Figure 10 gives an example of the phase space data measured at one of the BPMs, as well as showing the phase space ellipse which is drawn using the fitted Courant-Snyder parameters and action.The damping of the measured signal, seen in Fig. 10, demonstrates the rapid decoherence of betatron motion of the bunch.
Through use of the same method as for the simulated data, the rate at which the reconstructed momentum distribution converges to the true momentum distribution with increasing turns of BPM data is checked.In the case of experimental data, we see that as the number of BPM measurements used initially increases, the reconstructed momentum appears to converge towards the real momentum distribution (Fig. 11).However, as the number of BPM measurements further increases, the mean absolute error also increases, which suggests that the agreement between the real and reconstructed momentum distribution worsens.One possible explanation for this is transient beam loading.During data taking, the revolution frequency of a particle bunch in EMMA was close to a harmonic of the rf cavity resonant frequency.Under such circumstances, the momentum distribution of the particle bunch can change significantly as energy is lost to the rf cavities (this is discussed  further in the Appendix).Evidence of significant beam loading was observed in the BPM data for the horizontal axis; taking the mean position of the BPM measurement over a number of turns gives the closed orbit position.When a sliding rectangular window of width 10 turns was used to calculate the change in closed orbit with time, the closed orbit was seen to shift towards the center of the ring with increasing turn number.Although further investigation is required for a proper quantitative understanding, the drift in closed orbit is consistent with the estimated energy loss from beam loading, given the dispersion at the location of the BPM.

VI. CONCLUSIONS
A method for calculating the Courant-Snyder parameters and reconstructing the bunch momentum distribution in nonzero chromaticity machines has been presented.
When applied to data produced through simulation, the methods were shown to accurately calculate the Courant-Snyder parameters, reconstruct the input momentum distribution and then reconstruct the BPM signal of the bunch.
When applied to BPM data collected with EMMA an estimate of the momentum distribution can be found.However, the reconstructed momentum distribution does not converge to a true momentum distribution when increasing turns of BPM data are used (as was demonstrated with simulated data).Transient beam loading and the bunch revolution frequency being a harmonic of the rf cavity resonant frequency offer a reason as to why the reconstructed momentum distribution may not converge as expected.
In the future, the concept could be tested more rigorously, on EMMA or another nonzero chromaticity machine, by taking more data after first ensuring that the rf cavities have been detuned.

APPENDIX: TRANSIENT BEAM LOADING
So far it has been assumed that the central momentum of a particle bunch will remain constant throughout the period for which the bunch is tracked by BPMs.In practice the effect of transient beam loading should be considered.Within EMMA there are 19 rf cavities, which are tuned to a resonant frequency of 1.301 GHz.Each time a bunch traverses a cavity it will induce a voltage within the cavity; furthermore, a bunch may encounter the fields induced during previous traversals.
A simple modeling technique [20] is applied in order to make an estimate of how beam loading may affect the momentum of particles within a bunch as they circulate within EMMA.Two specific cases are considered: first, when the initial particle momentum is 17.35 MeV=c and, second, for an initial momentum of 18.35 MeV=c.
When the initial particle momentum is set to 17.35 MeV=c, then the resonant frequency of the cavity can be described by ω rf ≈ 71.96ω b , where ω b is the revolution frequency of the bunch.In this instance, the phase of the induced rf voltages at which the particle bunch arrives at the cavities changes quickly, and as a result synchrotron oscillations are performed through a small range of δ [Fig.12(a)].
For an initial momentum of 18.35 MeV=c the particle revolution frequency is close to a harmonic of the rf resonant frequency, ω rf ≈ 72.00ω b .This time the bunch remains within the decelerating phase of the induced rf voltages throughout the 60 turns of tracking, and there is a significant decrease in δ [Fig.12(b)].In order to reconstruct the momentum distribution accurately, it is important to minimize effects such as beam loading.Ensuring that the particle revolution frequency is not a harmonic of the rf resonant frequency, through either careful selection of the injection momentum or by detuning the rf cavities, offers a partial solution to this problem.

FIG. 4 .
FIG.4.Vertical offset of bunch centroid from closed orbit position at location of BPM vs turn number.A Gaussian momentum distribution with a standard deviation of 12 keV=c means that the betatron oscillation of the bunch centroid appears significantly damped within 60 turns.

FIG. 5 .
FIG. 5. Plots of the discrete time Fourier transform in cases where the BPM signal is truncated at 20 turns and at 60 turns.

FIG. 6 .
FIG.6.The reconstructed momentum distribution for truncation at 20, 40, and 60 turns as well as the input form of the momentum distribution, PðδÞ.

FIG. 7 .
FIG.7.The mean absolute error (Δ) vs total number of turns used in reconstructing the momentum distribution.

FIG. 10 .FIG. 11 .
FIG.10.Blue points represent the measured phase space coordinates, with the dashed blue line included to show the turn by turn progression.The orange dashed line is the phase space ellipse which is given by the fitted action and Courant-Snyder parameters.

TABLE I .
Reconstruction of α and β from experimental data.