A method and apparatus for predicting failure of a natural gas pipeline
By combining fuzzy support degree and support vector machine algorithms with finite element model, a method for predicting the failure of natural gas pipelines was constructed, which solved the problem of predicting corrosion of natural gas pipelines in purification plants and achieved accurate prediction and safe management of pipeline corrosion.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PETROCHINA CO LTD
- Filing Date
- 2024-12-05
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies cannot effectively predict corrosion in natural gas pipeline equipment in purification plants, leading to potential fire and explosion accidents without clear warning signs.
A pipeline corrosion prediction model was trained by fusing fuzzy support degree and support vector machine algorithms. A pipeline failure probability prediction method was constructed by combining the finite element model. Corrosion rate and failure probability were predicted through data acquisition, overlap analysis, normalization processing and regression fitting.
It enables accurate prediction of natural gas pipeline corrosion, improves safety management, and reduces accident risks.
Smart Images

Figure CN122154987A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of oil and gas field exploration and development, and in particular to a method and apparatus for predicting the failure of natural gas pipelines. Background Technology
[0002] Natural gas pipeline equipment in purification plants is more likely to experience corrosion, perforation, and cracking under high temperature and high pressure conditions. Once such situations occur, they could potentially lead to catastrophic accidents such as fires and explosions. Since these accidents are usually very dangerous and often occur without any obvious warning signs, corrosion prediction for related equipment becomes extremely important.
[0003] Existing technologies typically use descriptive statistical methods, such as mean and standard deviation, to assess the distribution and trends of corrosion severity based on collected data. Time series modeling, such as ARIMA models and exponential smoothing, is then used to predict future changes in pipeline corrosion rates. Machine learning and artificial intelligence are then employed, using machine learning algorithms such as random forests, support vector machines, and neural networks to train historical corrosion data, build predictive models, and identify key factors contributing to corrosion. Summary of the Invention
[0004] To address the problems in existing technologies where there is a lack of vertical well data and insufficient accuracy of seismic data in shale gas well areas, making it impossible to establish reliable structural models, this specification provides a method and apparatus for predicting natural gas pipeline failures.
[0005] This specification provides a method for predicting natural gas pipeline failure. The method includes: collecting natural gas pipeline monitoring data and natural gas pipeline inspection data; inputting the natural gas pipeline monitoring data and natural gas pipeline inspection data into a pipeline failure probability prediction model to obtain the pipeline failure probability output by the pipeline failure probability prediction model. The pipeline failure probability prediction model includes a pipeline corrosion prediction model and a pipeline model. The pipeline corrosion prediction model is obtained by training pipeline sample inspection data based on the fusion of fuzzy support and support vector machine. The pipeline model is obtained by training a finite element model based on random variables.
[0006] According to one aspect of the embodiments of this specification, a pipeline corrosion prediction model is constructed in the following manner: natural gas pipeline sample monitoring data and natural gas pipeline sample inspection data are collected and overlap analysis is performed to obtain natural gas pipeline sample inspection data; the comprehensive fuzzy support of the natural gas pipeline sample inspection data is calculated to determine the optimal fusion data source corresponding to all time points within a preset time period; and a support vector machine is used to perform regression fitting on the optimal fusion data source to obtain the predicted corrosion result.
[0007] According to one aspect of the embodiments of this specification, regression fitting of the optimal fused data source using a support vector machine includes: performing normalization preprocessing on the optimal fused data source to obtain a preprocessed first optimal fused data source; selecting a kernel function based on the first optimal fused data source; mapping the first optimal fused data source to a high-dimensional feature space through the kernel function, performing linear regression in the high-dimensional feature space, and constructing a regression model.
[0008] According to one aspect of the embodiments of this specification, a pipeline model is constructed by: determining random variables that affect the failure probability of the natural gas pipeline structure based on the predicted corrosion results; and inputting the pipeline steel parameters and the random variables into a finite element model to construct the pipeline model.
[0009] According to one aspect of an embodiment of this specification, constructing a pipeline model further includes: dividing the outer surface of the pipeline model into multiple grids; and refining the grid of the corrosion area based on the depth and location of corrosion defects in the predicted corrosion results.
[0010] According to one aspect of the embodiments of this specification, determining the pipeline failure probability includes: determining the maximum stress on each grid in the pipeline model; determining whether the maximum stress exceeds the yield strength of the pipeline material; if so, determining that the grid has failed; searching for neighboring grids near the grid and determining whether the neighboring grids have failed; and determining the pipeline failure probability based on the number of failed grids and the total number of grids on the outer surface of the pipeline model.
[0011] According to one aspect of the embodiments of this specification, a random variable is determined by: measuring the pipe thickness to obtain pipe thickness detection data; determining whether the pipe thickness detection data collected at the previous moment is greater than the pipe thickness detection data collected at the next moment; if so, using the pipe thickness monitoring data collected at the previous moment as the final thickness data; if not, using the pipe thickness monitoring data collected at the most recent moment as the final thickness data, wherein the final thickness data belongs to one type of random variable.
[0012] This specification provides a natural gas pipeline failure prediction device, comprising: a data acquisition unit for acquiring natural gas pipeline monitoring data and natural gas pipeline inspection data; and a prediction unit for inputting the natural gas pipeline monitoring data and natural gas pipeline inspection data into a pipeline failure probability prediction model to obtain the pipeline failure probability output by the pipeline failure probability prediction model. The pipeline failure probability prediction model includes a pipeline corrosion prediction model and a pipeline model. The pipeline corrosion prediction model is obtained by training pipeline sample monitoring data based on a fusion of fuzzy support and support vector machine, and the pipeline model is obtained by training a finite element model based on random variables.
[0013] This specification also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the natural gas pipeline failure prediction method.
[0014] This specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the natural gas pipeline failure prediction method.
[0015] This manual uses fuzzy support degree and support vector machine algorithms to map pipeline monitoring data, detection data and fusion output results, enabling prediction of future corrosion rates. It also establishes a finite element model to calculate the burst failure pressure of defective natural gas pipelines under various conditions. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 The diagram shown is a flowchart of a natural gas pipeline failure prediction method according to an embodiment of this specification.
[0018] Figure 2 The diagram shown is a flowchart of a method for constructing a pipeline corrosion prediction model according to an embodiment of this specification.
[0019] Figure 3 The diagram shown is a flowchart of a method for regression fitting of the optimal fusion data source using a support vector machine, according to an embodiment of this specification.
[0020] Figure 4 The diagram shown is a flowchart of a method for constructing a pipeline model according to an embodiment of this specification;
[0021] Figure 5 The diagram shown is a flowchart of another method for constructing a pipeline model according to an embodiment of this specification.
[0022] Figure 6 The diagram shown is a flowchart of a method for determining the probability of pipeline failure according to an embodiment of this specification.
[0023] Figure 7 The diagram shown is a flowchart of a method for determining random variables according to an embodiment of this specification.
[0024] Figure 8The diagram shown is a structural schematic of a natural gas pipeline failure prediction device according to an embodiment of this specification.
[0025] Figures 9a to 9d The diagram shown is a schematic representation of a pipe model and mesh generation according to an embodiment of this specification.
[0026] Figure 10 The diagram shown is a structural schematic of a computer device according to an embodiment of this specification.
[0027] Explanation of symbols in the attached drawings:
[0028] 801. Data Acquisition Unit;
[0029] 802. Prediction Unit;
[0030] 1002. Computer equipment;
[0031] 1004, Processor;
[0032] 1006. Memory;
[0033] 1008. Drive mechanism;
[0034] 1010. Input / Output Module;
[0035] 1012. Input devices;
[0036] 1014. Output devices;
[0037] 1016. Presentation device;
[0038] 1018. Graphical User Interface;
[0039] 1020. Network interface;
[0040] 1022. Communication link;
[0041] 1024. Communication bus. Detailed Implementation
[0042] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0043] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0044] This specification provides the operational steps of the methods described in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or device products, the methods shown in the embodiments or drawings can be executed sequentially or in parallel.
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. The steps described in this application are not limited to the steps described above. Some steps can be further divided into more steps, and some steps can be combined into fewer steps.
[0046] It should be noted that the natural gas pipeline failure prediction method and device described in this specification can be used in the field of safety management technology, as well as in the field of oil and gas field exploration and development. This specification does not limit the application field of the natural gas pipeline failure prediction method and device.
[0047] Figure 1 The diagram shown is a flowchart of a natural gas pipeline failure prediction method according to an embodiment of this specification, which specifically includes the following steps:
[0048] Step 101: Collect natural gas pipeline monitoring data and natural gas pipeline inspection data.
[0049] In this manual, natural gas pipeline monitoring data and natural gas pipeline inspection data are crucial for ensuring the safe operation of natural gas pipelines and preventing accidents. The natural gas pipeline monitoring data comes from real-time monitoring of pipeline operating status, including but not limited to: flow rate data, pressure data, temperature data, leak monitoring data, and coating inspection data.
[0050] Specifically, by measuring the flow rate of natural gas in the pipeline using a gas flow meter, flow data can be obtained, ensuring that the pipeline system's operating efficiency remains within safe limits. By measuring the pressure within the pipeline using a pressure sensor, pressure data can be obtained, further assessing the pipeline's capacity and sealing performance, and identifying any abnormal overpressure or underpressure conditions. Monitoring temperature changes in the pipeline and its surrounding environment provides temperature data, allowing for an assessment of the impact of temperature variations on pipeline operation. Using gas detectors, acoustic detectors, and other equipment, leaks can be detected, determining leak monitoring data, the size, and location of any leaks. Finally, by using coating thickness gauges or peel tests, the thickness, adhesion, and integrity of the pipeline's external coating are monitored, obtaining coating inspection data to ensure the coating effectively protects the pipeline from external corrosion.
[0051] In the embodiments of this specification, the natural gas pipeline inspection data typically comes from regular pipeline inspections and maintenance, including but not limited to: wall thickness data, weld quality data, corrosion detection data, geometric shape data, stress and strain data, and material analysis data. Specifically, measuring the pipeline wall thickness using equipment such as ultrasonic testing instruments or X-ray inspection instruments provides wall thickness data for natural gas pipelines, used to determine if wall thinning due to corrosion, wear, or other factors has affected the pipeline's pressure-bearing capacity. Quality inspection of pipeline welds provides weld quality data, assessing weld uniformity, strength, and the presence of internal defects such as porosity and slag inclusions. Electrochemical or physical methods are used to detect corrosion and rust on the pipeline surface, obtaining corrosion detection data to determine if maintenance or replacement is necessary. Measurements of the pipeline's roundness, diameter, and curvature provide geometric shape data, ensuring the pipeline shape conforms to design specifications and avoiding stress concentration and pipeline deformation caused by shape deviations. By monitoring the stress and strain of pipelines under load using sensors and strain gauges, stress and strain data of natural gas pipelines can be obtained to assess the pipeline's load-bearing capacity and safety status. Material analysis data of the natural gas is obtained through pipeline material testing to determine whether it meets safety standards and whether there are problems such as aging or deterioration.
[0052] Step 102: Input the natural gas pipeline monitoring data and the natural gas pipeline detection data into the pipeline failure probability prediction model to obtain the pipeline failure probability output by the pipeline failure probability prediction model.
[0053] The pipeline failure probability prediction model includes a pipeline corrosion prediction model and a pipeline model. The pipeline corrosion prediction model is obtained by training pipeline sample inspection data based on fuzzy support degree and support vector machine fusion, and the pipeline model is obtained by training a finite element model based on random variables.
[0054] This step, before inputting the natural gas pipeline monitoring data and natural gas pipeline inspection data into the pipeline failure probability prediction model, also includes: preprocessing the natural gas pipeline monitoring data and natural gas pipeline inspection data, performing overlay analysis, etc., to obtain natural gas pipeline monitoring and inspection data. Then, the pipeline failure probability prediction model performs predictions based on the input natural gas pipeline monitoring and inspection data. The failure prediction of natural gas pipelines in this specification includes: predicting the corrosion status of natural gas pipelines and predicting the pressure-bearing capacity of equipment.
[0055] The pipeline corrosion prediction model is implemented in two levels: primary data fusion and secondary data fusion. In primary data fusion, the Fuzzy Support Degree (FSD) algorithm is used to calculate the comprehensive fuzzy support of the natural gas pipeline monitoring data, achieving the first level of data fusion. The optimal data source for fusion is selected based on the support level of the monitoring data sources, serving as the data foundation for secondary fusion. Secondary data fusion uses a Support Vector Machine (SVM) as the regression prediction and fusion fusion tool. In secondary fusion, the SVM method is used to perform regression fitting on the optimal data source to predict future pipeline corrosion data. The two-level data fusion establishes a mapping between the natural gas pipeline monitoring data and the fusion output, thereby enabling the fusion of different sets of natural gas pipeline monitoring data collected at different times, achieving data filtering for the same time period and data prediction for different time periods.
[0056] Figure 2 The diagram shown is a flowchart of a method for constructing a pipeline corrosion prediction model according to an embodiment of this specification, which specifically includes the following steps:
[0057] Step 201: Collect natural gas pipeline sample monitoring data and natural gas pipeline sample inspection data, and perform overlay analysis to obtain natural gas pipeline sample monitoring and inspection data.
[0058] In this step, to train and build the pipeline corrosion prediction model, sample monitoring data and sample detection data need to be collected from the natural gas pipeline. Data is collected at preset sampling time intervals. The frequency of collecting natural gas pipeline sample monitoring data is relatively higher than the frequency of collecting natural gas pipeline sample detection data; therefore, within the same time period, the number of natural gas sample monitoring data collected is greater than the number of natural gas pipeline sample detection data collected.
[0059] After data collection, further overlap analysis is performed on the two types of data. First, the natural gas sample monitoring data and natural gas pipeline sample inspection data undergo data cleaning, format standardization, and missing value handling to ensure that all datasets are structurally comparable. For example, if comparing two user datasets, it may be necessary to standardize user identifiers to ensure they have the same attributes. Next, visualization tools are used to perform overlap analysis on the two types of data, calculating the correlation between the two datasets or the ratio of their intersection to union to further determine the degree of overlap. This achieves overlap analysis of the natural gas pipeline sample monitoring data and inspection data, and the data after overlap analysis is referred to as natural gas pipeline sample monitoring data. In this specification, the collection methods for natural gas pipeline sample monitoring data and natural gas pipeline sample inspection data are the same as in step 101, and will not be repeated here.
[0060] Step 202: Calculate the comprehensive fuzzy support of the natural gas pipeline sample monitoring data and determine the best fusion data source for all time points within the preset time period.
[0061] In this step, the natural gas pipeline sample monitoring data collected at each time point within the preset time period are first normalized. The confidence distance of each natural gas pipeline sample monitoring data is calculated, and the relationship matrix is further calculated. The maximum eigenvalue of the relationship matrix is obtained using the power method. Then, the fuzzy support of each natural gas pipeline sample monitoring data is calculated, resulting in the fuzzy support of the natural gas pipeline sample monitoring data collected at all time points within the preset time period. From the fuzzy support of the natural gas pipeline sample monitoring data collected at all time points, the best fused data is selected, and the remaining inferior data are eliminated.
[0062] In this step, we assume that we obtain n natural gas pipeline sample inspection data. Let xi be the i-th natural gas pipeline sample inspection data, and σi be the corresponding variance. We then use the following formula to calculate the confidence distance between the natural gas pipeline sample inspection data:
[0063] Where erf() represents the error function. Among them, the confidence distance represents the degree of mutual support between the monitoring data of each sample of natural gas pipeline.
[0064] After calculating the confidence distances between the monitoring data of each sample of the natural gas pipeline, the maximum and minimum confidence distances are selected, and then the fuzzy support membership function is defined as follows:
[0065] r ij =r ji =d ij ×(d max -d min ) -1
[0066] In the formula, d max =max{d ij}, d min =min{d ij}, r ij ∈[0,1], where d max d represents the maximum confidence distance. min rij represents the minimum confidence distance. The larger the rij, the more similar the value is to the actual state, and the less ambiguous it is.
[0067] When d ij =max(d ij When ), then d is considered to be i With d j They do not support each other at all, at this time r ij =0;
[0068] At the same time, d ii =0, r ii =1.
[0069] Based on the fuzzy support rij of each sample inspection data of natural gas pipelines, construct the relation matrix R of the sample inspection data of natural gas pipelines:
[0070]
[0071] To represent the importance of each sample monitoring data xi from the natural gas pipeline in the primary data fusion, a comprehensive fuzzy support degree ui is introduced, represented by ri1, ri2, ..., rin. ui is solved based on the relation matrix R. Based on the multi-source probabilistic information fusion theory, a set of non-negative numbers is obtained. That is, v1, v2, ..., vn, such that
[0072] u i =v1r i1 +v2r i2 +…+v n r in ,and Where ui represents the comprehensive fuzzy support and rij represents the fuzzy support. The above equation can be rewritten in matrix form as U = RV, where U = [u1, u2, ..., u...]. n ]T V = [v1, v2, ..., v n ] T .
[0073] R is a non-negative symmetric matrix. According to matrix properties, there exists a maximum eigenvalue λ (λ > 0) of matrix R by modulus and its corresponding eigenvector, and all eigenvectors are positive. This results in λV = RV, thus λV can be used as a measure of the overall fuzzy support of the monitoring data.
[0074] Considering the constraints of vi The overall fuzzy support of the monitoring data for the i-th natural gas pipeline sample is:
[0075] The power method is used to find the modulo-maximal eigenvalue and its corresponding eigenvector of matrix R.
[0076] The comprehensive fuzzy support of several natural gas pipeline sample inspections is calculated according to the above process. Then, the comprehensive fuzzy support of all natural gas pipeline sample inspections is compared, and the best fusion data source is selected from all time data points in the preset time period.
[0077] In this step, based on fuzzy set theory, to reduce the influence of subjective factors on the results, a membership function of fuzzy support is defined to replace the threshold setting. Based on the theory of probabilistic source combination and the theory of nonnegative matrix eigenvectors, the maximum eigenvalue and its eigenvector in the relation matrix are calculated to determine the comprehensive fuzzy support of each data, thereby obtaining the optimal fusion source combination.
[0078] Step 203: Use a support vector machine to perform regression fitting on the optimal fused data source to obtain the predicted corrosion result.
[0079] In this step, the optimal fusion data source is input into the SVM algorithm to achieve two-stage fusion, obtaining a regression-fitted corrosion rate curve to predict future corrosion rates. The predicted corrosion results include: pipeline corrosion rate and corrosion defect thickness or depth. Based on the predicted corrosion rate, the future degree of pipeline corrosion can be determined, and the corresponding pipeline corrosion defect depth can be calculated. This step, based on a regression model built using support vector machines, achieves the fusion of monitoring data from different groups of natural gas pipeline samples collected at different time periods.
[0080] Figure 3 The diagram shown is a flowchart of a method for regression fitting of the optimal fused data source using a support vector machine, according to an embodiment of this specification. The method includes the following steps:
[0081] Step 301: Perform normalization preprocessing on the optimal fusion data source to obtain the preprocessed first optimal fusion data source. In this step, normalization and standardization preprocessing operations are performed on the optimal fusion data source to improve the convergence speed and performance of the model.
[0082] Step 302: Select a kernel function based on the first optimal fusion data source.
[0083] SVM is a supervised learning algorithm whose core idea is to find an optimal classification surface (or regression function) that minimizes the error of all training samples from the optimal classification surface.
[0084] In this specification, different inner product kernel functions are used to construct different support vector machines, thus enabling the solution of different problems using different algorithms. Commonly used kernel functions include the polynomial kernel function, radial basis function, sigmoid kernel function, and Cauchy kernel function. Research shows that the RBF kernel function has relatively small prediction bias and is computationally stable; therefore, the RBF kernel function is selected for this specification.
[0085] Step 303: Using the kernel function, the first optimal fusion data source is mapped to a high-dimensional feature space, and linear regression is performed in the high-dimensional feature space to construct a regression model.
[0086] In this step, the support vector machine uses nonlinear transformation to map the first optimal fusion data source to a high-dimensional feature space, and constructs a linear classification function or regression function in the high-dimensional feature space to ensure that the model has good generalization ability.
[0087] Furthermore, model performance is optimized by adjusting the parameters of the kernel function and other SVM parameters (such as the C parameter, used to control model complexity and generalization ability). By selecting different kernel functions and adjusting parameters, various complex datasets and regression tasks can be flexibly handled. In this step, an SVM algorithm with a kernel function is used to train the training data (the first optimal fusion data source). The output data is continuous numerical, specifically the corrosion prediction results of natural gas pipelines. Therefore, regression analysis can be used to establish a mapping relationship and construct a regression model. In this specification, the constructed regression model is applied to a practical problem to perform regression prediction (such as...). Figure 1 (See steps shown). In this step, the depth of the corresponding pipeline corrosion defects can be further calculated based on the corrosion prediction results.
[0088] This specification employs the Fuzzy Support Degree (FSD) algorithm to mine potential information from natural gas pipeline monitoring data and calculates the comprehensive fuzzy support degree, achieving the first level of data fusion. The optimal data source for fusion is selected based on the support level of the monitoring data sources, serving as the data foundation for the second level of fusion. The second level of data fusion uses a Support Vector Machine (SVM) as the regression prediction and fusion fusion engine. In the second level of fusion, the SVM method is used to perform regression fitting on the optimal data source to predict future corrosion data. The two-level data fusion establishes a mapping between the natural gas pipeline monitoring data and the fusion output, thereby enabling the fusion of different sets of natural gas pipeline monitoring data collected at different times, achieving data filtering for the same time period and data prediction for different time periods.
[0089] Figure 4 The diagram shown is a flowchart of a method for constructing a pipeline model according to an embodiment of this specification, which specifically includes the following steps:
[0090] Step 401: Based on the predicted corrosion results, determine the random variables affecting the failure probability of the natural gas pipeline structure. In this specification, for pipelines, variables with low variability, such as steel parameters, have a negligible impact on the failure probability of the pipeline structure. Treating all parameters in the same way would significantly reduce the efficiency of pipeline modeling and simulation, and may not necessarily be effective in improving the accuracy of the results.
[0091] Therefore, in this step, sensitivity analysis is used to determine the degree of influence of random variables on the probability of structural failure of natural gas pipelines. Sensitivity analysis is an analytical method used to evaluate the influence of different input variables (such as pipeline material, length, fluid properties, etc.) on output results (such as pressure, temperature, flow rate, etc.) in a model or system, and to determine which parameters affect the stability and safety of the pipeline system. Sensitivity analysis of pipelines typically includes the following steps:
[0092] (1) Determine the parameters to be analyzed;
[0093] (2) Based on the actual situation of the pipeline system, a corresponding mathematical model is established. This manual uses a nonlinear finite element model to calculate the probability of pipeline failure caused by the uncertainty of various random variables.
[0094] (3) Based on the characteristics of the parameters to be analyzed and the nonlinear finite element model, select an appropriate sensitivity analysis method, such as local sensitivity analysis or global sensitivity analysis, and obtain the corresponding results. Further, based on the analysis results, formulate corresponding measures and plans to optimize the design and operation of the pipeline system and reduce safety risks.
[0095] Based on the above sensitivity analysis method, this specification ignores minor variations in the same type of steel used in the pipeline, mainly considering the randomness of parameters that have a significant impact on the structure of the natural gas pipeline. Furthermore, since the ratio of the natural gas pipeline length to its wall thickness is >500, its influence is ignored. Figure 3 Based on the corrosion prediction results obtained from the forecast, the depth of corrosion defects corresponding to the corrosion area of the pipeline is determined. Therefore, in this specification, the pipeline inner diameter, original wall thickness, depth of corrosion defects, and pipeline internal pressure are determined as random variables.
[0096] Step 402: Input the pipeline steel parameters and the random variables into the finite element model to construct the pipeline model. As shown in Tables 1 and 2, Table 1 is the steel parameter table for the natural gas pipeline, and Table 2 is the random variable parameter table selected in this specification. Input the data from Tables 1 and 2 into the finite element model, and use the APDL command flow to build the pipeline model and perform mesh generation.
[0097] Table 1 Steel Parameters
[0098]
[0099] Table 2 Random Variable Parameter Table
[0100]
[0101] Figure 5 The diagram shown is a flowchart of another method for constructing a pipeline model according to an embodiment of this specification, which specifically includes the following steps:
[0102] Step 501: Divide the outer surface of the pipe model into multiple meshes. In this specification, the pipe model is created using the APDL command flow, and the outer surface of the pipe model is meshed into multiple meshes. For example, the pipe body uses a free meshing method, with the mesh size controlled at 2mm.
[0103] Step 502: Based on the predicted corrosion defect depth and corrosion location in the corrosion results, refine the mesh of the corrosion area.
[0104] like Figures 9a to 9dAs shown, the pipeline modeling considers cross-sectional offset, enabling more accurate simulation of defects. The pipeline inner diameter, original wall thickness, corrosion defect depth, and internal pressure are set as random variables, determined by the stress-intensity interference model; all random variables follow a Gaussian distribution. Local mesh refinement is applied to the corrosion region corresponding to the predicted corrosion results in the pipeline model. For example, the dimensions (length × width) of the corrosion region corresponding to the predicted corrosion results in the pipeline model are the maximum data obtained from field testing: 4mm × 4mm, with an angle at the 6 o'clock position (clockwise from 1 to 12 o'clock). The defect dimensions of other pipelines are also the maximum defect dimensions obtained from field testing, and the angles are also based on field testing data. Local mesh refinement is applied to the vicinity of the pipeline corrosion region, with a mesh size of 1mm. A swept mesh is used at the defect location, with hexahedral elements selected and a size controlled at 0.5mm, thus achieving mesh refinement of the corrosion region. This improves the accuracy and precision of the pipeline failure probability calculation.
[0105] Figure 6 The diagram shown is a flowchart of a method for determining the probability of pipeline failure according to an embodiment of this specification, which specifically includes the following steps:
[0106] Step 601: Determine the maximum stress on each grid in the pipeline model. In this step, the stress currently borne by each grid in the constructed pipeline model is determined, thereby determining the maximum stress borne by all grids in the pipeline model.
[0107] Step 602: Determine whether the maximum stress exceeds the yield strength of the pipe material.
[0108] In corrosion-induced thinning failure, the failure stress is the maximum stress experienced by the pipe on its shell. Therefore, based on the pipe's structural function, it is determined whether this maximum stress exceeds the yield strength of the pipe material.
[0109] y = σ m -σ s ; where σ m This represents the maximum stress experienced by the pipe, calculated using the finite element model, in MPa; σ s This indicates the yield strength of the pipe material, expressed in MPa.
[0110] When the maximum stress on the pipeline is determined to be greater than the material's yield strength (i.e., when y > 0), the mesh corresponding to the maximum stress is confirmed to have failed. Furthermore, when the actual pressure on the pipeline exceeds its pressure-bearing capacity, a timely warning is issued.
[0111] Step 603: If yes, determine that the mesh has failed. In this step, if the maximum stress exceeds the yield strength of the pipe material, the mesh is determined to have failed.
[0112] Step 604: Search for neighboring meshes near the stated mesh to determine if the neighboring meshes have failed. Based on the failure criteria, after calculating the mesh element with the highest stress in the overall pipeline structure using the finite element model, search for mesh elements with a reliability lower than the engineering requirements, centered on that mesh element. That is, for the mesh elements near the failed mesh determined in step 602, the structural function of the pipeline is used to determine whether the nearby mesh elements are ineffective.
[0113] Step 605: Determine the pipeline failure probability based on the number of failed meshes and the total number of meshes on the outer surface of the pipeline model. In this step, the number of all failed meshes in the pipeline model is counted, and the ratio is taken with the total number of meshes on the outer surface of the pipeline model to calculate the overall failure probability of the pipeline (equipment).
[0114] Figure 7 The diagram shown is a flowchart of a method for determining a random variable according to an embodiment of this specification, which specifically includes the following steps:
[0115] Step 701: Measure the pipe thickness to obtain the pipe depth thickness data. In this step, a handheld ultrasonic thickness gauge is used to measure the pipe thickness on-site, with an error range of 1% of the container thickness + 0.1mm.
[0116] Step 702: Determine whether the pipe thickness measurement data collected at the same location on the pipeline at the previous moment is greater than the pipe thickness measurement data collected at the next moment. Considering the human influence in the thickness measurement process in Step 701, the measured pipe thickness may differ from the actual thickness of the equipment. Thickness prediction based on such data will result in significant errors. Therefore, the thickness measurement data collected on-site is analyzed and filtered. First, the average and variance of all thickness measurement data in the thickness measurement data set collected over a period of time are calculated. Data with excessive fluctuations in the thickness measurement data set are then removed based on the average and variance.
[0117] Step 703: If so, use the pipe thickness monitoring data collected at the previous moment as the final thickness data.
[0118] In this step, the two sets of thickness detection data h(n) and h(n-1) with the closest time interval within a certain period are compared.
[0119] If the pipe thickness detection data h(n-1) collected at a previous time step is greater than the pipe thickness detection data h(n) collected at a later time step—for example, if the pipe thickness detection data h(n-1) at time n-1 is 2 mm, and the pipe thickness detection data h(n) at time n is 1.5 mm—then, based on the law that corrosion thickness gradually increases over time, the thickness detection data at a later time step cannot be less than the thickness monitoring data at a previous time step. Therefore, the pipe thickness detection data h(n) at time n is unreasonable and should be deleted. h(n-1) will be retained as the final calculation data.
[0120] Step 704: If not, use the pipe thickness monitoring data collected at the most recent moment as the final thickness data.
[0121] If the pipe thickness measurement data h(n-1) collected at a previous time step is less than the pipe thickness measurement data h(n) collected at a later time step, then h(n) is used as the final calculated data. For example, the pipe thickness measurement data h(n-1) at time n-1 is 1.5 mm, and the pipe thickness measurement data h(n) at time n is 2 mm. The change in the measurement data conforms to the law that the corrosion thickness gradually increases over time; therefore, the most recently collected data is used as the final thickness data.
[0122] Step 705: Select the most recently determined final thickness data from the final thickness data in multiple time windows as a random variable.
[0123] In this step, the most recent or last determined final thickness data is selected from the final thickness data across multiple time windows and used as a random variable for model validation. Specifically, it is compared and validated with the random variables used when constructing the pipeline model.
[0124] like Figure 8 The diagram shown is a structural schematic of a natural gas pipeline failure prediction device according to an embodiment of this specification. The basic structure of the device is illustrated in this diagram. The functional units and modules can be implemented using software, or they can be implemented using general-purpose chips or specific chips to predict natural gas pipeline failures. The device specifically includes:
[0125] Data acquisition unit 801 is used to collect natural gas pipeline monitoring data and natural gas pipeline inspection data;
[0126] The prediction unit 802 is used to input the natural gas pipeline monitoring data and the natural gas pipeline inspection data into the pipeline failure probability prediction model to obtain the pipeline failure probability output by the pipeline failure probability prediction model. The pipeline failure probability prediction model includes a pipeline corrosion prediction model and a pipeline model. The pipeline corrosion prediction model is obtained by training pipeline sample inspection data based on fuzzy support and support vector machine fusion. The pipeline model is obtained by training a finite element model based on random variables.
[0127] Figures 9a to 9d The diagram shown is a schematic representation of a pipe model and mesh generation according to an embodiment of this specification.
[0128] Figure 9a This is a schematic diagram of a pipeline model constructed based on the finite element method. Figure 9b To identify corrosion defect areas based on corrosion prediction results, the corrosion defect areas are marked in the mesh of the pipeline model. Figure 9c In this process, the pipeline model is meshed, specifically, different sizes are set for the meshes in the corrosion defect area and the normal area of the pipeline model. Figure 9d The mesh is densified at corrosion defects to increase mesh density and improve the accuracy of calculating pipeline failure probability.
[0129] like Figure 10 The diagram illustrates a computer device provided in an embodiment of this specification. The natural gas pipeline failure prediction method described in this application can be applied to the computer device. The computer device 1002 may include one or more processors 1004, such as one or more central processing units (CPUs), each of which can implement one or more hardware threads. The computer device 1002 may also include any memory 1006 for storing any kind of information such as code, settings, data, etc. Without limitation, for example, the memory 1006 may include any one or more combinations of: any type of RAM, any type of ROM, flash memory, hard disk, optical disk, etc. More generally, any memory can use any technology to store information. Further, any memory can provide volatile or non-volatile retention of information. Further, any memory can represent a fixed or removable component of the computer device 1002. In one case, when the processor 1004 executes associated instructions stored in any memory or combination of memories, the computer device 1002 can perform any operation of the associated instructions. The computer device 1002 also includes one or more drive mechanisms 1008 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0130] Computer device 1002 may also include an input / output module 1010 (I / O) for receiving various inputs (via input device 1012) and providing various outputs (via output device 1014). A specific output mechanism may include a presentation device 1016 and an associated graphical user interface (GUI) 1018. In other embodiments, the input / output module 1010 (I / O), input device 1012, and output device 1014 may be omitted, and the device may function solely as a computer device within a network. Computer device 1002 may also include one or more network interfaces 1020 for exchanging data with other devices via one or more communication links 1022. One or more communication buses 1024 couple the components described above together.
[0131] The communication link 1022 can be implemented in any way, such as via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, or any combination thereof. The communication link 1022 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
[0132] Corresponding to Figures 1 to 7 In addition to the methods described above, embodiments of this specification also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the methods described above.
[0133] This specification also provides computer-readable instructions, wherein when a processor executes the instructions, the program therein causes the processor to perform the following... Figures 1 to 7 The method shown.
[0134] It should be understood that in the various embodiments of this specification, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this specification.
[0135] It should also be understood that, in the embodiments of this specification, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this specification generally indicates that the preceding and following related objects have an "or" relationship.
[0136] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this specification can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this specification.
[0137] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0138] In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or units, or they may be electrical, mechanical, or other forms of connection.
[0139] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments described in this specification, depending on actual needs.
[0140] Furthermore, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0141] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0142] This specification uses specific embodiments to illustrate the principles and implementation methods of this specification. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this specification. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this specification. Therefore, the content of this specification should not be construed as a limitation of this specification.
Claims
1. A method for predicting the failure of a natural gas pipeline, characterized in that, The method includes: Collect natural gas pipeline monitoring data and natural gas pipeline inspection data; The natural gas pipeline monitoring data and the natural gas pipeline inspection data are input into the pipeline failure probability prediction model to obtain the pipeline failure probability output by the pipeline failure probability prediction model. The pipeline failure probability prediction model includes a pipeline corrosion prediction model and a pipeline model. The pipeline corrosion prediction model is obtained by training pipeline sample inspection data based on fuzzy support and support vector machine fusion. The pipeline model is obtained by training a finite element model based on random variables.
2. The method according to claim 1, characterized in that, A pipeline corrosion prediction model was constructed using the following method: Natural gas pipeline sample monitoring data and natural gas pipeline sample test data are collected and overlay analysis is performed to obtain natural gas pipeline sample inspection data; Calculate the comprehensive fuzzy support of natural gas pipeline sample inspection data to determine the optimal fusion data source for all time points within a preset time period; The optimal fusion data source is fitted using a support vector machine to obtain the predicted corrosion results.
3. The method according to claim 2, characterized in that, Using a support vector machine to perform regression fitting on the optimal fused data source includes: The optimal fusion data source is preprocessed by normalization to obtain the preprocessed first optimal fusion data source. Select the kernel function based on the first optimal fusion data source; The kernel function maps the first optimal fusion data source to a high-dimensional feature space, and linear regression is performed in the high-dimensional feature space to construct a regression model.
4. The method according to claim 3, characterized in that, The pipeline model is constructed in the following manner: Based on the predicted corrosion results, determine the random variables that affect the probability of failure of the natural gas pipeline structure; The pipe steel parameters and the random variables are input into the finite element model to construct the pipe model.
5. The method according to claim 4, characterized in that, Building a pipeline model further includes: The outer surface of the pipe model is divided into multiple grids; Based on the predicted corrosion defect depth and corrosion location, the mesh of the corrosion area is refined.
6. The method according to claim 5, characterized in that, Determining the probability of pipeline failure includes: Determine the maximum stress on each grid in the pipeline model; Determine whether the maximum stress exceeds the yield strength of the pipe material; If so, determine that the mesh is faulty; Search for neighboring grids near the grid to determine if any neighboring grids are invalid; The failure probability of the pipeline is determined based on the number of failed meshes and the total number of meshes on the outer surface of the pipeline model.
7. The method according to claim 4, characterized in that, Random variables are determined in the following way: Measure the pipe thickness to obtain pipe thickness detection data; Determine whether the pipe thickness detection data collected at the same location on the pipe at the previous moment is greater than the pipe thickness detection data collected at the next moment. If so, the pipe thickness monitoring data collected at the previous moment will be used as the final thickness data; If not, the most recently collected pipeline thickness monitoring data will be used as the final thickness data, which is one of the random variables.
8. A natural gas pipeline failure prediction device, characterized in that, The device includes: The data acquisition unit is used to collect natural gas pipeline monitoring data and natural gas pipeline inspection data; The prediction unit is used to input the natural gas pipeline monitoring data and the natural gas pipeline inspection data into the pipeline failure probability prediction model to obtain the pipeline failure probability output by the pipeline failure probability prediction model. The pipeline failure probability prediction model includes a pipeline corrosion prediction model and a pipeline model. The pipeline corrosion prediction model is obtained by training pipeline sample inspection data based on the fusion of fuzzy support and support vector machine. The pipeline model is obtained by training a finite element model based on random variables.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 7.