SHM Resonance Lab

Tune mass, spring, damping, and forcing frequency to see resonance, phase lag, and amplitude magnification in real time.

Loading interactive simulation...

One number sets both how big it gets and how long it takes 🖖

The tool's two driven presets are identical except for the rhythm: same mass, same spring, same damping, same force of 1.2. Only the drive frequency changes, from 4.00 to 2.2 rad/s. That alone moves the amplification readout M from 6.667 to 1.424, a factor of 4.68. At resonance M is exactly 1/(2ζ), which here turns a static push of 0.0750 m into a swing of 0.5000 m. The same 1/(2ζ) also controls the waiting. The envelope builds with a time constant of 3.333 s against a period of 1.571 s, so reaching 95% of full amplitude takes about 6.4 cycles — near enough the same 6.667. A resonance that amplifies a hundredfold needs roughly a hundred cycles to get there, which is why a wine glass has to be sung at steadily rather than shouted at.

Resonance is just good timing 🖖

This tool is really about timing. Every mass on a spring has one natural frequency ω₀ at which it 'wants' to wobble. Push it at that rhythm — like pumping a playground swing at just the right moment — and each small shove adds energy, so the amplitude X grows far beyond what a steady force would give. The magnification M measures that boost, and only damping keeps it from running away. At resonance the motion lags the force by exactly 90°.

The peak sits below the natural frequency 🖖

Draw the resonance curve and you might expect its tallest point at ω = ω₀. It isn't: the displacement amplitude actually peaks slightly lower, at ωr = ω₀√(1 − 2ζ²). Stranger still, once the damping ratio passes ζ = 1/√2 ≈ 0.707 — well before critical damping at ζ = 1 — that peak vanishes entirely and the curve just slides downhill. So a system can be lightly damped and yet have no resonant peak at all.

OSCILLATORS — HOW MUCH DAMPING, AND ARE YOU DRIVING IT AT ITS OWN FREQUENCY?

Which Oscillator Case Is Yours?

Two questions settle the behaviour of every mass on a spring. First, how does the damping c compare with the critical value 2√(mk)? Below it the system rings, at it the system returns fastest without overshoot, above it it crawls back. Second, is anything pushing? A driven oscillator has its own answer, and it turns on how close the driving frequency sits to ω₀ = √(k/m).

No damping — it rings forever c = 0, ω₀ = √(k/m)
Critical damping — back to rest fastest, without overshoot c = 2√(mk)
Over-damped — no oscillation, but slow c > 2√(mk)
Driven at resonance — small push, large amplitude ω = ω₀, A = F₀/(cω)
Driven off resonance — the same force does much less ω ≠ ω₀

01

No damping — it rings forever

What you know: c = 0 and nothing is driving it. Energy just shuttles between the spring and the mass, and the amplitude never changes.

Damping: c = 0, ω₀ = √(k/m)

Worked example: m = 1 kg, k = 16 N/m → ω₀ = √(k/m) = 4 rad/s, a period of 1.57 s, and the same amplitude on every swing

Open this case: Undamped free
No damping — it rings forever. Undamped: a pure sinusoid at ω₀, unchanged from one cycle to the next. c = 0 and nothing is driving it. Energy just shuttles between the spring and the mass, and the amplitude never changes.
Undamped: a pure sinusoid at ω₀, unchanged from one cycle to the next.

02

Critical damping — back to rest fastest, without overshoot

What you know: c is exactly 2√(mk). The system returns to equilibrium in the shortest possible time and never crosses it.

Damping: c = 2√(mk)

Worked example: m = 1, k = 16 → critical c = 2√(16) = 8 N·s/m. At c = 8 the displacement decays to zero without a single oscillation

Open this case: Critical damping
Critical damping — back to rest fastest, without overshoot. Critically damped: the shortest return that never crosses the line. c is exactly 2√(mk). The system returns to equilibrium in the shortest possible time and never crosses it.
Critically damped: the shortest return that never crosses the line.

03

Over-damped — no oscillation, but slow

What you know: c is larger than 2√(mk). Both solutions decay exponentially, and the slower of the two dominates the return.

Damping: c > 2√(mk)

Worked example: Raise c above 8 with m = 1 and k = 16: at c = 20 the system needs several times longer to settle than it did at c = 8

Open the critical case and raise c above 8
Over-damped — no oscillation, but slow. Over-damped: no crossing, but the return drags on well past the critical case. c is larger than 2√(mk). Both solutions decay exponentially, and the slower of the two dominates the return.
Over-damped: no crossing, but the return drags on well past the critical case.

04

Driven at resonance — small push, large amplitude

What you know: A periodic force at ω ≈ ω₀ with light damping. The steady amplitude is set by the damping alone, not by the stiffness.

Damping: ω = ω₀, A = F₀/(cω)

Worked example: F₀ = 1.2 N at ω = 4 rad/s with c = 0.6 → amplitude 0.50 m, against a static deflection of F₀/k = 0.075 m: an amplification of 6.7

Open this case: Near resonance
Driven at resonance — small push, large amplitude. At ω = ω₀ the response towers over the static deflection. A periodic force at ω ≈ ω₀ with light damping. The steady amplitude is set by the damping alone, not by the stiffness.
At ω = ω₀ the response towers over the static deflection.

05

Driven off resonance — the same force does much less

What you know: The same force and damping, but the driving frequency is away from ω₀. The response falls off sharply on both sides.

Damping: ω ≠ ω₀

Worked example: The same F₀ = 1.2 N at ω = 2.2 instead of 4 → amplitude 0.107 m, about a fifth of the resonant response

Open this case: Off resonance
Driven off resonance — the same force does much less. Move the drive away from ω₀ and the same force produces a fraction of the motion. The same force and damping, but the driving frequency is away from ω₀. The response falls off sharply on both sides.
Move the drive away from ω₀ and the same force produces a fraction of the motion.

Problems solved in full

  1. 1 kg on a 16 N/m spring driven at 4 rad/s 5 steps

    1 kg on a 16 N/m spring with a damper of 0.6 N·s/m, driven by a 1.2 N force at 4 rad/s. Find the steady-state amplitude and the phase lag — then say which of the four inputs is actually setting the answer.

    1. Two of the five inputs fix the frequency this system wants. The drive happens to sit on exactly that frequency, so the ratio r is exactly 1, and that single coincidence is what makes everything below behave oddly.

    2. The damping ratio measures c against the critical value 2√(km) = 8 N·s/m. At 0.6 the system runs at 7.5% of critical: lightly damped, free to ring.

    3. Magnification carries two terms under the root — a stiffness term and a damping term. At r = 1 the stiffness term is exactly zero, because the spring force and the inertial force cancel each other completely. Nothing but the damper is left to oppose the drive.

    4. Scale the static deflection F₀/k = 0.075 m by that factor.

    5. The phase lag is those same two terms read as an angle rather than a length. With the stiffness term at zero the arctangent lands on a quarter turn whatever ζ happens to be: a heavily damped system and a barely damped one lag by exactly 90° here.

    Answer

    X = 0.5 m, a quarter cycle behind the force, and the input carrying the whole answer is c. Rewrite the amplitude at resonance and both k and m cancel: X = F₀/(cω₀) = 1.2/(0.6 × 4) = 0.5 m. The spring and the mass are busy handing energy back and forth to each other, and neither has any say in how far the thing swings. The 90° lag is why. A force in phase with velocity delivers power continuously, so the steady state settles wherever the damper burns energy exactly as fast as the drive supplies it: mean input F₀ωX/2 = 1.2 W against mean dissipation cω²X²/2 = 1.2 W, and those two are equal at X = 0.5 m and nowhere else. Count the same balance per cycle and 6.667 reappears from an unrelated definition — the system holds kX²/2 = 2 J and loses 1.885 J each period, and 2π × 2/1.885 = 6.667. Magnification and quality factor are one number under two names.

  2. Same mass and same spring driven at 2.2 rad/s instead of 4 5 steps

    Same mass, same spring, same damper, same 1.2 N force — driven at 2.2 rad/s instead of 4. Find the amplitude and the phase lag, then decide whether the damper still matters.

    1. Only the drive frequency has moved, so ζ is untouched and r falls to 0.55.

    2. Write the two terms under the root out separately, because their relative sizes are the answer to the question. The damping term contributes 0.00681 against 0.48651 — 1.4% of the total.

    3. Add them and invert.

    4. Same static deflection, far less magnification.

    5. The lag follows the same two terms, and with the stiffness term back in charge it collapses from 90° to 6.7°: the mass now moves very nearly with the force instead of a quarter cycle behind it.

    Answer

    0.1068 m, 6.7° behind the force — and no, the damper has stopped mattering. Delete it: set c = 0 and M becomes 1/(1 - r²) = 1.4337, giving 0.1075 m. That is 0.7 mm of error on a 107 mm swing, or 0.7%. The quantity that decided the entire answer at 4 rad/s is a rounding error at 2.2 — and at r = 1 the same deletion would have sent the amplitude to infinity. In charge instead is the stiffness term, and it pays to be precise about what that means: the static deflection F₀/k = 0.075 m is 30% short of what the mass actually swings. Driving slowly is not the same as driving statically. For 1/(1 - r²) to sit within 5% of 1 you need r below 0.22, which on this spring means holding the drive under 0.873 rad/s — and only there does the spring alone set the answer.

Learning path

From one spring to a standing wave

Leads to Interference what those two quantities do to a clock.

References (2)

Example problems

  • Undamped free - No damping at all, so ζ = 0 and the oscillation at ω₀ = 4 rad/s never decays. A period of 1.571 s, with energy trading endlessly between spring and mass.
  • Critical damping - c = 8 is exactly 2√(km), so ζ = 1 - critical damping. It returns to rest in the shortest time that involves no overshoot, with a time constant of 0.250 s.
  • Near resonance - Driven at exactly ω₀ = 4 rad/s with ζ = 0.075, so M = 6.667, which is 1/(2ζ). That turns a 0.0750 m static push into a 0.5000 m swing, lagging the force by 90°.
  • Off resonance - The same system driven at 2.2 rad/s instead of 4: M falls from 6.667 to 1.424 and the lag from 90° to 6.7°. Only the rhythm changed.