Driven Oscillator & Resonance
Push a damped mass on a spring with a sinusoidal driving force — sweep the driving frequency through the natural frequency and watch the transient build into a steady-state oscillation, tracing out the resonance curve as you go.
Preview — sign up free to change the numbers yourself
What you can adjust
- Mass
- 0.1 – 10 kg
- Spring constant (k)
- 1 – 100 N/m
- Damping (c)
- 0.1 – 20 Ns/m
- Driving force amplitude (F0)
- 0.1 – 50 N
- Driving frequency (f_d)
- 0.05 – 6 Hz
With the default mass this puts the natural frequency around 1 Hz — watchable in real time.
Must be above 0 so a bounded steady state always exists, even driven exactly at resonance. Light damping gives a tall, narrow resonance peak; heavy damping gives a low, broad one.
Sweep this through the natural frequency to watch the steady-state amplitude climb toward resonance, then fall back off on the other side.
About this simulation
What it shows
A mass on a spring with damping is pushed by a force that rises and falls at a steady frequency. The motion builds up from rest into a steady swing, and a resonance curve shows where your driving frequency sits.
The key idea
A system has a natural frequency, about f = (1/2π)√(k/m). Driving it near that frequency gives a very large swing (resonance); driving it far above or below gives a small one. Less damping makes the peak taller and narrower.
Try this
Set Driving frequency (f_d) to 1 Hz, close to the natural frequency of the defaults, and then try 0.5 Hz and 2 Hz: the swing is far smaller at both.