马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
function ff=Laplace_single('ff',M,K,C,T,x0,dx0)
%laplace transforms to solve single solution of vibration system
%this method can find the response of a system under any type of excitation,inlucding the harmonic and periodic types
%this method canbe uesed for the efficient solution of linear differential
%equations.particularlly those with constand coefficients. the fllowing
%steps are necessary
%1:write the eqution of the motion of system
%2;transform each term of the equation ,using know intinial conditions
%3:solve for the transformed response of system
%4;obtain the desired solution by using inverse laplace transformation
%note: (1) ddx(t)=s^2*x(s)-s*x0-dx0;dx(t)=s*x(s)-x0
% (2) ilaplace(1/(s^2+2*e*wn*s+wn^2))=exp(-e*wn*t)*sin(wd*t)/wd
if nargin<5;T=10;x0=0;dx0=0;end
if nargin<6;x0=0;dx0=0;end
T=0:0.01:T;
syms s t
%M=30;K=20;w=0;F0=0;C=10; x0=0.4;dx0=0.6;T=0:0.01:20;f=F0*sin(w*t);
Fs=laplace(f);
wn=sqrt(K/M); e=C/(2*sqrt(K*M));
a=1/(M*(s^2+2*e*wn*s+wn^2));b=(s+2*e*wn)/(s^2+2*e*wn*s+wn^2);c=1/(s^2+2*e*wn*s+wn^2);
Xs=Fs*a+b*x0+c*dx0;
xt=ilaplace(Xs);
xt=subs(xt,t,T);
figure(3)
plot(T,xt,'r');grid on;title('laplace single response')
end
|