Communication device, communication method, communication program, and communication system
By calculating and reflecting the synchronization result in the timing signal after a calculated third delay time in communication devices within IEEE802.1AS-2020 standard networks, transient discrepancies in timing signals are eliminated, ensuring consistent timing across the network.
Patent Information
- Application Number
- PCT/JP2023/036712
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-10-10
- Publication Date
- 2025-04-17
AI Technical Summary
In communication systems using the IEEE802.1AS-2020 standard, timing signals between communication devices can experience transient discrepancies due to differences in the number of hops between the Grand Master (GM) and each communication device, leading to inconsistent timing signals across the network.
The communication device measures the reception timing of messages from two ports, synchronizes its current time with the source device of these messages, calculates a third delay time representing the delay from the transmission timing, and reflects this synchronization result in a timing signal output after the third delay time has elapsed, ensuring consistent timing signals across the network.
This solution eliminates transient inconsistencies in timing signals between communication devices by synchronizing the output timing signal with the third delay time, ensuring that all devices reflect the synchronization result at the same elapsed time from the message transmission by the GM, thus maintaining network timing consistency.
Smart Images

Figure JP2023036712_17042025_PF_FP_ABST
Abstract
Description
Communication device, communication method, communication program, and communication system
[0001] The present disclosure relates to a communication device, a communication method, a communication program, and a communication system.
[0002] One communication protocol that synchronizes the time between communication devices over a network is a communication protocol that complies with the IEEE 802.1AS-2020 standard (see Non-Patent Document 1). In this protocol, a communication device with high time accuracy is selected as the Grand Master (hereinafter referred to as GM) from among multiple communication devices that make up the network. Each communication device synchronizes based on the GM's time. Specifically, each communication device synchronizes according to a message distributed from the GM. Furthermore, each communication device outputs a timing signal to a peripheral device according to the time it holds. The peripheral device then realizes some desired synchronized operation based on the timing signal.
[0003] IEEE802.1AS-2020
[0004] Due to differences in the number of hops between the GM and each communication device, the timing at which each communication device receives the message varies depending on the communication device. Furthermore, once each communication device receives the message and synchronizes, it immediately reflects the results of the synchronization in the timing signal. Therefore, there is a problem in that timing signals may not match between communication devices from the time a communication device first receives the message until the message is distributed to all communication devices.
[0005] The present disclosure has been made to solve the above-mentioned problems, and aims to eliminate transient mismatches in timing signals between communication devices.
[0006] A communication device according to the present disclosure includes a receiving unit that receives a first message from a first port, measures a first receiving timing that is the timing at which the first message is received, and receives a second message from a second port, measures a second receiving timing that is the timing at which the second message is received; and a synchronizing unit that synchronizes the current time based on a source device of the first message and the second message, calculates a third delay time by adding together a first delay time that is the delay time from a transmission timing that is the timing at which the first message and the second message are transmitted by the source device to the first receiving timing, and a second delay time that is the delay time from the transmission timing to the second receiving timing, and reflects the result of the synchronization of the current time in a timing signal that it outputs at a timing when the third delay time has elapsed since the transmission timing.
[0007] The communication device according to the present disclosure reflects the result of synchronization of the current time in the timing signal it outputs when a rotation time (third delay time) has elapsed since the master communication device transmitted the message, which is the time it takes for the message to circulate around the ring network. This eliminates mismatches in timing signals between communication devices.
[0008] 1 is a configuration diagram of a communication system according to a first embodiment. 2 is a functional configuration diagram of a communication device according to the first embodiment. 3 is a hardware configuration diagram of a node according to the first embodiment. 4 is a flowchart showing the operation of a communication system according to the first embodiment. 5 is a configuration diagram showing the result of construction of a time synchronization path according to the first embodiment. 6 is a sequence diagram showing communication for measuring delay time according to the first embodiment. 7 is a sequence diagram showing communication for time synchronization according to the first embodiment. 8 is a flowchart showing output of a timing signal by a node according to the first embodiment. 9 is a time chart showing processing timing of a node according to the first embodiment. 10 is a time chart showing output of a timing signal by a node according to the first embodiment. 11 is a flowchart showing output of a timing signal by a node according to a second embodiment. 12 is a time chart showing output of a timing signal by a node according to the second embodiment. 13 is a flowchart showing output of a timing signal by a node according to a third embodiment.
[0009] Embodiment 1. Hereinafter, embodiment 1 will be described in detail with reference to the drawings. Note that in embodiment 1, a communication protocol conforming to the IEEE 802.1AS standard is used as an example, but the scope of application of the present disclosure is not limited thereto and can be applied to communication devices that configure a ring network and perform synchronization.
[0010] 1 is a configuration diagram of a communication system according to a first embodiment. The communication system 100 includes nodes 110-0, 110-1, 110-2, ..., 110-n, and a communication cable 120. Hereinafter, when there is no particular need to distinguish between the nodes 110-0, 110-1, 110-2, ..., 110-n, they will be referred to as nodes 110. The nodes 110 are, for example, boundary clocks that comply with the IEEE 802.1AS standard.
[0011] The node 110 corresponds to a communication device in this disclosure.
[0012] The nodes 110 are communicatively connected to one another via communication cables 120 to form a ring network. The connection order is clockwise: node 110-0, node 110-1, node 110-2, ..., node 110-n. In this disclosure, adjacent nodes 110 are referred to as adjacent nodes. For example, the adjacent nodes of node 110-0 are node 110-1 and node 110-n. In this way, each node 110 has two adjacent nodes.
[0013] Unlike the other nodes 110, the node 110-0 includes a GPS receiver 130 (GPS stands for Global Positioning System). By obtaining the time from the GPS receiver 130, the node 110-0 can ascertain the time with higher accuracy than the other nodes 110.
[0014] 2 is a functional configuration diagram of a node according to the first embodiment. The node 110 includes a port 140-1, a port 140-2, a transmitting / receiving unit 150, and a control unit 160. When there is no need to distinguish between the ports 140-1 and 140-2, they are referred to as port 140. Note that the node 110-0 includes a GPS receiver 130, which is not shown in FIG. 2.
[0015] The port 140 is an interface for connecting to adjacent nodes via the communication cable 120. One port 140 is connected to one adjacent node, and the other port 140 is connected to the other adjacent node. The port 140 passes messages received from the adjacent node to the transceiver unit 150, and also transmits messages passed from the transceiver unit 150 to the adjacent node.
[0016] The transmitting / receiving unit 150 performs processing equivalent to Layer 2 of the OSI reference model. The transmitting / receiving unit 150 includes a receiving unit 151 and a transmitting unit 152.
[0017] The receiving unit 151 receives a message from an adjacent node from port 140 and passes on to the control unit 160 information extracted from the message (e.g., information necessary for time synchronization) and reception timestamp information indicating the time the message was received at port 140 or the receiving unit 151.
[0018] The transmitter 152 generates a message for an adjacent node in accordance with instructions from the controller 160 and passes the message to the port 140. The transmitter 152 also passes to the controller 160 transmission timestamp information indicating the time at which the message was sent from the port 140 or the transmitter 152.
[0019] The control unit 160 includes a path construction unit 161 , a delay measurement unit 162 , and a synchronization unit 163 .
[0020] The path construction unit 161 determines a path for time synchronization within the communication system 100 while cooperating with the other nodes 110. The path construction unit 161 sets which messages each port 140 will send and receive according to the result of determining the path for time synchronization. The path for time synchronization is constructed in a hierarchical structure with the communication device having the most accurate time within the communication system 100 as the GM (Grand Master) at the top. The method for constructing a path for time synchronization will be described later.
[0021] The GM corresponds to the master communication device in this disclosure.
[0022] The delay measurement unit 162 measures the delay time of messages between the node and an adjacent node. By taking this delay into account during time synchronization, highly accurate synchronization can be achieved.
[0023] The synchronization unit 163 holds the current time and advances the current time according to the clock within its own node. The synchronization unit of node 110-0 obtains highly accurate time from the GPS receiver 130, and therefore updates the current time according to the time obtained from the GPS receiver 130. When synchronization information 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, for example, to a peripheral device (not shown) of the node 110. The peripheral device realizes some desired synchronized operation based on the input timing signal. The node 110 and its peripheral device may be configured as an integrated device.
[0024] 3 is a hardware configuration diagram of a node according to embodiment 1. The node 110 includes a processor 170, a memory 180, a communication IF 190 (IF stands for Interface), and a bus 200. The processor 170, the memory 180, and the communication IF 190 are connected via the bus 200 so as to be able to communicate with each other.
[0025] The processor 170 is, for example, a central processing unit (CPU), a digital signal processor (DSP), or a graphical processing unit (GPU).
[0026] The memory 180 is, for example, a static random access memory (SRAM), a dynamic random access memory (DRAM), or a read-only memory (ROM). If the memory 180 alone does not have sufficient storage capacity, the node 110 may include an auxiliary storage device (not shown) as needed. The auxiliary storage device is, for example, a hard disk drive (HDD) or a solid state drive (SSD).
[0027] The communication IF 190 is, for example, a device that complies with the IEEE 802.3 standard.
[0028] The port 140 is implemented by the communication IF 190. The control unit 160 and the transceiver unit 150 are implemented, for example, by software. The software is written as a program and stored in the memory 180. When the control unit 160 and the transceiver unit 150 are implemented by software, the control unit 160 and the transceiver unit 150 are implemented by the processor 170 reading from the memory 180 and executing a program for operating as the control unit 160 and the transceiver unit 150, respectively. In other words, the node 110 includes the memory 180 for storing a program that, when the processor 170 executes its function, results in the execution of steps for implementing the operations of the control unit 160 and the transceiver unit 150. It can also be said that these programs cause a computer to execute the various processes performed by the control unit 160 and the transceiver unit 150.
[0029] Alternatively, the control unit 160 and the transmission / reception unit 150 may be realized by hardware, such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
[0030] Alternatively, the control unit 160 and part of the transmission / reception unit 150 may be implemented by software, with the remainder being implemented by hardware.
[0031] Next, the operation of the communication system 100 will be described.
[0032] 4 is a flowchart showing the operation of the communication system according to the first embodiment. The node 110 exchanges Announce messages with adjacent nodes to exchange its own priority information (information indicating how accurate the time is) and hop count information from the GM, thereby constructing a time-synchronized route (step S110). Specifically, the route construction unit 161 passes information necessary for generating an Announce message to the transmission unit 152. The transmission unit 152 generates an Announce message based on the information and passes it to each port 140. Each port 140 transmits the Announce message to an adjacent node. Furthermore, each port 140 receives an Announce message from an adjacent node and passes the Announce message to the reception unit 151. The reception unit 151 extracts necessary information from the Announce message and passes it to the route construction unit 161. The route construction unit 161 determines a route for time synchronization based on the received information.
[0033] FIG. 5 is a configuration diagram showing the result of constructing a time synchronization path according to the first embodiment. Node 110-0 has the most accurate time among the nodes 110, and therefore becomes the GM. Starting from node 110-0, which has become the GM, time information (Sync messages and Follow_Up messages, described later) is transmitted to each node 110. The path (i.e., the time synchronization path) in this case consists of two directions: clockwise and counterclockwise. In the clockwise direction, a message containing time information is transmitted from node 110-0, forwarded in the order of node 110-1, node 110-2, ..., node 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, forwarded in the order of node 110-n, ..., node 110-2, node 110-1, and finally discarded when it returns to node 110-0. The synchronization order between nodes can be either clockwise or counterclockwise, but either order is acceptable. Alternatively, some nodes 110 may be synchronized in a clockwise order and the remaining nodes 110 in a counterclockwise order.
[0034] Returning to the explanation of Fig. 4, the node 110 measures the delay time required for message propagation between adjacent nodes (step S120). The node 110 executes the processes of steps S110 and S120 in parallel.
[0035] Fig. 6 is a sequence diagram showing communication for measuring delay time according to the first embodiment. That is, Fig. 6 shows details of the operation of step S120 in Fig. 4. Fig. 6 shows an example of communication for measuring message delay time between node 110-0, which is the GM, and node 110-1. Note that in practice, communication for measuring delay time is also similarly carried out between any other nodes 110.
[0036] The node 110-1 transmits a Pdelay_Req message to the node 110-0 (step S121).
[0037] The operation of node 110-1 in step S121 will now be described in detail. The delay measurement unit 162 of node 110-1 passes information necessary for generating a 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 passed information and passes the Pdelay_Req message to the port 140 connected to node 110-0. The port 140 that has received the Pdelay_Req message transmits the Pdelay_Req message to node 110-0. Here, the transmission unit 152 of node 110-1 passes transmission timestamp information indicating the time t1 at which the Pdelay_Req message was transmitted from the port 140 or transmission unit 152 of node 110-1 to the delay measurement unit 162 of node 110-1. To measure t1, the transmitter 152 of the node 110-1 may acquire the current time from the synchronizer 163 of the node 110-1 as needed.
[0038] The operation of node 110-0 in step S121 will be described in detail below. Upon receiving the Pdelay_Req message, port 140 of node 110-0 passes the Pdelay_Req message to the receiving unit 151 of node 110-0. The receiving unit 151 of node 110-0 passes reception timestamp information indicating the time t2 at which the Pdelay_Req message was received by port 140 or receiving unit 151 of node 110-0 to the delay measurement unit 162 of node 110-0. In order to measure t2, the receiving unit 151 of node 110-0 may obtain the current time from the synchronization unit 163 of node 110-0 as appropriate. Furthermore, the receiving unit 151 of node 110-0 extracts necessary information from Pdelay_Req and passes it to the delay measurement unit 162 of node 110-0.
[0039] Upon receiving the Pdelay_Req message, the node 110-0 transmits a Pdelay_Resp message to the node 110-1 (step S122).
[0040] The operation of node 110-0 in step S122 will be described in detail below. The delay measurement unit 162 of node 110-0 passes information necessary for generating a 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 passed information, and passes the Pdelay_Resp message to the port 140 connected to node 110-1. Here, the Pdelay_Resp message contains information about the reception time t2 of the Pdelay_Req message. The port 140 that has received the Pdelay_Resp message transmits the Pdelay_Resp message to node 110-1. Here, the transmitting unit 152 of node 110-0 passes transmission timestamp information indicating the time t3 at which the Pdelay_Resp message was transmitted from the port 140 or the transmitting unit 152 of node 110-0 to the delay measuring unit 162 of node 110-0. In order to measure t3, the transmitting unit 152 of node 110-0 may appropriately obtain the current time from the synchronizing unit 163 of node 110-0.
[0041] The operation of node 110-1 in step S122 will be described in detail below. Having received the Pdelay_Resp message, port 140 of node 110-1 passes the Pdelay_Resp message to the receiver 151 of node 110-1. The receiver 151 of node 110-1 passes reception timestamp information indicating the time t4 at which the Pdelay_Resp message was received by port 140 or receiver 151 of node 110-1 to the delay measurement unit 162 of node 110-1. In order to measure t4, the receiver 151 of node 110-1 may obtain the current time from the synchronization unit 163 of node 110-1 as appropriate. Furthermore, the receiver 151 of node 110-1 extracts necessary information from the Pdelay_Resp message and passes it to the delay measurement unit 162 of node 110-1. The necessary information includes the time t2 when the Pdelay_Req message is received.
[0042] After sending the Pdelay_Resp message, the node 110-0 sends a Pdelay_Resp_Follow_Up message to the node 110-1 (step S123).
[0043] The operation of node 110-0 in step S123 will be described in detail below. The delay measurement unit 162 of node 110-0 passes information necessary for generating a 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 passed information, and passes the Pdelay_Resp_Follow_Up message to the port 140 connected to node 110-1. Here, the Pdelay_Resp_Follow_Up message contains the transmission time t3 of the Pdelay_Resp message as information. The port 140 that has received the Pdelay_Resp_Follow_Up message transmits the Pdelay_Resp_Follow_Up message to the node 110-1.
[0044] The operation of node 110-1 in step S123 will be described in detail below. Upon receiving the Pdelay_Resp_Follow_Up message, port 140 of node 110-1 passes the Pdelay_Resp_Follow_Up message to receiving unit 151 of node 110-1. Furthermore, receiving unit 151 of node 110-1 extracts necessary information from the Pdelay_Resp_Follow_Up message and passes it to 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 uses t1, t2, t3, and t4 obtained up to this point to calculate the delay time between node 110-0 and node 110-1 using a predetermined formula. 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 calculated accurately by mathematically eliminating the error.
[0045] Node 110-0 and node 110-1 periodically perform the communication of steps S121 to S123, and node 110-1 periodically updates the delay time calculation results. Furthermore, the above-described delay time measurement and the communication therefor are not limited to between node 110-0 and node 110-1, but are also performed between any other nodes 110. Furthermore, because only the node 110 that sent the Pdelay_Req can calculate the delay time, reverse communication is also performed, for example, between node 110-0 and node 110-1. In other words, communication is also performed in the direction in which node 110-0 sends Pdelay_Req to node 110-1. In this way, each node 110 calculates and stores the delay time that occurs when sending and receiving messages with adjacent nodes.
[0046] Returning to the description of Fig. 4, when the node 110 completes the processes of both steps S110 and S120, it synchronizes the time with the GM along the route for time synchronization established in step S110 (step S130), and ends the flowchart of Fig. 4.
[0047] 7 is a sequence diagram showing communications for time synchronization according to the first embodiment. That is, FIG. 7 shows details of the operation of step S130 in FIG. 4. FIG. 7 shows, as an example, the portion 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, i.e., the first portion in the clockwise direction. In reality, as described using FIG. 5, message transmission for time synchronization is performed in two directions, clockwise and counterclockwise, in step S130.
[0048] The node 110-0 transmits a Sync message to the node 110-1 (step S131).
[0049] The operation of node 110-0 in step S131 will now be described in detail. The synchronization unit 163 of node 110-0 passes information necessary for generating a 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 passed information and passes the Sync message to the port 140 connected to node 110-1. The 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 passes transmission timestamp information indicating the time t5 at which the Sync message was transmitted from the port 140 or 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 obtain the current time from the synchronization unit 163 of node 110-0 as appropriate in order to measure t5.
[0050] The operation of node 110-1 in step S131 will now be described in detail. Having received the Sync message, port 140 of node 110-1 passes the Sync message to the receiving unit 151 of node 110-1. The receiving unit 151 of node 110-1 passes reception timestamp information indicating the time t6 at which the Sync message was received by port 140 or receiving unit 151 of node 110-1 to the synchronization unit 163 of node 110-1. In order to measure t6, the receiving unit 151 of node 110-1 may obtain the current time from the synchronization unit 163 of node 110-1 as appropriate. Furthermore, the receiving unit 151 of node 110-1 extracts necessary information from the Sync and passes it to the synchronization unit 163 of node 110-1.
[0051] After sending the Sync message, the node 110-0 sends a Follow_Up message to the node 110-1 (step S132).
[0052] The operation of node 110-0 in step S132 will be described in detail below. The synchronization unit 163 of node 110-0 passes information necessary for generating a 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 the port 140 connected to node 110-1. Here, the Follow_Up message contains information about the transmission time t5 of the Sync message. The port 140 that has received the Follow_Up message transmits the Follow_Up message to node 110-1.
[0053] The operation of node 110-1 in step S132 will be described in detail below. Upon receiving the Follow_Up message, port 140 of node 110-1 passes the Follow_Up message to the receiving unit 151 of node 110-1. Furthermore, the receiving unit 151 of node 110-1 extracts 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. Using the previously obtained t5 and t6 and the delay time calculated by the delay measurement unit 162, 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). In other words, the time t6 should be the time the delay time has elapsed since time t5, and measures whether there is an error therein. The synchronization unit 163 of the node 110-1 performs synchronization by correcting the current time it holds so as to eliminate the measured error.
[0054] After steps S131 to S132 are completed between node 110-0 and node 110-1, node 110-1 then transmits a Sync message (step S131) and a Follow_Up message (step S132) to node 110-2 in a similar manner. However, in step S132, there is a slight difference in the information contained in the Follow_Up message. Specifically, the Follow_Up message transmitted from node 110-1 contains 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. In detail, the synchronization unit 163 of node 110-1 instructs the transmission unit 152 to include the information about time t5 contained in the received Follow_Up message in the Follow_Up message it transmits. Furthermore, the synchronization unit 163 of the node 110-1 calculates the time difference t7 and instructs the transmission unit 152 to include the calculated t7 in the Follow_Up message that it transmits.
[0055] Similarly, the Follow_Up message sent by node 110-2 to node 110-3 includes not only time t5, but also the time difference t7' from time t5 to time t5'' when the immediately preceding Sync message was sent. In this disclosure, the cumulative result of delay times such as t7 and t7' is called the cumulative delay. In a communication protocol conforming to the IEEE 802.1AS standard, the cumulative delay is stored in the Correction Field in the Follow_Up message. In this way, each node 110 forwards the information on the GM transmission time t5 as is, and also calculates and sends the cumulative delay each time it forwards a message to a subsequent adjacent node. Therefore, subsequent nodes 110 from node 110-2 onwards can also read the time t5 (the time the Sync message was sent by the GM) and the cumulative delay contained in the received Follow_Up message, and by using the delay time between themselves and adjacent nodes calculated by themselves in step S123, they can determine the exact time when they received the Sync message and correct the current time they hold.
[0056] Note that the Follow_Up messages sent by nodes 110-1 and subsequent nodes 110 may contain the time when the immediately preceding Sync message was sent, instead of the time t5 (the time when the Sync message was sent by the GM) and the cumulative delay, because this information is sufficient for correcting the current time as described above.
[0057] In this way, steps S131 to S132 are performed sequentially clockwise. Eventually, node 110-1, node 110-2, ..., node 110-n synchronize with GM (node 110-0) and grasp the cumulative delay required for transferring Sync messages and Follow_Up messages between GM (node 110-0) and each node. Note that similar communication is also performed counterclockwise, as described in FIG. 5.
[0058] If the synchronization result in step S132 is simply reflected in the timing signals, it will be impossible to synchronize the timing signals between the nodes 110. Therefore, a method for synchronizing the timing signals between the nodes 110 will be described with reference to FIG.
[0059] 8 is a flowchart showing output of a timing signal by a node according to embodiment 1. The synchronization unit 163 stores the received message (step S133), and the process proceeds to step S134. Note that the message in the description of FIG. 8 refers to a Follow_Up message unless otherwise specified.
[0060] The operation of the node 110 in step S133 will be described in detail. The receiving unit 151 passes message identification information included in a message received from either the clockwise or counterclockwise direction to the synchronization unit 163. The message identification information is information for distinguishing the sender of the message and for distinguishing it from messages sent at different times. The synchronization unit 163 stores the passed message identification information. The message identification information is, for example, a sourcePortIdentity or sequenceId in a communication protocol conforming to the IEEE 802.1AS standard. A MAC (Media Control Access) address is usually used for the sourcePortIdentity. The sequenceId is a number that is incremented by 1 each time the GM sends a message, and is used to distinguish individual messages. Messages sent simultaneously by the GM in both the clockwise and counterclockwise directions have the same message identification information. On the other hand, messages transmitted at different times by the GM have different message identification information. Furthermore, in step S133, the synchronization unit 163 receives the cumulative delay included in the message from the reception unit 151. The synchronization unit 163 adds the delay time between the node 110 and the adjacent node calculated in step S123 (this adjacent node is the adjacent node on the transmission side of the message received in step S133) to the cumulative delay. This allows the node 110 to calculate the cumulative delay from when the message is transmitted by the GM (node 110-0) until it is received by the node 110 itself (in step S133).
[0061] The synchronization unit 163 determines whether the output of the timing signal is disabled (step S134). If it is disabled, the process proceeds to step S135. Otherwise, the flowchart of FIG. 8 ends. The output of the timing signal being disabled means that the timing signal is not being output. For example, in the initial stage after the node 110 joins the network (communication system 100), the node 110 has not yet 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 disabled. As shown in step S134 of FIG. 8, if the node 110 has already enabled the output of the timing signal, the node 110 determines that the timing signal has already been synchronized and output, and ends the flowchart of FIG. 8.
[0062] The synchronization unit 163 determines whether the receiving unit 151 has previously received the same message from the opposite direction as the one received in step S133 (step S135). If so, the process proceeds to step S136; otherwise, the flowchart in FIG. 8 is terminated. Here, the "same message" refers to a message having the same message identification information as previously stored message identification information. In other words, the message previously received from one side and the message currently received from the other side are messages sent from the same GM at the same time, in the clockwise and counterclockwise directions, respectively. The synchronization unit 163 determines whether the message identification information included in the currently received message matches the previously stored message identification information, and if they match, determines that the messages are the same.
[0063] The synchronization unit 163 sets a countdown timer (hereinafter referred to as the timer) to expire when the cumulative delay calculated in step S133 has elapsed since the message was received in step S135 (step S136), and the process proceeds to step S137. By setting the timer in this manner, the synchronization unit 163 can cause the timer to expire just when the time has elapsed since the message was sent from the GM, just enough time for the message to make one lap around the ring network. This applies to any node 110. Details of this will be described later using FIG. 9.
[0064] If the timer expires (step S137), the synchronization unit 163 proceeds to step S138; otherwise, the synchronization unit 163 returns to step S137.
[0065] The synchronization unit 163 starts outputting a timing signal that reflects the result of synchronization of the current time (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 a node according to the first embodiment. In FIG. 9, the horizontal axis represents time, and the origin of the horizontal axis is the timing when the GM (node 110-0) simultaneously transmits the message 210 in both the clockwise and counterclockwise directions. Note that the message 210 in the description of FIG. 9 refers to a Follow_Up message unless otherwise specified. Furthermore, the two messages 210 in FIG. 9 contain the same message identification information. Here, it is assumed that FIG. 9 shows the timing of processing by node 110-k (k is any natural number from 1 to n). Node 110-k receives a message 210 from the clockwise direction and a message 210 from the counterclockwise direction. FIG. 9 shows, as an example, a case where node 110-k receives the message 210 from the clockwise direction before the message 210 from the counterclockwise direction.
[0067] As shown in FIG. 9, a message 210 is received from the clockwise direction at time t8, and a message 210 is received from the counterclockwise direction at time t9. Time t8 is the time from when the message 210 is transmitted in the clockwise direction by the GM (node 110-0) until the message 210 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 in the counterclockwise direction by the GM (node 110-0) until the message 210 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 from 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 IEEE 802.1AS standard specifies that there is symmetry in the path delay. In other words, no matter which direction the message 210 is sent or received from, there is no difference in delay time if it is the same path. According to this specification, the time t8 + t9 is the same as the time it takes for the message 210 to make one trip around the ring network. In this disclosure, this time is called the trip time. This holds true for any node 110-k. Therefore, all nodes 110 can enable the output of timing signals at the same time, t8 + t9.
[0069] Depending on the node's position in the ring network, the node 110 may receive the message 210 coming from the clockwise direction before the message 210 coming from the counterclockwise direction. Even in this case, by regarding the time of the message 210 received first as t8 and the time of the message 210 received later as t9, all nodes 110 can enable output of the timing signal at the same time, regardless of which direction the message 210 is received first.
[0070] 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 timing signals by the node 110 according to the first embodiment. FIG. 10 illustrates the output of timing signals using nodes 110-1, 110-2, and 110-3 as examples. It is assumed here that a sufficient number of nodes 110 exist (i.e., node 110-n, where n is a sufficiently large number). In this case, nodes 110-1, 110-2, and 110-3 are closer to the GM (node 110-0) in this order, receive the message 210 earlier, and complete synchronization. In FIG. 10, the dashed lines show waveforms assuming that the timing signals begin to reflect the results of synchronization as soon as synchronization is completed. In the dashed waveforms, the output of timing signals begins earlier in the order of nodes 110-1, 110-2, and 110-3, resulting in a transient mismatch in the timing signals between the nodes. In the first embodiment, as explained using Figures 8 and 9, the synchronization results are reflected in the timing signals and output is started at the same timing. Therefore, as shown by the solid lines in Figure 10, node 110-1, node 110-2, and node 110-3 start outputting timing signals at the same timing, and these timing signals always match.
[0072] The GM (master communication device) can start outputting a timing signal when it receives the message it sent back. This is because the timing at which the GM receives a message is equal to the time it takes for the message to go around the ring network (circulation time) after it sent it. Ideally, messages from both the clockwise and counterclockwise directions are received simultaneously, so output can start when a message is received from either one direction, or when the same message has been received from both directions.
[0073] Alternatively, if it is sufficient to eliminate transient mismatches in timing signals between nodes 110 other than the GM, the GM may start outputting timing signals from the beginning. In an actual system, it is conceivable that only timing signals from nodes 110 other than the GM are used, and this case corresponds to the above case.
[0074] In the first embodiment, an example was shown in which a countdown timer was used to determine the timing when a message was sent from the GM and the time when the message had traveled around the ring network was exactly the same. However, the present disclosure is not limited to the above-described means. For example, it is also possible to calculate the (future) time when the message will travel around the ring network exactly after the message was sent from the GM, and start outputting a timing signal when the current time reaches that time. In this case, a countdown timer is not required.
[0075] In addition, in embodiment 1, an example was shown in which a Follow_Up message was used as the message used to determine the circulation time, but instead, other messages such as a Sync message that are sent from the GM and travel around the ring network may be used.
[0076] As described above, according to the communication device of the first embodiment, the current time is synchronized based on the sender device of the first message and the second message, and the third delay time is calculated by adding together the first delay time, which is the delay time from the transmission timing, which is the timing at which the first message and the second message are transmitted by the sender 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, and the result of the synchronization of the current time is reflected in the timing signal that is output by the communication device at the timing when the third delay time has elapsed from the transmission timing. As a result, the timing at which the synchronization result is reflected in the timing signal and the output start timing are consistent between the communication devices, and transient inconsistencies in the timing signals can be eliminated.
[0077] Furthermore, the synchronization unit 163 extracts message identification information from each of the first and second messages, which is information for distinguishing messages with respect to the source device and the timing of transmission by the source device, and compares the information to determine a match. If the message identification information matches, the synchronization unit 163 calculates the third delay time. This allows messages simultaneously transmitted in the clockwise and counterclockwise directions to be added together, even when other messages are transmitted on the ring network, and makes it possible to reliably determine the circulation time.
[0078] Furthermore, the synchronization unit 163 synchronizes the current time using the first message or the second message, which allows the message transmitted by the master communication device for synchronization to be used to determine the rotation time, eliminating the need to transmit a new message separately and saving communication resources.
[0079] Embodiment 2 In the first embodiment, an example was described in which output of a timing signal had not yet started. In the second embodiment, an example is described in which output of a timing signal had already started. An example of a situation in which output of a timing signal has already started but synchronization is not achieved is when the GM and node 110 communicate normally with each other and are synchronized, but a communication failure occurs midway.
[0080] 11 is a flowchart showing the output of a timing signal by a node according to the second embodiment. The first difference from FIG. 8 of the first embodiment is that step S134 is omitted (after step S133 is completed, the process proceeds to step S135). In other words, the determination of whether the output of the timing signal has already started and the branching based on the result of this determination, which were performed in step S134, are not performed.
[0081] The second difference is that step S138 has been replaced by step S138'. Specifically, when the timer expires, the synchronization unit corrects the timing signal to reflect the result of synchronization with the current time (step S138'). That is, in step S138', if the synchronization unit 163 has already started outputting a timing signal, the synchronization unit 163 corrects the timing signal by reflecting the result of synchronization with the current time in the timing signal, and continues outputting the timing signal.
[0082] FIG. 12 is a time chart showing the output of timing signals by nodes according to the second embodiment. The difference from FIG. 10 of the first embodiment is that the output of timing signals has already begun. In FIG. 10, the dashed lines show waveforms in the case where correction is performed by reflecting the results of synchronization in the timing signals as soon as synchronization is completed. In the dashed waveforms, timing signal correction is performed earlier in the order of node 110-1, node 110-2, and node 110-3, and a timing signal mismatch between the nodes occurs transiently. In the second embodiment, as described using FIG. 10, timing signal correction is performed at the same timing. Therefore, as shown by the solid lines in FIG. 12, nodes 110-1, 110-2, and 110-3 correct their timing signals at the same timing, and their timing signals always match.
[0083] As described above, according to the communication device of the second embodiment, even if a timing signal has already been output from the beginning, the synchronization unit 163 reflects the result of the synchronization of the current time in the timing signal that it outputs at the timing when the third delay time has elapsed from the transmission timing. This makes it possible to eliminate transient mismatches in timing signals between communication devices even if the output of timing signals has already started from the beginning.
[0084] Third Embodiment The measurement of delay with an adjacent node in step S120 of the first embodiment is actually performed by continuously repeating the communication shown in FIG. 6 to collect delay measurements, and by calculating the average of these measurements, the accuracy of the delay measurement results is improved over time. Therefore, if the output of a timing signal starts too early, synchronization may not be performed with sufficient accuracy, and a timing signal with insufficient accuracy may be output. Therefore, in the third embodiment, a method of suppressing the output of a timing signal until sufficient accuracy is obtained is described.
[0085] 13 is a flowchart showing the output of timing signals by a node according to the third embodiment. The difference from the first embodiment is that steps S140 and S141 are added between steps S135 and S136, but the rest is the same as in the first embodiment. In the third embodiment, the number of matches is stored, but is assumed to be initialized to 0 in advance. If it is determined in step S135 that an identical message has been received from the other side, the synchronization unit 163 adds 1 to the number of matches (step S140) and proceeds to step S141. In other words, the number of matches is the number of times that the messages 210 received from the clockwise and counterclockwise directions were identical to each other.
[0086] If the number of matches reaches the upper limit N (step S141), the synchronization unit 163 proceeds to step S136; otherwise, the synchronization unit 163 ends the flowchart in Fig. 13. Note that the upper limit N is a preset natural number equal to or greater than 2. In other words, the synchronization unit does not output a timing signal until the number of times that the messages 210 received from the clockwise and counterclockwise directions have been identical reaches a plurality of times.
[0087] As described above, according to the communication device of the third embodiment, when the number of times that the match of the message identification information between the first message and the second message has been confirmed reaches a preset upper limit, the synchronization unit 163 reflects the result of the synchronization of the current time in the timing signal that it outputs. Thus, by setting the upper limit 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 a timing signal with insufficient accuracy from being output. Conversely, by setting the upper limit to a small value, it is possible to prioritize outputting the timing signal at an early stage.
[0088] 100 Communication system, 110 Node, 120 Communication cable, 130 GPS receiver, 140 Port, 150 Transmitter / Receiver, 151 Receiver, 152 Transmitter, 160 Controller, 161 Route construction unit, 162 Delay measurement unit, 163 Synchronizer, 170 Processor, 180 Memory, 190 Communication IF, 200 Bus, 210 Message
Claims
1. A communications device comprising: a receiving unit that receives a first message from a first port, measures a first receiving timing that is the timing of receiving the first message, and receives a second message from a second port, and measures a second receiving timing that is the timing of receiving the second message; and a synchronizing unit that synchronizes a current time based on a source device of the first message and the second message, calculates a third delay time by adding together a first delay time that is the delay time from a transmission timing that is the timing when the first message and the second message are transmitted by the source device to the first receiving timing, and a second delay time that is the delay time from the transmission timing to the second receiving timing, and reflects the result of the synchronization of the current time in a timing signal that it outputs at a timing when the third delay time has elapsed from the transmission timing.
2. The communication device described in claim 1, characterized in that the synchronization unit extracts message identification information, which is information for distinguishing messages regarding the sending device and the timing of sending by the sending device, from each of the first message and the second message, compares them, and calculates the third delay time if a match is confirmed.
3. The communication device according to claim 2, characterized in that the synchronization unit synchronizes the current time using the first message or the second message.
4. The communication device described in claim 3, characterized in that when the number of times that the message identification information between the first message and the second message has been confirmed to match reaches a preset upper limit value, the synchronization unit reflects the result of the synchronization of the current time in the timing signal that it outputs.
5. A communication method comprising: receiving a first message from a first port, measuring a first reception timing which is the timing at which the first message is received; receiving a second message from a second port, measuring a second reception timing which is the timing at which the second message is received; synchronizing a current time based on a source device of the first message and the second message; calculating a third delay time by adding together a first delay time which is the delay time from a transmission timing which is the timing at which the first message and the second message are transmitted by the 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 reflecting the result of the synchronization of the current time in a timing signal which is output by the device itself at a timing when the third delay time has elapsed from the transmission timing.
6. A communications program for executing a receiving process for receiving a first message from a first port, measuring a first receiving timing which is the timing of receiving the first message, and receiving a second message from a second port, measuring a second receiving timing which is the timing of receiving the second message; and a synchronization process for synchronizing a current time based on a source device of the first message and the second message, calculating a third delay time by adding up a first delay time which is the delay time from a transmission timing which is the timing when the first message and the second message are transmitted by the source device to the first receiving timing, and a second delay time which is the delay time from the transmission timing to the second receiving timing, and reflecting the result of the synchronization of the current time in a timing signal which it outputs at a timing when the third delay time has elapsed from the transmission timing.
7. A communication system comprising: a master communication device; a plurality of communication devices which synchronize their current times with reference to the master communication device; and communication cables which connect the plurality of communication devices and the master communication device to form a ring network, wherein the communication devices comprise: a receiving unit which receives a first message transmitted by the master communication device from a first port, measures a first receiving timing which is the timing of receiving the first message, and receives a second message transmitted by the master communication device from a second port, and measures a second receiving timing which is the timing of receiving the second message; and a synchronizing unit which calculates a third delay time by adding together a first delay time which is the delay time from a transmitting timing which is the timing when the first message and the second message are transmitted by the master communication device to the first receiving timing, and a second delay time which is the delay time from the transmitting timing to the second receiving timing, and which reflects the result of the synchronization of the current time in a timing signal which it outputs at a timing when the third delay time has elapsed from the transmitting timing.
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