Sulfur-containing gas reservoir gas deviation factor prediction method
By modeling on a large number of experimental data, combining gray correlation method and BP neural network, the deviation factor of sulfur-containing gas reservoirs is simulated and calculated, which solves the problem of low reliability of prediction results in the existing technology, and achieves high precision and high application prediction effects.
Patent Information
- Application Number
- CN202311193801.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-15
- Publication Date
- 2025-03-18
AI Technical Summary
When predicting the deviation factor of sulfur-containing gas reservoirs, the prior art has problems such as the experimental measurement time, insufficient data timeliness and limited scope of application of empirical formulas, resulting in low reliability of the prediction results.
By modeling based on a large number of experimental data, the correlation between each influencing factor and gas deviation factor was calculated by using the mean processing and gray correlation method, and a prediction model was established in combination with the BP neural network to simulate and calculate the gas deviation factor of the sulfur-containing gas reservoir.
It realizes the comprehensiveness of considerations, the objectivity of calculation methods and the reliability of results, simplifies the operation process, and improves prediction accuracy and applicability.
Smart Images

Figure CN119647230A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of exploration and development, and in particular to a method for predicting a gas deviation factor of a sulfur-containing gas reservoir. Background Art
[0002] At present, the deviation factor of sour gas reservoirs is mainly obtained by two methods: experimental determination and empirical formula calculation.
[0003] The experimental determination method has high accuracy, but it has the problems of difficulty and high risk factor of indoor simulation experiments, and has high requirements for experimental equipment. In addition, the experimental determination of the deviation factor of sulfur-containing gas reservoirs takes a long time, and sometimes the timeliness of the data cannot be guaranteed.
[0004] The empirical formula method is only applicable to cases with low H2S mole fractions. The higher the H2S mole fraction, the greater the error.
[0005] A Chinese patent document with publication number CN114169559A and publication date March 11, 2022 discloses a method for predicting the spatiotemporal distribution characteristics of damage to sulfur deposition reservoirs, characterized in that it includes the following steps: obtaining an elemental sulfur fluid phase diagram of a gas well-controlled reservoir, and obtaining the sulfur precipitation pressure Ps and precipitation state under the temperature conditions of the gas well-controlled reservoir from the elemental sulfur fluid phase diagram; measuring the amount of sulfur dissolved in a gas sample and the saturated elemental sulfur content of the formation in the gas well-controlled reservoir; establishing an elemental sulfur dissolution model for the gas well-controlled reservoir based on the elemental sulfur fluid phase diagram and the amount of sulfur dissolved in a gas sample and the saturated elemental sulfur content of the formation in the gas well-controlled reservoir; obtaining the sulfur saturation Ss of elemental sulfur through an elemental sulfur core displacement experiment, and obtaining the sulfur saturation Ss of the elemental sulfur according to the core displacement experiment; obtaining the sulfur saturation Ss of the elemental sulfur through the elemental sulfur ... The parameters of the experiment are used to obtain the gas phase relative permeability Krg corresponding to the sulfur saturation Ss obtained under different parameter conditions; based on the material balance equation of the closed constant volume gas reservoir, the relationship between the average formation pressure P of the gas well controlled reservoir and the cumulative gas production Q of the gas well controlled reservoir is obtained; based on the elemental sulfur dissolution model, the relationship between the gas phase relative permeability Krg corresponding to the sulfur saturation Ss obtained under different parameter conditions and the average formation pressure P of the gas well controlled reservoir and the cumulative gas production Gp of the gas well controlled reservoir, a prediction model for the spatiotemporal variation law of sulfur deposition reservoir damage in the gas well controlled reservoir is established; according to the prediction model for the spatiotemporal variation law of sulfur deposition reservoir damage, the time and location of sulfur deposition in the gas well controlled reservoir and the degree of sulfur deposition are predicted.
[0006] The method for predicting the temporal and spatial distribution characteristics of sulfur deposition reservoir damage disclosed in the patent document can predict the time when sulfur deposition will occur in high-sulfur gas wells after the formation pressure decreases due to exploitation. However, since the gas deviation factor of the sulfur-containing gas reservoir cannot be effectively simulated and calculated, the factors considered are not comprehensive, and the reliability of the prediction results is poor. Summary of the invention
[0007] In order to overcome the defects of the above-mentioned prior art, the present invention provides a method for predicting the gas deviation factor of sour gas reservoirs. The present invention simulates and calculates the gas deviation factor of sour gas reservoirs by modeling based on a large amount of experimental data. The method has the characteristics of comprehensive consideration of factors, objective calculation method, reliable results and simple operation method.
[0008] The present invention is achieved through the following technical solutions:
[0009] A method for predicting gas deviation factor of a sour gas reservoir, characterized by comprising the following steps:
[0010] S1. Determine the reference series and comparison series of the analysis object and collect parameter data;
[0011] S2. Use mean value processing to make the reference series data dimensionless;
[0012] S3. Calculate the absolute value, minimum value and maximum value of the difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0013] S4. Calculate the correlation coefficient between each influencing factor and the gas deviation factor of the corresponding sour gas reservoir by using formula 1;
[0014]
[0015] in:
[0016] λ i (k) is the correlation coefficient between the influencing factor of the kth group of data i and the gas deviation factor of the sour gas reservoir;
[0017] ρ is the resolution coefficient, ρ is taken as 0.5;
[0018] y(k) is the gas deviation factor of the kth group of sour gas reservoirs, k = 1, 2..., m;
[0019] is the dimensionless value of the i-th influencing factor in the k-th group;
[0020] min is the minimum difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0021] max is the maximum value of the difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0022] S5, calculate the correlation degree by formula 2;
[0023]
[0024] Where: m is the number of data groups;
[0025] r iis the correlation between the influencing factor i and the gas deviation factor of the sour gas reservoir;
[0026] S6. Sort the influencing factors according to their correlation with the gas deviation factor of the corresponding sour gas reservoir;
[0027] S7, define BP neural network related variables, including input vector, hidden layer input vector, hidden layer output vector, output layer input vector, output layer output vector, expected output vector, error function and activation function;
[0028] S8, calculate the input and output of each layer of neurons;
[0029] S9, using the expected output and actual output of the network, calculate the partial derivative of the error function with respect to each neuron in the output layer using Formula 3;
[0030]
[0031] Where: e is the error function; w oh is the connection weight between the hidden layer and the output layer; yi o is the input vector of the output layer; h oh is the hidden layer output vector; δ o is the partial derivative of the output layer;
[0032] S10, the connection weight from the hidden layer to the output layer, and the δ of the output layer o (k) and the output of the hidden layer to calculate the partial derivative δ of the error function with respect to each neuron in the hidden layer h (k);
[0033]
[0034] Where: w hi Hi is the connection weight of the hidden layer input vector; h Input vector for hidden layer;
[0035] S11, using the δ of each neuron in the output layer h (k) and the output modified connection weights w of each neuron in the hidden layer oh (k);
[0036]
[0037] Where: μ is the set learning rate;
[0038] S12, using the δ of each neuron in the hidden layer h (k) and the input-corrected connection weights of each neuron in the input layer;
[0039]
[0040] S13, error calculation, and judging whether the network error meets the requirements;
[0041] S14. Group the input samples according to the ratio of 7:1.5:1.5 into a training group, a validation group and a prediction group, and sequentially participate in completing steps S8-S13. The training group is used to form a neural network model; the validation group is used to verify the correctness of the neural network model; the prediction group is used to predict the gas deviation factor of the sulfur-containing gas reservoir and obtain the prediction result.
[0042] In step S1, the reference sequence is the influencing factors of the gas deviation factor of the sour gas reservoir, including formation temperature, formation pressure, gas critical temperature, gas critical pressure and the content of H2S, CO2, CH4 and C2H6 in the gas, and the reference sequence is recorded as x i =x i (k)|k=1,2...m, i=1,2...n.
[0043] In the step S1, the comparison series is the gas deviation factor of each sour gas reservoir, and the comparison series is recorded as y=y(k)|k=1,2...m.
[0044] In step S2, dimensionless conversion specifically refers to dividing the influencing factor data by the influencing factor sample average value. The dimensionless reference series is recorded as
[0045] In step S3, the absolute value of the difference is calculated by formula 7;
[0046]
[0047] In step S3, the minimum value is calculated by formula 8;
[0048]
[0049] In step S3, the maximum value is calculated by formula 9;
[0050]
[0051] In step S5, the correlation degree specifically refers to respectively calculating the average of the correlation coefficients between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir, so as to reflect the correlation relationship between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir.
[0052] The step S13 specifically means that when the error reaches the preset accuracy or the number of learning times is greater than the set maximum number, the algorithm is terminated; otherwise, the next learning sample and the corresponding expected output are selected, and the next round of learning is returned.
[0053] In step S13, the error calculation is performed using formula 10;
[0054]
[0055] Where: E is the average error of all samples.
[0056] The beneficial effects of the present invention are mainly manifested in the following aspects:
[0057] 1. The present invention simulates and calculates the gas deviation factor of a sour gas reservoir by modeling based on a large amount of experimental data, which has the characteristics of comprehensive consideration of factors, objective calculation method, reliable results and simple operation method.
[0058] 2. The present invention can be helpful for accurately calculating the reserves of sulfur-containing gas wells and determining the phase characteristics by simulating and calculating the gas deviation factor of sulfur-containing gas reservoirs.
[0059] 3. Based on a large number of experimental measurement results, the present invention uses the grey correlation method to calculate the correlation between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir. By comparing the size of the correlation coefficient, the correlation degree between each influencing factor and the gas deviation factor of the sour gas reservoir is obtained. Then, the BP neural network is used to establish a natural gas deviation factor prediction model under the influence of high correlation factors. The gas deviation factor of the sour gas reservoir under different conditions can be predicted, ensuring the reliability and timeliness of the data.
[0060] 4. The present invention has a simple and reliable prediction method, high prediction accuracy and good applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0062] Figure 1 It is the correlation diagram between the deviation factor and each influencing factor;
[0063] Figure 2 This is a graph showing the comparison results of neural network training;
[0064] Figure 3 This is a graph of neural network training and verification results;
[0065] Figure 4 The prediction result graph for neural network training;
[0066] Figure 5 This is the relative error result diagram between the predicted value and the experimental value. DETAILED DESCRIPTION
[0067] Example 1
[0068] See also Figure 1-Figure 5 , a method for predicting gas deviation factor of a sour gas reservoir comprises the following steps:
[0069] S1. Determine the reference series and comparison series of the analysis object and collect parameter data;
[0070] S2. Use mean value processing to make the reference series data dimensionless;
[0071] S3. Calculate the absolute value, minimum value and maximum value of the difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0072] S4. Calculate the correlation coefficient between each influencing factor and the gas deviation factor of the corresponding sour gas reservoir by using formula 1;
[0073]
[0074] in:
[0075] λ i (k) is the correlation coefficient between the influencing factor of the kth group of data i and the gas deviation factor of the sour gas reservoir;
[0076] ρ is the resolution coefficient, ρ is taken as 0.5;
[0077] y(k) is the gas deviation factor of the kth group of sour gas reservoirs, k = 1, 2..., m;
[0078] is the dimensionless value of the i-th influencing factor in the k-th group;
[0079] min is the minimum difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0080] max is the maximum value of the difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0081] S5, calculate the correlation degree by formula 2;
[0082]
[0083] Where: m is the number of data groups;
[0084] r i is the correlation between the influencing factor i and the gas deviation factor of the sour gas reservoir;
[0085] S6. Sort the influencing factors according to their correlation with the gas deviation factor of the corresponding sour gas reservoir;
[0086] S7, define BP neural network related variables, including input vector, hidden layer input vector, hidden layer output vector, output layer input vector, output layer output vector, expected output vector, error function and activation function;
[0087] S8, calculate the input and output of each layer of neurons;
[0088] S9, using the expected output and actual output of the network, calculate the partial derivative of the error function with respect to each neuron in the output layer using Formula 3;
[0089]
[0090] Where: e is the error function; w oh is the connection weight between the hidden layer and the output layer; yi o is the input vector of the output layer; h oh is the hidden layer output vector; δ o is the partial derivative of the output layer;
[0091] S10, the connection weight from the hidden layer to the output layer, and the δ of the output layer o (k) and the output of the hidden layer to calculate the partial derivative δ of the error function with respect to each neuron in the hidden layer h (k);
[0092]
[0093] Where: w hi Hi is the connection weight of the hidden layer input vector; h Input vector for hidden layer;
[0094] S11, using the δ of each neuron in the output layer h (k) and the output modified connection weights w of each neuron in the hidden layer oh (k);
[0095]
[0096] Where: μ is the set learning rate;
[0097] S12, using the δ of each neuron in the hidden layer h (k) and the input-corrected connection weights of each neuron in the input layer;
[0098]
[0099] S13, error calculation, and judging whether the network error meets the requirements;
[0100] S14. Group the input samples according to the ratio of 7:1.5:1.5 into a training group, a validation group and a prediction group, and sequentially participate in completing steps S8-S13. The training group is used to form a neural network model; the validation group is used to verify the correctness of the neural network model; the prediction group is used to predict the gas deviation factor of the sulfur-containing gas reservoir and obtain the prediction result.
[0101] This embodiment is the most basic implementation method. By modeling based on a large amount of experimental data, the gas deviation factor of the sour gas reservoir is simulated and calculated. It has the characteristics of comprehensive consideration of factors, objective calculation method, reliable results and simple operation method.
[0102] Example 2
[0103] See also Figure 1-Figure 5 , a method for predicting gas deviation factor of a sour gas reservoir comprises the following steps:
[0104] S1. Determine the reference series and comparison series of the analysis object and collect parameter data;
[0105] S2. Use mean value processing to make the reference series data dimensionless;
[0106] S3. Calculate the absolute value, minimum value and maximum value of the difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0107] S4. Calculate the correlation coefficient between each influencing factor and the gas deviation factor of the corresponding sour gas reservoir by using formula 1;
[0108]
[0109] in:
[0110] λ i (k) is the correlation coefficient between the influencing factor of the kth group of data i and the gas deviation factor of the sour gas reservoir;
[0111] ρ is the resolution coefficient, ρ is taken as 0.5;
[0112] y(k) is the gas deviation factor of the kth group of sour gas reservoirs, k = 1, 2..., m;
[0113] is the dimensionless value of the i-th influencing factor in the k-th group;
[0114] min is the minimum difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0115] max is the maximum value of the difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0116] S5, calculate the correlation degree by formula 2;
[0117]
[0118] Where: m is the number of data groups;
[0119] r i is the correlation between the influencing factor i and the gas deviation factor of the sour gas reservoir;
[0120] S6. Sort the influencing factors according to their correlation with the gas deviation factor of the corresponding sour gas reservoir;
[0121] S7, define BP neural network related variables, including input vector, hidden layer input vector, hidden layer output vector, output layer input vector, output layer output vector, expected output vector, error function and activation function;
[0122] S8, calculate the input and output of each layer of neurons;
[0123] S9, using the expected output and actual output of the network, calculate the partial derivative of the error function with respect to each neuron in the output layer using Formula 3;
[0124]
[0125] Where: e is the error function; w oh is the connection weight between the hidden layer and the output layer; yi o is the input vector of the output layer; h oh is the hidden layer output vector; δ o is the partial derivative of the output layer;
[0126] S10, the connection weight from the hidden layer to the output layer, and the δ of the output layer o (k) and the output of the hidden layer to calculate the partial derivative δ of the error function with respect to each neuron in the hidden layer h (k);
[0127]
[0128] Where: w hi Hi is the connection weight of the hidden layer input vector; h Input vector for hidden layer;
[0129] S11, using the δ of each neuron in the output layer h (k) and the output modified connection weights w of each neuron in the hidden layer oh (k);
[0130]
[0131] Where: μ is the set learning rate;
[0132] S12, using the δ of each neuron in the hidden layer h (k) and the input-corrected connection weights of each neuron in the input layer;
[0133]
[0134] S13, error calculation, and judging whether the network error meets the requirements;
[0135] S14. Group the input samples according to the ratio of 7:1.5:1.5 into a training group, a validation group and a prediction group, and sequentially participate in completing steps S8-S13. The training group is used to form a neural network model; the validation group is used to verify the correctness of the neural network model; the prediction group is used to predict the gas deviation factor of the sulfur-containing gas reservoir and obtain the prediction result.
[0136] In step S1, the reference sequence is the influencing factors of the gas deviation factor of the sour gas reservoir, including formation temperature, formation pressure, gas critical temperature, gas critical pressure and the content of H2S, CO2, CH4 and C2H6 in the gas, and the reference sequence is recorded as x i =x i (k)|k=1,2...m, i=1,2...n.
[0137] In the step S1, the comparison series is the gas deviation factor of each sour gas reservoir, and the comparison series is recorded as y=y(k)|k=1,2...m.
[0138] In step S2, dimensionless conversion specifically refers to dividing the influencing factor data by the influencing factor sample average value. The dimensionless reference series is recorded as
[0139] In step S3, the absolute value of the difference is calculated by formula 7;
[0140]
[0141] In step S3, the minimum value is calculated by formula 8;
[0142]
[0143] In step S3, the maximum value is calculated by formula 9;
[0144]
[0145] This embodiment is a preferred implementation mode, which can be helpful for accurately calculating the reserves of sour gas wells and determining the phase characteristics by simulating and calculating the gas deviation factor of sour gas reservoirs.
[0146] Example 3
[0147] See also Figure 1-Figure 5 , a method for predicting gas deviation factor of a sour gas reservoir comprises the following steps:
[0148] S1. Determine the reference series and comparison series of the analysis object and collect parameter data;
[0149] S2. Use mean value processing to make the reference series data dimensionless;
[0150] S3. Calculate the absolute value, minimum value and maximum value of the difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0151] S4. Calculate the correlation coefficient between each influencing factor and the gas deviation factor of the corresponding sour gas reservoir by using formula 1;
[0152]
[0153] in:
[0154] λ i (k) is the correlation coefficient between the influencing factor of the kth group of data i and the gas deviation factor of the sour gas reservoir;
[0155] ρ is the resolution coefficient, ρ is taken as 0.5;
[0156] y(k) is the gas deviation factor of the kth group of sour gas reservoirs, k = 1, 2..., m;
[0157] is the dimensionless value of the i-th influencing factor in the k-th group;
[0158] min is the minimum difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0159] max is the maximum value of the difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir;
[0160] S5, calculate the correlation degree by formula 2;
[0161]
[0162] Where: m is the number of data groups;
[0163] r i is the correlation between the influencing factor i and the gas deviation factor of the sour gas reservoir;
[0164] S6. Sort the influencing factors according to their correlation with the gas deviation factor of the corresponding sour gas reservoir;
[0165] S7, define BP neural network related variables, including input vector, hidden layer input vector, hidden layer output vector, output layer input vector, output layer output vector, expected output vector, error function and activation function;
[0166] S8, calculate the input and output of each layer of neurons;
[0167] S9, using the expected output and actual output of the network, calculate the partial derivative of the error function with respect to each neuron in the output layer using Formula 3;
[0168]
[0169] Where: e is the error function; w oh is the connection weight between the hidden layer and the output layer; yi o is the input vector of the output layer; h oh is the hidden layer output vector; δ o is the partial derivative of the output layer;
[0170] S10, the connection weight from the hidden layer to the output layer, and the δ of the output layer o (k) and the output of the hidden layer to calculate the partial derivative δ of the error function with respect to each neuron in the hidden layer h (k);
[0171]
[0172] Where: w hi Hi is the hidden layer input vector connection weight; h Input vector for hidden layer;
[0173] S11, using the δ of each neuron in the output layer h (k) and the output modified connection weights w of each neuron in the hidden layer oh (k);
[0174]
[0175] Where: μ is the set learning rate;
[0176] S12, using the δ of each neuron in the hidden layer h (k) and the input-corrected connection weights of each neuron in the input layer;
[0177]
[0178] S13, error calculation, and judging whether the network error meets the requirements;
[0179] S14. Group the input samples according to the ratio of 7:1.5:1.5 into a training group, a validation group and a prediction group, and sequentially participate in completing steps S8-S13. The training group is used to form a neural network model; the validation group is used to verify the correctness of the neural network model; the prediction group is used to predict the gas deviation factor of the sulfur-containing gas reservoir and obtain the prediction result.
[0180] In step S1, the reference sequence is the influencing factors of the gas deviation factor of the sour gas reservoir, including formation temperature, formation pressure, gas critical temperature, gas critical pressure and the content of H2S, CO2, CH4 and C2H6 in the gas, and the reference sequence is recorded as x i =x i (k)|k=1,2...m, i=1,2...n.
[0181] In the step S1, the comparison series is the gas deviation factor of each sour gas reservoir, and the comparison series is recorded as y=y(k)|k=1,2...m.
[0182] In step S2, dimensionless conversion specifically refers to dividing the influencing factor data by the influencing factor sample average value. The dimensionless reference series is recorded as
[0183] In step S3, the absolute value of the difference is calculated by formula 7;
[0184]
[0185] In step S3, the minimum value is calculated by formula 8;
[0186]
[0187] In step S3, the maximum value is calculated by formula 9;
[0188]
[0189] In step S5, the correlation degree specifically refers to respectively calculating the average of the correlation coefficients between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir, so as to reflect the correlation relationship between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir.
[0190] The step S13 specifically means that when the error reaches the preset accuracy or the number of learning times is greater than the set maximum number, the algorithm is terminated; otherwise, the next learning sample and the corresponding expected output are selected, and the next round of learning is returned.
[0191] In step S13, the error calculation is performed using formula 10;
[0192]
[0193] Where: E is the average error of all samples.
[0194] This embodiment is the best implementation method. Based on a large number of experimental measurement results, the grey correlation method is used to calculate the correlation between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir. By comparing the size of the correlation coefficient, the correlation degree between each influencing factor and the gas deviation factor of the sour gas reservoir is obtained. Then, the BP neural network is used to establish a natural gas deviation factor prediction model under the influence of high correlation factors. The gas deviation factor of the sour gas reservoir under different conditions can be predicted, ensuring the reliability and timeliness of the data.
[0195] The entire prediction method is simple and reliable, has high prediction accuracy and good applicability.
[0196] Define the BP neural network related variables as follows:
[0197] Input vector: x = (x1, x2, ..., x n )
[0198] Hidden layer input vector: hi = (hi1, hi2, ..., hi p )
[0199] Hidden layer output vector: ho = (ho1,ho2,...,ho p )
[0200] Output layer input vector: yi = (yi1, yi2, ..., yi q )
[0201] Output layer output vector: yo=(yo1,yo2,...,yo q )
[0202] Expected output vector: d o =(d1,d2,...,d q )
[0203] Error function:
[0204] Activation function: f(x)=k*x+c
[0205] The input and output of each layer of neurons are calculated as follows:
[0206]
[0207] ho h (k) = f(hi h (k)) h=1,2,...,p
[0208]
[0209] yo o (k)=f(yio(k)) o=1,2,...,q
[0210] Where: w hi is the connection weight between the input layer and the hidden layer; w oh is the connection weight between the hidden layer and the output layer; hi h is the input vector of the hidden layer; ho h is the output vector of the hidden layer; yi o is the input vector of the hidden layer; yo o is the output vector of the hidden layer; p is the number of neurons in the hidden layer; q is the number of neurons in the output layer.
Claims
1. A method for predicting gas deviation factor of a sour gas reservoir, characterized in that: The following steps are involved: S1. Determine the reference series and comparison series of the analysis object and collect parameter data; S2. Use mean value processing to make the reference series data dimensionless; S3. Calculate the absolute value, minimum value and maximum value of the difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir; S4. Calculate the correlation coefficient between each influencing factor and the gas deviation factor of the corresponding sour gas reservoir by using formula 1; in: λ i (k) is the correlation coefficient between the influencing factor of the kth group of data i and the gas deviation factor of the sour gas reservoir; ρ is the resolution coefficient, ρ is taken as 0.5; y(k) is the gas deviation factor of the kth group of sour gas reservoirs, k = 1, 2..., m; is the dimensionless value of the i-th influencing factor in the k-th group; min is the minimum difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir; max is the maximum value of the difference between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir; S5, calculate the correlation degree by formula 2; Where: m is the number of data groups; r i is the correlation between the influencing factor i and the gas deviation factor of the sour gas reservoir; S6. Sort the influencing factors according to their correlation with the gas deviation factor of the corresponding sour gas reservoir; S7, define BP neural network related variables, including input vector, hidden layer input vector, hidden layer output vector, output layer input vector, output layer output vector, expected output vector, error function and activation function; S8, calculate the input and output of each layer of neurons; S9, using the expected output and actual output of the network, calculate the partial derivative of the error function with respect to each neuron in the output layer using Formula 3; Where: e is the error function; w oh is the connection weight between the hidden layer and the output layer; yi o is the input vector of the output layer; h oh is the hidden layer output vector; δ o is the partial derivative of the output layer; S10, the connection weight from the hidden layer to the output layer, and the δ of the output layer o (k) and the output of the hidden layer to calculate the partial derivative δ of the error function with respect to each neuron in the hidden layer h (k); Where: w hi Hi is the connection weight of the hidden layer input vector; h Input vector for hidden layer; S11, using the δ of each neuron in the output layer h (k) and the output modified connection weights w of each neuron in the hidden layer oh (k); Where: μ is the set learning rate; S12, using the δ of each neuron in the hidden layer h (k) and the input-corrected connection weights of each neuron in the input layer; S13, error calculation, and judging whether the network error meets the requirements; S14. Group the input samples according to the ratio of 7:1.5:1.5 into a training group, a validation group and a prediction group, and sequentially participate in completing steps S8-S13. The training group is used to form a neural network model; the validation group is used to verify the correctness of the neural network model; the prediction group is used to predict the gas deviation factor of the sulfur-containing gas reservoir and obtain the prediction result.
2. The method for predicting gas deviation factor of sour gas reservoir according to claim 1, characterized in that: In step S1, the reference sequence is the influencing factors of the gas deviation factor of the sour gas reservoir, including formation temperature, formation pressure, gas critical temperature, gas critical pressure and the content of H2S, CO2, CH4 and C2H6 in the gas, and the reference sequence is recorded as x i =x i (k)|k=1,2...m, i=1,2...n.
3. The method for predicting gas deviation factor of sour gas reservoir according to claim 1, characterized in that: In the step S1, the comparison series is the gas deviation factor of each sour gas reservoir, and the comparison series is recorded as y=y(k)|k=1,2...m.
4. The method for predicting gas deviation factor of sour gas reservoir according to claim 1, characterized in that: In step S2, dimensionless conversion specifically refers to dividing the influencing factor data by the influencing factor sample average value. The dimensionless reference series is recorded as 5. The method for predicting gas deviation factor of sour gas reservoir according to claim 1, characterized in that: In step S3, the absolute value of the difference is calculated by formula 7; 6. The method for predicting gas deviation factor of sour gas reservoir according to claim 1, characterized in that: In step S3, the minimum value is calculated by formula 8; 7. The method for predicting gas deviation factor of sour gas reservoir according to claim 1, characterized in that: In step S3, the maximum value is calculated by formula 9; 8. The method for predicting gas deviation factor of sour gas reservoir according to claim 1, characterized in that: In step S5, the correlation degree specifically refers to respectively calculating the average of the correlation coefficients between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir, so as to reflect the correlation relationship between each influencing factor and the corresponding gas deviation factor of the sour gas reservoir.
9. The method for predicting gas deviation factor of sour gas reservoir according to claim 1, characterized in that: The step S13 specifically means that when the error reaches the preset accuracy or the number of learning times is greater than the set maximum number, the algorithm is terminated; otherwise, the next learning sample and the corresponding expected output are selected, and the next round of learning is returned.
10. The method for predicting gas deviation factor of sour gas reservoir according to claim 1, characterized in that: In step S13, the error calculation is performed using formula 10; Where: E is the average error of all samples.
Citation Information
Patent Citations
Sulfur deposition reservoir damage spatio-temporal distribution characteristic prediction method
CN114169559A