Simple method to suppress the fundamental in a harmonic free electron laser

Preliminary studies of harmonic lasing have shown significant promise as a method to produce radiation at higher photon energies for a given electron energy and for a given undulator. The basic idea is to suppress radiation at the fundamental resonant wavelength, and allow radiation at a specific harmonic to grow exponentially without being driven by nonlinear processes at the fundamental. This has several potential benefits: higher photon energies for the same undulator field, plus significantly more power and smaller bandwidth compared to extracting nonlinear radiation at the harmonic after the fundamental has reached saturation. In this paper, we use beam parameters from the current design of LCLS-II to take a critical look at the challenge of suppressing radiation at the fundamental wavelength and to evaluate how much of an improvement in terms of photon energy reach and brightness can be achieved through harmonic lasing. For undulators with adjustable magnetic fields, a scheme is presented which can delay the onset of saturation at the fundamental wavelength by a factor of 2. Performance characteristics and especially spectral brightness are compared to self-seeded beam lines as an alternative method to reduce bandwidth, as well as with more conventional SASE beam lines.


I. INTRODUCTION
For a given beam quality, beam energy, and undulator period used to drive a free electron laser (FEL), the gain length becomes long as the target photon energy is increased and eventually it is impossible even to maintain the resonance condition.To increase the photon energy further, either the beam energy must be increased or the undulator must be changed to a shorter period.For undulators having a fixed magnetic field, changing the beam energy is the only method of tuning and the resonant photon energy scales with the square of the beam energy, according to the resonance condition (for a planar undulator) λ r ¼ λ u ð1 þ K 2 =2Þ=2γ 2 .Here, λ r is the resonant wavelength, λ u is the undulator period, γ is the electron energy in units of m e c 2 , K ¼ eB max λ u =ð2πm e cÞ is the dimensionless undulator parameter, B max is the peak field on axis, m e is the electron mass, and c is the speed of light.
For planar undulators, a significant amount of power at odd harmonics of the fundamental radiation is also produced near saturation of the fundamental by nonlinear effects due to the large bunching factor [1][2][3].However, the maximum output power is typically a small fraction (of the order of 1 percent at best) of the power produced at the fundamental.One method to improve upon this and achieve higher output power is to suppress radiation at the fundamental, and to allow the harmonic radiation to grow in the linear regime toward saturation [4][5][6] without significant nonlinear coupling to the fundamental.The bandwidth is also reduced by this method.
Below we give specific examples of this technique using a beam based on the soft x-ray beam line of the LCLS-II design studies [7], with a beam energy of 4 GeV.The electron beam parameters and example undulator parameters are given in Table I.
If both the undulator period and magnetic field strength are fixed, then lasing at a higher harmonic offers a large immediate benefit by opening up a new range of photon energies.Instead, we focus on the case where the undulator period is fixed and the magnetic field is tunable up to K max as given in Table I.For comparison, we include one example where the undulator period is changed to 26 mm so that the wavelength at the fundamental can be tuned to the target value.The key figure of merit is the peak power achieved through SASE [8], but the spectral brightness of the output is also important and therefore we also evaluate a self-seeding scheme [9,10] as an alternative method.While nonstandard designs for the undulator can improve the efficacy of harmonic lasing, these designs are not considered here.If higher photon energies and a broad tuning range are required, changing the undulator period or going to a more aggressive technology while using a standard SASE beam line will in many cases be sufficient.

II. METHODS TO REACH HIGH PHOTON ENERGY
In this paper we evaluate a beam line designed to use a tunable undulator with period of 39 mm to produce a radiation pulse with the highest possible photon energy.For a hybrid permanent magnet undulator having the given minimum magnetic gap, the maximum undulator parameter is taken to be 5.48.This results in a resonant wavelength as long as 5.1 nm.The goal chosen for this work is to produce a wavelength of λ 0 ¼ 0.3 nm, or 4.1 keV photons.This is just above the maximum photon energy set by the resonance condition for the fundamental, which is 3.9 keV or a wavelength of 0.32 nm.To achieve even mediocre performance (less than 8 m gain length) requires a wavelength greater than 0.36 nm or photon energy below 3.5 keV.All estimates of FEL performance are based on the numerical formulation by M. Xie [11] and confirmed by simulations using GENESIS [12].If the electron beam energy could be increased to about 4.5 GeV, a fundamental wavelength of 0.3 nm could be produced directly, again with mediocre performance unless the beam energy could be improved further.
Alternatively, one can consider a shorter undulator period at the same electron beam energy.For a 4 GeV beam, an undulator period of 33 mm could radiate at 0.3 nm.If based on the same undulator technology and using the same minimum magnetic gap, the tuning range would include wavelengths up to 2.4 nm.An undulator period of 26 mm would allow wavelengths as long as 0.84 nm, and at 0.3 nm the gain length would be 3.4 m, which is a more acceptable performance.Using more advanced undulator technology could yield both better performance at 0.3 nm and a broader tuning range.
So why consider harmonic lasing?First, if the undulators are required to be capable of an undulator parameter ≫ 1, for example to achieve a broad tuning range or a short distance to saturation, then that rules out pushing the undulator period to be as short as a given technology allows.In this case, harmonic lasing can be at least competitive with lasing at the fundamental in terms of saturated power and distance to saturation.For the nominal parameters considered here, a fundamental wavelength of 0.3 nm is not even possible: either the electron energy or undulator period must change (though only by 10 to 20%, respectively).Second, the nonlinear harmonic radiation produced when taking the fundamental to saturation provides dramatically reduced radiation power at the target wavelength and will have a broader bandwidth.Typically, the relative bandwidth of the nonlinearly driven harmonic will be comparable to the relative bandwidth of the fundamental.Other techniques such as self-seeding which narrow the bandwidth of the fundamental may also reduce the bandwidth of the nonlinearly-driven harmonic.Linear harmonic lasing starting from SASE has a relative bandwidth which is automatically lower than that of the fundamental.

III. ACHIEVING SATURATION WITH HARMONIC LASING
In order for the harmonic lasing to proceed to saturation, the fundamental mode must be suppressed to the point where it is a small contributor to the final energy spread of the beam.Implementing phase shifters and filtering out radiation at long wavelengths are suggested as possibilities in Ref. [5].Phase shifters can increase the gain length of the fundamental by a factor of 2 when the distance between phase shifters is comparable to the power gain length, and when set correctly can still be optimal for radiation at the desired harmonic.Filtering out the radiation at the fundamental requires added components and tends to increase the total distance to saturation.Just removing the longer wavelength radiation is not sufficient; the electron beam must also be debunched.Phase shifts, on the other hand, cause the bunching and radiation at the longer wavelengths to interfere with each other.
We concentrate on the use of phase shifters placed between undulator sections, rather than relying on special-purpose undulators designed with phase shifters built into them.To avoid having very short undulator sections and a large fraction of the beam line filled with inter-undulator breaks, the distance between phase shifts may be significantly longer than a gain length.In such cases the gain length for radiation at the fundamental will not even be doubled.In this study, for undulators tuned to 3λ 0 , each 3.4 m-long section represents about 1.4 gain lengths, and the fundamental gain length is increased by a factor of only 1.5.The gain length at the third harmonic is about 1.8 times the fundamental gain length.For undulators tuned to 5λ 0 each undulator section represents about 1.8 gain lengths, and the gain length at the fifth harmonic is about 2.2 times longer than that at the fundamental.Thus, it would seem that phase shifters alone will not suffice for harmonic lasing in this case, as the distance to saturation.
A simple method to gain an additional factor of ∼2 in the distance for the longer wavelengths to reach saturation is to mix together the use of the two subharmonics.This possibility has been noted previously in Ref. [13].In the primary example, the first 14 undulators are tuned to 3λ 0 , G. PENN Phys.Rev. ST Accel.Beams 18, 060703 (2015) 060703-2 while the final 13 undulators are tuned to 5λ 0 .Then radiation at 3λ 0 can be limited to more than an order of magnitude below saturation, and amplification will then be abruptly cut off after the electron bunch enters undulators tuned to 5λ 0 .This switch essentially resets the progress toward saturation, as completely new wavelengths become important.Radiation at λ 0 , however, will continue to grow as long as the undulators and phase shifters are properly tuned.Other arrangements are possible, with some caveats that will be discussed below.

IV. PHASE SHIFTING TO SUPPRESS THE FUNDAMENTAL
For the harmonic lasing scheme, we do not consider any form of seeding.Seeding would reduce the need to suppress the radiation at the fundamental.Suppressing radiation is especially challenging for a SASE FEL because of the broad range of wavelengths which need to be considered.Even wavelengths normally outside of the FEL bandwidth but still close to the resonant wavelength have to be considered when phase shifts are employed.
In the current configuration for the undulators tuned to 0.9 nm, the electron bunch slips behind radiation moving at the speed of light by about 100 periods from the start of one undulator section to the start of the next.If each undulator break has an extra 2π=3 phase delay of the particles through the phase shifter, the nominal wavelength will be disrupted while the third harmonic will be unaffected.On the other hand, a slightly longer wavelength of 0.903 nm will detune just enough during this process for the phase shift to realign the electron bunching and the radiation.Similarly, a shorter wavelength of 0.894 nm will cause the radiation phase to jump ahead by 4π=3 in the same interval.The additional electron delay from the phase shifter will then yield an overall phase shift of 2π and the electron bunching will again be synchronized with the radiation field.Because the phase wander for this wavelength will be twice as large as that for 0.903 nm, and is more than AEπ=4, the gain rate will be noticeably worse.Thus, the dominant wavelength will be 0.903 nm but there will be noticeable radiation at 0.894 nm as well.
For a phase delay of 4π=3 in each undulator break, a similar pattern arises but the best gain length occurs at the shorter wavelength, as an extra phase delay of 2π=3 for the electrons will yield a total phase delay of 2π.The dominant wavelength will be 0.897 nm, with some component at 0.906 nm also observable.The spectra for these basic SASE examples are shown in Fig. 1, and the evolution of the average power is shown in Fig. 2. Note that there is some asymmetry in that the growth rate for 1=3 of a cycle phase shifts is worse than that for 2=3 of a cycle phase shifts.This can be explained by the fact that within a single undulator section the effect of detuning from the resonance condition is not symmetric, and shorter wavelengths suffer less of a penalty in terms of growth rate than longer wavelengths.
The effect of combining one long section with no phase shifts, one long section with repeated 2π=3 phase shifts, and one long section with repeated 4π=3 phase shifts can be viewed as moving the optimal wavelength between 0.9 nm, 0.903 nm, and 0.897 nm.In practice, radiation at 0.9 nm wavelength will be amplified in all sections but more slowly than if all of the phase shifts were set to 0. These wavelength bands are all separated by roughly the FEL bandwidth, so assuming that the radiation can be prevented from shifting or coupling, this can be viewed as a way to split one undulator beam line into 3 separate ones each starting from shot noise.Because the third harmonic is unaffected by all of these phase shifts, this pattern assists greatly in delaying the growth of power in longer wavelengths so that the desired 0.3 nm radiation can reach saturation.Alternatively, different patterns such as randomly choosing among these phase shifts at each break can also be used to in effect spread out the FEL bandwidth over a large interval while simultaneously reducing the gain length.
For the case considered here where phase shifters are separated by more than a gain length, the optimal strategy is  to divide the beam line into distinct sections each of which has its own simple pattern.Conversely, when there is much less than a gain length between phase shifters it is better to rapidly shift between different patterns and the optimal strategy appears to be either a completely random arrangement of the phase shifters [14] or randomly cycling through different permutations of the possible phase shifts.The actual spectrum produced by a mix of phase shifts can be surprising, and also depends on the separation between phase shifters.For the case here where phase shifts are separated by an entire 3.4 m undulator section, alternating between phase shifts of 2π=3 and 4π=3 yields a spectrum which peaks at around 0.896 nm.
One possible difficulty with the scheme of Ref. [6], using repeated phase shifts of 2π=3, then going to other patterns and further down the beam line again having 2π=3 phase shifts is that the dispersion experienced in the interim may actually enhance bunching at 0.903 nm.Meanwhile, at the high photon energies considered here the radiation diffracts slowly.Thus, the growth rate may actually be enhanced by using multiple small subdivisions optimized to 0.903 nm unless these regions with similar patterns are separated by a long distance.
When the undulators are tuned to 1.5 nm wavelength, and the fifth harmonic is to be preserved as much as possible, phase shifts of 2nπ=5 must be used, where n ranges from 0 to 4. In each case there will be one dominant wavelength, for example 1.503 nm for n ¼ 1, and secondary wavelengths with a gain length which may either be much longer (as for n ¼ 0, 1, or 4) or just a little bit longer (n ¼ 2 or 3).
From this point of view, switching between 0.9 nm and 1.5 nm for the resonant wavelength is just a more extreme example of spreading out the growth over a wavelength range broader than the usual FEL bandwidth.When allowed by the tuning range of the undulators, jumping between different multiples of the target wavelength is more effective because there is no chance of coupling or overlap between the longer wavelengths.Any FEL layout which allows radiation at 0.3 nm to grow while disrupting growth at other wavelengths which have already been amplified can be incorporated as a way to allow radiation at 0.3 nm to grow in the linear regime until saturation.
Following this analogy further, the scheme described here is also a specialized form of the scheme of Ref. [15] designed to take advantage of the reduced bandwidth of harmonic radiation.In that scheme, undulators tuned to the desired wavelength are combined with other undulators tuned to a large multiple of the fundamental wavelength.The latter section is kept sufficiently short that radiation produced at longer wavelengths does not have a chance to grow to disruptive levels, but sufficiently long that the reduced FEL bandwidth in those undulators determines the bandwidth of the final SASE pulse.
Thus an obvious extension of this technique, if the undulator technology allows it, is to tune some undulators directly to the target wavelength λ 0 .For the nominal parameters considered here, that is not a possibility, so instead we settle for jumping among different multiples of the target wavelength.It would be possible to tune a group of undulators to 7λ 0 , in this example 2.1 nm.The factor of ∼2 increase in the permitted ratio of the gain length of the desired wavelength λ 0 to that of longer wavelengths is then improved to a factor of 3.While the implementation should be similar, and LCLS-II will easily permit a resonant wavelength of 2.1 nm at 4 GeV for an undulator period of 39 mm, simulation studies are not presented for this scenario.Besides the challenges in generating the seventh harmonic, properly simulating a third wavelength using current tools introduces some new difficulties.The current configuration requires considering all wavelengths to be harmonics of a common wavelength at 15λ 0 , or 4.5 nm, while including 7λ 0 requires taking everything as harmonics of 105λ 0 , or 31.5 nm.
One mild complication compared to having all undulators tuned to a single fundamental is that tuning the undulators for exactly 1.5 nm is not the same as tuning the fifth harmonic to exactly 0.3 nm.In addition, the sensitivity to the undulator parameter will typically be greater for the shorter wavelengths.This means that the configuration must be fine tuned for performance at 0.3 nm, and some effort must be taken so that the third harmonic from undulators tuned to 3λ 0 and the fifth harmonic from undulators tuned to 5λ 0 have spectra which truly overlap.This requires careful tuning of either the undulator parameter or the phase shifters; otherwise, there will be an abrupt loss of performance as the amplified radiation at λ 0 from upstream suddenly finds itself outside of the gain curve.Typically, once this happens there is not only an increase in distance to saturation, but the saturated power irreversibly drops.
Another issue that requires special attention is that whenever one shifts from 4n þ 1 harmonics (e.g., first or fifth) to 4n þ 3 harmonics (e.g., third or seventh) or back again, an extra π phase shift must be applied to the electrons relative to the laser field.This is because the coupling term between the bunched electrons and the radiation field in a planar undulator takes the form where K is the dimensionless undulator parameter, the J terms are Bessel functions, h is the harmonic number, and Thus, the energy shift of an electron is given by A field with wavelength λ 0 which is decelerating electrons in undulators tuned to a fundamental of λ 0 will suddenly G. PENN Phys.Rev. ST Accel.Beams 18, 060703 (2015) 060703-4 start to accelerate the same electrons if the next undulator is tuned to 3λ 0 .A π phase shift of the electrons relative to the radiation field is the only way to keep the radiation at λ 0 growing without disruption.

A. Nominal example
In this example, the first 14 undulator sections are tuned to 0.9 nm.The best results found so far come from a very simple pattern where the phase shifts with respect to the fundamental wavelength form a sequence 2π × ð1=3;1=3;1=3;1=3;2=3;2=3;2=3;2=3;0;1=3;0;1=3;0;1=2Þ in radians.Note that the last phase shift is just to prepare for the transition to undulators tuned to 1.5 nm, and the term could just as easily have been 1=6 or 5=6 because in all these cases the radiation at 0.3 nm experiences a phase shift of π.Following this first stage, the next 13 undulators are tuned to 1.5 nm.The optimum pattern of phase shifts uses shorter sequences of repeated phase shifters, 2π × ð1=5; 1=5; 1=5; 2=5; 2=5; 2=5; 3=5; 3=5; 3=5; 4=5; 4=5; 4=5Þ.After the final undulator there is no point applying a phase shift.A fraction of random sequences also work reasonably well.The power and spectrum are shown in Figs. 3 and 4. In all results for an idealized beam (not startto-end), the spectral density is normalized for a pulse duration of 50 fs.
The position of the first undulator tuned to 1.5 nm is constrained by the desire to amplify the radiation at 0.3 nm as much as possible while limiting the growth in energy spread at the location where the undulator parameter is switched.The average power at this point is about 9 MW, and the energy spread grows from 500 keV to 540 keV.While this is not a large increase, the term which is adding to the original energy spread grows exponentially and rapidly becomes ruinous beyond this point.By the last undulator, the radiation at 1.5 nm has roughly half the power of the desired radiation at 0.3 nm.This suppresses further gain in the fifth harmonic, and the power profile gives the appearance of saturation at 140 MW.Without the presence of the longer wavelength radiation the saturation power at 0.3 nm would be roughly 180 MW for undulators tuned to 1.5 nm, and 300 MW for undulators tuned to 0.9 nm.The tuning of the two sets of undulator has to be done very carefully to make sure that the bandwidth of the two sets of undulators overlaps each other as much as possible, as seen in Fig. 4.
In this particular example, tapering cannot be used to improve the performance of linear harmonic generation because by the end, the nonlinear interactions from 1.5 nm radiation spoil the linear growth.Even if the phase shifters were placed closer together, allowing the linear harmonic to actually reach ideal saturation levels, very few additional undulators could be added before nonlinear effects dominate.Without seeding, it would take extreme parameters where the linear growth rate for the harmonic is very close to or even faster than that of the fundamental to allow for significant tapering and still avoid strong interactions between the fundamental and the harmonic.On the other hand, debunching the electron beam and filtering out the long wavelengths would serve as a form of seeding.

B. "Reversed" example
Here the order of the fundamental wavelengths is reversed.For these parameters it is significantly more challenging to suppress radiation at 1.5 nm than at 0.9 nm, so the first stage has to be shorter.The first 10 undulators are tuned to 1.5 nm, and the following 18 are tuned to 0.9 nm.As shown in Figs. 5 and 6, the performance is similar to the previous example even when using one additional undulator section.The final power at 0.3 nm is still about 140 MW, while the radiation at 0.9 nm reaches just below this value.The same sequence of phase shifts is used for the undulators tuned to 1.5 nm.After the 10th undulator, a phase shift of π must again be used.The full set of phase shifts for the remaining part of the beam line is  Ending with undulators tuned to 0.9 nm would normally be expected to yield a higher final power, because the ideal saturated power is greater than for undulators tuned to 1.5 nm (300 MW instead of 180 MW).The target wavelength is an aggressive choice for the given parameters, and it is too challenging to suppress the radiation at 0.9 nm over the required length of undulator.For a longer wavelength of, for example, 0.35 nm, the final output power will more closely match the ideal performance.To gain the maximum performance at 0.3 nm, we consider below one final arrangement using three stages of undulators.

C. Three stages of harmonic generation
This example starts off similar to the nominal case.The first 14 undulators are tuned to 0.9 nm, and then only 10 undulators tuned to 1.5 nm are used.Up to this point all phase shifts are identical to the nominal case.After this point, the remaining 6 undulators are again tuned to 0.9 nm.
At both transitions, a π phase shift is required.The average power at 0.3 nm is 180 MW after a distance of 123 m (27 undulator sections, where saturation occurred in the previous examples), and 250 MW at 137 m (30 sections).Adding even more undulators can yield up to 280 MW.Results are shown in Figs.7 and 8. Using more symmetric configurations, starting with 10 or 12 undulators tuned to 0.9 nm in the first stage, produces similar final results.It is better to choose an arrangement where the final undulators are tuned to a fundamental of 0.9 nm, because saturation levels are significantly higher than when tuning to 1.5 nm and taking the fifth harmonic.
Successful performance of the third stage requires the radiation at 0.9 nm from the first stage to diffract to a significantly reduced peak intensity.Furthermore, the bunching at 0.9 nm must also decay significantly.For this reason, the second stage was chosen to be as long as possible without increasing the energy spread.While the pattern of phase shifts used in stage 1 could in theory be extended to define the pattern used in stage 3, performance is just as good if one relies on the fact that all components of the 0.9 nm mode have decayed, and simply repeats the original pattern of phase shifts used in stage 1.FIG. 6. Spectrum of 4 keV part of radiation for the reversed example at the end of stage 1 (scaled up by a factor of 1000) and at the end of stage 2. The undulator parameters of the two stages must be fine-tuned in order to center the spectra around the same point.The evolution of the bunching at long wavelengths is shown in Fig. 9.Note that after the transition to a fundamental wavelength of 1.5 nm (at 63 m), the bunching parameter at 0.9 nm continues to increase at first due to dispersion, before the energy spread causes the bunching to decay.The bunching parameter does not drop below its initial value of 6.6% until after passing through 5 undulator sections tuned to 1.5 nm, or 22 m of beam line.When switching back to a fundamental wavelength of 0.9 nm (at 109 m), the bunching at 1.5 nm takes even longer to damp out, and reaches its peak value only after 5 undulator sections tuned to 0.9 nm.
While in principle it is possible to go back and forth repeatedly between undulators tuned at 3λ 0 and 5λ 0 , the ability to go higher in photon energy is limited because the ratio between the gain lengths at long and short wavelengths increases.More transitions become necessary, and each stage must be long enough to damp out the bunching and radiation intensity at the previous resonant wavelength.It is especially difficult to damp out the bunching at 5λ 0 , giving another motivation to choose a pattern of 3λ 0 -5λ 0 -3λ 0 .Higher photon energies can be attempted by other means, for example by debunching the beam and filtering out radiation at long wavelengths.This method will increase the distance to saturation.On the other hand, it no longer becomes necessary to tune the undulators to more than one fundamental wavelength.
The option to use three stages does offer an opportunity to slightly increase the photon energy reach, as well as making the FEL more forgiving of beam quality issues and beam line errors.Tuning up the beam line should be easier as well.The suitability of the three-stage design does need to be explored on a case-by-case basis.In particular, the damping of the bunching at 3λ 0 requires more distance as the energy spread or undulator parameter (which enhances dispersion) decreases.Shown in Fig. 10 is an example of the evolution of the bunching when the energy spread is reduced by a factor of 2 and the emittance is increased to 0.6 micron (to have a similar gain length at 0.3 nm).The nominal two-stage layout is used because for these parameters the power at long wavelengths stays below 10 MW even when the power at 0.3 nm reaches saturation.After switching to undulators tuned to 1.5 nm, it takes 40 m for the bunching at 0.9 nm to reach its peak and drop back down to its starting value of 3.2%, almost twice as long as for the previous beam parameters.

D. Comparison to nonlinear harmonic generation
If one does not attempt to suppress long wavelengths, but instead simply allows radiation at 0.9 nm to reach saturation, a significant amount of power at 0.3 nm will still be generated due to nonlinear processes.Results are shown in Figs.11 and 12. Saturation occurs at 63 m, with a peak power of 2.4 GW.The power at 0.3 nm is 24 MW.Without tapering, the peak power in the fundamental does not significantly increase past saturation, but the power in the third harmonic does grow to 68 MW by 90 m.The undulators extend past the saturation point, as the power in the harmonic continues to slowly grow even without undulator tapering.This contrasts with the previous examples, where growth is abruptly cut off by radiation in the fundamental wavelength and the energy spread associated with it.However, the final power at 0.3 nm is still only half   060703-7 that of the nominal example, and the spectral brightness is an order of magnitude lower due to the broader spectrum.One method to improve at least the spectral brightness from nonlinear harmonic generation is to reduce the bandwidth through self-seeding.Results for a monochromator with R ¼ 5000 are shown in Figs. 13 and 14.Even for the modest bandwidth reduction considered here, the spectral brightness at 0.3 nm is improved by roughly a factor of 4 at saturation.The spectral brightness after 100 m is comparable to that obtained from the best case using linear harmonic generation, and uses fewer undulator sections.An additional benefit of self-seeding which is not examined in this work, is that tapering could be used to enhance not just the fundamental radiation but also the third harmonic [16].

E. Comparison to resonant wavelength of 0.3 nm
It is also interesting to consider a case where it is possible to radiate the desired radiation directly at the fundamental.The previous parameter choices of 4 GeV electrons and 39 mm undulator period did not allow for a fundamental wavelength of 0.3 nm.Here, we keep the beam energy fixed but change the undulator period to 26 mm, as in the hard x-ray line for LCLS-II.For the same magnetic gap and undulator design, K max should decrease from 5.48 to 2.44.The longest achievable wavelength for a 4 GeV electron beam will decrease from 5.1 nm to 0.84 nm, while allowing for wavelengths as short as 0.25 nm.As shown in Figs. 15 and 16, the peak power at saturation is 780 MW, roughly 3 times higher than the best example using harmonic lasing, while the spectral brightness is only slightly higher because 12. Spectrum at saturation and past saturation of the (nonlinear) third harmonic for a SASE beam line tuned to a fundamental of 0.9 nm.    of the larger bandwidth.Again, tapering of the undulator parameter to increase peak power is not considered.

VI. START TO END SIMULATION RESULTS
We consider a 100 pC bunch obtained from simulations of the LCLS-II injector and linac [17].The electron beam parameters are similar to the nominal values, except that the slice emittance is about 0.30 micron.The configuration is also close to the nominal example, except that the smaller emittance leads to a shorter gain length so only the first 12 undulators are tuned to a fundamental of 0.9 nm before switching to a fundamental of 1.5 nm.The phase space and other beam properties are shown in Fig. 17.
Simulation results are shown in Figs.18-20.At end of beam line, the final pulse energy is 2.9 μJ at the 0.3 nm wavelength and 5.6 μJ at the fundamental wavelength of 1.5 nm.The spectrum reaches roughly 4 × 10 6 photons per meV bandwidth.Although in this case the longer wavelength has more energy than the desired wavelength, it is clear from Fig. 20 that radiation at the two wavelengths are mostly separated in time, with a roughly 10-fs region where they overlap.Radiation at 0.3 nm comes primarily from the core of the bunch, while radiation at 1.5 nm comes from the region near the tail of the bunch where the peak current is very large, reaching 1.7 kA, and the energy spread is also large.Both of these changes preferentially favor the fundamental over harmonics.This longitudinal separation prevents the long wavelength radiation from disrupting the radiation at 0.3 nm.The pulse energy in the longer wavelength is almost double that of the power in the desired wavelength, but even in the ideal case the ratio was a factor of 2 in the other direction.Using fewer undulators will result in a higher percentage of energy at the target wavelength, but at the cost of reducing that energy.The radiation at 1.5 nm is undesirable for most applications and will have to be filtered out.Harmonic radiation in the linear regime is much more sensitive than the fundamental to electron beam and undulator properties such as undulator errors, transverse offsets, energy spread, and betatron mismatch.If the linear harmonic scheme is to work in practice, great care must be taken to have high quality magnetic fields and to limit the effects of CSR, wakefields, and microbunching.There is already significant work in reducing the impact of microbunching and CSR through careful lattice design [18][19][20].
As an example of this issue, we repeat the simulation after imposing an initial vertical offset on the electron bunch of 25 microns, roughly 1 rms.Performance is significantly degraded.At the end of the beam line, there is 0.92 μJ at 0.3 nm and 6.7 μJ at 1.5 nm.The power profile is shown in Fig. 21.The location of peak power at 0.3 nm is still displaced from the peak of the radiation at 1.5 nm, but nowhere is the local power at 0.3 nm significantly above that at 1.5 nm.The spectrum at 0.3 nm reaches levels of roughly 1 × 10 6 photons per meV bandwidth.
As expected, the radiation at 0.3 nm is more sensitive to transverse offsets than the radiation at 1.5 nm.It is unclear why the long wavelength radiation is actually enhanced by the transverse offset.
Finally, we observe that using three stages as in Sec.V C can improve both the performance and the contrast.The final pulse energy at 0.3 nm is 5.5 μJ.Both the pulse energy and spectral brightness are almost double that for the nominal configuration.In addition to radiation at the target Profile of the final output power produced at wavelengths of 0.3 nm, 0.9 nm, and 1.5 nm for a start-to-end bunch with a vertical offset.Profile of the final output power produced at wavelengths of 0.3 nm, 0.9 nm, and 1.5 nm for a start-to-end bunch using a 3-stage configuration.
G. PENN Phys.Rev. ST Accel.Beams 18, 060703 (2015) wavelength there is also 3.1 μJ at 0.9 nm and 1.5 μJ at 1.5 nm, which even combined is less than the pulse energy at 0.3 nm.By adjusting the lengths of the first and third stages, it is possible to balance the undesirable radiation at 5λ 0 and 3λ 0 , whereas in the previous design it was necessary to include significantly more gain for the radiation at 5λ 0 .Results are shown in Figs.22-24 for the case where stage 1 consists of 10 undulator sections, stage 2 consists of 8 undulator sections, and stage 3 consists of 6 undulator sections.There are no imposed offsets, so these figures should be compared to Figs. 18-20.

VII. CONCLUSIONS
Linear harmonic generation has several advantages compared to more conventional schemes; it minimizes the undulator length required to reach saturation, allows more flexibility for undulators with limited tuning range, and yields a reduced bandwidth compared to SASE at the fundamental.Linear harmonic generation is expected to give good performance for realistic beams even when conventional undulators are used, so long as properly adjusted phase shifters are placed between each undulator.
On the other hand, many of these benefits can be matched by either using undulators with a greater tuning range or by using a combination of self-seeding and nonlinear harmonic generation.Linear harmonic generation also introduces significant amounts of longer wavelength radiation.In circumstances where alternative methods are not practical, this scheme appears to be an interesting option for reducing the total undulator length or producing photons at higher energy.For all but the highest quality beams, and undulators set to a large undulator parameter, having a fixed undulator parameter and relying solely on phase shifters will require special undulators that incorporate many phase shifts within them.When implementing such specialized hardware, there seem to be many advantages to including a significant tuning range as another capability.
By combining third and fifth harmonics in one beam line, the fundamental wavelength can be moved around to prevent any single wavelength from reaching saturation before the target wavelength.This increases the allowed distance between phase shifters.When possible, some undulators could also be tuned so that they are radiating at the seventh or higher harmonics, or even at the fundamental.Using an arrangement where the resonant wavelength is first set to 3λ 0 , then 5λ 0 , then 3λ 0 , where λ 0 is the desired radiation wavelength, can give an additional increase in photon energy reach, as well as significantly improved contrast between radiation at the desired wavelength and longer wavelengths.
As harmonics are more sensitive to beam quality than the fundamental, requirements on the electron beam are more strict than for other schemes such as self-seeding or nonlinear harmonic generation.Transverse offsets, matching of the Twiss parameters, undulator errors, and the longitudinal profile must all be tightly controlled.The cost of such imperfections is not simply a longer gain length or a slight reduction in output power, but drastic suppression of the desired mode by the fundamental.Regions in the beam with large peak current and energy spread will also radiate copiously in the fundamental, but will not actively interfere with radiation production of the shorter wavelength in the core of the bunch.

3 FIG. 1 .
FIG.1.Spectrum at the fundamental resulting from fixed phase shifters with shifts of 0, 1=3, and 2=3 of a cycle, normalized for a pulse duration of 50 fs.

3 FIG. 2 .
FIG.2.Average power at the fundamental (3λ 0 ) produced as a function of distance resulting from fixed phase shifters with shifts of 0, 1=3, and 2=3 of a cycle.

FIG. 3 .
FIG.3.Average power produced at various wavelengths as a function of distance for the nominal example.

FIG. 4 .
FIG.4.Spectrum of the 4 keV part of the radiation for the nominal example at end of stage 1 (scaled up by a factor of 100) and at the end of stage 2. The tuning of the two stages must be adjusted in order to center the spectra around the same point.

FIG. 5 .
FIG.5.Average power produced at various wavelengths as a function of distance for the "reversed" example.

FIG. 7 .
FIG.7.Average power produced at various wavelengths as a function of distance for the three-stage example.

FIG. 8 .
FIG.8.Spectrum of 4 keV part of radiation for the three-stage example at the end of each stage (the first stage is scaled up).

FIG. 9 .FIG. 10 .
FIG. 9. Rms bunching parameter at various wavelengths as a function of distance for the three-stage example.

FIG. 11 .
FIG. 11.Average power produced at a fundamental of 0.9 nm and at the (nonlinear) third harmonic for a SASE beam line.
FIG.12.Spectrum at saturation and past saturation of the (nonlinear) third harmonic for a SASE beam line tuned to a fundamental of 0.9 nm.

FIG. 13 .
FIG.13.Average power produced at a fundamental of 0.9 nm and at the (nonlinear) third harmonic for a self-seeded beam line.

FIG. 14 .
FIG.14.Spectrum at saturation and past saturation of the (nonlinear) third harmonic for a self-seeded beam line tuned to a fundamental of 0.9 nm.

FIG. 15 .
FIG.15.Average power produced at a fundamental of 0.3 nm using an undulator period of 26 mm.

FIG. 18 .
FIG.18.Pulse energy produced at various wavelengths as a function of distance for the start-to-end bunch.

FIG. 19 .
FIG.19.Spectrum of the 4 keV part of the radiation for at end of stage 1 (scaled up by a factor of 100) and at the end of stage 2 for the start-to-end bunch.

FIG. 20 .
FIG.20.Profile of the final output power produced at wavelengths of 0.3 nm, 0.9 nm, and 1.5 nm for the start-to-end bunch.
FIG. 22.Pulse energy produced at various wavelengths as a function of distance for the start-to-end bunch using a 3-stage configuration.
FIG. 24.Profile of the final output power produced at wavelengths of 0.3 nm, 0.9 nm, and 1.5 nm for a start-to-end bunch using a 3-stage configuration.

TABLE I .
Beam and undulator parameters for soft x-ray beam line design for LCLS-II.