KPCA and Cas-SVDD-based multi-working-condition pipeline leakage detection method

文档序号:1541107 发布日期:2020-01-17 浏览:12次 中文

阅读说明:本技术 一种基于KPCA和Cas-SVDD的多工况管道泄漏检测方法 (KPCA and Cas-SVDD-based multi-working-condition pipeline leakage detection method ) 是由 周猛飞 张强 孙小方 蔡亦军 潘海天 于 2019-09-18 设计创作,主要内容包括:本发明公开了一种基于KPCA和Cas-SVDD的多工况管道泄漏检测方法。包括:采集管道正常运行过程的样本数据,通过局部均值分解(LMD)降噪和信号重构以提取可靠的特征变量;通过核主元分析(KPCA)对特征变量进行降维和非线性主元提取;通过K-means聚类算法自动识别多个工况,并分别对各个工况建立相应的支持向量数据描述模型(SVDD),以得到不同操作工况相应SVDD超球体的决策边界;基于串级支持向量数据描述模型(Cas-SVDD)实现管道泄漏的检测。本发明方法能有效检测管道小泄漏,泄漏检测的准确性高,具有广泛的应用价值。(The invention discloses a KPCA and Cas-SVDD based multi-working condition pipeline leakage detection method. The method comprises the following steps: collecting sample data of a pipeline normal operation process, and extracting reliable characteristic variables through Local Mean Decomposition (LMD) noise reduction and signal reconstruction; performing dimensionality reduction and nonlinear principal component extraction on the characteristic variables through Kernel Principal Component Analysis (KPCA); automatically identifying a plurality of working conditions through a K-means clustering algorithm, and respectively establishing corresponding support vector data description models (SVDD) for each working condition to obtain decision boundaries of corresponding SVDD hyperspheres under different operating conditions; and detecting the pipeline leakage based on a cascade support vector data description model (Cas-SVDD). The method can effectively detect the small leakage of the pipeline, has high accuracy of leakage detection, and has wide application value.)

1. A KPCA and Cas-SVDD-based multi-working-condition pipeline leakage detection method is characterized by comprising the following steps:

step 1.1: collecting and standardizing historical pressure signal data of normal operation of a pipeline, and setting initial parameters of an LMD algorithm, a KPCA algorithm, a K-means algorithm and an SVDD algorithm;

step 1.2: denoising and feature reconstruction are carried out on the standardized pressure signals through an LMD algorithm, and feature variables are extracted;

step 1.3: performing characteristic reduction and nonlinear principal component extraction on the characteristic variables of the pressure signals by adopting a KPCA (kernel principal component analysis) algorithm;

step 1.4: performing clustering analysis on the kernel principal elements by adopting a K-means algorithm, and identifying a plurality of working conditions;

step 1.5: establishing corresponding SVDD models aiming at all working conditions to obtain the center and the radius of each SVDD hypersphere and construct a Cas-SVDD detection model;

step 1.6: and (3) respectively denoising and reconstructing the online collected pipeline operation data by adopting an LMD algorithm, extracting characteristic variables, performing dimensionality reduction by adopting a KPCA algorithm, and performing leakage detection by adopting the Cas-SVDD detection model constructed in the step 1.5.

2. The KPCA and Cas-SVDD-based multi-condition pipeline leakage detection method of claim 1, wherein in step 1.1, historical pressure signal data of normal operation of the pipeline is collected and normalized to (0, 1).

3. The multi-condition pipeline leakage detection method based on KPCA and Cas-SVDD as claimed in claim 1, wherein in step 1.2, noise reduction and feature reconstruction are performed on the normalized pressure signal by LMD algorithm, extracting feature variables, specifically comprising:

step 1.2.1, the standardized pressure signal x (t) is subjected to LMD algorithm noise reduction, and PF component PF is subjected to LMD decompositioni(t) is written as follows, as shown in equation (1):

PFi(t)=ai(t)si(t) (1)

in the formula (1), ai(t) is the instantaneous amplitude of the PF component, si(t) is a pure frequency modulation signal, i is the number of components, and t is time;

step 1.2.2 processing the pure frequency modulated signal to obtain the instantaneous frequency f of the PF componenti(t) is represented by the formula (2):

Figure FDA0002206216320000011

step 1.2.3 the PF component is gradually separated from the normalized pressure signal x (t) and a residual component e is finally obtainedk(t) original signal x (t) is written as k PF components PFp(t) sum with residual component ek(t) is represented by the formula (3):

Figure FDA0002206216320000021

and 1.2.4, respectively extracting time domain characteristic variables and waveform characteristic variables from two aspects of time domain and signal waveform to complete the extraction of the characteristic variables.

4. The KPCA and Cas-SVDD-based multi-condition pipeline leakage detection method according to claim 3, wherein said time domain feature variables and waveform feature variables are 12 in total, wherein the time domain feature variables comprise average amplitude, variance, effective value, square root amplitude, energy; the waveform characteristic variables include kurtosis, skewness parameters, kurtosis factors, pulse factors, shape parameters, peak coefficients, and valley factors.

5. The multi-condition pipeline leakage detection method based on KPCA and Cas-SVDD as claimed in claim 1, wherein in step 1.3, the KPCA algorithm is used to perform feature reduction and nonlinear principal component extraction on the feature variables of the pressure signal, specifically comprising:

step 1.3.1 low-dimensional data sample set X ═ X by gaussian kernel function Φ (X)1,x2,…,xn]TWherein x isi∈Rm,(i=1,2,…,n),xiRepresenting the ith sample, wherein n is the number of samples, m is the number of variables, mapping the ith sample to a high-dimensional space F to construct a feature space, and performing principal component analysis on each variable from the high-dimensional feature space to obtain a covariance matrix C on the F spaceFIs composed of

xjRepresents the jth sample;

step 1.3.2 performs eigenvalue decomposition on equation (4):

λivi=CFvi(5)

wherein λ isiAnd viRespectively obtaining an eigenvalue and an eigenvector of the covariance matrix;

step 1.3.3CFCharacteristic vector v ofiExpressed as:

Figure FDA0002206216320000023

wherein, aijThe characteristic space expansion coefficient is taken as the characteristic space expansion coefficient;

step 1.3.4 bringing formula (4) and formula (6) into formula (5) gives:

step 1.3.5 defines an n × n kernel matrix K, where the element K of the ith row and jth column of the kernel matrixij=[Φ(xi),Φ(xj)]Then equation (7) can be expressed as:

iai=Kai(8)

wherein, ai=[ai1,ai2,…,ain]TThe eigenvalues of the kernel matrix K satisfy lambda1≥λ2≥…≥λnAnd keeping the previous p (p is less than or equal to n) characteristic values and characteristic vectors to realize characteristic dimension reduction.

6. The KPCA and Cas-SVDD-based multi-condition pipeline leakage detection method as claimed in claim 1, characterized in that in step 1.4, the K-means algorithm adopts the mean square error as the clustering criterion function to obtain the optimization problem as shown in formula (9):

Figure FDA0002206216320000031

where H is the sum of mean square error criterion function value and Q is the cluster QiGiven the data object in (1), CiIs a cluster QiW is the number of data, and P is the number of normal operating conditions.

7. The KPCA and Cas-SVDD-based multi-condition pipeline leakage detection method as claimed in claim 1, wherein in step 1.5, corresponding SVDD models are established for each condition to obtain the center and radius of each SVDD hypersphere, and a Cas-SVDD detection model is constructed, specifically comprising:

step 1.5.1 the problem of determining the minimum hypersphere of SVDD is transformed into the following optimization problem:

Figure FDA0002206216320000032

the constraint conditions are as follows:

Figure FDA0002206216320000033

ξp,i≥0,i=1,2,...,N;p=1,2,...,P

in the formula (10), xi is a relaxation factor, CpThe penalty parameter of the p-th hyper-sphere is shown, N is the number of samples, apAnd RpThe center and the radius of the p-th hyper-sphere are respectively;

step 1.5.2 introduces a gaussian kernel function, which will result in the dual problem of the optimization problem of formula (10):

Figure FDA0002206216320000034

the constraint conditions are as follows:

Figure FDA0002206216320000035

wherein, ap,iAnd ap,jAre all lagrange multipliers; k (x)p,i·xp,j)=<Φ(xp,i),Φ(xp,j)>Is a kernel function;

step 1.5.3, solving the quadratic programming problem of the formula to obtain the radius of the p-th hyper-sphere as follows:

Figure FDA0002206216320000041

wherein x isp,kIs a support vector;

step 1.5.4 assumes the test sample is xnewThen the distance d between the sample and the center of the pth hyper-spherepComprises the following steps:

Figure FDA0002206216320000042

wherein xnew,iAnd xnew,jRepresents the test sample xnewThe characteristic amount of (1);

if d ispGreater than RpIf the sample does not belong to the p-th working condition, judging that the sample does not belong to the p-th working condition;

and 1.5.5, sequencing the SVDD models of the corresponding working conditions from large to small according to the occurrence probability of each working condition, and constructing a Cas-SVDD detection model.

8. The multi-condition pipeline leakage detection method based on KPCA and Cas-SVDD as claimed in claim 1, characterized in that in step 1.6, on-line pipeline operation data is collected, LMD algorithm is respectively adopted to denoise and reconstruct signal, characteristic variable is extracted, KPCA algorithm is adopted to perform dimension reduction, Cas-SVDD detection model constructed in step 1.5 is adopted to perform leakage detection, the specific steps are as follows:

step 1.6.1, collecting pipeline operation data on line, respectively adopting an LMD algorithm to reduce noise and reconstruct signals, extracting characteristic variables, and carrying out dimensionality reduction by a KPCA algorithm;

and step 1.6.2, sequentially passing the sample data obtained in the step 1.6.1 through the Cas-SVDD detection model, wherein if the signal is contained in a certain SVDD sphere, the signal indicates no leakage, and if the signal is not contained in any SVDD sphere, the signal indicates that the pipeline leaks.

Technical Field

The invention relates to the technical field of pipeline leakage detection methods, in particular to a KPCA (Kernel principal component analysis) and Cas-SVDD (Cascade singular value decomposition) -based multi-working-condition pipeline leakage detection method.

Background

The pipeline is one of safe, efficient and energy-saving fluid conveying modes, and plays an increasingly important role in national economy. However, pipes often develop leakage problems due to aging, corrosion, poor welding, third party damage, and the like. And various working conditions exist in the running process of the pipeline, and the change of the operating working conditions can cause the change of the measurement signal of the pipeline, so that the detection accuracy of the pipeline leakage is reduced. Therefore, the operation condition of the pipeline is accurately judged, and the method has important significance for reducing the accuracy of leakage detection.

From the viewpoint of building a detection model, methods for detecting pipeline leakage can be divided into two categories, namely a mechanism-based model and a data-driven model. The method based on the mechanism model is highly dependent on model parameters and the accuracy of the sensor, needs a large amount of simulation and calibration work, and needs high calculation load to solve the complex nonlinear model; the data-driven based method relies on data collection to perform signal processing and statistical analysis for leak detection, but it does not require any specific in-depth knowledge about the system, but only requires acquisition of pipeline leak characteristics and knowledge from collected historical data by machine learning algorithms or artificial intelligence algorithms, plus statistical or pattern recognition tools; however, the existing data driving method generally needs to perform feature extraction on sample data of the pipeline leakage signal and establish a classified or predicted leakage detection model. But the leakage data samples in the actual process are few, and the leakage signals are difficult to perform feature extraction and diagnosis modeling; in addition, various operation working conditions often exist in the pipeline operation process, training samples in characteristic spaces of all the working conditions are different in properties and are not uniformly distributed, and the characteristics generated by working condition adjustment and the characteristics of pipeline leakage have certain similarity, so that the accuracy of the pipeline leakage detection system is reduced.

Disclosure of Invention

The invention provides a multi-working-condition pipeline leakage detection method based on KPCA (kernel principal component analysis) and Cas-SVDD (Cas-support vector data description model) and aims to solve the problems that sample data of an actual pipeline leakage signal is difficult to obtain, feature extraction and diagnostic modeling cannot be performed on the leakage signal, and multiple working conditions such as valve adjustment, operation condition change and the like often exist in the normal pipeline conveying process.

A KPCA and Cas-SVDD-based multi-working-condition pipeline leakage detection method comprises the following steps:

step 1.1: collecting and standardizing historical pressure signal data of normal operation of a pipeline, and setting initial parameters of an LMD (local mean decomposition) algorithm, a KPCA (kernel principal component analysis) algorithm, a K-means (K mean clustering algorithm) algorithm and an SVDD (support vector data description model) algorithm;

step 1.2: denoising and feature reconstruction are carried out on the standardized pressure signals through an LMD algorithm, and feature variables are extracted;

step 1.3: performing characteristic reduction and nonlinear principal component extraction on the characteristic variables of the pressure signals by adopting a KPCA (kernel principal component analysis) algorithm;

step 1.4: performing clustering analysis on the kernel principal elements by adopting a K-means algorithm, and identifying a plurality of working conditions;

step 1.5: establishing corresponding SVDD models aiming at all working conditions to obtain the center and the radius of each SVDD hypersphere and construct a Cas-SVDD detection model;

step 1.6: and (3) respectively denoising and reconstructing the online collected pipeline operation data by adopting an LMD algorithm, extracting characteristic variables, performing dimensionality reduction by adopting a KPCA algorithm, and performing leakage detection by adopting the Cas-SVDD detection model constructed in the step 1.5.

In step 1.1, historical pressure signal data of normal operation of the pipeline is collected firstly, and then the historical pressure signal data is normalized to be between (0, 1).

In step 1.2, noise reduction and feature reconstruction are carried out on the standardized pressure signals through an LMD algorithm, and feature variables are extracted, and the method specifically comprises the following steps:

step 1.2.1, the standardized pressure signal x (t) is subjected to LMD algorithm noise reduction, and PF component PF is subjected to LMD decompositioni(t) is written as follows, as shown in equation (1):

PFi(t)=ai(t)si(t) (1)

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

Step 1.2.2 processing the pure frequency modulated signal to obtain the instantaneous frequency f of the PF componenti(t) is represented by the formula (2):

Figure BDA0002206216330000021

step 1.2.3 the PF component is gradually separated from the normalized pressure signal x (t) and a residual component e is finally obtainedk(t) original signal x (t) is written as k PF components PFp(t) sum with residual component ek(t) is represented by the formula (3):

Figure BDA0002206216330000031

and 1.2.4, respectively extracting time domain characteristic variables and waveform characteristic variables from two aspects of time domain and signal waveform to complete the extraction of the characteristic variables. The time domain characteristic variables and the waveform characteristic variables are 12 in total, wherein the time domain characteristic variables comprise average amplitude, variance, effective value, square root amplitude and energy; the waveform characteristic variables include kurtosis, skewness parameters, kurtosis factors, pulse factors, shape parameters, peak coefficients, and valley factors. After the LMD algorithm decomposes the pipeline pressure signal and obtains a plurality of PF components of the signal, the signal is denoised and reconstructed, and then time domain characteristic variables and waveform characteristic variables are respectively extracted from two aspects of time domain and signal waveform, so that the extraction of the characteristic variables is completed.

In step 1.3, a KPCA algorithm is adopted to carry out feature reduction and nonlinear principal component extraction on the feature variables of the pressure signals, and the method specifically comprises the following steps:

step 1.3.1 low-dimensional data sample set X ═ X by gaussian kernel function Φ (X)1,x2,…,xn]TWherein x isi∈Rm,(i=1,2,…,n),xiRepresents the ith sample, where n is the number of samples and m is the number of variables, maps to highConstructing a feature space in a dimension space F, and then carrying out principal component analysis on each variable from a high-dimension feature space to obtain a covariance matrix C on the F spaceFIs composed of

Figure BDA0002206216330000032

xjRepresenting the jth sample.

Step 1.3.2 performs eigenvalue decomposition on equation (4):

λivi=CFvi(5)

wherein λ isiAnd viRespectively obtaining an eigenvalue and an eigenvector of the covariance matrix;

step 1.3.3CFCharacteristic vector v ofiExpressed as:

wherein, aijThe characteristic space expansion coefficient is taken as the characteristic space expansion coefficient;

step 1.3.4 bringing formula (4) and formula (6) into formula (5) gives:

step 1.3.5 defines an n × n kernel matrix K, where the element K of the ith row and jth column of the kernel matrixij=[Φ(xi),Φ(xj)]Then equation (7) can be expressed as:

iai=Kai(8)

wherein, ai=[ai1,ai2,…,ain]TThe eigenvalues of the kernel matrix K satisfy lambda1≥λ2≥…≥λnAnd keeping the previous p (p is less than or equal to n) characteristic values and characteristic vectors to realize characteristic dimension reduction.

In step 1.4, the K-means algorithm adopts the mean square error as a clustering criterion function to obtain an optimization problem shown as the formula (9):

where H is the sum of mean square error criterion function value and Q is the cluster QiGiven the data object in (1), CiIs a cluster QiW is the number of data, and P is the number of normal operating conditions.

In step 1.5, establishing corresponding SVDD models for each working condition to obtain the center and radius of each SVDD hypersphere, and constructing a Cas-SVDD detection model, which specifically comprises:

step 1.5.1 the problem of determining the minimum hypersphere of SVDD is transformed into the following optimization problem:

Figure BDA0002206216330000042

the constraint conditions are as follows:

Figure BDA0002206216330000043

ξp,i≥0,i=1,2,...,N;p=1,2,...,P

in the formula (10), zeta is a relaxation factor, CpThe penalty parameter of the p-th hyper-sphere is shown, N is the number of samples, apAnd RpThe sphere center and the radius of the p-th hyper-sphere are respectively.

Step 1.5.2 introduces a gaussian kernel function, which will result in the dual problem of the optimization problem of formula (10):

the constraint conditions are as follows:

Figure BDA0002206216330000045

wherein, ap,iAnd ap,jAre all lagrange multipliers; k (x)p,i·xp,j)=<Φ(xp,i),Φ(xp,j)>Is a kernel function.

Step 1.5.3, solving the quadratic programming problem of the formula to obtain the radius of the p-th hyper-sphere as follows:

Figure BDA0002206216330000046

wherein x isp,kIs a support vector.

Step 1.5.4 assumes the test sample is xnewThen the distance d between the sample and the center of the pth hyper-spherepComprises the following steps:

wherein xnew,iAnd xnew,jRepresents the test sample xnewThe characteristic amount of (1).

If d ispGreater than RpIf the sample does not belong to the p-th working condition, judging that the sample does not belong to the p-th working condition;

and 1.5.5, sequencing the SVDD models of the corresponding working conditions from large to small according to the occurrence probability of each working condition, and constructing a Cas-SVDD detection model.

In step 1.6, collecting pipeline operation data on line, respectively adopting an LMD algorithm to reduce noise and reconstruct signals, extracting characteristic variables, adopting a KPCA algorithm to reduce dimension, and adopting the Cas-SVDD detection model constructed in step 1.5 to perform leakage detection, wherein the method specifically comprises the following steps:

step 1.6.1, collecting pipeline operation data on line, respectively adopting LMD to reduce noise and reconstruct signals, extracting characteristic variables, and reducing dimension by KPCA.

And step 1.6.2, sequentially passing the sample data obtained in the step 1.6.1 through the Cas-SVDD detection model. If the signal is contained in one of the SVDD spheres, it indicates no leak, and if the signal is not contained in any of the SVDD spheres, it indicates a leak in the conduit.

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

the invention discloses a KPCA and Cas-SVDD-based multi-working-condition pipeline leakage detection method, which aims to solve the problems that sample data of an actual pipeline leakage signal is difficult to obtain, the leakage signal cannot be subjected to feature extraction and diagnostic modeling, and the normal pipeline conveying process also often has multiple working conditions such as valve adjustment, operation condition change and the like. The method comprises the steps of collecting sample data of a pipeline in a normal operation process, and extracting reliable characteristic variables through Local Mean Decomposition (LMD) noise reduction and signal reconstruction; performing dimensionality reduction and nonlinear principal component extraction on the characteristic variables through Kernel Principal Component Analysis (KPCA); automatically identifying a plurality of working conditions through a K-means clustering algorithm, and respectively establishing corresponding support vector data description models (SVDD) for each working condition to obtain decision boundaries of corresponding SVDD hyperspheres under different operating conditions; and detecting the pipeline leakage based on a cascade support vector data description model (Cas-SVDD). The method can effectively detect the small leakage of the pipeline, has high accuracy of leakage detection, and has wide application value.

Drawings

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

FIG. 2 is a graph of a pressure measurement signal for the method of the present invention;

FIG. 3 is a plot of the LMD signal noise reduction effect of the method of the present invention;

FIG. 4 is a K-means clustering effect graph of the method of the present invention.

Detailed Description

The multi-working-condition pipeline leakage detection method based on KPCA and Cas-SVDD is described in detail below with reference to the accompanying drawings.

A multi-working-condition pipeline leakage detection method based on KPCA and Cas-SVDD comprises the following steps:

step 1.1: collecting and standardizing historical data of normal operation of the pipeline, and setting initial parameters of LMD, KPCA, K-means and SVDD algorithms;

step 1.2: denoising and feature reconstruction are carried out on the standardized pressure measurement signals through an LMD algorithm, and feature variables are extracted;

step 1.3: performing feature reduction and nonlinear principal component extraction on the feature variables of the pressure signals by adopting KPCA;

step 1.4: performing clustering analysis on the kernel principal elements by adopting a K-means algorithm, and identifying a plurality of working conditions;

step 1.5: establishing corresponding SVDD models aiming at all working conditions to obtain the center and the radius of each SVDD hypersphere and construct a Cas-SVDD detection model;

and step 1.6, performing noise reduction and reconstruction on the online collected pipeline operation data by respectively adopting LMD (local mean decomposition), extracting characteristic variables, performing dimension reduction on KPCA (kernel principal component analysis), and performing leakage detection on Cas-SVDD (Cassia-singular value decomposition).

In the step 1.1, the historical data of the normal operation of the pipeline is collected firstly, and then the historical data is standardized to be between (0, 1).

Step 1.2, noise reduction and feature reconstruction are carried out on the standardized pressure measurement signals through an LMD algorithm, and the feature variable extraction comprises the following steps:

step 1.2.1, performing LMD algorithm noise reduction on the collected pressure signals x (t), wherein the PF component after LMD decomposition can be written into the following form:

PFi(t)=ai(t)si(t) (1)

in the formula (1), ai(t) is the instantaneous amplitude of the PF component, si(t) is a pure frequency modulated signal.

Step 1.2.2 processing the pure frequency modulation signal to obtain the instantaneous frequency of the PF component:

step 1.2.3 the PF component is gradually separated from the signal x (t) and finally a residual component e is obtainedk(t), the original signal x (t) can be written as k PF components and ekSum of (t):

Figure BDA0002206216330000072

and 1.2.4, after the LMD decomposes the pipeline pressure signal and obtains a plurality of PF components of the signal, the signal is denoised and reconstructed. Then, 12 time domain and waveform feature variables are extracted from the time domain and the signal waveform respectively. The time domain characteristics comprise average amplitude, variance, effective value, square root amplitude and energy; the waveform characteristics include kurtosis, skewness parameters, kurtosis factors, pulse factors, shape parameters, peak coefficients, and valley factors.

In step 1.3, the specific steps of the KPCA performing feature reduction and nonlinear principal component extraction on the feature variables of the pressure signal are as follows:

step 1.3.1 low-dimensional data sample set X ═ X by gaussian kernel function Φ (X)1,x2,…,xn]TWherein x isi∈Rm(i ═ 1,2, …, n), where n is the number of samples and m is the number of variables, are mapped into the high-dimensional space F to construct the feature space, and each variable is then subjected to principal component analysis from the high-dimensional feature space, so that the covariance matrix C on the F spaceFIs composed of

Figure BDA0002206216330000073

Step 1.3.2 performs eigenvalue decomposition on equation (4):

λivi=Cvi(5)

wherein λ isiAnd viEigenvalues and eigenvectors of the covariance matrix, respectively.

Step 1.3.3CFThe feature vector v of (a) may be expressed as:

Figure BDA0002206216330000074

wherein, aijIs the eigenspace expansion coefficient.

Step 1.3.4 bringing formula (4) and formula (6) into formula (5) gives:

Figure BDA0002206216330000075

step 1.3.5 defining an n × n kernel matrix K, where Kij=[Φ(xi),Φ(xj)]Then equation (7) can be expressed as:

iai=Kai(8)

wherein, ai=[ai1,ai2,…,ain]TThe eigenvalues of the matrix K satisfy lambda1≥λ2≥…≥λn. And keeping the first p (p is less than or equal to n) characteristic values and characteristic vectors to realize characteristic dimension reduction.

In the step 1.4, the K-means algorithm adopts the mean square error as a clustering criterion function to obtain the optimization problem shown in the formula (9):

Figure BDA0002206216330000081

where H is the sum of mean square error criterion function value and Q is the cluster QiGiven the data object in (1), CiIs a cluster QiW is the number of data, and P is the number of normal operating conditions.

In the step 1.5, corresponding SVDD models are established for each working condition to obtain the center and radius of each SVDD hypersphere, and the established Cas-SVDD detection model specifically comprises the following steps:

step 1.5.1 the problem of determining the minimum hypersphere of SVDD is transformed into the following optimization problem:

Figure BDA0002206216330000082

s.t.

Figure BDA0002206216330000083

ζp,i≥0,i=1,2,...,N;p=1,2,...,P

in the formula (10), xi is a relaxation factor, C is a penalty parameter, N is the number of samples, apAnd RpThe sphere center and the radius of the p-th hyper-sphere are respectively.

Step 1.5.2 introduces a gaussian kernel function, which will result in the dual problem of the optimization problem of formula (10):

s.t.

Figure BDA0002206216330000085

wherein a is a Lagrangian multiplier; k (x)p,i·xp,j)=<Φ(xp,i),Φ(xp,j) Is the kernel function.

Step 1.5.3, solving the quadratic programming problem of the formula to obtain the radius of the p-th hyper-sphere as follows:

Figure BDA0002206216330000086

wherein x isp,kIs a support vector.

Step 1.5.4 assumes the test sample is xnewThen the distance d between the sample and the center of the pth hyper-spherepComprises the following steps:

Figure BDA0002206216330000091

if d ispGreater than RpThen the sample does not belong to the p-th class of conditions.

And 1.5.5, sequencing the SVDD models of the corresponding working conditions from large to small according to the occurrence probability of each working condition, and constructing the Cas-SVDD model.

Step 1.6, collecting pipeline running data on line, respectively adopting LMD to reduce noise and reconstruct signals, extracting characteristic variables, reducing dimension by KPCA, and carrying out leakage detection by Cas-SVDD, which comprises the following specific steps:

step 1.6.1, collecting pipeline operation data on line, respectively adopting LMD to reduce noise and reconstruct signals, extracting characteristic variables, and reducing dimension by KPCA.

And step 1.6.2, sequentially passing the sample data obtained in the step 1.6.1 through each SVDD model. If the signal is contained in one of the SVDD spheres, it indicates no leak, and if the signal is not contained in any of the SVDD spheres, it indicates a leak in the conduit.

Simulation implementation case

As shown in FIG. 1, an experimental pipeline design diagram of a multi-working-condition pipeline leakage detection method based on KPCA and Cas-SVDD. The pipe lengths at the upstream and downstream nodes are 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 liquid level height difference of a constant-pressure water tank at the head end and the tail end of the pipeline is 130m, and the wave velocity of negative pressure waves is 1000 m/s. Simulating the occurrence of leakage at a position 500m away from the head end of the pipeline, and respectively selecting different leakage ball valves to simulate small, medium and large leakage scenes; the simulation time was 40s and the sampling time was 0.01 s. And the leakage ball valve is controlled to be opened within 2s, the leakage occurs at a position of 20s, and pressure signals of the head end and the tail end of the pipeline generated by normal operation, the regulating valve and small, medium and large leakage are respectively collected.

And (3) simulating 80 groups of data samples in each type of scene, wherein the sampling point number of each group of samples is 1100. Firstly, noise reduction and signal reconstruction are carried out on the collected pressure signals by using the LMD, and then time domain characteristics and shape characteristics are obtained through the obtained reconstructed pressure signals so as to extract characteristic variables of the signals. And (3) establishing 400 groups of data samples by collecting the number of points 1100 of each sample signal, wherein 80 groups of samples are normal working conditions, 80 groups of samples are valve adjusting working conditions, and 80 groups of samples are respectively in small, medium and large leakage working condition scenes.

The acquired pressure signal is first denoised and signal reconstructed by using the LMD. To illustrate the signal noise reduction effect, taking a pressure signal at a distance of 500m from the head end of the pipeline as an example, fig. 2 and 3 show a comparison graph of the effect of the pressure signal before and after the LMD noise reduction. As can be seen from fig. 3, through the LMD signal noise reduction, the noise of the pressure signals under various working conditions is better processed, and the reconstructed pressure signals better show respective waveform characteristics, so that a basis is provided for extracting characteristic variables from subsequent signals.

And then, carrying out KPCA (kernel principal component analysis) dimension reduction on the obtained data samples of the time domain characteristic variable and the waveform characteristic variable to obtain new comprehensive characteristics which can better embody the original characteristic variable. However, the collected leakage-free data contains a plurality of working conditions, the description boundary of a single SVDD (S-SVDD) in the multi-working condition classification is not compact enough, so that the classification precision is low, in order to solve the problem, the data set is clustered by using the sample data subjected to KPCA dimension reduction through a K-means method, and the clustering effect is shown in FIG. 4. And training the obtained 2-class data sets without leakage working conditions to obtain corresponding 2 SVDD models, and establishing a cascade SVDD model.

The invention compares the leakage detection accuracy of the S-SVDD, Cas-SVDD and KPCA-Cas-SVDD methods. As shown in table 1. As can be seen from Table 1, the detection performance of the Cas-SVDD method is improved compared with that of the S-SVDD method, but the leak detection accuracy is still low. The KPCA-Cas-SVDD method provided by the invention has detection rates of 90%, 95% and 97.5% for small, medium and large leakage respectively, and greatly improves the pipeline leakage detection performance.

TABLE 1 detection accuracy of S-SVDD, Cas-SVDD, KPCA-Cas-SVDD algorithms under different leakage scenarios

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于光纤湿度传感器的管道漏水检测装置及系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!