Laplace Transforms – Part 5: The Simple Harmonic Oscillator

In this post, the focus shifts from looking at the basic properties of the Laplace Transform to the application of it to dynamical systems of the form

\[ \frac{d}{dt} \bar S = A \bar S \; ,\]

where the matrix $$A$$ can be time-varying but does not depend on the state $$\bar S$$.

To be sure, some differential equations were already touched upon in passing in earlier posts, but this was done more as a way to motivate the possible transforms that would result and which would require a subsequent inverse rather than being examined in their own right.

As a prototype for multi-variable dynamical systems and a prelude to the general theory, this column will look at the application of the Laplace Transform in the simplest multi-variable structure – the simple harmonic oscillator (SHO). This tried and true system should always be the first one explored based on one simple fact – if the theory is not understandable or workable for this fundamental system then it won’t be understandable or workable for any other application.

The familiar state for the SHO is given by:

\[ \bar S = \left[ \begin{array}{c} x(t) \\ v(t) \end{array} \right] \; \]

and its corresponding equation of motion

\[ \frac{d}{dt} \left[ \begin{array}{c} x \\ v \end{array} \right] = \left[ \begin{array}{cc} 0 & 1 \\ -\omega_0^2 & 0 \end{array} \right] \left[ \begin{array}{c} x \\ v \end{array} \right] \; ,\]

where the matrix $$A$$ is given by

\[ A = \left[ \begin{array}{cc} 0 & 1 \\ -\omega_0^2 & 0 \end{array} \right] \; .\]

Taking the Laplace Transform of the oscillator’s equation of motion (using the properties established in earlier posts) yields

\[ \left[ \begin{array}{c} s X(s) – x_0 \\ s V(s) – v_0 \end{array} \right] = \left[ \begin{array}{cc} 0 & 1 \\ -\omega_0^2 & 0 \end{array} \right] \left[ \begin{array}{c} X(s) \\ V(s) \end{array} \right] \; .\]

Note that, as expected, the differential equation now becomes a (linear) algebraic equation.

Some basic re-arrangement leads to the following matrix equation

\[ (s Id – A) \left[ \begin{array}{c} X(s) \\ V(s) \end{array} \right] = \left[ \begin{array}{c} x_0 \\ v_0 \end{array} \right] \; ,\]

where $$Id$$ is the $$2×2$$ identity matrix.

The solution to this equation is obtained by finding the inverse of the matrix $$s Id – A$$.

\[ \left[ \begin{array}{c} X(s) \\ V(s) \end{array} \right] = (s Id – A)^{-1} \left[ \begin{array}{c} x_0 \\ v_0 \end{array} \right] \; .\]

It is convenient to define

\[ M = s Id – A = \left[ \begin{array}{cc} s & -1 \\ \omega_0^2 & s \end{array} \right] \; .\]

The inverse then follows from the usual formula for a $$2×2$$ matrix

\[ M^{-1} = \frac{1}{s^2 + \omega_0^2} \left[ \begin{array}{cc} s & 1 \\ -\omega_0^2 & s \end{array} \right] \; ,\]

where the pre-factor is $$1/det(M)$$.

Multiply the right-hand side out leads to the following expressions for $$X(s)$$

\[ X(s) = \frac{s x_0}{s^2 + \omega_0^2} + \frac{v_0}{s^2 + \omega_0^2} \; \]

and $$V(s)$$

\[ V(s) = -\frac{x_0 \omega_0^2 }{s^2 + \omega_0^2} + \frac{s v_0}{s^2 + \omega_0^2} \; .\]

The last piece is to take the inverse Laplace Transform of the individual components to get

\[ x(t) = x_0 \cos(\omega_0 t) + \frac{v_0}{\omega_0} \sin(\omega t) \; \]

and

\[ v(t) = -x_0 \omega_0 \sin(\omega_0 t) + v_0 \cos(\omega t) \; ,\]

which, happily, are the expected results.

Next week, I’ll begin my examination of the general theory use in controls engineering.