Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a method for eliminating peak singular signals in leakage current signals of a lightning arrester, which comprises the following steps:
s1: collecting leakage current signals of a lightning arrester;
s2: identifying peak singular signals in the lightning arrester leakage current signals based on a difference method or a period comparison method;
s3: and eliminating the peak singular signal in the lightning arrester leakage current signal based on a cubic spline interpolation method.
Specifically, when the peak singular signal in the lightning arrester leakage current signal is identified by adopting a difference method, the following steps are carried out:
s21: the lightning arrester leakage current signal comprises a plurality of acquisition point signals, and the acquisition point signals are arranged into x1, x2, … … and xn in time sequence;
s22: the signal values of the X1, X2, … … and xn acquisition points are processed by 1,2 … … m steps to obtain values by adopting a formula (1)Wherein k=1, 2 … … m; j=1, 2, 3, … …, n;
s23: setting a limit fixed value A, wherein A is more than 0, and differentiatingValues from the processingComparing with A, if->The j point is the peak singular point.
Specifically, when the peak singular signal in the lightning arrester leakage current signal is identified by adopting a period comparison method, the following steps are carried out:
s24: the lightning arrester leakage current signal comprises N periods, each period comprises M acquisition point signals, wherein the ith acquisition point signal in the jth period is expressed as x i+j*M Wherein i=1, 2, … …, M; j=0, 1, … …, N-1; grouping all acquisition Point signals in N cycles, wherein each group is denoted as Z i :{x i 、x i+M 、……、x i+(N-1)*M Total M groups;
s25: will Z i The two maximum values and the two minimum values of (a) are removed and recorded as
S26: will beThe numerical value in the middle is processed by arithmetic average value to obtain B i ;
S27: for each Z i Each sampling point x of (1) i+k Make a determination as to whether |x is satisfied i+k -B i |>γ*|B i I, wherein k=0, M, … …, (N-1) — M; wherein, gamma is an adjustment coefficient; if yes, sampling point x i+k Is a spike singular point.
Specifically, when eliminating the peak singular signal in the lightning arrester leakage current signal based on a cubic spline interpolation method, performing the following steps:
s31: the peak singular signal is a single point peak singular signal, and the single point peak singular signal is y 0 The time interval of signal acquisition is deltat, y 0 The front and back continuous sampling points are as follows: { y -3 、y -2 、y -1 、y 0 、y 1 、y 2 、y 3 Let x 1 =y -2 ,x 2 =y 2 ,h=4Δt,x′ 1 =(y -1 -y -3 )/(2Δt),x′ 2 =(y 3 -y 1 ) /(2Δt), substituting formula (2) to obtain a, b, c, d;
a=x 1 、b=x′ 1 、c=(3x 2 -3x 1 -hx′ 2 -2hx′ 1 )/h 2 、d=(2x 1 -2x 2 +hx′ 1 +hx′ 2 )/h 3 (2);
s32: substituting a, b, c, d into equation (3), where t 1 = -2 Δt, then calculating S (0) as interpolation point, replacing y 0 Namely eliminating single-point peak singular signals;
S(t)=a+b*(t-t 1 )+c*(t-t 1 ) 2 +d*(t-t 1 ) 3 (3)。
specifically, when eliminating the peak singular signal in the lightning arrester leakage current signal based on a cubic spline interpolation method, performing the following steps:
s33: the peak singular signal is a double-point peak singular signal, and the double-point peak singular signal is y 0 、y 1 Let x 1 =y -2 ,x 2 =y 3 ,h=5Δt,x′ 1 =(y -1 -y -3 )/(2Δt),x′ 2 =(y 4 -y 2 ) Substitution of/(2Δt) into (2) yields a, b, c, d;
a=x 1 、b=x′ 1 、c=(3x 2 -3x 1 -hx′ 2 -2hx′ 1 )/h 2 、d=(2x 1 -2x 2 +hx′ 1 +hx′ 2 )/h 3 (2);
s34: substituting a, b, c, d into equation (3), where t 1 = -2 Δt, then calculating S (0), S (Δt) as interpolation points, and replacing y respectively 0 And y 1 Namely eliminating the singular signals of the double point spike peaks;
S(t)=a+b*(t-t 1 )+c*(t-t 1 ) 2 +d*(t-t 1 ) 3 (3)。
the beneficial effects of the invention are as follows: the method of the invention can simply and rapidly detect the interference signals and can eliminate the interference signals through cubic spline interpolation.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, the invention provides a method for eliminating peak singular signals in leakage current signals of a lightning arrester, which comprises the following steps:
s1: collecting leakage current signals of a lightning arrester;
s2: identifying peak singular signals in the lightning arrester leakage current signals based on a difference method or a period comparison method;
in one embodiment, when the peak singular signal in the lightning arrester leakage current signal is identified by a difference method, the following steps are performed:
s21: the lightning arrester leakage current signal comprises a plurality of acquisition point signals, and the acquisition point signals are arranged into x1, x2, … … and xn in time sequence;
s22: the signal values of the X1, X2, … … and xn acquisition points are processed by 1,2 … … m steps to obtain values by adopting a formula (1)Wherein k=1, 2 … … m; j=1, 2, 3, … …, n;
s23: setting a limit fixed value A, wherein A is more than 0, and differentiating the obtained valueComparing with A, if->The j point is a peak singular signal point;
in general, in actual operation, only m=3 needs to be taken, i.e., the 1 st order differential processing, the 2 nd order differential processing, and the 3 rd order differential processing are performed.
For any continuous micro-signal function f (x), its first and higher derivatives are present, i.e., f' (x), f "(x), … …, f (n) (x) are all present; conversely, for a signal function f (x) where all derivatives do not exist at and above a point xi, the signal function f (x) is not differentiable, and then a sudden change occurs at that point. The method of the invention is based on the principle, and the lightning arrester leakage current without interference is known as a differentiable continuous signal, the sampling signal is a series of discrete points, the invention utilizes the difference of the sampling point signals to replace the derivative, and the result obtained after the difference is used for judging whether the sampling point signal is a peak singular signal point.
In one embodiment, when the peak singular signal in the lightning arrester leakage current signal is identified by using a period comparison method, the following steps are performed:
s24: the lightning arrester leakage current signal comprises N periods, each period comprises M acquisition point signals, wherein the ith acquisition point signal in the jth period is expressed as x i+j*M Wherein i=1, 2, … …, M; j=0, 1, … …, N-1; grouping all acquisition Point signals in N cycles, wherein each group is denoted as Z i :{x i 、x i+M 、……、x i+(N-1)*M Total M groups;
s25: will Z i The two maximum values and the two minimum values of (a) are removed and recorded as
S26: will beThe numerical value in the middle is processed by arithmetic average value to obtain B i ;
S27: for each Z i Each sampling point x of (1) i+k Make a determination as to whether |x is satisfied i+k -B i |>γ*|B i I, wherein k=0, M, … …, (N-1) — M; wherein, gamma is an adjustment coefficient; if yes, sampling point x i+k Is a spike singular point.
In general, in actual use, N > 4 and γ is 0.1.
Since the leakage current of the lightning arrester is a power frequency periodic signal generated by high voltage, the amplitude of the sampling signal at the corresponding sampling point of each period is almost equal, and if the sampling signal at the corresponding point is changed greatly, the point is considered to be suddenly changed. In the invention, whether the signal has spike mutation is judged based on the principle described above.
S3: and eliminating the peak singular signal in the lightning arrester leakage current signal based on a cubic spline interpolation method.
In one embodiment, when eliminating the spike singular signal in the arrester leakage current signal based on cubic spline interpolation, the following steps are performed:
s31: referring to FIG. 2, the spike singular signal is a single point spike singular signal 1, and the single point spike singular signal is y 0 The time interval of signal acquisition is deltat, y 0 The front and back continuous sampling points are as follows: { y -3 、y -2 、y -1 、y 0 、y 1 、y 2 、y 3 Let x 1 =y -2 ,x 2 =y 2 ,h=4Δt,x′ 1 =(y -1 -y -3 )/(2Δt),x′ 2 =(y 3 -y 1 ) /(2Δt), substituting formula (2) to obtain a, b, c, d;
a=x 1 、b=x′ 1 、c=(3x 2 -3x 1 -hx′ 2 -2hx′ 1 )/h 2 、d=(2x 1 -2x 2 +hx′ 1 +hx′ 2 )/h 3 (2);
s32: substituting a, b, c, d into equation (3), where t 1 = -2 Δt, then calculating S (0) as interpolation point, replacing y 0 Namely eliminating single-point peak singular signals;
S(t)=a+b*(t-t 1 )+c*(t-t 1 ) 2 +d*(t-t 1 ) 3 (3);
in one embodiment, when eliminating the spike singular signal in the arrester leakage current signal based on cubic spline interpolation, the following steps are performed:
s33: referring to FIG. 2, the peak singular signal is a two-point peak singular signal 2, and the two-point peak singular signal is y 0 、y 1 Let x 1 =y -2 ,x 2 =y 3 ,h=5Δt,x′ 1 =(y -1 -y -3 )/(2Δt),x′ 2 =(y 4 -y 2 ) And (2 Δt) is substituted into (1), a, b, c, d are calculated and substituted into (3), where t 1 = -2 Δt, then calculating S (0), S (Δt) as interpolation points, and replacing y respectively 0 And y 1 I.e. the double point spike singular signal is eliminated.
Wherein the derivation process of formula (2) is as follows:
the cubic spline interpolation function is: s (t) =a+b (t-t) 1 )+c*(t-t 1 ) 2 +d*(t-t 1 ) 3 (3)
The derivative is as follows: s' (t) =b+2c (t-t) 1 )+3d*(t-t 1 ) 2 (4)
Here, theSampling point x 1 The sampling time is t 1 Another sampling point x 2 The sampling time is t 2 =t 1 +h, point sample time t where interpolation is required k The method comprises the following steps: t is t 1 <t k <t 2 Then
S(t 1 )=x 1 ,S(t 2 )=x 2 Substituting into formula (3) to obtain
a=x 1 (5)
a+h*b+h 2 *c+h 3 *d=x 2 (6)
In order to keep the spline interpolation function interpolation points smooth, it is therefore necessary to keep S' (t) 1 )=x′ 1 ,S′(t 2 )=x′ 2 Substituting (4) to obtain
b=x′ 1 (7)
b+2h*c+3h 2 *d=x′ 2 (8)
The spline interpolation function parameters a, b, c and d can be obtained by the combination of (5) (6) (7) (8) to obtain the formula (2)
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.