⌁ Resonance
A spring pendulum driven by a periodic force: forced oscillation simulation, resonance curve, quality factor and a calculator in real units.
Natural frequency f₀1,60
Driving frequency f1,50
Damping γ0,08
Force amplitude F₀0,90
Animation speed×1,0
Examples:
Steady state
—
Natural frequency f₀
—
Driving frequency f
—
Steady-state amplitude A
—
Gain A / Ast
—
Quality factor Q = ω₀ / 2γ
—
Phase lag φ
Equation: x″ + 2γ x′ + ω₀² x = F₀ cos Ωt,   ω₀ = 2π f₀,   Ω = 2π f
Steady-state amplitude: A = F₀ / √((ω₀² − Ω²)² + (2γΩ)²)    Phase: tan φ = 2γΩ / (ω₀² − Ω²)
At resonance: A ≈ F₀ / (2γ ω₀) = Q · Ast, where Ast = F₀ / ω₀²
  • The mass on the spring moves according to the equation of forced damped oscillations. The blue arrow above it is the external force, which varies at frequency f. The mass starts displaced by 0.6, so for the first few seconds you can see a transient in which the natural and forced oscillations add together.
  • The green curve on the right shows what the steady-state amplitude would be at different driving frequencies. The yellow dot is the current frequency f, and the yellow dashed line marks f₀. The weaker the damping, the taller and narrower the peak.
  • The time graph (the orange line is the displacement, the blue one is the force) shows the phase shift: far from resonance the mass moves in step with the force or against it, and at resonance it lags by a quarter of a period (90°).
  • The frequencies here are in relative units tied to the simulation speed, as in the original. For real systems, use the “Calculator” tab.

Enter the parameters of a spring system: mass, spring stiffness, damping coefficient, amplitude of the external force and its frequency. You will get the natural frequency, quality factor, amplitude and phase shift.

Mass m, kg
Spring stiffness k, N/m
Damping coefficient b, kg/s
Force amplitude F₀, N
Driving frequency f, Hz
Examples:
—
Natural frequency f₀, Hz
—
Quality factor Q
—
Amplitude at frequency f, cm
—
Amplitude at the peak, cm
—
Phase lag φ, °
—
Peak width Δf ≈ γ / π, Hz
f₀ = (1 / 2π) · √(k / m),   γ = b / 2m,   Q = ω₀ / 2γ = √(km) / b
A(f) = (F₀ / m) / √((ω₀² − Ω²)² + (2γΩ)²),   peak at Ω = √(ω₀² − 2γ²)
Quality factor and resonance shape
QGain at the peak A / AstPeak width Δf / f₀Example (qualitative)
1≈ 1,15≈ 1,00strong damping: shock absorber, door closer
2≈ 2,07≈ 0,50moderate: car suspension
5≈ 5,03≈ 0,20weak: playground swing
10≈ 10,0≈ 0,100guitar string, instrument body
20≈ 20,0≈ 0,050receiver tuned circuit
50≈ 50,0≈ 0,020tuning fork, quartz resonator, even higher Q

Resonance Online: Forced Oscillation Simulation and Calculator

A free interactive tool that shows why an oscillating system responds strongly to a force whose frequency is close to its natural frequency. A mass on a spring moves under a periodic force, while the resonance curve with a marker at your frequency is plotted on the right. Change the natural frequency, the force frequency and amplitude, and the damping, and watch the phase shift and quality factor. The calculator in real units computes f₀, Q, the amplitude and the peak width for a given mass, spring and damping.

Key concepts

Resonance
A sharp rise in the amplitude of forced oscillations when the frequency of the external force approaches the natural frequency of the system.
f ≈ f₀ → A is maximal
Quality factor Q
Shows how weakly the system is damped. The higher the Q, the taller and narrower the resonance peak and the longer a free oscillation lasts.
Q = ω₀ / 2γ
Phase shift
The mass lags behind the force: it barely lags at low frequencies, lags by 90° at resonance, and moves in antiphase at high frequencies.
φ = 90° at f = f₀

Where it is used

  • Radio receivers and tuned circuits: tuning to a station’s frequency
  • Musical instruments: the body of a guitar or violin amplifies certain frequencies
  • Car suspension and vibration isolation of equipment, where resonance has to be avoided
  • Magnetic resonance imaging and nuclear magnetic resonance
  • Buildings and bridges: calculating natural frequencies and dampers
  • Laboratory work on mechanical oscillations

How to use

  1. Look at the default state: the force frequency is slightly below the natural one, the amplitude is small
  2. Move the force-frequency slider to the yellow f₀ marker: the mass starts swinging and the yellow dot climbs to the top of the green peak
  3. Increase the damping: the peak becomes lower and wider
  4. Try weak damping and a frequency close to f₀ to see beats
  5. In the “Calculator” tab, enter the mass, stiffness and damping of your own system

Frequently asked questions

What is resonance in simple terms?
It is a sharp rise in the amplitude of oscillations when an external force varies at a frequency close to the natural frequency of the system. It is like pushing a swing in time with its own motion: small pushes that match in phase add up and produce a large swing.
Why isn’t the amplitude at resonance infinite?
Because of damping. Resistance takes away energy, and at a certain amplitude the losses per period equal the work done by the external force. At resonance the amplitude is approximately F₀/(2γω₀), so it is larger the weaker the damping.
What is the quality factor Q?
It is the ratio Q = ω₀/(2γ). It shows how many times the amplitude at the peak exceeds the static displacement F₀/ω₀², and also how narrow the peak is: its width is approximately f₀/Q. A high Q means weak damping.
Why is the phase shift 90° at resonance?
In forced oscillations, the velocity of the mass is in phase with the force, and the displacement lags behind the velocity by a quarter of a period. That is why exactly at f₀ the displacement lags the force by 90°. Below resonance the shift is smaller, and above it tends toward 180°.
Does resonance always destroy bridges and buildings?
No. Resonance is dangerous when the frequency of the external action coincides with the natural frequency of a structure and the damping is small. That is why engineers calculate natural frequencies and install dampers. The famous collapse of the Tacoma bridge is often cited in textbooks as an example, but in fact it was aeroelastic flutter, not ordinary resonance from periodic pushes.