声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

声振论坛 展示 行业应用 土木工程 查看内容

地震波时程转换成反应谱的matlab程序

2015-11-13 07:50| 发布者: aspen| 查看: 2274| 评论: 0|原作者: zxwflyer|来自: 声振论坛

摘要: 把地震波时程转换成反应谱的matlab程序
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');


12下一页

最新评论

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-4 05:31 , Processed in 0.065024 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部