Modeling and designing of variable-period and variable-pole-number undulator

The concept of permanent-magnet variable-period undulator (VPU) was proposed several years ago and has found few implementations so far. The VPUs have some advantages as compared with conventional undulators, e.g., a wider range of radiation wavelength tuning and the option to increase the number of poles for shorter periods. Both these advantages will be realized in the VPU under development now at Budker INP. In this paper, we present the results of 2D and 3D magnetic field simulations and discuss some design features of this VPU.


I. INTRODUCTION
The radiation wavelength tuning is one of the basic advantages that distinguish the free electron lasers (FELs) from conventional lasers.A wide tuning range is desirable for many applications.Therefore, increasing it is an important goal in FEL design optimization.As the FEL wavelength depends on several parameters, it can be tuned in several ways, each having advantages and disadvantages.A profound description of different types of undulators can be found in [1,2].Most applications necessitate tuning of the wavelength of the undulator radiation in the forward direction, where λ u is the undulator period, and γ is the electron energy divided by its rest energy mc 2 .The undulator parameter K describes the reduction in the longitudinal velocity of electron because of the trajectory wiggling.For a planar undulator with a sinusoidal longitudinal dependence of the vertical magnetic field, K ¼ eB 0 λ u =ð2πmc 2 Þ, where B 0 is the field amplitude.Typically, variation of particle energy is impossible (in a storage ring with a lot of undulators) or complicated because of the focusing and trajectory change.A common way of tuning of the undulator radiation wavelength is variation of the field amplitude B 0 .In electromagnetic undulators it is realized via variation of current in the coils and in permanent magnet undulators, mainly via variation of the undulator gap.This technique has serious intrinsic drawbacks of too low and too high field values at short and long wavelengths, correspondingly.In particular, this circumstance is an obstacle for the use of undulators with a very short period, because the tuning range of such undulators is very small as the K parameter is proportional to the undulator period.Wavelength tuning via variation of the field amplitude is especially difficult in the x-ray FELs [3].A decrease in the field amplitude in these devices may cause a significant increase in the gain length.Moreover, the field amplitude must be the same in different sections of a long undulator with precision better than 0.1%.Adjustment of gaps of all undulator sections with such precision is a significant technological challenge.
Another solution for wavelength tuning is variation of the undulator period λ u .The "simplest" way is replacement of the undulator [4,5].Then fine wavelength tuning can be realized via gap variation.Different electromagnetic variable-period undulators (VPUs) were discussed in papers [6][7][8].
The concept of the VPU with moving poles has been proposed in [7] and has found very few implementations so far.There are several types of the VPU design.The one proposed in [9] is similar to the conventional hybrid undulator [10,11], in which the iron poles are divided into two halves.Such a VPU is composed from separate magnet blocks, which can move freely along the longitudinal axis.Each block includes one permanent magnet and two iron plates.With fixed positions of the outer blocks, due to the repulsive forces the inner blocks are distributed evenly in the longitudinal direction and the period of this distribution can be adjusted via shift of the outer blocks.This design allows one to change the number of blocks and thus to increase the number of periods for a shorter wavelength at a fixed space allocated for the undulator.Another design is the helical permanent magnet VPU [12] for KAERI FEL, in which the repulsion between blocks is increased via application of auxiliary springs.This undulator is the first and the only operating VPU.
The VPU for the NovoFEL under development at Budker INP has a remarkable feature of the possibility to change the number of periods.The new undulator will replace the electromagnetic one of the second stage FEL, which is installed on the bypass of the second horizontal track [13].The tuning range of the existing FEL is 35-80 microns.The application of the VPU will allow shifting the short wavelength boundary to 15 microns (see the simulation results below).The design of the VPU magnetic block has been already developed, and a small prototype with only six blocks is being manufactured now.In this paper we discuss the undulator design and its magnetic field properties.

II. UNDULATOR GEOMETRY AND FIELD SIMULATION RESULTS
The undulator is designated for installation on the second track (see Fig. 1) of the Novosibirsk FEL energy recovery linac (ERL).It will replace the old electromagnetic undulator with the period λ u 12 cm and the field amplitude B 0 varying from zero to 0.13 T.
The new undulator will widen the tuning range and increase the radiation power significantly.The following should be taken into account.1.The available free length for the undulator is four meters.2. The maximum radiation wavelength λ max is defined by the lower edge of the tuning range of the low-frequency (terahertz) FEL, 90 microns.3.At K < 1 the FEL gain is proportional to K 2 .Therefore at the minimum period K cannot be too small.Taking into account the exponential decrease of the field amplitude B with growth of πg=λ u , where g is the undulator gap, one can obtain the limitation that λ u should not be too small compared to g. 4. The undulator shall focus electrons in both (vertical and horizontal) transverse degrees of freedom.This requirement is important because of the low (20 MeV) electron energy and, consequently, strong focusing by the undulator field.
Requirements (1) and ( 2) give the minimum r. m. s. (by intensity) size of Gaussian radiation beam at the ends (entry and exit) of the undulator, ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi λ max L=ð4πÞ p ¼ 0.56 cm.Therefore a vacuum pipe inner diameter of 4.4 cm will allow low diffraction loss.Taking into account the wall thickness, we chose the diameter of the circle inscribed into the aperture of undulator to be 5 cm.Then, according to requirement (3), we chose the minimum undulator period to be 4.8 cm.For provision of the horizontal focusing, the vertical gap is decreased at the right and left sides of the undulator and increased in the central part, the angle between bottom pole edge and the horizontal plane is 29°.Therefore the free aperture is a rhomb, as shown in Fig. 2, and the gap in the middle (the rhomb diagonal) is 5= cosð29°Þ ≈ 5.7 cm.
To find the optimal undulator geometry and investigate the magnetic field properties, 2D and 3D simulations were carried out.In the 2D simulations we used the code FEMM [14], which runs quite fast and allowed us to calculate the magnetic field for the total number of undulator periods (about 50).The final 3D geometry is presented in Fig. adjacent in the longitudinal direction form one pole.Each couple of the right and left blocks at the top is combined in one unit, which can move as a whole, as can be seen from Fig. 3.Each couple of the right and left blocks at the bottom also forms a similar movable unit.
The top and bottom units are not connected.Blocks in one unit are tilted relative to each other.This configuration provides field amplitude growth with distance from the central axis in all directions, as it is shown in Fig. 4. As a result, this undulator will focus the electron beam both horizontally and vertically.
The permanent magnets are made of NdFeB.In simulations we used a permanent magnet with a remanence of 1.3 T. We optimized the dimensions of the magnets and iron plates to obtain a maximum field amplitude with a minimum period.
The transverse cross sections of the iron plate and permanent magnet with final dimensions are presented in Fig. 5.The longitudinal sizes (thicknesses) are 2 cm for the magnets and 0.2 cm for the iron plates.
Dependences of the basic undulator parameters on the period were obtained from the full 3D simulations of the undulator regular part.The results are presented below.Dependences of the field amplitude and parameter K on the period are shown in Figs. 6 and 7.As the longitudinal field distribution is not sinusoidal, we used the exact formula with average square of the first integral for K calculation.One can see that period variation in the VPU does not lead to such a significant change in the field amplitude as gap variation does in the variable gap undulators (VGUs).
Examples of magnetic field distribution on the undulator axis for minimum, medium and maximum periods are shown in Fig. 8.
In Fig. 9 one can see the normalized amplitude of the third harmonic.In the VPU it cannot be minimized for all periods, but for our FEL application its value is small enough throughout the range.
The basic undulator parameters are summarized in Table 1.

A. Tolerance requirements
In the VPU design in question the longitudinal positions of the magnetic blocks in the regular part of undulator are not fixed mechanically and in principle may have some errors.Since this argument is often used against the feasibility of the VPU concept, we should address this issue.
Let us consider the following two types of position errors: random nonaccumulating deviations from regular positions and systematic change in the distance between adjacent blocks, which leads to slow tapering of the undulator period.The latter is the most critical error.This type of error can appear because of friction forces or declination of the undulator axis from the horizontal plane.
To find an acceptable spread of the longitudinal positions for our undulator, we performed 2D simulations of undulator with 35 periods for both types of errors.In the systematic error simulations the linear tapering was 20 μm per period.The undulator performance was characterized by the spontaneous emission spectrum at the zero angle.The results are presented in Fig. 10, spectra were calculated at regular undulator period 7.2 cm.The vertical axis is for amplitude normalized to the amplitude of ideal undulator spectrum, the horizontal axis is the normalized radiation frequency.
One can see that the acceptable random spread is more than 0.1 cm, whereas the systematic shift cannot exceed several microns, which looks rather unrealistic at first sight.3D calculations however showed that with a period of 5 cm the restoring force acting on one unit with a shift of FIG. 9. Third harmonic of undulator magnetic field normalized to first harmonic amplitude.about 0.2 N. A rough estimate of the "magnetic spring" rigidity can be obtained via neglecting of the contribution from the iron plates.Replacing the permanent magnet blocks with rectangular coils with the surface current i ¼ B r c=ð4πÞ, where B r is the remanent induction, one can consider three parallel tape conductors (see Fig. 11) of a width t, ¼ 2 cm being the magnetic block thickness.
If the central conductor is shifted by dx, then the restoring force per unit length of the conductor is dF ¼ 2Bidx=c.Calculation of the field B of the two side conductors at the edge of the central one gives Finally, the rigidity is where L ¼ 16 cm is the magnetic block perimeter.As each mechanical unit (upper or lower, see Figs. 2, 3) contains two permanent magnet blocks, the displacement rigidity of this unit is twice as large as the value for one block in Eq. ( 3).A comparison of this estimate with the results of numerical calculations is shown in Fig. 12.
One can see that Eq. ( 3) is reasonably good for short periods, but for longer periods the numerically calculated rigidity is significantly less.This force overestimation may be caused by the neglecting of the field screening by iron plates.
The mass of one unit block is about 1 kg, and the vertical magnetic force acting on the unit is about 20 N at undulator period 5 cm and 50 N at period 9 cm.Therefore to avoid the problem with the systematic shift it is necessary to provide a friction coefficient value less than 4 × 10 −2 for small periods and less than 3 × 10 −3 for large periods.The last value does not seem feasible but for large periods this problem can be solved by some special approach described below.The vertical tilt angle value should be less than 0.02, which looks feasible.FIG. 10.Spectra of spontaneous emission.Green: ideal undulator; blue: random block shift with amplitude of 0.15 cm; red: systematic block shift with the increment of 10 μm per block.

B. Undulator period adjustment
As mentioned above, period adjustment in the VPU is performed via movement of the first magnet block.At the beginning of this procedure, the friction forces make the magnet blocks on the other side of the undulator remain unmoved, which leads to tapering of the undulator period.This effect is especially strong for large periods, as the repulsive forces decrease with the increase of the period (see Fig. 12).This effect can be minimized with a special approach.As the first step, the first block is moved farther than it is required for uniform distribution of the blocks with a new period.In so doing, the blocks on the other side of the undulator start moving and finally seat in the required positions.Then the first block is moved back and forth repeatedly with decreasing amplitude.This "shaking" allows avoiding regular period change.
A simple code was created for modeling of this period adjustment procedure.In this code, the blocks are assumed to move very slowly, so that any acceleration can be neglected.Thus the repulsive and friction forces are equal for any block in the middle.The code takes into account the dependence of these forces on the undulator period which was obtained from the 3D simulations of the regular part of the undulator.It should be noted that the friction force is not constant in our case, because the attraction of the top and bottom parts of undulator changes with the period.The motion of the blocks in the code is performed in very small finite steps.A block starts moving when the difference in repulsive forces exceeds the friction force.
An example of application of this "shaking" procedure for adjustment of period from 5.6 to 7.4 cm is presented in Fig. 13.At this picture the block "0" is shifted, and the block "60" remains on its initial position.The plots show the distances between the centers of adjacent blocks.The green line corresponds to the ideal positions of the block for a period of 7.4 cm.The red line shows the distance distribution after the first step, when the first block has reached its ideal position for the required period.The tapering is unacceptably large in this case.The blue line is obtained after 20 strokes with linearly decreasing amplitude.For the last case we calculated the magnetic field distribution using the 2D model.In Fig. 14 one can see the corresponding spectra of spontaneous emission at fundamental harmonic compared with the ideal case, vertical axis is for amplitude normalized to the amplitude of ideal undulator spectrum, as usual.It can be seen that the spectrum degradation is not very significant.The corresponding phase errors are shown in Fig. 15.

C. Termination field correction
The electron beam shall move along the central axis in the regular part of undulator.This condition is to provide overlapping of the electron beam with the optical cavity eigenmode.If the field termination in the undulator is not properly adjusted electron can get some angle and coordinate shift when it passes the undulator entrance.This leads to appearance of betatron oscillations in the undulator regular part.To ensure overlapping of electron beam with optical mode one has to fulfill the following condition which limits the maximal values of uncorrected average coordinate and angle at the undulator entrance: where β x is matched undulator beta-function (see below), σ rad is the optical cavity mode transverse dimension.The minimal size of the mode in our case for the shortest wavelength of 15 microns is about 0.15 cm, and matched horizontal beta-function for the minimal undulator period is about 2 m.So for the minimal period x 0 should not exceed 0.15 cm and x 0 0 -7.5 × 10 −4 .At 20 MeV electron energy it corresponds to 10 kG × cm 2 and 50 G cm of second and first field integrals respectively.When the period grows these tolerances become more relaxed.
A conventional way to ensure this condition is to reduce the magnetization of the two first magnets at the undulator entry.By proper choice of the reduction degree one can minimize the first and the second field integrals for a given undulator period.Variation of the period can lead to violation of this compensation, but according to our 3D field simulations for the considered range of periods (4.8 to 9.6 cm) this violation is not very significant.
The long magnetic field tail near the edge of the undulator can be eliminated with the help of a magnetic shield.The 3D modeling of the undulator field distribution allowed us to obtain a solution with acceptable values of the first two field integrals in the undulator axis.Dependence of the vertical component of the magnetic field at the end of the undulator as well as angle and trajectory of the particle entering undulator for the period 9.6 cm are shown in Fig. 16.The magnetization of the first and second blocks was reduced to 0.1 and 0.5 of the nominal value, respectively.According to the simulations at these values of magnetization we have are x 0 ¼ 0.1 cm, x 0 0 ¼ 3 × 10 −3 for minimal period 4.8 cm and x 0 ¼ 0.5 cm, x 0 0 ¼ 1.5 × 10 −3 for maximal period 9.6 cm.The coordinates in both cases are within the required limits while the angle for the small period case needs a small correction.
For fine tuning, the magnetic potential of the first poles can be reduced with additional steel plates (e.g., shims, see [16]).The residual angle can be also corrected by steering coils.

D. Undulator focusing
An electron beam in the Novosibirsk FEL has low energy, and therefore the undulator focusing plays a significant role.As it was mentioned earlier, the undulator geometry provides focusing in both the vertical and horizontal directions.In Fig. 17   of the matched horizontal,β , and vertical, , beta functions on the undulator period.

E. FEL tuning range
According to the simulation results, the undulator developed allows widening of the tuning range of the Novosibirsk FEL wavelength.It is well known that lasing in a FEL oscillator is possible when the FEL gain exceeds the round trip radiation losses in the optical cavity.In Fig. 18 one can see the gain and losses [17] of the second stage of the Novosibirsk FEL for different wavelengths and different types of undulators.The gain was calculated for the following electron beam parameters: an energy of 22 MeV, an energy spread of 0.5%, and a peak current of 40 A. The gain calculation for the VPU case takes into account the increase in the number of periods for shorter wavelengths.Together with the VPU plot, a plot for the VGU with a comparable tuning range and a plot for the currently installed EM undulator are presented.Comparison of these plots makes the advantage of the VPU evident.

III. MECHANICAL DESIGN
The mechanical design of the undulator is presented in Figs. 19, 20 and 21.The units that contain magnet blocks are made of duralumin.Pole plates of low carbon steel fix the magnet blocks inside a unit (Fig. 19).
The units can freely move in longitudinal direction inside the undulator frame (Fig. 20).For the friction coefficient to be small, they are placed on bearings.The vertical positions of the pole plates are determined by precise grooves in the unit body (see Fig. 21).
The period is varied remotely using a special mover (see Fig. 20).When the units fill the whole length of the frame at maximum period 9.6 cm, the displacement range of the movers is sufficient to decrease the period to its minimum value 4.8 cm.However, at minimal period the number of units can be increased as there is additional free space at the ends of the frame (see Fig. 20).This operation may be necessary for getting larger FEL gain at short wavelength, but it is not required very often.Therefore in the present design change of the number of units is done manually.The guide grooves in the frame where units move on the bearings have open ends.Therefore the outer units can be easily inserted or removed by hand when the pushers come out of the frame and the inner units are locked inside the frame with inserted stoppers.

IV. CONCLUSION
The variable period undulator developed for the Novosibirsk FEL provides a wavelength tuning range of about 13-76 μm, whereas the tuning range of existing FEL based on an electromagnetic undulator is only 37-80 μm.Thus the proposed undulator replacement will essentially reduce the short wavelength limit, which will make the Novosibirsk FEL a more powerful research instrument.Detailed measurements of magnetic errors and field reproducibility in this undulator will allow optimization of the VPU design and subsequent use of this type of VPU in new FEL facilities and other undulator-based radiation sources.As the most of contemporary storage ring based x-ray sources use high-order harmonics of undulator radiation, the tolerance for the phase errors for their undulators are rather tight.Therefore further technological developments are necessary to achieve the necessary mechanical precision for VPUs in this case.
FIG. 1. Arrangement of new undulator in bypass of second track of ERL.

FIG. 14 .
FIG.14.Spectra of spontaneous emission at fundamental harmonic (green curve-undulator with ideal block positions, red-after one step of the period adjustment, blue-after 20 iterations).
one can see the dependence

FIG. 16 .
FIG.16.Vertical magnetic field behavior near the termination, as well as electron horizontal angle and coordinate (undulator period is 9.6 cm, dashed lines correspond to period-averaged values).

TABLE I .
Basic undulator parameters.