3
$\begingroup$

I'm trying to intuitively understand why a windowing function of a signal is a low-pass filter.

I know its DTFT is a sinc function, making it mathematically a low-pass filter, but my logic says truncating a signal with a windowing function would preserve high frequencies better than low frequencies, since high frequencies have a better chance at showing up in the window.

$\endgroup$

4 Answers 4

10
$\begingroup$

Windowing is not a filter.

Windowing is a multiplication of two signals in time (the input samples with the window function: $x_w[n] = x[n] \times w[n]$ ).

What you get in the frequency domain is a (circular) convolution of the transforms of your signal and the window.

This convolution in the frequency domain can be seen as the spectrum being low-pass-filtered, giving a resulting spectrum with less detail.

[In the case of a filter, you get convolution in time and product in frequency.]

$\endgroup$
2
  • 2
    $\begingroup$ +1, though I will nitpick the following- "This convolution in the frequency domain can be seen as the spectrum being low-pass-filtered, giving a resulting spectrum with less detail." If the original signal is primarily low frequencies windowing will make it less so (i.e. the resulting weighted frequency content will be higher). Conversely, if the original signal tends to high frequencies windowing will make it less so (i.e. the weighted frequency content will be lower). $\endgroup$
    – Jim Clay
    Commented May 14, 2013 at 16:54
  • 1
    $\begingroup$ a sliding window function (and any application of windowing can be thought of as a single instance of the same window sliding across the signal data) is precisely the same as convolution which is precisely what we say that LTI filters do. in a very salient manner, Windowing is a filter. so no up arrow from me. $\endgroup$ Commented Nov 24, 2015 at 23:21
5
$\begingroup$

I do interpret the question "why is windowing function a low-pass filter?" in another direction: why can a (typical) window function be interpreted as the series of coefficients of a low-pass filter? Because of the duality between the time and the frequency domains, so:

Mostly because the coefficients of a normalized window sum to one (which could not be said, for instance, about most wavelets, which are zero-sum)

Most classical windows are positive, symmetric, and can be normalized so that their samples $h_i $ sum to one (since $\sum_i h_i \neq 0$). Their coefficients can be interpreted as weights, and you can replace a signal sample by a weighted sum of other samples and the window weights: each weighted one is replaced by a center of mass. It suffices to divide the result by the sum of weights to get an averaging filter (center of gravity). Since most standard windows are symmetric and often unimodal with maxima at their center, they look like regular smoothing filters: a rectangular window convolves like a moving average filter, a Bartlett filter, a Gaussian window ... like a Gaussian filter.

enter image description here

So, smoothing with a box or a triangle somehow boils down to interpreting a windowing function as a low-pass filter.

Moreover, a repeated (or parallel) use of box rectangular windows of different sizes is used to approximate more complex filters, in a very fast fashion, see for instance Theoretical Foundations of Gaussian. Convolution by Extended Box Filtering, 2011.

$\endgroup$
2
  • 1
    $\begingroup$ The paper about extended box filtering was very interesting, but the link seems to be broken. It can be fixed with a single extra s in https, but I don't have enough reputation to suggest an edit of less than 6 characters. The correct link should be mia.uni-saarland.de/Publications/gwosdek-ssvm11.pdf $\endgroup$
    – EdvinW
    Commented Jan 20, 2023 at 10:24
  • 1
    $\begingroup$ Correction performed. $\endgroup$ Commented Jan 28, 2023 at 22:05
0
$\begingroup$

"Intuitively, why is windowing function a low-pass filter?"

Intuitively, assuming you are not using a rectangular filter, the window function removes the sharp transitions at the start and end of the data to be analyzed. The onset of the data is tapered up gently from 0 to full scale and the data is tapered down gently to 0 at the trailing end of the data. This reduces high frequency content associated with the transition at the start and end of the data.

For example if you assume your data to be a rectangular pulse just shorter than the analysis window, the rectangular pulse will have some high frequency content associated with the sharp transitions at the start and end of the pulse. Now apply a trapezoidal window function so the rectangular pulse also becomes trapezoidal. Clearly the DFT will show less high frequency content after application of the window. Other tapering windows have a similar effect.

The degree to which high frequency content is affected by the window function will depend on the nature (shape) of both your window and your data.

As mentioned above, this is not technically a linear filter operation, but the window function can have a lowpass effect on the spectrum.

$\endgroup$
0
$\begingroup$

There are window functions you could apply that would not be a lowpass filter, such as finding the maximum value in the window like the example here. (If anyone has reasons why a running window max is still a lowpass filter, I'd be curious to know!)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.