Why Use Log(1+Amplitude) in FFT?

Click For Summary

Discussion Overview

The discussion revolves around the use of the logarithmic transformation in the context of Fast Fourier Transform (FFT) analysis, specifically comparing the application of log(amplitude) versus log(1 + amplitude). Participants explore the implications of these transformations on the resulting plots and the underlying reasons for their use.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant questions the necessity of using log(1 + amplitude), suggesting that the primary reason may be to avoid taking the logarithm of zero.
  • Another participant expresses skepticism about the addition of 1, stating they typically use log(abs(fft)) without modification and suggesting that adding a small number like eps could be an alternative to handle zeros.
  • A participant inquires about the specific goals of the analysis, asking whether the focus is on identifying peaks or assessing total noise.
  • One participant notes that the symmetry observed in the Fourier transform is due to the input being real, implying that complex inputs would yield different results.

Areas of Agreement / Disagreement

Participants express differing views on the necessity and implications of adding 1 to the logarithm of amplitude. There is no consensus on the best approach, and the discussion remains unresolved regarding the optimal method for handling zeros in FFT analysis.

Contextual Notes

Some participants highlight the potential loss of information when using log(1 + amplitude) and the importance of understanding the specific goals of the analysis to determine the appropriate transformation.

McMurry
Messages
11
Reaction score
0
I have run the following command:

c = wavread('sample.wav');
amplitude = log (abs(fft(c)));

and obtained the following plot:

[PLAIN]http://img179.imageshack.us/img179/8733/withoutplusone.jpg

however, i was told to use this instead:

amplitude = log (1+abs(fft(c)));
and obtained the following plot:

[PLAIN]http://img146.imageshack.us/img146/4594/withplusone.jpg

my question is: why do we have to take the log 1 plus amplitude, instead of just the log of amplitude.

thanks.
 
Last edited by a moderator:
Physics news on Phys.org
TheLoser said:
there are 0s :roleeyes:

do you mean that the reason is because we can't log (0)?

is that the only reason we are adding 1 to the log?
thanks.
 
I don't know why you would add 1. I never add 1, and plot log(abs(fft)) all the time (usually I do log10 because I want to get to decibels). If you are worried about zeros, you can always add eps or some other small number. By looking at your plot it is clear the adding 1 is covering up information you may care about. You should ask the person who suggested it to you.

jason
 
May I ask what you are trying to learn from the data? It would help us to answer your question. Looking for peaks in the spectrum? Total noise?
 
hi guys, thanks for the reply.

the purpose is to observe the symmetry property of Fourier transform and also to explain the spikes that is occurring.
 
It's symmetrical because the inputs are real. If the sample.wav contained complex numbers, the output would not (necessarily) be symmetrical.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
5
Views
8K