Evaluating and predicting the XO drift

Achim Gratz Stromeko at nexgo.de
Sat Jan 14 20:44:44 UTC 2017


I had a detailed look at the loop statistics I collected for the past
month where I was running the rasPi2B very near the zero TC point of its
XO.  The last month had no configuration changes or too large glitches,
so finally some data that doesn't need manual fixing.

As mentioned earlier, to extract the temperature dependence from data
over a period of more than a few days, you also need to take the crystal
aging into account.  So far I was using linear aging, but it turns out
that as you look back further than about a week or two you start to see
that the aging slope gets steeper and steeper.  So this means that for
working with longer time periods you really need to use logarithmic
aging as the crystal guys say you should.  The temperature curve is a
downward parabola for the rasPi.  Note again that the temperature
measured is that of the SoC and the actual temperature at the XO is
expected to be smaller.

So the model ansatz is:

aging(t)  = a1 * ln( t + a0 )
ppm(t, T) = aging(t) + p1*( T - T0 )^2 + p0

It is important to only use "good" data for the model extraction, so I
chose the data points where the time offset was less than 10ns (about 5%
of the total data).  That still gives a few duds where a transient
crosses zero, but those only have neglible impact.  Using the median 50%
of the data works also, but makes the convergence much slower and the
plot far too busy to read.  It's also important to chose starting
parameters relatively close to the eventual solution since trying to get
five parameters out of still quite noisy data will not converge or only
slowly otherwise.  The initial parameters were iteratively extracted
using linear aging, which needs one parameter less and is therefore
numerically more stable.  The final extraction then used logarithmic
aging and simultaneous extraction of all parameters.  The opening of the
parabola seems slightly too flat, this is likely caused by the fact that
I have many more data points to the left of the cusp and I would need to
give more weight to the fewer data points to the right during the model
extraction.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppm_rasPi2B.png
Type: image/png
Size: 137056 bytes
Desc: not available
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170114/bc46d53e/attachment.png>
-------------- next part --------------

In order to assess the validity of that model for feed-forward
computation, I've also used the first three weeks of data to extract the
model and then use that result to predict the last week of the data.
I'm happy to say that this prediction only has a very slightly larger
deviation from the actual loop statistics than the fully fitted model
(within ?1ppb absolving from the occasional glitches).  Any feed-forward
computation inside the NTP daemon would have to use a more robust and
less computationally intensive model extraction though.  For a few hours
of extrapolation (to ride out a GPS glitch, say) a periodically updated
linear aging model should suffice, while the temperature model could use
fixed parameters determined by offline computation.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds


More information about the devel mailing list