Forums

Windowing: Resolution vs dynamic range

Started by Eric March 21, 2017
Wikipedia has an informative page on Window functions. See this
paragraph for context on dynamic range vs resolution:

  https://en.wikipedia.org/wiki/Window_function#Windowing

The second part of that paragraph references tradeoffs between dynamic
range and resolution. 

I'm assuming that the reference to 'dynamic range' means 'difference
between center peak and nearby lobes',  This would seem to refer to
rectangular windows as having _low_ dynamic range.

But it then goes on to say that windows with high dynamic range suffer
from 'low sensitivity and resolution'.  This seems vague.  I don't
picture rectangular windows as having high resolution.  (In fact, is
there an application that suits them?)

I'm still wondering about this in regard to detecting signal within
noise, which is touched on here: 

"At the other extreme of dynamic range are the windows with the
"poorest resolution and sensitivity, which is the ability to reveal
"relatively weak sinusoids in the presence of additive random noise.
"That is because the noise produces a stronger response with
"high-dynamic-range windows than with high-resolution windows. "

Can anyone shed some light?
>Wikipedia has an informative page on Window functions. See this >paragraph for context on dynamic range vs resolution: > > https://en.wikipedia.org/wiki/Window_function#Windowing > >The second part of that paragraph references tradeoffs between dynamic >range and resolution. > >I'm assuming that the reference to 'dynamic range' means 'difference >between center peak and nearby lobes', This would seem to refer to >rectangular windows as having _low_ dynamic range. > >But it then goes on to say that windows with high dynamic range suffer >from 'low sensitivity and resolution'. This seems vague. I don't >picture rectangular windows as having high resolution. (In fact, is >there an application that suits them?) > >I'm still wondering about this in regard to detecting signal within >noise, which is touched on here: > >"At the other extreme of dynamic range are the windows with the >"poorest resolution and sensitivity, which is the ability to reveal >"relatively weak sinusoids in the presence of additive random noise. >"That is because the noise produces a stronger response with >"high-dynamic-range windows than with high-resolution windows. " > >Can anyone shed some light?
If you haven't already, you should read this paper: harris, f.j., "On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform” Proc.IEEE, 66, pp. 51-83, January 1978. If your goal is to detect a signal within noise, may I suggest a different approach than using window functions? I recommend that you read my blog article titled "Exponential Smoothing with a Wrinkle" which can be found here: https://www.dsprelated.com/showarticle/896.php By smoothing your signal like this you lower the relative impact of noise. This is because the DFT (implicitly a least squares fit) is more sensitive to outliers (i.e. noise) in the signal. By smoothing the signal you smear the outliers against the signal reducing their distortive effect. Your signal will be smoothed too, but because it is a sinusoidal this translates into a reduction of the amplitude by a known frequency dependent amount. Another way to look at it is that the smoothing operation is like a window on steroids. If you look at taking the DFT as a matrix operation it looks like this: Z = F * S Where Z is the transform, F is the DFT matrix, and S is your signal. A window function is the equivalent of a diagonal matrix like this: Z = F * W * S The smoothing operation can be thought of as this: Z = F * M * S Where M is a full matrix. However it is a lot more efficient to do the smoothing as a running exponential average. Ced --------------------------------------- Posted through http://www.DSPRelated.com
On Tue, 21 Mar 2017 11:15:10 -0500, "Cedron" <103185@DSPRelated>
wrote:

>If your goal is to detect a signal within noise, may I suggest a different >approach than using window functions? > >I recommend that you read my blog article titled "Exponential Smoothing >with a Wrinkle" which can be found here: > >https://www.dsprelated.com/showarticle/896.php > >By smoothing your signal like this you lower the relative impact of noise. > This is because the DFT (implicitly a least squares fit) is more >sensitive to outliers (i.e. noise) in the signal. By smoothing the signal >you smear the outliers against the signal reducing their distortive >effect.
Thanks for posting that, Cedron. I'll definitely take a close look. For now: Your smoothing function looks a bit like an LPF (a Fibonacci filter! :-). Are you recommending using it before the DFT? And instead of a window??! I believe that the Wikipedia article on windowing was referring to noise sensitivity from the subsequent FFT, but perhaps I misinterpreted that. I didn't think there was much point in windowing unless some type of DFT was to follow.
On Tue, 21 Mar 2017 15:32:45 -0400, Eric <Eric@spamspamorspam.com>
wrote:

>Wikipedia has an informative page on Window functions. See this >paragraph for context on dynamic range vs resolution: > > https://en.wikipedia.org/wiki/Window_function#Windowing > >The second part of that paragraph references tradeoffs between dynamic >range and resolution. > >I'm assuming that the reference to 'dynamic range' means 'difference >between center peak and nearby lobes', This would seem to refer to >rectangular windows as having _low_ dynamic range. > >But it then goes on to say that windows with high dynamic range suffer >from 'low sensitivity and resolution'. This seems vague. I don't >picture rectangular windows as having high resolution. (In fact, is >there an application that suits them?)
The rectangular window provides the narrowest main lobe, and a generally-used definition of "resolution" in this case is the 3-dB width of the main lobe. For this case, the rectangular window provides high resolution, so for applications that need that it is a good selection (and there are many!). Pretty much any application where the signal is a single sinusoid (rather than a spectrally rich signal), the rectangular window is a good candidate. Even for spectrally rich signal it really depends on what you're doing whether a different window, or which window, makes the most sense.
>I'm still wondering about this in regard to detecting signal within >noise, which is touched on here: > >"At the other extreme of dynamic range are the windows with the >"poorest resolution and sensitivity, which is the ability to reveal >"relatively weak sinusoids in the presence of additive random noise. >"That is because the noise produces a stronger response with >"high-dynamic-range windows than with high-resolution windows. " > >Can anyone shed some light?
That last sentence seems very poorly worded, enough so that I'm not sure what they were trying to say. They *may* be saying that spreading the main lobe energy over multiple bins reduces the SNR (by reducing the power concentration in the main lobe), but it's not clear to me. --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
> >Thanks for posting that, Cedron. I'll definitely take a close look. >
You're welcome. It isn't difficult to implement so you can try it easily and see if it works in your application.
>For now: Your smoothing function looks a bit like an LPF (a Fibonacci >filter! :-). Are you recommending using it before the DFT? And >instead of a window??! >
The averaged version does act like a (poor) low pass filter. The difference version will accentuate the amplitudes of the higher frequency components so I don't think the description fits. Yes, and yes. Although you could still apply a window on the smoothed signal, depending what your goals are. If tonal decomposition is your goal, then I don't think windows are helpful. If a nice display is what you seek, then a Hann window does a wonderful job.
>I believe that the Wikipedia article on windowing was referring to >noise sensitivity from the subsequent FFT, but perhaps I >misinterpreted that. I didn't think there was much point in windowing >unless some type of DFT was to follow.
That is my understanding. For the smoothing, I would recommend including parts of the surrounding frames as the smoothing operation takes a few samples to get accurate. Ced --------------------------------------- Posted through http://www.DSPRelated.com
> >I recommend that you read my blog article titled "Exponential Smoothing >with a Wrinkle" which can be found here: > >https://www.dsprelated.com/showarticle/896.php >
It seems that the figures are missing from this article. Hopefully, they'll be back soon. Ced --------------------------------------- Posted through http://www.DSPRelated.com
Eric  <Eric@spamspamorspam.com> wrote:

>Wikipedia has an informative page on Window functions. See this >paragraph for context on dynamic range vs resolution: > > https://en.wikipedia.org/wiki/Window_function#Windowing > >The second part of that paragraph references tradeoffs between dynamic >range and resolution. > >I'm assuming that the reference to 'dynamic range' means 'difference >between center peak and nearby lobes', This would seem to refer to >rectangular windows as having _low_ dynamic range. > >But it then goes on to say that windows with high dynamic range suffer >from 'low sensitivity and resolution'. This seems vague. I don't >picture rectangular windows as having high resolution. (In fact, is >there an application that suits them?) > >I'm still wondering about this in regard to detecting signal within >noise, which is touched on here: > >"At the other extreme of dynamic range are the windows with the >"poorest resolution and sensitivity, which is the ability to reveal >"relatively weak sinusoids in the presence of additive random noise. >"That is because the noise produces a stronger response with >"high-dynamic-range windows than with high-resolution windows. " > >Can anyone shed some light?
I would delete the word "sensitivity" from the above Wiki entry, the rest of it is largely correct, but should be supplemented with the information that _for a given total window length_ there is a tradeoff between (frequency) resolution and dynamic range. Dynamic range is usually thought to consider the entire stopband, not just nearby side-lobes, unless one is just looking at a frequency domain plot of the window and making an quick statement about dynamic range. Steve
On Tue, 21 Mar 2017 17:36:06 GMT, eric.jacobsen@ieee.org wrote:

>On Tue, 21 Mar 2017 15:32:45 -0400, Eric <Eric@spamspamorspam.com>
>> https://en.wikipedia.org/wiki/Window_function#Windowing >>This would seem to refer to >>rectangular windows as having _low_ dynamic range. >> >>But it then goes on to say that windows with high dynamic range suffer >>from 'low sensitivity and resolution'. This seems vague. I don't >>picture rectangular windows as having high resolution. (In fact, is >>there an application that suits them?)
>The rectangular window provides the narrowest main lobe, and a >generally-used definition of "resolution" in this case is the 3-dB >width of the main lobe. For this case, the rectangular window >provides high resolution, so for applications that need that it is a >good selection (and there are many!).
OK, that sounds like a reasonable definition.
>>...detecting signal within >>noise, which is touched on here: >> >>"At the other extreme of dynamic range are the windows with the >>"poorest resolution and sensitivity, which is the ability to reveal >>"relatively weak sinusoids in the presence of additive random noise. >>"That is because the noise produces a stronger response with >>"high-dynamic-range windows than with high-resolution windows. "
>That last sentence seems very poorly worded, enough so that I'm not >sure what they were trying to say. They *may* be saying that >spreading the main lobe energy over multiple bins reduces the SNR (by >reducing the power concentration in the main lobe), but it's not clear >to me.
Yeah, I keep re-reading that to see if I'm parsing it correctly. The obvious interpretation is that "sensitivity = the ability to detect signals in the presence of noise." and that high dynamic range windows (again, I'm thinking Blackman-Harris here) are -not- good at detecting signal within noise. Assuming that's correct, why would noise produce a stronger response with high-dynamic-range windows?
On Tue, 21 Mar 2017 13:07:43 -0500, "Cedron" <103185@DSPRelated>
wrote:

>> >>I recommend that you read my blog article titled "Exponential Smoothing >>with a Wrinkle" which can be found here: >> >>https://www.dsprelated.com/showarticle/896.php >> > >It seems that the figures are missing from this article. Hopefully, >they'll be back soon. > >Ced
You mean the 3-color graphs under the captions "Figure 1" etc? Those show up on my system.
>On Tue, 21 Mar 2017 13:07:43 -0500, "Cedron" <103185@DSPRelated> >wrote: > >>> >>>I recommend that you read my blog article titled "Exponential
Smoothing
>>>with a Wrinkle" which can be found here: >>> >>>https://www.dsprelated.com/showarticle/896.php >>> >> >>It seems that the figures are missing from this article. Hopefully, >>they'll be back soon. >> >>Ced > >You mean the 3-color graphs under the captions "Figure 1" etc? >Those show up on my system.
Strange. Thanks for letting me know. They don't show up for me under two different browsers. Ced --------------------------------------- Posted through http://www.DSPRelated.com