CN-116953067-B - Noise processing method for magnetic flux leakage detection signal, electronic device and storage medium
Abstract
The invention provides a noise processing method, a device and electronic equipment of a magnetic flux leakage detection signal, and the method comprises the steps of determining the corresponding median and absolute median of each original signal value in a preset filtering window on the magnetic flux leakage detection signal, carrying out filtering processing on the magnetic flux leakage detection signal according to the original signal value, the median, the absolute median and a preset filtering rule to obtain a first filtering signal, determining a wavelet coefficient through a preset threshold function, carrying out wavelet denoising on the first filtering signal according to the wavelet coefficient, and obtaining a signal of the magnetic flux leakage detection signal after noise processing. Through median filtering processing based on absolute intermediate level, impulse noise in the magnetic leakage detection signal is effectively filtered, and meanwhile, high-frequency noise in the wavelet denoising filtered signal of a wavelet coefficient is further adjusted by adopting a threshold function, so that impulse noise and high-frequency noise in the magnetic leakage detection signal are effectively restrained, and the signal quality is effectively improved.
Inventors
- WANG YONG
- WANG JIANAN
- LI MING
- WANG YUXIN
Assignees
- 中国石油化工股份有限公司
- 中石化(大连)石油化工研究院有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20220419
Claims (4)
- 1. A noise processing method of a leakage detection signal, comprising: Acquiring a magnetic flux leakage detection signal, wherein the magnetic flux leakage detection signal comprises a plurality of original signal values; Determining a median value and an absolute median difference corresponding to each original signal value in a preset filtering window, and performing filtering processing on the magnetic flux leakage detection signal according to the original signal value, the median value, the absolute median difference and a preset filtering rule to obtain a first filtering signal; Determining a wavelet coefficient through a preset threshold function, and carrying out wavelet denoising on the first filtering signal according to the wavelet coefficient to obtain a second filtering signal, wherein the second filtering signal is a signal of the magnetic flux leakage detection signal subjected to noise treatment; Determining the absolute middle bit difference corresponding to each original signal value in a preset filtering window, wherein the absolute middle bit difference comprises the following steps: determining a median value and each neighborhood signal value corresponding to the original signal value in a preset filtering window; respectively carrying out difference between the median value and each neighborhood signal value to obtain each difference absolute value; taking the median value of the absolute values of the differences as the corresponding absolute median difference of the original signal value in a preset filtering window; the filtering processing is performed on the magnetic flux leakage detection signal according to the original signal value, the median value, the absolute median difference and a preset filtering rule, so as to obtain a first filtering signal, which comprises the following steps: When the absolute value of the difference between the original signal value and the median is greater than or equal to the absolute median, replacing the median with the original signal value; when the absolute value of the difference between the original signal value and the median is smaller than the absolute median, the original signal value is reserved; the determining the wavelet coefficient through the preset threshold function comprises the following steps: determining wavelet coefficients using the following threshold function; The threshold function includes: ; Wherein, the The number of layers of the wavelet decomposition is the number of layers, Is the original wavelet coefficients of the wavelet, Is the wavelet coefficient determined by threshold function processing, Is a function of the adjustment variable, Is a sign function, and its expression is: ; taking an unbiased risk estimation threshold, wherein the unbiased risk estimation threshold is as follows: ; Wherein, the Is a wavelet coefficient Is of (1) The first of (3) The number of elements to be added to the composition, Is a risk vector The lower index value corresponding to the minimum element in the vector, wherein the vector is estimated To wavelet coefficients The vectors obtained by the square and then the sequence from small to large are taken, , To estimate vectors Length of (2) risk vector Is the first of (2) Individual elements Wherein And Respectively, are estimated vectors The first of (3) Individual elements and the first The number of elements to be added to the composition, 。
- 2. A noise processing apparatus for a leakage detection signal, comprising: The acquisition module is used for acquiring a magnetic flux leakage detection signal, wherein the magnetic flux leakage detection signal comprises a plurality of original signal values; the first processing module is used for determining the corresponding median value and absolute median difference of each original signal value in a preset filtering window, and carrying out filtering processing on the magnetic flux leakage detection signals according to the original signal values, the median value, the absolute median difference and a preset filtering rule to obtain first filtering signals; the second processing module is used for determining a wavelet coefficient through a preset threshold function, carrying out wavelet denoising on the first filtering signal according to the wavelet coefficient to obtain a second filtering signal, wherein the second filtering signal is a signal of the magnetic flux leakage detection signal after noise processing; the first processing module is specifically configured to, in a process of determining an absolute middle bit difference corresponding to each original signal value in a preset filtering window: determining a median value and each neighborhood signal value corresponding to the original signal value in a preset filtering window; respectively carrying out difference between the median value and each neighborhood signal value to obtain each difference absolute value; taking the median value of the absolute values of the differences as the corresponding absolute median difference of the original signal value in a preset filtering window; the first processing module is used for performing filtering processing on the magnetic flux leakage detection signal according to the original signal value, the median value, the absolute median difference and a preset filtering rule, and is specifically used for: When the absolute value of the difference between the original signal value and the median is greater than or equal to the absolute median, replacing the median with the original signal value; when the absolute value of the difference between the original signal value and the median is smaller than the absolute median, the original signal value is reserved; The second processing module is specifically configured to: determining wavelet coefficients using the following threshold function; The threshold function includes: ; Wherein, the The number of layers of the wavelet decomposition is the number of layers, Is the original wavelet coefficients of the wavelet, Is the wavelet coefficient determined by threshold function processing, Is a function of the adjustment variable, Is a sign function, and its expression is: ; taking an unbiased risk estimation threshold, wherein the unbiased risk estimation threshold is as follows: ; Wherein, the Is a wavelet coefficient Is of (1) The first of (3) The number of elements to be added to the composition, Is a risk vector The lower index value corresponding to the minimum element in the vector, wherein the vector is estimated To wavelet coefficients The vectors obtained by the square and then the sequence from small to large are taken, , To estimate vectors Length of (2) risk vector Is the first of (2) Individual elements Wherein And Respectively, are estimated vectors The first of (3) Individual elements and the first The number of elements to be added to the composition, 。
- 3. An electronic device comprising a processor and a memory storing a computer program, characterized in that the processor implements the steps of the noise processing method of the leakage detection signal of claim 1 when executing the computer program.
- 4. A processor-readable storage medium, wherein the processor-readable storage medium stores a computer program for causing the processor to execute the steps of the noise processing method of the magnetic flux leakage detection signal of claim 1.
Description
Noise processing method for magnetic flux leakage detection signal, electronic device and storage medium Technical Field The present invention relates to the field of signal processing technologies, and in particular, to a noise processing method for a magnetic flux leakage detection signal, an electronic device, and a storage medium. Background The magnetic leakage detection technology is an electromagnetic nondestructive detection method for detecting the defects of surface corrosion, pits, cracks and the like of ferromagnetic materials, has the advantages of simplicity, rapidness, accuracy and the like, and is widely applied to detection of pressure pipelines, large storage tanks and steel wire ropes. In recent years, the magnetic flux leakage detection technology has remarkable research results in aspects of magnetic flux leakage detection signal feature quantity extraction, magnetic flux leakage signal inversion, defect quantification, evaluation methods and the like. However, the magnetic flux leakage detection signal is easy to mix into complex noise signals due to vibration of a motion device, space magnetic field interference and power frequency interference in the acquisition and transmission processes. Such disturbances can cause the leakage detection signal to "drown" in the noise signal, leading to erroneous or missed decisions of the defect. Disclosure of Invention Aiming at the problems existing in the prior art, the invention provides a noise processing method of a magnetic flux leakage detection signal, electronic equipment and a storage medium. In a first aspect, the present invention provides a noise processing method of a magnetic flux leakage detection signal, including: Acquiring a magnetic flux leakage detection signal, wherein the magnetic flux leakage detection signal comprises a plurality of original signal values; Determining a median value and an absolute median difference corresponding to each original signal value in a preset filtering window, and performing filtering processing on the magnetic flux leakage detection signal according to the original signal value, the median value, the absolute median difference and a preset filtering rule to obtain a first filtering signal; And determining a wavelet coefficient through a preset threshold function, and carrying out wavelet denoising on the first filtering signal according to the wavelet coefficient to obtain a second filtering signal, wherein the second filtering signal is a signal after noise treatment of the magnetic flux leakage detection signal. In one embodiment, determining the corresponding absolute median difference of each of the original signal values within a preset filter window comprises: determining a corresponding median value and each adjacent domain signal value of the original signal value in a preset filtering window; Respectively carrying out difference between the median value and each neighborhood signal value to obtain each difference absolute value; Taking the median value of the absolute values of the differences as the absolute median difference corresponding to the original signal value in a preset filtering window. In one embodiment, the filtering the magnetic flux leakage detection signal according to the original signal value, the median value, the absolute median difference and a preset filtering rule to obtain a first filtered signal includes: when the absolute value of the difference value between the original signal value and the median value is larger than or equal to the absolute bit difference, replacing the median value with the original signal value; And when the absolute value of the difference between the original signal value and the median is smaller than the absolute median, the original signal value is reserved. In one embodiment, the determining the wavelet coefficients by a preset threshold function includes: determining wavelet coefficients using the following threshold function; The threshold function includes: Wherein l is the number of wavelet decomposition layers, w is the original wavelet coefficient, w new is the wavelet coefficient determined by threshold function processing, k is a function adjustment variable, sgn (x) is a sign function, and the expression is: T takes an unbiased risk estimation threshold, and the value is as follows: Wherein S a is the estimated vector of the wavelet coefficient w A is the lower index value corresponding to the minimum element in the risk vector R, wherein the estimated vectorIn order to square the wavelet coefficients w and then sort the resulting vectors from small to large,N is an estimated vectorThe q-th element of the risk vector RWherein S p and S q are the p-th element and the q-th element, respectively, in the estimated vector R, 1< < p < < q < < N. In a second aspect, the present invention provides a noise processing apparatus for a magnetic flux leakage detection signal, comprising: The acquisition module is used for acquiring a