---
title: Mechanical oscillators
heading: The mass-spring-damper as the starting point of acoustics, natural frequency and quality factor, free decay, forced response through mechanical impedance, power at resonance, and the electrical analogs that let acoustic systems be drawn as circuits
eyebrow: S16 · Lesson 1 · Mechanical oscillators
xp: 50
---

::: hook
Every sound starts with something vibrating: a loudspeaker cone, a vocal fold, a guitar string, the air in a bottle. Most of acoustics is the study of such vibrations and of the waves they launch into the air, and the simplest model, a mass on a spring with a little friction, already contains most of the ideas: a natural frequency, a quality factor, resonance and the impedance a driving force sees. It's the same second-order system as the RLC circuit of C2, and acoustic engineers routinely draw loudspeakers and microphones as circuits for exactly that reason.
:::

::: play
- A mass m on a spring of stiffness k with mechanical resistance R, driven by a 1 N sinusoidal force. The velocity amplitude against frequency is $|u| = F/|Z_m|$, with $Z_m = R + j(\omega m - k/\omega)$.
- At the natural frequency $f_0 = \frac{1}{2\pi}\sqrt{k/m}$ the mass and spring reactances cancel and only R limits the motion: $|u| = F/R$.
- Lower R and the peak rises and narrows: the bandwidth is $f_0/Q$ with $Q = \omega_0m/R$.
:::

```sim plot
view: graph
x: f = 20..500 log
y: u = 0.001..10 log
slider: m = 2..50 step 1 = 10
slider: k = 500..20000 = 4000 log
slider: R = 0.05..5 = 0.5 log
plot: 1/sqrt(R^2 + (2*pi*f*m*1e-3 - k/(2*pi*f))^2) | samples: 600 | label: velocity amplitude, m/s per newton (m in grams)
readout: natural frequency, Hz = sqrt(k/(m*1e-3))/(2*pi) | digits: 4
readout: Q = sqrt(k/(m*1e-3))*m*1e-3/R | digits: 4
```

::: predict
## A 10 g mass on a 4000 N/m spring has a mechanical resistance of 0.5 kg/s. What's its quality factor?

- [ ] 0.5
- [ ] About 100
- [x] About 12.6
- [ ] About 630

::: reveal
$\omega_0 = \sqrt{4000/0.01}$ = 632 rad/s ($f_0$ = 100.7 Hz), and $Q = \omega_0m/R$ = 632 × 0.01/0.5 = 12.6. Driven at resonance, the velocity is 12.6 times what the spring alone would allow at low frequency for the same force, and the response is 8 Hz wide between its half-power points.
:::
:::

::: nameit
## Free vibration

With mass m, stiffness k and resistance R, $m\ddot{x} + R\dot{x} + kx = 0$ gives a natural frequency and damping:

$$\omega_0 = \sqrt{k/m}, \qquad Q = \frac{\omega_0m}{R} = \frac{\sqrt{km}}{R}$$

Lightly damped motion rings at about $\omega_0$ with an amplitude that decays as $e^{-t/\tau}$, $\tau = 2m/R$.

## Forced vibration and impedance

A force $Fe^{j\omega t}$ produces velocity $u = F/Z_m$, where the **mechanical impedance** is

$$Z_m = R + j\left(\omega m - \frac{k}{\omega}\right)$$

Below resonance the spring dominates (stiffness-controlled), above it the mass (mass-controlled), and at resonance only R remains. The average power delivered is $\frac{1}{2}|u|^2R$, which peaks at $F^2/(2R)$ at resonance; the half-power bandwidth is $f_0/Q$.

## Electrical analogs

In the **impedance analogy**, force ↔ voltage, velocity ↔ current, mass ↔ inductance, compliance 1/k ↔ capacitance, and mechanical resistance ↔ resistance. A mass-spring-damper is a series RLC circuit, and the formulas above are C2's. Later lessons use the same analogy for acoustic masses (air in a tube) and compliances (air in a cavity).
:::

::: example
## Finish the predict question's oscillator: its bandwidth, its peak velocity and power for a 1 N force, and its decay time constant.

::: solution
1. **Bandwidth.** It's the resonance frequency divided by Q:
   $$\begin{aligned} \Delta f &= \frac{f_0}{Q} \\ &= \frac{100.7\ \text{Hz}}{12.65} \\ &= 7.96\ \text{Hz} \end{aligned}$$
2. **Velocity at resonance.**
   $$\begin{aligned} u &= \frac{F}{R} \\ &= \frac{1}{0.5} \\ &= 2\ \text{m/s} \end{aligned}$$
3. **Power at resonance.**
   $$\begin{aligned} P &= \frac{F^2}{2R} \\ &= 1\ \text{W} \end{aligned}$$
4. **Decay time constant.** The free vibration decays with
   $$\begin{aligned} \tau &= \frac{2m}{R} \\ &= 0.04\ \text{s} \end{aligned}$$
   about four cycles per time constant, consistent with $Q/\pi \approx 4$.

**Answer:** a bandwidth of 7.96 Hz, a peak velocity of 2 m/s and a power of 1 W at resonance, and a decay time constant of 0.04 s.
:::
:::

::: example
## What velocity does the same 1 N force produce at 90 Hz?

::: solution
1. **Mass and stiffness terms.** At 90 Hz:
   $$\begin{aligned} \omega m &= 5.655 \\ k/\omega &= 7.074 \end{aligned}$$
2. **Impedance.** Their difference is 7.074 − 5.655 = 1.419, so
   $$\begin{aligned} |Z_m| &= \sqrt{0.5^2 + 1.419^2} \\ &= 1.504\ \text{kg/s} \end{aligned}$$
3. **Velocity.**
   $$\begin{aligned} |u| &= F/|Z_m| \\ &= 1/1.504 \\ &= 0.665\ \text{m/s} \end{aligned}$$
   a third of the resonant value only 10% below resonance.
4. **Phase.** The system is stiffness-controlled there, so the velocity leads the force, by
   $$\begin{aligned} \phi &= \tan^{-1}(1.419/0.5) \\ &= 70.6^\circ \end{aligned}$$

**Answer:** 0.665 m/s, leading the force by 70.6°.
:::
:::

::: example
## Draw the electrical analog of a 10 g mass on a 4000 N/m spring with 0.5 kg/s of resistance, using the impedance analogy, and check its resonance and Q.

::: solution
1. **Map the elements.** Force maps to voltage and velocity to current, so mass, compliance and mechanical resistance become an inductor, a capacitor and a resistor, all in series:
   $$\begin{aligned} L &= m = 0.01\ \text{H} \\ C &= 1/k = 250\ \mu\text{F} \\ R &= 0.5\ \Omega \end{aligned}$$
2. **Resonance.**
   $$\begin{aligned} f_0 &= \frac{1}{2\pi\sqrt{LC}} \\ &= 101\ \text{Hz} \end{aligned}$$
3. **Q.**
   $$\begin{aligned} Q &= \sqrt{L/C}/R \\ &= \sqrt{km}/R \\ &= 12.6 \end{aligned}$$
   the same as the mechanical oscillator.
4. **Ring-down.** The circuit rings down with time constant
   $$\begin{aligned} \tau &= 2L/R \\ &= 2m/R \\ &= 40\ \text{ms} \end{aligned}$$
5. **What the analog is for.** Circuit simulators can then solve loudspeakers and microphones whole.

**Answer:** a series circuit of 0.01 H, 250 µF and 0.5 Ω, which resonates at 101 Hz with Q = 12.6, the same as the mechanical oscillator.
:::
:::

::: check
given: m = 5 | 20 | 100; k = 1000 | 5000 | 20000
answer: sqrt(k/(m*1e-3))/(2*pi)
unit: Hz
tolerance: 0.5%

## A {m} g mass sits on a spring of {k} N/m. What's its natural frequency?

::: right
Right. $\frac{1}{2\pi}\sqrt{k/m}$ = {answer} Hz.
:::

::: misses
- [sqrt(k/(m*1e-3))] That's in radians per second.
- [any] Not yet. Convert grams to kilograms.
:::
:::

::: check
given: m = 5 | 20 | 100; k = 1000 | 5000 | 20000; R = 0.2 | 1 | 3
answer: sqrt(k*m*1e-3)/R
tolerance: 0.5%

## A {m} g mass on a {k} N/m spring has a mechanical resistance of {R} kg/s. What's its Q?

::: right
Right. $\sqrt{km}/R$ = {answer}.
:::

::: misses
- [any] Not yet. $Q = \omega_0m/R$.
:::
:::

::: check
given: f = 50 | 200 | 1000; Q = 5 | 20 | 100
answer: f/Q
unit: Hz
tolerance: 0.5%

## A resonance at {f} Hz has Q = {Q}. What's its half-power bandwidth?

::: right
Right. $f_0/Q$ = {answer} Hz.
:::

::: misses
- [any] Not yet. Center frequency over Q.
:::
:::

::: check
given: F = 0.5 | 1 | 4; R = 0.2 | 1 | 3
answer: F^2/(2*R)
unit: W
tolerance: 0.5%

## A sinusoidal force of amplitude {F} N drives an oscillator with {R} kg/s of resistance at resonance. What average power does it deliver?

::: right
Right. $F^2/(2R)$ = {answer} W.
:::

::: misses
- [F^2/R] Average power has a factor of one half for amplitudes.
- [any] Not yet. $\frac{1}{2}|u|^2R$ with u = F/R.
:::
:::

::: check
given: m = 5 | 20 | 100; R = 0.2 | 1 | 3
answer: 2*m*1e-3/R
unit: s
tolerance: 0.5%

## A {m} g oscillator with {R} kg/s of resistance is set ringing. What's the time constant of its amplitude decay?

::: right
Right. $2m/R$ = {answer} s.
:::

::: misses
- [m*1e-3/R] Amplitude decays with $2m/R$; energy with $m/R$.
- [any] Not yet. The envelope $e^{-Rt/2m}$.
:::
:::

::: check
given: m = 10 | 30; k = 2000 | 8000; R = 0.3 | 1; f = 60 | 150
answer: 1/sqrt(R^2 + (2*pi*f*m*1e-3 - k/(2*pi*f))^2)
unit: m/s
tolerance: 0.5%

## A 1 N force at {f} Hz drives a {m} g mass on a {k} N/m spring with {R} kg/s of resistance. What velocity amplitude results?

::: right
Right. $F/|Z_m|$ = {answer} m/s.
:::

::: misses
- [1/R] That's the resonant velocity; away from resonance the reactance adds.
- [any] Not yet. $|Z_m| = \sqrt{R^2 + (\omega m - k/\omega)^2}$.
:::
:::

::: check
kind: parts
given: d = 0.5 | 0.8 | 0.95

## A freely decaying oscillator shows each peak {d} times the one before.

::: part
answer: ln(1/d)
tolerance: 0.5%

### What is its logarithmic decrement?

::: misses
- [log(1/d)] The decrement is a natural logarithm.
- [any] $\delta = \ln(x_n/x_{n+1})$.
:::
:::

::: part
answer: pi/ln(1/d)
tolerance: 1%

### About what Q does that imply?

::: misses
- [any] $Q \approx \pi/\delta$ for light damping.
:::
:::
:::

::: check
kind: derivation
vars: m = 0.001..10, k = 10..100000, R = 0.01..100

## An oscillator has mass m, stiffness k and mechanical resistance R.

::: step
answer: sqrt(k/m)/(2*pi)

### What is its natural frequency?
:::

::: step
answer: sqrt(k*m)/R

### What is its quality factor?
:::

::: step
answer: 2*m/R

### What is the time constant of its free decay?
:::

::: right
Right. In the electrical analog these are $1/2\pi\sqrt{LC}$, $\sqrt{L/C}/R$ and 2L/R.
:::
:::

::: explain
## Why is a mass-spring-damper the same problem as a series RLC circuit?

::: model
Both are second-order systems in which one element stores energy in proportion to the square of a rate (kinetic energy of a mass, magnetic energy of an inductor), another stores it in proportion to the square of a displacement (potential energy of a spring, electric energy of a capacitor), and a third dissipates it. Writing Newton's law for the mass and Kirchhoff's voltage law for the circuit gives the same differential equation with force for voltage, velocity for current, mass for inductance, compliance for capacitance and mechanical resistance for electrical resistance. So resonance, Q, bandwidth and impedance carry over directly, and mechanical and acoustic parts can be drawn and solved as circuits.
:::
:::

::: practice

::: check
given: m = 1 | 500; k = 100 | 1e5
answer: sqrt(k/(m*1e-3))/(2*pi)
unit: Hz
tolerance: 0.5%

## f₀: {m} g on {k} N/m?

::: misses
- [any] $\frac{1}{2\pi}\sqrt{k/m}$.
:::
:::

::: check
given: m = 1 | 500; k = 100 | 1e5; R = 0.05 | 10
answer: sqrt(k*m*1e-3)/R
tolerance: 0.5%

## Q: {m} g, {k} N/m, {R} kg/s?

::: misses
- [any] $\sqrt{km}/R$.
:::
:::

::: check
given: F = 0.1 | 10; R = 0.05 | 10
answer: F^2/(2*R)
unit: W
tolerance: 0.5%

## Power at resonance: {F} N, {R} kg/s?

::: misses
- [any] $F^2/(2R)$.
:::
:::
:::
