Fourier transform of an impulse response function
12 ビュー (過去 30 日間)
古いコメントを表示
Hello,
It seems that I have trouble calculating an integral (Fourier transform). Here is my code:
syms t tau w f u
% SYSTEM
h = piecewise(t>=0, 0.01005*(exp(-t))*sin(9.949874371*t), t<0, 0);
%% Autocorrelation of h
h1 = subs(h,t,t-tau/2);
h2 = subs(h,t,t+tau/2);
%%
hh = h1*h2;
hh_simple = simplify(hh);
%% Fourier transform of the autocorrelation function
hh_test = hh_simple*exp(-j*2*pi*f*tau);
f3 = int(hh_test,tau,[-2*t 2*t]);
"h" is the impulse response function of a 1-dof system, "hh" its autocorrelation function and "f3" is the Fourier transform of the autocorrelation function.
"f3" is a function of frequency f and time t. When I assign some values to time "t", I plot the function f3 which is now of one variable, f. Seems like my plotted function has singularities and is not smooth. I was expecting a smooth curve with 1 peak (at the natural frequency of the system). Could someone please tell me if there is something wrong with it? Is there any problem with the integration?
Here is f3 at 3 time instants.
2 件のコメント
回答 (1 件)
Paul
2023 年 8 月 30 日
編集済み: Paul
2023 年 8 月 30 日
Hi Jason,
syms t tau f real
% SYSTEM
h = piecewise(t>=0, 0.01005*(exp(-t))*sin(9.949874371*t), t<0, 0);
%h = 0.01005*(exp(-t))*sin(9.949874371*t)*heaviside(t);
%% Autocorrelation of h
h1 = subs(h,t,t-tau/2);
h2 = subs(h,t,t+tau/2);
%%
hh = h1*h2;
hh_simple = simplify(hh)
Safer to use sym(pi) here
%% Fourier transform of the autocorrelation function
hh_test = hh_simple*exp(-1j*2*sym(pi)*f*tau)
f3 = int(hh_test,tau,[-2*t 2*t]);
%f3 = int(hh_test,tau,-inf,inf)
Plot f3 for some values of t
figure
fplot(subs(f3,t,1))
xline(9.949874371/2/pi,'r')
xlabel('f')
figure
fplot(subs(f3,t,5))
xline(9.949874371/2/pi,'r')
xlabel('f')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Fourier Analysis and Filtering についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!