System and method for synchronizing path redundancy based on gPTP clock

By introducing a path redundancy mechanism in the gPTP clock synchronization system, the multi-path transmission between the GM node and the clock target node of the working domain and the backup domain is solved when gPTP clock synchronization fails in network links The interrupt problem improves the reliability of the system and the accuracy of clock synchronization.

CN119052165AInactive Publication Date: 2024-11-29AUTOCORE INTELLIGENT TECH (NANJING) CO LTD

Patent Information

Application Number
CN202411534939.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2024-11-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

gPTP clock synchronization will be interrupted when the network link fails, resulting in inconsistent clock synchronization in key application areas such as autonomous driving, which may cause failure.

Method used

Using gPTP-based clock synchronization path redundancy system and method, the sync/followup packets of the working domain and backup domain are generated in each clock synchronization cycle through the GM node, and transmitted through a multi-path TSN switch. The clock target node is faulty in the link Then switch to use the backup domain messages for clock synchronization.

Benefits of technology

Clock synchronization can continue in case of single-link failure, improving the reliability of the clock synchronization system and providing a more accurate clock source for upper-level services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052165A_ABST
    Figure CN119052165A_ABST
Patent Text Reader

Abstract

The invention discloses a gPTP-based clock synchronization path redundancy system and method. A multi-path network is realized between a GM node and a clock target node through a plurality of TSN switches; the GM node running the gPTP generates sync / followup messages of two different domains at the same time in each clock synchronization period and transmits the sync / followup messages through different paths of the TSN switch, and a clock target node receives the sync / followup messages of the two domains, processes the messages of the working domain and discards the messages of the backup domain. And when the link of the working domain fails, the clock target node switches the working domain in three clock synchronization periods, and clock synchronization is continued by using the message of the backup domain. Clock synchronization interruption caused by a single link fault is prevented by simultaneously sending the messages of the working domain and the backup domain at one time, the reliability of a clock synchronization system can be improved, and a more accurate clock source is provided for an upper layer service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to gPTP clock synchronization technology, and in particular to a system and method based on gPTP clock synchronization path redundancy. Background Art

[0002] gPTP (Generalized Precision Time Protocol) is defined by the IEEE Std 802.1AS standard. The purpose of gPTP is to ensure that the time of all nodes in the LAN is completely consistent, that is, time synchronization.

[0003] All devices in the gPTP domain have high-precision clock sources as input, and select the master clock as the time base of the entire system through autonomous selection or pre-setting. The master node carries and transmits different information through different types of messages; the slave node perception system completes time synchronization with the master clock through this information.

[0004] gPTP relies on the underlying network link to transmit clock synchronization messages. When the network link fails, the clock synchronization will be affected and interrupted. In key application areas such as autonomous driving, clock synchronization needs to ensure reliability under single-point failures. Otherwise, the inconsistency of time among various unit modules in the vehicle system may cause autonomous driving failures. Summary of the invention

[0005] In order to solve the deficiencies in the prior art, the purpose of the present invention is to provide a system and method based on gPTP clock synchronization path redundancy, which can continue clock synchronization when a single link fails, thereby improving the reliability of the clock synchronization system.

[0006] To achieve the purpose of the present invention, the technical solution adopted by the present invention is: A system based on gPTP clock synchronization path redundancy includes multiple device nodes and TSN switches; the device nodes include GM nodes and clock target nodes, and a multi-path network is implemented between the GM nodes and the clock target nodes through multiple TSN switches; The GM node running gPTP generates sync / followup messages for two different domains, the working domain and the backup domain, at the same time in each clock synchronization cycle, and transmits them through different paths of the TSN switch. The clock target node receives the sync / followup messages from the two domains, processes the sync / followup messages of the working domain, and discards the sync / followup messages of the backup domain.

[0007] Furthermore, when a link in the working domain fails, the clock target node switches the working domain within three clock synchronization cycles and continues clock synchronization using the sync / followup message of the backup domain.

[0008] Furthermore, the TSN switch port is configured so that the sync / followup messages of the two domains are transmitted via different paths.

[0009] Furthermore, the GM node generates sync / followup messages for domain 0 and domain 1 at the same time in each clock synchronization cycle, and sends them to the P0 port of TSN switch 1. TSN switch 1 forwards the sync / followup message of domain 0 to the P1 port and the sync / followup message of domain 1 to the P2 port according to the gPTP configuration; The P0 port of TSN switch 2 receives the sync / followup message of domain 0 and forwards it to the P1 port; the P0 port of TSN switch 3 receives the sync / followup message of domain 1 and forwards it to the P1 port; the P1 port of TSN switch 4 receives the sync / followup message of domain 0, and the P2 port receives the sync / followup message of domain 1, and both are forwarded to the P0 port; The clock synchronization messages of domain 0 and domain 1 are transmitted via two different paths and finally reach the clock target node. The sync / followup messages of domain 0 and domain 1 are received. The default working domain is domain 0. Only the sync / followup messages of domain 0 are processed and clock calibration is performed. The sync / followup messages of domain 1 are discarded.

[0010] Furthermore, when the TSN switch 2 fails and causes the link to be disconnected, the clock target node only receives the sync / followup message of domain 1. After 3 cycles of message loss, it switches the working domain to domain 1 and uses the sync / followup message of domain 1 for calculation and clock calibration.

[0011] A method based on gPTP clock synchronization path redundancy comprises the following steps: (1) The GM node sends sync / followup messages to domain 0 and domain 1 in each clock synchronization cycle. Domain 0 is the working domain and domain 1 is the backup domain. (2) By setting the TSN switch ports, the sync / followup messages of the two domains are transmitted via different paths; (3) Under normal circumstances, the clock target node receives sync / followup messages from both domains, selects the sync / followup message from the working domain for clock synchronization, and discards the sync / followup message from the backup domain. When a single link fails, the clock target node switches the working domain within three clock synchronization cycles and uses the sync / followup message from the backup domain to continue clock synchronization.

[0012] Furthermore, in step (1), when the Md Sync Send state machine is in the GPTP_SYNC_SEND_SEND_SYNC state, the sync messages of the working domain and the backup domain are respectively packaged, and sync_ptr_redun is added to the state machine structure to store the sync message information of the backup domain; When the Md Sync Send state machine is in the GPTP_SYNC_SEND_SEND_FUP state, it obtains the sync message sending time of the working domain through the sync_ptr pointer, constructs the corresponding followup message of the working domain and sends it; it obtains the sync message sending time of the backup domain through the sync_ptr_redun pointer, constructs the followup message of the backup domain and sends it.

[0013] Furthermore, in step (3), the clock target node initializes the working domain to domain 0 and the loss count to 0; after receiving the sync message, it checks whether the domain field is the working domain. If so, the discard count is set to 0 and subsequent processing calculations are performed to calibrate the clock. Otherwise, it is discarded and the discard count is increased by 1. It is also determined whether the discard count is greater than or equal to 3. If so, the working domain is switched to 1.

[0014] The beneficial effect of the present invention is that, compared with the prior art, the present invention prevents clock synchronization interruption caused by a single link failure by sending sync / followup messages of the working domain and the backup domain at the same time, thereby improving the reliability of the clock synchronization system and providing a more accurate clock source for upper-layer services. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is a schematic diagram of the system topology based on gPTP clock synchronization path redundancy according to the present invention; Figure 2 This is a topology diagram of gPTP clock synchronization when a single link fails; Figure 3 This is a flow chart of a method based on gPTP clock synchronization path redundancy. DETAILED DESCRIPTION

[0016] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of this application.

[0017] The system based on gPTP clock synchronization path redundancy described in the present invention includes multiple device nodes (endstations) and TSN switches (TSN SWITCH); the device nodes include GM (grandmaster) nodes and clock target nodes, and a multi-path network is realized between the GM nodes and the clock target nodes through multiple TSN switches.

[0018] During normal operation, the GM node running gPTP simultaneously generates sync / followup messages for two different domains in each clock synchronization cycle and transmits them through different paths of the TSN switch. The clock target node receives the sync / followup messages from the two domains and only processes the sync / followup messages from the working domain, discarding those from the other domain.

[0019] When the link of the working domain fails, the clock target node switches the working domain within three clock synchronization cycles and uses the sync / followup messages of the backup domain to continue clock synchronization.

[0020] The system based on gPTP clock synchronization path redundancy needs to be applied to the multi-path topology network including TSN SWTICH. By setting the TSN switch port, the sync / followup messages of the two domains are transmitted through different paths.

[0021] The configuration of TSN SWITCH is shown in Table 1: Table 1 SWITCH / PORT P0 P1 P2 1 Domain 0 / Domain 1 SLAVE Domain 0 MASTER Domain 1 MASTER 2 Domain 0 SLAVE Domain 0 MASTER 3 Domain 1 SLAVE Domain 1 MASTER 4 Domain 0 / Domain 1 MASTER Domain 0 SLAVE Domain 1 SLAVE like Figure 1 As shown in the figure, in normal operation, device node 1 (end station 1) is a GM (grandmaster) node, which generates sync / followup messages for domain 0 and domain 1 at the same time in each clock synchronization cycle and sends them to the P0 port of TSN switch 1 (TSNSWITCH1). According to the gPTP configuration, TSN switch 1 forwards the sync / followup message of domain 0 to the P1 port and the sync / followup message of domain 1 to the P2 port.

[0022] The P0 port of TSN switch 2 (TSN SWITCH2) receives the sync / followup message of domain 0 and forwards it to the P1 port. The P0 port of TSN switch 3 (TSN SWITCH3) receives the sync / followup message of domain 1 and forwards it to the P1 port. The P1 port of TSN switch 4 (TSN SWITCH4) receives the sync / followup message of domain 0, and the P2 port receives the sync / followup message of domain 1, and both are forwarded to the P0 port.

[0023] The clock synchronization messages (sync / followup) of domain 0 and domain 1 are transmitted via two different paths, and finally reach device node 2 (end station2). Device node 2 (end station2) is the clock target node, receiving the sync / followup messages of domain 0 and domain 1. Since the default working domain is domain 0, only the sync / followup messages of domain 0 are processed and clock calibration is performed, and the sync / followup messages of domain 1 are discarded.

[0024] like Figure 2 As shown in the figure, when the TSN switch 2 (TSN SWITCH2) fails and causes the left link to be disconnected, the device node 2 (end station2) can only receive the sync / followup message of domain 1. After 3 cycles of message loss, it switches the working domain to domain 1 and uses the sync / followup message of domain 1 for calculation and clock calibration to ensure that the clock synchronization can be normal after a single link failure.

[0025] like Figure 3 As shown, the method based on gPTP clock synchronization path redundancy includes the steps of: (1) The GM node sends sync / followup messages to domain 0 and domain 1 in each clock synchronization cycle. Domain 0 is the working domain and domain 1 is the backup domain. When the Md Sync Send state machine is in the GPTP_SYNC_SEND_SEND_SYNC state, it packages the sync messages of the working domain and the backup domain respectively, and adds sync_ptr_redun to the state machine structure to save the sync message information of the backup domain, such as the sending time, so as to be used in the subsequent corresponding followup messages.

[0026] When the Md Sync Send state machine is in the GPTP_SYNC_SEND_SEND_FUP state, it obtains the sync message sending time of the working domain through the sync_ptr pointer, constructs the corresponding followup message of the working domain and sends it; it obtains the sync message sending time of the backup domain through the sync_ptr_redun pointer, constructs the followup message of the backup domain and sends it.

[0027] (2) The clock target node initializes the working domain to domain 0 and the loss count to 0. After receiving the sync message, it checks whether the domain field is the working domain. If so, the discard count is set to 0 and subsequent processing calculations are performed to calibrate the clock. Otherwise, it is discarded and the discard count is increased by 1. It is also determined whether the discard count is greater than or equal to 3. If so, the working domain is switched to 1.

[0028] The clock target node running the gPTP program uses work_domain to maintain the number of the current working domain. When receiving a sync message, check whether the domain to which the sync message belongs is work_domain. If so, receive and perform subsequent processing to calibrate the clock; if the domain to which the sync message belongs is not work_domain, discard it.

[0029] The beneficial effect of the present invention is that, compared with the prior art, the present invention prevents clock synchronization interruption caused by a single link failure by sending sync / followup messages of the working domain and the backup domain at the same time, thereby improving the reliability of the clock synchronization system and providing a more accurate clock source for upper-layer services.

[0030] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.

Claims

1. A system based on gPTP clock synchronization path redundancy, It is characterized in that It includes multiple device nodes and TSN switches; the device nodes include GM nodes and clock target nodes, and a multi-path network is implemented between the GM nodes and the clock target nodes through multiple TSN switches; The GM node running gPTP generates sync / followup messages for two different domains, the working domain and the backup domain, at the same time in each clock synchronization cycle, and transmits them through different paths of the TSN switch. The clock target node receives the sync / followup messages from the two domains, processes the sync / followup messages of the working domain, and discards the sync / followup messages of the backup domain.

2. The system based on gPTP clock synchronization path redundancy according to claim 1, It is characterized in that When the link of the working domain fails, the clock target node switches the working domain within three clock synchronization cycles and uses the sync / followup messages of the backup domain to continue clock synchronization.

3. The system based on gPTP clock synchronization path redundancy according to claim 1, It is characterized in that The TSN switch ports are configured so that the sync / followup messages of the two domains are transmitted via different paths.

4. The system based on gPTP clock synchronization path redundancy according to claim 3, It is characterized in that The GM node generates sync / followup messages for domain 0 and domain 1 at the same time in each clock synchronization cycle, and sends them to the P0 port of TSN switch 1. TSN switch 1 forwards the sync / followup messages of domain 0 to the P1 port and the sync / followup messages of domain 1 to the P2 port according to the gPTP configuration; The P0 port of TSN switch 2 receives the sync / followup message of domain 0 and forwards it to the P1 port; the P0 port of TSN switch 3 receives the sync / followup message of domain 1 and forwards it to the P1 port; the P1 port of TSN switch 4 receives the sync / followup message of domain 0, and the P2 port receives the sync / followup message of domain 1, and both are forwarded to the P0 port; The clock synchronization messages of domain 0 and domain 1 are transmitted via two different paths and finally reach the clock target node. The sync / followup messages of domain 0 and domain 1 are received. The default working domain is domain 0. Only the sync / followup messages of domain 0 are processed and clock calibration is performed. The sync / followup messages of domain 1 are discarded.

5. The system based on gPTP clock synchronization path redundancy according to claim 4, It is characterized in that When the TSN switch 2 fails and causes the link to be disconnected, the clock target node only receives the sync / followup message of domain 1. After 3 cycles of message loss, it switches the working domain to domain 1 and uses the sync / followup message of domain 1 for calculation and clock calibration.

6. A method based on gPTP clock synchronization path redundancy, based on the system based on gPTP clock synchronization path redundancy described in any one of claims 1-5, It is characterized in that Includes steps: (1) The GM node sends sync / followup messages to domain 0 and domain 1 in each clock synchronization cycle. Domain 0 is the working domain and domain 1 is the backup domain. (2) By setting the TSN switch ports, the sync / followup messages of the two domains are transmitted via different paths; (3) Under normal circumstances, the clock target node receives sync / followup messages from the two domains, selects the sync / followup message from the working domain for clock synchronization, and discards the sync / followup message from the backup domain; When a single link fails, the clock target node switches the working domain within three clock synchronization cycles and uses the sync / followup messages of the backup domain to continue clock synchronization.

7. The method based on gPTP clock synchronization path redundancy according to claim 6, It is characterized in that In step (1), when the Md Sync Send state machine is in the GPTP_SYNC_SEND_SEND_SYNC state, it packages the sync messages of the working domain and the backup domain respectively, and adds sync_ptr_redun to the state machine structure to save the sync message information of the backup domain; When the Md Sync Send state machine is in the GPTP_SYNC_SEND_SEND_FUP state, it obtains the sync message sending time of the working domain through the sync_ptr pointer, constructs the corresponding followup message of the working domain and sends it; it obtains the sync message sending time of the backup domain through the sync_ptr_redun pointer, constructs the followup message of the backup domain and sends it.

8. The method based on gPTP clock synchronization path redundancy according to claim 6, It is characterized in that In step (3), the clock target node initializes the working domain to domain 0 and the loss count to 0; after receiving the sync message, it checks whether the domain field is the working domain. If so, the discard count is set to 0 and subsequent processing calculations are performed to calibrate the clock. If not, it is discarded and the discard count is increased by 1. It is also determined whether the discard count is greater than or equal to 3. If so, the working domain is switched to 1.

Citation Information

Patent Citations

  • TSN train network topology based on multiple clock domains

    CN115913972A

  • Redundant master clock synchronization method, device and equipment based on TSN and storage medium

    CN116506054A

  • Method for simultaneously synchronizing system clock time and PTP hardware clock time based on gPTP

    CN116915352A

  • Data transmission method, system and device and readable storage medium

    CN117201420A

  • Method for improving time synchronization reliability of airborne time-sensitive network

    CN117240391A

Cited By

  • Whole vehicle safety clock system based on time synchronization protocol

    CN119561642A

  • Vehicle safety clock system based on time synchronization protocol

    CN119561642B