Eigenmode compendium of the third harmonic module of the European X-ray Free Electron Laser

Thomas Flisgen, Johann Heller, Tomasz Galek, Liangliang Shi, Nirav Joshi, Nicoleta Baboi, Roger M. Jones, and Ursula van Rienen Universität Rostock, Institut für Allgemeine Elektrotechnik, Albert-Einstein-Straße 2, D-18059 Rostock, Germany The Cockcroft Institute, Daresbury, Warrington, Cheshire WA4 4AD, United Kingdom School of Physics and Astronomy, University of Manchester, Oxford Road, Manchester M13 9PL, United Kingdom Deutsches Elektronen-Synchrotron (DESY), Notkestraße 85, D-22607 Hamburg, Germany (Received 14 November 2016; published 18 April 2017)


I. INTRODUCTION
A. Motivation and aims of the paper Key elements of modern particle accelerators, such as the European X-ray Free Electron Laser (XFEL) [1], are superconducting radio-frequency (SRF) cavities made of niobium.The cavities are arranged in chains and are accommodated in cryomodules.These modules provide cryogenic infrastructure to cool down the cavities to approximately 2 K.At this temperature level, the niobium is superconducting.Profound knowledge of electromagnetic effects inside the cavities is of significant relevance to design and to operate the entire accelerator.Unfortunately, measurements of electric or magnetic field distributions inside the cavities are challenging.Such measurements are typically performed in ex situ experiments using bead-pulling techniques [2,3].In contrast, in situ investigations are typically restricted to measurements of the rf transmissions from one external port of a cryomodule to other external ports using dedicated vector network analyzers.
Another way to gain insight into the electromagnetic properties of cavities is numerical modeling and simulation.In particular, these techniques allow for the determination of 3D field distributions inside the cavities.Literature provides a vast amount of articles related to numerical studies for cavities (see [4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22] and many more).The different contributions address different emphases and approaches such as the numerical computation of wakefield effects or of scattering parameters.Other types of articles are related to the eigenmodes of the rf structures.Eigenmodes can be considered as electromagnetic resonances of the closed, lossless, charge-free, and nonexcited structure.The eigenmodes are characterized by their resonant frequency and their resonant field pattern.Modal compendia such as [12][13][14][15][16][17][18] list the set of eigenmodes of the structure under study in a defined frequency range.In addition to resonant frequencies and resonant field patterns, quantities which describe the coupling of the eigenmodes either to the waveguide ports or to bunches of charged particles are often provided.Knowledge of the eigenmode spectrum of a structure allows for characterizing its dynamical properties.Following for instance [23] and references therein, eigenmodes enable the quantification of the interaction between cavities and charged particles that traverse them.
All aforementioned numerical studies have in common that a multitude of effects is not regarded in the underlying computational models, since these models result from balancing model accuracy against numerical demands.For instance, geometrical variations from the ideal cavity shape, which result from fabrication tolerances or cooling effects, or additional reflections from cavity couplers are often not regarded.Here, not only the additional computational burden but also the lack of knowledge prevents to model these effects.Another severe simplification of the numerical models is the restriction to single cavities with couplers as it is performed in most studies such as in the modal compendia [12][13][14][15][16][17][18].This is a valid approximation for modes whose resonant frequency is smaller than the fundamental cutoff frequency of the circular waveguidelike beam pipe, because these are confined in the cavity.However, this approximation becomes invalid for modes above cutoff as their electromagnetic field can couple to both ends of the structure, i.e. through the beam pipes.The restriction to a single cavity neglects the fact that its resonances can couple to resonances of other cavities in the chain, so that field patterns become much more complex and bands are more densely populated with modes.In addition, resonant modes with field energy localized between adjacent cavities are not modeled at all.
Another effect which arises from restricting to single entities is the inaccurate estimation of the decay times of resonances.The ends of the beam pipes are usually equipped with waveguide boundary conditions for the computation of mode decay times.These waveguide boundary conditions ensure that the energy of waves which are scattered into the waveguide boundaries is not reflected back into the structure.However, in chains additional reflections arise from the adjacent cavities above the cutoff frequencies so that decay times tend to be larger for these cases.Larger decay times can be dangerous for the operation of the entire accelerator, because it is not guaranteed that the energy is extracted fast enough (e.g. by dedicated couplers) from the cavities to avoid harmful interactions with subsequent bunches.
Increasing the computational domain and accounting for entire chains significantly raises the computational demands as the number of degrees of freedom resulting from reasonable discretization techniques is increased.In addition, drastically more resonant modes exist in chains in a finite frequency range.According to the estimation presented in chapter 6 of [24], doubling the length of a cavity chain leads to doubling the number of degree of freedoms and, in the best case, to computing times for eigenmode computations being 4 times longer.Typically, high performance computers in combination with special software are required for eigenmode computations for chains of superconducting cavities as demonstrated for instance in [25,26].The usage of such computers comes along with a set of drawbacks such as costs for hardware and for maintenance, limited amount of free computational time, difficulties in generating an appropriate mesh, and high energy consumption.
The recently proposed state-space concatenation (SSC) [24,[27][28][29][30] algorithm allows for computing eigenmodes of long chains by combining a model-order reduction approach with a domain decomposition technique.The SSC approach is a further development of the coupled S-parameter calculation (CSC) [31][32][33] scheme, which has been employed in [34] to compute the scattering parameters of a four-cavity string with couplers.In contrast to CSC or other concatenation approaches based on sampled scattering matrices such as the GSM technique [35], SSC directly delivers the electromagnetic field information inside the complex rf structure.
This article describes the generation of a compendium of resonant modes in the string of eight third harmonic cavities, which is accommodated in the injector of the European XFEL [1] in the north of Germany.Basically, there are four main motivations for the generation of the modal compendium.
1.The generated modal compendium serves as a reference for experiments at the third harmonic module of the European XFEL [1].Past and ongoing measurements aim at using higher order mode (HOM) coupler signals for diagnostic purposes such as it is conducted in [36] for the third harmonic module of the FLASH machine [37] at DESY.One goal of this compendium is to allow for a more profound interpretation of the spectra measured at the European XFEL.
2. The modal compendium allows for qualitatively understanding effects which arise when full chains of cavities at other accelerators are considered, e.g. the existence of multicavity modes (modes whose field energy is present along the entire string) or of intercavity modes (modes whose field energy is trapped between adjacent cavities).
3. Comparison between simulation and measurements to get a sense for the discrepancy between both, in particular for structures of the given complexity with a vast number of uncertainties.
4. The computation of eigenmodes for a string with eight cavities is in fact a proof of principle for the SSC scheme.
To the authors' best knowledge, it is the first time that a systematic wideband eigenmode analysis of a structure with the given complexity has been performed.

B. Structure of this article
The paper is organized as follows: Section I C presents a brief introduction to the European XFEL and discusses geometric details of the structure under consideration, i.e. the chain of third harmonic cavities.In Sec.II A relevant rf properties of superconducting cavities are revised in order to have a concise nomenclature.Section II B discusses the numerical approach used to model the chain of cavities.In particular, it highlights how the relevant quantities are determined by the employment of the SSC approach.In Sec.III A the most important rf properties of the cavity chain, which are delivered by SSC, are discussed.Section III B compares measurements with the generated numerical model in order to estimate its accuracy.A final discussion is provided in Sec.IV.Tables containing the properties of the eigenmodes in the interval 1 to 8 GHz are available in the Supplemental Material of this article [38].In addition, the Supplemental Material [38] provides the field patterns of these modes.

C. The European XFEL and its chain of superconducting third harmonic cavities
The European XFEL [1] is a free-electron laser currently under construction in the northern part of Germany.The facility is able to generate 27,000 laser light pulses per second shorter than 100 fs with a tunable wavelength between 4.7 and 0.05 nm.In consequence, the machine enables the observation of very fast processes on a subatomic scale.The entire installation has an overall length of 3.4 km starting at the DESY campus in Hamburg and ending in the south of Schenefeld in Schleswig-Holstein.Its main components are the injector, the linear accelerator, the beam distribution system, the undulators, the photon beam lines, and the experimental stations.In the beginning of the injector, bunches of electrons with a charge from 0.02 to 1 nC are generated by using the photoelectric effect and are accelerated to 130 MeV.Subsequently, they are guided to the linear accelerator.The 1.6 km linear accelerator comprises accelerating cryomodules, dipole and quadrupole magnets for bending and focusing of the beam, bunch compressors as well as diagnostic monitors.The linear accelerator is capable to accelerate electrons to 17.5 GeV.Subsequently, the accelerated bunches are distributed to different beam lines in the beam distribution system.The two beam lines contain different undulators so that various needs of the users for different experiments are satisfied.The undulators are periodic structures of dipole magnets and enforce the charged particles of the bunch to transversely oscillate and thus to longitudinally radiate energy.Laser light is generated at the undulators using the self-amplified spontaneous emission principle [39].The light is directed by the photo beam lines, which are equipped with optical elements, filters and mirrors, to the experimental stations.
Cryomodules which accommodate TESLA cavities [4] are incorporated in the linac section.The TM 01 -π mode of the cavities is employed to accelerate the charged particles.In addition, a third harmonic module is installed in the linac section of the European XFEL.Its purpose is the linearization of the longitudinal dependency of the accelerating electric fields.In combination with a suitable bunch compressing scheme, this allows for higher peak currents [40].The third harmonic cryomodule accommodates eight superconducting elliptical nine-cell resonators [13,14].The TM 01 -π mode of the cavities resonates at 3.9 GHz, which is in fact 3 times the frequency of the TM 01 -π mode of a TESLA cavity.Figure 1  Each cavity is equipped with a HOM coupler and a pickup on its left-hand side (downstream) and a HOM coupler with a power coupler on the right-hand side (upstream).Couplers of cavities with an even index are rotated by an angle of 180°around the longitudinal axis.Bellows are mounted between the cavity-coupler combinations.(b) Magnification of the red rectangle in (a), i.e. the first two cavities with couplers.HOM couplers are placed on the left-hand side and HOM couplers with power couplers are mounted on the right-hand side.The HOM couplers are based on the one-leg design [see Fig. 3(a) in [34]].The length L Ca of the cavity with couplers is 505.92 mm whereas the length of the bellows is 102 mm.Both (a) and (b) are modifications of Fig. 4 in [41].layout of the third harmonic cavity string.In particular, Fig. 1(a) sketches the entire chain of eight cavities, whereas Fig. 1(b) shows the magnification of the first two cavities in the string, so that details become visible.Adjacent cavities are attached to each other by bellows to compensate for geometric tolerances.The geometric parameters of the third harmonic cavities are available in [13,14].At each right end of a cavity, a power coupler is mounted, which is connected via a waveguide feeding system with a klystron.The power couplers are used to excite the TM 01 -π-mode of the cavities.In order to damp unwanted HOMs, which are excited by bunches of charged particles traversing the structure, HOM couplers are attached to both ends of each cavity.The HOM couplers have a notch effect at 3.9 GHz so that they do not couple to the TM 01 -π mode (see Fig. 5 in [34]).The HOM couplers of the third harmonic cryomodule of the European XFEL are based on the one-leg design [see Fig. 3(a) in [34]].The length of the cavities with beam pipes is L Ca ¼ 505.92 mm, whereas the length of the bellows is L Be ¼ 102 mm.Consequently, the total length of the string is ≈ 4;761 mm.In order to guarantee a strong coupling of the HOM couplers to all polarizations of the modes, they are rotated against each other by an angle of 115°.Moreover, every second cavity is rotated by an angle of 180°around the longitudinal axis.

II. THEORY
A. Quantities for the characterization of superconducting radio-frequency resonators 1. Eigenmodes and their properties One of the most important property of superconducting resonators is its eigenmode spectrum.The eigenmodes can be considered as resonances of the nonexcited, closed, lossless and charge-free structure.Combining Maxwell's equations and employing the aforementioned conditions delivers the Helmholtz equation for electric fields: Here, Δ denotes the vector Laplace operator and Ω the domain under consideration.The electric field distribution E n ðrÞ of the nth eigenmode is dependent on the spatial coordinate r.The angular wave number of the nth mode is given by with the resonant angular frequency ω n , the resonant frequency f n (both of the nth eigenmode), and the speed of light c.The partial differential equation (1) comes along with the perfect electric conducting boundary condition, and the perfect magnetic conducting boundary condition, Here, n is the unit vector which is normal to the boundary ∂Ω of the domain of interest Ω.The perfect electric conducting boundary is denoted by ∂Ω PEC , whereas the perfect magnetic conducting boundary is described by ∂Ω PMC .Note that for perfectly symmetric structures, the eigenmodes are classified according to their azimuthal properties, into monopole, dipole, quadrupole modes, etc.However, the input and HOM couplers break the symmetry of the cavity chain so that the aforementioned mode classification is not valid anymore in a strict manner.Nonetheless, the classification is often used, because the couplers only slightly perturb the symmetry of the structure.Therefore, the features of monopole, dipole, quadrupole, etc. modes are approximately preserved if the field energy is strongly localized in the rotational symmetric resonators.
An important property of the eigenmodes in the context of particle acceleration is the normalized geometrical impedance Here, W n refers to the energy stored in the nth eigenmode and E n;z ðx ¼ 0; y ¼ 0; zÞ to its longitudinal electric field on the ideal trajectory of the charged particles.The quantity d is the length of the structure while it begins at the origin z ¼ 0. The geometrical impedance is a measure of the coupling of the nth eigenmode with a charged particle which traverses the structure with the velocity c.This impedance is solely dependent on the shape of the structure under consideration.Large geometrical impedances describe a strong coupling, whereas small impedances are a result of a weak coupling.In addition to the given definition of the geometrical impedance, other definitions [p.589, (16.48) of [42]] are often used.They differ from ( 5) by a factor of 2.
For the sake of completeness it is remarked that (5) evaluates to zero for dipole, quadrupole, etc. modes in perfectly rotationally symmetric structures.However, HOM and input couplers break the symmetry in the structure under study and give rise to a nonzero value of (5).In the framework of the entire article, ( 5) is used as it indicates the excitation of dipolelike and other higher order modes due to the couplers breaking the rotational symmetry of the multicavity system.
A further quantity of relevance is the external quality factor of the nth mode.The losses P ext;n result from a propagation of energy through the waveguide ports, which are assumed for this case to be open.The external quality factor of the nth mode can be estimated by a perturbation approach from the lossless electric and magnetic field distributions of the eigenmodes and appropriate constraints on the tangential electric and magnetic fields on the waveguide port planes (refer to Sec.II B 6).For the sake of completeness it is remarked that the resonant frequencies and field patterns of the mode change, when losses are considered.The external quality factor describes the coupling of the mode to the waveguide ports.Strong coupling of the mode to the ports results in small external quality factors and a fast exponential decay (or rise) of the field energy.In contrast, weak coupling leads to large external quality factors and a slow exponential decay (or rise) of the field energy.Large quality factors of higher order modes are potentially dangerous, since their beam-excited fields remain long in the cavity and can deflect following bunches from their design trajectories.Therefore, it is desirable to have small external quality factors for higher order modes.

Scattering parameters
Scattering parameters are a common concept to characterize linear time-invariant radio-frequency circuits or structures in frequency domain.
All quantities are complex-valued, because they contain information related to amplitudes as well as phases.For a more detailed description of the concept of scattering parameters, the reader is referred to [43,44].

B. Numerical approach
In order to compute the eigenmode spectrum of the chain of eight cavities with bellows and couplers, the state-space concatenation (SSC) approach [24,[27][28][29][30] is employed.The method is a combination of domain decomposition and model-order reduction.The scheme is directly discussed hereinafter by help of the structure under study.A validation of the scheme can be found in [24,29].

Decomposition of the chain into segments
In a first step, the long chain of rf cavities (refer to Fig. 1) is decomposed into individual segments.The decomposition planes are allocated at regions of longitudinally constant cross section in order to keep the number of required waveguide port modes at these cut planes small.For further details related to the choice of the cut plane locations, the reader is referred to chapter 4.1 of [24].Figure 2   Note that pickups are not modeled at the couplers.Additionally, the HOM couplers of the computational model are rotated by 90°rather than by 115°, because CST MICROWAVE STUDIO® [46] requires that waveguide ports are aligned with Cartesian coordinate planes when a hexahedral mesh is used.For the same reason, the power couplers are placed to the opposite of the HOM couplers, i.e. power couplers and HOM couplers are not rotated by an angle of 150°.A hexahedral mesh is employed for technological reasons as discussed in Sec.II B 2. It is worth mentioning that the HOM/power couplers (a) and (b) as well as the HOM couplers (c) and (d) are the same geometries but are rotated around the longitudinal axis.In principal, rotation matrices (see Appendix A2 in [34]) can be employed to account for the respective rotations, so that an individual treatment of the four segments is not required at all.However, the introduction of rotation matrices is an additional error source in the computation and is therefore avoided.
After the decomposition of the string, waveguide ports accounting for eight 2D port modes are assigned to facets which are generated by the decomposition (see Table I), and to both ends of the cavity string.In fact, all 2D port modes are considered whose cutoff frequency f co is smaller than the maximal considered frequency f max ¼ 8 GHz plus an additional set of three evanescent waveguide modes.At the coaxial port of the HOM couplers solely the TEM port mode is regarded, whereas the TEM port mode and the first two TE 11 port modes are considered at the coaxial port of the power coupler.In other words, at the coaxial ports exclusively 2D port modes which propagate at f max are regarded.A so-called modal voltage and a modal current corresponds to each waveguide mode.The modal voltage v r;p;m ðtÞ is a transient weighting coefficient of the tangential electric field of the 2D port mode allocated in the port plane.Correspondingly, the modal current i r;p;m ðtÞ is a transient weighting coefficient of the tangential magnetic field of the port mode.The subscript r, p, m indicates that the quantity refers to the mth 2D port mode at the pth waveguide port of the rth segment.

Generation of reduced-order models
In order to generate the reduced-order models of the R segments, each individual substructure is discretized by means of CST MICROWAVE STUDIO® (CST MWS) [46] using a hexahedral grid.A hexahedral grid is chosen in the framework of this paper, because it is much more convenient to export matrices from CST MWS resulting from a hexahedral discretization than for a tetrahedral discretization.The discrete formulation of the wave equation with excitation for the lossless rth segment leads to a secondorder state-space system of the form with the time-dependent state vector x r ðtÞ ∈ R N d , the system matrix In the upper equations, N d is the number of degrees of freedom of the state-space system.The state matrix is constructed by means of where C r is the discrete representation of the curl operator.
The diagonal matrices M ε;r and M μ;r contain properties of the grid and averaged material parameters.The three matrices are constructed according to the finite-integration technique (FIT) [47,48].The input matrix (or output matrix transposed) is created by where the columns of the matrix R r contain the field distributions of the 2D port modes in a lexicographic order.The 3D electric field strength in the rth segment is available in a lexicographic order via e r ðtÞ ¼ D −1 s;r M −1=2 ε;r x r ðtÞ: ð14Þ The diagonal matrix D s;r holds the lengths of the edges of the primary grid.Each coefficient of the vector e r ðtÞ represents an electric field strength which is sampled at the midpoint of the edges of the primary grid.Note that the introduced matrices C r , D s;r , M ε;r , M μ;r , and R r refer to the rth segment.Typically, the number of degrees of freedom N d of the state-space equations is large (see the second row of Table II) to represent the distributed nature of the underlying partial differential equation, i.e. the wave equation with excitation.Fortunately, the number of degrees of freedom can be significantly reduced if the rf properties of the segments are only of interest up to a finite frequency f max .To reduce the number of degrees of freedom of (10), the state vector is expressed by a so-called reduced state vector x rd;r ðtÞ ∈ R N dr : x r ðtÞ ¼ W r x rd;r ðtÞ: ð15Þ The semiorthogonal reduction matrix W r ∈ R N d ×N dr is constructed based on an incomplete set of eigenvectors of the matrix A r in addition to a set of frequency-domain field distributions of the state-space system (10).The matrix has many more rows than columns, i.e.N d ≫ N dr .This guarantees the reduced-order state vector to be small on the one hand.On the other hand, too few degrees of freedom of the reduced state vector result in a poor approximation.The algorithm used to determine W r is designed so that a sufficient number of degrees of freedom based on the matrix A r and B r is chosen to stay below a certain residual-based accuracy criterion.For further information about constructing the reduction matrix, the reader is referred to chapter 4.2 of [24].Substituting (15) in (10), multiplying the obtained equation from the left-hand side with W T r , and using the semiorthogonality of the reduction matrix (W T r W r ¼ I) results in the reduced-order state-space equation Replacing (15) in (11) delivers the reduced-order output equation Table II collects relevant information of the (reduced) statespace models of the respective segments.

Combination of reduced-order models
In a next step, the reduced-order state-space models of the individual segments are concatenated to obtain a compact model for the full structure.For this sake, the reduced-order state-space models are collated in terms of the block system whose state vector embraces the reduced state vectors of all segments: x rd;1 ðtÞ x rd;2 ðtÞ Á Á Á x rd;r ðtÞ Á Á Á The system matrix A b and the input matrix B b are blockdiagonal matrices holding the system and input matrices of the individual segments on its main block diagonal: The vector with the current excitations i b ðtÞ is constructed according to In addition to the block state-space system (18), all output equations of the segments are combined to while the vector v b ðtÞ collates the modal voltages at all internal and all external ports: According to [24,27], the order of the modal voltages and currents is rearranged to a so-called sorted order by means of the permutation matrix P: Each row and each column of a permutation matrix has only one coefficient being equal to one, while the remaining coefficients are equal to zero.The permutation matrix has full rank and is orthogonal, i.e.P T ¼ P −1 .It is constructed so that modal currents and voltages of internal ports (those which arise from the decomposition) are collected in i int ðtÞ and v int ðtÞ and modal currents and voltages of external ports in i ext ðtÞ and v ext ðtÞ.It is of crucial relevance that modal voltages and currents of terminals which need to be connected are listed below each other in i int ðtÞ and v int ðtÞ. Figure 3 shows the abstract counterpart of the cut plane between the first HOM coupler (r ¼ 1) and the first cavity (r ¼ 2) of the chain.According to the sketch, the vectors with the internal quantities are organized as follows: i int ðtÞ ¼ ½i i.e. quantities of terminals which have to be connected are listed below each other.In a next step, the orthogonality of the permutation matrix P, (25) and ( 26 The segmentation allows for the following separation of internal and external quantities in ( 29) and ( 30) to obtain and Note that the block Bb1 is selected to have as many columns as internal terminals exist and the block Bb2 to have as many columns as external terminals exist.For concatenated segments, the currents in i int ðtÞ lose their linear independence.Following Kirchhoff's current law, the currents flowing into the nodes are equal to currents flowing out of the node.For the cut plane depicted in Fig. 3, this reads as i 1;3;1 ðtÞ ¼ −i 2;1;1 ðtÞ, i 1;3;2 ðtÞ ¼ −i where The vector îint ðtÞ contains the linearly independent currents.In comparison to i int ðtÞ, îint ðtÞ contains half the number of currents.In addition to Kirchhoff's current law, Kirchhoff's voltage law has to hold for the voltages of coupled terminals.It claims that the directed sum of the voltage around a closed circuit is zero.For instance, this results for the voltages in Fig. 3 in v 1;3;1 ðtÞ ¼ v 2;1;1 ðtÞ, v 1;3;2 ðtÞ ¼ v 2;1;2 ðtÞ, and v 1;3;8 ðtÞ ¼ v 2;1;8 ðtÞ.Expressing Kirchhoff's voltage law for all internal voltages results in Note that the formulation of Kirchhoff's laws by means of ( 35) and ( 37) is exclusively feasible, because quantities of terminals which are concatenated to each other are arranged below each other via the permutation matrix P. Multiplying (32) from the left-hand side with F T BT b1 and replacing i int ðtÞ by (35) yields The equation can be rearranged to obtain the time derivative of the internal currents: Employing this expression to replace the time derivative of îint ðtÞ in (32) yields with the idempotent (K 2 ¼ K) and symmetric matrix As a matter of fact, ( 40) is an orthogonal projection of the expression in the square brackets in the null space of F T B T b1 .The projection ensures that the system evolves on a subspace of x b ðtÞ so that the algebraic side constraints (35) and (37) are fulfilled.The semiorthogonal basis of the null space of F T BT b1 is given by where M T M ¼ I.The semiorthogonal basis is now employed to remove as many internal states as connected terminals exist: This equation is now used to substitute x b ðtÞ in ( 40) and (34).This delivers the state-space system of the concatenated structure and the corresponding output equation The number of degrees of freedom of this state-space system is again reduced using a semiorthogonal reduction matrix W c , which is generated based on an incomplete set of eigenvectors and a set of frequency-domain states of the system.Using the ansatz x c ðtÞ ¼ W c x cr ðtÞ ð 46Þ to express the state vector in terms of a reduced-order state vector delivers the final state-space equation for the entire chain with the output equation This state-space model has N dr ¼ 2,931 degrees of freedom, i.e. x cr ðtÞ ∈ R N dr .Note that a direct concatenation of the full state-space models (10) and (11) without the application of model-order reduction delivers a state-space model for the eight-cavity chain with couplers with N d ¼ 19,924,977 degrees of freedom.In other words, the proposed technique allows for an overall reduction of the degrees of freedom by a factor of N dr =N d ≈ 1.471 × 10 −4 .

Computation of scattering parameters
To compute the scattering parameters of the eight-cavity chain with couplers, the frequency-domain transfer function of the system (47) and ( 48), is evaluated on 320,200 discrete samples in the frequency range 4 to 5.6 GHz.These values are chosen on the basis of the available measured transmission spectra of the third harmonic module of the European XFEL.The frequencydomain transfer function ( 49) is in fact the impedance matrix of the structure under consideration.The entire structure has 56 external terminals (one per HOM port, three per fundamental power coupler and eight per beampipe flange) so that the complex-valued impedance matrix has 56 rows and columns, i.e.ZðjωÞ ∈ C 56×56 .In a subsequent step, the impedance matrices ZðjωÞ are converted to scattering matrices using the well-known formula Here, D z ðjωÞ is a frequency-dependent diagonal matrix holding the wave impedances of the 2D port modes on its diagonal, i.e.
The wave impedances of the TE port modes are determined by means of and the wave impedances of TM port modes by Here, ω co ¼ 2πf co is the angular cutoff frequency of the respective waveguide mode.The frequency-independent and real-valued impedances of TEM port modes are determined based on the radius r i of the inner conductor and on the radius r o of the outer conductor, In the upper equations, Z 0 ≈ 120π Ω is the impedance of free space.

Computation of eigenmodes and normalized shunt impedances
All eigenmodes are computed assuming perfect magnetic conducting boundary conditions on the waveguide port surfaces.As the tangential magnetic fields on the port planes have to be zero for this case, the modal excitation currents have to be equal to zero as well (recall that the modal currents correspond to the tangential magnetic fields on the port surfaces).Choosing i ext ðtÞ ¼ 0 and transforming the state equation ( 47) of the concatenated structure into frequency domain results in the eigenvalue problem: x cr ðjωÞ |fflfflffl{zfflfflffl} It is worth mentioning that this eigenvalue problem can be directly solved, because of the small size of the matrix A cr .Moreover, the eigenvectors v cr;n as well as the eigenvalues are real-valued on account of the symmetry of the matrix A cr .All eigenvalues are smaller or equal to zero (λ n ≤ 0) as a result of the negative semidefiniteness of A cr .The frequencies of eigenmodes of the entire chain are determined from the eigenvalues via Note that the frequencies are real-valued, because λ n is smaller than or equal to zero.Based on the experiences gained in [24], the relative error in the resonant frequencies is expected to be in the order of 10 −3 .The field distributions of the eigenmodes are constructed based on the eigenvectors v cr;n .First, the state vector of the block system ( 18) is determined by means of Subsequently, the vector v b;n is decomposed according to its definition in (19), i.e.
In a next step, the reduced-order state vectors v rd;r;n of the individual segments are used to determine the field distribution of the nth mode in the rth segment: The 3D field distributions, which are stored in a lexicographic order in e r;n , are exported to ParaView [49].
A ParaView script is used to automatically generate field plots of all modes with resonant frequencies in the interval 1 to 8 GHz.In addition, the 3D field distribution is used to extract the longitudinal component of the electric field E n;z ðx ¼ 0; y ¼ 0; zÞ of the nth mode on the ideal trajectory.Together with the resonant angular frequency ω n of the nth eigenmode, this delivers the normalized longitudinal geometrical impedance R n =Q n .Note that all eigenvectors are normalized such that the total field energy equals one Joule, i.e.W n ¼ 1 J.

Estimation of external quality factors
To compute the external quality factors of the eigenmodes, a perturbation approach is employed.Based on the eigenmodes of the lossless closed structure, the modes of the open structure are estimated.Note that the described approach does not account for the mutual coupling of the different eigenmodes which is introduced by the open waveguide ports.Moreover, the problem is linearized by evaluating the wave impedances of the port modes at the resonant frequencies of the respective 3D eigenmodes.
To estimate the external quality factor of the resonant modes, the negative semidefinite state matrix in the frequency-domain transform of ( 47) is substituted by its eigendecomposition A cr ¼ V cr Λ cr V T cr , i.e.
with the complex-valued angular frequency s.The columns of the real-valued orthogonal matrix V cr are the eigenvectors of A cr whereas the elements of the diagonal matrix Λ cr are the real-valued eigenvalues λ n of A cr .The multiplication of this equation with the orthogonal matrix V T cr from the left-hand side gives with a new state xcr ðsÞ and a new input matrix Bcr .On account of the diagonality of Λ cr , the states in the statespace equation (61) are not mutually coupled.In consequence, (61) can be written elementwise: Here, xcr;n ðsÞ is the nth coefficient of the vector xcr ðsÞ and bcr;n the nth row of the matrix Bcr .In case of open or matched waveguide ports, waves which are propagating from the inner domain to the port are not reflected back into the structure.To emulate these conditions, the external modal excitation currents are determined according to the modal voltages by means of where D z ðsÞ is the diagonal matrix defined in (51).
Employing this equation to substitute the external currents in (61) delivers Subsequently, the influence of the nth mode on the external modal voltage is considered by Combining (64) and (65) gives Evaluating the wave impedances at the resonant angular frequency s n ¼ jω n ¼ j ffiffiffiffiffiffiffi ffi −λ n p of the unperturbed mode delivers a polynomial of degree 2: Finally, the external quality factors are determined from the complex-valued roots sn of the polynomial (67) by means of where ℑfs n g denotes the imaginary part of sn and ℜfs n g the real part, respectively.

A. Eigenmodes in the cavity chain
The SSC approach, which is described in Sec.II B, delivers 1,479 eigenmodes in the interval 1 to 8 GHz.The properties of all computed modes can be found in the eigenmode compendium which is available in terms of Supplemental Material [38].Note that the resonant frequencies are specified at maximum with seven digits.This does not mean that the error in the resonant frequencies is in the order of kHz.According to Sec.II B, the error is expected to be in the order of several MHz.Nonetheless, more digits are presented so that modes with similar resonant frequencies can be distinguished.In other words, EIGENMODE COMPENDIUM OF THE THIRD … PHYS.REV.ACCEL.BEAMS 20, 042002 (2017) 042002-11 restricting to the significant digits results in nondegenerated modes appearing with the same resonant frequency.Figure 4 presents the external quality factor and the geometrical impedance of each mode in the chain of eight third harmonic cavities [see Fig. 1(a)].The bands of a single rotationally symmetric third harmonic cavity without couplers are highlighted with rectangles: orange rectangles for monopole bands, green for dipole bands, and purple for quadrupole bands.The locations of the bands are taken from the eigenmode computations presented in [15].
It is crucial to note that a large set of modes exists in addition to modes in the bands of the rotational symmetric third harmonic cavity.For instance, modes with a frequency smaller than the fundamental monopole band of the cavity are observed at approximately 2.60 GHz and at approximately 3.18 GHz.An inspection of the field distributions of these modes reveals that the energy is highly localized in the HOM couplers.Thus, they are referred to as HOM coupler modes.Figure 5 shows the absolute value of the electric field of these eigenmodes on a cut plane which is transverse to the ideal trajectory of the beam.The energy of the mode at approximately 2.60 GHz is solely localized between the antenna tip and the so-called formteil of the HOM coupler, as shown in Fig. 5(a).The energy of the eigenmode at approximately 3.18 GHz is localized between the formteil and the housing and in the coaxial connector, as depicted in Fig. 5(b).Both modes appear 16 times in the chain as sixteen couplers exist and there is almost no coupling of these modes via the chain.The resonant frequency of these modes slightly depends on their position: Modes which exist in the HOM couplers with input couplers have a resonant frequency higher than those which exist at the other HOM couplers without input couplers.This effect results from the input couplers slightly perturbing the field distribution of the HOM coupler mode.Note that the properties of these coupler modes change when enlarging the length of the coaxial connector.This particularly holds for the eigenmode depicted in Fig. 5(b), because it has a significant amount of field energy close to the end of the coaxial connector.However, both modes are of vital relevance for the operation of the entire structure, because they are partly responsible for the notch effect of the HOM couplers.
The next set of modes in Fig. 4 belongs to the first TM 01 band of the third harmonic cavity.These modes are trapped in the respective cavities as their resonant frequencies are smaller than the cutoff frequencies of the fundamental waveguide modes of the beam pipe (see Table I).Per cavity, nine modes exist so that the entire chain has in total 72 eigenmodes in this band.The most prominent representatives of this band are the eight TM 01 -π-modes at approximately 3.9 GHz.On purpose, these modes have the largest geometrical impedance (R n =Q n ≈ 756 Ω) in the considered frequency interval.Figure 6(a) depicts the normalized absolute value of the electric field of the TM 01 -π-mode in the third cavity as an example.
The next relevant set of modes is between the first monopole band and the first dipole band of the third harmonic cavity, i.e. between 3.9000 and 4.2979 GHz.These modes have comparably large external quality factors (Q ext ≈ 10 6 ) and small geometrical impedances (R n =Q n < 1 Ω).The field patterns reveal their TE 11 -like character and that their energy is predominantly allocated in the vicinity of the HOM couplers (without input couplers).In this set eight modes with quality factors larger than 10 6 are observed.Despite the fact that the energy of the modes is closely stored in the vicinity of the HOM couplers, the coupling to the coaxial part of the HOM coupler is very weak, so that large external quality factors result.Figure 6(b) presents the absolute value of the electric field of a mode with field energy present in the left end cells of the cavities close to the HOM couplers (without input couplers) as an example.
So far, properties of eigenmodes whose energy is solely localized in parts of the chain are discussed.Since frequencies considered hereinafter are larger than the fundamental cutoff frequency of the circular waveguidelike beam pipe (refer to Table I), higher order modes may be distributed along the entire chain.The first dipole band of the third harmonic cavity is densely populated with eigenmodes.Most of these modes are distributed along the entire chain of cavities, i.e. they are multicavity modes.In consequence, they do have comparably small external quality factors as their field energy can couple very well to the flanges of the beam pipes at the beginning and the end of the structure.Figure 6(c) depicts the absolute value of the electric field of a mode belonging to this band.The plot depicts the multicavity character of the eigenmode.
Another set of eigenmodes of the chain with interesting properties exists between the first dipole band and the second dipole band of the third harmonic cavity, i.e. in the interval 4.9162 to 5.3518 GHz.In this interval, seven modes with relatively large external quality factors (Q ext;n > 10 4 ) exist.An inspection of the field distributions of the respective eigenmodes reveals that their energy is highly localized in the bellows.Thus, these modes are referred to as intercavity or bellow modes.Their coupling to the HOM and input couplers is comparably weak, so that a quality factor in the order of 10 4 results.As an example, Fig. 6(d) depicts the normalized absolute value of the electric field of one of those eigenmodes.The field energy in this case is located in the first bellow.Another important set of modes corresponds to the second dipole band of the third harmonic cavity in the interval 5.3518 to 5.4944 GHz.These are distributed along the cavity chain (multicavity modes).They do have comparably small geometrical impedances.As a result of their distributed character, they do couple comparably well to waveguide ports located at both ends of the chain.Thus, these modes have external quality factors Q ext smaller than 10 4 .Figure 6(e) presents the field distribution of the mode from this set with the highest external quality factor.Despite the fact that the single third harmonic cavity does not have eigenmodes in the interval 5.5 to 6.5638 GHz, resonances of the chain are observed in this region.An inspection of the field distributions of these modes shows that their field energy is primarily located in the bellows and beam pipes which connect the adjacent cavities.On account of the special geometric properties of the structure, the connections between the eight third harmonic cavities can be considered as seven cavities as well.Figure 6(f) shows a typical eigenmode between the second dipole and the first quadrupole band of the third harmonic cavity.
In the interval 6.5638 to 6.7961 GHz a quadrupole band of the third harmonic cavity exists.Modes belonging to this band do have small geometrical impedances and quality factors larger than 10 5 .Figure 6(g) depicts the field distribution of an eigenmode with quadrupole character from this band.In addition, eigenmodes with field energy predominantly localized between the adjacent cavities exist in this frequency interval as well [see Fig. 6(h) for an example].
The situation becomes more complex if eigenmodes beyond the first quadrupole band are considered.In this regime, the second monopole, the third dipole, and the second quadrupole band overlap.A mutual coupling of these modes is introduced by the symmetry breaking couplers.Figure 6(i) shows the absolute value of the electric field of that mode in this interval with the largest geometrical impedance.

B. Comparison with measurements
In order to estimate the accuracy of the generated computer model, the results are compared to a set of transmission spectra of the chain of eight third harmonic cavities.The spectra are recorded at the European XFEL at DESY in Hamburg by means of a vector network analyzer.The cavities are in the superconducting state, whereas the couplers and bellows are normal conducting.The transmission spectra are recorded in the interval 4 to 5.6 GHz containing the first two dipole bands (refer to the analysis described in [15]).The chosen step size is Δf ¼ 50 kHz.
The ports of the HOM couplers are terminated with 50 Ω loads to avoid signals to be reflected.The input couplers are connected via cables and waveguides to the klystron.
Figure 7 presents the comparison between the measured and the computed scattering spectra.The computed spectra result from the approach described in Sec.II B 4. Figure 7(a) depicts the transmission from the left to the right HOM coupler of cavity 1, that is embedded in the chain.Figure 7(b) illustrates the transmission through the entire chain of eight cavities.In other words, the transmission from the left (downstream) HOM coupler of cavity 1 to the right (upstream) HOM coupler of cavity 8.The noise floor of the measured curves is below −80 dB.The agreement of the measured and computed curves is of qualitative nature.General characteristics such as the existence and the location of the first dipole band (Δf ¼ 4.2953…4.9260GHz) and the second dipole band (Δf ¼ 5.3583…5.4982GHz) of the third harmonic cavities agree.Both bands are marked with green bars in Fig. 7.In fact, it is difficult to relate measured peaks to simulated peaks and vice versa.The measured spectra are much more complex than the simulated ones as the black curves have more peaks in the considered frequency interval.For instance, the simulated transmission through the entire cavity chain does not show peaks in the interval Δf ¼ 4.6…4.68GHz whereas the measured curve does.Various reasons may lead to the observed differences: 1. Fabrication tolerances and geometrical perturbations such as deformations due to cooling or tuning of the individual cavities are not considered in the computer model.
2. The HOM couplers in the third harmonic cavities are rotated by 115°(see Fig. 1), whereas the HOM couplers in the SSC models are rotated by 90°(see Fig. 2) as CST MWS is not capable of defining arbitrary aligned waveguide ports if a hexahedral mesh is employed.The latter, however, is needed to allow for an export of the system matrices.Additionally, the pickups of the cavities are not modeled.
3. The waveguide ports at both ends of the chain are assumed to be ideal in the computer model so that no energy is reflected into the structure.This means that additional frequency-dependent reflections due to devices in the beam line (i.e.upstream and downstream from the cryomodule) and reflections from the cabling at the HOM and input couplers are not accounted for.
4. Intrinsic losses are not considered in the SSC model at all despite the fact that losses are introduced by the normal conducting bellows, the normal conducting couplers, and the normal conducting cabling.However, neglecting losses does not explain the lack of peaks in the computed transmissions.

IV. CONCLUSIONS AND OUTLOOK
The article presents the application of the SSC scheme to systematically compute the eigenmodes of the XFEL third harmonic cavity chain with HOM and input couplers.The scheme is successfully employed to determine the eigenfrequencies and eigenmodes on a wide band (i.e.across several bands of a single third harmonic cavity) using a workstation computer.The generated modal compendium helps in understanding the spectra of the chain under study.In addition, general effects which arise in chains of cavities are discussed and different classes of modes (i.e.cavity modes, multicavity modes and intercavity modes) are introduced.A major conclusion from this article is that the restriction to single nine-cell cavities with couplers is not sufficient as multicavity modes or intercavity modes are not covered in this case.Consequently, the effects of these modes cannot be estimated.
The presented comparison between simulation and measurement shows a qualitative agreement: The measured transmission spectra are much more complex than the simulated ones for various reasons such as fabrication tolerances, simplifications of the geometry of the computer model, additional frequency-dependent reflections from the couplers and the beam pipes, etc.
Despite the fact that progress has been made to numerically analyze large and complex rf structures, the differences between simulated and measured rf properties cannot be disregarded.Unfortunately, the aforementioned effects, which are responsible for the deviation between simulation and measurements, are difficult to incorporate in the numerical model.For instance, knowledge of the geometry of the chain is not exactly available as it is accommodated in the cryomodule.Apart from fabrication tolerances, the nonuniform shrinking of the structure due to cooling leads to additional deviations from the design shape.Furthermore, the tuners which are incorporated in the cryomodules shift the resonant frequency of the accelerating mode (i.e. the TM 01 -π mode) to the desired frequency.The knowledge of the exact influence of the tuners on the resonant frequencies and field patterns of the HOMs remains scarce as well.
One approach to account for the aforementioned inaccuracies of the numerical model is the introduction of, for instance, free geometry parameters and free reflection coefficients at the waveguide ports.The introduced parameters are subsequently determined by means of an optimization using a suitable objective function, e.g. a function related to the absolute difference between the simulated and measured scattering parameters.Solving this inverse problem requires a huge number of forward computations.In other words, the partial differential equation has to be solved for various perturbed geometries and various reflection coefficients at the waveguide ports.As this approach is computationally demanding, it is typically only applied for very simple structures such as single cells [50].It is worth mentioning that the SSC scheme can be of special advantage in this context, because the influence of perturbed segments on rf properties of the full chain can be determined without the direct consideration of the entire chain: Reduced-order models for the perturbed segments are constructed and are subsequently linked to the existing reduced-order models of the unperturbed segments in a postprocessing step.
Complementary to deterministic techniques, methods to account for the quantification of uncertainties in the computational model are applied for electromagnetic field problems in general (see for instance [51,52] and references therein) and for superconducting rf cavities [53][54][55] in particular.Based on probability density distributions of parameters of the model such as the geometrical details or the frequency-dependent reflections at the beam pipe flanges and the waveguide ports, probability density distributions of the rf parameters under study are delivered.In this way, these approaches enable to model not known properties of the problem under study as well.Like deterministic techniques, statistical approaches require a large number of forward computations.Therefore, it is challenging to employ them for structures with the given complexity.
Despite the limitations, SSC is, to our knowledge, the first method which is able to deliver a modal compendium of a structure with such a complexity like the European XFEL third harmonic module.

FIG. 1 .
FIG. 1.(a) Chain of eight superconducting third harmonic cavities.The electron gun is positioned on the right-hand side of the string.Each cavity is equipped with a HOM coupler and a pickup on its left-hand side (downstream) and a HOM coupler with a power coupler on the right-hand side (upstream).Couplers of cavities with an even index are rotated by an angle of 180°around the longitudinal axis.Bellows are mounted between the cavity-coupler combinations.(b) Magnification of the red rectangle in (a), i.e. the first two cavities with couplers.HOM couplers are placed on the left-hand side and HOM couplers with power couplers are mounted on the right-hand side.The HOM couplers are based on the one-leg design [see Fig.3(a) in[34]].The length L Ca of the cavity with couplers is 505.92 mm whereas the length of the bellows is 102 mm.Both (a) and (b) are modifications of Fig.4in[41].
Scattering parameters relate signals scattered into waveguide ports to signals which are incident to the ports.The incident signals are collated in the vector að jωÞ ¼ ½a 1;1 ðjωÞ a 1;2 ðjωÞ … a p;m ðjωÞ … a P;M P ðjωÞ T ; ð7Þ whereas the scattered signals are listed by bðjωÞ ¼ ½b 1;1 ðjωÞ b 1;2 ðjωÞ … b p;m ðjωÞ … b P;M P ðjωÞ T : ð8Þ The indices p and m denote that the respective quantity refers to the mth port mode at the pth port.In total, P ports are considered and M p modes at the pth port.The incident signals determine the scattered signals via bðjωÞ ¼ SðjωÞaðjωÞ:

FIG. 2 .
FIG. 2. Segments considered in the framework of this paper: (a) beam pipe with HOM coupler and power coupler, (b) beam pipe with HOM coupler and power coupler 180°rotated, (c) beam pipe with HOM coupler, (d) beam pipe with HOM coupler 180°r otated, (e) bellow, and (f) nine-cell third harmonic cavity.The segments (a)-(f) arise from the decomposition of the chain of cavities (refer to Fig. 1).Table II discusses further details of the segments.
) are employed to obtain d 2 dt 2 x b ðtÞ ¼ A b x b ðtÞ þ B b P |{z} Bb d dt i srt ðtÞ ð29Þ and v srt ðtÞ ¼ P T B T b |ffl ffl{zffl ffl} BT b x b ðtÞ:

FIG. 4 .
FIG.4.Properties of the modes in the chain of eight third harmonic cavities [see Fig.1(a)].The orange rectangles denote the location of the monopole bands, the green rectangles the location of the dipole bands, and the purple rectangles the location of the quadrupole bands.The locations of the bands result from an eigenmode computation for a rotational symmetric cavity without couplers[15].(a) External quality factors, (b) geometrical impedances, and (c) the product of the external quality factors and geometrical impedances for the eigenmodes in the XFEL chain of third harmonic cavities.

FIG. 5 .
FIG. 5. Absolute value of the normalized electric fields of the HOM coupler modes.(a) HOM coupler mode with the resonant frequency of approximately 2.60 GHz.The energy of this mode is predominantly localized between the formteil of the coupler and the antenna tip.(b) HOM coupler mode with the resonant frequency of approximately 3.18 GHz.The energy of this mode is localized in the gap between the formteil and the housing as well as in the coaxial connector of the coupler.(c) Legend for the field plots.

FIG. 7 .
FIG. 7. Comparison between measured (black curves) and simulated (red curves) scattering transmissions of the chain of eight third harmonic cavities (refer to Fig.1).The green rectangles indicate the location of the dipole bands of the single third harmonic cavities[15].(a) Transmission from the left (downstream) HOM coupler to the right (upstream) HOM coupler of cavity 1.The cavity is embedded in the entire chain.(b) Transmission through the entire cavity chain, i.e. from the left (downstream) HOM coupler of cavity 1 to the right (upstream) one of cavity 8.

TABLE I .
Properties of waveguide port modes considered at decomposition planes (beam pipes radius r ¼ 20 mm) as well as at both ends of the chain.

TABLE II .
Number of degrees of freedom of the state-space models of the individual segments (refer to Fig.1).The numbers of degrees of freedom arising from the FIT approach are denoted by N d , whereas the numbers of degrees of freedom of the corresponding reduced-order models are given by N dr .The wall-clock time required for the model-order reduction is specified by T mor .The modelorder reduction is performed on an Intel(R) Xeon(R) CPU E5-2687W v2 @ 3.40 GHz machine which is equipped with 256 GB RAM.
. 3. Abstract counterpart of the cut plane between the first HOM coupler and the first cavity in the chain.At the cut plane eight 2D port modes are considered.They are accounted for by eight terminals.The subscripts r, p, m of the modal current i r;p;m ðtÞ and the modal voltage v r;p;m ðtÞ indicate that the quantities refer to the mth 2D mode at the pth port of the rth segment.