分布式仿真高精度时钟同步与时延测量

High-precision clock synchronization and delay measurement for distributed simulation

  • 摘要: 精确单向时延测量对分布式仿真系统的时序一致性至关重要,但硬件时钟漂移与网络时间协议(NTP)引发的“时钟跳变”会严重降低精度。为此,该文提出一种轻量级高精度时钟同步与时延测量机制。该机制采用“粗调−细调−跳变处理”的架构,具体而言,在NTP粗调基础上,设计基于网络波动的自适应用户数据报协议(UDP)探测策略以降低开销;提出融合卡尔曼滤波与指数移动平均的算法平滑补偿时钟偏差;引入硬重置机制消除NTP校时跳变干扰。实验表明,该机制可成功消除跳变干扰,将精度稳定在微秒级,在恶劣广域网(5%丢包、80 ms延迟)环境下仍具强鲁棒性。相较传统方案,控制报文减少76.8%,CPU利用率降至24.9%,实现了高精度与轻量化的有效平衡。该机制无须依赖专用授时硬件,适用于云边协同、半实物闭环仿真和跨地域联邦仿真等软件化部署场景,具有低成本、易部署和工程兼容性强的优势。

     

    Abstract: Accurate one-way delay measurement is critical for temporal consistency in distributed simulation systems; however, hardware clock drift and “clock jumps” caused by network time protocol (NTP) can significantly reduce accuracy. To address this, this paper proposes a lightweight, high-precision clock synchronization and delay measurement mechanism. This mechanism adopts a “coarse-tuning–fine-tuning–jump handling” architecture: On the basis of NTP coarse-tuning, an adaptive user datagram protocol (UDP) probing strategy based on network fluctuations is designed to reduce the overhead; an algorithm that combines Kalman filtering and exponential moving average is proposed to smooth out and compensate for clock deviations; and a hard reset mechanism is introduced to eliminate the interference of NTP time synchronization jumps. Experiments demonstrate that this mechanism successfully eliminates clock jump interference, stabilizes accuracy at the microsecond level, and maintains strong robustness even under adverse wide area network (WAN) conditions (5% packet loss, 80 ms latency). Compared to traditional solutions, control messages are reduced by 76.8% and CPU utilization drops to 24.9%, achieving an effective balance between high accuracy and lightweight implementation. This mechanism does not rely on dedicated timing hardware and is suitable for software-based deployment scenarios such as cloud-edge collaboration, hardware-in-the-loop simulation, and multi-region federated simulation. It offers the advantages of low cost, ease of deployment, and strong engineering compatibility.

     

/

返回文章
返回