Allan Deviation in Plain Language: Judging How Stable a Clock Is
Understand what Allan deviation measures, calculate it by hand from a short list of readings, and read the slopes on a clock stability plot.
Key takeaways
- Allan deviation compares neighboring averages, so it describes how steady a clock is and not whether it is correct.
- Its value depends on the averaging time, which must always be quoted with it.
- A falling curve means averaging is still helping, while a flat or rising curve means slow changes have taken over.
- The slope of the curve on logarithmic axes gives clues about the type of noise or drift present.
- Every measurement compares two oscillators, so the reference must be better or its noise must be separated out.
Allan deviation tells you how much a clock's average rate changes from one stretch of time to the next stretch of the same length. A small value means that if you know how fast the clock ran during one interval, you can predict the following one closely. Because the answer depends on how long the intervals are, it is usually shown as a curve: deviation against averaging time.
The measure is named for David W. Allan, who published his analysis in 1966. It is now a standard way to describe clocks and oscillators, and it is also used for sensors such as gyroscopes.
What "stable" means for a clock
Start with a quantity called fractional frequency. If a clock should run at frequency f₀ but actually runs at f, then
y = (f − f₀) / f₀ A value of y = 1 × 10⁻⁶ means the clock gains one microsecond every second. The quantity has no units, so clocks with very different frequencies can be compared fairly.
Stability and accuracy are separate. A clock that gains exactly one second every day, without any variation, is inaccurate but perfectly stable. You can correct it with a single subtraction. A clock that is right on average but speeds up and slows down unpredictably is much harder to fix.
Why not use the ordinary standard deviation
The familiar standard deviation measures scatter around the overall mean. It works well when readings fluctuate randomly about a fixed value, as discussed in measurement uncertainty.
Oscillators often do not behave that way. Their frequency can wander slowly, so the "overall mean" depends on how long you have been watching. Collect more data and the standard deviation may keep growing instead of settling.
Allan's solution was to compare each average only with the one right after it. Slow wandering changes neighbors very little, so the result settles to a meaningful value for the kinds of noise common in clocks.
The recipe
- Choose an averaging time, written τ (the Greek letter tau), such as 1 second.
- Measure the average fractional frequency over each successive interval of length τ, with no gaps.
- Subtract each average from the next one.
- Square those differences and find their mean.
- Halve the mean, then take the square root.
In symbols, the Allan variance is
σ²(τ) = ½ × mean of (y next − y current)² and the Allan deviation σ(τ) is its square root. The factor of one half makes the result agree with the ordinary variance when the noise is purely random and uncorrelated from one interval to the next.
A calculation you can do by hand
Suppose six successive 1-second averages of fractional frequency, in units of 10⁻¹², are 5, 7, 4, 6, 6 and 9. These are invented for illustration.
| Pair | Difference | Squared |
|---|---|---|
| 5 to 7 | +2 | 4 |
| 7 to 4 | −3 | 9 |
| 4 to 6 | +2 | 4 |
| 6 to 6 | 0 | 0 |
| 6 to 9 | +3 | 9 |
Sum of squares = 26
Mean over 5 pairs = 26 / 5 = 5.2
Half of the mean = 2.6
Square root ≈ 1.6 → σ(1 s) ≈ 1.6 × 10⁻¹² Now double the averaging time by combining the readings two at a time: (5, 7) gives 6, (4, 6) gives 5, and (6, 9) gives 7.5.
Differences = −1, +2.5
Squares = 1, 6.25
Mean = 3.625
Half = 1.8125
Square root ≈ 1.3 → σ(2 s) ≈ 1.3 × 10⁻¹² With only two differences, the second figure is very uncertain. Real analyses use thousands of readings. Notice also that adding 100 to every reading, a pure frequency offset, would change neither answer.
Starting from time errors instead
Many instruments report not frequency but time error: how far ahead or behind the test clock is at regular moments. You can turn those readings into fractional frequencies by taking differences and dividing by the interval.
Imagine time errors, read every 100 seconds, of 0, 3, 7, 10 and 15 nanoseconds. Again the numbers are invented.
Gains per interval: 3, 4, 3, 5 ns
Fractional frequency: gain ÷ 100 s = 3, 4, 3, 5 × 10⁻¹¹
Neighbor differences: +1, −1, +2 (× 10⁻¹¹)
Squares: 1, 1, 4
Mean: 6 / 3 = 2
Half: 1
σ(100 s) = 1 × 10⁻¹¹ The first reading, zero, had no special role. Had all five readings been shifted by a microsecond, the gains would be identical. A steady frequency offset adds the same amount to every gain and drops out at the next subtraction. Only changes in the rate survive.
Working from time errors is convenient because longer averaging times need no new measurement. For τ = 200 seconds, use every second reading: 0, 7 and 15 give gains of 7 and 8 nanoseconds, or 3.5 and 4.0 × 10⁻¹¹.
Drift behaves differently
Now take readings that creep steadily upward: 1, 2, 3, 4, 5, 6.
τ = 1: every difference is 1
σ² = ½ × 1 = 0.5 σ ≈ 0.71
τ = 2: averages 1.5, 3.5, 5.5; every difference is 2
σ² = ½ × 4 = 2 σ ≈ 1.41 Doubling the averaging time doubled the deviation. Averaging longer makes a drifting clock look worse, because neighboring averages sit farther apart. If the drift is steady and known, you can remove it first and then analyze what remains, but you should say that you did.
Reading the curve
The usual graph uses logarithmic scales on both axes, so a power law appears as a straight line. Different kinds of fluctuation give different slopes.
| Behavior of σ as τ grows | Slope | Likely description |
|---|---|---|
| Falls quickly, as 1/τ | −1 | Noise in the timing signal itself (phase noise) |
| Falls as 1/√τ | −½ | Random, uncorrelated frequency noise |
| Stays level | 0 | Flicker frequency noise, often called the floor |
| Rises as √τ | +½ | Random walk in frequency |
| Rises in proportion to τ | +1 | Steady frequency drift |
For the 1/√τ case, averaging four times longer cuts the deviation in half. That is the same square-root rule seen when averaging pulls a signal out of noise. The flat floor marks the point at which patience stops paying.
The ordinary Allan deviation cannot easily tell two of the fastest noise types apart. A variant called the modified Allan deviation was devised for that.
What the numbers are good for
A rough rule is that the timing error accumulated over an interval τ is on the order of τ × σ(τ), once any known offset has been removed.
σ(1000 s) = 1 × 10⁻¹¹
τ × σ = 1000 s × 10⁻¹¹ = 10⁻⁸ s, about 10 nanoseconds This is an estimate of typical size, not a guaranteed limit. The curve also tells you how long to run an experiment. If a clock averages down as 1 × 10⁻¹³ divided by the square root of τ in seconds, reaching 1 × 10⁻¹⁶ takes τ = 10⁶ seconds, about 12 days, assuming no floor intervenes. A clock a thousand times quieter at short times could get there in about a second.
Curves also help pick partners. A quartz oscillator can be very steady over seconds, a hydrogen maser over hours, and cesium or optical standards over longer spans or at the highest accuracy. Engineers lock one to another at the averaging time where their curves cross. The reference clocks are described in atomic clocks and optical lattice clocks.
A walk through a real-looking plot
Picture a hypothetical oscillator whose curve starts at 2 × 10⁻¹¹ at 1 second. By 100 seconds it has fallen to 2 × 10⁻¹². From there to about 1,000 seconds it barely changes, and by 100,000 seconds it has climbed to 3 × 10⁻¹¹.
The first stretch drops by a factor of 10 while τ grows by a factor of 100. That is the 1/√τ behavior of random frequency noise. The level section is the floor. The best this device can do is about 2 × 10⁻¹², reached after a few minutes.
The final rise suggests something slow, perhaps temperature cycling in the room or aging of the oscillator. A natural next step is to log the temperature alongside the frequency and see whether they move together. If drift is the cause, the far end of the curve should approach a slope of +1.
For a user, the plot answers practical questions. Calibrating this oscillator against a better source for one second would waste most of its capability. Averaging for a few hundred seconds gets nearly all of it. Averaging for a whole day gives a worse prediction of the next day than you might hope, even though far more data went in. Such behavior is one of the ways instruments go quietly wrong.
Planning a stability measurement
If you set out to measure a curve yourself, a few choices shape the result.
- Pick a reference you expect to be several times steadier than the device under test over the averaging times you care about.
- Decide the longest τ of interest, then record for many times longer, ideally ten times or more.
- Keep the sampling continuous and note any interruptions.
- Record temperature, supply voltage and other conditions alongside the readings.
- Plot the raw frequency against time before computing anything, so that jumps and outliers are visible.
A single sudden frequency step can lift a large part of the curve. Investigate such events and report how you treated them. Deleting inconvenient points without saying so would make the device look better than it is.
Finally, show uncertainty bars. At short τ they are tiny because thousands of differences contribute, and they widen steadily toward the right-hand end.
Common mistakes
- Quoting a deviation without its averaging time. The number alone is almost meaningless.
- Reading a low deviation as proof of accuracy. A constant offset is invisible to it.
- Trusting the far right of a plot, where only a few independent intervals exist and error bars are large. An "overlapping" calculation uses data more efficiently but cannot create information.
- Forgetting the reference. The measured curve includes the noise of both oscillators. If two are equal and independent, each contributes about the measured value divided by √2. With three clocks compared in pairs, their separate contributions can be estimated.
- Leaving gaps between intervals, which biases the result for some noise types.
Computer time software faces the same choice of averaging time when it learns a local oscillator's rate, as described in network clock synchronization.