Basis Lab

Answers · The mathematics underneath

Why does a fast wiggle look like a slow one when I sample too slowly?

In shortBecause readings taken at regular instants cannot tell a rhythm from the same rhythm sped up by a whole number of cycles per reading, so the fast one is reported at a folded, slower rate.

A fast wiggle sampled too slowly is reported at a slower rate, and this is not a mistake in the arithmetic: two rhythms differing by exactly one cycle per reading hit identical values at every reading, so the list of numbers does not record which of them was there. The faster rhythm gets folded back into the range below half the reading rate, and the folded value is what every later calculation works from. A wheel filmed at the wrong rate appears to turn slowly backwards for exactly this reason.

Take readings a thousand times a second, so that reading nn is taken at time n/1000n/1000 seconds. A rhythm at 900 cycles per second takes the value cos⁡(2π⋅900⋅n/1000)\cos(2\pi\cdot 900\cdot n/1000) at that instant.

cos⁡ ⁣(2π⋅900⋅n1000)=cos⁡(2πn−2π⋅100⋅n1000)=cos⁡ ⁣(2π⋅100⋅n1000)\cos\!\left(2\pi\cdot 900\cdot\frac{n}{1000}\right) = \cos\left(2\pi n - 2\pi\cdot 100\cdot\frac{n}{1000}\right) = \cos\!\left(2\pi\cdot 100\cdot\frac{n}{1000}\right)

The 2πn2\pi n term is a whole number of full turns, and a full turn returns a cosine to where it started, so it can be dropped. What survives is the value of a rhythm at 100 cycles per second, taken at the same instants. The two are not approximately equal in the record. They are equal at every reading, exactly, and no amount of staring at the numbers separates them.

Same readings, different rhythm

The same move works from any starting rate. At a rate of ω\omega radians per reading, reading nn sits at angle ωn\omega n. Add a whole number of cycles per reading and the angle becomes ωn+2πkn\omega n + 2\pi k n; the extra part is a whole number of full turns at every nn, so it vanishes.

ωn+2πkn≡ωn(mod2π),k=0,±1,±2,…\omega n + 2\pi k n \equiv \omega n \pmod{2\pi}, \qquad k = 0, \pm 1, \pm 2, \dots

So the rates come in families, spaced one full cycle per reading apart, and every member of a family produces the identical record. Each family has exactly one member lying between zero and half a cycle per reading, and that is the member the record reports. Anything faster cannot be reported as itself, because it shares its record with that slower member and has no claim the slower member lacks.

Rounding to the nearest whole number of cycles gives the fold. With ff the rate present in cycles per second and fsf_s the reading rate, the rate that comes back out of the record is

fseen=∣ f−fs⌊ffs+12⌋∣f_{\text{seen}} = \left|\, f - f_s\left\lfloor \frac{f}{f_s} + \frac{1}{2}\right\rfloor \right|

Below half the reading rate the bracket is zero and the reported rate equals the true one. Above it the line folds over instead of continuing, and the fold repeats once per cycle per reading, so the whole picture is a sawtooth.

FIG 1The rate a record reports, against the rate actually present
0.00150.00300.00450.00600.000.0650.01300.01950.02600.0rate actually present, cycles per second
reported ratehalf the reading rate
A thousand readings per second, so the limit sits at five hundred cycles per second. Below the limit the reported rate is the true rate. Above it, 900 comes back as 100, 1100 comes back as 100 as well, and 1000 comes back as 0, a rhythm that appears not to move at all. Every value on the vertical axis is claimed by infinitely many rates, which is the family picture in one line.
FIG 2
rate presentwhole cycles removedrate reported
1000100
4800480
5201480
9001100
100010
19002100

The row to look at is 520 reported as 480. Nothing about that record looks wrong. 480 cycles per second is an entirely ordinary rate for a signal to contain, the numbers are clean, there is no noise to warn you, and no plot of the readings will show the seam. The last row is the one people notice, because a rhythm reported at 100 when 1900 was present is far enough from the truth to be audible or visible.

Why the fold cannot be undone

The natural guess is that the smooth, slow reading is the sensible interpretation and that a cleverer analysis could recover the fast one. It cannot, and not because the information is buried: the record holds a single number at the reported rate, and that number is the total of everything that folded onto it. A hundred cycles per second in the record is consistent with a hundred, with nine hundred, with eleven hundred, and with any combination of those summing to what is there. The readings do not prefer one over the others, because all of them are the same readings.

Worth keeping

  • Two rhythms whose rates differ by a whole number of cycles per reading produce identical readings at every instant sampled, so no processing of the record can tell them apart.
  • A rhythm faster than half the reading rate is reported at the folded rate between zero and half the reading rate, and the fold reverses direction above the limit, which is why a filmed wheel can appear to turn backwards.
  • Filtering the continuous signal before measurement is the only cure, because the collapse happens at the instant of measurement, before any data exists.

Where this goes next

This question is one step of The Fourier Transform, a course that works through its subject from the beginning. The page that teaches this part of it is What Was Lost Before You Started, and it reads the whole way through whether or not you have an account.

What an account changes is the practice: problems standing under every idea, marked with a reason rather than a tick, in a copy of the course that is yours.

Read that pageThe whole course

Other questions people ask about this

  1. How does the FFT get the same answer without doing all the multiplications?The FFT gets the same spectrum by splitting the readings into even and odd positions and reusing the two half-length results for every rate, so shared partial sums are computed once instead of once per rate.
  2. Why does multiplying by a sine and summing pick out only that frequency?Multiplying by a sine and adding over whole cycles cancels every other frequency exactly and leaves a positive total for the matching one.
  3. How can a finite list of samples be turned into frequencies and back with nothing lost?A finite list can be converted into frequencies and back exactly, because the transform is a reversible change of description, not a lossy summary.
  4. Why does sliding a filter along a signal become simple multiplication after a Fourier transform?Because a filter scales every steady rhythm without changing its rate, so the whole sliding sum collapses into one multiplication for each rhythm.
  5. What is the difference between variance and standard deviation?They measure the same spread: variance is the average squared distance from the mean, standard deviation is its square root, so you report the standard deviation and calculate with the variance.
  6. How do you make a vague claim precise enough to tell whether it's true?Fix what is being talked about, what is asserted, which cases are covered and the cut-off, then name an observation that would prove it false.

Read alongside