Sensors 2020, 20, 1200; doi:10.3390/s20041200 www.mdpi.com/journal/sensors
Measurement of Gas-Oil Two-Phase Flow Patterns by
Using CNN Algorithm Based on Dual ECT Sensors
with Venturi Tube
, Fan Wu
, Xinmeng Yang
and Yi Li
Graduate School at Shenzhen, Tsinghua University, Shenzhen 518055, China;
email@example.com (Z.X.); firstname.lastname@example.org (X.Y.)
Graduate School at Suzhou, University of Science and Technology of China, Suzhou 215000, China;
* Correspondence: email@example.com
Received: 7 February 2020; Accepted: 18 February 2020; Published: 21 February 2020
Abstract: In modern society, the oil industry has become the foundation of the world economy,
and how to efficiently extract oil is a pressing problem. Among them, the accurate measurement of
oil-gas two-phase parameters is one of the bottlenecks in oil extraction technology. It is found that
through the experiment the flow patterns of the oil-gas two-phase flow will change after passing
through the venturi tube with the same flow rates. Under the different oil-gas flow rate, the
change will be diverse. Being motivated by the above experiments, we use the dual ECT sensors to
collect the capacitance values before and after the venturi tube, respectively. Additionally, we use
the linear projection algorithm (LBP) algorithm to reconstruct the image of flow patterns. This
paper discusses the relationship between the change of flow patterns and the flow rates.
Furthermore, a convolutional neural network (CNN) algorithm is proposed to predict the oil flow
rate, gas flow rate, and GVF (gas void fraction, especially referring to sectional gas fraction) of the
two-phase flow. We use ElasticNet regression as the loss function to effectively avoid possible
overfitting problems. In actual experiments, we compare the Typical-ECT-imaging-based-GVF
algorithm and SVM (Support Vector Machine) algorithm with CNN algorithm based on three
different ECT datasets. Three different sets of ECT data are used to predict the gas flow rate, oil
flow rate, and GVF, and they are respectively using the venturi front-based ECT data only, while
using the venturi behind-based ECT data and using both these data.
Keywords: convolutional neural network; oil-gas two-phase flow; electrical capacitance
Multiphase flow measurement technology is important in the exploitation of petroleum, the
accurate measurement of gas and oil flow rate in the oil-gas two phase flow has been the current
research issue. In the traditional flow measurement, multiple mixtures that were obtained in oil
wells need to be separated in the well for single-phase measurements . This method improves the
accuracy of single-phase measurement, but separating multiphase flow is too complicated , the
equipment is expensive, and the efficiency is low. Therefore, it is necessary to find an accurate and
efficient online measuring technology for multiphase flow .
Concerning the flow measurement of two-phase flow, there are many technologies that have
been used. Mohmmed et al. and Abbagoni and Yeung introduced high-speed cameras (with
transparent tube segments) to take high-speed shooting records for convection type [4,5], while
Dong et al. used ultrasonic Doppler sensors to estimate the total surface speed of the oil-water two
Sensors 2020, 20, 1200 2 of 19
phase flow . P. Aarabi JeshvaghanI et al. proposed and implemented a flow rate measurement
method that was based on gamma-ray attenuation to identify temperature independent flow .
The content of each phase in the pipe can be measured according to the attenuation of the rays by
the fluid in the pipe because different fluids in the same pipe absorb gamma rays differently. AGAR
corporation in the United States has designed a low-cost new multi-phase flow meter, AGAR
MPFM50, which combines Coriolis technology with traditional flow measurement equipment to
achieve better flow measurement results . China’s homer corporation has developed a short-
section multiphase flowmeter that uses venturi tube to measure the total flow in a pipe, a
multivariate sensor for measuring the temperature and pressure of the fluid as it flows through the
venturi tube, and a dual-gamma sensor was used to measure the gas flow rate and water flow rate
of the fluid . In addition, commonly used methods include capacitance probe, ultrasonic doppler
sensor , acoustic emission , fiber optic probe , wire network sensor , and so on. These
methods are feasible in a laboratory environment. However, when considering the complexity of
the oilfield environment, the application of these methods in real-world environments can be
hampered . For example, the transparent pipe segments that are required for high-speed
cameras cannot be achieved in practical applications, probes, and wire-mesh sensors that are in
contact with fluids in the experiment are difficult to repair in the oil field environment in the case of
bad weather . In contrast, electrical capacitance tomography (ECT) has the characteristics of fast
measurement speed (up to 5000 frames per second), low application cost, and mature product
development. The University of Manchester (Manchester, UK) developed the real-time ECT system
in collaboration with the University of Leeds (Leeds, UK) and Schlumberger Cambridge research
LTD. In addition, the Morgantown Energy Technology Center (METC) of the US Department of
Energy has independently developed the ECT sensor system [16,17]. The system has been
successfully applied to the flow measurement of oil-gas two-phase flow in oil field pipelines .
et al. used ECT sensor device to complete the flow measurement of the oil-gas two-phase
flow, and completed the cycle test under different flow patterns . Zhang and Wang used ECT
sensor technology combined with the artificial neural network to complete the identification of gas-
liquid two-phase flow pattern, and completed the measurement of oil flow rate . In brief, the
ECT sensor has lower requirement on working environment, and it can achieve accurate
measurement and good real-time performance . Hence, ECT is a commonly used detection
method in the field of oil fields .
The venturi tube is a throttling differential pressure gauge that has been widely used in the
flow measurement of single-phase or two-phase flow [21,22]. The submarine multiphase flowmeter,
which was developed by Norway’s ROXAR, uses a venturi-tube flowmeter combined with a
gamma-ray densitometer to improve the accuracy of flow rates measurements . It has the
characteristics of accurate measurement, low energy consumption, stable performance, and
convenient maintenance, and it has wide applications in the petrochemical industry [24,25]. Venturi
tubes have been widely used in single-stream measurement and multiphase flow measurement.
Therefore, the paper uses a combination of venturi tube and dual ECT sensors to observe the flow
patterns of the oil-gas two-phase flow before and after the venturi tube, and imaged by LBP (linear
projection algorithm) image reconstruction algorithm.
In the flow of two phase, the interface of two phase is distributed into different geometric
shapes or structural forms, which are so-called two-phase flow patterns . It is very complicated
to define and classify the flow patterns of oil and gas two-phase flow. Kosterin obtained the
classification of different flow patterns according to the form of interfacial phase distribution, and
obtained the flow pattern diagram of horizontal pipeline, which was used to describe the flow
pattern distribution . In addition, Barnea et al. proposed the flow pattern diagram of the
horizontal tube , while Caetano et al. proposed the flow pattern diagram of the vertical
ascending tube . The current common flow patterns include bubble flow, stratified flow, wavy
flow, slug flow, and annular flow .
The observation method is the method often used to identify the flow patterns, but this usually
leads to the subjectivity of the recognition. Some intelligent algorithms have been proposed to
Sensors 2020, 20, 1200 3 of 19
objectively recognize the flow patterns. For instance, wavelet analysis methods , support vector
machines, genetic algorithms, etc. Marashdeh et al. used the feed-forward neural network and
analogue Hopfield network technology for nonlinear image reconstruction of electrical capacitance
tomography [32,33]. Wang H.X and Zhang L.F used the capacitance value that was measured by a
single ECT as the input of the support vector machine (SVM) algorithm to perform GVF (gas void
fraction, especially referring to sectional gas fraction) prediction with an average relative error of
In this paper, we propose the convolutional neural network (CNN) algorithm to realize the
non-linear mapping of the flow rates and flow patterns in oil-gas two-phase flow. Two ECT sensors
were used to collect the data under different flow rates. One is located in front of the venturi tube
and the other is located in the end of the venturi tube. The LBP algorithm was used to image these
different flow patterns. By using the information from the flow pattern diagram, the CNN
algorithm is used to predict the oil flow rate, gas flow rate, and GVF. The flow pattern before
venturi tube, the flow pattern after venturi tube, and the flow pattern merged before and after
venturi tube are predicted, respectively. This paper improves the accuracy of measuring the flow
rates of the oil-gas two- phase flow while using the typical ECT measurement technology combined
with the machine learning algorithm.
2.1. Electrical Capacitance Tomography (ECT)
2.1.1. The Sensor
Electrical capacitance tomography consists of three main components: sensors, the system of data
acquisition, and the system of computer imaging. The system of data acquisition applies voltage to
each electrode plate of the sensor, and then obtains the capacitance value between any two plates by
demodulating the voltage value between the excitation plate and the ground plate; the collected
capacitance value is input into the computer imaging. The system performs normalization processing,
and the computer uses the normalized capacitance value and image reconstruction algorithms to
reconstruct the distribution of the internal medium of the measured fluid.
The commonly used ECT sensor consists of eight plates. For a sensor consisting of M electrode
plates, the number of independent capacitors is
( 1) / 2
when only one electrode is
energized and all the other electrodes remain at zero potential .
The boundary condition for ECT is that the potential distribution of the excitation electrode is
and the potential distribution of the fixed electrode is
. The relationship between the
capacitance and dielectric constant distribution is as follows:
( , ) ( , )
C x y x y d
Q is the charge,
( , )x y
is the distribution of dielectric constant,
( , )x y
is the distribution of
potential in the sensing region, and
is the unit charge on electrode surface.
2.1.2. Image Reconstruction
ECT image reconstruction is an inverse problem, which is based on capacitance measurements
between electrode pairs to confirm the electrical constants distribution in a pipeline. There is a
nonlinear relationship between the measured capacitance value and the dielectric constant, which
can be simplified as :
Sensors 2020, 20, 1200 4 of 19
is the normalized value of the capacitance vector,
is the normalized sensitive field
is the distribution matrix inside the medium (normalized dielectric constant). For the
ECT system, the normalization formula for
is as follows :
is the capacitance measurement vector when the pipe is full of gas and
capacitance measurement vector when the pipe is full of oil. For a two-dimensional field, the
sensitive field matrix
can be solved by the following formula :
( ) ( )
( ) , = 1,2,...
E q E q
S q ds q k
is the sensitivity of the electrode to the
is the distribution
of electric field intensity under the condition of applying voltage excitation
to electrode m, and
other electrodes are under grounding conditions.
is the same and
is the area of the grid q. In
imaging, it is often necessary to normalize the sensitive matrix, as follows:
After obtaining the sensitive matrix
, the formula for calculating the medium distribution
matrix can be obtained:
In most cases, the sensitive matrix
is irreversible, so
does not exist. Therefore, the linear
projection algorithm (LBP) is often used for image reconstruction. The algorithm uses the
of the sensitive field matrix
instead of the inverse matrix
sensitive field matrix to calculate the medium distribution matrix g , which is:
It can be obtained by normalization:
is the unit vector. The algorithm has simple principle, fast imaging speed, and wide
application range. In this paper, the LBP algorithm is used to obtain the flow patterns of oil-gas
two-phase flow, before and after the venturi tube. The flow patterns are obtained by inputting 28
sets of capacitance values.
2.2. Gas Void Fraction (GVF)
2.2.1. The Real GVF Calculation Formula
The calculation formula of real GVF
is shown in Equation (9).
Q Q Q
Sensors 2020, 20, 1200 5 of 19
In Equation (9),
represents gas volume flow,
represents the total volume flow, and
represents liquid volume flow, which herein represents the oil volume flow rate.
obtained through experimental measurements.
2.2.2. Typical-ECT-Imaging-Based-GVF Algorithm
We set the threshold to process the flow pattern diagram according to the pixel value of the
reconstructed flow pattern diagram. The threshold is set to 0.65, setting the pixel above the
threshold (i.e., oil) as 1, and the pixel below the threshold (i.e., air) as 0, the ratio of the number of
pixels of air to the total number of pixels is the gas void fraction (GVF, especially referring to
sectional gas fraction) in the current state. According to the pixel value of the flow pattern diagram,
the calculation formula of gas void fraction (GVF) is shown in Equation (10).
(1- ) 100%
GVF f A
is the total number of pixels in the section,
is the gray value of the
area of the
is the total area of the pipeline section.
2.3. SVM (Support Vector Machine) Algorithm
This paper uses the regression model of support vector machine, while using the Function (11):
( ) , ( ) .f x x b
Subsequently, it can derive the Equation (12):
( ) , ( ) .f y y b
is an independent variable,
is a dependent variable,
is a weight vector,
is an offset,
x R H
is a nonlinear function that maps the data set S to a high-dimensional linear
eigenspace and seeks optimality in the eigenvector. For the regression function, the optimization
goals and constraints of the SVM are Equations (13) and (14), respectively. The
function is used for a given training data set. The corresponding support vector machine is the
-Support Vector Machine .
|| || ( ), 1, 2,...
K j m
. . ( )
y x b
s t x b y
is the penalty coefficient, the larger value indicates the higher requirement for error, by
introducing Lagrangian function, the optimization problem of Equations (13) and (14) is
transformed into dual problem, which is obtained by solving the dual problem (the solution of
Equation (11) :
( ) , ( ) ( , )
j j i
f x x b a Q x x b
The Gaussian core is used in this paper :
Sensors 2020, 20, 1200 6 of 19
( , ) exp( )
Q x x
is the vector difference of the Lagrangian multiplier, b is the constant term, which is the
offset constant, and the
parameter is the kernel width. It can be seen from Equations (11)–(16)
that the promotion ability of SVM can be controlled by controlling
In this paper, the independent variable x is the flow pattern that is obtained by the LBP
algorithm, and the dependent variable y is the oil flow rate, gas flow rate, and GVF corresponding
to the flow patterns. Finally, the optimal regression function between the image high-dimensional
data and the feature vectors is obtained .
2.4. Convolutional Neural Network (CNN)
The image reconstruction algorithm can obtain the flow patterns under different working
conditions. In this paper, the CNN algorithm is used to solve the nonlinear mapping of oil-gas two-
phase flow parameters (GVF and flow rates) to the change of flow patterns. The input of the CNN
model is the flow patterns before and after the venturi tube, and the output is the oil flow rate, gas
flow rate, and GVF under the corresponding state of the flow patterns. The traditional regression
algorithm cannot solve the relationship between high-dimensional data (streaming image pixels)
and low-dimensional data (GVF and flow rates). In the CNN algorithm, increasing the nonlinear
activation response can decouple more nonlinear characteristics, thus the training speed of the
network can be improved . In this paper, the Inception V3 model of the CNN algorithm is used
to solve the nonlinear mapping of oil-gas two-phase flow parameters (GVF and flow rates) and the
changes of flow patterns before and after the venturi tube. Figure 1 shows the model structure
Figure 1. Convolutional neural network (CNN) network model structure diagram.
As an extremely deep CNN model, Inception V3 has a very sophisticated design and
construction. The structure and branches of the entire network are very complicated. The
convolutional network is gradually reduced in size from input to output, and the number of output
channels is gradually increased. The spatial information is transformed into high order abstract
information by simplifying the spatial structure. Factorization into small convolutions is very
effective, it can reduce the amount of parameters, reduce over-fitting, and enhance the nonlinear
expression of the network . It is very suitable for solving the high-dimensional and nonlinear
relationship between the flow patterns and the GVF. In this paper, the input layer of the neural
Sensors 2020, 20, 1200 7 of 19
network is flow patterns that were obtained by image reconstruction, and the output layer has two
neurons for outputting the predicted values of gas and oil flow rates.
When compared to the fully connected neural network, the CNN algorithm implements local
connectivity, weight sharing, and down-sampling. For the input image, this algorithm can achieve
better learning effects by retaining important parameters as much as possible and removing a large
number of unimportant parameters .
The forward propagation algorithm in neural networks can be expressed as :
h h h h
m mn n m
k f w k q
is the result of the
neuron in the
is the result of the
neural network, and
neuron of the
layer to the
deviation of the
neuron in the
layer neural network.
The Relu activation function that is used
in this paper is expressed, as follows :
( ) max ( ,0)f x x
The loss function of the network uses ElasticNet regression, which is a mixture of Ridge and
Lasso regression techniques. In the case of highly correlated variables, the group effect is generated.
The number of selected variables is not limited and it can withstand double contraction. When
compared to the least squares regression, ElasticNet regression effectively avoids possible over-
fitting problems. The input of the network in this paper is an image, which belongs to high-
dimensional data. ElasticNet regression has obvious effects in the case of multi-collinearity between
high-dimensional and data-set variables. Its objective function is shown in Equation (18) :
( ) ( ) 2 2
1 1 2
[ ( ( ) ) || || || || ] ( )
e h x y T
is the error between the true and predicted value,
is the predicted oil flow rate and
gas flow rate,
is the true oil flow rate and gas flow rate, n is the number of data sets, and
are regularization parameters.
is a vector containing weights and deviations between
individual neurons .
By using the back propagation of the CNN to update the weights, the training model uses the
Inception V3 network in the CNN. In this paper, the ECT data is first measured by a large number
of experiments, and the acquired ECT data re imaged by a linear projection algorithm to obtain the
flow patterns. Under different working conditions, the flow patterns before and after the venturi
tube are input the CNN model to predict the oil flow rate, gas flow rate, and GVF.
For the CNN algorithm, the real-time parameters of the algorithm are frames per second (FPS),
and the complexity parameters of the algorithm are params and floating-point operations per
second (FLOPS) of the model. Algorithm real-time FPS that is based on Nvidia 1080Ti graphics
card(NVIDIA, Santa Clara, CA,USA) measured FPS is 130.2, its params is 27.16 (M), and FLOPS is
The experiment was completed on a semi-industrial multiphase flow experimental measuring
platform. The overall experimental equipment is shown below. Oil is stored in a separator, being
separated according to the principle of gravity and a gas phase compressor produces the gas.
Natural gas and oil flow through single-phase pipelines, the mixture of oil and gas can pass
through the test pipe. The test pipe is eight meters long, and the ECT sensor and venturi tube are on
the test pipe. The maximum pressure of the device is 2 Mpa. The detailed dimensional layout of the
venturi tube and ECT sensor is given below. The length of the venturi tube is 1200 mm, the length
of the inner diameter is 50 mm, the length of the outer diameter is 60 mm, the length of the throat
Sensors 2020, 20, 1200 8 of 19
tube is 130 mm, and the opening Angle is 18°. The ECT sensor has an internal structure of eight
electrodes, and the insulation wall of ECT sensor is 5 mm thick. Its length is 60 mm. The length of
the internal diameter is 50 mm. The length of the external diameter is 86 mm and the internal
electrode size is 192 mm × 90 mm.
Figure 2. Schematic diagram of experimental equipment.
Figure 2 shows the schematic diagram of the experimental equipment used to perform this
experiment. In this experiment, there are two ECT sensors that are located on upstream and
downstream of the venturi tube. There are 8 electrodes inside each ECT sensor. The acquisition
frequency of ECT system is 100 frames/s, and the excitation signal frequency of ECT is 100 kHz. The
SNR (signal to noise ratio) of the hardware system is about 62 dB.
The experimental material is No.15 industrial white oil, having a relative dielectric constant of
2.2, the density is 880 kg/m
, and the viscosity is 8.8 mPa s (33 °C), white oil contains high levels of
cycloparaffin (MOSH) and 25% Alkyl substituted aromatic hydrocarbons (MOAH). The gas is
natural gas, which is consistent with the oilfield site environment. The working pressure is 0.6 MPa.
The experimental temperature is 33 °C while using the temperature transmitter.
In this experiment, we collected a large amount of experimental data to train the model.
Through the semi-industrial multiphase flow experimental measurement platform, the data
collected time under each working condition is 10 min, and the collected data are the capacitance
value of ECT sensor. The LBP image reconstruction algorithm is used to convert the capacitance
into flow pattern for model training. The train set was collected under 52 working conditions. There
were 8000 training samples in each working condition, and the total number of training samples
was 416,000. The test set was also collected under the same 52 working conditions. There were 2000
test samples in each working condition, and the total number of test samples was 104,000. Table 1
shows the specific oil flow rate, gas flow rate, and GVF of the 52 working conditions in the
Table 1. Working condition distribution table m
Gas 1 1.5 2 2.5 3 3.5 4 4.5 5 6 7 8 10
50 2 6 50
150 4 48 52
Sensors 2020, 20, 1200 9 of 19
Table 1 shows the oil flow rate and gas flow rate distribution of 52 working conditions. In the
actual experiment, when collecting experimental data, the oil flow rate and gas flow rate of each
working condition are not a fixed value. It will randomly fluctuate by 15% above or below the set
working condition. Accordingly, the data of the training set and the test set are not same, which
effectively verifies the generality of the trained model. The flow pattern diagram that is shown in
Figure 3 is the representative of the flow pattern diagram under some typical working conditions.
Figure 3 shows the flow patterns change before and after the venturi tube. The values of GVF in the
experiment are evenly distributed between 0.25 and 0.95 in order to ensure the full coverage of
GVF. The data collection began once the single flow rate was stable, and the oil and gas mixing was
Figure 3. Averaged electrical capacitance tomography (ECT) image (100 frames) of flow distribution
before and after venturi tube.
4. Analysis and Discussion
4.1. Flow Data Analysis
In this experiment, the two-phase flow flows through the venturi tube, ECT data before and
after the venturi tube are collected. The LBP algorithm is used to image the flow distributions. The
ECT images vary a lot due to the noise in measurement data. The average ECT images were
averaged by 100 pieces of ECT data, and the flow patterns tend to be stable and they are convenient
for analysis. The following is the flow patterns before and after the venturi tube under typical
working conditions. Figure 3 shows the flow patterns before and after the venturi tube under
typical working conditions.
Figure 3 shows the flow pattern under typical working conditions. It can be seen from the
Figure 3 that, under, different oil and gas flow rate, the flow pattern in front of the venturi tube
changes little, but after the oil-gas two-phase flow passes through the venturi tube, the flow pattern
changes greatly. When the gas flow rate is small, the flow pattern is stratified flow. With the
increase of gas flow rate, the flow pattern becomes slug flow. The flow pattern becomes annular
flow when the gas flow rate continues to increase. Figure 4 shows the flow patterns change before
and after the venturi tube under typical GVF.
Sensors 2020, 20, 1200 10 of 19
Figure 4. Flow pattern diagram under typical gas void fraction (GVF).
From Figure 4, it can be seen that flow patterns change before and after the venturi tube when
the GVF value changes from 0.2 to 0.9. When the GVF is less than 0.6, the flow patterns before the
venturi tube is 90% stratified flow and 70% stratified flow, while the flow patterns after the venturi
tube is slug flow. When the GVF is more than 0.6, the flow pattern diagram before the venturi tube
is still stratified flow, but the flow pattern diagram after the venturi tube becomes annular flow.
When the oil flow rate is more than 5 m
/h, the annular flow trend of the flow patterns after the
venturi tube is more obvious. Based on this phenomenon, the CNN network is used to predict the
oil flow rates and gas flow rates while using the ECT images as the input.
4.2. Flow Pattern Recognition and Prediction
In this paper, the flow patterns in front of the venturi tube, the flow patterns after the venturi
tube, and the flow patterns merged before and after the venturi tube are respectively input into the
network for prediction, and the relative error is compared. This paper uses the Inception V3 model
in CNN to predict the flow rates under different conditions since the relationship between flow
patterns and oil and gas flow rate is non-linear. The flow patterns in front of the venturi tube, the
flow patterns after the venturi tube, and the flow patterns merged before and after the venturi tube
were respectively trained to compare the predicted performance of oil flow rate, gas flow rates, and
Firstly, the flow patterns were obtained according to the LBP image reconstruction algorithm,
and the corresponding GVF (gas void fraction) in the current flow patterns was calculated while
using the Typical-ECT-image-based-GVF algorithm. We set the threshold to process the oil-gas
Sensors 2020, 20, 1200 11 of 19
two-phase flow imaging image. The threshold is set to 0.65, setting the pixel above the threshold
(i.e., oil) as 1, and the pixel below the threshold (i.e., air) as 0. The ratio of the number of pixels of air
to the total number of pixels is the gas void fraction (GVF) in the current state.
We use the Typical-ECT-image-based-GVF algorithm to predict the GVF and obtain the
average relative error of the prediction. Figure 5 shows the relative error of predicted GVF from the
Figure 5. Relative error of GVF obtained from ECT images.
From Figure 5 (the X-axis represents 52 working conditions, i.e., the range of oil flow rate is
/h, the range of gas flow rate is 20–150 m
/h, and the range of GVF is 0.25–0.95. The Y-axis
represents the average relative error of each case) it can be seen that whether it is the flow patterns
before the venturi tube, the flow patterns after the venturi tube, and the flow patterns before and
after the venturi tube. The effect of Typical-ECT-image-based-GVF algorithm for predicting GVF is
poor. This might be due to the low accuracy of the LBP algorithm. The LBP algorithm has better
real-time performance, but the imaging accuracy is worse than that of various complex iterative
algorithms. It affects the accuracy of the GVF measurements to some extent.
Meanwhile, the SVM algorithm is a commonly used algorithm for GVF prediction of oil-gas
two-phase flow. The flow patterns that are obtained by linear projection algorithm (LBP) are input
into the model, and the oil flow rate and gas flow rate corresponding to each flow pattern are
respectively input, to find out the non-linear relationship between the flow patterns and oil flow
rate, gas flow rate, and GVF. The oil flow rate and gas flow rates predicted from 10,000 pictures
under each working condition were averaged, respectively. We compare the actual value of the oil
flow rates and gas flow rates with the predicted value.
Figures 6–8, respectively, show the relative errors in predicting the oil flow rate, gas flow rate,
and GVF of oil-gas two-phase flows while using the SVM algorithm. For the prediction of oil flow
rate, whether it is the flow patterns in front of the venturi tube, the flow pattern after the venturi
tube, or the flow patterns before and after the venturi tube, the relative error is large at low flow
rates, as can be seen from Figure 6. As the oil flow rate increases, the predicted relative error
decreases. As can be seen from Figures 7 and 8, for the gas flow rate and GVF prediction, in the
small gas flow rate, the relative error is large. This shows that the SVM algorithm is only suitable
for the prediction of large oil and gas flow rate, which might be related to the limitations of the
SVM algorithm itself. The principle of SVM algorithm is based on existing data, and the hyperplane
is fitted to predict, which has certain limitations on high-dimensional data. The CNN algorithm is
introduced to solve the relationship between high-dimensional data (flow pattern diagram pixels)
and low-dimensional data (GVF and flow rates) to solve the problem.
Sensors 2020, 20, 1200 12 of 19
Figure 6. Relative error of oil flow rate with support vector machine (SVM) algorithm.
Figure 7. Relative error of gas flow rate with the SVM algorithm.
Figure 8. Relative error of GVF with SVM algorithm.
Sensors 2020, 20, 1200 13 of 19
The training model uses the Inception V3 network in a CNN algorithm. Since the input is
image pixel data, the data dimension is high and the amount of data is large. With the Inception V3
network, large two-dimensional (2D) volumes can be integrated into two smaller convolutions. In
the CNN model, there are 416,000 samples in the training set and 104,000 samples in the test set.
The oil flow rates, gas flow rates, and GVF predicted by 10,000 images under each condition were
averaged and then compared with the actual values. The oil flow rate, gas flow rate, and GVF
under 52 conditions were predicted and the relative error was obtained.
Figures 9–11, respectively, show the relative errors in predicting the oil flow rate, gas flow rate,
and GVF of oil-gas two-phase flows while using the CNN algorithm. It can be seen from Figure 9
that using CNN algorithm to predict the oil flow rate, the prediction results of the merged flow
patterns before and after the venturi tube are superior to those prediction results of the flow
patterns before the venturi tube and the flow patterns after the venturi tube. It can be seen from
Figure 10 and 11 that, while using the CNN algorithm to predict the gas flow rate and GVF, the
prediction relative errors are less than 5% through the merged flow patterns before and after the
Figure 9. Relative error of oil flow rate with CNN algorithm.
Figure 10. Relative error of gas flow rate with CNN algorithm.
Sensors 2020, 20, 1200 14 of 19
Figure 11. Relative error of GVF with CNN algorithm.
As can be found, the prediction accuracy of the CNN algorithm has been significantly
improved when compared with the Typical-ECT-imaging-based-GVF algorithm and SVM
algorithm. It can be seen that the CNN network is suitable for the regression of high-dimensional
image data and greatly improved the predicted results.
The flow patterns after the venturi tube, and the merged flow patterns before and after the
venturi tube, the average prediction relative error of the three sets of flow patterns is analyzed
below to compare the flow patterns before the venturi tube.
From Tables 2–4, CNN algorithm can provide the most accurate prediction of gas flow rates
and oil flow rates. Meanwhile, using the ECT data that were collected before and after the venturi
tube can also improve the accuracy of the measurement of the flow rates.
Table 2. Average relative error table of prediction of data before the venturi tube.
Image SVM CNN
rate no 23.01% 7.02%
rate no 30.66% 7.12%
GVF 43.85% 8.23% 5.01%
Table 3. Average relative error table of prediction of data after the venturi tube.
Image SVM CNN
Oil flow rate no 22.18% 7.03%
Gas flow ate no 21.59% 1.47%
GVF 56.30% 9.13% 1.88%
Table 4. Average relative error table of prediction of Mixed data before and after the venturi tube.
Image SVM CNN
Oil flow rate no 67.12% 4.66%
Gas flow rate no 89.88% 1.43%
GVF 43.09% 27.04% 1.67%
Sensors 2020, 20, 1200 15 of 19
Among them, while using the CNN algorithm, the average relative error of oil flow rate
prediction is 4.6%, the predicted relative error of gas flow rate is 1.4%, and the average relative
error of GVF prediction is 1.6%.
In terms of the measurement of GVF by using the ECT sensor before the venturi tube with
SVM algorithm, 90 percent results of 104,000 test samples are less than the relative error with 13.8%,
and with CNN algorithm, 90 percent results are less than the relative error with 4.48%, it can be
seen that the CNN algorithm is better than the SVM algorithm. When compared to the data before
the venturi tube, the measurement of GVF by using the data after the venturi tube with CNN
algorithm, 90 percent relative error of 104,000 test samples are less than 3.74%, and it can be seen
that the prediction effect of the data after the venturi tube is better. 90 percent relative error of
104,000 test samples are less than 3.06% by using the mixed data before and after the venturi tube
with CNN algorithm. It can be seen that the prediction effect of the merged flow patterns before
and after the venturi tube is the best.
Finally, for oil flow rate prediction, the relative error of 90% is less than 11%; for gas flow rate
prediction, the relative error of 95% is less than 3.6%, and that of 90% is less than 2.2%; and, for GVF
prediction, the relative error of 95% is less than 3.3% and that of 90% is less than 3%.
4.3. Raw Capacitance Data (Comparative Experiment)
We use the original capacitance data as input to perform the flow prediction in order to
compare with the experimental prediction results of the input of the flow pattern. The SVM
algorithm and CNN algorithm were used to predict the oil content, gas content, and GVF,
respectively. The eight-electrode ECT sensor generates 28 sets of capacitance values. First, the 28
sets of capacitance values are input to the SVM algorithm for flow prediction. The training data set
is 8000 and the test data set is 2000. In the traditional SVM regression algorithm, the capacitance
value needs to be normalized in order to compare with the experimental prediction results of the
input of the flow pattern (if the normalization is not performed, the algorithm cannot converge).
The prediction results are shown in Figure 12.
Figure 12. Relative error of SVM algorithm based on original capacitance value.
It can be seen from Figure 12 that the prediction result of the SVM algorithm that is based on
the original capacitance value is significantly worse than the prediction result of the CNN algorithm
based on the flow pattern diagram. The average relative error of the SVM algorithm that is based on
Sensors 2020, 20, 1200 16 of 19
the original capacitance value is 0.47. The SVM algorithm is sensitive to the parameter adjustment
and the choice of the kernel function, and it has a poor effect on the regression problem.
Furthermore, we use the CNN algorithm with the original capacitance value as the input to
perform flow rate prediction. The training set has a total of 416,000 and the test set has a total of
104,000. Figure 13 shows the flow rate prediction result.
Figure 13. Relative error of CNN algorithm based on original capacitance value.
When comparing with the prediction results of the CNN algorithm based on the flow patterns,
the prediction result of the CNN algorithm based on 28 original capacitance values is obviously
poor, as can be seen from Figure 13. The average relative error of the CNN algorithm based on 28
original capacitance values is: 0.33. It can be seen that modeling and analysis that are based on the
flow pattern diagram have better prediction results.
The CNN algorithm is suitable for information extraction and the fitting of two-dimensional
data because of its application of a large number of convolution operations. For 28 capacitance
values in one dimension, the CNN algorithm has a very poor extraction effect on its effective
information. Therefore, this paper reconstructs the flow pattern diagram that is based on 28
capacitance values, which makes the CNN algorithm extract features more efficiently. From a
mathematical perspective, the purpose of this algorithm to reconstruct 28 capacitance values into a
flow pattern is to make its representation more suitable for CNN algorithm to extract features.
The above is based on the analysis of the capacitance data of the dual ECT sensors before and
after the venturi tube, and the prediction results for the capacitance data of a single ECT sensor are
similar to those that are shown in Figures 13–14.
It can be seen that the prediction effect of using the flow pattern image as the input of the CNN
model is better than that of the original capacitance value input to the CNN model. For the input of
the flow pattern image, it can be seen that, whether it is the comparison of the average relative error
or the comparison of the relative error of 90% measuring results, the best prediction effect can be
achieved by predicting the merged flow patterns before and after the venturi tube by the CNN
algorithm. This shows that the predictive accuracy of oil flow rate, gas flow rate, and GVF with the
dual ECT sensors is better than the single ECT. The CNN algorithm is used to solve the relationship
between high-dimensional data (pixels of the flow pattern diagram) and low-dimensional data
(GVF and flow rate) that cannot be solved by traditional algorithms. The prediction effect is better
when compared with traditional prediction algorithms.
Sensors 2020, 20, 1200 17 of 19
It can be seen from the experiment that the prediction result of using the flow pattern image as
the input of the CNN algorithm is much better than the prediction result of the input of the original
capacitance value. Through the experiment, it can be seen that the flow patterns of oil-gas
two-phase flow before and after venturi tube is different, with the different flow rates, the varying
behavior will be different. The oil flow rate, gas flow rate, and GVF under current working
conditions are predicted by the flow patterns change before and after the venturi tube. While
considering the nonlinear relationship between flow pattern diagrams with flow rates, a
convolutional neural network algorithm is proposed to predict gas and oil flow rate. The CNN
model has accurate and stable performance. The experimental results show that the improved CNN
model has higher prediction performance, the average relative error of oil flow rate is 4.6%; the
average relative error of gas flow rate is 1.4%; and, the average relative error of GVF is 1.6%.
In summary, the CNN algorithm greatly improves the predictive accuracy of GVF. It is of great
significance to accurately measure the parameters of oil-gas two-phase flow. Unfortunately, the
CNN algorithm requires high computational force; at the present stage, it is unable to realize the
rapid deployment of measurement devices in the industry, and it is also unable to convert them
into portable devices. In addition, the ECT image reconstruction algorithm should be further
improved to make its computational efficiency more in line with the needs of practical industrial
applications. Therefore, this method is not easy to realize in real-time flow measurement in
industrial field. In the future, we will conduct in depth research on the lightweight and embedded
Author Contributions: Conceptualization, Y.L.; Methodology, Z.X., Fan Wu, X.Y.and Y.L.; software, Z.X., F.W.
and X.Y.; Validation, Z.X. and F.W.; Investigation, Z.X. and X.Y.; Data curation, Z.X. and X.Y.; writing—
original draft preparation, Z.X.; writing—review and editing, Z.X. and Y.L.; visualization, Z.X. and F.W.;
Funding acquisition, Y.L..
Funding: This research was funded by National Natural Science Foundation of China, grant number
Acknowledgments: The authors would like to thank the National Natural Science Foundation of China
(No.61571252) for supporting this work. Also thanks to the engineers of Leengstar Co. Ltd., who help me this
Conflicts of Interest: The authors declare no conflict of interest.
1. Omar, R.; Hewakandamby, B.; Azzi, A.; Azzopardi, B. Fluid structure behaviour in gas-oil two-phase
flow in a moderately large diameter vertical pipe. Chem. Eng. Sci. 2018, 187, 377–390,
2. Hanafizadeh, P.; Eshraghi, J.; Nazari, Y.; Yousefpour, K.; Behabadi, M.A.A. Light oil—Gas two-phase
flow pattern identification in different pipe orientations: An experimental approach. Sci. Iran. Trans. B
Mech. Eng. 2017, 24, 2445–2456.
3. Drury, R.; Hunt, A.; Brusey, J. Identification of horizontal slug flow structures for application in selective
cross-correlation metering. Flow Meas. Instrum. 2019, 66, 141–149.
4. Mohmmed, A.O.; Nasif, M.S.; Al-Kayiem, H.H.; Time, R.W. Measurements of translational slug velocity
and slug length using an image processing technique Flow. Meas. Instrum. 2016, 50, 112–120.
5. Abbagoni, B.M.; Yeung, H. Non-invasive classification of gas-liquid two-phase horizontal flow regimes
using an ultrasonic Doppler sensor and a neural network. Meas. Sci. Technol. 2016, 27, 84002.
6. Dong, X.; Tan, C.; Yuan, Y.; Dong, F. Measuring oil-water two-phase flow velocity with continuous-wave
ultrasound doppler sensor and drift-flux model. IEEE Trans. Instrum. Meas. 2016, 65, 1098–1107.
7. P. Aarabi Jeshvaghani, S.A.H. Feghhi, M. Khorsandi,Temperature independent flow-rate prediction in
two-phase flow loop using gamma-ray attenuation and Artificial Neural Networks, Radiation
Measurements, Volume 128, 2019, 106175, ISSN 1350-4487, https://doi.org/10.1016/j.radmeas.2019.106175
Sensors 2020, 20, 1200 18 of 19
8. Lupeau, A.; Platet, B.; Gajan, P.; Strzelecki, A.; Escande, J.; Couput, J.P. Influence of the presence of an
upstream annular liquid film on the wet gas flow measured by a Venturi in a downward vertical
configuration. Flow Meas. Instrum. 2007, 18, 1–11.
9. Steven, R. A dimensional analysis of two phase flow through a horizontally installed Venturi flow meter.
Flow Meas. Instrum. 2008, 19, 342–349, doi:10.1016/j.flowmeasinst.2008.05.004.
10. Meng, Z.Z.; Huang, Z.; Wang, B.; Ji, H.; Li, H.; Yan, Y. Air—Water two-phase flow measurement using a
Venturi meter and an electrical resistance tomography sensor. Flow Meas. Instrum. 2010, 21, 268–276,
11. Alssayh, M.A.; Addali, A.; Mba, D. Determining slug velocityin two-phase flow with acoustic emission.
In Proceedings of the 51st Annual Conference of the British Institute of Non-Destructive Testing, NDT,
Northamptonshire, UK, 11–13 September 2012.
12. Liu, L.; Bai, B. Flow regime identification of swirling gas-liquid flow with image processing technique
and neural networks. Chem. Eng. Sci. 2019, 199, 588–601.
13. Chen, S.W.; Brooks, C.S.; Macke, C.; Hibiki, T.; Ishii, M.; Mori, M. Experiment of adiabatic two-phase flow
in an annulus under low-frequency vibration. In Proceedings of the 20th International Conference of
Nuclear Engineering (ICONE20), Anaheim, CA, USA, 30 July 2012.
14. Parham, P. Pattern recognition in real time using neural networks: An application for pressure
measurement. In Proceedings of the ICPRAM 2016—5th International Conference on Pattern Recognition
Applications and Methods, Rome, Italy, 24–26 September 2016; pp. 566–572.
15. Kesana, N.R.; Parsi, M.; Vieira, R.E.; Azzopardi, B.; Schleicher, E.; McLaury, B.S.; Shirazi, S.A.; Uwe
Hampel Visualization of gas-liquid multiphase pseudo-slug flow using Wire-Mesh Sensor. J. Nat. Gas. Sci.
Eng. 2017, 46, 477–490.
16. Fasching, G.E.; Smith, N.S. High Resolution Capacitance Imaging System; National Technical Information
Service Report No. DE88010277; U.S. DOE: Morgantown, WV, USA, 1988.
17. Halow, J.S.; Nicoletti, P. Observations of fluidized bed coalescence using capacitance imaging. Powder
Technol. 1992, 69, 255–277.
18. Ismail, I.; Gamio, J.C.; Bukhari, S.F.A.; Yang, W.Q. Tomography for multi-phase flow measurement in the
oil industry. Flow Meas. Instrum. 2005, 16, 145–155, doi:10.1016/j.flowmeasinst.2005.02.017.
19. Zhang, L.F.; Wang, H.X. Identification of two-phase flow regime based on electrical capacitance
tomography and soft-sensing technique. In Proceedings of the 7th International Symposium on
Instrumentation and Control Technology OCT, Beijing, China, 10–13 October 2008.
20. Guo, Q.; Ye, M.; Yang, W.Q.; Liu, Z.M. A machine learning approach for electrical capacitance
tomography measurement of gas-solid fluidized beds. AIChE J. 2019, 65, doi:10.1002/aic.16583.
21. Bertoldi, D.; Dallalba, C.C.S.; Barbosa, J.R. Experimental investigation of two-phase flashing flows of a
binary mixture of infinite relative volatility in a Venturi tube. Exp. Therm. Fluid Sci. 2015, 64, 152–163,
22. China University of Petroleum-Beijing Submits Chinese Patent Application for Rough Wall Miniature
Horizontal Wellbore Gas-Liquid Two-Phase Flow Experimental Device and Experimental Method. Global
IP News. Oil & Gas Patent News. 11 April 2018.
23. Scheaua, F.D. Theoretical approaches regarding the VENTURI effect. Hidraulica 2016, 69.
24. Borsuk, G.; Dobrowolski, B.; Wydrych, J. A numerical analysis of metrological properties of venturi tube
in the air-coal particle mixture flow measurement in power industry. Les Ulis Edp Sci. 2017,
25. Kashid, M.N.; Kowaliński, W.; Renken, A.; Baldyga, J.; Kiwi-Minsker, L. Analytical method to predict
two-phase flow pattern in horizontal micro-capillaries. Chem. Eng. Sci. 2012, 74, 219–232.
26. Thome, J.R.; El Hajal, J. Two-Phase Flow Pattern Map for Evaporation in Horizontal Tubes: Latest
Version. In Proceedings of the 1st International Conference on Heat Transfer, Fluid Mechanics and
Thermodynamics, Kruger Park, South Africa, 8–10 April, 2002; pp. 182–188.
27. Kosterin, S.I. An Investigation of the Influence of the Diameter and Inclination of a Tube on the Hydraulic
Resistance and Flow Structure of Gas-liquid Mixtures. Izvest. Akad. Nauk. SSSR, Otdel Tekh Nauk 1949, 12,
28. Barnea, D., Luninski, Y. and Taitel, Y. Flow pattern in horizontal and vertical two phase flow in small
diameter pipes. Can. J. Chem. Eng. 1983, 61,617-620. doi:10.1002/cjce.5450610501.
Sensors 2020, 20, 1200 19 of 19
29. Caetano, E. F., Shoham, O., and Brill, J. P. "Upward Vertical Two-Phase Flow Through an Annulus—Part
I: Single-Phase Friction Factor, Taylor Bubble Rise Velocity, and Flow Pattern Prediction." ASME. J.
Energy Resour. Technol. 1992; 114, 1–13.
30. Rosa, E.S.; Salgado, R.M.; Ohishi, T.; Mastelari, N. Performance comparison of artificial neural networks
and expert systems applied to flow pattern identification in vertical ascendant gas–liquid flows. Int. J.
Multiph. Flow 2010, 36, 738–754, doi:10.1016/j.ijmultiphaseflow.2010.05.001.
31. Marashdeh, Q.; Warsito, W.; Fan, L.-S.; Teixeira, F.L. Nonlinear forward problem solution for electrical
capacitance tomography using feed-forward neural network. IEEE Sens. J. 2006, 6, 441–449.
32. Marashdeh, Q.; Warsito, W.; Fan, L.-S.; Teixeira, F.L. A nonlinear image reconstruction technique for ECT
using a combined neural network approach. Meas. Sci. Technol. 2006, 17, 2097–2103.
33. Xie, C.G.; Huang, S.; Beck, M.; Hoyle, B.; Thorn, R.; Lenn, C.; Snowden, D. Electrical capacitance
tomography for flow imaging: System model for development of image reconstruction algorithms and
design of primary sensors. IEE Proc. G 1992, 139, 89–98.
34. Wang H X, Zhang L F. Identification of two-phase flow regimes based on support vector machine and
electrical capacitance tomography. Meas. Sci. Technol. 2009, 20, 114007.
35. Liu, S.; Fuand, L.; Yang, W.Q. Optimization of an iterative image reconstruction algorithm for electrical
capacitance tomography. Meas. Sci. Technol. 1999, 60.
36. Guo, Q.; Meng, S.; Wang, D.; Zhao, Y.; Ye, M.; Yang, W.; Liu, Z. Investigation of gas-solid bubbling
fluidized beds using ECT with a modified Tikhonov regularization technique. AIChE J. 2018, 64, 29–41.
37. Yang, W.Q.;
Peng, L. Image reconstruction algorithms for electrical capacitance tomography. Meas. Sci.
Technol. 2012, 14, 1–13.
38. Cortes, C.; Vapnik, V. Support vector networks. Mach. Learn. 1995, 20, 1–25.
39. Xia, X.L.; Xu, C.; Nan, B. Inception-v3 for Flower Classification. In Proceedings of the 2017 2nd
International Conference on Image, Vision and Computing (ICIVC 2017), Chengdu, China, 2–4 June 2017.
40. Zhao, Y. High Viscosity Liquid Two-Phase Flow. Ph.D. Thesis, Cranfield University, Cranfield, UK, 2013.
41. Ji, D.; Zhang, M.; Xu, T.; Wang, K.; Li, P.; Ju, F. Experimental and numerical studies of the jet tube based
on venturi effect. Vacuum 2015, 111, 25–31.
42. El Hajal, J.; Thome, J.R.; Cavallini, A. Condensation in Horizontal Tubes, Part 1: Two-Phase Flow Pattern
Map. Int. J. Heat Mass Transfer 2003, 46, 3349–3363.
43. Sun, B.; Wang, E.; Ding, Y.; Bai, H.; Huang, Y. Time-Frequency Signal Processing for Gas-Liquid Two
Phase Flow Through a Horizontal Venturi Based on Adaptive Optimal-Kernel Theory. Chin. J. Chem. Eng.
2011, 19, 243–252.
44. Wael, H. Ahmed Capacitance sensors for void-fraction measurements and flow-pattern identification in
air-oil two-phase flow. IEEE Sens. J. 2006, 6, 1153–1163.
45. Zhai, L.S.; Jin, N.D.; Gao, Z.K.; Zhao, A.; Zhu, L. Cross-correlation velocity measurement of horizontal oil-
water two-phase flow by using parallel-wire capacitance probe. Exp. Fluid Sci. 2014, 53, 277–289.
46. García-Salazar, G.; de la Luz Zambrano-Zaragoza, M.; Quintanar-Guerrero, D. Preparation of
nanodispersions by solvent displacement using the Venturi tube. Int. J. Pharm. 2018, 545, 254–260.
47. Chen, J. Method for Accurately Measuring Gas Flow and Liquid Flow in a Gas and Liquid Mixed Fluid.
U.S. Patent No. US9829361B2. 28. Novermber. 2017.
48. Bengio, Y.; Cun, Y.L. Globally Trained Handwritten Word Recognizer using Spatial Representation,
Convolutional Neural Networks and Hidden Markov Models. Adv. Neural Inf.n Process. Syst.1994, 6, 937–
49. Van Hout, R.; Barnea, D.; Shemer, L. Translational velocities of elongated bubbles in continuous slug
flow. Int. J. Multiph. Flow 2008, 28, 1333–1350.
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC BY) license (http://creativecommons.org/licenses/by/4.0/).