Driven and Damped Oscillator

Alexei Gilchrist

The solution to a damped oscillator with a periodic driving force is derived.

1 Introduction

In a different node we examined a damped harmonic oscillator (damped-harmonic-oscillator), here we look at what happens when we drive the damped oscillator with a sinusoid force. The equation of motion for the system is becomes

\[\begin{equation*}\ddot{x} + \gamma \dot{x} + \omega_0^2 x = f_0\cos(\omega_f t),\end{equation*}\]
where \(\omega_f\) is the driving angular frequency, \(\omega_0\) is the angular frequency of the undamped oscillator by itself, and \(\gamma\) is the viscous damping rate.

2 Derivation of the solution

Formally, the general solution to this type of equation is the sum of two terms, \(x(t) = x_c(t) + x_p(t)\). The first term, \(x_c(t)\) is the general solution of the homogeneous equation (where \(f_0=0\)), also know as the complementary equation, and for which we already know the solution! That is,

\[\begin{equation*}x_c(t) = A e^{-\frac{\gamma}{2} t} \cos(\omega_d t+\phi)\end{equation*}\]
where \(\omega_d = \sqrt{\omega_0^2-\gamma^2/4}\).

We will again focus exclusively on the under-damped case. The second term, \(x_p(t)\), is any solution to the full equation, and is called the particular solution.

There are several methods to find the particular solution to a linear differential equations but none of them guarantee success. In our case, it is easily found by the method of undetermined coefficients—which, really, is just an educated guess. We look at the form of the inhomogeneity and use it to guess the possible forms in the solution, multiplying each one by a coefficient to be determined later. Since the the RHS of the equation has a \(\cos( \cdot)\) term and we are differentiating on the LHS, a good guess for the solution would be one containing \(\cos(\cdot)\) and \(\sin(\cdot)\) terms, since up to signs, differentiation turns \(\cos(\cdot)\) into \(\sin(\cdot)\) and vice versa. We postulate then

\[\begin{equation*}x_p(t) = A \cos(\omega_f t) + B \sin(\omega_f t).\end{equation*}\]

Now throw this into the LHS of the equation and we get:

\[\begin{equation*}A \omega_0^2 \cos(\omega_f t)-A \omega_f^2 \cos(\omega_f t)+ B \omega_0^2 \sin(\omega_f t)-B \omega_f^2 \sin(\omega_f t) -A \gamma \omega_f \sin(\omega_f t)+B \gamma \omega_f \cos(\omega_f t)\end{equation*}\]
Comparing terms with those on the RHS we see
\[\begin{gather*}-A\gamma \omega_f+B(\omega_0^2-\omega_f^2) = 0 \\ B\gamma \omega_f+A(\omega_0^2-\omega_f^2) = f_0\end{gather*}\]
We have two unknowns and two equations so we can solve for the coefficients \(A\) and \(B\):
\[\begin{equation*}A = \frac{f_0(\omega_0^2-\omega_f^2)}{\gamma^2\omega_f^2+(\omega_0^2-\omega_f^2)^2} \qquad B = \frac{\gamma f_0\omega_f}{\gamma^2\omega_f^2+(\omega_0^2-\omega_f^2)^2}\end{equation*}\]
So now we know our guess works, provided we choose the coefficients as above. i.e.
\[\begin{equation}\label{eq:xpalmost} x_p(t) = \frac{f_0}{\gamma^2\omega_f^2+(\omega_0^2-\omega_f^2)^2} \left[(\omega_0^2-\omega_f^2)\cos(\omega_f t) + \gamma \omega_f\cos(\omega_f t - \pi/2)\right]\end{equation}\]
where we have used \(\sin(\theta)=\cos(\theta-\pi/2)\) in the last expression. We can simplify this expression further by considering the last two terms as the \(x\)-components of a vector \(\mathbf{a}\) with magnitude \(\omega_0^2-\omega_f^2\), and a vector \(\mathbf{b}\) with magnitude \(\gamma\omega_f\). Referring to the diagram below, it’s immediately clear that the sum can be thought of as the \(x\)-components of the resulting vector \(\mathbf{R}\) so that
\[\begin{equation*}R^2 = a^2 + b^2 = \gamma^2\omega_f^2+(\omega_0^2-\omega_f^2)^2\end{equation*}\]
and
\[\begin{equation*}\phi_p = \tan^{-1}\left(\frac{-\gamma\omega_f}{\omega_0^2-\omega_f^2}\right).\end{equation*}\]

Simplifying diagram for the solution \(x_p(t)\). See text for details.

Note: we have written \(-\phi_p\) in the diagram instead of \(\phi_p\) so that the final expression is an addition inside the cosine but we have to be careful to remember which trigonometric quadrant we are in to plot this function correctly.

Combining with the factor at the beginning of \eqref{eq:xpalmost} we finally get the particular solution in a nice form:

\[\begin{align*}x_p(t) &= A_p\cos(\omega_f t + \phi_p) \\ A_p &= \frac{f_0}{\sqrt{(\omega_0^2-\omega_f^2)^2+\gamma^2\omega_f^2}} \\ \phi_p &= \tan^{-1}\left(\frac{-\gamma\omega_f}{\omega_0^2-\omega_f^2}\right).\end{align*}\]

Summarising, the full solution is

\[\begin{equation*}x(t) = x_c(t) + x_p(t) = A e^{-\frac{\gamma}{2} t} \cos(\omega_d t+\phi) + A_p\cos(\omega_f t + \phi_p).\end{equation*}\]
We can see that this solution will have two regimes—a short time solution called the transient regime where both terms interact, and a long time solution called the steady state regime which is dominated by \(x_p(t)\).

The damped oscillator has two regimes, an initial transient regime and then a steady state regime dominated by \(x_p(t)\).

3 The transient regime

On short timescales the solution is a combination of the damped solution and of the driving term and can get quite complicated, for example exhibiting beats if the damped frequency \(\omega_d\) is close to the driving frequency \(\omega_f\). This regime is called the transient regime. Two examples are given below with dashed lines indicating the decay envelope of the complementary solution.

Examples of the solution in the transient regime. Notice the beat phenomena from the superposition of the term at \(\omega_d\) and \(\omega_f\).

4 The steady state regime

On long enough time scales, the \(x_c(t)\) term decays away due to the \(e^{-\gamma/2\; t}\) factor, leaving the solution to be dominated by the \(x_p(t)\) term. This also means the system `forgets’ any initial conditions and is completely determined by the driving and damping parameters. This long-time limit is called the steady state regime.

One of the key features of the steady state regime is resonance. We will examine this in more detail in a different article. In the meantime here is a simulation of the solution for you to explore:

Click figure to download the CDF demo.
The full solution for the driven and damped oscillator.
© Copyright 2022 Alexei Gilchrist