A digital notch method and device based on adaptive threshold detection
The interference of magnetic field signals is suppressed by the digital notch method with adaptive threshold detection, which solves the problem of low signal-to-noise ratio of magnetic detectors in embankment leakage detection and achieves more accurate signal processing and data support.
Patent Information
- Application Number
- CN202410737717.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2044-06-07
Smart Images

Figure CN118759592B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital notching, and in particular to a digital notching method and device based on adaptive threshold detection. Background Art
[0002] The Magnetometric Resistivity Method (MMR) has been successfully applied to the detection of leakage hazards in dikes. The book "Principles of Magnetoelectric Exploration Method" fully explains the principles of the Magnetometric Resistivity Method (see Fu Liangkui. Principles of Magnetoelectric Exploration Method [M]. Geological Publishing House, 1984.). Figure 1 As shown, the magnetoresistivity method is a geophysical prospecting technique that measures the distribution of the magnetic field excited by an artificial current source in the test area to invert the geological structure. The attenuation of the magnetic field signal measured by this method with distance is better than that of the electric field signal, and the magnetic field propagation is not affected by the shallow water in the embankment. During the implementation of the magnetoresistivity method, the surveyor will place electrodes near the predetermined measurement area, and transmit DC or low-frequency AC excitation signals to the underground through these electrodes (see Mogilatov VS, Kozhevnikov NO, Zlobinsky A V. Magnetic measurements in electrical prospecting by resistivity methods [J]. Russian Geology and Geophysics, 2018, 59 (4): 432-437.). In the measurement area between the two electrodes, professional equipment such as a magnetometer is used to measure the magnetic field generated by the current excitation.
[0003] In the practice of embankment leakage detection, the intensity of the effective magnetic field signal that the magnetic detector needs to measure is mostly in the nT level. However, in many environments, the intensity of the background electromagnetic interference (power frequency interference, electromagnetic interference in the earth and space, etc.) is often greater than the nT level (see P,Dahlin T,Johansson S.Using the resistivity method for leakage detection in a blind test at the Embankment dam testfacility in Norway[J].Bulletin ofEngineering Geology and the Environment,2010,69(4):643-658.), which requires the magnetic instrument to have the ability to extract useful signals from the measured magnetic field signals containing many interferences.
[0004] Since the industrial frequency in my country is 50Hz, while the industrial frequency used in North America (such as the United States and Canada) and some other countries is 60Hz, in order to avoid industrial frequency interference, the frequency of the excitation signal selected by the present invention is 130Hz, avoiding 50Hz, 60Hz and its harmonic frequencies to reduce interference from power lines. After the magnetic detector collects the magnetic field signal, in order to suppress out-of-band interference and improve the signal-to-noise ratio, it is often necessary to perform bandpass filtering. For the 130Hz excitation signal, the present invention uses a bandpass filter with a frequency band of 130Hz±10Hz to filter the collected magnetic field signal. However, in actual experiments, it was found that there are many strong interferences in the frequency domain of the magnetic field signal within this frequency band. In a certain embankment leakage detection test, the time domain and spectrum diagrams of the magnetic field signal collected by the magnetic detector after signal conditioning such as bandpass filtering are shown as follows. Figure 2 、 Figure 3 As shown. Figure 3 It can be seen that there is obvious interference in the 130Hz±10Hz frequency band, and strong interference will have a serious impact on the measured magnetic field signal. Summary of the Invention
[0005] To address the problem that some of the collected original magnetic field signals have large errors in dike leakage detection due to factors such as environmental noise, the present invention provides a digital notch method and device based on adaptive threshold detection. The digital notch method based on adaptive threshold detection mainly includes:
[0006] S1: Perform spectrum analysis on the original time-domain signal of the magnetic field to be processed to obtain the original spectrum of the magnetic field signal within the specified frequency range, and perform narrowband interference characteristic peak identification on the original spectrum of the magnetic field signal to obtain the relevant parameters of the narrowband interference characteristic peak: amplitude vector PKS1, position vector LOCS1, width vector WIDTHS1, and significance vector PROMS1;
[0007] S2: Study the transmission law between the relevant parameters of the characteristic peak and the parameters of the narrow-band interference digital notch filter, and perform adaptive adjustment on the parameters of the narrow-band interference digital notch filter;
[0008] S3: Using the adaptively adjusted narrowband interference digital notch filter to suppress the narrowband interference of the original time domain signal of the magnetic field to be processed;
[0009] S4: Identify the single-frequency interference characteristic peak of the magnetic field time domain signal after narrowband interference suppression, and obtain the relevant parameters of the single-frequency interference characteristic peak: amplitude vector PKS2, position vector LOCS2, width vector WIDTHS2, and significance vector PROMS2;
[0010] S5: Study the transmission law between the relevant parameters of the single-frequency interference characteristic peak and the single-frequency interference digital notch filter parameters, and perform adaptive adjustment on the single-frequency interference digital notch filter parameters;
[0011] S6: Using the notch filter after adaptive adjustment in step S5, single-frequency interference suppression is performed on the magnetic field time domain signal after narrowband interference suppression in step S3 to obtain a notched magnetic field time domain signal.
[0012] A digital notch device based on adaptive threshold detection comprises: a processor and a storage device; the processor loads and executes instructions and data in the storage device to implement a digital notch method based on adaptive threshold detection.
[0013] The beneficial effects of the technical solution provided by the present invention are as follows: first, the present invention addresses the need to solve the problem that some of the magnetic field signals collected by the magnetometer during levee leakage detection operations cannot be used subsequently due to excessive environmental noise. By using fast Fourier transform to perform spectrum analysis in the frequency domain, the different characteristics of the Findpeaks function in identifying narrowband interference and single-frequency interference are studied. The average moving filter technology is used to make the function more sensitive to the characteristic peaks of the narrowband signal; in the threshold adaptive detection, adjustment and verification are carried out in combination with specific rules; in the parameter adaptive adjustment, multiple groups of experimental results are fitted to obtain the optimal transfer model. In order to solve the problem that some of the original magnetic field signals collected have excessive errors in levee leakage detection due to factors such as environmental noise, the present invention adopts a digital notch method based on adaptive threshold detection to accurately suppress abnormal strong interference in the frequency domain, effectively reducing the impact on the detection results of the magnetometer, and also providing reliable and stable data support for the subsequent calculation of the depth of the leakage channel. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0015] Figure 1 1 is a principle diagram of the magnetoresistivity method in an embodiment of the present invention.
[0016] Figure 2 It is the original time domain diagram of the magnetic field signal in the embodiment of the present invention.
[0017] Figure 3 1 is the original spectrum diagram of the magnetic field signal in the embodiment of the present invention.
[0018] Figure 4 This is a flowchart of the overall processing of a digital notch filter method based on adaptive threshold detection in an embodiment of the present invention.
[0019] Figure 5 This is the original spectrum diagram of the magnetic field signal in the 120Hz-140Hz frequency band in an embodiment of the present invention.
[0020] Figure 6 3 is a comparison diagram of the spectrum diagrams before and after smoothing (moving average filtering) in an embodiment of the present invention.
[0021] Figure 7 3 is a schematic diagram of visualization of relevant parameters of the narrowband interference threshold setting method in an embodiment of the present invention.
[0022] Figure 8 1 is a comparison diagram of the spectrum diagrams before and after the narrowband interference notch in the embodiment of the present invention.
[0023] Figure 9 Schematic diagram of parameter fitting in an embodiment of the present invention.
[0024] Figure 10 4 is a spectrum diagram of the magnetic field signal after narrowband interference notching in an embodiment of the present invention.
[0025] Figure 11 This is a visualization diagram of relevant parameters of the single-frequency interference threshold setting method in an embodiment of the present invention.
[0026] Figure 12 1 is a comparison diagram of the spectrum diagrams before and after the single-frequency interference notch in the embodiment of the present invention.
[0027] Figure 13 It is a test verification MPAE result diagram summarized in the embodiment of the present invention.
[0028] Figure 14 1 is a spectrum diagram of the magnetic field signal after notching summarized in an embodiment of the present invention.
[0029] Figure 15 It is a schematic diagram of the operation of the hardware device in the embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.
[0031] The overall framework of the digital notch method based on adaptive threshold detection proposed in this invention can be found in Figure 4 , specifically including three modules:
[0032] (1) Interference characteristic peak identification module based on adaptive threshold detection: For the spectrum of the magnetic field signal to be processed within the 130Hz±10Hz frequency band, the Findpeaks function method is used to realize the automatic identification and location of narrowband spike interference exceeding the variable threshold within the communication frequency band, and the interference signal strength, bandwidth, frequency and other parameters are estimated. In view of the problem that only single-frequency interference is detected regardless of the threshold setting when using the Findpeaks function of MATLAB, the present invention uses a moving average filter to smooth the amplitude within the target frequency band in the signal spectrum. After filtering, the single-frequency interference in the spectrum will be filtered out, thereby realizing the correct characteristic peak identification of narrowband interference.
[0033] (2) Digital notch filter parameter adaptive adjustment module: The curve fitting method is used to obtain the transfer relationship between the parameters during characteristic peak identification and the digital notch filter parameters, so as to realize the adaptive adjustment of the notch filter parameters.
[0034] (3) Digital notch filter interference suppression module: Select a suitable IIR Butterworth notch filter, and suppress narrowband strong interference and single-frequency interference in turn according to the adaptively adjusted notch filter parameters to achieve the suppression goal of the present invention.
[0035] If the Findpeaks function method based on MATLAB is directly used to detect characteristic peaks on the signal spectrum, only single-frequency interference will be detected (the detection bandwidth WIDTHS of the single-frequency interference characteristic peak detected at the same time is completely wrong), and the narrowband interference cannot be detected at all. The present invention performs a moving average filter on the original spectrum data to annihilate the single-frequency interference to highlight the narrowband interference. After using the Findpeaks function to detect the characteristic peak, the narrowband interference detection bandwidth WIDTHS can be used as the bandwidth parameter bw of the subsequent notch filter. After the narrowband interference is notched, the Findpeaks function can be used to correctly identify the characteristic peak information of the single-frequency interference. The specific implementation steps are as follows:
[0036] Step 1: To clarify the interference components of the original time domain signal of the magnetic field to be processed within the frequency band of 130 Hz ± 10 Hz (this is the useful magnetic field signal set in this embodiment), the present invention first performs spectrum analysis on the original time domain signal to be processed using the Welch method of fast Fourier transform (FFT), and uses the Hanning window to reduce spectrum leakage, and obtains the following: Figure 5 The original spectrum of the magnetic field signal between 120Hz and 140Hz (a range in which useful magnetic field signals may exist) is shown. It can be seen that the signal has significant narrowband strong interference around 121Hz and 135Hz, and significant abnormal single-frequency interference around 128Hz. The present invention addresses these anomalies to improve the signal-to-noise ratio and the usability of the collected magnetic field signal. The so-called useful magnetic field signal can be set according to actual conditions, and the corresponding frequency range in which the useful magnetic field signal may exist can be adjusted accordingly.
[0037] Therefore, Figure 5 The narrowband interference present in the spectrum data shown is identified. First, the amplitude within the target frequency band in the signal spectrum is smoothed using a moving average filter. This is implemented using the smooth function in MATLAB. In this function, a moving average window with a window size of N = 1000 is used, which is defined as:
[0038]
[0039] Where x[i] represents the amplitude sequence of the input signal; y[i] represents the smoothed amplitude sequence of the output signal; i represents the integer variable of the amplitude sequence; and N is the window size.
[0040] This smoothing filter can lay the foundation for the subsequent correct identification of characteristic peaks of narrowband interference, avoiding the problem of only detecting single-frequency interference, and the smoothing filter will not significantly increase the characteristic peak bandwidth when using the Findpeaks function for narrowband interference identification. The processing effects before and after filtering are as follows: Figure 6 As shown in the figure, it can be seen that the single-frequency interference in the spectrum will be completely filtered out after filtering, and the frequency and significance of the narrowband interference characteristic peak do not show obvious changes in the frequency range under investigation. Among them, significance is defined as the difference between the amplitude of the maximum point of the characteristic peak and the amplitude of the relatively flat area below it. Significance is expressed as:
[0041] PROMS1(i)=A(i) max -A(i) flat (2)
[0042] Among them, A(i) max Represents the maximum amplitude of the characteristic peak when the position vector is i; A(i) flat It represents the amplitude of the relatively flat area near the characteristic peak; PROMS1(i) represents the significance of the narrowband interference at that location.
[0043] After smoothing, the subsequent identification of narrowband interference peaks requires two steps: setting an adaptive threshold for narrowband interference detection and identifying information. In the process of identifying narrowband interference peaks based on the Findpeaks function, threshold setting is crucial. To achieve adaptive threshold setting, the Findpeaks function must be appropriately utilized based on the characteristics of the magnetic field signal to achieve the desired function.
[0044] (1) Dynamic setting of adaptive threshold detection for narrowband interference
[0045] When setting the threshold, it is necessary to comprehensively consider the characteristics and commonalities of the spectrum graphs of different signals, and find certain rules to achieve adaptive adjustment of the threshold (i.e., the minimum significance threshold in the input parameter of the Findpeaks function). Considering that the expected signal should show a stable feature with almost equal signal peak intensity within the frequency band, the actual signal may have abnormal conditions such as narrowband spikes within the frequency band. At the same time, the average peak signal intensity of the actual signal in this frequency band should not change too much, so it can be represented by the mean of the envelope on the spectrum graph. Based on the data set obtained from the empirical test after manual assignment, the threshold conforms to the difference between the maximum value of the actual signal in the frequency domain and the mean value of the upper envelope in the frequency band. At the same time, when the calculated threshold value is lower than 6, the threshold value should be set to 6. Therefore, the threshold TS1 can be expressed by the mathematical formula shown below:
[0046]
[0047] Among them, A(i) max is the maximum amplitude of the magnetic field signal when the position vector is i; It is the mean value of the amplitude of all frequency domain points in the upper envelope of the signal in the 120Hz-140Hz frequency band; TS1(i) is the value of the threshold setting at that location.
[0048] The upper envelope uses the peak envelope method of the envelope function, and the window size is 1000, the same as the smoothing window. The relevant parameters involved in the threshold setting method are visualized as follows: Figure 7 As shown in the figure, it can be seen that in this case, the threshold (minimum significance) is set to the absolute value of the difference between the maximum red amplitude point and the red upper envelope mean line amplitude in the figure.
[0049] (2) Identification of narrowband interference characteristic peaks
[0050] Use the Findpeaks function to identify characteristic peak parameters. The 'Annotate' parameter specifies how to annotate the found characteristic peaks. Setting it to 'extents' means that the returned peak information includes the peak's location range. The function outputs the following information: the characteristic peak's amplitude vector PKS1 (i.e., the interference signal strength), the location vector LOCS1 (i.e., the characteristic peak's frequency), the width vector WIDTHS1 (i.e., the interference signal bandwidth), and the significance vector PROMS1.
[0051] Step 2: After completing the identification of the characteristic peak of narrowband interference and obtaining the above parameters, it is necessary to obtain the fixed transfer law between it and the narrowband interference digital notch filter parameters. Currently, it is necessary to set its center frequency f c1 Parameters such as bandwidth bw1, notch filter gain gain1, and others are used in the design of a Butterworth digital notch filter. Based on the actual magnetic field signal, the order is set to 1. The number of interferences requiring narrowband notching is determined by the number of groups identified during narrowband interference characteristic peak identification, defined as num1. The transfer law is fitted by manually assigning notch filter parameters to accumulate multiple appropriate values, then performing curve fitting based on the characteristic peak information output by the Findpeaks function.
[0052] In the manual adjustment parameter section, the position vector LOCS1 is the center frequency f required by the notch filter. c1, and the bandwidth and gain required by the notch filter are in multiple relationships with the width vector WIDTHS1 and the significance vector PROMS1 obtained by detection, respectively. Therefore, when manually adjusting, when the notch effect reaches the expected goal, the parameter variables can be recorded for fitting. Among them, the evaluation of the notch effect is based on the inversion embankment leakage channel technology based on COMSOL: first, the magnetic field signal after the notch is solved to obtain the leakage channel depth; then, it is compared with the reference leakage channel depth to quantify the mean absolute percentage error (MAPE) between the calculated depth data and the actual situation; finally, the quantified MAPE size is used to measure the notch effect. Subsequent verification found that the calculated MAPE did not change much whether single-frequency interference suppression was performed or not. The MAPE drop before and after narrowband notching was set to 15%. The part less than 15% was defined as insufficient or excessive suppression, and the part greater than 15% was defined as moderate suppression. MAPE is an indicator for evaluating the relative difference between the calculated result and the true value. A lower MAPE indicates a higher consistency between the calculated result and the true value. MAPE can be described as:
[0053]
[0054] In formula (4), N represents the number of sample points of the leakage channel to be solved; is the result of the i-th solution; y i Refer to the true value.
[0055] After determining the interference suppression degree, the notch filter parameters can be adjusted continuously by referring to the signal spectrum after notching. The spectrum before and after the narrowband interference notch is compared. Figure 8 As shown in the figure, it can be seen that two obvious narrowband interferences A and B are effectively and accurately suppressed, while single-frequency interference still exists.
[0056] The narrowband interference of the magnetic field signal to be notched in the experimental test has k1=2, and the identified frequency point LOCS1 (also known as the center frequency f c1 ) were 121.64Hz and 134.45Hz, respectively; the bandwidths WIDTHS1 were 0.5410Hz and 0.3196Hz, respectively; and the significance PROMS1 were 17.5548dB / Hz and 10.5042dB / Hz, respectively. After notching, the above technique was used and compared with the solution before notching. Seven groups of notch filter bandwidths bw1 and gain coefficients gain1 were manually adjusted, resulting in a valid data set as shown in Table 1:
[0057] Table 1 Valid data set for narrowband interference digital notch filter parameter test
[0058]
[0059]
[0060] Following the above steps, several parameter data sets were collected using different communication signals. Since the detected bandwidth WIDTHS1 and significance PROMS1 are interference parameters themselves and have no inherent relationship, analysis revealed that the notch filter bandwidth bw1 and gain coefficient gain1 jointly determine the notch effect and have a negative correlation. Therefore, a curve fitting equation was used using the notch filter bandwidth bw1 and gain coefficient gain1.
[0061] The experiment found that the exponential form of the relationship is the best fit for these two data, so the exponential function was used for fitting. After importing the above data set, by adjusting the parameters of the curve fitter, an exponential curve that is very consistent with the original data was obtained. In the fitting process, it was found that the regression equation of the two exponentials has a better fitting effect. The fitting curve is shown in the figure below. Figure 9 As shown. The three goodness of fit performance indicators of R2, adjusted R2, and RMSE are used to consider the fitting effect. The mathematical expressions of the three statistical indicators are:
[0062]
[0063] In formulas (5)-(7): N is the number of samples; y i is the true value of the i-th sample; is the fitted value of the i-th sample; p is the number of fitting parameters.
[0064] The transfer law formula of the fitted notch filter bandwidth bw1 and gain coefficient gain1 is as follows:
[0065] f(x) = a*exp(b*x) + c*exp(d*x) (8)
[0066] In formula (8), the coefficients (confidence limit is 95%), a is 15.05, b is -9.511, c is 0.3076, d is -0.7293, f(x) is the gain coefficient gain1, and x is the notch filter bandwidth bw1.
[0067] In terms of goodness of fit, the R² was 0.8967, the adjusted R² was 0.8914, and the RMSE was 1.24. Applying the transfer law to the existing signal data, combined with the inversion leakage channel technique, yielded significant or slight improvements in the mean absolute percentage error (MAPE), indicating preliminary effectiveness.
[0068] Step 3: After the adaptive adjustment of the narrowband interference digital notch filter parameters is achieved, interference suppression is required. According to the fitting curve relationship between the notch filter bandwidth bw1 and the gain coefficient gain1 and the center frequency f c1 The relationship with the frequency point LOCS1, the three parameters of the notch filter can be set as follows:
[0069]
[0070] Among them, k is the sequence of the number of narrowband interference digital notch filters identified, bw1(k) represents the bandwidth of the narrowband interference digital notch filter, gain1(k) represents the gain coefficient of the narrowband interference digital notch filter, LOCS1(k) represents the frequency of the narrowband interference characteristic peak, WIDTHS1(k) represents the bandwidth of the narrowband interference signal, and d is an arbitrary constant. After verification, it is found that optimal.
[0071] After the above parameter adjustment method is used as the notch filter parameter input, the narrowband interference digital notch filter interference suppression module function is realized.
[0072] Step 4: After the narrowband interference of the original magnetic field time domain signal is accurately suppressed, the magnetic field time domain signal will continue to be input into the process of achieving single-frequency interference suppression. The process of identifying the characteristic peak of single-frequency interference based on adaptive threshold detection is as follows:
[0073] Similar to the narrowband interference suppression processing idea, the magnetic field time domain signal is first analyzed by fast Fourier transform (FFT) to obtain the following spectrum: Figure 10 The spectrum of the 120Hz-140Hz magnetic field signal after narrowband interference suppression is shown. It can be seen that the signal has obvious single-frequency strong interference around 128Hz.
[0074] It is also divided into two parts: single-frequency interference adaptive threshold detection setting and information identification.
[0075] (1) Dynamic setting of adaptive threshold detection for single-frequency interference
[0076] Based on a large amount of threshold valid data obtained through empirical testing after manual assignment, the single-frequency interference threshold TS2 basically corresponds to the difference between the average values of the upper and lower envelopes of the actual signal frequency domain within the frequency band. Therefore, the single-frequency interference threshold TS2 can be expressed as follows:
[0077]
[0078] in, and They are defined as the mean of the amplitudes of all frequency domain points in the upper and lower envelopes of the signal within the 120Hz-140Hz frequency band; TS2 is the value set for the single-frequency interference threshold.
[0079] The upper and lower envelopes use the peak envelope method of the envelope function, and the window size is also 1000. The relevant parameters involved in the threshold setting method are visualized as follows Figure 11 As shown in the figure, it can be seen that in this case, the threshold (minimum significance) is set to the absolute value of the difference between the amplitudes of the upper and lower envelope mean lines in the figure.
[0080] (2) Single-frequency interference information identification
[0081] Use the Findpeaks function to identify characteristic peak parameters. Similar to the narrowband interference section, the 'Annotate' input parameter specifies how to annotate the found characteristic peaks. Setting it to 'extents' means that the returned peak information includes the peak's location range. The function outputs the following information: the characteristic peak's amplitude vector PKS2 (i.e., the interference signal strength), the location vector LOCS2 (i.e., the characteristic peak's frequency), the width vector WIDTHS2 (i.e., the interference signal bandwidth), and the significance vector PROMS2.
[0082] Step 5. Continue to use the Findpeaks function to identify the characteristic peak of single-frequency interference in the signal spectrum after narrowband interference is accurately suppressed, and find the center frequency f c2 The bandwidth bw2 is relatively accurate, so the parameters of the digital notch filter for single-frequency interference are directly set accordingly. A digital notch filter order of 2 meets the set requirements. For the digital notch filter, when the gain coefficient gain2 is fixed at 1 / 1000, verification has proven that the adjusted digital notch filter is effective in suppressing single-frequency interference. Therefore, setting a fixed value of 1 / 1000 as the significance factor is sufficient. This completes the steps for the adaptive adjustment module for notch filter parameters for single-frequency interference.
[0083] Step 6: After using the Findpeaks function to achieve adaptive adjustment of the parameters of the single-frequency interference digital notch filter, it is necessary to suppress the single-frequency interference. c2 In relation to the identified characteristic peak information parameters, the three parameters of the single-frequency interference digital notch filter can be set as follows:
[0084]
[0085] Among them, t is the sequence of the number of single-frequency interference digital notch filters identified, f c2 (t) represents the center frequency of the single-frequency interference digital notch filter, bw2(t) represents the bandwidth of the single-frequency interference digital notch filter, gain2(t) represents the gain coefficient of the single-frequency interference digital notch filter, LOCS2(t) represents the frequency of the single-frequency interference characteristic peak, WIDTHS2(t) represents the bandwidth of the single-frequency interference signal, and PROMS2(t) represents the significance of the single-frequency interference.
[0086] After the above parameter adjustment method is used as the notch filter parameter input, the single-frequency interference digital notch filter interference suppression module function is realized, and the spectrum comparison before and after the single-frequency interference notch processing is completed. Figure 12 shown.
[0087] At this point, the strong interference suppression in the original magnetic field time domain signal is completed, effectively improving the signal-to-noise ratio.
[0088] The interference suppression method of the digital notch based on adaptive threshold detection of the present invention is used to verify the results of all collected magnetic field signals as shown in Table 2 and Figure 13 As shown, the 8-segment magnetic field signal spectrum after processing is as follows Figure 14 As shown in the figure, the present invention was developed based on the fifth segment of magnetic field signals. After notching all seven segments of magnetic field signals, interference suppression was effective, and MPAE decreased. A slight increase in MPAE was observed during the eighth segment data test and verification, indicating random fluctuations in the COMSOL-based inversion results of dike leakage channels, which is normal. Furthermore, when only single-frequency interference needs to be processed for some magnetic field signals, the present invention's procedures remain applicable, demonstrating a certain degree of universality.
[0089] Table 2 Summary of test and verification MPAE results
[0090]
[0091] To address the problem of excessive errors in embankment leakage detection due to factors such as environmental noise in some of the collected original magnetic field signals, the present invention adopts a digital notch method based on adaptive threshold detection to accurately suppress abnormal strong interference in the frequency domain, effectively reducing the impact on the detection results of the magnetic meter, and providing reliable and stable data support for the subsequent calculation of the depth of the leakage channel.
[0092] See Figure 15 , Figure 15 4 is a schematic diagram of the working of the hardware device of an embodiment of the present invention, wherein the hardware device specifically comprises: a digital notch device 401 based on adaptive threshold detection, a processor 402 and a storage device 403.
[0093] A digital notch filter device 401 based on adaptive threshold detection: The digital notch filter device 401 based on adaptive threshold detection implements the digital notch filter method based on adaptive threshold detection.
[0094] Processor 402: The processor 402 loads and executes instructions and data in the storage device 403 to implement the digital notch method based on adaptive threshold detection.
[0095] Storage device 403: The storage device 403 stores instructions and data; the storage device 403 is used to implement the digital notch method based on adaptive threshold detection.
[0096] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A digital notch filter method based on adaptive threshold detection, characterized by: The method comprises the following steps: S1: Perform spectrum analysis on the original time-domain signal of the magnetic field to be processed to obtain the original spectrum of the magnetic field signal within the specified frequency range, and perform narrowband interference characteristic peak identification on the original spectrum of the magnetic field signal to obtain the relevant parameters of the narrowband interference characteristic peak: amplitude vector PKS1, position vector LOCS1, width vector WIDTHS1, and significance vector PROMS1; S2: Study the transmission law between the relevant parameters of the characteristic peak and the parameters of the narrow-band interference digital notch filter, and perform adaptive adjustment on the parameters of the narrow-band interference digital notch filter; S3: Using the adaptively adjusted narrowband interference digital notch filter to suppress the narrowband interference of the original time domain signal of the magnetic field to be processed; S4: Identify the single-frequency interference characteristic peak of the magnetic field time domain signal after narrowband interference suppression, and obtain the relevant parameters of the single-frequency interference characteristic peak: amplitude vector PKS2, position vector LOCS2, width vector WIDTHS2, and significance vector PROMS2; S5: Study the transmission law between the relevant parameters of the single-frequency interference characteristic peak and the single-frequency interference digital notch filter parameters, and perform adaptive adjustment on the single-frequency interference digital notch filter parameters; S6: Using the notch filter after adaptive adjustment in step S5, single-frequency interference suppression is performed on the magnetic field time domain signal after narrowband interference suppression in step S3 to obtain a notched magnetic field time domain signal.
2. The digital notch filter method based on adaptive threshold detection according to claim 1, wherein: Step S1 is specifically as follows: S1.1: Perform FFT spectrum analysis based on the Welch method on the original time domain signal of the magnetic field to be processed to obtain the original spectrum of the magnetic field signal; S1.2: Moving average filtering: The amplitude within the target frequency band of the original spectrum of the magnetic field signal is smoothed using a moving average filter to highlight narrowband interference in the original spectrum of the magnetic field signal and eliminate single-frequency interference; In the smoothing process, the moving average window is: Where x[i] represents the amplitude sequence of the input signal; y[i] represents the amplitude sequence of the smoothed output signal; N is the window size, and i represents the integer variable of the amplitude sequence; S1.3: Based on the adaptive threshold detection, the narrowband interference characteristic peak is identified on the original spectrum of the filtered magnetic field signal, and the Findpeaks function is used to identify the relevant parameters of the narrowband interference characteristic peak.
3. The digital notch filter method based on adaptive threshold detection according to claim 2, wherein: Step S1.3 is specifically as follows: Dynamic setting of narrowband interference adaptive threshold detection: Considering the characteristics and commonalities of different signal spectra, the threshold is adaptively adjusted. The mathematical formula of the narrowband interference threshold TS1 is: Among them, A(i) max is the maximum amplitude of the magnetic field signal when the position vector is i; is the mean value of the amplitude of all frequency domain points in the upper envelope of the signal within the specified frequency band; TS1(i) is the value of the narrowband interference threshold setting at that location; Narrowband interference characteristic peak identification: Use the Findpeaks function to identify the relevant parameters of narrowband interference characteristic peaks.
4. The digital notch filter method based on adaptive threshold detection according to claim 1, wherein: The calculation formula of significance in step S1 is: PROMS1(i)=A(i) max -A(i) flat Among them, A(i) max Represents the maximum amplitude of the characteristic peak when the position vector is i; A(i) flat It represents the amplitude of the relatively flat area near the characteristic peak; PROMS1(i) represents the significance of the narrowband interference at that location.
5. The digital notch filter method based on adaptive threshold detection according to claim 1, wherein: Step S2 is specifically as follows: S2.1: Calculate the parameters of the narrowband interference digital notch filter: Manually assign notch filter parameters to accumulate multiple sets of appropriate values. Then, perform curve fitting based on the characteristic peak information output by the Findpeaks function to obtain the transmission law: f(x)=a*exp(b*x)+c*exp(d*x) Wherein, f(x) is the narrowband interference digital notch filter gain coefficient gain1, x is the narrowband interference digital notch filter bandwidth bw1, a, b, c are the constants obtained by fitting; S2.2: Update the narrowband interference digital notch filter parameters using the transfer rule. The narrowband interference digital notch filter parameters are set to: Where k is the sequence of the number of narrowband interference notch filters identified, d is an arbitrary constant, bw1(k) represents the bandwidth of the narrowband interference digital notch filter, gain1(k) represents the gain coefficient of the narrowband interference digital notch filter, LOCS1(k) represents the frequency of the narrowband interference characteristic peak, WIDTHS1(k) represents the bandwidth of the narrowband interference signal, and f c1 (k) represents the center frequency.
6. The digital notch filter method based on adaptive threshold detection according to claim 1, wherein: Step S4 is specifically as follows: S4.1: Perform FFT spectrum analysis on the magnetic field time domain signal to obtain the magnetic field spectrum within the specified frequency range; S4.2: Identify the single-frequency interference characteristic peak of the magnetic field spectrum based on the single-frequency interference adaptive threshold detection.
7. The digital notch filter method based on adaptive threshold detection according to claim 1, wherein: Step S4.2 is specifically as follows: Dynamic setting of single-frequency interference adaptive threshold detection: Based on a large amount of threshold valid data obtained through empirical testing after manual assignment, the single-frequency interference threshold TS2 is the difference between the average values of the upper and lower envelopes of the actual signal in the frequency band: in, and are the mean values of the amplitudes of all frequency domain points in the upper and lower envelopes of the magnetic field spectrum signal within the specified frequency range; TS2 is the value of the single-frequency interference threshold setting; Single-frequency interference identification: Use the Findpeaks function to identify the parameters related to the single-frequency interference characteristic peak on the signal spectrum after precise suppression of narrowband interference.
8. The digital notch filter method based on adaptive threshold detection according to claim 1, wherein: Step S5 is specifically as follows: Combined with the single-frequency interference characteristic peak information output by the Findpeaks function, due to the center frequency f c2 The bandwidth bw2 corresponds accurately to the characteristic peak parameter position vector LOCS2 and width vector WIDTHS2, so the single-frequency interference digital notch filter parameters are set directly accordingly. The filter order of the digital notch filter is set to 2, the gain coefficient gain2 is set to 1 / 1000, and the value 1 / 1000 is set as the significance multiple.
9. The digital notch filter method based on adaptive threshold detection according to claim 1, wherein: In step S6, the parameters of the adaptively adjusted single-frequency interference digital notch filter are set to: Among them, t is the sequence of the number of single-frequency interference digital notch filters identified, f c2 (t) represents the center frequency of the single-frequency interference digital notch filter, bw2(t) represents the bandwidth of the single-frequency interference digital notch filter, gain2(t) represents the gain coefficient of the single-frequency interference digital notch filter, LOCS2(t) represents the frequency of the single-frequency interference characteristic peak, WIDTHS2(t) represents the bandwidth of the single-frequency interference signal, and PROMS2(t) represents the significance of the single-frequency interference.
10. A digital notch filter device based on adaptive threshold detection, characterized in that: include: A processor and a storage device; the processor loads and executes instructions and data in the storage device to implement the digital notch method based on adaptive threshold detection according to any one of claims 1 to 9.
Citation Information
Patent Citations
Frequency domain de-interference method and device based on two-stage adaptive threshold decision
CN108390678A
Adaptive narrowband anti-interference for satellite navigation receivers
CN116210170A