Direct Search Algorithm for Clock Skew Compensation Immune to Floating-Point Precision Loss
Kyeong Soo Kim
TL;DR
This work tackles clock skew compensation under resource-constrained hardware where floating-point precision loss can impair accuracy. It introduces direct search, an incremental-error algorithm that operates with integer arithmetic and does not rely on initial-value bounds, defined by $j = argmin_{k\ge 0} |k - iD/A|$ with $k$ initialized as $floor(fp(iD/A) + 0.5)$. The method unifies the $D/A<1$ and $D/A>1$ cases and employs a small, finite-step update to obtain the skew-compensated clock, thereby avoiding floating-point divisions entirely. Numerical results demonstrate zero compensation error and substantially fewer iterations than prior extended Bresenham-based approaches, proving robustness to FP precision differences and practical for sensor-network time synchronization. Overall, the direct search approach offers a practically impactful solution for clock skew compensation immune to floating-point precision loss in digital communication systems.
Abstract
We have been investigating clock skew compensation immune to floating-point precision loss by taking into account the discrete nature of clocks in digital communication systems; extending Bresenham's line drawing algorithm, we constructed an incremental error algorithm using only integer addition/subtraction and comparison. Still, bounding the initial value of the clock remains a challenge, which determines the initial condition of the algorithm and thereby its number of iterations. In this letter, we propose a new incremental error algorithm for clock skew compensation, called direct search, which no longer relies on the bounds on the initial value of the clock. The numerical examples demonstrate that the proposed algorithm can significantly reduce the number of iterations in comparison to the prior work while eliminating the effect of floating-point precision loss on clock skew compensation.
