Page 1 of 1
Posted: 05 Apr 2011, 12:17
by Ken29
Hi guys,
I have several questions about the FFT in Usine.
Is there any window used before for the conversion (rectangular, Hanning...)
And most of all, I don't understand why there is a Imaginary part after the conversion ?
I thought, in a 1024 line FFT, 513 where kept as shown below. But in that case there's just an amplitude for each lines and no imaginary part ?
Thanks for your help
Kenan
Posted: 05 Apr 2011, 14:56
by caco
If I remember correctly the Usine FFT module uses a Hann window.
I am not a French speaker so I do not understand the image you posted. However, it is correct that a FFT splits a signal into complex numbers each consisting of a pair of real and imaginary numbers. Normally for a FFT on a block of 1024 audio samples you would therefore expect a FFT routine to return 512 values for real and 512 for imaginary numbers, e.g half your original block size for each. These can then be converted into actual phase/amplitude data or later converted back into an audio signal via iFFT.
Posted: 05 Apr 2011, 15:38
by multiphone
Hello,
Yes Caco , The FFT gives in frequency domain a result of complex numbers of form:
n = x + j * i
One for the real part (x) and the other the imaginary (j * i).
If you want only the amplitudes you can use the module "Cart2Pol" (real / imaginary -> magnitude / phase).
Posted: 05 Apr 2011, 16:07
by Ken29
Hi guys,
according to the schema above, is the real part for 0 to f and the imaginary part for -f to 0 ?
Kenan
Posted: 05 Apr 2011, 17:12
by multiphone
Hello Kenan,
The representation of a spectrum is by convention with positive frequencies, but by calculation it consists of the same frequencies in the negative domain. It is symmetrical. That is something that is related to the "sampling rate theorem" . If the sampling frequency is 44100 Hz, so the signal spectrum is theoretically - 22050 Hz to 22050 Hz.
Best
Posted: 06 Apr 2011, 00:35
by Ken29
Ok,
But I still don't understand why there's an Imaginary part ( or Phase)> On the schema above which is the result of a FFT, there is just the frequencies on the first axis and the amplitude on the second. What does the phase represent ?
Kenan
Posted: 06 Apr 2011, 08:48
by caco
Fourier's theorem states that any waveform in the time domain can be represented by the weighted sum of sines and cosines. The difference between a sine and a cosine is purely phase shift. So perhaps you can consider the amplitude to be the strength of each frequency bin and the phase to be its relative position, e.g sine or cosine or somewhere inbetween.
Posted: 06 Apr 2011, 12:11
by Ken29
Thanks,
It's a bit more clear.
I also found this in French, it is very interesting.
http://www.unilim.fr/pages_perso/jean.d ... er/fft.htm
If I understood correctly, It says in the particular case of an audio signal, The Real Part and Imaginary are redundant, in that case, you can use only the real part.
In that case, after a conversion to (magn/phase), shouldn't the phase be a constant ?
Sorry for all this questions but school and math are far far away now. But I feel there's a lot of good sound torturing to do with the FFT.
Thanks
Kenan
Posted: 06 Apr 2011, 19:41
by capitan mission
caco wrote:Fourier's theorem states that any waveform in the time domain can be represented by the weighted sum of sines and cosines. The difference between a sine and a cosine is purely phase shift. So perhaps you can consider the amplitude to be the strength of each frequency bin and the phase to be its relative position, e.g sine or cosine or somewhere inbetween.
Exactly.
"Nyquist Theorem
The number 44100 was chosen for a good reason. As previously mentioned, humans can hear up to 20000 Hertz at most. In 1928, US physicist Harry Nyquist (1889-1976) proposed a theory stating that a frequency of at least twice the signal frequency was necessary to accurately represent a sound signal digitally ("Nyquist-Shannon sampling theorem"). Concretely, this means that one needs the maximum and minimum values for each period to accurately represent a waveform's basic shape, i.e., two points per period
For a wave with 20000 Hz, which equals 20000 periods per second, we need at least 40000 points per second to accurately represent it. To ensure that the entire spectrum of sounds audible to humans was included, a sample rate of 44100 was chosen for audio CDs. This means that waves of up to 22050 Hz could be captured"
I asume that sine a cosine are the maximum and minimum values of each period.