Longitudinal beam dynamics simulation in electron rings in strong rf focusing regime

Obtaining very short bunches in an electron storage ring is one of the frontiers of the accelerator physics. The strong rf focusing (SRFF) is a way to have short bunches at a given position in the ring, thanks to the principle of the bunch length modulation. Until now, the bunch length modulation has been studied only in the limit of zero current; in this paper we present the results of a simulation code suitable to study the effects of coherent synchrotron radiation and vacuum chamber wakefields on the single bunch longitudinal dynamics in the SRFF regime . The code has been applied to three different lattices that can be realized in the Frascati e =e collider DA NE for a possible experiment on bunch length modulation.


I. INTRODUCTION
Short bunches are very important for electron storage rings. In a e =e ÿ collider, bunch length at the interaction point limits the maximum luminosity one can achieve. In fact, because of the hourglass effect [1], the vertical betatron function at the interaction point (inversely proportional to the reachable luminosity) can be reduced up to the bunch length value. In a synchrotron light source, with short bunches, it is possible to produce coherent synchrotron radiation (CSR) [2]. Both luminosity and power emitted by CSR are proportional to the square power of the current stored in the bunch. On the other hand, in general, the shorter the bunch, the smaller the number of particle one can store steadily. In fact, the wakefields due to the interaction of the beam with the vacuum chamber components or the ones due to the CSR, affect beam dynamics and are possible sources of instabilities. In general, at a given current the threshold of these instabilities is lower if the bunch is shorter [3].
The common strategies to reach short bunches in storage rings [4] are based on the reduction of the momentum compaction factor and/or in the increase of the rf voltage. In each case the bunch has a small constant length along the ring even if one has, in general, the necessity to have a short bunch only at given positions in the machine (for example, at the interaction point). In a strong rf focusing (SRFF) regime, bunch length changes along the ring and the bunch is short at given positions only [5]. The advantage of such a solution is to reduce, in principle, the effects due to the short range wakefields. In fact, the effects of the wakefield are related to the average value of the bunch length along the ring and, for a given minimum bunch length, this average value is larger in the SRFF regime.
Another advantage of this solution is that it is possible to design the machine in order to have all the elements with a large impedance where the bunch is longer in order to reduce the wakefield effects [5].
Bunch length modulation (BLM) in lattices with high and low momentum compaction has been widely studied at zero current [6]. In this paper we present the results obtained with a dedicated simulation code written in order to quantitatively study the effects of the short range wakefields (due to the vacuum chamber components and CSR) in this regime.
The paper is organized as follows. In Sec. II we briefly summarize the principles of the SRFF regime. In Sec. III we introduce the main elements of the simulation code, including the wakefield models that we have adopted. In Sec. IV we illustrate the possibility of a BLM experiment at DANE [7]. In the last section we discuss the simulation results, obtained with the code, for the case of the BLM experiment at DANE.

II. STRONG rf FOCUSING PRINCIPLE
In an electron storage ring with one rf cavity placed at s rf , the voltage gradient can be defined as and the longitudinal drift function is where V rf is the peak voltage, rf the rf wavelength, E 0 the nominal energy, s the dispersion function, and s the bending radius. The SRFF regime can be achieved when the voltage gradient U is high and the drift function R 1 s is large [5]. Under this condition the single particle longitudinal dynamics can be described by a matrix formalism in which one can define the longitudinal Twiss parameters: where L is the length of the ring, c is the momentum compaction, and With this formalism the synchrotron tune is Q s =2 and, as usual, it depends on the momentum compaction and the rf system parameters only. Considering the whole bunch, it can be shown that, at equilibrium, the longitudinal emittance L is an invariant along the ring. The sketch of the longitudinal phase space ellipse of a bunch along the ring in the case of SRFF is shown in Fig. 1. The phase space ellipse changes the orientation along the ring according to the longitudinal Twiss parameters shown in Eqs. (3), without changing its area and its height.
The height of the ellipse represents the energy spread of the bunch and its value is given by the eigenvalues of the transport matrix taking into account the processes of radiation damping and quantum excitation due to the synchrotron radiation: where C L 2:15 10 ÿ19 m ÿ2 s ÿ1 and k is the longitudinal damping decrement defined by with C 2113:1 m 2 = GeV 3 s and I 2 and I 4 the usual synchrotron radiation integrals. The bunch length is given by and it varies along the ring because of the variations of L that depends on c , R 1 s, and the rf system parameters. Usually, in storage rings, the values of the U parameter and drift function are so small that L ! c L sin and it does not depend on s: as a consequence we have not modulation for the bunch length and Eqs. (5) and (7) become the standard ones [8].
There are two different ways to obtain a regime of bunch length modulation depending on the monotonicity or not of the drift function. If the drift function R 1 s is monotonic, the momentum compaction c and synchrotron tune Q s are high and the minimum bunch length occurs in the ring region opposite to the cavity [5]. On the contrary, when R 1 s is nonmonotonic, with large derivatives with opposite signs in two different zones of the ring, the momentum compaction [that is equal to R 1 L] may be set to a very small value. This method offers an alternative way to have an isochronous lattice that, in spite of the low c , has the peculiarity to present a strong correlation of the longitudinal phase space in the different sections of the lattice. With a nonmonotonic R 1 , the lattice has also low Q s and the minimum bunch length position occurs nearer to the cavity the lower the momentum compaction [6].
The bunch length modulation factor F m can be defined as the ratio between the maximum and the minimum values of the bunch length When R 1 s is monotonic, a noticeable value of F m can be reached by a high rf voltage and a high momentum compaction: in these conditions the longitudinal phase advance approaches 180 . In the nonmonotonic case, the modulation factor can be increased by decreasing c : in this condition approaches to zero. The same F m can be obtained in the nonmonotonic behavior with lower rf voltage than in the monotonic case if the value of c is sufficiently small. Both regimes have advantages and drawbacks. In the monotonic case one could expect that the high c increases the microwave instability threshold (at least following the Boussard criterion [3]) and, placing the rf cavity where the bunch is longer, the longitudinal beam dynamics is less affected by the cavity wakefield [5]. However, the high Q s could crowd with strong resonances the working point, limiting, e.g., the dynamical aperture [9]. Moreover, in the high Q s regime, given a certain lattice, the stability criterion for the synchrotron oscillations reported in [5] limits the maximum voltage and therefore the modulation factor, while in the low Q s regime the modulation factor can be increased in a much larger range.

III. SIMULATION CODE
The simulation code SPIDER (simulation program for impedances distributed in electron rings) has been written in order to study the effects of the CSR and of the vacuum chamber wakefields on the longitudinal single bunch dynamics in the BLM regime. In the code the bunch, described by N macroparticles, runs in the machine that is divided into an arbitrary number of longitudinal drift spaces and rf cavities. The code calculates the longitudinal phase space coordinates of each macroparticle at the end of each section (drift space or cavity) turn by turn. The used coordinates are the energy deviation E ÿ E 0 and the displacement from the synchronous particle z (z > 0 means that the particle is ahead).
If the section represents one rf cavity, the single bunch dynamics equations are ( zs 2 zs 1 s 2 s 1 U cav zs 2 eV rf cos ÿ 2czs 1 rf ; where s 1 and s 2 are the beginning and the end of the section, respectively, is the synchronous phase, and U cav zs 2 is the energy loss due to the cavity wakefields. If the section is a longitudinal drift space the equations are where U CSR zs 2 and U pipe zs 2 are the energy losses due to the CSR and vacuum chamber wakefields and U ISR s 2 ; s 1 is the contribution of the incoherent synchrotron radiation given by U ISR s 2 ; s 1 ÿU 0 s 2 ; s 1 ÿ Ds 2 ; s 1 s 1 G E s 2 ; s 1 2Ds 2 ; s 1 q ; (11) where (i) U 0 s 2 ; s 1 is the energy radiated by the synchronous particle [8] in the section given by with 0 the vacuum permittivity; (ii) Ds 2 ; s 1 is the damping factor [8] of the section defined as (iii) G is a Gaussian random number with zero mean and unitary rms; (iv) E s 2 ; s 1 is the energy spread, without BLM, [8] of the section, given by with C d 6:197 10 ÿ7 m 1=2 ; (v) I 2 s 2 ; s 1 , I 3 s 2 ; s 1 , and I 4 s 2 ; s 1 are the usual synchrotron radiation integrals calculated in the section. In the incoherent synchrotron radiation contribution, the term ÿU 0 s 2 ; s 1 ÿ Ds 2 ; s 1 s 1 is the radiation damping term [8], representing the average value of the emitted radiation, while the term G E s 2 ; s 1 2Ds 2 ; s 1 p is the quantum excitation term of the process [8] and it takes into account the quantum nature of the synchrotron radiation.

A. Wakefield models and calculation
The vacuum chamber wakefield contribution is calculated by the convolution of the bunch longitudinal distribution z with the wake functions wz of the considered section. As suggested in [10], the bunch longitudinal distribution is calculated by binning the N macroparticles in N bin bins. The energy loss of a particle in the center of each bin U wake z i is calculated by approximating the integral of the convolution by a sum on the bins: where Q is the bunch charge, nz j is the fraction of the macroparticles in the bin. The vacuum chamber wake function of each section is given in an input file through the values it takes in a certain number of points.
Concerning the CSR wakefield different models of wake function have been implemented in the code. For the dipole contribution, the code can include (i) steady state CSR wakefield [11]; (ii) entrance and exit transients effects [12]; (iii) pipe shielding effect [13]. For wigglers, the code includes the steady state wakefield given in [14].
In all the CSR wakefield models it is necessary to calculate the derivative of the bunch profile. Since bunch distribution is a discrete function, its numerical derivative has to avoid the introduction of unphysical microbunching effect [15]. In the code the numerical derivative is obtained by a Savitzky-Golay filter [16] exploiting a fast-Fouriertransform algorithm. As suggested in [15], the parameters of the filter can be set according to the parameters of the considered magnet by observing the convergence of the microbunching effect.
As in the case of the vacuum chamber wakefield, the energy lost by a particle in the center of the ith bin due to the CSR is calculated by approximating the integral of the convolution by a sum. However, in some of the presented models the wake function diverges as 1=z 1=3 when the distance z between the trailing and leading charge approaches to zero. Therefore the sum on the bins has the following form: where z is the distance between the bins, k depends on the considered model, and we have used the following approximation: The energy lost by each macroparticle in a section is calculated by a linear interpolation of the energy loss of each bin center summing up the contribution of all the wakefields. In order to avoid numerical errors the number of the bins and of the macroparticles has to be chosen by testing the convergence of the code in different conditions.

B. Tests of the implementation
All the wakefield contributions included in the code have been tested separately.
Concerning the vacuum chamber wakefield effects, we have reproduced the bunch lengthening and microwave threshold with the DANE nominal parameters [10].
In this case the DANE wake function has been calculated from the wake potential of a 2.5 mm Gaussian bunch obtained by numerical codes. We remind that the natural bunch length is of the order of 1 cm [10]. The optimized numbers of bins and of macroparticles were respectively N bin 100 and N 10 5 .
Concerning CSR effects, it was necessary to test the derivative algorithm implemented in the code. As pointed out previously, the derivative of the distribution depends on the number of macroparticles, number of bins, parameters of the moving window, and order of the polynomial used in the Savitzky-Golay smoothing filter. The tests that we have done are those suggested in [17]. The derivative method was tested with the dipole steady state model and the effect on a Gaussian bunch was analyzed. First, a comparison was made between the energy lost by the particles obtained by the code, and the energy loss calculated using an analytical Gaussian distribution. The comparison between the numerical and analytical results is shown in Fig. 2 for a 3 mm long Gaussian bunch with a charge of 1 nC that passes through a 1 m long dipole with a 1.5 m bending radius. The best agreement between the two functions has been obtained considering at least N bin 256, N 1:5 10 5 , a symmetric moving window of 33 points and the order of the polynomial equal to four.
In order to test the choice of these parameters, the following analytical formulas have been compared with the numerical results: where h E 0 i and E 0 j s:d: are, respectively, the mean fractional energy offset and the standard deviation of the fractional energy offset in the case of a Gaussian bunch with charge Q and length L due to the passage in a dipole of length L b and bending radius . These formulas have been studied with respect to bunch length and dipole bending radius. As an example, in Figs. 3 and 4 we report two of these results.
Furthermore, the CSR models depend on parameters that are found numerically. These parameters and the infinite sum of the pipe shielding wake function could introduce numerical errors. Therefore other tests have been done to check the convergence of the code. In particular, concerning shielding effects it was studied the convergence of the wake function calculation, as obtained by the code with the ones reported in [13].
Concerning the transient effects, a comparison has been done between the analytical results, reported in [12], and the ones calculated by the code.

IV. PROPOSAL OF SRFF EXPERIMENT AT DANE
Thanks to the initial design which foresaw independent power supplies for each quadrupole, in DANE [7] there is the possibility to tune the dispersion on a wide range, obtaining different behaviors of R 1 s. However, the present rf system (V rf 250 KV and f rf 368:26 MHz) gives at maximum U 3:7 10 ÿ3 m ÿ1 and it does not allow to reach a measurable bunch length modulation regime. This problem can be overcome by making the U parameter large enough by installing a tesla-like rf cavity at 1.3 GHz with a maximum voltage of 10 MV [18] in one of the two interaction regions. Three different lattices have been proposed [9]: structure A in which R 1 s is monotonic; structure B corresponding to a nonmonotonic regime; structure C also nonmonotonic but with a much lower value of c . Table I gives a summary of the relevant parameters for our study of the lattices A, B, and C. Figure 5 shows the drift function R 1 s along the ring in the three different cases (the cavity position corresponds to s 0).

V. SIMULATION FOR THE DANE BLM EXPERIMENT
The code has been applied to study the wakefields effect in the SRFF experiment at DANE. The ring has been divided in five sections: one super conducting (SC) cavity and four longitudinal drift spaces 25 m long. The numbers of macroparticles and bins, used for simulations, have been respectively N 1:5 10 5 and N bin 256. For different bunch currents and for two values of the SC rf voltage (3 and 9 MV) we have studied the effects on longitudinal single bunch dynamics of (i) beam pipe wakefield only; (ii) CSR wakefield only; (iii) beam pipe and CSR wakefields; (iv) beam pipe, CSR, and SC cavity wakefields.

A. Vacuum chamber wakefield
As pointed out in Sec. III, to study the bunch lengthening at the present status of DANE, the wake function has been approximated with the wake potential of a 2.5 mm Gaussian bunch. Since in the case of the SRFF experiment bunch length is few mm, the vacuum chamber wake function can be no longer approximated by this wake potential. Therefore the wake function of each longitudinal drift section has been approximated by an RLC equivalent model whose parameters have been found by fitting the wake potential of the 2.5 mm bunch. Figure 6 shows the DANE wake potential for a 2.5 mm bunch, and the one obtained with the fitted RLC model (the optimum R, L, and C are, respectively, 6:56 k, 35 nH, 1:3 fF).
The choice of the RLC approximation ignores possible high frequency impedance information (corresponding to the spectrum of a bunch shorter than 2.5 mm). For a more accurate analysis it would be necessary to calculate the wake potential of a bunch shorter than 1 mm. This study, that requires a lot of computational time, will be the subject of a further analysis. However, even with this approximation, one can find interesting results that can be refined with a better approximation of the vacuum chamber wakefield.

B. SC cavity wakefield
For the tesla-like SC cavity wakefield, we have considered the analytical approximation given in [19] wz 38:11:165 e ÿ z=3:65 ; (20) where z is expressed in mm and L cav is the cavity length in meters. As an example, in Fig. 7 we report the energy loss of a particle in a 2 mm Gaussian bunch (Q 1 nC due to the tesla cavity wakefield and DANE vacuum chamber wakefield. It is possible to observe that, at least in this case, the contribution of the tesla cavity wake is more than 1 order of magnitude lower than vacuum chamber contribution.

C. CSR wake
Each of the four longitudinal drift sections contains two dipoles and a wiggler. Tests on the free space steady state energy loss due to the dipoles and the wigglers showed that, for the DANE case, the CSR contribution is dominated by the dipoles. As an example, in Fig. 8 we report the energy loss due to the CSR in dipoles and wiggler for a particle in a 2 mm Gaussian bunch with Q 1 nC. The calculation has been done considering the free space CSR wakefield model because the contribution of the pipe shielding in the two cases is almost the same.
While pipe shielding effects are relevant for bunch length greater than 2 mm, the transient effects are, in general, negligible. For these reasons in the simulations we  have considered the shielded dipoles CSR wakefield contribution only.

D. Simulation results
The turbulent regime threshold, defined by the current at which the energy spread begins to increase, has been calculated in the three different cases A, B, and C. Above this threshold the strength of the microwave instability, up to a current of 25 mA, has been studied. Figures 9 and 10 show the minimum bunch length, the modulation factor, and the energy spread as a function of current (up to 5 mA) for cases A, B, and C with V rf equal to 3 and 9 MV considering the effects of all wakefields. Above the turbulent regime threshold, the bunch distribution oscillates and bunch length was taken as its average value over the last two thousands turns. In each figure error bars correspond to the strength of the instability and are obtained by the standard deviation of the values of the bunch length in the last two thousands turns. When the values are not reported it means that the instability is too strong and the bunch becomes completely unstable.
In case A with 3 MV the BLM factor is low (F m 1:178 at zero current) and the natural minimum bunch length is 2.8 mm. In this case the turbulent regime threshold occurs at 1:5 mA and above this threshold the bunch increases its length remaining stable. Increasing the rf voltage up to 9 MV the BLM becomes higher (F m 2:5 at zero current) and the natural minimum bunch length is 1.27 mm. In this case the turbulent regime threshold occurs at 1 mA and, above this threshold, the bunch increases strongly its length becoming almost immediately unstable. In cases B F m is equal to 1.49 and 2.16 (at zero current) with 3 and 9 MV, respectively. At low rf voltage the modulation factor is greater than in case A, while with 9 MV it is lower. In the  3 MV case, the minimum bunch length is 1.89 mm and the turbulent regime threshold is about 0.2 mA; above this threshold the bunch increases its length becoming strongly unstable for currents above 3 mA. By increasing the current this instability decreases its strength: this strange behavior (one expects the instability increases with the current) can be explained observing the longitudinal particle distribution. Figure 11 shows the normalized particle distribution at three different currents. By increasing the current above 1 mA, spikes appear in the bunch distribution causing great instability; for currents greater than 3 mA, the wakefields cause a general lengthening of the bunch and these spikes disappear, reducing the instability up to 5 mA; above this current the instability increases again.
In the case of 9 MV, the minimum bunch length reduces to 1.53 mm but the turbulent regime threshold is higher than the previous case (1 mA): above the threshold the bunch lengthens and it is affected by instability.
In case C with 3 MV, thanks to the low momentum compaction, the modulation factor at zero current is 3.2 and the minimum bunch length is 1.28 mm, almost equal to case A with 9 MV. The threshold is 0:2 mA and above this threshold the bunch increases its length remaining stable. With 9 MV, the threshold and the natural minimum bunch length ( L min 1:2 mm) are very similar to the ones with 3 MV. Thanks to a greater modulation factor (F m 5:36) the bunch length starts to increase very smoothly with respect to the previous case and the beam dynamics is not much affected by instability effects.
For completeness we report in Figs. 12 and 13 the minimum bunch length, the modulation factor, and the energy spread as a function of current up to 25 mA. In these plots, to put in evidence the BLM effects, results have been compared with the ones obtained with a very low momentum compaction lattice ( c 0:004, V rf 0:5 MV, and f rf 1:3 GHz) and no BLM. In this case,   labeled as NO SRFF, the natural bunch length is 1.6 mm. As the figures show, the bunch length and the energy spread increase rapidly because of the strong microwave instability and above 4 mA the bunch becomes completely unstable.
As a general comment, we can observe that the turbulent regime threshold is higher in the monotonic regime (structure A) but above this threshold the instability grows faster than in the nonmonotonic regimes (structures B and C). Comparing structures B and C, we may conclude that this consideration is more relevant with lower momentum compaction. These properties are due to the fact that, in the nonmonotonic regime at a given rf voltage, the modulation factor is higher than in the monotonic structure. Therefore, at a given minimum bunch length, the average length along the ring is higher. Furthermore it has been verified that in the regimes with the greatest modulation factor (cases C), F m depends on the current, increasing immediately after the threshold. This contributes to further increase the average bunch length on the ring reducing the effect of the wakefields on the minimum bunch current.
With different simulations we have verified that the effect of the tesla cavity wakefield is negligible even in cases in which the minimum bunch length is in the cavity itself.
Moreover, to show the effect of the CSR contribution to the bunch dynamics, in Figs. 14 and 15, we have reported the same results of Figs. 12 and 13, considering the CSR contribution only. In case A with 3 MV, thanks to the larger value of the natural bunch length, the pipe shielding effect strongly reduces the CSR wakefield contribution. Therefore the bunch is below the turbulent regime threshold even at the maximum current. In the other cases, shielding is not sufficient to eliminate CSR wakefield effects. The turbulent regime thresholds are higher than the ones obtained considering all the wakefields. In case A with 9 MV, it is about a factor four higher and the  bunch is not storable for currents greater than 5 mA. In case B with 3 MV the threshold is about 2 mA, while with the 9 MV voltage it becomes 3 mA. In cases C, with 3 MV the threshold is near to 0.5 mA while with 9 MV it is almost 3 times higher. In Fig. 16 we report the ratio N 2 = L min where N represents the number of particles in the bunch and L min is the minimum bunch length obtained by simulation. This quantity is related to the maximum achievable luminosity in the case of short bunch at interaction point, in the hypothesis of a vertical betatron function (at the interaction point) equal to the bunch length. Of course we do not claim that the luminosity scales with the same factor, because the optimization of the overall collider parameters in the different conditions must be taken into account. As a comparison we have also reported the point corresponding to the present DANE parameters [20].

VI. CONCLUSIONS
The principle of bunch length modulation along a storage ring was studied under the effect of wakefields due to the CSR and the interaction of the beam with the vacuum chamber by the dedicated program SPIDER. Simulations have been performed for different kinds of SRFF lattices realizable in DANE to study the bunch lengthening and the instability threshold. This study showed that, also in presence of wakefields, the bunch length modulation given by the SRFF is maintained. In the present DANE rings, bunches with lengths in the range of few mm could be obtained with bunch currents above 10 mA, while in a quasi-isochronous regime and no SRFF only currents below the mA can be steadily stored.
Therefore, from the point of view of single bunch dynamics, the principle of BLM appears to be an efficient way to reach the goals of electron colliders and CSR sources. Furthermore, recently, an idea appeared to apply the principle of SRFF in Compton rings [21], in which high currents and a short bunch only in the interaction region with the laser are required. Therefore, as a future application of the code, it will be possible to study bunch lengthening in the proposed low emittance and momentum compaction lattice of the ILC Compton ring [22], after it will be modified including BLM.
Future upgrades of the code will include also improved models for the CSR wakefield calculation, that were not needed for their immediate application in the DANE case.