Design and Optimization of Multi-Stage TMR Sensors for Power Equipment AC/DC Leakage Current Detection

Tunnel magnetoresistance (TMR) can measure weak magnetic fields and has significant advantages for use in alternating current/direct current (AC/DC) leakage current sensors for power equipment; however, TMR current sensors are easily perturbed by external magnetic fields, and their measurement accuracy and measurement stability are limited in complex engineering application environments. To enhance the TMR sensor measurement performance, this paper proposes a new multi-stage TMR weak AC/DC sensor structure with high measurement sensitivity and anti-magnetic interference capability. The front-end magnetic measurement characteristics and interference immunity of the multi-stage TMR sensor are found to be closely related to the multi-stage ring size design via finite element simulation. The optimal size of the multipole magnetic ring is determined using an improved non-dominated ranking genetic algorithm (ACGWO-BP-NSGA-II) to derive the optimal sensor structure. Experimental results demonstrate that the newly designed multi-stage TMR current sensor has a measurement range of 60 mA, a fitting nonlinearity error of less than 1%, a measurement bandwidth of 0–80 kHz, a minimum AC measurement value of 85 μA and a minimum DC measurement value of 50 μA, as well as a strong external electromagnetic interference. The TMR sensor can effectively enhance measurement precision and stability in the presence of intense external electromagnetic interference.


Introduction
As the primary battleground for energy transformation, the power grid proposes to enhance its sensing and ubiquitous interconnection capabilities, actualize the state collection, real-time sensing, and online monitoring of power grid equipment, and construct a smart IoT system. Advanced sensing and measurement technologies are the foundation for real-time monitoring and fault prediction, and leakage current is one of the most crucial parameters for ensuring the stable and reliable operation of power systems and related application equipment, as well as power transmission safety [1][2][3]. Leakage current is the presentation of the results of complex operational conditions on power equipment, and its amplitude is very small, ranging from several hundred microamperes to several milliamperes. Currently, due to the increasing number of nonlinear load devices such as renewable energy and power electronics, the traditional AC system is evolving into a hybrid AC/DC power system, the leakage current signal is gradually approaching a complex waveform containing a variety of AC and DC components, and the traditional AC or DC sensors cannot achieve accurate measurement of the current, which is prone to causing protection switch misoperation, abnormal stator current, and other problems. Traditional high-current detection in power systems and has limited resistance to magnetic interference and amplification for high-precision detection of feeble currents as low as mA or even µA. The open-loop structure with a magnetic ring places the magnetoresistive sensing chip in the open gap of the magnetic ring, which has stronger advantages than the non-magnetic ring structure for shielding external magnetic field interference, amplifying the front-end magnetoresistive sensing chip magnetic field measurement size, and providing electrical isolation to a certain extent, which has greater safety in engineering practice. The noncontact weak current testing method based on giant magnetoresistive sensors described in the literature [30] can accomplish current testing at the tens of mA level with a bandwidth capable of reaching MHz, but cannot measure microampere currents. Lei et al. [31] employed an open-loop type with magnetic ring TMR current sensor structure and introduced temperature compensation, resulting in a maximum measurement error of 0.46% in the measurement range of −200 mA to 200 mA; however, the performance situation for 0-1 mA microampere level measurements is unclear. Hu et al. [32] developed a contactless microcurrent sensor using the tunneling magnetoresistive effect and a low-noise design for microcurrent sensors with a minimum current amplitude of 280 µA. Nevertheless, in the actual operation of some power equipment, leakage current measurements are as low as 100 µA and the magnitude of the resulting magnetic characteristic quantity is in some cases below the 0.01 µT level. The closed-loop sensor is based on an open-loop structure with a magnetic loop, and the feedback current obtained on the output side is introduced through a feedback resistor into the magnetic loop at the source to generate a feedback magnetic field. In the literature [33], a TMR-based magnetically balanced weak sensor was designed, and simulation experiments confirmed a 0.7% measurement error when measuring 1-10 mA current. However, the closed-loop structure increases the design cost and intricacy of the sensor, whereas the introduction of the negative feedback link tends to cause errors in the closed-loop loop, which are not more significant in terms of their applicability for weak current measurements. This paper proposes a TMR AC/DC leakage current sensor with a multi-stage magnetic ring structure to improve the measurement sensitivity and anti-magnetic interference capability of TMR current sensors based on the open-loop design concept. Specifically, it can increase the accuracy and stability of the TMR current sensor for small currents without increasing the sensor size or processing complexity of the circuit. The experimental test and analysis results demonstrate that the proposed multi-stage TMR current sensor can enhance the accuracy and interference resistance of feeble current measurement. The primary characteristics of the structure and design scheme of the multi-stage TMR leakage current sensor are as follows: • The method possesses excellent front-end magnetic field measurement sensitivity and anti-magnetic interference performance; • The method can increase the accuracy and stability of microampere level current sensor measurements without increasing the size of the sensor or the processing complexity of the circuit; • An improved non-dominated ranking genetic algorithm (ACGWO-BP-NSGA-II) is proposed for nonlinear mapping to assure the optimal performance of the front-end magnetic measurement of the sensor with the smallest possible size.
The structure of this paper is as follows: In Section 2, the design principles and concepts of the multi-stage TMR sensor are introduced, and then the front-end magnetic characteristics of the sensor are analyzed by the finite element method. In Section 3, the multi-objective optimization concept of the multi-stage magnetic ring structure, the ACGWO-BP-NSGA-II multi-objective optimization method, and the analysis of the optimization results are introduced. Section 4 describes the experimental testing and analysis of the sensor in detail. The last section of this paper is Section 5. Figure 1 depicts the multi-stage open-loop TMR sensor structure proposed in this paper. The multi-stage TMR sensor is composed of a multi-stage magnetic ring at the front end, TMR sensing module, and a signal processing and acquisition module, which converts the measured current signal into a voltage signal output. The multi-stage open-loop TMR weak current sensor's design advantage is a new multi-stage magnetic ring structure with high magnetic field stability. It is composed of alternating combinations of high magnetic permeability and high conductivity media, and the overall structure can be divided into two main parts based on the functional distinction: the inner stage pole magnetic layer and the attenuation layer.

Multi-Stage Open-Loop TMR Sensor Structure
objective optimization concept of the multi-stage magnetic ring structure, the ACGWO-BP-NSGA-II multi-objective optimization method, and the analysis of the optimization results are introduced. Section 4 describes the experimental testing and analysis of the sensor in detail. The last section of this paper is Section 5. Figure 1 depicts the multi-stage open-loop TMR sensor structure proposed in this paper. The multi-stage TMR sensor is composed of a multi-stage magnetic ring at the front end, TMR sensing module, and a signal processing and acquisition module, which converts the measured current signal into a voltage signal output. The multi-stage open-loop TMR weak current sensor's design advantage is a new multi-stage magnetic ring structure with high magnetic field stability. It is composed of alternating combinations of high magnetic permeability and high conductivity media, and the overall structure can be divided into two main parts based on the functional distinction: the inner stage pole magnetic layer and the attenuation layer.  Under a closed-loop magnetic circuit, various magnetic circuit media can be viewed as a series magnetic circuit, whereas adjacent media can be analyzed as parallel magnetic circuits. As shown in Equation (1), based on Ohm's law of magnetic circuits, magnetic resistance Rm is proportional to magnetic circuit length l and inversely proportional to magnetic circuit cross-sectional area S and magnetic permeability μ.

Multi-Stage Open-Loop TMR Sensor Structure
For the inner stage polemagnetic layer, the high permeability magnetic ring provides a magnetic flux path Rm1 with low reluctance, and the adjacent highly conductive material's parallel reluctance Rm2 and air reluctance Rma1 are both several thousand times greater than Rm1. The guide wire traverses the center of the magnetic ring, and the ring-shaped dispersed magnetic field generated by the target current will be accumulated within the inner magnetic ring. Referring to relevant literature studies [34,35], it is known that the magnetic field generated by the target current is accumulated and amplified in the air gap of the magnetic ring and is proportional to the magnitude of the current in conjunction with the Biot-Savard law. The TMR induction module is positioned in the center of the inner stage of the aggregated magnetic layer gap. Using the tunneling magnetoresistance effect mechanism and the Wheatstone bridge structure, the output of the voltage signal Under a closed-loop magnetic circuit, various magnetic circuit media can be viewed as a series magnetic circuit, whereas adjacent media can be analyzed as parallel magnetic circuits. As shown in Equation (1), based on Ohm's law of magnetic circuits, magnetic resistance R m is proportional to magnetic circuit length l and inversely proportional to magnetic circuit cross-sectional area S and magnetic permeability µ.
For the inner stage polemagnetic layer, the high permeability magnetic ring provides a magnetic flux path R m1 with low reluctance, and the adjacent highly conductive material's parallel reluctance R m2 and air reluctance R ma1 are both several thousand times greater than R m1 . The guide wire traverses the center of the magnetic ring, and the ring-shaped dispersed magnetic field generated by the target current will be accumulated within the inner magnetic ring. Referring to relevant literature studies [34,35], it is known that the magnetic field generated by the target current is accumulated and amplified in the air gap of the magnetic ring and is proportional to the magnitude of the current in conjunction with the Biot-Savard law. The TMR induction module is positioned in the center of the inner stage of the aggregated magnetic layer gap. Using the tunneling magnetoresistance effect mechanism and the Wheatstone bridge structure, the output of the voltage signal proportional to the current signal is achieved. The generated electrical signal is amplified in the subsequent circuit, and the acquisition and measurement of the AC/DC current are completed at the output. From the preceding analysis, it is also possible to conclude that the front-end magnetic field sensitivity of the multi-stage TMR current sensor is primarily related to the structural properties of the inner stage polymagnetic layer.
The attenuation layer consists of a highly conductive material alternating with a high permeability material on the outside of the inner stage polymagnetic layer. The high conductive layer can produce an eddy current effect to weaken the external interference magnetic field and repel the interference magnetic field outside the magnetic path generated by the target current, thereby achieving eddy current elimination of the alternating magnetic field resulting from high-frequency magnetic interference. The low reluctance magnetic flux path formed by the high permeability material directs the magnetic induction lines of external interference to pass along the wall of the high permeability layer, thereby realizing the flux shunt of external quasi-static interference. According to Equation (2), the external electromagnetic propagation coefficient τ is determined. Any combination of dielectric constant ε, permeability µ, and conductivity σ that increases the attenuation constant α is capable of suppressing the interference from an external magnetic field. The disparity between the number of attenuation layer dielectric combination levels and the various diameters results in distinct dielectric combination strategies. When a suitable combination form is employed, the attenuation layer can not only reduce the external leakage of the magnetic field generated by the target current, but can also enhance the signal-to-noise ratio of the magnetic field measurement induced by the weak current.
The aforementioned theoretical foundation serves as the foundation for the design of multi-stage TMR feeble current sensors.
In Figure 2, the thickness of the inner stage polymagnetic layer is denoted by p, th 1 -th N1 denotes the thickness of the attenuation layer at all levels, h denotes the multi-stage ring height, d denotes the multi-stage ring air gap width, r 1 denotes the inner radius, r denotes the wire radius and N represents the total number of stages of the multi stage magnetic ring. As the weak current measurement scenario has low requirements for antimagnetic saturation capability, the high magnetic permeability material is selected from permalloy, which maintains high permeability in weak magnetic fields, and the high conductive material is selected from aluminum with good eddy current elimination performance in AC magnetic fields [36]. The leakage current of power equipment is typically less than 100 mA, so a 2 mm copper wire radius is sufficient to satisfy the current flow specifications. The material and size parameters for the model are shown in Tables 1 and 2.    To evaluate the effectiveness of the new multi-stage magnetic ring structure in terms of its ability to gather magnetism and resistance to external magnetic interference, and to facilitate the comparison of the performance of the conventional single-ring structure, the magnetic field measurement sensitivity A and the relative error MC of magnetic field measurement under the influence of interference currents are defined to describe the measurement performance of the sensor induction front-end for weak current measurement scenarios.
where B 0 is the magnetic induction measured by the TMR sensor under a single wire, and B mr is the magnetic induction measured by the TMR sensor under a magnetic ring structure.
where B nmi is the magnetic induction measured by the TMR sensor without interference, B mi is the magnetic induction measured by the TMR sensor with interference, and the smaller the MC means the higher the accuracy of the magnetic field measured by the TMR.

Magnetic Sensitivity Analysis
The current I is applied through the wire, and a parametric scan is set from 1 mA to 10 mA with a step of 1 mA to simulate the small current measurement, and a steady-state solver is set to change multi-stage magnetic ring series N = 1-6 to obtain the magnetic field distribution of current-dependent magnetic induction at the TMR deployment point at all levels, and a single wire model is added to obtain the magnetic induction at the same location for comparison and analysis, where N = 1 is the special case of a single magnetic ring structure.
As depicted in Figure 3, the total magnetic induction intensity and magnetic induction intensity in each direction at the TMR measurement point increase linearly with the change in current under the multi-stage magnetic ring structure, which can significantly enhance the magnetic field measurement sensitivity and facilitate the magnetic field measurement and current inversion calculation. Comparing the calculated values of magnetic field sensitivity at each level, as depicted in Figure 4, reveals that the amplification capability of the multi-stage ring structure is primarily dependent on the thickness of the inner layer, whereas the thickness of the attenuation layer has no impact on the amplification capability.
The magnetic field amplification capacity at the air gap of the single-ring structure is closely related to its dimensional structure, so the effects of varying the ring height h, the open air gap d, the inner radius r 1, and the ring thickness p on the sensitivity of magnetic field measurement in the air gap are obtained in Figure 5. Among them, the experimental set depicted in Figure 5 crepresents the combination of experimental dimensions ranging from 3 mm to 15 mm for r 1 and 1 to 20 mm for p. change in current under the multi-stage magnetic ring structure, which can significantly enhance the magnetic field measurement sensitivity and facilitate the magnetic field measurement and current inversion calculation. Comparing the calculated values of magnetic field sensitivity at each level, as depicted in Figure 4, reveals that the amplification capability of the multi-stage ring structure is primarily dependent on the thickness of the inner layer, whereas the thickness of the attenuation layer has no impact on the amplification capability.   change in current under the multi-stage magnetic ring structure, which can significantly enhance the magnetic field measurement sensitivity and facilitate the magnetic field measurement and current inversion calculation. Comparing the calculated values of magnetic field sensitivity at each level, as depicted in Figure 4, reveals that the amplification capability of the multi-stage ring structure is primarily dependent on the thickness of the inner layer, whereas the thickness of the attenuation layer has no impact on the amplification capability.   From the above simulation results, it can be seen that the magnetic field measurement size can reach a more stable value when h is greater than 8 mm, while the opening gap width d and the size of the inner and outer radius of the magnetic ring are set to affect the performance of the front-end magnetic field measurement of the sensor. The magnetic field amplification is inversely proportional to the opening gap width d. The rate of decline is fast when the opening gap is small, and the magnetic field strength measured by the sensor is at a lower level and declines slowly as d expands further. Therefore, the design of the opening air gap width d should be as small as possible to ensure that the TMR sensor chip is put into the premise.
The black arrows in Figure 5c indicate depressions with p-value thicknesses of 1-8 mm, while the red arrows indicate depressions with p-value thicknesses of 1-3 mm. The simulation results show that if a single magnetic ring structure is used, the ring thickness p must be greater than 8 mm to achieve a higher magnetic field gathering capability at the air gap, whereas a magnetic ring structure with three or more stages and a single stage with a gathering layer thickness p greater than or equal to 4 mm can achieve the same result. At the measurement point, the magnetic field measurement sensitivity can be high, yielding improved measurement results overall for the magnetic field measurement value. Similarly, when the magnetic ring structure has good magnetization capability, the magnetic field measured at the same measurement point has a small range of variation with the increase in the inner radius, indicating that the inner diameter setting has less of an effect on the sensitivity characteristics of the magnetic field measurement at the deployment point. The magnetic field amplification capacity at the air gap of the single-ring structure is closely related to its dimensional structure, so the effects of varying the ring height h, the open air gap d, the inner radius r1, and the ring thickness p on the sensitivity of magnetic field measurement in the air gap are obtained in Figure 5. Among them, the experimental set depicted in Figure 5crepresents the combination of experimental dimensions ranging from 3 mm to 15 mm for r1 and 1 to 20 mm for p. From the above simulation results, it can be seen that the magnetic field measurement size can reach a more stable value when h is greater than 8 mm, while the opening gap width d and the size of the inner and outer radius of the magnetic ring are set to affect the performance of the front-end magnetic field measurement of the sensor. The magnetic field amplification is inversely proportional to the opening gap width d. The rate of decline is fast when the opening gap is small, and the magnetic field strength measured by the sensor is at a lower level and declines slowly as d expands further. Therefore, the design of the opening air gap width d should be as small as possible to ensure that the TMR sensor chip is put into the premise.
The black arrows in Figure 5c indicate depressions with p-value thicknesses of 1-8 mm, while the red arrows indicate depressions with p-value thicknesses of 1-3 mm. The

Analysis of Anti-Magnetic Capacity
To simulate magnetic field interference from different angles, the interference current wires are placed around the sensor at 90-degree intervals, taking into account the symmetry of the spatial structure. Four interference current sources are set as shown in Figure 6, the interference currents are labeled with the letters A-D, and I A -I D is used in the text to indicate that the simulation sets the distance L = 0.1 m from the interference currents. The parameters correspond to the default values. In the simulation setup, the external interference size is gradually increased to obtain the relative error results of TMR magnetic field measurement under different structures as shown in Figure 7.
of the spatial structure. Four interference current sources are set as shown in Figure 6, the interference currents are labeled with the letters A-D, and I′A-I′D is used in the text to indicate that the simulation sets the distance L = 0.1 m from the interference currents. The parameters correspond to the default values. In the simulation setup, the external interference size is gradually increased to obtain the relative error results of TMR magnetic field measurement under different structures as shown in Figure 7. dicate that the simulation sets the distance L = 0.1 m from the interference currents. The parameters correspond to the default values. In the simulation setup, the external interference size is gradually increased to obtain the relative error results of TMR magnetic field measurement under different structures as shown in Figure 7. As can be seen from Figure 7, the multi-stage magnetic ring structure proposed in this paper can significantly improve the anti-magnetic capability of sensor measurements. Under the single magnetic ring structure, the MC is as high as 109% when I′D = 100 mA interference, which indicates that the single magnetic ring structure is still weak for magnetic field interference at all angles. Additionally, under the action of I′D = 100 mA, the MC of the 2-stage magnetic ring structure is reduced to 10%, while the anti-magnetic interference ability of the sensor is further improved with the increase in N. The relative error size changes smoothly. However, the increase in the number of stages does not bring a sustained error reduction, N = 3-6, and the sensor magnetic field measurement error is similar, indicating that the three-stage magnetic ring structure can already achieve a better anti-magnetic capability.
To further investigate the effect of multi-stage magnetic ring structure on the antimagnetic interference performance of multi-stage TMR current sensor front-end, the ring As can be seen from Figure 7, the multi-stage magnetic ring structure proposed in this paper can significantly improve the anti-magnetic capability of sensor measurements. Under the single magnetic ring structure, the MC is as high as 109% when I D = 100 mA interference, which indicates that the single magnetic ring structure is still weak for magnetic field interference at all angles. Additionally, under the action of I D = 100 mA, the MC of the 2-stage magnetic ring structure is reduced to 10%, while the anti-magnetic interference ability of the sensor is further improved with the increase in N. The relative error size changes smoothly. However, the increase in the number of stages does not bring a sustained error reduction, N = 3-6, and the sensor magnetic field measurement error is similar, indicating that the three-stage magnetic ring structure can already achieve a better anti-magnetic capability.
To further investigate the effect of multi-stage magnetic ring structure on the antimagnetic interference performance of multi-stage TMR current sensor front-end, the ring height h and opening gap width d are varied to acquire the simulation calculation results depicted in Figure 8. this paper can significantly improve the anti-magnetic capability of sensor measurements. Under the single magnetic ring structure, the MC is as high as 109% when I′D = 100 mA interference, which indicates that the single magnetic ring structure is still weak for magnetic field interference at all angles. Additionally, under the action of I′D = 100 mA, the MC of the 2-stage magnetic ring structure is reduced to 10%, while the anti-magnetic interference ability of the sensor is further improved with the increase in N. The relative error size changes smoothly. However, the increase in the number of stages does not bring a sustained error reduction, N = 3-6, and the sensor magnetic field measurement error is similar, indicating that the three-stage magnetic ring structure can already achieve a better anti-magnetic capability.
To further investigate the effect of multi-stage magnetic ring structure on the antimagnetic interference performance of multi-stage TMR current sensor front-end, the ring height h and opening gap width d are varied to acquire the simulation calculation results depicted in Figure 8. As shown in Figure 8, when keeping the model set as the initial size and changing only the height h and air gap width d, under the action of I′B = 100 mA, it can be seen from As shown in Figure 8, when keeping the model set as the initial size and changing only the height h and air gap width d, under the action of I B = 100 mA, it can be seen from the simulation results that the overall trend of the anti-magnetic interference capability of the multi-stage magnetic ring decreases and increases with the increase in h and d, respectively. After d is less than 6 mm and h is greater than 10 mm, the anti-magnetic capability can be maintained at a stable low level.
For different combinations of attenuation layer thicknesses, the antimagnetic capability also shows different characteristics. Fix the size, keep the magnetic ring r 1 = 10 mm, r 1 = 10 mm, p + ∑ N−1 i th i = 10 mm unchanged, take the number of levels N as 1-6, set I = 1 mA, I = 100 mA, and set the thickness of each stage as shown in Table 3. Table 3. Setting of the thickness of each stage of the multi-stage ring structure.

Level N
Size Setting 1 p = 10 mm 2 p = 5 mm, th 1 = 15 mm 3 p = 3 mm, th 1 = 3 mm, th 2 = 4 mm 4 p = 2.5 mm, th 1 = 2.5 mm, th 2 = 2.5 mm, th 3 = 2.5 mm 5 p = 2 mm, th 1 = 2 mm, th 2 = 2 mm, th 3 = 2 mm, th 4 = 2 mm 6 p = 1.6 mm, th 1 = 1.6 mm, th 2 = 1.6 mm, th 3 = 1.6 mm, th 4 = 1.6 mm, th 5 = 2 mm As shown in Figure 9, when N ≥ 3, the magnetic field measurement accuracy of multi-stage polymagnetic ring structures with the same ring thickness is significantly lower than that of N = 1 (single-stage polymagnetic layer structures), demonstrating once again the effectiveness of the proposed structure's anti-magnetic interference capability. magnetic ring size has a significant impact on the front-end magnetic field measurement sensitivity and anti-magnetic interference capability performance of the sensor. Taking the right size combination can further be able to suppress the leakage of the target magnetic circuit and improve the signal-to-noise ratio of the magnetic field measurement of weak current induction so that the front-end magnetic field measurement sensitivity is increased. It is necessary to optimize the overall measurement precision of the multi-stage TMR sensor for feeble AC/DC signals.  Comprehensive analysis of Sections 2.2 and 2.3 reveals that the matching effect of the magnetic ring size has a significant impact on the front-end magnetic field measurement sensitivity and anti-magnetic interference capability performance of the sensor. Taking the right size combination can further be able to suppress the leakage of the target magnetic circuit and improve the signal-to-noise ratio of the magnetic field measurement of weak current induction so that the front-end magnetic field measurement sensitivity is increased. It is necessary to optimize the overall measurement precision of the multi-stage TMR sensor for feeble AC/DC signals.

Optimization Target Establishment
The objective of the multi-stage magnetic ring structure is to ensure that the largest possible target current-generated magnetic field is measured at the TMR deployment measurement point, as well as to improve the antimagnetic capability of the sensor front end; therefore, the objective of the structure optimization is to improve the deployment measurement point B and reduce the relative magnetic field error value MC as much as possible, while meeting the miniaturization requirements. Since the relationship between the magnetic ring size structure and the solution target is a nonlinear and complex solution problem in the spatial magnetic field calculation process, too many optimization parameters will result in overly complex, time-consuming, and constraining conditions for the establishment of the optimal objective function relationship, which must be screened for parameter optimization.
In this paper, a multi-stage TMR sensor with an inner diameter Φ of 20 mm and an open air gap right into the TMR sensing module is designed and set at d = 8 mm. Combining the analysis in Sections 2.2 and 2.3, it can be seen that when h is greater than 8 mm, the influence on the magnetic sensitivity and anti-magnetic interference ability is small, while when the number of stages N ≥ 3 increases with the increase in N, the increase in anti-magnetic capability is not very obvious, and the 3-stage magnetic ring structure is often consistent with the 5-stage or even 6-stage magnetic ring structure in terms of magnetic field sensitivity characteristics and anti-magnetic capability. In order to reduce the production cost and optimize the overall volume of the sensor, h = 10 mm and the number of stages N = 3. Considering the placement size of the TMR module, the thickness of the inner stage of the polymagnetic layer p needs to be larger than 6 mm, and it can be seen from the figure that when p is larger than 6 mm, the magnetic field measurement sensitivity under the three-stage magnetic ring structure is almost the same and almost at a stable value, which can ensure the magnetic field measurement sensitivity at the TMR deployment point.
Based on the above analysis, the thickness p of the inner stage polymagnetic layer and the thickness th 1 -th 2 of the attenuation layer in the multi-stage magnetic ring structure are finally determined as the structure dimensional optimization parameters, and the design is expressed as a comprehensive problem with a dual objective optimization as shown in Equation (5): where M is the combined error of magnetic field measurement; C is the total thickness of the magnetic ring; MC j represents the true mapping relationship of the magnetic field measurement error resulting from the jth angle interference at a predetermined interference intensity; z j represents the weight size of magnetic field interference at each angle; z 1 -z 4 represent the influence weights of I A -I D , which are determined based on the information and fluctuation of the relative MC size obtained at each angle; PL is the minimum value of the cohesive magnetic layer thickness, whereas PH is the utmost value. HL is the minimum value of the secondary aluminum layer, while HH is the maximum value of the secondary aluminum layer. TL is the minimum value of the tertiary magnetic layer, while TH is the maximum value.

ACGWO-BP-NSGA-II Optimization Process
The characterization MC j fitting mapping F for the optimization problem in this study must first be identified. To generate the fitted samples using COMSOL Multiphysics software, the mapping input parameter X of M can be represented as X = {x i } = {I i , p i , th 1i, th 2i }. This first refers to the model-building procedures in Section 2. The following are the precise steps in sample generation: (1) Build the multi-stage magnetic ring structure model. Determine the model dimensions r 1 = 10 mm, d = 4 mm, h = 10 mm, the number of stages N = 3, initialize p = th 1 = th 2 = th 3 = 1 mm, and perform relevant material and boundary settings and meshing. (2) Set the scan range of optimized dimension parameters. Set the scan range of the first stage size p to 6-15 mm; the variation range of th 1 and th 2 to 1-10 mm. (3) Solve the calculation. Set the interference current I to 1-1000 mA, and change p, th 1 , and th 2 to obtain the magnetic field measurement error MC 1 (X)-MC 4 (X) obtained for sample X under four interferences according to the setting in Equation (2), then the fitted sample for mapping MC j () is (X, MC j (X)).
After obtaining the fitted samples, the mapping relationship is fitted and calculated. In this paper, the goodness-of-fit R 2 and the mean absolute error MAE are chosen to evaluate the fit.
where y i denotes the true value of the sample,ŷ i denotes the fitted value of the ith sample, and n is the number of samples. The larger the R 2 , the better the fit and the optimal value is 1; the smaller the MAE, the smaller the relative error between the fitted value and the true value.

ACWGO-BP Nonlinear Fitting Algorithm
The characteristic relationship between MC j and I , p, th 1 , and th 2 parameters for each angle now exhibits a strong nonlinearity with a large value span interval, and the emergence of neural networks has facilitated a novel approach to solving this issue. BP neural networks have strong self-learning and self-adaptive capabilities and have been effectively applied to nonlinear fitting solution problems. Nonetheless, the BP algorithm is based on a gradient or Newton-type deterministic algorithm, which makes it sensitive to initial conditions and prone to random approximation and local optimum. Therefore, this paper proposes to train the weights and threshold parameters of the BP network using an enhanced version of the gray wolf algorithm in order to acquire the optimal parameters of the BP neural network and the global optimal solution for the nonlinear fitting solution to MC j .
The solution idea of the gray wolf algorithm mimics the social leadership and hunting behavior of gray wolf society, and divides the population individuals into four categories: head wolf (χ 1 ), gray wolf (χ 2 ), gray wolf (χ 3 ), and other gray wolf individuals (χ 3 ). The traditional GWO optimization algorithm mainly includes three steps: roundup, pursuit, and attack [37].
where U is the position vector of the gray wolf, t is the current iteration number, U p is the prey position vector, AA and CC are the coefficient vectors, rr 1 and rr 2 are the random vectors between [0, 1], and a is the linear decreasing convergence coefficient from 2 to 0, as shown in Equation (11).
where t max is the total number of iterations. When the gray wolf group finds the hunting target, the positions of χ 1 , χ 2 and χ 3 are updated in the search space using Equations (12)- (14), and the optimal solution of the desired problem is obtained under the current iteration according to Equation (15).
The GWO algorithm, despite its better convergence speed, still searches for the global optimal solution, is the influence of the search path, and falls into local optimality. To enhance the GWO exploration capability, the GWO algorithm is improved to obtain the Adaptive Gray Wolf Optimization Seeking Algorithm (ACGWO). The specific improvement points are as follows: (a) Chaos mapping initialization. Tent chaos mapping is introduced in the initialization to ensure the uniformity of the initial population distribution and the diversity of the populations, and to speed up the convergence of the GWO algorithm in the exploration space.The sequence of Tent chaos mapping Z(t + 1) is shown in Equation (16) where u is a random number between [0, 1]. (b) Then, the initial position sequence of gray wolf is is shown in Equation (17).
(c) Adaptive descent strategy. Since the path of GWO in the process of finding the optimal solution, exploring the optimal search itself is not linearly convergent. The traditional convergence path presents linear convergence as shown in Equation (11), and cannot reflect the actual optimization approach and release the inherent ability of GWO's superior search. The adaptive descent strategy as shown in Equation (18) is introduced to ensure its balance in local and global search.
where pp is the adaptive step size, n = 1, 2, . . . , pp, κ is the random compensation factor [0, 0.1]. when n takes 1 and pp, the random compensation factor κ takes 0. (d) Location update correction. Finally, inspired by the literature [38], a similar correction was made to the location update formula to play and use individual information to guide the individual search capabilities of wolves.
where bb 1 and bb 2 are constant coefficients in the range of (0, 1] for change adjustment exploration capability; cc 1 and cc 2 are uniform random coefficients.
In this paper, the ACGWO-BP algorithm is developed for the parameter search of BP algorithm by combining the improvement points, and its procedure is shown in Table 4. The BP network fitting error RMSE is used as the fitness function for the population search within the designated number of iterations, subject to the initialization settings of the BP network and the ACGWO algorithm. At the conclusion of the ACGWO search, the optimal solution is utilized as the weight and threshold of the BP network for training purposes. The network training results are then output to form the fitting model, and the test samples are used to validate the fitting model.

ACGWO-BP-NSGA-II Optimization Framework
Considering that the two optimization objectives are interrelated and need to be balanced and coordinated to ensure that each objective achieves optimal results for practical engineering needs. The NSGA-II genetic algorithm [39], a non-dominated sorting genetic algorithm, is selected in this paper for multi-objective optimization of multi-stage size structures. The NSGA-II genetic algorithm performs non-dominated sorting on the initial population, and then similar to the traditional genetic algorithm, performs screening, cross, and mutation to obtain new populations, followed by merging the sub-populations with the parent population, performing non-dominated sorting to obtain the frontier of nondominated solutions, and using the crowding distance as a secondary criterion to maintain the diversity of solutions. The non-dominated sort in this algorithm is fast and can optimize the Pareto domination time complexity from O(NN 3 ) down to O(NN 2 ), and the proposed crowding distance can globally capture the distribution of solutions and ensure the spatial uniformity of solutions. Finally, an improved non-dominated ranking genetic algorithm (ACGWO-BP-NSGA-II) optimization design framework is built in this paper as shown in Figure 10. Table 4. ACGWO-BP training process.

Training Process
Initialize BP network, determine the number of implied layers kk; number of nodes hh k ; loss function MAE; output node excitation function ReLU. Initialize ACGWO algorithm parameters: number of gray wolf populations NM; the maximum number of iterations t max ; number of iterations l; optimal search dimension dim, dimension upper session ub, dimension lower bound ul; location update factors bb 1 and bb 2 ; input adaptation function fun; initialize wolf population location according to Equation (17). Train the gray wolf algorithm in each iteration:

•
For each wolf pack, Update the optimal solution (position of the head wolf χ 1 ) according to Equation ( sure the spatial uniformity of solutions. Finally, an improved non-dominated ranking genetic algorithm (ACGWO-BP-NSGA-II) optimization design framework is built in this paper as shown in Figure 10. First, initialize the relevant parameters such as population number NN, dimension D, and maximum number of iterations Gmax. Initialize population P simultaneously. Then, produce the initial population Pt, calculate the individual fitness of population Pt, and subsequently conduct an iterative session. Through crossover, mutation, and selection, a new offspring population Qt is produced, and Qt is spliced with Pt to form a new population Rt. In the iteration process, the target value M and C are calculated and non-domi- First, initialize the relevant parameters such as population number NN, dimension D, and maximum number of iterations G max . Initialize population P simultaneously. Then, produce the initial population P t , calculate the individual fitness of population P t , and subsequently conduct an iterative session. Through crossover, mutation, and selection, a new offspring population Q t is produced, and Q t is spliced with P t to form a new population R t . In the iteration process, the target value M and C are calculated and nondominated ranking is performed for the new population R t , and the population members of R t are sorted to different frontiers according to non-dominated ranking. Subsequently, the appropriate NS individuals are selected as the new population P t+1 until the number of iterations t is completed. Finally, the population with the result of the last iteration is selected as the best population of individuals output.

Results Validation and Analysis
To establish the F i fitting function, 80% of the data were selected at random as the data set, and the remaining data were fitted for validation. The initialization settings for the parameter optimization of the ACGWO algorithm were 60 for the population individuals and 50 for the maximum number of iterations; the number of layers of the BP network was set to 5, with three hidden layers, one input layer, and one output layer; the number of network iterations was 100; and the convergence threshold was 0.00001. The fitting effect of F 1 -F 4 is shown in Figure 11. parameter optimization of the ACGWO algorithm were 60 for the population individuals and 50 for the maximum number of iterations; the number of layers of the BP network was set to 5, with three hidden layers, one input layer, and one output layer; the number of network iterations was 100; and the convergence threshold was 0.00001. The fitting effect of F1-F4 is shown in Figure 11. As can be seen from Figure 11, the ACGWO-BP network training is not over-fitted, and the fit is good. Since disturbance 3 and disturbance 4 have a large impact on the TMR sensor, the overall MC value is high, so the MAE will be higher. Looking over the original fitting data, it can be found that under the influence of small disturbance currents, the MAE of the F3 fitting is about 0.53, and the MAE of the F4 fitting is about 0.45, which indicates that the proposed algorithm can obtain a good fitting effect even for samples with a large span of output data. Table 5 compares the proposed ACGWO-BP method to commonly used fitting methods, revealing that the proposed ACGWO-BP method in this paper has a higher level of accuracy for processing nonlinear fitting problems.  As can be seen from Figure 11, the ACGWO-BP network training is not over-fitted, and the fit is good. Since disturbance 3 and disturbance 4 have a large impact on the TMR sensor, the overall MC value is high, so the MAE will be higher. Looking over the original fitting data, it can be found that under the influence of small disturbance currents, the MAE of the F 3 fitting is about 0.53, and the MAE of the F 4 fitting is about 0.45, which indicates that the proposed algorithm can obtain a good fitting effect even for samples with a large span of output data. Table 5 compares the proposed ACGWO-BP method to commonly used fitting methods, revealing that the proposed ACGWO-BP method in this paper has a higher level of accuracy for processing nonlinear fitting problems. After obtaining the F i fitting formula, the multi-objective optimization problem to be solved is changed to Equation (20).
z 1 -z 4 represent the influence weights of I A -I D , respectively, which are determined based on the information of the relative size of MC obtained from each angle and fluctuations, and based on the sample MC values, according to the weighted average method and the entropy weight method, it is determined that z 1 = 0.057, z 2 = 0.155, z 3 = 0.390, z 4 = 0.398.
The magnetic field measurement near a substation arrester leakage current measurement in southwest China is subjected to electromagnetic interference of about 1 µT. During the simulation experiment of this paper, when I = 1 A, the magnetic field interference near the measurement point is consistent with the field order of magnitude, and at the same time, as I increases, the external anti-magnetic interference capability of the set size is relatively consistent, the obtained optimal size can still be applied. The NSGA-II algorithm is used for size finding, setting I = 1 A, the initial population is 200, the elite ratio is 0.2, and the evolutionary generation is 50, to obtain the Pareto frontier shown in Figure 12. The Pareto frontier is a series of compromise solutions in line with the multi-objective optimization range, as shown by the blue curve in Figure 12. To balance the relationship between size and interference resistance, the optimal set of solutions corresponding to the turning point of the decreasing slope in the boundary diagram is selected as the final solution of this optimization and marked with red dots. The results of the optimization search at the red dots marked in the figure are shown in Table 6.  Table 6, the combined measurement error and the trend of magnetic field under each size of magnetic ring structure calculated by the ACGWO-BP-NSGA-II algorithm are consistent with the general trend of the finite element simulation results, which verifies the effectiveness of the structure optimization design proposed in this paper. The optimized set of three-stage ring sizes shows an average decrease in 105% in the measurement error compared with the single ring structure of the same thickness, and when the total thickness of the three-stage ring is less than 25 mm, the reduction in the total thickness brings a rapid increase in the measurement error. Further, the magnitude of the magnetic field sensitivity of the deployment point for each level of thickness design was calculated, as shown in Table 7, and the designed multi-stage ring structure still has good front-end magnetic field amplification. Table 7. Sensitivity of magnetic field measurement at each stage thickness. The Pareto frontier is a series of compromise solutions in line with the multi-objective optimization range, as shown by the blue curve in Figure 12. To balance the relationship between size and interference resistance, the optimal set of solutions corresponding to the turning point of the decreasing slope in the boundary diagram is selected as the final solution of this optimization and marked with red dots. The results of the optimization search at the red dots marked in the figure are shown in Table 6. From Table 6, the combined measurement error and the trend of magnetic field under each size of magnetic ring structure calculated by the ACGWO-BP-NSGA-II algorithm are consistent with the general trend of the finite element simulation results, which verifies the effectiveness of the structure optimization design proposed in this paper. The optimized set of three-stage ring sizes shows an average decrease in 105% in the measurement error compared with the single ring structure of the same thickness, and when the total thickness of the three-stage ring is less than 25 mm, the reduction in the total thickness brings a rapid increase in the measurement error. Further, the magnitude of the magnetic field sensitivity of the deployment point for each level of thickness design was calculated, as shown in Table 7, and the designed multi-stage ring structure still has good front-end magnetic field amplification. Regarding comprehensive magnetic field measurement sensitivity and anti-magnetic anti-interference performance, and taking into account the size of the sensor, the final determination of the 3-stage magnetic ring size inner diameter r 1 = 10 mm, p = 6 mm, th 1 = 1 mm, th 2 = 8.3 mm, h = 10 mm, d = 8 mm.

Experimental Verification
In this paper, an AC/DC measurement experimental platform is built as shown in Figure 13. The output of the signal source forms a complete loop with the current-limiting load and passes through the magnetic ring of the TMR sensor in order to achieve the measurement of the target current. The TMR sensor hardware circuit involved in the experimental platform consists of a front-end sensing module, a signal amplification and acquisition module, a zeroing module, and a power supply module. The front-end sensing module is selected from the TMR2905 chip produced by (Jiangsu Dovetail Technology Co., Ltd., Suzhou, China), which has high sensitivity and low noise. The signal amplification and acquisition module consists of the primary amplification composed of AD8429 (Adeno Semiconductor Technology (Shanghai) Co., Ltd., Shanghai, China) and the second amplification circuit composed of AD8012 (Adeno Semiconductor Technology (Shanghai) Co., Ltd., Shanghai, China). The zeroing module introduces the secondary amplification and constitutes a subtractive circuit to realize hardware zeroing. The power supply module is responsible for supplying energy to each chip. In the actual design process, the power supply line is designed in layers with the signal line, and a decoupling circuit is introduced to suppress the noise interference introduced by the power supply. Regarding comprehensive magnetic field measurement sensitivity and anti-magnetic anti-interference performance, and taking into account the size of the sensor, the final determination of the 3-stage magnetic ring size inner diameter r1 = 10 mm, p = 6 mm, th1 = 1 mm, th2 = 8.3 mm, h = 10 mm, d = 8 mm.

Experimental Verification
In this paper, an AC/DC measurement experimental platform is built as shown in Figure 13. The output of the signal source forms a complete loop with the current-limiting load and passes through the magnetic ring of the TMR sensor in order to achieve the measurement of the target current. The TMR sensor hardware circuit involved in the experimental platform consists of a front-end sensing module, a signal amplification and acquisition module, a zeroing module, and a power supply module. The front-end sensing module is selected from the TMR2905 chip produced by (Jiangsu Dovetail Technology Co., Ltd., Suzhou, China), which has high sensitivity and low noise. The signal amplification and acquisition module consists of the primary amplification composed of AD8429 (Adeno Semiconductor Technology (Shanghai) Co., Ltd., Shanghai, China) and the second amplification circuit composed of AD8012 (Adeno Semiconductor Technology (Shanghai) Co., Ltd., Shanghai, China). The zeroing module introduces the secondary amplification and constitutes a subtractive circuit to realize hardware zeroing. The power supply module is responsible for supplying energy to each chip. In the actual design process, the power supply line is designed in layers with the signal line, and a decoupling circuit is introduced to suppress the noise interference introduced by the power supply. The TMR sensor designed in this paper was tested for range and amplitude-frequency characteristics, and the measurement results were obtained as shown in Figure 14 to Figure 15. From the figures, it can be seen that the TMR sensor designed in this paper The TMR sensor designed in this paper was tested for range and amplitude-frequency characteristics, and the measurement results were obtained as shown in Figure 14 to Figure 15. From the figures, it can be seen that the TMR sensor designed in this paper can can respond to variable DC between ±60 mA with fitting error less than 1% and has 80 kHz measurement bandwidth.  To verify the stability enhancement of the proposed new multi-stage magnetic ring structure for small current measurement, this paper focuses on the AC/DC measurement experiments from 0-1 mA and analyzes and illustrates the minimum AC value or DC magnitude that can be measured. The new multi-stage TMR sensor is experimentally recompared with the TMR sensor under single magnetic ring structure under weak and strong electromagnetic disturbances.

No External Interference Situation
In the AC characteristic experimental platform, the signal generator output is passed through the power amplifier to form a complete circuit with the current-limiting load and through the TMR sensor magnetic ring to achieve the measurement of the target current. can respond to variable DC between ±60 mA with fitting error less than 1% and has 80 kHz measurement bandwidth.  To verify the stability enhancement of the proposed new multi-stage magnetic ring structure for small current measurement, this paper focuses on the AC/DC measurement experiments from 0-1 mA and analyzes and illustrates the minimum AC value or DC magnitude that can be measured. The new multi-stage TMR sensor is experimentally recompared with the TMR sensor under single magnetic ring structure under weak and strong electromagnetic disturbances.

No External Interference Situation
In the AC characteristic experimental platform, the signal generator output is passed through the power amplifier to form a complete circuit with the current-limiting load and through the TMR sensor magnetic ring to achieve the measurement of the target current. To verify the stability enhancement of the proposed new multi-stage magnetic ring structure for small current measurement, this paper focuses on the AC/DC measurement experiments from 0-1 mA and analyzes and illustrates the minimum AC value or DC magnitude that can be measured. The new multi-stage TMR sensor is experimentally re-compared with the TMR sensor under single magnetic ring structure under weak and strong electromagnetic disturbances.

No External Interference Situation
In the AC characteristic experimental platform, the signal generator output is passed through the power amplifier to form a complete circuit with the current-limiting load and through the TMR sensor magnetic ring to achieve the measurement of the target current.
The signal generator is adjusted to generate current outputs of different amplitudes with a frequency of 50 Hz, and the original side currents and the corresponding output voltages of the TMR sensors are recorded separately to obtain the input-output characteristic curves of multi-stage TMR and single-stage TMR as shown in Figure 16. The signal generator is adjusted to generate current outputs of different amplitudes with a frequency of 50 Hz, and the original side currents and the corresponding output voltages of the TMR sensors are recorded separately to obtain the input-output characteristic curves of multi-stage TMR and single-stage TMR as shown in Figure 16. When the sensor measurement range is set to 0-1 mA current, the sensor sensitivity is 46.1 mV/mA, as can be seen from Figure 16a. Additionally, the minimum measurement value of the new multi-stage TMR sensor can reach 85 μA, and the measurement error at this current value is 0.3%, while the single-stage TMR in measuring the current value of 85 μA has produced a huge deviation with an error of 200%. The nonlinear error of the multi-stage TMR sensor at 85 μA-1 mA is 2.2% according to Equation (21), and the nonlinear error of the single-stage TMR sensor at 125 μA-1 mA is 20.5%. The above analysis shows that the new multi-stage magnetic ring structure can effectively reduce the minimum measurement value of the weak sensor and improve the stability of the current measurement at the microampere level.
In the Equation (13), ΔYmax is the maximum deviation of the measured value from the fitted curve, and YFS is the range.

External Magnetic Interference Situation
In the experimental process, a constant DC source was used to output 15 A current, placed near the target measurement wire to simulate a strong magnetic field interference application scenario, the measured target current magnitude was gradually changed according to the steps in Section 4.1.1, and the measured voltage output of the sensor was compared and analyzed with the value of the sensor fitting curve in Section 4.1.1. From Figure 17, it can be seen that at 0-1 mA, the nonlinear error of the new TMR sensor increases to 6%, and the nonlinear error of the monostage TMR sensor reaches 30%. The experimental results show that for AC measurement, the designed multi-stage TMR sensor can still maintain high accuracy for small current measurements under external interference. When the sensor measurement range is set to 0-1 mA current, the sensor sensitivity is 46.1 mV/mA, as can be seen from Figure 16a. Additionally, the minimum measurement value of the new multi-stage TMR sensor can reach 85 µA, and the measurement error at this current value is 0.3%, while the single-stage TMR in measuring the current value of 85 µA has produced a huge deviation with an error of 200%. The nonlinear error of the multi-stage TMR sensor at 85 µA-1 mA is 2.2% according to Equation (21), and the nonlinear error of the single-stage TMR sensor at 125 µA-1 mA is 20.5%. The above analysis shows that the new multi-stage magnetic ring structure can effectively reduce the minimum measurement value of the weak sensor and improve the stability of the current measurement at the microampere level.
In the Equation (13), ∆Y max is the maximum deviation of the measured value from the fitted curve, and Y FS is the range.

External Magnetic Interference Situation
In the experimental process, a constant DC source was used to output 15 A current, placed near the target measurement wire to simulate a strong magnetic field interference application scenario, the measured target current magnitude was gradually changed according to the steps in Section 4.1.1, and the measured voltage output of the sensor was compared and analyzed with the value of the sensor fitting curve in Section 4.1.1. From Figure 17, it can be seen that at 0-1 mA, the nonlinear error of the new TMR sensor increases to 6%, and the nonlinear error of the monostage TMR sensor reaches 30%. The experimental results show that for AC measurement, the designed multi-stage TMR sensor can still maintain high accuracy for small current measurements under external interference.

DC Characteristics Experiment
In the DC stage shown in Figure 13b, the designed sensor is measured for 0-1 mA DC, similar to the steps in Section 4.1, to obtain the TMR sensor input-output characteristic curve as shown in Figure 18. As can be seen in Figure 18, the input-output characteristic curve of the multi-stage TMR sensor has a better linear fit, with a nonlinear error of less than 4.5% and a minimum measurement down to 50 μA. In the single-loop structure, the nonlinear error is 17% and the minimum measurable value is 200 μA. In DC small-current measurements, the multistage TMR sensors also highlight their advantages in DC small current measurements.
For DC characteristic investigations, strong interference currents were again positioned close to the measurement leads. Without other shielding measures, the strong interfering magnetic field will introduce more magnetic noise and cause larger measurement errors in the microampere level DC measurements, as shown in Figure 19. However, comparing the values of the curves measured by the multi-stage TMR sensor to those of the single-stage TMR sensor reveals that the multi-stage TMR sensor can still maintain a good response trend under strong interfering magnetic fields.

DC Characteristics Experiment
In the DC stage shown in Figure 13b, the designed sensor is measured for 0-1 mA DC, similar to the steps in Section 4.1, to obtain the TMR sensor input-output characteristic curve as shown in Figure 18.

DC Characteristics Experiment
In the DC stage shown in Figure 13b, the designed sensor is measured for 0-1 mA DC, similar to the steps in Section 4.1, to obtain the TMR sensor input-output characteristic curve as shown in Figure 18. As can be seen in Figure 18, the input-output characteristic curve of the multi-stage TMR sensor has a better linear fit, with a nonlinear error of less than 4.5% and a minimum measurement down to 50 μA. In the single-loop structure, the nonlinear error is 17% and the minimum measurable value is 200 μA. In DC small-current measurements, the multistage TMR sensors also highlight their advantages in DC small current measurements.
For DC characteristic investigations, strong interference currents were again positioned close to the measurement leads. Without other shielding measures, the strong interfering magnetic field will introduce more magnetic noise and cause larger measurement errors in the microampere level DC measurements, as shown in Figure 19. However, comparing the values of the curves measured by the multi-stage TMR sensor to those of the single-stage TMR sensor reveals that the multi-stage TMR sensor can still maintain a good response trend under strong interfering magnetic fields. As can be seen in Figure 18, the input-output characteristic curve of the multi-stage TMR sensor has a better linear fit, with a nonlinear error of less than 4.5% and a minimum measurement down to 50 µA. In the single-loop structure, the nonlinear error is 17% and the minimum measurable value is 200 µA. In DC small-current measurements, the multi-stage TMR sensors also highlight their advantages in DC small current measurements.
For DC characteristic investigations, strong interference currents were again positioned close to the measurement leads. Without other shielding measures, the strong interfering magnetic field will introduce more magnetic noise and cause larger measurement errors in the microampere level DC measurements, as shown in Figure 19. However, comparing the values of the curves measured by the multi-stage TMR sensor to those of the single-stage TMR sensor reveals that the multi-stage TMR sensor can still maintain a good response trend under strong interfering magnetic fields.  Table 8 gives a comparison of the latest performance of the sensors designed in this paper with other magnetoresistive sensor technologies based on non-contact measurement techniques and oriented to weak current measurements for a more in-depth discussion of the work in this paper. Due to the fact that the design of different sensors is dependent on the process of the front-end magnetic sensor chip and the selection and configuration of the electronics, it is difficult to make a direct comparison; however, a comparative analysis can be conducted based on the performance parameters that the sensors ultimately embody. As shown in Table 8, TMR-based sensing technology has a higher measurement sensitivity than GMRbased sensing technology. The multi-stage TMR leakage current sensor designed in this paper has certain advantages in terms of measurement sensitivity, minimum current measurement value, and bandwidth, and it has increased potential for applications involving current measurement under complex operating conditions. Despite the fact that the measurement range of the sensor designed in this paper is restricted to a small range in order to improve the performance advantage in small current measurement, it can be easily extended to large current measurement with the help of an alternative concept in order to achieve superior performance in large current measurement.

Performance Comparison Analysis
However, due to the multi-stage magnetic ring design, there is no significant reduction in the cost of the sensor designed in this paper without commercialization; and when  Table 8 gives a comparison of the latest performance of the sensors designed in this paper with other magnetoresistive sensor technologies based on non-contact measurement techniques and oriented to weak current measurements for a more in-depth discussion of the work in this paper. Due to the fact that the design of different sensors is dependent on the process of the front-end magnetic sensor chip and the selection and configuration of the electronics, it is difficult to make a direct comparison; however, a comparative analysis can be conducted based on the performance parameters that the sensors ultimately embody. As shown in Table 8, TMR-based sensing technology has a higher measurement sensitivity than GMR-based sensing technology. The multi-stage TMR leakage current sensor designed in this paper has certain advantages in terms of measurement sensitivity, minimum current measurement value, and bandwidth, and it has increased potential for applications involving current measurement under complex operating conditions. Despite the fact that the measurement range of the sensor designed in this paper is restricted to a small range in order to improve the performance advantage in small current measurement, it can be easily extended to large current measurement with the help of an alternative concept in order to achieve superior performance in large current measurement.

Performance Comparison Analysis
However, due to the multi-stage magnetic ring design, there is no significant reduction in the cost of the sensor designed in this paper without commercialization; and when it is used in outdoor online monitoring for a long time, the influence of its hysteresis performance and temperature performance on the measurement will not be ignored, and further in-depth research is needed.

Conclusions
In this paper, a new multi-stage TMR sensor structure is presented, the front-end measurement characteristics are analyzed and summarized, and the multi-stage TMR sensor size optimization and field experimental analysis are conducted. From the analysis of front-end measurement characteristics, it can be deduced that the front-end magnetic field measurement sensitivity is primarily dependent on the thickness of the inner-stage polymagnetic layer, and that the multi-stage structure has better front-end magnetic field amplification than the single-ring structure as the thickness of the inner-stage polymagnetic layer varies. The simulation results demonstrate that the interference immunity of the multistage ring structure is substantially greater than that of the single-stage ring structure, with the open air gap width d and the size matching of each stage having the greatest impact on the characteristics. The ACGWO-BP-NSGA-II optimized sizing framework determines the inner diameter of the 3-stage ring size with r 1 = 10 mm, p = 6 mm, th 1 = 1 mm, th 2 = 8.3 mm, h = 10 mm, and d = 8 mm. The proposed multi-stage magnetic ring structure TMR current sensor reduces measurement error by 105% compared to a single magnetic ring TMR current sensor of the same volume.
From the field experimental results, it can be seen that the multi-stage TMR sensor has better stability than the traditional single-loop open-loop TMR sensor in microamp level current measurement, the non-linear error of AC and DC measurement is reduced by 13.5%, the minimum value of AC measurement is reduced from 125 µA to 85 µA, and the minimum value of DC measurement is reduced from 200 µA to 50 µA. The experimental results confirm the measurement stability of the proposed structure under external disturbances and provide ideas and directions for the engineering application of TMR AC/DC detection technology.
However, the hysteresis characteristics of the multi-stage ring structure have an impact on the measurement accuracy of the sensor in long-term operation, and the TMR sensor measurement is influenced by the bias voltage. In the subsequent work, the hysteresis characteristics of the multi-stage ring will be tested and studied, and a relevant demagnetization scheme will be designed to further improve the accuracy of the measurement at weak currents. Meanwhile, considering the demand of online monitoring, the designed multi-stage TMR sensor bias voltage elimination circuit and temperature compensation circuit are further enhanced, and the addition of external shielding shell will be considered to adapt to the influence of unknown electromagnetic interference from multiple sources and improve the stability and measurement accuracy of the designed sensor engineering applications.

Acknowledgments:
The authors would like to express gratitude to the editor and anonymous reviewers for their insightful feedback, which has greatly improved the quality of this manuscript. Special thanks go to all project team members for their invaluable contributions to this study. Moreover, the authors would like to extend sincere appreciation to Xiping Jiang, Chongqi Liu, and Yuehua Li from Chongqing Electric Power Company for their valuable assistance in the implementation of the relevant experiments in this article.Without the support and contributions of these individuals, this study would not have been possible. Their expertise and insights have greatly enriched the research, and their efforts are deeply appreciated.

Conflicts of Interest:
The authors declare no conflict of interest.

Nomenclature
The following abbreviations and symbols are mainly used in this manuscript: TMR Tunneling magnetoresistive AMR Anisotropic magnetoresistive GMR Giant magnetoresistive A Magnetic field measurement sensitivity MC Relative error of magnetic field measurement M Combined error of magnetic field measurement C The total thickness of the magnetic ring F Fitting the mapping ACGWO Adaptive Gray Wolf Algorithm ACGWO-BP-NSGA-II The improved non-dominated ranking genetic algorithm R 2 The goodness-of-fit MAE The mean absolute error B Magnetic induction strength magnitude N Number of stages of multi-stage magnetic ring h Height of multi-stage magnetic ring p Thickness of inner stage polymagnetic layer r Radius of lead wire r 1 Inner radius of multi-stage magnetic ring th i Thickness of attenuation layer at each level d Width of air gap of magnetic ring opening I i (i = A-D) Interference current in four directions δ Non-linear error τ The electromagnetic propagation coefficient µ Permeability α Dielectric constant β Phase constant σ Electrical conductivity