A method for predicting the microbial internal corrosion rate of shale gas pipelines
By screening the main corrosion control factors in shale gas pipelines and constructing a multi-factor prediction model, the problem of unsatisfactory corrosion rate prediction in the existing technology has been solved, and a more accurate and applicable prediction of microbial internal corrosion rate has been achieved.
Patent Information
- Application Number
- CN202411330841.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-24
AI Technical Summary
The prior art has the problem that models cannot be borrowed in terms of corrosion rate prediction. It is highly theoretical but lacks data support, and the single-factor model cannot effectively predict the complex process of microbial corrosion.
A method for predicting the microbial internal corrosion rate of shale gas pipelines is adopted. By analyzing static abiotic and dynamic biological corrosion factors, the main corrosion control factors are screened out, and a multi-factor corrosion rate prediction model is constructed. GBDT coding, multiple linear regression and time series are used to predict the corrosion rate. The memory analysis module makes predictions.
This method takes into account the multi-factor influence of microbial corrosion and combines field data to adapt to different pipelines, providing an effective and operable corrosion rate prediction method, which improves the accuracy and applicability of prediction.
Smart Images

Figure CN118866156B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of natural gas pipelines, and in particular relates to a method for predicting the microbial internal corrosion rate of a shale gas pipeline. Background Art
[0002] Shale gas is the main force in increasing natural gas reserves and production. In 2020, shale gas production has exceeded 20 billion cubic meters, a year-on-year increase of more than 40%, exceeding 10% of the total domestic gas production. In the actual production process, with the increase in the production time of gas wells and surface projects, shale gas well oil pipes, platform pipelines and gathering pipelines have suffered serious corrosion, and frequent pipeline leakage occurred in the short term after production. Judging the development trend of corrosion in advance and taking effective measures can reduce the risk of pipeline failure, reduce economic losses and social impact.
[0003] However, there are currently the following problems in corrosion rate prediction:
[0004] (1) The relevant standards and literature mainly provide corrosion rate prediction models for carbon dioxide corrosion and hydrogen sulfide corrosion. However, the corrosion mechanisms of SRB corrosion and carbon dioxide and hydrogen sulfide are very different, so the existing corrosion rate prediction models cannot be used.
[0005] (2) The relevant corrosion rate prediction algorithms reported in the literature are highly theoretical, and their application effects are not supported by data;
[0006] (3) Microbial corrosion is a complex process in which biological and non-biological factors work together. If only a single-factor corrosion rate prediction model is established, the predicted results will be significantly different from the actual situation. Summary of the invention
[0007] In view of the above-mentioned deficiencies in the prior art, the method for predicting the microbial internal corrosion rate of shale gas pipelines provided by the present invention solves the problem that the existing methods do not take into account the complex situation of microbial corrosion and the traditional prediction model has unsatisfactory prediction effect.
[0008] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a method for predicting the microbial internal corrosion rate of shale gas pipelines, comprising the following steps:
[0009] S1. Analyze and preliminarily screen the relevant factors of pipeline corrosion caused mainly by microorganisms;
[0010] Among them, the relevant factors include static abiotic corrosion factors and dynamic biological corrosion factors;
[0011] S2. Screen the main controlling factors of corrosion from relevant factors;
[0012] S3. Based on the screened main controlling factors of corrosion, a multi-factor corrosion rate prediction model is constructed and trained;
[0013] S4. The constructed multi-factor corrosion rate prediction model is modified, and the modified multi-factor corrosion rate prediction model is used to predict the microbial internal corrosion rate of the pipeline.
[0014] Furthermore, in step S1, the static non-biological corrosion factors include temperature, concentration, concentration, concentration, Concentration and pH;
[0015] The dynamic biocorrosion factors include flow rate, SRB quantity, Partial pressure and pressure.
[0016] Furthermore, in step S2, the method for screening the main controlling factors of corrosion from the static non-biological corrosion factors is specifically as follows:
[0017] SA-21, under SRB-free and oxygen-free conditions, collect multiple corrosion rate values of shale gas pipelines within a preset time period, and collect multiple parameter values of each static abiotic corrosion factor within a preset time period;
[0018] SA-22, cluster multiple corrosion rate values to obtain multiple corrosion rate sets;
[0019] SA-23. Clustering multiple parameter values of each static abiotic corrosion factor to obtain multiple static abiotic corrosion factor sets; wherein the multiple static abiotic corrosion factor sets include multiple sets with parameter values as cluster centers under each static abiotic corrosion factor;
[0020] SA-24. Analyze the correlation between each set of corrosion rates and each set of static abiotic corrosion factors, and select the corresponding main corrosion controlling factors from the static abiotic corrosion factors based on the determined correlation.
[0021] Furthermore, in step S2, the method for screening the main controlling factors of corrosion from the dynamic biological corrosion factors is specifically as follows:
[0022] SB-21, under SRB-free and oxygen-free conditions, a static corrosion coupon orthogonal experiment with multiple levels of static abiotic corrosion factors was conducted to measure the corrosion rate;
[0023] SB-22. Based on the measured corrosion rate, analyze the k value of each static abiotic corrosion factor at different levels, and determine the extreme corrosion conditions according to the k value; where the k value is the average value of the corrosion rate of the static abiotic corrosion factor under multiple experiments at the same level;
[0024] SB-23, under extreme corrosion conditions, collect multiple corrosion rate values of shale gas pipelines within a preset time period, and collect multiple parameter values of each dynamic biological corrosion factor within a preset time period;
[0025] SB-24, clustering multiple corrosion rate values to obtain multiple corrosion rate sets;
[0026] SB-25. Clustering multiple parameter values of each dynamic biocorrosion factor to obtain multiple sets of dynamic biocorrosion factors; wherein the multiple sets of dynamic biocorrosion factors include multiple sets with parameter values as cluster centers under each dynamic biocorrosion factor;
[0027] SB-26. Analyze the correlation between each set of corrosion rates and each set of dynamic bio-corrosion factors, and select the corresponding main corrosion controlling factors from the dynamic bio-corrosion factors based on the determined correlation.
[0028] Furthermore, in the step SA-24 and the step SB-26, based on the determined correlation degree, the method of selecting the corresponding main corrosion controlling factor from the static non-biological corrosion factor and the method of selecting the corresponding main corrosion controlling factor from the dynamic biological corrosion factor are the same, specifically:
[0029] For each corrosion rate set, it is compared with multiple sets corresponding to each corrosion factor, and the corrosion rate elements and corrosion factor elements with the same collection time in the corrosion rate set and the corrosion factor set are determined to form {corrosion rate, static abiotic corrosion factor (A1, A2, ..., A n )} element group;
[0030] Screening out element groups whose corrosion rates are greater than a preset value, determining the number of each type of element group, and taking the corrosion factors in the element groups whose number is greater than a preset threshold as the screened out main corrosion control factors;
[0031] Among them, the corrosion factor is a static non-biological corrosion factor or a dynamic biological corrosion factor, and n is the type ordinal number of the corrosion factor. When it is a static non-biological corrosion factor, n=1~6, and when it is a dynamic biological corrosion factor, n=1~4.
[0032] Furthermore, in step S2, the main corrosion control factors selected include temperature, concentration, concentration, flow rate, SRB number, and Pressure division.
[0033] Further, in step S3, the multi-factor corrosion rate prediction model includes a GBDT encoding module, a multivariate linear regression module, and a temporal memory analysis module;
[0034] The method for outputting prediction results of the multi-factor corrosion rate prediction model is specifically as follows:
[0035] S31. The corrosion rate data obtained by the orthogonal experiment based on the relevant factors of corrosion mainly caused by microorganisms are used as the original characteristic data; the corrosion rate data obtained by the orthogonal experiment based on the screened main controlling factors of corrosion are used as the important characteristic data;
[0036] S32, performing GBDT encoding on the important feature data through the GBDT encoding module, and performing multiple linear regression fitting through the multiple linear regression module to obtain a first prediction output;
[0037] S33, predicting the corrosion rate of the last time step of the original feature data through the time series memory analysis module to obtain a second prediction output;
[0038] S34: Concatenate the first prediction output and the second prediction output to obtain a prediction result.
[0039] Furthermore, the method for performing multivariate linear fitting by the multivariate linear regression module in step S32 is specifically as follows:
[0040] S32-1. Based on the multivariate nonlinear regression method, the single factor fitting equation of each main corrosion control factor is fitted for the important characteristic data;
[0041] S32-2. Based on the constructed single-factor fitting equation, a dynamic verification experiment of the autoclave was carried out, and a basic corrosion rate prediction equation based on multiple factors was established using the multivariate linear regression method;
[0042] S32-3. Use the vector obtained through GBDT encoding as the weight parameter of each corrosion factor in the basic corrosion rate prediction equation to obtain a fitted corrosion rate prediction equation, and then obtain the first prediction output.
[0043] Furthermore, the step S33 is specifically as follows:
[0044] S33-1, input the original feature data into the LSTM encoder in the temporal memory analysis module to obtain the hidden state at each moment;
[0045] S33-2, further performing time series analysis on the hidden state through the TCN model in the time series memory analysis module to obtain time series data;
[0046] S33-3. Input the time series data into the LSTM decoder in the time series memory analysis module to obtain the predicted corrosion rate of the last time step as the second prediction output.
[0047] Furthermore, in step S4, the method for correcting the multi-factor corrosion rate prediction model is specifically as follows:
[0048] S41, selecting a predicted shale gas pipeline, and performing PTK mapping on it to obtain mileage and elevation data along the pipeline;
[0049] S42, obtaining mileage and elevation data along the pipeline to establish a multiphase flow model, and calculating factor values that change along the shale gas pipeline;
[0050] S43, analyzing water samples and gas quality of the predicted shale gas pipeline to obtain factor values of main corrosion control factors;
[0051] S44, inputting the obtained factor values into a multi-factor corrosion rate prediction model to obtain the corrosion rate of each node along the shale gas pipeline;
[0052] S45, selecting a node for predicted shale gas pipeline excavation and detecting the actual corrosion rate;
[0053] S46, calculating the random error between the predicted corrosion rate and the actual corrosion rate, and constructing an error equation;
[0054] S47. Use random errors to adjust the corrosion rate prediction equation, use the error equation to optimize the timing memory analysis module, and obtain a revised multi-factor corrosion rate prediction model.
[0055] The beneficial effects of the present invention are:
[0056] The method of the present invention takes into account the multi-factor influence of microbial corrosion. The established prediction model can be combined with field data to adapt to different pipelines, providing an effective and operable corrosion rate prediction method for shale gas pipelines where microbial corrosion is the main cause. The specific beneficial effects are as follows:
[0057] (1) The multi-factor influence of microbial corrosion is taken into consideration: The corrosion of shale gas pipelines, with microorganisms as the main cause, is a process in which multiple factors work together.
[0058] (2) Combined with the actual situation on site, strong applicability: All test solutions come from the site, and the setting of the test level comes from the statistical results of the field data; the final corrosion rate prediction model is corrected by the field test data; the universal prediction model can be combined with the field data and adapt to different pipeline working conditions.
[0059] (3) The corrosion rate prediction method is simple in procedure and easy to operate, and all data used for prediction and calculation can be obtained.
[0060] (4) Careful consideration of corrosion factors: Corrosion factors are divided into dynamic biological corrosion factors and static non-biological corrosion factors. The main corrosion control factors affecting the corrosion rate are screened out based on the degree of correlation between the corrosion rate and different types of corrosion factors, which has certain guiding significance for controlling the corrosion rate of pipelines.
[0061] (5) The prediction model is effective: Based on the corrosion test data, time series analysis and regression fitting are used to obtain more accurate corrosion rate prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A flow chart of the method for predicting the microbial internal corrosion rate of shale gas pipelines provided by the present invention.
[0063] Figure 2 This is a schematic diagram of the multi-factor corrosion rate prediction model provided by the present invention. DETAILED DESCRIPTION
[0064] The specific implementation modes of the present invention are described below to facilitate those skilled in the art to understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0065] The present invention provides a method for predicting the microbial internal corrosion rate of a shale gas pipeline. Figure 1 As shown, the following steps are included:
[0066] S1. Analyze and preliminarily screen the relevant factors of pipeline corrosion caused mainly by microorganisms;
[0067] Among them, the relevant factors include static abiotic corrosion factors and dynamic biological corrosion factors;
[0068] S2. Screen the main controlling factors of corrosion from relevant factors;
[0069] S3. Based on the screened main controlling factors of corrosion, a multi-factor corrosion rate prediction model is constructed and trained;
[0070] S4. The constructed multi-factor corrosion rate prediction model is modified, and the modified multi-factor corrosion rate prediction model is used to predict the microbial internal corrosion rate of the pipeline.
[0071] In step S1 of the embodiment of the present invention, the static non-biological corrosion factors initially screened include temperature, concentration, concentration, concentration, concentration and pH value; the dynamic biocorrosion factors screened initially include flow rate, SRB number, Partial pressure and pressure.
[0072] In step S2 of the embodiment of the present invention, the method for screening the main controlling factors of corrosion for static non-biological corrosion factors is specifically as follows:
[0073] SA-21. Under SRB-free and oxygen-free conditions, multiple corrosion rate values of the shale gas pipeline are collected within a preset time period, and multiple parameter values of each static non-biological corrosion factor are collected within a preset time period.
[0074] SA-22. Cluster multiple corrosion rate values to obtain multiple corrosion rate sets.
[0075] It should be noted that when clustering multiple values of corrosion rate, values with similar corrosion rates can be clustered together to form the same class set.
[0076] In a specific embodiment, the corrosion rates are divided into three categories: high, medium and low, forming a high corrosion rate set, a medium corrosion rate set and a low corrosion rate set.
[0077] SA-23. Clustering multiple parameter values of each static abiotic corrosion factor to obtain multiple static abiotic corrosion factor sets; wherein the multiple static abiotic corrosion factor sets include multiple sets with parameter values as cluster centers under each static abiotic corrosion factor;
[0078] In a specific embodiment, Concentration is used as an example of static abiotic corrosion factor. Its concentration is classified into three categories: high, medium and low. The high concentration is clustered. Collection, medium concentration Collection and low concentration gather.
[0079] In a specific embodiment, when clustering radiation rate and static non-biological corrosion factors, the k-means algorithm can be used. First, at least one cluster center is given, and the distance between each object and the center is calculated respectively. Then, each object is assigned to the distance closest to the threshold distance. After each clustering, the cluster center is recalculated. After repeated iterations, the error platform and minimum are obtained. At this time, the cluster center remains unchanged and clustering is completed.
[0080] SA-24. Analyze the correlation between each set of corrosion rates and each set of static abiotic corrosion factors, and select the corresponding main corrosion controlling factors from the static abiotic corrosion factors based on the determined correlation.
[0081] In step S2 of the embodiment of the present invention, similar to the static non-biological corrosion factor screening method, the method for screening the main corrosion controlling factors for the dynamic biological corrosion factors is specifically as follows:
[0082] SB-21, under SRB-free and oxygen-free conditions, a static corrosion coupon orthogonal experiment with multiple levels of static abiotic corrosion factors was conducted to measure the corrosion rate;
[0083] In one embodiment of the present invention, 18 groups of orthogonal experiments with 6 factors and 3 levels are performed to obtain the corrosion rate, wherein the 6 factors are temperature, concentration, concentration, concentration, Concentration and pH value, 3 levels are derived from the maximum, minimum and average values of the corresponding factors in the actual on-site environment since the pipeline was put into use.
[0084] SB-22. Based on the measured corrosion rate, analyze the k value of each static abiotic corrosion factor at different levels, and determine the extreme corrosion conditions according to the k value; where the k value is the average value of the corrosion rate of the static abiotic corrosion factor under multiple experiments at the same level;
[0085] In a specific embodiment, the corrosion rate values obtained from multiple tests at the same level of the same factor are summed and averaged to obtain k, k2, k3, ..., kj corresponding to different levels of the factor.
[0086] SB-23, under extreme corrosion conditions, collect multiple corrosion rate values of shale gas pipelines within a preset time period, and collect multiple parameter values of each dynamic biological corrosion factor within a preset time period;
[0087] In a specific embodiment, according to k1, k2, k3...kj at different levels of each factor, the level corresponding to the largest kj is selected as the extreme corrosion condition of the factor, as shown below: The concentration is 7000mg / L, The concentration is 1000mg / L, The concentration is 2mg / L, the pH value is 8.0, the temperature is 45℃, and the immersion method is semi-immersion, no water environment.
[0088] SB-24, clustering multiple corrosion rate values to obtain multiple corrosion rate sets;
[0089] SB-25. Clustering multiple parameter values of each dynamic biocorrosion factor to obtain multiple sets of dynamic biocorrosion factors; wherein the multiple sets of dynamic biocorrosion factors include multiple sets with parameter values as cluster centers under each dynamic biocorrosion factor;
[0090] SB-26. Analyze the correlation between each set of corrosion rates and each set of dynamic bio-corrosion factors, and select the corresponding main corrosion controlling factors from the dynamic bio-corrosion factors based on the determined correlation.
[0091] In the embodiment of the present invention, based on the determined correlation degree, the method of selecting the corresponding main corrosion controlling factor from the static non-biological corrosion factor and the method of selecting the corresponding main corrosion controlling factor from the dynamic biological corrosion factor are the same, specifically:
[0092] For each corrosion rate set, it is compared with multiple sets corresponding to each corrosion factor, and the corrosion rate elements and corrosion factor elements with the same collection time in the corrosion rate set and the corrosion factor set are determined to form {corrosion rate, static abiotic corrosion factor (A1, A2, ..., A n )} element group;
[0093] Screening out element groups whose corrosion rates are greater than a preset value, determining the number of each type of element group, and taking the corrosion factors in the element groups whose number is greater than a preset threshold as the screened out main corrosion control factors;
[0094] Among them, the corrosion factor is a static non-biological corrosion factor or a dynamic biological corrosion factor, and n is the type ordinal number of the corrosion factor. When it is a static non-biological corrosion factor, n=1~6, and when it is a dynamic biological corrosion factor, n=1~4.
[0095] In this embodiment, the element groups with the same acquisition time included in the corrosion rate set and the comparative corrosion factor set reflect the correlation between the corrosion rate and the corrosion factor. The more element groups with the same acquisition time, the greater the correlation; the final selected corrosion main controlling factor is: the set after clustering multiple parameter values under a certain corrosion factor, that is, the value range of the parameter.
[0096] In a specific embodiment, the corrosion rates are clustered into a high corrosion rate set, a medium corrosion rate set, and a low corrosion rate set. The corrosion factors are temperature, concentration, concentration, Taking partial pressure and pressure as an example, the corrosion factors are clustered into high, medium and low sets according to their parameter value ranges, and the elements with the same collection time are divided into an element group, such as the element group corresponding to static abiotic corrosion factors {high corrosion rate, high temperature, medium concentration}, {low corrosion rate, medium temperature, high concentration} Dynamic biocorrosion factors corresponding to the element group {medium corrosion rate, high Partial pressure, medium pressure}, {high corrosion rate, medium The number of each element group is determined by taking the high corrosion rate as the standard, and the corrosion factor corresponding to the value greater than the preset value is taken as the main corrosion control factor, such as the element group {high corrosion rate, high temperature, medium concentration} and {high corrosion rate, medium The number of partial pressures} is greater than the preset threshold, where the main corrosion controlling factors of the static non-biological corrosion factors are determined to be temperature and Concentration, the main corrosion controlling factor of the dynamic biocorrosion factor is determined as The voltage division can determine the parameter value range.
[0097] Based on the above-mentioned method for screening the main controlling factors of corrosion, in step S2 of the embodiment of the present invention, the main controlling factors of corrosion screened out include temperature, concentration, concentration, flow rate, SRB number, and Pressure division.
[0098] In step S3 of the embodiment of the present invention, Figure 2 As shown in the figure, the multi-factor corrosion rate prediction model includes a GBDT encoding module, a multivariate linear regression module, and a temporal memory analysis module.
[0099] In this embodiment, the GBDT encoding module is a gradient boosting tree. Its core idea is to use the GBDT model to automatically screen and combine features to form a new set of discrete variables. The sample x is input into the two GBDT models respectively, and will eventually fall on a node in the tree. At this time, the node is encoded as 1, and the node without a sample is encoded as 0, thereby obtaining discrete features encoded from continuous features. After completing the discrete variables obtained by GBDT encoding, this group of vectors will be input into the subsequent multivariate linear regression module together with the important feature data to obtain the corresponding prediction output.
[0100] In this embodiment, a multivariate linear regression model is used to perform nonlinear regression fitting on the corrosion rate experimental data obtained based on the main corrosion controlling factors, and the corrosion rate prediction equation is fitted in combination with the weight parameters obtained by GBDT encoding.
[0101] In this embodiment, the temporal memory analysis module learns the causal relationship between features through the LSTM model and the TCN model to predict the corrosion rate.
[0102] Specifically, in this embodiment, the method for outputting the prediction result of the multi-factor corrosion rate prediction model is as follows:
[0103] S31. The corrosion rate data obtained by the orthogonal experiment based on the relevant factors of corrosion mainly caused by microorganisms are used as the original characteristic data; the corrosion rate data obtained by the orthogonal experiment based on the screened main controlling factors of corrosion are used as the important characteristic data;
[0104] S32, performing GBDT encoding on the important feature data through the GBDT encoding module, and performing multiple linear regression fitting through the multiple linear regression module to obtain a first prediction output;
[0105] S33, predicting the corrosion rate of the last time step of the original feature data through the time series memory analysis module to obtain a second prediction output;
[0106] S34: Concatenate the first prediction output and the second prediction output to obtain a prediction result.
[0107] In this embodiment, the method for performing multivariate linear fitting by the multivariate linear regression module in step S32 is specifically as follows:
[0108] S32-1. Based on the multivariate nonlinear regression method, the single factor fitting equation of each main corrosion control factor is fitted for the important characteristic data;
[0109] In a specific embodiment, let the dependent variable be Y and the independent variable be x. i There are n independent variables in total. First, according to the dependent variable Y and the independent variable x i The relationship between them was established and regression models were established to obtain the single factor fitting equation.
[0110] S32-2. Based on the constructed single-factor fitting equation, a dynamic verification experiment of the autoclave was carried out, and a basic corrosion rate prediction equation based on multiple factors was established using the multivariate linear regression method;
[0111] In a specific embodiment, the established single factor fitting equation is used as a whole as a variable of multiple linear regression, and X1=f1(x1), X2=f2(x2), ..., X n =f n (x n ), then the dependent variable Y and the respective variables (X1, X2, …, X n ) can be expressed as:
[0112]
[0113] Among them, K1, ..., K n is the regression coefficient for each corrosion factor ( ~ ) weight parameter.
[0114] S32-3. Use the vector obtained through GBDT encoding as the weight parameter of each corrosion factor in the basic corrosion rate prediction equation to obtain a fitted corrosion rate prediction equation, and then obtain the first prediction output.
[0115] Step S33 of this embodiment is specifically as follows:
[0116] S33-1, input the original feature data into the LSTM encoder in the temporal memory analysis module to obtain the hidden state at each moment;
[0117] In a specific embodiment, the original feature data is in the form of three-bit time series data, namely The data is shaped, T is the total time step, D is the number of original feature data, and F is the number of features of the original feature data. It is input into the LSTM encoder to obtain the hidden state at each moment. :
[0118]
[0119] In the formula, is the hidden state at each moment, which is a data set with causal relationships. represents the hidden state at time t, is the LSTM encoder.
[0120] S33-2, further performing time series analysis on the hidden state through the TCN model in the time series memory analysis module to obtain time series data;
[0121] In a specific embodiment, the time series data obtained by analyzing the TCN model is for:
[0122]
[0123] In the formula, is the time series data output by the TCN model. is the time series analysis result of the TCN model for the data at time t, The TCN model is T The timing analysis results obtained from the moment data.
[0124] S33-3, input the time series data into the LSTM decoder in the time series memory analysis module, and obtain the predicted corrosion rate of the last time step as the second prediction output;
[0125] In a specific embodiment, the time series data L is input into the LSTM decoder to obtain the output data for:
[0126]
[0127] In the formula, is the LSTM decoder, is the prediction result output by the LSTM decoder. is the prediction result output by the LSTM decoder at time t. Since the time series memory analysis module hopes to use the time series data to predict the corrosion rate prediction result of the last time step, that is, Predict the rate of corrosion for the last time step.
[0128] In step S4 of the embodiment of the present invention, the method for correcting the multi-factor corrosion rate prediction model is specifically as follows:
[0129] S41. Select the predicted shale gas pipeline and perform PTK mapping on it to obtain the mileage and elevation data along the pipeline.
[0130] S42, obtaining mileage and elevation data along the pipeline to establish a multiphase flow model, and calculating factor values that change along the shale gas pipeline;
[0131] In a specific embodiment, the factor values that vary along the shale gas pipeline include Cl- concentration, HCO3- concentration, bacterial count, etc.
[0132] S43, analyzing water samples and gas quality of the predicted shale gas pipeline to obtain factor values of main corrosion control factors;
[0133] In a specific embodiment, the factor values of the main corrosion control factors include temperature, pressure, flow rate, carbon dioxide partial pressure and other factor values and water sample quality analysis obtained concentration, Concentration, SRB quantity and other factor values.
[0134] S44, inputting the obtained factor values into a multi-factor corrosion rate prediction model to obtain the corrosion rate of each node along the shale gas pipeline;
[0135] S45, selecting a node for predicted shale gas pipeline excavation and detecting the actual corrosion rate;
[0136] S46, calculating the random error between the predicted corrosion rate and the actual corrosion rate, and constructing an error equation;
[0137] S47. Use random errors to adjust the corrosion rate prediction equation, use the error equation to optimize the timing memory analysis module, and obtain a revised multi-factor corrosion rate prediction model.
[0138] In a specific embodiment, when adjusting the basic corrosion rate prediction equation, the weight parameters are mainly adjusted until the error between the actual corrosion situation and the predicted value is less than the set error range, and the adjustment of the corrosion rate prediction equation is completed; the error equation is used to perform back propagation optimization on the time series memory analysis model, and combined with the adjusted corrosion rate prediction equation, a revised multi-factor corrosion rate prediction model is obtained.
[0139] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
[0140] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A method for predicting the microbial internal corrosion rate of shale gas pipelines, characterized in that: The following steps are involved: S1. Analyze and preliminarily screen the relevant factors of pipeline corrosion caused mainly by microorganisms; Among them, the relevant factors include static abiotic corrosion factors and dynamic biological corrosion factors; S2. Screen the main controlling factors of corrosion from relevant factors; S3. Based on the screened main controlling factors of corrosion, a multi-factor corrosion rate prediction model is constructed and trained; S4. Modify the constructed multi-factor corrosion rate prediction model, and use the modified multi-factor corrosion rate prediction model to predict the pipeline microbial internal corrosion rate; In step S1, the static non-biological corrosion factors include temperature, concentration, concentration, concentration, Concentration and pH; The dynamic biocorrosion factors include flow rate, SRB quantity, Partial pressure and pressure intensity; In step S3, the multi-factor corrosion rate prediction model includes a GBDT encoding module, a multivariate linear regression module and a temporal memory analysis module; The method for outputting prediction results of the multi-factor corrosion rate prediction model is specifically as follows: S31. The corrosion rate data obtained by the orthogonal experiment based on the relevant factors of corrosion mainly caused by microorganisms are used as the original characteristic data; the corrosion rate data obtained by the orthogonal experiment based on the screened main controlling factors of corrosion are used as the important characteristic data; S32, performing GBDT encoding on the important feature data through the GBDT encoding module, and performing multiple linear regression fitting through the multiple linear regression module to obtain a first prediction output; S33, predicting the corrosion rate of the last time step of the original feature data through the time series memory analysis module to obtain a second prediction output; S34, concatenating the first prediction output and the second prediction output to obtain a prediction result; The method for performing multivariate linear fitting by the multivariate linear regression module in step S32 is specifically as follows: S32-1. Based on the multivariate nonlinear regression method, the single factor fitting equation of each main corrosion control factor is fitted for the important characteristic data; S32-2. Based on the constructed single-factor fitting equation, a dynamic verification experiment of the autoclave was carried out, and a basic corrosion rate prediction equation based on multiple factors was established using the multivariate linear regression method; S32-3, using the vector obtained through GBDT encoding as the weight parameter of each corrosion factor in the basic corrosion rate prediction equation, obtaining a fitted corrosion rate prediction equation, and then obtaining a first prediction output; The step S33 is specifically as follows: S33-1, input the original feature data into the LSTM encoder in the temporal memory analysis module to obtain the hidden state at each moment; S33-2, further performing time series analysis on the hidden state through the TCN model in the time series memory analysis module to obtain time series data; S33-3, input the time series data into the LSTM decoder in the time series memory analysis module, and obtain the predicted corrosion rate of the last time step as the second prediction output; In step S4, the method for correcting the multi-factor corrosion rate prediction model is specifically as follows: S41, select the predicted shale gas pipeline, and perform PTK mapping on it to obtain mileage and elevation data along the pipeline; S42, obtaining mileage and elevation data along the pipeline to establish a multiphase flow model, and calculating factor values that change along the shale gas pipeline; S43, performing water sample and gas quality analysis on the predicted shale gas pipeline to obtain factor values of main corrosion control factors; S44, inputting the obtained factor values into a multi-factor corrosion rate prediction model to obtain the corrosion rate of each node along the shale gas pipeline; S45, selecting a node for predicted shale gas pipeline excavation and detecting the actual corrosion rate; S46, calculating the random error between the predicted corrosion rate and the actual corrosion rate, and constructing an error equation; S47. Use random errors to adjust the corrosion rate prediction equation, use the error equation to optimize the timing memory analysis module, and obtain a revised multi-factor corrosion rate prediction model.
2. The method for predicting the microbial internal corrosion rate of shale gas pipeline according to claim 1, characterized in that: In step S2, the method for screening the main controlling factors of corrosion for static non-biological corrosion factors is specifically as follows: SA-21, under SRB-free and oxygen-free conditions, collect multiple corrosion rate values of shale gas pipelines within a preset time period, and collect multiple parameter values of each static abiotic corrosion factor within a preset time period; SA-22, cluster multiple corrosion rate values to obtain multiple corrosion rate sets; SA-23. Clustering multiple parameter values of each static abiotic corrosion factor to obtain multiple static abiotic corrosion factor sets; wherein the multiple static abiotic corrosion factor sets include multiple sets with parameter values as cluster centers under each static abiotic corrosion factor; SA-24. Analyze the correlation between each set of corrosion rates and each set of static abiotic corrosion factors, and select the corresponding main corrosion controlling factors from the static abiotic corrosion factors based on the determined correlation.
3. The method for predicting the microbial internal corrosion rate of shale gas pipeline according to claim 2, characterized in that: In step S2, the method for screening the main controlling factors of corrosion from the dynamic biological corrosion factors is specifically as follows: SB-21, under SRB-free and oxygen-free conditions, a static corrosion coupon orthogonal experiment with multiple levels of static abiotic corrosion factors was conducted to measure the corrosion rate; SB-22. Based on the measured corrosion rate, analyze the k value of each static abiotic corrosion factor at different levels, and determine the extreme corrosion conditions according to the k value; where the k value is the average value of the corrosion rate of the static abiotic corrosion factor under multiple experiments at the same level; SB-23, under extreme corrosion conditions, collect multiple corrosion rate values of shale gas pipelines within a preset time period, and collect multiple parameter values of each dynamic biological corrosion factor within a preset time period; SB-24, clustering multiple corrosion rate values to obtain multiple corrosion rate sets; SB-25. Clustering multiple parameter values of each dynamic biocorrosion factor to obtain multiple sets of dynamic biocorrosion factors; wherein the multiple sets of dynamic biocorrosion factors include multiple sets with parameter values as cluster centers under each dynamic biocorrosion factor; SB-26. Analyze the correlation between each set of corrosion rates and each set of dynamic bio-corrosion factors, and select the corresponding main corrosion controlling factors from the dynamic bio-corrosion factors based on the determined correlation.
4. The method for predicting the microbial internal corrosion rate of shale gas pipeline according to claim 3 is characterized in that: In the step SA-24 and the step SB-26, based on the determined correlation degree, the method of selecting the corresponding main corrosion controlling factor from the static non-biological corrosion factor and the method of selecting the corresponding main corrosion controlling factor from the dynamic biological corrosion factor are the same, specifically: For each corrosion rate set, it is compared with multiple sets corresponding to each corrosion factor, and the corrosion rate elements and corrosion factor elements with the same collection time in the corrosion rate set and the corrosion factor set are determined to form {corrosion rate, static abiotic corrosion factor (A1, A2, ..., A n )} element group; Screening out element groups whose corrosion rates are greater than a preset value, determining the number of each type of element group, and taking the corrosion factors in the element groups whose number is greater than a preset threshold as the screened out main corrosion control factors; Among them, the corrosion factor is a static non-biological corrosion factor or a dynamic biological corrosion factor, and n is the type ordinal number of the corrosion factor. When it is a static non-biological corrosion factor, n=1~6, and when it is a dynamic biological corrosion factor, n=1~4.
5. The method for predicting the microbial internal corrosion rate of shale gas pipeline according to claim 1, characterized in that: In step S2, the main corrosion control factors screened out include temperature, concentration, concentration, flow rate, SRB number, and Pressure division.
Citation Information
Patent Citations
Well and canal double-irrigation intelligent management and control system
CN114431126A
Corrosion rate prediction system based on multi-source data
CN114565185A