understanding fft output: two different results when working with sampling frequencies well above the highest frequency component

4 views (last 30 days)
Hello,
I'm trying to analyse the frequency components of a signal using fft. My signal is just a vector with 11 points (Y0.txt) in a time domain (X0.txt). I interpolate these data to get evenly spaced points. Then I implement fft using the matlab example (fft_obs.m).
When I choose a sampling time of 2*10^(-5), and hence a sampling frequency of 5*10^4, I obtain the frequency spectrum of fig1 with one relevant frequency component. Nevertheless, if I choose a smaller sampling time, 2*10^(-7), which means a bigger sampling frequency, I get not one, but two relevant frequency components (fig2).
In both cases I think I'm working well above the highest frequency component, and so, in both cases avoiding aliasing. However, the outputs are very different. My question is: why am I getting this differences if I am working above the sampling frequency? How do I know which one is "more correct"?
Thank you!
Ana
  2 Comments
Geoff Hayes
Geoff Hayes on 2 Jul 2014
Maria - please post the code that you are you using so that we have a better idea of the steps that you are taking. In your question, you reference certain files (Y0.txt,X0.txt, fft_obs.m) and figures (fig1,fig2). Please include these as attachments to your question.

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 2 Jul 2014
The effect you’re seeing is likely inherent in the interpolation process, since I can reproduce different versions of it with your code with a wide range of step values, and using linear, spline, and pchip interpolation methods. The fft looks different with the different step values, but the extra peaks are present more often than not.
Your [X0 Y0] signal doesn’t have much detail with only 11 data points, so interpolating it is likely introducing frequencies that are not in the original data.
If you have an idea of the process that produced your data, you might get more information from your data by fitting them to a model of the process, and estimating the parameters of the model using nonlinear curve fitting techniques.

More Answers (0)

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!