MATLAB Answers

modelfrf, experiment, naturel frequecies, magnitude

30 views (last 30 days)
Gloria
Gloria on 18 Jan 2021
Commented: Mathieu NOE on 19 Jan 2021
When I plot the experiment data with modalfrf, the units on the vertical axis are not correct. I gave the result for the experiment with figure 1 and the numerical results with figure 2. I think figure 2 is correct and figure 1 is wrong. Where is my mistake?
B1=xlsread('excel.xlsx',1);
x = B1(1:10000,3:3);
f = B1(1:10000,4:4);
dt = 0.0001;
Fs = 1/dt;
N = 10000;
t = dt*(0:N-1);
wind = hann(N/2);
[frf,f] = modalfrf(f,x,Fs,wind);
plot(f,20*log10(abs(frf)))

  2 Comments

dpb
dpb on 18 Jan 2021
I don't see anything to complain about -- I hadn't realized there was a modal frf function in SP TB; I haven't done much of that sort for a while, so "know nuthink!" about it per Sgt Schultz but it appears it outputs the plot in linear scale and you've converted to a power/dB axis. Somewhat more conventional, but if you got the expected amplitudes, what's to complain?
Gloria
Gloria on 18 Jan 2021
Thanks for reply. two figure must be match. The values of x axis true bu obviously I have a mistake when I change displacements which are time depentt to dB.

Sign in to comment.

Accepted Answer

Mathieu NOE
Mathieu NOE on 18 Jan 2021
hello
I plotted the time data for channels combos 3/4 (and 1/2)
both shows single (low) frequency sinus type data - so this is not what I expected for a modal frf - I was expecting to see random, random burst , sine dwell (chirp) , but not a lonely fixed freq sinus
not a surprise that the computed frf is completly misleading
also the amplitude of x and f are of very different orders of magnitudes : x is in the 10^-5 and f in the 10^5 , so a ratio like this cannot give a frf modulus like the "good" figure 2 would show between 10^-7 and 10^-4.

  7 Comments

Show 4 older comments
Mathieu NOE
Mathieu NOE on 19 Jan 2021
hello
I did a couple of investigations (spectrograms, averaged spectra, coherence analysis) , but the nature of your signals are strange to me ... I assume that you are exciting your structure through hydraulic pressure and measuring the response by the accel , but as you can see below in the figure 6 , the coherence between the accel and each one of the pressure signal is very low in almost the entire frequency range, so I wonder how one could do a proper modal extraction with uncoherent signals. How do you generate them ?
FYI, my code below
N = 1000;
B1=xlsread('excel2.xlsx',1);
accel = B1(1:N,1);
Pr1 = B1(1:N,2);
Pr2 = B1(1:N,3);
dt = 0.0001;
Fs = 1/dt;
N = 1000;
t = dt*(0:N-1);
figure(1);
subplot(2,1,1),plot(t,accel)
title (' accel ');
subplot(2,1,2),plot(t,Pr1,'b',t,Pr2,'r')
title (' Pr1 (b) , Pr2 (r) ');
xlabel('time (s)');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% display 2 : time / frequency analysis : spectrogram demo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nfft = N/4;
wind = hann(nfft);
OVERLAP = 0.95;
NOVERLAP = floor(nfft*OVERLAP);
[sg1,fsg,tsg] = specgram(accel,nfft,Fs,wind,NOVERLAP);
[sg2,fsg,tsg] = specgram(Pr1,nfft,Fs,wind,NOVERLAP);
[sg3,fsg,tsg] = specgram(Pr2,nfft,Fs,wind,NOVERLAP);
% FFT normalisation and conversion amplitude from linear to dB (peak)
sg1_dBpeak = 20*log10(abs(sg1))+20*log10(2/length(fsg)); % NB : X=fft(x.*hanning(N))*4/N; % hanning only
sg2_dBpeak = 20*log10(abs(sg2))+20*log10(2/length(fsg)); % NB : X=fft(x.*hanning(N))*4/N; % hanning only
sg3_dBpeak = 20*log10(abs(sg3))+20*log10(2/length(fsg)); % NB : X=fft(x.*hanning(N))*4/N; % hanning only
% plots spectrograms
figure(2);
imagesc(tsg,fsg,sg1_dBpeak);colormap('jet');
axis('xy');colorbar('vert');grid
title([' Spectrogram (accel) / Fs = ' num2str(Fs) ' Hz / Delta f = ' num2str(fsg(2)-fsg(1)) ' Hz ']);
xlabel('Time (s)');ylabel('Frequency (Hz)');
figure(3);
imagesc(tsg,fsg,sg2_dBpeak);colormap('jet');
axis('xy');colorbar('vert');grid
title([' Spectrogram (Pr1) / Fs = ' num2str(Fs) ' Hz / Delta f = ' num2str(fsg(2)-fsg(1)) ' Hz ']);
xlabel('Time (s)');ylabel('Frequency (Hz)');
figure(4);
imagesc(tsg,fsg,sg3_dBpeak);colormap('jet');
axis('xy');colorbar('vert');grid
title([' Spectrogram (Pr2) / Fs = ' num2str(Fs) ' Hz / Delta f = ' num2str(fsg(2)-fsg(1)) ' Hz ']);
xlabel('Time (s)');ylabel('Frequency (Hz)');
% Averaged fft spectrum = linear average of spectrograms along the time
% axis
accel_spectrum = mean(sg1_dBpeak,2);
Pr1_spectrum = mean(sg2_dBpeak,2);
Pr2_spectrum = mean(sg3_dBpeak,2);
figure(5);
plot(fsg,accel_spectrum,'b',fsg,Pr1_spectrum,'r',fsg,Pr2_spectrum,'m');grid
title (' Autospectrum : accel (b) , Pr1 (r) , Pr2 (m) ');
legend('accel','Pr1','Pr2');
xlabel('Freq (Hz)');
[frf1,freq] = modalfrf(Pr1,accel,Fs,wind,NOVERLAP);
[Cxy1,freqC] = mscohere(Pr1,accel,wind,NOVERLAP,nfft,Fs);
[frf2,freq] = modalfrf(Pr2,accel,Fs,wind,NOVERLAP);
[Cxy2,freqC] = mscohere(Pr2,accel,wind,NOVERLAP,nfft,Fs);
figure(6);
subplot(2,1,1),plot(freq,20*log10(abs(frf1)),'b',freq,20*log10(abs(frf2)),'r')
title (' FRFs : accel / Pr1 (b) , accel / Pr2 (r) ');
subplot(2,1,2),plot(freqC,Cxy1,'b',freqC,Cxy2,'r');
title (' Coherence : accel / Pr1 (b) , accel / Pr2 (r) ');
xlabel('Freq (Hz)');
Gloria
Gloria on 19 Jan 2021
Thank you so much. As you said ; we stimulated structure through hydraulic pressure and measured the accelerations.I also have time dependent displacement values.I guess the frequency range was not scanned during the experiment so we can not see the naturel frequencies.Thank you very much for your time.I guess I can not see natural frequencies.
Mathieu NOE
Mathieu NOE on 19 Jan 2021
you have to introduce some wide frequency range excitation signals , like random (white noise ) or chirps , but do not rely on "operationnal" background noise or narrow band signals like sines to get accurate models
have a good day

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by