FFT (fast Fourier transform) -based harmonic detection method for ground power system
Technical Field
The invention relates to the technical field of harmonic detection, in particular to a harmonic detection method of a power system based on FFT (fast Fourier transform).
Background
The harmonic wave not only reduces the efficiency of the power grid, but also forms resonant circulation, and even burns out the motor in serious cases. The harmonics are suppressed using fourier analysis. The FFT analysis method decomposes the detected periodic harmonic signals through fast FFT to obtain the amplitude and phase of each subharmonic, passes the to-be-eliminated subharmonic component through a band-pass filter or a Fourier transformer to obtain a required error signal, and then performs inverse Fourier transform on the error signal to obtain a compensation signal. The method can not separate active current and reactive current, and requires strict synchronous sampling and equal-interval sampling, otherwise, the barrier effect and the frequency spectrum leakage phenomenon can occur, thereby influencing the detection accuracy.
The measurement method under asynchronous sampling can be divided into a constant-rate sampling method and a self-adaptive sampling method from the aspect of a sampling mode, but the conventional constant-rate sampling method cannot adjust the sampling frequency in real time according to the change of the power grid frequency to realize synchronous sampling, and the measurement precision is sharply reduced when the power grid frequency is dynamically changed, so that in order to solve the problems, the invention provides a power system harmonic detection method based on FFT (fast Fourier transform). in the method, FFT is carried out on two windowed ground time domain sequences by a phase difference correction method, and the phase difference of corresponding peak spectral lines is utilized to correct the frequency, the amplitude and the phase to obtain synchronous data, and the method can be suitable for the power grid environment with dynamically changed frequency.
Disclosure of Invention
In view of the above, the invention provides a power system harmonic detection method based on FFT transformation, which performs FFT on two segments of windowed time domain sequences by a phase difference correction method and corrects frequency, amplitude and phase by using corresponding peak spectral line ground phase difference to obtain synchronous data, and can adapt to a power grid environment with dynamically changing frequency.
The technical scheme of the invention is realized as follows: the invention provides a harmonic detection method of an electric power system based on FFT (fast Fourier transform), which comprises the following steps of:
s1, carrying out FFT (fast Fourier transform) on the acquired asynchronous data to obtain a frequency spectrum sequence, and deriving a normalized frequency correction value from the frequency spectrum sequence;
and S2, correcting the normalized frequency correction quantity based on the frequency change rate, and substituting the corrected normalized frequency correction quantity into a frequency correction formula, an amplitude correction formula and a phase correction formula to obtain the frequency, the amplitude and the phase of the K-th harmonic.
On the basis of the above technical solution, preferably, S1 specifically includes the following steps:
s101, determining the phase of a harmonic signal, and shifting the harmonic signal to the left in the time domain for a time length t0Determining the translated phase;
and S102, subtracting the phase before translation and the phase after translation to obtain the phase difference of the two signals, and deducing a normalized frequency correction value according to the phase difference.
On the basis of the above technical solution, preferably, in S102, the phase difference between the two signals obtained by subtracting the phases before and after translation is:
Δφk=2πfkt0;
in the formula, delta phikThe phase difference of the two signals is obtained; f. ofkFrequency at the k harmonic; t is t0The time length of the second segment signal shift.
Further preferably, the frequency change rate in S2 is the result of subtracting the previously measured fundamental frequency from the currently measured fundamental frequency and dividing the result by the time interval between the two measurements.
Further preferably, the corrected normalized frequency correction amount in S2 is:
in the formula,. DELTA.mkThe corrected normalized frequency correction value is obtained; n is the number of sampling points of each section of signal; l is the number of points of the second section of signal translation; f. ofkFrequency at the k harmonic; f. ofsIs the sampling rate; m iskNormalized peak spectral frequency.
Further preferably, the frequency correction formula is:
further preferably, the amplitude correction formula is:
in the formula, AkIs the amplitude of the k harmonic; a. themkThe amplitude of a peak spectral line in a harmonic signal spectrum; wnorm(Δmk) Is Δ mkThe fourier transform function of (a).
Further preferably, the phase correction formula is:
in the formula (I), the compound is shown in the specification,
is the phase of the k harmonic; i is
kAnd R
kRespectively, normalized frequency is m
kTime W
norm(Δm
k) The imaginary and real parts of the function.
Compared with the prior art, the FFT-transformation-based harmonic detection method for the ground power system has the following beneficial effects:
(1) setting the frequency change rate as the result of the difference quotient operation of the fundamental frequency measured at the previous time and the current time, correcting the normalized frequency correction value measured at the current time by using the frequency change rate of the embodiment, and calculating the corrected frequency, amplitude and phase by using a frequency correction formula, an amplitude correction formula and a phase correction formula, wherein the finally obtained frequency, amplitude and phase are more in line with the actual result, thereby being capable of adapting to the power grid environment with dynamically changed frequency;
(2) and the frequency measured in the previous time is used for calculating the frequency change rate of the current time, so that the calculation time is shortened by half.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of the harmonic detection method of the power system based on FFT transformation according to the present invention;
fig. 2 is a specific flowchart of step S1 in the FFT transform-based power system harmonic detection method according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to 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 obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
For constant-rate sampling, a method in a frequency domain needs to derive corresponding frequency, amplitude and phase correction formulas, each correction formula is related to a normalized frequency correction value, but the existing method does not consider the situation that the grid frequency change rate is not zero in the process of deriving a normalized frequency correction value calculation formula, so that the measurement precision is seriously reduced in the frequency dynamic process, and in order to solve the problem, as shown in fig. 1, the embodiment provides a power system harmonic detection method based on FFT transformation, which comprises the following steps:
s1, carrying out FFT (fast Fourier transform) on the acquired asynchronous data to obtain a frequency spectrum sequence, and deriving a normalized frequency correction value from the frequency spectrum sequence; as shown in fig. 2, the method specifically includes the following steps:
s101, determining the phase of a harmonic signal, and shifting the harmonic signal to the left in the time domain for a time length t0Determining the translated phase;
and S102, subtracting the phase before translation and the phase after translation to obtain the phase difference of the two signals, and deducing a normalized frequency correction value according to the phase difference. The phase difference of the two signals obtained by subtracting the phases before and after translation is as follows: delta phik=2πfkt0(ii) a In the formula, delta phikThe phase difference of the two signals is obtained; f. ofkFrequency at the k harmonic; t is t0The time length of the second segment signal shift. Deriving the normalized frequency correction amount from the phase difference can be achieved using prior art techniques, and will not be described in further detail herein. In this embodiment, the calculated normalized frequency correction amount is further corrected to be suitable for the frequency dynamic process.
And S2, correcting the normalized frequency correction quantity based on the frequency change rate, and substituting the corrected normalized frequency correction quantity into a frequency correction formula, an amplitude correction formula and a phase correction formula to obtain the frequency, the amplitude and the phase of the K-th harmonic.
Wherein, the frequency change rate is the result of subtracting the fundamental frequency measured last time from the fundamental frequency measured last time and dividing the result by the time interval of two measurements. Since the frequency change rate is an important parameter in the field of power harmonic measurement technology, in this embodiment, the frequency change rate is a result of performing a difference quotient operation on the fundamental frequency measured at the previous time and the current time. The frequency change rate of the present embodiment is used to correct the normalized frequency correction amount of the current measurement, and the corrected frequency, amplitude and phase are calculated by the frequency correction formula, amplitude correction formula and phase correction formula. In this embodiment, the frequency measured in the previous time is used for calculating the frequency change rate of this time, so that the calculation time is shortened by half.
More preferably, the corrected normalized frequency correction amount is:
in the formula,. DELTA.mkThe corrected normalized frequency correction value is obtained; n is the number of sampling points of each section of signal; l is the number of points of the second section of signal translation; f. ofkFrequency at the k harmonic; f. ofsIs the sampling rate; m iskNormalized peak spectral frequency.
Further preferably, the frequency correction formula is:
further preferably, the amplitude correction formula is:
in the formula, A
kIs the amplitude of the k harmonic; a. the
mkThe amplitude of a peak spectral line in a harmonic signal spectrum; w
norm(Δm
k) Is Δ m
kThe fourier transform function of (a).
Further preferably, the phase correction formula is:
in the formula (I), the compound is shown in the specification,
is the phase of the k harmonic; i is
kAnd R
kRespectively, normalized frequency is m
kTime W
norm(Δm
k) The imaginary and real parts of the function.
The beneficial effect of this embodiment does: setting the frequency change rate as the result of the difference quotient operation of the fundamental frequency measured at the previous time and the current time, correcting the normalized frequency correction value measured at the current time by using the frequency change rate of the embodiment, and calculating the corrected frequency, amplitude and phase by using a frequency correction formula, an amplitude correction formula and a phase correction formula, wherein the finally obtained frequency, amplitude and phase are more in line with the actual result, thereby being capable of adapting to the power grid environment with dynamically changed frequency;
in this embodiment, the frequency measured in the previous time is used for calculating the frequency change rate of this time, so that the calculation time is shortened by half.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.