Communication device, communication method, communication program, communication system
By measuring and accounting for delay times in communication devices, the solution ensures consistent timing signals across a network, addressing discrepancies caused by varying message reception times.
Patent Information
- Application Number
- JP2025517698
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-10-10
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2043-10-10
AI Technical Summary
In communication networks using the IEEE802.1AS-2020 standard, timing discrepancies occur between communication devices due to varying message reception times caused by differences in the number of hops from the Grand Master, leading to transient inconsistencies in timing signals.
A communication device measures reception timings for messages from two ports, calculates a third delay time based on transmission and reception times, and reflects the result of synchronization in a timing signal after this delay to ensure consistent timing across devices.
This approach eliminates transient inconsistencies in timing signals by synchronizing devices based on a round-trip time, ensuring synchronized operations across the network.
Smart Images

Figure 0007706679000001 
Figure 0007706679000002 
Figure 0007706679000003
Abstract
Description
Technical Field
[0001] The present disclosure relates to a communication device, a communication method, a communication program, and a communication system.
Background Art
[0002] As a communication protocol for synchronizing the time between communication devices via a network, there is a communication protocol compliant with the IEEE802.1AS-2020 standard (Non-Patent Document 1). In the above protocol, among a plurality of communication devices constituting a network, a communication device with high time accuracy is selected as a Grand Master (hereinafter referred to as GM). Each communication device synchronizes based on the time of the GM. Specifically, each communication device synchronizes according to a message distributed from the GM. In addition, each communication device outputs a timing signal to a peripheral device according to the time it holds. The peripheral device realizes some desired synchronized operation based on the timing signal.
Prior Art Documents
Non-Patent Documents
[0003]
Non-Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] Due to differences in the number of hops between the GM and each communication device, etc., the timing at which the above message is received by each communication device varies depending on the communication device. In addition, when each communication device receives the message and synchronizes, it immediately reflects the result of the synchronization in the timing signal. Therefore, there has been a problem that a discrepancy occurs in the timing signal between communication devices from the time when a certain communication device first receives the message until the message reaches all communication devices.
[0005] The present disclosure has been made to solve the above problems, and aims to eliminate transient inconsistencies in timing signals between communication devices.
Means for Solving the Problems
[0006] A communication device according to the present disclosure receives a first message from a first port, measures a first reception timing which is the timing of reception of the first message, receives a second message from a second port, and measures a second reception timing which is the timing of reception of the second message; a synchronization unit that synchronizes the current time based on the transmission source devices of the first message and the second message, calculates a third delay time by adding a first delay time which is a delay time from the transmission timing, at which the first message and the second message are transmitted by the transmission source device, to the first reception timing, and a second delay time which is a delay time from the transmission timing to the second reception timing, and reflects the result of synchronization of the current time in a timing signal that the device itself outputs at a timing after the elapse of the third delay time from the transmission timing.
Effects of the Invention
[0007] The communication device according to the present disclosure reflects the result of synchronization of the current time in a timing signal that the device itself outputs at a timing after the elapse of a round-trip time (third delay time), which is the time required for the message to travel around the ring network after the message is transmitted by the master communication device. Thereby, it is possible to eliminate inconsistencies in timing signals between communication devices.
Brief Description of the Drawings
[0008]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Mode for Carrying Out the Invention
[0009] Embodiment 1. Hereinafter, Embodiment 1 will be described in detail with reference to the drawings. In Embodiment 1, as an example, a communication protocol compliant with the IEEE802.1AS standard is used, but the scope of application of the present disclosure is not limited thereto, and it can be applied to communication devices that configure a ring network and perform synchronization.
[0010] FIG. 1 is a configuration diagram of a communication system according to Embodiment 1. The communication system 100 includes nodes 110-0, 110-1, 110-2, ···, 110-n and a communication cable 120. Hereinafter, when nodes 110-0, 110-1, 110-2, ···, 110-n are not particularly distinguished, they are described as node 110. The node 110 is, for example, a Boundary Clock compliant with the IEEE802.1AS standard.
[0011] Note that the node 110 corresponds to the communication device in the present disclosure.
[0012] The nodes 110 are communicably connected to each other via the communication cable 120 to form a ring network. The connection order is, in clockwise order, nodes 110-0, 110-1, 110-2, ···, 110-n. Here, adjacent nodes 110 are referred to as adjacent nodes in the present disclosure. For example, the adjacent nodes of node 110-0 are nodes 110-1 and 110-n. Thus, there are two adjacent nodes for each node 110.
[0013] Unlike the other nodes 110, the node 110-0 includes a GPS receiver 130 (GPS is an abbreviation for Global Positioning System). The node 110-0 can obtain a more accurate time than the other nodes 110 by acquiring the time from the GPS receiver 130.
[0014] FIG. 2 is a functional configuration diagram of a node according to Embodiment 1. The node 110 includes ports 140-1, 140-2, a transmission / reception unit 150, and a control unit 160. When ports 140-1 and 140-2 are not particularly distinguished, they are described as port 140. Note that the node 110-0 includes a GPS receiver 130 not shown in FIG. 2.
[0015] Port 140 is an interface for connecting to an adjacent node via communication cable 120. One port 140 is connected to one adjacent node, and the other port 140 is connected to the other adjacent node. Port 140 passes the message received from the adjacent node to transceiver 150, and transmits the message passed from transceiver 150 to the adjacent node.
[0016] Transceiver 150 performs processing equivalent to layer 2 of the OSI reference model. Transceiver 150 includes a receiver 151 and a transmitter 152.
[0017] Receiver 151 receives the message received from the adjacent node from port 140, and passes to control unit 160 the information extracted from the message (for example, the information necessary for time synchronization) and the reception timestamp information indicating the time when the message was received at port 140 or receiver 151.
[0018] Transmitter 152 generates a message for the adjacent node according to an instruction from control unit 160, and passes it to port 140. Also, transmitter 152 passes to control unit 160 the transmission timestamp information indicating the time when the message was transmitted from port 140 or transmitter 152.
[0019] Control unit 160 includes a route construction unit 161, a delay measurement unit 162, and a synchronization unit 163.
[0020] Route construction unit 161 determines the time synchronization route within communication system 100 while cooperating with other nodes 110. Route construction unit 161 sets which messages each port 140 transmits and receives according to the determination result of the time synchronization route. The time synchronization route is constructed in a hierarchical structure with the communication device having the highest accuracy time within communication system 100 as the GM (Grand Master), with the GM at the top. The method of constructing the time synchronization route will be described later.
[0021] Note that the GM corresponds to the master communication device in the present disclosure.
[0022] The delay measurement unit 162 measures the delay time of messages between an adjacent node and its own node. When synchronizing time, high-precision synchronization is achieved by taking the above delay into consideration.
[0023] The synchronization unit 163 holds the current time and advances the current time according to the clock within its own node. Note that since the synchronization unit of node 110-0 can obtain a highly accurate time from the GPS receiver 130, it updates the current time according to the time obtained from the GPS receiver 130. Also, when information for synchronization is passed from the transmission / reception unit 150, the synchronization unit 163 synchronizes the current time it holds with the GM based on that information. The synchronization unit 163 outputs a timing signal based on the current time it holds. The timing signal is typically a pulse signal with a fixed period. The output timing signal is input to, for example, a peripheral device (not shown) of node 110. The peripheral device realizes some desired synchronized operation based on the input timing signal. Note that node 110 and its peripheral device may be configured as an integrated device.
[0024] FIG. 3 is a hardware configuration diagram of the node according to Embodiment 1. Node 110 includes a processor 170, a memory 180, a communication IF 190 (IF is short for Interface), and a bus 200. The processor 170, the memory 180, and the communication IF 190 are communicably connected via the bus 200.
[0025] The processor 170 is, for example, a CPU (Central Processing Unit), a DSP (Digital Signal Processor), or a GPU (Graphical Processing Unit).
[0026] The memory 180 is, for example, SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), or ROM (Read-Only Memory). When the memory capacity is insufficient with only the memory 180, the node 110 may be provided with an auxiliary storage device (not shown) as necessary. The auxiliary storage device is, for example, an HDD (Hard Disk Drive) or an SSD (Solid State Drive).
[0027] The communication IF 190 is, for example, a device compliant with the IEEE802.3 standard.
[0028] The port 140 is realized by the communication IF 190. The control unit 160 and the transceiver unit 150 are realized by software, for example. The software is described as a program and stored in the memory 180. When the control unit 160 and the transceiver unit 150 are realized by software, the control unit 160 and the transceiver unit 150 are realized by the processor 170 reading out and executing a program for operating as each of the control unit 160 and the transceiver unit 150 from the memory 180. That is, the node 110 includes the memory 180 for storing a program in which steps for implementing the operations of the control unit 160 and the transceiver unit 150 are consequently executed when the functions thereof are executed by the processor 170. Also, it can be said that these programs are for causing a computer to execute various processes performed by the control unit 160 and the transceiver unit 150.
[0029] Alternatively, the control unit 160 and the transceiver unit 150 may be realized by hardware. The hardware is, for example, an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array).
[0030] Alternatively, part of the control unit 160 and the transceiver unit 150 may be realized by software and the rest by hardware.
[0031] Next, the operation of the communication system 100 will be described.
[0032] FIG. 4 is a flowchart showing the operation of the communication system according to Embodiment 1. The node 110 exchanges its own priority information (information on how accurate the time is) and hop count information from the GM with adjacent nodes by exchanging Announce messages, and constructs a time synchronization path (step S110). Specifically, the path construction unit 161 delivers information necessary for generating the Announce message to the transmission unit 152. The transmission unit 152 generates an Announce message based on the information and delivers it to each port 140. Each port 140 transmits the Announce message to an adjacent node. Each port 140 also receives an Announce message from an adjacent node and delivers the Announce message to the reception unit 151. The reception unit 151 extracts necessary information from the Announce message and delivers it to the path construction unit 161. The path construction unit 161 determines a time synchronization path based on the delivered information.
[0033] FIG. 5 is a configuration diagram showing the construction result of the time synchronization path according to Embodiment 1. Since node 110-0 has the highest accuracy time among nodes 110, it becomes the GM. Starting from node 110-0 that has become the GM, time information (Sync message and Follow_Up message described later) is transmitted to each node 110. The path at that time (that is, the time synchronization path) consists of two directions, clockwise and counterclockwise. In the clockwise direction, a message containing time information is transmitted from node 110-0, transferred in the order of nodes 110-1, 110-2, ···, 110-n, and finally discarded when it returns to node 110-0. In the counterclockwise direction, a message containing time information is transmitted from node 110-0, transferred in the order of nodes 110-n, ···, 110-2, 110-1, and finally discarded when it returns to node 110-0. As the synchronization order between nodes, it is conceivable to synchronize in two directions (orders), clockwise and counterclockwise, but there is no problem with either order. Alternatively, some nodes 110 may be synchronized in the clockwise order and the remaining nodes 110 may be synchronized in the counterclockwise order without any problem.
[0034] Return to the description of FIG. 4. Node 110 measures the delay time required for message propagation between adjacent nodes (step S120). Node 110 executes the processes of step S110 and step S120 in parallel.
[0035] FIG. 6 is a sequence diagram showing the communication for measuring the delay time according to Embodiment 1. That is, FIG. 6 shows the details of the operation of step S120 in FIG. 4. In FIG. 6, the communication for measuring the delay time of the message between node 110-0 which is the GM and node 110-1 is shown as an example. In actuality, communication for measuring the delay time is similarly performed between any other nodes 110.
[0036] Node 110-1 transmits a Pdelay_Req message to node 110-0 (step S121).
[0037] The details of the operation of node 110-1 in step S121 will be described. The delay measurement unit 162 of node 110-1 delivers the information necessary for the generation of the Pdelay_Req message to the transmission unit 152 of node 110-1. The transmission unit 152 of node 110-1 generates a Pdelay_Req message based on the delivered information and delivers the Pdelay_Req message to port 140 connected to node 110-0. The port 140 to which the Pdelay_Req message is delivered transmits the Pdelay_Req message to node 110-0. Here, the transmission unit 152 of node 110-1 delivers transmission timestamp information indicating the time t1 when the Pdelay_Req message is transmitted from port 140 or the transmission unit 152 of node 110-1 to the delay measurement unit 162 of node 110-1. The transmission unit 152 of node 110-1 may appropriately obtain the current time from the synchronization unit 163 of node 110-1 in order to measure t1.
[0038] The details of the operation of node 110-0 in step S121 will be described. The port 140 of node 110-0 that receives the Pdelay_Req message delivers the Pdelay_Req message to the reception unit 151 of node 110-0. The reception unit 151 of node 110-0 delivers reception timestamp information indicating the time t2 when the Pdelay_Req message is received by port 140 or the reception unit 151 of node 110-0 to the delay measurement unit 162 of node 110-0. The reception unit 151 of node 110-0 may appropriately obtain the current time from the synchronization unit 163 of node 110-0 in order to measure t2. Also, the reception unit 151 of node 110-0 extracts the necessary information from the Pdelay_Req and delivers it to the delay measurement unit 162 of node 110-0.
[0039] When node 110-0 receives the Pdelay_Req message, it transmits a Pdelay_Resp message to node 110-1 (step S122).
[0040] Describe the details of the operation of node 110-0 in step S122. The delay measurement unit 162 of node 110-0 delivers the information necessary for generating the Pdelay_Resp message to the transmission unit 152 of node 110-0. The necessary information includes the reception time t2 of the Pdelay_Req message. The transmission unit 152 of node 110-0 generates a Pdelay_Resp message based on the delivered information and delivers the Pdelay_Resp message to port 140 connected to node 110-1. Here, the Pdelay_Resp message has the reception time t2 of the Pdelay_Req message as information. The port 140 to which the Pdelay_Resp message is delivered transmits the Pdelay_Resp message to node 110-1. Here, the transmission unit 152 of node 110-0 delivers the transmission timestamp information indicating the time t3 when the Pdelay_Resp message is transmitted from port 140 or the transmission unit 152 of node 110-0 to the delay measurement unit 162 of node 110-0. The transmission unit 152 of node 110-0 may appropriately obtain the current time from the synchronization unit 163 of node 110-0 to measure t3.
[0041] Describe the details of the operation of node 110-1 in step S122. The port 140 of node 110-1 that receives the Pdelay_Resp message delivers the Pdelay_Resp message to the reception unit 151 of node 110-1. The reception unit 151 of node 110-1 delivers the reception timestamp information indicating the time t4 when the Pdelay_Resp message is received by port 140 or the reception unit 151 of node 110-1 to the delay measurement unit 162 of node 110-1. The reception unit 151 of node 110-1 may appropriately obtain the current time from the synchronization unit 163 of node 110-1 to measure t4. Also, the reception unit 151 of node 110-1 extracts the necessary information from the Pdelay_Resp message and delivers it to the delay measurement unit 162 of node 110-1. The necessary information includes the reception time t2 of the Pdelay_Req message.
[0042] When Node 110-0 sends a Pdelay_Resp message, it sends a Pdelay_Resp_Follow_Up message to Node 110-1 (Step S123).
[0043] The details of the operation of Node 110-0 in Step S123 will be described. The delay measurement unit 162 of Node 110-0 delivers the information necessary for generating the Pdelay_Resp_Follow_Up message to the transmission unit 152 of Node 110-0. The necessary information includes the transmission time t3 of the Pdelay_Resp message. The transmission unit 152 of Node 110-0 generates a Pdelay_Resp_Follow_Up message based on the delivered information and delivers the Pdelay_Resp_Follow_Up message to the port 140 connected to Node 110-1. Here, the Pdelay_Resp_Follow_Up message holds the transmission time t3 of the Pdelay_Resp message as information. The port 140 that has been delivered the Pdelay_Resp_Follow_Up message sends the Pdelay_Resp_Follow_Up message to Node 110-1.
[0044] The details of the operation of Node 110-1 in Step S123 will be described. The port 140 of Node 110-1 that has received the Pdelay_Resp_Follow_Up message delivers the Pdelay_Resp_Follow_Up message to the reception unit 151 of Node 110-1. Also, the reception unit 151 of Node 110-1 extracts the necessary information from the Pdelay_Resp_Follow_Up message and delivers it to the delay measurement unit 162 of Node 110-1. The necessary information includes the transmission time t3 of the Pdelay_Resp message. The delay measurement unit 162 of Node 110-1 calculates the delay time between Node 110-0 and Node 110-1 using the previously obtained t1, t2, t3, and t4 in a predetermined formula. Note that even if there is an error between the current time held by Node 110-0 and the current time held by Node 110-1, this delay time can be accurately calculated by mathematically removing the error.
[0045] Nodes 110-0 and 110-1 regularly perform the communication in steps S121 to S123, and node 110-1 regularly updates the calculation result of the delay time. Also, the measurement of the delay time and the communication therefor as described above are not limited to between node 110-0 and node 110-1, but are also carried out between any other pair of nodes 110. Also, for the convenience that only the node 110 that has transmitted Pdelay_Req can calculate the delay time, for example, in the case of between node 110-0 and node 110-1, the communication in the reverse direction is also carried out. That is, the communication in the direction of transmitting Pdelay_Req from node 110-0 to node 110-1 is also carried out. In this way, each node 110 calculates and stores the delay time generated by the transmission and reception of messages between adjacent nodes.
[0046] Returning to the description of FIG. 4. When node 110 has completed the processing of both step S110 and step S120, it synchronizes the time with the GM along the path for time synchronization constructed in step S110 (step S130), and ends the flowchart of FIG. 4.
[0047] FIG. 7 is a sequence diagram showing the communication for time synchronization according to Embodiment 1. That is, FIG. 7 shows the details of the operation in step S130 in FIG. 4. In FIG. 7, the part where transmission for time synchronization is performed from node 110-0, which is the GM, to node 110-1, then from node 110-1 to node 110-2, and then from node 110-2 to node 1103, that is, the first part in the clockwise direction, is shown as an example. Actually, as described with reference to FIG. 5, message transmission for time synchronization is performed in step S130 in two directions, clockwise and counterclockwise.
[0048] Node 110-0 transmits a Sync message to node 110-1 (step S131).
[0049] Describe the details of the operation of node 110-0 in step S131. The synchronization unit 163 of node 110-0 delivers the information necessary for generating the Sync message to the transmission unit 152 of node 110-0. The transmission unit 152 of node 110-0 generates a Sync message based on the delivered information and delivers the Sync message to port 140 connected to node 110-1. Port 140 that has received the Sync message transmits the Sync message to node 110-1. Here, the transmission unit 152 of node 110-0 delivers transmission timestamp information indicating the time t5 when the Sync message was transmitted from port 140 or the transmission unit 152 of node 110-0 to the synchronization unit 163 of node 110-0. The transmission unit 152 of node 110-0 may appropriately obtain the current time from the synchronization unit 163 of node 110-0 to measure t5.
[0050] Describe the details of the operation of node 110-1 in step S131. Port 140 of node 110-1 that has received the Sync message delivers the Sync message to the reception unit 151 of node 110-1. The reception unit 151 of node 110-1 delivers reception timestamp information indicating the time t6 when the Sync message was received by port 140 or the reception unit 151 of node 110-1 to the synchronization unit 163 of node 110-1. The reception unit 151 of node 110-1 may appropriately obtain the current time from the synchronization unit 163 of node 110-1 to measure t6. Also, the reception unit 151 of node 110-1 extracts the necessary information from Sync and delivers it to the synchronization unit 163 of node 110-1.
[0051] After transmitting the Sync message, node 110-0 transmits a Follow_Up message to node 110-1 (step S132).
[0052] Describe the details of the operation of node 110-0 in step S132. The synchronization unit 163 of node 110-0 passes the information necessary for generating the Follow_Up message to the transmission unit 152 of node 110-0. The necessary information includes the transmission time t5 of the Sync message. The transmission unit 152 of node 110-0 generates a Follow_Up message based on the passed information and passes the Follow_Up message to port 140 connected to node 110-1. Here, the Follow_Up message has the transmission time t5 of the Sync message as information. The port 140 to which the Follow_Up message is passed transmits the Follow_Up message to node 110-1.
[0053] Describe the details of the operation of node 110-1 in step S132. The port 140 of node 110-1 that receives the Follow_Up message passes the Follow_Up message to the reception unit 151 of node 110-1. Also, the reception unit 151 of node 110-1 extracts the necessary information from the Follow_Up message and passes it to the synchronization unit 163 of node 110-1. The necessary information includes the transmission time t5 of the Sync message. The synchronization unit 163 of node 110-1 measures the error between the current time held by node 110-0 and the current time held by itself (node 110-1) using t5 and t6 obtained so far and the delay time calculated by the delay measurement unit 162. That is, the time when the delay time has elapsed from time t5 should be t6, and it is measured whether there is an error there. The synchronization unit 163 of node 110-1 executes synchronization by correcting the current time it holds so as to eliminate the measured error.
[0054] When steps S131 to S132 are completed between node 110-0 and node 110-1, next, the transmission of the Sync message (step S131) and the transmission of the Follow_Up message (step S132) are similarly carried out from node 110-1 to node 110-2. However, in step S132, there are slight differences in the information carried by the Follow_Up message. Specifically, the Follow_Up message transmitted from node 110-1 has not only the time t5 when GM (node 110-0) transmitted the Sync message, but also the time difference t7 from time t5 to the time t5' when the immediately preceding Sync message was transmitted. As for the details of the operation, the synchronization unit 163 of node 110-1 instructs the transmission unit 152 to include the information of time t5 included in the received Follow_Up message in the Follow_Up message it transmits as it is. And the synchronization unit 163 of node 110-1 calculates the time difference t7 and instructs the transmission unit 152 to include the calculated t7 in the Follow_Up message it transmits.
[0055] Similarly, the Follow_Up message transmitted from node 110-2 to node 110-3 has not only time t5 but also the time difference t7' from time t5 to the time t5'' when the immediately preceding Sync message was transmitted. In the present disclosure, the cumulative result of the delay times such as t7 and t7' is called the cumulative delay. In a communication protocol compliant with the IEEE802.1AS standard, the cumulative delay is stored in the CorrectionField in the Follow_Up message. In this way, each node 110 transfers the information of the transmission time t5 of the GM as it is, and calculates and transmits the cumulative delay each time it transfers a message to the adjacent node in the subsequent stage. Therefore, the subsequent nodes 110 after node 110-2 also read the time t5 (the transmission time of the Sync message by the GM) and the cumulative delay included in the received Follow_Up message, and by using the delay time between itself and the adjacent node calculated in step S123, can grasp the exact time when it received the Sync message and correct the current time it holds.
[0056] Note that the Follow_Up message transmitted by the nodes 110 after node 110-1 may have the time when the previous Sync message was transmitted instead of having the time t5 (the transmission time of the Sync message by the GM) and the cumulative delay. This is because it is sufficient as information for correcting the current time described above.
[0057] In this way, steps S131 to S132 are sequentially performed step by step in the clockwise direction to the subsequent stage. Finally, nodes 110-1, 110-2, ···, 110-n are synchronized with the GM (node 110-0), and grasp the cumulative delay required for the transfer of the Sync message and the Follow_Up message between the GM (node 110-0) and their own nodes. Note that the same communication is also performed counterclockwise as described in FIG. 5.
[0058] If the result of synchronization in step S132 is simply reflected in the timing signal, the timing signals cannot be made to match between the nodes 110. Therefore, a method for making the timing signals match between the nodes 110 will be shown with reference to FIG. 8.
[0059] FIG. 8 is a flowchart showing the output of the timing signal by the node according to the first embodiment. The synchronization unit 163 stores the received message (step S133) and proceeds to step S134. Note that the message in the description of FIG. 8 refers to the Follow_Up message unless otherwise specified.
[0060] Describe the details of the operation of node 110 in step S133. The receiving unit 151 passes the message identification information included in the message received from either the clockwise or counterclockwise direction to the synchronization unit 163. The message identification information is information for distinguishing the source of the message and for distinguishing messages transmitted at different timings. The synchronization unit 163 stores the passed message identification information. The message identification information is, for example, sourcePortIdentity or sequenceId in a communication protocol compliant with the IEEE802.1AS standard. Usually, a MAC (Media Control Access) address is used for sourcePortIdentity. The sequenceId is a number that is incremented by 1 each time the GM transmits a message and is used to distinguish individual messages. Messages simultaneously transmitted by the GM in both the clockwise and counterclockwise directions have the same message identification information. On the other hand, messages transmitted by the GM at different timings have different message identification information. Also, in step S133, the synchronization unit 163 receives the cumulative delay included in the message from the receiving unit 151. The synchronization unit 163 adds the delay time between the synchronization unit 163 and the adjacent node (this adjacent node is the adjacent node on the transmission side of the message received in step S133) calculated in step S123 to the cumulative delay. Thereby, node 110 calculates the cumulative delay from when the message is transmitted by the GM (node 110-0) until it is received by the own node (in step S133).
[0061] The synchronization unit 163 determines whether the output of the timing signal is invalid (step S134). If it is invalid, it proceeds to step S135; otherwise, it ends the flowchart of FIG. 8. The output of the timing signal being invalid means that the timing signal is not being output. For example, at the initial stage when node 110 joins the network (communication system 100), node 110 has not completed synchronization with the GM and may not be able to output a timing signal with sufficient accuracy, so the output of the timing signal is made invalid. As shown in step S134 of FIG. 8, if node 110 has already enabled the output of the timing signal, it determines that the timing signal has already been output after synchronization and ends the flowchart of FIG. 8.
[0062] The synchronization unit 163 determines whether it has received the same message as that received by the reception unit 151 in step S133 from the opposite direction in the past (step S135). If it has, it proceeds to step S136; otherwise, it ends the flowchart of FIG. 8. Here, the same message refers to a message having the same message identification information as the previously stored message identification information. That is, the message received from one side previously and the message received from the other side this time are messages transmitted clockwise and counterclockwise, respectively, from the same GM at the same timing. The synchronization unit 163 determines whether the message identification information included in the message received this time matches the previously stored message identification information. If they match, it determines that they are the same message.
[0063] The synchronization unit 163 sets a countdown timer (hereinafter referred to as a timer) to expire after the cumulative delay calculated in step S133 has elapsed since the timing when the message was received in step S135 (step S136), and proceeds to step S137. By setting the timer in this way, the synchronization unit 163 can cause the timer to expire at the timing when exactly the time has elapsed since the message was transmitted from the GM until the message has just completed one round of the ring network. This applies to any node 110. The details of this will be described later with reference to FIG. 9.
[0064] When the timer expires (step S137), the synchronization unit 163 proceeds to step S138, or otherwise returns to step S137.
[0065] The synchronization unit 163 starts outputting a timing signal that reflects the result of the current time synchronization (step S138), and ends the flowchart of FIG. 8. That is, the synchronization unit 163 uses the synchronized current time obtained in step S132 as a reference for generating a timing signal, and outputs the timing signal.
[0066] FIG. 9 is a time chart showing the processing timing of the node according to Embodiment 1. In FIG. 9, the horizontal axis represents time, and the timing when the GM (node 110-0) simultaneously transmits the message 210 both clockwise and counterclockwise is taken as the origin of the horizontal axis. Note that the message 210 in the description of FIG. 9 refers to the Follow_Up message unless otherwise specified. Also, the two messages 210 in FIG. 9 include the same message identification information. Here, it is assumed that FIG. 9 shows the processing timing by the node 110-k (k is an arbitrary natural number from 1 to n). The node 110-k receives the message 210 from the clockwise direction and the message 210 from the counterclockwise direction. FIG. 9 shows, as an example, the case where the node 110-k receives the message 210 from the clockwise direction earlier than the message 210 from the counterclockwise direction.
[0067] As shown in FIG. 9, a message 210 is received clockwise at time t8, and a message 210 is received counterclockwise at time t9. Time t8 is the time from when the message 210 is transmitted clockwise by GM (node 110-0) until it is received by node 110-k. Time t8 corresponds to the cumulative delay calculated by the synchronization unit 163 in step S133. Time t9 is the time from when the message 210 is transmitted counterclockwise by GM (node 110-0) until it is received by node 110-k. When node 110-k receives the message 210 from the counterclockwise direction, it determines that it is the same as the previously received message 210 in the clockwise direction, and sets the cumulative delay (t8) in the timer. Therefore, in FIG. 9, the timer expires at the timing of t8 + t9.
[0068] Here, the IEEE802.1AS standard stipulates that the path delay is symmetric. That is, regardless of the direction from which the message 210 is sent and received, if it is the same path, there is no difference in the delay time. According to this regulation, the time t8 + t9 coincides with the time required for the message 210 to make one round in the ring network. In the present disclosure, such a time is called the round-trip time. This holds for any node 110-k. Therefore, all nodes 110 can enable the output of the timing signal at the same timing of t8 + t9.
[0069] Depending on the position in the ring network, node 110 may receive the message 210 from the clockwise direction earlier than the message 210 from the counterclockwise direction. Even in this case, by regarding the time of the previously received message 210 as t8 and the time of the later received message 210 as t9, all nodes 110 can enable the output of the timing signal at the same timing regardless of which direction the message 210 is received first.
[0070] Note that t8 in FIG. 9 corresponds to the first delay time in the present disclosure, t9 in FIG. 9 corresponds to the second delay time in the present disclosure, and t8 + t9 in FIG. 9 corresponds to the third delay time in the present disclosure.
[0071] FIG. 10 is a time chart showing the output of a timing signal by node 110 according to Embodiment 1. In FIG. 10, the output states of the timing signals are shown using node 110-1, node 110-2, and node 110-3 as examples. Here, it is assumed that there are a sufficient number of nodes 110 (that is, n in node 110-n is a sufficiently large number). In that case, in the order of node 110-1, node 110-2, and node 110-3, they are closer to GM (node 110-0), receive message 210 at an earlier stage, and complete synchronization. In FIG. 10, the waveform when the output starts by reflecting the result of the synchronization in the timing signal as soon as the synchronization is completed is shown by a dashed line. In the dashed-line waveform, the output of the timing signal starts earlier in the order of node 110-1, node 110-2, and node 110-3, and a transient mismatch in the timing signal occurs between the nodes. In Embodiment 1, as described with reference to FIGS. 8 and 9, the output starts by reflecting the result of the synchronization in the timing signal at the same timing. Therefore, as shown by the solid line in FIG. 10, node 110-1, node 110-2, and node 110-3 start outputting the timing signal at the same timing, and those timing signals always match.
[0072] Note that for the output of the timing signal by GM (master communication device), it may start outputting when the message it transmitted returns and is received. This is because the timing when GM receives the message is equal to the timing after one round of the ring network has elapsed since it transmitted the message (round-trip time). Ideally, since messages from both clockwise and counterclockwise directions are received simultaneously, output may start when a message is received from either one, or output may start after receiving the same message from both directions.
[0073] Alternatively, if it is sufficient to eliminate the transient inconsistency of the timing signal between nodes 110 other than the GM, the GM may start outputting the timing signal from the beginning. In an actual system, an operation of using only the timing signal from nodes 110 other than the GM is conceivable, and in that case, it corresponds to the above case.
[0074] Note that in Embodiment 1, an example was shown in which the timing when just enough time has elapsed for the message transmitted from the GM to go around the ring network is determined using a countdown timer. However, the present disclosure is not limited to the above means. For example, the (future) time when the message transmitted from the GM just goes around the ring network may be calculated after the message is transmitted from the GM, and the output of the timing signal may be started when the current time reaches that time. In this case, a countdown timer is not required.
[0075] Also, in Embodiment 1, an example was shown in which a Follow_Up message is used as the message used to determine the round-trip time. However, other messages such as Sync messages that are transmitted from the GM and go around the ring network may be used instead.
[0076] As described above, according to the communication device according to Embodiment 1, synchronization of the current time is performed based on the transmission source devices of the first message and the second message, and the first delay time, which is the delay time from the transmission timing, at which the first message and the second message are transmitted by the transmission source device, to the first reception timing, and the second delay time, which is the delay time from the transmission timing to the second reception timing, are added together to calculate a third delay time, and the result of the current time synchronization is reflected in the timing signal that the own device outputs at the timing when the third delay time has elapsed from the transmission timing. Thereby, the timing at which the result of synchronization is reflected in the timing signal and output starts is made to coincide among communication devices, and transient inconsistencies of the timing signal can be eliminated.
[0077] In addition, when the synchronization unit 163 extracts message identification information, which is information for distinguishing messages regarding the transmission source device and the timing at which the transmission source device transmits, from each of the first message and the second message, compares them, and confirms a match, the synchronization unit 163 calculates the third delay time. Thereby, even when other messages flow on the ring network, messages transmitted simultaneously in the clockwise and counterclockwise directions can be added together, and the circulation time can be reliably obtained.
[0078] In addition, the synchronization unit 163 synchronizes the current time using the first message or the second message. Thereby, the message transmitted by the master communication device for synchronization can be utilized for determining the circulation time, eliminating the need to separately transmit a new message and saving communication resources.
[0079] Embodiment 2. In Embodiment 1, an example in the case where the output of the timing signal has not been started was described. In Embodiment 2, an example in the case where the output of the timing signal has already been started will be described. Examples of a situation where the output of the timing signal has already been started but synchronization has not been achieved include a case where GM and Node 110 were communicating with each other normally and were able to synchronize, but a communication failure occurred midway.
[0080] FIG. 11 is a flowchart showing the output of a timing signal by the node according to Embodiment 2. The first difference from FIG. 8 of Embodiment 1 is that step S134 is missing (after step S133 is completed, the process proceeds to step S135). That is, the determination as to whether the output of the timing signal has already started, which was performed in step S134, and the branching based on the determination result are not performed.
[0081] The second difference is that the content of step S138 has been replaced with step S138’. Specifically, when the timer expires, the synchronization unit corrects the timing signal so as to reflect the result of synchronization of the current time (step S138’). That is, in step S138’, when the output of the timing signal has already started, the synchronization unit 163 corrects the timing signal by reflecting the result of synchronization of the current time in the timing signal and continues the output.
[0082] FIG. 12 is a time chart showing the output of the timing signal by the node according to Embodiment 2. The difference from FIG. 10 of Embodiment 1 is that the output of the timing signal has already started from the beginning. In FIG. 10, the waveform in the case where correction is executed by reflecting the result of synchronization in the timing signal as soon as synchronization is completed is shown by a broken line. In the broken line waveform, the correction of the timing signal is performed earlier in the order of node 110-1, node 110-2, and node 110-3, and a transient mismatch of the timing signal occurs between the nodes. In Embodiment 2, as described with reference to FIG. 10, the correction of the timing signal is performed at the same timing. Therefore, as shown by the solid line in FIG. 12, node 110-1, node 110-2, and node 110-3 perform the correction of the timing signal at the same timing, and their timing signals always match.
[0083] As described above, according to the communication device according to Embodiment 2, even when the timing signal has already been output from the beginning, the synchronization unit 163 reflects the result of synchronization of the current time in the timing signal output by itself at the timing when the third delay time has elapsed from the transmission timing. Thereby, even when the output of the timing signal has already started from the beginning, a transient mismatch of the timing signal between the communication devices can be eliminated.
[0084] Embodiment 3. In the measurement of the delay with adjacent nodes in step S120 of Embodiment 1, actually, the measured values of the delay are collected by continuously repeating the communication shown in FIG. 6, and the accuracy of the measurement results of the delay is improved over time by obtaining their average value. Therefore, if the start of the output of the timing signal is too early, synchronization cannot be achieved with sufficient accuracy, and there is a possibility that a timing signal with insufficient accuracy is output. Therefore, in Embodiment 3, a method of suppressing the output of the timing signal until sufficient accuracy is obtained will be described.
[0085] FIG. 13 is a flowchart showing the output of a timing signal by the node according to Embodiment 3. The difference from Embodiment 1 is that steps S140 and S141 are added between steps S135 and S136, and the rest is the same as in Embodiment 1. In Embodiment 3, the number of matches is stored, and it is assumed that the number of matches is initialized to 0 in advance. When it is determined in step S135 that the same message has been received from the other party, the synchronization unit 163 adds 1 to the number of matches (step S140) and proceeds to step S141. That is, the number of matches stores the number of times the messages 210 received from each of the clockwise and counterclockwise directions are the same as each other.
[0086] When the number of matches reaches the upper limit value N (step S141), the synchronization unit 163 proceeds to step S136, and otherwise ends the flowchart of FIG. 13. However, the upper limit value N is a natural number of 2 or more set in advance. That is, the synchronization unit does not output a timing signal until the number of times the messages 210 received from each of the clockwise and counterclockwise directions are the same as each other reaches a plurality of times.
[0087] As described above, according to the communication device according to the third embodiment, when the number of times of confirming the coincidence of the message identification information between the first message and the second message reaches a preset upper limit value, the synchronization unit 163 reflects the result of the current time synchronization in the timing signal output by itself. Thereby, if the upper limit value is set to a large value, the accuracy of the measurement result of the delay with the adjacent node can be improved, and it is possible to prevent an insufficient accuracy timing signal from being output. Conversely, if the upper limit value is set to a small value, it is possible to prioritize the output of the timing signal at an early stage.
Explanation of Signs
[0088] 100 Communication system, 110 Node, 120 Communication cable, 130 GPS receiver, 140 Port, 150 Transceiver, 151 Receiver, 152 Transmitter, 160 Control unit, 161 Route construction unit, 162 Delay measurement unit, 163 Synchronization unit, 170 Processor, 180 Memory, 190 Communication IF, 200 Bus, 210 Message
Claims
1. A receiving unit that receives a first message from a first port, measures a first reception timing that is the timing of receiving the first message, receives a second message from a second port, and measures a second reception timing that is the timing of receiving the second message; A synchronization unit that synchronizes the current time based on the transmission source devices of the first message and the second message, calculates a third delay time by adding a first delay time that is a delay time from the transmission timing, at which the first message and the second message are transmitted by the transmission source devices, to the first reception timing and a second delay time that is a delay time from the transmission timing to the second reception timing, and reflects the result of synchronizing the current time at the timing when the third delay time has elapsed from the transmission timing in a timing signal output by itself; A communication device comprising the above.
2. When the synchronization unit extracts message identification information, which is information for distinguishing messages regarding the transmission source device and the timing of transmission by the transmission source device, from each of the first message and the second message, compares them, and confirms a match, the synchronization unit calculates the third delay time. The communication device according to claim 1, characterized in that.
3. The synchronization unit synchronizes the current time using the first message or the second message. The communication device according to claim 2, characterized in that.
4. When the number of times the synchronization unit confirms a match of the message identification information between the first message and the second message reaches a preset upper limit value, the synchronization unit reflects the result of synchronizing the current time in a timing signal output by itself. The communication device according to claim 3, characterized in that.
5. A computer receives a first message from a first port, measures a first reception timing that is the timing of receiving the first message, receives a second message from a second port, and measures a second reception timing that is the timing of receiving the second message. The computer synchronizes the current time based on the transmission source devices of the first message and the second message, and calculates a third delay time by adding a first delay time, which is the delay time from the transmission timing, at which the first message and the second message are transmitted by the transmission source device, to the first reception timing, and a second delay time, which is the delay time from the transmission timing to the second reception timing, and reflects the result of the current time synchronization in the timing signal output by itself at the timing when the third delay time has elapsed from the transmission timing. Communication method. **Claim 6** Receiving a first message from a first port, measuring a first reception timing, which is the timing of receiving the first message, receiving a second message from a second port, and measuring a second reception timing, which is the timing of receiving the second message, and a reception process; The computer synchronizes the current time based on the transmission source devices of the first message and the second message, and calculates a third delay time by adding a first delay time, which is the delay time from the transmission timing, at which the first message and the second message are transmitted by the transmission source device, to the first reception timing, and a second delay time, which is the delay time from the transmission timing to the second reception timing, and reflects the result of the current time synchronization in the timing signal output by itself at the timing when the third delay time has elapsed from the transmission timing, and a synchronization process; A communication program for causing a computer to execute. **Claim 7** A master communication device; A plurality of communication devices that synchronize the current time based on the master communication device; A communication cable that connects between the plurality of communication devices and the master communication device so as to form a ring network; Comprising: The communication device: A receiving unit that receives a first message transmitted by the master communication device from a first port, measures a first reception timing, which is the timing of receiving the first message, receives a second message transmitted by the master communication device from a second port, and measures a second reception timing, which is the timing of receiving the second message; A first delay time, which is a delay time from a transmission timing, at which the first message and the second message are transmitted by the master communication device, to the first reception timing, and a second delay time, which is a delay time from the transmission timing to the second reception timing, are added together to calculate a third delay time, and a synchronization unit that reflects a result of synchronization of the current time in a timing signal that the synchronization unit itself outputs at a timing when a time corresponding to the third delay time has elapsed from the transmission timing. Comprising A communication system characterized by this.
Citation Information
Patent Citations
Network system and synchronization method for network system
JP2011009829A
Communication control device, and communication and control system
JP2012060207A
Clock-time synchronization method, communication system, and communication device
JP2012105152A
Arithmetic device and control system
JP2018063612A
Optical network system, optical switch node, master node, and node
WO2013187474A1