Urs Ritzmann
2017-02-14 16:33:34 UTC
Hi
I had to add an extension to the phc2sys tool and would like to ask about your opinion about chances to get it upstream.
It's about running the phc2sys tool in the opposite direction, sys2phc, but with a more smooth servo.
This is my Use Case: Relative (device to device) time accuracy is important but absolute world-time only needs to match roughly (couple of milliseconds). Therefore, people always wanted to run NTP on the PTP Grandmaster and use NTP as a reference for world-time. This way, they can safe an expensive time server or GPS reference.
I know, moving time from the less accurate, higher jitter NTP domain to the PTP domain is a bad idea in general, but the use case is still valid. And it seems to be possible, given a filter with slow enough time constant to remove most of the NTP and Software timestamping jitter.
Currently, I created an additional servo class, which is basically an exponential smoothing / low-pass filter with a gain constant. If you think it could be useful for others, I would probably change the code a little before sending patches. Instead of the servo class, I think this matches the current implementation better:
- Use the PI-Servo, but change it to accept zero integral constants, optionally making it a P-Servo. Integral part reduces stability margin and is not required if some remaining static error is acceptable (which is in my case).
- Add an option to phc2sys to enable timestamp filtering (disabled by default).
- Use the already existing moving average filter or alternatively add a new exponential smoothing filter class to the filters.
What's your opinion. Is it worth sending patches?
BR
Urs
I had to add an extension to the phc2sys tool and would like to ask about your opinion about chances to get it upstream.
It's about running the phc2sys tool in the opposite direction, sys2phc, but with a more smooth servo.
This is my Use Case: Relative (device to device) time accuracy is important but absolute world-time only needs to match roughly (couple of milliseconds). Therefore, people always wanted to run NTP on the PTP Grandmaster and use NTP as a reference for world-time. This way, they can safe an expensive time server or GPS reference.
I know, moving time from the less accurate, higher jitter NTP domain to the PTP domain is a bad idea in general, but the use case is still valid. And it seems to be possible, given a filter with slow enough time constant to remove most of the NTP and Software timestamping jitter.
Currently, I created an additional servo class, which is basically an exponential smoothing / low-pass filter with a gain constant. If you think it could be useful for others, I would probably change the code a little before sending patches. Instead of the servo class, I think this matches the current implementation better:
- Use the PI-Servo, but change it to accept zero integral constants, optionally making it a P-Servo. Integral part reduces stability margin and is not required if some remaining static error is acceptable (which is in my case).
- Add an option to phc2sys to enable timestamp filtering (disabled by default).
- Use the already existing moving average filter or alternatively add a new exponential smoothing filter class to the filters.
What's your opinion. Is it worth sending patches?
BR
Urs