Method for predicting reservoir water saturation combining ordinary differential equation and neural network
By combining ordinary differential equations with neural networks and using one-dimensional convolutional neural networks and long short-term memory units, the inaccuracy problem of traditional methods in reservoir fluid distribution prediction is solved, and more accurate and stable water saturation prediction is achieved to support oil and gas field development decisions.
Patent Information
- Application Number
- CN202411889935.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-12-20
AI Technical Summary
Traditional methods have difficulty accurately depicting the fluid distribution inside the reservoir, especially in high water-cut periods and complex geological conditions. Neural networks lack the ability to interpret the physical laws of the reservoir, resulting in unstable or inaccurate predictions.
Combining ordinary differential equations with neural networks, the logging data features are extracted through a one-dimensional convolutional neural network, and the ordinary differential equations are solved in long-short-term memory units. The network model is trained to improve the accuracy and stability of water saturation prediction.
The accuracy and stability of water saturation prediction have been significantly improved, providing a more accurate and reliable basis for oil and gas field development.
Smart Images

Figure CN119833026B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of oil and gas field development, and particularly relates to a method for predicting reservoir water saturation by combining ordinary differential equation and neural network. BACKGROUND
[0002] In the process of oil and gas field development, reservoir water saturation (SW) is one of the important parameters reflecting the distribution of reservoir fluids, and plays a key role in oil and gas production prediction, reservoir evaluation and production optimization. The traditional method for predicting water saturation mainly relies on logging data and geological models, such as empirical formula such as Archie formula. However, due to the complexity and heterogeneity of the reservoir, it is difficult for the traditional method to accurately depict the fluid distribution inside the reservoir, especially in the high water cut stage and under complex geological conditions, and its prediction accuracy is limited.
[0003] With the rapid development of artificial intelligence technology, neural networks are widely used in data analysis and prediction tasks in petroleum engineering. Neural networks can automatically extract features and make high-precision predictions through training on a large amount of historical logging data, overcoming the limitations of traditional empirical methods. For example, the patent application with the publication number CN117954004A discloses a water saturation prediction method based on adversarial neural network, which includes the following steps: S1: obtaining the underground medium parameters by AVO three-parameter inversion method; S2: using Aki-Richards to approximate the underground medium parameters; obtaining elastic parameters; S3: constructing Xu-White model according to the elastic parameters, predicting the longitudinal wave velocity, transverse wave velocity and density; inputting water saturation, and using adversarial neural network to iteratively optimize the target function to obtain the water saturation SW calculation result that meets the accuracy. Using this neural network method effectively improves the prediction accuracy of water saturation and improves the prediction efficiency, and is suitable for small sample logging data. However, neural network models inherently lack the ability to explain the physical laws of the reservoir, which may lead to instability or inaccuracy when predicting complex geological processes. SUMMARY
[0004] In view of the problems and shortcomings of the prior art, the present application aims to provide a method for predicting reservoir water saturation by combining ordinary differential equation and neural network. The method extracts logging data of a well from the oil reservoir geological model, and performs data preprocessing on the logging data. Then, the data is enlarged in the convolutional neural network and put into the long short-term memory unit containing the solution of the ordinary differential equation to calculate the output of the last time step. The overall network is trained, and the optimal network model parameters are saved to predict the water saturation. The present application can improve the accuracy and stability of water saturation prediction by solving the ordinary differential equation to calculate the hidden layer state. It can also provide more accurate and reliable basis for the development decision of oil and gas fields, and has important theoretical value and practical application prospect.
[0005] To achieve the above object, the technical scheme adopted by the present application is:
[0006] The method for predicting reservoir water saturation by combining ordinary differential equation and neural network is implemented according to the following steps:
[0007] Step 1: Extract the logging data of a well in the geological model of the oil reservoir, and perform data preprocessing on the logging data;
[0008] Step 2: Input the logging data preprocessed in step 1 into a 3-layer one-dimensional convolutional neural network (CNN), amplify the input data features and perform nonlinear activation on the features;
[0009] Step 3: Reshape the data features after nonlinear activation in step 2, and input them into a 2-layer long short-term memory cell (LSTMCell) containing ordinary differential equation (ODE) solution to calculate the output of the last time step;
[0010] Step 4: Calculate the mean square error loss function of the output of the last time step obtained in step 3 to train the overall neural network, and save the optimal network model parameters;
[0011] Step 5: Load the optimal network model parameters saved in step 4 to predict the water saturation of a section of logging data and obtain the result.
[0012] The specific process of step 1 is:
[0013] Step 1.1: Convert the extracted LAS format logging data to CSV format;
[0014] Step 1.2: Fill and replace missing values and outliers by mean method;
[0015] Step 1.3: Construct a training data set by taking 16 data as a time series, taking the remaining 10 logging parameters except water saturation as features, and setting the batch size to 32.
[0016] The specific process of step 2 is:
[0017] Step 2.1: Adjust the number of first-layer convolution input features to 10 to adapt to the 32x16x10 data set obtained in step 1;
[0018] Step 2.2: Perform ReLu nonlinear activation on the data set after inputting it into the 3-layer convolutional network.
[0019] The specific process of step 3 is:
[0020] Step 3.1: reshape the data feature shape after step 2 nonlinear activation to the shape suitable for LSTMCell;
[0021] Step 3.2: traverse 16 time series, and use long short-term memory network (LSTM) to calculate the hidden layer state h and cell state c of the current time series after reshaping the data;
[0022] Step 3.3: input the hidden layer state h obtained in step 3.2 into the fixed step fourth-order Runge-Kutta method to numerically solve the differential equation, and the calculated result is taken as the smoothed new hidden layer state new_h, and the calculation formula is as follows:
[0023]
[0024] Wherein:
[0025] k1 = f(t n ,y n )
[0026]
[0027] k4 = f(t n + Δt, y n + Δtk3)
[0028] In the formula, y n is the function value of the current state; y n+1 represents the function value of the next time step state; Δt is the time step; k1, k2, k3, k4 represent the differential values at different time points and states, which are used to update the state of y;
[0029] Step 3.4: input the new hidden layer state new_h obtained in step 3.3 into the network for calculation, and after calculating all 16 time series, the output of the last time step is obtained.
[0030] The specific process of step 4 is as follows:
[0031] Step 4.1: calculate the mean square error loss function of the output of the last time step obtained in step 3, and the formula is:
[0032]
[0033] In the formula, n is the number of samples, y i is the true value of the i-th sample, is the prediction value of the i-th sample;
[0034] Step 4.2: train the entire network model, stop when the loss rate converges and record and save the current model parameters.
[0035] The specific process of step 5 is:
[0036] Step 5.1: Load the last saved network model parameters in step 4, cancel the calculation of the loss function;
[0037] Step 5.2: Take any piece of data in the logging data and send it to the network model loaded with the optimal parameters in step 5.1, and the result is the predicted value.
[0038] Compared with the prior art, the beneficial effects of the present application are:
[0039] (1) Since step 2 uses the CNN method, this method effectively extracts the local features of the overall logging data by introducing one-dimensional convolution operation, and uses weight sharing and dimension reduction technology to reduce the number of parameters and improve the training efficiency.
[0040] (2) Since step 3 uses the LSTMCell method, this method can effectively alleviate the gradient disappearance problem that the traditional recurrent neural network is prone to when processing long sequence data by introducing a gating mechanism, which helps better understand the formation and improve the drilling and completion strategy.
[0041] (3) Since step 3 introduces the solution method of ordinary differential equation, the fixed step fourth-order Runge-Kutta method is used to numerically solve the differential equation. By accurately calculating the intermediate steps and weighted average, this method can achieve the effect of data smoothing after the second calculation of the hidden layer value generated by LSTMCell, thereby improving the expression ability and stability of the model to the logging data.
[0042] Due to the combined action of step 2 and step 3, the combination of one-dimensional convolution operation and LSTMCell can not only efficiently extract the local features of the logging data, but also maintain the stability of the model and the ability to capture global features when processing data. In addition, by introducing the numerical solution method of ordinary differential equation, the hidden layer value of LSTMCell is further smoothed, which improves the expression accuracy of the model to the logging data. This multi-step collaborative method significantly improves the recognition ability of the model to the formation characteristics, and provides effective support for optimizing the drilling and completion strategy.
[0043] In summary, the method of combining the ordinary differential equation (ODE) solution method with the long short-term memory unit (LSTMCell) can dynamically smooth the hidden layer change state of LSTMCell by solving the initial and current hidden layer state of ODE, thereby improving the accuracy and stability of water saturation prediction. This method not only improves the prediction accuracy, but also provides more accurate and reliable basis for the development decision of oil and gas fields, and has important theoretical value and practical application prospect. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 is the overall flowchart of the present application.
[0045] Figure 2 is the model training round and the corresponding coefficient of determination graph of the present application.
[0046] Figure 3 is the scatter plot of the predicted partial water saturation value and its true value of the present application.
[0047] Figure 4 is the curve comparison graph of the predicted partial water saturation value and its true value of the present application. DETAILED DESCRIPTION
[0048] The present application will be described in detail below with the help of the drawings and specific implementation methods.
[0049] Reference Figure 1 , in combination with the method of predicting reservoir water saturation by ordinary differential equation and neural network, includes the following steps:
[0050] Step 1: Extract the logging data of a well in the oil reservoir geological model and pre-process the data; specifically:
[0051] Step 1.1: Load and convert the extracted LAS format logging data to CSV format saved by lasio library in python;
[0052] Step 1.2: First, load the CSV format logging data saved in step 1.1, calculate the mean value of water saturation and the mean value of the remaining logging parameters, and finally fill and replace the missing values and outliers by mean filling method and mean replacement method respectively;
[0053] Step 1.3: The CSV format logging data processed in step 1.2 is time series data with 16 data as a group, the remaining 10 logging parameters except water saturation as features, and the batch size set to 32, to construct the training data set.
[0054] Step 2: Put the pre-processed logging data in step 1 into a 3-layer one-dimensional convolutional neural network (CNN), amplify the input data features and perform nonlinear activation; specifically:
[0055] Step 2.1: Adjust the number of first layer convolution input features to 10 to adapt to the 32x16x10 data set obtained in step 1, then expand the feature size to 128 in one layer of convolution, and finally reduce it to 64 in the last layer of convolution;
[0056] Step 2.2: The data set obtained in the last step of step 1 is input into a 3-layer convolutional network and then subjected to ReLu nonlinear activation, and the data features after convolution are extracted.
[0057] Step 3: The shape of the data features extracted in step 2 is reshaped and input into a 2-layer long short-term memory cell (LSTMCell) containing ordinary differential equation (ODE) solving to calculate the output of the last time step; specifically:
[0058] Step 3.1: The shape of the data features extracted in step 2 is reshaped by the permute function to adapt to the shape of the LSTMCell.
[0059] Step 3.2: Traverse the 16 time series in the data set, and use the long short-term memory network (LSTM) to calculate the reshaped data in step 3.1 to obtain the tensor format hidden layer state h and cell state c of the current time series.
[0060] Step 3.3: The hidden layer state h obtained in step 3.2 is input into the fixed-step fourth-order Runge-Kutta method to numerically solve the differential equation, and the calculated result is used as the smoothed new hidden layer state new_h, and the calculation formula is as follows:
[0061]
[0062] Where:
[0063] k1 = f(t n ,y n )
[0064]
[0065] k4 = f(t n + Δt, y n + Δtk3)
[0066] where y n is the function value of the current state; y n+1 represents the function value of the next time step state; Δt is the time step; k1, k2, k3, k4 represent the differential values at different time points and states, which are used to update the state of y;
[0067] Step 3.4: The new hidden layer state new_h obtained in step 3.3 is combined with the cell state c obtained in step 3.2 and input into the LSTM for calculation, and a new set of hidden layer state and cell state is generated accordingly. After all 16 time series are traversed and calculated, the output of the last time step is obtained.
[0068] Step 4: The output of the last time step obtained in step 3 is subjected to mean square error loss function calculation to train the overall neural network, and the optimal network model parameters are saved; specifically:
[0069] Step 4.1: The output of the last time step obtained in step 3 is subjected to mean square error loss function calculation with the true value, and the formula is:
[0070]
[0071] where n is the sample number, y i is the true value of the i-th sample, is the predicted value of the i-th sample.
[0072] Step 4.1: Train the entire network model, stop when the loss rate converges and record the current model parameters, see Figure 2 is the overall training round number and the coefficient of determination curve, which can clearly see that the coefficient of determination reaches the highest and optimal at 500 rounds.
[0073] Step 5: Load the optimal network model parameters saved in step 4 to predict the water saturation of a section of well logging data to obtain the result; specifically:
[0074] Step 5.1: Load the optimal network model parameters saved in step 4, and cancel the calculation of the loss function;
[0075] Step 5.2: Take out any section of data in the well logging data, and send the other 10 characteristic parameters except the water saturation to the network model loaded with the optimal parameters in step 5.1 for calculation, and the result is the predicted value;
[0076] The predicted value obtained in step 5.2 is subjected to fitting analysis with the true value, and the coefficient of determination is calculated as 0.9821. See Figure 3 The scatter plot of the predicted water saturation value and the true value can be observed to observe the prediction effect, see Figure 4 The curve comparison chart of the predicted water saturation value and the true value can clearly observe the fitting degree of the predicted value and the true value and the prediction effect.
[0077] To sum up, the application inputs the well logging data which is preprocessed to the convolutional neural network to extract and amplify the features, and then inputs the enhanced features into the long short-term memory network containing ordinary differential equation solving to calculate the evolution of the hidden state, train, optimize the overall network model, and finally realize the accurate prediction of water saturation. The method effectively captures the dynamic change rule of the hidden state by introducing the ordinary differential equation solving, improves the water saturation prediction accuracy and stability of the model, and can provide more accurate basis for the decision-making process of oil and gas field development, has significant theoretical value and wide application prospect, especially in the application potential in the complex underground reservoir environment.
Claims
1. A method for predicting reservoir water saturation by combining ordinary differential equations with neural networks, characterized in that: The following steps are involved: Step 1: Extract the logging data of a well from the oil reservoir geological model and perform data preprocessing on it; Step 2: The well logging data preprocessed in step 1 is fed into a three-layer one-dimensional convolutional neural network (CNN), which amplifies and extracts the features of the input data and performs nonlinear activation. Step 3: Reshape the data features after nonlinear activation in step 2 and send them to a two-layer long short-term memory unit (LSTMCell) that solves the ordinary differential equation (ODE) to calculate the output of the last time step; Step 4: Calculate the mean square error loss function for the output of the last time step obtained in step 3 to train the entire neural network and save the optimal network model parameters; Step 5: Load the optimal network model parameters saved in step 4 to predict the water saturation of a section in the well logging data to obtain the result; The specific process of step 1 is: Step 1.1: Convert the extracted LAS format well logging data into CSV format; Step 1.2: Fill and replace missing values and outliers using the mean method; Step 1.3: Construct a training dataset from the CSV file with 16 data points as a time series, excluding water saturation, and the remaining 10 logging parameters as features, with a batch size of 32. The specific process of step 2 is: Step 2.1: Adjust the number of input features of the first convolution layer to 10 to fit the 32×16×10 dataset obtained at the end of step 1; Step 2.2: After the dataset is fed into a 3-layer convolutional network, ReLu nonlinear activation is performed on it.
2. The method for predicting reservoir water saturation by combining ordinary differential equations and neural networks according to claim 1, characterized in that: The specific process of step 3 is: Step 3.1: Reshape the data feature shape after nonlinear activation in step 2 into a shape adapted to LSTMCell; Step 3.2: Traverse the 16 time series and use the long short-term memory network (LSTM) to calculate the reshaped data in each time series to obtain the hidden layer state h and cell state c of the current time series; Step 3.3: Input the hidden layer state h obtained in step 3.2 into the fixed-step fourth-order Runge-Kutta method to numerically solve the differential equation. The calculated result is used as the new hidden layer state new_h after smoothing. The calculation formula is as follows: in: k1=f(t n ,y n ) k4=f(t n +Δt,y n +Δtk3) Where y n is the function value of the current state; y n+1 Represents the function value of the state in the next time step; Δt is the time step; k1, k2, k3, k4 represent the differential values at different time points and states, which are used to update the state of y; Step 3.4: The new hidden layer state new_h obtained in step 3.3 is input into the network for calculation. After all 16 time series are calculated, the output of the last time step is obtained.
3. The method for predicting reservoir water saturation by combining ordinary differential equations and neural networks according to claim 1, characterized in that: The specific process of step 4 is: Step 4.1: Calculate the mean square error loss function for the output of the last time step obtained in step 3. The formula is: Where n is the number of samples, y i is the true value of the i-th sample, y i ` is the predicted value of the i-th sample; Step 4.2: Train the entire network model, stop when the loss rate converges, and record and save the current model parameters.
4. The method for predicting reservoir water saturation by combining ordinary differential equations and neural networks according to claim 1, characterized in that: The specific process of step 5 is: Step 5.1: Load the network model parameters saved at the end of step 4 and cancel the loss function calculation; Step 5.2: Take any segment of the well logging data and feed it into the network model loaded with the optimal parameters in step 5.1 to obtain the predicted value.
Citation Information
Patent Citations
Water saturation prediction method and system based on adversarial neural network
CN117954004A