Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 8, No. 3, 2023 69 Research on Continuous Pipeline Life Prediction Method Based on Fully Connected Neural Network Zhikui Zhang1, Lina Wu2 1 School of Mechanical Engineering, Xi'an Shiyou University, Xi'an City, Shaanxi Province, 710065, China 2 Linyi Dongxing Experimental School, Linyi City, Shandong Province, 276000, China Abstract: Aiming at the low accuracy of traditional empirical formulas in predicting the fatigue life of continuous oil pipelines, a fully connected neural network is utilized to predict the low-week fatigue life of continuous oil pipelines. Considering the influence of internal pressure on the fatigue life of continuous oil pipeline during operation, a prediction method combining the fully connected neural network and gated recirculation unit is proposed, and the experiment proves that the FCNN-GRU neural network performs better in terms of prediction accuracy and stability compared with the BP neural network. Keywords: Continuous oil pipeline; Life prediction; Fully connected neural network; Gated cyclic unit. 1. Introduction Coiled tubing (CT) is made of low carbon alloy steel and is widely used in various fields such as well workover, drilling and logging in oil and gas fields [1]. In the actual working process, CT is prone to surface mechanical damage due to the friction and extrusion with the drum, injection head, well casing and other objects [2]. When the surface mechanical damage and fatigue load act on the tubing body at the same time, it leads to fracture failure of the continuous tubing in serious cases [3], and may even lead to significant economic losses. Therefore, timely and accurate prediction of the fatigue life of continuous oil pipelines is crucial to ensure the safe operation of continuous oil pipelines and oilfields. Joanne Ishak et al.[4] showed that small defects occurring in oilfield environments can significantly reduce the fatigue life of continuous pipelines. A modified Neuber's rule was proposed using notched root strain results. Wan f et al.[5] An evaluation method combining in-line inspection technology and fatigue life can predict the remaining life more accurately. The actual defect size is further incorporated into the fatigue life evaluation calculation to eliminate the unreliability of the existing calculation model that does not consider the defect influence factor. Song Peng et al.[6] proposed a method to construct a fatigue life prediction model for continuous oil pipelines using LMBP artificial neural network (ANN). and the prediction accuracy is significantly better than the conventional modeling method. Yu Guijie [7] used SOFM and RBF to construct a hybrid network model to predict the life of continuous oil pipeline.. No scholars have conducted research on the fatigue life prediction of continuous oil pipeline based on fully connected neural network. In order to enrich the fatigue life prediction method of continuous oil pipeline, a network model based on FCNN-GRU network is established to predict the life of continuous oil pipeline. 2. FCNN-GRU Model Construction The essence of FCNN computation is matrix operation, and the loss value is reduced by forward propagation computation and back propagation computation during the computation process, which has high accuracy [8].GRU can effectively solve the problem of gradient vanishing during the propagation process, and the structure of the network is simpler and has fewer training parameters compared to Long Short Term Memory (LSTM) . The combination of FCNN and GRU can better handle flow pattern data and improve the accuracy of recognizing flow patterns. 2.1. FCNN model FCNN is the most basic neural network structure, neurons are a nonlinear model with multiple inputs and single outputs.There is only one input and output layer in FCNN, which can contain multiple hidden layers as shown in the FCNN model diagram in Fig. 1. Figure 1. FCNN model diagram Between two adjacent layers of FCNN, the output of the previous layer is the input of the next layer, and each node contains weights, biases, and activation functions, the computational process of FCNN is essentially matrix operations. Suppose the output of the jth node in the kth layer is k jy ,then the correspondence between it and the n nodes in the k-1 layer is: k 1 1 y ( )   n k k k j i ij ji f y w b (1) k ijw where is the weight occupied by the output of the ith node in layer k-1 when passed to the jth node in layer k, k jb is the bias corresponding to the jth node in layer k, and f is the activation function. Activation function is a function that enhances the 70 nonlinearity of the network model, the introduction of nonlinear transformation as an activation function can map the input data to a higher dimensional feature space and improve the expressive ability of the network, the commonly used activation functions are mainly Sigmoid, Tanh, Relu, Leaky Relu, Softplus, and Mish, etc., and the activation function of each activation function is shown in Fig. 2. Figure 2. Plot of common activation functions Sigmoid activation function contains power operation and division, in the training process of computation is large, easy to appear gradient disappearance, can not complete the deep network training. Tanh activation function in the positive and negative semiaxis of the limit of the case tends to 1, the training is also easy to appear gradient disappearance. Relu activation function, although to a certain extent to improve the gradient disappearance and the gradient explosion of the problem, but in the backward propagation process, if the input is negative, the gradient will be completely zero, and the problem of neural death will occur. Leaky Relu activation function can solve the problem of neuron death, but due to its linearity, it can not be used for complex classification. Softplus, although it can be derived everywhere and can constrain the neuron output to be constant greater than 0, but it is not centered on 0 making the gradient update slower during training. Compared to other activation functions, the Mish activation function is overall a smooth function with non-monotonically smooth variations in the negative semiaxis allowing for better gradient flow, which ensures better generalization and effective optimization capabilities, with greater stability in deeper networks. The Mish activation function is: ( ) tan (ln(1 ))  xf x x h e (2) ( ) tan ( ) ( )      x x x x e e h x e e (3) 2.2. GRU model GRU was first proposed by Cho et al to capture the dependencies between different time scales.GRU is similar in structure to LSTM, which can achieve almost the same prediction as the same, and is able to solve the problem of gradient explosion and disappearance that occurs in FCNN in practical applications.GRU contains only two gate structures, the update gate rt and the reset gate zt. The structure of the GRU network unit is shown in Fig. 3. Compared with LSTM, the structure is simpler, requires fewer training parameters, and is faster to train. Figure 3. GRU network unit structure In the GRU network structure, xt is the new input at the current moment and ht-1 is the hidden state at the previous moment, and the model equation is expressed as [26]:           ⊙ ⊙ ⊙         x h t z t z t -1 z x h t r t r t -1 r x h t h t t h t -1 h tt t t t -1 z = s w x + w h + b r = s w x + w h + b h = tanh w x + r w h + b h = z h + 1 - z h (4)  th is the candidate hidden layer state; ht is the hidden layer state at time t; ʘ denotes the same-or operation; x zw , h zw , x rw , h rw is the weighting matrix for each door; bz, br and bh is the offset parameter of the respective gate; σ is a sigmoid activation function that can act as a gating signal. 2.3. Regularization techniques Regularization technique refers to the introduction of additional information on the original learning model to solve the overfitting problem[9]. Commonly used regularization schemes mainly include L1, L2 and Dropout regularization techniques.The principle of Dropout regularization technique refers to randomly culling with a certain probability during each iteration of training, and using the network composed of the remaining neurons to train the sample data of this iteration, as shown in Figure 4. During the training process of fully connected neural networks, the Dropout mechanism is employed to significantly simplify the network structure and effectively prevent the neural network from overfitting, thus improving the training efficiency and prediction accuracy of the model. Therefore, the dependence of the prediction results on the hidden layer nodes is successfully reduced by applying the Dropout regularization technique to enhance the generalization ability of GRU. 71 Figure 4. Schematic diagram of neural network Dropout 3. Data set and Experimental Environment 3.1. Data set processing The dataset used for the experiments is derived from the results of continuous pipeline fatigue tests in literature [10] and literature [7], and is summarized in a total of 20 sets of data, as shown in Table 1. numbered 1-15 is the training set, and 16-20 is the test set. Table 1. Summary of continuous pipeline fatigue data sample number Coiled tubing outer diameter /mm Wall Thickness /mm Bend radius /mm Internal pressure /MPa Test cycles frequency 1 31.75 2.210 1219.0 1.72 522 2 31.75 2.210 1219.0 10.34 517 3 31.75 2.210 1219.0 27.58 212 4 31.75 2.210 1219.0 34.48 128 5 38.10 4.445 1828.8 31.03 325 6 38.10 4.445 1828.8 31.03 354 7 44.45 2.769 1828.8 27.58 93 8 44.45 3.962 1828.8 27.58 247 9 44.45 2.769 1219.0 1.72 362 10 44.45 2.769 1219.0 6.89 262 11 44.45 2.769 1219.0 13.79 216 12 44.45 2.769 1219.0 27.58 99 13 44.45 2.769 1219.0 34.48 49 14 44.45 3.962 1219.0 13.79 311 15 44.45 3.962 1219.0 27.58 235 16 60.32 3.404 1828.8 17.24 74 17 31.75 2.210 1219.0 20.68 333 18 38.10 3.962 1828.8 37.58 247 19 44.45 3.175 1828.8 31.03 325 20 44.45 2.769 1219.0 20.68 170 3.2. Experimental environment Table 2. Experimental environment Name Exeperimental Configuration Operating System Windows11 Programming Language Python Deep Learning Framework Pytorch CPU Intel(R) Core(TM) i7-14700k GPU NVIDIA GeForce RTX 4060 12GB CUDA Cuda 12.1 Flat-roofed Building Pycharm 2022.3 3.3. Network training The hyperparameter settings for this experiment have an initial learning rate of 0.01,momentum of 0.946, training number of 200, and a weight decay rate of 0.0005 using the SGD optimizer. 4. Experimental Results and Analysis The evaluation metrics used in this experiment are Precision P (Precision), Recall R (Recall), Average Precision AP (Average Precision), Mean Average Precision mAP (meanAP ,mAP), and the related evaluation metrics are: TP P Precision = TP+FP ( ) (5) 72 TP R Recall = TP+FN ( ) (6) n 1 0 i=1 AP= P i ΔR i = P R dR ( ) ( ) ( ) (7) N i i=1 AP mAP= N  (8) With the continuous training of the model, the localization loss (box_loss) and classification loss (cls_loss) of the training set continue to decrease, and the confidence loss (obj_loss) of the training set stabilizes at around 0.02 after 100 rounds of training. The localization loss and confidence loss of the validation set stabilized at around 0.0025 and 0.003 respectively after 150 rounds of training, and the classification loss stabilized at around 0.001. The improved model has a detection accuracy close to 0.98 after 150 rounds of training. Figure 5. FCNN-GRU model effect diagram 4.1. Two network prediction results In order to test the comprehensive performance of the FCNN-GRU algorithm, a BP neural network was chosen to train and test the FCNN-GRU fractal under the same continuous pipeline fatigue dataset, training set, and experimental strategy, and the network test results were obtained as shown in Fig. 6. (a) #8Training samples (b) #12Training samples Figure 6. Neural network prediction results for samples #8 and #12 As can be seen from Figure 6, the two neural networks do 15 experiments under the conditions of the same provision of training samples and experimental strategies, the test results of FCNN-GRU's network are stable, while the test results of the BP neural network fluctuate up and down around the experimental values, which indicates that the overall stability of the FCNN-GRU network is better than that of the BP neural network, and thus the FCNN-GRU neural network has good accuracy and generalization FCNN neural networks have the advantages of weight sharing and local awareness, but FCNN has some disadvantages in dealing with time series data, while gated recurrent unit (GRU) can deal with the problem of insufficient dependence on long distance of time series. 73 5. Concluding A neural network model combining a fully connected neural network (FCNN) and a gated recurrent unit (GRU) is applied to predict the fatigue life of a continuous oil pipe. Among them, the GRU, as a variant of the RNN, has a memory function and incorporates temporal features, so that the FCNN-GRU model is able to capture the time nodes at which the degradation characteristics of the continuous pipeline life appear, and to improve the prediction accuracy of the remaining service life of the continuous pipeline. References [1] He Huiqun (China University of Petroleum, Beijing) Development of coiled tubing technique and equipment. CPM, 2006, 34(1): 1~6 [2] Tipton S M , Carlson G H , Sorem J R .Fatigue Integrity Analysis of Rotating Coiled Tubing [J]. Society of Petroleum Engineers, 2006.DOI:10.2118/100068-MS. [3] Li lei et.al. An experimental study of the coiled tubing under the effect of internal pressure and cyclic bending [J]. CPM, 2011,39(1):5-7. [4] shak J, Badr E A. A modified rule for estimating notch root strains in ball defects existing in coiled tubing[J]. Engineering Failure Analysis, 2022, 134: 106026 [5] WANF, ZHOU Zhaoming, ZHANG Jian, et al. Optimization of fatigue life prediction of continuous oil pipe based on online inspection data_Wanfu[J]. Drilling Process, 2020, 43(06): 9-12, 6. [6] PENG Song, ZHANG Quanli, WANG Hongwei, et al. Fatigue life prediction method of continuous oil pipe based on LMBP neural network[J]. Petroleum Pipes and Instruments, 2018, 4(06): 36-40. [7] YU Guijie, ZHAO Chong, CHI Jianwei, et al. Fatigue life prediction of continuous oil pipeline based on artificial neural network[J]. Journal of China University of Petroleum (Natural Science Edition), 2018, 42(03): 131-136 [8] Pratt H, Williams B, Coenen F, et al. Fcnn: Fourier convolutional neural networks[C]//Machine Learning and Knowledge Discovery in Databases: European Conference, ECML PKDD 2017, Skopje, Macedonia, September 18–22, 2017, Proceedings, Part I 17. Springer International Publishing, 2017: 786-798. [9] HUANG Bingjia, WANG Jian, WEN Yanqing, et al. Convergence analysis of inverse iterative algorithms forneural networks with L(1/2)penalty [J]. Journal of Chi-na University of Petroleum(Edition of Natural Sci-ence), 2015, 39(2): 164- 170. [10] NEWMAN KR, BROWN P A, Development of a standardcoiled-tubing fatigue test [C]//Paper presented at the SPE An-nual Technical Conference and Exhibition, Houston, Texas, USA:Society of Petroleum Engineers, 1993,3-6.