[time-nuts] Re: General discussion of PID algorithms applied to GPSDO control loops (continued 1)

Bob kb8tq kb8tq at n1k.org
Fri Apr 15 11:36:07 UTC 2022


Hi

> On Apr 14, 2022, at 12:00 PM, André Balsa <andrebalsa at gmail.com> wrote:
> 
> 10. Again referring to our ideal PID controller, our control variable u(t)
> in the case of most low-cost GPSDOs is the control voltage that we can
> apply to the OCXO to vary its frequency. For Lars' DIY GPSDO and for the
> STM32 GPSDO a 16-bit PWM DAC is used to generate a control voltage Vctl
> between 0 and 4V. This is an extremely economical solution but it does the
> job.
> 
> 11. A complicating factor for programming the PLL or FLL algorithms for a
> GPSDO is that we are dealing with a discrete correction process, in other
> words changes in the control variable are applied at discrete time
> intervals which can be fixed or variable. For example, the STM32 GPSDO with
> its very crude FLL algorithm used a fixed interval of 429s to change Vctl
> (except during the initial calibration). In older GPSDO designs using a
> purely analog circuit the control variable is applied continuously.

At 429 s, you would need to have a *very* low drift oscillator or put up
with a lot of noise on the output. 

> 
> 12. Consequently the program of an FLL or PLL loop for a GPSDO has two
> decisions to make every second: a) what is the size of the correction to be
> applied to the control variable iow what is the new value for Vctl ? and b)
> Should the correction that was just computed be applied now, or should we
> wait and apply a different correction later ?

If the loop only has useful information every 429 seconds, then there 
is not much value in updating any more often. This is one thing that makes
PLL’s the more common approach.

> 
> 13. The programmer (in this case myself) has to decide whether to use a P,
> PI or PID loop, the optimal values for Kp, Ki and Kd, the use of a fixed or
> variable "time constant" (the delay between changes to the Vctl), and any
> processing (filetring, averaging, removal of outlying values, etc) of the
> measurements from the frequency counter or the TIC.

The parameters will be highly dependent on exactly what you have in your
setup. Large amounts of damping is normally good. A crossover frequency
for the system that makes sense vs the measured noise is generally the 
next thing on the list. 

> 
> 14. More precisely in my case, there is an extra complicating factor
> because I am trying to merge the FLL and PLL control loops into a "hybrid"
> FLL/PLL control loop. How to make the best use of the information from the
> two measurement ?

The loop needs to be either an FLL or a PLL. It is not at all unusual to switch
out the entire loop as the GPSDO “warms up”.

Bob

> _______________________________________________
> time-nuts mailing list -- time-nuts at lists.febo.com -- To unsubscribe send an email to time-nuts-leave at lists.febo.com
> To unsubscribe, go to and follow the instructions there.




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