Dynamic threshold pulse detection method and system
By employing a dynamic threshold pulse detection method, utilizing signal envelope value and time window technology, the problem of pulse signal detection errors caused by environmental changes is solved, achieving accurate detection even in environments with varying noise levels.
Patent Information
- Application Number
- CN202511026961.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-10-28
AI Technical Summary
In existing technologies, noise changes caused by environmental variations affect the accuracy of pulse signal detection, leading to detection errors.
A dynamic threshold pulse detection method is adopted. By acquiring the envelope value of the signal, the threshold values of the rising and falling edges of the pulse are calculated using two adjacent time windows. The threshold values are automatically adjusted according to the ambient noise. By combining the sliding and comparison of the time windows, slow drift and sudden interference are suppressed.
It enables accurate detection of the rising and falling edges of pulse signals under varying environmental noise conditions, avoiding false alarms and missed alarms, and maintaining robustness of detection.
Smart Images

Figure CN120847487A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to signal detection technology, specifically to a dynamic threshold pulse detection method and system. Background Technology
[0002] Pulse signal detection is a fundamental technology in the field of signal processing. It achieves accurate signal identification and measurement by capturing, analyzing, and processing pulse signals. Noise is one of the main factors affecting the accuracy of pulse signal detection. During the identification process, changes in the environment can cause changes in noise, resulting in varying noise levels at different times. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a dynamic threshold pulse detection method and system that addresses the above-mentioned problems in the prior art, and solves the problem of detection errors caused by environmental changes during the pulse signal detection process.
[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A dynamic threshold pulse detection method includes the following steps: S101) Acquire the signal to be detected and extract the envelope value of the signal to be detected; S102) Obtain the envelope values of all data points in the first time window and the second time window, wherein the first time window and the second time window are adjacent time windows; S103) Calculate the threshold value for pulse rising edge detection based on the envelope value of all data points in the first time window. If the envelope value of a specified number of data points in the second time window is greater than the threshold value for pulse rising edge detection, then a pulse rising edge is detected and the time between the first time window and the second time window is the rising edge time. Otherwise, after the first time window and the second time window move by a specified step, step S102 is executed again to perform the next round of pulse rising edge detection until a pulse rising edge is detected. S104) Obtain the envelope values of all data points in the first time window and the second time window; S105) Calculate the threshold value for pulse falling edge detection based on the envelope values of all data points in the first time window. If the envelope value of a specified number of data points in the second time window is less than the threshold value for pulse falling edge detection, then a pulse falling edge is detected and the time between the first time window and the second time window is the falling edge time. Otherwise, after the first time window and the second time window move by a specified step, step S104 is executed again to perform the next round of pulse falling edge detection until a pulse falling edge is detected.
[0005] Furthermore, in step S103, when calculating the threshold value for pulse rising edge detection based on the envelope values of all data points within the first time window, the average value of all envelope values within the first time window is calculated, and then the average value is multiplied by a first coefficient to obtain the threshold value for pulse rising edge detection in this instance.
[0006] Furthermore, in step S105, when calculating the threshold value for pulse falling edge detection based on the envelope values of all data points within the first time window, the average value of all envelope values within the first time window is calculated, and then the average value is multiplied by the second coefficient to obtain the threshold value for pulse falling edge detection in this instance.
[0007] Furthermore, in step S103, before the first and second time windows move by a specified step size, the following steps are included: If the window length of the first time window is less than the specified maximum value, then expand the window length of the first time window and then execute step S102. If the window length of the first time window is equal to the maximum value, then execute the step of moving the first time window and the second time window by the specified step.
[0008] Furthermore, when expanding the window length of the first time window, the right boundary of the first time window is shifted to the right by a specified number of data points, and the second time window is moved to the right by a specified number of data points.
[0009] Furthermore, before step S104, the method includes: restoring the window length of the first time window to its default value; in step S105, before the first and second time windows move by a specified step, the method includes: If the window length of the first time window is less than the specified maximum value, then expand the window length of the first time window and then execute step S104; If the window length of the first time window is equal to the maximum value, then execute the step of moving the first time window and the second time window by the specified step.
[0010] Furthermore, in steps S103 and S105, the envelope value of a specified number of data points within the second time window is specifically the envelope value of more than 2 / 3 of the data points within the second time window.
[0011] Furthermore, in steps S103 and S105, the first time window and the second time window move by a specified step size, specifically, both the first time window and the second time window move to the right by a step size of one data point.
[0012] The present invention also proposes a dynamic threshold pulse detection system, including a processor and a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, which is executed by the processor to implement the steps of the dynamic threshold pulse detection method.
[0013] The present invention also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the dynamic threshold pulse detection method.
[0014] Compared with the prior art, the advantages of the present invention are: This invention, based on the detection results of signal envelope values, utilizes two adjacent time windows to detect the rising and falling edges of pulses. The rising or falling edge threshold is calculated by statistically analyzing the envelope values of data points in real time through the first time window. This allows the rising / falling edge threshold to automatically adjust according to the intensity of ambient noise, avoiding false alarms in high-noise conditions and missed alarms in low-noise conditions with a fixed threshold. Simultaneously, the invention compares envelope values between two adjacent time windows, with the window size much smaller than the entire signal segment, suppressing slow drift and abrupt interference, responding only to rapid jumps. Finally, the time windows slide continuously with a fixed step size, and the threshold is periodically refreshed. Even with slow changes in background noise, the detection benchmark continuously updates with the noise, maintaining robustness. Attached Figure Description
[0015] Figure 1 This is a flowchart of an embodiment of the present invention.
[0016] Figure 2 This is a schematic diagram of the rising edge detection stage in an embodiment of the present invention.
[0017] Figure 3 This is a schematic diagram of the rising edge detection stage in an embodiment of the present invention, in which the first time window is used for detection with the initial window length.
[0018] Figure 4 This is a schematic diagram of the rising edge detection stage in an embodiment of the present invention, in which the first time window is used for detection with the maximum window length.
[0019] Figure 5 This is a schematic diagram of the falling edge detection stage in an embodiment of the present invention.
[0020] Figure 6 This is a schematic diagram of the first time window of the falling edge detection stage in an embodiment of the present invention, where the detection is performed with an initial window length.
[0021] Figure 7 This is a schematic diagram of the first time window of the falling edge detection stage in an embodiment of the present invention, where the detection is performed with the maximum window length.
[0022] Figure 8The above are simulation results of rising edge detection in this embodiment of the invention.
[0023] Figure 9 The following are simulation results of falling edge detection in this embodiment of the invention. Detailed Implementation
[0024] The present invention will be further described below with reference to the accompanying drawings and specific preferred embodiments, but this does not limit the scope of protection of the present invention.
[0025] This embodiment proposes a dynamic threshold pulse detection method to address detection errors caused by environmental changes, such as... Figure 1 As shown, it includes the following steps: S101) Acquire the signal to be detected and extract the envelope value of the signal to be detected; The rising edge detection phase includes: S102) Obtain the envelope values of all data points in the first time window and the second time window, wherein the first time window and the second time window are adjacent time windows; S103) Calculate the threshold value for pulse rising edge detection based on the envelope value of all data points in the first time window. If the envelope value of a specified number of data points in the second time window is greater than the threshold value for pulse rising edge detection, then a pulse rising edge is detected and the time between the first time window and the second time window is the rising edge time. Otherwise, after the first time window and the second time window move by a specified step, step S102 is executed again to perform the next round of pulse rising edge detection until a pulse rising edge is detected. Detecting the falling edge phase includes: S104) Obtain the envelope values of all data points in the first time window and the second time window; S105) Calculate the threshold value for pulse falling edge detection based on the envelope values of all data points in the first time window. If the envelope value of a specified number of data points in the second time window is less than the threshold value for pulse falling edge detection, then a pulse falling edge is detected and the time between the first time window and the second time window is the falling edge time. Otherwise, after the first time window and the second time window move by a specified step, step S104 is executed again to perform the next round of pulse falling edge detection until a pulse falling edge is detected.
[0026] By following the steps described above, the rising and falling edges of the signal can be detected, thereby determining the parameters of the pulse signal.
[0027] The relevant steps are explained in detail below.
[0028] In step S101 of this embodiment, when extracting the envelope value of the signal to be detected, the curve of the signal amplitude changing slowly over time can be obtained by using Hilbert transform, low-pass filtering, peak interpolation, etc. Figure 2 As shown by the blue line.
[0029] like Figure 2 As shown, when signal detection begins, it is in the rising edge detection phase, using adjacent first time windows M1 and second time windows M2 for rising edge detection. The window length of the first time window M1 is m1, and the window length of the second time window M2 is m2.
[0030] In step S103 of this embodiment, when calculating the threshold value for pulse rising edge detection based on the envelope values of all data points within the first time window M1, specifically, the average value of all envelope values within the first time window M1 is calculated, and then the average value is multiplied by a first coefficient k1 (k1>1) to obtain the threshold value for pulse rising edge detection at this time. The threshold value obtained at each moment is a point, and the set of threshold values obtained by the first time window M1 through all data is as follows: Figure 2 As shown by the red line in the middle.
[0031] In step S103 of this embodiment, after obtaining the threshold value for detecting the rising edge of the current pulse, the envelope value of all data points in the second time window M2 is compared with the threshold value. When the envelope value of 2 / 3 of the data points in the second time window M2 is greater than the threshold value for detecting the rising edge of the current pulse, it is determined that a rising edge has been detected. The time between the first time window M1 and the second time window M2 is the rising edge time. Since the first time window M1 and the second time window M2 are adjacent time windows... Figure 2 The time at which the left boundary of the second time window is located is the rising edge time.
[0032] If the proportion of data points with envelope values greater than the threshold value for the current rising edge detection within the second time window M2 is less than 2 / 3, it is determined that no rising edge was detected in this round. The first time window M1 and the second time window M2 are then moved to the right, and the next round of rising edge detection begins.
[0033] In this embodiment, to accommodate situations where the interval between two pulses is too short, the window length m1 of the first time window M1 is set to a relatively short value, such as 16 data points. However, when the interval between two pulses is too long, 16 data points are too few, and the obtained threshold value is not accurate enough. Therefore, in this embodiment, the window length m1 of the first time window M1 is set to 16 data points by default to calculate the threshold value for pulse rising edge detection, such as... Figure 3As shown. When no rising edge is detected, the window length of the first time window M1 is increased according to the number of times the second time window M2 is shifted to the right. When the window length m1 increases to a set maximum value, the first time window M1 has enough data points to calculate the threshold value, such as Figure 4 As shown. The first time window M1 and the second time window M2 are then shifted to the right simultaneously to detect the rising edge. Specifically, both the first time window M1 and the second time window M2 are shifted to the right by one data point at a time.
[0034] Therefore, in step S103, before the first time window and the second time window are shifted by a specified step length, it includes: If the window length m1 of the first time window M1 is less than the specified maximum value, the window length m1 of the first time window M1 is extended. Specifically, the right boundary of the first time window M1 is shifted to the right by a specified number of data points, and the second time window M2 is shifted to the right by a specified number of data points as a step length, and then step S102 is executed; If the window length m1 of the first time window M1 is equal to the maximum value, the steps of shifting the first time window M1 and the second time window M2 by the specified step length are executed.
[0035] After the rising edge is detected, it enters the falling edge detection stage, as Figure 5 shown. The first time window M1 and the second time window M2 are also used to detect the signal.
[0036] In step S105 of this embodiment, when calculating the threshold value for pulse falling edge detection based on the envelope values of all data points in the first time window, it is basically the same as step S103. Specifically, the average value of all envelope values in the first time window is calculated, and then the average value is multiplied by the second coefficient k2, where the second coefficient k2 is less than the first coefficient k1 (0 < k2 < 1), to obtain the threshold value for this pulse falling edge detection. The threshold value obtained at each moment is a point, and the set of threshold values obtained by the first time window M1 passing through all data is as Figure 5 shown by the red line in.
[0037] In step S105 of this embodiment, after obtaining the threshold value for this pulse falling edge detection, the envelope values of all data points in the second time window M2 are compared with this threshold value. When the envelope values of 2 / 3 of the data points in the second time window M2 are less than the threshold value for this pulse falling edge detection, it is determined that the falling edge is detected, and the moment between the first time window M1 and the second time window M2 is the falling edge moment. Since the first time window M1 and the second time window M2 are adjacent time windows, Figure 5The time when the left boundary of the second time window is located is the falling edge time. At this time, based on the detected rising edge time and falling edge time, the pulse detection result is output, and then the process jumps to step S102 to start the rising edge detection of the next pulse.
[0038] If the proportion of data points with envelope values less than the threshold value for the current pulse falling edge detection within the second time window M2 is less than 2 / 3, it is determined that no falling edge was detected in this round. The first time window M1 and the second time window M2 are then moved to the right, and the next round of falling edge detection begins.
[0039] In this embodiment, to accommodate situations where the interval between two pulses is too short, similar to rising edge detection, the window length m1 of the first time window M1 is set to 16 data points by default to calculate the threshold value for falling edge detection. Figure 6 As shown. When no falling edge is detected, the window length of the first time window M1 is increased according to the number of times the second time window M2 shifts to the right. When the window length m1 increases to a set maximum value, the first time window M1 has enough data points to calculate the threshold value, as shown. Figure 7 As shown, the first time window M1 and the second time window M2 simultaneously shift to the right to detect the falling edge. Specifically, both the first time window M1 and the second time window M2 move to the right in steps of one data point.
[0040] Therefore, before step S104 in this embodiment, the method further includes: restoring the window length m1 of the first time window M1 to the default value. Similarly, after detecting the falling edge and outputting the pulse detection result according to the detected rising edge time and falling edge time, the window length m1 of the first time window M1 should also be restored to the default value before starting the rising edge detection of the next pulse.
[0041] Similar to step S103, in step S105 of this embodiment, before the first time window and the second time window move by a specified step size, the following steps are included: If the window length of the first time window is less than the specified maximum value, then expand the window length of the first time window and then execute step S104; If the window length of the first time window is equal to the maximum value, then execute the step of moving the first time window and the second time window by the specified step.
[0042] The simulation was performed according to the above steps, and the results are as follows: Figure 8 and Figure 9 As shown. Figure 8 In the diagram, blue represents the signal envelope, red represents the threshold for rising edge detection, and pink represents the detected rising edge time. It is evident that the method in this embodiment can accurately detect the rising edge of the signal. Figure 9In the diagram, blue represents the signal envelope, red represents the threshold for falling edge detection, and green represents the detected falling edge time. It is evident that the method in this embodiment can accurately detect the falling edge of the signal.
[0043] This embodiment also proposes a dynamic threshold pulse detection system, including a processor and a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and the computer program is executed by the processor to implement the steps of the dynamic threshold pulse detection method.
[0044] This embodiment also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the dynamic threshold pulse detection method.
[0045] In this embodiment, the processor can be an FPGA, thereby implementing the determination of dynamic thresholds and the threshold-based pulse detection algorithm within the FPGA.
[0046] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the concept of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A dynamic threshold pulse detection method, characterized in that, Includes the following steps: S101) Acquire the signal to be detected and extract the envelope value of the signal to be detected; S102) Obtain the envelope values of all data points in the first time window and the second time window, wherein the first time window and the second time window are adjacent time windows; S103) Calculate the threshold value for pulse rising edge detection based on the envelope value of all data points in the first time window. If the envelope value of a specified number of data points in the second time window is greater than the threshold value for pulse rising edge detection, then a pulse rising edge is detected and the time between the first time window and the second time window is the rising edge time. Otherwise, after the first time window and the second time window move by a specified step, step S102 is executed again to perform the next round of pulse rising edge detection until a pulse rising edge is detected. S104) Obtain the envelope values of all data points in the first time window and the second time window; S105) Calculate the threshold value for pulse falling edge detection based on the envelope values of all data points in the first time window. If the envelope value of a specified number of data points in the second time window is less than the threshold value for pulse falling edge detection, then a pulse falling edge is detected and the time between the first time window and the second time window is the falling edge time. Otherwise, after the first time window and the second time window move by a specified step, step S104 is executed again to perform the next round of pulse falling edge detection until a pulse falling edge is detected.
2. The dynamic threshold pulse detection method according to claim 1, characterized in that, In step S103, when calculating the threshold value for pulse rising edge detection based on the envelope values of all data points within the first time window, the average value of all envelope values within the first time window is calculated, and then the average value is multiplied by a first coefficient to obtain the threshold value for pulse rising edge detection in this step.
3. The dynamic threshold pulse detection method according to claim 2, characterized in that, In step S105, when calculating the threshold value for pulse falling edge detection based on the envelope values of all data points within the first time window, the average value of all envelope values within the first time window is calculated, and then the average value is multiplied by the second coefficient to obtain the threshold value for pulse falling edge detection.
4. The dynamic threshold pulse detection method according to claim 1, characterized in that, In step S103, before the first and second time windows move by a specified step, the following steps are included: If the window length of the first time window is less than the specified maximum value, then expand the window length of the first time window and then execute step S102. If the window length of the first time window is equal to the maximum value, then execute the step of moving the first time window and the second time window by the specified step.
5. The dynamic threshold pulse detection method according to claim 4, characterized in that, When expanding the window length of the first time window, the right boundary of the first time window is shifted to the right by a specified number of data points, and the second time window is shifted to the right by a specified number of data points.
6. The dynamic threshold pulse detection method according to claim 4, characterized in that, Before step S104, the method further includes: restoring the window length of the first time window to its default value; in step S105, before the first and second time windows move by a specified step, the method further includes: If the window length of the first time window is less than the specified maximum value, then expand the window length of the first time window and then execute step S104; If the window length of the first time window is equal to the maximum value, then execute the step of moving the first time window and the second time window by the specified step.
7. The dynamic threshold pulse detection method according to claim 1, characterized in that, In steps S103 and S105, the envelope value of a specified number of data points within the second time window is specifically the envelope value of more than 2 / 3 of the data points within the second time window.
8. The dynamic threshold pulse detection method according to claim 1, characterized in that, In steps S103 and S105, the first time window and the second time window move by a specified step size, specifically, both the first time window and the second time window move to the right by a step size of one data point.
9. A dynamic threshold pulse detection system, characterized in that, The device includes a processor and a computer-readable storage medium storing a computer program, which is executed by the processor to implement the steps of the dynamic threshold pulse detection method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the dynamic threshold pulse detection method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Slurry signal identification method based on reliability analysis
CN108343429A
A satellite signal noise reduction processing method and device
CN109815877A
Unmanned aerial vehicle uplink and downlink communication link identification method based on signal characteristic difference
CN110519003A
False target interference identification method
CN111157966A
IFF pulse signal detection method based on FPGA
CN115758079A