WO2023203782A1 - Time synchronization device, time synchronization method, and program - Google Patents

Time synchronization device, time synchronization method, and program Download PDF

Info

Publication number
WO2023203782A1
WO2023203782A1 PCT/JP2022/018629 JP2022018629W WO2023203782A1 WO 2023203782 A1 WO2023203782 A1 WO 2023203782A1 JP 2022018629 W JP2022018629 W JP 2022018629W WO 2023203782 A1 WO2023203782 A1 WO 2023203782A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
clock
offset
grand master
abnormality
Prior art date
Application number
PCT/JP2022/018629
Other languages
French (fr)
Japanese (ja)
Inventor
佳祐 山形
慎一 吉原
豪 矢沢
隆 中西
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to PCT/JP2022/018629 priority Critical patent/WO2023203782A1/en
Publication of WO2023203782A1 publication Critical patent/WO2023203782A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter

Definitions

  • the present disclosure relates to a time synchronization device, a time synchronization method, and a program.
  • FIG. 9 is a diagram illustrating a configuration example of a time synchronization system 900 that uses the PTP protocol to synchronize time between devices that communicate with each other via a network.
  • a time synchronization system 900 shown in FIG. 9 includes a plurality of ground master clocks 2 (in the example of FIG. 9, a first grand master clock 21 and a second grand master clock 22), and a conventional boundary clock ( Boundary Clock) 9 and a client device 3.
  • the first grand master clock 21 and the boundary clock 9 can communicate with each other via a network such as a LAN
  • the second grand master clock 22 and the boundary clock 9 can communicate with each other via a network such as a LAN.
  • the boundary clock 9 and the client device 3 can communicate via a network such as a LAN.
  • the first grand master clock 21 and the second grand master clock 22 each receive a signal (GNSS signal) from a satellite of a global navigation satellite system (GNSS) such as a GPS (Global Positioning System). Equipped with a GNSS antenna.
  • GNSS global navigation satellite system
  • Each of the first grandmaster clock 21 and the second grandmaster clock 22 receives a GNSS signal via a GNSS antenna, and obtains Universal Time Coordinated (UTC) from the received GNSS signal.
  • GNSS global navigation satellite system
  • UTC Universal Time Coordinated
  • Each of the first grandmaster clock 21 and the second grandmaster clock 22 has a master function of distributing the acquired UTC as a reference time via the network.
  • the boundary clock 9 functions as a device with a slave function that synchronizes its own time with the time distributed from the higher-level device for a higher-level device with a master function. Furthermore, the boundary clock 9 functions as a device having a master function for a lower device having a slave function. In the time synchronization system 900 shown in FIG. 9, the boundary clock 9 functions as a device having a slave function for each of the first grand master clock 21 and the second grand master clock 22. Specifically, at one point in time, the boundary clock 9 is in a slave state with respect to one grand master clock 2 of the first grand master clock 21 and second grand master clock 22, and is in a slave state with respect to the other grand master clock 2. It is in a passive state with respect to the master clock 2.
  • the boundary clock 9 is in a passive state with respect to one grandmaster clock 2 of the first grandmaster clock 21 and the second grandmaster clock 22, and is in a passive state with respect to the other grandmaster clock 2. becomes a slave state. Further, for the client device 3, it functions as a device having a master function.
  • the boundary clock 9 uses PTP to synchronize its own device with the grand master clock 2 by calculating an offset using a time stamp in communication with the grand master clock 2 connected to the own device.
  • the timestamp is time information indicating the transmission/reception time of the PTP packet in the boundary clock 9 and grandmaster clock 2.
  • the offset is the difference between the time of the device with the master function and the time of the device with the slave function, and in this example, it is the difference between the time of the grand master clock 2 and the time of the boundary clock 9.
  • the boundary clock 9 transmits to the client device 3 a PTP packet including a time stamp indicating the time of transmission and reception in the own device.
  • the client device 3 calculates an offset using the time stamp in communication with the boundary clock 9 connected to the client device 3, and synchronizes with the boundary clock 9 using the offset.
  • the client device 3 is, for example, a base station device in a mobile phone network.
  • boundary clock 9 selects one grand master clock 2 from a plurality of grand master clocks 2 using BMCA (Best Master Clock Algorithm), and synchronizes with the selected grand master clock 2.
  • BMCA Best Master Clock Algorithm
  • Figure 10 is a diagram described in ITU-T G.8275.1/Y.1369.1 Annex G, and "T-BC2" and “T-BC3" shown in Figure 10 are respectively , corresponds to the higher-level device of "T-BC4".
  • the PTP port in the passive state in the device "T-BC4" (indicated by the code “P” in the block of T-BC4 in FIG. 10) is the PTP port in the master state in the host device "T-BC2" (indicated by the symbol “P” in the block T-BC4 in FIG. 10).
  • a PTP packet is received from the block BC2 (indicated by the code "M” in the block BC2), it sends a Delay_Req message with the alternate Master Flag set to "FALSE" to the host device "T-BC2".
  • the PTP port of the host device “T-BC2” that received the Delay_Req message is in the master state, it responds with a Delay_Resp message with the alternate Master Flag value set to “FALSE”.
  • the device "T-BC4" calculates the offset with the higher-level device "T-BC2" using the time stamps in such communication.
  • the alternate Master Flag is a flag used to exchange PTP messages with ports in Passive state, and by setting this flag in the Delay_Req message, information regarding the characteristics of the transmission path is sent. .
  • the PTP port in the slave state in the device "T-BC4" (indicated by the code “S” in the block of T-BC4 in FIG. 10) is the PTP port in the master state in the other host device "T-BC3". It receives a Sync message and a Delay_Resp message from (indicated by the symbol "M” in the block of T-BC3 in FIG. 10). The device "T-BC4" calculates an offset with the higher-level device "T-BC3" using the time stamp in such communication.
  • the device "T-BC4" Generates an alarm indicating an abnormality. This alarm is used as a PTP monitor, but does not trigger BMCA. Additionally, thresholds need to be appropriately set to avoid generating inappropriate alarms.
  • the device "T-BC4" is connected to two higher-level devices having master functions (in the example of FIG. 10, the higher-level device “T-BC2" and the higher-level device “T-BC4") BC3''), and detects that an abnormality has occurred if the difference in offset with each of the two higher-level devices exceeds a threshold.
  • IEEE Std 1588TM-2008 “IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems” ITU-T G.8275.1/Y.1369.1, “Precision time protocol telecom profile for phase/time synchronization with full timing support from the network”
  • Non-Patent Document 2 can detect that an abnormality has occurred based on the offset between each of a plurality of host devices and its own device, but It is not possible to determine whether an abnormality has occurred. Therefore, it takes time to restore a system including a plurality of host devices.
  • the purpose of the present disclosure which was made in view of the above problems, is to provide a time synchronization device, a time synchronization method, and a program that can determine which of a plurality of host devices has an abnormality. be.
  • a time synchronization device is a time synchronization device that synchronizes with any one of a plurality of high-level devices, and transmits and receives packets to and from each of the plurality of high-level devices.
  • the upper packet transmitting/receiving unit calculates a plurality of times, which is the difference between the time of each of the plurality of upper level devices and the time of the own device, based on the times at which the upper level packet transmitting/receiving unit transmits and receives the packet to each of the plurality of higher level devices and the upper level packet transmitting/receiving unit.
  • an offset calculation unit that calculates an offset
  • an offset pattern determination unit that determines whether each of the absolute values of the plurality of offsets is less than or equal to a threshold; a change from one offset to the next offset in at least one of the plurality of higher-level devices when it is determined that the absolute value and the absolute value of the offset larger than the threshold are included; an abnormal device determination unit that determines which of the plurality of higher-level devices is experiencing an abnormality at a given time based on the presence or absence of the abnormality.
  • the time synchronization method includes an upper packet transmitting/receiving unit that transmits and receives packets to each of the plurality of upper apparatuses, and synchronizes with any one of the plurality of upper apparatuses.
  • a time synchronization method for a time synchronization device wherein the time of each of the plurality of higher-level devices and the time of the own device are synchronized based on the times at which the packets are transmitted and received by each of the plurality of higher-level devices and the higher-level packet transmitting/receiving unit.
  • the method includes the step of determining, based on the presence or absence of a change, which of the plurality of higher-level devices at which an abnormality has occurred at the time of the higher-level device.
  • a program according to the present disclosure causes a computer to operate as the above-mentioned time synchronization device.
  • time synchronization device time synchronization method, and program according to the present disclosure, it is possible to determine which of a plurality of host devices has experienced an abnormality.
  • FIG. 1 is a diagram illustrating a configuration example of a time synchronization system according to a first embodiment of the present disclosure.
  • FIG. 3 is a diagram for explaining an offset between a first grand master clock and a boundary clock.
  • FIG. 7 is a diagram for explaining an offset between a second grand master clock and a boundary clock. The first grandmaster clock and the boundary when an abnormality occurs in the time of the first grandmaster clock that is the time source and no abnormality occurs in the time of the second groundmaster clock that is not the time source.
  • FIG. 3 is a sequence diagram showing message transmission and reception with a clock.
  • FIG. 3 is a sequence diagram showing message transmission and reception with a clock.
  • the first grandmaster clock when no abnormality has occurred in the time of the first grandmaster clock that is the time source, and an abnormality has occurred in the time of the second groundmaster clock that is not the time source.
  • FIG. 3 is a sequence diagram showing message transmission and reception with a boundary clock.
  • the second grandmaster clock when no abnormality has occurred in the time of the first grandmaster clock that is the time source, and an abnormality has occurred in the time of the second groundmaster clock that is not the time source.
  • FIG. 3 is a sequence diagram showing message transmission and reception with a boundary clock.
  • 2 is a flowchart showing an example of the operation of the boundary clock shown in FIG. 1.
  • FIG. 2 is a flowchart showing an example of the operation of the boundary clock shown in FIG. 1.
  • FIG. FIG. 2 is a diagram illustrating a configuration example of a time synchronization system according to a second embodiment of the present disclosure.
  • 7 is a flowchart showing an example of the operation of the boundary clock shown in FIG. 6.
  • FIG. 7 is a flowchart showing an example of the operation of the boundary clock shown in FIG. 6.
  • FIG. FIG. 7 is a diagram showing an example of the hardware configuration of the boundary clock shown in FIGS. 1 and 6.
  • FIG. 1 is a diagram illustrating a configuration example of a conventional time synchronization system.
  • FIG. 2 is a diagram for explaining communication with two higher-level devices in a conventional time synchronization device.
  • FIG. 1 shows a time synchronization system 100 according to an embodiment of the present disclosure, which includes a plurality of grandmaster clocks 2 (in the example of FIG. 1, a first grandmaster clock 21 and a second grandmaster clock 22), and a time It includes a boundary clock 1 as a synchronization device and a client device 3.
  • the plurality of grand master clocks 2 each correspond to a higher-level device of the boundary clock 1
  • the client device 3 corresponds to a lower-level device of the boundary clock 1.
  • Each of the plurality of grand master clocks 2 transmits and receives packets to and from the boundary clock 1.
  • each of the plurality of grandmaster clocks 2 transmits to the boundary clock 1 a time stamp indicating the time when the grandmaster clock 2 transmits and receives the packet.
  • the first grandmaster clock 21 transmits to the boundary clock 1 a time stamp indicating the time when the first grandmaster clock 21 transmitted and received the packet.
  • the second grandmaster clock 22 transmits to the boundary clock 1 a time stamp indicating the time when the second grandmaster clock 22 transmitted and received the packet.
  • Grandmaster clock 2 may send the time stamp to boundary clock 1 by sending a packet containing the time stamp to boundary clock 1 .
  • the boundary clock 1 is synchronized with any one grandmaster clock 2 among the plurality of grandmaster clocks 2. Further, the client device 3 may be synchronized with the boundary clock 1.
  • the boundary clock 1 includes a plurality of upper packet transmitting/receiving sections 101 (in the example of FIG. 1, a first upper packet transmitting/receiving section 101a and a second upper packet transmitting/receiving section 101b). ), an offset calculation unit 102, a threshold storage unit 103, an offset pattern determination unit 104, an abnormal device determination unit 105, a time source switching unit 106, a time synchronization processing unit 107, a clock class rewriting unit 108, It includes a lower packet transmitting/receiving section 109 and a failure alert issuing section 110.
  • the plurality of upper packet transmitting/receiving units 101 and lower packet transmitting/receiving units 109 are configured by communication interfaces.
  • the offset calculation unit 102, the offset pattern determination unit 104, the abnormal device determination unit 105, the time source switching unit 106, the time synchronization processing unit 107, the clock class rewriting unit 108, and the failure alert issuing unit 110 are configured by a controller.
  • the controller may be configured with dedicated hardware such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array), a processor, or a combination of both. good.
  • the threshold storage unit 103 is composed of memories such as HDD (Hard Disk Drive), SSD (Solid State Drive), EEPROM (Electrically Erasable Programmable Read-Only Memory), ROM (Read-Only Memory), and RAM (Random Access Memory). be done.
  • HDD Hard Disk Drive
  • SSD Solid State Drive
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • the upper packet transmitting and receiving unit 101 transmits and receives packets to and from each of the plurality of grand master clocks 2. Further, the upper packet transmitting/receiving section 101 outputs the time stamp included in the packet received from the grand master clock 2 to the offset calculating section 102.
  • the timestamp is the time when the grand master clock 2 sent the Sync message, the time when the upper packet transmitter/receiver 101 received the Sync message, and the time when the upper packet transmitter/receiver 101 sent the Delay_Req message. , and the time at which the grand master clock 2 transmitted the Delay_Req message.
  • a time stamp indicating the time when the grandmaster clock 2 transmitted the Sync message and the time when the grandmaster clock 2 received the Delay_Req message is included in the packet transmitted from the grandmaster clock 2.
  • the first higher-order packet transmitting/receiving section 101a transmits and receives packets to and from the first grand master clock 21. Then, the first upper packet transmitting/receiving unit 101a outputs a timestamp indicating the time when the above-described Sync message and Delay_Req message were transmitted and received to the offset calculating unit 102. Further, the second upper packet transmitting/receiving section 101b transmits and receives packets to and from the second grand master clock 22. Then, the second upper packet transmitting/receiving unit 101b outputs to the offset calculating unit 102 a time stamp indicating the time when the above-described Sync message and Delay_Req message were transmitted and received.
  • the offset calculation unit 102 calculates a plurality of offsets, which are the differences between the time of each of the plurality of upper-level devices and the time of the own device, based on the times at which the upper-level packet transmitting/receiving unit 101 transmits and receives packets to each of the plurality of grandmaster clocks 2. Calculate.
  • the offset calculation unit 102 obtains a timestamp during packet transmission and reception between the first higher-order packet transmission and reception unit 101a and the first grandmaster clock 21.
  • the offset calculation unit 102 calculates the offset between the time of the first grand master clock 21 and the time of the boundary clock 1 (hereinafter referred to as "first offset Os1") based on the acquired time stamp.
  • the first grand master clock 21 transmits a Sync message to the first upper packet transmitter/receiver 101a.
  • the Sync message includes a time stamp indicating time T1, which is the time when the grand master clock 2 sends the Sync message.
  • the first upper packet transmitting/receiving unit 101a Upon receiving the Sync message transmitted from the first grandmaster clock 21 at time T2, the first upper packet transmitting/receiving unit 101a transmits a Delay_Req message to the grandmaster clock 2 at time T3.
  • the first grand master clock 21 receives the Delay_Req message transmitted from the first upper packet transmitting/receiving section 101a at time T4. Then, the first grand master clock 21 transmits a Delay_Resp message (delay response message) to the first upper packet transmitter/receiver 101a. At this time, the Delay_Resp message includes a time stamp indicating time T4, which is the time when the first grand master clock 21 receives the Delay_Req message.
  • the offset calculation unit 102 calculates the timestamp included in the Sync message, indicating the time T1 when the first grand master clock 21 transmitted the Sync message, and the time T2 when the first upper packet transmitting/receiving unit 101a received the Sync message.
  • a timestamp indicating the time T3 when the first upper packet transmitting/receiving unit 101a transmitted the Delay_Req message, and a timestamp indicating the time T4 when the grand master clock 2 transmitted the Delay_Req message included in the Delay_Resp message. is obtained from the first upper packet transmitting/receiving unit 101a.
  • the offset calculation unit 102 calculates the first offset Os1 as shown in Equation 1 below.
  • Os1 ((T2-T1)-(T4-T3))/2 (Formula 1)
  • the first offset Os1 includes one offset (for example, the first first offset) Os11 and the next offset after the first offset (for example, the second first offset) Os12. It will be done.
  • “one offset” is an offset calculated based on the transmission/reception time of one set of messages (eg, transmission/reception between times T1 to T4).
  • the “next offset” is an offset calculated based on the transmission/reception time of the next set of messages (for example, transmission/reception between times T5 and T8) of one message set.
  • the offset calculation unit 102 obtains time stamps during packet transmission and reception between the second upper packet transmitting and receiving unit 101b and the second grandmaster clock 22, and based on the obtained time stamps, the offset calculation unit 102 An offset between the time of the clock 22 and the time of the boundary clock 1 (hereinafter referred to as "second offset Os2") is calculated.
  • the second grand master clock 22 transmits a Sync message to the second upper packet transmitter/receiver 101b.
  • the Sync message includes a time stamp indicating time T9, which is the time when the grand master clock 2 sent the Sync message.
  • the second upper packet transmitting/receiving unit 101b Upon receiving the Sync message transmitted from the second grandmaster clock 22 at time T10, the second upper packet transmitting/receiving unit 101b transmits a Delay_Req message to the grandmaster clock 2 at time T11.
  • the second grand master clock 22 When the second grand master clock 22 receives the Delay_Req message transmitted from the second upper packet transmitter/receiver 101b at time T12, it transmits the Delay_Resp message to the second upper packet transmitter/receiver 101b. At this time, the Delay_Resp message includes a time stamp indicating time T12, which is the time when the second grand master clock 22 receives the Delay_Req message.
  • the second offset Os2 includes one offset (for example, the first second offset) Os21 and the next offset after the first offset (for example, the second second offset) Os22. It will be done.
  • “one offset” is an offset calculated based on the transmission/reception time of one set of messages (for example, transmission/reception between times T9 and T12).
  • the “next offset” is an offset calculated based on the transmission/reception time of the next set of messages (for example, transmission/reception between times T13 and T16) of one message set.
  • the threshold value storage unit 103 stores a threshold value TH used by an offset pattern determination unit 104, which will be described later, to determine an offset pattern.
  • the threshold value may be a predetermined fixed value (for example, 1 ms). Further, the threshold value may be an average value of offsets (at least one of the first offset Os1 and the second offset Os2) over a certain period of time.
  • the threshold value is calculated for each of a plurality of pieces of data (e.g., 60) that are sent and received periodically (e.g., every second) during a certain period of time (e.g., one minute) after starting communication using the PTP protocol.
  • the average value of a plurality of offsets (for example, 60) may be used.
  • the offset pattern determination unit 104 determines whether the absolute values of the plurality of offsets calculated by the offset calculation unit 102 are less than or equal to the threshold TH. Further, the offset pattern determination unit 104 determines that no abnormality has occurred in any of the times of the boundary clock 1 and the plurality of grand master clocks 2 when all of the absolute values of the plurality of offsets are equal to or less than the threshold value. do. Further, the offset pattern determination unit 104 determines that an abnormality has occurred in the time of the own device (boundary clock 1) when all of the absolute values of the plurality of offsets are larger than the threshold value.
  • the offset pattern determination unit 104 determines whether the absolute value of the first offset Os1 is less than or equal to the threshold TH, and determines whether the absolute value of the second offset Os2 is less than or equal to the threshold TH. Determine.
  • the object to be determined by the offset pattern determination unit 104 is the first offset Os1 after the boundary clock 1 is synchronized with the grand master clock 2 which is the time source (the second first offset Os1 based on times T5 to T8). offset Os12).
  • the object of determination by the offset pattern determination unit 104 is the second offset Os2 after the boundary clock 1 is synchronized with the grand master clock 2 which is the time source (the second second offset based on times T13 to T16). Os22).
  • the offset pattern determination unit 104 determines that the absolute value of the first offset Os1 is equal to or less than the threshold value TH, It is determined that no abnormality has occurred at any of the times.
  • the offset pattern determination unit 104 determines that the absolute value of the offset based on the timestamp in the communication with the grandmaster clock 2 which is the time source is less than or equal to the threshold TH, and the offset pattern determination unit 104 determines that If it is determined that the absolute value of the based offset is larger than the threshold TH, it is determined that either the time of the first grand master clock 21 or the second grand master clock 22 is abnormal.
  • the offset pattern determination unit 104 determines that the absolute value of the first offset Os1 is equal to or less than the threshold TH. If it is determined that the absolute value of the second offset Os2 is larger than the threshold TH, it is determined that an abnormality has occurred in either the time of the first grand master clock 21 or the second grand master clock 22. judge.
  • the offset pattern determination unit 104 determines that the absolute value of the first offset Os1 is larger than the threshold TH, If it is determined that the absolute value of the second offset Os2 is less than or equal to the threshold TH, it is determined that an abnormality has occurred in either the time of the first grand master clock 21 or the second grand master clock 22. .
  • the offset pattern determining unit 104 determines that the own device (boundary clock 1) It is determined that an abnormality has occurred at the time.
  • the offset pattern determination unit 104 controls the clock class rewriting unit 108 to rewrite the clock class (Clock Class) based on whether or not an abnormality has occurred in the time of the own device. Specifically, when the offset pattern determining unit 104 determines that an abnormality has occurred in the time of the own device, the clock class rewriting unit 108 indicates that an abnormality has occurred in the time of the own device. Controls rewriting to clock class.
  • the abnormal device determination unit 105 An abnormality occurs in the time of which grandmaster clock 2 among the plurality of grandmaster clocks 2 based on the presence or absence of a change from one offset to the next offset in at least one of the plurality of grandmaster clocks 2. Determine whether
  • the abnormal device determination unit 105 determines that an abnormality has occurred in the time of the grandmaster clock 2, which is the time source among the plurality of grandmaster clocks 2, and determines that there is no fluctuation. In this case, it is determined that an abnormality has occurred in the time of the grandmaster clock 2 that is not the time source among the plurality of grandmaster clocks 2.
  • the abnormal device determination unit 105 detects one offset (first offset of the first time) in communication with the first grandmaster clock 21 when the time source is the first grandmaster clock 21. Os11) may be determined to be "with offset”. In this configuration, the abnormal device determination unit 105 determines whether the offset following the first offset (the second first offset Os12) is "with offset”. Then, if the result of the first determination regarding the first offset Os11 is different from the result of the second determination regarding the first offset Os12, the abnormal device determination unit 105 determines the time of the first grand master clock 21. It is determined that an abnormality has occurred.
  • the abnormal device determination unit 105 determines that the first offset Os11 that is the time source It is determined that an abnormality has occurred in the time of the grand master clock 21.
  • the abnormal device determination unit 105 determines that one offset (the first second offset Os21) in communication with the second grandmaster clock 22 when the time source is the first grandmaster clock 21 is It may be determined whether or not there is an "offset", and then it may be determined whether or not the next offset after the first offset (the second second offset Os22) is "with an offset”. If the result of the first determination regarding the second offset Os21 is different from the result of the second determination regarding the second offset Os22, the abnormal device determination unit 105 determines that the time of the first grand master clock 21 is abnormal. It is determined that this is occurring.
  • the abnormal device determination unit 105 determines that It is determined that an abnormality has occurred at the time of the grand master clock 21 of No. 1.
  • FIG. 3A is a sequence diagram showing the transmission and reception of messages between the first grand master clock 21 in which a time abnormality has occurred and the boundary clock 1.
  • FIG. 3B is a sequence diagram showing transmission and reception of messages between the second grand master clock 22 in which no time abnormality occurs and the boundary clock 1.
  • the transmission delay time in communication between the first grand master clock 21 and the second grand master clock 22 and the boundary clock 1 is "1".
  • the first grand master clock 21 is the time source of the boundary clock 1
  • the second grand master clock 22 is not the time source of the boundary clock 1.
  • the numbers outside the parentheses corresponding to TX are the times indicated by the clocks of each device. Note that if the clocks of each device are out of sync, the correct time is shown in parentheses corresponding to TX.
  • the first grand master clock 21 transmits the first set of Sync messages to the boundary clock 1 at the correct time "6".
  • an abnormality has occurred in the time of the first grand master clock 21, and the time has deviated from the correct time.
  • the offset calculation unit 102 calculates the first offset Os11 of the first set as shown in Equation 3 below.
  • the time synchronization processing unit 107 which will be described in detail later, synchronizes the boundary clock 1 with the first grand master clock 21 using the first offset Os1 of the first set calculated by the offset calculation unit 102. .
  • the first grand master clock 21 transmits the second set of Sync messages to the boundary clock 1 at the correct time "15".
  • an abnormality has occurred in the time of the first grand master clock 21, and the time has deviated from the correct time.
  • the offset calculation unit 102 calculates the first offset Os12 of the second set as shown in Equation 4 below.
  • the abnormal device determination unit 105 determines whether or not the first offset Os11 in the communication using the first grand master clock 21 as the time source is "with offset”, and It is determined whether the first offset Os12 is "with offset". In this example, the first offset Os11 at the first time is "-3 (with offset)" and the first offset Os12 at the second time is "0 (no offset)". Therefore, the abnormal device determination unit 105 determines that the first offset Os1 has changed from "offset present" to "no offset”.
  • the second grand master clock 22 transmits the first set of Sync messages to the boundary clock 1 at the correct time "6".
  • the offset calculation unit 102 calculates the second offset Os21 of the first set as shown in Equation 5 below.
  • the boundary clock 1 is synchronized with the first grand master clock 21.
  • the boundary clock 1 is not synchronized with the second grandmaster clock 22.
  • the second grand master clock 22 transmits a second set of Sync messages to the boundary clock 1 at the correct time "15".
  • the offset calculation unit 102 calculates the second offset Os22 of the second set as shown in Equation 6 below.
  • the abnormal device determination unit 105 determines whether or not the first second offset Os21 in the communication using the first grand master clock 21 as the time source is "with offset”, and It is determined whether the second offset Os22 is "with offset". In this example, the second offset Os21 at the first time is "0 (no offset)", and the second offset Os22 at the second time is "3 (with offset)". Therefore, the abnormal device determining unit 105 determines that the second offset has changed from "no offset” to "with offset”.
  • the abnormal device determination unit 105 determines that the first offset has changed from “with offset” to "no offset”, so that It may be determined that an abnormality has occurred at the time of the grand master clock 21). In addition, when it is determined that the second offset has changed from "no offset” to "with offset,” the abnormal device determination unit 105 determines that the time source, the grand master clock 2 (in this example, the first ground It may be determined that an abnormality has occurred in the time of the master clock 21).
  • FIG. 4A is a sequence diagram showing message transmission and reception between the first grand master clock 21 in which no time abnormality occurs and the boundary clock 1.
  • FIG. 4B is a sequence diagram showing the transmission and reception of messages between the second grand master clock 22 in which a time abnormality has occurred and the boundary clock 1.
  • the transmission delay time in communication between the first grand master clock 21 and the second grand master clock 22 and the boundary clock 1 is "1".
  • the first grand master clock 21 is the time source of the boundary clock 1
  • the second grand master clock 22 is not the time source of the boundary clock 1.
  • the numbers outside the parentheses corresponding to TX are the times indicated by the clocks of each device. Note that if the clocks of each device are out of sync, the correct time is shown in parentheses corresponding to TX.
  • the first grand master clock 21 transmits the first set of Sync messages to the boundary clock 1 at the correct time "6".
  • the first grand master clock 21 When the first grand master clock 21 receives the Delay_Req message sent from the boundary clock 1 at the correct time “9”, it sends the Delay_Resp message to the boundary clock 1.
  • the offset calculation unit 102 calculates the first offset Os11 of the first set as shown in Equation 7 below.
  • the time synchronization processing unit 107 sets the time of the boundary clock 1 to the first grandmaster clock 21 using the first offset Os11 of the first set calculated by the offset calculation unit 102. Synchronize. At this time, the boundary clock 1 is not changed because it is already synchronized with the first grand master clock 21 (the first offset Os11 is "0").
  • the first grand master clock 21 transmits the second set of Sync messages to the boundary clock 1 at the correct time "15".
  • the offset calculation unit 102 calculates the first offset Os12 of the second set as shown in Equation 8 below.
  • the abnormal device determination unit 105 determines whether or not the first offset Os11 in the communication using the first grand master clock 21 as the time source is "with offset”, and It is determined whether the first offset Os12 is "with offset”. In this example, the first offset Os11 at the first time is "0 (no offset)", and the first offset Os12 at the second time is "0 (no offset)". Therefore, the abnormal device determination unit 105 determines that the first offset Os1 has not changed.
  • the second grand master clock 22 transmits the first set of Sync messages to the boundary clock 1 at the correct time "6".
  • an abnormality has occurred in the time of the second grand master clock 22, and the time has deviated from the correct time.
  • the offset calculation unit 102 calculates the second offset Os21 of the first set as shown in Equation 9 below.
  • the boundary clock 1 is synchronized with the first grand master clock 21, which is a time source.
  • the boundary clock 1 is not synchronized with the second grand master clock 22, which is not a time source.
  • the second grand master clock 22 transmits a second set of Sync messages to the boundary clock 1 at the correct time "15".
  • an abnormality has occurred in the time of the second grand master clock 22, and the time has deviated from the correct time.
  • the offset calculation unit 102 calculates the second offset Os22 of the second set as shown in Equation 10 below.
  • the abnormal device determination unit 105 determines whether or not the second offset Os21 in the first communication in which the boundary clock 1 uses the first grand master clock 21 as the time source is "with offset”. , it is determined whether the second offset Os22 of the second time is "with offset”. In this example, the second offset Os21 at the first time is "-3 (with offset)" and the second offset Os22 at the second time is "-3 (with offset)". Therefore, the abnormal device determination unit 105 determines that the second offset has not changed.
  • the abnormal device determination unit 105 changes the time of the grandmaster clock 2 (in this example, the second grandmaster clock 22), which is not the time source, because it is determined that the first offset has not changed. It may be determined that an abnormality has occurred. In addition, the abnormal device determination unit 105 determines that there is an abnormality in the time of the grandmaster clock 2 (in this example, the second grandmaster clock 22), which is not the time source, because it is determined that the second offset has not changed. It may be determined that this has occurred.
  • the time source switching unit 106 switches the time source of the own device.
  • the grandmaster clock 2 which is different from the grandmaster clock 2 that has become the time source, is switched to be the time source.
  • the time source switching unit 106 2 to use the grand master clock 22 as the time source.
  • the second grandmaster clock 22 is the time source, if it is determined that an abnormality has occurred in the time of the second grandmaster clock 22, the time source switching unit 106 Switch to use the master clock 21 as the time source.
  • the time synchronization processing unit 107 synchronizes the own device with the grand master clock 2 as the time source, based on the offset between the grand master clock 2 as the time source and the own device, which is calculated by the offset calculation unit 102.
  • the grandmaster clock 2 that is the time source is switched by the time source switching unit 106.
  • the clock class rewriting unit 108 rewrites the clock class when it is determined that an abnormality has occurred at the time of the boundary clock 1. Specifically, when it is determined that an abnormality has occurred in the time of boundary clock 1, the clock class rewriting unit 108 rewrites the clock class to indicate that an abnormality has occurred in boundary clock 1. .
  • the lower packet transmitting and receiving unit 109 transmits and receives packets to and from the client device 3. Further, the packet transmitted from the lower packet transmitting/receiving unit 109 to the client device 3 may include a timestamp indicating the time when the boundary clock 1 transmits/receives the packet. Further, the lower packet transmitting/receiving unit 109 may transmit the clock class to the client device 3. For example, the packet transmitted from the lower packet transmitting/receiving unit 109 to the client device 3 may further include the clock class output by the clock class rewriting unit 108.
  • the failure alert issuing unit 110 may issue an alert indicating that an abnormality has occurred in the time of the grandmaster clock 2. Further, the failure alert issuing unit 110 may issue an alert indicating that an abnormality has occurred in the time of the own device when it is determined that all of the absolute values of the plurality of offsets are larger than a threshold value. The failure alert issuing unit 110 may transmit the alert to another device via a communication network, display the alert on a display, or output the alert via audio, for example.
  • the fault alert issuing unit 110 does not issue an alert if the offset pattern determining unit 104 determines that both the grand master clock 2 and the boundary clock 1 are normal. In this case, the time synchronization system 100 continues to operate without any special work being performed on the time synchronization system 100.
  • the client device 3 transmits and receives packets to and from the lower packet transmitting and receiving unit 109.
  • a packet transmitted from the lower packet transmitting/receiving unit 109 to the client device 3 includes a timestamp indicating the time when the boundary clock 1 transmits/receives the packet
  • the client device 3 transmits the client device 3 to the boundary clock 1.
  • the clock class may indicate that an abnormality has occurred in the time of the own device. If the client device 3 indicates that the clock class is present, synchronization of the client device 3 with the boundary clock 1 that transmitted the clock class is stopped. Furthermore, the client device 3 may start time synchronization with a boundary clock different from the boundary clock 1 that transmitted the clock class.
  • FIGS. 5A and 5B are flowcharts showing an example of the operation of the boundary clock 1 according to the first embodiment.
  • the operation of the boundary clock 1 described with reference to FIGS. 5A and 5B is based on the first embodiment, and includes an upper packet transmitting/receiving section 101 that transmits and receives packets to each of the plurality of grandmaster clocks 2.
  • This corresponds to an example of a time synchronization method for the boundary clock 1 (time synchronization device) that synchronizes with any one of the grand master clocks 2 among the clocks 2.
  • the first grand master clock 21 is the time source
  • the second grand master clock 22 is not the time source.
  • step S11 the offset calculation unit 102 acquires a timestamp from the upper packet transmission/reception unit 101. Specifically, the offset calculation unit 102 obtains time stamps (T1 to T8 shown in FIG. 2A) from the first upper packet transmission/reception unit 101a. Further, the offset calculation unit 102 obtains a time stamp from the second upper packet transmission/reception unit 101b (T9 to T16 shown in FIG. 2B).
  • step S12 the offset calculation unit 102 calculates the difference between the time of each of the plurality of grandmaster clocks 2 and the time of the own device based on the times at which the upper packet transmission/reception unit 101 transmits and receives packets to each of the plurality of grandmaster clocks 2. Compute multiple offsets that are the difference.
  • the offset calculation unit 102 calculates the first offset of the first set based on the times T1 to T4 indicated by the time stamps of the respective messages of the first set acquired from the first upper packet transmitting/receiving unit 101a. Calculate Os11. Further, the offset calculation unit 102 calculates the second offset Os21 of the first set based on the times T9 to T12 indicated by the time stamps of the respective messages of the first set acquired from the second upper packet transmission/reception unit 101b. do. Further, the offset calculation unit 102 calculates the first offset Os12 of the second set based on the times T5 to T8 indicated by the time stamps of the respective messages of the second set acquired from the first upper packet transmission/reception unit 101a. do. Further, the offset calculation unit 102 calculates a second offset Os22 of the second set based on the times T13 to T16 indicated by the time stamps of the respective messages of the second set acquired from the second upper packet transmission/reception unit 101b. do.
  • step S13 the offset pattern determination unit 104 compares the absolute values of the first offset Os12 and the second offset Os22 of the second set with the threshold value TH. Specifically, first, the offset pattern determination unit 104 determines whether each of the absolute values of a plurality of offsets is less than or equal to a threshold value.
  • step 13 if it is determined that the absolute value of the first offset Os12 of the second set is equal to or less than the threshold value TH, and the absolute value of the second offset Os22 of the second set is determined to be equal to or less than the threshold value TH ( In pattern A), in step S14, the offset pattern determining unit 104 determines that no abnormality has occurred in either the grand master clock 2 or the boundary clock 1.
  • step 13 if it is determined that the absolute value of the first offset Os12 in the second set is less than or equal to the threshold TH, and if it is determined that the absolute value of the second offset Os22 in the second set is greater than the threshold TH (pattern B or C), in step S15, the offset pattern determining unit 104 determines that an abnormality has occurred in the time of the first grand master clock 21 or the second grand master clock 22.
  • the abnormal device determination unit 105 adds the absolute values of the plurality of offsets (first offset Os1 and second offset Os2) to the absolute value of the offset that is less than or equal to the threshold TH, and the absolute value of the offset that is less than or equal to the threshold TH. If it is determined that a larger absolute value of the offset is included, the offset from one offset (for example, the first first offset Os11) in at least one of the plurality of grand master clocks 2. Based on the presence or absence of a change to the next offset (for example, the second first offset Os12), it is determined which grandmaster clock 2 among the plurality of grandmaster clocks 2 at which an abnormality has occurred. judge.
  • the processing from step S16 to step S21 will be explained in detail.
  • the abnormal device determination unit 105 determines whether there is any variation in the offset between the grand master clock 2 and the own device. In this example, the abnormal device determination unit 105 determines whether there is a change in the offset between the grand master clock 2, which is the time source, and the own device. Furthermore, the abnormal device determination unit 105 may determine whether there is a change in the offset between the grand master clock 2, which is not a time source, and the own device. The abnormal device determining unit 105 may also determine whether there is a change in the offset between the grand master clock 2 that is a time source and the grand master clock 2 that is not a time source and the own device.
  • step S17 the abnormal device determination unit 105 determines that an abnormality has occurred in the time of the grand master clock 2, which is the time source. (Pattern B).
  • step S18 the fault alert issuing unit 110 issues an alert indicating that an abnormality has occurred in the time of the grand master clock 2, which is the time source.
  • step S19 the time source switching unit 106 switches the grand master clock 2, which was not the time source, to become the time source.
  • step S20 the abnormal device determination unit 105 determines that an abnormality has occurred in the time of the grand master clock 2, which is not the time source. (Pattern C).
  • step S21 the failure alert issuing unit 110 issues an alert indicating that an abnormality has occurred in the time of the grand master clock 2, which is not the time source.
  • step S22 the offset pattern determining unit 104 determines that an abnormality has occurred in the time of the own device (boundary clock 1).
  • step S23 the failure alert issuing unit 110 issues an alert indicating that an abnormality has occurred at the time of the boundary clock 1.
  • step S24 the clock class is rewritten to indicate that an abnormality has occurred in the time of boundary clock 1.
  • the first grand master clock 21 is the time source and the second grand master clock 22 is not the time source, but the invention is not limited to this.
  • the first grandmaster clock 21 may not be the time source, but the second grandmaster clock 22 may be the time source.
  • the offset pattern determining unit 104 determines that an abnormality has occurred in either the time of the first grand master clock 21 or the second grand master clock 22.
  • the boundary clock 1 as a time synchronization device includes an upper packet transmitting/receiving unit 101 that transmits and receives packets to and from a plurality of grandmaster clocks 2, and a plurality of grandmaster clocks 2, respectively.
  • An offset calculation unit 102 that calculates a plurality of offsets that are the differences between the time of each of the plurality of grand master clocks 2 and the time of the own device based on the time when the upper packet transmission/reception unit 101 transmits and receives the packet, and the plurality of offsets.
  • An offset pattern determination unit 104 that determines whether each of the absolute values of is equal to or less than a threshold value; For each of the plurality of host devices, an abnormality occurs in the time of which grandmaster clock 2 among the plurality of grandmaster clocks 2 based on whether there is a change from one offset to the next offset.
  • an abnormal device determination unit 105 that determines whether the Thereby, the boundary clock 1 can determine at which time of its own device or of the plurality of grand master clocks 2 an abnormality has occurred. Therefore, when it is recognized that a failure has occurred in the time synchronization system 100, the failure can be quickly isolated and normal operation can be quickly restored.
  • a maintenance manager or the like can determine which device is causing a failure in the time synchronization system 100 without going to the site where a plurality of grand master clocks 2 and boundary clocks 1 are installed.
  • the boundary clock 1 as a time synchronization device has an abnormality in the time of the first grandmaster clock 21, which is the time source of the own device, among the plurality of grandmaster clocks 2.
  • the clock further includes a time source switching unit 106 that switches to use a second grand master clock 22 different from the first grand master clock 21 as the time source when it is determined that the time source is generated.
  • the boundary clock 1 as the time synchronization device determines that the grandmaster clock 2 has an abnormality in time, it is determined that an abnormality has occurred in the time of the grandmaster clock 2.
  • the system further includes a failure alert issuing unit 110 that issues an alert indicating that there is a failure.
  • the maintenance manager or the like of the time synchronization system 100 can quickly recognize which grandmaster clock 2 has an abnormality in time, so they can quickly identify which grandmaster clock 2 has an abnormality in time. The master clock 2 can be restored.
  • the boundary clock 1 as the time synchronization device determines that all of the absolute values of the plurality of offsets are larger than the threshold value, it is determined that an abnormality has occurred in the time of the own device.
  • the system further includes a failure alert issuing unit 110 that issues an alert indicating.
  • the boundary clock 1 as a time synchronization device also includes a clock class rewriting unit 108 that rewrites the clock class when it is determined that an abnormality has occurred in the time of the own device, and a clock class rewriting unit 108 that rewrites the clock class. It further includes a lower packet transmitting/receiving section 109 that transmits the packet to the client device 3.
  • the client device 3 can, for example, change its settings so that it is synchronized with a boundary clock whose time is normal, which is different from the boundary clock 1 to which the clock class indicating that an abnormality has occurred in the time has been transmitted. Can be done. Therefore, it is possible to avoid problems occurring in the client device 3 and the user's device connected to the client device 3.
  • the offset pattern determination unit 104 determines that there is "no offset” when the absolute value of the offset is "0", but this is not restrictive. For example, the offset pattern determination unit 104 determines that there is “no offset” when the absolute value of the offset is less than a predetermined value, and determines that there is “offset” when the absolute value of the offset is greater than or equal to the predetermined value. You may judge.
  • the predetermined value is a value that is operationally acceptable as an offset error that occurs due to an offset in communication between a normal grandmaster clock 2 and a normal boundary clock 1 that synchronizes the grandmaster clock 2.
  • the plurality of grand master clocks 2 included the first grand master clock 21 and the second grand master clock 22, but the present invention is not limited to this.
  • the plurality of grandmaster clocks 2 may include three or more grandmaster clocks 2.
  • a time synchronization system 100-1 includes a plurality of grand master clocks 2 (in the example of FIG. 6, a first grand master clock 21 and a second grand master clock 21).
  • a master clock 22), a boundary clock 1-1 as a time synchronization device, and a client device 3 are provided.
  • each of the plurality of grand master clocks 2 corresponds to a higher-level device of the boundary clock 1-1
  • the client device 3 corresponds to a lower-level device of the boundary clock 1-1.
  • the same reference numerals are given to the same functional units as in the first embodiment, and the description thereof will be omitted.
  • the boundary clock 1-1 includes a plurality of upper packet transmitting and receiving units 101 (in the example of FIG. 6, a first upper packet transmitting and receiving unit 101a and a second upper packet transmitting and receiving unit 101a).
  • section 101b ), offset calculation section 102, threshold storage section 103, offset pattern determination section 104, abnormal device determination section 105, time source switching section 106, time synchronization processing section 107, and clock class rewriting section 108 , a lower packet transmitting/receiving section 109 , a failure alert issuing section 110 , and a time selection section 111 .
  • the time selection unit 111 is configured by a controller.
  • the time selection unit 111 executes processing for selecting a grandmaster clock 2 with which the time of the own device is synchronized from among a plurality of grandmaster clocks 2 with which the boundary clock 1-1 can communicate.
  • the time selection unit 111 selects, from a plurality of grandmaster clocks 2, a grandmaster clock 2 (target of time synchronization) with which the time of the own device is to be synchronized, in accordance with, for example, BMCA defined in IEEE Std 1588TM-2008.
  • FIGS. 7A and 7B are flowcharts showing an example of the operation of the boundary clock 1-1 according to the second embodiment.
  • the operation of the boundary clock 1-1 described with reference to FIGS. 7A and 7B corresponds to an example of a time synchronization method for the boundary clock 1-1 as a time synchronization device according to the second embodiment.
  • two grand master clocks A and B correspond to the first grand master clock 21 and the second grand master clock 22 shown in FIG. 6, respectively.
  • the time selection unit 111 receives the following parameters for grandmaster clock A and grandmaster clock B from each of the first upper packet transmitting and receiving units 101a and 101b. Get the containing packet.
  • Identification code GM (Grand Master) Identity
  • Priority 1 GM priority 1: First priority for each grand master clock A and B set by the administrator.
  • GM class Value indicating traceability (traceability to UTC (indicator indicating reliability of time)) for each grand master clock A and B
  • GM clock accuracy (GM accuracy value): Grand master clock A GM clock stability (GM offsetScaledLogVariance): A value that indicates the stability of each grand master clock A and B.
  • Priority 2 GM priority 2: Grand master clock A set by the administrator. and the second priority per B
  • step S32 the time selection unit 111 determines whether the identification codes of grand master clock A and grand master clock B are the same.
  • step S33 the time selection unit 111 selects the boundary clock 1 from each grandmaster clock.
  • the time synchronization target is selected by comparing the number of connection stages up to -1, the upstream port number, the receiving side port number, and the receiving side port number of the same data set.
  • the process of step S33 is described in IEEE Std 1588TM-2008, etc., so the explanation here will be omitted.
  • step S34 the time selection unit 111 selects the identification codes of grandmaster clock A and grandmaster clock B. Compare the priority level 1 of
  • step S34 If it is determined in step S34 that priority 1 of grandmaster clock A is lower than priority 1 of grandmaster clock B (A ⁇ B in step S34), the time selection unit 111 synchronizes grandmaster clock A with time. (Step S35).
  • step S34 If it is determined in step S34 that priority 1 of grandmaster clock B is lower than priority 1 of grandmaster clock A (B ⁇ A in step S34), the time selection unit 111 synchronizes grandmaster clock B with time. (Step S36).
  • step S37 If it is determined in step S37 that the GM class of grandmaster clock A is smaller than the GM class of grandmaster clock B (A ⁇ B in step S37), the time selection unit 111 selects grandmaster clock A as the target of time synchronization. (step S35).
  • step S37 If it is determined in step S37 that the GM class of grandmaster clock B is smaller than the GM class of grandmaster clock A (B ⁇ A in step S37), the time selection unit 111 selects grandmaster clock B as the target of time synchronization. (step S36).
  • step S38 the time selection unit 111 selects the GM class of grand master clock A and grand master clock B. Compare the GM clock accuracy of master clock B.
  • step S38 If it is determined in step S38 that the GM clock precision of grand master clock A is smaller than the GM clock precision of grand master clock B (A ⁇ B in step S38), the time selection unit 111 synchronizes grand master clock A with time. (Step S35).
  • step S38 If it is determined in step S38 that the GM clock precision of grand master clock B is smaller than the GM clock precision of grand master clock A (B ⁇ A in step S38), the time selection unit 111 synchronizes grand master clock B with time. (Step S36).
  • step S39 the time selection unit 111 selects the Compare the GM clock stability of grand master clock B.
  • step S39 If it is determined in step S39 that the GM clock stability of grand master clock A is smaller than the GM clock stability of grand master clock B (A ⁇ B in step S39), the time selection unit 111 selects grand master clock A. It is selected as a target for time synchronization (step S35).
  • step S39 If it is determined in step S39 that the GM clock stability of grand master clock B is smaller than the GM clock stability of grand master clock A (B ⁇ A in step S39), the time selection unit 111 selects grand master clock B. It is selected as a target for time synchronization (step S36).
  • step S40 of FIG. 7B the offset pattern determination unit 104 It is determined whether an abnormality has occurred at the time of the boundary clock 1-1.
  • the processing in step S40 corresponds to the processing in steps S11 to S13 and S22 of the flowchart shown in FIG. 6, which was explained in the first embodiment.
  • the offset pattern determination unit 104 calculates the first offset Os1 and the second offset Os2, and calculates the absolute value and threshold value of the first offset Os12 and the second offset Os22, respectively. Compare with TH.
  • the offset pattern determination unit 104 determines whether the boundary It is determined that an abnormality has occurred at the time of clock 1-1 (step S22 in FIG. 5A). Returning to FIG. 7B, if it is determined that an abnormality has occurred at the time of the boundary clock 1-1 (Yes in step S40), the boundary clock 1-1 ends the process.
  • step S40 If it is determined that no abnormality has occurred at the time of the boundary clock 1-1 (No in step S40), the offset pattern determination unit 104 and the abnormal device determination unit 105 determine the time of the grand master clock A or grand master clock B. It is determined whether an abnormality has occurred in (step S41).
  • the processing in step S41 corresponds to the processing in steps S13 to S17 and S21 of the flowchart shown in FIG. 6, which was explained in the first embodiment.
  • the offset pattern determination unit 104 determines whether the time of any device Also, it is determined that no abnormality has occurred (pattern A in S13 of FIG. 5A (corresponding to "no abnormality" in S41 of FIG. 7B)).
  • the abnormal device determination unit 105 determines whether there is a variation in the offset between the grand master clock 2 and the own device (boundary clock 1) (step S16 in FIG. 5B). When it is determined that there is a variation in the offset, the abnormal device determining unit 105 determines that an abnormality has occurred in the time of the grandmaster clock 2, which is the time source (step S17 in FIG. 5B (step S41 in FIG. 7B) (equivalent to "abnormality in A”)). Then, the time selection unit 111 selects the grand master clock B as a target for time synchronization (step S36).
  • the abnormal device determination unit 105 determines that an abnormality has occurred at the time of the grandmaster clock 2, which is not the time source (step S20 in FIG. 5B (step S20 in FIG. 7B). Corresponds to "Abnormality in B" in S41)). Then, the time selection unit 111 selects the grand master clock A as a target for time synchronization (step S35).
  • step S42 shown in FIG. 7B the time selection unit 111 compares the priority 2 of grand master clock A and grand master clock B.
  • step S42 If it is determined in step S42 that the priority 2 of grandmaster clock A is lower than the priority 2 of grandmaster clock B (A ⁇ B in step S42), the time selection unit 111 synchronizes grandmaster clock A with time. (Step S35).
  • step S42 If it is determined in step S42 that the priority 2 of grandmaster clock B is lower than the priority 2 of grandmaster clock A (B ⁇ A in step S42), the time selection unit 111 synchronizes grandmaster clock B with time. (Step S36).
  • step S42 If it is determined in step S42 that the identification code of grandmaster clock A is smaller than the identification code of grandmaster clock B (A ⁇ B), the time selection unit 111 selects grandmaster clock A as a target for time synchronization. (Step S35).
  • step S43 If it is determined in step S43 that the identification code of grandmaster clock B is smaller than the identification code of grandmaster clock A (B ⁇ A), the time selection unit 111 selects grandmaster clock B as a target for time synchronization. (Step S36).
  • the boundary clock 1-1 has a first grand master clock 21 (grand master clock A) and a second grand master clock 22 (grand master clock B) in BMCA. ) are determined to have the same priority 1, GM class, GM clock precision, and GM clock stability, it is determined whether an abnormality has occurred in the time of the boundary clock 1-1. Then, when it is determined that no abnormality has occurred in the time of the boundary clock 1-1, the boundary clock 1-1 determines that there is an abnormality in the time of either the first grand master clock 21 or the second grand master clock 22. Determine whether or not this is occurring.
  • the boundary clock 1-1 changes the timing of the grand master clock A and the grand master clock B in the BMCA. Compare priority 2.
  • the boundary clock 1-1 according to the second embodiment is determined to have the same priority level 1, GM class, GM clock precision, and GM clock stability in time source selection by BMCA, In addition, it is possible to avoid selecting the grand master clock 2 whose time is abnormal as the time source. Therefore, the boundary clock 1-1 can select the grand master clock 2 more appropriately than the conventional BMCA.
  • the boundary clock 1 is a time synchronization device
  • each of the plurality of grandmaster clocks 2 is a higher-level device
  • the client device 3 is a lower-level device
  • the client device 3 that can communicate with a plurality of boundary clocks 1 may be a time synchronization device
  • each of the plurality of boundary clocks 1 may be a host device.
  • the client device 3 capable of communicating with a plurality of boundary clocks 1-1 is a time synchronization device
  • each of the plurality of boundary clocks 1-1 is a host device, good.
  • the client device 3 includes an upper packet transmitting/receiving section 101 (for example, a first upper packet transmitting/receiving section 101a and a second upper packet transmitting/receiving section 101b), an offset calculating section 102, and a time synchronization processing section 107. , threshold storage unit 103 , offset pattern determination unit 104 , abnormal device determination unit 105 , time source switching unit 106 , clock class rewriting unit 108 , lower packet transmitting/receiving unit 109 , and failure alert issuing unit 110 . Be prepared. Further, the client device 3 may further include a time selection section 111.
  • FIG. 8 is a diagram showing an example of the hardware configuration of the boundary clocks 1 and 1-1 as time synchronization devices according to the first and second embodiments.
  • FIG. 8 shows an example of the hardware configuration of boundary clocks 1 and 1-1 in a case where boundary clocks 1 and 1-1 are configured by computers capable of executing program instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a workstation, a PC (Personal computer), an electronic notepad, or the like.
  • Program instructions may be program code, code segments, etc. to perform necessary tasks.
  • the boundary clocks 1 and 1-1 include a processor 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, a storage 14, an input section 15, a display section 16, and a communication interface ( I/F) 17.
  • the processor 11 is a CPU (Central Processing Unit), MPU (Micro Processing Unit), GPU (Graphics Processing Unit), DSP (Digital Signal Processor), SoC (System on a Chip), etc., and may be of the same or different type. It may be configured with a plurality of processors.
  • the processor 11 is a controller that controls each component and executes various calculation processes. That is, the processor 11 reads a program from a memory, which is the ROM 12 or the storage 14, and executes the program using the RAM 13 as a work area. The processor 11 controls each of the above components and performs various arithmetic operations according to programs stored in the ROM 12 or the storage 14. In the first and second embodiments, the ROM 12 or the storage 14 stores a program for causing the computer to function as the boundary clocks 1 and 1-1 according to the present disclosure. When the program is read and executed by the processor 11, each configuration of the boundary clocks 1 and 1-1 is realized.
  • Programs are stored in non-transitory storage media such as CD-ROM (Compact Disk Read Only Memory), DVD-ROM (Digital Versatile Disk Read Only Memory), and USB (Universal Serial Bus) memory. may be provided. Further, the program may be downloaded from an external device via a network.
  • CD-ROM Compact Disk Read Only Memory
  • DVD-ROM Digital Versatile Disk Read Only Memory
  • USB Universal Serial Bus
  • the ROM 12 stores various programs and various data.
  • the RAM 13 temporarily stores programs or data as a work area.
  • the storage 14 is configured with an HDD (Hard Disk Drive) or an SSD (Solid State Drive), and stores various programs including an operating system and various data.
  • the input unit 15 includes a pointing device such as a mouse and a keyboard, and is used to perform various inputs.
  • the display unit 16 is, for example, a liquid crystal display, and displays various information.
  • the display section 16 may employ a touch panel system and function as the input section 15.
  • the communication interface 17 is an interface for communicating with other devices (for example, the grandmaster clock 2 and the client device 3), and is, for example, a LAN interface.
  • the communication interface 17 realizes a plurality of upper packet transmitting/receiving sections 101 (in the examples of FIGS. 1 and 6, a first upper packet transmitting/receiving section 101a and a second upper packet transmitting/receiving section 101b) and a lower packet transmitting/receiving section 109. Ru.
  • a computer can be suitably used to function as each part of the boundary clocks 1 and 1-1 described above.
  • a program that describes the processing contents for realizing the functions of each part of the boundary clocks 1 and 1-1 is stored in the storage section of the computer, and this program is read and executed by the processor of the computer. This can be achieved by That is, the program can cause the computer to function as the boundary clocks 1 and 1-1 described above. It is also possible to record the program on a non-temporary storage medium. Moreover, it is also possible to provide the program via a network.
  • a time synchronization device that synchronizes with any one of a plurality of higher-level devices, a communication interface that transmits and receives packets to and from each of the plurality of higher-level devices; comprising a controller;
  • the controller includes: Calculating a plurality of offsets, which are the differences between the time of each of the plurality of upper-level devices and the time of the own device, based on the time at which each of the plurality of higher-level devices and the packet transmitting/receiving unit transmitted and received the packet, Determining whether each of the absolute values of the plurality of offsets is less than or equal to a threshold, If it is determined that the absolute values of the plurality of offsets include an absolute value of the offset that is less than or equal to the threshold value and an absolute value of the offset that is larger than the threshold value, in at least one of the plurality of higher-level devices, A time synchronization device that determines in which of the plurality
  • the controller determines that an abnormality has occurred in the time of the higher-level device that is the time source among the plurality of higher-level devices, and if there is no change, the controller determines that an abnormality has occurred in the time of the higher-level device that is the time source among the plurality of higher-level devices
  • the time synchronization device according to supplementary note 1, which determines that an abnormality has occurred in the time of a higher-level device that is not a time source.
  • the controller determines that no abnormality has occurred in the time of either the own device or the plurality of higher-level devices, and sets the plurality of offsets.
  • the time synchronization device according to Supplementary Note 1 or 2, wherein the time synchronization device determines that an abnormality has occurred in the time of its own device when both of the absolute values of are larger than the threshold value.
  • the controller determines that an abnormality has occurred in the time of a higher-level device that is a time source for its own device among the plurality of higher-level devices, the controller selects a time source that is different from the higher-level device.
  • the time synchronization device according to Supplementary Note 1 or 2, wherein the time synchronization device is switched to use a higher-level device that has not been used as a time source.
  • the controller determines that an abnormality has occurred in the time of a higher-level device, the controller issues an alert indicating that an abnormality has occurred in the time of the higher-level device, or determines which of the absolute values of the plurality of offsets.
  • the time synchronization device according to Supplementary Note 1 or 2 which issues an alert indicating that an abnormality has occurred in the time of the device itself when it is determined that the time is greater than the threshold value.
  • the controller determines that an abnormality has occurred in the time of a higher-level device
  • the controller issues an alert indicating that an abnormality has occurred in the time of the higher-level device, or determines which of the absolute values of the plurality of offsets.
  • the time synchronization device according to Supplementary Note 1 or 2 which issues an alert indicating that an abnormality has occurred in the time of the device itself when it is determined that the time is greater than the threshold value.
  • the controller rewrites the clock class when it is determined that an abnormality has occurred in the time of the own device, The time synchronization device according to Supplementary Note 1 or 2, wherein the communication interface transmits the clock class to a lower-order device.
  • a time synchronization method for a time synchronization device that includes a communication interface for transmitting and receiving packets with each of the plurality of higher-level devices, and synchronizes with any one of the plurality of higher-level devices, the method comprising: calculating a plurality of offsets, which are the differences between the time of each of the plurality of upper-level devices and the time of the own device, based on the time at which each of the plurality of higher-level devices and the communication interface transmitted and received the packet; determining whether each of the absolute values of the plurality of offsets is less than or equal to a threshold; If it is determined that the absolute values of the plurality of offsets include an absolute value of the offset that is less than or equal to the threshold value and an absolute value of the offset that is larger than the threshold value, in at least one of the plurality of higher-level devices, Determining which of the plurality of higher-level devices at which an abnormality has occurred at the time of the higher-level device, based on the presence or absence

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

A time synchronization device (1) according to the present disclosure comprises: an offset calculation unit (102) that calculates a plurality of offsets; an offset pattern determination unit (104) that determines whether the absolute value of each of the plurality of offsets is below a threshold value; and an abnormal device determination unit (105) that, if a determination is made that the absolute values of the plurality of offsets include an offset absolute value that is below a threshold value (TH) and an offset absolute value that is greater than or equal to the threshold value (TH), determines whether an abnormality has occurred in the time of one host device among a plurality of host devices, on the basis of the presence/absence of a change from one offset to the next offset.

Description

時刻同期装置、時刻同期方法、及びプログラムTime synchronization device, time synchronization method, and program
 本開示は、時刻同期装置、時刻同期方法、及びプログラムに関する。 The present disclosure relates to a time synchronization device, a time synchronization method, and a program.
 IEEE-1588規格で定義されたPTP(Precision Time Protocol)は、LAN(Local Area Network)上のコンピュータの時刻を高い精度で同期させるプロトコルである(非特許文献1参照)。図9は、PTPプロトコルを用いて、ネットワークを介して互いに通信する装置間の時刻を同期させる、時刻同期システム900の構成例を示す図である。 PTP (Precision Time Protocol) defined by the IEEE-1588 standard is a protocol that synchronizes the time of computers on a LAN (Local Area Network) with high precision (see Non-Patent Document 1). FIG. 9 is a diagram illustrating a configuration example of a time synchronization system 900 that uses the PTP protocol to synchronize time between devices that communicate with each other via a network.
 図9に示す時刻同期システム900は、複数のグランドマスタクロック(Ground Master Clock)2(図9の例では第1のグランドマスタクロック21及び第2のグランドマスタクロック22)と、従来のバウンダリクロック(Boundary Clock)9と、クライアント装置3とを備える。第1のグランドマスタクロック21とバウンダリクロック9とは、LAN等のネットワークを介して通信可能であり、第2のグランドマスタクロック22とバウンダリクロック9とは、LAN等のネットワークを介して通信可能である。また、バウンダリクロック9とクライアント装置3とは、LAN等のネットワークを介して通信可能である。 A time synchronization system 900 shown in FIG. 9 includes a plurality of ground master clocks 2 (in the example of FIG. 9, a first grand master clock 21 and a second grand master clock 22), and a conventional boundary clock ( Boundary Clock) 9 and a client device 3. The first grand master clock 21 and the boundary clock 9 can communicate with each other via a network such as a LAN, and the second grand master clock 22 and the boundary clock 9 can communicate with each other via a network such as a LAN. be. Furthermore, the boundary clock 9 and the client device 3 can communicate via a network such as a LAN.
 第1のグランドマスタクロック21及び第2のグランドマスタクロック22それぞれは、GPS(Global Positioning System)等の全球測位衛星システム(GNSS:Global Navigation Satellite System)の衛星からの信号(GNSS信号)を受信するGNSSアンテナを備える。第1のグランドマスタクロック21及び第2のグランドマスタクロック22それぞれは、GNSSアンテナを介してGNSS信号を受信し、受信したGNSS信号から協定世界時(UTC:Universal Time Coordinated)を取得する。第1のグランドマスタクロック21及び第2のグランドマスタクロック22それぞれは、ネットワークを介して、取得したUTCを基準時刻として配信するマスタ機能を備える。 The first grand master clock 21 and the second grand master clock 22 each receive a signal (GNSS signal) from a satellite of a global navigation satellite system (GNSS) such as a GPS (Global Positioning System). Equipped with a GNSS antenna. Each of the first grandmaster clock 21 and the second grandmaster clock 22 receives a GNSS signal via a GNSS antenna, and obtains Universal Time Coordinated (UTC) from the received GNSS signal. Each of the first grandmaster clock 21 and the second grandmaster clock 22 has a master function of distributing the acquired UTC as a reference time via the network.
 バウンダリクロック9は、マスタ機能を備える上位装置に対しては、上位装置から配信された時刻に自装置の時刻を同期させるスレーブ機能を備える装置として機能する。またバウンダリクロック9は、スレーブ機能を備える下位装置に対してはマスタ機能を備える装置として機能する。図9に示す時刻同期システム900においては、バウンダリクロック9は、第1のグランドマスタクロック21及び第2のグランドマスタクロック22それぞれに対してスレーブ機能を備える装置として機能する。具体的には、バウンダリクロック9は、一の時点では、第1のグランドマスタクロック21及び第2のグランドマスタクロック22のうちの、一方のグランドマスタクロック2に対してスレーブ状態となり、他方のグランドマスタクロック2に対してパッシブ状態となる。また、バウンダリクロック9は、他の時点では、第1のグランドマスタクロック21及び第2のグランドマスタクロック22のうちの、一方のグランドマスタクロック2に対してパッシブ状態となり、他方のグランドマスタクロック2に対してスレーブ状態となる。また、クライアント装置3に対してはマスタ機能を備える装置として機能する。 The boundary clock 9 functions as a device with a slave function that synchronizes its own time with the time distributed from the higher-level device for a higher-level device with a master function. Furthermore, the boundary clock 9 functions as a device having a master function for a lower device having a slave function. In the time synchronization system 900 shown in FIG. 9, the boundary clock 9 functions as a device having a slave function for each of the first grand master clock 21 and the second grand master clock 22. Specifically, at one point in time, the boundary clock 9 is in a slave state with respect to one grand master clock 2 of the first grand master clock 21 and second grand master clock 22, and is in a slave state with respect to the other grand master clock 2. It is in a passive state with respect to the master clock 2. Further, at other times, the boundary clock 9 is in a passive state with respect to one grandmaster clock 2 of the first grandmaster clock 21 and the second grandmaster clock 22, and is in a passive state with respect to the other grandmaster clock 2. becomes a slave state. Further, for the client device 3, it functions as a device having a master function.
 バウンダリクロック9は、PTPを用いて、自装置と接続しているグランドマスタクロック2との通信におけるタイムスタンプを用いてオフセットを算出することで、グランドマスタクロック2に自装置を同期させる。タイムスタンプは、バウンダリクロック9及びグランドマスタクロック2におけるPTPパケットの送受信時刻を示す時刻情報である。オフセットは、マスタ機能を有する装置の時刻とスレーブ機能を有する装置の時刻との差であって、本例では、グランドマスタクロック2の時刻と、バウンダリクロック9の時刻との差である。 The boundary clock 9 uses PTP to synchronize its own device with the grand master clock 2 by calculating an offset using a time stamp in communication with the grand master clock 2 connected to the own device. The timestamp is time information indicating the transmission/reception time of the PTP packet in the boundary clock 9 and grandmaster clock 2. The offset is the difference between the time of the device with the master function and the time of the device with the slave function, and in this example, it is the difference between the time of the grand master clock 2 and the time of the boundary clock 9.
 また、バウンダリクロック9は、自装置における送受信時刻を示すタイムスタンプを含むPTPパケットをクライアント装置3に送信する。これにより、クライアント装置3は、自装置と接続しているバウンダリクロック9との通信におけるタイムスタンプを用いてオフセットを算出し、該オフセットを用いてバウンダリクロック9と同期する。クライアント装置3は、例えば、携帯電話網における基地局装置である。 Furthermore, the boundary clock 9 transmits to the client device 3 a PTP packet including a time stamp indicating the time of transmission and reception in the own device. Thereby, the client device 3 calculates an offset using the time stamp in communication with the boundary clock 9 connected to the client device 3, and synchronizes with the boundary clock 9 using the offset. The client device 3 is, for example, a base station device in a mobile phone network.
 また、バウンダリクロック9は、BMCA(Best Master Clock Algorithm)により、複数のグランドマスタクロック2から一のグランドマスタクロック2を選択し、選択されたグランドマスタクロック2と同期する。 Further, the boundary clock 9 selects one grand master clock 2 from a plurality of grand master clocks 2 using BMCA (Best Master Clock Algorithm), and synchronizes with the selected grand master clock 2.
 ここで、図10を参照して非特許文献2に記載されている、複数の上位装置のいずれかを選択する処理について説明する。図10は、ITU-T G.8275.1/Y.1369.1 Annex Gに記載されている図であって、図10に示されている「T-BC2」及び「T-BC3」はそれぞれ、「T-BC4」の上位装置に相当する。 Here, with reference to FIG. 10, the process of selecting one of a plurality of host devices described in Non-Patent Document 2 will be described. Figure 10 is a diagram described in ITU-T G.8275.1/Y.1369.1 Annex G, and "T-BC2" and "T-BC3" shown in Figure 10 are respectively , corresponds to the higher-level device of "T-BC4".
 装置「T-BC4」におけるパッシブ状態のPTPポート(図10のT-BC4のブロックにおける符号「P」で示される)は、上位装置「T-BC2」におけるマスタ状態のPTPポート(図10のT-BC2のブロックにおける符号「M」で示される)からPTPパケットを受信した場合、alternate Master Flagを「FALSE」に設定したDelay_Req messageを上位装置「T-BC2」に送信する。Delay_Req messageを受信した、上位装置「T-BC2」のPTPポートは、マスタ状態である場合、alternate Master Flag値を「FALSE」に設定した Delay_Resp messageで応答する。装置「T-BC4」は、このような通信におけるタイムスタンプを用いて、上位装置「T-BC2」とのオフセットを計算する。なお、alternate Master Flagは、Passive 状態のポートと PTPメッセージを交換するために使用されるフラグであって、このフラグが、Delay_Req messageにおいて設定されることで、伝送経路の特性に関する情報が送信される。 The PTP port in the passive state in the device "T-BC4" (indicated by the code "P" in the block of T-BC4 in FIG. 10) is the PTP port in the master state in the host device "T-BC2" (indicated by the symbol "P" in the block T-BC4 in FIG. 10). - When a PTP packet is received from the block BC2 (indicated by the code "M" in the block BC2), it sends a Delay_Req message with the alternate Master Flag set to "FALSE" to the host device "T-BC2". If the PTP port of the host device “T-BC2” that received the Delay_Req message is in the master state, it responds with a Delay_Resp message with the alternate Master Flag value set to “FALSE”. The device "T-BC4" calculates the offset with the higher-level device "T-BC2" using the time stamps in such communication. The alternate Master Flag is a flag used to exchange PTP messages with ports in Passive state, and by setting this flag in the Delay_Req message, information regarding the characteristics of the transmission path is sent. .
 また、装置「T-BC4」におけるスレーブ状態のPTPポート(図10のT-BC4のブロックにおける符号「S」で示される)が、他の上位装置「T-BC3」におけるマスタ状態であるPTPポート(図10のT-BC3のブロックにおける符号「M」で示される)からSync message及びDelay_Resp messageを受信する。装置「T-BC4」は、このような通信におけるタイムスタンプを用いて上位装置「T-BC3」とのオフセットを計算する。 Also, the PTP port in the slave state in the device "T-BC4" (indicated by the code "S" in the block of T-BC4 in FIG. 10) is the PTP port in the master state in the other host device "T-BC3". It receives a Sync message and a Delay_Resp message from (indicated by the symbol "M" in the block of T-BC3 in FIG. 10). The device "T-BC4" calculates an offset with the higher-level device "T-BC3" using the time stamp in such communication.
 装置「T-BC4」は、このようにして計算された上位装置「T-BC2」とのオフセットと、上位装置「T-BC3」とのオフセットとの差が閾値を超えた場合、上位装置の異常を示すアラームを発生する。このアラームは、PTPモニターとして使用されるが、BMCAをトリガーするものではない。また、不適切なアラームの発生を回避するために閾値が適切に設定されている必要がある。 If the difference between the thus calculated offset with the host device "T-BC2" and the offset with the host device "T-BC3" exceeds the threshold, the device "T-BC4" Generates an alarm indicating an abnormality. This alarm is used as a PTP monitor, but does not trigger BMCA. Additionally, thresholds need to be appropriately set to avoid generating inappropriate alarms.
 このようにし、非特許文献2に記載の技術では、装置「T-BC4」は、マスタ機能を有する2つの上位装置(図10の例では、上位装置「T-BC2」及び上位装置「T-BC3」)それぞれからPTPパケットを受信し、2つの上位装置それぞれとのオフセットの差が閾値を超えた場合に異常が発生していることを検出する。 In this way, in the technology described in Non-Patent Document 2, the device "T-BC4" is connected to two higher-level devices having master functions (in the example of FIG. 10, the higher-level device "T-BC2" and the higher-level device "T-BC4") BC3''), and detects that an abnormality has occurred if the difference in offset with each of the two higher-level devices exceeds a threshold.
 しかしながら、非特許文献2に記載された技術は、複数の上位装置それぞれと自装置とのオフセットに基づいて、異常が発生していることを検出することができるが、複数の上位装置のいずれに異常が発生しているのかを判定することはできない。このため、複数の上位装置を含むシステムの復旧に時間を要することになる。 However, the technology described in Non-Patent Document 2 can detect that an abnormality has occurred based on the offset between each of a plurality of host devices and its own device, but It is not possible to determine whether an abnormality has occurred. Therefore, it takes time to restore a system including a plurality of host devices.
 また、このような場合、自装置と同期する下位装置、及び該下位装置と同期するユーザ側の装置の時刻にも異常が発生し、これに起因して、システム障害、通信障害等が発生する可能性がある。 In addition, in such a case, an abnormality will occur in the time of the lower device that synchronizes with the own device and the user's device that synchronizes with the lower device, resulting in system failures, communication failures, etc. there is a possibility.
 上記のような問題点に鑑みてなされた本開示の目的は、複数の上位装置のいずれに異常が発生したのかを判定することができる時刻同期装置、時刻同期方法、及びプログラムを提供することにある。 The purpose of the present disclosure, which was made in view of the above problems, is to provide a time synchronization device, a time synchronization method, and a program that can determine which of a plurality of host devices has an abnormality. be.
 上記課題を解決するため、本開示に係る時刻同期装置は、複数の上位装置のうちのいずれか1つの上位装置と同期する時刻同期装置であって、前記複数の上位装置それぞれとパケットを送受信する上位パケット送受信部と、前記複数の上位装置それぞれと前記上位パケット送受信部が前記パケットを送受信した時刻に基づいて、前記複数の上位装置それぞれの時刻と、自装置の時刻との差である複数のオフセットを計算するオフセット計算部と、前記複数のオフセットの絶対値それぞれが閾値以下であるか否かを判定するオフセットパターン判定部と、前記複数のオフセットの絶対値に、前記閾値以下であるオフセットの絶対値と、前記閾値より大きいオフセットの絶対値とが含まれると判定された場合に、前記複数の上位装置の少なくとも1つにおける、一のオフセットから、該一のオフセットの次のオフセットへの変動の有無に基づいて、前記複数の上位装置のうちのいずれの上位装置の時刻に異常が発生しているかを判定する異常装置判定部と、を備える。 In order to solve the above problems, a time synchronization device according to the present disclosure is a time synchronization device that synchronizes with any one of a plurality of high-level devices, and transmits and receives packets to and from each of the plurality of high-level devices. The upper packet transmitting/receiving unit calculates a plurality of times, which is the difference between the time of each of the plurality of upper level devices and the time of the own device, based on the times at which the upper level packet transmitting/receiving unit transmits and receives the packet to each of the plurality of higher level devices and the upper level packet transmitting/receiving unit. an offset calculation unit that calculates an offset; an offset pattern determination unit that determines whether each of the absolute values of the plurality of offsets is less than or equal to a threshold; a change from one offset to the next offset in at least one of the plurality of higher-level devices when it is determined that the absolute value and the absolute value of the offset larger than the threshold are included; an abnormal device determination unit that determines which of the plurality of higher-level devices is experiencing an abnormality at a given time based on the presence or absence of the abnormality.
 また、上記課題を解決するため、本開示に係る時刻同期方法は、複数の上位装置それぞれとパケットを送受信する上位パケット送受信部を備え、複数の上位装置のうちのいずれか1つの上位装置と同期する時刻同期装置の時刻同期方法であって、前記複数の上位装置それぞれと前記上位パケット送受信部が前記パケットを送受信した時刻に基づいて、前記複数の上位装置それぞれの時刻と、自装置の時刻との差である複数のオフセットを計算するステップと、前記複数のオフセットの絶対値それぞれが閾値以下であるか否かを判定するステップと、前記複数のオフセットの絶対値に、前記閾値以下であるオフセットの絶対値と、前記閾値より大きいオフセットの絶対値とが含まれると判定された場合に、前記複数の上位装置の少なくとも1つにおける、一のオフセットから、該一のオフセットの次のオフセットへの変動の有無に基づいて、前記複数の上位装置のうちのいずれの上位装置の時刻に異常が発生しているかを判定するステップと、を含む。 Furthermore, in order to solve the above problems, the time synchronization method according to the present disclosure includes an upper packet transmitting/receiving unit that transmits and receives packets to each of the plurality of upper apparatuses, and synchronizes with any one of the plurality of upper apparatuses. A time synchronization method for a time synchronization device, wherein the time of each of the plurality of higher-level devices and the time of the own device are synchronized based on the times at which the packets are transmitted and received by each of the plurality of higher-level devices and the higher-level packet transmitting/receiving unit. a step of calculating a plurality of offsets that are the difference between the plurality of offsets, a step of determining whether each of the absolute values of the plurality of offsets is less than or equal to a threshold value, and an offset that is less than or equal to the threshold value in the absolute value of the plurality of offsets; and an absolute value of an offset larger than the threshold, from one offset to the next offset of the one offset in at least one of the plurality of higher-level devices. The method includes the step of determining, based on the presence or absence of a change, which of the plurality of higher-level devices at which an abnormality has occurred at the time of the higher-level device.
 また、上記課題を解決するため、本開示に係るプログラムは、コンピュータを、上述した時刻同期装置として動作させる。 Moreover, in order to solve the above-mentioned problem, a program according to the present disclosure causes a computer to operate as the above-mentioned time synchronization device.
 本開示に係る時刻同期装置、時刻同期方法、及びプログラムによれば、複数の上位装置のいずれに異常が発生したのかを判定することができる。 According to the time synchronization device, time synchronization method, and program according to the present disclosure, it is possible to determine which of a plurality of host devices has experienced an abnormality.
本開示の第1の実施形態に係る時刻同期システムの構成例を示す図である。FIG. 1 is a diagram illustrating a configuration example of a time synchronization system according to a first embodiment of the present disclosure. 第1のグランドマスタクロックとバウンダリクロックとのオフセットについて説明するための図である。FIG. 3 is a diagram for explaining an offset between a first grand master clock and a boundary clock. 第2のグランドマスタクロックとバウンダリクロックとのオフセットについて説明するための図である。FIG. 7 is a diagram for explaining an offset between a second grand master clock and a boundary clock. 時刻源である第1のグランドマスタクロックの時刻に異常が発生しており、時刻源ではない第2のグラウンドマスタクロックの時刻に異常が発生していない場合における、第1のグランドマスタクロックとバウンダリクロックとのメッセージの送受信を示すシーケンス図である。The first grandmaster clock and the boundary when an abnormality occurs in the time of the first grandmaster clock that is the time source and no abnormality occurs in the time of the second groundmaster clock that is not the time source. FIG. 3 is a sequence diagram showing message transmission and reception with a clock. 時刻源である第1のグランドマスタクロックの時刻に異常が発生しており、時刻源ではない第2のグラウンドマスタクロックの時刻に異常が発生していない場合における、第2のグランドマスタクロックとバウンダリクロックとのメッセージの送受信を示すシーケンス図である。The second grandmaster clock and the boundary when an abnormality occurs in the time of the first grandmaster clock, which is the time source, and no abnormality occurs in the time of the second grandmaster clock, which is not the time source. FIG. 3 is a sequence diagram showing message transmission and reception with a clock. 時刻源である第1のグランドマスタクロックの時刻に異常が発生しておらず、時刻源ではない第2のグラウンドマスタクロックの時刻に異常が発生している場合における、第1のグランドマスタクロックとバウンダリクロックとのメッセージの送受信を示すシーケンス図である。The first grandmaster clock when no abnormality has occurred in the time of the first grandmaster clock that is the time source, and an abnormality has occurred in the time of the second groundmaster clock that is not the time source. FIG. 3 is a sequence diagram showing message transmission and reception with a boundary clock. 時刻源である第1のグランドマスタクロックの時刻に異常が発生しておらず、時刻源ではない第2のグラウンドマスタクロックの時刻に異常が発生している場合における、第2のグランドマスタクロックとバウンダリクロックとのメッセージの送受信を示すシーケンス図である。The second grandmaster clock when no abnormality has occurred in the time of the first grandmaster clock that is the time source, and an abnormality has occurred in the time of the second groundmaster clock that is not the time source. FIG. 3 is a sequence diagram showing message transmission and reception with a boundary clock. 図1に示すバウンダリクロックの動作の一例を示すフローチャートである。2 is a flowchart showing an example of the operation of the boundary clock shown in FIG. 1. FIG. 図1に示すバウンダリクロックの動作の一例を示すフローチャートである。2 is a flowchart showing an example of the operation of the boundary clock shown in FIG. 1. FIG. 本開示の第2の実施形態に係る時刻同期システムの構成例を示す図である。FIG. 2 is a diagram illustrating a configuration example of a time synchronization system according to a second embodiment of the present disclosure. 図6に示すバウンダリクロックの動作の一例を示すフローチャートである。7 is a flowchart showing an example of the operation of the boundary clock shown in FIG. 6. FIG. 図6に示すバウンダリクロックの動作の一例を示すフローチャートである。7 is a flowchart showing an example of the operation of the boundary clock shown in FIG. 6. FIG. 図1及び図6に示すバウンダリクロックのハードウェア構成の一例を示す図である。FIG. 7 is a diagram showing an example of the hardware configuration of the boundary clock shown in FIGS. 1 and 6. FIG. 従来の時刻同期システムの構成例を示す図である。1 is a diagram illustrating a configuration example of a conventional time synchronization system. 従来の時刻同期装置における2つの上位装置との通信について説明するための図である。FIG. 2 is a diagram for explaining communication with two higher-level devices in a conventional time synchronization device.
 <<第1の実施形態>>
 以下、本開示の第1の実施形態について図面を参照して説明する。
<<First embodiment>>
Hereinafter, a first embodiment of the present disclosure will be described with reference to the drawings.
 図1は、本開示の一実施形態に係る時刻同期システム100は、複数のグランドマスタクロック2(図1の例では、第1のグランドマスタクロック21及び第2のグランドマスタクロック22)と、時刻同期装置としてのバウンダリクロック1と、クライアント装置3とを備える。第1の実施形態では、複数のグランドマスタクロック2は、それぞれバウンダリクロック1の上位装置に相当し、クライアント装置3は、バウンダリクロック1の下位装置に相当する。 FIG. 1 shows a time synchronization system 100 according to an embodiment of the present disclosure, which includes a plurality of grandmaster clocks 2 (in the example of FIG. 1, a first grandmaster clock 21 and a second grandmaster clock 22), and a time It includes a boundary clock 1 as a synchronization device and a client device 3. In the first embodiment, the plurality of grand master clocks 2 each correspond to a higher-level device of the boundary clock 1, and the client device 3 corresponds to a lower-level device of the boundary clock 1.
 <グランドマスタクロックの構成>
 複数のグランドマスタクロック2それぞれは、バウンダリクロック1とパケットを送受信する。このとき、複数のグランドマスタクロック2それぞれは、該グランドマスタクロック2がパケットを送受信した時刻を示すタイムスタンプをバウンダリクロック1に送信する。具体的には、第1のグランドマスタクロック21は、該第1のグランドマスタクロック21がパケットを送受信した時刻を示すタイムスタンプをバウンダリクロック1に送信する。また、第2のグランドマスタクロック22は、該第2のグランドマスタクロック22がパケットを送受信した時刻を示すタイムスタンプをバウンダリクロック1に送信する。グランドマスタクロック2は、タイムスタンプを含むパケットをバウンダリクロック1に送信することによって、タイムスタンプをバウンダリクロック1に送信してもよい。
<Grandmaster clock configuration>
Each of the plurality of grand master clocks 2 transmits and receives packets to and from the boundary clock 1. At this time, each of the plurality of grandmaster clocks 2 transmits to the boundary clock 1 a time stamp indicating the time when the grandmaster clock 2 transmits and receives the packet. Specifically, the first grandmaster clock 21 transmits to the boundary clock 1 a time stamp indicating the time when the first grandmaster clock 21 transmitted and received the packet. Further, the second grandmaster clock 22 transmits to the boundary clock 1 a time stamp indicating the time when the second grandmaster clock 22 transmitted and received the packet. Grandmaster clock 2 may send the time stamp to boundary clock 1 by sending a packet containing the time stamp to boundary clock 1 .
 <バウンダリクロックの構成>
 バウンダリクロック1は、複数のグランドマスタクロック2のうちのいずれか1つのグランドマスタクロック2と同期する。また、クライアント装置3は、バウンダリクロック1に同期してもよい。
<Boundary clock configuration>
The boundary clock 1 is synchronized with any one grandmaster clock 2 among the plurality of grandmaster clocks 2. Further, the client device 3 may be synchronized with the boundary clock 1.
 図1に示すように、第1の実施形態に係るバウンダリクロック1は、複数の上位パケット送受信部101(図1の例では、第1の上位パケット送受信部101a及び第2の上位パケット送受信部101b)と、オフセット計算部102と、閾値記憶部103と、オフセットパターン判定部104と、異常装置判定部105と、時刻源切替部106と、時刻同期処理部107と、クロッククラス書換部108と、下位パケット送受信部109と、障害アラート発出部110とを備える。 As shown in FIG. 1, the boundary clock 1 according to the first embodiment includes a plurality of upper packet transmitting/receiving sections 101 (in the example of FIG. 1, a first upper packet transmitting/receiving section 101a and a second upper packet transmitting/receiving section 101b). ), an offset calculation unit 102, a threshold storage unit 103, an offset pattern determination unit 104, an abnormal device determination unit 105, a time source switching unit 106, a time synchronization processing unit 107, a clock class rewriting unit 108, It includes a lower packet transmitting/receiving section 109 and a failure alert issuing section 110.
 複数の上位パケット送受信部101及び下位パケット送受信部109は、通信インタフェースによって構成される。オフセット計算部102、オフセットパターン判定部104、異常装置判定部105、時刻源切替部106、時刻同期処理部107、クロッククラス書換部108、及び障害アラート発出部110は、コントローラによって構成される。コントローラは、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)等の専用のハードウェアによって構成されてもよいし、プロセッサによって構成されてもよいし、双方を含んで構成されてもよい。閾値記憶部103は、HDD(Hard Disk Drive)、SSD(Solid State Drive)、EEPROM(Electrically Erasable Programmable Read-Only Memory)、ROM(Read-Only Memory)およびRAM(Random Access Memory)等のメモリによって構成される。 The plurality of upper packet transmitting/receiving units 101 and lower packet transmitting/receiving units 109 are configured by communication interfaces. The offset calculation unit 102, the offset pattern determination unit 104, the abnormal device determination unit 105, the time source switching unit 106, the time synchronization processing unit 107, the clock class rewriting unit 108, and the failure alert issuing unit 110 are configured by a controller. The controller may be configured with dedicated hardware such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array), a processor, or a combination of both. good. The threshold storage unit 103 is composed of memories such as HDD (Hard Disk Drive), SSD (Solid State Drive), EEPROM (Electrically Erasable Programmable Read-Only Memory), ROM (Read-Only Memory), and RAM (Random Access Memory). be done.
 上位パケット送受信部101は、複数のグランドマスタクロック2それぞれとパケットを送受信する。また、上位パケット送受信部101は、グランドマスタクロック2から受信したパケットに含まれるタイムスタンプをオフセット計算部102に出力する。タイムスタンプは、グランドマスタクロック2がSync message(同期メッセージ)を送信した時刻、上位パケット送受信部101がSync messageを受信した時刻、上位パケット送受信部101がDelay_Req message(遅延リクエストメッセージ)を送信した時刻、及びグランドマスタクロック2がDelay_Req messageを送信した時刻それぞれを示す情報である。グランドマスタクロック2がSync messageを送信した時刻、及びグランドマスタクロック2がDelay_Req messageを受信した時刻を示すタイムスタンプは、グランドマスタクロック2から送信されるパケットに含まれている。 The upper packet transmitting and receiving unit 101 transmits and receives packets to and from each of the plurality of grand master clocks 2. Further, the upper packet transmitting/receiving section 101 outputs the time stamp included in the packet received from the grand master clock 2 to the offset calculating section 102. The timestamp is the time when the grand master clock 2 sent the Sync message, the time when the upper packet transmitter/receiver 101 received the Sync message, and the time when the upper packet transmitter/receiver 101 sent the Delay_Req message. , and the time at which the grand master clock 2 transmitted the Delay_Req message. A time stamp indicating the time when the grandmaster clock 2 transmitted the Sync message and the time when the grandmaster clock 2 received the Delay_Req message is included in the packet transmitted from the grandmaster clock 2.
 図1に示す例では、第1の上位パケット送受信部101aは、第1のグランドマスタクロック21との間でパケットを送受信する。そして、第1の上位パケット送受信部101aは、上述したSync message及びDelay_Req messageを送受信した時刻を示すタイムスタンプをオフセット計算部102に出力する。また、第2の上位パケット送受信部101bは、第2のグランドマスタクロック22との間でパケットを送受信する。そして、第2の上位パケット送受信部101bは、上述したSync message及びDelay_Req messageを送受信した時刻を示すタイムスタンプをオフセット計算部102に出力する。 In the example shown in FIG. 1, the first higher-order packet transmitting/receiving section 101a transmits and receives packets to and from the first grand master clock 21. Then, the first upper packet transmitting/receiving unit 101a outputs a timestamp indicating the time when the above-described Sync message and Delay_Req message were transmitted and received to the offset calculating unit 102. Further, the second upper packet transmitting/receiving section 101b transmits and receives packets to and from the second grand master clock 22. Then, the second upper packet transmitting/receiving unit 101b outputs to the offset calculating unit 102 a time stamp indicating the time when the above-described Sync message and Delay_Req message were transmitted and received.
 オフセット計算部102は、複数のグランドマスタクロック2それぞれと上位パケット送受信部101がパケットを送受信した時刻に基づいて、複数の上位装置それぞれの時刻と、自装置の時刻との差である複数のオフセットを計算する。 The offset calculation unit 102 calculates a plurality of offsets, which are the differences between the time of each of the plurality of upper-level devices and the time of the own device, based on the times at which the upper-level packet transmitting/receiving unit 101 transmits and receives packets to each of the plurality of grandmaster clocks 2. Calculate.
 具体的には、オフセット計算部102は、第1の上位パケット送受信部101aと第1のグランドマスタクロック21とのパケットの送受信におけるタイムスタンプを取得する。オフセット計算部102は、取得したタイムスタンプに基づき、第1のグランドマスタクロック21の時刻と、バウンダリクロック1の時刻とのオフセット(以下、「第1のオフセットOs1」という)を計算する。 Specifically, the offset calculation unit 102 obtains a timestamp during packet transmission and reception between the first higher-order packet transmission and reception unit 101a and the first grandmaster clock 21. The offset calculation unit 102 calculates the offset between the time of the first grand master clock 21 and the time of the boundary clock 1 (hereinafter referred to as "first offset Os1") based on the acquired time stamp.
 例えば、図2Aに示すように、第1のグランドマスタクロック21は、Sync messageを第1の上位パケット送受信部101aに送信する。このとき、Sync messageには、グランドマスタクロック2によるSync messageの送信時刻である時刻T1を示すタイムスタンプが含まれている。 For example, as shown in FIG. 2A, the first grand master clock 21 transmits a Sync message to the first upper packet transmitter/receiver 101a. At this time, the Sync message includes a time stamp indicating time T1, which is the time when the grand master clock 2 sends the Sync message.
 第1の上位パケット送受信部101aは、時刻T2において、第1のグランドマスタクロック21から送信されたSync messageを受信すると、時刻T3において、Delay_Req messageをグランドマスタクロック2に送信する。 Upon receiving the Sync message transmitted from the first grandmaster clock 21 at time T2, the first upper packet transmitting/receiving unit 101a transmits a Delay_Req message to the grandmaster clock 2 at time T3.
 第1のグランドマスタクロック21は、時刻T4において、第1の上位パケット送受信部101aから送信されたDelay_Req messageを受信する。そして、第1のグランドマスタクロック21は、Delay_Resp message(遅延レスポンスメッセージ)を第1の上位パケット送受信部101aに送信する。このとき、Delay_Resp messageには、第1のグランドマスタクロック21によるDelay_Req messageの受信時刻である時刻T4を示すタイムスタンプが含まれている。 The first grand master clock 21 receives the Delay_Req message transmitted from the first upper packet transmitting/receiving section 101a at time T4. Then, the first grand master clock 21 transmits a Delay_Resp message (delay response message) to the first upper packet transmitter/receiver 101a. At this time, the Delay_Resp message includes a time stamp indicating time T4, which is the time when the first grand master clock 21 receives the Delay_Req message.
 オフセット計算部102は、Sync messageに含まれている、第1のグランドマスタクロック21がSync messageを送信した時刻T1を示すタイムスタンプ、第1の上位パケット送受信部101aがSync messageを受信した時刻T2を示すタイムスタンプ、第1の上位パケット送受信部101aがDelay_Req messageを送信した時刻T3を示すタイムスタンプ、及び、Delay_Resp messageに含まれる、グランドマスタクロック2がDelay_Req messageを送信した時刻T4を示すタイムスタンプを、第1の上位パケット送受信部101aから取得する。そして、オフセット計算部102は、以下の式1に示すように、第1のオフセットOs1を計算する。
  Os1=((T2-T1)-(T4-T3))/2 (式1)
The offset calculation unit 102 calculates the timestamp included in the Sync message, indicating the time T1 when the first grand master clock 21 transmitted the Sync message, and the time T2 when the first upper packet transmitting/receiving unit 101a received the Sync message. A timestamp indicating the time T3 when the first upper packet transmitting/receiving unit 101a transmitted the Delay_Req message, and a timestamp indicating the time T4 when the grand master clock 2 transmitted the Delay_Req message included in the Delay_Resp message. is obtained from the first upper packet transmitting/receiving unit 101a. Then, the offset calculation unit 102 calculates the first offset Os1 as shown in Equation 1 below.
Os1=((T2-T1)-(T4-T3))/2 (Formula 1)
 なお、第1のオフセットOs1には、一のオフセット(例えば、1回目の第1のオフセット)Os11と、該一のオフセットの次のオフセット(例えば、2回目の第1のオフセット)Os12とが含まれる。ここで、「一のオフセット」は、一のメッセージのセットの送受信(例えば、時刻T1~T4における送受信)時刻に基づいて計算されたオフセットである。「次のオフセット」は、一のメッセージのセットの、次のメッセージのセットの送受信(例えば、時刻T5~T8における送受信)時刻に基づいて計算されたオフセットである。 Note that the first offset Os1 includes one offset (for example, the first first offset) Os11 and the next offset after the first offset (for example, the second first offset) Os12. It will be done. Here, "one offset" is an offset calculated based on the transmission/reception time of one set of messages (eg, transmission/reception between times T1 to T4). The "next offset" is an offset calculated based on the transmission/reception time of the next set of messages (for example, transmission/reception between times T5 and T8) of one message set.
 同様にして、オフセット計算部102は、第2の上位パケット送受信部101bと第2のグランドマスタクロック22とのパケットの送受信におけるタイムスタンプを取得し、取得したタイムスタンプに基づき、第2のグランドマスタクロック22の時刻と、バウンダリクロック1の時刻とのオフセット(以下、「第2のオフセットOs2」という)を計算する。 Similarly, the offset calculation unit 102 obtains time stamps during packet transmission and reception between the second upper packet transmitting and receiving unit 101b and the second grandmaster clock 22, and based on the obtained time stamps, the offset calculation unit 102 An offset between the time of the clock 22 and the time of the boundary clock 1 (hereinafter referred to as "second offset Os2") is calculated.
 例えば、図2Bに示すように、第2のグランドマスタクロック22は、Sync messageを第2の上位パケット送受信部101bに送信する。このとき、Sync messageには、グランドマスタクロック2によるSync messageの送信時刻である時刻T9を示すタイムスタンプが含まれている。 For example, as shown in FIG. 2B, the second grand master clock 22 transmits a Sync message to the second upper packet transmitter/receiver 101b. At this time, the Sync message includes a time stamp indicating time T9, which is the time when the grand master clock 2 sent the Sync message.
 第2の上位パケット送受信部101bは、時刻T10において、第2のグランドマスタクロック22から送信されたSync messageを受信すると、時刻T11において、Delay_Req messageをグランドマスタクロック2に送信する。 Upon receiving the Sync message transmitted from the second grandmaster clock 22 at time T10, the second upper packet transmitting/receiving unit 101b transmits a Delay_Req message to the grandmaster clock 2 at time T11.
 第2のグランドマスタクロック22は、時刻T12において、第2の上位パケット送受信部101bから送信されたDelay_Req messageを受信すると、Delay_Resp messageを第2の上位パケット送受信部101bに送信する。このとき、Delay_Resp messageには、第2のグランドマスタクロック22によるDelay_Req messageの受信時刻である時刻T12を示すタイムスタンプが含まれている。 When the second grand master clock 22 receives the Delay_Req message transmitted from the second upper packet transmitter/receiver 101b at time T12, it transmits the Delay_Resp message to the second upper packet transmitter/receiver 101b. At this time, the Delay_Resp message includes a time stamp indicating time T12, which is the time when the second grand master clock 22 receives the Delay_Req message.
 オフセット計算部102は、Sync messageに含まれている、第2のグランドマスタクロック22がSync messageを送信した時刻T9を示すタイムスタンプ、第2の上位パケット送受信部101bがSync messageを受信した時刻T10を示すタイムスタンプ、第2の上位パケット送受信部101bがDelay_Req messageを送信した時刻T11を示すタイムスタンプ、およびDelay_Resp messageに含まれる、グランドマスタクロック2がDelay_Req messageを送信した時刻T12を示すタイムスタンプを、第2の上位パケット送受信部101bから取得する。そして、オフセット計算部102は、以下の式2に示すように、第2のオフセットOs2を計算する。
  Os2=((T10-T9)-(T12-T11))/2 (式2)
The offset calculation unit 102 calculates the timestamp included in the Sync message, indicating the time T9 when the second grand master clock 22 transmitted the Sync message, and the time T10 when the second upper packet transmitting/receiving unit 101b received the Sync message. a timestamp indicating time T11 when the second upper packet transmitting/receiving unit 101b transmitted the Delay_Req message, and a timestamp indicating time T12 when the grand master clock 2 transmitted the Delay_Req message included in the Delay_Resp message. , obtained from the second upper packet transmitting/receiving unit 101b. Then, the offset calculation unit 102 calculates the second offset Os2 as shown in Equation 2 below.
Os2=((T10-T9)-(T12-T11))/2 (Formula 2)
 なお、第2のオフセットOs2には、一のオフセット(例えば、1回目の第2のオフセット)Os21と、該一のオフセットの次のオフセット(例えば、2回目の第2のオフセット)Os22とが含まれる。ここで、「一のオフセット」は、一のメッセージのセットの送受信(例えば、時刻T9~T12における送受信)時刻に基づいて計算されたオフセットである。「次のオフセット」は、一のメッセージのセットの、次のメッセージのセットの送受信(例えば、時刻T13~T16における送受信)時刻に基づいて計算されたオフセットである。 Note that the second offset Os2 includes one offset (for example, the first second offset) Os21 and the next offset after the first offset (for example, the second second offset) Os22. It will be done. Here, "one offset" is an offset calculated based on the transmission/reception time of one set of messages (for example, transmission/reception between times T9 and T12). The "next offset" is an offset calculated based on the transmission/reception time of the next set of messages (for example, transmission/reception between times T13 and T16) of one message set.
 閾値記憶部103は、後述するオフセットパターン判定部104がオフセットパターンを判定するために用いる閾値THを記憶する。閾値は、予め定められた固定値(例えば、1ms)であってもよい。また、閾値は、一定期間におけるオフセット(第1のオフセットOs1及び第2のオフセットOs2の少なくともひとつ)の平均値であってもよい。閾値は、PTPプロトコルを用いた通信を開始してから一定期間(例えば、1分間)の間に定期的(例えば、1秒おき)に送受信された複数(例えば、60)のデータそれぞれについて計算された複数(例えば、60)のオフセットの平均値としてもよい。 The threshold value storage unit 103 stores a threshold value TH used by an offset pattern determination unit 104, which will be described later, to determine an offset pattern. The threshold value may be a predetermined fixed value (for example, 1 ms). Further, the threshold value may be an average value of offsets (at least one of the first offset Os1 and the second offset Os2) over a certain period of time. The threshold value is calculated for each of a plurality of pieces of data (e.g., 60) that are sent and received periodically (e.g., every second) during a certain period of time (e.g., one minute) after starting communication using the PTP protocol. The average value of a plurality of offsets (for example, 60) may be used.
 オフセットパターン判定部104は、オフセット計算部102によって計算された複数のオフセットの絶対値が閾値TH以下であるか否かを判定する。また、オフセットパターン判定部104は、複数のオフセットの絶対値のいずれもが閾値以下である場合に、バウンダリクロック1及び複数のグランドマスタクロック2の時刻のいずれにも異常が発生していないと判定する。また、オフセットパターン判定部104は、複数のオフセットの絶対値のいずれもが閾値より大きい場合に、自装置(バウンダリクロック1)の時刻に異常が発生していると判定する。 The offset pattern determination unit 104 determines whether the absolute values of the plurality of offsets calculated by the offset calculation unit 102 are less than or equal to the threshold TH. Further, the offset pattern determination unit 104 determines that no abnormality has occurred in any of the times of the boundary clock 1 and the plurality of grand master clocks 2 when all of the absolute values of the plurality of offsets are equal to or less than the threshold value. do. Further, the offset pattern determination unit 104 determines that an abnormality has occurred in the time of the own device (boundary clock 1) when all of the absolute values of the plurality of offsets are larger than the threshold value.
 具体的には、オフセットパターン判定部104は、第1のオフセットOs1の絶対値が閾値TH以下であるか否かを判定し、第2のオフセットOs2の絶対値が閾値TH以下であるか否かを判定する。ここで、オフセットパターン判定部104による判定の対象は、バウンダリクロック1が時刻源であるグランドマスタクロック2に同期された後の第1のオフセットOs1(時刻T5~T8に基づく2回目の第1のオフセットOs12)である。また、オフセットパターン判定部104による判定の対象は、バウンダリクロック1が時刻源であるグランドマスタクロック2に同期された後の第2のオフセットOs2(時刻T13~T16に基づく2回目の第2のオフセットOs22)である。 Specifically, the offset pattern determination unit 104 determines whether the absolute value of the first offset Os1 is less than or equal to the threshold TH, and determines whether the absolute value of the second offset Os2 is less than or equal to the threshold TH. Determine. Here, the object to be determined by the offset pattern determination unit 104 is the first offset Os1 after the boundary clock 1 is synchronized with the grand master clock 2 which is the time source (the second first offset Os1 based on times T5 to T8). offset Os12). Further, the object of determination by the offset pattern determination unit 104 is the second offset Os2 after the boundary clock 1 is synchronized with the grand master clock 2 which is the time source (the second second offset based on times T13 to T16). Os22).
 オフセットパターン判定部104は、第1のオフセットOs1の絶対値が閾値TH以下であり、第2のオフセットOs2の絶対値が閾値TH以下であると判定された場合、グランドマスタクロック2及びバウンダリクロック1のいずれに時刻にも異常が発生していないと判定する。 If it is determined that the absolute value of the first offset Os1 is equal to or less than the threshold value TH, and the absolute value of the second offset Os2 is equal to or less than the threshold value TH, the offset pattern determination unit 104 determines that the absolute value of the first offset Os1 is equal to or less than the threshold value TH, It is determined that no abnormality has occurred at any of the times.
 また、オフセットパターン判定部104は、時刻源であるグランドマスタクロック2との通信におけるタイムスタンプに基づくオフセットの絶対値が閾値TH以下であり、時刻源でないグランドマスタクロック2との通信におけるタイムスタンプに基づくオフセットの絶対値が閾値THより大きいと判定されると、第1のグランドマスタクロック21及び第2のグランドマスタクロック22の時刻のいずれかが異常であると判定する。 Further, the offset pattern determination unit 104 determines that the absolute value of the offset based on the timestamp in the communication with the grandmaster clock 2 which is the time source is less than or equal to the threshold TH, and the offset pattern determination unit 104 determines that If it is determined that the absolute value of the based offset is larger than the threshold TH, it is determined that either the time of the first grand master clock 21 or the second grand master clock 22 is abnormal.
 具体的には、第1のグランドマスタクロック21が時刻源であり、第2のグランドマスタクロック22が時刻源でない場合、オフセットパターン判定部104は、第1のオフセットOs1の絶対値が閾値TH以下であり、第2のオフセットOs2の絶対値が閾値THより大きいと判定されると、第1のグランドマスタクロック21及び第2のグランドマスタクロック22の時刻のいずれかに異常が発生していると判定する。 Specifically, when the first grand master clock 21 is a time source and the second grand master clock 22 is not a time source, the offset pattern determination unit 104 determines that the absolute value of the first offset Os1 is equal to or less than the threshold TH. If it is determined that the absolute value of the second offset Os2 is larger than the threshold TH, it is determined that an abnormality has occurred in either the time of the first grand master clock 21 or the second grand master clock 22. judge.
 また、第1のグランドマスタクロック21が時刻源でなく、第2のグランドマスタクロック22が時刻源である場合、オフセットパターン判定部104は、第1のオフセットOs1の絶対値が閾値THより大きく、第2のオフセットOs2の絶対値が閾値TH以下であると判定されると、第1のグランドマスタクロック21及び第2のグランドマスタクロック22の時刻のいずれかに異常が発生していると判定する。 Further, when the first grand master clock 21 is not the time source and the second grand master clock 22 is the time source, the offset pattern determination unit 104 determines that the absolute value of the first offset Os1 is larger than the threshold TH, If it is determined that the absolute value of the second offset Os2 is less than or equal to the threshold TH, it is determined that an abnormality has occurred in either the time of the first grand master clock 21 or the second grand master clock 22. .
 さらに、オフセットパターン判定部104は、第1のオフセットOs1の絶対値が閾値THより大きく、第2のオフセットOs2の絶対値が閾値THより大きいと判定された場合、自装置(バウンダリクロック1)の時刻に異常が発生していると判定する。 Furthermore, if it is determined that the absolute value of the first offset Os1 is greater than the threshold TH and the absolute value of the second offset Os2 is greater than the threshold TH, the offset pattern determining unit 104 determines that the own device (boundary clock 1) It is determined that an abnormality has occurred at the time.
 また、オフセットパターン判定部104は、自装置の時刻に異常が発生しているか否かに基づいて、クロッククラス書換部108がクロッククラス(Clock Class)を書き換えるよう制御する。具体的には、オフセットパターン判定部104は、自装置の時刻に異常が発生していると判定された場合、クロッククラス書換部108が、自装置の時刻に異常が発生していることを示すクロッククラスに書き換えるよう制御する。 Furthermore, the offset pattern determination unit 104 controls the clock class rewriting unit 108 to rewrite the clock class (Clock Class) based on whether or not an abnormality has occurred in the time of the own device. Specifically, when the offset pattern determining unit 104 determines that an abnormality has occurred in the time of the own device, the clock class rewriting unit 108 indicates that an abnormality has occurred in the time of the own device. Controls rewriting to clock class.
 異常装置判定部105は、複数のオフセットの絶対値に、閾値TH以下であるオフセットの絶対値と、閾値THより大きいオフセットの絶対値とが含まれると判定された場合に、複数のグランドマスタクロック2の少なくとも1つにおける、一のオフセットから、該一のオフセットの次のオフセットへの変動の有無に基づいて、複数のグランドマスタクロック2のうちのいずれのグランドマスタクロック2の時刻に異常が発生しているかを判定する。 When it is determined that the absolute values of the plurality of offsets include the absolute value of the offset that is equal to or less than the threshold value TH, and the absolute value of the offset that is larger than the threshold value TH, the abnormal device determination unit 105 An abnormality occurs in the time of which grandmaster clock 2 among the plurality of grandmaster clocks 2 based on the presence or absence of a change from one offset to the next offset in at least one of the plurality of grandmaster clocks 2. Determine whether
 また、異常装置判定部105は、上記変動があった場合、複数のグランドマスタクロック2のうちの時刻源であるグランドマスタクロック2の時刻に異常が発生していると判定し、上記変動がなかった場合、複数のグランドマスタクロック2のうちの時刻源でないグランドマスタクロック2の時刻に異常が発生していると判定する。 Further, if there is the above fluctuation, the abnormal device determination unit 105 determines that an abnormality has occurred in the time of the grandmaster clock 2, which is the time source among the plurality of grandmaster clocks 2, and determines that there is no fluctuation. In this case, it is determined that an abnormality has occurred in the time of the grandmaster clock 2 that is not the time source among the plurality of grandmaster clocks 2.
 具体的には、異常装置判定部105は、時刻源が第1のグランドマスタクロック21である場合の、第1のグランドマスタクロック21との通信における、一のオフセット(1回目の第1のオフセットOs11)が「オフセットあり」であるか否かを判定してもよい。この構成において、異常装置判定部105は、一のオフセットの次のオフセット(2回目の第1のオフセットOs12)が「オフセットあり」であるか否かを判定する。そして、異常装置判定部105は、1回目の第1のオフセットOs11に関する判定の結果と、2回目の第1のオフセットOs12に関する判定の結果とが異なった場合、第1のグランドマスタクロック21の時刻に異常が発生していると判定する。例えば、異常装置判定部105は、1回目の第1のオフセットOs11が「オフセットあり」であり、2回目の第1のオフセットOs12が「オフセットなし」であった場合、時刻源である第1のグランドマスタクロック21の時刻に異常が発生していると判定する。 Specifically, the abnormal device determination unit 105 detects one offset (first offset of the first time) in communication with the first grandmaster clock 21 when the time source is the first grandmaster clock 21. Os11) may be determined to be "with offset". In this configuration, the abnormal device determination unit 105 determines whether the offset following the first offset (the second first offset Os12) is "with offset". Then, if the result of the first determination regarding the first offset Os11 is different from the result of the second determination regarding the first offset Os12, the abnormal device determination unit 105 determines the time of the first grand master clock 21. It is determined that an abnormality has occurred. For example, if the first offset Os11 at the first time is "with offset" and the first offset Os12 at the second time is "no offset", the abnormal device determination unit 105 determines that the first offset Os11 that is the time source It is determined that an abnormality has occurred in the time of the grand master clock 21.
 また、異常装置判定部105は、時刻源が第1のグランドマスタクロック21である場合の、第2のグランドマスタクロック22との通信における、一のオフセット(1回目の第2のオフセットOs21)が「オフセットあり」であるか否かを判定し、一のオフセットの次のオフセット(2回目の第2のオフセットOs22)が「オフセットあり」であるか否かを判定してもよい。異常装置判定部105は、1回目の第2のオフセットOs21に関する判定の結果と、2回目の第2のオフセットOs22に関する判定の結果とが異なった場合、第1のグランドマスタクロック21の時刻に異常が発生していると判定する。具体的には、異常装置判定部105は、1回目の第2のオフセットOs21が「オフセットなし」であり、2回目の第2のオフセットOs22が「オフセットあり」である場合、時刻源である第1のグランドマスタクロック21の時刻に異常が発生していると判定する。 In addition, the abnormal device determination unit 105 determines that one offset (the first second offset Os21) in communication with the second grandmaster clock 22 when the time source is the first grandmaster clock 21 is It may be determined whether or not there is an "offset", and then it may be determined whether or not the next offset after the first offset (the second second offset Os22) is "with an offset". If the result of the first determination regarding the second offset Os21 is different from the result of the second determination regarding the second offset Os22, the abnormal device determination unit 105 determines that the time of the first grand master clock 21 is abnormal. It is determined that this is occurring. Specifically, if the second offset Os21 of the first time is "no offset" and the second offset Os22 of the second time is "with offset", the abnormal device determination unit 105 determines that It is determined that an abnormality has occurred at the time of the grand master clock 21 of No. 1.
 ここで、図3A及び図3Bに示す例を参照して、第1のグランドマスタクロック21の時刻に異常が発生しており、第2のグランドマスタクロック22の時刻に異常が発生していない例における、オフセット計算部102、オフセットパターン判定部104、及び異常装置判定部105の処理についてより詳細に説明する。図3Aは、時刻に異常が発生している第1のグランドマスタクロック21と、バウンダリクロック1とのメッセージの送受信を示すシーケンス図である。図3Bは、時刻に異常が発生していない第2のグランドマスタクロック22と、バウンダリクロック1とのメッセージの送受信を示すシーケンス図である。本例において、第1のグランドマスタクロック21及び第2のグランドマスタクロック22と、バウンダリクロック1との間の通信における伝送遅延時間は「1」である。また、本例では、第1のグランドマスタクロック21がバウンダリクロック1の時刻源であり、第2のグランドマスタクロック22がバウンダリクロック1の時刻源でない。また、図3A及び図3Bにおいて、TX(Xは1~16の整数)に対応して記載されている、カッコの外側の数字は各装置の時計が示す時刻である。なお各装置の時計がずれている場合には、TXに対応して記載されているカッコ内に正しい時刻が示されている。 Here, referring to the example shown in FIGS. 3A and 3B, an example in which an abnormality occurs in the time of the first grand master clock 21 and no abnormality occurs in the time of the second grand master clock 22 The processing of the offset calculation unit 102, offset pattern determination unit 104, and abnormal device determination unit 105 will be described in more detail. FIG. 3A is a sequence diagram showing the transmission and reception of messages between the first grand master clock 21 in which a time abnormality has occurred and the boundary clock 1. FIG. 3B is a sequence diagram showing transmission and reception of messages between the second grand master clock 22 in which no time abnormality occurs and the boundary clock 1. In this example, the transmission delay time in communication between the first grand master clock 21 and the second grand master clock 22 and the boundary clock 1 is "1". Further, in this example, the first grand master clock 21 is the time source of the boundary clock 1, and the second grand master clock 22 is not the time source of the boundary clock 1. Furthermore, in FIGS. 3A and 3B, the numbers outside the parentheses corresponding to TX (X is an integer from 1 to 16) are the times indicated by the clocks of each device. Note that if the clocks of each device are out of sync, the correct time is shown in parentheses corresponding to TX.
 図3Aに示すように、第1のグランドマスタクロック21は、正しい時刻「6」において1セット目のSync messageをバウンダリクロック1に送信する。本例では、上述したように、第1のグランドマスタクロック21の時刻には異常が発生しており、正しい時刻からずれている。これにより、第1のグランドマスタクロック21の時計は、正しい時刻「6」ではなく、時刻「9」を示している。このため、第1のグランドマスタクロック21がバウンダリクロック1に送信したSync messageには、Sync messageの送信時刻として時刻T1=「9」を示すタイムスタンプが含まれている。 As shown in FIG. 3A, the first grand master clock 21 transmits the first set of Sync messages to the boundary clock 1 at the correct time "6". In this example, as described above, an abnormality has occurred in the time of the first grand master clock 21, and the time has deviated from the correct time. As a result, the clock of the first grand master clock 21 shows the time "9" instead of the correct time "6". Therefore, the Sync message sent by the first grand master clock 21 to the boundary clock 1 includes a timestamp indicating time T1=“9” as the sending time of the Sync message.
 バウンダリクロック1は、自装置の正しい時刻T2=「7」において、第1のグランドマスタクロック21から送信されたSync messageを受信する。そして、バウンダリクロック1は、自装置の正しい時刻T3=「8」において、Delay_Req messageを第1のグランドマスタクロック21に送信する。 The boundary clock 1 receives the Sync message transmitted from the first grand master clock 21 at the correct time T2=“7” of its own device. Then, the boundary clock 1 transmits the Delay_Req message to the first grand master clock 21 at the correct time T3=“8” of the own device.
 第1のグランドマスタクロック21は、正しい時刻「9」において、バウンダリクロック1から送信されたDelay_Req messageを受信すると、Delay_Resp messageをバウンダリクロック1に送信する。上述したように、第1のグランドマスタクロック21の時刻には異常が発生しており、正しい時刻からずれている。これにより、このとき、第1のグランドマスタクロック21の時計は、正しい時刻「9」ではなく、時刻T4=「12」を示している。このため、第1のグランドマスタクロック21がバウンダリクロック1に送信したDelay_Resp messageには、Delay_Req messageの受信時刻として時刻T4=「12」を示すタイムスタンプが含まれている。 When the first grand master clock 21 receives the Delay_Req message sent from the boundary clock 1 at the correct time “9”, it sends the Delay_Resp message to the boundary clock 1. As described above, an abnormality has occurred in the time of the first grand master clock 21, and the time has deviated from the correct time. As a result, at this time, the clock of the first grand master clock 21 is not showing the correct time "9" but the time T4="12". Therefore, the Delay_Resp message sent by the first grand master clock 21 to the boundary clock 1 includes a time stamp indicating time T4="12" as the reception time of the Delay_Req message.
 オフセット計算部102は、以下の式3に示すように、1セット目の第1のオフセットOs11を計算する。
 Os11=((T2-T1)-(T4-T3))/2
     =((7-9)-(12-8))/2
     =-3                  (式3)
The offset calculation unit 102 calculates the first offset Os11 of the first set as shown in Equation 3 below.
Os11=((T2-T1)-(T4-T3))/2
=((7-9)-(12-8))/2
=-3 (Formula 3)
 ここで、追って詳細に説明する時刻同期処理部107は、オフセット計算部102によって計算された1セット目の第1のオフセットOs1を用いて、バウンダリクロック1を第1のグランドマスタクロック21に同期させる。 Here, the time synchronization processing unit 107, which will be described in detail later, synchronizes the boundary clock 1 with the first grand master clock 21 using the first offset Os1 of the first set calculated by the offset calculation unit 102. .
 続いて、第1のグランドマスタクロック21は、正しい時刻「15」において2セット目のSync messageをバウンダリクロック1に送信する。本例では、上述したように、第1のグランドマスタクロック21の時刻には異常が発生しており、正しい時刻からずれている。これにより、第1のグランドマスタクロック21の時計は、正しい時刻「15」ではなく、時刻「18」を示している。このため、第1のグランドマスタクロック21がバウンダリクロック1に送信したSync messageには、Sync messageの送信時刻として時刻T5=「18」を示すタイムスタンプが含まれている。 Subsequently, the first grand master clock 21 transmits the second set of Sync messages to the boundary clock 1 at the correct time "15". In this example, as described above, an abnormality has occurred in the time of the first grand master clock 21, and the time has deviated from the correct time. As a result, the clock of the first grand master clock 21 shows the time "18" instead of the correct time "15". Therefore, the Sync message sent by the first grand master clock 21 to the boundary clock 1 includes a timestamp indicating time T5="18" as the Sync message transmission time.
 バウンダリクロック1は、正しい時刻「16」において、第1のグランドマスタクロック21から送信された2セット目のSync messageを受信する。上述したように、バウンダリクロック1は、正しい時刻からずれている第1のグランドマスタクロック21に同期したため、バウンダリクロック1の時刻は、正しい時刻からずれている。このため、2セット目のSync messageが受信されたとき、バウンダリクロック1の時計は、正しい時刻「16」ではなく、時刻T6=「19」を示している。そして、バウンダリクロック1は、正しい時刻「17」において、Delay_Req messageをグランドマスタクロック2に送信する。このとき、第1のグランドマスタクロック21の時刻は正しい時刻からずれているため、2セット目のDelay_Req messageを送信したとき、バウンダリクロック1の時計は、時刻T7=「20」を示している。 The boundary clock 1 receives the second set of Sync messages transmitted from the first grand master clock 21 at the correct time “16”. As described above, since the boundary clock 1 is synchronized with the first grand master clock 21 which is deviated from the correct time, the time of the boundary clock 1 is deviated from the correct time. Therefore, when the second set of Sync messages is received, the boundary clock 1 does not show the correct time "16" but the time T6="19". Then, the boundary clock 1 transmits the Delay_Req message to the grand master clock 2 at the correct time “17”. At this time, the time of the first grand master clock 21 is deviated from the correct time, so when the second set of Delay_Req messages is transmitted, the clock of the boundary clock 1 indicates time T7="20".
 第1のグランドマスタクロック21は、正しい時刻「18」において、バウンダリクロック1から送信されたDelay_Req messageを受信すると、Delay_Resp messageをバウンダリクロック1に送信する。上述したように、第1のグランドマスタクロック21の時刻には異常が発生しており、正しい時刻からずれている。これにより、Delay_Req messageの受信時において、第1のグランドマスタクロック21の時計は、正しい時刻「18」ではなく、時刻T8=「21」を示している。このため、第1のグランドマスタクロック21がバウンダリクロック1に送信したDelay_Resp messageには、Delay_Req messageの受信時刻として時刻T8=「21」を示すタイムスタンプが含まれている。 When the first grand master clock 21 receives the Delay_Req message sent from the boundary clock 1 at the correct time “18”, it sends the Delay_Resp message to the boundary clock 1. As described above, an abnormality has occurred in the time of the first grand master clock 21, and the time has deviated from the correct time. As a result, when receiving the Delay_Req message, the clock of the first grand master clock 21 does not show the correct time "18" but the time T8="21". Therefore, the Delay_Resp message sent by the first grand master clock 21 to the boundary clock 1 includes a time stamp indicating time T8="21" as the reception time of the Delay_Req message.
 オフセット計算部102は、以下の式4に示すように、2セット目の第1のオフセットOs12を計算する。
 Os12=((T6-T5)-(T8-T7))/2
     =((19-18)-(21-20))/2
     =0                  (式4)
The offset calculation unit 102 calculates the first offset Os12 of the second set as shown in Equation 4 below.
Os12=((T6-T5)-(T8-T7))/2
=((19-18)-(21-20))/2
=0 (Formula 4)
 ここで、異常装置判定部105は、第1のグランドマスタクロック21を時刻源とした通信における、1回目の第1のオフセットOs11が「オフセットあり」であるか否かを判定し、2回目の第1のオフセットOs12が「オフセットあり」であるか否かを判定する。本例では、1回目の第1のオフセットOs11は、「-3(オフセットあり)」であり、2回目の第1のオフセットOs12は、「0(オフセットなし)」である。このため、異常装置判定部105は、第1のオフセットOs1が「オフセットあり」から「オフセットなし」に変動したと判定する。 Here, the abnormal device determination unit 105 determines whether or not the first offset Os11 in the communication using the first grand master clock 21 as the time source is "with offset", and It is determined whether the first offset Os12 is "with offset". In this example, the first offset Os11 at the first time is "-3 (with offset)" and the first offset Os12 at the second time is "0 (no offset)". Therefore, the abnormal device determination unit 105 determines that the first offset Os1 has changed from "offset present" to "no offset".
 また、図3Bに示すように、第2のグランドマスタクロック22は、正しい時刻「6」において1セット目のSync messageをバウンダリクロック1に送信する。本例では、第2のグランドマスタクロック22の時刻は正常(異常が発生していない)であり、このとき、第2のグランドマスタクロック22の時計は正しい時刻T9=「6」を示している。このため、第2のグランドマスタクロック22がバウンダリクロック1に送信したSync messageには、Sync messageの送信時刻として時刻T9=「6」を示すタイムスタンプが含まれている。 Furthermore, as shown in FIG. 3B, the second grand master clock 22 transmits the first set of Sync messages to the boundary clock 1 at the correct time "6". In this example, the time of the second grand master clock 22 is normal (no abnormality has occurred), and at this time, the clock of the second grand master clock 22 shows the correct time T9 = "6". . Therefore, the Sync message sent by the second grand master clock 22 to the boundary clock 1 includes a timestamp indicating time T9="6" as the Sync message transmission time.
 バウンダリクロック1は、自装置の正しい時刻T10=「7」において、第2のグランドマスタクロック22から送信されたSync messageを受信する。そして、バウンダリクロック1は、自装置の正しい時刻T11=「8」において、Delay_Req messageをグランドマスタクロック2に送信する。 The boundary clock 1 receives the Sync message transmitted from the second grand master clock 22 at the correct time T10=“7” of its own device. Then, the boundary clock 1 transmits the Delay_Req message to the grand master clock 2 at the correct time T11=“8” of the own device.
 第2のグランドマスタクロック22は、正しい時刻「9」において、バウンダリクロック1から送信されたDelay_Req messageを受信すると、Delay_Resp messageをバウンダリクロック1に送信する。上述したように、本例では、第2のグランドマスタクロック22の時刻は正常であり、Delay_Req messageの受信時において、第2のグランドマスタクロック22の時計は正しい時刻T12=「9」を示している。このため、第2のグランドマスタクロック22がバウンダリクロック1に送信したDelay_Resp messageには、Delay_Req messageの受信時刻として時刻T12=「9」を示すタイムスタンプが含まれている。 When the second grand master clock 22 receives the Delay_Req message sent from the boundary clock 1 at the correct time “9”, it sends the Delay_Resp message to the boundary clock 1. As described above, in this example, the time of the second grandmaster clock 22 is normal, and when the Delay_Req message is received, the clock of the second grandmaster clock 22 indicates the correct time T12="9". There is. Therefore, the Delay_Resp message sent by the second grand master clock 22 to the boundary clock 1 includes a time stamp indicating time T12=“9” as the reception time of the Delay_Req message.
 オフセット計算部102は、以下の式5に示すように、1セット目の第2のオフセットOs21を計算する。
 Os21=((T10-T9)-(T12-T11))/2
     =((7-6)-(9-8))/2
     =0               (式5)
The offset calculation unit 102 calculates the second offset Os21 of the first set as shown in Equation 5 below.
Os21=((T10-T9)-(T12-T11))/2
=((7-6)-(9-8))/2
=0 (Formula 5)
 ここで、上述したように、バウンダリクロック1は、第1のグランドマスタクロック21と同期される。一方、第2のグランドマスタクロック22は時刻源でないため、バウンダリクロック1は、第2のグランドマスタクロック22には同期されない。 Here, as described above, the boundary clock 1 is synchronized with the first grand master clock 21. On the other hand, since the second grandmaster clock 22 is not a time source, the boundary clock 1 is not synchronized with the second grandmaster clock 22.
 続いて、第2のグランドマスタクロック22は、正しい時刻「15」において2セット目のSync messageをバウンダリクロック1に送信する。本例では、第2のグランドマスタクロック22の時刻は正常であり、このとき、第2のグランドマスタクロック22の時計は正しい時刻T13=「15」を示している。このため、第2のグランドマスタクロック22がバウンダリクロック1に送信したSync messageには、Sync messageの送信時刻として時刻T13=「15」を示すタイムスタンプが含まれている。 Subsequently, the second grand master clock 22 transmits a second set of Sync messages to the boundary clock 1 at the correct time "15". In this example, the time of the second grand master clock 22 is normal, and at this time, the clock of the second grand master clock 22 shows the correct time T13=“15”. Therefore, the Sync message sent by the second grand master clock 22 to the boundary clock 1 includes a timestamp indicating time T13="15" as the Sync message transmission time.
 バウンダリクロック1は、正しい時刻「16」において、第1のグランドマスタクロック21から送信された2セット目のSync messageを受信する。上述したように、ここで、バウンダリクロック1の時刻は、第1のグランドマスタクロック21と同期しており、第1のグランドマスタクロック21の時刻は正しい時刻からずれている。これにより、2セット目のSync messageが受信されたときに、バウンダリクロック1の時計はT14=「19」を示している。そして、バウンダリクロック1は、正しい時刻「17」において、Delay_Req messageをグランドマスタクロック2に送信する。バウンダリクロック1の時刻は、第1のグランドマスタクロック21と同期しており、第1のグランドマスタクロック21の時刻は正しい時刻からずれているため、2セット目のDelay_Req messageを送信したときに、バウンダリクロック1の時刻はT15=「20」を示している。 The boundary clock 1 receives the second set of Sync messages transmitted from the first grand master clock 21 at the correct time “16”. As described above, here, the time of the boundary clock 1 is synchronized with the first grand master clock 21, and the time of the first grand master clock 21 is deviated from the correct time. As a result, when the second set of Sync messages is received, the boundary clock 1 indicates T14="19". Then, the boundary clock 1 transmits the Delay_Req message to the grand master clock 2 at the correct time “17”. The time of the boundary clock 1 is synchronized with the first grand master clock 21, and the time of the first grand master clock 21 is deviated from the correct time, so when the second set of Delay_Req messages is sent, The time of boundary clock 1 indicates T15="20".
 第2のグランドマスタクロック22は、正しい時刻「18」において、バウンダリクロック1から送信されたDelay_Req messageを受信すると、Delay_Resp messageをバウンダリクロック1に送信する。上述したように、本例では、第2のグランドマスタクロック22の時刻は正常であり、Delay_Req messageの受信時において、第2のグランドマスタクロック22の時計は正しい時刻T16=「18」を示している。このため、第2のグランドマスタクロック22がバウンダリクロック1に送信したDelay_Resp messageには、Delay_Req messageの受信時刻として時刻T16=「18」を示すタイムスタンプが含まれている。 When the second grand master clock 22 receives the Delay_Req message sent from the boundary clock 1 at the correct time “18”, it sends the Delay_Resp message to the boundary clock 1. As described above, in this example, the time of the second grandmaster clock 22 is normal, and when the Delay_Req message is received, the clock of the second grandmaster clock 22 indicates the correct time T16="18". There is. Therefore, the Delay_Resp message sent by the second grand master clock 22 to the boundary clock 1 includes a time stamp indicating time T16="18" as the reception time of the Delay_Req message.
 オフセット計算部102は、以下の式6に示すように、2セット目の第2のオフセットOs22を計算する。
 Os22=((T14-T13)-(T16-T15))/2
     =((19-15)-(18-20))/2
     =3                  (式6)
The offset calculation unit 102 calculates the second offset Os22 of the second set as shown in Equation 6 below.
Os22=((T14-T13)-(T16-T15))/2
=((19-15)-(18-20))/2
=3 (Formula 6)
 ここで、異常装置判定部105は、第1のグランドマスタクロック21を時刻源とした通信における、1回目の第2のオフセットOs21が「オフセットあり」であるか否かを判定し、2回目の第2のオフセットOs22が「オフセットあり」であるか否かを判定する。本例では、1回目の第2のオフセットOs21は、「0(オフセットなし)」であり、2回目の第2のオフセットOs22は、「3(オフセットあり)」である。このため、異常装置判定部105は、第2のオフセットが「オフセットなし」から「オフセットあり」に変動したと判定する。 Here, the abnormal device determination unit 105 determines whether or not the first second offset Os21 in the communication using the first grand master clock 21 as the time source is "with offset", and It is determined whether the second offset Os22 is "with offset". In this example, the second offset Os21 at the first time is "0 (no offset)", and the second offset Os22 at the second time is "3 (with offset)". Therefore, the abnormal device determining unit 105 determines that the second offset has changed from "no offset" to "with offset".
 このように、異常装置判定部105は、第1のオフセットが「オフセットあり」から「オフセットなし」に変動したと判定されたことにより、時刻源であるグランドマスタクロック2(本例では、第1のグランドマスタクロック21)の時刻に異常が発生していると判定してもよい。また、異常装置判定部105は、第2のオフセットが「オフセットなし」から「オフセットあり」に変動したと判定されたことにより、時刻源であるグランドマスタクロック2(本例では、第1のグランドマスタクロック21)の時刻に異常が発生していると判定してもよい。 In this way, the abnormal device determination unit 105 determines that the first offset has changed from "with offset" to "no offset", so that It may be determined that an abnormality has occurred at the time of the grand master clock 21). In addition, when it is determined that the second offset has changed from "no offset" to "with offset," the abnormal device determination unit 105 determines that the time source, the grand master clock 2 (in this example, the first ground It may be determined that an abnormality has occurred in the time of the master clock 21).
 次に、図4A及び図4Bに示す例を参照して、第1のグランドマスタクロック21の時刻に異常が発生しておらず、第2のグランドマスタクロック22の時刻に異常が発生してる場合の、オフセット計算部102、オフセットパターン判定部104、及び異常装置判定部105の処理についてより詳細に説明する。図4Aは、時刻に異常が発生していない第1のグランドマスタクロック21と、バウンダリクロック1とのメッセージの送受信を示すシーケンス図である。図4Bは、時刻に異常が発生している第2のグランドマスタクロック22と、バウンダリクロック1とのメッセージの送受信を示すシーケンス図である。本例において、第1のグランドマスタクロック21及び第2のグランドマスタクロック22と、バウンダリクロック1との間の通信における伝送遅延時間は「1」である。また、本例では、第1のグランドマスタクロック21がバウンダリクロック1の時刻源であり、第2のグランドマスタクロック22がバウンダリクロック1の時刻源でない。また、図4A及び図4Bにおいて、TXに対応して記載されている、カッコの外側の数字は各装置の時計が示す時刻である。なお、各装置の時計がずれている場合には、TXに対応して記載されているカッコ内に正しい時刻が示されている。 Next, referring to the example shown in FIGS. 4A and 4B, a case where no abnormality occurs in the time of the first grandmaster clock 21 and an abnormality occurs in the time of the second grandmaster clock 22. The processing of the offset calculation unit 102, offset pattern determination unit 104, and abnormal device determination unit 105 will be described in more detail. FIG. 4A is a sequence diagram showing message transmission and reception between the first grand master clock 21 in which no time abnormality occurs and the boundary clock 1. FIG. 4B is a sequence diagram showing the transmission and reception of messages between the second grand master clock 22 in which a time abnormality has occurred and the boundary clock 1. In this example, the transmission delay time in communication between the first grand master clock 21 and the second grand master clock 22 and the boundary clock 1 is "1". Further, in this example, the first grand master clock 21 is the time source of the boundary clock 1, and the second grand master clock 22 is not the time source of the boundary clock 1. Further, in FIGS. 4A and 4B, the numbers outside the parentheses corresponding to TX are the times indicated by the clocks of each device. Note that if the clocks of each device are out of sync, the correct time is shown in parentheses corresponding to TX.
 図4Aに示すように、第1のグランドマスタクロック21は、正しい時刻「6」において1セット目のSync messageをバウンダリクロック1に送信する。本例では、第1のグランドマスタクロック21の時刻は正常であり、時計は正しい時刻T1=「6」を示している。このため、第1のグランドマスタクロック21がバウンダリクロック1に送信したSync messageには、Sync messageの送信時刻としてT1=「6」を示すタイムスタンプが含まれている。 As shown in FIG. 4A, the first grand master clock 21 transmits the first set of Sync messages to the boundary clock 1 at the correct time "6". In this example, the time of the first grand master clock 21 is normal, and the clock shows the correct time T1 = "6". Therefore, the Sync message sent by the first grand master clock 21 to the boundary clock 1 includes a time stamp indicating T1=“6” as the Sync message transmission time.
 バウンダリクロック1は、自装置の正しい時刻T2=「7」において、第1のグランドマスタクロック21から送信されたSync messageを受信する。そして、バウンダリクロック1は、自装置の正しい時刻T3=「8」において、Delay_Req messageをグランドマスタクロック2に送信する。 The boundary clock 1 receives the Sync message transmitted from the first grand master clock 21 at the correct time T2=“7” of its own device. Then, the boundary clock 1 transmits the Delay_Req message to the grand master clock 2 at the correct time T3=“8” of the own device.
 第1のグランドマスタクロック21は、正しい時刻「9」において、バウンダリクロック1から送信されたDelay_Req messageを受信すると、Delay_Resp messageをバウンダリクロック1に送信する。本例では、第2のグランドマスタクロック22の時刻は正常であり、Delay_Req messageの受信時において、時計は正しい時刻T4=「9」を示している。このため、第2のグランドマスタクロック22がバウンダリクロック1に送信したDelay_Resp messageには、Delay_Req messageの受信時刻として時刻T4=「9」を示すタイムスタンプが含まれている。 When the first grand master clock 21 receives the Delay_Req message sent from the boundary clock 1 at the correct time “9”, it sends the Delay_Resp message to the boundary clock 1. In this example, the time of the second grand master clock 22 is normal, and the clock shows the correct time T4="9" when the Delay_Req message is received. Therefore, the Delay_Resp message sent by the second grand master clock 22 to the boundary clock 1 includes a time stamp indicating time T4=“9” as the reception time of the Delay_Req message.
 オフセット計算部102は、以下の式7に示すように、1セット目の第1のオフセットOs11を計算する。
 Os11=((T2-T1)-(T4-T3))/2
     =((7-6)-(9-8))/2
     =0                  (式7)
The offset calculation unit 102 calculates the first offset Os11 of the first set as shown in Equation 7 below.
Os11=((T2-T1)-(T4-T3))/2
=((7-6)-(9-8))/2
=0 (Formula 7)
 ここで、追って詳細に説明する時刻同期処理部107は、オフセット計算部102によって計算された1セット目の第1のオフセットOs11を用いて、バウンダリクロック1の時刻を第1のグランドマスタクロック21に同期させる。このとき、バウンダリクロック1は、すでに第1のグランドマスタクロック21と同期されている(第1のオフセットOs11は「0」である)ため、変更されない。 Here, the time synchronization processing unit 107, which will be described in detail later, sets the time of the boundary clock 1 to the first grandmaster clock 21 using the first offset Os11 of the first set calculated by the offset calculation unit 102. Synchronize. At this time, the boundary clock 1 is not changed because it is already synchronized with the first grand master clock 21 (the first offset Os11 is "0").
 続いて、第1のグランドマスタクロック21は、正しい時刻「15」において2セット目のSync messageをバウンダリクロック1に送信する。上述したように、本例では、第1のグランドマスタクロック21の時刻は正常であり、時計は正しい時刻T5=「15」を示している。このため、第1のグランドマスタクロック21がバウンダリクロック1に送信したSync messageには、Sync messageの送信時刻として時刻T5=「15」を示すタイムスタンプが含まれている。 Subsequently, the first grand master clock 21 transmits the second set of Sync messages to the boundary clock 1 at the correct time "15". As described above, in this example, the time of the first grand master clock 21 is normal, and the clock shows the correct time T5=“15”. Therefore, the Sync message sent by the first grand master clock 21 to the boundary clock 1 includes a timestamp indicating time T5=“15” as the sending time of the Sync message.
 バウンダリクロック1は、自装置の正しい時刻T6=「16」において、第1のグランドマスタクロック21から送信されたSync messageを受信する。そして、バウンダリクロック1は、自装置の正しい時刻T7=「17」において、Delay_Req messageを第1のグランドマスタクロック21に送信する。 The boundary clock 1 receives the Sync message transmitted from the first grand master clock 21 at the correct time T6=“16” of its own device. Then, the boundary clock 1 transmits the Delay_Req message to the first grand master clock 21 at the correct time T7=“17” of the own device.
 第1のグランドマスタクロック21は、正しい時刻「18」において、バウンダリクロック1から送信されたDelay_Req messageを受信すると、Delay_Resp messageをバウンダリクロック1に送信する。上述したように、本例では、第1のグランドマスタクロック21の時刻は正常であり、Delay_Req messageの受信時において、時計は正しい時刻T8=「18」を示している。このため、第2のグランドマスタクロック22がバウンダリクロック1に送信したDelay_Resp messageには、Delay_Req messageの受信時刻として時刻T8=「18」を示すタイムスタンプが含まれている。 When the first grand master clock 21 receives the Delay_Req message sent from the boundary clock 1 at the correct time “18”, it sends the Delay_Resp message to the boundary clock 1. As described above, in this example, the time of the first grand master clock 21 is normal, and the clock indicates the correct time T8="18" when the Delay_Req message is received. Therefore, the Delay_Resp message sent by the second grand master clock 22 to the boundary clock 1 includes a timestamp indicating time T8="18" as the reception time of the Delay_Req message.
 オフセット計算部102は、以下の式8に示すように、2セット目の第1のオフセットOs12を計算する。
 Os12=((T6-T5)-(T8-T7))/2
     =((16-15)-(18-17))/2
     =0                  (式8)
The offset calculation unit 102 calculates the first offset Os12 of the second set as shown in Equation 8 below.
Os12=((T6-T5)-(T8-T7))/2
=((16-15)-(18-17))/2
=0 (Formula 8)
 ここで、異常装置判定部105は、第1のグランドマスタクロック21を時刻源とした通信における、1回目の第1のオフセットOs11が「オフセットあり」であるか否かを判定し、2回目の第1のオフセットOs12が「オフセットあり」であるか否かを判定する。本例では、1回目の第1のオフセットOs11は、「0(オフセットなし)」であり、2回目の第1のオフセットOs12は、「0(オフセットなし)」である。このため、異常装置判定部105は、第1のオフセットOs1が変動していないと判定する。 Here, the abnormal device determination unit 105 determines whether or not the first offset Os11 in the communication using the first grand master clock 21 as the time source is "with offset", and It is determined whether the first offset Os12 is "with offset". In this example, the first offset Os11 at the first time is "0 (no offset)", and the first offset Os12 at the second time is "0 (no offset)". Therefore, the abnormal device determination unit 105 determines that the first offset Os1 has not changed.
 図4Bに示すように、第2のグランドマスタクロック22は、正しい時刻「6」において1セット目のSync messageをバウンダリクロック1に送信する。本例では、第2のグランドマスタクロック22の時刻には異常が発生しており、正しい時刻からずれている。これにより、第2のグランドマスタクロック22の時計は、正しい時刻「6」ではなく、時刻「9」を示している。このため、第2のグランドマスタクロック22がバウンダリクロック1に送信したSync messageには、Sync messageの送信時刻として時刻T9=「9」を示すタイムスタンプが含まれている。 As shown in FIG. 4B, the second grand master clock 22 transmits the first set of Sync messages to the boundary clock 1 at the correct time "6". In this example, an abnormality has occurred in the time of the second grand master clock 22, and the time has deviated from the correct time. As a result, the clock of the second grand master clock 22 shows the time "9" instead of the correct time "6". Therefore, the Sync message sent by the second grand master clock 22 to the boundary clock 1 includes a time stamp indicating time T9=“9” as the Sync message transmission time.
 バウンダリクロック1は、自装置の正しい時刻T10=「7」において、第2のグランドマスタクロック22から送信されたSync messageを受信する。そして、バウンダリクロック1は、自装置内の正しい時刻T11=「8」において、Delay_Req messageをグランドマスタクロック2に送信する。 The boundary clock 1 receives the Sync message transmitted from the second grand master clock 22 at the correct time T10=“7” of its own device. Then, the boundary clock 1 transmits the Delay_Req message to the grand master clock 2 at the correct time T11="8" within the own device.
 第2のグランドマスタクロック22は、正しい時刻「9」において、バウンダリクロック1から送信されたDelay_Req messageを受信すると、Delay_Resp messageをバウンダリクロック1に送信する。上述したように、第2のグランドマスタクロック22の時刻に異常が発生しており、正しい時刻からずれている。これにより、Delay_Req messageの受信時において、第2のグランドマスタクロック22の時計は、正しい時刻「9」ではなく、時刻T12=「12」を示している。このため、第1のグランドマスタクロック21がバウンダリクロック1に送信したDelay_Resp messageには、Delay_Req messageの受信時刻として時刻T12=「12」を示すタイムスタンプが含まれている。 When the second grand master clock 22 receives the Delay_Req message sent from the boundary clock 1 at the correct time “9”, it sends the Delay_Resp message to the boundary clock 1. As described above, an abnormality has occurred in the time of the second grand master clock 22, and the time has deviated from the correct time. As a result, when receiving the Delay_Req message, the clock of the second grand master clock 22 does not show the correct time "9" but the time T12="12". Therefore, the Delay_Resp message sent by the first grand master clock 21 to the boundary clock 1 includes a time stamp indicating time T12="12" as the reception time of the Delay_Req message.
 オフセット計算部102は、以下の式9に示すように、1セット目の第2のオフセットOs21を計算する。
 Os21=((T10-T9)-(T12-T11))/2
     =((7-9)-(12-8))/2
     =-3               (式9)
The offset calculation unit 102 calculates the second offset Os21 of the first set as shown in Equation 9 below.
Os21=((T10-T9)-(T12-T11))/2
=((7-9)-(12-8))/2
=-3 (Formula 9)
 上述したように、ここで、バウンダリクロック1は、時刻源である第1のグランドマスタクロック21と同期される。一方、バウンダリクロック1は、時刻源でない第2のグランドマスタクロック22には同期されない。 As mentioned above, here, the boundary clock 1 is synchronized with the first grand master clock 21, which is a time source. On the other hand, the boundary clock 1 is not synchronized with the second grand master clock 22, which is not a time source.
 続いて、第2のグランドマスタクロック22は、正しい時刻「15」において2セット目のSync messageをバウンダリクロック1に送信する。本例では、第2のグランドマスタクロック22の時刻には異常が発生しており、正しい時刻からずれている。これにより、第2のグランドマスタクロック22の時計は、正しい時刻「15」ではなく、時刻T13=「18」を示している。このため、第2のグランドマスタクロック22がバウンダリクロック1に送信したSync messageには、Sync messageの送信時刻として時刻T13=「18」を示すタイムスタンプが含まれている。 Subsequently, the second grand master clock 22 transmits a second set of Sync messages to the boundary clock 1 at the correct time "15". In this example, an abnormality has occurred in the time of the second grand master clock 22, and the time has deviated from the correct time. As a result, the clock of the second grand master clock 22 is not showing the correct time "15" but the time T13="18". Therefore, the Sync message sent by the second grand master clock 22 to the boundary clock 1 includes a timestamp indicating time T13="18" as the Sync message transmission time.
 バウンダリクロック1は、自装置の正しい時刻T14=「16」において、第2のグランドマスタクロック22から送信されたSync messageを受信する。そして、バウンダリクロック1は、自装置の正しい時刻T15=「17」において、Delay_Req messageをグランドマスタクロック2に送信する。 The boundary clock 1 receives the Sync message transmitted from the second grand master clock 22 at the correct time T14="16" of its own device. Then, the boundary clock 1 transmits the Delay_Req message to the grand master clock 2 at the correct time T15=“17” of the own device.
 第2のグランドマスタクロック22は、正しい時刻「18」において、バウンダリクロック1から送信されたDelay_Req messageを受信すると、Delay_Resp messageをバウンダリクロック1に送信する。上述したように、第2のグランドマスタクロック22の時刻には異常が発生しており、正しい時刻からずれている。これにより、Delay_Req messageの受信時において、第2のグランドマスタクロック22の時計は、正しい時刻「18」ではなく、時刻T16=「21」を示している。このため、第1のグランドマスタクロック21がバウンダリクロック1に送信したDelay_Resp messageには、Delay_Req messageの受信時刻として時刻T16=「21」を示すタイムスタンプが含まれている。 When the second grand master clock 22 receives the Delay_Req message sent from the boundary clock 1 at the correct time “18”, it sends the Delay_Resp message to the boundary clock 1. As described above, an abnormality has occurred in the time of the second grand master clock 22, and the time has deviated from the correct time. As a result, when receiving the Delay_Req message, the clock of the second grand master clock 22 does not show the correct time "18" but the time T16="21". Therefore, the Delay_Resp message sent by the first grand master clock 21 to the boundary clock 1 includes a time stamp indicating time T16="21" as the reception time of the Delay_Req message.
 オフセット計算部102は、以下の式10に示すように、2セット目の第2のオフセットOs22を計算する。
 Os22=((T14-T13)-(T16-T15))/2
     =((16-18)-(21-17))/2
     =-3                  (式10)
The offset calculation unit 102 calculates the second offset Os22 of the second set as shown in Equation 10 below.
Os22=((T14-T13)-(T16-T15))/2
=((16-18)-(21-17))/2
=-3 (Formula 10)
 ここで、異常装置判定部105は、バウンダリクロック1が第1のグランドマスタクロック21を時刻源とした通信における、1回目における第2のオフセットOs21が「オフセットあり」であるか否かを判定し、2回目の第2のオフセットOs22が「オフセットあり」であるか否かを判定する。本例では、1回目の第2のオフセットOs21は、「-3(オフセットあり)」であり、2回目の第2のオフセットOs22は、「-3(オフセットあり)」である。このため、異常装置判定部105は、第2のオフセットが変動していないと判定する。 Here, the abnormal device determination unit 105 determines whether or not the second offset Os21 in the first communication in which the boundary clock 1 uses the first grand master clock 21 as the time source is "with offset". , it is determined whether the second offset Os22 of the second time is "with offset". In this example, the second offset Os21 at the first time is "-3 (with offset)" and the second offset Os22 at the second time is "-3 (with offset)". Therefore, the abnormal device determination unit 105 determines that the second offset has not changed.
 このように、異常装置判定部105は、第1のオフセットが変動していないと判定されたことにより、時刻源でないグランドマスタクロック2(本例では、第2のグランドマスタクロック22)の時刻に異常が発生していると判定してもよい。また、異常装置判定部105は、第2のオフセットが変動していないと判定されたことにより、時刻源でないグランドマスタクロック2(本例では、第2のグランドマスタクロック22)の時刻に異常が発生していると判定してもよい。 In this way, the abnormal device determination unit 105 changes the time of the grandmaster clock 2 (in this example, the second grandmaster clock 22), which is not the time source, because it is determined that the first offset has not changed. It may be determined that an abnormality has occurred. In addition, the abnormal device determination unit 105 determines that there is an abnormality in the time of the grandmaster clock 2 (in this example, the second grandmaster clock 22), which is not the time source, because it is determined that the second offset has not changed. It may be determined that this has occurred.
 時刻源切替部106は、複数のグランドマスタクロック2のうちの、自装置の時刻源となっているグランドマスタクロック2の時刻に異常が発生していると判定された場合、自装置の時刻源となっているグランドマスタクロック2とは異なる、時刻源となっていなかったグランドマスタクロック2を時刻源とするよう切り替える。具体的には、第1のグランドマスタクロック21が時刻源である場合に、第1のグランドマスタクロック21の時刻に異常が発生していると判定されると、時刻源切替部106は、第2のグランドマスタクロック22を時刻源とするよう切り替える。また、第2のグランドマスタクロック22が時刻源である場合に、第2のグランドマスタクロック22の時刻に異常が発生していると判定されると、時刻源切替部106は、第1のグランドマスタクロック21を時刻源とするよう切り替える。 When it is determined that an abnormality has occurred in the time of the grandmaster clock 2, which is the time source of the own device, among the plurality of grandmaster clocks 2, the time source switching unit 106 switches the time source of the own device. The grandmaster clock 2, which is different from the grandmaster clock 2 that has become the time source, is switched to be the time source. Specifically, when the first grandmaster clock 21 is the time source, if it is determined that an abnormality has occurred in the time of the first grandmaster clock 21, the time source switching unit 106 2 to use the grand master clock 22 as the time source. Further, when the second grandmaster clock 22 is the time source, if it is determined that an abnormality has occurred in the time of the second grandmaster clock 22, the time source switching unit 106 Switch to use the master clock 21 as the time source.
 時刻同期処理部107は、オフセット計算部102により計算された、時刻源であるグランドマスタクロック2と自装置とのオフセットに基づいて、自装置を時刻源であるグランドマスタクロック2に同期させる。時刻源であるグランドマスタクロック2は時刻源切替部106によって切り替えられているグランドマスタクロック2である。 The time synchronization processing unit 107 synchronizes the own device with the grand master clock 2 as the time source, based on the offset between the grand master clock 2 as the time source and the own device, which is calculated by the offset calculation unit 102. The grandmaster clock 2 that is the time source is switched by the time source switching unit 106.
 クロッククラス書換部108は、バウンダリクロック1の時刻に異常が発生していると判定された場合に、クロッククラスを書き換える。具体的には、クロッククラス書換部108は、バウンダリクロック1の時刻に異常が発生していると判定された場合に、バウンダリクロック1に異常が発生していることを示すようにクロッククラスを書き換える。 The clock class rewriting unit 108 rewrites the clock class when it is determined that an abnormality has occurred at the time of the boundary clock 1. Specifically, when it is determined that an abnormality has occurred in the time of boundary clock 1, the clock class rewriting unit 108 rewrites the clock class to indicate that an abnormality has occurred in boundary clock 1. .
 下位パケット送受信部109は、クライアント装置3とパケットを送受信する。また、下位パケット送受信部109からクライアント装置3に送信されるパケットには、バウンダリクロック1がパケットを送受信した時刻を示すタイムスタンプが含まれてもよい。また、下位パケット送受信部109は、クロッククラスをクライアント装置3に送信してもよい。例えば、下位パケット送受信部109からクライアント装置3に送信されるパケットには、クロッククラス書換部108によって出力されたクロッククラスがさらに含まれてもよい。 The lower packet transmitting and receiving unit 109 transmits and receives packets to and from the client device 3. Further, the packet transmitted from the lower packet transmitting/receiving unit 109 to the client device 3 may include a timestamp indicating the time when the boundary clock 1 transmits/receives the packet. Further, the lower packet transmitting/receiving unit 109 may transmit the clock class to the client device 3. For example, the packet transmitted from the lower packet transmitting/receiving unit 109 to the client device 3 may further include the clock class output by the clock class rewriting unit 108.
 障害アラート発出部110は、時刻に異常が発生しているグランドマスタクロック2が判定された場合、該グランドマスタクロック2の時刻に異常が発生していることを示すアラートを発出してもよい。また、障害アラート発出部110は、複数のオフセットの絶対値のいずれもが閾値より大きいと判定された場合、自装置の時刻に異常が発生していることを示すアラートを発出してもよい。障害アラート発出部110は、アラートを、例えば、通信ネットワークを介して他の装置に送信してもよいし、ディスプレイに表示してもよいし、音声によって出力してもよい。 If it is determined that the grandmaster clock 2 has an abnormality in time, the failure alert issuing unit 110 may issue an alert indicating that an abnormality has occurred in the time of the grandmaster clock 2. Further, the failure alert issuing unit 110 may issue an alert indicating that an abnormality has occurred in the time of the own device when it is determined that all of the absolute values of the plurality of offsets are larger than a threshold value. The failure alert issuing unit 110 may transmit the alert to another device via a communication network, display the alert on a display, or output the alert via audio, for example.
 また、障害アラート発出部110は、オフセットパターン判定部104によって、グランドマスタクロック2及びバウンダリクロック1の時刻のいずれもが正常であると判定された場合、アラートを発出しない。この場合、時刻同期システム100に対して、特段の作業が行われることなく、時刻同期システム100の動作は継続される。 Further, the fault alert issuing unit 110 does not issue an alert if the offset pattern determining unit 104 determines that both the grand master clock 2 and the boundary clock 1 are normal. In this case, the time synchronization system 100 continues to operate without any special work being performed on the time synchronization system 100.
 <クライアント装置の構成>
 クライアント装置3は、下位パケット送受信部109との間でパケットを送受信する。
<Client device configuration>
The client device 3 transmits and receives packets to and from the lower packet transmitting and receiving unit 109.
 下位パケット送受信部109からクライアント装置3に送信されるパケットに、バウンダリクロック1がパケットを送受信した時刻を示すタイムスタンプが含まれている構成において、クライアント装置3は、該クライアント装置3をバウンダリクロック1に同期してもよい。 In a configuration in which a packet transmitted from the lower packet transmitting/receiving unit 109 to the client device 3 includes a timestamp indicating the time when the boundary clock 1 transmits/receives the packet, the client device 3 transmits the client device 3 to the boundary clock 1. You can synchronize with
 下位パケット送受信部109からクライアント装置3に送信されるパケットに、さらに、クロッククラス書換部108によって出力されたクロッククラスが含まれている構成において、クロッククラスが自装置の時刻に異常が発生していることを示す場合、クライアント装置3は、該クロッククラスを送信したバウンダリクロック1との同期が停止される。さらに、クライアント装置3は、該クロッククラスを送信したバウンダリクロック1とは異なるバウンダリクロックとの時刻の同期を開始してもよい。 In a configuration in which the packet sent from the lower packet transmitting/receiving unit 109 to the client device 3 further includes the clock class output by the clock class rewriting unit 108, the clock class may indicate that an abnormality has occurred in the time of the own device. If the client device 3 indicates that the clock class is present, synchronization of the client device 3 with the boundary clock 1 that transmitted the clock class is stopped. Furthermore, the client device 3 may start time synchronization with a boundary clock different from the boundary clock 1 that transmitted the clock class.
 <バウンダリクロックの動作>
 ここで、第1の実施形態に係るバウンダリクロック1の動作について、図5A及び図5Bを参照して説明する。図5A及び図5Bは、第1の実施形態に係るバウンダリクロック1の動作の一例を示すフローチャートである。図5A及び図5Bを参照して説明するバウンダリクロック1における動作は、第1の実施形態に係る、複数のグランドマスタクロック2それぞれとパケットを送受信する上位パケット送受信部101を備え、複数のグランドマスタクロック2のうちのいずれか1つのグランドマスタクロック2と同期するバウンダリクロック1(時刻同期装置)の時刻同期方法の一例に相当する。なお、本例では、第1のグランドマスタクロック21が時刻源であり、第2のグランドマスタクロック22が時刻源ではない。
<Boundary clock operation>
Here, the operation of the boundary clock 1 according to the first embodiment will be described with reference to FIGS. 5A and 5B. 5A and 5B are flowcharts showing an example of the operation of the boundary clock 1 according to the first embodiment. The operation of the boundary clock 1 described with reference to FIGS. 5A and 5B is based on the first embodiment, and includes an upper packet transmitting/receiving section 101 that transmits and receives packets to each of the plurality of grandmaster clocks 2. This corresponds to an example of a time synchronization method for the boundary clock 1 (time synchronization device) that synchronizes with any one of the grand master clocks 2 among the clocks 2. Note that in this example, the first grand master clock 21 is the time source, and the second grand master clock 22 is not the time source.
 ステップS11において、オフセット計算部102が、上位パケット送受信部101からタイムスタンプを取得する。具体的には、オフセット計算部102が、第1の上位パケット送受信部101aからタイムスタンプ(図2Aに示すT1~T8)を取得する。また、オフセット計算部102は、第2の上位パケット送受信部101bからタイムスタンプを取得する(図2Bに示すT9~T16)。 In step S11, the offset calculation unit 102 acquires a timestamp from the upper packet transmission/reception unit 101. Specifically, the offset calculation unit 102 obtains time stamps (T1 to T8 shown in FIG. 2A) from the first upper packet transmission/reception unit 101a. Further, the offset calculation unit 102 obtains a time stamp from the second upper packet transmission/reception unit 101b (T9 to T16 shown in FIG. 2B).
 ステップS12において、オフセット計算部102が、複数のグランドマスタクロック2それぞれと上位パケット送受信部101がパケットを送受信した時刻に基づいて、複数のグランドマスタクロック2それぞれの時刻と、自装置の時刻との差である複数のオフセットを計算する。 In step S12, the offset calculation unit 102 calculates the difference between the time of each of the plurality of grandmaster clocks 2 and the time of the own device based on the times at which the upper packet transmission/reception unit 101 transmits and receives packets to each of the plurality of grandmaster clocks 2. Compute multiple offsets that are the difference.
 具体的には、オフセット計算部102が、第1の上位パケット送受信部101aから取得した、1セット目のメッセージそれぞれのタイムスタンプが示す時刻T1~T4に基づいて、1セット目の第1のオフセットOs11を計算する。また、オフセット計算部102が、第2の上位パケット送受信部101bから取得した、1セット目のメッセージそれぞれのタイムスタンプが示す時刻T9~T12に基づいて、1セット目の第2のオフセットOs21を計算する。また、オフセット計算部102は、第1の上位パケット送受信部101aから取得した、2セット目のメッセージそれぞれのタイムスタンプが示す時刻T5~T8に基づいて、2セット目の第1のオフセットOs12を計算する。また、オフセット計算部102は、第2の上位パケット送受信部101bから取得した、2セット目のメッセージそれぞれのタイムスタンプが示す時刻T13~T16に基づいて、2セット目の第2のオフセットOs22を計算する。 Specifically, the offset calculation unit 102 calculates the first offset of the first set based on the times T1 to T4 indicated by the time stamps of the respective messages of the first set acquired from the first upper packet transmitting/receiving unit 101a. Calculate Os11. Further, the offset calculation unit 102 calculates the second offset Os21 of the first set based on the times T9 to T12 indicated by the time stamps of the respective messages of the first set acquired from the second upper packet transmission/reception unit 101b. do. Further, the offset calculation unit 102 calculates the first offset Os12 of the second set based on the times T5 to T8 indicated by the time stamps of the respective messages of the second set acquired from the first upper packet transmission/reception unit 101a. do. Further, the offset calculation unit 102 calculates a second offset Os22 of the second set based on the times T13 to T16 indicated by the time stamps of the respective messages of the second set acquired from the second upper packet transmission/reception unit 101b. do.
 ステップS13において、オフセットパターン判定部104が、2セット目の第1のオフセットOs12及び第2のオフセットOs22それぞれの絶対値と閾値THとを比較する。具体的には、まず、オフセットパターン判定部104が、複数のオフセットの絶対値それぞれが閾値以下であるか否かを判定する。 In step S13, the offset pattern determination unit 104 compares the absolute values of the first offset Os12 and the second offset Os22 of the second set with the threshold value TH. Specifically, first, the offset pattern determination unit 104 determines whether each of the absolute values of a plurality of offsets is less than or equal to a threshold value.
 ステップ13で、2セット目の第1のオフセットOs12の絶対値が閾値TH以下であると判定され、2セット目の第2のオフセットOs22の絶対値が閾値TH以下であると判定された場合(パターンA)、ステップS14において、オフセットパターン判定部104が、グランドマスタクロック2及びバウンダリクロック1の時刻のいずれにも異常が発生していないと判定する。 In step 13, if it is determined that the absolute value of the first offset Os12 of the second set is equal to or less than the threshold value TH, and the absolute value of the second offset Os22 of the second set is determined to be equal to or less than the threshold value TH ( In pattern A), in step S14, the offset pattern determining unit 104 determines that no abnormality has occurred in either the grand master clock 2 or the boundary clock 1.
 ステップ13で、2セット目の第1のオフセットOs12の絶対値が閾値TH以下であると判定され、2セット目の第2のオフセットOs22の絶対値が閾値THより大きいと判定された場合(パターンB又はC)、ステップS15で、オフセットパターン判定部104が、第1のグランドマスタクロック21又は第2のグランドマスタクロック22の時刻に異常が発生していると判定する。 In step 13, if it is determined that the absolute value of the first offset Os12 in the second set is less than or equal to the threshold TH, and if it is determined that the absolute value of the second offset Os22 in the second set is greater than the threshold TH (pattern B or C), in step S15, the offset pattern determining unit 104 determines that an abnormality has occurred in the time of the first grand master clock 21 or the second grand master clock 22.
 そして、ステップS16からステップS21において、異常装置判定部105が、複数のオフセット(第1のオフセットOs1及び第2のオフセットOs2)の絶対値に、閾値TH以下であるオフセットの絶対値と、閾値THより大きいオフセットの絶対値とが含まれると判定された場合に、複数のグランドマスタクロック2の少なくとも1つにおける、一のオフセット(例えば、1回目の第1のオフセットOs11)から、該一のオフセットの次のオフセット(例えば、2回目の第1のオフセットOs12)への変動の有無に基づいて、複数のグランドマスタクロック2のうちのいずれのグランドマスタクロック2の時刻に異常が発生しているかを判定する。ここで、ステップS16からステップS21の処理について詳細に説明する。 Then, in steps S16 to S21, the abnormal device determination unit 105 adds the absolute values of the plurality of offsets (first offset Os1 and second offset Os2) to the absolute value of the offset that is less than or equal to the threshold TH, and the absolute value of the offset that is less than or equal to the threshold TH. If it is determined that a larger absolute value of the offset is included, the offset from one offset (for example, the first first offset Os11) in at least one of the plurality of grand master clocks 2. Based on the presence or absence of a change to the next offset (for example, the second first offset Os12), it is determined which grandmaster clock 2 among the plurality of grandmaster clocks 2 at which an abnormality has occurred. judge. Here, the processing from step S16 to step S21 will be explained in detail.
 ステップS16において、異常装置判定部105が、グランドマスタクロック2と自装置とのオフセットに変動があるか否かを判定する。本例では、異常装置判定部105は、時刻源であるグランドマスタクロック2と自装置とのオフセットに変動があるか否かを判定する。また、異常装置判定部105は、時刻源でないグランドマスタクロック2と自装置とのオフセットに変動があるか否かを判定してもよい。また、異常装置判定部105は、時刻源であるグランドマスタクロック2、及び時刻源でないグランドマスタクロック2それぞれと自装置とのオフセットに変動があるか否かを判定してもよい。 In step S16, the abnormal device determination unit 105 determines whether there is any variation in the offset between the grand master clock 2 and the own device. In this example, the abnormal device determination unit 105 determines whether there is a change in the offset between the grand master clock 2, which is the time source, and the own device. Furthermore, the abnormal device determination unit 105 may determine whether there is a change in the offset between the grand master clock 2, which is not a time source, and the own device. The abnormal device determining unit 105 may also determine whether there is a change in the offset between the grand master clock 2 that is a time source and the grand master clock 2 that is not a time source and the own device.
 ステップS16で、オフセットに変動があると判定されると(S16のYes)、ステップS17において、異常装置判定部105が、時刻源であるグランドマスタクロック2の時刻に異常が発生していると判定する(パターンB)。 If it is determined in step S16 that there is a fluctuation in the offset (Yes in S16), in step S17, the abnormal device determination unit 105 determines that an abnormality has occurred in the time of the grand master clock 2, which is the time source. (Pattern B).
 ステップS18において、障害アラート発出部110が、時刻源であるグランドマスタクロック2の時刻に異常が発生していることを示すアラートを発出する。 In step S18, the fault alert issuing unit 110 issues an alert indicating that an abnormality has occurred in the time of the grand master clock 2, which is the time source.
 ステップS19において、時刻源切替部106は、時刻源でなかったグランドマスタクロック2を時刻源とするよう切り替える。 In step S19, the time source switching unit 106 switches the grand master clock 2, which was not the time source, to become the time source.
 ステップS16で、オフセットに変動がないと判定されると(S16のNo)、ステップS20において、異常装置判定部105が、時刻源でないグランドマスタクロック2の時刻に異常が発生していると判定する(パターンC)。 If it is determined in step S16 that there is no variation in the offset (No in S16), in step S20, the abnormal device determination unit 105 determines that an abnormality has occurred in the time of the grand master clock 2, which is not the time source. (Pattern C).
 ステップS21において、障害アラート発出部110が、時刻源でないグランドマスタクロック2の時刻に異常が発生していることを示すアラートを発出する。 In step S21, the failure alert issuing unit 110 issues an alert indicating that an abnormality has occurred in the time of the grand master clock 2, which is not the time source.
 また、ステップ13で、2回目の第1のオフセットOs1の絶対値が閾値THより大きいと判定され、2回目の第2のオフセットOs2の絶対値が閾値THより大きいと判定された場合(パターンD)、ステップS22において、オフセットパターン判定部104は、自装置(バウンダリクロック1)の時刻に異常が発生していると判定する。 Further, in step 13, if it is determined that the absolute value of the first offset Os1 for the second time is larger than the threshold value TH, and it is determined that the absolute value of the second offset Os2 for the second time is larger than the threshold value TH (pattern D ), in step S22, the offset pattern determining unit 104 determines that an abnormality has occurred in the time of the own device (boundary clock 1).
 ステップS23において、障害アラート発出部110が、バウンダリクロック1の時刻に異常が発生していることを示すアラートを発出する。 In step S23, the failure alert issuing unit 110 issues an alert indicating that an abnormality has occurred at the time of the boundary clock 1.
 ステップS24において、バウンダリクロック1の時刻に異常が発生していることを示すようにクロッククラスを書き換える。 In step S24, the clock class is rewritten to indicate that an abnormality has occurred in the time of boundary clock 1.
 また、図5A及び図5Bに示す例では、上述したように、第1のグランドマスタクロック21が時刻源であり、第2のグランドマスタクロック22が時刻源でないが、これに限られない。例えば、第1のグランドマスタクロック21が時刻源でなく、第2のグランドマスタクロック22が時刻源であってもよい。そのような例においては、ステップS13で、第1のオフセットOs1の絶対値が閾値THより大きいと判定され、第2のオフセットOs2の絶対値が閾値TH以下であると判定された場合(パターンB又はC)、ステップS15で、オフセットパターン判定部104が、第1のグランドマスタクロック21及び第2のグランドマスタクロック22の時刻のいずれかに異常が発生していると判定する。 Further, in the example shown in FIGS. 5A and 5B, as described above, the first grand master clock 21 is the time source and the second grand master clock 22 is not the time source, but the invention is not limited to this. For example, the first grandmaster clock 21 may not be the time source, but the second grandmaster clock 22 may be the time source. In such an example, if it is determined in step S13 that the absolute value of the first offset Os1 is greater than the threshold TH, and the absolute value of the second offset Os2 is determined to be less than or equal to the threshold TH (pattern B Or C), in step S15, the offset pattern determining unit 104 determines that an abnormality has occurred in either the time of the first grand master clock 21 or the second grand master clock 22.
 以上、説明したように、第1の実施形態に係る時刻同期装置としてのバウンダリクロック1は、複数のグランドマスタクロック2とパケットを送受信する上位パケット送受信部101と、複数のグランドマスタクロック2それぞれと上位パケット送受信部101がパケットを送受信した時刻に基づいて、複数のグランドマスタクロック2それぞれの時刻と、自装置の時刻との差である複数のオフセットを計算するオフセット計算部102と、複数のオフセットの絶対値それぞれが閾値以下であるか否かを判定するオフセットパターン判定部104と、複数のオフセットのうち一方のオフセットが閾値以下であり、他方のオフセットが閾値より大きいと判定された場合に、複数の上位装置それぞれについて、一のオフセットから、該一のオフセットの次のオフセットへの変動の有無に基づいて、複数のグランドマスタクロック2のうちのいずれのグランドマスタクロック2の時刻に異常が発生しているかを判定する異常装置判定部105と、を備える。これにより、バウンダリクロック1は、自装置及び複数のグランドマスタクロック2の時刻のいずれに異常が発生しているかを判定することができる。したがって、時刻同期システム100に障害が発生していることが認められた場合に、迅速に障害の切り分けを行うことができ、迅速に正常な動作への復旧を図ることができる。また、保守管理者等が、複数のグランドマスタクロック2及びバウンダリクロック1がそれぞれ設置されている現場に赴くことなく、時刻同期システム100の障害の原因となっている装置を判定することができる。 As described above, the boundary clock 1 as a time synchronization device according to the first embodiment includes an upper packet transmitting/receiving unit 101 that transmits and receives packets to and from a plurality of grandmaster clocks 2, and a plurality of grandmaster clocks 2, respectively. An offset calculation unit 102 that calculates a plurality of offsets that are the differences between the time of each of the plurality of grand master clocks 2 and the time of the own device based on the time when the upper packet transmission/reception unit 101 transmits and receives the packet, and the plurality of offsets. An offset pattern determination unit 104 that determines whether each of the absolute values of is equal to or less than a threshold value; For each of the plurality of host devices, an abnormality occurs in the time of which grandmaster clock 2 among the plurality of grandmaster clocks 2 based on whether there is a change from one offset to the next offset. an abnormal device determination unit 105 that determines whether the Thereby, the boundary clock 1 can determine at which time of its own device or of the plurality of grand master clocks 2 an abnormality has occurred. Therefore, when it is recognized that a failure has occurred in the time synchronization system 100, the failure can be quickly isolated and normal operation can be quickly restored. Moreover, a maintenance manager or the like can determine which device is causing a failure in the time synchronization system 100 without going to the site where a plurality of grand master clocks 2 and boundary clocks 1 are installed.
 また、第1の実施形態に係る時刻同期装置としてのバウンダリクロック1は、複数のグランドマスタクロック2のうちの、自装置の時刻源となっている第1のグランドマスタクロック21の時刻に異常が発生していると判定された場合、第1のグランドマスタクロック21とは異なる第2のグランドマスタクロック22を時刻源とするよう切り替える時刻源切替部106をさらに備える。これにより、時刻源であるグランドマスタクロック2の時刻に異常が発生していたとしても、時刻源でなかった、正常なグランドマスタクロック2が時刻源とされ、バウンダリクロック1は、正常な時刻源に同期することができる。 In addition, the boundary clock 1 as a time synchronization device according to the first embodiment has an abnormality in the time of the first grandmaster clock 21, which is the time source of the own device, among the plurality of grandmaster clocks 2. The clock further includes a time source switching unit 106 that switches to use a second grand master clock 22 different from the first grand master clock 21 as the time source when it is determined that the time source is generated. As a result, even if an abnormality occurs in the time of grandmaster clock 2, which is the time source, the normal grandmaster clock 2, which was not the time source, will be used as the time source, and the boundary clock 1 will be set as the normal time source. can be synchronized.
 また、第1の実施形態に係る時刻同期装置としてのバウンダリクロック1は、時刻に異常が発生しているグランドマスタクロック2が判定された場合、該グランドマスタクロック2の時刻に異常が発生していることを示すアラートを発出する障害アラート発出部110をさらに備える。これにより、時刻同期システム100の保守管理者等は、迅速にいずれのグランドマスタクロック2の時刻に異常が発生しているかを認識することができるため、迅速に時刻に異常が発生しているグランドマスタクロック2の復旧を図ることができる。 In addition, when the boundary clock 1 as the time synchronization device according to the first embodiment determines that the grandmaster clock 2 has an abnormality in time, it is determined that an abnormality has occurred in the time of the grandmaster clock 2. The system further includes a failure alert issuing unit 110 that issues an alert indicating that there is a failure. As a result, the maintenance manager or the like of the time synchronization system 100 can quickly recognize which grandmaster clock 2 has an abnormality in time, so they can quickly identify which grandmaster clock 2 has an abnormality in time. The master clock 2 can be restored.
 また、第1の実施形態に係る時刻同期装置としてのバウンダリクロック1は、複数のオフセットの絶対値のいずれもが閾値より大きいと判定された場合、自装置の時刻に異常が発生していることを示すアラートを発出する障害アラート発出部110をさらに備える。これにより、時刻同期システム100の保守管理者等は、迅速にバウンダリクロック1の時刻に異常が発生していることを認識することができるため、迅速にバウンダリクロック1の復旧を図ることができる。 In addition, when the boundary clock 1 as the time synchronization device according to the first embodiment determines that all of the absolute values of the plurality of offsets are larger than the threshold value, it is determined that an abnormality has occurred in the time of the own device. The system further includes a failure alert issuing unit 110 that issues an alert indicating. As a result, the maintenance manager and the like of the time synchronization system 100 can quickly recognize that an abnormality has occurred in the time of the boundary clock 1, and can therefore quickly restore the boundary clock 1.
 また、第1の実施形態に係る時刻同期装置としてのバウンダリクロック1は、自装置の時刻に異常が発生していると判定された場合に、クロッククラスの書き換えるクロッククラス書換部108と、クロッククラスをクライアント装置3に送信する下位パケット送受信部109と、をさらに備える。これにより、クライアント装置3は、例えば、時刻に異常が発生していることを示すクロッククラスが送信されたバウンダリクロック1とは異なる、時刻が正常なバウンダリクロックと同期するように設定を変更することができる。このため、クライアント装置3、及び該クライアント装置3に接続しているユーザ側の装置にて不具合が発生するのを回避することができる。 The boundary clock 1 as a time synchronization device according to the first embodiment also includes a clock class rewriting unit 108 that rewrites the clock class when it is determined that an abnormality has occurred in the time of the own device, and a clock class rewriting unit 108 that rewrites the clock class. It further includes a lower packet transmitting/receiving section 109 that transmits the packet to the client device 3. As a result, the client device 3 can, for example, change its settings so that it is synchronized with a boundary clock whose time is normal, which is different from the boundary clock 1 to which the clock class indicating that an abnormality has occurred in the time has been transmitted. Can be done. Therefore, it is possible to avoid problems occurring in the client device 3 and the user's device connected to the client device 3.
 なお、第1の実施形態で示した例において、オフセットパターン判定部104は、オフセットの絶対値が「0」である場合に、「オフセットなし」であると判定したがこれに限られない。例えば、オフセットパターン判定部104は、オフセットの絶対値が所定値未満である場合に「オフセットなし」であると判定し、オフセットの絶対値が所定値以上である場合に「オフセットあり」であると判定してもよい。所定値は、正常なグランドマスタクロック2と該グランドマスタクロック2を同期している正常なバウンダリクロック1との通信におけるオフセットにて発生するオフセットの誤差として運用上、許容される値である。 Note that in the example shown in the first embodiment, the offset pattern determination unit 104 determines that there is "no offset" when the absolute value of the offset is "0", but this is not restrictive. For example, the offset pattern determination unit 104 determines that there is "no offset" when the absolute value of the offset is less than a predetermined value, and determines that there is "offset" when the absolute value of the offset is greater than or equal to the predetermined value. You may judge. The predetermined value is a value that is operationally acceptable as an offset error that occurs due to an offset in communication between a normal grandmaster clock 2 and a normal boundary clock 1 that synchronizes the grandmaster clock 2.
 また、第1の実施形態で示した例において、複数のグランドマスタクロック2は、第1のグランドマスタクロック21及び第2のグランドマスタクロック22を含んだが、これに限られない。複数のグランドマスタクロック2は、3つ以上のグランドマスタクロック2を含んでもよい。 Further, in the example shown in the first embodiment, the plurality of grand master clocks 2 included the first grand master clock 21 and the second grand master clock 22, but the present invention is not limited to this. The plurality of grandmaster clocks 2 may include three or more grandmaster clocks 2.
 <<第2の実施形態>>
 以下、本開示の第2の実施形態について図面を参照して説明する。
<<Second embodiment>>
A second embodiment of the present disclosure will be described below with reference to the drawings.
 図6に示すように、本開示の第2の実施形態に係る時刻同期システム100-1は、複数のグランドマスタクロック2(図6の例では、第1のグランドマスタクロック21及び第2のグランドマスタクロック22)と、時刻同期装置としてのバウンダリクロック1-1と、クライアント装置3とを備える。第2の実施形態では、複数のグランドマスタクロック2は、それぞれバウンダリクロック1-1の上位装置に相当し、クライアント装置3は、バウンダリクロック1-1の下位装置に相当する。第2の実施形態において、第1の実施形態と同一の機能部については同じ符号を付加し、説明を省略する。 As shown in FIG. 6, a time synchronization system 100-1 according to the second embodiment of the present disclosure includes a plurality of grand master clocks 2 (in the example of FIG. 6, a first grand master clock 21 and a second grand master clock 21). A master clock 22), a boundary clock 1-1 as a time synchronization device, and a client device 3 are provided. In the second embodiment, each of the plurality of grand master clocks 2 corresponds to a higher-level device of the boundary clock 1-1, and the client device 3 corresponds to a lower-level device of the boundary clock 1-1. In the second embodiment, the same reference numerals are given to the same functional units as in the first embodiment, and the description thereof will be omitted.
 <バウンダリクロックの構成>
 図6に示すように、第2の実施形態に係るバウンダリクロック1-1は、複数の上位パケット送受信部101(図6の例では、第1の上位パケット送受信部101a及び第2の上位パケット送受信部101b)と、オフセット計算部102と、閾値記憶部103と、オフセットパターン判定部104と、異常装置判定部105と、時刻源切替部106と、時刻同期処理部107と、クロッククラス書換部108と、下位パケット送受信部109と、障害アラート発出部110と、時刻選択部111とを備える。時刻選択部111は、コントローラによって構成される。
<Boundary clock configuration>
As shown in FIG. 6, the boundary clock 1-1 according to the second embodiment includes a plurality of upper packet transmitting and receiving units 101 (in the example of FIG. 6, a first upper packet transmitting and receiving unit 101a and a second upper packet transmitting and receiving unit 101a). section 101b), offset calculation section 102, threshold storage section 103, offset pattern determination section 104, abnormal device determination section 105, time source switching section 106, time synchronization processing section 107, and clock class rewriting section 108 , a lower packet transmitting/receiving section 109 , a failure alert issuing section 110 , and a time selection section 111 . The time selection unit 111 is configured by a controller.
 時刻選択部111は、バウンダリクロック1-1が通信可能な複数のグランドマスタクロック2のいずれかから、自装置の時刻を同期させるグランドマスタクロック2を選択するための処理を実行する。時刻選択部111は、例えば、IEEE Std 1588TM-2008で規定されているBMCAに従い、複数のグランドマスタクロック2から、自装置の時刻を同期させるグランドマスタクロック2(時刻同期の対象)を選択する。 The time selection unit 111 executes processing for selecting a grandmaster clock 2 with which the time of the own device is synchronized from among a plurality of grandmaster clocks 2 with which the boundary clock 1-1 can communicate. The time selection unit 111 selects, from a plurality of grandmaster clocks 2, a grandmaster clock 2 (target of time synchronization) with which the time of the own device is to be synchronized, in accordance with, for example, BMCA defined in IEEE Std 1588TM-2008.
 <バウンダリクロックの動作>
 ここで、第2の実施形態に係るバウンダリクロック1-1の動作について、図7A及び図7Bを参照して説明する。図7A及び図7Bは、第2の実施形態に係るバウンダリクロック1-1の動作の一例を示すフローチャートである。図7A及び図7Bを参照して説明するバウンダリクロック1-1における動作は第2の実施形態に係る時刻同期装置としてのバウンダリクロック1-1の時刻同期方法の一例に相当する。図7A及び図7Bにおいて、2つのグランドマスタクロックA及びグランドマスタクロックBは、それぞれ図6に示す第1のグランドマスタクロック21及び第2のグランドマスタクロック22に相当する。
<Boundary clock operation>
Here, the operation of the boundary clock 1-1 according to the second embodiment will be explained with reference to FIGS. 7A and 7B. 7A and 7B are flowcharts showing an example of the operation of the boundary clock 1-1 according to the second embodiment. The operation of the boundary clock 1-1 described with reference to FIGS. 7A and 7B corresponds to an example of a time synchronization method for the boundary clock 1-1 as a time synchronization device according to the second embodiment. In FIGS. 7A and 7B, two grand master clocks A and B correspond to the first grand master clock 21 and the second grand master clock 22 shown in FIG. 6, respectively.
 まず、図7Aに示すように、ステップS31において、時刻選択部111が、第1の上位パケット送受信部101a及び101bそれぞれから、グランドマスタクロックA及びグランドマスタクロックBそれぞれについての、以下に示すパラメータを含むパケットを取得する。
  識別コード(GM(グランドマスタ) Identity):グランドマスタクロックA及びBそれぞれに固有の識別コード
  優先度1(GM priority 1):管理者が設定するグランドマスタクロックA及びBごとの第1の優先度
  GMクラス(GM class):グランドマスタクロックA及びBごとのトレーサビリティ(UTCへの追跡可能性(時刻の信頼性を示す指標))を示す値
  GMクロック精度:(GM accuracy value):グランドマスタクロックA及びBごとの時刻の精度を示す値
  GMクロック安定度(GM offsetScaledLogVariance):グランドマスタクロックA及びBごとの安定度を示す値
  優先度2(GM priority 2):管理者が設定するグランドマスタクロックA及びBごとの第2の優先度
First, as shown in FIG. 7A, in step S31, the time selection unit 111 receives the following parameters for grandmaster clock A and grandmaster clock B from each of the first upper packet transmitting and receiving units 101a and 101b. Get the containing packet.
Identification code (GM (Grand Master) Identity): Identification code unique to each grand master clock A and B. Priority 1 (GM priority 1): First priority for each grand master clock A and B set by the administrator. GM class: Value indicating traceability (traceability to UTC (indicator indicating reliability of time)) for each grand master clock A and B GM clock accuracy: (GM accuracy value): Grand master clock A GM clock stability (GM offsetScaledLogVariance): A value that indicates the stability of each grand master clock A and B. Priority 2 (GM priority 2): Grand master clock A set by the administrator. and the second priority per B
 ステップS32において、時刻選択部111が、グランドマスタクロックAおよびグランドマスタクロックBの識別コードが同じであるか否かを判定する。 In step S32, the time selection unit 111 determines whether the identification codes of grand master clock A and grand master clock B are the same.
 ステップS32で、グランドマスタクロックAおよびグランドマスタクロックBの識別コードが同じであると判定された場合(ステップS32のYes)、ステップS33において、時刻選択部111が、各グランドマスタクロックからバウンダリクロック1-1までの接続段数、上流のポート番号、受信側のポート番号、同一のデータセットの受信側のポート番号の比較により、時刻同期の対象を選択する。ステップS33の処理は、IEEE Std 1588TM-2008等に記載されているため、ここでの説明を省略する。 If it is determined in step S32 that the identification codes of grandmaster clock A and grandmaster clock B are the same (Yes in step S32), in step S33, the time selection unit 111 selects the boundary clock 1 from each grandmaster clock. The time synchronization target is selected by comparing the number of connection stages up to -1, the upstream port number, the receiving side port number, and the receiving side port number of the same data set. The process of step S33 is described in IEEE Std 1588TM-2008, etc., so the explanation here will be omitted.
 ステップS32で、グランドマスタクロックAおよびグランドマスタクロックBの識別コードが同じでないと判定された場合(ステップS32のNo)、ステップS34において、時刻選択部111が、グランドマスタクロックAおよびグランドマスタクロックBの優先度1を比較する。 If it is determined in step S32 that the identification codes of grandmaster clock A and grandmaster clock B are not the same (No in step S32), in step S34, the time selection unit 111 selects the identification codes of grandmaster clock A and grandmaster clock B. Compare the priority level 1 of
 ステップS34で、グランドマスタクロックAの優先度1がグランドマスタクロックBの優先度1より小さいと判定された場合(ステップS34のA<B)、時刻選択部111は、グランドマスタクロックAを時刻同期の対象として選択する(ステップS35)。 If it is determined in step S34 that priority 1 of grandmaster clock A is lower than priority 1 of grandmaster clock B (A<B in step S34), the time selection unit 111 synchronizes grandmaster clock A with time. (Step S35).
 ステップS34で、グランドマスタクロックBの優先度1がグランドマスタクロックAの優先度1より小さいと判定された場合(ステップS34のB<A)、時刻選択部111は、グランドマスタクロックBを時刻同期の対象として選択する(ステップS36)。 If it is determined in step S34 that priority 1 of grandmaster clock B is lower than priority 1 of grandmaster clock A (B<A in step S34), the time selection unit 111 synchronizes grandmaster clock B with time. (Step S36).
 ステップS34で、グランドマスタクロックAおよびグランドマスタクロックBの優先度1が同じであると判定された場合(ステップS34のA=B)、ステップS37において、時刻選択部111が、グランドマスタクロックAおよびグランドマスタクロックBのGMクラスを比較する。 If it is determined in step S34 that the priority levels 1 of grandmaster clock A and grandmaster clock B are the same (A=B in step S34), in step S37, the time selection unit 111 selects grandmaster clock A and grandmaster clock B. Compare the GM class of Grand Master Clock B.
 ステップS37で、グランドマスタクロックAのGMクラスがグランドマスタクロックBのGMクラスより小さいと判定された場合(ステップS37のA<B)、時刻選択部111は、グランドマスタクロックAを時刻同期の対象として選択する(ステップS35)。 If it is determined in step S37 that the GM class of grandmaster clock A is smaller than the GM class of grandmaster clock B (A<B in step S37), the time selection unit 111 selects grandmaster clock A as the target of time synchronization. (step S35).
 ステップS37で、グランドマスタクロックBのGMクラスがグランドマスタクロックAのGMクラスより小さいと判定された場合(ステップS37のB<A)、時刻選択部111は、グランドマスタクロックBを時刻同期の対象として選択する(ステップS36)。 If it is determined in step S37 that the GM class of grandmaster clock B is smaller than the GM class of grandmaster clock A (B<A in step S37), the time selection unit 111 selects grandmaster clock B as the target of time synchronization. (step S36).
 ステップS37で、グランドマスタクロックAおよびグランドマスタクロックBのGMクラスが同じであると判定された場合(ステップS37のA=B)、ステップS38において、時刻選択部111が、グランドマスタクロックAおよびグランドマスタクロックBのGMクロック精度を比較する。 If it is determined in step S37 that the GM classes of grand master clock A and grand master clock B are the same (A=B in step S37), in step S38, the time selection unit 111 selects the GM class of grand master clock A and grand master clock B. Compare the GM clock accuracy of master clock B.
 ステップS38で、グランドマスタクロックAのGMクロック精度がグランドマスタクロックBのGMクロック精度より小さいと判定された場合(ステップS38のA<B)、時刻選択部111は、グランドマスタクロックAを時刻同期の対象として選択する(ステップS35)。 If it is determined in step S38 that the GM clock precision of grand master clock A is smaller than the GM clock precision of grand master clock B (A<B in step S38), the time selection unit 111 synchronizes grand master clock A with time. (Step S35).
 ステップS38で、グランドマスタクロックBのGMクロック精度がグランドマスタクロックAのGMクロック精度より小さいと判定された場合(ステップS38のB<A)、時刻選択部111は、グランドマスタクロックBを時刻同期の対象として選択する(ステップS36)。 If it is determined in step S38 that the GM clock precision of grand master clock B is smaller than the GM clock precision of grand master clock A (B<A in step S38), the time selection unit 111 synchronizes grand master clock B with time. (Step S36).
 ステップS38で、グランドマスタクロックAおよびグランドマスタクロックBのGMクロック精度が同じであると判定された場合(ステップS38のA=B)、ステップS39において、時刻選択部111が、グランドマスタクロックAおよびグランドマスタクロックBのGMクロック安定度を比較する。 If it is determined in step S38 that the GM clock precision of grand master clock A and grand master clock B is the same (A=B in step S38), in step S39, the time selection unit 111 selects the Compare the GM clock stability of grand master clock B.
 ステップS39で、グランドマスタクロックAのGMクロック安定度がグランドマスタクロックBのGMクロック安定度より小さいと判定された場合(ステップS39のA<B)、時刻選択部111は、グランドマスタクロックAを時刻同期の対象として選択する(ステップS35)。 If it is determined in step S39 that the GM clock stability of grand master clock A is smaller than the GM clock stability of grand master clock B (A<B in step S39), the time selection unit 111 selects grand master clock A. It is selected as a target for time synchronization (step S35).
 ステップS39で、グランドマスタクロックBのGMクロック安定度がグランドマスタクロックAのGMクロック安定度より小さいと判定された場合(ステップS39のB<A)、時刻選択部111は、グランドマスタクロックBを時刻同期の対象として選択する(ステップS36)。 If it is determined in step S39 that the GM clock stability of grand master clock B is smaller than the GM clock stability of grand master clock A (B<A in step S39), the time selection unit 111 selects grand master clock B. It is selected as a target for time synchronization (step S36).
 ステップS39で、グランドマスタクロックAおよびグランドマスタクロックBのGMクロック安定度が同じであると判定された場合(ステップS39のA=B)、図7BのステップS40で、オフセットパターン判定部104が、バウンダリクロック1-1の時刻に異常が発生しているか否かを判定する。ステップS40の処理は、第1の実施形態において説明した、図6に示すフローチャートのステップS11~S13、及びS22の処理に相当する。図6を参照して説明したように、オフセットパターン判定部104は、第1のオフセットOs1及び第2のオフセットOs2を計算し、第1のオフセットOs12及び第2のオフセットOs22それぞれの絶対値と閾値THとを比較する。 If it is determined in step S39 that the GM clock stability of grand master clock A and grand master clock B is the same (A=B in step S39), in step S40 of FIG. 7B, the offset pattern determination unit 104 It is determined whether an abnormality has occurred at the time of the boundary clock 1-1. The processing in step S40 corresponds to the processing in steps S11 to S13 and S22 of the flowchart shown in FIG. 6, which was explained in the first embodiment. As described with reference to FIG. 6, the offset pattern determination unit 104 calculates the first offset Os1 and the second offset Os2, and calculates the absolute value and threshold value of the first offset Os12 and the second offset Os22, respectively. Compare with TH.
 そして、オフセットパターン判定部104は、第1のオフセットOs12の絶対値が閾値THより大きいと判定され、第2のオフセットOs22の絶対値が閾値THより大きいと判定された場合(パターンD)、バウンダリクロック1-1の時刻に異常が発生していると判定する(図5AのステップS22)。図7Bに戻って、バウンダリクロック1-1の時刻に異常が発生していると判定された場合(ステップS40のYes)、バウンダリクロック1-1は、処理を終了する。 Then, if the absolute value of the first offset Os12 is determined to be greater than the threshold TH and the absolute value of the second offset Os22 is determined to be greater than the threshold TH (pattern D), the offset pattern determination unit 104 determines whether the boundary It is determined that an abnormality has occurred at the time of clock 1-1 (step S22 in FIG. 5A). Returning to FIG. 7B, if it is determined that an abnormality has occurred at the time of the boundary clock 1-1 (Yes in step S40), the boundary clock 1-1 ends the process.
 バウンダリクロック1-1の時刻に異常が発生していないと判定された場合(ステップS40のNo)、オフセットパターン判定部104及び異常装置判定部105が、グランドマスタクロックA又はグランドマスタクロックBの時刻に異常が発生しているかを判定する(ステップS41)。ステップS41の処理は、第1の実施形態において説明した、図6に示すフローチャートのステップS13~S17、及びS21の処理に相当する。 If it is determined that no abnormality has occurred at the time of the boundary clock 1-1 (No in step S40), the offset pattern determination unit 104 and the abnormal device determination unit 105 determine the time of the grand master clock A or grand master clock B. It is determined whether an abnormality has occurred in (step S41). The processing in step S41 corresponds to the processing in steps S13 to S17 and S21 of the flowchart shown in FIG. 6, which was explained in the first embodiment.
 図5Aを参照して説明したように、オフセットパターン判定部104は、第1のオフセットの絶対値が閾値以下であり、第2のオフセットの絶対値が閾値以下である場合、いずれの装置の時刻にも異常が発生していないと判定する(図5AのS13のパターンA(図7BのS41の「異常なし」に相当))。 As described with reference to FIG. 5A, when the absolute value of the first offset is less than or equal to the threshold value and the absolute value of the second offset is less than or equal to the threshold value, the offset pattern determination unit 104 determines whether the time of any device Also, it is determined that no abnormality has occurred (pattern A in S13 of FIG. 5A (corresponding to "no abnormality" in S41 of FIG. 7B)).
 そして、異常装置判定部105が、グランドマスタクロック2と自装置(バウンダリクロック1)とのオフセットに変動があるか否かを判定する(図5BのステップS16)。異常装置判定部105は、オフセットに変動があると判定されると、時刻源であるグランドマスタクロック2の時刻に異常が発生していると判定する(図5BのステップS17(図7BのステップS41の「Aに異常」に相当))。そして、時刻選択部111が、グランドマスタクロックBを時刻同期の対象として選択する(ステップS36)。また、異常装置判定部105は、オフセットに変動がないと判定されると、時刻源でないグランドマスタクロック2の時刻に異常が発生していると判定する(図5BのステップS20(図7BのステップS41の「Bに異常」に相当))。そして、時刻選択部111が、グランドマスタクロックAを時刻同期の対象として選択する(ステップS35)。 Then, the abnormal device determination unit 105 determines whether there is a variation in the offset between the grand master clock 2 and the own device (boundary clock 1) (step S16 in FIG. 5B). When it is determined that there is a variation in the offset, the abnormal device determining unit 105 determines that an abnormality has occurred in the time of the grandmaster clock 2, which is the time source (step S17 in FIG. 5B (step S41 in FIG. 7B) (equivalent to "abnormality in A")). Then, the time selection unit 111 selects the grand master clock B as a target for time synchronization (step S36). Further, when it is determined that there is no variation in the offset, the abnormal device determination unit 105 determines that an abnormality has occurred at the time of the grandmaster clock 2, which is not the time source (step S20 in FIG. 5B (step S20 in FIG. 7B). Corresponds to "Abnormality in B" in S41)). Then, the time selection unit 111 selects the grand master clock A as a target for time synchronization (step S35).
 図7Bに示すステップS42において、時刻選択部111が、グランドマスタクロックAおよびグランドマスタクロックBの優先度2を比較する。 In step S42 shown in FIG. 7B, the time selection unit 111 compares the priority 2 of grand master clock A and grand master clock B.
 ステップS42で、グランドマスタクロックAの優先度2がグランドマスタクロックBの優先度2より小さいと判定された場合(ステップS42のA<B)、時刻選択部111が、グランドマスタクロックAを時刻同期の対象として選択する(ステップS35)。 If it is determined in step S42 that the priority 2 of grandmaster clock A is lower than the priority 2 of grandmaster clock B (A<B in step S42), the time selection unit 111 synchronizes grandmaster clock A with time. (Step S35).
 ステップS42で、グランドマスタクロックBの優先度2がグランドマスタクロックAの優先度2より小さいと判定された場合(ステップS42のB<A)、時刻選択部111が、グランドマスタクロックBを時刻同期の対象として選択する(ステップS36)。 If it is determined in step S42 that the priority 2 of grandmaster clock B is lower than the priority 2 of grandmaster clock A (B<A in step S42), the time selection unit 111 synchronizes grandmaster clock B with time. (Step S36).
 ステップS42で、グランドマスタクロックAおよびグランドマスタクロックBの優先度2が同じであると判定された場合(ステップS42のA=B)、ステップS42において、時刻選択部111が、グランドマスタクロックAおよびグランドマスタクロックBの識別コードを比較する。 If it is determined in step S42 that the priority levels 2 of grandmaster clock A and grandmaster clock B are the same (A=B in step S42), in step S42, the time selection unit 111 selects grandmaster clock A and grandmaster clock B. Compare the identification code of grand master clock B.
 ステップS42で、グランドマスタクロックAの識別コードがグランドマスタクロックBの識別コードより小さいと判定された場合(A<B)、時刻選択部111は、グランドマスタクロックAを時刻同期の対象として選択する(ステップS35)。 If it is determined in step S42 that the identification code of grandmaster clock A is smaller than the identification code of grandmaster clock B (A<B), the time selection unit 111 selects grandmaster clock A as a target for time synchronization. (Step S35).
 ステップS43で、グランドマスタクロックBの識別コードがグランドマスタクロックAの識別コードより小さいと判定された場合(B<A)、時刻選択部111は、グランドマスタクロックBを時刻同期の対象として選択する(ステップS36)。 If it is determined in step S43 that the identification code of grandmaster clock B is smaller than the identification code of grandmaster clock A (B<A), the time selection unit 111 selects grandmaster clock B as a target for time synchronization. (Step S36).
 以上、説明したように、第2の実施形態に係るバウンダリクロック1-1は、BMCAにおいて、第1のグランドマスタクロック21(グランドマスタクロックA)及び第2のグランドマスタクロック22(グランドマスタクロックB)の優先度1、GMクラス、GMクロック精度、及びGMクロック安定度が同じであると判定された場合、バウンダリクロック1-1の時刻に異常が発生しているか否かを判定する。そして、バウンダリクロック1-1は、バウンダリクロック1-1の時刻に異常が発生していないと判定された場合、第1のグランドマスタクロック21及び第2のグランドマスタクロック22の時刻のいずれに異常が発生しているかを判定する。また、バウンダリクロック1-1は、バウンダリクロック1-1及びグランドマスタクロック2のいずれの時刻にも異常が発生していないと判定された場合、BMCAにおける、グランドマスタクロックAおよびグランドマスタクロックBの優先度2の比較を行う。これにより、第2の実施形態に係るバウンダリクロック1-1は、BMCAによる時刻源の選択において、優先度1、GMクラス、GMクロック精度、及びGMクロック安定度が同じであると判定された場合に、時刻に異常の発生しているグランドマスタクロック2を時刻源として選択することを回避することができる。したがって、バウンダリクロック1-1は、従来のBMCAに比べて、グランドマスタクロック2をより適切に選択することができる。 As described above, the boundary clock 1-1 according to the second embodiment has a first grand master clock 21 (grand master clock A) and a second grand master clock 22 (grand master clock B) in BMCA. ) are determined to have the same priority 1, GM class, GM clock precision, and GM clock stability, it is determined whether an abnormality has occurred in the time of the boundary clock 1-1. Then, when it is determined that no abnormality has occurred in the time of the boundary clock 1-1, the boundary clock 1-1 determines that there is an abnormality in the time of either the first grand master clock 21 or the second grand master clock 22. Determine whether or not this is occurring. In addition, if it is determined that no abnormality has occurred at the time of either the boundary clock 1-1 or the grand master clock 2, the boundary clock 1-1 changes the timing of the grand master clock A and the grand master clock B in the BMCA. Compare priority 2. As a result, when the boundary clock 1-1 according to the second embodiment is determined to have the same priority level 1, GM class, GM clock precision, and GM clock stability in time source selection by BMCA, In addition, it is possible to avoid selecting the grand master clock 2 whose time is abnormal as the time source. Therefore, the boundary clock 1-1 can select the grand master clock 2 more appropriately than the conventional BMCA.
 なお、上述した第1の実施形態において、バウンダリクロック1が時刻同期装置であり、複数のグランドマスタクロック2それぞれが上位装置であり、クライアント装置3が下位装置であるとして説明したが、これに限られない。複数のバウンダリクロック1と通信可能であるクライアント装置3が時刻同期装置であり、複数のバウンダリクロック1それぞれが上位装置であってもよい。同様にして、上述した第2の実施形態において、複数のバウンダリクロック1-1と通信可能であるクライアント装置3が時刻同期装置であり、複数のバウンダリクロック1-1それぞれが上位装置であってもよい。 In the first embodiment described above, the boundary clock 1 is a time synchronization device, each of the plurality of grandmaster clocks 2 is a higher-level device, and the client device 3 is a lower-level device, but the present invention is not limited to this. I can't. The client device 3 that can communicate with a plurality of boundary clocks 1 may be a time synchronization device, and each of the plurality of boundary clocks 1 may be a host device. Similarly, in the second embodiment described above, even if the client device 3 capable of communicating with a plurality of boundary clocks 1-1 is a time synchronization device, and each of the plurality of boundary clocks 1-1 is a host device, good.
 このような構成において、クライアント装置3は、上位パケット送受信部101(例えば、第1の上位パケット送受信部101a及び第2の上位パケット送受信部101b)と、オフセット計算部102と、時刻同期処理部107と、閾値記憶部103と、オフセットパターン判定部104と、異常装置判定部105と、時刻源切替部106と、クロッククラス書換部108と、下位パケット送受信部109と、障害アラート発出部110とを備える。また、クライアント装置3は、時刻選択部111をさらに備えてもよい。 In such a configuration, the client device 3 includes an upper packet transmitting/receiving section 101 (for example, a first upper packet transmitting/receiving section 101a and a second upper packet transmitting/receiving section 101b), an offset calculating section 102, and a time synchronization processing section 107. , threshold storage unit 103 , offset pattern determination unit 104 , abnormal device determination unit 105 , time source switching unit 106 , clock class rewriting unit 108 , lower packet transmitting/receiving unit 109 , and failure alert issuing unit 110 . Be prepared. Further, the client device 3 may further include a time selection section 111.
 次に、第1及び第2の実施形態に係る時刻同期装置としてのバウンダリクロック1及び1-1のハードウェア構成について説明する。 Next, the hardware configurations of the boundary clocks 1 and 1-1 as time synchronization devices according to the first and second embodiments will be explained.
 図8は、第1及び第2の実施形態に係る時刻同期装置としてのバウンダリクロック1及び1-1のハードウェア構成の一例を示す図である。図8においては、バウンダリクロック1及び1-1がプログラム命令を実行可能なコンピュータにより構成される場合の、バウンダリクロック1及び1-1のハードウェア構成の一例を示している。ここで、コンピュータは、汎用コンピュータ、専用コンピュータ、ワークステーション、PC(Personal computer)、電子ノートパッド等であってもよい。プログラム命令は、必要なタスクを実行するためのプログラムコード、コードセグメント等であってもよい。 FIG. 8 is a diagram showing an example of the hardware configuration of the boundary clocks 1 and 1-1 as time synchronization devices according to the first and second embodiments. FIG. 8 shows an example of the hardware configuration of boundary clocks 1 and 1-1 in a case where boundary clocks 1 and 1-1 are configured by computers capable of executing program instructions. Here, the computer may be a general-purpose computer, a special-purpose computer, a workstation, a PC (Personal computer), an electronic notepad, or the like. Program instructions may be program code, code segments, etc. to perform necessary tasks.
 図8に示すように、バウンダリクロック1及び1-1は、プロセッサ11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、ストレージ14、入力部15、表示部16、及び通信インタフェース(I/F)17を有する。各構成は、バス19を介して相互に通信可能に接続されている。プロセッサ11は、具体的にはCPU(Central Processing Unit)、MPU(Micro Processing Unit)、GPU(Graphics Processing Unit)、DSP(Digital Signal Processor)、SoC(System on a Chip)等であり、同種又は異種の複数のプロセッサにより構成されてもよい。 As shown in FIG. 8, the boundary clocks 1 and 1-1 include a processor 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, a storage 14, an input section 15, a display section 16, and a communication interface ( I/F) 17. Each configuration is communicably connected to each other via a bus 19. Specifically, the processor 11 is a CPU (Central Processing Unit), MPU (Micro Processing Unit), GPU (Graphics Processing Unit), DSP (Digital Signal Processor), SoC (System on a Chip), etc., and may be of the same or different type. It may be configured with a plurality of processors.
 プロセッサ11は、各構成の制御及び各種の演算処理を実行するコントローラである。すなわち、プロセッサ11は、ROM12又はストレージ14であるメモリからプログラムを読み出し、RAM13を作業領域としてプログラムを実行する。プロセッサ11は、ROM12あるいはストレージ14に記憶されているプログラムに従って、上記各構成の制御及び各種の演算処理を行う。第1及び第2の実施形態では、ROM12又はストレージ14には、コンピュータを本開示に係るバウンダリクロック1及び1-1として機能させるためのプログラムが格納されている。当該プログラムがプロセッサ11により読み出されて実行されることで、バウンダリクロック1及び1-1の各構成が実現される。 The processor 11 is a controller that controls each component and executes various calculation processes. That is, the processor 11 reads a program from a memory, which is the ROM 12 or the storage 14, and executes the program using the RAM 13 as a work area. The processor 11 controls each of the above components and performs various arithmetic operations according to programs stored in the ROM 12 or the storage 14. In the first and second embodiments, the ROM 12 or the storage 14 stores a program for causing the computer to function as the boundary clocks 1 and 1-1 according to the present disclosure. When the program is read and executed by the processor 11, each configuration of the boundary clocks 1 and 1-1 is realized.
 プログラムは、CD-ROM(Compact Disk Read Only Memory)、DVD-ROM(Digital Versatile Disk Read Only Memory)、USB(Universal Serial Bus)メモリ等の非一時的(non-transitory)記憶媒体に記憶された形態で提供されてもよい。また、プログラムは、ネットワークを介して外部装置からダウンロードされる形態としてもよい。 Programs are stored in non-transitory storage media such as CD-ROM (Compact Disk Read Only Memory), DVD-ROM (Digital Versatile Disk Read Only Memory), and USB (Universal Serial Bus) memory. may be provided. Further, the program may be downloaded from an external device via a network.
 ROM12は、各種プログラム及び各種データを格納する。RAM13は、作業領域として一時的にプログラム又はデータを記憶する。ストレージ14は、HDD(Hard Disk Drive)又はSSD(Solid State Drive)により構成され、オペレーティングシステムを含む各種プログラム及び各種データを格納する。 The ROM 12 stores various programs and various data. The RAM 13 temporarily stores programs or data as a work area. The storage 14 is configured with an HDD (Hard Disk Drive) or an SSD (Solid State Drive), and stores various programs including an operating system and various data.
 入力部15は、マウス等のポインティングデバイス、及びキーボードを含み、各種の入力を行うために使用される。 The input unit 15 includes a pointing device such as a mouse and a keyboard, and is used to perform various inputs.
 表示部16は、例えば、液晶ディスプレイであり、各種の情報を表示する。表示部16は、タッチパネル方式を採用して、入力部15として機能してもよい。 The display unit 16 is, for example, a liquid crystal display, and displays various information. The display section 16 may employ a touch panel system and function as the input section 15.
 通信インタフェース17は、他の装置(例えば、グランドマスタクロック2及びクライアント装置3)と通信するためのインタフェースであり、例えば、LAN用のインタフェースである。通信インタフェース17によって、複数の上位パケット送受信部101(図1及び図6の例では、第1の上位パケット送受信部101a及び第2の上位パケット送受信部101b)、及び下位パケット送受信部109が実現される。 The communication interface 17 is an interface for communicating with other devices (for example, the grandmaster clock 2 and the client device 3), and is, for example, a LAN interface. The communication interface 17 realizes a plurality of upper packet transmitting/receiving sections 101 (in the examples of FIGS. 1 and 6, a first upper packet transmitting/receiving section 101a and a second upper packet transmitting/receiving section 101b) and a lower packet transmitting/receiving section 109. Ru.
 上述したバウンダリクロック1及び1-1の各部として機能させるためにコンピュータを好適に用いることが可能である。そのようなコンピュータは、バウンダリクロック1及び1-1の各部の機能を実現する処理内容を記述したプログラムを該コンピュータの記憶部に格納しておき、該コンピュータのプロセッサによってこのプログラムを読み出して実行させることで実現することができる。すなわち、当該プログラムは、コンピュータを、上述したバウンダリクロック1及び1-1として機能させることができる。また、当該プログラムを非一時的記憶媒体に記録することも可能である。また、当該プログラムを、ネットワークを介して提供することも可能である。 A computer can be suitably used to function as each part of the boundary clocks 1 and 1-1 described above. In such a computer, a program that describes the processing contents for realizing the functions of each part of the boundary clocks 1 and 1-1 is stored in the storage section of the computer, and this program is read and executed by the processor of the computer. This can be achieved by That is, the program can cause the computer to function as the boundary clocks 1 and 1-1 described above. It is also possible to record the program on a non-temporary storage medium. Moreover, it is also possible to provide the program via a network.
 以上の実施形態に関し、更に以下の付記を開示する。
 [付記項1]
 複数の上位装置のうちのいずれか1つの上位装置と同期する時刻同期装置であって、
 前記複数の上位装置それぞれとパケットを送受信する通信インタフェースと、
 コントローラと、を備え、
 前記コントローラは、
  前記複数の上位装置それぞれと前記パケット送受信部が前記パケットを送受信した時刻に基づいて、前記複数の上位装置それぞれの時刻と、自装置の時刻との差である複数のオフセットを計算し、
  前記複数のオフセットの絶対値それぞれが閾値以下であるか否かを判定し、
  前記複数のオフセットの絶対値に、前記閾値以下であるオフセットの絶対値と、前記閾値より大きいオフセットの絶対値とが含まれると判定された場合に、前記複数の上位装置の少なくとも1つにおける、一のオフセットから、該一のオフセットの次のオフセットへの変動の有無に基づいて、前記複数の上位装置のうちのいずれの上位装置の時刻に異常が発生しているかを判定する、時刻同期装置。
 [付記項2]
 前記コントローラは、前記変動があった場合、前記複数の上位装置のうちの時刻源である上位装置の時刻に異常が発生していると判定し、前記変動がなかった場合、前記複数の上位装置のうちの時刻源でない上位装置の時刻に異常が発生していると判定する、付記項1に記載の時刻同期装置。
 [付記項3]
 前記コントローラは、前記複数のオフセットの絶対値のいずれもが閾値以下である場合に、自装置及び前記複数の上位装置の時刻のいずれにも異常が発生していないと判定し、前記複数のオフセットの絶対値のいずれもが閾値より大きい場合に、自装置の時刻に異常が発生していると判定する、付記項1又は2に記載の時刻同期装置。
 [付記項4]
 前記コントローラは、前記複数の上位装置のうちの、自装置の時刻源となっている上位装置の時刻に異常が発生していると判定された場合、該上位装置とは異なる、時刻源となっていなかった上位装置を時刻源とするよう切り替える、付記項1又は2に記載の時刻同期装置。
 [付記項5]
 前記コントローラは、時刻に異常が発生している上位装置が判定された場合、該上位装置の時刻に異常が発生していることを示すアラートを発出する、又は前記複数のオフセットの絶対値のいずれもが閾値より大きいと判定された場合、自装置の時刻に異常が発生していることを示すアラートを発出する、付記項1又は2に記載の時刻同期装置。
 [付記項5]
 前記コントローラは、時刻に異常が発生している上位装置が判定された場合、該上位装置の時刻に異常が発生していることを示すアラートを発出する、又は前記複数のオフセットの絶対値のいずれもが閾値より大きいと判定された場合、自装置の時刻に異常が発生していることを示すアラートを発出する、付記項1又は2に記載の時刻同期装置。
 [付記項6]
 前記コントローラは、自装置の時刻に異常が発生していると判定された場合に、クロッククラスを書き換え、
 前記通信インタフェースは、前記クロッククラスを下位装置に送信しする、付記項1又は2に記載の時刻同期装置。
 [付記項7]
 前記複数の上位装置それぞれとパケットを送受信する通信インタフェースを備え、複数の上位装置のうちのいずれか1つの上位装置と同期する時刻同期装置の時刻同期方法であって、
 前記複数の上位装置それぞれと前記通信インタフェースが前記パケットを送受信した時刻に基づいて、前記複数の上位装置それぞれの時刻と、自装置の時刻との差である複数のオフセットを計算するステップと、
 前記複数のオフセットの絶対値それぞれが閾値以下であるか否かを判定するステップと、
 前記複数のオフセットの絶対値に、前記閾値以下であるオフセットの絶対値と、前記閾値より大きいオフセットの絶対値とが含まれると判定された場合に、前記複数の上位装置の少なくとも1つにおける、一のオフセットから、該一のオフセットの次のオフセットへの変動の有無に基づいて、前記複数の上位装置のうちのいずれの上位装置の時刻に異常が発生しているかを判定するステップと、
を含む時刻同期方法。
 [付記項7]
 コンピュータによって実行可能なプログラムを記憶した非一時的記憶媒体であって、前記コンピュータを、付記項1又は2に記載の時刻同期装置として動作させる、プログラムを記憶した非一時的記憶媒体。
Regarding the above embodiments, the following additional notes are further disclosed.
[Additional note 1]
A time synchronization device that synchronizes with any one of a plurality of higher-level devices,
a communication interface that transmits and receives packets to and from each of the plurality of higher-level devices;
comprising a controller;
The controller includes:
Calculating a plurality of offsets, which are the differences between the time of each of the plurality of upper-level devices and the time of the own device, based on the time at which each of the plurality of higher-level devices and the packet transmitting/receiving unit transmitted and received the packet,
Determining whether each of the absolute values of the plurality of offsets is less than or equal to a threshold,
If it is determined that the absolute values of the plurality of offsets include an absolute value of the offset that is less than or equal to the threshold value and an absolute value of the offset that is larger than the threshold value, in at least one of the plurality of higher-level devices, A time synchronization device that determines in which of the plurality of host devices an abnormality has occurred in the time, based on the presence or absence of a change from one offset to the next offset. .
[Additional note 2]
If there is the variation, the controller determines that an abnormality has occurred in the time of the higher-level device that is the time source among the plurality of higher-level devices, and if there is no change, the controller determines that an abnormality has occurred in the time of the higher-level device that is the time source among the plurality of higher-level devices The time synchronization device according to supplementary note 1, which determines that an abnormality has occurred in the time of a higher-level device that is not a time source.
[Additional note 3]
When all of the absolute values of the plurality of offsets are equal to or less than the threshold, the controller determines that no abnormality has occurred in the time of either the own device or the plurality of higher-level devices, and sets the plurality of offsets. The time synchronization device according to Supplementary Note 1 or 2, wherein the time synchronization device determines that an abnormality has occurred in the time of its own device when both of the absolute values of are larger than the threshold value.
[Additional note 4]
If the controller determines that an abnormality has occurred in the time of a higher-level device that is a time source for its own device among the plurality of higher-level devices, the controller selects a time source that is different from the higher-level device. The time synchronization device according to Supplementary Note 1 or 2, wherein the time synchronization device is switched to use a higher-level device that has not been used as a time source.
[Additional note 5]
When the controller determines that an abnormality has occurred in the time of a higher-level device, the controller issues an alert indicating that an abnormality has occurred in the time of the higher-level device, or determines which of the absolute values of the plurality of offsets. The time synchronization device according to Supplementary Note 1 or 2, which issues an alert indicating that an abnormality has occurred in the time of the device itself when it is determined that the time is greater than the threshold value.
[Additional note 5]
When the controller determines that an abnormality has occurred in the time of a higher-level device, the controller issues an alert indicating that an abnormality has occurred in the time of the higher-level device, or determines which of the absolute values of the plurality of offsets. The time synchronization device according to Supplementary Note 1 or 2, which issues an alert indicating that an abnormality has occurred in the time of the device itself when it is determined that the time is greater than the threshold value.
[Additional note 6]
The controller rewrites the clock class when it is determined that an abnormality has occurred in the time of the own device,
The time synchronization device according to Supplementary Note 1 or 2, wherein the communication interface transmits the clock class to a lower-order device.
[Additional note 7]
A time synchronization method for a time synchronization device that includes a communication interface for transmitting and receiving packets with each of the plurality of higher-level devices, and synchronizes with any one of the plurality of higher-level devices, the method comprising:
calculating a plurality of offsets, which are the differences between the time of each of the plurality of upper-level devices and the time of the own device, based on the time at which each of the plurality of higher-level devices and the communication interface transmitted and received the packet;
determining whether each of the absolute values of the plurality of offsets is less than or equal to a threshold;
If it is determined that the absolute values of the plurality of offsets include an absolute value of the offset that is less than or equal to the threshold value and an absolute value of the offset that is larger than the threshold value, in at least one of the plurality of higher-level devices, Determining which of the plurality of higher-level devices at which an abnormality has occurred at the time of the higher-level device, based on the presence or absence of a change from one offset to the next offset;
Time synchronization methods, including:
[Additional note 7]
A non-temporary storage medium storing a program executable by a computer, the non-temporary storage medium storing a program that causes the computer to operate as the time synchronization device according to Supplementary Note 1 or 2.
 上述の実施形態は代表的な例として説明したが、本開示の趣旨及び範囲内で、多くの変更及び置換ができることは当業者に明らかである。したがって、本発明は、上述の実施形態によって制限するものと解するべきではなく、請求の範囲から逸脱することなく、種々の変形又は変更が可能である。例えば、実施形態の構成図に記載の複数の構成ブロックを1つに組み合わせたり、あるいは1つの構成ブロックを分割したりすることが可能である。 Although the embodiments described above have been described as representative examples, it will be apparent to those skilled in the art that many modifications and substitutions can be made within the spirit and scope of the present disclosure. Therefore, the present invention should not be construed as being limited by the above-described embodiments, and various modifications or changes can be made without departing from the scope of the claims. For example, it is possible to combine a plurality of configuration blocks described in the configuration diagram of the embodiment into one, or to divide one configuration block.
1、1-1     バウンダリクロック(時刻同期装置)
2         グランドマスタクロック(上位装置)
3         クライアント装置(下位装置)
11        プロセッサ
12        ROM
13        RAM
14        ストレージ
15        入力部
16        表示部
17        通信I/F
19        バス
21        第1のグランドマスタクロック(上位装置)
22        第2のグランドマスタクロック(上位装置)
100、100-1 時刻同期システム
101       上位パケット送受信部
101a      第1の上位パケット送受信部
101b      第2の上位パケット送受信部
102       オフセット計算部
103       閾値記憶部
104       オフセットパターン判定部
105       異常装置判定部
106       時刻源切替部
107       時刻同期処理部
108       クロッククラス書換部
109       下位パケット送受信部
110       障害アラート発出部
111       時刻選択部
1.1-1 Boundary clock (time synchronization device)
2 Grandmaster clock (upper device)
3 Client device (lower device)
11 Processor 12 ROM
13 RAM
14 Storage 15 Input section 16 Display section 17 Communication I/F
19 Bus 21 First grand master clock (upper device)
22 Second Grand Master Clock (Upper Device)
100, 100-1 Time synchronization system 101 Upper packet transmitter/receiver 101a First upper packet transmitter/receiver 101b Second upper packet transmitter/receiver 102 Offset calculation section 103 Threshold storage section 104 Offset pattern determination section 105 Abnormal device determination section 106 Time source Switching section 107 Time synchronization processing section 108 Clock class rewriting section 109 Lower packet transmission/reception section 110 Failure alert issuing section 111 Time selection section

Claims (8)

  1.  複数の上位装置のうちのいずれか1つの上位装置と同期する時刻同期装置であって、
     前記複数の上位装置それぞれとパケットを送受信する上位パケット送受信部と、
     前記複数の上位装置それぞれと前記上位パケット送受信部が前記パケットを送受信した時刻に基づいて、前記複数の上位装置それぞれの時刻と、自装置の時刻との差である複数のオフセットを計算するオフセット計算部と、
     前記複数のオフセットの絶対値それぞれが閾値以下であるか否かを判定するオフセットパターン判定部と、
     前記複数のオフセットの絶対値に、前記閾値以下であるオフセットの絶対値と、前記閾値より大きいオフセットの絶対値とが含まれると判定された場合に、前記複数の上位装置の少なくとも1つにおける、一のオフセットから、該一のオフセットの次のオフセットへの変動の有無に基づいて、前記複数の上位装置のうちのいずれの上位装置の時刻に異常が発生しているかを判定する異常装置判定部と、
    を備える時刻同期装置。
    A time synchronization device that synchronizes with any one of a plurality of higher-level devices,
    an upper packet transmitting/receiving unit that transmits and receives packets to each of the plurality of higher-level devices;
    Offset calculation that calculates a plurality of offsets that are differences between the time of each of the plurality of upper-level devices and the time of the own device, based on the time at which each of the plurality of higher-level devices and the upper-level packet transmitting/receiving unit transmit/receive the packet. Department and
    an offset pattern determination unit that determines whether each of the absolute values of the plurality of offsets is less than or equal to a threshold;
    If it is determined that the absolute values of the plurality of offsets include an absolute value of the offset that is less than or equal to the threshold value and an absolute value of the offset that is larger than the threshold value, in at least one of the plurality of higher-level devices, An abnormal device determination unit that determines which of the plurality of host devices at which time an abnormality has occurred based on the presence or absence of a change from one offset to the next offset. and,
    A time synchronization device.
  2.  前記異常装置判定部は、前記変動があった場合、前記複数の上位装置のうちの時刻源である上位装置の時刻に異常が発生していると判定し、前記変動がなかった場合、前記複数の上位装置のうちの時刻源でない上位装置の時刻に異常が発生していると判定する、請求項1に記載の時刻同期装置。 The abnormal device determination unit determines that an abnormality has occurred in the time of a higher-level device that is a time source among the plurality of higher-level devices when there is the fluctuation, and when there is no fluctuation, the abnormal device determination section The time synchronization device according to claim 1, wherein the time synchronization device determines that an abnormality has occurred in the time of a higher-level device that is not a time source among the higher-level devices.
  3.  前記オフセットパターン判定部は、前記複数のオフセットの絶対値のいずれもが閾値以下である場合に、自装置及び前記複数の上位装置の時刻のいずれにも異常が発生していないと判定し、前記複数のオフセットの絶対値のいずれもが閾値より大きい場合に、自装置の時刻に異常が発生していると判定する、請求項1又は2に記載の時刻同期装置。 The offset pattern determination unit determines that no abnormality has occurred in the time of either the own device or the plurality of higher-level devices when all of the absolute values of the plurality of offsets are equal to or less than the threshold; The time synchronization device according to claim 1 or 2, wherein the time synchronization device determines that an abnormality has occurred in the time of the device when all of the absolute values of the plurality of offsets are larger than a threshold value.
  4.  前記複数の上位装置のうちの、自装置の時刻源となっている上位装置の時刻に異常が発生していると判定された場合、該上位装置とは異なる、時刻源となっていなかった上位装置を時刻源とするよう切り替える時刻源切替部をさらに備える、請求項1又は2に記載の時刻同期装置。 If it is determined that an abnormality has occurred in the time of a higher-level device that is the time source of the own device among the plurality of higher-level devices, a higher-level device that is different from the higher-level device and that is not the time source The time synchronization device according to claim 1 or 2, further comprising a time source switching unit that switches the device to use as a time source.
  5.  時刻に異常が発生している上位装置が判定された場合、該上位装置の時刻に異常が発生していることを示すアラートを発出する、又は前記複数のオフセットの絶対値のいずれもが閾値より大きいと判定された場合、自装置の時刻に異常が発生していることを示すアラートを発出する障害アラート発出部をさらに備える、請求項1又は2に記載の時刻同期装置。 If it is determined that a higher-level device has an abnormality in the time, an alert indicating that an abnormality has occurred in the time of the higher-level device is issued, or if any of the absolute values of the plurality of offsets is less than the threshold value. 3. The time synchronization device according to claim 1, further comprising a failure alert issuing unit that issues an alert indicating that an abnormality has occurred in the time of the own device when it is determined that the time synchronization device is large.
  6.  自装置の時刻に異常が発生していると判定された場合に、クロッククラスを書き換えるクロッククラス書換部と、
     前記クロッククラスを下位装置に送信する下位パケット送受信部と、
    をさらに備える請求項1又は2に記載の時刻同期装置。
    a clock class rewriting unit that rewrites the clock class when it is determined that an abnormality has occurred in the time of the own device;
    a lower packet transmitter/receiver that transmits the clock class to a lower device;
    The time synchronization device according to claim 1 or 2, further comprising:
  7.  複数の上位装置それぞれとパケットを送受信する上位パケット送受信部を備え、複数の上位装置のうちのいずれか1つの上位装置と同期する時刻同期装置の時刻同期方法であって、
     前記複数の上位装置それぞれと前記上位パケット送受信部が前記パケットを送受信した時刻に基づいて、前記複数の上位装置それぞれの時刻と、自装置の時刻との差である複数のオフセットを計算するステップと、
     前記複数のオフセットの絶対値それぞれが閾値以下であるか否かを判定するステップと、
     前記複数のオフセットの絶対値に、前記閾値以下であるオフセットの絶対値と、前記閾値より大きいオフセットの絶対値とが含まれると判定された場合に、前記複数の上位装置の少なくとも1つにおける、一のオフセットから、該一のオフセットの次のオフセットへの変動の有無に基づいて、前記複数の上位装置のうちのいずれの上位装置の時刻に異常が発生しているかを判定するステップと、
    を含む時刻同期方法。
    A time synchronization method for a time synchronization device that includes an upper-level packet transmitting/receiving unit that transmits and receives packets to each of a plurality of upper-level devices, and synchronizes with any one of the plurality of higher-level devices, the method comprising:
    calculating a plurality of offsets, which are the differences between the time of each of the plurality of upper-level devices and the time of the own device, based on the time when each of the plurality of higher-level devices and the upper-level packet transmitting/receiving unit transmitted and received the packet; ,
    determining whether each of the absolute values of the plurality of offsets is less than or equal to a threshold;
    If it is determined that the absolute values of the plurality of offsets include an absolute value of the offset that is less than or equal to the threshold value and an absolute value of the offset that is larger than the threshold value, in at least one of the plurality of higher-level devices, Determining which of the plurality of higher-level devices at which an abnormality has occurred at the time of the higher-level device, based on the presence or absence of a change from one offset to the next offset;
    Time synchronization methods, including:
  8.  コンピュータを、請求項1又は2に記載の時刻同期装置として機能させるためのプログラム。
     
    A program for causing a computer to function as the time synchronization device according to claim 1 or 2.
PCT/JP2022/018629 2022-04-22 2022-04-22 Time synchronization device, time synchronization method, and program WO2023203782A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/018629 WO2023203782A1 (en) 2022-04-22 2022-04-22 Time synchronization device, time synchronization method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/018629 WO2023203782A1 (en) 2022-04-22 2022-04-22 Time synchronization device, time synchronization method, and program

Publications (1)

Publication Number Publication Date
WO2023203782A1 true WO2023203782A1 (en) 2023-10-26

Family

ID=88419508

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/018629 WO2023203782A1 (en) 2022-04-22 2022-04-22 Time synchronization device, time synchronization method, and program

Country Status (1)

Country Link
WO (1) WO2023203782A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018037885A (en) * 2016-08-31 2018-03-08 株式会社メディアリンクス Time synchronization system
JP2020017940A (en) * 2018-07-13 2020-01-30 株式会社明電舎 Time synchronization system, communication device, time synchronization method
JP2020096257A (en) * 2018-12-11 2020-06-18 日本電信電話株式会社 Time comparison device, and time quality monitor device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018037885A (en) * 2016-08-31 2018-03-08 株式会社メディアリンクス Time synchronization system
JP2020017940A (en) * 2018-07-13 2020-01-30 株式会社明電舎 Time synchronization system, communication device, time synchronization method
JP2020096257A (en) * 2018-12-11 2020-06-18 日本電信電話株式会社 Time comparison device, and time quality monitor device

Similar Documents

Publication Publication Date Title
CA2675645C (en) Facilitating synchronization of servers in a coordinated timing network
JP5165871B2 (en) System and method for calibrating a TOD clock
CA2676117C (en) Server time protocol messages and methods
US7783913B2 (en) Facilitating recovery in a coordinated timing network
EP1691251B1 (en) Synchronization of multiple operational flight programs
JP5042318B2 (en) Method, system, and computer program for defining a tier 1 configuration in an agreement timing network
CN111385050B (en) Clock synchronization method, device and storage medium
EP2512048A2 (en) System and method to overcome wander accumulation to achieve precision clock distribution over large networks
EP3893428A1 (en) Clock synchronization method and device, and storage medium
CN112367137B (en) Method, device, system, equipment and storage medium for realizing clock source selection
JP5120097B2 (en) Time synchronization system and time synchronization apparatus
CN104579534A (en) Clock synchronization method and system in SDH network
WO2023203782A1 (en) Time synchronization device, time synchronization method, and program
CN110830138A (en) Information processing method, electronic equipment and server
US20050086406A1 (en) Real time interrupt module for operating systems and time triggered applications
US9007889B2 (en) Communication device and communication system with failure detection capabilities
WO2023100299A1 (en) Time synchronization device, time synchronization method, and program
WO2023073970A1 (en) Time synchronization device, time synchronization method, and program
WO2022259381A1 (en) Time synchronization device, time synchronization method, and program
JP7008894B1 (en) Time synchronization dependent device, time sharing system, time sharing method and program
US20220337384A1 (en) Clock Port Attribute Recovery Method, Device, and System

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22938581

Country of ref document: EP

Kind code of ref document: A1