Quantitative Detection of Pipeline Cracks Based on Ultrasonic Guided Waves and Convolutional Neural Network

In this study, a quantitative detection method of pipeline cracks based on a one-dimensional convolutional neural network (1D-CNN) was developed using the time-domain signal of ultrasonic guided waves and the crack size of the pipeline as the input and output, respectively. Pipeline ultrasonic guided wave detection signals under different crack defect conditions were obtained via numerical simulations and experiments, and these signals were input as features into a multi-layer perceptron and one-dimensional convolutional neural network (1D-CNN) for training. The results revealed that the 1D-CNN performed better in the quantitative analysis of pipeline crack defects, with an error of less than 2% in the simulated and experimental data, and it could effectively evaluate the size of crack defects from the echo signals under different frequency excitations. Thus, by combining the ultrasonic guided wave detection technology and CNN, a quantitative analysis of pipeline crack defects can be effectively realized.


Introduction
Owing to its evident advantages, including minimal environmental impacts, large carrying capacities, high efficiencies, and low costs, pipeline transportation is expected to play an increasingly important role in future transportation engineering [1].However, in pipeline engineering, the integrity and safety of pipeline structures form the premise of smooth transportation.In their absence, a loss of transported materials caused by damaged pipeline structures is expected to not only affect production and daily life, causing huge economic losses, but also exert a huge impact on the environment, even leading to major safety risks such as collapse and explosion [2,3].Therefore, the nondestructive testing of pipeline structures is of considerable significance.In this regard, ultrasonic guided wave technology is widely used in long-distance pipeline inspection owing to its advantages, such as easy excitation, a long propagation distance, wide coverage, high detection accuracy, and low detection cost [4].However, owing to the complex characteristics of ultrasonic guided waves, such as multimode and dispersion, and the influence of noise, quantitative evaluations of defect echoes in guided wave signals represent a significant challenge [5,6].
Interestingly, the majority of previous research on ultrasonic guided waves focuses on the localization and qualitative analysis of defects, relying on the extraction of a series of characteristic parameters from the original signals [7,8].By contrast, quantitative research on defects directly based on the original guided waves is rather limited.In particular, only a few quantitative studies have been conducted on defects by directly using the original guided wave signals.Zhan et al. [7] used a deep learning approach to classify and detect pipe welds in noisy environments.Li et al. [8] used the CNN-LSTM hybrid model to classify pipeline defects.This research has proposed a solution for classifying pipeline defects, Sensors 2024, 24, 1204 2 of 17 but it has not thoroughly explored the quantification of pipeline damage.Quantifying pipeline damage often requires a large amount of data to perform a regression analysis across the full range of damage.Determining its impact on simulation and experimental data regarding working condition diversity is a considerable challenge.Davies et al. [9] analyzed the relationship between defect sizes of cracks and small apertures and the defect echo amplitude when evaluating synthetic path image focusing and source imaging methods.Zheng [10] used a matching pursuit algorithm to quantitatively analyze the axial defect size of a pipeline.Both studies employed quantitative methods based on theoretical calculations, which may be subject to errors after environmental changes.Neural networks trained on real-time data can learn to adapt to specific environmental situations with greater compatibility.Li [11] utilized a 2D blind convolution method to estimate the dimensions of axial defects using multiple sets of data obtained from an axial sensor array.Li [12] proposed a quantitative reconstruction method for ultrasonic guided wave defects based on deep learning.This was achieved by combining the theoretical method of shear wave quantitative reconstruction of plate thinning defects, wave number space domain transform, and a convolutional neural network (CNN) using local fusion.Acciani et al. [13] used wavelet transforms and neural networks to quantitatively evaluate pipe surface damage.Preprocessing ultrasonic guided wave signals is necessary for these methods, which may exclude significant information from the original signals.A CNN network that extracts information directly from the ultrasound-guided wave response signal is highly effective in avoiding this issue.Huang [14] proposed a damage detection method based on a CNN-LSTM network for laser ultrasonic guided wave scanning detection.Miorelli et al. [15] proposed an automatic method for localizing and quantifying structural health monitoring defects based on guided wave imaging by combining convolutional neural networks.Yin et al. [16] automated the detection of pipeline defects using closed-circuit television (CCTV) and deep learning.Both studies relied on structural damage imaging and used training samples directly derived from 2D images.This method is computationally demanding and relies on image-based recognition, which can make predicting results challenging due to the effects of image imaging.The use of CNNs for quantitative defect identification can effectively prevent the masking of critical information and reduce the technical difficulty of engineering applications.
Neural network-based algorithms have made it more convenient, efficient, and accurate to quantitatively identify structural damage using ultrasonic guided wave technology.With this background, this paper proposes a method for the end-to-end quantitative characterization of pipeline defects by directly inputting the original ultrasonic guided waves signal into a network model without any preprocessing.The goal of the method is to predict the angles of radial defects on the pipe by regressing the angles of the defects directly to the prediction.To achieve this task, ceramic piezoelectric sheets are used to line a section of the pipe symmetrically at equal intervals for the excitation and reception of ultrasonic guided waves.The received signals are then used as inputs for a neural network for feature learning.The size of the penetrating crack in the pipeline is quantified using the defect damage angle, and the amount of crack damage in the ultrasonic guided wave signal is determined using a neural network method.By arranging the ceramic piezoelectric sheet symmetrically and in the same direction on the pipe, it is possible to excite ultrasonic guided waves of L mode.This mode is more sensitive to circumferential cracks in the pipe, making it better suited for the quantitative characterization of such cracks.

Defect Quantification Method Based on Ultrasonic Guided Waves and CNN
An Artificial Neural Network (ANN) represents a type of simulation and approximation of a biological neural network.It is an adaptive nonlinear dynamic network system composed of a large number of neurons connected through mutual connections, and it is primarily composed of input, hidden, and output layers [17].The most basic unit of an ANN is a neuron, which can be expressed as Equation (1).
where x i denotes the input n features in a neuron, ω i denotes the weight value of the input feature x i connected to the neuron, b denotes the internal bias of the neuron, y denotes the output value of the neuron, and f (. . . . . . denotes the activation function.The more common activation functions include the rectified linear unit (ReLU) [18], Sigmoid, Tanh(x), and radial basis functions [19].According to the findings of Acciani [11], the ReLU function is directly selected as the activation function for this study.
A CNN is a typical deep learning method developed in recent years, with wide applications in fields such as pattern recognition and medical engineering [20].The basic structure of a CNN consists of input, convolutional, pooling, fully connected, and output layers [21].Because each neuron of the output feature surface in the convolutional layer is locally connected to its input, and the input value of the neuron is obtained based on the weighted sum of the corresponding connection weight and the local input plus the bias value, this process is equivalent to the convolution process, from which its name is derived [22].CNNs are primarily used for the feature recognition of two-dimensional images, whereas 1D-CNNs have only one dimension; therefore, they are widely used for feature recognition and time-series extraction.Although a 1D-CNN only has a single dimension, it demonstrates the same advantages as a CNN [14].Specifically, CNNs not only present the advantages of traditional neural networks, such as a strong self-learning ability and good adaptability, but also the advantages of weight sharing and easy model training [23].This study employs a CNN model, illustrated in Figure 1, which comprises an input layer, two convolutional and pooling layers, and two fully connected and output layers.

Defect Quantification Method Based on Ultrasonic Guided Waves and CNN
An Artificial Neural Network (ANN) represents a type of simulation and approximation of a biological neural network.It is an adaptive nonlinear dynamic network system composed of a large number of neurons connected through mutual connections, and it is primarily composed of input, hidden, and output layers [17].The most basic unit of an ANN is a neuron, which can be expressed as Equation (1).

𝑦 = 𝑓(𝜔 𝑥 + 𝜔 𝑥 + 𝜔 𝑥 … … 𝜔 𝑥 + 𝑏)
(1) where  denotes the input n features in a neuron,  denotes the weight value of the input feature  connected to the neuron,  denotes the internal bias of the neuron,  denotes the output value of the neuron, and (… … ) denotes the activation function.The more common activation functions include the rectified linear unit (ReLU) [18], Sigmoid, Tanh(x), and radial basis functions [19].According to the findings of Acciani [11], the ReLU function is directly selected as the activation function for this study.
A CNN is a typical deep learning method developed in recent years, with wide applications in fields such as pattern recognition and medical engineering [20].The basic structure of a CNN consists of input, convolutional, pooling, fully connected, and output layers [21].Because each neuron of the output feature surface in the convolutional layer is locally connected to its input, and the input value of the neuron is obtained based on the weighted sum of the corresponding connection weight and the local input plus the bias value, this process is equivalent to the convolution process, from which its name is derived [22].CNNs are primarily used for the feature recognition of two-dimensional images, whereas 1D-CNNs have only one dimension; therefore, they are widely used for feature recognition and time-series extraction.Although a 1D-CNN only has a single dimension, it demonstrates the same advantages as a CNN [14].Specifically, CNNs not only present the advantages of traditional neural networks, such as a strong self-learning ability and good adaptability, but also the advantages of weight sharing and easy model training [23].This study employs a CNN model, illustrated in Figure 1, which comprises an input layer, two convolutional and pooling layers, and two fully connected and output layers.In order to compare the prediction performance of different types of neural networks, this study architects a multilayer perceptron (MLP) neural network model, as shown in In order to compare the prediction performance of different types of neural networks, this study architects a multilayer perceptron (MLP) neural network model, as shown in Figure 2. It consists of an input layer of 1000 sets of guided wave signals, a first hidden layer of 128 neurons, a second hidden layer of 64 neurons, and an output layer.
The neural networks were trained using computers equipped with R9-5900HS processors and RTX-3050ti graphics cards to prevent external factors from affecting the detection results.The neural networks were trained using several program libraries, including Pytorch, NumPy, Pandas, and Scikit-learn.Additionally, the Adaptive Moment Estimation optimization algorithm was utilized.layer of 128 neurons, a second hidden layer of 64 neurons, and an output layer.
The neural networks were trained using computers equipped with R9-5900HS processors and RTX-3050ti graphics cards to prevent external factors from affecting the detection results.The neural networks were trained using several program libraries, including Pytorch, NumPy, Pandas, and Scikit-learn.Additionally, the Adaptive Moment Estimation optimization algorithm was utilized.The convolution layer performs a valid convolution operation using a 3 × 1 kernel, and the convolution operation is like a mathematical operation on two functions, which produces the mapping relationship of the third function, and its mathematical expression is Equation (2). and  represent two different mapping functions.The data pass through two convolutional layers and two fully connected layers before outputting the final prediction.
The time-domain signals of ultrasonic guided waves were used as direct inputs in our quantitative characterizations of pipeline crack defects.The input signal range included the excitation wave, defect echo, and first-end face echo.In the numerical simulation stage, the displacement signal within this period was directly specified in the analysis step, and 1000 groups of amplitude signals were collected as data.During the acquisition of experimental data, the oscilloscope was set to a sampling rate of 5 M/S, resulting in a total of 10 K sampled points.To decrease the calculation time of the neural network model, each experimental signal was divided into seven data groups, each with a length of 1000.The division started from the 800th point, which was where the excitation of ultrasonic guided wave signals appeared, and ended at the 8000th point, which was the end of the first end-face echo, as shown in Figure 3.This method can increase the diversity of the data as much as possible on the basis of extracting real guided wave information.The convolution layer performs a valid convolution operation using a 3 × 1 kernel, and the convolution operation is like a mathematical operation on two functions, which produces the mapping relationship of the third function, and its mathematical expression is Equation (2).f and g represent two different mapping functions.The data pass through two convolutional layers and two fully connected layers before outputting the final prediction. (2) The time-domain signals of ultrasonic guided waves were used as direct inputs in our quantitative characterizations of pipeline crack defects.The input signal range included the excitation wave, defect echo, and first-end face echo.In the numerical simulation stage, the displacement signal within this period was directly specified in the analysis step, and 1000 groups of amplitude signals were collected as data.During the acquisition of experimental data, the oscilloscope was set to a sampling rate of 5 M/S, resulting in a total of 10 K sampled points.To decrease the calculation time of the neural network model, each experimental signal was divided into seven data groups, each with a length of 1000.The division started from the 800th point, which was where the excitation of ultrasonic guided wave signals appeared, and ended at the 8000th point, which was the end of the first end-face echo, as shown in Figure 3.This method can increase the diversity of the data as much as possible on the basis of extracting real guided wave information.
The construction of the 1D-CNN in this paper required the following hyperparameters to be determined: the number of nodes in the hidden layer, the batch size for testing, the random seeds, the learning rate, and the number of training generations.For the selection of the number of hidden nodes, empirical Formulas (3)-( 5) were used to calculate and set the number of hidden nodes with the best results.n is the number of nodes in the input layer; l is the number of nodes in the output layer; m is the number of hidden nodes; and a is a constant between 1 and 10.The remaining hyperparameters were determined through empirical formulas, which was carried out near the empirical values, and the optimal training results were selected as the parameters.The construction of the 1D-CNN in this paper required the following hyperparameters to be determined: the number of nodes in the hidden layer, the batch size for testing, the random seeds, the learning rate, and the number of training generations.For the selection of the number of hidden nodes, empirical Formulas (3)-( 5) were used to calculate and set the number of hidden nodes with the best results. is the number of nodes in the input layer;  is the number of nodes in the output layer;  is the number of hidden nodes; and  is a constant between 1 and 10.The remaining hyperparameters were determined through empirical formulas, which was carried out near the empirical values, and the optimal training results were selected as the parameters.

𝑚 = √𝑛 + 𝑙 + 𝑎
(3) Determining the hyperparameters is crucial for evaluating network performance.Excellent hyperparameters correspond to excellent performance indicators and determine the success of the network model.
To set the hyperparameters of the neural network model, certain tricks for modulating these hyperparameters were obtained from the literature [24].The neural network model architecture adopted a structure of 2-3 hidden layers, and ReLU was used as the activation function.For the simulation and experimental data, a multi-layer perceptron (MLP) and CNN were used for training and comparison, respectively.The root mean square error (RMSE), mean absolute percentage error (MAPE), and coefficient of determination (R-square) were used to comprehensively evaluate the regression performance of the neural networks.Note that the RMSE and MAPE reflect the error between the predicted and actual values of the network.The RMSE increases with larger errors, while the MAPE decreases.The R-square value indicates the quality of the model fit; the closer it is to one, the better the fit.Based on these parameters, the advantages and disadvantages of the two different neural networks in the quantitative prediction of pipeline defects were comprehensively compared.The expressions for the above parameters are shown in ( 6), (7), and (8).Here,  represents the true value,  represents the predicted value, and  represents the number of test samples.Determining the hyperparameters is crucial for evaluating network performance.Excellent hyperparameters correspond to excellent performance indicators and determine the success of the network model.
To set the hyperparameters of the neural network model, certain tricks for modulating these hyperparameters were obtained from the literature [24].The neural network model architecture adopted a structure of 2-3 hidden layers, and ReLU was used as the activation function.For the simulation and experimental data, a multi-layer perceptron (MLP) and CNN were used for training and comparison, respectively.The root mean square error (RMSE), mean absolute percentage error (MAPE), and coefficient of determination (Rsquare) were used to comprehensively evaluate the regression performance of the neural networks.Note that the RMSE and MAPE reflect the error between the predicted and actual values of the network.The RMSE increases with larger errors, while the MAPE decreases.The R-square value indicates the quality of the model fit; the closer it is to one, the better the fit.Based on these parameters, the advantages and disadvantages of the two different neural networks in the quantitative prediction of pipeline defects were comprehensively compared.The expressions for the above parameters are shown in ( 6), (7), and (8).Here, ŷ represents the true value, y represents the predicted value, and n represents the number of test samples.

Pipeline Modeling
The JMatPro (Version 7.0) and Abaqus (Version 6.16-1) software were used for the numerical simulations.The pipe used in the experiment was a 304 seamless steel pipe with a length of l = 3 m, an outer diameter of d = 60 mm, and a pipe wall thickness of t = 2 mm.To ensure consistency between the simulation and experiment, the JMatPro software was used to predict the performance parameters of the pipeline material to be selected.The density of the material used in the experiment was obtained as ρ = 7.855 g/cm 3 , Young's modulus was obtained as E = 211.3GPa, Poisson's ratio was obtained as ν = 0.2969, and the data corresponding to the material performance parameters were input into the Abaqus software.Simultaneously, a pipe model with a length of 3 m, an outer diameter of 60 mm, and a wall thickness of 2 mm was established using the Abaqus software, and the dynamic display analysis method was used to perform the calculation.
To conveniently select the central frequency of the excitation signal, the dispersion curve of the simulated pipeline was drawn using the Disperse (Version 2.0.16c)software, as depicted in Figure 4.According to the dispersion curve, the group velocity and phase velocity of the guided wave signal tended to be stable in the L (0, 2) mode near the central frequency of 70 kHz, and the wave velocity was approximately 5.5 km/s; hence, an excitation signal with a central frequency of 70 kHz was used to generate a single-mode guided wave.
The JMatPro (Version 7.0) and Abaqus (Version 6.16-1) software were used for the numerical simulations.The pipe used in the experiment was a 304 seamless steel pipe with a length of  = 3 m, an outer diameter of  = 60 mm, and a pipe wall thickness of  = 2 mm.To ensure consistency between the simulation and experiment, the JMatPro software was used to predict the performance parameters of the pipeline material to be selected.The density of the material used in the experiment was obtained as  = 7.855 g/cm , Young's modulus was obtained as  = 211.3 GPa, Poisson's ratio was obtained as  = 0.2969, and the data corresponding to the material performance parameters were input into the Abaqus software.Simultaneously, a pipe model with a length of 3 m, an outer diameter of 60 mm, and a wall thickness of 2 mm was established using the Abaqus software, and the dynamic display analysis method was used to perform the calculation.
To conveniently select the central frequency of the excitation signal, the dispersion curve of the simulated pipeline was drawn using the Disperse (Version 2.0.16c)software, as depicted in Figure 4.According to the dispersion curve, the group velocity and phase velocity of the guided wave signal tended to be stable in the L (0, 2) mode near the central frequency of 70 kHz, and the wave velocity was approximately 5.5 km/s; hence, an excitation signal with a central frequency of 70 kHz was used to generate a single-mode guided wave.In this study, a hexahedral structured mesh was used for the non-defective part of the pipeline, and a hexahedral swept mesh was used for the defective part.Generally, to control the propagation error of a waveform, the presence of multiple elements in one wavelength is essential, and the grid size of the axial elements should satisfy the conditions in Equation ( 9).In this study, a hexahedral structured mesh was used for the non-defective part of the pipeline, and a hexahedral swept mesh was used for the defective part.Generally, to control the propagation error of a waveform, the presence of multiple elements in one wavelength is essential, and the grid size of the axial elements should satisfy the conditions in Equation (9).
where: l e : the axial grid cell length; C p : the phase velocity of the guided wave; f : the frequency of the guided wave.
Based on the calculations, the size of the largest grid axial element was found to be approximately 7 mm.To ensure that the number of grids in the global mesh generation was an integer, the global mesh size was finally determined to be 5 mm.Considering that the gradient of the lateral section damage angle growth in the numerical simulation was one, and the increment of its reaction in the mesh size was approximately 0.5 mm, the mesh size was locally encrypted to 0.5 mm in the defective part (Figure 5).Based on the calculations, the size of the largest grid axial element was found to be approximately 7 mm.To ensure that the number of grids in the global mesh generation was an integer, the global mesh size was finally determined to be 5 mm.Considering that the gradient of the lateral section damage angle growth in the numerical simulation was one, and the increment of its reaction in the mesh size was approximately 0.5 mm, the mesh size was locally encrypted to 0.5 mm in the defective part (Figure 5).To facilitate grid division when setting defects, the lateral section damage angle was adopted as the defect measurement index (Figure 6).For this, a pipeline model with a lateral section damage angle of 0-180° was established with a gradient of one.In total, we had 181 models.Notably, this type of model only considers penetrating cracks in the pipeline.Considering the pipeline loss along the crack-depth direction, the number of models can be increased in multiple ways.Meanwhile, considering the fact that the crack depth of non-penetrating cracks cannot be accurately measured and controlled in the experimental stage, the quantification of non-penetrating cracks was not considered in this study.To facilitate grid division when setting defects, the lateral section damage angle was adopted as the defect measurement index (Figure 6).For this, a pipeline model with a lateral section damage angle of 0-180 • was established with a gradient of one.In total, we had 181 models.Notably, this type of model only considers penetrating cracks in the pipeline.Considering the pipeline loss along the crack-depth direction, the number of models can be increased in multiple ways.Meanwhile, considering the fact that the crack depth of non-penetrating cracks cannot be accurately measured and controlled in the experimental stage, the quantification of non-penetrating cracks was not considered in this study.To ensure that the complete waveform image, including the excitation wave, defect echo, and first-end face echo, could be observed in the analysis time, the analysis step time was required to meet the conditions in Equation (10).

𝑇 ＞ 2𝐿
(10) where:  -the analysis step time; -the length of the pipe;  -the group velocity of the guided wave.

Excitation Signal
The excitation signal was a 10-cycle sinusoidal signal modulated by a cosine function with a central frequency of 70 kHz, as depicted in Figure 7.This signal energy appeared To ensure that the complete waveform image, including the excitation wave, defect echo, and first-end face echo, could be observed in the analysis time, the analysis step time was required to meet the conditions in Equation (10).
where: T s -the analysis step time; L-the length of the pipe; C g -the group velocity of the guided wave.

Excitation Signal
The excitation signal was a 10-cycle sinusoidal signal modulated by a cosine function with a central frequency of 70 kHz, as depicted in Figure 7.This signal energy appeared to be more concentrated near the central frequency, which is conducive to signal identification.The signal function expression is given in Equation ( 11) [25].
where: f c -the center frequency of the excitation signal; n-the number of cycles.

Defect Quantification with ANN
The numerical simulation results indicated the presence of 181 groups of guided wave signals.The data were divided into training, testing, and validation sets in a ratio of 6:2:2.As stated, a 1D-CNN was used to learn these data and compare the performance with the traditional MLP network.To reduce the training time of the network, the entire guided wave signal was arranged in 1000 groups of characteristic values to be input into the network according to the time sequence, and the damage angle of the crack section corresponding to the guided wave signal was considered as an output value.The RMSE, MAPE, and R-square values were used to evaluate the regression performance of the neural networks.
As stated, a 1D-CNN was used to learn the simulation data, and the ReLU function was used as the activation function.The loss curves and training results are indicated in Figure 8.The results for the regression performance indicators of the model are as follows: RMSE = 0.948, MAPE = 0.015, and R-square = 0.999.The regression performance indexes of the model revealed that the regression performance of the 1D-CNN model was better, the error between the prediction results and the real section damage angle was approximately 0.9°, and the error was less than 0.5%.The loss curve and prediction results indicate the presence of some overfitting in the model.The results for the regression performance indicators of the MLP model are as follows: RMSE = 1.17,MAPE = 0.014, and Rsquare = 0.999.The regression performance indexes of the model indicated that the regression performance of the MLP model was excellent, the error between the prediction results and real section damage angle was approximately 1.2°, and the error was less than 0.8%, and its parameter characterization shows that its model prediction performance is not as good as that of the 1D-CNN model.

Defect Quantification with ANN
The numerical simulation results indicated the presence of 181 groups of guided wave signals.The data were divided into training, testing, and validation sets in a ratio of 6:2:2.As stated, a 1D-CNN was used to learn these data and compare the performance with the traditional MLP network.To reduce the training time of the network, the entire guided wave signal was arranged in 1000 groups of characteristic values to be input into the network according to the time sequence, and the damage angle of the crack section corresponding to the guided wave signal was considered as an output value.The RMSE, MAPE, and R-square values were used to evaluate the regression performance of the neural networks.
As stated, a 1D-CNN was used to learn the simulation data, and the ReLU function was used as the activation function.The loss curves and training results are indicated in Figure 8.The results for the regression performance indicators of the model are as follows: RMSE = 0.948, MAPE = 0.015, and R-square = 0.999.The regression performance indexes of the model revealed that the regression performance of the 1D-CNN model was better, the error between the prediction results and the real section damage angle was approximately 0.9 • , and the error was less than 0.5%.The loss curve and prediction results indicate the presence of some overfitting in the model.The results for the regression performance indicators of the MLP model are as follows: RMSE = 1.17,MAPE = 0.014, and R-square = 0.999.The regression performance indexes of the model indicated that the regression of the model was excellent, the error between the prediction results and real section damage angle was approximately 1.2 • , and the error was less than 0.8%, and its parameter characterization shows that its model prediction performance is not as good as that of the 1D-CNN model.To clarify whether the model could effectively predict the section damage angle corresponding to the defect echo signal when the guided wave signal at the defect echo was input into the neural network as a feature in the simulation stage, 120 groups of data at the defect echo were extracted from the original simulation data as feature inputs (Figure 9) to the neural network.Following this, the regression effect was compared with that of the entire guided wave signal as a feature input to the neural network.Table 1 summarizes the final evaluation results for each parameter of the neural network models.In this table, MLP denotes the performance index of the MLP when the fullsection guided wave signal is used as the feature input, while 120-MLP represents the performance index of the MLP when the guided wave signal at the defect echo is used as the feature input.Next, 1D-CNN denotes the performance index of the 1D-CNN when the entire guided wave signal is used as the feature input, while 120-1D-CNN denotes the performance index of the 1D-CNN when the guided wave signal at the defect echo is used as the feature input.The numerical results indicate that the prediction performance of the neural networks appears better when the entire guided wave signal is used as the feature input, and the size of the defect is more closely related to the entire guided wave signal.Based on this result, it can be inferred that when only the signal at the echo of the defect is used as the feature input to the network, abundant useful information may be lost, To clarify whether the model could effectively predict the section damage angle corresponding to the defect echo signal when the guided wave signal at the defect echo was input into the neural network as a feature in the simulation stage, 120 groups of data at the defect echo were extracted from the original simulation data as feature inputs (Figure 9) to the neural network.Following this, the regression effect was compared with that of the entire guided wave signal as a feature input to the neural network.To clarify whether the model could effectively predict the section damage angle corresponding to the defect echo signal when the guided wave signal at the defect echo was input into the neural network as a feature in the simulation stage, 120 groups of data at the defect echo were extracted from the original simulation data as feature inputs (Figure 9) to the neural network.Following this, the regression effect was compared with that of the entire guided wave signal as a feature input to the neural network.Table 1 summarizes the final evaluation results for each parameter of the neural network models.In this table, MLP denotes the performance index of the MLP when the fullsection guided wave signal is used as the feature input, while 120-MLP represents the performance index of the MLP when the guided wave signal at the defect echo is used as the feature input.Next, 1D-CNN denotes the performance index of the 1D-CNN when the entire guided wave signal is used as the feature input, while 120-1D-CNN denotes the performance index of the 1D-CNN when the guided wave signal at the defect echo is used as the feature input.The numerical results indicate that the prediction performance of the neural networks appears better when the entire guided wave signal is used as the feature input, and the size of the defect is more closely related to the entire guided wave signal.Based on this result, it can be inferred that when only the signal at the echo of the defect is used as the feature input to the network, abundant useful information may be lost, Table 1 summarizes the final evaluation results for each parameter of the neural network models.In this table, MLP denotes the performance index of the MLP when the full-section guided wave signal is used as the feature input, while 120-MLP represents the performance index of the MLP when the guided wave signal at the defect echo is used as the feature input.Next, 1D-CNN denotes the performance index of the 1D-CNN when the entire guided wave signal is used as the feature input, while 120-1D-CNN denotes the performance index of the 1D-CNN when the guided wave signal at the defect echo is used as the feature input.The numerical results indicate that the prediction performance Sensors 2024, 24, 1204 10 of 17 of the neural networks better when entire guided wave signal is used as the feature input, and the size of the defect is more closely related to the entire guided wave signal.Based on this result, it can be inferred that when only the signal at the echo of the defect is used as the feature input to the network, abundant useful information may be lost, resulting in the inability of the neural network to effectively analyze defects.The 1D-CNN model was more effective in identifying the pipeline damage value from the analog signal.

Experimental Verification
To verify the effectiveness of the proposed defect quantification method using ultrasonic guided waves in pipes based on neural networks, experimental studies on different crack defect sizes in pipes were conducted.In other words, the neural network method was used to directly predict the sizes of the corresponding pipeline crack defects in the guided wave signal from the entire guided wave signal.

Experimental Design
The instruments and materials used in this study are listed in Table 2 below.Before the experiment, 32 piezoelectric ceramic slices were welded.To ensure that the piezoelectric ceramic slices would remain undamaged under the high welding temperature, the welding temperature was kept below 260 • C during welding.After welding, each piezoelectric ceramic slice was tested using an impedance analyzer to ensure that the frequency interval of the impedance mutation of each piezoelectric ceramic slice remained the same.Generally, after preparing a piezoelectric ceramic slice, treating the pipe to be pasted with this slice is essential.Thus, the cuts at both ends of the pipe were polished using an electric grinder, and the interior and exterior of pipe were cleaned.To place the piezoelectric ceramic slice in close contact with the pipe, it was carefully wiped with a disinfectant alcohol tablet approximately 10 cm from one end of the pipeline to be pasted with the piezoelectric ceramic slice, after which the ceramic piezoelectric slice was pasted evenly and tightly with epoxy resin adhesive.To ensure a clear signal, the excitation and receiving piezoelectric ceramic slices had to be placed at the same axial position as the pipeline and evenly distributed.Sixteen excitation and sixteen receiving piezoelectric ceramic slices were arranged at axial intervals of 5 mm, as depicted in Figure 10.A waveform generator was used to generate a signal modulated by a Hanning window at the excitation end of the pipeline, which was strengthened by a power amplifier and acted on the piezoelectric ceramic slice at the excitation end of the pipeline, to allow the ultrasonic guided wave to traverse all positions along the pipeline.Finally, a time curve of propagation of the ultrasonic guided wave in the pipeline was recorded using an oscilloscope.The actual experiment, instruments, and piping are illustrated in Figure 11.In the experiment, cutting was carried out first and then measurements were conducted to determine the angle of the section damage.In the absence of damage to the pipeline, the echo signal of the complete pipeline was first obtained, following which the pipeline was cut using an electric friction machine equipped with a special pipeline-cutting blade.each cut, the crack size was measured and recorded using Vernier calipers (Figure 12).To prevent the cutting-induced temperature rise from affecting guided wave detection, the pipeline was allowed to stand for 20 min after each cutting.After the temperature of the cutting surface was lowered until it was close to the indoor tempera- In the experiment, cutting was carried out first and then measurements were c ducted to determine the angle of the section damage.In the absence of damage to pipeline, the echo signal of the complete pipeline was first obtained, following which pipeline was cut using an electric friction machine equipped with a special pipeline-c ting blade.After each cut, the crack size was measured and recorded using Vernier c pers (Figure 12).To prevent the cutting-induced temperature rise from affecting guid wave detection, the pipeline was allowed to stand for 20 min after each cutting.After In the experiment, cutting was carried out first and then measurements were conducted to determine the angle of the section damage.In the absence of damage to the pipeline, the echo signal of the complete pipeline was first following which pipeline was cut using an electric friction machine equipped with a special pipeline-cutting blade.After each cut, the crack size was measured and recorded using Vernier calipers (Figure 12).To prevent the cutting-induced temperature rise from affecting guided wave detection, the pipeline was allowed to stand for 20 min after each cutting.After the temperature of the cutting surface was lowered until it was close to the indoor temperature, guided wave detection was performed, and the relevant guided wave data were recorded using an oscilloscope.To ensure that the excitation wave, defect echo, and the first-end echo could be clearly observed on the oscilloscope, and the guided wave signal could be completely collected, the horizontal scanning time base of the oscilloscope was selected to be 200 µs, and the number of sampling points was 10,000.We selected 31 excitation signals with a central frequency within the range of 50-200 kHz and considered 5 kHz as the optimal step to conduct the frequency sweep operation on the pipeline.During the frequency sweep, we observed that when the central frequency was 80 kHz, the guided wave signal was clear, and no interference was observed from the other modal waveforms, as indicated in Figure 13.Therefore, 80 kHz was selected as the optimal central frequency for the guided wave experiment on this pipe.A total of 21 groups of guided wave data were collected using excitation signals with central frequencies ranging from 70 to 90 kHz, with steps of 1 kHz above and below 80 kHz.To match the numerical simulation, the experiment was terminated when the section damage angle reached 180°.The section damage angles recorded in the experiment are listed in Table 3.To ensure that the excitation wave, defect echo, and the first-end echo could be clearly observed on the oscilloscope, and the guided wave signal could be completely collected, the horizontal scanning time base of the oscilloscope was selected to be 200 µs, and the number of sampling points was 10,000.We selected 31 excitation signals with a central frequency within the range of 50-200 kHz and considered 5 kHz as the optimal step to conduct the frequency sweep operation on the pipeline.During the frequency sweep, we observed that when the central frequency was 80 kHz, the guided wave signal was clear, and no interference was observed from the other modal waveforms, as indicated in Figure 13.Therefore, 80 kHz was selected as the optimal central frequency for the guided wave experiment on this pipe.A total of 21 groups of guided wave data were collected using excitation signals with central frequencies ranging from 70 to 90 kHz, with steps of 1 kHz above and below 80 kHz.To match the numerical simulation, the experiment was terminated when the section damage angle reached 180 • .The section damage angles recorded in the experiment are listed in Table 3.To ensure that the excitation wave, defect echo, and the first-end echo could be clearly observed on the oscilloscope, and the guided wave signal could be completely collected, the horizontal scanning time base of the oscilloscope was selected to be 200 µs, and the number of sampling points was 10,000.We selected 31 excitation signals with a central frequency within the range of 50-200 kHz and considered 5 kHz as the optimal step to conduct the frequency sweep operation on the pipeline.During the frequency sweep, we observed that when the central frequency was 80 kHz, the guided wave signal was clear, and no interference was observed from the other modal waveforms, as indicated in Figure 13.Therefore, 80 kHz was selected as the optimal central frequency for the guided wave experiment on this pipe.A total of 21 groups of guided wave data were collected using excitation signals with central frequencies ranging from 70 to 90 kHz, with steps of 1 kHz above and below 80 kHz.To match the numerical simulation, the experiment was terminated when the section damage angle reached 180°.The section damage angles recorded in the experiment are listed in Table 3.

Analysis of Experimental Results
Through the above experimental operation, 10,920 groups of data were collected for neural network training, and 210 groups of guided wave data were collected under optimal frequency conditions.Based on the consistency between the experiment and simulation, the guided wave data at the optimal frequency were analyzed, and the data were divided into training, testing, and verification sets at a ratio of 6:2:2.The MLP and 1D-CNN were used to these data, and the regression of the two different networks on these data was compared.The final results obtained through network learning and training are as follows.
The training results of the 1D-CNN on the experimental data are shown in Figure 14, and the results of the regression performance indicators of the obtained model are as follows: RMSE = 3.25, MAPE = 0.039, and R-square = 0.993.The regression performance indexes of the model indicate that the regression performance of the 1D-CNN model was not as good as that of the simulated data when the experimental data were used.The error between the predicted results and actual section damage angle was approximately 3.3 • , and the error reached 1.8%, which was approximately 1.7 mm when converted into arc length.The results of the regression performance indicators of the MLP are as follows: RMSE = 3.99, MAPE = 0.043, and R-square = 0.990.In general, a neural network can accomplish the quantitative characterization of pipeline damage both from simulation and experimental data, and the regression performance of the 1D-CNN is better than that of the MLP in this task.
Owing to the characteristics of multimodal and frequency dispersions of ultrasonic guided waves, an evident defect echo cannot be observed in the guided wave echo signal under a nonoptimal excitation frequency, as presented in Figure 15.To evaluate whether the neural network could identify ultrasonic guided-wave signal data at other frequencies, 10,920 data groups were input into the network for learning.The corresponding results are presented in Table 4 and Figure 16.
and the error reached 1.8%, which was approximately 1.7 mm when converted into arc length.The results of the regression performance indicators of the MLP are as follows: RMSE = 3.99, MAPE = 0.043, and R-square = 0.990.In general, a neural network can accomplish the quantitative characterization of pipeline damage both from simulation and experimental data, and the regression performance of the 1D-CNN is better than that of the MLP in this task.Owing to the characteristics of multimodal and frequency dispersions of ultrasonic guided waves, an evident defect echo cannot be observed in the guided wave echo signal  The regression performance indexes of the model indicate that the error between the prediction result of the MLP model and the real section damage angle was approximately 7.13°, and the error reached 3.9%, which was approximately 3.7 mm when converted into arc length.The error between the prediction result of the 1D-CNN model and the real section damage angle was approximately 3.7°, and the error reached 2%, which was approximately 1.9 mm when converted into arc length.These calculation results indicate  under a nonoptimal excitation frequency, as presented in Figure 15.To evaluate whether the neural network could identify ultrasonic guided-wave signal data at other frequencies, 10,920 data groups were input into the network for learning.The corresponding results are presented in Table 4 and Figure 16.The regression performance indexes of the model indicate that the error between the prediction result of the MLP model and the real section damage angle was approximately 7.13 • , and the error reached 3.9%, which was approximately 3.7 mm when converted into arc length.The error between the prediction result of the 1D-CNN model and the real section damage angle was approximately 3.7 • , and the error reached 2%, which was approximately 1.9 mm when converted into arc length.These calculation results indicate that a neural network has the ability to identify guided wave echo signal data under nonoptimal excitation frequencies, and it can extract the defect quantity from the data.The 1D-CNN is better in this respect, and its regression performance is basically the same as that of the guided wave signal under the optimal excitation frequency.
Finally, the CNN model was generated, encapsulated, and used to recognize a new dataset formed by integrating and disrupting simulated and experimental data.The recognition results are shown in Figure 17, with performance index scores of RMSE = 12.46, MAPE = 0.241, and R-Square = 0.922.As shown in the figure, the validation data are distributed on both sides of the accurate prediction value.When compared to the validation using only the experimental dataset, the prediction error increases, resulting in an error of 12.46 • , up from 7.13 • .Additionally, the direction of the arc length also increases by 3. The data have been transformed from the original 2000 groups of validation sets to the current 11,001 groups of validation sets.As a result, the margin of error has increased from 3.7 mm to 6.4 mm.However, this error is still relatively small considering the large amount of accumulated data.These results correspond to an arc length error of 6 mm, further demonstrating the effectiveness of the CNN.

Conclusions
In this study, the quantitative characterization of pipeline crack defects was realized by combining a 1D-CNN and ultrasonic guided wave technology.Through a numerical simulation and experimental study, a 1D-CNN was used to quantitatively verify the dimension of a pipeline crack defect by constructing an ultrasonic guided wave experimental platform.Ultrasonic guided wave signals with different crack defects in the pipeline were collected and quantitatively analyzed.The primary conclusions of this analysis are as follows: (1) A quantitative analysis of pipeline crack defects can be realized from end to end by combining a 1D-CNN with ultrasonic guided wave technology.

Conclusions
In this study, the quantitative characterization of pipeline crack defects was realized by combining a 1D-CNN and ultrasonic guided wave technology.Through a numerical simulation and experimental study, a 1D-CNN was used to quantitatively verify the dimension of a pipeline crack defect by constructing an ultrasonic guided wave experimental platform.Ultrasonic guided wave signals with different crack defects in the pipeline were collected and quantitatively analyzed.The primary conclusions of this analysis are as follows: (1) A quantitative analysis of pipeline crack defects can be realized from end to end by combining a 1D-CNN with ultrasonic guided wave technology.(2) Using the entire guided wave signal, including the incident wave, defect echo, and first-end face echo signal, the feature input can improve the accuracy of the 1D-CNN in identifying the size of the pipeline crack defect.
(3) The 1D-CNN is more suitable for identification training of the defect size of the pipeline than the MLP.(4) The 1D-CNN can effectively identify the defect size from the echo signal under an excitation signal with different central frequencies, and it can predict the defect size with an error of less than 2%.
In summary, the combination of a 1D-CNN and ultrasonic guided waves can effectively identify pipeline crack damage.Further studies are needed to quantify other types of pipe damage.When the training data samples are insufficient, the CNN tends to produce significant deviations.It is necessary to make breakthroughs in this aspect in the future since the unexplainability of the network makes it impossible to analyze the training data.CNNs can identify various degrees of damage from the response signals of different dispersion states when the data samples are sufficient, which is a unique advantage of CNNs.However, the principle requires in-depth study.

Figure 1 .
Figure 1.Schematic diagram of a CNN.

Figure 1 .
Figure 1.Schematic diagram of a CNN.

Figure 4 .
Figure 4. Dispersion curves for (a) group speed and (b) phase speed.

Figure 4 .
Figure 4. Dispersion curves for (a) group speed and (b) phase speed.

Figure 5 .
Figure 5. Mesh division with local refinement.

Figure 5 .
Figure 5. Mesh division with local refinement.

Figure 8 .
Figure 8. Loss curve and prediction results of the 1D-CNN.(a) Loss curves.(b) Predicted results.

Figure 8 .
Figure 8. Loss curve and prediction results of the 1D-CNN.(a) Loss curves.(b) Predicted results.

Figure 8 .
Figure 8. Loss curve and prediction results of the 1D-CNN.(a) Loss curves.(b) Predicted results.

Figure 14 .
Figure 14.Loss curve and prediction results of the 1D-CNN.(a) Loss curves.(b) Predicted results.

Figure 15 .
Figure 15.Comparison diagram of ultrasonic guided wave signals.Guided wave echo of an excitation signal with central frequencies of (a) 80 kHz and (b) 120 kHz.

Figure 15 .Figure 16 .
Figure 15.Comparison diagram of ultrasonic guided wave signals.Guided wave echo of an excitation signal with central frequencies of (a) 80 kHz and (b) 120 kHz.

Sensors 2024 ,
24,  x FOR PEER REVIEW 16 of 18 recognition results are shown in Figure17, with performance index scores of RMSE = 12.46, MAPE = 0.241, and R-Square = 0.922.As shown in the figure, the validation data are distributed on both sides of the accurate prediction value.When compared to the validation using only the experimental dataset, the prediction error increases, resulting in an error of 12.46°, up from 7.13°.Additionally, the direction of the arc length also increases by 3. The data have been transformed from the original 2000 groups of validation sets to the current 11,001 groups of validation sets.As a result, the margin of error has increased from 3.7 mm to 6.4 mm.However, this error is still relatively small considering the large amount of accumulated data.These results correspond to an arc length error of 6 mm, further demonstrating the effectiveness of the CNN.

Figure 17 .
Figure 17.Predicted results for mixed data.

( 2 )
Using the entire guided wave signal, including the incident wave, defect echo, and first-end face echo signal, the feature input can improve the accuracy of the 1D-CNN in identifying the size of the pipeline crack defect.(3)The 1D-CNN is more suitable for identification training of the defect size of the pipeline than the MLP.(4) The 1D-CNN can effectively identify the defect size from the echo signal under an excitation signal with different central frequencies, and it can predict the defect size with an error of less than 2%.

Figure 17 .
Figure 17.Predicted results for mixed data.

Table 1 .
Performance index evaluation.

Table 4 .
Performance index evaluation.

Table 4 .
Performance index evaluation.

Table 4 .
Performance index evaluation.