I've been working on the adaptive servo I mentioned here some time ago
and I think it now works fairly well and could possibly be considered
for inclusion. It's called linreg, suggestions for a better name are
welcome.

Here are two graphs from the simulator that compare time and frequency
accuracy of phc2sys using the PI servo with HW and SW time stamping
constants and linreg.

http://mlichvar.fedorapeople.org/tmp/ptp/linreg_time.png
http://mlichvar.fedorapeople.org/tmp/ptp/linreg_freq.png

The first patch moves and renames some PI options to common servo
code, so it's available to the new servo. The second patch adds the
servo and the third patch improves delay calculation as the new servo
has a nice feature that it can track frequency offset independently
from time offset.

What do you think?

Miroslav Lichvar (3):
  Move PI step threshold and max frequency settings to common servo
    code.
  Add an adaptive servo based on linear regression.
  Include clock rate ratio in delay calculation.

 clock.c         |  18 +++-
 clock.h         |   7 ++
 config.c        |  17 +--
 config.h        |   8 +-
 default.cfg     |   6 +-
 gPTP.cfg        |   6 +-
 linreg.c        | 326 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 linreg.h        |  26 +++++
 makefile        |   8 +-
 phc2sys.8       |  11 +-
 phc2sys.c       |  21 +++-
 pi.c            |  59 ++++------
 pi.h            |  26 +----
 port.c          |   3 +-
 ptp4l.8         |  26 +++--
 ptp4l.c         |   7 +-
 servo.c         |  60 ++++++++++-
 servo.h         |  32 ++++++
 servo_private.h |   6 ++
 19 files changed, 560 insertions(+), 113 deletions(-)
 create mode 100644 linreg.c
 create mode 100644 linreg.h

-- 
1.8.4.2


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to