[time-nuts] Re: GPSDO Control loop autotuning

2022-04-22 Thread Magnus Danielson via time-nuts
Hi Matthias, On 2022-04-21 23:20, Matthias Welwarsky wrote: On Dienstag, 12. April 2022 00:52:42 CEST Magnus Danielson via time-nuts wrote: A trivial state-space Kalman would have phase and frequency. Assuming you can estimate the phase and frequency noise of both the incoming signal and the s

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-21 Thread Matthias Welwarsky
On Dienstag, 12. April 2022 00:52:42 CEST Magnus Danielson via time-nuts wrote: > A trivial state-space Kalman would have phase and frequency. Assuming > you can estimate the phase and frequency noise of both the incoming > signal and the steered oscillator, it's a trivial exercise. It's > recomm

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-21 Thread Carsten Andrich
Hi Erik, when I familiarized myself with the topic back in 2018, I found this paper: https://ieeexplore.ieee.org/document/7324685 (IEEE paywall) https://www.researchgate.net/publication/308730123_Synchronization_robustness_using_Kalman-based_clock_servos They found that Kalman filters and PI con

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-21 Thread Mattia Rizzi
Kalman filters are optimal only if they work with statistical processes that can be described with derivatives or integrals, i.e. white phase noise (f^0), white FM (f^-2), random walk FM (f^-4) and so on. Most of VCOs are heavily flicker FM dominated Il giorno gio 21 apr 2022 alle ore 19:09 Erik K

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-21 Thread Erik Kaashoek
Hi Tobias, Using the excellent material found here: https://nbviewer.ipython.org/github/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/table_of_contents.ipynb I went ahead and implemented the first order filter as described in chapter 8. The simulation was changed to use a real recorde

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-21 Thread Pluess, Tobias via time-nuts
Hi Erik, yes I also found this webpage, and the examples are good. I had the exact same idea as you, except I thought that the model for the VCO output is either phase only or phase and frequency. Yours is even a bit more sophisticated, thats quite cool! And yes, of course it will be possible to h

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-19 Thread Markus Kleinhenz via time-nuts
Erik, https://filterpy.readthedocs.io/en/latest/kalman/KalmanFilter.html has the documentation for a python implementation of kalman filters and some good introduction. Markus. Am 19.04.2022 um 21:03 schrieb Erik Kaashoek: > Tobias, > Your Kalman post triggered me to study this "dummy" level in

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-19 Thread Erik Kaashoek
Tobias, Your Kalman post triggered me to study this "dummy" level introduction to Kalman filters: https://www.kalmanfilter.net/ and now I'm trying to write the Kalman filter. An example of a Kalman filter described in the link above uses distance, speed and acceleration as predictors for a one

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-17 Thread Pluess, Tobias via time-nuts
Hallo all, In the meantime I had to refresh my knowledge about state-space representation and Kalman filters, since it was quite a while ago since I had this topic. So I looked at the equations of the Kalman filter. To my understanding, we can use it like an observer, and instead of using the pha

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-12 Thread glen english LIST
For isolating noise, (for the purpose of off line analysis)  , using ICA (Independent Component Analysis) , a kind of blind source separation ,  can assist parting out the various noises to assist understanding the system better . There are some Python primers around for it. fantastic discussi

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-12 Thread Markus Kleinhenz via time-nuts
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 inp

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-12 Thread Magnus Danielson via time-nuts
Tobias, On 2022-04-09 18:13, Pluess, Tobias via time-nuts wrote: Hi all, My reply to this topic is a bit late because I have been busy with other topics in the meantime. To Erik Kaashoek, You mentioned my prefilter. You are absolutely right, I looked again at my prefilter code and decided it w

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-11 Thread Poul-Henning Kamp
Matthias Welwarsky writes: > > My heuristic is that when you plot the histogram of the time between > > zero-crossings, you want the "bulge" on the low side of, but close to, > > the "allan-intercept" (Ie: where the OCXO and GPS allan curves cross.) > > > > If you are working with 3rd or

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-11 Thread Matthias Welwarsky
On Montag, 11. April 2022 11:15:57 CEST Poul-Henning Kamp wrote: > > > Markus Kleinhenz via time-nuts writes: > > But I think i got some pointers that can put you on your path. > > One (always?) overlooked metric, is the frequency spectrum of the > zero-crossings, of the phase difference

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-11 Thread 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? Also thanks for

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-11 Thread Poul-Henning Kamp
Markus Kleinhenz via time-nuts writes: > But I think i got some pointers that can put you on your path. One (always?) overlooked metric, is the frequency spectrum of the zero-crossings, of the phase difference input to the PLL. (NB: This obviously require good resolution of the phase er

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-11 Thread Markus Kleinhenz via time-nuts
Hi Tobias, I was looking into Kalman filters as well, albeit some time ago. But I think i got some pointers that can put you on your path. 1. The Kalman filter is an estimator not a controller. It gives you an estimate of your current system state but no controll law. 2. Time and the Kalman Filt

[time-nuts] Re: GPSDO Control loop autotuning

2022-04-09 Thread Pluess, Tobias via time-nuts
Hi all, My reply to this topic is a bit late because I have been busy with other topics in the meantime. To Erik Kaashoek, You mentioned my prefilter. You are absolutely right, I looked again at my prefilter code and decided it was garbage. I have removed the prefilter. Thanks to your hint I also

[time-nuts] Re: GPSDO Control loop autotuning

2022-03-21 Thread Erik Kaashoek
Hi Tobias, I'm very new to all this GPSDO stuff and going through similar learning but maybe I have some remarks/questions that could be relevant for you. - Developing control algorithms is an extremely long process unless done on a simulator. Tom Van Baak has an excellent simulator and several

[time-nuts] Re: GPSDO Control loop autotuning

2022-03-20 Thread Bob kb8tq
Hi Again, if you monitor the OCXO against the GPS PPS you are looking at the difference between the two. The “lowest error” control setting is going to be a broad / wide open loop that gets the OCXO to quickly follow the PPS. Simply put: PPS moves + 2 ns Move DAC to get OCXO +2 ns

[time-nuts] Re: GPSDO Control loop autotuning

2022-03-20 Thread Pluess, Tobias via time-nuts
Hi Bob, I see your point on quickly moving the OCXO. However of course this is NOT what I do. To be precise, my GPSDO does this exactly once after powerup, to quickly align the PPS. After that, the control loop takes over and steers the OCXO according to the error signal. I also have already imple

[time-nuts] Re: GPSDO Control loop autotuning

2022-03-20 Thread Bob kb8tq
Hi If you want “best” jitter compared to the GPS PPS, put in a very wide band loop and move the OCXO very quickly to match the PPS. That will give you best performance by that measure. If you go to every tenth sample, the same process will occur, just at a slightly different point. Since the p