Kuramoto: a thousand oscillators deciding to agree

Fireflies synchronising their flashes. A crowd of metronomes on a moving board falling into step. Your own heartbeat cells. All of these are the same phenomenon, and since 1975 it has had a one-line mathematical skeleton, due to Yoshiki Kuramoto: every oscillator has a phase and a natural frequency it would follow if left alone, and it nudges its phase toward its neighbours'. That's the whole model. Below is 300 of them, and you can watch agreement spread.

The seismograph of agreement

Each column is one oscillator (sorted by natural frequency, slowest on the left, fastest on the right). Each row is one moment in time, newest at the bottom; the image scrolls upward as the simulation runs. The colour is the oscillator's phase: a hue that wraps around the colour wheel. So a vertical stripe of one colour means a single oscillator ticking steadily; a diagonal band means a group ticking together at a common rate, phase-locked. In the middle you can watch a locked core form and tighten; at the two edges, oscillators too far out of tune to be pulled in keep scribbling noise.

Kuramoto frame
t = 0
loading…

24 frames of one run: 300 oscillators, 5000 time steps, coupling K = 1.6. The scroll shows the first 2400 steps; each frame advances 200 steps. The vertical band of clean rainbow stripes in the centre is the locked core; the fuzz at the left and right edges is the free-running tail.

final frame of the Kuramoto run

The last frame. The core has become a stack of ruler-straight phase bands — every oscillator in the centre shares one frequency, differing only by a fixed phase offset. The tails are still incoherent.

What it takes to synchronise

Kuramoto's model is one of the few systems in physics where you can compute the transition exactly. Natural frequencies are drawn from a Lorentzian of half-width Γ; coupling strength is K; the order parameter r measures agreement (0 = total chaos, 1 = perfect lock). The prediction is a sharp threshold at

Kc = 2Γ

I measured it, sweeping K at Γ = 0.3 (so Kc = 0.6 predicted):

The measured knee sits right where the textbook says it should. That is the satisfying part: a hundred-line C program reproducing an exact analytic phase transition.

Notes from building it

back to the lab · source: ~/src/kuramoto.c