Analytic model of bunched beams for harmonic generation in the low-gain free electron laser regime

One scheme for harmonic generation employs free electron lasers (FELs) with two undulators: the ﬁrst uses a seed laser to modulate the energy of the electron beam; following a dispersive element which acts to bunch the beam, the second undulator radiates at a higher harmonic. These processes are currently evaluated using extensive calculations or simulation codes which can be slow to evaluate and diﬃcult to set up. We describe a simple algorithm to predict the output of a harmonic generation beamline in the low-gain FEL regime, based on trial functions for the output radiation. Full three-dimensional eﬀects are included. This method has been implemented as a Mathematica R (cid:13) package, named CAMPANILE, which runs rapidly and can be generalized to include eﬀects such as asymmetric beams and misalignments. This method is compared with simulation results using the FEL code GENESIS, both for single stages of harmonic generation and for the LUX project, a design concept for an ultrafast X-ray facility, where multiple stages upshift the input laser frequency by factors of up to 200.


I. INTRODUCTION
Many proposed X-ray free electron lasers (FELs) are designed to produce radiation starting from the shot noise of an electron beam. This is the self-amplified spontaneous emission (SASE) mechanism. There is much interest in developing a practical method for using seeded electron beams to produce X-ray radiation, rather than relying on SASE, because seeded FELs offer more control over the timing and pulse structure. The seed can be a laser field which is then amplified by the FEL instability, or it can be an initial current variation (bunching) of the electron beam. The second method has the advantages that high output power can be produced in the low-gain regime, and that the output wavelength can be at a harmonic of the initial perturbation [1,2]. Through this harmonic generation technique, interactions of an electron beam with a visible or UV laser can be used to generate photons at much higher energies. The possible use of multiple stages of such harmonic generation is an area of active study, for example in the LUX [3] conceptual design for ultrafast X-ray production.
Here, we present an analytic model for predicting and optimizing the FEL output from an idealized, prebunched electron beam, with emphasis on applications towards harmonic generation. While many previous examinations of seeded electron beams in an FEL either assume the laser field structure in advance [4,5], or rely on summations over single-particle radiation fields [6], this formalism uses a trial-function approach to obtain simple analytic prescriptions for determining the output laser field. These expressions only apply to FELs in the low-gain regime, but include three-dimensional dynam- * Also at University of California, Berkeley, Department of Physics.
ics and physical effects. These calculations have been implemented using scripts in Mathematica R [7], as a package named CAMPANILE. This allows for the rapid calculation of the dominant mode produced by a seeded electron beam in a low-gain FEL; it is also a means of optimizing the FEL and beam parameters. Under certain circumstances, this method reduces to fairly simple algebraic expressions for the power produced by a single stage of harmonic generation, with a straightforward physical interpretation. The computation time for this method of analysis is kept low by iterating over calculations where, for each iteration, only a single laser mode is considered; this is in contrast with many numerical computations where three-dimensional effects are modeled by calculating the laser field on a grid [8]. This theory is benchmarked using the GENESIS [9] simulation code. The methodology which was implemented here for the simplest case can be extended to more general beam geometries and mechanisms for seeding.

II. ANALYTIC MODEL
We consider an electron beam that already has a seeded perturbation in the beam current and thus generates a radiation field as it passes through an undulator. A schematic is shown in Figure 1. The electric field which exits from the undulator is taken to be a simple Gaussian mode, but is otherwise kept arbitrary: where G(x, y, s) ≡ Z R Z R + i(s − s 0 ) exp − 1 2 k(x 2 + y 2 ) Z R + i(s − s 0 ) (2) characterizes the structure of the mode. The laser wavelength is λ = 2π/k, the frequency ω = ck, and Z R is the Rayleigh length. The longitudinal coordinate s represents the position along the undulator, and at s = s 0 the laser is at its waist with spot size (Z R /2k) 1/2 (in terms of laser power). It is possible to generalize Eq. (2) to include higher-order transverse modes. The quantities Z R and s 0 are set by the parameters of the FEL and do not vary with s. This field is intended to characterize only the output from the undulator, and so, in general, the mode structure must be chosen to correspond to a vacuum field solution. The temporal variation of the radiation envelope is assumed to be slow compared to other time scales, such as the total time shift between the laser and the electron beam through the undulator. Thus, neither phase noise nor the longitudinal shape of the envelope of the laser field are considered, and the radiation properties are taken to depend only on the local electron beam properties. where a beam, which has a longitudinal distribution that is modulated at one wavelength, then passes through an undulator where it radiates into a harmonic wavelength.
Within a planar undulator, the change in energy of a particle is given by where the transverse velocity of electrons due to the undulator field is Here, the undulator period is λ u = 2π/k u , the normalized field strength is a u = eB 0 /mck u , and B 0 is the RMS value of the on-axis undulator field. The field on axis is taken to be B y = √ 2 B 0 cos(k u s). The forward motion of a single electron can be described as wherev z is the forward velocity averaged over an undulator period, and the last term arises from particle motion in the planar undulator. The simplification made here for the linear regime is that the total energy lost by the electron beam at the end of the undulator can be calculated properly even if only the radiation mode of Equation (2), corresponding to the actual output radiation, is considered. Interactions with all orthogonal modes will result in a net cancellation by the end of the undulator. It still remains to determine the proper coefficients to fully characterize the output mode; the method for accomplishing this will be shown in Section III. The corresponding equation for the evolution of energy is then where the normalized (complex-valued) laser field amplitude is Averaging over an undulator period yields [10] dγ where JJ(ξ) ≡ J 0 (ξ) − J 1 (ξ), ξ ≡ ka 2 u /4k u γ 2 , and θ ≡ ks − ωt + k u s is the phase of the electron relative to a plane wave at the beat wavelength. The ponderomotive phase is usually defined as the sum of θ and the phase of the electric field, but in this paper we find it convenient to keep the components separate, because we are neglecting trapping due to self-fields. To leading order in 1/γ 2 , θ evolves according to wherev 2 ⊥ is the square of the transverse velocity averaged over an undulator period. Assuming the betatron period is much longer than the undulator period, the contributions tov 2 ⊥ from these two types of motion add in quadrature. While the displacements caused by the undulator field, of order a u /γk u , are negligible, the angles can be important for modifying the phase slippage, since they will be compared to 1/γ 2 . The betatron motion has several effects, because both the laser fields and the undulator fields vary with transverse position, and because of the change in path length. The angles due to betatron motion are typically smaller than those due to the undulator, because the betatron wavelength is much longer than the undulator period, but can also affect phase slippage. Thus, the electron beam emittance induces a spread in dθ/ds which can adversely affect the performance of the FEL.
The undulator field increases with strength off-axis, which generates focusing of the electron beam. Here, we consider a planar wiggler with curved pole faces, so as to generate equal focusing in both planes, as described by E.T. Scharlemann [11]. The matched beta function for the undulator is then given by β u ≡ √ 2 γ/a u k u . The corresponding transverse actions for particle motion in the undulator, J x and J y , are given by: In the presence of external focusing, J x and J y will have a different functional form. In Reference [11], θ is shown to evolve according to where we define k = k r +δk, and the resonant wave vector is The detuning can be expressed, equivalently, in terms of δk or as a shift, δa u , in undulator strength. Using the resonance condition, the argument of the Bessel functions in Eq. (8) is ξ = (1/2)a 2 u /(1 + a 2 u ). Finally, there is the expression for the intensity of the laser field, assuming the power given up by the electron beam goes into a single mode. For the mode defined by Eq. (2), the power is where r e = e 2 /(4πǫ 0 mc 2 ). By conservation of energy, the change in power is given by where I is the electron beam current and the brackets indicate an average over the particle distribution: dγ/ds ≡ dX f (X)(dγ/ds). The termX is used as a shorthand to represent the full set of 6D phase space variables, and the distribution function f (X) is normalized so that dX f (X) = 1. The current, I, is smoothed out to average over perturbations on the time scale of the laser frequency, and is taken here to be a constant.
Noting that P L scales as |a L | 2 , we have where I A ≡ ec/r e = 4πǫ 0 mc 3 /e ≃ 17 kA. The result in Eq. (15) is simply the electric field generated by the net bunching of the electron beam; we wish to generalize this to include the possibility of having no seed pulse, but having, instead, a prebunched beam. Using the identity e iΦ0 = a L /|a L |, and the relation d|a L |/ds = ℜe[(a L /|a L |)da * L /ds), Eq. (15) can be expanded to (16) This suggests that the two terms within the real part are equivalent as well; taking the complex conjugate of the resulting equation yields The above average is a generalization of the usual bunching parameter, b ≡ exp(−iθ) . The generalized bunching parameter will be defined as The temporal variation of B(s) at fixed s is neglected, assuming that it is small at the scale of the relative shifts in time caused by phase slippage.
To evaluate the output radiation, it is necessary to calculate the generalized bunching parameter, B(s). In the low-gain FEL regime, the radiation field produced by the beam overall is assumed to have a small effect on singleparticle orbits, and free-streaming particle dynamics can be used. Thus, the initial particle distribution is sufficient to perform this calculation.
As an explicit example, we consider the case of harmonic generation, as in the LUX conceptual design. This configuration uses a seed laser to generate an energy modulation in one undulator, which is then converted into microbunching by means of a dispersive section, typically a chicane. The chromatic dispersion is characterized by the parameter R 56 , defined by c∆t = R 56 (γ − γ 0 )/γ 0 . The second undulator is tuned to a higher harmonic of the laser seed. Because the bunching in the beam includes Fourier components at harmonics of the initial laser seed, the beam radiates at a level well above that due to shot noise (which will be neglected). Here, we examine a specific case where the modulator applies an energy modulation which depends solely on the phase θ of the electrons. The distribution function is chosen to be a product of longitudinal and transverse terms. The transverse component of the distribution function f (X) is a function of the transverse action and is proportional to exp(−J x /ǫ x − J y /ǫ y ), where ǫ x is the normalized emittance in the x-plane, and similarly for ǫ y . The energy component of distribution after modulation takes the form We will consider both Gaussian and uniform energy profiles for the function H, where ∆ γ is equal to the RMS energy spread and maximum deviation, respectively. The energy modulation varies sinusoidally with θ M , which will have a length scale determined by the source of the modulation. Generally, the length scale for the seed will be chosen to be a subharmonic of the desired output radiation wavelength, so that θ = nθ M for some harmonic number, n. Thus, if the laser seed modifies the electron beam energy in an upstream modulator, we will want to evaluate the quantity exp(−iθ) = exp(−inθ M ), which is the bunching at the n th harmonic of the seed modulation. The energy distribution includes the possibility for κ x , κ y = 0, where κ x and κ y represent a correlation between energy and transverse amplitude. This includes the case of "conditioned beams" [12,13], which has been proposed as a means of improving performance in SASE FELs.
After the modulator, the beam passes through a dispersive section with an R 56 that induces a phase shift ∆θ = kR 56 (γ − γ 0 )/γ 0 , where k is the wave vector for the output radiation. Within the radiating undulator, the phase can be written as where θ M is the phase of the initial energy modulation, and similarly for q y (s). Because the chicane yields a phase offset that is independent of transverse action, there will always be phase slippage between particles at different transverse amplitudes, even for 'fully con- . Any correlation between energy and transverse amplitude results in a phase shift that is correlated with transverse amplitude as well. This effect reduces the bunching produced by the chicane. For unconditioned beams, the terms q x (s) and q y (s) grow linearly with distance along the FEL. Note that if one is considering tuning the strength of the undulator field to optimize performance, the detuning term δk/k r can be replaced with 2a u δa u /(1 + a 2 u ). The generalized bunching parameter can be calculated by considering integrals over each phase space coordinate individually. Performing the energy integral first, and shifting by ( where the function F γ depends on the form of the energy distribution: The average over ponderomotive phase is taken over θ M , because this is the scale length for the initial energy modulation: The average over transverse coordinates includes a combination of phases remaining from exp(−iθ) and the mode structure defined by G * (x, y, s). The term in G * is the same for all particles, so the following integral over the x, p x variables remains to be calculated: and similarly in y, p y space. Here, action coordinates have been used so that x = (2β u J x /γ 0 ) 1/2 cos Φ x . Electrons are subject to betatron motion, where Φ x for a specific particle varies with s. However, because Eq. (25) is an average over all phases, and we assumed that the initial energy modulation had no transverse dependence, the value of the integral is independent of the betatron motion. It is simplest to evaluate this by performing the integral over J x first; then, one is left with the average of an expression having the form 1/(a + b cos 2 φ). The integral of this term is slightly complicated, but the average value simplifies to The integral in Eq. (25) then takes the form The final result for the generalized bunching at the higher harmonic is The laser field at the end of the undulator is determined by and the laser power is given by Eq. (13). The basic undulator equations given above can be applied to other configurations, for example, to predict the energy modulation given to a beam by an external laser. They can also be applied to the high-gain regime, but here we will only check the scaling for the gain length. The second derivative of Eq. (17) can be reduced to an equation for the FEL instability, where a L grows exponentially, using Eq. (8) and considering only the energy-dependent term of Eq. (11), where dΨ/ds ≈ 2k u (γ−γ r )/γ r . Assuming that the radius of the radiation field is comparable to the radius of the electron beam, we take Z R ≃ kǫ x β u /γ, and set |G 2 | ≃ 2/3, which yields the following expression for the gain length (expressed in terms of the power radiated): Here, the "FEL parameter" is defined by and n e = (I/2πec)(γ/ǫ x β u ) is the peak electron density. This is in fairly good agreement with the well-known onedimensional approximation [14],

III. TRIAL FUNCTIONS
The above results are still not fully defined, because Z R and s 0 are free parameters. In general, given a specific choice of Z R and s 0 , any radiation field can be described using a sum of normal modes, but here we are attempting to fit the radiation field to a single, Gaussian mode. In the low-gain regime, each normal mode evolves independently and can be calculated individually. Because the exact result will include the power contained within all these modes, the above analytic result, when only a single mode is considered, is expected to always fall below the correct value. This suggests varying the free parameters to maximize the output power, yielding a greatest lower bound to the total power. The resulting values for Z R and s 0 should serve as the best fit of the output radiation to a pure Gaussian mode.
This method is essentially a trial function approach, and any trial function which is a valid vacuum laser field can be used. The closer the trial function is to the exact result, the more accurate this estimate for the power will be. Furthermore, the prediction for the laser power is expected to be second-order accurate compared to the optimized trial function; in other words, even a poor approximation to the laser field can result in a good estimate for the output power.
In this paper, only a simplified FEL configuration is considered, where the prebunching is accomplished by a uniform energy modulation, followed by a linear chicane. The trial function method applies to more general cases as well, so long as the generalized bunching parameter B(s) can be calculated and the FEL is operating in the low-gain regime. In the configurations being considered, a pure Gaussian mode is expected to be a reasonable approximation to the FEL output, except in the emittancedominated regime, ǫ/γ 0 > ∼ λ/(4π). It is a feature of trial function methods that, even if the trial function does not accurately represent the radiation field produced by the FEL, the prediction for the output power may still serve as a good estimate. For any given set of trial functions, the analytic model predicts a lower bound on the total output power.
The resulting integrals are simple enough to implement as a Mathematica R script, which allows for rapid optimization. Because the trial function procedure is to maximize the output power by varying Z R and s 0 , any additional design parameters -for example the undulator field, R 56 , or energy modulation -can be optimized, simultaneously, to obtain the largest possible output power. The computational time required to optimize these design parameters is greatly reduced, in this way, relative to full scale FEL simulation codes.

IV. ANALYTIC SOLUTIONS
In certain parameter ranges, the above methodology allows for simple analytic approximations to the radiation power and mode structure produced by an undulator. In the parameter range where the energy modulation is much larger than the energy spread ∆ γ , but not so large that the variations in phase slippage along the length of the undulator can compete with that caused by the chicane, the optimal value of R 56 will be close to the value which maximizes J n (kR 56 γ M /γ 0 ). The argument which maximizes this Bessel function will be referred to as j ′ n,1 , which is the first non-trivial zero of J ′ n . For a cylindrically symmetric beam, the resulting expression for the output power is: where δ k = δk/k r −2(γ 0 −γ r )/γ r is the relative detuning, and (34) Here, Z 0 ≡ 1/(ǫ 0 c) ≃ 377 Ω is the vacuum impedance, which enters through mc 3 /(r e I 2 A ) = Z 0 /4π. The number N u = k u L/2π is the number of undulator periods in the undulator.
To continue this analytic approximation to an optimized harmonic generation section, we consider three cases. First, we neglect q(s) altogether, which implies that the effect of emittance is limited to the spot size of the electron beam. Secondly, we consider an ideally conditioned beam, so that q(s) is a constant. Finally, we consider more general cases, including the most typical example of an unconditioned beam, where q(s) = 0 at s = 0 and increases linearly with s.
Neglecting q(s), The expression for the power becomes (36) It is still necessary to find Z R and s 0 by optimizing the predicted power. The power is symmetric under s 0 → L − s 0 , and the optimum occurs at the central value of s 0 = L/2.
The integral becomes simple to calculate if δ k = 0, in which case the power is (37) The emittance-related term has been rewritten in terms of the ratio between the geometric emittance, ǫ/γ 0 , and the minimum effective emittance of the laser field, λ/4π. When the emittance term is small (a line charge beam), the maximum power occurs for Z R ≃ 0.36 L with a value of 0.65 P 0 . The power only scales linearly with N u , in this case, because the distance along the undulator over which electrons can induce stimulated emission is limited by diffraction.
If the detuning is allowed to vary, on the other hand, this allows for further optimization of the FEL. Using Eq. (36), the expected bandwidth of the FEL, in terms of the relative detuning, δ k , is 2π/(k u L) = 1/N u . In general, the value of the detuning parameter which maximizes the output power is negative, and must satisfy the following condition: (38) In the limit of very small ǫ, the power goes to 1.07 P 0 and Z R ≃ 0.18 L. At large values of (β u /L)(4πǫ/γ 0 λ), the power is roughly P 0 L/8Z R , and Z R ≃ kǫβ u /γ 0 . Note that (ǫβ u /γ 0 ) 1/2 is the spot size of the electron beam and, in this limit, the Rayleigh length is determined by the fact that this is also the spot size of the outgoing radiation. As a fit between these two limits, a good approximation for the Rayleigh length is Z R ≃ 0.18 L + kǫβ u /γ 0 . The power can be approximated as Thus, by optimizing the detuning parameter, rather than using the exact resonance condition, the output power can be significantly increased, by over 60% in the limit of small emittance. Also, in the small emittance limit, the Rayleigh length of the output radiation is reduced by a factor of two. When the emittance term is large, on the other hand, the optimal detuning is close to nominal resonance, in comparison with the bandwidth of the FEL. The expression for q(s) in Eq. (21) can be rewritten in terms of the conditioning parameter for a "fully conditioned" beam, κ 0 ≡ k/(2k u β u ), as When the conditioning parameter κ = κ 0 , q(s) = q κ ≡ −κ 0 kR 56 /γ 0 is a constant. In this case, the expression for the output power is almost identical to the case where q(s) is neglected, but with ǫ → ǫ/(1 + q 2 κ ǫ 2 ). Additionally, however, the power is reduced by a factor of (1 + q 2 κ ǫ 2 ), and the beam waist is shifted from L/2 to L/2 − (kǫβ u /γ 0 ) × q κ ǫ/(1 + q 2 κ ǫ 2 ). Because q κ < 0, this implies that the beam waist is shifted towards the end of the undulator. The Rayleigh length is unchanged. Thus, the effect of the constant, non-zero q(s), is to strongly reduce the output power, although this is partly compensated for by reducing the effective spot size of the electron beam. Now we consider more general conditioning parameters and optimize the output power. This is achieved by adjusting the conditioning parameter so that q(s) sweeps from negative to positive values, which keeps the magnitude of q(s) as small as possible throughout the undulator. The optimum condition is, thus, q(L/2) ≃ 0, implying that This optimum can be much smaller than κ 0 when 1 ≪ kR 56 /k u L = j ′ n,1 γ 0 /(2πN u γ M ). The parameter q(s) then varies within the range ±(κ 0 /γ 0 )kR 56 /(k u L+kR 56 ). For this value, the result is, again, symmetric under the transformation s 0 → L − s 0 , and the trial function method yields s 0 = L/2. An approximate fit for the resulting output power is kR 56 k u L + kR 56 A key parameter affecting FEL performance is the ratio of the geometric electron beam emittance, ǫ/γ 0 , to the nominal laser emittance, λ/4π. The two main corrections take the form of this ratio multiplied by either β u /L, or by L/β u . These terms are related to the electron beam spot size and phase slippage rate, respectively. There is an additional, higher order correction, which is only significant when the emittance ratio is of order unity or higher. Note that this additional term arises from the product of (2kǫ/γ 0 )(β u /L) and (2kǫ/γ 0 )(L/β u ).
For an unconditioned beam, the final output power can be very similar to the optimized conditioning parameter given above. However, when the term q(s) has a significant effect, the output power is determined mainly by the range of values of q(s) for 0 < s < L. An unconditioned beam, with q(s) varying from 0 to 2k u Lκ 0 /γ 0 , will perform similarly to the optimized case above, with parameters chosen so that q(s) varies between ±2k u Lκ 0 /γ 0 . The output power for an unconditioned beam satisfies a similar approximate fit, but the sensitivity to phase slippage is effectively doubled: However, in contrast to the case where the conditioning parameter is made too large, for an unconditioned beam, the beam waist is shifted towards the beginning of the undulator. For large emittances, when ǫ/γ 0 > ∼ λ/4π, it is even possible to have s 0 < 0. Note that even when kR 56 ≫ k u L, appropriate beam conditioning can increase output power by up to a factor of 4 if the undulator performance is limited by emittance. The improvement is constrained by the mismatch between chicanes and conditioned beams, and also results from the fact that we are only considering radiation in the low-gain regime.
In summary, the trial function method leads to a simplified numerical solution for certain examples, including the usual case of an unconditioned beam. The electron beam emittance is seen to affect the output power for an optimized system in two ways, related to the electron beam size and the relative phase slip of electrons having different transverse amplitude. These two terms imply that the undulator performs best when β u ≃ 0.4 L: for larger beta functions, the spot size is too large; for very small beta functions or for long undulator lengths, phase slippage reduces the output power. Constraints with similar underlying physics have been obtained as numerical fits [15] to analytic calculations of FEL radiation in the high-gain regime [16]. One important difference is that, in the high-gain regime, the most significant length scale is the gain length, rather than the total length of the undulator.

V. SIMULATION RESULTS
For the simplified description of a seeded electron beam, FEL simulations using the GENESIS code [9] have been compared with the analytic theory above. Two cases are considered: the first stage of a cascade which converts 200 nm wavelength to 50 nm, and the final stage, which converts 3.13 nm wavelength to 1.04 nm. All sections are assumed to use planar undulators. The electron beam is assumed to have equal emittances and equal focusing in both transverse planes. The results are summarized in Table I.
The electron beam parameters are: γ 0 = 6067, ǫ x = ǫ y = 2 µm, I = 500 A. The transverse mode structure of the output radiation is characterized by the parameter M 2 , which is the ratio of the emittance of the FEL output to the minimum possible value, λ/4π. This parameter can also be described as the ratio of the idealized Rayleigh length for the given waist diameter to the observed Rayleigh length. In terms of power flux, the RMS width of the laser at the waist is (λM 2 Z R /4π) 1/2 . For the first stage, producing radiation at 50 nm by going to the fourth harmonic, the energy modulation is γ M = 2.68, and the idealized chicane uses R 56 = 92 µm. The undulator has an 8 cm period and is 2.4 m long. The electron beam is taken to be matched to the undulator, with β = 16.28 m. The resonant undulator strength is a u = 6.709, but optimal performance occurs at a u = 6.686. At this optimum, the theory predicts a total output power of 130.3 MW, characterized by Z R = 1.12 m and s 0 = 1.20 m. Numerical simulations for the simplified case yield an output power of 134.2 MW, characterized by Z R = 0.94 m and s 0 = 1.19 m, under the assumption that M 2 ≡ 1. On the other hand, a more general fit to the output radiation yields M 2 = 1.04, Z R = 0.97 m, and s 0 = 1.21 m. A detailed analysis reveals that 126.4 MW, or 94%, of the output radiation, lies within the predicted Gaussian mode. The analytic theory underestimates the total power by 3.9 MW, a relative error of 3%, which is of similar order to the power which resides in higher order modes. As a rough check, we note that, when M 2 is close to unity, an estimate for the fraction of power in higher-order modes is (M 2 −1)/2, or 2%, in this case. For this example, neglecting the effect of the FEL radiation field on the electrons themselves does not alter the simulation results.
For the final stage, producing radiation at 1.04 nm, by going to the third harmonic, the energy modulation is γ M = 1.10, and the idealized chicane uses R 56 = 3.2 µm. In this stage, (ǫ/γ 0 )/(λ/4π) ≃ 4. The undulator has a 2.8 cm period and is 8.4 m long. The electron beam is taken to be matched to the undulator, with β = 29.00 m. The resonant undulator strength is a u = 1.3186, but optimal performance occurs at a u = 1.3181. At this optimum, the theory predicts a total output power of 35. On the other hand, a more general fit to the output radiation yields M 2 = 1.72, Z R = 33.0 m, and s 0 = 0.73 m. The analytic prediction is too low by 10%. By taking into account the reduced transverse coherence of the laser output, the waist position is shown to be located within the undulator, close to the upstream end. The prediction that the virtual waist of the radiation would be far away from the undulator itself is an artifact of the attempt to characterize the radiation in terms of a single, Gaussian mode. The Rayleigh lengths are also very different, reflecting the importance of higher-order modes. A detailed analysis reveals that 32.8 MW, or 93%, of the output radiation lies within the predicted Gaussian mode. The analytic theory underestimates the total power by 3.9 MW, a relative error of 10%, which is of similar order to the power which resides in higher order modes. Note that by selecting the values of Z R and s 0 in the "best fit" for the laser output, the analytic prediction may partially account for higher order transverse modes. A generalization to trial functions having two or more transverse modes would be desirable to obtain a more complete description of the output radiation. However, for typical parameters, even when performance is strongly impacted by emittance, the errors are comparable to other effects, such as statistical noise within the electron beam. The dependence of the output radiation power on the energy modulation, γ M , is shown in Figure 2, and also shows good agreement between the analytic model and numerical simulations. The value of R 56 is re-optimized for each value of γ M . For short wavelengths, FEL performance is more sensitive to the energy spread, as phase slippage along the length of the undulator leads to debunching of the electron beam. The optimal power of 60 MW can only be increased by using a longer undulator, by lowering the harmonic number, or by changing the electron beam parameters. The dependence of the output radiation on the energy spread is shown in Figure 3. Other FEL parameters are kept constant. The resulting variation in FEL power is consistent with Eq. (34). In particular, for a uniform energy distribution, the power falls off to nearly zero at kR 56 ∆ γ /γ 0 = π, because the energy spread appears in the term F γ (x) = sin(x)/x.
The dependence of the output radiation on the beam conditioning parameter is shown in Figure 4. Other FEL parameters are kept constant. The resulting FEL power is consistent with the analytic theory, with the optimum value for the conditioning parameter given by Eq. (41). Typically, the ideal conditioning parameter is much smaller for this geometry than for the case of a long amplifying undulator with no chicane, labelled here as the "matched" value of κ. In the 50 nm example, the optimum is, essentially, an unconditioned beam. Even in the 1.04 nm example, optimizing the conditioning parameter yields only an 8% improvement in output power, as compared with the unconditioned case.   Figures 5 and 6 show the dependence of FEL output on the strength of the undulator magnets, which determines the detuning. The agreement between theory and simulations only falters for the 1.04 nm case, when the magnetic fields are tuned below the resonant value, as shown in Figure 6. In this case, the simulations yield about 5 MW more power than the analytic theory predicts. In the optimally tuned case, this is a reasonable value for the power that is emitted into higher-order transverse modes. Far from resonance, the analytic theory predicts very lit-tle power while, in the simulations using GENESIS, there is still roughly 5 MW of power. However, this power is in the form of higher-order transverse modes, with values of M 2 ∼ 10. This radiation is generated by particles having large transverse amplitude, which also move forward more slowly. When the magnetic field is too high, these higher-order modes do not appear, because there are no particles moving fast enough to be in resonance. For earlier stages which are not emittance-limited, the analytic calculations are in much closer agreement with numerical simulations.
Another source of error is the nonlinearity of the interaction, where the FEL instability, or trapping, may lead to an underestimate of the output power. The importance of the FEL instability can be checked by performing simulations with reduced electron beam current, thus assuring that the total length of the system is much less than an FEL gain length. For example, in the 1.04 nm case, simulations at low current would scale to a total output power of 38.9 MW at 500 A, demonstrating that the FEL gain is not a significant effect. However, for larger values of the applied energy modulation, nonlinear effects are very important for reducing phase slippage and maintaining a large bunching parameter. The low-gain approximation does not require that the electron beam be unaffected by the FEL interaction. Rather, there are three steps to the FEL instability: the radiation field modulates the electron beam, which then generates bunching as the energy modulation causes a variation in phase slippage, which, in turn, enhances the power channeled into the radiation field. Thus, even if the energy modulation of the electron beam at the end of the undulator is much larger than, for example, the original energy spread, these calculations can still be essentially valid. The energy modulation only need be taken into account when the phase slippage induced by the modulation alters the bunching parameter from what it would be in the free-streaming case; this can be a slow process, and the relevant scale is the gain length. For example, in Figure 7, plots of the longitudinal phase space of the beam are shown for the end of the 50 nm FEL example, both for the low-current limit and for the nominal current of 500 A. The energy modulation due to self-interactions drastically alters the phase space distri-bution, but, because this modulation yields only a small change in phase over the 2.4 m of the undulator, the radiation produced is not altered substantially by this effect.
It should also be noted that the geometry considered here for each stage of harmonic generation is an oversimplification. A more typical geometry will alter the predicted output radiation in complex ways. For example, the modulation of the electron beam was assumed to be independent of transverse coordinates, while, in practice, the energy modulation will be less effective for particles that are located off-axis.

VI. CONCLUSIONS
In this paper, we have proposed and provided strong support for a trial function method which predicts the FEL radiation output in the low-gain regime. This method has been used to approximate the radiation output of a harmonic generation FEL system as a coherent Gaussian mode. Various assumptions have been made in order to perform the specific calculations presented in this paper. We approximate the laser seed and output as monochromatic beams. The electron beam has been taken to be matched to the undulator without external focusing, where the undulator is designed for equal focusing in both planes. The transverse emittances have also been taken to be equal. Shot noise in the current density has been neglected. The undulator is assumed to operate in the low-gain regime, specifically, the total length of the undulator must be smaller than a gain length; as long as this assumption is true, the method considered here is valid, even if the energy modulation generated through self-interactions is, itself, large.
The power transferred to a given spatial mode is determined by Eq. (17), with G(x, y, s) being the structure of the expected laser output mode. This leads to the definition of a generalized bunching parameter. We find that, for expected parameter ranges, so long as the FEL is not operating far beyond the emittance limit, the output power can be described reasonably well as a single Gaussian mode, after optimizing the mode parameters for maximum output power.
Analytic calculations show detailed quantitative agreement with time-independent simulations using GENE-SIS. Errors are related to the presence of higher-order modes and the corresponding reduction in transverse coherence. The apparent location of the laser waist for emittance-limited beams tends to lie outside of the beginning of the undulator, and this is shown to be due to the typical beam property that κ x = κ y = 0. Optimization of this energy-amplitude correlation would set the beam waist at the midpoint of undulator; however, generating such correlations would be challenging and the total output power is only slightly improved for typical parameters. When higher-order modes are taken into account, simulation results place the laser waist just inside of the undulator.
We plan to extend this formalism to more general electron beam parameters including external focusing and elliptical beams, and to a more realistic model for the electron beam modulation process. This method can also be extended to calculate higher-order modes of the output radiation.