Download Implementation of accelerometric parameters computation

Transcript
NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE
%
in the time domain
%
%-------------------------------------------------------%
%Velocity (cm/s)
intgr1=cumtrapz(t2,a_filt);
%Displacement (cm)
intgr2=cumtrapz(t2,intgr1);
%----- Option to save aceleration, velocity and displacement --%
if(firstime==1)
outfile=cat(2,direct_name,'/',file(1:length(file)-3),'avd');
fid30=fopen(outfile,'w+');
for i=1:100
format(i)=' ';
end
fprintf(fid30,'Filtered acceleration (cm/s^2)');
fprintf(fid30,'
Velocity (cm/s)');
fprintf(fid30,'
Displacement (cm)\n');
position=ftell(fid30);
for r=1:length(a_filt)
fprintf(fid30,'%s',format);
fseek(fid30,position+10,-1);
fprintf(fid30,'%f',a_filt(r));
fseek(fid30,position+39,-1);
fprintf(fid30,'%f',intgr1(r));
fseek(fid30,position+61,-1);
fprintf(fid30,'%f\n',intgr2(r));
position=ftell(fid30);
end
fclose(fid30);
end
%-----PGV (cm/s) ---------------------------------------%
%-------------------------------------------------------%
PGV=max(abs(intgr1));
%-----Pseudospectrum velocity 5% damping----------------%
%-------------------------------------------------------%
%damping
amort=0.05;
% PSV computed at these frequencies
ff=[0.15, 0.19, 0.23, 0.28, 0.34, 0.42, 0.52, 0.64, 0.78, ...
0.96, 1.18, 1.45, 1.78, 2.19, 2.69, 3.31, 4.06, 4.99, 6.13,
7.53,...
9.25, 11.37, 13.96, 17.15, 21.07, 25.89, 31.80, 39.07];
w=2*pi*ff;
%PSV computation
[fpsv,Psv]=psv(amort,w,a_filt,t2);
%Housner intensity (cm)---------------------------------%
IH=Housner(fpsv,Psv);
%IH=1; %prova
%-------------------------------------------------------%
%When PGA <= 0.01cm/s^2 and PGV <= 1cm/s PSVs for low frequencies are
not offered---%
if ((PGAc <= 0.01*981)|(PGV <=1))
for k=1:5;
Psv(k)= 99999;
end
end
%Start
plotting%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21