Re: [time-nuts] Digital temperature compensation

2014-11-02 Thread Daniel Drown
On 11/1/2014 6:03 PM, Hal Murray wrote: dan-timen...@drown.org said: I'm experimenting with using a temperature sensor to estimate local oscillator frequency changes. My goal is to have a decent holdover clock for a NTP server with not so great GPS antenna placement. This is for ntpd rather

[time-nuts] Digital temperature compensation

2014-11-01 Thread Dan Drown
I'm experimenting with using a temperature sensor to estimate local oscillator frequency changes. My goal is to have a decent holdover clock for a NTP server with not so great GPS antenna placement. I've been sampling temperature every minute, measured by a DS18B20. I've been measuring

Re: [time-nuts] Digital temperature compensation

2014-11-01 Thread Bob Camp
Hi This sort of thing is normally done with a precisely controlled temperature chamber and multi day temperature ramp runs. Even then there is a bit of “wonder what that was, let’s try it again”. If you are looking at a crystal oscillator, what you have is a perturbation in the frequency /

[time-nuts] Digital temperature compensation

2014-11-01 Thread Mark Sims
You could try submitting your data to zunzun.com It will fit it to around 40,000 different curves and find the best ones. Beware that with all curve fitting formulas, once your live data starts to wander out of the range of your original curve fit data, things can go rather badly...

Re: [time-nuts] Digital temperature compensation

2014-11-01 Thread Dan Drown
Ok, I hadn't considered rate of change. This data is currently 3 day's worth and seems to repeat itself on both days at the same temperature point. Attached is a time based graph to show that. The ppm axis (on the right) is inverted to make it easier to see the relationship between the

Re: [time-nuts] Digital temperature compensation

2014-11-01 Thread Dan Drown
I gave zunzun a try and the one with the lowest root mean squared error was: f(x) = a( x**0.5) + b( x ) + c( sin(x) ) + d( cos(x) ) It got 0.202 RMSE, so I guess I'll stick with my original function as it seems to be closer to what I expect will happen at colder/hotter temps. You have a

Re: [time-nuts] Digital temperature compensation

2014-11-01 Thread Bob Camp
Hi On Nov 1, 2014, at 5:09 PM, Dan Drown dan-timen...@drown.org wrote: Ok, I hadn't considered rate of change. It’s one of the limits on this sort of thing in general. It’s even more of an issue with a coupled mode like the one you show. Since there are an enormous number of possible

Re: [time-nuts] Digital temperature compensation

2014-11-01 Thread Hal Murray
dan-timen...@drown.org said: I'm experimenting with using a temperature sensor to estimate local oscillator frequency changes. My goal is to have a decent holdover clock for a NTP server with not so great GPS antenna placement. This is for ntpd rather than chrony, but it's a good read:

Re: [time-nuts] Digital temperature compensation

2014-11-01 Thread Chris Albertson
If this is just for holdover then I don't think you even want a general solution. Have the controller always keep the last few days of data for temperature vs. EFC value. Then if GPS fails use the most recent data for the current temperature. This makes for a self adapting system accounting for

Re: [time-nuts] Digital temperature compensation

2014-11-01 Thread Alan Melia
-nuts] Digital temperature compensation I gave zunzun a try and the one with the lowest root mean squared error was: f(x) = a( x**0.5) + b( x ) + c( sin(x) ) + d( cos(x) ) It got 0.202 RMSE, so I guess I'll stick with my original function as it seems to be closer to what I expect will happen

Re: [time-nuts] Digital temperature compensation

2014-11-01 Thread Dan Drown
I think you have a good point - any model is going to have a larger error than the data itself. I'll be looking into this. Quoting Chris Albertson albertson.ch...@gmail.com: If this is just for holdover then I don't think you even want a general solution. Have the controller always keep