[ntp:questions] NTP and PPS calibration interval (convergence speed)

Miguel Gonçalves miguel.barbosa.goncalves at gmail.com
Wed May 29 20:35:42 UTC 2013


On Tue, May 28, 2013 at 8:55 AM, David Woolley
<david at ex.djwhome.demon.invalid> wrote:
> Miguel Gonçalves wrote:
>
>>
>> For me, it is not clear why calibration occurs every 256 seconds when
>
>
> I don't understand what you mean by this, and I don't see any evidence of a
> 256 in your posting.

There isn't because I did not post it. Calibration interval is not
polling interval.

# ntptime
ntp_gettime() returns code 0 (OK)
  time d550e438.3dc51d94  Wed, May 29 2013 20:31:52.241, (.241289477),
  maximum error 1739 us, estimated error 1 us, TAI offset 0
ntp_adjtime() returns code 0 (OK)
  modes 0x0 (),
  offset 0.226 us, frequency 147.458 ppm, interval 4 s,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  maximum error 1739 us, estimated error 1 us,
  status 0x2107 (PLL,PPSFREQ,PPSTIME,PPSSIGNAL,NANO),
  time constant 4, precision 0.001 us, tolerance 496 ppm,
  pps frequency 147.458 ppm, stability 0.535 ppm, jitter 2.156 us,
  intervals 67322, jitter exceeded 7483, stability exceeded 0, errors 4.

>> I have a GPS receiver with a PPS output. I understand that a good
>> frequency drift estimation would be good when free running but frankly
>> I don't want my NTP servers to serve time when the GPS signal is not
>> available. I can trust my Meinberg box to do that because it has a
>> TXCO but not my regular NTP servers.
>
>
> The way to do this is to set tinker dispersion on the server, to reflect  a
> realistic worst case clock frequency error, and set tos maxdist, on the
> clients, to represent how large an error margin you are prepared to accept.

I will look into this.

>> I was also surprised that Meinberg's NTP server calibration interval
>> never goes above 4 seconds. They must have done what I did.
>>
>> I changed my FreeBSD 8.3 kernel to never go above 4 seconds and the
>> results are in the graphics attached.
>
>
> comp.protocols.time.ntp is not a binaries newsgroup.  I believe the mailing
> list imposes similar restrictions.

I noticed that after sending the message.


>> I changed PPS_FAVGDEF in the file /sys/kern/kern_ntptime.c from the
>
>
> No such file in the source distribution, at least not for 4.2.7p333.  No
> such symbol in the ntpd sources.

That's because kern_ntptime.c is in the FreeBSD kernel sources and not
in NTP sources.

>> default 8 (256 seconds) to 2 (4 seconds). The frequency is therefore
>> adjusted every 4 seconds instead of 256.
>
>
> I'm going to guess it has something to do with the averaging time for the
> frequency.  Generally a longer averaging time will give you a more accurate
> frequency, assuming that phase measurement error noise dominates, which
> should be true below the Allan intercept. Unfortunately, your Allan
> intercept may be exceedingly low and statistically poorly behaved.

Cheers,
Miguel


More information about the questions mailing list