Non-ideal pulse leading edge detection method and device based on energy inflection point
Technical Field
The invention relates to the field of edge detection algorithms, in particular to a non-ideal pulse leading edge detection method and device based on an energy inflection point.
Background
The cable is widely applied to power distribution systems of power grids and power supply systems in industries such as railways, aviation, manufacturing and the like. In order to avoid the influence of external force such as lightning stroke, wind damage and the like, the cable is usually buried in the system or underground, so that the fault of the cable cannot be identified and positioned by routing inspection like an overhead line, but a special method is needed.
The traveling wave method is a widely used cable fault location method, and detects and locates faults by using reflected traveling waves at discontinuous points of a cable, and the arrival time of reflected waves, namely the leading edge of the reflected waves, needs to be accurately measured. However, due to the dispersion effect of the cable itself, the bandwidth limitation of the receiving device, the signal interference and transmission on the propagation path, etc., the reflected wave may be distorted during the propagation process, and the pulse front edge no longer satisfies the characteristics of the ideal step signal, resulting in a deviation of the cable fault location algorithm based on the traveling wave arrival time. Therefore, a new method for detecting the leading edge of the non-ideal pulse with strong noise immunity and high accuracy is needed to reduce the error of the detection of the leading edge of the non-ideal pulse.
Disclosure of Invention
In order to solve the above mentioned drawbacks in the background art, the present invention provides a method and a device for detecting a leading edge of a non-ideal pulse based on an energy inflection point, wherein the method has the advantages of strong anti-noise capability and high accuracy, and effectively reduces the error of the detection of the leading edge of the non-ideal pulse.
The invention is realized by adopting the following technical scheme:
a non-ideal pulse front edge detection method based on energy inflection point regards the inflection point of the accumulated energy of the waveform as the starting time of the pulse front edge of a waveform with a non-ideal pulse front edge, and the purpose of non-ideal pulse front edge detection is achieved through the detection of the inflection point of the accumulated energy.
The method specifically comprises the following steps:
s1, sampling to obtain an original waveform;
s2, detecting the inflection point of the waveform accumulated energy;
and S3, obtaining the non-ideal pulse front edge starting moment according to the accumulated energy inflection point.
In step S2, the detection of the inflection point of the accumulated energy is specifically to perform inflection point detection on the accumulated energy by using a sliding window algorithm, and specifically includes:
s21, setting two adjacent windows to slide along the time direction of the waveform;
s22, calculating the difference between the first window and the second window;
and S23, detecting inflection points according to the differences.
The difference between the first window and the second window is specifically defined as:
d(f a..t ,f t..b )=|E a..t -E t..b | (1)
where d denotes the difference between the first and second windows, the subscript "a.. t" denotes "from time a to time t" and a and t denote the left and right edges of a time window, respectively, f denotes the signal itself, and E denotes the accumulated energy.
Preferably, the method for calculating the accumulated energy E specifically includes:
in practical applications, the integrated term can be replaced according to the effect and the calculation amount, including but not limited to f (tau) 2 And f (τ) | and the like.
In step S23, the definition of the inflection point is specifically: the position where the difference between the first window and the second window is the largest is considered as an inflection point.
In step S23, the step of detecting an inflection point according to the difference includes:
given a sliding time window width w, the knee detection function z (t) defining the sliding window is:
z(t)=d(f t-w..t ,f t..t+w ) (3)
the time at which the inflection point is located, i.e. the starting time of the leading edge of the non-ideal pulse, is:
in the formula, t dect Is the starting moment of the detected non-ideal pulse front edge.
The invention has the beneficial effects that:
the invention realizes the accurate detection of the leading edge of the non-ideal pulse based on the energy inflection point, improves the anti-noise capability of the detection of the leading edge of the non-ideal pulse, and effectively reduces the error of the detection of the leading edge of the non-ideal pulse.
Drawings
The invention will be further described with reference to the accompanying drawings.
FIG. 1 is a general flow diagram of the energy inflection point-based nonideal pulse front edge detection method and apparatus of the present invention;
FIG. 2 is a block diagram of a hardware device for the method and apparatus for energy inflection point based non-ideal leading edge detection of pulses of the present invention;
FIG. 3 is a diagram illustrating the effect of the non-ideal pulse front edge detection method and apparatus based on energy inflection point.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, a non-ideal pulse leading edge detection method based on energy inflection point includes the following steps:
s1, sampling to obtain an original waveform;
s2, setting a first sliding time window and a second sliding time window, and calculating the difference;
s3, solving the maximum difference position to obtain an accumulated energy inflection point;
and S4, obtaining the starting time of the non-ideal pulse front edge.
As shown in fig. 2, the non-ideal pulse leading edge detection device based on the energy inflection point comprises a voltage divider, a signal acquisition device, a signal transmission device and a signal processing device.
In the embodiment, in order to realize the attenuation of the high-voltage signal and meet the withstand voltage range of the signal acquisition equipment, a high-voltage broadband resistance-capacitance voltage divider is used for dividing the voltage of the original signal; collecting signals by using a high-speed data acquisition card; the signal transmission equipment transmits signals by using a wireless transmission module to realize remote monitoring and uploading of data; and signal processing is carried out on an STM32 board card, and the leading edge of the non-ideal pulse is detected, so that the detection of the non-ideal leading edge of the ns-level high-voltage pulse is realized.
The high-speed data acquisition card can adopt a commercially available high-speed data acquisition card with the sampling frequency of hundred megaHz grade, and uses LabView or MATLAB to drive a board card so as to effectively detect the nonideal pulse leading edge at ns grade.
The signal processing device adopts an MCU (micro controller unit) to reduce the consumption of computing resources.
A nonideal pulse leading edge detection method based on an energy inflection point specifically comprises the following steps: for a waveform with a non-ideal pulse leading edge, the inflection point of the accumulated energy of the waveform is regarded as the starting moment of the pulse leading edge, and the detection of the inflection point of the accumulated energy is used for achieving the purpose of non-ideal pulse leading edge detection.
In this embodiment, the detection of the inflection point of the accumulated energy specifically adopts a sliding window algorithm to perform inflection point detection on the accumulated energy:
two adjacent windows are arranged to slide along the time direction of the waveform, the difference between the first window and the second window is calculated, and an inflection point is detected according to the difference.
The difference between the first window and the second window is specifically defined as:
d(f a..t ,f t..b )=|E a..t -E t..b | (1)
where d denotes the difference between the first and second windows, the subscript "a.. t" denotes "from time a to time t" and a and t denote the left and right edges of a time window, respectively, f denotes the signal itself, and E denotes the accumulated energy.
In this embodiment, the method for calculating the accumulated energy E specifically includes:
in practical applications, the integrated term can be replaced according to the effect and the calculation amount, including but not limited to f (tau) 2 And f (τ) | and the like.
The definition of the inflection point is specifically as follows: the position where the difference between the first window and the second window is the largest is considered as an inflection point.
Detecting inflection points according to the difference, specifically:
given a sliding time window width w, which in this embodiment is chosen to be 100 Δ t, where Δ t is the sampling interval, the knee detection function z (t) defining the sliding window is:
z(t)=d(f t-w..t ,f t..t+w ) (3)
the moment of inflection point, i.e. the start moment t of the leading edge of the non-ideal pulse dect Comprises the following steps:
the method is used for detecting a waveform with a non-ideal pulse leading edge, the rising rate of the non-ideal pulse leading edge is 25ns, the signal-to-noise ratio of the waveform is 20dB, and the waveform is compared with a normalized threshold value comparison method and a Chichi information criterion method, wherein the normalized threshold value is selected to be 25%, and the implementation effect graph shown in figure 3 is obtained.
The above examples are merely illustrative of the specific procedures of the method of the present invention, and the scope of the claims of the present invention should not be limited thereto, and any modifications made based on the technical ideas of the present invention are within the scope of the present invention.