Start-to-end simulation of the shot-noise driven microbunching instability experiment at the Linac Coherent Light Source

The shot-noise driven microbunching instability can significantly degrade electron beam quality in x-ray free electron laser light sources. Experiments were carried out at the Linac Coherent Light Source (LCLS) to study this instability. In this paper, we present start-to-end simulations of the shot-noise driven microbunching instability experiment at the LCLS using the real number of electrons. The simulation results reproduce the measurements quite well. A microbunching self-heating mechanism is also illustrated in the simulation, which helps explain the experimental observation. off. A stronger microbunching effect is observed with very small heating.


I. INTRODUCTION
The microbunching instability seeded by shot noise and driven by collective effects (primarily space charge) can significantly degrade the quality of the electron beam before it enters the free electron laser (FEL) undulators. An initial small density modulation inside the electron beam (even from shot noise) can cause sufficient energy modulation from the longitudinal space-charge force in a section of the linear accelerator. Such energy modulation causes larger density modulation through a dispersive magnetic optics element such as a chicane. With multiple dispersive elements, the amplified density modulation further drives even larger energy and density modulations downstream in the accelerator. Without proper control of the instability, the large final electron beam energy spread and phase space filamentation degrade the x-ray FEL performance.
The microbunching instability has been extensively studied in theory, simulation and experiment [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18]. However, only recently, a series of experiments were carried out at the Linac Coherent Light Source (LCLS) to study the microbunching instability in detail [17]. With the help of an X-band transverse deflecting cavity (XTCAV) [19], the longitudinal phase space can be imaged at the end of the accelerator revealing the detailed structure arising from the microbunching instability. To better understand these experimental results, we have done start-to-end macroparticle simulations using a real number of electrons on a high performance large scale computer. This also provides a validation of the computational model used in the simulation.
The organization of this paper is as follows: after the introduction, we present the computational setup used in this study in Sec. II, the simulation results together with the experimental measurements in Sec. III, and draw conclusions in Sec. VI.

II. COMPUTATIONAL SETUP
All simulations presented in this study were done using a 3D parallel beam dynamics simulation framework IMPACT [20][21][22]. It includes a time-dependent space charge code module IMPACT-T to model photoelectron beam generation and acceleration through the S-band photo rf gun and the traveling wave boosting cavity L0A, and a positiondependent 3D space-charge code module to simulate electron beam transport through the rest of the traveling wave linac system.
The self-consistent space-charge effects are modeled using a quasistatic particle-in-cell method in which macroparticles are deposited onto a computational grid in the electron beam frame to obtain charge density distribution. Then the free space 3D Poisson equation in the beam frame is solved using an integrated Green's function method with the fast Fourier transform to efficiently compute the convolution of the Green's function and the 3D charge density distribution on the grid [21]. The space-charge electric fields are calculated in the beam frame and then transformed back to the laboratory frame. The space-charge electric and magnetic fields in the laboratory frame are used to advance macroparticle momenta for each step. The computational grid used to solve the Poisson equation is 64 × 64 × 2048. Such a computational grid has a longitudinal resolution of about 1 micron before the bunch compressor 1 (BC1), which is smaller than the wavelength of the maximal space-charge impedance (a few microns to 10 microns) before the BC1. However, this resolution is not sufficient to resolve the modulation (∼1 micron) after the laser heater from the "trickle heating" effect [23]. This effect was not simulated in this study.
Besides the 3D space-charge effects, the simulation also includes one-dimensional (1D) coherent synchrotron radiation (CSR) effects through a bending magnet, incoherent synchrotron radiation inside the bending magnet, the longitudinal wakefields of rf structures, and the longitudinal resistive wall wakefields of long transport lines. The 1D CSR wakefields are calculated from where W CSR is the longitudinal CSR wake function in the time domain and λ is the line density function of the electron beam. Both the steady-state CSR wake function (without the ultrarelativistic approximation) and the transient CSR wake functions at the entrance and the exit drift space in Ref. [24] are used in the CSR wakefield calculation. The above convolution was effectively computed using the integrated Green's function method [25,26]. The longitudinal structure and resistive wall wakefields are calculated using the following convolution: where s max is the bunch head location and W L is the longitudinal wake function in the time domain. The longitudinal structure and resistive wall wake functions are precalculated using the rf cavity parameters and the conducting pipe parameters. These wake functions are stored in a table for the wakefield convolution calculation and shown in Fig. 1. In this study, the structure wakefield was included through each rf cavity cyromodule. The resistive wall wakefield was included through the 275 meter long dogleg two (DL2) region and through the 130 meter long undulator region. There is no other tuning parameter used for these wakefields in the simulation. Following the analytical model in Ref. [5], inside the laser heater, we simulated the energy modulation on electron beam (from laser-electron resonance interaction) through the undulator using an analytical model: where σ E;LH is the rms energy spread resulting from this laser-heater induced energy modulation assuming a symmetric electron beam Gaussian distribution in the transverse plane with rms size σ x ¼ σ y , σ x the electron beam root-mean-square (rms) horizontal beam size at the middle of the undulator, σ l the laser spot size, k the laser wave number, and s the bunch length coordinate. The above equation is valid under the assumption that we can neglect the variations of the electron and laser beam transverse sizes along the laser-heater undulator. All simulations were done using the real number of electrons (1.125 × 10 9 ) for the 180 pC bunch charges, to capture the initial shot noise of the beam. The total computational time is about 10 hours running in parallel on thousands of processors at the NERSC supercomputer center [27]. Figure 2 shows a schematic plot of the LCLS accelerator layout used for the microbunching instability experiment. It consists of an S-band photoelectron gun, a short section of linac (L0) before the laser heater, two bunch compressors and three linac sections. The laser heater [23] before the linac section one (L1) includes a small momentum compaction factor chicane with an undulator located between the second dipole and the third dipole, and a 800 nm laser. It increases the uncorrelated slice energy spread of the beam after the laser heater and helps mitigate the microbunching instability. Another 1 keV uncorrelated energy spread is added to the beam before the laser heater to account for the intrabeam scattering effects through the injector. The effects of the intrabeam scattering after the laser heater were not included in the simulation since the uncorrelated energy spread induced by the laser heater is much larger than that from the intrabeam scattering. The bunch compressor two (BC2) is used to control the final peak current while the linac section 3 (L3) is used to control the final beam energy for the user experiments.

III. SIMULATION RESULTS
The simulation starts from emission of photoelectrons at the cathode. The initial transverse laser profile is a Gaussian distribution with 1 mm rms size and truncated at 0.5 sigma, the longitudinal profile also has a Gaussian distribution with 1 ps rms bunch length and truncated at 2.5 sigma. The initial normalized thermal emittance is about 0.2 μm. This distribution was sampled using a random Monte Carlo method [28] with 1.125 billion macroparticles. The beam energy out of the gun is about 6 MeV, then it is accelerated in the L0 linac to 135 MeV before the first dogleg (DL1). In the main linac, it is further accelerated to 250 MeV at bunch compressor BC1 and to 5 GeV at bunch compressor BC2, and deaccelerated down to 4.3 GeV at the end of the accelerator. Figure 3 shows the transverse rms size and the rms bunch length evolution through the accelerator. The transverse size is reasonably well matched to the reference optics parameters in the entire accelerator with less than 100 μm rms size. At the laser heater undulator location, we assumed that the laser beam transverse size is a factor of 2 larger than the electron beam size, which is consistent with the experimental settings. The rms bunch length out of the injector is about 0.5 mm and is compressed to about 0.06 mm after the bunch compressor BC1 and further compressed to about 0.02 mm after the BC2. The compression factor at BC1 is about 8 and about 3 at BC2.
Before comparing the final simulation results with the XTCAV measurements, we show longitudinal phase space and current profile evolution at a few locations of the LCLS accelerator. Figure 4 shows the simulated electron beam current profile and longitudinal phase space before DL1, after the bunch compressor BC1, and after the dogleg two (DL2). The peak current out of the rf gun is about 35 A. The final peak current at the end of the accelerator is about 1 kA in this study. The laser heater was turned off in this example. The effects of microbunching instability can be seen even after BC1. The peak current after BC1 is about 300 A with significant fluctuation around the core of the beam. The final longitudinal phase space after the DL2 shows large fluctuation from the microbunching instability. The large spike in the current profile after DL2 is mostly caused by the nonlinear chirp in the longitudinal phase space after BC1.
In the microbunching measurement at LCLS, the XTCAV diagnostic is located downstream of the undulator before the dump. This deflector includes two 1-m-long X-band rf deflecting structures, providing a time-dependent horizontal kick on the beam [19]. It is followed by a vertically bending spectrometer magnet, and the beam is imaged onto a downstream screen. With this arrangement, the horizontal dimension of the measured image represents time while the vertical dimension represents energy. Thus, the XTCAV system provides a direct measurement of the electron beam time-energy phase space after calibration. In the simulations, we track the beam down to the XTCAV screen and compare with the measurements. Figure 5 shows the final longitudinal phase space after the XTCAV from the experimental observation and from the simulation with laser heater turned off for the 1 kA study case. In all measurements reported here (and in our simulations) the undulators were pulled out to avoid FEL lasing. Here, a strong phase space fluctuation due to the microbunching instability can be seen from both the measurement and the simulation. There is no external seeded initial modulation. This large fluctuation arises from the shot-noise inside the beam and is amplified by collective effects, especially space charge effects through the accelerator. To quantify the comparison between the simulation and the measurement, Fig. 6 shows the final current profile and the bunching factor of the Fig. 5 longitudinal phase-space charge distribution from both the measurement and the simulation. Here, the bunching factor jbðkÞj is defined as [17] bðkÞ where IðzÞ is the core current profile (solid line in the plot), k ¼ 2π=λ the wave number, L the core bunch length (∼30 μm), ΔIðzÞ ¼ IðzÞ=I 0 ðzÞ − 1 relative fluctuations around the "smoothed" average current I 0 ðzÞ. Both current profile and the bunching factor show reasonable agreement with those from the measurements. The microbunching instability can be suppressed through Landau damping by increasing the electron beam uncorrelated energy spread before the bunch compressor using the laser heater. Figure 7 shows the final longitudinal distribution (at ∼15 μm in Fig. 7) comes from the effects of resistive wall wakefield in the long, narrow undulator chamber. The dip near the tail of the distribution is due to the longitudinal space-charge and coherent synchrotron radiation effects from the large current spike near the tail of the electron beam. Figure 8 shows the final current profile and the bunching factor of the Fig. 7 longitudinal phasespace charge distribution from both the measurement and the simulation with 19 keV uncorrelated slice energy spread from the laser heater. The current profiles and bunching factors from the measurements and the simulations agree with each other quite well.
In another study, we simulated a lower final peak current case (500 A). Figure 9 shows the final longitudinal phase space from the XTCAV measurement and from the start-toend simulation with the laser heater turned off. Again, a strong modulation caused by the microbunching instability is observed from both the measurement and the simulation. Figure 10 shows the final current profile and the bunching factor of the Fig. 9 longitudinal phase space-charge distribution from both the measurement and the simulation. The general current profiles agree quite well between the measurement and the simulation, while the bunching factor from the simulation shows peak around shorter wavelength than that from the measurement. Figure 11 shows the final longitudinal phase space with 19 keV extra energy spread from the laser heater. The modulation is reduced significantly in comparison to the zero laser heater setting. The simulation also reproduces the longitudinal phase space distribution of the electron beam quite well. Figure 12 shows the final current profile and the bunching factor from the Fig. 11 longitudinal phase-space charge distribution. The current profile and bunching factor from the simulations show reasonable agreement with those from the measurements.
Besides the microbunching structure in the beam, the time-resolved energy spread is also an important parameter to study. The initial energy spread can be controlled by the laser heater at the injector area, and the final slice energy spread is retrieved from the XTCAV measured longitudinal phase space images. To avoid the variation in the head/tail area, we only use the core 30% part of the beam (∼15 μm for the 1 kA case and ∼30 μm for the 500 A case) for the slice energy spread analysis. Figure 13 shows the final slice energy spread (SES) after the undulator (FEL off) as a function of the laser heater induced slice energy spread from both the simulations and the measurements. The simulation results show similar laser heater induced energy spread dependence to the measurements. Both show the same amount of extra energy spread needed from the laser heater in order to achieve the minimum final slice energy spread. The 1 kA final current results in larger final energy spread than the 500 A current does, which is expected from the collective effect model and is seen in both simulations and measurements. However, the absolute values of the slice energy spread from the simulations are smaller than those from the measurements. These discrepancies might be due to some systematic errors in the experimental measurements or some unknown mechanism in the accelerator that was not included in the simulation. Introducing a transverse mismatch after BC1 did not make a significant change to the final slice energy spread. Further studies to understand this discrepancy should be carried out in the future.
As we can see from Fig. 13, one can have an optimal operating point for the laser heater to achieve a minimum final slice energy spread. In general, when the laser heater is turned off, the strong microbunching effects lead to large energy spread. With the laser heater on, it helps suppress microbunching instability and results in smaller energy spread. However, in the experimental measurement, an interesting observation is that with a very small laser heater induced energy spread setup, the final energy spread is even larger than the case with the laser heater off [see the data in Fig. 9(b) of Ref. [17]]. This seems to be against the quick expectation that larger initial uncorrelated energy spread from the laser heater helps suppress microbunching instability and results in smaller final energy spread. Note this is in the trickle heating regime as reported earlier [23], where the energy spread after the heater is larger than expected from laser heating since the space charge effects in a transverse-longitudinal correlated beam make additional energy spread increase and helps suppress the microbunching instability. But this does not explain the larger final energy spread than laser heater off from the measured data. We studied this case in simulations and explain the physics in the following.
We checked the energy spread evolution along the machine with two cases: (1) laser heater off and (2) laser heater with 3 keV induced energy spread. The final beam current is 1 kA. With laser heater off, it starts with a very low initial energy spread, and this is preserved at the early stage of the machine. In Fig. 14(a) we see before bunch compressor BC1, the uncorrelated energy spread is still smaller than that with the laser heater on. However, in linac L2, the heater off case with lower initial energy spread leads to a larger energy spread before BC2, as we can see in Fig. 14(b). This is because the stronger microbunching instability in the case with the laser heater off causes larger uncorrelated energy spread after the bunch compressor BC1. This larger uncorrelated energy spread results from the longitudinal phase space mixing of different wavelength modulations through the BC1 [12,16,17]. Such larger energy spread (with laser heater off) before the bunch compressor BC2 now helps reduce microbunching instability gain downstream and results in a smaller final energy spread in comparison to the case with small 3 keV laser heater induced energy spread as shown in Fig. 14(c). Figure 15 shows the final longitudinal phase space with 3 keV laser heater induced energy spread. Compared with the longitudinal phase space in Fig. 5 phases space and energy spread, which is consistent with the experimental observation.

IV. CONCLUSIONS
In summary, the start-to-end macroparticle simulations using the real number of electrons reproduce the microbunching instability experimental observations at the LCLS quite well. There is no additional adjustable parameter used in the simulations to fit the data besides the experimental settings. The microbunching instability arising from the electron beam shot noise can significantly degrade the final beam quality without the help of the laser heater. The use of the laser heater helps mitigate the microbunching instability and drastically reduces final electron phase space fluctuation, which is observed from both the measurements and the simulations. The final energy spread dependence on the laser heater induced slice energy spread from the measurements and the simulations shows similar trends and have the same minimum locations even though the absolute values from the measurements are about 50% larger than those from the simulations. The simulations also illustrate a microbunching self-heating mechanism that helps explain the data observed in the experimental measurements. These results help validate the simulation model and improve our confidence in future x-ray light source accelerator design study such as LCLS-II [29,30].