Professional Documents
Culture Documents
PVP2023-106300
Prediction of Depth Defects During Pipeline Magnetic Flux Leakage Detection Based on the AVOA-BPNN
Lushuai Xu1,3,4, Shaohua Dong1,2,3,4*, Donghua Peng5, Haotian Wei2,3,4, Yundong Ma2,3,4
1
College of Artificial Intelligence, China University of Petroleum, Beijing, China
2
College of Safety and Ocean Engineering, China University of Petroleum, Beijing, China
3
Pipeline Research Center, China University of Petroleum, Beijing, China
4
Key Laboratory of Oil and Gas Safety and Emergency Technology, Ministry of Emergency Management, Beijing, China
5
PipeChina Beijing Pipeline Co.,Ltd., Beijing, China
Abstract: algorithm easily falling into the local optimum. The magnetic
The complex operational conditions of in-service pipelines triaxial leakage signals of the internal and external pipeline
and the extended service time make them susceptible to metal loss, defects collected via 60 sets of drafting experiments were used as
which can lead to pipeline failure. However, quantifying the examples, while a particle swarm optimized BPNN (PSO-BPNN),
defect depth presents a challenge to current research. The depth genetic algorithm optimized BPNN (GA-BPNN), and an
quantification accuracy of pipeline defects can be improved, and unoptimized BPNN were used as models for comparative analysis.
the defect state of long-distance pipelines can be accurately The results showed that optimizing the BPNN using AVOA
controlled by building a model based on the internal magnetic substantially improved the prediction accuracy of the BPNN
flux signal. This study performed a pulling experiment for model. The AVOA-BPNN model predicted 12 sets of pipe defect
internal magnetic flux leakage detection in pipelines and depths with an average relative error (MRE) of only 2.67% and a
extracted the triaxial leakage signals of 60 internal and external determination coefficient (R2) of 0.99800, which exceeded the
pipeline defects. Firstly, Pearson correlation coefficient is used to values of the BPNN, PSO-BPNN, and GA-BPNN models. The
extract the seven main influencing factors affecting the depth of AVOA-BPNN uses the internal leakage detection signal to predict
pipeline leakage defects, namely axial signal peak-valley value, the depth of pipe defects, supporting effective decision-making
axial signal waveform area, axial signal waveform energy, regarding pipe inspection and maintenance.
circumferential signal peak-valley value, radial signal Keywords: Africans Vultures Optimization Algorithm; MFL;
peak-valley value, axial integral signal peak-valley value, and BP Neural Network; Pipeline Defects Inversion; Size Prediction
radial integral signal peak-valley value. Secondly, the initial
weights and thresholds of the backpropagation neural network 1 Introduction
(BPNN) were optimized using the African Vulture Optimization
Magnetic flux leakage detection is a commonly used
Algorithm (AVOA). Furthermore, an AVOA-BPNN-based defect
nondestructive method for defect identification [1]. Compared
depth prediction model for pipe leakage detection was
with ultrasonic [2] and eddy current detection [3], magnetic flux
established to address the problem challenge of the BPNN
leakage detection is widely used for identifying oil and gas
1
pipeline defects due to advantages such as high reliability, Vulture Optimization Algorithm (AVOA) [20] to improve its
excellent detection accuracy, and a high degree of automation global optimization capacity and its ability to approximate
[4-6]. complex nonlinear functions, enhancing the prediction accuracy
The inverse evaluation of defect magnetic flux leakage of the pipeline body defect depth.
detection signals provides essential guidance for the operation This study is based on the established magnetic flux leakage
and maintenance of tested components or facilities. Inversion signal analysis model to predict the depth of pipeline body
methods can be roughly divided into two categories according to defects. The specific structure is as follows: Chapter 2 establishes
the presence of an iterative loop structure during the signal the inversion model of the magnetic flux leakage detection defect
inversion process, including open-loop and closed-loop depth based on the AVOA-BPNN, Chapter 3 introduces the
pseudo-inversion. Open-loop inversion involves nonlinear evaluation indexes of the model, and Chapter 4 verifies the
mapping between the defect signal and size by extracting defect accuracy and robustness of the defect inversion model established
data to estimate the defect size [7-8]. YU [9] proposed a complex in this paper.
defect inversion algorithm based on WT-STACK and constructed
an adaptive iterative stacking learning model with dynamic 2 Models and methods
multi-axis time-frequency domain features as input by studying
2.1 Pearson correlation coefficient
the nonlinear relationship between the features and the defect size.
Although the pipeline leakage signal contains a large amount
WU [10] proposed a defect depth contour reconstruction
of information, many of these features have a negligible impact
algorithm based on reinforcement learning. The iterative strategy
on the defect depth quantification. Entering the information into
design challenge can be avoided by embedding the iterative
the BP neural network can lead to overfitting, causing it to fall
process into the reinforcement learning process to generate
into the local optimum. Therefore, the Pearson correlation
learning approaches. Although open-loop inversion offers rapid
coefficient was used to extract the indicators with the most
calculation, its defect depth inversion accuracy is low [11-12].
significant impact on the defect depth quantification from this
Closed-loop pseudo-inversion simulates defect signals based on
data. This reduces the number of input nodes to the BP neural
physical mechanisms, such as the magnetic dipole [13] and finite
network and improves the defect depth quantification accuracy.
element models [14], and reconstructs defect profiles by
The Pearson correlation coefficient is based on statistical
constantly enhancing the parameters via optimization algorithms.
principles and evaluates the relationship between variables. It is
KANDROODI M R [15] estimated defect lengths and depths
used to calculate the relationship between the characteristics of
based on magnetic flux. LI [16] proposed an improved MHS
the magnetic leakage signal and the pipeline body defects to
algorithm to reconstruct the defect profile. The solution process
extract the main influencing factors. The Pearson correlation
of the closed-loop pseudo-inverse method is highly complex and
coefficient is represented by ��,� , an index calculated via actual
presents disadvantages like extensive calculations and poor
sample data [22] according to Formula (1).
model universality. Therefore, it is unsuitable for evaluating
��−� ��−�
large-scale magnetic leakage detection signals [17-19]. ��,� =
��−� 2 �� −� 2
(1)
This paper proposes a defect depth inversion method
where, �� , �� is a group of (�, �) sample values, while �
involving internal magnetic leakage detection data based on
and � represent the sample average.
triaxial information fusion to address the challenges of low defect
The ��,� interval is [ − 1, 1] . ��,� ∈ [ − 1, 0) indicates a
inversion accuracy and poor model universality. First, 60 groups
negative correlation, while ��,� ∈ (0,1] denotes a positive
of defect magnetic flux leakage signals are extracted via magnetic
correlation. A larger ��,� signifies a stronger correlation.
pipeline leakage drafting experiments. Second, the main features
When ��,� = 1 , � and � display a complete linear
of the magnetic flux leakage signals affecting the depth inversion
correlation.
of pipeline defects are extracted using the Pearson correlation
When ��,� > 0, � and � are positively correlated.
coefficient method. Finally, since the backpropagation neural
When ��,� <0, � and � are negatively correlated.
network (BPNN) tends to fall into the local optimum, its initial
When ��,� = 0, there is no correlation between � and �.
weights and thresholds [21] are optimized using the African
When ��,� < 0.2 , � and � display a relatively weak
2
correlation. N
correlation. t k f ( pk ) (5)
When 0.4 ≤ ��,� < 0.6 , � and � display a moderate where xi is the BPNN input value, wij is the weight
correlation.
value from the input to the hidden layer, b j and bk are the
When 0.6 ≤ ��,� < 0.8 , � and � display a strong
thresholds of the hidden and output layers, s j and a j are the
correlation.
input and output values of the hidden layer, w jk is the weight
When 0.8 ≤ ��,� < 1.0 , � and � display a very strong
between the hidden and output layers, p k and t k are the input
correlation.
and output values of the output layer, and
f (x)
is the transfer
2.2 The BPNN and optimization algorithm
function of the neural network.
Although the BPNN model exhibits a strong nonlinear
The error function formula of the backpropagation error and
function fitting ability, the model often falls into the local optimal
the formula for the weight threshold correction coefficient are as
due to improper establishment of the initial weight and threshold,
follows [9] :
resulting in poor prediction results. To improve the deficiencies 2
N
of BPNN ontology, this paper proposed AVOA to optimize the f i ( yk yk ) (6)
initial BPNN value, while the GA and PSO were used as k 1
calculated according to Formula (2-5) [9]: where m is the total number of chromosomes, f i is the
L fitness of the ith individual, N is the total number of samples,
sj w x b
j 1
ij i j (2) and Pi is the probability of the i th individual being selected.
2) Cross. This paper employed the crossover method of real
a j f (s j ) (3) numbers using Formula (12):
3
x tA 1 αx t
1 α x tA
n
where pi = fi / i=1 fi .
x Bt 1 αx
B
t
1 α x Bt
} (12) Ri (t) is the position of the other vultures except for the
A
optimal and suboptimal vultures, while Best V1 and BestV2 are
where x tA and x Bt represent the cross of two
chromosomes, A and B , at the tth position, while a is the the optimal and suboptimal vulture positions, respectively.
random number between [0,1]. L1 and L2 are the parameters to be measured between 0 and 1,
3) Variation. The mutation operation was represented by with a sum of 1, pi is the probability of selecting the best vulture,
Formula (13): fi is the fitness of the other vultures, and t is the current iteration
xk xmin β xmax xmin (13) number.
where xmin and xmax represent the lower and upper bounds (2) Vulture satiation rate
of the gene, β is the random number on [0,1], and xk is the Since vultures forage extensively, they can cover a wider
new gene after mutation. area when they are satiated, which provides them with more
2.2.3 The PSO method
energy. If they are hungry, they do not have enough energy to fly
The PSO algorithm principle involves randomly initializing
and forage near stronger vultures. Satiety is mathematically
a group of particles and updating the particle swarm by tracking
described as:
extreme individual and group values. The particle velocity and
� = 2����1 + 1 �(1 − �/�) + ℎ ���� (��/(2�)) +
position were updated according to Formulas (14) and (15)
��� (��/(2�)) − 1] (18)
[27-28]:
where F is the satiety rate of the vultures, rand1 is a
vi, j (t 1) wvi, j (t) c1r1[ pi, j xi, j (t)]
(14) random number between 0 and 1, T is the maximum number of
c2r2[ pg, j xi, j (t)]
iterations, z is a random number between -1 and 1, h is a random
xi , j (t 1) xi , j (t ) vi , j (t 1) (15)
number between -2 and 2, and w is the parameter controlling the
where vi , j (t 1) is the particle velocity, xi , j (t 1) is the investigation process. A higher w value increases the probability
of the algorithm entering the investigation stage, and vice versa,
particle position, c1 and c2 are learning factors, r1 and r2 the probability decreases.
are two random numbers in the interval [0,1], and w is the (3) Exploration stage
inertial weight. Vultures have excellent visual and foraging abilities. In
The inertial weight decreased linearly [24] and was AVOA, vultures randomly search different areas via the
calculated using Formula (16): following formula:
w wmin
w wmax max t (16)
t max �� (�) − ��� (�) − �� (�) � �1⩾�����1
where t and t max represent the initial current and �� (� + 1) = �� (�) − � + ����2 �� − �� ����3 + �� (19)
�1 < �����1
maximum iteration numbers, and wmax and wmin are the
initial and final values of the inertial weight. where Pi t + 1 and Pi t are the positions of vultures in
2.2.4 AVOA the t + 1 and t iterations, respectively, X is the area where
AVOA is a meta-heuristic optimization algorithm inspired vultures move randomly to protect food from other vultures, X =
by the foraging and navigation behavior of African vultures. The 2rand (a rand is a random number between 0 and 1), P1 selects
principle of the AVOA algorithm [20] involves the following: parameters for the exploration stage, rand2, rand3 and randP1 are
(1) Determine the best vulture random numbers between 0 and 1, and ub and lb are the upper
By calculating the fitness of all vultures in the population, and lower limits of the search space, respectively.
AVOA selects the vultures corresponding to the optimal and (4) Development stage
suboptimal fitness as the optimal and suboptimal positions, while In AVOA, the development stage is divided into two
other vultures move to the optimal and suboptimal vultures using strategies: development stage I and development stage II.
the following formula: Parameters P2 and P3 are selected during the development stage
���� �1 �� = �1 to determine the updated position of the strategy. The vulture
�� (�) = (17)
���� �2 �� = �2 position updates during development stages I and II are described
4
as follows: number of iterations and update strategy selection parameters at
each stage were established, and the vulture population position
��� (�) − �� (�) � + ����4 −
�� (�) − �� (�) �2 ⩾�����2 was randomly initialized.
�� (� + 1) = ����5 ��(�) (20) Step 2: The fitness values of all vultures were calculated,
�� (�) − �� (�) 2�
��� �� (�) +
and the optimal and sub-optimal positions of BestV1 and BestV2
����6 ��(�)
2�
��� �� (�) < �����2 were determined.
�
����1 (�) −
���� �1 (�)�� (�)
+ Step 3: Formula (17) was used to calculate the position of
2 ���� �1 (�)−�� (�)2
���� �2 (�)�� (�) each vulture. Formula (18) was used to calculate the vulture feed
����2 (�) −
�����2 (�)−�� (�)2
�� (� + 1) = (21) rate. If |F|⩾1 , Formula (5) was used to update the vulture
�3⩾�����3
positions. If 0.5⩽|F| < 1 , Formula (19) was used to update the
�� (�) − �� (�) − �� (�) ����� (�)
�3 < �����3 vulture positions. If 0⩽|F| < 0.5, Formula (20) and Formula (21)
where rand 4 , rand 5, rand 6 , randP2 ��� randP3 are random were used to update the vulture positions.
numbers between 0 and 1, respectively, while Step 4: The fitness values of all the vultures were calculated
Best V1 t ��� Best2 (t) refer to migration. The direction of each after the position update and compared to determine the optimal
step is completely random and isotropic, with the step length and suboptimal positions.
displaying heavy tail distribution. Step 5: Set � = � + 1 . If the termination condition was
2.3 AVOA-BPNN satisfied, Best �1 was output, and the algorithm ended.
Based on the AOVA optimization of the initial weights and Otherwise, Step 3 was repeated.
thresholds of the BPNN, an AVOA-BPNN model was established Step 6: Best V1 was produced, representing the initial
to improve the global BPNN optimization ability. The process is weight and threshold of the BPNN. The AVOA-BPNN model was
shown in Figure 2. The main steps were as follows: used to predict the depth of metal loss in the pipeline body.
Step 1: The AVOA population size and the maximum
5
3. Model evaluation index
yi yi0
RE (22)
yi0
1
N yi yi0
MRE
N
i 1 yi0
100% (23)
FIGURE 3: THE PIPELINE EXPERIMENT PLATFORM
Figure 3 The pipeline drafting experiment platform
2
N
N N
Here, 60 groups of magnetic leakage signals of the pipeline
N yi yi0 yi yi0
R2 i 1 i 1 i 1 (24) defects were collected. Figure 4 shows the corresponding
N 0 2 N 0 2 N N
2
intercepted magnetic leakage signals of some of the pipeline
N ( yi ) yi N yi yi
i 1 i 1 i 1 defects. An increase in the defect depth elevated the magnetic
i 1
leakage flux in the pipeline, as well as the waveform amplitude.
The X, Y, and Z axis eigenvalues were extracted, while only 20
Where y i is the accurate sample data, y i0 is the model
detection data groups were presented in this paper. As shown in
prediction data, and N is the total number of test samples.
Table 1, each data set contained 16 magnetic leakage signal data
items. This included the pipeline body defect depth (metal loss
4. Application example
depth/wall thickness) (DP), the axial signal peak-valley value (A),
4.1 Data collection the axial signal waveform area (B), the axial signal waveform
The pipeline defects and nicks were designed, the pipeline energy (C), the circumferential signal peak-valley value (D), the
magnetic leakage drafting experiment platform was built, and the radial signal peak-valley value (E), the axial signal peak-peak
experiment was performed. Figure 3 shows the pipeline drafting distance (F), the axial signal threshold length (G), the axial
experiment platform. The internal magnetic leakage detector of integral signal peak-valley distance (H), the axial integral signal
the pipeline was drafted by the hoist to detect defects while their peak-valley value (I), the circumferential signal threshold length
magnetic leakage signals were collected. (J), the radial signal peak-valley distance (K), the circumferential
integral signal peak-valley distance (L), the circumferential
integral signal peak-valley value (M), the radial integral signal
peak-valley distance (N), and the radial integral signal
peak-valley value (O). Furthermore, 48 groups of data were
randomly selected for each model to learn and train, while the
remaining 12 data groups were used to test and analyze each
model.
6
FIGURE 4: THE RELATION BETWEEN THE PIPELINE DEFECTS AND THE MFL SIGNALS
TABLE 1: THE CHARACTERISTIC VALVES OF THE MFL SIGNALS
No. A B C D E F G H I J K L M N O DP
1 48.75 519.25 18258.813 13.5 66.25 1 13 10 20625 28 2 9 4875 7 15000 0.15
2 68.5 535.75 21303.438 22 90.5 1 12 4 42625 31 6 8 6250 6 39250 0.2
3 139.25 2194.5 233336.5 35.25 191 2 22 15 40250 35 8 6 9125 8 28125 0.35
4 208 2222.75 347354.063 57 288.5 2 14 10 74375 29 5 10 13875 8 59875 0.5
5 14.75 425.25 4591.313 9.75 21.25 20 43 6 6125 44 19 2 5750 5 5500 0.1
6 28.75 929.25 20171.313 11.5 42 22 50 32 10625 50 16 3 5250 35 8875 0.2
7 37.25 1380 40214 19 66.75 30 59 40 12625 60 18 39 5500 5 11000 0.35
8 46.5 1460.5 55570 22.25 96.75 26 37 34 25625 49 17 2 4875 6 18500 0.5
9 42.75 524 16225.25 21.5 52.5 1 18 12 14500 31 5 7 6500 8 11250 0.05
10 48.75 519.25 18258.813 13.5 66.25 1 13 10 20625 28 2 9 4875 7 15000 0.15
4.2 The correlation of influencing factors peak-valley distance
According to the internal pipeline magnetic leakage Axial integrated signal
9 0.6197
detection data collected during the experiment, the Pearson peak-valley value
correlation coefficient method was adopted to calculate the Circumferential signal threshold
10 0.2009
correlation coefficient of the factors influencing the depth length
quantization of the signals, as shown in Table 2. 11 Radial signal peak-valley distance -0.0016
TABLE 2: THE PEARSON CORRELATION COEFFICIENT Circumferential integrated signal
12 0.0963
OF THE INFLUNCING FACTORS peak-valley distance
Pearson correlation Circumferential integral signal
No. Influencing Factors 13 0.5578
coefficient peak-valley value
1 Axial signal peak-valley value 0.6638 Radial integral signal peak-valley
14 0.0711
2 Axial signal waveform area 0.6817 distance
3 Axial signal waveform energy 0.6051 Radial integral signal peak-valley
15 0.6468
Circumferential signal value
4 0.6627
peak-valley value 4.3 Prediction model parameter settings
5 Radial signal peak-valley value 0.6891 4.3.1 The BPNN network settings
Axial signal peak-to-peak The BPNN consists of a three-layered network structure,
6 0.1395
distance namely the input, hidden, and output layers. The node numbers of
7 Axial signal threshold length 0.0141 each layer were set as follows:
8 Axial integration signal 0.1124 The node of the BPNN input layer was set as 7, with the
7
axial signal peak-valley value, axial signal waveform area, axial predicted by the AVOA-BPNN was the closest to the measured
signal waveform energy, circumferential signal peak-valley value, value. Compared with the unoptimized BPNN, its prediction
radial signal peak-valley value, axial integral signal peak-valley accuracy of the AVOA-BPNN was significantly improved,
value, and radial integral signal peak-valley value as the input. exceeding that of the PSO-BPNN and GA-BPNN.
The prediction accuracy was optimal at a detected hidden layer
node number of 15. Therefore, the hidden layer nodes were set as
15. Since the output of the BP neural network was represented by
the metal loss depth of the pipeline body, the output layer node
was set to 1.
The training function was set as traingd, while the tansig
function was selected as the transfer function of the hidden layer
and expressed via Formula (25). The transfer function of the
output layer was set as logsig and expressed using Equation (26).
1
y 1 (25)
(1 e 2 x )
1 FIGURE 5: THE MODEL PREDICTION RESULTS
y (26)
Figure 6 shows a diagram comparing the RE between the
(1 e x )
where x and y represent the node input and output, prediction results. The BPNN displayed the most significant
respectively. prediction errors, followed by the GA-BPNN. The GA-BPNN
4.3.2 Model initialization settings performed better than the BPNN and PSO-BPNN, while the
The neural network portions of the GA-BPNN, PSO BPNN, AVOA-BPNN produced the smallest relative prediction error
and AVOA-BPNN were established using the method in Section with the lowest curve. This reflects the robustness of the
4.3.1, with a network topology of 7-15-1, a step size of 0.05, a AVOA-BPNN model and its excellent accuracy in predicting
MaxT of 100000, and an error target of 10-6. Table 3, Table 4, results.
and Table 5 show the initial parameter settings of the GA, PSO,
and AVOA models, respectively.
TABLE 3:THE GA INITIALIZATION PARAMETERS
Parameter Value Parameter Value
Population size 40 Crossover probability 0.6
MaxT 80 Mutation probability 0.05
Training accuracy 10 -6
ACKNOWLEDGEMENTS
References
11