阻尼谐波振荡器的物理学
该示例通过在没有驱动力的情况下求解运动方程来探索阻尼谐波振荡器的物理。该示例调查了不足,过度和严重阻尼的案例。
Contents
衍生运动方程
求解运动方程(F = 0)
失业案件( )
过度阻尼案件( )
Critically Damped Case ( )
Conclusion
1。衍生运动方程
Consider a forced harmonic oscillator with damping shown below. Model the resistance force as proportional to the speed with which the oscillator moves.
Define the equation of motion where
是质量
一世s the damping coefficient
是弹簧常数
是驱动力
符号x(t)mCkf(t)eq = m*diff(x,t,t) + c*diff(x,t) + k*x == f
eq(t)=
Rewrite the equation using and 。
符号伽玛omega_0eq = subs(eq, [c k], [m*gamma, m*omega_0^2])
eq(t)=
划分质量 。Now we have the equation in a convenient form to analyze.
eq = collect(eq, m)/m
eq(t)=
2。Solve the Equation of Motion where F = 0
使用dsolve
如果没有外力的情况
。使用单位位移的初始条件和零速度。
vel = diff(x,t);cond = [x(0)== 1,vel(0)== 0];eq = subs(eq,f,0);sol = dsolve(eq,cond)
sol =
Examine how to simplify the solution by expanding it.
sol = expand(sol)
sol =
请注意,每个学期都有一个因素
, 或者
,,,,useCollect
收集这些条款
sol = collect(sol,exp(-gamma*t/2))
sol =
The term 出现在解决方案的各个部分中。通过引入阻尼比以更简单的形式重写它 。
将ζ替换为上述术语给出:
符号Zeta;sol = subs(sol,...sqrt(gamma^2 - 4*omega_0^2),...2*omega_0*sqrt(zeta^2-1))
sol =
通过替换进一步简化解决方案 按照 and ,,,,
sol = subs(sol,gamma,2*zeta*omega_0)
sol =
We have derived the general solution for the motion of the damped harmonic oscillator with no driving forces. Next, we'll explore three special cases of the damping ratio 运动采用更简单的形式。这些情况被称为
失业不足 ,,,,
过度阻尼 ,,,,and
严重抑制 。
3. Underdamped Case ( )
If , 然后 纯粹是虚构的
solunder = subs(sol,sqrt(zeta^2-1),1i*sqrt(1-zeta^2))
solunder =
Notice the terms 在上面的方程式中并回忆身份
Rewrite the solution in terms of 。
solunder =系数(Solunder,Zeta);solunder = solunder(1);c = exp(-omega_0 * zeta * t);solunder = c *重写(solunder / c,'cos')
solunder =
Solunder(T,Omega_0,Zeta)= Solunder
Solunder(T,Omega_0,Zeta)=
该系统以固有频率的振荡 and decays at an exponential rate of 。
Plot the solution withfplot
的函数
and
。
z = [0 1/4 1/2 3/4];w = 1;t = 4*pi;linestyle = {' - ',,,,“——”,,,,':k',,,,' - 。'};fplot(@(t)solunder(t,w,z(1)),[0 t],linestyle {1});抓住on;为了k = 2:numel(z)fplot(@(t)solunder(t,w,z(k)),[0 t],linestyle {k});结尾抓住off;网格on;Xticks(t*linspace(0,1,5));Xticklabels({'0',,,,'\ pi',,,,'2\pi',,,,'3\pi',,,,'4 \ pi'});Xlabel('t / \ omega_0');ylabel('振幅');lgd =传奇('0',,,,'1/4',,,,'1/2',,,,'3/4');t一世tle(lgd,'\ zeta');t一世tle('Underdamped');
4.过度阻尼案件( )
If , 然后 纯粹是真实的,可以将解决方案重写为
Solover =sol
Solover =
Solover =Coeffs(solOver, zeta); solOver = solOver(1)
Solover =
Notice the terms 并回想身份 。
Rewrite the expression in terms of 。
c = exp(-omega_0*t*zeta);solover = c*重写(solover / c,'cosh')
Solover =
Solover(T,Omega_0,Zeta)=solOver
Solover(T,Omega_0,Zeta)=
绘制解决方案,以查看其衰减而不会振荡。
z = 1 + [1/4 1/2 3/4 1]; w = 1; T = 4*pi; lineStyle = {' - ',,,,“——”,,,,':k',,,,' - 。'};fplot(@(t)solOver(t, w, z(1)), [0 T], lineStyle{1}); holdon;为了k = 2:numel(z)fplot(@(t)solover(t,w,z(k)),[0 t],linestyle {k});结尾抓住off;网格on;Xticks(t*linspace(0,1,5));Xticklabels({'0',,,,'\ pi',,,,'2\pi',,,,'3\pi',,,,'4 \ pi'});Xlabel('\omega_0 t');ylabel('振幅');lgd =传奇('1+1/4',,,,'1+1/2',,,,'1+3/4',,,,'2');t一世tle(lgd,'\ zeta');t一世tle('Overdamped');
5. Critically Damped Case ( )
If , 然后the solution simplifies to
解决方案(T,Omega_0)=limit(sol, zeta, 1)
解决方案(T,Omega_0)=
绘制批判性阻尼情况的解决方案。
w = 1;t = 4*pi;fplot(solicitical(t,w),[0 t])xlabel('\omega_0 t');ylabel('x');t一世tle('批判性抑制作用,\ zeta = 1');网格on;Xticks(t*linspace(0,1,5));Xticklabels({'0',,,,'\ pi',,,,'2\pi',,,,'3\pi',,,,'4 \ pi'});
6. Conclusion
We have examined the different damping states for the harmonic oscillator by solving the ODEs which represents its motion using the damping ratio 。将所有三个案例绘制在一起以比较和对比。
zover = pi;zunder = 1/zover;w = 1;t = 2*pi;linestyle = {' - ',,,,“——”,,,,':k'};fplot(@(t)solover(t,w,zover),[0 t],linestyle {1},'行宽',,,,2);抓住on;fplot(solicitical(t,w),[0 t],linestyle {2},'行宽',2)fplot(@(t)solunder(t,w,zunder),[0 t],linestyle {3},'行宽',,,,2);抓住off;teXtColor = lines(3); text(3*pi/2, 0.3 ,'over-damped',,,,'Color',,,,teXtColor(1,:)); text(pi*3/4, 0.05,'critically-damped',,,,'Color',,,,teXtColor(2,:)); text(pi/8 , -0.1,'under-damped');网格on;Xlabel('\omega_0 t');ylabel('振幅');Xticks(t*linspace(0,1,5));Xticklabels({'0',,,,'\ pi/2',,,,'\ pi',,,,'3\pi/2',,,,'2\pi'});yticks((1/exp(1))*[-1 0 1 2 exp(1)]);yticklabels({'-1/e',,,,'0',,,,'1/e',,,,'2/e',,,,'1'});lgd =传奇('\ pi',,,,'1',,,,'1/\ pi');t一世tle(lgd,'\ zeta');t一世tle('Damped Harmonic Oscillator');