Logarithmic Decrement and Damp Ratio
169 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a velocity vs time input data on which I had to apply butterworth filter but now I have issues with application of the log decrement method for damping calculation. The log decrement formula is depicted in the picture and I have implemented it as following:
%INPUTS%
%Veloc - Veloc vector
%n_peaks - No. of peaks of interest
%Time - Actual time series
%OUTPUTS%
%damp_ratio_logdec - Damping ratio
z=importdata('P1veloc.txt');
Time = z(:,1);
Veloc = z(:,2);
n_peaks=10
%Vector length of interest
t_new = Time(imax(1:n_peaks));
y_new = ymax(1:n_peaks);
t_new(1)=[];%Remove first point - Due to impact
y_new(1)=[];
%---Calculate Logarithmic Decrement
Log_Dec = zeros(length(n_peaks));
for nn = 1:n_peaks-2 %We go to '-2' because length(n_peaks) = since we ignore first one
Log_Dec(nn)= log(y_new(nn)/y_new(nn+1));
end
Mean_dec = mean(Log_Dec); %Calculate Average Logarithmic Decrement
%Damping
damp_ratio_logdec = 1/sqrt(1+((2*pi/(Mean_dec))^2)); %Assesses Damping Constant
I have also put a .txt file with velocity and time columns. I started the code but I am not doing well so I would appreciate any help, since I just started using Matlab as part of my thesis and I have to process data in this way.
2 Kommentare
Agus Danish
am 16 Dez. 2021
Hello, the error said "Index in position 2 exceeds array bounds. Index must not exceed 1.". What does it means?
Mathieu NOE
am 17 Dez. 2021
hello
to which code / data are you refering ?
this was my suggestion (see below) :
clc
clear all
close all
z=importdata('P1veloc.txt');
ind = 1:100;
Time = z(ind,1);
Veloc = z(ind,2);
ind = 1:20;
[Ypk,Xpk,Wpk,Ppk] = findpeaks(Veloc(ind));
plot(Time,Veloc,Time(Xpk),Ypk,'dr');
n_peaks=numel(Xpk);
%Vector length of interest
t_new = Time(Xpk);
y_new = Ypk;
%---Calculate Logarithmic Decrement, undamped natural frequency, damped natural frequency, damping ratio
Log_Dec = zeros(length(n_peaks));
for nn = 1:n_peaks-1 %
Log_Dec(nn)= log(y_new(nn)/y_new(nn+1)); % computed with n = 1 periods apart
end
Mean_dec = mean(Log_Dec); %Calculate Average Logarithmic Decrement
%Damping
damp_ratio_logdec = 1/sqrt(1+((2*pi/(Mean_dec))^2)); %Assesses Damping Constant
Antworten (2)
Mathieu NOE
am 1 Dez. 2021
hello
a very late answer to this question - siply because this code was reused in another post
FWIW, this is the answer I already provided
clc
clear all
close all
% z = csvread('G03.csv');
z=importdata('P1veloc.txt');
ind = 1:100;
Time = z(ind,1);
Veloc = z(ind,2);
ind = 1:20;
[Ypk,Xpk,Wpk,Ppk] = findpeaks(Veloc(ind));
plot(Time,Veloc,Time(Xpk),Ypk,'dr');
n_peaks=numel(Xpk);
%Vector length of interest
t_new = Time(Xpk);
y_new = Ypk;
%---Calculate Logarithmic Decrement, undamped natural frequency, damped natural frequency, damping ratio
Log_Dec = zeros(length(n_peaks));
for nn = 1:n_peaks-1 %
Log_Dec(nn)= log(y_new(nn)/y_new(nn+1)); % computed with n = 1 periods apart
end
Mean_dec = mean(Log_Dec); %Calculate Average Logarithmic Decrement
%Damping
damp_ratio_logdec = 1/sqrt(1+((2*pi/(Mean_dec))^2)); %Assesses Damping Constant
0 Kommentare
Siehe auch
Kategorien
Mehr zu Vibration Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!