{'fraction_non_alphanumeric': 0.024858688385096944, 'fraction_numerical': 0.016471160274721935, 'mean_word_length': 4.8388928317956, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Failure pressure prediction of pipeline with single corrosion defect using artificial neural network

This paper describes the development and application of artificial neural network (ANN) to predict the failure pressure of single corrosion affected pipes subjected to internal pressure only. The development of the ANN model is based on the results of 71 sets of full-scale burst test data of pipe grades ranging from API 5L X42 to X100. The ANN model was developed using MATLAB’s Neural Network Toolbox with 1 hidden layer and 30 neurons. Before further deployment, the developed ANN model was compared against the training data and it produced a coefficient of determination of 0.99. The developed ANN model was further tested against a set of failure pressure data of API 5L X52 and X80 grade corroded pipes. Results revealed that the developed ANN model is able to predict the failure pressure with good margins of error (within 15%). Furthermore, the developed ANN model was used to determine the failure trends when corrosion defect length and depth were varied. Results from this failure trend analysis revealed that corrosion defect depth is the most significant parameter when it comes to corroded pipeline failure.


Overview of corrosion and corrosion assessment methods
A statistical analysis based on long-distance pipeline failure frequencies, causes, and consequences occurred in US, Europe, UK and China have shown that corrosion is one of the top 3 causes for oil and gas pipeline failures [1]. In deep water scenario, corrosion is recognized as a critical degradation factor in metal pipelines [2].
Various studies have been carried out to investigate the failure or bursting behavior of pipelines with single corrosion defect [3][4][5]. In line with that, corrosion assessment methods have been developed to assist in determining the remaining strength of pipelines and are commonly used by industries. These corrosion assessment methods include the ASME B31G [6], the DNV RP-F101 (DNV) [7], and ABS.
DNV is considered the most accurate as the flow stress utilized in it is the ultimate tensile strength (UTS) of the pipe material instead of the commonly used yield strength as in ASME B31G code. In addition, it uses probabilistic method to determine its safety factors thus allowing for a more realistic failure pressure prediction. Yet, DNV is still considered as a deterministic approach akin to other corrosion assessment methods such as ASME B31G and PCORRC since the safety factors represent averaged value and variation of parameters are not included in the calculation of pipeline failure pressure. This eventually leads to over-conservativeness in DNV's prediction of pipeline remaining strength.
In this paper, a predictive model based on Artificial Neural Network (ANN) to determine the failure pressure of corroded pipeline is developed. Neural Network toolbox in MATLAB is used to develop the predictive model based on full-scale burst test data obtained from various literatures.

Overview of machine learning and ANN
Machine learning is the ability of computers or machines to learn without being programmed specifically [8]. Machine learning can be differentiated into two categories which are supervised and unsupervised learning [9].
In supervised learning, the input and output variables are provided to the model and it will use an algorithm to determine the relationship and mapping function between the input and output. In addition, the learning process of the algorithm will be supervised and modified until the level of performance is acceptable. As for unsupervised learning, only input data will be provided to the model and it will have to analyze the data based on pattern of the dataset or distribution of the data. Unlike supervised learning, unsupervised learning will require the machine to learn independently to analyze and determine the relevant information in the input data provided to generate useful data to the user.
In machine learning, there are numerous approaches and algorithms developed to cope with different kinds of problems such as time series problems, classification, regression problems and more [10]. Each of the algorithms has its own advantages and disadvantages which allow them to solve specific problem as required by the users.
An ANN is a type of supervised learning where the input and output data need to be provided to the model. It is known that the architecture of an ANN is akin to the human brain where it functions by mimicking the way human brain works. The main advantage of the ANN is its ability to process information from the training samples. Additionally, ANNs possess the ability to implicitly detect complex non-linear relationships between independent and dependent variables [11]. Through training based on samples, ANNs can predict accurate solutions under any undefined inputs in many research fields. Silva [14] utilized ANN as well to predict the corrosion rate of magnesium alloys. Coupled with sensitivity analysis by fuzzy curves, ANN was proven to be able to accurately determine the corrosion rate of magnesium alloys with various ranges of compositions. Taking advantage of the ability of ANN to include multiple variables (11 variables in this research), El-Abbasy et al. (2014) [15] managed to train their ANN model to accurately predict the corrosion rates of pipe with an average accuracy of 97%. Similar methods were used by Zangenehmadar and Moselhi (2016) [16] to determine the residual life of pipes using ANN.
An ANN consists of several data processing nodes called neurons. The neurons or nodes are grouped in several layers called input, one or several hidden layers and an output. In a typical feed-forward ANN structure as shown in Fig. 1, data in the form of signal is sent to the input layer neurons and transferred to the next layers through the connections between the neurons until the signal reaches the output layer. Neurons at the hidden layer will act as the processing unit for the ANN structure by altering the weights allocated to the input signal to yield the output results.

In-depth view of corrosion assessment methods
Carbon steel pipelines have been widely used for transportation of hydrocarbon due to the high strength to weight ratio of the material, resulting in lower material cost. Pipelines made of carbon steel are often subjected to corrosion over their service life, resulting in the reduction of wall thickness. Many researches have been carried out to develop methods for assessing the remaining strength of corroded pipelines and those methods will be covered in this section [18].

ASME B31G and modified ASME B31G
This model includes defects in pipelines where the defects are the result of operational conditions [6]. The method is based on the 'Dugdale Plastic Zone Model', the Folias factor, M and an empiricism-based definition of defect depth, d. The database used for developing this model consisted of thin-walled pipes with medium strength and high toughness. Equations (1) to (5) depict the equations for ASME B31G. Note that for ASME B31G, Equation (4) is used when while Equation (5) is used when Equations (6) to (8) depict the equations for Modified ASME B31G. Note that for Modified ASME B31G, Equation (6) is used when while Equation (7)

DNV RP-F101 (DNV)
This model was first issued in 1999 and developed based on 138 burst tests [7]. These tests covered pipeline material grades ranging from API 5L X42 to X65 and diameters in the range of 291.1 mm to 914.4 mm. The recommended practice offers two different methods (Part A and Part B). This model can be applied to both, single corrosion defect as well as interacting corrosion defects. In the case of a single defect (Part B), Equations (9) to (11) applies for failure pressure calculation. Note that in Equation (10), the parameter Q includes the defect geometry.

Barlow's Formula
Barlow's Formula is a calculation that can be used to determine the maximum stress capacity a pipe can safely withstand. It is also used to show the relationship between internal pressure, allowable stress or hoop stress, nominal thickness, and diameter of a pipeline. As depicted in equation (12), this formula is very general as corrosion defect geometries are not considered in the calculation. Barlow's Formula is generally used to determine the failure pressure of pipes.

Parameters selection
In this study, the pipe true ultimate tensile strength, nominal diameter and nominal thickness, as well as corrosion defect depth and length were considered as input parameters. Note that the corrosion defect depth and length are referred to in their normalized forms, i.e. normalized defect depth as d/t and normalized defect length as l/D. Based on these input parameters, the output parameter is the normalized pipe failure pressure,

Data collection and pre-processing
Seventy-one full-scale burst test results of corroded pipes, with grades ranging from API 5L X42 to API 5L X100, and their respective necessary parameters (referred as input parameters) were obtained from past literatures [19][20][21][22][23][24][25][26][27][28] and utilized as training data for machine learning. 14 validated FEA results from API 5L X52 grade pipes [29], as well as 5 full-scale burst test results from API 5L X80 grade pipes [26] were utilized as validation and testing data. Table 1 tabulates the sets of data that would be used from here onwards.

ANN modelling and simulation
Neural Network Toolbox using the 'nnstart' command in MATLAB was utilized to develop the ANN model. In the Neural Network Toolbox interface, neural fitting tool was chosen. Further ANN development is based on the flow chat depicted by Fig. 2. The process of defining and obtaining the input and output data was carried out by running the following MATLAB code snippet. 1 x = train_normalized; 2 t = target_normalized; The variable x in line 1 represents the input data (i.e. normalized defect depth and length) while variable t in line 2 represents the output data (i.e. normalized pipe failure pressure). The process of setting the environment to assist the development of the ANN model is done by running the following MATLAB code snippet.

Parameter Value
Iterations 1000 Minimum gradient 1E-10 Validation Check 1000 algorithm. It is equipped with sigmoid transfer function in hidden neurons and linear function in output neuron that can fit multi-dimensional mapping problems. Line 4 and 5 show the creation of an ANN architecture of 1 hidden layer with 30 neurons. Determination of the optimum hidden layer size was done based on equation (13).
The ANN training criterion is presented in Table 2. These values are inserted in the Neural Network Training (nntraintool) interface.
The ANN is trained by running the following MATLAB code snippet. Line 6 shows that the ANN is being trained with input data, x (as per line 1) and output data, t (as per line 2).

6
[net,tr]=train(net,x,t); The trained ANN is validated by running the following MATLAB code snippet. Line 7 shows that mean squared error is utilized to evaluate the prediction performance of ANN. Lines 8 to 10 are the MATLAB codes to evaluate the overall prediction performance of the ANN. 7 net.performFcn = 'mse'; 8 y = net(x); 9 e = gsubtract(t,y); 10 performance = perform(net,t,y)

Model validation
A coefficient of determination of 0.99 was obtained proving that the predicted results obtained via the ANN model were indeed very similar to that of the training data. This model will subsequently be utilized with the testing data to evaluate the performance of the ANN model while comparing it against various corrosion assessment methods as mentioned in Section 1.3. Table 3 shows the failure pressure predictions of corroded API 5L X52 grade pipes by the developed ANN model accompanied by those of Barlow's formula, DNV, ASME B31G, and Modified ASME B31G. The developed ANN model has the lowest root-mean-square error (RMSE) of 1.7 as well as the lowest maximum percentage difference of 10.9% between the predicted and actual failure pressure value. This indicates that the proposed ANN model performs better than the existing models in predicting the failure pressure of corroded API 5L X52 grade pipe. Among the existing corrosion assessment methods, DNV provides the lowest RMSE value, while Barlow's formula provides the highest RMSE value. Table 4 shows the failure pressure predictions of corroded API 5L X80 grade pipes by the developed ANN model accompanied by those of Barlow's formula, DNV, ASME B31G, and Modified ASME B31G. For this case, DNV provided better results compared to the rest of the corrosion assessment methods including the developed ANN model. This is inferred to be due to the limitation of the testing data whereby only 5 sets of data were used in this comparison.

Evaluation of developed ANN model
This also highlights the importance of having an accurate and enough data to train and test the ANN model. It can be observed from Table 4    value similar to each other. The same goes to the maximum percentage difference where DNV, ASME B31G, Modified ASME B31G, and the developed ANN model have maximum percentage difference of more than 10 percent but less than 20 percent.

Failure trend analysis using developed ANN model
To determine the relationship between the defect length on the failure pressure of a pipeline, the defect depth is kept constant and the normalized defect length is increased from 0.2 to 2. As illustrated from the graph in Fig. 3, failure pressure of corroded API 5L X52 grade pipe decreases as the normalized defect length increases. This is based on the observation that there is a gradual drop of failure pressure as the normalized defect length value increases from 0.2 to 2. Furthermore, it can be observed that as the normalized defect length approaches 1.2, the failure pressure trend starts to plateau. Comparison of slope shows that beyond a normalized defect length of 1.2, failure pressure remains constant.
Comparing the performance of corrosion assessment methods, it is noticeable that ANN tends to give a slightly conservative failure pressure prediction compared to that of FEA with a maximum percentage difference of 12%. This is comparatively better than the performance of DNV which revealed a much more conservative failure pressure prediction with a maximum percentage difference of 22% against FEA predictions.
To determine the relationship between the defect depth and the failure pressure of a pipeline, the defect length is kept constant and the normalized defect depth is increased from 0.2 to 0.8. The result is shown in the graph in Fig. 3. The changes are much more drastic in this case as compared to the effect of defect length on the failure pressure of the pipe as the tangent modulus was determined to be greater than that in Fig. 3. Thus, it can be concluded that the defect depth greatly affects the failure pressure of the pipe compared to defect length. Comparing the performance of corrosion assessment methods, it is noticeable that ANN tends to give a slightly conservative failure pressure prediction compared to that of FEA with a maximum percentage difference of 11%. This is comparatively better than the performance of DNV which revealed a much more conservative failure pressure prediction with a maximum percentage difference of 26% against FEA predictions.

Conclusions and future works
Machine learning can provide user with useful information if it is trained with ample data and validated with relevant method or standards approved by the industries. In this paper, ANN can predict the failure pressure accurately with the maximum percentage difference of 10.9% for API 5L X52 grade pipe.
This indicates that the model is a feasible option in evaluating the failure pressure. The proposed ANN model is found to outperform other corrosion assessment methods in predicting the failure pressure of API 5L X52 pipe with single corrosion defect subjected to internal pressure.
Future works should include the improvement of ANN model by including more training data from pipes of various grades, and of various corrosion defect parameters. Post improvement of the ANN model, it should be tested against a wide range of pipe grades (low to high toughness) to verify its versatility and ability to predict failure pressure of pipes with single corrosion defect subjected to internal pressure.