{'fraction_non_alphanumeric': 0.01667159909243366, 'fraction_numerical': 0.009272960441945349, 'mean_word_length': 4.860115606936416, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Developments in Polarization and Energy Control of APPLE-II Undulators at Diamond Light Source

A pair of 2m long APPLE-II type undulators have been built for the I10 BLADE beamline at Diamond Light Source. These 48mm period devices have gap as well as four moveable phase axes which provide the possibility to produce the full range of elliptical polarizations as well as linear polarization tilted through a full 180deg. The mechanical layout chosen has a 'master and slave' arrangement of the phase axes on the top and bottom. This arrangement allows the use of symmetries to provide operational ease for both changing energy using only the master phase while keeping fixed linear horizontal or circular polarization, as well as changing linear polarization angle while keeping fixed energy [1]. The design allows very fast motion of the master phase arrays, without sacrifice of accuracy, allowing the possibility of mechanical polarization switching at 1Hz for dichroism experiments. We present the mechanical design features of these devices, as well as the results of magnetic measurements and shimming from before installation. Finally, we present the results of characterization of these devices by the beamline, including polarimetry, which has been done on the various modes of motion to control energy and polarization. These modes of operation have been available to users since 2011.


Introduction
Diamond Light Source is a 3GeV Synchrotron with provision for up to 22 Insertion Device (ID) beamlines. Several beamlines require APPLE-II type IDs for the provision of variably polarized photons and to date, four such devices have been constructed and installed, with another three due for construction within the next 18 months. In the case of the I10 BLADE beamline, the available polarization modes include all elliptical polarizations, as well as arbitrary linear polarization variable between 0° and 180°. In order to provide switching between two different polarizations relatively quickly for experiments such as circular dichroism studies, a relatively common solution is for two IDs to be installed in a single straight where then an external method of switching or filtering between the two polarizations is implemented [1]. The I10 BLADE beamline has such a layout.
The design of the beamline straight section includes provision of five fast switching chicane magnets which will provide switching between the beams at up to 10Hz, but as a fallback option the electromechanical design of the IDs provides the possibility to do polarization switching at up to 2Hz mechanically. This capability relies fundamentally on the implementation of a "master-slave" arrangement of the magnet arrays which will be shown to provide several further advantages over other APPLE-II designs including ease of energy and polarization control [3].

Mechanical Design
The IDs in the I10 straight section are two 48mm period APPLE-II type devices with 40 periods each making the total magnet length in the straight 3.9m. The magnetic design was chosen on the basis of the operating energy range of the beamline in circular polarization being 400-1600eV. The finer details of the magnet design such as cross section (33x33mm 2 ) and shape (6mm corner cutouts) were chosen to minimize forces and optimize the field flatness within the devices in all polarization modes. Parameters of the I10 IDs are found in table 1.
The mechanical design of the support structures of these devices was focused on improvements of several problems experienced with the previous design built at DLS. Because of the provision of linear arbitrary polarization, forces along the arrays are large and can cause twisting of the top and bottom arrays with respect to each other. Therefore, the torsional stiffness was increased in the new design. Another problem encountered was the measurable separation of the magnet arrays on a single beam with phase. This was improved through not only the implementation of the "master-slave" arrangement which immediately reduces displacement by a factor of two, but also through the reduction of overall magnet volume in the device, and the use of linear bearings with needle rollers which can be pre-loaded for holding the slave arrays (Q1 and Q3 in figure 1). In all, the measured transverse displacement of the magnet arrays versus phase was reduced by a factor of approximately 3 with the new design to a value of less than 60microns.
Further advantages of the "master-slave" arrangement arose from the improved access to the device for measurement and space for the vacuum vessel supports in the straight, since both of the moving arrays on a single axis could be driven from the same side of the device. It provided an improvement to the ease of use and accuracy of control of the relative phase of the top and bottom arrays which are now used for energy and polarization control by the beamline. And finally it allowed a relatively simple and very cost effective implementation of a relative phasing system between the two devices. One issue with having two separate devices in a straight that need to work not only in orthogonal polarizations but also in tandem is the requirement to control the relative phase between the two devices to avoid destructive interference between the wavepackets from each device. Generally, this has been solved using either an electromagnet or permanent magnet device between the undulators to provide a variable delay. In the case of I10, the four master drives on the two devices (top and bottom of each device or Q2 and Q4 in figure 1) were extended to allow the mechanical offset between the two devices to be varied. It was found that the length of relative displacement required to cover the entire energy range of the beamline (220mm) was comparable to the length that would have been   required for an external device (~200mm), and therefore a considerable cost and effort savings was achieved through implementation of this system instead of an independent magnetic delay system. All motors on these devices are servos, and linear encoders are Heidenhain incremental type with linear potentiometers as backup and homing systems on the gap axes, and inductive homing switches on the phase axes. This was a change from previous APPLE-II devices which have absolute encoders on the gap axes and incremental on the phase. A persistent problem with absolute encoders on other devices has been the loss of the SSI signal to the system on beam dumps which puts the devices into a fault condition. This has not been an issue with the incremental encoder based systems because the differential quadrature output is implemented with a simpler read-head that is more robust to beamlosses. The resolution of all encoders in these systems is 1 m, which has allowed approximately 2.5µm resolution on each axis. This very fine resolution on the master axis has allowed the implementation of not only a very accurate fast motion, but also the possibility to provide very slow scans for fine energy resolution scans at 2.5µm/s which at minimum gap corresponds to energy scans of 0.2eV/s. We note that in order to provide coordinated motion of the master phase between the two IDs in the straight, the control for the phase axes on both devices is implemented on the same motion card in the IOC.

Magnetic design and shimming
As in all APPLE-II IDs, moving two diagonal magnet arrays longitudinally together produces elliptically polarized light and moving them longitudinally in opposition produces linearly polarized light tilting out of the horizontal plane. In order to produce tilt of this polarization through a full 180°, the opposite pair of axes must also be moveable in opposition [2] which is achievable in these devices.
The standard procedure for shimming APPLE-II devices was followed, with the use of virtual shims (usually <20 per device) for trajectory correction and magic fingers for the field integral corrections. These are calculated and implemented at minimum gap and zero phase on all axes, and are found to be sufficient for non-zero phase and larger gaps. Typically, no further correction is employed other than trim coils which correct for dipole offset in the storage ring in a feed forward system. Typical trajectories and field integrals are shown in figure 2.
We note that with the two options for changing the energy of these devices (via gap or master phase), there is a clear advantage to using the phase to change energy from the perspective of the change in field integral versus energy. In figure 2 it can be seen that the overall change of field integral between maximum and minimum gap (red/blue) is substantially larger than that induced by changing the master phase over the same range (i.e. over the entire tuning curve of the device).

Energy and polarization control in practice
Following the control modes described in [2] changing the slave phase changes the polarization, and changing the master phase changes energy or the linear polarization in the "high symmetry mode" where the energy is controlled using the gap. Full characterization of the polarization in both of these modes has been undertaken for several energies with one of the devices in this straight using a diffractometer and soft X-ray polarimeter [4]. The degree of polarization in all modes has been found to vary according to prediction, with the peak rate of 100% being measured within the tolerance of the measurements. Likewise, the energy control using the master phase matches prediction with the polynomial functions set out in [1] being implemented in the control system.

Further work
The same calibration and verification work which has been done on the first device in the straight will be carried out on the second device. An investigation of a small contamination of linearly polarized light into circular mode and vice versa will continue, though the current suspicion is that this is due to symmetry breaking in the device such as end effects, or beamline alignment errors. The commissioning of the phasing system will also be undertaken in the near future.