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

By introducing a synchronization port determination unit in the time synchronization technology, selecting the time synchronization port from multiple ports according to the accumulated frequency deviation, the problem of inoptimal time distribution path in the prior art is solved, and the time synchronization with higher precision is achieved.

CN119234404APending Publication Date: 2024-12-31MITSUBISHI ELECTRIC CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280096317.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-06-01
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

When existing moment synchronization technology uses propagation delay and frequency deviation for high-precision synchronization, the selected moment release path is not necessarily the optimal path.

Method used

By introducing a synchronization port determination unit in the forwarding device, the time synchronization port is determined from a plurality of ports based on the accumulated frequency deviation in the time information sent from the main device, and the local time is updated to ensure the accuracy of time synchronization.

Benefits of technology

When time synchronization is performed using propagation delay and frequency deviation, an appropriate time release path can be determined to improve the accuracy and reliability of time synchronization, and avoid the problem of improper time synchronization path caused by changes in network state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119234404A_ABST
    Figure CN119234404A_ABST
Patent Text Reader

Abstract

A transfer device (10) sets, as target ports, each of a plurality of ports that receive, via different transfer devices (10), time information transmitted from a master device (40). A transfer device (10) calculates an integrated frequency deviation, which is an integrated value of a frequency deviation from a master device (40) with respect to a target port. The transfer device (10) determines a time synchronization port from among the plurality of ports on the basis of the integrated frequency deviation. The transfer device (10) updates the local time on the basis of the time information received by the determined time synchronization port.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a technology for synchronizing the time of devices. Background Art

[0002] In the industrial Ethernet (registered trademark) network, the integration of control network and information network is developing. In addition, the standardization of TSN technology is developing as a way to forward control data in real time. TSN is the abbreviation of Time Sensitive Networking. TSN technology is a technology that synchronizes time between devices with high precision and schedules services via a network switch (hereinafter referred to as a forwarding device).

[0003] As one of the TSN technologies, there is a time synchronization method described in Non-Patent Documents 1 and 2 as a high-precision network time synchronization technology.

[0004] In the time synchronization method described in Non-Patent Document 1, each device connected to a network including a repeater periodically measures the propagation delay and frequency deviation between adjacent devices. Then, the time information periodically distributed from the highest level master clock device (hereinafter referred to as GM) as the time source via the network is synchronized with the time with high accuracy based on the measured propagation delay and frequency deviation.

[0005] In the time synchronization method described in non-patent document 2, multiple GMs as time sources are configured on the network for the purpose of high reliability of the time synchronization system. Each GM periodically publishes time source information such as the accuracy and reliability of the clock. The forwarding device selects the best time source information from the time source information received from one or more ports through BMCA. BMCA is the abbreviation of Best Master Clock Algorithm. A publishing path called a clock tree is formed to publish the time starting from the GM corresponding to the selected time source information.

[0006] More specifically, in non-patent document 2, GM periodically issues Announce messages. Based on the Announce messages, the forwarding device selects the port with the best time synchronization quality as the slave port through BMCA. This determines the distribution path of the time information based on the Sync / FollowUp messages periodically issued by the GM.

[0007] At this time, the slave port is selected according to the priority vector composed of static parameters. Static parameters are the priority, attributes, number of levels of Announce messages, MAC addresses, port numbers, etc. set in the GM according to the network design. The state of the network that may change every time depends on the state of the transmission path and forwarding device on the time release path is not reflected in the selection of the slave port. Therefore, the time release path determined by selecting the slave port is not necessarily the best path.

[0008] Patent document 1 discloses a technique for switching a time publishing path in consideration of the state of a transmission path and a forwarding device on the time publishing path. Specifically, in the technique disclosed in patent document 1, delays are measured for each of a plurality of time publishing paths between a forwarding device and a GM. Then, based on the delay measurement results, a time publishing path with the best synchronization accuracy is determined among the plurality of time publishing paths.

[0009] Prior art literature

[0010] Patent Literature

[0011] Patent Document 1: Japanese Patent Application Publication No. 2020-202498

[0012] Non-patent literature

[0013] Non-patent document 1: IEEE Std 802.1AS-2020 (Timing and Synchronization for Time-Sensitive Applications), Approved 30 January 2020, P163, P186

[0014] Non-patent document 2: IEEE1588-2019 IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems P161, P217, P223, P378 Summary of the invention

[0015] Problems to be solved by the invention

[0016] In the technology described in Patent Document 1, the time distribution path is determined by considering the delay for each of the multiple time distribution paths. However, when the technology described in Non-Patent Document 1 is used to perform time synchronization with high accuracy based on propagation delay and frequency deviation, the time distribution path determined by the technology described in Patent Document 1 is not necessarily the best path.

[0017] An object of the present disclosure is to determine an appropriate time distribution path even when a technique for performing time synchronization with high accuracy based on propagation delay and frequency deviation is used.

[0018] Means for solving problems

[0019] The time synchronization device disclosed in the present invention comprises: a synchronization port determination unit, which determines a time synchronization port from a plurality of ports that receive time information sent from a main device via different forwarding devices based on a cumulative frequency deviation, wherein the cumulative frequency deviation is a cumulative value of frequency deviations from the main device respectively related to the plurality of ports; and a time synchronization unit, which updates a local time based on the time information received by the time synchronization port determined by the synchronization port determination unit.

[0020] Effects of the Invention

[0021] In the present disclosure, a time synchronization port is determined from a plurality of ports based on the accumulated frequency deviation from the master device. Thus, even when a technique for high-precision time synchronization based on propagation delay and frequency deviation is used, an appropriate time distribution path can be determined. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a diagram showing the configuration of the time synchronization system 100 according to the first embodiment.

[0023] Figure 2 This is a hardware configuration diagram of the forwarding device 10 according to the first embodiment.

[0024] Figure 3 This is a functional configuration diagram of the forwarding device 10 according to the first embodiment.

[0025] Figure 4 This is a diagram showing the configuration of the synchronization function unit 24 according to the first embodiment.

[0026] Figure 5 This is a flowchart of the overall processing of the forwarding device 10 according to the first embodiment.

[0027] Figure 6 This is an explanatory diagram of the delay calculation unit 35 according to the first embodiment.

[0028] Figure 7 This is an explanatory diagram of message relay processing in Implementation Example 1.

[0029] Figure 8 This is a flowchart of the process of determining the time synchronization port in the first embodiment.

[0030] Fig. 9 This is a flowchart of the abnormality detection process in the first embodiment.

[0031] Fig.10 This is an explanatory diagram of the effect of the first embodiment.

[0032] Fig.11 This is a diagram showing the configuration of a time synchronization system 100 according to the second embodiment.

[0033] Fig.12 This is an illustration of the priority vector of implementation mode 2.

[0034] Fig.13 This is a flowchart of BMCA described in Non-Patent Document 2.

[0035] Fig.14 This is a flowchart of the process of determining the time synchronization port according to the second embodiment. DETAILED DESCRIPTION

[0036] Implementation Method 1

[0037] ***Description of the structure***

[0038] Reference Figure 1 The configuration of the time synchronization system 100 according to the first embodiment will be described.

[0039] The time synchronization system 100 includes a master device 40 and a plurality of forwarding devices 10. Figure 1 In FIG. 1 , the time synchronization system 100 includes six forwarding devices 10 , namely, a forwarding device 10A to a forwarding device 10F.

[0040] The forwarding device 10 is a time synchronization device that performs time synchronization based on the time information issued by the master device 40. The forwarding device 10 is, for example, a layer 2 switch that supports gPTP. PTP is an abbreviation of Precision Time Protocol. gPTP is defined in IEEE 802.1AS-2011.

[0041] The master device 40 is the highest level master clock device. The master device 40 is a device connected to the GPS 41. GPS is the abbreviation of Global Positioning System. The master device 40 circulates the message 42 (Sync message and FollowUp message) to each forwarding device 10 that becomes a slave device to publish the time. The message 42 is sent by the master device 40 and terminated by the master device 40.

[0042] exist Figure 1 In the embodiment, a host device 40 connected to the GPS 41 is provided separately from the repeater 10. However, any repeater 10 may be connected to the GPS 41 to operate as the host device 40. For example, Figure 1The repeater device 10A in the embodiment is connected to the GPS 41 and operates as the master device 40 .

[0043] Reference Figure 2 The hardware configuration of the forwarding device 10 according to the first embodiment will be described.

[0044] The forwarding device 10 includes an electronic circuit 11, a CPU 12, a RAM 13, and an input / output interface 14. CPU is an abbreviation of Central Processing Unit. RAM is an abbreviation of Random Access Memory.

[0045] The electronic circuit 11 is a network processor for implementing an independent time synchronization function. As a specific example, the electronic circuit 11 is an FPGA or an ASIC. FPGA is an abbreviation of Field-Programmable Gate Array. ASIC is an abbreviation of Application Specific Integrated Circuit.

[0046] The CPU 12 is a processor that performs settings, various controls, various monitoring, and various management of the forwarding device 10. The RAM is a storage device that temporarily stores data. The input / output interface 14 is an interface for inputting and outputting data with the outside. As a specific example, the input / output interface 14 is a port of an optical transceiver, an RJ45 (LAN cable), and a coaxial connector. LAN is the abbreviation of Local Area Network.

[0047] Reference Figure 3 The functional configuration of the transfer device 10 according to the first embodiment will be described.

[0048] The forwarding device 10 includes a plurality of frame transceiver units 21, a plurality of frame distribution units 22, a switching function unit 23, and a synchronization function unit 24 as functional components. Figure 3 In the embodiment, the forwarding device 10 includes frame transceivers 21#1 to 21#N as the frame transceivers 21. In addition, the forwarding device 10 includes frame distribution units 22#1 to 22#N as the frame distribution units 22. The frame distribution units 22 correspond to the frame transceivers 21.

[0049] The frame transceiver 21 has the function of sending and receiving frames. The frame transceiver 21 performs data conversion from layer 2 to layer 1 when sending frames. The frame transceiver 21 performs data conversion from layer 1 to layer 2 when receiving frames. Layer 1 is the physical layer. Layer 2 is MAC. MAC is the abbreviation of Medium Access Control.

[0050] The frame transceiver 21 discards data that cannot be converted or abnormal data. The frame transceiver 21 transfers normal data to the frame distribution unit 22.

[0051] The frame allocation unit 22 extracts and analyzes information in the frame. Specifically, the frame allocation unit 22 discards error frames and extracts various control frames.

[0052] The frame distribution unit 22 transfers the frame that needs to be forwarded by the forwarding device 10 to the switching function unit 23. Forwarding means switching. The frame that needs to be forwarded is a general frame other than a control frame described later.

[0053] The switching function unit 23 determines the destination output port related to the frame transferred from the frame distribution unit 22. The switching function unit 23 determines the destination output port according to the MAC address and VLAN value stored in the frame. VLAN is an abbreviation of Virtual Local Area Network. The switching function unit 23 performs forwarding processing of the frame toward the determined destination output port side.

[0054] The switching function unit 23 may have a function of temporarily storing frames in the RAM 13 when the frame forwarding process is congested, etc. The switching function unit 23 determines whether to store the frames according to the forwarding capacity or scale.

[0055] The synchronization function unit 24 processes a time synchronization related frame (hereinafter referred to as a PTP frame) in the control frame extracted by the frame allocation unit 22. The synchronization function unit 24 updates the local time according to the GM time information stored and distributed in the SYNC message and the FOLLOWUP message which are one of the PTP frames.

[0056] Reference Figure 4 The configuration of the synchronization function unit 24 according to the first embodiment will be described.

[0057] The synchronization function unit 24 includes a PDelay receiving unit 31 , a Sync / FollowUp receiving unit 32 , an Annouce receiving unit 33 , and a BMCA control unit 34 as functional components.

[0058] The PDelay receiving unit 31 performs reception processing on the PDelay message in the PTP frame and extracts parameters for measuring communication delay. The PDelay message includes a PDelay request message, a PDelay response message, and a PDelay response Followup message.

[0059] The Sync / FollowUp receiving unit 32 performs reception processing on the Sync message and the FollowUp message in the PTP frame, and extracts time information for time synchronization and parameters for correction calculation.

[0060] The annouce receiving unit 33 performs reception processing on the annouce message in the PTP frame, and extracts parameters required for executing BMCA.

[0061] The BMCA control unit 34 executes BMCA in which the Annouce messages from devices having a time synchronization function on the network are counted to automatically construct a time distribution tree.

[0062] Furthermore, the synchronization function unit 24 includes, as functional components, a delay calculation unit 35, a synchronization port determination unit 36, an abnormality detection unit 37, a time synchronization unit 38, and a gPTP frame transmission unit 39. These functional components are characteristic.

[0063] The delay calculation unit 35 calculates the device delay when the time is released.

[0064] The synchronization port determination unit 36 ​​determines which port, among the SYNC messages and FOLLOWUP messages received by a plurality of ports, has received a SYNC message or a FOLLOWUP message as a reference to perform time synchronization.

[0065] The abnormality detection unit 37 detects quality degradation or occurrence of abnormality between adjacent devices and in the entire network.

[0066] The time synchronization unit 38 updates the local time based on the time information distributed from the host device 40 .

[0067] The gPTP frame sending unit 39 generates and outputs a PTP frame based on the results of processing by other functions.

[0068] ***Description of the action***

[0069] Reference Figures 5 to 9 The operation of the forwarding device 10 according to the first embodiment will be described.

[0070] The operation procedure of the transfer device 10 in the first embodiment corresponds to the time synchronization method in the first embodiment. In addition, the program for realizing the operation of the transfer device 10 in the first embodiment corresponds to the time synchronization program in the first embodiment.

[0071] Reference Figure 5 The overall processing of the forwarding device 10 according to the first embodiment will be described.

[0072] (Step S11: Frame Reception Process)

[0073] The frame input to the forwarding device 10 is processed by the frame transceiver 21 corresponding to the port to which the frame is input. The frame transceiver 21 transfers the frame received normally to the corresponding frame distribution unit 22.

[0074] (Step S12: Frame allocation processing)

[0075] The frame distribution unit 22 analyzes the content of the transferred frame to determine the type of the frame. Frames are roughly divided into control frames and general frames. The frame distribution unit 22 extracts parameters related to control from frames determined as control frames and transfers them to functional blocks that perform various controls together with the control frames. The frame distribution unit 22 extracts parameters related to forwarding processing from frames determined as general frames and transfers them to the switching functional unit 23 together with the general frames.

[0076] Here, the control frame is used for time synchronization. When a PTP frame, which is one of the control frames, is input, the frame distribution unit 22 transfers the PTP frame to the synchronization function unit 24. The frame distribution unit 22 determines that it is a PTP frame based on the Ethernet type value of the frame. The Ethernet type value of the PTP frame is specified as 0x88F7 in non-patent document 2.

[0077] (Step S13: Synchronous Function Processing)

[0078] The synchronization function unit 24 performs delay measurement, time synchronization, determination of a time synchronization target port, determination of a distribution tree based on BMCA, and generation and transmission of a PTP frame based on the message stored in the PTP frame. The synchronization function unit 24 transmits the PTP frame to be transmitted to the switching function unit 23 together with information related to the output port.

[0079] (Step S14: Switching Function Processing)

[0080] The switching function unit 23 performs forwarding processing on the general frame transferred from the frame distribution unit 22 and the PTP frame transferred from the synchronization function unit 24 .

[0081] In addition to the destination MAC address and the source MAC address, a general frame also has parameters indicating the VLAN if the VLAN is valid. The switching function unit 23 has a forwarding database (hereinafter referred to as FDB) that determines the forwarding path of the frame by presetting these parameters or learning them when forwarding the frame. Therefore, the switching function unit 23 refers to the destination MAC address and VLAN value of the general frame, compares them with the FDB, and thereby determines the output port. The switching function unit 23 transfers the general frame to the frame transceiver unit 21 corresponding to the output port.

[0082] The switching function unit 23 forwards the PTP frame using the MAC address, VLAN, and FDB, as with a general frame. Furthermore, the switching function unit 23 sometimes determines the output port using information related to the output port transmitted from the synchronization function unit 24 together with the PTP frame. This is because the PTP frame type includes either unicast transmission (referring to the MAC address) or link-by-link transmission (the MAC address is a special address and is only sent to adjacent devices).

[0083] (Step S15: Frame Transmission Processing)

[0084] The frame transceiver unit 21 transmits the frame passed from the switching function unit 23 from the corresponding port.

[0085] Refer to Figure 6 to Figure 9 the synchronization function processing of Embodiment 1( Figure 5 Step S13) for description.

[0086] According to the type of the message stored in the PTP frame, the PTP frame passed to the synchronization function unit 24 is allocated to the PDelay reception unit 31, the Sync / FollowUp reception unit 32, and the Announce reception unit 33.

[0087] <When receiving a PDelayReq message>

[0088] The PDelayReq message is allocated to the PDelay reception unit 31.

[0089] When the PDelay reception unit 31 is allocated the PDelayReq message, it recognizes that a delay measurement request has been received. The PDelay reception unit 31 transmits a PDelayResp message and a PDelayRespFollowUp message to the gPTP frame transmission unit 39 for response( Figure 4 I27).

[0090] When receiving the transmission, the gPTP frame transmission unit 39 generates a PDelayResp message and a PDelayRespFollowUp message. The gPTP frame transmission unit 39 marks the generated messages with the local time corrected by the time synchronization unit 38. The gPTP frame transmission unit 39 passes the messages marked with the local time to the switching function unit 23 and transmits them to the device that is the source of the delay measurement request.

[0091] <When receiving a PDelayResp / FollowUp message>

[0092] The PDelayResp message and the PDelayRespFollowUp message are allocated to the PDelay reception unit 31.

[0093] The PDelay receiving unit 31 acquires and holds the local time when the PDelayResp message and the PDelayRespFollowUp message are received. The time information marked at the time of transmission of the device serving as the transmission source is included in the PDelayResp message and the PDelayRespFollowUp message. The PDelay receiving unit 31 transfers the time information included in the PDelayResp message and the PDelayRespFollowUp message to the delay calculation unit 35.

[0094] The delay calculation unit 35 uses the time information included in the PDelayResp message and the PDelayRespFollowUp message to calculate the transmission delay and frequency deviation between adjacent devices. The transmission delay between adjacent devices (peerMeanPathDelay) is referred to as the adjacent transmission delay. The frequency deviation between adjacent devices (neighborRateRatio) is referred to as the adjacent frequency deviation. As described in Non-Patent Document 1, the adjacent transmission delay is calculated by Figure 6 Formula 1 below. The adjacent transmission delay is used in the time correction performed by the time synchronization unit 38. As described in Non-Patent Document 1, the adjacent frequency deviation is calculated by Figure 6 Formula 2 below. The adjacent frequency deviation is used for the time synchronization port determination by the synchronization port determination unit 36, the anomaly detection by the anomaly detection unit 37, and the time correction by the time synchronization unit 38.

[0095] The delay calculation unit 35 transfers the adjacent transmission delay and the adjacent frequency deviation ( Figure 4 I21 below) to the time synchronization unit 38. The delay calculation unit 35 transfers the adjacent frequency deviation ( Figure 4 I22 below) to the synchronization port determination unit 36 and the anomaly detection unit 37. The delay calculation unit 35 transfers the adjacent transmission delay and the adjacent frequency deviation ( Figure 4 I25 below) to the gPTP frame transmission unit 39.

[0096] <When Sync / FollowUp message is received>

[0097] The Sync message and the FollowUp message are assigned to the Sync / FollowUp receiving unit 32.

[0098] The Sync / FollowUp receiving unit 32 acquires and holds the local time when the Sync message and the FollowUp message are received. The Sync / FollowUp receiving unit 32 transfers the Sync message and the FollowUp message to the time synchronization unit 38.

[0099] As Figure 7As shown, the time synchronization unit 38 relays the Sync message and the FollowUp message to the adjacent device on the slave side as specified in Non-Patent Document 2.

[0100] At this time, the time synchronization unit 38 extracts the cumulative transmission delay, which is the cumulative value of the transmission delay from the master device 40 to the adjacent device on the master side, stored in the Sync message in the gPTP. The cumulative transmission delay is the cumulative value of the adjacent transmission delay of the device passed through from the master device 40 to the adjacent device on the master side. Then, the time synchronization unit 38 adds the adjacent transmission delay from the adjacent device on the master side to the own device to the cumulative transmission delay, and calculates the cumulative transmission delay from the master device 40 to the own device.

[0101] In addition, the time synchronization unit 38 extracts the cumulative value of the frequency deviation from the master device 40 to the adjacent device on the master side, that is, the cumulative frequency deviation, which is stored in the Sync message in the gPTP. The cumulative frequency deviation is the cumulative value of the adjacent frequency deviation of the devices passed through from the master device 40 to the adjacent device on the master side. Then, the time synchronization unit 38 adds the adjacent frequency deviation from the adjacent device on the master side to the present device to the cumulative frequency deviation, and calculates the cumulative frequency deviation from the master device 40 to the present device.

[0102] The time synchronization unit 38 determines whether the port receiving the FollowUp message is the time synchronization port ( Figure 4 I24) is consistent.

[0103] When the port receiving the FollowUp message is consistent with the time synchronization port, the time synchronization unit 38 refers to the master time indicated by the time information in the received Sync message and FollowUp message. The master time is the time in the master device 40. Then, the time synchronization unit 38 uses the adjacent transmission delay, the adjacent frequency deviation, the accumulated transmission delay amount, and the accumulated device processing delay amount to reproduce the local time of the device based on the master time. In this way, the time synchronization unit 38 updates the local time.

[0104] The time synchronization unit 38 transmits the accumulated frequency deviation ( Figure 4 I23).

[0105] <Determination of the time synchronization port>

[0106] The synchronization port determination unit 36 ​​is transmitted with the adjacent frequency deviation ( Figure 4 In addition, the synchronization port determination unit 36 ​​is transmitted with the accumulated frequency deviation ( Figure 4I23). The synchronization port determination unit 36 determines the time synchronization port using the adjacent frequency deviation and the cumulative frequency deviation.

[0107] Refer to Figure 8 The determination process of the time synchronization port in Embodiment 1 will be described.

[0108] The synchronization port determination unit 36 determines the time synchronization port from among the multiple ports that have received the Sync message and the Follow - Up message. In other words, the synchronization port determination unit 36 determines the time synchronization port from among the multiple ports that have received the time information. Here, the multiple ports have received the time information sent from the master device 40 via different forwarding devices 10.

[0109] Here, the synchronization port determination unit 36 determines which port, among the port selected as the current time synchronization port and the port that becomes the new comparison object, will be the time synchronization port. The port selected as the current time synchronization port is the port determined as the time synchronization port in the previous time synchronization port determination process. The port that becomes the new comparison object is the port that has newly received the Sync message and the Follow - Up message.

[0110] (Step S21: Cumulative determination process)

[0111] The synchronization port determination unit 36 determines the time synchronization port from among the multiple ports based on the cumulative value of the frequency deviation from the master device 40 for each of the multiple ports, that is, the cumulative frequency deviation. Specifically, the synchronization port determination unit 36 refers to the cumulative frequency deviation from the master device 40 and determines the port that has received the best - result Sync message and Follow - Up message as the time synchronization port.

[0112] Here, the synchronization port determination unit 36 compares the cumulative frequency deviations between the port selected as the current time synchronization port and the port that becomes the new comparison object.

[0113] At this time, the synchronization port determination unit 36 compares the absolute values of (1 - cumulative frequency deviation). Let the absolute value of (1 - cumulative frequency deviation) of the port selected as the current time synchronization port be A. Let the absolute value of (1 - cumulative frequency deviation) of the port that becomes the new comparison object be B.

[0114] If A > B, the synchronization port determination unit 36 newly determines the port that becomes the new comparison object as the time synchronization port. On the other hand, if A < B, the synchronization port determination unit 36 determines the port selected as the current time synchronization port as the time synchronization port. If A = B, the process proceeds to step S22.

[0115] (Step S22: Adjacent determination process)

[0116] The synchronization port determination unit 36 determines the time synchronization port from among a plurality of ports based on the frequency deviation from an adjacent device, i.e., the adjacent frequency deviation, for each of the plurality of ports. The adjacent device is a forwarding device that is the direct forwarding source of the time information. Specifically, the synchronization port determination unit 36 refers to the adjacent frequency deviation from the adjacent device and determines the port that has received the best Sync message and FollowUp message as the time synchronization port.

[0117] Here, the synchronization port determination unit 36 compares the adjacent frequency deviations between the port selected as the current time synchronization port and the port to be the new comparison object. At this time, the synchronization port determination unit 36 compares the absolute values of (1 - adjacent frequency deviation). Let the absolute value of (1 - adjacent frequency deviation) of the port selected as the current time synchronization port be A. Let the absolute value of (1 - adjacent frequency deviation) of the port to be the new comparison object be B.

[0118] If A > B, the synchronization port determination unit 36 newly determines the port to be the new comparison object as the time synchronization port. On the other hand, if A < B, the synchronization port determination unit 36 determines the port selected as the current time synchronization port as the time synchronization port. If A = B, the process proceeds to step S23.

[0119] (Step S23: BMCA processing)

[0120] The synchronization port determination unit 36 determines the port determined by BMCA described in Non-Patent Document 2 among the plurality of ports as the time synchronization port. In addition, BMCA is executed by the BMCA control unit 34. Here, through BMCA, the time synchronization port is determined from among the port selected as the current time synchronization port and the port to be the new comparison object.

[0121] <Abnormality detection processing>

[0122] The abnormality detection unit 37 is passed the adjacent frequency deviation ( Figure 4 I22) from the delay calculation unit 35. In addition, the abnormality detection unit 37 is passed the cumulative frequency deviation ( Figure 4 I23) from the time synchronization unit 38. The abnormality detection unit 37 uses the adjacent frequency deviation and the cumulative frequency deviation to detect abnormalities for each of the plurality of ports. Similar to the determination process of the time synchronization port, the plurality of ports here are the ports that have received the Sync message and the FollowUp message.

[0123] It is assumed that the threshold values ​​X, X' and the threshold values ​​Y, Y' for abnormality detection are set in advance by the administrator or the like. The threshold values ​​X, X' and the threshold values ​​Y, Y' may also be fixed values ​​that cannot be changed by the administrator. The threshold values ​​X, X' are threshold values ​​for detecting the occurrence of destructive abnormalities including disconnection or disconnection. The threshold values ​​Y, Y' are threshold values ​​for detecting the precursor of destructive abnormalities caused by device instability or wiring degradation.

[0124] The abnormality detection unit 37 compares the adjacent determination index obtained from the adjacent frequency deviation of the most recent reference time and the cumulative determination index obtained from the cumulative frequency deviation of the most recent reference time with the thresholds X, X' and Y, Y' to detect abnormality. The reference time is set by a manager or the like.

[0125] As a specific example, as shown in Formula 3, the neighbor determination index is the absolute value of a value obtained by subtracting the latest neighbor frequency deviation from the average value of the neighbor frequency deviation at the most recent reference time.

[0126] (Formula 3)

[0127] Adjacent judgment index = |(sum of adjacent frequency deviations of the most recent benchmark times / reference times) - latest adjacent frequency deviation|

[0128] As a specific example, as shown in Formula 4, the cumulative determination index is the absolute value of a value obtained by subtracting the latest cumulative frequency deviation from the average value of the cumulative frequency deviations at the most recent reference times.

[0129] (Formula 4)

[0130] Cumulative judgment index = |(sum of cumulative frequency deviations of the most recent benchmark times / base times) - latest cumulative frequency deviation|

[0131] Reference Fig. 9 The abnormality detection process according to the first embodiment will be described.

[0132] The abnormality detection process is executed for each of the plurality of ports.

[0133] (Step S31: Adjacent abnormality detection processing)

[0134] The abnormality detection unit 37 determines whether the adjacency determination index exceeds the threshold value X.

[0135] When the neighbor judgment index exceeds the threshold value X, the abnormality detection unit 37 determines that an abnormality has occurred between the neighboring devices related to the target port. Then, the abnormality detection unit 37 issues a notification of abnormality occurrence between the neighboring devices (R31). On the other hand, when the neighbor judgment index does not exceed the threshold value X, the abnormality detection unit 37 advances the processing to step S32.

[0136] (Step S32: Adjacent Degradation Detection Process)

[0137] The abnormality detection unit 37 determines whether the adjacent determination index exceeds the threshold value Y.

[0138] When the neighbor judgment index exceeds the threshold value Y, the abnormality detection unit 37 determines that degradation has occurred between the neighboring devices related to the target port. Then, the abnormality detection unit 37 issues a degradation occurrence notification between the neighboring devices (R32). On the other hand, when the neighbor judgment index does not exceed the threshold value Y, the abnormality detection unit 37 advances the processing to step S33.

[0139] (Step S33: Cumulative abnormality detection processing)

[0140] The abnormality detection unit 37 determines whether the cumulative determination index exceeds a threshold value X′.

[0141] When the cumulative judgment index exceeds the threshold value X', the abnormality detection unit 37 determines that an abnormality has occurred in the path between the host device 40 related to the target port. Then, the abnormality detection unit 37 issues a notification of the occurrence of an abnormality in the network (R33). On the other hand, when the cumulative judgment index does not exceed the threshold value X', the abnormality detection unit 37 advances the processing to step S34.

[0142] (Step S34: Cumulative Degradation Detection Process)

[0143] The abnormality detection unit 37 determines whether the cumulative determination index exceeds a threshold value Y'.

[0144] When the cumulative judgment index exceeds the threshold value Y', the abnormality detection unit 37 determines that the path between the host device 40 related to the target port has degraded. Then, the abnormality detection unit 37 issues a network degradation occurrence notification (R34). On the other hand, when the cumulative judgment index does not exceed the threshold value Y', the abnormality detection unit 37 considers it normal and ends the processing.

[0145] The CPU 12 extracts the abnormality occurrence notification (R31) between adjacent devices, the degradation occurrence notification (R32) between adjacent devices, the abnormality occurrence notification (R33) of the network, and the degradation occurrence notification (R34) of the network and issues an alarm. For example, the CPU 12 issues an alarm to the terminal of the manager through SNMP. SNMP is the abbreviation of Simple Network Management Protocol. Alternatively, the CPU 12 may also issue a visual alarm using an alarm application or the like.

[0146] ***Effects of Implementation Method 1***

[0147] As described above, the repeater 10 of Embodiment 1 determines a time synchronization port from a plurality of ports based on the accumulated frequency deviation from the master device 40 and the adjacent frequency deviation from the adjacent device. Thus, even when a technique for performing time synchronization with high accuracy based on propagation delay and frequency deviation is used, an appropriate time distribution path can be determined.

[0148] like Fig.10 As shown, the forwarding device 10 of the first embodiment broadcasts Sync messages and FollowUp messages to all published paths without using the port categories of master, slave, and block determined by BMCA. As a result, the Sync messages and FollowUp messages received from any time published path candidate connected to the forwarding device 10 can be synchronized at any time.

[0149] Furthermore, as described above, the time synchronization port is uniquely determined. Thus, the Sync message and FollowUp message with the best accuracy are always selected. As a result, the time synchronization with the master device 40 can always be achieved with the best accuracy.

[0150] If a problem occurs in any device or wiring on the distribution path and communication becomes unstable, it will take time to reconstruct the tree in the time distribution tree constructed by BMCA. Alternatively, since communication itself continues in the time distribution tree constructed by BMCA, the tree is not reconstructed and the operation continues with deteriorated time synchronization accuracy.

[0151] The transfer device 10 according to the first embodiment does not fall into such a state.

[0152] The repeater device 10 according to the first embodiment detects abnormality or degradation based on the accumulated frequency deviation from the master device 40 and the adjacent frequency deviation from the adjacent device. This makes it possible to detect abnormality or degradation at an early stage.

[0153] ***Other structures***

[0154] <Modification 1>

[0155] In Embodiment 1, the time synchronization function is implemented by the electronic circuit 11 which is a network processor. However, the time synchronization function may be implemented by software.

[0156] In this case, a program for realizing the time synchronization function is stored in the RAM 13. The CPU 12 reads and executes the program, thereby realizing the time synchronization function.

[0157] <Modification 2>

[0158] As a second modification, part of the time synchronization function may be implemented by hardware, and the rest may be implemented by software.

[0159] The electronic circuit 11, the CPU 12, and the RAM 13 are referred to as a processing circuit. That is, the functions of each functional component are realized by the processing circuit.

[0160] Implementation Method 2

[0161] The difference between the second embodiment and the first embodiment is that a plurality of master devices 40 exist in the time synchronization system 100. In the second embodiment, this difference will be described, and the description of the same points will be omitted.

[0162] ***Description of the structure***

[0163] Reference Fig.11 The configuration of the time synchronization system 100 according to the second embodiment will be described.

[0164] Time synchronization system 100 and Figure 1 The time synchronization system 100 shown is different in that it has a plurality of master devices 40. Fig.11 In the embodiment, the time synchronization system 100 includes a master device 40A and a master device 40B.

[0165] Each master device 40 circulates the messages 42 (Sync message and FollowUp message) to each repeater device 10 serving as a slave device to distribute the time.

[0166] ***Description of the action***

[0167] Reference Figure 12 to Figure 14 The operation of the forwarding device 10 according to the second embodiment will be described.

[0168] The operation procedure of the transfer device 10 according to the second embodiment corresponds to the time synchronization method according to the second embodiment. In addition, the program for realizing the operation of the transfer device 10 according to the second embodiment corresponds to the time synchronization program according to the second embodiment.

[0169] In BMCA, each forwarding device 10 determines which master device 40 to synchronize its time with according to a priority vector preset for each master device 40. Fig.12 As shown, the priority vector is composed of static parameters such as priority, attribute, number of levels of the Announce message, MAC address and port number.

[0170] In the first embodiment, when determining the time synchronization port, only the frequency deviation at that time point is used. In addition, the time distribution tree based on BMCA is not considered. When the time synchronization system 100 has a plurality of master devices 40, the priority setting set for each master device 40 is ignored in the determination process of the time synchronization port in the first embodiment.

[0171] Therefore, in Embodiment 2, the forwarding device 10 combines with the decision logic of the master, slave, and block ports based on BMCA to determine the time synchronization port.

[0172] <Determination of Time Synchronization Port>

[0173] Refer to Fig.13 and Fig.14 The determination process of the time synchronization port in Embodiment 2 will be described.

[0174] Fig.13 is a flowchart shown for comparison and is the flowchart of BMCA described in Non-Patent Document 2. Fig.14 is a flowchart of the determination process of the time synchronization port in Embodiment 2. Here, let the port selected as the current time synchronization port and the value on the port side selected as the current time synchronization port be A. Let the port to be the new comparison object and the value on the port side to be the new comparison object be B.

[0175] The processes of steps S41 to S46 and the processes of steps S49 to S51 are the same as those of BMCA.

[0176] (Step S47: Cumulative Determination Process)

[0177] Similar to Figure 8 Step S21 of, the synchronization port determination unit 36 compares the cumulative frequency deviation between the port selected as the current time synchronization port and the port to be the new comparison object. At this time, the synchronization port determination unit 36 compares the absolute value of (1 - cumulative frequency deviation).

[0178] If A > B, the synchronization port determination unit 36 newly determines the port to be the new comparison object as the time synchronization port. On the other hand, if A < B, the synchronization port determination unit 36 determines the port selected as the current time synchronization port as the time synchronization port. If A = B, the process proceeds to step S48.

[0179] (Step S48: Adjacent Determination Process)

[0180] Similar to Figure 8 Step S22 of, the synchronization port determination unit 36 compares the adjacent frequency deviation between the port selected as the current time synchronization port and the port to be the new comparison object. At this time, the synchronization port determination unit 36 compares the absolute value of (1 - adjacent frequency deviation).

[0181] If A > B, the synchronization port determination unit 36 newly determines the port to be the new comparison object as the time synchronization port. On the other hand, if A < B, the synchronization port determination unit 36 determines the port selected as the current time synchronization port as the time synchronization port. If A = B, the process proceeds to step S49.

[0182] In addition, the insertion of the processes of step S47 and step S48 into the position of the BMCA is just an example. It is also conceivable to insert the processes of step S47 and step S48 into different positions of the BMCA.

[0183] ***Effects of Embodiment 2***

[0184] As described above, in the case where the time synchronization system 100 has a plurality of master devices 40, the forwarding device 10 of Embodiment 2 selects the master device 40 that conforms to the design intention of the time synchronization system 100. Furthermore, the forwarding device 10 of Embodiment 2 can achieve time synchronization with the master device 40 with the best accuracy at that point in time.

[0185] In addition, the "unit" in the above description can also be rewritten as "circuit", "process", "step", "processing", or "processing circuit".

[0186] The embodiments and modification examples of the present disclosure have been described above. It is also possible to combine and implement several of these embodiments and modification examples. In addition, it is also possible to partially implement any one or several of the embodiments and modification examples. Furthermore, the present disclosure is not limited to the above embodiments and modification examples, and various changes can be made as needed.

[0187] Reference Numeral Explanation

[0188] 100: Time synchronization system; 10: Forwarding device; 11: Electronic circuit; 12: CPU; 13: RAM; 14: Input / output interface; 21: Frame transceiver unit; 22: Frame distribution unit; 23: Switching function unit; 24: Synchronization function unit; 31: PDelay reception unit; 32: Sync / FollowUp reception unit; 33: Annouce reception unit; 34: BMCA control unit; 35: Delay calculation unit; 36: Synchronization port determination unit; 37: Abnormality detection unit; 38: Time synchronization unit; 39: gPTP frame transmission unit; 40: Master device; 41: GPS; 42: Message.

Claims

1. A time synchronization device, the time synchronization device comprising: a synchronization port determination unit that determines a time synchronization port from a plurality of ports that receive time information transmitted from a master device via different forwarding devices, based on a cumulative frequency deviation that is a cumulative value of frequency deviations from the master device associated with each of the plurality of ports; and A time synchronization unit updates a local time based on the time information received by the time synchronization port determined by the synchronization port determination unit.

2. The time synchronization device according to claim 1, wherein: The synchronization port determination unit determines the time synchronization port based on the frequency deviation from an adjacent device, ie, an adjacent frequency deviation, associated with each of the plurality of ports, the adjacent device being a forwarding device that is a direct forwarding source of the time information.

3. The time synchronization device according to claim 2, wherein: When the accumulated frequency deviation related to two or more ports is optimal, the synchronization port determination unit determines the time synchronization port from among the two or more ports based on the adjacent frequency deviation.

4. The time synchronization device according to any one of claims 1 to 3, wherein: The accumulated frequency deviation is calculated periodically. The time synchronization device further includes an abnormality detection unit that detects an abnormality between the device and the master device based on a cumulative determination index obtained from the cumulative frequency deviation of a reference order.

5. The time synchronization device according to claim 2, wherein: The adjacent frequency deviations are calculated periodically. The time synchronization device further includes an abnormality detection unit that detects an abnormality between the adjacent device and the adjacent device based on a neighbor determination index obtained from the adjacent frequency deviation of a reference order.

6. The time synchronization device according to any one of claims 1 to 5, wherein: The plurality of ports receive the time information sent from any of the plurality of master devices, The synchronization port determination unit determines a priority master device among the multiple master devices, thereby determining a candidate port that is a candidate for the time synchronization port from the multiple ports. When multiple candidate ports are determined, the time synchronization port is determined from the multiple candidate ports based on the accumulated frequency deviations respectively related to the multiple candidate ports.

7. A time synchronization method, wherein: The computer determines a time synchronization port from a plurality of ports that receive time information transmitted from a master device via different forwarding devices based on a cumulative frequency deviation that is a cumulative value of frequency deviations from the master device associated with each of the plurality of ports. The computer updates the local time according to the time information received by the time synchronization port.

8. A time synchronization program, the time synchronization program causing a computer to function as a time synchronization device, the time synchronization device performing the following processing: a synchronization port determination process of determining a time synchronization port from a plurality of ports that receive time information transmitted from a master device via different forwarding devices, based on a cumulative frequency deviation that is a cumulative value of frequency deviations from the master device associated with each of the plurality of ports; and The time synchronization process updates the local time based on the time information received by the time synchronization port determined by the synchronization port determination process.