Performance Comparison of Windowed Interpolation FFT and Quasisynchronous Sampling Algorithm for Frequency Estimation

TheDFT-based frequency estimations have inherent limitations such as spectral leakage andpicket-fence effect due to asynchronous sampling. This paper focuses on comparing the windowed interpolation FFT (WIFFT) and quasisynchronous sampling algorithm (QSSA) for frequency estimation. The WIFFT uses windows to reduce spectral leakage and employs interpolation algorithm to eliminate picket-fence effect. And the QSSA utilizes quasisynchronous weighted iterations for frequency estimation. The accuracy and time complexity ofWIFFT and QSSA are theoretically studied. Computer simulations of frequency estimations with noise and fluctuations by using WIFFT and QSSA are performed. Simulations results show that the wideband noise sensitivity of QSSA is lower than that of WIFFT. However, the WIFFT exhibits less time complexity than QSSA.


Introduction
Frequency, as we all know, is an important parameter in power system monitoring, control, and protection [1][2][3].In power systems, typical applications of frequency estimation are for protection against loss of synchronism, underfrequency relaying, power-quality monitoring, and power system stabilization [4][5][6].However, fluctuation of fundamental frequency has become a curse to the safe operation of power system which deteriorates the accuracy of frequency estimation.Thus, accurate frequency estimation of distorted and noisy signals in industrial power systems is a challenge that has attracted much attention.
Recently, various frequency estimation algorithms have been proposed in the literature, which can be classified as time-domain (parametric) and frequency-domain (nonparametric) methods [7][8][9][10].Time-domain methods, including iterative method, Kalman filtering, and neural network, are model-based and have very good selectivity and statistical efficiency [11,12].However, time-domain methods employ computationally intensive algorithms and require very good model agreement with a real multicomponent signal.
Frequency-domain approaches are based on the wellknown discrete Fourier transform (DFT), which exhibit a lower computational effort due to the availability of fast Fourier transform (FFT).To obtain the accurate frequency, a direct application of the DFT has the requirement of the periodicity of signal and the synchronization of sampling process [13,14].However, fluctuations of signals in power system, including fundamental frequency instability, fundamental variations, time varying harmonics, and harmonic interference, make synchronous sampling unattainable.The performances of DFT-based frequency estimations have inherent limitations such as spectral leakage and picket-fence effect due to asynchronous sampling.It is well known that a considerable reduction of spectral leakage can be achieved by weighting samples with a suitable window, and the picketfence effect can be eliminated by adopting interpolation FFT algorithms with dual-spectrum line or multispectrum line.Although the drawback of DFT-based frequency estimations can be improved by the windowed interpolation FFT (WIFFT) [15][16][17], additional computational costs will be introduced.Also, traditional DFT-based approaches require more than one cycle of the signal samples for computation.

Mathematical Problems in Engineering
Therefore, the performance of real-time monitoring may be deteriorated.
Quasisynchronous sampling algorithm (QSSA) is a popular approach for reducing spectral leakage [18][19][20].It employs quasisynchronous weighted iterations for the spectrum analysis and estimates frequency by the phase angle difference between two periodic signals.The QSSA has the advantages of requiring simple hardware and high accuracy.However, the time complexity of the QSSA has not been analyzed.Also, the noise sensitivity of the QSSA is still not clear.
The worldwide increasing applications of frequency measurement have made the choosing of frequency estimation methods a vital issue than ever before.Unfortunately, in the scientific literature the accuracy achieved by the WIFFT has not yet been compared with that of the QSSA.This is the goal of this paper.In Section 2, the WIFFT and QSSA for frequency estimation are discussed in brief.Comparisons of the WIFFT and QSSA, computational burden, are presented in Section 3. Simulations results are provided in Section 4. The conclusions are drawn in Section 5.

Frequency Estimation Algorithm
In order to better compare the performance of the QSSA and WIFFT, brief introductions are provided in this section.
2.1.Quasisynchronous Sampling Algorithm.Consider a sinewave () of amplitude , frequency  = 1/, phase , and sampled at frequency   = 1/  , which can be expressed as Let the sequence  1 () be selected from () that start at  =  1 and consist of the  + 1 samples { 1 (1) = ( 1 ),  1 (2) = ( 1 + 1), . . .,  1 ( + 1) = ( 1 + )}.According to the definition of Fourier transform of the  1 () it can be calculated as When  = 1, we can obtain the real part and image part of the second spectral line of the DFT of  1 (), which can, respectively, be calculated as ) , ) . ( If the sine-wave is sampled synchronously, the frequency can be accurately obtained from the from the spectral lines, that is, |  1 and |  1 .Otherwise, the spectral leakage caused by the asynchronous sampling will deteriorate the accuracy of frequency estimation.To reduce the effect of the asynchronous sampling, a quasisynchronous iteration process for calculating |  1 and |  1 can be applied as shown in Figure 1. In Figure 1, the upper index  represents the number of recursions ( = 1, 2, 3, . . ., ) and () represents the original sequence of length  + 1.The weighted recursion can be expressed as [20] where   ( = ,  + 1, . . .,  + ) are weights according to the window function.
The equivalent initial phase angles of  1 () and  2 () can thus be calculated as By subtracting |  2 from |  1 , we can calculate the frequency of () as

Windowed Interpolation FFT Algorithm.
The windowed interpolated FFT is an effective approach to eliminate the spectral leakage and picket-fence effect [21,22].The signal as shown in formula ( 1) is multiplied by a window function of ), q(2), . . ., q(N + 1), q(N + 2), . . ., q(2N + 1), q(2N + 2), . . ., q(LN + 1) length ; that is,   () = ()() with  = 1, 2, . . ., .The DFT of the windowed signal can be expressed as where () is the DFT of the adopted window () and  = /  is the signal frequency divided by the frequency resolution Δ =   /.The  would be an integer number if synchronous sampling is achieved.Otherwise the  can be written as the sum of an integer part  and a fractional part  under asynchronous sampling; that is,  =  + .Without loss of generality, assume that the minimum distance between spectral lines is larger than the main lobe width of the adopted window, which is sufficient for avoiding spectral interferences from the imaginary part of the spectrum.So, the imaginary part of the spectrum can be ignored; (8) can thus be simplified as The WIFFT applies a peak-search procedure to () and thus obtains two spectral lines with the maximum and the second maximum magnitudes, that is, the  1 th and  2 th spectral lines with  2 =  1 + 1.As shown in Figure 2, the  should be larger than  1 and smaller than   As the expression of ( 10) is complex, it is hard to get the inverse of (10) directly.The least square method is a good choice to obtain an approximate polynomial.Firstly, a set of data points (  ,   ) can be obtained by giving a series of values   by using (10).Then, the   and   are referred to as the independent variable and dependent variable, respectively.Finally, the least square method is applied to obtain the approximate polynomial where  and V  are the order and coefficients of the approximate polynomial, respectively.Once the coefficients V  are determined, the  can be calculated by submitting  into (11).Consequently, the signal frequency  can be estimated by

Comparisons of Time Complexity
As the real-time frequency estimation is of great importance in power systems, it is of interest to know the time complexity of different algorithms of frequency estimations.
Algorithm: iteration procedure of QSSA Input: () =  () sin(2/( −  + 1)) for image part () =  () cos(2/( −  + 1)) for real part Output: -calculated image or real part (1) for  = 1 :  (2) for  = 1 : for  = 1 :  + 1 (5) () = () + () (6) end for (7) else () = ( − 1) − ( − 1) + ( + ) (8) end if (9) end for (10) for  = 1 : ( − ) + 1 (11) () = () (12) end for (13)  The time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the length of the string representing the input and is commonly expressed using () notation, which excludes coefficients and lower order terms.Time complexity is commonly estimated by counting the number of elementary operations performed by the algorithm, where an elementary operation takes a fixed amount of time to perform.Thus the amount of time taken and the number of elementary operations performed by the algorithm differ by at most a constant factor.The elementary operations include addition, subtraction, multiplication, and division.Normally, divisions and subtractions are, respectively, counted into multiplications and additions.Comparisons of time complexities of WIFFT and QSSA are provided in Table 1.
The time complexity of the WIFFT is caused by the FFT operations.Thus, according to the definition of FFT, the WIFFT with  + 1 samples requires 3( + 1)log 2 ( + 1) additions and 2( + 1)log 2 ( + 1) multiplications.So, the time complexity of the WIFFT is ( log ).
The time complexity of the QSSA is caused by the iteration procedure, which is listed in Pseudocode 1.As shown in Figure 1 and (4), for the QSSA with  + 1 samples, there are /2 +  2 /2 +  + 1 multiplications and  2  additions.Thus the time complexity of the QSSA is ( 2 ).

Simulation and Analysis
The aim of this section is to compare frequency estimations provided by the QSSA and WIFFT by using MATLAB.First, frequency estimations of a sine-wave signal are simulated under asynchronous sampling.Second, the influence of frequency fluctuation on frequency estimation is considered.Third, the sine-wave signal with white noise is simulated.Last, the joint influence of frequency fluctuation and white noise on frequency estimation is analyzed.Comparison summary is also presented at the end of this section.Notice that, in the following simulation,  2 −  1 = 6 is adopted in QSSA.

With Asynchronous
Sampling.Suppose a sine-wave signal as shown in (1) with  = 220 V,  = /3, and  = 50.2Hz is simulated.The sampling rate is set as   = 3.2 kHz and   = 6.4 kHz to make comparisons.The QSSA with 513 samples and 641 samples and the WIFFT based on the 4term maximum decay windows (MDW 4-III) with 512 and 1024 samples are adopted.The absolute error of frequency estimation and computational burden of the two adopted algorithms are shown in Table 2.
When the sampling frequency is   = 3.2 kHz, 513 samples, 641 samples, and 1024 samples mean about 8, 10, and 16 periods of the sine-wave signal are used, respectively.When the sampling frequency is   = 6.4 kHz, 513 samples, 641 samples, and 1024 samples mean about 4, 5, and 8 periods of the sine-wave signal are used, respectively.As shown in Table 2, with the increasing of number of signal periods, that is, the decreasing of sampling frequency, the absolute errors of frequency estimation provided by the QSSA and WIFFT both decrease.Notice that the absolute errors of frequency estimation provided by WIFFT are more affected by the sampling frequency or the number of signal periods than that of the QSSA.
As shown in Table 2, the absolute errors of frequency estimation provided by the QSSA with 513 samples are much lower than that of the WIFFT with 512 samples.That is to say, by using almost the same numbers of samples, the QSSA outperforms the WIFFT in absolute errors of frequency   estimation.However, Table 2 shows that the computational burden of the WIFFT is much less than that of the QSSA.

With Frequency Fluctuations.
To investigate the influence of frequency fluctuations on frequency estimation, simulations are done with the frequency changing from 49.5 Hz to 50.5 Hz with a step of 0.1 Hz.The sampling frequency is set as   = 3.2 kHz.The QSSA with 513 samples and 641 samples and the WIFFT based on the 4-term maximum decay windows (MDW 4-III) with 512 and 1024 samples are adopted.Results of frequency estimations with frequency fluctuations are shown in Figure 3.
Obviously, Figure 3 shows that both QSSA and WIFFT can overcome the influence of frequency fluctuations on frequency estimation.Notice that, in Figure 3, the WIFFT (MDW 4-III) shows the lowest errors when the frequency is  = 50 Hz with   = 3.2 kHz.However, it is well known that the  = 50 Hz means synchronous sampling which is hard to be achieved in power system.
Moreover, Figure 3 also provides comparisons of two adopted algorithms when the asynchronous sampling procedure is considered; that is,  ̸ = 50 Hz with   = 3.2 kHz.The simulation results show that the absolute errors provided by the QSSA are less than that of the WIFFT (MDW 4-III) when the two adopted algorithms use almost the same numbers of samples.

With White
Noise.Frequency estimation system may be influenced by external noise (electromagnetic interference), and the detection process cannot completely eliminate noise but is subject to the statistical law (normal or uniform distribution).We can regard noise in frequency estimation as white noise and study the impact of noise on the stability of frequency estimation by simulations with different signal-tonoise ratio (SNR).The frequency and sampling frequency are set as  = 50.2Hz and   = 3.2 kHz, respectively.The SNR changes from 10 dB to 100 dB with a step of 10 dB.For each SNR, 500 times of simulation are performed.The biases and variances of frequency estimations provided by the QSSA with 513 samples and 641 samples and the WIFFT based on the 4-term maximum decay windows (MDW 4-III) with 512 and 1024 samples are shown in Figures 4 and 5, respectively.
As shown in Figure 4, when the SNR ≤ 60 dB, the WIFFT (MDW 4-III) with 1024 samples provides the minimum biases among four adopted methods.However, when the SNR > 60 dB, the WIFFT (MDW 4-III) with 1024 samples and QSSA with 513 samples and 641 samples have almost the same biases of frequency estimation.This shows that the power of white noise has significant influence on the accuracy of frequency estimation.In Figure 5, the WIFFT (MDW 4-III) with 1024 samples provides the minimum variances among four adopted methods.Also, compared with the QSSA with 513 samples, the QSSA with 641 samples provides less variance of frequency estimation.This is because the increasing of samples with a fixed sampling frequency means the increasing of frequency resolution and thus can suppress the influence of white noise.Figure 5 shows that the variances provided by the QSSA with 513 samples are less than that of the WIFFT (MDW 4-III) with 512 samples.That is to say, by using almost the same numbers of samples, the QSSA outperforms the WIFFT in variances of frequency estimation with white noise.In Figure 6, the biases of frequency estimation obtained by the four adopted methods are less than 1 − 5 with SNR = 40 dB when the frequency changes from 49.5 Hz to 50.5 Hz. Figure 7 shows that the variances of frequency estimation obtained by the four adopted methods are less than 1 − 8 with SNR = 40 dB when the frequency changes from 49.5 Hz to 50.5 Hz.And the WIFFT (MDW 4-III) with 1024 samples has almost the minimum biases and variances among four adopted methods.Notice that the increasing of numbers of samples will lead to the significant increment of computational burden.Figures 6 and 7 show that the number of samples plays an important role in frequency estimation.As shown in Figure 7, when using almost the same numbers of samples, the variances of frequency estimation provided by the QSSA are less than that of the WIFFT (MDW 4-III).

Conclusion
This paper compares the performances of the QSSA and the WIFFT for frequency estimation.It has been shown that the absolute errors provided by the QSSA are less than that of the WIFFT (MDW 4-III) when the two adopted algorithms use about 512 samples when the fundamental frequency has fluctuations.Moreover, the variances of frequency estimation provided by the QSSA are less than that of the WIFFT (MDW 4-III) when the number of acquired samples is about 512.That is to say, the wideband noise sensitivity of QSSA is lower than that of WIFFT.However, we should also notice that the computational burden required by the QSSA is higher than that of the WIFFT.Thus, for frequency estimation with high accuracy and less required samples, the QSSA could be preferred.For fast frequency estimation with large numbers of samples, WIFFT would be a good choice.

Figure 1 :
Figure 1: The th iteration process based on the quasisynchronous sampling algorithm with  + 1 samples.

Figure 3 :
Figure 3: Results of frequency estimations with frequency fluctuations when the sampling frequency is set as   = 3.2 kHz.

Figure 4 :
Figure 4: Biases of frequency estimations with white noise when the SNR changes from 20 dB to 100 dB.

Figure 5 : 5 Figure 6 :
Figure 5: Variances of frequency estimations with white noise when the SNR changes from 20 dB to 100 dB.

4. 4 .
With Frequency Fluctuations and White Noise.In this part, simulations are performed with SNR = 40 dB when the frequency changes from 49.5 Hz to 50.5 Hz.The sampling frequency is set as   = 3.2 kHz.The biases and variances of frequency estimations provided by the QSSA with 513 samples and 641 samples and the WIFFT based on the 4-term maximum decay windows (MDW 4-III) with 512 and 1024 samples are shown in Figures 6 and 7, respectively.

Figure 7 :
Figure 7: Variances of frequency estimations with SNR = 40 dB when the frequency changes from 49.5 Hz to 50.5 Hz.

Table 1 :
Comparisons of time complexities.

Table 2 :
Comparisons of absolute errors of frequency estimation without frequency fluctuations.