# Location Detection and Numerical Simulation of Guided Wave Defects in Steel Pipes
## 4 Pipeline Crack Location Algorithm and Quantitative Analysis  
### Crack Location  
1. Wavelet transform Wavelet transform: \[\gamma(s,\tau)=\int f(t)\psi_{\mathrm{ST}}(t)dt\] In the formula, \(s\) is scale and \(\tau\) is translation. The window function needs to satisfy the following: \[\int_{-\infty}^{+\infty}\frac{\mid\psi(\omega)\mid^{2}}{\mid\omega\mid}\mathrm{ d}\omega<+\infty\] (10) If \(\psi(\omega)\) of \(\psi(t)\) Fourier transform satisfies Equation (10), \(\psi(t)\) can be used as the basis function of Daubechies wavelet. Based on the simulation results in Section 3.3.2, the aperiodic echo signals received from crack-free and cracked pipelines are plotted in Figures 9a and 9b, respectively. Figure 9c displays the residual signal for both, and the defect is identified based on its characteristics.  
Time-frequency analysis of the residual signal at a 60 kHz excitation frequency is performed using wavelet transform to obtain the time-frequency diagrams of the crack-free and cracked pipeline waveforms. The characteristics of the defect signal near 0.0015 s after the difference between them are shown in Figure 10.  
2. Hilbert transform Hilbert transform: \[\hat{x}(t)=H[x(t)]=\frac{1}{\pi}\int_{-\infty}^{\infty}\frac{x(\tau)}{t-\tau} \mathrm{d}\tau\] The complex signal \(\hat{x}(t)\) is an analytic signal of (t). The time domain diagram of the analytic signal generated by Hilbert transform in Figure 10 is shown in Figure 11.  
Figure 9: (a) Waveform of a crack-free pipeline; (b) waveform of a cracked pipeline; (c) residual signal data waveform.  
At \(1.5\times 10^{-3}\) s, the first reflected signal when the guided wave encounters the crack is the head wave signal, which carries the position information of the crack. The crack location is determined by the receiving time of the head wave signal and the group velocity of UGW propagation.
3. Positioning calculation At different sampling points, according to the group velocity and the first wave packet positioning time obtained by Hilbert transform, the actual position of the crack is determined by calculating the distance between the crack and the excitation-receiving point. The calculation results are shown in Table 1.  
Method for calculating crack position \(X\) in Table 1:  
\[\mathbf{X}=\mathbf{tv}\]  
where \(t\) is the positioning time of the first wave packet and \(v\) is the group velocity.  
The defect position is determined by comparing the positions of different sampling points, and the relative errors are all less than 1%, indicating that the positioning accuracy is high. Compared to the combination of wavelet and Hilbert transform, the algorithm using wavelet transform alone results in larger errors, which hinder accurate defect localization.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \begin{tabular}{c} **Sampling** \\ **Point** \\ **Position (m)** \\ \end{tabular} & \begin{tabular}{c} **Speed (m/s)** \\ **Position (m)** \\ \end{tabular} & \begin{tabular}{c} **Actual** \\ **Position (m)** \\ \end{tabular} & \begin{tabular}{c} **Positioning** \\ **Position (m)** \\ \end{tabular} & \begin{tabular}{c} **Positioning** \\ **Error (m)** \\ \end{tabular} & \
\begin{tabular}{c} **Relative Error** \\ **Wavelet-Hilbert** \\ **Transform** \\ **Algorithm** \\ \end{tabular} &
\begin{tabular}{c} **Relative Error** \\ **of Wavelet** \\ **Transform** \\ **Algorithm** \\ \end{tabular} \\ \hline
1.40 & 3225.8 & 3.10 & 0.0015 & 3.12 & 0.02 & 0.6\% & 2.1\% \\
2.00 & 3225.8 & 3.10 & 0.0013 & 3.09 & 0.01 & 0.3\% & 1.2\% \\
2.60 & 3225.8 & 3.10 & 0.0011 & 3.07 & 0.03 & 0.9\% & 2.5\% \\ \hline \hline \end{tabular}
\end{table}
Table 1: Calculation of crack location.  
Figure 11: Time domain diagram of Hilbert transform crack signal.  
Figure 10: Time–frequency diagram of a wavelet transform signal.