A kind of voltage fluctuation and flicker detection method and device based on energy operator and Spectrum Correction
Technical field
The present invention relates to a kind of voltage fluctuation and flicker detection method and device based on energy operator and Spectrum Correction.
Background technology
Electric load, especially impact load sharply increase, and electric system has been consisted of serious pollution, cause line voltage unstable, produce voltage fluctuation and flickering, have increased the labile factor of electrical network, have caused for commercial production and social life and have a strong impact on.Voltage flicker is the important parameter of the quality of power supply, is the major reason that causes confession, consumer fault and inefficacy.To carrying out Measurement accuracy for the voltage flicker in, using electricity system, the impact etc. that can be research flickering root, inhibition and elimination voltage fluctuation and flickering provides scientific basis.
The detection of voltage fluctuation and flicker is adopted short time flicker value P both at home and abroad all according to the IEC standard
stWith long-time flickering value P
ltAs the evaluation index of flickering, but only provided the detection theory diagram of weighing the strong and weak value of flickering due to IEC in standard, block diagram has not been realized offering some clarification on, the various countries scholar uses this block diagram to realize short time flicker value P
st, long-time flickering value P
ltComputing method different.Existing voltage flicker measuring method mainly contain FFT/STFT method, Hilbert transform method, EKF (EKF), least absolute value estimate (LAV) method, small wave converting method, based on Mathematical Morphology Filtering and Hilbert transform method, parallel filter detection method and square detection method.Adopt these methods to carry out detection and can accurately detect the flicker envelope signal, but these method operands are large, the Implementation of Embedded System difficulty is difficult to satisfy the requirement of flickering parameter fast detecting.
Based on the flicker detection algorithm of FFT, be easy to the digital signal processor at DSP() the upper realization is that a kind of flickering parameter that is widely used now employing detects in real time, the flickering value is simplified computing method.In electric system, line voltage, current distortion cause the flicker frequency fluctuation, have the problems such as spectral leakage and fence effect because non-synchronous sampling causes fft algorithm, have restricted the accuracy of flickering fast detecting.And, the impact that the parameter extraction of flicker envelope signal is changed by the parameters such as signal frequency, waveform, amplitude and sampled data length, the extraction error of formation flicker envelope parameter.Spectral leakage and the fence effect that reduces fft algorithm affects, the accuracy of detection of raising flicker envelope parameter is the difficult problem in flickering input and Power quality management.
existing patent document " a kind of flickering real-time computing technique " (201210363581.6), " the Injection Level detection method is polluted in the flickering of disturbance load " (201210179485.6), " a kind of definite voltage flicker primary responsibility party's method and apparatus " (201110367781.4), " a kind of method of measuring electric network voltage flicker " (201110124225.4), " based on the voltage fluctuation flickering measurement method of digital synchronization carrier wave coherent demodulation technology " (200910076715.4), " a kind of flicker demodulation method " (200710144772.2) and " digital voltage flicker tester " (91105178.3) etc., realized voltage flicker value and the party responsible who differentiates interference in accurate quantification ground measurement electric system.Although prior art provides the method for some voltage detections and flicker measurement, but have the features such as diversity, randomness and polymorphism due to the flickering signal, spectral leakage and fence effect that the flicker frequency fluctuation causes still exist, and be more consuming time to extraction and the calculating of envelope signal; Adopt the Cosine Window of regular length to carry out the FFT Fourier transform to the voltage sample sequence in prior art, change when excessive in flickering signal frequency, waveform, amplitude, can't accurately obtain frequency component and the amplitude components of flickering voltage signal, therefore real-time, high-precision flickering input is difficult to realize.
Summary of the invention
The invention provides a kind of voltage fluctuation and flicker detection method and device based on energy operator and Spectrum Correction, its purpose is, overcome the prior art computing velocity slow, flickering signal frequency, waveform, amplitude change when excessive, can't accurately obtain the spectrum component of flickering voltage signal and the problem of fluctuation amplitude.
Voltage fluctuation and flicker detection method based on energy operator and Spectrum Correction comprises the following steps:
Step 1: fixed sampling frequency f is set
sWith sampling number N, wherein, N is natural number, synchronized sampling and analog-to-digital conversion process are carried out in measured signal, obtain voltage flicker discrete signal u (n), utilize the Teager-Kaiser energy operator to extract envelope to u (n), namely u (n) is carried out demodulation process, obtain envelope signal U
r(n);
Wherein, TK (n) is the Teager-Kaiser energy operator of voltage flicker signal;
The voltage flicker signal is take power-frequency voltage as carrier signal, and by the result of low frequency modulated wave signal modulation, the expression formula of flickering voltage u (t) is as follows:
u(t)=[1+v(t)]cos(2πf
0t+φ
0)
In formula, v (t) is the modulated wave voltage signal; f
0It is the frequency of work frequency carrier signal; f
iIt is the frequency of modulated wave signal; A
iThat the flicker envelope fluctuation is the amplitude of modulated wave; φ
0It is the initial phase angle of carrier signal;
It is the initial phase angle of modulated wave signal; H represents to comprise the item number of modulated wave signal;
Step 2: build the Kaiser window sequence, its discrete expression is W (n), utilizes the Kaiser window sequence to U
r(n) improve Fast Fourier Transform (FFT) FFT after windowing, then obtain through after discrete processes
The spectral line U of frequency place
W(k Δ f),
To U
W(k Δ f) carries out two spectral line difference computings, obtains the spectrum component f of envelope signal
iWith amplitude A
i
Wherein, I
0Be (β) the 1st class distortion zero Bessel function, β is the form parameter of Kaiser window function, is the positive count value; N is the length of Kaiser window sequence, i.e. sampling number; N is the sample variance point;
f
i=k
iΔf=(α+k
i1+0.5)Δf
Wherein, W () is the continuous frequency spectrum function of Kaiser window, and N is the length of Kaiser window function, at peak value frequency f
iCorresponding spectral line k
iThe first amplitude and the second amplitude spectral line that near sampling obtains are respectively k
i1And k
i2, k
i1≤ k
i≤ k
i2(k
i2=k
i1+ 1), the amplitude of these two spectral lines is respectively y
1=| U
W(k
i1Δ f) | and y
2=| U
W(k
i2Δ f) |;
Envelope signal is the discrete Fourier transformation expression formula U of modulated wave signal
W(k Δ f) is as follows:
I item flicker envelope signal is the discrete Fourier transformation expression formula U of modulated wave signal
W(k Δ f) is as follows:
Wherein: A
iIt is the amplitude of i item flicker envelope modulated wave;
It is the initial phase angle of i item modulated wave signal; H represents to comprise the item number of modulated wave signal;
Utilize the Kaiser window function to amplitude A
iAdopt polynomial expression to approach approximating method correction:
Wherein, α=k
i-k
i1-0.5, α span is [0.5,0.5];
Step 3: calculate instantaneous flicker value p:
Wherein, du
iCorresponding frequencies f during for instantaneous flicker value p=1
iCorresponding voltage fluctuation standard value d (%); L is maximum flickering occurrence frequency f in this frequency spectrum
iCorresponding numerical value, Δ U
f(f
i) be discrete magnitude of a voltage fluctuation ordered series of numbers, Δ U
f(f
i)=2 * | U
f(f
i) |;
Step 4: the short time flicker value is calculated
Repeating step 1 calculates each instantaneous flicker value p in 10 minutes successively to step 3, finds out the large value of probability corresponding to 99.9%, 99%, 97%, 90% and 50% probability from the p sequence by linear interpolation algorithm, is designated as respectively successively p
0.1, p
1, p
3, p
10And p
50, calculate short time flicker value P
st:
Wherein, p
0.1, p
1, p
3, p
10, p
50Be respectively the instantaneous flicker value of 10min voltage fluctuation cumulative probability function (CPF) curve ordinate 0.1%, 1%, 3%, 10%, 50% correspondence.
Each instantaneous flicker amount p is the sequence of discrete p on the equal time of the interval due to a period of time (10min), if wherein be not less than some p(such as p
N) time corresponding to all p account for the N (%) of whole period, be not less than p
NThe number of all p also should account for the N (%) of p sum in this period, i.e. p
NIt is the large value of (100-N) % probability of p sequence in this period.The p sequence by rearranging from big to small, and is obtained every large value p of probability in sequence as stated above
NCorresponding probability (100-N) % within the period.
Described in step 1 synchronized sampling is carried out in measured signal before, three phase network voltage, current analog signal access respectively resistance pressure-dividing network and TA resistance sampling network carries out signal condition.
Sample frequency f described in step 1
sSpan be 400Hz~52KHz.
The span of the form parameter β of the Kaiser window function described in step 2 is 20~50.
Long-time flickering value P
ltBy each short time flicker value P that records in the Measuring Time section
stkFor
In formula, M=120, namely Measuring Time is 2h.
A kind of voltage fluctuation and flicker pick-up unit based on energy operator and Spectrum Correction adopts method described above to detect the voltage fluctuation and flicker device, comprises signal condition unit, data processing unit and data storage and display unit; Signal condition unit, data processing unit and data storage and display unit are connected successively;
Wherein, the signal condition unit comprises reaching for the electric resistance partial pressure modulate circuit that is connected with voltage signal output end, the TA resistance sampling circuit that is used for being connected with current signal and synchronizes the ADC converter; Electric resistance partial pressure modulate circuit and TA resistance sampling circuit all with synchronize the ADC converter and be connected.
Described data processing unit comprises Teager-Kaiser energy operator extraction module, Kaiser window Spectrum Correction module, visual sense degree processing module and flickering signal sequencing statistical module.
Described data storage and display unit comprises data processor, clock circuit, storer, telecommunication circuit and display module, and clock circuit, storer, telecommunication circuit and display module all are connected with data processor.
The synchronous ADC converter of described signal condition unit adopts SPI to be connected with data processing unit; It is characterized in that, described data processing unit adopts asynchronous serial bus UART to be connected with the data storage and display unit.
Described synchronous ADC converter is ADS1178, and described data processing unit adopts the TMS320VC6745/6747 chip, and described data storage and display unit data processor adopts PIC32MX460F512L, and described display module is 256 look TFT bus-type touch LCD screens.
Utilize the Kaiser window function to amplitude A
iAdopt polynomial expression to approach approximating method correction, detailed step is as follows:
1) make λ=(y
2-y
1)/(y
2+ y
1), α=k
i-k
i1-0.5, α span is [0.5,0.5], is calculated as follows α:
2) the spectrum amplitude function of Kaiser window is
Make w=2 π kN, can get
Will
Substitution formula (9), by
And N is generally larger, can get
Formula (10) substitution formula (7) is utilized in the Matlab platform curve polyfit () function to carry out fitting of a polynomial and is approached, and can get α=f
1(λ) approximant is
α=F(λ) (11)
Can obtain parameter alpha by λ, the amplitude correction of i item modulated wave is to k
i1And k
i2Two spectral lines are weighted on average, and its computing formula is
In formula: y
1=| U
W(k
i1Δ f) | and y
2=| U
W(k
i2Δ f) |.
When the N value was larger, formula (12) can be reduced to
A
i=N
-1(y
1+y
2)v(α) (13)
In like manner, adopt polynomial expression to approach, can get it and approximantly be
A
i=N
-1(y
1+y
2)g(α) (14)
In get one group of α value, obtain corresponding one group of λ and v (α) value by formula (7) and formula (13) respectively, call polyfit in the Matlab platform (α, λ, m) function and carry out anti-fitting, obtain the coefficient of polynomial expression F (λ), (m) function is obtained the coefficient of polynomial expression g (α) for α, v (α) to call polyfit again, wherein, m is the polynomial exponent number of approach.Can be based on the interpolation correction formula of Kaiser window:
α=H(λ)=4.26201515λ+0.50674586λ
3+0.22516483λ
5+0.13687018λ
7
g(α)=3.81160858+0.79465173α
2+0.08673112α
4+0.00679640α
6 (15)
, fluctuation amplitude correction formula is:
Beneficial effect
The invention provides a kind of voltage fluctuation and flicker detection method and device based on energy operator and Spectrum Correction, by utilizing the Teager-Kaiser energy operator to extract the envelope signal of voltage flicker signal, accelerate arithmetic speed, the impact that changed by the parameters such as signal frequency, waveform, amplitude and sampled data length realizes detecting in real time fast of flickering signal; Employing can freely select the Kaiser window function of the proportion between main lobe width and secondary lobe height to improve the analysis of Fast Fourier Transform (FFT) Spectrum Correction to the voltage flicker signal, change when excessive in flickering signal frequency, waveform, amplitude, accurately obtain frequency component and the amplitude components of voltage flicker signal; Apparatus structure based on the method is simple, is easy to realize, comprises signal condition unit, data processing unit and data storage and display unit; Signal condition unit, data processing unit and data storage and display unit are connected successively; The signal condition unit comprises reaching for the electric resistance partial pressure modulate circuit that is connected with voltage signal output end, the TA resistance sampling circuit that is used for being connected with current signal synchronizes the ADC converter; Electric resistance partial pressure modulate circuit and TA resistance sampling circuit all with synchronize the ADC converter and be connected.This detection method is convenient to fast in real time Check processing and the Implementation of Embedded System of signal, can be continuously, for a long time measured signal is detected.
Description of drawings
Fig. 1 is voltage flicker parameter detecting of the present invention and flickering value calculation process block diagram;
Fig. 2 is apparatus structure block diagram of the present invention;
Fig. 3 is voltage flicker of the present invention and fluctuation measuring principle block diagram;
Kaiser window discrete time-domain performance plot when Fig. 4 is β=[0,4,8,11];
Kaiser window amplitude versus frequency characte figure when Fig. 5 is β=[0,4,8,11];
Fig. 6 is Kaiser window FFT double spectral line interpolation algorithm schematic diagram;
Fig. 7 is the graph of relation of each frequency of instantaneous flicker amount of the present invention and magnitude of a voltage fluctuation.
Embodiment
The present invention will be further described below in conjunction with accompanying drawing.
The present embodiment is the flickering cell board flickering parameter detecting part that can be used for realizing power system voltage fluctuation and flicker detection device, equipment for monitoring power quality.
In setting the present embodiment, ADC selects 16 high speeds, 8 Channel Synchronous sampling A/D chip ADS1178, and dsp processor is selected TMS320VC6745, and major parameter is selected as follows:
(1) sampling rate: f
s=52k;
(2) electrical network fundamental frequency: in 50Hz left and right fluctuation;
(3) FFT operational data length: N=512;
(4) flickering input frequency range: 0.05~35Hz.
As shown in Figure 1, be voltage flicker parameter detecting of the present invention and flickering value calculation process block diagram, concrete steps are as follows:
Step 1: fixed sampling frequency f is set
sWith sampling number N, wherein, N is natural number, synchronized sampling and analog-to-digital conversion process are carried out in measured signal, obtain voltage flicker discrete signal u (n), utilize the Teager-Kaiser energy operator to extract envelope to u (n), namely u (n) is carried out demodulation process, obtain envelope signal U
r(n);
Wherein, TK (n) is the Teager-Kaiser energy operator of voltage flicker signal;
The voltage flicker signal is take power-frequency voltage as carrier signal, and by the result of low frequency modulated wave signal modulation, the expression formula of flickering voltage u (t) is as follows:
u(t)=[1+v(t)]cos(2πf
0t+φ
0)
In formula, v (t) is the modulated wave voltage signal; f
0It is the frequency of work frequency carrier signal; f
iIt is the frequency of modulated wave signal; A
iThat the flicker envelope fluctuation is the amplitude of modulated wave; φ
0It is the initial phase angle of carrier signal;
It is the initial phase angle of modulated wave signal; H represents to comprise the item number of modulated wave signal;
Step 2: build the Kaiser window sequence, its discrete expression is W (n), utilizes the Kaiser window sequence to U
r(n) improve Fast Fourier Transform (FFT) FFT after windowing, then obtain through after discrete processes
The spectral line U of frequency place
W(k Δ f),
To U
W(k Δ f) carries out two spectral line difference computings, obtains the spectrum component f of envelope signal
iWith amplitude A
i
Wherein, I
0Be (β) the 1st class distortion zero Bessel function, β is the form parameter of Kaiser window function, is the positive count value, as shown in Figure 4 and Figure 5; N is the length of Kaiser window sequence, i.e. sampling number, and the N value is 512; N is the sample variance point; The present embodiment is selected the Kaiser window of β=20 o'clock to carry out FFT to process.
f
i=k
iΔf=(α+k
i1+0.5)Δf
Wherein, W () is the continuous frequency spectrum function of Kaiser window, and N is the length of Kaiser window function, at peak value frequency f
iCorresponding spectral line k
iThe first amplitude and the second amplitude spectral line that near sampling obtains are respectively k
i1And k
i2, k
i1≤ k
i≤ k
i2(k
i2=k
i1+ 1), the amplitude of these two spectral lines is respectively y
1=| U
W(k
i1Δ f) | and y
2=| U
W(k
i2Δ f) |;
In the present embodiment the schematic diagram of double spectral line interpolation algorithm as shown in Figure 6, k
i1And k
i2Represent respectively near two spectral lines that actual frequency point is, with the modulated wave frequency f
i=2.2Hz is example, k
i1And k
i2To be positioned at 2~3Hz frequency range.
Envelope signal is the discrete Fourier transformation expression formula U of modulated wave signal
W(k Δ f) is as follows:
I item flicker envelope signal is the discrete Fourier transformation expression formula U of modulated wave signal
W(k Δ f) is as follows:
Wherein: A
iIt is the amplitude of i item flicker envelope modulated wave;
It is the initial phase angle of i item modulated wave signal; H represents to comprise the item number of modulated wave signal;
Utilize the Kaiser window function to amplitude A
iAdopt polynomial expression to approach approximating method correction:
Wherein, α=k
i-k
i1-0.5, α span is [0.5,0.5];
Step 3: calculate instantaneous flicker value p:
Wherein, du
iCorresponding frequencies f during for instantaneous flicker value p=1
iCorresponding voltage fluctuation standard value d (%); L is maximum flickering occurrence frequency f in this frequency spectrum
iCorresponding numerical value, Δ U
f(f
i) be discrete magnitude of a voltage fluctuation ordered series of numbers, Δ U
f(f
i)=2 * | U
f(f
i) |;
Step 4: the short time flicker value is calculated
Repeating step 1 calculates each instantaneous flicker value p in 10 minutes successively to step 3, finds out the large value of probability corresponding to 99.9%, 99%, 97%, 90% and 50% probability from the p sequence by linear interpolation algorithm, is designated as respectively successively p
0.1, p
1, p
3, p
10And p
50, calculate short time flicker value P
st:
In formula, p
0.1, p
1, p
3, p
10, p
50Be respectively the instantaneous flicker value of 10min voltage fluctuation cumulative probability function (CPF) curve ordinate 0.1%, 1%, 3%, 10%, 50% correspondence.
Long-time flickering value P
ltBy each short time flicker value P that records in the Measuring Time section
stkFor
In formula, M=120, namely Measuring Time is 2h.
During due to the instantaneous flicker amount p=1 that provides in the IEC61000-4-15 standard, the value of the corresponding relation of frequency and sinusoidal voltage undulating quantity d is limited, and the frequency that is drawn by spectrum analysis differs and establishes a capital in table.Therefore, the present invention adopts in the spline method his-and-hers watches data to carry out interpolation and curve, the relation curve of magnitude of a voltage fluctuation and frequency when finding out instantaneous flicker amount p=1, thus obtain improving through the Kaiser window each frequency f that the FFT spectrum analysis draws
iCorresponding voltage fluctuation standard value du
i, the weighting of visual sense degree is carried out in the voltage fluctuation of this frequency is processed.In the present embodiment, during instantaneous flicker amount p=1, the relation curve of each frequency and relevant voltage undulating quantity as shown in Figure 7.
As shown in Figure 2, be structured flowchart of the present invention, a kind of voltage fluctuation and flicker pick-up unit based on energy operator and Spectrum Correction comprises signal condition unit, data processing unit and data storage and display unit; Signal condition unit, data processing unit and data storage and display unit are connected successively;
Wherein, the signal condition unit comprises reaching for the electric resistance partial pressure modulate circuit that is connected with voltage signal output end, the TA resistance sampling circuit that is used for being connected with current signal and synchronizes the ADC converter; Electric resistance partial pressure modulate circuit and TA resistance sampling circuit all with synchronize the ADC converter and be connected.
Described data processing unit comprises Teager-Kaiser energy operator extraction module, Kaiser window Spectrum Correction module, visual sense degree processing module and flickering signal sequencing statistical module.
Described data storage and display unit comprises data processor, clock circuit, storer, telecommunication circuit and display module, and clock circuit, storer, telecommunication circuit and display module all are connected with data processor.
The synchronous ADC converter of described signal condition unit adopts SPI to be connected with data processing unit; It is characterized in that, described data processing unit adopts asynchronous serial bus UART to be connected with the data storage and display unit.
Described synchronous ADC converter is ADS1178, and described data processing unit adopts the TMS320VC6745/6747 chip, and described data storage and display unit data processor adopts PIC32MX460F512L, and described display module is 256 look TFT bus-type touch LCD screens.
As shown in Figure 3, be measuring principle schematic diagram of the present invention, three phase network voltage, current analog signal carry out signal condition through resistance pressure-dividing network and TA resistance sampling network respectively, obtain≤AC signal of 2.5V.The RC low-pass filter that the rear class access parameter is identical, the phase differential before and after keeping sampling between voltage, electric current is consistent.TA rear end access switching diode 1SS123 amplitude limit prevents the excessive damage device of Current Transmit primary side current.The reference power supply ADR121 that selects high precision and high thermal stability provides+the external reference voltage V of 2.5V for ADS1178
REF, guarantee that sample circuit has higher precision and thermal stability.
Deliver to the TMS320VC6745 data processing unit by the SPI interface after sampled data A/D conversion (analog to digital conversion), complete the extraction of Teager-Kaiser energy operator, Kaiser window improvement FFT analysis of spectrum, visual sense degree weighted quadratic, sequence permutation statistics by TMS320VC6745, obtain the flickering statistical parameter.
With reference to standard GB/T/T12326-2008 and power industry standard DL/T1028-2006, the flickering parameter detecting error result of the present embodiment is as follows:
The actual test of table 1 flickering value relative error (%)
The present embodiment has also adopted other classical windows to test, result shows, adopt the basic window function such as rectangular window and classical cosine window function to signal weighting, be subject to the fixedly restriction of side lobe performance of window function for the dynamic signal analysis effect, the Kaiser window has good spectrum leakage inhibiting effect, design realizes flexibly, calculates simple based on the voltage flicker detection algorithm of Teager-Kaiser energy operator Kaiser window Spectrum Correction, is conducive in real time, the Implementation of Embedded System of the flicker detection algorithm of pin-point accuracy.