jeruselem提供的地震波反应谱程序 clear;close all; load northbridge.mat %输入地震波文件,时程数据格式为一行。 eqw=x; amax=max(abs(eqw)); dt=0.01 %采样频率100Hz ff=eqw; n=0; zeta=0.05; %阻尼比 for w=200:-0.1:1; %自己设定 x=0; v=0; %alhp=35; acc=0; a=[1,2*zeta*w,w^2]; b=1; [r,p]=residue(b,a); t=0:dt:length(eqw)*dt; h=r(1)*exp(p(1)*t)+r(2)*exp(p(2)*t); x=conv(h,ff)*dt; v=diff(x)/dt; acc=diff(v)/dt; n=n+1; beta1(n)=max(abs(acc))/amax; beta2(n)=max(abs(v))/amax; beta3(n)=max(abs(x))/amax; T(n)=2*pi/w; end; save eqw_response_Northbridge T beta1 beta2 beta3 %% ww=1./T;wf=fliplr(ww); beta1f=fliplr(beta1); beta2f=fliplr(beta2); beta3f=fliplr(beta3); figure;plot(wf,beta1f,'linewidth',2);grid on;xlabel('frequency (Hz) ');ylabel('acceleration (m/s^2)');title('Acceleration Response Spectrum-Northbridge 35gal '); saveas(gcf,'Northbridge-Response-1','fig');saveas(gcf,'Northbridge-Response-1','bmp'); figure;plot(wf,beta2f,'linewidth',2);grid on;xlabel('frequency (Hz)');ylabel('velocity (m/s)');title('Velocity Response Spectrum-Northbridge 35gal') saveas(gcf,'Northbridge-Response-2','fig');saveas(gcf,'Northbridge-Response-2','bmp'); figure;plot(wf,beta3f,'linewidth',2);grid on;xlabel('frequency (Hz)');ylabel('displacement (m)');title('Displacement Response Spectrum-Northbridge 35gal') saveas(gcf,'Northbridge-Response-3','fig');saveas(gcf,'Northbridge-Response-3','bmp'); figure;plot(T,beta1,'linewidth',2);grid on;xlabel('period (s)');ylabel('acceleration (m/s^2)');title('Acceleration Response Spectrum-Northbridge 35gal '); saveas(gcf,'Northbridge-Response-4','fig');saveas(gcf,'Northbridge-Response-4','bmp'); figure;plot(T,beta2,'linewidth',2);grid on;xlabel('period (s)');ylabel('velocity (m/s)');title('Velocity Response Spectrum-Northbridge 35gal '); saveas(gcf,'Northbridge-Response-5','fig');saveas(gcf,'Northbridge-Response-5','bmp'); figure;plot(T,beta3,'linewidth',2);grid on;xlabel('period (s)');ylabel('displacement (m)');title('Displacement Response Spectrum-Northbridge 35gal '); saveas(gcf,'Northbridge-Response-6','fig');saveas(gcf,'Northbridge-Response-6','bmp'); |
GMT+8, 2024-11-24 16:49 , Processed in 0.035258 second(s), 16 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.