Electronics > Projects, Designs, and Technical Stuff
Signal processing - getting exact frequency from short ADC sample
MasterT:
Correlation with a sine wave is a Goertzel algorithm. The solution is to synthesize 10-50 sets of coefficients for Goetzel tunned at 10 000 +- N x 0.1 Hz, than run a math with input data array. Last step is to find a maximum. Theoretically, there is no limits to frequency calculation, since steps could be any value, 0.1 or 0.0001 Hz. Everything would depends on SNR ratio. Here is a quick test,
Data 12-bits, polluted with noise 16 - 64- 256 LSB. With higher noise level peak is drifted to the right, last value -256 is off for 0.2 Hz
Code:
nctnico:
That doesn't sound like a good approach because you need to do a lot of math and the result is still a guess. Goertzel is basically a single bin FFT. If you need to achieve a high resolution then you need many very narrow bins to try.
The easiest and least processing intensive solution by far is to create a frequency meter in software using interpolated data.
Marco:
Very simple algorithms using the FFT bins near the max bin seem to get so close to the error bound that anything more complex than that seems superfluous.
https://www.researchgate.net/publication/3316697_Fast_nearly_ML_estimation_of_the_parameters_of_real_or_complex_single_tones_or_resolved_multiple_tones
Following the citations there are autocorrelation methods which are faster.
PS. actually if I wanted something faster I'd consider doing single sample delay autocorrelation to get a good estimate, then do DFT for 3 or 5 components and do the DFT based estimation. That way you can skip the full 256 point FFT ... but is a 256 point FFT really going to be a problem?
mark03:
I'm seeing an awful lot of ad-hoc and intuition-based methods being proposed here, largely based on the FFT. While this may be useful for understanding the problem, I feel like I should repeat the point I made earlier: The best chance for success will probably come from "subspace" methods using the singular value decomposition, specifically the MUSIC and ESPRIT type algorithms. These are able to leverage a priori knowledge about the signal (the number of sinusoids) and can achieve significantly better resolution than FFT-based methods.
Marco:
They are ridiculously over complex for a single sinusoid. The 5 bin discrete fourier based method in the paper is within 0.6 dB of optimal ... as I said, something much more complex doesn't make a whole lot of sense.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version