A novel method to identify the flow pattern of oil–water two-phase flow

This paper presents a novel method combining extreme learning machine (ELM) and multiple empirical mode decomposition (MEMD) to identify flow patterns of oil–water two-phase flow. The proposed method can recognize accurately five typical flow patterns of horizontal oil–water two-phase flow. Taking the Lorenz system as an example, we verify the MEMD is more suitable for simultaneous decomposition of multi-channel signals than empirical mode decomposition and ensemble empirical mode decomposition. In the proposed method, we employ the MEMD to decompose the multivariate conductance signal of oil–water two-phase flow to obtain the same intrinsic mode function modes, select the normalized energy of the high-frequency components as the eigenvalue, and utilize the trained ELM to achieve a good recognition result. The experimental results show that the proposed method is not only fast and generalized, but also has high accuracy in identifying flow patterns of oil–water two-phase flow.


Introduction
Oil-water two-phase flow is a major two-phase flow (Gao et al. 2018), which is widely present in petroleum transportation pipelines. Its flow pattern is complex and changeable, and its dynamic evolution mechanism is extremely complicated. Therefore, it is very difficult to recognize the flow patterns of oil-water two-phase flow accurately. A large number of scientists have been concerned to identify the flow patterns of oil-water two-phase flow quickly and accurately.
Many scholars have been focusing on the identification of two-phase flow patterns. In the early stage, scholars mainly studied the flow patterns of oil-water two-phase flow by observation (Trallero et al. 1997;Nadler and Mewes 1997;Angeli and Hewitt 2000). The main methods included highspeed camera observation (Tan et al. 2018), micro-probe detection (Flores et al. 1997) and PIV technology (Wang et al. 2011). In recent years, many researchers have focused on the identification of flow patterns of two-phase flows by using indirect methods. These methods can not only extract dynamic characteristics of various flow patterns from experimental fluctuation signals, but also identify different flow patterns. The fluctuation signal is commonly used to identify various flow patterns that can reflect the pressure or conductance fluctuation of the mixed fluid. The time-frequency characteristics (Gao et al. 2016a, b) are used to describe the motion behavior of the flow pattern. In order to reflect the multi-scale dynamic characteristics of the flow pattern, Hilbert-Huang transform (Ding et al. 2007) and wavelet transform method (Gao et al. 2017) are performed to extract the characteristics of the flow pattern. Recently, complex network features (Gao et al. 2016a(Gao et al. , b, 2018 have been proven to provide effective solutions for flow pattern identification. Many researchers have applied artificial neural networks to the process of flow pattern recognition and have achieved great results. A method for identifying gas-solid two-phase flow patterns in horizontal pneumatic conveying pipelines based on electrostatic sensor array (ESA) and artificial neural network (ANN) was proposed by Fu and Li (2018). The experimental results show that their proposed method can identify fully suspended flow, stratified flow, dune flow, and slug flow effectively. Electrical capacitance tomography (ECT) and neural network are proposed to identify two-phase flow patterns (Roman et al. 2016). This method can achieve the accuracy of liquid-vapor flow pattern recognition up to 98.1%. Fuzzy logic with principal component analysis (PCA) and support vector machine (SVM) are applied to improve the classification accuracy of gas-liquid two-phase flow regimes (Shanthi and Pappa 2017). During the experiment, they proved SVM with features reduced using PCA gives the better classification accuracy and computationally less intensive. A method combining artificial neural networks with related dimensions to construct novel gas-liquid flow pattern diagrams to distinguish between the bubble, bubble/plug transitional, plug, slug, and annular flows (Huang et al. 2017). A method based on combination of multi-beam gamma ray attenuation and dual-modal density measurement technology used radial basis function (RBF) neural network for identifying the flow pattern and determining the void fraction in gas-liquid two-phase flows independent of the liquid phase changes of gas-liquid twophase flow (Roshani et al. 2017). Neural networks have also been successfully applied to electroencephalogram (EEG) signal analysis (Shrestha et al. 2019;Michielli et al. 2019;Tang et al. 2020), financial time series analysis (Araujo et al. 2019), and stock price prediction (Qiu et al. 2020).
So far in the field of multiphase flow, we have made some achievements in the identification of mixed fluid flow patterns. However, in terms of accuracy and speed of flow pattern recognition, we need to conduct more research deeply. Therefore, this paper proposes to perform MEMD on the four channel conductance signal and use the IMF normalized energy as the characteristic values and utilize the ELM for training to achieve accurate identification of oil-water two-phase flow patterns. In this paper, firstly, we verify the MEMD is more suitable for simultaneous decomposition of multi-channel signals than the EMD and the EEMD. Then, we perform the MEMD on multivariate conductance signal and divide the high-and low-frequency components of the IMF. Finally, we adopt high-frequency components eigenvalues for training with ELM. The experimentally results verify that the proposed method can identify the flow patterns of oil-water two-phase flow quickly and accurately.

Multivariate empirical mode decomposition (MEMD) theory
The MEMD decomposes the signal into several IMF, and each IMF component contains the local characteristic signal of the original signal at different scales. Each component of IMF represents each frequency component in the original signal, and is arranged according to the high-frequency components and low-frequency components. MEMD can decompose multiple signals and obtain the same mode of different channels. We can use the MEMD to process the multi-channel signal of oil-water two-phase flow. This method solves the mode calibration problem of multi-channel signals.
G i v e n a n n -d i m e n s i o n a l d a t a v e c t o r x k n is the set of direction vectors for k . We assume that K direction vectors are established on a sphere, k = 1, 2, 3, … K . The specific algorithm steps (Rehman and Mandic 2010) of the MEMD are as follows: (1) Choose a sample pointset for direction vectors on the n − 1 sphere. (2) Compute the projection of the original input signal (3) Find the extreme value corresponding to the instantaneous moment of the projection signal of direction vector, (5) The mean of the envelope curves of the K direction vectors can be obtained meets the criterion of multivariate-modal function (Rilling et al. 2003), then substitute a(t) − m(t) to step (2) as the original input signal. We obtain new multivariate IMF components from step (2) to step (6) and repeatedly perform MEMD decomposition. The original multivariate signal a(t) and the remainder r(t) . As shown in Eq. (2).
where q indicates the number of IMF.
, r i,n (t)} correspond to n sets of IMF and n residual components of the n dimension original signal, respectively.

Extreme learning machine (ELM) theory
ELM is a typical fast and efficient algorithm in the neural network family (Huang et al. 2004). This algorithm has the unique advantages of saving time and high accuracy. The calculation structure of the ELM is consisted of m arbitrary samples x j , t j . Its structure can be expressed as an equation as: T represents the weight vector connecting the input nodes to the ith hidden node. i is the weight vector connecting the output nodes to the ith hidden node. b i is the thresholds of the ith hidden node. During the training process, we can use an activation function with L hidden nodes. In this process, we employ the ELM to approximate the error between the output values of these m samples and the expected value to zero. We can get the following equation: where o j represents the actual value of the ELM output. We hope to get b i , W i and i so that Equation (5) can be abbreviated as where is the output weight, T is the expected value of the output, and H is the output value of the hidden layer nodes.

The detailed equation is as
During the ELM training process, we hope to get W i , b i and i so that Equation (8) is equivalent to minimizing the loss function: For the training of a single hidden layer ELM neural network, it can be transformed into a linear system problem. Therefore, the value of the output weight can be determined where H + is the generalized inverse of the matrix, and the resulting norm solution is unique and minimal. During the ELM algorithm learning process, once the bias and input weight of the hidden layer are determined, the output matrix that uniquely determines the hidden layer can be obtained. The main feature of the ELM is that the number of hidden layer nodes can be selected randomly or artificially. From this perspective, the learning process of the ELM only needs to calculate the value of the output weight. Therefore, the biggest advantages of the ELM are fast learning speed and good generalization performance.

IMF normalized energy
The time scale of the energy distribution is an important parameter in the signal analysis process. When water and oil phases with different flow rates are passed through the 4-electrode distributed conductivity sensor pipeline, the frequency component signals will also change accordingly. This means that the energy of each frequency component signal contains a large amount of information of different flow patterns. Theoretically, we obtain each group of signals of the MEMD decomposition which is arranged according to the high-frequency components and low-frequency components. Therefore, the IMF energy can be used as the characteristic vector for the conductance fluctuation signals under different flow patterns.
We can obtain a set of IMF normalized energy as eigenvalues to represent different flow patterns. The calculation method is as follows where IE IMF i (j) represents the energy of the ith IMF component of the jth conductance signal. IE x(j) indicates the energy of the jth conductance signal, x(j) is the jth conductance signal, IER(i) represents the ith normalized energy, and N, N s are the length of the conductance signal and the length of the IMF data, respectively.
In general, the length of the IMF data and the length of the conductance signal are both equal to N. Therefore, Eq. (11) can be expressed as It is obvious that the normalized energy can extract the value between the specific root value IMF component and the signal from the root mean square. Therefore, the IMF component is highly correlated with various flow pattern (11)

MEMD applied to Lorenz systems
In order to verify the MEMD is more suitable for simultaneous decomposition of multi-channel signals than EMD (Huang and Wu 2008) and EEMD (Wu and Huang 2009), we perform the EMD, EEMD, and MEMD on the Lorenz system. The expression of Lorzen system is as follows where a = 10, b = 28, c = 8 3 , and initial value is (1, 1, 1). The decomposition result of the EMD is depicted in Fig. 1a-c that X and Y can get equal number of the IMFs, while Z has 8 IMFs. From Fig. 2a-c, it can be seen that the EEMD can obtain the same number of IMF components, but there may be a problem of inconsistent frequency bands (13) of IMF component signals of the same scale. Therefore, the EEMD cannot be used for multi-channel simultaneous decomposition. As shown in Fig. 3a-c, the MEMD can be used to analyze multi-channel signals simultaneously, and it can generate the same number of IMF components. We can draw a conclusion that the EMD and the EEMD are only suitable for processing single-channel data, cannot be used to analyze data generated by multi-channel signals at the same time, the MEMD can be used to analyze multichannel signals.  Figure 4 shows the conductance signals of four electrodes of five flow patterns measured experimentally.

Experiments and results analysis
We employ the DO/W flow pattern as an example to perform the MEMD decomposition, and the results are shown in Fig. 5. It can be seen from that the conductance signals of four channels are decomposed into seven IMF components and a residual component r . We obtain the IMF components by the MEMD and divide them into high-frequency components, low-frequency components, and trend components. The high-frequency components are IMF1-IMF3, and IMF4-IMF7 are low-frequency components, and r is classified as a trend component.
We decompose the conductance signals of five flow patterns through the MEMD to obtain the IMF components, and then calculate the high-frequency component energy and low-frequency component energy, we select high-frequency normalized IMF and low-frequency normalized IMF of different channels as the eigenvalues. Experimental results are shown in Fig. 6.  Fig. 6, we can see that the conductance signals of the five typical flow patterns obtained from the A channel make it easier to distinguish the various flow patterns. The sensitivity order of the ELM for using the energy normalized by four electrodes as the feature vector is A, D, B, and C. The reason for this phenomenon is that the A channel contains the most amount of information to reflect the characteristics of various flow patterns, so it is the most sensitive to the identification of flow patterns. We can conclude that selecting high-frequency normalized energy is far better than the low-frequency normalized energy as the eigenvalue. The low-frequency components contain characteristic information of the flow patterns less than the high-frequency component by the analysis, the high-frequency components can better reflect the characteristics of the flow patterns. Figure 7 shows that choosing different activation functions has a great impact on the recognition rate of the test results. It can be seen from Fig. 7 that the choice of sigmoid (sig) is better than the sine (sin) and Hardlim as activation functions for the recognition of the five flow patterns.
We select the normalized energy of IMF1-IMF3 after the MEMD decomposition of A channel as the feature vector, select sig as the activation function. Then, we train and recognize five typical flow patterns. Each flow pattern has 100,000 data, MEMD decomposition is performed every two thousand, and the first 80% of the normalized energy is used as the training set and the last 20% is used as the test set. The experimental results are shown in Table 1.
As can be seen from Table 1 that the ELM is used to identify five typical flow patterns, and the overall recognition rate of the convection pattern reaches 94%. Especially flow patterns recognition accuracy of ST, DW/O&DO/W and DO/W three types reaches 100%. Therefore, performing ELM to identify the flow pattern of horizontal oil-water two-phase flow is not only fast, but also has high generalization performance, and the accuracy of flow pattern recognition is high.

Conclusions
Considering the complexity and changeable of oil-water two-phase flow, the accuracy and speed of flow pattern recognition, we propose a method combining the ELM and the MEMD to identify flow patterns of oil-water two-phase flow. According to the analysis, when select the normalized high-frequency component of A channel as the eigenvalues can reach great accuracy. The experimental results indicate that the method increase the speed and improve accuracy of flow pattern recognition of horizontal oil-water two-phase flow. This paper provides a quick strategy and a new vision on the flow patterns characteristics analysis of oil-water two-phase flow.
Funding This project is supported by the Natural Science Foundation of Shandong (ZR2019MEE071) and the Taishan Scholar Project Fund of Shandong Province.

Data availability This article is licensed under a Creative Commons
Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creat iveco mmons .org/licen ses/by/4.0/.

Compliance with ethical standards
Conflict of interest No potential conflict of interest was reported by the authors.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.