Method for predicting corrosion in pipeline based on Gaussian residual regression
Through the Gaussian residual regression method, combined with Gaussian process regression and the improved power-law model, the problem of insufficient accuracy of corrosion prediction in pipelines in the prior art is solved, and higher precision corrosion depth prediction is achieved, and pipeline safety monitoring is enhanced.
Patent Information
- Application Number
- CN202510172075.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-02-17
AI Technical Summary
The prior art is difficult to achieve accurate prediction of corrosion in pipelines, especially in long-term predictions, where the accuracy of power-law models due to environmental and time sensitivity is limited.
By using the Gaussian residual regression method, the state transfer equation of corrosion time is constructed, combined with the Gaussian process regression (GPR) model and the improved power law model, the weight sequence is calculated using residuals and the least squares method is optimized to correct the prediction results to improve the prediction accuracy.
It significantly improves the accuracy of pipeline corrosion depth prediction, can predict corrosion conditions in pipelines more accurately, and enhances monitoring and prevention of pipeline safety.
Smart Images

Figure CN120030901A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of pipeline corrosion prediction, and specifically relates to a pipeline internal corrosion prediction method based on Gaussian residual regression. Background Art
[0002] Pipeline transportation is widely regarded as the safest and most economical mode of transportation, and is widely used in oil and gas transportation. As the main carrier for long-distance energy transportation, the safe and efficient operation of pipelines is of great significance to ensuring the stability of energy supply and promoting social and economic development. However, since oil and gas gathering and transportation pipelines are often in harsh environments such as high temperature, high pressure, and humidity, corrosion is prone to occur inside the pipelines. The corrosion problem of oil and gas gathering and transportation pipelines seriously affects the safety and reliability of the pipeline system, which will not only cause huge economic losses to enterprises, but also threaten people’s lives and property. Therefore, studying the mechanism of pipeline corrosion and establishing a prediction model for the corrosion depth of the inner wall of the pipeline is of great value for the corrosion protection of the pipeline.
[0003] At present, some scholars have proposed an empirical model for predicting pipeline corrosion depth, revealing the power law relationship between pipeline corrosion depth and time (Velázquez), that is, pipeline corrosion depth is not only related to the cumulative corrosion time, but also closely affected by the environment in which the pipeline is located. The prediction of pipeline corrosion degree by this model depends on two parameters: corrosion loss and corrosion protection performance. These parameters are sensitive to the environment and time, and their accurate values will change with the operation process and environmental characteristics, making it difficult for the power law model to accurately predict the corrosion process in the long term. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a Gaussian residual regression pipeline corrosion prediction method, which can achieve accurate prediction of pipeline corrosion.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A Gaussian residual regression pipeline internal corrosion prediction method includes the following steps:
[0007] Step 1: construct a state transfer equation of corrosion time, wherein the state transfer equation includes a state equation and an observation equation;
[0008] Step 2: Predict corrosion depth using the GPR model
[0009] The Gaussian process GP is used as the transfer function of the state equation, the corrosion time and current corrosion depth are used to train the GPR model, and the first corrosion depth prediction value is obtained through the GPR model;
[0010] Step 3: Use the power law model to predict the new corrosion time
[0011] The constants in the power law model were replaced with variables related to environmental characteristics, and the starting time of pipeline corrosion was introduced to improve the power law model. The improved power law model was used as the observation function of the state equation, and the linear relationship between corrosion time and corrosion depth was obtained after taking the logarithm of the power law model, and a new logarithmic corrosion time prediction value was predicted.
[0012] Step 4: Calculate the residual
[0013] Based on the difference between the predicted value and the measured value of the corrosion time, a residual between the predicted value and the measured value of the corrosion time is calculated;
[0014] Step 5: Calculate the weight sequence
[0015] The weight sequence is obtained by using the residual calculation, and the prediction accuracy of the model is enhanced by adjusting the weights;
[0016] Step 6: Least Squares Optimization
[0017] The model parameters are optimized and updated by minimizing the residual sum of squares between the actual observation value and the model prediction value, and the second corrosion depth prediction value is obtained by using the GPR model after parameter update;
[0018] Step 7: Correct the prediction results
[0019] The first corrosion depth prediction value and the second corrosion depth prediction value are corrected based on the weight sequence to obtain a corrected corrosion depth prediction result.
[0020] Furthermore, in step 1, the state transfer equation of corrosion time is:
[0021]
[0022] in: is the logarithmic erosion depth in state space; is the logarithmic erosion time in state space; is the logarithmic erosion depth in the prediction space; is the logarithmic erosion time estimated in the observation space; u k is the latent space noise; u k is the noise in the observation space; f k is the latent space transfer function; h k is the observation function.
[0023] Further, in step 2, the transfer function of the state equation is:
[0024]
[0025] Where: GP is the function of the GPR model;
[0026] The kernel representation of the GPR model is:
[0027] K=K linear *K RBF +K linear
[0028] Where: K linear is a linear kernel; K RBF is an RBF kernel; and:
[0029]
[0030] Where: x and y represent the feature vectors of two input data points respectively; σ represents the output scale parameter; l represents the length scale parameter.
[0031] Further, in step 3, the improved power law model is:
[0032] D max =k(T-T 0 ) n
[0033] Where: D max is the maximum corrosion depth; T and T 0 are the corrosion time and the corrosion start time respectively; κ and n are the corrosion loss and corrosion protection performance parameters affected by the environment respectively; and:
[0034]
[0035] Where: i and n j Represent the regression coefficients corresponding to k and n respectively; x i and x j are scalars representing the i-th and j-th environmental parameters respectively; κ 0 and n 0 They represent the initial values of κ and n respectively; n represents the number of environmental factors affecting κ; m represents the number of environmental factors affecting n.
[0036] The new logarithmic corrosion time is predicted to be:
[0037]
[0038] in: To predict the new logarithmic erosion time, that is, the logarithmic erosion time estimated in the observation space; is the logarithmic erosion depth in the prediction space; A and m 1 It is a parameter related to the logarithmic corrosion time amplitude and the initial logarithmic corrosion time.
[0039] Furthermore, in step 4, the residual between the predicted value and the measured value of the corrosion time is:
[0040]
[0041] in: is the residual between the predicted and measured values of corrosion time; is the measured value of the corrosion time, i.e., the logarithmic corrosion time in the state space; is the predicted value of corrosion time, that is, the logarithmic corrosion time estimated in the observation space.
[0042] Furthermore, in step five, an inverse sigmoid function, a Gaussian weight function or an exponential decay function is used to calculate the weight sequence.
[0043] Furthermore, the inverse sigmoid function is used to calculate the weight sequence, which is expressed as:
[0044]
[0045] Among them: w is the weight of the distance; b is the weight scale parameter, which takes the Gaussian process prediction variance value after the physical model transformation; c is the location parameter, which takes the average value of the corrosion time residual.
[0046] Further, in step seven, the corrected corrosion depth prediction result is:
[0047]
[0048] in: is the corrected corrosion depth prediction result; is the first corrosion depth prediction value; is the second corrosion depth prediction value; is the weight.
[0049] The beneficial effects of the present invention are:
[0050] Aiming at the problem that there are many influencing factors for internal corrosion prediction and large prediction deviation in the process of pipeline internal corrosion detection, the pipeline internal corrosion prediction method of Gaussian residual regression of the present invention proposes a V-GPRR model for pipeline internal corrosion depth prediction, establishes a Gaussian process model with a power law model as a physical model, and adaptively optimizes the weights of the physical model and the Gaussian process model through a residual Gaussian algorithm to achieve accurate prediction of pipeline corrosion; that is, the present invention effectively integrates the physical process based on the corrosion mechanism and the Gaussian process regression based on data driving, and considers the influence of the residual, thereby significantly improving the accuracy of pipeline corrosion depth prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to make the purpose, technical solution and beneficial effects of the present invention clearer, the present invention provides the following drawings for illustration:
[0052] Figure 1 It is a flow chart of the pipeline internal corrosion prediction method based on Gaussian residual regression of the present invention;
[0053] Figure 2 This is a schematic diagram of the V-GPRR model proposed in the present invention. DETAILED DESCRIPTION
[0054] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0055] like Figure 1 As shown, the pipeline internal corrosion prediction method based on Gaussian residual regression in this embodiment includes the following steps.
[0056] Step 1: Construct a state transfer equation for corrosion time, which includes a state equation and an observation equation. Specifically, the constructed state transfer equation for corrosion time is:
[0057]
[0058] in: is the logarithmic erosion depth in state space; is the logarithmic erosion time in state space; is the logarithmic erosion depth in the prediction space; is the logarithmic erosion time estimated in the observation space; v k is the latent space noise; u k is the noise in the observation space; f k is the latent space transfer function; h k is the observation function.
[0059] Step 2: Predict corrosion depth using the GPR model
[0060] The Gaussian process GP is used as the transfer function of the state equation, the corrosion time and current corrosion depth are used to train the GPR model, and the first corrosion depth prediction value is obtained through the GPR model.
[0061] The solutions for dynamic space are generally particle filter, Kalman filter and hidden Markov model. Due to the existence of uncertain factors such as sensor position, the mapping of hidden space or observation space may be inaccurate. Gaussian Process Regression (GPR) can be regarded as a non-parametric Bayesian method. The joint distribution of data points in Gaussian Process (GP) obeys the multivariate normal distribution. GPR assumes that the objective function obeys the spatial mapping relationship of GP and characterizes the mapping process through the kernel function. The prediction result based on GPR is a probability distribution, which has the advantages of quantifying uncertainty.
[0062] This embodiment uses Gaussian process to replace some complex physical models, and uses GP as the transfer function of the state equation. Specifically, the transfer function of the state equation is:
[0063]
[0064] Where: GP is the function of the GPR model;
[0065] The selection of the kernel is based on the nature of the physical model, which provides a more adequate basis for Gaussian process regression (GPR). Specifically, the kernel of the GPR model in this embodiment is expressed as:
[0066] K=K linear *K RBF +K linear
[0067] Where: K linear is a linear kernel; K RBF is an RBF kernel; and:
[0068]
[0069] Where: x and y represent the feature vectors of two input data points respectively; σ represents the output scale parameter; l represents the length scale parameter.
[0070] Using corrosion time and current corrosion depth Train the GPR model and obtain the first corrosion depth prediction value through the GPR model
[0071] Step 3: Use the power law model to predict the new corrosion time
[0072] The constants in the power-law model were replaced with variables related to environmental characteristics, and the starting time of pipeline corrosion was introduced to improve the power-law model. The improved power-law model was used as the observation function of the state equation, and the linear relationship between corrosion time and corrosion depth was obtained by taking the logarithm of the power-law model, and a new logarithmic corrosion time prediction value was predicted.
[0073] This embodiment introduces the corrosion start time into the power law model (Velázquez model), and associates the model parameters with the environment, and uses the power law model as the theoretical basis for predicting corrosion in the pipeline. Specifically, the improved power law model is:
[0074] D max =κ(T-T 0 ) n
[0075] Where: D max is the maximum corrosion depth, in mm; T and T 0 are the corrosion time and the corrosion start time respectively; κ and n are the corrosion loss and corrosion protection performance parameters affected by the environment respectively. Specifically, the environmental factors involve pipeline coating, environmental pH value, redox potential, etc., which are determined according to the actual application scenario, and the linear relationship between κ and n and environmental factors is shown in the following formula:
[0076]
[0077] Where: i and n j denote the regression coefficients corresponding to κ and n respectively; x i and x j are scalars representing the i-th and j-th environmental parameters respectively; κ 0 and n 0 They represent the initial values of κ and n respectively; n represents the number of environmental factors affecting κ; m represents the number of environmental factors affecting n.
[0078] Based on existing research, the environmental parameters related to κ are mainly resistivity, pH value, dissolved ion concentration and redox potential, and the environmental parameters related to n are mainly water content and pipeline coating type.
[0079] By taking the Velázquez model as the observation function of the state equation and taking the logarithm of the power law model formula, the linear relationship between corrosion time and corrosion depth can be obtained, thereby predicting the new logarithmic corrosion time. Specifically, in this embodiment, the new logarithmic corrosion time is predicted to be:
[0080]
[0081] in: To predict the new logarithmic erosion time, that is, the logarithmic erosion time estimated in the observation space; is the logarithmic erosion depth in the prediction space; A and m 1 It is a parameter related to the logarithmic corrosion time amplitude and the initial logarithmic corrosion time.
[0082] Step 4: Calculate the residual
[0083] Based on the difference between the predicted value and the measured value of the corrosion time, a residual between the predicted value and the measured value of the corrosion time is calculated.
[0084] The essence of a dynamic system is to consider the difference between input and predicted results. Combined with the effect of corrosion time on corrosion depth, the corrosion depth model can be modified by studying the corrosion time, improving the accuracy of the model, reducing overfitting, and correcting biased data. Therefore, the estimated value of corrosion time and measured values The difference between This has a significant impact on the results. When getting a new corrosion time value Then calculate the residual Specifically, the residual between the predicted and measured corrosion time is:
[0085]
[0086] in: is the residual between the predicted and measured values of corrosion time; is the measured value of the corrosion time, i.e., the logarithmic corrosion time in the state space; is the predicted value of corrosion time, that is, the logarithmic corrosion time estimated in the observation space.
[0087] Step 5: Calculate the weight sequence
[0088] The weight sequence is obtained by using the residual calculation The prediction accuracy of the model is enhanced by weight adjustment. Specifically, the weight sequence can be calculated by using an inverse sigmoid function, a Gaussian weight function, or an exponential decay function. This embodiment uses an inverse sigmoid function to calculate the weight sequence, which is expressed as:
[0089]
[0090] Among them: w is the weight of the distance; b is the weight scale parameter, which takes the Gaussian process prediction variance value after the physical model transformation; c is the location parameter, which takes the average value of the corrosion time residual.
[0091] Step 6: Least Squares Optimization
[0092] The model parameters are optimized and updated by minimizing the residual sum of squares between the actual observations and the model predictions. After least squares optimization, the model parameters are updated, and the second corrosion depth prediction value is obtained using the GPR model with updated parameters. The new prediction value represents the optimal corrosion depth estimation and is more accurate than the original prediction value.
[0093] Step 7: Correct the prediction results
[0094] The first corrosion depth prediction value and the second corrosion depth prediction value are corrected based on the weight sequence to obtain a corrected corrosion depth prediction result. Specifically, the corrected corrosion depth prediction result is:
[0095]
[0096] in: is the corrected corrosion depth prediction result; is the first corrosion depth prediction value; is the second corrosion depth prediction value; is the weight.
[0097] In summary, the pipeline corrosion prediction method based on Gaussian residual regression in this embodiment proposes a new pipeline corrosion depth prediction model V-GPRR (Velázquez-Gaussian Process Regression Residual), as shown in the following formula:
[0098]
[0099] Through the physical model and historical data, the model completes the trust evaluation of the data-driven model. The V-GPRR model uses the physical model to correct the weights of the corresponding physical model and Gaussian process model, such as Figure 2 shown.
[0100] The above-described embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or changes made by those skilled in the art based on the present invention are within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.
Claims
1. A Gaussian residual regression pipeline corrosion prediction method, characterized by: The steps include: Step 1: construct a state transfer equation of corrosion time, wherein the state transfer equation includes a state equation and an observation equation; Step 2: Predict corrosion depth using the GPR model The Gaussian process GP is used as the transfer function of the state equation, the corrosion time and current corrosion depth are used to train the GPR model, and the first corrosion depth prediction value is obtained through the GPR model; Step 3: Use the power law model to predict the new corrosion time The constants in the power law model were replaced with variables related to environmental characteristics, and the starting time of pipeline corrosion was introduced to improve the power law model. The improved power law model was used as the observation function of the state equation, and the linear relationship between corrosion time and corrosion depth was obtained after taking the logarithm of the power law model, and a new logarithmic corrosion time prediction value was predicted. Step 4: Calculate the residual Based on the difference between the predicted value and the measured value of the corrosion time, a residual between the predicted value and the measured value of the corrosion time is calculated; Step 5: Calculate the weight sequence The weight sequence is obtained by using the residual calculation, and the prediction accuracy of the model is enhanced by adjusting the weights; Step 6: Least Squares Optimization The model parameters are optimized and updated by minimizing the residual sum of squares between the actual observation value and the model prediction value, and the second corrosion depth prediction value is obtained by using the GPR model after parameter update; Step 7: Correct the prediction results The first corrosion depth prediction value and the second corrosion depth prediction value are corrected based on the weight sequence to obtain a corrected corrosion depth prediction result.
2. The pipeline internal corrosion prediction method based on Gaussian residual regression according to claim 1 is characterized in that: In the step 1, the state transfer equation of the corrosion time is: in: is the logarithmic erosion depth in state space; is the logarithmic erosion time in state space; is the logarithmic erosion depth in the prediction space; is the logarithmic erosion time estimated in the observation space; v k is the latent space noise; u k is the noise in the observation space; f k is the latent space transfer function; h k is the observation function.
3. The pipeline internal corrosion prediction method based on Gaussian residual regression according to claim 1 is characterized in that: In the step 2, the transfer function of the state equation is: Where: GP is the function of the GPR model; The kernel representation of the GPR model is: K=K linear *K RBF +K linear Where: K linear is a linear kernel; K RBF is an RBF kernel; and: Where: x and y represent the feature vectors of two input data points respectively; σ represents the output scale parameter; l represents the length scale parameter.
4. The pipeline internal corrosion prediction method based on Gaussian residual regression according to claim 1 is characterized in that: In step 3, the improved power law model is: D max =κ(T―T0) n Where: D max is the maximum corrosion depth; T and T0 are the corrosion time and the corrosion start time respectively; κ and n are the corrosion loss and corrosion protection performance parameters affected by the environment respectively; and: Where: i and n j represent the regression coefficients corresponding to κ and n respectively; x i and x j denote the scalars of the i-th and j-th environmental parameters respectively; κ0 and n0 denote the initial values of κ and n respectively; n denotes the number of environmental factors affecting κ; m denotes the number of environmental factors affecting n; The new logarithmic corrosion time is predicted to be: in: To predict the new logarithmic erosion time, that is, the logarithmic erosion time estimated in the observation space; is the logarithmic corrosion depth in the prediction space; A and m1 are parameters related to the logarithmic corrosion time amplitude and the initial logarithmic corrosion time.
5. The pipeline internal corrosion prediction method based on Gaussian residual regression according to claim 1 is characterized in that: In step 4, the residual between the predicted value and the measured value of the corrosion time is: in: is the residual between the predicted and measured values of corrosion time; is the measured value of the corrosion time, i.e., the logarithmic corrosion time in the state space; is the predicted value of corrosion time, that is, the logarithmic corrosion time estimated in the observation space.
6. The pipeline internal corrosion prediction method based on Gaussian residual regression according to claim 1 is characterized in that: In the step 5, the weight sequence is calculated using an inverse sigmoid function, a Gaussian weight function or an exponential decay function.
7. The pipeline internal corrosion prediction method based on Gaussian residual regression according to claim 6 is characterized by: The inverse sigmoid function is used to calculate the weight sequence, which is expressed as: Among them: w is the weight of the distance; b is the weight scale parameter, which takes the Gaussian process prediction variance value after the physical model transformation; c is the location parameter, which takes the average value of the corrosion time residual.
8. The pipeline internal corrosion prediction method based on Gaussian residual regression according to claim 1 is characterized in that: In step 7, the corrected corrosion depth prediction result is: in: is the corrected corrosion depth prediction result; is the first corrosion depth prediction value; is the second corrosion depth prediction value; is the weight.
Citation Information
Patent Citations
Method for evaluating corrosion reliability of oil-gas pipeline falling objects by using grey system
CN106355320A
CAGM (1, 1)-BPNN-based in-service oil and gas pipeline corrosion prediction method
CN109784590A
Atmospheric corrosion prediction method considering corrosion dynamic stability
CN113569387A
Natural gas marine pipeline corrosion on-line detection method and residual life prediction method
CN115561153A
Prediction model for external corrosion residual life of buried pipeline
CN116757091A
Cited By
Traffic calculation method and device, electronic equipment and storage medium
CN120352003A
Cooling tower self-adaptive regulation and control method and system based on artificial intelligence
CN120669542A