Stretched wire measurement of multipole accelerator magnets

Theoretical aspects of stretched wire field integral measurements are investigated. A least square approach is used for the processing of the measured signal; it can be applied to any wire trajectory and it allows numerical correction of the wire position errors. Moreover, the signal from some multipoles can be compensated for in a way comparable to the ‘‘bucked’’ rotating coil method. This can be used for accurate measurements of field multipole errors. A stretched wire bench has been built at the European Synchrotron Radiation Facility. This bench has been used for measuring dipole, quadrupole, and sextupole magnets. The results obtained with various wire trajectories are compared. It is demonstrated that an accuracy of a few 10 4 of the main multipole can be obtained.


I. INTRODUCTION
For decades, the magnetic field of multipole magnets has been measured before their installation in particle accelerators or storage rings.Field measurements have several purposes: to check the quality of magnets and their compliance to specifications, to find the magnetic center of magnetic lenses and to align them with the other components of an accelerator, and to provide inputs to beam dynamic simulation codes.
Rotating coils have been widely used for measuring accelerator magnets.Davies [1] gives a brief review of the development of rotating coils and a detailed theory of harmonic measurements.Walckier's and Jain's lectures [2,3] describe the theoretical and the practical aspects of the rotating coil method.
The field errors are usually very small compared to the main harmonic: measuring these errors with good accuracy is not trivial.This issue led to the development of ''bucked'' coils in which several coils are combined in order to cancel the signal from the main harmonic and from the feed down terms [4].
Flipping coils have been developed for measuring the field integral along the longitudinal direction in the gap of insertion devices [5,6].These coils are moved by linear stages; a rotating stage is used to flip the coil by 90 degrees, for the measurement of the horizontal or the vertical field integral.The area of these coils is not well known, due to their small diameter-to-length ratio and their flexibility.However, insertion devices are shimmed to cancel their field integral: for this application, there is no need for absolute accuracy.
Stretched wire measurement benches were built more recently, owing to progress on linear stages and voltmeters.These systems were dedicated to insertion device field integral measurements [7] and to the alignment of quadrupole magnets [8,9].These benches use linear wire motions.
A vibrating wire system was used for magnet alignment [10,11] and for the characterization of insertion devices [12].In this case, the wire is excited with an oscillating current and its vibration is measured with a wire position monitor.This method is very efficient for magnet alignment.A similar technique based on a pulsed excitation has been developed for measuring the field of insertion devices [13].Vibrating wire systems and pulsed-wire systems can resolve the longitudinal position of magnets.
In the context of the upgrade of the European Synchrotron Radiation Facility (ESRF), various kinds of magnets must be measured: permanent magnet steerers for canted undulators, high gradient quadrupoles, new sextupoles, in-vacuum undulators, etc.All of these magnets have different bores and different lengths.With a stretched wire bench, the measurement radius can be optimized for each case.
The purpose of this article is to extend the use of stretched wire systems to the accurate measurement of field multipoles, which is up to now the domain of the rotating coils.A key point for that is to take into account the wire position errors.A theory of the stretched wire measurements is developed in the first part of this paper, after a short review of existing methods.A least square approach is used.It is suggested to build a matrix which is related to the wire trajectory, and to compute the multipole coefficients from a pseudoinverse of this matrix.The main advantage of this method is that the trajectory is not necessarily circular.It allows the correction of position errors; moreover, wire trajectories which cancel the signal from some multipoles can be designed.
The accuracy of the measurements obviously depends on the accuracy of the linear stages and of the voltmeter used; it depends also on the trajectory of the wire.The accuracy of the stretched wire system and its link to the trajectory is studied in Sec.III.Simulation results are given.
A stretched wire bench has been built at the ESRF; details of this bench and its calibration are given in Sec.IV.Measurement results, for different types of magnets, are shown in the last section.

A. 2D field multipoles
The theory of 2D magnetic measurements was developed a few decades ago (see, for instance, Refs.[14,15]).We recall some basic theoretical aspects below.

Field integrals
The first field integrals along the longitudinal direction are defined as where x, y, and s are, respectively, the transverse, the vertical, and the longitudinal coordinates and B is the magnetic field.In the following, the field integral along the longitudinal direction will be simply denoted as the ''field integral.''Similarly, the second field integrals are defined as

Multipoles
In an iron-and conductor-free region of the magnet, one can derive the field integrals from a vector potential A or from a scalar potential V. Since the field integral is a 2D field, it reduces to The complex potential is defined as From Eqs. ( 5) and ( 6), A is an analytic function of the complex variable z ¼ x þ iy.It can be expanded in a power series In the above expression, the c n are the complex multipole coefficients.It is common to express the multipoles with normal and skew coefficients b n and a n , respectively.These coefficients are linked to the complex multipoles by c n ¼ Àðb n þ ia n Þ=ðn 0 nÀ1 Þ, where 0 is the normalization radius.
From the theory of complex analysis, the series development in Eq. ( 8) is valid only on the larger disk centered at z ¼ 0 which does not contain any singularity, i.e., current or magnetic material [16].The multipole analysis is thus well adapted to magnets with circular bore, but is of limited interest for other geometries.A theory of elliptic multipoles was proposed recently [17]; it gives better results if the magnet bore is not circular.For simplicity reasons, we will use only the classical ''circular'' multipoles in the following paragraphs.

B. Basic measurements
where the brackets indicate an average over a time T and L is the measurement length (typically a few millimeters).The measurement of the field integral relies on the control of the wire motion.Assuming that the accuracy of the measurement is governed by the accuracy of the linear stages, the relative error on the field is Modern linear stages are very precise and systematic errors can be calibrated with a laser interferometer.This leads to position errors of a few micrometers and an accuracy of roughly 0.1% for the measurement of the field integral.b.Field gradient.-Inthe case of a pure normal quadrupole magnet, the gradient of the vertical field integral is The field gradient can be computed from linear field integral measurements.At point k the measured gradient is where S k is defined in Fig. 2. Inserting Eq. ( 10) in Eq. ( 12) gives where G k is value of the gradient and Owing to the field integral dependence of the error, the field gradient obtained from the differentiation of linear field integral measurement is not accurate.
c. Sextupole strength.-Thestrength of a pure normal sextupole is linked to the linear field integral measurement by 2b 3 = 0 2 ¼ @ 2 I y =@x 2 .At point k, the second derivative of the field integral can be evaluated by Inserting Eqs. ( 13) and (14) in the above equation gives with 2. Multipoles a. Circular measurements.- The multipole coefficients can be obtained if the wire covers a circular trajectory.The integral of the radial component of the field is where and are the polar coordinates and ReA is the real part of A. The normal and skew multipole coefficients b n and a n can be obtained from a Fourier analysis of the voltage measured with the wire.In this simple case, the stretched wire is equivalent to a single-turn radial coil.For a detailed description of rotating coil measurements and a discussion about the errors encountered on a real device, see for instance Ref. [1].This measurement method suffers from two main limitations.The first one is the strong signal from the main multipole, which makes the measurement of the other multipoles difficult.The second difficulty is the real trajectory of the wire, which is not perfectly circular because of the imperfections of the linear stages (position accuracy, errors of perpendicularity, pitch, etc.).
b. Linear measurements.-Some of the multipole coefficients can be obtained by fitting polynomials to the field measured on a straight line.In this case, the measured field can be expressed as where 0 is the angle between the measurement and the horizontal axis and is the position.However, the polynomial basis f1; P; P 2 ; . ..g is not orthogonal and the circular multipole measurement method is much more accurate.

Second field integral
The second field integral is usually measured by moving the extremity of the wire in opposite directions [Fig.1(b)].The instantaneous voltage is if the wire moves in the XS plane and if the wire is parallel to the axis S at time t.An integration by parts and the assumption that the wire is long enough give where I c Y and J c Y are the first and the second vertical field integral along an axis determined by c [see Fig. 1(b)].The value of I c Y can be obtained from another measurement.It is common to average the measured voltage over a small period of time T corresponding to a displacement L of the wire.In this case, the second field integral is expressed as As the second field integral is linked to the displacement of the electron beam passing through a magnet, this measurement method is widely used to characterize insertion device assemblies [6,7].

Fiducialization
Multipole magnets must be positioned accurately for the operation of accelerators.The fiducialization is the accurate determination of the symmetry axis of the magnets, and the transfer of this axis to alignment monuments.
The center of a quadrupole magnet can be found by linear field measurements.In this case, the field passes through zero at the center.
For sextupole magnets and higher order magnets, the magnetic field is ''flat'' in the neighborhood of the center: this leads to poor precision with the position of the magnetic center.In this case, the multipole coefficients give a better estimate of the center.Optimization methods, like gradient descent or Newton method, may be used efficiently.
The rotation of the magnet around its symmetry axis is determined by the roll (rotation around the longitudinal axis), the pitch (transverse axis), and the yaw (vertical axis).The roll is given by a circular measurement: it is linked to the phase of the measured signal.
An interesting feature of stretched wire benches is the ability to measure the pitch and the yaw of the magnet.These angles can be obtained from second field integral measurements.For a quadrupole, J c x and J c y pass through zero if the wire is positioned at the center and if the magnet is well aligned.A similar method can be used for sextupole magnets.
Because of the gravity, the vertical position of the stretched wire follows a catenary equation.This must be compensated for.If the bending of the wire is small, the following relation links the mechanical resonance frequency and the sag of the wire [10,11]: where Áy is the sag, g is the acceleration due to gravity, and f is the fundamental resonance frequency.It is convenient to tune the wire at a frequency which is a multiple of the power line cycle to reduce the perturbations.

C. Least square multipole estimation 1. Estimation of multipoles with arbitrary trajectories
Let us consider a stretched wire measurement at point ðx; yÞ, with a wire velocity v and an angle between the speed of the wire and the x axis (Fig. 3).One defines the complex field integral which can be expressed in the frame ðu k ; u ?Þ attached to the wire: Only the real part of this field integral is measured by the wire.From Eqs. ( 5)-( 8) and if only the first N multipoles are considered, this complex field integral can be expressed as a vector dot product: A set of M field measurements can be written as . . .
The measured field corresponds to the real part of the above equation.Rearranging the terms and introducing new notations, it can be written as where the coefficients of the matrix Z are defined by One introduces the notations I ¼ ðI 1 ?; . . .; I M ?Þ T for the measurements, C ¼ ðb 1 ;...;b N ;a 1 ;...;a N Þ T for the multipole coefficients and T ¼ ðReZ; ImZÞ for the matrix: This expression can be used to simulate the measurements obtained for an arbitrary wire trajectory, described by the matrix T, in a magnet described by the multipole coefficients C. Any imperfections of the trajectory can be simulated easily.
More interestingly, the field multipoles can be obtained by inversing Eq. ( 30).In the general case, T is not a square matrix.The least square solution for the multipole coefficients is given by if the matrix T T T is invertible.If rank ðT T TÞ ¼ n < 2N, one can estimate n multipole coefficients by calculating a pseudoinverse of T T T.
The multipole estimator given by Eq. ( 31) is a generalization of the classical analysis methods.If the field is measured on a circle at M ¼ 2N equally spaced points, it is equivalent to Fourier analysis.If the wire trajectory is a straight line, Eq. (31) gives the same results as the polynomial fitting method.In this case, the matrix T T T is not invertible and some of the multipole coefficients cannot be estimated.
In any case, the matrix T þ ¼ ðT T TÞ À1 T T can be evaluated from the singular value decomposition of T. This can be done easily with various softwares.On a modern computer, the estimation of the multipole coefficients is very fast.
In practice, the measurements are averaged over finite path length.This artifact can be corrected easily.Let us consider two cases: a linear trajectory [Fig.4(a)] and circular trajectory [Fig.4(b)].If the trajectory is linear, Eq. ( 26) becomes for the mth measurement This gives a new value for the matrix coefficients: If the trajectory is circular, we introduce the angle In this case, the matrix coefficients are If z 0 ¼ 0 and ¼ 0 , this expression reduces to where sincx ¼ sinx=x for x Þ 0 and 1 for x ¼ 0.

Compensation of a multipole
The users of rotating coil measurement benches are familiar with bucked coils: the signal of the main harmonic and the feed down terms are canceled by auxiliary coils in order to obtain a better accuracy on the other multipoles.Bucked coils decrease the vibrational coupling between the harmonics, and it allows more sensitive voltmeters to be used.
The classical bucked coil solution is not suitable for stretched wire systems: it is not possible to move independently two wires in the same magnet.However, it is possible to search for a trajectory for which the wire is not sensitive to one field component.One wants to eliminate the multipole n rotated by an angle ' n .The field lines of this multipole can be expressed in polar coordinates ð; Þ: where K is a parameter of the field line.Any trajectory which satisfies Eq. ( 36) at each point is not sensitive to the multipole n.In the following, this kind of trajectory will be denoted as ''n-pole compensated trajectory'' or nPCT.One can imagine different families of nPCT.The most ''natural'' nPCT is probably the set of n arcs of hyperboles obtained with a constant K parameter.This trajectory is continuous except at n points corresponding to the poles of the magnet.Unfortunately, the corresponding T T T matrix is not well conditioned and leads to a poor accuracy.Discontinuous nPCT are much more interesting.
Computing the measurement angles of an arbitrary nPCT from Eq. ( 36) is not trivial.It is more suitable to express the complex field as where The angle between the field of multipole n and the horizontal axis is given by This gives the value for the angle of an nPCT, for the mth measurement: Equation ( 39) is very useful to determine the wire angles for an arbitrary trajectory.One can also compensate for an arbitrary mixture of multipoles.In this case, the measurement angles are given by m ¼ ArgI: (40) However, it is important to note that Eqs. ( 36), (39), and (40) ensure the compensation of the main multipoles, but not a good conditioning of the T T T matrix.
At a given measurement point, the field multipole n À k measured with the multipole compensation method can be seen as the projection of the field vector I nÀk ¼ ðImI n-k ; ReI n-k Þ T on the vector I ?n ¼ ðÀReI n ; ImI n Þ T which is perpendicular to the field multipole n: The field measured at all the measurement points can be expressed as a vector For k 2 f1; ::; n À 1g and m ¼ 0 , the vectors I comp nÀk and I comp nþk are collinear.If, for instance, the magnet is a quadrupole, the contributions from the dipole and the sextupole are linearly dependent: it is not possible to separate the signal of these two components.
A simple solution consists in making compensated measurements at two radii at least (Fig. 5).Measuring the field on the full radius and at the center of the magnet is the simplest solution for quadrupole compensated measurements (4PCT).The field is null at the magnet center: if this point is well known, one can pad the T matrix and the I vector with zeros and measure the field at the nominal radius only.However, this makes the estimation of the multipoles dependent on the estimation of the magnetic center.Moreover, the field measured at the center is not null due to the finite measurement length.
Measuring the field at ¼ 0 and ¼ 0 =2 gives similar results for the 4PCT, but it is much more efficient for the 6PCT: in this case one must separate the quadrupole and the octupole components whose contribution is null at the center of the magnet.
At the beginning of this section, we mentioned that bucked rotating coils are not sensitive to the main harmonic and to the feed down terms.The cancellation of the feed down terms can be obtained on compensated trajectories, by subtracting measurements performed at different radii.As an example, let us take a normal quadrupole magnet and a 4PCT with measurement radii 0 and 0. The measurement length is assumed to be infinitesimal.For the measurement m, it gives The multipole coefficients, for n ! 2, can be obtained from Eq. (42).Moreover, the coefficients of the trajectory matrix are identical for I m k? ð 0 Þ À I m k? ð0Þ and for I m k? ð 0 Þ, except for the first and the N þ 1th column.The pseudoinverse trajectory matrix and the estimated multipoles are thus the same in both cases.In other words, this two radii 4PCT measurement contains enough information to numerically cancel the feed down terms.

Accuracy
The field of an accelerator magnet is usually dominated by one multipole component.In this case, Eq. (32) reduces to with where " X and " Y are the position errors and If the wire moves along a straight trajectory, It gives where In Eq. ( 43), the second part in the brackets is if jz þ z 1 j ) j" Z j.It can be rewritten as the error on the measurement m can be approximated by In the case of a compensated trajectory, it yields From the above equations, the errors on the measurements are driven by the average of the position error and the average of the angular error, which is linked to the derivative of the position error.
Circular and compensated measurements are both affected by position errors.Experiments with a real magnet have shown that compensated measurements give a better accuracy, due to the voltmeter accuracy.Details are given in Secs.III and V. Let us take an example.We assume that the accuracy of the linear stages is 1 m after calibration, the measurement length is 2 mm, and the radius is 30 mm.The magnet is supposed to be a pure normal quadrupole.The error is then

Extension to rotating coils
The extension of this analysis method to the classical rotating coils is straightforward.For a coil with an infinitesimally small conductor cross section, the coefficients of the T matrix can be computed from where z 0 is the position of the center of the rotating coil, m is the angle of the coil at point m, s k ¼ AE1 depending on the sign of the current in the conductor k, N k is its number of turns, k its radius, and ' k its angle (see Fig. 6).The Z mn coefficients for conductors with finite cross sections are obtained by integration: This method is more complicated than the Fourier methods commonly used for the analysis of the rotating coil signals.
However, it may have one interest: combining several rotating coil measurements, at several positions, in order to measure the magnetic field at a radius which exceeds the coil radius (Fig. 7).One has to concatenate all the measurements in the I vector and all the Z mn parameters in a global T matrix, and compute the pseudoinverse T þ .

III. TRAJECTORIES AND ACCURACY
On a stretched wire measurement bench, any 2D wire trajectory can be implemented.Yet, the quality of the measurement depends on the trajectory.Two main parameters have an impact on the multipole measurements: the shape of the trajectory, and the angles of the measurements.
The shape of the trajectory can be a line, a circle, a box, an ellipse, etc.It has an influence on the conditioning of the T T T matrix.The signal-to-noise ratio is better if the wire passes close to the poles, even if it may lead to accuracy issues in case of linear trajectories [see Eqs. ( 14) and ( 17)].
If the trajectory is not continuous, the measurement angles can be set independently at each point: this allows one to compensate the strong signal created by the main harmonic.
One considers that measuring the multipoles with a high precision is not a major issue: the duration of the magnetic measurement is much shorter than the thermal constant of the magnet, thus averaging several values has a low impact on the overall measurement time.Evaluating the multipoles with a high accuracy is more delicate.

A. Sensitivity analysis
Two main sources of systematic errors have been identified: the linear stages and the voltmeter.Let us express the measured magnetic field as I ¼ T 1 C þ n I , where the matrix T 1 is affected by position noise and n I is the error introduced by the voltmeter.The estimated multipoles are , where the matrix T 2 is defined from the ideal positions x and y, the measurement lengths L normally equal to a constant L and the measurement angles .A block diagram of this model is shown in Fig. 8.
The position errors of the linear stages have been modeled by the random vectors n X , n Y , n L , and n .One assumes that these errors are distributed as The accuracy of the voltmeters depends commonly on two terms: one term is related to the reading and the other to the range of the voltmeter.The reading term is modeled by a noise N read $ N ð0; I 2 read 2 Þ where I is the magnitude of the field integral, and the range term is assumed to be distributed as N range $ N ð0; range 2 Þ.The modelization of the voltmeter accuracy by additional random noise leads to some comments.First, it is assumed that the probability of having two exactly equal readings is neglected.In practice, this is the case if the voltmeter has enough digits.Second, there is no reason to assume that the distribution of the accuracy errors follows a normal law.This distribution depends obviously on the voltmeter used.Yet, the aim of this model is to obtain a rough estimate of the sensitivity of the estimated multipoles to various parameters, and the simple distributions described above are suitable for that.These remarks are valid also for the modelization of the position errors.
A simple sampling-based method has been used for the analysis of the sensitivity of the estimation to the position and the voltmeter errors [18].For a set of multipole coefficients C ¼ ð. . .; b n ; . . .; a n ; . ..Þ T and for a given trajectory defined by x, y, L, and , one generates several sets of error vectors.The multipoles are estimated from the field, for each set of error vectors.The standard deviation of each multipole can be computed from the results.
In the next paragraph, this method is used to evaluate the sensitivity of the measurement to different types of errors, with a perfect magnet.It can also be used for the estimation of the accuracy of one real measurement, putting all the errors together.In this case, the input vector C is the measured multipoles.This will be covered in the Sec.V.

B. Simulation results
Elliptic and rectangular trajectories have been simulated.These trajectories have been parametrized by the aspect ratio w=l, where w is the width and l is the length of the smaller box which contains the trajectory.Multipole compensated circular trajectories were simulated also.
The sensitivity of the estimated multipole coefficients to the position errors have been evaluated with the method described above, for an ideal normal quadrupole magnet.The figure of merit is the average of the standard deviation for all the multipole coefficients except the normal quadrupole: Figure 9 shows the evolution of this figure of merit, versus the standard deviation of the position errors.It shows that the quality of the multipole estimation depends mostly on the aspect ratio, i.e., on the isotropy of the trajectory.
The best accuracy is obtained with circular or square trajectories.If one considers position errors only, the compensation of the main multipole has no effect on the accuracy.The reasons for that have been given in Sec.II C 3.
The impact of the voltmeter accuracy on the figure of merit is shown in Fig. 10.From this curve, compensated measurements are interesting if the accuracy of the voltmeter is dominated by the read value.For instance, the accuracy of a Keithley 2182A nanovoltmeter is 50 ppm of the reading and 4 ppm of the range, one year after calibration.In this case, using compensated trajectories leads to a gain of 1 order of magnitude on the accuracy.
These simulations show clearly that the accuracy is optimum if w=l ¼ 1 and if the main multipole is compensated.The multipole compensation is particularly beneficial if the measured signal is large, i.e., at large magnetic field integral and at high speed of the wire.FIG. 9.Estimated sensitivity to position errors.The numbers on the curves are for the aspect ratio.For each point, the standard deviation was obtained from 100 samples.FIG. 10.Estimated sensitivity to the accuracy of the voltmeter.For this simulation, the value of the normal quadrupole signal was equal to the range.For each point, the standard deviation was obtained from 100 samples.
There is a fundamental difference between the ''bucking'' implemented on rotating coils and the compensated trajectories described here.Rotating coils are subject to vibrations and geometrical errors.The effect of these errors on the measured harmonics is reduced by canceling the signal from the main harmonic and the feed down term.It allows also to use a more sensitive voltmeter.With a stretched wire bench, the problem is different: the order of magnitude of the repeatability of linear stages is 1 m, and systematic position errors can be calibrated with a laser interferometer or a laser scanner.These small position errors are compatible with multipole measurements.However, the measured signal is weaker: there is only one wire and it is moved at relatively low speed, as compared to rotating coils.In this context the cancellation of the main harmonic signal facilitates the measurements of the small signals coming from the other harmonics, because the accuracy of nanovoltmeters depends on the range and on the amplitude of the readings.

A. General description
The stretched wire bench developed at the ESRF is based on two groups of Newport linear stages M-ILS250CC driven by a Newport XPS motion controller.The typical on-axis accuracy of these linear stages is AE1:25 m.The wire voltage was measured with a 2182A Keithley nanovoltmeter.The accuracy given by the manufacturer is 50 ppm of the reading and 4 ppm of the range, one year after calibration.
The linear stages and the voltmeter have been interfaced with the IGOR software (developed by Wavemetrics).The data processing is also performed with IGOR.
The linear stages and the measured magnet are supported by a 60 Â 60 cm 2 cross section granite table.
Titanium or beryllium copper wire can be used.The resonance frequency of the wire is tuned to a harmonic of the power line cycle, i.e., 50, 100, or 150 Hz.The typical wire length and diameters are 1.4 m and 100 m.If the wire is made of Ti90Al6V4 alloy, a resonance frequency of 150 Hz can be reached; with beryllium copper, the resonance frequency must be tuned to 50 Hz.Since the sag of the wire depends on the square of the resonance frequency, one expects better results with the titanium wire.
A 4 feet FARO platinum measuring arm can be fastened onto the bench for mechanical measurements.The volumetric accuracy of this measuring arm is AE18 m and the single point repeatability is AE13 m.It can be used for the fiducialization of multipole magnets.

B. Calibration
The calibration of rotating coils is a classical issue when measuring multipole magnets; it is common to use well-known reference magnets for this purpose.This approach can also be used for the calibration of a stretched wire measurement bench.However, a mechanical calibration of the linear stages is an alternative.
The angle between the horizontal linear stages and the granite table has been shimmed with a resolution of 10 m=25 mm.Even if the on-axis accuracy of the stages is very good, the wire motion is affected by the pitch of the horizontal stage.The typical value for the rms pitch angle is 32 rad, at a distance of roughly 15 cm.These angles and the horizontal displacements induced have been measured with Renishaw ML-10 laser interferometer.A correction table has been implemented in the XPS motion controller, and one takes the pitch into account when computing the T matrix.
The angle between the horizontal and the vertical linear stages can be measured by a laser interferometer using a perpendicularity kit.From Eq. ( 52), the perpendicularity error induces a roll error which does not depend on the magnet position.The perpendicularity error can be obtained by measuring the roll of a magnet, turning the magnet by 180 around the vertical axis, and measuring the roll again.This angle can be corrected numerically when building the T matrix.

C. Fiducialization
Once magnetic measurements have been performed, the position of the magnetic center must be transferred to the fiducials of the magnets.One simple solution is to place some reference spheres on the measurement bench, at positions such that these spheres are out of the magnet aperture but can be touched by the wire when the magnet is removed from the bench.One needs at least two spheres giving reference transverse and vertical positions and reference yaw and pitch angles; the granite table gives the reference tilt angle.
The calibration of the position of the reference spheres must be done before the magnetic measurement, with no magnet on the bench.The position of a sphere in the linear stages coordinate system can be found by approaching the wire to the sphere until electrical contact is made.The wire must be moved in the direction of the radius of the sphere.Any oxidation layer on the wire must be removed: in practice, this was done with very fine sandpaper.Good contact was obtained by cleaning the sphere and the wire with ethanol.The resistance was measured with a Keithley 2701 data acquisition system.With all these precautions, a repeatability of a few micrometers was obtained.The accuracy of this calibration method depends on the wire cross section, which is not perfectly circular.
Once these reference spheres have been calibrated, it is easy to compute their position in a coordinate system linked to the magnetic symmetry planes of a magnet.The transfer of coordinates between the reference spheres of G. LE BEC, J. CHAVANNE, AND CH.PENEL Phys.Rev. ST Accel.Beams 15, 022401 (2012) 022401-10 the bench and the fiducials of the magnet is performed with the FARO measuring arm.

V. MAGNETIC MEASUREMENTS
Stretched wire measurements have been performed on dipole, quadrupole, and sextupole magnets at the ESRF.The results obtained with the different methods described above are compared in this section.
In all the graphs shown below, the error bars indicate the standard deviation of the multipoles, related to the linear stages and the voltmeter accuracies.These errors have been estimated with the method described in Sec.III A, with a standard deviation of 1:5 m for the position accuracy, 60 ppm for the reading accuracy of the voltmeter, and 4 ppm for the range accuracy.
In all cases, the repeatability of the multipole measurements was better than 10 À4 of the main harmonic: the errors are dominated not by the precision but by the accuracy.

A. Dipole 1. Magnet
Magnetic measurements have been performed on a permanent magnet steerer which will be installed on an ESRF canted undulator.The minimum magnetic gap is 36 mm, the pole width is 85 mm, and its length is 83 mm.The on-axis nominal field integral is 5.40 Tcm.

Measurements
Different wire trajectories have been used for measuring this magnet: a circular trajectory, a dipole compensated trajectory (2PCT), a square box, and a linear motion.
The parameters for the circular trajectory were: a radius 0 ¼ 15 mm, 64 points, an integration time of 60 ms, the measurement length to step ratio was 0.9 and 8 measurements have been averaged.
The 2PCT parameters were: a radius 0 ¼ 15 mm, 64 points, 4 averages per point, a measurement length of 1 mm, a maximum speed of 20 mm=s and an acceleration of 200 m=s 2 .
A linear measurement of the vertical field was performed in the horizontal symmetry plane: 32 points were measured between À15 mm and 15 mm.The integration time was 40 ms and the measurement length was 0.8 mm.
Figure 11 shows a comparison of the multipole content measured by different methods.The two methods give similar results.
Figure 12 shows the field measured linearly on the horizontal symmetry plane of the magnet, and the field computed from the multipoles.The accuracy is much better for the multipole methods, as expected from Eq. (10).The quadrupole magnet used in this section is a new high gradient ESRF quadrupole.Its yoke length is 53 cm and its bore diameter is 66 mm.The nominal gradient is 12:8 Tm=m and the nominal current is 140 A.

Measurements
The following parameters were set for the circular measurements: 0 ¼ 30 mm, 128 points, the measurement length was 0.9 times the step length, the integration time was 60 ms for each point and 16 measurements were averaged.With these parameters, the angular speed of the wire was 0:117 turn=s.
The compensated measurements (4PCT) were done with the following parameters: measurement radii 1 ¼ 15 mm and 2 ¼ 30 mm, 64 points per measurement radius, 4 averages per point, a measurement length of 2 mm, a maximum speed of 20 mm=s, and an acceleration of 200 m=s 2 .
For the linear measurements, 31 points have been taken with ¼ fÀ30; . . .; 30g, the measurement length was 1.6 mm, the integration time was 40 ms, and 16 averages were performed.
The current was set to 140 A for all the measurements.The voltmeter range was 10 mV.The maximum voltage measured with the circular trajectory was close to 9 mV.
The measured normal multipoles are shown in Fig. 13.The field quality of this quadrupole is affected by some ''expected'' harmonics, mainly the 12-pole and the 20-pole which are odd multiples of the 4-pole.The yoke of the ESRF quadrupole magnet is open in the horizontal plane; this asymmetry generates an 8-pole component.The upper and the lower parts of the magnets are not perfectly parallel and the field gradient is slightly stronger on one side than on the other: this creates a sextupole component.
All of these multipole components appear clearly on the 4PCT measurements, whereas the circular measurement does not show the 8-pole and the 12-pole.Since both measurement methods are sensitive to position errors, the discrepancies come from the accuracy of the nanovoltmeter, which is better for compensated trajectory.
Figure 14 shows the field gradient computed from the measured multipoles, and measured linearly.The error bars of the linear measurements have not been plotted for a better clarity of the graph.These errors can be computed from Eq. ( 14) and are roughly 5 times higher than the errors of the 4PCT.The linear measurements show the field dependence predicted from Eq. ( 14).As expected, the gradient computed from multipole is more accurate than the gradient measured linearly.The difference between the circular measurement and the 4PCT is significant if the radius is large ( > 0 =2).The magnet used in this section is a new ESRF short sextupole.Its yoke length is 20 cm and its bore diameter is 82 mm.The nominal sextupole strength is 76:7 Tm=m 2 and the nominal current is 160 A.

Measurements
Most of the measurement parameters were the same as the parameters used for the quadrupole magnet.The only difference was the compensated trajectory: a 6PCT was carried out.The current was set to 160 A. The maximum voltage measured with the circular trajectory was close to 0.8 mV.
Figure 15 shows the multipole content measured with a circular trajectory and a 6PCT.Both measurements show the 12-pole, the 18-pole, and the high 30-pole.The main difference between these measurements and the quadrupole measurement is the maximum voltage, which is 10 times lower: this has a direct influence on the voltmeter accuracy.The accuracy analysis shows that the 6PCT gives better results than the circular trajectory.

D. Discussion
The measurements performed on three different kinds of magnets have demonstrated that the multipole based methods are more accurate than the linear measurements.The multipole methods are less sensitive to the accuracy of the linear stages.
For the quadrupole and the sextupole magnets, the multipole compensated trajectories give better results than the classical circular trajectories.This is not the case for the dipole magnet: all the multipole based methods give similar results.

VI. CONCLUSION
A least square method for the analysis of stretched wire multipole measurements has been developed.This method can be applied to any wire trajectory: the Fourier analysis of measurements done on a circular trajectory and the polynomial fitting of linear measurements appear as particular cases.It does not mean that any trajectory may be used for the measurement of any multipole: a bad choice of trajectory may lead to issues in numeric computation, i.e., ill-conditioned matrix and to an increased sensitivity to systematic errors.
There is a stretched wire equivalent of the widely used bucking coils: one can design wire trajectories which are insensitive to some harmonics.The basic idea of the multipole compensated trajectories (denoted as nPCT) is to move the wire in a direction which is parallel to the field lines of the main harmonic.
Simulations have been used for studying the accuracy of the measurement method.It has been shown that the sensitivity to position errors is similar for circular trajectories and nPCT.However, the nPCT is less sensitive to the voltmeter accuracy.A similar simulation method can be used a posteriori for the estimation of the accuracy of a multipole measurement.
A stretched wire measurement bench has been built at the ESRF.The bench is based on two groups of linear stages; the wire voltage is measured by a nanovoltmeter.A FARO measuring arm is used for the fiducialization.
Multipole measurements have been made on three different magnets: a dipole, a quadrupole, and a sextupole.Accuracies of a few 10 À4 of the main harmonic have been obtained in each case.Multipole compensated trajectories give better results for the quadrupole and sextupole magnets.The field computed from the multipoles was compared to the field measured with a linear motion of the wire.It has been demonstrated that the accuracy of multipole based methods is much better than the accuracy of linear measurements.

FIG. 3 .
FIG. 3. Definition of parameters for a stretched wire measurement.
FIG.6.Definition of the geometric parameters for a rotating coil.

FIG. 11 .
FIG. 11.Measured normal multipole content of a dipole magnet: (a) circular trajectory; (b) 2PCT.The dipole component has been normalized to one.

FIG. 13 .
FIG. 13.Measured normal multipole content of a quadrupole magnet: (a) circular trajectory; (b) 4PCT.The quadrupole component has been normalized to one.

FIG. 15 .
FIG. 15.Measured normal multipole content of a sextupole magnet: (a) circular trajectory; (b) 6PCT.The sextupole component has been normalized to one.