Performance Comparison of Windowed Interpolation FFT and Quasisynchronous Sampling Algorithm for Frequency Estimation
The DFT-based frequency estimations have inherent limitations such as spectral leakage and picket-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 of WIFFT 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.
Frequency, as we all know, is an important parameter in power system monitoring, control, and protection [1–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–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–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 well-known 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 picket-fence 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–17], additional computational costs will be introduced. Also, traditional DFT-based approaches require more than one cycle of the signal samples for computation. Therefore, the performance of real-time monitoring may be deteriorated.
Quasisynchronous sampling algorithm (QSSA) is a popular approach for reducing spectral leakage [18–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.
2. 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 sine-wave of amplitude , frequency , phase , and sampled at frequency , which can be expressed as
Let the sequence be selected from that start at and consist of the samples . According to the definition of Fourier transform of the it can be calculated as When , we can obtain the real part and image part of the second spectral line of the DFT of , 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, and . 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 and can be applied as shown in Figure 1.
In Figure 1, the upper index represents the number of recursions () and represents the original sequence of length . The weighted recursion can be expressed as  where are weights according to the window function.
The real part and image part of the DFT of the can be obtained from Figure 1 when the and are, respectively, submitted into . The weighted recursion results of and can be expressed as where is the iteration factor.
Another sequence can also be selected from that start at and consist of the sample . Using the same procedure as mentioned above, the real part and image part of the second spectral line of the DFT of , that is, and , can be obtained similarly.
The equivalent initial phase angles of () and () can thus be calculated as By subtracting from , we can calculate the frequency of as
2.2. 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 length ; that is, with . 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 th and th spectral lines with . As shown in Figure 2, the should be larger than and smaller than . By defining a coefficient with , we can get and . Thus the magnitudes of the th and th spectral lines are and , respectively. Since the inverse of an odd and symmetric function does not contain any even order items, an odd and symmetric coefficient can be defined as a function of to simplify the calculation procedure, which can be written as
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 are the order and coefficients of the approximate polynomial, respectively. Once the coefficients are determined, the can be calculated by submitting into (11). Consequently, the signal frequency can be estimated by
3. 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.
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 samples requires additions and multiplications. So, the time complexity of the WIFFT is .
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 samples, there are multiplications and additions. Thus the time complexity of the QSSA is .
4. 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, is adopted in QSSA.
4.1. With Asynchronous Sampling
Suppose a sine-wave signal as shown in (1) with V, , and Hz 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 4-term 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.
4.2. 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 Hz with = 3.2 kHz. However, it is well known that the 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, 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.
4.3. 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-to-noise ratio (SNR).
The frequency and sampling frequency are set as Hz 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.
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.
In Figure 6, the biases of frequency estimation obtained by the four adopted methods are less than 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 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).
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.
Conflict of Interests
The authors declare that they have no conflict of interests.
This study has been supported by the National Natural Science Foundations of China under Grant no. 61370014.
H. Wen, S. Guo, Z. Teng, F. Li, and Y. Yang, “Frequency estimation of distorted and noisy signals in power systems by FFT-based approach,” IEEE Transactions on Power Systems, vol. 29, no. 2, pp. 765–774, 2014.View at: Google Scholar
D. Agrez, “Estimation of the instantaneous periodic parameters in the frequency domain,” in Proceedings of the IEEE Instrumentation and Measurement Technology Conference (IMTC '06), pp. 1731–1735, 2006.View at: Google Scholar