Research on Residual-Current Measurement System of Substation Considering Magnetic Shielding Effect

Residual current is an important monitoring quantity of a power system, and a current sensor plays an important role in detecting current. The substation environment is complex. In addition to the power frequency signal, residual current also has AC and DC components. But it is also affected by the stray magnetic field of the substation. Therefore, the accuracy of the current sensor demands higher requirements. The tunnel magnetoresistive sensor has the advantages of a stable operation, high efficiency, and energy saving, but it is easily affected by the external stray magnetic field during measurements, resulting in a large error. Therefore, this paper proposes a residual-current sensing monitoring system considering the magnetic shielding effect. The root mean square error of the magnetic shielding structure is only 0.572 mA, which can effectively reduce the influence of the external magnetic field and improve the detection accuracy. At the same time, the DC measurement error is less than 1%, the AC measurement error is less than 5%, and the hybrid AC/DC error is less than 8%. It has good response ability and can accurately detect residual current.


Introduction
As a critical node for energy conversion and transmission within the power system, a substation carries the important responsibility of ensuring the safety and stability of power supply.Within substations, residual current is generated due to equipment insulation faults, grounding faults, and equipment operation faults.If this weak current cannot be accurately detected, it can directly impact the performance of the power system, personnel safety, and the reliable operation of equipment.Therefore, the issue of residual current demands high attention.Effectively detecting residual current can provide crucial information for the reliable operation of the power system [1][2][3].The amplitude of residual current in a substation typically ranges from µA to mA, with small amplitudes.In addition to the simple power frequency AC signal, residual current also encompasses high-frequency AC components and DC components.Traditional current detection equipment, such as current transformers, can only measure AC current signals and struggle to accommodate the complex AC and DC power supply systems due to their bulky size and high costs [4][5][6][7].The new magnetoresistive sensors, represented by TMR sensors, boast significant advantages in measuring small current signals In comparison to traditional current detection devices, they offer superior measurement accuracy and lower power consumption.However, the current use of such sensors for measurement is susceptible to interference from external stray magnetic fields [8][9][10].
The use of magnetoresistive current sensors for magnetic signal inversion makes them highly susceptible to external magnetic field interference.In an effort to enhance the measurement accuracy of these sensors, researchers have explored various designs Sensors 2024, 24, 632 2 of 21 and techniques.One such improvement is the proposal of an enhanced adaptive filtering method based on a versatile variable step size, aimed at suppressing external magnetic field interference and improving the measurement accuracy of the current sensor [11].However, due to its reliance on array sensor arrangements, this interference suppression method is primarily suitable for high-current measurements at the ampere level, as smaller target currents may be easily overwhelmed by the useful signal.In another study [12], a U-shaped magnetic shielding was designed to enhance the measurement sensitivity of the current sensor and reduce interference from stray magnetic fields.Nevertheless, the frontend magnetic field amplification capability of this design is limited, posing challenges in accurately measuring currents at the milliampere or even microampere levels.Furthermore, Zhang et al. utilized four 3D tunnel magnetoresistive current sensors to form a sensing array, which effectively reduced measurement errors caused by external interference and improved the accuracy of the measured current values [13].However, it is important to note that real-time magnetic field shielding was not achievable with this approach.
This paper proposes a novel multi-layer alternating magnetic ring tunnel magnetoresistive current sensor.The design incorporates alternating materials in the outer boundary shell to effectively shield external magnetic field interference.The paper begins by introducing the type and measurement principle of residual current.It then analyzes the shielding material and proposes an anti-magnetic shielding method, followed by simulation studies.Finally, the proposed sensor is experimentally verified in combination with the measurement system, leading to conclusive results.

Residual Current Measurement and Magnetic Shielding 2.1. Residual Current Type
The traditional residual current waveform primarily consists of a single-power-frequency 50 Hz sine-wave signal.However, with the growing presence of nonlinear equipment, such as power electronics, in substation power systems, the residual current signal has evolved to encompass various AC and DC signals, including steady DC signals [14][15][16][17].Table 1 below illustrates some typical examples of the different residual current types.

Type
Residual Current Type Wave Form Characteristic

AC type AC residual current
The use of magnetoresistive current sensors for magnetic signal inversion makes them highly susceptible to external magnetic field interference.In an effort to enhance the measurement accuracy of these sensors, researchers have explored various designs and techniques.One such improvement is the proposal of an enhanced adaptive filtering method based on a versatile variable step size, aimed at suppressing external magnetic field interference and improving the measurement accuracy of the current sensor [11].However, due to its reliance on array sensor arrangements, this interference suppression method is primarily suitable for high-current measurements at the ampere level, as smaller target currents may be easily overwhelmed by the useful signal.In another study [12], a U-shaped magnetic shielding was designed to enhance the measurement sensitivity of the current sensor and reduce interference from stray magnetic fields.Nevertheless, the front-end magnetic field amplification capability of this design is limited, posing challenges in accurately measuring currents at the milliampere or even microampere levels.Furthermore, Zhang et al. utilized four 3D tunnel magnetoresistive current sensors to form a sensing array, which effectively reduced measurement errors caused by external interference and improved the accuracy of the measured current values [13].However, it is important to note that real-time magnetic field shielding was not achievable with this approach.
This paper proposes a novel multi-layer alternating magnetic ring tunnel magnetoresistive current sensor.The design incorporates alternating materials in the outer boundary shell to effectively shield external magnetic field interference.The paper begins by introducing the type and measurement principle of residual current.It then analyzes the shielding material and proposes an anti-magnetic shielding method, followed by simulation studies.Finally, the proposed sensor is experimentally verified in combination with the measurement system, leading to conclusive results.

Residual Current Type
The traditional residual current waveform primarily consists of a single-power-frequency 50 Hz sine-wave signal.However, with the growing presence of nonlinear equipment, such as power electronics, in substation power systems, the residual current signal has evolved to encompass various AC and DC signals, including steady DC signals [14][15][16][17].

Type
Residual Current Type Wave Form Characteristic

AC type AC residual current
A type

AC residual current Pulsating DC residual current
A type

AC residual current
The use of magnetoresistive current sensors for magnetic signal inversion makes them highly susceptible to external magnetic field interference.In an effort to enhance the measurement accuracy of these sensors, researchers have explored various designs and techniques.One such improvement is the proposal of an enhanced adaptive filtering method based on a versatile variable step size, aimed at suppressing external magnetic field interference and improving the measurement accuracy of the current sensor [11].However, due to its reliance on array sensor arrangements, this interference suppression method is primarily suitable for high-current measurements at the ampere level, as smaller target currents may be easily overwhelmed by the useful signal.In another study [12], a U-shaped magnetic shielding was designed to enhance the measurement sensitivity of the current sensor and reduce interference from stray magnetic fields.Nevertheless, the front-end magnetic field amplification capability of this design is limited, posing challenges in accurately measuring currents at the milliampere or even microampere levels.Furthermore, Zhang et al. utilized four 3D tunnel magnetoresistive current sensors to form a sensing array, which effectively reduced measurement errors caused by external interference and improved the accuracy of the measured current values [13].However, it is important to note that real-time magnetic field shielding was not achievable with this approach.
This paper proposes a novel multi-layer alternating magnetic ring tunnel magnetoresistive current sensor.The design incorporates alternating materials in the outer boundary shell to effectively shield external magnetic field interference.The paper begins by introducing the type and measurement principle of residual current.It then analyzes the shielding material and proposes an anti-magnetic shielding method, followed by simulation studies.Finally, the proposed sensor is experimentally verified in combination with the measurement system, leading to conclusive results.

Residual Current Type
The traditional residual current waveform primarily consists of a single-power-frequency 50 Hz sine-wave signal.However, with the growing presence of nonlinear equipment, such as power electronics, in substation power systems, the residual current signal has evolved to encompass various AC and DC signals, including steady DC signals [14][15][16][17].The use of magnetoresistive current sensors for magnetic signal inversion makes them highly susceptible to external magnetic field interference.In an effort to enhance the measurement accuracy of these sensors, researchers have explored various designs and techniques.One such improvement is the proposal of an enhanced adaptive filtering method based on a versatile variable step size, aimed at suppressing external magnetic field interference and improving the measurement accuracy of the current sensor [11].However, due to its reliance on array sensor arrangements, this interference suppression method is primarily suitable for high-current measurements at the ampere level, as smaller target currents may be easily overwhelmed by the useful signal.In another study [12], a U-shaped magnetic shielding was designed to enhance the measurement sensitivity of the current sensor and reduce interference from stray magnetic fields.Nevertheless, the front-end magnetic field amplification capability of this design is limited, posing challenges in accurately measuring currents at the milliampere or even microampere levels.Furthermore, Zhang et al. utilized four 3D tunnel magnetoresistive current sensors to form a sensing array, which effectively reduced measurement errors caused by external interference and improved the accuracy of the measured current values [13].However, it is important to note that real-time magnetic field shielding was not achievable with this approach.
This paper proposes a novel multi-layer alternating magnetic ring tunnel magnetoresistive current sensor.The design incorporates alternating materials in the outer boundary shell to effectively shield external magnetic field interference.The paper begins by introducing the type and measurement principle of residual current.It then analyzes the shielding material and proposes an anti-magnetic shielding method, followed by simulation studies.Finally, the proposed sensor is experimentally verified in combination with the measurement system, leading to conclusive results.

Residual Current Type
The traditional residual current waveform primarily consists of a single-power-frequency 50 Hz sine-wave signal.However, with the growing presence of nonlinear equipment, such as power electronics, in substation power systems, the residual current signal has evolved to encompass various AC and DC signals, including steady DC signals [14][15][16][17].As observed in the aforementioned table, the residual current waveform has been progressively evolving to incorporate intricate AC and DC characteristics.The current waveforms to be measured now encompass sinusoidal AC, pulsating DC, AC and DC with DC bias, steady DC, half-wave current overlaid on steady DC, and complex current waveforms.This presents new challenges for accurately detecting residual current, as it requires advanced detection methods capable of accurately capturing and analyzing these diverse waveforms.

Residual Current Detection Principle Based on Tunnel Magnetoresistance Effect
To ensure the stable detection of complex AC and DC residual currents, the measurement system presented in this paper utilizes the tunnel magnetoresistive sensor as a crucial detection device.Its primary structure comprises a magnetic tunnel junction consisting of a ferromagnetic layer-insulator layer-ferromagnetic layer [18][19][20].As depicted in Figure 1, the upper and lower layers' free and fixed layers sandwich the middle barrier layer composed of insulators.The magnetic moment direction of the free layer can be altered by changes in the external magnetic field, whereas the magnetic moment direction of the fixed layer remains constant.As observed in the aforementioned table, the residual current waveform has been progressively evolving to incorporate intricate AC and DC characteristics.The current waveforms to be measured now encompass sinusoidal AC, pulsating DC, AC and DC with DC bias, steady DC, half-wave current overlaid on steady DC, and complex current waveforms.This presents new challenges for accurately detecting residual current, as it requires advanced detection methods capable of accurately capturing and analyzing these diverse waveforms.

Residual Current Detection Principle Based on Tunnel Magnetoresistance Effect
To ensure the stable detection of complex AC and DC residual currents, the measurement system presented in this paper utilizes the tunnel magnetoresistive sensor as a crucial detection device.Its primary structure comprises a magnetic tunnel junction consisting of a ferromagnetic layer-insulator layer-ferromagnetic layer [18][19][20].As depicted in Figure 1, the upper and lower layers' free and fixed layers sandwich the middle barrier layer composed of insulators.The magnetic moment direction of the free layer can be altered by changes in the external magnetic field, whereas the magnetic moment direction of the fixed layer remains constant.As observed in the aforementioned table, the residual current waveform has been progressively evolving to incorporate intricate AC and DC characteristics.The current waveforms to be measured now encompass sinusoidal AC, pulsating DC, AC and DC with DC bias, steady DC, half-wave current overlaid on steady DC, and complex current waveforms.This presents new challenges for accurately detecting residual current, as it requires advanced detection methods capable of accurately capturing and analyzing these diverse waveforms.

Residual Current Detection Principle Based on Tunnel Magnetoresistance Effect
To ensure the stable detection of complex AC and DC residual currents, the measurement system presented in this paper utilizes the tunnel magnetoresistive sensor as a crucial detection device.Its primary structure comprises a magnetic tunnel junction consisting of a ferromagnetic layer-insulator layer-ferromagnetic layer [18][19][20].As depicted in Figure 1, the upper and lower layers' free and fixed layers sandwich the middle barrier layer composed of insulators.The magnetic moment direction of the free layer can be altered by changes in the external magnetic field, whereas the magnetic moment direction of the fixed layer remains constant.As observed in the aforementioned table, the residual current waveform has been progressively evolving to incorporate intricate AC and DC characteristics.The current waveforms to be measured now encompass sinusoidal AC, pulsating DC, AC and DC with DC bias, steady DC, half-wave current overlaid on steady DC, and complex current waveforms.This presents new challenges for accurately detecting residual current, as it requires advanced detection methods capable of accurately capturing and analyzing these diverse waveforms.

Residual Current Detection Principle Based on Tunnel Magnetoresistance Effect
To ensure the stable detection of complex AC and DC residual currents, the measurement system presented in this paper utilizes the tunnel magnetoresistive sensor as a crucial detection device.Its primary structure comprises a magnetic tunnel junction consisting of a ferromagnetic layer-insulator layer-ferromagnetic layer [18][19][20].As depicted in Figure 1, the upper and lower layers' free and fixed layers sandwich the middle barrier layer composed of insulators.The magnetic moment direction of the free layer can be altered by changes in the external magnetic field, whereas the magnetic moment direction of the fixed layer remains constant.
As observed in the aforementioned table, the residual current waveform has been progressively evolving to incorporate intricate AC and DC characteristics.The current waveforms to be measured now encompass sinusoidal AC, pulsating DC, AC and DC with DC bias, steady DC, half-wave current overlaid on steady DC, and complex current waveforms.This presents new challenges for accurately detecting residual current, as it requires advanced detection methods capable of accurately capturing and analyzing these diverse waveforms.

Residual Current Detection Principle Based on Tunnel Magnetoresistance Effect
To ensure the stable detection of complex AC and DC residual currents, the measurement system presented in this paper utilizes the tunnel magnetoresistive sensor as a crucial detection device.Its primary structure comprises a magnetic tunnel junction consisting of a ferromagnetic layer-insulator layer-ferromagnetic layer [18][19][20].As depicted in Figure 1, the upper and lower layers' free and fixed layers sandwich the middle barrier layer composed of insulators.The magnetic moment direction of the free layer can be altered by changes in the external magnetic field, whereas the magnetic moment direction of the fixed layer remains constant.The specific principle behind residual current detection can be elucidated through the spin polarization effect.Within the magnetic tunnel structure, when the magnetization directions of the free layer and the fixed layer align in parallel, the spin electrons in the free layer can tunnel to the spin band hole state of the pinned layer through the insulating layer, resulting in the formation of electron spin polarization.This spin polarization facilitates easier current passage in the magnetic tunnel junction, thereby reducing resistance, and the structure exhibits a low-resistance state.Conversely, when the magnetization directions of the free layer and the pinned layer are anti-parallel, the spin electrons in the free layer fail to align with the spin band holes of the pinned layer in the insulating layer, leading to a reduction in current spin polarization, an increase in resistance, and the manifestation of a high-resistance state in the structure.This process is illustrated in Figure 2.During operation, the angle between the magnetic moment direction of the free layer and that of the fixed layer varies from 0° to 180°, while at the extremes of the graph corresponding to the high-resistance and low-resistance states, it reaches saturation and becomes non-operational.The relationship between the magnitude of magnetoresistance and the angle between the magnetic moments of the free layer and the fixed layer is shown in Equation (1).The specific principle behind residual current detection can be elucidated through the spin polarization effect.Within the magnetic tunnel structure, when the magnetization directions of the free layer and the fixed layer align in parallel, the spin electrons in the free layer can tunnel to the spin band hole state of the pinned layer through the insulating layer, resulting in the formation of electron spin polarization.This spin polarization facilitates easier current passage in the magnetic tunnel junction, thereby reducing resistance, and the structure exhibits a low-resistance state.Conversely, when the magnetization directions of the free layer and the pinned layer are anti-parallel, the spin electrons in the free layer fail to align with the spin band holes of the pinned layer in the insulating layer, leading to a reduction in current spin polarization, an increase in resistance, and the manifestation of a high-resistance state in the structure.This process is illustrated in Figure 2.During operation, the angle between the magnetic moment direction of the free layer and that of the fixed layer varies from 0 • to 180 • , while at the extremes of the graph corresponding to the high-resistance and low-resistance states, it reaches saturation and becomes non-operational.The specific principle behind residual current detection can be elucidated thr the spin polarization effect.Within the magnetic tunnel structure, when the magnetiz directions of the free layer and the fixed layer align in parallel, the spin electrons i free layer can tunnel to the spin band hole state of the pinned layer through the insul layer, resulting in the formation of electron spin polarization.This spin polarization itates easier current passage in the magnetic tunnel junction, thereby reducing resist and the structure exhibits a low-resistance state.Conversely, when the magnetizatio rections of the free layer and the pinned layer are anti-parallel, the spin electrons i free layer fail to align with the spin band holes of the pinned layer in the insulating l leading to a reduction in current spin polarization, an increase in resistance, and the ifestation of a high-resistance state in the structure.This process is illustrated in Figu During operation, the angle between the magnetic moment direction of the free laye that of the fixed layer varies from 0° to 180°, while at the extremes of the graph c sponding to the high-resistance and low-resistance states, it reaches saturation an comes non-operational.The relationship between the magnitude of magnetoresistance and the angle bet the magnetic moments of the free layer and the fixed layer is shown in Equation (1).The relationship between the magnitude of magnetoresistance and the angle between the magnetic moments of the free layer and the fixed layer is shown in Equation ( 1).
where R P is the magnetoresistance when the magnetic moment directions of the free layer and the fixed layer are the same, and R AP is the magnetoresistance when the magnetic moment directions of the free layer and the fixed layer are opposite.
Based on the magnetic tunnel effect, the magnetoresistance of the magnetic tunnel junction can be controlled by manipulating the magnetization direction of the free layer, enabling the conversion of magnetoelectric signals.However, in practical applications, magnetic tunnel junctions are often susceptible to hysteresis, leading to inadequate response characteristics to external magnetic fields.As a result, they fail to meet the linearity requirements, meaning the mapping relationship between the input magnetic field and the output resistance cannot be fully realized.In order to minimize the influence of stray magnetic fields from substations on the magnetic tunnel junction, the tunnel magnetoresistive sensor is typically designed as a circuit with four bridge arms.This circuit structure offers high sensitivity and is less prone to alignment errors, as depicted in Figure 3.
where P R is the magnetoresistance when the magnetic moment directions of the free layer and the fixed layer are the same, and AP R is the magnetoresistance when the mag- netic moment directions of the free layer and the fixed layer are opposite.Based on the magnetic tunnel effect, the magnetoresistance of the magnetic tunnel junction can be controlled by manipulating the magnetization direction of the free layer, enabling the conversion of magnetoelectric signals.However, in practical applications, magnetic tunnel junctions are often susceptible to hysteresis, leading to inadequate response characteristics to external magnetic fields.As a result, they fail to meet the linearity requirements, meaning the mapping relationship between the input magnetic field and the output resistance cannot be fully realized.In order to minimize the influence of stray magnetic fields from substations on the magnetic tunnel junction, the tunnel magnetoresistive sensor is typically designed as a circuit with four bridge arms.This circuit structure offers high sensitivity and is less prone to alignment errors, as depicted in Figure 3.After the residual current of the power equipment passes through the lead wire, according to the right-handed spiral rule, a spiral magnetic field is generated around the wire.Figure 4 shows that the current passed inside the current-carrying, long straight wire CD is I, and the distance between a point P in space and the wire CD is r0.Therefore, it can be concluded that the magnetic field generated by the wire CD at point P is: After the residual current of the power equipment passes through the lead wire, according to the right-handed spiral rule, a spiral magnetic field is generated around the wire.Figure 4 shows that the current passed inside the current-carrying, long straight wire CD is I, and the distance between a point P in space and the wire CD is r 0 .Therefore, it can be concluded that the magnetic field generated by the wire CD at point P is: Sensors 2024, 24, x FOR PEER REVIEW 5 of 22 where P R is the magnetoresistance when the magnetic moment directions of the free layer and the fixed layer are the same, and AP R is the magnetoresistance when the mag- netic moment directions of the free layer and the fixed layer are opposite.Based on the magnetic tunnel effect, the magnetoresistance of the magnetic tunnel junction can be controlled by manipulating the magnetization direction of the free layer, enabling the conversion of magnetoelectric signals.However, in practical applications, magnetic tunnel junctions are often susceptible to hysteresis, leading to inadequate response characteristics to external magnetic fields.As a result, they fail to meet the linearity requirements, meaning the mapping relationship between the input magnetic field and the output resistance cannot be fully realized.In order to minimize the influence of stray magnetic fields from substations on the magnetic tunnel junction, the tunnel magnetoresistive sensor is typically designed as a circuit with four bridge arms.This circuit structure offers high sensitivity and is less prone to alignment errors, as depicted in Figure 3.After the residual current of the power equipment passes through the lead wire, according to the right-handed spiral rule, a spiral magnetic field is generated around the wire.Figure 4 shows that the current passed inside the current-carrying, long straight wire CD is I, and the distance between a point P in space and the wire CD is r0.Therefore, it can be concluded that the magnetic field generated by the wire CD at point P is: (2) When the distance between the space point P and the wire is much smaller than the length of the wire, the field generated at the point P can be simplified as follows: when the length of the wire CD is fixed and the position of the wire and the point P is relatively fixed, it can be concluded that the magnetic field size B generated by the wire CD at the point P is proportional to the internal current value of the wire.As noted earlier, there exists a mathematical relationship between magnetoresistance and the angle of the magnetic moment, which is influenced by the external magnetic field.When the current within the conductor fluctuates, it leads to variations in the surrounding magnetic field, consequently altering the magnetoresistance within the sensor chip.The bridge structure of the aforementioned chip can then translate these magnetic field changes into corresponding electrical signal outputs.Therefore, when the relative position of the conductor and the sensor chip remains constant, the current within the conductor can be indirectly inferred by observing the output voltage, thus achieving the objective of residual current measurement.

Magnetic Shielding Mechanism
In a substation, the electromagnetic environment is highly complex.It is imperative to consider not only the magnetic field generated by the sensor circuit for residual current measurement but also the stray magnetic fields emanating from the substation.These stray fields can introduce interference, causing fluctuations in the magnetoresistance of the tunnel magnetoresistive sensor, subsequently impacting the voltage output of the full bridge structure and ultimately compromising the accuracy of residual current measurements.Given the challenge of accurately obtaining geomagnetic field information, software compensation methods are unable to dynamically adapt to changes in the geomagnetic field.Hence, the utilization of hardware compensation methods becomes essential to effectively shield against magnetic field interference.Electromagnetic shielding technology proves to be an effective means of suppressing electromagnetic noise propagation within the spatial confines of the substation.The underlying principle involves severing the propagation path between the noise source and the sensor [21][22][23][24].Electromagnetic shielding encompasses three main types: electric field shielding, magnetic field shielding, and electromagnetic field shielding.Among these, magnetic field shielding imposes the most stringent material and structural requirements.The fundamental principle of magnetic shielding lies in the partial penetration of external magnetic fields through air and ferromagnetic materials.Due to the considerably higher permeability of magnetic shielding materials compared to air, the magnetic flux predominantly passes through the ferromagnetic material.The analysis of low-frequency magnetic field shielding is typically approached through magnetic circuit theory.Suppose that the magnetic flux between two points a and b is Φ m , the magnetoresistance is R m , and the magnetic potential difference is U m , then according to the magnetic circuit theory, there is the following: where H is the magnetic field intensity, B is the magnetic induction intensity per unit area, S is the normal area of the magnetic circuit, and l is the length of the magnetic circuit.
Sensors 2024, 24, 632 7 of 21 If the magnetic field is uniform and the magnetic circuit area is also uniform, there is the following: where µ is the permeability of ferromagnetic material.
According to Formula (4), when the magnetic potential difference U m between two points in the magnetic field is constant, the smaller the magnetoresistance R m , the larger the magnetic flux Φ m .To enhance the shielding effectiveness against stray magnetic fields and minimize their impact on the magnetic field generated by residual current, it is crucial to carefully select appropriate materials.Magnetic materials can be broadly categorized into hard magnetic materials and soft magnetic materials.Hard magnetic materials are challenging to magnetize, and once magnetized, they retain a certain level of magnetism even after the removal of the external magnetic field.Consequently, hard magnetic materials are typically used for permanent magnets, but they exhibit higher magnetic losses.
On the other hand, soft magnetic materials possess small hysteresis, making them easily magnetizable with minimal magnetic losses.By utilizing soft magnetic materials, the direction of magnetic flux can be altered, resulting in concentrated magnetic fields.This enhances the sensor's sensitivity and resolution in detecting magnetic induction intensity.Moreover, soft magnetic materials can be employed as magnetic shields to effectively block external interference magnetic fields, ensuring that the detection process remains unaffected by them.According to Equation ( 7), R m is inversely proportional to µ and S. Therefore, in order to ensure the shielding effect, the shielding body needs to have a smaller R m .To effectively reduce the impact of external stray magnetic fields on the measurement accuracy of the tunnel magnetoresistive sensor's residual current, it is essential to select ferromagnetic materials with high permeability.This ensures that the majority of the magnetic flux can traverse through the shielding body.Nickel-iron alloy, permalloy, silicon steel sheets, and other similar materials are well-suited for serving as the shielding body due to their favorable properties.Moreover, increasing the thickness of the shielding layer appropriately can endow the material with a higher magnetic saturation strength, thereby enabling a larger external magnetic field to pass through.In the presence of strong lowfrequency magnetic fields, the use of a multi-layer shielding body can effectively safeguard the current sensor.This paper focuses on the design of a magnetic shielding shell tailored to the material properties, aiming to mitigate the influence of external stray magnetic fields on the accuracy of residual current measurement by the tunnel magnetoresistive sensor.

Design of Magnetic Field Shielding Model
Based on the aforementioned analysis, it is evident that the tunnel magnetoresistive sensor demonstrates high sensitivity to magnetic fields, enabling the indirect measurement of current by detecting the magnetic field generated by the energized conductor.Consequently, when assessing the residual current of the substation, external interference magnetic fields may elevate the measurement error of the current sensor.Therefore, in order to enhance the sensor's accuracy in measuring residual current, it becomes imperative to shield against external electromagnetic interference.
Currently, research on anti-interference for magnetic interference typically employs a single-stage magnetic ring structure, with the sensor chip embedded in the air gap to concentrate the target magnetic field.This magnetic ring structure provides a certain degree of shielding against magnetic interference.Generally, materials with high permeability exhibit stronger magnetic-field-shielding performance, thereby achieving a superior shielding effect.Moreover, the effectiveness of magnetic field shielding can be enhanced through the combination of different materials.The integration of high-conductivity materials and high-permeability materials yields high efficiency in shielding.In this paper, a multi-layer magnetic ring tunnel magnetoresistive residual current sensor structure is proposed in Figure 5.This structure utilizes a multi-layer alternating metal shielding shell to counteract disruptive magnetic fields.The ellipsis indicates the potential addition of more shielding layers for practical application.The inner layer employs iron-based amorphous alloy material with high permeability, while the outer shell consists of a copper shell.Simultaneously, measures are taken to prevent the magnetic field attenuation of the current from being measured, and the magnetic ring is retained inside to reinforce and measure the magnetic field to be measured.The number of overlapping layers of the shielding layer can be specifically designed according to the situation.This innovative design empowers the sensor to ensure the accuracy and stability of the measurement while reducing interference.The configuration of a multi-layer alternating shielding shell further enhances the shielding effect of the sensor on the interference source, thereby improving the anti-interference capability of the entire system.
shielding effect.Moreover, the effectiveness of magnetic field shielding can be enhanced through the combination of different materials.The integration of high-conductivity materials and high-permeability materials yields high efficiency in shielding.In this paper, a multi-layer magnetic ring tunnel magnetoresistive residual current sensor structure is proposed in Figure 5.This structure utilizes a multi-layer alternating metal shielding shell to counteract disruptive magnetic fields.The ellipsis indicates the potential addition of more shielding layers for practical application.The inner layer employs iron-based amorphous alloy material with high permeability, while the outer shell consists of a copper shell.Simultaneously, measures are taken to prevent the magnetic field attenuation of the current from being measured, and the magnetic ring is retained inside to reinforce and measure the magnetic field to be measured.The number of overlapping layers of the shielding layer can be specifically designed according to the situation.This innovative design empowers the sensor to ensure the accuracy and stability of the measurement while reducing interference.The configuration of a multi-layer alternating shielding shell further enhances the shielding effect of the sensor on the interference source, thereby improving the anti-interference capability of the entire system.The front-end structure of the multi-layer alternating magnetic ring tunnel magnetoresistive residual current sensor comprises a multi-layer alternating metal shielding shell and a magnetic ring.The sensor chip is embedded in the air gap of the magnetic ring and connected to the signal processing unit.This structure effectively shields external magnetic interference through the multi-layer alternating metal shielding shell, while utilizing the magnetic ring to amplify the target magnetic field, which is then measured by the sensing chip.Subsequently, the magnetic field signal is transformed into a voltage signal via the Wheatstone bridge of the tunnel magnetoresistive sensor structure, and the sampled voltage signal is processed in the signal processing unit to derive the measured current information.The key advantage of this structure lies in its ability to effectively shield external magnetic interference without requiring specific information about the interfer- The front-end structure of the multi-layer alternating magnetic ring tunnel magnetoresistive residual current sensor comprises a multi-layer alternating metal shielding shell and a magnetic ring.The sensor chip is embedded in the air gap of the magnetic ring and connected to the signal processing unit.This structure effectively shields external magnetic interference through the multi-layer alternating metal shielding shell, while utilizing the magnetic ring to amplify the target magnetic field, which is then measured by the sensing chip.Subsequently, the magnetic field signal is transformed into a voltage signal via the Wheatstone bridge of the tunnel magnetoresistive sensor structure, and the sampled voltage signal is processed in the signal processing unit to derive the measured current information.

Aluminum Permalloy
The key advantage of this structure lies in its ability to effectively shield external magnetic interference without requiring specific information about the interference magnetic field.Additionally, the presence of the shielding shell ensures that the target magnetic field is not attenuated.By leveraging a closed-loop magnetic circuit, different magnetic circuit media can be recognized as a series magnetic circuit, enabling the parallel magnetic circuit analysis of adjacent media.
Based on the previous materials, it is evident that the magnetic circuit with higher permeability in the magnetic ring exhibits lower magnetoresistance, resulting in the con-centration of the magnetic flux generated by the target current within the magnetic ring for amplification.The outer layer of the magnetic ring comprises a multi-layer alternating metal shielding shell, which features a combination of high-conductivity and high-permeability materials.The high-conductivity layer is capable of producing an eddy current effect, effectively attenuating the external interference magnetic field and excluding the interference magnetic field from the magnetic circuit generated by the target current.This signifies the realization of eddy current elimination for the alternating magnetic field generated by high magnetic interference.Furthermore, the low-reluctance magnetic flux path created by the high-permeability material guides the external interference magnetic induction lines to travel along the wall of the high-permeability layer, thereby achieving the diversion of an external quasi-static interference flux.The calculation of the external electromagnetic propagation coefficient is shown in Equation (8).Any combination of dielectric constant, permeability, and conductivity that increases the attenuation constant can suppress the interference of the external magnetic field.The difference in the combination series and the size of the shielding shell medium bring different media combinations.When the appropriate combination form is adopted, the shielding layer can not only suppress the leakage of the magnetic field generated by the target current, but also improve the signal-to-noise ratio of the weak-current-induced magnetic field measurement.
In Equation ( 8), β is the phase constant.The magnetic ring material gathers the target current magnetic field, and the permalloy with high permeability is selected.The multi-layer alternating metal shielding shell is composed of a high-conductivity material and high-permeability material.Considering the weight and shielding effectiveness, the alternating material of permalloy and pure aluminum is selected.

Magnetic Shielding Simulation Analysis
To evaluate the measurement performance of the designated structure and determine the optimal number of overlapping layers, a finite element model of the multi-layer alternating metal shielding shell and the magnetic ring was established using COMSOL Multiphysics software.As depicted in Figure 6, the magnetic capacity and anti-magnetic interference performance of the multi-layer alternating magnetic ring tunnel magnetoresistive current sensor were thoroughly assessed and analyzed.Additionally, Figure 6 aids in identifying the suitable number of overlapping layers.
Model materials and size settings are shown in the Tables 2 and 3.  Model materials and size settings are shown in the Tables 2 and 3.In the tables, the material of the wire is copper, r is the radius of the wire, r1 is the inner radius of the magnetic ring, h is the space height of the magnetic ring, d is the air gap width, and th overlaps each layer thickness.
In order to intuitively evaluate the magnetic concentration ability and anti-magnetic interference performance of the multi-shield tunnel magnetoresistive magnetic ring sensor, it is necessary to establish the magnetic measurement evaluation index of the sensor and define the magnetic field magnification MA and the magnetic measurement relative error ER, respectively.Here, MA is the absolute-value ratio of the magnetic field in the direction of the sensitive axis detected by the multi-shielded magnetic ring structure and the single-wire structure at the air gap point, which is defined as follows: In the tables, the material of the wire is copper, r is the radius of the wire, r 1 is the inner radius of the magnetic ring, h is the space height of the magnetic ring, d is the air gap width, and th overlaps each layer thickness.
In order to intuitively evaluate the magnetic concentration ability and anti-magnetic interference performance of the multi-shield tunnel magnetoresistive magnetic ring sensor, it is necessary to establish the magnetic measurement evaluation index of the sensor and define the magnetic field magnification MA and the magnetic measurement relative error ER, respectively.Here, MA is the absolute-value ratio of the magnetic field in the direction of the sensitive axis detected by the multi-shielded magnetic ring structure and the singlewire structure at the air gap point, which is defined as follows: where B A is the sensitive direction magnetic field vector detected by the multi-shielded magnetic ring structure at the air gap point, and B 0 is the magnetic field vector of the single-wire structure at the air gap point.The larger the magnification, it is proved, the more effectively it can aggregate and amplify the magnetic field.The definition of ER is as follows: where B is the magnetic induction intensity detected by the air gap point without interference, and B e is the magnetic induction intensity detected by the air gap point with interference.The smaller the relative error, the smaller the difference between the measured results of the sensor and the actual magnetic field value, and the higher the measurement accuracy and anti-interference performance.
To verify the effectiveness of the proposed structure and select the appropriate number of overlapping layers for simulation analysis, when N = 0, the sensor structure only has a magnetic ring without a metal shielding shell; when N = 1, the shielding shell consists of a layer of copper and permalloy; when N = 2, it is a two-layer copper and permalloy; when N = 3, it is a three-layer copper and permalloy.The magnification of different overlapping layers N is simulated and analyzed.In the current line to be measured, the current value starts from 1 mA and gradually increases to 10 mA with a step size of 1 mA through 50 Hz AC current I.The comparison between the magnetic field intensity at the air gap point and the magnification of different overlapping layers is shown in Figure 7.
accuracy and anti-interference performance.
To verify the effectiveness of the proposed structure and select the appropriate ber of overlapping layers for simulation analysis, when N = 0, the sensor structur has a magnetic ring without a metal shielding shell; when N = 1, the shielding she sists of a layer of copper and permalloy; when N = 2, it is a two-layer copper and p loy; when N = 3, it is a three-layer copper and permalloy.The magnification of di overlapping layers N is simulated and analyzed.In the current line to be measure current value starts from 1 mA and gradually increases to 10 mA with a step size o through 50 Hz AC current I.The comparison between the magnetic field intensity air gap point and the magnification of different overlapping layers is shown in Erro erence source not found.. Figure 7 illustrates a direct correlation between the increasing current value measured and the magnetic field intensity at the air gap point, displaying a positive relationship between the two variables.In comparison to the single magnetic ring ture, it is evident that the magnetic ring structure with a shielding layer yields a magnetic field magnification, thus enhancing the magnetic field measurement ac and sensitivity.The introduction of a shielding layer, formed by the multilayer alter metal structure, establishes a complex magnetic flux path, facilitating the improved ering and guidance of the magnetic field.Consequently, the magnetic field intensity ured at the air gap point is significantly amplified, leading to a higher magnetic field nification.This enhancement allows for a more accurate measurement and detec Figure 7 illustrates a direct correlation between the increasing current value to be measured and the magnetic field intensity at the air gap point, displaying a positive linear relationship between the two variables.In comparison to the single magnetic ring structure, it is evident that the magnetic ring structure with a shielding layer yields a larger magnetic field magnification, thus enhancing the magnetic field measurement accuracy and sensitivity.The introduction of a shielding layer, formed by the multilayer alternating metal structure, establishes a complex magnetic flux path, facilitating the improved gathering and guidance of the magnetic field.Consequently, the magnetic field intensity measured at the air gap point is significantly amplified, leading to a higher magnetic field magnification.This enhancement allows for a more accurate measurement and detection of current signals of the same magnitude by the sensor.Furthermore, as the number of alternating layers increases, there is observed consistency in the magnetic field intensity at the air gap point.This suggests that within a certain range, the increment in the number of alternating layers does not yield a substantial change in the magnetic field magnification.This characteristic offers flexibility in the design and manufacturing process, enabling optimization according to specific application requirements while maintaining a certain shielding effect.
The simulation and analysis of the tunnel magnetoresistive sensor with overlapping shielding layers focus on its anti-interference performance.To capture the electromagnetic interference generated in complex operational conditions within a substation and simplify the interference source model, the simulation defines the interference sources as the spatially uniform magnetic field Bd, simulating geomagnetic field interference, and the current wire IP, simulating interference from other lines.Please refer to Figure 8 for a graphical illustration of this setup.
The simulation and analysis involve applying a 50 Hz AC current, denoted as I, to the current line under test.The current value starts at 1 mA and incrementally increases to 10 mA with a step of 1 mA.It then further increases to 100 mA with a step of 10 mA.Additionally, a power frequency interference current of 10 A is introduced, which is maintained at a distance of 0.05 m from the target line.The investigation focuses on comparing and analyzing the relative error of the magnetic field at the air gap point when faced with different interference sources.The results of the relative error of magnetic field measurement under various interference sources can be seen in Figure 9.
shielding layers focus on its anti-interference performance.To capture the electromagnetic interference generated in complex operational conditions within a substation and simplify the interference source model, the simulation defines the interference sources as the spatially uniform magnetic field Bd, simulating geomagnetic field interference, and the current wire IP, simulating interference from other lines.Please refer to Figure 8 for a graphical illustration of this setup.The simulation and analysis involve applying a 50 Hz AC current, denoted as I, to the current line under test.The current value starts at 1 mA and incrementally increases to 10 mA with a step of 1 mA.It then further increases to 100 mA with a step of 10 mA.Additionally, a power frequency interference current of 10 A is introduced, which is maintained at a distance of 0.05 m from the target line.The investigation focuses on comparing and analyzing the relative error of the magnetic field at the air gap point when faced with different interference sources.The results of the relative error of magnetic field measurement under various interference sources can be seen in Figure 9.  Figure 9 clearly demonstrates that the single magnetic ring structure exhibits weak antiinterference capability when faced with external interference.Both the uniform magnetic field interference and line current interference have a significant impact on the measurement results.This is particularly evident in the case of compound interference, where the maximum relative error of the single magnetic ring structure reaches approximately 62%.Consequently, it becomes challenging to achieve precise measurements in complex substation environments.While the single-layer structure can effectively reduce uniform magnetic field interference, it still falls short in shielding external interference currents when measuring weak currents.Under compound interference conditions, the maximum relative error is 16%.However, as the number of overlapping layers increases, the shielding performance against both types of electromagnetic interference improves gradually.With a double-overlap structure, the maximum relative error is less than 3%, regardless of the magnetic interference.This highlights the superior anti-magnetic capability of the doubleoverlapping-layer structure.Considering factors such as magnification, anti-magnetic ability, and engineering application, the sensor ultimately adopts the double-overlappinglayer magnetic ring structure.Adopting the double-alternating-layer structure enhances the sensor's anti-interference ability while maintaining a high magnetic field magnification.This is of utmost significance for accurate measurements in complex electromagnetic environments like substations.The design and manufacturing of the sensor follows the double-alternating-layer structure and undergoes further optimization to meet specific application requirements.This ensures the sensor achieves high accuracy in practical engineering applications.

Design of Residual-Current-Sensing Monitoring System
In order to match the magnetic field shielding design scheme designed above, the residual current detection system designed in this section is shown in Figure 10.The system consists of a Tunnel Magnetoresistive Current Sensor, a high-speed signal conditioning acquisition unit, a data processing control unit, and a power supply and energy acquisition unit.When the sensor is positioned in the measured line, it generates a magnetic field signal, which is then converted into a current signal through an inversion operation of the magnetic field voltage.In the hardware design, the amplitude of the signal output by the sensor needs to be adjusted initially.Following this, the signal undergoes low-pass filter conditioning to ensure that it falls within the acquisition range of the main control chip.Subsequently, the data processing unit utilizes an STM32 to execute the collection command and upload the collected data.The calculated results are then transmitted to the wireless transmission unit via the serial port peripheral device interface, which drives the wireless transmission unit's communication mode for the final data upload.Finally, to facilitate long-term online monitoring, a power supply is provided to en- The system consists of a Tunnel Magnetoresistive Current Sensor, a high-speed signal conditioning acquisition unit, a data processing control unit, and a power supply and energy acquisition unit.When the sensor is positioned in the measured line, it generates a magnetic field signal, which is then converted into a current signal through an inversion operation of the magnetic field voltage.In the hardware design, the amplitude of the signal output by the sensor needs to be adjusted initially.Following this, the signal undergoes lowpass filter conditioning to ensure that it falls within the acquisition range of the main control chip.Subsequently, the data processing unit utilizes an STM32 to execute the collection command and upload the collected data.The calculated results are then transmitted to the wireless transmission unit via the serial port peripheral device interface, which drives the wireless transmission unit's communication mode for the final data upload.Finally, to facilitate long-term online monitoring, a power supply is provided to enhance the system's long-term stable operation.

Experimental Verification
After the design of the residual current detection system was completed, the test verification was carried out.The purpose was mainly to test the attenuation effect of the magnetic shielding cover on the magnetic field and the residual current detection ability in the face of the AC and DC situations of the substation.The experimental equipment used in the experiment is a computer; a RIGOL DG1032 function generator generates AC and DC bias output voltage signals.The TMR current sensor developed by the TMR2905 module is used to generate the current to be measured and the interference current; a three-dimensional Helmholtz coil is used to simulate the interference of the geomagnetic field of the direct current power supply.The test platform is shown in Figure 11.

Magnetic Shielding Effect Test
The magnetic field interference is observed through the absolute error value, and the absolute error, mean absolute percent error, and root mean square error are used as the evaluation indexes of the magnetic interference performance.Due to the limited measurement time and resources in the laboratory, the evaluation of the stability of the measurement focuses on the assessment of the class A uncertainty of the AC and DC measurements, and the standard deviation MESD is used as the index of the class A uncertainty assessment:

Magnetic Shielding Effect Test
The magnetic field interference is observed through the absolute error value, and the absolute error, mean absolute percent error, and root mean square error are used as the evaluation indexes of the magnetic interference performance.Due to the limited measurement time and resources in the laboratory, the evaluation of the stability of the measurement focuses on the assessment of the class A uncertainty of the AC and DC measurements, and the standard deviation MESD is used as the index of the class A uncertainty assessment: where I true(k) is the actual value of the target current.This value is the exact value at the time of calibration, I test(k) is the measured value of the target current, and n is the number of test samples.
In an environment of room temperature 25 • C, the three-dimensional Helmholtz coil was used as a uniform magnetic field generator to simulate the geomagnetic field interference, and the constant-current source output 10 A power frequency AC to simulate the line current interference.The single geomagnetic interference, single line current interference, and composite interference were tested, respectively.The current value to be measured started from 1 mA and gradually increased to 100 mA with a step size of 0.1 mA.A total of 1000 sets of data were recorded.The absolute error e curve of the current I m /mA measured by the tunnel magnetoresistive current sensor under three working conditions is shown in Figure 12.
As depicted in Figure 11, the double-alternating-layer magnetic ring structure demonstrates exceptional anti-magnetic interference capability across various operating conditions in a normal-temperature environment.In the presence of compound interference, the measurement's absolute error remains within a range of only 0.5 mA.Conversely, the tunnel magnetoresistance current sensor utilizing a single magnetic ring structure is highly susceptible to external magnetic interference, resulting in the highest absolute error values for current measurements.In composite working conditions, the maximum measurement error reaches a significant 10.62 mA, thereby reducing the accuracy of the current measurement.Although the single-alternating-layer magnetic ring structure provides some resistance against the interference of the geomagnetic field, it still exhibits a maximum absolute error of 5.23 mA when confronted with line current interference and compound interference.Consequently, it cannot achieve precise measurements within the complex operating conditions typically found in substations.Table 4 presents the average absolute percentage error and root mean square error data for the three structures of the tunnel magnetoresistive current sensor under compound interference.As depicted in Figure 11, the double-alternating-layer magnetic ring structure demonstrates exceptional anti-magnetic interference capability across various operating conditions in a normal-temperature environment.In the presence of compound interference, the measurement's absolute error remains within a range of only 0.5 mA.Conversely, the tunnel magnetoresistance current sensor utilizing a single magnetic ring structure is highly susceptible to external magnetic interference, resulting in the highest absolute error values for current measurements.In composite working conditions, the maximum measurement error reaches a significant 10.62 mA, thereby reducing the accuracy of the current measurement.Although the single-alternating-layer magnetic ring structure provides some resistance against the interference of the geomagnetic field, it still exhibits a maximum absolute error of 5.23 mA when confronted with line current interference and compound interference.Consequently, it cannot achieve precise measurements within the The experimental results show that the average absolute percentage error (MAPE) is reduced to 0.239% with the double-alternating-layer polymagnetic ring structure, which is much smaller than 2.534% for the single polymagnetic ring structure and 5.971% for the single-alternating-layer polymagnetic ring structure.The root mean square error (RMS) of the single-polymerized ring structure and the single-alternating-layer polymerized ring structure is 9.671 mA and 4.835 mA, respectively, under the composite interference, which is seriously affected by the magnetic interference.The RMS error of the double-alternatinglayer PMR structure is only 0.572 mA.From the point of view of the class A uncertainty characterized by MESD, the double-alternating-layer PMR structure has good stability and certainty.Therefore, in the face of the compound electromagnetic interference conditions in the substation, the proposed double-alternating-layer poly-magnetic ring structure can enhance the anti-magnetic interference ability of the tunnel magnetoresistive current sensor and improve the measurement accuracy of the weak residual current.

AC/DC Performance Test
In this section, we report the performance test of the tunnel magnetoresistive sensor detection system in the face of complex AC and DC residual current situations in substations.In AC or hybrid AC/DC testing, the RIGOL DG1032 function generator was used to generate AC or AC plus DC bias output voltage signals, which were connected to the measuring wire through a power amplifier and a current-limiting resistor to generate AC or hybrid AC/DC waveforms in the measuring wire; in the DC test, the DC power supply was used to stabilize the output DC voltage, and the DC current path was formed by connecting the current-limiting resistance with the measurement wire.
At room temperature of 25 • C, for the current to be measured in the DC and AC tests, we changed the test current to 100 A-1 mA in steps of 100 A, and each group of test currents was repeated five measurements, and the average value was taken to calculate the absolute value of the absolute measurement error, the root mean square error (RMSE), and the uncertainty of class A (MESD).The tunnel magnetoresistive sensing and monitoring system with a double-layer shielding structure and poly-magnetic ring was tested, and the results are shown in Tables 5-7 below: As shown in the tables, the absolute error of the AC measurement is about 1%, the DC measurement error is less than 8%, and the standard deviation of the measurement error is about 1% for current RMS values greater than 300 A in both DC and AC measurements.The class A uncertainty MESD fluctuates between a small range of [0, 1.34]% for both AC and DC measurements, with good stability in general.
In the AC/DC hybrid test, the effective values of the 50 Hz AC components of 8.62 mA, 14.42 mA, and 22.82 mA are 8.62 mA, 14.42 mA, and 22.82 mA, respectively.The proportion of DC content was changed, and the measurements were performed five times for each group of current, taking the average value and outputting the relative error curve of the full-current amplitude measurement, and finally decomposing the measurement error of the 50 Hz main-frequency current.The results are shown in Figure 13.The measurement accuracy of the AC component in the AC/DC mixed signal is high, and the measurement error is less than 1%.The full-current measurement error mainly comes from the identification of the DC components.When the AC components are Sensors 2024, 24, 632 19 of 21 8.63 mA and 14.42 mA, the waveforms containing different DC components are measured, and the overall measurement error of the sensor is about 6%.When the AC component is 22.82 mA, the measurement error of the designed current sensor for mixed AC and DC is reduced to 2%.
In summary, the measurement system designed in this paper has good response results in DC, AC, or AC/DC measurements, which can meet the residual current detection requirements of substations in the face of complex AC/DC conditions.

Conclusions
This paper proposes a residual current sensing detection system based on magnetic field shielding.Firstly, by the diversification of the current residual current types and the residual current detection principle used in this paper, it is found that when the tunnel magnetoresistive sensor is used to measure the residual current, it is easily affected by the stray magnetic field of the substation.Therefore, a multi-alternating-layer and magnetic ring combined structure is designed to resist the interference of the external magnetic field.The optimal number of layers of the multi-alternating layers is analyzed.Then, based on this magnetic field shielding structure, the detection system is designed.The final test verifies the magnetic field shielding effect of this system and the feasibility of residual current detection in the case of AC and DC.The main conclusions of this paper are as follows: 1.
By using a magnetic ring and a high-permeability alloy shield, the magnetic field is effectively guided so that it can pass through the TMR sensor in a more focused way, thereby improving the accuracy of the measurement.After comparing the magnetic field shielding ability of the single magnetic ring structure, the singlelayer alternating structure and the double-layer alternating structure, the doublealternating-layer structure is selected, which can improve the anti-interference ability while maintaining a large magnetic field magnification, which is very important for accurate measurements in complex electromagnetic environments such as substations.2.
The detection system designed in this paper, when detecting AC and DC currents, has a DC measurement error that is less than 1%; the AC measurement error is less than 5%, and the mixed AC and DC measurement error is less than 8%.The designed residual current sensing system has a small error, good response ability, and field measurement stability.

3.
This design can improve the accuracy and stability of system measurements, and it can reduce energy waste and improve the overall energy efficiency of the power system by implementing effective measures.Through the accurate measurement of residual current, the abnormal situation of electrical equipment can be determined in advance, which is helpful to prevent accidents.Therefore, it has great potential in the power grid and power system, which can help improve the operation efficiency and safety of the equipment and bring positive benefits to the whole system.4.
For the complex AC and DC waveform measurement, the measurement accuracy is greatly affected by the DC measurement error, and the DC measurement accuracy is related to the noise interference and hysteresis introduction, etc. Subsequently, it is necessary to further study the noise level introduced in each link, design the relevant demagnetization scheme to reduce the interference of the noise on the output signal, and improve the measurement accuracy of the proposed poly-magnetic ring current sensor with multiple alternating layers.

Figure 1 .
Figure 1.Schematic diagram of the structure of magnetic tunnel junctions.

Figure 1 .
Figure 1.Schematic diagram of the structure of magnetic tunnel junctions.

Figure 1 .
Figure 1.Schematic diagram of the structure of magnetic tunnel junctions.

Figure 7 .
Figure 7.Comparison of magnetic field strength and MA variation with current for differen bers of interleaved layers.

Figure 7 .
Figure 7.Comparison of magnetic field strength and MA variation with current for different numbers of interleaved layers.

Figure 9 .
Figure 9. Relative errors of magnetic field measurements under different disturbances.

Sensors 2024 ,
24,  x FOR PEER REVIEW 15 of 22 is used to generate the current to be measured and the interference current; a three-dimensional Helmholtz coil is used to simulate the interference of the geomagnetic field of the direct current power supply.The test platform is shown in Figure11.
line current interference.The single geomagnetic interference, single line current interfer-ence, and composite interference were tested, respectively.The current value to be measured started from 1 mA and gradually increased to 100 mA with a step size of 0.1 mA.A total of 1000 sets of data were recorded.The absolute error e curve of the current Im/mA measured by the tunnel magnetoresistive current sensor under three working conditions is shown in Error!Reference source not found.. (a) Apply an external uniform magnetic field (b) Foreign current (c) Complex jamming

Figure 12 .
Figure 12.Absolute error for three operating conditions.

Figure 12 .
Figure 12.Absolute error for three operating conditions.

Table 1 .
Characteristics of residual current waveform.

Table 1
below illustrates some typical examples of the different residual current types.

Table 1 .
Characteristics of residual current waveform.

Table 1
below illustrates some typical examples of the different residual current types.

Table 1 .
Characteristics of residual current waveform.

Table 1
below illustrates some typical examples of the different residual current types.

Table 1 .
Characteristics of residual current waveform.

Type Residual Current Type Wave Form Characteristic
Half-wave current superimposed on 6 mA smooth DC Sensors 2024, 24, x FOR PEER REVIEW 3 of 22 Half-wave current superimposed on 6 mA smooth DC AC residual current Sensors 2024, 24, 632 3 of 21

Table 4 .
Error characteristics of each structure of composite interference.

Table 5 .
Absolute measurement error characteristics in AC/DC case.

Table 6 .
The standard deviation characteristics of relative error in AC and DC cases.

Table 7 .
MESD characterization of class A uncertainty in the AC and DC cases.