Harmonic cavities and the transverse mode-coupling instability driven by a resistive wall

The effect of rf harmonic cavities on the transverse mode-coupling instability (TMCI) is still not very well understood. We offer a fresh perspective on the problem by proposing a new numerical method for mode analysis and investigating a regime of potential interest to the new generation of light sources where resistive wall is the dominant source of transverse impedance. When the harmonic cavities are tuned for maximum flattening of the bunch profile we demonstrate that at vanishing chromaticities the transverse single-bunch motion is unstable at any current, with growth rate that in the relevant range scales as the 6th power of the current. With these assumptions and radiation damping included, we find that for machine parameters typical of 4th-generation light sources the presence of harmonic cavities could reduce the instability current threshold by more than a factor two.


I. INTRODUCTION
A distinctive feature of the new generation of storagering light sources is a narrow vacuum chamber to accommodate high-gradient magnets and high performance insertion devices, significantly enhancing the resistive wall (RW) impedance.Another feature is the employment of harmonic cavities (HCs) to lengthen the bunches.While already of common use in many existing light sources, HCs are essential in the new low-emittance machines to reduce scattering effects and ensure acceptable lifetime.It is therefore of interest to investigate specifically how the presence of HCs affects the transverse instabilities driven by RW.
The potentially beneficial effect of HCs ("Landau cavities") on longitudinal multibunch instabilities has long been known [1][2][3][4].Similarly, there is evidence that they may help with multibunch transverse instabilities [5] and progress has recently been made to clarify the stabilizing mechanisms by detailed macroparticle simulations [6].A satisfactory general theory of transverse instabilities with HCs, however, is still lacking.Our goal here is to present progress toward the development of such a theory.We do so by addressing the narrowly defined problem of singlebunch RW driven transverse instabilities with vanishing chromaticites when the form of the rf bucket is strictly quartic.This is the regime where the HCs are tuned for maximum flattening of the electron bunches and electrons infinitesimally close to the synchronous particle experience vanishing synchrotron-oscillation frequency.As the focus is on vanishing chromaticities, the scope of our investigation is the successor of the transverse mode coupling instability (TMCI) occurring in the absence of HCs.
The most relevant reference remains a 1983 paper by Chin et al. [7], where the effect of HCs was studied using conventional mode-analysis methods in the approximation where the presence of HCs amounts to a small nonlinear perturbation.The authors briefly addressed the fully nonlinear regime by attempting an admittedly hand-waving extrapolation of the perturbation-theory results and argued that transverse motion would be unstable at any current (if radiation damping is neglected).In contrast, in unpublished simulation work [8] Krinsky noted that HCs could worsen the stability of short bunches but indicated the existence of a well defined instability threshold (radiation damping not included).Recently, simulations reported in [5,9] showed no difference in bunch instability at vanishing chromaticities with or without HCs.A secondary goal of our paper is to attempt to reconcile these conflicting claims.
The method we employ here is still based on mode analysis of the linearized Vlasov equation-the workhorse of all beam instability studies.However, it differs from the traditional approach in two important respects: first, the radial dependence of the modes is represented by values on a grid, rather than through an expansion in orthogonal basis functions; second, the determination of the growth rate of the unstable modes is not cast in the form of a linear eigenvalue problem but entails the search for the roots of a more complicated secular equation.Our choice of the method follows from recognizing that a nonlinear perturbation to the single-particle longitudinal dynamics causes the linearized integral equation for the collective modes to be singular in nature.As a consequence, the eigenfunctions are, in general, not ordinary functions but rather distributions in the sense of Dirac akin to Van Kampen's modes [10,11], creating an obvious difficulty if we insist on seeking a representation in terms of smooth basis functions.The advantage of using a representation of the radial functions on a grid has been noted and exploited before in the study of longitudinal instabilities [12][13][14][15] and more recently in the study of transverse instabilities as well [16]; however it does not fully remedy the highlighted difficulty.A more satisfactory solution to the problem combines this representation with a regularizing transformation to remove the singularity of the integral equation along the lines of our earlier work [14,15].Although at the cost of a more complicated form for the secular equation, the regularized integral equation exhibits better convergence properties against finite-dimension approximations.
We provide a demonstration that indeed, in the absence of radiation damping the transverse motion at vanishing chromaticities is always unstable, regardless of bunch current, with growth rate varying from a Im Ω ∼ I 6 b dependence at small bunch current I b to Im Ω ∼ I b for larger I b , the former being more likely to be encountered in the physical systems of interest.Because of the strong 6thpower dependence, macroparticle-simulations results could be easily misinterpreted as indicating the existence of a current threshold if the simulation time is not sufficiently long, thus providing some ground to Krinsky's findings [8].
The content of the paper is as follow.After establishing notation and stating the linearized Vlasov equation in Sec.II, in Sec.III we review the analysis of the TMCI in the absence HCs.Since the integral equation is nonsingular, the conventional eigenvalue-analysis method is adequate; we follow this method but with the notable difference of adopting a grid representation for the radial modes, which will be key to our approach in the nonlinear case and recover the well known characterization of the TMCI.In Sec.IV we introduce the HCs.First, we apply the conventional eigenvalue method and comment on its shortcomings and finally we investigate stability using the new approach leading to the main result this paper, Eq. ( 27).The Appendices contain relevant formulas for the singleparticle longitudinal motion with HCs (A), a brief description of the RW impedance model and related quantities (B), and numerical details for solving the regularized integral equation (C).
In this paper we generally follow the conventions adopted in, e.g., A. Chao's book [17], (bunch head at z > 0; nonvanishing domain of wakefunction at z ≤ 0; use of cgs units; elementary charge e > 0.)

II. NOTATION, VLASOV EQUATION
The starting point is the Vlasov equation for the 4D phase-space beam distribution Ψðy; p y ; z; δÞ in the longitudinal and transverse (say the vertical) direction followed by linearization about the equilibrium.To this end we write the distribution as Ψ ¼ Ψ 0 þ Ψ 1 with Ψ 0 ¼ f 0 ðy; p y Þg 0 ðz; δÞ being the equilibrium of the unperturbed motion (with normalization R dydp y f 0 ¼ 1 and R dδdzg 0 ¼ 1) and the one-frequency component of the induced perturbation.
Our instability analysis encompasses only the Hamiltonian part of the dynamics, thus ignoring the Fokker-Planck term for radiation effects [18,19] in (1).Radiation effects, however, are accounted for in the choice of the thermal equilibrium for g 0 and (Sec.IV) in the determination of the instability threshold as resulting from the balance between the growth rate of the most unstable mode and radiation damping.The betatron motion is described in the smooth approximation by ẏ ¼ p y and ṗy ¼ −ω 2 y y þ F y ðz; tÞ with F y being the collective (scaled) force associated with the transverse wake function W y ðzÞ.In cgs units: where N is the bunch population, r c the electron classical radius, T 0 the revolution time, γ the relativistic factor, and dz 0 y d ðz 0 ; tÞ (dimension of length) the vertical offset of the bunch slice centered at z 0 .We assume the single-particle motion in the longitudinal plane to be unaffected by collective effects, integrable, and therefore describable in terms of the action-angle variables ðJ z ; φ z Þ, implying that φz ¼ ω s ðJ z Þ, the synchrotron oscillation frequency, is a function of J z only (or a constant independent of J z if the motion is purely linear).We also assume that the canonical transformation from the actionangle variables to z has the form z ¼ rðJ z Þ cos φ z with amplitude r depending only on the action J z and where there is only one harmonic in φ z .This form is exact in the purely linear case and, we believe, sufficiently accurate in the nonlinear case of interest, see Appendix A. The more general case where z ¼ rðJ z ; φ z Þ does not pose any conceptual difficulties but would complicate the numerical calculation.
Linearization of (1) yields From here, following the derivation detailed, e.g., in [17,20] we are first led to an equation involving only Here, g 1 ðJ z ; φ z Þe −iΩt has the interpretation as the average vertical offset of the particles contained in the infinitesimal area ΔJ z Δφ z centered at ðJ z ; φ z Þ at time t.Upon introducing the azimuthal-mode decomposition we are finally led to where we have changed the notation to write R m ðrÞ for R m ðJ z ; ΩÞ.This is a more general form of what in the literature is known as Sacherer's integral equation, with kernel where Z y ðkÞ is the impedance corresponding to the wakefunction in (3), and J m are the Bessel functions.Note that ( 6) is more conveniently phrased in terms of the amplitude r rather than the action.

III. LINEAR SYNCHROTRON OSCILLATIONS
In the presence of a single-frequency rf system, the linear approximation for the single-particle equations of motion in the rf bucket, ż ¼ −αcδ and ̇δ ¼ ω 2 s0 /ðαcÞ, is generally very accurate.These equations can be derived from the Hamiltonian H ¼ αcδ 2 /2 þ ω 2 s0 z 2 /ð2αcÞ upon identifying z as the momentum-like canonical coordinate.In the expressions above α > 0 is the momentum compaction, ω 2 s0 ¼ αceV 1 k 1 cos ϕ 1 /ðE 0 T 0 Þ the synchrotron oscillation frequency, E 0 the reference particle energy, V 1 and k 1 the rf voltage and wave number, respectively, ϕ 1 the rf phase with sin ϕ 1 ¼ U 0 /ðeV 1 Þ.(In the limit U 0 → 0, consistent with the bunch-head at z > 0 convention, we have ϕ 1 → 0, where U 0 > 0 is the particle energy loss per turn.) With the thermal equilibrium in the form of a Gaussian, the natural rms bunch length σ z0 and rms relative energy spread σ δ are related by σ z0 ω s0 ¼ αcσ δ .Note the σ z0 notation for the rms bunch length in the absence of HCs, vs. σ z in the presence of HCs to be used later.
The transformation to the action angle-variables yielding and therefore we have r ¼ ffiffiffiffiffiffiffiffi ffi Þ is the equilibrium.
Next, upon introducing the scaled radial variable ρ ¼ r/σ z0 , dividing both terms in (8) by ω s0 , and specializing the calculation to the RW impedance model (B1) corresponding to a circular cross-section pipe of radius b, length L u , and conductivity σ c we find is the collective-mode complex frequency shift in units of the synchrotron-oscillation frequency, we have introduced the (dimensionless) current parameter and written ω y ¼ c/β y , valid in the smooth approximation.The generalization to the non-smooth approximation and the case where the impedance has a local s dependence is accomplished by the substitution β y L u Z y → R β y ðsÞðdZ y /dsÞds [19,20].For conversion to MKS units, replace σ cgs c → σ MKS c Z 0 c/ð4πÞ.Equation ( 9) is a system of Fredholm integral equations of the second kind.These equations are known to admit converging finite-dimension approximations, provided that the kernel satisfies certain conditions often met in the physical systems of interest.Instead of seeking to expand in terms of orthogonal polynomials, we approach the eigenvalue problem by representing the radial functions R m;n ≡ R m ðρ n Þ on a uniform grid ρ n ¼ ðn − 1/2ÞΔρ n , with n ¼ 1; 2; …; n max and Δρ ¼ ρ max /n max , where ρ max is chosen to be large enough for e −ρ 2 max /2 to be negligible.The discretized equation can then be represented as where the unknown is the and Stability is studied by solving the eigenvalue problem For comparison with the numerical solutions, it is useful to derive an approximate expression for the rigid-dipole mode (m ¼ 0) tuneshift valid in the small-current limit.In (9) retaining only the term m ¼ 0 we have Following [17,20], the tuneshift is evaluated by inserting R 0 ¼ e −ρ 2 /2 , (the presumed form of the rigid-dipole mode for Î ¼ 0) into ( 15), multiplying by ρ, and integrating: The result of the eigenvalue analysis is shown in Fig. 1, exhibiting the characteristic signature of the TMCI.Increasing the current removes the degeneracy of the azimuthal modes and causes the real part of the frequency of one of the m ¼ 0 modes to cross that of the m ¼ −1 modes (top picture).The first crossing, approximately described by the tuneshift formula (16), red curve in the top picture, occurs at Î0 ¼ Îc0 ≃ 0.197, at which point the frequency of the merged mode acquires a positive imaginary part (bottom picture), setting the threshold of the TMCI.Further crossings occur at higher currents triggering more unstable modes.These are of academic interest since the beam is likely to have been long lost before reaching those currents and in any case linear theory will have ceased to be valid.In the analysis shown here we retained only three azimuthal modes (m ¼ −1, 0, and 1, or m max ¼ 1).Inclusion of additional azimuthal modes does not change the determination of the critical current Îc0 appreciably and has only the effect of introducing new unstable modes at higher currents.
For a practical illustration loosely based on parameters from the ALS-U design studies [21], assume that RW is the only relevant source of transverse impedance and that it is dominated by aggressively narrow ID vacuum chambers of b ¼ 3 mm radius, see Table I.There are 10 straight sections available for IDs and we conservatively assume that the vacuum chamber is identically narrow in all of them.Finally, assuming copper material for the vacuum chamber (σ c ¼ 5.3 × 10 17 s −1 in cgs units, or 5.9 × 10 7 Ω −1 m −1 in MKS units), we find a critical N c0 ¼ 3.3 × 10 10 bunch FIG. 1. Eigenvalue analysis of the classical TMCI in the absence of HCs.The top (bottom) picture shows the real (imaginary) part of the complex-number mode frequencies Δ Ω ¼ ðΩ − ω y Þ/ω s0 over a range of bunch currents.The current parameter Î0 is defined in (10).The instability threshold is at about Î0 ¼ Îc0 ≃ 0.197, resulting from the convergence of the real parts of the frequencies of the m ¼ 0 and m ¼ −1 modes.In the top picture the red line is the tuneshift for the rigid dipole mode as given by Eq. ( 16).In the analysis we retained only three azimuthal modes (m max ¼ 1) and represented the radial part of the modes on n max ¼ 40 grid points with ρ max ¼ 4.5.

IV. NONLINEAR SYNCHROTRON OSCILLATIONS
Harmonic cavities lengthen the bunches by reducing the restoring force responsible for the synchrotron oscillations and therefore reducing their frequency.We are interested in the ideal settings in which the HCs are tuned for maximum flattening of the total rf voltage (and longitudinal bunch profile).With this setting the single-particle dynamic is well described by a cubic rf voltage, or equivalently a quartic potential in the Hamiltonian, in which case the synchrotron tune is approximately a linear function of the oscillation amplitude r, see Appendix A.
Using expressions (A2) and (A4) for the relationship between the canonical action variable and the amplitude r, and expression (A3) for the equilibrium in ( 6), we obtain the linearized integral equation with numerical coefficient h 1 ¼ 2π 2 /Γð1/4Þ 4 ≃ 0.114 in the argument of the exp function.
Next, we introduce the normalized radial variable ρ ¼ r/σ z and divide both sides by a characteristic synchrotron oscillation frequency, for example the synchrotron frequency h 2 hω s i ¼ 2πh 2 hν s i/T 0 experienced by a particle with orbit amplitude r ¼ σ z , where h 2 ¼ 2 3/4 π 3/2 /Γð1/4Þ 2 and hν s i is the average synchrotron tune over all the particles in the bunch, having made use of the expression (A10) for the amplitude-dependent synchtrotron-oscillation frequency ω s ðρÞ ¼ h 2 hω s iρ, and write where Δ Ω ¼ ðΩ − ω y Þ/ðh 2 hω s iÞ and Unlike (9), Eq. ( 19) is a system of singular integral equations [22], where the coefficient of R m ðρÞ in the first term is a function that vanishes for some ρ.In general, discretization of this type of equations is not guaranteed to yield converging solutions.It is nonetheless instructive to ignore this warning and try to solve the associated eigenvalue problem by discretizing this equation anyway.
We do so by representing the radial-mode functions R m ðρÞ on a uniform grid as we did for the case without HCs.We could adopt an expansion of the radial modes in terms of orthogonal polynomials, as done in the text books for the case of unperturbed linear motion, but that should be avoided.For one thing, orthogonal polynomials with the required e −h 1 ρ 4 weighting function are not readily available in the literature and, more importantly, they are less likely to provide a good basis because of the generally singular nature of the expected eigenfunctions.

A. Stability analysis by the eigenvalue method
Following the conventional method we proceed as in Sec.III and upon discretization of the integral equation face an eigenvalue problem formally identical to (11), The result of the eigenvalue analysis is shown in Fig. 2 for increasingly larger number of grid points n max in the radial coordinate, as indicated.As expected, convergence toward the continuum limit appears to be slow if not outright questionable, particularly at lower current.These pictures, however, do provide valuable insight.It is apparent that the basic mechanism of mode coupling is still at play.The emergence of unstable mode is still triggered by the convergence of one of the m ¼ 0 and one of the m ¼ −1 modes.The difference with the linear case is that coupling can now occur at arbitrarily low currents.For currents less than ∼0.25, regions of instability appear interleaved with regions of stability, with the extent of the latter progressively reduced by the increasing number of grid points n max .

B. Analysis of the regularized integral equation
Following [14,15] the integral equation can be regularized by a simple transformation of the unknown function Not surprisingly, the integral in ( 22) is now cast in a form reminiscent of the dispersion equation familiar from the longitudinal stability analysis of coasting beams or plasma waves.Without delving in mathematical details, which will be reported more at length elsewhere, we should note that in this form Eq. ( 22) properly describes modes with strictly positive imaginary frequency Im Δ Ω > 0. If certain conditions are met, extension to modes with arbitrary imaginary part may be done by analytic continuation (in practice, by appropriate modification of the integration contour) but for our purposes here this is not necessary.We proceed by carrying out a discretization of ( 22) by representing the unknown S m ðρ n Þ ¼ S m;n on a grid ρ n and doing a linear approximation between grid points of the numerator in the integrand.As detailed in Appendix C, the equation is reduced to the form ½1 þ BðΔ ΩÞ ⃗ S ¼ 0, where B is a ð2m max þ 1Þ × n max matrix and ⃗ S is similar to (12).Unlike (14), the resulting secular equation is a transcendental (vs.polynomial) equation in the frequency Δ Ω and in principle more difficult to handle.In practice, however, we found that a Newton method with appropriately set starting point never failed to converge.The outcome of our numerical analysis is shown Fig. 3, reporting real and imaginary part of the frequency of the most unstable mode in a calculation using n max ¼ 40 radial grid points and m max ¼ 1.The main result of this analysis is that transverse single-bunch motion in the presence of the RW impedance is unstable at any current.
Over a large current range the imaginary part of the frequency of the most unstable mode is well fitted by the function (dashed line in the bottom picture of Fig. 3) It is tempting to make the conjecture that Im Δ Ω ¼ ð2 5/3 ÎÞ 6 may be the exact asymptotic limit for Î → 0. It is seen to track the numerical data quite accurately for Î ⪅ 0.2.The deviation observed at very low Î is dependent on the choice of n max and we verified that the error scales consistently with this power law if we increase or decrease n max .
Similar to the case familiar from the longitudinal stability analysis of coasting beams, the spectrum of eigenvalues with positive imaginary part is discrete.The corresponding eigenfunctions are regular functions (in contrast, the eigenfunctions with purely real eigenvalues are generalized functions).An illustration of the unstable mode for 4 and 5.The mode is identified as the eigenvector of the matrix BðΔ ΩÞ in Eq. ( 23) with eigenvalue −1.For this value of Î we found no numerical evidence of additional unstable modes but the existence of multiple roots of the secular equation ( 23), possibly with very small (positive) imaginary part, cannot be ruled out.Specifically, Fig. 4 shows a fully 3D representation, FIG. 2. Stability analysis in the presence of HCs using the conventional eigenvalue-method analysis.The top (bottom) pictures show the real (imaginary) part of the modes complex-number frequencies Δ Ω ¼ ðΩ − ω y Þ/ðh 2 hω s iÞ as functions of the current parameter Î, for increasingly finer (left to right) grids in the radial variable ρ, as indicated.The bottom pictures are in log scale and report only the frequencies with positive imaginary part (unstable modes).Particularly at small Î, convergence to what we believe is the exact asymptotic solution of the infinite-dimension problem Im Δ Ω ¼ ð2 5/3 ÎÞ 6 , (valid for Î ⪅ 0.2, red dashed curve; see Sec.IV), appears to be slow if not outright questionable.
including the azimuthal-angle dependence, while Fig. 5 shows the radial parts of the two dominant azimuthal components.
Observe that the mode density is peaked around a narrow annulus with radius ρ ≃ jRe Δ Ωj, corresponding to the orbit amplitude of particles that undergo synchrotron oscillations with frequency ω s ðρÞ equal to the real part of the mode frequency shift, i.e., jRe ΔΩj ¼ jRe Ω − ω y j ¼ jRe Δ Ωjh 2 hω s i ≃ ρh 2 hω s i ¼ ω s ðρÞ.At smaller current the radius of the annulus moves toward the origin ρ ¼ 0 and the radial profile becomes increasingly more spiky.This is consistent with the real part of the eigenvalue also tending to zero and therefore the eigenfunction becoming more singular, and it correlates to the apparent numerical difficulty seen in Fig. 2 at low Î: as the mode approaches a singular profile it demands an increasingly finer grid resolution.
In electron storage rings radiation damping will eventually prevail if the bunch current is not too high.The condition Im Ω ¼ τ −1 y , where τ y is the vertical radiation damping time, defines the critical current parameter Î ¼ Îc as follows: y , having restricted our analysis to the regime where the Im Δ Ω ∝ Î6 power law applies.We have FIG. 3. Stability analysis in the presence of HCs using the mode-decomposition method proposed in this paper.Real (top) and imaginary (middle and bottom) parts of the root with largest imaginary part of the secular equation ( 23), as functions of the current parameter Î.The middle picture contains the same data as the bottom picture but on a different scale for easier comparison with Fig. 2. In the limit of small Î the numerical solution is consistent with the power law Im Δ Ω ¼ ð2 5/3 ÎÞ 6 , dashed curve in the middle picture.Overall, the numerical solution is reasonably well fitted by Eq. ( 24), dashed curve in the bottom picture.Calculation done with n max ¼ 40, m max ¼ 1, and ρ max ¼ 3.

FIG. 4. Example of unstable eigenmode. The images show the density plot (bottom) and 3D view (top) of mode Re
The density is plotted in the longitudinal phase-space normalized coordinates Z ¼ ρ sin φ z , Δ ¼ ρ cos φ z .The maximum magnitude occurs at amplitude ρ ≃ jRe Δ Ωj.This is where a particle synchrotron-oscillation frequency ω s ðρÞ equals the (real) frequency shift of the collective mode: jRe ΔΩj ¼ jRe Ω − ω y j ¼ jRe Δ Ωjh 2 hω s i ≃ ρh 2 hω s i ¼ ω s ðρÞ.The radial parts of the two azimuthal dominant components of this mode are shown in Fig. 5.
More expressively, we can relate N c , the critical bunch population in the presence of HCs, and N c0 , the critical bunch population in the absence of HC, when all the relevant machine parameters are kept unchanged while the HCs are turned on and off.Combining (10), (25), and (20) gives where Îc0 ≃ 0.197 is the critical current parameter for the onset of the TMC-Instability in the linear case as determined in Sec.III [23].
Making use of the relationship (A11) between synchrotron tunes and bunch lengths with and without HC specialized to third-harmonic cavities, we obtain the final result Note that the quantity elevated to the 1/6 power now depends on ν s0 not hν s i.Using the machine parameters from the ALS-U example (Table I), we find a critical current Îc ≃ 0.168 < 0.2 placing the system in the regime of the validity of the Im Ω ∝ Î6 scaling, see Fig 3 .Finally, from Eq. ( 27), we conclude N c /N c0 ≃ 0.37, corresponding to I b ¼ 3 mA, i.e. the instability threshold with HCs is less than 40% of that without.More in detail, ½T 0 /ðτ y ν s0 Þ 1/6 ≃ 0.52 and ðσ z0 /σ z Þ 1/3 ≃ 4 −1/3 ≃ 0.62.
A macroparticle simulation with ELEGANT [24] confirms the ∼I 6 b scaling, Fig. 6, and overall is reasonably close to the theory.At this time we have not tried to investigate the observed disagreement and it remains to be determined whether it is related the approximations involved in the analytical model, the difference in the modeling of higherorder terms of the rf voltage nonlinearities, which are included in ELEGANT but not in the theory, or other causes.
The estimated I b ≃ 3 mA critical current is still comfortably above the ALS-U design bunch current, considering that the vacuum chambers of most IDs will have an aperture radius larger than b ¼ 3 mm.However, we should add that this analysis ignores the RW contribution from the required NEG coating, which can be significant.

V. CONCLUSIONS
In the absence of HCs it is well known that the TMCI current threshold scales proportionally to the synchrotron tune, see Eq. (10).As HCs reduce the synchrotron oscillation frequency (for ideal HC settings the synchrotron tune is approximately a linear function of the oscillation amplitude r, vanishing in the r → 0 limit) one could be intuitively led to infer a substantial degradation of stability.On the other hand, a longer bunch length and mixing from the synchrotron-tune spread could plausibly be credited for reducing the instability.
In the end, our analysis indicates that the presence of HCs in an environment dominated by the RW impedance has an overall destabilizing effect, with the single-bunch transverse dynamics turning out to be unstable at any current.The instability growth rate, however, decreases very rapidly with current and for sufficiently small current radiation damping will eventually prevail.For machine parameters relevant to 4th-generation light sources one can FIG.6.The TMC-Instability growth rate vs. bunch current from macroparticle simulations (dots) tracks reasonably well the theory (solid line).The simulation does not include radiation damping but for reference the expected radiation damping rate (dashed line) is also reported.ALS-U parameters as in Table I.
expect a reduction of the instability threshold by a factor two or more due to the HCs.
We should caution that this conclusion is strictly dependent on the nature of the impedance.As already noticed in [8], a broad-band resonator model for the transverse impedance, for example, could lessen and possibly erase the HC penalty on the instability, as it gives more weight to the longer-bunch advantage.(A simple inspection of the integral equation shows that for a broad-band resonator impedance the current parameter Î has the more favorable Î ≃ σ −1 z scaling rather than Î ≃ σ −1/2 z as in the RW case.)We plan to investigate this and other impedance models in the future.This suggests that in the MAX-IV studies [5,9] mentioned in the Introduction, where HCs were not seen to modify the instability threshold, the transverse impedance was presumably not RW dominated.
Finally, we note that the method employed here has elements of a more general theory, to which we will return elsewhere, that can be easily extended to include finite chromaticities and in principle radiation and multibunch effects, feedback models, as well as more general tuning of the HCs.

ACKNOWLEDGMENTS
The author is grateful to R. Warnock for his careful reading of the paper and valuable suggestions, and the members of the LBNL ALS accelerator-physics group for useful discussions.Work supported by the US Department of Energy Contract No. DE-AC02-05CH11231.

APPENDIX A: SINGLE-PARTICLE DYNAMICS IN A DOUBLE-FREQUENCY RF SYSTEM: USEFUL FORMULAS
The motion of an ultrarelativistic electron in an rf bucket obeys ż ¼ −αcδ and δ ¼ eV rf ðzÞ/ðE 0 T 0 Þ where in a double frequency rf system V rf ðzÞ¼V 1 sinðk 1 zþϕ 1 Þþ V n sinðk n zþϕ n Þ−U 0 /e, with V 1 and V n being the main and harmonic cavity voltages, k 1 and k n ¼ nk 1 their wave numbers, n the harmonic number, and U 0 the particle radiation loss per turn.
If the harmonic cavity phase and voltage are chosen so that cos ϕ 1Þ is the phase of the main cavity, we find that the first two derivatives of V rf ðzÞ at z ¼ 0 vanish.The voltage is then dominated by the third-order term [25] V rf ðzÞ ≃ z 3 ½ðn 2 − 1Þ/6k 3  1 V 1 cos ϕ 1 .In the approximation where we retain only this cubic term, the single-particle motion is described by a Hamiltonian with quartic potential The approximate equality in (A1) is valid for thirdharmonic cavities (n ¼ 3) and U 0 /ðeV 1 Þ ≪ 1, in which case the setting of the main cavity voltage will be about the same whether or not the HCs are present (recall the expression of the synchrotron frequency ω s0 observed in the absence of HCs).An orbit in the z/δ phase space (roughly, a squeezed ellipse) is uniquely identified by the maximum amplitude z ¼ r occurring at δ ¼ 0 (because of symmetry the minimum z of the orbit occurs at z ¼ −r).We are interested in determining the Hamiltonian, action variable J z , and nonlinear synchrotron oscillation frequency ω s as a function of r.The Hamiltonian reads H ¼ αcqr 4 /4.The action is 854 is a numerical factor and Γ the Euler function.
From the Hamiltonian we derive the equilibrium for the beam longitudinal density in the form g 0 ðrÞ ¼ A expð−H/ðαcσ 2 δ ÞÞ with A determined by normalization.As a function for the amplitude variable r the equilibrium reads with numerical coefficient h 1 ¼ 2π 2 /Γð1/4Þ 4 ≃ 0.114, where is the square of the rms bunch length in the presence of HCs.Notice the linear dependence on σ δ .Combining (A4) and (A1), and making use of the relationship between linear synchrotron tune and natural bunch length σ z0 in the absence of HCs we find Equivalently, the lengthening factor reads We emphasize that the numerical coefficient here is valid for third-harmonic HCs.
HARMONIC CAVITIES AND THE TRANSVERSE … PHYS.REV.ACCEL.BEAMS 21, 024402 (2018) 024402-9 The nonlinear synchrotron oscillation frequency where h 2 ¼ 2 3/4 π 3/2 /Γð1/4Þ 2 ≃ 0.712.Recalling the expression σ z0 ω s0 ¼ cασ δ we can also write Finally, we need the canonical transformation from the action-anglevariables toz ¼ zðJ z ; φ z Þ.The exact expression, involving Jacobi elliptic functions (see e.g.[25,26]) reads z ¼ rcnð2 Kφ z /π; 1/2Þ with Fourier expansion z ¼ P ∞ p¼0 rζ p cos½ð2p þ 1Þφ z and ζ p ¼ ffiffi 2 p π K /cosh½πð2pþ1Þ/2.The z ≃ r cos φ z approximation of the canonical transformation assumed in Sec.IV entails an error j cosðφ z Þ − cnð2 Kφ z /π; 1/2Þj relative to the maximum amplitude that is about 6% at the largest.Because of the oscillating nature of the error, we expect the impact on the determination of the current threshold to be somewhat smaller.We are encouraged that in the analysis of longitudinal instabilities [26] this approximation was found to result into only a 1% error in the determination of the threshold.

APPENDIX B: RW IMPEDANCE MODEL AND KERNEL OF THE INTEGRAL EQUATION
The RW transverse dipole impedance for a pipe with circular cross section of radius b, length L, and conductivity σ c has the asymptotic expression, generally adequate for describing both single and multibunch transverse bunch instabilities in storage rings, With this impedance the kernel of the integral equation (6) reads where, having introduced the scaled radial variable ρ ¼ r/σ z , we have defined the dimensionless kernel Suppose ρ ≠ ρ 0 and ρ < (ρ > ) is the smaller (larger) between ρ and ρ 0 .Then, the integral in (B5) can be expressed in terms of the Euler gamma Γ and the hypergeometric function 2 F 1 .For non-negative integers μ, ν we have [27,28] The case ρ ¼ ρ 0 is obtained by taking the ρ 0 → ρ limit.In passing, we note that the hypergeometric functions appearing here can be expressed in terms of the complete elliptic integrals E and K.

APPENDIX C: NUMERICAL EVALUATION OF THE REGULARIZED INTEGRAL EQUATION
The regularized equation ( 22) can be discretized upon setting ρ n 0 ¼ ðn 0 − 1/2ÞΔρ: L u 40 m ID vacuum chamber radius b 3 mm Avg.beta function along IDs β y 3 m population for the instability threshold, equivalent to 8.1 mA single-bunch current, vs. a design I b ¼ 1.76 mA.

FIG. 5 .
FIG. 5. Real (top) and imaginary (bottom) radial parts of the two dominant azimuthal components, m ¼ −1 (black solid line) and m ¼ 0, (red dashed line) of the unstable mode shown in Fig. 4, highlighting the peaks at ρ ≃ jRe Δ Ωj.The m ¼ 1 component, having much smaller amplitude, is not shown.

TABLE I .
Beam/machine parameters loosely based on ALS-U.
z 13 mm Avg.synchr.tune with HCs hν s i 0.44 × 10 −3 Total ID length It is useful to calculate the average synchrotron oscillation frequency hω s i ¼ R ω s ðJ z Þg 0 ðJ z ÞdφdJ z ¼