Comparing the IR computed with ifft and with impulse

조회 수: 2 (최근 30일)
Romain Liechti
Romain Liechti 2019년 3월 20일
편집: Romain Liechti 2019년 3월 20일
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')

답변 (0개)

카테고리

Help CenterFile Exchange에서 Plot Customization에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by