3 ms·
If you only want to detect one frequency, can't you jut use the "slow" fourier transform?
by shasta 15y ago
If you only want to detect one frequency, can't you jut use the "slow" fourier transform?
- mahadri 15y agoYes, the discrete Fourier transform (DFT) detects N frequencies in parallel, where N is the block size, and you can disregard the uninteresting frequencies. The fast Fourier transform (FFT) is an efficient algorithm that computes the DFT. For detecting M frequencies where M << N, the Goertzel algorithm requires less computation than the FFT. Also, the Goertzel algorithm allows targeting more exact frequencies regardless of the sampling rate (Fs), while the FFT's bins have a fixed spacing of ±Fs/N. As with everything, there are trade-offs associated with these three options.
- adrianbg 15y agoGoertzel is just actually just computing a single DFT term... not that crazy.
- skew 15y agoThis looks like a row of a DFT, but using the history variables and the single cosine to avoid computing the coefficients from scratch.