[ntp:questions] Atheros AR9331 w/GPS + PPS

Joachim Fabini Joachim.Fabini at tuwien.ac.at
Mon Sep 14 07:58:08 UTC 2015

Many thanks for sharing your logs and figures - they are really
impressive. Comparing your figures to mine (standard Linux desktop, PCI
RS232 card) it seems like the GPIO-based solution on embedded systems is
capable to provide about a factor of 10 to 100 lower PPS jitter compared
to Linux desktop systems using RS232. This is my first guess after
comparing the ppstools output - I have tested several setups with
on-board RS232, RS232 PCI card, different CPUs and different GPS/PPS
receivers and they all perform similar.
Typical results (48 hours ntp loopstats, Copernicus II GPS/PPS receiver,
roof antenna with free view to the sky): (1%-99%) of all samples are
within (-6µs, +6µs), (25%-75%) of the samples within (-1.5µs; +1.5µs).
That's sufficient for many tasks but you showed that it can get much
better. My plan is to put some effort into tweaking and testing out
various parameters - perhaps we can improve the accuracy, too.

Thanks again,

On 10.09.2015 12:46, Gabs Ricalde wrote:
> On Wed, Sep 9, 2015 at 2:47 PM, Joachim Fabini
> <Joachim.Fabini at tuwien.ac.at> wrote:
>> Comments inline
>> On 08.09.2015 13:46, Gabs Ricalde wrote:
>>> On Tue, Sep 8, 2015 at 5:17 PM, Joachim Fabini
>>> <Joachim.Fabini at tuwien.ac.at> wrote:
>>>> On 08.09.2015 09:44, Gabs Ricalde wrote:
>>>>> I've been running two devices (TPLink WR703N, MR3020) for more than 2
>>>>> years with almost no issue. Also impressed on what these devices could
>>>>> do. Does the new OpenWRT versions have the PPS driver for AR9331? I had
>>>>> to use this for Attitude Adjustment:
>>>>> https://code.google.com/p/openwrt-stratum1/
>>>> Thanks for the pointer, nice project. However, one side-note: the y-axis
>>>> label in the diagram shown on the google code page can't be correct -
>>>> the unit must be ms, NOT µs.
>>>> An offset smaller than +-200ns is imho ways out of reach for such
>>>> devices, 200µs is feasible. In particular when considering the
>>>> mechanisms used according to the PpsGpioPollDriver description (100µs
>>>> interval waiting/polling). Still the accuracy is good and should be
>>>> sufficient for many tasks.
>>> The scale is correct, if I run ppstest I get this:
>>> root at OpenWrt:~# ppstest /dev/pps0
>>> trying PPS source "/dev/pps0"
>>> found PPS source "/dev/pps0"
>>> ok, found 1 source(s), now start fetching data...
>>> source 0 - assert 1441711928.999999999, sequence: 6248816 - clear
>>> 0.000000000, sequence: 0
>>> source 0 - assert 1441711929.999999949, sequence: 6248817 - clear
>>> 0.000000000, sequence: 0
>>> [...]
>>> The 100 us interval is only for determining the coarse time.
>> I'm really surprised, that's excellent. Do you have any figures how ntpd
>> performs when using this PPS source? My earlier comment was relying on
>> the assumption that the diagram displays the ntp log (loopstats)
>> statistics. Until now, with Linux, desktop computers and rather
>> expensive GPS equipment I couldn't get the system clock's offset better
>> than +-5µs over some hours. Publications point out that the CPU
>> performance has major influence on the ntp timesync accuracy, too. The
>> PPS reporting is a different story but still a main prerequisite. Can
>> you share some results on ntp loopstats based offset?
> TL-WR703N, polling GPIO driver, ntpd maxpoll 2
> https://imgur.com/a/ILF9Y
> The offset depends on these things: the stability of the local clock,
> PPS jitter, and loop time constant (controlled by the poll interval).
> A low PPS jitter means you can use a faster time constant, which can
> control the local clock faster when it drifts, which means lower
> offsets.
> https://www.eecis.udel.edu/~mills/ntp/html/discipline.html
> https://www.eecis.udel.edu/~mills/database/brief/algor/algor.pdf
> You can also improve the stability of the local clock by avoiding rapid
> temperature changes. This is the loopstats of a TL-WR841N placed inside
> a box where the temperature doesn't change that fast.
> https://imgur.com/a/eNT0k
>> Thanks,
>> Joachim
> _______________________________________________
> questions mailing list
> questions at lists.ntp.org
> http://lists.ntp.org/listinfo/questions

More information about the questions mailing list