Document Type : Research Article
Author
Department of Chemical Engineering, Faculty of Engineering, University of Isfahan, Isfahan, Iran
Abstract
Keywords
Main Subjects
In petroleum engineering computations, the natural gas compressibility factor is of high significance. This factor has many applications, in estimating the initial in-place gas, the gas flow in porous media, pipeline pressure drop, and gas measurement and compression (Elsharkawy et al., 2001). The precise estimation of this factor is crucial for accurate reservoir simulations. The volumetric properties of fluids are determined through experimental measurements, empirical correlations, or thermodynamic models (Azizi et al., 2010; Bahadori et al., 2007; Bian et al., 2011; Bian et al., 2012; Fatoorehchi et al., 2014; Heidaryan et al., 2010; Kamari et al., 2016; Li et al., 2014; Li & Guo, 1991; Liu et al., 2013; Yan et al., 2013). In general, experimental measurements tend to be expensive and time-consuming, while empirical correlations and thermodynamic models restrict accuracy.
In recent years, modeling based on computational intelligence like fuzzy inference systems, artificial neural networks (ANN), and hybrid fuzzy-neural inference systems has gained momentum among researchers. These models are capable of modeling complex and nonlinear functions effectively. Different intelligent systems, like fuzzy inference systems, hybrid fuzzy-neural inference systems, and ANNs are applied by (Mohamadi-Baghmolaei et al., 2015) to estimate this essential factor. The results indicate that the intelligent models are more accurate than empirical correlations, and ANNs outperform their counterparts in accuracy. The genetic algorithm was used to optimize the parameters of the Peng-Robinson and Redlich-Kwong equations of state. The Redlich-Kwong equation of state (EoS) yields better optimization results and improves the gas compressibility factor prediction with the adjusted parameters. A proposed model for predicting the compressibility factor of natural gases involves a least square support vector machine that has been optimized by applying a combined simulated annealing optimization algorithm (Kamari et al., 2013). The suggested model is compared with nine empirical correlations and equations of state, where, in terms of predictive power, reliability, and efficiency in predicting the compressibility factor of both sour natural gas types, it outperforms its counterparts. Researchers (Fayazi et al., 2014) and (Chamkalani et al., 2013) introduced an advanced least square support vector machine framework enhanced by coupled simulated annealing. The model yielded exceptional precision, thus, outperforming the traditional empirical methods and providing a robust solution for predicting the compressibility factor of natural gas types. Researchers (Sanjari & Lay, 2012) modeled the same in this context by applying an ANN. This model estimates the compressibility factor of natural gas with high accuracy. The estimated values by the ANN model are compared with commonly applied empirical models, statistical association fluid theory, and the Peng-Robinson equation of state. The Wilcoxon Generalized Radial Basis Function Network (WGRBFN) as one of the most recent and robust modeling methods applied in estimating the compressibility factor of natural gas types is outstanding (Shateri et al., 2015). The function of the WGRBFN model is assessed by comparing its results with those obtained from nine empirical correlations and five equations of state. Statistical and graphical analyses confirm that the WGRBFN model is outstanding with predictive capabilities for the compressibility factor of natural gas. Researchers (Hemmati-Sarapardeh et al., 2020) proposed a model where the Group Method of Data Handling (GMDH) is applied to estimate the compressibility of natural gas types subject to different conditions. The performance of this model is assessed against other EoSs and correlations, and is found that the GMDH model outperforms both EoSs and correlations. In a study (Wood & Choubineh, 2020), the abilities of a Transparent Open Box (TOB) and a multi-layer perceptron artificial neural network (MLP-ANN) in estimating the compressibility factor of natural gas types are compared. Applying TOB and ANN in parallel is advantageous because of their effective complementary features, in their prediction validations. The TOB's high level of inspectability facilitates the identification of data areas prone to overfitting, and ANN excels in anticipating the distribution of clustered data. Researchers (Salem et al., 2022) applied both an ANN model and an ANFIS model to predict the compressibility factor of natural gas types, and developed a correlation from the ANN model. Their results suggest that the ANN model excels in the estimation of the natural gases-type compressibility factor. The correlation(s) obtained based on the ANN is validated by applying new experimental data and compared with the available previously proposed correlations, thus, highlighting the lowest error. This presented correlation outperforms the ANN because it can be applied with no specialized program to execute the ANN.
Here, a model is developed for estimating the compressibility factor of two natural gas types through ANFIS. Estimated values by the ANFIS model are compared with the available proposed empirical correlations.
The experimental data in this modeling consists of 228 data points related to two natural gas types (Yan et al., 2013). The first gas type is sourced from a reservoir at 408 K and 105 MPa pressure, and the second is from a gas reservoir at 441 K and 116 MPa pressure. The compositions of the gas types are tabulated in Table 1.
Table 1: The composition of natural gas types (Yan et al., 2013)
Mole percentage |
Component |
|
Type II |
Type I |
|
0.671 |
0.97 |
N2 |
0.817 |
0.37 |
CO2 |
97.766 |
88.4 |
CH4 |
0.593 |
7.68 |
C2H6 |
0.037 |
1.55 |
C3H8 |
0.01 |
0.3 |
i-C4H10 |
0.025 |
0.31 |
n-C4H10 |
0.013 |
0.11 |
i-C5H12 |
0.016 |
0.07 |
n-C5H12 |
0.027 |
0.07 |
C6H14 |
0.004 |
0.12 |
C7H16 |
0.018 |
0.04 |
C8H18 |
To determine the performance of the model, its results are compared with the following five models:
Method 1: The (Dranchuk et al., 1973) correlation: contains eight coefficients obtained based on the Benedict–Webb–Rubin equation and Standing–Katz chart for the prediction of natural gas compressibility factor. In this correlation, the input variables are the temperature, pressure, pseudo-critical temperature, and pressure.
Method 2: The (Dranchuk & Abou-Kassem, 1975) correlation: contains eleven empirical coefficients. In this correlation, the variables are temperature, pressure, pseudo-critical temperature, pseudo-critical pressure, and critical compressibility factor.
Method 3: The (Yan et al., 2013) correlation: variables are temperature, pressure, pseudo-critical temperature, and pseudo-critical pressure.
Method 4: The (Heidaryan et al., 2010) correlation: contains ten empirical coefficients, and the variables are temperature, pressure, pseudo-critical temperature, pseudo-critical pressure, and critical compressibility factor.
Method 5: The SRK equation of state is adopted by incorporating the Boston–Mathias temperature-dependent term by (Yan et al., 2013) to model the phase behavior and volumetric properties of condensate gas or natural gas types subject to high-pressure conditions. In this modified version of the SRK equation, the expression for the proper term is linked to the range of reduced temperature (Tr).
A fuzzy system is a prevalent computational technique rooted in fuzzy theory, where the fuzzy if-then rules and fuzzy reasoning are applied. Together with neural networks, this system yields a robust tool known as the ANFIS, leveraging the learning capacities of neural networks and demonstrating performance fit to fuzzy inference models. In such systems, the parameters of the fuzzy inference system are established through a method fit to the training algorithms of ANNs.
3-1. The structure of a fuzzy inference system
According to (Jang, 1993), the structure of a fuzzy inference system consists of four components:
The ANFIS structured as an adaptive network that applies a supervised learning algorithm, fit to the Takagi-Sugeno fuzzy inference system is applied. The architectural arrangement of both the ANFIS and Takagi-Sugeno models (Suparta & Alhasa, 2013) is illustrated in Fig. (1).
Figure 1: (a) Fuzzy "If-Then" rules and fuzzy inference mechanism, (b) ANFIS architecture (Suparta & Alhasa, 2013)
To simplify matters, it is assumed that there exist two, z1 and z2 inputs, and one output, y. For the Takagi-Sugeno model, two "If-Then" rules are applied as follows:
Rule 1: If z1 is A1 and z2 is B1 Then y1=a1z1+b1z2+s1
Rule 2: If z1 is A2 and z2 is B2 Then y2=a2z1+b2z2+s2
where A1, A2, B1, B2 are the membership functions of the respective inputs z1 and z2 (premise part), and a1, b1, s1, and a2, b2, s2 are the linear parameters of the consequent part in the Takagi-Sugeno fuzzy inference model. In this type of fuzzy inference system, each rule combines its input parameters linearly and adds the result to a constant value. The output of the model is the weighted average of the outputs of different rules. The Takagi-Sugeno model is practical in developing adaptive neuro-fuzzy inference systems (Suparta & Alhasa, 2013), applied in different fields of science and engineering, where classification and pattern recognition tasks, rule-based processing, and data processing applications are involved.
As observed in Figure 1), the structure of the ANFIS model consists of five layers where the adaptive nodes are present in the first and fourth layers, and the others feature fixed nodes. An overview of each layer is provided below:
Layer 1 (input and fuzzification): This layer converts crisp input data into linguistic sentences. There is one node for each input (in this case, two nodes). These nodes represent linguistic sentences associated with each input data point. Sentences are generated in this through the predefined membership functions. Many membership functions, like triangular, Gaussian, and bell-shaped, are available, to be selected, the parameters of which are known as premise parameters, are tuned and optimized through the ANFIS model to enhance the model's performance.
Layer 2 (rule node): This layer evaluates the degree of compatibility and validity of the conditions in the premise part. Each output node here is the firing strength of each rule. This estimation is made based on the following equation:
where wi is the firing strength of rules.
Layer 3 (normalized node): In this layer, the values of wi computed in the previous layer are normalized, by dividing the wi of each rule by the sum of the wi of all rules. This normalization assures that the firing strengths are scaled between 0 and 1, representing the relative contribution of each rule to the overall inference process.
where is the normalized firing strength
Layer 4 (defuzzification layer): This layer determines the linguistic output sentences of the model. The nodes in this layer are adaptive and obtain the output according to the following equation:
where ai, bi, and si are the linear parameters known as consequent parameters. These parameters, like the premise parameters in Layer 1, are adjusted and optimized by the ANFIS model to minimize the discrepancy between the model’s estimations and empirical data.
Layer 5 (output node): This layer consists of a single fixed node that produces the overall output by applying the weighted average sum method of all the inputs obtained from the previous nodes, Eq. (4):
3-2. Development of ANFIS
To develop an ANFIS model for estimating the natural gas types compressibility factor, the temperature, pressure, pseudo-critical temperature, and pressure are selected as independent variables, the inputs to the ANFIS model.
The experimental data are randomly proportioned into the: the training data set (80%) and the test data set (20%). The input membership functions are triangular. The specifications of the adaptive neuro-fuzzy inference system obtained are tabulated in Table 2.
Table 2: Characteristics of the ANFIS model
|
Parameter |
Takagi-Sugeno |
Type |
4 |
No. of inputs |
1 |
No. of outputs |
probor |
Method of or |
prod |
Method of and |
sum |
Agg. Method |
prod |
Imp. Method |
wt. aver |
Defuzz. Method |
The estimated values of natural gas-type compressibility factors obtained from the ANFIS model vs. the experimental data are plotted in Fig. (2). The capability of the ANFIS model is shown by the agreement observed between the experimental data and the estimated values. The average absolute relative deviation percentage (AARD%) between the experimental data and the estimated values by the ANFIS model is 0.05% while and maximum absolute relative deviation percentage (ARD%) is 0.55%.
As to overfitting, the k-fold cross-validation (k=3) consistent performance is observed in all folds, with an average AARD% of approximately 0.062 and an R² of 0.9999 to assure generalizability. The model is applied to the data for gas number 4 from Sun et al. (2012), which has a composition closest to gas type 2 in this study. An AARD% of 0.2% and a maximum absolute relative deviation ARD of 1.15% are obtained. Collectively, these results reveal that this proposed ANFIS model is not subject to overfitting.
Figure 2: Experimental data of natural gas compressibility factor plotted against estimated values by the adaptive neuro-fuzzy inference system; (a) training data, (b) test data
The natural gas types compressibility factor vs. the pressure at various temperatures is plotted in Fig. (3), where, as observed, the ANFIS model accurately estimates the compressibility factor of both gas types across all temperatures.
Figure 3: The natural gas types compressibility factor vs. pressure at different temperatures (a) Natural Gas Type 1 and (b) Natural Gas Type 2
The ANFIS model with the empirical equations by (Yan et al., 2013) for estimating the compressibility factor of natural gas types are tabulated in Table 3, where, as observed the ANFIS system outperforms its counterparts in terms of its predictive capability.
Table 3: Comparison of empirical correlations (Yan et al., 2013) with the ANFIS model
AARD% |
Natural gas |
|||||
ANFIS |
Method 5 |
Method 4 |
Method 3 |
Method 2 |
Method 1 |
|
0.021 |
0.82 |
3.46 |
2.73 |
3.25 |
3.14 |
Type 1 |
0.094 |
1.01 |
2.73 |
6.25 |
2.00 |
1.95 |
Type 2 |
Method 1: the Dranchuk correlation; Method 2: The Dranchuk and Abou-Kassem correlation; Method 3: The Brill and Beggs correlation; Method 4: The Heidaryan correlation; Method 5: the SRK EoS with the Boston–Mathias temperature-dependent term (Yan et al., 2013) |
The experimental data for the compressibility factor of two natural gas types is modeled through the Adaptive Neuro-Fuzzy Inference System. A Takagi-Sugeno fuzzy inference system is applied, with temperature, pressure, pseudo-critical temperature, and pseudo-critical pressure of the gas as the input variables, and the compressibility factor as the output variable. Triangular membership functions are selected for the fuzzy membership functions. The results obtained from the ANFIS model revealed excellent agreement with the experimental data. The comparison with some empirical equations reveals the high predictive capability of the ANFIS system for estimating the natural gas-type compressibility factor.