Hydrate phase equilibrium prediction method and system based on PGNN
Through the PGNN-based hydrate phase equilibrium prediction method, combined with the Chen-Guo model and the physical non-consistent terms in the loss function, the existing model solves the problem of insufficient accuracy of natural gas hydrate generation pressure and insufficient ice warning, and achieves high-precision hydrate generation pressure prediction and freezing risk warning.
Patent Information
- Application Number
- CN202411691207.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-28
AI Technical Summary
The existing models lack the accuracy of natural gas hydrate generation pressure and lack effective ice blockage warning mechanism.
Using the PGNN-based hydrate phase equilibrium prediction method, the hydrate generation physical pressure is calculated through the Chen-Guo model, and it is used as the input of the PGNN network, and trained in combination with the physical non-consistent terms in the loss function to generate the hydrate predicted pressure. At the same time, the hydrate prediction pressure and the generation temperature are used to draw the phase equilibrium curve to determine whether there is a risk of freezing and blocking in the pressure and temperature in the pipeline.
The accuracy of hydrate generation pressure prediction is improved, especially in small samples, high prediction accuracy is maintained and an effective freezing risk warning mechanism is provided.
Smart Images

Figure CN119541663A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hydrate technology, and in particular to a hydrate phase equilibrium prediction method and system based on PGNN. Background Art
[0002] If natural gas hydrates are generated in the pipeline, the risk of pipeline blockage will increase. The hydrate phase equilibrium curve is a prerequisite for determining whether hydrates are generated. Therefore, it is necessary to accurately predict the conditions for natural gas hydrate formation so that effective measures can be taken to prevent hydrates in the future.
[0003] Sayani et al. conducted experiments to determine the formation rate and reaction kinetics of hydrate formation in multiphase systems; Zhang et al. established a PGNN model for predicting power consumption and fuel consumption based on the energy consumption prediction physical modeling process. These models require training with a large amount of data to learn this relationship; in addition, for some special operating conditions, these data are very different from most operating conditions, and it is difficult to accurately predict small sample data.
[0004] In addition, whether in the process of intensive production and peak regulation at the gas storage injection and production station or in the process of gas field development, it is necessary to throttle and reduce the pressure of high-pressure natural gas before it can enter the network; however, there is an obvious coking effect in the process of large-scale throttling and pressure reduction of natural gas. After large-scale throttling, local low temperatures and natural gas hydrate "ice blockage" problems will appear in the pipeline, especially when the water content of natural gas in the gas reservoir or gas storage is high and the cushion gas layer contains acidic gas, which seriously affects the efficient and safe operation of "increasing reserves and production" and the peak regulation and supply guarantee work. The existing system lacks effective monitoring of ice blockage. Summary of the invention
[0005] In view of the shortcomings of the existing methods, the present invention solves the problems of insufficient accuracy of the existing models in predicting hydrate pressure and lack of effective early warning for ice blockage.
[0006] The technical solution adopted by the present invention is: the hydrate phase equilibrium prediction method based on PGNN includes the following steps:
[0007] Step 1: Calculate the physical pressure of hydrate formation using the Chen-Guo model; collect the gas quality components, alcohol salt concentration, and hydrate formation temperature of natural gas hydrate;
[0008] Step 2: Construct a PGNN network, and train the hydrate formation physical pressure, gas hydrate gas composition, alcohol salt concentration, and hydrate formation temperature as inputs to the PGNN network to obtain the predicted hydrate pressure.
[0009] As a preferred embodiment of the present invention, the PGNN network consists of 3 hidden layers, each with 10 neurons.
[0010] Step 3: Use the loss function to measure the error degree of the PGNN network.
[0011] As a preferred embodiment of the present invention, the formula of the loss function is:
[0012]
[0013] Among them, ReLU(.) represents the modified linear unit function, and is a general form based on physical equations, Y pre is the prediction target, y phy is the physical input, ||.|| 2 is the sum of squares.
[0014] As a preferred embodiment of the present invention, the loss function further includes:
[0015] Loss = Loss(P exp , P pre )+λR(f)+λ phy Loss.phy(P phy , P pre ) (3)
[0016] Among them, R(f) is the complexity of the model, λ is the hyperparameter of the complexity, and Loss.phy(P exp , P phy ) is the physical constraint term, λ phy is a hyperparameter; P exp represents the experimental value, P pre Predict pressures for hydrates.
[0017] As a preferred embodiment of the present invention, a hydrate phase equilibrium prediction system based on PGNN includes:
[0018] Data acquisition module and data processing module; wherein,
[0019] The data acquisition module is used to collect the pressure and temperature values in the pipeline before and after the throttle valve;
[0020] The data processing module uses the predicted hydrate pressure and hydrate formation temperature to draw the hydrate phase equilibrium curve, and compares the pressure and temperature points in the pipeline with the hydrate phase equilibrium curve to determine whether there is a risk of hydrate freezing.
[0021] As a preferred embodiment of the present invention, judging whether there is a risk of freezing of hydrates includes:
[0022] When the pressure and temperature in the pipeline are at the upper left of the phase equilibrium curve, there is a risk of hydrate freezing. If they are at the lower right, there is no risk of hydrate freezing.
[0023] As a preferred embodiment of the present invention, when there is a risk of hydrate freezing, the risk level is judged according to the supercooling value, including:
[0024] When the degree of supercooling is ≤ the first threshold, the risk is low; when the first threshold is ≤ the degree of supercooling ≤ the second threshold, the risk is medium; when the degree of supercooling is > the second threshold, the risk is high.
[0025] As a preferred embodiment of the present invention, it also includes: a hydrate risk warning module, which uses different colors to indicate different risk levels.
[0026] As a preferred embodiment of the present invention, it also includes: a remote monitoring module for real-time monitoring of hydrate risks.
[0027] Beneficial effects of the present invention:
[0028] 1. The present invention introduces prior knowledge (thermodynamic model) into the PGNN network, which has good prediction performance in the case of small samples and can accurately predict extreme situations;
[0029] 2. The pressure calculated by the Chen-Guo model is used as the input variable and as part of the loss function in the form of a physically inconsistent term. Compared with different machine learning models, the method of the present invention has better prediction accuracy.
[0030] 3. The prediction of the formation pressure of natural gas hydrate by the method of the present invention 2 The value is 0.9768, which is 0.036 higher than the prediction result of the machine learning model, and the MSE is reduced by 5.56. The physical inconsistency analysis shows that the introduction of thermodynamic mechanism can effectively improve the prediction accuracy of the model.
[0031] 4. In the case of small samples, the prediction accuracy of the method of the present invention is maintained at 0.96-0.98, which shows the feasibility of the method of the present invention in predicting the formation conditions of natural gas hydrates, and provides a new direction for the prediction, monitoring, early warning, prevention and control of hydrate formation in oil and gas pipelines;
[0032] 5. The hydrate phase equilibrium curve is obtained by using the predicted hydrate pressure and hydrate formation temperature. The actual temperature and pressure collected in the pipeline are compared with the hydrate phase equilibrium curve to determine whether there is a freezing risk. The freezing risk level is then divided according to the degree of supercooling, providing an effective freezing risk early warning method. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1is a flow chart of the hydrate phase equilibrium prediction method based on PGNN of the present invention;
[0034] Figure 2 It is a freezing and blocking risk judgment flow chart;
[0035] Figure 3 This is the PGNN framework diagram;
[0036] Figure 4 is the prediction result of different numbers of neurons;
[0037] Figure 5 is the prediction result of different number of hidden layers;
[0038] Figure 6 are the predicted values and true values of different models;
[0039] Figure 7 is the distribution of prediction errors of different models;
[0040] Figure 8 It is 100% CH4;
[0041] Fig. 9 It is 72% CH4+12% CO2+16% H2S;
[0042] Fig.10 It is 67.4% CH4+3.7% C2H6+1.9% C3H8+1.2% iC4H 10 +25%N2+0.8%CO2+0.2%H2S;
[0043] Fig.11 It is 97% CH4+2% C2H6+1% C3H8+10% wtCH3OH;
[0044] Fig.12 It is 100% CH4 + 10% wt NaCl;
[0045] Fig.13 is the absolute error and relative error of the model's predictions for different systems;
[0046] Fig.14 is λ phy Impact on PGNN prediction accuracy and physical inconsistency;
[0047] Fig.15 It is a comparison chart of the predicted value and the true value with the model with physical characteristics added and the model without physical characteristics added;
[0048] Fig.16 It is a comparison of the performance indicators of the model with and without physical characteristics.
[0049] Fig.17is the R of different models under small samples 2 . DETAILED DESCRIPTION
[0050] The present invention is further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore it only shows the components related to the present invention.
[0051] like Figure 1 As shown, a hydrate phase equilibrium prediction method based on PGNN includes the following steps:
[0052] Step 1: Calculate the physical pressure Pphy of hydrate formation using the Chen-Guo model; collect the gas quality components, alcohol salt concentration, and hydrate formation temperature of natural gas hydrate;
[0053] Chen-Guo model is a new hydrate formation mechanism proposed by Chen and Guo. The physical pressure of hydrate formation P is calculated by using the Chen-Guo model. phy This is an existing conventional technology, and can be referred to the paper: Thermodynamic modeling of hydrate formation based on new concepts, which will not be described again here.
[0054] like Figure 3 Step 2: construct a PGNN network, and train the hydrate formation physical pressure, gas hydrate gas composition, alcohol salt concentration, and hydrate formation temperature as inputs to the PGNN network; obtain the hydrate prediction pressure Ppre;
[0055] The core idea of Physics-Guided Neural Networks is to constrain the learning process of neural networks with physical equations or physical principles in order to improve the prediction accuracy, generalization ability and interpretability of the model. Compared with Physics-Guided Neural Networks (PINN), PGNN does not have a strict physical constraint form, because usually the physical constraint form of PINN is partial differential equations or physically obtainable analytical solutions, and the physical inconsistency proposed by PGNN can flexibly embed some physical knowledge into neural networks.
[0056] The loss function based on physical inconsistency can be expressed as the predicted target Y pre and physical input y phy The physical constraints between are:
[0057]
[0058] in, and is a general form based on physical equations, which can involve Y pre and phy algebraic calculation; for neural networks, the physical inconsistency loss function can be used to measure the model's prediction Y pre Whether it violates the equation based on physical knowledge, the formula is:
[0059]
[0060] Where ReLU(.) represents the rectified linear unit function; ||.|| 2 is the sum of squares, which is used to measure the error size and indicates the degree of violation of physical constraints. and is a general form based on physical equations, Y pre is the prediction target, y phy For physical input.
[0061] The influence of different numbers of neurons and hidden layers on the prediction ability of the model is used to select the optimal model parameters; since the neural network is a black box model, the results of each training are different. Therefore, the prediction results of each neuron and hidden layer studied in this invention are averaged over three experiments.
[0062] First, we study the effect of different numbers of neurons on the prediction results of PGNN, such as Figure 4 It can be found that when the number of neurons increases from 4 to 10, R 2 As the number of neurons increases, the MSE decreases, and the prediction results become better and better. However, when the number of neurons reaches 12 and 14, the prediction effect weakens, which may be due to overfitting. Next, the effect of different hidden layer numbers on the prediction results of PGNN is studied, such as Figure 5 It can be found that when there is only one hidden layer, the prediction results of the PGNN model are the worst. When there are 10 neurons, as the number of hidden layers increases, the model prediction results become more accurate. 2 When the number of neurons is 8, 12, and 14, the number of hidden layers increases, and the prediction accuracy of the model fluctuates with a large fluctuation range. 2 The maximum difference is 0.2, which may be the result of overfitting. When the number of neurons is 4 and 6, the number of hidden layers increases and the prediction accuracy of the model is relatively stable. Combined with the above research, the present invention determines the optimal parameters of PGNN, and the model consists of 3 hidden layers, with 10 neurons in each layer.
[0063] Step 3: Use the loss function to measure the error degree of the PGNN network.
[0064] The loss function is the difference between the calculated predicted value and the true value, which is a measure of the quality of model training once, and plays a vital role in updating weight parameters, model prediction ability and generalization ability; the loss function of traditional machine learning and deep learning only considers the predicted value of the model, and does not consider the consistency of the predicted result with the physical mechanism; the physical constraint term determines the relative importance of minimizing physical inconsistency compared with empirical loss and model complexity; since the physical model is equally applicable to unlabeled data instances, ensuring the physical consistency of the model output as the learning goal of PGNN can help the experiment with better generalization performance, even if the training data is small and not completely representative; therefore, the present invention uses the hydrate physical pressure P calculated by the Chen-Guo model as phy The model predicts the pressure P pre The error between them is taken as the physical constraint term, and the overall loss function is as follows:
[0065] Loss = Loss(P exp , P pre )+λR(f)+λ phy Loss.phy(P phy , P pre ) (3)
[0066] Among them, R(f) is the complexity of the model, λ is the hyperparameter of the complexity, and Loss.phy(P exp , P phy ) is the physical constraint term, λ phy is a hyperparameter; P exp represents the experimental value, P pre Predict pressures for hydrates.
[0067]
[0068] Among them, θ is the parameter of the model; w is the weight of the model parameter; R(f) is the regularization term, which is used to control the complexity of the model, and L2 regularization is used;
[0069] At present, although some researchers have developed hydrate monitoring and early warning systems, most of them are based on solidified or empirical early warning models, which have problems such as inaccurate prediction and poor dynamic adaptability. They cannot accurately warn of the risk of hydrate formation under dynamic operating parameters in real time.
[0070] The system for hydrate phase equilibrium prediction based on PGNN includes:
[0071] Data acquisition module and data processing module; wherein,
[0072] The data acquisition module is used to collect the pressure and temperature values in the pipeline before and after the throttle valve;
[0073] The temperature and pressure sensors installed on the pipeline are used to collect the pressure and temperature inside the pipeline;
[0074] like Figure 2 The data processing module uses the hydrate prediction pressure P pre The hydrate phase equilibrium curve is drawn with the hydrate formation temperature T, and the pressure and temperature points in the pipeline are compared with the hydrate phase equilibrium curve. When the pressure and temperature in the pipeline are in the upper left of the phase equilibrium curve, there is a risk of hydrate freezing and blocking. If they are in the lower right, there is no risk of hydrate freezing and blocking, that is, there is no risk.
[0075] The data processing module also compares the supercooling value with the set threshold and classifies the risk of hydrate freezing into levels. When the supercooling ΔT ≤ the first threshold, the risk is low; when the first threshold ≤ supercooling ΔT ≤ the second threshold, the risk is medium; when the supercooling ΔT > the second threshold, the risk is high.
[0076] In this embodiment, the first threshold is 3°C, and the second threshold is 5°C.
[0077] It also includes: a hydrate risk warning module, which is used to generate risk level warnings; for example, if the risk of freezing and blocking is high, a red warning will be prompted, if the risk of freezing and blocking is low, a blue warning will be prompted, and if the risk of freezing and blocking is medium, a yellow warning will be prompted.
[0078] It also includes: a remote monitoring module, which sends the hydrate risk warning module to the remote monitoring module through the network communication module, and uses the remote monitoring module to monitor the hydrate risk in real time.
[0079] Results and Analysis:
[0080] Data source and processing: Data samples are the basis for machine learning and deep learning. Therefore, the quantity and quality of hydrate phase equilibrium experimental data are the key to model prediction. More than 900 sets of hydrate phase equilibrium data with different gas composition and experimental conditions were collected. The data are shown in Table 1. The experimental data are from various literatures, including single-component, two-component, multi-component, acidic gas and alkoxide systems. Among them, gas composition (CH4, C2H6, C3H8, iC4H 10 、nC4H 10 、iC5H 12 、nC5H 12 , C6+, N2, H2, He, CO2, H2S) 13 in total, alkoxide concentration 5+2 in total, hydrate formation temperature T and hydrate pressure experimental value P exp .
[0081] Table 1 Hydrate phase equilibrium experimental data information
[0082]
[0083] Since the gas composition, alcohol salt, temperature and pressure have different dimensions and orders of magnitude, and have different impacts on the prediction weights of the model, it is necessary to perform Min-max normalization on the input features and map the input variables to the range of [0,1].
[0084] Performance indicators: Random forest regression (RF), support vector machine regression (SVR), Adaboost, BP and PGNN are used to predict the same data set; in order to compare the prediction accuracy of different models, MSE, MAE, R 2 MSE and MSE are commonly used indicators to measure the difference between the model prediction value and the actual observation value, which are used to evaluate the degree of fit of the model on the given data. The closer MSE and MSE are to 0, the higher the degree of fit. 2 It is a statistical indicator used to evaluate the goodness of fit of a regression model, indicating the proportion of the variability of the dependent variable that can be explained by the model, that is, the degree of fit of the model to the data. 2 The closer it is to 1, the better the prediction effect.
[0085] The hyperparameters of BP, Adaboost, SVR, and RF are optimized through grid search, and their model hyperparameters are shown in Table 2.
[0086] Table 2 Hyperparameters of each model
[0087]
[0088] Prediction result analysis: The prediction results of each model are as follows Figure 6 and 7 The performance indicators are shown in Table 3. Prediction results of each model Figure 6 The dotted line in the figure indicates that the true value is equal to the predicted value. It can be seen that when the pressure is greater than 20 MPa, the prediction results of the other models, except PGNN, will deviate from the dotted line. When the pressure is above 40 MPa, the prediction ability of PGNN will also decrease. This is mainly because there are fewer experimental data above 40 MPa, and most of the data are concentrated in the range of 0 to 20 MPa. The prediction weight of PGNN will be more biased towards samples with lower pressures. However, compared with other models, PGNN has better prediction results, and its results are closer to the dotted line. Figure 7 The box in the figure represents the prediction error of 10% to 90% of the data set in the test set, and the upper and lower whiskers represent the maximum and minimum errors. It can be seen that PGNN has the smallest prediction error, and the overall error and maximum error are much smaller than other models. In terms of performance indicators, PGNN has the smallest MSE and MAE, and R 2Maximum; the pressure of most hydrate experimental data is between 0 and 20 MPa, which makes it difficult to accurately predict all samples through machine learning models, and the predicted value of the model will be lower than the pressure of hydrate formation in the experiment.
[0089] Table 3 Performance indicators of different models
[0090]
[0091] One operating condition of a single component, acid gas, multi-component and alcohol salt system is extracted to observe the prediction effect of each model. The extracted systems are shown in Table 4.
[0092] Table 4 Components of each working condition
[0093]
[0094] Figure 8 is the prediction result of each model for a single-component system with 100% CH4. Figure 8 It can be seen from (a) that when each model predicts the hydrate formation pressure of pure methane, the predicted pressure of PGNN and BP is slightly lower than the experimental pressure. There are some errors between the predicted pressure and the experimental pressure of RF at 10-37MPa, but the hydrate phase equilibrium curve is smoother than that obtained in the experiment. There is a large error between the predicted pressure and the experimental pressure of SVR at 18-39MPa. The predicted pressure of Adaboost has a large error compared with the experimental pressure. The predicted pressure from 0-4.6MPa is slightly larger than the experimental pressure, and the predicted pressure from 4.6-36MPa is 3.2MPa lower than the experimental pressure on average, indicating a large error.
[0095] Fig. 9 The prediction results of each model for the acid gas system of 72% CH4+12% CO2+16% H2S are as follows: Fig. 9 It can be seen that when the models predict the hydrate formation pressure of the acid gas system, the predicted pressures of the Adaboost and RF models are greater than the experimental pressure, and the prediction error of Adaboost is extremely large, with an average error of 4.7MPa, and the average error of RF prediction is 0.94MPa. The predicted pressure of the BP model is similar to a linear change, which is very different from the experimental pressure and inconsistent with the laws of physical theoretical research. The predicted pressures of SVR and PGNN are almost consistent with the experimental pressure.
[0096] Fig.10 Each model is for 67.4% CH4 + 3.7% C2H6 + 1.9% C3H8 + 1.2% iC4H 10 +25%N2+0.8%CO2+0.2%H2S multi-component system prediction results, from Fig.10It can be seen that the models have different performances in predicting the hydrate formation pressure of multi-component systems. Fig. 9 Similarly, the error between the predicted pressure of Adaboost and the experimental pressure is very large, with an average error of 1.93MPa. The predicted pressures of SVR and RF fluctuate greatly with temperature, especially SVR. The predicted hydrate formation pressure is 4.1MPa at 280.4K, but 3.16MPa at 283.2K. The predicted pressure is smaller, which is inconsistent with the actual situation. In system 3, although the BP prediction accuracy is higher than that of PGNN, the BP prediction result is linear, which is also inconsistent with the laws of physical theoretical research. The prediction accuracy of PGNN in this system may be lower, but the overall trend is the same as the experimental pressure, except that the hydrate formation area predicted by PGNN is more conservative.
[0097] Fig.11 The prediction results of each model for the system of 97% CH4+2% C2H6+1% C3H8 and 10% wt methanol are shown in Table 1. Fig.11 It can be seen that when each model predicts the hydrate formation pressure of the alcohol-added system, the predicted pressure of Adaboost is almost a horizontal line segment, which is obviously contrary to the actual situation. The predicted pressure of BP still shows a linear relationship, which is inconsistent with the laws of physical research. The predicted pressures of SVR and RF are both lower than the experimental pressure, and the predicted pressure of RF fluctuates greatly with temperature. The predicted pressure of PGNN is almost the same as the experimental pressure, and its prediction accuracy is the best.
[0098] Fig.12 is the prediction result of each model for the system with 100% CH4 and 4%wt NaCl added. Fig.12 It can be seen that when predicting the hydrate formation pressure in the presence of salt, the predicted pressures of Adaboost and RF are lower than the experimental pressure. There is a certain error between the predicted pressures and experimental pressures of PGNN and BP above 20 MPa. The prediction accuracy of SVR is slightly higher than that of PGNN in this system.
[0099] Fig.13 (a) is the absolute error of the model's predictions for different systems. It can be found that in the predictions of systems 2 and 4, PGNN performs better than other models. In the prediction of system 1, the prediction effects of BP, SVR and RF are similar, and PGNN is second only to them. In system 3, BP has the smallest absolute error, followed by RF, and there is little difference between PGNN and SVR. Relatively speaking, SVR has the best prediction effect in system 5, which reflects its excellent prediction ability in specific systems. According to the analysis of absolute errors, the model prediction effects are ranked from high to low as PGNN>SVR>BP>RF>Adaboost.
[0100] Fig.13 (b) is the relative error of the model's prediction for different systems. Some important information of the relative error may be ignored based on the absolute error alone. According to the relative error, in systems 1, 2, 4 and 5, PGNN has shown relatively stable prediction capabilities. In system 3, BP has the smallest relative error, and PGNN's prediction effect is better than SVR. According to the analysis of relative error, the model prediction effect is ranked from high to low as PGNN>BP>SVR>RF>Adaboost.
[0101] Combination Fig.13 (a) and (b) show that the PGNN model is stable and has low errors in multiple systems, especially in systems 2 and 4, where the absolute errors are relatively low and the relative errors are also reasonable; BP performs well in some systems, but fluctuates greatly in other tasks and has relatively poor stability; SVR also performs well in some systems, but its performance in other tasks varies and its stability is slightly inferior to PGNN; Adaboost and RF are not stable enough in terms of absolute error and relative error, and fluctuate greatly in multiple systems; although only 5 systems with different components were randomly selected to observe the prediction effects of each model, there may be contingency, but combined with Figure 6 , 7 As shown in the figure, the overall prediction ability of PGNN is better than other models; therefore, the stability and applicability of PGNN can meet the requirements of predicting hydrate formation pressure in different systems.
[0102] Physical inconsistency analysis: In addition to ensuring generalization performance, another key contribution of PGNN is to ensure that the model predictions are consistent in the learning physics mechanism, that is, physical inconsistency. Therefore, in addition to calculating the MSE and MAE of the model on the test set, the impact of physical inconsistency on the PGNN simulation results should also be considered. Specifically, first, we set λ phy Set to 0.1, 0.5, 1, 5, 10 to train the model and observe λ phy The impact of physical knowledge on the PGNN simulation results is then compared between the BP neural network without the Chen-Guo model calculation and the PGNN with the Chen-Guo model calculation to observe the impact of physical knowledge on the PGNN simulation results.
[0103] Fig.14 (a) is λ phy The impact on the prediction accuracy of PGNN shows that when λ phy From 0.1 to 1, PGNN’s R 2 It gradually increases from 0.969 to 0.972; and when λ phy When PGNN is 5 and 10, R2 There has been a decrease, which may be due to overfitting, but R 2 It is still greater than 0.96, and the decrease in prediction accuracy is small.
[0104] Fig.14 (b) is λ phy The impact on the physical inconsistency term increases with the weight λ phy With the increase of , the physical inconsistency of PGNN is further reduced from 0.011 to 0.0027.
[0105] Combination Fig.14 (a) and (b) show that the introduction of physical inconsistency terms can significantly reduce the physical inconsistency between PGNN input and output while ensuring prediction accuracy, and can effectively guide parameters to iterate in the direction of physical knowledge.
[0106] from Fig.15 It can be seen from (a) and (b) that after introducing the calculation results of the Chen-Guo thermodynamic model, the prediction results of PGNN below 20MPa are more accurate and closer to the dotted line y=x. Although there are fewer data above 20MPa, it can effectively reduce the error caused by the prediction and make the prediction results within an acceptable range.
[0107] from Fig.16 As can be seen from the figure, the PGNN network that introduces the Chen-Guo thermodynamic model has a higher R prediction result than the BP network. 2 It increased from 0.9258 to 0.9768, MSE decreased from 11.3698 to 3.55, and MAE decreased from 1.6637 to 0.9144, indicating that the introduction of the calculation results of the Chen-Guo thermodynamic model helps to improve the accuracy of model prediction and reduce the error.
[0108] Combination Fig.15 and Fig.16 , indicating that the introduction of the calculation results of the Chen-Guo thermodynamic model plays a vital role in predicting the hydrate formation pressure, which can effectively improve the prediction accuracy of the model and reduce the error caused by the model prediction.
[0109] Small sample prediction: In the actual application of hydrate phase equilibrium prediction on site, there are problems such as data confidentiality, imperfect data acquisition system, and small data samples. Some newly built oil and gas fields do not have historical data for training. Therefore, the model needs to have accurate predictions for small sample data to meet the needs of different actual situations.
[0110] The original data is randomly divided into 10%, 25%, 50%, 75%, and 90%, and RF, SVR, Adaboost, BP, and PGNN are used to predict the five small samples. The results are shown in the figure. Fig.17 shown; from Fig.17 It can be seen that as the sample size increases, the R 2 Gradually increase; among them, the R 2 The biggest fluctuation, R 2 The R of the PGNN of the present invention increases from 0.78 for 10% samples to 0.96 for 90% samples. 2 slightly decreased, but were all between 0.96 and 0.98; when the sample size was only 10%, the R 2 All of them are less than 0.9, which shows that RF, SVR, Adaboost and BP are very sensitive to the number of training samples and require a large number of samples to improve the prediction accuracy of the model. However, PGNN with the Chen-Guo model still has high prediction accuracy even in the case of a small sample of 10%, which can meet the application of different field situations.
[0111] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A hydrate phase equilibrium prediction method based on PGNN, characterized in that: The following steps are involved: Step 1: Calculate the physical pressure of hydrate formation using the Chen-Guo model; collect the gas quality components, alcohol salt concentration, and hydrate formation temperature of natural gas hydrate; Step 2: Construct a PGNN network, and train the hydrate formation physical pressure, gas composition, alcohol salt concentration, and hydrate formation temperature as inputs to the PGNN network to obtain the predicted hydrate pressure; Step 3: Use the loss function to measure the error degree of the PGNN network.
2. The hydrate phase equilibrium prediction method based on PGNN according to claim 1, characterized in that: The PGNN network consists of 3 hidden layers, and each hidden layer consists of 10 neurons.
3. The hydrate phase equilibrium prediction method based on PGNN according to claim 1, characterized in that: The formula of the loss function is: Among them, ReLU(.) represents the modified linear unit function, and is a general form based on physical equations, Y pre is the prediction target, y phy is the physical input, ||.|| 2 is the sum of squares.
4. The hydrate phase equilibrium prediction method based on PGNN according to claim 1, characterized in that: The loss function also includes: Loss=Loss(P exp ,P pre )+λR(f)+λ phy Loss.phy(P phy ,P pre ) (3) Among them, R(f) is the complexity of the model, λ is the hyperparameter of the complexity, and Loss.phy(P exp , P phy ) is the physical constraint term, λ phy is a hyperparameter; P exp represents the experimental value, P pre Predict pressures for hydrates.
5. A hydrate phase equilibrium prediction system based on PGNN, characterized in that: include: Data acquisition module and data processing module; wherein, The data acquisition module is used to collect the pressure and temperature values in the pipeline before and after the throttle valve; The data processing module uses the predicted hydrate pressure and hydrate formation temperature to draw the hydrate phase equilibrium curve, and compares the pressure and temperature points in the pipeline with the hydrate phase equilibrium curve to determine whether there is a risk of hydrate freezing.
6. The hydrate phase equilibrium prediction system based on PGNN according to claim 5, characterized in that: Judging whether there is a risk of freezing of hydrates includes: When the pressure and temperature in the pipeline are at the upper left of the phase equilibrium curve, there is a risk of hydrate freezing. If they are at the lower right, there is no risk of hydrate freezing.
7. The hydrate phase equilibrium prediction system based on PGNN according to claim 6, characterized in that: When there is a risk of hydrate freezing, the risk level is determined based on the supercooling value, including: When the degree of supercooling is ≤ the first threshold, the risk is low; when the first threshold is ≤ the degree of supercooling ≤ the second threshold, the risk is medium; when the degree of supercooling is > the second threshold, the risk is high.
8. The hydrate phase equilibrium prediction system based on PGNN according to claim 5, characterized in that: Also includes: The hydrate risk warning module uses different colors to indicate different risk levels.
9. The hydrate phase equilibrium prediction system based on PGNN according to claim 5, characterized in that: Also includes: The remote monitoring module is used to monitor hydrate risks in real time.
10. A computer readable medium storing computer program code, characterized in that: When the computer program code is executed by a processor, the PGNN-based hydrate phase equilibrium prediction method as described in any one of claims 1 to 4 is implemented.