Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Question FFT spectrum rebuild and result interpretation

DSP related issues, mathematics, processing and techniques

Question FFT spectrum rebuild and result interpretation

Postby chackl » Mon Jan 20, 2020 1:20 pm

Hello!

I did a research again on some FFT things i did in the past and grabbed some older examples. But i always had an little error at iFFT that gave me a wron signal back (Not that wrong that you just notice it fast)

So i just to ask if someone can confirm this:

If you do a FFT with let's say 512 points you will get a magnitude spectrum that is "symetric" - But it is not that symetric as i thought:

Magnitude:
Point 0 is kind of Frequency 0 and defines the amp off-set from the whole wave
Point 1 to 255 is the spectrum
Point 256 is the amp of Frequency 1 - But it has added the symetric part too - so the real value is its half.
Point 257 to 511 is the amp-spectrum reversed without Point 256 and 0

So the point count of the real magnitude is 257 (N/2+1)

Phase:
Point 0 is the phase of the sin-offset
Point 1 to 255 phase for each frequenzy
Point 256 is the phase for frequenzy 1 - But it seems to have no symetric here
Point 257 to 511 is the phase of ech frequenzy inverted and reversed.

Am i missing something again?
Thx, C.Hackl
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
User avatar
chackl
 
Posts: 233
Joined: Tue Aug 17, 2010 8:46 pm
Location: Austria / Salzburg

Re: Question FFT spectrum rebuild and result interpretation

Postby martinvicanek » Tue Jan 21, 2020 9:01 pm

Think of the array as circular, with both ends joined seamlessly.
One way to visualize the symmetry of the Fourier transform is this:
Code: Select all
    ----------------------------------->
    X[1],   X[2],   ...   X[254], X[255],
X[0],                                   X[256],
    X[511], X[510], ...   X[258], X[257],
    <-----------------------------------

The first element, X[0], denotes the DC offset. Then the upper row X[1] through X[255] represent bins with increasing frequrncy up to X[256], wich is the Nyquist frequency. Then the array folds back going from X[257] to the last element X{511]. The next element would be X[0], which closes the loop.

Arranged in this way, for a Fourier transform of a real input array the magnitudes of two elements on top of each other (for instance X[2] and X[510]) are equal, whereas their phases are equal in magnitude but with opposite signs.

If you prefer to look at real and imaginary parts rather than magnitude and phase, then we can say: two elements on top of each other have the same real part and have opposite imaginary parts.
User avatar
martinvicanek
 
Posts: 1318
Joined: Sat Jun 22, 2013 8:28 pm

Re: Question FFT spectrum rebuild and result interpretation

Postby chackl » Wed Jan 22, 2020 12:05 am

Thank you!

Got it now and marked many example-schematics as "wrong" (as it just was the nyquist wrong)
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
User avatar
chackl
 
Posts: 233
Joined: Tue Aug 17, 2010 8:46 pm
Location: Austria / Salzburg

Re: Question FFT spectrum rebuild and result interpretation

Postby wlangfor@uoguelph.ca » Tue Jan 28, 2020 4:38 pm

FFT is exciting, I've wanted to delve into it but I've been busy trying to get filters and graphics elements working like commercial apps.

Nice idea with fft.
My youtube channel: DSPplug
My Websites: www.dspplug.com KVRaudio flowstone products
User avatar
wlangfor@uoguelph.ca
 
Posts: 912
Joined: Tue Apr 03, 2018 5:50 pm
Location: North Bay, Ontario, Canada


Return to DSP

Who is online

Users browsing this forum: No registered users and 6 guests