CHALLENGES IN EXTRACTING PSEUDO-MULTIPOLES FROM MAGNETIC MEASUREMENTS

Extracting the coefficients of Fourier-Bessel series, known as pseudo-multipoles or generalized gradients, from magnetic measurements of accelerator magnets involves technical and mathematical challenges. First, a novel design of a short, rotating-coil magnetometer is required that does not intercept any axial field component of the magnet. Moreover, displacing short magnetometers, step-by-step along the magnet axis, yields a convolution of the local multipole field errors and the sensitivity (test function) of the induction coil. The deconvolution must then content with the low signal-to-noise ratio of the measurands, which are integrated voltages corresponding to spatial flux distributions. Finally, the compensation schemes, as implemented on long coils used for measuring the integrated field harmonics, cannot be applied to short magnetometers. All this requires careful design of experiment to derive the optimal length of the induction coil, the step size of the scan, and the highest order of pseudo-multipoles in the field reconstruction. This paper presents the theory of the measurement method, the data acquisition and deconvolution, and the design and production of a saddle-shaped, rotating-coil magnetometer.


INTRODUCTION
The magnetic measurement section within the magnet group of CERN's technology department is responsible for the qualification of all superconducting and normal conducting magnets in CERN's accelerator complex. To supplement the long rotating-coil magnetometers and stretched-wire systems (the section's workhorses for magnetic measurements) we have recently developed moving induction-coil arrays, axial and transversal rotating-coil scanners [1], and inductioncoil transducers for solenoidal magnets. Applications of these tools require, however, a sophisticated post-processing step based on the regularity conditions of electromagnetic fields. To this end, the magnet bores can be considered as trivial domains, i.e., simply connected and source-free with piecewise smooth, closed and consistently oriented boundaries. Calculating the transversal field harmonics as a function of the coordinate in the magnet's axial direction, for example, by using the numerical field calculation program ROXIE [2], or measuring these harmonics with a very short, rotating-coil scanner, allows the extraction of the coefficients of Fourier-Bessel series, known as pseudo-multipoles [3] or generalized gradients [4].
However, the raw measurement data from the field transducers are induced voltages that are integrated using a digital integrator, triggered by an angular encoder. Developing these signals into Fourier series results in convoluted functions of the spacial flux distribution, because strictly speaking, point-like measurements of the magnetic flux density are not possible. 1 Before such signals can be used as boundary data for harmonic analysis or boundary-element methods (BEM), a deconvolution is required.
A careful design of experiment is required, considering a low signal-to-noise ratio of the measurand, the sensitivity of the induction coil with respect to transversal harmonics, the step-size of the longitudinal scan, and the compensation schemes for the main-field component. In this paper we present the design and production of the transversal-field scanner and the challenges in applying the pseudo-multipole theory to measurement data.

PSEUDO MULTIPOLES
The local field distribution in short magnets, such as the one shown in Fig. 1, cannot be expressed by the usual field harmonics (Fourier series) for the integrated fields because they do not constitute a complete orthogonal basis of the 1 Transversal Hall sensors come close but their active area (the Hall plate) typically has a diameter of 2-3 mm.
transversal field distribution in the magnet ends. In other words, the field distribution in the magnet extremities is not holomorphic and therefore does not obey the r n−1 scaling laws derived for the integrated fields. Following Erdelyi [5] and Caspi [6], and using a combination of a Fourier series in ϕ and a power series in r around the axis yields where C n (r, z) := C n,n (z) − C (2) n,n (z) 4(n + 1) In the interest of brevety, the similar expressions for the skew components D n (z) have been omitted here. To reduce the burden on notation we will henceforth, and without loss of generality, assume ideal magnets without skew field component, i.e., D n,n (z) = 0.
In three dimensions, the single harmonic component (index n to describe the ϕ dependence) will contain pseudo multipoles accounting for the transverse field components no longer exhibiting a pure r n−1 dependence on the radius. In the straight section of the magnet the partial derivatives with respect to z vanish and the equations will become identical with the well known 2D equations, as expected. The field components at any radius within the bore of the magnet are then given by where C n (r, z) := n C n,n (z)− (n + 2)C (2) n,n (z) 4(n + 1) n,n (z) 32(n + 1)(n + 2) r 4 − . . . . (4) A dipole field (n = 1) rolling off at the magnet's extremity gives rise to a pseudo sextupole and higher-order (odd and only odd) pseudo multipoles, while a quadrupole field gives rise to higher-order, even pseudo multipoles. Pseudomultipole terms have the same angular dependence as the leading terms C n,n (z).
It is common practice to speak of feed down when lowerorder multipoles are generated from higher-order multipoles by axis misalignment of the magnet or the measurement shaft. We might equally speak of feed-up when higher-order multipoles are generated due to field variations of the lowerorder multipoles along z. Since the pseudo terms are even derivatives of the leading terms, their z integrals over the entire magnet will be zero, as to be expected.
It is important to note that the coefficients C n,n (z) are still unknown at this stage. This is the reason for choosing calligraphic characters in the typesetting. Although the C n,n (z) are the leading terms of the series expansion, they are not identical to the B n (z) components in the Fourier expansion of the (measured or calculated) transverse field. Fortunately, because all the pseudo-multipole terms can be calculated from the leading terms, the problem is reduced to extracting the C n,n (z) from measured or calculated data on the domain boundary. It is worth mentioning, that even if these terms were confused, the reconstructed field would still obey the 3D Laplace equation. A powerful Maxwellification so to say.

THE TRANSVERSAL FIELD SCANNER
Measuring the transversal field harmonics with a short rotating coil (measurement radius r 0 ) yields a convoluted function of the multipole field components B n (r 0 , z). Using this data we must solve the differential equations for n = 1, 3, 5, . . . , N. Applying a Fourier transform to the functions B n (r 0 , z) and C n,n (z) it follows from Eq. (5): where U K n := n − (n + 2)(iω) 2 4(n + 1) is the feed-up term of order n, up to the highest z−derivative K. LetB n denote the measured function given by the field harmonic B n convoluted by the z-dependent coil-sensitivity factors s n of the measurement coil. 2 In this case, the Fourier transform of C n,n (z) yields If we were able to produce an infinitely short induction coil, s n would become a delta function in z and its Fourier transform would become one. The Fourier transform of the leading term F {C n,n (z)} can be extracted from the Fourier transform of the measured dataB n (r 0 , z). The final step then consists in recovering the function C n,n (z) from the spectrum by means of the Fourier integral

THE SENSOR DESIGN
The shafts used for the field measurements are usually an assembly of induction coils of different radii which are seriesconnected to compensate for the induced voltage signal for the main dipole or quadrupole field component. The size and arrangement of these coils is based on the r n−1 scaling laws derived from the 2D field solution. The flux linkage through the induction coil can be calculated from the Stokes theorem: , and the z-component of the magnetic vector potential can be expressed as assuming that there are no skew components in the field. The flux linkage through the induction coil can then be calculated from where s tan n = 2N n r c sin nδ 2 , is called the coil-sensitivity function, and δ is the coil's opening angle that may be a function of z. The coil radius is denoted r c . The physical unit of the sensitivity is [s tan n ] = 1 m. If the coil is short and used to map the field in the magnet end region, a number of challenges arise: Because of the absence of a simple scaling law between the multipole coefficients at r 1 and r 2 , these cannot be disentangled from the measurements, when the signals are compensated on the analogue side. The induction coil must be saddle-shaped, i.e., its radius on the shaft must be constant, because otherwise, a voltage is induced in the induction-coil ends when it is rotated around its axis; see Fig. 2.
Because the induction coil is shorter than the magnet and the size of its coil ends cannot be neglected with respect to its straight section, the sensitivity s tan n will become a function of z. This, in turn, becomes the test function of the convolution of the harmonic content along z.
A solution for these problems is the nesting of induction coils of the same radius and choosing the number of turns and their opening angles to compensate for the main dipole field. The shaft design is based on PCB technology, manufactured as a flexible stack of two double-layer PCBs, bent around a precision machined shaft; see Figs. 3 and 4. Spring-loaded roller bearings allow the displacement and centering of the shaft within an aluminum tube, which is inserted in the magnet bore. A clamping mechanism is used for fixing the flexible PCB on the shaft in order to reduce the tolerances on the coil's radius and alignment.
The main coil in the center has a small opening angle to provide sensitivity to the higher-order field components. Some constraints apply due to the manufacturing process of the PCB. A compromise had to be found between the maximum number of turns, and thus the coil's sensitivity, and the lengths of the coil ends.
The compensation coil should be sensitive to the dipole component only. This is achieved by a shell-type coil with  Figure 2: A (classical) tangential coil rotated by a certain angle traces out two patches of the cylindrical mandrel but also the surfaces between the chord and the apex, which intercepts the B z field component. Such a coil must therefore be made long enough so that it covers the entire fringe-field region of the magnet and it is thus guaranteed that the B z components are zero at the coil ends. about 60 degree opening angle. This opening angle and the spacing between turns has been optimized to fine-tune the dipole sensitivity of the compensation coil. For short coils, the end-effects must be considered; they will lead to a different geometric-mean length and magnetic length of the coil depending on the multipole order. The graphs of the compensated sensitivity functions in the end region of the induction coils are given in Fig. 5.
An uncertainty analysis yielded a maximum allowable error in the track positions of about 30 µm and in the radius positioning of about ±200 µm. 3 Metrological measurements were performed using a coordinate measuring machine (CMM). The uncertainty in the spanned surface, due to the tolerances in the track positioning in the PCB pro- Figure 4: Image of the PCB coil. Notice the additional tracks (dashed) and copper patches designed to minimize the concentration of corrosive acid between the tracks of the compensation coil. duction, and the uncertainty of the coil calibration in the reference magnets are both on the order of one unit in 10 4 . While the presence of open circuits is obvious, short circuits between turns are difficult to detect with resistance measurements, because of the varying thickness of the tracks. For that reason we still need to validate the sensor in the straight section of a long reference dipole magnet.
The outer diameter of the shaft (and its bearings) is guided in a tube of 50 mm inner diameter. In this way the transducer fits into the aperture of the section's reference dipole. 4 The mole design reduces the space needed for a displacement system; the shaft can either be positioned using a cableway or extension tube, or it can be mounted on an arm of a displacement stage (mapper).

MEASUREMENT UNCERTAINTY
In order to study the deconvolution and the design of experiments, we must first discuss the highest achievable accuracy to date, which is by a transversal-field scanner of the classical design with radial coils in PCB technology. In the center of the reference dipole magnet there is no axial field component and therefore the results will yield a meaningful lower bound for the measurement uncertainty. An uncompensated measurement, using only the main coil, results in a precision of about one unit in 10 5 . With a compensation ratio of the main component exceeding 3000, the precision is increased to one unit in 10 7 . From this result, the known surface of the induction coil, and the maximum flux density in the magnet, we can conclude that the minimum flux 4 Although magnets like the one shown in Fig. 1 constitute the ultimate application of the saddle-shaped coil magnetometers, the metrological characterization was done in the reference dipole and quadrupole magnets featuring long and homogenous straight sections that can be used for cross-calibration of the different coil transducers and Hall sensors.  Figure 5: Sensitivity functions s tan n (z) along the axis of the rotating-coil magnetometer (from the center to the coil-end region). The straight section has been shortened by 20 mm to better visualize the roll-off. Notice the compensation for the main (dipole) field sensitivity s 1 ; also notice the different shapes of the roll-off, depending on the multipole order. Because the compensation coil is longer than the central coil (coil ends indicated by the vertical lines), the cross-section of the central coil is designed to compensate for the end effects, i.e., the overshoot into the negative values of s 1 .
linkage in the induction coil must be larger than 10 −8 µVs. Unfortunately, a compensation ratio of more than 1000 is not achievable with the nested saddle-shaped coils. The design value is about 630, limited by the different lengths of the nested coils. The completed transducer achieves a compensation ratio of no more than 27 because of the tolerance on the measurement-coil radius.
Another uncertainty results from positioning errors (longitudinal position and instability of rotation) during the scanning and measurement process. While the standard deviation of the harmonics, extracted from the compensated signal, is reduced by two-orders of magnitude, one would expect more because of the high compensation ratio of 3000. This is a result of the coil eccentricity and rotational instability.
For the longitudinal positioning error we obtain about 20 µm per meter distance from the laser tracker and about 60 µm for the alignment, resulting in a total uncertainty of about 0.1 mm. In the case of integral measurements of a long magnet, obtained by combining the results of multiple position scans, this error stays below 10 −4 as random errors will average out. For local measurements in the magnet's fringe-field region we must expect uncertainties on the order of 1-2% for a 100 mm long coil. This is severe because feed-down corrections for axis misalignment cannot be done as in the magnet straight section.
We are therefore placing special attention on accurate longitudinal positioning of the shaft, the stabilizing of the rotation, and the centering within the magnet bore.

DECONVOLUTION OF THE MEASURED SIGNALS
The challenge is now to find a suitable order n of the pseudo-multipoles C n,n and the highest order m of derivatives C (m) , in order to minimize the reconstruction uncertainty of the local magnetic field. The uncertainty of the method will also depend on the step size chosen for the displacement of the transducer and on the signal-to-noise level of the measurand.
LetB n (r 0 , z k ) denote the measured, transversal field component of order n, sampled at positions z k , k = 1, . . . , K along the magnet axis, affected by noise n(z k ). In the following, we omit the notation of the radial dependencies. The noisy, convoluted signal is then given bỹ (11) To save on notation we writẽ where the hat denotes the reconstructed (estimated) multipole-field distributionB n (z k ); see Fig. 6. Figure 6: Signal path in the frequency domain. We distinguish the estimated spectrumB n ( f ), the measured spectrum B n ( f ) and the true harmonic B n ( f ).
A straightforward method of deconvolution uses the inverse of the sensitivity spectrum g( f ) = 1/s n ( f ), which results in an amplification of the noise n( f ) for frequencies where the spectrum s n ( f ) has small values. An alternative approach is to use a filter that minimizes the expected meansquared error in the frequency domain: Assuming that the noise is uncorrelated and has zero mean, a minimum of the mean-squared error, Eq. (14), can be found by the Wiener-Kolmogorov filter where the second expression in the denominator is the inverse of the expected signal-to-noise ratio SN R( f ) = Filtering with g W ( f ) will therefore damp frequencies with low SN R( f ). The value of g W ( f ) will approach the inverse of the sensitivity s n ( f ) −1 for frequencies with a high SN R( f ).
In Fig. 7 the deconvolution was applied to a noisyB 3 , which was generated from simulations with added Gaussian random noise. As expected, the convolution by the inverse spectrum of s n ( f ) leads to an amplification of the noise. The absolute error between B 3 (z) and the Wiener deconvolution lies below 2.5% of the maximum of B 3 (z).

DESIGN OF EXPERIMENT
The most sensitive parameters for the deconvolution of the measurand are the coil length and the sampling step-size. In order to be sensitive in all relevant frequencies of B n ( f ), the spectrum of the sensitivities impulse response s( f ), i.e., the frequency spectrum of the induction coil's sensitivity function, should be non-vanishing in the frequency band imposed by the highest spatial frequency in the measurand. To optimize the coil length (or estimate whether or not an available transducer has high enough sensitivity) we consider the sensitivity function as a rectangular pulse in the spacial domain. Its spectrum will have the shape of a (sin x)/x function, containing zeros at the frequencies f k = k/l s , for k = {0, 1, ..., K }, where l s is the length of the pulse, i.e., the hard-edge model of the induction coil. An infinitely short and highly sensitive coil, corresponding to a Diracshaped impulse response, is technically not possible. The maximum sensitivity is limited by the number of turns in one layer of the flexible PCB. As shown above, a minimum flux linkage of Φ min = 10 −8 Vs in the main induction coil is required. Denoting the minimum required accuracy of field harmonic by B min , the minimum length of the induction coil can be estimated to l s,min = Φ min /(h s B min ), where h s is the height of the coil's impulse response in the hard-edge model. Therefore the optimum coil length l s is given by where f n,max denotes the expected (computed) highest frequency in B n ( f ). In other words, the coil must be short enough to resolve the highest spatial frequency, but long enough to accommodate enough turns for a sufficiently high sensitivity S n . In this case, the shape of the sensitivity function is not critical for the Wiener deconvolution. Simulations show that a smooth roll-off in the coil sensitivity is even preferable; for the magnetic field distribution shown in Fig. 7 the optimal ratio between the coil's straight section l 1 and its overall length l s is about 0.5. This yields sufficient flexibility for the coil design. A higher sampling rate will lead to a better resolution of the multipole-field distribution, as the maximum meaningful frequency will increase by the Nyquist sampling theorem. This implies that the maximum step-size be The minimum step-size is, however, constraint by the positioning accuracy of 0.1 mm. Resolving frequencies of s( f ) higher than f n,max yields no improvement.

CONCLUSION
The theory of pseudo-multipoles is known from the literature. The extraction of the leading term in the Fourier-Bessel series requires the solution of a differential equation by means of a discrete Fourier transform. This yields a natural way to deconvolute the measured distribution of the multipole content. We have studied and presented the limitations of point-like measurements with Hall sensor stacks and thus motivated the measurement technique using inductioncoil sensors. These require a novel design emplying saddleshaped, iso-perimetric coils in order to avoid interception of the axial field component.
The compensation of the main signal cannot be accomplished with the classical arrangement of tangential (or radial) induction coils at different radii, because no easy scaling law exists.
The study of the Wiener filter for the signal deconvolution allows a design of experiment based on the optimal number of coefficients and required z-derivatives of the leading terms, and the step size in the field-scanning process. Unfortunately, the signal-to-noise ratio is nowhere near the values obtained with standard rotating coil sensors.
Nevertheless, and to our knowledge for the first time, it is possible to extract the transversal field components (and only those) from measurements in the coil-end regions. A reasonable approach will therefore be to validate the design and construction of accelerator magnets using such sensors and to gauge the numerical (FEM, BEM) models for the use in beam-tracking studies. These can then be performed using simulated field distributions that are sufficiently smooth to extract higher-order pseudo-multipoles.
With the presented methodology and hardware it will also be possible to better characterize fast-ramping magnets and magnets with strong hysteresis effects, where 10 −4 predictive models do not exist.