Noise processing method of magnetic flux leakage detection signal, electronic device and storage medium

By using absolute median difference median filtering and threshold function adjustment of wavelet denoising, the problem of noise interference in magnetic flux leakage detection signals is solved, signal quality is improved, and effective suppression of pulse and high-frequency noise is achieved.

CN116953067BActive Publication Date: 2026-05-05CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA PETROLEUM & CHEMICAL CORP
Filing Date
2022-04-19
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

During the acquisition and transmission of magnetic flux leakage detection signals, they are susceptible to vibrations from moving devices, interference from spatial magnetic fields, and power frequency interference, which can lead to noise signals being mixed in and causing misjudgments or missed detections of defects.

Method used

A wavelet denoising method based on absolute median difference and threshold function adjustment is used to filter out impulse noise and high-frequency noise in the magnetic flux leakage detection signal, respectively.

Benefits of technology

It effectively suppresses noise in the magnetic flux leakage detection signal, improves signal quality, reduces distortion problems of traditional filtering methods, and achieves effective suppression of pulse noise and high-frequency noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116953067B_ABST
    Figure CN116953067B_ABST
Patent Text Reader

Abstract

This invention relates to the field of signal processing technology, providing a noise processing method, apparatus, and electronic device for magnetic flux leakage (MFL) detection signals. The method includes: determining the median and absolute median difference of each original signal value within a preset filtering window; filtering the MFL detection signal according to the original signal values, median, absolute median difference, and preset filtering rules to obtain a first filtered signal; determining wavelet coefficients using a preset threshold function; and performing wavelet denoising on the first filtered signal based on the wavelet coefficients to obtain the noise-processed MFL detection signal. By using median filtering based on the absolute median difference, impulse noise in the MFL detection signal is effectively filtered out. Simultaneously, wavelet denoising using a threshold function to adjust the wavelet coefficients further filters out high-frequency noise in the signal, effectively suppressing impulse noise and high-frequency noise in the MFL detection signal, thereby effectively improving signal quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal processing technology, and in particular to a noise processing method, electronic device, and storage medium for magnetic flux leakage detection signals. Background Technology

[0002] Magnetic flux leakage (MFL) testing is an electromagnetic non-destructive testing method used to detect defects such as corrosion, pitting, and cracks on the surface of ferromagnetic materials. It boasts advantages such as simplicity, speed, and accuracy, and is widely applied in the inspection of pressure pipelines, large storage tanks, and wire ropes. In recent years, MFL testing has achieved significant research results in areas such as MFL signal feature extraction, MFL signal inversion, defect quantification, and evaluation methods. However, during the acquisition and transmission of MFL signals, complex noise signals are easily mixed in due to vibrations of moving devices, spatial magnetic field interference, and power frequency interference. This disturbance can cause the MFL signal to be "submerged" in noise, leading to misjudgment or missed detection of defects. Summary of the Invention

[0003] In view of the problems existing in the prior art, the present invention provides a noise processing method, electronic device and storage medium for magnetic flux leakage detection signals.

[0004] In a first aspect, the present invention provides a noise processing method for magnetic flux leakage detection signals, comprising:

[0005] Acquire a magnetic flux leakage detection signal, which includes multiple raw signal values;

[0006] The median and absolute median difference of each of the original signal values ​​are determined within a preset filtering window. The leakage magnetic field detection signal is then filtered according to the original signal value, the median, the absolute median difference, and the preset filtering rules to obtain a first filtered signal.

[0007] Wavelet coefficients are determined by a preset threshold function, and wavelet denoising is performed on the first filtered signal based on the wavelet coefficients to obtain a second filtered signal, which is the signal of the magnetic flux leakage detection signal after noise processing.

[0008] In one embodiment, determining the absolute median difference of each of the original signal values ​​within a preset filtering window includes:

[0009] Determine the median and neighboring signal values ​​of the original signal value within a preset filtering window;

[0010] The median is subtracted from each of the neighboring signal values ​​to obtain the absolute value of each difference;

[0011] The median of the absolute values ​​of each difference is taken as the absolute median difference of the original signal value within a preset filtering window.

[0012] In one embodiment, the step of filtering the magnetic flux leakage detection signal according to the original signal value, the median, the absolute median difference, and a preset filtering rule to obtain a first filtered signal includes:

[0013] If the absolute value of the difference between the original signal value and the median is greater than or equal to the absolute median difference, then the median replaces the original signal value.

[0014] If the absolute value of the difference between the original signal value and the median is less than the absolute median difference, then the original signal value is retained.

[0015] In one embodiment, determining the wavelet coefficients using a preset threshold function includes:

[0016] The wavelet coefficients are determined using the following threshold function;

[0017] Threshold functions include:

[0018]

[0019] Where l is the wavelet decomposition level, w is the original wavelet coefficient, and w new These are wavelet coefficients determined by a threshold function, where k is the function adjustment variable, and sgn(x) is the sign function, expressed as:

[0020]

[0021] T is taken as the unbiased risk estimation threshold, and its value is:

[0022]

[0023] Among them, S a The estimated vector of wavelet coefficients w The a-th element in the vector R is where a is the index of the smallest element in the risk vector R, and the estimated vector is... This is the vector obtained by squaring the wavelet coefficients w and then sorting them in ascending order. N is the estimation vector The length of the risk vector R; the q-th element of the risk vector R. Where S p and S q Let p and q be the p-th and q-th elements in the estimated vector R, respectively, where 1 << p << q << N.

[0024] In a second aspect, the present invention provides a noise processing device for magnetic flux leakage detection signals, comprising:

[0025] The acquisition module is used to acquire the magnetic flux leakage detection signal, which includes multiple raw signal values;

[0026] The first processing module is used to determine the median and absolute median difference of each of the original signal values ​​within a preset filtering window, and to filter the magnetic flux leakage detection signal according to the original signal value, the median, the absolute median difference and the preset filtering rules to obtain a first filtered signal.

[0027] The second processing module is used to determine wavelet coefficients through a preset threshold function, and to perform wavelet denoising on the first filtered signal according to the wavelet coefficients to obtain a second filtered signal, wherein the second filtered signal is the signal of the magnetic flux leakage detection signal after noise processing.

[0028] Thirdly, the present invention provides an electronic device, including a memory and a memory storing a computer program, wherein the processor executes the program to implement the steps of the noise processing method for the leakage magnetic field detection signal described in the first aspect.

[0029] Fourthly, the present invention provides a processor-readable storage medium storing a computer program for causing the processor to perform the steps of the noise processing method for the leakage magnetic field detection signal described in the first aspect.

[0030] The noise processing method, electronic device, and storage medium for magnetic flux leakage detection signals provided by this invention effectively filter out impulse noise in the magnetic flux leakage detection signals through median filtering based on absolute median difference. Furthermore, addressing the issue that median filtering still contains a small amount of unrelated power frequency interference and electromagnetic noise, wavelet denoising with threshold functions to adjust wavelet coefficients is employed to filter out high-frequency noise in the signal. This reduces the problems of incomplete noise removal or signal distortion caused by traditional filtering methods, effectively suppressing impulse noise and high-frequency noise in the magnetic flux leakage detection signals, thereby significantly improving signal quality. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0032] Figure 1 This is a flowchart illustrating the noise processing method for magnetic flux leakage detection signals provided by the present invention.

[0033] Figure 2 This is a waveform diagram formed by the original signal values ​​on the leakage magnetic field detection signal provided by the present invention;

[0034] Figure 3 This is a spectrum diagram formed by the original signal values ​​on the leakage magnetic field detection signal provided by the present invention;

[0035] Figure 4 This is a waveform diagram formed by the signal values ​​on the first filtered signal provided by the present invention;

[0036] Figure 5 This is a spectrum diagram formed by the signal values ​​on the first filtered signal provided by the present invention;

[0037] Figure 6 This is a waveform diagram formed by the signal values ​​on the second filtered signal provided by the present invention;

[0038] Figure 7 This is a spectrum diagram formed by the signal values ​​on the second filtered signal provided by the present invention;

[0039] Figure 8 This is a graph of the threshold function when k takes different values, provided by the present invention;

[0040] Figure 9 This is a schematic diagram of the noise processing device for the magnetic flux leakage detection signal provided by the present invention;

[0041] Figure 10 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0043] The following is combined Figures 1-10 The present invention describes a noise processing method, apparatus, electronic device, and storage medium for magnetic flux leakage detection signals.

[0044] Figure 1 A flowchart illustrating a noise processing method for magnetic flux leakage detection signals according to the present invention is shown. See [link / reference]. Figure 1 The method includes:

[0045] 11. Acquire the magnetic flux leakage detection signal, which includes multiple raw signal values;

[0046] 12. Determine the median and absolute median difference of each original signal value within the preset filtering window. Filter the magnetic flux leakage detection signal according to the original signal value, median, absolute median difference, and preset filtering rules to obtain the first filtered signal.

[0047] 13. Determine the wavelet coefficients through a preset threshold function, and perform wavelet denoising on the first filtered signal based on the wavelet coefficients to obtain the second filtered signal. The second filtered signal is the signal after noise processing of the leakage magnetic field detection signal.

[0048] Regarding steps 11 to 13, it should be noted that in this invention, magnetic flux leakage (MFL) detection technology is an electromagnetic non-destructive testing method used to detect defects such as corrosion, pits, and cracks on the surface of ferromagnetic materials. It has advantages such as simplicity, speed, and accuracy, and is widely used in the inspection of pressure pipelines, large storage tanks, and wire ropes. In recent years, MFL detection technology has achieved significant research results in areas such as MFL signal feature extraction, MFL signal inversion, defect quantification, and evaluation methods. However, during the acquisition and transmission of MFL signals, complex noise signals are easily mixed in due to vibrations of moving devices, spatial magnetic field interference, and power frequency interference. This disturbance can cause the MFL detection signal to be "submerged" in noise signals, leading to misjudgment or missed detection of defects.

[0049] Therefore, the method of this invention requires noise reduction processing of the magnetic flux leakage detection signal. First, the magnetic flux leakage detection signal must be acquired. This signal is a digital signal, composed of multiple original signal values. For example... Figure 2 and Figure 3 The figures shown are the waveforms and spectrum diagrams formed by the original signal values ​​of the magnetic flux leakage detection signal.

[0050] In this invention, the noise removal process for the magnetic flux leakage detection signal first involves a median filter. At this stage, the magnetic flux leakage detection signal needs to be input into the filter, so the filter window size must be determined before the median and absolute median difference of each original signal value within the preset filter window can be determined.

[0051] Finally, the magnetic flux leakage detection signal is filtered according to the original signal value, median, absolute median difference, and preset filtering rules to obtain the first filtered signal. It should be noted that by calculating and analyzing the original signal value, median, and absolute median difference according to the preset filtering rules, different scenario conditions that satisfy the rules are determined. Different scenario conditions correspond to different signal value replacements and maintenance. For example, in scenario condition 1, the median replaces the corresponding original signal value; in scenario condition 2, the original signal value is maintained. After the signal value replacement and maintenance, the various signals now constitute the first filtered signal.

[0052] In this invention, wavelet denoising is used again to perform a second filtering process on the obtained first filtered signal. This time, considering the reasonable adjustment of the wavelet coefficients, a threshold function is used to adjust the wavelet coefficients. Then, the adjusted wavelet coefficients are used in the wavelet denoising process of the first filtered signal to obtain the second filtered signal. The second filtered signal is the noise-processed signal of the magnetic flux leakage detection signal.

[0053] The noise processing method for magnetic flux leakage detection signals provided by this invention effectively filters out impulse noise in the magnetic flux leakage detection signals through median filtering based on absolute median difference. Furthermore, addressing the issue that median filtering still contains a small amount of unrelated power frequency interference and electromagnetic noise, wavelet denoising is further employed to adjust wavelet coefficients using a threshold function to filter out high-frequency noise in the signal. This reduces the problems of incomplete noise removal or signal distortion caused by traditional filtering methods, effectively suppressing impulse noise and high-frequency noise in the magnetic flux leakage detection signals, thereby significantly improving signal quality.

[0054] In a further step of the above method, the process of determining the absolute median difference of each original signal value within a preset filtering window is explained in detail below:

[0055] Determine the median and neighboring signal values ​​of the original signal value within a preset filtering window;

[0056] The median is subtracted from each neighboring signal value to obtain the absolute value of each difference;

[0057] The median of the absolute values ​​of each difference is taken as the absolute median difference of the original signal value within the preset filtering window.

[0058] It's important to note that filtering a digital signal requires sequentially filtering the sequence of original signal values. In median filtering, a window of odd length L is defined, where L = 2N + 1, and N is a positive integer. Let the signal samples within the window at a given moment be x(iN), ..., x(i), ..., x(i+N), where x(i) is the signal sample value located at the center of the window. After arranging these L signal sample values ​​in ascending order, the value at position i is defined as the output value of the median filter.

[0059] In this invention, the window size m of the filter is selected and adjusted appropriately to ensure that m is an odd number, and the value range of m is [5, 31].

[0060] Let the length of the original signal be n, and the value of the original signal to be processed be x[i], where 0 ≤ i ≤ n-1; when It is necessary to extend the signal to the left. A signal, when At this time, it is necessary to extend the signal to the right of the original signal. Given a signal, we use the symmetric extension method to extend the original signals at both ends. Let the signal value in the neighborhood of x[i] within the window corresponding to x[i] be x. i [j], where

[0061] Then calculate x respectively. i [j] and the median value of the signal within the corresponding window x med The absolute value of the difference between [i] is taken, and then the median of these absolute values ​​is taken as the absolute median difference x of the signal within the corresponding window. mad [i].

[0062] Furthermore, the process of filtering the magnetic flux leakage detection signal based on the original signal value, median, absolute median difference, and preset filtering rules to obtain the first filtered signal is explained as follows:

[0063] If the absolute value of the difference between the original signal value and the median is greater than or equal to the absolute median difference, then the median replaces the original signal value.

[0064] If the absolute value of the difference between the original signal value and the median is less than the absolute median difference, the original signal value is retained.

[0065] It should be noted that, in this invention, the following filtering rules can be used for judgment:

[0066]

[0067] Where x[i] is the i-th original signal value to be processed, x med [i] represents the median value of the signal within the window corresponding to the i-th original signal to be processed, x mad [i] represents the absolute median difference of the signals within the window corresponding to the i-th original signal to be processed, and abs() is the function for taking the absolute value.

[0068] Finally, the original signal is sequentially filtered using a sliding window method to obtain the first filtered signal y[n]. For example... Figure 4 and Figure 5 The figures shown are the waveforms and spectrum diagrams formed by the signal values ​​of the first filtered signal.

[0069] A further method described above mainly involves determining the wavelet coefficients using a preset threshold function, including:

[0070] The wavelet coefficients are determined using the following threshold function;

[0071] The threshold function includes:

[0072]

[0073] where l is the number of wavelet decomposition levels, w is the original wavelet coefficient, and w new is the wavelet coefficient determined by processing with the threshold function, k is the function adjustment variable, sgn(x) is the sign function, and its expression is:

[0074]

[0075] T takes the unbiased risk estimation threshold, and its value is:

[0076]

[0077] where S a is the a-th element of the estimation vector of the wavelet coefficient w, a is the subscript value corresponding to the smallest element in the risk vector R, where the estimation vector is the vector obtained by sorting the squared wavelet coefficients w from smallest to largest, N is the length of the estimation vector ; the q-th element of the risk vector R where S p and S q are the p-th element and the q-th element in the estimation vector R respectively, 1 << p << q << N.

[0078] where the estimation vector is obtained by sorting the squared original wavelet coefficients from smallest to largest, and the original wavelet coefficients are obtained by wavelet transforming the original signal values.

[0079] The threshold function introduces the decomposition level l and the variable k to adjust the magnitude of the wavelet coefficient w new . When |w| ≥ T, the value of the original wavelet coefficient is proportionally reduced by the decomposition level l to filter out high-frequency signals, where the value range of l is [1, 10]; when |w| < T, an appropriate k value is selected to ensure that w new takes a relatively small non-zero value, enabling the local characteristics of the signal to be retained during wavelet reconstruction, where the value range of k is [1, 50]. Processing the wavelet coefficients in this way makes the denoising effect relatively smooth and effectively weakens the distortion phenomenon of the reconstructed signal.

[0080] Then the adjusted wavelet coefficients are used to participate in the wavelet denoising process of the first filtered signal, thereby obtaining the second filtered signal. At this time, the second filtered signal is the signal after noise processing of the magnetic flux leakage detection signal. As Figure 6 and Figure 7 shown, they are respectively the waveform diagram and the spectrum diagram formed by each signal value on the second filtered signal.

[0081] The more layers of wavelet decomposition, the higher the frequency resolution, and the better the signal and noise components can be distinguished, which is more beneficial for denoising. However, if the number of decomposition layers is too large, more wavelet coefficients need to be retained when reconstructing the signal, which can easily lead to distortion of the reconstructed signal. For the magnetic flux leakage detection signal in this embodiment of the invention, wavelet decomposition with l=4 is used to ensure accuracy and reconstruction accuracy.

[0082] Figure 8 The graph shows the threshold function of the present invention as k takes different values, where x represents w and y represents w. new As shown in the figure, when the value of k is too small, the function curve fluctuates too much; when the value of k is too large, the function value approaches 0. In this invention, the value of k is set to 10.

[0083] In this invention, the "Root Mean Square Error (RMSE)," "Signal-to-Noise Ratio (SNR)," and "Noise Reduction Percentage (NRP)" are used as evaluation parameters, wherein:

[0084]

[0085]

[0086]

[0087] In the above formula, n is the signal length, and x[i] is the original signal. For the processed signal; P s P represents the power of the useful signal. n The signal-to-noise ratio (SNR) is the power of the noise signal; a higher SNR indicates a better signal filtering effect. x0[i] represents the noise signal before filtering, x1[i] represents the noise signal after filtering, T represents the time of a certain signal segment, and P... n0 P is the power of the noise signal before filtering. n1 The power of the filtered noise signal is NRP, which has a range of [0, 1]. The larger the noise reduction percentage, the greater the reduction in noise intensity and the better the filtering effect.

[0088] The evaluation parameters of the method proposed in this invention are compared with those of existing denoising methods, as shown in the table below:

[0089] parameter Median filtering Wavelet denoising Method of the present invention RMSE 47.2308 30.6133 14.3494 SNR 3.3833 7.1502 9.8576 NRP 1-5.6944e-4 1-9.4887e-6 1-8.8549e-7

[0090] As can be seen from the objective data in the table above, this invention reduces the root mean square error and improves the signal-to-noise ratio and noise attenuation percentage compared with other algorithms.

[0091] This invention processes the original signal using a median filtering method based on absolute median difference. While reducing signal phase distortion, it effectively suppresses impulse noise. For high-frequency noise, this invention introduces a decomposition layer number l and an adjustment variable k, improves the wavelet threshold function, achieves the filtering out of high-frequency noise, and can effectively reconstruct the local features of the leakage magnetic signal, thus ensuring signal quality.

[0092] The noise processing apparatus for magnetic flux leakage detection signals provided by the present invention will be described below. The noise processing apparatus for magnetic flux leakage detection signals described below can be referred to in correspondence with the noise processing method for magnetic flux leakage detection signals described above.

[0093] Figure 9 A flowchart illustrating a noise processing device for magnetic flux leakage detection signals provided by the present invention is shown below. Figure 9 The device includes an acquisition module 91, a first processing module, and a second processing module 93, wherein:

[0094] Acquisition module 91 is used to acquire the magnetic flux leakage detection signal, which includes multiple raw signal values;

[0095] The first processing module 92 is used to determine the median and absolute median difference of each original signal value within a preset filtering window, and to filter the leakage magnetic field detection signal according to the original signal value, median, absolute median difference and preset filtering rules to obtain the first filtered signal.

[0096] The second processing module 93 is used to determine the wavelet coefficients through a preset threshold function, and to perform wavelet denoising on the first filtered signal based on the wavelet coefficients to obtain the second filtered signal. The second filtered signal is the signal after noise processing of the leakage magnetic field detection signal.

[0097] In a further embodiment of the above-described apparatus, the first processing module, in the process of determining the absolute median difference corresponding to each original signal value within a preset filtering window, is specifically used for:

[0098] Determine the median and neighboring signal values ​​of the original signal value within a preset filtering window;

[0099] The median is subtracted from each neighboring signal value to obtain the absolute value of each difference;

[0100] The median of the absolute values ​​of each difference is taken as the absolute median difference of the original signal value within the preset filtering window.

[0101] In a further embodiment of the aforementioned apparatus, the first processing module, during the process of filtering the magnetic flux leakage detection signal according to the original signal value, median, absolute median difference, and preset filtering rules to obtain a first filtered signal, is specifically used for:

[0102] If the absolute value of the difference between the original signal value and the median is greater than or equal to the absolute median difference, then the median replaces the original signal value.

[0103] If the absolute value of the difference between the original signal value and the median is less than the absolute median difference, the original signal value is retained.

[0104] In a further embodiment of the above-described apparatus, the second processing module is specifically used for:

[0105] The wavelet coefficients are determined using the following threshold function;

[0106] Threshold functions include:

[0107]

[0108] Where l is the wavelet decomposition level, w is the original wavelet coefficient, and w new These are wavelet coefficients determined by a threshold function, where k is the function adjustment variable, and agn(x) is the sign function, expressed as:

[0109]

[0110] T is taken as the unbiased risk estimation threshold, and its value is:

[0111]

[0112] Among them, S a The estimated vector of wavelet coefficients w The a-th element in the vector R is where a is the index of the smallest element in the risk vector R, and the estimated vector is... This is the vector obtained by squaring the wavelet coefficients w and then sorting them in ascending order. N is the estimation vector The length of the risk vector R; the q-th element of the risk vector R. Where S p and S q Let p and q be the p-th and q-th elements in the estimated vector R, respectively, where 1 << p << q << N.

[0113] Since the device described in this embodiment of the invention is based on the same principle as the method described in the above embodiments, more detailed explanations will not be repeated here.

[0114] It should be noted that, in the embodiments of the present invention, the relevant functional modules can be implemented by a hardware processor.

[0115] The noise processing method for magnetic flux leakage detection signals provided by this invention effectively filters out impulse noise in the magnetic flux leakage detection signals through median filtering based on absolute median difference. Furthermore, addressing the issue that median filtering still contains a small amount of unrelated power frequency interference and electromagnetic noise, wavelet denoising is further employed to adjust wavelet coefficients using a threshold function to filter out high-frequency noise in the signal. This reduces the problems of incomplete noise removal or signal distortion caused by traditional filtering methods, effectively suppressing impulse noise and high-frequency noise in the magnetic flux leakage detection signals, thereby significantly improving signal quality.

[0116] Figure 10 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 10 As shown, the electronic device may include a processor 101, a communication interface 102, a memory 103, and a communication bus 104, wherein the processor 101, the communication interface 102, and the memory 103 communicate with each other via the communication bus 104. The processor 101 can call a computer program in the memory 103 to execute the steps of a noise processing method for the magnetic flux leakage detection signal, such as: acquiring the magnetic flux leakage detection signal, which includes multiple original signal values; determining the median and absolute median difference of each original signal value within a preset filtering window; filtering the magnetic flux leakage detection signal according to the original signal values, median, absolute median difference, and preset filtering rules to obtain a first filtered signal; determining wavelet coefficients through a preset threshold function; and performing wavelet denoising on the first filtered signal according to the wavelet coefficients to obtain a second filtered signal, which is the magnetic flux leakage detection signal after noise processing.

[0117] Furthermore, the logical instructions in the aforementioned memory 103 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0118] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer is able to perform the steps of a noise processing method for a magnetic flux leakage detection signal, for example including: acquiring a magnetic flux leakage detection signal, the magnetic flux leakage detection signal comprising multiple original signal values; determining the median and absolute median difference corresponding to each original signal value within a preset filtering window; filtering the magnetic flux leakage detection signal according to the original signal values, median, absolute median difference and preset filtering rules to obtain a first filtered signal; determining wavelet coefficients through a preset threshold function; performing wavelet denoising on the first filtered signal according to the wavelet coefficients to obtain a second filtered signal, the second filtered signal being the signal of the magnetic flux leakage detection signal after noise processing.

[0119] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program. The computer program is used to cause the processor to execute steps of a noise processing method for a magnetic flux leakage detection signal, such as: acquiring a magnetic flux leakage detection signal, the magnetic flux leakage detection signal including multiple raw signal values; determining the median and absolute median difference corresponding to each raw signal value within a preset filtering window; filtering the magnetic flux leakage detection signal according to the raw signal values, median, absolute median difference, and preset filtering rules to obtain a first filtered signal; determining wavelet coefficients through a preset threshold function; performing wavelet denoising on the first filtered signal according to the wavelet coefficients to obtain a second filtered signal, the second filtered signal being the noise-processed signal of the magnetic flux leakage detection signal.

[0120] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0121] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0122] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A noise processing method for magnetic flux leakage detection signals, characterized in that, include: Acquire a magnetic flux leakage detection signal, which includes multiple raw signal values; The median and absolute median difference of each of the original signal values ​​are determined within a preset filtering window. The leakage magnetic field detection signal is then filtered according to the original signal value, the median, the absolute median difference, and the preset filtering rules to obtain a first filtered signal. Wavelet coefficients are determined by a preset threshold function, and wavelet denoising is performed on the first filtered signal based on the wavelet coefficients to obtain a second filtered signal. The second filtered signal is the signal of the magnetic flux leakage detection signal after noise processing. Determining the absolute median difference of each of the original signal values ​​within a preset filtering window includes: Determine the median and neighboring signal values ​​of the original signal value within a preset filtering window; The median is subtracted from each of the neighboring signal values ​​to obtain the absolute value of each difference; The median of the absolute values ​​of each difference is taken as the absolute median difference of the original signal value within a preset filtering window; The step of filtering the magnetic flux leakage detection signal according to the original signal value, the median, the absolute median difference, and a preset filtering rule to obtain a first filtered signal includes: If the absolute value of the difference between the original signal value and the median is greater than or equal to the absolute median difference, then the median replaces the original signal value. If the absolute value of the difference between the original signal value and the median is less than the absolute median difference, then the original signal value is retained. The step of determining wavelet coefficients through a preset threshold function includes: The wavelet coefficients are determined using the following threshold function; Threshold functions include: ; in, It is the wavelet decomposition level. These are the original wavelet coefficients. These are wavelet coefficients determined through threshold function processing. It is a function regulating variable. It is a symbolic function, and its expression is: ; The threshold for unbiased risk estimation is: ; in, Wavelet coefficients The estimated vector The first in One element, Risk vector The index value corresponding to the smallest element in the vector, where the estimated vector is... To make wavelet coefficients The vector obtained by squaring the vector and then sorting it in ascending order. , For estimating vectors Length of risk vector The element ,in and These are the estimated vectors. The first in The element and the first One element, .

2. A noise processing device for magnetic flux leakage detection signals, characterized in that, include: The acquisition module is used to acquire the magnetic flux leakage detection signal, which includes multiple raw signal values; The first processing module is used to determine the median and absolute median difference of each of the original signal values ​​within a preset filtering window, and to filter the magnetic flux leakage detection signal according to the original signal value, the median, the absolute median difference and the preset filtering rules to obtain a first filtered signal. The second processing module is used to determine wavelet coefficients through a preset threshold function, and to perform wavelet denoising on the first filtered signal according to the wavelet coefficients to obtain a second filtered signal, wherein the second filtered signal is the signal of the magnetic flux leakage detection signal after noise processing. In the process of determining the absolute median difference of each of the original signal values ​​within a preset filtering window, the first processing module is specifically used for: Determine the median and neighboring signal values ​​of the original signal value within a preset filtering window; The median is subtracted from each of the neighboring signal values ​​to obtain the absolute value of each difference; The median of the absolute values ​​of each difference is taken as the absolute median difference of the original signal value within a preset filtering window; In the process of filtering the magnetic flux leakage detection signal according to the original signal value, the median, the absolute median difference, and the preset filtering rules to obtain the first filtered signal, the first processing module is specifically used for: If the absolute value of the difference between the original signal value and the median is greater than or equal to the absolute median difference, then the median replaces the original signal value. If the absolute value of the difference between the original signal value and the median is less than the absolute median difference, then the original signal value is retained. The second processing module is specifically used for: The wavelet coefficients are determined using the following threshold function; Threshold functions include: ; in, It is the wavelet decomposition level. These are the original wavelet coefficients. These are wavelet coefficients determined through threshold function processing. It is a function regulating variable. It is a symbolic function, and its expression is: ; The threshold for unbiased risk estimation is: ; in, Wavelet coefficients The estimated vector The first in One element, Risk vector The index value corresponding to the smallest element in the vector, where the estimated vector is... To make wavelet coefficients The vector obtained by squaring the vector and then sorting it in ascending order. , For estimating vectors Length of risk vector The element ,in and These are the estimated vectors. The first in The element and the first One element, .

3. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the noise processing method for the magnetic flux leakage detection signal as described in claim 1.

4. A processor-readable storage medium, characterized in that, The processor-readable storage medium stores a computer program for causing the processor to perform the steps of the noise processing method for the magnetic flux leakage detection signal of claim 1.

Citation Information

Patent Citations

  • Electromagnetic valve on-off state judgment method and device

    CN110926798A

  • Improved adaptive wavelet threshold signal denoising method

    CN113505688A