# Well Control Optimization of Waterflooding Oilfield Based on Deep Neural Network

Authors: Lihui Tang; Junjian Li; Wenming Lu; Peiqing Lian; Hao Wang; Hanqiao Jiang; Fulong Wang; Hongge Jia
Journal: Geofluids
 (2021)

---

## Abstract

A well control optimization method is a key technology to adjust the flow direction of waterflooding and improve the effect of oilfield development. The existing well control optimization method is mainly based on optimization algorithms and numerical simulators. In the face of larger models, longer optimization periods, or reservoir models with a large number of optimized wells, there are many optimization variables, which will cause algorithm convergence difficulties and optimization costs. The application effect is not good because of the problems of time length, few comparison schemes, and only fixed control frequency. This paper proposes a new method of a well control optimization method based on a multi-input deep neural network. This method takes the production history data of the reservoir as the main input and the saturation field as the auxiliary input and establishes a multi-input deep neural network for learning, forming a production dynamic prediction model instead of conventional numerical simulators. Based on the production dynamic prediction model, a series of model generation, production prediction, comparison, and optimization are carried out to find the best production plan of the reservoir. The calculation results of the examples show that (1) compared with the single-input production dynamic prediction model, the production dynamic prediction model based on multiple inputs has better prediction accuracy, and the results are close to the calculation results of the conventional numerical simulator; (2) the well control optimization method based on the multiple-input deep neural network has a fast optimization speed, with many comparison schemes and good optimization effect.


---

## Body

## 1. Introduction

As the development of waterflooding oilfields progresses, due to the influence of reservoir heterogeneity, the directionality of waterflooding increases and the difference in plane production increases, which gradually weakens the effect of water control and oil increase, forming a large area of remaining oil retention. Through the optimization of the production system, the flow direction of waterflooding can be adjusted to increase the potential of remaining oil and promote the effect of reservoir development. And for the oilfield site, it is often not feasible to adopt a constant oilfield production strategy, because it requires unrealistic bottom hole pressure, which requires us to set up a set of changeable production dynamic programs [1].Over the past decades, a large number of experts and scholars have conducted research on this, which can be summarized into three categories: (1) Based on the reservoir engineering formula method. This method combines the material balance and trend fitting method to establish the production dynamic prediction formula, then calculates the production dynamics of different injection-production schemes, obtains the objective function value (such as net present value and cumulative oil production), and then compares and selects the best [2–4]. But because reservoir development is affected by multiple factors, and this method has ideal assumptions, it leads to problems such as poor accuracy of results and narrow method adaptability. (2) Based on reservoir numerical simulation methods: this method first establishes a numerical simulation model based on the reservoir and fluid data provided by the oilfield, then uses the orthogonal experimental design method to set up multiple sets of different injection and production plans, and finally compares and selects the best based on parameters such as net present value [5–9]. However, in order to consider the impact of reservoir heterogeneity, the grids are often finely divided. If multiple numerical simulation programs are run, it will consume a lot of time and manpower. In the process of comparing experimental schemes, the value range of factors is limited, only a few or dozens of schemes can be compared, and it is difficult to obtain the real optimal injection-production scheme. At the same time, the current method is basically static optimization, and the result of dynamic optimization cannot be obtained. (3) Method based on optimization theory: this method applies optimization theory to find the best plan, uses reservoir numerical simulation to predict the production performance of the plan, then calculates the value of the objective function, and finally obtains the best injection-production plan [10–18]. This method can realize dynamic optimization and can compare more sets of injection-production schemes. Scholars can also achieve multiobjective optimization based on this method and achieve more rational decision-making [19, 20]. However, this method relies on numerical simulation calculation, which also has the problem of time-consuming. And as the number of wells increases and the frequency of regulation increases, the number of optimization variables will greatly increase, which is likely to cause dimensionality disasters. This type of method is more often used for well pattern optimization [21, 22]. At present, this method is still difficult to solve the problem of obtaining the optimal control frequency.In recent years, deep learning has provided new ideas and methods for oilfield development. Many scholars use long- and short-term memory (LSTM) to predict production dynamics, pressure, and other time series data [23–29]. Based on the existing problems of the existing well control optimization methods and the inspiration of deep learning, this article establishes a new method of production dynamic prediction based on deep neural networks. This method has a faster optimization speed and more comparison schemes and can find the optimal control frequency. This method establishes a production dynamic prediction model based on a multi-input deep neural network instead of conventional numerical simulation software to calculate production dynamics, which greatly reduces the model production dynamic prediction time. Subsequent comparison schemes are randomly generated under the constraints of reservoir engineering, production performance prediction models are used to quickly predict production performance, and then the objective function value of each scheme is calculated to compare and optimize the optimal scheme. In addition, this method takes the control frequency as the optimization parameter, and finally, after a large number of schemes are optimized, the control frequency of the optimal scheme is close to the optimal control frequency.The core of this method is to establish a production dynamic prediction model based on a deep neural network to replace conventional numerical simulators. In establishing the production dynamic prediction model, former scholars found that the use of traditional production prediction methods, such as the water drive curve method, the decline curve method, and Weng’s prediction method, has low prediction accuracy, especially in high water-cut oilfields [30–34]. In order to solve the shortcomings of traditional forecasting methods, intelligent algorithms have also been introduced into oilfield production forecasts. Because the output is a sequential problem, in recent years, scholars have begun to use the long- and short-term memory network LSTM algorithm. However, oilfield production data has a strong phased nature. In oil reservoir engineering, it is divided into a period of rising production, a period of stable production, and a period of declining production, with large fluctuations. Using conventional long- and short-term memory neural networks to predict oilfield production indicators, there will be a problem of poor generalization of the neural network, low prediction accuracy, and even negative values for the predicted output, with large deviations [35], especially when the sample size is small; this phenomenon is more prominent [36–38]. In view of the poor generalization of the LSTM neural network, scholars reduce the error by optimizing the neural network architecture. Mao [39] proposed a long text sentiment analysis method based on the attention double-layer LSTM; Peng et al. [40] used double LSTM layers to adjust the parameters to improve the accuracy of sentence generation. Because the volume of data that can be obtained for reservoir development is limited, it is necessary to introduce reservoir engineering constraint input to obtain higher prediction accuracy with a smaller volume of data. Based on the above two considerations, this article will propose a deep neural network structure based on multiple inputs to optimize the LSTM neural network, so that reservoir production predictions can be taken into account in oilfield development and improve the reliability and accuracy of the simulator.This article will first introduce the core issue of the method, namely, the establishment of a production dynamic prediction model based on multi-input deep neural networks; secondly, this article will introduce how to optimize production dynamics based on the production dynamic prediction model; thirdly, this article will apply the well control optimization method to optimize the actual reservoir and conducts related discussions and finally draws a conclusion.


## 2. Neural Network Structure of Production Dynamic Prediction Model

Production dynamic prediction is a time series prediction problem, and a long- and short-term memory neural network [41] (long- and short-term memory, LSTM) has excellent accuracy in time series prediction problems and has been widely used in speech recognition [42], network flow prediction [43], predrilling log curve prediction [44], and other fields. However, due to the staged characteristics of oilfield production, there will be a problem of poor generalization of neural networks. This article will optimize the neural network structure and propose a multi-input neural network structure suitable for oilfield production data prediction. The multi-input neural network structure is based on production dynamic data and saturation field data, so that the trained simulator can have a good prediction effect on the phased production characteristics of the oilfield, thereby improving the prediction accuracy of the production dynamic prediction model.Because the production dynamic data is time series data, in deep learning, the most suitable deep neural network algorithm is the recurrent neural network algorithm (RNN), but the RNN has the problem of disappearing gradient. The long- and short-term memory network (LSTM) solves the problem of RNN gradient disappearance and realizes long-term memory ability by improving the hidden layer unit structure of the recurrent neural network. After continuous testing by predecessors, it is proved that it has higher prediction accuracy than the RNN and is widely used. Therefore, the key algorithm used in the deep neural network established in this article is the LSTM algorithm.


### 2.1. From RNN to LSTM

#### 2.1.1. Recurrent Neural Network

The recurrent neural network (RNN) can transfer the state information of the last time to the current time, that is, the state of the current time is the result of the joint action of the input of the current time and the information of the last time. It has outstanding performance in the field of natural language processing and is widely used in machine translation and text recognition. Its network structure is shown in Figure1.Figure 1
Schematic diagram of the recurrent neural network.Assuming that the input time series data isX=x0,x1,x2,⋯,xt,⋯,xn, and the output time series data is O=o0,o1,o2,⋯,ot,⋯,on, then the RNN calculation process is
(1)st=fUxt+Wst−1+b,ot=softmaxVst.Among them,s is the value of the hidden layer; U is the weight matrix of the input layer; o is the value of the output layer; V is the weight matrix of the hidden layer to the output layer; W is the previous value of the hidden layer as the weight matrix of this input; f is generally a nonlinear activation function; b is a bias vector.However, this method has the problem that the gradient disappears, that is, the state at timet−3 has no significant effect on the state at time t, which is equivalent to the network ignoring the state before time t−3 during training. So Hochreiter and Schmidhuber proposed the LSTM network [41], and Hochreiter subsequently demonstrated the ability of LSTM to avoid a vanishing gradient problem [45]. It has become one of the most popular algorithms in recurrent neural networks.


#### 2.1.2. Long- and Short-Term Memory Network (LSTM)

The most important difference between LSTM and RNN is the hidden layer structure. The long-term memory ability is obtained by replacing the RNN as a unit with the LSTM as a unit. The LSTM hidden layer neural unit is shown in Figure2.Figure 2
LSTM hidden layer neural unit.LSTM deletes or adds information through the gate structure, realizes the forgetting and memory functions of the neural unit, establishes long-term dependence between time series data, and realizes the transmission of information in different time spans. An LSTM hidden layer unit has three gate structures, namely, the forget gate, input gate, and output gate. The LSTM calculation process is as follows:(2)ft=σWf⋅ht−1,xt+bf,it=σWi⋅ht−1,xt+bfi,C~t=tanhWC⋅ht−1,xt+bC,Ct=ft∗Ct−1+it∗C~t,ot=σWo⋅ht−1,xt+bo,ht=ot∗tanhCt.Among them,σ is an activation function, generally a sigmoid function; Wf and bf are the connection weight matrix and bias vector of the forgetting gate, respectively; Wi and bi are the connection weight matrix and offset vector of the input data and input gate; WC and bC are the connection weight matrix and offset vector of the input data and the state of the temporary unit; Wo and bo are the connection weight matrix and offset vector of the output gate; ht−1 is the hidden layer value at the previous time; xt is the current time input value; ft is the value of the forget gate; it is the value of the memory gate; tanh is the activation function; Ct is the unit state at the current time; Ct−1 is the unit state at the previous time; C~t is the temporary unit state; ot is the output gate value.


### 2.2. Optimized Multi-Input Deep Neural Network Structure

This paper establishes a multi-input deep neural network structure to replace the conventional single-input deep neural network structure. Combining with the characteristics of oilfield production, the main input of the multi-input deep neural network is set to the production history data of each well at each time, and the auxiliary input is the oil saturation field at each time, so that the optimized network model can predict more accurately. The established multi-input production dynamic prediction model can predict the production dynamic results of oilfields with large fluctuations and stage characteristics. The neural network link method is to first combine the main input and the LSTM algorithm to obtain hidden layer 1, then combine the auxiliary input and the fully connected layer to obtain hidden layer 2, and then combine the two hidden layers into a new hidden layer. Afterwards, the final output is obtained through multiple fully connected layers and random inactivation layers. The structure of a multi-input deep neural network is shown in Figure3.Figure 3
Schematic diagram of the deep neural network structure.The important reasons why the neural network selects the oil saturation field as the auxiliary input are as follows: (1) the oil saturation field is a comprehensive performance of the current production situation of the reservoir and has the most direct correlation with the phased fluctuation characteristics of reservoir production. Therefore, the selection of the oil saturation field for auxiliary input can help solve the problem that the neural network cannot predict the phased fluctuation characteristics of the oilfield production dynamics; (2) another important reason is that the oil saturation field is the same as the historical production data. The same time series data, after neural network training, can learn the correlation between oil saturation field and production dynamics at each moment, while other attribute fields, such as porosity and permeability, are fixed values. If it is used as an auxiliary input, the neural network cannot learn the correlation between the dynamic production data and the different production stages of the oilfield but affects the accuracy.The neural network sets up multiple dropout layers to avoid the problem of reduced generalization ability caused by overfitting. This method was proposed by Srivastava et al. [46]. Its core idea is that in the training process of a neural network, the network updates some nodes according to Bernoulli probability, and some nodes are randomly discarded without updating.


## 2.1. From RNN to LSTM

### 2.1.1. Recurrent Neural Network

The recurrent neural network (RNN) can transfer the state information of the last time to the current time, that is, the state of the current time is the result of the joint action of the input of the current time and the information of the last time. It has outstanding performance in the field of natural language processing and is widely used in machine translation and text recognition. Its network structure is shown in Figure1.Figure 1
Schematic diagram of the recurrent neural network.Assuming that the input time series data isX=x0,x1,x2,⋯,xt,⋯,xn, and the output time series data is O=o0,o1,o2,⋯,ot,⋯,on, then the RNN calculation process is
(1)st=fUxt+Wst−1+b,ot=softmaxVst.Among them,s is the value of the hidden layer; U is the weight matrix of the input layer; o is the value of the output layer; V is the weight matrix of the hidden layer to the output layer; W is the previous value of the hidden layer as the weight matrix of this input; f is generally a nonlinear activation function; b is a bias vector.However, this method has the problem that the gradient disappears, that is, the state at timet−3 has no significant effect on the state at time t, which is equivalent to the network ignoring the state before time t−3 during training. So Hochreiter and Schmidhuber proposed the LSTM network [41], and Hochreiter subsequently demonstrated the ability of LSTM to avoid a vanishing gradient problem [45]. It has become one of the most popular algorithms in recurrent neural networks.


### 2.1.2. Long- and Short-Term Memory Network (LSTM)

The most important difference between LSTM and RNN is the hidden layer structure. The long-term memory ability is obtained by replacing the RNN as a unit with the LSTM as a unit. The LSTM hidden layer neural unit is shown in Figure2.Figure 2
LSTM hidden layer neural unit.LSTM deletes or adds information through the gate structure, realizes the forgetting and memory functions of the neural unit, establishes long-term dependence between time series data, and realizes the transmission of information in different time spans. An LSTM hidden layer unit has three gate structures, namely, the forget gate, input gate, and output gate. The LSTM calculation process is as follows:(2)ft=σWf⋅ht−1,xt+bf,it=σWi⋅ht−1,xt+bfi,C~t=tanhWC⋅ht−1,xt+bC,Ct=ft∗Ct−1+it∗C~t,ot=σWo⋅ht−1,xt+bo,ht=ot∗tanhCt.Among them,σ is an activation function, generally a sigmoid function; Wf and bf are the connection weight matrix and bias vector of the forgetting gate, respectively; Wi and bi are the connection weight matrix and offset vector of the input data and input gate; WC and bC are the connection weight matrix and offset vector of the input data and the state of the temporary unit; Wo and bo are the connection weight matrix and offset vector of the output gate; ht−1 is the hidden layer value at the previous time; xt is the current time input value; ft is the value of the forget gate; it is the value of the memory gate; tanh is the activation function; Ct is the unit state at the current time; Ct−1 is the unit state at the previous time; C~t is the temporary unit state; ot is the output gate value.


## 2.1.1. Recurrent Neural Network

The recurrent neural network (RNN) can transfer the state information of the last time to the current time, that is, the state of the current time is the result of the joint action of the input of the current time and the information of the last time. It has outstanding performance in the field of natural language processing and is widely used in machine translation and text recognition. Its network structure is shown in Figure1.Figure 1
Schematic diagram of the recurrent neural network.Assuming that the input time series data isX=x0,x1,x2,⋯,xt,⋯,xn, and the output time series data is O=o0,o1,o2,⋯,ot,⋯,on, then the RNN calculation process is
(1)st=fUxt+Wst−1+b,ot=softmaxVst.Among them,s is the value of the hidden layer; U is the weight matrix of the input layer; o is the value of the output layer; V is the weight matrix of the hidden layer to the output layer; W is the previous value of the hidden layer as the weight matrix of this input; f is generally a nonlinear activation function; b is a bias vector.However, this method has the problem that the gradient disappears, that is, the state at timet−3 has no significant effect on the state at time t, which is equivalent to the network ignoring the state before time t−3 during training. So Hochreiter and Schmidhuber proposed the LSTM network [41], and Hochreiter subsequently demonstrated the ability of LSTM to avoid a vanishing gradient problem [45]. It has become one of the most popular algorithms in recurrent neural networks.


## 2.1.2. Long- and Short-Term Memory Network (LSTM)

The most important difference between LSTM and RNN is the hidden layer structure. The long-term memory ability is obtained by replacing the RNN as a unit with the LSTM as a unit. The LSTM hidden layer neural unit is shown in Figure2.Figure 2
LSTM hidden layer neural unit.LSTM deletes or adds information through the gate structure, realizes the forgetting and memory functions of the neural unit, establishes long-term dependence between time series data, and realizes the transmission of information in different time spans. An LSTM hidden layer unit has three gate structures, namely, the forget gate, input gate, and output gate. The LSTM calculation process is as follows:(2)ft=σWf⋅ht−1,xt+bf,it=σWi⋅ht−1,xt+bfi,C~t=tanhWC⋅ht−1,xt+bC,Ct=ft∗Ct−1+it∗C~t,ot=σWo⋅ht−1,xt+bo,ht=ot∗tanhCt.Among them,σ is an activation function, generally a sigmoid function; Wf and bf are the connection weight matrix and bias vector of the forgetting gate, respectively; Wi and bi are the connection weight matrix and offset vector of the input data and input gate; WC and bC are the connection weight matrix and offset vector of the input data and the state of the temporary unit; Wo and bo are the connection weight matrix and offset vector of the output gate; ht−1 is the hidden layer value at the previous time; xt is the current time input value; ft is the value of the forget gate; it is the value of the memory gate; tanh is the activation function; Ct is the unit state at the current time; Ct−1 is the unit state at the previous time; C~t is the temporary unit state; ot is the output gate value.


## 2.2. Optimized Multi-Input Deep Neural Network Structure

This paper establishes a multi-input deep neural network structure to replace the conventional single-input deep neural network structure. Combining with the characteristics of oilfield production, the main input of the multi-input deep neural network is set to the production history data of each well at each time, and the auxiliary input is the oil saturation field at each time, so that the optimized network model can predict more accurately. The established multi-input production dynamic prediction model can predict the production dynamic results of oilfields with large fluctuations and stage characteristics. The neural network link method is to first combine the main input and the LSTM algorithm to obtain hidden layer 1, then combine the auxiliary input and the fully connected layer to obtain hidden layer 2, and then combine the two hidden layers into a new hidden layer. Afterwards, the final output is obtained through multiple fully connected layers and random inactivation layers. The structure of a multi-input deep neural network is shown in Figure3.Figure 3
Schematic diagram of the deep neural network structure.The important reasons why the neural network selects the oil saturation field as the auxiliary input are as follows: (1) the oil saturation field is a comprehensive performance of the current production situation of the reservoir and has the most direct correlation with the phased fluctuation characteristics of reservoir production. Therefore, the selection of the oil saturation field for auxiliary input can help solve the problem that the neural network cannot predict the phased fluctuation characteristics of the oilfield production dynamics; (2) another important reason is that the oil saturation field is the same as the historical production data. The same time series data, after neural network training, can learn the correlation between oil saturation field and production dynamics at each moment, while other attribute fields, such as porosity and permeability, are fixed values. If it is used as an auxiliary input, the neural network cannot learn the correlation between the dynamic production data and the different production stages of the oilfield but affects the accuracy.The neural network sets up multiple dropout layers to avoid the problem of reduced generalization ability caused by overfitting. This method was proposed by Srivastava et al. [46]. Its core idea is that in the training process of a neural network, the network updates some nodes according to Bernoulli probability, and some nodes are randomly discarded without updating.


## 3. Production Dynamic Optimization Method

The principle of the well control optimization methods is as follows: read production dynamic data and oil saturation field data from the numerical simulation model, form training and test data sets through data processing, and use these data to establish a production dynamic prediction model based on a multi-input deep neural network. Then, randomly generate injection-production schemes with different injection-production parameters, apply the production dynamic prediction model to predict the production dynamics of each scheme, calculate the objective function value, and select the scheme corresponding to the largest objective function as the optimal scheme. The flow chart is shown in Figure4.Figure 4
Flow chart of the production dynamic optimization model.


### 3.1. Numerical Model Establishment and Data Collection

First, establish a numerical simulation based on the geological data and fluid data of the reservoir, and then read the production history data and oil saturation field data at each moment in the model. The model assumes that there areN wells, producing T days. Then, the production dynamics as the main input and the saturation field data of the auxiliary input are as follows:
(1)
Production dynamic data: assuming that it is set on dayt, and qt consists of water injection volume of all water injection wells, oil production volume, and liquid production volume of all production wells, the data table of the production dynamics as the main input is Q=q0,q1,⋯qt⋯,qn−1. The production dynamics of all wells are synthesized into a data matrix as input at one time, and the neural network structure learning can map the interwell connection and production relations of multiple wells, which is closer to the actual production of the reservoir(2)
Saturation field data: the saturation data of the5×5 grid set around the ith well on the tth day form a vector st,i in the order shown in Figure 5Figure 5
Schematic diagram of sampling points of saturation field data.Then, the saturation vector composed of all wells on dayi is St=st,1,st,2,⋯,st,N, and the production dynamic data table as auxiliary input is S=S0,S1,⋯,ST−1.


### 3.2. Data Preprocessing

#### 3.2.1. Data Cleaning

During the production dynamic data recording process, due to well closure or human error recording, there will be some large floating points in the production dynamics. These data and normal production data are in different production conditions and should be eliminated. This time, using the segmented regression interpolation method, the 30-day data point is used as the fitting data to fit a straight line. When the true value is much greater than the fitting value, it is regarded as a noise point and the fitting value is used instead.


#### 3.2.2. Data Standardization

By standardizing the input feature parameters, the problems of nonconvergence of the training process iterations and prediction errors due to the large difference in physical scale between the feature data can be alleviated, and the prediction accuracy is improved. The min-max standardization adopted this time, the original feature values are linearly transformed, and the data value range is transformed between [0, 1]. The standardized min-max formula is as follows:(3)x∗=x−xminxmax−xmin,where xmax is the maximum value of the sample data, xmin is the minimum value of the sample feature data, x is the original feature value before normalization, and x∗ is the feature value after normalization.The production dynamic data and saturation field data are normalized by columns.


#### 3.2.3. Data Dimensionality Reduction

Because the auxiliary input saturation field data takes5×5 data points around each well, the dimension of the data is large. If it is directly used as an input neuron, it will cause dimensional disaster and cause overfitting. Therefore, data dimensionality reduction is required. The author uses the PCA dimension reduction method to reduce the dimension n of the original sample to the dimension k (k<n) through a series of matrix transformations, that is, k-dimensional data can be used to represent most of the original n-dimensional information. The regularization method of PCA can effectively reduce the dimensionality and improve the convergence performance of the neural network gradient calculation process [47]. The steps are as follows:Step 1. Standardize the data according to formula (3).Step 2. Calculate the mean of all samples μ=1/n∑i=nnxi; i represents the ith feature.Step 3. Calculate the covariance matrix of the sample data.Step 4. Decompose the covariance matrix to obtain the eigenvector ui and eigenvalue λi.Step 5. Determine the principal components and obtain new sample basis vectors.Step 6. Transform the original data with a new basis vector to obtain new k-dimensional sample data.


#### 3.2.4. Processed into Supervisory Data

The data of dayt and day t+1 of production dynamic data and saturation field data are used as input data X, and the data of day t+2 are used as output data Y, which is organized into a new data table. The purpose is to allow the deep neural network to better learn historical information and make the production dynamic prediction results more accurate.


#### 3.2.5. Data Set Division

This time, 80% of the data is used as the training set to train the deep neural network, and 20% of the data is used as the verification set to verify the accuracy of the production dynamic prediction model.


### 3.3. Establish a Production Dynamic Prediction Model

Due to the small volume of oilfield production history data, it is impossible to use limited data training to obtain a predictive model with excellent performance, and oilfield production dynamics have phased and floating characteristics, and conventional neural network models are not suitable for establishing the production dynamic prediction model.Based on the multi-input deep neural network structure proposed in Section2.2, this paper uses production history data as the main input and oil saturation field data as the auxiliary input to establish a production dynamic prediction model specifically for oilfield production dynamic prediction. The use of the oil saturation field can comprehensively reflect the characteristics of the current oilfield production conditions and constrain the learning of the production history data by the learner, thereby improving the prediction accuracy of the established production dynamic prediction model. Later, the production performance prediction model will be used to replace the conventional reservoir numerical simulator to calculate the future production performance of the randomly generated injection-production plan.


### 3.4. Generation and Prediction of Injection-Production Plan Based on Reservoir Engineering Constraints

In this step, the control frequency is used as a part of the injection-production parameter design, combined with reservoir engineering constraints, to generate different injection-production plans and then use the production dynamic prediction model formed in the previous step to predict the production dynamics and obtain the future production dynamic results of each plan.The parameters to be designed for each plan are as follows: (1) control frequency; (2) water injection volume of each injection well during each regulation; (3) fluid production volume of each production well during each regulation.Assuming that there areN wells and T time periods, the reservoir engineering constraints are as follows:
(1)
Constraint of upper and lower fluid volume of a single well(4)qmin<qi<qmax∀i∈0,1,⋯,T−1.For water injection wells, it needs to meet the following: minimum injection volume of single well < water injection volume of injection well < maximum injection volume of a single well; for production wells, it needs to meet the following: economic limit output of single well < production well output < maximum output of a single well.(2)
Constraint of total reservoir fluid production(5)Ql,min<∑j=1N∑i=0T−1ql,jiΔti<Ql,max,where ql,ji is the fluid production of the jth well in the ith period, and Δti is the ith period. The total fluid production needs to be greater than the minimum total fluid production and less than the maximum total fluid production.(3)
Constraint of total reservoir injection volume(6)∑j=1N∑i=0T−1qw,jiΔti=Qconst,where qw,ji is the water production of the jth well in the ith period, and the total water production needs to meet a fixed value.(4)
Injection-production balance(7)∑j=1N∑i=0T−1ql,jiΔti=∑j=1N∑i=0T−1qw,jiΔti.The total fluid production is equal to the total water injection. This option is optional and depends on the specific reservoir conditions.The injection-production plan generated according to the above content is close to the actual production, and as the number of comparison plans increases, the control frequency of the optimal plan is close to the real optimal control frequency.


### 3.5. Comparison of Injection-Production Schemes Based on Objective Function

After using the production dynamic prediction model to predict the future production dynamics of the comparison scheme, the objective function value of each scheme can be calculated. The objective function value is used as the optimization criterion, and the scheme corresponding to the maximum objective function value is selected as the final optimization scheme.From the perspective of reservoir management, oilfield development seeks to maximize production and maximize profits during the investment period. This paper takes the economic net present value (NPV) of oilfield development as the objective function. The larger the net present value, the better the injection-production plan and the better the investment benefit. The formula is as follows:(8)NPV=∑i=1np0Qto+pgQtg−pwpQtw·p+pwiQtw·i1+rt−∑i=1NCdrillHi+Cc,where NPV is the net present value, $; r is the discount rate, decimal; n is the total production time, d; N is the total number of wells; Cdrill is the average drilling cost per unit length, $/m; Hi is the well depth of the ith well, m; Cc is the completion cost, $/per port; p0 is the crude oil sales price, $/t; pg is the natural gas sales price, $/m3; Qto is the crude oil sales volume on day t, t; Qtg is the total sales volume of natural gas on day t, m3; pwp is the unit cost of water extraction, $/t; pwi is the unit water injection cost, $/t; Qtw⋅p is the amount of water produced on day t, t; Qtw⋅i is the amount of water injected on day t, t.With the net present value (NPV) as the objective function, according to the historical production dynamic data and the predicted production dynamic data, the net present value of the generated injection-production plan at the end of the forecast period is calculated. Select the injection-production plan corresponding to the largest net present value as the optimal plan. The schematic diagram of the scheme optimization process is shown in Figure6.Figure 6
Scheme optimization flow chart.


## 3.1. Numerical Model Establishment and Data Collection

First, establish a numerical simulation based on the geological data and fluid data of the reservoir, and then read the production history data and oil saturation field data at each moment in the model. The model assumes that there areN wells, producing T days. Then, the production dynamics as the main input and the saturation field data of the auxiliary input are as follows:
(1)
Production dynamic data: assuming that it is set on dayt, and qt consists of water injection volume of all water injection wells, oil production volume, and liquid production volume of all production wells, the data table of the production dynamics as the main input is Q=q0,q1,⋯qt⋯,qn−1. The production dynamics of all wells are synthesized into a data matrix as input at one time, and the neural network structure learning can map the interwell connection and production relations of multiple wells, which is closer to the actual production of the reservoir(2)
Saturation field data: the saturation data of the5×5 grid set around the ith well on the tth day form a vector st,i in the order shown in Figure 5Figure 5
Schematic diagram of sampling points of saturation field data.Then, the saturation vector composed of all wells on dayi is St=st,1,st,2,⋯,st,N, and the production dynamic data table as auxiliary input is S=S0,S1,⋯,ST−1.


## 3.2. Data Preprocessing

### 3.2.1. Data Cleaning

During the production dynamic data recording process, due to well closure or human error recording, there will be some large floating points in the production dynamics. These data and normal production data are in different production conditions and should be eliminated. This time, using the segmented regression interpolation method, the 30-day data point is used as the fitting data to fit a straight line. When the true value is much greater than the fitting value, it is regarded as a noise point and the fitting value is used instead.


### 3.2.2. Data Standardization

By standardizing the input feature parameters, the problems of nonconvergence of the training process iterations and prediction errors due to the large difference in physical scale between the feature data can be alleviated, and the prediction accuracy is improved. The min-max standardization adopted this time, the original feature values are linearly transformed, and the data value range is transformed between [0, 1]. The standardized min-max formula is as follows:(3)x∗=x−xminxmax−xmin,where xmax is the maximum value of the sample data, xmin is the minimum value of the sample feature data, x is the original feature value before normalization, and x∗ is the feature value after normalization.The production dynamic data and saturation field data are normalized by columns.


### 3.2.3. Data Dimensionality Reduction

Because the auxiliary input saturation field data takes5×5 data points around each well, the dimension of the data is large. If it is directly used as an input neuron, it will cause dimensional disaster and cause overfitting. Therefore, data dimensionality reduction is required. The author uses the PCA dimension reduction method to reduce the dimension n of the original sample to the dimension k (k<n) through a series of matrix transformations, that is, k-dimensional data can be used to represent most of the original n-dimensional information. The regularization method of PCA can effectively reduce the dimensionality and improve the convergence performance of the neural network gradient calculation process [47]. The steps are as follows:Step 1. Standardize the data according to formula (3).Step 2. Calculate the mean of all samples μ=1/n∑i=nnxi; i represents the ith feature.Step 3. Calculate the covariance matrix of the sample data.Step 4. Decompose the covariance matrix to obtain the eigenvector ui and eigenvalue λi.Step 5. Determine the principal components and obtain new sample basis vectors.Step 6. Transform the original data with a new basis vector to obtain new k-dimensional sample data.


### 3.2.4. Processed into Supervisory Data

The data of dayt and day t+1 of production dynamic data and saturation field data are used as input data X, and the data of day t+2 are used as output data Y, which is organized into a new data table. The purpose is to allow the deep neural network to better learn historical information and make the production dynamic prediction results more accurate.


### 3.2.5. Data Set Division

This time, 80% of the data is used as the training set to train the deep neural network, and 20% of the data is used as the verification set to verify the accuracy of the production dynamic prediction model.


## 3.2.1. Data Cleaning

During the production dynamic data recording process, due to well closure or human error recording, there will be some large floating points in the production dynamics. These data and normal production data are in different production conditions and should be eliminated. This time, using the segmented regression interpolation method, the 30-day data point is used as the fitting data to fit a straight line. When the true value is much greater than the fitting value, it is regarded as a noise point and the fitting value is used instead.


## 3.2.2. Data Standardization

By standardizing the input feature parameters, the problems of nonconvergence of the training process iterations and prediction errors due to the large difference in physical scale between the feature data can be alleviated, and the prediction accuracy is improved. The min-max standardization adopted this time, the original feature values are linearly transformed, and the data value range is transformed between [0, 1]. The standardized min-max formula is as follows:(3)x∗=x−xminxmax−xmin,where xmax is the maximum value of the sample data, xmin is the minimum value of the sample feature data, x is the original feature value before normalization, and x∗ is the feature value after normalization.The production dynamic data and saturation field data are normalized by columns.


## 3.2.3. Data Dimensionality Reduction

Because the auxiliary input saturation field data takes5×5 data points around each well, the dimension of the data is large. If it is directly used as an input neuron, it will cause dimensional disaster and cause overfitting. Therefore, data dimensionality reduction is required. The author uses the PCA dimension reduction method to reduce the dimension n of the original sample to the dimension k (k<n) through a series of matrix transformations, that is, k-dimensional data can be used to represent most of the original n-dimensional information. The regularization method of PCA can effectively reduce the dimensionality and improve the convergence performance of the neural network gradient calculation process [47]. The steps are as follows:Step 1. Standardize the data according to formula (3).Step 2. Calculate the mean of all samples μ=1/n∑i=nnxi; i represents the ith feature.Step 3. Calculate the covariance matrix of the sample data.Step 4. Decompose the covariance matrix to obtain the eigenvector ui and eigenvalue λi.Step 5. Determine the principal components and obtain new sample basis vectors.Step 6. Transform the original data with a new basis vector to obtain new k-dimensional sample data.


## 3.2.4. Processed into Supervisory Data

The data of dayt and day t+1 of production dynamic data and saturation field data are used as input data X, and the data of day t+2 are used as output data Y, which is organized into a new data table. The purpose is to allow the deep neural network to better learn historical information and make the production dynamic prediction results more accurate.


## 3.2.5. Data Set Division

This time, 80% of the data is used as the training set to train the deep neural network, and 20% of the data is used as the verification set to verify the accuracy of the production dynamic prediction model.


## 3.3. Establish a Production Dynamic Prediction Model

Due to the small volume of oilfield production history data, it is impossible to use limited data training to obtain a predictive model with excellent performance, and oilfield production dynamics have phased and floating characteristics, and conventional neural network models are not suitable for establishing the production dynamic prediction model.Based on the multi-input deep neural network structure proposed in Section2.2, this paper uses production history data as the main input and oil saturation field data as the auxiliary input to establish a production dynamic prediction model specifically for oilfield production dynamic prediction. The use of the oil saturation field can comprehensively reflect the characteristics of the current oilfield production conditions and constrain the learning of the production history data by the learner, thereby improving the prediction accuracy of the established production dynamic prediction model. Later, the production performance prediction model will be used to replace the conventional reservoir numerical simulator to calculate the future production performance of the randomly generated injection-production plan.


## 3.4. Generation and Prediction of Injection-Production Plan Based on Reservoir Engineering Constraints

In this step, the control frequency is used as a part of the injection-production parameter design, combined with reservoir engineering constraints, to generate different injection-production plans and then use the production dynamic prediction model formed in the previous step to predict the production dynamics and obtain the future production dynamic results of each plan.The parameters to be designed for each plan are as follows: (1) control frequency; (2) water injection volume of each injection well during each regulation; (3) fluid production volume of each production well during each regulation.Assuming that there areN wells and T time periods, the reservoir engineering constraints are as follows:
(1)
Constraint of upper and lower fluid volume of a single well(4)qmin<qi<qmax∀i∈0,1,⋯,T−1.For water injection wells, it needs to meet the following: minimum injection volume of single well < water injection volume of injection well < maximum injection volume of a single well; for production wells, it needs to meet the following: economic limit output of single well < production well output < maximum output of a single well.(2)
Constraint of total reservoir fluid production(5)Ql,min<∑j=1N∑i=0T−1ql,jiΔti<Ql,max,where ql,ji is the fluid production of the jth well in the ith period, and Δti is the ith period. The total fluid production needs to be greater than the minimum total fluid production and less than the maximum total fluid production.(3)
Constraint of total reservoir injection volume(6)∑j=1N∑i=0T−1qw,jiΔti=Qconst,where qw,ji is the water production of the jth well in the ith period, and the total water production needs to meet a fixed value.(4)
Injection-production balance(7)∑j=1N∑i=0T−1ql,jiΔti=∑j=1N∑i=0T−1qw,jiΔti.The total fluid production is equal to the total water injection. This option is optional and depends on the specific reservoir conditions.The injection-production plan generated according to the above content is close to the actual production, and as the number of comparison plans increases, the control frequency of the optimal plan is close to the real optimal control frequency.


## 3.5. Comparison of Injection-Production Schemes Based on Objective Function

After using the production dynamic prediction model to predict the future production dynamics of the comparison scheme, the objective function value of each scheme can be calculated. The objective function value is used as the optimization criterion, and the scheme corresponding to the maximum objective function value is selected as the final optimization scheme.From the perspective of reservoir management, oilfield development seeks to maximize production and maximize profits during the investment period. This paper takes the economic net present value (NPV) of oilfield development as the objective function. The larger the net present value, the better the injection-production plan and the better the investment benefit. The formula is as follows:(8)NPV=∑i=1np0Qto+pgQtg−pwpQtw·p+pwiQtw·i1+rt−∑i=1NCdrillHi+Cc,where NPV is the net present value, $; r is the discount rate, decimal; n is the total production time, d; N is the total number of wells; Cdrill is the average drilling cost per unit length, $/m; Hi is the well depth of the ith well, m; Cc is the completion cost, $/per port; p0 is the crude oil sales price, $/t; pg is the natural gas sales price, $/m3; Qto is the crude oil sales volume on day t, t; Qtg is the total sales volume of natural gas on day t, m3; pwp is the unit cost of water extraction, $/t; pwi is the unit water injection cost, $/t; Qtw⋅p is the amount of water produced on day t, t; Qtw⋅i is the amount of water injected on day t, t.With the net present value (NPV) as the objective function, according to the historical production dynamic data and the predicted production dynamic data, the net present value of the generated injection-production plan at the end of the forecast period is calculated. Select the injection-production plan corresponding to the largest net present value as the optimal plan. The schematic diagram of the scheme optimization process is shown in Figure6.Figure 6
Scheme optimization flow chart.


## 4. Example Application

### 4.1. Model Introduction

The actual reservoir model used in this paper is the L reservoir, which is a deep-water turbidite reservoir. There are two water injection wells and three production wells in the reservoir, which are driven by edge water. The model grid scale is79×109×20, the plane grid size is 50m×50m, the average longitudinal grid step length is 10 m, the average porosity is 0.17, the average permeability is 446 mD, the oil saturation is 0.8, and the average formation pressure is 49.2 MPa. The L reservoir has been in production for 225 days. The oil saturation field and well location are shown in Figure 7. In order to make the flow field displacement more uniform and improve the oil recovery rate, the production system is optimized.Figure 7
Oil saturation field of L reservoir.Obtain the daily water injection volume of each water injection well, the daily oil production and daily fluid production of each production well, and form the production dynamic input data table; obtain the daily oil saturation field value of the5×5 grid around each well to form saturation. Enter the data table for the degree field.


### 4.2. Economic Parameters

Because oil reservoirs produce very little gas, natural gas prices are ignored. The total production cycle of the reservoir is 10 years (3650 days), and the net present value at the end of the production forecast cycle is used as the objective function. The parameter values of NPV in this article are shown in Table1.Table 1
Net present value parameter values.
Economic parameter name (unit)ValueCrude oil prices ($/m3)377Water injection price ($/m3)20Water treatment fee ($/m3)40Discount rate (%)10Drilling costs from the surface to the top of the reservoir ($/m)515Drilling cost per meter inside the reservoir ($/m)500


### 4.3. Injection-Production Plan Generation Parameters

According to the results of the reservoir engineering demonstration, the upper and lower bounds of the daily fluid production of a single well of oil production wells are 3000 m3/D and 0 m3/D; the upper and lower bounds of the daily water injection of a water injection well are 4050 m3/D and 0 m3/D, respectively. The reservoir with the optimized plan will be produced in the next 10 years (3650 days). Set the maximum control frequency in the next 10 years of production to 120 times. According to the above reservoir engineering constraints, 10,000 injection-production schemes are randomly generated.


### 4.4. Neural Network Training Parameters

Based on the multi-input neural network structure proposed in Section2.2, ReLU is used as the activation function, and Adam is used as the optimizer. The number of neurons in the LSTM layer is 32, the number of neurons in the fully connected layer 1 is 32, and the number of neurons in the fully connected layer 2 is 64. In the gradient descent process, the learning rate is 0.8, the one-time training sample size is 30, and the data is iteratively trained 5000 times. In order to avoid overfitting, the node discarding is introduced and the value is set to 0.2.


### 4.5. Training Error Evaluation Method

This article uses mean relative error (MRE) and normalized root mean square error (nRMSE) as the evaluation criteria of training error. The specific calculation formula is as follows:(9)MRE=1N∑i=1Nyi′−yiyi,nRMSE=1ymax−ymin1N∑i=1Nyi′−yi2.Among them,N is the number of samples, yi is the predicted value of the ith sample, ymax is the true value of the ith sample, ymin is the maximum value of the sample, and the minimum value of the sample.


### 4.6. Results and Discussion

#### 4.6.1. Comparison of Single Input and Multiple Input

The core of the well control optimization method proposed in this paper is to establish a production dynamic prediction model based on a multi-input deep neural network to replace the calculation of a reservoir numerical simulator, thereby improving calculation efficiency. The accuracy of the production dynamic prediction model determines whether the best solution can be selected from many injection and production solutions. Due to the phased characteristics of oilfield production and the large fluctuations of historical production data, the prediction results of the production dynamic prediction model obtained by previous scholars using the conventional LSTM neural network are not ideal. This paper proposes a multi-input neural network structure, which uses the oil saturation field to constrain the prediction of production dynamics to improve the accuracy of production dynamic prediction. In order to prove the effectiveness of this method, this paper compares the prediction accuracy of the production dynamic prediction model based on the single-input neural network structure of LSTM and the multi-input network structure. The single-input neural network structure only uses the production history data to train the neural network, while the multi-input neural network structure uses the production history data as the main input and the oil saturation field as the auxiliary input. Take the daily water injection volume of INJ-01 well as an example. The prediction results of the two are shown in Figures8 and 9.Figure 8
Forecast results of the single-input production dynamic forecasting model.Figure 9
Forecast results of the multi-input production dynamic forecasting model.Compare the real daily water injection volume of INJ-01 in the verification set, the daily water injection volume prediction value of the single-input production dynamic prediction model of INJ-01, and the daily water injection volume prediction value of the multi-input production dynamic prediction model of INJ-01. The situation is shown in Table2.Table 2
Comparison table of real value and predicted value of INJ-01 well.
Time (date)Actual value (m3/d)Single-input predicted value (m3/d)Relative error of single-input predicted value (decimal)Multi-input predicted value (m3/d)Relative error of multi-input predicted value (decimal)2019.11.121935.821553.480.19751867.030.03552019.11.201895.921514.150.20141925.830.01582019.11.281886.851571.580.16711890.380.00192019.12.61959.361400.080.28541836.930.06252019.12.141968.581509.80.23311927.920.02072019.12.221946.161553.860.20161942.290.002Comparing the single-input production performance prediction model and the multiple-input production performance prediction model in predicting the future production performance error of the reservoir, using MRE and nRMSE for evaluation, the results are shown in Table3.Table 3
MRE and nRMSE error results.
Production dynamic prediction modelMREnRMSESingle-input0.12590.5983Multi-input0.08290.3665As can be seen from the table, compared with the single-input production dynamic prediction model, the MRE of the production dynamic prediction model based on the multi-input deep neural network is reduced by 0.043, and the nRMSE is reduced by 0.2318. It can be concluded that the multi-input deep neural network structure can improve the accuracy of the production dynamic prediction model.


#### 4.6.2. Forecast Accuracy of Production Dynamics

In order to further explore the accuracy of the multi-input deep neural network for the production dynamic prediction, compare the water cut of the optimal solution under the numerical simulator and the water cut of the optimal solution under the production dynamic prediction model. And compare them with the water cut of the basic plan. The result is shown in Figure10.Figure 10
Comparison of water content curves.The results show that the water cut prediction based on the multi-input neural network production dynamic prediction model is basically the same as that of the traditional numerical simulator. Reservoir water cut is a comprehensive performance of reservoir production, so the optimized injection-production plan obtained under the production performance prediction model proposed in this paper is credible.


#### 4.6.3. Comparison of Production Effects

The basic plan is to keep the production system at the last historical moment unchanged and continue to produce for 10 years. Taking the plan obtained through optimization of the production system optimization model as the optimization plan, the total daily liquid production and total daily water injection of the optimized plan are shown in Figure11.Figure 11
Production system with the optimized plan.This article will compare the basic plan and the optimized plan from the following four aspects:(1)
Comparison of objective functionsCompare the NPV of the basic plan and the optimized plan in the next 10 years, as shown in Figure12.Figure 12
NPV comparison in the next 10 years.It can be seen from Figure11 that in the next 10 years of reservoir water injection development, the NPV of the basic plan is 1.81×109$, the net present value of the optimized plan is 1.98×109$, and the optimized plan has increased by 1.7×108$ compared to the basic plan NPV.
(2)
Comparison of cumulative oil production and cumulative water productionIt can be seen from Figure13 that the cumulative oil production of the optimized plan increased by 103.8×104m3 compared to the basic plan, and the cumulative water production decreased by 108.4×104m3.
(3)
Remaining oil distribution mapFigure 13
Comparison of accumulated oil and accumulated water.It can be seen from Figure14 that the remaining oil contour of the optimized plan is flatter than the basic plan, the displacement is more uniform, and the saturation of the remaining oil is significantly reduced near the production well, especially in the vicinity of the PRO-03 well, indicating the optimization. The plan can improve the effect of oilfield development.
(4)
Recovery factorFigure 14
Comparison chart of the remaining oil saturation contour.It can be seen from Figure15 that the optimized plan has increased the recovery factor by 2.76% after 10 years of reservoir development compared with the basic plan, which has promoted the development effect of the oilfield.Figure 15
Comparison of recovery factor.


#### 4.6.4. Optimization Time Comparison

This L model’s production system optimization compares 10,000 plans, which takes a total of 4.2 hours. The average time for a single plan to predict 10-year production dynamics is 1.5 s. Regardless of whether the predecessor optimization based on reservoir numerical simulation or optimization theory is used, if you want to compare 10,000 plans, you need at least10,000×0.8h=8000h. In summary, the use of a deep neural network-based production system optimization method greatly improves the speed of optimization and reduces the consumption of manpower and material resources.


#### 4.6.5. Control Frequency

Because this method can quickly generate thousands of injection-production plans and can quickly optimize these plans, it is entirely possible to use this advantage to control the frequency as part of the injection-production parameter design. As the number of comparison schemes continues to increase, the control frequency of the obtained optimal scheme is closer to the real optimal control frequency, and the search for the optimal control frequency is realized to a certain extent. After comparing the 10,000 programs, the optimal control frequency of the optimal program is once every 36 days, and a total of 101 times in 10 years.


## 4.1. Model Introduction

The actual reservoir model used in this paper is the L reservoir, which is a deep-water turbidite reservoir. There are two water injection wells and three production wells in the reservoir, which are driven by edge water. The model grid scale is79×109×20, the plane grid size is 50m×50m, the average longitudinal grid step length is 10 m, the average porosity is 0.17, the average permeability is 446 mD, the oil saturation is 0.8, and the average formation pressure is 49.2 MPa. The L reservoir has been in production for 225 days. The oil saturation field and well location are shown in Figure 7. In order to make the flow field displacement more uniform and improve the oil recovery rate, the production system is optimized.Figure 7
Oil saturation field of L reservoir.Obtain the daily water injection volume of each water injection well, the daily oil production and daily fluid production of each production well, and form the production dynamic input data table; obtain the daily oil saturation field value of the5×5 grid around each well to form saturation. Enter the data table for the degree field.


## 4.2. Economic Parameters

Because oil reservoirs produce very little gas, natural gas prices are ignored. The total production cycle of the reservoir is 10 years (3650 days), and the net present value at the end of the production forecast cycle is used as the objective function. The parameter values of NPV in this article are shown in Table1.Table 1
Net present value parameter values.
Economic parameter name (unit)ValueCrude oil prices ($/m3)377Water injection price ($/m3)20Water treatment fee ($/m3)40Discount rate (%)10Drilling costs from the surface to the top of the reservoir ($/m)515Drilling cost per meter inside the reservoir ($/m)500


## 4.3. Injection-Production Plan Generation Parameters

According to the results of the reservoir engineering demonstration, the upper and lower bounds of the daily fluid production of a single well of oil production wells are 3000 m3/D and 0 m3/D; the upper and lower bounds of the daily water injection of a water injection well are 4050 m3/D and 0 m3/D, respectively. The reservoir with the optimized plan will be produced in the next 10 years (3650 days). Set the maximum control frequency in the next 10 years of production to 120 times. According to the above reservoir engineering constraints, 10,000 injection-production schemes are randomly generated.


## 4.4. Neural Network Training Parameters

Based on the multi-input neural network structure proposed in Section2.2, ReLU is used as the activation function, and Adam is used as the optimizer. The number of neurons in the LSTM layer is 32, the number of neurons in the fully connected layer 1 is 32, and the number of neurons in the fully connected layer 2 is 64. In the gradient descent process, the learning rate is 0.8, the one-time training sample size is 30, and the data is iteratively trained 5000 times. In order to avoid overfitting, the node discarding is introduced and the value is set to 0.2.


## 4.5. Training Error Evaluation Method

This article uses mean relative error (MRE) and normalized root mean square error (nRMSE) as the evaluation criteria of training error. The specific calculation formula is as follows:(9)MRE=1N∑i=1Nyi′−yiyi,nRMSE=1ymax−ymin1N∑i=1Nyi′−yi2.Among them,N is the number of samples, yi is the predicted value of the ith sample, ymax is the true value of the ith sample, ymin is the maximum value of the sample, and the minimum value of the sample.


## 4.6. Results and Discussion

### 4.6.1. Comparison of Single Input and Multiple Input

The core of the well control optimization method proposed in this paper is to establish a production dynamic prediction model based on a multi-input deep neural network to replace the calculation of a reservoir numerical simulator, thereby improving calculation efficiency. The accuracy of the production dynamic prediction model determines whether the best solution can be selected from many injection and production solutions. Due to the phased characteristics of oilfield production and the large fluctuations of historical production data, the prediction results of the production dynamic prediction model obtained by previous scholars using the conventional LSTM neural network are not ideal. This paper proposes a multi-input neural network structure, which uses the oil saturation field to constrain the prediction of production dynamics to improve the accuracy of production dynamic prediction. In order to prove the effectiveness of this method, this paper compares the prediction accuracy of the production dynamic prediction model based on the single-input neural network structure of LSTM and the multi-input network structure. The single-input neural network structure only uses the production history data to train the neural network, while the multi-input neural network structure uses the production history data as the main input and the oil saturation field as the auxiliary input. Take the daily water injection volume of INJ-01 well as an example. The prediction results of the two are shown in Figures8 and 9.Figure 8
Forecast results of the single-input production dynamic forecasting model.Figure 9
Forecast results of the multi-input production dynamic forecasting model.Compare the real daily water injection volume of INJ-01 in the verification set, the daily water injection volume prediction value of the single-input production dynamic prediction model of INJ-01, and the daily water injection volume prediction value of the multi-input production dynamic prediction model of INJ-01. The situation is shown in Table2.Table 2
Comparison table of real value and predicted value of INJ-01 well.
Time (date)Actual value (m3/d)Single-input predicted value (m3/d)Relative error of single-input predicted value (decimal)Multi-input predicted value (m3/d)Relative error of multi-input predicted value (decimal)2019.11.121935.821553.480.19751867.030.03552019.11.201895.921514.150.20141925.830.01582019.11.281886.851571.580.16711890.380.00192019.12.61959.361400.080.28541836.930.06252019.12.141968.581509.80.23311927.920.02072019.12.221946.161553.860.20161942.290.002Comparing the single-input production performance prediction model and the multiple-input production performance prediction model in predicting the future production performance error of the reservoir, using MRE and nRMSE for evaluation, the results are shown in Table3.Table 3
MRE and nRMSE error results.
Production dynamic prediction modelMREnRMSESingle-input0.12590.5983Multi-input0.08290.3665As can be seen from the table, compared with the single-input production dynamic prediction model, the MRE of the production dynamic prediction model based on the multi-input deep neural network is reduced by 0.043, and the nRMSE is reduced by 0.2318. It can be concluded that the multi-input deep neural network structure can improve the accuracy of the production dynamic prediction model.


### 4.6.2. Forecast Accuracy of Production Dynamics

In order to further explore the accuracy of the multi-input deep neural network for the production dynamic prediction, compare the water cut of the optimal solution under the numerical simulator and the water cut of the optimal solution under the production dynamic prediction model. And compare them with the water cut of the basic plan. The result is shown in Figure10.Figure 10
Comparison of water content curves.The results show that the water cut prediction based on the multi-input neural network production dynamic prediction model is basically the same as that of the traditional numerical simulator. Reservoir water cut is a comprehensive performance of reservoir production, so the optimized injection-production plan obtained under the production performance prediction model proposed in this paper is credible.


### 4.6.3. Comparison of Production Effects

The basic plan is to keep the production system at the last historical moment unchanged and continue to produce for 10 years. Taking the plan obtained through optimization of the production system optimization model as the optimization plan, the total daily liquid production and total daily water injection of the optimized plan are shown in Figure11.Figure 11
Production system with the optimized plan.This article will compare the basic plan and the optimized plan from the following four aspects:(1)
Comparison of objective functionsCompare the NPV of the basic plan and the optimized plan in the next 10 years, as shown in Figure12.Figure 12
NPV comparison in the next 10 years.It can be seen from Figure11 that in the next 10 years of reservoir water injection development, the NPV of the basic plan is 1.81×109$, the net present value of the optimized plan is 1.98×109$, and the optimized plan has increased by 1.7×108$ compared to the basic plan NPV.
(2)
Comparison of cumulative oil production and cumulative water productionIt can be seen from Figure13 that the cumulative oil production of the optimized plan increased by 103.8×104m3 compared to the basic plan, and the cumulative water production decreased by 108.4×104m3.
(3)
Remaining oil distribution mapFigure 13
Comparison of accumulated oil and accumulated water.It can be seen from Figure14 that the remaining oil contour of the optimized plan is flatter than the basic plan, the displacement is more uniform, and the saturation of the remaining oil is significantly reduced near the production well, especially in the vicinity of the PRO-03 well, indicating the optimization. The plan can improve the effect of oilfield development.
(4)
Recovery factorFigure 14
Comparison chart of the remaining oil saturation contour.It can be seen from Figure15 that the optimized plan has increased the recovery factor by 2.76% after 10 years of reservoir development compared with the basic plan, which has promoted the development effect of the oilfield.Figure 15
Comparison of recovery factor.


### 4.6.4. Optimization Time Comparison

This L model’s production system optimization compares 10,000 plans, which takes a total of 4.2 hours. The average time for a single plan to predict 10-year production dynamics is 1.5 s. Regardless of whether the predecessor optimization based on reservoir numerical simulation or optimization theory is used, if you want to compare 10,000 plans, you need at least10,000×0.8h=8000h. In summary, the use of a deep neural network-based production system optimization method greatly improves the speed of optimization and reduces the consumption of manpower and material resources.


### 4.6.5. Control Frequency

Because this method can quickly generate thousands of injection-production plans and can quickly optimize these plans, it is entirely possible to use this advantage to control the frequency as part of the injection-production parameter design. As the number of comparison schemes continues to increase, the control frequency of the obtained optimal scheme is closer to the real optimal control frequency, and the search for the optimal control frequency is realized to a certain extent. After comparing the 10,000 programs, the optimal control frequency of the optimal program is once every 36 days, and a total of 101 times in 10 years.


## 4.6.1. Comparison of Single Input and Multiple Input

The core of the well control optimization method proposed in this paper is to establish a production dynamic prediction model based on a multi-input deep neural network to replace the calculation of a reservoir numerical simulator, thereby improving calculation efficiency. The accuracy of the production dynamic prediction model determines whether the best solution can be selected from many injection and production solutions. Due to the phased characteristics of oilfield production and the large fluctuations of historical production data, the prediction results of the production dynamic prediction model obtained by previous scholars using the conventional LSTM neural network are not ideal. This paper proposes a multi-input neural network structure, which uses the oil saturation field to constrain the prediction of production dynamics to improve the accuracy of production dynamic prediction. In order to prove the effectiveness of this method, this paper compares the prediction accuracy of the production dynamic prediction model based on the single-input neural network structure of LSTM and the multi-input network structure. The single-input neural network structure only uses the production history data to train the neural network, while the multi-input neural network structure uses the production history data as the main input and the oil saturation field as the auxiliary input. Take the daily water injection volume of INJ-01 well as an example. The prediction results of the two are shown in Figures8 and 9.Figure 8
Forecast results of the single-input production dynamic forecasting model.Figure 9
Forecast results of the multi-input production dynamic forecasting model.Compare the real daily water injection volume of INJ-01 in the verification set, the daily water injection volume prediction value of the single-input production dynamic prediction model of INJ-01, and the daily water injection volume prediction value of the multi-input production dynamic prediction model of INJ-01. The situation is shown in Table2.Table 2
Comparison table of real value and predicted value of INJ-01 well.
Time (date)Actual value (m3/d)Single-input predicted value (m3/d)Relative error of single-input predicted value (decimal)Multi-input predicted value (m3/d)Relative error of multi-input predicted value (decimal)2019.11.121935.821553.480.19751867.030.03552019.11.201895.921514.150.20141925.830.01582019.11.281886.851571.580.16711890.380.00192019.12.61959.361400.080.28541836.930.06252019.12.141968.581509.80.23311927.920.02072019.12.221946.161553.860.20161942.290.002Comparing the single-input production performance prediction model and the multiple-input production performance prediction model in predicting the future production performance error of the reservoir, using MRE and nRMSE for evaluation, the results are shown in Table3.Table 3
MRE and nRMSE error results.
Production dynamic prediction modelMREnRMSESingle-input0.12590.5983Multi-input0.08290.3665As can be seen from the table, compared with the single-input production dynamic prediction model, the MRE of the production dynamic prediction model based on the multi-input deep neural network is reduced by 0.043, and the nRMSE is reduced by 0.2318. It can be concluded that the multi-input deep neural network structure can improve the accuracy of the production dynamic prediction model.


## 4.6.2. Forecast Accuracy of Production Dynamics

In order to further explore the accuracy of the multi-input deep neural network for the production dynamic prediction, compare the water cut of the optimal solution under the numerical simulator and the water cut of the optimal solution under the production dynamic prediction model. And compare them with the water cut of the basic plan. The result is shown in Figure10.Figure 10
Comparison of water content curves.The results show that the water cut prediction based on the multi-input neural network production dynamic prediction model is basically the same as that of the traditional numerical simulator. Reservoir water cut is a comprehensive performance of reservoir production, so the optimized injection-production plan obtained under the production performance prediction model proposed in this paper is credible.


## 4.6.3. Comparison of Production Effects

The basic plan is to keep the production system at the last historical moment unchanged and continue to produce for 10 years. Taking the plan obtained through optimization of the production system optimization model as the optimization plan, the total daily liquid production and total daily water injection of the optimized plan are shown in Figure11.Figure 11
Production system with the optimized plan.This article will compare the basic plan and the optimized plan from the following four aspects:(1)
Comparison of objective functionsCompare the NPV of the basic plan and the optimized plan in the next 10 years, as shown in Figure12.Figure 12
NPV comparison in the next 10 years.It can be seen from Figure11 that in the next 10 years of reservoir water injection development, the NPV of the basic plan is 1.81×109$, the net present value of the optimized plan is 1.98×109$, and the optimized plan has increased by 1.7×108$ compared to the basic plan NPV.
(2)
Comparison of cumulative oil production and cumulative water productionIt can be seen from Figure13 that the cumulative oil production of the optimized plan increased by 103.8×104m3 compared to the basic plan, and the cumulative water production decreased by 108.4×104m3.
(3)
Remaining oil distribution mapFigure 13
Comparison of accumulated oil and accumulated water.It can be seen from Figure14 that the remaining oil contour of the optimized plan is flatter than the basic plan, the displacement is more uniform, and the saturation of the remaining oil is significantly reduced near the production well, especially in the vicinity of the PRO-03 well, indicating the optimization. The plan can improve the effect of oilfield development.
(4)
Recovery factorFigure 14
Comparison chart of the remaining oil saturation contour.It can be seen from Figure15 that the optimized plan has increased the recovery factor by 2.76% after 10 years of reservoir development compared with the basic plan, which has promoted the development effect of the oilfield.Figure 15
Comparison of recovery factor.


## 4.6.4. Optimization Time Comparison

This L model’s production system optimization compares 10,000 plans, which takes a total of 4.2 hours. The average time for a single plan to predict 10-year production dynamics is 1.5 s. Regardless of whether the predecessor optimization based on reservoir numerical simulation or optimization theory is used, if you want to compare 10,000 plans, you need at least10,000×0.8h=8000h. In summary, the use of a deep neural network-based production system optimization method greatly improves the speed of optimization and reduces the consumption of manpower and material resources.


## 4.6.5. Control Frequency

Because this method can quickly generate thousands of injection-production plans and can quickly optimize these plans, it is entirely possible to use this advantage to control the frequency as part of the injection-production parameter design. As the number of comparison schemes continues to increase, the control frequency of the obtained optimal scheme is closer to the real optimal control frequency, and the search for the optimal control frequency is realized to a certain extent. After comparing the 10,000 programs, the optimal control frequency of the optimal program is once every 36 days, and a total of 101 times in 10 years.


## 5. Summary

(1)
The core of this new method of a well control optimization method proposed in this paper is to establish a production dynamic prediction model based on a multi-input neural network. In order to solve the problem that the LSTM neural network cannot accurately predict the characteristics of the reservoir production dynamics in stages and large changes, this paper proposes a neural network structure based on multiple inputs. With production dynamic data as the main input, oil saturation field as the auxiliary input, and LSTM, the production dynamic prediction model has high accuracy and conforms to the actual situation of reservoir production(2)
The optimization speed of the production system optimization method based on a deep neural network is extremely fast, because it gets rid of the limitation of conventional reservoir numerical simulation software, and does not require engineers to preselect the plan. It only needs to use the algorithm to give each parameter under the reservoir engineering constraints. With different values, tens of thousands of solutions can be combined, and the optimal solution can be quickly found out after optimization of production dynamics. A large number of scheme comparisons ensure that the optimization scheme is close to the true optimal scheme(3)
With the help of the characteristics of rapid optimization, the control frequency can be used as the optimization parameter. After a large number of injection-production schemes are compared and optimized, the control frequency of the optimized plan is close to the optimal control frequency in the true sense. And it is determined that the optimal control frequency of the L reservoir in the next ten years is 101 times(4)
The verification of the example shows that this method achieves an increase in the NPV of the L reservoir after ten years of development. The NPV increases by1.7×108$, the water cut decreases, the cumulative oil production increases by 103.8×104m3, and the cumulative water production decreases by 108.4×104m3. The recovery factor has been improved by 2.76% and other excellent indicators, proving that the optimization method of the production system based on a deep neural network can improve the recovery and economic benefits of oilfield development



---

*Source: 8873782-2021-04-07.xml*