弹簧-阻尼二阶系统:
参考教材:《Leonard Meirovitch__Fundamental_of_Vibration》
临界阻尼:
过阻尼:
临界阻尼:
二阶系统三种情况的x和v的表达式
代码:
%% 二阶系统三种情况的x和v的表达式
clc;clear;
%参数
wn=50;
x0=5;
v0=5;
dx0=10;
t=0:0.001:5;
%% 欠阻尼
kesai=0.1;
wd=wn*(1-kesai^2)^0.5;
%位移
x1=exp(-kesai*wn*t).*((kesai*wn*x0 + v0)/wd*sin(wd*t) + x0*cos(wd*t));
%速度
k1= kesai*wn;
a1=x0;
a2=(kesai*wn*x0 + v0)/wd;
dx1=exp(-k1*t) .* ((wd*a2 - a1*k1).*cos(wd*t) - (k1*a2 + wd*a1).*sin(wd*t));
%画图
subplot(3,2,1)
plot(x1,dx1)
xlabel('x(m)')
ylabel('v(m/s)')
title('欠阻尼')
subplot(3,2,2)
plot(t,x1)
xlabel('t(s)')
ylabel('x(m)')
xlim([0 1])
title('欠阻尼')
%% 过阻尼
kesai=1.1;
wd=wn*(1-kesai^2)^0.5;
%位移
x2=exp(-kesai*wn*t).*((kesai*wn*x0 + v0)/wd*sinh(wd*t) + x0*cosh(wd*t));
%速度
k1= kesai*wn;
a1=x0;
a2=(kesai*wn*x0 + v0)/wd;
dx2=exp(-k1*t) .* ((wd*a2 - a1*k1).*cosh(wd*t) - (k1*a2 - wd*a1).*sinh(wd*t));
%画图
subplot(3,2,3)
plot(x2,dx2)
xlabel('x(m)')
ylabel('v(m/s)')
title('过阻尼')
subplot(3,2,4)
plot(t,x2)
xlabel('t(s)')
ylabel('x(m)')
xlim([0 1])
title('过阻尼')
%% 临界阻尼
kesai=1;
wd=wn*(1-kesai^2)^0.5;
%位移
x3=exp(-kesai*wn*t).*(x0 + (wn*x0 + v0).*t);
%速度
k1= kesai*wn;
a1=x0;
a2=(wn*x0 + v0);
dx3=exp(-k1*t) .* (-k1*a1+a2 - k1*a2*t);
%画图
subplot(3,2,5)
plot(x3,dx3)
xlabel('x(m)')
ylabel('v(m/s)')
title('临界阻尼')
subplot(3,2,6)
plot(t,x3)
xlabel('t(s)')
ylabel('x(m)')
xlim([0 1])
title('临界阻尼')
结果: