City lifeline pipeline corrosion risk early warning method based on digital twinning
By combining digital twin technology with physical space, numerical space, and artificial intelligence algorithms, a prediction model for the internal and external corrosion rates of multiphase flow underground pipelines is constructed. This solves the problem of poor universality of existing corrosion risk early warning models, achieves accurate corrosion risk assessment and remaining life prediction, and improves the real-time performance and effectiveness of pipeline safety management.
Patent Information
- Application Number
- CN202411876924.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Existing technologies for corrosion risk early warning models of multiphase flow underground pipelines have poor universality and insufficient real-time assessment and early warning mechanisms, making it impossible to accurately assess corrosion status and trends, resulting in potential risks to pipeline safety and lifespan management.
By establishing a digital twin-based multiphase flow underground pipeline state parameter sensing module, and combining physical space, numerical space and artificial intelligence algorithms, an internal and external corrosion rate prediction model is constructed. Using a physical-guided neural network and particle swarm optimization algorithm, combined with Wiener process and elastoplastic fracture mechanics theory, real-time graded early warning of corrosion risk and prediction of remaining life are achieved.
It improves the accuracy and adaptability of corrosion risk prediction, realizes real-time corrosion risk early warning and remaining service prediction for multiphase flow underground pipelines, provides dynamic management means for pipeline maintenance and repair, and enhances the effectiveness of pipeline safety and service life management.
Smart Images

Figure CN119918130B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of underground pipeline engineering technology, and in particular to a method for early warning of corrosion risks in urban lifeline pipelines based on digital twins. Background Technology
[0002] Multiphase flow underground pipelines, as critical infrastructure in urban lifeline projects, are constantly exposed to complex natural environments and variable operating conditions, making them highly susceptible to corrosion. Corrosion leads to gradual damage to the pipeline structure, reduces its load-bearing capacity, and increases the risk of safety accidents such as leaks and even explosions, posing a serious threat to the environment, personnel safety, and economic interests. Furthermore, as the service life of pipelines increases, corrosion becomes increasingly pronounced, necessitating risk assessment and anti-corrosion measures to ensure the stable operation of the pipeline system. Therefore, studying the corrosion risks of multiphase flow underground pipelines and accurately assessing their corrosion status and trends is of significant practical importance for improving pipeline safety management and extending service life.
[0003] Current research on corrosion risk early warning for multiphase flow underground pipelines throughout their entire service life suffers from problems such as poor predictive model universality and insufficient real-time assessment and early warning mechanisms.
[0004] Chinese invention patent, publication number CN113919106B, entitled "A Safety Evaluation Method for Underground Pipeline Structures Based on Augmented Reality and Digital Twins," discloses a method for evaluating the safety of underground pipeline structures based on augmented reality and digital twins. This method utilizes augmented reality technology to enable interaction between the digital twin of the pipeline and the real world, fully integrating the digital twin, the on-site environment, and humans. Users can quickly and clearly understand the structural status, leakage conditions, and structural evolution trends of underground pipelines through a perspective-based AR view and immersive human-computer interaction. This allows for scientific on-site assessment of the pipeline's condition, improving the efficiency of immediate incident response and decision-making. It is of great significance for monitoring the structural health of underground pipe networks, guiding on-site maintenance and repair, improving operational efficiency, and stimulating innovative thinking in data fusion. However, this technical solution only considers lagging parameters such as the structural strength and leakage points of the underground pipeline to adjust maintenance plans, without predicting the remaining lifespan of the underground pipeline. This results in poor predictive model universality and insufficient real-time assessment and early warning mechanisms. Summary of the Invention
[0005] To address the shortcomings of existing technologies in corrosion risk early warning research for multiphase flow underground pipelines, such as poor predictive model universality and insufficient implementation assessment and early warning mechanisms, this invention proposes a corrosion risk early warning method for urban lifeline pipelines based on digital twins. By establishing a highly digitized multiphase flow underground pipeline state parameter sensing and acquisition module and integrating physical space, numerical space, and artificial intelligence algorithms, real-time graded early warning and remaining life prediction of corrosion risks for multiphase flow underground pipelines are achieved.
[0006] This invention is achieved through the following technical solution, including the following steps:
[0007] S1. Based on the monitoring and control system and detection equipment, obtain the internal operating parameters of the pipeline, the external environmental parameters of the pipeline, and the external corrosion rate data;
[0008] S2. Based on the internal operating parameters of the pipeline obtained from the monitoring and control system, construct an internal corrosion rate prediction model based on data-physical fusion and physical-guided neural network.
[0009] S3. Based on the pipeline external environment parameters and external corrosion rate data obtained in step S1, construct an external corrosion rate prediction model based on particle swarm optimization algorithm and related vector machine.
[0010] S4. Complete and time-register the external corrosion rate data of the pipeline using spline interpolation;
[0011] S5. Based on the Wiener process and elastoplastic fracture mechanics theory, a pipeline corrosion risk classification and early warning method is constructed.
[0012] S6. Based on steps S1 to S5, establish a corrosion risk early warning system for the entire service life of underground pipelines based on digital twins.
[0013] As a further preferred option, the specific steps of step S1 are as follows:
[0014] S11. Monitor the internal operating parameters of the pipeline using pressure sensors, temperature sensors, flow meters, and chromatographs. These internal operating parameters include pressure distribution data along the pipeline {P'1, P'2, ..., P'...}. n Temperature distribution data {T'1,T'2,…,T' n}, Medium flow rate data Q, Fluid medium components {S1,S2,…,S n The internal operating parameters of the pipeline are collected by a programmable logic controller (PLC) and the output signals are converted into digital data. The data is then processed by a local control station and transmitted to the system server for storage. Finally, a human-machine interface (HMI) is used to link to the system server and SQL Server database for management.
[0015] S12. Based on various testing equipment, obtain the external environmental parameters and external corrosion rate data of the pipeline. The external environmental parameters of the pipeline include the density of anti-corrosion layer damage points X1, soil pH value X2, soil moisture content X3, redox potential X4, soil resistivity X5, spontaneous potential X6, stray current X7, cathodic protection rate X8, and soil salinity X9.
[0016] S121. According to the Pearson test method, the density of the damaged points of the anti-corrosion layer X1 is obtained;
[0017] S122. Add deionized water to the dried and sieved soil sample and let it stand to settle. Use a pH meter to measure the pH value of the supernatant to obtain the soil pH value X2.
[0018] S123. According to the drying method, the soil moisture content X3 is obtained;
[0019] S124. According to the depolarization method, the redox potential X4 is obtained;
[0020] S125. According to the equidistant four-point method, the soil resistivity X5 is obtained;
[0021] S126. Based on the surface reference method, the natural potential X6 is obtained;
[0022] S127. According to the positive offset method of pipe-to-ground potential, measure the positive offset of pipe-to-ground potential relative to natural potential to obtain stray current X7.
[0023] S128. Obtain the protection potential distribution diagram of the entire pipeline according to the close-interval potential detection method, and then calculate the cathodic protection rate to obtain the cathodic protection rate X8.
[0024] S129. The total amount of soluble salts in the soil was determined by the dry residue weighing method, and the soil salinity X9 was obtained.
[0025] S1210. According to the ultrasonic testing method, the signal reflected back from the outer wall of the pipe is received, and the corrosion depth of the outer wall of the pipe is obtained through data processing, thereby obtaining the external corrosion rate data X of the pipe section.
[0026] As a further preferred option, the specific steps of step S2 are as follows:
[0027] S21. Based on the internal operating parameters of the pipeline obtained by the monitoring and control system, establish a fluid dynamics simulation model that integrates data and physical parameters to obtain the partial pressure of H2S M1, partial pressure of CO2 M2, temperature M3, pH value M4, and liquid flow velocity M5.
[0028] S211. Based on the fluid medium composition information, pipe section inlet and outlet temperature, pressure and flow information and pipe parameter information monitored by the monitoring and control system, construct a physical space based on the monitoring and control system and the scale test, establish a pipe section scale test, and use the laser Doppler velocity meter (LDV) and electrochemical workstation to obtain the wall shear stress τ and the corrosion rate inside the pipe, respectively.
[0029] S212. Based on the fluid characteristics, temperature, pressure and flow rate at the inlet and outlet of the pipe section monitored by the monitoring and control system, and combined with the pipeline parameter information, the wall shear stress is preset as the pipe wall boundary condition. A numerical space based on the multiphase flow simulation software OLGA is constructed to establish a numerical simulation model of the pipe section.
[0030] S213. Based on the pressure distribution data along the pipeline in physical space obtained in step S11 {P'1,P'2,…,P'...} n Temperature distribution data {T'1,T'2,…,T' n} and the wall shear stress τ obtained in step S211, establish the interaction between physical space and numerical space, and correct the preset maximum number of iterations N and wall shear stress τ in numerical space;
[0031] S214. The genetic algorithm (GA) is used to optimize the preset parameters in the numerical space, with the target fitness function f. k The formula is as follows:
[0032]
[0033] f k =ω1RMSE 1k +ω2RMSE 2k
[0034] In the formula: n is the total number of monitoring points in the monitoring and control system; P ik P' represents the pressure value in the numerical space at the i-th measuring point during the k-th iteration; i T represents the pressure value monitored at the i-th measuring point in the physical space monitoring and control system. ik T' represents the temperature value in the numerical space at the i-th measuring point during the k-th iteration; i RMSE is the temperature value monitored at the i-th measuring point in the physical space monitoring and control system. 1k The root mean square error (RMSE) is the difference between the pressure values in the numerical space and the physical space at the k-th iteration. 2k f is the root mean square error between the temperature values in the numerical space and the physical space at the k-th iteration; k ω1 represents the objective function value at the k-th iteration; ω1 and ω2 are the weights.
[0035] S215. Using the optimal parameters corrected in step S214, perform fluid dynamics simulation of the multiphase flow pipe section to obtain data on factors affecting internal corrosion, including H2S partial pressure M1, CO2 partial pressure M2, temperature M3, pH value M4, and liquid flow rate M5.
[0036] S22. Construct a pipeline corrosion rate prediction model based on a Physically Guided Neural Network (PGNN), and preprocess the data obtained in step S21, including H2S partial pressure M1, CO2 partial pressure M2, temperature M3, pH value M4, liquid flow rate M5, corrosion inhibitor injection amount M6 obtained from the investigation, and pipeline corrosion rate M, dividing them into training and testing sets. The physical loss term is then added to the loss function, as shown in the following formula:
[0037]
[0038] In the formula: ΔPHY is the physical difference term; n is the total number of samples; M i M' is the predicted internal corrosion rate of the model on the i-th sample; i This is the predicted internal corrosion rate of the model on the i-th sample after feature modification. Let be the actual internal corrosion rate on the i-th sample; λ is the weight of the physical loss term;
[0039] The pipeline internal corrosion rate prediction model based on the Physically Guided Neural Network (PGNN) was trained and tested, resulting in an internal corrosion rate prediction model based on data-physical fusion and the PGNN.
[0040] As a further preferred option, the specific steps of step S3 are as follows:
[0041] S31. Randomly select several sets of external environmental parameters {X1,X2,…,X9} and corresponding external corrosion rate data X obtained in step S12, and perform data preprocessing as a dataset, dividing it into a training set and a test set.
[0042] S32. Select the Gaussian radial basis function (RBF) as the kernel function, construct the RVM regression model, and set the initial hyperparameter α and kernel function parameter g to perform preliminary training on the RVM regression model.
[0043] S33. Using the particle swarm optimization algorithm PSO, the root mean square error RMSE is selected as the fitness function to optimize the hyperparameter α and the kernel function parameter g.
[0044] S34. Select the optimal hyperparameter α and kernel function parameter g to construct the RVM model, and use the training set and test set obtained in step S31 to train and test the model, thereby obtaining the external corrosion rate prediction model based on particle swarm optimization algorithm and related vector machine.
[0045] As a further preferred option, the specific steps of step S4 are as follows:
[0046] S41. Using Python and its built-in SciPy library, and combining the principle of spline interpolation, write a program that can solve the spline interpolation function and output the corresponding interpolation value, and automatically update the spline interpolation function according to new data points.
[0047] S42. Using the external environmental parameters {X1, X2, ..., X9} of the pipeline obtained in step S12 as input data, and employing the external corrosion rate prediction model based on particle swarm optimization algorithm and correlation vector machine established in step S3, several external corrosion rate data points for this pipe section are obtained, forming the external corrosion rate data set {t1: v1, t2: v2, ..., t...} for this pipe section. n :v n};
[0048] S43. Solve the program using spline interpolation. Take the external corrosion rate data set from step S42 as the program input, and take the monitoring sampling frequency of the monitoring and control system of the same pipe section in step S1 as the standard. Use spline interpolation to complete the time registration of the internal corrosion rate V1 and the external corrosion rate V2 of the pipe section, and form a database of the synergistic effect of internal and external corrosion rates.
[0049] As a further preferred option, the specific steps of step S5 are as follows:
[0050] S51. According to the formula X(t)=X(0)+X(t-1)e -λt +σB(t), formula Y(t)=X(t)+ε=X(0)+X(t-1)e -λt +σB(t)+ε and the formula A nonlinear Wiener corrosion degradation model for multiphase flow underground pipelines was constructed.
[0051] In the formula: X(t) is the actual performance degradation index; Y(t) is the predicted performance degradation index; λ is the drift coefficient, characterizing the degradation rate of the pipeline; σ is the diffusion coefficient; B(t) represents the standard Brownian motion; e -λt The system represents nonlinear characteristics; ε is the error term; d t Let d be the corrosion depth of the pipeline at time t; d0 is the initial wall thickness of the pipeline.
[0052] S52. Based on the database of the combined effect of internal and external corrosion rates obtained in step S43, the corrosion depth d of the pipe section is determined. t Calculations were performed to obtain several corrosion depths d. t The formula is as follows:
[0053]
[0054] In the formula: V1 is the internal corrosion rate of a certain pipe section; V2 is the external corrosion rate of a certain pipe section;
[0055] S53. Update the parameters using the Extended Kalman Filter (EKF) algorithm, using the several corrosion depths d obtained in step S52. t As input, the drift coefficient η and diffusion coefficient σ in the nonlinear Wiener degradation model are iteratively updated to construct the pipe section corrosion degradation model;
[0056] S54. Predict the remaining life of the pipe section according to the formula T=inf{t:X(t)>ω,t≥0}, where ω is the failure threshold.
[0057] S55. Corrosion risk classification and early warning for pipe sections:
[0058] The performance degradation index at the maximum allowable corrosion depth is taken as the starting point of the failure stage, and the performance degradation index corresponding to 20% of the maximum allowable corrosion depth is taken as the end point of the normal operation stage and the starting point of the degradation stage. The corrosion risk of the pipe section in the normal operation stage is 1, and maintenance measures can be omitted depending on the specific situation. The corrosion risk of the pipe section in the degradation stage is 2, and certain maintenance measures are required to slow down the degradation rate of the pipe section. The corrosion risk of the pipe section in the failure stage is 3, and necessary maintenance measures must be taken to ensure the normal operation of the pipe section.
[0059] S56. Based on the SHAP algorithm, obtain the average absolute SHAP value of each feature used as input during prediction in the internal corrosion rate prediction model based on data-physical fusion and physical guidance neural network constructed in step S2 and the external corrosion rate prediction model based on particle swarm optimization algorithm and correlation vector machine constructed in step S3.
[0060] As a further preferred option, the specific steps of step S6 are as follows:
[0061] S61. Establish a pipeline status parameter sensing and acquisition module;
[0062] S611. Based on IoT technology and cloud computing, and with the help of data analysis and visualization tools, a digital detection system for external corrosion data of multiphase flow underground pipelines is constructed to monitor, analyze and generate reports on pipeline external corrosion detection data, thereby realizing the digitization and online processing of detection data and the automation of data processing.
[0063] S612. Establish an API interface between the digital detection system and the monitoring and control system to realize data resource sharing between the two and establish a pipeline status parameter sensing and acquisition module.
[0064] S62. Deploy the internal corrosion rate prediction model based on data-physical fusion and physical-guided neural network constructed in step S2 and the external corrosion rate prediction model based on particle swarm optimization algorithm and related vector machine constructed in step S3 to the cloud. Combined with message queue, transmit the monitoring and detection data of pipeline state parameter perception and acquisition module to the model interface, and set up an automated data preprocessing process to build a corrosion rate inference and prediction module.
[0065] S63. After the prediction results are output in the cloud, two post-processing modules are added. One post-processing module performs spline interpolation on the external corrosion rate of the low-frequency output and stores the prediction results of the internal corrosion rate and external corrosion rate with the same frequency in the cloud database. The other post-processing module uses the SHAP algorithm to calculate the average absolute SHAP value of each input feature and stores it in the cloud database accordingly.
[0066] S64. Establish a historical cumulative corrosion depth calculation module, and use the PyMySQL database connection library to configure the database connection parameters, establish a connection with the cloud database and perform calculations.
[0067] S65. Construct a module for calculating the maximum corrosion depth of the pipe section and integrate it into the corrosion risk classification and early warning module. Call the historical cumulative corrosion depth calculation performance degradation index and calculate the corrosion risk level and the remaining service life of the current pipe section according to the risk warning principle and degradation model in step S5.
[0068] S66. Use the WebSocket protocol to establish a two-way communication channel between the server, cloud data, and the front end, and push the predicted internal and external corrosion rates, corrosion depth values, average absolute SHAP values of each input feature, remaining service life of the pipe section, and corrosion risk level of the pipe section to the front end at different times for different pipe sections.
[0069] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0070] 1. This invention constructs a sensing and acquisition module for the state parameters of multiphase flow underground pipelines and, by combining physical space, numerical space, and artificial intelligence fusion technologies, establishes a more accurate prediction model for internal and external corrosion rates based on corrosion mechanisms. This improves the universality and accuracy of the prediction model, enhancing its adaptability to various environments and operating conditions, significantly increasing the accuracy of corrosion risk prediction, and overcoming the problem of inconsistent performance of existing models in different scenarios.
[0071] 2. This invention employs nonlinear Wiener processes and elastoplastic fracture mechanics theory to develop a real-time risk early warning mechanism based on corrosion depth and establish a method for predicting remaining service life. This early warning mechanism can perform online monitoring and real-time classification of corrosion risks, realizing real-time corrosion risk early warning and remaining service life prediction for multiphase flow underground pipeline sections, thereby providing a dynamic and proactive management method for pipeline maintenance.
[0072] 3. This invention is of great significance for the detection, repair and maintenance of multiphase flow underground pipelines under corrosion risk, and also provides ideas for the digital and intelligent management of multiphase flow underground pipelines. Attached Figure Description
[0073] Figure 1 This is an overall flowchart of the early warning method of the present invention.
[0074] Figure 2 This is a flowchart illustrating the construction process of the internal corrosion rate prediction model based on data-physical fusion and physical-guided neural networks of the present invention. Detailed Implementation
[0075] The advantages and features of the present invention will be illustrated and explained by the following non-limiting description of preferred embodiments, which are given by way of example only with reference to the accompanying drawings.
[0076] like Figure 1 and 2 As shown, this invention proposes a corrosion risk early warning method for urban lifeline pipelines based on digital twins. This method, with digital twins as its core, integrates physical space, numerical space, and artificial intelligence to establish a prediction model for the internal and external corrosion rates of multiphase flow underground pipelines, as well as a pipeline corrosion degradation model. It can provide real-time corrosion risk early warning and remaining life prediction for different multiphase flow underground pipeline sections, thus providing a dynamic and proactive management method for pipeline maintenance and upkeep. Specifically, it includes the following steps:
[0077] S1. Based on the monitoring and control system and detection equipment, obtain the internal operating parameters of the pipeline, the external environmental parameters of the pipeline, and the external corrosion rate data.
[0078] S11. Monitor the internal operating parameters of the pipeline using pressure sensors, temperature sensors, flow meters, and chromatographs. These internal operating parameters include pressure distribution data along the pipeline {P'1, P'2, ..., P'...}. n Temperature distribution data {T'1,T'2,…,T' n}, Medium flow rate data Q, Fluid medium components {S1,S2,…,S nThe system collects the internal operating parameters of the pipeline through a programmable logic controller (PLC) and converts the output signals into digital data. The PLC then processes the data through a local control station and transmits it to the system server for storage. Finally, a human-machine interface (HMI) is used to link to the system server and SQL Server database for management.
[0079] S12. Based on various testing equipment, obtain the external environmental parameters and external corrosion rate data of the pipeline. The external environmental parameters of the pipeline include the density of anti-corrosion layer damage points X1, soil pH value X2, soil moisture content X3, redox potential X4, soil resistivity X5, spontaneous potential X6, stray current X7, cathodic protection rate X8, and soil salinity X9.
[0080] S121. According to the Pearson test method, the location of the damage point is determined by the voltage difference at the damage point, and then the density of damage points X1 of the anti-corrosion layer is obtained by calculation.
[0081] S122. The dried and sieved soil sample was added to deionized water and allowed to settle. The pH value of the supernatant was measured using a pH meter to obtain the soil pH value X2.
[0082] S123. According to the drying method, the soil moisture content X3 is obtained.
[0083] S124. According to the depolarization method, read the potential value of the oxidation-reduction potential meter and convert it to obtain the oxidation-reduction potential X4.
[0084] S125. Based on the equidistant four-point method, the resistivity is calculated using the potential difference and test current to obtain the soil resistivity X5.
[0085] S126. Based on the surface reference method, a digital multimeter is used to measure the potential and obtain the natural potential X6.
[0086] S127. According to the positive offset method of pipe-to-ground potential, measure the positive offset of pipe-to-ground potential relative to natural potential to obtain stray current X7.
[0087] S128. Obtain the protection potential distribution diagram of the entire pipeline according to the close-interval potential detection method, and then calculate the cathodic protection rate to obtain the cathodic protection rate X8.
[0088] S129. The total amount of soluble salts in the soil was determined by the dry residue weighing method, and the soil salinity X9 was obtained.
[0089] S1210. According to the ultrasonic testing method, the signal reflected back from the outer wall of the pipe is received, and the corrosion depth of the outer wall of the pipe is obtained through data processing, thereby obtaining the external corrosion rate data X of the pipe section.
[0090] This step mainly targets underground pipelines with multiphase flow characteristics, such as oil and gas gathering and transportation pipelines and drainage and sewage pipelines in urban lifelines, to sense and obtain urban underground pipeline status parameters.
[0091] First, a Supervisory Control and Data Acquisition (SCADA) system is used to sense and acquire the internal operating parameters of the pipeline in real time. Output signals from field physical monitoring devices such as pressure sensors, temperature sensors, flow meters, and chromatographs are collected by a programmable logic controller (PLC) and converted into digital data. Then, the pressure distribution data along the pipeline {P'1, P'2, ..., P'...} is processed. n Temperature distribution data {T'1,T'2,…,T' n}, Medium flow rate data Q, Fluid medium components {S1,S2,…,S n The parameters and content of each component are processed by the local control station and transmitted to the system server for storage. Finally, the human-machine interface (HMI) is used to link to the system server and SQL Server database for management, realizing real-time perception of the internal operating parameters of the pipeline.
[0092] Secondly, various detection devices are used to sense and acquire external environmental parameters and external corrosion rate data of the pipeline. The external environmental parameters detected in this invention include: density of anti-corrosion layer damage points (X1), soil pH value (X2), soil moisture content (X3), redox potential (X4), soil resistivity (X5), spontaneous potential (X6), stray current (X7), cathodic protection rate (X8), and soil salinity (X9). The corresponding detection methods are Pearson method, pH meter measurement method, drying method, depolarization method, equidistant four-point method, surface reference method, pipe-to-soil potential positive offset method, close-interval potential detection method, and dry slag weighing method. The external corrosion rate data (X) is indirectly detected using ultrasonic testing.
[0093] S2. Based on the internal operating parameters of the pipeline obtained from the monitoring and control system, construct an internal corrosion rate prediction model based on data-physical fusion and physical-guided neural network.
[0094] S21. Based on the internal operating parameters of the pipeline obtained from the monitoring and control system, establish a fluid dynamics simulation model that integrates data and physical parameters to obtain the partial pressure of H2S M1, the partial pressure of CO2 M2, the temperature M3, the pH value M4, and the liquid flow velocity M5.
[0095] S211. Based on the fluid medium composition information, pipe section inlet and outlet temperature, pressure and flow information and pipe parameter information monitored by the monitoring and control system, construct a physical space based on the monitoring and control system and the scale test, establish a pipe section scale test, and use a laser Doppler current meter (LDV) and an electrochemical workstation to obtain the wall shear stress τ and the corrosion rate inside the pipe, respectively.
[0096] S212. Based on the fluid characteristics, temperature, pressure and flow rate at the inlet and outlet of the pipe section monitored by the monitoring and control system, and combined with the pipeline parameter information, the wall shear stress is preset as the pipe wall boundary condition. A numerical space based on the multiphase flow simulation software OLGA is constructed to establish a numerical simulation model of the pipe section.
[0097] S213. Based on the pressure distribution data along the pipeline in physical space obtained in step S11 {P'1,P'2,…,P'...} n Temperature distribution data {T'1,T'2,…,T' n} and the wall shear stress τ obtained in step S211, establish the interaction between physical space and numerical space, and correct the preset maximum number of iterations N and wall shear stress τ in numerical space.
[0098] S214. The genetic algorithm (GA) is used to optimize the preset parameters in the numerical space, with the target fitness function f. k The formula is as follows:
[0099]
[0100] f k =ω1RMSE 1k +ω2RMSE 2k
[0101] In the formula: n is the total number of monitoring points in the monitoring and control system; P ik P' represents the pressure value in the numerical space at the i-th measuring point during the k-th iteration; i T represents the pressure value monitored at the i-th measuring point in the physical space monitoring and control system. ik T' represents the temperature value in the numerical space at the i-th measuring point during the k-th iteration; i RMSE is the temperature value monitored at the i-th measuring point in the physical space monitoring and control system. 1k The root mean square error (RMSE) is the difference between the pressure values in the numerical space and the physical space at the k-th iteration. 2k f is the root mean square error between the temperature values in the numerical space and the physical space at the k-th iteration; k ω1 represents the objective function value at the k-th iteration; ω1 and ω2 are weights, both set to 0.5.
[0102] S215. Using the optimal parameters corrected in step S214, perform fluid dynamics simulation of the multiphase flow pipe section to obtain data on factors affecting internal corrosion, including H2S partial pressure M1, CO2 partial pressure M2, temperature M3, pH value M4, and liquid flow rate M5.
[0103] S22. Construct a pipeline corrosion rate prediction model based on a Physically Guided Neural Network (PGNN). Preprocess the data obtained in step S21, including H2S partial pressure M1, CO2 partial pressure M2, temperature M3, pH value M4, liquid flow rate M5, the investigated corrosion inhibitor injection amount M6, and the pipeline corrosion rate M. Divide the data into training and testing sets at a 7:3 ratio, and incorporate the physical loss term into the loss function, as shown in the following formula:
[0104]
[0105] In the formula: ΔPHY is the physical difference term; n is the total number of samples; M i M' is the predicted internal corrosion rate of the model on the i-th sample; i This is the predicted internal corrosion rate of the model on the i-th sample after feature modification. λ represents the actual internal corrosion rate on the i-th sample; λ is the weight of the physical loss term.
[0106] The pipeline internal corrosion rate prediction model based on the Physically Guided Neural Network (PGNN) was trained and tested, resulting in an internal corrosion rate prediction model based on data-physical fusion and the PGNN.
[0107] like Figure 2 The diagram shows the construction flowchart of the internal corrosion rate prediction model based on data-physical fusion and physical-guided neural networks of the present invention. First, a data-physical fusion fluid dynamics simulation method is established: Step 1: Constructing a physical space based on a monitoring and control system and a scaled-down test. Using the fluid medium composition information, pipe section inlet and outlet temperatures, pressures, flow rates, and pipe parameter information monitored by the monitoring and control system, a scaled-down test of the pipe section is established. In the test, a laser Doppler velocity meter (LDV) and an electrochemical workstation are used to measure the wall shear stress τ and the internal corrosion rate M of the pipe, respectively. Step 2: Constructing a numerical space based on the multiphase flow simulation software OLGA. Using the fluid characteristics monitored by the monitoring and control system, the pipe section inlet and outlet temperatures, pressures, and flow rates, combined with pipe parameter information, the wall shear stress is preset as the pipe wall boundary condition to establish a numerical simulation model of the pipe section. Step 3: Establishing the interaction between the physical space and the numerical space. Based on the pipe pressure distribution data {P'1, P'2, ..., P'...} along the pipe in the physical space... n Temperature distribution data {T'1,T'2,…,T' nThe fourth step involves correcting the preset maximum iteration number N and wall shear stress τ in the numerical space; the fourth step uses a genetic algorithm (GA) to optimize the preset parameters in the numerical space, with the target fitness function f. k Finally, the fluid dynamics of the multiphase flow pipe section were simulated using the corrected optimal parameters to obtain the partial pressure of H2S M1, partial pressure of CO2 M2, temperature M3, pH value M4, and liquid velocity M5.
[0108] Subsequently, a pipeline internal corrosion rate prediction model based on a Physically Guided Neural Network (PGNN) was established. The partial pressure of H2S (M1), partial pressure of CO2 (M2), temperature (M3), pH value (M4), liquid flow rate (M5), the amount of corrosion inhibitor injected (M6) obtained from the investigation, and the pipeline internal corrosion rate (M) were preprocessed and divided into training and testing sets in a 7:3 ratio. The physical loss term was added to the loss function, and the PGNN was trained and tested to complete the establishment of the internal corrosion rate prediction model.
[0109] S3. Based on the external environmental parameters and external corrosion rate data of the pipeline obtained in step S1, construct an external corrosion rate prediction model based on particle swarm optimization algorithm and related vector machine.
[0110] S31. Randomly select several groups obtained in step S12, preferably 100 groups of pipeline external environment parameters {X1,X2,…,X9} and corresponding external corrosion rate data X, and perform data preprocessing to form a dataset, which is then divided into a training set and a test set in a 7:3 ratio.
[0111] S32. Select the Gaussian radial basis function (RBF) as the kernel function to construct the RVM regression model, and set the initial hyperparameter α and kernel function parameter g to perform preliminary training on the RVM regression model.
[0112] S33. Using the particle swarm optimization algorithm (PSO), the root mean square error (RMSE) is selected as the fitness function to optimize the hyperparameter α and the kernel function parameter g.
[0113] S34. Select the optimal hyperparameter α and kernel function parameter g to construct the RVM model, and use the training set and test set obtained in step S31 to train and test the model, thereby obtaining the external corrosion rate prediction model based on particle swarm optimization algorithm and related vector machine.
[0114] This step mainly includes two aspects: one is the construction of the RVM model, and the other is the optimization of the hyperparameters of the RVM model using the PSO algorithm. These two aspects will be explained in detail below.
[0115] (1) Construct an RVM model, select the Gaussian radial basis function RBF as the kernel function, and set the initial hyperparameter α and kernel function parameter g. In step S1, select 100 sets of external corrosion influencing factor data {X1,X2,…,X9} and the corresponding external corrosion rate data X and perform data preprocessing as a dataset. After data preprocessing, divide the dataset into training set and test set in a 7:3 ratio to perform the initial training of the RVM model and obtain the initial prediction performance of the model.
[0116] (2) The hyperparameters of the RVM model are optimized using the PSO algorithm. The specific steps are as follows: ① Set the PSO algorithm parameters: particle swarm size m = 15, maximum number of iterations g = 6, inertia weight ω = 0.5, individual learning factor c_1 = 0.5, and swarm learning factor c_2 = 0.5; ② Initialize the particle positions and velocities. Randomly generate the initial positions of the particles within the domain of the hyperparameter α and kernel function parameter g in the RVM model, and randomly generate the initial velocities of the particles within a reasonable range; ③ Define a fitness function to evaluate the performance of the RVM model corresponding to each particle. In this embodiment, the root mean square error (RMSE) is selected as the fitness function, and the fitness function is evaluated in the iterative optimization stage. In each iteration of the segment, the fitness value corresponding to each particle is calculated; ④ the individual optimal and global optimal positions are updated; ⑤ the particle velocity and position are updated, and the particle velocity vector and position vector are updated based on the individual optimal position and global optimal position, combined with the inertia weight, individual learning and group learning factors and velocity update formula; ⑥ the iteration exit condition is checked, and if the fitness value of the next iteration decreases by less than 3% compared with the previous iteration, the iteration is stopped; ⑦ the optimal hyperparameter α and kernel function parameter g are output, the optimal parameters are used to build the RVM model, and the pipeline external corrosion dataset established in step S1 is used to train and test the RVM model to complete the establishment of the external corrosion rate prediction model.
[0117] S4. Complete and time-register the external corrosion rate data of the pipeline using spline interpolation.
[0118] S41. Using Python and its built-in SciPy library, and combining the principles of spline interpolation, write a program that can solve the spline interpolation function and output the corresponding interpolation value, and automatically update the spline interpolation function based on new data points.
[0119] S42. Using the external environmental parameters {X1, X2, ..., X9} of the pipeline obtained in step S12 as input data, and employing the external corrosion rate prediction model based on particle swarm optimization algorithm and correlation vector machine established in step S3, several external corrosion rate data points for this pipe section are obtained, forming the external corrosion rate data set {t1: v1, t2: v2, ..., t...} for this pipe section. n :v n}
[0120] S43. Solve the program using spline interpolation. Take the external corrosion rate data set from step S42 as the program input, and take the monitoring sampling frequency of the monitoring and control system of the same pipe section in step S1 as the standard. Use spline interpolation to complete the time registration of the internal corrosion rate V1 and the external corrosion rate V2 of the pipe section, and form a database of the synergistic effect of internal and external corrosion rates.
[0121] This step is mainly to overcome the problem of inconsistent sampling frequencies between the monitoring data of the monitoring and control system and the detection data of various detection devices in step S1.
[0122] S5. Based on the Wiener process and elastoplastic fracture mechanics theory, a pipeline corrosion risk classification and early warning method is constructed.
[0123] This step treats the corrosion degradation of multiphase flow underground pipelines as a nonlinear Wiener degradation process, establishes a nonlinear Wiener corrosion degradation model for the pipeline, and uses the extended Kalman filter algorithm to update the parameters. The specific implementation process is as follows:
[0124] S51. According to the formula X(t)=X(0)+X(t-1)e -λt +σB(t), formula Y(t)=X(t)+ε=X(0)+X(t-1)e -λt +σB(t)+ε and the formula A nonlinear Wiener corrosion degradation model for multiphase flow underground pipelines is constructed; where: X(t) is the actual performance degradation index; Y(t) is the predicted performance degradation index; λ is the drift coefficient, characterizing the degradation rate of the pipeline; σ is the diffusion coefficient; B(t) represents the standard Brownian motion; e -λt This represents the nonlinear characteristics of the system; ε is the error term. d t Let t be the corrosion depth of the pipeline at time t; d0 is the initial wall thickness of the pipeline.
[0125] The mathematical expression for the actual Wiener degradation process in a pipeline is as follows:
[0126] X(t)=X(0)+X(t-1)e -λt +σB(t)
[0127] As shown, it is assumed that the error term ε between the predicted degradation state and the actual degradation state at any given time follows a mean of 0 and a variance of . If the distribution follows a normal pattern, then the expression for the corrosion degradation model of the pipeline section is as follows:
[0128] Y(t)=X(t)+ε=X(0)+t(t-1)e -λt +σB(t)+ε
[0129] As shown, the wall thickness degradation is selected as the performance degradation index, and its expression is as follows:
[0130]
[0131] As shown.
[0132] S52. Based on the database of the combined effect of internal and external corrosion rates obtained in step S43, the corrosion depth d of the pipe section is determined. t Calculations were performed to obtain several corrosion depths d. t The formula is as follows:
[0133]
[0134] In the formula: V1 is the internal corrosion rate of a certain pipe section; V2 is the external corrosion rate of a certain pipe section, both of which are obtained from step S43.
[0135] S53. Update the parameters using the Extended Kalman Filter (EKF) algorithm, using the several corrosion depths d obtained in step S52. t As input, the drift coefficient η and diffusion coefficient σ in the nonlinear Wiener degradation model are iteratively updated to construct a pipe section corrosion degradation model.
[0136] S54. Predict the remaining life of the pipe section according to the formula T=inf{t:X(t)>ω,t≥0}, where ω is the failure threshold.
[0137] Based on the theory of elastoplastic fracture mechanics, and according to the ultimate operating pressure p of the pipeline max Using Matlab, the maximum allowable corrosion depth of this pipe section is calculated iteratively. The performance degradation index at the maximum allowable corrosion depth is used as the failure threshold ω for this pipe section. The expression for the remaining life is as follows:
[0138] T = inf{t: X(t) > ω, t ≥ 0}
[0139] In the formula, ω is the failure threshold, which is determined according to the maximum allowable corrosion depth of the pipe section.
[0140] S55. Corrosion risk classification and early warning for pipe sections:
[0141] The performance degradation index at the maximum allowable corrosion depth is taken as the starting point of the failure stage, and the performance degradation index corresponding to 20% of the maximum allowable corrosion depth is taken as the end point of the normal operation stage and the starting point of the degradation stage. The corrosion risk of the pipe section in the normal operation stage is 1, and maintenance measures can be omitted depending on the specific situation. The corrosion risk of the pipe section in the degradation stage is 2, and certain maintenance measures are required to slow down the degradation rate of the pipe section. The corrosion risk of the pipe section in the failure stage is 3, and necessary maintenance measures must be taken to ensure the normal operation of the pipe section.
[0142] S56. Based on the SHAP algorithm, obtain the average absolute SHAP value of each feature used as input during prediction in the internal corrosion rate prediction model based on data-physical fusion and physical guidance neural network constructed in step S2 and the external corrosion rate prediction model based on particle swarm optimization algorithm and correlation vector machine constructed in step S3.
[0143] The SHAP algorithm is applied to the internal corrosion rate prediction model and the external corrosion rate prediction model established in steps S2 and S3, respectively. During prediction, the average marginal contribution of each input feature in all feature sequences, i.e., the average absolute SHAP value, is calculated to characterize the importance of each corrosion influencing factor feature and explain the mechanism of action of each corrosion influencing factor feature in each sample on the prediction results. This guides the detection, maintenance and upkeep of multiphase flow underground pipelines, making the maintenance and upkeep strategies more scientific and rational.
[0144] S6. Based on steps S1 to S5, establish a corrosion risk early warning system for the entire service life of underground pipelines based on digital twins.
[0145] S61. Establish a pipeline status parameter sensing and acquisition module.
[0146] S611. Based on IoT technology and cloud computing, and with the help of data analysis and visualization tools, a digital detection system for external corrosion data of multiphase flow underground pipelines is constructed to monitor, analyze and generate reports on pipeline external corrosion detection data, thereby realizing the digitization and online processing of detection data and the automation of data processing.
[0147] S612. Establish an API interface between the digital detection system and the monitoring and control system to achieve data resource sharing between the two, and establish a pipeline status parameter sensing and acquisition module.
[0148] The perception and acquisition of pipeline condition parameters mainly consists of two parts: first, digitizing the internal operating parameters of the pipeline monitored by the monitoring and control system, the external environmental parameters of the pipeline detected by various detection devices, and the external corrosion rate data; second, linking the monitoring and control system with various detection devices. Therefore, the main steps in establishing a pipeline condition parameter perception and acquisition module are as follows: ① Based on IoT technology and cloud computing, and with the help of data analysis and visualization tools, construct a digital detection system for external corrosion data of multiphase flow underground pipelines. Monitor, analyze, and generate reports on the external corrosion detection data, realizing the digitization, online operation, and automation of data processing; ② Establish an API interface between the digital detection system and the SCADA system to achieve data resource sharing between the two, thereby establishing a pipeline condition parameter perception and acquisition module that includes both internal pipeline operating monitoring data and external corrosion detection data.
[0149] S62. Deploy the internal corrosion rate prediction model based on data-physical fusion and physical-guided neural network constructed in step S2 and the external corrosion rate prediction model based on particle swarm optimization algorithm and related vector machine constructed in step S3 to the cloud. Combined with message queue, transmit the monitoring and detection data of pipeline state parameter perception acquisition module to the model interface, and set up an automated data preprocessing process to build a corrosion rate inference prediction module.
[0150] This step enables the predictive model to receive perceived data and perform inference predictions in real time.
[0151] S63. After the prediction results are output in the cloud, two post-processing modules are added. One post-processing module performs spline interpolation on the external corrosion rate of the low-frequency output and stores the prediction results of the internal corrosion rate and external corrosion rate with the same frequency in the cloud database. The other post-processing module uses the SHAP algorithm to calculate the average absolute SHAP value of each input feature and stores it in the cloud database accordingly.
[0152] S64. Establish a historical cumulative corrosion depth calculation module, and use the PyMySQL database connection library to configure the database connection parameters, establish a connection with the cloud database, and perform calculation processing.
[0153] S65. Construct a module for calculating the maximum corrosion depth of the pipe section and integrate it into the corrosion risk classification and early warning module. Call the historical cumulative corrosion depth calculation performance degradation index and calculate the corrosion risk level and the remaining service life of the current pipe section according to the risk warning principle and degradation model in step S5.
[0154] S66. Use the WebSocket protocol to establish a two-way communication channel between the server, cloud data, and the front end, and push the predicted internal and external corrosion rates, corrosion depth values, average absolute SHAP values of each input feature, remaining service life of the pipe section, and corrosion risk level of the pipe section to the front end at different times for different pipe sections.
[0155] Through the above six steps, a digital twin-based urban lifeline pipeline corrosion risk early warning system is constructed to achieve a high degree of automation, digitization, and online operation from data acquisition to corrosion risk classification for different pipe sections, thereby guiding the detection, repair, and maintenance of multiphase flow underground pipelines under corrosion risk.
[0156] In addition to the above embodiments, the present invention may have other implementation methods. All technical solutions formed by equivalent substitution or equivalent transformation fall within the protection scope claimed by the present invention.
Claims
1. A method for early warning of corrosion risks in urban lifeline pipelines based on digital twins, characterized by: It includes the following steps: S1. Based on the monitoring and control system and detection equipment, obtain the internal operating parameters of the pipeline, the external environmental parameters of the pipeline, and the external corrosion rate data; S11. Monitor the internal operating parameters of the pipeline using pressure sensors, temperature sensors, flow meters, and chromatographs. These internal operating parameters include pressure distribution data along the pipeline {P′1, P′2, ..., P′}. n Temperature distribution data {T′1,T′2,…,T′} n }, Medium flow rate data Q, Fluid medium components {S1,S2,…,S n The internal operating parameters of the pipeline are collected by a programmable logic controller (PLC) and the output signals are converted into digital data. The data is then processed by a local control station and transmitted to the system server for storage. Finally, a human-machine interface (HMI) is used to link to the system server and SQL Server database for management. S12. Based on various testing equipment, obtain the external environmental parameters and external corrosion rate data of the pipeline. The external environmental parameters of the pipeline include the density of anti-corrosion layer damage points X1, soil pH value X2, soil moisture content X3, redox potential X4, soil resistivity X5, spontaneous potential X6, stray current X7, cathodic protection rate X8, and soil salinity X9. S121. According to the Pearson test method, the density of the damaged points of the anti-corrosion layer X1 is obtained; S122. Add deionized water to the dried and sieved soil sample and let it stand to settle. Use a pH meter to measure the pH value of the supernatant to obtain the soil pH value X2. S123. According to the drying method, the soil moisture content X3 is obtained; S124. According to the depolarization method, the redox potential X4 is obtained; S125. According to the equidistant four-point method, the soil resistivity X5 is obtained; S126. Based on the surface reference method, the natural potential X6 is obtained; S1 27. Based on the positive offset method of pipe-to-ground potential, measure the positive offset of pipe-to-ground potential relative to natural potential to obtain stray current X7; S128. Obtain the protection potential distribution diagram of the entire pipeline according to the close-interval potential detection method, and then calculate the cathodic protection rate to obtain the cathodic protection rate X8. S129. The total amount of soluble salts in the soil was determined by the dry residue weighing method, and the soil salinity X9 was obtained. S1210. According to the ultrasonic testing method, the signal reflected back from the outer wall of the pipe is received, and the corrosion depth of the outer wall of the pipe is obtained through data processing, thereby obtaining the external corrosion rate data X of the pipe section. S2. Based on the internal operating parameters of the pipeline obtained from the monitoring and control system, construct an internal corrosion rate prediction model based on data-physical fusion and physical-guided neural network. S21. Based on the internal operating parameters of the pipeline obtained by the monitoring and control system, establish a fluid dynamics simulation model that integrates data and physical parameters to obtain the partial pressure of H2S M1, partial pressure of CO2 M2, temperature M3, pH value M4, and liquid flow velocity M5. S211. Based on the fluid medium composition information, pipe section inlet and outlet temperature, pressure and flow information and pipe parameter information monitored by the monitoring and control system, construct a physical space based on the monitoring and control system and the scale test, establish a pipe section scale test, and use the laser Doppler velocity meter (LDV) and electrochemical workstation to obtain the wall shear stress τ and the corrosion rate inside the pipe, respectively. S212. Based on the fluid characteristics, temperature, pressure and flow rate at the inlet and outlet of the pipe section monitored by the monitoring and control system, and combined with the pipeline parameter information, the wall shear stress is preset as the pipe wall boundary condition. A numerical space based on the multiphase flow simulation software OLGA is constructed to establish a numerical simulation model of the pipe section. S213. Based on the pressure distribution data along the pipeline in physical space obtained in step S11 {P′1,P′2,…,P′ n Temperature distribution data {T′1,T′2,…,T′} n } and the wall shear stress τ obtained in step S211, establish the interaction between physical space and numerical space, and correct the preset maximum number of iterations N and wall shear stress τ in numerical space; S214. The genetic algorithm (GA) is used to optimize the preset parameters in the numerical space, with the target fitness function f. k The formula is as follows: f k =ω1RMSE 1k +ω2RMSE 2k In the formula: n is the total number of monitoring points in the monitoring and control system; P ik P′ represents the pressure value in the numerical space at the i-th measuring point during the k-th iteration; i T represents the pressure value monitored at the i-th measuring point in the physical space monitoring and control system. ik Let be the temperature value in the numerical space at the i-th measuring point during the k-th iteration; T′ i RMSE is the temperature value monitored at the i-th measuring point in the physical space monitoring and control system. 1k The root mean square error (RMSE) is the difference between the pressure values in the numerical space and the physical space at the k-th iteration. 2k f is the root mean square error between the temperature values in the numerical space and the physical space at the k-th iteration; k ω1 represents the objective function value at the k-th iteration; ω1 and ω2 are the weights. S215. Using the optimal parameters corrected in step S214, perform fluid dynamics simulation of the multiphase flow pipe section to obtain data on factors affecting internal corrosion, including H2S partial pressure M1, CO2 partial pressure M2, temperature M3, pH value M4, and liquid flow rate M5. S22. Construct a pipeline corrosion rate prediction model based on a Physically Guided Neural Network (PGNN), and preprocess the data obtained in step S21, including H2S partial pressure M1, CO2 partial pressure M2, temperature M3, pH value M4, liquid flow rate M5, corrosion inhibitor injection amount M6 obtained from the investigation, and pipeline corrosion rate M, dividing them into training and testing sets. The physical loss term is then added to the loss function, as shown in the following formula: In the formula: ΔPHY is the physical difference term; n is the total number of samples; M i M is the predicted internal corrosion rate of the model on the i-th sample; i ′ represents the predicted internal corrosion rate of the model on the i-th sample after feature modification; Let be the actual internal corrosion rate on the i-th sample; λ is the weight of the physical loss term; The pipeline internal corrosion rate prediction model based on the Physically Guided Neural Network (PGNN) was trained and tested to obtain an internal corrosion rate prediction model based on data-physical fusion and the Physically Guided Neural Network. S3. Based on the pipeline external environment parameters and external corrosion rate data obtained in step S1, construct an external corrosion rate prediction model based on particle swarm optimization algorithm and related vector machine. S4. Complete and time-register the external corrosion rate data of the pipeline using spline interpolation; S41. Using Python and its built-in SciPy library, and combining the principle of spline interpolation, write a program that can solve the spline interpolation function and output the corresponding interpolation value, and automatically update the spline interpolation function according to new data points. S42. Using the external environmental parameters {X1, X2, ..., X9} of the pipeline obtained in step S12 as input data, and employing the external corrosion rate prediction model based on particle swarm optimization algorithm and correlation vector machine established in step S3, several external corrosion rate data points for this pipe section are obtained, forming the external corrosion rate data set {t1: v1, t2: v2, ..., t...} for this pipe section. n :v n }; S43. Solve the program using spline interpolation. Take the external corrosion rate data set from step S42 as the program input and the monitoring sampling frequency of the monitoring and control system of the same pipe section in step S1 as the standard. Use spline interpolation to complete the time registration of the internal corrosion rate V1 and the external corrosion rate V2 of the pipe section, and form a database of the synergistic effect of internal and external corrosion rates. S5. Based on the Wiener process and elastoplastic fracture mechanics theory, a pipeline corrosion risk classification and early warning method is constructed. S51. According to the formula X(t)=X(0)+X(t-1)e -λt +σB(t), formula Y(t)=X(t)+ε=X(0)+X(t-1)e -λt +σB(t)+ε and the formula A nonlinear Wiener corrosion degradation model for multiphase flow underground pipelines was constructed. In the formula: X(t) is the actual performance degradation index; Y(t) is the predicted performance degradation index; λ is the drift coefficient, characterizing the degradation rate of the pipeline; σ is the diffusion coefficient; B(t) represents the standard Brownian motion; e -λt This indicates the nonlinear characteristics of the system; ε is the error term; d t Let d be the corrosion depth of the pipeline at time t; d0 is the initial wall thickness of the pipeline. S52. Based on the database of the combined effect of internal and external corrosion rates obtained in step S43, the corrosion depth d of the pipe section is determined. t Calculations were performed to obtain several corrosion depths d. t The formula is as follows: In the formula: V1 is the internal corrosion rate of a certain pipe section; V2 is the external corrosion rate of a certain pipe section; S53. Update the parameters using the Extended Kalman Filter (EKF) algorithm, using the several corrosion depths d obtained in step S52. t As input, the drift coefficient η and diffusion coefficient σ in the nonlinear Wiener degradation model are iteratively updated to construct the pipe section corrosion degradation model; S54. Predict the remaining life of the pipe section according to the formula T=inf{t:X(t)>ω,t≥0}, where ω is the failure threshold. S55. Corrosion risk classification and early warning for pipe sections: The performance degradation index at the maximum allowable corrosion depth is taken as the starting point of the failure stage, and the performance degradation index corresponding to 20% of the maximum allowable corrosion depth is taken as the end point of the normal operation stage and the starting point of the degradation stage. The corrosion risk of the pipe section in the normal operation stage is 1, and maintenance measures can be omitted depending on the specific situation. The corrosion risk of the pipe section in the degradation stage is 2, and certain maintenance measures are required to slow down the degradation rate of the pipe section. The corrosion risk of the pipe section in the failure stage is 3, and necessary maintenance measures must be taken to ensure the normal operation of the pipe section. S56. Based on the SHAP algorithm, obtain the average absolute SHAP value of each feature used as input during prediction in the internal corrosion rate prediction model based on data-physical fusion and physical guidance neural network constructed in step S2 and the external corrosion rate prediction model based on particle swarm optimization algorithm and related vector machine constructed in step S3. S6. Based on steps S1 to S5, establish a corrosion risk early warning system for the entire service life of underground pipelines based on digital twins. S61. Establish a pipeline status parameter sensing and acquisition module; S611. Based on IoT technology and cloud computing, and with the help of data analysis and visualization tools, a digital detection system for external corrosion data of multiphase flow underground pipelines is constructed to monitor, analyze and generate reports on pipeline external corrosion detection data, thereby realizing the digitization and online processing of detection data and the automation of data processing. S612. Establish an API interface between the digital detection system and the monitoring and control system to realize data resource sharing between the two and establish a pipeline status parameter sensing and acquisition module. S62. Deploy the internal corrosion rate prediction model based on data-physical fusion and physical-guided neural network constructed in step S2 and the external corrosion rate prediction model based on particle swarm optimization algorithm and related vector machine constructed in step S3 to the cloud. Combined with message queue, transmit the monitoring and detection data of pipeline state parameter perception and acquisition module to the model interface, and set up an automated data preprocessing process to build a corrosion rate inference and prediction module. S63. After the prediction results are output in the cloud, two post-processing modules are added. One post-processing module performs spline interpolation on the external corrosion rate of the low-frequency output and stores the prediction results of the internal corrosion rate and external corrosion rate with the same frequency in the cloud database. The other post-processing module uses the SHAP algorithm to calculate the average absolute SHAP value of each input feature and stores it in the cloud database accordingly. S64. Establish a historical cumulative corrosion depth calculation module, and use the PyMySQL database connection library to configure the database connection parameters, establish a connection with the cloud database and perform calculations. S65. Construct a module for calculating the maximum corrosion depth of the pipe section and integrate it into the corrosion risk classification and early warning module. Call the historical cumulative corrosion depth calculation performance degradation index and calculate the corrosion risk level and the remaining service life of the current pipe section according to the risk warning principle and degradation model in step S5. S66. Use the WebSocket protocol to establish a two-way communication channel between the server, cloud data, and the front end, and push the predicted internal and external corrosion rates, corrosion depth values, average absolute SHAP values of each input feature, remaining service life of the pipe section, and corrosion risk level of the pipe section to the front end at different times for different pipe sections.
2. The method for early warning of corrosion risk of urban lifeline pipelines based on digital twins according to claim 1, characterized in that: The specific steps of step S3 are as follows: S31. Randomly select several sets of external environmental parameters {X1,X2,…,X9} and corresponding external corrosion rate data X obtained in step S12, and perform data preprocessing as a dataset, dividing it into a training set and a test set. S32. Select the Gaussian radial basis function (RBF) as the kernel function, construct the RVM regression model, and set the initial hyperparameter α and kernel function parameter g to perform preliminary training on the RVM regression model. S33. Using the particle swarm optimization algorithm PSO, the root mean square error RMSE is selected as the fitness function to optimize the hyperparameter α and the kernel function parameter g. S34. Select the optimal hyperparameter α and kernel function parameter g to construct the RVM model, and use the training set and test set obtained in step S31 to train and test the model, thereby obtaining the external corrosion rate prediction model based on particle swarm optimization algorithm and related vector machine.
3. The method for early warning of corrosion risk of urban lifeline pipelines based on digital twins according to claim 1, characterized in that: In step S22, the ratio of the training set to the test set is 7:
3.
4. The method for early warning of corrosion risk of urban lifeline pipelines based on digital twins according to claim 1, characterized in that: In step S214, the weights ω1 and ω2 are both 0.
5.
5. The method for early warning of corrosion risk of urban lifeline pipelines based on digital twins according to claim 2, characterized in that: In step S31, the number of sets of external environmental parameters of the pipeline is 100, and the ratio of training set to test set is 7:3.
Citation Information
Patent Citations
Safety evaluation method of underground pipeline structure based on augmented reality and digital twin
CN113919106B
Vibration deformation amount measuring and calculating method of vertical high-rise structure vibration isolation system
CN106682328A
Slow feed grinding temperature prediction method based on physical guidance neural network
CN117195695A