Clock synchronization method and wireless communication system
By employing a distributed clock synchronization method in industrial networks, the clock of the central node is synchronized first, and then the driving devices are wirelessly timed through the edge nodes. This solves the clock synchronization accuracy problem caused by the uncertainty of wireless network links and improves the overall synchronization accuracy.
Patent Information
- Application Number
- PCT/CN2024/140989
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-04
- Filing Date
- 2024-12-20
- Publication Date
- 2025-12-11
AI Technical Summary
When wireless communication is introduced into industrial networks, the uncertainty of wireless network links leads to poor clock synchronization accuracy.
A distributed clock synchronization method is adopted, which synchronizes the clock of the central node through the control device, and uses the synchronized central node clock to provide wireless time synchronization to the edge nodes and driving devices, thereby gradually realizing the clock synchronization of the entire wireless communication system.
It improves clock synchronization accuracy, reduces the impact of wireless network link uncertainty on synchronization results, and ensures the clock synchronization effect of the EtherCat protocol in wireless networks.
Smart Images

Figure CN2024140989_11122025_PF_FP_ABST
Abstract
Description
Clock synchronization method and wireless communication system
[0001] Related applications
[0002] This application claims priority to the Chinese patent application No. 202410715974.1, filed on June 4, 2024, with the Chinese Patent Office, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the technical field of industrial network, in particular to a clock synchronization method and a wireless communication system. BACKGROUND
[0004] At present, in the industrial network, due to the needs of business, it is necessary to comply with specific application layer and link layer protocols, and there are widely used industrial network standards, such as EtherCat, etc. In the industrial control system, different driver, input / output (IO) and other driving layer devices often need to be synchronized to perform preset actions. The EtherCat protocol also has a clock synchronization function.
[0005] However, since the EtherCat network usually adopts a linear network, when the control devices and driving devices therein are synchronized after the introduction of wireless communication, the traditional clock protocol transparent transmission mechanism needs to pass through the wireless network to forward the clock information and measure the related messages. Due to the uncertainty of the link of the wireless network, the clock synchronization accuracy is poor. SUMMARY
[0006] The main purpose of the present application is to provide a clock synchronization method and a wireless communication system, which aims to solve the technical problem that the clock synchronization accuracy is poor when the wireless network is synchronized by the clock protocol transparent transmission mechanism due to the uncertainty of the link of the wireless network in the prior art.
[0007] To achieve the above-mentioned purpose, the present application provides a clock synchronization method, which is applied to a center node in a wireless communication system, and the method comprises:
[0008] Based on the clock synchronization of the initial center node clock by the control device in the wireless communication system, a synchronized center node clock is obtained;
[0009] The initial edge node clock of the edge node in the wireless communication system is wirelessly time-synchronized by the synchronized center node clock, so that the driving device in the wireless communication system is clock-synchronized by the edge node according to the obtained synchronized edge node clock.
[0010] In an embodiment, the step of obtaining the synchronized central node clock based on the clock synchronization of the initial central node clock by the control device in the wireless communication system comprises:
[0011] receiving the first measurement message sent by the control device in the wireless communication system, and transmitting the generated first feedback message to the control device according to the first measurement message;
[0012] determining the first measurement message receiving time and the first feedback message sending time based on the first measurement message and the first feedback message;
[0013] transmitting the first measurement message receiving time and the first feedback message sending time to the control device, so that the control device performs clock synchronization of the initial central node clock according to the first measurement message receiving time and the first feedback message sending time.
[0014] In an embodiment, the step of transmitting the first measurement message receiving time and the first feedback message sending time to the control device, so that the control device performs clock synchronization of the initial central node clock according to the first measurement message receiving time and the first feedback message sending time comprises:
[0015] transmitting the first measurement message receiving time and the first feedback message sending time to the control device, so that the control device determines the first transmission time delay according to the first measurement message receiving time and the first feedback message sending time;
[0016] performing clock synchronization of the initial central node clock based on the first transmission time delay.
[0017] In an embodiment, after the step of performing wireless time service of the initial edge node clock of the edge node in the wireless communication system by the synchronized central node clock, the method further comprises:
[0018] receiving the second transmission time delay sent by the edge node, the second transmission time delay being obtained by the clock synchronization of the driving device by the edge node;
[0019] obtaining the logical topology of the wireless communication system, and determining the correction value of the driving device according to the logical topology and the second transmission time delay;
[0020] transmitting the second measurement message sent by the control device to each driving device through the edge node, so that the driving device generates the second feedback message; correcting the second measurement message receiving time and the second feedback message sending time generated by the driving device through the correction value, and feeding back the correction result to the control device.
[0021] In an embodiment, the step of transmitting the second measurement message sent by the control device to each drive device through the edge node to make the drive device generate a second feedback message comprises:
[0022] Upon receiving the second measurement message sent by the control device, determining a current receiving time point;
[0023] Transmitting the second measurement message to the drive device through the edge node to make the drive device generate a second feedback message;
[0024] The step of correcting the receiving time point of the second measurement message generated by the drive device and the sending time point of the second feedback message by the correction value comprises:
[0025] Correcting the receiving time point of the second message generated by the drive device and the feedback time point of the second message by the correction value and the current receiving time point.
[0026] In addition, to achieve the above object, the application further provides a clock synchronization method applied to an edge node in a wireless communication system, the method comprising:
[0027] Sending a third measurement message to be transmitted to a drive device in the wireless communication system, and determining a current sending time point of the third measurement message based on a synchronization edge node clock;
[0028] Wherein, the synchronization edge node clock is obtained by wireless time service of an initial edge node clock by a synchronization center node clock of a center node in the wireless communication system, and the synchronization center node clock is obtained by clock synchronization of an initial center node clock of the center node by a control device in the wireless communication system;
[0029] Clock synchronizing the drive device based on the current sending time point.
[0030] In an embodiment, after the step of sending the generated third measurement message to the drive device in the wireless communication system, further comprising:
[0031] Receiving a third feedback message fed back by the drive device based on the third measurement message, and receiving a receiving time point of the third measurement message generated by the drive device and a sending time point of the third feedback message;
[0032] The step of clock synchronizing the drive device based on the current sending time point comprises:
[0033] Clock synchronizing the drive device based on the current sending time point, the receiving time point of the third measurement message and the sending time point of the third feedback message.
[0034] In an embodiment, the step of synchronizing the clock of the driving device based on the current sending time, the third measurement packet receiving time and the third feedback packet sending time comprises:
[0035] determining a second transmission time delay based on the current sending time, the third measurement packet receiving time and the third feedback packet sending time;
[0036] synchronizing the clock of the driving device based on the second transmission time delay.
[0037] In an embodiment, the step of synchronizing the clock of the driving device based on the second transmission time delay comprises:
[0038] generating a clock packet based on the synchronized edge node clock, and transmitting the clock packet to the driving device, so that the driving device synchronizes the clock according to the clock packet and the second transmission time delay.
[0039] In addition, to achieve the above object, the present application further provides a wireless communication system, comprising a center node and an edge node.
[0040] The center node is configured to synchronize an initial center node clock based on a control device in the wireless communication system, and obtain a synchronized center node clock.
[0041] The center node is further configured to perform wireless time service on an initial edge node clock of the edge node through the synchronized center node clock, so that the edge node obtains a synchronized edge node clock.
[0042] The edge node is configured to send a third measurement packet to be transmitted to a driving device in the wireless communication system, and determine a current sending time of the third measurement packet based on the synchronized edge node clock.
[0043] The edge node is further configured to synchronize the clock of the driving device based on the current sending time.
[0044] The application provides a clock synchronization method and a wireless communication system. The clock synchronization method comprises the following steps: clock synchronization is performed on an initial central node clock based on a control device in the wireless communication system, and a synchronized central node clock is obtained; wireless time service is performed on an initial edge node clock of an edge node in the wireless communication system through the synchronized central node clock, so that the edge node performs clock synchronization on a driving device in the wireless communication system according to the obtained synchronized edge node clock. Since the initial central node clock of the central node is first clock synchronized based on the control device in the wireless communication system, the synchronized central node clock is obtained, then the initial edge node clock of the edge node in the wireless communication system is clock synchronized through the synchronized central node clock, so that the edge node obtains the synchronized edge node clock, finally the driving device in the wireless communication system is clock synchronized through the edge node according to the synchronized edge node clock, so that the clock synchronization of the entire wireless communication system is completed. Compared with the existing clock synchronization mechanism of clock protocol transparent transmission, the application can adopt a distributed clock synchronization mode to sequentially perform clock synchronization on the central node, the edge node and the driving device, so that the influence of the uncertainty of the link in the wireless network on the synchronization result is reduced, and the clock synchronization precision is improved. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only constitute some embodiments of the application, and for those skilled in the art, other drawings can also be obtained according to the structures shown in these drawings without any creative effort.
[0046] Fig. 1 is a schematic diagram of a linear EtherCat network topology;
[0047] Fig. 2 is a schematic diagram of an EtherCat network topology based on wireless communication;
[0048] Fig. 3 is a schematic diagram of a multi-level EtherCat network topology of wired-wireless fusion;
[0049] Fig. 4 is a flowchart of a first embodiment of the clock synchronization method according to the application;
[0050] Fig. 5 is a schematic diagram of an EtherCat network topology of wired-wireless fusion in the clock synchronization method according to the application;
[0051] Fig. 6 is a flowchart of a second embodiment of the clock synchronization method according to the application;
[0052] Fig. 7 is a flowchart of a third embodiment of the clock synchronization method according to the application;
[0053] Figure 8 is a structural block diagram of a first embodiment of a wireless communication system according to an embodiment of the present application.
[0054] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0055] It should be understood that the specific embodiments described herein merely exemplify the application and do not limit the application.
[0056] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0057] It should be noted that all directional indications, such as upper, lower, left, right, front, back, etc., in the embodiments of the present application are only used to explain the relative positional relationship, movement condition, etc. between components in a certain posture (as shown in the drawings), and if the certain posture changes, the directional indications also change accordingly.
[0058] In addition, the description of "first", "second" and the like in the present application is only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first", "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the realization of those of ordinary skill in the art, and when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, and is not within the scope of protection claimed by the present application.
[0059] It should be noted that, with the continuous modernization of production and manufacturing processes, the continuous personalization of user demand for products, and the continuous convenience of factory deployment and maintenance demand, industrial networks need to provide more flexible network topology and provide more extensive mobility. At the same time, with the continuous development of wireless technology, wireless technology is constantly penetrating in the field of industrial networks dominated by wired communication, and more and more manufacturers are trying to use wireless industrial networks.
[0060] Currently, in the industrial network, due to the needs of business, specific application layer and link layer protocols need to be followed, and there are widely used industrial network standards, such as EtherCat, ProfiNet, Ethernet IP, etc. In the industrial control system, different driver, output / input (IO) and other driver layer devices often need to be able to synchronize to perform preset actions, and the EtherCat protocol also has a clock synchronization function.
[0061] However, since the EtherCat network usually adopts a linear network, when the control devices and driver devices therein are synchronized after wireless communication is introduced, the traditional clock protocol transparent transmission mechanism needs to forward clock information and measure related messages through the wireless network, and due to the uncertainty of the link of the wireless network, the clock synchronization accuracy is poor.
[0062] For ease of understanding, reference is made to FIG. 1 and FIG. 2, FIG. 1 is a linear EtherCat network topology diagram, and FIG. 2 is an EtherCat network topology diagram based on wireless communication.
[0063] As shown in FIG. 1, in the linear EtherCat network, it can generally include a control device (i.e. PLC in FIG. 1) and several driver devices (i.e. Driver in FIG. 1), wherein the control device can serve as the control center of the industrial control business, and has the function of the EtherCat master station, and the driver device can serve as the execution and feedback node of the industrial control business, and has the function of the EtherCat slave station.
[0064] In FIG. 1, one control device and four driver devices are used for illustration, and the driver devices are connected in series, and the first driver program is connected with the control device, and the four driver devices are sequentially recorded as slave station 0 to slave station 3 from left to right. When synchronizing the clock in each driver device in FIG. 1, the clock of slave station 0 can be taken as the reference clock (i.e. Driver Ref clock in FIG. 1), and the message (i.e. BWR in FIG. 1) sent by the control device is transmitted from slave station 0 to slave station 3 in turn, and slave station 3 can feed back a message and transmit it to slave station 0 in turn, if the time when slave station 0 sends the message to slave station 1 (i.e. Driver Local(1) in FIG. 1) is recorded as T1, the time when slave station 1 receives the message is recorded as T2(1), the time when slave station 2 (i.e. Driver Local(2) in FIG. 1) receives the message is recorded as T2(2), the time when slave station 3 (i.e. Driver Local(3) in FIG. 1) receives the message is recorded as T2(3), the time when slave station 3 sends the feedback message to slave station 2 is recorded as T3(3), the time when slave station 2 sends the feedback message is recorded as T3(2), the time when slave station 1 sends the feedback message is recorded as T3(1), and the time when slave station 0 receives the feedback message is recorded as T4.
[0065] Then the master station (i.e. the control device) can read the recorded time from each slave station, and calculate the transmission delay, write into each slave station, and then can send the local system clock in the slave station based on the system time, so as to realize clock synchronization; wherein taking the transmission delay between slave station 0 and slave station 1 as an example, if the transmission delay is recorded as Tdelay(1), the clock deviation between slave station 0 and slave station 1 is recorded as Toffset(1), and the calculation formula is: Tdelay(1) = [(T4-T1)-(T3(1)-T2(1))] / 2, Toffset(1) = T2(1)-T1-Tdelay(1). Then the clock synchronization of slave station 1 can be realized according to the calculated Tdelay(1) and Toffset(1), and the same method can be used for the remaining slave stations, which will not be described here.
[0066] As shown in FIG. 2, when wireless communication is introduced, in the EtherCat network based on wireless communication, the control device (i.e. PLC in FIG. 2), the center node (i.e. MS in FIG. 2), the edge node (i.e. TS in FIG. 2) and the drive device (i.e. Driver in FIG. 2) can be included; wherein the functions of the control device and the drive device are consistent with those in the linear EtherCat network, the center node can serve as the convergence center of the wireless network and has the management capability of the wireless network, such as the Long-Term Evolution (LTE) base station, the New Radio (NR) base station, the Access Point (AP) of the Wireless Fidelity (WiFi) and the like, the center node can directly connect the drive device through wire or connect the drive device through the edge node (i.e. MS connects Driver through TS in FIG. 2); the edge node can serve as the terminal node of the wireless network and accept the network configuration management of the center node.
[0067] In the EtherCat network based on wireless communication, the number of the center node, the edge node and the drive device can be multiple, and in FIG. 2, one controller, one center node, two edge nodes and four drive devices are used for illustration, the controller and the center node are connected through wire, the center node and each edge node are connected through wireless, one edge node is connected with one drive device through wire, and the other edge node is connected with three drive devices through wire respectively.
[0068] It is necessary to emphasize that the edge node can also manage or obtain the configuration information or topology information of the next level EtherCat network, i.e., there can be multiple levels of EtherCat networks in the EtherCat network based on wireless communication, and the next level EtherCat network can be managed through the edge node. Referring to FIG. 3, FIG. 3 is a schematic diagram of a multi-level EtherCat network topology in a wired-wireless fusion.
[0069] As shown in FIG. 3, a two-level EtherCat network is used for illustration, i.e., the drive device before the center node to the next center node is one level, and then the edge node of the current level can accept the management of the center node of the current level and also manage the next level EtherCat network.
[0070] And according to FIG. 2 and FIG. 3, after introducing wireless communication, if the clock synchronization between the control device and the drive device is to be achieved, the clock information and the measurement related messages need to be forwarded through the wireless network, and due to the uncertainty of the link of the wireless network, the clock synchronization accuracy is poor.
[0071] Therefore, in order to solve the above defects, the embodiment provides a clock synchronization method, which can first synchronize the initial center node clock of the center node based on the control device in the wireless communication system, obtain the synchronized center node clock, and then synchronize the initial edge node clock of the edge node in the wireless communication system through the synchronized center node clock for wireless time service, so that the edge node obtains the synchronized edge node clock, and finally the drive device in the wireless communication system is clocked according to the synchronized edge node clock through the edge node, thereby completing the clock synchronization of the entire wireless communication system. Compared with the existing clock synchronization using clock protocol transparent transmission mechanism, the embodiment can use a distributed clock synchronization mode to sequentially synchronize the center node, the edge node and the drive device, thereby reducing the influence of the uncertainty of the link in the wireless network on the synchronization result and improving the clock synchronization accuracy.
[0072] In order to facilitate understanding, the clock synchronization method provided by the embodiment of the application will be specifically introduced below in combination with FIG. 4 to FIG. 8.
[0073] Referring to FIG. 4, FIG. 4 is a flowchart of a first embodiment of the clock synchronization method provided by the embodiment of the application.
[0074] As shown in FIG. 4, in the embodiment, the clock synchronization method is applied to the center node in the wireless communication system, and the method comprises:
[0075] Step S10: Synchronize the initial center node clock based on the control device in the wireless communication system to obtain the synchronized center node clock.
[0076] It can be understood that the wireless communication system described above can be a system composed of the wire-wireless fusion EtherCat network described above, and the central node described above can be the MS in FIG. 2 and FIG. 3.
[0077] In the embodiment, the clock in the central node before clock synchronization can be regarded as the initial central node clock described above, and the initial central node clock is clock-synchronized by using the EtherCat synchronization mode (i.e., the mode in FIG. 1) or the 1588 synchronization mode, and the clock in the central node after synchronization is recorded as the synchronized central node clock described above.
[0078] Further, in order to realize the clock synchronization in the central node, the EtherCat synchronization mode is used for illustration in the embodiment, and the specific process is that the step S10 described above includes:
[0079] Step S11: receiving a first measurement packet sent by a control device in the wireless communication system, and transmitting a first feedback packet generated according to the first measurement packet to the control device.
[0080] It should be understood that the first measurement packet described above can be a packet for clock synchronization between the control device and the central node. In order to facilitate subsequent understanding, FIG. 5 is used for illustration, which is a topology diagram of a wire-wireless fusion EtherCat network in a clock synchronization method proposed in the embodiment, as shown in FIG. 5, one control device (i.e., PLC in FIG. 5), nine drive devices (i.e., Driver 0 to Driver 8 in FIG. 5), one central node (i.e., MS0 in FIG. 5), and two edge nodes (i.e., TS0 and TS1 in FIG. 5) are used for illustration;
[0081] The control device, the first drive device (i.e., Driver 0 in FIG. 5), the second drive device (i.e., Driver 1 in FIG. 5), the third drive device (i.e., Driver 2 in FIG. 5), and the central node (i.e., MS0 in FIG. 5) are connected in series, the central node is connected to the first edge node (i.e., TS0 in FIG. 5) and the second edge node (i.e., TS1 in FIG. 5) respectively, the first edge node, the fourth drive device (i.e., Driver 3 in FIG. 5), and the fifth drive device (i.e., Driver 4 in FIG. 5) are connected in series, the second edge node is connected to the sixth drive device (i.e., Driver 5 in FIG. 5), the seventh drive device (i.e., Driver 6 in FIG. 5), and the ninth drive device (i.e., Driver 8 in FIG. 5) respectively, and the seventh drive device is further connected to the eighth drive device (i.e., Driver 7 in FIG. 5).
[0082] In actual use, the control device can first generate the first measurement message and pass through the first driving device, the second driving device, the third driving device, and the center node in sequence. After the center node receives the first measurement message, the center node can generate a first feedback message and feed back to the control device via the original route.
[0083] Step S12: determining the first measurement message receiving time and the first feedback message sending time based on the first measurement message and the first feedback message.
[0084] When the center node receives the first measurement message, the current receiving time can be taken as the first measurement message receiving time, and the time when the center node sends the first feedback message can be taken as the first feedback message sending time. Similarly, for the driving devices between the control device and the center node, the corresponding first measurement message receiving time when the driving device receives the first measurement message and the corresponding first feedback message sending time when the driving device sends the first feedback message can also be recorded.
[0085] Step S12: transmitting the first measurement message receiving time and the first feedback message sending time to the control device, so that the control device performs clock synchronization on the initial center node clock according to the first measurement message receiving time and the first feedback message sending time.
[0086] After determining the first measurement message receiving time and the first feedback message sending time, the control device can obtain the corresponding first measurement message receiving time and the first feedback message sending time of each driving device and the center node, and perform clock synchronization on each driving device and the center node according to these times.
[0087] Further, in order to realize the clock synchronization of the center node, in the embodiment, the step S12 comprises:
[0088] Step S121: transmitting the first measurement message receiving time and the first feedback message sending time to the control device, so that the control device determines the first transmission time delay according to the first measurement message receiving time and the first feedback message sending time.
[0089] It should be noted that after the control device receives the corresponding first measurement message receiving time and the first feedback message sending time of each driving device and the center node, the control device can determine the transmission time delay between the control device and the center node as the first transmission time delay according to the above EtherCat synchronization method, and can also determine the transmission time delay between the control device and each driving device. Of course, other synchronization methods can also be used, and the embodiment does not limit this.
[0090] Step S122: clock synchronizing an initial central node clock based on the first transmission delay.
[0091] It can be understood that after determining the first transmission delay between the control device and the central node, a clock in the control device, any drive device between the control device and the central node, or the central node can be taken as a master clock, and an initial central node clock in the central node is clock synchronized based on the first transmission delay to obtain a synchronized central node clock.
[0092] In a specific implementation, the control device can first complete clock synchronization between the central node and a drive device or the control device connected through a wire based on the first measurement packet, i.e., the control device in FIG. 5 is clock synchronized with the first drive device, the second drive device, the third drive device, and the central node, and a clock obtained after synchronization in the central node is taken as the synchronized central node clock.
[0093] Step S20: wireless timing the initial edge node clock of the edge node in the wireless communication system by the synchronized central node clock, so that the edge node clock synchronizes the drive device in the wireless communication system according to the obtained synchronized edge node clock.
[0094] It should be understood that the initial edge node clock can be an unsynchronized clock in the edge node, and the synchronized edge node clock can be a clock obtained after clock synchronization of the initial edge node clock.
[0095] In actual use, after the central node completes clock synchronization, the synchronized central node clock in the central node can be taken as a master clock to clock synchronize the initial edge node clock in all connected edge nodes, i.e., the central node in FIG. 5 is clock synchronized with the first edge node and the second edge node. In this process, a wireless timing manner can be used, i.e., a corresponding timing manner is used for clock synchronization according to different wireless communication systems, which is not limited in the embodiment.
[0096] After the edge node completes clock synchronization, the initial edge node clock in the edge node can become the synchronized edge node clock, and the edge node can take the synchronized edge node clock as a master clock to clock synchronize the connected drive devices, i.e., the first edge node in FIG. 5 clock synchronizes the fourth drive device and the fifth drive device, and the second edge node clock synchronizes the sixth to eighth drive devices, to obtain the transmission delay corresponding to each drive device, thereby completing clock synchronization of the entire wireless communication system.
[0097] It should be noted that when the edge node performs clock synchronization on the connected drive device, the above-mentioned EtherCat synchronization mode can also be used, and of course other modes can also be used, and the present embodiment does not limit this.
[0098] The present embodiment can first perform clock synchronization on the initial center node clock of the center node based on the control device of the wireless communication system, obtain the synchronized center node clock, then perform wireless time service on the initial edge node clock of the edge node in the wireless communication system through the synchronized center node clock, so that the edge node obtains the synchronized edge node clock, and finally perform clock synchronization on the drive device in the wireless communication system through the edge node according to the synchronized edge node clock, thereby completing the clock synchronization of the entire wireless communication system. Compared with the existing clock synchronization mechanism using clock protocol transparent transmission, the present embodiment can use a distributed clock synchronization mode to sequentially perform clock synchronization on the center node, the edge node and the drive device, thereby reducing the influence of the uncertainty of the link in the wireless network on the synchronization result, and improving the clock synchronization precision.
[0099] It should be emphasized that since the working modes of the control device and the drive device in the above-mentioned EtherCat network remain unchanged, only the center node and the edge node are adjusted, and then the EtherCat protocol is fused with the wireless network, so that the EtherCat distributed clock synchronization can be continued to support, thereby ensuring the normal operation mechanism of the existing business under the premise of upgrading the mobility and flexibility of the network.
[0100] Referring to FIG. 6, FIG. 6 is a flowchart of a second embodiment of the clock synchronization method proposed in the present application.
[0101] In order to enable the control device to still realize real-time communication in the wired-wireless fusion EtherCat network, as shown in FIG. 6, after the step of performing wireless time service on the initial edge node clock of the edge node in the wireless communication system through the synchronized center node clock in the present embodiment, the step further includes:
[0102] Step S50: receiving the second transmission delay sent by the edge node, the second transmission delay being obtained by performing clock synchronization on the drive device through the edge node.
[0103] It should be noted that the second transmission delay can be a transmission delay between the edge node and the connected driving device, or between the connected driving devices. As shown in FIG. 5, the transmission delay between the first edge node and the fourth driving device can be denoted as Td0, the transmission delay between the fourth driving device and the fifth driving device can be denoted as Td1, the transmission delay between the second edge node and the sixth driving device can be denoted as Td2, the transmission delay between the second edge node and the seventh driving device can be denoted as Td3, the transmission delay between the seventh driving device and the eighth driving device can be denoted as Td4, and the transmission delay between the second edge node and the ninth driving device can be denoted as Td5. The transmission delays can all be regarded as the second transmission delay.
[0104] In a specific implementation, after the edge node completes the clock synchronization with the driving device, the second transmission delay corresponding to each driving device can be obtained, and all the second transmission delays can be reported to the center node.
[0105] Step S60: obtaining a logical topology of the wireless communication system, and determining the correction value of the driving device according to the logical topology and the second transmission delay.
[0106] It can be understood that the logical topology can be a connection relationship and a data transmission path between devices in the wireless communication system, and can be pre-stored in the control device. The center node can obtain the logical topology of the wireless communication system from the control device, number the driving devices in a logical order from 0 using an integer, denoted as i, i∈{0, 1, 2...N}, and then combine the second transmission delay of each driving device to obtain the correction value of each driving device.
[0107] The correction value can be a parameter for correcting the measurement packet receiving time and the feedback packet sending time of the driving device. If the measurement packet receiving time of the driving device numbered as Driver n is denoted as T2, and the feedback packet sending time is denoted as T3, the correction value for T2 can be denoted as d2, and the correction value for T3 can be denoted as d3. Then, for the measurement packet receiving time T2 of the driving device numbered as Driver n, the correction value d2 can be calculated as d2=Td0, and for the feedback packet sending time T3 of the driving device numbered as Driver n, the correction value d3 can be calculated as d3=2*(Td1+Td2+Td3+Td4+Td5). For the measurement packet receiving time T2 of the driving device numbered as Driver n, the correction value d2 can be calculated as d2=Td0, and for the feedback packet sending time T3 of the driving device numbered as Driver n, the correction value d3 can be calculated as d3=2*(Td1+Td2+Td3+Td4+Td5).
[0108] If FIG. 5 is taken as an example, the logical topology can be the order of the fourth driving device to the ninth driving device. After obtaining the logical topology, the center node can obtain the correction value of the driving device according to the logical topology and the second transmission delay of the corresponding driving device. If the fourth driving device in FIG. 5 is taken as an example, the measurement packet receiving time of the fourth driving device is denoted as T2, and the feedback packet sending time is denoted as T3. Then, for T2, d2=Td0, and for T3, d3=2*(Td1+Td2+Td3+Td4+Td5). Similarly, the correction values of the remaining driving devices can also be calculated in the above manner, and this embodiment will not be described in detail.
[0109] Step S70: transmitting the second measurement message sent by the control device to each driving device through the edge node, so that the driving device generates a second feedback message.
[0110] It should be understood that the above-mentioned second measurement message can be a message for correcting the measurement message receiving time and the feedback message sending time of the driving device. After obtaining the correction value of each driving device, the control device can issue the above-mentioned second measurement message to the center node, and the center node can transmit the second measurement message to each driving device through the edge node in turn. At this time, the driving device can also generate a feedback message (i.e. the above-mentioned second feedback message) and transmit it to the center node through the edge node.
[0111] Step S80: correcting the second measurement message receiving time and the second feedback message sending time generated by the driving device by using the correction value, and feeding back the correction result to the control device.
[0112] When the driving device receives the second measurement message, the current time when the driving device receives the second measurement message can be taken as the above-mentioned second measurement message receiving time. When the driving device feeds back the second feedback message, the current time when the driving device feeds back the second feedback message can be taken as the above-mentioned second feedback message sending time.
[0113] The center node can obtain the second measurement message receiving time and the second feedback message sending time of each driving device, and correct the second measurement message receiving time and the second feedback message sending time based on the corresponding correction value.
[0114] Further, in order to realize the correction, the above-mentioned step S60 comprises: determining the current receiving time when receiving the second measurement message sent by the control device; transmitting the second measurement message to the driving device through the edge node, so that the driving device generates a second feedback message;
[0115] The above-mentioned step S70 comprises: correcting the second measurement message receiving time and the second feedback message sending time generated by the driving device by using the correction value and the current receiving time.
[0116] In a specific implementation, when the central node receives the second measurement packet issued by the control device, the central node can take the time when the second measurement packet is received as the current time, for the convenience of subsequent description, the current time is recorded as T, and the second measurement packet is transmitted to each drive device through the edge node, so that the drive device generates a second feedback packet, and the second measurement packet receiving time and the second feedback packet sending time corresponding to each drive device are obtained, and the corresponding correction value is corrected. Taking the fourth drive device in FIG. 5 as an example, if the corrected second measurement packet receiving time of the fourth drive device is recorded as Tf2, and the corrected second feedback packet sending time is recorded as Tf3, then Tf2=T+d2, Tf3=T+d3, that is, Tf2=T+Td0, Tf3=T+2*(Td1+Td2+Td3+Td4+Td5).
[0117] After the central node obtains the corrected second measurement packet receiving time and the corrected second feedback packet sending time, the corrected second measurement packet receiving time can be fed back to the control device as the second measurement packet receiving time of the drive device, and the corrected second feedback packet sending time can be fed back to the control device as the second feedback packet sending time of the drive device. Furthermore, the control device can still realize real-time communication in the wired and wireless fusion EtherCat network.
[0118] Referring to FIG. 7, FIG. 7 is a flowchart of a third embodiment of the clock synchronization method proposed in the application.
[0119] As shown in FIG. 7, the embodiment also proposes a clock synchronization method, which is applied to an edge node in a wireless communication system, and the method comprises:
[0120] Step S30: sending a third measurement packet to be transmitted to a drive device in the wireless communication system, and determining a current sending time of the third measurement packet based on a synchronized edge node clock.
[0121] It should be noted that the wireless communication system can be a system composed of the wired and wireless fusion EtherCat network, and the edge node can be the TS in FIG. 2 and FIG. 3.
[0122] The synchronized edge node clock is obtained by wireless time service of an initial edge node clock through a synchronized central node clock of a central node in the wireless communication system, and the synchronized central node clock is obtained by clock synchronization of an initial central node clock of the central node based on a control device in the wireless communication system.
[0123] In the embodiment, the clock in the initial edge node before clock synchronization can be regarded as the initial edge node clock, and the clock in the edge node after synchronization can be regarded as the synchronized edge node clock. The clock in the center node after synchronization can be regarded as the synchronized center node clock.
[0124] It can be understood that after the edge node completes clock synchronization, the edge node can take the synchronized edge node clock as the master clock to synchronize the clock of the connected drive device.
[0125] The third measurement packet can be a packet for synchronizing the clock between the edge node and the drive device. In a specific implementation, the edge node can assemble the third measurement packet for measurement by itself, and send the third measurement packet to the connected drive device. The edge node can take the time of sending the third measurement packet as the current sending time based on the synchronized edge node clock. Taking the second edge node in FIG. 5 as an example, the second edge node can transmit the generated third measurement packet to the sixth drive device, the seventh drive device, and the ninth drive device through three ports respectively. The seventh drive device can send the third measurement packet to the eighth drive device again, and take the time of sending the third measurement packet as the current sending time, which is recorded as T1.
[0126] Step S40: synchronizing the clock of the drive device based on the current sending time.
[0127] After the drive device receives the third measurement packet, the drive device can also be synchronized according to the EtherCat synchronization method. Specifically, after the step of sending the generated third measurement packet to the drive device in the wireless communication system, the method further includes:
[0128] Step S31: receiving a third feedback packet fed back by the drive device based on the third measurement packet, and receiving a third measurement packet receiving time and a third feedback packet sending time generated by the drive device.
[0129] It should be understood that the driving device can also feedback the third feedback message after receiving the third measurement message. Taking the seventh driving device and the eighth driving device as an example, when the second edge node sends the third measurement message at the time T1, if the third measurement message receiving time of the seventh driving device receiving the third measurement message is recorded as T2(6), the third measurement message receiving time of the eighth driving device receiving the third measurement message is recorded as T2(7), the eighth driving device can generate the third feedback message and feedback to the second edge node through the seventh driving device, the third feedback message sending time of the eighth driving device feeding back the third feedback message is recorded as T3(7), the third feedback message sending time of the seventh driving device feeding back the third feedback message is recorded as T3(6), and the time of the second edge node receiving the third feedback message is recorded as T4.
[0130] Correspondingly, the above step S40 comprises:
[0131] Step S41: clock synchronization of the driving device based on the current sending time, the third measurement message receiving time and the third feedback message sending time.
[0132] After the second edge node receives the third feedback message, the current sending time T1 and the time T4 of receiving the third feedback message can be obtained from the storage of the second edge node, and the corresponding T2(6), T2(7), T3(6) and T3(7) can be obtained from the seventh driving device and the eighth driving device, respectively, and the clock synchronization of the driving device based on T1, T4, T2(6), T2(7), T3(6) and T3(7).
[0133] Further, in order to realize the clock synchronization of the driving device, the above step S41 comprises: determining a second transmission time delay based on the current sending time, the third measurement message receiving time and the third feedback message sending time; and clock synchronization of the driving device based on the second transmission time delay.
[0134] The second transmission delay can be a transmission delay between the driving device and the connected edge node or between the driving device and the connected driving device. Taking the seventh driving device and the eighth driving device as an example, when clock synchronization is performed, if a transmission delay between the seventh driving device and the second edge node is denoted as Tdelay(6), then Tdelay(6) = [(T4-T1)-(T3(6)-T2(6)] / 2, a clock offset between the seventh driving device and the second edge node is denoted as Toffset(6), then Toffset(6) = T2(6)-T1-Tdelay(6), and the calculation result is sent to the seventh driving device, if a transmission delay between the eighth driving device and the second edge node is denoted as Tdelay(7), then Tdelay(7) = [(T4-T1)-(T3(7)-T2(7)] / 2, a clock offset between the eighth driving device and the second edge node is denoted as Toffset(7), then Toffset(7) = T2(6)-T1-Tdelay(7), and the calculation result is sent to the eighth driving device.
[0135] After obtaining the transmission delays between the driving devices and the edge node, the edge node can obtain the transmission delay of each segment according to the transmission delays as the second transmission delay. For example, for the second transmission delay of the seventh driving device, if denoted as Td3, then Td3 = Tdelay(6), and for the second transmission delay of the eighth driving device, if denoted as Td4, then Td4 = Tdelay(7)-Tdelay(6). The edge node can report the second transmission delays to the center node, and the edge node can perform clock synchronization based on the second transmission delays. Specifically, the step of performing clock synchronization on the driving devices based on the second transmission delays includes:
[0136] generating a clock message based on the synchronized edge node clock, and transmitting the clock message to the driving devices, so that the driving devices perform clock synchronization according to the clock message and the second transmission delays.
[0137] It should be noted that the clock message can carry the synchronized edge node clock in the edge node. Taking the seventh driving device and the eighth driving device as an example, when the transmission delays of the driving devices are determined, the second edge node generates a clock message, such as an Army Wireless Message (ARWM) or a Front End Network Message (FRMW), taking the synchronized edge node clock of the second edge node as a reference clock, and sends the clock message to the seventh driving device and the eighth driving device.
[0138] The seventh driving device and the eighth driving device can obtain the reference clock in the clock message after receiving the clock message, combine the second transmission delay determined in advance, and further obtain the current clock corresponding to the driving device, thereby completing the clock synchronization.
[0139] The embodiment can first synchronize the initial center node clock of the center node based on the control device in the wireless communication system, obtain the synchronized center node clock, and then synchronize the initial edge node clock of the edge node in the wireless communication system based on the synchronized center node clock, so that the edge node obtains the synchronized edge node clock. Finally, the edge node synchronizes the driving device in the wireless communication system based on the synchronized edge node clock, thereby completing the clock synchronization of the entire wireless communication system. Compared with the existing clock protocol transparent transmission mechanism for clock synchronization, the embodiment can use a distributed clock synchronization manner to sequentially synchronize the center node, the edge node, and the driving device, thereby reducing the influence of the uncertainty of the link in the wireless network on the synchronization result and improving the clock synchronization accuracy.
[0140] In addition, to achieve the above-mentioned purpose, the embodiment further provides a wireless communication system. Referring to FIG. 8, FIG. 8 is a structural block diagram of a first embodiment of the wireless communication system provided by the embodiment of the application. As shown in FIG. 8, the wireless communication system comprises a center node and an edge node.
[0141] The center node is configured to synchronize the initial center node clock based on the control device in the wireless communication system, and obtain a synchronized center node clock.
[0142] The center node is further configured to synchronize the initial edge node clock of the edge node based on the synchronized center node clock, so that the edge node obtains a synchronized edge node clock.
[0143] The edge node is configured to send a third measurement message to be transmitted to a driving device in the wireless communication system, and determine a current sending time of the third measurement message based on the synchronized edge node clock.
[0144] The edge node is further configured to synchronize the driving device based on the current sending time.
[0145] It should be noted that the number of the control device, the center node, the edge node, and the driving device is not limited in the embodiment, and the control device is connected with the center node and the edge node, and the edge node is connected with the driving device. Meanwhile, the control device and the center node can also be provided with the driving device, for example, in the form of FIG. 3 or FIG. 5.
[0146] The embodiment can first synchronize the initial central node clock of the center node based on the initial central node clock of the control device in the wireless communication system, obtain the synchronized central node clock, and then synchronize the initial edge node clock of the edge node in the wireless communication system through the synchronized central node clock, so that the edge node obtains the synchronized edge node clock. Finally, the driving device in the wireless communication system is clock-synchronized by the edge node according to the synchronized edge node clock, so that the clock synchronization of the entire wireless communication system is completed. Compared with the existing clock synchronization mechanism using clock protocol transparent transmission, the embodiment can use a distributed clock synchronization manner to sequentially synchronize the clocks of the center node, the edge node, and the driving device, thereby reducing the influence of the uncertainty of the link in the wireless network on the synchronization result and improving the clock synchronization precision.
[0147] As an implementation manner, the center node is further configured to receive a first measurement packet sent by the control device in the wireless communication system, and transmit a first feedback packet generated according to the first measurement packet to the control device; determine a first measurement packet receiving time and a first feedback packet sending time based on the first measurement packet and the first feedback packet; and transmit the first measurement packet receiving time and the first feedback packet sending time to the control device, so that the control device clock-synchronizes the initial central node clock according to the first measurement packet receiving time and the first feedback packet sending time.
[0148] As an implementation manner, the center node is further configured to transmit the first measurement packet receiving time and the first feedback packet sending time to the control device, so that the control device determines a first transmission time delay according to the first measurement packet receiving time and the first feedback packet sending time; and clock-synchronize the initial central node clock based on the first transmission time delay.
[0149] As an implementation manner, the center node is further configured to receive a second transmission time delay sent by the edge node, the second transmission time delay being obtained by clock-synchronizing the driving device by the edge node; acquire a logical topology of the wireless communication system, and determine a correction value of the driving device according to the logical topology and the second transmission time delay; transmit a second measurement packet sent by the control device to each driving device through the edge node, so that the driving device generates a second feedback packet; correct the second measurement packet receiving time and the second feedback packet sending time generated by the driving device through the correction value, and feed back the correction result to the control device.
[0150] As an implementation form, the central node is further configured to determine a current receiving time when the second measurement message sent by the control device is received; transmit the second measurement message to the driving device through the edge node, so that the driving device generates a second feedback message; and correct the second measurement message receiving time and the second feedback message sending time generated by the driving device based on the correction value and the current receiving time.
[0151] As an implementation form, the edge node is further configured to receive a third feedback message fed back by the driving device based on the third measurement message, and receive a third measurement message receiving time and a third feedback message sending time generated by the driving device; and synchronize the clock of the driving device based on the current sending time, the third measurement message receiving time and the third feedback message sending time.
[0152] As an implementation form, the edge node is further configured to determine a second transmission time delay based on the current sending time, the third measurement message receiving time and the third feedback message sending time; and synchronize the clock of the driving device based on the second transmission time delay.
[0153] As an implementation form, the edge node is further configured to generate a clock message based on the synchronized edge node clock, and transmit the clock message to the driving device, so that the driving device synchronizes the clock based on the clock message and the second transmission time delay.
[0154] The specific structure of the wireless communication system is referred to the above method embodiments. Since the wireless communication system adopts all the technical solutions of the above embodiments, it has all the beneficial effects brought by the technical solutions of the above embodiments, which will not be repeated here.
[0155] Other embodiments or specific implementations of the wireless communication system described in the present application can refer to the clock synchronization method embodiments, which will not be repeated here.
[0156] The above is only an embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation based on the content of the present application specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method of clock synchronization, wherein, The method is applied to a center node in a wireless communication system, and the method comprises: obtaining a synchronized center node clock based on clock synchronization of an initial center node clock by a control device in the wireless communication system; wirelessly timing an initial edge node clock of an edge node in the wireless communication system by the synchronized center node clock, so that the edge node performs clock synchronization of a driving device in the wireless communication system according to a synchronized edge node clock obtained.
2. The clock synchronization method of claim 1, wherein, The step of obtaining the synchronized center node clock based on clock synchronization of the initial center node clock by the control device in the wireless communication system comprises: receiving a first measurement message sent by the control device in the wireless communication system, and transmitting a first feedback message generated according to the first measurement message to the control device; determining a first measurement message receiving time and a first feedback message sending time based on the first measurement message and the first feedback message; transmitting the first measurement message receiving time and the first feedback message sending time to the control device, so that the control device performs clock synchronization of the initial center node clock according to the first measurement message receiving time and the first feedback message sending time.
3. The clock synchronization method of claim 2, wherein, The step of transmitting the first measurement message receiving time and the first feedback message sending time to the control device, so that the control device performs clock synchronization of the initial center node clock according to the first measurement message receiving time and the first feedback message sending time, comprises: transmitting the first measurement message receiving time and the first feedback message sending time to the control device, so that the control device determines a first transmission time delay according to the first measurement message receiving time and the first feedback message sending time; performing clock synchronization of the initial center node clock based on the first transmission time delay.
4. The clock synchronization method of any one of claims 1 to 3, wherein, After the step of wirelessly timing the initial edge node clock of the edge node in the wireless communication system by the synchronized center node clock, the method further comprises: receiving a second transmission time delay sent by the edge node, the second transmission time delay being obtained by clock synchronization of the driving device by the edge node; obtaining a logical topology of the wireless communication system, and determining a correction value of the driving device according to the logical topology and the second transmission time delay; transmitting a second measurement message sent by the control device to each driving device through the edge node, so that the driving device generates a second feedback message; correcting a second measurement message receiving time and a second feedback message sending time generated by the driving device according to the correction value, and feeding back the correction result to the control device.
5. The clock synchronization method of claim 4, wherein, The step of transmitting the second measurement message sent by the control device to each driving device through the edge node, so that the driving device generates a second feedback message, comprises: determining a current receiving time when the second measurement message sent by the control device is received; transmitting the second measurement message to the driving device through the edge node, so that the driving device generates a second feedback message; The step of correcting the second measurement message receiving time and the second feedback message sending time generated by the driving device by the correction value comprises: The second message receiving time and the second message feedback time generated by the driving device are corrected by the correction value and the current receiving time.
6. A clock synchronization method, wherein, The clock synchronization method is applied to an edge node in a wireless communication system, and the method comprises: sending a third measurement message to be transmitted to a driving device in the wireless communication system, and determining a current sending time of the third measurement message based on a synchronous edge node clock; wherein the synchronous edge node clock is obtained by wireless timing of an initial edge node clock of the edge node by a synchronous center node clock of a center node in the wireless communication system, and the synchronous center node clock is obtained by clock synchronization of an initial center node clock of the center node by a control device in the wireless communication system; synchronizing the clock of the driving device based on the current sending time.
7. The method of claim 6, wherein, After the step of sending the generated third measurement message to the driving device in the wireless communication system, the method further comprises: receiving a third feedback message fed back by the driving device based on the third measurement message, and receiving a third measurement message receiving time and a third feedback message sending time generated by the driving device; The step of synchronizing the clock of the driving device based on the current sending time comprises: synchronizing the clock of the driving device based on the current sending time, the third measurement message receiving time, and the third feedback message sending time.
8. The method of claim 7, wherein, The step of synchronizing the clock of the driving device based on the current sending time, the third measurement message receiving time, and the third feedback message sending time comprises: determining a second transmission time delay based on the current sending time, the third measurement message receiving time, and the third feedback message sending time; synchronizing the clock of the driving device based on the second transmission time delay.
9. The method of claim 8, wherein, The step of synchronizing the clock of the driving device based on the second transmission time delay comprises: generating a clock message based on the synchronous edge node clock, and transmitting the clock message to the driving device, so that the driving device synchronizes the clock according to the clock message and the second transmission time delay.
10. A wireless communication system, wherein, The wireless communication system comprises a center node and an edge node. The center node is configured to synchronize the clock of an initial center node clock by a control device in the wireless communication system to obtain a synchronous center node clock. The center node is further configured to wirelessly time the initial edge node clock of the edge node by the synchronous center node clock, so that the edge node obtains a synchronous edge node clock. The edge node is configured to send a third measurement message to be transmitted to a driving device in the wireless communication system, and determine a current sending time of the third measurement message based on the synchronous edge node clock. The edge node is further configured to synchronize the clock of the driving device based on the current sending time.
Citation Information
Patent Citations
Time synchronization method of master-slave structure multi-node network
CN105680975A
Clock synchronization method and system
CN110120846A
Industrial wireless and TSN fusion-oriented cross-network time synchronization method
CN114050884A
Clock synchronization method and wireless communication system
CN118524510A
Method and transceiver node for synchronizing in a wireless communication network
WO2022081054A1