# What is a window function with positive spectrum?

I need a real, symmetric window function $x(t) = x(-t)$ whose Fourier transform $\hat{x}(\omega)$ (also real and symmetric) is non-negative $\hat{x}(\omega) \ge 0$ for all $\omega$. The function does not need to have finite support or be causal. An equivalent problem is to find a good low pass filter with a positive impulse response.

A rectangular window would not satisfy this requirement, since its transform is a sinc function.

A Gaussian window $x(t) = \exp(-at^2)$ would satisfy this requirement, since the transform of a Gaussian is a Gaussian, which is positive. However, a Gaussian function does not make a good window because it is too narrow i.e. the cut-off point is too close to the origin compared to the function's decay. Other functions with positive transforms include the Laplacian density function $x(t) = \exp(-a|t|)$ and the triangular function, but these are worse than the Gaussian.

The Hann window (one period of a raised cosine) does not have a positive transform. It can be written $(1+\cos(2 \pi t)) \operatorname{rect}(t)$. The constant and cosine terms have Dirac delta functions as their transforms, hence the transform of the Hann window function is a sum of translated sinc functions.

What is a good window function that satisfies this constraint?

• What about the sinc function as the window?
– zoli
Mar 27, 2015 at 19:13
• This is a good idea, but the problem is that the sinc function would not be a desirable window because of the $1/|x|$ envelope as well as the oscillation. Ideally I want the window to resemble the Hann window. Mar 27, 2015 at 20:57
• If a function of bounded domain then its F or L transform is not -- as far as I know. And vice verse...
– zoli
Mar 27, 2015 at 21:32
• That sounds right. However, I'm not putting any constraint on the support of the window or its transform. I just need both functions to be non-negative. Mar 27, 2015 at 21:57

You could experiment by taking an arbitrary real-valued (window) function $w(t)$ and define $x(t)$ by

$$x(t)=w(t)\star w(-t)=\int_{-\infty}^{\infty}w(\tau)w(\tau-t)\,d\tau\tag{1}$$

Obviously, $x(t)$ is real-valued and symmetric. Furthermore, if $W(\omega)$ is the Fourier transform of $w(t)$, then the Fourier transform of $x(t)$ is given by

$$X(\omega)=|W(\omega)|^2\ge 0\tag{2}$$

• Thanks, this is really useful! Mar 30, 2015 at 2:08

The triangle window is non-negative because since it can be obtained by the convolution of two rectangle functions that means its spectrum is the square of the sinc function. Someone pointed out to me that having a triangle of width $$1$$ and one of width $$\pi$$ added together makes the spectrum be always positive due to the troughs of the spectrum of each triangle not being aligned, but it hardly looks like a desirable window in either domain.

I too spend a lot of time thinking about that question but it seems clear that everything leads back to the Gaussian function as everything else suffers from undesirable ripples, even the windows made from triangles. And for practical applications where the Gaussian has to be shortened (like when windowing a finite impulse response) I use what I call a squared trimmed Gaussian. It involves taking a Gaussian, trimming its ends, subtracting the height of its ends then squaring it. It has a pretty desirable spectrum with ripples that have a height that depend only on the width factor $$w$$: $$f(x) = \frac{(e^{-(x/\sqrt2)^2} - e^{-w^2})^2}{(1-e^{-w^2})^2}$$ with $$|x/\sqrt2| \leq w$$

The higher $$w$$ is the closer to a Gaussian function $$f(x)$$ becomes while remaining infinite. This doesn't strictly answer your question but if a level of positive and negative ripples can be accepted then it's practical. For instance with $$w=2.4$$ the ripples are 79 dB below the DC peak, 140 dB at $$w=3.6$$, 303 dB at $$w=5.6$$, with $$w$$ being equivalent to its value in sigmas.