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

64 vues (au cours des 30 derniers jours)
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!

Réponse acceptée

Star Strider
Star Strider le 31 Oct 2023
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 commentaires
Otto Randolph
Otto Randolph le 1 Nov 2023
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 le 1 Nov 2023
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.)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by