Communication systems and communication devices

JP2026100148APending Publication Date: 2026-06-19HIRAKAWA HEWTECH

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
HIRAKAWA HEWTECH
Filing Date
2024-12-09
Publication Date
2026-06-19

Smart Images

  • Figure 2026100148000001_ABST
    Figure 2026100148000001_ABST
Patent Text Reader

Abstract

The present invention provides a communication system and communication device that can shorten the switching time to another grandmaster in the event of a failure in a grandmaster with a higher priority setting. [Solution] When the fault detection unit 302 detects a fault in the first grandmaster device 2A, the time synchronization processing unit 31B of the second communication device 3B adopts the second reference time before identifying the second grandmaster device 2B as the source of the second reference time contained in the second PTP packet transmitted from the second grandmaster device 2B, and the packet transmission / reception unit 30B transmits the second PTP packet containing the adopted second reference time to the first communication device 3A and the slave device 4.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a communication system and a communication device.

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 stable operating grandmaster from multiple grandmasters and performs communication with time synchronization based on the high-precision time synchronization method of 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 multiple grandmasters that generate GM clocks synchronized with GPS time. In this system, a stable operating grandmaster is selected from the multiple grandmasters, and it includes multiple communication devices that perform communication with time synchronization based on PTP. Each of the multiple communication devices includes a PTP message transceiver that acquires PTP messages from multiple other communication devices with established communication, a grandmaster candidate selection unit that extracts parameters for selecting one from multiple 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] However, with conventional synchronous communication systems, if one grandmaster fails, switching to another functioning grandmaster requires identifying the source of the other grandmaster's GM clock and measuring the time difference between it and the other grandmaster. This results in a problem where switching to another grandmaster takes time.

[0006] The object of the present invention is to provide a communication system and communication device that can shorten the switching time to another grandmaster when a grandmaster with a higher priority is set to fail. [Means for solving the problem]

[0007] [1] A first master device whose priority is set higher than other master devices and which transmits a first reference time, and a second master device whose priority is set lower than the first master device and which transmits a second reference time, The system comprises a first communication device and a second communication device, each provided in correspondence to the first master device and the second master device, and having slave devices commonly connected to other communication devices, which transmit the first reference time to the slave devices with priority over the second reference time. A communication system in which, if a failure occurs in the first master device, the second communication device adopts the second reference time and transmits it to the slave device before identifying the second master device as the source of the second reference time. [2] The communication system according to [1], wherein the second communication device measures the time difference between the second reference time and its own time after adopting the second reference time. [3] The communication system according to [2], wherein the second communication device performs adjustment processing for fluctuations in the time difference after measuring the time difference. [4] The communication system according to [1], wherein the first communication device adopts the first reference time received before the first master device fails and transmits it to the slave device. [5] A communication device that transmits to a slave device a first reference time transmitted from a first master device whose priority is set higher than that of other master devices, with priority given to a second reference time transmitted from a second master device whose priority is set lower than that of the first master device, Provided in correspondence with the second master device, A communication device that, in the event of a failure in the first master device, adopts the second reference time and transmits it to the slave device before identifying the second master device as the source of the second reference time. [6] A communication device that transmits to a slave device a first reference time transmitted from a first master device whose priority is set higher than that of other master devices, with priority given to a second reference time transmitted from a second master device whose priority is set lower than that of the first master device, Provided in correspondence with the first master device, A communication device that, in the event of a failure in the first master device, uses the first reference time received before the failure occurred and transmits it to the slave device. [Effects of the Invention]

[0008] According to the present invention, the switching time to another grandmaster can be shortened when a failure occurs in a grandmaster that has been set to a higher priority. [Brief explanation of the drawing]

[0009] [Figure 1] Figure 1 is a block diagram showing an example of the configuration of a communication system according to an embodiment of the present invention. [Figure 2] Figure 2 is a block diagram showing an example of the configuration of the transmission and reception processing unit. [Figure 3] Figure 3(a) shows an example of the format of an Announce message, and Figure 3(b) shows an example of the format of its Header. [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 its Header. [Figure 5] FIG. 5 is a sequence diagram showing an example of basic communication based on PTP. [Figure 6] FIG. 6 is a diagram for explaining an example of the operation of a 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 a communication system applying the prior art when a failure occurs in the first grandmaster device. [Figure 8] FIG. 8 is a diagram for explaining an example of the operation of a communication system applying the prior art when a failure occurs in the first grandmaster device. [Figure 9] FIG. 9 is a diagram for explaining an example of the operation of a communication system applying the prior art when a failure occurs in the first grandmaster device. [Figure 10] FIG. 10 is a diagram for explaining an example of the operation of a communication system applying the prior art when a failure occurs in the first grandmaster device. [Figure 11] FIG. 11 is a diagram for explaining an example of the operation of a communication system according to the present embodiment when a failure occurs in the first grandmaster device. [Figure 12] FIG. 12 is a diagram for explaining an example of the operation of a communication system according to the present embodiment when a failure occurs in the first grandmaster device.

Embodiments of 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 that transmits a first PTP packet including a reference time, a second grandmaster device 2B that transmits a second PTP packet 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 first PTP packet and the second PTP packet are examples of time synchronization packets. The first grandmaster device 2A is an example of a first master device, and the second grandmaster device 2B is an example of a second master device. The IP network is an example of a communication path. Note that there may be a plurality of second master devices. When collectively referring to the first PTP packet and the second PTP packet, they are hereinafter also referred to as PTP packets.

[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. This duplicates the packet path to the slave device 4 and can improve reliability.

[0014] Furthermore, when referring to the first grandmaster device 2A and the second grandmaster device 2B collectively, they will hereinafter also be referred to as grandmaster device 2 or master. Similarly, when referring to the first communication device 3A and the second communication device 3B collectively, they will hereinafter also be referred to as communication device 3, slave, or master. Alternatively, the second grandmaster device 2B may be configured as multiple units, each connected to a second communication device 3B, with each second grandmaster device 2B and second communication device 3B being physically independent of the others. In addition, although the figure shows multiple slave devices 4, one slave device 4 may be used.

[0015] The first grandmaster device 2A and the second grandmaster device 2B each periodically (for example, 8 times / second) generate PTP packets containing the grandmaster clock (hereinafter also referred to as the GM clock), which serves as 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 grandmaster device 2 may also be a server device that has grandmaster functionality and transmits packets such as video and audio.

[0016] (Outline configuration of the communication device) Communication device 3 functions as a boundary clock device that operates with PTP time synchronization to the GM clock of the grandmaster device 2. Furthermore, communication device 3 has functions such as time synchronization, BMCA (Best Master Clock Algorithm), and the ability to maintain time synchronization during GM clock switching. These functions will be described later. Such communication device 3 can be configured using, for example, a switching hub such as a PTP-compliant L2 switch, a router, a gateway, an IEEE 1588 BC (Boundary Clock), or an optical switch.

[0017] (Time synchronization function) Communication device 3 has a time synchronization function that corrects its own time so that it synchronizes with a reference time. With this time synchronization function, the grandmaster device 2 acts as the master and communication device 3 as the slave, sending and receiving PTP packets containing various messages (Announce messages, Sync messages, Follow_Up messages, Delay_Request messages, Delay_Response messages) between the master and the slave, calculating correction information (for example, offset time Toff) to correct its own time from the transmission and reception times of the PTP packets, and correcting its own time 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 to the reference time of the first grandmaster device 2A and the second grandmaster device 2B with the highest priority using the BMCA function. If a failure occurs in either the first grandmaster device 2A or the second grandmaster device 2B using this BMCA function, the communication device 3 synchronizes to the reference time of the other device that is not experiencing a failure. Alternatively, the communication device 3 may synchronize to the reference time of the first grandmaster device 2A and the second grandmaster device 2B with the highest precision.

[0019] (A function that prevents the suspension of time synchronization when switching GM clocks.) If the first grandmaster device 2A, which has the highest priority, fails, the BMCA function switches from the GM clock from the first grandmaster device 2A to the GM clock from the second grandmaster device 2B. In conventional communication systems, when switching GM clocks, the provision of PTP packets from the communication device 3 to the stave device 4 is stopped (PTP synchronization is stopped), the reception of the GM clock of the switching destination is confirmed, the time difference between the GM clock and the device's own time is measured, the adoption of the switching destination GM clock is decided, and a process is performed to adjust for fluctuations in the time difference between the GM clock and the device's own time. As a result, the time synchronization stop time (PTP packet provision stop time) during GM clock switching is long (for example, 20 seconds or more).

[0020] The stave device 4 suffers greater harm from the disruption of time synchronization than from receiving a highly accurate GM clock. Therefore, this embodiment does not interrupt time synchronization when switching GM clocks. In other words, when switching GM clocks, the communication device 3 of this embodiment does not interrupt time synchronization via PTP packets. Instead, it first decides to adopt the GM clock of the target device, then confirms the reception of the target GM clock, measures the time difference between the GM clock and its own time, and performs a fluctuation adjustment process for the time difference between the GM clock and its own time. This eliminates the time synchronization interruption time (PTP packet provision interruption time) during GM clock switching, even if the time difference (accuracy) between the GM clock and its own time becomes poor (for example, around 3 μs). In confirming the reception of the GM clock, the stave device 4 receives a PTP packet containing an Announce message sent from the Grandmaster device 2, identifies which Grandmaster device 2 it is from the GMID information recorded in the message, and confirms the Priority, Clock Class, etc. Adopting a GM clock means adopting the GM clock for correcting its own time. The time difference between the GM clock and the self-time is measured, for example, by calculating the offset time Toff. The adjustment process for the fluctuation in the time difference between the GM clock and the self-time is, for example, a process in which the fluctuation (difference) after the grandmaster switchover is not directly distributed to the stave device 4, but rather the fluctuation is divided over a certain period of time and distributed little by little to the stave device 4.

[0021] (Configuration of the slave device) 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 similar to the communication device 3, and a timing unit 42. The timing unit 42 timing a clock signal from a time source (e.g., an oscillator, resonator, etc.) (not shown) and outputs the time of the slave device 4.

[0022] 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, sending and receiving PTP packets containing 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, the slave device 4 corrects its own time to synchronize with the time of the communication device 3.

[0023] (Specific configuration of the communication device) The first communication device 3A comprises a transmission / reception processing unit 30A, a time synchronization processing unit 31A, and a timing unit 32A. Similarly, the second communication device 3B comprises a transmission / reception processing unit 30B, a time synchronization processing unit 31B, and a timing unit 32B. When referring to the transmission / reception processing unit 30A and the transmission / reception processing unit 30B collectively, they will hereinafter also be referred to as the transmission / reception processing unit 30. Similarly, when referring to the timing unit 32A and the timing unit 32B collectively, they will hereinafter also be referred to as the timing unit 32.

[0024] (Configuration of the transmission path in the transmitting / receiving processing unit) The transmit / receive 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.

[0025] In the transmit / receive processing unit 30A, port S1 and port Pa1 are connected by the first transmission path Ra1, port Pa2 and port Pa3 are connected by the second transmission path Ra2, port Pa1 and port Pa4 are connected by the third transmission path Ra3, and port Pa2 and port Ma are connected by the fourth transmission path Ra4. Note that the transmission paths Ra1 to Ra4 in Figure 1 do not represent actual paths, but are conceptual representations.

[0026] The transmit / receive processing unit 30B of the second communication device 3B, like the transmit / receive processing unit 30A of the first communication device 3A, includes 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, multiple 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.

[0027] In the transmit / receive processing unit 30B, similar to the transmit / receive processing unit 30A of the first communication device 3A, port S2 and port Pb1 are connected by the first transmission path Rb1, port Pb2 and port Pb3 are connected by the second transmission path Rb2, port Pb1 and port Pb4 are connected by the third transmission path Rb3, and port Pb2 and port Mb are connected by the fourth transmission path Rb4. Note that the transmission paths Rb1 to Rb4 in Figure 1 do not represent actual paths, but are conceptual representations.

[0028] (Configuration of the time synchronization processing unit) The time synchronization processing unit 31 periodically (for example, 8 times / 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, by sending and receiving PTP packets with the grandmaster device 2.

[0029] Furthermore, the time synchronization processing unit 31 stores information correcting its own time source based on a reference time as historical information, and also includes a storage unit 311 that stores the transmission time and reception time of PTP packets.

[0030] The timing unit 32 timing a clock signal from a time source (e.g., an oscillator, resonator, etc.) not shown in the figure, and outputs it to the time synchronization processing unit 31 as the time for the communication device 3.

[0031] (Configuration of the send / receive processing unit) Figure 2 is a block diagram showing an example of the configuration of the transmission / reception processing unit 30. The transmission / reception processing unit 30 comprises a packet transmission / reception unit 301, a fault detection unit 302, and a packet generation unit 303.

[0032] (Configuration of the packet transmission / reception unit) The packet transmission / reception unit 301 transmits and receives PTP packets to the corresponding grandmaster device 2, other communication devices 3, and slave devices 4. The packet transmission / reception unit 301 also notifies the time synchronization processing unit 31 that it has received a PTP packet transmitted from the grandmaster device 2 or slave device 4, and that it has transmitted a PTP packet to the grandmaster device 2 or slave device 4. Upon receiving the notification from the packet transmission / reception 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.

[0033] All PTP packets propagating over Ethernet (registered trademark) that constitute an IP network are assigned an Ether header containing the destination MAC address and the source MAC address. The packet transceiver 301 may identify the destination and source of the PTP packet based on the destination MAC address and source MAC address in the Ether header.

[0034] The packet transmission / reception unit 301 obtains a value recorded in the "grandmasterPriority1" area from the Announce message, etc., described later, from among the PTP packets transmitted from the first grandmaster device 2A and the second grandmaster device 2B, and prioritizes handling the PTP packet with the highest priority based on this value.

[0035] Furthermore, the packet transmission / reception unit 301 may obtain parameters related to time accuracy recorded in each area such as "grandmasterPriority1," "grandmasterClockQuality," and "grandmasterPriority2" from the Announce message described later, and may prioritize the PTP packet with higher time accuracy based on the obtained parameters.

[0036] (Configuration of the fault detection unit) The fault detection unit 302 detects faults in the corresponding grandmaster device 2 and other grandmaster devices 2. Specifically, the fault detection unit 302 may detect, for example, that a fault has occurred in the corresponding grandmaster device 2 because it has not been able to receive PTP packets from the corresponding grandmaster device 2 for a predetermined time (for example, 100 milliseconds).

[0037] Furthermore, the fault detection unit 302 may detect that a failure has occurred in the other grandmaster device 2 if, for example, the other communication device 3 has been unable to receive PTP packets from the other grandmaster device 2 for a predetermined time (e.g., 100 milliseconds). In this case, the fault detection unit 302 may identify the first grandmaster device 2A and the second grandmaster device 2B, which are the sources of the PTP packets, by the source MAC address included in the Ether header of the PTP packets. The fault detection unit 302 may also detect that a failure has occurred in the grandmaster device 2 if it has been unable to receive Announce messages, which are supposed to be received at regular intervals (e.g., every second), for several consecutive times (e.g., three times). 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. It should also be noted that if reliable PTP packets cannot be received for a predetermined time, it may be determined that a failure has occurred in the grandmaster device 2. Reliability may be determined by parameters related to the accuracy of the time.

[0038] The transmit / receive processing unit 30 and the time synchronization processing unit 31 may be configured using hardware such as an FPGA (Field Programmable Gate Array) or ASIC (Application Specific Integrated Circuit). Furthermore, the functions of the transmit / receive processing unit 30 and the time synchronization processing unit 31 may be implemented by storing a program in memory such as ROM (Read Only Memory), reading that program into RAM (Random Access Memory), and executing it on the CPU (Central Processing Unit).

[0039] (Structure of an Announce Message) Figure 3(a) shows an example of the format of an Announce message, and Figure 3(b) shows an example of the format of its "Header". First, the master sends a PTP packet containing this Announce message to the slave. The master notifies the slave of various attribute information regarding time synchronization through the Announce message. This attribute information includes, for example, priority, parameters related to time accuracy, and the port number of the port on which the PTP packet is sent.

[0040] The Announce message is defined in the IEEE 1588v2 standard and, as shown in Figure 3(a), has the following areas: "header", "originTimestamp", "currentUtcOffset", "reserved", "grandmasterPriority1", "grandmasterClockQuality", "grandmasterPriority2", "grandmasterIdentity", "stepsRemoved", and "timeSource".

[0041] The "grandmasterPriority1" field records a value indicating priority, with a smaller value indicating higher priority. In this embodiment, the "grandmasterPriority1" field of the Announce message sent by the first grandmaster device 2A records a smaller value than the "grandmasterPriority1" field of the Announce message sent by the second grandmaster device 2B.

[0042] As shown in Figure 3(b), the "Header" area of ​​the Announce message includes the following fields: "messageType+transportSpecific", "messageLength+reserved", "domainNumber", "reserved", "flagField", "connectionField", "Reserved", "sourcePortIdentify", "sequenceId", "controlField", and "logMessageInterval".

[0043] The "messageType" field records the type of message. 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, with a 2-byte port number.

[0044] In this embodiment, the "sourcePortIdentify" field of a PTP packet containing an Announce message generated by the first communication device 3A records the port number assigned to port Pa3, which transmits the PTP packet to the second communication device 3B. The "sourcePortIdentify" field of a PTP packet containing an Announce message generated by the second communication device 3B records the port number assigned to port Pb3, which transmits the PTP packet to the first communication device 3A. The same applies to PTP packets containing other messages such as Sync messages, which record the port number in the "sourcePortIdentify" field. The port number is just one example of PTP packet identification information. PTP packet identification information is not limited to the port number; other information (e.g., MAC address, IP address, etc.) may also be used.

[0045] (Sync message structure) Figure 4(a) shows an example of the format of a Sync message, and Figure 4(b) shows an example of the format of its "Header". Sync messages are defined in the IEEE 1588v2 standard and, as shown in Figure 4(a), have the fields "header" and "originTimestamp". The format of the "header" of Sync messages and other messages is the same as in Figure 3(b), so its explanation is omitted. Follow_Up messages and Delay_Response messages that follow Sync messages also have the "originTimestamp" field. The "originTimestamp" field of a Follow_Up message records the transmission time when the master sent the Sync message to the slave. The "originTimestamp" field of a Delay_Response message records the reception time when the master received the Delay_Request message from the slave.

[0046] (Communication based on PTP) Figure 5 is a sequence diagram showing an example of basic communication based on PTP. The figure shows the case where Grandmaster device 2 is the master and communication device 3 is the slave, but the flow is the same when communication device 3 is the master and slave device 4 is the slave. Announce messages, Sync messages, Follow_Up messages, Delay_Request messages, and Delay_Response messages are sent and received between the master and slave.

[0047] As shown in Figure 5, the grandmaster device 2 transmits a PTP packet containing the Announce message shown in Figure 3 to the communication device 3, and then transmits a PTP packet containing the Sync message shown in Figure 4 to the communication device 3. At this time, the grandmaster device 2 stores the transmission time t1 when it sent the PTP packet containing the Sync message. When the transmission / reception processing unit 30 of the communication device 3 receives the PTP packet containing the Sync message, the time synchronization processing unit 31 obtains the reception time t2 when it received the Sync message from the timing unit 32A and stores it in the storage unit 311.

[0048] Next, the grandmaster device 2 sends a PTP packet containing a Follow_Up message that records the transmission time t1 to the communication device 3. When the transmission / reception processing unit 30 of the communication device 3 receives the PTP packet containing 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.

[0049] Next, the communication device 3 sends a PTP packet containing 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 of the PTP packet containing the Delay_Request message in the storage unit 311. When the grandmaster device 2 receives the PTP packet containing the Delay_Request message, it stores the reception time t4.

[0050] Next, the grandmaster device 2 sends a PTP packet containing a Delay_Response message that records the reception time t4 to the communication device 3. When the transmission / reception processing unit 30 of the communication device 3 receives the PTP packet containing the Delay_Response message, the time synchronization processing unit 31 obtains the reception time t4 from the Delay_Response message and stores it in the storage unit 311.

[0051] The time synchronization processing unit 31 then calculates the offset time Toff based on the times t1 to t4 stored in the storage unit 311 using the following equation (1). Toff = (Dms + Dsm) / 2 ={(t2-t1)+(t4-t3)} / 2 ···(1)

[0052] The time synchronization processing unit 31 corrects the time source of the timing unit 32 based on the offset time Toff calculated from the above equation (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.

[0053] (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 Figures 6 to 12. Figures 7 to 10 show an example of the operation of a communication system using the prior art, and Figures 11 and 12 show an example of the operation of this embodiment.

[0054] (1) When the first and second grandmaster devices are functioning normally An example of the operation of communication system 1 when the first grandmaster device 2A and the second grandmaster device 2B are functioning normally will be explained with reference to Figure 6. It will also be assumed that the first grandmaster device has the highest priority. In Figure 6, the thick arrows indicate the flow of the first PTP packets generated by the first grandmaster device 2A, and the thin arrows indicate the flow of the second PTP packets generated by the second grandmaster device 2A.

[0055] The first grandmaster device 2A transmits a first PTP packet containing the GM clock from port M1 to port S1 of the first communication device 3A, and the second grandmaster device 2B transmits a second PTP packet containing the GM clock from port M2 to port S2 of the second communication device 3B.

[0056] Because the first PTP packet from the first grandmaster device 2A has a higher priority than the second PTP packet from the second grandmaster device 2B, the first communication device 3A transmits the first PTP packet received from the first grandmaster device 2A to the second communication device 3B, but the second communication device 3B does not transmit the second PTP packet received from the second grandmaster device 2B to the first communication device 3A.

[0057] Specifically, the first PTP packet, transmitted from the first grandmaster device 2A and received at port S1 of the first communication device 3A, then takes the following route, symbolically represented by Ra1, Pa1, P11, P12, Pa2, Ra2, Pa3, and further through Pa4, Rb3, Pb1, P21, P22, Pb2, Rb2, Pb3 of the second communication device 3B, before reaching port Pa4 of the first communication device 3A.

[0058] While the first PTP packet transmitted from the first grandmaster device 2A is passing through the time synchronization processing units 31A and 31B, the time synchronization processing units 31A and 31B of the communication device 3 calculate the offset time Toff, and perform time synchronization processing to correct the time sources of their own timing units 32A and 32B so that the clock of the communication device 3 is synchronized with the reference time of the first grandmaster device 2A.

[0059] Furthermore, the first 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 first 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. Each slave device 4 receives the first PTP packet containing the GM clock of the first grandmaster device 2A.

[0060] Subsequently, with the first communication device 3A and the second communication device 3B acting as masters and the slave device 4 as a slave, a first PTP packet containing various messages is sent and received between them, as shown in Figure 5. The time synchronization processing unit 41 of the slave device 4 adopts the first PTP packet containing the GM clock of the higher priority (for example, a pre-configured 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.

[0061] (2) Operation of the prior art in the event of a failure in the first grandmaster device An example of the operation of a communication system as a comparative example applying the conventional technology when a failure (communication failure) occurs in the first grandmaster device 2A and the second grandmaster device 2B is operating normally will be explained with reference to Figure 7. In Figures 7 to 12, the thick arrows indicate the flow of the first PTP packets generated by the first grandmaster device 2A, and the thin arrows indicate the flow of the second PTP packets generated by the second grandmaster device 2A. Also, in Figures 7 to 12, the "x" marks between the first grandmaster device 2A and the first communication device 3A indicate a communication failure, and the "x" marks in other locations indicate a PTP synchronization failure.

[0062] If a failure occurs in the first grandmaster device 2A, as shown in Figure 7, the first communication device 3A will be unable to receive the first PTP packet from the first grandmaster device 2A. As a result, synchronization between the transmit / receive processing unit 30A and the time synchronization processing unit 31A of the first communication device 3A will stop. On the other hand, the second communication device 3B will be able to receive the second PTP packet from the second grandmaster device 2B, but time synchronization between the transmit / receive processing unit 30B and the time synchronization processing unit 31B will stop. Time synchronization between the first communication device 3A and the second communication device 3B, and between the first communication device 3A and the second communication device 3B and the slave device 4 will also stop.

[0063] Next, as shown in Figure 8, the transmission / reception processing unit 30B of the second communication device 3B transmits the second PTP packet received from the second grandmaster device 2B to the time synchronization processing unit 31B. The time synchronization processing unit 31B confirms the reception of the GM clock contained in the second PTP packet and measures the time difference between the GM clock and its own time.

[0064] Next, the time synchronization processing unit 31B of the second communication device 3B decides to adopt the second PTP packet, performs adjustment processing for fluctuations in the time difference between the GM clock and its own time, and transmits the adjusted second PTP packet to the transmission / reception processing unit 30B. The transmission / reception processing unit 30B transmits the second PTP packet to the first communication device 3A and the slave device 4.

[0065] Next, as shown in Figure 9, the transmission / reception processing unit 30A of the first communication device 3A transmits the second PTP packet sent from the second communication device 3B to the time synchronization processing unit 31A. The time synchronization processing unit 31A of the first communication device 3A confirms the reception of the GM clock contained in the second PTP packet sent from the first communication device 3B and measures the time difference between the GM clock and its own time.

[0066] Next, the time synchronization processing unit 31A of the first communication device 3A decides to adopt the second PTP packet, performs adjustment processing for fluctuations in the time difference between the GM clock and its own time, and transmits the adjusted second PTP packet to the transmission / reception processing unit 30A. The transmission / reception processing unit 30A transmits the second PTP packet to the second communication device 3B and the slave device 4.

[0067] Subsequently, with the first communication device 3A and the second communication device 3B acting as masters and the slave device 4 as a slave, a second PTP packet containing various messages is sent and received between them as described above, 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 slave device 4's time is synchronized with the communication device 3's time.

[0068] (3) Operation of this embodiment when a failure occurs in the first grandmaster device An example of the operation of the communication system 1 according to this embodiment when a failure (communication failure) occurs in the first grandmaster device 2A and the second grandmaster device 2B is operating normally will be explained with reference to Figures 11 and 12.

[0069] If a failure occurs in the first grandmaster device 2A, as shown in Figure 11, the first communication device 3A will not be able to receive the first PTP packet from the first grandmaster device 2A, but the second communication device 3B will be able to receive the second PTP packet from the second grandmaster device 2B. The transmit / receive processing unit 30B of the second communication device 3B transmits the second PTP packet to the time synchronization processing unit 31B. The time synchronization processing unit 31B decides to accept the second PTP packet before confirming the reception of the GM clock contained in the second PTP packet and measuring the accuracy of the GM clock, and transmits the second PTP packet to the transmit / receive processing unit 30B. The transmit / receive processing unit 30B of the second communication device 3B transmits the second PTP packet to the first communication device 3A and the slave device 4.

[0070] Meanwhile, the time synchronization processing unit 31A of the first communication device 3A has not received the second PTP packet that is the target of the switch, so it transmits the first PTP packet that was received before the failure occurred to the second communication processing unit 3B and the stave device 4. The transmit / receive processing unit 30A of the first communication device 3A transmits the second PTP packet that was transmitted from the first communication device 3A to the time synchronization processing unit 31A.

[0071] Next, as shown in Figure 12, the time synchronization processing unit 31B confirms the reception of the GM clock contained in the second PTP packet, measures the time difference between the GM clock and its own time, performs adjustment processing for fluctuations in the time difference between the GM clock and its own time, and transmits the adjusted second PTP packet to the transmission / reception processing unit 30B. The transmission / reception processing unit 30B transmits the adjusted second PTP packet to the first communication device 3B and the stave device 4.

[0072] Next, as shown in Figure 12, the time synchronization processing unit 31A of the first communication device 3A confirms the reception of the GM clock contained in the second PTP packet transmitted from the second communication device 3B, measures the time difference between the GM clock and its own time, performs adjustment processing for fluctuations in the time difference between the GM clock and its own time, and transmits the adjusted second PTP packet to the transmission / reception processing unit 30A. The transmission / reception processing unit 30A transmits the second PTP packet to the second communication device 3B and the stave device 4.

[0073] Subsequently, with the first communication device 3A and the second communication device 3B acting as masters and the slave device 4 as a slave, a second PTP packet containing various messages is sent and received between them as described above, 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 slave device 4's time is synchronized with the communication device 3's time.

[0074] (Effects of this embodiment) The communication system 1 according to this embodiment provides the following effects. (a) If a failure occurs in the first grandmaster device 2A, which is set to have a higher priority, the second communication device 3B decides to accept the second PTP packet and transmits it to the slave device 4 before confirming receipt of the GM clock contained in the second PTP packet transmitted from the second grandmaster device 2B and measuring the time difference between the GM clock and its own time, thereby eliminating synchronization downtime. (b) If a failure occurs in the first grandmaster device 2A, which is set to have a higher priority, the first communication device 3A has sent the first PTP packet that it received before the failure occurred to the slave device 4. Therefore, even immediately after the failure of the first grandmaster device 2A, the stave device 4 can perform time synchronization processing based on the GM clock contained in the first PTP packet without stopping.

[0075] Although embodiments of the present invention have been described above, the embodiments of the present invention are not limited to those described above, and various modifications and implementations are possible. [Explanation of Symbols]

[0076] 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...Transmit / receive processing unit, 31, 31A, 31B...Time synchronization processing unit, 32, 32A, 32B...Time timing unit, 41...Time synchronization processing unit, 42...Time timing unit, 301...Packet transmit / receive unit, 302...Fault detection unit, 303...Packet generation unit, 311...Storage unit, M1, M2, Ma, Mb, Pa1~Pa4, Pb1~Pb4, S1, S2, Sa, Sb...Port, Ra1~Ra4, Rb1~Rb4...Transmission path,

Claims

1. A first master device whose priority is set higher than other master devices and which transmits a first reference time, and a second master device whose priority is set lower than the first master device and which transmits a second reference time, The system comprises a first communication device and a second communication device, each provided in correspondence to the first master device and the second master device, and having slave devices commonly connected to other communication devices, which transmit the first reference time to the slave devices with priority over the second reference time. A communication system in which, in the event of a failure in the first master device, the second communication device adopts the second reference time and transmits it to the slave device before identifying the second master device as the source of the second reference time.

2. The communication system according to claim 1, wherein the second communication device measures the time difference between the second reference time and its own time after adopting the second reference time.

3. The communication system according to claim 2, wherein the second communication device performs adjustment processing for fluctuations in the time difference after measuring the time difference.

4. The communication system according to claim 1, wherein the first communication device adopts the first reference time received before a failure occurred in the first master device and transmits it to the slave device.

5. A communication device that transmits to a slave device a first reference time transmitted from a first master device whose priority is set higher than that of other master devices, prioritizing this first reference time over a second reference time transmitted from a second master device whose priority is set lower than that of the first master device, Provided in correspondence with the second master device, A communication device that, in the event of a failure in the first master device, adopts the second reference time and transmits it to the slave device before identifying the second master device as the source of the second reference time.

6. A communication device that transmits to a slave device a first reference time transmitted from a first master device whose priority is set higher than that of other master devices, prioritizing this first reference time over a second reference time transmitted from a second master device whose priority is set lower than that of the first master device, Provided in correspondence with the first master device, A communication device that, in the event of a failure in the first master device, uses the first reference time received before the failure occurred and transmits it to the slave device.