[time-nuts] looking for good description/generalized model for time adjustments

Lux, James P (337C) james.p.lux at jpl.nasa.gov
Wed Jul 29 19:10:40 UTC 2009


-----Original Message-----
From: time-nuts-bounces at febo.com [mailto:time-nuts-bounces at febo.com] On Behalf Of Hal Murray
Sent: Wednesday, July 29, 2009 11:45 AM
To: Discussion of precise time and frequency measurement
Subject: Re: [time-nuts] looking for good description/generalized model for time adjustments


> I'm looking for a good (short) description and/or a generalized model
> for relating a local time counter to some external reference.  Here's
> the scenario.. A computer has a local clock that is a counter being
> driven by a local oscillator. Periodically, we get "time updates" from
> some outside source that give an "absolute time" and a sync.

What sort of accuracy do you want?  seconds?  milliseconds?  microseconds?

>>>> milliseconds over days (i.e. parts per billion).. but that's not an absolute accuracy requirement.. we need to have multiple boxes "synchronized" to a common time scale so that they can generate an event within a millisecond, over a time span of, say, 20 minutes. (which is on the order of 1 ppm).


What sort of computer?  A big one where you can run lots of software or a 
tiny one where every instruction counts?  How stable is the environment 
(temperature)?

>>>> I'm really looking for a generalized model, not tied to a specific implementation. BUT, in this case, we can run a fair amount of software.  The environment is not stable (hence the variation of frequency of the sources is substantial)


The trick is to think of frequency rather than time.

The usual problem with clock drift is that the local oscillator is off 
slightly, typically a few 10s of ppm.  You can fix most of that if you can 
fudge the frequency of the clock.  Say your system is updating the time from 
an interrupt that goes off every ms and you are keeping time in ms.

<SNIP>
>>> yes, that's basically calibrating the "clock rate"


If you want to get the human out of the loop, you can implement a PLL.  That 
gets complicated with filtering and stability and such.

>> Precisely so. And NTP may actually be the best model here. Does NTP's "corrected output" meet the "must be monotonic and not discontinuous" criteria (being too lazy to just go read the NTP docs, which I have, and which I'll take a look at after lunch).






More information about the Time-nuts_lists.febo.com mailing list