time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

Allan Variance vs. Least squares

OB
Olaf Bossen
Mon, May 23, 2011 10:23 AM

Hi there,

I am looking for some advice on stability metrics for a slow oscillator.
The oscillator is used to do a measurement of another quantity which is
connected to the frequency of the Oscillator. I have taken generously
oversampled data of the oscillator voltage and now I have two
contradicting measures:

  1. When I record the zero crossings and use them as phase data  for the
    Allan variance, the minimum is 10^-4 and it initially decays with a
    slope of t^-0.5

  2. On the other hand if I do least squares fits of the same data with
    consecutively longer runs the reported frequency uncertainty goes down
    to sigma_f/f = 10^-7. It also drops much faster with t^-1.5 wich seems
    to be due to the "Cramèr-Rao lower bound" (not that I really understand
    what it means), and it doesn't really go up again

It seems to be common lore that the Allan variance minimum is the best
obtainable frequency accuracy for an oscillator, but the least squares
fits seem to be much better. I have problems understanding this.

I have a mental picture that might explain this, maybe you can tell me
if it seems correct to you: Oscillators are running at a very precise
frequency much better than what our measurement devices are capable of
resolving. So the drop in the Allan variance, that is initially gained
when the measurement is longer, is actually just the reduction of the
measurement error for this precise frequency. Only when the Allan
variance goes up again, we are on a timescale over which the true
frequency of the oscillator varies.

So actually the Allan variance tells us how well we can measure the
frequency stability, but the actual frequency stability at least in the
white noise regime is much higher (several orders of magnitude). What do
you think?

Cheers,
obo

Hi there, I am looking for some advice on stability metrics for a slow oscillator. The oscillator is used to do a measurement of another quantity which is connected to the frequency of the Oscillator. I have taken generously oversampled data of the oscillator voltage and now I have two contradicting measures: 1) When I record the zero crossings and use them as phase data for the Allan variance, the minimum is 10^-4 and it initially decays with a slope of t^-0.5 2) On the other hand if I do least squares fits of the same data with consecutively longer runs the reported frequency uncertainty goes down to sigma_f/f = 10^-7. It also drops much faster with t^-1.5 wich seems to be due to the "Cramèr-Rao lower bound" (not that I really understand what it means), and it doesn't really go up again It seems to be common lore that the Allan variance minimum is the best obtainable frequency accuracy for an oscillator, but the least squares fits seem to be much better. I have problems understanding this. I have a mental picture that might explain this, maybe you can tell me if it seems correct to you: Oscillators are running at a very precise frequency much better than what our measurement devices are capable of resolving. So the drop in the Allan variance, that is initially gained when the measurement is longer, is actually just the reduction of the measurement error for this precise frequency. Only when the Allan variance goes up again, we are on a timescale over which the true frequency of the oscillator varies. So actually the Allan variance tells us how well we can measure the frequency stability, but the actual frequency stability at least in the white noise regime is much higher (several orders of magnitude). What do you think? Cheers, obo
MD
Magnus Danielson
Tue, May 24, 2011 6:13 PM

Hi Olaf,

On 05/23/2011 12:23 PM, Olaf Bossen wrote:

Hi there,

I am looking for some advice on stability metrics for a slow oscillator.
The oscillator is used to do a measurement of another quantity which is
connected to the frequency of the Oscillator. I have taken generously
oversampled data of the oscillator voltage and now I have two
contradicting measures:

  1. When I record the zero crossings and use them as phase data for the
    Allan variance, the minimum is 10^-4 and it initially decays with a
    slope of t^-0.5

Please notice that while we say that we measure Allan variance we plot
the Allan deviation. The initial slope of t^-1 is expected from the
measurement limitation of your measurement system.

  1. On the other hand if I do least squares fits of the same data with
    consecutively longer runs the reported frequency uncertainty goes down
    to sigma_f/f = 10^-7. It also drops much faster with t^-1.5 wich seems
    to be due to the "Cramèr-Rao lower bound" (not that I really understand
    what it means), and it doesn't really go up again

Don't do that. You will perform a form of filtering and you no longer
measure something attempting to be Allan deviation. Use overlapping or
similar estimator to get good

It seems to be common lore that the Allan variance minimum is the best
obtainable frequency accuracy for an oscillator, but the least squares
fits seem to be much better. I have problems understanding this.

Allan Variance/Deviation performs a particular filtering prior to
squaring and averaging.

Modified Allan Variance/Deviation performs another particular filtering
prior to squaring and averaging.

Hadamard Variance/Deviation performs yeat another particular filtering
prior to squaring and averaging.

You just did a different filtering mechanism. Some of these filterings
have known bias functions and biases can be significant. Standard
variance/deviation can for some noise-types have a bias reaching for
infinity.

So trying to be "smart" like this doesn't provide you with true Allan
variance. You may however spend quite some time analysing these bias
functions for the various noise-types and by using dominant noise
identification algorithms selecting among bias functions for that
particular tau.

As you notice, this is tedious and might not be as rewarding as one may
initially think. I would warmly recommend another approach.

I have a mental picture that might explain this, maybe you can tell me
if it seems correct to you: Oscillators are running at a very precise
frequency much better than what our measurement devices are capable of
resolving. So the drop in the Allan variance, that is initially gained
when the measurement is longer, is actually just the reduction of the
measurement error for this precise frequency. Only when the Allan
variance goes up again, we are on a timescale over which the true
frequency of the oscillator varies.

Depending on tau your counter or your reference will provide a
measurement floor. There are methods to measure below this. But prior to
making bold statements relating to this, one should use methods known to
be repeatable, bias free and providing low noise. You should be able to
get essentially the same results regardless of setup, as long as it is
not significantly worse than the clock you try to measure.

Ponder over this article:
http://en.wikipedia.org/wiki/Allan_variance

I don't know if this is the answer you seek, but I do hope it is
interesting at least.

Cheers,
Magnus

Hi Olaf, On 05/23/2011 12:23 PM, Olaf Bossen wrote: > Hi there, > > I am looking for some advice on stability metrics for a slow oscillator. > The oscillator is used to do a measurement of another quantity which is > connected to the frequency of the Oscillator. I have taken generously > oversampled data of the oscillator voltage and now I have two > contradicting measures: > > 1) When I record the zero crossings and use them as phase data for the > Allan variance, the minimum is 10^-4 and it initially decays with a > slope of t^-0.5 Please notice that while we say that we measure Allan variance we plot the Allan deviation. The initial slope of t^-1 is expected from the measurement limitation of your measurement system. > 2) On the other hand if I do least squares fits of the same data with > consecutively longer runs the reported frequency uncertainty goes down > to sigma_f/f = 10^-7. It also drops much faster with t^-1.5 wich seems > to be due to the "Cramèr-Rao lower bound" (not that I really understand > what it means), and it doesn't really go up again Don't do that. You will perform a form of filtering and you no longer measure something attempting to be Allan deviation. Use overlapping or similar estimator to get good > It seems to be common lore that the Allan variance minimum is the best > obtainable frequency accuracy for an oscillator, but the least squares > fits seem to be much better. I have problems understanding this. Allan Variance/Deviation performs a particular filtering prior to squaring and averaging. Modified Allan Variance/Deviation performs another particular filtering prior to squaring and averaging. Hadamard Variance/Deviation performs yeat another particular filtering prior to squaring and averaging. You just did a different filtering mechanism. Some of these filterings have known bias functions and biases can be significant. Standard variance/deviation can for some noise-types have a bias reaching for infinity. So trying to be "smart" like this doesn't provide you with true Allan variance. You may however spend quite some time analysing these bias functions for the various noise-types and by using dominant noise identification algorithms selecting among bias functions for that particular tau. As you notice, this is tedious and might not be as rewarding as one may initially think. I would warmly recommend another approach. > I have a mental picture that might explain this, maybe you can tell me > if it seems correct to you: Oscillators are running at a very precise > frequency much better than what our measurement devices are capable of > resolving. So the drop in the Allan variance, that is initially gained > when the measurement is longer, is actually just the reduction of the > measurement error for this precise frequency. Only when the Allan > variance goes up again, we are on a timescale over which the true > frequency of the oscillator varies. Depending on tau your counter or your reference will provide a measurement floor. There are methods to measure below this. But prior to making bold statements relating to this, one should use methods known to be repeatable, bias free and providing low noise. You should be able to get essentially the same results regardless of setup, as long as it is not significantly worse than the clock you try to measure. Ponder over this article: http://en.wikipedia.org/wiki/Allan_variance I don't know if this is the answer you seek, but I do hope it is interesting at least. Cheers, Magnus