# Fast and accurate frequency meter using the interpolated DFT method.

I. INTRODUCTIONModern frequency spectrum analysis often involves the Discrete Fourier Transform calculation. The resolution of frequency of the signal is limited by the discrete nature of the obtained spectrum and relatively big frequency quant of that spectrum. However, the phenomenon of spectral leakage could be used to increase the precision of the frequency measurement using the DFT. The first Interpolated DFT algorithm was proposed in 1970 [1]. In the following years other versions of Interpolated DFT method were introduced [2]-[6] and applied in various areas [7], [8]. Most of the authors analysed their methods analytically or by simulations. The goal of this paper is to compare the practical properties of the Interpolated DFT with that of the theoretical limits. For this purpose, a frequency meter that implements one of the Interpolated DFT method was built.

To avoid ambiguity the following terminology will be used. The time domain voltage series of samples are acquired. The number of samples in a series is called the FFT size. By calculating the FFT the digital spectrum is obtained. The frequency quant of that spectrum is called frequency bin. Frequency measurement is based on frequency estimation by the Interpolated DFT method. Many such estimations form a set of frequency measurements.

The used version of Interpolated DFT is one introduced in [9]. The calculation of the frequency correction factor [[delta].sub.p] consists of only two steps. First, the auxiliary coefficient [gamma([[delta].sub.p]) is calculated using the values of two greatest points on spectral line, A(L) and A(L-1) or A(L+1)

[MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII]. (1)

Next the aforementioned coefficient is normalized to obtain the frequency correction factor [[delta].sub.p]

[[delta].sub.p] = 1/2 x [gamma]([[delta].sub.p]) - [gamma](0)/[gamma](0.5) - [gamma](0), (2)

where [gamma](0) and [gamma](0.5) are calculated using (1) and are constant for a chosen windowing function. What is more, [gamma](0.5) is equal to 1.5 for all even windowing functions e.g. cosine, Dolph-Chebyshev and Kaiser-Bessel windows. Thus, only one coefficient has to be calculated to use the proposed Interpolated DFT method with a new window.

The method is identical to the analytical solution for the Blackmann-Harris windows with maximum side-lobe decay, including the popular Hanning window. For other mentioned popular windows systematic error is about a thousandth of the value of the frequency bin.

II. FREQUENCY METER

The block diagram of the frequency meter, that uses the Interpolated DFT method, is shown in Fig. 1.

A. Analog Part

The input analog signal is conditioned using a single-ended-to-differential amplifier AD8138, and then sampled by a 14-bit A/D converter AD9244. A high sampling rate and high resolution A/D converter requires low jitter clock and that is why a discrete components crystal oscillator was assembled. The power supply of the analog front end has to be carefully decoupled for ripple and noise suppression caused by digital parts switching at high frequencies.

B. Digital Part

Digital samples of the input voltage signal are taken and processed by a 32-bit microcontroller STM32F407VGT, with a floating point and DSP units. The microcontroller multiplies samples by the Hanning window, calculates the FFT and estimates the frequency of the signal using the Interpolated DFT method (1) and (2). It is possible to set the FFT size to 1024, 2048, 4096 or 8192 time domain samples in series. Due to a limitation of the DSP library, the complex FFT is calculated for a FFT size of 1024 and 4096 samples, whereas for the other FFT sizes the real FFT is computed. Additionally, a histogram of the set of frequency measurements could be counted.

All calculations are made by the microcontroller, however the device is controlled by a personal computer via an USB interface. The PC software can display the measured frequency, series of samples in a time domain, discrete spectrum or histogram of the frequency measurements.

III. COMPARISON OF METER PROPERTIES TO THE THEORETICAL LIMITS

Tests were conducted in order to compare meter properties with the theoretical limits [10], [11] and the simulation values obtained earlier [12]. A Fluke 6080A/AN signal generator was the source of the input testing sinusoidal signal. The sampling frequency was set to 6,144 MHz.

A. Basic Properties of the Meter and the Effect of the FFT Size

Table I contains the measurement results of input signal 1000 kHz obtained for different FFT sizes, from 1024 to 8192 samples. As expected, the bigger the FFT size the longer the measurement takes but also better accuracy is gained. The three most interesting remarks are as follows:

--it is possible to measure the frequency 410 times per second with the standard deviation of about 1.3 Hz,

--a standard deviation about 0.076 Hz (7.6 10-8) could be achieved at a rate of 66 measurements per second,

--the greatest profit from the application of the Interpolated DFT method occurs at the FFT size of 4096 samples.

The profit from the application of the Interpolated DFT is defined as the ratio of the frequency bin to the standard deviation of measurements when the Interpolated DFT is used. It is worth mentioning that the total measurement time in all cases is about one order of magnitude greater than the acquiring time, so it is possible to improve the meter by using a faster DSP.

To illustrate the meter's quality, histograms of 1000 frequency measurements of input signal 1000 kHz are shown in Fig. 2 and Fig. 3. They were made for FFT sizes: 1024 and 8192 samples. It can be seen that the spread of measured values is much smaller for a greater FFT size. Moreover, for the 8192 sample case almost all measurements take one of four values, except very few ones that cannot be even seen in Fig. 3 due to the scale of the Y axis. It is consistent with the value of standard deviation of that series which is about 0.0762 Hz and it also reveals the limitation of the built meter. Software analysis led to the conclusion that the limit is caused by the resolution of the single-precision floating-point format used by a 32-bit device and software. Indeed, the smallest difference of real number values near 1000 that can be preserved, using single-precision floating-point format, is about 6.110-5. That is also the reason why the profit from the application of the Interpolated DFT is the greatest for the series of 4096 samples, not 8192 (Table I).

B. The Influence of Input Signal SNR

The existence of noise in the measured signal always limits the accuracy of the frequency measurement. The Cramer-Rao Lower Bound (CRLB) for the variance of estimator of frequency out of N samples when frequency, phase and amplitude are unknown is given by [10]

var(f) [greater than or equal to] 12/[(2[pi] x T).sup.2] x SNR x N x ([N.sup.2] - 1) = CRLB, (3)

where SNR is the signal-to-noise ratio of the sampled signal and T is the sampling interval. In the case of the Interpolated DFT variance of the measurements can be expressed as [11]

var(f) = [C.sub.W.sup.2]/N x SNR, (4)

where [C.sub.w] is a single coefficient for a given window, that cumulates the influence of all the constant factors. Equation (3) is the absolute limit while (4) is the limit of the used algorithm. Figure 4 shows histograms of the three series of measurements of signals that differ only in amplitude. It is equivalent to differing in SNR when all other measurement conditions are unchanged. The lower the SNR, the wider the range of obtained values.

In the Fig. 5 the comparison between measurement results and both theoretical limits is shown. For the input signal of SNR lower than approximately 25 dB the standard deviation of measurements is exactly as predicted (4) while for SNR higher than 25 dB the standard deviation reaches a constant and minimum value. That lower accuracy limit of the meter is caused by the resolution of the 32-bit floating point format and not by the method used. This is not a trivial observation because most often the accuracy of the Interpolated DFT method, as well as the accuracy of the other frequency estimation methods, are given without taking into account the real implementation limitations.

C. The Consequences of Input Signal Amplitude Variations

The measured signal amplitude variations during sampling is another factor that has an impact on the Interpolated DFT accuracy [12]. Modulation of input signal amplitude is the simplest way of modelling that influence. The systematic error of measurements depends on all three amplitude modulation parameters: amplitude, frequency and phase (with respect to the start of acquiring the series of samples). The results for the carrier signal 1386 kHz, modulated with frequency of 1 kHz and the FFT size of 8192 samples, are presented in the Fig. 6 and Fig. 7. For those values the ratio of the modulation signal frequency and the frequency bin is about 1.333, which is in the range of the worst cases [12].

In many cases the process of acquiring samples is not correlated to the modulating signal phase. Therefore, it is enough to collect a set of frequency measurements, that are started randomly, to estimate the expected values of error and standard deviation of the frequency measurements. To be comparable with the measurement results analytical values have to be calculated as averages for sufficiently large number of different phases of modulating signal. The standard deviation values obtained are very similar to the theoretical ones (Fig. 6), but the measured average error differs somewhat from the analytically calculated values (Fig. 7). However, comparing Fig. 6 and Fig. 7 it could be noted that the absolute value of the mean error is at least 5 times smaller than the value of standard deviation for a given modulation index. Therefore, the mean error (Fig. 7) has much less impact on the total measurement error than the standard deviation (Fig. 6).

D. The Effect of Input Signal Frequency Variations

A set of frequency measurements of variable frequency signal has similar properties to a series of variable voltage samples acquired in a time domain. If the rate of frequency change is less than half the rate of frequency measurement, then the series of measurements correctly represents frequency changes (Fig. 8). If the frequency of the input signal changes faster than half the rate of frequency measurement then aliasing occurs (or only frequency mixing according to the pass-band Shannon sampling theory). The greater the rate of input signal frequency changes, the less accurate the single frequency measurement. This is due to the parameter changes of sampled signal during the acquiring process.

IV. CONCLUSIONS

The introduced meter, that uses the Interpolated DFT, allowed comparing the theoretical limits and simulation results obtained earlier with actual meter properties. It occurs that the accuracy of the frequency measurement, the influence of number of samples in a series and the influence of measured signal amplitude variation are consistent with the theoretical and simulation results except for one case.

For input signal of SNR higher than a certain value (25 dB for 8192 samples in series), the standard deviation of measurement reaches a minimum, constant value. Software tests and analysis of measurement results lead to the conclusion, that this is caused by the resolution of the used 32-bit floating-point format. Therefore, the accuracy of the Interpolated DFT method and other frequency estimation methods should be considered with particular attention to low SNR level signals because for the high SNR signals the real implementation limitations could occur. To work around that problem, a 64-bit floating-point format has to be used.

It should be pointed out, that due to using spectral analysis, the meter can simultaneously measure the frequencies of many non-overlapping spectrum lines. The limiting parameters of the introduced meter are: rate of measurements up to 410 per second or standard deviation about 7.6 10-8 but those parameters could be improved by using faster and more precise calculating device.

References

[1] D. C. Rife, G. A. Vincent, "Use of the discrete Fourier transform in the measurement of frequencies and levels of tones", Bell System Technical Journal, vol. 49, no. 2, pp. 197-228, 1970. [Online]. Available: https://doi.org/10.1002/j.1538-7305.1970.tb01766.x

[2] G. Andria, M. Savino, A. Trotta, "Windows and interpolation algorithms to improve electrical measurement accuracy", IEEE Trans. Instrumentation and Measurement, vol. 38, no. 4, pp. 856863, 1989. [Online]. Available: https://doi.org/10.1109/ 19.31004

[3] C. Offelli, D. Petri, "Interpolation techniques for real-time multifrequency waveform analysis", IEEE Trans. Instrumentation and Measurement, vol. 39, no. 1, pp. 106-111, 1990. [Online]. Available: https://doi.org/10.1109/19.50426

[4] D. Agrez, "Weighted multi-point interpolated DFT to improve amplitude estimation of multi-frequency signal", Instrumentation and Measurement Technology Conf., (IMTC 2000), vol. 51, pp. 287-292, 2000. [Online]. Available: https://doi.org/10.1109/IMTC.2000. 848891

[5] D. Belega, D. Dallet, "Frequency estimation via weighted multipoint interpolated DFT", IET Science, Measurement & Technology, vol. 2, no. 1, pp. 1-8, 2008. [Online]. Available: https://doi.org/10.1049/ietsmt:20070022

[6] K. Duda, "DFT interpolation algorithm for Kaiser-Bessel and DolphChebyshev windows", IEEE Trans. Instrumentation and Measurement, vol. 60, no. 3, pp. 784-790, 2011. [Online]. Available: https://doi .org/10.1109/TIM.2010.2046594

[7] Y. Sun, C. Zhuang, Z. Xiong, "A scale factor-based Interpolated DFT for chatter frequency estimation", IEEE Trans. Instrumentation and Measurement, vol. 64, no. 10, pp. 2666-2678, 2015. [Online]. Available: https://doi.org/10.1109/TIM.2015.2421711

[8] T. Zielinski, K. Ostrowska, "Application of Bertocco-Yoshida interpolated DFT algorithm to NMR data analysis", in IEEE Int. Conf. Signals and Electronic Circuits (ICSES 2016), 2016, pp. 6367. [Online]. Available: https://doi.org/10.1108/ICSES.2016. 7593821

[9] W. Oliwa, "An Improved approach to interpolated DFT", PDS 2001, Gliwice 2001.

[10] D. C. Rife, R. R. Boorstyn, "Single-tone parameter estimation from discrete-time observations", IEEE Trans. Information Theory, vol. 20, no. 5, pp. 591-598, 1974. [Online]. Available: https://doi .org/10.1109/TIT. 1974.1055282

[11] W. Oliwa, "Analiza wplywu szumu na dokladnosc wyznaczenia czestotliwosci za pomoca metody Interpolowanej DFT", Pomiary Automatyka Kontrola, Warszawa, pp. 123-125, 2006. (in Polish).

[12] W. Oliwa, "An influence of signal amplitude variation on interpolated DFT method", in IEEE Int. Conf. Signals and Electronic Circuits (ICSES 2010), 2010, pp. 77-80. [Online]. Available: http://ieeexplore.ieee.org/document/5595248

http://dx.doi.org/ 10.5755/j01.eie.23.3.18331

Wojciech Oliwa (1), Grzegorz Wieczorek (1)

(1) Institute of Electronics, Silesian University of Technology, Akademicka St.16, 44-100 Gliwice, Poland

woliwa@polsl.pl

Manuscript received 19 September, 2016; accepted 22 March, 2017.

This research was funded by the Ministry of Science and Higher Education of Poland for statutory activities.

Caption: Fig. 1. A block diagram of the frequency meter that uses the Interpolated DFT method.

Caption: Fig. 2. A histogram of 1000 frequency measurements using series of 1024 samples each. The frequency error is the difference between the obtained value of measurement and the mean value of 1000 measurements.

Caption: Fig. 3. A histogram of 1000 frequency measurements using series of 8192 samples each. The frequency error is the difference between the obtained value of measurement and the mean value of 1000 measurements.

Caption: Fig. 4. Histograms of 3 sets of 340 measurements each. The signals differ only in amplitude which is equivalent to differing in SNR. The range of Y axis scale is less than needed to display "0 dBm" histogram for clarity reasons.

Caption: Fig. 5. Standard deviation of frequency measurement normalized in relation to frequency bin vs. input signal SNR. Each standard deviation value is calculated of 1000 measurements. The FFT size was set to 8192 samples. "Interpolated DFT limit" was plotted according to (4). CramerRao Lower Bound was plotted according to (3) but using substitution T = 1/N in order to normalize in relation to frequency bin.

Caption: Fig. 6. Standard deviation of frequency measurement normalized in relation to frequency bin vs. amplitude modulation index. Each standard deviation value is calculated of 1000 measurements, that started at random phase of modulating signal. Analytically calculated line bases on averaging of errors for 63 different phases.

Caption: Fig. 7. Average error of frequency measurement normalized in relation to frequency bin vs. amplitude modulation index. Each average error value is calculated of 1000 measurements that started at random phase of modulating signal. Analytically calculated line bases on averaging of errors for 63 different phases.

Caption: Fig. 8. Example of frequency measurements of variable frequency signal. Input signal frequency was binary modulated at 100 Hz modulation rate.

TABLE I. METER PROPERTIES. Size of FFT: 1024 2048 4096 8192 Acquiring time [ms] 0.17 0.34 0.66 1.34 Total measurement time [ms] 2.44 4.88 9.53 15.2 Rate of measurements [1/s] 410 205 105 66 Standard deviation [Hz] 1.282 0.559 0.1004 0.0762 Frequency bin [Hz] 6000 3000 1500 750 Interpolated DFT gain 4678 5359 14933 9847

Printer friendly Cite/link Email Feedback | |

Author: | Oliwa, Wojciech; Wieczorek, Grzegorz |
---|---|

Publication: | Elektronika ir Elektrotechnika |

Article Type: | Report |

Date: | Jun 1, 2017 |

Words: | 2851 |

Previous Article: | Realization and evaluation of the device for measuring the impedance of human body for detecting the respiratory and heart rate. |

Next Article: | Electronically tunable fully-differential fractional-order low-pass filter. |

Topics: |