Optimization of free electron laser performance by dispersion-based beam-tilt correction

Free electron lasers in the X-ray regime require a good slice alignment along the electron bunch to achieve their best performance. A transverse beam slice shift reduces this alignment and spoils projected emittance and optics. Coherent synchrotron radiation specifically for over-compression and transverse wakefields are major contributors to this. In the case of the large-bandwidth operation, based on a strictly monotonic energy chirp of the bunch, the here introduced correction additionally enhances the spectral bandwidth of the FEL pulse. Well-defined leaking of dispersion at places with a strictly monotonic longitudinal phase space can compensate a beam tilt. This work presents a way to characterize the beam tilt as well as a method to correct for it within a linear accelerator with at least one high dispersive section with corrector magnets.


I. INTRODUCTION
X-ray free electron lasers (FEL) are novel and promising tools in science research. Their short, freely tunable, and highly intense photon pulses are used for spectroscopy, time-resolved femtochemistry [1] and medicine [2] to name a few applications. Typical parameters are a brightness of up to 10 34 photons= sec =mm 2 =mrad 2 =0.1%-bandwidth and wavelengths down to the Ångstrom level with pulse lengths in the femtosecond regime. Normally, the relative bandwidth of the photon energies is of the order of 10 −4 . For specific applications like powder diffraction, Bragg imaging, or single-shot absorption spectroscopy a much larger bandwidth is desirable to increase the chance of hitting resonances [3,4]. Even in case of known resonances a broadband signal can be desirable when the nano-crystals orientation is randomly distributed [5]. A special configuration of the future FEL SwissFEL [6] at PSI Switzerland will yield a bandwidth of up to 3% at 1 Å to fulfill these needs. In the following we refer to it as the large-bandwidth mode of SwissFEL.
The large spectral bandwidth is achieved by inducing a correlated energy chirp along the bunch. Because of this correlated energy spread the slices detune with respect to each other and lase at a different resonant wavelengths. This is based on the fact that the cooperation length [7] at photon wavelengths of 1 Å is much smaller than the bunch length.
In the normal operation mode of SwissFEL the strong longitudinal wakefields of the C-band (5.712 GHz) RF linacs remove the unwanted energy chirp used for bunch compression after the last bunch compressor. For the large-bandwidth mode an increase of the correlated energy spread is desired, therefore the longitudinal phase-space correlation is reversed (by means of overcompression in the last bunch compressor) to further increase it by the longitudinal wakefields adding up to the inverted chirp.
The electron bunches emit synchrotron radiation within the dipoles of the bunch compressor. If within the broad spectrum of the synchrotron radiation the wavelength of emitted light is larger than the bunch length, the photon emission starts to be coherent. Coherent synchrotron radiation (CSR) is by order of magnitudes stronger than its incoherent counterpart and leads to a longitudinally dependent energy loss along the bunch [8]. This yields an unclosed bunch dispersion η after the bunch compressor.
Furthermore the emitted light of the tail particles is captured by the head particles and delivers a transverse momentum transfer. Both effects lead to a growth of the projected emittance ε in the bending plane due to the slice misalignment along the bunch. This effect is particularly pronounced in the large-bandwidth mode because the bunch length within the chicane undergoes full compression and thus the coherent field of CSR is stronger.
As a second source of misalignment, strong transverse wakefields occur at places with small apertures such as X-band cavities [9], energy dechirper [10], and septum magnets. For SwissFEL, C-band cavities produce only marginal quantities of transverse wakefields despite their large number. This is mainly because they are acting upon a more rigid beam and due to the larger iris with respect to the X-band. After a brief description of SwissFEL, the FEL performance degradation and correction of such a misalignment will be discussed. We present simulation studies for SwissFEL as well as a proof of principle experiment at the SwissFEL Injector Test Facility (SITF) [11]. All simulation results presented here were done using Elegant for beam transport and Genesis 1.3 for FEL performance [12,13].

II. SWISSFEL
The future FEL light source SwissFEL is presently under construction at the Paul Scherrer Institute in Switzerland. SwissFEL is planned to start user operation in 2017 [6]. In the first phase only the hard X-ray undulator line Aramis with a photon wavelength from 1-7 Å will be built. A soft X-ray line Athos will be realized in 2018. There will be three key operation modes: the short-pulse mode (SP) operating at a charge of 10 pC and a rms photon pulse length of 1 μm, the standard 200 pC operation mode (LP) which will provide the maximum photon count, and the large-bandwidth mode (LBW), already described in the introduction. The latter is the most sensitive to CSR and thus profits most from a beam tilt correction. There are additional modes with charges between 10 and 200 pC, which are not fundamentally different in terms of beam tilt with respect to the listed modes. A schematic drawing of SwissFEL is shown in Fig. 1. The injector consists of a photo rf gun followed by an S-band (2.998 GHz) booster. A subsequent laser heater is installed to increase the uncorrelated energy spread, thus damping the micro-bunch instability [14]. It is then followed by a second S-band booster and a higher harmonic X-band (11.995 GHz) cavity to manipulate the longitudinal phase space to compensate for rf curvature and T 566 in the bunch compressors (BC). A first C-band linac brings the beam energy from 330 MeV up to 2.1 GeV followed by a second compression stage BC2. The subsequent two C-band linacs bring the beam up to the final energy of 5.8 GeV. There will be a switch-yard between these two linacs delivering bunches to the future soft X-ray undulator line Athos. Before entering the undulator line the beam passes through an additional chicane, which can be used for energy collimation and compression. For the large-bandwidth mode the R 56 of this final chicane is set to zero. The bunch compressors as well as the energy collimator have pairs of quadrupole, skew quadrupole, and sextupole magnets installed to correct for up to second-order beam tilts. These corrector magnets are placed where the transverse beam size is large and dominated by dispersion to reduce the required field strength, thereby reducing their impact on transverse beam optics.
For longitudinal diagnostics there are an S-band transverse deflector (streaking voltage of 4.9 MV) after the first bunch compressor and a C-band transverse deflector (70 MV) before the energy collimator to map longitudinal positions onto the nonbending plane. Alternatively, the aforementioned normal and skew quadrupoles within the bunch compressors map momentum in the horizontal and vertical planes, respectively [15]. Since the longitudinal phase space has a strictly monotonic correlation at these places both approaches are equivalent. A schematic drawing of the bunch compressors is given in Fig. 2.  The SITF resembles the injector of SwissFEL and is used for component testing as well as for beam studies. All experiments concerning the proposed correction were carried out at the SITF.

III. BEAM OPTICS FOR TILTED BEAMS
In this section we describe how to characterize and correct a given beam tilt in space and momentum. In this chapter x denotes the transverse direction, in space and momentum and z the longitudinal direction, all in the reference system of the electron. To describe the transverse centroid misalignment along the bunch we introduce the parameters μ and μ 0 which describe the x − z and the x 0 − z correlation, respectively. In the following x denotes either transverse plane. The Taylor approximation of μ is where n corresponds to the highest order to be considered. Misaligned beam parameters are denoted by a tilde. The constant term hz i i is needed to eliminate the centroid shift of the whole bunch for higher order terms, since I define hxi ¼ hxi ¼ 0. This description has the benefit of adjustable abstraction without losing analytical correctness for n → ∞.
We use the Twiss parameters to describe the beam in the transverse planes [16]. The statistical definition of the geometric transverse emittance ε is used with A. Impact on the emittance Following the statistical definition of ε given in Eq. (3) the emittance increases due to a beam tilt bỹ where the two terms are expressed through where α,β,γ are the Twiss parameters and Z ij is the reduced mean, defined as: A detailed derivation of these terms is given in Appendix A. Note that both terms (M n , M Ã n ), and thus the emittance increase, are optics independent since the beam tilt itself is influenced by the optics. For a linear longitudinal phasespace correlation, considering μ up to only first-order (n ¼ 1), M Ã vanishes and M simplifies to B. Impact on the optics The beam tilt parameter μ alters the projected beam distribution in momentum and space and thus the corresponding projected optics. If the distorted beam is matched by measuring the projected properties it will be mismatched at the slice level. As a consequence the FEL performance will be degraded [17].
A beam tilt transforms the optics in the following way: A detailed calculation is given in Appendix A and B. A sketch illustrating this behaviour is given in Fig. 3.

C. Effect of μ on the FEL performance
The beam tilt μ introduces transverse oscillations of the beam head and tail by the focusing in the undulator line.  10) and (11). Note that in this example β ¼β because μ ¼ 0.
This reduces the effective overlap between electron beam and FEL light, therefore effectively reducing the field seen by the electrons. The FEL gain length is increased and the saturation power reduced. More undulator modules are required to reach an overall lower saturation power.
A series of Genesis simulations demonstrate this behavior. The SwissFEL hard X-ray beamline Aramis was chosen as the reference model. The key parameters are listed in Table II. For the linear, horizontal beam tilt (μ x;1 ) we use values between 0 and 10. Due to the strong focusing by superimposed quadrupoles between the undulators the focusing is almost symmetric in both transverse planes. Therefore tilts in both planes degrade the FEL equivalently. To quantify the performance the far-field was chosen which is defined as on-axis intensity in far-field because it poses a clearer signal at start up and has less contributions from the higher transverse modes of the spontaneous radiation.
The bottom part of Fig. 4 shows the overall reduction of FEL performance along the undulator line with increasing μ x;1 . The top shows the power of the FEL beam along the bunch at the end of the undulator line. It is evident that the tails radiate less with increasing μ because the offsets are largest there. Beam tilts in either transverse plane reduce the FEL power for undulator lines with strong focusing due to the propagating phase advance. Since the broad spectral bandwidth of the large-bandwidth mode is based on the energy chirp, a reduction of lasing in the tails leads to a decrease in bandwidth. Due to the strong focusing in the undulator line the effect of μ y;1 is similar, as confirmed in simulations.

D. Control of μ
Static fields cannot act differently on electrons in a bunch, as long as the electrons have the same orbit. This changes in a dispersive section (η) with a strictly monotonic chirp along the bunch. The relation between x − z − δ is illustrated in Fig. 5. Manipulation of the dispersion (η) at places with an energy chirp influences the beam tilt. Residual beam tilts are corrected by creation of a beam tilt of same magnitude but opposite sign.
In the following we distinguish between lattice and beam dispersion and tilt. The lattice parameters only depend on the beam line and do not take into account any self interaction, they are denoted by a hat in this work. The beam parameters on the other hand are derived from the higher-order beam moments independent from their source.
For a linear longitudinal phase space and an energy chirp with jhz · δij ≫ 0, μ and η are directly linked by: where μ i and η i correspond to the Taylor approximation terms of the beam tilt and the dispersion, respectively.  The condition of a strictly monotonic chirp is fulfilled at the bunch compressors. The present energy correlation vanishes in the subsequent C-band linac due to longitudinal wakefields thereby unlinkingη and μ because hz · δi ≈ 0. Any applied correction will now be independent of magnetic multipoles as long as there is no energy correlation along the bunch. The leaking lattice dispersion is then independent from any corrected bunch dispersion. This means that the orbit of the bunch is still energy dependent but the phase space coverage in momentum and space is not.
Due to the large lattice dispersion at the correction locations weak corrector magnet strengths are sufficient to achieve the desired manipulation of η. This has the benefit of only marginally disturbing the optics. Therefore the thinlens approximation is valid but is not necessarily a required condition. In the following we consider only the fundamental order of the lattice dispersion e.g.,η i ¼ 0 for i > 1. This simplifies the following calculation further but is not required for the correction to work. In an area with all the mentioned prerequisites the change in beam tilt due to normal and skew quadrupole and sextupole magnets can be approximated by: Skew Quadrupole Δμ 0 where f=m corresponds to the focusing length of the corresponding lens in a bunch compressor with sufficiently high lattice dispersionη. Using Eqs. (13)- (15), μ x;1 , μ x;2 , and μ y;1 can be manipulated in a controlled way in momentum and space given the appropriate setup. For SwissFEL a dispersion of 15 cm at the position of the lens in the chicane is sufficient for the correction.
The corrections of μ 1 and μ 0 1 in each plane require a pair of normal and skew quadrupoles separated by sufficient phase advance (ideally ϕ ¼ ð2n þ 1Þπ=2, where n is a natural number). This allows a local correction at each bunch compressor.
Sextupole magnets in dispersive sections also introduce chromatic effects, which are used to minimize the residual slice mismatch along the bunch. Ideally one needs 4 sextupole magnets separated by adequate phase advance to do any correction on μ 2 while preserving the matching along the bunch. Since this is hard to fulfill within a single bunch compressor this specific correction is done adjusting the sextupoles of both bunch compressors simultaneously for a global compensation.
Alternative tilt correction schemes exist. LCLS uses 2 quadrupole magnets within its bunch compressor to compensate for lattice dispersion [18], therefore effectively also correcting for any beam tilts accumulated upstream of the measurement point. In contrast, our new method measures and corrects beam tilts originating from any source and corrects for them in a deterministic way. This includes first order correction in both transverse planes and second order correction in the bending plane.
There are additional studies of novel concepts using laser-beam shaping to reduce CSR thus also reducing centroid misalignment [19]. These methods fail for higher charge densities, as in the case of overcompression, because of space charge.
A different approach followed by the European XFEL [20] and PAL XFEL [21] is to set the phase advance between the bunch compressors such that the kicks cancel each other out.
A more expensive strategy is to use transverse deflecting cavities, which is infeasible due to RF stability requirements and limited control of higher order in μ. Transverse wakefields from corrugated or dielectric beam pipes are discarded as well due to the same lack of control which is a result of the geometry.

E. Jitter
The leaking dispersion η caused by the applied corrections increases the susceptibility to energy induced orbit and bunch length jitter. The transfer matrix element R 56 for a bunch compressor is given by: where ρ corresponds to the bending radius of the dipole magnets [22],η to the lattice dispersion and s to the path along the electron trajectory. Solely looking at the energy jitter at the bunch compressor carrying up to second-order matrices leads to a change in the value ofR 56 bỹ with T being the second-order transport matrix and δ the deviation of the mean energy divided by the nominal energy.
The bunch length jitter is still driven by R 56 , i.e., R 56 ≫ 2T 566 Δδ, even though T 566 is increased due to the beam tilt correction. The relation of bunch length jitter, R 56 and T 566 is further detailed in Appendix C.
An orbit jitter due to residual dispersion coupled with an energy jitter at the undulator location will lead to betatron oscillations. This degrades the FEL at a collective level. For SwissFEL the acceptable total orbit and bunch-length jitter is 10% of σ x;y;z [6].
This effect was studied with the large-bandwidth mode, because it is the most sensitive among all operation modes

OPTIMIZATION OF FREE ELECTRON LASER …
Phys. Rev. ST Accel. Beams 18, 030701 (2015) 030701-5 and requires the strongest corrections. In addition to strong CSR kicks due to the overcompression the accelerating cavities were randomly misaligned (normal distribution with σ ¼ 500 μm). 10'000 Elegant runs with randomized voltage and timing jitter of the RF following the SwissFEL specifications, given in Table III, were done. RF cavities connected to the same klystron are assumed to jitter in the same way. Machine drifts are likely to be corrected by a feedback and are not considered in the study. The jitter study shows that the orbit as well as the bunch length jitter stay well within their respective tolerance levels. Figure 6 shows their distributions. Bunch dispersion correction (through the beam tilt correction) may reduce the lattice dispersion and subsequently reduce the jitter sensitivity.
Other sources of orbit jitter in the machine are stronger than the contribution by the leaked lattice dispersion (η). The same holds true for the uncontrolled leaking dispersion. Deviations caused by misaligned correction multipole magnets are steady-state. Misaligned quadrupoles create an orbit offset which is corrected for by the orbit steerers. Misaligned sextupoles create an optical mismatch and coupling in addition which both get corrected by normal and skew quadrupole magnets in a nondispersive section. The impact on the compression factor of both quadrupole and sextupole magnets in the bunch compressor is addressed by adjusting the bending angle of the bunch compressor dipoles. Adjustment of the energy profile trough the RF offers an additional knob to control the compression.

IV. CORRECTION ALGORITHM FOR SWISSFEL
In this section we show the correction scheme applied to SwissFEL, which utilizes corrector magnets in the bunch compressors.
One possibility to correct for μ is to directly calculate the needed correction from the measured μ using Eqs. (13)- (15). The measurement of μ will be discussed in the result section. To use this approach the optics along the lattice as well as the relevant beam parameters have to be known with a high level of confidence.
A slower but more robust approach is to measure a perturbation response matrix and then use the pseudoinverse to approach the target values iteratively. Stability and number of needed iterations directly depend on the used step size of the perturbation matrix.
The pseudoinverse requires a linearization of the response matrix and thus iteration to converge. Weak responses, which can lead to large corrector values by the inverse are excluded, to reduce measurement errors as shown in Table IV. Terms not mentioned are set to zero. The global change in the optics [23] arising from the correction quadrupoles has to be accounted for in both of the proposed methods. The beam has to be rematched with the respective matching sections upstream to each bunch compressor.
The bunch compressors are treated independently from each other for correction up to the first-order. This does not hold for the correction of the mismatch along the bunch and μ x;2 since four sextupoles are needed to achieve the correction.
FIG. 6. 10'000 jitter runs with (red) and without (blue) beam tilt correction. The additional orbit jitter originating from the leaking dispersion is minimal and is well within tolerances of SwissFEL. The points correspond to the actual data points and the lines correspond to Gaussian fits. The correction alters the lattice dispersionη within the chicane thereby changing the compression factor. To keep the current profile constant either the bending angle or the energy chirp has to be adjusted. In this study the former option was chosen.
Since the bunch was previously matched to the spoiled Twiss parameters, after the correction it needs to be rematched according to Eqs. (9)- (11). This was done with the matching section upstream of the bunch compressor.

V. NUMERICAL STUDIES FOR SWISSFEL
We use the three main operation modes of SwissFEL (see Table I) to benchmark the correction method. The simulations include CSR as well as transverse wakefields originating from offset cavities (normal distribution with σ ¼ 500 μm). The tilts μ x;1 ; μ x;2 , and μ y;1 are corrected for all the cases. Table V shows the results with and without the correction applied in simulation. The projected emittance ε is clearly reduced for all the modes studied. Note that beam tilts bigger than the second order also influence the emittance. Corrections of lower orders can mitigate but not completely correct these terms. In particular for the LP mode, the vertical emittance is larger than for the rest due to 3rd and higher order beam tilts.
We focus now on the large-bandwidth mode using overcompression since it is the most challenging one in terms of μ and stability.
The beam transport up to the undulator line is simulated by Elegant. The parameter μ is calculated directly from the phase-space distributions.
The beam tilt μ reduces in both transverse planes. Figure 7 shows the particle distribution in all four transverse dimensions.
The longitudinal profile remains largely unchanged by the applied correction since R 56 is adjusted with the bending angle of the bunch compressor dipoles. For the large bandwidth mode this is 0.6% of the initial bending angle.
To quantify the effect on FEL performance for SwissFEL Genesis simulations with corrected and uncorrected distributions are done using the SwissFEL configuration for 1 Å photon wavelength. The FEL power is enhanced by one order of magnitude through the application of the correction as shown in Fig. 8. An additional effect arises from the slightly higher peak current and better matching of the core for the corrected case. The dependence on the saturation power scales by the FEL parameter ρ FEL which in terms scales with the cube root of the slice current [24]. Therefore a moderate increase in FEL power is expected simply through the increase in peak current. The observed increase in power cannot be explained solely by this effect and comes therefore from the applied correction. The lower power in the central slice (Fig. 8) is likely to come from a mismatch due to the beam tilt μ since the projected optics is spoiled as described in Eqs. (9)- (11).
The spectral bandwidth of the FEL is increased considerably. The main reason for this broadening is the large correlated energy spread along the bunch. When the slices are misaligned along the bunch they still lase albeit at a much lower level. This broadening is of special importance for the large bandwidth mode being one of the key operation modes for SwissFEL.

VI. MEASUREMENT AT THE SWISSFEL INJECTOR TEST FACILITY
The SwissFEL Injector Test Facility was used to conduct a proof-of-principle experiment for the presented correction scheme. To introduce a controlled source of the slice misalignment μ the X-band cavity is deliberately offset to produce transverse wake fields. This is done using a girder mover system while keeping the orbit constant with steerers along the beamline.
To measure linear beam tilt in momentum and space (μ 1 , μ 0 1 ) the beam is streaked in the noncorrecting plane using either a transverse rf deflecting cavity or a quadrupole of normal or skew orientation within the bunch compressor. The deflector streaks in time whereas the quadrupole in energy. If there is a strictly monotonic correlation between time and energy, the two methods can be used interchangeably. Figure 9 shows the phase advances used for the measurement. The β-function is kept constant at the screen in both transverse planes. From the recorded values of μ 1 (obtained from the phase advance scan), the pair (μ 1 , μ 0 1 ) are reconstructed at a single point in the machine. The resulting beam tilt in momentum and space can then be propagated along the machine by linear transport theory [22].
The perturbation method introduced above was then used to correct for the measured linear misalignment. The inset of Fig. 10 shows a betatron phase scan of x − z phase space distributions for five different phase advances before and after the correction was applied. The controlled application of transverse wakefields shows the expected growth in emittance ε. The correction reduces the effect to a minimum and limits the emittance growth significantly. The measured results are reproduced by Elegant simulations as shown in Fig. 10.
The procedure was followed for both transverse planes. For corrections in the nonbending plane the skew quadrupoles were used to correct the tilt and one of the corrector quadrupoles was used to streak. A correction in both transverse planes was achieved by applying the correction first in one and then in the other plane.

VII. CONCLUSION
We introduced the phenomenology of transverse beam misalignment and discussed its adverse effect on optics, emittance and its transport using standard linear beam FIG. 10. Corrected (blue) and uncorrected (red) beam tilts generated by transverse wakefields due to offsets of the X-band cavity. The inlet shows the measured particle distributions for different phase advances for a measurement of the beam tilt. The main figure represents the relative growth of the projected emittance in simulation and measurement. optics. Since it cannot be avoided completely it is important to characterize and correct for it.
We have proposed a correction scheme and validated it in simulation and with measurements. In simulations we see the tremendous increase of nearly one order of magnitude in FEL power for a strongly misaligned beam. The correction is of particular importance for the large-bandwidth mode because of the strong CSR kick due to over-compression. The spectral broadening in this case does further increase the importance of correction. The experiment delivered a proof-of-principle that said correction does work as intended in a real life machine.
The proposed iterative correction method implementing a perturbation matrix is very viable in terms of mismatch and jitter in the machine.
Concerns about the energy induced orbit and bunchlength jitter are addressed and are well below the tolerance level for the expected jitter budget for SwissFEL.
We conclude that the presented method is feasible to correct μ and make the large-bandwidth mode viable for SwissFEL.