Non-white noise denoising method and device, electronic equipment and storage medium
By acquiring and analyzing the noise characteristics of the signal, using wavelet transformation and adaptive processing technology, the existing denoising method is solved to solve the problem that the noise frequency is similar to the signal frequency, and efficient signal denoising is achieved.
Patent Information
- Application Number
- CN202311008931.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2025-02-18
AI Technical Summary
The existing denoising methods are difficult to effectively remove high-energy main frequency noise with noise frequency similar to the effective signal frequency.
By obtaining the pure background noise segment and mixed signal segment of the signal, the noise main frequency is determined, and wavelet transformation and adaptive processing technology are used to remove high-energy main frequency noise in the mixed signal.
Effective removal of high-energy main frequency noise and noise similar to the main frequency of the effective signal is achieved, and the signal-to-noise ratio is improved.
Smart Images

Figure CN119474651A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal denoising algorithms, and in particular to a non-white noise denoising method, device, electronic device and storage medium. Background Art
[0002] In the field of signal acquisition, such as during seismic acquisition, due to the influence of the natural and human environment and the weak instantaneous excitation energy of the controllable vibrator, the original seismic data collected by the seismic node instrument is mixed with various types of noise such as white noise and impulse noise. The existing denoising method is based on mixed signals and uses various methods and techniques to remove high-frequency noise to maximize the signal-to-noise ratio. Existing methods such as bandpass filtering determine the effective frequency band of the signal by analyzing the mixed signal and retain the information of the effective frequency band to achieve the purpose of denoising. It is suitable for processing mixed signals when the difference between the noise frequency and the effective signal frequency is large. When the noise is a high-energy main frequency or is not much different from the main frequency band of the effective signal, it is difficult for existing denoising methods to separate the mixed signal from the noise. Summary of the invention
[0003] In order to solve the above problems, the present application provides a non-white noise denoising method, device, electronic device and storage medium.
[0004] The present application provides a non-white noise denoising method, the method comprising:
[0005] Acquire pure background noise segments and mixed signal segments of the signal;
[0006] Determining the noise dominant frequency of the pure background noise segment;
[0007] Performing wavelet transform on the mixed signal segment to obtain a first wavelet coefficient matrix;
[0008] Determining a first scale position of the noise main frequency in the first wavelet coefficient matrix;
[0009] Taking the first scale position as the center, searching for a second scale position corresponding to a maximum wavelet coefficient modulus value within a first set window length at each discrete time point of the first wavelet coefficient matrix;
[0010] Taking the second scale position as the center and the second set window length as the noise processing frequency band range, adaptively processing the wavelet coefficients according to the wavelet coefficient modulus value of the position to be processed to obtain a second wavelet coefficient matrix;
[0011] Perform inverse wavelet transform on the second wavelet coefficient matrix to obtain a reconstructed target signal.
[0012] In some embodiments, the method of acquiring a pure background noise segment and a mixed signal segment of a signal includes:
[0013] Taking the arrival time of the signal excited by the controllable vibrator as the boundary, the signal before the arrival time is collected as the pure background noise segment, and the signal after the arrival time is collected as the mixed signal segment.
[0014] In some embodiments, determining the noise main frequency of the pure background noise segment includes:
[0015] Performing a fast Fourier transform on the pure background noise segment to obtain a Fourier transform result;
[0016] Get the maximum value of the complex modulus value of the Fourier transform result;
[0017] The main frequency of the noise is calculated based on the maximum value of the complex modulus value, the sampling signal frequency of the fast Fourier transform, and the number of sampling points.
[0018] In some embodiments, performing a wavelet transform on the mixed signal segment to obtain a first wavelet coefficient matrix includes:
[0019] Performing wavelet transform on the mixed signal segment by wavelet basis function to obtain the wavelet transform expression in time domain;
[0020] Converting the wavelet transform expression in the time domain into the wavelet transform expression in the frequency domain;
[0021] The conjugate of the wavelet transform in the frequency domain expression is calculated for each discrete value of the scale factor with respect to the angular frequency at [0,2π], to obtain a matrix of the scale sequence of the wavelet basis function with respect to the scale factor;
[0022] Each row of the matrix is multiplied by the Fourier transform result of the mixed signal to obtain a first wavelet coefficient matrix.
[0023] In some embodiments, determining a first scale position of the main frequency of the noise in the first wavelet coefficient matrix includes:
[0024] Obtain the relationship between the scale factor of the wavelet basis function, the wavelet center frequency and the signal frequency;
[0025] Substitute the main frequency of the noise into the relationship as the signal frequency, and calculate the scale position of the main frequency of the noise in the first wavelet transform matrix.
[0026] An embodiment of the present application provides a non-white noise denoising device, the device comprising:
[0027] An acquisition module, used for acquiring a pure background noise segment and a mixed signal segment of a signal;
[0028] A first determination module, used to determine the noise main frequency of the pure background noise segment;
[0029] A wavelet transform module, used for performing wavelet transform on the mixed signal segment to obtain a first wavelet coefficient matrix;
[0030] A second determination module, used to determine a first scale position of the noise main frequency in the first wavelet coefficient matrix;
[0031] A search module, configured to search for a second scale position corresponding to a maximum wavelet coefficient modulus value within a first set window length at each discrete time point of the first wavelet coefficient matrix with the first scale position as the center;
[0032] An adaptive processing module, used to adaptively process the wavelet coefficients according to the wavelet coefficient modulus value at the position to be processed, with the second scale position as the center and the second set window length as the noise processing frequency band range, to obtain a second wavelet coefficient matrix;
[0033] The inverse wavelet transform module is used to perform an inverse wavelet transform on the second wavelet coefficient matrix to obtain a reconstructed target signal.
[0034] In some embodiments, the first determining module includes:
[0035] A fast Fourier transform unit, used for performing a fast Fourier transform on the pure background noise segment to obtain a Fourier transform result;
[0036] A first acquisition unit, used to acquire the maximum value of the complex modulus value of the Fourier transform result;
[0037] The first calculation unit is used to calculate the noise main frequency according to the maximum value of the complex modulus value and the sampling signal frequency and sampling point number of the fast Fourier transform.
[0038] In some embodiments, the wavelet transform module comprises:
[0039] A wavelet transform unit, used for performing wavelet transform on the mixed signal segment through a wavelet basis function to obtain an expression of the wavelet transform in the time domain;
[0040] A conversion unit, used for converting the wavelet transform expression in the time domain into a wavelet transform expression in the frequency domain;
[0041] A second calculation unit is used to calculate the conjugate of the wavelet transform in the frequency domain expression for each discrete value of the scale factor with respect to the angular frequency at [0, 2π], to obtain a matrix of the scale sequence of the wavelet basis function with respect to the scale factor;
[0042] The point multiplication unit is used to perform point multiplication on each row of the matrix and the Fourier transform result of the mixed signal to obtain a first wavelet coefficient matrix.
[0043] An embodiment of the present application provides an electronic device, including: a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, any one of the above-mentioned methods is executed.
[0044] An embodiment of the present application provides a storage medium, which stores a computer program that can be executed by one or more processors and can be used to implement any of the methods described above.
[0045] The present application provides a non-white noise denoising method, device, electronic device and storage medium, which obtain a pure background noise segment and a mixed signal segment of a signal; determine the noise main frequency of the pure background noise segment; perform wavelet transform on the mixed signal segment to obtain a first wavelet coefficient matrix; determine the first scale position of the noise main frequency in the first wavelet coefficient matrix; take the first scale position as the center, search for the second scale position corresponding to the maximum wavelet coefficient modulus value within a first set window length at each discrete time point in the first wavelet coefficient matrix; determine the noise main frequency according to the pure background noise segment, and thus obtain the first wavelet coefficient matrix of the noise main frequency in the mixed signal segment through the noise main frequency. The second scale position in the transformation coefficient matrix; taking the second scale position as the center and the second set window length as the noise processing frequency band range, adaptively processing the wavelet coefficients according to the wavelet coefficient modulus values at the position to be processed to obtain a second wavelet coefficient matrix; performing inverse wavelet transform on the second wavelet coefficient matrix to obtain a reconstructed target signal; adaptively processing the wavelet coefficients by performing adaptive processing on the wavelet coefficient modulus values corresponding to the second scale position in the first wavelet transformation coefficient matrix to obtain a second wavelet transformation coefficient matrix, and performing inverse wavelet transform on the second wavelet transformation coefficient matrix, thereby removing the high-energy main frequency of the mixed signal and the noise close to the main frequency of the effective signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Hereinafter, the present application will be described in more detail based on embodiments and with reference to the accompanying drawings.
[0047] Figure 1 A schematic diagram of a process for denoising non-white noise provided in an embodiment of the present application;
[0048] Figure 2 It is the Fourier transform spectrum diagram of the mixed signal, original signal and pure background noise segment;
[0049] Figure 3 It is the wavelet transform time-frequency diagram of the mixed signal segment;
[0050] Figure 4 It is the time-frequency diagram of the mixed signal segment after adaptive processing;
[0051] Figure 5 It is a timing comparison diagram of the original signal, mixed signal segment and target signal;
[0052] Figure 6 A schematic diagram of the structure of a non-white noise denoising device provided in an embodiment of the present application;
[0053] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0055] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0056] If similar descriptions of "first\second\third" appear in the application documents, the following instructions will be added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0058] Embodiment 1
[0059] Based on the problems existing in the related art, the embodiments of the present application provide a non-white noise denoising method, which is applied to an electronic device, and the electronic device may be a mobile terminal, a tablet computer, etc. The function implemented by the non-white noise denoising method provided in the embodiments of the present application can be implemented by calling a program code by a processor of the electronic device, wherein the program code can be stored in a computer storage medium.
[0060] The present application embodiment provides a non-white noise denoising method, such as Figure 1 As shown, Figure 1 A flowchart of a non-white noise denoising method provided in an embodiment of the present application is provided, wherein the method comprises:
[0061] Step S1: obtaining a pure background noise segment and a mixed signal segment of a signal;
[0062] In some embodiments, the method of acquiring a pure background noise segment and a mixed signal segment of a signal includes:
[0063] Taking the arrival time of the signal excited by the controllable vibrator as the boundary, the signal before the arrival time is collected as the pure background noise segment, and the signal after the arrival time is collected as the mixed signal segment.
[0064] In an embodiment of the present application, the pure background noise segment can be recorded as Noise, and the mixed signal segment can be recorded as x(t). The pure background noise segment Noise and the mixed signal segment x(t) of the signal can be obtained through a signal acquisition device. The acquisition device can use a detector to obtain the pure background noise segment Noise and the mixed signal segment x(t) of the signal through the detector.
[0065] Step S2: determining the noise main frequency of the pure background noise segment;
[0066] In the embodiment of the present application, the noise main frequency of the pure background noise segment can be determined by performing a fast Fourier transform on the pure background noise segment. Specifically, the pure background noise segment is subjected to a fast Fourier transform to obtain a Fourier transform result Fft Noise , the noise main frequency f Noise =k Noise f s / N, where f s The fast Fourier transform sampling signal frequency is f s , N is the number of sampling points, k Noise = argmax(abs(Fft Noise )), the function argmax() means returning the index corresponding to the maximum value, and the function abs() means taking the complex modulus value.
[0067] Step S3: performing wavelet transform on the mixed signal segment to obtain a first wavelet coefficient matrix;
[0068] In the embodiment of the present application, the complex Morlet wavelet basis is selected as the wavelet basis function The scale factor a of wavelet basis transform i =2 i / Nv , where the scale factor a i The sequence is denoted as a={a i}, i = 1, 2, ..., J, J = L * Nv, where, Nv is the possible value of the scale, n is the signal length, and the wavelet transform expression in the time domain is:
[0069]
[0070] In the formula, '-' represents the function taking conjugate; W(a i , b j ) can be abbreviated as W i,j , represents the wavelet coefficient at the jth time point under the i-th scale factor; x(t) is the mixed signal segment; t is the sampling time; b j is the time shift factor.
[0071] In the embodiment of the present application, the calculation principle of the wavelet transform in the time domain is the convolution of the signal with the wavelet function under each scale factor, so the calculation principle of the transformation to the frequency domain is the direct product of the Fourier transform result of the signal and the conjugate of the wavelet transform frequency domain expression with the scale factor. The conversion in the frequency domain will be more efficient than the convolution calculation in the time domain. Therefore, the wavelet transform time domain expression can be transformed into a wavelet transform frequency domain expression, and the Fourier transform of the mixed signal x(t) is recorded as X(ω), and the conjugate of the wavelet function frequency domain expression with the scale factor is calculated for each scale factor with respect to the angular frequency ω at [0, 2π] discrete values, and a matrix A of a sequence a of a wavelet function with respect to the scale factor is obtained. According to the Fourier transform theory, the time domain convolution of two functions is equal to the product of the corresponding functions in the frequency domain. Each row of the matrix A is multiplied by X(ω) to obtain the first wavelet coefficient matrix W1.
[0072] Step S4: determining a first scale position of the noise main frequency in the first wavelet coefficient matrix;
[0073] In the embodiment of the present application, the scale factor a of the wavelet basis function can be i , wavelet center frequency F c With the signal frequency F a Specifically, the scale factor a of the wavelet basis function is obtained. i , wavelet center frequency F c With the signal frequency F a The relationship F a =F c ×f s / a i , the noise main frequency f Noise As the signal frequency F a Substitute into the relationship and calculate the noise main frequency f Noise At the first scale position i in the first wavelet coefficient matrix W1:
[0074]
[0075] Step S5: taking the first scale position as the center, searching for a second scale position corresponding to the maximum wavelet coefficient modulus value within the first set window length at each discrete time point of the first wavelet coefficient matrix;
[0076] In an embodiment of the present application, with the first scale position i as the center, the second scale position i0 corresponding to the maximum wavelet coefficient modulus value within the first set window length is searched at each discrete time point of the first wavelet coefficient matrix W1, so that the second scale position i0 is used as the position center of the adaptive processing.
[0077] Step S6: taking the second scale position as the center and the second set window length as the noise processing frequency band range, adaptively processing the wavelet coefficients according to the wavelet coefficient modulus value of the position to be processed to obtain a second wavelet coefficient matrix;
[0078] In an embodiment of the present application, the second scale position i0 is taken as the center and the second set window length is used as the noise processing frequency band range to determine the range of adaptive processing, and the wavelet coefficient modulus value of the to-be-processed position within the noise processing frequency band is adaptively processed, which can remove high-energy low-frequency noise close to the main frequency of the effective signal and obtain the second wavelet coefficient matrix W2.
[0079] Step S7: performing inverse wavelet transform on the second wavelet coefficient matrix to obtain a reconstructed target signal.
[0080] In the embodiment of the present application, the second wavelet coefficient matrix W2 is subjected to an inverse wavelet transform to obtain an expression of the reconstructed target signal:
[0081]
[0082] Where x′={x′(1), x′(2), ..., x′(n)} is the reconstructed target signal sequence, n is the original signal length, and W i,j A represents the wavelet coefficient at the jth time point under the i-th scale factor, that is, the i-th row and j-th column element of the matrix W; ij is the element in the i-th row and j-th column of the matrix A defined in the previous section; a i is the i-th scale factor defined in the previous section.
[0083] In summary, the present application can determine the main frequency of noise according to the pure background noise segment, and thus obtain the second scale position of the main frequency of noise in the first wavelet transform coefficient matrix of the mixed signal segment through the main frequency of noise; obtain the second wavelet transform coefficient matrix by adaptively processing the wavelet coefficient modulus corresponding to the second scale position in the first wavelet transform coefficient matrix, and perform inverse wavelet transform on the second wavelet transform coefficient matrix, so as to remove the high-energy main frequency of the mixed signal and the noise close to the main frequency of the effective signal.
[0084] In some embodiments, determining the noise main frequency of the pure background noise segment includes:
[0085] Step S21: performing fast Fourier transform on the pure background noise segment to obtain a Fourier transform result;
[0086] In the embodiment of the present application, a fast Fourier transform is performed on the pure background noise segment to obtain a Fourier transform result Fft Noise .
[0087] Step S22: Obtain the maximum value of the complex modulus value of the Fourier transform result;
[0088] In the embodiment of the present application, the maximum value k of the complex modulus is Noise = argmax(abs(Fft Noise )), the function argmax() means returning the index corresponding to the maximum value, and the function abs() means taking the complex modulus value.
[0089] Step S23: Calculate the main frequency of the noise according to the maximum value of the complex modulus value and the sampling signal frequency and sampling point number of the fast Fourier transform.
[0090] In the embodiment of the present application, the noise main frequency f Noise =k Noise f s / N, where f s The fast Fourier transform sampling signal frequency is f s , N is the number of sampling points.
[0091] In some embodiments, performing a wavelet transform on the mixed signal segment to obtain a first wavelet coefficient matrix includes:
[0092] Step S31: performing wavelet transform on the mixed signal segment through wavelet basis function to obtain the wavelet transform expression in the time domain;
[0093] In the embodiment of the present application, the wavelet transform is expressed in the time domain as:
[0094]
[0095] In the formula, '-' represents the function taking conjugate; W(a i , b j ) is abbreviated as W i,j , represents the wavelet coefficient at the jth time point under the i-th scale factor; b j is the time shift factor.
[0096] Step S32: converting the wavelet transform expression in the time domain into a wavelet transform expression in the frequency domain;
[0097] In the embodiments of the present application, the calculation principle of the wavelet transform in the time domain is the convolution of the signal with the wavelet function at each scale factor. Therefore, the calculation principle of the transformation to the frequency domain is the conjugate direct product of the Fourier transform result of the signal and the wavelet transform frequency domain expression with the scale factor. The conversion calculation in the frequency domain will be more efficient than the convolution calculation in the time domain.
[0098] Step S33: Calculate the conjugate of the wavelet transform in the frequency domain expression for each discrete value of the scale factor with respect to the angular frequency at [0, 2π], and obtain a matrix of the scale sequence of the wavelet basis function with respect to the scale factor;
[0099] In the embodiments of the present application, it can be known from Fourier transform theory that the time domain convolution of two functions is equal to the product of the corresponding functions in the frequency domain. Therefore, the conjugate of the wavelet transform expression in the frequency domain is calculated for each discrete value of the scale factor with respect to the angular frequency in [0,2π] to obtain a matrix of the scale sequence of the wavelet basis function with respect to the scale factor.
[0100] Step S34: perform dot multiplication on each row of the matrix and the Fourier transform result of the mixed signal to obtain a first wavelet coefficient matrix.
[0101] In some embodiments, determining a first scale position of the main frequency of the noise in the first wavelet coefficient matrix includes:
[0102] Step S41: Obtain the relationship between the scale factor of the wavelet basis function, the wavelet center frequency and the signal frequency;
[0103] In the embodiment of the present application, the relationship between the scale factor of the wavelet basis function, the wavelet center frequency and the signal frequency is: a =F c ×f s / a i , a i is the scale factor of the wavelet basis function, F c is the wavelet center frequency, F a is the signal frequency. The relation is a pre-established function, which can be directly called.
[0104] Step S42: Substitute the main frequency of the noise into the relationship as the signal frequency, and calculate the scale position of the main frequency of the noise in the first wavelet transform matrix.
[0105] Embodiment 2
[0106] Based on the problems existing in the related art, the embodiments of the present application provide a non-white noise denoising method, which is applied to an electronic device, and the electronic device may be a mobile terminal, a tablet computer, etc. The function implemented by the non-white noise denoising method provided in the embodiments of the present application can be implemented by calling a program code by a processor of the electronic device, wherein the program code can be stored in a computer storage medium.
[0107] The present invention provides a non-white noise denoising method, the method comprising:
[0108] Taking the arrival time of the signal excited by the vibrator as the boundary, the pure background noise segment Noise and the mixed signal segment x(t) of the signal are obtained respectively, and then the following steps are performed:
[0109] 1) Perform fast Fourier transform on the pure background noise segment Noise to obtain the main frequency of the noise;
[0110] 2) Perform wavelet transform on the mixed signal segment x(t) to obtain the first wavelet coefficient matrix;
[0111] 3) using the scale factor of the wavelet basis function in the wavelet transform, the relationship between the wavelet center frequency and the signal frequency, the first scale position of the noise main frequency in the first wavelet coefficient matrix in step 2) is calculated;
[0112] 4) With the first scale position obtained by mapping the noise main frequency in step 3) as the center, search for the second scale position corresponding to the maximum wavelet coefficient modulus within the set window length at each discrete time point of the wavelet transform, and then with the second scale position as the center and the set window length as the noise processing frequency band range, adaptively process the wavelet coefficients using the wavelet coefficient modulus size of the position to be processed to obtain a second wavelet coefficient matrix;
[0113] 5) Performing an inverse wavelet transform on the second wavelet coefficient matrix obtained in step 4) to obtain a reconstructed target signal, that is, a signal with noise removed.
[0114] Specifically, step 1) performs fast Fourier transform on the pure background noise segment Noise to obtain the main frequency of the noise, including the following steps:
[0115] Assume that the frequency of the fast Fourier transform sampling signal is f s , the number of sampling points is N, and the Fourier transform result is Fft Noise , then the noise main frequency f Noise =k Noise f s / N, where k Noise = argmax(abs(Fft Noise )), where the function argmax() means returning the index corresponding to the maximum value, and the function abs() means taking the complex modulus value.
[0116] Step 2) performing wavelet transform on the mixed signal segment x(t) to obtain the first wavelet coefficient matrix, including the following steps:
[0117] 2.1) Select the complex Morlet wavelet basis as the wavelet basis function I is the imaginary unit, ω0 is the central angular frequency of the wavelet, t is the sampling time, and the scale factor a of the wavelet basis function is i =2 i / Nv , the corresponding sequence of scaling factors is denoted as a = {a i}, i = 1, 2, ..., J, J = L * Nv, where Nv is the scale and can be 32, x(t) is the mixed signal sequence, n is the signal length, and the wavelet transform expression in the time domain is:
[0118]
[0119] In the formula, '-' represents the function taking conjugate; W(a i , b j ) is abbreviated as W i,j , represents the wavelet coefficient at the jth time point under the i-th scale factor; b j is the time shift factor.
[0120] 2.2) The calculation principle of wavelet transform in time domain is the convolution of signal with wavelet function under each scale factor. Therefore, the calculation principle of transforming to frequency domain is the conjugate direct product of Fourier transform result of signal and frequency domain expression of wavelet transform with scale factor. The calculation efficiency of transforming in frequency domain will be higher than that of convolution in time domain. The specific theory and operation are as follows:
[0121] The Fourier transform of the mixed signal x(t) is X(ω):
[0122] X(ω)=∫x(t)e -Iωt dt;
[0123] Where ω represents the angular frequency, I is the imaginary unit, and t is the sampling time.
[0124] The inner product of the functions f(τ) and g(τ) is:
[0125]
[0126] Among them, '<>' represents the inner product of two functions, and '-' represents the conjugate of the function; the convolution of function f(τ) and g(τ) is:
[0127] f(τ)*g(τ)=∫f(t)g(τ-t)dt;
[0128] Where '*' represents the convolution symbol of the function, which is defined by the inner product and convolution of the function. Formula (1) is equivalent to:
[0129]
[0130] Wavelet basis functions The Fourier transform of According to the theory of function flipping and conjugation in Fourier transform, The Fourier transform of This formula is calculated for each discrete value of scale factor with respect to ω in [0, 2π], and a matrix A of a wavelet function with respect to the sequence a of scale factors is obtained. According to Fourier transform theory, the time domain convolution of two functions is equal to the product of the corresponding functions in the frequency domain. Therefore, the calculation of the expression equivalent to the frequency domain on the left side of formula (2) is equivalent to the dot multiplication of each row of matrix A with X(ω), that is, the first wavelet coefficient matrix W1 is obtained.
[0131] Step 3) using the scale factor of the wavelet basis function in the wavelet transform, the relationship between the wavelet center frequency and the signal frequency, calculates the first scale position of the noise main frequency in the first wavelet coefficient matrix in step 2), comprising the following steps:
[0132] 3.1) Scale factor a of wavelet basis function i , wavelet center frequency F c With the signal frequency F a The relationship is:
[0133] F a =F c ×f s / a i ;
[0134] 3.2) According to the relationship in step 3.1), substitute the noise main frequency f Noise Calculate the first scale position in the first wavelet coefficient matrix in step 2), that is, find the approximate scale position:
[0135]
[0136] Step 4) takes the first scale position obtained by the noise main frequency mapping in step 3) as the center, searches for the second scale position corresponding to the maximum wavelet coefficient modulus within the set window length range at each discrete time point of the wavelet transform, and then takes the second scale position as the center, takes the set window length as the noise processing frequency band range, and uses the wavelet coefficient modulus value size of the position to be processed to adaptively process the wavelet coefficient to obtain a second wavelet coefficient matrix, which specifically includes the following steps:
[0137] 4.1) From step 3), the first scale position i of the noise main frequency in the wavelet transform is obtained. Let the half-window width of searching for the maximum modulus value of the wavelet coefficient at each time point be L1, and the half-window width of the noise processing bandwidth (mapped to scale is the scale range) be L2;
[0138] 4.2) For time t j , j = 1, ..., n, assuming that in the wavelet coefficient sequence {W i-L1, j,...,W i,j , ..., W i+L1,j} The second scale position corresponding to the maximum modulus value is searched to be i0, where i0 is a value in {i-L1, ..., i, ..., i+L1};
[0139] 4.3) Centered on the second scale position i0, is the wavelet coefficient, for the wavelet coefficient Perform adaptive processing to obtain the second wavelet coefficient matrix W2, where the adaptive processing is as follows:
[0140]
[0141] Where, W′. j is the wavelet coefficient after adaptive processing, W., j is the wavelet coefficient before adaptive processing, is the coefficient Modulus value, is the wavelet coefficient W for adaptive processing, j The wavelet coefficients of the previous row, |W., j | for W., j The modulus value,
[0142] Step 5) The second wavelet coefficient matrix obtained in step 4) is subjected to inverse wavelet transform to obtain a reconstructed target signal, that is, a signal with noise removed, as follows:
[0143] The second wavelet coefficient matrix W2 obtained after the adaptive processing in step 4) is subjected to inverse wavelet transform to obtain a reconstructed signal with noise removed:
[0144]
[0145] Where x′={x′(1), x′(2), ..., x′(n)} is the reconstructed signal sequence, n is the length of the original signal, and W i,j A represents the wavelet coefficient at the jth time point under the i-th scale factor, that is, the i-th row and j-th column element of the second wavelet coefficient matrix W2; ij is the element in the i-th row and column of the matrix A defined in the previous section; a iis the i-th scale factor defined in the previous section.
[0146] In summary, the present invention uses the background noise before the arrival of the seismic signal as prior information, analyzes and obtains the main frequency of the noise, and utilizes the correspondence between frequency, scale and center frequency in wavelet transform to obtain the second scale position of the main frequency of the noise in the first wavelet transform coefficient matrix of the mixed signal segment. Then, adaptive processing is performed based on the wavelet transform coefficient of the noise in the mixed signal end, thereby achieving the removal of high-energy low-frequency noise that is close to the main frequency of the effective signal.
[0147] Embodiment 3
[0148] Based on the problems existing in the related art, the embodiments of the present application provide a non-white noise denoising method, which is applied to an electronic device, and the electronic device may be a mobile terminal, a tablet computer, etc. The function implemented by the non-white noise denoising method provided in the embodiments of the present application can be implemented by calling a program code by a processor of the electronic device, wherein the program code can be stored in a computer storage medium.
[0149] The present invention provides a non-white noise denoising method, the method comprising:
[0150] In order to scientifically demonstrate the denoising effect of this method, two segments of signals are used to synthesize a mixed signal segment. The original two segments of signals are the noise-free original signal segment and the pure background noise signal segment. Here, a real seismic signal with white noise and impulse noise removed is taken as the noise-free original signal segment x0(t), with a length of n=1000 and a total time length of 1s; among which, the pure background noise signal Noise=10*cos(15*π*t); the mixed signal x(t)=x0(t)+Noise.
[0151] Step 1) Perform fast Fourier transform on the pure background noise signal segment Noise to obtain the main frequency of the noise:
[0152] Assume that the frequency of the fast Fourier transform sampling signal is f s =1000, the number of sampling points is N=1000, and the Fourier transform result is Fft Noise ,like Figure 2 As shown, Figure 2 is the Fourier transform spectrum of the mixed signal, original signal and pure background noise segment. The main frequency of the noise is f Noise =9.
[0153] Step 2) Perform wavelet transform on the mixed signal segment to obtain the first wavelet coefficient matrix:
[0154] 2.1) Select the complex Morlet wavelet basis as the wavelet basis function I is the imaginary unit, ω0 is the central angular frequency of the wavelet, t is the time, and the scale factor a of the wavelet basis transformation isi =2 i / Nv , the corresponding sequence of scaling factors is denoted as a = {a i}, i = 1, 2, ..., J, J = L * Nv, where N v =32. The wavelet transform expression in the time domain is:
[0155]
[0156] In the formula, * represents the function taking conjugate;
[0157] 2.2) Let the Fourier transform of the mixed signal segment x(t) be X(ω), and the conjugate of the frequency domain expression of the scaled wavelet function is calculated for each discrete value of the scale factor about ω in [0, 2π], and a matrix A of a wavelet function about the scale sequence a is obtained. Each row of the matrix is multiplied by the previous X(ω) to obtain the first wavelet coefficient matrix W1. After the mixed signal segment is subjected to wavelet transform, Figure 3 As shown, Figure 3 It is the wavelet transform time-frequency diagram of the mixed signal segment.
[0158] Step 3) Calculate the first scale position of the noise main frequency in the first wavelet coefficient matrix of step 2) by using the scale factor of the wavelet basis function in the wavelet transform, the relationship between the wavelet center frequency and the signal frequency:
[0159] 3.1) Scale factor a of wavelet basis function i , wavelet center frequency F c With the signal frequency F a The relationship is:
[0160] F a =F c ×f s / a i ;
[0161] 3.2) According to the relationship in step 3.1), take the wavelet center frequency F c =3, bringing in the main noise frequency f Noise (need to be converted into angular frequency for calculation) Calculate the first scale position corresponding to the wavelet transform in step 2), that is, obtain the approximate scale position:
[0162]
[0163] Step 4) takes the first scale position obtained by mapping the noise main frequency in step 3) as the center, searches for the second scale position corresponding to the maximum wavelet coefficient modulus value within the first set window length range at each discrete time point of the wavelet transform, and then takes the second scale position as the center and the second set window length as the noise processing frequency band range, and uses the wavelet coefficient modulus value size of the position to be processed to adaptively process the wavelet coefficient to obtain a second wavelet coefficient matrix, which specifically includes the following steps:
[0164] 4.1) From step 3), the scale position of the noise main frequency in the wavelet transform is i=184, and the half-window width of searching for the maximum modulus value of the wavelet coefficient at each time point is set to L1=20, and the half-window width of the noise processing bandwidth (mapped to the scale is the scale range) is L2=10;
[0165] 4.2) For time t j , j = 1, ..., 1000, assuming that in the wavelet coefficient sequence {W 164,j , ..., W 184,j , ..., W 204,j} The scale position corresponding to the maximum modulus value is searched to be i0, where i0 is a value in {164, ..., 184, ..., 204};
[0166] 4.3) Taking the scale position i0 as the center, the wavelet coefficients Do adaptive processing
[0167]
[0168] Where, W′. j is the wavelet coefficient after adaptive processing, W., j is the wavelet coefficient before adaptive processing, is the coefficient The modulus value, is the wavelet coefficient W for adaptive processing, j The wavelet coefficients of the previous row, |W, j | is W, j The modulus value, |W, j |={|W 164,j |, ..., |W 184,j |, ..., |W 204,j |}, the result after adaptive processing of the wavelet coefficients of the mixed signal segment is as follows Figure 3 As shown, after adaptive processing, the second wavelet coefficient matrix W2 is obtained.
[0169] Step 5) The second wavelet coefficient matrix processed in step 4) is subjected to inverse wavelet transform to obtain the reconstructed target signal, as follows:
[0170] The second wavelet coefficient matrix W2 after the adaptive processing in step 4) is subjected to inverse wavelet transform to obtain the reconstructed target signal, that is, the signal with the noise removed:
[0171]
[0172] The signal with noise removed, that is, the target signal is Figure 4 As shown, Figure 4 is the time-frequency diagram of the mixed signal segment after adaptive processing. Figure 5 As shown, Figure 5 It is a timing comparison diagram of the original signal, mixed signal segment and target signal. Figure 5 It can be seen that the pure background noise segment in the mixed signal segment has been removed.
[0173] Embodiment 4
[0174] The embodiment of the present application provides a non-white noise denoising device, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of a non-white noise denoising device provided in an embodiment of the present application, the device comprising:
[0175] An acquisition module, used for acquiring a pure background noise segment and a mixed signal segment of a signal;
[0176] A first determination module, used to determine the noise main frequency of the pure background noise segment;
[0177] A wavelet transform module, used for performing wavelet transform on the mixed signal segment to obtain a first wavelet coefficient matrix;
[0178] A second determination module, used to determine a first scale position of the noise main frequency in the first wavelet coefficient matrix;
[0179] A search module, configured to search for a second scale position corresponding to a maximum wavelet coefficient modulus value within a first set window length at each discrete time point of the first wavelet coefficient matrix with the first scale position as the center;
[0180] An adaptive processing module, used to adaptively process the wavelet coefficients according to the wavelet coefficient modulus value at the position to be processed, with the second scale position as the center and the second set window length as the noise processing frequency band range, to obtain a second wavelet coefficient matrix;
[0181] The inverse wavelet transform module is used to perform an inverse wavelet transform on the second wavelet coefficient matrix to obtain a reconstructed target signal.
[0182] In some embodiments, the acquisition module is used to acquire the pure background noise segment and the mixed signal segment of the signal, including:
[0183] Taking the arrival time of the signal excited by the controllable vibrator as the boundary, the signal before the arrival time is collected as the pure background noise segment, and the signal after the arrival time is collected as the mixed signal segment.
[0184] In some embodiments, the first determining module includes:
[0185] A fast Fourier transform unit, used for performing a fast Fourier transform on the pure background noise segment to obtain a Fourier transform result;
[0186] A first acquisition unit, used to acquire the maximum value of the complex modulus value of the Fourier transform result;
[0187] The first calculation unit is used to calculate the noise main frequency according to the maximum value of the complex modulus value and the sampling signal frequency and sampling point number of the fast Fourier transform.
[0188] In some embodiments, the wavelet transform module comprises:
[0189] A wavelet transform unit, used for performing wavelet transform on the mixed signal segment through a wavelet basis function to obtain an expression of the wavelet transform in the time domain;
[0190] A conversion unit, used for converting the wavelet transform expression in the time domain into a wavelet transform expression in the frequency domain;
[0191] A second calculation unit is used to calculate the conjugate of the wavelet transform in the frequency domain expression for each discrete value of the scale factor with respect to the angular frequency at [0, 2π], to obtain a matrix of the scale sequence of the wavelet basis function with respect to the scale factor;
[0192] The point multiplication unit is used to perform point multiplication on each row of the matrix and the Fourier transform result of the mixed signal to obtain a first wavelet coefficient matrix.
[0193] In some embodiments, the second determining module includes:
[0194] A second acquisition unit is used to acquire a scale factor of a wavelet basis function, a relational expression between a wavelet center frequency and a signal frequency;
[0195] The third calculation unit is used to bring the main frequency of the noise into the relationship as the signal frequency, and calculate the scale position of the main frequency of the noise in the first wavelet transform matrix.
[0196] Embodiment 5
[0197] It should be noted that in the embodiment of the present application, if the above-mentioned non-white noise denoising method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read Only Memory), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0198] Accordingly, an embodiment of the present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the non-white noise denoising method provided in the above embodiment are implemented.
[0199] An embodiment of the present application provides an electronic device; Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the electronic device 100 includes: a processor 101, at least one communication bus 102, a user interface 103, at least one external communication interface 104, and a memory 105. The communication bus 102 is configured to realize the connection and communication between these components. The user interface 103 may include a display screen, and the external communication interface 104 may include a standard wired interface and a wireless interface. The processor 101 is configured to execute the program of the non-white noise denoising method stored in the memory to implement the steps in the non-white noise denoising method provided in the above embodiment.
[0200] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0201] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0202] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0203] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0204] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately configured as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0205] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read Only Memory), disks or optical disks, etc. Various media that can store program codes.
[0206] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a controller to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0207] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A non-white noise denoising method, characterized in that: The method comprises: Acquire pure background noise segments and mixed signal segments of the signal; Determining the noise main frequency of the pure background noise segment; Performing wavelet transform on the mixed signal segment to obtain a first wavelet coefficient matrix; Determining a first scale position of the noise main frequency in the first wavelet coefficient matrix; Taking the first scale position as the center, searching for a second scale position corresponding to a maximum wavelet coefficient modulus value within a first set window length at each discrete time point of the first wavelet coefficient matrix; Taking the second scale position as the center and the second set window length as the noise processing frequency band range, adaptively processing the wavelet coefficients according to the wavelet coefficient modulus value of the position to be processed to obtain a second wavelet coefficient matrix; Perform inverse wavelet transform on the second wavelet coefficient matrix to obtain a reconstructed target signal.
2. The method according to claim 1, characterized in that The method for acquiring a pure background noise segment and a mixed signal segment of a signal comprises: Taking the arrival time of the signal excited by the controllable vibrator as the boundary, the signal before the arrival time is collected as the pure background noise segment, and the signal after the arrival time is collected as the mixed signal segment.
3. The method according to claim 1, characterized in that The determining of the noise main frequency of the pure background noise segment includes: Performing a fast Fourier transform on the pure background noise segment to obtain a Fourier transform result; Get the maximum value of the complex modulus value of the Fourier transform result; The main frequency of the noise is calculated based on the maximum value of the complex modulus value, the sampling signal frequency of the fast Fourier transform, and the number of sampling points.
4. The method according to claim 1, characterized in that The step of performing a wavelet transform on the mixed signal segment to obtain a first wavelet coefficient matrix includes: Performing wavelet transform on the mixed signal segment by wavelet basis function to obtain the wavelet transform expression in time domain; Converting the wavelet transform expression in the time domain into the wavelet transform expression in the frequency domain; The conjugate of the wavelet transform in the frequency domain expression is calculated for each discrete value of the scale factor with respect to the angular frequency at [0,2π], to obtain a matrix of the scale sequence of the wavelet basis function with respect to the scale factor; Each row of the matrix is multiplied by the Fourier transform result of the mixed signal to obtain a first wavelet coefficient matrix.
5. The method according to claim 1, characterized in that The determining a first scale position of the noise main frequency in the first wavelet coefficient matrix includes: Obtain the relationship between the scale factor of the wavelet basis function, the wavelet center frequency and the signal frequency; Substitute the main frequency of the noise into the relationship as the signal frequency, and calculate the scale position of the main frequency of the noise in the first wavelet transform matrix.
6. A non-white noise denoising device, characterized in that: The device comprises: An acquisition module, used for acquiring a pure background noise segment and a mixed signal segment of a signal; A first determination module, used to determine the noise main frequency of the pure background noise segment; A wavelet transform module, used for performing wavelet transform on the mixed signal segment to obtain a first wavelet coefficient matrix; A second determination module, used to determine a first scale position of the noise main frequency in the first wavelet coefficient matrix; A search module, configured to search for a second scale position corresponding to a maximum wavelet coefficient modulus value within a first set window length at each discrete time point of the first wavelet coefficient matrix with the first scale position as the center; An adaptive processing module, used to adaptively process the wavelet coefficients according to the wavelet coefficient modulus value at the position to be processed, with the second scale position as the center and the second set window length as the noise processing frequency band range, to obtain a second wavelet coefficient matrix; The wavelet inverse transform module is used to perform an inverse wavelet transform on the second wavelet coefficient matrix to obtain a reconstructed target signal.
7. The device according to claim 1, characterized in that The first determining module includes: A fast Fourier transform unit, used for performing a fast Fourier transform on the pure background noise segment to obtain a Fourier transform result; A first acquisition unit, used to acquire the maximum value of the complex modulus value of the Fourier transform result; The first calculation unit is used to calculate the noise main frequency according to the maximum value of the complex modulus value and the sampling signal frequency and sampling point number of the fast Fourier transform.
8. The device according to claim 1, characterized in that The wavelet transform module comprises: A wavelet transform unit, used for performing wavelet transform on the mixed signal segment through a wavelet basis function to obtain an expression of the wavelet transform in the time domain; A conversion unit, used for converting the wavelet transform expression in the time domain into a wavelet transform expression in the frequency domain; A second calculation unit is used to calculate the conjugate of the wavelet transform in the frequency domain expression for each discrete value of the scale factor with respect to the angular frequency at [0, 2π], to obtain a matrix of the scale sequence of the wavelet basis function with respect to the scale factor; The point multiplication unit is used to perform point multiplication on each row of the matrix and the Fourier transform result of the mixed signal to obtain a first wavelet coefficient matrix.
9. An electronic device, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 5 is performed.
10. A storage medium, characterized in that: The computer program stored in the storage medium can be executed by one or more processors and can be used to implement the method according to any one of claims 1 to 5.