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

André Balsa andrebalsa at gmail.com
Thu Apr 14 16:00:24 UTC 2022


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.

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 ?

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.

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 ?




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