DSPRelated.com
Forums

how to do FFT on a series of data

Started by Luna Moon February 17, 2010
Hi all,

My understanding is that FFT needs to operate on a window.

If I want to look at the spectrum of a series data,

I guess I have to do a rolling-window, let's say N=256,

The first window is from 1 to 256, and the second window is from 2 to
257, the third window is from 3 to 258, etc.

For each window, I will have 256 numbers as the FFT outputs,

What's the best way to present these 256 numbers for each window?

How to visualize them?

What's the best organization method to organize these spectra at each
rolling time point?

Thanks a lot!

On Feb 18, 2:08&#4294967295;pm, Luna Moon <lunamoonm...@gmail.com> wrote:
> Hi all, > > My understanding is that FFT needs to operate on a window. > > If I want to look at the spectrum of a series data, > > I guess I have to do a rolling-window, let's say N=256, > > The first window is from 1 to 256, and the second window is from 2 to > 257, the third window is from 3 to 258, etc. > > For each window, I will have 256 numbers as the FFT outputs, > > What's the best way to present these 256 numbers for each window? > > How to visualize them? > > What's the best organization method to organize these spectra at each > rolling time point? > > Thanks a lot!
contourf is one option
On 18 Feb, 02:08, Luna Moon <lunamoonm...@gmail.com> wrote:
> Hi all, > > My understanding is that FFT needs to operate on a window. > > If I want to look at the spectrum of a series data,
...
> What's the best way to present these 256 numbers for each window? > > How to visualize them?
The spectrogram is the obvious first stop, on this one. Matlab has a number of past and present versions in the Signal Processing Toolbox, but it's not too hard to roll your own. The basic idea goes something like %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % x xolumn vector N = length (x); M = 256; K = N/M; s = zeros(M,K); for k = 1:K s[:,k] = fft(x((k-1)*K:k*K)); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% which can be refined in various ways, like adding overlap between subsequent signal frames, using window scale functions, or selecting the frequency bands of interest in case of large amounts of data. Visualize along the lines of imagesc(20*log10(abs(s))) imagesc(abs(s)) Rune
On Wed, 17 Feb 2010 17:08:47 -0800 (PST), Luna Moon <lunamoonmoon@gmail.com>
wrote:

>My understanding is that FFT needs to operate on a window. > >If I want to look at the spectrum of a series data, > >I guess I have to do a rolling-window, let's say N=256, > >The first window is from 1 to 256, and the second window is from 2 to >257, the third window is from 3 to 258, etc.
"Sliding FFT". http://groups.google.com/group/comp.dsp/msg/06800ec6bc25deb8?hl=en Greg
On Feb 18, 2:02&#4294967295;am, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 18 Feb, 02:08, Luna Moon <lunamoonm...@gmail.com> wrote: > > > Hi all, > > > My understanding is that FFT needs to operate on a window. > > > If I want to look at the spectrum of a series data, > ... > > What's the best way to present these 256 numbers for each window? > > > How to visualize them? > > The spectrogram is the obvious first stop, on this one. > Matlab has a number of past and present versions in the > Signal Processing Toolbox, but it's not too hard to roll > your own. The basic idea goes something like > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % x xolumn vector > N = length (x); > M = 256; > > K = N/M; > s = zeros(M,K); > > for k = 1:K > &#4294967295; &#4294967295;s[:,k] = fft(x((k-1)*K:k*K)); > end > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > which can be refined in various ways, like adding > overlap between subsequent signal frames, using > window scale functions, or selecting the frequency > bands of interest in case of large amounts of data. > > Visualize along the lines of > > imagesc(20*log10(abs(s))) > imagesc(abs(s)) > > Rune
Thanks! If I could find a toolbox with a nice GUI to do all these for me, that would be great!