Science Lab · Physics

Pendulums and Resonance

Fifteen pendulums that drift out of step and then, a minute later, swing together again. Two pendulums joined by a spring that pass their swing back and forth. A swing that a tiny push can send high, if the push comes at the right moment. Real gravity, real lengths and the full pendulum equation, so you can see what sets a pendulum's beat and what makes a small push grow.

Scenes

Jump to
View
Ln = g · (60 s ÷ 2πn)²
Gravity

Live numbers

Missions

    Keys, with the picture selected: space pauses, R starts again, 1 2 3 pick a scene. Wave: ← → ↑ ↓ turn the view. Two pendulums: ↑ ↓ change the length. Resonance: P pushes, ← → change the rhythm, ↑ ↓ the damping.

    What you're seeing

    Pendulum wave. Fifteen pendulums hang from one bar. The longest is tuned to swing back and forth 51 times in 60 seconds, the next 52 times, and so on up to 65. They start together, drift out of step into snakes and waves, split into neat groups, and after one minute all line up again. The top view, below the picture, shows the snake best.

    Two pendulums. Two equal pendulums hang side by side, joined by a weak spring. Pull one aside and let go. Little by little its swing passes through the spring to the other one, until the first stands still. Then it all comes back. The bars show each pendulum's energy, and the strip below tracks the trade.

    Resonance. A playground swing, 2 meters long, with a 20 kg rider. A motor gives it a gentle push and pull, over and over, at a rhythm you choose. Push at the wrong rhythm and the swing barely moves. Push at its own rhythm and it climbs. The graph below it is the resonance curve: how big the swing gets for each rhythm.

    Everything runs in real time at 1×. The numbers are in SI units: meters, seconds, kilograms, newtons and joules. One newton is about the weight of a small apple.

    The science

    What sets a pendulum's beat

    A pendulum's period is the time for one full swing, there and back. For small swings it depends on only two things, the length of the string L and the strength of gravity g:

    T = 2π √(L / g)     on Earth, g = 9.80665 m/s²

    The mass of the bob is not in the formula. A heavier bob is pulled down harder, but it is also harder to get moving, by exactly the same factor, so the two cancel. Four times the length makes the period twice as long. A pendulum 99.4 cm long has a period of 2.00 s: each swing from one side to the other takes one second. That is the "seconds pendulum" of tall clocks. On the Moon, where gravity is 1.62 m/s², the same beat needs a string only 16.4 cm long.

    Big swings run slow

    The formula above is the small-swing formula. It is very good up to about 10°, but it is not exact, because gravity's pull along the swing grows like sin θ, not like θ. The exact period of a pendulum let go from an angle θ₀ is

    T = 4 √(L/g) · K(sin(θ₀/2))  ≈  2π √(L/g) · (1 + θ₀²/16 + 11θ₀⁴/3072 + …)

    Here K is a function called the complete elliptic integral of the first kind, and θ₀ in the series is in radians. The simulation does not use this formula to move anything. It solves the full equation of motion step by step, and the periods it produces match the formula to 11 digits:

    Start angle10°30°45°60°90°120°
    Period ÷ small-swing period1.00191.01741.04001.07321.18031.3729
    How much longer0.19%1.7%4.0%7.3%18%37%

    A clock pendulum swings only a few degrees, so the error is tiny. But if a clock's swing slowly shrinks as it runs down, its beat speeds up a little, which is one reason good clocks keep the swing small and steady.

    How the pendulum wave works

    Pendulum number n must make n full swings in 60 seconds, so its period is 60 s ÷ n. Turning the small-swing formula around gives its length:

    Ln = g · (60 s ÷ 2πn)²     n = 51: 34.38 cm   n = 52: 33.07 cm   …   n = 65: 21.17 cm

    Neighbors differ by one swing per minute. After 30 seconds, every pendulum has made a whole or a half number of swings, alternately, so the odd ones are on one side and the even ones on the other: two rows swinging against each other. After 20 seconds there are three groups, after 15 seconds four. After 60 seconds every pendulum has made a whole number of swings, so they are all back where they started.

    There is a catch: the lengths come from the small-swing formula, and real swings run a little slow. Every pendulum here starts from the same angle, so every one is slowed by exactly the same factor, and they still line up together, just a moment later. From 12° the factor is 1.00275, so they line up at 60.17 s. From 60° they line up at 64.39 s.

    Passing a swing back and forth

    Two pendulums joined by a spring have two ways to swing steadily, called normal modes. Swinging together, the spring never stretches, and they keep the beat of a lone pendulum. Swinging against each other, the spring stretches and squeezes and adds its own pull, so the beat is a little faster:

    ω₁ = √(g/L)     ω₂ = √(g/L + k/mA + k/mB)     hand-off time = π ÷ (ω₂ − ω₁)

    Pulling only one pendulum aside starts both modes at once, half and half. They drift in and out of step with each other, like two notes that are almost the same, and the energy moves from one pendulum to the other and back. This is called beating. With L = 1 m, 1 kg bobs and a 1 N/m spring, ω₁ = 3.132 and ω₂ = 3.436 radians per second, so the whole swing passes over every 10.3 seconds. A weaker spring makes the hand-off slower. If the bobs have different masses, the hand-off is never complete.

    Resonance

    Every swing has its own natural rhythm. Pushing at that rhythm adds a little energy on every swing. The swing grows until friction and air drag take away as much energy on each swing as the pushes add. Pushing at any other rhythm, the pushes are sometimes helping and sometimes fighting, and the swing stays small. For small swings, the size that the swing settles at is

    θmax = (F₀ / m L) ÷ √((ω₀² − ω²)² + (γω)²)     ω₀ = √(g/L)     ω = 2πf

    F₀ is the motor's push, m the mass, f the push rhythm in hertz (pushes per second) and γ the damping rate. The peak sits at the swing's own frequency, f₀ = ω₀/2π, which is 0.352 Hz for a 2 m swing on Earth: one swing every 2.84 s. At the peak the swing reaches about F₀ / (m γ √(g L)) radians. Halve the damping and the peak doubles in height and halves in width. So less damping makes a taller, sharper peak, and the swing needs a more exact rhythm to reach it.

    One more thing to watch: at resonance the swing is a quarter swing behind the push (90°). The motor pushes hardest just as the swing rushes through the bottom, which is exactly when a push adds the most energy. Far below resonance, the swing just follows the push. Far above, it moves against it.

    Try this

    Count the groups. In the pendulum wave, use Jump to ½, then ⅓, then ¼. Count the groups in the top view: 2, 3 and 4.
    Take the wave to the Moon. Pick Moon gravity. The pendulums are the same, but gravity pulls 6 times more weakly, so every swing is √6 ≈ 2.46 times slower. They still line up, after about 148 seconds.
    A row of seconds pendulums. Set the swings of the longest to 30. Now the longest pendulum is 99.4 cm: a seconds pendulum. The pattern is the same, because only the differences between neighbors matter.
    The two calm modes. In Two pendulums, press Together, then Opposite. In both, the pendulums keep their swing and nothing is traded. Measure the period of each: the opposite mode is faster.
    Stiff spring, weak spring. Set the spring to 5 N/m: the swing passes over in a few seconds. Set it to 0.2 N/m: it takes about 50 seconds.
    Push at the wrong moment. Turn the motor off and press Push the swing while it is coming toward you (moving left). The swing gets smaller. A push adds energy only when it goes the same way as the swing.
    Sharp and blunt peaks. Set the damping to 0.5 /s and press Sweep the curve. Then set it to 0.08 /s and sweep again. Compare the two curves.
    At home (safe and easy): tie a few metal washers or a key ring to a string and hold the other end against the edge of a table. Time 10 swings with a stopwatch and divide by 10. Try a string 25 cm long and one 1 m long: the long one takes twice as long. Then try one washer and five washers on the same string: same time. For coupled pendulums, tie a string loosely between the backs of two chairs and hang two equal pendulums from it. Start one swinging and watch the other pick it up.

    A common mix-up: the Tacoma Narrows Bridge

    On November 7, 1940, wind set the deck of the four-month-old Tacoma Narrows Bridge in Washington State twisting, until it broke apart and fell into the water. Film of it is shown in many science classes, often as an example of resonance, as if the wind had been pushing the bridge in time with its own rhythm, like a swing.

    That is not what engineers concluded. The wind was not a series of pushes arriving at the bridge's natural frequency. The Washington State Department of Transportation calls the main cause torsional flutter, a kind of aeroelastic flutter. Once the thin, flexible deck started twisting, the twisting changed how the wind flowed around it, and the wind then pushed the deck in a way that added energy to every twist. The motion fed itself, the opposite of the damping in our swing, so the twisting grew with no rhythmic push at all. Swirls of air peeling off the deck, called vortex shedding, also added to the twisting.

    Resonance is real and engineers design for it. The bridge is just not a clean example of it. The swing is.

    How the simulation works

    The equation. Each pendulum is a small heavy bob on a light, stiff rod, and obeys θ'' = −(g/L) sin θ, the full equation with no small-swing shortcut. The two pendulums add the force of a real spring between the bobs, with its true direction and stretch. The swing adds damping and the pushes: θ'' = −(g/L) sin θ − γθ' + F(t)/(m L).

    The steps. The equations are stepped with the classic fourth-order Runge–Kutta method, 600 steps per second for the wave and the pair and 300 per second for the swing, however fast the playback runs. The lengths of the wave come from the formula above. Nothing is moved by a formula: the beats, the line-up and the resonance curve all come out of the steps.

    The resonance curve. A point appears on the graph when the swing has settled: its last seven high points agree to within half a percent, and more closely when the damping is small. Sweep the curve runs a second, hidden swing much faster than real time, holds each rhythm until the swing settles and measures it.

    What's simplified. The wave and the pair have no air drag or friction, so they swing forever. Real ones slowly die down. The strings are rods with no weight, the bobs are points, and the pair swing in one plane. The swing's rider sits still, and the motor pushes along the swing's path. Real swingers also pump with their legs, which works differently.

    How it was checked

    TestResultExpected
    Period at 10°, 30°, 60°, 90°, 150° start ÷ small-swing period1.001907, 1.017409, 1.073182, 1.180341, 1.762204same to 11 digits (elliptic integral)
    Energy, 1,000 swings from 60°changed by 3 × 10−100
    Pendulum wave from 12°: line-up time60.165 s, all 15 within 0.001% of the start angle60 s × 1.00275 = 60.165 s
    Same, from 60°64.392 s64.391 s
    Swings counted before the line-up51, 52, … 6551, 52, … 65
    Pair (1 m, 1 kg, 1 N/m), A pushed 1°: hand-off timeA stops at 10.2 s, keeping 0.008% of the energy10.3 s (small-swing theory, to the nearest swing), 0
    Pair, total energy over 60 schanged by 1.5 × 10−110
    5 kg and 0.2 kg started together at 20°, spring on, 60 sangle difference 10−13 degrees0
    Swing left alone, damping 0.15 /s: time to lose half its size9.24 s2 ln 2 ÷ γ = 9.24 s
    Steady swing size with a 0.3 N push, from half to 1.5 times f₀within 0.02% of the formulathe formula above
    Lag behind the push at f₀90.4°90°
    Swept curve, 3 N, damping 0.15 /s: peak12.90° at 0.3520 Hz12.94° at 0.3520 Hz
    Settled points vs the true steady sizewithin 0.3% (damping 0.15), 1.8% (0.04)0

    The swing's peak in the table is a hair lower than the formula because a 13° swing is already slightly slower than a small one. With strong pushes and little damping, that effect bends the peak toward lower rhythms, which the formula (made for small swings) leaves out.

    Sources

    @teddyrookbook GitHub