High-Sensitivity Ultrasonic Guided Wave Monitoring of Pipe Defects Using Adaptive Principal Component Analysis

Ultrasonic guided wave monitoring is regularly used for monitoring the structural health of industrial pipes, but small defects are difficult to identify owing to the influence of the environment and pipe structure on the guided wave signal. In this paper, a high-sensitivity monitoring algorithm based on adaptive principal component analysis (APCA) for defects of pipes is proposed, which calculates the sensitivity index of the signals and optimizes the process of selecting principal components in principal component analysis (PCA). Furthermore, we established a comprehensive damage index (K) by extracting the subspace features of signals to display the existence of defects intuitively. The damage monitoring algorithm was tested by the dataset collected from several pipe types, and the experimental results show that the APCA method can monitor the hole defect of 0.075% cross section loss ratio (SLR) on the straight pipe, 0.15% SLR on the spiral pipe, and 0.18% SLR on the bent pipe, which is superior to conventional methods such as optimal baseline subtraction (OBS) and average Euclidean distance (AED). The results of the damage index curve obtained by the algorithm clearly showed the change trend of defects; moreover, the contribution rate of the K index roughly showed the location of the defects.


Introduction
With the increase in the service life of oil and gas pipes, various kinds of defects or damage will occur gradually. The ultrasonic guided wave testing technique [1][2][3][4], with its advantages of long propagation distance, low attenuation, and large detection range compared with the conventional methods (such as magnetic flux leakage, eddy current, and X-ray [5][6][7]), has thus been widely used in structural health monitoring (SHM) and nondestructive testing (NDT) for pipe structures.
During testing for pipe defects, monitoring by ultrasonic guided waves has a higher signal-to-noise ratio (SNR) and sensitivity compared with detection [8,9]. The transducer is fixed permanently to reduce the manual operation and the environmental noise. By comparing the real-time measurement signal with the original signal, the defect of a pipe can be inspected more intuitively [10][11][12]. However, the sensitive of the commercial guided wave system is only 0.6% SLR [13]. In a previous study, Rose verified the possibility of detecting a pipe with 0.36% SLR in simulation, and the monitoring performance was found to be better [14], and Jacob [15] also found in the experiment that the hole defect of 0.25% SLR can be monitored on the straight pipe, but if the hole defect is produced after a bend 1. In the continuous monitoring of a pipe, there is still a probability that the instrument will produce large noise while working normally; 2.
Slight differences in the monitoring signals exist at different times of the day, and due to the influence of temperature on the materials, the guided wave propagation is affected too [16].
The traditional solution to these problems is to increase the excitation power and transducer coupling efficiency at the instrument level and to establish the temperature compensation at the signal preprocessing level [17]. However, many neglected factors that are difficult to check also limit the monitoring performance.
During monitoring signal processing research, the pipe signal recorded by an instrument, in which the temperature influence has been compensated by optimal time-domain stretch method [18], is used in various defect evaluation algorithms. For example, the original signal is subtracted from the test signal after Hilbert envelope processing to identify the defects, which is a method called optimal baseline subtraction (OBS) [19]. In later research, by calculating the Euclidean distance between the original signals and the test signals, a boundary distance was set to assess the defects, called the average Euclidean distance method (AED) [20,21], which also improves monitoring sensitivity. Although the above methods are commonly used, the calculation information is redundant, and some useless points in the collected signal will interfere with the results.
Feature space decomposition reduction technology has been found to have great potential in enhancing the representativeness of data [22]. Principal component analysis (PCA), which uses this technology, is a commonly used data dimension reduction method [23,24]. It aims to find the principal components related to the main features in the data to represent the original signals, so it is less affected by random noise caused by the environment. Independent component analysis (ICA) is also used to decompose the feature space [25]. It is simple to extract effective signals from complex signals, but the extracted components are independent, which makes it difficult to separate the noise signals from a Gaussian distribution.
In order to improve the sensitivity of detecting small defects, the adaptive principal component analysis algorithm (APCA) is proposed in this paper. Based on the traditional PCA, an adaptive link is added to the selection process of the principal component to enhance the sensitivity of the monitoring algorithm. In Section 2, we introduce the basic preprocessing of signals and the principle of APCA for defect identification. Section 3 shows the performance of the APCA algorithm for straight pipes, bent pipes, and spiral pipes, as well as a comparison of APCA with OBS and AED. Conclusions follow in Section 4.

Pre-Processing
For the guided wave signal collected by the instrument, due to the noise caused by the instrument or the transducer, the guided wave signal is usually preprocessed before the application of the monitoring algorithm to identify the defect. It mainly includes Butterworth data filtering and Hilbert envelope extraction, the application of both of which has been proved to improve the signal-to-noise ratio and to reduce the influence of the end surface and weld [26,27]. The Hilbert envelope of the filtered signal was obtained after removing the bias, which can be written as the following Equations (1) and (2): x e (t) = x(t) 2  where x(t) is the signal after filtering and removing the bias (Figure 1b). An example of the Hilbert envelope of guided wave signals (x e (t)) in our experiment is exhibited in Figure 1c. It can be seen that the envelope signal had more prominent defect characteristics than the instrument signal ( Figure 1a).
where �( ) is the signal after filtering and removing the bias (Figure 1b). An example of the Hilbert envelope of guided wave signals ( ( )) in our experiment is exhibited in Figure   1c. It can be seen that the envelope signal had more prominent defect characteristics than the instrument signal ( Figure 1a). In the first stage, we collected original signals on the undamaged pipe and carried out the above preprocess. In the second stage, the test signals were collected on pipe with different cross section loss ratio (SLR) of hole defects; the SLR refers to the ratio of defect area to the cross section of pipe, and it is used to measure the degree of defect and can be expressed as the following Equation (3): where is the diameter of hole defect, ℎ is the depth of holing, is the diameter of pipe, and T is the thickness of pipe. In addition to that, the original signals and test signals are also temperature compensated to avoid the interference of temperature; this compensation method [28] can refer to the previous research of our laboratory. The signal processing conditions and transducer installation conditions of the two stages are the same, which also lays the foundation for the implementation of the later monitoring algorithm.

Feature Decomposition
Suppose that the number of collected original signals is m and that each signal contains n sampling points and is regarded as a vector ; then, the original signals matrix can be expressed as Equation (4): First, an n-order covariance matrix C is constructed for the × , and the eigenvalues and eigenvectors of the covariance matrix C are also calculated, which can be expressed as Equations (5) and (6): In the first stage, we collected original signals on the undamaged pipe and carried out the above preprocess. In the second stage, the test signals were collected on pipe with different cross section loss ratio (SLR) of hole defects; the SLR refers to the ratio of defect area to the cross section of pipe, and it is used to measure the degree of defect and can be expressed as the following Equation (3): where d is the diameter of hole defect, h is the depth of holing, D is the diameter of pipe, and T is the thickness of pipe. In addition to that, the original signals and test signals are also temperature compensated to avoid the interference of temperature; this compensation method [28] can refer to the previous research of our laboratory. The signal processing conditions and transducer installation conditions of the two stages are the same, which also lays the foundation for the implementation of the later monitoring algorithm.

Feature Decomposition
Suppose that the number of collected original signals is m and that each signal contains n sampling points and is regarded as a vector x i ; then, the original signals matrix can be expressed as Equation (4): First, an n-order covariance matrix C is constructed for the X n×m , and the eigenvalues and eigenvectors of the covariance matrix C are also calculated, which can be expressed as Equations (5) and (6): The matrix U obtained by the operation is an n × n characteristic matrix, and the matrix S is a diagonal matrix composed of eigenvalues λ 1 , λ 2 . . . λ n ; the eigenvalues are sorted from large to small in matrix S. Selecting the column of matrix U as the vector, we will get n eigenvectors u 1 , u 2 , u 3 . . . u n . Then, the dimension-reduced k-dimensional matrix Y k×m can be obtained by the following Equation (7): where U k is taken from the first k vectors of matrix U, which is also called the principal component matrix. The subspace supported by it is called the principal component subspace (PCS), which is used to measure the fitting degree of test signals and original signals; Y k×m is the projection of the signals on the PCS, the greater the distribution difference, the greater the projection value. U n−k is taken from the last n-k vectors of matrix U, and it also supports the residual subspace (RS), which is used to measure the residual between the test signals and the principal component model. Then, the damage evaluation index should be established, which is based on the above two subspaces. According to the previous discussion, the PCA mapped the data into PCS and RS, and then two statistics were introduced-Hotelling T 2 (T 2 ) and the squared prediction error (SPE) [29,30]-to monitor the occurrence of defect.
T 2 was used to measure the information size and change range in the PCS. It is defined as the following Equations (8) and (9): where F a is the F distribution of statistics, S k is a diagonal matrix composed by first k eigenvalues λ 1 , λ 2 . . . λ k of C. a is the confidence level (generally 99%), and T a is the control limit of T 2 . The SPE was used to measure the deviation size of the test signal in the RS. It is defined as the following Equations (10) and (11): In this formula, C a is the confidence limit of the standard normal distribution, C a is the confidence level (generally 99%), and Q a is the control limit of the SPE. θ and h 0 are performed as Equations (12) and (13): Under normal conditions, the projection of the original signals in RS should be very small. When the damage occurs in the pipe, the observation sample will deviate from the PCS and increase its projection in RS, the information size and deviation size will change significantly, and the T 2 and SPE value will exceed their limits. In order to avoid the influence of instrument noise and to reduce the false alarm rate, we considered that only when T 2 > T a and SPE > Q a can the occurrence conditions of defects be satisfied.

Adaptive Principal Component Analysis
When PCA is used to construct the principal component matrix, the number of principal components must be determined, which will directly affect the performance of defect monitoring and diagnosis. If the number of principal components is too small, the PCS contains too little information, which makes the T a too small; moreover, the RS will also contain redundant information, and this can easily lead to false detection. If the number of principal components is too high, the large amount of useless information in the PCS may submerge the defect information, which makes it difficult to detect small defects [31,32]. The most widely used method of principal component selection is the cumulative percentage variance (CPV) method [33]. When the first k principal components are selected, the CPV is obtained by Equation (14): Generally, CPV ∈ (0.85, 0.95) is used to balance principal component information and dimension reduction points [34]. However, the CPV is selected by people subjectively, and it is difficult to meet the diagnosis requirements of small defects. In order to link the construction of feature subspace with diagnosis of defects, this paper proposes the APCA method to adaptively select the number of principal components according to the statistical index T 2 , SPE, and their control limits T a , Q a .
To begin with, for the original signals without defects and test signals with defects, in previous Section 2.2, we explained that T 2 will exceed T a when the defects are detected; the damage index can be given by Equation (15): where the T 2 test means the T 2 index of a test signal. Therefore, we can consider that the defects are detected when the damage index DI 1 > 1; the larger the damage index is, the easier it is to find defects. However, the establishment of the principal component model depends on the original signals without defects, so we define a sensitivity index, which can be expressed by Equation (16): where the T 2 original means the T 2 index of original signals. The larger sensitivity index means that the threshold T a of defects is easier to achieve and that the detection of defects will become more sensitive. Next, we will rewrite the Equation (16) for experimental signals.
The process of this method is demonstrated with our experimental signals. The example used was a straight pipe with a defect at 1 m. The signals of this pipe include 100 sets of original signals without defects and 140 sets of test signals with different defects (0%, 0.075%, 0.15%, 0.225%, 0.3%, 0.45%, and 0.6% SLR; see Table 1 for details). The dataset of signals is also shown in Figure 2.
For the original signals, an original sensitivity index is established in PCS by Equation (17): where the T 2 i means the T 2 index of original signals. Similar processing is also carried out in the RS; the damage index and original sensitivity index are obtained by Equations (18) and (19):   Figure 2. The dataset of signals in straight pipe experiment. For the original signals, an original sensitivity index is established in PCS by Equa (17): where the 2 means the 2 index of original signals. Similar processing is also ca out in the RS; the damage index and original sensitivity index are obtained by Equations and (19): A comprehensive original sensitive index considering PCS and RS is defined by Equation (20): We can achieve a better sensitivity by referring to OSI when selecting the principal components. The processing flow of this adaptive method can be seen intuitively in Figure 3.
The selection results of principal components in this dataset are shown in Figure  4b; a comprehensive test damage index used to verify the selection effect is defined by Equation (21): Obviously, a larger TDI means a better recognition effect of the APCA method. Therefore, we studied the relationship between the number of principal components, TDI, OSI, and CPV, as shown in Figure 4. Figure 4a shows the influence of different principal components on CPV; it can be seen that the CPV of the first five principal components has exceeded 95%. In Figure 4b, we can find that with the increase in principal component number, both the OSI and TDI increase first and then decrease. Obviously, the five principal components selected by CPV cannot meet the needs of defect diagnosis. When the defect is small (0.075% SLR), the trend of the OSI and TDI is relatively similar. This trend will change only when the defect becomes larger (0.15% SLR). We can find that when the first 27 principal components are selected according to OSI, the first 27 principal components also have a good recognition effect for the defects of 0.075% SLR.  The selection results of principal components in this dataset are shown in a comprehensive test damage index used to verify the selection effect is defined by (21): Obviously, a larger TDI means a better recognition effect of the APCA Therefore, we studied the relationship between the number of principal com TDI, OSI, and CPV, as shown in Figure 4.   Figure 3. Flow diagram of the APCA method.
The selection results of principal components in this dataset are shown in Figure 4b; a comprehensive test damage index used to verify the selection effect is defined by Equation (21): Obviously, a larger TDI means a better recognition effect of the APCA method. Therefore, we studied the relationship between the number of principal components, TDI, OSI, and CPV, as shown in Figure 4.   The feature extraction effect of signals was also compared with different numbers of principal components in Figure 5 (5 principal components (95% CPV) selected subjectively and 27 principal components selected adaptively by our method). Figure 4a shows the influence of different principal components on CPV; it can be seen that the CPV of the first five principal components has exceeded 95%. In Figure 4b, we can find that with the increase in principal component number, both the OSI and TDI increase first and then decrease. Obviously, the five principal components selected by CPV cannot meet the needs of defect diagnosis. When the defect is small (0.075% SLR), the trend of the OSI and TDI is relatively similar. This trend will change only when the defect becomes larger (0.15% SLR). We can find that when the first 27 principal components are selected according to OSI, the first 27 principal components also have a good recognition effect for the defects of 0.075% SLR.
The feature extraction effect of signals was also compared with different numbers of principal components in Figure 5 (5 principal components (95% CPV) selected subjectively and 27 principal components selected adaptively by our method). As shown in Figure 5a,b, when the original signals are projected into PCS, the damage trend becomes more clear and easier to identify. However, this trend is more obvious in the 12th to 27th principal components; the first 12 principal components do As shown in Figure 5a,b, when the original signals are projected into PCS, the damage trend becomes more clear and easier to identify. However, this trend is more obvious in the 12th to 27th principal components; the first 12 principal components do not record the change trend of defects well. The principal component information selected subjectively through CPV is too little to cover the change of defects. It also proves that a more appropriate number of principal components are selected by the APCA method.
As seen in Figure 5c,d, when the original signals are projected into RS, the damage location becomes more clear and easier to identify. However, too few principal components are selected by CPV, which leads to a redundancy of residual information. By observing the side view of projection information in RS (Figure 5e,f), we can find that the defects are separated better in the RS through our method.
At the same time, the damage indexes DI 1 and DI 2 were also calculated to reflect the damage detection sensitivity. The results obtained by selecting the principal components by different methods are compared in Figure 6.
As seen in Figure 5c,d, when the original signals are projected into RS, the damage location becomes more clear and easier to identify. However, too few principal components are selected by CPV, which leads to a redundancy of residual information. By observing the side view of projection information in RS (Figure 5e,f), we can find that the defects are separated better in the RS through our method.
At the same time, the damage indexes 1 and 2 were also calculated to reflect the damage detection sensitivity. The results obtained by selecting the principal components by different methods are compared in Figure 6. It can be seen from Figure 6 that the damage index of APCA is higher than that of traditional PCA on different kinds of defects. At the same time, the above discussion also proves that the APCA method, which selects the principal component by the sensitive index adaptively, has the effect of greatly improving the PCA algorithm.

Post-Processing
During the sampling process of the instrument, a very small part of the signals may be disturbed by electromagnetic noise, which are defined as outlier samples. The useless residual information of outlier samples will cause the rise of Qa, and thus will lead to an insensitive damage index. As can be seen from the previous Figure 6b, the red arrow points to an outlier sample.
In this step, the Pauta Criterion [35] is used to screen the outlier samples in the RS, which is expressed in Equations (22) and (23): When the ( ) of original signal does not satisfy the Equation (22), we consider it to be an outlier sample. The process of screening outlier samples can be shown in Figure 7. It can be seen from Figure 6 that the damage index of APCA is higher than that of traditional PCA on different kinds of defects. At the same time, the above discussion also proves that the APCA method, which selects the principal component by the sensitive index adaptively, has the effect of greatly improving the PCA algorithm.

Post-Processing
During the sampling process of the instrument, a very small part of the signals may be disturbed by electromagnetic noise, which are defined as outlier samples. The useless residual information of outlier samples will cause the rise of Qa, and thus will lead to an insensitive damage index. As can be seen from the previous Figure 6b, the red arrow points to an outlier sample.
In this step, the Pauta Criterion [35] is used to screen the outlier samples in the RS, which is expressed in Equations (22) and (23): When the SPE(i) of original signal does not satisfy the Equation (22), we consider it to be an outlier sample. The process of screening outlier samples can be shown in Figure 7. After this processing, the SPE become lower, and the damage index 2 becomes more sensitive to defects, as is shown in Figure 8. After this processing, the SPE become lower, and the damage index DI 2 becomes more sensitive to defects, as is shown in Figure 8.
Recalculate the DI1 (i) and DI2 (i) Recalculate the DI1 (i) and DI2 (i) After this processing, the SPE become lower, and the damage index more sensitive to defects, as is shown in Figure 8.

Damage Judgment
As shown in Figure 9, after the signal processing in Sections 2.1 -2.4 and 3 needed to build the APCA model have been satisfied. In order to signal (step 4), we needed to establish a comprehensive damage index t defects.

Damage Judgment
As shown in Figure 9, after the signal processing in Sections 2.1-2.4, the steps 1, 2, and 3 needed to build the APCA model have been satisfied. In order to judge the test signal (step 4), we needed to establish a comprehensive damage index to diagnose the defects.

PEER REVIEW 11 of 21
Step 1 Data preprocessing Step  In step 4, after the latest test signal is collected, consider it as a vector with n points, and insert it into the original signals matrix where ×( +1) ′ represents the characteristic matrix and the low-dimensional principal component matrix obtained by adding the test signal. The SPE and 2 values of can be calculated by Equations (8) and (10). In step 4, after the latest test signal is collected, consider it as a vector x s with n points, and insert it into the original signals matrix X n×m for operation. The selection of the principal component was determined during the construction of the APCA model; the operation can be performed as Equation (24) where Y k×(m+1) represents the characteristic matrix and the low-dimensional principal component matrix obtained by adding the test signal. The SPE and T 2 values of x s can be calculated by Equations (8) and (10). In order to avoid the influence of a single index on the results, the comprehensive damage index K is defined by Equation (25): where the K is the comprehensive damage index of the APCA method for monitoring defects. When DI 1 > 1 and DI 2 > 1, the K indicator will exceed 1, and the defect is considered to be detected, so the threshold of the APCA algorithm is 1. Meanwhile, when the K index is used to evaluate a series of original signals and test signals, a damage index curve recording the changing trend of signals can be generated in the following experimental results.

Experimental Introduction
In this section, the guided wave signals of a straight pipe, bent pipe, and spiral pipe are presented, along with comparisons of the APCA, OBS, and the AED algorithm. The excitation parameters of the guided wave in several experiments are also reported.
In the first experiment, a straight pipe (aluminum) was used, and the semi-analytical finite element method (SAFE) was used to solve the dispersion curve [36,37]; the guided wave of T (0,1) mode with 128 kHz was selected for excitation because of its excellent propagation characteristics [38]. For the spiral pipe experiment, the early research of Zhang and Tang has proven that the comb magnetostrictive patch transducer (HCMPT) parallel to spiral weld [39] can effectively excite the pure bending T-mode guided wave in the spiral pipe (f = 64 kHz, diam = 0.72 m); under this condition, a superior echo waveform was recorded in this experiment. For the bent pipe experiment, because the SAFE method is only related to the cross-section shape and because Vinogradov's Field testing on a carbon steel pipe indicated that higher frequencies (128 kHz) provided better performance in penetrating past U-bends [40], the same excitation conditions as those used for the straight pipe experiment were therefore used.
In the experiment, the transducer was fixed permanently in the process of collecting original signals and test signals, and the defect was judged by comparing test signals with the original signals collected on the same pipe. The transducer worked in the pulse-echo mode, which means it acted as both a guided wave transmitter and a guided wave receiver.

Straight Pipe Experiment
As shown in the straight pipe experiment conditions in Figure 10a, the transducer based on magnetostrictive effect [41] was installed 0.2 m from the beginning. A hole defect 1 m away from the transducer was expanded from small to large. As is shown in Figure 10c, the SLRs were 0.075%, 0.15%, 0.225%, 0.3%, 0.45%, and 0.6%.
The original signals of the first hole were collected in the pipe without any defects. After the first hole was expanded to an SLR of 0.6%, a second hole defect 1.5 m away from the transducer was produced in the same pipe. The original signals of the second hole were collected on the pipe with a hole. The guided wave was reflected at the first hole, which resulted in an energy reduction when the guided wave transmitted to the second hole.

Straight Pipe Experiment
As shown in the straight pipe experiment conditions in Figure 10a, the transducer based on magnetostrictive effect [41] was installed 0.2 m from the beginning. A hole defect 1 m away from the transducer was expanded from small to large. As is shown in Figure 10c, the SLRs were 0.075%, 0.15%, 0.225%, 0.3%, 0.45%, and 0.6%. The original signals of the first hole were collected in the pipe without any defects. After the first hole was expanded to an SLR of 0.6%, a second hole defect 1.5 m away from the transducer was produced in the same pipe. The original signals of the second hole were collected on the pipe with a hole. The guided wave was reflected at the first hole, which resulted in an energy reduction when the guided wave transmitted to the second hole.
The guided wave monitoring equipment (UGPM30A, Zheda Jingyi Tech, Ltd., Hangzhou, China) was used to acquire guided wave signals of the pipes. The excitation signal was a 128 kHz sinusoidal signal modulated by a Hanning window with a certain bandwidth, as shown in Figure10b. The connection of temperature probe and transducer and the experimental site are also shown in Figure 10b. In this experiment, the original signals were collected every 10 min, and 100 sets of original signals were reserved. Similarly, 20 groups of test signals were collected for each kind of defect. We also collected 20 sets of signals before producing the hole for testing. See Tables 1 and 2 for details. The guided wave monitoring equipment (UGPM30A, Zheda Jingyi Tech, Ltd., Hangzhou, China) was used to acquire guided wave signals of the pipes. The excitation signal was a 128 kHz sinusoidal signal modulated by a Hanning window with a certain bandwidth, as shown in Figure 10b. The connection of temperature probe and transducer and the experimental site are also shown in Figure 10b. In this experiment, the original signals were collected every 10 min, and 100 sets of original signals were reserved. Similarly, 20 groups of test signals were collected for each kind of defect. We also collected 20 sets of signals before producing the hole for testing. See Tables 1 and 2 for details. In order to show the experimental results clearly, we calculated the recognition accuracy of the OBS, AED, and APCA methods on the same original signals and test signals. The accuracy is obtained by Equation (26): 26) where the N actual means the number of actual defect samples, and the N judge means the number of defect samples judged by algorithm (when the threshold was exceeded). Similarly, the misjudgment rate of 0% SLR defect is obtained by Equation (27): The other two methods are the following: • OBS: First, we calculated the mean value of the original signals, then we subtracted it from all the signals; the max value of the subtraction result was then taken to represent a sample. The threshold was the max value of the subtraction result of original signals. The damage index can be obtained by Equation (28): where the x t means the original signals and test signals in the experiment, and the x i means the original signals. After the above processing, we can also obtain a damage index curve with a threshold of 1, as is shown in Figure 11b.    • AED: First, we calculated the mean value of the original signal, then we took the Euclidean distance between this and all signals. The damage index and threshold can be obtained by Equation (29): After the above processing, we can also obtain a damage index curve with a threshold of 1, as is shown in Figure 11c. The experimental results are finally shown in Figure 11 and Tables 3 and 4; each of them shows three methods.  As can be seen from the above Figure 11 and Tables 3 and 4, for defects at 1 m, on the premise of 100% accurate identification, the minimum defect monitoring threshold of the APCA method was 0.075% SLR, the OBS was 0.15% SLR, and the AED was 0.225% SLR. For defects at 1.5 m, the minimum defect monitoring threshold of APCA was 0.075% SLR, and the OBS and the AED were 0.3% SLR. At the same time, the damage index curve obtained by APCA is smoother than that of OBS and AED.
From Figure 11, we can also see that the damage index of the defect at 1.5 m rises slower than the defect at 1 m; the guided wave is reflected at the 1 m hole, which also makes it more difficult to monitor the hole defect at 1.5 m.
It can be observed from Figure 11a that the instances and levels of the structural changes are clearly shown as step changes in the damage index curve of APCA; the threshold 1 obtained by the algorithm can also clearly distinguish the pipe without defect and the pipe with a defect of 0.075% SLR. At the same time, the algorithm also did not misjudge the signals without defect.

Spiral Pipe Experiment
Most of the experimental conditions have been mentioned above; however, a few conditions were different for this experiment. The experimental conditions for the spiral pipe (carbon steel) can be clearly seen in Figure 12. The transducer was installed at an angle of 15 degrees, parallel to the weld, and after another four welds, a through hole (0.1%, 0.15%, 0.2%, 0.25%, 0.3% SLRs) was produced 3 m away from the transducer.
Most of the experimental conditions have been mentioned above; however, a few conditions were different for this experiment. The experimental conditions for the spiral pipe (carbon steel) can be clearly seen in Figure 12. The transducer was installed at an angle of 15 degrees, parallel to the weld, and after another four welds, a through hole (0.1%, 0.15%, 0.2%, 0.25%, 0.3% SLRs) was produced 3 m away from the transducer. The collection time and temperature of signals were basically the same as those in Table 1 in our laboratory. Finally, we obtained 100 groups of original signals without defects and 20 groups of five kinds of defects. We also collected 20 sets of signals before producing a hole for testing. It can be seen from Figure 12c that the characteristics of the spiral weld were well preserved. The difficulties of spiral pipe monitoring mainly lie in the following two points: 1. Due to the introduction of the weld, the guided wave echo amplitude of a defect is lower, and the signal-to-noise ratio will also be affected. 2. Compared with the straight pipe, the pure guided wave mode on the spiral pipe is more difficult to excite in the spiral pipe.
Similar to the straight pipe experiment, the final experimental results are shown in Figure 13 and Table 5. The collection time and temperature of signals were basically the same as those in Table 1 in our laboratory. Finally, we obtained 100 groups of original signals without defects and 20 groups of five kinds of defects. We also collected 20 sets of signals before producing a hole for testing. It can be seen from Figure 12c that the characteristics of the spiral weld were well preserved. The difficulties of spiral pipe monitoring mainly lie in the following two points:

1.
Due to the introduction of the weld, the guided wave echo amplitude of a defect is lower, and the signal-to-noise ratio will also be affected.

2.
Compared with the straight pipe, the pure guided wave mode on the spiral pipe is more difficult to excite in the spiral pipe.
Similar to the straight pipe experiment, the final experimental results are shown in Figure 13 and Table 5.   As can be seen from the above Figure 13 and Table 5, on the premise of 100% accurate identification, the minimum defect monitoring threshold of the APCA method was 0.15% SLR, and the AED and OBS were 0.2% SLR. We can also find that the smoothness of damage index K in the spiral pipe was lower than that of the straight pipe, which shows that the performance of the APCA algorithm in spiral pipe is not as good as that in straight pipe.

Bent Pipe Experiment
Again, most of the experimental conditions of the bent pipe have been mentioned above; however, there were just a few different conditions used. As shown in Figure 14a, the pipe (carbon steel) had two welds in the elbow area. The first hole was on the outside, and the second was on the inside. The two holes went from small to large, and the SLRs were 0.09%, 0.18%, 0.30%, 0.45%, and 0.6%.  As can be seen from the above Figure 13 and Table 5, on the premise of 100% accurate identification, the minimum defect monitoring threshold of the APCA method was 0.15% SLR, and the AED and OBS were 0.2% SLR. We can also find that the smoothness of damage index K in the spiral pipe was lower than that of the straight pipe, which shows that the performance of the APCA algorithm in spiral pipe is not as good as that in straight pipe.

Bent Pipe Experiment
Again, most of the experimental conditions of the bent pipe have been mentioned above; however, there were just a few different conditions used. As shown in Figure 14a, the pipe (carbon steel) had two welds in the elbow area. The first hole was on the outside, and the second was on the inside. The two holes went from small to large, and the SLRs were 0.09%, 0.18%, 0.30%, 0.45%, and 0.6%. The acquisition time and temperature of signals were basically the same as those in Table 1; we obtained 100 groups of original signals without defects and 20 groups of five kinds of defect. We also collected 20 sets of signals before producing hole for testing. The difficulties of bent pipe monitoring mainly lie in the following two points: 1. Multiple reflections occur between two welds when the guided wave propagates; moreover, the propagation of guided waves in the bend region is often accompanied by the mode conversion and dispersion. 2. The guided wave will focus on the outer surface of the elbow region, making it more difficult to monitor the inner surface [42].
The pipe and defect information is shown in Figure 14d. As we can see in Figure 14c, the guided wave signal contains many overlapping arrivals [43] and ringing in bend region, the SNR after the bend region is also lower. This makes it difficult to find defects intuitively from the waveform.
The final experimental results are shown in Figure 15 and Tables 6 and 7. The acquisition time and temperature of signals were basically the same as those in Table 1; we obtained 100 groups of original signals without defects and 20 groups of five kinds of defect. We also collected 20 sets of signals before producing hole for testing. The difficulties of bent pipe monitoring mainly lie in the following two points:

1.
Multiple reflections occur between two welds when the guided wave propagates; moreover, the propagation of guided waves in the bend region is often accompanied by the mode conversion and dispersion. 2.
The guided wave will focus on the outer surface of the elbow region, making it more difficult to monitor the inner surface [42].
The pipe and defect information is shown in Figure 14d. As we can see in Figure 14c, the guided wave signal contains many overlapping arrivals [43] and ringing in bend region, the SNR after the bend region is also lower. This makes it difficult to find defects intuitively from the waveform.
The final experimental results are shown in Figure 15 and Tables 6 and 7. 2. The guided wave will focus on the outer surface of the elbow region, making it more difficult to monitor the inner surface [42].
The pipe and defect information is shown in Figure 14d. As we can see in Figure 14c, the guided wave signal contains many overlapping arrivals [43] and ringing in bend region, the SNR after the bend region is also lower. This makes it difficult to find defects intuitively from the waveform.
The final experimental results are shown in Figure 15 and Tables 6 and 7.  As can be seen from the above Figure 15 and Tables 6 and 7, for defects on the outside of the bent pipe and on the premise of 100% accurate identification, the minimum defect monitoring threshold of APCA method was 0.18% SLR, the AED was 0.18% SLR, and the OBS was 0.3% SLR. For defects on the inside of the bent pipe, the minimum defect monitoring threshold of APCA was 0.18%, the OBS and the AED was 0.6% SLR. The results show that the inside defect was more difficult to monitor. At the same time, even at the same defect degree highlighted in the square box in Figure 15a, the damage index of outside defect was larger and smoother than that of inside defect.

Defect Localization
In order to identify the location of defects, the defect information was determined by calculating the contribution rate of each sample point to 2 and the SPE. The contribution rate of each sample ( ) was calculated as the following Equation (30):  As can be seen from the above Figure 15 and Tables 6 and 7, for defects on the outside of the bent pipe and on the premise of 100% accurate identification, the minimum defect monitoring threshold of APCA method was 0.18% SLR, the AED was 0.18% SLR, and the OBS was 0.3% SLR. For defects on the inside of the bent pipe, the minimum defect monitoring threshold of APCA was 0.18%, the OBS and the AED was 0.6% SLR. The results show that the inside defect was more difficult to monitor. At the same time, even at the same defect degree highlighted in the square box in Figure 15a, the damage index of outside defect was larger and smoother than that of inside defect.

Defect Localization
In order to identify the location of defects, the defect information was determined by calculating the contribution rate of each sample point to T 2 and the SPE. The contribution rate of each sample (CR j ) was calculated as the following Equation (30): where CR j is the contribution of a point in a sample to the result. The final contribution diagram is shown in Figure 16a; the straight pipe defect can be identified clearly in the range of 1000-1100 sampling points. The actual location distance of defect is calculated by the following Equation (31): where the f s means the sampling rate of the instrument, N means the sampling points, and v g means the speed of guided wave. The v g of T-mode guided wave in our experiment was about 3250 m/s according to the dispersion curve produced by Zhang [39], the time should be divided by 2 in a pulse echo experiment, and the f s was 1.625 Mhz in our experiment, so the instrument sampled 1000 points per meter-thus the 1000-1100 sampling points, corresponding to the actual distance of 1.0 m to 1.1 m. where the means the sampling rate of the instrument, N means the sampling points, and means the speed of guided wave. The of T-mode guided wave in our experiment was about 3250 m/s according to the dispersion curve produced by Zhang [39], the time should be divided by 2 in a pulse echo experiment, and the was 1. Compared with the result of the spiral pipe, the SNR of the straight pipe was obviously higher, and Figure 16b shows that this was mainly due to the influence of the weld. Multiple reflections of guided waves occur between multiple welds and then lead to the overlapping arrivals of signal. At the same time, for the bent pipe, for signals of different defects in Figure 16c,d, the defect information of an SLR of 0.3% is not obvious, but when the SLR reached 0.45%, the defect's contribution grew greatly, and we can deduce that the defect was located at 1500-1700 feature points.

Conclusions
This paper discusses an APCA method for the monitoring of pipe defects. We established an effective damage index by selecting the number of principal components adaptively and decomposing the characteristics of the original signals. Moreover, the contribution diagram given by the algorithm enriched the defect location information. The results of the above experiments demonstrate that the recognition sensitivity of the APCA method is higher than that of the OBS and AED methods. At the same time, the APCA method also did not misjudge the undamaged test signals in three experiments. In future research, our group will conduct on-site long-term experiments when conditions permit, so that the APCA-based method can be used more effectively for monitoring the Compared with the result of the spiral pipe, the SNR of the straight pipe was obviously higher, and Figure 16b shows that this was mainly due to the influence of the weld. Multiple reflections of guided waves occur between multiple welds and then lead to the overlapping arrivals of signal. At the same time, for the bent pipe, for signals of different defects in Figure 16c,d, the defect information of an SLR of 0.3% is not obvious, but when the SLR reached 0.45%, the defect's contribution grew greatly, and we can deduce that the defect was located at 1500-1700 feature points.

Conclusions
This paper discusses an APCA method for the monitoring of pipe defects. We established an effective damage index by selecting the number of principal components adaptively and decomposing the characteristics of the original signals. Moreover, the contribution diagram given by the algorithm enriched the defect location information. The results of the above experiments demonstrate that the recognition sensitivity of the APCA Sensors 2021, 21, 6640 20 of 21 method is higher than that of the OBS and AED methods. At the same time, the APCA method also did not misjudge the undamaged test signals in three experiments. In future research, our group will conduct on-site long-term experiments when conditions permit, so that the APCA-based method can be used more effectively for monitoring the health of pipes in service.