Forced Oscillations and Resonance
Push a swing at the right moments and it goes higher and higher. A periodic force acting on a spring system can build up enormous amplitudes when its frequency matches the system's natural frequency. This lesson solves
and explains beats, resonance and the frequency response curve.
Undamped forcing: beats
With and , undetermined coefficients gives
Starting from rest, , the solution is
When is close to , a fast oscillation is modulated by a slow envelope: beats, which musicians hear when tuning two strings that are almost in tune.
Pure resonance
If the guess collides with the homogeneous solution, and the modification rule gives
The amplitude grows linearly without bound. Real systems either have damping or break.
import numpy as np
from scipy.integrate import solve_ivp
m, k, F0 = 1.0, 4.0, 1.0 # omega_0 = 2
for w in (1.0, 1.9, 2.0):
sol = solve_ivp(lambda t, Y: [Y[1], (F0 * np.cos(w * t) - k * Y[0]) / m], (0, 60), [0.0, 0.0],
max_step=0.01, rtol=1e-9, atol=1e-12)
print(f"omega = {w}: max |x| on [0, 60] = {np.max(np.abs(sol.y[0])):.3f}")
print("resonance envelope at t = 60:", 60 * F0 / (2 * m * 2))omega = 1.0: max |x| on [0, 60] = 0.667
omega = 1.9: max |x| on [0, 60] = 5.128
omega = 2.0: max |x| on [0, 60] = 14.727
resonance envelope at t = 60: 15.0
Damped forcing: transient and steady state
With the homogeneous part decays (it is the transient), and what remains is the steady-state solution
The amplitude is the frequency response. For small damping it has a sharp peak near (practical resonance), at when .
import numpy as np
m, k, F0 = 1.0, 4.0, 1.0
C = lambda w, c: F0 / np.sqrt(m**2 * (k / m - w**2)**2 + c**2 * w**2)
for c in (0.2, 1.0, 3.0):
ws = np.linspace(0.01, 4, 40000)
amps = C(ws, c)
i = np.argmax(amps)
print(f"c = {c}: peak amplitude {amps[i]:.3f} at omega = {ws[i]:.3f} (static response {F0 / k})")c = 0.2: peak amplitude 2.503 at omega = 1.995 (static response 0.25)
c = 1.0: peak amplitude 0.516 at omega = 1.871 (static response 0.25)
c = 3.0: peak amplitude 0.250 at omega = 0.010 (static response 0.25)
With little damping the peak is ten times the static deflection ; with () there is no peak at all, and the largest response is at .
In software
- Vibration analysis software computes frequency response curves to keep machinery and buildings away from resonance; the Tacoma Narrows and Millennium Bridge stories are the cautionary tales.
- In game physics, stiff springs driven at the frame rate can resonate numerically; engines add damping or use implicit integrators to avoid "exploding" ragdolls.
- Audio equalisers and resonant filters deliberately shape .
Exercises
Exercise 1: Steady-state amplitude
For (undamped, ), find the particular solution.
Answer
.
Solution
.
Exercise 2: Resonance
For , , write the solution. How large is the amplitude at ?
Answer
; amplitude 10 at .
Solution
. This already satisfies and , so no homogeneous part is needed.
Exercise 3: Frequency response (code)
For , , and , compute at , 1 and 2.
Answer
About 1.330, 10 and 0.333.
Solution
At the first term vanishes and .
import numpy as np
C = lambda w: 1 / np.sqrt((1 - w**2)**2 + (0.1 * w)**2)
print([round(float(C(w)), 3) for w in (0.5, 1.0, 2.0)])[1.33, 10.0, 0.333]
Test yourself
Pure resonance in happens when…
In a damped forced system, the transient is…
- the part that grows
- the homogeneous solution, which decays
- the steady-state solution
- the forcing term
Beats occur when…
- damping is large
- the forcing frequency is close to but not equal to the natural frequency
- there is no forcing
- the system is overdamped