Scattering parameters of the 3.9 GHz accelerating module in a free-electron laser linac: A rigorous comparison between simulations and measurements

This article presents a comparison between measured and simulated scattering parameters in a wide frequency interval for the third harmonic accelerating module ACC39 in the linear accelerator FLASH, located at DESY in Hamburg/Germany. ACC39 is a cryomodule housing four superconducting 3.9 GHz accelerating cavities. Due to the special shape of the cavities (in particular its end cells and the beam pipes) in ACC39, the electromagnetic field in the module is, in many frequency ranges, coupled from one cavity to the next. Therefore, the scattering parameters are determined by the entire string and not solely by the individual cavities. This makes the determination of the scattering properties demanding. As far as the authors can determine, this paper shows for the first time a direct comparison between state-of-the-art simulations and measurements of rf properties of long, complex, and asymmetric structures over a wide frequency band. Taking into account the complexity of the system and various geometrical unknowns, the agreement between experimental measurements and simulations is remarkably good for several distinct measurements, although a variety of effects (e.g. cavity deviations from the ideal shape or interactions with not modeled parts of the structure) is not considered in the computer simulation. After a short introduction, the paper provides detailed descriptions of simulations and experimental measurements performed at the module. In this context, the estimation of the cable properties is discussed as well. As a central part of the article, the comparison between measured and simulated transmission spectra and quality factors is presented. This study represents one of the first detailed comparisons between simulations and measurements for a coupled accelerator cavity system.


I. INTRODUCTION
A. Aim of the paper Numerical modeling and simulation are central elements for designing and understanding complex radio frequency (rf) devices such as superconducting particle accelerating structures for linear colliders [1] and light source [2] applications in particular. In this context, a large variety of studies (see [3][4][5][6][7][8][9][10][11][12] and many more) have been performed in the past to predict e.g. the interaction between two succeeding bunches via wakefields or the properties of resonant electromagnetic fields (so-called modes) in the superconducting cavities installed in the Free-Electron Laser Hamburg (FLASH) [13] linac at the Deutsches Elektronen-Synchrotron (DESY) laboratory. All these simulations have in common that they are based on abstract computer models, whose complexity is always a tradeoff between accuracy and computational demands. Therefore, often a vast number of effects is neglected, such as cavity deviations from the ideal shape due to fabrication tolerances or cooling processes. Moreover, single-cavity regions or strings of cavities are often not further extended than to the beam pipe or port flanges. The beam pipes and waveguide ports are usually equipped with open boundary conditions, such that waves are not backreflected into the structure. Fields which are not confined longitudinally by the high-pass characteristic of the waveguide-like beam pipes are therefore usually understood as vanishing in the accelerator by dissipation or coupling to the outer world. This ignores that fields, which are excited in the device under consideration, may find appropriate resonances in neighboring parts of the accelerator. It neglects the denser eigenmode population of coupled devices compared with single entities. It also hinders the quantification of wakefield interactions with parts of the accelerator further remote from the origin of the fields than the couplers of the cavity. Extending the size of the computation domain not only increases computational effort by itself, but also raises the complexity of possible field patterns and typically enhances the number of externally determined parameters (e.g. the external terminations of every coupler and the previously mentioned geometrical tolerances). This makes a concatenated accelerator structure soon too complex if the need of a high performance computing environment shall be avoided. Means to split the structure geometrically, allow one to compute rf properties of the entire string even on medium-range computer architectures.
We focus our study on the demonstration of a numerical procedure to decompose a large section of an accelerator string in direct comparison with experimental results. In addition, this work provides results on the extent to which perturbed multicomponent rf accelerator structures can be accurately modeled using deterministic numerical techniques based on technical drawings and decomposition approaches. The numerical splitting approach utilized (e.g. see [14][15][16]) was denoted as Coupled-S-Parameter Calculation (CSC) and delivers the S-matrix of complex structures based on the S-matrices of its segments in combination with topology information. It may be understood as even a more general formulation of the generalized scattering matrix [17] technique, since it is neither restricted to port or mode numbers nor to topological characteristics of the structure under concern. Numerical codes such as ANSYS HFSS [18] or CST MICROWAVE STUDIO® [19] in combination with CSC are used in the simulations. Scattering matrices are simulated and compared to laboratory measurements.

B. ACC39 at FLASH
The described demonstration is focused on the FLASH linac ( Fig. 1) at DESY [13]. A photoelectric gun generates electron bunches, which are accelerated through 1.3 GHz cavities to a maximum energy of 1.2 GeV before they produce soft x-ray laser pulses in the undulators. Subsequently, the electrons are sent to the beam dump, whereas the produced photons move on to the experimental lines. The particle acceleration is accomplished by seven modules (indicated in Fig. 1 by light blue rectangles inside the yellow rectangles), accommodating eight TESLA-type 1.3 GHz cavities [3] each. In addition to these modules, the FLASH beam line is equipped with the cryomodule ACC39 [20,21] (red structure highlighted with a circle in Fig. 1), accommodating four superconducting elliptical nine cell cavity resonators. Their π modes have a frequency of 3.9 GHz (third harmonic of π mode of the TESLA-type cavities) [7][8][9][10]. ACC39 linearizes the longitudinal dependency of the accelerating fields, which are experienced by the bunches of electrons. This enables an increase of peak current after the bunch compression [22]. Figure 2(a) shows the structure of ACC39 with its four 3.9 GHz cavities. The adjacent cavities are connected via bellows. Obviously, the shape of the third harmonic cavities is different from the shape of the TESLA-type 1.3 GHz cavities [3,[7][8][9][10]. The midcell equator radius of the third harmonic cavity is significantly reduced from 103.3 mm (TESLA shape) to 35.787 mm (factor of ca. 2.89). The midcell iris radius is reduced from 35 mm (TESLA shape) to 15 mm (factor of ca. 2.34) and the midcell length is reduced from 115.4 mm (TESLA shape) to 38.4334 mm (factor of ca. 3). The ratio between iris radius and cup length leads to a stronger deposition of field energy by the beam (so-called wakefields) in the third harmonic cavities (see e.g. [23]) as compared to the TESLA type. The wakefields can be interpreted as a weighted, timedependent superposition of higher order modes (HOMs), grouped in bands. These modes, once excited by the beam, need to be suppressed by dedicated HOM couplers to reduce e.g. the unwanted interactions of HOMs with following bunches of charged particles or additional loads of the cryogenic system. In order to damp the HOMs, each cavity is equipped with two HOM couplers. Moreover, each cavity has one power coupler (PC) employed to excite FIG. 1. Schematic view (not to scale) of the FLASH facility at DESY in Hamburg. The third harmonic module ACC39 (marked in red) is mounted between the first accelerating module (ACC1) and the first bunch compressor (BC). The picture was adapted from DESY [13]. the π mode. Although it is not apparent from Fig. 2(a), two different types of HOM couplers are incorporated in ACC39: cavity 1 and cavity 3 are equipped with one-leg couplers [see Fig. 3(a)], whereas at cavity 2 and cavity 4 two-leg couplers are mounted [see Fig. 3(b)]. Further details regarding the geometry are given in Table I.
As a consequence of the downscaling of the cavity equator radius by a factor of ca. 2.89 and the downscaling of the cavity beam pipe radius by a factor of 1.95, HOMs are not necessarily trapped in the individual cavities due to the relationship f co;TE 11 < f HOM;3 < f HOM;4 < f HOM;5 …; (1) where f co;TE 11 ¼ 4.3920 GHz is the cutoff frequency of the fundamental waveguide mode in the beam pipe and f HOM;3 ≈ 4.446 GHz the frequency of the third HOM in an individual cavity without couplers [11]. Figure 4 depicts this central property of the ACC39 cavity string. The resonant frequencies of the eigenmodes arising from the single cavity simulation without HOM couplers and electric boundary conditions at the end of the beam pipes are plotted as red crosses (monopole modes), blue plusses (dipole modes), and black circles (quadrupole modes). In addition, the regions where the waveguide modes of the beam pipes can propagate are indicated in terms of grey rectangles. It follows from Fig. 4 that the nine modes of the fundamental monopole band and the first two modes of the first dipole band are trapped in the cavities of the ACC39 string, because the resonant frequencies of these modes are below the cutoff frequency of the fundamental mode of the beam pipe. In contrast, higher order modes may be distributed along the complete chain as coupling via the adjacent cavities is in principle possible. As a consequence of the coupling of the modes along the chain, frequency bands are much more densely populated with modes. Therefore, the HOM spectrum in the third harmonic cavity arrangement is much more complex compared to that of the TESLA-type 1.3 GHz cavities. This, together with relatively relaxed experimental conditions, makes the ACC39 module a well suited prototype test object to study the  accuracy of the numerical splitting approach. As far as the authors can determine, this article presents for the first time a comparison between measured and simulated S-parameters for a four cavity system with symmetrybreaking HOM couplers over a wide frequency range. A further reason for the comparison is the validation of the created computer models. These models are used in ongoing studies to determine HOM port signals, which can be employed for diagnostic purposes (e.g. see [24][25][26]).

C. Structure of the paper
The article is organized as follows: It begins with the computation of the ACC39 scattering parameters by means of concatenation strategies in Sec. II. Therein details on the decomposition of the entire structure into segments, the geometric modeling, the determination of the S-parameters of the segments and the coupling of the segments are presented. Section III describes the measurements of the ACC39 S-parameters. The treatment of the rf cables, connecting the module with the measurement equipment is presented in Sec. III B. The cables are long enough to introduce strong signal damping and a frequencydependent phase advance. Section IV presents the comparison between measured and simulated S-parameters. Moreover, quality factors for modes confined in individual cavities are shown. These quality factors are determined from computed and measured scattering spectra utilizing a system identification routine [27]. Section IV finalizes the treatise with a summary, conclusions, and outlook.

II. NUMERICAL COMPUTATION OF S-PARAMETERS
As mentioned in the Introduction, the entire module ACC39 has to be taken into consideration for scattering parameter computations. The complete discretization of the full string for scattering parameter computations is computationally expensive as the cavity chain has a length of L chain ≈ 2.3296 m and as it contains tiny curvatures in the order of mm. Assuming the entire chain to be discretized using the finite integration technique (FIT) [28] approach with a hexahedral grid constituted by three nodes per mm and a cross section of the structure of A chain ¼ 6250 mm 2 results in total nodes in the mesh. The number of nodes per mm is mainly determined by the tiny parts of the HOM couplers (refer to Fig. 3) to accomplish the notch effect, which is needed to suppress damping of the accelerating mode. These parts need to be resolved by the mesh accurately. In this context, a nonequispaced discretization can also be employed to reduce the number of nodes. Unfortunately, nonequispaced discretizations lead to ill-conditioned computations when large mesh aspect ratios are involved. In fact, three complex-valued degrees of freedom (three spatial components e.g. for the electric field) need to be computed for each node in the hexahedral grid (the magnetic field components can be computed conveniently using the induction law) for each frequency domain excitation of the structure. This leads to memory requirements in the order of to store e.g. the electric field distribution for one excitation assuming a memory width of 16 Byte to store one complexvalued field component. However, (3) is only a lower limit for the memory demand, as a sparse system matrix A FIT ∈ R 3N nodes ×3N nodes arising from the FIT discretization needs to be kept in the memory as well. This system matrix can be stored efficiently in terms of a few dozen vectors holding the bands of the matrix which are not equal to zero. Even though the computation of scattering parameters for this structure is generally feasible with supercomputerscale cluster hardware as demonstrated using e.g. SLAC ACE3P suite of codes [29], it is desirable to find a method appropriate for PC hardware of much more general availability. FIG. 4. Numerically computed resonant frequencies of eigenmodes of the third harmonic cavity without couplers and electric boundary conditions enforced at end of the beam pipes [11]. Monopole modes are depicted as red crosses, dipole modes as blue plusses, and quadrupole modes as black circles. The regions where the TE 11 , the TM 01 , and the TE 21 waveguide modes can propagate are depicted in terms of grey shaded rectangular frames (refer to Table IV for the cutoff frequencies). The plot shows that only the nine eigenmodes of the first monopole band and the first two eigenmodes of the first dipole band have to be confined in the individual cavities because their resonant frequencies are below the cutoff frequency of the fundamental waveguide mode of the beam pipe. The remaining eigenmodes may be distributed along the individual cavities of the chain as they can couple via the beam pipes to the adjacent cavities.
Using the Coupled S-Parameter Calculation (CSC) formalism [14][15][16], the scattering parameters of the module can be determined with standard desktop computers. The CSC formalism is based on the decomposition of the long chain into smaller segments. The scattering parameters of the segments can be computed in parallel on different small workstations with less computational effort. In a comparably inexpensive postprocessing step the scattering matrices of the individual segments are combined, incorporating topology information to determine the scattering parameters of the full structure. The CSC approach followed previous work in which a modal field matching method was used to compute the electromagnetic waves in tapered multicell structures with circular cross section [30]. The semianalytical mode matching code, called ORTHO, had specifically been developed to study the constant gradient acceleration structure of 180 cells foreseen in the S-band 500 GeV linear collider study of DESY/TUD (accelerating mode at 3 GHz) since, at that time, no other field solver was available which could treat this 180 cell structure with slight geometrical changes from cell to cell. Computations with ORTHO revealed that a large number of deflecting HOMs had an impact on the beam dynamics and that many of them were trapped in the inner region of the constant gradient structure. In order to validate the phenomenon of trapped HOMs in detuned waveguides, which was neither theoretically nor experimentally very well known then, a 36-cell test structure was designed at which rf measurements were easy to perform and which was computable with different numerical codes [31].
While those structures with subsections of circular cross section allow for a semianalytical computation of the overall structure, more complex cavity geometries could not efficiently be treated with such a semianalytical approach. Therefore, the basic idea of modal field matching has been combined with numerical simulation for subsections of complex geometry [14][15][16].
A. Decomposition of the cavity chain and S-parameter computation of the segments Figure 2(b) shows the decomposition of the ACC39 cavity string into individual CSC segments, which are modeled with CST MICROWAVE STUDIO®. The drawings of the module with the geometric details necessary to create the computer models are collected from FNAL and DESY colleagues.
The black lines in between the objects in Fig. 2(b) indicate CSC segments, whose scattering matrices are known analytically such as circular waveguides with constant cross section and rotations accounting for the rotation of the couplers (see Appendix A). Table II lists all CSC segments, whose scattering parameters are not available in a closed analytic form, in correspondence to the indices given in Fig. 2(b). Nevertheless, these parameters are computable by means of numerical methods. However, the computation of S-parameters of resonant structures with standard frequency or time domain methods is a demanding task. By employing e.g. time domain methods, the structure under test is excited by a broadband transient Gaussian pulse and the system response is determined using transient iteration schemes. If the field energy has left the structure via the waveguide ports (or is dissipated in the structure due to Ohmic losses), the scattering parameters are obtained by the relationship between the Fourier transformed excitation and response signals. This approach leads to long transient iterations as resonant structures have large quality factors and therefore large time constants. Alternatively, frequency domain approaches use a formulation of Maxwell's equations in which the system is a priori in a steady state. For every discrete frequency sample, on which the S-matrix has to be evaluated, a complex linear system of equations has to be solved. Since large quality factors correspond to sharp peaks in the frequency-dependent scattering spectra, many S-matrices on discrete frequency nodes have to be calculated in order to sample the continuous spectra in an accurate and reasonable manner.
In this work these challenges are solved by the application of the CST MICROWAVE STUDIO® Resonant Fast S-Parameter Solver, which is based on a model order reduction (MOR) technique [32]. Utilizing a hexahedral discretization of the scattering objects (see third column of Table II for number of mesh cells used for each object) a coupled ordinary differential equation system is established, whose order is then reduced by a MOR algorithm. Finally, the frequency domain transfer function of the reduced system is evaluated on N s ¼ 10 001 discrete   Table IV), whereas at the coaxial ports one waveguide mode (the TEM mode) is accounted. Therefore, the scattering objects have ten terminals per beam pipe port and one terminal per coaxial port. All scattering objects are assumed to be lossless as at least the cavities are in a superconducting state. Figure 5 displays three example transmission plots obtained using the CST MICROWAVE STUDIO® Resonant Fast S-Parameter Module. The blue curve shows the transmission through the cavity (object number 2) from the TM 01 port mode located at the left end to the TM 01 port mode located at the right end of the cavity beam pipes. The nine modes of the fundamental band are observable in the interval 3.738-3.9 GHz. The resonances showing up at a very low transmission level in the interval 6.539-6.75 GHz are assumed to be quadrupole modes (refer to eigenmode spectra of the third harmonic cavity listed in [11]) which couple in a nonphysical manner to the TM 01 monopole port modes. This coupling is a result of artificially breaking the rotational symmetry of the cavity by its hexahedral discretization. The band above 7 GHz is the second monopole band of the cavity. The red curve in Fig. 5 displays the transmission from the coaxial port of the HOM coupler (one-leg design without input coupler) to the TM 01 port mode in the waveguide port attached to the cavity, whereas the black curve plots this transmission for the twoleg-design HOM coupler. The notch effect of both HOM filter structures can be clearly seen at f π ¼ 3.9 GHz. In all plots it is observable that the transmission coefficients transcend 0 dB below the cutoff frequency of the TM 01 port mode f co;TM 01 ¼ 5.7371 GHz. This does not violate energy conserving properties of the passive and lossless scattering structures because scattering parameters are related to reactive energy below cutoff frequencies such that no effective energy propagates through the structure.

B. Modal convergence study of CSC
Before assembling the CSC segments to the full ACC39 string, it should be validated for the specific geometry of the device under test that the coupling scheme itself leads to reasonable results and that the number of 2D port modes which are used for the modal expansion at the decomposition planes is sufficient for the given geometry and the frequency interval of interest. Therefore, a third harmonic cavity with two identical HOM couplers on both sides (one-leg design without input couplers) without any coupler rotations is discretized in its entirety using CST FIG. 5. Three examples of numerically computed transmissions. Blue: Transmission from left to right TM 01 port mode of third harmonic cavity (CSC segment 2). Red: Transmission of one-leg HOM coupler (CSC segment 1) from coaxial HOM port (TEM mode) to the beam pipe (TM 01 mode) next to the cavity. Black: Transmission of two-leg HOM coupler (CSC segment 6) from coaxial HOM port (TEM mode) to the beam pipe (TM 01 mode) next to the cavity. MICROWAVE STUDIO®. In this benchmark example both beam pipes are short circuited with perfect electric conducting walls to obtain a network with two terminals (the TEM port modes at the HOM ports). Subsequently, its scattering parameters are computed by means of the Resonant Fast S-Parameter Solver. For the sake of comparison, the S-matrix of the described structure is also determined by the CSC scheme based on the previously computed S-matrices of the individual elements and the analytically known reflection factors of short circuits and waveguides with constant cross section (refer to Appendix A). Figure 6 depicts the absolute value of the transmission factor of the test structure from one HOM port to the other HOM port through the cavity. The black curve shows the transmission determined by means of full discretization of the structure and the Resonant Fast S-Parameter Solver. The green line plots the transmission obtained by the CSC scheme, where only one TE 11 port mode is employed for the 2D orthogonal field expansion at the decomposition planes. The red curve sketches the CSC-computed transmission with the first five 2D port modes used in the expansion (refer to Table IV). The dashed blue line depicts the result of the CSC concatenation utilizing ten 2D port modes.
It is observable that the restriction to one port mode is not sufficient to describe the scattering behavior of the structure as e.g. the other TE 11 polarization or the influence of the TM monopole modes in the cavity on the transmission is neglected. In contrast, the inclusion of all five port modes, which are able to propagate in the frequency interval of interest leads to a very reasonable approximation of the transmission spectra. The locations of resonances in the spectrum agree between the curves determined by the CSC concatenation with five modes and the full computation. Considering ten 2D port modes in the CSC coupling (dashed blue line) does not influence the shown transmission spectrum significantly. Consequently, only the five propagating port modes are considered in the following, because coupling of evanescent modes can be disregarded for the given setup. Therefore, at the beam pipes of each scattering object, five terminals are regarded.

C. Concatenation of elements using CSC
To obtain the scattering matrix of the entire module ACC39, the scattering matrices of the two cavity/coupler combinations (1-2-3 in Fig. 2(b) and 5-2-6, respectively) are determined in a first step by a CSC concatenation. The rotations of the HOM couplers by 115°are included in the coupling by means of rotation objects with analytically known scattering parameters. In a second step, the scattering matrices of the two cavity/coupler combinations are linked with the scattering matrices of the bellows according to the topology drawn in Fig. 2(b). In this second step, rotation matrices are employed again to model the rotation between the cavities with couplers (refer to Appendix A).
The total computational time for the concatenation is ≈20 min using a MATHEMATICA™ implementation of CSC, which runs on a Intel Xeon CPU X5550 @ 2.67 GHz. The final result of the entire coupling procedure is N s complexvalued scattering matrices S ̬ ðω n Þ ¼ S ̬ n ∈ C 22×22 , where 1 ≤ n ≤ N s . It is worth mentioning that the structure is treated as a network with 22 terminals because five circular waveguide modes at each end of the beam pipes are considered in addition to three TEM port modes of the HOM/input couplers for each of the four cavities.

III. MEASUREMENTS
The entire measurement campaign for taking the scattering parameters of ACC39 has been conducted during a FLASH shutdown in 2010. Two sets of measurements have been made: One for the S-parameters of the cavities together with the cables up to the HOM rack, and one for the cables.
A. Measurement of S-parameters of ACC39 via cables from injector hut Figure 7 shows the main setup of the performed measurements. In order to observe the entire setup including the cabling and for the reason of severe practical restrictions for experiments in the accelerator tunnel (e.g. damaging the fragile connections at the module or causing a vacuum leak), it was decided to conduct the measurements from the FLASH injector hut (an electronics room outside of the linac tunnel) and to compensate for the cables afterwards. On the left side in Fig. 7 the cryomodule with the third harmonic cavities in the FLASH tunnel is indicated. This module is connected with the HOM rack in the injector hut (right side) via eight LCF38-50 coaxial cables (middle) [33]. The HOM board is connected to a four channel Rohde und Schwarz ZVA8 vector network analyzer (VNA) via short coaxial cables with an electrical length L elec ≈ 75 cm. The VNA is controlled by a LABVIEW script running on a Macintosh notebook. The script runs the VNA such that the transmission and reflection spectra are scanned in an interval 3.5-8 GHz on N m ¼ 450 001 equidistant frequency sampling points (frequency step size Δf ¼ 10 kHz) using an intermediate frequency filter bandwidth of Δf if ¼ 1 kHz. These settings allow modes with large quality factors (Q meas;max > 10 5 ) to be resolved at a noise level of ≈ − 100 dB but also involve sweep times in the order of T sweep ≈ 30 min per spectrum. To reduce the total sweep time the reciprocity of the module is utilized and only 28 of the 56 transmission spectra (in addition to eight reflection spectra) are recorded. The described procedure leads to N m complex-valued scattering matricesMðω n Þ ¼M n ∈ C 8×8 , where 1 ≤ n ≤ N m . These matrices describe the measured transmission spectra of the module with connected cables (Table V provides details on the nomenclature used in the present treatise). Note that in comparison to S ̬ n , the matricesM n have only eight rows (and columns) as the scattering to the beam pipe and input couplers is not available for measurements with the VNA.

B. Measurement of cable S-parameters
In order to identify the influence of the eight LCF38-50 cables connecting the HOM ports of ACC39 to the rack board in the injector hut onM n , the scattering properties of the cables themselves have to be measured. As the cables are permanently installed in the FLASH hall, a "through" measurement with the VNA is not possible. Furthermore, changing e.g. bendings by unmounting the cables from the installation is in general possible and enables the through measurement but also changes the scattering properties of the cables. Nonetheless, the S-parameters can be determined based on the reflections measured from the injector hut with three different termination conditions and corresponding reflection factors Γ at the ends of the cables located in the FLASH tunnel: the cable end is (i) loaded with its wave impedance Z 0 ¼ 50 The defined termination conditions at the ends of the cables are realized by means of a Hewlett Packard calibration kit. Figure 8 sketches the measurement setup for the reflection measurements. This approach resembles the standard open-short-load calibration scheme, which is often used to calibrate a single-port network analyzer (see e.g. [34]). The reflections with the three different termination conditions are taken for all eight cables. Therefore, the measurement gives 24 reflection spectra, which are denoted by Γ k;l ðωÞ (termination condition 1), Γ k;o ðωÞ (termination condition 2), Γ k;s ðωÞ (termination condition 3), where k is the cable index and, k ¼ 1; 2; …; 8 [refer to Fig. 2(a)].  Assuming the cables are in single mode operation (quasi-TEM as higher order modes are only able to propagate at frequencies higher than 13.5 GHz) and to be reciprocal, their scattering matrices are symmetric and expressible by The unknown frequency-dependent and complex coefficients of this matrix are related to the measured reflection spectra via (see Appendix B) g k;11 ðωÞ ¼ Γ k;l ðωÞ; It is observable that the cable transmission is involved in terms of its square: g 2 k;12 ðωÞ. The root extraction of (6) introduces a sign multiplicity for the transmission coefficient: Consequently, the transmission spectra of the cables cannot be uniquely determined from the measured data. Nonetheless, advantage can be taken from the fact that the devices under test are cables whose electromagnetic behavior is well described by transmission line theory. To design a phenomenological sign decision routine, the scattering parameters of reflection-free model cables are considered: where Here j is the imaginary unit, ζ 1;k and ζ 2;k are constants modeling the frequency-dependent damping of the cables due to the skin effect and dielectric losses, c 0 is the speed of light in vacuum, and L elec;k is the electrical length. All quantities refer to the kth cable. The mechanical length of the kth cable is given by L k ¼ L elec;k = ffiffiffiffi ε r p , where ε r is the relative dielectric constant of the cable insulator. Figure 9 shows the transmission phase of the cable connecting the HOM coupler C1H2 with the HOM rack (cable index k ¼ 1) as an example. The red curve is obtained by (8) using the positive sign, whereas the blue curve is computed utilizing the negative sign. From the figure it is observable that there is no phase jitter, but that there are artificial phase jumps at AE90°. The black curve is determined by (9), where the electrical length is chosen such that the slope of the curve fits to the slope of the measured curves: L elec;1 ≈ 44.29 m. Figure 9 depicts that there is a (in this interval almost constant) phase shift in the transmission between the model cable and the measured cable, which may be caused by dispersive material properties. Figure 9 shows that interval-wise either the positive sign or the negative sign is correct. Therefore, the sign in (8) is chosen by the case differentiation, The blue curve in Fig. 10 shows the measured absolute value of the cable transmission of the cable k ¼ 1 and the corresponding model cable [refer to (9)]. The constants ζ 1;1 and ζ 2;1 are obtained by a least square fit of the measured data. Both curves show an overall slope of ≈ − 6 dB=4.5 Ghz which is caused by the skin effect and dielectric losses. Moreover, the absolute value of the transmission shows two predominant ripples. One ripple has a bandwidth of Δf ripple;1 ≈ 189.2 MHz. This bandwidth corresponds to an (electrical) distance between cable connectors of ΔL ripple;1 ≈ 82 cm. It is assumed that this ripple is caused by the measuring cables, which connect the VNA with the HOM rack. The other bandwidth of the ripple is Δf ripple;2 ≈ 3.4 MHz, which is related to an electrical length of ΔL ripple;2 ≈ 44 m. This length is likely to correspond to the total electrical length of the cable. It is remarked that the remaining seven cables show in principle similar scattering properties apart from cable k ¼ 3 [C2H1, see Fig. 2(a)]. This cable shows an impurity at an electrical distance of L HR ≈ 33 m seen from the HOM rack and an electrical distance of L TU ≈ 12 m seen from the FLASH tunnel. Based on the slope of the cable transmission phase the total length of the cable amounts to L elec;3 ≈ 47 m. This impurity is assumed to be a cable connector, a sharp bent or another cause of partial reflection.
To eradicate the influence of the eight cables, whose scattering properties G k ðωÞ are known based on the previously described measurements, a de-embedding method has to be applied. In this context it is generally not sufficient to use de-embedding algorithms for networks with two terminals which are commonly known and widely discussed in standard literature on rf measurements as the device under test is a network with eight ports and eight terminals (one port mode per HOM port). For this purpose a multiport de-embedding routine has been derived (see Appendix C). Although the theoretical validation of the de-embedding scheme is successful, the de-embedded scattering parameters show a strong superimposed ripple, which presumably can be attributed to a large error in g k;22 ðωÞ [refer to (7)] due to the large total losses in the cables.
Thus, the comparison between measured and simulated S-parameters is performed without de-embedding. As the best alternative in practice, eight reflection-free model cables are concatenated to the simulated scattering matrix of the entire module. The properties of each model cable (damping and phase) are chosen in accordance to the measured cable properties.

IV. COMPARISON BETWEEN SIMULATION AND MEASUREMENT
This section presents the comparison between measurements and simulations. Figures 11(a) through Fig. 11(d) show the measured (blue) and simulated (red) absolute value of the transmission spectrum from port C1H2 (k ¼ 1) to port C1H1 (k ¼ 2), from port C2H1 (k ¼ 3) to port C2H2 (k ¼ 4), from port C3H2 (k ¼ 5) to port C3H1 (k ¼ 6), and from port C4H1 (k ¼ 7) to port C4H2 (k ¼ 8) (including cables). All plots have in common that the noise floor of the measured transmission spectra is observable at ≈ − 100 dB. Moreover, the nine sharp peaks of the fundamental TM monopole bands are visible in the intervals from 3.72 to 3.92 GHz and the first two TE dipole bands are in the intervals from 4.25 to 5.50 GHz. In the range from 5.50 to 6.55 GHz stopbands are located. Based on the eigenmode computations presented in [11], the peaks in the intervals 6.55 to 6.75 GHz are assumed to belong to the quadrupole bands. The plots given in Figs. 12(a), 12(c), 12(e), and 12(g) show the magnification of the transmission peaks in the fundamental bands in the individual cavities. The simulated transmission spectra allow for identifying all nine peaks of the fundamental band. In contrast, the measured peaks corresponding to the π modes are not observable in Figs. 12(a), 12(e), and 12(g). It is assumed that these peaks are hidden in the noise floor as a result of the weak coupling of the π modes to the HOM couplers due to the dedicated notch effect. Moreover, the measured data depicted in Figs. 12(a) and 12(g) do not show peaks corresponding to the eighth and the ninth mode of the band. The bands of all spectra simulated are narrower than the measured ones and the peaks have slightly different resonant frequencies. These deviations are attributed to different cell-to-cell coupling factors arising from geometrical imperfections of the cavities accommodated in ACC39. Figures 12(b), 12(d), 12(f), and 12(h) depict the Q-factors of the fundamental bands obtained by the system identification routine [27]. Several tests have shown that this algorithm allows for the robust identification of dynamical system parameters based on frequency domain responses sampled on discrete frequency nodes. The quality factors in Fig. 12 indicate the simulations and experimental results agree to within an order of magnitude. Furthermore, the quality factors are in the same order as the quality factors for a single third harmonic cavity with couplers presented in [9] (page 19, Table 3). The measured quality factors reflect external (energy losses via waveguide ports) and intrinsic losses (energy losses due to finite surface resistivity), whereas in the simulated Q-factors by assumption only external losses are considered. However, FIG. 11. Comparison between measured (blue) and simulated (red) absolute value of the HOM coupler to HOM coupler transmission through each of the four cavities embedded in the chain. The indices of the scattering parameters m jk (see ordinate labeling) refer to the port nomenclature presented in Fig. 2(a). All plots show basically similar characteristics: The peaks of the fundamental TM monopole bands are visible in the interval from 3.72 to 3.92 GHz. The first two TE dipole bands are shown in the region from 4.25 to 5.50 GHz. In the interval from 5.50 to 6.55 GHz a stopband is located. The sharp peaks in the interval 6.55 to 6.75 GHz are assumed to belong to the quadrupole band. In contrast to the simulated data, the measured data shows a noise floor at −100 dB.
FIG. 12. Magnification of the transmission spectra corresponding to the fundamental TM bands of all four cavities in the ACC39 string (left-hand side) and the resulting quality factors of the peaks computed by means of [27] (right-hand side). Blue curves and blue plusses represent measured data, whereas red curves and red crosses show the data obtained by simulation. The indices of the scattering parameters m jk (see ordinate labeling) refer to the port nomenclature presented in Fig. 2(a). FIG. 13. Magnification of the transmission spectra corresponding to the quadrupole bands of all four cavities in the ACC39 string (left-hand side) and the resulting quality factors of the peaks computed by means of [27] (right-hand side). Blue curves and blue plusses represent measured data, whereas red curves and red crosses show the data obtained by simulation. The indices of the scattering parameters m jk (see ordinate labeling) refer to the port nomenclature presented in Fig. 2(a). the intrinsic losses are expected to be orders of magnitude smaller than the external ones. Therefore, Figs. 12(b), 12(d), 12(f), and 12(h) do not show the trend that quality factors of peaksarised by thesimulationarelargerbecause onlyoneloss mechanism is considered. Figures 13(a), 13(c), 13(e), and 13(g) depict the magnification of the peaks (refer to Fig. 11) related to the quadrupole bands. Measured (blue) as well as simulated (red) transmission spectra show narrowly spaced peaks. These peaks are assumed to be modes with almost the same field distribution, but rotated by 45°on the beam axis. Breaking the rotational symmetry by HOM and input couplers cancels the degeneration of all nonmonopole modes. Therefore they have slightly different resonance frequencies. Figures 13(b), 13(d), 13(f), and 13(h) show the quality factors corresponding to the quadrupole bands of cavities 1-4. The agreement between measured and simulated Q-factors is reasonable. In particular, peaks of quadrupole modes with a resonant frequency of ≈6.65 GHz agree very well for cavity 2 and cavity 3. Moreover, these peaks are missing in cavity 1 and cavity 4. It is worth mentioning that the order of magnitude of the Q-factors corresponds to the order magnitude of Q-factors for a single cavity with couplers presented in [9] (page 21, Table 6). Figure 14 depicts the transmission via cavity 1 and cavity 2, i.e. from C1H2 (k ¼ 1) to C2H2 (k ¼ 4). In comparison to the transmissions through single cavities in the chain, the fundamental band is not visible in the measured and simulated spectrum. As the cutoff frequency of the fundamental waveguide mode in the beam pipe is larger than the resonant frequencies of modes in the fundamental band, the fundamental band is confined to the individual cavities. Figure 14 conveys that higher order modes (such as the first and second dipole band, the first quadrupole band or the second monopole band) are coupled across the cavities via the beam pipes and bellows (intercavity modes). Figure 15 shows the transmission via the entire cavity chain. Similar as Fig. 14 peaks of the fundamental band are not in the spectrum, but peaks corresponding to HOMs coupling across the chain are observable. In contrast to the measured curve (blue), the simulated curve (red) shows resonances attributed to quadrupole modes.
All diagrams presented here show that the computer model reflects the principal physical properties of the ACC39 string. For instance, the locations of the bands FIG. 14. Absolute value of the transmission spectra via cavity 1 and cavity 2 (i.e. transmission from coupler C1H2 to C2H2). Blue shows the measured spectrum and red the simulated. The fundamental band is not observable in the spectra because the frequencies of the respective peaks are below the fundamental cutoff frequency f co;TE 11 of the beam pipe connecting the adjacent cavities via the bellows.
FIG. 15. Absolute value of the transmission spectra via the entire cavity chain (i.e. transmission from coupler C1H2 to C4H2). In accordance to Fig. 14 the fundamental band is also not observable in the spectra because the frequencies of the respective peaks are below the fundamental cutoff frequency f co;TE 11 of the beam pipe connecting the adjacent cavities via the bellows. agree in a very good manner. Moreover, the order of magnitude of the Q-factors of distinct peaks in the e.g. fundamental and quadrupole bands coincides remarkably well. However, the agreement between measurement and simulation is not perfect. The observed differences between measurement and simulation are attributed to measurement errors and several effects which have yet to be incorporated in the computer model. The following main effects can also effect the simulation results and have not been explicitly taken into account: (i) deviations of the cavities from their ideal shape due to fabrication tolerances, different mechanical histories [35], tuning and cool-down processes; (ii) frequency-dependent reflections from the HOM and input couplers due to the connected waveguide feeding and absorbing system (nonideal behavior of the cables connecting the module with the HOM board); (iii) the parameters of the cables within the module were not well characterized; (iv) interactions of the ACC39 cavity string with other devices in the beam line, e.g. the bunch compressor (downstream) or ACC1 (upstream) (refer to Fig. 1). Although not presented in this article, the transmission coefficient from HOM coupler C1H2 at ACC39 to C8H2 at ACC1 (HOM coupler next to module ACC39) was taken. The spectrum shows that coupling between ACC1 and ACC39 takes place above f co;TE 11 . Consequently, the presented measured properties of ACC39 also depend on e.g. ACC1.

V. CONCLUSION AND OUTLOOK
The current article presents the entire work flow needed to compare measured and simulated scattering parameters for a large and complex structure, which is actually embedded in a linear particle accelerator. The simulations and the measurements are described in detail. Challenges arising during the simulation process (determination of S-parameters of highly resonant and long structures) and during the measurements (e.g. accounting for cabling) are discussed. The measurement of the S-parameters via the cables, which connect the HOM rack with ACC39 was convenient on the one side, as reconnecting in the confined FLASH tunnel was avoided. However, de-embedding of these eight cables does not lead to reasonable results in practice. This underlines the importance of using short cables with weak damping to connect the VNA with the device under test and future measurements will aim at minimizing these.
The comparison between measurement and simulation indicates remarkably good agreement. The differences in the scattering curves are attributed to effects disregarded in the model. In addition, the field profiles within the cavities can also be computed. This contrasts to experimental measurements of the field profiles, such as "bead pulling" [36] which are considerably time consuming.
Further simulations of the electromagnetic field are in progress. One area is concerned with beam excitation and its influence on HOM port signals. Another facet of the study is concerned with the influence of the geometrical variations on HOM scattering spectra and beam-excited signals to ports.

ACKNOWLEDGMENTS
The authors wish to thank H. Ewald from the Universität Rostock for kindly providing the four channel Rohde und Schwarz ZVA8 vector network analyzer for the measurements described above. Further, they are grateful to W.-D.
Möller and E. Vogel The quantities a ðmÞ and b ðmÞ refer to the mth considered port mode. The properties of the port modes are listed in Table IV.

Two port networks
In contrast to the short circuit network the waveguides with constant cross section and the rotation objects have two ports with five port modes each. Therefore, they are treated as network with ten terminals. Their scattering matrices can be written in terms of block matrices as where 0 ∈ C 5×5 are the blocks corresponding to the reflections and Λ ∈ C 5×5 are the blocks accounting for the transmissions. In the equation a p collects all incident wave amplitudes and b p all scattered wave amplitudes at port p, i.e., a p ¼ ða pð1Þ a pð2Þ Á Á Á a pðmÞ Á Á Á a pð5Þ Þ T ; (A6) The quantities a pðmÞ and b pðmÞ refer to the mth port mode at port p.

a. Constant cross section waveguides
For a waveguide with constant cross section, the transmission block [refer to (A5)] is given by Here L is the length of the waveguide and f co;m the cutoff frequency of the mth port mode (again refer to Table IV).

b. Rotations
The transmission block of the rotation is expressed by where φ specifies the rotation angle [37].

APPENDIX B: DERIVATION OF CABLE S-PARAMETERS BASED ON THEIR REFLECTIONS WITH DIFFERENT TERMINATION CONDITIONS
Despite the fact that the theory of open-short-load measurements is well known (see e.g. [34]), it is recapitulated as a reminder and in order to establish a consistent nomenclature throughout this paper.
To determine the scattering parameters of the cables, which connect the HOM rack with the module ACC39, the cable reflection coefficients seen from the HOM rack are measured for three different termination conditions (refer to Sec. III B). Figure 8 depicts the network equivalent of the performed measurement.
It is well known from the theory of scattering parameters that the signals scattered into the ports of the cable are superpositions of the incident signals multiplied with the respective scattering coefficients. For reciprocal scattering objects this reads as and reordering (B9) for the cable reflection factor seen from the tunnel delivers which can be combined with (B11) to obtain an expression for the cable reflection factor seen from the tunnel based on the reflection factors seen from the HOM rack with the three different termination conditions: The presented scheme is successfully validated by means of the following procedure: (i) generation of a complex valued symmetric scattering matrix G rd ∈ C 2×2 filled with random numbers; (ii) CSC concatenation of terminations with the reflection factors Γ ¼ f0; 1; −1g at port 2 of the structure described by G rd (this results in three reflection coefficients Γ l , Γ o and Γ s ); (iii) computation of the coefficients of g rd;11 , g 2 rd;12 and g rd; 22 based on (B8), (B13), and (B14); and (iv) comparison of these coefficients with the coefficients of the symmetric scattering matrix G rd .

APPENDIX C: DERIVATION OF MULTIPORT DE-EMBEDDING FORMULA
The idea of the presented multiport de-embedding formula basically follows [38]. It is presented in this paper, to have a unique nomenclature. To derive the de-embedding formula, the network equivalent depicted in Fig. 7 is considered. The scattering properties of the entire network are available as well as the properties of the eight cables. On the left side the module ACC39 is drawn with eight ports. The corresponding amplitudes of incident and scattered waves are denoted by aðωÞ and bðωÞ, where As the cables are two port networks, the port index satisfies 1 ≤ l ≤ 2. The wave amplitudes scattered in the cable ports at the HOM rack can be expressed via