Relay device and program

The relay device addresses synchronization issues by managing time and detecting abnormalities in reception times using jump width calculations, ensuring accurate time synchronization.

JP7814171B2Active Publication Date: 2026-02-16MITSUBISHI ELECTRIC CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2022005119
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-01-17
Publication Date
2026-02-16
Estimated Expiration
2042-01-17

AI Technical Summary

Technical Problem

Devices receiving time from a time source cannot accurately determine if the received time is abnormal, leading to potential synchronization issues.

Method used

A relay device that manages a management time, calculates jump widths between reception and management times, and uses counter values to detect abnormalities in reception times through variance and rate of change calculations, determining abnormality based on preset thresholds.

Benefits of technology

Enables accurate detection and correction of abnormal reception times, ensuring high-accuracy time synchronization in communication systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007814171000009
    Figure 0007814171000009
  • Figure 0007814171000010
    Figure 0007814171000010
  • Figure 0007814171000011
    Figure 0007814171000011
Patent Text Reader

Abstract

To detect abnormal time.SOLUTION: A relay device 100 includes: a communication unit 110 which receives a frame including reception time; a calculation unit 140 which calculates a transition width using the reception time and management time managed in the relay device 100; a management unit 180; a counter unit 150; and an abnormality determination unit 160. The management unit 180 stores the management time and relation information which is information showing a plurality of transition widths corresponding to a plurality of counter values and in which a total value of the plurality of counter values is a preset threshold value or greater. The counter unit 150 increments the counter value corresponding to the calculated transition width. The calculation unit 140 uses the relation information to execute first calculation processing which calculates a difference between the calculated transition width and the transition width at the largest of the counter values or second calculation processing which includes calculation processing of variance obtained using the relation information, a moving average value of the variance, and percentage change of the moving average value. The abnormality determination unit 160 determines that the reception time is abnormal if the difference or the percentage change is the threshold vale or greater.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to a relay device and programs Regarding. [Background technology]

[0002] A plurality of devices communicate via a network. Time is synchronized between the devices. gPTP (generalized Precision Time Protocol) is known as a communication protocol for time synchronization. gPTP is also defined in IEEE802.1AS-2020. A technology for detecting time synchronization anomalies has been proposed (see Patent Document 1). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2018-201110 Summary of the Invention [Problem to be solved by the invention]

[0004] Incidentally, time synchronization is performed based on the time received from a time source (hereinafter referred to as the received time). However, a device that receives the received time cannot tell whether the received time is abnormal or not. Therefore, for example, if the received time is abnormal, it is problematic for the device to synchronize based on the received time. Therefore, the device needs to detect abnormal times. However, the problem is how to detect abnormal times.

[0005] The objective of this disclosure is to detect anomalous times. [Means for solving the problem]

[0006] According to one aspect of the present disclosure, a relay device is provided. The relay device manages the management time.The relay device includes a communication unit that receives a frame including a time transmitted from a time source, and a reception time that is the time included in the frame. The aforementioned a calculation unit that calculates a jump width indicating an interval between the reception time and the management time using the management time; Complex and relationship information indicating a plurality of jump widths corresponding to a number of counter values, the sum of the plurality of counter values ​​being equal to or greater than a preset threshold value. The management time Remember The management department and Increment the counter value corresponding to the jump width calculated using the reception time. a counter unit for detecting an abnormality in the reception time; and an abnormality determination unit for determining an abnormality in the reception time. The calculation unit performs a first calculation process using the relationship information to calculate a difference between the jump width calculated using the reception time and the jump width with the largest counter value, or a calculation process of a variance using the relationship information, a calculation process of a moving average value of the variance, and a calculation process of a rate of change of the moving average value. of When the difference or the rate of change is equal to or greater than a preset threshold, the abnormality determination unit determines that the reception time is abnormal. [Effects of the Invention]

[0007] According to the present disclosure, an abnormal time can be detected. [Brief explanation of the drawings]

[0008] [Figure 1] 1 is a diagram illustrating a communication system according to a first embodiment. [Figure 2] FIG. 1 is a diagram illustrating an example of time synchronization based on gPTP according to the first embodiment. [Figure 3] 2 is a diagram illustrating hardware included in a relay device according to the first embodiment. FIG. [Figure 4] 2 is a block diagram showing the functions of the relay device according to the first embodiment. FIG. [Figure 5] 1 is a flowchart (part 1) illustrating an example of processing executed by the relay device according to the first embodiment. [Figure 6] 10 is a second flowchart illustrating an example of processing executed by the relay device according to the first embodiment. [Figure 7]FIG. 4 is a diagram illustrating an example of abnormality determination in the first embodiment. [Figure 8] FIG. 10 is a diagram illustrating an example of a change in jump width according to the first embodiment. [Figure 9] FIG. 4 is a diagram showing an example of a graph of a rate of change according to the first embodiment. [Figure 10] 10A to 10D are diagrams illustrating a specific example (part 1) of the process executed by the relay device according to the first embodiment. [Figure 11] 10A to 10C are diagrams illustrating a specific example (part 2) of the process executed by the relay device according to the first embodiment. [Figure 12] FIG. 4 is a diagram illustrating an example of a synchronization error in the first embodiment. [Figure 13] FIG. 10 is a block diagram showing the functions of a relay device according to a second embodiment. [Figure 14] 10 is a flowchart illustrating an example of processing executed by a relay device according to the second embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0009] Hereinafter, embodiments will be described with reference to the drawings. The following embodiments are merely examples, and various modifications are possible within the scope of the present disclosure.

[0010] Embodiment 1 1 is a diagram showing a communication system according to a first embodiment. The communication system includes relay devices 100_1 to 100_4, a GM (Grand Master) 200, and terminating devices 300_1 to 300_4. For example, the relay devices 100_1 to 100_4 are L2SWs (Layer 2 Switching Hubs). The GM 200 is also called a time source. Here, the relay devices 100_1 to 100_4 are collectively referred to as relay device 100. The termination devices 300_1 to 300_4 are collectively referred to as termination device 300.

[0011] Next, we will explain time synchronization based on gPTP. Fig. 2 is a diagram showing an example of time synchronization based on gPTP according to the first embodiment. Fig. 2 mainly illustrates time synchronization performed between the relay device 100 and the GM 200. Time synchronization is similarly performed between the relay device 100 and the terminating device 300. Details of the time synchronization performed between the relay device 100 and the terminating device 300 are omitted.

[0012] As shown in FIG. 2, when the GM 200 receives Pdelay_Req from the relay device 100, the GM 200 receives the Pdelay_Req at the reception time t G2 After the Pdelay_Res is transmitted, the GM 200 transmits a Pdelay_Res including the transmission time t G3 , and transmits a Pdelay_Res_Follow_Up including the received time t G2 and transmission time t G3 The relay device 100 can store the time t L1 and the time t' when Pdelay_Res is received L4 and remember.

[0013] The relay device 100 calculates the clock ratio R GL For example, the relay device 100 can calculate the clock ratio R GL can be calculated.

[0014]

number

[0015] The relay device 100 calculates the propagation delay time D GL For example, the relay device 100 can calculate the propagation delay time D GL can be calculated.

[0016]

number

[0017] The GM 200 periodically transmits Sync and Follow_Up to the relay device 100. The relay device 100 also transmits the Sync and Follow_Up to the relay device 100 for a device residence time S L Specifically, the relay device 100 calculates the in-device residence time S L can be calculated using the formula (3). LSNCTX is the time when the relay device 100 transmits Sync to the end device 300. LSNCRX is the time when the relay device 100 receives the Sync. L is the time for temporarily storing Sync (i.e., frame).

[0018]

number

[0019] The relay device 100 transmits the Sync at the time T GM , the propagation delay time D GL and residence time in the device S L The relay device 100 synchronizes the time obtained by the addition with the time managed by the relay device 100. As a result, the time of the relay device 100 and the time of the GM 200 are synchronized. Time synchronization based on gPTP is performed in this manner. The relay device 100 performs synchronization using a method different from the method of time synchronization based on gPTP. Details will be described later.

[0020] Next, the hardware of the relay device 100 will be described. 3 is a diagram showing hardware included in the relay device of embodiment 1. The relay device 100 includes a processor 101, a volatile storage device 102, and a non-volatile storage device 103.

[0021] The processor 101 controls the entire relay device 100. For example, the processor 101 is a central processing unit (CPU) or a field programmable gate array (FPGA). The processor 101 may be a multiprocessor. The relay device 100 may also include a processing circuit.

[0022] The volatile storage device 102 is a main storage device of the relay device 100. For example, the volatile storage device 102 is a random access memory (RAM). The nonvolatile storage device 103 is an auxiliary storage device of the relay device 100. For example, the nonvolatile storage device 103 is a hard disk drive (HDD) or a solid state drive (SSD).

[0023] Next, the functions of the relay device 100 will be described. 4 is a block diagram showing functions of the relay device according to embodiment 1. The relay device 100 includes communication units 110_1 to 110_n (n is a positive integer), an L2 protocol processing unit 120, a count determination unit 130, a calculation unit 140, a counter unit 150, an abnormality determination unit 160, a synchronization determination unit 170, and a management unit 180.

[0024] A part of the management unit 180 may be realized as a storage area secured in the volatile storage device 102 or the nonvolatile storage device 103.

[0025] A part or all of the communication units 110_1 to 110_n, the L2 protocol processing unit 120, the number of times determining unit 130, the calculation unit 140, the counter unit 150, the abnormality determining unit 160, the synchronization determining unit 170, and the management unit 180 may be realized by a processing circuit. Also, a part or all of the communication units 110_1 to 110_n, the L2 protocol processing unit 120, the number of times determining unit 130, the calculation unit 140, the counter unit 150, the abnormality determining unit 160, the synchronization determining unit 170, and the management unit 180 may be realized as a module of a program executed by the processor 101.

[0026] The communication units 110_1 to 110_n transmit and receive frames. For example, the frames are Pdelay_Req, Pdelay_Res, Pdelay_Res_Follow_Up, etc. In this manner, the communication units 110_1 to 110_n receive frames transmitted by the GM 200. Furthermore, the communication units 110_1 to 110_n transmit frames to the GM 200. Here, the communication units 110_1 to 110_n may be collectively referred to as the communication unit 110.

[0027] When Pdelay_Res is received, the L2 protocol processor 120 obtains the reception time from Pdelay_Res.When Pdelay_Res_Follow_Up is received, the L2 protocol processor 120 obtains the transmission time from Pdelay_Res_Follow_Up.

[0028] When the Pdelay_Req is to be transmitted, the L2 protocol processing unit 120 transmits a transmission instruction for the Pdelay_Req to the communication units 110_1 to 110_n. As a result, the communication units 110_1 to 110_n transmit the Pdelay_Req to the GM 200.

[0029] The functions of the number determining unit 130, the calculating unit 140, the counter unit 150, the abnormality determining unit 160, the synchronization determining unit 170, and the managing unit 180 will be described in detail later.

[0030] Next, the process executed by the relay device 100 will be described with reference to a flowchart. FIG. 5 is a flowchart (part 1) illustrating an example of processing executed by the relay device according to the first embodiment. (Step S11) The number determining unit 130 receives the reception time included in Pdelay_Res and the transmission time included in Pdelay_Res_Follow_Up. (Step S12) The count determination unit 130 determines whether Pdelay_Res and Pdelay_Res_Follow_Up have been received for the first time. If it is the first time, the process proceeds to step S13. If it is the second or more time, the process proceeds to step S14.

[0031] (Step S13) Management unit 180 synchronizes the management time, which is the time managed by relay device 100, with the reception time included in Pdelay_Res. Note that this management time is stored in management unit 180. Then, the process ends. (Step S14) The calculation unit 140 uses the reception time and management time included in Pdelay_Res to calculate a jump width indicating the interval between the reception time and the management time. The jump width may also be considered as a value indicating how much the management time is shifted from the reception time. Specifically, the calculation unit 140 calculates the jump width using equation (4).

[0032]

number

[0033] (Step S15) The counter section 150 increments the counter value corresponding to the calculated jump width. Here, the management unit 180 stores relationship information. The relationship information is information indicating a plurality of jump widths corresponding to a plurality of counter values. For example, the relationship information indicates a counter value corresponding to a jump width of "8 ns", a counter value corresponding to a jump width of "0 ns", a counter value corresponding to a jump width of "-8 ns", etc. The initial value of the counter value is 0. For example, if the calculated jump width is 8 ns, the counter unit 150 adds 1 to the counter value corresponding to 8 ns. In this way, the counter value corresponding to the calculated jump width is counted up.

[0034] (Step S16) The calculation unit 140 uses the relationship information to calculate the difference between the calculated jump width and the jump width with the largest counter value. In particular, the calculation unit 140 uses the relationship information to identify the jump width with the largest counter value from among multiple counter values. The calculation unit 140 calculates the difference between the calculated jump width and the jump width with the largest counter value. For example, if the jump width with the largest counter value is 0 ns, the difference is calculated as shown in equation (5). Note that the difference is expressed as an absolute value.

[0035]

number

[0036] Here, the process performed in step S16 is also referred to as a first calculation process.

[0037] (Step S17) The calculation unit 140 calculates the variance of the jump width using the relationship information. In detail, the calculation unit 140 calculates the variance of the jump width using Equation (6). 2 is the variance. n is the total number of data. x i is the counter value. μ is the mean value.

[0038]

number

[0039] In this way, the calculation unit 140 performs the calculation process of the variance using the relationship information. The calculation unit 140 calculates the moving average value of the variance using equation (7). n is the moving average calculated based on the nth variance. n ^2 is the variance of the jump width counted up for the nth time. S n+100 ^2 is the variance of the jump width counted up at the n+100th time.

[0040]

number

[0041] In this way, the calculation unit 140 performs the calculation process of the moving average value of the variance. The calculation unit 140 calculates the rate of change of the moving average value using equation (8).

[0042]

number

[0043] In this way, the calculation unit 140 performs the calculation process of the rate of change of the moving average value. Here, the process performed in step S17 is also referred to as the second calculation process. In the above, the case where the calculation unit 140 performs the first calculation process and the second calculation process has been described. The calculation unit 140 may perform either the first calculation process or the second calculation process.

[0044] FIG. 6 is a flowchart (part 2) illustrating an example of processing executed by the relay device according to the first embodiment. (Step S21) The abnormality determination unit 160 determines whether the difference calculated in step S16 or the rate of change calculated in step S17 is equal to or greater than a preset threshold. If the difference or rate of change is equal to or greater than the threshold, the process proceeds to step S22. If the difference or rate of change is less than the threshold, the abnormality determination unit 160 determines that the reception time received in step S11 is normal. Then, the process proceeds to step S24.

[0045] (Step S22) The abnormality determination unit 160 determines whether the total value of the multiple counter values ​​indicated by the relationship information is equal to or greater than a preset threshold value.

[0046] If the total value is equal to or greater than the threshold, it means that multiple Pdelay_Res were received before the Pdelay_Res containing the reception time received in step S11, multiple jump widths were calculated based on the reception times contained in the multiple Pdelay_Res, and the counter values ​​corresponding to the multiple jump widths were counted up. Simply put, this means that the flowcharts in Figures 5 and 6 were performed multiple times before the Pdelay_Res containing the reception time received in step S11 was received.

[0047] If the total value is less than the threshold value, the fluctuation in the rate of change is large. If the fluctuation in the rate of change is large, the abnormality determination will be erroneous. For this reason, step S22 is performed. The determination in step S22 may also be expressed as follows: The abnormality determination unit 160 determines whether or not sufficient time has passed to detect an abnormality. If sufficient time has passed, it means that the total value is equal to or greater than the threshold value. If sufficient time has not passed, it means that the total value is less than the threshold value.

[0048] If the total value is equal to or greater than the threshold, the process proceeds to step S23. If the total value is less than the threshold, the abnormality determination unit 160 determines that the reception time received in step S11 is normal. Then, the process proceeds to step S24.

[0049] (Step S23) The abnormality determination unit 160 determines that the reception time received in step S11 is abnormal.

[0050] Here, the abnormality determination will be explained using a graph. Fig. 7 is a diagram showing an example of abnormality determination according to the first embodiment. The vertical axis of Fig. 7 represents the counter value, and the horizontal axis of Fig. 7 represents the jump width.

[0051] FIG. 7 shows the jump width calculated this time. That is, the jump width calculated this time is the jump width calculated in step S14. FIG. 7 also shows that the maximum jump width of the counter value is 0 ns. The difference is calculated using equation (5). If the difference is equal to or greater than the threshold, the abnormality determination unit 160 determines that the reception time, which is the basis of the jump width calculated this time, is abnormal. In this way, the abnormality determination unit 160 determines that the reception time is abnormal in a case such as that shown in FIG. 7. Note that the threshold may be set to the time of the jump width that is considered to be abnormal. Also, the threshold may be set to the probability that the jump width is considered to be normal.

[0052] Next, an example will be given in which the counter value gradually changes with the maximum jump width. Fig. 8 is a diagram showing an example of changes in jump width according to the first embodiment. The vertical axis of Fig. 8 represents the counter value, and the horizontal axis of Fig. 8 represents the jump width.

[0053] Graph 401 is a graph showing that the maximum jump in counter value is 0 ns, in other words, graph 401 is a graph showing that the median value is 0 ns. Graph 402 shows that the median is 100 ns. Graph 402 shows a state where the median is shifted by 100 ns. Note that the total number of counter values ​​in graphs 401 and 402 is different. Graph 403 shows a state in which the median value of graph 402 is shifted further to the right. Note that the total numbers of counter values ​​in graphs 402 and 403 are different. Graph 404 shows graphs 401 to 403 expressed in one graph.

[0054] In this way, the median value may gradually shift over time. In other words, the jumps based on the reception times received by relay device 100 may change over time. If graph 401 is a normal graph, reception times based on jumps that are far from the median value of graph 401 can also be considered abnormal reception times. Here, the rate of change is calculated to determine how far a reception time based on a jump from the median value of graph 401 is abnormal.

[0055] Next, an example of a graph of the rate of change will be shown. Fig. 9 is a diagram showing an example of a graph of the rate of change in the first embodiment. The left vertical axis in Fig. 9 represents the moving average value of the variance. The right vertical axis in Fig. 9 represents the rate of change. The horizontal axis in Fig. 9 represents time. If the rate of change is equal to or greater than the threshold value, the abnormality determination unit 160 determines that the reception time, which is the basis of the currently calculated jump width, is abnormal.

[0056] In the above, it was explained that if the total value of the counter values ​​is less than the threshold value in step S22, the fluctuation in the rate of change is large. In other words, it was explained that if not enough time has passed, the fluctuation in the rate of change is large. As shown in FIG. 9, if not enough time has passed, the fluctuation in the rate of change is large. Therefore, if not enough time has passed, the rate of change may exceed the threshold value. If the fluctuation in the rate of change is large, an abnormality is determined. In other words, an erroneous determination is made. Therefore, step S22 is performed.

[0057] Returning to FIG. 6, the flowchart will be described. (Step S24) The synchronization determination unit 170 determines whether the counter value counted up in step S15 (i.e., the counter value corresponding to the jump width calculated in step S14) is the largest among the multiple counter values ​​indicated by the relationship information and is determined to be normal. If the condition is met, the process proceeds to step S25. If the condition is not met, the process proceeds to step S27.

[0058] The process will be explained in detail. The synchronization determination unit 170 uses the relationship information to identify the maximum value among the multiple counter values. The synchronization determination unit 170 determines whether the jump width corresponding to the maximum counter value is the same as the jump width calculated in step S14. If the jump widths are the same and normality is determined, the synchronization determination unit 170 determines that the condition is met.

[0059] (Step S25) The management unit 180 synchronizes the management time managed by the management unit 180 with the reception time received in step S11. (Step S26) The management unit 180 translates all counter values ​​by the jump width calculated in step S14. In particular, the management unit 180 adds or subtracts the jump width calculated in step S14 to the multiple jump widths indicated by the relationship information. For example, if the jump width calculated in step S14 is a negative value, the management unit 180 adds the jump width calculated in step S14 to the multiple jump widths indicated by the relationship information. If the jump width calculated in step S14 is a positive value, the management unit 180 subtracts the jump width calculated in step S14 from the multiple jump widths indicated by the relationship information. This translates all counter values. After translation, the process ends.

[0060] (Step S27) The management unit 180 synchronizes the management time using time synchronization based on gPTP.

[0061] Next, the process executed by the relay device 100 will be described using a specific example. 10A to 10D are diagrams showing a specific example (part 1) of the process executed by the relay device according to the embodiment 1. It is assumed that the relay device 100 has received the second Pdelay_Res.

[0062] The calculation unit 140 calculates a jump width of "8 ns" using the reception time included in Pdelay_Res (hereinafter referred to as the second reception time) and the management time managed by the management unit 180 (step S14). The counter unit 150 increments the counter value corresponding to the jump width of "8 ns" (step S15). Fig. 10(A) shows the state after the counter value corresponding to the jump width of "8 ns" has been incremented.

[0063] The calculation unit 140 calculates the difference "0" between the jump width "8 ns" and the jump width "8 ns" with the maximum counter value (step S16). The abnormality determination unit 160 determines that the difference "0" is less than the threshold value (No in step S21). The synchronization determination unit 170 determines that the counter value corresponding to the jump width "8 ns" is the maximum and has been determined to be normal (Yes in step S24). The management unit 180 synchronizes the management time with the second reception time (step S25). The management unit 180 translates all counter values ​​by the jump width "8 ns" (step S26). Figure 10(B) shows the state after the translation has been performed.

[0064] The number of times determination unit 130 receives the reception time included in Pdelay_Res (hereinafter referred to as the third reception time) (step S11). The calculation unit 140 calculates a jump width of "-8 ns" using the third reception time and the management time (step S14). The counter unit 150 increments the counter value corresponding to the jump width of "-8 ns" (step S15). FIG. 10(C) shows the state after the counter value corresponding to the jump width of "-8 ns" has been incremented.

[0065] The calculation unit 140 calculates the difference "0" between the jump width "-8 ns" and the maximum jump width "-8 ns" of the counter value (step S16). Alternatively, the calculation unit 140 may calculate the difference between the jump width "-8 ns" and the maximum jump width "0 ns" of the counter value. The abnormality determination unit 160 determines that the difference "0" is less than the threshold value (No in step S21). The synchronization determination unit 170 determines that the counter value corresponding to the jump width "-8 ns" is the maximum and has been determined to be normal (Yes in step S24). The management unit 180 synchronizes the management time with the third reception time (step S25). The management unit 180 translates all counter values ​​by the jump width "8 ns" (step S26). FIG. 10(D) shows the state after the translation has been performed.

[0066] 11A to 11C are diagrams illustrating a specific example (part 2) of the process executed by the relay device according to the first embodiment. The count determination unit 130 receives the reception time included in Pdelay_Res (hereinafter referred to as the fourth reception time) (step S11). The calculation unit 140 calculates a jump width of "8 ns" using the fourth reception time and the management time (step S14). The counter unit 150 increments the counter value corresponding to the jump width of "8 ns" (step S15). FIG. 11(A) shows the state after the counter value corresponding to the jump width of "8 ns" has been incremented.

[0067] The calculation unit 140 calculates the difference "0" between the jump width "8 ns" and the jump width "8 ns" with the maximum counter value (step S16). The abnormality determination unit 160 determines that the difference "0" is less than the threshold value (No in step S21). The synchronization determination unit 170 determines that the counter value corresponding to the jump width "8 ns" is the maximum and has been determined to be normal (Yes in step S24). The management unit 180 synchronizes the management time with the fourth reception time (step S25). The management unit 180 translates all counter values ​​by the jump width "8 ns" (step S26). FIG. 11(B) shows the state after the translation has been performed.

[0068] The count determination unit 130 receives the reception time included in Pdelay_Res (hereinafter referred to as the fifth reception time) (step S11). The calculation unit 140 calculates a jump width of "-8 ns" using the fifth reception time and the management time (step S14). The counter unit 150 increments the counter value corresponding to the jump width of "-8 ns" (step S15). FIG. 11(C) shows the state after the counter value corresponding to the jump width of "-8 ns" has been incremented.

[0069] The calculation unit 140 calculates the difference "8" between the jump width "-8 ns" and the maximum jump width "0 ns" of the counter value (step S16). The abnormality determination unit 160 determines that the difference "8" is less than the threshold value (No in step S21). The synchronization determination unit 170 determines that the counter value corresponding to the jump width "-8 ns" is not the maximum (No in step S24). The management unit 180 synchronizes the management time using time synchronization based on gPTP (step S27).

[0070] According to the first embodiment, if the difference calculated in step S16 or the rate of change calculated in step S17 is equal to or greater than a threshold, and the sum of the counter values ​​indicated by the relationship information is equal to or greater than a threshold, the relay device 100 determines that the reception time is abnormal. In this way, the relay device 100 can detect an abnormal reception time.

[0071] Furthermore, when the counted-up counter value is at its maximum, the relay device 100 performs synchronization using the reception time. The reason why the relay device 100 performs such processing will be explained.

[0072] Fig. 12 is a diagram showing an example of synchronization error according to the first embodiment. The vertical axis in Fig. 12 represents probability, and the horizontal axis in Fig. 12 represents synchronization error.

[0073] When a communication system is operating normally, the probability distribution of synchronization errors is generally a normal distribution. The error factors that cause synchronization errors are measurement errors. For example, one type of measurement error is time stamp embossing error. A device with a time stamping error of 8 ns will have a positive error of up to 7.9999...ns. In addition, the propagation delay and frame residence time measured by the device will have a negative error. The probability distribution of synchronization errors obtained by taking into account the time stamping error, propagation delay, and frame residence time is considered to be a normal distribution.

[0074] The following explanation will be given with reference to Figure 12. The difference between the reception time and the management time is the same as the synchronization error. In other words, the jump width and the synchronization error are the same. If the counter value is treated like a probability, the relationship between the jump width and the counter value may be normally distributed, as shown in Figure 12. In order to derive this normal distribution, it is necessary that the total value of the multiple counter values ​​indicated by the relationship information is equal to or greater than a threshold. If the relationship between the jump width and the counter value is normally distributed, it can be said that the communication system is normal.

[0075] As shown in FIG. 12, the probability corresponding to the smallest synchronization error (i.e., the synchronization error at 0 ns) is the highest. If the relationship between the jump width and the counter value is normally distributed as shown in FIG. 12, the jump width corresponding to the largest counter value can be considered to be the jump width when the synchronization error is smallest. This idea is utilized. When the counted-up counter value is the largest among the counter values, the received reception time can be considered to be the time with the smallest synchronization error. Therefore, when the counted-up counter value is the largest, the repeater device 100 performs synchronization using the received reception time. This allows the repeater device 100 to perform synchronization with high accuracy.

[0076] Embodiment 2 Next, a description will be given of embodiment 2. In embodiment 2, differences from embodiment 1 will be mainly described. Furthermore, in embodiment 2, description of matters common to embodiment 1 will be omitted.

[0077] Fig. 13 is a block diagram showing the functions of a relay device according to the second embodiment. The components in Fig. 13 that are the same as those in Fig. 4 are assigned the same reference numerals as those in Fig. 4. The relay device 100a includes a synchronization determination unit 170a. The function of the synchronization determination unit 170a will be described in detail later.

[0078] Next, the process executed by the relay device 100a will be described with reference to a flowchart. Fig. 14 is a flowchart showing an example of processing executed by the relay device of embodiment 2. The processing in Fig. 14 differs from the processing in Fig. 6 in that steps S23a and S24a are executed. Therefore, steps S23a and S24a will be explained in Fig. 14. Explanation of processing other than steps S23a and S24a will be omitted.

[0079] (Step S23a) The synchronization determination unit 170a determines whether the total value of the multiple counter values ​​indicated by the relationship information is equal to or greater than a preset threshold. If the total value is equal to or greater than the threshold, the process proceeds to step S24a. If the total value is less than the threshold, the process ends.

[0080] (Step S24a) The synchronization determination unit 170a determines whether the jump width corresponding to the counter value counted up in step S15 is within a predetermined range centered on the jump width of the maximum value among the multiple counter values ​​indicated by the relationship information, and whether it is determined to be normal.

[0081] For example, if the jump width of the maximum value among the multiple counter values ​​indicated by the relationship information is 0 ns, the synchronization determination unit 170a determines whether the jump width corresponding to the counted-up counter value is included in the range of ±10 ns centered around 0 ns and is determined to be normal. If the condition is met, the process proceeds to step S25, otherwise the process proceeds to step S27.

[0082] In the first embodiment, synchronization was performed when the counted-up counter value was the maximum. That is, step S25 was performed. In the second embodiment, the synchronization conditions are relaxed compared to the first embodiment. However, a condition is imposed that the jump width corresponding to the counted-up counter value is included within a range centered on the jump width of the maximum value. Therefore, even if synchronization is performed when this condition is met, the accuracy of the synchronization does not decrease significantly. Therefore, by performing the above process, the relay device 100a can perform synchronization with high accuracy.

[0083] The features of the above-described embodiments can be combined with each other as appropriate. [Explanation of symbols]

[0084] 100, 100_1 to 100_4, 100a relay device, 101 processor, 102 volatile storage device, 103 non-volatile storage device, 110_1 to 110_n communication unit, 120 L2 protocol processing unit, 130 number determination unit, 140 calculation unit, 150 counter unit, 160 abnormality determination unit, 170, 170a synchronization determination unit, 180 management unit, 200 GM, 300, 300_1 to 300_4 terminal device, 401 graph, 402 graph, 403 graph, 404 graph.

Claims

1. A relay device that manages management time, a communication unit that receives a frame including a time transmitted from a time source; a calculation unit that calculates a jump width indicating an interval between the reception time and the management time using the reception time, which is the time included in the frame, and the management time; a management unit that stores relationship information indicating a plurality of jump widths corresponding to a plurality of counter values, the total value of which is equal to or greater than a predetermined threshold, and the management time; a counter unit that increments a counter value corresponding to the jump width calculated using the reception time; an abnormality determination unit that determines an abnormality in the reception time; and the calculation unit performs a first calculation process using the relationship information to calculate a difference between the jump width calculated using the reception time and the jump width with the largest counter value, or a second calculation process including a calculation process of a variance using the relationship information, a calculation process of a moving average value of the variance, and a calculation process of a rate of change of the moving average value; the abnormality determination unit determines that the reception time is abnormal when the difference or the rate of change is equal to or greater than a preset threshold value; Relay device.

2. the management unit synchronizes the management time with the reception time when the counter value corresponding to the jump width calculated using the reception time is maximum and is determined to be normal. The relay device according to claim 1 .

3. the management unit synchronizes the management time with the reception time when the jump width calculated using the reception time is included in a predetermined range centered on the jump width of the maximum value among the plurality of counter values ​​indicated by the relationship information and when the management unit determines that the reception time is normal. The relay device according to claim 1 .

4. When the management unit synchronizes the management times, the management unit adds or subtracts the jump width calculated using the reception times to or from the plurality of jump widths indicated by the relationship information. The relay device according to claim 2 or 3.

5. A program that causes a processor to function as the relay device according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Wireless system, wireless device, and computer program

    JP2005351634A

  • Communication device

    JP2018201110A

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

    WO2022009373A1