1
$\begingroup$

Given a block, $x[n]$, of M samples.

Calculating abs(fft(x)).^2 returns the power spectrum of that block through the use of a $M$-point FFT.

I can calculate the same using Goertzel's algorithm.

At which $M$ will it be more efficient to use an FFT instead of Goertzel?

$\endgroup$
5
  • 1
    $\begingroup$ What do you mean by power of N ? is it $2^N$ frequency points? That's to say, you want to compute a $2^N$-point DFT of M-point sequence x[n], using either an FFT or the Goertzel algorithm..? $\endgroup$
    – Fat32
    Oct 5 at 22:45
  • 1
    $\begingroup$ By power of N I mean the power of N frequency points. I want to either compute an N-point FFT of an M-point sequence which returns N frequencies OR I want to compute it using Goertzel. My question is: For which N is an FFT more efficient than using Goertel? $\endgroup$
    – james3849
    Oct 6 at 8:10
  • 2
    $\begingroup$ @james3849 You didn't answer Fat32's question. If N = 4 what is the "power of N"? $\endgroup$ Oct 6 at 10:52
  • 1
    $\begingroup$ @RichardLyons Sorry for not being clear. Read it as "power of N frequencies" and not "power of N". In other words, I am interested in calculating the power of N frequency bins. $\endgroup$
    – james3849
    Oct 6 at 12:14
  • 1
    $\begingroup$ Ha ha! I thought your statement Let's say I want to run a frequency analysis that returns the power of N equally spaced frequencies. indicated that you run a DFT that calculates (returns) power of $N$, (that's to say $a^N$ for some $a$ not indicated) equally spaced frequency points. That's why I asked for clarification of the term power or N... $\endgroup$
    – Fat32
    Oct 6 at 12:47
4
$\begingroup$

If you implement the Goertzel algorithm P times to detect P different spectral samples, Goertzel is more efficient (fewer multiplies) than the N-point FFT when P < log2(N).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.