马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
%This program is for solving the dynamic respones by zhenxing fenjie method
%This program is for the frame structure
clear;
xs=2*0.287;
dzhbo=load ('Centro.txt');
ag=dzhbo*0.01*xs;
dt=0.02;
ndzh=400;
cn=3;
m0=[2762 2760 2300];
k0=[248500 192100 152200];
l=diag(ones(cn));
m=diag(m0);
[ik]=matrixju(k0,cn);
[x,d]=eig(ik,m);
d=diag(sqrt(d));
for i=1:cn
[d1(i),j]=min(d);
xgd(:,i)=x(:,j);
d(j)=max(d)+1;
end
w=d1;
x=xgd;
a1=2*w(1)*w(2)*(0.05*w(2)-0.07*w(1))/(w(2)^2-w(1)^2);
a2=2*(0.07*w(2)-0.05*w(1))/(w(2)^2-w(1)^2);
for j=1:cn
x(:,j)=x(:,j)/x(cn,j);
znbo(j)=(a1+a2*w(j)^2)/2/w(j);
zhcan(j)=(x(:,j))'*m*l/((x(:,j))'*m*x(:,j));
[dlt(j,:),dltacceler(j,:)]=zxzj(znbo(j),w(j),ag);
end
for i=1:cn
disp1=0;
accel1=0;
for j=1:cn
disp0=zhcan(j)*dlt(j,:)*x(i,j);
accel0=zhcan(j)*dltacceler(j,:)*x(i,j);
disp1=disp1+disp0;
accel1=accel1+accel0;
end
disp(i,:)=disp1;
accel(i,:)=accel1;
end
t=0:dt;ndzh*dt;
subplot(2,2,1)
plot(t,disp(3,:),'k -')
subplot(2,2,2)
plot(t,accel(3,:),'k -')
%This sub-program is solving the dynamic respones of singel degree system
function [bx,acceler]=zxzj(znb,w,dag)
dt=0.02;
n=399;
x(1)=0;
dx(1)=0;
ddx(1)=0;
s=1+znb*dt*w+w^2*dt^2/6;
for i=1:n
a(i)=x(i)+dx(i)*dt+ddx(i)*dt^2/3;
b(i)=dx(i)+ddx(i)*dt/2;
ddx(i+1)=-1*(dag(i+1)+2*znb*w*b(i)+w^2a*(i))/s;
dx(i+1)=b(i)+ddx(i+1)*dt/2;
x(i+1)=a(i)+ddx(i+1)*dt^2/6;
end
bx=x;
acceler=ddx;
%This sun-program is for matrix aggregation of system
function [kcju]=matrixju(korc,cn)
kcju=zeros(cn);
for i=1:cn-1
kcju(i,i)=korc(i)+korc(i+1);
kcju(i.i+1)=-korc(i+1);
kcju(i+1,i)=-korc(i+1);
end
kcju(cn,cn)=korc(cn) |