Analysis and optimization of a free-electron laser with an irregular waveguide

Using a time-dependent approach the analysis and optimization of a planar FEL-amplifier with an axial magnetic field and an irregular waveguide is performed. By applying methods of nonlinear dynamics three-dimensional equations of motion and the excitation equation are partly integrated in an analytical way. As a result, a self-consistent reduced model of the FEL is built in special phase space. The reduced model is the generalization of the Colson-Bonifacio model and takes into account the intricate dynamics of electrons in the pump magnetic field and the intramode scattering in the irregular waveguide. The reduced model and concepts of evolutionary computation are used to find optimal waveguide profiles. The numerical simulation of the original non-simplified model is performed to check the effectiveness of found optimal profiles. The FEL parameters are chosen to be close to the parameters of the experiment (S. Cheng et al. IEEE Trans. Plasma Sci. 1996, vol. 24, p. 750), in which a sheet electron beam with the moderate thickness interacts with the TE01 mode of a rectangular waveguide. The results strongly indicate that one can improve the efficiency by a factor of five or six if the FEL operates in the magnetoresonance regime and if the irregular waveguide with the optimized profile is used.


I. INTRODUCTION
The recent progress in the theory and experiment of free-electron lasers (FELs) and gyrotrons [1,2] with Bragg cavities is strongly indicative that the application of novel electrodynamical structures provides the opportunity to realize unique properties of FELs to a large measure. For example, Bragg cavities, which are periodic arrays of varying dielectric or metallic structures, stimulate interest in traditional microwave applications because they can be built oversized (quasioptical) and, therefore, employed at higher frequencies and higher power. At the same time the investigation of traveling wave tubes (TWT) [3] shows that the TWT efficiency based on a regular (along the interaction region) electrodynamical structure is far from its possible maximal value. In fact, the difference between the cold phase velocity and the average velocity of the beam is the control parameter of the beam-wave interaction. By changing this parameter along the interaction region one can control the beam bunching and the energy transfer between bunches and microwaves. The local variation of the cold phase velocity along the region depends on the local variation in the waveguide profile. Then, in an effort to control the beam-wave interaction and improve the efficiency one should use irregular electrodynamic structures. Specifically, the combination of Bragg reflectors [4] and the section of an irregular waveguide seems to be a promising electrodynamic structure for a high-efficiency powerful FEL. The analysis of a planar FEL-amplifier with an axial magnetic field and an irregular waveguide is the topic of the present paper. I focus my attention on this FEL configuration because it is well known that through the use of the axial magnetic field one can substantially improve the efficiency, as the cyclotron frequency tends to the undulator frequency [5].
It is worth noting that in vacuum electronic sources of coherent radiation the electron beams are far from the statistical equilibrium and during their interaction with radiation they remain sufficiently nonequilibrium because of the large free length [6,7]. Thus, the efficiency of the transfer of the electrons' kinetic energy into radiation, basically, may be close to 100% (the klystron or traveling wave tube are the examples of high-efficiency devices) and the challenge is to optimize the beam-wave interaction by controlling the most important parameters. There are several ways to improve the FEL efficiency: optimization of electron beam characteristics (for example, development of beams with the optimal distribution of the axial velocity across a beam when the effect of beam finite thickness is relevant), tapering of the undulator or the axial magnetic field, profiling of waveguide/resonantor walls. In particular, the effectiveness and reliability of the undulator tapering were demonstrated theoretically [8,9] and confirmed experimentally to a great advantage. In the experiment [10] the saturated power of 180 MW (6% efficiency) has been increased to 1.0 GW (34% efficiency) by optimizing the wiggler profile in such a way that the beam-wave resonance condition remains fulfilled for many electrons, as the electrons lose their energy. The numerical simulation mentioned in [10] indicates that one can trap about 75% of the electron beam and reduce its energy by about 45%. A high effectiveness of the undulator tapering was also demonstrated for a FEL with an axial guide mag-netic field [11] (the maximum efficiency was increased by almost 700% as compared to the untapered configuration). At the same time there exist cases where the convenient undulator profiling cannot be used or ensure desired enhancement. In particular, if the waveguide backward mode is used as an electromagnetic undulator, then, clearly, one has to change electrodynamic structure characteristics to control electromagnetic undulator parameters. The optimization of the electromagnetic structure also seems to be more efficient than the undulator profiling if the effect of the electron beam finite thickness is relevant. Indeed, given the FEL amplifier operates with Group II orbit parameters, a negative masslike effect occurs [12] in which the electrons are axially accelerated, as they lose energy to the wave. Hence, the electrons must be decelerated to maintain the beam-wave resonance. This is accomplished by an upward taper in the undulator field [11]. At the same time, the electrons with different initial transverse positions are exposed to the action of different magnitudes of the pump magnetic field. As a result, the average velocity of the electron depends on its initial transverse position, and different beam layers have different detunings with the wave because the average velocity of the electron governs the initial detuning. If the undulator field is tapered 'up', then the detuning of external layers of a thick beam increases and the contribution of these layer to the total efficiency shows a certain decrease. In the present paper I demonstrate that one can effectively suppress layering and the saturation efficiency effect by using the optimized profiled waveguide. I believe this technique to be useful for the development of powerful thick-beam FELs (for example the FEM experiments [13] on generation and transport of two intense beams have been performed of late: 0.8 MeV electron energy, current densities of up to 1.5 kA/cm 2 , 0.4 × 7.0 cm 2 beam cross sections). This paper is structured as follows: in Sec. II the problem statement for the planar FEL-amplifier with the axial magnetic field and the irregular waveguide is defined. The integrals of motion for a test electron in the pump magnetic field are constructed in Sec. III. With these integrals and the method of nonlinear resonance the FEL reduced model is derived in Sec. IV. In the following section the principle of the beam-wave control are considered and a practical example of the optimized FEL is given. The obtained results are discussed in Summary, and, finally, the wave interaction in the irregular waveguide is examined in Appendices A and B.

II. THE THEORETICAL MODEL
Let a sheet relativistic electron beam be injected into an irregular waveguide located in the external pump magnetic field that consists of the magnetic field of a linearly polarized (planar) undulator and a uniform axial magnetic field (see Fig. 1). The pump magnetic field is given by the vector-potential: Here B is the uniform axial guide field, B u is the magnitude of the planar undulator field [14], k u = 2π/λ u and λ u are the wave number and the period of the undulator, respectively. In numerical simulations we model the injection of the electron beam into the interaction region by allowing the undulator amplitude to increase adiabatically from zero to a constant level over N u undulator periods [15]. The unmodulated electron beam enters the interaction region, z ∈ [0, L], with average longitudinal velocity V . The irregular waveguide boundaries are set by expressions: x = ±a/2 and y = ±w(z)/2 (a ≫ w), where w(z) describes the varying distance between two wide walls of the waveguide, and w ′ (0) = w ′ (L) = 0. Let the FEL-amplifier be seeded by the TE 01 mode, which is resonant (synchronous) with the electron beam, the mode frequency and the amplitude at the input into the interaction region (z = 0) equaling ω and V 0 , respectively. We consider that the interaction region is ideally matched to the regular output waveguide at the section z = L.
Since the narrow walls are profiled, y = ±w(z)/2, one can apply the local Fourier-series expansion [16] over y to derive the coupled set of equations governing the evolution of TE nm and TM nm modes (subscripts n and m correspond to the field variation along the wide and narrow walls, respectively). Modes with odd TE n,odd , TM n,odd and even TE n,even , TM n,even variations are not coupled because of the waveguide symmetry with respect to xzplane. We will hold that λ > 2w(z)/3, and the TE 0m modes for m > 3 are then evanescent and the scattering of the seed TE 01 mode to those modes will be neglected. We also ignore the electron beam mode generation. Under this assumptions the evolution of the signal TE 01 mode is governed by the x-component of vector-potential A s x : Here V (z, t) is the slow-in-time amplitude satisfying the where is the wave number squared, v gr (z, ω) = (dk z /dω) −1 is the group velocity, c is the speed of light and S = a × b.
The boundary conditions read The microscopic current density is given by the following sum over electron trajectories, [15]: where I 0 is the beam current at the input into the interaction region; S b = X b Y b is the cross sectional area of the beam; p(z; r ⊥0 , t e ) and r ⊥ (z; r ⊥0 , t e ) are the mechanical momentum and the transverse coordinate, respectively; t(z; r ⊥0 , t e ) is the arrival time of an electron at the position z; t e and r ⊥0 = r ⊥0 (x 0 , y 0 ) are the entrance time and the transverse coordinates, which the electron has at the input of the interaction region. The sheet electron beam is lying from x 0 = −X b /2 to x 0 = X b /2 and from y 0 = −Y b /2 to y 0 = Y b /2 in the x and y directions, respectively. Since the relativistic electron-wave interaction is being studied, the nonradiated fields (space-charge fields) are supposed to be negligible. The relativistic effects result in that the force f m caused by the nonradiated magnetic field partially suppresses the defocusing action of the transversal part of the force f  caused by the rotational part of the nonradiated electric field (see [17] for details).
The motion of a typical electron within the electron beam can be described by the relativistic Hamiltonian Here e and m e are the electron charge and rest mass, respectively; the canonical momentum P is related to the mechanical momentum p by P = p + (e/c)( A p + A s ). The initial conditions for the mechanical momentum and coordinates read: where E is the initial energy of the electron entering the interaction region at the time t e . The excitation equation (3) along with the expression for the current density (5) and the equations of motion generated by the Hamiltonian (6) describe the electron-wave interaction in the studied FEL in a self-consistent way. In the selfconsistent models the main mathematical obstructions are due to the nonlinear character of the equations of motion, and in order to perform the analytical treatment of the FEL we first have to integrate the equations of motion generated by the Hamiltonian (6). For the purpose of subsequent analysis, it is convenient to rewrite the Eq. (6) as H( r, P , t) = H2 ( r, P ) + W ( r, P , t), whereH describes the dynamics of a typical electron in the pump magnetic field and the ponderomotive perturbation reads We start our analysis with the integration of the equation of motion generated by the unperturbed Hamiltonian (9). The above integration is the nontrivial problem because the nonlinear dynamical system (9) is not globally integrable [18] and exhibits chaotic behavior if the absolute value of the difference between the normal undulator and normal cyclotron frequencies is less than the betatron frequency [17]. The dynamics of electrons in an ideal undulator and an axial magnetic field was studied in details in Ref. [17] using Lindshtedt's perturbation method in configuration space. This allowed one to build a linear microwave theory and analyze the electron-wave interaction in the magnetoresonance regime. However, to build the nonlinear theory we have to study the behaviour of a test electron in the pump magnetic field in a more specific way. In the next section we build the approximate solution for (9) by means of the superconvergence method in action-angle variable space and derives the explicit analytical expressions for the region location of chaotic dynamics in the parameter space.

A. Action-angle variables formulation
In order to apply the perturbation method to the nonlinear system with the Hamiltonian (9) the latter is divided into a nonperturbed (integrable) part that corresponds to the electron motion in the axial homogeneous magnetic field and a small perturbation caused by the undulator magnetic field. Based on the nonperturbed system (the undulator field is absent B u = 0) we can introduce the action-angle variables: the initial conditions take the following form: where β = V /c, ω c = |e|cB /E and ω u = k u V are the partial cyclotron and undulator frequencies, respectively; is the betatron frequency. The electron motion described by the Hamiltonian Eq. (9) is characterized by two degrees of freedom, namely, by undulator (subscript u) and cyclotron (subscript c) degrees of freedom. The transverse inhomogeneous of the realistic undulator field does not lead to the appearance of the additional betatron degree of freedom, but only modifies the undulator and cyclotron motion. For instance, if ω β , ω c ≪ ω u then the undulator and cyclotron frequencies of coupled nonlinear Note that in purely undulator field (B = 0) the undulator and betatron degrees of freedom become split and the dimension of the dynamical system is also equal to two [19]. Using (11) and some algebra we may rewrite (9) as Here ε V ( I, ϑ) is the nonintegrable undulator perturbation where for odd values of m the coefficient V n,m is and for even values of m the coefficient V n,m is , δ m,n is the Kronecker delta, I n (x) is the modified Bessel function of the first kind of order n. The equations of motion read: The equation set (15) has a lot of internal nonlinear resonances (ϑ u ≈ ±mϑ c , 2ϑ u ≈ ±mϑ c ) between the undulator and cyclotron degrees of freedom. Actually, the successive iterations give in the zero approximation . One can check that the first approximation leads to ϑ (1) , I (1) ∝ e i(nωu±mωc)t /(nω u ± mω c ). As a result, the close is nω u ± mω c to zero, the more perturbed dynamics is. Applying the nonlinear resonance technique to (15) and analyzing each internal nonlinear resonance separately we can show that I c ∝ √ ε in the vicinity of the resonance. Using this estimation we can compare the levels of the dominance of different resonances (ε ≪ 1, It will be further shown that if ε and y 0 exceed some thresholds, then there exist regions of chaotic dynamics of the test electron in the phase space. These regions of the phase space correspond to the regions of the nonlinear resonances between degrees of freedom. The most important resonances, in the vicinity of which the onset of the chaos can occur, are ϑ u ≈ ϑ c , ϑ u ≈ 2ϑ c and ϑ u ≈ 3ϑ c (see Fig. 2, 3).

B. Superconvergent method
An efficient method for analytical treatment of Hamiltonian systems is the application of canonical transformations to a Hamiltonian [20], [21], [22]. Then we seek for canonical transformations to new dynamical variables such that a new HamiltonianH ′ is a function of action variables only. Therefore, new actions become integrals of motion. According to the superconvergence method [22] we choose successive canonical transformation ( I, ϑ) → ( I 1 , ϑ 1 ) → ( I 2 , ϑ 2 ) → . . . ( Ī , θ ) in such a way that every next perturbation becomes the order of the square of the preceding one: εV → ε 2 V 1 → ε 4 V 2 → . . . ε 2 n V n . After two successive canonical transformations the Hamiltonian takes the form: Here ∆ u = k u cĪ u /(β E) and ∆ c = k u cĪ c /(β E) are the dimensionless integrals of motion with an accuracy O(ε 2 ), σ 0 = ω c /ω u . The oscillation frequencies are: The velocity components that are needed in the sequel are expressed in terms of the action-angle variables as Here p = EV /c 2 andp = p Ω u /(k u V ) are the initial and average axial momenta. We have taken account of the first non-vanishing corrections only. To complete the study we have to determine the approximate adiabatic invariants ∆ u and ∆ c . Using the relations between old and new variables via the generating functions and initial conditions (12) one obtains the set of equations with respect to unknown ∆ u and ∆ c . This set has the bulky form, and we did not write it here. Instead of this it is convenient to introduce two new auxiliary functions κ and σ such that: where κ and σ satisfied the set of equations: Then the frequencies (18) are expressed in terms of unknown constants κ and σ in a simple way: The average axial momentum and velocity prove to be equalp = κp andv = κV . Recall that ε = √ 2ω β /ω u and σ 0 = ω c /ω u .
Let us find the approximate solution to equation set (21). For further analysis let us assume that κ ∼ 1 and σ ∼ σ 0 . Then, in case of σ 0 ≪ 1 and σ 0 ≫ 1 we may take κ = 1 and σ 0 in the right-hand sides of Eqs. (21) to obtain the explicit solution. To consider the case σ 0 ∼ 1 we introduce a new small magnitude µ = κ − σ, µ ≪ κ. Neglecting µ in such expressions (µ + κ) we get the cubic equation with respect to µ: where (23) shows that D(ε, σ 0 , y 0 ) < 0 in the region σ 0 < σ crit1 0 , and D(ε, σ 0 , y 0 ) > 0 in the region σ 0 > σ crit1 0 . The quantity σ crit1 0 (ε, y 0 ) is the solution to equation D(ε, σ 0 , y 0 ) = 0 and equals: In the region σ 0 < σ crit1 0 the solution of equation (23) has the following form: where cos α = −q/[2 −(p/3) 3 ]. In the region σ 0 ≥ σ crit1 0 the solution of equation (23) reads: For σ 0 < ε the above-mentioned ε expansion is not quite correct and this case should be treated separately. The analysis shows that the trajectories remain unchanged but to calculate the cyclotron frequency we have to make use of another formula  in Fig. 2 and 3. For both of the situations the analytical and numerical results are seemed to be in a good agrement. Note that in our analytical study we ignore the adiabatic undulator entrance of electrons to the interaction region. The comparison between Figs. 2 and 3 gives a clear indication that the adiabatic undulator entrance "improve integrability" of the nonlinear dynamical system (15) and reduce the width of chaotic regions. In [17] it was found that the initial positive value for the x-component of the velocity leads to the suppression of the chaotic region. A test electron acquires such a positive average correction to v x passing through the region of the adiabatic entrance. And, as a result, the chaotic dynamics of the electron in the regular undulator region is partially suppressed. A rough analytical estimate indicates that the average correction is about one fourth of the amplitude of v x -oscillations in the regular undulator.

C. Chaotic motion
The equation set (15) has a lot of nonlinear resonances (16) (nϑ u ≈ mϑ c ) between the undulator and cyclotron degrees of freedom, therefore one can expect the appearance of chaotic dynamics in the system behavior. In Fig. 4 we have demonstrated the Poincare mapping in which the primary and the higher resonances are seen; the separate dots correspond to the stochastic trajectories. Note that the average axial velocity for the majority of the stochastic trajectories equals zero. As evident from Eq. (20) and Eq. (21), the undulator action (integral of motion!) can vanish under some conditions. This means the destruction of the integral motion [23, ch. 5] and chaotization of the dynamics of the test electron. Hence, the motion becomes stochastic if the difference between the undulator and cyclotron frequencies becomes less than the betatron frequency Such a criteria was initially proposed in [17] using some numerical findings. With the derived κ and σ we get the expression describing the location of the region of the dynamic chaos: It turns out that the chaotization condition is inconsistent with the solution of equation set (21) for ε less than the minimal value of ε min ε min cosh[k u y 0 ] = 0.0786.
In the used approximations this implies that there is no the chaotic region for ε < ε min . In Fig. 5 we have illustrated the results of the numerical calculations for the major Lyapunov exponent. The solid lines calculated using equation (28) show the boundaries of the chaotic region. They are in a good agreement with the results of numerical simulation.
In what follows we analyze the studied FEL within the region of the regular dynamic.

IV. THE REDUCED MODEL OF THE FEL
In this section we construct the time-dependent reduced FEL model that allows for the complicated dynamics of electrons in the pump magnetic field and intramode scattering in an irregular waveguide. Since we are going to analyze the resonant interaction between the microwave and electron beam we may approximately rewrite vector-potential A s x as (see B) Here Ψ(z) = z 0 k z (z ′ )dz ′ , V + (z, t) and V − (z, t) are the amplitudes of the forward and backward waves governed by the following excitation equations The Eq. (31a) describes the interaction between the beam and forward wave, whereas the Eq. (31b) describes the scattering of the forward wave to the backward one. The boundary conditions are The effective current cos πy(z; y 0 , t e ) w(z) e iωt(z;y0,te)−iΨ(z) (33) at moment t and position z is generated by the group of electrons entered into the interaction region during the time interval from (t − t p (z; y 0 ) − π/ω) to (t − t p (z; y 0 ) + π/ω). Here t p (z; y 0 ) is the arrival time of the electron, which moves in the pump magnetic field (1), to the crosssection z. According to Eq. (3) and Eq. (5) the integrating over t ′ yields a non-zero result only if t − π/ω ≤ t(z; y 0 , t e ) ≤ t + π/ω because of the Dirac delta. Since the right-hand side of excitation equation (3) is a slow function of time we may write t(z; y 0 , t e ) ≈ t e + t p (z; y 0 ) and find integration limits with respect to t e . In the previous Section we have studied the nonlinear system with the Hamiltonian (9) and found trajectories as functions of actions Ī and angles θ . Now let us take into account the ponderomotive potential W ( r, P , t). We will holdH( r, P ) as the integrable part of the Hamiltonian (8) and consider the relation (19) between ( r, P ) and ( Ī , θ ) as a variable replacement rule, regarding ( Ī , θ ) as new unknown variables. The perturbation W ( Ī , θ , t) periodically depends on anglesθ u andθ c , therefore it can be represented as a double Fourier-series overθ u andθ c : W ∝ W n,m e −iωt+iΨ(θu)+inθu+imθu (m and n are integers). As we have already known from Sec. III the slower is phase changing ωt − Ψ − nθ u − mθ u , the stronger is the action of Fourier-component W n,m (see text below Eq. (15)). The main principle of the nonlinear resonance analysis is simple [23, ch. 3]: the 'troublesome' resonant term is separately extracted from the perturbation expansion and, in the sequel, the dynamics caused by this term is studied. Further on, we analyze the undulator resonancē and may write the ponderomotive perturbation as QuantityW (Ī u , z(θ u ), t) is a slow function ofθ u and t via a slow variation of the waveguide profile and the microwave amplitude. The equations of motion iṡ To obtain the equations of motion in the simplest form and clearly demonstrate the physics of FELs with the axial magnetic field we additionally suppose that H−E ≪ E ('Compton limit'). Applying the method of the nonlinear resonance [23, ch. 3] to Eqs. (35), using z as a new independent variable and defining the ponderomotive phase as ψ = k u z + z 0 k z (z ′ )dz ′ − ωt, we get the equation for ψ where the derivative of the undulator frequency is Expanding the ponderomotive current into a series with respect to angles and taking into account only the resonant term in the excitation equation one can write the reduced FEL model in the following manner: Here ζ = z/ℓ g and τ = (v t − z)/ℓ g are the dimensionless longitudinal coordinate and "retarded time" [24]; is the normalized field amplitude;ψ(ζ, τ ; y 0 , ψ 0 ) = ψ(ζ, τ ; y 0 , ψ 0 ) − ζ 0 δ z (ζ ′ )dζ ′ is the ponderomotive phase; ψ 0 and y 0 are the initial entrance phase and the initial transverse displacement of the electron's position from the undulator symmetry plane y = 0; where I α = m e c 3 /e ≈ −17 kA is the Alfvén current (recall that e, I 0 < 0). The parameter ℓ g is called the gain length [24] (the spatial growth rate of the FEL without the axial magnetic field is equal to ℓ −1 g for zero detuning). The explicit dependence of the reduced FEL model on the transverse electron's position and the axial position are given by the relations The dimensionless detuning parameter is Note that our model includes two detuning parameters: δ z (ζ) changing along the interaction region and δ y (y 0 ) changing across the beam. The physical meaning of these parameters is discussed in detail below.
The time-dependent model (36) allows for the intricate dynamics of electrons in the pump magnetic field (1), the effect of the electron beam finite thickness and the intramode scattering in the profiled waveguide (the intramode scattering acts actually as a feedback).
Our model (36) is exactly coincident with the Colson-Bohifacio model [25,26] if a free-space case is employed, the axial magnetic field equals zero, the electron beam is ideally thin and ultrarelativistic. In the above case, the field amplitude F + depends mainly on detuning parameter δ z if the initial value of F + is sufficiently small. Then the FEL operates efficiently if |δ z | < 2 (see Fig. 2 in [24,27]). Otherwise, our model (36) is dependent upon more than one parameter and incorporates some novel effects. It is worth noting that using the method of nonlinear resonance in the action-angle phase space one can reduce any Hamiltonian with the resonant perturbation to the so-called Universal Hamiltonian of nonlinear resonance [23, ch. 3]. This means that any resonant beamwave interaction can be described within the framework of the reduced model that includes the pendulum-like equations of motion of electrons and the excitation equation of Colson-Bonifacio type. The equations of motion have dimensions of one and a half. In our case, the beamwave energy transfer occurs through the undulator degree of freedom only, whereas the energy stored in the cyclotron degree remains unchanged.
What is important is that the model (36) depends solely on the average axial velocity via the detuning but does not depend on the particular scalar components of the initial velocity. This results in that the FEL efficiency is only dictated by the spread of the average axial velocity such that δv ∝ δv z + εδv x + ε 2 δv y , where δv i (t e ) (i = x, y, z) is the magnitude of the initial velocity spread (δv i /v ≪ 1) and δv (t e ) is the average axial velocity spread. Recall that ε = √ 2ω β /ω u is a small parameter. It is clear that one first needs to minimize the initial axial velocity spread. The analysis of the FEL indicates that the velocity spread changes the efficiency insignificantly if the detuning caused by the spread is much smaller than unity [24]. For the ideally thin beam (Y b → 0) it yields the condition where µv is the variance of δv . It was shown in [28] (see also the results of the numerical simulation in [17]) that essential decreases in the sensitivity of the the efficiency to the initial beam spread can be obtained if the undulator frequency is close to the cyclotron one (multiplier Y −2/3 attains its minimal value). In general, the ponderomotive potential enhances as the undulator frequency tends to the cyclotron one (Y (y 0 ) increases). This results in a stronger coupling between the wave and electrons. Such an effect referred to as the magnetoresonance is well-known in the literature [5] and the recent detailed study [17] confirmed the usefulness of such a regime for a planar FEL configuration. However, the magnetoresonance effect is not so effective when the beam has a finite thickness. Electrons with the different initial transverse positions, y 0 , undergo the action of the different magnitudes of the pump magnetic field (1). Then the average velocity of the electron depends on its initial transverse positions y 0 (this dependence particulary strong near the magnetoresonance). At the same time the average velocity of the electron of the beam governs the initial 'transverse' detuning δ y (y 0 ) between the electron and the wave. Hence, the value of δ y (y 0 ) changes across the beam, and the contribution of different electrons to the total efficiency might be quite different. To demonstrate this effect we simulate Eqs. (36) for the parameters close to the experiment [29] and assume there is additional axial magnetic field 20 kG as well. In the simulation we split the beam into 21 layers in the transverse cross-section. Each layer is also uniformly distributed into 50 macroparticles entering within one wave period. Recall that the physical system under study is homogenous in the x-direction. The results are shown in Fig. 6. The internal layer operates in the regime of optimal (with respect to efficiency) detuning δ z (ζ) = δ cr = (27/4) 1/3 and δ y ≡ 0 but the external layers operate with the non-optimal detuning because of the variation in δ y (illustrated in Fig. 6 as the solid line) across the beam.
It should be anew mentioned that under certain conditions the integral of motion of a typical electron fails and dynamics becomes chaotic. Now we can derive the chaotization condition including the effect of the microwave. In the microwave saturation region one can hold the average value of the undulator action as an integral of motion, then the condition I u > 0 has to be fulfiled to preserve the regular dynamics of electrons and the validity of model (36). In the case of the steady-state regime, when the beam is thin and the waveguide is regular, the improved chaotization condition is Here we have considered that the microwave field modifies the undulator action by the additional quantity Besides, we used the constant of the motion to the Colson-Bonifacio model [30] It is obvious from Eq. (41) that the microwave may cause the chaotization of electrons even if the dynamics was regular in the pure pump field. Another important feature of the model (36) is that it takes into account the effect of waveguide profiling. This effect exhibits the coupling between the forward and backward waves because of intramode scattering as well as the dependence of the wave number, k z , on the axial position z through the varying waveguide width, w(z). As a result, the detuning δ z is also a function of the axial position and its control can be used to govern the beamwave interaction.

V. CONTROL OF THE BEAM-WAVE INTERACTION: FEL WITH THE OPTIMIZED WAVEGUIDE PROFILE
Now discuss the physical principle of the control of the beam-wave interaction. For simplicity we consider the steady-state regime and the thin beam. We also neglect the backward wave generation assuming that w(z) is a slow function of z. Rewriting the complex amplitudes of the wave and ponderomotive current as F + = |F + |e iα andJ e = |J e |e iu * and using Eqs. (36) we arrive at the system: Hereψ, |F + | and α are the unknown quantities governed by the differential equations, and u * and |J e | are given by definition. The phase of the current u * defines the position of the bunch center in the system of coordinates moving with the velocity of the beam [6, p. 160] (see also [31, p. 325]). One can see that if the phase shift between the current and the wave, φ = α − u * , belongs to the interval from −π/2 to π/2, then the right-hand side of the equation governing wave amplitude |F + | (second equation in the upper line of (42)) has a positive sign and the amplitude itself grows. The phase shift φ governs the energy transfer from the beam to the wave (or v.v.) because the local interaction power is dP/dζ ∝ |J e ||F + | cos φ. This implies that we can increase the efficiency by controlling φ along the interaction region by changing the detuning parameter δ z (ζ) in an appropriate way. The idea of such an optimization was originally proposed in the TWT theory [32]. Here, for example, we demonstrate the simple indirect optimization method [32]. Now assume that the phase shift, φ, satisfies the relation: where L pr is the start point of the region with the permanent value of φ. Then we have to findψ and |F + | using Eqs. (42) and Eq. (43) (in the right-hand sides of Eqs. (42) the expression (α − u * ) should be replaced by φ opt ). Now we can restore the information about the waveguide profile using the equation for the detuning parameter that follows from (42): The results from the calculation of the amplitudes of the wave |F + | and the current |J e |, and the phase shift φ are shown in Fig. 7. In this figure we also plotted the FEL characteristics for the constant detuning. We can see that the wave amplitude can be significantly enhanced (efficiency increased several times). However, the demonstrated optimization technique is useful only for a slightly improved efficiency because the waveguide profiles are to be rather complicated from the practical point of view in an effort to considerably increase the efficiency. Then more elaborated mathematical approaches, which simultaneously allow one to control the practical realizability of optimal waveguide profiles, should be used. In this paper we apply some type of a genetic algorithm [33] to perform the FEL optimization. The principle of evolutionary optimization is rather simple: we generate a lot of waveguide profiles and then perform numerical simulation of the reduced model (36) using these profiles. Then we choose the best profiles, cross and modify them, and perform the simulation again. As a result one can find a few best profiles. Finally we must check that these found optimal profiles are really useful. We have to simulate the non-simplified original model (formulated in Sec. II) using these profiles. Let us consider the results of the optimization for a practical example. The FEL parameters are chosen to be close to the parameters of experiment [29]: 450-kV beam voltage, |I 0 | = 16-A beam current, 1.0 mm × 2.0 cm sheet electron beam interacts with the TE 01 mode (the field varying along the narrow wall) of the 4.5 mm × 4.0 cm rectangular waveguide. The undulator magnitude increases adiabatically within six periods and the undulator is characterized by parameters B u = 3.5 kG and λ u = 1.0 cm in the regular region. A 1-kW input signal with the 4.0 mm wavelength is injected. In our simulation we assume that there is the axial magnetic field 20 kG as well. The wavelength is slightly different from that in the experiment because of the different average axial velocity. In Fig. 8A the results for the FEL with the axial field but without optimization are shown. Using the magnetoresonance ef-fect we can significantly enhance the efficiency. It was 4% efficiency without the axial field in the experiment and it is 12% efficiency with the axial magnetic field. However, there is a weak interaction between the external beam layers and the microwave because different layers of the electron beam have different "transverse" detuning with the wave due to the transverse inhomogeneity of the pump magnetic field. Geometric positions of different beam layers at the beginning of the interaction region are shown inside the dotted ellipse. The black curve is for the central layer. Other layers are displaced with respect to the symmetry plane y = 0.
In Fig. 8B the results for the optimized FEL with the axial field are presented. Using the waveguide with the optimized profile one can double the efficiency so that the final efficiency is around 22%. We also see the external layers interact with the wave much more effectively in the optimized FEL. So, by changing the waveguide profile we control beam-wave interaction thus increasing the FEL efficiency.

VI. SUMMARY AND DISCUSSION
The operation of the planar FEL-amplifier with the axial magnetic field and the irregular waveguide is studied.
The self-consistent model, which includes the excitation equation and the equations of motion along with the expressions for the radiated field and the microscopic current density, is formulated. In order to find the parameters and the waveguide profile that provides the maximal efficiency one has to perform some optimization of the FEL. However, the conventional numerical optimization methods fail to work because a vast amount of computational resources is required. Typically, about several thousand equations of motions and the partial differential equation for the wave amplitude have to be simulated. In this paper I propose another approach to the problem. The investigation is divided into several stages: initially I partly integrate equations of motion and the excitation equation in an analytical way using methods of nonlinear dynamics. As a result, the universal reduced FEL model is derived in special phase space. Then with this model and some principles of evolutionary computations (genetic algorithms) I perform the numerical optimization of the waveguide profile. Finally, the simulation of the non-simplified original model using the found optimal waveguide profiles is carried out. So, one can come closer to understanding of what increase in the efficiency can be achieved in practise.
To derive the reduce model one first can find the integrals of motion of a test electron in the pump magnetic field (1) applying the overconvergent method. The dynamics is completely governed by the two integrals of motion corresponding to the undulator and cyclotron degrees of freedom. At the same time it is reasonable to use other two parameters that completely define the dynamics as well: the first governing parameter ε = √ 2ω β cosh[k u y 0 ]/ω u is the level of nonlinearity and the second one σ 0 = ω c /ω u shows how the system is close to the magnetoresonance. The complete description of the dynamics is given in terms of these parameters. It is well known that the dynamics in the pump field is chaotic for some parameters [18], so the explicit expression (28) describing the region location of the dynamic chaos in the parameter space (ε, σ 0 ) are derived and the existence domain of integrals of motion is formulated. From the plot of the Lyapunov exponent we see that analytical formulae (28) give an accurate definitions of the chaotic zone boundaries. Note that the afore-mentioned technique can also be applied to the pure undulator field (there is no the axial field). In this case from Eq. (27) it follows a simple chaotization condition that in terms of paper [19] reads In Fig. 9 the regular and chaotic regions in the parameter space (k w x b , a w ), according to Eq. (45), are shown. Comparing Fig. 2 of [19] and Fig. 9 of the present paper we notice that the proposed simple estimation is in a reasonable agreement with the numerical simulation result cited in paper [19].
Using the information about the electron's dynamics in the pump magnetic field one can subsequently analyze the dynamics of ensemble of electrons in view of the ponderomotive wave. In a special coordinate system (that moves on the invariant torus surface if there is no the ponderomotive wave) one can split degrees of freedom and partially integrate the equations of motion [23]. As a result, the universal reduced model of the FEL (36) that incorporates the intricate dynamics of electrons and the intramode scattering is derived.
What is important is that there are two types of detuning in reduce model (36): 'axial' detuning that changes along the interaction region via the profiled waveguide width and the 'transverse' detuning that changes across the beam because the pump magnetic field is inhomogeneous and the average velocity of the electron depends on its initial transverse position. The "transverse" detuning causes the thick beam layering and the degradation of the external layers' contribution into the total efficiency (the degradation is particulary strong near the magnetoresonance). In the present paper I demonstrate that this problem and the saturation effect can be overcome by the control of the beam-wave interaction. The physical mechanism of such a control is that by changing the waveguide profile one control the axial detuning and thus regulate the phase shift between the ponderomotive wave and current. This phase shift defines the transfer of the energy between the beam and the wave and its regulation allows one to optimize the interaction.
The practical example of optimization of the FEL, whose parameters are close to those of the experiment [29], is demonstrated. The simulation results based on the non-simplified model (see Sec. II) strongly indicate that combining the magnetoresonance effect with the optimized profile waveguide one can enhance the FEL efficiency by a factor of five or six. The efficiency in the experiment [29] was around 4%. Applying the axial magnetic field the efficiency has been increased up to nearly 12%, but about 30% of electrons do not interact with the wave because of the initial transverse detuning. Following the waveguide optimization the efficiency has reached 22%, in particular, due to a much more effective interaction between the external beam layers and the wave.