From design and construction to operation of the APPLE undulator at TPS

The APPLE type of Elliptically Polarized Undulator (EPU) not only serves as a crucial circularly polarized light source in existing accelerator facilities but also acts as a standard light source for soft X-rays at the Taiwan Photon Source (TPS). Up to the present, we have autonomously designed, constructed, and operated various EPU configurations. The experience gleaned from the construction of various designs and the choice of material will be outlined in this paper. We also elaborate upon the actions taken to address the adverse effects on the magnetic fields due to the characteristics of non-identical magnets and mechanical deformation. In particular, a method for correction of discrepancies in the magnetic field of the EPU with operation in numerous phase modes employing iron shims is described. In addition, we also discuss the adverse effects on the storage ring that must be dealt with for stable operation of the EPU at the TPS and optimization of the magnetic field during the laboratory construction phase. This paper will further explain management issues related to the susceptibility of the EPU to radiation damage. The comprehensive experience related to the EPU at the TPS, from design and construction to operation will be presented in this paper.


Introduction
Accelerator light sources like the Elliptically Polarized Undulator (EPU) are constructed and installed to meet the demands of the user community for circularly polarized light.The APPLE type of EPU, which is composed of four rows of Halbach structures, has been widely accepted for utilization in accelerator light sources worldwide [1][2][3].The closer the magnet rows are to the electron beam, i.e., the smaller the gap between the magnet rows, the stronger the magnetic field that can be provided.However, the gaps between magnet rows in both the horizontal and vertical directions need to be considered to ensure adequate space for stable operation of the storage ring, especially considering disturbances which can occur during injection and for protection against synchrotron radiation.More space is needed to ensure effective off-axis injection for storage rings with a large electron beam emittance in the horizontal direction.This requirement led to the proposal and adoption of the planar magnet structure used in the APPLE-II [4].With the development of accelerators with a significant reduction in the horizontal emittance and the adoption of new injection methods, the vacuum chamber in the horizontal direction can be closer to the electron beam.This means that the magnet material can also be closer to the electron beam in the horizontal direction.Closed-magnet structures like the APPLE-III [5,6] and APPLE-X [7,8] have subsequently been proposed.The closed-magnet Delta structure was initially proposed for application in linac based accelerators [9].
The Taiwan Photon Source (TPS), completed and commissioning in 2015, is a 3GeV thirdgeneration synchrotron light source.The APPLE-II structure, called APPLE hereafter, was adopted to ensure stable operation of the storage ring and to meet user demand for circularly polarized light.Up to the present time, a total of 9 EPUs have been commissioned, installed, or are in the process of construction, as listed in table 1.The TPS itself comprises a 7 m short straight section which is 7 m in length and another 12 m long straight section.To make full use of the space available for insertion devices, a 4.4 m long EPU was designed.This EPU design, which can meet the high brilliance requirements of soft X-ray users has become the standard for the short straight section of -1 -the TPS.After installation of a radio frequency (RF) cavity in the short straight section, a 0.8 m long EPU was constructed in the remaining space to enhance the source quality for the original bending magnet users.Two 3.4 m long EPU48s were installed in the long straight section to monitor the enhancement of brightness through phase matching.Two new EPUT66s with a longitudinal tapered structure are currently under construction.They are intended for experiments involving the rapid switching of polarized light.The TPS requires various different EPUs designed to meet the needs of different users while complying with the installation conditions.This paper will organize and explain our experience with the design, construction, and operation of locally built EPUs.The various mechanical structures of the EPUs are described in section 2, including considerations and features of the mechanical design.The methods for fixing the magnets and adjustment mechanisms to optimize the magnetic field are also introduced.The results of measurements of mechanical precision under magnetic force will be explained.The strategies carried out for optimization of the magnetic field will be outlined in section 3, including the process for individual magnets to optimization of the assembled system.Since EPUs need to operate in various polarization modes, the optimization and handling of differences in the magnetic field under different modes will also be discussed in this section.The impact of commissioning and operation of the EPU on the storage ring will be explained in section 4, and the influence of the TPS storage ring on the stable operation of the EPUs discussed.

Mechanical structures
In the TPS, the longest insertion device is the 4.4 m long EPU, as shown in figure 1(a).The increase in length of the EPU and the number of periods enhances the photon flux sufficiently to meet the high brightness requirements of the users.However, this introduces two primary challenges in mechanical design: the augmentation of the total magnetic force and mechanical deformation due to temperature effects.Unlike a conventional insertion device, where the magnetic force is predominantly in the vertical direction, the EPU, during operation, experiences forces of attraction and repulsion in all three directions.Taking the TPS EPU66 as an example, in the horizontal linear (HL) and vertical linear (VL) polarization modes, the vertical attraction and repulsion forces are 50 and 34 kN, respectively; in the right circular (RC) and left circular (LC) polarization modes, the forces of attraction and repulsion force can reach 17 kN in the longitudinal direction.A solid structure can be used to reduce -2 -mechanical deformation but this results in an increase in the mechanical weight.At the TPS, the EPUs are installed by crane using a suspended configuration, so it is crucial to maintain mechanical strength while reducing the weight to within the load-bearing capacity of the crane.The design must be optimized while meeting these conditions.
The first considerations for optimizing the design of the TPS EPU were material selection and feasibility.Unlike the typical insertion device fabricated from a welded steel (SS400) frame, our frame was constructed of nodular cast iron (FCD600).This material was chosen not only to retain the high compressive strength characteristic of cast iron but also to withstand high tensile forces.The experimental results indicated a tensile yield strength of 412 MN/m 2 , 1.6 times that of SS400 steel.The casting method also offered greater flexibility for optimizing the geometric structure for distribution of the areas of stress concentration and reduce the weight in regions experiencing lower stress.The optimized structure incorporated a perforated design to reduce the weight.The maximum stress within the structure was two orders of magnitude below the yield strength of the material.The material selected for the backing beam supporting the magnet rows had to have weak residual magnetization and sufficient mechanical strength to minimize deformation and thereby reduce systematic magnetic field errors.Typically, stainless steel and aluminum alloys are used.Given the substantial volume of the backing beam, we opted for a lower-density aluminum alloy (7075-T651) to decrease the weight.For the sliding beam closer to the magnet rows required to facilitate longitudinal movement, we chose a mechanically stronger stainless steel (316L) to enhance mechanical strength.In our optimized structure, under the maximum load, the variation in the gap along the -direction between the upper and lower sliding beams was less than 14 μm, satisfying the requirement of 25 μm, corresponding to a systematic phase error of 3 degrees.
Although the dual objectives of weight reduction and systematic magnetic field error reduction could be met using an aluminum alloy, the difference in the material properties necessitates careful consideration of the impact of temperature variations.The thermal expansion coefficient of the aluminum alloy is approximately twice that of iron.Thus, when the junction between the backing beam and the frame restricts free sliding in the -direction, temperature variations can result in differential elongation between the two components.This discrepancy can lead to the generation of internal stresses and mechanical deformations within the structure.To alleviate the problem, sliders were designed to allow the backing beam to slide freely in the -direction, as depicted in figure 1(a).The weight limit is a critical consideration for the 4.4 m long EPU requiring optimization of materials and structure.However, for shorter EPUs, the weight limitation would no longer be the primary concern.Other design constraints and our approaches to solving the problems will be elucidated in the subsequent discussion.
To enhance the bandwidth of the spectrum at harmonic energy, the EPU was designed with a taper of 2 mrad along the -direction, allowing for taper mode operation with a variable gap from large at one end to small at the other end.For example, in our EPUT66 design, the maximum difference in the gap between the two ends is 10.6 mm.To operate in this mode, we incorporated self-lubricating bearings that enabled rotation of the backing beam on the saddle originally used for opening and closing the gap, as illustrated in figure 1(b).It should be noted that the distance between the two support points for the backing beam will be longer under taper operation than without the taper.A mechanism, similar to that required to alleviate thermal expansion issues is needed, that allows for free sliding in the -direction at one end.A self-lubricating flat plate structure is designed at one end, capable of bearing the weight and sliding freely in the -direction, to achieve this motion.
-3 -Utilization of the available space in the straight section of the TPS is now discussed.After installation of the RF cavity in the short straight section of the TPS, only 1 m of space remained downstream.The EPU constructed to fulfill the needs of circularly polarized light from the original bending magnet users was 0.8 m long.Given the limited space available in the -direction, the main challenges for designing this EPU centered around the installation of the phase driving mechanism and access for subsequent maintenance.In previous EPUs, the openings on the frame were sufficiently large for installation and maintenance of the phase driving mechanism.However, this was not case for the 0.8 m long EPU.To overcome the problem, we designed an I-shaped backing beam made of 316L stainless steel and installed the phase driving mechanism inside it, as depicted in figure 1(c).To meet future maintenance requirements, we also had to take into consideration the need to disassemble the mechanism.Thus, the backing beam was fabricated with pre-allocated holes to facilitate access for maintenance when necessary.This completes the description of the mechanical structure of the TPS EPU.The related design considerations for the parts closer to the operational position of the electron beam will be detailed in subsequent sections.Being closer to the electron beam implies that, during construction, we must not only prioritize mechanical strength but also pay special attention to mitigating the adverse effects of the magnetic fields.

Configuration and adjustment of magnet submodule
Each individual magnet is fixed onto the mechanical structure, and secured independently using a keeper.Each submodule is comprised of five or seven magnets grouped together, which is fixed onto the sliding beam structure with a 45degree dovetail, as depicted in figure 2(a).The adjustment of the local magnetic field is achieved by fine tuning the position of the magnets in space rather than using magnetic materials attached to the magnet surfaces.The vertical movement of the magnets is achieved by the horizontal movement of an inclined wedge, while the horizontal movement is achieved by the rotation of a horizontal adjustment screw, as illustrated in figure 2(a).This adjustment method has proven to be more convenient for magnetic field optimization compared to using different thickness shim plates, but it requires careful attention because of the numerous fasteners such as screws and washers that have to be used.Given the substantial forces of attraction and repulsion between magnets, in the case of the EPU66, for instance, the maximum force exerted on a single magnet reaches 0.64 kN, resulting in considerable stress on the fasteners.Through simulations, it has been observed that -4 -under maximum force, the internal stress in the screws can reach up to 60 MPa.Additionally, to minimize adverse effects on the magnetic field, the permeability of the fasteners must be less than the permeability of the permanent magnet material (∼ 1.05), that is, less than 1.005.To meet the requirements of high mechanical strength and low permeability, a more expensive option would be to choose titanium metal with special surface lubrication treatment.Alternatively, the use of a weakly magnetic stainless steel (316LN) could also meet the desired specifications.
From our experience, it is known that even when manufacturing screws from stainless steel (316LN) through cold forging, observable hysteresis curves may still be present, as shown in figure 2(b).Adequate heat treatment can significantly reduce the ferromagnetic properties, but attention must be paid to its impact on the mechanical strength.For instance, based on the results of tensile strength experiments, after heat annealing, there was a decrease in the ultimate strength and yield strength of the fasteners from 790 and 410 to 535 and 275 MPa, respectively.Despite this reduction in mechanical strength due to heat annealing, we were still able to maintain a safety factor of 4.5, allowing the fasteners to operate within the elastic region according to our usage requirements.

Mechanical inspection under magnetic forces
We now discuss the results of mechanical inspection measurements under the influence of magnetic forces for the TPS EPU.Dial gauges were set up on the non-sliding magnet row C to measure the displacement of the keeper and sliding beam when diagonal rows A and D slide in the same direction, as shown in figure 2(a).In this assembly, the keepers are stacked in such a way that there is a direct and seamless fit between them.Consequently, there are no gaps in the -direction.This not only makes helps prevent displacement of the keepers in the -direction but also results in cohesive behavior among all the keepers, as evidenced by our measurement results.We observed no significant differences in the displacement of the keepers for horizontally and vertically magnetized magnets.For example, in the EPU66, the displacement of the keeper and sliding beam in the horizontal direction was approximately 7 and 3.2 μm, respectively, as shown in figure 3(a), which aligns well with our specification requirements of less than 10 μm.It is worth noting that, to achieve these results, in -5 -addition to fixing the sliding beam onto the backing beam with a slide rail, we also installed a slide rail between the two sliding beams to limit deformation of the sliding beam and further reduce any displacement of the magnets.However, such a design requires attention to the adverse effects of the high permeability rails on the magnetic field in the gap.Based on our construction experience, since the installed rails are on the weak magnetic side of the Halbach magnet array, the impact can be significantly reduced by maintaining an appropriate distance.
Furthermore, we also investigated the influence of the magnetic forces on the backing beam, which carries the row of magnets, and the sliding beam.Dial gauges were placed at three positions on the backing beam for measurement along the x-direction on the outer side of the backing beam, as depicted in figure 1(a).This arrangement allowed us to measure the deformation of the backing beam during the transition from attraction to repulsion, as the phase changes from HL to VL polarization when the EPU gap is at its minimum.Since our EPU has a C-type structure, meaning it is not a closed structure from the side, as shown in figure 1(c), the backing beam undergoes rotation along the -axis when subjected to force.Figure 3(b) illustrates the rotation angles of the backing beam measured at three positions under different gaps for the EPU66.It can be observed that as the magnet gap increases, the magnetic force decreases, and the angle of rotation of the backing beam becomes smaller.The angle of rotation is smaller at the position where the saddle is fixed to the frame, because of the direct support of the frame, than at the other two positions.The maximum angle of rotation occurs at the endpoint of the free end, approximately 176 μrad.According to our simulation results, the influence of the rotation angle of the backing beam on the multipoles is negligible [10].However, under the influence of the magnetic forces, the change in the variation of the gap along the -axis causes a systematic phase error.Addressing and eliminating this systematic error for optimization of the magnetic field is an important topic that will be discussed in the next section.

Magnetic field optimization
Although we achieved a significant reduction in systematic errors caused by mechanical deformation through the mechanical construction process, further optimization of the magnetic field was still -6 -required to avoid impacting the operation of the storage ring and to ensure maintenance of a high-quality light source.In addition to mechanical deformation, another source of magnetic field error arises from the inherent non-uniformity of permanent magnets, meaning their differences in geometric dimensions and magnetization characteristics.Generally, the differences in magnetization angle error and surface magnetic field intensity of the magnets must be controlled to be within the range of ±1 degree and ±1%, respectively.Of course, differences can be reduced by stricter magnet selection, but this comes at a higher budgetary cost.Given the aforementioned specifications, a two-step process of magnet sorting and shimming was used to reduce magnetic field errors caused by mechanical deformation and differences in the magnets.A detailed explanation of our approach and the results will be given in the next two sections.

Phase error and trajectory
To expedite the construction timeline, the fabrication of the mechanical structure of the EPU and the assembly of the magnet submodules occurred at the same time.Only the magnetization angle and geometric data provided by the supplier were available during the magnet assembly phase, data on the mechanical structure were lacking.Utilizing the available data, the Radia [11] simulation software was employed to optimize the magnet arrangement of the EPU.The magnet submodules were then assembled based on this optimized arrangement.It should be noted that, at this stage, practical considerations such as defects in the geometry of the magnets, magnetization uniformity, and mechanical deformation have not been accounted for during magnetic field optimization.Therefore, the spatial magnetic field of each magnet submodule was measured to obtain the first field integral of the magnetic pole on the axis and assess the multipoles.The magnetic field measurements supplemented the magnetic field data necessary for constructing the EPU.To optimize the magnetic field of the EPU, we required not only magnet data but also the anticipated distribution of the magnetic fields after the complete installation of the magnets.The next challenge was thus to predict the EPU magnetic field distribution based on the magnetic field data obtained for the magnet submodules.This involves understanding the precision of mechanical assembly and the distribution of deformations under magnetic forces.
One approach involved measuring the variations in the gaps between the sliding beams in the vertical and horizontal directions under the influence of the not-yet-installed magnets.This data can be combined with the results of simulations of mechanical deformation under magnetic forces to predict the gaps in the magnet row from which the overall magnetic field distribution for the entire system can be inferred.Based on our experience, this indirect prediction method proved feasible for shorter examples, like for the EPU48.However, the larger mechanical deformation and accumulated assembly errors for longer EPUs with greater magnetic forces rendered this approach ineffective for predicting the overall magnetic field distribution of the entire system.To address the issue, we opted for a more direct approach, which involved installing all the magnets and measuring the magnetic fields directly.By comparing these measurements with the magnetic field measurements for the submodules, we could identify systematic magnetic field errors caused by mechanical deformation.Although the process involved an additional disassembly of the magnetic submodule, the mechanical deformation was not significantly affected by the rearrangement of the position of the submodules.Using the above method, we could accurately and directly obtain systematic errors in the magnetic field.Based on this foundation, we effectively conducted submodule sorting.Figure 4 illustrates -7 -the distribution of the deviation of the first field integral (dI/I) at each pole.The measured and predicted results exhibit similar behavior, with a maximum difference of less than 0.3%, whether in the vertical or the horizontal magnetic field.
After obtaining an accurate prediction of the magnetic field distribution of the entire EPU, a simulated annealing-based sorting algorithm was applied for submodule sorting.In the sorting code, two accumulation functions of dI/I at each pole were strongly correlated with the phase error and the trajectory, respectively [12].The trajectory straightness, phase error, and quadrupole magnetic field error were appropriately weighted and considered for cost function optimization [13].Take the EPU66 as an example to illustrate the process of submodule sorting.First, we randomly installed a set of submodule arrangements for magnetic field measurement and comparison.The distribution of dI/I for the random arrangement exceeded ±1%.After sorting, it decreased to approximately ±0.5%, as shown in figure 4. Additionally, this had a significant optimization effect on the phase error, horizontal, and vertical trajectory straightness, as depicted in figure 5.There was a substantial decrease in the phase error for this random arrangement which from as much as 30 degrees to 4.1 degrees after the submodule sorting step.This sorting process demonstrated its effectiveness in alleviating the burden of magnetic field optimization.The result also provides a solid foundation for further shimming if additional magnetic field optimization is required.
The EPU needs to operate properly in many distinct phase modes; this means that the magnetic field for each mode has to meet the specifications.The HL and VL modes were considered when targeting the maximum vertical and horizontal magnetic fields for magnetic field shimming.The main sources of magnetic field errors on the axis were identified by measuring the four magnet rows off-axis.The positions of the magnets were adjusted horizontally and vertically using the magnet adjustment mechanism, as shown in figure 2(a).This allowed for effective magnetic field optimization.After adjustments carried out over approximately two weeks, there was a decrease in the phase error from 4.1 degrees after sorting to approximately 3 degrees, as shown in figure 5(a).The straightness of the vertical and horizontal trajectories was also sufficient to meet the requirements, as illustrated in  figure 5(b) and (c).This completed the magnetic field optimization of the central segment.How we met the requirements for multipoles by adjusting the magnets at both ends will be explained below.

Phase dependent and independent field integrals
After optimization of the main magnetic field of the central segment for the EPU, to improve the radiation quality, attention needs to be paid to the construction of the EPU, to further reduce its impact on the storage ring.During the laboratory construction phase, a stretched wire system was used to measure and correct the static multipoles, also known as errors along a straight line of magnetic fields.The correction methods and results used will be discussed in this section.The periodic magnetic field encountered by electrons in the EPU when performing periodic oscillation trajectories, results in additonal multipoles, referred to as dynamic multipoles.We will discuss our experience of EPU operation in the next section.Static multipoles can be divided into phase-dependent and phase-independent components because the EPU operates in different phase modes.During the construction process, we first eliminated the dependent components, to ensure that the field integrals are the same when the EPU operates in different phase modes.The phase-independent components can then be collectively addressed.
For phase-dependent field integral (PDFI) correction, we employed the following method.The surfaces of the magnets at both ends were overlaid with iron shims of a nonlinear material, as illustrated in figure 6(a).The PDFI was corrected is based on the HL mode with the aim of eliminating differences in the first field integrals between the other phase modes and HL.The differences in the vertical and horizontal magnetic fields are labeled as   and , respectively.Figure 6(b) depicts the   and  obtained using an iron shim with the overlay dimensions (,  , ) = (0.1 mm, 10 mm, 16.5 mm), placed in the  plane of the V2 magnetic block in magnet row D. The observed results were similar for LC and RC, but compared to VL, the impact of the iron shim was smaller.Comparison with the Radia simulation results also helps to explain and validate the experimental measurements.The simulation results facilitate prediction of the expected results before fixing and attaching the iron shims to the magnets.The next question is where the iron shims should be attached to most effectively correct the PDFI in the vertical and horizontal magnetic fields.
-9 - In the APPLE structure, there are numerous positions and combinations where iron can be attached for magnetic field correction.However, the smaller horizontal gaps between the magnets mean that iron shims have to be attached on the   plane to facilitate PDFI correction while ensuring safe horizontal gaps during phase mode changing.It is necessary to understand the influence of the vertical and horizontal magnetic fields on the PDFI caused by attaching the iron shims in position for the four magnet rows and four types of magnets (V1, V2, H1, H2).During APPLE operations at the TPS, the diagonal magnet rows move in the same direction.Due to symmetry, the 32 magnetic fields mentioned above can be simplified to only four characteristic scenarios.The remaining magnetic results can be deduced from these four cases.In other words, if the   and  for the V2 and H2 magnets in row C, with attached iron shims, are known, the results for the remaining rows can be deduced, see table 2. The results for magnets V1 and H1 will differ by a negative sign.Due to symmetry, through systematic inference we can perform separate PDFI corrections for the vertical and horizontal magnetic fields.For instance, after attaching iron shims to the V2 magnets in rows A and C, we can correct  without affecting dIy.For V1 in row A and V2 in row C,   can be corrected without affecting .Based on our experience, initial corrections of the PDFI trends were made for the ±VL, LC, and RC using V magnets and then differences between LC and RC were corrected using H magnets. Figure 7(a) illustrates the corrected results.It can be seen that before installation of the iron shims, the PDFI could be as high as 0.2 T mm but using the correction method discussed above, the PDFI could be lowered to ±0.015 T mm.
After completing PDFI correction, we performed phase-independent field integrals correction using a permanent magnet structure, the so-called "magic finger".The simulated annealing algorithm was used for optimization of the magnet arrangement.The static field integrals were corrected to ±0.03 T mm within a range of ±20 mm, as shown in figure 7(b).It is worth mentioning that the magnetic field optimization step during submodule sorting also led to a significant improvement of static multipoles.

Experience of operation
In this section, we will elaborate on the experience of operation of the EPUs installed in the TPS, as illustrated in figure 8(a).This experience encompasses the impact of the EPU on the storage ring and the effect on its operation within the storage ring.As discussed in the previous section, the problem of static multipoles from the EPU was successfully mitigated to reduce adverse effects on the storage ring.However, the inherent structure of the APPLE EPU means that there are horizontal gaps between the magnet rows which in turn leads to poorer magnetic field uniformity along the horizontal axis than is the case with conventional insertion devices, especially when operating in VL mode.This results in the creation of dynamic multipoles, which cannot be measured in the laboratory, with noticeable effects on the storage ring, such as tune shifts, variation in the beam size, and injection issues resulting from a reduction in the dynamic aperture [14,15].For example, during the operation of EPU48 in TPS, it was observed that as the gap decreased, the tune shift would become more pronounced, as shown in figure 8(b).Comparison to other phase modes shows that the behavior is most noticeable in the VL mode which is characterized by the poorest magnetic field uniformity.The magnetic field of the APPLE EPU was simulated to quantify the impact of dynamic multipoles on tune shifts [16].Through a comparison of these simulation results with beam-based measurements, we could conclusively ascertain that it was the dynamic multipoles which governed the tune shifts.
In other words, we effectively minimized the impact of static multipoles in the laboratory.Prior -11 -experiments had confirmed that the issue of the impact on the injection efficiency could be effectively addressed using the flat wire structure [17].Although injection efficiency has not posed a challenge at the current TPS EPU installation, the utilization of the flat wire methodology has proven effective at managing the impact on the storage ring caused by the EPU.To achieve stable operation of the EPU in the TPS, it is crucial to address the impact of radiation on the control system.We had observed that when the electron beam in the storage ring is dumped or lost, error messages would appear on the optical encoders used for reading the positions of the magnet rows in the control system.This could lead to unsafe magnet row control behavior, because of the closed-loop control logic used, resulting in a surge in magnet row motion.This behavior could be attributed to radiation-induced damage to the Flash and Random-Access Memory (RAM) components within the optical encoders, causing bit flips, commonly known as soft errors in semiconductor test standards [18].Operational experience showed that such soft errors could be recovered from by restarting the power.Although damage to the optical encoders could be recovered from, it does pose some challenges and risks for operation of the EPU.This issue in the control logic was addressed for existing installed and operational EPUs, by installing linear displacement sensors (PZ67-S-075) without semiconductor components to assist in determining the optical encoder readings.While the resolution of the linear displacement sensor is much lower than that of an optical encoder, it is sufficient to determine the magnet rows position and avoid the risk of large-range overshooting.
In addition to the above protective measures, several new mechanical design features were implemented in newly constructed EPUs that were not included in earlier installations, such as the EPU46.These included the following: first of all, a reduction in the number of electronic components and optical encoders.We replaced the design with four motors driving four spindles with a mechanism driven by two motors, separately controlling the left and right rotating screws in series.Although this design reduces the number of electronic components by half, high mechanical precision is necessary to achieve good reproducibility of gap opening and closing.For example, the reproducibility obtained with the newly constructed EPU66 is better than 1 μm.Second, the distance between the optical encoders and the electron beam was increased to reduce the exposure of the optical encoders to -12 -radiation.In the EPU66, the distance between the optical encoders and the electron beam was doubled.Theoretically, this would significantly reduce the radiation exposure by more than 50%.Third, we used encoders with lead shielding in the spaces allowed.The Renishaw encoders were protected with a layer of lead material exceeding 12 mm in depth.These new construction designs were adopted for the EPU66 installed in 2020, and no control system issues due to errors in the optical encoder readings have been observed to date.

Conclusion
In this article, we share our experience about the design, construction, and operation of the APPLE EPU.To maximize the photon flux and make full use of the installable space, we constructed EPUs with varying lengths, ranging from 4.4 to 0.8 m, and various mechanical design configurations.The experience shared in this article include measurements and considerations of the mechanical and magnetic properties of the materials used in the construction.By presenting mechanical measurements under magnetic force, the article also explains how to eliminate systematic magnetic field errors caused by mechanical deformations.The magnetic field measurement results of a single magnet can effectively predict the overall magnetic field produced by complete installation of the magnets, facilitating efficient magnet sorting and subsequent magnetic field shimming.The article details how to handle differences in magnetic fields when operating the EPU in different phase modes.The methodology proves that the magnetic field of the EPU can be optimized during the laboratory measurement and correction stages.The stable operation of the EPU, including its impact on the storage ring and how it is influenced by radiation is also described.

Figure 1 .
Figure 1.Mechanical layout of the EPUs at TPS: (a) the 4.4 m standard EPU in the short straight section of TPS; (b) a taper type EPU; (c) the 0.8 m EPU installed downstream from the RF cavity.

Figure 2 .
Figure 2. (a) Submodule and magnet fixation with the magnetic field adjustment mechanism; (b) magnetic hysteresis curve of the fastening component used for fixing the magnet, including the measurement results obtained with (solid line) and without heat annealing conditions (dashed line).

Figure 3 .
Figure 3. Results of mechanical deformation under magnetic force after complete installation of the magnets: (a) statistical histogram of deformations in the horizontal direction for the keeper and sliding beams; (b) rotational deformations of the backing beam at three positions: endpoint (dots), middle (open triangles) and saddle (squares).

Figure 4 .
Figure 4. Distribution of the deviation of the first field integral at each pole, including measurement results for randomly arranged magnets (open dots) and optimized magnet arrangements (solid dots).Prediction results on the axis (thick line) are compared to the measurements for the: (a) vertical field; (b) horizontal field.

Figure 5 .
Figure 5. Magnetic field measurement results under three conditions: (i) random arrangement of magnets, (ii) after submodule sorting and (iii) after magnetic field shimming: (a) phase error.RMS values are labeled on the graph; (b) horizontal trajectory; and (c) vertical trajectory corresponding to the second field integral evaluation results from the vertical and horizontal field profile, respectively.

Figure 6 .
Figure 6.(a) Schematic diagram of iron shims applied for correcting the phase-dependent field integrals.The four rows of magnets constituting the APPLE structure are labeled A through D; each magnet row is composed of four types of magnets: H2, V1, H1 and V2.The arrows represent the direction of magnetization; (b) the differences in the first field integrals between other phase modes and HL, when an iron shim is overlayed.The vertical field appears at the top and the horizontal field at the bottom.The measurement results obtained under different phase modes are represented by symbols, while the simulation results are depicted by lines.

Figure 7 .
Figure 7. (a) The results of phase-dependent field integral correction obtained using the iron shims, before (dashed line) and after correction with the vertical field shown on the top and the horizontal field on the bottom; (b) horizontal distribution of the vertical (top) and horizontal (bottom) field integrals under three conditions: random arrangement of magnets (dashed line), after submodule sorting (dotted line) and after magnetic field shimming.

Figure 8 .
Figure 8.(a) The stably operating EPU168 and two EPU48 structures installed in the TPS storage ring; (b) gap-dependent tune shift in the horizontal (Δ  ) and vertical (Δ  ) planes under three phase modes.Predictions from calculation of dynamic multipoles: horizontal and vertical (dashed line) tune shifts.Results from measurements based on beams: horizontal and vertical (open dots) tune shifts.

Table 1 .
APPLE-II type EPUs at TPS.

Table 2 .
The correlation of phase-dependent field integrals caused by the iron shim at different magnet positions within the four magnet rows.