Thread: [Linuxptp-users] Frequency Adjustment
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Vanderpool, C. <cly...@ax...> - 2016-06-21 12:55:59
|
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 |
From: Richard C. <ric...@gm...> - 2016-06-21 19:36:49
|
On Tue, Jun 21, 2016 at 08:25:35AM -0400, Vanderpool, Clyde wrote: > 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 |
From: Vanderpool, C. <cly...@ax...> - 2016-06-22 12:16:27
|
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 < cly...@ax...> wrote: > 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 > > On Tue, Jun 21, 2016 at 3:36 PM, Richard Cochran <ric...@gm... > > wrote: > >> On Tue, Jun 21, 2016 at 08:25:35AM -0400, Vanderpool, Clyde wrote: >> > 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 >> > > |
From: Richard C. <ric...@gm...> - 2016-06-23 13:13:30
|
On Wed, Jun 22, 2016 at 08:16:20AM -0400, Vanderpool, Clyde wrote: > 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 |
From: Vanderpool, C. <cly...@ax...> - 2016-06-23 13:29:22
|
By far the best explanation I have seen. Thank you! On Thu, Jun 23, 2016 at 9:13 AM, Richard Cochran <ric...@gm...> wrote: > On Wed, Jun 22, 2016 at 08:16:20AM -0400, Vanderpool, Clyde wrote: > > 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 > |