# commons-user mailing list archives

##### Site index · List index
Message view
Top
From Aeris <ae...@imirhil.fr>
Subject [math] Fundamental frequency of fft
Date Sun, 10 Jul 2011 13:20:50 GMT
```-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello World !

I have a question about FastFourierTransformer.
I'm unable to retrieve fundamental frequency of the fft.

Mathematically, it could be 2π / samble size, but this formula doesn't
seems working.

I apply FFT to a 1Hz sinus, sampled at 20Hz during 1 minute.
So sample size is 1.200, zero-padded to 2.048 (upper 2-pow), and
fundamental could be 3mHz (2π / 2.048).

Theorical FFT of this sinus must be 2 peaks, at f = -1Hz and f = 1Hz.
But obtained FFT presents 2 peaks, at n ~ 100 and n ~ 1950, so f =
(100-1024) × 3mHz ~ -5,66Hz and f = (1950-1024) × 3mHz ~ 5,66Hz.
Seems the mathematical theory doesn't apply here…

Stranger, FFT on 0.1Hz sinus presents 2 peaks at n ~ 10 and n ~ 2030,
A signal at a lower frequency leads to an FFT at a higher spectrum…

So, am I wrong somewhere ?
And how I can calculate the fundamental frequency from
FastFourierTransformer.transform(double[]) ?

- --
Aeris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOGacsAAoJEK8zQvxDY4P9bG8H/37IQNk3JSfJuC0rANI/u+z4
mj77jgtLnGEnG0ys5oNFu3KcGgguipUB7hpgHTvbN45owJjqqmSBC87O8XxAZQ+M
x+7wsW0kkvcgTncN5nLdd0Uukjrhfuf1q5yN82MWNQqs7LI5+Rzzs1eU1tmGU8hW
Tjj5ExAIb0wWUQoelRPMiFXQTAXtVyr69mDRlD9qPtlir9zDYQEhgF51OuyU1TaO
8yD3CThekQ8agk0jqlgMhX4Wgw9lSG3X0bMi8POYCLdC583SaUFmxZg+XqSwc8K1
dVypVHtzRDfHIKwVHOW0BzsI7V11qPMejdJx3Lhd0kDabftpoP2DIKbpc7IXOa0=
=ge5K
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org