Refined betatron tune measurements by mixing beam position data

The measurement of the betatron tunes in a circular accelerator is of paramount importance due to their impact on beam dynamics. The resolution of the these measurements, when using turn by turn (TbT) data from beam position monitors (BPMs), is greatly limited by the available number of turns in the signal. Due to decoherence from finite chromaticity and/or amplitude detuning, the transverse betatron oscillations appear to be damped in the TbT signal. On the other hand, an adequate number of samples is needed, if precise and accurate tune measurements are desired. In this paper, a method is presented that allows for very precise tune measurements within a very small number of turns. The theoretical foundation of this method is presented with results from numerical and tracking simulations but also from experimental TbT data which are recorded at electron and proton circular accelerators.


Introduction
Betatron tune measurements [1] are used as a reliable diagnostic of transverse beam dynamics. The measurement of the working point of a circular accelerator, is an essential procedure in order to optimize performance and reduce particle losses. In such an accelerator, each BPM records the betatron oscillations of the centroid in the transverse plane for many turns. In order to measure the tunes, the beam needs to perform coherent betatron oscillations after transverse excitation from its closed orbit. The TbT transverse oscillations of the centroid are recorded at each BPM, yielding a discrete signal which can be analyzed with algorithms that perform Fourier analysis.
The figure of merit in tune measurements, is the resolution in the frequency space, i.e. the smallest difference of adjacent harmonics that can be identified in the Discrete Fourier Transform (DFT) spectrum of a BPM signal. In the noise-free regime, the resolution is defined from the error (N ) in the betatron tune estimation from N turns, which follows a power law of the form [2]: where Q(N ) is the estimated tune within a number of turns N , Q o is the actual betatron tune and l is an exponent which determines the speed of convergence of the tune measurement to the actual tune value.
As it is suggested from Eq. (1), a large number of turns is vital for precise betatron tune measurements. However, in experimental and simulated TbT data, the useful number of turns is greatly limited from decoherence due to finite chromaticity and/or amplitude detuning [3,4]. Due to this mechanism, the expectation value of the transverse beam position, as recorded at the BPMs, is strongly damped with respect to the number of turns. Consequently, a choice of a large number of turns is followed from a substantial reduction of the Signal-to-Noise Ratio (SNR) in the TbT signal. In addition, decoherence induces a significant dependence of the betatron tunes on the number of turns. Apart from non-linearities, a large number of turns is not always available e.g. in the case of accelerator commissioning or due to particular beam dynamics measurements e.g. placing the working point of the accelerator close to a resonance that may lead to strong particle losses.
For the case of a simple Fast Fourier Transform (FFT) algorithm [5], the exponent l in Eq. (1) is l = 1, which is inadequate for precise determination of the betatron tunes in a circular accelerator. To overcome such limitations, Refined Frequency Analysis (RFA) methods have been developed [2,6,7] which offer a substantially improved resolution in tune estimations, with respect to a plain FFT. The Numerical Analysis of Fundamental Frequencies (NAFF) [8] algorithm is a RFA method, which has been widely used with success in beam dynamics measurements [9,10,11,12]. This algorithm offers an enhanced decrease of the error in Eq. (1) after applying a Hann window [13] of order p on the data. The resolution has been analytically calculated from Laskar to have the asymptotic approximation for N → ∞ [14]: which offers a substantial improvement in the tune estimation, with respect to a simple FFT, for a given number of turns N . Nevertheless, a further enhancement of the resolution would be beneficial for the operation of modern circular accelerators and for analyzing TbT data from tracking simulations. The reason for this, is that the usage of a very small number of turns (N ≤ 50) results in a weaker influence of decoherence on the tune determination. In addition, the identification of transient effects, such as ripples from power converters or fast-pulsing magnets, could be possible.
In this paper, it is shown that by analyzing the trajectory of the beam from M BPMs and for N turns, while employing the NAFF algorithm, the resolution of the tune measurements is greatly improved, several orders of magnitude compared to single BPM analysis. The reconstruction can be performed by vectorizing an N × M array that contains TbT data for N turns and from M BPMs, in a BPM-by-BPM manner. This transformation results in the simultaneous increase of the number of samples (M N from N ) and of the sampling rate, since after the vectorization, the sampling rate is M samples per turn, instead of the initial 1 sample per turn.
This technique is referred to as the mixed BPM method and when it is employed, the TbT error in the tune estimation scales as: where the gain in resolution is pronounced from the appearance of the M l−1 factor, if compared to the single BPM analysis, Eq (1).
The resolution in tune estimations, while utilizing the NAFF algorithm and the mixed BPM method scales as: where the increase in the resolution of the tune measurement by a factor of M 2p+1 is evident.
The mixed BPM method consists of flattening the M xN array in a BPM-by-BPM manner i.e., transforming it into a vector of 1 × M N dimension. However, the transformation introduces two systematic errors: • An error in the sampling period of the mixed BPM signal due to the fact that the BPMs are not strictly equidistant, i.e. they are not distributed homogeneously around the ring. • An error due to the BPM-by-BPM modulation of the beta function.
Fortunately, the previous errors are periodic in nature since they are repeated for every revolution of the beam. This characteristic allows for the aforementioned analysis of the trajectory of the beam in a BPM-by-BPM manner.
The mixed BPM method has been explored in the past at proton and electron rings [15,16] for precise tune measurements with a very small number of turns. Here, the theoretical foundations of this method is presented, along with results from tracking simulations and experimental measurements. The paper is organized as follows: In Section 2 the methodology of the mixed BPM scheme is presented, together with analytical expressions for the transformed Fourier spectra and the improved betatron tune resolution. In Section 3, a numerical simulation is deployed in order to visualize qualitatively and quantitatively the theoretical results of the method. In Section 4 tracking simulations are performed and the method is applied for tune measurements with the CERN Proton Synchrotron (PS) ideal lattice, under the influence of linear and non-linear dynamics. In Section 5 some experimental results are shown from the PS and the CERN Proton Synchrotron Booster (PSB) and from the KARA electron light source, where the efficiency of the mixed BPM method is highlighted.  Figure 1: A hypothetical ring with eight BPMs at asymmetrical longitudinal positions, which are shown with red circles. The mixed BPM method assumes that these BPMs, are actually at the locations with the blue markers where they divide the circumference of the ring in exactly eight equal parts. This introduces an error δ k for each k BPM. BPM 1 is set as the reference point.
The transformation of the TbT data from M BPMs and for N turns, results in a vector of samples, where N groups of M samples each are created. The periodicity of each group is repeated for every turn. However, the mixed BPM method assumes that the BPMs, which are used for the reconstruction of the beam's trajectory in a BPM-by-BPM manner, are equidistant i.e. M BPMs are situated at locations where they divide the circumference C of the ring at exactly C M segments. In reality, the sampling intervals τ k , which are defined as the time interval that the beam needs to transport from BPM k − 1 to BPM k, are not equal and they can be expressed as where t k and t k−1 are the time instants that the beam passes from BPMs k and k − 1 respectively. The boundary condition t 0 can be chosen to be t 0 = 0. The periodicity conditions, due to the circular geometry of the ring, suggest that τ k = τ k+M .
According to Eq. (5), the time instances t k can be expressed for any k as and when the centroid of the beam passes from the BPM k to the BPM k + M , it has circulated the ring once, i.e.
where T o is the revolution period of the beam. Combining Eq. (8) and Eq. (7) yields which means that, independently of the non-uniform positioning of the BPMs in the ring, the average sampling period is bounded. Due to the periodicity condition Eq. (6), the expectation value τ k is constant as k → ∞. The previous expression can be used to construct a relationship for the time instances t k . By introducing an error δ k , which quantifies the deviation of the BPM k from a longitudinally uniform position, the time instances for k > 0 are simply where the errors δ k are considered to be random independent variables, given in units of seconds. In the case of single BPM analysis for M = 1, δ 1 = 0. The positions of the BPMs must not overlap, thus the error values are bounded in As a consequence, the expectation value of the δ k errors as k → ∞ is Due to the periodicity of the ring, the errors are 1-turn periodic, i.e. δ k = δ k+M , which implies that the variance of δ k , σ 2 δ k , is also bounded, for all k. The previous conditions highlight the fact the non-uniform sampling of the beam around the ring is stationary, which allows the reconstruction of the trajectory of the beam simultaneously from all the BPMs. Therefore, the acquired signal, after the transformation of the TbT data with the mixed BPM method, can be considered as a band-limited signal with a non-uniform but recurrent sampling scheme [17].
The non-uniformity of the sampling process can be visualized in the fictitious ring of Fig. 1, where 8 BPMs (blue circles) are placed at locations where they divide the circumference of the hypothetical ring in 8 equal parts. The injection point is assumed to be at the position of BPM 1 (black marker) and beam follows the clock-wise direction. As the centroid of the beam rotates around the ring during one turn, the 8 fictitious and longitudinally symmetric BPMs (blue circles) sample the transverse coordinates with a constant sampling period of To M . The actual BPMs (red circles) are situated in longitudinal positions that deviate from the symmetric positions by an off-set δ k (red arc). This error is assumed to be positive for a real BPM which is downstream from the symmetric position and negative for a BPM which is upstream from the symmetric position.

Frequency spectra
The TbT data from multiple BPMs can be represented with an array. Let the array A, contain the spatial and temporal histories of the centroid of the beam: where z can be either x or y transverse planes, N is the number of turns and M the number of BPMs. Each column represents the signal from one BPM, with a sampling period of τ s = 1 turn per sample. The traditional frequency analysis performs the tune measurements for each column of the array in (13) and then provides an average tune estimation from the M individual observations. Due to the correlations between the data in A, an increase of the sampling rate of the system is possible by vectorizing the array (13) as: Although the sampling process of TbT BPM data is usually described in terms of time, the same procedure can be equally described in space. The mixed BPM signal of Eq. (14) can be acquired by sampling the pseudo-harmonic oscillation along the ring, where s is the longitudinal variable, φ 0 and are constants of the motion, β(s) is the beta function and: is the cumulative phase function with the constraint: and the constraint Ψ(M + 1) = Q z .
The integral Ψ(M + 1) can be divided into M equal parts and each part will advance the phase by a constant value of By introducing the aforementioned sampling errors δ m in units of 2π, for each m sample, the cumulative phase Ψ(m) is With Eq. (20), Eq. (18) is written as The periodicity of the beta function and of the error δ m , suggests that β(m + M ) = β(m) and δ m+M = δ m , i.e. the signal Eq. (21) is modulated in amplitude and phase with a period of M .
In order to highlight the modulation of the signal, Eq. (21) is expressed as The function H(m) is M periodic and it can be expanded in the Fourier series with the weight functions for each harmonic defined as: Substitution of Eq (23) in Eq. (22) results in: Inspecting Eq. (25) the following observations can be made: i. Since the signal is modulated periodically in amplitude from the optics and in phase from the sampling error, infinite sidebands appear in the spectrum. The carrier frequency is the betatron tune which is found at the k = 0 harmonic. The distance from the rest of the harmonics in the frequency spectra is 1 M which is the transformed sampling frequency. After transformation to the original frequency space by multiplying the frequencies with M , this distance becomes 1. Therefore, the fractional betatron tune can always be recovered since the uncertainty between the harmonics is exactly 1 integer tune unit.
ii. The bandwidth of the signal in Eq. (23) is bounded by the Nyquist frequency. In the case of M BPMs and according to Shannon's sampling theorem [18], the following relationship holds for the betatron tune: from where it can be deduced that, if the number of BPMs M is at least twice the tune, then the integer part of the tune can be also recovered. Moreover, since the bandwidth of the signal has now become M times larger, the usual discrepancy in the modulo of the fractional tune from single BPM analysis, is no longer present. This implies that tunes with fractional parts above 0.5 can be recovered.

Frequency resolution
The frequency resolution i.e., the TbT error in the estimation of the betatron tunes, is correlated to the total observation time of a signal. For the mixed BPM method, the derived relationship of the time instances t k , in the case of non equidistant M BPMs with a sampling error δ k , is (see Section 2.1) whereδ M is the sampling error for the BPM M , normalized to the revolution period and the function g(m) is defined as The expression in Eq. (28) corresponds to the total observation time of the mixed BPM signal for m = M N samples. This total time is now used for the cases of FFT and NAFF algorithms in order to estimate the error in the frequency analysis of each algorithm.

FFT
In the case of a simple FFT, the TbT error of the betatron frequency estimation for m number of samples is with ν(m) the time-dependent frequency estimation and ν o the true frequency of the TbT data. The error (m) in the betatron tune Q o estimation within m samples, is defined as and substitution of Eq. (28) in the previous expression, with m = M N , yields Clearly, the mixed BPM method when used with the FFT, does not result in any gain in convergence with respect to the single BPM analysis, M = 1. Moreover, the sampling error has been introduced in the estimation of the tunes, although it converges faster to zero than 1 N . It should be noted that the mixed BPM method, still allows the estimation of the integer part of the tune with a simple FFT, provided that the condition in Eq. (26) is fulfilled.

NAFF
In the case of NAFF algorithm, the signal under study is treated as quasiperiodic [19]. The resolution of the tune measurements scales as t −(2p+2) m for the total observation time t m in Eq. (27). For the limiting case ofδ M → 0 and for m = M N number of samples and by using the theory behind NAFF [14], the analytical relationship of the error in the estimation the tunes (N ), is found to be (see Appendix 7.1): where the factor C L depends on the number of samples m, the errorδ M , the order of the Hann window p and the betatron frequencies and amplitudes of the signal under study. In fact, in the case of rational frequencies and/or the presence of multiple harmonics in the signal, the factor C L can diverge rapidly. It is important to mention that the gain in resolution by a factor of M 2p+1 is followed by a blow-up of the factor C L , as it can be confirmed from the full derivation of Eq. (34) in the Appendix 7.1. Moreover, due to the dependence of C L on the order of Hann window, the blow-up is expected to increase for an increasing p.
The transformation of the signal with the mixed BPM method, creates a signal with multiple harmonics around the main frequency line, as it has been shown in Section 2.2. This behaviour can also interfere with the convergence of the betatron tunes estimations with a small number of turns N , due to the dependence of the C L on the spectral quantity of the signal under analysis. As a result, collections of BPMs with the least modulation of the optics and the sampling period are expected to produce more precise betatron tune measurements for a very low number of turns N .
The contribution of the sampling errorδ M is negligible, since it is very small by construction and it rapidly approaches zero. Thus, for the mixed BPM method, the two previous effects that can make the factor C L to diverge can potentially reduce the improvement in the estimation error of the betatron tunes. Numerical simulations are performed with PyNAFF [20], in order to qualitatively investigate the theoretical derivations of the mixed BPM method. Since in a real machine, the TbT data from a BPM resemble pseudo-harmonic oscillations, the numerically simulated signal is chosen to be a superposition of four harmonic terms: where m is the index of each sample with the constraint 1 ≤ m ≤ M N , M is the number of BPMs, N the number of turns, Q k is the tune of the harmonic k in 2π units and δ m is the sampling error of sample m. The complex signal in Eq. (35) contains information on the positions (real part) and the momenta (imaginary part) of the oscillations. In these numerical simulations, the real part of Eq. (35) is used, so as to simulate the types of signals that are acquired normally in an actual accelerator. The projection of the simulated TbT oscillations on the complex plane is presented in Fig. 3. The values of the frequencies are chosen to be Q k = 1 2π + (k − 1)∆Q and the frequency separation between the harmonics is ∆Q = 0.05.
The goal of the simulation is to use the mixed BPM method with NAFF, in order to measure the frequencies of the signal in Eq. (35). The uncertainty k in the estimation of the Q k harmonic is defined as: where Q ko are the actual tunes of the numerical signal Eq. (35) and Q k (N, M ) is the frequency estimated over N turns and M BPMs. In this analysis, only the results of the k = 1 harmonic will be presented, i.e. of the main frequency. The N variable is constrained to low values (N ≤ 50) in order to highlight the contribution of the parameter M in Eq. (34).
Mixing the BPM data together, results in the increase of the sampling rate from one sample per turn to M samples per turn. Therefore the frequencies Q k are transformed to Q k /M which will be referred to as the reduced frequencies.
For some M , the Q k /M ratio could yield a figure equal or almost equal to a rational number, which would result in the inability to reconstruct the original frequency with the convergence of Eq. (34). For example, for M = 20, Q 1 /20 ≈ 1/2, which is an even resonance. Indeed, this behavior is shown in Fig. 4, where the mixed BPM method is applied and the error in the tune estimation 1 is measured for an increasing number of BPMs M and for three cases of N . Although the general trend shows a decreasing error with respect to M for all cases of N , the convergence curves are contaminated due to the appearance of resonance peaks at specific numbers of BPMs M . The even resonances are indicated with full lines, while the odd resonances with dashed lines. The comparison of the trends of the curves suggest a decrease of the error for an increasing N as expected, however the gain in convergence would be more evident in a "non-resonant" case.
In order to bypass these constraints and to demonstrate the convergence of the tune estimation with respect to the number

Tracking simulations
The efficiency of the mixed BPM scheme is also tested on simulations with MADX-PTC [22] and an optics model of the Proton Synchrotron (PS) [23]. The parameters of the simulation can be found in Table 1. No collective effects are considered in the simulations. The TbT data are recorded at 42 BPMs arranged around the PS lattice. The goal is to use the mixed BPM method for tune measurements with a very small number of turns N ≤ 50, make comparisons with the traditional single BPM measurement and explore the influence of the sampling rate error of M BPMs on the resolution of the tune measurement. The beam is initially excited, horizontally and vertically, with deflections that correspond to initial amplitudes of 2σ to 12σ with a step of 2σ. The centroid oscillations are measured from the average orbit of the particles. The evolution of the centroid of the beam is shown in Fig. 8 with respect to the number of turns N , for all the BPMs, and for the different initial conditions. The damping of the oscillations is faster for larger kicks, due to amplitude detuning coming from the non-linear magnetic elements. The beam exhibits maximum horizontal and vertical amplitude dependent tune-shifts of (∆Q x , ∆Q y )=(1.5 · 10 −3 , 2.5 · 10 −3 ) for excitations of 2σ to 12σ.

Optics and Symmetries
The PS ring has a mean radius of R = 100 m, and consists of 10 super-periods, each made of 10 combined function magnets. The optics used in these simulations corresponds to the so-called bare machine optics, where the low energy quadrupoles which match the betatron tunes are not activated and there are no skew elements in the lattice. The beta functions and phase advances for both planes, at the location of the 42 BPMs are presented in Fig.9, where the periodicity of the optics, for every 4 BPMs, is visible. This periodicity is however broken in the range of BPMs from 23 to 32. Since optics symmetry is a factor that can potentially interfere with the mixed BPMs method, two BPMs, which are located at positions that perturb the symmetry, are removed.
Moreover, two interesting collections can be sampled from the new configuration of BPMs: a total of 30 BPMs that are almost symmetric with respect to their optics and a total of 10 BPMs that are almost symmetric with respect to the optics and the longitudinal position.
The variation in the optics and in the longitudinal distance of all the above BPM configurations, is measured with the standard deviation and it can be seen in Table 2. From all the configurations, the one which exhibits symmetry in the optics and the longitudinal position is expected to produce the best precision and accuracy.   The Fourier spectra of the horizontal betatron function in one turn are shown in Fig. 10  Due to the one-turn modulations of the optical and longitudinal asymmetries between the BPMs, sidebands are expected to appear in the Fourier Spectra of the mixed BPM signal. For the current chosen BPM configurations, the Fourier spectra for 24 turns are shown in Fig.11. On the top plot, the appearance of sidebands is shown around the main peak of betatron tune, with an exponentially decreasing amplitude.
By using the configuration of 40 symmetric to the optics BPMs, only one sideband appears and the amplitude of the main peak increases due to the absence of any other spectral components, leading to a much cleaner signal. Furthermore, by using 30 equidistant but not symmetric to the optics BPMs, the spectral quantity is almost identical. Moreover, by using 10 symmetric and equidistant BPMs, the signal exhibits only one frequency. This component is the betatron frequency, however due to aliasing arising from the small number of BPMs, the integer part of the tune is found to be 3 instead of 6. Nevertheless, an important result is that the fractional part of the tune can always be determined, regardless of the symmetries between the BPMs.

Precision
A straightforward method to estimate precision is to measure the difference of TbT consecutive measurements. The results can be visualized in Fig. 12 For the horizontal plane, the NAFF algorithm manages to estimate the tunes right from the first 6 turns for all BPM configurations and for both initial excitations. For the 4σ excitation, the single BPM precision is around 10 −2 at 6 turns, while the mixed BPM method exhibits a precision of 10 −3 for 40 BPMs and even lower for the 10 equidistant and symmetric to the optics BPMs. At 50 turns, the precision is below 10 −7 , whereas for the single BPM case it is at around 10 −4 . Regarding the 12σ excitation, the mixed BPM method is found to be more precise than the single BPM analysis. However, for all configurations, the convergence of the measured betatron tunes is heavily modulated by the strong decoherence.
Same conclusions can be also drawn for the vertical tunes. Indeed, for the first 50 turns, mixing the BPM data together results in an improved precision. For the 4σ case, the equidistant and symmetric to the optics collection of 10 BPMs, exhibits the highest precision, while for the 12σ case, both mixed BPM collections present the same level of precision, almost 2 orders of magnitude better than the single BPM case.
It should be noted that the improvement in precision of the transverse tunes estimation, is also found for the rest of the cases of initial excitations.

Accuracy
A common problem in estimating the accuracy of betatron tune measurements, is that the real value of the tune is not known a-priori. Concerning the present simulations, the reference value of the tune could be extracted from the transfer matrices of the particle tracking program, however this would introduce many systematic errors due to decoherence. An illustration of this effect is shown in Fig. 13, where the precision of the tune measurements for the single particle and for the centroid of the particles distribution are plotted for the 4σ excitation (top) and for the 12σ excitation (bottom). The tunes are measured with single BPM analysis and the effect to be highlighted is that, while for the small excitation both convergences agree reasonably well, for the large excitation, a discrepancy is observed after 300 turns. After this point, decoherence due to amplitude detuning is dominant in the BPM signal. An intermediate solution to this problem could be to select a single particle which is located at the center of the transverse distributions and then measure the betatron tunes for a large number of turns. The single particle choice ensures that the only mechanism that would act on the tunes, is the tune-shift with amplitude with no dependence on the number of turns. In addition, a particle at the center of the distribution exhibits the least impact on its dynamics from the non-linear elements of the lattice. Under these considerations, the single particle tunes Q 0 are measured for all cases and compared with the measured centroid tunes Q(N ). Once more, comparisons between the single and the different mixed BPM configurations are made.
The results for the 4σ case are plotted in Fig.14. In the top plot, the error in the horizontal tune estimation is shown with respect to the number of turns, where the improvement of accuracy for the mixed BPM cases is more than obvious. Even for the case of 42 BPMs, with no symmetry to the optics nor to the sampling frequency, the accuracy is at the order of 10 −3 already at 12 turns, one order of magnitude better than the single BPM case, while choosing symmetric BPMs, improves the accuracy for another order of magnitude. The effect of asymmetry in the 42 BPMs is reduced at the very first turns, as predicted from the relationship Eq. (34). In this case, there is not an obvious gain between the 30 symmetric to the optics BPMs and the 10 symmetric to the longitudinal distance BPMs and to the optics BPM. In fact, there is only a marginal increase in accuracy at the very first turns for the latter configuration.
In the bottom picture, the same estimation of the vertical tunes are shown, with similar improvement in the accuracy, when the mixed BPM scheme is used. The fact that the single BPM case in the vertical tune measurements exhibits a faster convergence of the error than the horizontal, can be attributed to the optics. Indeed, by inspecting the working point, the horizontal tune is very close to the 4 th order resonance, which can be excited by strong sextupoles or octupoles. In any case, for both planes there is a substantial improvement in the tune estimation error for a very small number of turns, when the mixed BPM method is used. Similar observations can be made in the case of a larger initial excitation. The tune error is shown for the case of 12σ in Fig.15, with the same configuration as in the previous case. Indeed, the mixed BPM method allows faster and more accurate determination of the betatron tunes in the very first turns than the single BPM method. For this case of large excitation, marginal differences can be observed in the tune estimation error, however they can be attributed to the fact that in this case, the impact of decoherence is stronger as compared to the 4σ case.

Equidistant BPMs
The periodic modulation of the sampling period can result to loss of convergence for very small number of turns. In order to analyze this effect, a new collection of 10 BPMs which are not symmetric to the longitudinal position is sampled from the 42 BPMs. This collection is used for mixed BPM measurements and comparisons are made with the collection of 10 BPMs which are symmetric to the longitudinal position and to the optics. The collection of the longitudinally uniform BPMs is referred to as regular and the non-uniform as irregular. The normalized error δ k in the sampling instance of the BPM k, can be estimated by using information of the longitudinal position of the BPMs, s k . Indeed, the error is defined asδ The normalized errorδ k for the aforementioned BPM collections is shown in Fig. 16 (top), together with the model horizontal beta function (bottom) for the irregular (orange line) and the regular (blue line) BPM collections. The oscillation of the error is negligible for the regular case, whereas for the irregular collection the oscillation of the error is obvious. In addition, the horizontal beta function of the regular case seems almost constant, while the irregular case exhibits larger deviations from a constant value. For the irregular case, both the root-mean-square (RMS) value of the errorδ k and of the horizontal beta function β x , are almost 50 times larger than the respective RMS values of the regular case. Figure 16: The normalized error δ k (top) and the horizontal beta function (bottom) for 10 irregular BPMs (blue circles) and 10 regular BPMs (orange squares). The average va;ue ofδ k has been extracted.
The difference in the tune measurements of the two collections,relative to the tune measurements of the regular BPMs, are shown in Fig.17, for the horizontal plane(blue) and the vertical plane (green) of the 4σ excitation. The trend of the curves exhibit a reduction of the relative difference and at N =30 turns, it is around 10 −6 for the horizontal and one order of magnitude larger for the vertical. The relative error converges at around N =50 turns. As a result, precise tune measurements are possible even for a collection of BPMs with large asymmetry in the longitudinal position. Figure 17: The normalized error between the tune measurements of 10 regular and 10 irregular BPMs, for the horizontal (blue curve)and the vertical (green curve) planes. The vertical axis is shown in logarithmic scale.

Applications on experimental TbT
Over the past years, various measurements in proton and electron storage rings have been undertaken, where the mixed BPM method has been used with success for precise tune determination over a small number of turns [15,16,24,25]. Due to the unavoidable noise of the experimental TbT, any symmetries between the BPMs do not offer any substantial improvement in the convergence. This observation agrees with the detailed measurements that were performed at the ESRF by using the mixed BPM method [15]. Some distinct cases of experimental measurements are presented in this section.

PSB
At the PSB, TbT data are analyzed from beams that are excited by a single kick, horizontally and vertically, at 160 MeV.
Recently, the PSB has been undergoing many upgrades in view of the LIU Project [26]. The ability for precise tune measurements is very important for such a low-energy machine, where collective effects and instabilities can drive the betatron tunes on resonances. The interesting feature of the PSB lattice is that it has a 16-fold symmetry and 16 BPMs, i.e. one BPM is located at each super-period and the optics exhibit no modulations. In addition, the BPMs are equidistant, with an almost equal longitudinal distance of about ∆ s =10 m. As a result, precise measurements could be performed with the mixed BPM method, in a few turns. The results of horizontal and vertical tune measurements, from the aforementioned TbT data, are presented in Fig.18 and Fig.19. The error-bars represent one standard deviation of the statistical uncertainty. Remarkably, the betatron tunes can be extracted with only 10 turns and the convergence at 20 turns is about 10 −5 . The experimental TbT had been also filtered from noise by using Singular Value Decomposition (SVD) [27], which helps as well in the fast and precise measurement of the tunes.

KARA
The KARA ring (previously named ANKA) is a very flexible electron light source, operating at 2.4 GeV. The ring has a 4-fold symmetry and it is equipped with 39 BPMs. Recently, the prototype of the Superconducting Wiggler for the CLIC Damping Rings [28,29] was installed at KARA in order to perform tests. In parallel, optics measurements have been performed with the wiggler at maximum field (2.9 T). The measurements of the horizontal tune with the mixed BPM method, are shown in Fig.20, along with the statistical uncertainty. The method proved to be very efficient also in this case, since the horizontal tunes can be evaluated at around 20 turns, with a convergence of below 10 −3 . This measurement is important in order to quantify any quadrupolar effects of the wiggler on the horizontal tune. Indeed, the results show that a slight horizontal tune-shift is present when the field of the wiggler changes from 0 T to 2.9 T. The tune-shift is at the order of about ∆Q=4 10 −3 .

CERN PS
The PS is one of the most indispensable parts of the Large Hadron Collider (LHC) Injector complex. In the PS ring, the final time structure of the bunches is shaped, a parameter which is very important for the efficient operation of the LHC. At injection, the PS receives bunches from the PSB at kinetic energy of 1.4 GeV and then it accelerates them up to 14-26 GeV. During injection, TbT data are gathered from 43 BPMs around the ring and the mixed BPM method is used in order to be benchmarked against the traditional tune measurement techniques. In order to investigate the injection process, which involves a very fast injection bump [30] and lasts for about 500 turns, a scanning window of 40 turns is applied on the data. In this way, any variations of the instantaneous betatron tunes can be measured. The gating functionality of the BPM system at the PS, is used in order to perform the analysis bunch-by-bunch. A pre-analysis is The results of the scanning window analysis can be seen in Fig. 21, where the estimations of the horizontal (thick lines) and vertical (dashed lines) tunes for 4 bunches (bunch 1 in magenta, bunch 2 in red, bunch 3 in green and bunch 4 in blue) coming from the PSB, are shown. The observation of the periodic modulation of the tunes is evident. The depth of the modulation is such as to have a maximum tune-shift at the order of 10 −2 for both planes. Due to the simultaneous presence of the effect in both planes and the large horizontal amplitude of the beam in the injection area, the effect is attributed to feed-down effects. More specifically, persistent sextupolar fields are created on the surface of the vacuum chamber of the injection bumpers and during injection, they modulate the quadrupolar component of the machine, resulting in the visible TbT tune-shift. This observation is significant for the LHC Injectors Upgrade (LIU) project [31] because such large tune-shifts, can result to particle losses and reduction of the machine's efficiency as an injector. This effect could have not been evaluated without the possibility to estimate the tune and its evolution in a small number of turns, as provided by the mixed BPM method.

Conclusions
The efficiency of the mixed BPM scheme, when combined with NAFF, has been demonstrated for numerical, tracking and experimental data. For all cases, the method has been proven to be extremely efficient for precise tune measurements with a very small number of turns (below 50).
Due to amplitude and phase modulations, which are caused from the periodicity of the optics and of the sampling error at the locations of the BPMs, the estimation of the betatron tunes can be affected but results show that as the number of turns increases, this contribution is reduced.
The mixed BPM method, which combines the TbT data from M BPMs simultaneously, cannot be used with a simple FFT due to the linear dependence of the frequency resolution to the number of samples. When a Refined Fourier Analysis method is used, e.g. NAFF with a Hann window of order p, an improvement of M −(2p+1) is derived in the analytical expressions. Due to the periodic change of the sampling period at each BPM, an error is introduced in the tune estimations which is negligible and it is rapidly reduced.
Numerical simulations confirm the efficiency of the mixed BPM method, for precise measurements of the tune Q within a small number of turns. The change of the sampling rate in the mixed BPM method results in the reduced tunes Q/M and when this fraction is close a rational number, the error in the tune measurement is significantly increased. By implementing a varying frequency scheme, the expected dependence M −(2p+1) is recovered in these simulations.
The mixed BPM technique is also used for tracking data from the lattice of the PS machine. Comparisons with single BPM analysis validate the improvement in accuracy and precision, even for BPMs with asymmetries in the optics and/or the longitudinal position. Depending on magnitude of the modulation of the optics and the sampling rate of the M BPMs, a decrease of the precision in the tune measurements is observed for a very small number of turns , however, this discrepancy is reduced quite fast, as the number of turns increases.
In the case of experimental data, maximization of the number of BPMs is often preferred, than using fewer BPMs with symmetries in the optics and/or to the longitudinal position. The reason for this preference is the existence of noise in the TbT data, which reduces significantly the efficiency of both the single and mixed BPMs methods. Nevertheless, the mixed BPM method has always proved to be very precise when experimental data are used. Useful applications of the mixed BPM method have been demonstrated on data from the PSB and PS proton rings, where the method has been proven capable to perform precise tune measurements in a very small number of turns. As a matter of fact, a large periodic tune-shift has been discovered recently at the PS, during the injection process, which could not have been observed with the single BPM analysis. The scheme of the mixed BPMs is also applied on data from the light source KARA, where betatron tune estimations help in the modeling of the beam's response to the CLIC Superconducting Wiggler.
The mixed BPM method has the potential to be a very useful tool in frequency analysis for accelerators as it offers a substantial improvement in the tune estimations. In addition,future studies could investigate improvements on the method, such as the interpolation of non-uniformly sampled signals [32], in order to minimize the contribution of the various periodic modulations at the position of the BPMs.
Finally, it should be noted that in cases of tracking simulations, the mixed BPM method can be particularly useful for many applications, e.g. for the construction of fast frequency maps or sliding windows in the TbT data to measure the instantaneous tunes. In cases of absence of noise from the data, schemes with BPMs that are equidistant or symmetric to the optics should be preferred, since they can provide even faster convergence, than using all the available BPMs.
7 Appendix A

Frequency resolution of the mixed BPM method with NAFF
The main success of NAFF is the ability to provide an approximation of a KAM [33] quasi-periodic function f (t), which can be a solution of a Hamiltonian system. The function f (t) can be approximated as with n the number of terms, α k and ω k the complex amplitude and real frequency of the k th harmonic.
Physically, the function f (t) can be a trajectory of a non-linear quasi-periodic system, similar to the oscillation of the beam's centroid, along the lattice of an accelerator. The NAFF algorithm can recover the fundamental eigenfunctions of f (t) in a very short time. For instance, the error in the estimation of the main frequency ν 1 = ω1 2π of Eq. (40) has been mathematically proven by Laskar to be [34] |ν(T ) − ν 1 | = for T → ∞, where T the total observation time, ν(T ) is the time dependent frequency estimation of NAFF for the main harmonic, p the order of the Hann window and the constant C L given as where Ω k = k, ν − ν 1 , with the basis vector k = {k 1 , k 2 , ..., k n }, the frequency vector ν = {ν 1 , ν 2 , ..., ν n }. Their inner product k, ν = k 1 ν 1 + k 2 ν 2 + ... + k n ν n is the resonance space of the quasiperiodic solution, {α k } the real part of the complex Fourier amplitude α k of Eq. (40) and the constant Note that in the case of rational frequencies ν, the quasiperiodic orbits cannot be defined and Ω k → 0, which makes the factor in Eq.(42) to diverge rapidly. In addition, the existence of multiple harmonics in the signal Eq. (40) can reduce the convergence to the actual frequencies as well.
In the practical case of frequency analysis of a quasiperiodic signal, where m samples are gathered with a uniform sampling period τ s , Eq. (41) and (42) are modified as: and the factor C L becomes: Next, the mixed BPM scheme is explored with the NAFF algorithm. Under this transformation, in the case of M BPMs that record N turns of the betatron oscillation of the beam, the total observation time is (see Sec. 2.1) where g(m) = 1 + Mδ M m andδ M is the error of the last BPM normalized to the revolution period. Therefore, the sampling period τ s can be expressed as Substitution of the previous expression to Eq. (44) and combining the result with Eq. (47), the error (m) in the betatron tune estimation for the mixed BPM method is written as 1 Ω k 2p+1 (α k ) cos(mg(m)Ω k ) and the term Ω k is .
Since the error termδ M N , the previous expression is expanded aroundδ M ≈ 0 which yields The expression in Eq. (55) testifies that the convergence is improved by a factor of M 2p+1 with the mixed BPM method. The contribution of the small errorδ M converges to zero rapidly enough, so as to be negligible in the frequency analysis with NAFF and the mixed BPM method.