JP2021076433A - Clock adjustment device, program, and clock adjustment method - Google Patents
Clock adjustment device, program, and clock adjustment method Download PDFInfo
- Publication number
- JP2021076433A JP2021076433A JP2019202100A JP2019202100A JP2021076433A JP 2021076433 A JP2021076433 A JP 2021076433A JP 2019202100 A JP2019202100 A JP 2019202100A JP 2019202100 A JP2019202100 A JP 2019202100A JP 2021076433 A JP2021076433 A JP 2021076433A
- Authority
- JP
- Japan
- Prior art keywords
- time
- clock
- time difference
- reference clock
- rate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims description 14
- 230000008030 elimination Effects 0.000 claims description 26
- 238000003379 elimination reaction Methods 0.000 claims description 26
- 238000004891 communication Methods 0.000 claims description 10
- 238000012545 processing Methods 0.000 description 11
- 230000001360 synchronised effect Effects 0.000 description 8
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 3
- 230000003247 decreasing effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000001052 transient effect Effects 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Landscapes
- Electric Clocks (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
本発明は、クロック調整装置、プログラム、及びクロック調整方法に係り、特に、自装置のクロックを調整するクロック調整装置、プログラム、及びクロック調整方法に関する。 The present invention relates to a clock adjusting device, a program, and a clock adjusting method, and more particularly to a clock adjusting device, a program, and a clock adjusting method for adjusting the clock of the own device.
従来より、参照クロックからの時刻情報を取得して自装置の精密なクロックを合わせ、配下の装置に対して時刻を配信するタイムサーバがある。 Conventionally, there is a time server that acquires time information from a reference clock, adjusts the precise clock of its own device, and distributes the time to its subordinate devices.
タイムサーバは定期的に参照クロックから時刻情報を受信し、自クロックと参照クロックの時差を確認する。通常は時差に基づいた計算によって、自クロックの現在歩度Fを決定する。また、この計算は、参照クロックとの歩度を合わせる部分と時差を解消する部分の加算によって求められる。 The time server periodically receives time information from the reference clock and checks the time difference between its own clock and the reference clock. Normally, the current rate F of the own clock is determined by calculation based on the time difference. Further, this calculation is obtained by adding a part that matches the step with the reference clock and a part that eliminates the time difference.
また、ネットワーク上のマスタ機器との間で時刻情報を高精度に同期させる時刻制御装置が知られている(特許文献1)。この時刻制御装置は、PTP(プレシジョン・タイム・プロトコル)スレーブに適用される。 Further, a time control device that synchronizes time information with a master device on a network with high accuracy is known (Patent Document 1). This time controller is applied to PTP (Precision Time Protocol) slaves.
また、起動から目標水準の同期精度に達するまでの時間の短縮を図る同期装置が知られている(特許文献2)。 Further, there is known a synchronization device that shortens the time from activation to reaching the target level of synchronization accuracy (Patent Document 2).
一般的なPTPスレーブはPTPマスタと時刻同期するに際して、offsetFromMaster値が0となるようにスレーブクロックの値や値の加算速度(歩度)を調整する。 When synchronizing the time with the PTP master, a general PTP slave adjusts the slave clock value and the value addition speed (rate) so that the offsetFrommaster value becomes 0.
offsetFromMaster値は、PTPスレーブとPTPマスタの各々の内部クロックの時刻差を表している。これが0となるように調整することにより、時刻を同期させる。このとき、数秒〜数十秒で、offsetFromMaster値が、例えば1500ns程度から10ns以下程度にまで収束する。しかし、単純にこの値が10ns以下になったから「時刻同期している」と判断してよいわけではない。その理由を以下に説明する。 The offsetFromMaster value represents the time difference between the internal clocks of the PTP slave and the PTP master. By adjusting this to 0, the time is synchronized. At this time, the offsetFromMaster value converges from, for example, about 1500 ns to about 10 ns or less in several seconds to several tens of seconds. However, since this value is simply 10 ns or less, it cannot be judged that the time is synchronized. The reason will be explained below.
まずは一般的な時刻同期のフレームワークについて説明する。offsetFromMaster値を0に維持するための歩度調整には、一般的には図8のようなPID制御器を用いた論理的なフィードバック回路が利用される。この歩度調整では、PID制御器を用いているため、offsetFromMaster値を0に収束させるまでの挙動が限定的ではない。例えば収束までの曲線が、図9のように様々な曲線となる。 First, a general time synchronization framework will be described. A logical feedback circuit using a PID controller as shown in FIG. 8 is generally used for step adjustment for maintaining the offsetFrommaster value at 0. Since the PID controller is used in this rate adjustment, the behavior until the offsetFrommaster value is converged to 0 is not limited. For example, the curve until convergence becomes various curves as shown in FIG.
曲線Aに対してであれば、offsetFromMaster値が10ns以下になれば「時刻同期している」と判断しても良いが、曲線BやCでは、10ns以下になったか否かの単純判定では“本当に収束”するまでに「時刻同期している」「時刻同期していない」との判定結果を複数回行き来することになる。 For curve A, if the offsetFromMaster value is 10 ns or less, it may be judged that "time synchronization", but for curves B and C, a simple judgment as to whether or not it is 10 ns or less is ". By the time it really converges, the judgment results of "time synchronized" and "time not synchronized" will be exchanged multiple times.
このような“時刻同期判定”外れを防ぐために、例えば、offsetFromMaster値が10ns以内に入ったときに、しばらくの時間(例えば30秒とか)10ns以内に居続けることを確認してから、時刻同期したと判断することが考えられるが、実際にはまだ過渡応答の段階であり定常状態でない可能性がある。また、その過渡応答中なのか定常状態なのかの判断もこの方法では不可能である。 In order to prevent such "time synchronization judgment" deviation, for example, when the offsetFrommaster value is within 10 ns, it is confirmed that the user stays within 10 ns for a while (for example, 30 seconds), and then the time is synchronized. However, in reality, it is still in the transient response stage and may not be in a steady state. Further, it is impossible to judge whether the transient response is in progress or the steady state by this method.
本発明は、上記問題点を解決するために成されたものであり、参照クロックとの時刻同期を精度よく判定することができるクロック調整装置、プログラム、及びクロック調整方法を提供することを目的とする。 The present invention has been made to solve the above problems, and an object of the present invention is to provide a clock adjusting device, a program, and a clock adjusting method capable of accurately determining time synchronization with a reference clock. To do.
上記目的を達成するために、本発明に係るクロック調整装置は、参照クロックの時刻情報を受信する通信部と、現在の歩度に基づいて決定される時刻情報を出力するクロック部と、前記クロック部が出力する時刻情報と、前記参照クロックの時刻情報との現在の時差に基づいて、前記参照クロックとの時差を解消するための時差解消歩度と、前記参照クロックの速度に合わせるための固有歩度とを計算し、前記時差解消歩度と前記固有歩度とに基づいて、前記クロック部に対する現在の歩度を決定して、前記クロック部の歩度を更新するクロック調整部と、前記現在の時差と理論時差との差分に基づいて、前記参照クロックの歩度と前記クロック部の歩度とが一致しているか否かを判定する時刻同期判定部とを含み、前記理論時差は、前回計算した固有歩度が前記参照クロックの歩度と一致していると仮定して、前回の時差と前回計算した前記時差解消歩度と前回計算した固有歩度とを用いて計算されるクロック調整装置であるものとする。 In order to achieve the above object, the clock adjusting device according to the present invention includes a communication unit that receives time information of a reference clock, a clock unit that outputs time information determined based on the current rate, and the clock unit. Based on the current time difference between the time information output by the reference clock and the time information of the reference clock, the time difference elimination step for eliminating the time difference from the reference clock and the intrinsic step for adjusting to the speed of the reference clock. Is calculated, the current rate with respect to the clock unit is determined based on the time difference elimination rate and the inherent rate, and the clock adjustment unit that updates the rate of the clock unit, and the current time difference and the theoretical time difference. The theoretical time difference includes a time synchronization determination unit that determines whether or not the rate of the reference clock and the rate of the clock unit match based on the difference of the reference clock. It is assumed that the clock adjusting device is calculated by using the previous time difference, the previously calculated time difference elimination step, and the previously calculated natural rate.
この発明によれば、前回計算した固有歩度が参照クロックと一致していることを仮定した上で、前回の時差と、前回計算した時差解消歩度と、前回計算した固有歩度を用いて現在の理論時差を計算する。そして、計算した理論時差と現在の時差との差分に基づいて、参照クロックの歩度とクロック部の歩度とが一致しているか否かを判定することにより、参照クロックとの時刻同期を精度よく判定することができる。 According to the present invention, assuming that the eigenstep calculated last time matches the reference clock, the current theory uses the time difference of the previous time, the time difference elimination step calculated last time, and the eigenstep calculated last time. Calculate the time difference. Then, based on the difference between the calculated theoretical time difference and the current time difference, it is determined whether or not the rate of the reference clock and the rate of the clock section match, thereby accurately determining the time synchronization with the reference clock. can do.
ここで、歩度とは、クロックの進み又は遅れの度合いであり、例えば、1秒あたりに速くする又は遅くする長さ(ナノ秒)である。また、参照クロックの速度とは、参照クロックでの1秒の長さ(ナノ秒)である。 Here, the step is the degree of advancement or lag of the clock, for example, the length (nanoseconds) of increasing or decreasing the speed per second. The speed of the reference clock is the length of 1 second (nanoseconds) of the reference clock.
また、前記クロック調整装置において、前記時刻同期判定部は、更に、現在の時差の絶対値が閾値未満である場合に、前記参照クロックと時刻が一致していると判定することができる。 Further, in the clock adjusting device, the time synchronization determination unit can further determine that the reference clock and the time match when the absolute value of the current time difference is less than the threshold value.
また、前記クロック調整装置において、前記時刻同期判定部は、前回得られた時差と、前回時差が得られた時点と今回時差を算出した時点との時間間隔と、前回得られた時差に基づいて計算された前記時差解消歩度及び前記固有歩度とに基づいて、前記理論時差を計算することができる。 Further, in the clock adjusting device, the time synchronization determination unit is based on the time difference obtained last time, the time interval between the time when the time difference was obtained last time and the time when the time difference was calculated this time, and the time difference obtained last time. The theoretical time difference can be calculated based on the calculated time difference elimination step and the inherent step.
また、本発明のプログラムは、コンピュータを、本発明のクロック調整装置の各部として機能させるためのプログラムである。 Further, the program of the present invention is a program for causing the computer to function as each part of the clock adjusting device of the present invention.
また、本発明のクロック調整方法は、通信部が、参照クロックの時刻情報を受信し、クロック部が、現在の歩度に基づいて決定される時刻情報を出力し、クロック調整部が、前記クロック部が出力する時刻情報と、前記参照クロックの時刻情報との現在の時差に基づいて、前記参照クロックとの時差を解消するための時差解消歩度と、前記参照クロックの速度に合わせるための固有歩度とを計算し、前記時差解消歩度と前記固有歩度とに基づいて、前記クロック部に対する現在の歩度を決定して、前記クロック部の歩度を更新し、時刻同期判定部が、前記現在の時差と理論時差との差分に基づいて、前記参照クロックの歩度と前記クロック部の歩度とが一致しているか否かを判定することを含み、前記理論時差は、前回計算した固有歩度が前記参照クロックの歩度と一致していると仮定して、前回の時差と前回計算した前記時差解消歩度と前回計算した固有歩度とを用いて計算されるクロック調整方法であるものとする。 Further, in the clock adjustment method of the present invention, the communication unit receives the time information of the reference clock, the clock unit outputs the time information determined based on the current rate, and the clock adjustment unit outputs the time information determined based on the current rate. Based on the current time difference between the time information output by the reference clock and the time information of the reference clock, the time difference elimination step for eliminating the time difference from the reference clock and the unique step for adjusting to the speed of the reference clock. Is calculated, the current step with respect to the clock section is determined based on the time difference elimination step and the inherent step, the step of the clock section is updated, and the time synchronization determination section determines the current time difference and the theory. The theoretical time difference includes determining whether or not the step of the reference clock and the step of the clock section match based on the difference from the time difference, and the theoretical time difference is the step of the reference clock whose inherent step calculated last time is the step of the reference clock. It is assumed that the clock adjustment method is calculated by using the previous time difference, the previously calculated time difference elimination step, and the previously calculated natural step.
本発明によれば、参照クロックとの時刻同期を精度よく判定することができる。 According to the present invention, the time synchronization with the reference clock can be accurately determined.
以下、図面を参照して本発明の実施の形態を詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
<本発明の実施の形態の概要>
まず、本発明の実施の形態の概要を説明する。
<Outline of Embodiment of the present invention>
First, an outline of an embodiment of the present invention will be described.
本発明の実施の形態では、時差が10ns以下であるか否かという判定だけでは足りない収束判定をより厳密に行い、上記図9の曲線BやCでも“本当に収束”した時に「時刻同期している」と判定する。以下に判定原理について説明する。 In the embodiment of the present invention, the convergence test, which is not enough to determine whether the time difference is 10 ns or less, is performed more strictly, and when the curves B and C in FIG. 9 are also "really converged", "time synchronization" is performed. Is determined. " The judgment principle will be described below.
時刻同期のためには時刻と歩度の2つをPTPマスタと合わせる必要がある。時刻だけ合っていても、歩度が違えばPTPマスタとの時差確認の度に0でない時差が確認されてしまう。 For time synchronization, it is necessary to match the time and the rate with the PTP master. Even if only the time is correct, if the pace is different, a non-zero time difference will be confirmed each time the time difference is confirmed with the PTP master.
一方、歩度だけがあっていたとしても、PTPマスタとの時差が0でないならば、いつまで経っても時差が0になることはない。すなわち、時刻同期のためには、時刻と歩度の両方を合わせる必要がある。 On the other hand, even if there is only a rate, if the time difference from the PTP master is not 0, the time difference will never become 0. That is, for time synchronization, it is necessary to match both the time and the rate.
図1は、クロック調整方法を説明するための図である。本実施の形態では、時刻と歩度を合わせるためには、図1にあるようなPID制御器を用いる。このPID制御器により、PTPマスタとの歩度差(固有歩度、あるいは周波数drift値ともいう。単位は、ppb(parts per billion)である。)を計算しつつ時差を解消するための追加の歩度(時差解消歩度ともいう。単位は、ppbである。)も計算する。 FIG. 1 is a diagram for explaining a clock adjustment method. In the present embodiment, a PID controller as shown in FIG. 1 is used to match the time and the rate. With this PID controller, an additional step (also referred to as an intrinsic step or frequency drift value. The unit is ppb (parts per billion)) for eliminating the time difference from the PTP master is calculated. It is also called the time difference elimination rate. The unit is ppb).
この部分を数学的に述べると以下のようになる。 This part is mathematically described as follows.
なお、図1におけるr(ti)は、時刻ti(秒)におけるPTPマスタのクロックの示す時間(ナノ秒)である。y(ti)は、時刻ti(秒)におけるPTPスレーブのクロックの示す時間(ナノ秒)である。x(ti)は、時刻ti(秒)におけるPTPスレーブのクロックとPTPマスタのクロックの時差(ナノ秒)であり、x(ti)=r(ti)−y(ti)である。KP、KI、KDは、予め定められた係数である。f(ti)は、時刻ti(秒)におけるPID制御器の出力値である。 Incidentally, r (t i) in FIG. 1 is a time t i (in seconds) Time indicated by the PTP master clock in nanoseconds. y (t i) is the time t i (in seconds) Time indicated by the PTP slave clock in nanoseconds. x (t i) is the time t i of the PTP slave in seconds the clock and the PTP master clock time difference (ns), with x (t i) = r (t i) -y (t i) is there. K P , K I , and K D are predetermined coefficients. f (t i) is the output value of the PID controller at time t i (in seconds).
ここで、 here,
と置くと、 And put
と書ける。P(ti)は時差解消歩度である。I(ti)は固有歩度である。 Can be written. P (t i) is the time difference eliminate pace. I (t i) it is a unique pace.
さて、ノイズ等がない理想的な環境を想定する。ここで、すべてのti(i=0,1,2,…)に対して、もしもPTPスレーブの歩度を(1+I(ti)/109)倍したものが、PTPマスタの歩度と一致しているならば、以下の式[数3]に示すPTPマスタとの理論時差x’(ti+1)は、ti+1時点での実時差x(ti+1)と一致しているはずである。 Now, assume an ideal environment without noise. Here, all the t i (i = 0,1,2, ... ) with respect to, those if that multiplied (1 + I (t i) / 10 9) the pace of the PTP slave, consistent with pace of PTP master if it is, the following equation theory difference x between PTP master shown in [expression 3] '(t i + 1 ) should match the real time difference x at t i + 1 time (t i + 1).
なお、109は、1秒の長さ=109ナノ秒であることを示す。 Incidentally, 109 indicates that the second is the length = 10 9 nsec.
このとき、理論上、オーバーシュートしないようにパラメータ設計をしている条件下においては、x(ti)とx’(ti+1)の符号が常に等しいと仮定でき、収束曲線も図2のような単調減少あるいは単調増加のグラフとなる。 In this case, theoretically, under the condition that the parameters designed not to overshoot, x (t i) and x 'can assume code and is always equal to (t i + 1), the convergence curves as in Figure 2 It becomes a graph of monotonically decreasing or monotonically increasing.
一方で、この逆が成立することを利用することが本実施形態に係る時刻同期判定のポイントである。 On the other hand, it is a point of the time synchronization determination according to the present embodiment to utilize the fact that the opposite is true.
ここで、理論時差と実時差が一致すれば、その時点での固有歩度(周波数drift値)はPTPマスタの歩度と等しい、という命題がある。 Here, if the theoretical time difference and the actual time difference match, there is a proposition that the natural rate (frequency drift value) at that time is equal to the rate of the PTP master.
具体的には、x’(ti)=x(ti)ならばPTPスレーブの歩度を(1+I(ti)/109)倍したものはPTPマスタの歩度と一致している、という命題がある。 Specifically, x '(t i) = x (t i) if PTP slave pace a (1 + I (t i) / 10 9) multiplied by those is consistent with pace of PTP master, proposition There is.
この命題は、以下のように証明される。 This proposition is proved as follows.
PID制御器の定義により、P(ti−1)は推定値でなく実測値から計算できることに注意する。したがって、ti−1時点の正しい固有歩度をF(ti−1)とすると式[数3]により、 Note that by definition of PID controller, P (ti -1 ) can be calculated from measured values rather than estimated values. Therefore, assuming that the correct intrinsic step at the time of ti-1 is F (ti-1 ), the equation [Equation 3] is used.
と記述できる。これをx’(ti)の定義式と比較して、結果的に
Can be described as. This was compared with the defining equation of x '(t i), resulting in
を得る。 To get.
以上により、x(t)の予測値と実測値が一致していれば、すわなち、理論収束曲線から実測値が外れなければ、PTPスレーブの固有歩度は正しいと言える。 From the above, if the predicted value of x (t) and the measured value match, that is, if the measured value does not deviate from the theoretical convergence curve, it can be said that the peculiar rate of the PTP slave is correct.
よって、上述した時刻同期の条件に照らし合わせると、ユーザー設定可能な2つの閾値をもって、以下のように時刻同期の判定が可能となる。 Therefore, in light of the above-mentioned time synchronization conditions, the time synchronization can be determined as follows with two user-settable threshold values.
定数a、b>0を用いて、 Using the constants a, b> 0,
であること(時刻判定)、及び (Time judgment), and
であること(歩度判定)の両条件を満足することを、時刻と歩度の両方が合っていることの判定条件にすることができる。また、歩度判定の条件のみを満足する時は周波数同期していると言える。 Satisfying both conditions of being (rate determination) can be a determination condition that both the time and the rate match. Further, when only the condition for determining the rate is satisfied, it can be said that the frequency is synchronized.
<本発明の実施の形態のシステム構成>
本発明の実施の形態に係るクロック調整システムの構成について説明する。図3に示すように、本発明の実施の形態に係るクロック調整システム100は、タイムサーバ10と、参照クロック発信装置16−1〜16−nと、クライアント端末18−1とを備えており、タイムサーバ10と、クライアント端末18−1とは、LAN(Local Area Network)等のネットワーク3を介して接続され、タイムサーバ10と参照クロック発信装置16−1〜16−nとは、ネットワーク3とは別のネットワークや専用通信(例えば、GNSS(Global Navigation Satellite System)やTel−JJY(電話回線による標準時提供))を介して接続されている。なお、タイムサーバ10が、クロック調整装置の一例である。
<System configuration of the embodiment of the present invention>
The configuration of the clock adjustment system according to the embodiment of the present invention will be described. As shown in FIG. 3, the
タイムサーバ10は、参照クロックの時刻情報を用いて、自装置のクロックを調整し、時刻情報を、クライアント端末18−1へ配信するサーバである。また、タイムサーバ10は、自装置のクロックを調整し、そのクロックの情報を用いて種々の信号を生成し、測定器18−2、無線装置18−3、映像機器18−4、及び信号受信器18−nに、生成した信号を配信する。例えば図3に示すように、測定器18−2に対して1PPSの位相信号、無線装置18−3に対して10MHzの周波数信号、映像機器18−4に対して、BB/LTC等のアナログ映像同期信号を生成して配信する。
The
参照クロック発信装置16−1〜16−nは、参照クロックの時刻情報を発信するサーバ装置である。参照クロック発信装置16−1〜16−nの具体的な態様についての説明は省略するが、参照クロック発信装置16−1〜16−nは、参照クロックを有し、参照クロックの時刻情報を、ネットワーク3とは別のネットワークや専用通信を介して配信することも可能である。 Reference clock transmission devices 16-1 to 16-n are server devices that transmit time information of the reference clock. Although the description of the specific embodiment of the reference clock transmitting device 16-1 to 16-n is omitted, the reference clock transmitting device 16-1 to 16-n has a reference clock and provides time information of the reference clock. It is also possible to distribute via a network different from the network 3 or a dedicated communication.
本実施の形態におけるタイムサーバ10は、CPUと、RAMと、後述する各種処理ルーチンを実行するためのプログラムや各種データを記憶したROMと、を含むコンピュータで構成することが出来る。このタイムサーバ10は、機能的には図4に示すように、通信部20と、信号生成・配信部21と、自システムクロック又はハードウエアクロック部22と、時差計算部24と、時刻同期判定部28と、自システムクロック制御部30とを備えている。
The
通信部20は、ネットワーク3とは別のネットワークや専用通信を介して、参照クロック発信装置16−1〜16−nから参照クロックの時刻情報を受信する。また、信号生成・配信部21は、ネットワーク3を介して、自システムクロック又はハードウエアクロック部22から出力された自クロックの時刻情報を、クライアント端末18−1へ送信する。また、信号生成・配信部21は、1PPSの位相信号を生成して測定器18−2に配信し、10MHzの周波数信号を生成して無線装置18−3に配信し、BB/LTC等のアナログ映像同期信号を生成して映像機器18−4に配信する。
The
自システムクロック又はハードウエアクロック部22は、現在の歩度に基づいて自クロックの時刻情報を決定して、時差計算部24及び信号生成・配信部21に出力する。なお、自システムクロック又はハードウエアクロック部22は、クロック部の一例である。
The own system clock or the
時差計算部24は、参照クロックの時刻情報を受信したときに、自クロックの時刻情報と、参照クロックの時刻情報との現在の時差を計算し、計算した現在の時差を自システムクロック制御部30に通知する。時差計算部24は、参照クロックの時刻情報を受信していない間は、現在の時差を計算しない。
When the time
自システムクロック制御部30は、自クロック調整部34を備えている。なお、自クロック調整部34が、クロック調整部の一例である。
The own system clock control unit 30 includes a own
自クロック調整部34は、時差計算部24によって現在の時差が通知された場合に、現在の時差に基づいて、参照クロックが自クロックに対して進んでいれば、自クロックの歩度を速め、遅れていれば自クロックの歩度を緩めるように、自クロックの歩度を更新する。
When the time
具体的には、現在の時差と、前回の時差と、前回との間隔とに基づいて、現在の時差を0に向かわせるように、参照クロックとの時差を解消するための時差解消歩度Pを計算すると共に、参照クロックと自クロックの歩度差を0に向かわせるように、参照クロックの速度に合わせるための固有歩度Iを計算する。そして、時差解消歩度P、及び固有歩度Iに基づいて、以下の式に示すように、自クロックの歩度を更新し、それを用いて自システムクロック又はハードウエアクロック部22は現在時刻y(ti)を計算する。
Specifically, based on the current time difference, the previous time difference, and the interval from the previous time, the time difference elimination step P for eliminating the time difference from the reference clock is set so that the current time difference is directed to 0. Along with the calculation, the intrinsic step I for matching the speed of the reference clock is calculated so that the step difference between the reference clock and the own clock is directed to 0. Then, based on the time difference elimination step P and the intrinsic step I, the step of the own clock is updated as shown in the following equation, and the own system clock or the
ただし、fの単位はppb(ns/s)であり、P、Iの単位もppb(ns/s)である。 However, the unit of f is ppb (ns / s), and the units of P and I are also ppb (ns / s).
時刻同期判定部28は、前回計算した固有歩度Iが参照クロックと一致していることを仮定した上で、前回の時差と、前回計算した時差解消歩度Pと、前回計算した固有歩度Iとを用いて現在の理論時差を計算する。
The time
具体的には、時刻同期判定部28は、前回得られた時差と、前回時差が得られた時点との間隔と、前回得られた時差に基づいて計算された時差解消歩度P及び固有歩度Iとに基づいて、上記式[数3]に従って、理論時差を計算する。
Specifically, the time
時刻同期判定部28は、理論時差と現在の時差との差分が、閾値b未満である場合には、参照クロックの歩度と一致していると判定し、理論時差と現在の時差との差分が、閾値b以上である場合には、参照クロックの歩度と一致していないと判定する。
When the difference between the theoretical time difference and the current time difference is less than the threshold value b, the time
また、時刻同期判定部28は、現在の時差の絶対値が閾値a未満である場合に、参照クロックと時刻が一致していると判定し、現在の時差の絶対値が閾値a以上である場合に、参照クロックと時刻が一致していないと判定する。
Further, the time
時刻同期判定部28は、判定結果を出力する。例えば、時刻同期判定の結果がユーザーに分かるように、CLI(Command−Line Interface)やGUI(Graphical User Interface)に表示したり、同期状態を示すLEDランプを点灯させたりする。また、非同期になった場合はSyslogやSNMP(Simple Network Management Protocol)などの手段を用いてユーザーに通知するようにしてもよい。
The time
<本発明の実施の形態の作用>
次に、本発明の実施の形態のタイムサーバ10による処理について図5〜図7を参照して説明する。タイムサーバ10が、参照クロック発信装置16−1〜16−nの何れかから参照クロックの時刻情報を受信し、自クロックの時刻情報と、参照クロックの時刻情報との現在の時差が計算されると、タイムサーバ10は、図5に示すクロック調整処理ルーチンを実行する。クロック調整処理ルーチンは、参照クロックの時刻情報を受信する度に実行される。
<Operation of the embodiment of the present invention>
Next, the processing by the
まず、ステップS100において、自クロック調整部34は、現在の自クロックの時刻情報と、時差計算部24によって計算された現在の時差とを取得する。
First, in step S100, the own
ステップS102では、自クロック調整部34は、現在の時差と、前回の時差と、前回との間隔とに基づいて、現在の時差を0に向かわせるように、参照クロックとの時差を解消するための時差解消歩度Pを計算すると共に、参照クロックと自クロックの歩度差を0に向かわせるように、参照クロックの速度に合わせるための固有歩度Iを計算する。
In step S102, the own
ステップS104において、自クロック調整部34は、上記ステップS100で取得した時刻情報及び現在の時差と、上記ステップS102で計算された時差解消歩度P及び固有歩度Iとを、メモリ(図示省略)に格納する。
In step S104, the own
そして、ステップS106において、自クロック調整部34は、時差解消歩度P、及び固有歩度Iに基づいて、自クロックの歩度を更新し、自システムクロック又はハードウエアクロック部22へ出力し、クロック調整処理ルーチンを終了する。
Then, in step S106, the self-
また、タイムサーバ10が、参照クロック発信装置16から参照クロックの時刻情報を受信し、自クロックの時刻情報と、参照クロックの時刻情報との現在の時差が計算されると、タイムサーバ10は、図6に示す時刻同期判定処理ルーチンを実行する。クロック調整処理ルーチンは、参照クロックの時刻情報を受信する度に実行される。
Further, when the
まず、ステップS110において、時刻同期判定部28は、現在の自クロックの時刻情報と、時差計算部24によって計算された現在の時差とを取得する。
First, in step S110, the time
そして、ステップS112において、時刻同期判定部28は、メモリに格納された、前回の自クロックの時刻情報と、前回の時差と、前回の時差解消歩度P及び固有歩度Iとを取得する。
Then, in step S112, the time
ステップS114において、時刻同期判定部28は、時刻同期判定処理を行う。
In step S114, the time
ステップS116において、時刻同期判定部28は、上記ステップS114の判定結果を出力し、時刻同期判定処理ルーチンを終了する。
In step S116, the time
このように、現在の時差から、例えば1秒後の時差を予測し記憶するのではなく、1秒前の時差から、予測値としての現在の時差x’(t)を計算し、実測値としての現在の時差x(t)と比較して、時刻同期判定を行うことができる。 In this way, instead of predicting and storing the time difference one second later, for example, from the current time difference, the current time difference x'(t) as a predicted value is calculated from the time difference one second ago and used as the measured value. The time synchronization determination can be performed by comparing with the current time difference x (t) of.
上記ステップS114は、図7に示す処理ルーチンにより実現される。 The step S114 is realized by the processing routine shown in FIG.
まず、ステップS120において、時刻同期判定部28は、前回得られた時差と、前回時差が得られた時点との間隔と、前回得られた時差に基づいて計算された時差解消歩度P及び固有歩度Iとに基づいて、上記式[数3]に従って、理論時差を計算する。
First, in step S120, the time
ステップS122では、時刻同期判定部28は、現在の時差の絶対値が閾値a未満であり、かつ、理論時差と現在の時差との差分の絶対値が、閾値b未満であるか否かを判定する。現在の時差の絶対値が閾値a未満であり、かつ、理論時差と現在の時差との差分の絶対値が、閾値b未満である場合には、参照クロックと時刻同期していると判定する。
In step S122, the time
一方、現在の時差の絶対値が閾値a以上であるか、又は、理論時差と現在の時差との差分の絶対値が、閾値b以上である場合には、ステップS124へ移行する。 On the other hand, if the absolute value of the current time difference is equal to or greater than the threshold value a, or if the absolute value of the difference between the theoretical time difference and the current time difference is equal to or greater than the threshold value b, the process proceeds to step S124.
ステップS124では、時刻同期判定部28は、理論時差と現在の時差との差分の絶対値が、閾値b未満であるか否かを判定する。理論時差と現在の時差との差分の絶対値が、閾値b未満である場合には、参照クロックと周波数同期している(歩度が合っている)と判定する。一方、理論時差と現在の時差との差分の絶対値が、閾値b以上である場合には、参照クロックと非同期であると判定する。
In step S124, the time
以上説明したように、本発明の実施の形態に係るタイムサーバによれば、前回計算した固有歩度が参照クロックと一致していることを仮定した上で、前回の時差と、前回計算した時差解消歩度と、前回計算した固有歩度を用いて現在の理論時差を計算する。そして、計算した理論時差と現在の時差との差分に基づいて、参照クロックの歩度とクロック部の歩度とが一致しているか否かを判定することにより、参照クロックとの時刻同期を精度よく判定することができる。 As described above, according to the time server according to the embodiment of the present invention, it is assumed that the inherent rate calculated last time matches the reference clock, and the time difference between the previous time and the time difference calculated last time are eliminated. The current theoretical time difference is calculated using the rate and the inherent rate calculated last time. Then, based on the difference between the calculated theoretical time difference and the current time difference, it is determined whether or not the rate of the reference clock and the rate of the clock section match, thereby accurately determining the time synchronization with the reference clock. can do.
なお、本発明は、上述した実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲内で様々な変形や応用が可能である。 The present invention is not limited to the above-described embodiment, and various modifications and applications are possible without departing from the gist of the present invention.
3 ネットワーク
10 タイムサーバ(クロック調整装置)
16 参照クロック発信装置
18 クライアント端末
20 通信部
21 信号生成・配信部
22 自システムクロック又はハードウエアクロック部(クロック部)
24 時差計算部
28 時刻同期判定部
30 自システムクロック制御部
34 自クロック調整部(クロック調整部)
100 クロック調整システム
3
16 Reference clock transmitter 18
24 Time
100 clock adjustment system
Claims (5)
現在の歩度に基づいて決定される時刻情報を出力するクロック部と、
前記クロック部が出力する時刻情報と、前記参照クロックの時刻情報との現在の時差に基づいて、前記参照クロックとの時差を解消するための時差解消歩度と、前記参照クロックの速度に合わせるための固有歩度とを計算し、前記時差解消歩度と前記固有歩度とに基づいて、前記クロック部に対する現在の歩度を決定して、前記クロック部の歩度を更新するクロック調整部と、
前記現在の時差と理論時差との差分に基づいて、前記参照クロックの歩度と前記クロック部の歩度とが一致しているか否かを判定する時刻同期判定部とを含み、
前記理論時差は、前回計算した固有歩度が前記参照クロックの歩度と一致していると仮定して、前回の時差と前回計算した前記時差解消歩度と前回計算した固有歩度とを用いて計算される
クロック調整装置。 The communication unit that receives the time information of the reference clock and
A clock section that outputs time information determined based on the current rate, and
Based on the current time difference between the time information output by the clock unit and the time information of the reference clock, the time difference elimination rate for eliminating the time difference with the reference clock and the speed of the reference clock are adjusted. A clock adjusting unit that calculates the unique rate, determines the current rate with respect to the clock unit based on the time difference elimination rate and the natural rate, and updates the rate of the clock unit.
A time synchronization determination unit for determining whether or not the rate of the reference clock and the rate of the clock unit match based on the difference between the current time difference and the theoretical time difference is included.
The theoretical time difference is calculated using the previous time difference, the previously calculated time difference elimination step, and the previously calculated natural step, assuming that the previously calculated natural step matches the step of the reference clock. Clock regulator.
クロック部が、現在の歩度に基づいて決定される時刻情報を出力し、
クロック調整部が、前記クロック部が出力する時刻情報と、前記参照クロックの時刻情報との現在の時差に基づいて、前記参照クロックとの時差を解消するための時差解消歩度と、前記参照クロックの速度に合わせるための固有歩度とを計算し、前記時差解消歩度と前記固有歩度とに基づいて、前記クロック部に対する現在の歩度を決定して、前記クロック部の歩度を更新し、
時刻同期判定部が、前記現在の時差と理論時差との差分に基づいて、前記参照クロックの歩度と前記クロック部の歩度とが一致しているか否かを判定することを含み、
前記理論時差は、前回計算した固有歩度が前記参照クロックの歩度と一致していると仮定して、前回の時差と前回計算した前記時差解消歩度と前回計算した固有歩度とを用いて計算される
クロック調整方法。 The communication unit receives the time information of the reference clock and
The clock section outputs time information determined based on the current rate,
Based on the current time difference between the time information output by the clock unit and the time information of the reference clock, the clock adjusting unit determines the time difference elimination rate for eliminating the time difference from the reference clock, and the reference clock. The natural step for adjusting to the speed is calculated, the current step with respect to the clock section is determined based on the time difference elimination step and the natural step, and the step of the clock section is updated.
The time synchronization determination unit includes determining whether or not the rate of the reference clock and the rate of the clock unit match based on the difference between the current time difference and the theoretical time difference.
The theoretical time difference is calculated using the previous time difference, the previously calculated time difference elimination step, and the previously calculated natural step, assuming that the previously calculated natural step matches the step of the reference clock. Clock adjustment method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019202100A JP6823700B1 (en) | 2019-11-07 | 2019-11-07 | Clock adjuster, program, and clock adjustment method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019202100A JP6823700B1 (en) | 2019-11-07 | 2019-11-07 | Clock adjuster, program, and clock adjustment method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP6823700B1 JP6823700B1 (en) | 2021-02-03 |
JP2021076433A true JP2021076433A (en) | 2021-05-20 |
Family
ID=74225995
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019202100A Active JP6823700B1 (en) | 2019-11-07 | 2019-11-07 | Clock adjuster, program, and clock adjustment method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6823700B1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7394804B2 (en) * | 2021-03-24 | 2023-12-08 | 株式会社タムラ製作所 | Information communication system and information communication device |
JP7312779B2 (en) * | 2021-03-24 | 2023-07-21 | 株式会社タムラ製作所 | Information communication system and information communication device |
JP7381514B2 (en) * | 2021-03-24 | 2023-11-15 | 株式会社タムラ製作所 | Information communication system and information communication device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001235570A (en) * | 2000-02-22 | 2001-08-31 | C-Dex Kk | Time correcting method for high accuracy timepiece device |
JP2004301753A (en) * | 2003-03-31 | 2004-10-28 | Seiko Epson Corp | Radio-controlled watch and control method therefor |
JP2013083450A (en) * | 2011-10-06 | 2013-05-09 | Sony Corp | Time control device, time control method, and program |
JP2013118502A (en) * | 2011-12-02 | 2013-06-13 | Mitsubishi Electric Corp | Time synchronization apparatus, radio terminal and time synchronization system |
JP2017022526A (en) * | 2015-07-09 | 2017-01-26 | 株式会社東芝 | Time synchronization client and protection system |
-
2019
- 2019-11-07 JP JP2019202100A patent/JP6823700B1/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001235570A (en) * | 2000-02-22 | 2001-08-31 | C-Dex Kk | Time correcting method for high accuracy timepiece device |
JP2004301753A (en) * | 2003-03-31 | 2004-10-28 | Seiko Epson Corp | Radio-controlled watch and control method therefor |
JP2013083450A (en) * | 2011-10-06 | 2013-05-09 | Sony Corp | Time control device, time control method, and program |
JP2013118502A (en) * | 2011-12-02 | 2013-06-13 | Mitsubishi Electric Corp | Time synchronization apparatus, radio terminal and time synchronization system |
JP2017022526A (en) * | 2015-07-09 | 2017-01-26 | 株式会社東芝 | Time synchronization client and protection system |
Also Published As
Publication number | Publication date |
---|---|
JP6823700B1 (en) | 2021-02-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6823700B1 (en) | Clock adjuster, program, and clock adjustment method | |
US11068020B2 (en) | Synchronization signal output apparatus, control method, and non-transitory computer-readable storage medium | |
US9838196B2 (en) | Synchronization apparatus, synchronization system, radio communication apparatus and synchronization method | |
WO2001050674A1 (en) | Synchronization in packet-switched telecommunications system | |
CN104184535A (en) | Clock synchronization method and clock synchronization device | |
WO2016168064A1 (en) | Methods, systems, and computer readable media for emulating network devices with different clocks | |
EP3235156A1 (en) | Method of synchronising clocks of network devices | |
KR20170058167A (en) | Method and apparatus for synchronizing time | |
KR101550552B1 (en) | Apparatus for adjusting time synchronization period and method for determinating time synchronization period | |
JP2012222833A (en) | System and method to overcome wander accumulation to achieve precision clock distribution over large networks | |
US20200045661A1 (en) | Remote signal synchronization | |
CN107800529B (en) | Clock frequency synchronization method of network node | |
WO2022244287A1 (en) | Clock processing device and program | |
WO2019014329A1 (en) | Cavity stabilized laser drift compensation | |
US11201685B2 (en) | In-vehicle network system | |
JP6581254B1 (en) | Clock adjustment apparatus and program | |
CN112969229A (en) | Clock correction method and device and network equipment | |
KR101176798B1 (en) | Method for clock synchronization between slave and master | |
JP6823701B1 (en) | Clock regulators, methods, and programs | |
US20170117980A1 (en) | Time synchronization for network device | |
CN112019289B (en) | Time synchronization method of time sharing system | |
KR20110077329A (en) | Apparatus and method for processing network delay and ieee 1588 system for the same | |
JP6196765B2 (en) | Communication device, time control method, and program | |
WO2023032351A1 (en) | Clock processing device and program | |
KR102287793B1 (en) | Iterative time synchronization algorithm and system for unmanned aerial vehicle network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191107 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20201222 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210108 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6823700 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |