Prediction method and system for compression factor of natural gas with high hydrogen sulfide content
By collecting and processing natural gas data, calculating virtual temperature and pressure, and using neural network models to predict the compression factor of high hydrogen sulfide natural gas, the problem of large calculation errors in the prior art is solved and the prediction accuracy is improved.
Patent Information
- Application Number
- CN202311216580.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2025-03-21
AI Technical Summary
The existing natural gas compression factor calculation method has large errors in the environment of high hydrogen sulfide natural gas, and the compression factor cannot be accurately predicted.
By collecting multiple sets of natural gas data, virtual temperature and virtual pressure are calculated, and the compression factors of high hydrogen sulfide natural gas are predicted through neural network models.
The accuracy of the prediction of compression factors of high hydrogen sulfide-containing natural gas is improved, and detection errors caused by high hydrogen sulfide content are reduced.
Smart Images

Figure SMS_12 
Figure SMS_24 
Figure SMS_25
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural gas, and in particular to a method and system for predicting the compression factor of natural gas with a high hydrogen sulfide content. Background Art
[0002] Natural gas is gradually being widely used as a clean energy source. It is estimated that by 2030, the proportion of natural gas consumption in primary energy will reach 15%, so the development and utilization of various types of natural gas resources are particularly important. Due to differences in geological conditions, the quality of natural gas at the wellhead of the gas source varies. As one of the main natural gas production areas in my country, the Sichuan-Chongqing region contains hydrogen sulfide (H2S) natural gas, which accounts for a large proportion of the total natural gas resources. Among them, the Puguang gas field, Wolonghe gas field, Zhongba gas field, Weiyuan gas field in the Sichuan Basin and the Luojiazhai gas field in Chongqing are typical representatives of sour natural gas. The hydrogen sulfide content of natural gas produced at the wellhead of these gas fields ranges from 5% to 88%.
[0003] For the calculation of the compression factor of these high-hydrogen sulfide natural gas, the current general standard for calculating the compression factor of natural gas is the AGA8-92 DC equation proposed in GB 17747 "Calculation of Natural Gas Compression Factor". However, the H2S content applicable to this equation is 0-0.02%, which is much lower than the hydrogen sulfide content of natural gas in high-sulfur gas fields. This will lead to a large deviation in the calculation results of the compression factor, and thus a large deviation in the calculation results of subsequent related parameters. In addition, there are some commonly used thermodynamic calculation models and empirical correlations for calculation. However, the scope of application of the above methods is relatively narrow, especially when the amount of hydrogen sulfide in the natural gas is large, there will be a large error.
[0004] Machine learning method for predicting natural gas compression factor is an emerging intelligent method. The accuracy of this method in predicting the compression factor of natural gas with high hydrogen sulfide content needs to be further improved. Currently, a method and system for predicting the compression factor of natural gas with high hydrogen sulfide content is needed to solve the above problem. Summary of the invention
[0005] The technical problem to be solved by the present invention is the low accuracy in predicting the compression factor of natural gas with high hydrogen sulfide content. The purpose is to provide a method and system for predicting the compression factor of natural gas with high hydrogen sulfide content to solve the above problem.
[0006] The present invention is achieved through the following technical solutions:
[0007] A method for predicting the compression factor of natural gas with high hydrogen sulfide content, comprising: collecting multiple groups of natural gas data, each group of the natural gas data including natural gas components, pressure, temperature and compression factor; respectively obtaining the critical temperature and critical pressure of each group of the natural gas data, calculating a virtual temperature using the critical temperature and the natural gas components, and calculating a virtual pressure using the critical pressure and the natural gas components, and correcting a comparative temperature and a comparative pressure using the virtual temperature and the virtual pressure; substituting multiple groups of natural gas training data into a neural network model for training, each group of the natural gas training data including the natural gas components, the comparative temperature, the comparative pressure and the compression factor; and predicting the compression factor of the natural gas with high hydrogen sulfide content according to the trained model.
[0008] The virtual temperature is calculated by using the critical temperature and the natural gas composition, and the virtual pressure is calculated by using the critical pressure and the natural gas composition, including: the comparison temperature T r and the comparative pressure P r The calculation method is as follows: In formula (1), T is the natural gas temperature, T pc is the virtual temperature; in formula (2), P is the natural gas pressure, P pc is the virtual pressure; wherein the virtual temperature T pc and the virtual pressure P pc They are obtained by the following formulas: In formula (3), T ci is the critical temperature, x i is the natural gas component; in formula (4), P ci is the critical pressure.
[0009] The virtual temperature and the virtual pressure are used to correct the comparative temperature and the comparative pressure, including: pc Correction is performed to obtain the comparative temperature T′ pc , for the virtual pressure P pc Correction is performed to obtain the comparative pressure P′ pc , the calculation method is as follows: T' pc =T pc -ε (5); Where, ε = 15 (MM 2 )+4.167(N 0.5 -N 2 ) (7); In formula (7), ε is the correction parameter; M is CO 2 and H 2 S is the sum of the molar fractions of the two; N is H 2 The mole fraction of S.
[0010] The above-mentioned method for predicting the compression factor of natural gas with high hydrogen sulfide content also includes the following steps: dividing the multiple groups of natural gas data that are fully / partially corrected into training sets and test sets, substituting the training sets into the neural network model for training, and after training, substituting the test sets into the neural network model for testing.
[0011] Multiple sets of natural gas training data are substituted into the neural network model for training, including: initializing the input layer natural gas component x j , hidden layer m, output layer Y, number of hidden layers l, input layer x i The connection weight ω of the hidden layer m ij , output layer Y and hidden layer H i The connection weight ω jk , hidden layer threshold b ij , output layer threshold b jk , given the learning rate η and the activation function; calculate the hidden layer output: in, is the hidden layer activation function, and the calculation formula of the hidden layer activation function is expressed as:
[0012] Multiple sets of natural gas training data are substituted into the neural network model for training, which also includes: Calculating the network prediction output layer: in, is the output layer function, and the expression of the output layer function is as follows: Linear = Pureline: f(x) = x (11).
[0013] Multiple sets of natural gas training data are substituted into the neural network model for training, which also includes: calculating the network prediction error: e k =Y k -O k ,k=1,2,…,m (12); where Y k is the expected output.
[0014] Multiple sets of natural gas training data are substituted into the neural network model for training, which also includes: according to the prediction error e k Update weight ω ij and weight ω jk : ω jk =ω jk +ηH j e k ,j=1,2,…l;k=1,2,…,m (14);where η is the learning rate.
[0015] Multiple sets of natural gas training data are substituted into the neural network model for training, which also includes: according to the prediction error e kUpdate the hidden layer threshold b ij and the output layer threshold b jk :
[0016]
[0017] b jk =b jk +e k ,j=1,2,…l;k=1,2,…,m (16); Determine whether the iteration is finished, the end condition is error e<10 -3 , if not finished, return.
[0018] A prediction system for the compression factor of natural gas with high hydrogen sulfide content, comprising: a data acquisition module: collecting multiple groups of natural gas data, each group of the natural gas data includes natural gas components, pressure, temperature and compression factor; a data correction module: respectively obtaining the critical temperature and critical pressure of each group of the natural gas data, calculating a virtual temperature using the critical temperature and the natural gas components, and calculating a virtual pressure using the critical pressure and the natural gas components, and correcting a comparative temperature and a comparative pressure using the virtual temperature and the virtual pressure; a model training module: substituting multiple groups of natural gas training data into a neural network model for training, each group of the natural gas training data includes the natural gas components, the comparative temperature, the comparative pressure and the compression factor; a model prediction module: predicting the compression factor of the natural gas with high hydrogen sulfide content according to the trained model.
[0019] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0020] This application collects multiple groups of natural gas data, each group of natural gas data includes natural gas components, pressure, temperature and compression factor, obtains the critical temperature and critical pressure of each group of data according to the corresponding natural gas components, and then calculates the virtual temperature by using the critical temperature and natural gas components, and calculates the virtual pressure by using the critical pressure and natural gas components, and then further obtains the corrected temperature and pressure data by using the virtual temperature and virtual pressure. The corrected data is trained by machine learning to obtain a neural network model to detect the natural gas compression factor, avoiding the low accuracy of compression factor detection caused by the high content of hydrogen sulfide in natural gas. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:
[0022] Figure 1 This is a flow chart of a method for predicting the compression factor of natural gas with high hydrogen sulfide content according to an embodiment of the present application;
[0023] Figure 2 A schematic diagram of the modified artificial neural network training and prediction according to the embodiment of the present application;
[0024] Figure 3 A prediction error diagram of the method of an embodiment of the present application;
[0025] Figure 4 Pressure sensitivity diagram for traditional equation of state and empirical correlation method; Figure 5 This is a pressure sensitivity map of the artificial intelligence algorithm of an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0027] Example
[0028] like Figure 1 to Figure 4 As shown, an embodiment of the present application provides a method for predicting the compression factor of natural gas with high hydrogen sulfide content, including: collecting multiple groups of natural gas data, each group of the natural gas data includes natural gas components, pressure, temperature and compression factor; respectively obtaining the critical temperature and critical pressure of each group of the natural gas data, calculating the virtual temperature using the critical temperature and the natural gas components, and calculating the virtual pressure using the critical pressure and the natural gas components, and correcting the virtual temperature and the virtual pressure to obtain the comparative temperature and comparative pressure; substituting the multiple groups of natural gas training data into a neural network model for training, each group of the natural gas training data includes the natural gas components, the comparative temperature, the comparative pressure and the compression factor; and predicting the compression factor of the natural gas with high hydrogen sulfide content according to the trained model.
[0029] Collect multiple sets of natural gas data, each set of natural gas data includes natural gas components, pressure, temperature and compression factor. Each set of data can obtain the corresponding critical temperature and critical pressure according to different components, so as to use the critical temperature and natural gas components to correct the temperature, and use the critical pressure and natural gas components to correct the pressure, and calculate the temperature and pressure of natural gas under certain temperature and pressure conditions. The corrected data is trained through machine learning to obtain a neural network model, so as to detect the compression factor of natural gas, which can eliminate the problem of low detection accuracy of the compression factor due to the high hydrogen sulfide content of natural gas.
[0030] The virtual temperature is calculated by using the critical temperature and the natural gas composition, and the virtual pressure is calculated by using the critical pressure and the natural gas composition, including: the comparison temperature T r and the comparative pressure P r The calculation method is as follows: In formula (1), T is the natural gas temperature, T pc is the virtual temperature; in formula (2), P is the natural gas pressure, P pc is the virtual pressure; wherein the virtual temperature T pc and the virtual pressure P pc They are obtained by the following formulas: In formula (3), T ci is the critical temperature, x i is the natural gas component; in formula (4), P ci is the critical pressure.
[0031] The virtual temperature of natural gas is obtained by multiplying the critical temperature of each component by the mole fraction corresponding to the component in formula (3), and then summing the calculated results of each component. Similarly, the virtual pressure can be obtained through formula (4). Among them, the critical temperature and critical pressure of different natural gas components can be directly queried through the gas-liquid physical property estimation manual.
[0032] Specifically, for high-sulfur natural gas, its compression factor is quite different from that of conventional natural gas, and has a great relationship with the sulfur content in natural gas. Therefore, the present application obtains the virtual temperature through the components and critical temperature, thereby calculating the corrected comparative temperature. The virtual pressure is obtained through the components and critical pressure, and the ratio of the actual temperature to the virtual temperature is the same as the ratio of the actual pressure to the virtual pressure, thereby obtaining the corrected comparative pressure, so as to correct the temperature and pressure of high-sulfur natural gas when predicting the compression factor, thereby improving the accuracy of predicting the compression factor of high-hydrogen sulfide natural gas.
[0033] The virtual temperature and the virtual pressure are used to correct the comparative temperature and the comparative pressure, including: pc Correction is performed to obtain the comparative temperature T′ pc , for the virtual pressure P pc Correction is performed to obtain the comparative pressure P′ pc , the calculation method is as follows: T' pc =T pc -ε (5); Where, ε = 15 (MM 2 )+4.167(N 0.5 -N 2 ) (7); In formula (7), ε is the correction parameter; M is CO2 and H 2 S is the sum of the molar fractions of the two; N is H 2 The mole fraction of S.
[0034] The critical temperature and critical pressure are obtained by using the Wichest-Aziz correction method. r and virtual pressure P r By making corrections, more accurate results can be obtained. Among them, the virtual temperature and virtual pressure are calculated using H 2 The mass fraction of S is corrected to obtain more accurate comparative temperature and comparative pressure, which is more suitable for the prediction of the compression factor of natural gas with high hydrogen sulfide content. Substituting the calculation result of formula (7) into formula (5) can obtain the corrected virtual temperature, i.e., the comparative temperature; and substituting the calculation result of formula (5) into formula (6) can obtain the corrected virtual pressure, i.e., the comparative pressure.
[0035] The above method for predicting the compression factor of natural gas with high hydrogen sulfide content also includes the following steps: dividing the multiple groups of natural gas data after all / partial correction into training sets and test sets, substituting the training sets into the neural network model for training, and substituting the test sets into the neural network model for testing after training. Through training and testing with a large amount of accurate data, the neural network model is further optimized, and the accuracy of the neural network model in predicting the compression factor is improved.
[0036] Multiple sets of natural gas training data are substituted into the neural network model for training, including: initializing the input layer natural gas component x i , hidden layer m, output layer Y, number of hidden layers l, input layer x i The connection weight ω of the hidden layer m ij , output layer Y and hidden layer H i The connection weight ω jk , hidden layer threshold b ij , output layer threshold b jk , given the learning rate η and the activation function; calculate the hidden layer output: in, is the hidden layer activation function, and the calculation formula of the hidden layer activation function is expressed as:
[0037] Multiple sets of natural gas training data are substituted into the neural network model for training, which also includes: Calculating the network prediction output layer: in, is the output layer function, and the expression of the output layer function is as follows: Linear = Pureline: f(x) = x (11).
[0038] Multiple sets of natural gas training data are substituted into the neural network model for training, which also includes: calculating the network prediction error: e k =Y k -O k ,k=1,2,…,m (12); where Y k is the expected output.
[0039] Multiple sets of natural gas training data are substituted into the neural network model for training, which also includes: according to the prediction error e k Update weight ω ij and weight ω jk : ω jk =ω jk +ηH j e k ,j=1,2,…l;k=1,2,…,m (14);where η is the learning rate.
[0040] Multiple sets of natural gas training data are substituted into the neural network model for training, which also includes: according to the prediction error e k Update the hidden layer threshold b ij and the output layer threshold b jk :
[0041]
[0042] b jk =b jk +e k ,j=1,2,…l;k=1,2,…,m (16); Determine whether the iteration is finished, the end condition is error e<10 -3 , if not finished, return.
[0043] In this test case, the high hydrogen sulfide natural gas sample data used comes from the paper "Comparison of prediction methods for acid gas deviation factor in Luojiazhai gas field" (Wang Zhouhua, Guo Ping and Zhou Keming, "Natural Gas Industry", 2004; 24 (7): 86-88), and the paper "Study on factors affecting the calculation accuracy of acid gas compression factor" (Han Xianzhu, Liu Yingbiao, Wang Chaofei, "Journal of Petroleum and Natural Gas (Journal of Jianghan Petroleum Institute)", 2010; 32 (3): 315-319). A total of 208 groups of high hydrogen sulfide natural gas were collected. Due to the large scale of the data, only the specific parameter ranges are given below, as shown in Table 1.
[0044]
[0045] Table 1 Parameters of natural gas with high hydrogen sulfide content
[0046] Among them, the compression factor measured experimentally is a correction factor that needs to be considered when the ideal gas state equation is used for actual gas. It is used to represent the deviation in volume between the actual gas after compression and the ideal gas after compression under the same pressure. After the temperature and pressure in the above 208 sets of data are corrected by the method of this embodiment, 145 sets of data are randomly selected as training sets, and these training sets are used to train the model of this embodiment. Part of the data in the remaining 63 sets is used as a test set to test the trained model. After the training is completed, the trained model is used to predict the data in the test set. The final prediction result is as follows: Figure 2 As shown in Table 2, R is the fit.
[0047]
[0048]
[0049] Table 2 Comparison between the method of the embodiment of the present invention and the traditional method
[0050] from Figure 3 It can be seen from Table 2 that the error between the final prediction result and the actual detection value of the method in the embodiment of the present invention is within 3%, indicating that its accuracy is high. It can be seen from Table 2 that compared with the traditional method, the reliability of the method in the embodiment of the present invention is higher.
[0051] At the same time, there are many other technologies in the prior art for predicting the compression factor of high hydrogen sulfide natural gas. The average absolute relative error and fit of the two commonly used state equations, three commonly used empirical correlation equations, and three empirical correlation equations are compared and shown in Table 3. Among them, the comparison equations include the SRK state equation, the BWR state equation proposed by Benedict-Webb-Rubin modified by Soave, namely the BWRS state equation; three commonly used empirical correlation equations, including the Hall-Yarbough (HY) empirical correlation equation, the Dranchuk-Abou-Kassem (DAK) empirical correlation equation and the Dranchuk-Purvis-Robinson (DPR) empirical correlation equation; the acid gas corrected forms of the three commonly used empirical correlation equations, that is, the empirical correlation equations corrected by Wichert-Aziz (WA) acid gas and the empirical correlation equations corrected by GXQ acid gas, namely the Hall-Yarbough+Wichert-Aziz (H-Y+WA) empirical correlation equation, the Dranchuk-Abou-Kassem+Wichert-Aziz (DA-K+WA) empirical correlation equation and the Dranchuk-Purvis-Robinson+Wichert-Aziz (DP-R+WA) empirical correlation equation. The above 8 methods are numbered from front to back, and the final calculation results are shown in Table 3.
[0052] Method No. method Mean absolute relative error, % R 1 SRK equation of state 6.33 0.96971 2 BWRS equation of state 9.82 0.96845 3 HY Experience Correlation 2.87 0.96799 4 DAK Experience Correlation 2.76 0.96773 5 DPR Experience Correlation 3.06 0.92890 6 H-Y+WA experience correlation 3.25 0.96167 7 DA-K+WA experience correlation 3.63 0.96136 8 DP-R+WA empirical correlation 3.46 0.96123
[0053] Table 3 Average absolute relative error and mean square error of 8 calculation methods
[0054] By comparing Table 3 with Table 2, it can be seen that the method of the embodiment of the present invention has a smaller error and higher accuracy than the method in the prior art. At the same time, the traditional thermodynamic empirical formula method and the empirical correlation method for calculating the compressibility factor have a relatively high sensitivity to pressure. For this reason, the pressure sensitivity analysis of the eight traditional methods is as follows: Figure 3 As shown, the pressure sensitivity analysis of the method of the embodiment of the present invention and the traditional artificial intelligence method is as follows Figure 4 shown.
[0055] from Figure 4-5 It can be seen that the average relative errors of the state equation method and the empirical correlation method will increase with the increase of pressure; the artificial intelligence method is not very sensitive to pressure, and the error will not fluctuate greatly with pressure fluctuations, especially the method of the embodiment of the present invention, the error is basically concentrated within ±2%, indicating that the pressure sensitivity of the method of the present invention is low, and the result prediction of the compression factor of high-pressure and low-pressure high-hydrogen sulfide natural gas will not be affected by pressure.
[0056] By correcting the temperature and pressure of high-hydrogen sulfide natural gas, the final model has a minimum relative error of 0.72% when predicting the compression factor of high-sulfur natural gas, with high accuracy. It is suitable for high-hydrogen sulfide natural gas with a temperature range of 333.15K to 376K and a hydrogen sulfide content of 6.86% to 15.97%.
[0057] In summary, the embodiment of the present application provides a method for predicting the compression factor of natural gas with a high hydrogen sulfide content: the first step is to collect multiple groups of data on natural gas containing hydrogen sulfide, including natural gas components, pressure P, temperature T and experimentally measured compression factors; the second step is to correct the multiple groups of pressures and temperatures to obtain multiple groups of corrected comparison temperatures and corrected comparison pressures; the third step is to divide the corrected multiple groups of data into a training set and a test set, establish a neural network model, bring the training set into the neural network model for training, and after the training is completed, use the test set for testing; the fourth step is to predict the compression factor of natural gas with a high hydrogen sulfide content according to the trained model.
[0058] When predicting the compression factor of high-sulfur natural gas, the temperature and pressure of the high-sulfur natural gas are corrected. The correction method is to obtain the contrast temperature according to the ratio of the actual temperature to the virtual temperature, and to obtain the contrast pressure according to the ratio of the actual pressure to the virtual pressure; then, the virtual temperature is obtained by summing the critical temperatures of different natural gas components, and the virtual pressure is obtained by summing the critical pressures of different natural gas components; and the virtual temperature is corrected by the component occupied by hydrogen sulfide, which can solve the problem of predicted temperature error due to high-sulfur natural gas, and then the corrected virtual pressure is obtained by combining the relationship between the contrast pressure and the contrast temperature, thereby eliminating the problem of large difference in compression factor caused by high hydrogen sulfide content and improving the pressure prediction accuracy.
[0059] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for predicting the compression factor of natural gas with high hydrogen sulfide content, characterized in that: include: Collecting multiple sets of natural gas data, each set of natural gas data including natural gas composition, pressure, temperature and compression factor; Respectively obtain the critical temperature and critical pressure of each group of the natural gas data, calculate the virtual temperature by using the critical temperature and the natural gas component, calculate the virtual pressure by using the critical pressure and the natural gas component, and correct the comparative temperature and comparative pressure by using the virtual temperature and the virtual pressure; Substituting multiple groups of natural gas training data into the neural network model for training, each group of the natural gas training data includes the natural gas component, the comparative temperature, the comparative pressure and the compression factor; The compression factor of the natural gas with high hydrogen sulfide content is predicted based on the trained model.
2. The method for predicting the compression factor of natural gas with high hydrogen sulfide content according to claim 1, characterized in that: Calculating a virtual temperature using the critical temperature and the natural gas composition, and calculating a virtual pressure using the critical pressure and the natural gas composition, including: The contrast temperature T r and the comparative pressure P r The calculation method is as follows: In formula (1), T is the natural gas temperature, T pc is the virtual temperature; in formula (2), P is the natural gas pressure, P pc For virtual pressure; Wherein, the virtual temperature T pc and the virtual pressure P pc They are obtained by the following formulas: In formula (3), T ci is the critical temperature, x i is the natural gas component; in formula (4), P ci is the critical pressure.
3. The method for predicting the compression factor of natural gas with high hydrogen sulfide content according to claim 2, characterized in that: The method of using the virtual temperature and the virtual pressure to correct and obtain a comparative temperature and a comparative pressure comprises: For the virtual temperature T pc Correction is performed to obtain the comparative temperature T′ pc , for the virtual pressure P pc Correction is performed to obtain the comparative pressure P′ pc , the calculation method is as follows: T' pc =T pc -ε (5); Where, ε=15(MM 2 )+4.167(N 0.5 -N 2 ) (7); In formula (7), ε is the correction parameter; M is the sum of the mole fractions of CO2 and H2S; and N is the mole fraction of H2S.
4. The method for predicting the compression factor of natural gas with high hydrogen sulfide content according to claim 1, characterized in that: The method also includes the following steps: dividing the multiple groups of natural gas data that are fully / partially corrected into training sets and test sets, substituting the training sets into the neural network model for training, and substituting the test sets into the neural network model for testing after training.
5. The method for predicting the compression factor of natural gas with high hydrogen sulfide content according to claim 1, characterized in that: Multiple sets of natural gas training data are substituted into the neural network model for training, including: Initialize the input layer natural gas composition x i , hidden layer m, output layer Y, number of hidden layers l, input layer x i The connection weight ω of the hidden layer m ij , output layer Y and hidden layer H i The connection weight ω jk , hidden layer threshold b ij , output layer threshold b jk , given the learning rate η and the activation function; Calculate the hidden layer output: in, is the hidden layer activation function, and the calculation formula of the hidden layer activation function is expressed as:
6. The method for predicting the compression factor of natural gas with high hydrogen sulfide content according to claim 5, characterized in that: Multiple sets of natural gas training data are substituted into the neural network model for training, including: Compute the network prediction output layer: in, is the output layer function, and the expression of the output layer function is as follows: Linear=Pureline: f(x)=x (11).
7. The method for predicting the compression factor of natural gas with high hydrogen sulfide content according to claim 6, characterized in that: Multiple sets of natural gas training data are substituted into the neural network model for training, including: Calculate the network prediction error: e k =Y k -O k ,k=1,2,…,m (12); Among them, Y k is the expected output.
8. The method for predicting the compression factor of natural gas with high hydrogen sulfide content according to claim 7, characterized in that: Multiple sets of natural gas training data are substituted into the neural network model for training, including: According to the prediction error e k Update weight ω ij and weight ω jk : oh jk =ω jk +ηH j e k ,j=1,2,…l;k=1,2,…,m (14); Where η is the learning rate.
9. The method for predicting the compression factor of natural gas with high hydrogen sulfide content according to claim 8, characterized in that: Multiple sets of natural gas training data are substituted into the neural network model for training, including: According to the prediction error e k Update the hidden layer threshold b ij and the output layer threshold b jk : b jk =b jk +e k ,j=1,2,…l;k=1,2,…,m (16); Determine whether the iteration is finished, the end condition is error e<10 -3 , if not finished, return.
10. A prediction system for the compression factor of natural gas with high hydrogen sulfide content, characterized in that: include, Data acquisition module: collects multiple groups of natural gas data, each group of natural gas data includes natural gas composition, pressure, temperature and compression factor; Data correction module: respectively obtains the critical temperature and critical pressure of each group of natural gas data, calculates the virtual temperature by using the critical temperature and the natural gas component, calculates the virtual pressure by using the critical pressure and the natural gas component, and corrects the comparative temperature and comparative pressure by using the virtual temperature and the virtual pressure; Model training module: Substitute multiple groups of natural gas training data into the neural network model for training, each group of natural gas training data includes the natural gas component, the comparative temperature, the comparative pressure and the compression factor; Model prediction module: predicts the compression factor of high hydrogen sulfide content natural gas based on the trained model.
Citation Information
Patent Citations
Compression factor calculation method
CN110516794A
Neural network training method based on amplitude limiter and application thereof
CN112613603A
New energy station power generation load prediction method based on BP neural network
CN113112085A
Natural gas pipeline network gas calorific value prediction method suitable for mixed gas source
CN113987943A
High-pressure natural gas compression factor prediction method and system, storage medium and terminal
CN115907054A
Cited By
Method and system for calculating fugacity coefficient of high-temperature and high-pressure sulfur-containing natural gas and condensate gas
CN121257383A