Hi

> On Feb 25, 2022, at 10:18 AM, Erik Kaashoek <e...@kaashoek.com> wrote:
> 
> Inspired by the gpsdo simulator written by Tom Van Baak  I am trying to use 
> simulation to validate the PID loop parameters for a cheap and simple GPS 
> referenced timer/counter I'm building.
> The following one hour measurements where done using a Rbd reference as input 
> to the timer counter(see Timelab.gif plot attached)
> 1: Open loop (P=0, I=0) VC-TCXO versus the Rbd reference (green trace)
> 2: PPS of the internal GPS versus the Rbd reference. (PPS trace)
> 3: Rbd reference versus the closed loop (P=0.02, I=0) VC-TCXO (dark blue 
> trace)
> 4: Rbd reference versus the closed loop (P=0.01, I=0,00005) VC-TCXO (red 
> trace)
> All .tim files also attached.
> The performance of the TCXO was remarkably good for a sub 1$ device,  great 
> care went into  a stable, low noise, Vtune. The noisy supply did not have a 
> big influence
> The open loop TCXO frequencies where divided by 1e7 (SW PICdiv)and together 
> with the raw PPS frequencies loaded into an Excel speadsheet (see attached)
> An identical PID controller  (P=0.01, I=0.0005) was implemented in Excel that 
> took as input the frequency difference between the PPS and the TCXO and 
> calculated a correction for the TCXO frequency. The corrected TCXO 
> frequencies was exported from excel (PID output) and imported in Timelab 
> (PID, light blue trace)
> As can be seen in the Timelab plot the controller implemented in Excel did a 
> better job then the controller in the timer/counter but the two actual closed 
> loop measurements used difference GPS and TCXO data (I do not own sufficient 
> good frequency counters to measure all frequencies at the same time).
> The timer/counter was open on a table with minimum thermal isolation and 
> during the measurements some draft through door opening/closing could occur
> My question: is the difference between the measured loop performance and the 
> simulated  loop performance to be expected or am I making a big mistake 
> somewhere?

The TCXO *should* converge to match the PPS. It should do that at some point 
past 
the few hundred seconds range on your loop. You would need a longer data run to 
really know if this is happening or not. Something > 10 hours ( so overnight 
works well …)
would be better. 

Another thing to look into: You can likely improve the performance of the PPS 
by 4X
or more by using the sawtooth correction process. That would shift the whole 
graph
to the left and turn a couple hundred seconds into sorta kinda a hundred 
seconds. 
Overnight runs would then become closer to a couple hours. 

Another check on things: The PPS should roughly drop off as 1/tau. It will 
depart from 
this once you get out a ways. Over the range you are looking at, that’s a 
pretty good
approximation. Wobbles in the line might indicate some sort of gotcha in the 
data collection
or (maybe) issues somewhere else.

Bob


> Feel free to ask more info or more measurement data
> 
> Erik.
> 
> 
> 
> 
> 
> <Timelab.gif><PID.xlsx><TCXO.tim><PPS.tim><TCXO GPS locked P=0.02.tim><TCXO 
> GPS locked P=0.01, I=0.00005.tim><PID 
> output.tim>_______________________________________________
> time-nuts mailing list -- time-nuts@lists.febo.com -- To unsubscribe send an 
> email to time-nuts-le...@lists.febo.com
> To unsubscribe, go to and follow the instructions there.
_______________________________________________
time-nuts mailing list -- time-nuts@lists.febo.com -- To unsubscribe send an 
email to time-nuts-le...@lists.febo.com
To unsubscribe, go to and follow the instructions there.

Reply via email to