FFT accuracy and 'Noise Floor'

Hi all,

I have a question regarding the accuracy of FFT (I think). I'm trying to reconstruct a function with an exponential tail (hence the function amplitude changes some 25 orders of magnitude). I have the code below to illustrate what I try. For each of the trials I have a similar noise floor of 1e-15, no matter the sampling rate (see figure). I believe the accuracy is gets killed by the fact that the regions with very low amplitude has to be constructed by subtracting harmonics with a relatively higher amplitude (e.g. ~1e-3 - ~1e-3 =~1e-15). I know it is pretty hopeless, but I'd be glad if anyone has any suggestions to help me lower the noise floor.

Cem

a=0:0.001:0.999;
funct=sin(2*pi*a(1:500));
funct=[funct,funct(end)*exp(-1*(1:500)/10)];
semilogy(a,funct)
hold all
semilogy(a,ifft(fft(funct)))

 Respuesta aceptada

Daniel kiracofe
Daniel kiracofe el 15 de Jul. de 2014

0 votos

Standard double precision floating point arithmetic is good to about 16 significant digits. So trying to do what you are doing to an accuracy of more than approximately 1e-15 is plain and simply impossible.
to illustrate, try funct=single(sin(2*pi*a(1:500))); this will convert your number to a single precision floating point, which is accurate to about 7 significant digits. You should find that your code is good only to about 1e-6.
the only way you can succeed is to use something with more precision than a double . I don't know of a way to do it natively in matlab. A google search turned this up: http://www.advanpix.com/ might be a good place to start. Or you might need to try something like a computer algebra system (e.g. Maple) that has native support for arbitrary precision arithmetic.

Más respuestas (0)

Categorías

Más información sobre Fourier Analysis and Filtering en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

Cem
el 14 de Jul. de 2014

Respondida:

el 15 de Jul. de 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by