Measuring field multipoles in accelerator magnets with small-apertures by an oscillating wire moved on a circular trajectory

A method based on an oscillating wire for measuring the field quality in accelerator magnets with small apertures of the order of 10 mm is proposed. The wire is positioned step-by-step on the generators of a cylindrical domain inside the magnet aperture, i.e. its end-points at the stages are moved on a circular trajectory. The amplitudes of the wire's forced oscillations are measured and related to field harmonics by a suitable analytical model. In this paper, the analytical model, the measurement procedure, and the measurement system architecture of the oscillating wire method are presented. The method is validated by comparison with the standard rotating-coil system. A case study on small-aperture, permanent-magnet quadrupoles constructed for the Linac4 injector at CERN is illustrated.


Introduction
In particle accelerators, the beam stability is affected by magnetic field inhomogeneity in the bending and focusing magnets. Therefore, a high field quality [1]- [4], characterized by the harmonic coefficients of the transverse field expansion, is required. High-accuracy measurements of these coefficients, usually denoted as field multipoles [5], are prevalently based on rotating search coils [6]: a wire loop, of area A and N turns, is rotated at the angular frequency ω in the magnet field. This method yields a measurement of the magnetic flux linked with the search coil as a function of its angular position. The field harmonics are then deduced by exploiting the knowledge of the search-coil geometry. Uncertainty arises, among other sources, from small lateral movements of the rotation axis due to the coil turning mechanics. Moreover, the coil's angular position does not match perfectly the expected angular position for a particular trigger. This can happen because of torsional vibrations in the coil or timing uncertainty on the triggers [7].
Magnets with small apertures of about 10 mm in diameter are developed for new linear accelerator studies, such as the Compact Linear Collider (CLIC) at the European Organization for Nuclear Research (CERN) [8]- [9], as well as for the Linac 4 project. For high-precision search coil manufacture, a new printed-circuit board technology is used [10] for the small shafts.
The single-stretched wire method [11]- [12] is commonly used to measure the magnetic field strength and axis by moving the wire in radial directions. The multipoles are determined by moving the stretched wire on the generators of a cylindrical domain inside the magnet aperture, and by integrating the voltage signal measured on the wire extremity. However, the wire in the magnet and the cabling to the voltmeter/integrator create a loop sensitive to environmental electromagnetic noise. The small apertures of the magnet limit the displacement range, thus reducing the amplitude -1 -of the induced voltage and increasing the uncertainty in the axis location and multipoles measurement. Consequently, small-aperture magnets are challenging for multipole measurements, both by means of the rotating-coil and the single-stretched wire methods.
The vibrating-wire method [13] allows measuring the position of the magnetic axis in the micrometer range. The method is based on the Lorentz force displacement of the wire, which is fed by an alternating current. The wire will vibrate in the direction orthogonal to the magnetic field. In a quadrupole, the magnetic axis is determined by the wire position in the magnet aperture, where this oscillation takes its minimum [14]. The precision is affected by the relation of the measured axis to the alignment target of the magnet. This paper presents a method based on forced oscillation of the wire developed to measure in particular the multipoles of small-aperture magnets. Section 2 gives the foundations on the oscillating wire and the field harmonics, section 3 presents the experimental setup of the oscillating wire method, and section 4 the experimental results of a case study for a small-aperture permanent magnet quadrupole.

Definition of field harmonics in accelerator magnets
The magnetic field of accelerator magnets is commonly described by a 2D series expansion under the assumption of a cylindrical symmetry and by a set of Fourier coefficients, known as field harmonics. The radial (or tangential) component of the magnetic flux density is measured at a reference radius r = r 0 as a function of the angular position φ and expanded as: where B n (r 0 ) and A n (r 0 ) are the normal and skew multipoles, given in units of Tesla [7]. The field components B r given at N discrete points on the interval [0, 2π) allow the calculation of the two times N Fourier coefficients by the discrete Fourier transformation: Comparison of the coefficients in (2.3) and (2.4) with those in the general solution of the Laplace equation for the vector potential in circular coordinates yields the B r and B φ components at any radius inside the aperture of the magnet: The Cartesian components of the field can be obtained from the transformation: B x = B r cos φ −B φ sin φ , B y = B r sin φ − B φ cos φ , which reads in complex notation:  For z = x + iy, this yields: where C n = B n (r 0 ) + iA n (r 0 ) [15]. Eq. (2.7) is commonly given as the definition of the field harmonics in accelerator magnets. By De Moivre's theorem for trigonometric functions (cos φ +i sin φ ) n = cos nφ +i sin nφ , we obtain for the real and imaginary parts of eq. (2.7): The relative multipole coefficients with respect to the main field component B M , that is, B 1 for a dipole magnet, B 2 for a quadrupole magnet, etc., are dimensionless and denoted by the lower case symbols b n (r 0 ) and a n (r 0 ). For the x-component, for example, we thus obtain: The forces acting on the wire are the mechanical tension T , the gravity, and the Lorentz force given by the magnetic field and the current in the wire. The vibration model is derived from the principle of energy conservation applied to a finite element of wire. The vibration modes are determined from:

JINST 7 P05003
where m l is the wire mass per unit of length and α l a damping factor. By expanding the field components B x (z) and B y (z) in Fourier series, the solutions for (3.1) and (3.2) are: where When ω = ω n , a natural frequency vibration occurs and the subsequent amplitude depends only upon the damping properties of the system. This is in contrast to the forced motion where an external force continuously drives the system. If the frequency of the wire current is lower than its natural vibration frequency (ω ω n ), the deflection of the wire can be described as a static problem. In this case, the Lorentz force perpendicular to the local transverse component of the magnetic field in the magnet is given by: where the integral covers the entire magnet into the low field region at its extremities. If the magnet is much shorter than the wire length, this force can be assumed as acting point-like on the wire (see figure 1). The displacement d is then linearly related to the tension on the wire T and the Lorentz force F. As shown in figure 1, the system equilibrium is reached when the component of the wire tension in the direction of F is equal to the modulus of the Lorentz force. By assuming small displacements, sin α ≈ α, the maximum wire displacements in the x and y-directions are given by 2T F x and d y = L 2T F y . By measuring peak-to-peak displacements, the effect of gravity on the y-displacement is compensated for, and, therefore, can be neglected here.

Estimation of multipoles from the measured wire displacements
The wire is positioned step-by-step on the generators of a cylindrical domain inside the magnet aperture. As will be explained in detail in section 3.3, at each position, the wire displacements are measured by means of an optical sensor.
In this way, the displacements d k x (r 0 ) and d k y (r 0 ) are obtained for k ∈ 1, K positions on the cylinder. The displacement is proportional to the Lorentz force, which is in turn proportional to the integral field components. Therefore, with the proportionality constants λ y , λ x . The discrete Fourier transform can then be performed directly on the diplacements:Ã The tilde is used to distinguish these from the coefficients obtained from the series expansion of the field component. However, by normalizing the Fourier coefficientsÃ (r 0 ) andB (r 0 ) with respect to the main component, and under the assumption that λ x and λ y do not vary for the different angular positions, the relative multipoles can be obtained from: Eqs. (3.9) thus relate in a straightforward way the relative field multipoles to the normalized coefficients of the Fourier series of the wire oscillation amplitudes (in the x and y directions), collected on a circular trajectory. According to the Nyquist theorem, the highest multipole is related to the number of the acquired points as N < K/2. In complex notation, the relative multipoles are usually written as: where n ∈ 1, N. Owing to the holomorphic properties of the field (namely, complex differentiability in a neighbourhood of each point of its domain), the field harmonics calculated separately on the set of displacements d k x (r 0 ) and d k y (r 0 ), must yield the same results. Both x and y components are nevertheless acquired for redundancy and diagnostics.

The measurement procedure
As explained in section 3.2, the displacements d k x (r 0 ) and d k y (r 0 ) (corresponding to the position φ k on the reference radius) can be used instead of the magnetic field components to calculate the relative field harmonics.
In figure 2, the flow diagram of the measurement procedure for the oscillating wire is shown. The first step is to find the magnetic axis by the traditional vibrating wire technique [13], that is, by minimizing the wire vibration at its natural frequency. Owing to this, the shift of the magnetic axis is made negligible and the residual dipole harmonics are verified to be below the uncertainty threshold. The radius r 0 of the circular trajectory is chosen as large as possible in the magnet aperture in order to increase the sensitivity of the multipole measurement.
The displacements d k x (r 0 ) and d k y (r 0 ) are determined from the wire amplitudes by correlating the signal from the optocouplers with the phase of the excitation current (see figure 3).
Experiments have shown that the effect of gravity, i.e., the wire sag in y direction, can be minimized by measuring the amplitudes of the oscillations δ in both the x and y-coordinates.
The displacements are then given by: where k ∈ 1, K. The procedure to obtain the two components d k x (r 0 ) and d k y (r 0 ) for the case of a quadrupole is highlighted in figures 4-6. These are 2-pi periodic functions of the angular position.
The number of angular positions K on the circle is set at least as the double of the highest multipole order N, in our case N = 10 and K = 128 has been found most appropriate. Measuring at more than 128 positions did not improve the results for the field multipoles.      The measurements require working at a current frequency lower than the wire resonance. Although giving rise to higher measurement sensitivity, the amplitude of the wire vibration in resonance condition is more prone to environmental influences on the damping conditions. The optimum current amplitude is determined such as to minimize the difference between the multipoles (3.9) calculated from signals d k x (r 0 ) and d k y (r 0 ) indipendently; see the flow chart in figure 2.

System architecture
In figure 7, the architecture of the proposed measurement system is shown. A wire is passed through the magnet aperture and stretched by means of a weight or a motor. Optocouplers in x and y directions are positioned on the stage in order to transduce the wire displacement into an electrical voltage. The two optocouplers, Sharp T M GP1S094HCZ0F, are mounted in perpendicular direction, which was found to be accurate to 17 * 10 −3 rad. This is derived from the phase difference measured for the 2π periodic signals acquired from both the sensors. The sensor output is preamplified and low-pass filtered by an antialiasing filter. It is then sent to the 18bit acquisition system NI6289 from National Instruments T M . The same system also acquires the temperature signal from a thermocouple, fixed at less than 1 mm from the optocoupler, as well as the wire current on a reference resistor. The AC current generator Keithley T M 6221 is used to excite the wire. Two stages move the wire on circular trajectories such that it describes the generators (rulings) of a cylindrical domain in the aperture of the magnet. A motor controller Newport T M ESP7000 is used for moving the stages, reading the position through a linear encoder with a precision of ±0.1 µm. A separate motor is used to set the tension of the wire. The test software is implemented by means of the Flexible Framework for Magnetic Measurements (FFMM) [17]- [18]. The field multipoles are finally computed by the analysis procedure described above, which was implemented in Matlab T M .

Experimental results
The oscillating wire method was validated experimentally on two permanent-magnet quadrupoles, which were designed and constructed for the linear accelerator Linac4. The magnets, shown in figures 8, have permanent-magnet blocks buried in an aluminium shell, and generate integrated field gradients of 2.41 and 2.23 Tm/m, respectively [16]. The magnetic field direction must be -8 -  verified within ±1 mrad and the quadrupole axis with a precision of ±0.1 mm. The error on the most sensitive multipole field errors b 6 is specified to be less than 0.1% at 7.5 mm reference radius.
The voltage response curve of the optocouplers is shown in figure 9. The slope in the most linear part, employed for the measurements, is about one volt for a wire displacement of 30 µm. The optocouplers are shielded from the environmental noise, variations in temperature and infrared light. In practice, typical voltage signals of 0.2 V corresponding to about 6 µm of wire displacement were used.
In particular, the calibration data were fitted by a polynomial regression and the coefficients were used to linearize the data from the sensor during the measurement in each position. The residual non-linearity of the sensors is thus lower than 10 −4 .
-9 - A Cu-Be wire [12], with a diameter of 0.125 mm and a length of 1800 mm, is tensioned to about 10 N.
As explained above, the method relies on the proportionality λ between integrated field and wire displacement to be constant during the movement of the wire along the trajectory. Experiments have shown that the amplitude of displacements varies linearly for tensions in the range of 5 to 18 N and therefore the effect of the tension on the multipole analysis can be neglected. Tests were also carried out for different current amplitudes. For the presented measurements it was found that a wire current of 21 mA guarantees that the difference in the obtained field multipole b 6 from both sensors is less than 0.05%. Figure 10 shows the amplitude of the wire oscillation as a function of the wire current frequency, measured on the x and y sensors after linearization. It was found that the variation of field multipoles for repeated measurements increases when the current frequency is close to the wire fundamental frequency (130 Hz, as seen in figure 10). For a frequency lower than 80 Hz, and avoiding submultiples of the fundamental frequency, the variation between subsequent measurements is less than 0.03% for the most sensitive b 6 field component. A frequency of 40 Hz was used consequently for the measurements analysed below. The wire reference system is aligned with respect to the magnetic axis before each measurement by means of the vibrating wire technique. Residual offsets are below 10 µm for the centring, and 0.02 mrad for both the yaw and pitch angles. The sagitta of the wire over a 45-mm long magnet is less than 2 µm and, thus, negligible. Therefore, a compensation of the lower order multipole due to off-centring in a higher order multipole (feed-down correction), is not necessary.
The output of the optocouplers is acquired with a 20 kHz sampling rate for one second. For each wire position, the two signals from the x and y sensors are treated independently for redundancy.
-10 -   Figures 11 and 12 show the modulus of the normal and skew relative multipoles (|b n | and |a n |), displayed on a logarithmic scale, which were measured by means of both the oscillating wire and the rotating coil methods, for two Linac4 magnets with the CERN naming convention "R1" and "113". The coefficients are given for a reference radius of 7.5 mm.

Multipole field errors in the Linac4 quadrupoles
Systematic effects were attenuated by repeating the test procedure with the magnet in different angular positions and by averaging the results. Figures 11 and 12 show a significant difference in the measurement of the b 8 component for measurements. This can be explained by the low sensitivity of the rotating coil shafts with tangential coils that have a "blind eye" on the c 8 multipoles [19]. This comes as a result of the opening angles in these search coils being insensitive to the corresponding flux component (figure 11) [7]. It can be seen that up to the multipole order 10 the harmonics follow the Cauchy estimate for the Taylor coefficients |c n | < M r n , where M is a problem specific constant.
The multipoles measured by the oscillating wire and the classical rotating coils assumed as reference give results compatible within ±0.05%. In figure 13, the method accuracy is estimated as -11 - Figure 13. Real and imaginary multipoles coefficients average differences (∆b n and ∆a n ) and repeatability (error bars) measured between oscillating wire and reference rotating coil at 7.5 mm for the Linac4 quadrupole magnets (a) R1 and (b) 113. the average of residual differences between oscillating wire and reference coils over 30 consecutive measurements. The error bars give the measurement repeatability at ±1σ .
Dipole harmonics were verified to be negligible according to the first step of the procedure of figure 2. This is a further a-posteriori verification of the lack for a significant shift of the magnetic axis of the magnet.
Further tests with the oscillating wire technique have shown that changing the radius of the measurement trajectory between 4 and 9 mm and rescaling of the results to 7.5 mm reference radius yields results for all multipoles up to order 10 that are identical within ± 0.05%. This is particularly meritorious because rotating coil sensors are increasingly difficult to produce for smaller and smaller radii.

Conclusions
A method for measuring multipoles of the magnetic field by means of an oscillating wire is proposed for magnets with aperture on the order of 10 mm and length below 50 mm. The method relates directly the wire oscillation amplitudes collected on a circular trajectory to the integrated magnetic field multipoles. Furthermore, measuring and analysing the multipoles on both wire oscillation components (d k x and d k y ) separately, the effect of gravity and sag can be eliminated. A sinusoidal current in the measuring wire drives oscillation amplitudes measured by synchronous demodulation. The measurement repeatability is increased in spite of lower sensitivity, by working at a wire frequency lower than the resonance frequency. The possibility to carry out measurements at different reference radii by means of the same hardware gives high flexibility to the method especially to validate magnet prototypes.
Several measurements were performed to validate the method experimentally. Thanks to the possibility to reverse the orientation of the magnet on the bench, systematic measurement errors were estimated. The accuracy of the measurements is increased by repeating the test procedure with the magnet in different angular (roll) positions. Results for the small-aperture permanentmagnet quadrupoles for the linear accelerator Linac4 at CERN show agreement between multipoles -12 -within about ±0.05% in comparison to the standard rotating coils system. A clear advantage of the proposed method is that there is no 'blind eye" for a certain multipole order, as is the case for tangential rotating search coils.
Other investigations were done for several mechanical tensions on the wire and at different reference radii for the same magnet, resulting in negligible multipole variations. The method relies on the invariance of the proportionality between the integrated magnetic field and the wire displacement for the different positions on the circular trajectory. This proportionality is insured when the wire sagitta can be neglected for short magnets and when the centre of the circular trajectory is coincident with the magnetic axis. Further investigation is needed to validate the method on longer magnets and, in particular, with extended fringe fields.
Finally, other trajectories are being studied, such as elliptic and square, which are especially useful for magnets with high aspect-ratio of their aperture.