Artificial Intelligent techniques for Flow Bottom Hole Pressure Prediction

This paper proposes Radial Basis and Feed-forward Neural Networks to predict the flowing bottom-hole pressure in vertical oil wells. The developed neural network models rely on a large amount of available historical data measured from actual different oil fields. The unsurpassed number of neural network layers, the number of neurons per layer, and the number of trained samples required to get an outstanding performance have been obtained. Intensive experiments have been conducted and the standard statistical analysis has been accomplished on the achieved results to validate the models’ prediction accuracy. For the sake of qualitative comparison, empirical modes have been developed. The obtained results show that the proposed Feed-Forward Neural Network models outperforms and capable of estimating the FBHP accurately. The paper showed that the accuracy of FBHP estimation using FFNN with two hidden layer model is better than FFNN with single hidden layer model, Radial Basis neural network, and the empirical model in terms of data set used, mean square error, and the correlation coefficient error. With best results of 1.4 root mean square error (RMSE), 1.4 standard deviation of relative error (STD), correlation coefficient (R) 1.0 and 99.4% of the test data sets achieved less than 5% error. The minimum sufficient number of data sets used in training ANN model can be low as 375 sets only to give a 3.4 RMES and 97% of the test data achieved 90% accuracy.


INTRODUCTION
Petroleum engineers are always interested in finding appropriate and reliable tools to predict the productivity of horizontal well as accurate predictions seem very important to conduct technical and economical feasible studies before drilling the wells which is very costly1. With the increased utilization and deployment of permanent down-hole gauges, measuring flowing bottom-hole pressure (FBHP) gets relaxed and faster. However, these gauges require continuous maintenance and calibration to avoid erroneous readings. Also by intervening a well from time to time to measure FBHP is an expensive task, associated with production risk and interruption. For these reasons, the motivation of the prediction of FBHP has been argued.
Flowing bottom hole pressure prediction in gas wells is an old petroleum engineering problem. There is a long history of attempts to develop empirical correlations to predict the pressure drop in pipes. Some of these attempts have produced correlations that provide good prediction in some cases2-3. However, their general applicability is questionable. Correlations that address only a specific class of problems exist. These types of correlation usually perform better than those which attempt to meet the need of a variety of problems. Usually, the higher the number of variables in the model the lesser the reliability and general applicability of the correlations. This is the result of using methodologies such as conventional regression analysis4. In such methodologies, the chances of correctly and completely capturing the relationship between variables decreases as the number of variables increases. Many parameters could be involved in these types of problems, such as gas-oil ratios in two-phase systems, water flow in three phase systems, and inclination angles of the pipe. Models proposed by the investigators are based on empirical wells contained modest amounts of gas and oil production rates correlations developed from laboratory studies.
Most of the existing methods for predicting FBHP require one or more assumptions5-7 (e.g., steady state flow, ideal gas of constant viscosity, small and constant compressibility and constant viscosity fluid) be applied. These methods appear to be subject to appreciable error unless better limits of applicability are defined.
Neural networks and artificial intelligent approaches have been used in different fields8-10, however these approaches recently have been employed in the petroleum industry11-12, but their potential has not been fully investigated. In areas where a pattern exists between sets of data, a successful correlation can be developed with an artificial neural network (ANN). The pattern recognition capability of NN makes it a desirable tool to employ under a variety of conditions. When the data contains a relationship that is implicit in nature, a network such as Kohonen, Probabilistic, or Back-propagation may discover that relationship despite the complexity. Most applications of artificial neural networks (ANNs) in multi-phase flow are confined to pipes. Authors13 found fairly good bed heights estimations using an ANN. Flow pattern and frictional pressure drop were predicted14-16 using an ANN. Neural networks (NNs) estimated the flow pattern Bottom Hole Pressure with less than 5% error and frictional pressure drop with less than 30%. Satisfactory results have been found for three phase relative permeability compared with experiments using adopted a PSO model to train the perceptron and to predict pollutant levels in gas wells17-18. The approach was proved to be feasible and effective by applying to some real air-quality problems and by comparison with a simple back-propagation (BP) algorithm. Support vector machine approach have been also used in training ANNs for predicating flow bottom hole pressure19.
In this paper, intelligent schemes for estimating the FBHP in oil fields are developed. The proposed schemes utilize the capabilities of the artificial neural networks (ANN) to predict the FBHP. Practical sets of data available from an oil field are used for learning, testing, and validating the designed schemes. To prove the effectiveness of the proposed neural networks in estimation of the FBHP, intensive performance analysis is carried out.
This paper is organized as follows: Section two demonstrates Flowing Bottom-Hole Pressure importance and Electrical Submersible Pump (ESP) Well System. Section three gives the basics of the neural network structures. Section 4 presents neural networks development and optimization. Section 5 illustrates the conducted experiments and discussions. Section 6 concludes the paper.

Flowing Bottom-hole Pressure Importance and Electrical Submersible Pump (ESP) Well System
Electric Submersible Pumping (ESP) is one of the most commonly used methods of well production/fluid lifting in the oil and gas industry. It is responsible for the highest amount of total fluids produced (oil and water) by any artificial lift method and an ideal method for high water cut wells. Centrifugal pumps can be single-stage or multi-stage units. Single-stage pumps are mainly used when low to medium discharge pressure is required, while multi-stage pumps are designed to overcome higher discharge pressures. This is the case of ESP used in the petroleum industry where fluids must be lifted from deep formations.
ESP is normally installed at the end of the production tubing string, which is inserted inside a bigger piping called casing. Normally ESP installation depth is shallower than the formation (producing zone) depth. The pressure drop schematic of flowing oil well with ESP is shown in Figure- w w w . c i r w o r l d . c o m labeled A, B, and C. The pressure at the top of line A is the well head pressure and the end of it is the pressure of the pump discharge. Line A represents the drop in pressure due to the hydrodynamic multiphase flowing column and the frictional losses in the tubing. Line B is the line difference between the discharge and intake pressures of the pump. Simply it represents the total pressure developed by ESP. Line C represents the drop in pressure between the pump intake and the perforations at the producing formation due to the hydraulic column and frictional loss in the casing below the pump. Its top end is the pump intake pressure and its lower end is the well flowing bottom-hole pressure. It is a normal practice to have online pressure measurements at, well-head, pump discharge and pump intake. In fields of the study, these measurements are recorded every 15 minutes. In this paper re-sampled data for daily records have been used.
The pressure measurements for the pump discharge and intake are normally obtained by permanent pressure gauges installed within ESP assembly. Unfortunately, FBHP at the perforations has no permanent measurements and in our case we almost have no records for FBHP of an ESP well due to difficulties of access and other restrictions. Therefore, the scope of the paper is limited to the estimation of the pressure drop along the lines A and B only. The estimation of the pressure drop along the line C (i.e. estimation of the pressure drop from the FBHP to the pump intake pressure) is less complex compared to drop in pressure along line A due to better homogenous flow and negligible friction. Hence, this pressure drop is out of the paper scope. Also, it would be very difficult to evaluate this estimation due to unavailability of FBHP records.
Flowing bottom-hole pressure of a well is the pressure that is measured or calculated at or near the producing formation at the bottom of the well while the well is flowing or producing hydrocarbons as shown in Figure-33. It is always higher than the flowing pressure at the surface, but lower than the shut in bottom-hole pressure.
Knowing the bottom-hole pressure of an oil well can help forecasting the well potential during the life cycle of the well. In other words, well production monitoring and artificial lifting optimization can be performed, which is a key objective for oil production maximization and operational cost reduction [12]. Bottom-hole pressure data also can be used to provide information on pore pressure that can be calculated for safety while drilling development wells in the area. It is critical for drilling operations especially underbalanced drilling. This also provides valuable data to select accurate kill fluid weight. The data also can be used to improve accurate under-or over-balance before perforation.
Tubing pressures and casing pressures of flowing wells have always been important factors in operating wells and under restricted production their importance is increased. Changes in these pressures, correlated with age or with rate of production, have been considered as giving important information as to the quality of the well, sand conditions, conditions of the bore hole through the sand, and whether the equipment in the hole is operating properly. A general study of bottom-hole pressures throughout an entire field has a direct application to the operation of a particular lease or an individual well. Bottom-hole pressure surveys of the field will provide data which will assist in making a more accurate estimate, much earlier in the life of the field, of the time when wells must be produced by artificial lift and of the amount of fluid that will have to be handled. It is of considerable value to know within reasonable limits when the wells will have to be pumped.

The Proposed Neural Network for FBHP Estimation
Typically, FFNN consists of a set of sensory units (source nodes) that constitute the input layer, one or more hidden layers of computation nodes, and an output layer. The source nodes in the input layer of the network supply respective elements of the activation pattern (input vector), which constitute the input signals applied to the neurons (computation nodes) in the second layer (i.e., the first hidden layer). The output signals of the second layer are used as an input to the third layer, and so on for the rest of the network. The set of output signals of the neurons in the output (final layer) constitute the overall The activation function depends only on the inputs and the weights. If the output function would be the identity (output=activation), then the neuron would be called linear. But it has severe limitations and the most common output function is the sigmoidal function: The output depends only on the activation, which in turn depends on the values of the inputs and their respective weights. Now, the goal of the training process is to obtain a desired output when certain inputs are given. Since the error is the difference between the actual output and the desired output , the error depends on the weights, and we need to adjust the weights in order to minimize the error. The error function for the output of each neuron can be defined as: The error of the network will simply be the sum of the errors of all the neurons in the output layer: Using the gradient descent to minimize the error (4), on can obtain the following adjustment rule for the weights Δ Equation (5)

Basics of Radial Basis Functions Neural Networks
The RBFNN is a common used structure of the NN and it consists of three separate layers. The input layer is the set of source nodes (sensory units), the second layer is a hidden layer of high dimension and the output layer that produces the network response due to activation patterns applied to the input layer. The transformation from the input space to the hidden-unit space is nonlinear. On the other hand, the transformation from the hidden space to the output space is linear. The basic structure of RBF NN is shown in Fig. 5.
The output y(t) is a weighted sum of the outputs of the hidden layer and is given by: where u(t) is the input, (.) is an arbitrary nonlinear radial basis function, ||.|| denotes the Euclidean norm, c i are the known centers of the radial basis functions and w i are the weights.
The most commonly used radial basis function is the Gaussian radial filter of the form where c is the center and β is the radius (width).
Designing a radial basis network often takes much less time than training a sigmoid/linear feed forward with back propagation network. This is because the required number of sigmoid neurons for FFNN is much less those required for radial basis. The radial basis networks work best when many training vectors are available.

Neural Networks Development and Optimization
In order to construct the neural network models that will capable of estimating the FBHP, realistic data sets available from Oman oil fields, specifically from oil production wells lifted with ESP, are used. The data were collected from three different fields, Field-A, Field-B and Field-C. All three fields have water injection as reservoir pressure support and all of them have well production with two different artificial lifting; namely, ESP and gas-lift. There are twelve different input variables and one output variable for the ANN to be constructed. List of these variables, their units and their recording frequency are listed in Table 1. The motor current and pressures data are obtained from online-meters measurements that record samples every 15 minutes in a data base historian system. The production data rates and ratios are obtained from testing the well production at dedicated three phase test separator equipped with individual phase flow meters. The measurement frequency is every one to three months, depending on the well oil production rate. The data pertaining to fluids properties is obtained from laboratory analysis that is done once for every well or field. Fifteen-minute frequency data is re-sampled to daily frequency records to reduce number of samples while keeping reasonable representative variation in the data. Since the study scope is to estimate the FBHP, then the data sets for well static conditions (i.e. when well is not flowing) were excluded. Also, incomplete data sets and sets with readings over the meter range are excluded. Then, monthly production data is aligned with the daily data by replicating the monthly data daily until next month sample. Well (field) fluid data is then aligned with the daily data sets for each well (field). Before training neural network model, the data is normalized. After training, the results of data sets are de-normalized and reorganized back to wells and timing sequence.

FFNN with a single hidden Layer Structure
A very basic structure of FFNN with one hidden layer is considered. To reach to the optimal number of hidden neurons, a testing of the network is started with 4 neurons in the hidden layer and then increased the number of neurons in a multiple of four. For each case, the network is trained to a specified training error goal of 0.005. The data used for the neural network model are taken from Field-A. The network performance statistical factors are recorded. The main performance metrics considered are the relative root mean square error (RMSE) and standard deviation (STD). Also, the percentage of >90% Accuracy Best Point >95% Accurecy the test data attaining 95% and 90% accuracy of FBHP estimation are used as a secondary performance metric. Figure-5 shows the network performance against the number of neurons in the hidden layer.
The results indicate that the optimal number of neurons that achieves minimum RMSE is 68. Also, this result is supported from the overall accuracy of both 95% and 90% accuracy trends. Table 2 summarizes all statistical indicators of the network performance. It indicates that a remarkable performance of single hidden layer is achieved with 68 neurons where the RMSE is 2.53% and the STD is 2.44%. Also the percentage of the test data that showed intake pressure estimations within the 5% and 10% error from the actual intake pressure measurements are 94.4% and 99.8% respectively. The selected structure above is addressed again with different training mean square error goals and the performance is analyzed. The network is trained and tested for twenty different training mean square error goals within the range of 0.0001 to 0.04.

Investigating a FFNN with Two Hidden Layers Structure
In this section, the two hidden layer option is investigated. The objective of the analysis is to select the number of hidden neurons for each hidden layer that will yield the best network performance. To start with, a rule of thumbs is used to select 15 neurons for the second hidden layer. Then, the network is trained and tested for different numbers of neurons for the first hidden layer staring from 4 neurons then increasing the number of neurons in multiple of four. Then, the network performance analysis is carried out for each case using the testing data as done with the single hidden layer case. The testing RMSE and the testing results accuracy trends are shown in Figure-.
It is seen that the best RMSE is about 3.6% occurs for 20 neurons in the first hidden layer. This is also supported by good accuracy points of 99% of test data fall within the 10% error band and 85%.

Figure-7 RMSE and Accuracy of FFNN with {x 15} vs. Number of Neurons 1st Hidden Layer
Based on the achieved results in Figure-, it is clear that the best RMSE is about 2.6% occurs for 24 neurons in the second hidden layer. This is also supported by the good accuracy points of 99% of test data fall within 10% error band and 92% fall within 5% error band. Moreover, the tuning of the number of neurons for the first hidden layer is repeated with 24 neurons for the second hidden layer.
As illustrated in Figure-, the best RMSE is about 2.9% occurs for 22 neurons in the first hidden layer. This is also supported by the good accuracy points of 99% of test data fall within 10% error band and 91% fall within 5% error band. Therefore, the selected numbers of neurons in the two hidden layers are 22 and 24 neurons for the first and second hidden layers respectively. A further improvement to the neural network structure is tried by investigating the best selection of the training mean square error goal. The analysis trends of this investigation are shown in Figure-1.
Similar to the single hidden layer analysis of the training mean square error goal, it is shown that, the RMSE is proportional to the training mean square error goal. The smaller the goal is the least the RMSE of the test data. As depicts in Figure-1, the selection of a value for the training mean square error goal between 0.0001 and 0.005 would result in an acceptable small RMSE when testing the model. For simplicity, the training mean square error goal is selected to be 0.001. Therefore, the final feed forward neural network structure with two hidden layer is the {22 24} neurons and 0.001training mean square error goal.

Experimental Results and Discussions
In this section, the single-layer and multilayer FFNN are used to estimate the FBHP. The obtained results of the neural networks models and their performance analysis are illustrated.

Intake Pressure Estimation using FFNN with Two Hidden Layers Field-A
The data analysis is performed for the data collected from 15 wells in the Field-A, below are the results for the FFNN with two hidden layer with 22 neurons in the first layer and 24 neurons in the second layer {22 24} and 0.001 training mean square error goal. The number of training data sets is 6000 with 60%, 20%, and 20% of training data are used for training, validation and testing respectively and the maximum number of epochs is 100. Table-3 shows the summary of some statistical performance indicators of the model for both the additional test data sets after training and for the training data sets. The main three indicators are RMSE, STD of error and the correlation coefficient of the relative error for the test data sets after training. The value of these parameters after the testing phase are 2.16%, 2.07% and 0.993 respectively.

Figure-2 Intake Pressure Measurements and FFNN {22 24} Model Estimations
The actual intake pressure and the corresponding estimates from FFNN {22 24} model is shown in Figure-2. These data were rearranged into well by well intake pressure sets for the purpose of analysis and clear illustration. It is clear that the model estimates are superbly close to the actual measurements with minor errors at cases where the intake pressure of the well is fluctuating sharply which could be due unstable well flow. These values can be seen at data sets number 900-1000 and 2200-2400. Therefore, we could state that the model accuracy slightly decreases under unstable well flow conditions. Figure-shows the model estimates of intake pressure versus the actual intake pressure measurements. It is obvious that the best linear fit of the data is almost identical to estimated values. This is very powerful indicator of the model's worthy accuracy over full measurements range. This is also supported by the good correlation coefficient factor, R= 0.998. The slight deviation over the 7000-8000 range is explained due to the unstable flow described previously.  Figure-shows the model estimates error against the percentage of the test data sets and their corresponding errors in the estimate of the intake pressure. It shows that almost 100% (all the 2560) of the test data have returned estimates within ±10% error (within 90% accuracy). Furthermore, the derived calculations show that 96% of the test data sets have their intake pressure estimates with 95% accuracy. Therefore, these results confirm the robust capability of the model to estimate the intake pressure with a remarkable accuracy.

Figure-14 Inputs Relevancy of FFNN {22 24} Model Estimations for Field-A
By summing the final hidden neurons weights for each individual input and calculating its percentage of the total inputs weights, then the relevancy of individual inputs to the final output (intake pressure estimate) can be analyzed. Figure-shows the individual inputs relevancies to the contribution of calculating the final intake pressure estimate. It is seen that the most relevant input is the pump intake depth followed by the pump discharge pressure. In general, all the twelve inputs have similar relevancy within 6-10 % with the exception of the pump intake depth which have the highest relevancy of about 14%.     Figure-shows the actual intake pressure and the corresponding estimates from the model. These data were rearranged into well by well intake pressure sets for the purpose of analysis and clear illustration. It is clear that the model estimates are superbly close to the actual measurements with minor error at cases where the intake pressure of the well is fluctuating sharply which could be due unstable well flow. These values can be seen at data sets number 2200-2400. Therefore, we could state that the model accuracy slightly decreases under unstable well flow conditions. Figure-shows the cross plot of the actual intake pressure measurements versus the model estimates. The chart illustrates that the best linear fit of the data is almost perfectly falls on top of the line where the actual values equal the estimate ones (45 degree). It indicates the remarkable accuracy of the model over the full measurements range. This is also supported by the good correlation coefficient factor, R= 0.998. The slight deviation over the 7000-8000 range is due to the unstable flow described previously. Figure-shows the model estimates error distribution. It shows that almost of 2560 test data have returned estimates within ±10% error (90% accuracy). Furthermore, the derived calculations show that 97% of the test data sets have their intake pressure estimates within 95% accuracy. Again, these analyses present the robust capability of the model to estimate the intake pressure.    Table-5 show that the significant performance of the two models exception for data of the field-C where a slight drop in performance is noticed. Further analysis has been done to address this drop. It might be related to down-hole measurements of intake pressure accuracy of Field-C or the high gas to liquid ratio characteristic of the Field-C. By analyzing the achieved performance indicators, it is clear that FFNN with two hidden layers outperforms FFNN with a single hidden layer.

Number of Data Sets Used in Model Training
To determine the minimum sufficient number of data sets used to train a two hidden layer model with {22 24} neurons, the neural network is trained, tested and the performance parameters are recorded. This was repeated for ten different number of data sets increasing from 3 sets to 3000 sets. The achieved results are shown in Figure 19. It is shown that the accuracy of estimating FBHP increases with increasing the number of data sets used in training. However, a small number of training data sets, 375 sets, can still be used for training within an acceptable estimation accuracy.

Model Generalization
To test ANN models for generalization across different fields, Radial Basis neural network, RB NN, has been developed for the sake of comparison. The models have been tested using data sets from another different field unused to train and develop the model. For example, a {22 24} FFNN model developed (trained) using data from field-A and then tested using data sets from Field-B. This cross field testing showed a very poor FBHP estimation accuracy. Although, the same model has shown a very good FBHP estimation when tested using data sets from the same field even though that well was not used in the training process. This is a clear illustration and prove of the limitation of ANN model applicability to the range of the used data in training the model. This can be explained as a result of the capability of the ANN to extract and model the hidden complexity of system modeled using its power of feature detection due to parameters' variations and changes. In fact, each field has some unique parameters that are not changing within the field and physically linked to FBHP, however they are not used in ANN modeling inputs. Consequently, ANN model will be able to estimate FBHP well within the same field (these parameters are not changing), but when moving across different fields (these parameters are changing) and ANN logically will fail to estimate FBHP as it has not learned the impact of their variances on FBHP. Table-4 and Table 5 I S S N 2 2 7 7 -3061 V o l u m e 1 5 N u m b e r 1 2 I n t e r n a t i o n a l J o u r n a l o f C o m p u t e r s a n d T e c h n o l o g y   Figure-320 illustrates that the overall performance of the three models is significant, however overall performance of field-C is slightly less. This drop might come back to the accuracy of down-hole measurements of intake pressure or high gas to liquid ratio of Field-C. based on the achieved results, FFNN with two hidden layers outperforms the others.
Furthermore, Figure-21 shows that the performance of the best achieved model, two-layer neural network, outperforms the simplified developed empirical model.

Conclusion
This paper presented one and two hidden feed forward with back-propagation algorithm artificial neural network models to estimate FBHP of oil wells. The developed neural network models rely on a large amount of available historical data on oil wells. They have shown exceptionally accurate FBHP performance estimation that significantly outperforms the empirical model and Radial Basis neural network. The number of neural network layers and the number of neurons per layer have been addressed to find the optimum neural network structure. The paper shows that the accuracy of FBHP estimation using FFNN with two hidden layer model is better than FFNN with single hidden layer model in terms of data set used, mean square error, and the correlation coefficient error. With best results of 1.4 root mean square error (RMSE), 1.4 standard deviation of relative error (STD), correlation coefficient (R) 1.0 and 99.4% of the test data sets achieved less than 5% error. The minimum sufficient number of data sets used in training the ANN model can be low as 375 sets only to give a 3.4 RMES and 97% of the test data achieved 90% accuracy.