Comparing the IR computed with ifft and with impulse

2 views (last 30 days)
I'm trying to compare the impulse response calculated by the function "impulse" in matlab with a model computed from frequency and phase data. I'm unable to get a good fit in the time domain.
Impulse_response_2nd_order.png
% from the bode plot, ifft, and impulse function
% Comparing impulse from the exported data from the bode plot, from frd (frequency data object) and
% identified obejct
impulse_mag_ident = ifft(mag_ident.*exp(1j*pha_ident*pi/180),fs,'symmetric')./Ts;
% Don't forget to normalize the ifft with the number of points
impulse_mag_data = ifft(mag_data.*exp(1j*pha_data*pi/180),fs,'symmetric')./Ts;
[yy,tt]=impulse(G_identd,Ts*fs);
t_ax = linspace(0,1,length(impulse_mag_data));
figure()
plot(t_ax,impulse_mag_ident);
hold on
plot(tt,yy);
xlim([0 0.2])
legend('Ifft','Impulse')
title('Impulse response measurement')
xlabel('Time [s]')
ylabel('Amplitude')

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!