% Non-Parametric Damping Analysis
% Provide an equispaced velocity time series named "input"
%sampling rate
sampl=20;
dt=1/sampl;
%data correction
detr=input-mean(input);
Wn=1.0/(sampl/2)
[b,a] = butter(2,Wn,'high');
Hd = dfilt.df2t(b,a);
fltrd= filter(b,a,detr);
%fltrd=input-mean(input);
%data integration to obtain displacements
knum=size(fltrd);
kum=knum(1);
for in=1:knum;
ix(in,1)=in*dt;
end
u=fltrd;
nu=length(u);
[m,n]=size(u);
x=1:nu;
if(n==1)
x=x';
end
dx=x(2:nu)-x(1:nu-1);
a=zeros(size(u));
b=u(1:nu-1) + u(2:nu);
a(2:nu)=b.*dx/2;
corr=cumsum(a);
%selection of local maxima
nnum=size(corr);
num=nnum(1);
c=0;
for i= 2:num-1;
if corr(i,1) >= corr(i-1,1) & corr(i,1) >= corr(i+1,1) & corr(i,1) >0;
c=c+1;
maxim(c,1)=corr(i,1);
maxim(c,2)=(i+2)*dt;
end
end
%estimation of log.decrement and pseudo-frequency
cc=0;
for j= 1:c-2;
if maxim(j,1) > maxim(j+1,1)
cc=cc+1;
a=maxim(j,1);
b=maxim(j+1,1);
d=maxim(j+1,2);
e=maxim(j,2);
declog=log(a/b);
psper=(d-e);
smorz(cc,1)=1/psper;
smorz(cc,2)=100*declog./(2*pi);
smorz(cc,3)=a;
smorz(cc,4)=d;
end
end
fhist=[0: 0.25: 10];
nh=histc(smorz(:,1),fhist);
[maxh, imaxh]=max(nh);
fmin=fhist(imaxh)-0.25;
fmax=fhist(imaxh)+0.25;
idmp=0
for kk= 1:cc
if (smorz(kk,1) >= fmin) & (smorz(kk,1) <= fmax)
idmp=idmp+1
dmpst= smorz(kk,2)
end
end
dfx=1./diff(smorz(:,4));
isx=0
for ijk=1:cc-1
if (dfx(ijk) >= fmin) & (dfx(ijk) <= fmax)
if (smorz(ijk,1) >= fmin) & (smorz(ijk,1) <= fmax)
if smorz(ijk+1,3)<smorz(ijk,3)
isx=isx+1;
dmp2(isx)=(smorz(ijk+1,2)+smorz(ijk,2))/2;
end
end
end
end
[f,xf] = ecdf(dmp2);
mu=mean(log(dmp2));
sigma=std(log(dmp2));
damp25= prctile(dmp2,25)
medamp=median(dmp2)
damp75= prctile(dmp2,75)
yy=logncdf(xf,mu,sigma);
ww=lognpdf(xf,mu,sigma);
figure
plot(xf,f,xf,yy)
axis([0 25 0 1])
legend('Empirical cdf','LogNormal cdf')
xlabel('Damping')
ylabel('%')
StatPaDAnSeqMX.rar_building
版权申诉
157 浏览量
2022-09-21
19:21:04
上传
评论
收藏 1KB RAR 举报