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

Bob kb8tq kb8tq at n1k.org
Fri Apr 15 15:21:21 UTC 2022


Hi


> On Apr 15, 2022, at 8:36 AM, André Balsa <andrebalsa at gmail.com> wrote:
> 
> Hi Bob, thank you for your comments, very helpful.
> 
> On Fri, Apr 15, 2022 at 2:06 PM Bob kb8tq <kb8tq at n1k.org> wrote:
> 
>> Hi
>> 
>>> 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.
> 
> 
> Since the STM32 GPSDO uses an OCXO it does indeed have a very low drift
> oscillator.

Relative to a 429 second measurement period, a maser would be a low drift
device. A typical OCXO is very high drift at this sort of tau.

> 
>> 
>> 
>>> 
>>> 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.
>> 
> Actually the FLL loop has useful information every second, so we can update
> Vctl at any time interval that is a multiple of 1s, or even at varying time
> intervals. That is exactly the question that I am asking.

If the data all is “back 429 seconds” then (practically speaking ) you only have 
one data point per 429 seconds. 

> 
> 
>>> 
>>> 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.
> 
> 
> Indeed, I guess any algorithm I can come up with will have to pay close
> attention to the inherent noise/jitter in the readings. Thanks for pointing
> this out.

The only way to know the noise profiles is to measure them against an
external “better than” standard. There is no practical way to come up with
the info from “inside” the device. 

> 
>> 
>> 
>>> 
>>> 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
>> 
>> You mean the FLL and PLL are exclusive of each other ? I guess you are
> right, but I am trying to think "outside the box" and see if there are any
> alternatives.

You will have two people driving the car at the same time. One hits the 
accelerator and the other hits the brakes at the same time. They both can’t
be active *and* feed the EFC at the same time. The practical answer is to
run each during the warmup phase that it makes sense to do so.

Bob

> 
> Again, thanks a bunch for your comments.
> _______________________________________________
> 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