ifft limitations

2 views (last 30 days)
Paul Tune
Paul Tune on 5 Feb 2012
Hi all,
I'm stumped by the following:
z = poisspdf(30:60,1); % generates Poisson signal
fz = fft(z);
zf = ifft(fz);
but both z and zf are not the same. However, it seems fine for the following:
a = [1 2 3 4 5]*1e-100; % generate signal with small energy
fa = fft(a);
af = ifft(fa);
Is there some kind of aliasing effect going on, or am I missing something? It seems to not work on fast decaying signals.

Accepted Answer

Dr. Seis
Dr. Seis on 5 Feb 2012
It looks like the results are very close to being the same between column 1 and column 10:
>>[z;zf]
ans =
Columns 1 through 5
1.3869e-33 4.4739e-35 1.3981e-36 4.2366e-38 1.2461e-39
1.3869e-33 4.4739e-35 1.3981e-36 4.2366e-38 1.2461e-39
Columns 6 through 10
3.5602e-41 9.8894e-43 2.6728e-44 7.0337e-46 1.8035e-47
3.5602e-41 9.8894e-43 2.6728e-44 7.0339e-46 1.8056e-47
Columns 11 through 15
4.5088e-49 1.0997e-50 2.6183e-52 6.0892e-54 1.3839e-55
4.1885e-49 -2.3624e-50 -1.1036e-50 -2.1899e-50 -2.3753e-50
Columns 16 through 20
3.0753e-57 6.6855e-59 1.4225e-60 2.9634e-62 6.0478e-64
-2.0649e-50 -2.2115e-50 -2.5909e-50 -2.2244e-50 -1.1036e-50
Columns 21 through 25
1.2096e-65 2.3717e-67 4.561e-69 8.6056e-71 1.5936e-72
-3.1556e-50 -3.259e-50 2.108e-50 1.8364e-50 -3.9725e-50
Columns 26 through 30
2.8975e-74 5.1741e-76 9.0774e-78 1.5651e-79 2.6527e-81
-1.3752e-50 -1.0454e-50 -3.9014e-50 -1.3827e-50 -1.0139e-49
Column 31
4.4211e-83
7.1734e-50
If you look at difference in amplitude between column 1 and column 10 you will notice it is 14 orders of magnitude. It looks like the problem comes down to machine precision... if you have amplitudes that differ more than 14 orders of magnitude (~double precision) then you will start to see artifacts introduced.
  2 Comments
Paul Tune
Paul Tune on 5 Feb 2012
Ok, so I suppose there is no way around it? I ask this because I have to convolve several signals related to the Poisson mass function, but it seems to me fftfilt doesn't perform as well as conv, most likely due to this limitation. Is there a way around this?
Dr. Seis
Dr. Seis on 5 Feb 2012
I can't think of anything off hand.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!