Questions tagged [window-functions]

In signal processing, a window function is a mathematical function that is zero-valued outside of some chosen interval.

Filter by
Sorted by
Tagged with
28
votes
3answers
16k views

What should be considered when selecting a windowing function when smoothing a time series?

If one wants to smooth a time series using a window function such as Hanning, Hamming, Blackman etc., what are the considerations for favouring any one window over another?
18
votes
3answers
5k views

FFT with asymmetric windowing?

Common non-rectangular window functions all seem to be symmetric. Is there ever a case when one would want to use a non-symmetric window function before an FFT? (Say if the data on one side of the ...
16
votes
9answers
24k views

Why do we use window in time domain rather than do FFT modify the spectrum and than inverse FFT

I thought that DSP would be done by using FFT of portions of a signal, modify the samples that result from FFT (since they represent the spectrum of our signal + noise) and remove any unwanted signals ...
11
votes
3answers
2k views

Is the discrete Gaussian kernel an eigenfunction of the DFT?

So the Gaussian function is an eigenfunction of the Fourier transform because it transforms into itself, right? But this isn't true for the sampled Gaussian in the DFT because the tails of the ...
11
votes
2answers
5k views

Why would one use a Hann or Bartlett window?

Suppose we're designing a low-pass FIR filter, and I want to use one of these three windows: Bartlett, Hann or Hamming. From Oppenheim & Schafer's Discrete-Time Signal Processing, 2nd Ed, p. 471:} ...
11
votes
3answers
12k views

Is it customary to correct for the gain of a window?

Consider how the Hanning window is defined: 0.5 - 0.5 * cos(n*2*Pi/(N-1)) By this definition, it has a gain of 0.5, which is simply the average value of the ...
10
votes
2answers
24k views

How do I apply a function window to a signal?

How can I apply a window function like Hamming or Lanczos to a signal, using its coefficients? I mean, which method can I use to do this? FFT? Convolution? Which method has the better performance?
10
votes
3answers
1k views

A few questions about Slepian and generalized gaussian windows

I'm trying to add documentation for all the window functions in scipy.signal, and I'm stuck on the Slepian (same as DPSS?) and Generalized Gaussian windows, which I'd never heard of before. There are ...
9
votes
3answers
5k views

What is a good FFT window function to reject DC?

I'm using an FFT to analyze what is essentially the power envelope of a signal (see here for info on the containing project), and, since power numbers are always positive, to eliminate the DC ...
9
votes
2answers
2k views

Fourier transform artifacts

My starting point in what follows is a radially symmetric random field. Taking the Fourier transform of this (and plotting it in logarithm to highlight the patterns), I obtain the following image in ...
8
votes
2answers
4k views

Effect of windowing on noise

I understand that truncating a signal in time 'smears' the frequency response depending on the window chosen. In general, the shorter the signal duration, the more 'flattened' the frequency response, ...
8
votes
2answers
1k views

Why are there so many windowing functions?

Many windowing functions are listed here in the Mathematica documentation. I tried using a few to reduce leakage when computing a Discrete Fourier Transform. From what I could tell it made little ...
7
votes
2answers
1k views

Is spectral leakage due to windowing 'different' for the DTFT and DFT?

I'm currently trying to improve my foundational understanding of spectral leakage due to windowing. The more I have been reading about it, the more I'm starting to think that 'windowing spectral ...
7
votes
2answers
6k views

Extracting accurate phase and amplitude information from FFT with an arbitrary number of samples

This is a followup question to one I asked earlier based on the chat after the answer given by @hotpaw2, and cross-posted from stackoverflow since it was suggested it is more relevant to DSP. I have a ...
6
votes
5answers
2k views

Does windowing affect Parseval's theorem?

I have computed Fourier transform from ecg data.It does obey Parseval's theorem, relation $$\sum_{n=0}^{N-1} \Big| x[n] \Big|^2 = \frac{1}{N} \sum_{k=0}^{N-1} \Big| X[k] \Big|^2$$ is fulfiled. ...
6
votes
1answer
12k views

STFT: why overlapping the window?

For STFT, we impose window of certain size onto the original signal, then we perform fft on each window. The uncertanty about frequency and time is determined by the width of the window, however, I ...
6
votes
3answers
9k views

RMS calculation in frequency domain after windowing

I can calculate RMS in frequency domain as derived from Parseval's Theorem. But what if I have applied a windowing function before doing the FFT (in my case a Hann window)?. Now the RMS values are ...
6
votes
1answer
5k views

How to compute the main lobe width of generalized Hamming windows (i.e. Hann, Hamming, etc.)?

Is there a way to compute the main lobe width of windows of the generalized Hamming window family (i.e. Hann, Hamming, etc.)? By main lobe I mean the first zeros left and right of the center of the ...
5
votes
3answers
8k views

Effect of windowing on FFT magnitude

I have 2 sin waves: Fs = 1500; N = 100; t = (0:N-1)'/Fs; sinwave = sin(2*pi*15*t); sinwaveshifted = sin(2*pi*15*t + 1.3); If I get the magnitude at 15Hz using ...
5
votes
3answers
4k views

I need advice about how to make an audio frequency analyzer

I just need some clarification of some very basic aspects of creating a frequency analyzer. I am writing a c++ program, so far it is just a media player, with a custom explorer. You can make ...
5
votes
1answer
23k views

Why should one use windowing functions for FFT?

So I just revised my pitch calculation algorithm using a harmonic product spectrum algorithm. I was just curious about why this explanation of Harmonic Product Spectrum states that you need to ...
5
votes
2answers
12k views

python scipy fft on numpy hanning window smears peaks

I have a signal that I have acquired from an experimental instrument, that I wish to examine in the frequency domain. I don't care about phase for this exercise, I only care about magnitude. I ...
5
votes
1answer
3k views

What is the relation of the transition band's width and the filter order for the FIR windowing method

When designing an FIR filter using the windowing method, how can one estimate the filter order ? It's obvious that the type of window and the transitions band's width has some effect on the order.
5
votes
1answer
602 views

Spectrum Analysis using Windowed FFTs

I have a couple of questions regarding windowed FFTs: Why is the noise floor higher with windowed FFTs (according to Wikipedia's spectral leakage page, anyway), when the whole point of windowing is ...
5
votes
3answers
171 views

Window functions with rippleless spectra

On Wikipedia I found the Hann-Poisson window, and the article claims the spectrum is smooth, but it isn't theoretically smooth, as it turns out. In practice you achieve partial smoothness by jacking ...
4
votes
3answers
6k views

Zero-pad before or after windowing for FFT

What's the correct way. Should I zero-pad a signal before or after applying a windowing function?
4
votes
4answers
13k views

Choosing the right overlap for a window function

On Wikipedia there is quite a list of window functions. However, when you are doing a lot of STFTs, you often have to have some overlap to get better results. Generally an overlap factor of 2 (i.e., ...
4
votes
1answer
18k views

How should I select window size and overlap?

I'm new to DSP and I have a wav file with a number of different frequencies playing at different volumes. I'd like to plot the power of the 350Hz frequency signal at each point in time. The source is ...
4
votes
2answers
2k views

Whats the optimal window function to use for analyzing real-time data samples?

Say you wanted to run a X point FFT on the last X audio samples that were played. The problem being, using a normal hann window function would place emphasis on the "middle" of the audio sample. ...
4
votes
1answer
123 views

Is the DCT prone to spectral leakage like the DFT?

My understanding is that the DCT assumes the input to be an even periodic signal. This avoids the discontinuity that can occur in the periodic extension assumed by the DFT (see image). Does this lack ...
4
votes
1answer
952 views

Optimal window function for amplitude estimation?

Assume you want to estimate the amplitude of a known frequency sinusoid in additive Gaussian (white or pink) noise. Also assume mainlobe width/sidelobe decay doesn't matter. Windows should be ...
4
votes
1answer
104 views

Amplitude Estimating Using a Windowed DFT

Let's say we want to estimate the amplitude A of a mono-frequent signal using a windowed DFT. The frequency of the signal is unknown, and the frequency resolution of the DFT is limited, thus it cannot ...
4
votes
1answer
2k views

Inverse the Hanning Window [closed]

I am using the following formula to calculate the Hann values for a set of points: $$ w(n)=0.5\left(1-\cos\left(2\pi \frac nN\right)\right) $$ To implement this in java, I am using the following code:...
4
votes
1answer
2k views

FFT averaging with different block sizes - how to scale the amplitudes

I need to analyze a real-valued time signal with a length of 300000 in the frequency domain. The sampling frequency is 100000Hz. In order to increase the signal-to-noise ratio reduce the "fine-grain" ...
4
votes
1answer
2k views

Matching masked images

Let's say I have two images that are parts of the same bigger image, cut using two masks (for simplicity, let's assume that the masks are just rectangles of the same size). The images are presumed to ...
4
votes
1answer
191 views

Overlapping power-of-cosine windows with constant weight

I would like to refer you to a relevant question I posed on the Math StackExchange: A generalisation of the Pythagorean trigonometric identity. As can be seen from the question and the answer, what ...
4
votes
2answers
4k views

Effect of Hanning Window on phase of FFT

I'm calculating the beat of song through the frequency domain. I have 60 seconds of audio sampled at 48000Hz, multiplied by a Hanning window in the time domain. This gives me a resolution in the ...
3
votes
2answers
8k views

Why is each window/frame overlapping?

I am currently reading up on some speech recognition theory. As it speech signals usually are non stationary, but if a speech is seen in a very small time frame can it be deemed stationary, as would ...
3
votes
1answer
90 views

How to do continuous signal processing (i.e without windowing)?

I'm working in speech recognition research, and I wonder if there is a way to analyse sound just like how ears do (i.e. without windowing), so for example to take some feature continuously with an ...
3
votes
2answers
190 views

Zero padding - High amplitude

I have a set of 512 samples that I have collected with a sensor. I'd like to apply zero padding to it, for better frequency bin resolution. However, all the tutorials I see to make this occur center ...
3
votes
1answer
104 views

What is the difference of windowing functions for FIR filtering?

What is the difference of window types such as Hann, Rectangular, Hamming in the application. Is there such a thing that the one is better than the other? There will be an oral exam for DSP course ...
3
votes
1answer
1k views

Why is the Hamming and Hanning window the most widely used for speech spectograms?

When taking the Short-Time Fourier Transform of the speech signal, windowing is applied to taper away the signal frame at both ends and mitigate introduced artifact at expense of the maximum ...
3
votes
1answer
5k views

What is the difference between Filters and Windowing?

I'm finding some difficulties to understand the difference between Filters, and Windowing. accoriding to my understanding both filters and window functions will make changes to the input signal ...
3
votes
2answers
156 views

FFT result of windowed cosine function

The frequency spectrum of cosine function is as below. While adopting a square window function to the cosine function, it is same as implementing convolution of their frequency spectrum as below. The ...
3
votes
1answer
196 views

The higher the sidelobes of a signal frequency spectrum, the greater the “cross-talk” between transmission channels

Why is that 'The higher the sidelobes, the greater the "cross-talk" between channels' when transmitting signals via hardware electronics? where, Cross-talk: a signal transmitted on one circuit or ...
3
votes
2answers
1k views

At which point in the signal processing chain to use Hann Window?

I have a question about signal processing. Experienced with embedded design and code, but DSP is in new territory. Thus far I am using the CMSIS DSP library functions, which are working well. I am ...
3
votes
2answers
1k views

Working around FFT windowing?

I have the following problem, that I ran into recently, when calculating the spectra of data that I obtain from a measurement technique, we are using in our group. In short what we do in the ...
3
votes
1answer
323 views

What windowed Sinc might be closest to a Parks–McClellan low-pass filter?

In another question on dsp.stackexchange, a statement was made that the output of MATLAB firpm() or firls() for an anti-alias low-pass filter was "close" to the coefficients of a windowed-Sinc low-...
3
votes
3answers
1k views

A question about spectral leakage

I have read about spectral leakages in other posts here. From what i understand, it occurs because you dont have an integer number of time periods in your sampled data. By default a rectangular window ...
3
votes
1answer
1k views

What is the physics behind the width of a main lobe?

We know that the square window gives the lowest main lobe width possible, and that other windows after that trade main lobe width for side lobe height. I also understand that the main lobe width is ...

1
2 3 4 5 6