A kind of signal amplitude measuring method based on the plural spectral lines of two DFT
Technical field
The present invention relates to a kind of signal amplitude and Method for Phase Difference Measurement based on the plural spectral lines of two DFT, belong to signal ginseng
Number field of measuring technique.
Background technology
Currently, the method based on discrete Fourier transform DFT or its fast algorithm fft analysis frequency signal makes extensively
With.But, there is DFT hurdle effect, i.e. actual signal frequency may not fall in discrete spectral line, thus need to use interpolation algorithm
Estimate frequency, amplitude and the phase of actual signal.2003《Proceedings of the CSEE》That is delivered on the phase of volume 23 6 " applies FFT
Proposed in the innovatory algorithm of progress harmonic analysis in power system " article to after input discrete signal adding window Fourier transformation, leading to
Cross selection amplitude highest and time high two spectral lines, the method for interpolation measurement signal frequency, amplitude and phase.If two spectral lines
Discrete frequency sequence number corresponds to k respectively1And k2=k1+ 1, the then corresponding position k of actual signal frequency0Meet k1≤k0≤k2.Introduce
One auxiliary parameter α=k0-k1- 0.5, ignore the interference of other signals, then α number range is [- 0.5,0.5].Thus, it is based on
Two spectral line amplitudes | Y (k1) | and | Y (k2) | calculating signal amplitude A can calculate according to following interpolation formula:
For general real coefficient window function, when n is large, above formula can be further simplified as A=(1/N) (| Y
(k1)|+|Y(k2) |) v (α) form, v (α) is the function of frequency deviation parameter alpha and unrelated with N.If using M times force of highest
Nearly polynomial computation function, then signal amplitude A calculation formula can be further represented as:
The phase calculation formula that existing method has been provided is:
θ=arg (Y (ki))+π/2-arg(W(2π·(ki-k0)/N))
Wherein, i takes 1 or 2.
Existing methods deficiency is that the calculating of signal amplitude and phase is separate, and its amplitude, which is calculated, to be needed to calculate
The quadratic sum and then progress evolution of real and imaginary parts, its phase calculation need to calculate Y (ki) and W (2 π (ki-k0)/N) two
The angle of plural number, so computationally intensive.Method is also easy to the secondary lobe interference by other frequency signals simultaneously.
The content of the invention
It is an object of the invention to provide a kind of signal amplitude measuring method based on the plural spectral lines of two DFT, to solve
The problem of existing method amount of exercise is greatly and secondary lobe is disturbed.
To achieve the above object, the solution of the present invention includes:
A kind of signal amplitude measuring method based on the plural spectral lines of two DFT, step is as follows:
Step (1):It is F by sample rateS, sampled point be the sampled signal x (n) of N points continuously intercepted, carry out windowing process
Windowing signal y (n) is obtained, windowing process formula is:
Y (n)=x (n) w (n),
Wherein w (n) is the window function sequence of N points, n=0:(N-1);
Step (2):Discrete fourier DFT transform is carried out to windowing signal y (n), discrete spectrum Y (k) is obtained, wherein discrete
Frequency sequence number k=0:(N-1);
Step (3):According to required measurement amplitude and the frequency f of the signal of phase0Corresponding discrete frequency sequence number value k0,
Find and close on k0Two spectral lines, its discrete frequency sequence number is respectively k1And k2, wherein k0=Nf0/FS, k1Equal to no more than
k0Maximum integer, i.e. k1=floor (k0), k2=k1+1;
Step (4):According to k1And k2Corresponding two plural number spectral line Y (k1) and Y (k2) calculate intermediate parameters Y:
Step (5):Respective frequencies f0Measured signal amplitude measurement result A be equal to intermediate parameters Y mould, i.e. A=| Y |.
Described step (4) calculates intermediate parameters Y using approximating polynomial, and its calculation formula is:
Wherein, α=k0-k1- 0.5, P and Q are the highest number of times of real and imaginary parts approximating polynomial, b respectivelyp(p=0:P)
And cq(q=0:Q) it is respectively real part approximating polynomial pth time item αpWith the q times item α of imaginary part approximating polynomialqCoefficient.
The design principle of frequency measurement method of the present invention is:Assuming that a frequency is f0, amplitude be list that A, initial phase are θ
One frequency signal x (t), obtains the discrete signal of following form after it have passed through the analog to digital conversion that sample rate is Fs:
If the forms of time and space of institute's windowed function is w (n), the continuous frequency spectrum that its discrete time Fourier transform DTFT is obtained
For W (ω), then ignore negative frequency-f0Locate the secondary lobe influence at frequency peak, in positive frequency f0Neighbouring continuous frequency spectrum function can be expressed
For:
Above formula carries out discrete sampling, you can the expression formula for obtaining DFT DFT is:
Wherein, discrete frequency intervals are Δ f=FS/N.Then,
Wherein, discrete frequency intervals are Δ f=FS/N.Thus,
So, directly calculated using plural spectral line obtained by moulds of the amplitude measurement result A equal to intermediate parameters Y, phase
Position measurement result θ is equal to Y argument.
Cosine window function is the most commonly used class window functions of DFT.Correspondingly the unified forms of time and space of cosine window function is:
Cosine Window w (n) discrete time Fourier transform DTFT results are:
Wherein:
In the main lobe of signal DTFT spectrum curves, and when n is large, approximately have:
WhenWhen, above formula takes equal sign.According to conventional cosine window function coefficient, in main lobe-H<k<In H, its is adjacent
Two spectral line W (ω) andPhase difference be approximately π;And correspondence H<k<In N/2 secondary lobe W (ω) andClose to same-phase.Thus, to the processing of most cosine window function frequency domainsIt is resulting
New window function, being capable of further suppressed sidelobes, therefore other frequency signals and its DFT negative frequency signal pair can be reduced
The influence of frequency signal spectral line to be measured, so as to improve measurement accuracy.
Brief description of the drawings
Fig. 1 is the procedure chart of amplitude measurement of the present invention;
Fig. 2 is the embodiment of the present invention while measuring the procedure chart of amplitude and phase.
Embodiment
The present invention will be further described in detail below in conjunction with the accompanying drawings.
Following two embodiments are used to measure the frequency signal near 50Hz, and in measurement amplitude signal
Meanwhile, also give phase.
Embodiment 1
Step (1):By sample rate Fs=1500Hz, the signal x (n) of continuous interception N=512 points, carry out windowing process and obtain
To windowing signal y (n), windowing process formula is:
Y (n)=x (n) w (n),
Wherein w (n) selects the Hanning window function sequences of N=512 points, i.e.,:
Step (2):Discrete fourier DFT transform is carried out to windowing signal y (n), discrete spectrum Y (k) is obtained, wherein discrete
Frequency sequence number k=0:(N-1);
Step (3):According to required measurement amplitude and the frequency f of the signal of phase0Corresponding discrete frequency sequence number value k0,
Find and close on k0Two spectral lines, its discrete frequency sequence number is respectively k1And k2, wherein k0=Nf0/FS, k1Equal to no more than
k0Maximum integer, i.e. k1=floor (k0), k2=k1+1;
Step (4):According to k1And k2Corresponding two plural number spectral line Y (k1) and Y (k2) calculate intermediate parameters Y:
Wherein, α=k0-k1-0.5;
Step (5):Respective frequencies f0Measured signal amplitude measurement result A be equal to intermediate parameters Y mould, phase measurement
As a result θ is equal to Y argument, i.e.,:
Embodiment 2
Step (1):By sample rate Fs=1500Hz, the signal x (n) of continuous interception N=512 points, carry out windowing process and obtain
To windowing signal y (n), windowing process formula is:
Y (n)=x (n) w (n),
Wherein w (n) selects Blacknam (BlackMan) window function sequence of N=512 points, i.e.,:
Step (2):Discrete fourier DFT transform is carried out to windowing signal y (n), discrete spectrum Y (k) is obtained, wherein discrete
Frequency sequence number k=0:(N-1);
Step (3):According to required measurement amplitude and the frequency f of the signal of phase0Corresponding discrete frequency sequence number value k0,
Find and close on k0Two spectral lines, its discrete frequency sequence number is respectively k1And k2, wherein k0=Nf0/FS, k1Equal to no more than
k0Maximum integer, i.e. k1=floor (k0), k2=k1+1;
Step (4):Intermediate parameters Y, the highest number of times point of real and imaginary parts approximating polynomial are calculated using approximating polynomial
Wei not be 7 times and 6 times, the actual calculation formula used for:
Wherein, α=k0-k1-0.5;
Step (5):Respective frequencies f0Measured signal amplitude measurement result A be equal to intermediate parameters Y mould, phase measurement
As a result arguments of the θ equal to Y adds pi/2, i.e.,:
According to first and second embodiment, one group of emulation testing data of identical are inputted respectively, to verify two
The result of calculation of embodiment.The input signal x (n) is fundamental frequency f1For 50.1Hz, the signals of 2 to 9 subharmonic is included, specifically
Form is:
Wherein, the amplitude of fundamental wave and each harmonic is respectively:1,0.02,0.1,0.01,0.05,0.0,0.02,0.0,
0.01;Initial phase is -23.1 ° respectively, 115.6 °, 59.3 °, 52.4 °, 123.8 °, 161.8 °, -31.8 °, 119.9 °, -
63.7°.The amplitude and phase of measurement 50.1Hz fundamental signals are needed in emulation testing.Fundamental frequency f0Corresponding discrete frequency
Sequence number value k0=17.1008, selection closes on k0Two spectral lines discrete frequency sequence number k1=17 and k2=18.
In first embodiment using the peaceful window in Kazakhstan, the complex values of two spectral lines of discrete frequency serial number range 17 and 18
For:Y(k1)=- 10.9858392-j126.688437, Y (k2)=6.36734959+j73.4295187.Thus,
Finally, the measurement result of amplitude is A=| Y |=1.0000000229, relative error 0.00000229%;Phase
Measurement result is -0.403170967rad, i.e., -23.09999483 °, 0.00000517 ° of absolute error.
Using in second embodiment of Blackman window, two spectral lines of discrete frequency serial number range 17 and 18 are answered
Numerical value is:Y(k1)=- 9.38422261-j108.21320679, Y (k2)=6.10560557+j70.41558734.Thus,
Finally, the measurement result of amplitude is A=| Y |=1.0000016114, relative error 0.00016114%;Phase
Measurement result is -0.4031777747rad, i.e., -23.10038489 °, -0.00038489 ° of absolute error.
Specific embodiment is presented above, but the present invention is not limited to described embodiment.The base of the present invention
This thinking is above-mentioned basic scheme, for those of ordinary skill in the art, according to the teachings of the present invention, designs various changes
The model of shape, formula, parameter simultaneously need not spend creative work.It is right without departing from the principles and spirit of the present invention
The change, modification, replacement and modification that embodiment is carried out are still fallen within protection scope of the present invention.