# The SXFEL Upgrade: From Test Facility to User Facility
## 2 Main Parts of the SXFEL User Facility
### Undulator Lines and the FEL Performance  
After the switchyard, the electron bunches are separately directed into two undulator lines: one is a newly built SASE line and the other is a seeding line upgraded from the test facility with some new undulator segments. The seeding line will be operated with either the single-stage EEHG [39] or EEHG-HGHG cascade scheme [10]. The layouts for these undulator lines with different setups are shown in Figures 7 and 8. Figure 5: Lattice functions (**left**) and emittance evolution (**right**) of the beam switchyard. Figure 6: Beam longitudinal phase space at the end of the beam switchyard. Figure 7: Schematic layout of the SASE line. The SASE line consists of ten 16-mm-period in-vacuum undulators with minimum working gap as small as 3.7 mm and K of about 1.8. With a beam energy tuning from 0.8-1.35 GeV, the FEL radiation of this undulator line can easily cover the water window range. The shortest wavelength achievable is about 2 nm. Figure 9 shows the Genesis [40] simulation results of the SASE output at 2 nm, where the FEL saturation appears at around 40 m with the peak power of about 120 MW. The relative bandwidth (FWHM) of the SASE pulse at saturation is about \(5\times 10^{-4}\). In Figure 7, one can also find small chicanes between the undulator segment, which are designed for advanced operation options, such as Optical Klystron [41,42], high-brightness SASE [43], fresh-slice [44,45], etc. For the seeding undulator line, there are two basic operation modes: single stage EEHG and EEHG-HGHG cascade. Two 80-mm-period modulators with total length of 1.5 m are adopted for the energy modulations of EEHG. The long radiator consists of 18 undulators with four different types. The first undulator (diagnostic undulator) of the radiator is designed for the optimization of the EEHG at different harmonics. With two magnetic periods, 30 mm and 50 mm, that can be switched horizontally, this undulator can cover the wavelength from 3 nm to 66 nm, as shown in Figure 10, which is 4 th-90 th harmonics of the 266 nm seed laser, for a fixed beam energy. After the diagnostic undulator, there are five 30-mm-period undulators (U30) followed by 10 undulators with the period of 23.5 mm (U235), as shown in Figure 8a. By replacing the 6 th and 8 th undulators of the radiator with 3-m-long chicanes and the 7 th undulator with a 30 mm-period undulator, the seeding line can also operate with the EEHG-HGHG cascade scheme. It is worth noting here that the U30s are designed for the FEL cascade operation modes. It is not used for generating FEL pulses for users since the source point of U30 will be moved significantly upstream with respect to that of U235. Figure 8: Schematic layouts of the seeding line with different setups: (**a**) single-stage EEHG; (**b**) EEHG-HGHG cascade. Figure 9: Simulation results for SASE at 2 nm: radiation pulse (**left**) and single-shot spectrum (**right**) at saturation. Figure 11 shows the simulation results for a single stage EEHG with the output wavelength at around 5.9 nm. The bunching factor of EEHG at about 5.9 nm is around 8%, which is large enough to initiate coherent radiation in the following radiator. The saturation length is about 15 m. The peak power of output is about 800 MW with the transform-limit bandwidth. For the 3 nm radiation, with a harmonic number of 90, one can find in Figure 11a that the bunching factor is relatively small, of about only 3%. In addition, the bunching at the 90 th harmonic is very sensitive to various machine parameters and 3D effects. As a result, the initial coherent radiation at 3 nm from a single-stage EEHG is relatively weak, as shown in Figure 12. The small initial bunching factor, together with the relatively large laser induced energy spread, result in a long saturation length of over 30 m for the single-stage EEHG.