Electromagnetic interference compensation method of TMR current sensor

TMR current sensor has excellent characteristics such as high sensitivity, good temperature characteristics, and wide dynamic range, which can meet the new needs of smart grid development. However, the measured value of the output of the TMR current sensor changes with the change in the spatial magnetic field strength. External electromagnetic interference will bring large errors and DC bias to the measurement of the sensor, resulting in a narrowing of the measurement current range. Therefore, an electromagnetic interference compensation method for TMR current sensor is proposed. Two TMR chips are used to measure the synthetic magnetic field signal and the interference magnetic field signal, respectively. Then the output signals of the two TMR chips are compensated and reduced by the signal conditioning unit. The final output analog signal is the magnetic field intensity signal generated by the current of the line to be tested without interference. Finally, the effectiveness of the proposed method is verified by field tests.


Introduction
A smart, efficient, and clean smart grid is the inevitable future power grid development trend in China and the world [1][2] .As one of the most basic state variables of power data, accurate and reliable current measurement is crucial for developing a smart grid.With the rapid development of the smart grid and the comprehensive deployment of power Internet of things, the amplitude and frequency distribution range of current that needs to be measured in the power system is larger.The traditional current detection device represented by the electromagnetic current transformer is difficult to meet the measurement requirements, and it is urgent to find a current sensing technology that can meet the requirements of various current measurements in power systems [3][4] .
Tunneling magnetoresistance (TMR) devices are a new generation of magnetic sensor devices after giant magnetoresistance devices.Compared with giant magnetoresistance devices, they have the characteristics of lower power consumption, low-temperature drift, high response frequency, high sensitivity, and good application prospects in various fields [5] .Based on the TMR effect, the current sensor can measure the current signal from DC to high frequency (MHz magnitude), which can meet the different current measurement requirements of a smart grid or power system.Therefore, many technical solutions have used TMR chips to measure magnetic field strength and indirectly measure current [6][7] .
However, as a kind of magnetic sensor, the output measurement value of the TMR current sensor changes with the change in spatial magnetic field intensity [8] .Therefore, external electromagnetic interference will bring large errors and DC bias to the measurement of the sensor.In addition, when the analog signal is amplified, clipping distortion will occur, resulting in an asymmetric change in the range of the sensor's measurement of positive and negative current values, and the range of AC effective values that can be accurately measured will be reduced.Therefore, an electromagnetic interference compensation method for TMR current sensor is proposed.The main and auxiliary TMR chips measure different magnetic field signals, respectively.The interference signal in the output signal of the sensor is compensated and subtracted and then amplified to avoid signal distortion.It is beneficial to improve the measurement range of the TMR current sensor and has high practical application value.

Analysis of the working principle of the TMR current sensor
The TMR sensor is a magnetic multilayer film material.Between the magnetic layers, there is a thin insulating layer with a length of 1~2 nm that electrons can tunnel.The upper and lower strong magnetic layers are called free and pinning layers.The insulating layer is called a barrier layer.This is called a magnetic tunnel junction (MTJ) structure, as shown in the left figure of Figure 1.The magnetization direction of the pinned layer is fixed, while the magnetization direction of the free layer varies according to the direction of the external magnetic field.Therefore, there will be an angle between the two magnetic moments, which determines the magnitude of the magnetoresistance R. To improve the sensitivity of the TMR chip, four tunnel magnetoresistances with different sensitive directions are designed as the Wheatstone bridge structure shown in the right figure of Figure 1.Ideally, assuming that the applied magnetic field strength is 0, the resistance on each Wheatstone bridge is equal, that is, R1=R2=R3=R4 =R.When there is an external magnetic field, the magnetoresistance R1, R2, R3, and R4 will change due to the action of the magnetic field.The magnitude of the resistance change is equal, and the direction is opposite, that is, The magnetic field signal is converted into a differential voltage signal and the output signal U0 can be expressed as: In the equation, Uc is the excitation source voltage value and / RR  is the sensitivity of the TMR chip.Equation (1) can realize the transformation of the tunnel magnetoresistance change to the output signal.
The power line will produce current changes in normal operation or fault moment, and the corresponding magnetic induction intensity will also change.According to the Biot-Savart law, the magnetic induction intensity excited by an infinite straight conductor at a point of distance d is: where 0  is the vacuum permeability, and its value is -7 -2 4 10 NA   .The direction of the magnetic induction intensity B can be judged by the right-handed spiral rule.Substituting Equation (2) into Equation ( 1), the relationship between the output of the TMR chip and the primary current of the power line can be obtained as follows: It can be seen from Equation (3) that the output voltage u0 of the sensor changes linearly with the current i of the power line, which has a good consistency, and finally realizes the function of the current sensor.

Anti-electromagnetic interference method of TMR current sensor
According to the analysis of Section 2, the working principle of the TMR current sensor is based on the principle of magnetoresistance to realize the detection of current.The external interference magnetic field will affect the working stability and measurement sensitivity of the TMR current sensor.Therefore, it is necessary to study the anti-electromagnetic interference method to improve the practical application value of the sensor effectively.
An electromagnetic interference compensation method for TMR current sensor is proposed, including the main TMR chip, auxiliary TMR chip, and signal conditioning unit.The schematic diagram of electromagnetic interference compensation is shown in Figure 2. The main TMR chip and the auxiliary TMR chip are installed on the top layer of the same PCB board, and the 2.5 V excitation power supply is used to measure the magnetic field signal.The auxiliary TMR chip is far from the measured line and the TMR chip.Among them, the magnetic field value measured by the main TMR chip is composed of the magnetic field intensity signal generated by the measured line current and the interference magnetic field signal, which assists the TMR chip in measuring the interference magnetic field signal, and the final analog signal is the magnetic field intensity signal generated by the measured line current without the interference magnetic field signal.It is worth noting that the main TMR chip and the auxiliary TMR chip are placed at the top layer of the PCB at the same rotation angle, 50 mm apart, and the line where the measured current is located is at the bottom layer of the PCB, right below the main TMR chip.
The signal conditioning unit differentially amplifies the signals of the two TMR chips.Further, the signal conditioning unit amplifier subtracts and amplifies the pre-amplifier signal.In the signal conditioning unit, the TMR signal is initially amplified by two operational instrumentation amplifiers, and then the signal is amplified by a differential operational amplifier by five times.As shown in Figure 3, the hardware connection diagram of the TMR sensor electromagnetic interference compensation method is shown.

Main TMR chip
Auxiliary TMR chip For the design of different resistances, the amplifier gain rate Au can be calculated by the following equation: Finally, the correct measured signal without electromagnetic interference is output.Using the compensated measurement signal, the correct value of the external current measured by the sensor can be obtained.
In addition, the measurement steps of the TMR sensor electromagnetic interference compensation method are given in detail: Step 1: The main TMR chip S1 measures the spatial synthetic magnetic field, and the auxiliary TMR chip S2 measures the spatial interference magnetic field.
Step 2: The signal conditioning unit performs differential amplification on the signals of the two TMR chips.
3: The signal conditioning unit amplifies the pre-amplifier signal after subtraction.
Step 4: It outputs the correct measured signal without electromagnetic interference.The final signal conditioning unit outputs the correct measured signal without electromagnetic interference.This signal does not contain any DC bias.The final measured signal output is centered on 0 V when the sensor is placed at any angle.The output signal is positively correlated with the measured current signal.This process does not require manual intervention and can achieve an online self-zero electromagnetic interference compensation function without a power outage.

Experimental verification
The proposed electromagnetic interference compensation method is verified by field test.The test device is shown in Figure 4.The current to be measured is generated by the autotransformer connected to the 2 Ω load resistance.The current flows through the bottom of the PCB board, and the TMR sensor is fixed on the top of the PCB board.The magnetic sensitive direction is perpendicular to the bottom current-carrying line, and the distance between the chip and the wire is 2 mm.The primary circuit is connected in series with the FLUKE179 C multimeter to measure the reference current, and the TMR sensor output relates to the Tektronix MDO4054 oscilloscope to compare with the reference current.The disturbance signal source outputs a current disturbance signal, and the interference line passes under the TMR chip.The noise generated can affect both TMR chips at the same time.
To facilitate the display in all subsequent experimental waveforms: u1 represents the analog signal output by the signal conditioning unit after differential amplification of the spatial synthetic magnetic field measured by the main TMR chip S1, u2 is the analog signal output by the signal conditioning unit after differential amplification of the spatial interference magnetic field measured by the auxiliary TMR chip S2, u3 represents the analog signal output by the signal conditioning unit after the differential amplification of the previous operational amplifier signal.Figure 5 shows the analog signal waveform output without magnetic field or interference.It can be seen from the left figure in Figure 5 that when the current is to be measured, the interference line current is 0, and there is no electromagnetic interference; u1, u2, and u3 are 0, which reflects that the working principle of the TMR current sensor is based on the principle of magnetoresistance.From the right figure in Figure 5, without any interference (only the current to be measured flows through), the analog waveforms of u1 and u3 are the same, which can accurately reflect the size of the current to be measured, and the current measurement range does not exist.Further, when the current to be measured flows through, the left figure of Figure 6 gives the analog signal waveform output in the presence of geomagnetic interference (the most common electromagnetic interference).It can be seen from the left figure of Figure 6 that due to the geomagnetic interference, u1 generates a DC bias.The range of the positive and negative current values measured by the TMR sensor changes asymmetrically.The range of the AC effective values that can be accurately measured is reduced.However, from the u3 analog waveform, the signal distortion can be avoided by compensating the magnetic field signal in the sensor output signal and then amplifying it, which is beneficial to improve the measurement range of the TMR current sensor.The correctness of the proposed electromagnetic interference compensation method for the TMR current sensor is verified by experiments.
In addition, to verify that the proposed electromagnetic interference compensation method retains generality, it is advisable to use the interference signal source shown in Figure 4 to emit a pulse current signal, which is superimposed with the geomagnetic field signal to simulate a complex electromagnetic environment.The right figure of Figure 6 shows the analog signal output in a complex electromagnetic environment.It can be seen from the right figure of Figure 6 that the pulse current signal makes the waveform of u1 and u2 analog signals no longer smooth.The complex electromagnetic environment makes it more difficult for the u1 analog signal to reflect the size of the current to be measured, which reduces the range and increases the error.However, the waveform of the u3 analog signal is still smooth, and the symmetry axis is 0. The experimental results show that the proposed interference compensation method can be effectively applied to measure the line current under a complex electromagnetic environment accurately.
Figure 6.Analog signal of geomagnetic or complex electromagnetic interference output.

Conclusion
Based on the basic principle of the TMR current sensor, this paper proposes an electromagnetic interference compensation method to solve the problem that external electromagnetic interference will bring large error and DC bias to the measurement of the sensor, resulting in the reduction of the measurement current range.The method uses two TMR chips to measure the synthetic magnetic field signal and the interference magnetic field signal, respectively, and then subtracts the output signals of the two TMR chips through the signal conditioning unit, then compensates and subtracts the bias part of the signal.Experiments show that the proposed method can adapt to the interference of magnetic field in space environment on the sensor under various conditions and can effectively improve the measurement range and accuracy of the TMR current sensor.Compared with the traditional zero adjustment method, this method can accurately adjust zero and has the advantages of automatic realtime and online calibration.It is a self-zero compensation method that can sense the change of environmental magnetic field in real-time and is more suitable for complex and changeable noncontact measurement environments.

Figure 1 .
Figure 1.The main structure of the TMR sensor.

Figure 4 .
Figure 4.The schematic diagram of the experimental device.

Figure 5 .
Figure 5. Analog signal output without magnetic field or interference environment.