[time-nuts] Phase measurement of my GPSDO

Attila Kinali attila at kinali.ch
Fri Mar 20 10:41:11 UTC 2020


On Thu, 19 Mar 2020 20:32:30 +0100
Tobias Pluess <tpluess at ieee.org> wrote:

> The GPS phase detection happens on page 3. I use the TDC7200 as
> interpolator.
> Inside the STM32 microcontroller, I let a timer run with the 10MHz clock.
> The timer overflows to 0 when it reaches the value 9999999.
> Further, the 1PPS pulse from my GPS module triggers the interpolator, and
> is delayed by max. 2 clock cycles. The delayed signal stops the
> interpolator and is used as a capture event of the timer.
> So, when the OCXO has the right frequency, the captured value would always
> be the same. To determine the phase, I use the following code:
> 
> if(captured value >= 5000000)
>     phase = 10000000 - captured value;
> else
>     phase = -captured value;
> 
> with the aid of this bit of code, my phase value is always perfectly in the
> interval -5000000 to +5000000. My test today was to let the OCXO run with a
> fixed voltage at its EFC input, while I recorded the resulting phase data.
> My recorded data is here:
> 
> https://hb9fsx.ch/files/gpsdo/phase.txt


I guess the units here are cycles of 10MHz/100ns?

BTW: keep in mind that you might run into metastability effects.
Depending on what the exact phase relation between your 10MHz
signal and the internal clock of the STM32 is, you might or might
not get a +/-1 cycle uncertainty due to metastability.

> 
> Now I made two plots (here: https://hb9fsx.ch/files/gpsdo/phase.png). The
> upper is the raw phase data, and I also fitted a linear function to it
> (i.e. if the OCXO has a constant frequency but has some offset from 10 MHz,
> the phase would drift linear into one direction - at least I expect it to
> do so).
> The lower plot is what results when I subtract my linear fitted function
> from the measured phase. I am wondering whether this makes some sense? One
> can see some wiggles and ripple, especially between sampel 0 and 3000. Is
> this the GPS jitter I see there?

Yes, it makes sense. I would have done a quadratic fit, as your OCXO
is just starting up and thus will have a "large" linear frequency drift,
which results in a quadratic phase drift.

The wiggles in the beginning could be uncorrected saw-tooth as Bob mentioned.
That would aproximately fit the quantization that the u-blox modules have
from their 24MHz clock. The change in the wiggles could be hanging bridges,
but it's hard to see. 

With your antenna position you will also get quite high jitter on the PPS
due to not many satellites being visible. Make sure you are running on
a well surveyed position hold to mitigate this. Or get your antenna outside.
See also the measurements that Said Jackson did a few years ago:

http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2012-December/055731.html
http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2012-December/055774.html

BTW: there were some quite interesting discussions about GPSDOs in
late 2012 and early 2013. Might be worth a read.


> Further, I also imported this phase data into Timelab and determined the
> ADEV. Here is my plot:
> 
> https://hb9fsx.ch/files/gpsdo/timelab.png
> 
> This trace is kind of what I expect, but since I use a OSA/UCT 8663 double
> oven OCXO, I would have expected it to be much lower. Something in the
> 1e-12 regime perhaps? is that realistic?

You are measuring your OCXO against GPS. At short tau, GPS is going
to dominate your ADEV. See http://www.leapsecond.com/pages/m12-adev/
for reference.
BTW: You can tell the difference in MDEV. At taus >1s the OCXO
will be clearly in the flicker phase regime, while GPS will still
be in the white phase regime up to 1000-10ks.

The Timing Appnote of u-blox GPS.G6-X-11007 might give you additional
information on the expected behaviour of the u-blox modules:
https://www.u-blox.com/sites/default/files/products/documents/Timing_AppNote_(GPS.G6-X-11007).pdf

To see the actual performance of the system, you need to measure it
against a stable reference. If you have I would recommend using
a combination of 2 or more references: one stable, free running
OCXO (e.g. OSA 8607 or FE-405), an Rb standard (LRPO or PRS-10).
This way you have something that is more stable than your GPSDO
at (almost) all taus. Of course, to be sure that what you are
measuring is actually the performance of the GPSDO and not your
reference, you need to have at least 2 of each type and then
do an n-cornered hat. And yes, beyond one day, this will not
help you as the instability of the Rb standard will be the
limiting factor. That's when take out your Cs beam standard
and start measuring for real ;-)

And yes, characterizing your GPSDO is the biggest problem
of building one. Soon you will be building lots of
measurment equipment to characterize your GPSDO, get more
gadgets and gear until your garage is full of atomic clocks :-)

> As one can see at tau=800s, the
> ADEV is around 5e-11, so is this really all I can expect from this very
> sophisticated OCXO? (However I should maybe add that the OCXO is brand-new
> and has never been used before, so maybe it has some initial aging?).

Have you had a look at John Vig's Oscillator tutorial? There
are a few versions of it on Didiers site: 
http://www.ko4bb.com/getsimple/index.php?id=manuals&dir=02_GPS_Timing/John_Vig_Tutorials_on_Crystal_Oscillators
It explains how crystal oscillators start up and how their frequency
changes over time. BTW: the newer ones focus slightly more on atomic
clocks, which makes it worthwhile to have a look at the older ones
for this kind of thing.

> I have no plots about the temperature, but this is quite constant.
> For the GPS module, I used an active outdoor antenna at the window ledge.
> Not optimal, but better than an indoor desktop antenna, I guess.

Good sky view is paramount for a good GPSDO performance. Whether
you see only half the sky or have a full view already makes a big
difference. When I got my institute to disregard the fire/lightning
protection rules and let me put an antenna on the roof instead of
just out of my window (looking straight south), I saw almost an
order of magnitude improvement in adev at short tau.


			Attila Kinali
-- 
Science is made up of so many things that appear obvious 
after they are explained. -- Pardot Kynes




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