A method for predicting CO2 solubility in deep saline water based on machine learning
Through machine learning-based methods, optimization and optimization of algorithms and models, the problem of difficult prediction of CO2 solubility in deep saltwater has been solved, and an accurate assessment of the CO2 dissolution and storage potential of deep saltwater layers has been achieved.
Patent Information
- Application Number
- CN202410060774.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-01-16
AI Technical Summary
Existing technology is difficult to accurately predict the solubility of CO2 in deep saline water, resulting in the inability to effectively assess the CO2 dissolution and storage potential of deep saline water layers.
Methods based on machine learning are used, including optimizing machine learning algorithms, preprocessing experimental data, establishing and optimizing machine learning models, to predict CO2 solubility in deep saltwater. Specific steps include selecting suitable machine learning algorithms, data preprocessing, establishing and optimizing models, and optimizing hyperparameters through the analytic hierarchy process, TPE algorithm and K-fold cross-validation method until the prediction quality requirements are met.
It achieves accurate prediction of the solubility of CO2 in deep saline water and improves the ability to evaluate the potential of CO2 dissolution and storage in deep saline water layers.
Smart Images

Figure CN117935966B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CO2 storage in deep saline water layers, and in particular to a method for predicting CO2 solubility in deep saline water based on machine learning. Background Art
[0002] Carbon capture, utilization and storage (CCUS) technology is a globally recognized mainstream technical measure to reduce carbon emissions. CO2 storage in deep saline water is an important means of CCUS technology and one of the effective ways to reduce carbon emissions. Saline layer storage includes structural storage, residual gas storage, dissolution storage and mineralization storage, among which dissolution storage is regarded as the most effective long-term storage. Accurately determining the solubility of CO2 in deep saline water is an important basis for evaluating the dissolution storage potential of CO2 in saline water layers. However, since the solubility of CO2 in deep saline water is affected by multiple factors at the same time, it is difficult to accurately predict the solubility of CO2 in deep saline water layer solutions. Existing technical methods are difficult to meet the basic requirements for accurately evaluating the complex and changeable CO2 dissolution storage potential of saline water layers. Therefore, it is very necessary to propose a CO2 solubility prediction method that can accurately predict the solubility of CO2 in deep saline water. Summary of the invention
[0003] The purpose of the present invention is to provide a method for predicting the solubility of CO2 in deep saline water based on machine learning, aiming to solve the technical problem in the prior art that the solubility of CO2 in deep saline water is affected by multiple factors at the same time, resulting in difficulty in accurately predicting the solubility of CO2 in deep saline water and inability to accurately evaluate the CO2 dissolution and storage potential of deep saline water layers.
[0004] To achieve the above object, the present invention adopts a method for predicting CO2 solubility in deep salt water based on machine learning, comprising the following steps:
[0005] Optimize machine learning algorithms;
[0006] Preprocessing of experimental data on CO2 solubility in salt water;
[0007] Develop a machine learning model to predict CO2 solubility in deep saline water;
[0008] Optimizing machine learning models for predicting CO2 solubility in deep saline water;
[0009] Predict CO2 solubility in deep saline water.
[0010] Among them, in the step of optimizing the machine learning method:
[0011] According to the nature of the CO2 solubility prediction problem in deep saline water, the characteristics of sample data, and the applicable scope of each commonly used machine learning method, 2 to 9 machine learning algorithms suitable for predicting CO2 solubility in deep saline water were preliminarily selected;
[0012] Use the analytic hierarchy process to evaluate the initially screened machine learning algorithms;
[0013] The machine learning algorithm is optimized based on the evaluation results.
[0014] Among them, in the step of using the hierarchical analysis method to evaluate the machine learning algorithm preliminarily screened, the evaluation process is:
[0015] Building a hierarchical model;
[0016] Construct a judgment matrix;
[0017] Calculate weight vector and consistency check;
[0018] Calculate the composite score.
[0019] Among them, in the step of preprocessing the experimental data of CO2 solubility in salt water, the preprocessing process is:
[0020] Handling outliers;
[0021] Perform data normalization;
[0022] Divide the dataset.
[0023] Among them, in the step of establishing a machine learning model for predicting CO2 solubility in deep salt water, the establishment process is:
[0024] Establish a hyperparameter space to determine the hyperparameters that need to be adjusted for the machine learning algorithm and the adjustment range of each hyperparameter;
[0025] Use the training set, TPE algorithm and K-fold cross validation method to optimize different hyperparameter combinations in the hyperparameter space;
[0026] Obtain the best hyperparameter combination, and select the hyperparameter combination with the best evaluation result as the best hyperparameter combination;
[0027] Train a machine learning model using the training set and the best hyperparameter combination;
[0028] Use the test set to conduct a comprehensive performance evaluation of the trained machine learning model.
[0029] Among them, in the step of optimizing different hyperparameter combinations in the hyperparameter space using the training set, the TPE algorithm and the K-fold cross validation method, the optimization process is:
[0030] Initialization: randomly select a set of hyperparameters from the hyperparameter space as the initial point and construct an initial probability density function to generate observation points;
[0031] The following steps are repeated until the predetermined number of iterations and other stopping conditions are reached: hyperparameter combination sampling, sampling a hyperparameter candidate combination from the current probability density function;
[0032] Machine learning model training: Use K-fold cross-validation to divide the training set data into K different sub-training sets and validation set combinations, and use K different sub-training sets and sampled hyperparameter combinations to train the machine learning model;
[0033] Machine learning model evaluation: Use K validation sets to evaluate the performance of the machine learning model trained with the corresponding sub-training sets, and record the average of the K machine learning model evaluation results;
[0034] Update, update the probability density function according to the average value of the evaluation results.
[0035] Among them, in the step of optimizing the machine learning model for predicting CO2 solubility in deep salt water, the optimization process is:
[0036] Analyze and select some hyperparameters that have a greater impact on the accuracy and generalization of the machine learning model, and define a set of candidate values for the selected hyperparameters based on the established hyperparameter values of the machine learning model for predicting CO2 solubility in deep saline water to form a hyperparameter grid;
[0037] Optimize the machine learning model once using the training set, grid search method and K-fold cross validation method;
[0038] Use the test set data to evaluate the comprehensive performance of the optimized machine learning model;
[0039] Test the CO2 solubility prediction results of the machine learning model after optimization.
[0040] Among them, the steps of optimizing the machine learning model using the training set, grid search method and K-fold cross validation method are:
[0041] Use K-fold cross-validation to divide the training set data into K different sub-training set and validation set combinations;
[0042] Use K sub-training sets to train machine learning models for all hyperparameter combinations in the hyperparameter grid;
[0043] Use the corresponding validation set to evaluate the trained machine learning model, and calculate the average of the evaluation results of the K machine learning models trained for each hyperparameter;
[0044] Obtain the hyperparameter combination with the best average value of the evaluation results as the optimal hyperparameter combination;
[0045] Retrain the machine learning model using the training set and optimal hyperparameter combination.
[0046] Among them, in the step of testing the CO2 solubility prediction result of the optimized machine learning model, the detection process is:
[0047] Use a machine learning model optimized once to predict CO2 solubility at different temperatures, pressures, and salt ion concentrations;
[0048] If the change law of the predicted value of CO2 solubility conforms to the law of physical and chemical changes, the machine learning model after one optimization can be directly used to predict CO2 solubility;
[0049] If the change pattern of the predicted value of CO2 solubility does not conform to the physical and chemical change pattern, the machine learning model after the first optimization needs to be optimized again until the predicted value of CO2 solubility meets the quality requirements;
[0050] If the change law of the predicted value of CO2 solubility does not conform to the law of physical change, the machine learning model after the first optimization needs to be optimized again. The optimization process is:
[0051] The local weighted scatter point smoothing method with different smoothing degrees is used to fit the CO2 solubility prediction values of the unit interval temperature and the corresponding machine learning model after one optimization under different combinations of the same salt concentration and pressure;
[0052] Determine the degree of smoothing for the locally weighted scatter point method;
[0053] The CO2 solubility predictions of the machine learning model after a single optimization at different temperatures in the unit interval under the same salt concentration and pressure were optimized using a local weighted method that determines the degree of smoothing.
[0054] The linear interpolation method is used to optimize the CO2 solubility prediction value of the machine learning model between two unit interval temperatures at the same ion concentration and pressure;
[0055] The training set and test set data are used to evaluate the machine learning model after secondary optimization. If the evaluation results meet the quality requirements, the machine learning model after secondary optimization can be used to predict the solubility of CO2 in deep saline water.
[0056] The present invention discloses a method for predicting CO2 solubility in deep saline water based on machine learning, which comprises the following steps: optimizing a machine learning algorithm; preprocessing experimental data of CO2 solubility in saline water; establishing a machine learning model for predicting CO2 solubility in deep saline water; optimizing the machine learning model for predicting CO2 solubility in deep saline water; predicting CO2 solubility in deep saline water, and realizing accurate prediction of CO2 solubility in deep saline water. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 It is a flow chart of the steps of the method for predicting CO2 solubility in deep salt water based on machine learning of the present invention.
[0059] Figure 2 It is a flow chart of the steps of evaluating the machine learning algorithm of the present invention.
[0060] Figure 3 It is a flow chart of experimental data steps for pre-treating CO2 solubility in salt water of the present invention.
[0061] Figure 4 It is a flowchart of the steps of different hyperparameter combinations in the preferred hyperparameter space of the present invention.
[0062] Figure 5 1 is a flowchart of the steps of the machine learning model for optimizing the prediction of CO2 solubility in deep saline water of the present invention.
[0063] Figure 6 It is a flow chart of the steps of detecting and predicting results of the present invention.
[0064] Figure 7 It is a flow chart of the steps of the secondary optimization machine learning model of the present invention.
[0065] Figure 8 It is a schematic diagram of the comprehensive scores of various machine learning models of the present invention.
[0066] Fig. 9 This is a graph showing the CO2 solubility prediction results of the present invention.
[0067] Fig.10 This is a graph of CO2 solubility prediction results of the LightGBM regression model after secondary optimization of the present invention.
[0068] Fig.11It is a hierarchical structure model diagram of the present invention. DETAILED DESCRIPTION
[0069] See also Figure 1 to Figure 7 The present invention provides a method for predicting CO2 solubility in deep salt water based on machine learning, comprising the following steps:
[0070] S1: Optimize machine learning algorithms;
[0071] S2: Preprocessing of experimental data on CO2 solubility in salt water;
[0072] S3: Develop a machine learning model to predict CO2 solubility in deep saline water;
[0073] S4: Optimizing machine learning models for predicting CO2 solubility in deep saline water;
[0074] S5: Predict CO2 solubility in deep saline water.
[0075] In this embodiment, a machine learning algorithm is first selected; then the experimental data of CO2 solubility in salt water is preprocessed; then a machine learning model for predicting CO2 solubility in deep salt water is established; then the machine learning model for predicting CO2 solubility in deep salt water is optimized; finally, the CO2 solubility in deep salt water is predicted, thereby achieving accurate prediction of CO2 solubility in deep salt water.
[0076] Further, in the step of optimizing the machine learning algorithm:
[0077] According to the nature of the CO2 solubility prediction problem in deep saline water, the characteristics of sample data, and the applicable scope of each commonly used machine learning method, 2 to 9 machine learning algorithms suitable for predicting CO2 solubility in deep saline water were preliminarily selected;
[0078] Use the analytic hierarchy process to evaluate the initially screened machine learning algorithms;
[0079] The machine learning algorithm is optimized based on the evaluation results.
[0080] Furthermore, in the step of using the hierarchical analysis method to evaluate the preliminarily screened machine learning algorithms, the evaluation process is:
[0081] S11: Establish a hierarchical model;
[0082] S12: construct judgment matrix;
[0083] S13: Calculate weight vector and consistency check;
[0084] S14: Calculate the comprehensive score.
[0085] In this embodiment, if Fig.11 As shown in the figure, according to the nature of the CO2 solubility prediction problem in deep salt water, the characteristics of sample data and the applicable scope of each commonly used machine learning method, 2 to 9 machine learning algorithms suitable for predicting CO2 solubility in deep salt water are preliminarily screened out. The preliminarily screened machine learning algorithms are evaluated using the hierarchical analysis method. The machine learning algorithms are optimized based on the evaluation results. Then the hierarchical analysis method is used to comprehensively evaluate the machine learning algorithms and select the machine learning methods suitable for CO2 solubility prediction. The specific steps are as follows: Establish a hierarchical model: In order to select machine learning methods suitable for CO2 solubility prediction in deep salt water, on the basis of existing research results, 9 most valuable indicators are selected and a progressive hierarchical model is established; construct a judgment matrix. On the basis of the hierarchical model, first construct a criterion layer judgment matrix, and then use the same method to construct all the corresponding scheme layer judgment matrices for nine indicators such as accuracy. During the construction, in order to improve the accuracy and rationality of the judgment matrix, the traditional construction method is abandoned, and all indicators are compared together. The indicator judgment scale is as follows:
[0086] As shown in Table 1:
[0087]
[0088] Table 1 Index evaluation scale
[0089] After calculating the weight vector and consistency test, the judgment matrix is normalized by column and the criterion layer weight vector W is obtained by arithmetic mean method. c and the solution layer weight vector W p :
[0090] Wc=[w1,…,w n ];
[0091]
[0092] Where n is the number of indicators, n = 1, 2, 3, ..., 9; m is the number of machine learning methods, m = 1, 2, 3, ..., 9.
[0093] On this basis, each judgment matrix is tested for consistency. If the consistency ratio CIR≤0.1, it means that the consistency test is passed. Otherwise, the judgment matrix needs to be reconstructed. The test formula is:
[0094]
[0095] Where: CI is the consistency index, dimensionless; RI is the random consistency index, dimensionless; λ max is the maximum characteristic root of the matrix, dimensionless; N is the order of the judgment matrix, dimensionless, and the RI value table is shown in Table 2:
[0096]
[0097] Table 2 RI value table
[0098] Calculate the comprehensive score and use the determined weight vectors Wc and Wp to obtain the comprehensive score Sm of each machine learning method:
[0099] S m =W p ×(W c ) T ;
[0100] According to the comprehensive score S m By ranking each machine learning method, the applicability order of each machine learning method in CO2 solubility prediction can be obtained, and the method is optimized according to the ranking result. Among them, the larger the Sm value, the better the applicability of the machine learning method.
[0101] Further, in the step of preprocessing the experimental data of CO2 solubility in salt water, the preprocessing process is:
[0102] S21: Handling outliers;
[0103] S22: perform data normalization;
[0104] S23: Divide the data set.
[0105] In this embodiment, since the experimental data may come from different researchers, and the experimental methods and equipment used by different researchers may be different, there may be certain differences in the data under the same conditions, resulting in individual data seriously deviating from the law of CO2 solubility changes. In order to more efficiently process abnormal data points that seriously deviate from the law of CO2 solubility changes, the salt concentration condition is used as the classification standard, the data of different temperatures and pressures are visualized, and the outliers in the experimental data samples are removed in combination with the law of CO2 solubility changes; after the outlier processing, in order to avoid the machine learning regression model from being disturbed by the difference in the scale of the characteristic data and causing deviation and distortion, and to speed up the model training speed and improve the model prediction accuracy, the Max-Min method is used to normalize the characteristic parameters such as temperature, pressure and salt concentration of the experimental data samples. The Max-Min normalization formula is:
[0106]
[0107] In the formula: x' is the normalized data; x is the original data; x max is the maximum value in the data; x min is the minimum value in the data.
[0108] After data normalization, in order to ensure data representativeness and reduce potential bias, the experimental data samples were first randomized and divided into training sets and test sets in a ratio of 8:2 to improve the generalization ability of the machine learning regression model. In addition, the cross-validation method was used to divide the training set into sub-training sets and validation sets for hyperparameter tuning of the regression model. The test set was used for comprehensive performance evaluation of the regression model.
[0109] Further, in the step of establishing a machine learning model for predicting CO2 solubility in deep saline water, the establishment process is:
[0110] Establish a hyperparameter space to determine the hyperparameters that need to be adjusted for the machine learning algorithm and the adjustment range of each hyperparameter;
[0111] Use the training set, TPE algorithm and K-fold cross validation method to optimize different hyperparameter combinations in the hyperparameter space;
[0112] Obtain the best hyperparameter combination, and select the hyperparameter combination with the best evaluation result as the best hyperparameter combination;
[0113] Train a machine learning model using the training set and the best hyperparameter combination;
[0114] Use the test set to conduct a comprehensive performance evaluation of the trained machine learning model.
[0115] Further, in the step of optimizing different hyperparameter combinations in the hyperparameter space using the training set, the TPE algorithm, and the K-fold cross validation method, the optimization process is:
[0116] S31: Initialization: randomly select a set of hyperparameters from the hyperparameter space as the initial point, and construct an initial probability density function to generate observation points;
[0117] S32: Hyperparameter combination sampling, sampling a hyperparameter candidate combination from the current probability density function;
[0118] S33: Machine learning model training, using K-fold cross-validation method to divide the training set data into K different sub-training sets and validation set combinations, and using K different sub-training sets and sampled hyperparameter combinations to train the machine learning model;
[0119] S34: Machine learning model evaluation: use K validation sets to evaluate the performance of the machine learning model trained with the corresponding sub-training sets, and record the average of the K machine learning model evaluation results;
[0120] S35: Update, update the probability density function according to the average value of the evaluation results.
[0121] In this embodiment, initialization is first performed, a set of hyperparameters is randomly selected from the hyperparameter space as the initial point, and an initial probability density function is constructed to generate observation points; the following steps are repeated until a predetermined number of iterations and other stopping conditions are reached: hyperparameter combination sampling, sampling a hyperparameter candidate combination from the current probability density function; machine learning model training, using the K-fold cross-validation method to divide the training set data into K different sub-training sets and validation set combinations, and using K different sub-training sets and the sampled hyperparameter combinations to train the machine learning model; machine learning model evaluation, using K validation sets to evaluate the performance of the machine learning model trained with the corresponding sub-training sets, and recording the average value of the K machine learning model evaluation results.
[0122] Further, in the step of optimizing the machine learning model for predicting CO2 solubility in deep saline water, the optimization process is:
[0123] S41: Analyze and select some hyperparameters that have a greater impact on the accuracy and generalization of the machine learning model, and define a set of candidate values for the selected hyperparameters based on the established hyperparameter values of the machine learning model for predicting CO2 solubility in deep saline water to form a hyperparameter grid;
[0124] S42: Optimize the machine learning model using training set, grid search method and K-fold cross validation method;
[0125] S43: Use the test set data to evaluate the comprehensive performance of the optimized machine learning model;
[0126] S44: Verify the CO2 solubility prediction results of the machine learning model after optimization;
[0127] S45: Steps to optimize the machine learning model using training set, grid search method and K-fold cross validation method:
[0128] S46: Use K-fold cross validation method to divide the training set data into K different sub-training set and validation set combinations;
[0129] S47: Use K sub-training sets to train the machine learning model for all hyperparameter combinations in the hyperparameter grid;
[0130] S48: Use the corresponding validation set to evaluate the trained machine learning model, and calculate the average of the evaluation results of the K machine learning models trained for each hyperparameter;
[0131] S49: Obtaining a hyperparameter combination with the best average value of the evaluation results as the optimal hyperparameter combination;
[0132] S410: Retrain the machine learning model using the training set and the optimal hyperparameter combination.
[0133] In this embodiment, firstly, some hyperparameters that have a greater impact on the accuracy and generalization of the machine learning model are analyzed and screened out, and based on the hyperparameter values of the machine learning model for predicting CO2 solubility in deep salt water, a candidate value set is defined for the screened hyperparameters to form a hyperparameter grid; then the machine learning model is optimized once using the training set, grid search method and K-fold cross-validation method; then the comprehensive performance of the machine learning model after the optimization is evaluated using the test set data; then the CO2 solubility prediction result of the machine learning model after the optimization is tested; and then the machine learning model is optimized once using the training set, grid search method and K-fold cross-validation method: then the training set data is divided into K different sub-training sets and validation set combinations using the K-fold cross-validation method; the machine learning models of all hyperparameter combinations in the hyperparameter grid are trained using the K sub-training sets; then the trained machine learning models are evaluated using the corresponding validation set, and the average of the evaluation results of the K machine learning models trained for each hyperparameter is respectively calculated; then the hyperparameter combination with the best average evaluation result is obtained as the optimal hyperparameter combination; finally, the machine learning model is retrained using the training set and the optimal hyperparameter combination.
[0134] Furthermore, in the step of testing the CO2 solubility prediction result of the optimized machine learning model, the detection process is:
[0135] S61: Use a machine learning model after optimization to predict CO2 solubility at different temperatures, pressures and salt ion concentrations;
[0136] S62: If the change law of the predicted value of CO2 solubility conforms to the law of physical and chemical changes, the machine learning model after one optimization can be directly used to predict CO2 solubility;
[0137] S63: If the variation pattern of the predicted value of CO2 solubility does not conform to the physical and chemical variation pattern, the machine learning model after the first optimization needs to be optimized for the second time until the CO2 solubility prediction result meets the quality requirements.
[0138] Furthermore, if the change law of the predicted value of CO2 solubility does not conform to the law of physical change, the machine learning model after the primary optimization needs to be optimized for the second time. The optimization process is:
[0139] S631: Use local weighted scatter point smoothing with different smoothing degrees to fit the CO2 solubility prediction values of the unit interval temperature and the corresponding machine learning model after one optimization under different combinations of the same salt concentration and pressure;
[0140] S632: Determine the smoothness of the local weighted scatter point method;
[0141] S633: Optimize the CO2 solubility predictions of the machine learning model after one optimization at different temperatures in the unit interval under the same salt concentration and pressure using a local weighted method that determines the degree of smoothing;
[0142] S634: Optimize the predicted values of CO2 solubility of the machine learning model between two unit interval temperatures at the same ion concentration and pressure using linear interpolation;
[0143] S635: Use the training set and test set data to evaluate the machine learning model after secondary optimization. If the evaluation results meet the quality requirements, the machine learning model after secondary optimization can be used to predict the solubility of CO2 in deep salt water.
[0144] In this embodiment, the machine learning model after the primary optimization is used to predict the CO2 solubility under different temperatures, pressures and salt ion concentrations. If the variation law of the predicted CO2 solubility value conforms to the physical and chemical variation law, the machine learning model after the primary optimization can be directly used for the prediction of CO2 solubility; if the variation law of the predicted CO2 solubility value does not conform to the physical and chemical variation law, the machine learning model after the primary optimization needs to be optimized for a second time until the CO2 solubility prediction result meets the quality requirements; the process of secondary optimization of the machine learning model after the primary optimization is: first, the local weighted scatter point smoothing method with different smoothing degrees is used to optimize the unit interval temperature and pressure under different combinations of the same salt concentration and pressure; The corresponding CO2 solubility prediction values of the machine learning model after the first optimization are fitted; then the degree of smoothness of the local weighted scatter point method is determined; the local weighted method with determined smoothness is used to optimize the CO2 solubility prediction values of the machine learning model after the first optimization at different temperatures in unit intervals under the same salt concentration and pressure; then the linear interpolation method is used to optimize the CO2 solubility prediction values of the machine learning model between two unit interval temperatures under the same ion concentration and pressure; finally, the training set and test set data are used to evaluate the machine learning model after the second optimization. If the evaluation results meet the quality requirements, the machine learning model after the second optimization can be used to predict the CO2 solubility in deep salt water.
[0145] For example, see Figure 8 to Figure 10 .
[0146] Preferred machine learning algorithm preferred:
[0147] According to the nature of the CO2 solubility prediction problem in deep saline water, the characteristics of sample data and the applicable scope of each commonly used machine learning method, 8 machine learning algorithms suitable for predicting CO2 solubility in deep saline water were preliminarily screened out, including polynomial regression model, support vector machine regression model, decision tree, random forest, LightGBM, artificial neural network, radial basis neural network and BP neural network.
[0148] Combining the characteristics of CO2 solubility experimental data and the advantages and disadvantages of various machine learning algorithms, the criterion layer weight vector W is obtained by using the hierarchical analysis method to evaluate the model. c and the solution layer weight vector W p , as shown in Table 3:
[0149]
[0150] Table 3 Criteria layer weight vector W c and the solution layer weight vector W p
[0151] Obtain the comprehensive score S of each model m ,like Figure 8 shown.
[0152] according to Figure 8 It can be seen that the LightGBM regression model has the best applicability, followed by the SVR regression model, followed by the RF, ANN and DT regression models, and the BPNN model has the lowest applicability. Therefore, the present invention adopts the LightGBM regression model to establish a prediction model for CO2 solubility in deep salt water.
[0153] Preprocessing of experimental data on CO2 solubility in salt water:
[0154] The experimental data of CO2 solubility covers a wide range, including the temperature range of 273.15-473.15K, the pressure range of 0.05MPa-60MPa, and the salt concentration range of 0-6mol / kg. Using the above-mentioned outlier processing method, the data of different temperatures and pressures of the same salt concentration were visualized, and then outlier analysis was performed based on the variation law of CO2 solubility. A total of 2 groups of abnormal data and 4 abnormal data points were screened out and removed.
[0155] The temperature, pressure and salt concentration parameters of the experimental data samples were normalized. On this basis, the data set was randomized and divided into training set and test set in a ratio of 8:2.
[0156] Development of a machine learning model for predicting CO2 solubility in deep saline water:
[0157] The TPE algorithm and five-fold cross validation method are used to adjust the hyperparameters that have a greater impact on the performance of the LightGBM regression model, including the number of decision trees, the maximum depth of the decision tree, the number of leaf nodes, the minimum number of leaf node data, the proportion of bagged data, the frequency of out-of-bag sampling, the learning rate and the regularization coefficient L2. Other hyperparameters are kept at the default values. At the same time, the mean square error (MSE) is used as the evaluation model indicator.
[0158] After multiple experiments on 8 hyperparameters using the TPE algorithm and the five-fold cross-validation method, when the number of decision trees is 175, the maximum depth of the decision tree is 8, the number of leaf nodes is 11, the minimum number of leaf node data is 1, the proportion of bagged data is 0.74, the out-of-bag sampling frequency is 3, the learning rate is 0.1, and the regularization coefficient L2 is 0.6, the average mean square error of the model on the validation set is the smallest, which is 0.0016 (mol / kg)2. Based on this, the LightGBM regression model is retrained with this set of hyperparameters and the training set, and the performance of the model is evaluated with the test set. The performance of the LightGBM regression model on the training set and the test set is shown in Table 4:
[0159]
[0160] Table 4 LightGBM regression model prediction performance evaluation table
[0161] Optimizing machine learning models for predicting CO2 solubility in deep saline water:
[0162] Since the CO2 solubility prediction value of the LightGBM regression model still has certain deviations, in order to enhance the reliability and applicability of the model, this paper finely optimizes the structure of the regression tree in the LightGBM regression model, including the number of decision trees and the maximum depth of the decision, to improve the fitting quality of the model. At the same time, in order to avoid overfitting of the model due to changes in the regression tree structure, the out-of-bag sampling frequency needs to be optimized. Therefore, the grid search method and five-fold cross-validation method were used to optimize the number of decision trees, the maximum depth of the decision tree, and the out-of-bag sampling frequency. The specific optimization range of the model hyperparameters and the optimal values after optimization are shown in Table 5:
[0163]
[0164] Table 5 Hyperparameter optimization range and optimal values
[0165] Then, the LightGBM regression model is retrained using the training set data and the optimized hyperparameter combination to obtain the optimized LightGBM regression model. The test set data is used to conduct a comprehensive performance evaluation of the optimized LightGBM regression model, as shown in Table 7. Comparing Table 4 and Table 6, the mean square error, mean absolute error, and mean absolute percentage error of the optimized LightGBM regression model on the training set and the test set are significantly reduced, and the determination coefficient is further improved.
[0166]
[0167] Table 6. LightGBM model prediction performance evaluation table after one optimization
[0168] The optimized LightGBM regression model is used to predict the CO2 solubility at different temperatures, pressures and salt ion concentrations. Fig. 9 As shown in the figure, the predicted value of CO2 solubility obviously fluctuates, which does not conform to the general law of physical and chemical changes. It needs to be optimized again before it can be used to predict CO2 solubility.
[0169] The local weighted scatter method was used to fit the CO2 solubility under the same salt concentration, pressure, and temperature interval of 273.15K to 453.15K with an interval of 1K. After many experiments, the best fit was achieved when the smoothness was 0.24. Then the linear interpolation method was used to optimize the CO2 solubility between two unit interval temperatures. Finally, the training set and test set data were used to evaluate the regression model after quadratic optimization. The evaluation results are shown in Table 7. The LightGBM regression model after quadratic optimization was used to predict CO2 solubility. The prediction results are shown in Table 7. Fig.10 shown.
[0170]
[0171] Table 7. Evaluation table of prediction performance of LightGBM regression model with secondary optimization
[0172] From Table 7 and Fig.10 It can be seen that the mean square error, mean absolute error and mean absolute error percentage of the LightGBM regression model after secondary optimization on the training set and test set are not much different from those of the LightGBM regression model after primary optimization, and the overall prediction value of CO2 solubility is more in line with the change law of CO2 solubility in salt water.
[0173] What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.
Claims
1. A method for predicting CO2 solubility in deep salt water based on machine learning, characterized in that: The steps include: Optimize machine learning algorithms; Preprocessing of experimental data on CO2 solubility in salt water; Develop a machine learning model to predict CO2 solubility in deep saline water; Optimizing machine learning models for predicting CO2 solubility in deep saline water; Predict CO2 solubility in deep saline water; In the step of optimizing the machine learning model for predicting CO2 solubility in deep saline water, the optimization process is: Analyze and select some hyperparameters that have a greater impact on the accuracy and generalization of the machine learning model, and define a set of candidate values for the selected hyperparameters based on the established hyperparameters of the machine learning model for predicting CO2 solubility in deep saline water to form a hyperparameter grid; Optimize the machine learning model once using the training set, grid search method and K-fold cross validation method; Use the test set data to evaluate the comprehensive performance of the optimized machine learning model; Test the CO2 solubility prediction results of the machine learning model after optimization; In the step of testing the CO2 solubility prediction results of the optimized machine learning model, the detection process is: Use a machine learning model optimized once to predict CO2 solubility at different temperatures, pressures, and salt ion concentrations; If the change law of the predicted value of CO2 solubility conforms to the law of physical and chemical changes, the machine learning model after one optimization can be directly used to predict CO2 solubility; If the change pattern of the predicted CO2 solubility value does not conform to the physical and chemical change law, the machine learning model after the first optimization needs to be optimized again until the predicted CO2 solubility value meets the quality requirements.
2. The method for predicting CO2 solubility in deep salt water based on machine learning according to claim 1, characterized in that: In the steps of optimizing machine learning methods: According to the nature of the CO2 solubility prediction problem in deep saline water, the characteristics of sample data, and the applicable scope of each commonly used machine learning method, 2 to 9 machine learning algorithms suitable for predicting CO2 solubility in deep saline water were preliminarily selected; Use the analytic hierarchy process to evaluate the initially screened machine learning algorithms; The machine learning algorithm is optimized based on the evaluation results.
3. The method for predicting CO2 solubility in deep salt water based on machine learning as claimed in claim 2, characterized in that: In the step of using the hierarchical analysis method to evaluate the preliminarily screened machine learning algorithms, the evaluation process is: Building a hierarchical model; Construct a judgment matrix; Calculate weight vector and consistency check; Calculate the composite score.
4. The method for predicting CO2 solubility in deep salt water based on machine learning according to claim 1, characterized in that: In the step of preprocessing the experimental data of CO2 solubility in salt water, the preprocessing process is: Handling outliers; Perform data normalization; Divide the dataset.
5. The method for predicting CO2 solubility in deep salt water based on machine learning according to claim 1, characterized in that: In the steps of building a machine learning model to predict CO2 solubility in deep saline water, the process is as follows: Establish a hyperparameter space to determine the hyperparameters that need to be adjusted for the machine learning algorithm and the adjustment range of each hyperparameter; Use the training set, TPE algorithm and K-fold cross validation method to optimize different hyperparameter combinations in the hyperparameter space; Obtain the best hyperparameter combination, and select the hyperparameter combination with the best evaluation result as the best hyperparameter combination; Train a machine learning model using the training set and the best hyperparameter combination; Use the test set to conduct a comprehensive performance evaluation of the trained machine learning model.
6. The method for predicting CO2 solubility in deep salt water based on machine learning as claimed in claim 5, characterized in that: In the step of optimizing different hyperparameter combinations in the hyperparameter space using the training set, the TPE algorithm, and the K-fold cross validation method, the optimization process is: Initialization: randomly select a set of hyperparameters from the hyperparameter space as the initial point and construct an initial probability density function to generate observation points; The following steps are repeated until the predetermined number of iterations and other stopping conditions are reached: hyperparameter combination sampling, sampling a hyperparameter candidate combination from the current probability density function; Machine learning model training: Use K-fold cross-validation to divide the training set data into K different sub-training sets and validation set combinations, and use K different sub-training sets and sampled hyperparameter combinations to train the machine learning model; Machine learning model evaluation: Use K validation sets to evaluate the performance of the machine learning model trained with the corresponding sub-training sets, and record the average of the K machine learning model evaluation results; Update, update the probability density function according to the average value of the evaluation results.
7. The method for predicting CO2 solubility in deep salt water based on machine learning according to claim 1, characterized in that: The steps to optimize the machine learning model using the training set, grid search method and K-fold cross validation method are: Use K-fold cross-validation to divide the training set data into K different sub-training set and validation set combinations; Use K sub-training sets to train machine learning models for all hyperparameter combinations in the hyperparameter grid; Use the corresponding validation set to evaluate the trained machine learning model, and calculate the average of the evaluation results of the K machine learning models trained for each hyperparameter; Obtain the hyperparameter combination with the best average value of the evaluation results as the optimal hyperparameter combination; Retrain the machine learning model using the training set and optimal hyperparameter combination.
8. The method for predicting CO2 solubility in deep salt water based on machine learning according to claim 1, characterized in that: If the change law of the predicted value of CO2 solubility does not conform to the law of physical change, the machine learning model after the first optimization needs to be optimized again. The optimization process is: The local weighted scatter point smoothing method with different smoothing degrees is used to fit the CO2 solubility prediction values of the unit interval temperature and the corresponding machine learning model after one optimization under different combinations of the same salt concentration and pressure; Determine the degree of smoothing for the locally weighted scatter point method; The CO2 solubility predictions of the machine learning model after a single optimization at different temperatures in the unit interval under the same salt concentration and pressure were optimized using a local weighted method that determines the degree of smoothing. The linear interpolation method is used to optimize the CO2 solubility prediction value of the machine learning model between two unit interval temperatures at the same ion concentration and pressure; The training set and test set data are used to evaluate the machine learning model after secondary optimization. If the evaluation results meet the quality requirements, the machine learning model after secondary optimization can be used to predict the solubility of CO2 in deep saline water.
