## 4 Results and Discussion
### Machine Learning Identification
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Particle Diameter**} & \multirow{2}{*}{**Quartile**} & \multicolumn{4}{c}{**Bubbly Flow**} & \multicolumn{4}{c}{**Slug Flow**} & \multicolumn{4}{c}{**Annular Flow**} \\ \cline{3-11}  & & **Level 7** & **Level 7** & **Level 7** \\ \hline \multirow{3}{*}{1.5 mm} & min & & 2.80\% & 0.52\% \\  & median & & 7.88\% & 3.38\% \\  & max & & 15.33\% & 13.96\% \\ \hline \multirow{3}{*}{3 mm} & min & 3.71\% & 1.40\% & 1.19\% \\  & median & 10.94\% & 12.61\% & 2.13\% \\  & max & 24.44\% & 46.50\% & 9.21\% \\ \hline \multirow{3}{*}{6 mm} & min & 1.65\% & 3.51\% & & \\  & median & 5.02\% & 14.75\% & & \\  & max & 12.52\% & 43.14\% & & \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Distributions of EMD energy spectrum on level 7.  
multiple SVM/neural network identification models with different features and compares the identification ability of these models to evaluate the performance of the two technologies in porous media flow pattern identification. Samples should be prepared before training. A total of 341 sets of typical flow pattern data are obtained in this experiment, including bubbly flow, slug flow, and annular flow. One part of the data is used as the training set to train the model, and the other part of the data is used as the test set to test the identification ability of the model. The details are shown in Table 6.  
The vector including time domain features and EMD energy spectrum is constructed. Considering the important influence of particle diameter on the characteristics, the particle diameter is also included in the vector. The dimension \(n\) of the vector should not be too large, which is limited by the number of training sets. In this paper, \(n<8\) (\(2^{n}<188\)). Therefore, the final vector is composed of three time domain characteristic parameters, three levels of EMD energy ratio, and one particle diameter. From large to small, two kinds of vectors are constructed, which will lead to two different SVM models. One vector includes four, five, and six levels and the other one includes one, two, and seven levels. Examples of vectors are shown in Table 7.  
The SVM models are trained with the prepared vectors. In this paper, the k-CV method [30] combined with the grid search method is used to obtain two key parameters (the penalty factor \(C\) and the kernel function parameter \(g\)), which are important to ensure the accuracy of SVM models. Table 8 shows the identification results of the two SVM models. In general, the identification ability of the SVM-1 model is better than that of the SVM-2 model. The identification ability of slug flow and annular flow of SVM-1 model is better than that of the SVM-2 model. However, its bubbly flow identification ability is worse than that of the SVM-2 model, but this gap is not very obvious. In addition to the SVM model, the neural network flow pattern identification model is also trained based on BP neural network technology. In this paper, BP neural network includes one input layer (7 neurons, corresponding to seven features of a vector), one intermediate layer (12 neurons), and one output layer (3 neurons, corresponding to labels of three flow patterns). The same training set and test set as SVM models are selected, which can help evaluate the identification ability of the two methods. The training results are shown in Table 9. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{3}{c}{**Flow Pattern Data Sets**} \\ \hline  & **Train** & **Test** & **Total** \\ \hline Bubbly & 77 & 63 & 140 \\ Slug & 80 & 65 & 145 \\ Annular & 31 & 25 & 56 \\ total & 188 & 153 & 341 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: The number of samples of different flow patterns.