Mechanical Vibrations
A mass on a spring with friction is the model problem for everything that oscillates: car suspensions, buildings in earthquakes, a guitar string, a camera that follows a player smoothly. Newton's second law gives
with mass , damping coefficient , spring constant and external force . This lesson studies free vibrations (); forced ones are in Forced Oscillations and Resonance.
Undamped motion
With : , where is the natural angular frequency. Solutions are : simple harmonic motion with period and frequency . A stiffer spring or a lighter mass oscillates faster.
Damped motion: three regimes
The characteristic equation has roots . The critical damping separates three cases:
| Case | Condition | Roots | Motion |
|---|---|---|---|
| Overdamped | two negative reals | returns slowly, no oscillation | |
| Critically damped | double root | fastest return without overshoot | |
| Underdamped | decaying oscillation with |
Engineers often use the damping ratio : underdamped, critical, overdamped.
import numpy as np
from scipy.integrate import solve_ivp
m, k = 1.0, 4.0 # omega_0 = 2, critical damping c = 4
t_eval = np.array([0.5, 1.0, 2.0, 3.0])
for c in (1.0, 4.0, 10.0):
sol = solve_ivp(lambda t, Y: [Y[1], -(c * Y[1] + k * Y[0]) / m], (0, 3), [1.0, 0.0],
t_eval=t_eval, rtol=1e-10, atol=1e-12)
zeta = c / (2 * np.sqrt(m * k))
print(f"c = {c:4}: zeta = {zeta:.2f} x =", np.round(sol.y[0], 4))c = 1.0: zeta = 0.25 x = [ 0.6071 -0.0706 -0.3372 0.1723]
c = 4.0: zeta = 1.00 x = [0.7358 0.406 0.0916 0.0174]
c = 10.0: zeta = 2.50 x = [0.8482 0.6887 0.4537 0.2989]
The underdamped mass () overshoots below zero; the critically damped one is closest to 0 at ; the overdamped one creeps back.
Energy
For the undamped spring, the total energy is constant (differentiate it and use the equation). With damping, : friction removes energy. This energy argument is the prototype of the stability methods in Conservative Systems and the Pendulum.
import numpy as np
from scipy.integrate import solve_ivp
m, k = 1.0, 4.0
E = lambda x, v: 0.5 * m * v**2 + 0.5 * k * x**2
for c in (0.0, 0.5):
sol = solve_ivp(lambda t, Y: [Y[1], -(c * Y[1] + k * Y[0]) / m], (0, 10), [1.0, 0.0],
t_eval=[0, 5, 10], rtol=1e-10, atol=1e-12)
print(f"c = {c}: energy at t = 0, 5, 10:", np.round(E(sol.y[0], sol.y[1]), 6))c = 0.0: energy at t = 0, 5, 10: [2. 2. 2.]
c = 0.5: energy at t = 0, 5, 10: [2. 0.182686 0.015329]
In software
- Game engines and UI frameworks implement "springs" with exactly these parameters. A critically damped spring is the standard way to make a camera follow a target smoothly; Unity's
SmoothDampand many tweening libraries are built on it. - Car suspension design, earthquake engineering and hard-disk head positioning choose deliberately: around 0.7 is a common compromise between speed and overshoot.
Exercises
Exercise 1: Period
A 0.5 kg mass hangs on a spring with N/m. Find and the period.
Answer
rad/s, period s.
Solution
and .
Exercise 2: Critical damping
For and , what damping is critical? Write the critically damped solution with , .
Answer
; .
Solution
. The double root is , so with and .
Exercise 3: Damped frequency (code)
For , compute the damped angular frequency and the ratio between successive maxima (the decay per period).
Answer
; ratio .
Solution
The roots are . Successive maxima are one period apart, and the envelope shrinks by over it.
import numpy as np
w1 = np.sqrt(9 - 0.3**2)
print(round(w1, 4), round(np.exp(-0.3 * 2 * np.pi / w1), 4))2.985 0.5318
Test yourself
The natural angular frequency of is…
A system with damping ratio is…
- undamped
- underdamped
- critically damped
- overdamped
Which regime oscillates?
- Overdamped
- Critically damped
- Underdamped
- None of them