Skip to main content
1-Visitor
August 26, 2012
Question

FFT amplitude resolution and log scale plotting problems

  • August 26, 2012
  • 2 replies
  • 11657 views

Hello,

I used the FFT in Mathcad and compared the results to other programs like Igor and Matlab.

In the attached example, I performed the FFT on a sinewave and got the expected peak at my sinewave frequency. This is great, but the the other points close to the fundamental seem quite high in amplitude. I also notice this in other Mathcad FFT plots/examples I see on line. In the other programs I mentioned, the points close to the fundamental have very low magnitude as they should. I think I am doing something wrong and appreciate some comments.

The last plot in my example shows and attempt to plot the FFT with a vertical log scale.As you can see, I get a horizontal line at 1 and the bar graph bars are referenced to that. I would like to get the bar graph lines stating at the "noise floor" of my meaurement and end on the spectral magnitude. Can anyone suggest a way to get the FFT to display the way I would like it to?

Thank you

2 replies

23-Emerald I
August 27, 2012

I've subtracted the minimum value (so the graph should start at zero, and plotted a line insted of bars. Any help?

1-Visitor
August 27, 2012

Hi Fred,

Thank you for your help.

I modified your plot to display bars and got the same result as before; a horizontal line at 1 which serves as the origin for all bars.

You can see this in the images below.

John

Capture.PNG

1-Visitor
August 27, 2012

Related to the other problem I am haiving with FFT spurs, I verified that my sinewave has amplitude of 0 at time 0 and time 2047.

19-Tanzanite
August 30, 2012

That is not a perfect sine wave, because what you have is not exactly one period. The first point is duplicated at the end, and it should not be. You can easily see this from two things:

1) The FFT does not produce a purely imaginary result, which it should do

2) When you stack the "periods" you end up with pairs of zeros where they join.

Computer roundoff is certainly something to watch for, but when you get "roundoff errors" as big as the errors you are seeing, they are not roundoff errors. It could only be a bug in the FFT or an error in the worksheet.