Spectral correction method based on improved flat-top convoluted window for parameter estimation of power harmonic

Original scientific paper Accurate estimation of harmonic parameter is an important task in signal processing of power system. A new class of flat-top windows is proposed, which is generated by self-convolutions of the fast-decaying minimum-sidelobe flat-top (FDMS-FT) window in the time-domain. The mainlobe and sidelobe features of the new window are studied. In addition, to improve the flatness of mainlobe of the new window, the coefficients of its parent window are optimized. A window-length changeable discrete phase difference correction algorithm based on the new window is presented to estimate power harmonic parameter. In order to inspect the efficiency and accuracy of the presented method, several computer simulations and practical experiments were conducted with power multi-frequency signals. Results show that the proposed method can reduce the computation load efficiently and gives a high parameter estimation accuracy of power harmonic.


Introduction
The use of nonlinear loads is usually the main cause of harmonic distortion in power system [1].However, due to the operation of distributed generation systems, supply systems also become harmonic sources worsening the harmonic pollution.Harmonic may result in deterioration of power quality and equipment overheats.To suppress harmonic, harmonic parameter should be estimated accurately [2].
Recently, various methods have been presented for the harmonic parameter estimation [3][4][5].Among these methods, the fast Fourier transform (FFT) method is the most commonly used technique because of its simplicity and availability in real-time applications [6].Nevertheless, the FFT is strict with the periodicity of signal and the synchronization of sampling process [7].When computed from a block of data that is non-periodic, this method suffers from influences known as spectral leakage and picket-fence effect [8].Owing to the existences of the fundamental frequency offset and inter-harmonic, synchronous sampling cannot be achieved [9], which also cannot be avoided by adjusting the sampling frequency by hardware or software [10].In practice, the windowed interpolation FFT methods [11,12], are the effective methods to accurately recover amplitude, phase, and frequency of spectral components for their simple principles and low hardware requirements.
Choosing window with low peak sidelobe level and high sidelobe decaying rate can sufficiently depress the effect of the spectral leakage [13].There are mainly two approaches to design windows with great sidelobe features.One is adjusting coefficients of classical cosine windows [14,15].The other one is time-convolutions of a specific parent window.For years, several convoluted windows have been presented, including rectangular convoluted window [16], desirable sidelobe window [17], among others.It was verified that convoluted windows have greater side-lobe attenuation and faster decay of side-lobe compared with parent windows, making them more useful for spectral leakage suppression.
The picket fence effect can be eliminated by adopting interpolation algorithms.Up to now, several interpolated algorithms have been presented, for instance, dualspectrum-line interpolation algorithm [18], triplespectrum-line interpolation algorithm [19], and multipoint interpolation algorithm [20].
Comparing with the direct application of the FFT under asynchronous sampling, the windowed interpolated FFT algorithms improve the estimated parameter accuracy of harmonic availably.However, it is at the cost of increasing computational complexity [21].When simple windows are used for windowing, such as Rectangular window and Hanning window, their interpolated formulas are simple.Unfortunately, the accuracy of harmonic parameter estimation is unsatisfactory due to poor side lobe properties, especially when they are utilized to estimate weak signal components.When complex windows are employed, the accuracy of harmonic analysis is enhanced.Nevertheless, the interpolated formula becomes complicated, and highorder equations should be solved to calculate the value of frequency deviation.Moreover, calculation formula of recovering amplitude is also complicated.To deal with these problems, different solving methods have been presented.Salvatore and Trotta presented flat-top window to correct the amplitude error caused by picketfence effect [22].Yang and Ding gave a window-length changing discrete phase difference correction method to replace interpolation algorithm [23].However, there still is some lack in these methods.For the traditional flat-top window, the accuracy is not high because of its poor sidelobe and mainlobe performance.When windowlength changing discrete phase difference correction algorithm is applied, the window used for weighting should have excellent sidelobe performance to suppress spectral leakage sufficiently [24].However, excellent sidelobe performance means the increase of window items and computation burden.
Accordingly, it is necessary to study new harmonic analysis method, which should satisfy the requirements of high speed implementation in embedded systems.The performance of the windowed FFT algorithms is mainly determined by the window function [25].Consequently, FDMS-FT window [26] is chosen as parent window, and the FDMS-FT convoluted window is subsequently achieved through multiple-time convolution.The new window, with a reasonable order, is of lower peak sidelobe level and higher sidelobe decaying rate compared with classical cosine window, leading to better performance for the suppression of spectral leakage.In addition, to achieve flatter mainlobe of the new window, the coefficients of its parent window are adjusted by optimization procedure.This type of spectrum of new window guarantees high precision in the estimation of harmonic amplitude.Thus, the new window is of flatter mainlobe while its sidelobe performance is retaining.Then, the window-length changeable discrete phase difference correction method with the new flat-top window is presented to estimate harmonic frequency and phase, without using the time-consuming interpolation algorithm.The new method does not need to solve highorder equations.Hence, computation burden is reduced dramatically.Furthermore, the proposed method can get exact solutions under white noise and frequency offset.The implementation via advanced RISC machines (ARM) -based platform verifies the efficiency of the presented method, indicating that it should be a preferable choice for real-time application.

The FDMS-FT convoluted window 2.1 The FDMS-FT convoluted window under constantlength parent window
FDMS-FT window is one of the combined cosine windows, and its general discrete expression in the time domain is where m a is the window coefficient and subject to the following restriction: For a large N , the DFT of Eq. ( 1) can be simplified to the form in Eq. ( 3), λ is the normalized frequency (normalized by the frequency resolution), and ( ) G λ is normalized by its central frequency bin (0) G .There are two ways for constructing self-convolution window, including constant-length parent window and constant-length convoluted window.Similarly, following the similar approach of convoluting parent window in [16,17], the new window is achieved where C is the number of the parent window, or called the order of the new flat-top window.Accordingly, the new window ( ) g n names the C th -order FDMS-FT convoluted window.It can be seen that the length of ( ) g n , making it has the length of N C ⋅ .In the light of the convolution theorem in the frequency domain, the DFT of ( ) ] From Eq. ( 5), it can be seen that the peak sidelobe level of ( ) G λ is C times lower than that of its parent window.By expanding the term 2 m λ , Eq. ( 5) can be rearranged as ] The sidelobe decaying rate of ( ) G λ depends on the first nonzero term in r-series [15].Thus, according to Eq. ( 6), the sidelobe decaying rate of ( ) When C equals 1, 2, and 3, respectively, the magnitude frequency responses of ( )  To describe the flat degree of mainlobe of ( ) G λ , a percentage error τ , which is characterized by constant DFT magnitude around its central frequency bin, is introduced.The expression ofτ can be written as For simplicity, τ is named as the attenuation error of mainlobe.Because of the even symmetry of ( ) G λ , τ is only discussed where λ is in the [0; 0,5] interval.The curves ofτ with different convoluted order are exhibited in Fig.It can be recognized that τ becomes large with the increase of convoluted order, leading to the decrease of the flatness of mainlobe.

The FDMS-FT convoluted window with a fixed window length
Assuming that the length of the P th -order FDMS-FT convoluted window ( ) pp s n with a constant-length is PP N , thus, the length of its parent window 1 ( ) ).
From Eq. ( 3), the DFT of 1 ( ) According to Eq. ( 9) and the convolution theorem of frequency domain, the DFT of ( ) pp s n can be expressed as According to Fig. 3, it is clearly indicated that, with the increase of the convoluted order, the peak sidelobe level decreases and the sidelobe decaying rate increases.
In order to describe the flat degree of mainlobe of the FDMS-FT convoluted window with a fixed length, the attenuation error of mainlobe δ is also introduced.Likewise, δ is also analyzed in [0; 0,5] interval of normalized frequency.Fig. 4 illustrates the curves of δ with different convoluted order.It is shown that the mainlobe of ( ) PP S λ is flatter than that of 1 ( ) P S λ when λ is in the range of [0; 0,37].However, this has changed with the increase of λ .To sum up, from Fig. 1 to 4, it is summarized that, compared with their parent windows, the two types of FDMS-FT convoluted windows have better sidelobe Technical Gazette 24, 1(2017), 79-87 behaviors.However, the flat degrees of their mainlobes are not superior to those of their parent windows.

The improved FDMS-FT convoluted window with a constant length
From the study in section 2, we know that the two types of FDMS-FT convoluted windows are unfulfilling on the flatness of mainlobe.Therefore, it is necessary to improve their flatness of the mainlobe for the sake of utilization in harmonic amplitude estimation.The FDMS-FT convoluted window with constant-length parent window is a multiple of its parent window in the frequency domain, so that its mainlobe will never be flatter than that of parent window.Thus, we choose to enhance the flatness of mainlobe of the FDMS-FT convoluted window with a constant length by optimizing the coefficients of its parent window.
Without loss of generality, the optimization procedure of the coefficients of parent window satisfies the normalized constraint Eq. ( 2).
The influences among distant harmonic components are determined by the sidelobe decaying rate of window.Thus, expanding hP λ in Eq. ( 9), the following expression is obtained Since the sidelobe decaying rate of 1 ( ) P S λ depends on the first nonzero term of q-series, the coefficients of 1P The influences among adjacent harmonic components can be reduced by decreasing the peak sidelobe level of window.A low peak sidelobe level is achieved by adding additional zeros between existing zeros of the DFT window's spectrum [15].Accordingly, to reduce the peak sidelobe level of 1P s , the following condition should be satisfied Specially, in order to enhance the flat degree of mainlobe of the parent window, the attenuation error of mainlobe δ should amount to zero.Thus, the following constraint is obtained where / P P λ′ is the zero crossing point of the attenuation error of mainlobe.
By using normalization condition Eq. ( 2) and constraints Eq. ( 12) to Eq. ( 15), the optimized coefficients of FDMS-FT window can be obtained.Then, the new FDMS-FT convoluted window with a fixed length, which has a flatter mainlobe, is achieved through time convolution.Table I lists the optimized coefficients of 1P s , where the corresponding order of the new FDMS-FT convoluted window with a fixed length is the second to the fourth.For clarity, the new window is called the improved FDMS-FT convoluted window.
The improved FDMS-5FT convoluted window is taken for example, and the attenuation error of its mainlobe ε is shown in Fig. 5.In Fig. 5, the order of convolution F amounts to 1, 2, and 3, respectively.It can be seen that the flatness of mainlobe of the improved FDMS-FT convoluted window is greatly increased compared with Fig. 4. The higher the convoluted order of the improved FDMS-FT convoluted window is, the lower the attenuation errors of the mainlobe will be.
Accordingly, compared with classical flat-top window in [22,26], the improved FDMS-FT convoluted window exhibits both flatter mainlobes and greater sidelobe performance.Thus, the new window can suppress spectral leakage and enhance the accuracy of harmonic amplitude more effectively.

Harmonic parameter estimation based on the improved FDMS-FT convoluted window 5.1 Estimation of harmonic amplitude
For a sampled multi-frequency harmonic signal in power system, the discrete-time signal model can be written as 0 1 ( ) cos( 2), 0,1,..., 1 where K is the number of frequency components, 0 f is the fundamental frequency, kh A and kh f is the amplitude and initial phase of the kth harmonic, respectively.s T is the sampling period.
x n is obtained.Suppose that the kth harmonics is currently under concern.The FFT of the kth harmonics is given as follows: In Eq. ( 17), kh γ and qh γ are the normalized frequency (normalized by frequency interval 0 1/ s F NT = ) of the k th and q th harmonic, respectively.Due to asynchronous sampling, kh γ is not an integral multiple of frequency bin.

Accordingly, 0
k k h γ γ − ≠ , and |γ k -γ kh | < 0,5.In this case, ( ) k X γ is the maximum spectral line corresponding to the k th harmonics.Because of the excellent sidelobe behaviors of the window ( ) L w n , the leakage impact of other harmonic on the k th harmonic can be neglected.Thus, Eq. ( 17) can be simplified as where k ς ∆ is the value of frequency deviation of the kth harmonic, and . The improved FDMS-FT convoluted window has an extremely flat-top mainlobe.For example, in the case that the value of frequency deviation i ς ∆ is fluctuating in the range [−0,5; 0,5], the maximum attenuation error of mainlobe, in which the improved 2 nd -order FDMS-FT convoluted window is considered, is only 0,0039 %.Accordingly, the amplitude ih A of the k th harmonic can be substituted by 2 ( ) k X γ directly.Thus

Estimation of harmonic frequency and phase
The window-length changeable discrete phase difference correction algorithm is applied to estimate harmonic frequency and initial phase.From Eq. ( 18), the phase relationship between the kth harmonic and the spectral line ( ) where k γ ϕ is the phase of the spectral line ( ) According to Eq. ( 20), it is seen that k ς ∆ is the key factor for the estimation of kh f .
After the former N ρ ( 0 x n ρ is achieved.Note that the value of ρ can be adjusted according to the real need of harmonic analysis.Then, the spectrum of ( )

N
x n ρ is obtained by using the FFT.For the new FFT sequence, the phase relationship between the kth harmonic and the spectral line ( ) k X γ ′ can be expressed as ( ) where ( ) k X γ ′ is the spectral line that is the nearest to the true peak position of the kth harmonic in the new DFT sequence.k γ ϕ ′ and k γ ′ are the initial phase and normalized frequency of spectral line ( ) From Eq. ( 20) and Eq. ( 21), the phase difference between ( ) Then, k ς ∆ can be written as (1 ) in Eq. ( 23), ( ) From Eq. ( 23), the frequency ih f and phase k h f of the kth harmonic are obtained, respectively Technical Gazette 24, 1(2017), 79-87 arctan( ) In Eq. ( 25), k F γ and k Y γ are the imaginary and real parts of spectral line ( ) This is the procedure of estimating the harmonic parameters based on the presented method.The analysis is carried out on the k th harmonic.However, this method can actually be applied for calculating the parameters of any harmonic component.
In addition, when processing effort is under concern, from the calculation formulas of harmonic frequency and initial phase above, the presented method only needs to solve linear equation, so that the processing effort of the proposed method is almost the same as that of the analytical-solution interpolation method in [27].In addition, when amplitude estimation is considered, the measurement of the proposed method is obtained from the FFT directly, without additional calculation procedure.Thus, the proposed method gives the better computation efficiency.Therefore, the proposed method mitigates the computation complexity greatly.

Simulation and Implementation 6.1 Harmonic parameters estimation under fundamental frequency Variation
To demonstrate the applicability of the proposed algorithm, simulations are carried out by MATLAB.The signal model given in [11] is used for simulation, and the exact harmonic parameters are listed in Tab. 2.
The sampling frequency is 2048 Hz, and the total sampling number is 2500.
The following methods are applied for the simulations, including the Hanning window based interpolated algorithm [11], the Blackman window based interpolated algorithm [19], and the window-length changeable phase difference correction algorithm with the improved 2 nd -order FDMS-5FT convoluted window.
Since the fundamental amplitude is far larger than that of the other harmonics in power system, the second harmonics is subjected to the maximum influence.Therefore, the second harmonics is chosen to verify the precision of the presented algorithm.Figs. 6 and 7 exhibit the percent relative errors of the second harmonics amplitude and frequency.In simulation, the fundamental frequency is varying in the range from 49,5 to 50,5 Hz.Besides, it is worth pointing out that the sampling numbers used in the proposed method with the improved 2 nd -order FDMS-5FT convoluted window are 2300.
From Fig. 6 and 7, it is clearly shown that the accuracy of frequency estimation is enhanced by the presented method, compared with those of the methods based on the Hanning window and the Blackman window.Thus, it is confirmed that the presented method can availably overcome the interference resulting from the variation of the system frequency.As for the accuracy of amplitude, it can be seen that the amplitude measurement accuracy obtained by the improved FDMS-5FT convoluted window is also higher than those achieved by the Hanning window in [11] and the Blackman window given in [19].In addition, for different methods above applied for simulation ( [11,19], and the proposed method in turn), under the condition that harmonic analysis is performed only once, the computation time obtained by MATLAB with the same computer is 0,048 s, 0, 058 s, and 0,039 s, respectively.It is clear that the computation time of the proposed method is the least.Therefore, the proposed method reduces processing efforts availably.

Simulation with white noise
The signal model in Eq. ( 26) is superposed with zeromean Gaussian noise, where the signal-to-noise ratios (SNR) vary from 10 to 100 dB at an increment of 10 dB.The fundamental frequency is 49,5 Hz.Under these conditions, the harmonic parameters are estimated by repeated measurements and the mean values of all the simulation results are then obtained.
As mentioned above, weak signal is easily affected by noise.Accordingly, the fourth harmonic is chosen for simulations to verify the Anti-noise performance of the proposed method.
Simulation results of the fourth harmonic amplitude/frequency are shown in Fig. 8 and 9, where the method based on the Hanning window in [11] and based on the 3-term 3 orders Nuttall window given in [28], and the proposed method with the improved 2 nd -order FDMS-5FT convoluted window are used to make the comparison.
From Fig. 8 and 9, when SNR is less than 50 dB, the influences of white noise to these different methods are serious, especially for the accuracy of harmonic amplitude.For SNR > 50 dB, the accuracies obtained by these different methods are enhanced with the increase of SNR.
Particularly, the proposed method with the improved FDMS-5FT convoluted window gives the best accuracies.Accordingly, the proposed method has good anti-noise ability and can extract weak signal component precisely under noise.Finally, from the simulation results achieved in Fig. 6 ÷ 9, we know that harmonic parameters, including evenorder harmonic and weak harmonic components, can be accurately evaluated by the proposed method under spectral leakage and white noise.Moreover, the improved FDMS-FT convoluted window based on window-length changeable phase difference correction algorithm is free from solving high-order equations.Thus, the proposed algorithm efficiently reduces the computation burdens.

Implementation
In practical engineering, the signals of power system are influenced not only by the variation of fundamental frequency or white noise but also by other kinds of interferences, such as quantization noise.Therefore, field test is necessary to verify the effectiveness of the method.The proposed method, in which the improved 2 nd -order FDMS-5FT convoluted window is used for weighting, is tested by ARM-based embedded platform.
The main experiment devices include an ARM9 core based processor S3C2440 with 16K instruction cache, 16K data cache, and a standard harmonic signal source.For the low resolution of the internal ADC of S3C2440, a high speed high resolution external AD converter ADS8364 is utilized.To meet the requirement of real time harmonic measurement, the processor main clock is set at 400 MHz, that is to say, the processor can run 400 M instructions per second.In addition, standard harmonic signal is generated by Fluke 6100 A electrical power standard.For Fluke 6100 A, the output resolutions of amplitude and frequency are 100 ppm and 50 ppm respectively, and phase resolution is 0,001 degree.
In experiment, the real harmonic parameters are given by Fluke 6100 A while the measured values are estimated by the ARM-based three-phase harmonic ammeter.The fundamental frequency is set to 50,1 Hz, and the sample number is 1024.The testing results of A-phase, which include the amplitude and initial phase of voltage, are listed in Tab. 3.
It is shown that the maximum relative errors of amplitude and phase based on the proposed method are 0,197 % and 1,823 %, respectively.In addition, the measured value of the fundamental frequency was 50,096 Hz, and the percent of relative error was 0,008 %.Thus, the testing results validate the correctness and effectiveness of the proposed method.Moreover, it is also clear that the proposed method can be implemented in embedded systems easily.

Conclusions
This paper focuses on the accurate and lowcomputation harmonic parameter estimation procedure.With this aim, a new type of flat-top windows is constructed, namely the improved FDMS-FT convoluted window.Then, a window-length changeable discrete phase difference correction method based on the new flattop window is presented for power harmonic parameter estimation.Compared with the classical flat-top window, the improved FDMS-FT convoluted window has the advantages of better sidelobe performance and flatter mainlobe, which can minimize the errors caused by spectral leakage and picket fence effect greatly.The proposed method has a simple calculation procedure, and the correction formulas of harmonic parameter only require solving linear equation, decreasing computational burden dramatically.In addition, the simulations and practical measurements indicate that without using the techniques of hardware synchronization, the proposed method can accurately estimate power harmonic parameter and be easily applied in embedded systems.
FT window is defined by using different M and m a settings.The coefficients of FDMS-FT window are listed in Tab. 1.

Fig. 1 ,
Fig.1, where 5-term fast-decaying minimum-sidelobe flat-top window (FDMS-5FT) is taken as parent window.One can see that the peak sidelobe level and the sidelobe decaying rate of ( ) C G λ are proportional to the order C.

Figure 1
Figure 1 Magnitude frequency responses of the FDMS-5FT convoluted window with constant-length parent window

Figure 2
Figure 2The attenuation error of mainlobe of the FDMS-5FT convoluted window with constant-length parent window

1 (Figure 3
Figure 3 Magnitude frequency responses of the FDMS-5FT convoluted window with constant length

Figure 4
Figure 4The attenuation error of mainlobe of the FDMS-5FT convoluted window with a constant length

λ
is the position placing additional zero.

F=3Figure 5
Figure 5The attenuation errors of mainlobe of the improved FDMS-5FT convoluted window

Figure 6 Figure 7
Figure 6Relative errors of the second harmonic amplitude

Figure 8 Figure 9
Figure 8 Relative errors of the fourth harmonic amplitude

Table 1
Parent window coefficients of the improved FDMS-FT convoluted window

Table 2
Parameters of the simulated signal

Table 3
Measurement results of voltages and phase of A-phase