Communication device and communication system
The communication device and system address the issue of simultaneous grandmaster failures by generating self-running time synchronization packets and prioritizing them, ensuring reliable time synchronization with slaves.
Patent Information
- Application Number
- JP2023109591
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2025-01-17
- 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 and system that includes a failure detection unit to identify simultaneous failures in multiple grandmasters, generating a time synchronization packet in a self-running mode, and prioritizing its own time synchronization packets to ensure communication with slaves.
Ensures reliable time synchronization with slaves even when multiple grandmasters fail, maintaining accuracy by invalidating self-generated packets and prioritizing others.
Smart Images

Figure 2025007883000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a communication device and a communication system. [Background technology]
[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 in which a grandmaster that operates stably is selected from the multiple grandmasters and communication is performed using time synchronization based on PTP (Precision Time Protocol), a highly accurate time synchronization method (for example, see Patent Document 1).
[0003] The synchronous communication system described in Patent Document 1 is a synchronous communication system that uses an IP network equipped with multiple grandmasters that generate a GM clock synchronized with GPS time, and is equipped with multiple communication devices that select a grandmaster that operates stably from the multiple grandmasters and communicate with time synchronization based on PTP, and each of the multiple communication devices is equipped with a PTP message transmission / reception unit that acquires PTP messages from multiple other communication devices with which communication has been established, a grandmaster candidate selection unit that extracts parameters for selecting one from the multiple grandmaster candidates based on the acquired PTP messages, and a grandmaster selection unit that selects one grandmaster based on the parameters in accordance with an algorithm that is an improvement of the BMCA (Best Master Clock Algorithm) defined in the standard IEEE1588 v2. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent Publication No. 2021-87027 Summary of the Invention [Problem to be solved by the invention]
[0005] It is rare for multiple grandmasters in an IP network to fail at the same time. In such a case, however, conventional communication devices are unable to communicate with slaves in a time-synchronized manner.
[0006] An object of the present invention is to provide a communication device and a communication system that can communicate with a slave in a time-synchronized manner even if multiple grandmasters experience failures at the same time. [Means for solving the problem]
[0007] [1] A communication device that is provided corresponding to one of a plurality of master devices that transmit a time synchronization packet including a reference time, and has a slave device commonly connected to other communication devices provided corresponding to the other master devices, a packet transmission / reception unit 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 for detecting failures in the corresponding master device and the other master devices; a packet generating unit that, when the failure detection unit detects failures in the corresponding master device and the other master device at the same time, generates a time synchronization packet including its own time in a self-running mode, and controls the packet transmitting / receiving unit to transmit and receive the time synchronization packet to and from the other communication device and the slave device. [2] The communication device described in [1], wherein the packet generation unit controls the time synchronization packets received from the other communication device to invalidate the time synchronization packets generated by the packet generation unit itself. [3] The communication device described in [2], wherein the packet generation unit assigns identification information that identifies the unit to the time synchronization packet generated by the unit, and controls the time synchronization packet generated by the unit to be invalid based on the identification information. [4] The communication device according to [3], wherein the identification information is a port number of a port that transmits the time synchronization packet to the other communication device. [5] A priority order is set for the time synchronization packet generated by the packet generation unit among time synchronization packets generated by packet generation units of other communication devices, The communication device according to any one of [1] to [4], wherein the time synchronization processing unit performs time synchronization processing based on the time synchronization packets in accordance with the priority order. [6] The communication device described in [1], wherein the time synchronization processing unit includes a memory unit that stores history information in which the own time has been corrected based on the reference time, and when the packet generating unit generates the time synchronization packet in self-running mode, the time synchronization processing unit extracts a correction tendency from the history information and corrects the own time taking into account the correction tendency. [7] A plurality of master devices that transmit time synchronization packets including a reference time; a plurality of communication devices provided corresponding to the plurality of master devices, the communication devices being commonly connected to the plurality of slave devices, Each of the plurality of communication devices a packet transmission / reception unit that transmits and receives the time synchronization packet 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 in the corresponding master device and other master devices; and a packet generating unit that, when the failure detection unit detects failures in the corresponding master device and the other master device at the same time, generates a time synchronization packet including its own time in a self-running mode, and controls the packet transmitting / receiving unit to transmit and receive the time synchronization packet to and from the other communication device and the slave device. Effect of the Invention
[0008] According to the invention as set forth in claims 1 and 7, even if multiple grandmasters experience failures at the same time, communication with slaves can be performed in a time-synchronized manner. According to the inventions of claims 2 to 4, when a time synchronization packet generated by the device returns to the device via another communication device, it is possible to avoid inaccurate time synchronization based on the device's own time synchronization packet. According to the invention as defined in claim 5, highly reliable time synchronization processing can be performed. According to the invention as defined in claim 6, highly accurate time synchronization processing can be performed. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a block diagram showing an example of a configuration of a communication system according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a block diagram illustrating an example of the configuration of the transmission and reception processing unit. [Diagram 3] 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 the Header thereof. [Figure 4] 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 the Header thereof. [Diagram 5] FIG. 5 is a sequence diagram showing an example of communication based on PTP. [Figure 6] FIG. 6 is a diagram for explaining an example of the operation of the communication system when the first grandmaster device and the second grandmaster device are normal. [Figure 7] FIG. 7 is a diagram for explaining an example of the operation of the communication system when a failure occurs in the first grandmaster device. [Figure 8] FIG. 8 is a diagram for explaining an example of the operation of the communication system when failures occur in both the first grandmaster device and the second grandmaster device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. In each drawing, components having substantially the same functions are designated by the same reference numerals, and duplicated explanations will be omitted.
[0011] [Embodiment Mode] 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 apparatus 2A and a second grandmaster apparatus 2B that transmit PTP packets including a reference time, a first communication device 3A connected to the first grandmaster apparatus 2A, a second communication device 3B connected to the second grandmaster apparatus 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 apparatus 2A is set to have a higher priority than the second grandmaster apparatus 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 multiple slave devices 4 are communicatively connected via 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 an example of multiple master devices. The IP network is an example of a communication path.
[0013] The first grandmaster apparatus 2A and the first communication device 3A, and the second grandmaster apparatus 2B and the second communication device 3B are physically independent from each other. That is, the first communication device 3A is connected to the first grandmaster apparatus 2A, but the second communication device 3B is not connected. Similarly, the second communication device 3B is connected to the second grandmaster apparatus 2B, but the first communication device 3A is not connected. This makes it possible to duplicate the path of packets leading to the slave device 4, thereby improving reliability.
[0014] In addition, when the first grandmaster device 2A and the second grandmaster device 2B are collectively referred to, they are also referred to as "grandmaster device 2" or "master" below. When the first communication device 3A and the second communication device 3B are collectively referred to, they are also referred to as "communication device 3", "slave" or "master" below. In addition, there may be a plurality of second grandmaster devices 2B, each of which is connected to a second communication device 3B, and each of the second grandmaster devices 2B and second communication devices 3B may be configured to be physically independent from each other. In addition, although there are a plurality of slave devices 4 in the figure, there may be only one.
[0015] The first grandmaster device 2A and the second grandmaster device 2B periodically (e.g., 8 times per second) generate PTP packets including a grandmaster clock (hereinafter also referred to as a GM clock) that serves as the reference time for the entire IP network, and transmit the PTP packets to the corresponding first communication device 3A or second communication device 3B. The grandmaster device 2 may be a server device that has the function of a grandmaster and transmits packets of video, audio, etc.
[0016] (General configuration of communication device) The communication device 3 functions as a boundary clock device that operates in time synchronization with the GM clock of the grandmaster device 2 according to PTP. The communication device 3 also has a time synchronization function, a BMCA (Best Master Clock Algorithm) function, a self-operating function, and the like. These functions will be described later. Such a communication device 3 can be configured using, for example, a switching hub such as a PTP-compliant L2 switch, a router, a gateway, an IEEE1588 BC (Boundary Clock), an optical switch, and the like.
[0017] (Time synchronization function) The communication device 3 has a time synchronization function that corrects its own time so that it is synchronized with the reference time. With this time synchronization function, the grandmaster device 2 acts as the master and the communication device 3 acts as the slave, and transmits and receives PTP packets including various messages (Announce message, Sync message, Follow_Up message, Delay_Request message, Delay_Response message) between the master and the slave, calculates correction information (for example, offset time Toff) for correcting its own time from the transmission time and reception time of the PTP packet, and corrects its own time so as to synchronize 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 of the first grandmaster device 2A or the second grandmaster device 2B having the highest priority through the BMCA function.
[0019] When a failure occurs in one of the first grandmaster device 2A and the second grandmaster device 2B due to this BMCA function, the communication device 3 synchronizes with the reference time of the other device where no failure occurs. Note that the communication device 3 may synchronize with the most accurate reference time of the first grandmaster device 2A and the second grandmaster device 2B.
[0020] (Self-propelled 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 a self-running mode using the self-running function, and transmits the PTP packet to other communication devices 3.
[0021] Therefore, the first communication device 3A and the second communication device 3B receive PTP packets from each other. In this case, if the first communication device 3A performs its own time synchronization process based on the PTP packet it generated, and the PTP packet returns to the first communication device 3 via another communication device 3, and the time synchronization process is performed again based on the PTP packet that returned to the first communication device 3, the time synchronization process will be inaccurate due to the time delay from the time when the time synchronization process was already performed, and the time synchronization will become unstable and the accuracy of the time synchronization will decrease. In order to avoid such a decrease in the accuracy of the time synchronization, the communication device 3 according to this embodiment is configured to invalidate the PTP packet when it receives the PTP packet it generated from another communication device 3. Details of this function will be described later.
[0022] (Slave Device Configuration) The slave device 4 functions as an ordinary clock device that operates in PTP time synchronization with the GM clock. The slave device 4 includes a time synchronization processing unit 41 that performs time synchronization processing in the same manner as the communication device 3, and a clock unit 42. The clock unit 42 measures a clock signal from a time source (e.g., an oscillator, an oscillator, etc.) not shown in the figure, and outputs the time of the slave device 4.
[0023] When the slave device 4 performs time synchronization processing, the communication device 3 acts as the master and the slave device 4 acts as the slave, transmitting and receiving PTP packets including the various messages described above between the master and the slave, and correcting its own time to synchronize with the reference time. In this embodiment, when the communication device 3 generates a PTP packet, it corrects its own time to synchronize 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 clock unit 32A. Similarly, the second communication device 3B includes a transmission / reception processing unit 30B, a time synchronization processing unit 31B, and a clock unit 32B. Note that, when the transmission / reception processing unit 30A and the transmission / reception processing unit 30B are collectively referred to as the "transmission / reception processing unit 30", hereinafter. When the clock unit 32A and the clock unit 32B are collectively referred to as the "clock unit 32", hereinafter.
[0025] (Configuration of transmission path of 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 transmission to the second communication device 3B, a port Pa4 for reception from the second communication device 3B, a plurality of ports Ma for each slave device 4, a port Pa1 for transmission to the time synchronization processing unit 31A, and a port Pa2 for reception from the time synchronization processing unit 31.
[0026] In the transmission / reception processing unit 30A, port S1 and port Pa1 are connected by a first transmission path Ra1, port Pa2 and port Pa3 are connected by a second transmission path Ra2, port Pa1 and port Pa4 are connected by a third transmission path Ra3, and port Pa2 and port Ma are connected by a fourth transmission path Ra4. Note that the transmission paths Ra1 to Ra4 in FIG. 1 are not shown as actual paths but are shown conceptually.
[0027] The transmission / reception processing unit 30B of the second communication device 3B, like the transmission / reception processing unit 30A of the first communication device 3A, has a port S2 for the second grandmaster device 2B, a port Pb3 for transmission to the first communication device 3A, a port Pb4 for reception from the second communication device 3B, a plurality of ports Mb for each slave device 4, a port Pb1 for transmission to the time synchronization processing unit 31B, and a port Pb2 for reception from the time synchronization processing unit 31B.
[0028] In the transmission / reception processing unit 30B, similarly to the transmission / reception processing unit 30A of the first communication device 3A, port S2 and port Pb1 are connected by a first transmission path Rb1, port Pb2 and port Pb3 are connected by a second transmission path Rb2, port Pb1 and port Pb4 are connected by a third transmission path Rb3, and port Pb2 and port Mb are connected by a fourth transmission path Rb4. Note that the transmission paths Rb1 to Rb4 in FIG. 1 are not shown as actual routes but are shown conceptually.
[0029] (Configuration of the time synchronization processing unit) The time synchronization processing unit 31 transmits and receives PTP packets to and from the grandmaster device 2, and periodically (e.g., 8 times per second) performs time synchronization processing to correct the time of the communication device 3, i.e., the time source of the timing unit 32, to synchronize with the reference time of the grandmaster device 2 based on the offset time Toff calculated by equation (1) described later in the communication path of the IP network.
[0030] The time synchronization processing unit 31 also includes a storage unit 311 that stores information on the correction of its own time source based on the reference time as history information and stores the transmission time and reception time of the PTP packet. When the packet generating unit 303 described later generates a PTP packet in a self-running mode, the time synchronization processing unit 31 may extract a correction tendency (for example, a 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 tendency.
[0031] The timekeeping unit 32 measures a clock signal from a time source (not shown) (for example, an oscillator, an oscillator, etc.) and outputs the signal to the time synchronization processing unit 31 as the time of the communication device 3.
[0032] (Configuration of the transmission and reception processing unit) 2 is a block diagram showing an example of the configuration of the transmission and reception processing unit 30. The transmission and reception processing unit 30 includes a packet transmission and reception unit 301, a failure detection unit 302, and a packet generation unit 303.
[0033] (Configuration of packet transmission / reception unit) The packet transmitting / receiving unit 301 transmits and receives PTP packets to the corresponding grandmaster device 2, other communication devices 3, and slave devices 4. The packet transmitting / receiving unit 301 also notifies the time synchronization processing unit 31 that it has received a PTP packet transmitted from the grandmaster device 2 or the slave device 4, and that it has transmitted a PTP packet to the grandmaster device 2 or the slave device 4. Upon receiving the notification from the packet transmitting / receiving unit 301, the time synchronization processing unit 31 stores the reception time and transmission time in the storage unit 311. The reception time and transmission time are examples of time information.
[0034] An Ether header including a destination MAC address and a source MAC address is added to all PTP packets propagating through Ethernet (registered trademark) constituting an IP network. The packet transmitting / receiving unit 301 may identify the destination and source of the PTP packet based on the destination MAC address and source MAC address of the Ether header.
[0035] The packet transmitting / receiving unit 301 obtains the value recorded in the "grandmasterPriority1" field from an Announce message, etc., described later, among the PTP packets transmitted from the first grandmaster device 2A and the second grandmaster device 2B, and handles the PTP packet with the highest priority based on the value.
[0036] In addition, the packet transmitting / receiving unit 301 may obtain parameters related to the time accuracy recorded in each area such as "grandmasterPriority1", "grandmasterClockQuality", and "grandmasterPriority2" from an Announce message described later, and give priority to the PTP packet with the higher time accuracy based on the obtained parameters.
[0037] (Configuration of the fault detection unit) The failure detection unit 302 detects failures in the corresponding grandmaster apparatus 2 and other grandmaster apparatuses 2. Specifically, the failure detection unit 302 may detect that a failure has occurred in the corresponding grandmaster apparatus 2 by, for example, not receiving a PTP packet from the corresponding grandmaster apparatus 2 for a predetermined time (for example, 100 milliseconds).
[0038] Furthermore, the failure detection unit 302 may detect that a failure has occurred in the other grandmaster apparatus 2 by, for example, not being able to receive a PTP packet from the other grandmaster apparatus 2 for a predetermined time (for example, 100 milliseconds) from the other communication device 3. At this time, the failure detection unit 302 may identify the first grandmaster apparatus 2A and the second grandmaster apparatus 2B that are the senders of the PTP packet by the sender MAC address included in the Ether header of the PTP packet. Here, the "failure" includes a failure in the grandmaster apparatus 2 itself and a failure in the communication path from the grandmaster apparatus 2 to the communication device 3. It may also be determined that a failure has occurred in the grandmaster apparatus 2 when a highly reliable PTP packet cannot be received for a predetermined time. The reliability may be determined by a parameter related to the accuracy of time.
[0039] (Configuration of the packet generator) When the failure detection unit 302 detects failures in the first grandmaster device 2A and the second grandmaster device 2B at the same time, the packet generation unit 303 generates a PTP packet including its own time in a self-running mode, transmits the PTP packet to the time synchronization processing unit 31, and controls the packet transmission / reception unit 301 to transmit and receive the PTP packet to and from other communication devices 3 and slave devices 4. Here, "at the same time" does not only mean exactly the same timing, but also means allowing times that are considered to be almost the same timing (for example, a difference of about several milliseconds).
[0040] The packet generating unit 303 also controls to invalidate the PTP packets it has generated among the PTP packets received from other communication devices 3. Here, "invalidating" includes a process in which the packet transmitting / receiving unit 301 discards the PTP packets it has generated, a process in which the time synchronization processing unit 31 does not perform time synchronization processing based on the PTP packets, and the like.
[0041] The transmission / reception processing unit 30 and the time synchronization processing unit 31 may be configured with hardware such as an FPGA (Field Programmable Gate Array), an ASIC (Application Specific Integrated Circuit), etc. 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 executing the program by a CPU (Central Processing Unit).
[0042] (Composition 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 using the Announce message. The attribute information includes, for example, priority, parameters related to time accuracy, and the port number of the port that transmits the PTP packet.
[0043] The Announce message is defined in the IEEE1588v2 standard, and as shown in FIG. 3(a), has the following fields: “header”, “originTimestamp”, “currentUtcOffset”, “reserved”, “grandmasterPriority1”, “grandmasterClockQuality”, “grandmasterPriority2”, “grandmasterIdentity”, “stepsRemoved”, and “timeSource”.
[0044] In the "grandmasterPriority1" field, a value indicating the priority is recorded, and the smaller the value, the higher the priority. In this embodiment, a value lower than the "grandmasterPriority1" field of the Announce message transmitted by the first grandmaster device 2A is recorded in the "grandmasterPriority1" field of the Announce message transmitted by the second grandmaster device 2B.
[0045] As shown in FIG. 3(b), the “Header” area of the Announce message has the following areas: “messageType+transportSpecific”, “messageLength+reserved”, “domainNumber”, “reserved”, “flagField”, “connectionField”, “Reserved”, “sourcePortIdentify”, “sequenceId”, “controlField”, and “logMessageInterval”.
[0046] The type of message is recorded in "messageType." The "sourcePortIdentify" field records a value that combines an 8-byte field containing an IEEEEUI-64 extended unique identifier created by inserting 0xfffe into the source MAC address and a 2-byte port number.
[0047] In this embodiment, the port number assigned to the port Pa3 for transmitting the PTP packet to the second communication device 3B is recorded in the "sourcePortIdentify" field of the PTP packet including the Announce message generated by the first communication device 3A. The port number assigned to the port Pb3 for transmitting the PTP packet to the first communication device 3A is recorded in the "sourcePortIdentify" field of the PTP packet including the Announce message generated by the second communication device 3B. This port number allows the packet transmitting / receiving unit 301 to identify whether the PTP packet received from another communication device 3 is a PTP packet generated by itself. The port number recorded in the "sourcePortIdentify" field is the same for PTP packets including other messages such as a Sync message. The port number is an example of identification information of the PTP packet. The identification information of the PTP packet is not limited to the port number, and may be other information (for example, a MAC address, an IP address, etc.). In addition, a priority order may be set between the PTP packets generated by the communication device 3.
[0048] (Sync message structure) 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 by the IEEE1588v2 standard, and as shown in FIG. 4(a), it has the fields "header" and "originTimestamp". The format of the "header" of the Sync message and other messages is the same as that of FIG. 3(b), so the description is omitted. The Follow_Up message and the Delay_Response message following the Sync message of other messages also have an "originTimestamp" field. The transmission time when the master transmitted the Sync message to the slave is recorded in the "originTimestamp" field of the Follow_Up message. The reception time when the master received the Delay_Request message from the slave is recorded in the "originTimestamp" field of the Delay_Response message.
[0049] (PTP-based communication) Fig. 5 is a sequence diagram showing an example of communication based on PTP. The diagram shows a case where the grandmaster device 2 is the master and the communication device 3 is the slave, but the flow is similar 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, the grandmaster apparatus 2 transmits a PTP packet including the Announce message shown in Fig. 3 to the communication device 3, and then transmits a PTP packet including the Sync message shown in Fig. 4 to the communication device 3. At this time, the grandmaster apparatus 2 stores the transmission time t1 at which the PTP packet including the Sync message was transmitted. When the transmission / reception processing unit 30 of the communication device 3 receives a PTP packet including the Sync message, the communication device 3 acquires the reception time t2 at which the time synchronization processing unit 31 received the Sync message from the timer unit 32A and stores the reception time t2 in the memory unit 311.
[0051] Next, the grandmaster device 2 transmits a PTP packet including a Follow_Up message in which the above-mentioned transmission time t1 is recorded to the communication device 3. When the transmission / reception processing unit 30 of the communication device 3 receives the PTP packet including the Follow_Up message, the time synchronization processing unit 31 obtains 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 a 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 at which the PTP packet including the Delay_Request message was transmitted in the storage unit 311. When the grandmaster device 2 receives the PTP packet including the Delay_Request message, it stores the reception time t4.
[0053] Next, the grandmaster device 2 transmits a PTP packet including a Delay_Response message in which the reception time t4 is recorded to the communication device 3. When the transmission / reception processing unit 30 of the communication device 3 receives the PTP packet including the Delay_Response message, the time synchronization processing unit 31 extracts from the Delay_Response message Receiving The transmission time t4 is acquired and stored in the storage unit 311.
[0054] Then, the time synchronization processing unit 31 calculates the offset time Toff based on the times t1 to t4 stored in the storage unit 311 by the following formula (1). Toff=(Dms+Dsm) / 2 ={(t2-t1)+(t4-t3)} / 2 ···(1)
[0055] The time synchronization processing unit 31 corrects the time source of the clock unit 32 based on the offset time Toff calculated from the above formula (1). 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 the present embodiment will be described with reference to FIGS.
[0057] (1) When the first and second grandmaster devices 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 thick arrows indicate the flow of PTP packets 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 packets of the first grandmaster device 2A are set to a higher priority than the PTP packets of the second grandmaster device 2B, the first communication device 3A transmits the PTP packets received from the first grandmaster device 2A to the second communication device 3B, but the second communication device 3B does not transmit the PTP packets received from the second grandmaster device 2B to the first communication device 3A.
[0060] Specifically, a PTP packet sent from the first grandmaster device 2A and received at port S1 of the first communication device 3A then travels via Ra1, Pa1, P11, P12, Pa2, Ra2, Pa3, and then Pa4, Rb3, Pb1, P21, P22, Pb2, Rb2, Pb3 of the second communication device 3B before arriving at port Pa4 of the first communication device 3A.
[0061] While the PTP packet transmitted from the first grandmaster device 2A passes through the time synchronization processing units 31A, 31B, the offset time Toff is calculated by the time synchronization processing unit 31 of the communication device 3, and a time synchronization process is performed to correct the time sources of the own timing units 32A, 32B so that the clock of the communication device 3 is 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 arriving at 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 arriving at port Mb via the fourth transmission path Rb4 is transmitted to port Sb of each slave device 4 via the IP network. A PTP packet including the GM clock of the first grandmaster device 2A is transmitted to each slave device 4.
[0063] Thereafter, with the first communication device 3A and the second communication device 3B as the masters and the slave device 4 as the slave, PTP packets including various messages are transmitted and received between them as shown in Fig. 5. The time synchronization processing unit 41 of the slave device 4 adopts the PTP packet including the GM clock of the one 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) If the first grandmaster device fails 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 with reference to Fig. 7. In Fig. 7, the thick arrows indicate the flow of PTP packets generated by the first grandmaster device 2A.
[0065] Although the PTP packet of the first grandmaster device 2A is set to a higher priority than the PTP packet of the second grandmaster device 2B, the first grandmaster device 2A cannot transmit the PTP packet to the first communication device 3A due to a failure, so the second communication device 3B transmits the PTP packet including the GM clock received from the second grandmaster device 2B to the first communication device 3A.
[0066] Specifically, a PTP packet sent from the second grandmaster device 2B and received at port S2 of the second communication device 3B then travels via Rb1, Pb1, P21, P22, Pb2, Rb2, and Pb3, symbolically arriving at port Pa4 of the first communication device 3A.
[0067] While the PTP packet transmitted from the second grandmaster device 2B passes through the time synchronization processing units 31A, 31B, the offset time Toff is calculated by the time synchronization processing unit 31 of the communication device 3, and a time synchronization process is performed to correct the time sources of the own timing units 32A, 32B so that the clock of the communication device 3 is synchronized with the reference time of the second grandmaster device 2B.
[0068] Furthermore, the PTP packet transmitted from port Pb2 of the second communication device 3B and arriving at port Mb via the fourth transmission path Rb4 is transmitted via the IP network to port Sb of each slave device 4. Similarly, the PTP packet transmitted from port Pa2 of the first communication device 3A and arriving at port Ma via the fourth transmission path Ra4 is transmitted 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 masters and the slave device 4 as the slave, as described above, PTP packets containing various messages are transmitted and received between the two, and a time synchronization process is performed to correct the time source of the slave device 4's 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 both the first and second grandmaster devices fail An example of the operation of the communication system 1 when failures occur in both the first grandmaster device 2A and the second grandmaster device 2B will be described with reference to FIG.
[0071] When failures occur in the first grandmaster apparatus 2A and the second grandmaster apparatus 2B at the same time, the first communication device 3A cannot receive PTP packets from the first grandmaster apparatus 2A for a predetermined time, and the second communication device 3B cannot receive PTP packets from the second grandmaster apparatus 2B for a predetermined time, so the failure detection unit 302 of the first communication device 3A detects failures in the first grandmaster apparatus 2A and the second grandmaster apparatus 2B. Similarly, the failure detection unit 302 of the second communication device 3B detects failures in the second grandmaster apparatus 2B and the first grandmaster apparatus 2A.
[0072] The packet generating unit 303 of the first communication device 3A generates a PTP packet including its own time in a self-running mode. The packet generating unit 303 then transmits the PTP packet to the time synchronization processing unit 31, and controls the packet transmitting / receiving unit 301 to transmit and receive the PTP packet to and from the second communication device 3B and the slave device 4.
[0073] Similarly, the packet generator 303 of the second communication device 3B generates a PTP packet including its own time in a self-running mode. The packet generator 303 then transmits the PTP packet to the time synchronization processor 31 and controls the packet transmitter / receiver 301 to transmit and receive the PTP packet 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 clock unit 32.
[0075] The packet generating unit 303 of the first communication device 3A controls the packet transmitting / receiving unit 301 to invalidate the PTP packet generated by itself among the PTP packets received from the second communication device 3B. The packet transmitting / receiving unit 301 of the first communication device 3A invalidates the PTP packet 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 masters and the slave device 4 as the slave, PTP packets including various messages are transmitted and received between them as shown in Fig. 5. 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, which has 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] (Effects of this embodiment) The communication system 1 according to the present embodiment provides the following advantages. (a) Even if the first grandmaster device 2A and the second grandmaster device 2B fail at the same time, the first communication device 3A and the second communication device 3B generate PTP packets in self-running mode, and therefore can communicate with the slave device 4 in a time-synchronized manner. (b) When the first communication device 3A and the second communication device 3B each generate a PTP packet in self-running mode, operation between the communication devices 3A and 3B may become unstable, which may result in a decrease in the accuracy of time synchronization. However, in this embodiment, when a PTP packet is generated in self-running mode, if the PTP packet generated by itself is transmitted from another communication device 3, the PTP packet is invalidated, thereby preventing a decrease in the accuracy of time synchronization. (c) Since PTP packets are transmitted and received between the communication devices 3A and 3B instead of clocks, information such as the priority of the PTP packets generated by the communication devices 3A and 3B can be notified.
[0078] Although the embodiment of the present invention has been described above, the embodiment of the present invention is not limited to the above embodiment, and various modifications and implementations are possible. [Explanation of symbols]
[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 and reception processing unit, 31, 31A, 31B...time synchronization processing unit, 32, 32A, 32B...timekeeping unit, 41...time synchronization processing unit, 42...timekeeping unit, 301...packet transmission and reception unit, 302...fault detection unit, 303...packet generation unit, 311...storage unit, M1, M2, Ma, Mb, Pa1 to Pa4, Pb1 to Pb4, S1, S2, Sa, Sb...ports, Ra1 to Ra4, Rb1 to Rb4...transmission path,
Claims
1. A communication device is provided corresponding to one of a plurality of master devices that transmits a time synchronization packet including a reference time, and a slave device is commonly connected to other communication devices provided corresponding to the other master devices, a packet transmission / reception unit 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 for detecting failures in the corresponding master device and the other master devices; a packet generating unit that generates a time synchronization packet including a time of its own in a self-running mode when the failure detecting unit detects failures of the corresponding master device and the other master device at the same time, and controls the packet transmitting / receiving unit to transmit and receive the time synchronization packet to and from the other communication device and the slave device; A communication device comprising:
2. the packet generation unit performs control so as to invalidate the time synchronization packet generated by itself among the time synchronization packets received from the other communication device; The communication device according to claim 1 .
3. the packet generation unit assigns identification information for identifying itself to the time synchronization packet generated by itself, and performs control so as to invalidate the time synchronization packet generated by itself based on the identification information. The communication device according to claim 2 .
4. the identification information is a port number of a port through which the time synchronization packet is transmitted to the other communication device; The communication device according to claim 3.
5. a priority order is set for the time synchronization packet generated by the packet generation unit among the time synchronization packets generated by the packet generation units of the other communication devices; the time synchronization processing unit performs a time synchronization process based on the time synchronization packets in accordance with the priority order. A 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 in which the own time has been corrected based on the reference time, and when the packet generating unit generates the time synchronization packet in a self-running mode, the time synchronization processing unit extracts a correction tendency from the history information and corrects the own time so as to reflect the correction tendency. The communication device according to claim 1 .
7. A plurality of master devices that transmit time synchronization packets including a reference time; a plurality of communication devices provided corresponding to the plurality of master devices, the communication devices being commonly connected to the plurality of slave devices, Each of the plurality of communication devices a packet transmission / reception unit that transmits and receives the time synchronization packet 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 in the corresponding master device and other master devices; a packet generating unit that generates a time synchronization packet including a time of its own in a self-running mode when the failure detecting unit detects failures of the corresponding master device and the other master device at the same time, and controls the packet transmitting / receiving unit to transmit and receive the time synchronization packet to and from the other communication device and the slave device; A communication system comprising:
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
Time synchronization system, learning device, inference device, and time synchronization device
JP7325657B2
PTP over IP in a network topology with clock redundancy for better PTP accuracy and stability
US20160277138A1