0

I know that directly zero DFT bins outside a frequency band has the side effect of introducing ringing, as this post says Why is it a bad idea to filter by zeroing out FFT bins?. But what about calculating the power by summing the PSD in a frequency band. In my opinion, this is similar to first setting the out-band PSD amplitudes to zeros (which may cause ringing in time domain) and then summing the remainning nonzero amplitudes.

I guess it is different from first applying a bandpass filter to the time domain signal(which has no ringing) and calculating the power by averaging the squared time domain samples. Can you point out how much error the frequency domain method has? or maybe these two methods are equivalent?

ecook
  • 379
  • 1
  • 8

1 Answers1

0

For a DFT that was computed with only a rectangular window (no further windowing beyond the selection), the power in the "out of band" bins contains signal energy from "in-band", so by zeroing those out, you are not including the power that should be in the computation. The challenge however is that if there is energy out of band, it will similarly have components within your band of interest! Here we see that the real flaw is trying to compute the power within a bandwidth without windowing the signal in the time domain first to reduce the effects of sidelobes in the DFT.

More details on doing this accurately, and specifically accounting for the power loss due to the windowing, and the change in the equivalent noise bandwidth of each bin, please see this post here:

How can I get the power of a specific frequency band after FFT?

and

How to calculate resolution of DFT with Hamming/Hann window?

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135
  • All these techniques need a cautionary note "For a well behaved signal." If I construct a tone at a frequency, reverse its phase halfway in the frame, then calculate the DFT it will say I have zero energy at that frequency. – Cedron Dawg Jul 19 '20 at 16:03
  • Well it will actually have zero energy at that frequency! This is simply carrier suppression in BPSK! For example if you flip a pure sine wave 0 and 180 degrees with a 50% duty cycle, the energy will not be at the carrier (the frequency of the sine wave) but will be at side-bands spaced at the odd harmonics of the modulation rate) – Dan Boschen Jul 19 '20 at 16:04
  • No argument. But the implication is that if you are analyzing a tone signal with a wandering phase, frame selection becomes important and energy becomes a definitional thicket. – Cedron Dawg Jul 19 '20 at 16:21
  • 1
    But that is similarly the effect of modulation (phase modulation in that case). With the DFT you are getting the same result as if the frame repeated for infinite time; it’s as simple as that. Hence the motivation for windowing. Power spectral density measurement implies a stationary signal (otherwise the PSD doesn’t exist). – Dan Boschen Jul 19 '20 at 16:30
  • A DFT is a weighted average of the signal content for a fixed interval. How you might extrapolate from that is your business, the DFT is silent. The only time the "default" extrapolation matches the signal is when the frame is on a whole number of cycles of a periodic signal. I understand the motivation for windowing. I am working on a project where I am determining real tone parameters to 4 or 5 significant digits using DFT frames with 8 samples. If I extend it even to 10, the precision suffers. Windows would make the task impossible from the get go. – Cedron Dawg Jul 19 '20 at 16:54
  • Can I say that computing the power of a frequency band by zeroing out-of-band components and summing the in-band components of psd is only correct when we windowing the signal in time domain to suppress sidelobes? And if rectangular window is used, it is not equal to the time domain calculation, i.e., bandpass filtering, squaring and averaging? – ecook Jul 24 '20 at 03:48
  • @ecook Windowing will reduce the error to a tolerable level but you must factor in the loss of the window, and that each bin now contains the power over multiple bins (since the main lobe in the frequency domain increases due to the time domain windowing) This is discussed in more detail in the links I provided; if you have further questions related to that better to post them there if it is specific to that. – Dan Boschen Jul 24 '20 at 04:00