在线一本码道高清

Method and process for multi-operating pipeline leak detection based on KPCA and Cas-SVDD

发布日期:2020-01-18 03:51 Document serial number: 19730133 Release date: 2020-01-18 03:51
Method and process for multi-operating pipeline leak detection based on KPCA and Cas-SVDD

The invention relates to the technical field of pipeline leak detection methods, and in particular, to a multi-operating pipeline leak detection method based on kpca and cas-svdd.



Background technique:

Pipeline is one of the safe, efficient and energy-saving ways to transport fluids, and it is playing an increasingly important role in the national economy. However, pipelines often cause leakage problems due to aging, corrosion, poor welding, and third-party damage. There are many operating conditions in the pipeline operation process. Changes in operating conditions will cause changes in pipeline measurement signals, which will reduce the accuracy of pipeline leakage detection. Therefore, accurately judging the operating conditions of the pipeline is of great significance for reducing the accuracy of leak detection.

From the perspective of detection model establishment, pipeline leak detection methods can be divided into two categories based on mechanism models and data-driven models. The mechanism-based method is highly dependent on the accuracy of the model parameters and sensors, requires a lot of simulation and calibration work, and requires a high computational load to solve this complex non-linear model; the data-driven method relies on data collection to perform signals Processing and statistical analysis for leak detection, but it does not require any specific in-depth knowledge of the system, only the machine learning algorithm or artificial intelligence algorithm is required to obtain pipeline leak characteristics and knowledge from the collected historical data, plus statistics Or pattern recognition tools; however, existing data-driven methods generally require feature extraction of pipeline leak signal sample data to establish a classified or predicted leak detection model. However, there are few leak data samples in the actual process, which makes it difficult to perform feature extraction and diagnosis modeling on the leak signal. In addition, there are often multiple operating conditions in the pipeline operation process. The training samples in the feature space of each condition have different properties and are not distributed. It is uniform, and the characteristics produced by the adjustment of the working conditions are similar to the characteristics of the pipeline leakage, which leads to a decrease in the accuracy of the pipeline leakage detection system.



Technical realization elements:

In view of the fact that the actual pipeline leakage signal sample data is difficult to obtain, the leakage signal cannot be extracted and diagnosed and modeled, and the normal pipeline transportation process often has multiple working conditions such as valve adjustment and operating condition changes. The present invention proposes a method based on Kpca (kernel principal component analysis) and cas-svdd (cascade support vector data description model) multi-operating pipeline leak detection methods.

A multi-operating pipeline leak detection method based on kpca and cas-svdd includes the following steps:

Step 1.1: Collect and normalize the historical pressure signal data of the normal operation of the pipeline, set the lmd (local mean decomposition) algorithm, kpca (kernel principal component analysis) algorithm, k-means (k-means clustering algorithm) algorithm, and svdd (support vector data Describe the initial parameters of the algorithm);

Step 1.2: The normalized pressure signal is subjected to noise reduction and feature reconstruction through the lmd algorithm, and feature variables are extracted;

Step 1.3: Use the kpca algorithm to perform feature dimensionality reduction and non-linear principal component extraction on the feature variables of the pressure signal;

Step 1.4: Use k-means algorithm to perform cluster analysis on the kernel principal components to identify multiple working conditions;

Step 1.5: Establish a corresponding svdd model for each working condition, obtain the center and radius of each svdd hypersphere, and construct a cas-svdd detection model;

Step 1.6: Collect pipeline operation data online, use the lmd algorithm to reduce noise and reconstruct the signal, extract feature variables, reduce the dimensionality of the kpca algorithm, and use the cas-svdd detection model constructed in step 1.5 for leak detection.

In step 1.1, first collect the historical pressure signal data of the normal operation of the pipeline, and then normalize it to (0,1).

In step 1.2, the standardized pressure signal is subjected to noise reduction and feature reconstruction through the lmd algorithm, and feature variables are extracted, which specifically include:

Step 1.2.1 Perform noise reduction of the standardized pressure signal x (t) by the lmd algorithm. After the lmd decomposition, the pf component pfi (t) is written as follows, as shown in formula (1):

pfi (t) = ai (t) si (t) (1)

In formula (1), ai (t) is the instantaneous amplitude of the pf component, si (t) is a pure frequency-modulated signal, i is the number of components, and t is time.

Step 1.2.2 processing the pure FM signal to obtain the instantaneous frequency fi (t) of the pf component, as shown in equation (2):

Step 1.2.3: The pf component is gradually separated from the standardized pressure signal x (t), and finally a residual component ek (t) is obtained. The original signal x (t) is written as k pf components pfp (t) and the residual component. The sum of ek (t) is shown in equation (3):

Step 1.2.4 Extract the time domain feature variables and waveform feature variables from the two aspects of the time domain and the signal waveform, respectively, to complete the extraction of the feature variables. The total of the time-domain characteristic variables and waveform characteristic variables is 12, wherein the time-domain characteristic variables include average amplitude, variance, effective value, square root amplitude, and energy; the waveform characteristic variables include kurtosis, skewness parameters, Kurtosis factor, pulse factor, shape parameter, crest factor, chirp factor. After the lmd algorithm decomposes the pipeline pressure signal and obtains multiple pf components of the signal, the signal is denoised and reconstructed, and then the time domain characteristic variables and waveform characteristic variables are extracted from the time domain and signal waveform, Extract feature variables.

In step 1.3, the kpca algorithm is used to perform feature dimensionality reduction and non-linear principal component extraction on the characteristic variables of the pressure signal, including:

Step 1.3.1 Through the Gaussian kernel function φ (x), set the low-dimensional data sample set x = [x1, x2, ..., xn] t , where xi ∈ r m , (i = 1, 2, ..., n), xi represents the i-th sample, where n is the number of samples, and m is the number of variables, which are mapped to a high-dimensional space f to build a feature space. The covariance matrix c f is

xj represents the j-th sample.

Step 1.3.2 Perform eigenvalue decomposition on equation (4):

λivi = c f vi (5)

Among them, λi and vi are the eigenvalues and eigenvectors of the covariance matrix, respectively;

The feature vector vi of step 1.3.3c f is expressed as:

Where aij is the expansion coefficient of the feature space;

Step 1.3.4: Put formula (4) and formula (6) into formula (5), and get:

Step 1.3.5 defines an n × n kernel matrix k, where the element of the i-th row and the j-th column of the kernel matrix kij = [φ (xi), φ (xj)], then equation (7) can be expressed as

nλiai = kai (8)

Among them, ai = [ai1, ai2, ..., ain] t , the eigenvalues of the kernel matrix k satisfy λ1≥λ2≥ ... ≥λn, and the first p (p≤n) eigenvalues and eigenvectors are retained to achieve feature dimensionality reduction.

In step 1.4, the k-means algorithm uses the mean square error as the clustering criterion function to obtain the optimization problem as shown in equation (9):

Among them, h is the sum of the mean square error criterion function values, q is the given data object in cluster qi, ci is the mean value of cluster qi, w is the number of data, and p is the number of normal conditions.

In step 1.5, a corresponding svdd model is established for each working condition, the center and radius of each svdd hypersphere are obtained, and a cas-svdd detection model is constructed, which specifically includes:

Step 1.5.1 converts the problem of determining the smallest svdd hypersphere into the following optimization problem:

The constraints are:

ξp, i≥0, i = 1,2, ..., n; p = 1,2, ..., p

In formula (10), ζ is a relaxation factor, cp is a penalty parameter of the p-th hypersphere, n is the number of samples, and ap and rp are the center and radius of the p-th hypersphere, respectively.

In step 1.5.2, a Gaussian kernel function is introduced, and the dual problem of the optimization problem of equation (10) is obtained:

The constraints are:

Among them, ap, i and ap, j are Lagrange multipliers; k (xp, i · xp, j) = <φ (xp, i), φ (xp, j)> are kernel functions.

Step 1.5.3 By solving the above quadratic programming problem, the radius of the p-th hypersphere is:

Among them, xp, k are support vectors.

Step 1.5.4 Assuming the test sample is xnew, the distance dp between the sample and the center of the p-th hypersphere is:

Where xnew, i and xnew, j represent the feature quantities in the test sample xnew.

If dp is greater than rp, the sample does not belong to the p-th case;

Step 1.5.5 According to the probability of occurrence of each working condition, sort the svdd models of the corresponding working conditions from large to small to construct a cas-svdd detection model.

In step 1.6, the pipeline operation data is collected online, the signal is denoised and reconstructed using the lmd algorithm, the feature variables are extracted, the kpca algorithm is used to reduce the dimension, and the cas-svdd detection model constructed in step 1.5 is used for leak detection. :

Step 1.6.1 Collect pipeline operation data online, use lmd to denoise and reconstruct the signal, extract feature variables, and reduce the dimension of kpca.

Step 1.6.2 Pass the sample data obtained in step 1.6.1 through the cas-svdd detection model in turn. If the signal is contained in a svdd sphere, it means no leakage, if the signal is not contained in any svdd sphere, it means that the pipeline has leaked.

Compared with the prior art, the present invention has the following advantages:

For the actual pipeline leakage signal sample data is difficult to obtain, the leakage signal cannot be extracted and diagnosed and modeled, and the normal pipeline transportation process often has multiple working conditions such as valve adjustment and operating condition changes. Cas-svdd multi-operating pipeline leak detection method. The method of the present invention collects sample data of the normal running process of the pipeline, and extracts reliable feature variables through local mean decomposition (lmd) noise reduction and signal reconstruction; and performs dimensionality reduction and non-linear principal components on the feature variables through kernel principal component analysis (kpca). Extraction; k-means clustering algorithm is used to automatically identify multiple working conditions, and the corresponding support vector data description model (svdd) is established for each working condition to obtain the decision boundary of the corresponding svdd hypersphere for different operating conditions; based on the string Level support vector data description model (cas-svdd) implements pipeline leak detection. The method of the invention can effectively detect small leaks in pipelines, has high accuracy in leak detection, and has wide application value.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a design diagram of an experimental pipeline of the method of the present invention;

2 is a pressure measurement signal diagram of the method of the present invention;

3 is a noise reduction effect diagram of an lmd signal according to the method of the present invention;

FIG. 4 is a k-means clustering effect diagram of the method of the present invention.

detailed description

The following describes in detail a method for multi-operating pipeline leak detection based on kpca and cas-svdd of the present invention with reference to the accompanying drawings.

A multi-operating pipeline leak detection method based on kpca and cas-svdd, including:

Step 1.1: Collect and normalize the historical data of pipeline operation, and set the initial parameters of the lmd, kpca, k-means, and svdd algorithms;

Step 1.2: Perform noise reduction and feature reconstruction on the standardized pressure measurement signal through the lmd algorithm, and extract feature variables;

Step 1.3: Use kpca to perform feature dimensionality reduction and nonlinear principal component extraction on the characteristic variables of the pressure signal;

Step 1.4: Use k-means algorithm to perform cluster analysis on the kernel principal components to identify multiple working conditions;

Step 1.5: Establish a corresponding svdd model for each working condition, obtain the center and radius of each svdd hypersphere, and construct a cas-svdd detection model;

Step 1.6: Collect pipeline operation data online, use lmd to denoise and reconstruct the signal, extract feature variables, kpca for dimension reduction, and cas-svdd for leak detection.

In the above step 1.1, the historical data of the normal operation of the pipeline is first collected, and then normalized to (0,1).

Step 1.2: Perform noise reduction and feature reconstruction on the standardized pressure measurement signal through the lmd algorithm. Extracting the feature variables includes the following steps:

Step 1.2.1 Perform noise reduction of the collected pressure signal x (t) by the lmd algorithm. The pf component after the lmd decomposition can be written as follows:

pfi (t) = ai (t) si (t) (1)

In formula (1), ai (t) is the instantaneous amplitude of the pf component, and si (t) is a pure frequency-modulated signal.

Step 1.2.2 Processing the pure FM signal to obtain the instantaneous frequency of the pf component:

Step 1.2.3 gradually separate the pf component from the signal x (t), and finally obtain a residual component ek (t). The original signal x (t) can be written as the sum of k pf components and ek (t):

Step 1.2.4 After the lmd decomposes the pipeline pressure signal and obtains multiple pf components of the signal, the signal is denoised and reconstructed. Then, 12 time-domain and waveform characteristic variables were extracted from the time-domain and signal waveforms. The time domain features include average amplitude, variance, effective value, square root amplitude, and energy; waveform features include kurtosis, skewness parameters, kurtosis factors, pulse factors, shape parameters, peak coefficients, and kurtosis factors.

In the above step 1.3, kpca performs the feature dimension reduction and non-linear principal component extraction on the characteristic variables of the pressure signal as follows:

Step 1.3.1 Through the Gaussian kernel function φ (x), set the low-dimensional data sample set x = [x1, x2, ..., xn] t , where xi ∈ r m , (i = 1, 2, ..., n), Where n is the number of samples, m is the number of variables, and is mapped to a high-dimensional space f to construct a feature space. Each variable is then subjected to principal component analysis from the high-dimensional feature space. The covariance matrix c f in f space is

Step 1.3.2 Perform eigenvalue decomposition on equation (4):

λivi = cvi (5)

Among them, λi and vi are the eigenvalues and eigenvectors of the covariance matrix, respectively.

The feature vector v of step 1.3.3c f can be expressed as:

Among them, aij is a feature space expansion coefficient.

Step 1.3.4: Put formula (4) and formula (6) into formula (5), and get:

Step 1.3.5 defines an n × n kernel matrix k, where kij = [φ (xi), φ (xj)], then equation (7) can be expressed as:

nλiai = kai (8)

Among them, ai = [ai1, ai2, ..., ain] t , and the eigenvalues of the matrix k satisfy λ1≥λ2≥ ... ≥λn. Retain the first p (p≤n) eigenvalues and eigenvectors to achieve feature dimensionality reduction.

In step 1.4 above, the k-means algorithm uses the mean square error as the clustering criterion function to obtain the optimization problem as shown in equation (9):

Among them, h is the sum of the mean square error criterion function values, q is the given data object in cluster qi, ci is the mean value of cluster qi, w is the number of data, and p is the number of normal conditions.

In step 1.5 above, the corresponding svdd model is established for each working condition, and the center and radius of each svdd hypersphere are obtained. The specific steps of the cas-svdd detection model constructed are as follows:

Step 1.5.1 converts the problem of determining the smallest svdd hypersphere into the following optimization problem:

st

ζp, i≥0, i = 1,2, ..., n; p = 1,2, ..., p

In Equation (10), ξ is a relaxation factor, c is a penalty parameter, n is the number of samples, and ap and rp are the center and radius of the p-th hypersphere, respectively.

In step 1.5.2, a Gaussian kernel function is introduced, and the dual problem of the optimization problem of equation (10) is obtained:

st

Among them, a is a Lagrangian multiplier; k (xp, i · xp, j) = <φ (xp, i), φ (xp, j)> is a kernel function.

Step 1.5.3 By solving the above quadratic programming problem, the radius of the p-th hypersphere is:

Among them, xp, k are support vectors.

Step 1.5.4 Assuming the test sample is xnew, the distance dp between the sample and the center of the p-th hypersphere is:

If dp is greater than rp, the sample does not belong to the p-th case.

Step 1.5.5 According to the probability of occurrence of each working condition, sort the svdd models of the corresponding working conditions from large to small to construct a cas-svdd model.

Step 1.6 will collect pipeline operation data online, use lmd to reduce noise and reconstruct the signal, extract feature variables, kpca to reduce dimension, and cas-svdd to perform leak detection. The specific steps are as follows:

Step 1.6.1 Collect pipeline operation data online, use lmd to denoise and reconstruct the signal, extract feature variables, and reduce the dimension of kpca.

Step 1.6.2 passes the sample data obtained in step 1.6.1 through each svdd model in turn. If the signal is contained in a svdd sphere, it means no leakage, if the signal is not contained in any svdd sphere, it means that the pipeline has leaked.

Simulation implementation case

As shown in Figure 1, an experimental pipeline design diagram of a multi-operating pipeline leak detection method based on kpca and cas-svdd. The length of the pipeline at the upstream node and the downstream node is 2000m, and the specific operating conditions are as follows: the inner diameter is 70mm, the relative roughness of the inner wall is 0.015mm, the height difference of the constant pressure water tank at the beginning and end of the pipeline is 130m, and the negative pressure wave velocity is 1000m / s. The leakage occurred at a distance of 500m from the head of the pipeline. Different leakage ball valves were selected to simulate small, medium and large leakage scenarios. The simulation time was 40s and the sampling time was 0.01s. The leak control ball valve is opened within 2s, and the leakage occurs at 20s. The pressure signals of the first and end of the pipeline generated during normal operation, regulating valves, and small, medium and large leaks are collected.

Each of the above scenarios was simulated with 80 groups of data samples, and the number of sampling points for each group of samples was 1100. First, use the lmd to perform noise reduction and signal reconstruction on the collected pressure signal, and then use the obtained reconstructed pressure signal to obtain the time domain features and shape features to extract the feature variables of the signal. With 1100 points for each sample signal, 400 sets of data samples are established, of which 80 sets of samples are in normal working conditions, 80 sets of samples are in valve adjusting working conditions, and 80 sets of samples are in each of small, medium and large leakage working scenarios.

Firstly, noise reduction and signal reconstruction are performed on the collected pressure signal by using lmd. To illustrate the noise reduction effect of the signal, a pressure signal at a distance of 500m from the head of the pipeline is taken as an example. Figures 2 and 3 show the comparison of the effects of the pressure signal before and after the noise reduction by lmd. It can be seen from Figure 3 that the noise reduction of the pressure signal in various operating conditions is better processed through the noise reduction of the lmd signal, and the reconstructed pressure signal better displays its respective waveform characteristics, which provides a feature for subsequent signal extraction. basis.

Then, the data samples of the obtained time-domain characteristic variables and waveform characteristic variables are subjected to kpca dimensionality reduction to obtain new comprehensive characteristics that better reflect the original characteristic variables. However, the collected leak-free data contains multiple operating conditions. The description boundary of a single svdd (s-svdd) in the classification of multiple operating conditions is not compact enough, resulting in low classification accuracy. In order to solve this problem, kpca dimensionality reduction The sample data is clustered by the k-means method. The clustering effect is shown in Figure 4. The corresponding two svdd models are obtained by training the obtained data sets of two types of non-leakage conditions, and a cascade svdd model is established.

The present invention compares the leak detection accuracy rates of the three methods of s-svdd, cas-svdd and kpca-cas-svdd. As shown in Table 1. It can be known from Table 1 that the detection performance of the cas-svdd method is improved compared to s-svdd, but the accuracy of leak detection is still low. The kpca-cas-svdd method proposed by the present invention has detection rates of 90%, 95%, and 97.5% for small, medium, and large leaks, which greatly improves pipeline leak detection performance.

Table 1 s-svdd, cas-svdd, kpca-cas-svdd algorithm detection accuracy in different leakage scenarios

Know more
Current 1 Page 1 2 3
已有0条留言 There are 0 comments
  • No one has commented yet. Wonderful comments will be liked!
1