Sign in

username:

password:



Not a member?

Search audiodsp



Search tips

Subscribe to audiodsp



audiodsp by Keywords

AAC | ADPCM | Convolution | DAFx | FFT | IIR | Mixer | MP3 | MPEG | MPEG-4


Discussion Groups

Discussion Groups | Audio Signal Processing | FFT Sample Data - Whats wrong with this ??

Technical discussions related to Audio Signal Processing (digital effects, acoustics, noise reduction, musical signal processing, etc).

  

Post a new Thread

FFT Sample Data - Whats wrong with this ?? - ShadowsEdge Admin - Feb 28 10:48:00 2005



Greetings,

Here is a sample of the kind of data I've been getting.  This kind of result is
common to all the FFT routines I have tried.  The fact that I have tried 3 different ones
and checked the code over and over again is a clear indication that there is something
wrong with the process itself.

Initial Data :-
Re: 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Im: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

Forward FFT (Rounded for display purposes only) :-
Re: 1, 0.383, -0.707, -0.924, -6.12E-17, 0.924, 0.707, -0.383, -1, -0.383, 0.707, 0.924,
6.12E-17, -0.924, -0.707, 0.383

Im: 0, -0.924, -0.707, 0.383, 1, 0.383, -0.707, -0.924, 0, 0.924, 0.707, -0.383, -1, -0.383,
0.707, 0.924
	Inverse FFT :-
Re: 0, 1.81E-17, 0, 1, 0, 7.51E-18, 0, 1.28E-17, 0, -1.81E-17, 0, 0, 0, -7.51E-18, 0, -1.28E-17

Im: 0, -1.28E-17, 0, 0, 0, 5.31E-18, 0, -5.31E-18, 0, 1.28E-17, 0, 0, 0, -5.31E-18, 0,
5.31E-18
	Note that the errors are several times bigger than maximum amplitude of the original signal
(and yes the proper scaling is done for the inverse FFT).
	


(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )

RE: FFT Sample Data - Whats wrong with this ?? - Sigmund Gudvangen - Feb 28 11:01:00 2005

Your errors are of the order of 10^(-17), so this is just round-off noise from doubleprecison
floating point arithmetic. Your FFT algorithms are working just fine. 

Regards.
	-----Original Message-----
From: ShadowsEdge Admin [mailto:shadowsedge@shad...]
Sent: Mon 2/28/2005 3:48 PM
To: audiodsp@audi...
Subject: [audiodsp] FFT Sample Data - Whats wrong with this ??
	Greetings,

Here is a sample of the kind of data I've been getting.  This kind of result is
common to all the FFT routines I have tried.  The fact that I have tried 3 different ones
and checked the code over and over again is a clear indication that there is something
wrong with the process itself. 

Initial Data :-
Re: 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Im: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

Forward FFT (Rounded for display purposes only) :-
Re: 1, 0.383, -0.707, -0.924, -6.12E-17, 0.924, 0.707, -0.383, -1, -0.383, 0.707, 0.924,
6.12E-17, -0.924, -0.707, 0.383

Im: 0, -0.924, -0.707, 0.383, 1, 0.383, -0.707, -0.924, 0, 0.924, 0.707, -0.383, -1, -0.383,
0.707, 0.924
	Inverse FFT :-
Re: 0, 1.81E-17, 0, 1, 0, 7.51E-18, 0, 1.28E-17, 0, -1.81E-17, 0, 0, 0, -7.51E-18, 0, -1.28E-17

Im: 0, -1.28E-17, 0, 0, 0, 5.31E-18, 0, -5.31E-18, 0, 1.28E-17, 0, 0, 0, -5.31E-18, 0,
5.31E-18
	Note that the errors are several times bigger than maximum amplitude of the original signal
(and yes the proper scaling is done for the inverse FFT).
	


(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )

RE: FFT Sample Data - Whats wrong with this ?? - ShadowsEdge Admin - Feb 28 11:09:00 2005

D'OH !!

It's funny how one misses the silliest things sometimes.
thanks for pointing that out :)

--- "Sigmund Gudvangen" <Sigmund.Gudvangen@Sigm...> wrote:

From: "Sigmund Gudvangen" <Sigmund.Gudvangen@Sigm...>
Date: Mon, 28 Feb 2005 16:01:56 +0100
To: <shadowsedge@shad...>, <audiodsp@audi...>
Subject: RE: [audiodsp] FFT Sample Data - Whats wrong with this ??

Your errors are of the order of 10^(-17), so this is just round-off noise from doubleprecison
floating point arithmetic. Your FFT algorithms are working just fine. 

Regards.
	-----Original Message-----
From: ShadowsEdge Admin [mailto:shadowsedge@shad...]
Sent: Mon 2/28/2005 3:48 PM
To: audiodsp@audi...
Subject: [audiodsp] FFT Sample Data - Whats wrong with this ??
	Greetings,

Here is a sample of the kind of data I've been getting.  This kind of result is
common to all the FFT routines I have tried.  The fact that I have tried 3 different ones
and checked the code over and over again is a clear indication that there is something
wrong with the process itself. 

Initial Data :-
Re: 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Im: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

Forward FFT (Rounded for display purposes only) :-
Re: 1, 0.383, -0.707, -0.924, -6.12E-17, 0.924, 0.707, -0.383, -1, -0.383, 0.707, 0.924,
6.12E-17, -0.924, -0.707, 0.383

Im: 0, -0.924, -0.707, 0.383, 1, 0.383, -0.707, -0.924, 0, 0.924, 0.707, -0.383, -1, -0.383,
0.707, 0.924
	Inverse FFT :-
Re: 0, 1.81E-17, 0, 1, 0, 7.51E-18, 0, 1.28E-17, 0, -1.81E-17, 0, 0, 0, -7.51E-18, 0, -1.28E-17

Im: 0, -1.28E-17, 0, 0, 0, 5.31E-18, 0, -5.31E-18, 0, 1.28E-17, 0, 0, 0, -5.31E-18, 0,
5.31E-18
	Note that the errors are several times bigger than maximum amplitude of the original signal
(and yes the proper scaling is done for the inverse FFT).
	_____________________________________________________________
Get free email that shows your true colors...
http://www.YellowSnow.com


(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )

Re: FFT Sample Data - Whats wrong with this ?? - Jeff Brower - Feb 28 11:48:00 2005

Shadow-

> Here is a sample of the kind of data I've been getting.  This kind of result is
> common to all the FFT routines I have tried.  The fact that I have tried 3 different ones
> and checked the code over and over again is a clear indication that there is something
> wrong with the process itself.

In the 200+ yr history of Fourier Transform, you checking the code over and over for
a few days means not a lot.

First question:  what is your answer -- using the data below -- if you calculate
magnitude?  That means for each point:

  mag = sqrt( sqr(Re) + Sqr(Im) )

Do you note anything about the magnitude data that matches with my previous post?

As for your inverse FFT data, your worst error is 0.0000000000000000181.  Is that
bad?

-Jeff

> Initial Data :-
> Re: 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
> Im: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
> 
> Forward FFT (Rounded for display purposes only) :-
> Re: 1, 0.383, -0.707, -0.924, -6.12E-17, 0.924, 0.707, -0.383, -1, -0.383, 0.707, 0.924,
6.12E-17, -0.924, -0.707, 0.383
> 
> Im: 0, -0.924, -0.707, 0.383, 1, 0.383, -0.707, -0.924, 0, 0.924, 0.707, -0.383, -1,
-0.383, 0.707, 0.924
> 
> Inverse FFT :-
> Re: 0, 1.81E-17, 0, 1, 0, 7.51E-18, 0, 1.28E-17, 0, -1.81E-17, 0, 0, 0, -7.51E-18, 0,
-1.28E-17
> 
> Im: 0, -1.28E-17, 0, 0, 0, 5.31E-18, 0, -5.31E-18, 0, 1.28E-17, 0, 0, 0, -5.31E-18, 0,
5.31E-18
> 
> Note that the errors are several times bigger than maximum amplitude of the original
signal (and yes the proper scaling is done for the inverse FFT).



(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )

RE: FFT Sample Data - Whats wrong with this ?? - Adam Lundqvist - Feb 28 12:13:00 2005

Hi,

comparing
0 to 1.81E-17 reveals that the difference is not really that large... to be
exact, it is almost 2*10^(-17) which is quite small... you would at least
not hear such amplitudes compared to the maximum being 1.

Adam
	> -----Original Message-----
> From: ShadowsEdge Admin [mailto:shadowsedge@shad...] 
> Sent: Monday, February 28, 2005 3:49 PM
> To: audiodsp@audi...
> Subject: [audiodsp] FFT Sample Data - Whats wrong with this ??
> 
> 
> 
> Greetings,
> 
> Here is a sample of the kind of data I've been getting.  This 
> kind of result is common to all the FFT routines I have 
> tried.  The fact that I have tried 3 different ones and 
> checked the code over and over again is a clear indication 
> that there is something wrong with the process itself.
> 
> Initial Data :-
> Re: 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
> Im: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
> 
> Forward FFT (Rounded for display purposes only) :-
> Re: 1, 0.383, -0.707, -0.924, -6.12E-17, 0.924, 0.707, 
> -0.383, -1, -0.383, 0.707, 0.924, 6.12E-17, -0.924, -0.707, 0.383
> 
> Im: 0, -0.924, -0.707, 0.383, 1, 0.383, -0.707, -0.924, 0, 
> 0.924, 0.707, -0.383, -1, -0.383, 0.707, 0.924
> 
> 
> Inverse FFT :-
> Re: 0, 1.81E-17, 0, 1, 0, 7.51E-18, 0, 1.28E-17, 0, 
> -1.81E-17, 0, 0, 0, -7.51E-18, 0, -1.28E-17
> 
> Im: 0, -1.28E-17, 0, 0, 0, 5.31E-18, 0, -5.31E-18, 0, 
> 1.28E-17, 0, 0, 0, -5.31E-18, 0, 5.31E-18
> 
> 
> Note that the errors are several times bigger than maximum 
> amplitude of the original signal (and yes the proper scaling 
> is done for the inverse FFT).
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
>
	


(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )

Re: FFT Sample Data - Whats wrong with this ?? - Tony Zampini - Feb 28 12:25:00 2005

The numbers you show below LOOK PERFECTLY CORRECT!

Keep in mind that numbers of the form: 1.81E-17 are NOT big numbers,
but rather very, very SMALL numbers. You can substitute 0 for all of
these numbers. ( 1.81E+17 is a big number, 1.81E-17 is essentially zero).

Tony

----- Original Message ----- 
From: "ShadowsEdge Admin" <shadowsedge@shad...>
To: <audiodsp@audi...>
Sent: Monday, February 28, 2005 9:48 AM
Subject: [audiodsp] FFT Sample Data - Whats wrong with this ??
	>
>
> Greetings,
>
> Here is a sample of the kind of data I've been getting.  This kind of
result is
> common to all the FFT routines I have tried.  The fact that I have tried 3
different ones
> and checked the code over and over again is a clear indication that there
is something
> wrong with the process itself.
>
> Initial Data :-
> Re: 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
> Im: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
>
> Forward FFT (Rounded for display purposes only) :-
> Re: 1, 0.383, -0.707, -0.924, -6.12E-17, 0.924, 0.707, -0.383, -1, -0.383,
0.707, 0.924, 6.12E-17, -0.924, -0.707, 0.383
>
> Im: 0, -0.924, -0.707, 0.383, 1, 0.383, -0.707, -0.924, 0, 0.924,
0.707, -0.383, -1, -0.383, 0.707, 0.924
>
>
> Inverse FFT :-
> Re: 0, 1.81E-17, 0, 1, 0, 7.51E-18, 0, 1.28E-17, 0, -1.81E-17, 0, 0,
0, -7.51E-18, 0, -1.28E-17
>
> Im: 0, -1.28E-17, 0, 0, 0, 5.31E-18, 0, -5.31E-18, 0, 1.28E-17, 0, 0,
0, -5.31E-18, 0, 5.31E-18
>
>
> Note that the errors are several times bigger than maximum amplitude of
the original signal (and yes the proper scaling is done for the inverse
FFT).
>
>
>
>
>
>
> 
>
>
>
>
>
>
>
>
	


(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )