How to create a FRF graph of the real and imaginary parts of a signal

84 ビュー (過去 30 日間)
Otto Randolph
Otto Randolph 2023 年 10 月 31 日
コメント済み: Star Strider 2023 年 11 月 1 日
Hello,
I ran a hammer test on a structure that gave me acceleration and force data. I know MATLAB has an inbuilt function, modalfrf, that outputs a FRF in terms of magnitude and phase, but I'm trying to get FRF plots in terms of the real and imaginary parts of the data. Does anyone know how I would go about getting this?
As a bonus question, I know from the modalfrf plot that I can pick out natural frequencies. Is there a way for me to get matlab to calculate the damping ratio of the specific natural frequencies I want?
Thank you so much for your time!

採用された回答

Star Strider
Star Strider 2023 年 10 月 31 日
It appears that is its default behaviour if you request outputs —
load modaldata
figure
subplot(2,1,1)
plot(thammer,Xhammer(:))
ylabel('Force (N)')
subplot(2,1,2)
plot(thammer,Yhammer(:))
ylabel('Displacement (m)')
xlabel('Time (s)')
winlen = size(Xhammer,1);
figure
modalfrf(Xhammer(:),Yhammer(:),fs,winlen,'Sensor','dis')
[frf,f] = modalfrf(Xhammer(:),Yhammer(:),fs,winlen,'Sensor','dis');
figure
semilogy(f, real(frf), 'DisplayName','Real')
hold on
plot(f, imag(frf), 'DisplayName','Imag')
plot(f, abs(frf), 'DisplayName','Magnitude')
hold off
grid
legend('Location','best')
Warning: Negative data ignored
  2 件のコメント
Otto Randolph
Otto Randolph 2023 年 11 月 1 日
Awesome, thank you so much! I had to change the graphs to not be log scale since there were negative data points but it worked!
Star Strider
Star Strider 2023 年 11 月 1 日
Thank you! As always, my pleasure!
I completely understand. I debated on that, and finally decided on a logarithmic axis because I used an example from the documentation, and the default modalfrf plot it produces uses a logarithmic magnitude scale. (I used the logarithmic y-axis here to demonstrate that it produced the same plot.)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by