# Tag Info

13

Windowing is used because the DFT calculations operate on the infinite periodic extension of the input signal. Since many actual signals are either not periodic at all, or are sampled over an interval different from their actual period, this can produce false frequency components at the artificial 'edge' between repeated intervals, called leakage. By first ...

12

There have been several good answers to this question. However, I feel that one important point has not been made entirely clear. One part of the question was why we don't just multiply the FFT of a signal with the desired filter response. E.g., if we want to lowpass filter our signal, we could simply zero all frequency components higher than the desired cut-...

12

I think you are confusing two different operations. Windowing in the time domain is explained by @sam, so I won't repeat that. But windowing is not done to perform filtering. Filtering by multiplying the FFT of a signal by the filter frequency response is entirely reasonable in many situations, and is indeed done. The alternative for filtering is time-...

12

The FFT can only be performed over a limited chunk of data. The basic math is based on the assumption that the time domain signal is periodic, i.e. your chunk of data is repeated in time. That typically results in a major discontinuity at the edges of the chunk. Let's look at a quick example: FFT size = 1000 points, Sample Rate = 1000 Hz, Frequency ...

12

In reviewing fred harris Figures of Merit for various windows (Table 1 in this link) the Hamming is compared to the Hanning (Hann) at various values of $\alpha$ and from that it is clear that the Hanning would provide greater stopband rejection (The classic Hann is with $\alpha =2$ and from the table the side-lobe fall-off is -18 dB per octave). I provided ...

10

I'll use the shorthand window for "window function". With audio, any processing that creates something akin to pre-ringing or pre-echo will sound sloshy like a low bit-rate mp3. This happens when localized energy of a transient or an impulse is spread backwards in time, for example by modification of the spectral data in lapped transforms such as lapped ...

10

I presume you are correct in that the small difference in the original signal fft's is due to leakage. However, the huge difference in the windowed results arises because you simply do not have enough data. Your original signals only have data for one period of the sinusoid. When you window this, you are clamping the edges of your signal to zero, effectively ...

9

Aside from reduction of spectral leakage, there is a one major trade-off to be made when choosing a window function. Below you can see a figure with various parameters. Two of them are most important: Main Lobe Width Peak Side Lobe Level Width of the main lobe affects resolution of your analysis. I am sure you know that multiplication in time domain is ...

8

Windowing reduces spectral leakage. Say you start out with a $\sin(y) = \cos(\omega_0 t)$. The period is obviously $2 \pi/ \omega_0$. But if nobody told you that the period is $2 \pi/ \omega$ and you blindly choose the range $[0, 1.8 \pi/\omega_0]$ and take FFT of this truncated waveform, you will observe frequency components in other frequencies ...

8

If done correctly, the order should not matter. You apply windowing to remove the jumps at the end of the signal segment by fading the values there to zero. Zero-padding then continues with zeros. Irregardless if padded or not, the windowing should only be applied to the original signal segment. The wrong way would be to zero-pad and then apply windowing to ...

8

The cross pattern is typically a border effect, due to the periodicity induced by the standard implementation and hypotheses behind the Fast Fourier transform, when the image lacks periodicity from the right to the left, and the bottom to the top. In other words: if two opposite borders lacks continuity in values (when glued together), artifacts show. The ...

8

Is this meant to happen? Yes, that is absolutely a well known effect of using any window function. Taking a look through the Wikipedia article on window functions, we find that the rectangular window has the sharpest peak. This is quite simply due to the fact that the rectangular window acquires the most data, meaning that it can distinguish between ...

8

The concept of spectral leakage is not dependent on the context, and it's the same thing for the DTFT as it is for the DFT. It's probably helpful to remember that the DFT of a finite length sequence equals a sampled version of the DTFT of the same sequence: \begin{align}X(\omega)&=\sum_{n=0}^{N-1}x[n]e^{-jn\omega}\qquad\text{(DTFT)}\\ \tilde{X}[k]&... 8 Parseval's theorem will hold, but take into account that your signal in the time domain will no longer be x[n]. Namely, if you have that\sum_{n=0}^{N-1} \Big| x[n] \Big|^2 = \frac{1}{N} \sum_{k=0}^{N-1} \Big| X[k] \Big|^2$$then, if you window the signal x[n] with a window w[n], your signal will now be \hat{x}[n]=x[n]w[n], and the theorem will ... 7 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-... 7 Couple of things: With an FFT of 128 points your frequency resolution is 11.71 Hz, so you can't really directly look at 15 Hz. Your assertion that fftsin(2) corresponds to 15 Hz is wrong. By doing an FFT of 128 points over a 100 time domain samples, you basically append 28 zeros to the waveform. That changes the spectrum significantly. The window is a ... 7 Since the DFT is representable by multiplication with the Fourier matrix, your question is equivalent to asking what the eigenvectors of the Fourier matrix are. Actually, Wikipedia provides the answer (http://en.wikipedia.org/wiki/Discrete_Fourier_transform#Eigenvalues_and_eigenvectors). However, since the eigenvalues (1, -1, i, -i) are not simple, the ... 7 We always want to apply some kind of a window function in order to minimize the effect of leakage. This makes rectangular window (lack of any windowing) case never used, this is why: Any tapering function used is almost always decreasing to zero at boundaries. This is why we are losing some data. In order to retrieve that somehow you will usually do 50% of ... 7 Yes, it's possible to analyse sound the way ears do. For example, you could compute the DFT of a signal continuously using several Goertzel filters.$$ y_k[n] = e^{j2\pi k/N} y_k[n-1] + x[n] $$where k= 0,1,\ldots, N-1, so that y_0 is the DC or zero frequency term. Of course, this is an unstable filter, so some resetting or forgetting factor is ... 7 Why is each window/frame overlapping? Windowing is a means to stationarize signals. Inside a small enough window, you can expect that the properties of the signal chunk do not vary too fast. And you now can use tools well-suited to stationary signals, like Fourier-based techniques. You can imagine non-overlapping rectangular windows, each defining a frame.... 6 Windowing in the time domain is a convolution in the frequency domain. A window function will thus, in the frequency domain, convolve a single spectral frequency point with a spreading function. For very low frequencies, this window spreading function can spread an FFT frequency bin and its corresponding negative frequency bin right across DC so that the 2 ... 6 They do "distort" the signal, as you noted. Multiplying by a window function does not "retain" the spectrum of the original signal. Recall the multiplication property of the Fourier transform:$$ x(t) w(t) \Leftrightarrow X(\omega) * W(\omega) $$where the * denotes convolution. So, multiplying by a window function in the time domain yields convolution ... 6 If you don't use a non-rectangular window, then the FFT results will already be convolved with the transform of a default rectangular window (a periodic Sinc) before doing any frequency domain filtering. e.g. you will get two filters applied, one of which you probably don't want. By windowing in the time domain, before the FFT and frequency domain ... 6 zero-padding will not "improve resolution" in the sense that it would help you separate two peaks in the spectrum that are very close (too close) to each other. but zero-padding, as well as interpolation in the frequency domain, does improve resolution in the sense that it help you to more precisely estimate the location of an isolated peak in the spectrum. ... 6 Please refer to this paper on the optimum overlap percentage for the Blackman-Harris window, which is derived to be 66.1%. It has a lot of useful information on spectral analysis and windows. 6 More overlap means you end up with more windows (of a given length) per second of audio. More windows (of a given length) requires more FFTs which requires more MACs or FLOPs which generally requires more processing power. In return, more window overlap provides greater time locality of information (e.g. on average, random transient events are likely ... 6 just implement the Modified Bessel function. it's easy. i always like my window definitions centered about zero, since pretty much all of them are even symmetry. i'll do this in discrete-time, but it's essentially the same thing in continuous-time. Kaiser window:$$ w[n] \triangleq \begin{cases} \frac{1}{I_0(\beta)} I_0\left(\beta \sqrt{1 - \left(\frac{...

6

UPDATE: My previous response did not answer the OP's question. The following addresses the question directly: Bottom line: Prior to windowing in time, each sample in frequency is an IID Gaussian random variable since the Fourier Transform of an AWGN waveform in time results in an identically distributed waveform in frequency (Gaussian distributed and to be ...

5

This is a rather general answer : I would say that, although each window function has specific characteristics that make it more or less suitable for specific situations, in this context you're not going to see a huge difference in the STFT of a windowed speech signal. In particular, the two windows that you're comparing are quite similar, so I'd expect ...

Only top voted, non community-wiki answers of a minimum length are eligible