1
$\begingroup$

I read about method of analyzing audio signals where FFT result is bandpass-filtered and the energy of this band is counted. Can you count the momentary energy in frequency domain? Does this mean summing magnitude value from all frequency bins (after filtering)?

(I don't care whether this will yield the value similar to the one counted in time domain but just if this can be of some benefit - reflect the energy present within this band.)

$\endgroup$

1 Answer 1

6
$\begingroup$

Parseval's theorem applied to the signal itself:

$$\sum_{n=0}^{N-1}|x[n]|^2 = \frac{1}{N}\sum_{k=0}^{N-1}|X[k]|^2$$

So, if you sum the magnitude squared of the frequency coefficients of the DFT, you get the energy of your time-domain vector.

If you want power (i.e. energy per sample), divide both sides by $N$.

$\endgroup$
5
  • 1
    $\begingroup$ How does this change for FFT lengths not equal to the original length of the signal? $\endgroup$
    – Spacey
    Commented Oct 10, 2012 at 0:52
  • $\begingroup$ It doesn't change. For the above statement of Parseval's theorem, the "signal" is by definition $x[n]$ and has length $N$ samples. Its transform $X[k]$ therefore also has $N$ samples. If you apply the relation to some subset (with length $N'$ from the larger length-$N$ signal, then you effectively have a new $x[n]$, and the relation holds over the new length $N'$. $\endgroup$
    – Jason R
    Commented Oct 10, 2012 at 2:38
  • $\begingroup$ The index for the summation on the right hand side should be $k$ rather than $n$. This edit is too short for me to do silently, unfortunately. $\endgroup$
    – Eric
    Commented Oct 10, 2012 at 4:39
  • 1
    $\begingroup$ @Eric: meta.stackexchange.com/q/82534/130885 $\endgroup$
    – endolith
    Commented Oct 10, 2012 at 21:41
  • $\begingroup$ @JasonR Thanks, I didnt see your answer since my name wasnt tagged. Either way, yes, since a larger size FFT just means we have zero-padded the time-domain signal, it shouldnt/cant change. $\endgroup$
    – Spacey
    Commented Oct 11, 2012 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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