[time-nuts] Predicting clock stability from the variouscharacterization methods
Tom Van Baak
tvb at leapsecond.com
Thu Nov 30 09:37:42 EST 2006
> Initially I was convinced that the Alan deviation is very nifty because
> can easily identify the different noise types. And, of course to directly
> compare clocks in the time domain. However, there seems to be an easy to
> read off by how much a clock will drift after a certain period in time? It
> would be much appreciated if someone could elaborate a bit on this topic.
> point me to a previous thread that already did.
Sounds like you've done some good research already.
Ignore Allan deviation for a moment and work through the
process with me for a minute. Imagine checking the time
error of a nice quartz clock each minute.
Let's say your first phase reading, P0, is 10 us, and the
second reading a minute later, P1, is 21 us. What do
you know so far?
Well, you know the time error (also called phase error)
between your clock and your reference is a couple tens
of microseconds. That tells you how "on time" the clock
is. You now know your clock isn't perfectly on time.
Close, but not perfect. What else do you know?
With just two points, you know that your clock has drifted
in time by 11 us in a minute. Congratulations, you have
now determined the frequency error of the clock. It is
11 us / 1 minute = 11e-6 s / 60 s = 0.18 ppm = 1.83e-7.
A drift in time is the same thing as frequency offset, also
called frequency error. F1 = (P1 - P0) / 60 s. So your
clock is not only not perfectly on time, it is also not
keeping perfect time. Close, but not perfect.
Now, based on just those two readings, what would you
expect; what would you guess; what would you bet that
reading P2 will be?
I think you would agree that since your clock appears to
be drifting in time by 11 us per reading that P2 should be
about 32 us, right? The expected gain is P1-P0, or 11 us.
The last reading was P1=21 us, so your guess is simply
P1 + (P1 - P0) = 2 P1 - P0 = 32 us. Right?
OK, you wait a minute and P2 is 35 us. Your guess was
close. That's good. If the clock were perfectly stable, it
should have read 32 us, but it was off by a bit. Not only
is your clock off a bit in time, and off a bit in frequency,
it is also off a bit in predictability, in stability. Close, but
What do you know now? Well, based on points P1 and P2
the frequency error for this reading, F2 = 35-21 = 14us/min =
0.23 ppm = 2.33e-7. So you now have two frequency
readings. You can no longer boldly claim the frequency
error of your clock is exactly 1.83e-7; you are more inclined
to say it is 2e-7 because you realize both readings differ,
and are imprecise, but both close to 2e-7. You sense an
average would be a better measure.
You also know that your prediction was off by 3 us. Why?
Your prediction P2' was 35. The actual P2 was 32. The
error in your guess, E2 =P2 - P2' is
E2 = P2 - [ P1 + (P1 - P0) ] = P2 - 2 P1 + P0
Are you with me so far? Imagine keeping this up for a while
and making many predictions and collecting many actual
phase readings. Each new phase reading gives you a new
frequency measure; you hope they continue to average to
a nice value that you can write on your oscillator. Each
new phase reading gives you another chance to see how
well your prediction matches. You hope the errors of your
prediction stay pretty small. This time it was 3 us. Next
perhaps 2, or 4, or -3, or -1, or 5, etc. These are the small
errors in your ability to predict the phase error of the next
After a batch of N phase readings you have collected
N-1 Fi and so your average frequency error is the sum
of all Fi divided by N-1. You are also curious how confident
you are in your frequency average. You could compute
the standard deviation.
You are also curious how small your errors of prediction
are. You have collected N-2 Ei and it would be good to
compute the standard deviation of this too.
When it comes to an oscillator like this, the initial phase
error is usually no problem (you can correct for this). And
even a frequency error is not a problem (you can correct
for this in hardware or software).
What really gets you is the uncertainty in the frequency;
the jitter; the instability; the limitations of the clock in
meeting your predictions. This, you cannot correct for
and so it is a measure of how intrinsically good your
Do you remember the square root sum of squares formula
for stdev? Take a look now at the formula for Allan Variance
or Allan Deviation. Can you see that it is just the standard
deviation of all those P2 - 2 P1 + P0 phase prediction error
terms? So Allan Deviation is not some magic formula; it's
just a regular old standard deviation formula used in a
And this is why the Allan Deviation can be used as a
predictor of time drift; by definition, it is a measure of
the expected deviation of time drift.
See also these ADEV links, in order:
An non-technical ADEV summary from USNO:
Clock Performance and Performance Measures
A scholarly paper on ADEV is found here:
The Basics of Frequency Stability Analysis
This is an all-time classic:
The Science of Timekeeping. Application Note 1289
This a nice write-up from NIST:
Properties of Oscillator Signals and Measurement Methods
Some free ADEV source code:
Many of my plots are made with Bill Riley's Stable32:
But even if you don't need to buy his software you can
enjoy all his papers.
More information about the time-nuts