Author Topic: How accurate is my GPSDO?  (Read 5746 times)

0 Members and 1 Guest are viewing this topic.

Offline picitupTopic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: gb
How accurate is my GPSDO?
« on: February 02, 2018, 01:03:40 pm »
Hi All

I've not posted up for ages but now have a bit of spare time to play.  I have a BG7TBL gpsdo and have wondered how accurate it is for quite some time.  Well it's REALLY accurate.  It must be 'cos it's controlled by atomic clocks.  Sounds good, but is it true?

There's a very helpful document on the Nist web site on using a gpsdo as a primary frequency standards here:

https://www.nist.gov/publications/use-gps-disciplined-oscillators-primary-frequency-standards-calibration-and-metrology

One method it suggests is to send your gpsdo off for calibration and then monitor it's functionality locally to ensure it's still working/tracking etc.  It brings up some differences between a gpsdo and a stand-alone standard like Rubidium.  A gpsdo can lose tracking of the satellites due to interference etc. so you can end up relying what is, in fact an OXCO.

I wanted to measure the accuracy using the kit I have and found another helpful Nist document (which I now can't find) and one of the options was to compare the signal to a high accuracy source.  Good idea, but I don't have anything better.

A second option was count the pulses over a long period of time to improve accuracy.  So if you count a 10MHz signal for 1 second, you get a resolution of 1Hz.  10 seconds would give 0.1Hz, 100 0.01Hz etc.

I have a TTI TF930 10 digit counter which I've been very pleased with although now I need a gating option so I can count for say, 1000 seconds and then stop.  Trouble is, there's no gating electrical gating option neither is there a SCPI solution.

The counter starts as soon as you connect the 10MHz signal and when it reaches 9999999999 it resets to 0 and starts again.  I could time the recording and press the Hold button, but I'm guessing my fingers would introduce a fair amount of accuracy.

There are a number of RF switches on eBay which would do the job, but they are all in China so it could be 6 weeks before they arrive and I'll have lost interest by then.

A bit of poking around and I found that some PIC chips have a CLC (Configurable Logic Cell) this is a bit like a mini PLC (Programmable Logic Controller) where you can define a small logic circuit (AND, OR, NOT, Flip Flop etc) in software.  The CLC is independent of the PIC CPU and so there are no instruction or clock constraints.

If I could knock up a simple 2 input AND gate, one input could go to the 10MHz and another to the 1pps of the gpsdo and the circuit could supply pulses for example 1000 seconds or as long as you need to.

I'm new to the CLC, but if you want to play with it, there's a plugin called MCC (Microchip Code Configurator) with a nice GUI which allows you to design the gates and then will save the source code for you.  It looks pretty handy and easier than trying to configure a logic cell with Binary.

Digging through my pic stuff I found a PIC10F320 which has a CLC and is only 8 pins which should be enough.  The only issue so far is that the documentation for the CLC is poor and I can't find out what frequency it runs up to so I'll have to test that.  I can only check up to 25MHz with my sig gen but that should be good enough.

So if I drive it with the 10MHz and 1pps from my gpsdo, how do I know how good the 1pps is?  Well I've tested that.  A while ago I made a £1.00 atomic clock:

https://www.eevblog.com/forum/projects/t81709/

This was simply a mechanical clock driven by the 1pps from the gpsdo.  It was a fun project, but when I saw how accurate it was, I realised it could be a method of measuring the 1pps accuracy.  Irritatingly I can't run it all the time, as when my daughter has friends stay over it keeps them awake, but it has been run for 3 months continuously, keeping perfect time when compared to:

https://www.timeanddate.com/worldclock/uk/london

so if we say 90 days = 7776000 seconds= better than 0.13ppm

To get more accurate results, I think I'll have to change it for an LED or LCD device so I can leave it on.

Well that's all for now.  Sorry it's so long.  I'll have a play with the PIC chip CLC frequency capabilities and post back up.

Cheers

Steve





If you know what you're doing, then you're not learning anything.
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: How accurate is my GPSDO?
« Reply #1 on: February 02, 2018, 06:22:57 pm »
I have the TTI 930 as well (I now have a Tektronix FC3100 as well).

What I used to do was set the 10MHz oscillator I wanted to test as the reference (connect it to the reference input at the front).

I'd then measure the period of a GPS 1pps output on the maximum 100sec gate. You can connect this up to a computer via RS232 and get back-to-back measurements.

What I also did was convert the measurements back into counts of the 50MHz clock as this helped to remove some noise - the counter outputs a floating point number as a string but it is derived from an integer count of 20 nsec periods, by going back to the integers you can remove the rounding error.

You can then average the measurements over a whole day or what ever period you want.


EDIT : here is the slightly crude c function I wrote to get the periods:

long double clock_period = 20.0E-9; // 50 MHz counter clock

long double get_rounding_error(long int n_event,long double period,long int *n_clock_ticks)
{
   // assumes a clock tick of 20 nanosecs (50 MHz)
   // calculates the size of the rounding error for integer clock ticks
   // assuming n_event is right
   long double total_time;
   long double error_round_down,error_round_up;
   long int n_clocks;

   total_time = (long double)(n_event)*period;

   n_clocks = (long int)(total_time/clock_period);

   error_round_down = fabs(total_time - (long double)(n_clocks)*clock_period);
   error_round_up = fabs((long double)(n_clocks+1)*clock_period - total_time);

   if(error_round_up < error_round_down)
   {
      n_clocks++;
      *n_clock_ticks = n_clocks;
      return(error_round_up);
   }
   else
   {
      *n_clock_ticks = n_clocks;
      return(error_round_down);
   }
}
« Last Edit: February 02, 2018, 06:30:01 pm by jpb »
 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1407
Re: How accurate is my GPSDO?
« Reply #2 on: February 02, 2018, 07:34:35 pm »
Most GPSDOs effetively make the 1PPS by dividing the 10 MHz output down to 1 Hz or generate the 10 MHz output from the 1PPS.  So, the two signals are not independent.  Trying to measure one of them using the other does not work.

Also, if you want to count for say 1000 seconds,  how is your 1000 second gate time generated?  It needs to be more accurate than what you are trying to measure.  It also needs to be independent of what you are trying to measure.
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: How accurate is my GPSDO?
« Reply #3 on: February 02, 2018, 10:52:45 pm »
Most GPSDOs effetively make the 1PPS by dividing the 10 MHz output down to 1 Hz or generate the 10 MHz output from the 1PPS.  So, the two signals are not independent.  Trying to measure one of them using the other does not work.

Also, if you want to count for say 1000 seconds,  how is your 1000 second gate time generated?  It needs to be more accurate than what you are trying to measure.  It also needs to be independent of what you are trying to measure.
I wasn't suggesting using the 1pps from the GPSDO, it would be better to use a separate GPS module producing 1pps.
The TF930 uses continuous measurements so you should be able to add gate times, that is measuring 10 x 100 second gates should give the equivalent of a 1000 second gate.
As to accuracy, the 1pps from the independent GPS averaged over a long period should be accurate, but I agree that you won't be able to get a measure of shorter term accuracy (ADEV). For that some good quality reference is needed (say a good quality OCXO or rubidium).
What I was suggesting was something that would allow the OP to at least check that his GPSDO is working on average even if it wouldn't give an indication of quality in terms of say ADEV at 1 to 100 secs.
 

Offline picitupTopic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: gb
Re: How accurate is my GPSDO?
« Reply #4 on: February 03, 2018, 09:46:41 am »
Hi both

Thanks for your replies.  jpb thanks for the method you used and the code.  I'm not sure I quite understand it but I'll read it a few more times.

texaspyro - this could well be a dumb question, but here goes..... If I can show the accuracy of the 1pps with my £1.00 clock, then what I would be testing is the relationship between the 1pps and the 10MHz and could show the accuracy of the 10MHz signal.

I'm surprised you say that the 1pps can be generated from the 10Mhz as I thought the 1pps came from the gps receiver, which forms the core of all accuracy then this is used to steer the OCXO?  I took a look at a few modules and most have a 1pps output.

Well I'm going to delay this project a bit as my assumptions may be wrong.

Cheers

Steve
If you know what you're doing, then you're not learning anything.
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: How accurate is my GPSDO?
« Reply #5 on: February 03, 2018, 12:11:30 pm »
Just to explain my code (I wrote it for myself as part of another routine - not to be published:)):

If you use the TF930 to measure period (talking to it through the RS232) then it returns floating number. This number though is derived from a simple count - there is no interpolation such as used in more expensive counters - so if the gate time is 100 seconds then it will return (20 nanosecs) * count/100 as a floating point number. This process introduces rounding error - I really wanted the count itself. So I tried to recover the count by multiplying up by the gate time and dividing by (20 nanosecs) and then chose the nearest integer.

This is what the routine is supposed to do, it sets n_clock_ticks to the count and returns the amount of difference from an integer value (the rounding error).
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: How accurate is my GPSDO?
« Reply #6 on: February 03, 2018, 01:51:22 pm »
It's my understanding that when a hardware GPS emits its 1PPS signal that that pulse is derived from the signal chain and is essentially 'carved in stone' by hardware. And the variations from the true time can be quantified and are 'bright lines'. That said, the output varies by certain limits because of the ionosphere's moment to moment variations and other things like that that introduce error that the GPS can attempt to reduce and does but not so much unless they are a timing GPS. Typically the difference is in the nanoseconds and averages out over time.

So a GPS PPS is different than a GPSDO PPS. The GPSDO PPS should be "smoother" and ideally should represent the true time better but if its not designed well won't.

OTOH a GPS PPS is "guaranteed" to be within a small amount (in the case of better ones it could be within a window of just 25 ns or so, 12.5 either way, or even less) of the real time but that said will always have jitter within that range, sometimes a lot of it. (typically sawtooth in nature)


Hi both

Thanks for your replies.  jpb thanks for the method you used and the code.  I'm not sure I quite understand it but I'll read it a few more times.

texaspyro - this could well be a dumb question, but here goes..... If I can show the accuracy of the 1pps with my £1.00 clock, then what I would be testing is the relationship between the 1pps and the 10MHz and could show the accuracy of the 10MHz signal.

I'm surprised you say that the 1pps can be generated from the 10Mhz as I thought the 1pps came from the gps receiver, which forms the core of all accuracy then this is used to steer the OCXO?  I took a look at a few modules and most have a 1pps output.

Well I'm going to delay this project a bit as my assumptions may be wrong.

Cheers

Steve
"What the large print giveth, the small print taketh away."
 

Offline picitupTopic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: gb
Re: How accurate is my GPSDO?
« Reply #7 on: February 03, 2018, 03:53:35 pm »
Hi @jpb I see now.  That's a pretty imaginative way of doing it - I will give that a try although I'm still keen to use the counter function if I can.  If nothing else, I'll have built a gate function for my TF930 which might be useful in the future and also I'm keen to get some experience of the PIC CLC.

@cdev thanks for the info.  I always learn loads from this forum.  I'll take a look inside my gpsdo and find out what kind of gps module's inside which might give me a clue as to the quality.

I think the gpsdo 1pps is looking quite good as it keeps perfect time on my mechanical clock.  It even ticks in sysnc with the time link I put up earlier. I've been looking for an electronic clock module that takes 1pps, but can't find one, so there's another pic project  :) If I have a silent 1pps real time clock, then I can test it over a longer time period and it won't be dependant on my daughter inviting her mates round.  I bet Bill Gates never had that problem.

I'll try and have a play with the clc on the pic tomorrow and see how it performs and post up.

Cheers

Steve
If you know what you're doing, then you're not learning anything.
 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1407
Re: How accurate is my GPSDO?
« Reply #8 on: February 03, 2018, 05:49:36 pm »

texaspyro - this could well be a dumb question, but here goes..... If I can show the accuracy of the 1pps with my £1.00 clock, then what I would be testing is the relationship between the 1pps and the 10MHz and could show the accuracy of the 10MHz signal.

I'm surprised you say that the 1pps can be generated from the 10Mhz as I thought the 1pps came from the gps receiver, which forms the core of all accuracy then this is used to steer the OCXO?  I took a look at a few modules and most have a 1pps output.


The 1PPS output from a GPS receiver has jitter and "sawtooth" error.  The GPSDO basically averages the GPS 1PPS to control the frequency of the 10 MHz oscillator.  Due to the averaging, dividing the 10 MHz down to 1PPS will be much more stable than the raw GPS 1PPS.  Some poorly designed GPSDOs just pass through the GPS 1PPS.
 

Offline Leo Bodnar

  • Frequent Contributor
  • **
  • Posts: 803
  • Country: gb
Re: How accurate is my GPSDO?
« Reply #9 on: February 03, 2018, 07:23:41 pm »
1PPS is generated by GPS hardware simply by comparing its internal timebase with GPS time derived from navigation solutions.
Navigation solution is only produced a few dozen times a second so between these updates the internal timebase remains the basis for estimation of current GPS time.  Internal timebase is a free-running clock usually derived from TCXO or crystal.

GPS unit has carefully calculated correction table.  Typically it has time offset, rate of change, rate of rate of change.  Some chipsets have temperature and voltage correction factors too, independent of TCXO.
Receiver back-calculates some events (like 1PPS) to local timebase - e.g. it estimates when upcoming 1PPS edge should occur in local timebase and sets up a hardware timer to trigger on a certain local time clock.  This is where the sawtooth jitter comes from - local clock is free-running and is quite low in frequency.
All Ublox smarts are still nothing more than Atmel Cortex-M3 running on 48MHz system clock.  But it works so well it has not been fundamentally updated since Ublox 6.  There are more correlators, dual channel receiver and more GNSS timebases but the way it works has not changed.

UTC time is almost the same as GPS time, just corrected with few higher order coefficients.  Timing receivers can derive local timebase from physically steerable external source but this is another story.

Leo
 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1407
Re: How accurate is my GPSDO?
« Reply #10 on: February 04, 2018, 12:21:54 am »
UTC time is almost the same as GPS time, just corrected with few higher order coefficients.  Timing receivers can derive local timebase from physically steerable external source but this is another story.

No, GPS time differs from UTC by the number of accumulated leap seconds since GPS was started.  They currently differ by 18 seconds.  You might be thinking of the difference between UTC and UT1 time?
 

Offline Leo Bodnar

  • Frequent Contributor
  • **
  • Posts: 803
  • Country: gb
Re: How accurate is my GPSDO?
« Reply #11 on: February 04, 2018, 12:51:38 am »
No, GPS time differs from UTC by the number of accumulated leap seconds since GPS was started.  They currently differ by 18 seconds.  You might be thinking of the difference between UTC and UT1 time?
I am using IRN-IS-200H-003 as a reference.
GPS time is steered towards UTC but their start of second can be as far away as a microsecond apart.
There are necessary correction factors that allow you to calculate UTC based on GPS time to about 60ns (I guessed this from 20ns one-sigma target.)
Quote
GPS time may differ from UTC because GPS time shall be a continuous time scale, while UTC is corrected periodically with an integer number of leap seconds. There also is an inherent but bounded drift rate between the UTC and GPS time scales. The OCS shall control the GPS time scale to be within one microsecond of UTC (modulo one second).
The NAV data contains the requisite data for relating GPS time to UTC. The accuracy of this data during the transmission interval shall be such that it relates GPS time (maintained by the MCS of the CS) to UTC (USNO) within 20 nanoseconds (one sigma).

Remember the infamous 13 microsecond cockup?  That was caused by wrong UTC/GPS conversion data.

LNAV contains only offset and rate UTC correction but CNAV added second order correction coefficient A2-n.

Leo

P.S. There was a heated argument on timenuts list recently and somebody was expelled from the group over the fact that former 90ns one-sigma UTC-GPS target was reduced to 20ns in 2016.
« Last Edit: February 04, 2018, 12:58:29 am by Leo Bodnar »
 

Offline picitupTopic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: gb
Re: How accurate is my GPSDO?
« Reply #12 on: February 15, 2018, 11:14:26 am »
Hi all

After a short delay I've come up with a PIC project.  It was inevitable really.  The basic spec is as a display for my gpsdo with the following features:

1) Use a logic gate to act as a gate function for my TF930
2) Implement a frequency counter for the 10Mhz with a variable (long) gate time
3) Read the NMEA and provide stats on an LCD screen

I'm not sure how much of this I will implement, but here goes:

Searching for a pic chip with the following specs:

32 bit chip to allow 64 bit long long integers for counting big numbers (long gate times)
64 bit counter but one does not exist so 2 x 16bit chained is OK
At least 1 CLC (configurable Logic Cell) for the hardware gate for the TF930
A couple of serial ports - 1 for NMEA 1 for control
DIP package - I have some DIP PIC PCBs

After poking around on the Microchip MAPS web site here:

http://www.microchip.com/maps/

I found the only contender which is PIC32MM0064GPL028.  It's less than £2.00 to buy, has Schmitt triggers on all input pins and 5 5v tolerant pins which is handy for the LCD and comes in a 28 pin skinny PDIP.

I wanted a reflective LCD so I can read it in sunlight with large digits.  The one chosen was a Midas MC41605A6W-SPR 4x16 with 5mm digits and works off 5 volts.  Maybe it will be possible to interface to it with just the 5 lines available on the PIC?  We'll see.  The controller is a Sunplus SPLC780 which I understand is a hd44780 clone so hopefully it will be possible to blag a driver from somewhere.

So stage 1 is to knock up the board with the chip and the programmer.  Then flash an LED.  Yup that's where I always start lol.

Next will be to program the CLC as a gate function for the TF930.  I'll check the performance up to 25MHz which is top top value of my sig gen and report back.

Onward and upward....

Steve


 
If you know what you're doing, then you're not learning anything.
 

Offline lars

  • Regular Contributor
  • *
  • Posts: 132
  • Country: se
Re: How accurate is my GPSDO?
« Reply #13 on: March 12, 2018, 09:01:40 pm »
If your goal just is to check your 10MHz GPSDO with a GPS module or another GPSDO with 1PPS out, a simple Arduino with just a few other components can give you nanosecond resolution for less than 10USD. See my GPSDO that also works well as a time interval counter (TIC).

https://www.eevblog.com/forum/projects/lars-diy-gpsdo-with-arduino-and-1ns-resolution-tic/

In the instruction you find how to set it up with Timelab to get frequency and time error, ADEV etc. ADEVs down to 8E-10/sec is possible to get. In 15 minutes (1000secs) you have 1E-12 resolution for frequency, good enough to check rubidiums also.

I don´t know if it is possible to use LadyHeather with the tab-separated output from the Arduino. Second value is time error and third DAC value and fourth temperature. Would be nice to use two different ports one for the GPS module and the  second for the Arduino GPSDO output.
 
Lars
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf