Denoising of LCR Wave Signal of Residual Stress for Rail Surface Based on Lifting Scheme Wavelet Packet Transform

: According to the acousto elastic effect, the residual stress on the surface of the rail can be evaluated by measuring the change in the propagation velocity of ultrasonic waves, such as longitudinal critically refracted (LCR) waves on the surface of the rail. The LCR wave signal is often polluted by a variety of noise sources, coupled with the inﬂuence of the poor surface condition of the inspected component, which greatly reduces the detectability and online measurement ability of the LCR wave signal. This paper proposes the application of the lifting scheme wavelet packet transform (LSWPT) denoising method to solve the noise suppression problem of LCR wave signal. The traditional wavelet transform (WT), wavelet packet transform (WPT), as well as the lifting scheme wavelet transform (LSWT) and lifting scheme wavelet packet transform are compared and analyzed in the soft thresholding and hard thresholding processing of denoising ability and efﬁciency of the noisy LCR wave signal. The experimental results show that the LSWPT method has the characteristics of fast calculation speed and a good denoising effect, and it is an efﬁcient method of denoising signals for on-line ultrasonic measurement of residual stress on the rail surface.


Introduction
Residual stresses in the surface layer of steel rails are generated during production and use. In particular, the residual stresses in the protective coating [1] of steel rails are created at a specific technological process. Excessive residual stresses affect the stability, wear resistance, fatigue strength, and fracture resistance of the rails during use, and even cause the rails to break, which constitutes a huge impact on driving safety and potential threat. Studies have shown that there are usually longitudinal tensile residual stresses at the head and base of the rail, and longitudinal compressive residual stresses at the rail web. The ultrasonic measurement of residual stress is based on the theory of acoustoelasticity, using the ideal linear relationship between the velocity of ultrasonic wave in the elastic medium or the change of the frequency spectrum and the internal stress of the elastic medium to measure [2][3][4]. In order to relate ultrasonic velocities to residual stress, the ultrasonic method generally requires higher-order elastic constants [5]. These constants which are also dependent on the metallurgical texture [6], the type of wave and the direction of wave propagation relative to the direction of stress [7] must be experimentally determined for a particular material being examined. The influence of the texture on the measured transition times should be considered during data analysis.
The key to the ultrasonic measurement of residual stress lies in the ability to use advanced electronic measuring systems and special ultrasonic probe systems to accurately measure changes in wave pulse transit times or time-of-flight (TOF) to reduce the impact of acoustic coupling on the accuracy of measurements. The ultrasonic wave can reach the receiving probe in various ways which depend on the probe's geometry and the thickness of the element. However, the ultrasonic testing signal is often polluted by a variety of noise On the one hand, this transformation inherits the multi-resolution characteristics of classic wavelets and is performed in the time domain, so wavelet bases can also be constructed on non-translation invariant regions. On the other hand, it inherits the good time-frequency positioning characteristics of WPT and the ability of adaptive narrowband filtering of signals, so it can quickly and effectively decompose various time-varying signals and obtain the optimal time-frequency representation of the signal under different criteria, to more comprehensively separate the noise.

Lifting Scheme Wavelet Analysis
The lifting scheme wavelet transform (LSWT) is based on the traditional Laurent polynomial and Euclidean algorithm. By improving wavelet and scaling functions with known characteristics, a new set of wavelet and scaling functions with certain desired characteristics are obtained. The lifting scheme algorithm uses a simple and effective way to construct biorthogonal wavelets. First, basic polynomial interpolation is used to obtain the high-frequency components of the information, and then a scaling function is constructed to obtain the low-frequency components. The theme of this LSWT algorithm is to decompose the existing wavelet filter into basic building blocks and then complete the wavelet transform according to the corresponding steps. LSWT divides the wavelet transform into three steps: Split, Predict, and Update. The two-stage decomposition is shown in Figure 1.

• split
Coatings 2021, 11, x FOR PEER REVIEW 3 of 18 (LSWT) that does not depend on the Fourier transform, also known as the second-generation wavelet transform. The coefficients after LSWT are integers and can be introduced into the wavelet packet construction, which is called lifting wavelet packet transform (LSWPT). On the one hand, this transformation inherits the multi-resolution characteristics of classic wavelets and is performed in the time domain, so wavelet bases can also be constructed on non-translation invariant regions. On the other hand, it inherits the good time-frequency positioning characteristics of WPT and the ability of adaptive narrowband filtering of signals, so it can quickly and effectively decompose various time-varying signals and obtain the optimal time-frequency representation of the signal under different criteria, to more comprehensively separate the noise.

Lifting Scheme Wavelet Analysis
The lifting scheme wavelet transform (LSWT) is based on the traditional Laurent polynomial and Euclidean algorithm. By improving wavelet and scaling functions with known characteristics, a new set of wavelet and scaling functions with certain desired characteristics are obtained. The lifting scheme algorithm uses a simple and effective way to construct biorthogonal wavelets. First, basic polynomial interpolation is used to obtain the high-frequency components of the information, and then a scaling function is constructed to obtain the low-frequency components. The theme of this LSWT algorithm is to decompose the existing wavelet filter into basic building blocks and then complete the wavelet transform according to the corresponding steps. LSWT divides the wavelet transform into three steps: Split, Predict, and Update. The two-stage decomposition is shown in Figure 1. x k k Z as given below: which is called Lazy Wavelet by this kind of split and these two samples are closely correlated.

• Predict
Using adjacent N (N = 2D, D is a positive integer) even samples to predict the odd samples, the predicted error { } ( ), = ∈ d d k k Z can be defined as the wavelet detail signal, as follows: The original input signal s = {x(k), k ∈ Z} is split into two wavelet disjoint sets including the even indexed samples s e = {x e (k), k ∈ Z} and the odd indexed samples s o = {x o (k), k ∈ Z} as given below: which is called Lazy Wavelet by this kind of split and these two samples are closely correlated.

• Predict
Using adjacent N (N = 2D, D is a positive integer) even samples to predict the odd samples, the predicted error d = {d(k), k ∈ Z} can be defined as the wavelet detail signal, as follows: In the above equation, P(•) is the definition of the N-point predictor algorithm.
• Update Based on the detail signal d, when updating the even samples, N( N = 2 D, D is a positive integer) detail signals are used. This set s = {s(k), k ∈ Z} is the approximation signal of the wavelet given by: In the above equation, U(•) is the definition of the N-point updater algorithm. For example, when the predictor coefficient is N = 2 and the updater coefficient is N = 4, the LSWT decomposition process based on the principle of interpolation and subdivision is shown in Figure 2.
In the above equation, ( ) • P is the definition of the N-point predictor algorithm.
• Update Based on the detail signal d, when updating the even samples, ∈ s s k k Z is the approximation signal of the wavelet given by: In the above equation, ( ) • U is the definition of the  N -point updater algorithm. For example, when the predictor coefficient is 2 = N and the updater coefficient is , the LSWT decomposition process based on the principle of interpolation and subdivision is shown in Figure 2. u3 u4 xo [1] xe [3] xo [3] xe [4] d[0] d [1] d [2] d [3] −p2 s [1] s [2] s [3] s [4]  The reconstruction process of LSWT also includes three steps: Undo update, Undo predict and Merge. The reconstruction after 2-level decomposition is shown in Figure 3.

Undo update
Combine the approximation signal s and the detail signal d to restore the even sample sets e s : •

Undo predict
The odd sample set o s is recovered from the even sample set e s and the detail signal d expressed as: The reconstruction process of LSWT also includes three steps: Undo update, Undo predict and Merge. The reconstruction after 2-level decomposition is shown in Figure 3.

•
Undo update In the above equation, ( ) • P is the definition of the N-point predictor algorithm.
• Update Based on the detail signal d, when updating the even samples, In the above equation, ( ) • U is the definition of the  N -point updater algorithm. For example, when the predictor coefficient is 2 = N and the updater coefficient is , the LSWT decomposition process based on the principle of interpolation and subdivision is shown in Figure 2. u3 u4 xo [1] xe [3] xo [3] xe [4] d[0] d [1] d [2] d [3] −p2 s [1] s [2] s [3] s [4]  The reconstruction process of LSWT also includes three steps: Undo update, Undo predict and Merge. The reconstruction after 2-level decomposition is shown in Figure 3.

Undo update
Combine the approximation signal s and the detail signal d to restore the even sample sets e s : •

Undo predict
The odd sample set o s is recovered from the even sample set e s and the detail signal d expressed as: Combine the approximation signal s and the detail signal d to restore the even sample sets s e : • Undo predict The odd sample set s o is recovered from the even sample set s e and the detail signal d expressed as: • Merge From the even sample set s e and the odd sample set s o , the original signal s is restored, expressed as: Similarly, when the predictor coefficient is N = 2 and the updater coefficient is N = 4, the LSWT reconstruction based on the principle of interpolation and subdivision is shown in Figure 4.
• Merge From the even sample set e s and the odd sample set o s , the original signal s is restored, expressed as: Similarly, when the predictor coefficient is 2 = N and the updater coefficient is , the LSWT reconstruction based on the principle of interpolation and subdivision is shown in Figure 4.

Lifting Scheme Wavelet Packet Analysis
The scaling function and wavelet function of the lifting scheme wavelet (LSW) are symmetrical and tightly supported, and their curves have the characteristics of oscillating attenuation, which is similar to the waveform of pulsed ultrasonic waves propagating on the surface and inside of the material. Therefore, using them as basis functions, based on lifting scheme wavelet transform, a lifting scheme wavelet packet (LSWP) decomposition and reconstruction algorithm is constructed, which can be used to quantify and identify ultrasound signals.
Lifting scheme wavelet packet transform (LSWPT) includes decomposition algorithm and reconstruction algorithm. The steps are as follows: • Same as LSWT, the original signal { } ( ), = ∈ s x k k Z is split into even sample sets e s and odd sample sets 0 s , as shown in Equation (1).Through the following formulas, the signals of each frequency band decomposed in the first layer of the boosted wavelet packet are calculated:

•
Calculate the signals of each frequency band decomposed in the L-th level of the LSWP through the following equations: where, P and U are the predictor and updater of the LSW, respectively.
• When the signals in Equation (7) are reconstructed by LSWPT, the corresponding frequency band signal will be retained, and the rest will be set to zero. The signals are reconstructed according to the following equations:

Lifting Scheme Wavelet Packet Analysis
The scaling function and wavelet function of the lifting scheme wavelet (LSW) are symmetrical and tightly supported, and their curves have the characteristics of oscillating attenuation, which is similar to the waveform of pulsed ultrasonic waves propagating on the surface and inside of the material. Therefore, using them as basis functions, based on lifting scheme wavelet transform, a lifting scheme wavelet packet (LSWP) decomposition and reconstruction algorithm is constructed, which can be used to quantify and identify ultrasound signals.
Lifting scheme wavelet packet transform (LSWPT) includes decomposition algorithm and reconstruction algorithm. The steps are as follows: • Same as LSWT, the original signal s = {x(k), k ∈ Z} is split into even sample sets s e and odd sample sets s 0 , as shown in Equation (1).Through the following formulas, the signals of each frequency band decomposed in the first layer of the boosted wavelet packet are calculated: • Calculate the signals of each frequency band decomposed in the L-th level of the LSWP through the following equations: where, P and U are the predictor and updater of the LSW, respectively.
• When the signals in Equation (7) are reconstructed by LSWPT, the corresponding frequency band signal will be retained, and the rest will be set to zero. The signals are reconstructed according to the following equations:

Denoising Based on LSWPT
The denoising method based on LSWPT is similar to LSWT, both of which achieve the purpose of denoising by threshold quantization of the high-frequency coefficients of the wavelet decomposition. LSWPT can decompose the low-frequency part and high-frequency part of the upper level at the same time and has more accurate local analysis capabilities.
Apply LSWPT analysis to denoise the signal according to the following steps: • Lifting wavelet packet decomposition.
Choose a wavelet packet and determine the level of decomposition required, and then perform LSWP decomposition on the signal.

•
Determination of the optimal lifting wavelet packet base.
For a given entropy, calculate the best tree.
For each LSWP decomposition coefficient, an appropriate soft threshold or hard threshold is selected to threshold quantize the coefficients.
According to the LSWP decomposition coefficients of the lowest level and the quantized coefficients, the LSWP reconstruction is carried out.
It can be seen from the above steps that, first, different wavelet packets have different time-frequency localization capabilities, reflecting different signal characteristics. Secondly, the choice of threshold and the threshold quantization strategy determine the degree and way of reducing signal energy. The denoising effect of the signal is determined by the combination of them.
Among them, how to choose a threshold for threshold quantification is the most important, which is directly related to the quality of signal denoising to a certain extent. Donoho and John Stone [25] proposed two wavelet threshold processing methods, soft thresholding, and hard thresholding, which are expressed as follows: where w and w λ are respectively the wavelet coefficient values before and after the threshold is applied. λ is the threshold. The hard threshold function is discontinuous when |w| = λ which is likely to cause the obvious Pseudo-Gibbs phenomenon near the singular point of the denoised signal. Therefore, the soft threshold function is usually selected as the threshold processing function.

Method Principle of Measurement for Residual Stress Using Ultrasound
The longitudinal critically refracted (LCR) waves which are the most sensitive to stress and especially suitable for measuring residual stress parallel to the direction of ultrasonic propagation. Residual stress (hereinafter abbreviated as stress) in materials affects the velocity of the LCR wave. Generally, when the stress direction is parallel to the direction of propagating, tensile stress reduces the velocity of the LCR wave, while compressive stress increases the velocity of the LCR wave. As shown in Figure 5. The stress measurement probe is composed of two wedged ultrasonic transducers, the distance L between the transmitting and receiving transducers is fixed. If the time-of-flight (TOF) corresponding to zero stress σ 0 and those for the stress σ to be determined are t 0 and t respectively, then the stress σ along the LCR wave direction in the rail surface can be calculated as: where, K is defined as the stress coefficient, and calibrated for rail steel (U75V); ∆σ is the stress difference; ∆t is the transit time.

Method Principle of Measurement for Residual Stress Using Ultrasound
The longitudinal critically refracted (LCR) waves which are the most sensitive to stress and especially suitable for measuring residual stress parallel to the direction of ultrasonic propagation. Residual stress (hereinafter abbreviated as stress) in materials affects the velocity of the LCR wave. Generally, when the stress direction is parallel to the direction of propagating, tensile stress reduces the velocity of the LCR wave, while compressive stress increases the velocity of the LCR wave. As shown in Figure 5. The stress measurement probe is composed of two wedged ultrasonic transducers, the distance L between the transmitting and receiving transducers is fixed. If the time-of-flight (TOF) corresponding to zero stress 0 σ and those for the stress σ to be determined are 0 t and t respectively, then the stress σ along the LCR wave direction in the rail surface can be calculated as: where, K is defined as the stress coefficient, and calibrated for rail steel (U75V); σ Δ is the stress difference; Δt is the transit time.
As shown in Figure 5, the rail residual stress ultrasonic measurement system consists of an ultrasonic pulser-receivers (Olympus 5073PR, Waltham, MA, US), a pair of ultrasonic longitudinal wave transducers with the same frequency (SISU, Shantou, China), an acoustic wedge, and an oscilloscope (TeKtronix DPO 4014, OH, US). The wedge is well coupled with the surface of the rail through ultrasound couplants.

LCR Wave Signal Acquisition
As shown in Figure 6, the ultrasonic probes of 1 MHz, 2.5 MHz, and 5 MHz are used to measure the residual stress at the rail head, rail web, and rail base respectively. The high-pass filter (HPF) of the ultrasonic pulser-receivers is set to "OUT", and the low-pass filter (LPF) is set to "20 MHz". The "Acquisition" of the oscilloscope is set to "sampling" and no averaging is performed. The sampling frequency is 2.5 GHz, the data length is 250,000, and the nine groups of original signals collected are shown in Figure 7. In each  As shown in Figure 5, the rail residual stress ultrasonic measurement system consists of an ultrasonic pulser-receivers (Olympus 5073PR, Waltham, MA, US), a pair of ultrasonic longitudinal wave transducers with the same frequency (SISU, Shantou, China), an acoustic wedge, and an oscilloscope (TeKtronix DPO 4014, OH, US). The wedge is well coupled with the surface of the rail through ultrasound couplants.

LCR Wave Signal Acquisition
As shown in Figure 6, the ultrasonic probes of 1 MHz, 2.5 MHz, and 5 MHz are used to measure the residual stress at the rail head, rail web, and rail base respectively. The highpass filter (HPF) of the ultrasonic pulser-receivers is set to "OUT", and the low-pass filter (LPF) is set to "20 MHz". The "Acquisition" of the oscilloscope is set to "sampling" and no averaging is performed. The sampling frequency is 2.5 GHz, the data length is 250,000, and the nine groups of original signals collected are shown in Figure 7. In each group of signals  Figure 7, the leftmost waveform is the trigger signal sent by the transmitting transducer, and the right waveform is the signal received by the receiving transducer. Since the LCR wave is a longitudinal wave that propagates parallel to the surface of the rail as shown in Figure 6, it has the fastest propagation velocity and first reaches the receiving transducer, so it will appear on the leftmost (front end) of the right waveform. The following series of waveforms are transverse waves or longitudinal waves that reach the receiving transducer after being reflected by reflection interfaces such as the bottom and sides of the rail. group of signals in Figure 7, the leftmost waveform is the trigger signal sent by the transmitting transducer, and the right waveform is the signal received by the receiving transducer. Since the LCR wave is a longitudinal wave that propagates parallel to the surface of the rail as shown in Figure 6, it has the fastest propagation velocity and first reaches the receiving transducer, so it will appear on the leftmost (front end) of the right waveform.
The following series of waveforms are transverse waves or longitudinal waves that reach the receiving transducer after being reflected by reflection interfaces such as the bottom and sides of the rail.

Rail head
Rail web Rail base Figure 6. Surface residual stress measurement at rail head, rail web, and rail base. group of signals in Figure 7, the leftmost waveform is the trigger signal sent by the transmitting transducer, and the right waveform is the signal received by the receiving transducer. Since the LCR wave is a longitudinal wave that propagates parallel to the surface of the rail as shown in Figure 6, it has the fastest propagation velocity and first reaches the receiving transducer, so it will appear on the leftmost (front end) of the right waveform.
The following series of waveforms are transverse waves or longitudinal waves that reach the receiving transducer after being reflected by reflection interfaces such as the bottom and sides of the rail.

LCR Wave Signal Preprocessing
The selection of the optimal wavelet base is mainly based on the comparison of the results before and after the LSWPT denoising processing. However, in practical applications, the LCR wave signals collected as shown in Figure 7 are usually noise-containing signals, and it is impossible to obtain a real signal without noise. Therefore, it is difficult to accurately evaluate the quality of the wavelet base. An ideal signal can be constructed by preprocessing a noisy LCR wave signal, for example, smoothing the noised signal. Then superimpose a known white noise and a high-frequency sinusoidal signal on this ideal signal. The finally formed signal will be used as the original signal for evaluating the

LCR Wave Signal Preprocessing
The selection of the optimal wavelet base is mainly based on the comparison of the results before and after the LSWPT denoising processing. However, in practical applications, the LCR wave signals collected as shown in Figure 7 are usually noise-containing signals, and it is impossible to obtain a real signal without noise. Therefore, it is difficult to accurately evaluate the quality of the wavelet base. An ideal signal can be constructed by preprocessing a noisy LCR wave signal, for example, smoothing the noised signal. Then superimpose a known white noise and a high-frequency sinusoidal signal on this ideal signal. The finally formed signal will be used as the original signal for evaluating the denoising ability of the combination of wavelet base and decomposition levels. The specific implementation method is shown in Figure 8. The reason for adding a high-frequency sinusoidal signal is to consider the nonlinear effect of LCR wave propagation in materials with residual stress [26]. The LCR wave contains high-frequency harmonic signal components.
Coatings 2021, 11, x FOR PEER REVIEW 10 of 18 denoising ability of the combination of wavelet base and decomposition levels. The specific implementation method is shown in Figure 8. The reason for adding a high-frequency sinusoidal signal is to consider the nonlinear effect of LCR wave propagation in materials with residual stress [26]. The LCR wave contains high-frequency harmonic signal components.  The LCR wave signal (2.5 MHz) with a smaller amplitude and measuring the residual stress at the rail base is selected as the original signal for verification and analysis. As shown in Figure 9a, we can take the 10-40 μs part of the original signal with the length of 75,000 out, the perform 32-time average filter processing on this original signal to obtain an ideal signal with LCR wave for residual stress measurement at the rail base, as shown in Figure 9b. A standard Gaussian white noise is superimposed on the entire original signal, and a high-frequency sinusoidal signal with a frequency of 5 MHz is superimposed on the LCR wave separately to construct a test signal containing noise and high-frequency information, as shown in Figure 9c. The SNR of the test signal is 4.3208 dB. The LCR wave signal (2.5 MHz) with a smaller amplitude and measuring the residual stress at the rail base is selected as the original signal for verification and analysis. As shown in Figure 9a, we can take the 10-40 µs part of the original signal with the length of 75,000 out, the perform 32-time average filter processing on this original signal to obtain an ideal signal with LCR wave for residual stress measurement at the rail base, as shown in Figure 9b. A standard Gaussian white noise is superimposed on the entire original signal, and a high-frequency sinusoidal signal with a frequency of 5 MHz is superimposed on the LCR wave separately to construct a test signal containing noise and high-frequency information, as shown in Figure 9c. The SNR of the test signal is 4.3208 dB.
Coatings 2021, 11, x FOR PEER REVIEW 10 of 18 denoising ability of the combination of wavelet base and decomposition levels. The specific implementation method is shown in Figure 8. The reason for adding a high-frequency sinusoidal signal is to consider the nonlinear effect of LCR wave propagation in materials with residual stress [26]. The LCR wave contains high-frequency harmonic signal components.  The LCR wave signal (2.5 MHz) with a smaller amplitude and measuring the residual stress at the rail base is selected as the original signal for verification and analysis. As shown in Figure 9a, we can take the 10-40 μs part of the original signal with the length of 75,000 out, the perform 32-time average filter processing on this original signal to obtain an ideal signal with LCR wave for residual stress measurement at the rail base, as shown in Figure 9b. A standard Gaussian white noise is superimposed on the entire original signal, and a high-frequency sinusoidal signal with a frequency of 5 MHz is superimposed on the LCR wave separately to construct a test signal containing noise and high-frequency information, as shown in Figure 9c. The SNR of the test signal is 4.3208 dB.

Selection of the Optimal Wavelet Base and Decomposition Level of LCR Wave Signal
In the ultrasonic measurement of residual stress, according to the characteristics of the LCR wave signal, the selected wavelet base should have tight support in the time domain [27]. Besides, to ensure the local analysis ability of the wavelet base in the frequency domain, the wavelet base is also required to have a fast attenuation in the frequency domain. The better the correlation between the wavelet base and the signal, the more the wavelet transform can extract features of the signal, and the more accurate the analysis of the signal's features using the wavelet base [28]. Obviously, the ultrasonic LCR wave signal usually appears as a kind of waveform signal with an exponential decay in the time domain. Therefore, the selected wavelet base should also have exponential decay or approximate exponential decay in the time domain. When performing wavelet denoising on LCR wave signals, the distortion of the signal should be minimized, and a wavelet base with symmetry or approximate symmetry should be selected as far as possible. From the high-order vanishing moment characteristics of the ideal wavelet, it can be seen that the LCR wave signal in the ultrasonic signal should be highlighted in the denoising process, and the wavelet base should have a certain order of vanishing moments [29]. Among the common wavelets, the Daubechies, Symlets, Coiflets, and Biorthogonal wavelet families are suitable for ultrasonic signal analysis.
In this section, we will use the method of combining the above four wavelet functions and different decomposition levels to denoise the constructed noisy signal. According to the results before and after processing, find the optimal wavelet base and the best decomposition level. From the SNR results of the four wavelet denoising shown in Figure 10, it can be seen that sym8 can be used as the best wavelet base, and the best decomposition level is 8. The scaling function and wavelet function of sym8 are shown in Figure 11. It should be noted that the number of levels of wavelet decomposition and reconstruction is not the more the better. More levels will lose some details, while fewer levels will not be able to effectively remove noise.

Selection of the Optimal Wavelet Base and Decomposition Level of LCR Wave Signal
In the ultrasonic measurement of residual stress, according to the characteristics of the LCR wave signal, the selected wavelet base should have tight support in the time domain [27]. Besides, to ensure the local analysis ability of the wavelet base in the frequency domain, the wavelet base is also required to have a fast attenuation in the frequency domain. The better the correlation between the wavelet base and the signal, the more the wavelet transform can extract features of the signal, and the more accurate the analysis of the signal's features using the wavelet base [28]. Obviously, the ultrasonic LCR wave signal usually appears as a kind of waveform signal with an exponential decay in the time domain. Therefore, the selected wavelet base should also have exponential decay or approximate exponential decay in the time domain. When performing wavelet denoising on LCR wave signals, the distortion of the signal should be minimized, and a wavelet base with symmetry or approximate symmetry should be selected as far as possible. From the highorder vanishing moment characteristics of the ideal wavelet, it can be seen that the LCR wave signal in the ultrasonic signal should be highlighted in the denoising process, and the wavelet base should have a certain order of vanishing moments [29]. Among the common wavelets, the Daubechies, Symlets, Coiflets, and Biorthogonal wavelet families are suitable for ultrasonic signal analysis.
In this section, we will use the method of combining the above four wavelet functions and different decomposition levels to denoise the constructed noisy signal. According to the results before and after processing, find the optimal wavelet base and the best decomposition level. From the SNR results of the four wavelet denoising shown in Figure 10, it can be seen that sym8 can be used as the best wavelet base, and the best decomposition level is 8. The scaling function and wavelet function of sym8 are shown in Figure 11. It should be noted that the number of levels of wavelet decomposition and reconstruction is not the more the better. More levels will lose some details, while fewer levels will not be able to effectively remove noise.

Performance Verification of LSWPT for LCR Wave
In order to verify the effectiveness and advancement of the LSWPT method, WT, WPT, LSWT, and LSWPT methods are used to denoise the test signal. The wavelet base is sym8, and the decomposition level is 8. The soft thresholding (S) and hard thresholding (H) processing methods are used for threshold processing respectively. Four indicators including root mean square error (RMSE), SNR, peak relative error (PRE), and calculation time (T) are introduced to quantitatively evaluate the denoising signal, expressed as:

Performance Verification of LSWPT for LCR Wave
In order to verify the effectiveness and advancement of the LSWPT method, WT, WPT, LSWT, and LSWPT methods are used to denoise the test signal. The wavelet base is sym8, and the decomposition level is 8. The soft thresholding (S) and hard thresholding (H) processing methods are used for threshold processing respectively. Four indicators including root mean square error (RMSE), SNR, peak relative error (PRE), and calculation time (T) are introduced to quantitatively evaluate the denoising signal, expressed as: Figure 11. The sym8 wavelet scaling function and wavelet function.

Performance Verification of LSWPT for LCR Wave
In order to verify the effectiveness and advancement of the LSWPT method, WT, WPT, LSWT, and LSWPT methods are used to denoise the test signal. The wavelet base is sym8, and the decomposition level is 8. The soft thresholding (S) and hard thresholding (H) processing methods are used for threshold processing respectively. Four indicators including root mean square error (RMSE), SNR, peak relative error (PRE), and calculation time (T) are introduced to quantitatively evaluate the denoising signal, expressed as: In the above equations, x i andx i are respectively the sampled value of the original signal and the reconstructed value of denoised signal at time of i. N is the signal length. A 0 and A d are the peak value of the original signal and denoised signal, respectively. The higher the SNR and the smaller the RSME and PRE, it means that the denoised signal is closer to the real signal of the LCR wave, and the denoising has achieved better results. The denoising results of the WT, WPT, LSWT, and LSWPT methods are shown in Table 1. The results in Table 1 show that the four denoising methods based on wavelet analysis achieved the purpose of denoising well, and the SNRs are significantly improved. The calculation time of LSWT and LSWPT is shorter than that of traditional WT and WPT respectively, which reflects the advantages of the lifting scheme (LS) in denoising efficiency. Under the soft thresholding processing, both WT and WPT methods can effectively remove the noise of the LCR wave signal, as shown in Figure 12a,b. However, the LCR signal denoised by the WT method has some burrs affected by the high-frequency sinusoidal signal, while the WPT method effectively removes the high-frequency noise and makes the LCR signal smoother and closer to the ideal signal. Comparing Figure 12c,d, as well as the results in Table 1, it can be seen that under the hard thresholding processing, the WT and LSWT methods are ineffective against the interference of high-frequency noise, while the WPT and LSPT methods are very effective, which illustrates the advantages of wavelet packet denoising.

Ultrasonic Equipment Calibration and Residual Stress Measurement
It is necessary to calibrate the ultrasonic equipment, we can adopt an absolute calibration method to calibrate the ultrasonic testing equipment with a universal testing machine, as shown in Figure 13. The U75V rail steel tensile test specimen is directly removed from the rail by wire cutting for preparation. We performed uniaxial tensile tests on U75V specimens at room temperature and obtained different tensile stresses and corresponding strains of the specimens relative to the free state (assumed to be a zero-stress state). At the same time, the change of TOF is obtained according to the time-domain signal of the LCR wave under different tensile stresses, as shown in Figure 14. Then calculate the correlation coefficient between these LCR wave signals to obtain the time difference of each LCR wave signal. According to Equation (12), the stress coefficient is 10.149 MPa/ns, as shown in Figure 15. When the ultrasonic equipment is calibrated, the stress can be calculated based on this coefficient and the change in TOF, and compared with the known tensile stress, so as to achieve absolute calibration of the ultrasonic equipment. The universal testing machine can accurately obtain the stress and strain of the specimen under any different tensile stress within the elastic deformation range. At the same time, by using an oscilloscope with a sampling rate of 1 GHz or higher to collect LCR wave signals, it is possible to record and distinguish small changes of TOF very well. Therefore, this absolute calibration method can evaluate the effectiveness of the ultrasonic residual stress measurement method.
The calculation time of LSWT and LSWPT is shorter than that of traditional WT and WPT respectively, which reflects the advantages of the lifting scheme (LS) in denoising efficiency. Under the soft thresholding processing, both WT and WPT methods can effectively remove the noise of the LCR wave signal, as shown in Figure 12a,b. However, the LCR signal denoised by the WT method has some burrs affected by the high-frequency sinusoidal signal, while the WPT method effectively removes the high-frequency noise and makes the LCR signal smoother and closer to the ideal signal. Comparing Figure  12c,d, as well as the results in Table 1, it can be seen that under the hard thresholding processing, the WT and LSWT methods are ineffective against the interference of highfrequency noise, while the WPT and LSPT methods are very effective, which illustrates the advantages of wavelet packet denoising.

Ultrasonic Equipment Calibration and Residual Stress Measurement
It is necessary to calibrate the ultrasonic equipment, we can adopt an absolute calibration method to calibrate the ultrasonic testing equipment with a universal testing machine, as shown in Figure 13. The U75V rail steel tensile test specimen is directly removed from the rail by wire cutting for preparation. We performed uniaxial tensile tests on U75V specimens at room temperature and obtained different tensile stresses and corresponding strains of the specimens relative to the free state (assumed to be a zero-stress state). At the same time, the change of TOF is obtained according to the time-domain signal of the LCR wave under different tensile stresses, as shown in Figure 14. Then calculate the coefficient between these LCR wave signals to obtain the time difference of wave signal. According to Equation (12), the stress coefficient is 10.149 MPa/ns in Figure 15. When the ultrasonic equipment is calibrated, the stress can be based on this coefficient and the change in TOF, and compared with the kno stress, so as to achieve absolute calibration of the ultrasonic equipment. The testing machine can accurately obtain the stress and strain of the specimen und ferent tensile stress within the elastic deformation range. At the same time, b oscilloscope with a sampling rate of 1 GHz or higher to collect LCR wave s possible to record and distinguish small changes of TOF very well. Therefore lute calibration method can evaluate the effectiveness of the ultrasonic resi measurement method.   Similarly, we can add noise to the LCR wave signal (1 MHz) of the rail base as shown in Figure 7a, and then apply the LSWPT method for denoising processing to obtain the denoised signal shown in Figure 15. Cross-correlation calculations are performed on the noised signal and the denoised signal with the LCR wave signal of 0 MPa, respectively.
Amplitude/V Universal testing machine The corresponding residual stresses are respectively 196.4756 MPa and 192.416 MPa, with an error of 2.11%, as shown in Figure 15. Therefore, by performing LSWPT denoising processing on the LCR signal, the accuracy of residual stress measurement can be effectively improved. In order to evaluate the effectiveness of the ultrasonic measurement method of residual stress, we can use the X-ray method to measure the surface residual stress of the U75V tensile specimen, as shown in Figure 16, for comparison and verification. Due to the limitation of testing conditions, we cannot directly perform X-ray measurement on the tensile specimen on the universal testing machine. As shown in Figure 16a, we can artificially create different stresses on the tensile specimen surface. Simultaneously applying different pre-tightening forces to the bolts at both ends of the tensile specimen, the specimen produces different bending deformations. Theoretical analysis shows that different tensile stresses will appear on the top of the specimen. In order to reduce or ignore the influence of the change in sound path distance due to surface deformation, an ultrasonic probe system with a relatively short sound path distance should be used to measure the stress on the top surface. (  Similarly, we can add noise to the LCR wave signal (1 MHz) of the rail base as shown in Figure 7a, and then apply the LSWPT method for denoising processing to obtain the denoised signal shown in Figure 15. Cross-correlation calculations are performed on the noised signal and the denoised signal with the LCR wave signal of 0 MPa, respectively. The corresponding residual stresses are respectively 196.4756 MPa and 192.416 MPa, with an error of 2.11%, as shown in Figure 15. Therefore, by performing LSWPT denoising processing on the LCR signal, the accuracy of residual stress measurement can be effectively improved.
In order to evaluate the effectiveness of the ultrasonic measurement method of residual stress, we can use the X-ray method to measure the surface residual stress of the U75V tensile specimen, as shown in Figure 16, for comparison and verification. Due to the limitation of testing conditions, we cannot directly perform X-ray measurement on the tensile specimen on the universal testing machine. As shown in Figure 16a, we can artificially create different stresses on the tensile specimen surface. Simultaneously applying different pre-tightening forces to the bolts at both ends of the tensile specimen, the specimen produces different bending deformations. Theoretical analysis shows that different tensile stresses will appear on the top of the specimen. In order to reduce or ignore the influence of the change in sound path distance due to surface deformation, an ultrasonic probe system with a relatively short sound path distance should be used to measure the stress on the top surface. create different stresses on the tensile specimen surface. Simultaneously applying different pre-tightening forces to the bolts at both ends of the tensile specimen, the specimen produces different bending deformations. Theoretical analysis shows that different tensile stresses will appear on the top of the specimen. In order to reduce or ignore the influence of the change in sound path distance due to surface deformation, an ultrasonic probe system with a relatively short sound path distance should be used to measure the stress on the top surface.
(a) (b) Figure 16. The surface stress measurement for U75V rail steel tensile specimen by using (a) ultrasonic LCR wave method; and (b) X-ray method. Figure 16. The surface stress measurement for U75V rail steel tensile specimen by using (a) ultrasonic LCR wave method; and (b) X-ray method.
From the results of the two measurement methods shown in Figure 17, it can be seen that the stress obtained by the X-ray measurement method is larger than that of the ultrasonic measurement method, but the stress change trend obtained by the two measurement methods is generally consistent. This shows that the ultrasonic measurement method is an effective residual stress measurement method. The main reason for the small difference in the measurement results is that the measurement benchmarks are different. The X-ray method measures the residual stress of a certain point, while the ultrasonic method is a relative measurement method, which measures the average stress of an ultrasonic wave propagation area. As we all know, it is very difficult to make a specimen without residual stress. It is believed that when the bolt pre-tightening force is 0, that is, when the specimen does not undergo bending deformation, there is no stress on the surface of the specimen. This state is used as a benchmark for the ultrasonic measurement of residual stress. From the results of the two measurement methods shown in Figure 17, it can be seen that the stress obtained by the X-ray measurement method is larger than that of the ultrasonic measurement method, but the stress change trend obtained by the two measurement methods is generally consistent. This shows that the ultrasonic measurement method is an effective residual stress measurement method. The main reason for the small difference in the measurement results is that the measurement benchmarks are different. The X-ray method measures the residual stress of a certain point, while the ultrasonic method is a relative measurement method, which measures the average stress of an ultrasonic wave propagation area. As we all know, it is very difficult to make a specimen without residual stress. It is believed that when the bolt pre-tightening force is 0, that is, when the specimen does not undergo bending deformation, there is no stress on the surface of the specimen. This state is used as a benchmark for the ultrasonic measurement of residual stress.

Conclusions
The ultrasonic LCR wave method is an effective method of residual stress measurement. The research presented in this paper focused on the denoising of LCR wave signals for rail surface residual stress measurement. The denoising methods based on WT, WPT, LSWT, and LSWPT were utilized for a structured noisy signal respectively. Combined with the experimental results and discussion, the following conclusions are drawn:

Conclusions
The ultrasonic LCR wave method is an effective method of residual stress measurement. The research presented in this paper focused on the denoising of LCR wave signals for rail surface residual stress measurement. The denoising methods based on WT, WPT, LSWT, and LSWPT were utilized for a structured noisy signal respectively. Combined with the experimental results and discussion, the following conclusions are drawn: