Communication device and communication system
The communication device addresses the issue of maintaining time synchronization with slaves during simultaneous grandmaster failures by generating self-running time synchronization packets, ensuring reliable communication and accurate synchronization.
Patent Information
- Application Number
- JP2023109591
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2043-07-03
AI Technical Summary
Conventional communication devices fail to maintain time synchronization with slaves when multiple grandmasters in an IP network fail simultaneously.
A communication device equipped with a packet transceiver, time synchronization processing unit, failure detection unit, and packet generation unit that generates time synchronization packets in self-running mode when multiple grandmasters fail, allowing communication devices to synchronize with slaves even in the absence of functioning grandmasters.
Enables communication devices to maintain time synchronization with slaves during simultaneous failures of multiple grandmasters, ensuring reliable communication and avoiding inaccurate time synchronization due to packet loops.
Smart Images

Figure 0007699629000001 
Figure 0007699629000002 
Figure 0007699629000003
Abstract
Description
Technical Field
[0001] The present invention relates to a communication device and a communication system.
Background Art
[0002] In recent years, in a synchronous communication system using an IP (Internet Protocol) network that operates multiple grandmasters, a synchronous communication system has been proposed that selects a grandmaster that operates stably from among multiple grandmasters and performs communication with time synchronization based on the high-precision time synchronization method PTP (Precision Time Protocol) (see, for example, Patent Document 1).
[0003] The synchronous communication system described in Patent Document 1 is a synchronous communication system using an IP network including a plurality of grandmasters that generate GM clocks synchronized with GPS time. In this system, a grandmaster that operates stably is selected from among the plurality of grandmasters, and it includes a plurality of communication devices that perform communication with time synchronization based on PTP. Each of the plurality of communication devices includes a PTP message transmission / reception unit that acquires PTP messages from a plurality of other communication devices with which communication has been established, a grandmaster candidate selection unit that extracts parameters for selecting one from among a plurality of grandmaster candidates based on the acquired PTP messages, and a grandmaster selection unit that selects one grandmaster according to an algorithm that improves the BMCA (Best Master Clock Algorithm) defined in the standard specification IEEE1588 v2 based on the parameters.
Prior Art Documents
Patent Documents
[0004]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0005] Although it is rare for multiple grandmasters in an IP network to fail simultaneously, in such a case, conventional communication devices have a problem in that they cannot communicate with slaves in time synchronization.
[0006] An object of the present invention is to provide a communication device and a communication system capable of communicating with slaves in time synchronization even when multiple grandmasters fail simultaneously. [Means for Solving the Problems]
[0007] [1] A communication device provided corresponding to one of a plurality of master devices that transmit time synchronization packets including a reference time, and commonly connected to other communication devices provided corresponding to the other master devices by a slave device, A packet transceiver that transmits and receives the time synchronization packet to and from the corresponding master device, the other communication device, and the slave device, A time synchronization processing unit that corrects its own time so as to synchronize with the reference time included in the time synchronization packet transmitted from the master device, A failure detection unit that detects failures of the corresponding master device and the other master devices, When the failure detection unit simultaneously detects failures of the corresponding master device and the other master devices, a packet generation unit that generates a time synchronization packet including its own time in a self-running mode, and controls the packet transceiver to transmit and receive the time synchronization packet to and from the other communication device and the slave device. [2] The communication device according to [1], wherein the packet generation unit controls to invalidate the time synchronization packet generated by itself among the time synchronization packets received from the other communication device. [3] The communication device according to [2], wherein the packet generation unit assigns identification information for identifying itself to the time synchronization packet generated by itself, and controls to invalidate the time synchronization packet generated by itself based on the identification information. [4] The communication device according to [3] above, wherein the identification information is the port number of the port that transmits the time synchronization packet to the other communication device. [5] The time synchronization packet generated by the packet generation unit has a priority defined between the time synchronization packets generated by the packet generation units of the other communication devices. The communication device according to any one of [1] to [4] above, wherein the time synchronization processing unit performs time synchronization processing based on the time synchronization packet according to the priority. [6] The communication device according to [1] above, wherein the time synchronization processing unit includes a storage unit that stores history information in which its own time is corrected based on the reference time. When the packet generation unit generates the time synchronization packet in the self-running mode, the communication device extracts a correction trend from the history information and corrects its own time in consideration of the correction trend. [7] A plurality of master devices that transmit time synchronization packets including a reference time, A communication system having a plurality of communication devices provided corresponding to each of the plurality of master devices and commonly connected to slave devices, Each of the plurality of communication devices A packet transceiver that transmits and receives the time synchronization packet to and from the corresponding master device, other communication devices, and the slave device, A time synchronization processing unit that corrects its own time to synchronize with the reference time included in the time synchronization packet transmitted from the master device, A failure detection unit that detects failures of the corresponding master device and other master devices, A communication system including a packet generation unit that, when the failure detection unit simultaneously detects failures of the corresponding master device and other master devices, generates a time synchronization packet including its own time in the self-running mode and controls the packet transceiver to transmit and receive the time synchronization packet to and from the other communication devices and the slave device.
Advantages of the Invention
[0008] According to the inventions according to claims 1 and 7, even when a plurality of grandmasters malfunction simultaneously, communication can be performed with the slaves in time synchronization. According to the inventions according to claims 2 to 4, when the time synchronization packet generated by itself returns to itself again via another communication device, it is possible to avoid performing inaccurate time synchronization based on the time synchronization packet of itself. According to the invention according to claim 5, highly reliable time synchronization processing can be performed. According to the invention according to claim 6, highly accurate time synchronization processing can be performed.
Brief Description of the Drawings
[0009]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Embodiments for Carrying Out the Invention
[0010] Hereinafter, embodiments of the present invention will be described with reference to the drawings. In each figure, components having substantially the same function are denoted by the same reference numerals, and redundant descriptions thereof are omitted.
[0011] [Embodiment] FIG. 1 is a block diagram showing an example of a communication system according to an embodiment of the present invention. This communication system 1 includes a first grandmaster device 2A and a second grandmaster device 2B that transmit PTP packets including a reference time, a first communication device 3A connected to the first grandmaster device 2A, a second communication device 3B connected to the second grandmaster device 2B, and a plurality of slave devices 4 commonly connected to the first communication device 3A and the second communication device 3B. It is assumed that the first grandmaster device 2A is set to have a higher priority than the second grandmaster device 2B.
[0012] The first communication device 3A and the second communication device 3B are connected to each other, and the first grandmaster device 2A, the second grandmaster device 2B, the first communication device 3A, the second communication device 3B, and the plurality of slave devices 4 are communicably connected by an IP network such as Ethernet (registered trademark). Here, the PTP packet is an example of a time synchronization packet. The first grandmaster device 2A and the second grandmaster device 2B are examples of a plurality of master devices. The IP network is an example of a communication path.
[0013] The first grandmaster device 2A and the first communication device 3A, and the second grandmaster device 2B and the second communication device 3B are physically independent of each other. That is, the first communication device 3A is connected to the first grandmaster device 2A, but the second communication device 3B is not connected. Similarly, the second communication device 3B is connected to the second grandmaster device 2B, but the first communication device 3A is not connected. As a result, the packet path to the slave device 4 is duplicated, and the reliability can be improved.
[0014] When collectively referring to the first grand master device 2A and the second grand master device 2B, they are hereinafter also referred to as the "grand master device 2" or "master". Also, when collectively referring to the first communication device 3A and the second communication device 3B, they are hereinafter also referred to as the "communication device 3", "slave", or "master". Further, a plurality of second grand master devices 2B may be provided, with a second communication device 3B connected to each of them, and each second grand master device 2B and the second communication device 3B may be physically independent of each other. Also, in the same figure, a plurality of slave devices 4 are shown, but there may also be only one.
[0015] The first grand master device 2A and the second grand master device 2B periodically (e.g., 8 times per second) generate PTP packets including a grand master clock (hereinafter also referred to as GM clock), which is the reference time for the entire IP network, and transmit them to the corresponding first communication device 3A or second communication device 3B. Note that the grand master device 2 may be a server device that has the function of a grand master and transmits packets such as video and audio.
[0016] (Schematic configuration of the communication device) The communication device 3 functions as a boundary clock device that operates in PTP time synchronization with respect to the GM clock of the grand master device 2. Also, the communication device 3 has functions such as a time synchronization function, a BMCA (Best Master Clock Algorithm) function, and a self-running function. These functions will be described later. Such a communication device 3 can be configured using, for example, a switching hub such as an L2 switch compliant with PTP, a router, a gateway, an IEEE1588 BC (Boundary Clock), an optical switch, or the like.
[0017] (Time synchronization function) The communication device 3 has a time synchronization function that corrects its own time so as to synchronize its own time with the reference time. With this time synchronization function, the grandmaster device 2 serves as the master and the communication device 3 serves as the slave, and PTP packets including various messages (Announce message, Sync message, Follow_Up message, Delay_Request message, Delay_Response message) are transmitted and received between the master and the slave, and correction information (for example, offset time Toff) for correcting its own time is calculated from the transmission time and reception time of the PTP packet, and its own time is corrected so as to be synchronized with the reference time based on the offset time Toff.
[0018] (BMCA function) When the first grandmaster device 2A and the second grandmaster device 2B are operating normally, the communication device 3 synchronizes with the reference time with the highest priority among the first grandmaster device 2A and the second grandmaster device 2B by the BMCA function.
[0019] When a failure occurs in one of the first grandmaster device 2A and the second grandmaster device 2B by this BMCA function, the communication device 3 synchronizes with the reference time of the other party without a failure. Note that the communication device 3 may synchronize with the reference time with the highest accuracy among the first grandmaster device 2A and the second grandmaster device 2B.
[0020] (Self-running function) When failures occur in both the first grandmaster device 2A and the second grandmaster device 2B, the communication device 3 generates a PTP packet including its own time in the self-running mode by the self-running function and transmits the PTP packet to other communication devices 3 as well.
[0021] For this reason, the first communication device 3A and the second communication device 3B will receive PTP packets from each other. In this case, after performing its own time synchronization process based on the PTP packet generated by itself, when the PTP packet returns to itself again via another communication device 3, if the time synchronization process is performed again based on the PTP packet that has returned to itself, inaccurate time synchronization processing will be performed due to the time delay since the time synchronization process was already performed, resulting in unstable time synchronization and a decrease in the accuracy of time synchronization. To avoid such a decrease in the accuracy of time synchronization, the communication device 3 according to the present embodiment invalidates the PTP packet when it receives the PTP packet generated by itself from another communication device 3. Details of this function will be described later.
[0022] (Configuration of Slave Device) The slave device 4 functions as an ordinary clock device that operates in PTP time synchronization with respect to the GM clock. The slave device 4 includes a time synchronization processing unit 41 that performs a time synchronization process in the same manner as the communication device 3, and a timing unit 42. The timing unit 42 measures the clock signal from a time source (for example, a transmitter, a vibrator, etc.) not shown and outputs the time of the slave device 4.
[0023] When the slave device 4 performs a time synchronization process, as the master is the communication device 3 and the slave is the slave device 4, PTP packets including the various messages described above are transmitted and received between the master and the slave, and its own time is corrected to be synchronized with the reference time. In the present embodiment, when the communication device 3 generates a PTP packet, its own time is corrected to be synchronized with the time of the communication device 3.
[0024] (Specific Configuration of Communication Device) The first communication device 3A includes a transmission / reception processing unit 30A, a time synchronization processing unit 31A, and a timing unit 32A. Similarly, the second communication device 3B includes a transmission / reception processing unit 30B, a time synchronization processing unit 31B, and a timing unit 32B. When collectively referring to the transmission / reception processing unit 30A and the transmission / reception processing unit 30B, it is also referred to as the "transmission / reception processing unit 30" hereinafter. Also, when collectively referring to the timing unit 32A and the timing unit 32B, it is also referred to as the "timing unit 32" hereinafter.
[0025] (Configuration of the Transmission Path of the Transmission / Reception Processing Unit) The transmission / reception processing unit 30A of the first communication device 3A includes a port S1 for the first grandmaster device 2A, a port Pa3 for transmitting to the second communication device 3B, a port Pa4 for receiving from the second communication device 3B, a plurality of ports Ma for each slave device 4, a port Pa1 for transmitting to the time synchronization processing unit 31A, and a port Pa2 for receiving from the time synchronization processing unit 31.
[0026] In the transmission / reception processing unit 30A, the port S1 and the port Pa1 are connected by a first transmission path Ra1, the port Pa2 and the port Pa3 are connected by a second transmission path Ra2, the port Pa1 and the port Pa4 are connected by a third transmission path Ra3, and the port Pa2 and the port Ma are connected by a fourth transmission path Ra4. Note that each of the transmission paths Ra1 to Ra4 in FIG. 1 does not indicate an actual path but is conceptually shown.
[0027] The transmission / reception processing unit 30B of the second communication device 3B, similar to the transmission / reception processing unit 30A of the first communication device 3A, includes a port S2 for the second grandmaster device 2B, a port Pb3 for transmitting to the first communication device 3A, a port Pb4 for receiving from the second communication device 3B, a plurality of ports Mb for each slave device 4, a port Pb1 for transmitting to the time synchronization processing unit 31B, and a port Pb2 for receiving from the time synchronization processing unit 31B.
[0028] In the transmission / reception processing unit 30B, similar to the transmission / reception processing unit 30A of the first communication device 3A, the port S2 and the port Pb1 are connected by the first transmission line Rb1, the port Pb2 and the port Pb3 are connected by the second transmission line Rb2, the port Pb1 and the port Pb4 are connected by the third transmission line Rb3, and the port Pb2 and the port Mb are connected by the fourth transmission line Rb4. Note that each of the transmission lines Rb1 to Rb4 in FIG. 1 does not indicate an actual path but conceptually shows it.
[0029] (Configuration of Time Synchronization Processing Unit) The time synchronization processing unit 31 transmits and receives PTP packets to and from the grandmaster device 2, and based on the offset time Toff calculated by the following formula (1) in the communication path of the IP network, periodically (for example, 8 times / second) performs time synchronization processing to correct the time of the communication device 3, that is, the time source of the timing unit 32, to be synchronized with the reference time of the grandmaster device 2.
[0030] In addition, the time synchronization processing unit 31 includes a storage unit 311 that stores information obtained by correcting its own time source based on the reference time as history information, and stores the transmission time and reception time of PTP packets. When the packet generation unit 303 described later generates a PTP packet in the self-running mode, the time synchronization processing unit 31 may extract the correction trend (for example, the slope of the correction value) from the history information stored in the storage unit 311 and correct its own time source in consideration of the correction trend.
[0031] The timing unit 32 measures a clock signal from a time source (for example, a transmitter, an oscillator, etc.) not shown in the figure and outputs it as the time of the communication device 3 to the time synchronization processing unit 31.
[0032] (Configuration of Transmission / Reception Processing Unit) FIG. 2 is a block diagram showing an example of the configuration of the transmission / reception processing unit 30. The transmission / reception processing unit 30 includes a packet transmission / reception unit 301, a failure detection unit 302, and a packet generation unit 303.
[0033] (Configuration of Packet Transmission / Reception Unit) The packet transceiver unit 301 transmits and receives PTP packets to and from the corresponding grandmaster device 2, other communication devices 3, and slave devices 4. Further, the packet transceiver unit 301 notifies the time synchronization processing unit 31 of receiving a PTP packet transmitted from the grandmaster device 2 or the slave device 4 and transmitting a PTP packet to the grandmaster device 2 or the slave device 4. The time synchronization processing unit 31 stores the reception time and the transmission time in the storage unit 311 upon receiving the notification from the packet transceiver unit 301. The reception time and the transmission time are an example of time information.
[0034] All PTP packets propagating Ethernet (registered trademark) that constitutes an IP network are provided with an Ether header including a destination MAC address and a source MAC address. The packet transceiver unit 301 may identify the destination and the source of the PTP packet based on the destination MAC address and the source MAC address of the Ether header.
[0035] Among the PTP packets transmitted from the first grandmaster device 2A and the second grandmaster device 2B, the packet transceiver unit 301 acquires the value recorded in the "grandmastePriority1" area from an Announce message or the like described later, and preferentially handles the PTP packet with the highest priority based on the value.
[0036] Note that the packet transceiver unit 301 may acquire parameters regarding the accuracy of time recorded in each area such as "grandmastePriority1", "grandmasterClockQuality", and "grandmasterPriority2" from an Announce message or the like described later, and preferentially handle the PTP packet with higher time accuracy based on the acquired parameters.
[0037] (Configuration of the failure detection unit) The failure detection unit 302 detects failures of the corresponding grandmaster device 2 and other grandmaster devices 2. Specifically, for example, the failure detection unit 302 may detect that a failure has occurred in the corresponding grandmaster device 2 because it has not received PTP packets from the corresponding grandmaster device 2 for a predetermined time (for example, 100 milliseconds).
[0038] In addition, for example, the failure detection unit 302 may detect that a failure has occurred in the other grandmaster device 2 because it has not received PTP packets from the other grandmaster device 2 from the other communication device 3 for a predetermined time (for example, 100 milliseconds). At this time, the failure detection unit 302 may identify the first grandmaster device 2A and the second grandmaster device 2B that are the transmission sources of the PTP packets based on the source MAC address included in the Ether header of the PTP packets. Here, "failure" includes failures of the grandmaster device 2 itself and failures of the communication path from the grandmaster device 2 to the communication device 3. Note that it may also be determined that a failure has occurred in the grandmaster device 2 when reliable PTP packets cannot be received for a predetermined time. The reliability may be determined based on parameters related to the accuracy of time.
[0039] (Configuration of Packet Generation Unit) When the failure detection unit 302 detects failures of the first grandmaster device 2A and the second grandmaster device 2B simultaneously, the packet generation unit 303 generates PTP packets including its own time in the self-running mode, transmits the PTP packets to the time synchronization processing unit 31, and controls the packet transceiver unit 301 to transmit and receive packets with the other communication device 3 and the slave device 4. Here, "simultaneously" means not only exactly the same timing but also a period that is regarded as approximately the same timing (for example, a deviation of about several milliseconds).
[0040] In addition, the packet generation unit 303 controls to invalidate the PTP packets generated by itself among the PTP packets received from another communication device 3. Here, "invalidate" includes processes such as the packet transmission / reception unit 301 discarding the PTP packets generated by itself, and the time synchronization processing unit 31 not performing time synchronization processing based on the PTP packets.
[0041] Note that the transmission / reception processing unit 30 and the time synchronization processing unit 31 may be configured by hardware such as an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit). Also, the functions of the transmission / reception processing unit 30 and the time synchronization processing unit 31 may be realized by storing a program in a memory such as a ROM (Read Only Memory), reading the program into a RAM (Random Access Memory), and having a CPU (Central Processing Unit) execute it.
[0042] (Configuration of Announce Message) FIG. 3(a) is a diagram showing an example of the format of an Announce message, and FIG. 3(b) is a diagram showing an example of the format of its "Header". First, the master transmits a PTP packet including this Announce message to the slave. The master notifies various attribute information related to time synchronization by the Announce message. The attribute information includes, for example, priority, parameters related to time accuracy, the port number of the port through which the PTP packet is transmitted, and the like.
[0043] The Announce message is defined in the IEEE1588v2 standard. As shown in Fig. 3(a), it has areas of "header", "originTimestamp", "currentUtcOffset", "reserved", "grandmastePriority1", "grandmasterClockQuality", "grandmasterPriority2", "grandmasterIdentity", "stepsRemoved", and "timeSource".
[0044] In the area of "grandmastePriority1", a value indicating the priority is recorded, and the smaller the value, the higher the priority. In this embodiment, in the area of "grandmastePriority1" of the Announce message transmitted by the first grandmaster device 2A, a value lower than that in the area of "grandmastePriority1" of the Announce message transmitted by the second grandmaster device 2B is recorded.
[0045] As shown in Fig. 3(b), the "Header" area of the Announce message has areas of "messageType+transportSpecific", "messageLength+reserved", "domainNumber", "reserved", "flagField", "connectionField", "Reserved", "sourcePortIdentify", "sequenceId", "controlField", and "logMessageInterval".
[0046] The type of the message is recorded in "messageType". In the area of "sourcePortIdentify", a value combining an 8-byte field containing the IEEE EUI-64 extended unique identifier created by inserting 0xfffe into the source MAC address and a 2-byte port number is recorded.
[0047] In this embodiment, in the "sourcePortIdentify" area of the PTP packet including the Announce message generated by the first communication device 3A, the port number assigned to the port Pa3 that transmits the PTP packet to the second communication device 3B is recorded. In the "sourcePortIdentify" area of the PTP packet including the Announce message generated by the second communication device 3B, the port number assigned to the port Pb3 that transmits the PTP packet to the first communication device 3A is recorded. Based on this port number, the packet transmission / reception unit 301 can identify whether the PTP packet received from another communication device 3 is the PTP packet generated by itself. Note that the same applies to PTP packets including other messages such as Sync messages regarding the port number recorded in the "sourcePortIdentify" area. The port number is an example of the identification information of the PTP packet. The identification information of the PTP packet is not limited to the port number, and other information (for example, MAC address, IP address, etc.) may also be used. Further, a priority order may be set among the PTP packets generated by the communication device 3.
[0048] (Configuration of Sync Message) FIG. 4(a) is a diagram showing an example of the format of a Sync message, and FIG. 4(b) is a diagram showing an example of the format of its "Header". The Sync message is defined in the IEEE1588v2 standard. As shown in FIG. 4(a), it has regions for "header" and "originTimestamp". Since the format of the "header" of the Sync message and other messages is the same as that in FIG. 3(b), its description is omitted. The Follow_Up message and Delay_Response message after the Sync message of other messages also have a region for "originTimestamp". In the region for "originTimestamp" of the Follow_Up message, the transmission time when the master sends a Sync message to the slave is recorded. In the region for "originTimestamp" of the Delay_Response message, the reception time when the master receives a Delay_Request message from the slave is recorded.
[0049] (Communication based on PTP) FIG. 5 is a sequence diagram showing an example of communication based on PTP. The figure shows the case where the grandmaster device 2 is the master and the communication device 3 is the slave, but the same flow also applies when the communication device 3 is the master and the slave device 4 is the slave. An Announce message, a Sync message, a Follow_Up message, a Delay_Request message, and a Delay_Response message are transmitted and received between the master and the slave.
[0050] As shown in FIG. 5, after the grandmaster device 2 transmits a PTP packet including the Announce message shown in FIG. 3 to the communication device 3, the grandmaster device 2 transmits a PTP packet including the Sync message shown in FIG. 4 to the communication device 3. At this time, the grandmaster device 2 stores the transmission time t1 when the PTP packet including the Sync message is transmitted. When the communication device 3 receives a PTP packet including the Sync message by the transmission / reception processing unit 30, the time synchronization processing unit 31 of the communication device 3 acquires the reception time t2 when the Sync message is received from the timing unit 32A and stores it in the storage unit 311.
[0051] Next, the grandmaster device 2 transmits a PTP packet including the Follow_Up message in which the above transmission time t1 is recorded to the communication device 3. When the communication device 3 receives a PTP packet including the Follow_Up message by the transmission / reception processing unit 30, the time synchronization processing unit 31 of the communication device 3 acquires the transmission time t1 from the Follow_Up message and stores it in the storage unit 311.
[0052] Next, the communication device 3 transmits a PTP packet including the Delay_Request message to the grandmaster device 2. At this time, the time synchronization processing unit 31 of the communication device 3 stores the transmission time t3 when the PTP packet including the Delay_Request message is transmitted in the storage unit 311. When the grandmaster device 2 receives a PTP packet including the Delay_Request message, the grandmaster device 2 stores the reception time t4.
[0053] Next, the grandmaster device 2 transmits a PTP packet including the Delay_Response message in which the above reception time t4 is recorded to the communication device 3. When the communication device 3 receives a PTP packet including the Delay_Response message by the transmission / reception processing unit 30, the time synchronization processing unit 31 of the communication device 3 Received acquires the transmission time t4 from the Delay_Response message and stores it in the storage unit 311.
[0054] Then, based on the times t1 to t4 stored in the storage unit 311, the time synchronization processing unit 31 calculates the offset time Toff by the following formula (1). Toff=(Dms+Dsm) / 2 ={(t2-t1)+(t4-t3)} / 2 ···(1)
[0055] Based on the offset time Toff calculated from the above formula (1), the time synchronization processing unit 31 corrects the time source of the timer unit 32. As a result, the time of the communication device 3 is corrected to match the time of the grandmaster device 2, and time synchronization is established between the grandmaster device 2 and the communication device 3.
[0056] (Operation of this embodiment) Next, an example of the operation of the communication system 1 according to this embodiment will be described with reference to FIGS. 6 to 8.
[0057] (1) When the first grandmaster device and the second grandmaster device are normal An example of the operation of the communication system 1 when the first grandmaster device 2A and the second grandmaster device 2B are normal will be described with reference to FIG. 6. In FIG. 6, the arrow with a thick line indicates the flow of the PTP packet generated by the first grandmaster device 2A.
[0058] The first grandmaster device 2A transmits a PTP packet including the GM clock from port M1 to port S1 of the first communication device 3A, and the second grandmaster device 2B transmits a PTP packet including the GM clock from port M2 to port S2 of the second communication device 3B.
[0059] Since the PTP packet of the first grandmaster device 2A is set to have a higher priority than the PTP packet of the second grandmaster device 2B, the first communication device 3A transmits the received PTP packet from the first grandmaster device 2A to the second communication device 3B, but the second communication device 3B does not transmit the received PTP packet from the second grandmaster device 2B to the first communication device 3A.
[0060] Specifically, the PTP packet transmitted from the first grandmaster device 2A and received at port S1 of the first communication device 3A reaches port Pa4 of the first communication device 3A via Ra1, Pa1, P11, P12, Pa2, Ra2, Pa3, and then further via Pa4, Rb3, Pb1, P21, P22, Pb2, Rb2, Pb3 of the second communication device 3B.
[0061] While the PTP packet transmitted from the first grandmaster device 2A passes through the time synchronization processing units 31A and 31B of the communication device 3, the offset time Toff is calculated by the time synchronization processing unit 31 of the communication device 3, and time synchronization processing is performed to correct the time sources of the own timing units 32A and 32B so that the clocks of the communication device 3 are synchronized with the reference time of the first grandmaster device 2A.
[0062] Also, the PTP packet transmitted from port Pa2 of the first communication device 3A and reaching port Ma via the fourth transmission path Ra4 is transmitted to port Sa of each slave device 4 via the IP network. Similarly, the PTP packet transmitted from port Pb2 of the second communication device 3B and reaching port Mb via the fourth transmission path Rb4 is transmitted to port Sb of each slave device 4 via the IP network. PTP packets including the GM clock of the first grandmaster device 2A are transmitted to each slave device 4.
[0063] Thereafter, as shown in FIG. 5, with the first communication device 3A and the second communication device 3B as the master and the slave devices 4 as the slaves, PTP packets including various messages are transmitted and received between them. The time synchronization processing unit 41 of the slave device 4 adopts the PTP packet including the GM clock with the higher priority (for example, a preset MAC address, IP address, etc.), calculates the offset time Toff, and performs time synchronization processing to correct the time source of its own timing unit 42 so that the time of the slave device 4 is synchronized with the time of the communication device 3.
[0064] (2) When a failure occurs in the first grandmaster device Referring to FIG. 7, an example of the operation of the communication system 1 when a failure (communication failure) occurs in the first grandmaster device 2A and the second grandmaster device 2B is operating normally will be described. In FIG. 7, the arrow with a thick line indicates the flow of PTP packets generated by the first grandmaster device 2A.
[0065] Although the PTP packets of the first grandmaster device 2A are set to have a higher priority than the PTP packets of the second grandmaster device 2B, since the first grandmaster device 2A cannot send PTP packets to the first communication device 3A due to a failure, the second communication device 3B sends the PTP packets including the GM clock received from the second grandmaster device 2B to the first communication device 3A.
[0066] Specifically, the PTP packets sent from the second grandmaster device 2B and received at port S2 of the second communication device 3B reach port Pa4 of the first communication device 3A via Rb1, Pb1, P21, P22, Pb2, Rb2, Pb3, which are shown by symbols for the subsequent route.
[0067] While the PTP packets sent from the second grandmaster device 2B pass through the time synchronization processing units 31A and 31B, the offset time Toff is calculated by the time synchronization processing unit 31 of the communication device 3, and time synchronization processing is performed to correct the time sources of the own timing units 32A and 32B so that the clocks of the communication device 3 are synchronized with the reference time of the second grandmaster device 2B.
[0068] Also, the PTP packets sent from port Pb2 of the second communication device 3B and reaching port Mb via the fourth transmission path Rb4 are sent to port Sb of each slave device 4 via the IP network. Similarly, the PTP packets sent from port Pa2 of the first communication device 3A and reaching port Ma via the fourth transmission path Ra4 are sent to port Sa of each slave device 4 via the IP network.
[0069] Thereafter, with the first communication device 3A and the second communication device 3B as the master and the slave device 4 as the slave, as described above, PTP packets including various messages are transmitted and received between the two, and a time synchronization process is performed to correct the time source of its own timing unit 42 so that the time of the slave device 4 is synchronized with the time of the communication device 3.
[0070] (3) When a failure occurs in both the first grandmaster device and the second grandmaster device An example of the operation of the communication system 1 when a failure occurs in both the first grandmaster device 2A and the second grandmaster device 2B will be described with reference to FIG. 8.
[0071] When a failure occurs in the first grandmaster device 2A and the second grandmaster device 2B simultaneously, the first communication device 3A cannot receive a PTP packet from the first grandmaster device 2A for a predetermined time, and the second communication device 3B cannot receive a PTP packet from the second grandmaster device 2B for a predetermined time. Therefore, the failure detection unit 302 of the first communication device 3A detects the failures of the first grandmaster device 2A and the second grandmaster device 2B. Similarly, the failure detection unit 302 of the second communication device 3B detects the failures of the second grandmaster device 2B and the first grandmaster device 2A.
[0072] The packet generation unit 303 of the first communication device 3A generates a PTP packet including its own time in the self-running mode. Subsequently, the packet generation unit 303 transmits the PTP packet to the time synchronization processing unit 31 and controls the packet transceiver 301 to transmit and receive between the second communication device 3B and the slave device 4.
[0073] Similarly, the packet generation unit 303 of the second communication device 3B generates a PTP packet including its own time in the self-running mode. Subsequently, the packet generation unit 303 transmits the PTP packet to the time synchronization processing unit 31 and controls the packet transceiver 301 to transmit and receive between the second communication device 3B and the slave device 4.
[0074] The PTP packets generated by the first communication device 3A and the second communication device 3B are transmitted and received between the first communication device 3A and the second communication device 3B. Since the PTP packets generated by the first communication device 3A are set to have a higher priority than the PTP packets generated by the second communication device 3B, the time synchronization processing units 31 of the first communication device 3A and the second communication device 3B perform time synchronization processing based on the PTP packets generated by the first communication device 3A and correct the time source of the timing unit 32.
[0075] The packet generation unit 303 of the first communication device 3A controls the packet transmission / reception unit 301 to invalidate the PTP packets generated by itself among the PTP packets received from the second communication device 3B. The packet transmission / reception unit 301 of the first communication device 3A invalidates the PTP packets generated by itself among the PTP packets received from the second communication device 3B.
[0076] Thereafter, with the first communication device 3A and the second communication device 3B as the master and the slave device 4 as the slave, as shown in FIG. 5, PTP packets including various messages are transmitted and received between the two. The time synchronization processing unit 41 of the slave device 4 calculates the offset time Toff based on the PTP packet including the time of the first communication device 3A with the higher priority, and performs time synchronization processing to correct the time source of its own timing unit 42 so that the time of the slave device 4 is synchronized with the time of the first communication device 3A.
[0077] (Effect of this embodiment) According to the communication system 1 according to this embodiment, the following effects can be obtained. (a) Even when the first grandmaster device 2A and the second grandmaster device 2B both fail at the same time, since the first communication device 3A and the second communication device 3B generate PTP packets in the self-running mode, communication can be performed with time synchronization for the slave device 4. (b) When the first communication device 3A and the second communication device 3B each generate PTP packets in the self-running mode, the operation between the communication devices 3A and 3B may become unstable and the accuracy of time synchronization may decrease. However, in the present embodiment, when generating PTP packets in the self-running mode, if the PTP packets generated by itself are transmitted from another communication device 3, the PTP packets are made invalid, so that a decrease in the accuracy of time synchronization can be avoided. (c) Since the communication devices 3A and 3B transmit and receive PTP packets instead of transmitting and receiving clocks, information such as the priority of the PTP packets generated by the communication devices 3A and 3B can be notified.
[0078] As described above, the embodiments of the present invention have been described. However, the embodiments of the present invention are not limited to the above embodiments, and various modifications and implementations are possible.
Description of Reference Numerals
[0079] 1... Communication system, 2... Grandmaster device, 2A... First grandmaster device, 2B... Second grandmaster device, 3... Communication device, 3A... First communication device, 3B... Second communication device, 4... Slave device, 30, 30A, 30B... Transmission / reception processing unit, 31, 31A, 31B... Time synchronization processing unit, 32, 32A, 32B... Timing unit, 41... Time synchronization processing unit, 42... Timing unit, 301... Packet transmission / reception unit, 302... Failure detection unit, 303... Packet generation unit, 311... Storage unit, M1, M2, Ma, Mb, Pa1~Pa4, Pb1~Pb4, S1, S2, Sa, Sb... Ports, Ra1~Ra4, Rb1~Rb4... Transmission lines
Claims
1. A communication device provided corresponding to one of a plurality of master devices that transmit time synchronization packets including a reference time, and commonly connected to other communication devices provided corresponding to the other master devices, wherein a slave device is connected between the communication device and the other communication devices. The communication device includes: a packet transceiver that transmits and receives the time synchronization packets to and from the corresponding master device, the other communication devices, and the slave device; a time synchronization processing unit that corrects its own time so as to synchronize with the reference time included in the time synchronization packet transmitted from the master device; a failure detection unit that detects failures of the corresponding master device and the other master devices; a packet generation unit that, when the failure detection unit simultaneously detects failures of the corresponding master device and the other master devices, generates a time synchronization packet including its own time in a self-running mode, and controls the packet transceiver to transmit and receive the time synchronization packet to and from the other communication devices and the slave device; A communication device comprising the above components.
2. The packet generation unit controls to invalidate the time synchronization packet generated by itself among the time synchronization packets received from the other communication devices. The communication device according to Claim 1. The communication device according to Claim 1.
3. The packet generation unit attaches identification information for identifying itself to the time synchronization packet generated by itself, and controls to invalidate the time synchronization packet generated by itself based on the identification information. The communication device according to Claim 2. The communication device according to Claim 2.
4. The identification information is a port number of a port for transmitting the time synchronization packet to the other communication devices. The communication device according to Claim 3. The communication device according to Claim 3.
5. A priority is defined between the time synchronization packet generated by the packet generation unit and the time synchronization packet generated by the packet generation unit of the other communication devices. The time synchronization processing unit performs time synchronization processing based on the time synchronization packet according to the priority. The communication device according to any one of Claims 1 to 4. The time synchronization processing unit performs time synchronization processing based on the time synchronization packet according to the priority. The communication device according to any one of Claims 1 to 4. The communication device according to any one of Claims 1 to 4.
6. The time synchronization processing unit includes a storage unit that stores history information of correcting its own time based on the reference time. When the packet generation unit generates the time synchronization packet in the self-running mode, the time synchronization processing unit extracts a correction trend from the history information and corrects its own time so as to reflect the correction trend. The communication device according to Claim 1. The communication device according to Claim 1.
7. A plurality of master devices that transmit time synchronization packets including a reference time, A communication system having a plurality of communication devices provided corresponding to each of the plurality of master devices and commonly connected to slave devices, Each of the plurality of communication devices, A packet transceiver that transmits and receives the time synchronization packet to and from the corresponding master device, other communication devices, and the slave device, A time synchronization processing unit that corrects its own time so as to synchronize with the reference time included in the time synchronization packet transmitted from the master device, A failure detection unit that detects failures of the corresponding master device and other master devices, When the failure detection unit simultaneously detects failures of the corresponding master device and the other master devices, a packet generation unit that generates a time synchronization packet including its own time in a self-running mode and controls the packet transceiver to transmit and receive the time synchronization packet to and from the other communication devices and the slave device, A communication system comprising the same.
Citation Information
Patent Citations
Time synchronization device via network
JP2012023654A
Communication control device and communication system
JP2014183386A
Time synchronization device, backup device therefor and time synchronization system
JP2015179999A
Communication device and program
JP2021087027A
JPP7325657B