| In distributed test system,the unification of time reference value is very important to test results.The appearance of time system is to provide standard video signal for test equipment in aerospace and conventional weapon test.With the rapid improvement of communication technology and measurement level,the modern distributed test system has put forward higher requirements for clock synchronization accuracy of time system.At present,the mainstream clock synchronization technology has some shortcomings in cost or accuracy,which greatly hinders the wide application of these technologies in distributed test systems.In 2002,the IEEE organization adopted the standard of IEEE 1588(IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems),which defines a Precision Time Protocol(PTP protocol)for distributed test systems and provides clock synchronization up to nanosecond precision for test systems.Firstly,the clock synchronization problems in modern distributed test system are explained in detail,and the current mainstream clock synchronization technologies are analyzed and compared.It is verified that PTP protocol is the best clock synchronization scheme for distributed test system with the highest synchronization accuracy,the strongest flexibility and the best comprehensive cost.Subsequently,PTP protocol is deeply studied,including the principle of protocol implementation,clock type,port state,network topology and the establishment of the main clock,etc.Then,according to the PTP protocol,the hardware device as the clock synchronization node in the time system is built by hardware aided timestamping near the physical layer of the message to improve the timing accuracy.This paper chooses KSZ8463 of Microchip Company as Ethernet physical layer chip and KSZ9692 as main control chip,designs clock protocol circuit and main control circuit respectively,including Ethernet module,MII interface module,power module and so on.Both of them connect through MII interface to form the hardware clock node of the time system in the paper.Each hardware clock node is connected by Ethernet as a clock synchronization node in the distributed test system,running PTP protocol stack to achieve high-precision clock synchronization between nodes.In order to provide a unified clock setting to the distributed test system,the signal of the measured event is captured and data communicated by the master control computer,and the software part of the clock node is extended by the application function,and the Socket is used as the total control computer.The communication module is added to the terminal and each clock node,and an operational graphical interface is designed for the total control computer through the C++ builder,which is convenient for the user to use.Finally,by building an experimental model of the distributed test system,the clock synchronization accuracy can reach nanosecond level by comparing the second pulse signal output from the master clock node with that from the slave clock node.In addition,the implementation of application function expansion provides a unified time benchmark based on the local clock of the master control computer for the test system,and achieves the capture of trigger events and the stamping of time stamps,which unifies the measurement data into a time coordinate system,thus completing the scheduling and control of the whole test system on the master control computer.The time system studied in this paper has great reference value in clock synchronization and remote control of modern distributed test system. |