help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do YOU handle this disparity in fft?


From: Macy
Subject: Re: How do YOU handle this disparity in fft?
Date: Sun, 16 Feb 2014 08:44:27 -0800

Just as I wrote out the equation for the 'standard' hanning window what you 
said soaked in!

Yes, the hanning window is exactly symmetrical, but if you string a series of 
the built-ins along the waveform becomes NON-periodic! I think that's what the 
effect is.

Just like Cos(2*pi()*f*t) where 0<=t<=N-1 is NOT really symmetrical, but is 
periodic, so what you reccomend is that by slightly shifting the symmetrical 
waveform, it becomes periodic. Interesting.

Good point! thanks I'll try that new window on some waves and see what the 
differences are. Especially when sorting out those pesky AC mains intrusions.

Thanks again for reinforcing that it is not always prudent to accept on blind 
faith 'cookbook' solutions. One should ALWAYS examine.

Regarding calibration, yes, works for AC tones, but shift a bit of DC in there 
and you're off by that sqrt(2) term.

Do you know of any advantage of leaving in that 'error'?  after all, could be 
put in both the fft and the ifft. Oops, forgot, octave is a clone of MatLab and 
therefore MUST follow Matlab's conventions.


--- address@hidden wrote:

From: Brian Kaczynski <address@hidden>
To: Macy <address@hidden>
Cc: octave <address@hidden>
Subject: Re: How do YOU handle this disparity in fft?
Date: Sat, 15 Feb 2014 16:19:25 +0100

As an ADC designer, I recommend a slight modification to the Hanning
window.  It even works well for sigma-delta ADC sequences.

The standard Hanning window is:
w[n] = 0.5*(1-cos(2*pi*n/(N-1)));
where 0 <= n <= N-1

The problem is that this window is not periodic with a period of N so you
get smearing among the frequency bins.  I recommend this window:
w[n] = 0.5*(1-cos(2*pi*(n+0.5)/N));
where 0 <= n <= N-1

This window works much better when you have to resolve a deep null in the
noise spectrum of a signal (as with a sigma-delta ADC output).

I don't think it's possible to identify a single "best" FFT window for all
applications; rather, it's important to know about various windows and what
their weaknesses and strengths are to identify the best window for a given
application.

Generally I don't worry about the signal scaling after the window, since
I'm only interested in relative magnitudes.  It's a good idea to include a
signal of a known size in your time-domain vector so that you can use its
FFT magnitude to "calibrate" the rest of the FFT.

-Brian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]