QiLing Tools

🌀Spring-Mass Oscillator Simulator - Damping, Resonance & Coupled Modes

A hands-on spring–mass–damper bench. Move the sliders for mass, spring constant, damping and driving force, and the animation and x(t) trace follow immediately. The tool classifies the motion as underdamped, critically damped or overdamped and reports the natural frequency, damping ratio, Q, decay time and more, while RK4 integration keeps a running energy balance of driver work against damping losses. The resonance panel plots amplitude and phase against driving frequency for several damping ratios, and a click sets the frequency. The coupled panel shows both normal modes and beats as energy swaps between two masses.

Free · No sign-up · Runs in your browserLast updated:

Loading tool...

How to use Spring Oscillator & Resonance

  1. 1Pick a preset (free, three damping regimes, resonance, beats, car suspension…) or set m, k and c yourself
  2. 2Tick the driving force, choose F₀ and ω, and press play to watch the motion and the x(t) trace
  3. 3Compare the regime, ω₀, ζ, Q, steady-state amplitude and phase, and click the resonance curves to try other frequencies
  4. 4Switch to the coupled oscillator and excite mode 1, mode 2 or one mass to see beats and energy exchange

FAQ

What is the difference between underdamped, critically damped and overdamped?
It depends on the damping ratio ζ = c/(2√(km)). Below 1 the system is underdamped: it oscillates at ωd = ω₀√(1−ζ²) with an amplitude decaying as e^(−ζω₀t). At exactly 1 it is critically damped and returns to equilibrium as fast as possible without overshooting. Above 1 it is overdamped: no oscillation, but so much drag that it creeps back more slowly. Car shock absorbers are typically tuned to ζ ≈ 0.2–0.4, while door closers and analogue meter needles sit near critical damping.
Why doesn't the amplitude become infinite at resonance, and why is the peak not exactly at ω₀?
The steady-state amplitude is A = F₀/√((k − mω²)² + (cω)²). Only with zero damping does the denominator vanish at ω = ω₀, and then the amplitude grows linearly in time. With damping the peak is finite, roughly Q times the static deflection. The displacement peak sits at ω_r = ω₀√(1 − 2ζ²), slightly below ω₀, and disappears once ζ ≥ 1/√2. The velocity amplitude and absorbed power peak exactly at ω₀, where the displacement lags the force by 90°.
What does the quality factor Q mean?
Q = 1/(2ζ) = √(km)/c measures how clean an oscillator is: the higher the Q, the slower it loses energy and the sharper its resonance peak. It is roughly the number of cycles for the amplitude to fall by e^π (to about 4%), and it equals the resonant frequency divided by the half-power bandwidth, ω₀/Δω. Tuning forks and quartz crystals reach Q in the thousands to millions; a car suspension has Q around 1.
Why does the phase lag go from 0° to 180°?
When the driving is slow (ω ≪ ω₀) the spring force dominates and the mass follows the force almost in step, so the lag is near 0. At ω₀ inertia and spring force cancel, only damping balances the drive, and the displacement lags by 90°. When the driving is fast (ω ≫ ω₀) inertia dominates, the mass can't keep up and moves opposite to the force, lagging by nearly 180° with a small amplitude. The lighter the damping, the more abruptly the phase flips.
What are normal modes and beats in coupled oscillators?
Two masses joined by a coupling spring have two motions in which everything oscillates at a single frequency. In mode 1 they move in phase, the coupling spring never stretches, and ω₁ = √(k/m). In mode 2 they move in opposition, stretching the coupling spring, and ω₂ = √((k + 2k_c)/m). Any motion is a mix of the two. Pull one mass alone and both modes get equal amplitude, producing beats: energy flows back and forth with period 2π/(ω₂ − ω₁). Weaker coupling gives slower, more complete exchange.