Skip to content

filters: add fixed-wander Kalman servo - #872

Open
jordens wants to merge 2 commits into
pendulum-project:mainfrom
quartiq:pr/fixed-wander
Open

jordens wants to merge 2 commits into
pendulum-project:mainfrom
quartiq:pr/fixed-wander

Conversation

@jordens

@jordens jordens commented Aug 20, 2026

Copy link
Copy Markdown

This adds a single-estimator servo for clocks where oscillator wander can be known or bounded. Oscillator wander (in the model) is independent of the network environment.
The new servo keeps previous online network-noise estimation, but uses a characterized or conservative wander bound instead of a second estimator.

The default is four times the independently measured I210 wander; characterized targets should override it while unknown or
strongly varying oscillators should definitely keep the doubly-adaptive filter.

This assumption gives deterministic startup and lower CPU/memory cost.
Against the full doubly-adaptive KalmanFilter, the STM32H743 image
uses 2.8 KiB less text and 0.5 KiB less BSS. On the host, the full servo
workload is 1.54x faster. These numbers are on top of the gains in #871.

Note that this stacks on top of #871. And same as there:
I know statime is on hold for the big ntpd-rs work. I'm putting this out anyway because it may still become useful wherever the filters ends up living.

@davidv1992

Copy link
Copy Markdown
Member

Apologies for the late response. Given the merger with ntpd-rs that is going on, and the direction we have chosen to take the algorithm there, this may not be a good fit for us then. It may be interesting once that work is a bit further along to convert this to the new algorithm traits over there, and keep an algorithm like this as an option in a separate repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants