Author Topic: My GPSDO project  (Read 10209 times)

0 Members and 1 Guest are viewing this topic.

Online iMo

  • Super Contributor
  • ***
  • Posts: 4675
  • Country: nr
  • It's important to try new things..
Re: My GPSDO project
« Reply #25 on: June 19, 2018, 03:55:59 pm »
..I checked the F303's datasheet, and it says that the PLL has a worst case jitter of 300 ps per design. I wasn't expecting a 20..30 Hz frequency modulation..
I did with stm32F103, PLL freq measured against OCXO based fmeter. Below the measurement (it was 72/2=36MHz at the output, last 3 digits shown on Y axis).
« Last Edit: June 19, 2018, 04:02:31 pm by imo »
 

Offline Mrt12Topic starter

  • Regular Contributor
  • *
  • Posts: 132
  • Country: ch
Re: My GPSDO project
« Reply #26 on: June 19, 2018, 06:55:23 pm »
@Tom

there is an OM in Germany who owns a company called AXTAL. He manufactures OCXOs. I told him that I need <-150dBc phase noise, and he selected one of his devices. He even gave me an 'OM discount', which is absolutely awesome. I got the OCXO with the associated test report, showing that my desired phase noise and harmonics specs are met.

@imo:
interesting. I would never think the STM32 PLL is that bad. But you are right, I disabled the PLL, and now, my frequency is spot on compared to the professional GPSDO. The phase drift is around 0.1deg/min, which is quite nice I think. I let the GPSDO run over night and check the drift tomorrow, I am curious whether it will improve as the device runs for a longer time.
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: My GPSDO project
« Reply #27 on: June 19, 2018, 08:22:15 pm »
@Tom

there is an OM in Germany who owns a company called AXTAL. He manufactures OCXOs. I told him that I need <-150dBc phase noise, and he selected one of his devices. He even gave me an 'OM discount', which is absolutely awesome. I got the OCXO with the associated test report, showing that my desired phase noise and harmonics specs are met.

James Miller used AXTAL ocxos in his gpsdo:
http://www.jrmiller.demon.co.uk/projects/ministd/frqstd.htm
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4675
  • Country: nr
  • It's important to try new things..
Re: My GPSDO project
« Reply #28 on: June 20, 2018, 06:52:05 am »
@imo:
interesting. I would never think the STM32 PLL is that bad..
PLLs of all MCUs are bad for this kind of applications.. :)
 

Offline Mrt12Topic starter

  • Regular Contributor
  • *
  • Posts: 132
  • Country: ch
Re: My GPSDO project
« Reply #29 on: June 23, 2018, 06:29:00 pm »
Today I implemented a very simple control software for the GPSDO. I used a HP 53131A counter to measure frequency, and it looks like the GPSDO has reached 10.000 000 000 MHz after approx. half a day. I used the commercial GPSDO as reference for the counter.
What I now would like to do is to implement a more sophisticated control algorithm which allows for faster lock times, i.e. the GPSDO shall reach 10.000 000 MHz after, say, a few minutes. I think this could be possible with a PLL, no?
My first idea for the PLL was that I use a 'reference phase' variable, which is incremented each second by 10000000. The captured timer value is compared to the reference phase, the difference is used for DAC steering.... is such an approch theoretically possible? my first experiments showed it is quite unstable and does not lock at all. The other approach is to subtract the previously captured value from the current one and the difference needs to be 10000000 all times.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4675
  • Country: nr
  • It's important to try new things..
Re: My GPSDO project
« Reply #30 on: June 23, 2018, 09:43:07 pm »
Quote
My first idea for the PLL was that I use a 'reference phase' variable, which is incremented each second by 10000000. The captured timer value is compared to the reference phase, the difference is used for DAC steering....
All similar methods suffer from following issue - your "sampling resolution" is always 1 ref clock (or 1 counter count). You have to go much deeper, many orders of magnitude inside the 1 counter count (the phase difference), as within the phase difference (0..1clock_duration) all the miracles happen :)

When you want to get the phase difference fast (at each "sample") the way to go is in the "analog time" domain - for example with a "time interpolator" (ref_edge to sample_edge time difference converter).

Thus at each sample you get the digital counters differences (new-old with 1 count resolution) AND the time difference hidden within the 1 count (a fraction of the 1 count). By combining both values you may get ~ps resolution at each sample. With such an value you may drive your OCXO (via DAC) fast, without waiting many hours till you get a "good average"..

PS: this approach assumes an "ideal" ref freq source. With jitter and sawtooth coming from a gps module you have to make some avaraging/lowpassing, sure.

Btw - the "sawtooth error" with GPS modules - I think it has nothing to do with GPS but rather with sub-optimal mcu's PLL design used in those modules (you can see the sawtooth error without involving any GPS into the measurement, as I wrote above).
« Last Edit: June 24, 2018, 10:39:28 am by imo »
 

Offline Mrt12Topic starter

  • Regular Contributor
  • *
  • Posts: 132
  • Country: ch
Re: My GPSDO project
« Reply #31 on: June 24, 2018, 11:37:35 am »
sure, I know about the interpolators. The HP 5335A counter for instance also has a start and stop interpolator. This is the reason why I wanted to use the PLL, to increase the resolution. I also thought about making an analog interpolator, but I only found very little useful information. I would like to make a second version of my GPSDO later, as I already see some drawbacks of my simple approach - but next time with an analog interpolator :-) can you give some hints about this topic?

Does not using an interpolator mean that my GPSDO is useless, or does it only mean that it takes longer until it locks? I mean - after 1000 sec, I can also measure 1 mHz frequency deviation. I expect the ideal loop time constant being around 1000 sec.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4675
  • Country: nr
  • It's important to try new things..
Re: My GPSDO project
« Reply #32 on: June 24, 2018, 11:57:55 am »
Quote
Does not using an interpolator mean that my GPSDO is useless, or does it only mean that it takes longer until it locks? I mean - after 1000 sec, I can also measure 1 mHz frequency deviation. I expect the ideal loop time constant being around 1000 sec.
Using a time interpolator for getting the "numeric value" of the phase difference is required when you want to get the precise information at each sample interval (ie. you get 10000000.5673 counts as the result at each sample).

When not using the phase value your measurement is of +/- 1 count resolution and you have to average those "integer" counts within say 1000secs to get the "fraction of the 1 count" hidden inside (your "milliHertz resolution").
Both methods are theoretically "identical" when talking longer measurement periods (and some other assumptions).

Quote
..but next time with an analog interpolator :-) can you give some hints about this topic?

All modern ($$) counters use a kind of an interpolator.

The analog ones are easier to make - ie. a ramp generator started by ref edge and stopped by the signal edge and the actual ramp voltage sampled by an 10-16bit ADC (for example 0.000ns phase difference reads 1Volt and 99.999ns reads 4Volts off the ramp, provided your 1 count is 100ns). The ramp generator could be a simple capacitor charged via a current source (to get a linear readings).

The ADC value is then converted to the "1 count fraction", and combined with the integer counter's value (or better to say "combined with the counter's ratio") you will get those 10000000.5673, as an example.

What the modern counters also do is they use "sampling" of a continually running counters (ref/signal) without zeroing their values between the measurements (and they do "new-old"). Therefore you are not loosing the phase's trend information.

That counters are ie. called  "reciprocal counters with time interpolators". You may do, for example, 1000 measurements/samples per second with a milliHertz resolution (with some math involved).



« Last Edit: June 24, 2018, 12:55:34 pm by imo »
 

Offline mino-fm

  • Regular Contributor
  • *
  • Posts: 142
  • Country: de
Re: My GPSDO project
« Reply #33 on: June 24, 2018, 12:57:05 pm »
Quote
You may do, for example, 1000 measurements/samples per second with a milliHertz resolution (with some math involved).

1000 samples per second, 1 mHz resolution, @ 10 MHz? I think that's not realistic.
The easiest way of interpolation is using a TDC7200. It works well at 10 MHz to give 100 ps resolution. This is 1000 times better than using the 10 MHz clock only.
« Last Edit: June 24, 2018, 12:59:09 pm by mino-fm »
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4675
  • Country: nr
  • It's important to try new things..
Re: My GPSDO project
« Reply #34 on: June 24, 2018, 01:09:05 pm »
For example the TDC7200 is the "digital" type of an interpolator, running a "ring oscillator" on the chip as the ref clock (perhaps in a few GHz region) while measuring the number of ref clocks between the start-stop edges.
 

Offline Mrt12Topic starter

  • Regular Contributor
  • *
  • Posts: 132
  • Country: ch
Re: My GPSDO project
« Reply #35 on: June 24, 2018, 01:47:08 pm »
yup, I also do the sampling of the free running counter. The counter never stops, but at the 1PPS rising edge, the counter value is captured into another register which can be read  later.
The interpolator with the capacitor is actually all I know about the interpolators. I am afraid that this won't work with my OCXO because I have a sine wave, and I would need to convert it to square to trigger the interpolator.... which is pointless because I actually do want the sine! and do I need to charge the capacitor on every rising edge of the clock, such that the capacitor is fully charged after 100 ns? Because I never know in advance at which clock edge the next PPS pulse arrives... and then, when do I discharge the capacitor? what if the PPS pulse arrives during discharge? there are lots of questions, and I was too unsure about the start and stop interpolator, this is why I decided to make my first approach without interpolator and see what results I can achieve.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4675
  • Country: nr
  • It's important to try new things..
Re: My GPSDO project
« Reply #36 on: June 24, 2018, 01:56:09 pm »
Code: [Select]
..there are lots of questions..Yes, you are right. I built such a counter and it is not easy as the  >:D is literally in every detail :)
For your GPSDO project: If I were you I would start with some proved and well documented design, and I would do small step enhancements when the stuff works..
« Last Edit: June 24, 2018, 01:58:52 pm by imo »
 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1407
Re: My GPSDO project
« Reply #37 on: June 24, 2018, 05:25:24 pm »
Search for "Lars GPSDO".  He implements a very simple interpolator based GPSDO on an Arduino.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf