*3.2. Fuzzy Logic System*

Different cases were investigated to optimize the model parameters and achieve the best possible model, and the results are represented in Table 4 and Figure 5. Correlation coefficients (R) and absolute error (AAPE) for testing data were used to select the optimum model. Increasing the cluster radius led to better results, i.e., increase the R-values and decrease AAPE for the testing data. Increasing the number of iterations led to worse results that could be due to memorization, i.e., decreasing the R-values for testing data; 50 was selected as the optimum value for the iteration number. Case 7 has the lowest AAPE of 9.54%, and can be considered as the best possible model.


**Table 4.** Results of using the fuzzy logic system for testing results.

**Figure 5.** Cross plot of actual against predicted CO2-MMP using the adaptive neuro-fuzzy inference system (ANFIS) model, for A) Training data set, B) Testing data.

### *3.3. Generalized Neural Network*

A generalized neural network (GRNN) was used to determine the CO2-MMP based on the reservoir temperature and the hydrocarbon composition. This network showed a good performance for predicting the minimum miscibility pressure. Table 5 and Figure 6 summarize the results obtained using the GRNN method. Several cases were investigated to optimize the model parameters. It was found that increasing the spread from 1 to 50 led to improving the R-value from 0.96 to 0.98. Different training functions were also tested, with "newgrnn" showing the highest performance among the others. The best GRNN model (Case 2) showed an error of 7.02% and R-value of 0.98.

**Table 5.** Generalized regression neural network (GRNN) results for the testing data.


**Figure 6.** Cross plot of actual against predicted CO2-MMP using the GRNN model for (**A**) the training data set and (**B**) testing data.

#### *3.4. Radial Basis Function*

Different model parameters (goal, spread, the maximum number of neurons and number of neurons) were studied to achieve the optimum values. Generally, increasing the goal values mean increasing the model tolerance, leading to increases in the AAPE and a decreased R-value; the same trend was observed for the spread. Table 6 summarizes the obtained results for 5 cases. For this data set, the goal showed a minor effect in obtaining a better solution, and the value of 0.5 is selected for the goal. Reducing the spread has a positive effect in improving the solution, spread of 10 is selected. Increasing the MN (maximum number of neurons) led to memorization and then reduced the R-value, and 20 MN is selected as an optimum value. The number of neurons to add between displays (DF) has a small effect in improving the model accuracy; a DF of 1 is selected. Based on the previous analysis, the optimum case could be obtained by using the goal of 0.5, the spread of 10, MN of 10 and DF of 1, the obtained R is 0.98 and the AAPE is 6.56% (Case 4); the obtained results are shown in Figure 7.

**Figure 7.** Cross plot of actual against predicted CO2-MMP using the radial basis function (RBF) model for (**A**) the training data set and (**B**) testing data.


**Table 6.** Radial basis function network (RBF) results for unseen data.

#### *3.5. Validation of the Developed Model*

The radial basis network was utilized to extract an empirical correlation, the weights of the hidden layer (w1) and the output layer (w2) were used to derive the empirical equation, and the values are listed in Table 7. The proposed model to predict the CO2-MMP is given by the following equations:

$$\text{MMP} = \left[ \sum\_{i=1}^{N} w\_{2i} tansi \mathbf{g} \left( \sum\_{j=1}^{J} w\_{1i,j} \mathbf{x}\_j + b\_{1i} \right) \right] + \ b\_{2i} \tag{1}$$

$$\text{MMP} = \left[ \sum\_{i=1}^{N} w\_{2i} \left( \frac{2}{1 + e^{-2(w\_{1i,1}(\mathbf{x}1)\_j + w\_{1i,2}(\mathbf{x}2)\_j + w\_{1i,3}(\mathbf{x}3)\_j + b\_{1i})}} \right) + b\_2 \right. \tag{2}$$

**Table 7.** The developed RBF-based weights and biases for CO2-MMP determinations for Equation (2).


Equation (2) is an empirical equation extracted from the optimized radial basis model; this equation can be used to estimate the MMP during CO2 flooding. Similar equations were developed before based on the weights and biases for determining several parameters as reported by Elkatatny et al., Moussa et al., Mahmoud et al. and Rammay and Abdulraheem [23–25,38]. In Equations (1) and (2), N is the total neurons number, j is the input index, x1, x2, x3 are the reservoir temperature, the mole fraction of C2 to C6, and the molecular weight of heptane plus a fraction, respectively. The weights (w) and biases (b) are listed in Table 7. The developed model normalizes the input data automatically into a range between −1 and 1 based on the two-points method. Equations (3) and (4) are used to calculate the normalized values:

$$\frac{Y - Y\_{\text{min}}}{Y\_{\text{max}} - Y\_{\text{min}}} = \frac{X - X\_{\text{min}}}{X\_{\text{max}} - X\_{\text{min}}},\tag{3}$$

$$Y = Y\_{\rm min} + (Y\_{\rm max} - Y\_{\rm min}) \left( \frac{X - X\_{\rm min}}{X\_{\rm max} - X\_{\rm min}} \right) \tag{4}$$

Furthermore, a comparison study was performed between the different MMP determination approaches. CO2-MMP was determined using the Glaso [8] empirical correlation, the Yuan et al. [15] analytical method and the developed AI model. Figure 8 and Table 8 summarize the obtained CO2-MMP. The absolute error and correlation coefficient were used to select the best determination approach. Yuan et al.'s [15] analytical equation showed the highest error (16.7%) and the lowest correlation coefficient (0.60) among all approaches. Absolute error of 16.4% and correlation coefficient of 0.67 were obtained using the Glaso [8] empirical correlation, which indicates that those equations (Yuan et al. and Glaso 1985) were developed based on limited experimental results and several assumptions were applied. The AI model of radial basis function showed the best prediction performance, the absolute error and the correlation coefficients are 6.6% and 0.98 respectively. Based on this study, the recommended approach for predicting the CO2-MMP is an AI model with a radial basis function.

**Figure 8.** Comparison between different CO2-MMP determination approaches; numerical, analytical and the developed RBF model.


**Table 8.** Determination of CO2-MMP using different approaches.

In addition, real case studies for the flooding of hydrocarbon reservoirs with carbon dioxide were used. The data were collected from Kanatbayev et al. and Alomair et al. [39,40]. The CO2 minimum miscibility pressure was determined using the developed AI model, numerical simulation and regression techniques. Numerical approach (in Eclipse 300) was utilized to determine the CO2-MMP, the reservoir system was segmented into 2000 grid blocks, and the numerical dispersion was corrected using the infinite cell solution [39]. Alternating conditional expectation (ACE) regression algorithm was used to predict the CO2-MMP, the regression algorithm was proposed by Alomair et al., 2015 [40]. The predicted MMP values were compared with the actual values that were measured using

slim tube tests. The actual minimum miscibility pressures and the predicted values were calculated by different methods and, in addition to the error values, are listed in Table 9. Average absolute error of 10.2% was obtained using the regression approach, and errors between 8.7% to 17.3% were obtained using the numerical approach (Eclipse 300). The developed AI model in this study showed an acceptable prediction performance, with the absolute error varying between 6.4% to 9%.


**Table 9.** Actual and predicted values of the minimum miscibility pressures.

### **4. Conclusions**

This paper presents an intelligent model for determining the minimum miscibility pressure (MMP) during CO2 flooding. Artificial intelligence (AI) techniques were used to build a new MMP model. A neural network, radial basis function, generalized network and fuzzy logic system were used. The best predictive model was selected based on the absolute error and the correlation coefficient for the testing data set. Based on this work, the following points can be drawn:


**Author Contributions:** Conceptualization, A.H., S.E and A.A.; methodology, A.H. and S.E.; software, A.H.; validation, A.H. and S.E.; formal analysis, A.H.; data curation, A.H. and S.E; writing—original draft preparation, A.H.; writing—review and editing, S.E.; visualization, A.H., A.A. and S.E.; supervision, A.A., and S.E.

**Funding:** This research received no external funding.

**Acknowledgments:** The authors wish to acknowledge King Fahd University of Petroleum and Minerals (KFUPM) for utilizing the various facilities in carrying out this research.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **Appendix A. Mathematical Formulas**

This appendix presents the formulas used in this study for the error calculation, Glaso [8] empirical correlation and Yuan et al. [15] analytical equation.

Average Absolute Percentage Error (AAPE):

$$AAPE = \left. \frac{100}{N} \sum\_{i=1}^{N} \left| \frac{(MMP\_m)\_i - (MMP\_a)\_i}{(MMP\_a)\_i} \right| \right|. \tag{A1}$$

Coefficient of Determination:

$$R^2 = \frac{\sum\_{i=1}^{N} \left[ \left( (MMP\_{\boldsymbol{a}})\_{i} - \overline{MMP\_{\boldsymbol{a}}} \right) - \left( \left( MMP\_{\boldsymbol{m}} \right)\_{i} - \overline{MMP\_{\boldsymbol{m}}} \right) \right]}{\sqrt{\sum\_{i=1}^{N} \left[ (MMP\_{\boldsymbol{a}})\_{i} - \overline{MMP\_{\boldsymbol{a}}} \right]^2 \sum\_{i=1}^{N} \left[ \left( (MMP\_{\boldsymbol{m}})\_{i} - \overline{MMP\_{\boldsymbol{m}}} \right)^2 \right]}},\tag{A2}$$

where, N = Total number of samples, *MMPm* = Estimated MMP, *MMPa* = Actual MMP, *MMPm* = Average estimated MMP, *MMPa* = Average actual MMP.

Yuan et al. [15] analytical equation:

$$\text{MAP} = a\_1 + a\_2 M\_{\text{CT}+} + a\_3 P\_{\text{CT-6}} + \left( a\_4 + a\_5 M\_{\text{CT}+} + \frac{a\_6 P\_{\text{CT-6}}}{M\_{\text{CT}+}} \right) \text{T} + \left( a\_7 + a\_8 M\_{\text{CT}+} + a\_9 M\_{\text{CT}+} + a\_{10} P\_{\text{CT-6}} \right) \text{T}^2 \quad \text{(A3)}$$

where MMP is the predicted minimum miscibility pressure for CO2 injection, MC7<sup>+</sup> is the molecular weight of C7+, PC2-6 is the percentage of C2 to C6 and a1 to a10 are fitting coefficients.

$$\begin{aligned} \mathbf{a}\_1 &= -1463.4, \mathbf{a}\_2 = 6.612, \mathbf{a}\_3 = -44.979, \mathbf{a}\_4 = 2.139, \mathbf{a}\_5 = 0.11667, \mathbf{a}\_6 = 8166.1, \\ \mathbf{a}\_7 &= -0.12258, \mathbf{a}\_8 = 0.0012283, \mathbf{a}\_9 = -4.0152 \mathbf{E} - 6, \text{and } \mathbf{a}\_{10} = -9.2577 \mathbf{E} - 4. \end{aligned} \tag{A4}$$

The Glaso [8] empirical correlation is given by: For C2-6 > 18%,

$$\text{MMP} = 810 - 3.404M\_{\text{C7}+} + 1.700 \ast 10^{-9} M\_{\text{C7}+} ^{3.730} e^{786.8M\_{\text{C7}+} ^{-1.058}} T; \tag{A5}$$

For C2–6 < 18%,

$$\text{MMP} = 2947.9 - 3.404M\_{\text{CT}+} + 1.700 \ast 10^{-9}M\_{\text{CT}+} \, ^{3.730}e^{786.8M\_{\text{CT}+}} \, ^{-1.058}T - 121.2 \, ^{\circ} \text{C}\_{2-6\prime} \tag{A6}$$

where MMP is the estimated minimum miscibility pressure in psia, C2–6 is the mole fraction of C2 to C6 and MWC7<sup>+</sup> is the molecular weight of heptane plus fraction.

#### **References**


© 2019 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/).

*Article*
