# Introducing the Effective Features Using the Particle Swarm Optimization Algorithm to Increase Accuracy in Determining the Volume Percentages of Three-Phase Flows

^{1}

^{2}

^{3}

^{4}

^{5}

^{6}

^{7}

^{*}

## Abstract

**:**

## 1. Introduction

- Extraction of frequency and wavelet properties for three-phase fluid volume percentages;
- Introducing effective features by means of the feature selection system based on the PSO algorithm;
- A notable improvement in accuracy in calculating volume percentages;
- Choosing the beneficial properties to use as the neural network’s inputs will reduce the number of computations that must be performed on the system.

## 2. Materials and Methods

#### 2.1. Radiation-Based System

#### 2.2. Feature Extraction

#### 2.2.1. Frequency Domain

#### 2.2.2. Wavelet

#### 2.3. Feature Selection

_{1}and c

_{2}(the cognitive and social parameters, respectively), and r

_{1}and r

_{2}are evenly distributed and lie between [0, 1]. Defining the cost function is one of the first steps in developing optimization systems. In this research, the mean square error (MSE) of a neural network consisting of one hidden layer and 10 neurons is used as the cost function of the PSO system. The first step involves feeding the network a non-sequential subset of the data’s characteristics. Then, the conventional optimization approach is used to progressively improve the inputs toward ideal values in an effort to minimize the cost function. The PSO system initially tries to foretell the target using a characteristic using an iterative process, then increases the number of inputs as needed and eventually implements the system for all modes with varying inputs.

#### 2.4. MLP Neural Network

## 3. Results

## 4. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Salgado, C.M.; Pereira, C.M.; Schirru, R.; Brandão, L.E. Flow regime identification and volume fraction prediction in multiphase flows by means of gamma-ray attenuation and artificial neural networks. Prog. Nucl. Energy
**2010**, 52, 555–562. [Google Scholar] [CrossRef] - Peyvandi, R.G.; Rad, S.Z.I. Application of artificial neural networks for the prediction of volume fraction using spectra of gamma rays backscattered by three-phase flows. Eur. Phys. J. Plus
**2017**, 132, 511. [Google Scholar] [CrossRef] - Sattari, M.A.; Roshani, G.H.; Hanus, R.; Nazemi, E. Applicability of time-domain feature extraction methods and artificial intelligence in two-phase flow meters based on gamma-ray absorption technique. Measurement
**2021**, 168, 108474. [Google Scholar] [CrossRef] - Sattari, M.A.; Roshani, G.H.; Hanus, R. Improving the structure of two-phase flow meter using feature extraction and GMDH neural network. Radiat. Phys. Chem.
**2020**, 171, 108725. [Google Scholar] [CrossRef] - Roshani, G.; Nazemi, E.; Roshani, M. Intelligent recognition of gas-oil-water three-phase flow regime and determination of volume fraction using radial basis function. Flow Meas. Instrum.
**2017**, 54, 39–45. [Google Scholar] [CrossRef] - Hanus, R.; Zych, M.; Petryka, L.; Jaszczur, M.; Hanus, P. Signals features extraction in liquid-gas flow measurements using gamma densitometry. Part 1: Time domain. EPJ Web Conf.
**2016**, 114, 02035. [Google Scholar] [CrossRef][Green Version] - Hanus, R.; Zych, M.; Petryka, L.; Jaszczur, M.; Hanus, P. Signals features extraction in liquid-gas flow measurements using gamma densitometry. Part 2: Frequency domain. EPJ Web Conf.
**2016**, 114, 02036. [Google Scholar] [CrossRef][Green Version] - Hanus, R.; Zych, M.; Kusy, M.; Jaszczur, M.; Petryka, L. Identification of liquid-gas flow regime in a pipeline using gamma-ray absorption technique and computational intelligence methods. Flow Meas. Instrum.
**2018**, 60, 17–23. [Google Scholar] [CrossRef] - Hosseini, S.; Roshani, G.; Setayeshi, S. Precise gamma based two-phase flow meter using frequency feature extraction and only one detector. Flow Meas. Instrum.
**2020**, 72, 101693. [Google Scholar] [CrossRef] - Roshani, M.; Sattari, M.A.; Ali, P.J.M.; Roshani, G.H.; Nazemi, B.; Corniani, E.; Nazemi, E. Application of GMDH neural network technique to improve measuring precision of a simplified photon attenuation based two-phase flowmeter. Flow Meas. Instrum.
**2020**, 75, 101804. [Google Scholar] [CrossRef] - Roshani, G.H.; Nazemi, E.; Feghhi, S.A.; Setayeshi, S. Flow regime identification and void fraction prediction in two-phase flows based on gamma ray attenuation. Measurment
**2015**, 62, 25–32. [Google Scholar] [CrossRef] - Nazemi, E.; Roshani, G.H.; Feghhi, S.A.H.; Setayeshi, S.; Zadeh, E.E.; Fatehi, A. Optimization of a method for identifying the flow regime and measuring void fraction in a broad beam gamma-ray attenuation technique. Int. J. Hydrog. Energy
**2016**, 41, 7438–7444. [Google Scholar] [CrossRef] - Roshani, G.H.; Nazemi, E.; Roshani, M.M. Flow regime independent volume fraction estimation in three-phase flows using dual-energy broad beam technique and artificial neural network. Neural Comput. Appl.
**2016**, 28, 1265–1274. [Google Scholar] [CrossRef] - Nazemi, E.; Feghhi, S.A.H.; Roshani, G.H.; Peyvandi, R.G.; Setayeshi, S. Precise Void Fraction Measurement in Two-phase Flows Independent of the Flow Regime Using Gamma-ray Attenuation. Nucl. Eng. Technol.
**2016**, 48, 64–71. [Google Scholar] [CrossRef][Green Version] - Song, K.; Liu, Y. A compact X-ray system for two-phase flow measurement. Meas. Sci. Technol.
**2017**, 29, 025305. [Google Scholar] [CrossRef] - Roshani, M.; Ali, P.J.M.; Roshani, G.H.; Nazemi, B.; Corniani, E.; Phan, N.H.; Tran, H.N.; Nazemi, E. X-ray tube with artificial neural network model as a promising alternative for radioisotope source in radiation based two phase flowmeters. Appl. Radiat. Isot.
**2020**, 164, 109255. [Google Scholar] [CrossRef] - Roshani, M.; Phan, G.; Roshani, G.H.; Hanus, R.; Nazemi, B.; Corniani, E.; Nazemi, E. Combination of X-ray tube and GMDH neural network as a nondestructive and potential technique for measuring characteristics of gas-oil–water three phase flows. Measurement
**2021**, 168, 108427. [Google Scholar] [CrossRef] - Roshani, G.H.; Ali, P.J.M.; Mohammed, S.; Hanus, R.; Abdulkareem, L.; Alanezi, A.A.; Nazemi, E.; Eftekhari-Zadeh, E.; Kalmoun, E.M. Feasibility Study of Using X-ray Tube and GMDH for Measuring Volume Fractions of Annular and Stratified Regimes in Three-Phase Flows. Symmetry
**2021**, 13, 613. [Google Scholar] [CrossRef] - Hernandez, A.M.; Boone, J.M. Tungsten anode spectral model using interpolating cubic splines: Unfiltered x-ray spectra from 20 kV to 640 kV. Med. Phys.
**2014**, 41, 042101. [Google Scholar] [CrossRef][Green Version] - Nussbaumer, H.J. The fast Fourier transforms. In Fast Fourier Transform and Convolution Algorithms; Springer: Berlin/Heidelberg, Germany, 1981; pp. 80–111. [Google Scholar]
- Daubechies, I. The wavelet transform, time-frequency localization and signal analysis. IEEE Trans. Inf. Theory
**1990**, 36, 961–1005. [Google Scholar] [CrossRef] - Soltani, S. On the use of the wavelet decomposition for time series prediction. Neurocomputing
**2002**, 48, 267–277. [Google Scholar] [CrossRef] - Taylan, O.; Sattari, M.A.; Essoussi, I.E.; Nazemi, E. Frequency Domain Feature Extraction Investigation to Increase the Accuracy of an Intelligent Nondestructive System for Volume Fraction and Regime Determination of Gas-Water-Oil Three-Phase Flows. Mathematics
**2021**, 9, 2091. [Google Scholar] [CrossRef] - Balubaid, M.; Sattari, M.A.; Taylan, O.; Bakhsh, A.A.; Nazemi, E. Applications of Discrete Wavelet Transform for Feature Extraction to Increase the Accuracy of Monitoring Systems of Liquid Petroleum Products. Mathematics
**2021**, 9, 3215. [Google Scholar] [CrossRef] - Iliyasu, A.M.; Mayet, A.M.; Hanus, R.; El-Latif, A.A.A.; Salama, A.S. Employing GMDH-Type Neural Network and Signal Frequency Feature Extraction Approaches for Detection of Scale Thickness inside Oil Pipelines. Energies
**2022**, 15, 4500. [Google Scholar] [CrossRef] - Mayet, A.M.; Alizadeh, S.M.; Hamakarim, K.M.; Al-Qahtani, A.A.; Alanazi, A.K.; Guerrero, J.W.G.; Alhashim, H.H.; Eftekhari-Zadeh, E. Application of Wavelet Characteristics and GMDH Neural Networks for Precise Estimation of Oil Product Types and Volume Fractions. Symmetry
**2022**, 14, 1797. [Google Scholar] [CrossRef] - Kennedy, J.; Eberhart, R. Particle Swarm Optimization. In Proceedings of the ICNN’95—International Conference on Neural Networks, Perth, Australia, 27 November–1 December 1995; Volume 4, pp. 1942–1948. [Google Scholar] [CrossRef]
- Shi, Y.; Eberhart, R. A modified particle swarm optimizer. In Proceedings of the 1998 IEEE International Conference on Evolutionary Computation Proceedings. IEEE World Congress on Computational Intelligence (Cat. No. 98TH8360), Anchorage, AK, USA, 4–9 May 1998; pp. 69–73. [Google Scholar] [CrossRef]
- Sattari, M.A.; Korani, N.; Hanus, R.; Roshani, G.H.; Nazemi, E. Improving the performance of gamma radiation based two phase flow meters using optimal time characteristics of the detector output signal extraction. J. Nucl. Sci. Technol. (JonSat)
**2020**, 41, 42–54. [Google Scholar] - Khaibullina, K. Technology to remove asphaltene, resin and paraffin deposits in wells using organic solvents. In Proceedings of the SPE Annual Technical Conference and Exhibition 2016, Dubai, United Arab Emirates, 26–28 September 2016. [Google Scholar]
- Tikhomirova, E.A.; Sagirova, L.R.; Khaibullina, K.S. A review on methods of oil saturation modelling using IRAP RMS. IOP Conf. Series Earth Environ. Sci.
**2019**, 378, 012075. [Google Scholar] [CrossRef] - Khaibullina, K.S.; Korobov, G.Y.; Lekomtsev, A.V. Development of an asphalt-resin-paraffin deposits inhibitor and substantiation of the technological parameters of its injection into the bottom-hole formation zone. Period. Tche Quim.
**2020**, 17, 769–781. [Google Scholar] [CrossRef] - Khaibullina, K.S.; Sagirova, L.R.; Sandyga, M.S. Substantiation and selection of an inhibitor for preventing the formation of asphalt-resin-paraffin deposits. Period. Tche Quim.
**2020**, 17, 541–551. [Google Scholar] [CrossRef] - Mayet, A.M.; Alizadeh, S.M.; Kakarash, Z.A.; Al-Qahtani, A.A.; Alanazi, A.K.; Alhashimi, H.H.; Eftekhari-Zadeh, E.; Nazemi, E. Introducing a Precise System for Determining Volume Percentages Independent of Scale Thickness and Type of Flow Regime. Mathematics
**2022**, 10, 1770. [Google Scholar] [CrossRef] - Mayet, A.M.; Alizadeh, S.M.; Nurgalieva, K.S.; Hanus, R.; Nazemi, E.; Narozhnyy, I.M. Extraction of Time-Domain Characteristics and Selection of Effective Features Using Correlation Analysis to Increase the Accuracy of Petroleum Fluid Monitoring Systems. Energies
**2022**, 15, 1986. [Google Scholar] [CrossRef] - Lalbakhsh, A.; Mohamadpour, G.; Roshani, S.; Ami, M.; Roshani, S.; Sayem, A.S.M.; Alibakhshikenari, M.; Koziel, S. Design of a Compact Planar Transmission Line for Miniaturized Rat-Race Coupler with Harmonics Suppression. IEEE Access
**2021**, 9, 129207–129217. [Google Scholar] [CrossRef] - Hookari, M.; Roshani, S.; Roshani, S. High-efficiency balanced power amplifier using miniaturized harmonics suppressed coupler. Int. J. RF Microw. Comput. Aided Eng.
**2020**, 30, e22252. [Google Scholar] [CrossRef] - Lotfi, S.; Roshani, S.; Roshani, S.; Gilan, M.S. Wilkinson power divider with band-pass filtering response and harmonics suppression using open and short stubs. Frequenz
**2020**, 74, 169–176. [Google Scholar] [CrossRef] - Jamshidi, M.; Siahkamari, H.; Roshani, S.; Roshani, S. A compact Gysel power divider design using U-shaped and T-shaped resonators with harmonics suppression. Electromagnetics
**2019**, 39, 491–504. [Google Scholar] [CrossRef] - Roshani, S.; Jamshidi, M.B.; Mohebi, F.; Roshani, S. Design and modeling of a compact power divider with squared resonators using artificial intelligence. Wirel. Pers. Commun.
**2021**, 117, 2085–2096. [Google Scholar] [CrossRef] - Roshani, S.; Azizian, J.; Roshani, S.; Jamshidi, M.; Parandin, F. Design of a miniaturized branch line microstrip coupler with a simple structure using artificial neural network. Frequenz
**2022**, 76, 255–263. [Google Scholar] [CrossRef] - Khaleghi, M.; Salimi, J.; Farhangi, V.; Moradi, M.J.; Karakouzian, M. Application of Artificial Neural Network to Predict Load Bearing Capacity and Stiffness of Perforated Masonry Walls. Civileng
**2021**, 2, 48–67. [Google Scholar] [CrossRef] - Zych, M.; Petryka, L.; Kępński, J.; Hanus, R.; Bujak, T.; Puskarczyk, E. Radioisotope investigations of compound two-phase flows in an ope channel. Flow Meas. Instrum.
**2014**, 35, 11–15. [Google Scholar] [CrossRef] - Zych, M.; Hanus, R.; Wilk, B.; Petryka, L.; Świsulski, D. Comparison of noise reduction methods in radiometric correlation measurements of two-phase liquid-gas flows. Measurement
**2018**, 129, 288–295. [Google Scholar] [CrossRef] - Golijanek-Jędrzejczyk, A.; Mrowiec, A.; Hanus, R.; Zych, M.; Heronimczak, M.; Świsulski, D. Uncertainty of mass flow measurement using centric and eccentric orifice for Reynolds number in the range 10,000 ≤ Re ≤ 20,000. Measurement
**2020**, 160, 107851. [Google Scholar] [CrossRef] - Mayet, A.; Hussain, M. Amorphous WNx Metal For Accelerometers and Gyroscope. In Proceedings of the MRS Fall Meeting, Boston, MA, USA, 30 November–5 December 2014. [Google Scholar]
- Mayet, A.M.; Hussain, A.M.; Hussain, M.M. Three-terminal nanoelectromechanical switch based on tungsten nitride—An amorphous metallic material. Nanotechnology
**2015**, 27, 035202. [Google Scholar] [CrossRef] [PubMed] - Shukla, N.K.; Mayet, A.M.; Vats, A.; Aggarwal, M.; Raja, R.K.; Verma, R.; Muqeet, M.A. High speed integrated RF–VLC data communication system: Performance constraints and capacity considerations. Phys. Commun.
**2021**, 50, 101492. [Google Scholar] [CrossRef] - Dabiri, H.; Farhangi, V.; Moradi, M.J.; Zadehmohamad, M.; Karakouzian, M. Applications of Decision Tree and Random Forest as Tree-Based Machine Learning Techniques for Analyzing the Ultimate Strain of Spliced and Non-Spliced Reinforcement Bars. Appl. Sci.
**2022**, 12, 4851. [Google Scholar] [CrossRef] - Mayet, A.; Smith, C.E.; Hussain, M.M. Energy reversible switching from amorphous metal based nanoelectromechanical switch. In Proceedings of the 13th IEEE International Conference on Nanotechnology (IEEE-NANO 2013), Beijing, China, 5–8 August 2013; pp. 366–369. [Google Scholar]
- Alamoudi, M.; Sattari, M.; Balubaid, M.; Eftekhari-Zadeh, E.; Nazemi, E.; Taylan, O.; Kalmoun, E. Application of Gamma Attenuation Technique and Artificial Intelligence to Detect Scale Thickness in Pipelines in Which Two-Phase Flows with Different Flow Regimes and Void Fractions Exist. Symmetry
**2021**, 13, 1198. [Google Scholar] [CrossRef] - Karami, A.; Roshani, G.H.; Khazaei, A.; Nazemi, E.; Fallahi, M. Investigation of different sources in order to optimize the nuclear metering system of gas–oil–water annular flows. Neural Comput. Appl.
**2020**, 32, 3619–3631. [Google Scholar] [CrossRef] - Roshani, G.H.; Ali, P.J.M.; Mohammed, S.; Hanus, R.; Abdulkareem, L.; Alanezi, A.A.; Sattari, M.A.; Amiri, S.; Nazemi, E.; Eftekhari-Zadeh, E.; et al. Simulation Study of Utilizing X-ray Tube in Monitoring Systems of Liquid Petroleum Products. Processes
**2021**, 9, 828. [Google Scholar] [CrossRef] - Taylor, J.G. Neural Networks and Their Applications; John Wiley & Sons Ltd.: Brighton, UK, 1996. [Google Scholar]
- Gallant, A.R.; White, H. On learning the derivatives of an unknown mapping with multilayer feedforward networks. Neural Netw.
**1992**, 5, 129–138. [Google Scholar] [CrossRef][Green Version] - Abunadi, I.; Albraikan, A.A.; Alzahrani, J.S.; Eltahir, M.M.; Hilal, A.M.; Eldesouki, M.I.; Motwakel, A.; Yaseen, I. An Automated Glowworm Swarm Optimization with an Inception-Based Deep Convolutional Neural Network for COVID-19 Diagnosis and Classification. Healthcare
**2022**, 10, 697. [Google Scholar] [CrossRef] - Ahmad, M.; Khaja, I.A.; Baz, A.; Alhakami, H.; Alhakami, W. Particle Swarm Optimization Based Highly Nonlinear Substitution-Boxes Generation for Security Applications. IEEE Access
**2020**, 8, 116132–116147. [Google Scholar] [CrossRef] - Alshareef, M.; Lin, Z.; Ma, M.; Cao, W. Accelerated Particle Swarm Optimization for Photovoltaic Maximum Power Point Tracking under Partial Shading Conditions. Energies
**2019**, 12, 623. [Google Scholar] [CrossRef][Green Version] - Alshareef, M. A New Particle Swarm Optimization with Bat Algorithm Parameter-Based MPPT for Photovoltaic Systems under Partial Shading Conditions. Stud. Inform. Control.
**2022**, 31, 53–66. [Google Scholar] [CrossRef] - Khalaj, O.; Jamshidi, M.B.; Saebnoori, E.; Masek, B.; Stadler, C.; Svoboda, J. Hybrid Machine Learning Techniques and Computational Mechanics: Estimating the Dynamic Behavior of Oxide Precipitation Hardened Steel. IEEE Access
**2021**, 9, 156930–156946. [Google Scholar] [CrossRef] - Jamshidi, M.B.; Roshani, S.; Talla, J.; Roshani, S. Using an ANN approach to estimate output power and PAE of a modified class-F power amplifier. In Proceedings of the 2020 International Conference on Applied Electronics (AE), Pilsen, Czech Republic, 8–9 September 2020; pp. 1–6. [Google Scholar]
- Jamshidi, M.; Siahkamari, H.; Jamshidi, M. Using artificial neural networks and system identification methods for electricity price modeling. In Proceedings of the 2017 3rd Iranian Conference on Intelligent Systems and Signal Processing (ICSPIS), Shahrood, Iran, 20–21 December 2017; pp. 43–47. [Google Scholar]

**Figure 4.**The signals recorded by the (

**a**) first and (

**b**) second detectors correspond to simulated flow regimes in different volume percentages.

**Figure 5.**Transmitted signals to the frequency domain of (

**a**) the first detector and (

**b**) the second detector.

**Figure 7.**The value of the cost function is calculated by the PSO algorithm in terms of the number of features.

**Figure 8.**The implemented neural network structure to determine the volumetric percentages of gas and water.

**Figure 9.**Regression diagram related to the prediction of water volume percentage for (

**a**) training, (

**b**) validation, and (

**c**) test data.

**Figure 10.**Regression diagram related to the prediction of gas volume percentage for (

**a**) training, (

**b**) validation, and (

**c**) test data.

Ref | Extracted Features | Feature Selection Method | Type of Neural Network | Maximum MSE | Maximum RMSE |
---|---|---|---|---|---|

[2] | No feature extraction | Lack of feature selection | MLP | 2.56 | 1.6 |

[3] | Time features | Lack of feature selection | GMDH | 1.24 | 1.11 |

[4] | Time features | Lack of feature selection | MLP | 0.21 | 0.46 |

[9] | Frequency features | Lack of feature selection | MLP | 0.67 | 0.82 |

[10] | Lack of feature extraction | Lack of feature selection | GMDH | 7.34 | 2.71 |

[11] | Full energy peak (transmission count), photon counts of Compton edge in the transmission detector, and total count in the scattering detector | Lack of feature selection | MLP | 1.08 | 1.04 |

[Current study] | Frequency and wavelet features | PSO-based feature selection | MLP | 0.13 | 0.36 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 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 (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Chen, T.-C.; Alizadeh, S.M.; Albahar, M.A.; Thanoon, M.; Alammari, A.; Guerrero, J.W.G.; Nazemi, E.; Eftekhari-Zadeh, E.
Introducing the Effective Features Using the Particle Swarm Optimization Algorithm to Increase Accuracy in Determining the Volume Percentages of Three-Phase Flows. *Processes* **2023**, *11*, 236.
https://doi.org/10.3390/pr11010236

**AMA Style**

Chen T-C, Alizadeh SM, Albahar MA, Thanoon M, Alammari A, Guerrero JWG, Nazemi E, Eftekhari-Zadeh E.
Introducing the Effective Features Using the Particle Swarm Optimization Algorithm to Increase Accuracy in Determining the Volume Percentages of Three-Phase Flows. *Processes*. 2023; 11(1):236.
https://doi.org/10.3390/pr11010236

**Chicago/Turabian Style**

Chen, Tzu-Chia, Seyed Mehdi Alizadeh, Marwan Ali Albahar, Mohammed Thanoon, Abdullah Alammari, John William Grimaldo Guerrero, Ehsan Nazemi, and Ehsan Eftekhari-Zadeh.
2023. "Introducing the Effective Features Using the Particle Swarm Optimization Algorithm to Increase Accuracy in Determining the Volume Percentages of Three-Phase Flows" *Processes* 11, no. 1: 236.
https://doi.org/10.3390/pr11010236