Borrar filtros
Borrar filtros

Fourier transform of an impulse response function

6 visualizaciones (últimos 30 días)
Jason Soukas
Jason Soukas el 30 de Ag. de 2023
Editada: Paul el 30 de Ag. de 2023
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 comentarios
Paul
Paul el 30 de Ag. de 2023
Hi Jason,
What's the source for that definiton of the autocorrelation function?
Jason Soukas
Jason Soukas el 30 de Ag. de 2023
Editada: Jason Soukas el 30 de Ag. de 2023
Hello, thank you for the response!
The source is 3-4 papers I found, I attach a screenshot of one at the specific point you asked me for. I followed the formulas exactly, with the constraint that t>=0 (and as a result t-τ/2 >= 0 and t+τ/2 >= 0, which leads to -2t <= τ <= 2t ).

Iniciar sesión para comentar.

Respuestas (1)

Paul
Paul el 30 de Ag. de 2023
Editada: Paul el 30 de Ag. de 2023
Hi Jason,
syms t tau f real
% SYSTEM
I'd use heaviside, but piecewise works too.
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)
hh_simple = 
Safer to use sym(pi) here
%% Fourier transform of the autocorrelation function
hh_test = hh_simple*exp(-1j*2*sym(pi)*f*tau)
hh_test = 
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')

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by