Re: Energy Measurement



Mark wrote:
Rick Lyons wrote:
On 6 Jun 2006 17:27:22 -0700, "Randy Yates" <yates@xxxxxxxx> wrote:

Gentle comp.dsp'ers,

I again have a question that is essentially the same as the one I
posted back at the beginning of April, but better stated.

Assume one has a buffer of 65536 samples, and the goal is to measure
the energy between Fs/4 and Fs/2 (just arbitrary frequencies selected
for this example) - half the available digital bandwidth - with as
little energy from the 0 to Fs/4 band in the measurement as possible.

Method one: use a DFT. The manner in which the DFT is applied is open
for discussion.

Method two: construct a large FIR, say, 500 taps or more, with a
near-brick-wall frequency response and measure the energy of the
output of this filter with the input data applied.

Which do you think is more accurate in rejecting energy from 0 to
Fs/4?

--Randy

Hi Randy,
what an interesting question. So many things to
consider.

Assuming that your time samples are not windowed
before they are applied to an N-point DFT,
leakage from your "unwanted" N/2 DFT bins will show
up, to some degree, in your N/2 "bins of interest".

My vote is that you use your Method Two (high-performance
FIR filter). 500 taps ought to give you one
***-kickin' filter!

Good Luck,
[-Rick-]

Rick,
Isn't this exact question addressed very well in your book in Section
13.20 "A Paractical Spectrum Analyzer"? The "weighted overlad-add or
window presum FFT can be used to imprve the shape factor of the FFT.

Yes, and damned if Rick didn't point me to that section a few weeks
ago and I dropped the ball. Thanks for the reminder, Mark. What an
excellent piece of work it is, too. The only thing I'm wondering is
if this can be extended to an indefinite sequence.

Note also that this technique extends the dynamic range of
the underlying data. For example, if you had 16-bit data and
P was 16, I think you'd extend your resolution to the equivalent
of 20 bits.

Randy,
I think the "manager answer" is that both methods can do the job but
that the FIR is more computationaly efficient because the FFT is also
calculating the energy in all the other bins as well and the problem
calls for the energy in only one bin.

Yes, that's a "hand-waving" answer, but probably good enough for
the managers...

OK.....so then what about the Goertzel which if I understand correctly
is equivalent to an IIR filter... so another question...why consider
only FIR, why not IIR as well?

Answer: Plain laziness. Having to build and tweak the SOSs of an IIR
with an eye towards the round-off problems just seems like so much
work... But that could be a great "beta" algorithm.

Seems the most computationally efficent would be an IIR filter.....no?

Yes, I agree. Thanks for your comments, Mark.

--Randy

.