Half power bandwidth method
Afficher commentaires plus anciens
I have experimental input and output acceleration data for shaker. I want to find the damping ratio from the frf graph using half power bandwidth method. I could not extract it from the graph. Can you help me please?
6 commentaires
Mathieu NOE
le 17 Mar 2023
hello
can you share your data and code ?
Fuad Al-Gaadi
le 18 Mar 2023
Mathieu NOE
le 20 Mar 2023
hello again
a few points that surprised me when doing a preliminary analysis of your data ... how where they generated & collected ?
normally we would like the input (test) signal to covert the entire frequency range with equal energy accross the frequency range (that's why I was expecting either a chirp or random type signal for the input)
here it seems to me that even the "input" is actually somehow an output of the system. The fft graph ob both signals shows almost the same spectral content.
I don't undertsnad the type of signal you are using , maybe you could explain to me how you created the test signal.
the time display will show a signals that are not stationnary in time (the is one period of blank and also a spurious "incident" on the output channel between t = 500 s to 700 s)
the record is very long, no need to do such long records for a good identification. 10% of that is even too large.
input signal = green
output signal= pink
Time display

the fft spectra (both channels) represent a tonal content of multiple harmonics of a tone at 1.95 Hz (??)
FFT display

so in the end , I don't know what I can do with your data , but using other ("good") data I can at least show you a code that works !
see below (and the data itself is the attached mat file)
Result for beam identification
nota the 3rd plot (coherence) - the coherence is the ratio of the output ennergy that is correlated with the input. It should be very close to one in the case
- your system is linear,
- does not contain too much uncorreleted noise on the output signal
- and the input signal has sufficient strength and covers all the frequency range
here in this example you can see the coherence is good (close to 1) in a large fraction of the frequency range.

% Example for Beam identification
data = load('beam_experiment.mat');
x = transpose(data.x); %input
y = transpose(data.y); %output
fs = data.fs; % sampling frequency
NFFT = 2048;
NOVERLAP = round(0.75*NFFT); % 75 percent overlap
%% solution 1 with tfestimate (requires Signal Processing Tbx)
% [Txy,F] = tfestimate(x,y,hanning(NFFT),NOVERLAP,NFFT,fs);
%% alternative with supplied sub function
[Txy,Cxy,F] = mytfe_and_coh(x,y,NFFT,fs,hanning(NFFT),NOVERLAP);
% Txy = transfer function (complex), Cxy = coherence, F = freq vector
% Bode plots
figure(1),
subplot(3,1,1),plot(F,20*log10(abs(Txy)));
ylabel('Mag (dB)');
subplot(3,1,2),plot(F,180/pi*(angle(Txy)));
ylabel('Phase (°)');
subplot(3,1,3),plot(F,Cxy);
xlabel('Frequency (Hz)');
ylabel('Coh');
%%% damping ratioes for modes
N = 2 ; % number of (dominant) modes to identify
[fn,dr] = modalfit(Txy,F,fs,N,'FitMethod','pp');
T = table((1:N)',fn,dr,'VariableNames',{'Mode','Frequency','Damping'})
%%%%%%%%%%%%%%%%%%%%%%%
function [Txy,Cxy,f] = mytfe_and_coh(x,y,nfft,Fs,window,noverlap)
% Transfer Function and Coherence Estimate
% compute PSD and CSD
window = window(:);
n = length(x); % Number of data points
nwind = length(window); % length of window
if n < nwind % zero-pad x , y if length is less than the window length
x(nwind)=0;
y(nwind)=0;
n=nwind;
end
x = x(:); % Make sure x is a column vector
y = y(:); % Make sure y is a column vector
k = fix((n-noverlap)/(nwind-noverlap)); % Number of windows
% (k = fix(n/nwind) for noverlap=0)
index = 1:nwind;
Pxx = zeros(nfft,1);
Pyy = zeros(nfft,1);
Pxy = zeros(nfft,1);
for i=1:k
xw = window.*x(index);
yw = window.*y(index);
index = index + (nwind - noverlap);
Xx = fft(xw,nfft);
Yy = fft(yw,nfft);
Xx2 = abs(Xx).^2;
Yy2 = abs(Yy).^2;
Xy2 = Yy.*conj(Xx);
Pxx = Pxx + Xx2;
Pyy = Pyy + Yy2;
Pxy = Pxy + Xy2;
end
% Select first half
if ~any(any(imag([x y])~=0)) % if x and y are not complex
if rem(nfft,2) % nfft odd
select = [1:(nfft+1)/2];
else
select = [1:nfft/2+1]; % include DC AND Nyquist
end
Pxx = Pxx(select);
Pyy = Pyy(select);
Pxy = Pxy(select);
else
select = 1:nfft;
end
Txy = Pxy ./ Pxx; % transfer function estimate
Cxy = (abs(Pxy).^2)./(Pxx.*Pyy); % coherence function estimate
f = (select - 1)'*Fs/nfft;
end
Mathieu NOE
le 20 Mar 2023
If you take the code I showed you and use your raw data then the result is juts "horrible"
see the coherence plot , almost zero everywhere => this is because the signals are not appropriate for modal analysis. We need better data than this .

dataset = xlsread('FRF_0402.xlsx','Sheet1','A1:C1046248'); %reading data
%%Creating and filling data variables
y=dataset(:,3); %Response Acceleration on the top of structure
x=dataset(:,2); %Input acceleration in the shaking table plate
t=dataset(:,1); %time vector
dt = mean(diff(t));
fs = 1/dt;
NFFT = 2048*8;
NOVERLAP = round(0.75*NFFT); % 75 percent overlap
%% solution 1 with tfestimate (requires Signal Processing Tbx)
% [Txy,F] = tfestimate(x,y,hanning(NFFT),NOVERLAP,NFFT,fs);
%% alternative with supplied sub function
[Txy,Cxy,F] = mytfe_and_coh(x,y,NFFT,fs,hanning(NFFT),NOVERLAP);
% Txy = transfer function (complex), Cxy = coherence, F = freq vector
% Bode plots
figure(1),
subplot(3,1,1),plot(F,20*log10(abs(Txy)));
ylabel('Mag (dB)');
subplot(3,1,2),plot(F,180/pi*(angle(Txy)));
ylabel('Phase (°)');
subplot(3,1,3),plot(F,Cxy);
xlabel('Frequency (Hz)');
ylabel('Coh');
% %% damping ratioes for modes
% [fn,dr] = modalfit(FRF66db,f1',fs,10,'FitMethod','pp');
% T = table((1:10)',fn,dr,'VariableNames',{'Mode','Frequency','Damping'})
%%%%%%%%%%%%%%%%%%%%%%%
function [Txy,Cxy,f] = mytfe_and_coh(x,y,nfft,Fs,window,noverlap)
% Transfer Function and Coherence Estimate
% compute PSD and CSD
window = window(:);
n = length(x); % Number of data points
nwind = length(window); % length of window
if n < nwind % zero-pad x , y if length is less than the window length
x(nwind)=0;
y(nwind)=0;
n=nwind;
end
x = x(:); % Make sure x is a column vector
y = y(:); % Make sure y is a column vector
k = fix((n-noverlap)/(nwind-noverlap)); % Number of windows
% (k = fix(n/nwind) for noverlap=0)
index = 1:nwind;
Pxx = zeros(nfft,1);
Pyy = zeros(nfft,1);
Pxy = zeros(nfft,1);
for i=1:k
xw = window.*x(index);
yw = window.*y(index);
index = index + (nwind - noverlap);
Xx = fft(xw,nfft);
Yy = fft(yw,nfft);
Xx2 = abs(Xx).^2;
Yy2 = abs(Yy).^2;
Xy2 = Yy.*conj(Xx);
Pxx = Pxx + Xx2;
Pyy = Pyy + Yy2;
Pxy = Pxy + Xy2;
end
% Select first half
if ~any(any(imag([x y])~=0)) % if x and y are not complex
if rem(nfft,2) % nfft odd
select = [1:(nfft+1)/2];
else
select = [1:nfft/2+1]; % include DC AND Nyquist
end
Pxx = Pxx(select);
Pyy = Pyy(select);
Pxy = Pxy(select);
else
select = 1:nfft;
end
Txy = Pxy ./ Pxx; % transfer function estimate
Cxy = (abs(Pxy).^2)./(Pxx.*Pyy); % coherence function estimate
f = (select - 1)'*Fs/nfft;
end
Fuad Al-Gaadi
le 20 Mar 2023
Mathieu NOE
le 20 Mar 2023
hello again
thanks for the explananations - so this is a mock up of a multi stage building as far I can tell.
excuse me for this stupid question , but are you sure you are measuring / collecting the data in the direction of mechanical excitation (just double check ? )
are you suing 3 axis accelerometers ? are you sure which axis is stored in your data ?
what is the signal send to your shaker ?
are you sure that the blocks of concrete are rigidely attached to the "floors"; if they have a tendency so stick / slip; this will create non linearities in your model and reduce the quality of your data (beside that you can't really tell about what are the correct boundary conditions)
Réponses (0)
Catégories
En savoir plus sur Spectral Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!