help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] FFT - Frequency calculation


From: Philip Poloczek
Subject: [Help-gsl] FFT - Frequency calculation
Date: Mon, 28 Jan 2013 16:16:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

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]