[time-nuts] Re: Tuning a GPSDO loop for optimal disturbance handling

Erik Kaashoek erik at kaashoek.com
Sat Mar 5 16:56:13 UTC 2022


Hi Bob,
Thanks again!
Here is a run with the parameters from the simulation. Performance is a 
bit worse as I'm using a GPS antenna on the desk next to the DUT where 
the simulation was using a good signal PPS recording.
The Timer/Counter/GPSDO is measuring a 10MHz signal from the house 
standard and the frequency, phase and ADEV plots are attached.
The frequency plot shows a weird oscillation pattern, possibly because 
there is some leakage from the 10MHz TCXO into the counter input used 
for the 10MHz Rb signal. This pattern does not show when the 10MHz 
output of the Timer/Counter/GPSDO is measured against the Rb.
Frequency differences are still too high,  up to 2e-9.
The Phase plot shows some drifting (below 1e-7s ) but that is comparable 
to the PPS drift with a not optimal antenna.
The ADEV is good enough.
I'm happy with these first results, mostly because the simulation and 
actual run do compare and there are still many possible improvements, 
both in HW and SW.
And Bob, yes, I did the towel test and its nice to see the TCXO do a big 
drift as the cold draft disappears and after some time the TCXO becomes 
much more stable, this measurement was with towel.
The best voltage meter available has only a 4 digit resolution so once 
in lock the setting of the high dac (12 bit * 100) is fixed and only the 
low dac (12 bit) is used of which the lsb is just observable as a  
3.9e-11 frequency change
For long term testing a 2.5 hour internal buffer is available to record 
every second the  measured PPS phase error, the DAC setting and the 
measured frequency of an input getting the 10MHz Rb signal.
This will help to see what weird things will happen and using the Rb 
reference it is possible to see if the PPS is causing problems or the 
control loop or its the TCXO, it may even be possible to use the 
recorded data as input for simulation to test if it is possible to 
improve the loop parameters.
Erik.


On 5-3-2022 15:42, Bob kb8tq wrote:
> Hi
>
> If simulation is going to be precise, you need a pretty good noise
> model for all of the various things that get in the way. You can come
> up with those models, but it isn’t going to be easy. Generally, once
> you get the device running, you switch to working with it rather than
> doing simulation.
>
> Either way, you still are tracking down nutty little issues. What your
> issues are will be different than what somebody else’s are.  Your DAC
> sum doesn’t quite do things right. The sensitivity of the TCXO changes
> with EFC voltage ( or frequency offset, whichever you prefer ). The
> GPS module does something weird every 1219 seconds. Lots of fun
> stuff to chase down. This *is* why you need to be able to run comparison
> tests and likely a lot of comparison tests.
>
> Getting 1x10^-9 frequency accuracy out of a TCXO based GPSDO is
> not easy. 1x10^-9 ADEV at 1 second is a bit easier. The “best of the best”
> with a TCXO is not a lot better than your frequency goal. That “best of the
> best” likely does not use a $1 TCXO. ( Which is in no way saying that
> you don’t have a pretty good TCXO….).
>
> Taking care of the corner cases is a part of GPSDO design. It needs to
> be done simply to keep the device from going nuts far more often than a
> reasonable customer would tolerate.
>
> What this or that design will run into is somewhat unique to that design. This
> BOM / spec will have a different set than another BOM and another spec.
> They both will bump into bothersome corners pretty often.
>
> So what to do:
>
> 1) Start looking at the DAC voltage with something that gets you into a
> voltage resolution equivalent to <= 1x10^-10 frequency.
>
> 2) Toss a beach towel over the breadboard and see if that helps. ( =
> take out random drafts ).
>
> 3) Monitor the PPS out of the GPS module against your Rb to see how
> it’s doing. ( = does it jump right at the points the frequency goes nuts …)
>
> 4) Look at the TCXO in “free run” in the breadboard. How stable *is* it?
> Phase and frequency plots are the thing to look at. ADEV comes later.
> Manually tune the DAC to get it close.
>
> Bob
>
>> On Mar 5, 2022, at 3:48 AM, Erik Kaashoek <erik at kaashoek.com> wrote:
>>
>> For any good GPSDO you may want to eliminate all kind of disturbances but in a cheap portable GPSDO this may not be possible.
>> To learn about tuning the parameters of such a GPSDO the phase versus a Rb of a 10MHz TCXO exposed to realistic temperature changes was recorded. (attached)
>> The changes in temperature caused frequency errors up to 2e-8 with frequency changing up to 5e-9 in one minute, far above the target frequency stability of 1e-9.
>> The phase error ranged between +1.2e-5 s and -1.8e-5 s, also much larger than the maximum phase error target of 1e-7 s
>> Next a recording was made of the phase versus a Rb of the PPS of a GPS with good antenna location (attached)
>> Using these recordings a simulation for various loop parameters was done using the gpsim1 tool made by Tom Van Baak.
>> Timelab plots of the frequency difference, phase difference and ADEV where made showing the TCXO in red and the simulated performance of the controller for various kp and ki values
>> Although experimenting with different parameter tuning will for sure require more time the following learning's where collected
>> A kp of 0.01 sufficiently reduced the impact of the jitter in the PPS
>> A ki of 0.0001 was not enough to reduce the phase error below 1e-7, a ki of 0.001 was needed but this led to some instability.
>> Increasing the kp to 0.05 removed the instability in the phase but the impact of jitter in the PPS on the frequency error grew to just below 1e-9.
>> Decreasing the kp below 0.01 caused too much instability when a ki of 0.001 was used.
>> No useful value of kd was found as increasing the kd caused the PPS jitter to directly impact the frequency error.
>> The value of kii set to to zero for all simulations.
>> Next step is to measure the actual performance of the GPSDO using these parameters and to simulate and test the impact of a not so good PPS.
>> Any suggestions for directions of further tuning exploration?
>> Erik.
>>
>>
>> <TCXO_drift.csv><GPS_good.csv><Freq_diff.png><Phase_diff.png><ADEV_tuning.png><Phase_diff_residue.png>_______________________________________________
>> time-nuts mailing list -- time-nuts at lists.febo.com -- To unsubscribe send an email to time-nuts-leave at lists.febo.com
>> To unsubscribe, go to and follow the instructions there.
> _______________________________________________
> time-nuts mailing list -- time-nuts at lists.febo.com -- To unsubscribe send an email to time-nuts-leave at lists.febo.com
> To unsubscribe, go to and follow the instructions there.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Measured_freq.png
Type: image/png
Size: 124278 bytes
Desc: not available
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20220305/dede94df/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Measured_phase.png
Type: image/png
Size: 47833 bytes
Desc: not available
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20220305/dede94df/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Measured_ADEV.png
Type: image/png
Size: 64235 bytes
Desc: not available
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20220305/dede94df/attachment-0002.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Measured.tim
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20220305/dede94df/attachment.ksh>


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