Focusing properties of linear undulators

This paper investigates the focusing properties of linear magnetic undulators, i.e., devices characterized by weak defocusing properties in the horizontal (wiggling) plane and strongly focusing in the vertical plane. The problem of identifying the conditions that ensure the existence of the electron beam eigenstates in the undulator lattice for a given working point of electron beam energy Eb and resonant wavelengthr is studied. For any given undulator lattice, a bandlike structure is identified defining regions in the ðEb ;� rÞ plane where no periodic matching condition can be found, i.e., it is not possible to transport the electron beam so that optical functions are periodic at lattice boundaries. Some specific cases are discussed for the SPARC FEL undulator. I. INTRODUCTION Pure permanent magnet (PPM) undulators are imple- mented in single pass free-electron lasers (FEL) as inser- tion devices featuring a magnetostatic periodic (sinusoidal) field in the longitudinal (z) direction. The transverse magnetic field ensures coupling between the transverse wiggling motion of electrons and the transverse field of the amplified optical wave. The FEL power gain length, i.e., the exponential growth folding length, is Lg ¼ � u=ð4�� ffiffiffi p Þ, where � u is the undulator period andis the Pierce parameter (1-3), proportional to the cubic root of the current density. An FEL amplifier operating in self- amplified spontaneous emission has a saturation length Ls � 18-20Lg. We typically have Ls ranging from few meters in long wavelength (visible to near UV) devices, up to several tens of meters, in hard x-ray FEL amplifiers. The optimization process of the FEL parameters has to take into consideration the focusing properties of the undulator and the design of the electron transport lattice over the undulator length, in order to optimize the transverse beam size and maximize the current density, reducing therefore the gain length. The transport lattice of FEL amplifiers operating with high energy beams, as typical soft to hard x-ray sources (4-7), is based on a focusing-drift- defocusing-drift (FODO) scheme, alternated to a seg- mented undulator (8). The effect of a (linear) undulator is that of introducing a small perturbation to the FODO: a weak focusing in the vertical plane and a negligible effect in the horizontal plane. At lower beam energies, i.e., for FEL amplifiers operating at longer wavelengths from vis- ible to UV, the role of the undulator focusing becomes


I. INTRODUCTION
Pure permanent magnet (PPM) undulators are implemented in single pass free-electron lasers (FEL) as insertion devices featuring a magnetostatic periodic (sinusoidal) field in the longitudinal (z) direction. The transverse magnetic field ensures coupling between the transverse wiggling motion of electrons and the transverse field of the amplified optical wave. The FEL power gain length, i.e., the exponential growth folding length, is L g ¼ u =ð4 ffiffiffi 3 p Þ, where u is the undulator period and is the Pierce parameter [1][2][3], proportional to the cubic root of the current density. An FEL amplifier operating in selfamplified spontaneous emission has a saturation length L s $ 18-20L g . We typically have L s ranging from few meters in long wavelength (visible to near UV) devices, up to several tens of meters, in hard x-ray FEL amplifiers. The optimization process of the FEL parameters has to take into consideration the focusing properties of the undulator and the design of the electron transport lattice over the undulator length, in order to optimize the transverse beam size and maximize the current density, reducing therefore the gain length. The transport lattice of FEL amplifiers operating with high energy beams, as typical soft to hard x-ray sources [4][5][6][7], is based on a focusing-driftdefocusing-drift (FODO) scheme, alternated to a segmented undulator [8]. The effect of a (linear) undulator is that of introducing a small perturbation to the FODO: a weak focusing in the vertical plane and a negligible effect in the horizontal plane. At lower beam energies, i.e., for FEL amplifiers operating at longer wavelengths from visible to UV, the role of the undulator focusing becomes dominant in the vertical direction and the undulator itself may play the role of the focusing element in the FODO lattice [9,10]. In this paper we analyze this specific regime, taking as a reference the lattice properties of the SPARC beam line, where this mode of operation introduces a link between the transport optics and the operation wavelength, both depending on the beam energy and undulator gap.
The layout of the SPARC FEL, downward the accelerator, is shown in Fig. 1. The variable gap undulator [11], divided into six identical sections separated by quadrupoles/correctors, follows a transfer line, equipped with two triplets of quadrupoles with the purpose of achieving a matching condition of the beam Twiss parameters at the entrance of the undulator. The undulators are variable gap devices and configurations using different gaps in the undulator line have been used in cascaded FEL experiments [12], to tune the resonance of part of the elements to the second harmonic of the previous ones, but for the purposes of this analysis we will assume that all the undulators are all tuned at the same resonant wavelength (gap).
The matching condition at the undulator entrance consists in imposing periodical conditions to the propagation of the Twiss parameters over the distance spanned by the single undulator + quadrupole unit, including any drift between the two devices, up to the leading edge of the next undulator section. Therefore, matching the beam in the transfer line essentially means to realize at the leading edge of the unit an eigenstate of the corresponding Twiss transport matrix associated to the eigenvalue ¼ 1. All the following sections will be matched accordingly, in the sense that the optical functions will be periodic from that point onwards with period equal to the length of the unit lattice.
While the (3 Â 3) Twiss matrix corresponding to any physical device invariably admits the real eigenvalue ¼ 1 [see (8) below], the corresponding Twiss coefficient eigenstates ð x;y ; x;y ; x;y Þ (up to multiplicative constants) do not necessarily describe a physical beam. Moreover, since a (linear) magnetic undulator has different optical properties in vertical and horizontal directions (as shown in the Appendix), it may be impossible, once the resonant wavelength r ðg; Þ has been set, to arrange the quadrupole to obtain eigenstates of the Twiss transport matrix describing physical beams in both vertical and horizontal directions. There are situations where the periodicity condition on both planes cannot be met, leading to an orbit which is not stable in one direction. An unstable orbit can still be propagated through a finite length undulator beam line, but the instability leads to a growth of the beam size and generally to some increase of the FEL gain length. Because of the dependence of the undulator focusing properties on the wavelength, the condition of stability of the orbit introduces prohibited band gaps in the FEL emission spectrum at a given beam energy. In what follows we have analyzed the conditions for achieving a stable, i.e. matched orbit, in both directions, and the dependence of this condition on the FEL resonant wavelength, with a general digression and some examples of real experimental situations.

II. MATCHING CONDITIONS IN A PPM LINEAR UNDULATOR
With the main purpose of establishing a common notation, we recall few elements of linear beam dynamics [8,13]. The motion of a particle in the phase space is described in matrix formulation by uðzÞ u 0 ðzÞ where ðC u ; C 0 u ; S u ; S 0 u Þ are generic functions of the longitudinal coordinate depending on the elements of the beam line. The matrix permits a detailed ray tracing of any given particle through the accelerator. It is the product of the matrices composing the sequence of devices: Each of the matrices M (and their chain product accordingly) fulfills the following condition: It is easily seen that the same property applies to the whole matrix M u in (1). The previous property, together with the Liouville theorem, allows one show that the time evolution of the rms matrix describing the beam envelope is given by where b AE 0 represents the initial state. Normalized emittance AE is a real, symmetric, nonsingular matrix). A consequence of (2) and (3) is that emittance is a conserved quantity. The rms matrix can be cast in the form so that the Twiss coefficients u , u , and u are constrained by the condition N ð u ; u ; u Þ ¼ 1; where by definition A consequence of (4) is that u u and u u represent the variance of u and u 0 , respectively-two strictly positive quantities-so u and u must be strictly positive as well. Quantity u expresses instead the correlation between u and u 0 in the phase pace. It is easily shown that evolution of Twiss coefficients is governed by the following expression: where Layout of SPARC transfer line (quads Q 1 ! Q 6 ) and undulator (quads Q 7 ! Q 11 þ undulator sections UM 1 ! UM 6 ) of SPARC experiment. The S's tag the positions of imaging screens, the 's measure the distance from photocathode.
The eigenvector associated to 1 ¼ 1 is obviously the candidate whenever one wants to leave optical functions , , unchanged at the exit of a device. The eigenvector corresponding to unit eigenvalue is up to a real multiplicative constant r to be found to enforce condition (6). For example, one can set this multiplicative constant to where is the rescaled eigenvector. The choice (10) has the merit to force u to the positive value Note, however, that choice (10) merely ensures that The last result deserves a few comments: there is no warranty that the eigenvector associated to the eigenvalue 1 ¼ 1 fulfills the Twiss condition (6). Consider the case, for example, that Since rescaling of the eigenvector by any constant r amounts to multiply v 1 v 3 or v 1 v 3 À v 2 2 by r 2 , there is no chance to make u and u to represent both strictly positive quantities (the product u u ¼ r 2 v 1 v 3 0 remains negative), or u u À 2 u ¼ r 2 ð u u À 2 u Þ to become positive. These conditions [i.e. N ðvÞ 0] signal that an eigenvector associated to eigenvalue 1 ¼ 1 exists, but it cannot be rescaled to represent any physical beam. An apodictic-and limit-case is that of drift, for which the Twiss matrix reads In this case the Twiss form N ðvÞ is identically zero. Trivial considerations confirm that the only eigenstate is obviously that of a beam with no slope dispersion ( u ¼ 0). Periodic conditions must be fulfilled simultaneously in vertical and horizontal directions. The focusing/defocusing properties of the quadrupole following the undulator section are determined by a single parameter (the current value), and it may well happen that for any given current permissible in the range of the device, the condition discussed above (the eigenstate is physical) applies to one of the two directions only (see Fig. 2). Consider, in this regard, a lattice unit composed (as for SPARC FEL) by an undulator section, a drift, a quadrupole, and another drift up to the leading edge of the following section.
A rough estimation of the current limits for which physical eigenstates for such a device exist can be found in the horizontal direction, by assuming that the undulator behaves as a drift. It is easily shown-quite expectedlythat no physical eigenstates may exist if the quadrupole is defocusing horizontally. In this case in Twiss form for the horizontal eigenstate reads indeed which is negative by inspection. In Eq. (13) Q is the quadrupole strength, L Q its length, L U , L D 1 , L D 2 the lengths of the undulator, the drift between the undulator and the quadrupole, and the drift between the quadrupole to the leading edge of the next undulator section. If the convention is adopted that the current I Q is positive when the quadrupole is vertically focusing, this means that physical horizontal eigenstates may only exist for I Q < 0.
In this case it can be shown that the Twiss form reads instead The Twiss condition (6) can be realized provided that expression (14) is positive. If the condition L Q ffiffiffiffiffiffi ffi Q p ( 1 holds, and fulfillment of condition N x ðvÞ ! 0 is equivalent to We also have where f is the focal length of the quadrupole, the calibration constant yielding the integrated gradient per unit current. Equation (16) The value corresponding to (17) is signaled in Fig. 2 by the blue dashed vertical line. Since the value is very close to that corresponding to the transition from unphysical to physical eigenstates, the approximation used proves fairly accurate. It can be shown that when the current of the quadrupole approaches zero from negative values the horizontal eigenstate (normalized in the Twiss sense) approaches (12) (up to a multiplicative constant) as follows: s and the optical functions x clearly diverge.
The case for the vertical direction is more complicated. We recalled in the Appendix the focusing properties of a linear undulator, which can be approximated to a thick focusing quadrupole of strength y % 2ð K u Þ 2 . The existence of a physical vertical eigenstate compatible with (17) (i.e. consistent with the condition that ÀI ðmaxÞ Q < I Q 0), must be studied numerically. By calculating then the overall matrix governing the propagation of the beam through the lattice unit and exploiting the equation (9) to obtain the components of the (unnormalized) eigenvector, one gets for the Twiss form (6) the following expression: where Positive current I Q means that the quadrupole is focusing in the vertical direction. Matching is possible whenever À 2 ¼ þ1 in both directions. No such interval exists in the first case, while in the latter the situation is reversed.
The nonlinear dependence on Q in Eq. (20) discourages a comprehensive analytical study of N y 's sign. Nevertheless, some understanding of its general behavior can be obtained by studying the particular case in which the undulator's Twiss matrix equals the identity: implying that where the sign þðÀÞ applies for even (odd). Insertion of (23) in (20) yields The formula (25) could easily be inferred from Eq. (13) by setting L U ¼ 0. In fact the undulator can be expunged completely according to (22), and one is left [exactly as in (13)] with a defocusing quadrupole between two drifts, except for the fact that the length of the first is L D 1 instead of L D 1 þ L U . The Twiss norm (25) is always negative. It reaches its maximum value (as a function of Q ) at Q ¼ 0, where it cancels (N max;y ¼ 0), which implies that no matching is possible whatever is Q . A deeper understanding of this condition can be obtained by changing the right-hand side of (22) by a tiny amount : which can be recast in the more suggestive form A simple calculation allows one to prove that As N max;y vanishes whenever U fulfills (22) with positive derivative (see the oblique dashed lines in the upper plot of Fig. 3 below), there must exist a region on the left (respectively, right) of the zero in which the function is negative (respectively, positive). Continuity implies that at least another zero must exist between U ¼ ð L U Þ 2 and U ¼ ð þ1 L U Þ 2 . In Fig. 3 the eigenstate's maximum Twiss norm (as a function of Q ) is displayed as a function of U;y (upper plot). The solid line spans over the same gap interval as in the lower plot, which is valid only for the same beam energy as in Fig. 2. In both graphs, however, the relevant information is the sign of N max . From the plot of N max vs g it is clear, for example, that no physical vertical eigenstate exists for 9:83 mm & g & 11:21 mm. The plot of N max vs U;y , on the other hand, although at the price of more abstraction, is universal, for it applies equally well to any combination of parameters conspiring to build up the same value of U;y . For example, the upper plot (including the dashed part) spans over the very same gap interval of the lower plot for a beam of energy decreased, e.g., by a factor 2.5 ( % 82). The above constraint on g, in fact, may be cast in terms of U;y to include other zeros of N max :  where (for SPARC undulator layout) ð1Þ U;y % 1:53, ð2Þ U;y ¼ ð=L U Þ 2 % 2:11, ð3Þ U;y % 6:23, ð4Þ U;y ¼ ð2=L U Þ 2 % 8:43,  U;y % 14:33, ð6Þ U;y ¼ ð3=L U Þ 2 % 18:97. It is worth noting that in both plots of Fig. 3 N max;y seems to be stuck to the value N max;y ¼ 4 for wide intervals of the variable in abscissa. This behavior is easily understood by observing that the Twiss norm of the unnormalized eigenstate [see (9)] may be cast as after imposing condition (2). The regions in Fig. 3 for which N max;y ¼ 4 correspond to the cases where, for a given value of U;y , the current of the quadrupole (i.e. Q ) maximizing N y falls within the interval in Eq. (17) A more suggestive form for constraints (29) is obtained by casting the undulator strength parameter K in terms of the resonant wavelength r and the beam energy , which yields U;y ¼ 4 2 2 2 r À U 2 3 U : Equation (30) can be used to express the resonant wavelength vs beam energy corresponding to a given value U;y . The curves in Fig. 4 plot r as a function of beam energy for U;y ¼ ðiÞ U;y , where ðiÞ U;y are the zeros of N max . The shaded regions delimit the bandlike forbidden zones where no physical vertical eigenstates can be realized with a single defocusing quadrupole. It is worth remarking that an undulator mainly designed to function in the lowermost region of the plane ð r ; E b Þ can be steadily operated at considerably larger wavelengths choosing in a different region a working point resulting from a judicious compromise between beam energy reduction and gain. However, since the general behavior of eigenstates is modified jumping from one allowed region to the other (see Fig. 5 below), other practical aspects (mainly sensitivity to magnetic errors) of the undulator that might hinder a stable operation should be taken into account. In the shaded regions it is impossible to realize physical vertical eigenstates with a single defocusing quadrupole. The black lines correspond to curves where the gap has been kept fixed to g ¼ 8:2 mm (dashed), g ¼ 11:5 mm (dash-dotted), and g ¼ 20 mm (dotted), respectively. Bottom: the same as in the upper plot, zoomed to a region relevant for SPARC operation. The asterisks refer to the cases described in Fig. 2. FIG. 5. Top: merit functionals for undulator eigenstates corresponding to the quadrupole current (in abscissa) for a beam energy of 105 MeV ( % 205) and gap values g ¼ 11:944 mm ( r ¼ 700 nm). Blue, magenta, orange, and red curves correspond to functionals (31)-(33), respectively; 2 nd ! 3 rd row: optical functions x (blue) and y (magenta) for eigenstates corresponding to the minima of 2 functionals (31) and (32) (the crosses atop blue and magenta curves in the top plot).

III. OPTIMIZATION OF FEL PERFORMANCES
Optimization of FEL performances can be achieved by identifying the value of quadrupole current downward the undulator which corresponds to an extreme (usually a minimum) of a suitably defined merit functional. Some possible choices are The dependence of functionals (31)-(34) on the quadrupole current are plotted in Fig. 5 (top graph) for a ðE b ; r Þ pair belonging to the lowest allowed band. The crosses tagging the minima identify the eigenvectors optimizing the beam parameters. Functionals (31) and (33), for example, are designed to minimize the average cross section of the electron beam, functional (32) is designed to obtain a round beam, and functional (34) is a compromise between size and roundness. Not surprisingly, the minima of functionals (31) and (33) are systematically close to each other, and so the minima of functionals (32) and (34). Moreover, it is worth noting that the general behavior of the vertical eigenstates depends on the allowed band to which they belong. In Fig. 6 the horizontal and vertical 's are shown for three different set points chosen in the 1st (lowest), 2nd, and 3rd band. While the features of horizontal pattern remain substantially unchanged, the vertical eigenstate exhibits a number of maxima equal to the order of the band, defined by the parameter in Eqs. (22) and (26), associated to the number of betatron periods of the orbit in a single undulator module.

IV. CONCLUSIONS
In this paper the focusing properties of linear undulators have been discussed, along with the analytical conditions to be fulfilled for transporting the beam through the periodic lattice of the undulator's sections. It has been shown that bandlike forbidden zones can be identified in the plane ðE b ; r Þ of resonant wavelengths vs electron beam energy, where no physical eigenstates can be realized simultaneously in both transverse directions, in the considered elementary lattice unit. In the specific case of SPARC, the undulator originally designed to function in the visible-UV region of the spectrum, in the lowermost region of the plane ð r ; E b Þ in the diagram in Fig. 4, can be also operated in the near infrared by a proper choice of beam energy and undulator gap, an option previously not considered.

APPENDIX: PPM LINEAR UNDULATOR FIELD
Pure permanent magnet (PPM) undulators are insertion devices featuring a magnetostatic field periodic (sinusoidal) in the longitudinal (z) direction. Many schemes are possible, reflecting different polarizations of the main field, and consequently different focusing properties [14]. In this paper we shall focus on one of several different forms implicitly reflecting essential features of the SPARC [15] undulator, for which the field is (i) mainly oriented along one of the two transverse directions (y) and (ii) essentially decoupled along the other (x). For what concerns only the optics of the beam, linear undulators are devices slightly defocusing in the horizontal (wiggling) plane, and strongly focusing in the vertical (main field) direction. It can be shown that such a device yields a field with the following components: FIG. 6. Characteristic behavior of horizontal (continuous line) and vertical eigenstates (dashed line) belonging to 1st to 3rd allowed region in Fig. 4 (top to bottom). The 's correspond to optimum according to merit functional (34). While the horizontal pattern remains substantially unchanged, the vertical eigenstate exhibits a number of peaks equal to the order of the allowed band to which it belongs.