Unit of FFT in matlab
30 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am working on simulation of modal analysis using Impulse hammer method testing.
I have the output of the simulation in time domain in mm.
Upon conversion to frequency domain using FFT in matlab , the amplitude of FRF is not in the range expected.
I want the FRF Amplitude to be in mm.
Please help.
0 comentarios
Respuestas (1)
Star Strider
el 17 de Oct. de 2020
The fft function does not change the units of the time-domain argument it is given.
The fft function produces a double-sided Fourier transform, and that divides the energy in the signal equally between each half of the output, so it is necessary to mulitply the amplitude by 2 to approximate the amplitude of the time-domain signal in each half.
If ‘s’ is your signal vector and ‘t’ is your ttime vector (of eaually-spaced correspondiing smapling instants), this will produce an accurate representation of the single-sided Fourier transform of your signal:
Fs = 1/mean(diff(t)); % Sampling Frequency
Fn = Fs/2; % Nyquiat Frequency
L = size(D,1);
FTs = fft(s)/L;
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
figure
plot(Fv, abs(FTs(Iv))*2) % Multiply By ‘2’ To Correct For Double-Sided Initial ‘fft’ Output
grid
xlabel('Frequency (Hz)')
ylabel('Power (dB)')
xlim([min(Fv) max(Fv)])
if you want the output to be plotted in decibels (logarithmic power) instead:
plot(Fv, mag2db(abs(FTs(Iv))*2)) % Multiply By ‘2’ To Corredt For Double-Sided Initial ‘fft’ Output
If your signal has a significant D-C (constant) offset, it will likely be necessary to subttract the mean of the signal from the rest of the signal in order to see the other peaks:
FTs = fft(s - mean(s))/L;
.
2 comentarios
Nathan Batta
el 31 de En. de 2021
@Star Strider In the third line of your code you use a variable D. Where does this come from? Thanks!
Star Strider
el 31 de En. de 2021
The ‘D’ most likely is the data vector or matrix that was imported using readmatrix.
That information may have been in the original post, along with the file itself. (I do not remember the details of the original post, so those details and related references may have been removed in the interim. This occasionally occurs.)
Ver también
Categorías
Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!