Detuning related coupler kick variation of a superconducting nine-cell 1.3 GHz cavity

Superconducting TESLA-type cavities are widely used to accelerate electrons in long bunch trains, such as in high repetition rate free electron lasers. The TESLA cavity is equipped with two higher order mode couplers and a fundamental power coupler (FPC), which break the axial symmetry of the cavity. The passing electrons therefore experience axially asymmetrical coupler kicks, which depend on the transverse beam position at the couplers and the rf phase. The resulting emittance dilution has been studied in detail in the literature. However, the kick induced by the FPC depends explicitly on the ratio of the forward to the backward traveling waves at the coupler, which has received little attention. The intention of this paper is to present the concept of discrete coupler kicks with a novel approach of separating the field disturbances related to the standing wave and a reflection dependent part. Particular attention is directed to the role of the penetration depth of the FPC antenna, which determines the loaded quality factor of the cavity. The developed beam transport model is compared to dedicated experiments at FLASH and European XFEL. Both the observed transverse coupling and detuning related coupler kick variations are in good agreement with the model. Finally, the expected trajectory variations due to coupler kick variations at European XFEL are investigated and results of numerical studies are presented.


I. INTRODUCTION
Single pass free electron lasers (FEL) are the state-ofthe-art particle accelerators to generate high brilliance photon pulses [1]. At the FEL user facilities FLASH (Free-Electron Laser in Hamburg) [2,3] and European XFEL (European X-Ray Free-Electron Laser) [4][5][6], the driving electron bunches are accelerated in superconducting radio-frequency (rf) resonators based on the TESLA (TeV-Energy Superconducting Linear Accelerator) [7] technology. The advantage of superconducting rf cavities is the ability to provide high bunch repetition rates.
The TESLA cavity is a 9-cell standing wave structure of about 1 m length whose fundamental transverse magnetic mode resonates at 1.3 GHz. It is equipped with a higher order mode (HOM) coupler at each end of the cavity [8] in order to extract undesired field excitations. The fundamental power coupler (FPC) is installed horizontally at the downstream end of the cavity and connects the cavity to its power source.
Couplers break the axial symmetry of the cavity [9]. Their impact on the beam is illustrated in Fig. 1, where tracking results are shown for a particle which enters the cavity on axis with an initial beam energy of 120 MeV. Plotted are the longitudinal (top), vertical (mid), and horizontal (bottom) momentum as a function of the longitudinal coordinate z. The significant change of transverse momenta at the coupler regions are referred to as coupler kicks. The sinusoidal variation inside the cavity is related to axially symmetrical rf focusing [10], since the upstream HOM coupler kicks the beam off axis.
Coupler kicks depend on the rf phase and therefore distort different longitudinal slices of the beam by a different amount, which results in an increase of the projected emittance [11]. A large volume of published studies describe the effect of coupler kicks on emittance dilution [12][13][14] and its mitigation for different geometries of the superstructure [15][16][17][18][19]. However, the existing literature on coupler kicks largely ignores the role of different field configurations related to the forward and backward traveling waves in the FPC. This work aims to close that gap.
Tracking in Fig. 1 was done using different cavity field configurations, while the amplitude and phase of the accelerating field was kept constant. The blue color corresponds to a purely backward wave, thus a wave traveling from the cavity into the waveguide. The blue color corresponds to the opposite, where the electromagnetic field is solely defined by the forward traveling wave from the waveguide into the cavity. The red color corresponds to a standing wave, where both traveling waves have the same magnitude. Figure 1 shows that the downstream coupler kick in the horizontal plane depends considerably on the reflection factor of the two traveling waves, whereas the energy gain and the vertical momentum are hardly affected. This is due to the fact that the FPC is mounted horizontally on the cavity and that the fields far away from the coupler are independent of the direction of the traveling waves.
The quality factor of the TESLA cavity is on the order of 10 10 and wall losses can be neglected. In the absence of beam loading, the complex reflection factor is therefore determined by the detuning of the cavity. Due to the high loaded quality factor of > 10 6 , a small deformation of the cavity shape, for example because of dynamic Lorentz forces [20] or microphonics [21], results in considerable detuning of the cavity. Variations of the detuning consequentially produce variations of the coupler kicks.
The present study aims to explore the relationship between cavity detuning and coupler kicks. It provides a novel approach to quantify detuning related coupler kick variations by separating the impact of the standing and the traveling wave. Particular attention is furthermore given to the role of the penetration depth of the coaxial FPC antenna, thus the value of the loaded quality factor of the cavity. This paper is organized in the following way: it begins with an introduction to the TESLA cavity and its couplers in Sec. II. Section III provides the mathematical principles to calculate general electromagnetic field configurations from a given field map. The main idea of discrete coupler kicks is developed in Sec. IV and quantified for different penetration depths of the FPC antenna in Sec. V. In Sec. VI we present the implementation of a linear beam dynamics model relying on discrete coupler kicks and proof of its applicability by comparison with particle tracking. Comparisons with dedicated experiments at FLASH and European XFEL are given in Sec. VII. Finally, the developed coupler kick model is applied in Sec. VIII for beam dynamics simulations of European XFEL.

II. TESLA CAVITY
The TESLA cavity [7] is a 9-cell standing wave structure of about 1 m length whose lowest TM mode resonates at f 0 ¼ 1.3 GHz. The cavity is built from solid niobium and is cooled by superfluid helium at 2 K. The fundamental advantage of superconducting cavities as compared to normal conducting cavities is the low surface resistance of about 10 nΩ at 2 K. This allows for high wall currents with little heat losses. The quality factor Q 0 of a cavity is defined as the ratio of the energy stored in the cavity U to the energy dissipated in the cavity walls P diss per rf cycle, which corresponds to the ratio of the resonance frequency to the width of the resonance curve. The typical quality factors of normal conducting cavities are in the range of 10 4 -10 5 while for TESLA cavities Q 0 > 10 10 . A schematic drawing of a TESLA cavity is shown in Fig. 2. The bunched electron beam excites eigenmodes of a variety of frequencies in the cavity. If the frequency of the mode exceeds the resonance frequency of the fundamental mode, it is called higher order mode (HOM). Due to the high loaded quality factor, the damping time constants of these modes are large compared to the typical bunch spacing. In order to prevent multibunch instabilities and beam breakup [22,23], additional measures to damp HOMs have to be taken. For this reason a HOM-coupler [8] is mounted at each end of the cavity in order to extract FIG. 1. Tracking results for a particle which enters a TESLA cavity on axis with an initial beam energy of 120 MeV. Plotted are the longitudinal (top), vertical (mid) and horizontal (bottom) momentum as a function of the longitudinal coordinate z. The accelerating gradient is 24 MV=m. The significant change of transverse momenta at the coupler positions are related to coupler kicks. The sinusoidal variation inside the cavity is related to axially symmetrical rf focussing. Tracking is calculated for a purely forward traveling wave (black), a standing wave (red), and a backward wave (blue). Only the downstream horizontal coupler kick depends on the mode of cavity operation.
FIG. 2. Longitudinal cross section of a TESLA cavity. The beam direction is from left to right, thus the fundamental power coupler is located at the downstream end of the cavity. undesired HOM field energy. A 1.3 GHz notch filter is incorporated to prevent energy extraction from the fundamental mode. Upstream and downstream HOM coupler are oriented at 115°with respect to each other, as illustrated in Fig. 3. The geometry of the HOM coupler is the same at FLASH and European XFEL.
The fundamental power coupler (FPC) transports the high power rf from a warm, air-filled waveguide system through a coaxial connection into the cold cavity. The amount of power coupled from the waveguide into the cavity and vice versa is characterized by the external quality factor Q ext of the cavity. The loaded quality factor Q L characterizes both the wall losses and the external power losses through the coupler and it follows from Eq. (1) that where for superconducting cavities Q ext ≪ Q 0 . The loaded quality factor is therefore essentially determined by the external losses through the coupler. Different coupler specifications were developed [24] in order to account for different operational conditions. Figure 4 shows a simplified schematic of the TTF-3 power coupler used at FLASH and European XFEL. It is based on the TESLA Linear Collider [25] design and optimized for pulsed rf operation with high accelerating gradients and a duty cycle of about 1%. The rf input power is about 200 kW for a beam current of 5 mA. By moving the inner conductor of the coaxial line in a range of 10 mm, the loaded quality factor Q L can be varied in the nominal range 10 6 -10 7 to allow not only for different beam loading conditions [26], but also to facilitate an in-situ high power processing of the FPCs [7]. The cavity bandwidth at the typical value of Q L ¼ 3 × 10 6 at FLASH is about 430 Hz. European XFEL operates at Q L ¼ 4.6 × 10 6 with a resulting bandwidth of about 280 Hz.
At FLASH and European XFEL, a 1.3 GHz TESLA cavity based injector module accelerates the beam off crest in order to impose an energy chirp along the bunch for the needs of further longitudinal bunch compression.
A following third harmonic system, operating at 3.9 GHz, decelerates the beam and thereby linearizes the longitudinal phase space of the bunches. The 3.9 GHz cavity [27,28] design is similar to a scaled version of the 1.3 GHz TESLA cavity. An alternate coupler orientation for each second cavity is used to compensate the coupler kick partially. At FLASH each second cavity is rotated by 180°around the y-axis [29], as shown in Fig. 5. The European XFEL uses a rotation of 180°around the z-axis [30], which leads to a cancellation of the offset independent part of the coupler kick.
The power coupler antenna penetration depth in the 3.9 GHz cavity is fixed. In order to change Q L , a 3-stub tuner is installed in the waveguides. The cavity geometry in the proximity of the beam does therefore not vary for different Q L .

III. FIELD CALCULATIONS
In order to investigate coupler kicks numerically, precise knowledge of the electromagnetic fields is required. This section provides the mathematical principles which are needed to generalize the field configuration from a given traveling wave field map. The time harmonic field at any point ⃗ r in a perfect electric conducting cavity that is equipped with couplers can be written as: A ½f=b and ϕ ½f=b are the amplitude and phase of the forward and backward traveling wave to/from the power coupler, respectively, ω the angular frequency of excitation and ⃗ E 0 , ⃗ B 0 the forward solution for the electric and magnetic field component of the excited mode. The bold letters indicate complex values.
A standing wave field is stimulated if jA b j ¼ jA f j. Ignoring wall losses this condition is fulfilled in absence of a beam current and can be easily realized for EM field calculation either with port stimulation or by an eigenmode solver [15].
jA b j ≠ jA f j corresponds to a net-energy-flow from/to the cavity. Ignoring wall losses, this is the case if the stored energy in the cavity is changed, for example while filling the cavity, or through beam loading. In order to account for an energy flow, a traveling wave is required which implies a field with linear independent real and imaginary parts.
To get a second and linear independent solution, the field excitation by the beam current has to be considered. There are at least three other approaches (without beam excitation): (1) the power transfer to the beam is replaced by wall losses, (2) the standing wave solution at a different frequency ω 2 is used (with jω 2 − ωj ≪ ω=Q L ) and (3) a decaying eigensolution is calculated. Approach (1) needs a (driven) frequency domain solver with surface losses. Approach (2) needs a frequency domain solver without losses (perfect conducting boundary) or a loss-free eigenmode solver with two different cavity geometries (lengths of the FPC waveguide). Approach (3) needs a complex eigenmode solver with waveguide boundaries.
The 3D field map provided by Ref. [31] utilizes the third approach. It describes the cavity fundamental mode including the effects on the fields from both HOM couplers and the FPC. There are different field maps available in Ref. [32], which are calculated for different penetration depths of the coaxial antenna of the FPC. This reflects different values of the loaded quality factor of the cavity.
The field maps are given as a table of sinelike and cosinelike amplitudes, ⃗ E sin b ð⃗ rÞ and ⃗ E cos b ð⃗ rÞ, respectively, for a decaying eigenmode with a backward traveling wave from the cavity into the waveguide.
In general the normalization of eigensolutions is arbitrary in amplitude and phase. For convenience we suppose a phase-normalization such that the electric field energy is maximal at t ¼ 0. Therefore the ⃗ E cos b part describes the main field that accelerates the particles while the weak ⃗ E sin b field is due to the power flow (averaged over one rf period). The origin of the z-coordinate can be chosen so that the integrated longitudinal field, observed by a particle with z ¼ ct, is maximal. This is approximately the case for an origin in the middle of a cell and in particular for an origin in the middle of a 9-cell cavity.
Under the stated preconditions, the electric field of the backward wave, ⃗ E b ð⃗ r; tÞ, has the following spatiotemporal dependency with ω being the angular frequency of the mode. Using Maxwell equations, the electric field of the forward wave ⃗ E f ð⃗ r; tÞ can be calculated by reversing time as The overall electric field component for the general case with a given accelerating voltage V 0 and phase ϕ with respect to the beam can then be calculated as where V n normalizes the field to the eigenmode solution of the field map. See Sec. A 1 in the Appendix for a more detailed derivation. For the proposed convenient phasenormalization and origin of the z coordinate, V n is a real number. The parameter describes the ratio between the difference and sum of forward and backward waves at a particular reference plane and corresponds to the negative normalized admittance. The reference plane is chosen to be at a field-node for onresonance-SW-operation. This is a position that is approximately a multiple of λ=2 from the tip of the coupler antenna, where λ is the rf wavelength. For this choice of reference plane the sum of forward and backward waves [or the denominator of Eq. (7)] is directly proportional to the amplitude of the accelerating field. Due to the high quality factor of the TESLA cavity wall losses can be neglected. Γ is therefore determined by the amount of beam loading and the detuning of the cavity.
The magnetic field behaves analogously, using similar symmetry properties of the field components, ⃗ B f ð⃗ r; tÞ ¼ − ⃗ B b ð⃗ r; −tÞ, and it follows that

IV. DISCRETE COUPLER KICKS
A charged particle which traverses the cavity with a given electric and magnetic field configuration on a trajectory with speed ⃗ v at any time t experiences a Lorentz force where ⃗ V is the effective voltage experienced by the particle. It is plotted in Fig. 6 for an ultrarelativistic particle which traverses the TESLA cavity on axis with the speed of light (⃗ vðtÞ ¼ c⃗ e z ) as a function of the longitudinal coordinate z. The lower plot indicates the nine-cell geometry of the cavity. The two upper plots point out the influence of the field disturbances caused by the upstream and downstream coupler region, since the particle trajectory is evaluated on axis where the fundamental mode has no transverse components.
The main idea behind discrete coupler kicks (DCK) [12] is to describe the impact of the transverse forces induced by the couplers onto the particle by a discrete kick at the coupler position. The axially symmetrical rf focusing [10] can then be accounted for by using the 2D transfer matrix of the cavity.
The integrated transverse field strength affecting an ultrarelativistic paraxial particle is given by and can be easily separated for the upstream and downstream coupler region for on-axis trajectories by evaluating the integral from/to the center of the cavity to/from infinity. However, if Eq. (10) is evaluated that way for any x ≠ 0, y ≠ 0, the offset-dependent edge focusing of the cavity fundamental mode is not compensated and the calculated voltage is not purely induced by the couplers. In order to isolate the integrated transverse fields induced by the couplers for any x ≠ 0, y ≠ 0, the axially symmetrical rf focussing part of the field, V RZ , has to be removed. This can be done by using the 3D field map of the TESLA cavity and extracting the monopole part, for example by averaging the field map over different azimuthal rotations around the cavity axis. The real part of V c corresponds to a net deflection of the bunch centroid, whereas the imaginary part represents a kick which depends on the phase-offset Δϕ ¼ ωΔt due to a time offset Δt of the individual particle with respect to the reference particle. This time-dependent kick induced by the couplers distorts different longitudinal slices of the beam by a different amount, which results in an increase of the projected emittance [11].
The transverse rf kick is the integrated transverse momentum change relative to the longitudinal momentum of the beam. This kick ⃗ k ¼ ½x 0 ; y 0 , induced by a coupler, can therefore be calculated as with E 0 being the beam energy at the corresponding coupler region, V 0 and ϕ the amplitude and phase of the accelerating field, respectively, e the elementary charge and x and y the transverse beam position at the coupler location. V is the normalized complex kick factor, defined as with and holds the information of the axially asymmetrical field disturbances induced by the couplers. By taking the field map Eqs. (6), (8) into account, the normalized complex kick factor for the general case of an arbitrary Γ can be written as whereṼ b andṼ f represent the field disturbances caused by backward and forward traveling wave, respectively.Ṽ b and V f can be calculated directly from a field map, using Eqs. (6), (8) by setting V 0 =V n ¼ 1, ϕ ¼ 0 and Γ ¼ AE1.
From Eq. (15) directly follows, thatṼ can be separated in a standing wave part and a reflection dependent part as FIG. 6. Horizontal (top), vertical (mid), and longitudinal (bottom) voltage as experienced by an ultrarelativistic charged particle which traverses the cavity on axis.
hold the field disturbances caused by the sum and the difference of the forward and backward traveling waves, respectively. Only the fields related to the reflection dependent part depend on the parameter Γ.
The real and imaginary parts of the normalized complex kick factorṼðx; yÞ as defined in Eq. (16) are plotted in Fig. 7 for both the upstream and the downstream coupler region for different transverse beam positions x and y. Different Γ, thus modes of cavity operation, are evaluated using a field map with an antenna penetration depth of 8 mm.
For the TESLA cavity, the kicks caused by the HOM couplers have the same order of magnitude as that from the power coupler. The kick induced by the upstream HOM coupler does not depend on Γ, as indicated in Fig. 1. This is due to the fact that the electromagnetic field away from the fundamental power coupler is, to a very good approximation, described by a standing wave and is not affected by the ratio of the forward and backward traveling wave. The Γ-independent part of the downstream kick relates to the downstream HOM coupler. The Γ-dependent part relates to the fundamental power coupler, which primarily acts horizontally. Coupler kicks of the FPC for a fixed acceleration gradient have a component that varies with the forward and backward traveling wave, which, for example, would vary as the cavity detuning changes.

V. NORMALIZED COUPLER KICK COEFFICIENTS
In this section we quantify coupler kicks for different FPC configurations by analyzing the normalized coupler kick coefficients.
It is reasonable to linearize the normalized complex kick factorṼðx; yÞ around the cavity axis. The zeroth and first order kick ⃗ k on a bunch induced by a coupler as defined in Eq. (12) can therefore be expressed as where x and y are the bunch horizontal and vertical offset at the coupler position. From Maxwell equations it follows that V yy ¼ −V xx and V xy ¼ V yx . Thus, coupler kicks are up to first order well described with four normalized coupler kick coefficients ½V 0x ; V 0y ; V xx ; V xy . It is worth noting that the first order kick acts as a skew quadrupole, and hence can be compensated for constant gradient and Γ by adding such a magnet upstream of the cavity, just as the zeroth order dipole kick can be compensated by using a dipole magnet.
As described earlier, the field maps available in Ref. [32] for the TESLA style cavity are calculated for different penetration depths d ¼ ½−12; …; 12 mm of the coaxial antenna of the fundamental power coupler. The corresponding values for the loaded quality factor are Q L ¼ ½1.81 × 10 8 ; …; 1.36 × 10 6 . The normalized coupler kick coefficients ½V 0x ; V 0y ; V xx ; V xy are calculated forṼ SW and V Γ for the upstream and downstream coupler region with different field maps, thus different values for the loaded quality factor Q L . The coefficients and values for d and Q L are listed in Tables I, II, and III in the Appendix.
The fields at the upstream coupler are, to a very good approximation, independent of the position of the coupler antenna. However, the impact of the downstream couplers on the transverse beam dynamics is significantly affected by the coupler antenna position.
The Q L -dependence is shown in Fig. 8 for the standing wave and the reflection dependent part in the left and right plots, respectively. The coupler kick is about five orders of magnitude smaller than the longitudinal field. The vertical coefficients V 0y and V xy for both waves are insensitive to the antenna position, as it is expected from the geometry. Furthermore they are zero for the traveling wave. However, the horizontal coefficients related to the standing wave depend on the antenna position. For a given Γ the overall downstream coupler kick increases with higher Q L . FIG. 7. Real (upper plots) and imaginary part (lower plots) of the normalized complex kick factor for the upstream (left) and downstream coupler region (right) as a function of the transverse coordinates x and y. All vectors are scaled by the same amount in order to assure a quantitative comparison. The three colors in the right plots correspond to the cases of pure forward traveling wave (yellow) in the cavity, e.g., no backward wave and Γ ¼ −1, standing-wave operation (red, Γ ¼ 0), and pure backward traveling wave (blue, Γ ¼ 1). Note that the kick induced by HOM couplers does not change for different Γ. The net effect of the FPC is primarily horizontal.
The magnitude of the reflection dependent coefficients decreases with higher Q L . This is due to the fact that the transition region in which the traveling wave from the coax changes to a standing wave in the cavity is smaller for larger Q L [18]. Thus, for very high Q L values the waves excited on the cavity axis will be standing waves, even in the coupler region.
Real and imaginary parts of most coefficients differ significantly from each other. A variation of the cavity phase will result in coupler kick variations. The imaginary parts of the reflection dependent coefficients exceed the real parts. Therefore, detuning related coupler kick variations are stronger in cavities which are operated off crest, as follows from Eq. (17).
The standard Q L setting at FLASH is 3 × 10 6 whereas it is 4.6 × 10 6 at European XFEL. Both Q L settings are not exactly represented by the field maps. Within the investigated range the Q L -dependence of the coupler kicks is considerable. An appropriate beam dynamics model relying on discrete coupler kicks should therefore use precise coupler kick coefficients. The Q L -dependence of the normalized coupler kick coefficients V ij is well described as with c i being fit parameters for each coefficient. The dashed lines in Fig. 8 indicate the solutions of Eq. (18) with the fit parameters listed in Tables IV and V in the Appendix. This coupler kick model allows for a rough estimation of detuning related coupler kick variations. From the rf Eqs. (A7) it follows that for a given accelerating gradient and beam current, the variation ΔΓ and the detuning Δf are related according to The horizontal zeroth order coupler kick variation which is related to the reflection dependent part is then given by Thus, for typical values of Q L ¼ 3 × 10 6 and ϕ ¼ 0°at FLASH it follows that which results, for example, in a coupler kick variation of about 3.6 μrad for a cavity with V 0 ¼ 20 MeV, initial beam energy of E 0 ¼ 100 MeV and a detuning of Δf ¼ 100 Hz. The normalized coupler kick coefficients for the 3.9 GHz cavity are calculated analogously from the field map available at Ref. [33]. The values for orientation 1 (cf. Fig. 5) are listed in Table I in the Appendix.

VI. IMPLEMENTATION OF COUPLER KICKS IN LINEAR BEAM DYNAMICS MODEL
In this section the implementation of discrete coupler kicks into a linear beam dynamics model is presented, its accuracy for different beam energy is investigated and tracking with ASTRA [34] is used as reference.
Considering linear beam dynamics, the change of transverse coordinates can be written in terms of a matrix formalism as ⃗ u 1 ¼ R · ⃗ u 0 , with ⃗ u 1 and ⃗ u 0 representing the particle transverse input and output coordinates ⃗ u i ¼ ½x; x 0 ; y; y 0 i , respectively, and R being the transfer matrix. The transfer matrix of an axially symmetrical rf cavity is given by Ref. [35] and can be found in Eq. (A5) in Sec. A 2 in the Appendix.
The full linear beam transport equation of one cavity equipped with couplers can then be written as where D 0 is the drift matrix from the reference positions to the coupler positions, D 1 the drift matrix between the couplers and the cavity and R rf the axially symmetrical cavity transfer matrix. ⃗ k up ð⃗ uÞ and ⃗ k down ð⃗ uÞ are the normalized upstream and downstream coupler kick, respectively,  Tables II and III. at the transverse coordinate ⃗ u ¼ ½x; x 0 ; y; y 0 , such that ⃗ kð⃗ uÞ ¼ ½x; x 0 þ k x ðx; yÞ; y; y 0 þ k y ðx; yÞ. For the drift D 1 we use d 1 ¼ 3.54 cm, while the cavity length is assumed to be l cav ¼ 9=2λ rf ¼ 1.0377 m. Figure 9 shows as an example the beam transport through one TESLA cavity as obtained by ASTRA using the 3D field map and by the above described model in blue and red, respectively. Plotted are the horizontal (left) and vertical (right) positions (upper plots) and momenta (lower plots), as a function of the longitudinal coordinate z. The cavity is centered at z ¼ 0 m and the particle energy is increased from 10 MeV to 24 MeV.
The colored bars in the lower plots of Fig. 9 illustrate the regions at which the different transfer matrices in Eq. (22) are applied. The red bar corresponds to the beam transport region represented by the axially symmetrical rf cavity matrix R rf , the yellow bar corresponds to the drift space D 1 between the cavity and the couplers and the black line corresponds to the drift D 0 between the couplers and the reference positions.
In this example, both the coupler kicks and the rf focusing are sufficiently well described by the linear beam dynamics model. However, a strong dependence of the model accuracy on the beam energy is expected, since the derivation of Eqs. (A5), (17) uses the paraxial approximation, and thus an ultrarelativistic assumption.
The accuracy of the linear beam dynamics model of Eq. (22) for different initial beam energies is calculated as follows. At each energy E i , nine different rf phases between ϕ lim ¼ AE20°and 7 different rf amplitudes between V lim ¼ ½5 MV=m; 25 MV=m are evaluated. At each step ½E; ϕ; V i , 10 4 particles with a Gaussian distribution of initial values ½x; p x ; y; p y 0 with σ x;y ¼ 2 mm and σ p x ;p y ¼ 5 keV=c, respectively, are created. For each particle, the output of ASTRA is compared to the corresponding output of Eq. (22).
Results are shown in Fig. 10. Plotted are the rms differences ½Δx; Δx 0 ; Δy; Δy 0 rms , evaluated for all particles and rf amplitudes and phases, respectively, as a function of the initial beam energy E.
For beam energies of a few MeV the rms difference for one cavity may reach, for example, several hundred microns. The model is therefore rather unsuitable for accurate beam dynamics calculations regarding the first cavity in a TESLA based injector module as found at FLASH and European XFEL.
Above 100 MeV, however, the rms difference for one cavity is well below 0.1 μm and 0.1 μrad, and the beam transport is sufficiently described by Eq. (22). For one module including eight cavities, the rms difference is about 1 mm an for initial beam energy of 5 MeV, where it is about 1 μm for 100 MeV.

VII. EXPERIMENTAL VALIDATION OF DISCRETE COUPLER KICK MODEL
In this section the developed beam dynamics model is compared to dedicated experiments at FLASH and European XFEL.

A. Trajectory response measurements at European XFEL
Trajectory response measurements are a powerful diagnostic tool for linear accelerators [36]. In a linac, the ði; jÞth element of the trajectory response matrix is defined as the linearized response of a given coordinate (q i ) at the ith monitor (BPM) to a kick Θ j from the jth steering magnet [37]  Plotted are the rms differences ½Δx; Δx 0 ; Δy; Δy 0 rms as evaluated for 10 4 particles at different rf amplitudes and phases.
with R i←j being the beam transport matrix from point s j to s i . In the absence of coupling between the two transverse planes, only the elements with indices l, m ¼ 1, 2 for the horizontal and l, m ¼ 3, 4 for the vertical plane, respectively, are nonzero.
For a given set of rf parameters, the zeroth order coupler kick, that is, k 0 x ∝ ℜfV 0x g, produces a constant kick to the bunch centroid. A trajectory response measurement is consequentially not affected. The first order kick k 1 x ∝ ℜfV xx · x þ V xy · yg, however, depends on the transverse beam position in both planes. At sufficiently low beam energy, it is therefore expected that a trajectory response measurement disagrees considerably with an axially symmetrical beam dynamics model of a cavity and shows coupling between the two transverse planes.
This coupling was observed at the first main accelerating section of the European XFEL, of which a schematic drawing is shown in Fig. 11. After the first bunch compressor (BC0), a linear accelerator (L1) increases the beam energy in four cryomodules, thus 32 cavities, from 150 to 600 MeV. The optics server at European XFEL [38] currently uses ELEGANT [39] for the beam dynamics calculation of R i←j .
A trajectory response matrix was measured [40] and compared to the calculated response from the optics server. Additionally, the response was calculated with an optics model which includes discrete coupler kicks and calculates the beam transport through each cavity according to Eq. (22). The coupler kick coefficients have been interpolated according to Eq. (18) for Q L ¼ 4 × 10 6 .
Results are shown in Fig. 12. The upper plots are the measured beam trajectories in both transverse planes as excited by an horizontal steering magnet at s ¼ 86 m. The lower plots show both the measured trajectory response and the corresponding predictions. The red dots indicate the measurements, whereas the black and blue lines are the calculated response by the default optic server and with the linear model including discrete coupler kicks. The position of the first and last cavity within the string of modules of about 50 m length is indicated by the vertical dotted line in the lower plots.
Significant coupling from x → y occurs in the accelerating modules, which disagrees with the default optics model. A similar optics perturbation including transverse coupling has been also observed at the accelerating sections at FLASH [36,37,41].
The developed model including discrete coupler kicks is able to describe the observed coupling in both planes reasonably well. It can be concluded that the first order coupler kick is described sufficiently by the presented coupler kick model.

B. Coupler kick variations at FLASH
In this section coupler kick variations related to variations of the forward and backward traveling waves are studied experimentally at FLASH.
The Free-Electron Laser in Hamburg (FLASH) is a highgain FEL user facility operating in the soft x-ray regime [2,3]. The current layout of FLASH is shown in Fig. 13. The rf setup at FLASH and its effect on the transverse beam dynamics was studied in detail in Ref. [42]. Several cavities are supplied by one high power klystron in pulsed operation with a vector sum rf control. Within the rf flat top, long bunch trains can be accelerated.
An experimental setup in which coupler kick variations within one bunch train can be isolated from the rf focusing at low beam energy was presented in Ref. [44] at the injector module at FLASH. In this section we present a The cavity field has a limited response to forward power modulations at frequencies much larger than the bandwidth. If the forward rf voltage is modulated at a frequency of Ω, the magnitude of the accelerating field varies as ΔV ∝ 1=ð1 þ iðΩ þ ΔfÞτÞ with τ being the decay time of the cavity. For very high modulation frequencies, the response of the accelerating field becomes negligible.
Regarding ultrarelativistic beams, transverse motion due to cavity off-axis fields is insignificant, since transverse magnetic and electric forces compensate each other in axially symmetrical fields. Thus, coupler kick variations are expected to be the dominant source of transverse beam dynamics in this scenario.
Measurements of rf modulated cavity fields and coupler kicks were made using the sixth accelerating module (ACC6) at FLASH. The machine was set up with 400 bunches with a bunch repetition rate of 1 MHz. The rf signals of the forward and backward traveling waves for each cavity were measured. The rf data recorded in the data acquisition system [45] was manually recalibrated according to Ref. [46] in order to remove cross-coupling effects between the forward and backward signals. The beam trajectory was steered to be on axis through the modules and the beam position upstream and downstream ACC6 was measured.
The vector sum of ACC6 was V VS ¼ 62 MV, the bunch charge 0.4 nC and initial beam energy was 600 MeV. The loaded quality factors of the eight cavities were measured as ½3.20; 3.11; 3.17; 3.12; 2.97; 3.02;3.09;3.05 × 10 6 . Each measurement of BPM and rf data was an average over about 100 consecutive bunch trains with 10 Hz repetition rate to deal with short term jitter.
A reference trajectory was measured. Subsequently, the forward power within one bunch train was modulated with different frequencies.
The relative difference of the vector sum of the accelerating gradient δV VS and the parameter ΔΓ computed from the measured forward and backward rf signals with respect to the reference setup are plotted in Fig. 14. The modulation frequencies were 20, 50, 100, and 300 kHz. For high modulation frequencies the variation of the accelerating field becomes small compared to the variation of Γ as expected.
In a second step the impact of coupler kick variations on the beam was studied. The measured beam position at the  FIG. 15. Experimental observation of intrabunch train coupler kick variations at ACC6 at FLASH. Plotted are the differences between the reference trajectories and the particle trajectories while applying modulations with different frequencies on the forward power (from top to bottom: 20, 50, 100, and 300 kHz, cf. Fig. 14). The bunch spacing is 1 μs. The BPM readout differences (black) and the corresponding model evaluations (colored) are plotted for the horizontal (left) and vertical (right) plane at the exit of the module. entrance of ACC6, initial beam energy and the rf signals were used to calculate the beam transport through the module. The beam transport for each bunch was evaluated using Eqs. (16), (17), (18), (22) iteratively for each cavity. The measured beam offset at the BPM downstream of the last cavity was compared to the corresponding output of the model function.
Results are shown in Fig. 15. Plotted are the differences of the horizontal and vertical BPM readouts between the modulated setup and the reference setup and the difference of the equivalent output of the model function. The negligible signal in the vertical plane even for low modulation frequencies points out that the beam dynamics of high energy beams with trajectories close to the cavity axis are dominated by the variation in the coupler kicks.
It can be concluded that the presented coupler kick model is both qualitatively and quantitatively able to reproduce the experimentally generated coupler kick variations.

VIII. EXPECTED COUPLER KICK VARIATIONS AT EUROPEAN XFEL
In this section we investigate the influence of detuning related coupler kick variations on intrabunch-train trajectory variations at the European XFEL [4][5][6].
The European XFEL main accelerator consists of 800 TESLA cavities, operated in pulsed mode with an rf flat top of 700 μs. The long rf pulse structure allows long bunchtrains for the experiments.
The designated pointing stability of the photon beam leads to a stability requirement of 3 μm maximum trajectory spread within one bunch-train in the undulator section. A conservative estimate predicts worst case beam trajectory perturbations, e.g., from magnet vibrations or spurious dispersion, of about AE100 μm assuming a beta function of 30 m [47]. This magnitude of amplitude can be corrected for individual bunches at the entrance to the undulator section by the transverse intrabunch-train feedback system (IBFB) [48]. However, rf-induced trajectory variations have not been considered in the design studies of the IBFB.
The principles of rf induced intrabunch-train trajectory variations have been described in detail in Ref. [42]. At European XFEL, typically 32 cavities with individual operational limits [49] are supplied by one rf power source. The low-level-rf system (LLRF) [20,50] is able to restrict the variation of the vector sum of the amplitude and phase of the 32 cavity fields to below 0.01% and 0.01°, respectively [51]. However, due to the effects of beam loading and Lorentz force detuning, individual cavities have an intrinsic variation of rf parameters within one bunch train. Misaligned cavities in combination with variable rf parameters induce intrabunch-train trajectory variations.
The variation of the amplitude of the accelerating field in each cavity along the bunch train, ΔV, is key in the generation of trajectory variations. For typical machine operation at European XFEL, the amplitude variation is mainly caused by the fact that a common Q L is used for all cavities yet the gradients are not the same, so the "flattop" voltage along the bunch train is not always flat [52].
LLRF simulations show that the beam loading induced amplitude variation is proportional to the beam current and can reach up to 4 MV=m for the design beam current of 4.5 mA and the actual spread in operational gradients [49] without further Q L -correction.
Beam trajectory variations due to coupler kick variations also have to be considered. High electromagnetic fields in resonators lead to strong Lorentz forces on the walls of these structures. In order to ensure adequate cooling, the thickness and therefore rigidness of the walls cannot be chosen freely. As a consequence, in a pulsed operation mode, the cavities are deformed dynamically in the range of some μm [20]. This results in a dynamic behavior of the resonance frequency, a Lorentz force detuning (LFD), which scales quadratically with the accelerating field. Due to the high Q L , the LFD within one bunch train is comparable to the bandwidth of the cavity of about 300 Hz [53]. In order to compensate LFD at European XFEL, fine tuning for each cavity will be achieved using double piezoelectric actuators [54]. The residual intrabunch-train detuning of individual cavities is dominated by microphonics and expected to be below 30 Hz.
The European XFEL main linac (L1-L3) increases the electron beam energy from 150 MeV to 17.5 GeV in 100 accelerating modules, thus an energy range in which the ultra-relativistic assumption is reasonable. In order to simulate the effect of trajectory jitter caused by detuning-related coupler kick variations, we use the developed beam dynamics model according to Eq. (22). The coupler kick coefficients for Q L ¼ 4.6 × 10 6 are listed in Tables I,  II, and III. With the rf parameters obtained by Eqs. (A6), the transfer matrices and coupler kick coefficients are calculated for each bunch and each cavity individually. Misalignments are modeled by coordinate transformations. A quadrupole magnet (k ¼ 0.0642/m) is located at the downstream end of each module, providing a FODO lattice in the accelerating sections. This is a model from the entrance of L1 to the end of L3 (see Fig. 11) with simplified optics.
As a figure of merit we use the final normalized trajectory with α u;z and β u;z being the Courant-Snyder parameters at position z and β u;f the beta function at the observation point, while u stands for the x and y axis. Basically, Δũ is the rms beam position jitter at a point with a beta function of β u;f and zero divergence. For the following analysis we will use β x;f ¼ β y;f ¼ 30 m, which reflects the design lattice at the IBFB downstream the accelerating sections. For each machine seed the following model parameters were randomly created: variation of the amplitude ΔV and phase Δϕ of the accelerating field (with beam loading) and the detuning Δf of individual cavities within the bunch train, and the offset Δu cav=mod and tilt Δu 0 cav=mod of cavities and modules, respectively. For the range of misalignments we use Δu cav=mod ¼ AE0.5 mm, Δu 0 cav ¼ AE0.3 mrad and The range of the intrabunch-train variation of the rf parameters of individual cavities was increased subsequently. Maximum amplitude and phase variation are considered to be correlated as Δϕ max ¼ 2m=MV · ΔV max . For example, a maximum amplitude variation of ΔV max ¼ 4 MV=m corresponds to a maximum variation of phase Δϕ max ¼ 8°. This ratio is found to be typical for regular machine operation. At each parameter step ½ΔV max ; Δf max i , 10 4 random machine seeds using a flat distribution were created and the previously described beam transport model was evaluated.
Results are shown in Fig. 16. The left side shows the rms value of the normalized trajectory variation Δũ rms at the end of the accelerator as a function of the maximum amplitude variation ΔV max , evaluated for both planes and three detuning scenarios. The blue and red color correspond to horizontal and vertical plane, respectively, while the different plot marks reflect different detuning limits. The right plot shows Δũ rms for zero voltage variation as a function of the maximum detuning Δf max .
For small amplitude variations the intrabunch train trajectory variation is dominated by detuning related coupler kick variations and trajectory variations occur mainly in the horizontal plane. For high amplitude variations the trajectory variation is proportional to the amplitude variation, and the influence of detuning related coupler kick variations decreases.
Considering the capability of the IBFB of about AE100 μm it can be concluded that coupler kick variations are expected to be a minor concern in multibunch FEL operation at European XFEL. However, for high beam currents, a limitation of beam loading induced amplitude slopes by changing the Q L -setup is advised.

IX. SUMMARY
Couplers break the axial symmetry of the TESLA cavities and affect the transverse beam dynamics considerably. The concept of first order discrete coupler kicks was presented, including a novel approach to separate the influence of the standing wave from the reflection dependent part. The developed beam dynamics model was compared to standard tracking codes and dedicated experiments. Horizontal-vertical trajectory coupling and detuning related coupler kick variations matched measurements fairly well. Numerical studies regarding European XFEL showed that detuning related coupler kick variations are expected to be a minor concern in regular operation.

ACKNOWLEDGMENTS
We would like to thank Igor Zagorodnov, Klaus Flötmann and Ángel Ferran Pousa for proofreading and valuable comments. We wish to extend our particular thanks and appreciation to Wolfgang Ackermann, who with great skill and patience calculated the required field maps.

Field calculations
The time harmonic electric field ⃗ Eð⃗ r; tÞ in a perfect electric conducting cavity that is equipped with couplers can be written as with The normalization to V n is chosen to get A corresponding expression (8) can be derived for the magnetic field. The phase of the eigenmode ⃗ E b can be chosen so that the electric field energy is maximal for t ¼ 0.
Then the contribution of ⃗ E sin b to the V n integral is very small, and the integral is practically independent on Γ. The origin of the z coordinate can be chosen so that V n is real.

Cavity transfer matrix
The beam transport in an axial symmetric rf cavity can be written as ⃗ u ¼ M RZ · ⃗ u 0 with ⃗ u ¼ ½u; u 0 . The matrix elements R ij of the transfer matrix of an axial symmetric cavity are given by Ref. [35] as where α ¼ 1 ffiffi 8 p cos ϕ · lnð γ γ 0 Þ and γ 0 and γ ¼ γ 0 þ γ 0 are the initial and final Lorentz factors, respectively, and γ 0 is the change of γ within one cavity. Note that this formula is only accurate for γ ≫ 1.

LLRF equations
In order to relate the cavity detuning to the ratio of the forward and backward traveling waves, we assume a superconducting cavity operating close to the steady state condition, nearly on crest, with beam loading and a detuning small compared to the resonance frequency. The cavity voltage V 0 , the forward-and backward wave V f and V b , and the beam current I b are then related as [20] where the bold letters indicate complex numbers, for I B is the complex beam current, which is −2I B0 e iϕ B where I B0 is the beam current amplitude and ϕ B describes the phase shift of the bunch with respect to a reference phase. The shunt impedance R L of a cavity without internal losses is determined by the product Q ext ðR=QÞ with Q ext being the external quality factor and (R=Q) being the ratio V 2 0 =ð2Wω 0 Þ of the cavity voltage to the stored field energy W and frequency ω 0 . The parameter (R=Q) depends only on the shape of a cavity. The detuning angle ψ is defined as tan ψ ¼ 2Q L Δf=f 0 , with Δf being the detuning and f 0 the resonance frequency of the cavity. Using Eqs. (A6) and assuming a constant beam current, the forward and backward wave can be expressed as a function of the phase difference ϕ 0 between the bunch and the cavity voltage with an amplitude of V 0 and the detuning Δf ¼ f 0 − f. The parameter Γ follows as   (16)], as calculated with different field maps of the 1.3 GHz cavity for different values of the loaded quality factor Q L . The values for Q L ¼ 3 × 10 6 and Q L ¼ 4.6 × 10 6 reflect the standard Q L -setting for FLASH and European XFEL, respectively, and are evaluated using Eq. (18) and the fit parameters listed in Table IV (16)], as calculated with different field maps of the 1.3 GHz cavity for different values of the loaded quality factor Q L . The values for Q L ¼ 3 × 10 6 and Q L ¼ 4 × 10 6 reflect the standard Q L -setting for FLASH and European XFEL, respectively, and are evaluated using Eq. (18) and the fit parameters listed in Table V