[time-nuts] Re: My new GPSDO design

Magnus Danielson magnus at rubidium.se
Tue Jul 29 13:53:58 UTC 2025


Hi Tobias,

On 2025-07-28 14:16, Pluess, Tobias via time-nuts wrote:
> Hello Attila,
>
>> Would you mind sharing what kind of issues you had?
>> Your design looked very nice, as far as I remember.
> sure. Indeed my design was working nicely, but it lacks a good interface
> for easily adding a Raspberry (or similar device) for ethernet
> connectivity. Further, it also lacks connectivity for the 1PPS serial
> output, and the DAC output has no filter circuit, so if some kind of
> oversampling would be used on the DAC, it could not be filtered properly.
> Besides that, I wanted to use one of the newer u-Blox modules as they offer
> even better 1PPS performance.
Several small problems that all sounds like fun! :)
>
>> The noise in the sawtooth corrected PPS is still several orders of
>> magnitude larger than resolution of the TDC7200. The only important
>> bit here is that the uncertainty contribution (noise, bias, etc)
>> of the TDC is below that of the PPS output of the GPS, which holds
>> for the TDC7200, as far as I am aware of.
> actually, you are right here. The TDC7200 claims to have 55ps uncertainty.
> Let it be 10 times worse, 550ps, and it is still much better than what the
> GPS module can provide. So in this regard, it is probably sufficient and it
> will not make much sense to aim for higher TDC resolution, right?

Well, if you get the sawtooth correction, which tells you how far off 
the PPS pulse was forced to be compared to where the GNSS module wanted 
it to be from the GNSS time solution, and you get your TIC to tell you 
how far away your 10 MHz oscillator was, you can use the PPS as a 
transfer oscillator to get the difference between the GNSS solution and 
the oscillator, and now the TIC resolution compared to GNSS sawtooth 
corrected resolution becomes relevant.

So, using the sawtooth correction helps considerably. The TDC7200 is 
still most likely sufficient thought.

>
>> I am pretty sure that's not just a PWM but a delta-sigma modulator.
>> I would go with the same on the DAC. Implement a second oder delta-
>> sigma modulator on your µC and filter your output. This would give
>> you log_2(sampling rate / BW) * 2.5bits additionally to the 16bit
>> you have from the DAC8551. I.e. If you sample at 100ksps and have
>> an output filter bandwidth of 100Hz, you'll get log_2(100k/100)*2.5bits
>> which is about 24 bits. Realistic would be some 5-15 bits more, depending
>> on the exact behaviour of the DAC. Please note that this approach
>> only works because the non-linearity due to the DAC's behaviour
>> will be compensated by the control loop. We can't easilly build
>> DACs with an ENOB of more than 20bits (there are ways, but they
>> become expensive very quickly and have lots of caveats)
> in fact, there is two possible solutions. What I call the "PWM DAC" I did
> somewhat copy from the commercial GPSDO. They use some kind of analog
> switch that is controlled by a PWM signal from an FPGA, and it switches the
> input of the analog lowpass filter either to +5V or 0V. The filter then
> averages and creates the actual analog output voltage. I aimed here for a
> similar solution. As I am not using a FPGA but a normal microcontroller
> instead, it has no hardware solution for pulse density modulation
> (delta-sigma modulation). So I would try it with PWM.

PWM will put you in the worst possible situation. You want to push the 
noise up to as high frequency as possible, and the sigma-delta option is 
for sure a good way of doing that to simplify the analog filtering to 
ensure good performance.

>
> The other method is modulating the DAC output. In my case, the DAC has 16
> bits, but I imagine I can increase this (by how much I am not yet 100%
> sure) by modulating the DAC in a delta-sigma style. For example, I would,
> instead of just once per second, update the DAC 100 times per second. Then,
> if I want to output the digital code 1000.5, I would output alternating
> 1000 and 1001, and the DAC's output would then swing between the two
> voltages. The Sallen-Key lowpass filters out the harmonics and settles to
> the average voltage. Makes sense?

Makes sense. The higher the oversampling, the higher up you can push 
noise from the modulation and make the filtering easier.

Doing the modulation right, and fancy filtering can be relieved to 
simple RC-link, with relatively high cut-off frequency, which is what 
you want.

>> An easy way to do this, both estimating temperature dependence and
>> aging, is to use a Kalman filter. This will give you a decent estimate
>> with low memory and computational effort. Start first with a linear
>> aging estimator and, once you got it stable, use a quadratic one.
> indeed, this would be very interesting! I am familiar with state space, but
> I have not employed Kalman filtering for a long time and would have a
> though start with this. Can you give a couple hints?

Already a PI-loop controler is really a state-variable filter which 
state-estimates. The Kalman filter modelled for a phase and frequency 
linear model is really the same thing, but it auto-tunes the 
time-constant depening on the noise. The somewhat tricky part is to 
ensure that the noise model for the oscillator matches up with the 
actual oscillator, and secondary that the tuning of the Kalman does not 
create an unnecessarily resontant loop. As the Kalman converges, it ends 
up being the same as the PI-loop controller. The "optimal" part is how 
it settle it's parameters and gets there, not steady state performance.

Already the Wikipedia page for Kalman filter helps you and very simple 
state model for phase and frequency.

> As for the data collecting, yes, I am not even sure what kind of data needs
> to be collected, as the environment temperature also has an effect. On the
> other hand, it seems like it is possible as commercial GPSDOs also do this.
> There are data flash chips that can store 8Mbyte of data in a SOIC-8
> package, I estimate this would be sufficient to collect TDC and temperature
> data for a couple weeks.

For each time-event, record phase and frequency. These are the estimated 
states and they will give you lot's of information. For Kalman Filter, 
the P matrix is kind of interesting.

Cheers,
Magnus





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