Abstract

In this paper, an eddy current testing system equipped with low-performance processor is designed for rail defect detection. A digital lock-in amplifier (DLIA) based on adaptive Kalman filter (AKF) is presented to detect the weak voltage induced in two differential coils. The proposed method can fast demodulate the amplitude of a signal with a randomized phase using one cycle of the sinusoidal signal, and simultaneously improve signal-to-noise ratio. This DLIA has made use of the sinusoidal orthogonality and concurrently utilized AKF to track on the amplitude variation of voltage, which is numerically simulated and analyzed in MATLAB. The simulated results indicate that increasing excitation frequency or sampling points in one cycle has an effective suppression in low-frequency noise. Furthermore, the experiment is carried out to verify the performance of the system for rail defect detection. Finally, the experimental result shows that the proposed lock-in amplifier has a root mean squared error of 1.3 mV and performs well in terms of memory consumption and precision. Moreover, the amplitude variation in differential coils is linearly tracked, and the surface defects on rail specimens can be detected.

1. Introduction

Railway transportation has good developmental prospects because of its high reputation for safety, fast, and convenience compared with other transportation [1]. Due to the increasing greatly speed and loads of trains in recent years, the rail track is vulnerable to even small flaws and subsequently rail broken happen, which critically cause a huge loss of life, money, and time [2]. Thus, rail defects must be detected early to improve the efficiency, reliability, and safety of the railway [2, 3]. Several technologies, such as vision [2], thermography [3], electromagnetism [4, 5], and ultrasonic [6], have been applied to inspect rail defects. All these technologies have respective features, and thereinto, eddy current testing (ECT) has advantages for the fast detection without coupling medium and the sensitivity to surface and subsurface defects of rail, which is a method of nondestructive testing technology widely used in applications of railway device [7], defect classification [8], as well as the measurement of distance and thickness of metallic plates [9]. Based on it, this paper briefly demonstrated the principles of ECT and devised an eddy ECT equipped with low-performance microcontroller unit (MCU) to detect defects on the surface rail.

Defect detection is based on the amplitude variation of induction voltage when surface defects occur [4]. In a practical railway field, the induction voltage is always disturbed by strong alternating current signals, such as power frequency and high-frequency emissions from the electromagnetic environment [5]. Besides that, the Gaussian white noise, which mainly is low-frequency noise in the frequency domain and results from the analog circuit, is promiscuously amplified together with induction voltage. Due to the unipolarity of the built-in analog-to-digital converter (ADC) of this MCU, the induction voltage must be elevated via direct current voltage and that is, the signal model contains not only AC interference but DC interference.

Such a complicated signal model is that the signal-to-noise ratio (SNR) of the ECT system becomes lower. A kind of method for improvement of SNR is dispensable. The digital lock-in amplifier (DLIA) due to its high SNR is one of the most optimal methods to demodulate signals buried in noise [10], such as dual-phase lock-in amplifier based on field programmable gate array for low-frequency experiments. But a typical Fourier-based low-pass filter (LPF) within DLIA requires adequate continuous sampling cycles to obtain high precision amplitude, otherwise, the output will be incorrect when the phase of the signal of the whole cycle is randomized, which thus has a great effect on the speed and accuracy of the system while DLIA is implemented in low-speed processors. Some previous efforts have been made the solution improving the computational speed and efficiency: James et al. [11] have put forward a digital lock-in with high computational efficiency for the discrimination of multiple modulation frequencies; Yin et al. [12] have proposed a half-cycle demodulation based on the average filter at the zero-point frequency for speeding up imaging in electromagnetic tomography; Li et al. [13] proposed an iterative quadrature demodulation based on the weighted average filter to demodulate the induced voltage for high-speed rail inspection. All utilize the averaging low-pass filter (ALPF) or its weighted average to restrain those interference signals, but their precision would decrease when the signal to be demodulated has blended the signal with a lower frequency than the induction voltage or strong power noise [14]. Furthermore, according to James et al. [11], Yin et al. [12], and Li et al. [13], the weighted coefficients of the average filter or weighted filter constantly set. Therefore, they struggled to adapt to different types or SNR of noise.

In order to further obtain a better balance between demodulation speed and accuracy, this paper proposes an improved lock-in amplifier integrated with adaptive Kalman filter (AKF). AKF has been applied in many fields, such as fault detection [15], sensor fusion [16], underwater navigation [17], and signal tracking [1820]. AKF is an optimal linear filter in a statistical sense and a more adaptive filter. It can linearly track the variation of induction voltage in coils [20]. The DLIA based on AKF has a higher immunity to noise to demodulate voltage without subject to the phase’s randomness of any one cycle. Furthermore, significant efforts of this paper mainly focus on the design of an ECT system for rail defect detection using the proposed demodulation method. Moreover, better performance in the detection speed and the improvement of SNR are achieved in the ECT system.

This paper is organized as follows: Section 2 demonstrates the principle of ECT and sensor structure for rail inspection. Then, the deduction of recursive lock-in amplifier integrated with AKF is introduced in Section 3. Section 4 analyses the proposed method in terms of sweeping-frequency characteristic, the relation between sampling points N and SNR as well as the comparison with a half-cycle method using ALPF, one-cycle method using ALPF, and using first-order resistor-capacitor (RC) LPF. Section 5 describes the manipulative process of the experiment and discusses the result of defect detection in the ECT system. Finally, Section 6 made a summary of this paper.

2. The Principle of ECT System

Referring to Liu et al. [5], the front-end sensor of the ECT system can be described as shown in Figure 1. The front-end sensor includes an immediate-position coil as an excitor and two end differential coils as a receiver. ECT system generates a sine AC signal into an excitation coil and simultaneously detects the voltage induced in two differential coils. Ignoring the effect of mutual inductance of two differential coils, magnetic flux coupling to receiver coils is inconsistent while detecting the defect. Then, the identification of the rail defect can be accomplished by the variation of the induced voltage.

Assuming the induced voltage of receiver Ui can be obtained by:

Here, Be is the magnetic flux density generated by induced eddy current or magnetization effect; Bo is the excitation magnetic flux density; S is the surface region of the specimen. Ui is related to the rail specimen’s relative permeability μ, conductivity σ, and the excitation condition.

Supposing the three following assumptions in satisfied, the excitation magnetic field of eddy current can be described as the Maxwell equations:

Here, H is magnetic field intensity; E is electric field intensity; B is magnetic flux density; D is electric flux density, and D = εE; ω is excitation frequency of which optimal frequency ranges from several hundred hertz to several megahertz. Such low the excitation frequency is that displacement current can be ignored, that is, jωεE = 0.

Furthermore, the induced eddy current density of the rail specimen can be given by:

Here, J is the eddy current and J0 is on the surface of the conductor; d is the depth from the surface. As is seen in Equation (3), the eddy current apparently decreases with the excitation frequency increasing, which indicates that the excitation magnetic flux density differs from excitation frequencies. If there is a defect on the surface or subsurface, the eddy current will be redistributed and subsequently, the magnetic flux density will be altered, which results in the variation of the induced voltage detected by receiver coils. Thus, the defects can be detected by the change of Ud.

3. Digital Lock-in Amplifier Based on AKF

The AKF-based DLIA mainly includes phase-sensitive detection (PSD) and AKF.

3.1. Orthogonal Sequential and PSD

In consideration of noise and traction current, the analog input signal can be described as follows:

Here, U(t) represents the differential voltage inducted in two receiver coils, and its amplitude and frequency are, respectively, Ao and fo that is the same as the excitation frequency; w(t) represents those interference signals that result from the external disturbance; n(t) represents noise mainly derived from analog device and is deemed to be linearly superimposed on multiple sinusoidal signals.

If sampled in time interval T = 1/fs, the discretization of analog input S(t) can be expressed as follows:

Here, k = 0, 1, 2, …, N − 1, N = fs/fo, and N is the total sampling points of a single cycle and must be greater than 10 points in the general case; fs is the sampling rate and meets Shannon’s sampling theorem; fm represents the frequency of arbitrary signals and its corresponding the phase of the signal is θm.

As is seen in Equation (5), the sampling sequence S[k] is a multisignal that consists of an induction signal, an interference signal, and noise. Moreover, according to the principle of sinusoidal signal correlation, the induction signal can be extracted via PSD. And the orthogonal signal sequences can be described as follows:

In Equation (6), xrs[k] and xrc[k] are, respectively, sines and cosines of the synchronously sampled sequence with the same sampling rate fs. To improve the speed of detection and decrease the computational consumption, the orthogonal signal sequences can be precalculated and prestored in the memory of a low-performance processor based on the foregone N.

After Equation (5) is multiplied by xrs[k], its product is follows:

In Equation (7), l belongs to the set {0, 1} and represents a sign of operation. Then, using the averaging filter, one that has uniform coefficients at each sampling point [15], filters out the undesired terms as follows:

Expanding Equation (8), the filtering result of continuous N points is obtained as follows:

As is seen in Equation (9), the desired signal may interfere with these multiple frequencies in Equation (5) that meets the following equation:

In Equation (10), only the term while n = 0, that is, the induction signal, is needed. The first frequency is N−1 times the excitation frequency, and thus the gap between them is broader when N increases. Moreover, the analog LPF, one that is easily implemented and has a high cutoff frequency that is calculated as (N−1)fo, can be used to restrain such disturbance components. Then, the final result of X1 is follows:

Similarly, the final result of X2 is follows:

Consequently, the induction voltage’s amplitude and phase are, respectively, calculated as follows:

3.2. Principle and Design on AKF

AKF is an optimal filter in statistics under the condition that Gauss white noise and state model are exactly definite [19, 20]. And in practice, the noise is exactly deemed as Gauss white noise. Considering the autoregressive signal model, the output at n + 1 instant can be predicted by the previous Z- estimated outputs as follows:where A[n + 1] is the predication of output at n + 1 instant; A[n] is the vector of previous Z estimated outputs before time n + 1, and A[n] = (A[n], A[n−1], …, A[nZ + 1])T; H[n] is the vector of finite-impulse-response filter coefficient shown in Figure 2, and H[n] = (h1[n], h2[n], …, hZ[n])T.

In Figure 2, z−1 represents one unit duration for input; hi is the weight coefficient of the ith estimated output at time n and adaptively adjusted by error e[n]. However, because the filter is a linear time-invariant system, all the weight coefficients are uniform and thus meet Equation (16).

Hence, the state prediction model equation and the one-step status covariance equation can be described, respectively, as Equations (17) and (18).

Here, the status-transition matrix is follows:where A[n] is the estimated status matrix at time n and A[n + 1|n] is the predicted status matrix at time n + 1; u[n] is the noise status and equals zero due to stationary measured signal; P[n] is the estimated status covariance matrix at time n and P[n + 1|n] is the predicted status covariance matrix at time n + 1; Q[n] is the covariance matrix of u[n] and Q[n] = E(u[n]uT[n]), that is, Q[n] = 0.

As is seen in Figure 2, it is integrant for the predicted status to be corrected by demodulated amplitude Y[n + 1] at time n + 1 based on the idea of AKF’s data fusion globally. Moreover, the measured matrix Y[n + 1] is obtained by:

Then, the optimal estimation of output is demonstrated as the following equations:where Kg is the Kalman gain; R[n] is the measurement noise covariance matrix and its off-diagonal element is zero owing to the white Gaussian noise of measurement v[n]. Finally, the update of P[n + 1] is obtained by the following equation:

4. Numerical Simulation and Analysis

In this section, the lock-in amplifier is carried out to perform numerical simulations using MATLAB. Moreover, comparisons of other methods already used for lock-in demodulation are given in different frequencies and SNR.

4.1. Sweep Frequency Response

According to the principle of PSD, the input signal while its frequency differs from the reference signal can be filtered out and restrained. In general, due to traction return current in actual measurement, the induction signal in coils is mainly interfered with by low frequencies like the power frequency 50 Hz or the direct current.

As is shown in Figure 3, the restraining level of interference signals tends to increase gradually as its frequency is away from the excitation frequency. And four curves have directly indicated that the higher the excitation frequency is, the higher the restraining level of interference signals is in the low-frequency stage, especially under 100 Hz, which means that high excitation frequency is useful to eliminate the effect of low-frequency interference including direct current and power frequency. Furthermore, there are many points restraining levels of more than −200 dB in the high-frequency stage.

4.2. Signal-to-Noise Improvement

In terms of SNR, according to what is demonstrated in Section 2, when it comes to defects on the surface of the rail specimen the differential voltage induced in two receiver coils certainly varies in measurement. Yet, although the differential signal varies greatly, it is so weak that the voltage requires to be amplified through the analog circuit before sampling. Nevertheless, in practice, those undesired signal, such as traction return current and white noise, often disturb the ECT system, and is simultaneously amplified together with differential voltage, which indicates that the differential signal is still submerged in strong noise.

As is shown in Figure 4(a), the demodulation error, one that denotes amplitude deviation, the result of subtracting the demodulated amplitude from simulated real amplitude, becomes larger as SNR gets smaller on the condition that the amplitude of the differential signal and N are constant, which indicates that the SNR of ECT system has the great influence on the accuracy of demodulation. But in Figure 4(b), as increasing the size of N, that is to increase the sampling frequency, SNR is improved and the demodulation error rate, the proportion of between amplitude deviation and real amplitude, decreases. Thus, for obtaining high precision of demodulation, the effective measure is increasing the sampling rate. Yet the consumption of computing time with one cycle will be increased as well. Know then, for the high performance of the proposed method, a compromise between computational accuracy and sampling rate should be taken into consideration.

4.3. Comparison with Previous Method

In this subsection, the idea mainly focuses on the verification of the recursive method this paper has presented. For a better knowledge of that, this method will be compared with what previous work mentioned in the introduction has been proposed with aspects of convergence rate and accuracy. There are classified four cases for the analytical simulation of gathered voltage and the parameters of all cases are listed in Table 1. Noted: the induction voltage’s frequency and sampling frequency are, respectively, 10 and 160 kHz. One of these has only pure induction voltage A0 having phase θo and three of these, in consideration of the real measurement situation, contain interference signals with a frequency of A1 and A2, respectively, corresponding to 50 Hz and 200 kHz, the biased voltage VDC and SNR. The phase of these additive interference signals can be ignored due to that may be reckoned into noise while randomized.

Figure 5 shows the demodulated result of four different methods in four different cases. LPF using first-order RC with 1 Hz cut-frequency requires more much of time steps, that is the number of cycles, than the half-cycle or one-cycle method. Accordingly, it causes the convergence speed to lower. While solving one cycle of phase randomized, LPF using first-order RC is limited because it lies in a response process that requires a lot of continuous cycles about 7,000 time steps from transit state to steady state. Despite the half-cycle method having higher computational efficiency than a one-cycle method for its computation process, its stability is vulnerable to even small interference signals, and its output acts in an undamped period of oscillation. The one-cycle ALPF method can solve it regardless of phase randomization, but the demodulation accuracy using KF is approximately zero while SNR is set as −1 dB, which means that using KF versus ALPF has better antijamming capability in strong noise. Therefore, LPF using KF not only has a fast rate of convergence, but also has a higher ability to suppress noise.

5. Hardware Design and Experiment

In this section, the design of the ECT system equipped with low-performance STM32F103 MCU is described, and several tests are implemented to validate defects in rail specimens.

5.1. Hardware and Experimental Setup

The diagram of the experimental system is shown in Figure 6. It consists of three front-end coils (copper coils, the real object is a blue rectangle shown in the experimental scene), an analog amplifier board, STM32F103 development board (build-in SRAM up to 64 Kbytes, 72 MHz maximum operating main frequency, and build-in 12-bit ADC with 1 MSPS maximum sampling frequency), and function generator (RIGOL DG4062, function/arbitrary waveform generator up to 60 MHz). In addition, two types of rail defects are shown in Figure 7. Five cases are prepared for the detection, and their parameters are shown in Table 2.

The excitation signal is generated by a function generator and then its power is amplified by an analog amplifier board before passing through the excitation coil. The differential voltage induced in two differential coils is also amplified by an analog amplifier after passing through the LPF and then it is sampled in one cycle by built-in ADC. After that, the amplitude variation of differential voltage is obtained by sampled data and finally is transformed into a host computer procedure to display via serial port.

5.2. Experimental Results

Several experiments in two aspects of demodulation performance of this recursive lock-in amplifier and defects detection are carried out in this subsection.

For testing performance, the excitation signal generated in the function generator is directly connected to the built-in ADC. While adjusting the excitation signal’s peak amplitude, the demodulation results in different N are shown in Figure 8. In Figure 8(a), the amplitude demodulated in different N concentrates on 0.4946 V when the peak amplitude of the excitation signal is adjusted as 0.5 V and yet still has deviation in every sampling cycle. According to the numerical simulation with previous work, AKF due to a higher noise suppression can eliminate deviation and smooth out the signal’s amplitude shown in Figure 8(b). In Figure 8(b), root mean squared error (RMSE) of 128, 32, and 16 points, are 1.5, 1.3, and 3.4 mV, respectively. RMSE of 32 points is lower. Moreover, the memory consumption goes up as the size of N increases. Therefore, the proposed method at 32 points performs better in terms of memory consumption and precision. Figure 9 shows that AKF due to a fast rate of convergence can fast track on amplitude changes. Accordingly, the AKF-based method can suppress the noise, and track the amplitude changes in practical experiments.

According to the principle of ECT, the defect on the surface rail changes the induced current distribution and then affects magnetic flux in one of two differential coils, and that is, the detection of defects can be based on amplitude variation. Hence, tag 20 positions of interval 1 cm as measured points between two fixed positions far away both ends of specimens, where the defect of all the specimens is in the middle. The response curve of ECT to different defects is drawn by measuring differential voltage while the sensor moves over these position tags. Figure 10 shows the voltage variation of detection for defects using the recursive lock-in amplifier while N = 32. As seen in Figure 10, the amplitude variation responding to the narrow gap is more dramatic than the circular pit, which indicated that distinguishing the feature of a narrow gap from voltage variation is easier than a circular pit. Furthermore, different depths or diameters have different capabilities to recognize the defect, which manifested that the variation of voltage depends on the scale of defects. This proposed method performs quite well in the defect detection of the railway.

6. Conclusions

For the higher computational efficiency and antijamming of rail defect, the AKF-based lock-in amplifier is presented in this paper. A comparison with the previous methods is carried out in the numerical simulation. The numerical simulation has found that the improvement of excitation frequency and sampling points N is useful to restrain the interference signals. Furthermore, the eddy current detection system equipped with a STM32F103 MCU is devised and implemented to detect the surface defects of rail specimens. Via the proposed lock-in amplifier, the assessment of performance is carried out. The experimental result shows that the RMSE of 32 points is 1.3 mV, which is lower than that of 128 and 16 points, and 32 sampling points can perform well in terms of memory consumption and precision for the proposed lock-in amplifier. Based on it, the proposed method can linearly track the variation of induced voltage even with random phase and eliminate the interference signal. Furthermore, the narrow gap is recognized as more distinct than the circular pit, and deep depth is also easily identified than shallow depth.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This research was funded in part by the Fujian Natural Science Foundation under Grant 2023J01229, a Research Subsidy Project of Fujian Provincial Finance Department in 2022 and in part by the Fundamental Research Funds for the Central Universities under Grant 2018YJS018.