Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 5, No. 1, 2023 102 Design of A Three‐axis Helmholtz Coil for Magnetic Sensor Calibration Song Zhang*, Caihong Li College of Electrical & Information, Southwest Minzu University, Chengdu 610041, China Abstract: Accurate measurement of magnetic sensor components is always an important issue in magnetic field applications, but there are unavoidable errors in the sensor system that need to be corrected before use. The common scalar correction method is difficult to effectively correct the sensor component because it requires a uniform and stable background magnetic field and depends on the magnetic field modulus. Therefore, a set of triaxial Helmholtz coils that can be used for sensor vector correction is designed to generate a controlled standard magnetic field. The design index of the coils, the size of the uniform zone, and the relationship between the magnetic field and the current were analyzed to provide a basis for the effective calibration of the sensor components. The measurement results show that the size of the uniform zone and the accuracy of the magnetic field of the coils designed in this paper meet the design requirements. Meanwhile, by using the coils in the calibration of the sensor array and the positioning of the magnetic target, the sensor error is reduced by three orders of magnitude, and the positioning accuracy of the magnetic target reaches 0.1 m with good practical effect. Keywords: Triaxial Helmholtz coil, Magnetic field uniformity, Magnetic sensor, Vector correction. 1. Introduction In recent years, magnetic exploration technology has been widely used in geological exploration [1-2], medical diagnosis [3], military aviation [4-5] and other fields. The development of magnetic exploration technology has evolved from single total field measurement, single gradient field measurement, magnetic vector field measurement, to the current magnetic gradient tensor field measurement, and its development trend has been transformed from magnetic field scalar detection to the measurement of the three components of the magnetic field. However, due to the influence of the manufacturing process and installation accuracy of the sensor itself, there is a large error in the measurement results, which seriously reduces the accuracy of exploration results. Therefore, the sensor must be calibrated before use. The common sensor calibration methods currently available can be divided into two main categories. One type is the scalar calibration method based on the magnetic field modulus, which assumes that the magnetic field modulus remains constant for a certain period of time, rotates the sensor in a highly uniform and stable background magnetic field, and fits the measurement results to the standard modulus to obtain the sensor error parameters. Based on this, researchers have proposed a number of correction methods, the most classical of which is the ellipsoidal fit correction method. In 2019, by establishing the relationship between the error model and the coefficients of the ellipsoid equation, Xiang et al. developed an online correction method for the coefficients of the ellipsoid equation based on recursive least squares to realize sensor error correction [6]. In 2021, Tang et al. proposed a sensor error compensation method based on Gaussian process regression, which accomplished the correction of three-axis magnetic sensors by fitting the mapping relationship between sensor magnetic measurement data and the real magnetic field [7]. In 2022, Li et al. proposed a sensor error correction method based on the Dragonfly algorithm (DA) and the Levenberg-Marquardt (LM) algorithm, which uses the DA algorithm to optimize the model parameters to achieve global optimization, and then estimates the error parameters by the LM algorithm to achieve the correction of sensor errors [8]. Although the scalar correction method is widely used, unfortunately, it is difficult to establish an accurate and perfect mathematical model, and cannot ignore the fluctuation and inhomogeneity of the ambient magnetic field, so it is difficult to achieve accurate correction of the components. Another type of method is the vector calibration method based on the magnetic field component information. This method requires the use of a high-precision magnetic field generator to generate a standard controlled magnetic field, which is used as a reference for calibrating the sensor. In 2015, Zikmund et al. proposed a vector correction method using scalar magnetometers and Helmholtz coil that, unlike other methods, does not require offsetting the magnitude of the Earth's magnetic field and does not require moving the sensor [9]. In 2019, Ali et al. proposed a sensor error correction method using a uniaxial Helmholtz coil and combining least squares with BP neural networks.The uniaxial Helmholtz coil is used to generate a reference magnetic field, the errors such as accuracy and nonorthogonality of the sensor are corrected, and the effect of noise on the measurement results is compensated [10]. In the same year, Janosek et al. proposed a calibration method for DC precision magnetic sensors with interference compensation in a weak magnetic environment, which improved the environmental adaptability of the sensors and achieved good calibration results in a laboratory environment with significant magnetic interference [11]. In 2020, Pan et al. proposed a method to correct sensor errors using a magnetically shielded chamber and a triaxial Helmholtz coil, which was achieved by modeling sensor errors as well as environmental noise, using a magnetically shielded chamber to provide a near-zero magnetic environment, and using a triaxial coil to provide a controlled vector magnetic field [12]. Since the vector correction method provides the standard magnetic field vector information, the sensor component can be corrected. However, a standard vector field needs to be 103 generated by a high-precision magnetic field generator, so it is essential to have a reliable triaxial Helmholtz coil. Based on the subject requirement of magnetic sensor error correction system, this paper designs a three-axis Helmholtz coil active magnetic field generation device based on the analysis of the principle of Helmholtz coil, which is used to generate the reference magnetic field required for sensor calibration. Also, the size of the coil uniform zone and the relationship between the coil magnetic field and the excitation current are investigated. Finally, it is proved by simulation and experiment that the size of the uniform zone of the three- axis coil designed in this paper can meet the experimental requirements of this subject, the array error is reduced by 3 orders of magnitude. 2. Triaxial Helmholtz Coil System Design 2.1. Single Axis Helmholtz Coil The physical structure of a single-axis Helmholtz coil is shown in Figure 1. The Helmholtz coil is a system consisting of two circular coils of radius R placed in parallel, with the distance between the two coils equal to L(=R). The coils are connected by a single wire, and the coils are wound in the same direction so that the magnitude and direction of the excitation current I in the coils are identical. X Y I R Idl 1Q 2Q x / 2R/ 2R r R I L O Figure 1. A schematic of the physical structure of the single-axis Helmholtz coil According to the Biot-Savart law, when a current is applied to a coil, the magnetic induction dB � of any current element Idl � on the coil, at any point P in space, is proportional to the size of the current element Idl � , to the sine of the angle between the position vector r � from the current element Idl � to the point P and the current element Idl � , inversely proportional to the square of the distance r from the current element Idl � to the point P. The mathematical expression is as follows: 0 0 2 3 sin , 4 4 Idl dl r Idl r dB r r        � � � � �� (1) By integrating Equation 1, the magnitude of the magnetic field of one of the coils at point P can be obtained as: 0 24 NI dl r B r      � � (2) where 0 is the vacuum permeability and its value is 74 10 /T m A  i . N is the number of turns of wire wound on the coil. When two coils of radius R are simultaneously fed with an excitation current of magnitude I and in the same direction, the magnitude of the magnetic induction at any point x on the center axis of the Helmholtz coil can be calculated from Equation 2 as:    2 0 1 2 2 NIR k k B x    (3) where, 3 2 2 2 1 2 R k R x             (4) 3 2 2 2 2 2 R k R x             (5) Therefore, the magnitude of the magnetic field of a single coil and the superimposed magnetic field are shown in Figure 2. Knowing the number of turns N of the Helmholtz coil, the radius R of the coil, and the value of the excitation current I applied to the coil, the magnitude of the magnetic field at any point x on the central axis of the uniaxial Helmholtz coil can be calculated from Equation 3. Magnetic field intensity Positions Figure 2. Single coil magnetic field and superimposed magnetic field 2.2. Three-axis Helmholtz coil A three-axis Helmholtz coil generates a magnetic field based on the same principle as a single-axis Helmholtz coil, consisting of three pairs of single-axis Helmholtz coils arranged orthogonally to each other. When excitation currents are applied to the three coils, magnetic fields of corresponding magnitudes are generated in the three orthogonal directions. According to the superposition principle, the magnetic field in any direction can be superimposed on the three orthogonal directions by changing the magnitude and direction of the excitation currents of the three coils. In order to calibrate the magnetic sensor, we need to design a three-axis Helmholtz coil applicable to this topic, based on the principle of magnetic field generation by Helmholtz coils and the distribution of magnetic field on the central axis. The design of Helmholtz coils involves the selection of various physical parameters and coil sizes. The main coil parameters to be determined are the size of the coil, the number of turns 104 of the coil, the length of the wire, and the cross-sectional diameter of the wire. Among them, the size of the coil is determined based on the experimental conditions and the size of the required magnetic field; the number of turns of the coil is determined based on the design size of the coil, the magnitude of magnetic induction, and the minimum current used; the length of the wire can be determined by the size of the coil and the number of turns of the coil; and the cross-sectional diameter of the wire is determined based on the length of the wire, the resistance of the wire, the quality of the wire, the environmental conditions, and previous experience. Since the local magnetic field is about 50000nT, the magnetic field at the center of the central axis of the coil is set to 50000nT, and the coil should generate a magnetic field of 100,000nT when a current of 1A is applied to the coil, that is, the coil design range of ±100,000nT. At the same time, according to the size of the experimental environment, the actual size of the design coil should not be too large, the radius of the coil should be about 50 cm. At this point, from Equation 3, the formula for calculating the number of turns N is 2 0 2B N IR K  (6) 3 3 2 22 2 2 2 2 2 R R K R x R x                               (7) The length L of the coil wire is calculated by the following formula: 2L RN (8) The resistance wireR of the coil wire is calculated by the following formula: 2 4 wire L L R s d      (9) Where,  is the resistivity of the wire, when the wire used is copper, the resistivity of the wire is 8 m  , s is the cross-sectional area of the coil wire, d is the cross-sectional diameter of the coil wire. When the length L of the coil wire is certain, the smaller the cross-sectional diameter d of the coil wire, the greater the resistance wireR of the coil wire. Therefore, in order to reduce the heat loss brought about by the coil wire in the process of energizing, the cross-sectional diameter d of the coil wire should be as large as possible. Considering the limitation of the magnetic field and the experimental environment, the coil with the following specifications is selected and designed: The diameter of the coil skeleton is 1050 mm, the thickness of the coil skeleton is 30 mm, the width of the coil skeleton is 130 mm, the actual radius of the coil is 500 mm, the diameter of the coil is 1050 mm, the thickness of the coil skeleton is 30 mm, the width of the coil skeleton is 130 mm, the diameter of the coil is 500 mm, the height of the coil center point is 525 mm, the number of winding turns is 56 for each coil, the length of the wire on a single coil is 177 m, the diameter of the enameled wire is 0. 67 mm, and the load resistance is connected in series with 13  turns per dimension. In addition, a platform with a radius of 150mm is designed to place the sample, and the height of the platform can be adjusted according to the demand of use. The height of the platform can be adjusted to 525 ± 100mm. Table 1. Comparison of magnetic field values at the center of the triaxial coil when the current is loaded on each axis Theoretical value/nT Measured value/nT Difference value/nT Error X-axis coil 50556.0963 50551.6175 -4.4787 -0.009% Y-axis coil 50556.0963 50560.67 4.5736 0.009% Z-axis coil 50556.0963 50559.46 3.3636 0.007% To verify the accuracy of the coil parameters, a current of 0.5 A was applied to the three-axis coil respectively. The difference between the theoretical magnetic field at the center of the three-axis coil and the magnetic field measured by the sensor is shown in Table 1. As shown in Table 1, when the three orthogonal axes of the coil are respectively loaded with current, the maximum error of the magnetic field measured by the magnetic sensor at the center of the coil is only 0.009% compared with the theoretical magnetic field at the center of the coil. Through analysis, the error may be caused by the inaccuracy of the coil radius measurement, the error of the current generated by the coil current source, or the unaligned position of the sensor probe and the coil center. According to the measurement results, the magnetic field at the center of the coil can meet the experimental requirements, and the error is within the permissible range. However, whether the size of the uniform zone of the coil meets the experimental requirements must be specifically analyzed and verified. 3. Analysis of Coil Uniformity 3.1. The size of the uniform region on the central axis As shown in Figure 2, the magnetic field generated by the coil is relatively constant to a certain extent on both sides of the center point, which we call the uniform zone of the Helmholtz coil magnetic induction, the size of the uniform region is the key factor to judge whether a coil can be used in the experiment, and is also an important condition for the accuracy of the experiment. For a triaxial Helmholtz coil, the size of its uniform region can be seen to some extent as the superposition of three pairs of uniaxial coils in three axes. Therefore, this section will analyze the size of the uniform region of the coils in each of the X-axis Helmholtz coils as an example. In order to calculate the uniform size of the coil more conveniently, the Taylor series approximation method is introduced into the solution process. The intensity of the magnetic field generated by the uniaxial Helmholtz coil decreases from the central point to the two sides. The magnetic field intensity at the central point is the highest. The further away from the central point, the lower the magnetic field intensity and the faster the magnetic field intensity decreases. The magnetic field is symmetrical on both sides with the center as the origin, that is, the magnetic field generated by the uniaxial Helmholtz coil is symmetrical, and the center of the symmetry axis is the center of the coil. Thus, Equation 3 is an even function, and expanding B (x) to a Taylor series gives us: (2) 2 (4) 4 (6) 61 1 1 ( ) (0) (0) (0) (0) 2 24 720 B x B B x B x B x    � (10) 105 where (2) (0)B , (4) (0)B and (6) (0)B represent the second, fourth and sixth order derivatives of the magnetic field strength B (x) at the center point, respectively. From Equation 3 and Equation 10, the coil magnetic field satisfies (2) (0) 0B  , at which time the magnetic field on the central axis is approximately equal to a constant and can be regarded as a uniform magnetic field. Substituting the magnitude of each order derivative into Equation 10, the equation for the magnetic field at any point x on the central axis can then be transformed into: 4 144 ( ) (0) 1 125 x B x B R           (11) Further, the ratio of the deviation of the magnetic field B(x) at any point x on the central axis from the magnetic field B(0) at the central point relative to the magnetic field B(0) at the central point is 4 ( ) (0) 144 (0) 125 B x B x B R           (12) For convenience, we denote the relative deviation of the magnetic field at any point x on the axis and the center point as  . From Equation 12, we can obtain that the area of the magnetic field on the central axis of the coil with relative deviation 1%  is <0.30524Rx . That is, the range where the 99% uniform zone on the central axis of the coil is located is within the area of ±0.30524R on both sides of the center point on the central axis. Substituting the coil radius into it, we can get the range of uniform zone on the center axis of the coil as ±0.152m. 3.2. The size of the uniform region outside the central axis Xx d  ,xB d x  ,dB d x P Figure 3. A schematic of the magnetic field at a point P outside the central axis There is a point P outside the central axis, the distance from point P to the central axis (X-axis) is d, and the corresponding X-axis coordinates are x, as shown in Figure 3. The magnetic field of the Helmholtz coil at point P can be decomposed into an axial component  ,xB d x parallel to the central axis X and a radial component  ,dB d x perpendicular to the central axis X. According to Gauss's theorem and the loop theorem, the magnetic field at a point P outside the central axis in the axial plane can be approximated by 4 2 2 4 3 3 144 3 ( , ) (0) 1 3 125 8 144 3 ( , ) (0) 2 125 2 x d B d x B B d x B                             (13) Where, /x R  , /d R  . From Equation 13, the relative deviation between the axial component of the magnetic field at a point outside the axis of the coil and the magnetic field at the center is: 4 2 2 4( , ) (0) 144 3 3 (0) 125 8 xB d x B B                 (14) Thus, when the central axis uniformity is given, the radial uniformity size of the point can be obtained. According to Equation 12, when 1%  , that is, / <0.30524x R , the magnetic field uniformity on the coil axis is 99%. So, if 0.30524  , derived from Equation 14, the value of the corresponding P is 0.26151 when 1%   . Therefore, the range corresponding to the 99% uniform region is <0.30524Rx , 0.26151d R . As a result, for the Helmholtz coil designed in this paper, the 99% uniformity region of the uniaxial coil is within the range of ±0.152m in the axial direction and ±0.1302m in the radial direction. The magnetic field distribution at any point on the axial plane can be drawn using the MATLAB software as shown in Figure 4, from which it can be seen that the uniformity of the magnetic field in the above region is close to 1. In fact, in addition to the uniformity of the magnetic field intensity in the above analysis, the direction of the magnetic field in the uniform region should also be uniform. Therefore, the uniformity of the magnetic induction direction is also an important reference for the uniformity of the magnetic field. Since the direction of the magnetic induction ( , )xB d x in the central region is mainly in the x-direction, the ratio of the radial component ( , )dB d x to the axial component ( , )xB d x describes the identity of the direction of the magnetic induction in terms of the deviation rate r in the direction of the magnetic field. As can be seen from Figure 5, the uniformity of the magnetic field direction is best along the central axis of the Helmholtz coil.         , , , 0,0 d d x x B y z B y z r B y z B   (15) 106 Figure 4. Helmholtz coil axial plane magnetic field distribution Figure 5. Schematic diagram of the identity of the direction of magnetic induction Finally, the COMSOL multiphysics field simulation software is used to build the physical model, calculate the magnetic field generated by the coil, and analyze the results. As shown in Figure 6, applying a given excitation current to the uniaxial coil generates a magnetic field around the coil. By plotting the magnitude of the magnetic flux density in the three working planes XY, XZ and YZ, it can be seen that the magnetic field in the central region of the coil is of the same size and direction with good uniformity. Among them, the different colors indicate the strength of the magnetic field, and the red arrows indicate the direction of the magnetic field. Figure 6. Strength and direction of the magnetic field of a coil 4. Triaxial Helmholtz Coil Current- magnetic Field Relationship Once the required triaxial Helmholtz coil is obtained, the magnetic field generated by the triaxial coil at the center point can be calculated from Equation 3. However, it has been found that the magnetic field at the center of the coil does not agree with the theoretical calculation, and the magnetic field at the center of the coil could not be accurately obtained by Equation 3 alone. This is due to the fact that when current is applied to a single-axis coil, the resulting magnetic field produces a projected magnetic field in the other two axes, and the presence of the projected magnetic field affects the data in the other two axes. Therefore, the relationship between the current and the magnetic field must be explored in order to better calculate the magnitude of the magnetic field generated when the coil is energized. 4.1. Derivation of current-magnetic field relationship When a current is applied to a triaxial coil, the magnetic field size cS at the center of the coil can be derived from the following formula: xc x x c yc y y zc z z S B H S S B H S B H                     (16) where T xc yc zcS S S   is the three-component magnitude of the magnetic field at the center point, T x y zB B B   is the three-component magnitude of the background magnetic field at the center point of the coil, that is, the magnetic field superimposed by the geomagnetic field and the anomalous magnetic field at zero current, which can be considered as a fixed value, and T x y zH H H   is the magnitude of the magnetic field generated by the triaxial coil under the action of the excitation current. It should be noted that the coordinate system of the triaxial coil is aligned with the coordinate system of the background magnetic field, and the magnetic field components of the X, Y, and Z axes point due east, due north, and to the ground, respectively. The magnetic field in each axis is generated by the common excitation of the three-axis current, because the projected magnetic field is generated in the other two axes when current is applied to a uniaxial coil. Of these, the current in line with the coil axis makes the largest contribution to the magnetic field generated in that axis. In other words, the magnetic field xH generated by the X-axis coil is produced under the joint excitation of the X-axis current xI , the Y-axis current yI , and the Z-axis current zI . The largest contribution to the magnitude of the magnetic field xH of the X-axis coil is made by the X-axis current xI . At this point, the coefficients between the magnetic field xH of the X-axis coil and the currents xI , yI , and zI applied to the three-axis coil are Cxx , Cxy , and Cxz . Similarly, the coefficients between the magnetic field Hy generated by the Y-axis coil and the exciting current are Cyx , Cyy and Cyz , respectively, and 107 the coefficients between the magnetic field Hz generated by the Z-axis coil and the exciting current generated by the three- axis coil are Czx , Czy and Czz , respectively. Therefore, the relationship between the magnetic field of the coil and the exciting current is as follows: xc x x x y z yc y y x y z zc z z x y z S B H Cxx I Cxy I Cxz I S B H Cyx I Cyy I Cyz I S B H Czx I Czy I Czz I                            (17) Writing Equation 17 in matrix form as: x x y y z z H Cxx Cxy Cxz I H Cyx Cyy Cyz I H Czx Czy Czz I                               (18) where Cxx Cxy Cxz Cyx Cyy Cyz Czx Czy Czz           is the matrix of coefficients between the coil current and the magnetic field, called the C matrix. From Equation 18, the coefficient matrix C between the coil current and the magnetic field can be calculated using the least squares method when both the current loaded in the coil and the magnetic field generated are known. When the current loaded in the coil is known, the magnetic field generated by the coil can be obtained by subtracting the total magnetic field and the background field at zero current measured by the magnetic sensor, respectively. Equation 18 is a calculation of the magnetic field of a coil with a known coil current. If the magnitude and direction of the magnetic field are known, the required current can be derived from Equation 18: 1 x x y y z z I Cxx Cxy Cxz H I Cyx Cyy Cyz H I Czx Czy Czz H                                (19) Therefore, when the coefficient matrix C between the coil magnetic field and the current is known, either the coil magnetic field for a known current or the excitation current for a known magnetic field can be calculated from Equation 18 and Equation 19. 4.2. Coefficient matrix measurement experiment Based on the above, this paper designs an experiment to measure the coil current-magnetic field coefficient matrix C. A calibrated sensor is placed at the center of the coil, several sets of excitation currents of different magnitudes are applied to the coil, and the sensor measures and records the magnetic field value at the center of the coil. The C-matrix between the coil current and the magnetic field is measured according to Equation 18 using the method of least squares. In order to measure the coil coefficient matrix more accurately, the external magnetic field cannot fluctuate much during the experiment, so the experiment time was chosen after 1:00 am. Also, in order to avoid the zero effect, the positive and negative currents are added to the experiment. The current values were divided into two groups. In the first group, the three-axis coil was charged respectively. The specific current values were: ±500A, ±400A, ±300A, ±200A, ±150A, ±100A, ±50A, ±30A, ±20A, ±10A, ±6A, ±2A, ±1.5A, ±1A, ±0.5A, 0A. The second group is three-axis coil at the same time power, by a number of groups of random current composition. After measurement and fitting, the coil current- magnetic field coefficient matrix is obtained as follows: 101.03264 0.09210 0.12709 0.08664 100.93808 0.31782 0.18226 0.22631 101.34110 C           (20) To verify the accuracy of the coil coefficient matrix, a new set of random currents is generated for testing. The magnitude of the loaded current value, the fitted value of the coil magnetic field, and the actual value are shown in Table 2. As can be seen in Table 2, the fitted value of the coil magnetic field calculated using the coil current and coefficient matrix is very close to the actual value of the magnetic field with a very small error. The magnitude of the error is shown in Figure 7. For the magnetic field generated by the above currents, the maximum error between the fitted and actual values does not exceed 3nT, where the average error on the X-axis is 0.166nT, the average error on the Y-axis is 0.225nT, and the average error on the Z-axis is -0.551nT. Table 2. Comparison of the fitted and real values of the coil magnetic field Current values /mA Actual magnetic field values /nT Fitted magnetic field values /nT Ix Iy Iz Bx By Bz Bx By Bz 1.31 0.83 -1.09 134.086 81.028 -110.817 132.138 83.546 -110.888 0.81 1.80 -1.36 83.449 178.660 -138.339 81.498 181.326 -138.379 -1.48 1.61 2.11 -147.188 165.459 210.760 -149.408 163.053 213.735 -1.74 0.27 3.58 -177.314 29.437 360.103 -175.367 28.240 363.057 -1.53 1.97 3.09 -152.692 202.473 310.577 -154.369 199.698 312.977 -1.21 4.05 3.30 -119.358 411.626 332.349 -122.203 409.743 333.730 -1.30 2.39 4.18 -131.401 244.755 421.138 -131.031 242.458 423.302 -0.37 0.30 4.33 -39.692 33.355 436.692 -36.859 31.626 438.807 -0.30 2.51 4.24 -30.170 256.378 428.170 -30.002 254.676 429.173 0.46 3.83 2.77 47.175 386.607 281.512 46.474 387.513 279.764 From the above analysis, it is clear that the current- magnetic field coefficient matrix of the triaxial Helmholtz coil is calculated accurately, and the magnitude of the magnetic field corresponding to the coil current can be effectively calculated when the coil current is known. The error between the calculated result and the actual magnetic 108 field value is small, and the calculated value can be used as the ideal data for sensor calibration. Figure 7. The difference between the fitted and the actual magnetic field 5. Calibration and Positioning Experiments To Verify The Calibration Effect Of The Three-Axis Helmholtz Coil Designed in this paper, first a uniform magnetic field is generated by the three-axis coil to correct the errors of the sensor array, then the corrected sensor array is used in the magnetic target localization experiment, and the calibration effect is verified by the localization result. The four sensors are placed at the four ends of the aluminum cross bracket, the baseline distance between the two sensors is 20cm, and the sensors are axially consistent. The installed sensor array is placed on a platform at the center of the three-axis coil, the center of the array is aligned with the center of the coil, and the three-axis of the sensor and the axis of the coil are in the same direction as the geographical coordinate system, the X-axis points to the east, the Y-axis points to the north, and the Z-axis points to the ground. According to the size of the coil uniform region, the sensor array is located in the 99% coil uniform region, and the magnetic field of the four sensors in the array is considered to be the same size and direction, sensor output should be consistent. Figure 8. Schematic diagram of sensor calibration After the experimental platform is set up, 124 sets of excitation currents of different directions and magnitudes are added to the three axes of the coil by controlling the coil current source, and the current magnitudes and the corresponding measured values of the sensors are recorded. From Equation 16, the measured value of the sensor is the superposition of the background field and the magnetic field of the coil. The background field is measured by the calibrated sensor before the start of the experiment, and the coil magnetic field can be calculated using Equation 18 and Equation 20. The sensor array error can be corrected using a machine learning based sensor vector correction method. The calibration results are shown in Figure 9-10. After correction, the error fluctuation of X-axis is reduced from 1278.9926nT to 4.0158nT, the error fluctuation of Y-axis is reduced from 1467.2947nT to 4.4847nT, the error fluctuation of Z-axis is reduced from 348.1665nT to 4.6296nT, and the error fluctuation of mode value is reduced from 1074.7138nT to 6.2557nT. In addition, the sensor array gradient error was also corrected. Taking the two sensors on the X-axis as an example, the corrected X-axis gradient error was reduced from 3620.3761nT to 4.8413nT, the Y-axis gradient error was reduced from 3488.4456nT to 5.0786nT, the Z-axis gradient error was reduced from 4534.1979nT to 3.2408nT, and the modulus gradient error was reduced from 1014.5366nT to 5.9418nT. Therefore, the calibration accuracy of components and modules is greatly improved, good calibration results are achieved, and coil design requirements are met by using a triaxial Helmholtz coil to generate a uniform magnetic field for calibrating sensors and arrays. To verify the actual correction effect of the sensor, the corrected sensor is applied to the positioning experiment. 109 Figure 9. Before and after calibration, the sensor component and modulus error As shown in Figure 11, the equipment used in the positioning experiment consists of a high-precision three-axis non-magnetic turntable, a positioning array and a permanent magnet. The non-magnetic turntable can rotate 360° in X, Y and Z axes, and the minimum rotation accuracy of each axis is 0.1°. During the experiment, the sensor array is installed in the non-magnetic turntable, so that the plane of the array is parallel to the ground, and the accurate rotation of the sensor array direction can be realized. The size of the positioning array is 2m×2m, which is used to determine the coordinate position, and the position interval in the positioning array is 0.1m. The size of the permanent magnet is 30×6×8mm, and the magnetic moment is 2 2A m . The permanent magnet is used as a magnetic target in the positioning experiment. Figure 10. Correction results of sensor array non-alignment errors Figure 11. Schematic diagram of the experimental site 110 The magnetic anomaly field generated by the magnetic target is measured using a cross-type sensor array, and the position of the magnetic target is inverted by an improved TMG localization algorithm after the localization data is corrected using the previously obtained sensor calibration parameters, and the inversion results are shown in Table 3. Table 3. Positioning results of the calibrated sensor array Positions Actual positions Inversion results X/m Y/m Z/m X/m Y/m Z/m 1 0.95 0.775 0 0.94042 0.7676 -0.0919 2 1 0.65 0 0.98226 0.64273 -0.1266 3 0.685 0.685 0 0.67134 0.67097 -0.1162 4 0.225 0.875 0 0.16419 0.87548 0.02525 As can be seen from Table 3, the error between the magnetic target inversion results and the preset position are about 0.1m after correction, which leads to a better positioning effect of the corrected sensor array and also proves the effectiveness of the three-axis coil for sensor correction. 6. Conclusion The main purpose of this paper is to design a set of active magnetic field generating device, a triaxial Helmholtz coil, suitable for sensor component error correction. Based on this purpose, this paper has studied the design index, the size of uniform zone, and the magnetic field-current relationship for the coil. And through sensor calibration and positioning experiments, it is verified that the triaxial coil designed in this paper can achieve effective correction of sensor components and achieve better results. The specific research contents of this paper are as follows: (1) Based on the analysis of the magnetic field characteristics of the uniaxial Helmholtz coil, the parametric specifications of the triaxial coil were designed, and a set of triaxial Helmholtz coils for sensor component correction was fabricated according to the specifications. To solve the size of the uniform zone of the triaxial coil, the range of uniform zone inside and outside the central axis of the coil was calculated using Taylor series expansion, and the size of 99% uniform zone of the coil was obtained. The coil was also modeled and simulated using COMSOL multiphysics field simulation software, and the simulation results show that the magnetic field around the coil center point has good uniformity in magnitude and direction. (2) In order to calculate the magnetic field generated by the triaxial coil, the relationship between the coil magnetic field and the excitation current was studied, and a mathematical model between the current-magnetic field was established. By solving the current-magnetic field coefficients, an effective calculation of the coil magnetic field was achieved when the excitation current is known. A basis for calibration of the sensor is provided. (3) In order to verify the correction effect of the triaxial coil designed in this paper on the sensor and array errors, a sensor array error correction experiment was designed. The experimental results show that the sensor component and modal errors are reduced to about 5nT after the calibration of the sensor using the triaxial coil, and the sensor gradient error is also effectively corrected, and the error size is reduced by three orders of magnitude, which achieves the effective correction of the sensor component. In addition, the corrected sensor is applied to the magnetic target localization experiment, and the inversion results have only about 0.1m error compared with the preset position, which has good localization accuracy. It can be seen that the correction of the sensor error by the three-axis coil has achieved a good effect. In addition, there are some other aspects of the coil design that require further study. The limitations of the experimental conditions in this paper affect the size of the coil and thus the size of the uniform zone inside the coil. When the size of the sensor array exceeds the area of the uniform zone inside the coil, it is not possible to directly correct the array error. Therefore, how to obtain a coil with a larger range of uniform zones for sensor calibration remains the focus of further research. Acknowledgment This project was supported by the Innovative Research Project for Graduate Students of Southwest Minzu University (Project No. YB2022291) References [1] Faranak Feizi et al., Sasan. Application of multivariate regression on magnetic data to determine further drilling site for iron exploration. Open Geosciences, vol. 13, no. 1, 2021, pp. 138-147. [2] Zheng Wenbao et al. Exploration indicators of the Jiama porphyry–skarn deposit, southern Tibet, China. Journal of Geochemical Exploration (2022): n. pag. [3] Gao Fei et al. Magnetic field-responsive nanomaterials and biomedical application of magnetic hyperthermia. Chemistry of Life, vol. 39, no. 5, 2019, pp. 903-916. [4] Wang Xiaobin et al. Quantitative Analysis of the Measurable Areas of Differential Magnetic Gradient Tensor Systems for Unexploded Ordnance Detection, in IEEE Sensors Journal, vol. 21, no. 5, 2021, pp. 5952-5960. [5] Xie Lianghai et al. Multipoint Observation of the Solar Wind Interaction with Strong Lunar Magnetic Anomalies by ARTEMIS Spacecraft and Chang'E-4 Rover. The Astrophysical Journal Letters. 937. 2022. 5pp. [6] Xiang Fengzhuo et al. Three-axis magnetometer online self- calibration method based on recursive least square. Transducer and Microsystem Technologies. vol. 38, no. 2, 2019, pp. 30-33. [7] Tang Xiaoyu et al. Study on Calibration Method of Three-Axis Magnetic Sensor Based on Gaussian Process Regression. Chinese Journal of Sensors and Actuators. vol. 34, no. 10, 2021, pp. 1340-1345. [8] Li Caihong et al. Correction Method of Three-Axis Magnetic Sensor Based on DA–LM. Metals. vol. 12, no. 3, 2022, pp. 428. [9] Ales Zikmund et al. Precise Calibration Method for Triaxial Magnetometers Not Requiring Earth’s Field Compensation. IEEE Transactions on Instrumentation and Measurement. vol. 64, no. 5, 2015, pp. 1242-1247. 111 [10] Ali Hosseinzadeh et al. (2019). Three Axis Fluxgate Magnetomter Sensor Calibration. 2019 27th Iranian Conference on Electrical Engineering (ICEE), Yazd, Iran, 2019, pp. 431-436. [11] Janošek Michal et al. Magnetic Calibration System With Interference Compensation. IEEE Transactions on Magnetics. Vol. 55, 2019, pp. 1-4. [12] Pan Donghua et al. A New Calibration Method for Triaxial Fluxgate Magnetometer Based on Magnetic Shielding Room. IEEE Transactions on Industrial Electronics, vol. 67, 2020, pp. 4183-4192.