Discussion:
[Linuxptp-users] Frequency Adjustment
Vanderpool, Clyde
2016-06-21 12:25:35 UTC
Permalink
Hello,

I am pretty new to both Linux and the IEEE 1588. However, somehow I
managed to build up my own kernel in order to implement Linux-PTP on a LAN
consisting of 8 different machines. Even more surprising is that it seems
to be working! I have been tasked to collect the time data from all the
different clocks on the network and give a synopsis of how well this
implementation of PTP is working. Most of the information from the 'pmc'
and 'ptp4l' commands are pretty straight forward, but I was wondering what
'frequency adjustment' actually means. If anyone could just give me a
brief description of what this pertains to I would be very grateful. I
just want to make sure I can present the information to my boss in a
somewhat intelligent manner. Thank you in advance.

Clyde
Richard Cochran
2016-06-21 19:36:38 UTC
Permalink
Post by Vanderpool, Clyde
implementation of PTP is working. Most of the information from the 'pmc'
and 'ptp4l' commands are pretty straight forward, but I was wondering what
'frequency adjustment' actually means.
Are you asking, what is frequency adjustment in general, or are you
wondering about specific numbers reported by the programs (like the
'freq' column of ptp4l)?

Thanks,
Richard
Vanderpool, Clyde
2016-06-22 12:16:20 UTC
Permalink
I guess a little bit of both. From looking things up on google or
different forums all I could find was kind of circular (i.e. 'frequency
adjustment is the computer adjusting it's frequency') I figured it had
something to do with the clock pulse of the individual machines but I don't
want to guess. I have to present some information and I want to make sure
I sound reasonably intelligent. Any info would be appreciated.


On Tue, Jun 21, 2016 at 3:43 PM, Vanderpool, Clyde <
I guess a little bit of both. From looking things up on google or
different forums all I could find was kind of circular (i.e. 'frequency
adjustment is the computer adjusting it's frequency') I figured it had
something to do with the clock pulse of the individual machines but I don't
want to guess. I have to present some information and I want to make sure
I sound reasonably intelligent. Any info would be appreciated.
Clyde
Post by Richard Cochran
Post by Vanderpool, Clyde
implementation of PTP is working. Most of the information from the
'pmc'
Post by Vanderpool, Clyde
and 'ptp4l' commands are pretty straight forward, but I was wondering
what
Post by Vanderpool, Clyde
'frequency adjustment' actually means.
Are you asking, what is frequency adjustment in general, or are you
wondering about specific numbers reported by the programs (like the
'freq' column of ptp4l)?
Thanks,
Richard
Richard Cochran
2016-06-23 13:13:18 UTC
Permalink
Post by Vanderpool, Clyde
I guess a little bit of both. From looking things up on google or
different forums all I could find was kind of circular (i.e. 'frequency
adjustment is the computer adjusting it's frequency') I figured it had
something to do with the clock pulse of the individual machines but I don't
want to guess. I have to present some information and I want to make sure
I sound reasonably intelligent. Any info would be appreciated.
In general, there are two important variables when synchronizing two
clocks. The "offset" is the instantaneous time difference between the
two clocks. If you perfectly synchronize two wrist watches by pushing
their pins in at exactly the same, then at that moment, the offset
will be zero. After that, the two watches will slowly drift away from
each other.

This happens because the quartz crystals oscillate at slightly
different rates. Another word for the rate is "frequency". The
difference between the rates of two clocks can be represented as a
fraction or percentage. Normally the difference is small, and so you
will see "parts per million" (PPM) and "parts per billion" (ppb) used
instead of percentage.

Regarding the ptp4l program, it is not enough for it to simply correct
the time offset, it also must change the rate of the local clock to
match that of the master clock. The program uses the PTP to estimate
the time and frequency offsets from the master and correct them by
applying a frequency adjustment to the local clock. The amount of
frequency adjustment is shown in the log in units of ppb.

There are tons of papers to read about this topic. This page and the
site might interest you:

http://www.ntp.org/ntpfaq/NTP-s-sw-clocks-quality.htm

Or try this classic David Mills paper:

https://www.eecis.udel.edu/~mills/database/papers/time.pdf

Here are all of the Mills papers:

https://www.eecis.udel.edu/~mills/papers.html

These two were helpful to me:

@TechReport{mills1993precis,
author = {David Mills},
title = {Precision synchronization of computer network clocks},
institution = {University of Delaware Electrical Engineering Department},
year = 1993,
month = {November}}

@TechReport{mills1992model,
author = {David Mills},
title = {Modelling and analysis of computer network clocks},
institution = {University of Delaware Electrical Engineering Department},
year = 1992,
month = {May}}

HTH,
Richard
Vanderpool, Clyde
2016-06-23 13:29:15 UTC
Permalink
By far the best explanation I have seen. Thank you!
Post by Richard Cochran
Post by Vanderpool, Clyde
I guess a little bit of both. From looking things up on google or
different forums all I could find was kind of circular (i.e. 'frequency
adjustment is the computer adjusting it's frequency') I figured it had
something to do with the clock pulse of the individual machines but I
don't
Post by Vanderpool, Clyde
want to guess. I have to present some information and I want to make
sure
Post by Vanderpool, Clyde
I sound reasonably intelligent. Any info would be appreciated.
In general, there are two important variables when synchronizing two
clocks. The "offset" is the instantaneous time difference between the
two clocks. If you perfectly synchronize two wrist watches by pushing
their pins in at exactly the same, then at that moment, the offset
will be zero. After that, the two watches will slowly drift away from
each other.
This happens because the quartz crystals oscillate at slightly
different rates. Another word for the rate is "frequency". The
difference between the rates of two clocks can be represented as a
fraction or percentage. Normally the difference is small, and so you
will see "parts per million" (PPM) and "parts per billion" (ppb) used
instead of percentage.
Regarding the ptp4l program, it is not enough for it to simply correct
the time offset, it also must change the rate of the local clock to
match that of the master clock. The program uses the PTP to estimate
the time and frequency offsets from the master and correct them by
applying a frequency adjustment to the local clock. The amount of
frequency adjustment is shown in the log in units of ppb.
There are tons of papers to read about this topic. This page and the
http://www.ntp.org/ntpfaq/NTP-s-sw-clocks-quality.htm
https://www.eecis.udel.edu/~mills/database/papers/time.pdf
https://www.eecis.udel.edu/~mills/papers.html
@TechReport{mills1993precis,
author = {David Mills},
title = {Precision synchronization of computer network clocks},
institution = {University of Delaware Electrical Engineering Department},
year = 1993,
month = {November}}
@TechReport{mills1992model,
author = {David Mills},
title = {Modelling and analysis of computer network clocks},
institution = {University of Delaware Electrical Engineering Department},
year = 1992,
month = {May}}
HTH,
Richard
Continue reading on narkive:
Loading...