Design and performance simulations of the bunch compressor for the Advanced Photon Source Low-Energy Undulator Test Line free-electron laser

A magnetic bunch compressor was designed and commissioned to provide higher peak current for the Advanced Photon Source's Low-Energy Undulator Test Line free-electron laser [S. V. Milton et al., Phys. Rev. Lett. 85, 988 (2000)]. Of great concern is limiting emittance growth due to coherent synchrotron radiation. Tolerances must also be carefully evaluated to find stable operating conditions and ensure that the system can meet operational goals. Automated matching and tolerance simulations allowed consideration of numerous configurations, pinpointing those with reduced error sensitivity. Simulations indicate significant emittance growth up to 600 A peak current, for which the normalized emittance will increase from 5 to about $8.5\ensuremath{\mu}\mathrm{m}$. The simulations also provide predictions of emittance variation with chicane parameters and precompressor linac phase, which we hope to verify experimentally.


I. INTRODUCTION
The Advanced Photon Source's (APS) bunch compressor design is an outgrowth of studies [1] by Emma and Bharadwaj of the Stanford Linear Accelerator Center (SLAC). They explored a number of designs, including symmetric and asymmetric four-dipole chicanes, with the goal of finding a design that minimized coherent synchrotron radiation (CSR)-induced emittance growth.
If all other things are equal, emittance growth in a dipole is lessened if the dipole is made weaker. In any chicane, one requires a certain R 56 for the desired compression with a given energy chirp. A symmetric four-dipole chicane achieves this R 56 using four dipoles of equal strength. However, most of the emittance growth in such a chicane occurs in the last dipole, because that is where the bunch is shortest. If this dipole can be made weaker, the emittance growth can be reduced. This is the idea behind the asymmetric chicane: the third and fourth dipoles are weaker than the first and second dipoles. However, there is a potential problem: such an asymmetric chicane requires a longer drift space between the third and fourth dipole than does a symmetric chicane with the same R 56 . Hence, if CSR effects in drift spaces are dominant, the asymmetric chicane may be worse.
In designing the system, we investigated a large number of configurations with various values of R 56 , asymmetry, and final current. For each configuration, detailed longitudinal and transverse matching was performed, followed by tracking with CSR and wakefields. Then, sensitivity analysis was performed for all configurations, followed by jitter simulations for the least sensitive configurations. We [2] eventually elected to build a chicane with variable R 56 in order to have more tuning flexibility and to be better able to explore the physics of CSR. Table I lists basic parameters of the bunch compressor.
This work relied on ELEGANT [3], a 6D code with a fast simulation of CSR effects, plus longitudinal and transverse wakefields. ELEGANT also performs optimization of actual tracking results, such as bunch length, energy spread, and emittance.
Simulation of the linac uses the RFCA element, a matrix-based rf cavity element with exact phase dependence. Our linac has quadrupoles around the accelerating structures. In order to model these quadrupoles, the linac sections were split into pieces. Within the length of the quadrupole, each RFCA element was the length of a single S-band cell, with zero-length, second-order quadrupole elements sandwiched in between.
A Green's function technique is used to model wakefields, using a tabulation of the SLAC structure wake functions provided by Emma [1]. To reduce running time, one longitudinal wake element is used per 3 m section, which is a good approximation for relativistic particles. For transverse wakes, we used one wake element per rf cavity element (about 20 per section).
The CSR model [4] used by ELEGANT is based on an equation developed by Saldin, Schneidmiller, and Yurkov [5] for the energy change within an arbitrary line charge distribution as a function of the position in the bunch and in a bending magnet. For the present simulations, dipoles are split into 100 pieces, each of which is integrated using a canonical integrator [6]. After each piece, the bunch longitudinal distribution is recomputed and used in Saldin's equation to compute the CSR "wake." An energy kick is then applied to each macroparticle based on the wake at its location. Effects of changes in the longitudinal distribution within a dipole are thus included; however, retardation effects are not included. After each slice, the longitudinal distribution is computed based on arrival times of particles at the end of the slice, which is essentially the instantaneous longitudinal distribution. However, in reality, the effect on each particle at any time depends on where the other particles were in the past, not where those particles are at that instant.
A second limitation of this method is that, because it is based on a one-dimensional line-charge distribution, the variation in the CSR wake with transverse position in the bunch is not included.
CSR in drift spaces is included in the simulations by propagating the terminal CSR wake in each bend through the drifts with the beam. The method assumes that the wake propagates through the downstream drifts without changing its longitudinal shape, but allows for variation in overall intensity. This model is believed to be plausible based on more detailed calculations by Dohlus and Limberg (see [7], in particular, Fig. 3). They show an example in which the CSR wake in a drift space following a dipole is very similar in shape to the wake at the exit of the dipole, but with exponentially decreasing intensity.
Several methods are provided in the code to model the variation in intensity in the drift space. The first of these assumes that the intensity decays exponentially with an attenuation length given by the "overtaking length" [7]. The overtaking length is the distance required for formation of the wake, and one might expect that it is also comparable to the distance required for decay of the wake, although this has not been proven.
The second method, used to generate all results presented in this paper, uses Eqs. 53 and 54 from Saldin, Schneidmiller, and Yurkov [5], which give the normalized energy gain seen by a particle inside a uniform bunch. These equations are used only to obtain the dependence of the strength of the CSR wake on distance from the end of the dipole. They include contributions from both inside and upstream of the dipole. For purposes of the simulations, we average these functions over the square bunch, where the length of this square bunch is taken equal to the interval containing the central 68% of the simulation particles (which corresponds to 2s for a Gaussian while being immune to tails for non-Gaussian bunches). As reported in [4], these two models give comparable results.

II. MATCHING
Longitudinal and transverse matching has the goal of providing configurations for the 300 and 600 A Low-Energy Undulator Test Line (LEUTL) operating points [8]. These operating points are defined in Table II. The starting point for the simulations is macroparticle data generated [9] with PARMELA, giving the 6D distribution after the photoinjector (PI), as shown in Fig. 1.
Longitudinal matching involves adjusting the phase and voltage of L2 to obtain the desired current and energy after the chicane. Then, L4 and L5 are adjusted to minimize the energy spread and obtain the desired final energy. Because of complex effects like wakefields, rf curvature, and nonlinear transport through the chicane, one cannot optimize this system easily except by tracking particles. In the present case, ELEGANT was used to perform this optimization by tracking the beam from the photoinjector as simulated with PARMELA. Figure 2 shows the longitudinal phase space at the end of the linac for the 300 A case with R 56 265 mm, which exhibits a current spike of nearly 1200 A. The matching ignores this spike (which is shorter than a slippage length for 530 nm) because of the way "current" is defined, namely, I 80 0.8‫ء‬Q total Dt 80 , where Q total is the total charge in the beam and Dt 80 is the length in time of the central 80% of the beam. The value of 80% was used because this includes most of the particles but typically excludes highcurrent spikes that tend to occur at the head and tail. Also, when we refer to bunch length, we mean Dt 80 .
Following longitudinal matching, transverse matching is done for each configuration. Initial Twiss parameters are obtained from the rms properties of the PARMELA beam. Starting values for the quadrupoles were obtained from matching "by hand" for one configuration. Then, for each configuration, four sequential ELEGANT runs work the beta functions down the linac. The most important constraints are those that maintain small beta functions in the linac (for transverse wakefield control), small horizontal beta in dipole B4 (to reduce CSR effects), and matching for the emittance measurement sections. Figure 3 shows sample Twiss parameters in the chicane region. Emittance growth due to CSR is very sensitive to the horizontal beam divergence at the exit of B4 (which is located at s 22.4 m in Fig. 3). To see why, consider an ensemble of N particles affected by CSR in a very short slice of a dipole. Let x i , x 0 i , and d i represent the position, slope, and fractional momentum deviation, respectively, of the ith particle. Assume that at the start of the slice a CSR-induced momentum modulation Dd͑s͒ is applied to the bunch as a function of s, the longitudinal position. For a very short slice, the dispersion itself is negligible (to second order in the bending angle), while the slope of the dispersion is D 0 ഠ u. The particle slopes are transformed according to x 0 i ! x 0 i 1 uDd͑s͒. Assuming for simplicity ͗xx 0 ͘ 0, the rms geometric emittance, e, increases by a factor p 1 1 u 2 ͗x 2 ͘ ͗Dd 2 ͘͞e 2 , which is minimized by minimizing the rms beam size, i.e., by maximizing the rms beam divergence. Roughly speaking, the divergence due to CSR is added in quadrature with the existing beam divergence. Indeed, if one assumes ͗xx 0 ͘ 0, the emittance after the dipole slice is simply p ͗x 2 ͘ ͑͗x 0 2 ͘ 1 u 2 ͗Dd 2 ͒͘. Hence, if the beam divergence can be made large at the location where the energy kicks are applied, the effect on the emittance should be reduced. In order to achieve this result, the horizontal beta function at the exit of B4 was constrained to 0.8 m. This turned out to be a practical value that could be maintained across all configurations, but is not the minimum value possible for all configurations.
The matching is highly automated, so that only the desired beam current and energy need to be specified. Evaluation of tolerances and randomized simulations are also automated using scripts that take data from the corresponding matching runs. Transfer of data between simulation stages is handled using self-describing data set files and scripts [10], thus reducing errors and increasing the number of configurations that can be examined. Scripts are used to collate the results of an arbitrary number of simulations, provide summary plots that indicate the overall success of matching, emittance growth, etc., and produce useful information such as power supply specifications. A distributed queue [11] utilizing 50 workstations is used to run the simulations. Figure 4 shows emittance versus R 56 for the symmetric ͑A 1͒ and asymmetric ͑A 2͒ cases at 300 and 600 A. For each set of points, the final value of I 80 is constant, while R 56 is varied. The phase of L2 is varied in order to provide the necessary energy chirp to achieve the desired value of I 80 for each R 56 . For 300 A, the symmetric and asymmetric cases are very similar. For 600 A, the difference is 10% or more, with an advantage predicted for the asymmetric case. This difference should be measurable provided experimental conditions can be suitably controlled. One surprise in Fig. 4 is that the emittance does not uniformly increase as jR 56 j increases, even though ELEGANT shows the expected monotonic increase (due to CSR) versus bending angle for a single dipole with a constant input beam distribution. This is apparently due to variation in the compressed bunch distribution between cases with the same "current" (i.e., I 80 ) but different R 56 . Figure 2 shows an example of the longitudinal distribution at the end of the linac. The high-current spike at the head of the bunch is always present, having its origin in the details of the momentum distribution from the photoinjector. However, the severity of this high-current spike varies with the chicane configuration, even when I 80 is the same. For the 600 A case with the symmetric chicane, these leading-current spikes are higher for smaller jR 56 j than for larger jR 56 j, leading to a larger and more rapidly changing CSR wake, which in turn leads to larger emittance growth. The effect is even more pronounced in the 1200 A cases (not shown). Insertion of the scraper between B2 and B3 to remove the low-energy part of the beam can reduce the height and width of the current spike, resulting in lower emittance. Unfortunately, this also reduces the current in the rest of the bunch considerably.

III. CSR EFFECTS
Earlier simulations showed that emittance trends can be changed significantly by inconsistent values of the horizontal beta function at the exit of B4. As a result, the matching used here has a tight constraint on this value. It will also be important in our experiments to verify that this condition is satisfied in order to make comparisons with simulations.
All of these subtleties will make for difficult interpretation of experiments in which R 56 is varied. However, because compression to different currents for fixed R 56 involves only adjustment of the rf phases and voltages, comparison of the emittance growth for different amounts of compression should be more straightforward. R 56 265 mm. (The charge per bunch is lower than that used in the design and in the simulations shown in Fig. 4, due to limitations of the photoinjector.) Although an emittance peak similar to that predicted by the simulations was seen in this experiment, detailed comparisons with experiment are omitted here as this is beyond the scope of the present paper and insufficient data were taken to fully characterize the incoming beam. Careful matching of the simulated and experimental incoming longitudinal phase space is required to make a valid comparison [12], which explains the difference between comments in [4] and later results in [12] (which reports on a subsequent experiment to the one mentioned here).
The second, smaller peak in the overcompression region (near 57 ± ) corresponds to full compression at the exit of the second dipole. The emittance growth at this phase results almost entirely from the effects of CSR in the drift space following this dipole. Energy spread added to the beam at this location is turned into emittance growth by the dispersive effect of the third and fourth dipoles. Indications of a secondary emittance peak at 8 ± to 10 ± beyond the primary peak were seen in experiments at APS in December 2000 and subsequent experiments. However, we do not consider this feature to have been definitively verified in experiments at this time.

IV. TOLERANCE DETERMINATION
Tolerances are driven by the free-electron laser (FEL) gain length, trajectory, and wavelength stability requirements [8]. These are summarized in Table III. The 10% rms gain length variation limit is easy to use in ELEGANT as it computes FEL performance directly using Xie's parametrization [13]. Beam trajectory limits are included separately as they are not incorporated into Xie's formula. The 1 nm rms wavelength variation limit is a challenging goal at 530 nm as it puts a 0.1% limit on energy variation.
The analysis begins by running single-parameter "sweeps" to assess the effect on the constrained quantities (gain length, trajectory, and wavelength) of single accelerator parameters (e.g., rf phase). Sweeps included rf phase and voltage, photoinjector timing, charge, and energy, and chicane dipole strength. From these sweeps, a script determines the limit on each parameter change due to the various specifications. Sweeps were performed  for a large number of values of R 56 , for symmetric and asymmetric chicanes, and for the 300 and 600 A target currents. Once all sweeps are completed, one can assess the relative stability of the system for different configurations. One sees that configurations with the largest jR 56 j are least sensitive to difficult-to-control timing and phase errors. An example of this is shown in Fig. 6. These configurations tend to experience the most emittance degradation from CSR, but tend to yield the shortest gain length as they have the smallest energy spread (L2 being closer to crest). The limits, shown in Table IV, are larger for the 600 A case because the 1 nm wavelength constraint is easier at 120 nm than at 530 nm. Nine parameters are limited primarily by the wavelength constraint and four others by horizontal trajectory constraints. Hence, to determine the rms tolerance, one simply divides each sweep limit by p N, N being the number of parameters limited by a particular constraint. For the horizontal trajectory, N was doubled to eight to allocate half the budget to nonswept parameters (e.g., corrector magnets). Some of these phase and timing tolerances are beyond the state of the art.

V. RANDOMIZED SIMULATIONS
Randomized simulations were used to confirm the tolerances and examine errors not covered by the sweeps (e.g., corrector jitter, quadrupole jitter, and alignment). These were done for the most stable configurations (i.e., R 56 265 mm). Because some tolerances are beyond the state of the art, we used randomized simulations to determine the impact of "relaxed" tolerances, assuming these rms levels [14]: 1 ± rf phase jitter, 0.1% rf voltage jitter, 1 ps timing jitter, 5% charge jitter, and 2% PI energy jitter. Tables V and VI show the results, respectively, for the sweep-derived tolerance levels and the relaxed levels. The sweep-derived tolerance levels result in meeting the specifications for the FEL, while the relaxed levels, not surprisingly, do not. One surprise in the relaxed case is the large jitter in the vertical plane. This results from uncorrected nonlinear dispersion in a vertical dogleg between the linac and the LEUTL, a problem that can be readily remediated using two sextupoles [1]. Even with these sextupoles, the system will not meet the FEL specification for wavelength and gain length jitter.

VI. CONCLUSION
APS has designed and constructed a flexible bunch compressor with the twin goals of understanding CSR and providing an improved drive beam for the LEUTL FEL. Detailed simulations of the jitter sensitivity and likely stability of the drive beam have been performed, with the conclusion that performance beyond the state of the art is required to meet stability goals for wavelength and gain length. Highly automated simulation techniques have allowed us to explore large numbers of configurations and determine which are likely to yield the best performance. In particular, requirements on linac phase stability and photoinjector laser timing are very difficult.
Comparisons with experiments are planned to test the CSR predictions made with ELEGANT, including the variation of emittance with R 56 and precompressor phase.
Preliminary experimental results mentioned here indicate that some features of the experiments correspond with simulations. However, from the sensitivity and complexity of the simulation results it is clear that detailed comparison requires careful matching of simulation input to experimental conditions.