CPMU Development at Diamond Light Source

Over the last three years (2020-2022) Diamond Light Source has installed four in-house designed, built, and measured Cryogenic Permanent Magnet Undulators (CPMUs). All four are 2 m long with a 17.6 mm period and have a minimum operating gap of 4 mm. These have replaced existing 2 m long in-vacuum Pure Permanent Magnet (PPM) devices to improve the flux to several of Diamond’s MX (Macromolecular Crystallography) beamlines by a factor of 2-4. In this paper we present the mechanical and cryogenic design considerations, and the shimming procedures and tools developed to produce these devices. The performance of the CPMUs compared to their PPM counterparts will also be reviewed.


Introduction
An undulator creates periodic static magnetic field to stimulate x-ray emission from electron beams in synchrotron radiation facilities.Cryogenic Permanent Magnet Undulators (CPMUs), where permanent magnets are cooled to cryogenic temperature, provide a sufficiently large magnetic field with a shorter period length compared to a PPM undulator resulting in higher flux and brightness at a higher photon energy range [1].The Macromolecular Crystallography Insertion Device (ID) upgrade project at Diamond Light Source aims to increase brightness and flux to aid in-situ data collection.The primary energy of interest is ~12.6 keV and the full operating photon energy range is 5-30 keV.

Undulator design
2.1.Magnetic design CPMU magnetic design calculations are performed using RADIA, as shown see Fig. 1.   1 gives the main parameters of cryogenic undulators.The magnets for CPMU-4 are thinner due to the initial requirement of a 16.5 mm period length, that was later changed to 17.6 mm to improve the tuning across the full energy range in Diamond I and Diamond II.The gaps between harmonics were exacerbated for Diamond II with the previously chosen period of 16.5 mm. Figure 2 shows the magnetic field for CPMU-3 at room and cryogenic temperatures.The field is increased by ~13% at minimum ID gap from room temperature to cryogenic temperature.For CPMU-4 the measured field enhancement is ~8% at a 4 mm ID gap due to the thinner magnets.

Mechanical design
Mechanical design calculations consider the total length of the insertion device and minimum operating gap that results into a very high magnetic force between the two girders and estimates the impact of girder deformation on the magnetic field and thus on the performance of the undulator as a radiation source.Force calculated between upper and lower girder for full length of ID is ~20.5 kN at IOP Publishing doi:10.1088/1742-6596/2687/3/0320433 cryogenic temperature, gap variation due to girder deformation is < 1 µm.Force between poles is ~180N.At Diamond, the CPMU's mechanical frame is a two-pillar structure, which support magnetic forces in a C configuration, open at one side for the out-of-vacuum measurement and correction (see Fig. 3).The gap drive system has four motors which allow the girders to be moved independently to tune the gap and the longitudinal taper.Both girders are maintained at cryogenic temperatures by circulating liquid nitrogen through them.The girders are fixed on the out-of-vacuum frame with support columns passing through to the vacuum chamber.These support columns are equipped with bellows and are used to tune the position of each girder and to tune the magnetic gap along the full length of the ID by using mechanical shims.

Control system
The control system for the CPMUs is based on earlier designs [2] with adjustments caused by obsolescence.As two examples, the VME based controller was changed to Linux based servers to use remote I/O [3] and for motion control, during the construction cycle of the CPMUs, the Delta Tau Brick Controller became obsolete, and was substituted by the Omron CK3M motor controller.

Undulator assembly
CPMUs are built by initially mounting all the horizontal magnets without poles.An in-house sort code Opt-ID, based on artificial immune system, uses Helmholtz measured data to sort the magnet blocks for an optimum magnetic field distribution [4].Following magnet assembly, magnetic measurements are performed, and trajectories and RMS phase error are corrected using magnet swapping and flipping suggestion from Opt-ID in 'magnet-only' configuration.For the first two CPMUs, magnet height adjustment was also used to reduce RMS phase error in 'magnet-only' configuration.In the second step of assembly, all the poles were inserted, and then finally shimmed with the pole height adjustments.The idea was that the initial assembly with 'magnet-only' configuration allows initial build error to be corrected at an earlier stage, therefore saving time and effort at a later stage.However, trajectory and phase error correction using magnet swaps and flips are limited due to the availability of appropriate magnets.The magnetic errors were found to be predominantly caused by pole height error.Also, correcting the field integrals with pole height adjustment is faster than magnet swaps and flips.CPMU-5 is being built by mounting all the magnets and poles at the same time.Trajectories and phase error corrections will be made with pole height adjustment only.

Room temperature
After full assembly, the magnetic field is measured with a Hall probe and a flipping coil bench.Magnetic field corrections are applied to optimize the radiation properties.Coarse corrections are made first, for example mechanical shimming on the support columns to correct gap or by applying longitudinal taper into the girder to increase or decrease the magnetic field linearly with longitudinal position.To fine tune the trajectories, poles are either shifted vertically or tilted.To correct phase error, the heights of the poles are adjusted in pairs instead of moving the magnet heights, as the pole height can be continuously fine-tuned in microns due to the holder design (see Fig. 4 -Fig.5).Magnet height adjustment can only be done in discrete steps of ~15 µm with this holder design.To correct integrated multipoles, small cylindrical magnets called magic fingers are used at each end of the girders.Fig. 6 -Fig.8 show the measurement results as an illustration of before and after shimming at room temperature.Figure 8: First field integrals for CPMU-3 before (dashed) and after (solid) magic finger shimming for a 5mm ID gap.

Cryogenic temperature
An in-vacuum Hall and wire measurement system is developed and used to measure CPMUs at cryogenic temperature [5].At cryogenic temperature, there is a longitudinal thermal contraction of the girder (~8 mm over 2m long ID) and a vertical thermal contraction of the support columns (~1 mm).The magnetic gap varies along the length of the ID.Consequently, the phase error rms increases.For CPMU-3, the rms phase error increases from 1.8° to 6.6° (see Fig. 9), which is reduced to 3.2° after two iterations by using mechanical shims for support columns based on the measured magnetic field signature.2 lists the installed CPMUs in different beamlines over the last few years.Flux is improved by a factor of ~2 at the primary energy of interest i.e., 12.6 keV, and at higher photon energies flux is higher still.
In beamline I24, the ID gap was restricted to 6.5 mm during operation and on investigation both upper and lower beam foils were found to bunch into the gap close to the centre of the ID.This issue was resolved following thermal cycling and I24 CPMU-1 was working within normal operating gap range.CPMU-1 was replaced with CPMU-3 in Dec 2021 in order to remove CPMU-1 for foil replacement.It is currently undergoing remeasurement.For CPMU-1 and CPMU-2 all poles were set 0.1 mm above the magnet top surface.Based on the temporary foil buckling problem experienced with CPMU-1 the offset between the heights of magnets and poles for CPMU-3 and CPMU-4 was eliminated to avoid ripples in foil and to achieve maximum contact between the foil and the magnetic array.gap.The front-end aperture is not compatible for smaller ID gaps and will be upgraded for Diamond-II, so that different harmonics could be used at these range of energies to achieve more flux gain.

Conclusion
Several CPMUs have been successfully developed and installed at various MX beamlines at Diamond light source and providing an increase in flux and brightness at or above specification.

Figure 1 :
Figure 1: Magnetic design using RADIA.6 period CPMU (top), regular magnet and pole in RADIA (bottom left), End design in RADIA (bottom right)

Figure 2 :
Figure 2: Peak magnetic field for CPMU-3 at room temperature and cold temperature.

Figure 5 :
Figure 5: Photo of the pole height measurement tool

Figure 4
Figure4shows the magnetic holder design of the CPMUs.Each holder consists of one magnet and one pole.Magnets can be shimmed by using of mechanical shims.Pole heights can be adjusted continuously in micron steps, with the help of grub screws fixed on the top of pole holder and an insitu pole height measurement tool, as shown in Fig.5.

Figure 6
Figure 6 Horizontal and vertical trajectory after shimming at room temperature, ID gap 5 mm.

Figure 7 :
Figure 7: RMS phase error for CPMU-3 before and after shimming at room temperature for a 5 mm ID gap.

Figure 9 :
Figure 9: Phase error RMS before and after shimming at cold temperature, ID gap 5 mm.

Figure 11 :
Figure 11: Flux measured with U23 and CPMU-4 on I04 beamline.CPMU-4 was recently installed for beamline I04, as shown in Fig.10.Figure11compares the flux measured at the sample position with a 32 µm x 20 µm beam with the previous in-vacuum PPM U23 and CPMU-4.There is a significant gain in flux except at 7-9 keV and 11-13 keV photon energy ranges partly due to the restriction imposed by the front-end custom aperture to 4.5 mm ID

Table 1
Cryogenic Undulator Main Parameters

Table 2
Installation status of CPMUs