Re: [Linuxptp-devel] Optimal P, I constants
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Miroslav L. <mli...@re...> - 2013-05-22 10:51:47
|
On Mon, May 13, 2013 at 08:47:28PM +0200, Richard Cochran wrote: > http://linuxptp.sourceforge.net/pi_calc_plots/ > > Without discussing the graphs in detail, in general one can say that > the two sets of constants yield very similar results, with method B > resulting in lower RMS error. It seems the cap plots are created from the RMS offsets reported by ptp4l, which include the jitter. Even if the reported RMS offsets are similar with both methods, the actual accuracy could be significantly better with one method. Unfortunately that information is hidden in the noise. To evaluate the accuracy of the clock controlled by the servo, more accurate measurements are needed than the measurements feeded to the servo. This is where simulations are very useful. >From the plots I can see that the method B does give better looking responses to frequency/time steps than the method A, but I'm afraid it comes at a cost of reduced accuracy when the servo is converged. > Miroslav, would you mind testing the tweaked constants in your > clknetsim environment? Ok, I've run simulations with the two methods with different update intervals and jitter/wander ratios, and compared the pairs of the RMS time error and frequency error. The differences are in dB (20*log10). u\jw | 1e0 | 1e1 | 1e2 | 1e3 | 2^-7 | -24 -18 | -30 -29 | -35 -40 | -32 -41 | 2^-6 | -20 -14 | -25 -24 | -31 -35 | -33 -42 | 2^-5 | -15 -8 | -21 -19 | -26 -29 | -30 -39 | 2^-4 | -10 -2 | -15 -13 | -20 -23 | -24 -33 | 2^-3 | -6 3 | -10 -7 | -15 -17 | -20 -28 | 2^-2 | -3 7 | -5 -3 | -11 -13 | -16 -24 | 2^-1 | -2 5 | -2 -2 | -7 -13 | -12 -24 | 2^+0 | -1 0 | -2 -5 | -7 -17 | -13 -28 | 2^+1 | 0 0 | -0 -1 | -6 -13 | -11 -24 | 2^+2 | 1 0 | 0 -1 | -3 -8 | -9 -20 | 2^+3 | 1 0 | 0 0 | -1 -2 | -6 -15 | 2^+4 | 1 0 | 0 0 | 0 -1 | -4 -10 | 2^+5 | 1 0 | 1 0 | 1 -0 | -1 -4 | 2^+6 | 1 0 | 1 0 | 1 0 | 0 -1 | 2^+7 | 0 0 | 1 0 | 1 0 | 0 -0 | >From the results it seems there is an area in the first column where the method B is better in the frequency error, but overall it seems to perform significantly worse in both time error and frequency error. Here are some plots of the time and frequency error in time for the 2^-4/1e1 simulation. You can see the red line (method A) is below the simulated jitter, filtering the noise well, but still fast enough to keep up with the wander. The green line is within the jitter level, but doesn't seem very stable. http://mlichvar.fedorapeople.org/clknetsim/ptp/pi_diff/pi_diff_time.png http://mlichvar.fedorapeople.org/clknetsim/ptp/pi_diff/pi_diff_freq.png The scripts are available here: http://mlichvar.fedorapeople.org/clknetsim/ptp/pi_diff/ Thanks, -- Miroslav Lichvar |