필터 지우기
필터 지우기

Dicrepancies in FFT values at lower frequencies

조회 수: 2 (최근 30일)
Murali Krishnan
Murali Krishnan 2023년 11월 22일
댓글: Mathieu NOE 2023년 11월 27일
I have been trying to compare the time domain and frequency domain results from Matlab and ansys for a vibrating system. Although the values agree generally, at lower frequencies there appears to be a significant difference.Especially at 0, the amplitude varies significantly (in the time domain data,at time 0, both systems had the same amplitude). Why would that be? I have exported data from excel sheet for this analysis.
%Import time domain data from excel sheet
file = '....nt.xlsx';
sheet= '...';
data = xlsread(file,sheet);
time = data(:,1);
mat_amp = data(:,2);
ans_amp= data(:,3);
%% Frequency domain plot
L = length(time);
n=2^nextpow2(L);
Ts = time(2)-time(1);
Fs = 1/Ts;
f= Fs*(0:(n/2))/n;
ft_mat = fft(mat_amp,n);
M2 = abs(ft_mat/n);
M1 = M2(1:n/2+1);
M1(2:end-1)=2*M1(2:end-1);
ft_ans = fft(ans_amp,n);
A2 = abs(ft_ans/n);
A1 = A2(1:n/2+1);
A1(2:end-1)=2*A1(2:end-1);
figure(2)
plot(f,abs(M1),'-*',f,abs(A1)) ;
title("Frequency Response-Beam with Mass")
xlabel("f (Hz)")
ylabel("Amplitude")
grid on;
legend('Matlab', 'Ansys');
figure(3)
plot(f,20*log10(abs(M1)),'-*',f,20*log10(abs(A1)));
title("Frequency Response-Beam with Mass")
xlabel("f (Hz)")
ylabel("Amplitude in dB")
grid on;
legend('Matlab', 'Ansys');
  댓글 수: 10
Murali Krishnan
Murali Krishnan 2023년 11월 27일
Thank you for the help.
Mathieu NOE
Mathieu NOE 2023년 11월 27일
my pleasure !

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by