Re: [Linuxptp-devel] Optimal P, I constants
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Miroslav L. <mli...@re...> - 2013-04-30 19:29:39
|
On Tue, Apr 30, 2013 at 07:11:30PM +0200, Richard Cochran wrote: > When we scale the 1 Hz constant for 8 Hz, for example, the servo first > dials +800 PPM and then almost -100 PPM. Properly tuned constants > don't do that, as you can see in the plot: > > > > http://linuxptp.sourceforge.net/pi_const/plot5.png I'm not sure what I should see in the plot. The 2^0 and scaled 2^-3 curves are identical, just stretched differently. Why should be 100us offset corrected at 100 ppm good and at 800 ppm bad? Are you considering a situation with a typical wander? This is similar to the PLL and its time constant. Halving the time constant doubles the frequency adjustment. And the constant needs to be scaled with the update interval to not become unstable. > > I think we can select one configurable constant which will be > > independent from the update rate and calculate the rest from it. The > > constant could still have two default values for the SW and HW > > time stamping. It could be the P constant "normalized" for 1 Hz, the I > > constant "normalized" for 1 Hz, the Allan intercept, jitter divided by > > wander, or another arbitrary scale. The Allan intercept has an > > advantage over the others that it can be seen on the Allan deviation > > plot. > > I still don't understand what you are proposing. Given an intercept, > how do you derive P and I? I believe there is a formula to calculate P for given intercept and rate. Then the I constant can be calculated from P and the rate. The constants will need to be clamped to not become unstable (in that case a shorter update interval would give better results). I don't know the formulas, but I don't think it will be very difficult to figure them out from the simulations. I just didn't want to spend much time on it if you are opposed to the idea. Thanks, -- Miroslav Lichvar |