logo

Damped Harmonic Oscillation 📂Classical Mechanics

Damped Harmonic Oscillation

Damped Harmonic Oscillation1

Damping_fps30.gif

When the spring constant is denoted as $k$, the equation of motion for a simple harmonic oscillator is as follows.

$$ m \ddot {x}+kx=0 $$

The simple harmonic motion only considers the restoring force by the spring. However, in reality, other external forces such as frictional forces also affect the motion of the object, so they cannot be ignored. So, let’s assume there is a frictional force that acts proportional to the speed. This force is called a retarding force. The motion of an oscillator with this retarding force at play is referred to as damped harmonic oscillation. Specific examples include air resistance. If the retarding force is as follows, $-c\dot{x}$, then the equation of motion is as described below.

$$ \begin{align*} && m \ddot{x} +c \dot{x} +kx&=0 \\ \implies && \ddot{x} +\frac{c}{m} \dot{x} +\frac{k}{m}x&=0 \end{align*} $$

Here, let’s substitute with ${\omega_{0}}^{2}=\frac{k}{m}$, and let it be $\gamma = \frac{c}{2m}$. At this point, consider $\omega_{0}$ as the natural angular frequency, and $\gamma $ as the damping factor. Hence, the equation of motion can be written as below.

$$ \ddot{x} + 2\gamma \dot{x} + {\omega_{0}} ^{2} x=0 $$

This kind of differential equation can easily be solved using the differential operator $D:=\frac{ d }{ d t}$. Applying the differential operator to the above equation of motion yields the following.

$$ \begin{align*} && D^{2}x + 2\gamma D x + {\omega_{0}} ^{2} x &=0 \\ \implies && \left( D^{2} +2\gamma D + {\omega_{0}} ^{2} \right)x &=0 \end{align*} $$

Therefore, one needs to solve $D^{2}+2\gamma D +{\omega_{0}}^{2}=0$. The solution to this equation is provided below, according to the quadratic formula.

$$ D=-\gamma \pm \sqrt{\gamma ^{2} -{\omega_{0}} ^{2} } $$

Thus,

$$ Dx = \left( -\gamma \pm \sqrt{\gamma ^{2} -{\omega_{0}} ^{2}} \right)x $$

This is a simple first-order differential equation, so the solution can be obtained as follows.

$$ \begin{equation} x(t)=Ae^{(-\gamma + \sqrt{\gamma ^{2} -{\omega_{0}}^{2}})t }+Be^{(-\gamma - \sqrt{\gamma ^{2} -{\omega_{0}}^{2}})t } \label{eq1} \end{equation} $$

In this equation, $A$, $B$ are constants. Since the exponent includes a root, the graph of the above formula varies depending on the value of $\gamma ^{2}-{\omega_{0}}^{2}$.

untitled.png

Overdamping

$$ \gamma ^{2} - {\omega_{0}}^{2}>0 $$

When a mass attached to a spring is pulled from its equilibrium position and then released, it returns to the equilibrium point but does not oscillate as the damping force is strong, as shown in the picture above.

Critical Damping

$$ {\gamma} ^{2} -{\omega_{0}}^{2}=0 $$

In this case, the two solutions of $\eqref{eq1}$ are the same. Thus, the second solution needs to be found and is known as follows.

$$ x(t)=Ae^{-\gamma t} +Bte^{-\gamma t} $$

Like the overdamping, there are no oscillations, but it reaches the vicinity of the equilibrium point at a much faster speed compared to overdamping.

Underdamping

$$ \gamma^{2} -{\omega_{0}}^{2} <0 $$

For simplicity, let’s denote $i\omega_{d}=\sqrt{\gamma^{2} - {\omega_{0}} ^{2}}$ as d, taken from the first letter of damped. Then, the equation of motion is as follows.

$$ x(t) = e^{-\gamma t}\left( A e^{i\omega_{d}t} + Be^{-i\omega_{d}t} \right) $$

The position $x$ must be real, so it must satisfy $x^{\ast}(t)=x(t)$. $^{\ast}$ means conjugate complex numbers. From this, the following condition is derived.

$$ Ae^{i\omega_{d}t}+Be^{-i\omega_{d}t}=A^{\ast}e^{-i\omega_{d}t}+B^{\ast}e^{i\omega_{d}t} \implies B=A^{\ast} $$

Therefore, the equation of motion is as follows.

$$ x(t) = e^{-\gamma t}\left( A e^{i\omega_{d}t} + A^{\ast}e^{-i\omega_{d}t} \right) $$

And if we denote as $A=a+ib$, the following equation holds.

$$ x(t) = e^{-\gamma t}\left[ a\left( e^{i\omega_{d}t}+e^{-i\omega_{d}t}\right) + ib\left( e^{i\omega_{d}t}-e^{-i\omega_{d}t}\right) \right] $$

Applying Euler’s formula yields the following.

$$ x(t) = e^{-\gamma t}\left[ 2a\cos (\omega_{d}t)-2b\sin (\omega_{d}t) \right] $$

Then, according to the sum and difference identities for some real numbers $A$, $\phi_{0}$, the following holds.

$$ x(t)=e^{-\gamma t}A \cos(\omega_{d}t+\phi_{0}) $$

Due to $e^{-\gamma t}$, while the amplitude decreases exponentially, it includes $\cos$, hence oscillates unlike the first two cases.

Simulation

Depending on the difference in the frequency and the damping factor, a damped harmonic oscillator can be categorized into overdamped, critically damped, and underdamped situations. Being able to visually observe how an oscillator moves in each of these situations greatly aids in understanding. With Julia, not only can one easily graph these situations, but it’s also simple to create and save them as gif files. Below is the code to create and save damped harmonic oscillator animations, along with the actual execution screen.

Honeycam2020-11-1214-59-55.gif

using Plots

O_γ=3
O_ω=1
function Overdamping(x)
    0.5exp((-O_γ+sqrt(O_γ^2-O_ω^2))*x)+0.5exp((-O_γ-sqrt(O_γ^2-O_ω^2))*x)
end

C_γ=1
C_ω=1
function Criticaldamping(x)
    exp(-C_γ*x)+x*exp(-C_γ*x)
end

U_γ=1
U_γ=U_γ^2
U_ω=5
U_ω=U_ω^2
function Underdamping(x)
    real(exp.(-U_γ*x).*cos.(1im*sqrt(Complex(U_γ-U_ω))*x))
end

p = plot([Overdamping, Criticaldamping, Underdamping], zeros(0),label=["Overdamping" "Criticaldamping" "Underdamping"], xlim=(0,15), ylim=(-0.7,1.2))
anim = Animation()
for x = range(0, stop=15, length = 200)
    push!(p, x, Float64[Overdamping(x), Criticaldamping(x), Underdamping(x)])
    frame(anim)
end
gif(anim,"Damping_fps30.gif",fps=30)

See Also


  1. Grant R. Fowles and George L. Cassiday, Analytical Mechanics (7th Edition, 2005), p96-100 ↩︎