Measuring the magnetic axis alignment during solenoids working

A method for monitoring the misalignment of the magnetic axis in solenoids is proposed. This method requires only a few measurements of the magnetic field at fixed positions inside the magnet aperture, and thus overcomes the main drawback of sturdy moving mechanics of other Hall sensor-based methods. Conversely to state-of-the-art axis determination, the proposed method can be applied also during magnet operations, when the axis region and almost the whole remaining magnet aperture are not accessible. Moreover, only a few measurements of the magnetic field at fixed positions inside the magnet aperture are required: thus a slow process such as the mapping of the whole aperture of a magnet by means of moving stages is not necessary. The mathematical formulation of the method is explained, and a case study on a model of a multi–layer solenoid is presented. For this case study, the uncertainty is assessed and the optimal placement of the Hall transducers is derived.

The single-stretched-wire method exploits the Faraday induction law: when a single conducting wire is moved inside a magnetic field, the integrated voltage across its connection terminals is a measurement of the magnetic flux linked with the surface traced out by the wire. The axis is obtained by iterating horizontal and vertical sweeps of the wire until symmetric start and end points, where the flux is null, are found. This is a standard method for finding quadrupole magnets' magnetic axes; however, in the case of solenoids, this method has a much lower sensitivity, because the intercepted transversal field components are significant only at the magnet's ends. The vibrating-wire method, instead, is based on the Lorentz force. When a current pulse is driven through the wire, its interaction with the magnetic field generates mechanical vibrations, which can be measured and put in relation with the surrounding field. This method is a standard to measure magnetic axis position in quadrupole magnets for particle accelerators. The basic idea is to find the wire position in the magnet aperture where the smallest oscillations at first and second resonance frequencies are observed 21 . This same principle was applied to solenoids 20 . When the wire position coincides with the magnetic axis, the transversal field components cancel out and no motion is induced on the wire. Two wire resonance frequencies are excited for co-and counter-directional movements of the wire stages in the process of centering and aligning a solenoid. This procedure of finding the minimum oscillation amplitudes has a sensitivity to the misalignment in the order of the micrometer. The main drawback of this method is that the procedure is applicable only if the whole solenoid's aperture is accessible. Hence, these methods cannot be applied to real-time monitoring of an operational solenoid.
A different approach for estimating the magnetic axis consists of using Hall transducers. For example, the field generated by the rotation of a Hall transducer at several points along the axis of a solenoid can be recorded as a function of the rotation angle 23 . Then, the displacement of the axis of rotation from the magnetic axis is retrieved post-processing the solenoid field. A common way to determine the magnetic axis by means of Hall transducers to calculate the magnetic center is by measuring the 2D field profile of the solenoid at different positions along the z-axis and then estimating the magnetic axis position with a resolution of 0.01 mm 15 . In this case, the axial component of the magnetic field is measured, rather than the radial component. The drawback of the Hall transducer-based methods is the mapping of the whole solenoid aperture, generally performed with moving stages through sturdy mechanics. When a magnet is in operation, its coil is constantly subjected to an electrodynamic strain. This could easily bring to a significant misalignment of the magnetic axis from the geometric axis. In case of a multi-coil solenoid this effect would be even more dramatic, because the different coils could show different misalignments. Hence, a system for monitoring in real time these misalignments is essential in all applications where a strict constraint on the coils alignment is required, giving the possibility to adjust each coil position to achieve/recover the solenoid design parameters. However, the standard methods to find the magnetic axis, introduced in this section, are not suitable for a real-time monitoring, because they require that the whole solenoid's aperture is accessible.
In this paper, a novel Hall sensors-based method is proposed for the real-time monitoring of solenoids magnetic axis misalignment when the aperture is not accessible. Only a few measurements of the magnetic field at fixed positions inside the magnet aperture are required: thus a slow process such as the mapping of the whole magnet aperture by means of moving stages is not necessary. With respect to the preliminary version 24 based on tri-axial Hall transducers, less expensive and more accurate uni-axial transducers are exploited. Moreover, a study on the uncertainty of the method is presented. In particular, Section 2 presents the mathematical description of the method, discussing the involved geometrical quantities and two different formulations for four and three transducers per side. In Section 3, a case study on a model of a multi-layer solenoid is illustrated, by assessing also the measurement uncertainty and optimizing the placement of the Hall transducers.

Proposed Method
Basic idea. The proposed method aims at measuring the misalignment of the magnetic axis of a solenoid by using the difference between measurements of magnetic flux density in the actual and aligned cases. The method is summed up in Fig. 1. The magnetic flux density is measured by two sets of Hall transducers, placed on two planes orthogonal to the nominal axis at the extremities of the solenoid.
The measured values B m (H hk ) at each position H hk of the transducers are exploited to identify an inverse local field model, defined by linearizing the magnetic flux density around the positions where the transducers would move, due to the axis misalignment. The model allows to compute the displacements Δz′ and Δr′ of the transducer coordinates in the solenoid frame from the combination of the magnetic flux densities measured by the transducers. The displacements Δz′ and Δr′ are then transformed to the transducer frame and related to the Cartesian displacements Δx, Δy of the magnetic axis interception with the transducers planes. Finally, these displacements are used to get the parametric equation of the magnetic axis.
Analytical statement of the method. The proposed method assumes that: • From the solenoid point of view, the magnetic flux density preserves its axisymmetry even when the coil is misaligned with respect to the desired position. • The displacements of the interceptions of the magnetic axis with the planes of the transducers are small with respect to the radial position of the transducers. This assumption will be better clarified within the discussion. • The Hall transducers are not subject to movements. • There is no longitudinal shift for the solenoid.
For an axially-symmetric magnet, the magnetic flux density B expressed in the cylindrical coordinate system (r, ϕ, z) is independent from the angle ϕ. This means that the components of the field, namely B r , B z , and B ϕ , are all independent of ϕ. Furthermore, for a solenoid, it is also B ϕ = 0, because B is obtained as the curl of a vector potential A = ϕ ϕÂ , which has only a component along φ. Due to the axisymmetry, considering a circle with radius R 0 centered on the solenoid axis and contained in a plane orthogonal to this same axis, the two components of B will have a constant magnitude for all the points of the circle. This implies that also the field module B is constant on such a circle.
When the solenoid is in its nominal position (aligned solenoid, Fig. 2a), a Cartesian reference system with the origin at the center of the solenoid (O), and the z axis along the solenoid magnetic axis can be employed. Let us assume that eight Hall transducers are placed at the coordinates (−R 0 , 0), (+R 0 , 0), (0, −R 0 ), (0, +R 0 ) of the planes π 1 and π 2 . Such planes are orthogonal to the z axis, and at positions z = ±d/2, with d the distance between them. The solenoid magnetic axis passes through the points O 1 and O 2 , representing the intersection of the planes π 1 and π 2 with the z axis. Meanwhile, the Hall transducers will be subjected to magnetic flux densities with same amplitude, but with different orientation, because they are placed at the same distance from the magnetic axis.
When the solenoid is out from its nominal position (misaligned solenoid, Fig. 2b), the magnetic flux densities B measured by the transducers are different not only in the orientation but also in the magnitude, owing to the lack of symmetry (the transducers are assumed as not subject to movements). The above mentioned solenoid reference system is defined as a coordinate system coinciding with the transducers reference when the solenoid is aligned.
In the solenoid reference (Fig. 2b), the coordinates are pointed out with an apostrophe (′), the origin is the center of the misaligned solenoid (O′), and the magnetic axis corresponds to the z' axis. The magnetic axis is uniquely determined by the coordinates of the solenoid center O′ ≡ (x O′ , y O′ , z O′ ), and by its slope parameters v 1 , v 2 , v 3 : Indicating with ′ O 1 and ′ O 2 the intersections of the magnetic axis with the planes π 1 and π 2 , respectively, the slope parameters are obtained as: Then, according to the assumption of lack of longitudinal shift, the solenoid center is constrained to the plane π o : z = 0 (Fig. 2b). Therefore, only radial displacements and tilt are considered; thus, the solenoid does not move along the z-axis. In this case, eqs (1) and (2) are simplified as: Local field model. According to the above assumption of small solenoid axis misalignment, the distance between O 1 ≡ (0, 0, −d/2) and ′ O 1 and the distance between O 2 ≡ (0, 0, d/2) and ′ O 2 are small with respect to R 0 : Under this assumption, the field flux density is approximated with its first-order Taylor expansion around the position ′ H hk , corresponding to the point where the transducer would move, owing to the misalignment. Then, using such an expansion, the magnetic flux density is assessed in H hk (the position where the transducer actually lies). Here the subscript "h" identifies the plane where the transducer is located (h = 1 for π 1 , h = 2 for π 2 ), while "k" identifies the exact transducer of the plane.
The geometry suggests to adopt cylindrical coordinates, and, in the solenoid reference system, the magnetic flux density only depends on the radial (r′) and axial (z′) coordinates, but not upon the angle (ϕ′), owing to the axisymmetry. As an example, the case of one of the transducers is highlighted in Fig. 3. The transducer lies on the H 11 position, moving to ′ H 11 owing to the misalignment. In this case, the expansion will be around the point ′ H 11 , having coordinates r′ = R 0 , z′ = −d/2 in the solenoid reference system.
In the case of a generic transducer, located at H hk , the magnetic flux density is expanded as: where, z h = ±d/2, depending on the side of the solenoid where the transducer is placed. The first member of the equation is the quantity to be measured. In particular, uni-axial Hall transducers can be adopted, positioned along either the radial or the longitudinal direction of the transducer reference system. 1D Hall transducers placed radially are first considered. A radial transducer measures only the radial component of B when the solenoid is aligned. Instead, when the solenoid is misaligned, also a contribution from the axial component of the field will appear. The measured value is then composed by the superposition of the projections of B r and B z onto the radial direction of the transducer reference system. It will then depend on the magnitudes B r , B z , and on the angles α and β, between the vectors B r and B z and the radial direction of the transducer reference system, respectively (Fig. 4), again for a single transducer. The measured value is then expressed by: where the projections assume negative values when directed towards the z-axis and vice versa. As an example, in the case of Fig. 4, B mz has a positive value, while B mr a negative value. Under the assumption of small misalignment, eq. (6) can be simplified by assuming cos α ≈ 1. Then, the sign of B mr and B r coincide. Instead, the sign of B mz coincides with the sign of sin β because B z is always positive. Here, B r and B z can be expressed by Taylor expansion, as shown in (5). Such an expansion depends on the coordinates hk hk of the transducer positions in the solenoid reference system. The derivation of the geometrical quantities as well as of sin β for the different transducers is reported in the next subsection.

Geometrical quantities. The coordinates
hk hk of H hk in the solenoid reference system (Fig. 5) can be expressed in terms of the points H hk , I hk , and ′ O 1 (or ′ O 2 ), in the transducers reference. H hk is the point where a transducer is located, I hk its projection on the magnetic axis, and ′ O 1 the intersection between the magnetic axis and the plane π 1 considered in the figure.
′ r hk is the distance of the transducer position from the solenoid axis, namely the distance between H hk and ≡ I x y z ( , , ) . For example, considering H 11 ≡ (0, +R 0 , −d/2), eq. (7) holds under the hypothesis of small axis misalignment:  Analogously, in the case of H 13 ≡ (0, −R 0 , −d/2): The points I hk can be described with the parametrization of the magnetic axis introduced in eq. (3). The equation of the z′ axis must be combined with the equation describing a plane orthogonal to z′ and passing through the transducer , namely the expression (9).
It results that I hk has the following parametric expression: is needed, and this can be obtained from the third equation of (10), by considering that for z 1 and z 2 , is t = −1/2 and t = 1/2, respectively. Therefore, the following equations apply: In conclusion, the expressions of B r and B z can be written with the Taylor expansion thanks to the previous geometrical considerations. As an example, for the transducers in positions H 11 and H 13 it results that: where: The last term to be determined is sin β. For transducers lying on a straight line parallel to the y-axis, such as H 11 and H 13 , β is the elevation angle of the z′-axis from the xz plane: Similarly, for transducers lying on a straight line parallel to x-axis, such as H 12 and H 14 , β 12 is the azimuth angle z′-axis from the yz plane, and β 14 = −β 12 . In the latter case, the following equations apply:  In such positions, some symmetries of the magnetic field can be exploited. In the aligned case, indeed, both the radial and the axial components of the magnetic flux density have the same magnitude in the eight considered positions. In particular, the following relations apply:  Substituting (13) in (17) and neglecting the quadratic terms of v 2 : Repeating the same reasoning for the other transducers couples, the following system of equations is obtained:  This linear system can be easily solved to obtain x O′ , y O′ , v 1 , and v 2 :  Similar considerations can be done for transducers placed along the axial direction, leading to a slightly different set of equations: Thus, it can be easily derived that:  A further realization of the method can be obtained by only three transducers per solenoid side in order to minimize the system complexity. This is discussed in the appendix A. However, a more complex analytical model, and a higher uncertainty, both deriving from the lack of symmetry introduced removing one of the transducers per side, are involved.

Proof of Principle and Method Optimization
The proposed method for monitoring the solenoid axis misalignment is summarized by (19) and (21) when employing radially-or axially-placed uniaxial Hall transducers, respectively. The measurement procedure is summed up as follows: At installation: • Place the transducers by defining R 0 and d; • Obtain the needed field components and derivatives at (R 0 , −d/2) and (R 0 , +d/2) in the solenoid reference system; In operation: • Measure B m at the Hall transducers points; • Compute x O′ , y O′ , v 1 , and v 2 ; • Compute the related uncertainties. The parameters defining the magnetic axis misalignment depend on the longitudinal and radial positions of the transducers (R 0 and d), as well as on the specific longitudinal and radial field profile of the solenoid (represented by the field derivatives). Therefore, the transducers must be placed by taking into account that different positions can lead to a different uncertainty of the final result. Moreover, the misalignment parameters depend on the field profile, therefore, in general, an optimal placement of the transducers cannot be found. Instead, the optimization must be carried out by evaluating the uncertainty for the specific solenoid according its field.
This optimization procedure is highlighted by two case studies presented in this section, referring to two different models of a single coil of the multi-coil magnet to be employed in the ELI-NP project 25 . First, an analytical model for the single solenoid is considered, obtained on the basis of the geometries of a single coil of the ELI-NP magnet. Then, a FE model of the coil was obtained from the FEM of the multi-coil solenoid as a whole, by extracting the field of one of the coils.
Details about the employed field models are discussed in the next subsection. Then, the uncertainty is assessed and the optimal placement of the transducers is determined. Finally, simulations proving the effectiveness of the method in identifying the misalignment axis are reported.
Solenoid field models. Analytical model. A multi-solenoid made of 12 identical coils (the ELI-NP solenoid type B) was tested at the manufacturer (Danfysik) facility in 2015. In this paper, an analytical model of one of the coils of the magnet is considered. Among the models proposed in the scientific literature, a model of 2009 from MIT and the Community College of Vermont 26 is taken into account. This model is based on a generalized elliptic integral that is easily computable with a fast numerical algorithm, and it allows to calculate the magnetic flux density of a single layer solenoid. In particular, the solenoid was modeled in MATLAB with geometrical parameters such as the number of turns (N), the length (L), the aperture radius (R), and the operating current (I op ). The field of a multi-layer solenoid can be also simulated as a superposition of single layer solenoids with increasing aperture radius. Figure 6 shows B r and B z at the plane y = 0 for x ∈ [−R; +R] and z ∈ [−L; +L]. Due to the axisymmetry, the field for half a plane would be enough, but the entire plane is shown for clarity. The solenoid model has 12 layers, 9 turns per layer, length equal to 93 mm, aperture radius equal to 153,1 mm, and operating current I op = 177 A. Such parameters were chosen according to the characteristics of a single coil of the ELI-NP type B solenoid. In the figure, the section at y = 0 of the solenoid is also shown as a rectangle under the surface representing the field components, to better highlight the solenoid dimensions.
Finite Element Model. During the factory acceptance test (F.A.T.) of the ELI-NP multi-solenoid Type B, several magnetic, electrical, and hydraulic measurements have been performed, including a magnetic flux density mapping along several paths for two configurations: (i) by powering all the coils with the same current polarity (+ + + + configuration), and (ii) by alternating the current polarity for each coil triplet (+ + − − configuration). However, for both the configurations, only the longitudinal component of the flux density (B z ) was measured, so such measurements were not used directly to assess the derivatives needed for the measurement methods, because also the radial flux density would be required. Conversely, a FEM model was exploited and the longitudinal component output from the FEM was compared with the measured data.
A finite element analysis (F.E.A.) of the ELI-NP multi-solenoid type B was performed using Poisson Superfish software, in order to map the flux density generated by the twelve solenoid coils operating in DC. The simulation is a 2D model of the magnet with cylindrical symmetry, where all the coils and iron yoke dimensions were obtained by mechanical drawings and dimensional tests supplied by Danfysik. Each coil, composed by 108 turns, was powered with the nominal current of 177 A reaching an Ampere·Turns value of 19.116 A. The iron yoke material was modeled with a 17-4 ph stainless steel first magnetization curve. It is a mild steel, approximating the original iron yoke material (steel 37) satisfyingly. The output of the simulation is a field map of the radial and axial flux density components B r and B z , assessed in the inner aperture coil air region, with a corresponding step of 2 mm and 1 mm, respectively. Also all the derivatives of B z and B r in radial and longitudinal direction were included in the output files. The measured B z component measured during the F.A.T. was compared with the B z calculated through the simulations. As shown in Fig. 7, excluding the ends part of the fringe fields, the curves matched significantly within 2%. This error is negligible with respect to the measured and the simulated total integral field, over several trajectories at different radius from the mechanical axis (Table 1).
By relying on the same magnet model, only one coil per time can be supplied in order to obtain the field irradiated by a single solenoid. In Fig. 8, the coil considered for the FEM model is highlighted. This is the third of the first triplet and the field was simulated in the spatial region also highlighted in a lighter gray. The results of this simulation were employed for optimizing the transducers placement and validating the method.
Uncertainty Assessment. The uncertainties of the O′ coordinates, v 1 , and v 2 were assessed by considering their explicit expressions, obtained by exploiting the symmetries of the magnetic flux density irradiated by the solenoid. In particular, for radial transducers, the (20) and (22) have to be considered, for radial and axial Hall transducers, respectively. The uncertainty was computed by using the "law of propagation of the uncertainties" (LPU) for each equation. For the sake of brevity, only x O′ and v 1 for radial transducers are here considered, but the same reasoning can be applied for y o′ and v 2 , and for axial transducers. The squared standard uncertainties are:  where, u B is the uncertainty of the values measured by the transducers, supposed equal for all the transducers outputs; u g is the uncertainty related to the transducers placing, supposed equal for both geometrical parameters, R 0 and d; u ∂ is the uncertainty of the derivatives of B r , and u f is the uncertainty of the B z0 value. The last contributions arise from the field model, and they express the goodness of fitting with respect to the measured field. Once the above uncertainties are known, ′ u x O and u v 1 are expressed as a function of (R 0 , d) in order to find the optimal placement.
Assuming typical values of u B ≈ 10 −4 T for Hall transducers and u R0 ≈ u d = u g ≈ 10 −5 m, in a placement by laser tracking. Moreover, considerations about the field model suggest that derivatives and field components uncertainties are in the order of percent of their respective values.
To have a better understanding of the contributions to the total uncertainty, it is possible to demonstrate that the uncertainty related to the placement parameters is negligible with respect to that of the field measurements, under the above assumptions. This can be understood by noticing that: (24) According to the adopted field values, in fact, the derivatives values are of the order of 1 T/m, B z0 is about 0.06 T in the points of interest, and u g ≈ 10 −5 m. For the considered solenoid, therefore, the second term is in the order of 10 −4 m. Given the values of the derivatives and B z0 , u ∂ ≈ 10 −2 T/m, while u f ≈ 10 −3 T, when the relative uncertainties arising from the field model are within the order of percent. Moreover, the contribution related to u ∂ is dominant at the first member, because u f is an order of magnitude below, while their coefficients are of the same order. Finally, the coordinates of O′ and the values of v 1 (and v 2 ) are below 1 mm for a small misalignment. Thus, considering only the uncertainty contributions of u B and u ∂ , (23) can be rewritten as: The uncertainty minimization is hence limited by the Hall transducers technology, even if this can be mitigated by the transducers placement (minimization of the denominators).
As an example, when monitoring the solenoid magnetic axis, there could be interest in the point = , and one of the uncertainties of interest would be: The values of this uncertainty as a function of (R 0 , d) are shown in Fig. 9, when employing the analytical model or the FEM. The minimum is obtained when R 0 is the 90% of the aperture, and d equals about the 90% of the solenoid length for both cases, thus the transducers have to be placed slightly inside the magnet aperture to minimize ′ u x O 2 . Similar considerations stand for ′ u y O 2 and the optimal placement could aim to minimize both the uncertainties separately, or their combination.
Additional considerations are needed for the three transducers case, as reported in the appendix A.
Method validation through simulations. Once fixed R 0 and d, the effectiveness of the proposed method can be proved by simulation, through either the analytical or FE field model. A known misalignment is imposed in order to calculate the reference quantities identifying the magnetic axis (reference values of O′, v 1 , and v 2 ). Then, these quantities are estimated by the equations of the method, and a corresponding uncertainty can be assessed. In the simulation, the misalignment is implemented with a rotation and then a translation of the solenoid. When employing the analytical field model, simulation results show that the estimated error is always below 10 −7 m. when the misaligned magnetic axis is rotated of angles up to π/1000 and translated of 1/1000 times the solenoid length. These are reasonable maximum misalignments in the cases of interest. Taking into account the same misalignment, the uncertainty is higher but always below 10 −6 m, when employing the FE model.

Conclusions
In this work, a novel method for monitoring in real time the magnetic axis misalignment in solenoids has been presented. Relying on few measurements of the magnetic flux density, this method is especially intended for applications where the magnet aperture is not accessible. The magnetic axis is determined calculating the solenoid center and slope parameters. To this aim, a field model of the solenoid must also be employed to extract useful data for the calculations. The mathematical model of the method was derived for the case of radial or axial placement of the Hall transducers, and for the case of four or three transducers per solenoid side.
A case study, based on the ELI-NP type B multi-coil solenoid, was considered. In particular, an analytical and a FE model of a single coil of the ELI-NP type B solenoid were employed to assess the uncertainty of the method and to obtain the optimal placement of the Hall transducers. Moreover, simulations were carried out with both the models, to verify the capability of the method of estimating an imposed misalignment. Further work will be directed toward an experimental evaluation of the method on a actual solenoid, as well as to its extension to the case of a multi-coil solenoid.

A Three Transducers Per Solenoid Side
Adopting only three Hall transducers per solenoid side, as shown in Fig. 10, it is still possible to obtain a system of equation to calculate O′, v 1 , and v 2 . The position of the transducers are:   These equations can be better re-arranged neglecting the quadratic terms of v 1 and v 2 , and defining:  This also means that the first two equations have to be solved before in order to obtain x O′ and v 1 , which are needed to calculate K 1 and K 2 . Thanks to that, (29) hold:     In conclusion, owing to the lack of symmetry in the transducer placement, the uncertainties of y O′ and v 2 are slightly higher than those of x O′ and v 1 . This difference can be seen referring to the uncertainty of ′ y O 2 , which is shown in Fig. 11. Instead, the uncertainty of ′ x O 2 is still the one of Fig. 9. The figure highlights that the uncertainty of ′ y O 2 is higher than the one of ′ x O 2 , but the optimal placement is almost the same as the previous case, namely R 0 equal about the 90% of the aperture and d equal about the 90% of the solenoid length.