Synchrotron Radiation in Periodic Magnetic Fields of FEL Undulators—Theoretical Analysis for Experiments

: A theoretical study of the synchrotron radiation (SR) from electrons in periodic magnetic ﬁelds with non-periodic magnetic components is presented. It is applied to several free electron lasers (FELs) accounting for the real characteristics of their electron beams: ﬁnite sizes, energy spread, divergence etc. All the losses and o ﬀ -axis e ﬀ ects are accounted analytically. Exact expressions for the harmonic radiation in multiperiodic magnetic ﬁelds with non-periodic components and o ﬀ -axis e ﬀ ects are given in terms of the generalized Bessel and Airy-type functions. Their analytical forms clearly distinguish all contributions in each polarization of the undulator radiation (UR). The application to FELs is demonstrated with the help of the analytical model for FEL harmonic power evolution, which accounts for all major losses and has been veriﬁed with the results of well documented FEL experiments. The analysis of the o ﬀ -axis e ﬀ ects for the odd and even harmonics is performed for SPRING8 Angstrom Compact free-electron LAser (SACLA) and Pohang Accelerator Laboratory (PAL-XFEL). The modelling describes theoretically the power levels of odd and even harmonics and the spectral line width and shape. The obtained theoretical results agree well with the available data for FEL experiments; where no data exist, we predict and explain the FEL radiation properties. The proposed theoretical approach


Introduction
The first theoretical results for the radiation of a charge on a circular orbit were obtained by Lienard in the end of the 19th century. A few years later in 1907 a complete theoretical study was performed by Schott. It was aimed on the description of the atomic spectra, but quantum mechanics was still unknown and this study failed to describe atoms. Instead it perfectly described the spectral and angular distribution of the radiation from electrons in a constant magnetic field. The results did not find application at that time and they were forgotten for almost half a century. The undulator radiation (UR) is a particular case of the synchrotron radiation in periodic magnetic field; it was proposed by Ginsburg [1] and first observed by Motz [2] in the middle of the 20th century. Ginsburg also claimed [1] that coherent radiation could be emitted by electrons in periodic magnetic fields; Ginsburg hypothesized that small groups of electrons, separated by the wavelength of the radiation, would emit coherent radiation. The real story of the synchrotron and undulator radiation began. Since then, the energy E of the electrons in accelerators has been shown to increase, so that now the relativistic factor γ >> 1, γ = E/mc 2~1 0 3 − 10 4 , where m is the electron mass and c is the speed of light. High demand for coherent radiation in X-ray band pushed towards building X-ray free electron lasers (FELs), which provide coherent radiation pulses in the Roentgen band with a duration of femtoseconds, which allow studies of ultra fast processes on nanoscale. To achieve this, the relativistic

Spontaneous UR intensity and Spectrum Distortions
The ideal undulator assumes pure sinusoidal magnetic field along the axis. In the ideal planar undulator only odd harmonics are radiated on the axis. However, the radiation spectrum of real undulators and FELs differs from the ideal: even harmonics appear in FEL experiments [18][19][20][21][22]. This is attributed to the non-ideally harmonic magnetic field and finite beam size. Theoretical estimation for even FEL harmonics in the experiment [21] at Advanced Photon Source's (APS) Low Energy Undulator Test Line (LEUTL) were based on the work [23]; however, they required the bunching values for the first and second harmonics, which in turn needed numerical simulations or theoretical calculations. Moreover, applying formulae of [21,23] to X-ray experiments, we systematically get harmonic powers 25 times lower than those measured. To our best knowledge no convincing comprehensive theory has been provided thus far. In what follows we give analytical description of the synchrotron radiation from real electron beams in periodic magnetic fields of FEL undulators accounting for finite beam size and non-periodic magnetic components; the latter deviate electrons off the undulator axis. We demonstrate that this effect may exceed that of the finite size of the electron beam and that of the relevant betatron oscillations on the UR intensity. The UR, accounting for the magnetic field harmonics, has been recently Symmetry 2020, 12, 1258 3 of 24 studied, for example, in [24,25]. It was concluded that reasonably strong field harmonics, 30% of the main periodic field, still mostly influenced the saturation and gain lengths in FELs and had little effect on the FEL harmonic intensities. In what follows we will focus on the effect of weak non-periodic magnetic components H x = H 0 ρ 1, H y = H 0 κ 1. They are naturally caused by residual magnetic fields in undulators, magnetizing errors of constant magnets, by the field of the Earth,~0.5 Gauss, and they are weak compared to the undulator field amplitude, H 0~1 Tesla. The proposed analytical formalism, however, is not limited to such weak fields H d /H 0~1 0 −4 , but allows arbitrary strengths.
As usual in classical electrodynamics, the calculations of the radiation intensity from an electron consist in the computation of the radiation integral: where the notations are common to SR and UR theories: → n is the unit-vector from the electron to the observer, → r is the electron radius-vector, → β is its velocity and c is the speed of light. For the sake of generality, we consider the radiation from an electron in the two-dimensional bi-harmonic multiperiodic field: → H = H 0 (sin(k λ z) + d sin(pk λ z), d 1 sin(hk λ z) + d 2 cos(lk λ z), 0), k λ = 2π/λ u,x , λ u;x ≡ λ u , h, l, p ∈ integers, d, d 1 , d 2 ∈ reals.
The account for the third field harmonic usually allows good reconstruction of the field for a given radiation pattern [26]. Not limiting ourselves to the third harmonic, the proposed analytical formalism allows field harmonics of arbitrary strength and order. The calculations go along the lines of [27]; the integrand and the exponential of the radiation integral (1) are expanded in series of the small parameter 1/γ 1, which naturally arises in the relativistic limit because high-energy electron beams are used in FEL installations. For the two-dimensional field (2) proper formulae are much more cumbersome than in [27], but the approach remains the same: the non-oscillating terms in the exponential in (1) yield the resonances of the UR; their resonant wavelengths are expressed as follows: where the account for the multiple periods of the undulator is given by = 1 + d , and the angle Θ 2 = θ 2 + θ 2 H − √ 3θ H θ ρ sin ϕ−κ cos ϕ √ κ 2 +ρ 2 includes the usual off-axis angle θ and the effective bending angle θ H , which describes the effect of the non-periodic magnetic components. The purely periodic terms in the exponential of the radiation integral are collected and form the generalized Bessel-type functions J m n (ξ i ), which naturally arise in the following form: nα + ξ 1 sin(hα) + ξ 2 cos(lα) + ξ 3 sin α + ξ 4 sin(2α) +ξ 5 sin(2hα) + ξ 6 sin(2lα) + ξ 7 cos((l + h)α) + ξ 8 cos((l − h)α) +ξ 0 sin(pα) + ξ 9 sin((p + 1)α) + ξ 10 sin((p − 1)α) + ξ 11 sin(2pα) where: ξ 0 = ξ 4 8d kp 2 γθ sin ϕ, ξ 1 = ξ 4 8d 1 kh 2 γθ cos ϕ, ξ 2 = ξ 4 8d 2 kl 2 γθ cos ϕ, ξ 3 = ξ 4 8 k γθ sin ϕ, Symmetry 2020, 12, 1258 4 of 24 ξ 7 = ξ 4 4d 1 d 2 hl(l + h) , ξ 8 = ξ 4 4d 1 d 2 hl(l − h) , ξ 9 = ξ 4 4d p(p + 1) , ξ 10 = ξ 4 4d p(p − 1) , k λ u [cm]H 0 [kG]/10.7 is the main undulator parameter, θ is the off-axis angle and ϕ is the azimuthal angle. We assume multiple field harmonics, l, h, p in (2). The additional constant magnetic field components H x = H 0 ρ, H y = H 0 κ, H z = H 0 ς can affect the undulator. In relativistic beams the longitudinal constant component H z = H 0 ς can be neglected and the transversal field H d = H 0 κ 2 + ρ 2 plays major role. It gives rise to non-periodic components [28][29][30] in the exponential of the radiation integral, such as ∝ κ ω where ω 0 = 2πc λ u ; similar terms appear for the field harmonics, involving (p, h, l)ω 0 . The effect of the field H d is accumulated along the undulator length L = λ u N, where N is the total number of periods, and quantified by the normalized bending angle θ H : Physically the constant magnetic field H d bends the electron trajectory into the effective angle γθ H and causes synchrotron radiation from much wider curve, than that of the electron oscillations along the undulator periods. However, its effect in long undulators should not be underestimated, as we will show in what follows. The non-periodic magnetic components in the exponential of the radiation integral compose the following ad-hoc generalized Airy-type function in the integral form: where ν n = 2πnN((ω/ω n ) − 1) is the detuning parameter, describing the deviation of the frequency ω from the UR resonances ω n = 2πc/λ n , where for practical evaluations we can use kN 0.934L[cm]H 0 [Tesla]. The special function S can be expressed as the action of the operational differential operators, also employed for the studies of Hermite and Laguerre families of orthogonal polynomials in [31][32][33]. The generalized multivariable Hermite polynomials: H n (x, y) = e y ∂ 2 x x n , H n (x, y, z) = e y ∂ 2 were studied operationally by Srivastava et al. (see, for example, [34][35][36][37]). Exponential differential operators provide the link between S function (9) and sincx function, which describes the shape of the ideal UR spectrum line. The generalization (9) in the non-periodic magnetic field can be given by the following operational relation: S(ν n , 0, 0) = e iν n /2 sinc(ν n /2).

of 24
H n (x, y, z) can be expressed as sums of the Hermite polynomials of two variables H n (x, y) are just another form of writing for common Hermite polynomials: they have the following sum presentation [38]: Hermite polynomials H n (x, y, z) and H n (x, y) possess the generating exponents: On the undulator axis the second argument of the generalized Airy function S vanishes and S ≡ S(ν n , β, η) simplifies: The effect of the non-periodic magnetic field is quantified by the induced angle θ H in β; the dependence on the off-axis angle θ is in η. The maximum values max[S] = 1 and max[∂S/∂ν n ] = 0.5 explain why the coefficient 2 is grouped with ∂S/∂v n in (21). Upon computing the radiation integral we get the UR intensity: where the intensity of the n-th UR harmonic reads as follows: The generalized Airy function S ≡ S(ν n , β, η) describes the shape of the spectrum line, distorted by the non-periodic magnetic field; the shape of the line for odd UR harmonics is given by function S, of the even harmonics-by ∂S/∂ν n . The Bessel coefficients f 1,2 n give the amplitudes of proper UR harmonics xand y-polarizations and are expressed in terms of the generalized Bessel functions J m n ≡ J m n (ξ i (m)) (4) as follows: f 1 n;y = J n n+1 + J n n−1 + d p J n n+m + J n n−m , f 2 n;y = 2 k γθ sin ϕJ n n .
Symmetry 2020, 12, 1258 6 of 24 Formulas (22)-(24) account for the off-axis angle θ and for the non-periodic magnetic field H d , written in terms of the bending angle θ H . For the odd UR harmonics n = 1,3,5, . . . mainly the Bessel coefficient f 1 n determines the UR intensity (20). The resonance of the UR has an infrared shift respectively to the ideal value at v n = 0: Interestingly, the effective angle θ H and the off-axis angle θ can counteract each other's effect on the radiation. The best compensation occurs for: It follows from (26) that ν n = 0 for θ = 2π In the simplest case of one-dimensional magnetic field H d = κH 0 , for ϕ = π we get the angle θ, in which the infrared shift of the received radiation is compensated: The examples of the UR lines for the PAL-XFEL [39] undulator with N = 194 periods, k = 1.87, period λ u = 2.57 cm, length L = 5 m and the electron energy spread σ e = 1.8 × 10 −4 , is shown in Figure 1a for γθ = 0 and Figure 1b for γθ 0 in the presence of the non-periodic magnetic component H d . In Figure 1a, the field H d causes an infrared shift and broadens the spectrum line, viewed in zero angle γθ = 0. In Figure 1b, note that the same field H d can improve the shape of the spectrum line viewed in the angle γθ = 0.067. Note in Figure 1b as the initial detuning, caused by the off-axis angle γθ = 0.07, reduces if the undulator is affected by the field H d = κH 0~1 0 −4 H 0 ; a further increase of κ broadens the UR line. For the on the axis case, γθ = 0, the effect of H d is purely detrimental (see Figure 1a).
In the simplest case of one-dimensional magnetic field Hd = κH0, for π ϕ = we get the angle θ , in which the infrared shift of the received radiation is compensated: The examples of the UR lines for the PAL-XFEL [39] undulator with N = 194 periods, k = 1.87, period λu = 2.57 cm, length L = 5 m and the electron energy spread σe = 1.8 × 10 −4 , is shown in Figure 1a for γθ = 0 and Figure 1b for γθ ≠ 0 in the presence of the non-periodic magnetic component Hd. In Figure 1a, the field Hd causes an infrared shift and broadens the spectrum line, viewed in zero angle γθ = 0. In Figure 1b, note that the same field Hd can improve the shape of the spectrum line viewed in the angle γθ = 0.067. Note in Figure 1b as the initial detuning, caused by the off-axis angle γθ = 0.07, reduces if the undulator is affected by the field Hd = κH0~10 −4 H0; a further increase of κ broadens the UR line. For the on the axis case, γθ = 0, the effect of Hd is purely detrimental (see Figure 1a). The effect of the off-axis angles, the constant magnetic field Hd and their interplay are also shown for the fundamental harmonic in Figure 2. In Figure 2a, the symmetric ideal UR line of the fundamental tone is described by the sinc(νn/2) function for γθ = 0, Hd = 0; it shows a red shift, if viewed in the angle γθ ≠ 0; the angles γθ > 0.1 cause a significant shift down from νn = 0 and the intensity slightly decreases. The effect of the off-axis angles, the constant magnetic field H d and their interplay are also shown for the fundamental harmonic in Figure 2. In Figure 2a, the symmetric ideal UR line of the fundamental tone is described by the sinc(ν n /2) function for γθ = 0, H d = 0; it shows a red shift, if viewed in the angle γθ 0; the angles γθ > 0.1 cause a significant shift down from ν n = 0 and the intensity slightly decreases. The radiation line of the fundamental harmonic n = 1, viewed in the angle γθ ≈ 0.1, is slightly broadened and has red shift in −2π with respect to the resonance νn = 0 (see Figure 2a). In Figure 2b we demonstrate the spectral line of the fundamental tone, broadened and red-shifted in -π by the constant magnetic field H≈H0×10 −4 , if viewed on the axis, γθ = 0. In Figure 2b, the spectral line reassumes a more distinct shape with the increase of the off-axis angle γθ from zero to ~0.1. This demonstrates that the non-periodic magnetic component κH0 and the off-axis angle γθ can compensate each other's effect on the UR. In the presence of the field Hd≈10 −4 H0, the spectrum line gets narrower and the red shift is smaller for the same angles γθ ≈ 0.1 as shown in Figure 2b.
Our theoretical analysis and (22)- (24) in particular allow the analytical study of even UR harmonics. For the even harmonics the contributions from    [18,19]. Moreover, at the PAL-XFEL the field of the Earth, ~0. The radiation line of the fundamental harmonic n = 1, viewed in the angle γθ ≈ 0.1, is slightly broadened and has red shift in −2π with respect to the resonance ν n = 0 (see Figure 2a). In Figure 2b we demonstrate the spectral line of the fundamental tone, broadened and red-shifted in -π by the constant magnetic field H ≈ H 0 × 10 −4 , if viewed on the axis, γθ = 0. In Figure 2b, the spectral line reassumes a more distinct shape with the increase of the off-axis angle γθ from zero to~0.1. This demonstrates that the non-periodic magnetic component κH 0 and the off-axis angle γθ can compensate each other's effect on the UR. In the presence of the field H d ≈ 10 −4 H 0 , the spectrum line gets narrower and the red shift is smaller for the same angles γθ ≈ 0.1 as shown in Figure 2b.
Our theoretical analysis and (22)- (24) in particular allow the analytical study of even UR harmonics. For the even harmonics the contributions from f 1,2,3 n can be of the same order of magnitude; we distinguish and analyze separately the terms f 1,2,3 n , factorized by S and ∂S/ ∂ν n in (21). Note the value max[∂S/∂ν n ] = 0.5. Upon the comparison of f 3 n (24) with f 2 n in (22), (23), we notice that the role of the angle θ H in f 3 n is formally the same as the role of the off-axis angle θ in f 2 n , i.e., θ H is involved in f 3 n the same way as θ is involved in f 2 n;x,y . Moreover, accounting for the factor k γθJ n n . The latter is a typical off-axis term in (22), (23   The need to screen out such fields was pointed out in [18,19]. Moreover, at the PAL-XFEL the field of the Earth,~0.5 Gauss, can induce the angle γθ H ≈ 0.08 in the 5 m long undulator, and cause even stronger deviation of the electron trajectories. The contributions to the intensity of the second harmonic of PAL-XFEL undulator is demonstrated in Figures 3-5, where we have assumed the off-axis angle γθ = 0.1 and low energy spread σ e = 10 −4 . The contribution to the second harmonic intensity due to the constant field κH 0 (24) accounting for the off-axis angle θ is shown in Figure 3. The shape of the spectrum line is given by ∂S/∂v n . The term f 3 n increases with the increase of the bending field H d . The interplay with the angles γθ (see Figure 3b) limits the increase of f 3 n and determines its behavior for the stronger field H d > 1.5 × 10 −4 Gauss. This latter value depends on γθ and on the undulator parameters; for θ = 0, the Bessel coefficient f 3 n grows further for increasing κH 0 (see Figure 3a). angles γθ (see Figure 3b) limits the increase of and determines its behavior for the stronger field Hd > 1.5 × 10 −4 Gauss. This latter value depends on γθ and on the undulator parameters; for θ = 0, the Bessel coefficient grows further for increasing κH0 (see Figure 3a).  The contributions of the terms for the second UR harmonic for γθ = 0.067 are shown in Figure 4; they decrease with the increase of the constant field strength κH0; the associated spectrum line shape is described by the function S. The comprehensive contribution of all terms to the normalized intensity of the second harmonic, I2, is shown in Figure 5; the maximum intensity is at Hd ≈ 0.7 × 10 −4 Gauss. The decrease of the UR intensity, caused by γθ~0.067, is compensated by the field Hd ≈ 0.7 × 10 −4 Gauss, and at this point, the second harmonic intensity is at its maximum. angles γθ (see Figure 3b) limits the increase of and determines its behavior for the stronger field Hd > 1.5 × 10 −4 Gauss. This latter value depends on γθ and on the undulator parameters; for θ = 0, the Bessel coefficient grows further for increasing κH0 (see Figure 3a).  The contributions of the terms for the second UR harmonic for γθ = 0.067 are shown in Figure 4; they decrease with the increase of the constant field strength κH0; the associated spectrum line shape is described by the function S. The comprehensive contribution of all terms to the normalized intensity of the second harmonic, I2, is shown in Figure 5; the maximum intensity is at Hd ≈ 0.7 × 10 −4 Gauss. The decrease of the UR intensity, caused by γθ~0.067, is compensated by the field Hd ≈ 0.7 × 10 −4 Gauss, and at this point, the second harmonic intensity is at its maximum. . The effect of the energy spread on the UR harmonics is purely detrimental and it causes symmetric broadening of the spectral lines. In this context it is important to underline that high radiation harmonics are more sensitive to the energy spread and to other loss The contributions of the terms f 1,2 n for the second UR harmonic for γθ = 0.067 are shown in Figure 4; they decrease with the increase of the constant field strength κH 0 ; the associated spectrum line shape is described by the function S. The comprehensive contribution of all terms to the normalized intensity Symmetry 2020, 12, 1258 9 of 24 of the second harmonic, I 2 , is shown in Figure 5; the maximum intensity is at H d ≈ 0.7 × 10 −4 Gauss. The decrease of the UR intensity, caused by γθ~0.067, is compensated by the field H d ≈ 0.7 × 10 −4 Gauss, and at this point, the second harmonic intensity is at its maximum.
The electron energy spread in the beam, σ e , is accounted for by the convolution 2σ 2 e dε. The effect of the energy spread on the UR harmonics is purely detrimental and it causes symmetric broadening of the spectral lines. In this context it is important to underline that high radiation harmonics are more sensitive to the energy spread and to other loss factors, than the fundamental harmonic. Weak, but detectable at low energy spread, σ e ≈ 10 −4 , FEL harmonics can be almost totally suppressed, if the energy spread increases to σ e ≈ 10 −3 . The relevant example of SACLA radiation will be considered in what follows. Eventually, let us evaluate the effect of the betatron oscillations in the finite width of the electron beam, where the electrons enter the undulator off the undulator axis. This topic has been in focus of researchers' attention since the first accelerators were built in the middle of the 20th century. It is well described in various articles and books (see, for example, [9,[40][41][42][43][44]). The field between the arrays of the planar undulator magnets is better approximated by the magnetic components H x = H 0 sin(k λ z) cosh(k λ y), H z = H 0 cos(k λ z)sinh(k λ y), which satisfy Maxwell equations in the whole gap between the magnets. The radiation in a two-frequency planar undulator with proper field was considered in [44]; rigorous calculations were explicitly presented there. For the multiharmonic undulator field (2), we follow the approach of [44]; cumbersome calculations do not differ in principle from those in [44]. The transversal oscillations of the electron in the finite sized beam are described by the betatron frequency in its usual form [44]: where δ = 1 for the common planar undulator, δ = √ 1 + d 2 for the bi-harmonic field H y = H 0 (sin(k λ z) + d sin(pk λ z)) and for the multiharmonic undulator field (2) we get δ = 1 + d 2 + d 2 1 + d 2 2 . The betatron frequency ω β (27) is much lower than the UR frequency ω n 4πcnγ 2 λ u (1+(k 2 /2)) ; their ratio is roughly the inverse of the relativistic factor: This explains the high interest to this topic already in early SR and UR experiments, where relatively low-energy electron beams were used and the contribution of the betatron oscillations was considerable. For the intensity of the UR harmonic n, accounting for the betatron oscillations, we get the following expression: where f 1,2,3 n are given by (22)-(24), and the Bessel functions: depend on the arguments: where y 0 is the off-axis position of the electron in the beam and θ is off-axis angle. The summation series +∞ p=−∞ over p describe the account for all subharmonics p of the harmonic n. In real devices, finite where q describes the degree of the split of the harmonic n and depends on the beam parameters; it varies strongly from one installation to another. Some examples will be considered in the following section, where we model some FEL experiments. The subharmonics are distant at the betatron frequency ω β . In the relativistic beams, γ>>1, this split of the UR lines due to the betatron oscillations is small: ω β ∝ ω n /γ. The even UR harmonics appear on the undulator axis due to the betatron oscillations [9,[40][41][42][43][44]; proper Bessel coefficient expectably differs from that in [44] only in Bessel functions due to different undulator field (2): where n is the number of the UR harmonic and p is the number of the betatron subharmonic. The physics and the approach with regard to the betatron oscillations remain the same for any undulator. For the bi-harmonic planar undulator d 1 = d 2 = 0, and the result (31) reduces to that in [44] in different notations. For the common planar undulator with single field harmonic H 0 sin(k λ z), Quantitative evaluation of the Bessel coefficients shows that the contribution of the betatron oscillations is usually small: f 4 n,p;y~1 0 −2 , in comparison with other Bessel coefficients:~0.15-0.8 in (22), (23); usually f 4 n,p;y do not exceed f 1,2 n=1,3,5 . However, the split of the spectrum lines due to the betatron oscillations can be considerable and it strongly depends on the parameters of the installation and on the beam. Some examples are given in the context of the modeling of FELs in the following section. Beam sizes vary from~0.2 mm to~20 µm in modern FELs; beam deviations from the axis are usually small; for example, they are~5-25 µm on one gain length, L g = 1.6-3.5 m, in the LCLS FEL experiments [18][19][20]. However, the off-axis deviation of ultrarelativistic electrons in just~10 µm in one undulator section length, 3 m, can cause the effective angle γθ~0.1 and noticeable effects. In what follows we will analyze in detail the harmonic generation in SACLA and PAL-XFELs and compare them with some other user facilities, such as LCLS.

SACLA FEL Experiment
The SACLA facility first produced coherent radiation with 10 keV photons in 2011 [61]. User operations began in 2012; hard X-ray line BL2 was installed in 2014; soft X-ray line BL1 [62] and the dedicated accelerator SCSS+ were installed in 2014; further upgrades [63] followed, a new BL3 line was installed in 2017 for multiple beamline operation [64] with two-color XFEL and self-seeded XFEL [65]. However, contrary to exhaustive description of user facilities and generic specifications of the range of the parameters, in which SACLA operates, there has been little theoretical analysis of the FEL radiation in the experiments. Moreover, the information available on some instances of the operation of this FEL is incomplete and even controversial. In particular, this regards the electron beam energy spread, which is not stated for the hard X-ray SACLA setup in the papers [64][65][66][67][68] describing the facility. Rather complete data are available only for the undulators for the hard X-rays, commissioned [69] in 2012.
As we understand, the facility was upgraded several times since then, but the data for the beam characteristics were not clearly reported. Moreover, for the same year 2012 we find the energy spread 10 −4 and betatron value 30 m in [69], while in [61] we find the energy spread (in projection) <10 −3 and β x,y = 22 m. One order of magnitude difference in the energy spread together with the change in β from 30 m to 22 m has very strong effect of the FEL radiation: the saturation length can vary from 20 m to~60 m, the saturated powers change etc.
Consider first the soft X-ray FEL; it operates with three undulator sections with variable parameter k ∈ [0.5 − 2.1] and a total of 777 periods, each λ u = 1.8 cm long. The coherent radiation is generated at the fundamental λ~1-12 nm; the details are available in [62]. Despite explicit description, [62] does not contain any data on the power evolution, saturation and gain lengths, although the beam and radiation characteristics are well specified. We have studied the instance of this experiment with the maximum possible value of k = 2.1, the electron energy E = 780 MeV and beta-functions β x = 6 m, β y = 4 m [62]. The current I = 300 A was calculated by the authors of [62] for the bunch charge 0.23 nC and the bunch length τ e ≈0.7 ps (we get 330 A though). There is a great deal of uncertainty with regard to the values of the energy spread and the emittance; the energy spread per slice is not given, the projected value, σ e projected = 0.6%, is well too high as compared with other installations, such as LCLS [19] etc.; this lack of definite data for experiments also includes the emittance ε n x,y : the reported data vary between 0.5-3 mm × mrad [62]. We suppose that most of it is in the projection that is due to transverse centroid shifts along the bunch and the time-sliced values after the injector are well preserved. Reassuming [62], we adopt the data simulation in Table 1, which yields the FEL power evolution, demonstrated in Figure 6.  The saturation occurs at the end of the final third undulator section of 4.5 m; we show the simulated FEL harmonic power, the measured energy of the fundamental tone after the third undulator in terms of power and the contribution of the third FEL harmonic, estimated at~0.3% of the fundamental [62]. We have obtained the simulated value of the saturated fundamental FEL power (red line in Figure 6) P 1 ≈ 0.2 GW, coinciding with the value P max = E γ /τ rad = 0.2 GW, for the measured fundamental energy [62] E γ ≈ 0.1 mJ ± 13% for the FEL radiation pulse duration τ rad= τ e 2πL g /L s = 0.5 ps, emitted from the electron bunch with the root mean square r.m.s. length τ e = 0.7 ps. For the third FEL harmonic (see green dashed line in Figure 6) we get ≈0.3% power of the fundamental in agreement with [62]. Note that the second harmonic level is very low. The simulated gain length is L g ≈ 1 m and the saturated length is L s ≈ 13 m; other data are collected in Table 1. measured fundamental energy [62] Eγ ≈ 0.1 mJ ± 13% for the FEL radiation pulse duration s g e rad L L π τ τ 2 = = 0.5 ps, emitted from the electron bunch with the root mean square r.m.s. length τe = 0.7 ps. For the third FEL harmonic (see green dashed line in Figure 6) we get ≈0.3% power of the fundamental in agreement with [62]. Note that the second harmonic level is very low. The simulated gain length is Lg ≈ 1 m and the saturated length is Ls ≈ 13 m; other data are collected in Table 1. The spectrum line contains only few subharmonics with p = −1, 0, +1; their contribution is shown in Figure 7 for off the axis distance. The spectrum line contains only few subharmonics with p = −1, 0, +1; their contribution is shown in Figure 7 for off the axis distance.  Table 1). Superposition of the randomly distributed over the length of the electron bunch wave trains with the coherence length We also modeled SACLA FEL radiation in a hard X-ray band. The results for the recent installation setup [64] are shown in Figures 8 and 9. The electron energy was 10 times higher than in the soft X-ray experiment, and the radiation at the wavelength λ = 0.124 nm was generated. Some data for the simulations of SACLA FEL in hard X-ray region are given in Table 2. Beam parameters: relativistic factor γ = 15264, beam power PE = 78 TW, current I0 = 10 kA, current density J = The main contribution evidently comes from three subharmonics p = [-1, 0, 1]; the respective radiation line width is ∆λ/λ~2 × 10 −3 , comparable with the natural UR line width 1/2N ≈ 2 × 10 −3 . Theoretical estimation of the relative radiation line bandwidth in SASE FEL after the gain-narrowing in the exponential growth yields similar value ∆λ/λ ≈ ρλ u /L s ≈ 0.15%, close to the FEL scaling parameter ρ ≈ 0.0016 (see Table 1). Superposition of the randomly distributed over the length of the electron bunch wave trains with the coherence length l c = λ 2 /∆λ~6 µm gives the coherence time t c = λ 2 /(c ∆λ)~0.02 ps. The number of the coherence regions in the radiation pulse is therefore τ rad /t c~2 0.
We also modeled SACLA FEL radiation in a hard X-ray band. The results for the recent installation setup [64] are shown in Figures 8 and 9. The electron energy was 10 times higher than in the soft X-ray experiment, and the radiation at the wavelength λ = 0.124 nm was generated. Some data for the simulations of SACLA FEL in hard X-ray region are given in Table 2. Table 2. Some simulation data for SACLA FEL experiment at λ = 0.124 nm at SACLA.
Beam parameters: relativistic factor γ = 15264, beam power P E = 78 TW, current I 0 = 10 kA, current density J = 3.04×10 12 A/m 2 , beam section = 3.29×10 −9 m 2 , emittances γε x,y ≈ 0.4µm, β x,y = 20m, beam size σ x,y ≈ 22µm, divergence θ div ≈ 1.1 µrad, θ = σ photon /L gain~9 µrad, γθ ≈ 0.14, energy spread σ e = 0.926 × 10 −3 Undulator parameters: k = 2.1, λ u = 1. Saturated power P F,n ,W 1.9 × 10 10 9 × 10 6 5 × 10 7 5 × 10 6 1.6 × 10 5 Omitting the details of the experiments and installation, which are described in [63][64][65][66][67][68], we note only that the SACLA facility has been continuously upgraded and the data on specific FEL experiments are incomplete (except for the early experiment [61]). For example, the electron beam energy spread for later SACLA setup and hard X-ray experiments is not mentioned in major papers [64][65][66][67][68]; we assumed for the simulation σ e = 0.0926%, following [63], where the upgraded RF system of SPRING 8 was described. Considering that the beam was alternatively sourced to BL3 and BL2 undulator lines, and the above spread was reported for E = 6 GeV, we assume that the spread should not increase in the experiment with the energy E = 7.8 GeV on BL3 line and 10 keV photons. Of course, it depends on the spreader, the optics, on whether the dispersion was closed etc., thus, the experimental conditions can be different; however, in the absence of explicitly reported data, we have to assume the first approximation of the only available data from [63,65]. Our simulation results are collected in Table 2; the computed saturated power is compared with that obtained from the measured in this experiment photon energy, E γ = 0.4-0.5 mJ, reported in [64] (see Figures 2c and 3 in [64]). experiments are incomplete (except for the early experiment [61]). For example, the electron beam energy spread for later SACLA setup and hard X-ray experiments is not mentioned in major papers [64−68]; we assumed for the simulation σe = 0.0926%, following [63], where the upgraded RF system of SPRING 8 was described. Considering that the beam was alternatively sourced to BL3 and BL2 undulator lines, and the above spread was reported for E = 6GeV, we assume that the spread should not increase in the experiment with the energy E = 7.8 GeV on BL3 line and 10 keV photons. Of course, it depends on the spreader, the optics, on whether the dispersion was closed etc., thus, the experimental conditions can be different; however, in the absence of explicitly reported data, we have to assume the first approximation of the only available data from [63,65]. Our simulation results are collected in Table 2  With regards to the bunch length τe = 20 fs and charge Q = 0.2 nC, the current I = 10 kA, and other data [64], we get the photon pulse duration τγ≈13 fs, and the saturated powers of the fundamental and third harmonics as shown by the dashed lines after 50 m in Figure 8; they agree with our theoretical simulations. Horizontal dashed green and orange lines in the saturation region in Figure  8 trace the values 0.2% for the third and 0.03% for the second harmonics. Variation of the emittance, ±1 μm, and of energy spread, 0.08-0.1%, influences the gain and the saturation lengths and the third harmonic power; the fundamental power is less sensitive to it. With regards to the bunch length τ e = 20 fs and charge Q = 0.2 nC, the current I = 10 kA, and other data [64], we get the photon pulse duration τ γ ≈13 fs, and the saturated powers of the fundamental and  Figure 8; they agree with our theoretical simulations. Horizontal dashed green and orange lines in the saturation region in Figure 8 trace the values 0.2% for the third and 0.03% for the second harmonics. Variation of the emittance, ±1 µm, and of energy spread, 0.08-0.1%, influences the gain and the saturation lengths and the third harmonic power; the fundamental power is less sensitive to it.
The radiation spectrum line is split in many subharmonics only at the extremities of the beam (see Figures 9 and 10). The account for the subharmonics p = −5 . . . +5 is sufficient everywhere, but for the maximum angles of electron-photon interaction at the beam edges (see Figure 10). Accounting for the split of the spectrum line in 11 subharmonics, p = −5 . . . +5, we get the total contribution of the latter, +5 −5 J 2 p , after averaging across the beam for all electron-photon interaction angles, close to unity: 0.97. Accounting for p = −6 . . . +6 or more subharmonics yields even more precise results. The respective spectral width is 0.06-0.1%, the Pierce parameter ρ ≈ 0.07% and the coherence time τ c~0 .7 fs, which means that less than 20 coherence regions are in τ γ ≈ 13 fs photon pulse.  More data are available for similar experiment [61], conducted earlier at SACLA with the electron energy 7 GeV and the undulator with k = 1.8. The harmonic power evolution was clearly traced along the undulators and the harmonic saturated powers were measured. Omitting the details, we provide in Figure 11 the comparison between our analytical results and the measured data as reported in [61]. The third harmonic content was ~0.3% of the fundamental. The saturation began after 45 m and was obvious after ~50 m (see Figure 3 in [61]). The energy spread and emittance influence the gain and saturation lengths. Genuine simulations in [61] agreed fairly well with the experiment: the discrepancy in the harmonic powers at 25-55 m reached one order of magnitude, dependently on the assumed values for the simulation. We computed the saturation beginning at ~45 m, but the process of the saturation seems very gradual; we get full saturation at 55 m. Our analytical results arguably have an even better match with the experiment than the simulations of the authors  More data are available for similar experiment [61], conducted earlier at SACLA with the electron energy 7 GeV and the undulator with k = 1.8. The harmonic power evolution was clearly traced along the undulators and the harmonic saturated powers were measured. Omitting the details, we provide in Figure 11 the comparison between our analytical results and the measured data as reported in [61]. The third harmonic content was ~0.3% of the fundamental. The saturation began after 45 m and was obvious after ~50 m (see Figure 3 in [61]). The energy spread and emittance influence the gain and saturation lengths. Genuine simulations in [61] agreed fairly well with the experiment: the discrepancy in the harmonic powers at 25-55 m reached one order of magnitude, dependently on the assumed values for the simulation. We computed the saturation beginning at ~45 More data are available for similar experiment [61], conducted earlier at SACLA with the electron energy 7 GeV and the undulator with k = 1.8. The harmonic power evolution was clearly traced along the undulators and the harmonic saturated powers were measured. Omitting the details, we provide in Figure 11 the comparison between our analytical results and the measured data as reported in [61]. The third harmonic content was~0.3% of the fundamental. The saturation began after 45 m and was obvious after~50 m (see Figure 3 in [61]). The energy spread and emittance influence the gain and saturation lengths. Genuine simulations in [61] agreed fairly well with the experiment: the discrepancy in the harmonic powers at 25-55 m reached one order of magnitude, dependently on the assumed values for the simulation. We computed the saturation beginning at~45 m, but the process of the saturation seems very gradual; we get full saturation at 55 m. Our analytical results arguably have an even better match with the experiment than the simulations of the authors in [61] and we reproduced the saturated power oscillations as shown in Figure 11. The third harmonic content also fits the measured range~0.3% (see Figure 11).

POHANG FEL X-ray Experiments
FEL experiments for soft and hard X-ray radiation were conducted at PAL-XFEL facility [39]; the fundamental wavelengths at λ = 1.52 nm and λ = 0.144 nm were generated. The experiments were well documented; among other data in [39] the harmonic power evolution was reported. We have analyzed the harmonic generation in both soft and hard X-ray experiments. Some modeling data are collected in Tables 3 and 4. The results are presented in Figures 12-14 and discussed below. The PAL-XFEL resembles in many aspects the LCLS FEL [19]. There is difference in higher energy spread in PAL-XFEL LINAC, also the undulator parameter k = 2 in the PAL-XFEL experiments was lower that k = 3.5 at LCLS; the electron beam had lower energy for the same generated wavelength. The soft Xray radiation at λ1 = 1.

POHANG FEL X-ray Experiments
FEL experiments for soft and hard X-ray radiation were conducted at PAL-XFEL facility [39]; the fundamental wavelengths at λ = 1.52 nm and λ = 0.144 nm were generated. The experiments were well documented; among other data in [39] the harmonic power evolution was reported. We have analyzed the harmonic generation in both soft and hard X-ray experiments. Some modeling data are collected in Tables 3 and 4. The results are presented in Figures 12-14 and discussed below. The PAL-XFEL resembles in many aspects the LCLS FEL [19]. There is difference in higher energy spread in PAL-XFEL LINAC, also the undulator parameter k = 2 in the PAL-XFEL experiments was lower that k = 3.5 at LCLS; the electron beam had lower energy for the same generated wavelength. The soft X-ray radiation at λ 1 = 1.52 nm was produced by the electrons with the energy E = 3 GeV and the energy spread σ so f t e = 0.05% (~five times higher than in LCLS), in the undulators with the total pure length~40 m; the undulator parameter was k = 2. The hard X-ray radiation at λ 1 = 0.144 nm was generated by the electrons with the energy E = 8 GeV (vs. E~13 GeV in LCLS) with the energy spread σ hard e = 0.018% (~two times higher than in LCLS) in the undulators with the deflection parameter k = 1.87 (vs. k = 3.5 in LCLS) of the total pure length 100 m. The undulator sections were 5 m long. Table 3. Some simulation data for PAL-FEL experiment for soft X-rays, λ = 1.52 nm, E = 3 GeV.
Beam parameters: γ = 5870, beam power P E = 6.60 TW, current I 0 = 2.2 kA, current density J = 1.246 × 10 11 A/m 2 , beam section = 1.766 × 10 −8 m 2 , emittances γε x,y = 0.55 µm, β = 30 m, beam size σ x,y = 53 µm, divergence ≈ 1.8 µrad, θ = σ photon /L gain ≈ 15 µrad, energy spread σ e = 0.5 × 10 −3 Undulator parameters: k = 2, λ u = 3.5 cm, section length 5 m The UR in long undulators can be distorted due to non-periodic magnetic fields. The relevant study is presented in the previous section. Using the data from the experimental setup [39], we analytically obtained the evolution of the FEL power for the harmonics, as shown in Figure 12 for soft and Figure 13 for hard X-rays accounting for the beam size, divergences and other data. The results are compared with the measurements of the fundamental harmonic power in [39]. Our analytical modeling gives good match with the experiments (see Figures 12, and 13). The agreement with the experiment for soft X-rays in the exponential growth is even better than that of the authors of [39]. Our analytical results for hard X-ray experiment agree fairly well with the measurements; however, the agreement is marginally better than that of the three-dimensional (3D) numerical simulations in [39]. This evidences the correct analytical account for all underlying physical phenomena. Table 4. Some simulation data for PAL-XFEL experiment for hard X-rays, λ = 0.144 nm, E = 8GeV. z  m P  W Figure 12. The harmonic power evolution along the undulators at PAL-XFEL for soft X-rays, λ 1 = 1.52 nm. The experimental average values are shown by dots, following the data in [39]. The harmonics are color coded: n = 1-red solid, n = 2-orange dot-dashed, n = 3-green dashed, n = 5-blue dotted.
The UR in long undulators can be distorted due to non-periodic magnetic fields. The relevant study is presented in the previous section. Using the data from the experimental setup [39], we analytically obtained the evolution of the FEL power for the harmonics, as shown in Figure 12 for soft and Figure 13 for hard X-rays accounting for the beam size, divergences and other data. The results are compared with the measurements of the fundamental harmonic power in [39]. Our analytical modeling gives good match with the experiments (see Figures 12 and 13). The agreement with the experiment for soft X-rays in the exponential growth is even better than that of the authors of [39]. Our analytical results for hard X-ray experiment agree fairly well with the measurements; however, the agreement is marginally better than that of the three-dimensional (3D) numerical simulations in [39]. This evidences the correct analytical account for all underlying physical phenomena. Table 4. Some simulation data for PAL-XFEL experiment for hard X-rays, λ = 0.144 nm, E = 8 GeV.
Beam parameters: γ = 15,660, beam power P E = 20.0 TW, current I 0 = 2,5 kA, current density J = 3.16 × 10 11 A/m 2 , beam section = 7.91 × 10 −9 m 2 , emittances γε x,y ≈ 0.55µm, β ≈ 36 m, beam size σ x,y = 35 µm, divergence ≈ 1 µrad, θ = σ photon /L gain ≈4.5 µrad, energy spread σ e = 0.18 × 10 −3 Undulator parameters: k = 1.87, λ u = 2.571 cm, section length 5 m Calculated FEL properties: saturated length L s~5 5 m, gain length L gain = 3.4 m, radiation beam size σ photon ≈ σ x,y λ 1 L g /4π≈15 µm   and ρn are close to those for soft X-ray radiation. Moreover, for hard X-rays the comparison of the pure emittance ε ≅ 3.5 × 10 −11 m with λ3/4π = 3.8 × 10 −12 m is not favorable for the third harmonic radiation: εx,y ≅ 10 × λ3/(4π). Unsurprisingly, high hard X-rays harmonics were not detected. However, if the energy spread and emittances are improved, then we can expect at the PAL-XFEL high No data are available for high harmonic generation in PAL-XFEL experiments. For soft X-rays, the energy spread was higher than in LCLS experiments for similar radiation wavelengths: σ so f t e = 0.0005 ρ 1 /2 ρ 3 0.0005 > ρ 5 0.0003. For the emittance we get pure value ε 0.94 × 10 −10 m to be compared with λ 1 /4π = 1.2 × 10 −10 m. However, for the fifth harmonic we get λ 5 /4π = 2.5 × 10 −11 m and ε λ 5 /π = 1 × 10 −10 m. The third harmonic could appear with the power rate~0.7% of the fundamental, the second harmonic would have the power rate~0.05%, as shown in Figures 12 and 13. Our estimation for the third harmonic at PAL-XFEL in soft X-rays, P 3 /P 1~0 .7%, is roughly a half of that for a similar LCLS experiment, where P 3 /P 1~1 .3% for λ 3 = 0.5 nm [20] with similar radiation parameters. Thus, we can expect some weaker third harmonic at PAL-XFEL due to the smaller value of the undulator parameter k as compared with LCLS; moreover, the detrimental effect of the energy spread is higher for PAL-XFEL, σ e = 0.0002 ÷ 0.0005, as compared with that in LCLS, where σ e = 0.0001. The second hard X-ray harmonic at PAL-XFEL is weak; high High harmonics were not registered in the PAL-XFEL experiments.
For hard X-rays the energy spread σ e and Pierce parameters ρ n are as follows: σ hard e = 0.00018 ρ 1 /2 < ρ 3 = 0.00021 > ρ 5 = 0.00015,ρ 2 = 0.00006; the relations between σ e and ρ n are close to those for soft X-ray radiation. Moreover, for hard X-rays the comparison of the pure emittance ε 3.5 × 10 −11 m with λ 3 /4π = 3.8 × 10 −12 m is not favorable for the third harmonic radiation: ε x,y 10 × λ 3 /(4π). Unsurprisingly, high hard X-rays harmonics were not detected. However, if the energy spread and emittances are improved, then we can expect at the PAL-XFEL high harmonic generation as suggested in Figures 12 and 13. The off-axis deviation of the beam in PAL-XFEL amounted to~10 µm on one undulator length [39]. This causes the off-axis angle~2 µrad, comparable with the divergence,~2 µrad for soft X-rays and~1 µrad for hard X-rays. In the soft X-ray experiment the deviation of the beam in few undulator segments reached 20 µm on one undulator length [39]; this induces the angle 4 µrad. However, the electron-photon interaction on one gain length must be considered with the angle θ 14 µrad, far exceeding the beam deviation. The latter angle causes the 2nd FEL harmonic, whose power is estimated~10 −4 of the fundamental (see Figure 12). For the hard X-ray experiment we get much smaller value θ 4 µrad, and the beam must be kept on the axis more precisely.
The proposed analytical approach allows theoretical study of the spectral line split and width in the PAL-XFEL experiments. Following the developed in Section 2 theory, we compute the split of the soft X-ray spectral line and obtain the main contribution from the subharmonics with p = −4, . . . ,+4; higher subharmonics are negligible. Thus the fundamental tone at λ 1 = 1.5 nm is split in~9 subharmonics. The total width of the line is ∆λ~2.3 pm, the relative value is ∆λ/λ~1.5 × 10 −3 . It is small, but it is higher than the respective value in the soft X-ray LCLS experiment, where ∆λ/λ~5 × 10 −4 . For hard X-rays in PAL-XFEL we have to account for more subharmonics: p = −7, . . . ,+7. Nevertheless, the line remains rather narrow even with account for this split; the subharmonics are close to each other because of the electrons are ultrarelativistic. The absolute width of the hard X-ray line is ∆λ~0.14 pm and the relative width is ∆λ/λ ≈ 1.0 × 10 −3 . Compared with the respective values in the LCLS experiment, ∆λ/λ≈3 × 10 −5 , the spectrum lines for PAL-XFEL radiation appear wider bỹ 1-2 orders of magnitude. subharmonics. The total width of the line is Δλ~2.3 pm, the relative value is Δλ/λ~1.5 × 10 −3 . It is small, but it is higher than the respective value in the soft X-ray LCLS experiment, where Δλ/λ~5 × 10 −4 . For hard X-rays in PAL-XFEL we have to account for more subharmonics: p = −7,…,+7. Nevertheless, the line remains rather narrow even with account for this split; the subharmonics are close to each other because of the electrons are ultrarelativistic. The absolute width of the hard X-ray line is Δλ~0.14 pm and the relative width is Δλ/λ ≈ 1.0 × 10 −3 . Compared with the respective values in the LCLS experiment, Δλ/λ≈3×10 −5 , the spectrum lines for PAL-XFEL radiation appear wider by ~1-2 orders of magnitude. The spectral width of the radiation depends on the position of the electrons in the beam. The split of the spectrum line for the hard X-ray radiation from the electrons at the outer extremity of the beam in PAL-XFEL experiment is demonstrated in Figure 14a. Observe that we must account for ~20 subharmonics for the radiation from the edges of the beam, while the theoretical line shape shown in Figure 14b.
We have modeled in a similar way other FEL experiments at other installations; in all the cases the results matched well with the measured data, and the analysis given above worked.

Conclusions
We have presented analytical formulation of the harmonic generation in FELs with multiperiodic magnetic fields accounting for the harmonic and constant field components and offaxis effects in undulators. We have obtained exact analytical expressions for the Bessel coefficients in the general case of the multiperiodic elliptic undulator; they account for constant magnetic constituents, finite beam size and off-axis angles, and describe harmonic generation in wide electron beams and in high precision undulators, where fine alignment of narrow beams is required.
The Bessel coefficients for the general elliptic undulator and in its limiting cases of the elliptic The spectral width of the radiation depends on the position of the electrons in the beam. The split of the spectrum line for the hard X-ray radiation from the electrons at the outer extremity of the beam in PAL-XFEL experiment is demonstrated in Figure 14a. Observe that we must account for 20 subharmonics for the radiation from the edges of the beam, while the theoretical line shape shown in Figure 14b.
We have modeled in a similar way other FEL experiments at other installations; in all the cases the results matched well with the measured data, and the analysis given above worked.

Conclusions
We have presented analytical formulation of the harmonic generation in FELs with multiperiodic magnetic fields accounting for the harmonic and constant field components and off-axis effects in undulators. We have obtained exact analytical expressions for the Bessel coefficients in the general case of the multiperiodic elliptic undulator; they account for constant magnetic constituents, finite beam size and off-axis angles, and describe harmonic generation in wide electron beams and in high precision undulators, where fine alignment of narrow beams is required.
The Bessel coefficients for the general elliptic undulator and in its limiting cases of the elliptic and planar undulators with harmonics are provided. The effect of the constant non-periodic magnetic field on the UR line shape is formulated in terms of the generalized Airy function. The corrections for the Bessel coefficients, accounting for the constant magnetic components, off-axis radiation and beam position are given in the analytical integral form of generalized Bessel and Airy functions. The analysis shows that the relevant effects matter for the field-induced and off-axis angles γθ > 0.05. Exact analytical formulae for quantitative calculations of the UR are given in Section 2. Due to the betatron oscillations the UR lines are split in subharmonics; the split is very fine and for relativistic beams the subharmonics are very close to each other: δλ/λ~1/γ<<1. Despite that, it causes noticeable broadening of the spectrum lines. The contribution of the betatron oscillations to the even harmonic generation is one-two orders of magnitude less than that caused by the off-axis and photon-electron interaction angles in real beams.
We have demonstrated theoretical spectrum lines of UR harmonics, their shapes and intensities with the help of the developed theoretical tools. The effect of the non-periodic field and off-axis effects in finite sized beams are clearly distinguished and elucidated in Figures 1-5.
The obtained rigorous theoretical results are employed for FEL radiation studies with the help of the phenomenological FEL model. We have analyzed the PAL-XFEL experiment at POHANG laboratory [60], where soft and hard X-rays were produced. Our analytical results are in good agreement with the reported values (see Figures 12 and 13). We have modeled possible FEL harmonic behaviors accounting for the beam sizes, divergences, electron-photon interaction angles, energy spread and diffraction; the second harmonic would be very weak, in particular, for hard X-rays. The spectral line in hard X-ray experiment is split in~15 subharmonics; despite that, we get quite narrow line, ∆λ/λ~1.0 × 10 −3 , ∆λ~0.14 pm due to γ~1500 >> 1. However, this is >10 times wider than in the LCLS experiment at the same wavelength, where ∆λ/λ ≈ 3 × 10 −5 . The radiation of high harmonics at PAL-XFEL is limited by a rather high energy spread: for hard X-rays σ hard e = 0.00018, the Pierce parameters for the n = 1,2,3,5 harmonics are ρ 1 0.0004, ρ 3 0.0002, ρ 5 0.00015, ρ 2 0.00006; for soft X-rays the energy spread is σ so f t e = 0.0005, and the Pierce parameters are ρ 1 0.0010, ρ 3 0.0006, ρ 5 0.0004, ρ 2 0.00007. We have demonstrated possible theoretical harmonic radiation at PAL-XFEL; however, due to relatively high energy spread, we can hardly expect radiation of the harmonics higher than the third.
The analysis of the SACLA facility reveals the spectrum and power evolution for the undulator line BL3 with two different designs and k = 1.8 and k = 2.1 with respective electron energies 7 GeV and 7.8 GeV. The modeling for the 7 GeV agrees with the experiment; the modeling for 7.8 GeV gives the prediction of the harmonic evolution in the absence of the measured data. The saturated harmonic powers in all cases agree with those measured. The theoretical spectrum line split is demonstrated for the soft and hard X-rays for the lines BL1 and BL3; the radiation line at 0.124 nm is split is >±5 subharmonic, the spectrum line λ = 12.4 nm at BL1 is split in three subharmonics. The spectrum lines at SACLA are narrower than at PAL-XFEL.
The results, obtained with the help of the developed theoretical formalism for FEL power and spectrum evaluation agree with the experiments in X-ray and other bands. The analytical formulae are relatively simple and the relevant calculations do not require special knowledge and programmer skills; they can be done on any PC. The predictions are accurate and agree with the measurements. This allows the theoretical study of current and planned FEL experiments and estimation of performance, spectrum and harmonic generation in operating and constructed FELs.
Funding: This research received no external funding.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A. Phenomenological Model of Harmonic Power Evolution in High-Gain FELs
The Pierce parameter ρ n reads accounting for the diffraction as follows [3][4][5][6]23,[45][46][47][48][49][50][51][52][53]: where n is the harmonic number, J = I 0 /Σ [A/m 2 ] is the current density, Σ = 2πσ x σ y is the beam section, σ x,y = ε x,y β x,y are the sizes of the beam, ε x,y = σ x,y θ x,y are the emittances, β x,y = ε x,y /θ 2 x,y are the betatron average values, θ x,y are the divergences, i 1.7045 × 10 4 is the constant of Alfven current [A], k e f f = k √ (see (3) for ) is the effective undulator parameter, which reduces for the common planar undulator to k = eH 0 λ u 2πmc 2 ≈ 0.934H 0 λ u [T · cm], H 0 is the magnetic field amplitude on the undulator axis, f n is the Bessel factor for the n-th UR harmonic. The Bessel factors f n in the general case of the two-dimensional field with harmonics (2) are given by (22)-(24) and (31) accounting for the finite beam size effects and constant magnetic components, which cause even harmonics. We assume the fundamental harmonic is not suppressed and it dominates. The saturated n-th harmonic power can be calculated accounting for the loss factors following [53]: P n,F = √ 2P e η n η 1 χ 2 ρ 1 f 2 n / n 5/2 f 2 1 , where P e = I 0 E is the beam power, I 0 is the beam current [A], E is the electron energy [eV], ρ 1 is the Pierce parameter. The gain length for the n-th harmonic is L n,g Φ n λ u / 4π √ 3n 1/3 χρ n , where λ u is the undulator period, Φ n η n are the loss factors. For the fundamental tone we denote L 1,g ≡ L g ; the fundamental tone saturation length is L s 1.07L 1, g ln(9P 1,F /P 1,0 ).
For the harmonic power evolution in the initially unbunched electron beam, we use formula [53]: where we ad-hoc introduce P n, f = P n, f 1 + 0.3 cos n(z − L s )/1.3L g /1.3 to describe the saturated FEL power oscillations. The match with FEL experiments appears good, as seen in Figures 11-13. In cascaded FELs, the previous cascade feeds the next cascade with the prebunched beam. Even in the case the radiation on the n-th harmonic is suppressed for some reason, the initial power of the n-th UR harmonic can be provided by the bunching, P n,0 d n b 2 n P n,F , which is induced by the dominant harmonic and d n=1,2,3,4,5 ≈ {1, 3, 8, 40, 120}. The fundamental tone induces the bunching [48] b n (z) h n (P 1 (z)/P e ρ 1 ) n/2 , where h 1,2,3,4,5 {1, 1.5, 2.4, 4.3, 7.7}. If the fundamental Symmetry 2020, 12, 1258 21 of 24 tone is suppressed, the dominant harmonic induces its sub-harmonics (see [15,16]). The independent harmonic power evolution in the cascade is described by the following formula [53]: P L,n (z) P 0,n F(n, z) 1 + F(n, z) P 0,n P n,F , F(n, z) 2 cosh z L n,g − cos z 2L n,g cosh z 2L n,g . (A6) We have revaluated the contribution of the initial shot noise P noise in the self-amplified spontaneous emission (SASE) FEL with respect to all earlier works; fitting with available measurements from many FELs on average yields: N n (z) P noise 9n S n (z) 1+30P noise S n (z)/nP n, f , S n (z) 2 cosh z L n,g − e − z 2Ln,g cos π 3 − √ 3z 2L n,g − e z 2Ln,g cos π 3 + √ 3z 2L n,g . (A7) The dominant FEL harmonic (usually the fundamental) generates subharmonics in nonlinear regime: the harmonic powers then grow as the n-th power of the dominant harmonic ∝ exp n z/L g [23,[45][46][47][48][49][50]. The electron-photon interaction at high harmonic wavelengths is more sensitive to losses than that at the fundamental wavelength. Improving the phenomenological description in [12][13][14][15][16] and other earlier works, we now describe gradual harmonic saturation by two terms: Q n (z) P n,F e −n z/L g /d n b 2 n + 1 − e −n z/L g + P n,F e −n z/L g /b 2 n + 1 − e −n z/L g , where the bunching b n (P 0,1 /9P e ρ 1 ) n/2 is induced by the fundamental harmonic with the initial power P 0,1 , the n-th harmonic in nonlinear generation begins to saturate at the power level P F = P F | η n → η n and saturates with oscillations around the power P n, f . In an elliptic undulator two polarizations are radiated and the effective Pierce parameter is modified accordingly (see, for example, [16]). The above analytical model of the FEL harmonic power evolution describes independent and induced harmonic contributions, multistage harmonic saturation, power oscillations, all major losses and different sensitivity of the photon-electron interaction at different harmonic wavelengths; it agrees with the available results of FEL experiments in a wide range of conditions and radiated wavelengths.