1 Introduction

X-ray free-electron lasers (XFELs) are game changers for fundamental research [1,2,3,4,5,6,7,8]. They have become one of the most vigorously studied and successful new research tools, opening up new opportunities in a wide variety of fields, including atomic and molecular science, ultrafast chemistry and catalysis, fluid dynamics, clean energy systems, structural biology, high-energy density science, photon science, and advanced materials. They allow for new methods to capture rare chemical events, determining protein structures from small crystals, and revealing quantum processes in matter. All of these methods are enabled by nonlinear, multidimensional, and coherent X-ray techniques that are only achievable using X-ray lasers.

In 2017, an 8 GeV high-repetition-rate XFEL facility equipped with a continuous-wave (CW) superconducting radio frequency linear accelerator (RF linac), named SHINE, was proposed for operations in Shanghai, China [9]. To fulfill the significant user demand, the FEL wavelengths at SHINE will be available in both the soft and hard X-ray regions (from 0.4 keV to 25 keV). Thus, three undulator lines will be constructed to support different wavelength ranges, and each will be driven by the same 8 GeV electron beam from the upstream superconducting RF linac. In general, all three undulator lines are based on the self-amplified spontaneous emission (SASE) mode [10, 11], which delivers brilliant, nearly fully transversely coherent, and ultra-short X-ray pulses, but has low longitudinal coherence and poor stability.

Therefore, it will be beneficial to provide an additional option to improve longitudinal coherence and stability beyond those available using the SASE mode. In the soft X-ray regime, advanced seeding techniques will be implemented to generate stable, fully coherent pulses. In the hard X-ray regime, a self-seeding technique will be used, which can significantly enhance longitudinal coherence. The corresponding experimental results have demonstrated that the bandwidth can be reduced by a factor of 40–50 [12,13,14,15,16]. However, self-seeding schemes are based on SASE, resulting in relatively high intensity jitter. In addition to these technologies, considerable attention has recently been paid to the use of cavity-based XFELs to generate fully coherent pulses.

Cavity-based FELs are promising candidates for producing fully coherent laser-like X-ray pulses. In such FELs, X-ray pulses stored in an optical cavity are successfully amplified via interactions with fresh electron bunches as they pass through undulators. Cavity-based FELs include XFEL oscillators (XFELOs) [17,18,19,20,21] and X-ray regenerative amplifier FELs (RAFELs) [22,23,24,25,26], all of which rely on the same fundamental techniques and components to attain their full potential. In general, these systems consist of an electron bunch with a high repetition rate, an undulator to provide gain, and a crystal cavity to circulate and store the X-ray pulses. The difference between these two solutions is that XFELO employs a high-Q cavity and a low single-pass gain, whereas RAFEL uses a low-Q cavity with a relatively larger gain. Thus, RAFEL requires long undulators or shorter electron bunches with a higher peak current. In addition, the higher gain in RAFEL reduces the requirement for X-ray cavity alignment accuracy, but produces a higher output coupling and a broader spectrum. In contrast, XFELO produces the highest spectral brightness and stability.

Based on a CW superconducting linac, SHINE [9] and LCLS-II-HE [27] can provide 8 GeV electron bunches at \(\sim 1\) MHz, making them highly suitable for the operation of a cavity-based XFEL. Megahertz cavity enhanced X-ray generation within the context of SHINE (MING@SHINE) is proposed to generate X-rays in the energy range of 6–15 keV. As the most typical cavity-based XFEL, the low-gain XFELO is the major research topic in the current MING proposal. Moreover, XFELO can be expanded for RAFEL operations with long undulators. The bandwidth of XFELO pulses can be as low as a few meV, which will serve as the frontier for scientific applications in high-resolution spectroscopy, imaging, quantum optics, and nonlinear optics. As a new proposal for an X-ray laser, MING will stimulate the interest of many scientists and lead to the development of related techniques in the SHINE construction process.

2 Scientific cases

XFELO sources are distinguished by their significantly improved longitudinal coherence compared to SASE XFELs. For instance, the bandwidth of XFELO pulses can be as low as a few meV with a duration of a few hundred femtoseconds (i.e., nearly transform-limited). In contrast, radiation from the SASE XFEL has a very short temporal length (can be less than a femtosecond), and its spectral bandwidth is a few tens of eV (i.e., far away from the transform limit). Thus, the XFELO pulse is expected to have very high spectral brightness, whereas the SASE pulse has very high peak power. Additionally, the spectra of XFELO pulses are expected to consist of a single spike, whereas the SASE spectra are characterized by complicated multiple-spike structures. Furthermore, XFELOs generate extremely stable X-ray pulses with shot-to-shot variations of less than 1%, whereas the high-gain SASE and self-seeded XFEL exhibit poor pulse-to-pulse stability. Consequently, the unique characteristics of an XFELO will provide new scientific opportunities in several areas, such as spectroscopy, imaging, and higher transverse mode control. It should be noted that part of the argument in this section is taken from a report based on discussions of scientific applications enabled by an XFELO during a workshop held by the Stanford Linear Accelerator Center (SLAC) in 2016 [28]. It is also important to note that only a limited number of applications are currently available. Other XFELO applications will be discussed and planned in the future.

2.1 X-ray lasers

The development of X-ray technologies has been among the most important scientific achievements of the last century. Today, X-rays are used not only for fundamental research, but also for applications in medicine, chemistry, and public security. The research and applications of X-ray technology in various fields are strongly dependent on the development of X-ray light-source technology. The revolution in X-ray sources began with the inception of synchrotron radiation light sources, which cover the spectral range from terahertz to hard X-rays, and provide significantly higher intensities than X-ray tubes [29]. However, the synchrotron radiation light source, despite having many valuable applications, is still far from being a truly high-power X-ray laser.

Coherent, high-intensity X-ray lasers in the Ångstrom wavelength with femtosecond pulse duration allow for imaging of periodic and non-periodic systems, identifying non-crystalline structures, investigating dynamic systems far from equilibrium, and studying high-energy density science. To provide coherent laser-like X-ray pulses, significant strides have been made in the development of XFELs, which provide a very short pulse duration, extreme peak brightness, and high spatial coherence [10, 30,31,32]. These features distinguish XFELs from third-generation synchrotron light sources and establish them as the next generation of revolutionary X-ray sources.

Over the past ten years, XFEL applications have undergone significant and rapid development because of the high demand from the scientific user community, which is the driving force behind the rapid expansion of XFEL facilities and related experimental technologies. Currently, most XFELs in operation are based on the SASE mode and produce very high peak power and excellent transverse coherence in the Ångstrom wavelength region, but have limited longitudinal coherence with a relative bandwidth of 0.1%.

Following the requirements of the user communities, FEL development is currently directed toward the generation of transform-limited FEL pulses with laser-like properties [13, 17, 33,34,35,36]. Among the existing schemes capable of producing fully coherent pulses, XFELOs are highly promising candidates [17]. XFELO pulses have bandwidths as low as a few meV. In comparison to the SASE XFEL, the XFELO can be a true X-ray laser with high stability and controlled statistical properties. Thus, XFELO is an important development direction for realizing advanced X-ray lasers.

In addition, the newly proposed X-ray laser oscillator (XLO) is an alternative method for generating fully coherent X-ray pulses [37]. The XLO uses a SASE pump pulse to generate population inversion, which is a necessary step in the workings of a standard laser. Similar to other cavity-based lasers, XLO requires an X-ray cavity formed by crystal mirrors to continue the amplification process.

2.2 Inelastic X-ray scattering

Fig. 1
figure 1

(Color online) Schematic diagram of a typical setup used for the IXS experiment discussed in this section. Represented from [38]

In third-generation facilities, inelastic X-ray scattering (IXS) has proven successful in investigating many disparate aspects of material dynamics [39]. Figure 1 shows a schematic of an IXS experimental setup [38]. Methodological improvements are essential for high-resolution IXS experiments. The primary parameter of interest for most IXS experiments is spectral brightness. Therefore, high-repetition-rate XFELs in self-seeding mode, whose average spectral flux is approximately two orders of magnitude greater than what is possible with storage-ring-based radiation sources, are alternative high-spectral brightness sources for IXS applications [40]. Furthermore, an XFELO could produce approximately four orders of magnitude higher spectral flux (and seven orders of magnitude higher brightness) than existing third-generation light sources, which is superior to IXS and many other X-ray scattering technologies.

The application of XFELO in IXS was first considered in [41] using a tunable X-ray cavity. Because of the significantly increased spectral brightness of XFELO, the scope of IXS technology can be greatly expanded in previously unimaginable ways, such as fully examining materials under extreme conditions [38] and directly probing intersystem couplings to comprehend complex materials [42]. XFELO also allows one to increase the signal rate while reducing the radiation damage per scattering event. As a result, the lifetime of the sample will also be extended owing to the higher spectral flux and, correspondingly, lower integrated flux. In addition, the increased spectral flux reduces the measurement time, e.g., from a few days using older systems to only a few minutes using XFELO. Furthermore, this may stimulate completely new approaches and applications, which can have a significant influence in multiple fields.

XFELO is capable of generating X-ray pulses in the energy range of 6 to 25 keV while maintaining a high-energy resolution (meV). With an extended energy range, XFELO will increase signal rates, reduce radiation damage, and provide better capability to penetrate into different types of sample materials under different environments. The increased energy range also implies that more edges are available for resonant scattering studies as well as nuclei for nuclear resonance scattering experiments. In particular, XFELO can access the 14.4 keV resonance of \(^{57}\)Fe with extremely high spectral flux [41], allowing for more productive methods. In addition, the extended energy range and higher spectral density allow for significantly more flexible optical schemes for non-resonant techniques that can be used to probe electronic excited-state structures and study atomic dynamics with higher resolution.

In principle, resonant IXS (RIXS), where the incident beam energy is tuned to be near to the atomic transition or edge, allows the study of atomic dynamics with a resolution in the meV range [43, 44]. RIXS is currently one of the most cutting-edge areas in IXS. The resolution of hard X-ray RIXS is nearing a level of general interest in atomic dynamics, but the resolution has yet to reach the several meV level. Therefore, we see great potential benefits in exploring it in XFELO applications, as RIXS exhibits greater sensitivity to electronic excitations, magnetic excitations, complex mixed spin-charge excitations, and phonons.

Therefore, RIXS is one of the most effective methods for potentially studying complex quantum materials that present strong electronic correlations or some type of electronic order, exhibiting a plethora of exciting physical phenomena of immediate technological interest, such as superconducting or magnetic properties. Additionally, meV-RIXS has the potential for direct implementation of anomalous scattering measurements, which may help identify atomic species that contribute to specific spectral features. Although such tests require an increased resolution, they will become feasible as techniques to increase the XFELO flux are developed.

2.3 X-ray laser with extreme light

According to quantum electrodynamics (QED) theory, a vacuum can be polarized by an ultra-intense laser, thus producing two different refractive indices in the two polarization directions of the incident light. Thus, the slight differences in the refractive index of vacuum particles caused by electric and magnetic fields lead to a birefringence effect when light passes through. Although vacuum birefringence has been predicted for a long time, it has not been experimentally verified to date. Experimental verification of this effect has important implications in the field of QED [45].

Experimentally, the most likely measurement technique for vacuum birefringence requires ultra-intense lasers and X-rays with very high polarization purity [46]. After vacuum birefringence occurs, the exit beam becomes elliptically polarized. Finally, the polarization-flipped X-ray photons must be measured using a high-precision analyzer and detector. The measurement accuracy is related to the number of photons that pass through a polarimeter, which is highly dependent on the spectral brightness of the X-ray pulse. With the development of X-ray free-electron laser facilities and ultra-intense and ultrafast lasers, it should now be possible to study the phenomenon of vacuum birefringence in the laboratory.

Fig. 2
figure 2

(Color online) Concept for measuring vacuum birefringence by colliding a 100 PW laser with an XFEL beam

The 100 PW laser at the extreme light station (SEL) of SHINE [47] will be operational in 2024 and SEL will combine 100 PW laser pulses with XFEL beams at a later date. With a focus size of 5 \(\upmu\)m, the peak intensity of the 100 PW laser will reach \(10^{23}\) \(\mathrm {W/cm^2}\), which should allow for the observation of vacuum birefringence. After colliding with a 100 PW laser, the polarization purity of the 12.914 keV X-ray beam will change by a factor of \(10^{-10}\). Thus, the polarization purity of the X-ray beam is expected to be in the range of \(10^{-10}\) to \(10^{-9}\). The basic conceptual design to use SEL for measuring vacuum birefringence is shown in Fig. 2. Using this approach, the X-ray beam before collision requires a large number of X-ray photons in the laser focal volume as well as fine control of the polarization purity.

Compared to SASE, the spectral brightness of XFELO is increased by three orders of magnitude. In addition, the polarization purity of the XFELO pulses is higher because of the relatively short undulator and because the pulses are contributed by multiple electron beams. Therefore, XFELO can provide more photons that can pass through the polarizer. This can significantly improve the signal-to-noise ratio of the experiment and reduce the thermal load on the polarizer.

2.4 X-ray optical vortices

Optical vortices are spirally phased beams that have a phase dependence of \(\exp (i l \phi )\), where l denotes the topological charge and \(\phi\) denotes the azimuthal coordinate in the plane perpendicular to the beam propagation path. As demonstrated, the orbital angular momentum (OAM) of optical vortices is l [48]. The past few decades have experienced a succession of breakthroughs in vortex and OAM applications, including ultra-high resolution imaging, microparticle manipulation using optical tweezers, high-capacity communications, quantum optics, and laser thermal noise reduction in gravitational wave detection [49]. Although X-ray OAM is much less common, it is expected that the interaction between matter and X-ray optical vortices will give rise to new phenomena. The ability to enable X-ray OAM opens up attractive new opportunities for exploring different materials. In particular, XFEL can provide unprecedentedly bright X-ray vortices, which will significantly stimulate the development of experiments and methods [50, 51].

Recent advances have led to the generation of OAM beams in a single-pass FEL seeded with fundamental Gaussian mode lasers and helical undulators [52,53,54,55]. In general, two schemes have been developed to generate FEL OAM pulses. The first scheme uses spirally microbunched electron beams, which can be generated by the high-harmonic interactions of the lasers and electron beams in a helical undulator to produce OAM light. The second is based on the harmonic emission of a helical undulator, which natively carries OAM. In this scheme, the electron beam is microbunched by fundamental Gaussian mode lasers in a planar undulator and then passes through a helical undulator to generate OAM light.

Unlike single-pass FELs used to produce OAM beams, XFELO is well suited for producing coherent radiation with high power and high repetition rates in the hard X-ray regime [17, 56]. Compared to other schemes, the generation of OAM light in XFELO does not require a helical undulator or seed laser. Thus, an XFELO that generates OAM can achieve a shorter wavelength. Without the use of an additional monochromator, the XFELO scheme also provides significantly higher intensity for experiments. Thus, XFELO can enable a new method to generate bright optical vortices, stimulating the development of entirely new experiments in areas such as imaging and quantum optics.

3 Principles and performance of MING

3.1 SHINE overview

Considering the rapid progress in the development of XFEL around the world and in response to growing demands from the Chinese science community, a new high repetition rate XFEL, SHINE, is currently under construction and is one of the major research infrastructure projects in China [9, 57,58,59]. The SHINE facility consists of a low emittance continuous-wave (CW) injector, a high-performance superconducting radio-frequency (SCRF) linac that can accelerate electrons to 8 GeV with 1 MHz repetition rate, three undulator lines to cover 0.4–25 keV photon energies, and ten end stations. When it becomes operational in 2025 (planned), SHINE will be the first high-repetition-rate XFEL user facility in China, designed specifically to enable new science opportunities.

SHINE will be located in Zhang Jiang High-Tech Park, close to the Shanghai Synchrotron Radiation Facility (SSRF) campus and ShanghaiTech University. The major facility will be installed underground at a depth of \(\sim 38\) m, whose total length will be approximately 3.1 km, as shown in Fig. 3. SHINE will have one accelerator tunnel and three undulator tunnels with the following beamline tunnels. In each undulator tunnel, two undulator lines can be accommodated. In the initial phase, three undulator lines will be located in two undulator tunnels. Using these undulator lines, SHINE will cover both the soft and hard X-ray regions, from 3 nm to 0.5 Å.

Fig. 3
figure 3

(Color online) SHINE layout. SHINE consists of an 8 GeV CW superconducting linac, three undulator lines, and ten experimental end-stations. The linac consists of two bunch compressors, which increase the peak current to approximately 1500 A with a total charge of 100 pC. The electron bunches are accelerated to approximately 8 GeV and are then delivered to the three undulator lines

The SHINE accelerator comprises the following parts: a photo-injector, which generates electron beams with a repetition rate of up to 1 MHz and accelerates them to \(\sim\)100 MeV, and the main SCRF linear accelerator, where electron beams are accelerated to \(\sim\)8 GeV and are longitudinally compressed to a peak current of 1.5 kA. The photo-injector is based on a VHF photocathode gun [60, 61]. The SHINE injector can produce a 10 ps full width at half maximum (FWHM) pulse with a 100 pC bunch charge, and a root mean square (RMS) normalized transverse emittance of 0.4 mm·mrad at 90–120 MeV. A laser heater is used to suppress any micro-bunching instability. The \(\sim\)100 MeV electrons then enter the L1 structure (containing two cryomodules) to be accelerated to \(\sim\)320 MeV. A 3.9 GHz SCRF harmonic cavity is located before the first bunch compressor (BC1), which compresses the electrons longitudinally to increase the peak current. The L2 structure (containing 18 cryomodules), located between BC1 and BC2, accelerates the electron beams from 270 MeV to \(\sim\)2.1 GeV. After BC2, the electron beams are further accelerated to approximately 8 GeV in the L3 structure (containing 54 cryomodules). Subsequently, a metallic corrugated structure designed to cancel the linear chirp of the electron beam is located at the end of the linac.

A beam distribution system is used to deliver the electron beams from the linac to the three undulator lines. The initial undulator lines are referred to as FEL-I, FEL-II, and FEL-III. FEL-I will generate X-rays with photon energies from 3 keV to 15 keV with an undulator period of 26 mm; FEL-II will cover the photon energy range of 0.4-3 keV with an undulator period of 55 mm; FEL-III will cover the photon energy range of 10-25 keV using superconducting undulators (period of 16 mm). Both FEL-I and FEL-III will run in the SASE mode with a self-seeding option. The high-brightness SASE mode will also be implemented in FEL-I. The echo-enabled harmonic generation (EEHG) and afterburner scheme with an elliptically polarized undulator (EPU) will be available in FEL-II.

The SHINE scientific instruments will enable the investigation of the structural dynamics of materials, including physical and chemical behaviors in condensed matter and biomaterials at the fundamental \(\sim\)Å and \(\sim\)fs length scales. SHINE will serve as the most powerful probing tool for clean energy, environmental engineering, material science, and life science applications.

The total length of the undulator hall is 400 m, and the FEL-I undulator line of approximately 200 m will be located in the middle of the hall. A two-stage self-seeding scheme will be implemented. Two electron beam delay chicanes are placed after the number 7 and number 17 undulator segments, respectively. An optics chamber, which mounts the crystal to form the optical cavity, can be located in the middle of the chicanes. Thus, it is possible to place the X-ray cavity between the switchyard and the self-seeding chicanes, or between the self-seeding chicanes and the electron beam dump at the end of the undulator line.

3.2 Basic XFELO physics

An XFELO is typically a low-gain device in which an X-ray pulse stored in an X-ray optical cavity is successively amplified by interacting with a fresh electron beam as it passes through an undulator [62,63,64]. In general, XFELO requires a high-repetition-rate electron beam and an undulator to provide the gain, as well as a crystal cavity to circulate and store the X-ray pulses. In the undulator, the electron beam amplifies the circulating X-ray pulses during the FEL process (amplification factor of \(1+G\) for the single-pass gain). With each pass through the undulator, the FEL process causes the beam electrons to undergo microbunching. When the intensity is higher, the electrons rotate faster in phase space and absorb power from light near the end of the undulator. This will cause the gain to decrease. Saturation occurs when the gain is equal to the total cavity loss. Hence, the XFELO operates much like traditional lasers. In addition, when the gain is low, the optical mode is almost entirely determined by the optical system of the resonator. In this manner, XFELO is expected to produce highly stable X-ray beams with high average power and ultra-high spectral brightness, enabling new opportunities complementary to those provided by SASE XFELs.

Small signal gain The power evolution in XFELO can be described as follows:

$$\begin{aligned} P_n = R(1+G) P_{n-1}, \end{aligned}$$
(1)

where \(P_n\) is the power of the X-ray pulse at the \(n^{\textrm{th}}\) pass through the cavity, G is the FEL gain, and R is the total reflectivity of the optical cavity. The net single-pass gain is \(R(1+G)\) and the power increases if \(R(1+G)>1\). In an oscillator FEL, the radiation stored in the cavity interacts with electrons successively, leading to an increase in the radiation intensity and to microbunching of the electron beams in each pass. The power increases exponentially with n before reaching saturation. However, the power eventually becomes sufficiently large to over-microbunch the electron beam, which significantly reduces the gain. When \(R(1+G)=1\), the system reaches its steady state.

With a low-out-coupling cavity, the oscillator FEL generally operates in the low gain region, and the gain is the well-known small-signal gain that can be defined by [64]

$$\begin{aligned} G_{\textrm{ss}}=-\left( \frac{L}{\sqrt{3} L_{\textrm{g}}}\right) ^{3} \left[ \frac{2-2 \cos \nu -\nu \sin \nu }{\nu ^{3}}\right] , \end{aligned}$$
(2)

in which \(L_\text {g}=1/2k_\text {u}\sqrt{3}{\rho }\) is the one-dimensional power gain length, \(\rho\) is the FEL parameter, \(\rho = [{K^2 [\textrm{JJ}]^2 Ip /16 \gamma ^3 \sigma _\text {e}^2 k_\text {u}^2 I_A } ]^{1/3}\); \(k_\text {u} = 2\pi /\lambda _\text {u}\) with \(\lambda _\text {u}\) is the undulator period, K is the dimensionless undulator strength parameter, \(L=N_\text {u} \lambda _\text {u}\) is the undulator length, \(I_\text {p}\) is the peak current of the electron beam, \(I_\text {A} \approx 17\) kA is the Alfvén current, \(\sigma _\text {e}\) and \(\gamma\) are the RMS transverse size of the electron beam and the electron energy in units of the rest energy, respectively, \(\nu = 4\pi N_\text {u} \Delta \gamma / \gamma _\text {r}\) is the detuning parameter in the energy, and \([\textrm{JJ}]\) is the Bessel factor. For a planar undulator, \([\textrm{JJ}]\) is the difference between two Bessel functions: \([\textrm{JJ}] = J_0(\xi )-J_1(\xi )\) with \(\xi = K^2/(4 + 2K^2)\), where \([\textrm{JJ}] = 1\) for a helical undulator.

Fig. 4
figure 4

(Color online) FEL small-signal gain function. Maximum gain occurs at \(\nu = 2.606\)

The maximum value of the small-signal gain is proportional to the FEL parameter \(\rho\), which depends on the six-dimensional phase space density of the electron beam. The gain function is plotted in Fig. 4. It can be seen that the gain function is antisymmetric with respect to \(\nu\). There is no gain for an initial phase velocity of \(\nu = 0\) in phase space, which means zero detuning in beam energy (or equally in wavelength). It can be observed that the maximum gain occurs for an initial beam energy detuning of \(\nu = 2.606\). Thus, to achieve the maximum gain in an XFELO, one must select an electron beam energy detuning that is slightly positive (beam energy larger than the FEL resonance energy). Conversely, at a fixed beam energy, the lasing wavelength is longer than the resonance wavelength. In summary, the small-signal gain should be optimized by increasing the FEL parameters and carefully changing the detuning.

Undulator choice The main parameters considered for the undulator include the magnetic field strength and the period. When an undulator is built, the period is usually fixed, whereas the magnetic field can be changed by changing the gap between the magnetic poles. The fabrication of undulators is limited by current technology. If the period is too short, the undulator will not provide sufficient magnetic field strength. This severely limits the adjustable range of the photon energies that can be provided. In physics, the undulator period and the corresponding parameter K should satisfy the resonant condition

$$\begin{aligned} \lambda _\text{r}=\frac{\lambda _\text{u}}{2 \gamma ^{2}}\left( 1+\frac{K^{2}}{2}\right) , \end{aligned}$$
(3)

where \(\gamma\) is the beam energy and \(\lambda _\text {r}\) is the resonant wavelength. For a fixed beam energy, this constrains the wavelength tuning range.

In this case, undulator parameter K itself is a function of the undulator period: \(K=0.934 \lambda _\text {u} (\text {cm}) B_\text {u} (T)\). In most cases, the appropriate value for K will lie between 1 and 3. If K is too small, then the radiation gain may be too weak. Moreover, for a given radiation wavelength and undulator period, the FEL parameter is \(\rho \propto (K[\textrm{JJ}])^{2/3} / (2 +K^2)^{1/2}\). Therefore, it can be determined that K has an optimum value leading to a maximum gain when \(K=1.556\), as shown in Fig. 5.

Fig. 5
figure 5

(Color online) Variation of the normalized FEL parameter with undulator parameter K for a given radiation wavelength and undulator period

In practice, tuning of the FEL wavelength is realized by changing the intensity of the undulator magnetic field or the energy of the electrons; however, the former method is used more often. Thus, the value range of K should be in the neighborhood of 1.56. The variation in the wavelength as the intensity of the undulator parameter K changes is shown in Fig. 6. For the range \(K=1-3\), the X-ray energy increases by more than a factor of three. For photon energies ranging from 5 to 15 keV, the undulator period can be 26 mm. For a higher energy above 15 keV, a shorter undulator period, such as 16 mm, should be used to provide sufficient gain in an XFELO. Finally, the XFELO in harmonic mode can also reach photon energies above 15 keV.

Fig. 6
figure 6

(Color online) Variation of the photon energy with respect to the deflection parameter K

As mentioned above, all SHINE undulators have been chosen to allow alterable gaps. The wavelength can be tuned by changing the undulator gap at a constant electron beam energy. The magnetic length of each undulator is 4.0 m (26 mm undulator period) for FEL-I. Thus, MING can use the same undulators as used in FEL-I. In addition, the same devices installed between the undulator segments to monitor and correct the electron trajectory can be used, such as cavity beam position monitors, phase shifters, quadrupoles, correctors, and quadrupole movers.

Optical cavity design In XFELO, the cavity is essentially a feedback system of electromagnetic fields that travel along a closed loop formed with Bragg reflecting mirrors and focusing elements. To match the repetition rate of the electron beam of SHINE (approximately 1 MHz), a cavity with a total trip length of approximately 300 m should be formed using two or four Bragg mirrors. Bragg-reflecting mirrors are used because the Bragg reflection in the X-ray regime can reach a very high reflectivity at a near-normal angle incidence [65, 66], as shown in Fig. 7. It can be determined that the spectral width of the high reflectivity, called the Darwin width, is only 15 meV at 14 keV and 150 meV at 7 keV. Within the Darwin width, the crystal can provide a reflectivity above 90%. Diamond crystals, characterized by low absorption and high thermal conductivity, can even provide a reflectivity greater than 99% in the hard X-ray regime [65]. In addition, the phase variation within the Darwin width due to Bragg diffraction produces an additional time delay in X-ray pulses, which can be compensated for by detuning the cavity length [18]. Otherwise, the longitudinal mismatch between the X-ray pulses and electron beams may lead to a significant reduction of the FEL gain.

Fig. 7
figure 7

(Color online) Complex reflectivity spectra of Bragg diffraction for several crystals: a Si crystal (4 0 0) atomic plane at 6.46 keV; b diamond (4 0 0) atomic plane at 9.83 keV; c Si crystal (8 0 0) atomic plane at 12.91 keV; d sapphire (0 0 0 30) atomic plane at 14.3 keV

In addition to mirrors, X-ray focusing elements are required to maintain the stability of the optical cavity [18, 67]. For example, beryllium (Be) parabolic compound refractive lenses (CRLs) with a very high transmissivity of approximately \(99\%\) can be used [68, 69]. When the gain is small, the transverse mode is typically determined by the optical cavity. The propagation of an X-ray pulse inside the cavity can be analyzed by the ABCD matrix method [70], which is a linear ray optics formalism that describes light beam propagation through optical elements. The cumulative effects of the optical elements are written as matrices in the form

$$\begin{aligned} \left[ \begin{array}{l} r_{n+1} \\ r_{n+1}^{\prime } \end{array}\right] =\left[ \begin{array}{ll} A &{} B \\ C &{} D \end{array}\right] \left[ \begin{array}{l} r_{n} \\ r_{n}^{\prime } \end{array}\right], \end{aligned}$$
(4)

where r and \(r^{\prime }\) indicate the position and angle of the ray, respectively, and n indicates the \(n^{\textrm{th}}\) propagation in the cavity. The stability of the cavity is then determined by the eigenvalues of the ABCD matrix. If the cavity is stable, the eigenvalues are real and positive. This produces the condition \(-1 \le (A+D)/{2} \le 1\).

The simplest cavity is formed by two crystal mirrors with normal incidence (exact backscattering). In this case, a sapphire crystal should be selected to avoid the effects of multiple-beam diffraction, leading to the low reflectivity associated with exact backscattering [71, 72]. Silicon or diamond single crystals are unsuitable for use as exact backscattering X-ray mirrors because of their multiple-beam diffraction effects. A sketch of this type of cavity is shown in the top image of Fig. 8. Additionally, the bottom image in Fig. 8 presents a contour plot of the \(|(A+D)/{2}|\) parameter as a function of CRL focusing length f and the distance from the CRL to the cavity center \(L_1\). With CRLs having a focusing length of approximately 56 m, \(L_1\) can be chosen as 50 m, corresponding to a distance of 100 m between two CRLs within a 150 m cavity.

Fig. 8
figure 8

(Color online) Sketch of a two-crystal cavity. The cavity is symmetrical, and its total length is 300 m

The structure of the cavity built from two mirrors is simple, but has two main drawbacks [41]. First, not all crystal types can be used as reflectors. This is because of the multiple-beam diffraction effect, which results in a collapse of the reflectivity at near-normal incidence. Second, the working energy of such cavities is not tunable because the reflecting angle cannot be adjusted. To achieve energy tuning by changing the reflecting angle, a cavity composed of a minimum of four crystals is required. For example, a cavity with a bowtie structure can tune the photon energy within a 5% range. The stability of such cavities can also be analyzed as discussed previously.

Fig. 9
figure 9

(Color online) Diagram of symmetrical four-crystal cavity in the bow-tie configuration. The cavity is energy-tunable by simultaneously adjusting the incidence angle of the four crystals. The maximum tuning range of the photon energy is approximately 5%

The top plot of Fig. 9 shows a schematic of a potential bow-tie X-ray cavity. Four diamond or Si crystal plates are mounted in strain-free crystal holders [73], which are installed on motion stacks to achieve high moving resolution. The four-crystal cavity also allows for the use of different reflection planes in the crystals. The contour plot of the parameter \(|(A+D)/{2}|\) as a function of the focal length f and the distance between the CRL and the center of the cavity \(L_1\) is illustrated in the bottom image of Fig. 9. It can be observed that there is a large area in which a stable cavity can be achieved.

Another consideration is how to extract the X-ray power from the cavity. Generally, it is necessary to choose a relatively thin crystal (with only a few extinction lengths) to be located downstream of the undulators, where the reflectivity is not particularly high and some X-rays can be transmitted through the crystal. For RAFEL, this requires a much higher outcoupling efficiency, therefore requiring very thin crystals, which are almost impossible to process using current technology. Therefore, a pinhole crystal should be used. Another possible approach is to utilize intra-cavity beam splitters, which are capable of coupling X-rays such that the output amount can be varied from zero to close to 100% [74].

3.3 XFELO performance

The initial phase of the SHINE XFELO aims to provide coherent X-ray radiation spanning an energy range from 6 to 15 keV. A natural cutoff in the photon energy is approximately 15 keV because the gain provided by 26 mm undulators drops significantly at larger photon energies. Thus, using three or four undulator segments, the XFELO mode can cover the fundamental photon energy range of 6 to 15 keV with excellent longitudinal coherence. To achieve higher energies, one can use the harmonic mode of the XFELO operation, which significantly reduces the undulator or electron energy requirements. The main parameters of the XFELO system are presented in Table 1. Three-dimensional (3D) simulations were performed using a combination of GENESIS [75], OPC [76] and BRIGHT [77].

Table 1 Major XFELO parameters

To illustrate the performance of the XFELO intended for SHINE, we consider two schemes for the X-ray cavity based on four photon energies. The first cavity is a rectangular X-ray cavity, in which four Bragg reflecting mirrors with a Bragg angle of 45 degrees are used. In this scheme, Si and diamond crystals are chosen to form the cavity. For the Si crystal, the (4 0 0) and (8 0 0) Bragg reflection planes are considered, where the reflection photon energies are 6.46 keV and 12.91 keV, respectively. For the diamond, the (4 0 0) Bragg reflection is used, which can reflect X-rays at 9.83 keV. In the second scheme, two sapphire crystals using the (0 0 0 30) Bragg reflection are chosen to form the cavity, which can circulate X-rays at 14.31 keV. In all cases, CRLs with a focusing length of 56 m are used to control the transverse mode of the cavity. The undulator is split into eight modules, each 4 m in length. A thin crystal with an output coupling efficiency of 20% is used to couple the photons from the X-ray cavities.

6.46 keV Figure 10 illustrates the XFELO output performances near a photon energy of 6.46 keV. In this case, Si crystals with a (4 0 0) reflection plane are used as the mirrors. Three undulator segments are used to provide the gain. The evolution of the output pulse energy is shown in the upper panel of Fig. 10. The steady-state output pulse energy is approximately 320 \(\mathrm {\upmu }\)J, corresponding to \(3 \times 10^{11}\) X-ray photons. The profiles of the radiation output are shown in the bottom-left plot in Fig. 10. In the bottom-right plot, we show the corresponding output spectrum (the solid line), indicating that the spectral FWHM is approximately 100 meV, corresponding to a relative value of \(\sim 1.5 \times 10^{-6}\), or approximately 1.8 times the Fourier transform limit (0.44) for a Gaussian pulse profile. The typical spot size and diffraction angle of the X-ray source are approximately 50 \(\mathrm {\upmu }\)m (FWHM) and 1.81 \(\mathrm {\upmu }\)rad (FWHM), respectively. These steady-state pulses are reached after \(\sim\) 40 passes.

Fig. 10
figure 10

(Color online) XFELO output performances near a photon energy of 6.46 keV. Four Si crystals with (4 0 0) reflection plane are used

In this case, the bandwidth is narrower than the reflectivity width of the crystals (shown by the dashed line). This is because the radiation power profile at saturation is nearly identical to that of the electron beam current. Thus, the radiation spectrum profile is also defined by the Fourier transform of the electron current profile.

Fig. 11
figure 11

Cavity detuning curve near a photon energy of 6.46 keV

The detuning curves obtained from the simulations are shown in Fig. 11. In the figure, we plot the output pulse energy versus cavity detuning for a photon energy of 6.46 keV. Here, the cavity detuning is plotted relative to the nominal zero-detuning length. As shown in the figure, we find a full-width detuning range of approximately 24 \(\upmu\)m and an FWHM detuning range of approximately 18 \(\upmu\)m. The results are in reasonable agreement with the estimate based on a slippage length of 0.15 \(\upmu\)m and an extinction depth of 1.7 \(\upmu\)m.

In the above simulation, the electron bunch is much longer than the slippage distance. The situation may be different in the RAFEL operation because it uses shorter electron bunches and longer undulators. When the pulse length is on the order of the slippage distance, the operation of the FEL then becomes subject to a variety of “short pulse effects”, such as limit cycle oscillations of the pulse energy [78, 79]. This type of oscillation occurs when the saturated light pulse moves away from the electron pulse due to slippage, whereas the sub-pulse formed at the rear of the optical pulse moves forward and grows periodically. In the hard X-ray region, the slippage distance is typically less than 2 \(\upmu\)m in MING. As a result, limit cycle oscillations are only possible under a low-charge mode, e.g., 20 pC.

Fig. 12
figure 12

(Color online) XFELO output performances near a photon energy of 9.83 keV. Four diamond crystals with (4 0 0) reflection plane are used

9.83 keV Figure 12 shows the XFELO output performances near a photon energy of 9.83 keV. Diamond crystals with a (4 0 0) plane are used as mirrors. The gain is provided by three undulator segments. The evolution of the output pulse energy is shown in the upper panel of Fig. 12. The steady-state output pulse energy is approximately 310 \(\mathrm {\upmu }\)J, corresponding to \(\sim 1.9 \times 10^{11}\) X-ray photons. The radiation output profiles are shown in the bottom-left image of Fig. 12. In the bottom-right image, we show the corresponding output spectrum (solid line), indicating that the spectral FWHM is approximately 50 meV, corresponding to a relative value of \(\sim 5.1 \times 10^{-6}\), or approximately 1.2 times the Fourier transform limit (0.44) for a Gaussian pulse profile. The typical spot size and diffraction angle of the X-ray source are approximately 38.8 \(\mathrm {\upmu }\)m (FWHM) and 1.53 \(\mathrm {\upmu }\)rad (FWHM), respectively. These steady-state pulses are reached after \(\sim\) 60 passes.

Fig. 13
figure 13

(Color online) XFELO output performances near a photon energy of 12.91 keV. Four Si crystals with (8 0 0) reflection plane are used

12.91 keV The output performance of the XFELO near a photon energy of 12.91 keV is shown in Fig. 13. In this case, Si crystals with (8 0 0) reflection plane are chosen as the mirrors. Three undulator segments are used to provide the gain. The evolution of the output pulse energy is shown in the upper panel of Fig. 13. The steady-state output pulse energy is approximately 240 \(\mathrm {\upmu }\)J, corresponding to \(\sim 1.1 \times 10^{11}\) X-ray photons. The profiles of the radiation output are shown in the bottom-left image of Fig. 13. In the bottom-right image, we show the corresponding output spectrum (solid line), indicating that the spectral FWHM is approximately 20 meV, corresponding to a relative value of \(\sim 1.5 \times 10^{-6}\), or approximately 1.1 times the Fourier transform limit (0.44) for a Gaussian pulse profile. The typical spot size and diffraction angle of the X-ray source are approximately 36 \(\mathrm {\upmu }\)m (FWHM) and 1.47 \(\mathrm {\upmu }\)rad (FWHM), respectively. These steady-state pulses are reached after \(\sim\)100 passes.

Fig. 14
figure 14

(Color online) XFELO output performances near a photon energy of 14.31 keV. Two Sapphire crystals with (0 0 0 30) reflection plane are used

14.31 keV Figure 14 illustrates the XFELO output performances near a photon energy of 14.31 keV. In this case, two sapphire crystals with (0 0 0 30) reflection planes are chosen as the mirrors. With an undulator period of 26 mm and a beam energy of 8 GeV, the FEL gain at 14.31 keV drops significantly. Four undulator segments are therefore used to provide sufficient gain. The evolution of the output pulse energy is shown in the top panel of Fig. 14. The steady-state output pulse energy is approximately 160 \(\mathrm {\upmu }\)J, corresponding to \(\sim 7 \times 10^{10}\) X-ray photons. The profiles of the radiation output are shown in the bottom-left plot in Fig. 14. In the bottom-right plot, we show the corresponding output spectrum (solid line), indicating that the spectral FWHM is approximately 10 meV, corresponding to a relative value of \(\sim 7 \times 10^{-7}\), or approximately 1.3 times the Fourier transform limit (0.44) for a Gaussian pulse profile. The typical spot size and diffraction angle of the X-ray source are approximately 35 \(\mathrm {\upmu }\)m (FWHM) and 1.18 \(\mathrm {\upmu }\)rad (FWHM), respectively. These steady-state pulses are reached after \(\sim\)250 passes.

Compared with the result for 6.46 keV, the electron beam Fourier transform provides a bandwidth larger than the reflectivity bandwidth of the crystal. Therefore, the temporal distribution of the radiation pulse is distorted by the bandwidth. It is also important to note that these results can be further optimized.

3.4 Start-to-end simulations

The operation of an XFELO requires a relatively long electron bunch with a linear energy chirp because of the ultra-narrow spectral acceptance of the crystal Bragg reflection. The baseline SHINE case provides electron bunches with 100 pC total charge, which are compressed to a 1500 A peak current. The slice emittance is approximately 0.4 \(\mathrm {\upmu m}\), whereas the slice energy spread is below 0.01%. To obtain a 700 A electron beam with a flat longitudinal phase space, we employ an evolution algorithm to optimize the injector and linac parameters, including the drive laser pulse profile, the \(R_{56}\) of the two bunch compressors, the dechirper parameters, and the phase and gradient of the three main linacs as well as of the harmonic cavity. The optimized solution is then validated using ELEGANT [80] simulations with 2 M macroparticles. The final bunch phase space distribution, current, and slice energy spread at the undulator entrance are shown in Fig. 15. The flat part in the beam phase space is approximately 130 fs. The slice energy spread in the core section is approximately 0.5 MeV.

Fig. 15
figure 15

(Color online) Phase space of start-to-end simulated electron beam

Using the start-to-end simulated electron beam, the results of the FEL simulation are presented in Fig. 16. The XFELO adopts a rectangular geometry with four diamond crystals. Using the C (4 0 0) reflection plane with an incidence angle of \(45^{\circ }\), the XFELO operates near a photon beam energy of 9.83 keV. The efficiency of the output coupling is 20%. The output pulse energy reaches 320 \(\mathrm {\upmu J}\), corresponding to \(2.0 \times 10^{11}\) photons per pulse. The temporal power profile and the corresponding spectrum in this case are shown in the bottom plots of Fig. 16.

Fig. 16
figure 16

(Color online) XFELO output performances for a start-to-end simulated electron beam. The photon energy is approximately 9.83 keV

3.5 Tolerances

The tolerances are established by requiring the displacements in position and angle to be much less than the fundamental mode size and angular divergence, respectively. The tolerances related to the orientation of the crystal can be determined using the ABCD matrix method [18]. For typical XFELO parameters, the mode size \(\sigma _\text {r}\) is approximately 15 \(\mathrm {\upmu m}\), the divergence is approximately \(1 \mathrm {\upmu rad}\), and the cavity round-trip is approximately 300 m at \(\sim\)1 MHz. Consequently, the angular tolerance is approximately 10 \(\textrm{nrad}\). In fact, it is very difficult for current stabilization methods to achieve a \(\le\)10 \(\textrm{nrad}\) angular stability while also considering the necessary cooling of the crystal [81].

Figure 17 shows the pulse energy evolution of the XFELO for different angular jitter values of the mirrors near a photon energy of 9.81 keV. The angular displacement is introduced in every shot. The optimized number of undulator segments, \(N_\text {u}\), is 3. With \(N_\text {u} = 3\), the maximum output can reach 300 \(\mathrm {\upmu J}\). As mentioned above, the impact of angular deviation on the output is negligible when the angular jitter is lower than 10 nrad, but will significantly affect the stability of the XFELO output when the angular jitter is greater than 20 nrad. To suppress the effect of angular jitter, one possible method is to add undulators, which can compensate for the gain loss due to beam position displacement. When the undulator line is increased to five segments, the jitter tolerance can reach 50 nrad, which is currently achieved at synchrotron radiation facilities. A disadvantage of this approach is the drop in oscillator output energy, which is inversely proportional to \(N_\text{u}\).

Fig. 17
figure 17

(Color online) XFELO output performances for different angular jitter values. The photon energy is 9.81 keV. Different undulator lengths are considered

3.6 OAM mode

In particular, light beams with a spatial phase dependence of exp(\(il\phi\)), where \(\phi\) denotes the azimuthal coordinate and l is an integer referred to as the topological charge (order), carrying an orbital angular momentum (OAM), represent one of the most intensively studied topics in optics. In this regard, OAM beams in the visible and infrared wavelength regimes have already been utilized in diverse applications, such as micro-manipulation, quantum information, and optical data transmission. In the X-ray regime, the use of OAM beams can enable the direct alteration of atomic states through an OAM exchange and facilitate the development of new methods to study the quadrupolar transitions of materials. However, practical applications of X-ray beams utilizing OAM are currently limited owing to the lack of suitable optics and the difficulties in constructing practical, coherent light sources.

XFELO can be used to generate OAM beams using a newly proposed method, which essentially facilitates the preservation of OAM beam amplification at the fundamental wavelength and avoids the need for external optical elements. The method is very simple, as it requires only adjustment of the resonant condition of the XFELO operation. This method is based on the important fact that the resonant condition for each transverse mode is slightly different. Consequently, the gain profile of each transverse mode is shifted over the spectrum. The combined effect is that XFELOs can operate in a specific spectral regime in which radiation in a high-order transverse mode can be obtained at maximum gain. Because the laser saturation state is governed only by the gain and cavity loss, this effect enables XFELOs to select transverse modes that carry OAM. This approach significantly reduces both the electron-beam control elements and the external optical elements, thereby significantly increasing the optical efficiency.

We performed a simulation with a photon energy of 9.81 keV. The simulation results are shown in Figs. 18 and  19. Figure 18 shows the pulse energy as a function of the number of round trips and the evolution of the transverse mode. The saturation power reaches 200 \(\upmu\)J, approaching the Gaussian mode operation level. In the short period ranging from 20 to 50 round trips, mode competition or mode completion is observed. Consequently, a short time period is required for completing the symmetric doughnut-like transverse intensity profile and the helical phase. The outcome is robust because the system must reach a stable state determined by the gain tuned for the \(l=-1\) mode.

Fig. 18
figure 18

(Color online) Cavity output energy growth of OAM mode. The total output energy is approximately 200 \(\mathrm {\upmu J}\)

At saturation, the characteristic hollow profile and helical phase can be observed, as shown in Fig. 19. It is evident from the phase distribution that the dominant mode is the \(l=-1, p=0\) Laguerre-Gaussian (LG) mode. The intensity of \(l \ne -1\) modes is negligible. The longitudinal power profile and the spectrum are shown in Fig. 19. As the total power increases to 200 \(\upmu\)J, the peak power exceeds 1.5 GW with an FWHM spectrum width of 40 meV.

Fig. 19
figure 19

(Color online) a Transverse profile. b Phase distribution. c Longitudinal power profile. (d) Spectrum. The transverse profile and phase of the light reveal a \(l=-1\) OAM mode at saturation. A peak power of 1.5 MW with a spectral width (FWHM) of 40 meV can be obtained

4 Key components of MING

4.1 Inclined undulator

To directly produce the 45-degree polarized X-rays desired by the SEL station, XFELO using several inclined undulators is considered. The main specifications and parameters of the inclined undulator U26 (undulator with a 26 mm period) are listed in Table 2. A variable gap is made possible using four independent servomotors driving this undulator. The challenges involve series production, straight alignment, and synchronization of the undulator modules. The magnet arrangement of the undulator adopts a standard hybrid magnet structure. Magnetic arrangements are formed by the periodic arrangement of neodymium iron boron permanent magnets and soft magnetic poles to generate an approximately sinusoidal magnetic field in the air gap. The basic design idea involves typical C-type mechanical structures located on a 45-degree inclined frame, as shown in Fig. 20. The gap is measured using absolute linear encoders. The motion control, motors, and programmable logic controller (PLC) are based on the Beckhoff motion control system. All electronic racks are mounted on the support structure and therefore will be located in the machine tunnel.

Table 2 Specifications and parameters
Fig. 20
figure 20

(Color online) Sketches of the inclined undulator design

Magnet design The magnetic field calculation indicates that the effective peak magnetic field of 1.03 T can be obtained at a minimum magnetic gap of 7.2 mm. The center magnetic structure design will be a typical variable-gap hybrid magnet device, in which the poles will consist of pure soft iron, as shown in Fig. 21. The magnetic performance of U26 was calculated using RADIA [82]. To achieve the required field of 1.03 T at a 7.2 mm gap, the optimized dimensions of the magnet blocks are 45 mm (width), 45 mm (height), and 9 mm (thickness). There is a 4 mm deep, 45\(^\circ\) cut at each corner to clamp each block in its respective holder. The blocks are made of NdFeB with a minimum remanence of 1.25 T (an intrinsic coercivity HcJ > 21000 Oe) and must be coated with NiCu or Ni. Vanadium is selected as the pole material (pole dimensions are 4 mm thickness, 33.75 mm height and 27 mm width). A 4 \(\times\) 4 mm\(^2\) ear extends out on each side to secure the pole within the pole holder.

Fig. 21
figure 21

(Color online) Magnet and pole used to provide a half period located in a holder

The roll-off requirement of U26 was determined by applying the field uniformity requirement (\(\Delta K_{\textrm{eff}}/K_{\textrm{eff}} <0.0002\)) over a beam position accuracy of 0.5 mm. Because the roll-off requirement is more difficult to satisfy for larger gaps, the X-ray tuning range limits the relevant gap range to between 7.2 and 20 mm. The magnet width in U26 is thus selected as the force-minified type and is sufficiently narrow to maintain the field uniformity requirement, as shown in Fig. 22.

Fig. 22
figure 22

(Color online) Effective field variation vs pole dimensions (left), distribution of effective magnetic field uniformity along different transverse positions (right)

End design The design of the magnet arrangement at the entrance and exit (the first and last few periods) of each undulator segment is very important because it allows the electrons to wiggle along the undulator axis without incurring a kick angle or offset. The end design of the undulator should also ensure that the first and second field integrals remain at zero over the entire gap range.

Fig. 23
figure 23

(Color online) Sketch of the magnetic end design

The magnet model for U26 shown in Fig. 23 can be used in the design of the end sections. The undulator shown in Fig. 23 is asymmetric, with 12 full-size poles and two thin end-section poles. The end sections consist of two magnet blocks and one pole separated by air spaces. This implies that only the normal second integral is non-zero. The normal first integral, the skew integrals, and all integrated multipoles are zero in the model undulator, owing to its symmetry. We tune the undulator end sections to obtain a small and close-to-constant averaged first integral in the middle of the model undulator to avoid strong variations in the normal second integral. Figure 24 shows the magnetic field distribution of the 12-pole module and the extrapolated vertical second integral for this asymmetric undulator at different gaps.

Fig. 24
figure 24

(Color online) Magnetic field distribution of the six-period model for a 7.2 mm magnetic gap (left) and the extrapolated normal second integral as a function of the undulator gap (right)

Fig. 25
figure 25

(Color online) Effective peak field values and magnetic force vs gap

The influence of beam deformation on phase error The magnetic field of undulator U26 is approximately 1.0 T, and the total length of the undulator is 4 m. The results of the magnetic force calculation show that the maximum attractive force between the upper and lower magnets is approximately 2.5 tons when the air gap is 7.2 mm, as shown in Fig. 25. The deformation of the air gap in the center and at both ends of the beam will cause a variation in the magnetic field distribution, resulting in an increase in the RMS phase error that significantly inhibits the amplification of the free electron laser, as shown in Fig. 26. Table 3 lists the RMS phase errors of the undulator radiation with respect to the maximum relative change in the gap variation of 5 \(\mathrm {\upmu m}\), 10 \(\mathrm {\upmu m}\), and 20 \(\mathrm {\upmu m}\). It can be seen that the deformation of the beam directly affects the performance of the undulators. The specification for U26 requires that the RMS phase error of the different magnetic gaps be less than 5 degrees. However, better rigidity requires a much greater beam thickness. Excessive rigidity of the beams inevitably increases the difficulty of the mechanical design and the weight of the machine. Therefore, we consider that the maximum deformation of the magnetic gap must be less than 10 \(\mathrm {\upmu m}\) for U26.

Fig. 26
figure 26

(Color online) Beam deformation and generated RMS phase error distribution for U26 with a 25 kN magnetic force propagating through the undulator

Table 3 RMS phase error due to gap variation

Mechanical design In the designed magnetic structure, magnets are mounted to module keepers made of aluminum alloy to match the thermal expansion characteristics of the beams. Each magnet keeper mounts three magnets together and is fixed to beams, which allows for magnetic tuning through keeper height adjustment and rearrangement techniques based on flipping and swapping keepers. The keepers are located along the beam direction by pins to maintain precise periodic spacing.

The beams for the inclined U26 are made of low-cost carbon steel, which is isolated from the magnetic arrangement by a 50 mm aluminum alloy girder. The beam can be moved toward either side using linear guide rails fixed on the bracket to adjust the magnetic air gap. Each beam is driven at two points using two transmission systems fixed on a bracket. The frame support is anchored to the ground using bolts. The undulator adopts four independent subsystems to drive the left and right beams to create a symmetrical opening and closing movement based on the beam center to change the magnetic gap. The gap is measured using absolute linear encoders. The motion control, motors, and PLC are based on the Beckhoff motion control system. All electronic racks are mounted on the support structure and therefore will be located in the machine tunnel.

Magnetic measurement and correction The performance of the inclined undulator should be checked at SSRF. Magnetic measurements show that the stability at room temperature should be within \(\pm 0.5\) \(^\text {o}\)C. The Hall probe system is a basic component measuring 350 mm \(\times\) 600 mm \(\times\) 7050 mm. The magnetic assembly of the linear motor is mounted between two high-precision guiding rails along the top of a granite block. The Hall probe PCB is fabricated with three separate sensors that measure the magnetic field. These sensors produce a Hall voltage that is proportional to the magnetic field that is passed to the sensing area. The Hall sensor can serve as a transducer of the SENIS Hall probe S type, which has good calibration accuracy, better broadband noise immunity, and a resolution near 1 \(\mathrm {\upmu }\)T. The sensor’s parameters are very important for determining the dominant correction features to be adjusted in order to achieve a straight electronic trajectory.

A large Helmholtz coil will be built around the measurement room to apply external fields to a small number of undulators in order to characterize the resulting field in the gap and the necessary current in the trim windings for field-correction purposes. A map of the magnetic field in the tunnel will be created in the future. The difference between the tunnel field and the field in the MMF, along with the characterization of the test undulator in the large Helmholtz coil, will determine how to set the current in the trim windings for each undulator position in the tunnel.

Undulator shimming will be implemented by changing the pole or magnet heights and angles (or the dislocation in the x-direction). The effects of pole or magnet motion will be measured and parameterized. These parameterizations will be used in a computer program or by a tuning expert to determine the pole motions necessary to correct the trajectories, phase, etc., and is performed at the minimum gap. Thus, undulator field errors are corrected when the effect of the field errors is at its largest. As the gap increases, the effects of both the field errors and correction fields decrease. If the field errors and corrections do not track each other as the gap opens, additional corrections must be made, which change with the gap setting. This will be performed using powered correction coils. Coils will also be required to compensate for external fields as the gap is changed.

Undulator control For the control aspect, an undulator line (or system) can be divided into many similar constitutional cells (undulator cells). Each undulator cell is composed of an undulator, quadrupole mover, and phase shifter mover. An undulator consists of two magnet arrays, and the gap between them ultimately determines the wavelength of the laser light. Four servomotors equipped with two drivers are adopted to drive the relative reducers and screw systems of the undulator. For the intersection segment, three servomotors are applied: two for a quadrupole mover and one for a phase shifter. All of the above moving structures are equipped with a linear absolute encoder (LAE) with high position acquisition resolution (0.1 \(\mathrm {\upmu }\)m).

Undulator control is dedicated to providing fast gap and taper control with micrometer accuracy, magnetic pole center height modulation with high precision, and synchronization with low following error, thus offering safe operation and failure detection, prevention of damage, and limitation of movement under emergency conditions. The undulator motion control modes consist of three primary modes: gap, taper, and center modes.

  • Gap mode, modulation of gap between magnetic poles and keeping the values of the four encoders below 2 \(\mathrm {\upmu }\)m.

  • Taper mode, modulation of deviation between the entrance gap and the exit gap, keeping it within a certain range.

  • Center mode, modulation of magnetic pole height.

4.2 X-ray cavity

Compound refractive lenses In refractive optics, light is guided by refraction from surfaces between different materials, which can be described by Snell’s law. Usually, the difference between the refractive index and 1 is called the index decrement. For X-rays, the index decrement of most materials is only slightly less than one. Therefore, the focusing lenses are thinner at the center than at their edges, resulting in a biconcave shape. The parabolic geometry of the refracting surfaces is well suited for focusing X-rays that are parallel to the optical axis [83, 84]. A schematic diagram of the refractive lens of the paraboloid compound refractive lens is shown in Fig. 27.

Fig. 27
figure 27

(Color online) Schematic drawing of compound refractive lens

The absorption of X-rays in high-Z materials is high; therefore, the lens material must be a low-Z material, and we mainly employ beryllium, aluminum, and nickel as the lens materials. Metallic lens materials also have the advantages of being highly resistant to radiation damage and having high heat conductivity. Additionally, we choose beryllium (Be) as the material for the CRL used by the XFEL.

Hundreds of neatly arranged lenses with very small radii of curvature can form refractive X-ray lenses with focal lengths of less than 1 m, which can be used for high-power density X-ray experiments. However, the main characteristics of the XFELO that we are concerned with are as follows: the energy range is from 6 to 15 keV; the beam size is 100 \(\mathrm {\upmu }\)m. Thus, for XFELO cavities, the desired focus length is usually in the range from tens to over a hundred m, and only a few lenses are required. The focal length f can be calculated as

$$\begin{aligned} f = \frac{R}{2\delta N}, \end{aligned}$$
(5)

based on the radius of curvature R, number of lens elements N, and index decrement \(\delta\). The focal lengths for a single CRL of different dimensions at various energies are shown in Fig. 28. It is best to choose a CRL with a radius of 500 \(\mathrm {\upmu }\)m in the 50-100 m focal length range, and the web thickness of the lens should be less than 40 \(\mathrm {\upmu }\)m@6 keV to achieve aa transmission efficiency greater than 98%.

Fig. 28
figure 28

(Color online) Parameters evaluated to optimize the CRL

Stabilization feedback The XFELO requires extremely high stability regarding beam position and angle. Therefore, it is necessary to establish a high-precision detection system to monitor the beam position and a feedback system to adjust the reflective crystals. The XFELO optical path with length of 50-100 m requires the drift of the beam to be controlled within 10% (5 \(\mathrm {\upmu }\)m) of the spot size, that is, the offset of the beam angle must be below 50 nrad. Additionally, the resolution of the position detector should be 1 \(\mathrm {\upmu }\)m and the angle monitoring resolution should be 10 nrad.

Drift in the FEL beam is mainly monitored by a high-precision X-ray beam position monitor (XBPM) which is usually installed at a specific position in the optical path [85]. The structure of the beam position monitoring system is shown in Fig. 29, in which the four-quadrant structure XBPM is inserted in the reflection light path. Currently, the resolution of this type of detector developed by SSRF is 0.1 \(\mathrm {\upmu }\)m at a distance of 10 m, which can realize an angle resolution of 10 nrad and achieve a sampling rate in the kilohertz range at the same time [86]. However, this detection method cannot measure the deviation of the beam angle directly. For this reason, it is necessary to develop a detection system devoted to detecting the deviation of the beam angle.

Fig. 29
figure 29

(Color online) Beam position stability measurement system based on XBPM

Diffraction couples the photon wavelength or energy to the incident angle of the lattice planes within the crystal, and the output beam will contain a spread of energies due to the vertical divergence of the photon beam from the source [87]. Therefore, an analysis crystal arranged orthogonally to the monochromator crystal is used to disperse the output beam in the horizontal direction, as shown in Fig. 30, in which the angle of the output beam can be decoupled from the wavelength and measured directly. Combined with high-speed and high-resolution 2D-imaging detectors, we can achieve a \(\sim \mathrm {\upmu }\)s-level sampling rate and nano-radians angular resolution. Furthermore, this detection method does not need to consider the synchronization problem when X-rays are transmitted over a long distance.

Fig. 30
figure 30

(Color online) Beam angle stability measurement system based on the wavelength-angle decoupling method

R and D for non-vacuum system It is difficult to establish an experimental system and accomplish detection in a vacuum environment. In the initial stage, the XFELO test system was established based on synchrotron radiation, and different methods were attempted to realize the circulation and high-precision detection of the optical path.

To compensate for the effect of atmospheric absorption, the energy of the X-ray beam used for the experiment is 12.914 keV, where the corresponding lattice index for the silicon crystal is (8 0 0). The design of this scheme is based on a rectangular cavity, in which a closed optical path is formed by four reflective crystals with an incidence angle of 45\(^{\circ }\), as shown in Fig. 31. Crystal 1 needs to provide a channel through which the beam can be introduced, and the elicitation of the beam can be realized by critically adjusting the angle of the crystal.

Fig. 31
figure 31

(Color online) Schematic diagram of the beam path

The four crystals must meet the diffraction conditions at the same time, implying that the adjustment mechanism will be very complicated. In order to reduce the difficulty of the online experiment, the first experiment uses two crystals cut from a whole, as shown in Fig. 32. The (8 0 0) and (0 0 8) planes of the crystal lattice were used to realize the 90-degree deflection of the beam. A channel was cut at the lower side of the first crystal to introduce the beam, and another channel was cut at the same position on the second crystal to elicit the beam.

Fig. 32
figure 32

(Color online) Schematic diagram of the 90-degree deflection crystal

To increase the optical distance of the light beam, the tilt angle of Crystal 2 in Fig. 31 is slightly rotated to cause a slight displacement in the light beam in the horizontal direction. When the crystal is 50 mm wide and the distance between the two crystals is 1500 mm, then 10 cycles of diffraction can be achieved with a 4 mm one-cycle offset in the horizontal direction, and the one-cycle period is approximately 100 ns, which can be recorded by high-speed cameras. Based on the preliminary experiment, the two-crystal system can eventually be changed to a four-crystal system to finally meet the needs of XFELO.

4.3 Fast phase shifter

The phase shifter is usually realized by a chicane-like structure made of several bending magnets. Within the phase shifter, a bypass trajectory is built beside the straight trajectory. The electron beam passes through the phase shifter with a longer pass length, thus reducing the arrival time compared to the straight trajectory. When it is applied in the undulator section of an FEL facility, the phase between the electrons and the radiation can be controlled, and their interaction can be changed to vary the property or the quality of the radiation. For example, when a crossed planar undulator is used, the XFEL can switch the X-ray polarization rapidly with a fast phase shifter.

To achieve this, the need to delay the 8 GeV, 1 MHz electron beam bunch-by-bunch with the fast phase shifter is expected. For this purpose, the bending magnets of an ordinary chicane-like phase shifter are replaced by fast kickers with a high repetition rate. When the kicker is on, the beam is delayed for phase shifting, whereas the beam passes through directly without any delay when the kicker is off. In general, such a fast phase shifter should achieve 0.4 nm of the maximum path length for a bunch-by-bunch operation.

Based on the parameter requirements above, the fast phase shifter is designed to be a chicane-like structure consisting of four fast kicker magnets having 200 mm effective length. The maximum bending angle of the kicker magnet is 35 \(\mathrm {\upmu }\)rad and the angle is adjustable for various phase change requirements. To avoid disturbances between two successive kicker magnets, their separation should be approximately 200 mm. All four kicker magnets are installed in the same vacuum case and excited by the same power supply to reduce structural complexity. Figure 33 shows the structure of this fast phase-shifter.

Fig. 33
figure 33

(Color online) Schematic of the fast phase shifter

For the fast switching requirement, the kicker magnet used here should be able to perform a bunch-by-bunch deflection of the 8 GeV, 1 MHz electron beam. The requirement for the repeat stability of the magnetic field created by the kicker magnets is also very high and should be less than 100 ppm to meet the orbit stability requirement of the downstream FEL process. Based on these requirements, a single-turn coil kicker magnet is selected for the fast phase shifter. The mechanical structure and the field distribution are shown in Fig. 34.

Fig. 34
figure 34

(Color online) Mechanical structure and magnetic field calculation of the single-turn coil kicker magnet used in the fast phase shifter

Just as its name implies, the single-turn coil kicker magnet is excited by a single-turn coil. The excitation coil is made of oxygen-free copper with a \(10\times 7\) mm\(^2\) sectional area. The magnet core is made of NiZn soft magnetic ferrite, which has a fair high-frequency response. The initial permeability can reach 1500, while the saturation flux density achieving than 0.4 T. The electrical resistivity \(\rho\) of this magnet is high, the loss tangent is low, and the permeability temperature factor is low. All of these properties allow it to meet the fast kicker requirements.

The key component to guarantee fast and stable operation of the fast kicker magnet is the pulsed excitation power supply. The power supply should operate in a sufficiently fast and stable mode with a high repetition rate. The fundamental principles and the waveform of the output current are shown in Fig. 35.

Fig. 35
figure 35

(Color online) Schematic of the pulsed excitation power supply and its output current waveform

The circuit of the single-turn coil kicker magnet consists of a combination of resistors, capacitors, and inductors. First, a resistor and capacitor are connected in parallel, and then an inductor is connected in parallel. A MOSFET is used to turn the circuit on and off for pulse generation. When the MOSFET is turned on, a step response is formed in the circuit. The circuit should work in an underdamping condition to obtain a faster pulse front and peak current. When the MOSFET is off, the energy stored in the inductor (the magnet) is leaked through the resistor with a damping time constant of L/R. With such a design, the high repetition rate and high stability requirements of the power supply can be satisfied with a sufficiently high deflection magnetic field strength. Some of the main parameters of the pulsed excitation power supply for the fast phase-shifter are listed in Table 4.

Table 4 Main parameters of the pulsed excitation power supply

4.4 Mechanical support system of BBA

SHINE is a significant national science and technology infrastructure. SHINE includes an electron-gun, focusing magnets, cryomodules, various magnets including quadrupoles and dipoles, undulators, electron beam diagnostics and control systems, and other associated equipment. All components will be installed and stably supported to the correct position within the tolerances required by beam physics. The mechanical support system is designed not only to support them, but also to be capable of adjusting them to their proper positions. The stability of the electron beam is one of the most important factors that influence the properties of FEL. The increasing demands of beam position stability require higher position stability for key components such as undulators and quadrupole magnets. Because the mechanical support system for the FEL provides support, location, and position adjustment, high mechanical stability of the supports is necessary. This section focuses on the research pertaining to the mechanical support system for beam-based alignment (BBA).

The BBA system is used for the support of the key components of FEL, such as quadrupole magnets and the cavity BPM (CBPM) installed between two undulators [88]. The design concept combines optimized mechanical properties with an ‘easy-to-manufacture’ design. Figure 36 shows the mechanical structure of the BBA support design prototype for magnets and other key components.

Fig. 36
figure 36

(Color online) BBA prototype support system

The BBA prototype support system contains two marble slabs with a low thermal expansion coefficient and three layers of steel plates located below the marble slabs. The bottom steel plate (called the grouting plate) is fixed to the ground with four tightening bolts and high-strength non-shrinkage cement. Four shims are placed at the four corners between the grouting plate and the fixed marble plate. Three-dimensional changes can be made by adjusting the shims located on the steel plate and four M16 jack screws. The electric sliding table adjusted by remote electronic control is located between the marble and the second-layer support of the beam elements (magnets, CBPM, etc.). The adjustable amount of the sliding table regarding height and horizontal direction can reach \(\pm 5\) mm. In addition to being adjustable, it can also be used to compensate for any settlement of the foundation in the future.

There is a higher requirement for the stability of the quadrupole magnets in BBA during SHINE operations. For this purpose, we develop active damping equipment. The device can realize both nano-positioning and active vibration reduction. It consists of a piezoelectric ceramic and flexible hinge structure and is driven by four piezoelectric ceramic elements in the vertical direction and one piezoelectric ceramic element in the horizontal direction. A closed-loop controller with internal strain displacement sensor can realize nano-precision positioning adjustment of the quadrupole at micron precision levels using an electric slide mechanism. Vibration sensors are arranged externally to monitor the background vibration of the table. According to the signals from the vibration sensors, a piezoelectric ceramic feedback drive is used to attenuate the vibration transmitted from the support platform to the quadrupole.

4.5 Survey and alignment

Straight Lines Reference System (SLRS) To ensure the high precision of the undulator tunnel control network, a straight lines reference system is built to ensure the absolute accuracy of the undulator tunnel control network. The SLRS will provide correction parameters for the geodetic network (\(\Delta x\), \(\Delta z\)). SLRS works like a ruler placed in the seemingly bent (refraction) tunnel network. There will be no direct connection between the SLRS and the components. Calibrated transfer pieces will be used to connect the SLRS to the tunnel network to obtain measurements.

As shown in Fig. 37, a laser light source emits coherent light. Only the fiber end, an aperture, and an achromatic lens are used to generate the expanded and collimated beam. Spheres placed along the measuring section produce a position spot behind the center of each sphere, which can be viewed with a CCD camera. The center of a sphere and the center of its position spot in the image should generate a straight line. A lens system focuses the expanded beam to the dimensions of the CCD sensor. Correlation algorithms are then used to calculate the center positions of the image.

Fig. 37
figure 37

(Color online) Principles of the SLRS

The fiducialization of the undulator The alignment method for SSRF undulators is used to transfer the geometric center of the magnetic component mounting surfaces to the target on the base frame of an undulator. An X-ray free-electron laser device has a relatively small field region, so the requirement for the undulators’ alignment will be high, and a new calibration method for undulator fiducialization is needed. We design and manufacture a “Magnetic Landmark” and use it to achieve high-precision undulator magnetic fiducialization, as shown in Fig. 38.

Fig. 38
figure 38

(Color online) Magnetic landmark design

High-precision undulator fiducialization is achieved by the Magnetic Landmark, as shown in Fig. 39. First, we determine the relative relationship between the magnetic center of the undulator and that of the magnetic target with the coordinate measuring machine; then, using the position relationship between the magnetic center of the Magnetic Landmark and its mechanical center, we obtain the magnetic center coordinates of the undulator.

Fig. 39
figure 39

(Color online) Undulator magnetic fiducialization using magnetic landmark

The measurement accuracy in the horizontal direction is 34 \(\upmu \textrm{m}\) and 28 \(\upmu \textrm{m}\) in the vertical direction. This meets the design objective for the Magnetic Landmark, which provides a future reference for undulator alignment in the FEL device.

5 X-ray transport and diagnostics

5.1 beamline designs

Fig. 40
figure 40

(Color online) Layout of FEL-I beamline

Table 5 CRL parameters

The energy range of XFELO is 6–15 keV. The FEL pulses will be injected into the FEL-I and transported along the same path as the SASE source. Fig. 40 shows the layout, where the shaded red-box parts indicate new parts or changes needed for XFELO operation. The SASE source position is the 0 m mark, and the XFELO source is located at -300 m. The original FEL-I beamline includes CRL1, offset mirrors (M1, M2a, M2b), DCM, CRL2, HSS-KB mirrors, and CDS-KB mirrors. When the XFELO beam is injected, two compound refractive lenses are added to collimate and focus the X-rays. One is CRL-C, which is designed to collimate or weakly focus the beam. This will ensure a 6\(\sigma\) acceptance of the offset mirrors. The other is CRL4, which focuses the beam to the SEL sample position. The original CRL2 can focus the beam to the HSS sample position. The DCM is changed to a high resolution QCM to fulfill the requirements of high resolution RIXS experiments.

The CRL-C is located at 30 m. Its focal length is 330 m. Parameters are provided in Table 5. Using these parameters, the transmittance of all energy is higher than 96%. The CRL4 is located at 1185 m and is designed to focus to 1197 m. The relevant parameters are provided in Table 5. Fig. 41 shows the focusing power, effective aperture, focal length difference, and transmittance. The focal length difference is less than \(\pm 0.1\) m, and a translation is set along the beam direction to compensate for this difference. The transmittance is greater than 75% for energy levels less than 9 keV and is higher than 90% for the 9–15 keV range.

Fig. 41
figure 41

(Color online) Focusing power, effective aperture, focal length difference, and transmittance of CRL4

5.2 X-ray diagnostics

X-ray diagnostics will be an essential tool for SHINE operations. Because of the complicated structure of the diagnostics systems, various variables monitored during experiments tend to drift and need to be measured and controlled. Experimental data collected by users should be corrected based on the position, intensity, polarization, spectral, and temporal parameters of X-ray FEL pulses [89].

The development of X-ray diagnostic systems should be based on the properties of the XFELO line. The XFELO line will be part of the SHINE facility, and the energy range of XFELO is 5–15 keV based on the configuration of SHINE, which encompasses the 0.4–25 keV energy range. To facilitate operation and provide users with the full characteristics of shot-by-shot pulses, most photon diagnostic systems should be capable of measuring related parameters within a pulse cycle of 1 \(\upmu\)s. Beam intensity and position monitors, and single-shot spectrometers (using linear array detectors) are capable of providing single-shot resolution. Some diagnostic systems such as the wavefront sensor [90,91,92,93,94], the imager, and similar systems cannot diagnose on a shot-by-shot basis because of acquisition speed, damage to the wavefront, or heat load limitations.

As described above, X-ray diagnostics requires a complicated system, including multiple components, instruments, and techniques. In particular, the X-ray structure generated by XFELO is complex, and it is difficult to build a common diagnostic system that is effective for some pulse structures. Therefore, various instruments may be employed during XFELO operations, such as a polarimeter [95,96,97,98,99], online spectrometer [100,101,102,103], K-Monochromator [104, 105], pulse length measurement device [106,107,108], and other related equipment. In this case, the diagnostic device could consist of invasive and non-invasive devices, where the non-invasive devices are usually gas-based monitors.

Wavefront monitor The wavefront properties of FEL X-rays are significant for several types of experiments, such as contrast imaging of nano-structures, microscopic biomolecules, or coherent diffraction imaging [109, 110]. Thus, calibration of the wavefront is essential for users after transmitting through multiple mirrors. The most commonly used measurement methods are point diffraction and Talbot-type interferometers, which are used in the soft and hard X-ray regions, respectively. In view of the energy range associated with MING, the Talbot-type interferometer will be used to measure X-ray wavefront information.

A wavefront sensor based on single-grating Talbot interferometry mainly consists of a phase grating and a 2-D imaging array. In the hard X-ray range, Talbot interferometry can use a \(\pi\)-phase shift checkerboard pattern with pitch d as the imaging component [92]. The phase grating divides the incident light into two wave components with a small shear angle \(V_\text {s}=2\lambda /d\) (\(\lambda\) is the wavelength and d is the period of the grating). For the hard X-ray range, d needs to approach the micrometer level to provide adequate shearing, which will increase performance. A lower pitch d will improve the resolution of the interferometer. However, common imagers cannot resolve the pattern when d is only a few micrometers. Some Talbot interferometers have solved this problem by detecting the Moiré pattern with a second analyzer grating [111, 112]. A single-grating Talbot interferometer has been developed to accurately diagnose the single-shot wavefront property in LCLS [94]. As shown in Fig. 42, the wavelength of the X-ray is 0.13 nm. From the spot profiles, the intensity distribution is obtained by integration over all pixels within a single sub-aperture, followed by an adapted bi-cubic spline interpolation. The wavefront can then be reconstructed from the rectangular array of the spot distribution.

An orbital angular momentum (OAM) beam is an advanced tool in modern research, applicable to optical manipulation, quantum information technology [113, 114], remote sensing, and optical communications. For most applications, it is essential to measure the states of the OAM beams. Several methods have been proposed to measure the states of OAM beams, such as amplitude diffractive optical elements [115], methods based on the Mach-Zehnder interferometer [116, 117], methods based on plasmonics [118], and use of Dammann vortex gratings for multiplexed OAM beams [119].

OAM is characterized by its wavefront and intensity information; therefore, the OAM property can also be reconstructed by solving the Talbot pattern [120,121,122]. The experimental results of OAM with various topology charge values (l = 0, \(\pm 1\), \(\pm 2\), \(\pm 3\)) are shown in Fig. 43.

Fig. 42
figure 42

Spot distribution of a Talbot wave-front sensor for a single FEL pulse (0.13nm at LCLS). Represented from [94]

Fig. 43
figure 43

(Color online) Simulated and experimental results when measuring the OAM with the Talbot pattern. Top: Simulated results for incident OAM beams with l = 0, \(\pm 1\), \(\pm 2\), \(\pm 3\), Bottom: Experimental results for incident OAM beams with l =0, \(\pm 1\), \(\pm 2\), \(\pm 3\). Represented from [120]

X-ray intensity and beam position monitor One of the most useful non-invasive photon diagnostic devices is represented by gas-based monitors that measure the intensity and beam position of X-ray pulses [123, 124]. These two characteristics are integrated into one device, called a gas monitor detector (GMD). The GMD is integrated into a gas-based monitor system via multiple stages of pressure differential chambers, where the gas pressures are mbar level and \(10^{-5}-10^{-3}\) mbar in the beam attenuation chambers and the GMD device, respectively. Additionally, the pressures in the up-stream undulators and down-stream X-ray beamlines are both below \(10^{-8}\) mbar. The length of the X-ray attenuation chambers is 4\(\sim\)6 m, filled with typical gases (e.g., N, Ne, Xe, Ar). As a non-destructive diagnostic device, the GMD (whose longitudinal length scale is \(\sim 0.1\) m) can accurately calibrate the X-ray intensity associated with the X-ray pulse energy on a shot-by-shot basis. Because of the high transmission and small photon-absorption coefficients for X-rays above 3 keV energy, a solid attenuator using CVD-diamond and SiC materials is also proposed. Diamond thin foil with thicknesses from \({500}\,\upmu \hbox {m}\) to 1.5 mm can adequately attenuate photon energy in the 3–15 keV range, and SiC thin foil with a similar thickness (\(\sim 1.5\) mm) can be effective for photon energies below 25 keV. An X-ray beam position monitor (XBPM) is composed of four groups of detectors placed at 90 degree intervals along a circle. Both the gas and solid position monitors resolve the position information by solving for the charge differences among the four detectors when the incident position of the X-ray changes. The spatial resolution of CVD-diamond-based XBPM is less than \({7}\,\upmu \hbox {m}\) at 0.15 nm in Spring-8 [125]. Using the aforementioned parameters, the intensity and position can be calculated accurately using recorded data of the current generated from the interaction between the X-ray pulse and the gas or solid foil.

X-ray spectrometer Because of the SASE mechanism, the spectra usually change in the single-shot acquisition mode. However, for many experiments, accurate shot-by-shot spectra are desirable to improve resolution. Hence, a single-shot spectrometer is essential for operations across the full X-ray energy range under consideration. In addition, the spectrometer with high energy resolution can be applied to diagnose the central energy of FEL-I at SHINE, which will run in the SASE and self-seeding mode.

For photon energies above 5 keV, the Bragg diffraction crystal-based spectrometer is always employed in the beamline. The diamond crystal spectrometer is considered the best choice for the hard X-ray range, which results in only a small loss of X-ray pulses. Thus, this spectrometer could be used as a non-destructive monitor. In addition, the bent silicon crystal spectrometer has been in operation at both LCLS and European XFEL. As shown in Fig. 44, the spectral resolution can be solved for using the expression \(E/\Delta{E}=R(\sin {\theta _\text {B}})^2/(H\cos {\theta _\text {B}})\) [126], where \({\theta _\text {B}}\) is the Bragg angle, R is the meridional radius of the bending crystal, and H is the meridional footprint within the principal plane. Taking into account the high repetition rate and the distortion of the wavefront of the X-ray pulse, the bent diamond crystal spectrometer represents the most feasible solution. The spectral resolving power of the spectrometer based on use of a bent crystal at the European XFEL is 60000 W at a photon energy of 9.3 keV, and the spectral resolution of the spectrometer in LCLS is \(2\times 10^{-5}\) [100, 101].

Fig. 44
figure 44

(Color online) Dispersion geometry of a bent thin crystal spectrometer for hard X-rays. Represented from [126]

Most recently, we have proposed a non-invasive gas-based spectrometer for SHINE [127]. A specially optimized electron optical system will improve the collection efficiency of ionized electrons and reduce the divergence of the arrival time of ionized electrons with the same kinetic energy, which can theoretically achieve a spectral resolution of 0.2 eV and an energy window of 20 eV.

X-ray temporal profile Ultra-short pulses are essential in many fields, such as dynamics or phenomena in atomic structures, crystal lattices, molecular compounds or clusters, photochemical or photo-catalytic reactions, and single particle molecules via FEL pulses themselves or in combination with external laser pulses, e.g., a laser pulses in the visible-NIR-MIR range, THz radiation pulses, or higher order harmonics laser pulses (HHG). Therefore, measuring and monitoring the time delays between the X-ray FEL pulses and external radiation pulses as well as determining the detailed structure of X-ray pulse profiles on a shot-by-shot basis are very significant for ultrafast dynamic measurement applications.

The state-of-the-art techniques and methods of measuring the X-ray profiles have developed quickly in recent years, and tremendous effort has been expended to realize robust and persistent X-ray photon diagnostics for routine operations. Temporal diagnostics can be differentiated into two major categories: X-ray photon pulse length measurement, and X-ray photon pulse arrival. The former measures the duration of X-ray pulses, the detailed pulse profile, and the longitudinal radiation power distribution. The latter is mainly related to the characteristics of time-delay and shot-by-shot temporal jitter in X-ray pump-probe experiments, which are important for the measurement of ultrafast dynamics when implementing XFEL. X-ray timing devices are discussed below.

The direct method to measure duration and longitudinal coherence is to develop and fabricate an X-ray auto-correlator such as the EUV- and XUV-region device developed at FLASH [128, 129] and FERMI using the wave-front split and delay scan technique. Currently, an autocorrelation technique for the hard X-ray region is still in development at SCALA and LCLS [130, 131], where single X-ray pulse splitting is performed by Laue crystal diffraction to keep the device compact. An X-ray auto-correlator is constructed similar to a visible light auto-correlator: the beam is split into two identical replicas through a split-delay unit (SDU), the mutual delay between the two replicas is generated via a scanning stage, and finally the two replicas are recombined to create a nonlinear signal, from which the photon pulse duration as well as the phase information can be retrieved and determined.

X-ray transverse deflecting structures (XTDSs) can also be used to measure the temporal profile of X-ray pulses. Equipped with transverse deflecting structures (TDSs) in conjunction with an electron beam spectrometer downstream, the precise phase space and energy losses of electron bunches can be obtained. Thus, by comparing the measured phase spaces obtained for on and off lasing, the matched X-ray temporal profile emitted by FEL processes can be derived. At LCLS, the temporal resolution is approximately 4 fs RMS for 10.2 keV hard X-ray FEL pulses using RF transverse deflectors working at the X-band frequency (11.424 GHz), where the electron bunch charge and beam energy are 150 pC and 15.2 GeV, respectively [132]. The MING project has also deployed an XTDS detector based on the experience at SXFEL and a timing resolution of 1 fs is the target.

X-ray pulse arrival monitor The X-ray pump-probe measurement is a cross-correlation method in which the X-ray pulse induces a perturbation in a system within an ultra-fast timescale, while another external short radiation pulse is set to arrive at various time delays to monitor and characterize the ultra-fast changes of the system in real time [133]. The external sources could be a visible or NIR laser pulse, a long wavelength radiation pulse (THz), or the HHG atto-second pulse of an optical laser, to name a few. Spatial encoding & single-shot imaging is frequently used to measure the temporal jitter between the X-ray and optical laser pulses, which has advanced the photon energy to approximately 90 eV at FLASH using XUV pulses. The single-shot imaging is recorded while the X-ray pulse and the optical laser overlap both in space and time. The ideal X-ray pulse arrival diagnostics should have a resolution of a few femtoseconds and eventually achieve a temporal resolution of \(\le 10\) fs, and should be effective at high photon energies of a few keV.

Fig. 45
figure 45

(Color online) The ARPolar instrument: a drawing of instrument, b a detection channel positioned in the red square in panel (a). Detection channel consists of two focusing electrode groups (A and B), retarding grid electrodes (G), magnetic shields, a drift tube, and an MCP detector. Represented from [99]

Polarization diagnostics The polarization properties of X-ray FEL pulses can be characterized by measuring the angular distribution of the photo-ionized electrons’ angular distribution (PAD) [134]. The PAD for s-shell electrons ionized by polarized photon pulses is well-known, from which the linear polarity and polarization angle can be retrieved. The electron time-of-flight (e-TOF) technique, routinely called ‘e-TOF based’, can record the flight time of electrons and discriminate those that come from s-shells. It is a noninvasive method because only a small fraction of the total photons interact with the rarefied gas in the e-TOF instrument, and the other photons are unaffected. However, higher resolution can be achieved because of the beam’s high intensity. In recent years, instruments based on monitoring the angular distribution of photoelectrons, the so-called “Cookiebox”, were successfully deployed for the diagnosis of X-ray FEL polarization at DESY [135]. Inspired by this research, an angular-resolved instrument has been designed for the Shanghai soft X-ray free-electron laser facility (ARPolar), and the ARPolar instrument aims to measure the charge distribution of photoelectrons from the s-shell for polarization diagnosis using 16 detection channels [99], as shown in Fig. 45. Recently, a multiresolution instrument was also proposed at SLAC, with the aim of noninvasively monitoring the spectral, temporal, and polarized characteristics of LCLS-II. Simply stated, X-ray polarization can be fully obtained using an ARPolar-alike instrument.

Similarly, artificial channel-cut crystals (ACCs) can be used for high-definition hard X-ray polarimetry. The scheme includes a polarizer, a slit, an analyzer, and a photo-diode. Perfect crystals mounted on a rotatable polarizer are used to reflect FEL pulses consecutively at \(2\phi =90\) degrees, where \(\phi\) is the Bragg angle. Both the polarizer and the analyzer are rotatable. The photo-diode detector is then used to monitor the intensity of the photons at the exit, and the polarity can be derived [136, 137]. The material of the perfect crystal is selected to match the photon energy and to reduce multi-beam diffraction. A polarization purity of \(2.4\times 10^{-10}\) and \(5.7\times 10^{-10}\) was reported for 6.45 keV and 12.914 keV FEL pulses with Si(400) and Si(800) crystals, respectively [137]. More recently, equipped with four well-aligned single-crystal diamonds, a polarization purity of \(1.4 \times 10^{-10}\) for 9.8 keV with C(004) was reported, which is close to ideal, as determined by X-ray divergences [46].

6 Summary

The X-ray free-electron laser brings significant improvements in the tools used to conduct fundamental research at Å lengths and fs time scales. In terms of facility development, superconducting RF linac-based high-repetition-rate X-ray free-electron lasers are making great strides. Starting in early July 2017, the first high-repetition-rate hard X-ray XFEL, European XFEL, achieved initial lasing. Now under development, LCLS-II is expected to begin operating in 2025. Additionally, the LCLS-II-HE project proposes an energy upgrade to LCLS-II. As a new high-repetition-rate X-ray FEL, SHINE is currently under construction and is one of the major research infrastructure projects in China. SHINE will be the first high-repetition-rate XFEL user facility in China, designed to enable new scientific opportunities when it launches in 2025. SHINE consists of a low emittance injector, a high performance continuous-wave 8 GeV linac using superconducting RF technology, three undulator beamlines, and 10 end-stations. An adjustable photon energy ranging from 0.4 to 25 keV will be produced using SHINE. The main facility will be constructed in \(\sim\)38 m-deep tunnels \(\sim\)3.1 km in length.

Cavity-based XFELs have the potential to produce high-intensity fully coherent laser-like X-ray pulses, which will be a remarkable milestone in the evolution of XFELs. SHINE can produce 8 GeV electron bunches at 1 MHz, which are appropriate for a cavity-based XFEL. It is now a good time to propose the construction of cavity-based XFEL. Thus, we propose a cavity-based X-ray free-electron laser for SHINE: the megahertz cavity enhanced X-ray generation at SHINE (MING@SHINE). The goal of MING is to generate high-intensity, fully coherent X-rays in the energy range of 6–15 keV, driving advanced applications and the development of related technology.

In the current design, MING will be equipped with a 45\(^\circ\) inclined undulator. The undulator period is chosen to be 26 mm, which is the same as the FEL-I undulator to be used by SHINE. In the initial phase, MING will use silicon crystals as Bragg reflecting mirrors. Then, the possibility of using diamond will be actively evaluated. Based on the proposed parameters, MING can easily achieve pulse energies greater than \(300~\upmu\)J for operations below the 10 keV photon energy, and the corresponding bandwidth is close to the Fourier transform limited value. Above 10 keV photon energy, the pulse energy for MING will be reduced to 100–200 \(\upmu\)J. Overall, the output pulse energy of MING is similar to that of the SASE mode of FEL-I, but the spectral bandwidth is decreased by 2–3 orders of magnitude, resulting in a tremendous increase in spectral brightness. In addition to the increased brightness, XFELO can provide controllable polarization with a very high degree of purity. Furthermore, MING can also deliver OAM light, requiring only a slight change in the resonance condition of the XFELO mode. The results obtained thus far indicate that MING holds great potential in providing a significant boost to the performance of SHINE.

Finally, the proposed MING is planned to start construction after the initial operation of SHINE. The SHINE project is expected to be fully completed in five years.