# 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. – user28715 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.

• 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