# Measurement of Total Flow Rates in Horizontal Well Oil-Water Two-Phase Flows by the Application of BP Neural Network Algorithm to Production Array Logs

Authors: Xin Zhang; Hongwei Song; Haimin Guo; Xinlei Shi
Journal: Geofluids
 (2022)

---

## Abstract

In the modern petroleum industry system, oil-water two-phase flows exist widely. Among them, the total flow rate of mixture fluid in a horizontal well is difficult to obtain due to the phase segregation caused by gravity. Therefore, it is a difficult and hot issue. To obtain the total flow rate of oil-water two-phase flows in horizontal wells, in this paper, Multiple Array Production Suite (MAPS), which is also called Production Array Logs (PAL), is used to conduct simulation experiments, uses BP neural network (BPNN) algorithm to train the data samples, and establishes the prediction models of the total flow rates of oil-water two-phase flows in horizontal wells. The results showed that the average relative error was less than 10%, which justify that the BPNN has good practicability in using data of MAPS in oil-water two-phase flows horizontal wells to predict the total flow rates, and it provides a new method and theoretical support for obtaining flow rates in horizontal wells.


---

## Body

## 1. Introduction

With the maturity and wide application of horizontal well oil development technology, it has become an important research direction to study its related production logging technology, including obtaining various flow parameters in wells. Among them, the study of oil-water two-phase flows is a key problem [1, 2].In the logging industry, some researchers have tried to provide the solution: multiple-sensor array tools (MAPS), which can be used to detect and analyze multiphase flow in horizontal wells. For the multiphase flow of horizontal well, these tools measure the fluid properties at multiple locations around the cross-sectional area of the wellbore, providing a distributed measurement that helps to relate the measurements to obtain flow rates and holdups [3, 4]. According to the measured value, auxiliary computer analysis software can be used to reconstruct it, which can reflect the flow pattern in the horizontal well. At the same time, the relevant special software can reconstruct the results of well logging into simulation images. It should be used in conjunction with neural network technology to obtain better results.The neural network has shone in the oil-related sector. During the COVID-19 outbreak, the convolutional neural network which extracts online oil news can be used to predict the fluctuation of the oil market [5]. The deep neural network is used to process seismic wave data for reservoir prediction [6].In addition, some scholars have made researches on the application of processing well logging data with neural networks. Guo et al. [7] studied the use of feedforward artificial neural networks for oil-water two-phase flow production logging interpretation methods and obtained the design of corresponding software. Strict experiments were carried out on the three-phase flow simulation device of Daqing Oilfield. The 105 sets of sample data obtained in the experiment were substituted into the network for training and learning. 93 sets of data were selected to train the BP neural network and RBF network. 12 multiple sets of sample data were used for testing and prediction, the value was compared with the actual value, and the error was within the acceptable range [8]; Chen et al. [9] used BP neural network to predict the startup velocity of the continuous flowmeter in the wellbore and obtained excellent prediction results, which showed the potential of this method in conventional vertical well logging interpretation. In general, it is very effective to use great algorithms combined with computer tools to improve productivity [1, 10].In horizontal wells, the fluid is stratified under the influence of gravity, which makes the instruments used in conventional vertical wells such as inline flowmeters and capacitance holdup meters not applicable anymore. In order to solve these problems, this paper took the MAPS array logging tools as the research object and the experimental data obtained from the oil-water two-phase simulation experiment on the production logging experiment platform of Yangtze University as samples, adopting BPNN that can realize the nonlinear mapping to establish models and predict flow rates. It provides a new method for obtaining flow rates of horizontal wells.


## 2. Production Logging Simulation Experiment in Horizontal Well

### 2.1. Experimental Set-Up

The experimental set-up (Figure1) was a multiphase flow simulation experiment platform of Yangtze University, which included two transparent glass tubes with one inner diameter of D=124 mm and another inner diameter of D=159 mm, which both permitted visual observation of the flow, besides a large liquid storage tank for oil and water storage, an air compressor for pneumatic control valves and gas for experiments, a hydraulic machine for adjusting the angle of the wellbore, and the relevant complete set of pumps, transportation pipelines, and a master console for controlling the input fluid and observing the state of the entire experimental set-up. The simulation experiment used a 12 m long 159 mm inner diameter wellbore. The fluid was an oil-water two-phase flow, the water was tap water, and the oil was No. 10 industrial white oil. The oil-water ratio was set to 20%, 40%, 60%, 80%, and 90% water cut. The flow rates were 100 m3/d, 300 m3/d, and 600 m3/d. The wellbore angles were set to near-horizontal (93°, 90°, and 85°). The measurement methods were divided into spot measurements and continuous measurements. During continuous measurements, set the cable speed to 0, 10 m/min, 15 m/min, and 20 m/min.Figure 1
Multiphase flow experimental set-up.


### 2.2. Production Array Logs

The experimental tools MAPS (Figure2) include spinner array tool for obtaining flow rates, resistance array tool, and capacitance array tool for obtaining holdup, in addition to a caged fullbore flowmeter [11].Figure 2
MAPS+CFB.The spinner array tool (SAT) (Figure3) is composed of six microspinners distributed on the same section, which can measure the flow at different positions on the wellbore area; the capacitance array tool (CAT) (Figure 4) and the resistivity array tool (RAT) have similar shapes: twelve microsensors are evenly distributed to measure the fluid nearby [12]. The caged fullbore (CFB) (Figure 5) flowmeter, which uses retractable metal blades to measure the flow velocity and resides in the middle of the wellbore, can accurately measure the total flow rate [13].Figure 3
SAT.Figure 4
CAT.Figure 5
CFB.


## 2.1. Experimental Set-Up

The experimental set-up (Figure1) was a multiphase flow simulation experiment platform of Yangtze University, which included two transparent glass tubes with one inner diameter of D=124 mm and another inner diameter of D=159 mm, which both permitted visual observation of the flow, besides a large liquid storage tank for oil and water storage, an air compressor for pneumatic control valves and gas for experiments, a hydraulic machine for adjusting the angle of the wellbore, and the relevant complete set of pumps, transportation pipelines, and a master console for controlling the input fluid and observing the state of the entire experimental set-up. The simulation experiment used a 12 m long 159 mm inner diameter wellbore. The fluid was an oil-water two-phase flow, the water was tap water, and the oil was No. 10 industrial white oil. The oil-water ratio was set to 20%, 40%, 60%, 80%, and 90% water cut. The flow rates were 100 m3/d, 300 m3/d, and 600 m3/d. The wellbore angles were set to near-horizontal (93°, 90°, and 85°). The measurement methods were divided into spot measurements and continuous measurements. During continuous measurements, set the cable speed to 0, 10 m/min, 15 m/min, and 20 m/min.Figure 1
Multiphase flow experimental set-up.


## 2.2. Production Array Logs

The experimental tools MAPS (Figure2) include spinner array tool for obtaining flow rates, resistance array tool, and capacitance array tool for obtaining holdup, in addition to a caged fullbore flowmeter [11].Figure 2
MAPS+CFB.The spinner array tool (SAT) (Figure3) is composed of six microspinners distributed on the same section, which can measure the flow at different positions on the wellbore area; the capacitance array tool (CAT) (Figure 4) and the resistivity array tool (RAT) have similar shapes: twelve microsensors are evenly distributed to measure the fluid nearby [12]. The caged fullbore (CFB) (Figure 5) flowmeter, which uses retractable metal blades to measure the flow velocity and resides in the middle of the wellbore, can accurately measure the total flow rate [13].Figure 3
SAT.Figure 4
CAT.Figure 5
CFB.


## 3. Backpropagation Neural Network

Backpropagation neural network is a multilayer feedforward neural network that uses a backpropagation learning algorithm to adjust the weights, generally uses a sigmoid function to transmit signals between neurons, and can realize any nonlinear mapping from input to output.BP neural network is a kind of neural network, which is powerful and widely used. It consists of an input layer, a hidden layer, and an output layer. The layers are fully interconnected, and the same layers are not connected. The hidden layer can be one or more layers. Figure6 is a typical three-layer BP neural network structure picture.Figure 6
Structure of BP.The multilayer network design enables the network to calculate errors more accurately during operation and complete more complex tasks. At the same time, it uses backpropagation algorithm for learning. In the BP neural network, the data signal is propagated back layer by layer through the input layer and hidden layer. When training the network weights, the signal is in the direction of reducing errors in the network structure, from the output layer to the middle layers, and forwards layer by layer. Modify the connection weight of the network [14]. With the continuous progress of learning, the final error becomes smaller and smaller and finally reaches the set ideal error. At this time, a series of neuron weights containing information is obtained, and a model that can solve the problem is completed.In summary, the BP neural network can realize complex nonlinear mapping, can approximate complex functions suitable for problem-solving and processing for the fusion of multiple input data, and is suitable for processing MAPS well logging data to predict the flow rates.


## 4. The Realization of Predicted Flow Rates

### 4.1. Sample Data Training and Prediction

In the laboratory environment, total input flow rates, water cuts, and wellbore inclinations are controlled; the corresponding MAPS data are used as the original data. Among them, all data samples are divided into two categories according to whether the measurement method is the continuous measurement or spot measurement, and only the CAT corresponding to SAT is included in the spot measurement data.In the wellbore, pulling the cable to drive the instrument to the direction of fluid entry is equivalent to increasing the flow rate. Therefore, Equation (1) and Equation (2) can be used to convert the cable speed into flow rate:
(1)Pc=14πD2×3600×24×10−6m3/d,(2)Q=v∗PC∗53,where Q represents the conversion flow (m3/d), v represents cable speed (m/min), and PC is pipe constant ((m3/d)/(cm/s)).After unit conversion and calculation according to the above formula, the result was obtained and made into Table1.Table 1
Cable speed-flow conversion table.
Experimental control flow (m3/d)Cable speed (m/min)Equivalent total flow (m3/d)1000100.0010385.9115528.8720671.823000300.0010585.9115728.8720871.826000600.0010885.91151028.87201171.82The array spinners of SAT are closely distributed in the wellbore wall, and the CFB is located in the center of the wellbore. The combination of the two can measure the flow data in the horizontal well. The conventional processing of these data is to consider the spinner starting velocity fitting to obtain the apparent velocity and obtain the flow data after deviation correction. Using the BP neural network to predict the flow of these data can omit the fitting step and ignore the influence of the correction factor, as shown below in the figures.Analyzing Figures7–17, we can get this conclusion: the response values of CFB with different water cuts have a different slope or intercept with the measuring velocity relational graph. There is also a significant difference in SAT response value in oil and water. It can be seen that SAT and CFB have different instrument constants and start-up velocities in different fluids. The data of CAT is used to give the phase states of different positions in the wellbore. In fact, the BP neural network is trained with different oil and water SAT and CFB data as weights. Therefore, CAT data can be added to the training to improve accuracy. According to the existing data and algorithm requirements, the following three prediction models have been set up:
(1)
Data of SAT as inputs: response value of spinner array tool as inputs (129 sets for training, 10 sets for test)(2)
Data of SAT and CFB as inputs: response value of spinner array tool and caged fullbore flowmeter as inputs (129 sets for training, 10 sets for test)(3)
Data of SAT, CAT, and CFB as inputs: response value of spinner array tool and capacitance array tool and caged fullbore flowmeter as inputs (24 sets for training, 6 sets for test)Figure 7
Relational graph of the measured value of 93° inclination of 100 m3/d CFB and cable speed.Figure 8
Relational graph of the measured value of 93° inclination of 300 m3/d CFB and cable speed.Figure 9
Relational graph of the measured value of 93° inclination of 600 m3/d CFB and cable speed.Figure 10
Relational graph of the measured value of 90° inclination of 100 m3/d CFB and cable speed.Figure 11
Relational graph of the measured value of 90° inclination of 300 m3/d CFB and cable speed.Figure 12
Relational graph of the measured value of 90° inclination of 600 m3/d CFB and cable speed.Figure 13
Relational graph of the measured value of 85° inclination of 100 m3/d CFB and cable speed.Figure 14
Relational graph of the measured value of 85° inclination of 300 m3/d CFB and cable speed.Figure 15
Relational graph of the measured value of 85° inclination of 600 m3/d CFB and cable speed.Figure 16
The response diagram of SAT spinners withflowrate=100 m3/d in horizontal well in different water cuts.Figure 17
The wellbore distribution map in horizontal well withflowrate=100 m3/d of SAT.The above three different input models all use actual flow rates as output for the BP neural network algorithm to adjust connection weights. When importing data into the algorithm, select several groups of data to keep (about 10% of the total amount of data samples) for use in testing algorithms, analyzing errors, and evaluating effects. Benefitting from the advantages of the BP neural network, the error can be continuously corrected to analyze the data by itself, so the data can be used directly without correction processing; on the other hand, due to the advantages of the BP network, when inputting the measured value of capacitance array tool CAT instrument, it is not necessary to normalize to obtain the water holdup, but the network can obtain the relationship through calculation by itself, which makes it quick and convenient to predict the flow rates on the way. The results obtained by running the above three models are as follows:(1)
Data of SAT as inputsThe average relative error is 10.84% and according to Figure18, there are many jump points. It may be related to insufficient experimental data, and the bigger reason is the limitation of the single SAT value as input that can be analyzed from Figure 18: only 5 of the predicted values can meet the requirement of less than 10% error, accounting for half of the total number of test samples, and the effect is not as expected.
(2)
Data of SAT and CFB as inputsFigure 18
Histogram of the predicted value error of model 1.According to Figure19, there are few jump points and basically, they meet the requirements, and the average relative error is 7.94%; according to the visual error chart, the effect is good, most of the predicted values fluctuate within the ±10% error line, and occasionally, the predicted values exceed these lines. It can be seen that the absolute error is not large at the lower flow rate, the relative error is higher, and the rest of the data is better, which achieves the purpose of predicting the flow rates.
(3)
Data of SAT, CAT, and CFB as inputsFigure 19
Histogram of the predicted value error of model 2.This model has less data, which is not conducive to the neural network but still achieves relatively good results according to Figure20. Overall, there is one and only one jump point, which may be caused by too little data or insufficient experimental conditions. Only one of the six predicted values has a relative error of 29.9%, and the rest are within 10%, the average relative error is 9.03%, which realizes the prediction of flow rate. After increasing the number of data samples, it is bound to further improve the accuracy and reduce the error. It also shows the superiority of model 3.Figure 20
Histogram of the predicted value error of model 3.


### 4.2. Result Analysis

The BP neural network has been used to process the raw data of the array logging tool, and different models have been designed to run. From the results of the three models, according to Figure21, the accuracy of model 1 is slightly worse, and the average relative error of model 1 is 10.84%, but the consistency is poor, while the average error of model 2 is 7.94% and model 3 is 9.03%. The accuracies are better than model 1. They are limited by the number of output data and a small number of total data sets, so their accuracies may still be improved. In general, this design can be used in actual production with improvement.Figure 21
Comparison chart of the prediction effect of the three models.


## 4.1. Sample Data Training and Prediction

In the laboratory environment, total input flow rates, water cuts, and wellbore inclinations are controlled; the corresponding MAPS data are used as the original data. Among them, all data samples are divided into two categories according to whether the measurement method is the continuous measurement or spot measurement, and only the CAT corresponding to SAT is included in the spot measurement data.In the wellbore, pulling the cable to drive the instrument to the direction of fluid entry is equivalent to increasing the flow rate. Therefore, Equation (1) and Equation (2) can be used to convert the cable speed into flow rate:
(1)Pc=14πD2×3600×24×10−6m3/d,(2)Q=v∗PC∗53,where Q represents the conversion flow (m3/d), v represents cable speed (m/min), and PC is pipe constant ((m3/d)/(cm/s)).After unit conversion and calculation according to the above formula, the result was obtained and made into Table1.Table 1
Cable speed-flow conversion table.
Experimental control flow (m3/d)Cable speed (m/min)Equivalent total flow (m3/d)1000100.0010385.9115528.8720671.823000300.0010585.9115728.8720871.826000600.0010885.91151028.87201171.82The array spinners of SAT are closely distributed in the wellbore wall, and the CFB is located in the center of the wellbore. The combination of the two can measure the flow data in the horizontal well. The conventional processing of these data is to consider the spinner starting velocity fitting to obtain the apparent velocity and obtain the flow data after deviation correction. Using the BP neural network to predict the flow of these data can omit the fitting step and ignore the influence of the correction factor, as shown below in the figures.Analyzing Figures7–17, we can get this conclusion: the response values of CFB with different water cuts have a different slope or intercept with the measuring velocity relational graph. There is also a significant difference in SAT response value in oil and water. It can be seen that SAT and CFB have different instrument constants and start-up velocities in different fluids. The data of CAT is used to give the phase states of different positions in the wellbore. In fact, the BP neural network is trained with different oil and water SAT and CFB data as weights. Therefore, CAT data can be added to the training to improve accuracy. According to the existing data and algorithm requirements, the following three prediction models have been set up:
(1)
Data of SAT as inputs: response value of spinner array tool as inputs (129 sets for training, 10 sets for test)(2)
Data of SAT and CFB as inputs: response value of spinner array tool and caged fullbore flowmeter as inputs (129 sets for training, 10 sets for test)(3)
Data of SAT, CAT, and CFB as inputs: response value of spinner array tool and capacitance array tool and caged fullbore flowmeter as inputs (24 sets for training, 6 sets for test)Figure 7
Relational graph of the measured value of 93° inclination of 100 m3/d CFB and cable speed.Figure 8
Relational graph of the measured value of 93° inclination of 300 m3/d CFB and cable speed.Figure 9
Relational graph of the measured value of 93° inclination of 600 m3/d CFB and cable speed.Figure 10
Relational graph of the measured value of 90° inclination of 100 m3/d CFB and cable speed.Figure 11
Relational graph of the measured value of 90° inclination of 300 m3/d CFB and cable speed.Figure 12
Relational graph of the measured value of 90° inclination of 600 m3/d CFB and cable speed.Figure 13
Relational graph of the measured value of 85° inclination of 100 m3/d CFB and cable speed.Figure 14
Relational graph of the measured value of 85° inclination of 300 m3/d CFB and cable speed.Figure 15
Relational graph of the measured value of 85° inclination of 600 m3/d CFB and cable speed.Figure 16
The response diagram of SAT spinners withflowrate=100 m3/d in horizontal well in different water cuts.Figure 17
The wellbore distribution map in horizontal well withflowrate=100 m3/d of SAT.The above three different input models all use actual flow rates as output for the BP neural network algorithm to adjust connection weights. When importing data into the algorithm, select several groups of data to keep (about 10% of the total amount of data samples) for use in testing algorithms, analyzing errors, and evaluating effects. Benefitting from the advantages of the BP neural network, the error can be continuously corrected to analyze the data by itself, so the data can be used directly without correction processing; on the other hand, due to the advantages of the BP network, when inputting the measured value of capacitance array tool CAT instrument, it is not necessary to normalize to obtain the water holdup, but the network can obtain the relationship through calculation by itself, which makes it quick and convenient to predict the flow rates on the way. The results obtained by running the above three models are as follows:(1)
Data of SAT as inputsThe average relative error is 10.84% and according to Figure18, there are many jump points. It may be related to insufficient experimental data, and the bigger reason is the limitation of the single SAT value as input that can be analyzed from Figure 18: only 5 of the predicted values can meet the requirement of less than 10% error, accounting for half of the total number of test samples, and the effect is not as expected.
(2)
Data of SAT and CFB as inputsFigure 18
Histogram of the predicted value error of model 1.According to Figure19, there are few jump points and basically, they meet the requirements, and the average relative error is 7.94%; according to the visual error chart, the effect is good, most of the predicted values fluctuate within the ±10% error line, and occasionally, the predicted values exceed these lines. It can be seen that the absolute error is not large at the lower flow rate, the relative error is higher, and the rest of the data is better, which achieves the purpose of predicting the flow rates.
(3)
Data of SAT, CAT, and CFB as inputsFigure 19
Histogram of the predicted value error of model 2.This model has less data, which is not conducive to the neural network but still achieves relatively good results according to Figure20. Overall, there is one and only one jump point, which may be caused by too little data or insufficient experimental conditions. Only one of the six predicted values has a relative error of 29.9%, and the rest are within 10%, the average relative error is 9.03%, which realizes the prediction of flow rate. After increasing the number of data samples, it is bound to further improve the accuracy and reduce the error. It also shows the superiority of model 3.Figure 20
Histogram of the predicted value error of model 3.


## 4.2. Result Analysis

The BP neural network has been used to process the raw data of the array logging tool, and different models have been designed to run. From the results of the three models, according to Figure21, the accuracy of model 1 is slightly worse, and the average relative error of model 1 is 10.84%, but the consistency is poor, while the average error of model 2 is 7.94% and model 3 is 9.03%. The accuracies are better than model 1. They are limited by the number of output data and a small number of total data sets, so their accuracies may still be improved. In general, this design can be used in actual production with improvement.Figure 21
Comparison chart of the prediction effect of the three models.


## 5. Conclusions

(1)
It is not feasible to predict the flow rates by using only a single spinner array tool SAT instrument response value as the data input. The other two prediction models have higher accuracy. After more data samples and more improvement of multiple output, directions and algorithms can be put into actual production interpretation and complement other methods of calculating flow(2)
Although the BP neural network does not need to calibrate the data due to its unique operating principle, the increased input parameters, for example, in model three, the introduction of capacitance array tool CAT measurement data is equivalent to giving the array spinner tool data with the water holdup parameter corresponding to the flowmeter which adds weight to the network when processing different spinners. As a result, the predicted flow rates are closer to the true value. It can be concluded that when using the BP network, increasing the related different parameters such as the corresponding RAT and CAT data will improve the efficiency and accuracy of the network, which is of great significance to the actual production(3)
BPNN is a traditional and mature neural network algorithm, which is easy to implement and obtain. However, it should be noted that BPNN has disadvantages such as difficult parameters to determine and dependence on samples and it takes many operations to determine the optimal parameter. In future studies, more advanced new algorithms will be used or extended to deep learning



---

*Source: 5916616-2022-04-11.xml*