Comparing the IR computed with ifft and with impulse

3 ビュー (過去 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 Center および File ExchangeGet Started with Control System Toolbox についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by