Confirming Correct Results and Y-Axis of FFT

15 visualizaciones (últimos 30 días)
I am taking the FFT of some data and have two questions: how do I know I am correct and what are the units of my y-axis?
Let us start with question two. Here is my original time domain signal:
From what I have read the y-axis units of your FFT should be the same as your units on your time-domain signal which in my case is millimeters. Now when I take the FFT my results are as follows:
When I look at this data I am puzzled as nothing that I am doing is every 35mm. I know that my frequencies are very small, but that is expected with my appliaciotn. Here is the code that I am using to make this signal:
s = data - mean(data); %Removes DC component
len2 = 2^nextpow2(len); %Changes lentgh of signal
s = fft(s,len2);
s2 = s(1:len2/2);
xfft = Fs*(0:len2/2-1)/len2; %Converts x-axis to Hz
plot(xfft,abs(s2));
I wanted to add that even though I removed the DC compoent I still have a large spize at very close to 0Hz. Is that normal? Now back to my first question, how do I know this is correct? Any insight would be helpful.

Respuesta aceptada

Ajith Krishna Kanduri
Ajith Krishna Kanduri el 19 de Jun. de 2020
Hi,
The results of the absolute value of the output of the fft function (that you have correctly calculated and scaled) are in the same units as the original data vector. If you measured your data in millimeters, the y-axis of the fft output in your code will be in millimeters.

Más respuestas (0)

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by