Artificial Neural Network to Forecast Enhanced Oil Recovery Using Hydrolyzed Polyacrylamide in Sandstone and Carbonate Reservoirs

Polymer flooding is an important enhanced oil recovery (EOR) method with high performance which is acceptable and applicable on a field scale but should first be evaluated through lab-scale experiments or simulation tools. Artificial intelligence techniques are strong simulation tools which can be used to evaluate the performance of polymer flooding operation. In this study, the main parameters of polymer flooding were selected as input parameters of models and collected from the literature, including: polymer concentration, salt concentration, rock type, initial oil saturation, porosity, permeability, pore volume flooding, temperature, API gravity, molecular weight of the polymer, and salinity. After that, multilayer perceptron (MLP), radial basis function, and fuzzy neural networks such as the adaptive neuro-fuzzy inference system were adopted to estimate the output EOR performance. The MLP neural network had a very high ability for prediction, with statistical parameters of R2 = 0.9990 and RMSE = 0.0002. Therefore, the proposed model can significantly help engineers to select the proper EOR methods and API gravity, salinity, permeability, porosity, and salt concentration have the greatest impact on the polymer flooding performance.


Introduction
After primary production, approximately two-thirds of the initial oil in place is expected to remain in the reservoirs. Enhanced oil recovery (EOR) methods which have become a main subject in petroleum engineering to meet the demand for energy will extract enough oil to fulfill a significant portion of the global oil demand [1]. As an EOR method, chemical flooding has been a popular strategy for improving oil recovery in mature oil fields that is now carried out using a variety of chemical agents and it has been shown to be successful [2]. Two types of features, microscopic and macroscopic sweep efficiencies, are considered in an EOR process. For the first case, chemical agents like surfactants are used and, for the second one, polymers are utilized to improve the mobility ratio by increasing the shear viscosity of water. Polymer flooding is an effective way to boost the water flooding effect and field experiments and applications have been conducted in a series of oil fields, with positive results in terms of increasing oil production [3,4], where water-soluble polymers were used to improve the rheological properties of water [5]. Therefore, every factor that strengthens or weakens rheological properties of the polymer solution is an influential factor [6]. Besides the polymer type and its concentration, there are many influencing factors which should be considered regarding the water, oil, and rock type of a reservoir [7]. Therefore, the various screening criteria of polymer flooding make the evaluation of its performance before field-scale operations difficult. One way to overcome this issue is the simulation of the process through core flood experiments that are still expensive and time consuming. One more way that is more economical and facile is using simulation tools such as an artificial neural network (ANN), fuzzy inference system (FIS), evolutionary computation (EC), and their hybrids, which have all been used effectively to construct a predictive model [8]. These methods are appealing because they can deal with various uncertainties. Soft computing approaches are increasingly employed as a substitute for traditional statistical methods [9]. To the best of our knowledge, the modeling and prediction of the polymer flooding experiment have not been widely investigated, particularly using ANNs such as multilayer perceptron (MLP), radial basis function (RBF), and fuzzy neural networks such as an adaptive neuro-fuzzy inference system (ANFIS). The current study investigated the performance of polymer flooding by using the abovementioned modeling tools. The first step is to find out the important factors and, as mentioned above, the polymer type and its concentration are known as influential factors. The most widely used polymer in petroleum engineering for EOR operations is hydrolyzed polyacrylamide (HPAM). Therefore, its data are shown in this article [10,11]. In addition to the species and concentration of polymer and its molecular weight, both the type and concentration of salt also have a great effect on the rheological properties [12] because the addition of divalent ions causes a large decrease in the rheological properties of the polymer solution [13]. Hence, in addition to the salt concentration, three categories are considered regarding salt type. The first category is fresh water, the second category is a low saline, which is assigned to monovalent salts, and the third category is a high saline, which is assigned to salts that contain both monovalent and divalent ions [6]. Mobility ratio, which is roughly defined as the ratio of flooded fluid (oil) to flooding fluid (polymer solution) [14], is an important influencing parameter that should be considered during performance evaluations of EOR processes. As mentioned previously, the viscosity of polymer solutions is dependent on several parameters that are considered as inputs for the models and, therefore, it cannot be considered directly because putting dependent parameters as inputs in the model will impose huge complexity on the model versus fewer gains. Hence, some of the abovementioned independent parameters, of which the polymer solution viscosity is a function, were selected as inputs to indirectly see the effect of polymer solution viscosity. Additionally, as for the oil viscosity, because it is indirectly dependent on American Petroleum Institute (API) oil gravity [15][16][17], just the API gravity was considered as an input parameter to avoid complexity.
Not only rock type [18], porosity [19], permeability [20], temperature [21], API gravity [22], and initial oil saturation [23], among the reservoir properties, but also the volume of flooded fluid (pore volume (PV)) among the operational parameters, were considered as input parameters for the ANN and, finally, EOR was predicted using the abovementioned networks [24].
Briefly, the aim of this paper is to introduce a proper model with high accuracy to predict the performance of polymer flooding as an EOR method before doing any lab-and field-scale activities.

Data Collection
Six prior investigations on both carbonate and sandstone core reservoir samples provided the raw data needed for modeling [25][26][27][28][29][30]. There were 847 data records in the gathered data sets, which were separated into three groups: training (70%), validating (15%), and testing data (15%). Eleven relevant elements were present in the actual or experimental input data, including (1) polymer concentration, (2) salt concentration, (3) rock type, (4) initial oil saturation, (5) porosity, (6) permeability, (7) pore volume flooding, (8) temperature, (9) API gravity, (10) molecular weight of the polymer, and (11) salinity. The only output of the utilized models was the oil recovery factor via polymer flooding compared to the final one after pure water flooding per unit percentage (%), which was presented as a percentage and dubbed "EOR after polymer flooding". Table 1 displays the ranges of various input parameters.

ANN
ANNs, often known as neural networks, are current systems and computational approaches for machine learning, knowledge presentation, and, lastly, using that information to maximize the output responses of complex systems. The primary principle behind these networks is based on how the biological brain system processes data and information to learn and produce knowledge. The creation of new methods for information processing systems is a major component of this concept [31].
This system consists of a huge number of highly linked processing components, i.e., neurons that collaborate to solve problems and send information via synapses (electromagnetic communications). If one cell in these networks is harmed, other cells can be compensated by contributing to its regeneration. Thereby, these networks can learn. By injecting tactile nerve cells, for example, the cells learn not to travel to the heated body, and the system learns to fix its error with this algorithm. These systems learn adaptively, meaning that when new inputs are presented, the weight of the synapses changes in such a manner that the system delivers the proper response [32].
Input, output, and processing are the three levels of an ANN unless the user inhibits communication between neurons, and each layer comprises a set of nerve cells that are ordinarily interconnected with all nerve cells in other layers. However, the nerve cells in each layer have no link with other nerve cells in the same layer. A nerve cell is the smallest unit of information processing that allows neural networks to operate. A neural network is a collection of neurons that build a specific architecture based on connections between neurons in distinct layers while being positioned in distinct layers. As neurons are a type of nonlinear mathematical function, a neural network made up of them can be a fully complicated nonlinear system. Each neuron in a neural network works independently, and the network's overall activity is the product of the actions of numerous neurons. In other words, neurons in a cooperative process correct each other [33][34][35].

MLP Artificial Neural Network
The MLP network consists of several types of layers, including the input, one or more hidden layers, and the output that every type of layer possesses some of the processing neurons, and every neuron is entirely linked to succeeding layers via a weighted interconnection [8]. Therefore, the first one has an equal number of input parameters and neurons, and the model's output is related to a neuron in the third one. Additionally, the correlation of the model's output and input is specified in the second type of layer. Their numbers of hidden layers and neurons will crucially affect the efficiency of the MLP network [36]. The node's value in the second and the last type of layer is determined based on its weight in the former layer [37]. After that, the offset value is aggregated to the gained results, and the computed value is transited to the trigger level via the transfer function to generate the final output. Various activation functions, such as a binary step, identity Gaussian, and linear functions, could be adopted for the second and third types of layers. The following equation shows the results of the model: where y k is the output, w kj is the link weight, x j is the input, b k is the bias vector, and F k is the activation function. The MLP training process is executed using a backpropagation algorithm such as scaled conjugate gradient, gradient descent, Levenberg-Marquardt, and resilient backpropagation [38].
In this paper, among several activation functions used in MLP artificial neural networks including tangent sigmoid (tansig) and log-sigmoid, and linear transfer function (purelin), tansig is used for the link between the input and the hidden layers and purelin is adopted for the link between the hidden and the output layers [8]. The structure of the MLP network used in this paper to predict the target data is shown in Figure 1.

Radial Basis Function (RBF) Artificial Neural Network
The feasibility of this kind of neural network to process arbitrary sparse data, that is easy to generalize to multidimensional space, and to provide spectral precision makes it a particularly suitable alternative [38]. In addition, the RBF neural network is superior to the MLP model because it has excellent accuracy in nonlinear data modeling and can be trained in a single direct program instead of an iterative solution in MLP [39]. While the frame of RBF is comparable to the MLP [40], the RBF possesses only one hidden layer, which consists of multiple nodes called RBF units. The RBF neural network architecture is a two-layer feed-forward neural network, in which the input is transmitted from the neurons in the hidden layer to the output layer. Each RBF network possesses two important factors, which describe the center position of the function and its deviation. Finding the center of the unit and determining the optimal value of the weight connecting the RBF unit and the output unit are the two main steps in the training process of the RBF neural network [41]. Different methods, such as random center selection [42], clustering [43], and density estimation [44], could be adopted to discover the center in the RBF network. The output of the system can be expressed as Equation (2): where w T is the transposed output of the shell vector, and ϕ(x i ) is a kernel function. For this, different optimization algorithms can be applied. Here, trial and error are adopted to find out the optimal value for this parameter [8]. By changing this parameter, RBF neural networks with different structures are developed and the product of each RBF neural network is observed according to the MSE value of the test data subset [38].

ANFIS
This fuzzy logic (FL)-based average value was initially provided in 1998 [45]. The ANFIS model can use qualitative methods to solve nonlinear problems and model physics, instead of operating quantitative methods by turning input data into a particular term called even fuzzy set or linguistic. The frame of the neuro-fuzzy system has five layers which are illustrated here [46,47].
First, the fuzzy input is made based on transforming input data by defining a membership function (MF) [48]. The computed membership degree of every input factor is reproduced, resulting in the firing strength, as shown below: where w i is the calculated firing strength, µ ij is the degree of membership of the jth MF for the ith input, and m employs the input counter. For each rule, the firing strength is obtained using multiplication, and the highest one obtained matches with the input [32]. The next layer operates based on the following equation: where w l is the normalized firing strength. At the end, the final result is obtained using the following equation: In the above formula, f i can be a constant or polynomial function. The values of n ij and r ij are the adjustment factors of TSK-FIS and their values should be optimized by the specified algorithm to have a more accurate prediction [8]. The ultimate layer sums the outputs in the prior layer to generate the following general ANFIS output: In this work, three types of ANFIS are studied, and the characteristic that distinguishes them is the distribution of membership functions. The first kind of system is identified by the division of the grid, and the membership function is uniformly distributed in space, while the second kind of system uses a subtractive grouping mechanism; the last one is based on fuzzy clustering of c-means. See a previous article for more theories [8].
To optimize the network parameters, the grasshopper optimization algorithm (GOA) [49], genetic algorithm (GA) [50], and swarm optimization algorithm (PSO) [51] can be applied on artificial neural networks. In this study, we used a trial and error method that examined 500 replications for each parameter to ensure that the optimal value of the data also changed randomly with each iteration.

Model Evaluation
Several statistical standards were adopted to evaluate the accuracy of the applied model, including coefficient of determination (R 2 ), mean squared error (MSE), root mean squared error (RMSE), mean error (µ), error standard deviation (σ), and average absolute relative deviation (AARD): where λ is the mean of the error: N is the amount of data, and EOR actual i and EOR predicted i represent the original target data and the predicted output of the model, respectively.

Optimum MLP Structure
The results of MLP neural network sensitivity analysis are shown in Table 2. This threelayer network, that includes input, hidden, and output layers, was evaluated with different training algorithms, due to their higher speed (which is less costly to the system) and higher efficiency (statistical parameters indicate this). The Levenberg-Marquardt backpropagation algorithm, as the superior algorithm, was used in the rest of the comparisons in this study (Table 3). In this study, we assigned 70% of the collected data to the training data and, to the validation and test data, 15%, which is clearly shown in Table 4, using this data distribution to obtain the power of the most optimal MLP networks. Additionally, based on Table 2, the best number of neurons was determined, and based on this, six neurons was considered to be the best. As the number of neurons in the MLP network increases, the quality and efficiency of the network increases, but more than six neurons in the data of this study do not increase the cost of efficiency, so six neurons are regarded to be the best value. The structure of the superior MLP network can be found in Figure 1.  The MLP network was trained in the most optimal mode presented, and its result can be seen in Figure 2. Figure 3 shows the network error after data normalization, which is a reasonable and very low network error that can have many industrial applications in this field. Figure 4 shows the regression diagram of all the output data of the model and the target data obtained from the articles. This diagram shows the amount of difference between the model and target data that overlap. Figure 5 represents an error histogram graph that has been obtained from the normal data loss, which can also be seen below the network error value. Meanwhile, it can be seen that there are very few outliers that can easily be seen at this high level of precision.

Optimum RBF Structure
Based on Table 5, to determine the optimal parameter of the RBF neural network, we first determined the optimal maximum number of neurons in the hidden layer. After running the program about 700 times for each neuron from 1 to 100, 44 neurons were selected as the best number of neurons. Then, the spread coefficient was determined and this operation was carefully examined with about three points from 1 to 100, which gave the best network results with a spread coefficient of 1.1, which can be clearly seen in Table 5. It should be noted that in this particular data, when increasing the spread coefficient, the accuracy of the network decreases, and also, as mentioned earlier, when increasing the number of neurons, more accuracy can be expected from the neural network, but this happens until the cost that is applied to the network is at the same level as the accuracy of the network (increasing neuron number increases the cost). Figures 6-9 are related to the superior RBF neural network in polymer data, expressing the high accuracy of this neural network. Figures 6 and 7, which show the normalized error of the data, indicate that this network has a very low error in data estimation and has a good ability to predict the data. In addition, based on Figures 8 and 9, this capability can be seen and it can also be easily seen that this network has very few outliers and residual values have normal scattering, which show the strength of this network.

Optimum ANFIS Structure
Experiments were performed and different ANFIS networks from three common types of ANFIS, grid partitioning-based ANFIS, subtractive clustering based ANFIS, and fuzzy c-means (FCM) clustering, were run [8], and Table 6 shows their sensitivity analysis. Information about fuzzy neural networks based on subtractive clustering is reported. To determine the optimal parameters of the fuzzy neural network which are presented in this section, a trial and error method and its repetition for each parameter at a rate of 100 times and recording network data and determining the best values for the neural network was carried out. Based on the sensitivity analysis that is shown in Table 7, it can be stated that by increasing the step size decrease rate for polymer data to 23, the desired result is obtained, and as the size of the network increases, an error also occurs. The same is true for changing the step size increase rate parameter up to 20. Increasing the value of the initial step size parameter above four and decreasing it to less than four networks do not provide the desired results. The value of the radius parameter is a vector that determines the range of influence of the center of the clusters in each of the data dimensions. With a lot of trial and error, a value of 0.333 was determined for this parameter, which provides the most desirable network for these polymer data. Table 7. Sensitivity analysis of ANFIS network based on subtractive clustering.

Radius Initial Step Size
Step Size Decrease Rate Step  Figures 10 and 11, this network has more errors than the MLP and RBF networks presented in the previous sections. Based on Figures 12 and 13 showing the linear regression and a histogram of the error of the data after their normalization, respectively, it was found that there are very few outlier when estimating data using the fuzzy neural network and relatively good accuracy but due to the higher accuracy seen in previous cases, it is less accurate than MLP and RBF neural networks.

Performances of Optimized MLP, RBF, and ANFIS Models
Based on the comparisons made in the previous sections, it can be presented that the MLP neural network has the best performance for teaching this type of data. Figures 2-5 show the performance of the trained network using polymer data, which was discussed in detail in the previous sections. The MLP neural network with the Levenberg-Marquardt backpropagation algorithm, along with its sensitivity analysis presented in Table 2, has a very strong prediction ability with the desired data inside and outside the predicted range. The general shape of the network with six neurons in the hidden layer is shown in Figure 1. The complete information of the best-trained network (which is of the MLP type) is shown in Table 8.

Overfitting Evaluation
Overfitting is a phenomenon in which the accuracy of network training data is very high and powerful, but this is not observed in network test data. The reasons for this can be a small dataset [52] and a very complex model [53]. The figures and diagrams embedded in the previous sections clearly show that the trained neural networks do not involve overfitting at all, but a method similar to the Tabaraki and Khodabakhshi method presented in 2020 [53] can be used to prove that the models that are presented in this section do not include overfitting At the beginning of the work for the target network (here, for the top MLP, RBF, and ANFIS networks), the value of the total number of adjustable parameters (TNAP) was calculated, and for this purpose the following equation is used: TN AP ANFIS = n inp × n m f × n pm f + (n out × n r ) (16) where n hid , n inp , n m f , n pm f , n out , and n r are the numbers of hidden neurons, input neurons, membership functions, parameters in membership functions (this value is specifically intended to be two for Gaussian functions), output neurons, and rules, respectively. These values are measured for the best MLP and RBF neural networks, which are equal to 84 and 616, respectively. To calculate this value for ANFIS, we have: number of input neurons (11), number of membership functions (11), number of parameters in membership functions (2), number of output neurons (1), and number of rules (3). By placing these values in Equation (16), the value 245 is obtained for the desired parameter [53].
To determine the threshold value of the total number of adjustable parameters, the value of another parameter that is presented in the following equation must be determined: The amount of N Training is equal to the amount of training data. This value is 296.5 for the data of this study (593 divided by 2. See Table 8 for more information). According to the literature, if NPAP is lower than TNAP, there will be no overfitting [53,54].
From the experiments performed, it can be clearly stated that the MLP neural network and the superior ANFIS neural network do not encounter any kind of overfitting in this study, but the introduced superior RBF network may have overfitting.

Relevancy Factor Evaluation
It was concluded that the introduced networks have good accuracy in predicting EOR data, for which the MLP network was introduced as the top network. In the following section, the impact of each input on the output (EOR) is measured.
where X k,i and X k designate the ith value of the kth input variable and the average value of the kth input variable, respectively; Y i indicates the ith predicted EOR value, Y denotes the mean value of predicted values of EOR, and finally n is the amount of data in the gathered dataset. On the other hand, the value of the relevancy factor is defined in the range between −1 and +1. The closer the value of r is to +1, the more positive the effect, and the closer the value of r is to −1, the more negatively it affects the network.
Relevancy factor values for each input are presented in Table 9. Accordingly, API gravity, salinity, permeability, porosity, and salt concentration have the greatest impact on EOR. It should be noted that these cases can only be expressed for the data collected in these articles that their specifications can be seen in Table 1.

Conclusions
In this paper, MLP, RBF, and ANFIS neural networks based on subtractive clustering of EOR data using existing polymer, rock, and fluid properties, including polymer concentration, salt concentration, rock type, initial oil saturation, porosity, permeability, pore volume flooding, temperature, API gravity, molecular weight of the polymer, and salinity, were used to predict the EOR performance of HPAM polymer flooding. All the proposed models had a very high accuracy (R 2 = 0.9990 and RMSE = 0.0002 for MLP, R 2 = 0.9973 and RMSE = 0.0008 for RBF, and R 2 = 0.9729 and RMSE = 0.0150 for ANFIS neural network) in predicting the data, however, the MLP was the top network. Finally, by using overfitting prevention methods and testing whether the networks were overfitted or not, the networks were evaluated. It can be also clearly stated that the MLP neural network is valid in all respects to predict data inside and outside the network built-in range. Next, through relevancy factor evaluation, the parameters which have the greatest impact on EOR performance of polymer flooding were shown to be API gravity, salinity, permeability, porosity, and salt concentration. The results emphasized that by using the proposed model, the performance of HPAM polymer flooding in a special reservoir can be well evaluated before carrying out any lab-scale experiments or field-scale operations.

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