A method for predicting the residual strength of hydrogen-doped natural gas pipeline
By acquiring the characteristic parameters of hydrogen-blended natural gas pipelines, expanding the dataset using finite element analysis and the feature cross method, and establishing a BP neural network, the problem of insufficient accuracy in predicting the residual strength of hydrogen-blended natural gas pipelines in existing technologies is solved, and high-precision risk assessment is achieved.
Patent Information
- Application Number
- CN202410041174.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-11
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2044-01-11
AI Technical Summary
Existing technologies struggle to effectively predict the remaining strength of hydrogen-blended natural gas pipelines, especially when data sample features are limited. The accuracy of intelligent prediction methods is insufficient, and relevant experimental data is difficult to obtain.
By acquiring characteristic parameters that affect the corrosion of hydrogen-blended natural gas pipelines, such as corrosion defect size and hydrogen content, the number of sample characteristic parameters is expanded using finite element analysis and feature cross-validation method. A BP neural network is then established for training to predict the remaining strength of the pipeline.
It improves the accuracy of pipeline residual strength prediction with a root mean square error of 0.1627, enabling reliable assessment of the risks of hydrogen-blended natural gas pipelines and promoting safe and reliable operation and management.
Smart Images

Figure CN117892868B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of hydrogen-doped natural gas transportation, and particularly relates to a hydrogen-doped natural gas pipeline residual strength prediction method. BACKGROUND
[0002] Hydrogen energy is considered as one of the best paths to achieve this goal as a green and renewable energy. Although pipeline transportation is the optimal way for hydrogen transportation, the existing pure hydrogen pipeline transportation is low in efficiency and high in construction cost. In this regard, hydrogen-doped natural gas technology provides an effective way, which is to mix hydrogen into natural gas according to a certain volume ratio to form hydrogen-doped natural gas, and then to use the existing natural gas pipeline for transportation. However, compared with natural gas, the mixing of hydrogen may cause hydrogen embrittlement, hydrogen damage and other corrosion phenomena of the pipeline, thereby accelerating the performance degradation of the pipeline, increasing the failure risk, and further causing serious safety accidents. Therefore, it is imminent to carry out residual strength prediction research on hydrogen-doped natural gas pipelines for hydrogen transportation in natural gas pipelines.
[0003] In the prior art, there are few methods for predicting the strength of hydrogen-doped natural gas pipelines. Although there are strength prediction methods for conventional natural gas pipelines in the field, such as ASME B31G series, DNV-RP-F101 guidelines, FEM and other traditional evaluation methods, and intelligent prediction methods such as long short-term memory network and BPNN. Although the intelligent prediction method makes up for the deficiencies of the traditional evaluation method in practical application, such as large amount of calculation, long time consumption and conservative results, its training often needs a large amount of experimental data. At present, the related experiments of hydrogen-doped natural gas pipelines have the difficulties of high cost and great danger, so there are few and difficult to obtain related experimental data. In addition, the research on the residual strength of pipelines in other situations shows that machine learning may be unreliable when applied to small data sets. Therefore, the intelligent prediction method is difficult to be directly used to predict the residual strength of hydrogen-doped natural gas pipelines.
[0004] In order to solve the problem of difficult to directly obtain data, the research of Kumar, Lo, Zhang and others provides a research idea, which first simulates a set of data by FEM, and then establishes an evaluation equation or a machine learning model on the simulated data set to predict the residual strength of the corroded oil and gas pipeline. However, after a large number of experiments by the inventors, it is found that the accuracy of this method is low, and the main reason is that although it solves the problem of data source, it ignores the problem of small data set with less data sample characteristics, and only establishes a surface and single correlation model on the small data set with less characteristics. SUMMARY
[0005] To solve at least one of the above problems, the present application provides a hydrogen-doped natural gas pipeline residual strength prediction method.
[0006] The technical scheme of the present application is: a hydrogen-doped natural gas pipeline residual strength prediction method, comprising the following steps,
[0007] S1, obtain characteristic parameters affecting the corrosion condition of the hydrogen-doped natural gas pipeline, including corrosion defect size and hydrogen doping amount;
[0008] S2, based on finite element analysis, obtain the residual strength of the pipeline at different characteristic parameters by using a single variable method;
[0009] S3, use the characteristic cross method to expand the number of characteristic parameters of the sample to obtain expanded characteristic parameters;
[0010] S4, form a data set by combining the expanded characteristic parameters and the corrosion condition, establish a BP neural network, and train the BP neural network using the aforementioned data set, and then use the trained data set to predict the residual strength of the hydrogen-doped natural gas pipeline.
[0011] Compared with the prior art, the present application has the following advantages:
[0012] The method of the present application solves the problem of insufficient data characteristic quantity in the prior art by reasonably increasing the number of characteristics, and the root mean square error of the method is 0.1627, which indicates that the accuracy is high and the residual strength of the hydrogen-doped natural gas pipeline with a single corrosion defect can be predicted. This provides a certain reference for the risk assessment method of the active natural gas pipeline transporting different hydrogen-doped natural gas, and promotes the improvement of the hydrogen-doped natural gas pipeline integrity management scheme to fully guarantee the safe and reliable operation of the hydrogen-doped natural gas pipeline. BRIEF DESCRIPTION OF DRAWINGS
[0013] Figure 1 is the prediction result graph of the method of the present application and the prior art method. DETAILED DESCRIPTION
[0014] The present application will be further described in detail below in conjunction with the embodiments and drawings, but the embodiments of the present application are not limited thereto.
[0015] A hydrogen-doped natural gas pipeline residual strength prediction method, comprising the following steps,
[0016] Obtain characteristic parameters affecting the corrosion condition of the hydrogen-doped natural gas pipeline, including corrosion defect size and hydrogen doping amount;
[0017] In the process of hydrogen-doped natural gas transportation, the strength of the pipeline is mainly affected by the corrosion condition of the pipeline and the hydrogen-doping amount. The influence of the corrosion condition on the residual strength is well understood: when the pipeline is corroded, various mechanical properties of the pipeline, including the residual strength, will decrease, which is common sense in the field. As for the hydrogen-doping amount, during the long-term operation of the pipeline, hydrogen will enter the intergranular structure of the pipeline, causing problems such as hydrogen corrosion and hydrogen embrittlement. Therefore, the selection of these two parameters in this embodiment is based on practical considerations.
[0018] For natural gas pipelines, corrosion defects occur due to various factors during their long-term use. In actual environments, the shapes of corrosion defects are diverse, which is not conducive to the statistical analysis of the size of corrosion defects. According to existing technologies, ideal rectangular corrosion defects have been proven to have reasonable accuracy in predicting the residual strength of pipelines. Therefore, in this embodiment, the corrosion defects of the pipeline are considered as standard rectangles.
[0019] For the hydrogen-doping amount of natural gas, the inventors have tested the influence of hydrogen-doped natural gas on the yield strength and tensile strength of API SPEC 5L X52 pipelines when the hydrogen-doping amount is 0%, 2.5%, 12.5%, 25%, and 50%. It is found that the hydrogen-doping amount has a certain influence on the pipeline. In addition, considering the problem of saving computing power, in this embodiment, only the influence of hydrogen-doping amounts of 2.5% and 0% on the residual strength of the pipeline is considered.
[0020] In this embodiment, API SPEC 5L X52 pipeline steel is studied, and a single corrosion defect is set, with the shape of the single corrosion defect being an ideal rectangle.
[0021] Based on finite element analysis, the single variable method is used to obtain the residual strength of the pipeline under different characteristic parameters.
[0022] Specifically, the operation of this step is as follows:
[0023] S301, establish a non-corrosion pipeline model; in this embodiment, the finite element simulation software ANSYS Workbench is used to establish the model, and the establishment method is a conventional means in the field, so the establishment process is not described here.
[0024] In this embodiment, the outer diameter of the API SPEC 5L X52 pipeline steel model is set to 324 mm, the wall thickness is 10.3 mm, and the pipe length is 2000 mm.
[0025] S302, based on a set of fixed characteristic parameters, a single corrosion defect is set on the non-corrosion pipeline model; as described above, an ideal rectangular corrosion defect has better accuracy when used for pipeline residual strength prediction, therefore, in this step, the corrosion defect is set as a rectangle, and in actual operation, the size of the corrosion defect is adjusted in multiple directions by changing the depth, length and width of the corrosion defect, so as to obtain more data in the subsequent finite element analysis process.
[0026] In this embodiment, the specific parameters of the set corrosion defect are shown in Table 1.
[0027] Table 1 Corrosion defect parameter table
[0028]
[0029] In actual simulation implementation, first, a set of parameters are selected for simulation, after the simulation is completed, one of the defect depth, defect length or defect width is adjusted, and the next simulation process is continued until the simulation is completed.
[0030] S303, the pipeline of S302 is meshed, and then internal pressure load is applied to the pipeline;
[0031] Specifically, since the failure area of the pipeline is usually at the corrosion defect thereof, it is indicated that the strength of the corrosion defect area is lower than that of the remaining part of the pipeline. Therefore, the corrosion defect area needs to be studied. To this end, in this embodiment, the mesh of the pipe body in the principle corrosion defect area is relatively sparse, and the mesh of the pipe body in the corrosion defect area is more dense. Meanwhile, the inventor finds that when 2-4 layers of meshes are divided on the thickness of the corrosion defect area, the accuracy of the final result is higher, preferably, when 3 layers of meshes are divided on the thickness of the corrosion defect area, the accuracy is the highest, therefore, in this embodiment, 3 layers of meshes are divided on the thickness of the corrosion defect area.
[0032] For the pipeline, it is subjected to various loads, such as axial compression stress, self weight of the pipeline, soil pressure, gas conveying pressure in the pipeline and the like. However, when the pipeline fails, the gas conveying pressure in the pipeline has the greatest impact on the pipeline, and the remaining loads can be ignored, that is, the internal pressure of the pipeline has the greatest impact on the residual strength of the pipeline. Therefore, in this embodiment, only the internal pressure of the pipeline is considered. In actual operation, the internal pressure is usually directly applied to the inner surface of the pipeline. Considering the non-linear factors such as plasticity, large strain and large deformation of the material, this embodiment adopts Newton-Raphson method to perform nonlinear static structure analysis on the single corrosion defect pipeline.
[0033] Of course, in order to avoid unnecessary rigid body motion of the pipeline model, fixed supports can also be used at both ends of the pipeline when carrying out finite element analysis. These are routine operations in the art, which will not be described here.
[0034] S304, obtaining the residual strength of the pipeline based on the plastic failure criterion;
[0035] Specifically, the plastic failure criterion is specifically: when the maximum Von Mises stress in the corrosion area reaches the tensile strength of the pipeline, the pressure applied to the pipeline at this time is the residual strength of the pipeline; the calculation formula of the Von Mises stress is as follows: , wherein, represents the Von Mises stress, , , , respectively, the first, second and third principal stresses.
[0036] S305, changing the characteristic parameters in S302 by using a single variable method, and repeating S302-S304 until a predetermined number of sample sizes are obtained.
[0037] Specifically, in the foregoing step, the corrosion defect size and the hydrogen content are selected as the characteristic parameters, wherein the corrosion defect size includes the depth, length and width, that is, the characteristic parameters include the depth of the corrosion defect, the length of the corrosion defect, the width of the corrosion defect and the hydrogen content.
[0038] When obtaining data by using finite element analysis, a plurality of groups of data can be obtained by changing the size of one characteristic parameter each time, which is more conducive to subsequent operations.
[0039] The characteristic cross method is used to expand the number of characteristic parameters of the sample to obtain expanded characteristic parameters;
[0040] Specifically, as described in the background art, when the number of data parameter characteristics is too small, the accuracy of the algorithm will be low when the data is brought into the intelligent algorithm for calculation. In the process of predicting the residual strength of the pipeline, the influence of the remaining parameters on the residual strength of the pipeline is much smaller than that of the corrosion defect size and the hydrogen content, and it is not in line with the actual situation to use the remaining parameters as characteristic parameters. Therefore, based on the prior art, the inventors use the characteristic cross method to obtain more characteristic parameters, so that the accuracy of the intelligent algorithm is higher.
[0041] Characteristic cross is a processing method of data characteristics. Different types or different dimensions of characteristics are combined in the form of multiplication or Cartesian product to obtain more characteristic parameters. In this embodiment, first, the Pearson correlation coefficient is used to analyze the correlation between each characteristic parameter and the residual strength and the correlation between each characteristic. The specific operation of the Pearson correlation coefficient is as follows:
[0042]
[0043] wherein, is a characteristic parameter and the Pearson correlation coefficient between the residual strength y ; and is the first j residual strength; is a characteristic parameter first value; j are the mean values of the characteristic parameter , respectively, and the residual strength y .
[0044] For the Pearson correlation coefficient , the greater the absolute value, the greater the correlation between the characteristic parameter and the residual strength y ; the smaller the absolute value, the smaller the correlation between the two.
[0045] In this embodiment, the Pearson correlation coefficients between the characteristic parameters calculated and the residual strength are shown in Table 2.
[0046] Table 2 Pearson correlation coefficient table
[0047]
[0048] For the above four characteristic parameters, after obtaining the Pearson correlation coefficient between them and the residual strength y , according to the size relationship of the value range of the first threshold value, they are divided into strong correlation features and weak correlation features. As for the first threshold value, those skilled in the art can set it according to the actual situation. The inventors have found through a large number of experiments that 0.6 can be set as the dividing line between strong correlation features and weak correlation features. Greater than 0.6 can be classified as strong correlation features, and vice versa, as weak correlation features. Therefore, in this embodiment, the depth, length and hydrogen content are strong correlation features, and the width is a weak correlation feature.
[0049] After dividing the characteristic parameters into strong correlation features and weak correlation features, in theory, the step of feature crossing can be performed. However, if the strong correlation features and weak correlation features are directly crossed, it indicates that the width and the residual strength can be expressed by any one of the depth, length, and hydrogen content to express their deep relationship. However, only the Pearson correlation coefficient method cannot determine the aforementioned problem.
[0050] Therefore, after extensive creative work, the inventors chose to improve the Pearson correlation coefficient by selecting the hidden correlation coefficient to identify the hidden correlation coefficients between various features. The formula for calculating the hidden correlation coefficient is as follows:
[0051]
[0052] In the formula, Representing characteristic parameters x 1 and residual strength y The Pearson correlation coefficient between them; Representing characteristic parameters x 1 and characteristic parameters x The Pearson correlation coefficient between 2 and 2; Representing characteristic parameters x 2 and residual strength y The Pearson correlation coefficient between them; Representation of features With residual strength y Through feature parameters The larger the value of the hidden correlation coefficient obtained indirectly, the stronger the characteristic parameter. The relationship between the residual intensity y and the eigenvalues can be obtained. To express their deeper relationship.
[0053] In this embodiment, the calculated hidden correlation coefficients are shown in Table 3.
[0054] Table 3 Hidden Correlation Coefficient Table
[0055]
[0056] For the hidden correlation coefficient, the strongly correlated features and weakly correlated features whose values are greater than the second threshold are subjected to feature cross processing to obtain new cross feature parameters. As for the size of the second threshold, those skilled in the art can also set it according to the actual situation. After a lot of creative work, the inventors found that the second threshold can be set to 0.6, and the cross feature parameters obtained in this way have a better effect.
[0057] For cross features, the principle is as follows: In actual prediction, feature parameters... With residual strength y It has a strong correlation, while the characteristic parameters With residual strength y The correlation between them is weak, but the feature parameters With characteristic parameters If there is a certain correlation between them, then the characteristic parameters can be considered as follows: With residual strength y They can be connected through feature parameters to express the deep relationship: , , wherein, y’ is the remaining strength after feature crossing, is the feature value crossing features formed after feature crossing; are the new weight values corresponding to each feature after feature crossing, respectively; b’ is the fixed constant term after feature crossing.
[0058] In this embodiment, after feature crossing, the final feature parameters are: depth, length, width, hydrogen doping amount, width-depth crossing feature, width-length crossing feature, a total of 6 feature parameters, which increase the parameter amount by 50% compared to the original situation, and to a certain extent, solve the problem of fewer sample feature quantities.
[0059] The expanded feature parameters and the remaining strength form a data set, a BP neural network is established, and the aforementioned data set is used to train the BP neural network, and then the trained data set is used to predict the remaining strength of the hydrogen-doped natural gas pipeline
[0060] First, in order to facilitate the training of the neural network, the feature parameters and the remaining strength are normalized. Subsequently, the five-fold cross-validation method is used on the normalized data to realize the parameter adjustment of the BP neural network (hidden layer number, hidden neuron number and learning rate, etc.), and the average value of the 10 times five-fold cross-validation result is used. The corresponding super parameter is the optimal super parameter. These methods belong to the conventional methods in the art, and therefore the specific operations are not described in detail.
[0061] At the same time, in order to evaluate the final trained model, the goodness of fit (R 2 ), mean absolute error (MAPE), mean square error (MSE), root mean square error (RMSE) and mean absolute error (MAE) are used to evaluate the performance of the neural network model. The specific evaluation method is as follows:
[0062]
[0063]
[0064]
[0065]
[0066]
[0067] wherein, and respectively represent the first ian actual output value and a predicted output value of an output, an average value of the actual output value, n a number of samples.
[0068] In this embodiment, the learning rate of the BP model is set to 0.25, the activation function is the hyperbolic tangent function, and there is one hidden layer with 3 neurons. In order to illustrate the advantages of the present application, the feature cross method (directly using the parameters obtained by finite element analysis for analysis, and finally 4 characteristic parameters) will be omitted as a comparison, and the simulation results of the finite element analysis are used as a benchmark, and the final results are as shown in Table 4. Figure 1 and Table 4.
[0069] Table 4 Evaluation results table
[0070]
[0071] Table 4 and Figure 1 In Table 4, FEM represents the simulation results of the finite element analysis, FEM-FC-BPNN represents the prediction results of the method of the present embodiment, and FEM-BPNN represents the prediction results of the comparison method. From Figure 1 and Table 4, it can be seen that in the embodiment of the present application, the method of introducing more characteristic parameters through feature cross has higher accuracy.
[0072] The above description is only a preferred embodiment of the present application, but the protection scope of the present application is not limited thereto, any changes or replacements within the technical range disclosed in the embodiments of the present application can be easily thought of by those skilled in the art, and should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for predicting the residual strength of a hydrogen-blended natural gas pipeline, characterized in that, Includes the following steps, S1. Obtain characteristic parameters that affect the corrosion of hydrogen-blended natural gas pipelines, including corrosion defect size and hydrogen content; S2. Based on finite element analysis, the single variable method is used to obtain the residual strength of the pipeline when the characteristic parameters are different; S3. The number of feature parameters in the sample is increased using the feature cross method to obtain the increased feature parameters; the feature cross method includes the following steps: S601. Based on the Pearson correlation coefficient method, obtain the correlation coefficients between each feature parameter and the residual intensity, and between each feature. Based on the feature parameters whose correlation coefficient is greater than the first threshold, classify them as strongly correlated features, and classify the remaining feature parameters as weakly correlated features. S602. Obtain the hidden correlation coefficients of strongly correlated features and weakly correlated features; perform cross-processing on strongly correlated features and weakly correlated features with hidden correlation coefficients greater than a second threshold to obtain cross-feature parameters; the formula for calculating the hidden correlation coefficient is: In the formula, Representing characteristic parameters x 1 and residual strength y The Pearson correlation coefficient between them; Representing characteristic parameters x 1 and characteristic parameters x The Pearson correlation coefficient between 2 and 2; Representing characteristic parameters x 2 and residual strength y The Pearson correlation coefficient between them; Representation of features With residual strength y Through feature parameters The hidden correlation coefficient was obtained indirectly. S603. Merge the feature parameters and cross feature parameters to obtain the expanded feature parameters; S4. The expanded feature parameters and corrosion conditions are combined into a dataset, a BP neural network is established, and the BP neural network is trained using the aforementioned dataset. Then, the remaining strength of the hydrogen-blended natural gas pipeline is predicted using the trained dataset.
2. The method according to claim 1, characterized in that, In S1, when obtaining the characteristic parameters affecting the corrosion of hydrogen-blended natural gas pipelines, the shape of the corrosion defect is considered as a rectangle. The characteristic parameters include the depth, length, and width of the corrosion defect, as well as the amount of hydrogen blended into the natural gas.
3. The method according to claim 1, characterized in that, The method for obtaining the residual strength of a pipeline based on finite element analysis includes the following steps: S201. Establish a non-corrosion pipeline model; S202. Based on a set of fixed characteristic parameters, a single corrosion defect is set on the non-corrosion pipeline model; S203. Mesh the pipeline in S202, and then apply an internal pressure load to the pipeline. S204. Based on the plastic failure criterion, obtain the remaining strength of the pipe; S205. Use the single variable method to change the feature parameters in S202, and repeat S202~S204 until a predetermined number of samples are obtained.
4. The method according to claim 3, characterized in that, In S203, the farther away from the corrosion defect area, the sparser the mesh; the closer to the corrosion defect area, the denser the mesh. The corrosion defect area is divided into 2 to 4 mesh layers in the wall thickness direction.
5. The method according to claim 3, characterized in that, The plastic failure criterion is as follows: when the maximum Von Mises stress in the corrosion zone reaches the tensile strength of the pipeline, the pressure applied to the pipeline at this point is the remaining strength of the pipeline; the formula for calculating the Von Mises stress is as follows: In the formula, Indicates Von Mises stress. , , These represent the first principal stress, the second principal stress, and the third principal stress, respectively.
6. The method according to claim 1, characterized in that, The first threshold is 0.58~0.62, and the second threshold is 0.58~0.
62.
7. The method according to claim 1, characterized in that, The S4 method includes the following steps: normalizing the dataset to obtain a processed dataset; feeding the processed dataset into a BP neural network and using five-fold cross-validation to tune the hyperparameters of the BP neural network, taking the hyperparameter corresponding to the maximum average of multiple five-fold cross-validation results as the optimal hyperparameter; then training the BP neural network with the optimal hyperparameters; after training, inputting the parameters of the pipeline to be predicted into the BP neural network to predict its remaining strength.