Beam-based alignment at the Cooler Synchrotron COSY as a prerequisite for an electric dipole moment measurement

The J\"ulich Electric Dipole moment Investigation (JEDI) collaboration aims at a direct measurement of the Electric Dipole Moment (EDM) of protons and deuterons using a storage ring. The measurement is based on a polarization measurement. In order to reach highest accuracy, one has to know the exact trajectory through the magnets, especially the quadrupoles, to avoid the influence of magnetic fields on the polarization vector. In this paper, the development of a beam-based alignment technique is described that was developed and implemented at the COoler SYnchrotron (COSY) at Forschungszentrum J\"ulich. Well aligned quadrupoles permit one to absolutely calibrate the Beam Position Monitors (BPMs). The method is based on the fact that a particle beam which does not pass through the center of a quadrupole experiences a deflection. The precision reached by the method is approximately 40 micro meter.


I. INTRODUCTION AND MOTIVATION
The observed matter-antimatter asymmetry in the universe cannot be explained by the Standard Model of particle physics and cosmology alone. Additional CP violating mechanisms beyond the already known effects are needed [1]. Evidence for additional CP violating effects is accessible from a measurement of permanent Electric Dipole Moments (EDMs) of subatomic particles. The EDMs violate both parity and time reversal symmetry, and are also violating CP symmetry if the CPT-theorem holds. However, the EDMs predicted by the Standard Model are orders of magnitudes too small to explain the dominance of matter over antimatter in the universe. The discovery of a large EDM would hint towards physics * corresponding author: t.wagner@fz-juelich.de beyond the Standard Model and contribute to the explanation for the dominance of matter over antimatter in the universe.
The observation of EDMs of subatomic particles is possible by observing their interaction with electric fields. For neutral particles (e.g., the neutron [2]) this can be done in small volumes. Because of their acceleration in electric fields, for charged particles this constitutes a more difficult task. The Jülich Electric Dipole moment Investigation (JEDI) Collaboration aims to measure the EDM of the proton and the deuteron in a storage ring. The control of systematic uncertainties is of paramount importance, making the design of a dedicated EDM storage ring, and in particular the alignment of the ring elements [3] and the correction of the closed-orbit [4] a very demanding task. At the Cooler Synchrotron (COSY) (see Fig. 1) of Forschungszentrum Jülich, a first storage ring EDM measurement is presently being carried out for deuterons [5] and being planned for protons. In order to improve the precision of the machine, a beambased alignment method is applied to align the magnetic centers of the quadrupole magnets and the BPMs. This beam-based alignment method has been applied at electron [6] and hadron [7] machines before. This procedure requires the quadrupoles to be mechanically aligned. This was achieved by a surveying procedure 1 to a precision of 200 µm. The detailed alignment data are listed in Tab. III and Tab. IV in the appendix. Several tests were performed to determine the effect of a full beambased alignment survey of all quadrupoles in the accelerator. The first two tests [8,9] showed that the offset between the quadrupoles and BPMs amounts to several mm. Thus the beam-based alignment measurement has to be performed for all quadrupoles in the accelerator in order to have all BPMs properly calibrated.
The full measurement campaign for the beam-based alignment has been performed at COSY for all 56 quadrupoles in the ring. With the use of the 31 BPMs it was possible to determine the center of the 56 quadrupoles in COSY and with that calculate the offset between the BPMs and quadrupoles to get a better calibration of the BPMs. In addition this measurement also allowed to check the alignment of the quadrupoles in the straight sections of the accelerator with respect to each other, where it was found out that some magnets are not on axis with the other quadrupoles (in contrast to the alignment survey results).
This paper is organized as follows. In section II a short introduction is given, in which the method is described. Section III describes the measurement at COSY and the analysis of the data followed by section IV discussing the results.

II. THEORETICAL DESCRIPTION OF BEAM-BASED ALIGNMENT
In order to determine whether a particle beam passes through the center of a quadrupole, one can use the effect that an off-center beam experiences a dipole component leading to a kick of the particle beam. By varying the quadrupole strength, one simultaneously varies the magnitude of the dipole component of the field, which the off-center beam experiences. This results in a measurable closed-orbit change that depends on the offset of the beam inside the quadrupole whose strength was varied. The orbit change in one plane (here horizontal, x) can be described by [6] ∆x(s) = ∆k · x(s 0 ) Bρ  From Eq. (1) one can see that the orbit change ∆x(s) at a given position s is proportional to the beam position inside the quadrupole x(s 0 ). As not all parameters in Eq. (1) are perfectly known all along the accelerator, the proportionality is quite useful. This permits one to construct a merit function to extract the optimal position of the beam inside the quadrupole from the measured data. The merit function that was used for this measurement is In order to determine the merit function f (x(s 0 ), y(s 0 )), one has to take two measurements for each beam position inside the quadrupole. One measurement with slightly increased (+∆k) quadrupole strength and another one with slightly reduced (−∆k) quadrupole strength. The differences of the beam positions x i and y i at the i-th beam position monitor are summed up in quadrature for all beam position monitors (see Eq. (2)). It is easy to conclude that the merit function is proportional to the offset of the beam inside the quadrupole squared f ∝ i (∆x i ) 2 + (∆y i ) 2 ∝ a(x(s 0 )) 2 + b(y(s 0 )) 2 , where the factors a and b are introduced because the sensitivity to the strength change of the quadrupole is different in horizontal and vertical direction. The shape of the merit function is a paraboloid and by finding its minimum one can determine the optimal position of the beam inside the quadrupole.  [10] with labeled quadrupoles and BPMs along the ring. The black elements represent the quadrupoles and the yellow elements the BPMs. The quadrupoles in the straight sections are called "QT", whereas the quadrupoles in the arcs are called "QU", which is used to distinguish them due to a different width of the magnets. The dipoles are shown in red and horizontal and vertical steerers in gray and purple, respectively.

A. Hardware upgrades at COSY
In order to perform the measurement each quadrupole strength has to be modified individually. In the powering scheme of COSY though, four quadrupoles are powered by one main power supply. Some quadrupoles are equipped with back-leg windings, which allows for an individual control. A first beam-based alignment measurement has been performed with those 12 quadrupoles already [9].
As not all quadrupoles could be equipped with back-leg windings, a new solution was found. A smaller floating power supply was added in parallel to one quadrupole magnet in order to add or bypass some of the current. The devices chosen are source-sink power supplies 2 and are ideally suited for the beam-based alignment. For cost reasons, it was not possible to acquire 56 of these power supplies. Instead it was decided to purchase only four of them and connect them as needed during the beam time. For that, connectors were mounted on each quadrupole, where the mobile power supplies can be plugged in.
The communication with the power supplies was realized with serial communication over Ethernet in order to dynamically control them during the measurement. 2 Höcherl & Hackl GmbH https://www.hoecherl-hackl.com/ As an additional safety aspect the power supplies were disconnected during the acceleration of the beam not to interfere with the ramping of the quadrupoles and were later connected with a relay after the acceleration.
With this hardware upgrade and the existing system of 31 BPMs the measurements described in the next section could be performed.

B. Measurement procedure
As a first step a rough calibration of the BPMs was performed where only the quadrupoles, which have a BPM next to them, were measured for the calibration of the BPMs. This first calibration was applied and then the measurement for all the quadrupoles was performed as a second step. This first calibration was done in order to know the approximate optimal position inside the quadrupoles and use a scan with a better resolution and smaller range afterwards.
The measurement procedure scans multiple different beam positions inside the quadrupole to find the optimal position, where a strength change does not steer the beam. For the measurement the beam was prepared and then the additional power supplies were connected with the help of a relay. Then during the cycle the beam was moved to a position inside the quadrupoles with the help of nearby steerers using a local orbit bump. This orbit bump was kept while manipulating the quadrupole strength and then removed in the end to have a compar-  ison of the orbit in order to check for long-term drifts during the cycle. In between the variation steps of the quadrupole, the quadrupole was also set to nominal strength in order to check for beam movement due to other effects, which has to be corrected for. The quadrupole strength variations were done all in a single cycle, as different injection points with a shift of a few tens of µm have been observed at COSY. This was done to avoid additional systematic errors. The pattern of the quadrupole strength variation can be seen in Fig. 2.

C. Optimal position inside the quadrupole
Each measurement for one quadrupole is characterized by 50 points (i.e. 50 cycles), where the effect of the strength change was measured for different positions in the quadrupole (i.e. steerer settings). The choice of 50 points was done to have sufficient information for the determination of the optimal position of the beam inside the quadrupole magnet and to be able to finish the measurement in the given time frame (50 cycles taking approximately 1.5 hours). For each of the 50 points the measurement procedure described beforehand is used and then the merit function (see Eq. (2)) is calculated. Some of the 50 measured points had to be discarded due to beam loss, low beam current at corner points and other issues. The resolution of the BPM reading (20 µm) is used to compute the error for the merit value of each point. Note, that the absolute transverse position of the BPM with respect to a fixed reference frame is not needed here. Then a paraboloid is fitted to the data points, with which one can extract the minimum, i.e. optimal position inside the quadrupole. The error on the minimum for all the fits is of the order of 10 µm. Since there is no BPM inside the quadrupole, the two BPMs on either side of the quadrupole were used to extrapolate into the quadrupole to determine the beam position inside. This extrapolation also took the steerers and their beam deflections into account.
An example of such a fit is given in Fig. 3, where one can see the shape of the paraboloid as expected from the merit function. In addition one can see the optimal position inside that quadrupole as the green point, where the lines at the bottom of the plot are to guide the eye. The quadrupole change ∆k was kept constant during such a scan. Figure 3. An example of a fit for the determination of the optimal position inside a quadrupole is shown. This example shows a measurement of QU17, which is located in the arcs. The white points are the data points, where on the x-and y-axis the horizontal and vertical displacements of the beam inside the quadrupole are shown, and on the z-axis the calculated merit function f (x(s0), y(s0)) is depicted. The displacement of the beam inside the quadrupole is obtained by extrapolation from BPMs up-and downstream of the quadrupole. The z-axis has been drawn upside down to make the minimum (highest point in the plot) easier to identify. The data points have a small error (≈0.008 mm 2 ), which is not displayed here. The fit to the data is the colored paraboloid, where the green dot marks the minimum of the fit. In order to guide the eye where the minimum is two lines at the bottom of the plot have been added.
The two to four measurements that were taken for each quadrupole were combined to get a value for the optimal position in each of the quadrupoles. In some cases the variation of the optimal positions between the individual measurements is around 150 µm, which is larger than the uncertainty on the minimum of the fit (≈10 µm). In other cases the variation between individual measurements is nearly zero. Thus the error on the combined optimal position from the repeated measurements has been estimated by looking at the distribution of the different spreads of all the quadrupoles to get an estimate on how much repeated measurements differ from each other. From this an error of 40 µm has been calculated and applied to all optimal positions. An example of the spread of the repeated measurements can be seen in Fig. 4, where one can see the individual measurements and their errors from the fit. In addition a weighted average of the individual measurements with an error band of 40 µm is shown.
The resulting optimal position in terms of the uncalibrated BPMs in all the quadrupoles are shown in Fig. 5 with the light blue bars. There one can easily see that optimizing the beam to the zero position of the uncalibrated BPMs will lead to a beam not passing through the center of the quadrupoles. In addition one can also see that the quadrupoles in the straight sections which are close together (see Fig. 1) are usually on one axis (compare Tab. III), which is expected as all quadrupoles were aligned mechanically with a precision of 0.2 mm to the coordinate system of COSY. This is the case in the straight sections as there the quadrupoles are close together in sets of four, whereas in the arcs they are more equally distributed.

D. BPM calibration
With the now known optimal positions inside the quadrupoles one can calibrate the BPMs such that the new zero in the BPMs corresponds to the quadrupoles also being at the zero of the coordinate system (see black dashed line in Fig. 6). The BPM calibration is quite straight forward with all the optimal quadrupole positions known. This will move the optimal position inside the quadrupoles close to the zero orbit in the BPMs, as there are more quadrupoles than BPMs. In addition one can use the sets of four quadrupoles in the straight sections for the calibration as nearly all of them have a BPM inside them and are aligned mechanically. Thus not only the two closest quadrupoles but the whole set is used for the calibration. An example for the calibration of a BPM can be seen in Fig. 7, where the calibration was computed with the help of nearby quadrupoles.
Some observations also resulted from the calculation of the calibration, which is that some of the quadrupoles are actually not aligned correctly within the set of four quadrupoles. This will be discussed in more detail later. In addition a part of the positions inside the quadrupoles could not be moved close to the zero line with the calibration of the BPMs, which is also due to a lack of BPMs that can be calibrated in that section, as there are more quadrupoles than BPMs, see Fig. 5.

A. Optimal position inside the quadrupoles
For each quadrupole the optimal position has been extracted from the measured data as described above. These positions then have been used to calibrate the BPMs properly in order to have the zero orbit (see black dashed line in Fig. 6) in the center of the quadrupoles. With the new calibration of the BPMs one can recalculate the optimal positions in the quadrupoles in that coordinate system and see the improvement, that the centers of the quadrupoles are now at or close to the zero line of the coordinate system. This can be seen in Fig. 5, where one can compare the light blue bars, which are the calculated optimal positions inside the quadrupoles before calibration and the dark blue bars, which are after the calibration.

B. Alignment of the quadrupoles
As mentioned before the procedure requires that all quadrupoles are mechanically aligned. According to the surveying this is the case within a tolerance of 0.2 mm. What one can also see in Fig. 5 is that not all optimal positions in the quadrupoles could be moved close to the zero line. For the straight sections, where there are sets The error on the optimal positions is 40 µm as indicated by the red error-bars. The optimal positions before the calibration are not close to zero, which is corrected after the calibration, as the optimal positions have been pulled closer to zero. In the straight sections the quadrupoles labelled QT are close together in sets of four and are expected to be on the same axis, as they refer to the same BPMs. Thus one can fit a straight line through them to calibrate the BPMs there. For the arcs, where the quadrupoles are labeled with QU, this is not the case, as they are distributed more equally along the arc. After the calibration one can still see some patterns that deviate from zero, which correspond individual quadrupoles that are off by up to 1.2 mm. In the straight sections one can compare that to the other three quadrupoles in the set and see a misalignment of the quadrupole. In the arcs the three deviating quadrupoles without a BPM close by and thus one can not pull them to the zero line. There it is not clear which quadrupole could be misaligned as a comparison is not possible and one has to trust in the mechanical alignment to be correct. of quadrupoles close together, one can check if individual quadrupoles are not correctly aligned, which is the case for some of them. This can be seen for example for quadrupole QT01, which is not on the same axis as the rest of the set (see Fig. 5, where the first four optimal positions inside the quadrupoles do not fit on one line for the horizontal direction). This observation has been further investigated with a local re-measurement of the mechanical alignment of the quadrupoles. The mechanical shift of the magnetic center has been verified by observing a small rotation of the quadrupole, which leads to a shift of the magnetic center off of the beam axis like observed with the beam-based alignment. For the arc sections of the accelerator this comparison is not possible, as there are multiple elements in between the individual quadrupoles. The outliers in the arcs are the quadrupoles, which do not have a BPM close by and thus could not be perfectly accounted for. Here one has to trust the mechanical alignment and assume that all the quadrupoles in the arcs are correctly positioned. A further observation in Fig. 5 is that there is a pattern in one part of the straight section (QT04-QT12, vertically), where the optimal position inside the quadrupoles rises and then falls. This effect could also not be corrected for with the calibration of the BPMs due to technical reasons.

C. BPM calibration
The calibration of the BPMs has been calculated as explained above and is depicted in Fig. 8. There one can Figure 7. In order to calibrate a BPM in the straight sections all four quadrupoles were used to calculate the BPM offset. The bars are the optimal positions in the quadrupoles, where one can fit a straight line (top plot). With that line one can then calculate the offset at the position of the BPM, which is the new BPM calibration. The optimal quadrupole position after the BPM calibration can be seen in the lower plot, where the optimal quadrupole positions are all close to zero. The shaded region around the fit is used to indicate the alignment precision that the company Stollenwerk achieved. For this specific set of quadrupoles it was better than 0.2 mm, but this is not the case for all of them. see the calibration that has to be applied to the BPMs in total. Not included in the bars are mechanical shifts of BPMs, which have been introduced on purpose, e.g. BPM No. 25, which is a BPM close to the extraction.
The overall pattern in the offsets is that for the vertical direction the offset tends to be positive. This can be explained by the fact that the BPMs are mounted on the beam pipe, which itself is mounted on some fixed points, but otherwise laying in the iron yokes of the magnets. Without further support this causes a shift downwards, thus a positive offset has to be applied. For the horizontal direction also a trend towards positive values can be seen as well, but here no easy explanation is obvious. All offsets were applied to the BPMs for future experiments at COSY. On the x-axis the BPM name is displayed and on the y-axis the corresponding offsets. Before the beam-based alignment was done most of the offsets were zero and the BPMs were not properly calibrated. One sees that the BPMs are off by several mm with respect to the optimal beam axis given by the magnets.

D. Improvement of the orbit
Now the orbit in the accelerator will improve, but some steering power is still needed, as the mechanical alignment of the quadrupoles is only 200 µm, whereas we could determine the optimal positions inside them with a precision of 40 µm. Thus the design beam axis of the accelerator (blue horizontal line in Fig. 6) will not exactly match the optimized orbit in the machine. The optimized orbit, going through the zero reading of the calibrated BPMs (red line in Fig. 6), will be significantly closer to the center of the quadrupoles than the design orbit, as the quadrupoles are slightly off the design axis due to their alignment precision. The fact that the beam does not pass exactly through the centers of the quadrupoles is due to the optimization algorithm, which makes sure that the beam passes through the zeros of the BPMs. The closer a BPM and quadrupole are together the closer the beam passes through the quadrupole center.
In order to judge by how much the orbit improved due to the correct calibration of the BPM offsets two measurements were performed. One with the BPM calibration before applying the offsets and the other one afterwards.
For both measurements one tried to correct the orbit as good as possible with the orbit correction software [11] used at COSY. It tries to move the orbit as close as possible to the predefined golden orbit, which corresponds to zero readings in the BPMs. This is done by using the steerers in the accelerator.
For the first measurement before applying the offsets of the BPMs the resulting steerer current RMS can be seen in Tab. II. The RMS values for the second measurement with the applied offsets from the beam-based alignment procedure can also be seen in Tab. II. In order to see the improvement one has to achieve similar orbit RMS values, which was the case for these measurements, as the orbit correction software ran until the best solution was found. Then a comparison of the steerer current tells by how much the new calibration is an improvement. For the horizontal direction one needs 20% less steerer current and for the vertical direction 80% less steerer current, while keeping similar orbit RMS values for both directions. This improvement shows that one does not have to correct against the beam being offset inside the quadrupoles anymore and thus the beam is not deflected by the quadrupoles anymore.
This result shows that the beam-based alignment has been successfully applied at COSY and it helps improve the orbit in the accelerator. This then also enables a comparison of the measurement with the simulations, as the BPMs are now calibrated, and also to compare sim-ulations to previous measurements. Table II. Change of Steerer current RMS depending on the calibration of the BPMs with similar corrected orbits RMS. Before the calibration with the obtained results only known and deliberate shifts of BPMs were included, which was the case for 3 out of 31 BPMs. After the calibration all of the BPMs were calibrated to show zero when the beam is centered in the nearby quadrupoles. The Orbit was corrected to minimal orbit RMS, where the goal was to reach a zero orbit, and the values for the corresponding steerer currents, which are given in a percentage of the maximal current and their corresponding kick in mrad, were recorded. Due to constraints during this test the performance of the horizontal direction was not as good as it could have been. With the beam-based alignment procedure we succeeded in aligning the beam with respect to the center of the quadrupoles to 40 µm. This is an important ingredient for spin tracking based on a further improved COSY model, to finally be able to understand systematic errors of the EDM measurement at COSY [12]. The beam position monitors (BPMs) were calibrated such that the quadrupoles are located at (or close to) the zero line of the coordinate system defined by the BPMs.
The quadrupoles themselves are aligned to a precision of 200 µm with respect to the design beam axis, see Fig. 6.
In principle the method could be further improved. The limit of 40 µm originates from fluctuations between measurements with some time gap in between (see Fig. 4) where mechanical drifts of this order, due to e.g. temperature changes, are expected. A single measurement reaches an accuracy of about ≈10 µm (Fig. 4). Thus, running a feedback system and continuously monitoring the quadrupoles one could reach the precision of a single measurement.
As a result of this BPM calibration, the orbit correction now leads to an orbit passing close to the center of the quadrupoles. This could be confirmed by the fact that after the beam-based alignment procedure less steerer correction power is needed to reach the optimal orbit, as one does not have to act against the steering of off-center quadrupoles.
Apart from a better orbit in the machine, also misalignments of quadrupoles were observed and confirmed with a mechanical measurement. Those observed quadrupole misalignments will be corrected in the future improve the quality of the accelerator further.
Appendix: Mechanical alignment of the quadrupoles The appendix contains two tables listing the values for the mechanical alignment of the quadrupoles.