help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] FFT - Frequency calculation


From: Fred Perras
Subject: Re: [Help-gsl] FFT - Frequency calculation
Date: Mon, 28 Jan 2013 10:47:00 -0500

The spectral width in the frequency domain is set by the dwell time
(splitting between the datapoint in the frequency domain).  The spectral
width is 1/DW and the high and low frequency ends of the spectrum are of
SW/2 and -SW/2.  I find it strange that all these FFT libraries always
order the frequencies in a strange way instead of linearly.  The frequency
array (intensities) starts at 0 with the index 0 and increases to SW/2 in
steps of SW/NP (where NP is the number of points).  Past the middle it then
starts at -SW/2 and decreases to the minimum negative value at the highest
index.

I home this helps.

Basically to plot out the frequencies (f) it goes:

f[NP/2]....f[0].f[NP]....f[NP/2+1]

I hope this helps.,

Fred

On Mon, Jan 28, 2013 at 10:16 AM, Philip Poloczek <address@hidden>wrote:

> Hello,
>
> Currently i'm trying to use the FFT functions of the GSL to filter
> measuring signals in frequency domain. The transformation works fine and i
> have the amplitude but how do i get the corresponding frequencies for the
> amplitudes?
>
> The excerpt of the GSL documentation how to calculate the frequencies
> confuses me a bit. Delta is the time-step in the time domain, right? For
> example 1/2s. So the amplitude of index 0 represents 0Hz sounds good to me.
> But how to calculate the other ones? Please take a look at my example how i
> think it works at the end of this email.
>
>    index    z               x = FFT(z)
>
>    0        z(t = 0)        x(f = 0)
>    1        z(t = 1)        x(f = 1/(N Delta))
>    2        z(t = 2)        x(f = 2/(N Delta))
>    .        ........        ..................
>    N/2      z(t = N/2)      x(f = +1/(2 Delta),
>                                    -1/(2 Delta))
>    .        ........        ..................
>    N-3      z(t = N-3)      x(f = -3/(N Delta))
>    N-2      z(t = N-2)      x(f = -2/(N Delta))
>    N-1      z(t = N-1)      x(f = -1/(N Delta))
>
>
>    Example:
>    N = 10 / Delta = 2
>    0        z(t = 0)        x(f = 0)               0Hz
>    1        z(t = 1)        x(f = 1/(10 * 2))     1/20Hz
>    2        z(t = 2)        x(f = 2/(10 * 2))     1/10Hz
>    3        z(t = 3)        x(f = 3/(10 * 2))     3/20Hz
>    4        z(t = 4)        x(f = 4/(10 * 2))     2/10Hz
>
>    5        z(t = 5)        x(f = 1/(2 * 2))      1/4Hz
>
>    6        z(t = 6)        x(f = -4/(10 * 2))   -2/10Hz
>    7        z(t = 7)        x(f = -3/(10 * 2))   -3/20Hz
>    8        z(t = 8)        x(f = -2/(10 * 2))   -1/10Hz
>    9        z(t = 9)        x(f = -1/(10 * 2))   -1/20Hz
>
> Tanks for your help,
> Philip
>
> --
> *Deutsches Zentrum für Luft- und Raumfahrt* e.V. (DLR)
> Institut für Aerodynamik und Strömungstechnik | Abteilung Raumfahrzeuge |
> Bunsenstr. 10 | 37073 Göttingen
>
> *Philip Poloczek* | Dualer Student (DHBW-Mannheim <
> http://www.dhbw-mannheim.de/>**)
> Telefon 0551 709-2391 | address@hidden <mailto:
> address@hidden>
> www.DLR.de <http://www.DLR.de>
>


reply via email to

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