A method and system for predicting short-term gas production of carbonate gas wells
Gas well categories are identified through near-neighbor propagation clustering and maximum likelihood methods, and time convolution network is used to predict, which solves the problem of predicting gas production in short-period carbonate gas wells, and achieves high-precision and high-efficiency prediction results.
Patent Information
- Application Number
- CN202210465177.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-26
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-04-26
AI Technical Summary
The prior art is difficult to predict the gas production of carbonate gas wells with high accuracy in a short period of time, especially when data is insufficient and computational costs are high.
Nearest neighbor propagation clustering and maximum likelihood methods are used to determine the category of the target gas well, and predict the gas production in the short term in the future with the time convolution network.
High-precision gas production forecasts for short-cycle carbonate gas wells are achieved, reducing dependence on long-term production data, and improving computing efficiency and prediction accuracy.
Smart Images

Figure CN114862007B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gas well production dynamic prediction, and in particular to a short-period gas production prediction method and system for carbonate gas wells. Background Art
[0002] Natural gas is a bridge in the transformation of my country's energy structure. Replacing coal and oil consumption with natural gas can greatly promote the realization of the "dual carbon" goal. Natural gas production prediction is one of the main contents of oil and gas reservoir development engineering research, and is an important basis for the preparation of development plans and the dynamic adjustment of production systems. Accurately predicting the dynamic production of carbonate gas wells can help researchers scientifically evaluate the cost, risk and benefits of development, formulate reasonable mining plans, and have important guiding significance for oil and gas field enterprises to control production systems, adjust production plans and make decisions.
[0003] In the actual mining process, carbonate gas wells cannot obtain long-term and complete production data due to short production time or discontinuity caused by operations. Traditional numerical simulation methods and production decline curve analysis methods require complete stratigraphic data and development data when predicting production. They have extremely high data requirements, huge computational workload, and extremely harsh application conditions. With the application of machine learning methods in the field of oil and gas field development, more scholars have applied neural network algorithms, such as long short-term memory networks and gated recurrent networks in classical time series models, to predict oil and gas production. However, the establishment of such network models often requires production dynamic data of the target gas well for two to three years or even longer, and the training speed is slow when the number of networks is large, and the computational cost is high.
[0004] Based on the above situation, there is an urgent need for a short-term, high-precision carbonate gas well production dynamic prediction method. Summary of the invention
[0005] In view of the problems existing in the prior art, the present invention provides a short-term gas production prediction method and system for carbonate gas wells, which has high prediction accuracy and can adapt to the short-term gas production prediction of oil and gas reservoirs in a certain development stage.
[0006] A short-term gas production prediction method for carbonate gas wells, comprising:
[0007] Preprocessing of natural gas production data;
[0008] Perform neighbor propagation clustering on all gas wells and obtain the cluster center of each well group category;
[0009] The maximum likelihood method is used to identify the category of the target gas well;
[0010] The temporal convolutional network is used to predict the gas production of the target gas well in the short term in the future.
[0011] Preferably, the preprocessing of the natural gas production data specifically includes:
[0012] The original data were preliminarily screened and cleaned, and finally 13 production indicators including daily gas production, daily water production, cumulative gas production, cumulative water production, maximum oil pressure, minimum oil pressure, average oil pressure, maximum casing pressure, minimum casing pressure, average casing pressure, shut-in oil pressure, shut-in casing pressure, and transmission pressure were selected as input variables;
[0013] The absolute fluctuation rate of daily gas production of a single gas well is calculated based on the daily gas production data of each gas well:
[0014]
[0015] Where: T is the number of production days, x t is the gas production on day t, x t+1 is the gas production on day t+1. Similarly, the relative volatility of daily gas production of a single gas well is calculated based on its daily gas production data:
[0016]
[0017] All production indicators are normalized and all data are mapped to the range of 0 to 1.
[0018] Preferably, the method of performing neighbor propagation clustering on all gas wells and obtaining the cluster center of each well group category specifically includes:
[0019] Absolute volatility and relative volatility are used as input variables of the clustering algorithm, and the similarity between any two gas wells is calculated by Euclidean distance to obtain the similarity matrix between all gas wells.
[0020] The attraction and attribution between any two gas wells are calculated respectively, where the attraction information r(i, k) represents the suitability of gas well k as the cluster center of gas well i, and the attribution information a(i, k) represents the suitability of gas well i selecting gas well k as the cluster center, and the attraction matrix and attribution matrix between all gas wells are obtained;
[0021] Iteratively update the attraction information and belonging information of each gas well. When r(k,k)+a(k,k)>0, gas well k is regarded as a cluster center. The gas well with the largest sum of attraction information and belonging information is regarded as the cluster center of a certain well group category. The clustering is considered to be converged when all cluster centers no longer change or the number of iterations reaches the set threshold.
[0022] After convergence, the remaining gas wells are assigned to their corresponding categories according to the similarity between the remaining gas wells and the cluster center, and the final m well group categories are obtained.
[0023] Preferably, the method of using the maximum likelihood method to determine the category of the target gas well specifically includes:
[0024] The absolute volatility and relative volatility are used as input variables for maximum likelihood estimation. Assuming that the data of all gas wells in m well group categories {x1, x2, ..., x n} (a total of n gas wells) all obey Gaussian normal distribution, then the corresponding probability density function is constructed for each category:
[0025]
[0026] Where: μ is the mean, ∑ is the covariance matrix, |∑| is the determinant of ∑, -1 is the inverse matrix of ∑, and D is the data dimension;
[0027] According to the likelihood function L(μ,Σ)=f μ,Σ (x1)f μ,Σ (x2)f μ,Σ (x3)......f μ,Σ (x n ) to obtain the optimal mean and covariance matrix combination (u j *,∑ j *), j∈(1,2,...,m), so that the probability of each category being generated under its corresponding optimal mean and covariance matrix combination is maximized;
[0028] For a target gas well X to be predicted, substitute the optimal mean and covariance matrix combination of all categories to calculate the probability density of its corresponding category: Get the category with the largest probability density value: It is determined that the target gas well X belongs to the dth type of well group.
[0029] Preferably, the method of using a temporal convolutional network to predict the future short-term gas production of a target gas well specifically includes:
[0030] The production data is processed through one-dimensional convolution, the 13 production indicators are expanded horizontally, and then the training data is reshaped into three-dimensional data of (number of samples × time steps × number of features) as the input variable of the time convolution network;
[0031] The processed data of the cluster center of the category to which the target gas well belongs is used as a training set to train the temporal convolutional network;
[0032] The trained temporal convolutional network is used to predict the gas production of the target gas well in the short term in the future.
[0033] A short-term gas production prediction system for carbonate gas wells, comprising:
[0034] The forecast duration determination module is used to input the desired forecast days;
[0035] A data processing module, used for preprocessing natural gas production data;
[0036] Well group classification module, used to perform neighbor propagation clustering on all gas wells and obtain the cluster center of each well group category;
[0037] A gas well matching module is used to determine the category of the target gas well using the maximum likelihood method;
[0038] The gas production prediction module is used to predict the future short-term gas production of the target gas well using a temporal convolutional network.
[0039] Preferably, the data processing module includes:
[0040] The data screening unit is used to preliminarily screen and clean the original data, and finally selects 13 production indicators as input variables, including daily gas production, daily water production, cumulative gas production, cumulative water production, maximum oil pressure, minimum oil pressure, average oil pressure, maximum casing pressure, minimum casing pressure, average casing pressure, shut-in oil pressure, shut-in casing pressure, and transmission pressure;
[0041] The volatility calculation unit is used to calculate the absolute volatility of the daily gas production of a single gas well based on the daily gas production data of each gas well:
[0042]
[0043] Where: T is the number of production days, x t is the gas production on day t, x t+1 is the gas production on day t+1. Similarly, the relative volatility of daily gas production of a single gas well is calculated based on its daily gas production data:
[0044]
[0045] The normalization processing unit is used to normalize all production indicators and map all data into the range of 0 to 1.
[0046] Preferably, the well group division module includes:
[0047] A similarity calculation unit is used to use the absolute volatility and the relative volatility as input variables of the clustering algorithm, calculate the similarity between any two gas wells through the Euclidean distance, and obtain the similarity matrix between all gas wells;
[0048] The attraction degree and attribution degree calculation unit is used to respectively calculate the attraction degree and attribution degree between any two gas wells, wherein the attraction degree information r(i, k) represents the suitability of gas well k as the cluster center of gas well i, and the attribution degree information a(i, k) represents the suitability of gas well i selecting gas well k as the cluster center, and obtains the attraction degree matrix and attribution degree matrix between all gas wells;
[0049] The iterative update unit is used to iteratively update the attraction information and belonging information of each gas well. When r(k,k)+a(k,k)>0 appears, the gas well k is regarded as a cluster center, and the gas well with the largest sum of attraction information and belonging information is regarded as the cluster center of a certain well group category, until all cluster centers no longer change or the number of iterations reaches the set threshold, which is regarded as cluster convergence.
[0050] The clustering assignment unit is used to assign the remaining gas wells to their corresponding categories according to the similarity between the remaining gas wells and the cluster center after convergence, so as to obtain the final m well group categories after clustering.
[0051] Preferably, the gas well matching module comprises:
[0052] The probability density function building unit is used to assume that the absolute volatility and relative volatility data of all gas wells in m well group categories {x1, x2, …, x n} (a total of n gas wells) all obey Gaussian normal distribution, then the corresponding probability density function is constructed for each category:
[0053]
[0054] Where: μ is the mean, ∑ is the covariance matrix, |∑| is the determinant of ∑, -1 is the inverse matrix of ∑, and D is the data dimension;
[0055] The optimal parameter combination solving unit is used to calculate the optimal parameter combination according to the likelihood function L(μ,Σ)=f μ,Σ (x1)f μ,Σ (x2)f μ,Σ (x3)......f μ,Σ (x n ) to obtain the optimal mean and covariance matrix combination (u j *,∑ j *), j∈(1,2,...,m), so that the probability of each category being generated under its corresponding optimal mean and covariance matrix combination is maximized;
[0056] The well group category determination unit is used to substitute the target gas well X to be predicted into the optimal mean and covariance matrix combination of all categories to calculate the probability density of its corresponding category. Get the category with the largest probability density value: It is determined that the target gas well X belongs to the dth type of well group.
[0057] Preferably, the gas production prediction module includes:
[0058] The input processing unit is used to process the production data through one-dimensional convolution, expand the 13 production indicators horizontally, and then reshape the training data into three-dimensional data of (number of samples × time steps × number of features) as the input variable of the time convolution network;
[0059] A model training unit, used for training the temporal convolutional network by taking the data of the cluster center of the category to which the target gas well belongs as a training set;
[0060] The model prediction unit is used to predict the future gas production of the target gas well using the trained temporal convolutional network, and obtain the gas production result of the predicted days input by the prediction duration determination module.
[0061] The beneficial effects of adopting the above technical solution are: for the prediction of future gas production of carbonate gas wells with relatively short development cycles, a new short-term gas production prediction method and system for carbonate gas wells are proposed, and a gas well production prediction model based on machine learning is constructed. First, the nearest neighbor propagation algorithm is used to perform unsupervised clustering of carbonate gas wells to obtain the typical production laws of gas wells and obtain the cluster centers of different well groups; then the maximum likelihood estimation method is used to distinguish the category of the target gas well and find the most similar well group; finally, the convolutional neural network is trained using the cluster center of the category to which the gas well belongs to predict the future short-term gas production of carbonate gas wells, which effectively solves the problem that it is impossible to construct a high-precision time series model for short-term carbonate gas wells. Through unsupervised clustering of carbonate gas wells, the model can be trained autonomously to obtain the category of well groups, which can better obtain the production law of gas wells and improve the prediction accuracy. At the same time, using a temporal convolutional network to train the model can better solve the long-distance dependency problem in traditional time series models, effectively avoid the gradient vanishing or gradient exploding problems commonly found in RNN-like models, and improve the accuracy of model predictions while reducing data omissions. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. It is obvious that the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0063] Figure 1 The present invention is a method flow chart of an embodiment of a method for predicting short-period gas production of carbonate gas wells.
[0064] Figure 2 The present invention is a schematic structural diagram of an embodiment of a short-period gas production prediction system for carbonate gas wells. DETAILED DESCRIPTION
[0065] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0066] The purpose of the present invention is to provide a short-term gas production prediction method and system for carbonate gas wells, so as to improve the prediction accuracy of future daily gas production of carbonate gas wells with relatively short production cycles.
[0067] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0068] refer to Figure 1 , is a method flow chart of an embodiment of a method for predicting short-term gas production of carbonate gas wells according to the present invention, the method comprising the following steps:
[0069] Step S101, preprocessing the natural gas production data, the specific steps include:
[0070] The original data were preliminarily screened and cleaned, and finally 13 production indicators including daily gas production, daily water production, cumulative gas production, cumulative water production, maximum oil pressure, minimum oil pressure, average oil pressure, maximum casing pressure, minimum casing pressure, average casing pressure, shut-in oil pressure, shut-in casing pressure, and transmission pressure were selected as input variables;
[0071] The absolute fluctuation rate of daily gas production of a single gas well is calculated based on the daily gas production data of each gas well:
[0072]
[0073] Where: T is the number of production days, x t is the gas production on day t, x t+1 is the gas production on day t+1. Similarly, the relative volatility of daily gas production of a single gas well is calculated based on its daily gas production data:
[0074]
[0075] All production indicators are normalized and all data are mapped to the range of 0 to 1.
[0076] Step S102, performing neighbor propagation clustering on all carbonate gas wells, and obtaining the cluster center of each well group category, the specific steps include:
[0077] The absolute volatility and relative volatility of all carbonate gas wells {x1,x2,...,x n} as the input variable of the clustering algorithm (a total of n gas wells), through the Euclidean distance s(i,k) = -||x i -x k || 2 Calculate the similarity s(i,k) between any gas well i and gas well j, obtain the similarity between all gas wells, and form an n×n similarity matrix;
[0078] The attraction and attribution between any two gas wells are calculated respectively, where the attraction information r(i, k) represents the suitability of gas well k as the cluster center of gas well i, and the attribution information a(i, k) represents the suitability of gas well i to select gas well k as the cluster center, and the attraction matrix and attribution matrix between all gas wells are obtained:
[0079] r(i,k)←s(i,k)-max k's.t.k'≠k {a(i,k')+s(i,k')}
[0080]
[0081] Where: i, i', k, k' represent gas well data points respectively;
[0082] Iteratively update the attraction information and belonging information of each gas well. When r(k,k)+a(k,k)>0, gas well k is regarded as a cluster center. The gas well with the largest sum of attraction information and belonging information is regarded as the cluster center of a certain well group category. The clustering is considered to be converged when all cluster centers no longer change or the number of iterations reaches the set threshold.
[0083] After convergence, the remaining gas wells are assigned to their corresponding categories according to the similarity between the remaining gas wells and the cluster center, and the final m well group categories are obtained.
[0084] Step S103, using the maximum likelihood method to determine the category of the gas well to be predicted, specifically includes:
[0085] The absolute volatility and relative volatility of n carbonate gas wells and the target gas well are taken as the input variables of the maximum likelihood estimation. Assuming that the sample data in each category obtained after clustering obeys the Gaussian normal distribution, the corresponding probability density function is constructed for each category:
[0086]
[0087] Where: μ is the mean, ∑ is the covariance matrix, |∑| is the determinant of ∑, -1 is the inverse matrix of ∑, and D is the data dimension;
[0088] Assuming that the probability of any sample data of a certain category being generated from the Gaussian distribution N(μ*,Σ*) is the largest, the corresponding likelihood function is obtained as follows:
[0089] L(μ,Σ)=f μ,Σ (x1)f μ,Σ (x2)f μ,Σ (x3)......f μ,Σ (x n )
[0090] Taking the logarithm of the above formula gives:
[0091]
[0092] Taking the derivative of the above formula, we get the system of equations:
[0093]
[0094] Solving the above equations together yields:
[0095]
[0096] For each category, the optimal mean and covariance matrix combination of its probability density function (u j *,∑ j *), j∈(1,2,...,m), so that the probability of each category being generated under its corresponding optimal parameter combination is maximized;
[0097] For a target gas well X to be predicted, substitute the optimal parameter combination of all categories to calculate the probability density of its corresponding category: Get the category with the largest probability density value: It is determined that the target gas well X belongs to the dth type of well group.
[0098] Step S104, using a temporal convolutional network to predict the future short-term gas production of the target gas well, the specific steps include:
[0099] The production data is processed through one-dimensional convolution, the 13 production indicators are expanded horizontally, and then the training data is reshaped into three-dimensional data of (number of samples × time steps × number of features) as the input variable of the time convolution network;
[0100] The production data of the cluster center of the category to which the target gas well belongs, that is, the cluster center of the d-th category of wells, is used as a training set to train the temporal convolutional network;
[0101] The production data of the target gas well is used as the test set, and the temporal convolutional network trained after repeated debugging is used to predict the gas production of the target gas well in the short term in the future.
[0102] refer to Figure 2 , is a schematic diagram of a structure of an embodiment of a short-period gas production prediction system for carbonate gas wells according to the present invention, wherein the system comprises the following modules:
[0103] The prediction duration determination module 201 is used to input the desired prediction days;
[0104] The data processing module 202 is used to pre-process the natural gas production data, specifically including:
[0105] The data screening unit is used to preliminarily screen and clean the original data, and finally selects 13 production indicators as input variables, including daily gas production, daily water production, cumulative gas production, cumulative water production, maximum oil pressure, minimum oil pressure, average oil pressure, maximum casing pressure, minimum casing pressure, average casing pressure, shut-in oil pressure, shut-in casing pressure, and transmission pressure;
[0106] The volatility calculation unit is used to calculate the absolute volatility of the daily gas production of a single gas well based on the daily gas production data of each gas well:
[0107]
[0108] Where: T is the number of production days, x t is the gas production on day t, x t+1 is the gas production on day t+1. Similarly, the relative volatility of daily gas production of a single gas well is calculated based on its daily gas production data:
[0109]
[0110] The normalization processing unit is used to normalize all production indicators and map all data into the range of 0 to 1.
[0111] The well group division module 203 is used to perform neighbor propagation clustering on all gas wells and obtain the cluster center of each well group category, specifically including:
[0112] Similarity calculation unit, used to calculate the absolute volatility and relative volatility of all carbonate gas wells {x1,x2,...,x n} as the input variable of the clustering algorithm (a total of n gas wells), through the Euclidean distance s(i,k) = -||x i -x k || 2 Calculate the similarity s(i,k) between any gas well i and gas well j, obtain the similarity between all gas wells, and form an n×n similarity matrix;
[0113] The attraction and attribution calculation unit is used to calculate the attraction and attribution between any two gas wells, respectively, where the attraction information r(i, k) represents the suitability of gas well k as the cluster center of gas well i, and the attribution information a(i, k) represents the suitability of gas well i selecting gas well k as the cluster center, and the attraction matrix and attribution matrix between all gas wells are obtained:
[0114] r(i,k)←s(i,k)-max k's.t.k'≠k {a(i,k')+s(i,k')}
[0115]
[0116] Where: i, i', k, k' represent gas well data points respectively;
[0117] Iterative updating unit, used for iteratively updating the attraction information and belonging information of each gas well. When r(k,k)+a(k,k)>0 appears, gas well k is regarded as a cluster center, and the gas well with the largest sum of attraction information and belonging information is regarded as the cluster center of a certain well group category, until all cluster centers no longer change or the number of iterations reaches a set threshold, which is regarded as cluster convergence;
[0118] The clustering assignment unit is used to assign the remaining gas wells to their corresponding categories according to the similarity between the remaining gas wells and the cluster center after convergence, so as to obtain the final m well group categories after clustering.
[0119] The gas well matching module 204 is used to determine the category of the target gas well using the maximum likelihood method, specifically including:
[0120] The probability density function construction unit is used to take the absolute volatility and relative volatility of n carbonate gas wells and the target gas well as the input variables of the maximum likelihood estimation. Assuming that the sample data in each category obtained after clustering obeys the Gaussian normal distribution, the corresponding probability density function is constructed for each category:
[0121]
[0122] Where: μ is the mean, ∑ is the covariance matrix, |∑| is the determinant of ∑, -1 is the inverse matrix of ∑, and D is the data dimension;
[0123] The optimal parameter combination solving unit is used to assume that the probability of any category of sample data being generated from the Gaussian distribution N(μ*,Σ*) is the largest, and the corresponding likelihood function is obtained as follows:
[0124] L(μ,Σ)=f μ,Σ (x1)f μ,Σ (x2)f μ,Σ (x3)......f μ,Σ (x n )
[0125] Taking the logarithm of the above formula gives:
[0126]
[0127] Taking the derivative of the above formula, we get the system of equations:
[0128]
[0129] Solving the above equations together yields:
[0130]
[0131] For each category, the optimal mean and covariance matrix combination of its probability density function (u j *,∑ j *), j∈(1, 2, ..., m), so that the probability of each category being generated under its corresponding optimal parameter combination is maximized;
[0132] The well group category determination unit is used to substitute a target gas well X to be predicted into the optimal parameter combination of all categories to calculate the probability density of its corresponding category. Get the category with the largest probability density value: It is determined that the target gas well X belongs to the dth type of well group.
[0133] The gas production prediction module 205 is used to predict the future short-term gas production of the target gas well using a temporal convolutional network, specifically including:
[0134] The input processing unit is used to process the production data through one-dimensional convolution, expand the 13 production indicators horizontally, and then reshape the training data into three-dimensional data of (number of samples × time steps × number of features) as the input variable of the time convolution network;
[0135] A model training unit is used to train the temporal convolutional network by taking the cluster center of the category to which the target gas well belongs, that is, the production data of the cluster center of the d-th category of wells as a training set;
[0136] The model prediction unit is used to use the production data of the target gas well as a test set, and use the time convolution network trained after repeated debugging to predict the future gas production of the target gas well, and obtain the gas production result of the predicted days input by the prediction duration determination module.
[0137] Furthermore, in order to more clearly illustrate the advantages of the technical solution provided by the present invention, a specific implementation is used as an example for illustration below:
[0138] A carbonate gas well in the Sichuan Basin was selected as the analysis object, and 64 gas wells with a long production cycle (October 2020 to May 2021) were selected as training samples for this model, and 10 gas wells with a short production cycle (April 2021 to July 2021) were selected as test samples for prediction. After clustering, three well group categories were obtained, and the cluster center of each well group and the matching results of the target gas wells are shown in Table 1:
[0139] Table 1
[0140] Well Group Type Cluster center (hash sign) Target gas well (well number) Category I mx008-H3 mx008-6-X1, mx16C1, mx201 Category II mx022-X11 mx022-H30, mx022-H26, mx022-H23 Category 3 mx17 mx12, mx022-X17, mx022-x6, mx008-X2
[0141] The gas production prediction models are trained according to the production data of each well cluster center, and the daily gas production of the 10 target gas wells in July 2021 is predicted. Further, refer to Table 2:
[0142] Table 2
[0143]
[0144] The table shows the mean absolute percentage error (MAPE) between the actual value and the predicted value of daily gas production of all target gas wells in the future short term under each well group category obtained by using the technical solution of this patent. This error is used to evaluate the prediction accuracy of the model of this patent. The smaller the value, the smaller the error between the predicted value and the true value, the better the fitting degree of the model, and the more reliable the prediction result. It can be seen that the average MAPE value of all target gas wells finally obtained by the model of this patent is 5.53%, and the average MAPE under each well group category is less than 10%, indicating that the model has a good prediction effect on the daily gas production of carbonate gas wells with relatively short production cycles.
[0145] Furthermore, the production data of the 10 target gas wells to be predicted are divided, and the long short-term memory network (LSTM) and gated recurrent network (GRU) models are used to train the production data of two months (April to May 2021). The production data of (June 2021) is used as the test set to predict the daily gas production in July 2021. Refer to Table 3:
[0146] Table 3
[0147] Model Average MAPE / % This patent model 5.53% LSTM Model 8.98% GRU Model 9.06%
[0148] The table shows the error comparison of the prediction results of 10 target gas wells under the training of the patent model and two classic time series models. It can be seen that the average MAPE of the patent model is the smallest. Compared with the classic time series model, the accuracy is significantly improved, and the prediction results are better, which verifies the feasibility of the present invention.
[0149] In summary, compared with the prior art, the short-term gas production prediction method and system for carbonate gas wells disclosed in the present invention have the following beneficial effects: (1) The daily gas production prediction model established by the present invention can perform unsupervised clustering of carbonate gas wells, and can accurately find out the category of the well group to which different target gas wells belong, thereby obtaining the production law of the gas wells, laying the foundation for accurately predicting their future production; (2) The proposed method can realize autonomous training to obtain categories, is easy to operate, and has wide applicability; (3) Verification using field production data of oil and gas reservoirs shows that the dynamic gas production prediction model constructed by the present invention has good performance in predicting the future stage production of carbonate gas wells with a short production cycle, and has high prediction accuracy.
[0150] As for the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0151] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for predicting short-term gas production of carbonate gas wells, characterized in that: The following steps are involved: Preprocessing of natural gas production data; Perform neighbor propagation clustering on all gas wells and obtain the cluster center of each well group category; The maximum likelihood method is used to identify the category of the target gas well; The temporal convolutional network is used to predict the gas production of the target gas well in the short term in the future; The preprocessing of natural gas production data specifically includes: The original data were preliminarily screened and cleaned, and finally 13 production indicators including daily gas production, daily water production, cumulative gas production, cumulative water production, maximum oil pressure, minimum oil pressure, average oil pressure, maximum casing pressure, minimum casing pressure, average casing pressure, shut-in oil pressure, shut-in casing pressure, and transmission pressure were selected as input variables; The absolute fluctuation rate of daily gas production of a single gas well is calculated based on the daily gas production data of each gas well: Where: T is the number of production days, x t is the gas production on day t, x t+1 is the gas production on day t+1. Similarly, the relative volatility of daily gas production of a single gas well is calculated based on its daily gas production data: All production indicators are normalized and all data are mapped to the range of 0 to 1.
2. A method for predicting short-term gas production of carbonate gas wells according to claim 1, characterized in that: The aforementioned neighbor propagation clustering of all gas wells and obtaining the cluster center of each well group category specifically includes: Absolute volatility and relative volatility are used as input variables of the clustering algorithm, and the similarity between any two gas wells is calculated by Euclidean distance to obtain the similarity matrix between all gas wells. The attraction and attribution between any two gas wells are calculated respectively, where the attraction information r(i, k) represents the suitability of gas well k as the cluster center of gas well i, and the attribution information a(i, k) represents the suitability of gas well i selecting gas well k as the cluster center, and the attraction matrix and attribution matrix between all gas wells are obtained; Iteratively update the attraction information and belonging information of each gas well. When r(k,k)+a(k,k)>0, gas well k is regarded as a cluster center. The gas well with the largest sum of attraction information and belonging information is regarded as the cluster center of a certain well group category. The clustering is considered to be converged when all cluster centers no longer change or the number of iterations reaches the set threshold. After convergence, the remaining gas wells are assigned to their corresponding categories according to the similarity between the remaining gas wells and the cluster center, and the final m well group categories are obtained.
3. A method for predicting short-term gas production of carbonate gas wells according to claim 1, characterized in that: The method of using the maximum likelihood method to determine the category of the target gas well specifically includes: The absolute volatility and relative volatility are used as input variables for maximum likelihood estimation. Assuming that the data of all gas wells in m well group categories {x1, x2, ..., x n } (a total of n gas wells) all obey Gaussian normal distribution, then the corresponding probability density function is constructed for each category: Where: μ is the mean, ∑ is the covariance matrix, |∑| is the determinant of ∑, -1 is the inverse matrix of ∑, D is the data dimension; according to the likelihood function L(μ,Σ)=f μ,Σ (x1)f μ,Σ (x2)f μ,Σ (x3)......f μ,Σ (x n ) to obtain the optimal mean and covariance matrix combination (u j *,∑ j *), j∈(1,2,...,m), so that the probability of each category being generated under its corresponding optimal mean and covariance matrix combination is maximized; For a target gas well X to be predicted, substitute the optimal mean and covariance matrix combination of all categories to calculate the probability density of its corresponding category: Get the category with the largest probability density value: It is determined that the target gas well X belongs to the dth type of well group.
4. The method for predicting short-term gas production of carbonate gas wells according to claim 1, characterized in that: The use of a temporal convolutional network to predict the future short-term gas production of a target gas well specifically includes: The production data is processed through one-dimensional convolution, the 13 production indicators are expanded horizontally, and then the training data is reshaped into three-dimensional data of (number of samples × time steps × number of features) as the input variable of the time convolution network; The processed data of the cluster center of the category to which the target gas well belongs is used as a training set to train the temporal convolutional network; The trained temporal convolutional network is used to predict the future short-term gas production of the target gas well.
5. A short-term gas production prediction system for carbonate gas wells, characterized in that: Includes the following modules: The forecast duration determination module is used to input the desired forecast days; A data processing module, used for preprocessing natural gas production data; Well group classification module, used to perform neighbor propagation clustering on all gas wells and obtain the cluster center of each well group category; A gas well matching module is used to determine the category of the target gas well using the maximum likelihood method; The gas production prediction module is used to predict the gas production of the target gas well in the short term in the future using a temporal convolutional network; The data processing module specifically includes: The data screening unit is used to preliminarily screen and clean the original data, and finally selects 13 production indicators as input variables, including daily gas production, daily water production, cumulative gas production, cumulative water production, maximum oil pressure, minimum oil pressure, average oil pressure, maximum casing pressure, minimum casing pressure, average casing pressure, shut-in oil pressure, shut-in casing pressure, and transmission pressure; The volatility calculation unit is used to calculate the absolute volatility of the daily gas production of a single gas well based on the daily gas production data of each gas well: Where: T is the number of production days, x t is the gas production on day t, x t+1 is the gas production on day t+1. Similarly, the relative volatility of daily gas production of a single gas well is calculated based on its daily gas production data: The normalization processing unit is used to normalize all production indicators and map all data into the range of 0 to 1.
6. A short-term gas production prediction system for carbonate gas wells according to claim 5, characterized in that: The well group division module specifically includes: A similarity calculation unit is used to use the absolute volatility and the relative volatility as input variables of the clustering algorithm, calculate the similarity between any two gas wells through the Euclidean distance, and obtain the similarity matrix between all gas wells; The attraction degree and attribution degree calculation unit is used to respectively calculate the attraction degree and attribution degree between any two gas wells, wherein the attraction degree information r(i, k) represents the suitability of gas well k as the cluster center of gas well i, and the attribution degree information a(i, k) represents the suitability of gas well i selecting gas well k as the cluster center, and obtains the attraction degree matrix and attribution degree matrix between all gas wells; Iterative updating unit, used for iteratively updating the attraction information and belonging information of each gas well. When r(k,k)+a(k,k)>0 appears, gas well k is regarded as a cluster center, and the gas well with the largest sum of attraction information and belonging information is regarded as the cluster center of a certain well group category, until all cluster centers no longer change or the number of iterations reaches a set threshold, which is regarded as cluster convergence; The clustering allocation unit is used to allocate the remaining gas wells to their corresponding categories according to the similarity between the remaining gas wells and the cluster center after clustering convergence, so as to obtain the final m well group categories after clustering.
7. A short-term gas production prediction system for carbonate gas wells according to claim 6, characterized in that: The gas well matching module specifically includes: The probability density function building unit is used to assume that the absolute volatility and relative volatility data of all gas wells in m well group categories {x1, x2, …, x n } (a total of n gas wells) all obey the Gaussian normal distribution, and the corresponding probability density function is constructed for each category: Where: μ is the mean, ∑ is the covariance matrix, |∑| is the determinant of ∑, -1 is the inverse matrix of ∑, D is the data dimension; the optimal parameter combination solving unit is used to calculate the optimal parameter combination according to the likelihood function L(μ,Σ)=f μ,Σ (x1)f μ,Σ (x2)f μ,Σ (x3)......f μ,Σ (x n ) to obtain the optimal mean and covariance matrix combination (u j *,∑ j *), j∈(1,2,...,m), so that the probability of each category being generated under its corresponding optimal mean and covariance matrix combination is maximized; The well group category determination unit is used to substitute the target gas well X to be predicted into the optimal mean and covariance matrix combination of all categories to calculate the probability density of its corresponding category. Get the category with the largest probability density value: It is determined that the target gas well X belongs to the dth type of well group.
8. A short-term gas production prediction system for carbonate gas wells according to claim 6, characterized in that: The gas production prediction module specifically includes: The input processing unit is used to process the production data through one-dimensional convolution, expand the 13 production indicators horizontally, and then reshape the training data into three-dimensional data of (number of samples × time steps × number of features) as the input variable of the time convolution network; A model training unit, used for training the temporal convolutional network by taking the processed data of the cluster center of the category to which the target gas well belongs as a training set; The model prediction unit is used to predict the future gas production of the target gas well using the trained temporal convolutional network, and obtain the gas production result of the predicted days input by the prediction duration determination module.