Cross-network time synchronization method for fusion of AUTBUS and TSN

Through the fusion of AUTBUS and TSN and the time synchronization of IEEE 1588 protocol, combined with the time compensation of linear regression prediction algorithm, the problem of TSN scale and topological structure limitations is solved, and the end-to-end time synchronization of heterogeneous networks is realized, which meets the intelligent manufacturing high efficiency and real-time requirements.

CN119402122AActive Publication Date: 2025-02-07CHONGQING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202411538544.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-07
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

The existing time-sensitive network (TSN) has limitations in scale and topology, which is difficult to meet the high efficiency and real-time requirements such as intelligent manufacturing, and traditional bus technologies cannot meet the sustainable development and application needs of intelligent manufacturing.

Method used

By implementing the fusion of AUTBUS and TSN, the IEEE 1588 protocol is used for time synchronization, and a linear regression prediction algorithm is built in the AUTBUS terminal to perform time compensation to achieve end-to-end time synchronization of heterogeneous networks.

Benefits of technology

The end-to-end time synchronization between AUTBUS and TSN is realized in heterogeneous networks, ensuring time consistency, improving synchronization accuracy and efficiency, and meeting the high efficiency and real-time requirements such as intelligent manufacturing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402122A_ABST
    Figure CN119402122A_ABST
Patent Text Reader

Abstract

The invention relates to a cross-network time synchronization method oriented to AUTBUS and TSN fusion, and belongs to the field of network time synchronization. The invention aims to solve the problems that the traditional Ethernet cannot meet the time-sensitive application requirement and the scale of the TSN is limited and the like. According to the method, a time compensation value prediction algorithm is placed in an AUTBUS terminal, time delay values of all parts in the heterogeneous network are collected and predicted, and finally a prediction result is compensated to a local clock of the AUTBUS terminal, so that end-to-end time synchronization of the AUTBUS and TSN fusion network is realized. The method comprises the four steps of TSN intra-network time synchronization, gateway intra-network time synchronization, AUTBUS intra-network time synchronization and AUTBUS terminal time compensation, time delay data are predicted through a linear regression prediction algorithm, and synchronization precision and efficiency are improved. The method is suitable for the fields of intelligent manufacturing, industrial automation and the like, and an effective solution is provided for time synchronization of the heterogeneous network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of network time synchronization and relates to a cross-network time synchronization method for the integration of AUTBUS and TSN. Background Art

[0002] In traditional Ethernet, the transmission and arrival time of data packets cannot be guaranteed, resulting in unreliable data transmission and uncertainty of delay, making traditional Ethernet unable to meet the needs of time-sensitive applications. In order to solve the above problems, the Time-Sensitive Network (TSN) technology has emerged. TSN technology enables Ethernet to be used in time-sensitive scenarios by providing high-precision time synchronization and predictable data transmission services. However, TSN needs to master the time information of all nodes in the network and perform time synchronization in the entire network, which means that the scale of TSN cannot be too large. In addition, TSN also has problems such as network topology limitations and transmission distance limitations. Although TSN can provide highly reliable and low-latency communication services within the local area network, the limitations of TSN are particularly prominent in the wide area network environment. In order to solve the limitations of TSN, and also to adapt to the integration and interoperability of various networks, protocols and buses in the era of intelligent manufacturing, TSN is integrated with other bus technologies for use.

[0003] With the popularization of intelligent manufacturing applications, its characteristics include small-scale personalized production, human-machine cooperation, information system integration and high-efficiency manufacturing. These characteristics require new intelligent industrial equipment to have the ability to communicate with the controller layer and the higher-level data application decision layer, have data preprocessing, compression, filtering and other functions, and be able to perform new analysis tasks. In addition, the new generation of bus networks in industrial sites need to meet the requirements of intelligence, long distance, broadband, real-time, multi-service and unified addressing. Traditional buses, such as Profibus, ProfiNET and CCLINK, can no longer meet the continuous development and application needs of intelligent manufacturing. In response to these needs, a new generation of high-performance industrial bus AUTBUS came into being.

[0004] AUTBUS, as a powerful and stable industrial fieldbus standard, has received extensive attention due to its excellent performance and stability. The bus system uses a two-wire medium and can support a maximum bandwidth of up to 100Mbps, easily meeting various data transmission requirements, including periodic and non-periodic real-time data and non-real-time data transmission.

[0005] AUTBUS not only adapts to fixed bandwidth and variable bandwidth data services, but also builds a deterministic time-sensitive fieldbus communication network based on clock synchronization by adopting orthogonal frequency division multiplexing (OFDM) technology. This network architecture ensures the accuracy and real-time performance of data during transmission, providing a solid communication foundation for industrial automation.

[0006] In terms of networking, AUTBUS demonstrates its unique advantages. It supports long-distance multi-node connections, with a maximum transmission distance of up to 1000 meters / 100Mbps, and can support up to 254 nodes. At the same time, AUTBUS also supports bus and ring topologies, providing users with flexible and reliable networking options. In terms of transmission rate, AUTBUS also performs well, with a minimum communication time slice of only 8us and a minimum one-way transmission delay of less than 40us, ensuring efficient and real-time communication.

[0007] In order to meet the continuous development and application needs of intelligent manufacturing, AUTBUS is constantly exploring the integration with advanced technologies such as TSN. By achieving end-to-end time synchronization of heterogeneous networks integrated with TSN, AUTBUS will be able to ensure the synchronous operation of various applications and devices in heterogeneous networks, further improving service quality and user experience. In the future, AUTBUS will continue to play its advantages and contribute to the development of the industrial automation field.

[0008] In summary, the integration of AUTBUS and TSN can make up for the limitations of TSN, and heterogeneous networks integrated with TSN are also an important trend in the era of intelligent manufacturing. Therefore, achieving end-to-end time synchronization of the AUTBUS and TSN integrated network is an important prerequisite for bringing into play the advantages of the AUTBUS and TSN integrated network.

[0009] In terms of TSN time synchronization, the main methods currently used include IEEE 802.1AS, IEEE 1588, and Precision Time Protocol (gPTP). Y.Li et al. proposed to introduce the concept of wide area precision time protocol (gPTP) domain from the content of IEEE 802.1AS standard to realize the establishment of time synchronization model of wide area TSN (see reference: Y.Li, Z.Yin, Y.Ma, F.Xu, F.Zhangand G.Xu, "A Time Synchronization Method Based on Clustering Algorithm for Industrial Time-Sensitive Networks," 2023 15th International Conference on Communication Software and Networks (ICCSN), Shenyang, China, 2023, pp.238-242, doi:10.1109 / ICCSN57992.2023.10297331.), and on this basis, proposed a large-scale industrial TSN dynamic time synchronization method based on clustering algorithm, but this method has a large demand for calculation in the dynamic partition part of the training. Lu Hao et al. IEEE 1588 time synchronization algorithm based on node self-compensation. This algorithm introduces the concept of master-slave node compensation based on the IEEE 1588 protocol, taking the master node as the global center, and the slave node performs self-compensation based on the Kalman optimal estimate difference with the master node clock, thereby achieving high-precision time synchronization (see reference: Lu Hao, Yu Xiuwu, Liu Yong. IEEE 1588 clock synchronization algorithm based on node self-compensation [J]. Journal of Sensor Technology, 2023, 36(01):53-59.). If the master node changes, the clock time of the entire network will change accordingly, which will lead to an increase in computational complexity and energy consumption.

[0010] In terms of time synchronization of industrial networks or fieldbuses, the current popular industrial networks or fieldbuses include 5G, Profibus, ProfiNET and CCLINK. Based on the commonality of industrial networks, Shan Feiqiao et al. proposed a time synchronization method for IWSNs based on the Precision Time Protocol (PTP). First, the clock interference and asymmetric link noise in PTP bidirectional time synchronization are considered to establish a clock state model. Secondly, the reverse adaptive Kalman filter algorithm is used to reduce noise interference. Then, the accuracy of the noise statistical model is evaluated by comparing the new information ratio of the reverse and forward estimates. Finally, based on the detection threshold, the clock state process noise is dynamically adjusted to accurately estimate the clock parameters (see reference: Shan Feiqiao, Wang Zhaowei, Shen Yue. Time synchronization method for industrial wireless sensor networks based on the Precision Time Protocol [J]. Computer Applications, 2023, 43(07): 2255-2260.). Under different clock timing accuracies, the clock offset and offset rate estimated by the reverse adaptive Kalman filter algorithm have smaller and more stable error standard deviations, effectively solving the Kalman filter divergence problem caused by noise uncertainty and other reasons, and improving the reliability of time synchronization, but the computational overhead is relatively large.

[0011] In terms of heterogeneous network time synchronization, 5G, as a popular communication technology in recent years, has made outstanding contributions to the development of the intelligent manufacturing era. The integration of 5G with various industrial networks has become a popular application direction. Based on cross-domain time synchronization of data packet relay, Z. Chai et al. proposed a cross-domain clock synchronization method based on data packet relay in the 5G-TSN integrated network. This method realizes the estimation of the residence time of 5G timing messages by introducing clock compensation technology, thereby improving the synchronization accuracy (see reference: Z. Chai, W. Liu, M. Li and J. Lei, "Cross Domain Clock Synchronization Based on Data Packet Relay in 5G-TSN Integrated Network," 2021 IEEE 4th International Conference on Electronics and Communication Engineering (ICECE), Xi'an, China, 2021, pp. 141-145, doi: 10.1109 / ICECE54449.2021.9674640.). At the same time, since the accuracy of time synchronization is related to the accuracy of timestamp, the amount of calculation will increase accordingly. Li Xiaohui et al. proposed a multi-beam joint timing synchronization algorithm based on IEEE 802.1AS, mathematically modeled the transmission signal, used the cross-correlation and autocorrelation algorithms for synchronization detection, and estimated the propagation delay. This method can effectively synchronize the timing of multiple beams, and by adding differential operations. It can weaken the influence of frequency deviation and improve the synchronization success rate and accuracy (see literature: Li Xiaohui, Wang Xianwen, Fan Tao, etc. High-precision time synchronization under 5G-TSN system [J]. Systems Engineering and Electronic Technology, 2023, 45(02): 559-565.), but for higher frequency deviation values, the autocorrelation and cross-correlation algorithms have higher estimation errors, resulting in serious bit error rates. At the same time, the amount of calculation is large, which is limited by the geographical location and the configuration of the mobile network. X. Chen et al. proposed a time synchronization scheme based on timestamp compensation and carrier spacing optimization. The solution uses timestamp compensation and carrier interval optimization to improve synchronization accuracy, and considers the cumulative synchronization error problem in the case of multiple bridges. Through simulation verification, the solution can provide high-precision time synchronization in multi-domain manufacturing system scenarios and achieve collaborative work through 5G networks. By integrating 5G and TSN networks, the solution can achieve end-to-end deterministic connections in industrial networks and provide strong support for collaborative manufacturing systems.This fusion scheme not only improves the real-time performance of communication, but also enhances the reliability and efficiency of the entire system (see reference: X. Chen, C. Chen and Q. Xu, "Clock Synchronization Scheme for Integrated 5G and TSN Networks in Collaborative Manufacturing Systems," 2023 42nd Chinese Control Conference (CCC), Tianjin, China, 2023, pp. 5397-5402, doi: 10.23919 / CCC58697.2023.10240865.). This method involves multiple technologies and protocols, and the research method is relatively complex, requiring more resources and time. Given the complexity and variability of the actual situation, the experimental results in the literature may not fully reflect the actual situation.

[0012] AUTBUS industrial fieldbus is a new bus standard, and the application and research of AUTBUS is in its infancy. At the same time, in order to adapt to the development of Industry 4.0 and the era of intelligent manufacturing, the end-to-end time synchronization of heterogeneous networks that integrate AUTBUS and TSN is realized, laying a solid foundation for the advantages of heterogeneous networks. A time compensation value prediction algorithm is placed in the AUTBUS terminal, and the delay values ​​of each part of the entire heterogeneous network are collected to the AUTBUS terminal and input into the prediction algorithm. Then, a time synchronization compensation value is output through the prediction algorithm to compensate the local clock of the AUTBUS terminal. Finally, the end-to-end time synchronization of heterogeneous networks that integrate AUTBUS and TSN is completed. Summary of the invention

[0013] In view of this, an object of the present invention is to provide a cross-network time synchronization method for the integration of AUTBUS and TSN.

[0014] In order to achieve the above object, the present invention provides the following technical solutions:

[0015] A cross-network time synchronization method for AUTBUS and TSN integration includes the following steps:

[0016] Step 1: The TSN switch issues a command to complete the time synchronization within the TSN network through the IEEE 1588 protocol, complete the delay measurement between links, and transmit the delay data between links measured during the time synchronization process to the AUTBUS terminal;

[0017] Step 2: After the TSN module in the gateway completes the time synchronization with the TSN switch, the TSN module in the gateway sends a command to the gateway AUTBUS module to complete the measurement of the link delay and the time synchronization in the gateway through two-way message synchronization, and transmits the measured delay data to the AUTBUS terminal;

[0018] Step 3: After completing the time synchronization within the gateway, the gateway AUTBUS module starts to synchronize the time within the AUTBUS network. The AUTBUS management node and the AUTBUS terminal complete the link delay measurement and time synchronization through two-way messages, and transmit the link delay data to the AUTBUS terminal.

[0019] Step 4: After completing steps 1 to 3, the delay data between the three links and the start time of the delay measurement cycle are stored in the AUTBUS terminal and input into the prediction algorithm. The output value of the prediction algorithm will be compensated to the local clock of the AUTBUS terminal, so that the local clock time of the AUTBUS terminal is synchronized with the master clock of the entire heterogeneous network, and finally the end-to-end time synchronization of the heterogeneous network integrating AUTBUS and TSN is completed.

[0020] Furthermore, the prediction algorithm is a linear regression prediction algorithm.

[0021] Further, the linear regression prediction algorithm comprises the following steps:

[0022] Step 41: Given a data set, corresponding to the delay data between each link input to the algorithm, the delay data directly measured between the AUTBUS terminal and the TSN switch, is initially input;

[0023] Step 42: Obtain the objective function and loss function. To solve the optimal parameters, the delay range requirement needs to be measured, and an objective function formula needs to be quantified. The computer continuously optimizes during the solution process. Regarding how to solve the problem with the model, a set of predicted values ​​are finally obtained, that is, the predicted value of delay compensation / predicted delay between the AUTBUS terminal and the TSN switch, which is compared with the existing real value, that is, the directly measured delay data between the AUTBUS terminal and the TSN switch, the number of data rows, and the number of delay data groups. Therefore, the loss function is defined as:

[0024]

[0025] Step 43: Derivative the loss function and solve it using the least squares method; solving and is the process of minimizing the loss function, and in statistics, it is called the least squares "parameter estimation" of the linear regression model; derive ω and b in L(ω,b) respectively:

[0026]

[0027] Step 44: Gradient descent, parameter update;

[0028]

[0029] The parameters are updated until convergence, and the parameters ω and b are obtained.

[0030] Step 44: Gradient descent, parameter update. Update the learning rate α:

[0031]

[0032] The parameters are updated until convergence, and the parameters ω and b are obtained.

[0033] Furthermore, the linear regression prediction algorithm uses the following formula for prediction:

[0034]

[0035] ω and b are the parameters when the loss function is solved to minimize the function. is the predicted value.

[0036] Furthermore, the linear regression prediction algorithm uses the following formula to calculate the parameters ω and b:

[0037]

[0038] Let the left side of the above two equations be 0, and the closed-form solution of the optimal solution for the parameters ω and b is obtained, which is expressed as:

[0039]

[0040]

[0041] The beneficial effects of the present invention are:

[0042] (1) Perform time synchronization within the TSN network, time synchronization within the gateway, and time synchronization within the AUTBUS network, and finally perform time compensation at the AUTBUS terminal to ensure time consistency across the heterogeneous network.

[0043] (2) Through two-way message synchronization, the link delay between the TSN switch and the gateway TSN module, the gateway TSN module and the AUTBUS module, and the AUTBUS management node and the terminal node is accurately measured to provide a data basis for time compensation.

[0044] (3) A linear regression prediction algorithm is built into the AUTBUS terminal to collect link delay information and make predictions, and to compensate the local clock in advance, effectively reducing the impact of link delay changes on time synchronization accuracy and improving synchronization accuracy and efficiency.

[0045] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0047] Figure 1 It is a heterogeneous network structure integrating AUTBUS and TSN;

[0048] Figure 2 For TSN time synchronization;

[0049] Figure 3 It is the time synchronization information interaction mode between TSN nodes;

[0050] Figure 4 Time synchronization within the gateway

[0051] Figure 5 It is the time synchronization information interaction mode between modules in the gateway

[0052] Figure 6 For AUTBUS time synchronization;

[0053] Figure 7 It is the time synchronization information exchange method between AUTBUS nodes. DETAILED DESCRIPTION

[0054] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0055] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0056] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "back" and the like indicate directions or positional relationships, they are based on the directions or positional relationships shown in the drawings, which are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0057] 1. Network architecture

[0058] First, we need to build a heterogeneous network that integrates AUTBUS and TSN, such as Figure 1 shown.

[0059] The architecture is divided into three parts, from left to right, namely AUTBUS, gateway and TSN. The gateway exchanges information with AUTBUS and TSN through wired connection. In TSN, it includes TSN terminals, TSN switches and TSN modules in the border gateway. The communication between each part follows the IEEE 1588 protocol to maintain time synchronization between devices; in the gateway, it is divided into AUTBUS module, TSN module and protocol conversion module. In the figure, the protocol conversion module and TSN module are integrated together, and the communication between the TSN module and the AUTBUS module uses the SLIP serial line Internet protocol for communication; AUTBUS includes AUTBUS terminals and AUTBUS modules in the gateway. The AUTBUS bus can connect to up to 254 nodes, but there can only be one management node. Figure 1 The AUTBUS module in the border gateway is set as the AUTBUS management node. The communication between the AUTBUS nodes complies with the national standard specification (GB / T42019-2022, Broadband Industrial Bus AUTBUS System Architecture and Communication Specifications Based on Time-Sensitive Technology [S]) written by Chongqing University of Posts and Telecommunications, Dongtu Technology and other units.

[0060] In the TSN part, it is the core of the entire heterogeneous network. The master clock of the entire heterogeneous network is located in the TSN switch. The time of all terminal node clocks needs to be aligned with the master clock to ensure the normal operation of the devices and applications running in this heterogeneous network. TSN terminals can control any node in the heterogeneous network or view the working status of any node.

[0061] In the gateway part, the gateway is responsible for the communication protocol conversion between AUTBUS and TSN, ensuring smooth communication between TSN and AUTBUS, and providing a basis for the normal operation of applications running on the heterogeneous network where AUTBUS and TSN are integrated. At the same time, the AUTBUS module also serves as the AUTBUS management node.

[0062] In the AUTBUS part, the AUTBUS terminal receives information from the TSN terminal, performs corresponding tasks based on the received information, and reports various information about itself to the TSN terminal. At the same time, the local clock of the AUTBUS terminal is aligned to the master clock of the entire heterogeneous network (the local clock of the TSN switch). After that, all devices or applications running on this heterogeneous network need to be synchronized on the basis of the end-to-end time of the entire heterogeneous network.

[0063] 2. Cross-network time synchronization method for AUTBUS and TSN integration

[0064] 2.1 Overview of the Solution

[0065] In order to achieve time synchronization of AUTBUS and TSN fusion network, the present invention provides the following technical solutions:

[0066] First, the symbols and definitions used in the present invention are placed in the symbol definition collection in Table 1.

[0067] Table 1

[0068]

[0069] The cross-network time synchronization method for the integration of AUTBUS and TSN includes the following steps:

[0070] Step 1: The TSN switch issues a command to complete the time synchronization within the TSN network through the IEEE 1588 protocol and complete the inter-link delay measurement. After completing the time synchronization between the gateway TSN module and the TSN switch, the inter-link delay data measured during the time synchronization process is transmitted to the AUTBUS terminal.

[0071] Step 2: After the TSN module in the gateway completes the time synchronization with the TSN switch, the TSN module in the gateway sends a command to the gateway AUTBUS module to complete the measurement of the link delay and the time synchronization in the gateway through bidirectional message synchronization. The measured delay data is also transmitted to the AUTBUS terminal.

[0072] Step 3: After completing the time synchronization in the gateway, the gateway AUTBUS module starts to synchronize the time in the AUTBUS network. Due to the characteristics of the AUTBUS bus standard, a management node is required to act as the master clock in the entire AUTBUS network, and other nodes need to synchronize their local clocks to the clock time of the management node. The AUTBUS management node and the AUTBUS terminal complete the link delay measurement and time synchronization through two-way messages. After the time synchronization between the AUTBUS management node and the AUTBUS terminal is completed, the link delay data is transmitted to the AUTBUS terminal.

[0073] Step 4: After completing steps 1 to 3, the delay data between the three links and the start time of the delay measurement cycle are stored in the AUTBUS terminal. These data are input into a prediction algorithm. The output value of the algorithm will be compensated to the local clock of the AUTBUS terminal, so that the local clock time of the AUTBUS terminal is synchronized with the master clock of the entire heterogeneous network, and finally the end-to-end time synchronization of the heterogeneous network integrating AUTBUS and TSN is completed.

[0074] 2.2 Solution Design

[0075] 2.2.1 TSN time synchronization solution design

[0076] TSN includes TSN terminals, TSN switches (master clocks) and TSN modules in border gateways. Time synchronization is required between TSN switches and gateway TSN modules, such as Figure 2 shown.

[0077] The TSN switch sends instructions to the TSN module in the gateway and completes the measurement of link delay and time synchronization within the TSN network through the IEEE 1588 protocol.

[0078] Modeling the TSN switch clock (master clock):

[0079] T MC (t) = t MC (1)

[0080] Modeling the Gateway TSN Module Clock:

[0081] T GW_TSN (t) = t GW_TSN (2)

[0082] where t GW_TSN is the current clock time of the gateway TSN module, T GW_TSN (t) is the timestamp generated by the TSN module.

[0083] The time synchronization information interaction between the TSN switch and the gateway TSN module described in step 1 of section 2.1 is as follows Figure 3 shown.

[0084] The calculation process of the delay and frequency offset between the TSN switch and the gateway TSN module described in step 1 of section 2.1 is as follows:

[0085] First, the TSN switch sends a time synchronization message to the gateway TSN module, including the time synchronization message sending timestamp T MC (t1), the timestamp of the gateway TSN module receiving the time synchronization message is T GW_TSN (t2), TSN sends a reply message to the TSN switch, and the timestamp of the reply message is T GW_TSN (t3), the timestamp of the TSN switch receiving the reply message is T MC (t4), the final switch will contain T MC The Follow_up message (t4) is then sent to the gateway TSN module. The gateway TSN module calculates the link delay and clock frequency offset between the TSN switch and the gateway TSN module based on the four timestamps:

[0086]

[0087] After completing the above operations in the gateway TSN module, the gateway TSN module completes the time synchronization with the TSN switch. At the same time, the gateway TSN module packages the information including the link delay and frequency deviation between the TSN switch and the gateway TSN module and sends it to the AUTBUS terminal node.

[0088] 2.2.2 Design of time synchronization solution within the gateway

[0089] The gateway includes an AUTBUS module and a TSN module. The two modules communicate via the SLIP serial line Internet protocol, and time synchronization is required between the AUTBUS module and the TSN module. Figure 4 shown.

[0090] The information interaction between the AUTBUS module and the TSN module in the gateway is as follows Figure 5 shown.

[0091] The time synchronization process between the TSN module and the AUTBUS module in the gateway described in step 2 of section 2.1 considers the link delay due to the wired connection between the TSN module and the AUTBUS module:

[0092] The local clock of the AUTBUS module is modeled as:

[0093] GW AUTBUS (t) = t GW_AUTBUS (5)

[0094] where t GW_AUTBUS The current time of the local clock of the AUTBUS module, GW AUTBUS (t) is the local clock time used for time synchronization.

[0095] The local clock of the TSN module is modeled as:

[0096] GW TSN (t) = t GW_TSN (6)

[0097] where t GW_TSN The current time of the local clock of the TSN module, GW TSN (t) is the local clock time used for time synchronization.

[0098] The AUTBUS module initiates a time synchronization request, and the TSN module sends a GW with a timestamp after receiving the request. TSN (t1) The time when AUTBUS receives the reply message is GW AUTBUS (t2), so the delay between modules is:

[0099]

[0100] Where S is the length of the serial message, R is the serial baud rate, and t is the time interval between sending each byte. The local clock of the AUTBUS module after correction should be:

[0101]

[0102] After completing the adjustment of the local clock time, the AUTBUS module in the gateway packages the time delay information between modules in the gateway and sends it to the AUTBUS terminal.

[0103] 2.2.3 AUTBUS time synchronization scheme design

[0104] According to the characteristics of the AUTBUS fieldbus, an AUTBUS network requires a management node. There is only one management node. According to the AUTBUS cross-TSN network architecture diagram, the AUTBUS module in the gateway is set as the AUTBUS management node, and the clocks of all other terminals in the network are synchronized with the clock of the management node. Figure 6 shown.

[0105] The time synchronization information interaction between the AUTBUS management node and the terminal node is as follows: Figure 7 shown.

[0106] First, model the clock of the management node:

[0107] AUTBUS Management (t) = t AUTBUS_Management (9)

[0108] where t AUTBUS_Management The local clock time of the management node in the AUTBUS network. Management (t) is the timestamp generated by the management node.

[0109] Model the local clock of the terminal node:

[0110] AUTBUS Terminal (t) = t AUTBUS_Terminal (10)

[0111] where t AUTBUS_Terminal The local clock current node of the terminal node in the AUTBUS network, AUTBUS Terminal (t) is the timestamp generated by the terminal node.

[0112] The management node first sends a delay measurement request to the terminal node, and the terminal node sends a reply message to complete the measurement of the delay between links. After that, the terminal node initiates a time synchronization request. The management node sends a message containing the current time and the delay between links to the terminal node, and the terminal node completes the adjustment of the local clock based on this message.

[0113] The specific time synchronization process is as follows:

[0114] Delay measurement

[0115] Management node in AUTBUS Management At (t1), a delay measurement request is sent, and the terminal node sends a delay measurement request at AUTBUS Terminal (t2) The request is received and the Terminal (t3) sends a reply message to the management node, and the management node sends a reply message to the management node on AUTBUS ManagementAt (t4), the reply message is received and the inter-link delay is calculated as:

[0116]

[0117] Time Synchronization

[0118] After the delay measurement process, the management node will store the delay data between the management node and each terminal. The management node will send a message containing the departure time of the time synchronization service, the signal frame time length and the delay between the corresponding terminal node and the corresponding terminal node to the corresponding terminal node. The terminal node adjusts the local clock according to this message. The value of the local clock of the terminal node is:

[0119] AUTBUS Terminal (t Real )=Delay AUTBUS +T Frame +AUTBUS Management (t Trigger ) 12)

[0120] AUTBUS Terminal (t Real ) is the local clock value of the terminal node after compensation, T Frame The time length of a signal frame, AUTBUS Management (t Trigger ) is the triggering moment of the management node time synchronization service. Time synchronization between nodes in the AUTBUS network is completed.

[0121] 2.2. 4AUTBUS terminal time compensation scheme design

[0122] After the work of the above three parts, the delay information between the three links will eventually be sent to the AUTBUS terminal node. Since the AUTBUS terminal node has been synchronized with the clock of the AUTBUS management node in the previous part, it is also necessary to compensate for the delay between modules in the gateway and the delay between the TSN switch and the gateway TSN module.

[0123] After completing steps 1-3, it is necessary to perform direct delay measurement between the TSN switch and the AUTBUS terminal to obtain the delay data between the TSN switch and the AUTBUS terminal:

[0124] D_total i (t),i=1,2,…,200(12)

[0125] Here, i represents the delay data between the i-th group of TSN switches and the AUTBUS terminal.

[0126] Finally, the local clock of the AUTBUS terminal needs to compensate for all delays in the three links to ensure time synchronization with the TSN master clock. At the same time, a linear regression prediction algorithm is built into the AUTBUS terminal. After collecting a certain amount of link delay information, the value that needs to be compensated is predicted, and the local clock is compensated in advance to improve synchronization accuracy. The reasons for choosing linear regression analysis are as follows:

[0127] (1) The linear regression model usually uses the least squares method for parameter estimation. This method has high computational efficiency and can quickly obtain the estimated values ​​of the model parameters. High computational efficiency can reduce the time consumed by the algorithm in calculating the predicted value and improve the efficiency of time synchronization.

[0128] (2) Linear regression analysis has strong predictive power, especially when there is a linear relationship between the independent variable and the dependent variable. In the present invention, the output of the linear regression prediction algorithm is the clock compensation value, and this compensation value has a strong linear correlation with the input of the algorithm (the sum of the delays between links).

[0129] Use the linear regression analysis algorithm to compensate for the values ​​that need to be compensated. When the heterogeneous network starts running, the TSN master clock sends a timestamp message to the AUTBUS terminal to indicate the start of the delay measurement cycle, starts time synchronization between links, and stores delay data at the same time; after the time synchronization process between nodes is completed, the delay data is sent to the terminal node for storage. After completion, the TSN switch sends a timestamp message to the AUTBUS terminal to indicate the master clock time under the current delay data conditions. This timestamp message is also sent to the AUTBUS terminal. After completion, the next delay measurement is performed.

[0130] A set of data includes: the start time of the current cycle, the end time of the delay measurement cycle under the current delay data conditions, the link delay data, and the AUTBUS terminal reception completion time. From these data, the link delay data and the real delay can be obtained. These are the important data needed in the linear regression algorithm.

[0131] After the stored data reaches 200 groups, the prediction algorithm is run to compensate the local clock for time. The method for predicting the compensation value of time synchronization is a linear regression prediction algorithm.

[0132] The stored link delay data set is represented as:

[0133] D i (t),i=1,2,…,200(13)

[0134] Linear regression analysis is a predictive modeling technique that usually uses a curve / line to fit data points. The goal is to minimize the difference in the distance from the curve to the data point (target delay value 30us). Linear regression assumes that the target value is linearly related to the feature, that is, it satisfies a multivariate linear equation. By constructing a loss function and solving the parameters ω and b when the function is minimized. Usually the following expression is satisfied:

[0135]

[0136] in is the predicted value, corresponding to the time compensation value output by the algorithm. The independent variable x represents the link delay data input when the algorithm is running; the dependent variable y represents the actual delay value, which represents the direct measured delay data between the AUTBUS terminal and the TSN switch, which is known. What we want to achieve is to predict a new x, whose corresponding Therefore, in order to construct this functional relationship, the goal is to solve the parameters ω and b in the linear model through known data.

[0137] Algorithm steps:

[0138] Step 1: Given a data set D_total i (t) (corresponding to the delay data between each link input into the algorithm in the present invention, the delay data directly measured between the AUTBUS terminal and the TSN switch) is used for initial input.

[0139] Step 2: Obtain the objective function and loss function. To find the optimal parameters, a standard (delay range requirement) is needed for measurement. For this purpose, an objective function formula needs to be quantified so that the computer can continuously optimize during the solution process. Regardless of how the model solves the problem, a set of predicted values ​​is ultimately obtained. (predicted value of delay compensation / predicted delay between AUTBUS terminal and TSN switch), compared with the existing true value y (directly measured delay data between AUTBUS terminal and TSN switch), the number of data rows n (number of delay data groups), and the loss function is defined as:

[0140]

[0141] in is the delay prediction value of the i-th group, y i is the true experimental value of the i-th group, and formula (15) is the average square distance between the predicted value and the true value, also known as MAE (mean square error). Substitute the previous function formula (1) into the loss function, and regard the parameters ω and b to be solved as the dependent variables of the function L, and we can get the following formula:

[0142]

[0143] Further optimized to:

[0144]

[0145] where ω * is the value of ω when L is optimized, b * is the value of b when L is optimized, that is, formula (17) is the core objective optimization formula for parameters ω and b.

[0146] Step 3: Derivative the loss function and solve it using the least squares method. Solving ω and b is the process of minimizing the loss function. In statistics, it is called the least squares "parameter estimation" of the linear regression model. Derivative ω and b in L(ω,b) respectively:

[0147]

[0148] By setting the left side of equations (18) and (19) to 0, we can obtain the closed-form solution of the optimal solution for parameters ω and b, which is expressed as:

[0149]

[0150] Step 4: Gradient descent, parameter update. Parameter update is performed according to equations (1) and (3) and another parameter α (gradient descent learning rate):

[0151]

[0152] Where ← denotes the derivation of update parameters.

[0153] The parameters are updated until convergence, and the parameters ω and b are obtained.

[0154] Finally, according to the calculated parameters ω and b, the parameters are further calculated. When the AUTBUS terminal receives the new link delay and D i (t), calculate Compensate the terminal clock and complete the end-to-end time synchronization of the heterogeneous network that integrates AUTBUS and TSN.

[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A cross-network time synchronization method for AUTBUS and TSN integration, characterized by: The following steps are involved: Step 1: The TSN switch issues a command to complete the time synchronization within the TSN network through the IEEE 1588 protocol, complete the delay measurement between links, and transmit the delay data between links measured during the time synchronization process to the AUTBUS terminal; Step 2: After the TSN module in the gateway completes the time synchronization with the TSN switch, the TSN module in the gateway sends a command to the gateway AUTBUS module to complete the measurement of the link delay and the time synchronization in the gateway through two-way message synchronization, and transmits the measured delay data to the AUTBUS terminal; Step 3: After completing the time synchronization within the gateway, the gateway AUTBUS module starts to synchronize the time within the AUTBUS network. The AUTBUS management node and the AUTBUS terminal complete the link delay measurement and time synchronization through two-way messages, and transmit the link delay data to the AUTBUS terminal. Step 4: After completing steps 1 to 3, the delay data between the three links and the start time of the delay measurement cycle are stored in the AUTBUS terminal and input into the prediction algorithm. The output value of the prediction algorithm will be compensated to the local clock of the AUTBUS terminal, so that the local clock time of the AUTBUS terminal is synchronized with the master clock of the entire heterogeneous network, and finally the end-to-end time synchronization of the heterogeneous network integrating AUTBUS and TSN is completed.

2. According to claim 1, a cross-network time synchronization method for AUTBUS and TSN integration is characterized in that: The prediction algorithm is a linear regression prediction algorithm.

3. According to claim 2, a cross-network time synchronization method for AUTBUS and TSN integration is characterized in that: The linear regression prediction algorithm comprises the following steps: Step 41: Given a data set, corresponding to the delay data between each link input to the algorithm, the delay data directly measured between the AUTBUS terminal and the TSN switch, is initially input; Step 42: Obtain the objective function and the loss function; define the loss function as: Step 43: Derivative the loss function and solve it using the least squares method; solving and is the process of minimizing the loss function, and in statistics, it is called the least squares "parameter estimation" of the linear regression model; derive ω and b in L(ω,b) respectively: Step 44: Gradient descent, parameter update; The parameters are updated until convergence, and the parameters ω and b are obtained.

4. According to claim 3, a cross-network time synchronization method for AUTBUS and TSN integration is characterized in that: The linear regression prediction algorithm uses the following formula for prediction: ω and b are the parameters when the loss function is solved to minimize the function. is the predicted value.

5. According to claim 1, a cross-network time synchronization method for AUTBUS and TSN integration is characterized in that: The linear regression prediction algorithm uses the following formula to calculate the parameters ω and b: Let the left side of the above two equations be 0, and the closed-form solution of the optimal solution of parameters ω and b is obtained, which is expressed as:

Citation Information

Patent Citations

  • Industrial wireless and TSN fusion-oriented cross-network time synchronization method

    CN114050884A

  • AUTBUS and TSN fusion network deterministic time delay scheduling method based on cross-domain weighting

    CN118075816A

  • Cross-network time synchronization method for industrial wireless network and TSN fusion

    US20240243829A1

Cited By

  • Convergence gateway of TSN network and AUTBUS network, and terminal node of AUTBUS network

    CN119996338A

  • Gateway for fusion of TSN network and AUTBUS network, terminal node of AUTBUS network

    CN119996338B

  • Heterogeneous system integrating TSN network and AUTBUS network

    CN120017727A

  • A heterogeneous system integrating TSN and AUTBUS networks

    CN120017727B

  • Network delay compensation method based on time synchronization

    CN120378038A