## Calculation of RF-induced Temporal Jitter in Ultrafast Electron Diffraction

T. Xu, 1, ∗ F. Ji, 1 S. P. Weathersby, 1 and R. J. England 1

1

SLAC National Accelerator Laboratory, Menlo Park, CA 94025, USA (Dated: August 16, 2024)

A significant contribution to the temporal resolution of an ultrafast electron diffraction (UED) instrument is arrival time jitter caused by amplitude and phase variation of radio frequency (RF) cavities. In this paper, we present a semi-analytical approach for calculating RF-induced temporal jitter from klystron and RF cavity parameters. Our approach allows fast estimation of temporal jitter for MeV-UED beamlines and can serve as a virtual timing tool when shot-to-shot measurements of RF amplitude and phase jitters are available. A simulation study for the SLAC MeV-UED instrument is presented and the temporal resolution for several beamline configurations are compared.

## I. INTRODUCTION

Ultrafast electron diffraction (UED) has demonstrated great potential in visualizing the atomic motions in different materials and molecules at the femtosecond timescale [1]. UED employs a pump-probe scheme, where a pump laser pulse interacts with the sample and initiates the ultrafast process of interest, followed by a short electron bunch to probe the structural changes over different pump delays. Adjusting the delay between pump laser and probe electron allows time-resolved measurements of the structural evolution of the sample. The temporal resolution of a UED instrument is described by,

$$\tau _ { \text{res} } \, = \sqrt { \tau _ { \text{pump} } ^ { 2 } \, + \tau _ { \text{probe} } ^ { 2 } \, + \tau _ { \text{VM} } ^ { 2 } + \tau _ { \text{jitter} } ^ { 2 } } \quad ( 1 ) \quad \text{code}$$

where τ pump is the duration of pump laser, τ probe is the duration of electron bunch, τ VM is the velocity mismatch, and τ jitter is the temporal jitter between pump and probe. To improve the temporal resolution, relativistic electrons with energies in the MeV range can be utilized. By employing MeV energy electrons, both bunch lengthening caused by space charge forces and velocity mismatch between pump and probe can be mitigated. Moreover, MeV-UED instruments offer several advantages over their keV counterparts, including providing shorter de Broglie wavelengths and a near flat Ewald's Sphere in the k -space, greater penetration depth, as well as reduced background noise due to multiple scattering.

Photocathode radio frequency (RF) guns are often employed in the MeV-UED instruments for the generation of low emittance electron probes with ultrashort duration. The compression of the electron bunch can be achieved by an RF buncher or alternatively by the gun itself. However, fluctuations in the amplitude and phase of RF cavities induce arrival time jitter between pump and probe and contribute to the temporal resolution. To ensure an MeV-UED instrument achieves optimal performance, it is essential to consider all factors including charge, electron bunch length, transverse emittance, and temporal jitter.

∗ txu@slac.stanford.edu

While it is common to optimize bunch length and transverse emittance in beamline designs, the optimization of arrival time jitter is not as straightforward. In this work, we present a semi-analytical approach to calculate RF-induced temporal jitter in MeV-UED instruments. Our approach combines a single particle dynamics model [2] with a differentiable solver, enabling fast and accurate calculation of the exact numerical relation between RF and temporal jitters based on cavity field maps and klystron parameters. The numerical relation can be used to estimate time-of-arrival jitter in an MeVUED instrument and allows for its online correction from shot-to-shot RF measurements. Compared with previous work [3-5], our approach does not require particle-in-cell codes or measured data to determine jitter and applies to beamlines with multiple RF cavities. To showcase our approach, we examine the temporal resolution of the SLAC MeV-UED instrument [6] under different beamline configurations in proposed upgrades. The results indicate that RF-based bunch compression with a 1.4 cell gun or a buncher cavity provides shorter bunch duration than a 1.6 cell gun but increased arrival time jitters. Mitigation schemes to improve the temporal resolution are discussed.

## II. RF-INDUCED TIMING JITTER

## A. Source of Timing Jitter

The timing jitter between pump laser and probe electron bunch originates from various sources. Here we consider a beamline with an RF gun as its sole RF element. As depicted in Figure 1, the drive signal generated by the master oscillator is split to trigger both klystron amplifier and laser system. On the laser side, the synchronization error between laser and RF produce a timing jitter δt laser-to-rf , followed by the transport jitter δt cathode and δt pump in each laser path. The synchronization jitter and transport jitter can be regarded as an effective phase jitter in the RF gun δϕ l and is given by

$$\delta \phi _ { l } = \omega ( \delta t _ { \text{laser-to-rf} } + \delta t _ { \text{cathode} } - \delta t _ { \text{pump} } ) \quad ( 2 )$$

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00937v2-figure-a86eb3a7-d166-4872-a652-a4cb9ae0d1fb.jpg)

-

FIG. 1. Diagram of various sources of timing jitter.

where ω is the angular frequency of the RF gun. On the RF side, shot-to-shot fluctuation of the klystron voltage δV k induces phase and amplitude jitters in the gun. The total phase jitter seen by the electrons is,

For phase jitters, we assume the phase dependence of the klystron voltage is dominated by transit time of electrons from the input to output cavity. The travel time t k over effective drift length L k in the klystron is,

$$\delta \phi _ { g } = \delta \hat { \phi } _ { g } + \delta \phi _ { l }$$

here δϕ ˆ g is the phase jitter induced by klystron. The phase jitter δϕ g and amplitude jitter δV g in the gun translates into arrival time jitter of the probe δt probe , which includes the transient time variations in the gun and the drift downstream. Overall, the timing jitter between pump and probe is given by,

$$\delta t _ { \text{sample} } = \delta t _ { \text{probe} } + \delta t _ { \text{cathode} } - \delta t _ { \text{pump} } \quad ( 4 ) \quad \text{Inse}$$

As we transition to a more quantitative description of jitters, the notation of all jitter quantities will be changed from δ to d to represent the small deviation from nominal values as the latter is conventionally used in differentiation. We also assume the difference of transport jitters in the pump and probe path is negligible ( δt cathode -δt pump ≈ 0). In practice, this assumption is valid when the laser transport path is short and the temperatures of all optical components are well regulated.

## B. Correlated Phase and Amplitude Jitter

The shot-to-shot fluctuation of amplitude and phase jitter of an RF gun is mainly caused by the fluctuation of klystron voltage and has been well described in the literature [7, 8]. Here we'll give a brief review. The amplitude or voltage V g of an RF gun is related to the klystron voltage V k by

$$V _ { g } \left ( V _ { k } \right ) \in \sqrt { P _ { r f } } \in V _ { k } ^ { 5 / 4 }$$

where RF power P rf = νµ V k 5 / 2 k , ν is the efficiency of klystron, µ k is the perveance. Differentiating both sides of Eq.5 gives the fractional amplitude jitter of the cavity

$$\frac { d V _ { g } } { V _ { g } } = \frac { 5 } { 4 } \frac { d V _ { k } } { V _ { k } } \quad \ \ \ ( 6 ) \quad \ \ \ \ \ u s \quad \ \ t o$$

$$t _ { k } = \frac { L _ { k } } { \beta c } = \frac { L _ { k } } { c } \left ( 1 - \gamma ^ { - 2 } \right ) ^ { - 1 / 2 } \text{ \quad \ \ } \text{(7)}$$

where β is the normalized velocity, γ is the Lorentz factor and is related to the klystron voltage V k by,

$$\gamma = 1 + \frac { V _ { k } } { M }$$

here M = 511 MV is the rest mass voltage of the electron. Inserting Eq. 8 into Eq. 7 and converting into phase, we have the klystron output phase ϕ k and as

$$\phi _ { k } \left ( V _ { k } \right ) = 2 \pi f _ { \text{RF} } \frac { L _ { k } } { c } \left [ 1 - \left ( 1 + \frac { V _ { k } } { M } \right ) ^ { - 2 } \right ] ^ { - 1 / 2 } \quad ( 9 )$$

here f RF is the RF frequency. Differentiating Eq. 9 gives the phase jitter of the klystron and the RF cavity,

$$d \hat { \phi } _ { g } = d \phi _ { k } = \mathcal { K } \frac { d V _ { k } } { V _ { k } } \, \text{ \quad \ \ } ( 1 0 )$$

where K is defined as

$$\text{use } \text{$\mathcal{ }K(V_{k})=-2\pi f_{RFR}{c}^{L_{k}}{c}$} \frac { L _ { k } } { M \left ( 1 + \frac { V _ { k } } { M } \right ) ^ { 3 } \left [ 1 - \frac { 1 } { \left ( 1 + \frac { V _ { k } } { M } \right ) ^ { 2 } } \right ] ^ { 3 / 2 } } \\ \text{list} \text{$\mathcal{ }L$} \text{$\mathcal{ }$ and quantifies the correlation between phase jitter and}$$

and quantifies the correlation between phase jitter and klystron voltage jitter.

From Eq. 10, we can see the amplitude and phase jitter in the RF cavity is related by

$$d \hat { \phi } _ { g } = \frac { 4 \mathcal { K } } { 5 } \frac { d V _ { g } } { V _ { g } } \, \quad \text{(1)}$$

In the presence of an active feedback system, the amplitude and phase jitters of the RF gun are reduced from the values in Eq. 6 and Eq. 10. However, the reduction is usually not perfect and the residual jitters still contribute to timing jitters.

## III. TIMING JITTER CALCULATION

In this section we calculate timing jitters downstream of RF cavities from their phase and amplitude jitters. The longitudinal dynamics in a standing-wave RF cavity can be described as [2],

$$\frac { d \phi } { d z } \ = \ k ( \frac { \gamma } { \sqrt { \gamma ^ { 2 } - 1 } } - 1 ) \quad \quad ( 1 3 ) \quad \begin{array} { c } \, \stackrel { \dots } { \text{init} } \\ \text{bar} \\ \theta \colon \,. \end{array} \,.$$

$$\frac { d \gamma } { d z } = 2 \alpha k \mathcal { E } _ { z } ( z ) \sin \left ( \phi + k z \right ) \quad \quad ( 1 4 )$$

where ϕ = ωt -kz + ϕ i , k is the cavity wave number, ϕ i is the initial phase of the cavity, α = eE 0 2 m c k e 2 is the normalized field gradient, E z ( z ) is the dimensionless normalized field profile peaked at unity. The effect of image charge is ignored as it is verified that the contribution is negligible. The equations above applies to RF guns, linearizer, and buncher cavities with appropriate initial values for ϕ i and energy γ i . For an RF gun, initial phase jitter dϕ i, g and amplitude jitter dα g induce a phase and an energy jitter at gun exit and result in a timing jitter at a location downstream,

$$d t _ { t o t, g } ( d \phi _ { i, g }, d \alpha _ { g } ) = d t _ { c a v, g } + d t _ { d r i f t, g } \quad ( 1 5 ) \quad \text{real}$$

where,

$$d t _ { \text{cav}, g } = \frac { 1 } { \omega } ( d \phi _ { f, g } - d \phi _ { i, g } ) \quad \quad ( 1 6 ) \quad \sum _ { \text{the} } ^ { \infty \infty }$$

$$d t _ { \text{drift}, g } = - \frac { L } { c \tilde { \beta } _ { f, g } ^ { 3 } \tilde { \gamma } _ { f, g } ^ { 3 } } d \gamma _ { f, g } \quad \quad ( 1 7 ) \quad \text{trai} \\ \quad \text{fiel}.$$

here L is the drift length after the gun, ˜ β f, g and ˜ γ f, g are the normalized velocity and Lorentz factor at gun exit in nominal condition, dϕ f, g and dγ f, g are the phase and energy jitter at cavity exit and are related to the initial jitter dϕ i, g and dα g by,

$$\begin{pmatrix} d \phi _ { f, g } \\ d \gamma _ { f, g } \end{pmatrix} = \begin{pmatrix} \frac { \partial \phi _ { f, g } } { \partial \phi _ { i, g } } & \frac { \partial \phi _ { f, g } } { \partial \alpha _ { g } } \\ \frac { \partial \gamma _ { f, g } } { \partial \phi _ { i, g } } & \frac { \partial \gamma _ { f, g } } { \partial \alpha _ { g } } \end{pmatrix} \begin{pmatrix} d \phi _ { i, g } \\ d \alpha _ { g } \end{pmatrix} \quad \ \ ( 1 8 )$$

It is worth pointing out that the dt tot g , above does not represent the timing jitter compared with an ideal probe bunch with zero phase, amplitude or laser-to-rf jitter, but rather the timing jitter compared with the pump laser. When there's synchronization error between laser and RF, both the pump and cathode laser will experience laser-to-rf jitter and its contribution needs to be included in dϕ i, g for the calculation of dt tot g , .

Kim has derived an analytical solution of ϕ f, g and γ f, g in [2] for E z ( z ) = cos( kz ) which allows the calculation of the Jacobian matrix in Eq. 18 and the jitters. However, it is an approximate solution and can't determine the timing jitters accurately. Since we are only interested in the jitters around the nominal gun initial phase and gradient, numerical techniques can be used to accurately calculate the partial derivatives around the given point [9, 10]. By solving Eq. 13 and Eq. 14 with a numerical integrator compatible with automatic differentiation [11] or differential algebra [12], one can obtain the final phase and energy as well as their derivatives with respect to the initial phase and gradient. For example, for a 1.5 cell Sband gun with E z ( z ) = cos kz operating at α g = 1 47 and . ϕ i, g = π/ 6, the final phase and energy jitter at z = 3 4 λ are related to the initial jitter by,

$$\begin{pmatrix} d \phi _ { f, g } \\ d \gamma _ { f, g } \end{pmatrix} = \begin{pmatrix} 0. 6 5 & - 0. 3 1 \\ 1. 9 3 & 3. 7 8 \end{pmatrix} \begin{pmatrix} d \phi _ { i, g } \\ d \alpha _ { g } \end{pmatrix} \quad \ ( 1 9 )$$

Inserting it back into Eq. 15 gives a linear relation between timing jitter downstream and initial RF jitters. It has been shown in [5] that a data-driven model based on linear regression can accurately predict shot-to-shot fluctuation in time of arrival, so our model is validated by the observation. Derivatives of higher orders can be included for larger fluctuation of phase and amplitude, which effectively yields a Taylor map between initial RF jitter and final timing jitter. In addition, the semi-analytical model allows extraction of derivatives for cavities with realistic field maps by incorporating a numerical interpolator; see [13] for a python implementation. Jitter calculations for a 1.6 cell and 1.4 cell gun will be presented in Sec. IV.

We compare the timing jitters at exit ( z =0.1 m) of the 1.5 cell S-band RF gun obtained by different methods. For benchmark, we generate a 10 fC electron beam distribution with 100 µ m radius and 60 fs FWHM duration and track its time of arrival in the same RF gun field with gpt [14]. 100 simulations with different random realizations of the RF amplitude and phase were performed and the fractional amplitude and phase jitter values were randomly generated with a normal distribution with respective rms values of 500 ppm and 0.1 degree. As a benchmark, the magnitude of jitter values are larger than typically achieved values. As depicted

FIG. 2. Comparison of timing jitters at gun exit obtained by different methods.

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00937v2-figure-48c9e3a2-5a49-48b1-bae8-310d26758daa.jpg)

in Figure 2, the analytical approximate solution overestimates the magnitude of timing jitters while the jitters calculated with semi-analytical model agree well with the gpt results (maximum deviation within 0.1 fs).

For calculations involving cascaded cavities, i.e., a buncher at the downstream of an RF gun, the dependence on upstream energy jitter needs to be included,

$$\begin{pmatrix} d \phi _ { f, b } \\ d \gamma _ { f, b } \end{pmatrix} = \begin{pmatrix} \frac { \partial \phi _ { f, b } } { \partial \phi _ { i, b } } & \frac { \partial \phi _ { f, b } } { \partial \alpha _ { b } } & \frac { \partial \phi _ { f, b } } { \partial \gamma _ { f, g } } \\ \frac { \partial \gamma _ { f, b } } { \partial \phi _ { i, b } } & \frac { \partial \gamma _ { f, b } } { \partial \alpha _ { b } } & \frac { \partial \gamma _ { f, b } } { \partial \gamma _ { f, g } } \end{pmatrix} \begin{pmatrix} d \phi _ { i, b } \\ d \alpha _ { b } \\ d \gamma _ { f, g } \end{pmatrix} \quad ( 2 0 ) \quad \text{$\text{$of$RF$} } \\ \text{$color$}$$

here dϕ i, b is the total buncher phase jitter analogous to Eq. 3 and includes the phase jitter dϕ ˆ i, b from the buncher cavity, synchronization jitter between laser and RF, and arrival time jitter at buncher entrance dt tot,g . The timing jitter downstream of the buncher can be calculated similarly as Eq. 15.

Given the layout, cavity field maps, and operating parameters of a beamline, the numerical relation between RF and temporal jitter can be obtained from Eq. 15, with the Jacobian matrix in Eq. 18 and Eq. 20 calculated from a differentiable solver. The magnitude of temporal jitter can then be estimated based on performance of the klystron and laser-to-RF synchronization. In the following section, we'll use the approach to study the impact of RF jitters in the SLAC MeV-UED instrument.

The single particle model described above can also be used to describe evolution of bunch duration due to RF effect [3]. Considering two particles emitted at time -τ i 2 and τ i 2 , the final bunch duration is given by,

$$\tau _ { f } = \tau _ { i } + d t _ { t o t, g } ( \frac { \tau _ { i } } { 2 \omega }, 0 ) - d t _ { t o t, g } ( - \frac { \tau _ { i } } { 2 \omega }, 0 ) \quad ( 2 1 ) \quad \text{tively} \\ \text{part},$$

For strongly compressed beams, longitudinal space charge plays an important role near the waist position and the single particle model fails to predict the correct bunch duration near the waist. A more thorough treatment is needed to include this scenario [15] and is beyond the scope of this work.

## IV. TEMPORAL RESOLUTION OF THE SLAC MEV-UED INSTRUMENT

## A. 1.6 Cell and 1.4 Cell Gun

The SLAC MeV-UED instrument has been developing robust methods to generate ultrashort electron bunches with low arrival time jitters [6]. Currently, an LCLStype 1.6 cell S-band photocathode rf gun serves as the electron source [16]. A 1.4 cell gun is being considered as the next generation electron source as it provides higher extraction field and bunch compression [17, 18].

Here we compare the bunch length and timing jitter of the electron bunches produced from the 1.6 cell and 1.4 cell gun for different initial phases at z = 1 55m (sample . location). Both guns are assumed to operate at nominal gradients of 90 MV/m with α g = 1 47 . . The timing jitters are calculated using our semi-analytical method, and the bunch length is modeled with particle tracking code gpt . For the jitter sources, we assume the fractional klystron voltage jitter to be 20 ppm (rms), and laser-to-rf synchronization jitter to be 10 fs (rms) [19]. The correlation coefficient between phase and klystron jitter K is -14.6 based on specification of the ScandiNova klystron system currently in use at the SLAC facility. The effects of RF feedback systems are not included in the jitter calculation and therefore the jitter values should be slightly overestimated.

The results of the timing jitter and bunch length simulation are shown in Figure 3. The 1.6 cell gun doesn't provide significant bunch compression and the bunch length continues to grow when increasing the launch phase. This can be understood by looking at the energy dependence of the launch phase as shown in Figure 4(a). The tail particles (higher phase) don't gain much more energy than the head particles and therefore can't catch up in velocity bunching. The slope of the energy-phase curve flips at higher emission phases and the bunch will be lengthened. During the transition, there exists a nominal launch phase that minimizes the temporal jitter. Using the approach from Sec. III, at the launch phase of 38 degree, the relation between timing jitter and amplitude jitter and phase jitter can be expressed as,

$$d t _ { g, t o t } ( \text{ps} ) = - 5 3. 6 9 d \alpha _ { g } - 6. 5 7 4 d \phi _ { i, g } \quad ( 2 2 )$$

Since the phase jitter induced by klystron dϕ ˆ i, g is negatively correlated to the amplitude jitter by Eq. 12, a large part of the RF-induced timing jitter is cancelled. Similar phenomenon exists in linear accelerators where a certain post-crest acceleration angle can minimize klystroninduced energy variations [20].

The 1.4 cell gun provides a much stronger bunch compression than the 1.6 cell gun as the energy gain increases with the initial phase with a larger slope. For the desired sample location, the minimum bunch duration achieved is 5 fs when operating at an initial phase of 26 degree. However, the stronger bunch compression is accompanied by larger timing jitters. As shown in Figure 4(b), when operating at linear part of the energy-phase curve, the exit energy is sensitive to initial phases jitters. The energy jitters are then converted into timing jitters in the drift after the gun.

Assuming negligible velocity mismatch between pump and probe, and including pump laser duration (25 fs rms), electron bunch length and timing jitter, the 1.6 cell gun achieves an overall temporal resolution of 46 fs (rms) when operating at 25 degree. The optimal phase for temporal resolution deviates from the phase of minimum jitter (around 40 degree) since the temporal resolution is dominated by the electron bunch length. For the 1.4 cell gun, the optimal temporal resolution is 33 fs when operating at 27 degree and the dominant contribution is the timing jitter and pump laser duration.

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00937v2-figure-b28132da-9e4a-4ea1-a591-d0b8cf73cf36.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00937v2-figure-8496e19a-c4be-40ff-9863-e2bdfb983b25.jpg)

FIG. 3. Bunch length and arrival time jitter at sample plane downstream of the 1.6 cell gun (a) and 1.4 cell gun (b) for different initial phases. The blue traces denote the evolution of rms bunch length for different gun phases. The colored scatter plots denote the timing jitters corresponding to different klystron jitters.

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00937v2-figure-5cefef4a-f0bd-4be5-96a2-7390da49eca3.jpg)

We consider a beamline with a 1.6 cell gun followed by a 5-cell S band buncher operating at 25 MV/m at z = 0 75m from the cathode. . We scan the initial phases for gun and buncher and perform particle-in-cell simulation to find the minimum bunch lengths for each initial phases and the corresponding waist locations. The timing jitters at waist locations are calculated using the klystron and synchronization parameters in Sec. IVA, assuming the gun and buncher are powered by the same klystron-the fractional amplitude and phase jitters for the two cavities are identical. The calculation is then repeated for the scenario where the RF phase and amplitude jitters for gun and buncher are independent. The results of the minimum bunch lengths and the difference in timing jitters for the two cases are shown in Figure 5. For the same-klystron configuration, the rms timing jitters at waist do not show clear dependence on the initial phases of gun and buncher and are around 18 fs for the phase range considered. The dependence is more prominent for the different-klystron configuration and timing jitter is larger when operating at higher gun phases. The advantage of the same-klystron configuration only becomes apparent at higher gun phases.

FIG. 4. Exit energy, and its slope w.r.t phase (in radian) for different initial phases of 1.6 cell gun (a), 1.4 cell gun ((b), 1.6 cell gun and buncher (c). The solid and dashed trace correspond to gun initial phases at 30 and 70 degrees.

## B. Gun and Buncher

RF buncher provides another path to bunch compression and improvement of temporal resolution. As discussed in the previous section, a stronger bunch compression can result in larger timing jitter. In this scenario, since there are two RF cavities in the beamline, this raises the question of whether using the same klystron for both the gun and buncher could reduce overall timing jitter and provide benefits [21].

The mechanism of jitter reduction in a gun-buncher beamline can be understood in two aspects. The timing jitter at buncher entrance dt tot g , is generally suppressed after the buncher due to the process of bunch compression. This reduction happens regardless of whether the gun and buncher are powered by the same klystron or not. The energy jitter dγ f, g can be compensated in the same-klystron configuration at higher gun phases as the dependence of energy with w.r.t phase, ∂γ f, g ∂ϕ i, g and ∂γ f, b ∂ϕ i, b , have opposite signs and are close in absolute values (see Figure 4 (c)). The energy jitter at buncher exit, and the time-of-flight jitter downstream of the buncher, is then reduced in this operating regime.

The optimal temporal resolution achieved by the 1.6 cell gun and the buncher is around 31 fs for the two configurations (gun and buncher powered by same or different klystrons). We also considered a beamline with the 1.4 cell gun and the buncher and found the level of ar-

FIG. 5. (a) Minimum bunch lengths achieved at different gun and buncher phases. (b) Difference of timing jitters when the two cavities are powered by different and same klystrons.

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00937v2-figure-d0d7394b-e582-45da-95f6-9df796f6b39a.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00937v2-figure-b3938411-763c-4bce-aa14-4d035fa90833.jpg)

TABLE I. RMS bunch length, arrival time jitter, and temporal resolution of different beamline configurations. The temporal resolution is calculated including the contribution of pump laser duration σ pump =25 fs and assumes klystron voltage jitter of 20ppm (rms) and laser-to-rf synchronization jitter of 10fs (rms).

|                        |   σ t (fs) |   σ jitter (fs) |   σ res (fs) |
|------------------------|------------|-----------------|--------------|
| 1.6 cell gun           |         37 |               6 |           46 |
| 1.4 cell gun           |          7 |              20 |           33 |
| 1.6 cell gun + buncher |          6 |              18 |           31 |
| 1.4 cell gun + buncher |          4 |              18 |           31 |

rival time jitter is similar. For brevity, the corresponding graphs are not included. The rms bunch duration, arrvial time jitter and temporal resolution of a 1.4 cell gun and buncher beamline are summarized in Table I along with other beamline configurations. Overall, the main contribution to temporal resolution in a gun-and-buncher beamline is the arrival time jitter and finite pump duration.

## C. Jitter Correction

When the temporal resolution is dominated by the timing jitters, the approach outlined in Section III serves as a virtual timing tool to predict the RF-induced timing jitter. Since RF amplitude and phase jitters are collected every shot, the measured RF jitter values allow direct calculation of timing jitters with our approach. The predicted time jitter values can be used to sort the corresponding diffraction data and partially correct the arrival time jitters-the effect of laser-to-rf synchronization error remains and cannot be corrected.

We evaluate the correction approach by considering the timing jitters of the 1.4 cell gun beamline and the 1.6 cell gun and buncher beamline from previous sections. The 1.4 cell gun is assumed to operate at 26 deg, while

FIG. 6. Comparison of timing jitters with and without jitter correction for 1.4 cell gun and buncher.

![image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00937v2-figure-8e822083-4bce-4b53-aac0-113642fe4d42.jpg)

the 1.6 cell gun and buncher operate at 30 deg phase and zero crossing respectively and are powered by different klystrons. We vary the level of klystron voltage jitter and calculate the rms timing jitter with and without correction. The rms value of laser-to-rf locking error is assumed to be 10 fs. The results of the calculation are shown in Figure 6. The correction scheme reduces the jitters across different klystron jitter levels, with the residual jitter limited by laser-to-rf synchronization performance. To minimize the residual jitter, a THz streaking structure can be used to directly measure the time jitters relative to pump laser [22-24].

## V. CONCLUSION

In summary, we have presented a semi-analytical method for calculating RF-induced timing jitters from cavity and klystron parameters. The method is based on a single particle dynamics model and directly con-

nects the RF and temporal jitters via simple numerical relations. The semi-analytical model yields good agreement with results from particle-in-cell simulation and allows fast evaluation of temporal resolution in MeV-UED beamlines.

To demonstrate our method, we assessed the temporal resolution of the SLAC MeV-UED instrument under different configurations. Specifically, we show that operating the 1.6 cell gun at a nominal launch phase can minimize the timing jitter due to the correlation between klystron phase and amplitude jitter. The performance of a proposed 1.4 cell gun is examined and we found that the overall temporal resolution achieved is dominated by the temporal jitter. Additionally, we considered a beamline with a 1.6 cell gun and an RF buncher to improve temporal resolution. The timing jitters are compared for the two scenarios where the gun and buncher are powered by same or different klystrons, and we showed that the same-klystron configuration can achieve reduced jitter especially at higher gun launch phases.

Improvement of temporal resolution in an MeV-UED instruments requires minimizing both electron bunch duration and timing jitters. Our proposed method enables rapid calculation of timing jitters and can be integrated

- [1] D. Filippetto, P. Musumeci, R. K. Li, B. J. Siwick, M. R. Otto, M. Centurion, and J. P. F. Nunes, 'Ultrafast electron diffraction: Visualizing dynamic states of matter,' Rev. Mod. Phys. , vol. 94, p. 045004, Dec 2022.
- [2] K.-J. Kim, 'Rf and space-charge effects in laser-driven rf electron guns,' Nucl. Instrum. Methods Phys. Res., Sect. A , vol. 275, no. 2, pp. 201-218, 1989.
- [3] R.-K. Li and C.-X. Tang, 'Temporal resolution of MeV ultrafast electron diffraction based on a photocathode rf gun,' Nucl. Instrum. Methods Phys. Res., Sect. A , vol. 605, no. 3, pp. 243-248, 2009.
- [4] B. Alberdi Esuain, J.-G. Hwang, A. Neumann, and T. Kamps, 'Novel approach to push the limit of temporal resolution in ultrafast electron diffraction accelerators,' Scientific Reports , vol. 12, no. 1, p. 13365, 2022.
- [5] F. Cropp, L. Moos, A. Scheinker, A. Gilardi, D. Wang, S. Paiagua, C. Serrano, P. Musumeci, and D. Filippetto, 'Virtual-diagnostic-based time stamping for ultrafast electron diffraction,' Phys. Rev. Accel. Beams , vol. 26, p. 052801, May 2023.
- [6] S. Weathersby, G. Brown, M. Centurion, T. Chase, R. Coffee, J. Corbett, J. Eichner, J. Frisch, A. Fry, M. G¨ uhr, et al. , 'Mega-electron-volt ultrafast electron diffraction at slac national accelerator laboratory,' Review of Scientific Instruments , vol. 86, no. 7, 2015.
- [7] J.-S. Oh, T. Hara, T. Inagaki, T. Shintake, and K. Shirasawa, 'Stable RF Phase Insensitive to the Modulator Voltage Fluctuation of the C-band Main Linac for SCSS XFEL,' in Proc. FEL'06 , pp. 684-687, JACoW Publishing, Geneva, Switzerland, 2006.
- [8] Y. Liu, H. Matsumoto, L. Li, and M. Gu, 'Analysis the influence of pulse-to-pulse stability of modulator on highpower microwave output of pulsed klystron,' SN Applied

with particle tracking code to optimize the overall performance of UED beamlines. For example, optimization of RF phase and amplitudes of multiple cavities could lead to simultaneous improvement of bunch duration and timing jitters [4, 21]. The operating phase of the RF gun can also be chosen to minimize the timing jitters at gun exit, with downstream jitters compensated by a magnetic compressor [25, 26]. When the timing jitter is dominated by the contribution from klystron voltage variation, our approach also allows shot-to-shot calculation of time-ofarrival for online jitter correction.

## VI. ACKNOWLEDGEMENTS

We thank Lili Ma (SLAC) for useful discussion on laser-to-rf synchronization. This work was supported by the U.S. Department of Energy Office of Science, Office of Basic Energy Sciences under Contract No. DE-AC0276SF00515. The SLAC MeV-UED program is supported by the U.S. Department of Energy Office of Science, Office of Basic Energy Science under FWP 10075, FWP 100713, and FWP 100940.

Sciences , vol. 4, no. 1, p. 4, 2022.

- [9] A. G. Baydin, B. A. Pearlmutter, A. A. Radul, and J. M. Siskind, 'Automatic differentiation in machine learning: a survey,' Journal of machine learning research , vol. 18, no. 153, pp. 1-43, 2018.
- [10] M. Berz, Modern map methods in particle beam physics , vol. 108. Academic Press, 1999.
- [11] J. Bradbury, R. Frostig, P. Hawkins, M. J. Johnson, C. Leary, D. Maclaurin, G. Necula, A. Paszke, J. VanderPlas, S. Wanderman-Milne, and Q. Zhang, 'JAX: composable transformations of Python+NumPy programs,' 2018.
- [12] D. Izzo, F. Biscani, and A. Mereta, 'Differentiable genetic programming,' in Genetic Programming: 20th European Conference, EuroGP 2017, Amsterdam, The Netherlands, April 19-21, 2017, Proceedings 20 , pp. 3551, Springer, 2017.
- [13]
- 'https://github.com/alfven17/ued-timing-jitter.' https://github.com/Alfven17/ued-timing-jitter . [Code example for calculating Jacobian matrix].
- [14] 'General Particle Tracer.' https://www.pulsar.nl/ gpt/index.html .
- [15] P. Denham and P. Musumeci, 'Analytical scaling laws for radiofrequency-based pulse compression in ultrafast electron diffraction beamlines,' Instruments , vol. 7, no. 4, 2023.
- [16] R. Akre, D. Dowell, P. Emma, J. Frisch, S. Gilevich, G. Hays, P. Hering, R. Iverson, C. Limborg-Deprey, H. Loos, A. Miahnahri, J. Schmerge, J. Turner, J. Welch, W. White, and J. Wu, 'Commissioning the linac coherent light source injector,' Phys. Rev. ST Accel. Beams , vol. 11, p. 030703, Mar 2008.

- [17] E. Pirez, P. Musumeci, J. Maxson, and D. Alesini, 'Sband 1.4 cell photoinjector design for high brightness beam generation,' Nucl. Instrum. Methods Phys. Res., Sect. A , vol. 865, pp. 109-113, 2017.
- [18] Y. Song, J. Yang, J. Wang, J. Urakawa, T. Takatomi, and K. Fan, 'Development of a 1.4-cell rf photocathode gun for single-shot mev ultrafast electron diffraction devices with femtosecond resolution,' Nucl. Instrum. Methods Phys. Res., Sect. A , vol. 1031, p. 166602, 2022.
- [19] L. Ma, X. Shen, K. Kim, D. Brown, M. D'Ewart, B. Hong, J. Olsen, S. Smith, D. Van Winkle, E. Williams, et al. , 'Slac ued llrf system upgrade,' arXiv preprint arXiv:1910.02296 , 2019.
- [20] E. Mansten, R. Sv¨ ard, S. Thorin, M. Eriksson, and P. F. Tavares, 'Cancellation of klystron-induced energy and arrival-time variations in linear accelerators with arc-type bunch compressors,' Phys. Rev. Accel. Beams , vol. 27, p. 040401, Apr 2024.
- [21] J. Franssen and O. Luiten, 'Improving temporal resolution of ultrafast electron diffraction by eliminating arrival time jitter induced by radiofrequency bunch compression cavities,' Structural Dynamics , vol. 4, no. 4, 2017.
- [22] L. Zhao, Z. Wang, C. Lu, R. Wang, C. Hu, P. Wang, J. Qi, T. Jiang, S. Liu, Z. Ma, F. Qi, P. Zhu, Y. Cheng, Z. Shi, Y. Shi, W. Song, X. Zhu, J. Shi, Y. Wang, L. Yan, L. Zhu, D. Xiang, and J. Zhang, 'Terahertz streaking of
- few-femtosecond relativistic electron beams,' Phys. Rev. X , vol. 8, p. 021061, Jun 2018.
- [23] R. K. Li, M. C. Hoffmann, E. A. Nanni, S. H. Glenzer, M. E. Kozina, A. M. Lindenberg, B. K. Ofori-Okai, A. H. Reid, X. Shen, S. P. Weathersby, J. Yang, M. Zajac, and X. J. Wang, 'Terahertz-based subfemtosecond metrology of relativistic electron beams,' Phys. Rev. Accel. Beams , vol. 22, p. 012803, Jan 2019.
- [24] M. A. Othman, A. E. Gabriel, E. C. Snively, M. E. Kozina, X. Shen, F. Ji, S. Lewis, S. Weathersby, P. Vasireddy, D. Luo, et al. , 'Improved temporal resolution in ultrafast electron diffraction measurements through thz compression and time-stamping,' Structural Dynamics , vol. 11, no. 2, 2024.
- [25] H. W. Kim, N. A. Vinokurov, I. H. Baek, K. Y. Oang, M. H. Kim, Y. C. Kim, K.-H. Jang, K. Lee, S. H. Park, S. Park, J. Shin, J. Kim, F. Rotermund, S. Cho, T. Feurer, and Y. U. Jeong, 'Towards jitter-free ultrafast electron diffraction technology,' Nature Photonics , vol. 14, pp. 245-249, Apr. 2020.
- [26] F. Qi, Z. Ma, L. Zhao, Y. Cheng, W. Jiang, C. Lu, T. Jiang, D. Qian, Z. Wang, W. Zhang, P. Zhu, X. Zou, W. Wan, D. Xiang, and J. Zhang, 'Breaking 50 femtosecond resolution barrier in mev ultrafast electron diffraction with a double bend achromat compressor,' Phys. Rev. Lett. , vol. 124, p. 134803, Mar 2020.
Tianzhe Xu Fuhao Ji Stephen Weathersby Robert Joel England
Calculation of RF-induced Temporal Jitter in Ultrafast Electron Diffraction
A significant contribution to the temporal resolution of an ultrafast
electron diffraction (UED) instrument is arrival time jitter caused by
amplitude and phase variation of radio frequency (RF) cavities. In this paper,
we present a semi-analytical approach for calculating RF-induced temporal
jitter from klystron and RF cavity parameters. Our approach allows fast
estimation of temporal jitter for MeV-UED beamlines and can serve as a virtual
timing tool when shot-to-shot measurements of RF amplitude and phase jitters
are available. A simulation study for the SLAC MeV-UED instrument is presented
and the temporal resolution for several beamline configurations are compared.