🧪 Spring-Mass Simple Harmonic Motion
Interactive spring-mass SHM simulator for GCSE and A-Level physics. Set spring constant k, mass m, and damping to explore oscillation period, energy exchange, resonance, and damping types in real time.
The Physics of Simple Harmonic Motion
Simple harmonic motion (SHM) is the most fundamental oscillatory motion in physics. It occurs whenever a restoring force is proportional to displacement from equilibrium — Hooke's Law for springs, the small-angle approximation for pendulums, charge oscillation in LC circuits, and atomic vibrations in crystals all produce SHM.
📈 The SHM Equation
Newton's second law for a spring-mass system gives:
- F = −kx → mẍ = −kx
- Rearranged: ẍ = −ω₀²x, where ω₀ = √(k/m)
- Solution: x(t) = A cos(ω₀t + φ)
- Velocity: v = −Aω₀ sin(ω₀t + φ)
- Acceleration: a = −Aω₀² cos(ω₀t + φ) = −ω₀²x
The period T = 2π / ω₀ = 2π √(m/k) is completely independent of amplitude A. This isochronous property is what makes pendulum clocks so accurate.
⚡ Energy in SHM
Energy constantly transfers between kinetic and potential forms, but total mechanical energy E is conserved (undamped case):
- KE = ½mv²
- PE = ½kx²
- Total E = ½kA² = constant
At maximum displacement (x = ±A): KE = 0, PE = ½kA². At equilibrium (x = 0): KE = ½kA², PE = 0. The energy graph traces a perfect sinusoid shifted by 90° relative to the displacement graph.
🌊 Damped Oscillations
Real systems lose energy to friction and air resistance. Adding a damping term −bv gives:
- mẍ = −kx − bẋ
- γ = b/(2m) — damping rate
- ω_d = √(ω₀² − γ²) — damped frequency
- x(t) = A e−γt cos(ω_d t + φ)
Critical damping (b = 2√(km)) gives the fastest return to rest without oscillation. Underdamping (b < 2√(km)) gives decaying oscillations; overdamping (b > 2√(km)) gives a slow creep back to equilibrium.
🎶 Resonance & Driving Force
When an external periodic force F₀ cos(ωt) drives the system:
- mẍ = −kx − bẋ + F₀ cos(ωt)
- Steady-state amplitude: A = F₀ / √[(k−mω²)² + (bω)²]
- Resonance at ω ≈ ω₀: amplitude peaks
- Q-factor: Q = ω₀m / b = (1/b)√(km)
High Q (low damping) → sharp, tall resonance peak. Low Q (high damping) → broad, short peak. Enable the driving force in the simulator and tune the frequency to ω₀ = √(k/m) to witness resonance!
Period, Frequency and Angular Frequency
Three interrelated quantities describe the rate of oscillation:
| Quantity | Symbol | Formula | Units | Description |
|---|---|---|---|---|
| Period | T | 2π √(m/k) | seconds (s) | Time for one complete oscillation |
| Frequency | f | 1/T = (1/2π)√(k/m) | hertz (Hz) | Oscillations per second |
| Angular frequency | ω₀ | √(k/m) = 2πf | rad/s | Rate of phase change |
| Natural period (damped) | T_d | 2π / ω_d | seconds (s) | Slightly longer than undamped T |
| Critical damping | b_c | 2√(km) | Ns/m | Fastest return to rest without oscillation |
Notice: doubling the mass increases T by √2 ≈ 41%; quadrupling the spring constant halves T. Use the sliders in the simulator to verify these relationships directly — confirm the HUD period against your hand-calculated T = 2π√(m/k).
The Three Damping Regimes
The ratio of the damping coefficient b to the critical value b_c = 2√(km) determines the qualitative behaviour of the oscillator:
📈 Underdamped (b < 2√km)
Most real oscillators — car suspension (ideally under-damped for ride comfort), clock pendulums, guitar strings, LC circuits, and atomic vibrations. The system oscillates with exponentially decaying amplitude. Amplitude envelope: A e−γt. The energy decays as E ∝ e−2γt.
⚙ Critically Damped (b = 2√km)
The system returns to equilibrium in the shortest possible time without oscillating. Used in door closers, galvanometers, and car dampers where overshoot must be avoided. Mathematically: x(t) = (C₁ + C₂t) e−γt. The critically damped case is the boundary between oscillatory and non-oscillatory motion.
🐌 Overdamped (b > 2√km)
The system returns to equilibrium slowly, creeping back without oscillation. Heavy molasses, overdamped shock absorbers, and some biological systems. Two real decay rates: γ ± √(γ² − ω₀²). As b → ∞, return time → ∞. Not usually desirable in engineering control systems where fast response is needed.
Real-World Applications of SHM
⌛ Timekeeping
Pendulum clocks (T = 2π√(L/g)), quartz crystal oscillators (atomic SHM at ~32 768 Hz), and atomic clocks (microwave-frequency electron transitions) all exploit isochronous oscillation for precise timekeeping. The GPS system relies on atomic clocks accurate to nanoseconds per day.
🚗 Vehicle Suspension
Car suspension is a spring-mass-damper system. Engineers choose spring constant k and damping b for comfort (underdamped, ~1 Hz natural frequency) vs. performance (stiffer, less body roll). Underdamped suspension bounces; overdamped suspension isn't absorbing road shocks effectively. The optimal is slightly underdamped.
🧭 Molecular Vibrations
Chemical bonds act as springs between atoms. Diatomic molecules vibrate at infrared frequencies (10¹² – 10¹³ Hz) — IR spectroscopy identifies molecular bonds by their characteristic SHM frequencies. Stretching and bending modes are described by normal-mode analysis, an extension of the SHM framework.
🔌 Electrical Circuits (LC)
In an LC circuit, charge q oscillates with angular frequency ω = 1/√(LC), the direct electrical analogue of ω₀ = √(k/m). Inductance L maps to mass, capacitance C maps to 1/k, and resistance R to damping b. Radio tuners exploit LC resonance to select specific broadcasting frequencies.
Worked Example
A mass of m = 0.5 kg is attached to a spring with k = 20 N/m on a frictionless horizontal surface, pulled x₀ = 0.3 m from equilibrium and released from rest.
📈 Step 1: Angular Frequency
ω₀ = √(k/m) = √(20/0.5) = √40 ≈ 6.32 rad/s
📈 Step 2: Period
T = 2π/ω₀ = 2π/6.32 ≈ 0.994 s ≈ 1 second
📈 Step 3: Maximum Speed
v_max = Aω₀ = 0.3 × 6.32 ≈ 1.90 m/s at x = 0
📈 Step 4: Total Energy
E = ½kA² = ½ × 20 × 0.09 = 0.90 J
Check: ½mv_max² = ½ × 0.5 × 1.90² = 0.90 J ✓
Set k = 20 N/m, m = 0.5 kg, displacement = 0.3 m in the simulator and verify the HUD matches these values!
Curriculum Coverage
| Qualification | Topic / Module | Relevant Concepts |
|---|---|---|
| GCSE Physics | Waves & Periodic Motion | Period, frequency, amplitude, Hooke's Law, elastic potential energy |
| A-Level Physics | Simple Harmonic Motion (AQA 3.6, OCR 5.4) | SHM definition, a = −ω²x, x = A cos(ωt), v–x graph, energy, T = 2π√(m/k) |
| A-Level Maths / Further Maths | Differential Equations (Mechanics) | Second-order linear ODEs, underdamped/critically damped/overdamped solutions |
| IB Physics (SL/HL) | 4.1 Oscillations; AHL Topic 9 | SHM graphs, energy exchange, damping types, resonance and Q-factor |
| AP Physics C: Mechanics | Oscillations, Unit 6 | Spring-mass, energy methods, driven oscillations, damping |
| University (Year 1) | Classical Mechanics / Vibrations | Forced damped oscillators, transfer functions, normal modes |
Frequently Asked Questions
What is the condition for simple harmonic motion?
SHM requires a restoring force proportional to displacement from equilibrium: F = −kx. The negative sign is essential — it means the force always acts toward equilibrium. This produces the differential equation ẍ = −ω²x, whose solution is sinusoidal motion. Both spring-mass systems and small-angle pendulums satisfy this condition.
Why is period independent of amplitude?
Larger amplitude means larger restoring force (F = −kx) which gives larger acceleration. The mass moves faster to compensate for the extra distance, so the time per cycle remains the same. Mathematically, from x(t) = A cos(ωt), the angular frequency ω = √(k/m) contains neither A nor x₀ — period T = 2π/ω depends only on k and m.
What is critical damping and why is it useful?
Critical damping (b = 2√(km)) is the smallest damping that prevents oscillation. The system returns to equilibrium faster than any other damping value — overdamping slows the return without stopping oscillations, underdamping oscillates first. Critical damping is ideal for instruments (galvanometers), door closers, and vehicle shock absorbers that need fast settling without overshoot.
How does this relate to the pendulum?
For small angles (θ < 15°), a simple pendulum approximates SHM with effective spring constant k_eff = mg/L (where L is length), giving T = 2π√(L/g). The equivalence between spring-mass (T ∝ √(m/k)) and pendulum (T ∝ √(L/g)) reveals the general SHM principle: the heavier the inertia and the weaker the restoring tendency, the slower the oscillation.
Can I use this simulator for A-Level exam practice?
Yes — set specific k and m values, calculate T = 2π√(m/k) by hand, then check against the HUD period. Try predicting what happens to T when you double m or quadruple k, then verify experimentally. Use the energy display to confirm E = ½kA² and that KE + PE = constant (undamped). Enable damping to observe underdamped, critically damped, and overdamped regimes.
Related Simulations
📚 Recommended Reading
🔒 Premium Feature
Unlock phase-space (x vs v) portrait, CSV data export, quadratic damping model, Poincaré section for driven chaos, and all 32 simulations with MySimulator Premium.
This simulation demonstrates the fundamental principles of simple harmonic motion using a spring and mass. It allows users to explore how restoring forces affect an object's oscillation, illustrating concepts like frequency and amplitude.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install