[time-nuts] Re: GPSDO Control loop autotuning

Markus Kleinhenz Markus.Kleinhenz at izt-labs.de
Tue Apr 12 08:42:04 UTC 2022


Hi Tobias,

Am 11.04.2022 um 13:33 schrieb Pluess, Tobias via time-nuts:
> Hi Markus,
>
> Thanks for your hints. That's actually what I meant. One could use the
> Kalman filter to "improve" the noise of the 1PPS signal being measured, and
> then use the observed output from the Kalman filter as input to a
> controller, which still might be a PI controller. Right?

That is true, but I think you would be wasting the Kalman filters potential.

>
> Also thanks for your valuable links, I will look through these.
> When I look at examples of Kalman filters, they often deal with position
> and velocity control and the state variables are often the position, speed
> and sometimes even acceleration.
> In the case of a GPSDO, what should the states be?
> I was thinking a lot about this topic, and I believe there are several
> possibilities.
What I found in literature are two or three state clock models. The
Two-state clockmodel, which is also

part of the Galleani Paper I mentioned. It is composed of the phase
deviation and the frequency deviation.

This allows you to model the typical types of clock noise
present/dominant in atomic clocks (the field where these type
of filters and controllers are typically used it seems)

One could also use a three state clock model but then you get problems
with the observability and controllability of the system
because you only get measurements of the phase error.

> For instance, one could use only the phase as state. In that case, the
> Kalman filter would be 1D and this would be the simplest case.
> On the other hand, we could also have the phase and the frequency as
> states, because the frequency is the derivative of the phase, and this
> would be analogous to the position-velocity example. I am not sure which
> one of these models shall be used, is there a "right" one and a "wrong"
> one, i.e. with the wrong one it won't work at all?
>
> I believe, but am not 100% sure, the state space model with just one state
> would work, with the phase being used as the only state.
>
> phi[k] = phi[k-1] + K_VCO * u
>
> where u is the control input. Further, the Kalman filter needs to know the
> process noise and measurement noise. I would guess that the process noise
> in our case is very small, as the OCXO is very stable. On the other hand,
> the measurement noise is large, because the 1PPS coming from the GPS module
> has some jitter which affects the measurement. However, and this is
> probably an interesting idea, the GPS module outputs an estimate of the
> timing accuracy, so couldn't we use this information to estimate our
> measurement noise? the timing accuracy squared would directly yield the
> measurement variance. And the above state equation could be used for the
> Kalman filter, together with the estimated timing accuracy information
> which we get from the GPS module.

The Kalman filter (not extended, unscented etc) is ideal for white noise
so things like sawtooth noise should be removed.

The whole setup of disciplining a local clock with a GPS-Receiver can be
viewed as follows:

You have two Clocks, your local one and the GPS-ensemble clock. Since
one can only measure time differences what you are modeling for your
kalman filter is the phase deviation and the frequency deviation between
the two, where the clock noise Matrix is the sum of both clocks Matrices
(as their noises are independent).
The measurement process is the observation of the 1PPS Signal.
The measurement noise could be derived from the ADEV of the GPS PPS
approximated as WPN generated by quantization error.

Theres a great write up by John Ackerman N8UR of the Performances of
current ublox GPS receivers, which suggests that the 1pps of a sawtooth
corrected f9t is still in good approximation a WPN reference.


I can't say how the GPS modules accuracy estimate would play into this
process, because if you derive a LQG-controller from the designed kalman
filter the measurement noise determines the controller gains and should
be fixed I think.

Another interessting point about an LQG-controller or other state-space
controllers:

If you use a two-state model for your kalman filter you get estimates
for the phase deviation and the frequency deviation and the controller
can use the information from both. The design process of LQG controllers
allows the use of weights for the different dimensions of the state
vector, meaning you can assign priorities to them.
Since these methods are mostly used for atomic clocks and atomic clock
ensembles where frequency stability is more important than 0 phase
deviation, most papers suggest keeping the frequency stable first and
correcting phase offsets second.

https://github.com/konstantin-gm/Steering

Has a practical implementation in Python as used in the "a Practical
Approach..." Paper.

> But I am unsure whether this will work, at first it almost sounds too
> simple :-)
>
> Then, once per second, the Kalman equations are calculated and the Kalman
> filter yields an estimate of the phase error that is (hopefully!) smoother
> than the 1PPS from GPS, and this signal would then be used as input to the
> PI controller. We would still need the PI controller, but we could add the
> Kalman filter as sort of prefilter that removes some of the jitter.
>
> best
> Tobias
> HB9FSX
>
>

Regards,

Markus





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