[time-nuts] Discipline an oscillator with NTP?

Poul-Henning Kamp phk at phk.freebsd.dk
Sat Jul 23 20:04:26 UTC 2011


In message <022101cc4970$b24a4b80$16dee280$@com>, "Jose Camara" writes:

>After
>one year of NTP queries, assume you have a 100ms jitter on the network time,
>you could at most tweak your oscillator, based on past performance, to 6E-9.

It is a lot more complicated than that, we need to talk allan-deviation
here, not scalar numbers.

The main problem here is that the 'default' NTPd software is not really
written for something like this, and has attributes which makes it
truly sucky for the task.

If you want to do this, you want to write your own software and you
want to give it an entirely different modus operandi.

As with all oscillator discplining, what you are looking for is
the so called "allan intercept" where the two sources allan deviation
cross.

With a NTP reference, its location varies depending on stochastic
network properties, which depends what's between the server and you.

If you control the network topology (as in: Can make sure there is
no other traffic), you're fine, normal PLL style stuff works.

If you don't control the network topology, the RTT between you and
the server becomes a BIG problem, because the fundamental NTP
assumption that it is symmetric is almost always wrong.

You can average over long tau's, but then your ISP upgrades their
routed and a systematic change in RTT screws your integrator over
for several weeks.

Alternatively, if your LO is stable enough (=Rb/Cs), you can operate
on first derivative of the RTT, which turns the routed upgrade into
a single spiky sample, but the cost is an overall higher noise in
your error signal.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the time-nuts mailing list