Pipeline leakage data processing method based on improved grey relational degree
Through the improved gray correlation method, Fluent software simulated and weighted gray correlation calculation, the problems of inflexible processing of pipeline leakage data and low recognition in the prior art are solved, and accurate analysis of the impact of multiple factors of pipeline leakage and Subtle differences recognition improves the sensitivity and accuracy of the calculation.
Patent Information
- Application Number
- CN202411136257.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-10
AI Technical Summary
The existing gray correlation method is inflexible when dealing with pipeline leakage, and cannot accurately capture nonlinear relationships and subtle data differences in the system, resulting in low recognition.
The improved gray correlation method is used to simulate leakage parameters through Fluent software, perform data normalization processing, calculate sequence difference values, and obtain a weighted gray correlation matrix using weighted gray correlation coefficients to improve the sensitivity of data recognition and calculation accuracy. .
Accurately distinguishing and sorting the impact of multiple factors on pipeline leakage is achieved, the flexibility of data processing and the ability to identify subtle differences is improved, and the accuracy and personalization of calculation results are improved.
Smart Images

Figure CN119106547A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of pipeline leakage, and in particular to a pipeline leakage data processing method based on improved grey correlation. Background Art
[0002] In the application field of grey correlation, it is widely used to calculate grey correlation and distinguish and sort the main influencing factors in the study of the influence of different influencing factors on dependent variables.
[0003] At present, although the grey correlation method is widely used and has derived a large number of online computing platforms; however, the flexibility, sensitivity and background operation principles of the online computing platforms in data processing are still unclear.
[0004] In the application of crude oil pipeline leakage, the current achievements are gray research on pipeline detection, such as the patent with publication number CN 116384732A, which includes: collecting the operation data of the station pipeline, determining the risk level of the station pipeline according to the operation data; using the gray correlation method to identify the key influencing parameters of the station pipeline risk level; but the gray correlation method is usually based on the assumption of linear relationship for analysis. When there are complex nonlinear relationships or slight data differences within the system, this method may not be able to accurately capture and analyze these relationships. Summary of the invention
[0005] Aiming at the shortcomings of the existing methods, the present invention solves the problems of inflexible calculation of the existing grey relational degree and low recognition of subtle differences between data.
[0006] The technical solution adopted by the present invention is: a pipeline leakage data processing method based on improved grey correlation comprises the following steps:
[0007] Step 1: Collect pipeline parameters using the pipeline connection leakage model;
[0008] As a preferred implementation of the present invention, the pipeline parameters include: pipeline flow rate, pipeline pressure, pipeline diameter, and leakage degree.
[0009] Step 2, simulating leakage parameters at the leakage point of the pipeline connection;
[0010] As a preferred embodiment of the present invention, the leakage parameter includes: leakage amount.
[0011] As a preferred embodiment of the present invention, the leakage parameters are obtained by simulation using Fluent software.
[0012] Step 3: pre-process the pipeline parameters and the corresponding leakage parameters to obtain sequence differences;
[0013] As a preferred embodiment of the present invention, the pretreatment comprises:
[0014] Step 31: Normalize the pipeline flow rate, pipeline pressure, pipeline diameter, and leakage degree to obtain a difference sequence X ij归一化 ; Normalize the leakage amount to obtain the difference sequence Y ij归一化 ;
[0015] Step 32: Calculate sequence difference
[0016] Step 4: Calculate the grey correlation coefficient using the sequence difference, and obtain the grey correlation coefficient matrix according to the grey correlation coefficient, so as to obtain the grey correlation degree of the pipeline;
[0017] As a preferred embodiment of the present invention, step 4 further includes:
[0018] The exponential grey correlation coefficient is calculated by using the sequence difference, and the exponential grey correlation coefficient matrix is obtained according to the exponential grey correlation coefficient, so as to obtain the exponential grey correlation degree of the pipeline.
[0019] As a preferred embodiment of the present invention, step 4 further includes:
[0020] The weighted grey correlation coefficient is calculated by using the sequence difference, and the weighted grey correlation coefficient matrix is obtained according to the weighted grey correlation coefficient, so as to obtain the weighted grey correlation degree of the pipeline.
[0021] As a preferred embodiment of the present invention, a pipeline leakage data processing system based on improved grey relational degree includes: a memory for storing instructions executable by a processor; a processor for executing the instructions to implement a pipeline leakage data processing method based on improved grey relational degree.
[0022] As a preferred embodiment of the present invention, a computer readable medium stores computer program code, and when the computer program code is executed by a processor, a pipeline leakage data processing method based on improved grey relational degree is implemented.
[0023] Beneficial effects of the present invention:
[0024] 1. The present invention calculates the grey correlation of multiple factors of leakage at pipeline joints, distinguishes and sorts the main factors affecting leakage, and uses Matlab software custom code to calculate the grey correlation, which has the irreplaceable advantages of rapid calculation, high personalization, strong flexibility, and high data recognition sensitivity;
[0025] 2. The existing methods are not sensitive to the original data with slight differences and cannot effectively identify slight changes in the data. The weighted grey correlation method is used to calculate the grey correlation of multiple factors, and the calculation accuracy is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flow chart of the pipeline leakage data processing method based on improved grey correlation degree of the present invention;
[0027] Figure 2 It is the heat map and scatter plot of grey correlation;
[0028] Figure 3 It is the heat map and scatter plot of weighted grey correlation. DETAILED DESCRIPTION
[0029] The present invention is further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore it only shows the components related to the present invention.
[0030] like Figure 1 As shown, a pipeline leakage data processing method based on improved grey correlation degree includes the following steps:
[0031] Step 1: Collect pipeline parameters using the pipeline connection leakage model;
[0032] The leakage model of the pipeline connection part can adopt the flange leakage model for which a patent has been applied for and is named: "Atmospheric diffusion simulation method of pipeline flange leakage based on Fluent".
[0033] The independent variable parameters collected in the pipeline connection leakage model, namely, pipeline parameters include: pipeline flow velocity, pipeline pressure, pipeline diameter and leakage degree.
[0034] Pipeline parameters may also include: pipeline length, type and content of gas transported in the pipeline, specific position of the pipeline connection part in the pipeline, size of the pipeline connection part, shape of the pipeline connection part, width of the annular slit at the connection between the pipeline and the pipeline connection part, and other data that can clearly express the characteristics of the leakage model.
[0035] Step 2, simulating leakage parameters at the leakage point of the pipeline connection;
[0036] According to the pipeline parameters, the leakage parameters of the pipeline are simulated using Fluent software;
[0037] Fluent software operations include:
[0038] 1. In the Report-Definition under Solution of Fluent software, right-click to define New and establish a monitoring value;
[0039] 2. Select Mass under Volume-Report;
[0040] 3. Select Mass in the monitoring area and select the pipeline connection part as the monitoring object;
[0041] 4. Select the data export function on the interface, including Per zone, Report File, ReportPlot, and Print toConsole.
[0042] 5. By changing the pipeline parameters in the leakage model of the pipeline connection, the dependent variable parameters under different conditions, namely the leakage parameters, are obtained. The leakage parameters include: leakage amount, as shown in Table 1:
[0043] Table 1 Leakage volume monitored under different pipeline flow rates, pipeline pressures, pipeline diameters, and leakage levels
[0044]
[0045]
[0046] Step 3: Preprocess the pipeline parameters and corresponding leakage parameters;
[0047] Step 31: Customize the code for calculating data standardization, use the maximum-minimum value method for data standardization calculation, normalize the data, and ensure that different data sets are compared on the same scale; the normalization method can use the maximum-minimum method, and the specific calculation formula is:
[0048] X ij归一化 =(X ij -min(X)) / (max(X)-min(X)) (1)
[0049] Wherein, X is the data set to be processed, i.e., the data set of pipeline parameters and corresponding leakage parameters;
[0050] For example: X includes pipeline flow rate X1, pipeline pressure X2, leakage degree X3, and pipeline diameter X4; by changing a variable from X1 to X4 four times, the corresponding Y1 to Y4 are obtained, as shown in the data in Table 1.
[0051] Normalize X and Y respectively, and get:
[0052]
[0053] The corresponding Matlab code is: X_norm = (X-min(X,[],2)). / (max(X,[],2)-min(X,[],2)); the data initialized with the maximum-minimum value is the difference sequence X ij归一化 , Y ij归一化 .
[0054] Get the input difference sequence X ij归一化 , output difference sequence Y ij归一化 The data sets are:
[0055]
[0056] Step 32, calculating the sequence difference between the input difference sequence and the output difference sequence;
[0057] The formula for the sequence difference is:
[0058]
[0059] The corresponding Matlab code is: "dX = abs (Y_norm-X_norm)" statement, and the sequence difference matrix M is:
[0060]
[0061] Step 4: Calculate the grey correlation coefficient using the sequence difference to obtain the grey correlation coefficient matrix, thereby obtaining the grey correlation of the pipeline;
[0062] Step 41, the formula of grey correlation coefficient is:
[0063]
[0064] Among them, η is 0.5, M max is the maximum value in the matrix M, M min is the minimum value in the matrix M;
[0065] Step 42: The formula for calculating the grey correlation coefficient matrix is:
[0066] R=∑r ij ,
[0067] Among them, R is the grey relational dataset, ∑r ij For r ij is a data set arranged in row i and column j;
[0068] Step 43, calculating the average value of the column vector of the gray correlation coefficient matrix, that is, the color correlation;
[0069]
[0070] Among them, r is the grey relational degree, is the mean of the row vector of the R dataset.
[0071] For example: the grey correlation matrix R is:
[0072]
[0073] The results of grey correlation r are shown in Table 2:
[0074] Table 2 Grey relational degree calculation results
[0075]
[0076] Step 5: Use the exponential grey correlation coefficient to obtain the exponential grey correlation degree of the pipeline;
[0077] The formula of exponential grey relational coefficient is:
[0078]
[0079] Among them, r ij is the grey correlation coefficient.
[0080] Similarly, change the r in step 41 to ij Replace with r ij e , execute step 42 and step 43 again to obtain the exponential grey relational degree r e .
[0081] Step 6: Using the weighted grey correlation coefficient, obtain the weighted grey correlation degree of the pipeline;
[0082] The formula of weighted grey correlation coefficient is:
[0083]
[0084] Among them, w ij is the Sigmoid weight, and n is the number of columns of data.
[0085] Similarly, change the r in step 41 to ij Replace with r ij a , execute step 42 and step 43 again to obtain the exponential grey relational degree r a , the results are shown in Table 3:
[0086] Table 3 Weighted grey relational degree
[0087]
[0088] It can be seen that although the correlation rankings in Table 3 are consistent with those in Table 2, considering the slight differences in the leakage amounts in rows 1-8 of Table 1, the correlation value between pipeline velocity and pipeline pressure should be smaller, while in the case of large differences in the data in rows 9-16, the correlation value between leakage degree and pipeline diameter should be larger, indicating that the weighted grey correlation method in Table 3 is feasible.
[0089] Drawing grey relational visualization graphics includes:
[0090] 1. Create a widescreen window: Use figure('Position',[100,100,1200,600]) to set the window size;
[0091] 2. Split the drawing area: call the subplot function to split the drawing area;
[0092] 3. Heatmap drawing: call the heatmap function to draw the grey correlation heatmap, including but not limited to: using the statement "h=heatmap({'X1','X2','X3','X4'},{'Y1','Y2','Y3','Y4'},r);"
[0093] 4. Use gray correlation as the color of the scatter plot: use scatter_colors=column_mean code to extract color;
[0094] 5. Draw a scatter plot: Use the scatter function to draw a scatter plot, use the "scatter(1:4,column_mean,column_mean*1000,scatter_colors,'filled')" statement; use xticks to set the scale of the graph, and use xticklabels to set the scale labels; use "xticks(1:4);" and "xticklabels({'X1','X2','X3','X4'});" to set the scale and scale labels of the scatter plot respectively.
[0095] 6. Set the title of the heat map and scatter plot: use title to set the title of the map, and use label to set the name of the independent variable or dependent variable;
[0096] 7. Apply custom bright color color mapping: Use the colormap function to customize color mapping, heat maps and scatter plots such as Figure 2-3 shown.
[0097] Assume the following leakage scenario: the pipeline is 1m long, and there is a matching pipeline connection in the middle where a leak occurs; study the impact of influencing factors on the leakage at the pipeline connection, including pipeline flow rate, pipeline pressure, leakage degree, and pipeline diameter; monitor the surface leakage at the leak, and analyze and process the data using the grey correlation method.
[0098] The original data of leakage monitoring at the pipeline connection is obtained from Table 1, and the normalized data, difference sequence data, and gray correlation calculation data are calculated by Matlab custom code; Figure 2-3The heat map and scatter plot of the grey correlation degree before improvement and the grey correlation degree after weighted average method improvement are obtained respectively. The leakage at the pipe connection is completely different from the hole leakage. Figure 2-3 In the analysis, the weights affecting pipeline leakage are ranked according to the grey correlation degree as follows: leakage degree, pipeline diameter, pipeline pressure, and pipeline flow rate.
[0099] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A pipeline leakage data processing method based on improved grey correlation, characterized in that: The following steps are involved: Step 1: Collect pipeline parameters using the pipeline connection leakage model; Step 2, simulating leakage parameters at the leakage point of the pipeline connection; Step 3: pre-process the pipeline parameters and the corresponding leakage parameters to obtain sequence differences; Step 4: Calculate the grey correlation coefficient using the sequence difference, and obtain the grey correlation coefficient matrix based on the grey correlation coefficient, so as to obtain the grey correlation degree of the pipeline.
2. The pipeline leakage data processing method based on improved grey relational degree according to claim 1 is characterized in that: Preprocessing includes: Step 31: Normalize the pipeline flow rate, pipeline pressure, pipeline diameter, and leakage degree to obtain a difference sequence X ij归一化 ; Normalize the leakage amount to obtain the difference sequence Y ij归一化 ; Step 32: Calculate sequence difference 3. The pipeline leakage data processing method based on improved grey relational degree according to claim 2 is characterized in that: Step 4 also includes: The exponential grey correlation coefficient is calculated by using the sequence difference, and the exponential grey correlation coefficient matrix is obtained according to the exponential grey correlation coefficient, so as to obtain the exponential grey correlation degree of the pipeline.
4. The pipeline leakage data processing method based on improved grey relational degree according to claim 2 is characterized in that: Step 4 also includes: The weighted grey correlation coefficient is calculated by using the sequence difference, and the weighted grey correlation coefficient matrix is obtained according to the weighted grey correlation coefficient, so as to obtain the weighted grey correlation degree of the pipeline.
5. The pipeline leakage data processing method based on improved grey relational degree according to claim 1 is characterized in that: Pipeline parameters include: pipeline flow rate, pipeline pressure, pipeline diameter and leakage degree.
6. The pipeline leakage data processing method based on improved grey relational degree according to claim 1 is characterized in that: Leakage parameters include: leakage volume.
7. The pipeline leakage data processing method based on improved grey relational degree according to claim 6 is characterized in that: The leakage parameters were obtained by simulation using Fluent software.
8. The pipeline leakage data processing system based on improved grey correlation is characterized by: include: a memory for storing instructions executable by a processor; A processor, used for executing instructions to implement the pipeline leakage data processing method based on improved grey relational degree as described in any one of claims 1 to 7.
9. A computer readable medium storing a computer program code, characterized in that: When the computer program code is executed by a processor, the pipeline leakage data processing method based on improved grey relational degree as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Intelligent assessment method and system for station pipeline risk, storage medium and computing equipment
CN116384732A
