30 views (last 30 days)

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)))

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.

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)');

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

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

Start Hunting!
## 2 Comments

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/719940-modelfrf-experiment-naturel-frequecies-magnitude#comment_1270265

⋮## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/719940-modelfrf-experiment-naturel-frequecies-magnitude#comment_1270265

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/719940-modelfrf-experiment-naturel-frequecies-magnitude#comment_1270455

⋮## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/719940-modelfrf-experiment-naturel-frequecies-magnitude#comment_1270455

Sign in to comment.