[ntp:questions] NTP phase lock loop inputs and outputs?

skillzero at gmail.com skillzero at gmail.com
Mon May 19 07:22:46 UTC 2008


On May 18, 11:46 pm, David Woolley
> > If my reference clock is running at ~44100 Hz and through my NTP
> > exchanges, I get an instantaneous offset of -20 Hz,
>
> ....you have broken hardware.  Once you correct for systematic error, a
> crystal should be within single figure parts per million, even over a
> wide temperature range, so your maximum frequency error in the sampling
> clock should be about 0.5Hz., or at A=440, about 0.0044Hz.

I was just giving an example for illustrative purposes, but this
hardware can be up to 50 Hz off in normal conditions.

> Note that the maximum correction that ntpd can apply is 500ppm, which
> corresponds to 25Hz at 44.1kHz.  It will only apply that correction if
> there is a sustained and serious synchronisation error.

I'm not using ntpd. This is a specialized application that uses the
NTP protocol and I'm trying to adapt some of the NTP algorithms to
discipline an audio clock.

I'm mainly interested in understanding the NTP phase lock loop, what
its inputs should be given my data, how to apply it to that data, and
how to convert the results into something I can use to adjust the
hardware frequency.

The NTP literature I've read is very heavy on terminology I'm not
familiar with so I was hoping for something along the lines of "if an
NTP exchange says your clock is -20Hz off (and that's the only data I
really have), plug that number into this equation, and the result is
the number of Hz to add or subtract from your current frequency to
slew it toward the reference frequency (until the next NTP exchange in
2 seconds)".

The simple scheme I'm using now overshoots then undershoots too much
so I was hoping something like the NTP phase lock loop could help
improve it.




More information about the questions mailing list