Adaptive Prediction of Enhanced Oil Recovery by N 2 huff-n-puff in Fractured-Cavity Reservoir Using an FNN-FDS Hybrid Model

: N 2 huff-n-puff has proven to be a promising technique to further improve oil recovery in naturally fractured-cavity carbonate reservoirs. The effect of enhanced oil recovery (EOR) by N 2 huff-n-puff is signiﬁcantly affected by various dynamic and static factors such as type of reservoir space, reservoir connectivity, water inﬂux, operational parameters, and so on, typically leading to a signiﬁcant increase in oil production. To reduce the prediction uncertainty of EOR performance by N 2 huff-n-puff, an adaptive hybrid model was proposed based on the fundamental principles of fuzzy neural network (FNN) and fractional differential simulation (FDS); a detailed prediction process of the hybrid model was also illustrated. The accuracy of the proposed FNN-FDS hybrid model was validated using production history of N 2 huff-n-puff in a typical fractured-cavity carbonate reservoir. The proposed model was also employed to predict the EOR performance by N 2 huff-n-puff in a naturally fractured-cavity carbonate reservoir. The methodology can serve as an effective tool to optimize developmental design schemes when using N 2 huff-n-puff to tap more remaining oil in similar types of carbonate reservoirs. The performance appraisal of N 2 huff-n-puff in a typical carbonate reservoir shows that the prediction ability of the FNN-FDS hybrid model is satisfactory, indicating that the proposed model is efﬁcient for EOR prediction by N 2 huff-n-puff. The proposed model can guide optimal design of development scheme when using N 2 huff-n-puff to tap more remaining oil in similar carbonate reservoirs.


Introduction
The main reservoir spaces of typical fractured-cavity reservoirs consist of karst caves, high-angle fracture networks, and many dissolved pores [1,2]. The reservoir heterogeneity is extremely important, mainly because the distribution is random, the internal structure is very uneven, the spatial configuration pattern of caverns and cracks is complex, and oil-water relationship and flow dynamics are complicated [3,4]. In the early development stage of a fractured-cavity carbonate reservoir, oil production typically depends on natural or bottom water energy. Water injection is one of the more widely used strategies to increase oil production and slow down its decline. However, as the oil-water interface gradually rises, the increase of oil production usually diminishes after water huff-n-puff; a large portion of crude oil remains underground and cannot be produced [5]. Many pilot tests demonstrate that after N 2 gas is injected into a cavity it will move up due to gravity segregation, and gradually occupy the upper space of the cavity, thus displacing crude oil down into the producing wells. N 2 can also be used to replenish reservoir energy, slow down the decline of oil production, and improve oil recovery [6,7]. It is of great importance to make an accurate prediction about N 2 huff-n-puff in order to explore its potential in fractured-cavity carbonate reservoirs.
The artificial neural network-improved fuzzy inference system (ANFIS), firstly developed by Jang (1993) [8], was proven to be an effective tool for exploring inherent behaviors in different areas of study (e.g., water drought, sediment transport, PCP-based NMDA receptor antagonists, elastic constants of rocks, hepatitis C Virus, hydrologic modelling, and hydropower stream flow [9][10][11][12][13][14][15]). In recent decades, the ANFIS model has appealed great attentions to improve its predictive ability. By integrating advantages of grey wolf optimization and adaptive neuro-fuzzy inference system, an improved ANFIS is proposed by Dehghani et al. [16], showing better prediction capability. Goodarzi and Freitas [17] studied the feasibility of principal component analysis to design an adaptive neuro-fuzzy inference. By selecting the grid partition (GP), fuzzy c-means (FCM), and subtractive clustering (SC) as three fuzzy inference system structures, Mostafaei [18] developed novel ANFIS models to predict the cetane number of biodiesels. Dastorani et al. [19] applied the artificial neural network (ANN) and ANFIS models to reconstruct missing flow data. Some other self-adaptive methods were also developed in previous oil and gas studies [20,21]. Vardian et al. [22][23][24] concluded that the ANFIS system can serve as an excellent model with relatively few errors. The ANFIS model has a strong training capability, which is akin to the ANN. Using the back-propagation algorithm, the parameters involved in the ANFIS model were adjusted until an expected error was reached.
The goal of grey prediction is to construct differential equations for prediction, so it can be regarded as one form of differential simulation prediction. There may be multiple controlling factors of the forecasting indicator. Mao et al. [25] presented a novel fractional grey prediction model by substituting the fractional differential equations with their first-order forms. The model is highly accurate and can overcome the class ratio test restrictions of the conventional grey model (GM) (1,1). It demonstrated that the fractional differential simulation (FDS) can greatly improve the prediction ability of differential simulation [26]. Zeng and Li [27] developed a novel GM model originating from a dynamic background-value coefficient. Ma et al. [28] attempted to build a nonlinear grey Bernoulli multivariate prediction model. The GM (1, n) model was widely applied in various fields [29][30][31][32][33][34]. Yang and Xue [35] proposed a generalized fractional-order form of grey prediction model, which provides more freedom by using fractional derivatives. Meng et al. [36] introduced the residual sequence to improve the prediction accuracy of the fractional order grey model. The fractional order grey models were widely used with the improved GM (1,1) model [37,38]. These previous studies show that the prediction ability is strong when the fuzzy neural network (FNN) and fractional differential simulation (FDS) model are integrated. However, the adaptive hybrid model by combining FNN with FDS is still underexplored. In this study, an adaptive hybrid model is developed based on the fundamental theories of FNN and FDS that is then used to predict the EOR performance of N 2 huff-n-puff in a naturally fractured-cavity carbonate reservoir.

Research Background
The geological heterogeneity of naturally fractured-cavity reservoirs is extremely strong. It was proven that several types of reservoir spaces coexist, mainly including karst cavities, tectonic fractures, and dissolved pores. For typical fractured-cavity carbonate reservoirs that are widely distributed, there is a lack of efficient methods to obtain a high oil recovery during exploitation of these difficult-to-produce reserves due to great lateral and vertical heterogeneity. Figure 1a shows the lateral amplitude distribution retrieved from seismic data of a typical fractured-vuggy carbonate reservoir. The deeper the red color, the greater the amplitude, indicating a larger possibility to represent a cavity. Figure 1b displays the vertical amplitude distribution of a typical fractured-cavity body selected from Figure 1a. Figure 1c reflects the 3-D porosity field of the typical fractured-cavity body as shown in Figure 1b, where the deeper the red color, the higher value the porosity of cell grid in the 3-D geological model of the typical fractured-cavity body. The production performance in the early stage depends heavily on formation energy. To keep oil production stable, water injection is usually selected to supply energy into reservoir space. However, the decline rate of oil production remains stubbornly high due to a poor understanding of reservoir heterogeneity and configuration patterns of multiple fractured-cavity units, leading to a great amount of oil remaining unexploited in the fractured-cavity reservoir. N 2 huff-n-puff is proven to be an efficient technique to further tap the potential of remaining oil. Figure 2 displays the underlying mechanisms of N 2 huff-n-puff in a fractured-cavity carbonate reservoir. It is found that three steps are necessary to carry out one cycle of N 2 huff-n-puff: gas injection, soaking, and production. When N 2 gas is injected into a typical fractured-cavity carbonate reservoir, driven by gravity segregation, it will gradually move to an upper position of the targeted cavity. The secondary gas cap will gradually move down the oil-water interface, and a large amount of crude oil will flow into the bottom hole of producing wells. The supply of formation energy by N 2 huff-n-puff can effectively inhibit the decline of oil production and rise of water cut. Figure 3 displays the production performance of N 2 huff-n-puff for a producer in a typical fractured-cavity reservoir. It indicates that N 2 huff-n-puff achieves a better oil production rate even if the producer is shut down because of abrupt water-rising. However, the actual effect of increasing oil production by N 2 huff-n-puff differs greatly. It is difficult to achieve an adaptive prediction of EOR performance by N 2 huff-n-puff in a fractured-cavity carbonate reservoir. Many factors can affect the performance of enhanced oil recovery by N 2 huff-n-puff in karst reservoirs (e.g., remaining oil saturation, reservoir thickness, formation pressure, cumulative gas storage rate, daily oil production, natural fracture permeability, injection-production strategy, etc.). By taking all influential factors into account, the actual effect of N 2 huff-n-puff enhanced oil recovery in karst reservoirs can be accurately evaluated, but it is difficult to implement. Selecting certain controlling factors provides an alternative to solve this issue.

Adaptive FNN-FDS Hybrid Model
Here, the structure flowchart and calculation procedures of the proposed fuzzy neural network (FNN)-fractional differential simulation (FDS) hybrid model will be displayed after the relevant principles are described as follows.

Adaptive Neuro-Fuzzy Inference System
An artificial neural network is a promising tool due to its self-learning ability, but it lacks a good way to describe the reasoning function. Conversely, the fuzzy system shows good reasoning function with no self-adaptive ability. To resolve this issue, Jang et al (1993) initially developed an adaptive neuro-fuzzy inference system (ANFIS) [8] by integrating the self-learning mechanism of a neural network with the good reasoning ability of the fuzzy system. Moreover, the proposed fuzzy system is converted into an adaptive artificial neural network to carry out the self-learning process. The generalized schematic flowchart of ANFIS that includes five layers is shown in Figure 4. Both the first and the fourth nodes are self-adaptive, but the others are fixed. To make adaptive predictions of EOR performance by N 2 huff-n-puff in a fractured-cavity carbonate reservoir, the ANFIS with only two inputs is utilized. The adaptive network is a multilayer feedforward network in which nodes correspond to learning parameters. The significance of each layer will be introduced for an ANFIS model with n inputs [16,26].
Layer 1 is composed of the input variable membership function, which is selected to fuzzify the input signal. Layer 2 is used to release the regular strength, in which the input signals will be multiplied at the node. Layer 3 is established for normalization, and the fuzzy rule is described as follows: Each node in layer 4 is self-adaptive, and the output is expressed as where ω i is the output of node, and {p i , q i , r i } acts as post-piece parameter set.
Layer 5 denotes a fixed node, indicating the output of signals, which can be defined as a linear combination of the post-piece parameters: where O 5 denotes the prediction data of production by N 2 injection in a fractured-cavity carbonate reservoir.

Fractional Order Differential Simulation Model
Define the sequence X 1 (0) as the decision sequence and the sequence X i (0) as the control sequence of the grey system. The r-order accumulating generation operator of X (0) is called r-AGO, (r ∈ R + ).
Within the continuous form of r-AGO sequences, the whiten equation of the grey system can be established as: The widely used least squares GM (1, n) model is expressed aŝ The response function is in the following: x (r) After the seriesx (r) 1 (k) is obtained, the predicted seriesx (0) (k + 1) will be computed using the r-order inverse accumulating generation operator (r-IAGO), which takes the form of wherex (0) 1 (k + 1) represents the prediction result of increasing oil production by N 2 injection in a fractured-cavity carbonate reservoir.

Calculation of Enhanced Oil Recovery Ratio
The ratio of EOR (η) by N 2 huff-n-puff can be calculated by integral of the deviation between the predicted oil production with and without N 2 huff-n-puff when the effect of production decline is considered. This takes the form of where R 0 is original oil in place; m is the well number;Q i and Q i are predicted values of oil production rate with and without N 2 huff-n-puff, respectively; and t 1 and t 2 are the time for start and end of N 2 injection, respectively.
where a is the decline rate of oil production, and Q i is the initial oil production rate.

Calculation Procedures of FNN-FDS Hybrid Model
According to principles of the adaptive FNN-FDS hybrid model, the structure flowchart is given in Figure 5. The calculation steps are summarized as follows: Step 1: Convert raw training data into matrix form.
Step 2: Apply training data matrix to FNN model and FDS model, and evaluate the prediction accuracy.
Step 3: Evaluate the prediction accuracy of FNN model and FDS model, which is defined as P1 and P2, respectively. If the maximum value of P1 and P2 is lower than P0 where P0 is predefined as the converge criterion, detect the singular value of the raw data; otherwise, repeat the calculation of the FNN-FDS hybrid prediction.
Step 4: If P1 is higher than P2, apply prediction data matrix to FNN model, otherwise apply prediction data matrix to FDS model, and calculate the predicted increasing oil production rate of targeted producers by N 2 huff-n-puff; Step 5: Determine the EOR ratio by N 2 huff-n-puff in fractured-cavity carbonate reservoir and evaluate the oil incremental effect.

Results and Discussion
In this section, adaptive prediction of enhanced oil recovery by N 2 huff-n-puff in a fractured-cavity carbonate reservoir will be performed using the proposed FNN-FDS hybrid model. The performance appraisal of the predicted results and analysis will also be given.

Raw Data
The factors greatly affecting the degree of increased oil production by N 2 huff-n-puff in a fractured-cavity carbonate reservoir mainly include geological characteristics of reservoir body and various operation parameters of N 2 huff-n-puff. The most important geological characteristics consist of porosity, permeability, and well depth. The main operation parameters include cumulative gas injection, gas storage rate, and cycle of gas injection. There is good evidence that permeability strongly correlates with porosity in a typical fractured-cavity reservoir [39,40], thus permeability is enough to describe the effect of reservoir properties on increasing oil production by N 2 huff-n-puff. Cumulative gas storage can serve as an indicator to the amount of injected gas and gas storage rate. N 2 huff-n-puff is typically used to improve oil recovery of fractured-cavity carbonate reservoirs when water injection becomes invalid, thus cumulative water storage can greatly influence increasing oil production by this method. In this study, the principal component analysis [39,41] is applied to reduce the dimensionality of controlling parameters and to alleviate the dependency of different influential factors. Cumulative gas storage, cumulative water storage, permeability, and total well depth are selected as the main controlling factors of N 2 huff-n-puff in karst reservoirs, which easily originate from production history. Production data for all 22 producing wells were collected in a typical fractured-cavity carbonate reservoir. Table 1 displays the original data of the four controlling factors, in which 17 sets of data were utilized to train the FNN and FDS models and the other five sets of data were selected to validate the accuracy of the proposed FNN-FDS hybrid model for adaptive prediction of EOR performance by N 2 huff-n-puff. Table 1. Raw data of the four controlling factors to N 2 huff-n-puff. LG01 6231  186  7361  11000  6800  LG02  2281  150  526  5000  6200  LG03  4062  100  2995  8000  6500  LG04  5033  120  2763  9500  6600  LG05  2556  200  1474  5500  6200  LG06  2437  80  740  5300  6200  LG07  6450  600  800  11000  6800  LG08  2086  1000  658  4800  6100  LG09  3929  200  800  7700  6400  LG10  2817  168  46  6000  6200  LG11  6530  600  800  12000  6800  LG12  3427  400  720  7000  6400  LG13  7340  100  4067  13000  7000  LG14  2218  100  636  5000  6200  LG15  2215  600  918  5000  6200  LG16  4725  150  3905  8500  6500  LG17  1986  260  3578  4500  6100  LG18  1045  200  2403  3100  6000  LG19  2935  180  942  6100  6300  LG20  1447  180  1907  3700  6000  LG21  3138  200  605  6500  6300  LG22  4825  100  3968 9000 6600

Model Appraisal
The root-mean-square error [42] (RMSE) and mean absolute percentage error [43] (MAPE) are utilized in this study for performance appraisal of the FNN-FDS hybrid model. RMSE is one of the most commonly used indicators to validate the accuracy of the predicted data, which takes the form of MAPE is used to evaluate the overall accuracy of the predicted values, described as where x i,e is the actual value and x i,p is the predicted value.

Adaptive Prediction and Discussion
Adaptive prediction of EOR performance by N 2 huff-n-puff in a typical fracturedcavity carbonate reservoir using the FNN-FDS hybrid model is given as follows: Step 1: Standardize raw data and determine the initial matrix. X x is the main controlling factor matrix for enhanced oil recovery by N 2 huff-n-puff in a fractured-cavity reservoir; X y is the increased oil production by N 2 huff-n-puff; X is the initial matrix of raw data; X xp and X yp are the initial matrices for training; and X xv and X yv are the initial matrices for performance appraisal, respectively.     Step 2: Adaptive production prediction by N 2 huff-n-puff using the structure flowchart (shown in Figure 3) based on the initial matrix X, X xp , X yp , X xv , X yv .
Step 3: Obtain the predicted results of increasing oil production by N 2 huff-n-puff with the proposed FNN-FDS hybrid model. Figure 6 compares the predicted and raw data of increasing annual oil production by N 2 huff-n-puff. Figure 7 displays the absolute percentage error of predicted annual oil production.  Step 4: Calculate the predicted value of enhanced oil recovery by N 2 huff-n-puff in a typical fractured-cavity carbonate reservoir. According to the raw data of oilfield production, the annual output decline rate equals 15%. The geological reserve of the oilfield is 2 × 10 7 m 3 . The duration time of N 2 huff-n-puff is one year. Table 2 displays the annual oil production of the 22 producers predicted by taking the production decline rate of 15% into consideration. The ratio of enhanced oil recovery (η) by N 2 huff-n-puff is ultimately computed. The predicted value ofη is 0.1173%. Table 2. Predicted annual oil production for the 22 producers with decline rate of 15%.

Well No. Annual Production (m 3 ) Well No. Annual Production (m 3 )
LG01 5121 LG12 2637  LG02  2031  LG13  6824  LG03  3526  LG14  1865  LG04  4542  LG15  1754  LG05  2019  LG16  3951  LG06  2028  LG17  1468  LG07  5965  LG18  896  LG08  1506  LG19  2087  LG09  3017  LG20  1065  LG10  2027  LG21  2614  LG11  5684 LG22 3687 When raw data are used for training, the RMSE and MAPE for the FNN-FDS hybrid model were found to be 144.33 and 2.67, respectively. When raw data are used for prediction, the RMSE and MAPE for the FNN-FDS hybrid model were found to be 107.40 and 4.78, respectively. It can be seen from the results of RMSE and MAPE that the prediction ability of the proposed FNN-FDS hybrid model is satisfactory, showing that the predicted EOR ratio by N 2 huff-n-puff in a fractured-cavity reservoir is credible.

Conclusions
Fuzzy neural network (FNN)-fractional differential simulation (FDS) hybrid model is proposed to make an adaptive prediction of enhanced oil recovery (EOR) performance by N 2 huff-n-puff in naturally fractured-cavity carbonate reservoirs.
The performance appraisal of N 2 huff-n-puff in a typical carbonate reservoir shows that the prediction ability of the FNN-FDS hybrid model is satisfactory, indicating that the proposed model is efficient for EOR prediction by N 2 huff-n-puff.
The proposed model can guide optimal design of development scheme when using N 2 huff-n-puff to tap more remaining oil in similar carbonate reservoirs.