Energy Detection Algorithm Uncertainty

I'm currently working on a project to perform energy detection of an IEEE 802.15.4 using the block diagram illustrated below. However, I do have a little uncertainty about the algorithm. I'm wondering after finding the magnitude squared values at each FFT bin, do you then add each bin value up and divide by the number of bins (N) to get the average power? And also, do you just repeat this averaging M times? And why exactly do you repeat this averaging M times?? • If you expect to see signal in some particular bins, add only those. – Stanley Pawlukiewicz Sep 21 '17 at 17:24
• What is $M$? ... – MBaz Sep 21 '17 at 18:10

I'm wondering after finding the magnitude squared values at each FFT bin, do you then add each bin value up and divide by the number of bins (N) to get the average power?

Yes.

And also, do you just repeat this averaging M times?

Yes, you would have to...

And why exactly do you repeat this averaging M times??

...to reduce the impact of noise on your measurement and also, depending on the length of the FFT, to make sure that you have captured the whole dynamics of your signal.

For more information, please see Power Spectrum Estimation Using the FFT.

Hope this helps.

• Based on the source you provided and some other resources the division by N is mainly for normalization correct? And M being equal to 1 would basically be similar to a periodogram where as M being greater than 1 implies multiple periodograms and averaging such as with Barlett or Welch? – Tellrell White Sep 27 '17 at 1:34
• The $\frac{1}{N}$ is the Fourier Transform related averaging while the $M$ is averaging over the number of different frames acquired. – A_A Sep 27 '17 at 10:11