Time synchronization method and device

The proposed time synchronization method addresses accuracy issues by updating the local clock's frequency to match the local PTP clock's frequency, ensuring precise synchronization across multiple network domains with different PTP settings.

JP7679592B2Active Publication Date: 2025-05-20MOXA INC
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2023193535
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2023-10-19
Filing Date
2023-11-14
Publication Date
2025-05-20
Estimated Expiration
2043-11-14

AI Technical Summary

Technical Problem

Existing time synchronization methods across multiple network domains using different Precision Time Protocol (PTP) setting files face accuracy issues due to frequency differences between local PTP clocks and local clocks, leading to potential time errors and verification failures.

Method used

A time synchronization method and apparatus that involves determining changes in the frequency of a local PTP clock and updating the local clock's frequency accordingly, ensuring synchronization across multiple time synchronization network domains using different PTP setting files.

Benefits of technology

This approach enhances the accuracy of time synchronization by eliminating frequency discrepancies, allowing for effective communication and synchronization across domains using different PTP configuration files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007679592000001
    Figure 0007679592000001
  • Figure 0007679592000002
    Figure 0007679592000002
  • Figure 0007679592000003
    Figure 0007679592000003
Patent Text Reader

Abstract

To provide a time synchronization method and a time synchronization device.SOLUTION: A time synchronization method is used by a time synchronization device. The time synchronization device runs a plurality of precision time protocol instances (PTP Instances) to connect to a plurality of time synchronization domains, respectively. The time synchronization method includes: determining whether a frequency of a local precision time protocol clock (local PTP clock) of the time synchronization device has been changed; and updating a frequency of a local clock of the time synchronization device with the frequency of the local precision time protocol clock in response to the change of frequency of the local precision time protocol clock.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a time synchronization method and apparatus, and more particularly to a time synchronization method and apparatus for improving the accuracy of time synchronization when performing time synchronization across multiple time-synchronized network domains. [Background technology]

[0002] Precision Time Protocol (PTP) is a basic standard for time synchronization established by IEEE 1588, and is used to achieve high-precision clock synchronization. However, as the market evolves, various applications in different networks have different requirements, so in the past, many different PTP configuration files (profiles) have been proposed based on different applications, such as Power Profile (IEEE Std C37.238) for power networks, Telecom Profile (ITU-T G.8265.1) for telecommunication networks, and Generalized Precision Time Protocol (IEEE Std 802.1AS: gPTP) configuration files. Configuration files allow applications in different fields to set different operating parameters, attributes, predetermined values, etc. to meet their needs, so devices and networks using various different configuration files cannot communicate effectively with each other. Generally speaking, to ensure time synchronization, devices and equipment in the same environment are required to use corresponding configuration files, making it difficult to integrate time between different fields.

[0003] In the prior art, a time gateway can integrate a number of different types of PTP setting files, allowing different time-synchronized network domains or devices using different types of PTP setting files to perform time synchronization based on one of the Grandmaster (GM) clocks. Thus, different time-synchronized network domains using different types of PTP setting files can achieve time synchronization.

[0004] However, in actual operation, the synchronization mechanisms between the two protocols, IEEE 1588 and gPTP conforming to IEEE Std 802.1AS, are not all the same, and the frequency difference between the local PTP clock of the time gateway and the local clock may cause time errors when performing time synchronization across time synchronization network domains using different PTP setting files. In addition, when performing time synchronization, various different PTP setting files or devices from each manufacturer may have different verification mechanisms, so due to the frequency difference, when performing time synchronization of cross PTP setting files using a time gateway, the verification may not pass and the device may not work as expected. Therefore, the conventional technology needs to be improved. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Taiwan Patent Application Publication No. I772843B [Patent Document 2] Taiwan Patent Application Publication No. I669014B [Patent Document 3] Taiwan Utility Model Publication No. M433682U1 [Patent Document 4] US Patent Application Publication No. 20150163000A1 Summary of the Invention [Problem to be solved by the invention]

[0006] Therefore, the main object of the present invention is to improve the shortcomings of the prior art by providing a time synchronization method and apparatus for improving the accuracy of time synchronization when integrating multiple devices or networks that use different types of high precision time protocol setting files to perform time synchronization. [Means for solving the problem]

[0007] According to an embodiment of the present invention, there is provided a time synchronization method for a time synchronization device, the time synchronization device being connected to a plurality of time synchronization network domains by executing a plurality of precision time protocol instances, respectively, the time synchronization method comprising: determining whether a change has occurred in the frequency of a local precision time protocol clock of the time synchronization device; and In response to a change occurring in the frequency of the local Precision Time Protocol clock, updating a frequency of a local clock of the time synchronization device with the frequency of the local Precision Time Protocol clock.

[0008] According to an embodiment of the present invention, there is also provided a time synchronization device, the time synchronization device being connected to a plurality of time synchronization network domains respectively by executing a plurality of precision time protocol instances, the time synchronization device including a processing unit and a storage unit, the processing unit being used to execute a program code, the storage unit being coupled to the processing unit and storing the program code, the storage unit being used to instruct the processing unit to execute a time synchronization method, the time synchronization method including: determining whether a change has occurred in the frequency of a local Precision Time Protocol clock (PTP clock) of the time synchronization device; and In response to a change occurring in the frequency of the local Precision Time Protocol clock, updating a frequency of a local clock of the time synchronization device with the frequency of the local Precision Time Protocol clock. [Brief description of the drawings]

[0009] [Figure 1] FIG. 1 illustrates a time synchronization network system including multiple time synchronization network domains in an embodiment of the present invention. [Diagram 2] FIG. 1 illustrates a time synchronization network system according to an embodiment of the present invention. [Diagram 3] FIG. 2 is a diagram showing a time synchronization flow according to an embodiment of the present invention. [Figure 4] FIG. 1 illustrates a time synchronization network system according to an embodiment of the present invention. [Diagram 5] FIG. 2 illustrates a network device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] In the specification and the following claims, several terms are used to refer to specific elements. As one skilled in the art can understand, hardware manufacturers may use different terms to refer to the same element. In this specification and the following claims, elements are not distinguished by their names, but by their functional differences. In addition, the term "comprising" as referred to throughout the specification and the following claims is an open-ended term and should be interpreted as, for example, "including but not limited to A."

[0011] Referring to FIG. 1, FIG. 1 is a diagram showing a time synchronization network system 1 in an embodiment of the present invention. The time synchronization network system 1 includes time synchronization network domains 12_1 to 12_3 and a time synchronization device 10. The time synchronization network domains 12_1 to 12_3 may be time synchronization network domains that operate according to the specifications of different types of Precision Time Protocol Profiles (PTP Profiles), and each of the time synchronization network domains may be a wired network, a wireless network, or a network domain that combines both, a network domain (including multiple clocks) consisting of multiple devices or multiple network switches, or a network domain (having only one clock) consisting of only a single device. The time synchronization network domains 12_1 to 12_3 are time synchronization network domains that operate according to the specifications of different types of Precision Time Protocol Profiles (PTP Profiles) A ​​to C, respectively.

[0012] The time synchronization device 10 may be, but is not limited to, a network device such as a gateway, switch, router, or bridge operating in a time synchronization network domain, and is connected to the time synchronization network domains 12_1 to 12_3 via multiple connection ports (not shown). The time synchronization device 10 synchronizes the time of the time synchronization network domains 12_1 to 12_3, so that all devices and equipment in the time synchronization network system 1 can be synchronized based on the time of the same GrandMaster (GM) clock.

[0013] In addition, without the time synchronization device 10, the time synchronization network domains 12_1 to 12_3 execute time synchronization mechanisms according to different high precision time protocol configuration files A to C, so generally speaking, cross-network domain time synchronization and integration cannot be performed. In such a case, each time synchronization network domain has an optimal clock (for example, the optimal clocks 14_1 to 14_3 in FIG. 1) as the grandmaster clock of each time synchronization network domain, in other words, without the time synchronization device 10, all devices belonging to the same time synchronization network domain perform time synchronization based on the grandmaster clock of the network domain to which they belong. Among them, the optimal clock refers to an optimal clock (suitable for a specific time synchronization network domain) evaluated based on factors such as time source, time accuracy, and oscillator stability, or may be an optimal clock (suitable for a specific time synchronization network domain) determined artificially.

[0014] In an embodiment of the present invention, the time synchronization network domains 12_1 to 12_3 perform time synchronization by the time synchronization device 10, so that all devices and equipment in the time synchronization network system 1 synchronize based on the time of the grandmaster clock 14_1 of one of the time synchronization network domains. Note that in the time synchronization network system 1, the number of the time synchronization network domains 12_1 to 12_3 is 3, but this is only for explanation. The time synchronization device 10 in the embodiment of the present invention is not limited thereto and can be applied to time synchronization between any number of time synchronization network domains. Also, in the specification, the time synchronization device 10 performs time synchronization with the optimal clock 14_1 of the time synchronization network domain 12_1 as the grandmaster clock of the time synchronization network system 1. However, the time synchronization network system 1 can also perform time synchronization based on one of the optimal clocks 14_2 or 14_3 of the time synchronization network domains 12_2 or 12_3. The grandmaster clock of the time synchronization network system 1 may be artificially specified, or may be determined by comparing the capability information of each clock in the clock announce message received by the time synchronization device 10 from each of the time synchronization network domains 12_1 to 12_3, for example, timePropertiesDS (Time Properties Parameter Data Set), parentDS (Parent Parameter Data Set), the corresponding priority vector (Time-synchronization Spanning Tree Priority Vector), etc., but is not limited thereto. In this embodiment, when the optimal clock 14_1 as the grandmaster clock fails or becomes ineffective, it can be immediately replaced by another preferable clock or the optimal clocks 14_2, 14_3 in the time synchronization network domain 12_1, and time synchronization can be continuously performed.

[0015] In detail, in the embodiment of the present invention, the time synchronization device 10 establishes corresponding Precision Time Protocol Instances (PTP Instances) 16_1 to 16_3 for the time synchronization network domains 12_1 to 12_3, respectively. The Precision Time Protocol Instances 16_1 to 16_3 use the same type of Precision Time Protocol configuration files corresponding to the connected time synchronization network domains 12_1 to 12_3, respectively. Thus, the time synchronization device 10 can exchange PTP messages with the connected time synchronization network domains to serve as a communication medium between the time synchronization device 10 and the time synchronization network domains 12_1 to 12_3. In other words, the time synchronization network domains 12_1 to 12_3 can operate based on various different types of precision time protocol configuration files such as, but not limited to, Telecom Profile, Power Profile, gPTP, and the precision time protocol instances 16_1 to 16_3 operate based on the time protocol configuration files corresponding to the time synchronization network domains 12_1 to 12_3 and operate as one of the nodes thereof.

[0016] Take the optimal clock 14_1 as the grandmaster clock of the time synchronization network system 1 for example, and all the devices and equipment in the time synchronization network system 1 synchronize according to the time of the grandmaster clock 14_1. In the embodiment of the present invention, the connection port corresponding to the precision time protocol instance 16_1 is a time receiving port, which is a connection port for receiving information on the clock, time, etc., or a connection port set as SlavePort according to the specification of the precision time protocol, i.e., the state (portState) of the connection port, and the connection ports corresponding to the precision time protocol instances 16_2 and 16_3 are time transmitting (sending) ports, which are connection ports for transmitting information on the clock, time, etc., or a connection port set as MasterPort according to the specification of the precision time protocol, i.e., the state of the connection port. The time synchronization device 10 receives the PTP message of the grandmaster clock 14_1 through the time receiving port by the precision time protocol instance 16_1, and transmits information such as the clock and time of the grandmaster clock 14_1 to the time synchronization network domains 12_2 and 12_3 through the time transmitting port by the precision time protocol instances 16_2 and 16_3. In this process, the precision time protocol instances 16_2 and 16_3 perform information conversion on the information of the grandmaster clock 14_1 based on the precision time protocol setting files B and C, respectively, to generate clock information that can be deciphered by the time synchronization network domains 12_2 and 12_3. As a result, the time synchronization device 10 can achieve time synchronization of the cross time synchronization network domains 12_1 to 12_3.

[0017] However, the mechanisms by which various different precision time protocol configuration files perform time synchronization are not all the same. For example, the time synchronization mechanism of gPTP calculates time based on the frequency ratio between the grandmaster clock and a local clock (local clock, generally speaking, a free running clock), but this frequency ratio is not used by other synchronization methods of IEEE 1588 precision time protocol configuration files. In addition, the time synchronization mechanism of gPTP marks the timestamp of a packet based on the time of a local clock when sending a PTP message. In contrast, the synchronization methods of other IEEE 1588 precision time protocol configuration files mark the timestamp of a packet based on the time of a local PTP clock when sending a PTP message. Under this difference, when a synchronous time network domain connected to the time synchronization device 10 includes a precision time protocol configuration file using IEEE 1588 and uses gPTP, it may cause measurement path delay and PTP message residence time errors. When multiple time synchronization network domains using different precision time protocol configuration files are serially connected by multiple time synchronization devices, errors may gradually accumulate and cause serious problems.

[0018] For convenience of explanation, it is assumed that the precision time protocol configuration file A used by the time synchronization network domain 12_1 in the time synchronization network system 1 is a precision time protocol configuration file using IEEE 1588, and the precision time protocol configuration file C used by the time synchronization network domain 12_3 is gPTP, and the time synchronization network system 1 is simplified as shown in Fig. 2. In detail, the precision time protocol instance 16_1 operates according to the IEEE 1588 protocol, and after receiving a synchronization message from the grandmaster clock 14_1, calculates the frequency and updates the local precision time protocol clock of the precision time protocol instance 16_1, and also synchronizes and updates the local precision time protocol clock of the precision time protocol instance 16_3 based on this information. However, the operation between the grandmaster clock 14_1 and the precision time protocol instance 16_1 is according to the IEEE 1588 protocol, and the operation between the precision time protocol instance 16_3 and the devices of the time synchronization network domain 12_3 is according to the IEEE 802.1AS. In such a case, since the precision time protocol instance 16_3 marks the timestamp of packets with the time of the local clock based on IEEE 802.1AS and sends synchronization messages, the devices in the time synchronization network domain 12_3 cannot obtain the accurate frequency ratio from the grandmaster clock 14_1 to the devices themselves, which may cause errors.

[0019] In order to eliminate the impact caused by crossing time synchronization network domains using different time protocol configuration files, in one embodiment of the present invention, a time synchronization method is implemented in the time synchronization device 10 to achieve cross-network domain time synchronization with higher accuracy. The time synchronization method can be summarized as a time synchronization flow 30, and as shown in Figure 3, the time synchronization flow 3 includes the following steps:

[0020] Step 300: Start; Step 302: Check the frequency of a local high precision time protocol clock; Step 304: Determine whether a change has occurred in the frequency of the local high precision time protocol clock; if yes, execute step 304; if not, execute step 302; and Step 306: Update the frequency of the local clock of the time synchronization device with the frequency of the local high precision time protocol clock, and then continue to execute step 302.

[0021] Based on the time synchronization flow 30, the time synchronization device 10 checks the frequency of the local high precision time protocol clock (step 302), and when a change occurs in the frequency of the local high precision time protocol clock (step 304), updates the frequency of the local clock of the time synchronization device 10 with the frequency of the local high precision time protocol clock (step 306). This allows the local high precision time protocol clock of the time synchronization device 10 to be synchronized with the frequency of the local clock, eliminating the influence caused by spanning time synchronization network domains that use different time protocol setting files.

[0022] In detail, the time synchronization device 10 continuously receives PTP messages from the grandmaster clock 14_1, calculates time based on the protocol to which the precision time protocol configuration file A used by the domain where the grandmaster clock 14_1 is located belongs, and updates the local precision time protocol clock. Note that the grandmaster clock of the time synchronization network system 1 may change or be updated to a clock from a different one than the time synchronization network domain 12_1. Therefore, the time synchronization flow 30 in the embodiment of the present invention needs to run continuously and monitor to adapt to the change. When the time synchronization device 10 detects a change in the frequency of the local precision time protocol clock, it needs to synchronize this new frequency synchronization with the local clock of the time synchronization device 10 so that the local precision time protocol clock and the local clock are synchronized.

[0023] When the local high precision time protocol clock and the local clock of the time synchronization device 10 have synchronized frequencies, when the high precision time protocol instances 16_1 to 16_3 send PTP messages, any of the high precision time protocol instances operating according to the IEEE 1588 protocol or the IEEE 802.1AS protocol can mark the packet timestamp with the same time, thereby calculating a frequency ratio with higher accuracy and improving the time accuracy of time synchronization across time synchronization network domains that use different time protocol configuration files.

[0024] Referring to Fig. 4, Fig. 4 is a diagram showing another application scenario of the time synchronization network system 1 in the embodiment of the present invention. As shown in Fig. 4, the time synchronization network domain 12_1 in the time synchronization network system 1 uses a precision time protocol setting file A of IEEE 1588, and the time synchronization network domain 12_2 uses another precision time protocol setting file B of IEEE 1588 which is different from the precision time protocol setting file A. It should be noted that, in the absence of the time synchronization device 10, even if the time synchronization network domains 12_1 and 12_2 all use precision time protocol setting files belonging to IEEE 1588, the time synchronization network domains 12_1 and 12_2 still cannot perform time synchronization across domains due to the difference between the precision time protocol setting files A and B. The time synchronization device 10 allows communication between the device in the time synchronization network domain 12_1 and the precision time protocol instance 16_1 based on the precision time protocol setting file A of the IEEE 1588 protocol, and allows communication between the precision time protocol instance 16_2 and the device in the time synchronization network domain 12_2 based on the precision time protocol setting file B of the IEEE 1588 protocol. As a result, in the embodiment of the present invention, the time synchronization device 10 allows the time synchronization network domains 12_1 and 12_2 to perform cross-network domain time synchronization, and further improves the accuracy of time synchronization across domains using different precision time protocol setting files based on the time synchronization flow 3.

[0025] Further, please refer to FIG. 5, which is a diagram illustrating a network device 5 in an embodiment of the present invention. The network device 5 may be, but is not limited to, a network device such as a gateway, a switch, a router, a bridge, etc., operating in a time-sensitive network. Any network device 5 having multiple connection ports may be used to realize the time synchronization device 10 in the embodiment of the present invention. As shown in FIG. 4, the network device 5 may include a processing unit 50 and a storage unit 52. The processing unit 50 may be a general-purpose processor, a microprocessor, an Application Specific Integrated Circuit (ASIC), etc., or a combination thereof. The storage unit 52 is coupled to the processing unit 50, may be any data storage device, and may be used to store a program code 520 and to read and execute the program code 520 by the processing unit 50. By way of example, the storage unit 52 may be, but is not limited to, a read-only memory (ROM), a flash memory, a random access memory (RAM), a hard disk, an optical data storage device, a non-volatile storage unit, etc.

[0026] The network device 5 is used to represent elements necessary for implementing the embodiment of the present invention, and those skilled in the art may make various modifications and adjustments as appropriate without being limited thereto. For example, when implementing the time synchronization device using the network device 5, the time synchronization flow 30 may be compiled into a program code 520 and stored in the storage unit 52, and the processing unit 50 may execute the time synchronization method. The storage unit 52 may also be used to store data required when executing the time synchronization method, but is not limited thereto.

[0027] From the above, the present invention provides a time synchronization method and apparatus that can improve the accuracy of time synchronization and overcome the shortcomings of the prior art when performing cross-network domain time synchronization in multiple time synchronization network domains that use different high precision time protocol setting files.

[0028] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to such embodiments, and any modifications to the present invention fall within the technical scope of the present invention as long as they do not depart from the spirit of the present invention. [Explanation of symbols]

[0029] 1: Time Synchronization Network System 10: Time Synchronizer 12_1~12_3: Time synchronization network domain 14_1~14_3: Local optimal clock 16_1~16_3: Precision Time Protocol instances A, B, C: Precision Time Protocol configuration files 3: Time synchronization flow 300~306: Step 5: Network equipment 50: Processing unit 52: Memory unit 520: Program code

Claims

1. A time synchronization method for use in a time synchronization device, comprising: The time synchronization device executes a plurality of Precision Time Protocol Instances (PTP Instances) so as to be connected to a plurality of time synchronization network domains, respectively; and the time synchronization method includes: Determining whether a change has occurred in the frequency of a local Precision Time Protocol clock (local PTP clock) of the time synchronization device; and 13. A method of time synchronization comprising: updating a frequency of a local clock of the time synchronization device with the frequency of the local Precision Time Protocol clock in response to a change occurring to the frequency of the local Precision Time Protocol clock.

2. 2. A time synchronization method according to claim 1, comprising:

11. The method of claim 10, wherein a precision time protocol instance of the plurality of precision time protocol instances is connected to a time synchronization network domain that uses a Generalized Precision Time Protocol (gPTP).

3. 3. A time synchronization method according to claim 2, comprising: The precision time protocol instance calculates a frequency rate ratio based on the frequency of the updated local clock.

4. 3. A time synchronization method according to claim 2, comprising: The method of time synchronization further comprises sending a Precision Time Protocol message (PTP message) with the updated local clock timestamp.

5. 2. A time synchronization method according to claim 1, comprising: The method for time synchronization, wherein the plurality of time synchronization network domains use a plurality of precision time protocol setting files, and the plurality of precision time protocol setting files are different from each other.

6. 1. A time synchronization device, comprising: running a plurality of Precision Time Protocol Instances (PTP Instances) connected to a plurality of time-synchronized network domains, respectively; A processing unit for executing program code; and a storage unit coupled to the processing unit for storing the program code to instruct the processing unit to perform the time synchronization method; The time synchronization method includes: Determining whether a change has occurred in the frequency of a local Precision Time Protocol clock (local PTP clock) of the time synchronization device; and updating a frequency of a local clock of the time synchronization device with the frequency of the local High Precision Time Protocol clock in response to a change occurring to the frequency of the local High Precision Time Protocol clock.

7. 7. A time synchronization device according to claim 6, A time synchronization device, wherein one precision time protocol instance of the plurality of precision time protocol instances is connected to a time synchronization network domain that uses a generalized precision time protocol (gPTP).

8. 8. A time synchronization device according to claim 7, The precision time protocol instance calculates a rate ratio based on the frequency of the updated local clock.

9. 8. A time synchronization device according to claim 7, The time synchronization method includes: The time synchronization device further includes transmitting a Precision Time Protocol message (PTP message) with the updated timestamp of the local clock.

10. 7. A time synchronization device according to claim 6, A time synchronization device, wherein the plurality of time synchronization network domains use a plurality of precision time protocol setting files, and the plurality of precision time protocol setting files are different from each other.

Citation Information

Patent Citations

  • System and method for end-to-end ptp profiles integration

    TWI669014B

  • Distributed synchronization system

    TWI772843B

  • Frequency synchronous IEEE 1588 boundary clock

    TWM433682U

  • Method and devices for synchronization using linear programming

    US20150163000A1

  • Synchronization with different clock transport protocols

    US20170359138A1