Delay-detune scan for longitudinal electron beam characterization at free-electron lasers

We present first experimental results of a novel method to study the energy chirp of the electron beam lasing window at a free-electron laser operating in self-amplified spontaneous emission mode. The method requires a single magnetic chicane splitting the FEL undulator into two parts of several gain lengths each. Undulator segments should have variable gaps. By scanning both the delay in the chicane and detuning in a part of the undulators, one can retrieve the linear component of both the radiation frequency chirp and the electron energy chirp. In addition, such scan improves the accuracy of the previously proposed autocorrelation-based pulse duration measurement technique. The proposed method targets facilities that lack direct diagnostics of the electron beam longitudinal phase space distribution. It also can be extended to diagnose transverse tilts of the beam.


I. INTRODUCTION
Free-electron lasers (FELs) are state-of-the-art tools to generate high-brightness x-ray radiation pulses by exploiting a resonant instability that develops while a high-quality electron beam propagates through a properly tuned undulator. The properties of the electron beam determine power and quality of the emitted radiation. Key properties for experiments are, e.g., the time-frequency phase space (or more precisely Wigner) distribution of the radiation pulse, as well as its instantaneous bandwidth, total bandwidth [1], frequency chirp [2,3], pulse duration [4] etc.
If the FEL operates in self-amplified spontaneous emission (SASE) mode, the longitudinal phase space of the electron beam is imprinted into the time-frequency representation (e.g., spectrogram or Wigner distribution) of the emitted radiation according to the resonance condition where ω is the central frequency of the emitted radiation, λ u is the undulator period, and K is the rms undulator parameter.
As long as the relative change of the electron energy is small compared to the FEL bandwidth, a linear energy chirp in an electron beam causes a nearly linear frequency chirp of the radiation pulse.
In addition, a linearly chirped beam will be homogenously "streched" or "shrunk" due to longitudinal dispersion inside the undulator, thus resulting in a shift of the density modulation frequency and, therefore, of the radiation wavelength. A quadratic or higher order chirp will result in a nonhomogenous shift of the electron beam, affecting also the bandwidth. The latter is of particular importance for self-seeded radiation, as it degrades radiation spectral density. Therefore, the electron beam phase space distribution affects the radiation properties and consequently the user experiments. Knowledge of either electron beam phase space or radiation time-frequency distribution can shed light on the other and facilitate optimization of accelerator, analysis of experimental results and tailoring the electron beam properties for advanced lasing schemes.
Direct electron beam diagnostics methods, like XTCAV [5], located downstream the FEL undulator allow for a full electron beam phase space determination, and even a good determination of the resulting FEL pulse duration [6]. However, such a system is expensive and is currently not available at most hard x-ray FEL facilities. In particular, while being under consideration, it is not installed at the European XFEL [7]. Diagnostics of the radiation pulse duration and chirp also requires additional hardware installation [8]. Therefore, an alternative electron beam phase space diagnostics method is necessary for performance optimization as well as advanced lasing techniques implementation at facilities lacking XTCAV.
The electron beam may be delayed in the magnetic chicane in the middle of an amplification process. The chicane delay acts as a phase-shifter on the delay scale of the radiation wavelength [9], then it exponentially smears out microbunching and finally delays the radiation with respect to the radiation field on the scale of the SASE pulse duration. The latter effect was studied in [10] where it was proposed to measure the autocorrelation of the intensity envelope of SASE radiation pulses by delaying the electron beam with respect to emitted radiation in the middle of the exponential growth. This method, while being simple and effective [11] does not account for chirps in the electron beam and, as result, may yield an underestimated pulse duration.
We propose to extend the original autocorrelation method to account for the linear component of the electron beam energy chirp, so that in addition to more accurate estimations of the radiation pulse duration it provides both sign and value of the linear chirp in the electron beam and radiation pulse.

II. SETUP AND WORKING PRINCIPLE
The proposed method requires that the SASE undulator is split in two parts U1 and U2 by means of a short magnetic chicane, as depicted on Fig. 1. The chicane should allow to introduce delays comparable with the electron beam length. SASE radiation is generated in U1 and, before reaching saturation, the electron beam passes through the chicane and is delayed by a time δt ¼ −δs=c, while the radiation emitted in U1 passes the chicane unperturbed.
At x-ray wavelengths, a few fs delay in the chicane provides enough longitudinal dispersion to completely smear out the original microbunching created during the lasing process in U1. In the second part of the undulator-U2-the first x-ray pulse overlaps with the lasing part of the electron beam. Therefore, the radiation from U1 acts as a the seed in the FEL process and, provided the resonance condition is fulfilled, is amplified further. The relative delay between the electron bunch and the seed x-ray pulse can be tuned by the magnetic field of the chicane, as illustrated on Fig. 1.
If the electron beam has a linear energy chirp, the undulator resonance condition varies along such beam causing a nearly linear frequency chirp of the emitted radiation. When delayed by the chicane, the linearly chirped electron beam is not at resonance with the seed anymore (see Fig. 1, third inset). This results in a reduced energy of a radiation pulse amplified in the undualtor U2. However, the K parameter of U2 can be adjusted to compensate for the chirp and delay.
The correlation between the delay by the chicane δt and the detune of the downstream undulator δK ¼ K 2 − K 1 reveals the underlying electron energy chirp δγ=δt and radiation frequency chirp δω=δt at the chicane location: hence the proposed name of the method-"delay-detune" or "DD" scan. It can also be shown (see Appendix) that in the ideal case where U1 and U2 are identical, the beam is not spoiled and slippage effects at the ends of the bunch are negligible, the result of the delay-detune scan is a two-dimentional autocorrelation trace of the ensemble-averaged Wigner distribution of the SASE radiation.

III. EXPERIMENT
Experimental demonstration of our technique was possible at the SASE2 undulator line of the European XFEL, where we combined two undulator sets with cells 6-17 and 19-24 across the second SASE2 self-seeding chicane [12][13][14]. Cell 9 hosts another chicane that was inactive. Each undulator unit has 40 mm period and 5 m magnetic length. The undulator was emitting at 7 keV fundamental with 14 GeV, 250 pC electron beam.
After establishing a sufficiently long delay to smear out the microbunching developed in U1 with K ¼ 3.355, we explored chicane delays between 1 and 5 μm, while scanning the undulator parameter K for each delay value. Two orbit feedbacks, before and after the chicane, allowed to factor out orbit deviations. For each combination of delay and detune we recorded 200 pulse energy readings from an x-ray gas monitor detector (XGM) located downstream SASE2 undulator [15]. The ensemble-averaged result of that measurement is presented on Fig. 2(a) where one can see a clear correlation between chicane delay and undulator detune, indicating the negative energy chirp over the electron beam lasing window (energy at the tail of the beam is lower). Such chirp can be the result of an overcompression in the beam formation system accompanied by wakefields over the beam delivery line. The expected increase of the chiro due to the resistive wakefields effect over the active undulator length is by an order of magnitude smaller. The standard deviation of the Gaussian fit of the radiation intensity autocorrelation trace is 3.27 AE 0.37 μm.
For comparison, on Fig. 2(b) we provide results of a scan performed during a different machine run and undulator tuned to 9 keV with K ¼ 2.885. The electron beam with the same energy and charge has a nominal compression and shows a negligible chirp. Standard deviation of its autocorrelation trace is 3.75 AE 0.52 μm.
In both measurements we applied only a linear taper in undulator to compensate for the energy losses in the beam. The taper value for the case of Fig. 2(a) was ΔK=K ¼ 3.7 × 10 −5 =cell and for Fig. 2

IV. SIMULATION
To reproduce the experimental result depicted on Fig. 2(a), we performed numerical simulations using the FEL code GENESIS [16] and the simulation toolkit OCELOT [17]. We assumed 7 active undulators upstream-and 6 undulators downstream the magnetic chicane. A linear energy chirp of the model beam was deduced from the experiment [18]. For each combination of detune and delay we carried out a two-stage simulation with resetting the electron beam bunching and advancing the radiation field between these stages. The simulation parameters we present in Table I.
For simplicity we did not simulate the resistive wakefields, or energy losses due to spontaneous emission as well as did not introduce any undulator taper. For illustration purposes we assumed that the electron beam microbunching is fully suppressed even at zero delay. The experimental data at delays below 1.5 μm will be distorted by the residual microbunching and hence should be ignored, as depicted on Fig. 2(b) (empty circles on marginal distribution). Spectrogram of the chirped radiation exiting undulator U1 is shown on Fig. 3(a). The corresponding delay-detune scan is provided on Fig. 2(c).
If the energy chirp in the beam has predominantly a linear component, the width of a reconstruction line-off at a given delay (detune scans) would not vary and indicate the instantaneous bandwidth of SASE radiation. However such assumption is usually unrealistic, and broadening of the detune scans may indicate deviation from linearity in the chirp: the overlapping area of the radiation spectrograms from U1 and U2 becomes less sensitive to the detuning of the second undulator which simply causes shift of the amplified pulse along the beam. A model electron beam with quadratic energy chirp would emit radiation with quadratic frequency chirp, as illustrated on Fig. 3(b). On Fig. 2(d) we present a corresponding delay-detune scan result assuming such beam. The presence of quadratic energy chirp can be deduced from broadening the DD-scan trace around the delay of about the middle of the lasing window length. Note that upon changing the radiation frequency chirp the autocorrelation intensity trace (DD-scan marginal distribution) remains unaffected.

V. DISCUSSION
Delay-detune scan can be quantified by fitting undulator detune scans with a Gaussian function. Plots of its position and width as a function of chicane delay we present on Fig. 4.
Such representation makes it easier to distinguish contributions of linear and higher order chirps. The latter manifest themselves as a broadening of detune scans at larger chicane delays.
One of the marginal distributions of the delay-detune scan-sum over the undulator detune-provides a radiation intensity autocorrelation insensitive to frequency chirps, akin to the measurement in their absence discussed in [10]. Numerical simulations using linearly and quadratically chirped electron beams with flat-top current profiles yield identical intensity autocorrelations with shapes close to triangular [see Figs. 2(c) and 2(d)].
The temporal shape of the original pulse cannot be retrieved as its autocorrelation is not unique. However its full width at half maximum duration ΔT can be deduced by dividing that of the autocorrelation Δτ by a deconvolution factor. For most smooth pulse shapes this factor is about 1.5, hence except for flattop pulses where it equals 1 [19]. Such factor for the standard deviation size of the pulse is ffiffi ffi 2 p for an arbitrary pulse shape. Based on the latter we can deduce the standard deviation of an ensemble-averaged duration of the measured pulses as 10.9 AE 1.2 fs for the chirped pulse and 12.5 AE 1.7 for not chirped one (depicted on Fig. 2(a) and (b) respectively).
The proposed method requires that the electron beam has no residual microbunching from U1 downstream the chicane. This limits the minimum delay of the chicane and consequently minimum length of the electron beam that can be diagnosed. The microbunching b downstream the chicane is strongly suppressed by a following factor [20]: Electron beam energy γ 27500 -energy spread σ γ 5 -norm. emittance 0.5 mm · mrad -peak current where σ γ is the rms energy spread in the beam. For bunching reduction by two orders of magnitude the electron beam should be delayed by at least γ=σ γ radiation wavelengths. It corresponds to 1 μm delay for 1 Å wavelength assuming the relative energy spread of about 10 −4 .
To account for the missing data in the autocorrelation marginal distribution at small delays we suggest to extrapolate it using Gaussian or polynomial functions and use its value at zero delay to find the autocorrelation half width at half maximum length Δτ=2. On Fig. 2(b) we present intensity data for delays below 0.9 μm (white circles) where the data cannot be used for reconstruction purposes and hence is ignored.
One of the ways to mitigate the residual bunching at zero delay is to accompany the electron beam chicane with an optical delay line to yield zero or negative relative delay. This allows one to perform full autocorrelation and check the validity of the reconstruction, as the result should be anti-symmetrical with respect to zero delay. The chicane with such optical delay is considered for installation at SASE3 undulator line of the European XFEL [21] where its primary purpose is to facilitate generation and delivery of two-color SASE radiation.
Potentially, the delay-detune scan can be combined with spectrum-based pulse duration measurement methods allowing one to factor in the missing information on the energy chirp: the measured linear chirp parameter will help calculating the total pulse duration from group duration obtained from spectrum correlation analysis [22][23][24][25].
The proposed method assumes that the dispersion of the radiation transport is minimized and that there are no significant transverse tilts of the beam. In the latter case, the method can potentially be extended to compensate the chicane delay δs not only by means of the undulator parameter K, but also by adjusting the orbit correctors upstream and downstream the chicane, i.e., measuring I ¼ fðδs; δK; δx; δx 0 ; δy; δy 0 Þ. Such scan would yield additional information on the electron beam tilts, e.g., caused by a transverse kick from a wakefield structure [26,27].
If the scan is carried out in a deep linear regime, it yields a 2-dimensional autocorrelation of the ensemble-averaged Wigner distribution of the SASE radiation (see Appendix). In this case the retrieved pulse duration and shape may differ from the one at saturation, typically delivered to users. As the current profile of the electron beam is usually not flat, the slice with largest gain, typically with a peak current, reaches saturation first, resulting in a short SASE pulse. However, downstream the undulator the low-current tails of the beam continue SASE amplification yielding longer high-power pulses.
It is worth noting, that unlike the XTCAV measurements that provide single-shot diagnostics, the DD-scan yields a typical ensemble-averaged properties. The time to conduct a scan depends on accelerator stability, parasitic steering in chicane, speed of feedback systems, repetition rate and the desired scan resolution and affects the radiation delivery. Currently at the European XFEL it ranges between 5 and 20 minutes and can be optimized further.

VI. CONCLUSIONS
We presented a simple method to measure value and sign of the linear component and diagnose the presence of higher components of the energy chirp in an electron beam in an undulator. We call this method "delay-detune scan" or "DD scan." The method is to delay the electron beam in a chicane, and detune the downstream undulator in the middle of the linear amplification regime while measuring the resulting pulse energy. In linear amplification regime it provides a 2-dimentional autocorrelation of radiation Wigner distribution. Its marginal distribution of delay yields intensity autocorrelation of a radiation pulse at the chicane location.
Being an invasive measurement, the delay-detune scan improves on the autocorrelation-based pulse duration measurement proposed in [10] by accounting for a chirp in the electron beam, thus preventing an underestimation of the pulse duration.
Thus the delay-detune scan allows to measure the average duration of the radiation pulse with higher accuracy and to indicate the presence of linear and higher-order electron energy chirps at the chicane location.
It partially compensates the lack of the longitudinal electron beam phase space diagnostics at the European XFEL and already provides invaluable information for diagnostic purposes whenever knowledge about the longitudinal phase space of the beam is crucial, in particular during hard x-ray self-seeding commissioning [28].

ACKNOWLEDGMENTS
We would like to thank Evgeny Schneidmiller, Matthias Scholz, Takanori Tanikawa, Sergey Tomin, Andrei Trebushinin, Mykola Veremchuk and Mikhail Yurkov for useful discussions. G. G, V. K. and E. S. proposed the original autocorrelation diagnostics with delay scan, S. S. suggested to add a scan over undulator detune for chirp diagnostics, G. G. developed the analytical theory, G. G, M. G., S. L. and S. S. conducted the experiment. S. S. carried out numerical simulations. G. G. and S. S. wrote the text of the manuscript.

Model
A theoretical model of the setup in Fig. 1 can be derived under the assumption that U1 and U2 are identical, lasing in the linear regime with a tunable detuning δω of U2 with respect to ω 0 (the fundamental frequency of U1) and that the electron bunch parameters are identical at the entrance of U1 and U2, i.e., there is no beam deterioration due to lasing in U1. U1 and U2 are separated by a chicane that introduces a tunable delay δt of the electron bunch with respect to the radiation pulse. We assume that for the delays of interest the chicane dispersion is large enough to completely suppress the electron microbunching.
We indicate with EðtÞ andĒðωÞ the complex electric field of an FEL pulse in the time and frequency domain respectively. Within the one-dimensional FEL theory, which is not too far from reality for a SASE XFEL with a large diffraction parameter, we write the FEL electric field in the time domain in terms of the slowly varying complex amplitudeẼðz; tÞ as Eðz; tÞ ¼Ẽðz; tÞ expðik 0 z − iω 0 tÞ; where k 0 ¼ 2γ 2 0 k w =ð1 þ K 2 =2Þ, and k 0 ¼ ω 0 =c. Here γ 0 is the nominal electron energy, k w ¼ 2π=λ w (λ w is the undulator period), K is the maximum undulator parameter, and c the speed of light in vacuum.

Wigner distributions for U1 and U2
It is straightforward to introduce the Wigner distribution for an FEL pulse at any given position inside the FEL as The ensemble average h…i is needed in the case of SASE in order to be independent of the shot-noise realization. An explicit calculation of the Wigner distribution was found in [22] for the case of a cold coasting beam with frequency chirp parameter u ¼ Δω=Δt: where C is a suitable normalization constant, ρ ¼ ½e 2 K 2 A 2 JJ n 0 =ð32ϵ 0 γ 3 0 mc 2 k 2 w Þ 1=3 is the FEL efficiency parameter (m is the electron rest mass and A JJ ¼ J 0 ðQÞ − J 1 ðQÞ with J n the Bessel functions of the first kind of order n and Q ¼ K 2 =½4ð1 þ K 2 =2Þ), σ 2 ω ¼ 3 ffiffi ffi 3 p ρω 2 0 =ðk w zÞ defines the SASE gain bandwidth, and 1=V ≡ ð1=v 0 þ 1=cÞ, with v 0 the nominal electron speed. Due to the ensemble averaging, Wðz; t; ωÞ in Eq. (A3) is positively defined, and can be identified with a spectrogram of the pulse. The spectrogram can be found, in principle, by measuring the time-and frequency-resolved FEL flux averaged over many pulses and will be therefore indicated with hIðω; tÞi. Equation (A3) is valid for a coasting beam, but assuming a rectangular electron beam and a long but finite SASE pulse with duration T such that ρω 0 T ≫ 1 we can neglect slippage effects at the edges of the radiation pulse and we can generalize Eq. (A3) to where χ T ðτÞ is a window function, equal to unity for −T=2 < τ < T=2 and zero otherwise. More generally, if the electron beam characteristics change adiabatically with respect to the parameter 1=ðρω 0 Þ, it is appropriate to allow χ T taking any arbitrary intensity shape.
Relying on the afore-mentioned identification between Wigner distribution and spectrogram, for the first FEL part U1 we can write: hIðω; tÞi ¼ Wðω; tÞ ¼ P 0 exp ½Fðω; t; zÞ; ðA5Þ where P 0 is the equivalent shot-noise power (with white spectrum), z ¼ L w is the length of U1 and Fðω; t; zÞ is a real function including the z-dependent growth that, consistently with Eq. (A4), is also a function of frequency and position inside the pulse.
We now move from U1 to U2 through the magnetic chicane, which introduces a delay δt > 0 of the electron beam with respect to the radiation. This means that the ensemble-averaged intensity from U1 is advanced of δt and is given by hIðω; t þ δtÞi. As discussed above, U2 can be modeled as an FEL seeded by the (advanced) FEL pulse from U1. We can repeat for U2 the same steps that led to Eq. (A5) for U1, where, however, P 0 is now substituted by hIðω; t þ δtÞi. Assuming that U1 and U2 are of the same length z ¼ L w we have: hI 2 ðω; t; δtÞi ¼ hIðω; t þ δtÞi exp ½F 2 ðω; t; L w Þ; ðA6Þ where δt can be considered as a parameter. Since we assumed that the electron beam quality is not altered by the lasing process in U1 in the linear regime, we can set F 2 ðω; t; L w Þ ¼ Fðω; t; L w Þ to obtain hI 2 ðω; t; δtÞi ¼ 1 P 0 hIðω; t þ δtÞihIðω; tÞi: ðA7Þ If we now detune U2 from the resonance frequency ω 0 to ω 0 − δω, δω takes the role of a second parameter and hI 2 ðω; t; δω; δtÞi ¼ 1 P 0 hIðω; t þ δtÞihIðω − δω; tÞi: ðA8Þ Finally, a suitable redefinition of the instant t ¼ 0 allows one to write hI 2 ðω; t; δω; δtÞi ¼ 1 P 0 hIðω; tÞihIðω − δω; t − δtÞi: ðA9Þ Remembering the identification we made in Eq. (A5) between Wðω; tÞ and hIðω; tÞi we can use Wðω; tÞWðω − δω; t − δtÞ where Σ T;δt ðtÞ ≡ χ T ½t − δt − z=ð2VÞχ T ½t − z=ð2VÞ.
Assuming as granted that δt > 0, since we discuss about a delay, and that δt < T (otherwise the delay is larger than the pulse duration), Σ T;δt ðtÞ is equal unity for t − z=V < T=2 and for t − z=V − δt > −T=2, and zero otherwise.

Measurement scans: Delay-detune and spectrally resolved delay-detune
The measurement procedure that we proposed in this paper consists in recording the shot-to-shot averaged FEL intensities at the exit of the second part of the undulator as a function of the relative delay δt between electron bunch and seed x-ray pulse and of the detuning δω in U2, either with the help of an integrating photodetector or using a spectrometer. Using a spectrometer gives S ω ðω; δω; δtÞ ¼ Z ∞ −∞ dtWðω; tÞWðω − δω; t − δtÞ; ðA11Þ while using an integrating photodetector yields to the autocorrelation function one can estimate the one-dimensional FEL parameter as ρ ≃ 7 × 10 −4 , while z ≃ 30 m for six active segments. We find, therefore, σ δω=ω ≃ 1.2 × 10 −3 . The reader can compare the behaviors of δω=ω and σ δω=ω estimated here with the results of simulations in Fig. 4(c) (blue and orange lines respectively).