TExcelTAD
Home › Differential Equations › Coupled Oscillators and Normal Modes

Coupled Oscillators and Normal Modes

Two masses connected by springs move in a complicated way, but every motion is a superposition of a few simple ones, the normal modes, in which all masses oscillate at the same frequency. Finding them is an eigenvalue problem, and it is how engineers analyse vibrating structures and how chemists compute molecular vibrations.

Second-order systems

Newton's law for several masses gives Mx′′=−KxM\mathbf{x}'' = -K\mathbf{x} with a diagonal mass matrix MM and a symmetric stiffness matrix KK. With unit masses, or after dividing, this is

x′′=Ax.\mathbf{x}'' = A\mathbf{x}.

We could rewrite it as a first-order system of twice the size, but there is a shortcut: guess x=vcos⁡(ωt)\mathbf{x} = \mathbf{v}\cos(\omega t). Then −ω2v=Av-\omega^2\mathbf{v} = A\mathbf{v}, so −ω2-\omega^2 must be an eigenvalue of AA. For a stable spring system all eigenvalues of AA are negative, λi=−ωi2\lambda_i = -\omega_i^2, and the general solution is

x(t)=∑ivi(aicos⁡ωit+bisin⁡ωit).\mathbf{x}(t) = \sum_i \mathbf{v}_i\left(a_i\cos\omega_it + b_i\sin\omega_it\right).

Two masses, three springs

Masses m=1m = 1 between two walls, all springs with constant k=1k = 1:

x1′′=−2x1+x2,x2′′=x1−2x2,A=[−211−2].x_1'' = -2x_1 + x_2, \qquad x_2'' = x_1 - 2x_2, \qquad A = \begin{bmatrix} -2 & 1 \\ 1 & -2 \end{bmatrix}.

Eigenvalues −1-1 and −3-3:

  • ω1=1\omega_1 = 1, v1=(1,1)\mathbf{v}_1 = (1, 1): the masses move together, the middle spring is never stretched.
  • ω2=3\omega_2 = \sqrt{3}, v2=(1,−1)\mathbf{v}_2 = (1, -1): they move against each other, faster.
python · try it yourself
import numpy as np

A = np.array([[-2.0, 1.0], [1.0, -2.0]])
lam, V = np.linalg.eigh(A)              # symmetric: eigh gives orthonormal eigenvectors
for l, v in zip(lam, V.T):
    print(f"lambda = {l:.4f}, omega = {np.sqrt(-l):.4f}, mode shape {np.round(v / v[0], 4)}")
lambda = -3.0000, omega = 1.7321, mode shape [ 1. -1.]
lambda = -1.0000, omega = 1.0000, mode shape [1. 1.]

Energy exchange: beats between masses

Pull only mass 1 aside and release: x(0)=(1,0)=12v1+12v2\mathbf{x}(0) = (1, 0) = \frac{1}{2}\mathbf{v}_1 + \frac{1}{2}\mathbf{v}_2. Then

x1=12(cos⁡t+cos⁡3t),x2=12(cos⁡t−cos⁡3t).x_1 = \tfrac{1}{2}(\cos t + \cos\sqrt{3}t), \qquad x_2 = \tfrac{1}{2}(\cos t - \cos\sqrt{3}t).

With a weak middle spring the two frequencies are close, and the energy sloshes from one mass to the other and back, like two coupled pendulums. Mass 1 has handed almost all of its motion to mass 2 after about π/(ω2−ω1)≈64\pi/(\omega_2 - \omega_1) \approx 64 time units.

python · try it yourself
import numpy as np

k_c = 0.05                                 # weak coupling spring
A = np.array([[-(1 + k_c), k_c], [k_c, -(1 + k_c)]])
lam, V = np.linalg.eigh(A)
w = np.sqrt(-lam)
coef = np.linalg.solve(V, [1.0, 0.0])      # amplitudes of the two modes
x = lambda t: V @ (coef * np.cos(w * t))
print("frequencies:", np.round(w, 4), " transfer time pi/(w2 - w1) =", round(np.pi / abs(w[1] - w[0]), 2))
for t in (0, 15, 30, 45, 60):
    print(f"t = {t:2d}: x1 = {x(t)[0]: .3f}, x2 = {x(t)[1]: .3f}")
frequencies: [1.0488 1.    ]  transfer time pi/(w2 - w1) = 64.37
t =  0: x1 =  1.000, x2 =  0.000
t = 15: x1 = -0.880, x2 =  0.120
t = 30: x1 =  0.577, x2 = -0.422
t = 45: x1 = -0.236, x2 =  0.761
t = 60: x1 =  0.021, x2 = -0.974

Damping and forcing

With damping, Mx′′+Cx′+Kx=F(t)M\mathbf{x}'' + C\mathbf{x}' + K\mathbf{x} = \mathbf{F}(t). For "proportional" damping the modes stay the same and each one is an independent damped oscillator. Forcing near any ωi\omega_i excites that mode resonantly, which is why a structure has several dangerous frequencies, not one.

In software

  • Finite element packages compute the lowest normal modes of bridges, aircraft wings and engine mounts with sparse eigensolvers (scipy.sparse.linalg.eigsh uses the same Lanczos algorithm family).
  • Physics-based animation of cloth and soft bodies uses "modal dynamics": simulate only a few low modes for real-time performance.
  • In chemistry, the normal modes of a molecule's Hessian give its infrared spectrum.

Exercises

Exercise 1: Mode frequencies

For x1′′=−3x1+x2x_1'' = -3x_1 + x_2, x2′′=x1−3x2x_2'' = x_1 - 3x_2, find the normal mode frequencies and shapes.

Answer

ω=2\omega = \sqrt{2} with (1,1)(1, 1) and ω=2\omega = 2 with (1,−1)(1, -1).

Solution

A=[−311−3]A = \begin{bmatrix} -3 & 1 \\ 1 & -3 \end{bmatrix} has eigenvalues −3±1-3 \pm 1, i.e. −2-2 (vector (1,1)(1, 1)) and −4-4 (vector (1,−1)(1, -1)). Frequencies are 2\sqrt{2} and 22.

Exercise 2: Pure mode

In the lesson's two-mass system, which initial displacement (released from rest) produces motion at the single frequency 3\sqrt{3}?

Answer

Any multiple of (1,−1)(1, -1), e.g. x1=0.5x_1 = 0.5, x2=−0.5x_2 = -0.5.

Solution

Starting in the mode shape v2\mathbf{v}_2 with zero velocity gives x=c v2cos⁡3t\mathbf{x} = c\,\mathbf{v}_2\cos\sqrt{3}t, no v1\mathbf{v}_1 component.

Exercise 3: Three masses (code)

Three unit masses between walls, four unit springs. Find the three frequencies.

Answer

ω=2−2,2,2+2≈0.7654,1.4142,1.8478\omega = \sqrt{2 - \sqrt{2}}, \sqrt{2}, \sqrt{2 + \sqrt{2}} \approx 0.7654, 1.4142, 1.8478.

Solution

AA is tridiagonal with −2-2 on the diagonal and 1 next to it; its eigenvalues are −2+2cos⁡jπ4-2 + 2\cos\frac{j\pi}{4} for j=1,2,3j = 1, 2, 3.

python · try it yourself
import numpy as np
A = -2 * np.eye(3) + np.eye(3, k=1) + np.eye(3, k=-1)
print(np.round(np.sqrt(-np.linalg.eigvalsh(A))[::-1], 4))
[0.7654 1.4142 1.8478]

Test yourself

For x′′=Ax\mathbf{x}'' = A\mathbf{x}, the normal mode frequencies are…

  1. the eigenvalues of AA
  2. −λi\sqrt{-\lambda_i} for the eigenvalues λi\lambda_i of AA
  3. the diagonal entries of AA
  4. always 1

In the in-phase mode (1,1)(1, 1) of two equal masses between walls, the middle spring…

  1. is stretched the most
  2. is never stretched
  3. breaks
  4. has double frequency

Weakly coupled identical oscillators exchange energy slowly because…

  1. their mode frequencies are close, producing beats
  2. they are damped
  3. their mode shapes are equal
  4. energy is not conserved