[time-nuts] GPSDO Control loop autotuning

Pluess, Tobias tpluess at ieee.org
Sun Mar 20 17:58:02 UTC 2022


Hi all,

I am still working on my GPSDO also now with added NTP time server. This
one is still work in progress, though.
In the meantime I found another interesting problem. Currently, my GPSDO
uses a PI controller to steer the DAC voltage of the OCXO. This proved to
work very well. (see my source code at https://github.com/tcpluess/gpsdo).
Currently, I use manually determined KP and KI constants for the control
loop. I can adjust them via serial port, of course.
I am thinking about whether it would be possible to implement some sort of
autotuning to this controller to find the "best" set of control
parametersthat give the least jitter.

How could I do this?

one idea is the following:
since I have a TIC that measures the time interval between the GPS-PPS and
the OCXO-derived PPS, I could collect, for example, the last 1000 samples
of this time interval and calculate the 1sec, 10sec, 100sec and 1000sec
averages of this time interval. If the control loop operates "well", the
time intervall should become 10 times smaller when the averaging time is 10
times increased. On the other hand, if the control loop is too slow and the
OCXO is drifting, this assumption will not hold. In the first case, we can
increase the integration time for the control loop (make the loop time
constant larger), in the second case we have to decrease the integration
time (make the control loop faster).
I wouldn't run this autotuning all the time, just maybe once to determine
the optimal loop parameters. However the averaged time interval samples
probably provide some interesting info....
Is there a way to estimate the ADEV on-the-run without having to collect
millions of samples?
I have enough RAM left on my microcontroller to collect maybe 1000, or
probably even 2000 samples. It would be interesting to do something with
this info.


best
Tobias
HB9FSX




More information about the Time-nuts_lists.febo.com mailing list