Research on a Time Difference Processing Method for RTD-Fluxgate Data Based on the Combination of the Mahalanobis Distance and Group Covariance

During the measurement of magnetic fields, Residence Time Difference (RTD)-fluxgate sensors suffer from abnormal time difference jumps due to the random interference of magnetic core noise and environmental noise, which results in gross errors. This situation restricts the improvement of sensor accuracy and stability. In order to solve the above problems efficiently, a time difference gross error processing method based on the combination of the Mahalanobis distance (MD) and group covariance is presented in this paper, and the processing effects of different methods are compared and analyzed. The results of the simulation and experiment indicate that the proposed method is more advantageous in identifying the gross error in time difference. The signal-to-noise ratio for the time difference is improved by about 34 times, while the fluctuation of the Negative Magnetic Saturation Time (NMST) ΔTNMST is reduced by 95.402%, which significantly reduces the fluctuation of time difference and effectively improves the accuracy and stability of the sensor.


Introduction
In recent years, Unmanned Aerial Vehicle (UAV) aeromagnetic measurement as a new aeromagnetic technology has become a hot research topic [1].Due to the characteristics of high sensitivity, small size, low power consumption, etc., the fluxgate sensor contributes to the trend of portable measurement with UAV as a carrier [2].In particular, the RTD-fluxgate can avoid odd harmonic interference and allows for complete symmetry of the two-axis structure of the sensing unit in terms of the measurement principle [3][4][5].In order to better meet the requirements for UAV aeromagnetic measurement, further improving the accuracy and stability of an RTD-fluxgate has become a key research topic [6][7][8].
When the RTD-fluxgate is working, the magnetic core produces random magnetic noise under the action of the excitation magnetic field [9,10].The detection circuit and time difference during transmission are easily affected by environmental noise.The above situation causes abnormal time difference jumps, reducing the stability of the RTDfluxgate [11,12].Therefore, it is necessary to estimate and deal with the gross error in time difference.The Laida criterion can be used if the processing method adopted includes discriminating and eliminating gross errors.However, this method is only suitable for cases with small measurement times and low processing accuracy [13].When the data contain only a single outlier, the Grubbs criterion can be used more easily and effectively, but it cannot deal with a large number of outliers [14,15].When the comparatively large amount of data does not follow a normal distribution, using the Chauville criterion reduces the accuracy of the measurement [16].This shows that the scope of application for different criteria is diverse.The direct elimination of gross errors can lead to important data information being removed.If we use the moving average filtering method, the random fluctuation caused by noise can be effectively suppressed, but the selection of window parameters directly affects the smoothing effect on the data.When larger window parameters are selected, the determinacy of the high-frequency variation is weakened on average.However, when smaller window parameters are selected, the low-frequency random fluctuation is not averaged [17].At the same time, the amount of data is reduced due to the added windows processing.It can be seen that the methods above have limitations when dealing with the gross error in time difference.
Because the MD is sensitive to data outliers, it is suitable as a statistic for measuring outliers [18,19].The MD of the time difference is regarded as the standard, so the gross error in the time difference can be accurately estimated.In addition, covariance is the measure of the degree of deviation from its mean.Therefore, in order to eliminate the gross errors in real-time dynamic magnetic field measurement using RTD-fluxgate, this article proposes a method for processing time difference gross errors by combining MD with group covariance as weights cooperating with mean values.This method can reduce the time difference fluctuation caused by random noise, improve the stability of RTD-fluxgate, and better process the time difference dynamically in real time.

Structure and Working Principle of RTD-Fluxgate
The RTD-fluxgate sensor is mainly composed of a sensing unit and a detection circuit, as is shown in Figure 1a.When it is working, the periodic alternating excitation current is input to both ends of the excitation coil of the sensing unit in order to generate an excitation magnetic field, where the magnetic core is magnetized to a bidirectional supersaturated state.As is shown in Figure 1b, after the excitation magnetic field is modulated by the hysteresis loop of the magnetic core, a pulse shape induction signal is generated through the induction coil.We can obtain the target magnetic field H x by determining the time difference between the positive and negative pulses of the induction signal relative to the magnetic saturation [20,21].data information being removed.If we use the moving average filtering method, the random fluctuation caused by noise can be effectively suppressed, but the selection of window parameters directly affects the smoothing effect on the data.When larger window parameters are selected, the determinacy of the high-frequency variation is weakened on average.However, when smaller window parameters are selected, the low-frequency random fluctuation is not averaged [17].At the same time, the amount of data is reduced due to the added windows processing.It can be seen that the methods above have limitations when dealing with the gross error in time difference.
Because the MD is sensitive to data outliers, it is suitable as a statistic for measuring outliers [18,19].The MD of the time difference is regarded as the standard, so the gross error in the time difference can be accurately estimated.In addition, covariance is the measure of the degree of deviation from its mean.Therefore, in order to eliminate the gross errors in real-time dynamic magnetic field measurement using RTD-fluxgate, this article proposes a method for processing time difference gross errors by combining MD with group covariance as weights cooperating with mean values.This method can reduce the time difference fluctuation caused by random noise, improve the stability of RTDfluxgate, and better process the time difference dynamically in real time.

Structure and Working Principle of RTD-Fluxgate
The RTD-fluxgate sensor is mainly composed of a sensing unit and a detection circuit, as is shown in Figure 1a.When it is working, the periodic alternating excitation current is input to both ends of the excitation coil of the sensing unit in order to generate an excitation magnetic field, where the magnetic core is magnetized to a bidirectional supersaturated state.As is shown in Figure 1b, after the excitation magnetic field is modulated by the hysteresis loop of the magnetic core, a pulse shape induction signal is generated through the induction coil.We can obtain the target magnetic field Hx by determining the time difference between the positive and negative pulses of the induction signal relative to the magnetic saturation [20,21].In order to minimize the influence of noise on the detection of and reduce the uncertainty in the time difference, we use the excitation signal and the output pulse signal, combined, to find the Negative Magnetic Saturation Time (NMST) ∆T NMST , which is the quantity used to measure the target magnetic field H x [22][23][24].The schematic diagram for the NMST reading technology is shown in Figure 2. When the magnetic core becomes saturated, an output pulse signal is generated on the induction coil; the transition time when the excitation signal amplitude is zero is used as the reference time, t T ; and when the applied magnetic field exceeds the coercive field, −H c , the induced voltage produces a negative pulse at t P .In order to minimize the influence of noise on the detection of and reduce the uncertainty in the time difference, we use the excitation signal and the output pulse signal, combined, to find the Negative Magnetic Saturation Time (NMST) ∆TNMST, which is the quantity used to measure the target magnetic field Hx [22][23][24].The schematic diagram for the NMST reading technology is shown in Figure 2. When the magnetic core becomes saturated, an output pulse signal is generated on the induction coil; the transition time when the excitation signal amplitude is zero is used as the reference time, tT; and when the applied magnetic field exceeds the coercive field, −Hc, the induced voltage produces a negative pulse at tP.
The relationship between the excitation field He(t) and the target field Hx is as follows: Deduced using Equations ( 2) and (3): When the trapezoidal excitation field H e (t) is used, assuming the total time of the slope within a cycle is t , the stable state time is t .T e is the excitation period, and f is the excitation frequency, so t + t = T e .The slope of the trapezoidal excitation is ±a, and the stable amplitude is ±H m .The expression is as follows: The relationship between the excitation field H e (t) and the target field H x is as follows: Deduced using Equations ( 2) and (3): The time difference ∆T NMST between t P and t T is defined by the Negative Magnetic Saturation Time, which is given by the following: The expression of the relationship between ∆T NMST and H x is as follows: The sensitivity S NMST expression found using the NMST reading strategy is as follows:

Discriminating and Processing Methods for Gross Error in Time Difference
The detection circuit in an RTD-fluxgate sensor adopts certain measures to suppress fluctuation and utilizes the NMST readout strategy to reduce the influence of induced signals.However, due to random external interference and other comprehensive factors from the environment, the original time difference still has certain fluctuation, and even some individual values fluctuate greatly, which causes a decrease in sensor stability.Therefore, it is necessary to estimate the gross error accurately and replace it with the effective value after time difference processing.Due to the sensitivity of the MD to anomalous values, the MD is regarded as a test statistic for the time difference; it can accurately estimate whether the time difference is interfered by noise or not.The covariance of the time difference can measure the deviation degree from its mean.The MD of the time difference data combined with the covariance of the corresponding group as the weight cooperate with the mean value replaces the gross time difference and reduces the impact of random fluctuation.

Time Difference Gross Error Discrimination Method Based on the Mahalanobis Distance
The Mahalanobis distance is the closest distance between a single sample and the "center of gravity" of a sample set [25]; this can help calculate the similarity of two unknown sample sets and overcome the defect of Euclidean distance which lacks the overall sample to affect the distance.Considering the relationship between various features, the MD is sensitive to abnormal values [26][27][28].For a sample set x i (=1,. . .n.), the D m expression of the MD between two samples, x i and x j , is expressed as follows: Because of the sensitivity of the MD to anomalous values, it is suitable to be used as a statistic to measure anomalous values.The MD from the time difference to the total data is used as the standard to estimate the gross error.First, the time difference ∆T NMST is read, and then the Mahalanobis distance D i of each time difference ∆T NMST(i) to the overall data is computed.Then, the time difference ∆T NMST(i) whose MD is less than the threshold d is chosen to form a new time difference sequence N 1 .
If the average value D i is taken as the threshold d, the selected threshold value d results in a large amount of the gross time difference being ignored, and it cannot be discriminated.If the minimum value of the time difference min (D i ) is selected, the effective time difference is discriminated.Because the time difference's Mahalanobis distance approximately obeys the chi-squared distribution with the degree of freedom P [27], the chi-squared distribution value X 2 P (∂) can be selected as the threshold value d.When the value D i of the time difference ∆T NMST(i) is larger than X 2 P (∂), the ∆T NMST(i) is considered to be the gross error.The discriminant expression is shown in Formula (10).
In the equation above, the parameter ∂ represents the confidence level and X 2 P (∂) represents the chi-squared distribution value.In this article, the confidence probability P = 97.5% is selected.There are two variables in the formula; in the corresponding table with α = 0.975, n = 2, the value X 2 P (∂) is 0.051.The process of time difference gross error discrimination is shown in Figure 3.In the equation above, the parameter ∂ represents the confidence level and 2 P ( ) ∂ X represents the chi-squared distribution value.In this article, the confidence probability P = 97.5% is selected.There are two variables in the formula; in the corresponding table with α = 0.975, n = 2, the value 2 P ( ) ∂ X is 0.051.The process of time difference gross error discrimination is shown in Figure 3.

Time Difference Gross Error Processing Algorithm Combined with the Mahalanobis Distance and Group Covariance
As seen above, the MD can be used as a statistic for outliers and it can estimate the gross error in the time difference accurately.While the data contain useful information, they need to be processed.As described in Equation ( 8), the MD can be understood as the degree of difference between two random variables which obey the same distribution and have a covariance matrix of Σ (Σ represents the overall covariance matrix of the sample).
In order to better reflect the variation in the original time difference, this paper divides the time difference data into groups to obtain the covariance of each group.The MD for the time difference data combined with the covariance of the corresponding group as the weight cooperates with the mean value, with which gross time difference is replaced.The above processing can reduce random fluctuation and is suitable for the real-time dynamic processing of time difference data.Therefore, a time difference gross error processing method based on the combination of the MD and group covariance is presented in the paper.The distance between two samples (xi − xj) in Equation ( 9) is replaced by the distance from the ΔTNMST(i) to the mean value

ΔT
, which can be expressed as follows:

Time Difference Gross Error Processing Algorithm Combined with the Mahalanobis Distance and Group Covariance
As seen above, the MD can be used as a statistic for outliers and it can estimate the gross error in the time difference accurately.While the data contain useful information, they need to be processed.As described in Equation ( 8), the MD can be understood as the degree of difference between two random variables which obey the same distribution and have a covariance matrix of Σ (Σ represents the overall covariance matrix of the sample).
In order to better reflect the variation in the original time difference, this paper divides the time difference data into groups to obtain the covariance of each group.The MD for the time difference data combined with the covariance of the corresponding group as the weight cooperates with the mean value, with which gross time difference is replaced.The above processing can reduce random fluctuation and is suitable for the real-time dynamic processing of time difference data.Therefore, a time difference gross error processing method based on the combination of the MD and group covariance is presented in the paper.The distance between two samples (x i − x j ) in Equation ( 9) is replaced by the distance from the ∆T NMST(i) to the mean value ∆T NMST(i) , which can be expressed as follows: From the above equation, the distance between the time difference ∆T NMST(i) and the mean value ∆T NMST(i) is √ C•D i .In this paper, the time difference ∆T NMST(i) is divided into n groups, for which the covariance C n of each group can be calculated.Therefore, the D i of ∆T NMST(i) is multiplied by the corresponding covariance C n of the number n group of time difference data as the weight.The number i time difference ∆T NMST(i) processed by this algorithm is F i , shown in Equation ( 12): Sensors 2023, 23, 9223 The flow chart of the time difference gross error processing method proposed in this paper is shown in Figure 4. First, the mean value of the time difference data is obtained, and the data are divided into n groups to calculate the covariance C n of each group.Then, D i of ∆T NMST(i) , for calculating time difference, is cyclically traversed to determine whether D i is less than the threshold d or not.
of ∆TNMST(i) is multiplied by the corresponding covariance Cn of the number n grou time difference data as the weight.The number i time difference ∆TNMST(i) processe this algorithm is Fi, shown in Equation ( 12): The flow chart of the time difference gross error processing method proposed in paper is shown in Figure 4. First, the mean value of the time difference data is obtai and the data are divided into n groups to calculate the covariance Cn of each group.T Di of ∆TNMST(i), for calculating time difference, is cyclically traversed to determine whe Di is less than the threshold d or not.If D i < d, the time difference ∆T NMST(i) is normal, and this value is stored in the array N 1 to continue traversing the time difference ∆T NMST(i+1) ; if D i ≥ d, the time difference ∆T NMST(i) is considered to be a gross error and needs to be processed.When the time difference ∆T NMST(i) is greater than the mean value of the data ∆T NMST , the ∆T NMST(i) is subtracted from the square root of the covariance C n of the corresponding group of time difference data, multiplied by the time difference ∆T NMST(i) .When the time difference ∆T NMST(i) is smaller than the mean value ∆T NMST of the data, ∆T NMST(i) is added to the square root of the covariance C n of the corresponding group of time difference data, multiplied by the time difference ∆T NMST(i) .
In this process, when each time difference gross error processing finishes, it is stored in the array N 2 until all the gross error processing is completed.The time difference data F i in N 2 and the normal time difference array N 1 form a new time difference array N.
The above processing can reduce random fluctuation and is suitable for the real-time dynamic processing of time difference data.Meanwhile, the algorithm is fast, simple, and easy to implement, which enables it to effectively meet the real-time dynamic processing requirements and improves the stability of the RTD-fluxgate system.

Simulation Data Analysis
In order to verify the effectiveness of the algorithm proposed in this paper, the Matlab Simulink random signal module is used to simulate the time difference in RTD-fluxgate; three groups of time difference data are obtained, with 1000 time differences in each group, and with different mean values and variance.The Laida criterion, moving average filtering, and the algorithm proposed in the paper are, respectively, used for processing.The statistical values resulting from the different processing methods are compared, as shown in Table 1.As seen in Table 1, the mean values after processing using the three methods remain basically unchanged.The deviation and the fluctuation in the time difference are reduced by 2.034% and 1.797%, respectively, after processing using the Laida criterion.Through the use of moving average filtering, the variance of time difference is reduced by 98.428% and the fluctuation decreases by at least 88.963%.However, after using the algorithm proposed in this paper, the variance of the time difference is reduced by 99.392% and the fluctuation decreases by at least 90.896%.It can be concluded that the method of combining the MD and group covariance has a better processing effect.
The traditional signal-to-noise ratio reflects the ratio between the energy of the signal and the noise, but it can also evaluate the effect of noise processing.In order to better evaluate the processing effect of the time difference gross error, we consider the working principle of RTD-fluxgate and the particularity of the physical quantity of the magnetic core negative saturation time ∆T NMST .In this paper, the ratio of the core negative saturation time mean value ∆T NMST and the noise-induced uncertainty δ(∆T NMST ) are defined as the time difference signal-to-noise ratio ∆T SNR , as is shown in Equation (13), and this parameter is used to quantitatively evaluate the processing effect of the time difference coarse error.
When the observation time is T ob and the number of cycles collected is N, then In this formula, ∆T PMST and ∆T NMST represent the residence time of the magnetic core in the positive and negative saturation state, respectively.Since the residence time distribution of the positive and negative saturated states is the same and uncorrelated, and the standard deviation is approximately equal, then The uncertainty δ(∆T NMST ) of the magnetic core negative saturation time ∆T NMST is shown in Equation ( 16): Sensors 2023, 23, 9223 8 of 13 In this formula, σ∆T NMST is the standard deviation of the ∆T NMST distribution.By substituting Equation ( 16) into Equation ( 13), the expression for the time difference signalto-noise ratio ∆T SNR can be obtained as follows: The first set of simulated time difference data is selected, and the ∆T SNR processing using the three different methods is shown in Table 2.It can be seen from the table that the ∆T SNR obtained using the method based on the combination of the MD and group covariance is obviously higher than that obtained using the other two methods, so this method is suitable for processing the coarse value of the time difference.

Experiment and Preliminary Results
Due to the existence of geomagnetic fields and external interference from magnetic fields, the test was greatly influenced.In order to improve the stability and accuracy of the test, a Helmholtz coil was placed in the middle area of the electromagnetic shielding cylinder made of a five-layer permalloy in an electromagnetic shielding room of the National Geophysical Exploration Instrument Engineering and Technology Research Center of Jilin University.The RTD-fluxgate sensor was made by the Key laboratory of geophysical exploration equipment and it was placed in the uniform region of the Helmholtz coil; the measured magnetic field H x , which was parallel to the core axis, was applied to the sensing unit.
The precision current sources of KEITHLEY 6221 were utilized in this experiment to drive the excitation coil of the RTD-fluxgate sensor to generate an excitation magnetic field.The excitation magnetic field waveform adopted a trapezoid-wave magnetic field with high time difference stability.When the frequency f = 30 Hz and the current I = 60 mA, the induction voltage produced by the induction coil pass through, in turn, the preamplifier circuit Pre-Amp, the secondary amplifier circuit Sec-Amp, and the shaping circuit.The shaping circuit consists of an addition circuit, a bias voltage generating circuit, and a hysteresis comparison circuit.When the induction voltage passes through the hysteresis comparison circuit, if using a threshold slightly lower than the peak value of the induction voltage, the shaping circuit obtains a rectangular wave with a duty cycle which varies with the information of the measured magnetic field H x .This rectangular signal is input to the CH1 channel of the FPGA logic signal processor.The excitation current source is adjusted to generate a synchronous trigger pulse.When the excitation voltage amplitude is zero, this is set as a trigger point, and the synchronous trigger pulse is input to the CH2 channel of the FPGA.It uses two-channel signals to count the time difference, in which the counting frequency f c of FPGA is 100 MHz.The number of time points N is converted into the time difference ∆T NMST and transmitted to STM32 for storage.The relevant instrument connection and test environment are shown in Figure 5.
By changing the current at both ends of the Helmholtz coil, H x is gradually moved through the range of −52,500~+52,500 nT and the least squares method is used to fit it linearly.When the sum of squared deviations from each data point to the fitting curve is minimized, the relationship between ∆T NMST and H x is obtained as follows: ∆T NMST = 0.008039 × H x + 1.612 × 10 4 (18) As in the equation above, the sensitivity of the sensor is S NMST = 0.008039 µs/nT.The relationship between the output ∆T NMST and the measured magnetic field H x , as well as the linear deviations, are shown in Figure 6.By changing the current at both ends of the Helmholtz coil, Hx is grad through the range of −52,500~+52,500 nT and the least squares method is linearly.When the sum of squared deviations from each data point to the fi minimized, the relationship between ΔTNMST and Hx is obtained as follows: ΔTNMST = 0.008039 × Hx + 1.612 × 10 4   As in the equation above, the sensitivity of the sensor is SNMST = 0.0080 relationship between the output ΔTNMST and the measured magnetic field Hx linear deviations, are shown in Figure 6.
(a)  By changing the current at both ends of the Helmholtz coil, Hx is gradu through the range of −52,500~+52,500 nT and the least squares method is u linearly.When the sum of squared deviations from each data point to the fitt minimized, the relationship between ΔTNMST and Hx is obtained as follows: As in the equation above, the sensitivity of the sensor is SNMST = 0.008039 relationship between the output ΔTNMST and the measured magnetic field Hx, as linear deviations, are shown in Figure 6. Figure 6a shows the fitting curve of ΔTNMST.According to the linear relati sensitivity of the sensor SNMST is 0.008039 µs/nT.Figure 6b shows the linear d Figure 6a shows the fitting curve of ∆T NMST .According to the linear relationship, the sensitivity of the sensor S NMST is 0.008039 µs/nT.Figure 6b shows the linear deviations of ∆T NMST .When H x = +52,500 nT, ∆T NMST is 16,517.17µs and the maximum residual As is illustrated in Figure 7, after being processed using the proposed algorit stability of ΔTNMST is obviously higher than that of the other two methods.The st value of ΔTNMST processed using different methods is shown in Table 3. Accordin table, with the mean of ΔTNMST unchanged, the time difference signal-to-noise ΔT tained using the method of combining the MD and group covariance is 47.776, w about 34 times higher than that without any processing and is significantly high the other two methods.The standard deviation is reduced from 0.340 µs to 0.010 µs effectively decreases the time difference fluctuation caused by noise.The histogram ΔTNMST fluctuation distribution after being processed using the different method ther calculated, as shown in Figure 8.It can be seen from the above figure that the distribution of the ΔTNMST fluctu approximately a normal distribution, and the percentage of the ΔTNMST fluctuation than 1 µs is 0.360%.In Figure 8a, the fluctuation in ΔTNMST is 2.414 µs without pro In Figure 8b, it is 1.995 µs after processing using the Laida criterion.In Figure 8c, it µs after processing using moving average filtering.In Figure 8d, it is 0.111 µs af cessing using the combination of the MD and group covariance.This comparison in that the fluctuation in the ΔTNMST after using the proposed method is reduced by 9 compared with that without any processing, which significantly reduces the fluc in the ΔTNMST compared with other methods, so the stability of the RTD-fluxgate As is illustrated in Figure 7, after being processed using the proposed algorithm, the stability of ∆T NMST is obviously higher than that of the other two methods.The statistical value of ∆T NMST processed using different methods is shown in Table 3.According to the table, with the mean of ∆T NMST unchanged, the time difference signal-to-noise ∆T SNR obtained using the method of combining the MD and group covariance is 47.776, which is about 34 times higher than that without any processing and is significantly higher than the other two methods.The standard deviation is reduced from 0.340 µs to 0.010 µs, which effectively decreases the time difference fluctuation caused by noise.The histogram of the ∆T NMST fluctuation distribution after being processed using the different methods is further calculated, as shown in Figure 8.
It can be seen from the above figure that the distribution of the ∆T NMST fluctuation is approximately a normal distribution, and the percentage of the ∆T NMST fluctuation greater than 1 µs is 0.360%.In Figure 8a, the fluctuation in ∆T NMST is 2.414 µs without processing.In Figure 8b, it is 1.995 µs after processing using the Laida criterion.In Figure 8c, it is 0.144 µs after processing using moving average filtering.In Figure 8d, it is 0.111 µs after processing using the combination of the MD and group covariance.This comparison indicates that the fluctuation in the ∆T NMST after using the proposed method is reduced by 95.402% compared with that without any processing, which significantly reduces the fluctuation in the ∆T NMST compared with other methods, so the stability of the RTD-fluxgate system can be improved.

Conclusions
On the basis of describing the structure and working principle of RTD-fluxgate, i known that the time difference detection is affected by external interference and enviro mental factors, which causes coarse error in the time difference data and reduces the s bility of the sensor.In this paper, a processing method is proposed to deal with the gro error in time difference by combining the MD with group covariance as weights coop ating with mean values.The results of our simulation and experiment indicate that t proposed method is more advantageous in identifying the time difference gross error: t signal-to-noise ratio of the time difference is improved by 34 times and the fluctuation the ΔTNMST is reduced by 95.402%.The processing effect is better than that of other me ods, and the influence of random interference on time difference detection is reduc Meanwhile, the algorithm is fast, simple, and easy to implement, which can effectiv meet the real-time dynamic processing requirements and improve the stability of RT fluxgate.

Conclusions
On the basis of describing the structure and working principle of RTD-fluxgate, it is known that the time difference detection is affected by external interference and environmental factors, which causes coarse error in the time difference data and reduces the stability of the sensor.In this paper, a processing method is proposed to deal with the gross error in time difference by combining the MD with group covariance as weights cooperating with mean values.The results of our simulation and experiment indicate that the proposed method is more advantageous in identifying the time difference gross error: the signal-to-noise ratio of the time difference is improved by 34 times and the fluctuation in the ∆T NMST is reduced by 95.402%.The processing effect is better than that of other methods, and the influence of random interference on time difference detection is reduced.Meanwhile, the algorithm is fast, simple, and easy to implement, which can effectively meet the real-time dynamic processing requirements and improve the stability of RTD-fluxgate.

Figure 1 .
Figure 1.Schematic diagrams of the RTD-fluxgate structure and its working principle.(a) The structure of an RTD-fluxgate sensor; (b) A schematic diagram of the RTD-fluxgate system's working principle.

Figure 1 .
Figure 1.Schematic diagrams of the RTD-fluxgate structure and its working principle.(a) The structure of an RTD-fluxgate sensor; (b) A schematic diagram of the RTD-fluxgate system's working principle.

Figure 3 .
Figure 3.The flow chart for time difference gross error discrimination based on the MD.

Figure 3 .
Figure 3.The flow chart for time difference gross error discrimination based on the MD.

Figure 4 .
Figure 4.The flow chart of the processing algorithm.

Figure 4 .
Figure 4.The flow chart of the processing algorithm.
ensors 2023, 23, x FOR PEER REVIEW converted into the time difference ΔTNMST and transmitted to STM32 for stor vant instrument connection and test environment are shown in Figure 5.

Figure 5 .
Figure 5. Instrument connection and test environment.

Figure 5 .
Figure 5. Instrument connection and test environment.

Figure 5 .
Figure 5. Instrument connection and test environment.

Figure 7 .
Figure 7.Comparison diagram of ΔTNMST processed using different methods.

Figure 7 .
Figure 7.Comparison diagram of ∆T NMST processed using different methods.

Figure 8 .
Figure 8. Histograms of ΔTNMST fluctuation distribution using different methods.(a) Fluctuation ΔTNMST without processing; (b) fluctuation in ΔTNMST after processing using the Laida criterion; fluctuation in ΔTNMST after processing using moving average filtering; (d) fluctuation in ΔTNMST af processing using the combination of the MD and covariance.

Figure 8 .
Figure 8. Histograms of ∆T NMST fluctuation distribution using different methods.(a) Fluctuation in ∆T NMST without processing; (b) fluctuation in ∆T NMST after processing using the Laida criterion; (c) fluctuation in ∆T NMST after processing using moving average filtering; (d) fluctuation in ∆T NMST after processing using the combination of the MD and covariance.

Table 1 .
The statistical values from the different processing algorithms.

Table 2 .
The ∆T SNR of the simulated time difference using different processing methods.

Table 3 .
Statistical values of ΔTNMST using different processing methods.

Table 3 .
Statistical values of ∆T NMST using different processing methods.