[EMAIL PROTECTED] wrote:

> 
> The problem is that this change won't be reflected immediately. Even
> if I 44105 Hz is exactly in sync with the peer, when I do another NTP
> exchange in 2 seconds, it won't have enough time to compensate for the
> existing offset so I may still calculate an offset of say 4 Hz then 3
> Hz in another 2 seconds, etc. By the time I get to 0, I may have set
> my frequency to 44115 Hz and now it's too fast so it'll start getting
> negative offsets. And it cycles back and forth like that because I'm
> not taking into consideration the relative change.

You have to damp the loop, the same as you have to damp the suspension 
in a car.  The general form of a commodity industrial controller 
involves adding proportional, differential and integral terms, hence 
they are called PIDs.

You stop the overshoot by adding a term based on rate at which you are 
changing the value.  There is particular level of correction that 
produces the fastest convergence without any over shoot.  Although I 
forget it, the actual formula is high school level mechanics.

You don't need an integral term, because you are not trying to zero the 
phase error.

_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.org/mailman/listinfo/questions

Reply via email to