19 | 0 | 20 |
下载次数 | 被引频次 | 阅读次数 |
针对PTP(precise time protocol)协议在应用层获取软件时间戳导致时钟同步精度下降的问题,提出一种基于MAC(media access control)层获取硬件时间戳的PTP同步优化方案。设计了以STM32F407微处理器为核心的PTP时钟应用平台,在MAC层实现了硬件时间戳获取,避免了由于协议栈软件处理延时产生的不确定性;针对PTP时钟晶振老化导致的时间同步偏差及网络延迟抖动问题,采用迭代方法优化了本地时钟频率调节算法,提高了频率校正精度。经实际测试,主从时钟偏差的RMS(root mean square)优于20 ns,提升了时钟同步精度。
Abstract:To address the issue of reduced clock synchronization accuracy caused by obtaining software timestamps at the application layer in PTP(precise time protocol) protocol, this paper proposes a PTP synchronization optimization scheme based on hardware timestamp acquisition at the MAC(media access control) layer. A PTP clock application platform was designed with STM32F407 microprocessor as the core,implementing hardware timestamp acquisition at the MAC layer to eliminate uncertainties introduced by software protocol stack processing delays. For the problems of time synchronization deviation caused by PTP clock oscillator aging and network delay jitter, an iterative method was adopted to optimize the local clock frequency adjustment algorithm, improving frequency correction accuracy. Actual test results demonstrate that the root mean square(RMS) deviation of the master-slave clock achieves better than 20 nanoseconds,significantly enhancing clock synchronization precision.
[1]高兆强.基于IEEE1588V2的无线网络时间同步技术[J].通信技术, 2021, 54(1):147-151.
[2]徐卓汀,商艳娟,王成群.基于FPGA的IEEE 1588时钟同步系统的设计与实现[J].智能计算机与应用, 2023,13(5):64-69.
[3]孙建鹏,刘欣,洪应平,等.基于DP83640的以太网时钟同步方法设计[J].电子学报, 2021, 49(5):1033-1040.
[4]陶稳静,陆阳,卫星,等.基于PTPd2的精密时钟同步软件实现方法[J].计算机工程, 2019, 45(3):47-53+59.
[5]陶征亮.基于IEEE1588协议的高精度时钟同步技术研究[D].赣州:江西理工大学, 2022.
[6]王晋祺.基于IEEE 1588v2协议的分布式测试系统时统系统研究[D].太原:中北大学, 2019.
[7]孔祥瑞.基于IEEE1588协议的铁路时间同步技术研究[D].秦皇岛:燕山大学, 2020.
[8]曾庆琦.高精度网络时间同步的研究与实现[D].武汉:中国科学院大学(中国科学院武汉物理与数学研究所), 2020.
[9]黄正宇.基于IEEE1588的无线以太网时间同步实现[D].哈尔滨:哈尔滨工业大学, 2022.
[10]宋仕坤.基于以太网MAC IP核的IEEE1588协议的设计与实现[D].西安:西安电子科技大学, 2018.
基本信息:
DOI:10.13875/j.issn.1674-0637.2025-02-0101-08
中图分类号:P127
引用信息:
[1]修相宇,王康,武建锋.基于MAC的PTP同步优化设计与实现[J].时间频率学报,2025,48(02):101-108.DOI:10.13875/j.issn.1674-0637.2025-02-0101-08.
基金信息:
中国电子科技集团公司第三十九研究所项目(E259KF1601)