JP6834642B2 - Time correction method - Google Patents

Time correction method Download PDF

Info

Publication number
JP6834642B2
JP6834642B2 JP2017054088A JP2017054088A JP6834642B2 JP 6834642 B2 JP6834642 B2 JP 6834642B2 JP 2017054088 A JP2017054088 A JP 2017054088A JP 2017054088 A JP2017054088 A JP 2017054088A JP 6834642 B2 JP6834642 B2 JP 6834642B2
Authority
JP
Japan
Prior art keywords
time
measurement error
accuracy
ptp
estimation accuracy
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.)
Active
Application number
JP2017054088A
Other languages
Japanese (ja)
Other versions
JP2018155679A (en
Inventor
靖 立石
靖 立石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Meidensha Corp
Original Assignee
Meidensha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Meidensha Corp filed Critical Meidensha Corp
Priority to JP2017054088A priority Critical patent/JP6834642B2/en
Publication of JP2018155679A publication Critical patent/JP2018155679A/en
Application granted granted Critical
Publication of JP6834642B2 publication Critical patent/JP6834642B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electric Clocks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Description

本発明は、IEEE1588規格の「Precision Time Protocol」(以下、「PTP」とする。)における時刻補正方法に関する。 The present invention relates to a time correction method in the IEEE 1588 standard "Precision Time Protocol" (hereinafter referred to as "PTP").

「PTP」による時刻同期は、装置間で時刻を配信することにより各装置の時刻を同期させている。この「PTP」における送受信の測定をハードウェアにより実施することで測定の高精度化が可能である。 In the time synchronization by "PTP", the time of each device is synchronized by distributing the time between the devices. It is possible to improve the accuracy of the measurement by performing the transmission / reception measurement in this "PTP" by hardware.

また、装置間で「PTP」パケットを往復させることで、ネットワーク上のグランドマスタークロック(以下、「GM」とする。)などの基準時計と各装置の時計との時間差を算出し、算出された時間差に基づき時刻を補正する。 Further, by reciprocating the "PTP" packet between the devices, the time difference between the reference clock such as the grand master clock (hereinafter referred to as "GM") on the network and the clock of each device is calculated and calculated. Correct the time based on the time difference.

「PTP」の時刻同期は、例えばロボット間の時刻同期や継電器の時刻同期などに利用されている。特許文献1を一例に説明すれば、ターゲットを複数ロボットでトラッキングする際の時刻同期に「PTP」が利用されている。具体的には、まず複数ロボット群の各マスター装置を「GM」に時刻同期させ、つぎに時刻同期後のマスター装置に各ロボット群のスレーブ装置を時刻同期させている。 The time synchronization of "PTP" is used, for example, for time synchronization between robots and time synchronization of relays. Explaining Patent Document 1 as an example, "PTP" is used for time synchronization when tracking a target with a plurality of robots. Specifically, first, each master device of the plurality of robot groups is time-synchronized with "GM", and then the slave device of each robot group is time-synchronized with the master device after the time synchronization.

特開2014−211851JP 2014-211851

前述のように「PTP」の時刻同期の際、ネットワーク上の装置は「GM」と「PTP」パケットを往復させる通信を実行する。この往復の時間差に基づき正しい時間を算出して時刻を補正するが、これは往復時の伝送時間が等しいことを前提条件とする。 As described above, at the time of time synchronization of "PTP", the device on the network executes communication for reciprocating the "GM" and "PTP" packets. The correct time is calculated based on this round-trip time difference and the time is corrected, but this is premised on the same transmission time during the round-trip.

ここで「PTP」対応の通信機器がネットワークに使用されていれば、伝送時間の変動は補正されるものの、PTP未対応の通信機器では伝送時間の遅延した変動の「1/2」が測定誤差とされる。この誤差は時刻の進みの方向と時刻の遅れの方向にそれぞれ現れるため、該誤差の幅は伝送時間の差異に等しい。したがって、PTP対応の通信機器により前記誤差が補正されれば、時刻は正確となる。 Here, if a communication device compatible with "PTP" is used in the network, the fluctuation of the transmission time is corrected, but in the communication device not supporting PTP, "1/2" of the delayed fluctuation of the transmission time is a measurement error. It is said that. Since this error appears in the direction of time advance and the direction of time delay, the width of the error is equal to the difference in transmission time. Therefore, if the error is corrected by a PTP-compatible communication device, the time will be accurate.

しかしながら、「PTP」対応の通信機器のみでネットワークを構築できるとは限らず、通常は「PTP」未対応の通信機器の存在を想定して時計を調整している。この時計の調整方法としては、サーボ制御(「PID」制御)がよく使用されている。 However, it is not always possible to construct a network only with communication devices compatible with "PTP", and the clock is usually adjusted assuming the existence of communication devices not compatible with "PTP". Servo control (“PID” control) is often used as a method of adjusting this watch.

すなわち、時計の調整にて誤差を含んだ制御を行うと大きく変動してしまうため、サーボ制御による「PID」制御の「P(比例)」を小さくして大きな外乱とならないようにする。これは時間をかけて平均化しているのと同じであり、時計調整に時間がかかるのが欠点である。また、「PTP」パケットの往路と帰路とで伝送時間の分布が不均一であれば、正しい時刻からずれた時刻となってしまう。 That is, since the control including an error is performed by adjusting the clock, it fluctuates greatly. Therefore, the "P (proportional)" of the "PID" control by the servo control is reduced to prevent a large disturbance. This is the same as averaging over time, and the disadvantage is that it takes time to adjust the clock. Further, if the distribution of the transmission time is not uniform between the outward path and the return path of the "PTP" packet, the time deviates from the correct time.

したがって、サーボ制御では、現在の時計の精度を算定することは困難であり、またサーボ制御のパラメータが適切だとしても正しい時間との誤差は最大変動の「1/2」とするしない。そうすると、正しい時刻に設定する観点からすれば、単純なサーボ制御では無理があり、特に高精度を要求されるシステムでは問題が生じるおそれがある。 Therefore, in servo control, it is difficult to calculate the accuracy of the current clock, and even if the servo control parameters are appropriate, the error from the correct time is not set to "1/2" of the maximum fluctuation. Then, from the viewpoint of setting the correct time, simple servo control is not possible, and a problem may occur especially in a system requiring high accuracy.

本発明は、このような従来の問題を解決するためになされ、「PTP」未対応の通信機器を想定したシステムにおいて、時刻補正の精度向上を図ることを解決課題としている。 The present invention has been made to solve such a conventional problem, and an object of the present invention is to improve the accuracy of time correction in a system assuming a communication device that does not support "PTP".

本発明は、マスター側の装置とスレーブ側の装置との間でパケットを往復させ、該往復の時刻に基づき前記スレーブ側の装置の時刻を補正する方法に関する。 The present invention relates to a method of reciprocating a packet between a master-side device and a slave-side device and correcting the time of the slave-side device based on the round-trip time.

この方法は、前記パケットの最小往復時間と実際の前記パケットの往復時間との時間差に基づき測定誤差を算出する測定誤差算出ステップと、前記スレーブ側の装置の内部時計のクロックに対する調整量の記録に基づき最大調整量を取得し、取得した最大調整量と前回調整後の経過時間とに基づき推定精度を算出する推定精度算出ステップと、を有する。この推定精度算出ステップで算出された推定精度より測定誤差算出ステップで算出された測定誤差が大きければ、前記往復時間の測定値を前記スレーブ側の装置の時刻補正に使用しない。 This method records the measurement error calculation step of calculating the measurement error based on the time difference between the minimum round trip time of the packet and the actual round trip time of the packet, and the recording of the adjustment amount with respect to the clock of the internal clock of the slave side device. It has an estimation accuracy calculation step of acquiring the maximum adjustment amount based on the above and calculating the estimation accuracy based on the acquired maximum adjustment amount and the elapsed time after the previous adjustment. If the measurement error calculated in the measurement error calculation step is larger than the estimation accuracy calculated in the estimation accuracy calculation step, the measured value of the round trip time is not used for the time correction of the slave side device.

前記測定誤差算出ステップの一態様としては、最小往復時間を(1)伝送路の距離と中継装置の段数とに基づく算出,(2)過去の往復時間の測定記録に基づく最小値の取得のいずれかにより求めることができる。 As one aspect of the measurement error calculation step, either (1) calculation of the minimum round trip time based on the distance of the transmission line and the number of stages of the relay device, or (2) acquisition of the minimum value based on the measurement record of the past round trip time. Can be obtained by

前記測定誤差算出ステップの一態様としては、{[測定誤差]=([往復時間]−[最小往復時間])/2}により前記測定誤差を算出することができる。また、推定精度算出ステップの一態様としては、{[推定精度]=[最大調整量]×[前回調整後の経過時間]}により前記推定精度を算出することができる。 As one aspect of the measurement error calculation step, the measurement error can be calculated by {[measurement error] = ([round trip time]-[minimum round trip time]) / 2}. Further, as one aspect of the estimation accuracy calculation step, the estimation accuracy can be calculated by {[estimation accuracy] = [maximum adjustment amount] × [elapsed time after the previous adjustment]}.

本発明は、前記推定精度が事前設定の目標精度よりも悪ければ、精度異常を出力する出力ステップをさらに有していてもよい。また、前記推定精度算出ステップにおいて、前記調整量の記録を一定時間経過後に破棄することが好ましい。さ The present invention may further include an output step that outputs an accuracy abnormality if the estimated accuracy is worse than the preset target accuracy. Further, in the estimation accuracy calculation step, it is preferable to discard the recording of the adjustment amount after a certain period of time has elapsed. Sa

本発明によれば、「PTP」未対応の通信機器を想定したシステムにおいて、時刻補正の精度向上を図ることができる。 According to the present invention, it is possible to improve the accuracy of time correction in a system assuming a communication device that does not support "PTP".

本発明の実施形態に係る時刻補正方法を実行するIEEE1588規格の「PTP」のシステム構成図。FIG. 5 is a system configuration diagram of "PTP" of the IEEE1588 standard for executing the time correction method according to the embodiment of the present invention. 同 「PTP」パケット往復時の時間差の算出を示す説明図。The explanatory view which shows the calculation of the time difference at the time of the round trip of the "PTP" packet. 同 1秒間のクロックの調整量を示す説明図。The explanatory view which shows the adjustment amount of the clock for the same 1 second. (a)は伝送路状況例1の「PTP」パケットの往復時間と経過時間とを示すグラフ、(b)は(a)の時間差を示すグラフ。(A) is a graph showing the round-trip time and elapsed time of the "PTP" packet of the transmission line condition example 1, and (b) is a graph showing the time difference of (a). (a)は伝送路状況例2の「PTP」パケットの往復時間と経過時間とを示すグラフ、(b)は(a)の時間差を示すグラフ。(A) is a graph showing the round-trip time and elapsed time of the "PTP" packet of the transmission line situation example 2, and (b) is a graph showing the time difference of (a). (a)は伝送路状況例3の「PTP」パケットの往復時間と経過時間とを示すグラフ、(b)は(a)の時間差を示すグラフ。(A) is a graph showing the round-trip time and elapsed time of the "PTP" packet of the transmission line condition example 3, and (b) is a graph showing the time difference of (a). (a)は図5の伝送路状況例に本発明を適用した場合の「PTP」パケットの往復時間と経過時間とを示すグラフ、(b)は(a)の時間差を示すグラフ、(c)は(b)の時間経過後の状態を示すグラフ。(A) is a graph showing the round-trip time and elapsed time of the "PTP" packet when the present invention is applied to the transmission line condition example of FIG. 5, (b) is a graph showing the time difference of (a), (c). Is a graph showing the state after the passage of time in (b).

以下、本発明の実施形態に係る時刻補正方法を説明する。この時刻補正方法は、「PTP」の時刻同期システムに適用される。この「PTP」によれば、ネットワーク上の装置は「GM」などの基準時計との時間差を得ることができ、該時間差が正確であれば装置内の内部時計の調整に適用できる。 Hereinafter, the time correction method according to the embodiment of the present invention will be described. This time correction method is applied to the "PTP" time synchronization system. According to this "PTP", the device on the network can obtain a time difference from the reference clock such as "GM", and if the time difference is accurate, it can be applied to the adjustment of the internal clock in the device.

ところが、実際は伝送路上を「PTP」パケットが往復する際に伝送時間の変動に影響され、正確な時間差を得ることは難しく、誤差を含んだ測定値となることが多い。この点を従来はサーボ制御としてのPID制御により対処していた。 However, in reality, when a "PTP" packet reciprocates on a transmission path, it is affected by fluctuations in the transmission time, and it is difficult to obtain an accurate time difference, and the measured value often includes an error. Conventionally, this point has been dealt with by PID control as servo control.

本来、サーボ制御は、目標の出力結果を得るための正確な制御入力を算出できないときに出力結果の差異を求めて制御入力に戻して補正する制御である。しかしながら、「PTP」における目標の出力結果は時刻なため、これを進めるのも遅らせるのも時刻調整するだけであり、正確な制御入力は算出できる。 Originally, the servo control is a control in which when an accurate control input for obtaining a target output result cannot be calculated, the difference in the output result is obtained and returned to the control input for correction. However, since the target output result in "PTP" is the time, it is only necessary to adjust the time to advance or delay it, and an accurate control input can be calculated.

そうするとサーボ制御のようなフィードバック制御は不要となるが「PTP」により得られた時間差には伝送時間の変動による誤差を含むため、出力に反応してしまう。そこで、サーボ制御による応答性を緩やかにする必要が生じる。このとき出力(時間)に対して調整するのではなく、出力(時刻)を測定したときの誤差に対してサーボ制御をかけていることになる。 Then, feedback control such as servo control becomes unnecessary, but the time difference obtained by "PTP" includes an error due to the fluctuation of the transmission time, so that it reacts to the output. Therefore, it is necessary to loosen the responsiveness by servo control. At this time, instead of adjusting the output (time), the servo control is applied to the error when the output (time) is measured.

ここで「PTP」パケットの伝送時間が変動する点については、様々な原因が考えられるが、「PTP」未対応の通信機器(例えばスイッチングハブ)を使用すると受信した「PTP」パケットが内部のバッファに格納されるため、送信されるまでの時間に遅延が発生するおそれがある。 There are various possible causes for the transmission time of the "PTP" packet to fluctuate, but when a communication device that does not support "PTP" (for example, a switching hub) is used, the received "PTP" packet is an internal buffer. Since it is stored in, there may be a delay in the time until it is sent.

例えば「1Gbps」伝送路で「1000byte」のパケットが10個送信待ちならば、「80μsec」の遅延が発生する。このとき「PTP」における時間差の測定誤差は、その半分の「40μsec」となる(ただし、伝送負荷の状況により変動する。)。 For example, if 10 "1000 bytes" packets are waiting to be transmitted on the "1 Gbps" transmission line, a delay of "80 μsec" occurs. At this time, the measurement error of the time difference in "PTP" is half of that, "40 μsec" (however, it varies depending on the transmission load condition).

このような測定誤差により時刻が変動することは好ましくないため、前述のようにサーボ制御(「PID」制御)により変動を抑えている。例えば比例にて時間差の「1/10」を適用すれば、瞬間的な伝送遅延の影響は「1/10」に抑制され、時間変動は小さくなる(ただし、測定された時間に一致するには時間を要する。)。 Since it is not preferable that the time fluctuates due to such a measurement error, the fluctuation is suppressed by servo control (“PID” control) as described above. For example, if the time difference "1/10" is applied proportionally, the effect of the instantaneous transmission delay is suppressed to "1/10" and the time fluctuation becomes small (however, to match the measured time). It takes time.)

従来のサーボ制御でも測定された時間差において突出した数値は破棄する。あるいは平均化するなどの処理が行われている。しかし、これらの方法は精度を考慮しない処理であるため、瞬間的な異常には対応できても問題が解決するわけではない。 Even with the conventional servo control, the numerical value that stands out in the measured time difference is discarded. Alternatively, processing such as averaging is performed. However, since these methods are processes that do not consider accuracy, the problem cannot be solved even if a momentary abnormality can be dealt with.

例えば伝送負荷が高く安定しているスイッチングハブの伝送遅延も安定し、「PTP」パケットの往復において特定の方向のみ伝送負荷が高いと時間差は偏った方向に安定してしまう。これは測定誤差を考慮しない点に問題がある。このような問題に前記時刻補正方法は対処する。 For example, the transmission delay of a switching hub with a high and stable transmission load is also stable, and if the transmission load is high only in a specific direction in the round trip of the "PTP" packet, the time difference becomes stable in a biased direction. This has a problem in that the measurement error is not taken into consideration. The time correction method deals with such a problem.

≪システム構成例≫
図1に基づき前記時刻同期システムの構成例を説明する。図1中の1は、「GM」に選定されたマスター側の装置(以下、「GM」とする。)を示している。また、2a,2bは、「GM」1と図示省略の中継装置(例えばスイッチングハブ,ルータなど)を介して接続された2台のスレーブ側の装置(以下、スレーブ装置とする。)を示している。
≪System configuration example≫
A configuration example of the time synchronization system will be described with reference to FIG. Reference numeral 1 in FIG. 1 indicates a master-side device (hereinafter referred to as “GM”) selected as “GM”. Further, 2a and 2b indicate two slave-side devices (hereinafter, referred to as slave devices) connected to the “GM” 1 via a relay device (for example, a switching hub, a router, etc.) (not shown). There is.

前記時刻同期システムによれば、「GM」1から各スレーブ装置2a,2bに「PTP」パケットが配信され、スレーブ装置2a,2bで時刻同期が実行される。図2に基づき概略を説明すれば、まず「GM」1は、スレーブ側の装置2a,2bに矢印Aの「Syncメッセージ(同期メッセージ)」を送信し、該送信の時刻t1を記憶する。このとき「GM」1は、時刻t1を含む図示省略の「Follow_upメッセージ(同期メッセージ)」をさらにスレーブ側の装置2a,2bに送信する。 According to the time synchronization system, a "PTP" packet is delivered from the "GM" 1 to the slave devices 2a and 2b, and the slave devices 2a and 2b execute time synchronization. To explain the outline based on FIG. 2, first, the “GM” 1 transmits the “Sync message (synchronous message)” of the arrow A to the devices 2a and 2b on the slave side, and stores the time t1 of the transmission. At this time, the “GM” 1 further transmits a “Follow_up message (synchronous message)” (not shown) including the time t1 to the devices 2a and 2b on the slave side.

つぎにスレーブ装置2a,2bは前記両メッセージを受信し、「Syncメッセージ」を受信した時間t2を記憶する。また、「Follow_upメッセージ」から時刻t1を抽出し、時刻t1を記憶する。さらにスレーブ装置2a,2bは、「GM」1に矢印Bの「Delay_reqメッセージ(遅延要求メッセージ)」を送信し、送信の時刻t3を記録する。 Next, the slave devices 2a and 2b receive both of the above messages and store the time t2 at which the "Sync message" is received. Further, the time t1 is extracted from the "Follow_up message" and the time t1 is stored. Further, the slave devices 2a and 2b transmit the “Delay_req message (delay request message)” indicated by the arrow B to the “GM” 1 and record the transmission time t3.

そして、「Delay_reqメッセージ」を「GM」1が受信すれば、受信の時刻t4を記憶する。また、「GM」1は、時刻t4を含む矢印Cの「Delay_Respメッセージ(遅延応答メッセージ)」をスレーブ装置2a,2bに送信する。ここまでを「PTP」パケットの1ステップとする。 Then, when the "GM" 1 receives the "Delay_req message", the reception time t4 is stored. Further, the “GM” 1 transmits the “Delay_Resp message (delayed response message)” of the arrow C including the time t4 to the slave devices 2a and 2b. This is one step of the "PTP" packet.

ここで伝送時間「T1(行き)」と伝送時間「T2(帰り)」が同じであれば、スレーブ装置2a,2bの「GM」1との時間差は、「時間差={(t2−t1)−(t4−t3)}/2」で算出される。算出された時間差を使ってスレーブ装置2a,2bの時刻補正が行われる。 Here, if the transmission time "T1 (bound)" and the transmission time "T2 (return)" are the same, the time difference between the slave devices 2a and 2b and "GM" 1 is "time difference = {(t2-t1)-. (T4-t3)} / 2 ”is calculated. The time difference of the slave devices 2a and 2b is corrected using the calculated time difference.

ただし、前記時刻補正方法によれば、「PTP」パケットの往復時間の測定値をスレーブ装置2a,2bの時刻補正(時計4b,4cの調整)に使用するか否かが判定される。以下、前記補正方法の具体的処理内容を説明する。 However, according to the time correction method, it is determined whether or not the measured value of the round-trip time of the "PTP" packet is used for the time correction of the slave devices 2a and 2b (adjustment of the clocks 4b and 4c). Hereinafter, the specific processing contents of the correction method will be described.

≪第1実施形態≫
第1実施形態の前記時刻補正方法は、「PTP」パケットの往復伝送時間の変化から[今回の測定誤差]を算出する測定誤差算出ステップと、クロック(時刻)の精度と「PTP」パケットの状態から[推定精度]を算出する推定精度算出ステップと、[推定精度]よりも[今回の測定誤差]が大きいか否かを判定する判定ステップとを有する。
<< First Embodiment >>
The time correction method of the first embodiment includes a measurement error calculation step of calculating [this measurement error] from a change in the round-trip transmission time of the “PTP” packet, a clock (time) accuracy, and a state of the “PTP” packet. It has an estimation accuracy calculation step for calculating [estimation accuracy] from the above, and a determination step for determining whether or not the [current measurement error] is larger than the [estimation accuracy].

(1)測定誤差算出ステップ
測定誤差算出ステップは、「PTP」パケットの最小往復時間と、実際に「PTP」パケットが往復した今回の伝送時間との時間差に基づき[今回の測定誤差]を算出する。
(1) Measurement error calculation step The measurement error calculation step calculates [this measurement error] based on the time difference between the minimum round trip time of the "PTP" packet and the current transmission time of the actual "PTP" packet round trip. ..

詳細を説明すれば、伝送負荷がなく最小の伝送時間のときが「PTP」パケットの往復時間について高精度の測定といえる。その反面、「PTP」パケットの往復にかかった時間が長いほど誤差を含んだ時間差といえる。この[今回の測定誤差]は、式1により算出される。 To explain in detail, it can be said that the time when there is no transmission load and the minimum transmission time is a highly accurate measurement of the round-trip time of the "PTP" packet. On the other hand, it can be said that the longer it takes for the "PTP" packet to make a round trip, the longer the time difference includes an error. This [measurement error this time] is calculated by Equation 1.

式1:[今回の測定誤差]=([今回の往復時間]−[最小往復時間])/2
この式1中の最小往復時間は、(A)伝送路の距離と中継装置の段数とに基づく算出方法,(B)過去の往復時間の測定記録に基づく取得方法のいずれかで求めることができる。
Equation 1: [Measurement error this time] = ([Round trip time this time]-[Minimum round trip time]) / 2
The minimum round trip time in this equation 1 can be obtained by either (A) a calculation method based on the distance of the transmission line and the number of stages of the relay device, or (B) an acquisition method based on the measurement record of the past round trip time. ..

まず、伝送路の距離と中継装置の段数とに基づく算出方法を説明する。ここでは中継装置としてスイッチングハブが用いられているものとし、伝送路の長さとスイッチングハブの段数が固定であれば、式2により最小往復時間を算出することができる。 First, a calculation method based on the distance of the transmission line and the number of stages of the relay device will be described. Here, it is assumed that a switching hub is used as a relay device, and if the length of the transmission line and the number of stages of the switching hub are fixed, the minimum round trip time can be calculated by Equation 2.

式2:[最小往復時間]={「距離」÷「光速」×0.7)}+{(「「PTP」パケットビット数」÷「伝送速度」)+α}×「HUB数」
(α:HUBのパケット転送における遅延時間)
一般にスイッチングハブは、パケットサイズを受信してから送信するため、パケットサイズ分の時間がかかる。また、伝送速度の「100%」で「PTP」パケットを転送するが、単発の転送では時間がかかる場合があるので、式2中は「α」にて調整する。なお、「PTP」対応のスイッチングハブを適用した区間は、遅延を補正するので「距離」による時間のみ加算する。また、「光速」は真空中の速度であるが、銅線や光ファイバーは「光速」の「0.7」倍の速度なため、それを乗じてある。
Equation 2: [Minimum round-trip time] = {"distance" ÷ "speed of light" x 0.7)} + {("PTP" packet bit number "÷" transmission speed ") + α} x" HUB number "
(Α: Delay time in HUB packet transfer)
Generally, a switching hub receives a packet size and then transmits the packet size, so that it takes time for the packet size. Further, although the "PTP" packet is transferred at "100%" of the transmission speed, it may take time for a single transfer, so the adjustment is made with "α" in Equation 2. In the section to which the "PTP" compatible switching hub is applied, the delay is corrected, so only the time according to the "distance" is added. In addition, "speed of light" is the speed in vacuum, but copper wire and optical fiber are multiplied by "0.7" times the speed of "speed of light".

つぎに過去の往復時間の測定記録に基づく取得方法を説明する。すなわち、スレーブ装置2a,2bの記憶装置には、「PTP」パケットの過去の往復時間(図2中の「T1」+「T2」)が記録されている。 Next, an acquisition method based on the measurement record of the past round trip time will be described. That is, the storage device of the slave devices 2a and 2b records the past round-trip time (“T1” + “T2” in FIG. 2) of the “PTP” packet.

この記録中における過去の往復時間は、時計4b,4cが時計4aに時刻同期していなくとも[最小往復時間]よりも大きい値となる。ここでは過去の特定の期間、即ち前記記録中の特定期間において最小の測定値(往復時間)の半分を片道分の所要時間とし、該最小の測定値を最小往復時間とする。 The past round-trip time during this recording is larger than the [minimum round-trip time] even if the clocks 4b and 4c are not time-synchronized with the clock 4a. Here, half of the minimum measured value (round trip time) in the specific period in the past, that is, the specific period in the recording is defined as the required time for one way, and the minimum measured value is defined as the minimum round trip time.

ただし、過去の往復時間の測定記録に基づく取得方法は、確実ではなく、例えば伝送負荷が常に高い回線の場合などでは必ずしも正しい値にはならないため、手動で最小往復時間を設定可能な仕様とすることが好ましい。 However, the acquisition method based on the measurement record of the past round trip time is not reliable, and it is not always the correct value in the case of a line where the transmission load is always high, so the specification is such that the minimum round trip time can be set manually. Is preferable.

(2)推定精度算出ステップ
推定精度算出ステップは、スレーブ装置2a,2bの内部時計4b,4cのクロックに対する調整量の記録に基づき最大調整量を取得し、取得した最大調整量に前回調整後の経過時間を乗じて推定精度を算出する
各内部時計4a〜4cの電子回路には、「1秒」の長さを調整するためのカウンタが存在する。ここで「PTP」時刻補正によれば、スレーブ装置2a,2bの内部時計4b,4cは前記カウンタを調整することにより、「1秒」の進む速度を増減させて時刻を「GM」1の内部時計4aに合わせている。
(2) Estimated accuracy calculation step In the estimated accuracy calculation step, the maximum adjustment amount is acquired based on the recording of the adjustment amount for the clocks of the internal clocks 4b and 4c of the slave devices 2a and 2b, and the acquired maximum adjustment amount is adjusted to the acquired maximum adjustment amount after the previous adjustment. The electronic circuits of the internal clocks 4a to 4c for calculating the estimation accuracy by multiplying the elapsed time have a counter for adjusting the length of "1 second". Here, according to the "PTP" time correction, the internal clocks 4b and 4c of the slave devices 2a and 2b adjust the counter to increase or decrease the advancing speed of "1 second" to set the time inside the "GM" 1. It is set to the clock 4a.

図3に基づき説明すれば、X1は、「GM」1の内部時計4aの「1秒」を示し、X2はスレーブ装置2a,2bの内部時計4b,4cの「1秒」を示している。ここでは水晶5b,5cの周波数が水晶5aよりも高いため、「X2<X1」が成立し、内部時計4b,4cは内部時計4aより1秒が短い。 Explaining with reference to FIG. 3, X1 indicates "1 second" of the internal clock 4a of "GM" 1, and X2 indicates "1 second" of the internal clocks 4b and 4c of the slave devices 2a and 2b. Here, since the frequencies of the crystals 5b and 5c are higher than those of the crystal 5a, "X2 <X1" is established, and the internal clocks 4b and 4c are 1 second shorter than the internal clock 4a.

このとき矢印Pの時刻同期においては、内部時計4aの1秒に合わせるため、内部時計4b,4cの「1秒」とするカウント値を増大させる。図2中のX3は、時刻同期で増大させた部分の時間(調整量)を示している。なお、X3のような過去の調整量はスレーブ装置2a,2bの記憶装置に記録しておくものとする。 At this time, in the time synchronization of the arrow P, the count value set to "1 second" of the internal clocks 4b and 4c is increased in order to match the 1 second of the internal clock 4a. X3 in FIG. 2 indicates the time (adjustment amount) of the portion increased by the time synchronization. The past adjustment amount such as X3 shall be recorded in the storage devices of the slave devices 2a and 2b.

ここで記録された記録データ中の調整量の変動に基づき最近の[最大調整量]を取得し、取得した[最大調整量]を推定精度、即ちクロック精度の推定に利用する。例えば30秒前の測定で「1秒」を「300nsec」短く調整し、20秒前の測定で「1秒」を「100nsec」長く調整し、その後に10秒前の測定で「1秒」を「200nsec」短く調整したとする。 The latest [maximum adjustment amount] is acquired based on the fluctuation of the adjustment amount in the recorded data recorded here, and the acquired [maximum adjustment amount] is used for estimation accuracy, that is, estimation of clock accuracy. For example, adjust "1 second" to "300 nsec" shorter in the measurement 30 seconds ago, adjust "1 second" to "100 nsec" longer in the measurement 20 seconds ago, and then adjust "1 second" to "1 second" in the measurement 10 seconds ago. It is assumed that the adjustment is shortened by "200 nsec".

この場合の調整量の変動は、30秒前〜20秒前までが「400nsec/10秒」の変化であり、20秒前〜10秒前までが「300nsec/10秒」の変化であり、[最大調整量]は「40nsec/sec」であり、1秒経過するごとに「40nsec/sec」ずれることになる。このとき[推定精度]は、式3により算出される。 In this case, the fluctuation of the adjustment amount is a change of "400 nsec / 10 seconds" from 30 seconds to 20 seconds before, and a change of "300 nsec / 10 seconds" from 20 seconds to 10 seconds before. The maximum adjustment amount] is "40 nsec / sec", and the deviation is "40 nsec / sec" every second. At this time, the [estimation accuracy] is calculated by Equation 3.

式3:[推定精度]=([最大調整量]×[前回のPTP調整後の経過時間])
ここで式3中、[最大調整量]については「PTP」時刻補正前は算出できないので、スレーブ装置2a,2bの起動時は水晶5b,5cなどのデータシートによる最悪値を採用してもよい。また、高精度の測定が2回実施できれば、その時点での精度でクロックの進む速度の補正ができたと解釈できる。
Equation 3: [Estimation accuracy] = ([Maximum adjustment amount] x [Elapsed time after the previous PTP adjustment])
Here, in Equation 3, the [maximum adjustment amount] cannot be calculated before the "PTP" time correction, so the worst value based on the data sheet of the crystals 5b, 5c or the like may be adopted when the slave devices 2a, 2b are activated. .. Further, if the high-precision measurement can be performed twice, it can be interpreted that the speed at which the clock advances can be corrected with the accuracy at that time.

これを繰り返し実施すると水晶5b,5bへの調整量の変動が求められる。その最大変動を推定誤差の傾きとして[最大調整量]とすることができる。ここで一般に水晶の精度は温度や電圧などの環境に依存するため、古いデータに基づく算出は好ましくない。 When this is repeated, the amount of adjustment to the crystals 5b and 5b is required to change. The maximum fluctuation can be set as the [maximum adjustment amount] as the slope of the estimation error. Here, since the accuracy of quartz generally depends on the environment such as temperature and voltage, calculation based on old data is not preferable.

そこで、測定時にタイムアウトをセットしておき古いデータを破棄することが望ましい。なお、式3によれば、「PPT」時刻補正により時刻が補正された瞬間の[推定精度]は、そのときの[今回の測定誤差]に該当する。 Therefore, it is desirable to set a timeout at the time of measurement and discard the old data. According to Equation 3, the [estimation accuracy] at the moment when the time is corrected by the “PPT” time correction corresponds to the [current measurement error] at that time.

(3)判定ステップ
判定ステップは、[推定精度]と[今回の測定誤差]とを比較し、[推定精度]よりも[今回の測定誤差]が大きいか否かを判定する。
(3) Judgment step In the judgment step, [estimation accuracy] and [current measurement error] are compared, and it is determined whether or not [current measurement error] is larger than [estimation accuracy].

この判定の結果、[推定精度]より[今回の測定誤差]が大きければ、今回の測定値(往復時間)は「PTP」時刻補正には使用しない。一方、[推定精度]より[今回の測定誤差]が大きくなければ、今回の測定値(往復時間)は「PTP」時刻補正に使用する。 As a result of this determination, if [this measurement error] is larger than [estimation accuracy], the current measurement value (round trip time) is not used for "PTP" time correction. On the other hand, if [this measurement error] is not larger than [estimation accuracy], the current measurement value (round trip time) is used for "PTP" time correction.

例えばスイッチングハブで「1Gbps 1518byte」パケットの送信中に「PTP」パケットを受けたとき、「PTP」パケットに最大「12.1μsec」の遅延が発生したとする。 For example, suppose that when a "PTP" packet is received while a "1 Gbps 1518 byte" packet is being transmitted by a switching hub, a delay of up to "12.1 μsec" occurs in the "PTP" packet.

このとき[今回の測定誤差]は、{[今回の測定誤差]=([今回の往復時間]−[最小往復時間])/2=6.0μsec}と算出される。 At this time, the [current measurement error] is calculated as {[current measurement error] = ([current round trip time]-[minimum round trip time]) / 2 = 6.0 μsec}.

また、この状態までの「PTP」補正の調整量としては、{[最大調整量]=40nsec/sec}とする。そうすると、前回の時刻調整から1秒経過した時点では、{[推定精度]<[今回の測定誤差]}の関係が成立するため、今回の測定値は「PTP」時刻補正には使用しない。 Further, the adjustment amount of the "PTP" correction up to this state is {[maximum adjustment amount] = 40 nsec / sec}. Then, when 1 second has passed from the previous time adjustment, the relationship of {[estimation accuracy] <[current measurement error]} is established, so the current measurement value is not used for "PTP" time correction.

すなわち、この時点で「PTP」時刻補正に使用すれば測定誤差が大きく外乱となるだけであり、その後150秒経過すれば[測定精度]は「6.0μsec」を越える。このとき([今回の測定誤差]=6.0μsec)が成立していれば、該測定値は「PTP」時刻補正に使用できる。 That is, if it is used for "PTP" time correction at this point, the measurement error is large and only disturbs, and when 150 seconds have passed thereafter, the [measurement accuracy] exceeds "6.0 μsec". If this time ([current measurement error] = 6.0 μsec) is established, the measured value can be used for “PTP” time correction.

このように前記時刻補正方法によれば、スレーブ装置2a,2bの内部時計4b,4cを調整する際に[推定精度]と[今回の測定誤差]とを比較し、「PTP」時刻補正に使用可能か否かが判定される(サーボ制御に適用する場合も同じ)。これにより前記時刻補正により以下の効果を得ることができる。 In this way, according to the time correction method, when adjusting the internal clocks 4b and 4c of the slave devices 2a and 2b, the [estimation accuracy] and the [current measurement error] are compared and used for the "PTP" time correction. Whether it is possible or not is determined (the same applies when applied to servo control). As a result, the following effects can be obtained by the time correction.

(A)伝送回線に遅延変動がなければ時刻を高速に同期できる。すなわち、サーボ制御による方法は、比例や積分を調整しても時刻が安定するまでに時間がかかる。これに対して前記時刻補正方法によれば、測定誤差を把握して「PTP」時刻補正を行うため、同じサーボ制御でも外乱を受けにくく、安定するまでの時間を短縮することができる。 (A) If there is no delay fluctuation in the transmission line, the time can be synchronized at high speed. That is, in the servo control method, it takes time for the time to stabilize even if the proportion or integral is adjusted. On the other hand, according to the time correction method, since the measurement error is grasped and the "PTP" time correction is performed, it is difficult to receive disturbance even with the same servo control, and the time until it stabilizes can be shortened.

(B)[推定精度]と[今回の測定誤差]との比較、言い換えれば現在の時刻誤差と測定誤差との比較の結果、測定誤差が小さいときだけ時刻補正する。これにより誤差の大きい測定値であっても外乱を受けにくくなる。また、時刻の変動が安定し、またサーボ制御の比例の項目を高く設定でき、応答性の向上が図られる。 (B) As a result of comparison between [estimation accuracy] and [current measurement error], in other words, comparison between the current time error and the measurement error, the time is corrected only when the measurement error is small. This makes it less susceptible to disturbance even if the measured value has a large error. In addition, the time fluctuation is stable, and the proportional item of servo control can be set high, so that the responsiveness can be improved.

(C)サーボ制御においてパラメータ設定が容易となる。すなわち、通常の方法では回線の特性に応じてパラメータを設定する必要があった。このとき遅延変動による外乱が多いとき比例は小さくする必要があるが応答性が悪い。 (C) Parameter setting becomes easy in servo control. That is, in the usual method, it was necessary to set the parameters according to the characteristics of the line. At this time, when there is a lot of disturbance due to delay fluctuation, it is necessary to reduce the proportion, but the responsiveness is poor.

一方、比例を大きくすれば応答性は良いが変動が激しくなる。また、積分は目標値に調整できないオフセットを解消するためものであるが、強くかけると出力がふらつく現象が生じる。 On the other hand, if the proportion is increased, the responsiveness is good, but the fluctuation becomes large. Integral is to eliminate the offset that cannot be adjusted to the target value, but if it is applied strongly, the output will fluctuate.

このように伝送回線の特性に応じたパラメータを決めることは容易ではない。この点につき前記時刻補正方法によれば、[推定精度]と[今回の測定誤差]との比較結果の判定により誤差の大きい測定値を排除する。これにより従来よりも外乱を受けにくくパラメータの決定は容易となる。 In this way, it is not easy to determine the parameters according to the characteristics of the transmission line. Regarding this point, according to the time correction method, a measured value having a large error is excluded by determining the comparison result between the [estimation accuracy] and the [current measurement error]. As a result, it is less susceptible to disturbance than before, and parameters can be easily determined.

(D)[推定精度]算出によれば、「GM」1の内部時計4aなどの基準と、スレーブ装置2a,2bの内部時計との差分を推定することができる。すなわち、サーボ制御は、測定された時間差により正しいと思われる時刻の方向に制御するにすぎない。 (D) According to the [estimation accuracy] calculation, the difference between the reference such as the internal clock 4a of "GM" 1 and the internal clock of the slave devices 2a and 2b can be estimated. That is, the servo control merely controls in the direction of the time that seems to be correct based on the measured time difference.

したがって、「PTP」の測定における誤差は認識できず、現在時刻の差分を把握することはできない。これに対して前記時刻補正方法によれば、「PTP」パケットの往復時間の記録に基づきクロックの変動量を抽出し、時刻の差分(最大調整量)が算出される。この点で時刻精度の向上に貢献でき、精度に制限が加えられたシステムに適切に対応することができる。 Therefore, the error in the measurement of "PTP" cannot be recognized, and the difference in the current time cannot be grasped. On the other hand, according to the time correction method, the fluctuation amount of the clock is extracted based on the recording of the round trip time of the "PTP" packet, and the time difference (maximum adjustment amount) is calculated. In this respect, it can contribute to the improvement of time accuracy, and it is possible to appropriately cope with the system in which the accuracy is limited.

≪第2実施形態≫
第2実施形態の前記時刻補正方方法は、[推定精度]が[目標精度]よりも悪ければ精度異常を出力する出力ステップが追加されている。
<< Second Embodiment >>
In the time correction method of the second embodiment, an output step is added to output an accuracy abnormality if the [estimated accuracy] is worse than the [target accuracy].

すなわち、時刻同期の精度が問題となるシステムでは、精度が保てないときに異常を出力してその対処を行うことが必要になる。そこで、第2実施形態では、[目標精度]を決めて[推定精度]がそれより劣るときに精度異常の信号を出力させている。この[目標精度]は、システムで必要とされる精度としてユーザにより事前に設定されていればよい。 That is, in a system in which the accuracy of time synchronization is a problem, it is necessary to output an abnormality and take measures against it when the accuracy cannot be maintained. Therefore, in the second embodiment, the [target accuracy] is determined, and when the [estimation accuracy] is inferior to that, a signal with abnormal accuracy is output. This [target accuracy] may be preset by the user as the accuracy required by the system.

そうすると精度異常の判定は、[目標精度]に左右され、たとえ伝送時間の変化があってもその変動よりも[目標精度]が大きく設定されて設定範囲内であれば異常とは判定されず、精度異常が出力されることはない。 Then, the judgment of the accuracy abnormality depends on the [target accuracy], and even if there is a change in the transmission time, if the [target accuracy] is set larger than the fluctuation and is within the set range, it is not judged as an abnormality. No accuracy error is output.

一方、[目標精度]が高くなると「PTP」パケットの往復時間の変動は許容できなくなり、[推定精度]が[目標精度]を維持できる時間が短くなり易い。ここで精度異常が出力されれば、システムの仕様にしたがった異常処理が実行される。 On the other hand, when the [target accuracy] becomes high, the fluctuation of the round-trip time of the “PTP” packet becomes unacceptable, and the time during which the [estimation accuracy] can maintain the [target accuracy] tends to be short. If an accuracy error is output here, the error processing according to the system specifications is executed.

したがって、第2実施形態の前記時刻補正方法によれば、スレーブ装置2a,2bの内部時計4b,4cの調整量から[推定精度]が算出され、ユーザが決めた[目標精度]よりも悪化していれば精度異常としての処理が実行される。 Therefore, according to the time correction method of the second embodiment, the [estimation accuracy] is calculated from the adjustment amount of the internal clocks 4b and 4c of the slave devices 2a and 2b, which is worse than the [target accuracy] determined by the user. If so, the process as an accuracy error is executed.

≪伝送遅延の変動による影響≫
以下、図4〜図7に基づき伝送遅延の変動に対する「PTP」時刻補正について説明する。ここで図4(a),図5(a),図6(a),図7(a)の縦軸は「PTP」パケットの往復時間(図2のT1+T2)を示し、横軸は経過時間を示している。この各図中の矢印Dは、伝送路にかかる往復時間(伝送路時間:光速の70%の伝送速度での時間)を示している。
≪Effect of fluctuation of transmission delay≫
Hereinafter, “PTP” time correction for fluctuations in transmission delay will be described with reference to FIGS. 4 to 7. Here, the vertical axis of FIGS. 4 (a), 5 (a), 6 (a), and 7 (a) shows the round-trip time of the "PTP" packet (T1 + T2 of FIG. 2), and the horizontal axis shows the elapsed time. Is shown. The arrow D in each figure indicates the round-trip time (transmission line time: time at a transmission speed of 70% of the speed of light) required for the transmission line.

図4(b),図5(b),図6(b),図7(b)(c)は、基準時計(「GM」1の内部時計4aなど)とスレーブ側の装置の内部時計との差分、即ち時刻の誤差の変動を示している。 4 (b), 5 (b), 6 (b), 7 (b) and (c) show the reference clock (such as the internal clock 4a of "GM" 1) and the internal clock of the slave side device. The difference between the two, that is, the fluctuation of the time error is shown.

(1)図4(a)の伝送路状況例1においては、「PTP」パケットの往復時間が伝送路時間にほぼ等しく、その精度は高い。その結果、図4(b)の矢印Fに示すように時間差は、ほぼ毎回「0」に近く、精度が高い。 (1) In the transmission line condition example 1 of FIG. 4A, the round-trip time of the “PTP” packet is substantially equal to the transmission line time, and the accuracy is high. As a result, as shown by the arrow F in FIG. 4B, the time difference is close to "0" almost every time, and the accuracy is high.

ただし、矢印Eに示す1回だけ往復時間が長く、測定誤差が大きい。この測定値を使って「PTP」時刻補正を実行すると大きな変動を生じる。この場合には従来方法により該測定値は破棄されるため、伝送路遅延の変動は小さいが、時間経過により誤差は増大する。 However, the round trip time is long only once indicated by the arrow E, and the measurement error is large. Performing "PTP" time correction using this measurement causes large fluctuations. In this case, since the measured value is discarded by the conventional method, the fluctuation of the transmission line delay is small, but the error increases with the passage of time.

(2)図5(a)の伝送路状況例2においては、矢印E1の「PTP」パケットの往復以降は伝送時間が増大し、[今回の測定誤差]の大きい状態が継続している。このとき従来方法では「PTP」時刻補正ができず、図5(b)の矢印F1に示すように時刻の誤差は増大していくこととなる。 (2) In the transmission line condition example 2 of FIG. 5A, the transmission time increases after the round trip of the “PTP” packet of arrow E1, and the state of large [current measurement error] continues. At this time, the "PTP" time correction cannot be performed by the conventional method, and the time error increases as shown by the arrow F1 in FIG. 5 (b).

(3)例えばPTP未対応の通信機器による伝送時間の増大は伝送負荷により発生する。そのため、図4,5に示すように伝送時間の増大が発生する場合もあれば、図6に示すように稀に高精度の測定が可能な状況もある。図6の場合、従来方法によれば、誤差の少ないときに「PTP」時刻補正を行うことができる。 (3) For example, an increase in transmission time due to a communication device that does not support PTP occurs due to a transmission load. Therefore, as shown in FIGS. 4 and 5, the transmission time may increase, and as shown in FIG. 6, in rare cases, high-precision measurement is possible. In the case of FIG. 6, according to the conventional method, "PTP" time correction can be performed when the error is small.

(4)従来方法のように伝送時間が[最小の往復時間]に近いときしか時刻補正ができないと図5に示す状態となる。そこで、前記時刻補正方法は、[今回の測定誤差]が[推定精度]よりも小さくなったときに時刻補正を実施する。ここでは式3により時間が経過すれば、[推定精度]が増大するため、[今回の測定値]の値を越えたときに時刻補正が実行される。この点が図7に示されている。 (4) If the time can be corrected only when the transmission time is close to the [minimum round-trip time] as in the conventional method, the state shown in FIG. 5 is obtained. Therefore, in the time correction method, the time is corrected when the [current measurement error] becomes smaller than the [estimation accuracy]. Here, since the [estimation accuracy] increases as time elapses according to the equation 3, the time correction is executed when the value of the [measured value this time] is exceeded. This point is shown in FIG.

図7(a)に示すように、図5と同様に矢印E3の「PTP」パケットの往復以降は伝送時間が増大し、[今回の測定誤差]の大きい状態を続いている。このとき図7(b)の矢印E4に示す「PTP」パケットの往復時には{[今回の測定誤差(A/2)]<[推定精度(B)]}が成立し、時刻補正が実施される。 As shown in FIG. 7A, the transmission time has increased after the round trip of the “PTP” packet of arrow E3 as in FIG. 5, and the state of large [current measurement error] continues. At this time, {[measurement error (A / 2)] << [estimation accuracy (B)]} is established during the round trip of the “PTP” packet shown by the arrow E4 in FIG. 7 (b), and the time correction is performed. ..

ここでは時刻補正が施されたので、[推定精度(B)]は[今回の測定精度(A/2)]となり、図7(c)に示すように[推定精度]は[今回の測定誤差(A/2)]から時間経過により増大していく(同図中の「β」は該増加分を示している。)。 Since the time has been corrected here, the [estimation accuracy (B)] is [current measurement accuracy (A / 2)], and the [estimation accuracy] is [current measurement error] as shown in FIG. 7 (c). (A / 2)] increases with the passage of time (“β” in the figure indicates the increase).

このように前記時刻補正方法によれば、「PTP」時刻補正において測定誤差の推定精度に対する大小に基づき時刻補正をするか否かが判定することにより、精度と安定性を得ることが可能となる。なお、時刻の精度は、伝送路における遅延時間の状況により定まる。 As described above, according to the time correction method, accuracy and stability can be obtained by determining whether or not to perform time correction based on the magnitude of the estimated accuracy of the measurement error in the "PTP" time correction. .. The accuracy of the time is determined by the situation of the delay time in the transmission line.

1…マスター側の装置(マスター装置)
2a,2b…スレーブ側の装置(スレーブ装置)
4a〜4c…内部時計
5a〜5c…水晶
1 ... Master device (master device)
2a, 2b ... Slave side device (slave device)
4a-4c ... Internal clock 5a-5c ... Crystal

Claims (6)

マスター側の装置とスレーブ側の装置との間でパケットを往復させ、該往復の時刻に基づき前記スレーブ側の装置の時刻を補正する方法であって、
前記パケットの最小往復時間と実際の前記パケットの往復時間との時間差に基づき測定誤差を算出する測定誤差算出ステップと、
前記スレーブ側の装置の内部時計のクロックに対する調整量の記録に基づき最大調整量を取得し、取得した最大調整量と前回調整後の経過時間とに基づき推定精度を算出する推定精度算出ステップと、を有し、
推定精度算出ステップで算出された推定精度より測定誤差算出ステップで算出された測定誤差が大きければ、
前記往復時間の測定値を前記スレーブ側の装置の時刻補正に使用しないことを特徴とする時刻補正方法。
It is a method of reciprocating a packet between a device on the master side and a device on the slave side, and correcting the time of the device on the slave side based on the time of the reciprocation.
A measurement error calculation step of calculating a measurement error based on the time difference between the minimum round-trip time of the packet and the actual round-trip time of the packet, and
An estimation accuracy calculation step of acquiring the maximum adjustment amount based on the recording of the adjustment amount with respect to the clock of the internal clock of the device on the slave side and calculating the estimation accuracy based on the acquired maximum adjustment amount and the elapsed time after the previous adjustment. Have,
If the measurement error calculated in the measurement error calculation step is larger than the estimation accuracy calculated in the estimation accuracy calculation step,
A time correction method characterized in that the measured value of the round trip time is not used for time correction of the slave side device.
前記測定誤差算出ステップにおいて最小往復時間は、
伝送路の距離と中継装置の段数とに基づく算出と、
過去の往復時間の測定記録に基づく最小値の取得と、
のいずれかにより求められることを特徴とする請求項1記載の時刻補正方法。
The minimum round trip time in the measurement error calculation step is
Calculation based on the distance of the transmission line and the number of stages of the relay device,
Acquisition of the minimum value based on the measurement record of the past round trip time,
The time correction method according to claim 1, wherein the time correction method is obtained by any of the above.
前記測定誤差算出ステップにおいて前記測定誤差は、
[測定誤差]=([往復時間]−[最小往復時間])/2
により算出されることを特徴とする請求項1または2に記載の時刻補正方法。
In the measurement error calculation step, the measurement error is
[Measurement error] = ([Round trip time]-[Minimum round trip time]) / 2
The time correction method according to claim 1 or 2, wherein the time is calculated according to the above.
推定精度算出ステップにおいて推定精度は、
[推定精度]=[最大調整量]×[前回調整後の経過時間]
により算出されることを特徴とする請求項1〜3のいずれか1項に記載の時刻補正方法。
Estimation accuracy In the calculation step, the estimation accuracy is
[Estimation accuracy] = [Maximum adjustment amount] x [Elapsed time after the previous adjustment]
The time correction method according to any one of claims 1 to 3, wherein the time is calculated according to the above.
前記推定精度が事前設定の目標精度よりも悪ければ、精度異常を出力する出力ステップをさらに有する
ことを特徴とする請求項1〜4のいずれか1項に記載の時刻補正方法。
The time correction method according to any one of claims 1 to 4, further comprising an output step for outputting an accuracy abnormality if the estimated accuracy is worse than a preset target accuracy.
前記推定精度算出ステップにおいて、
前記調整量の記録は一定時間経過後に破棄されることを特徴とする請求項1〜5のいずれか1項に記載の時刻補正方法。
In the estimation accuracy calculation step
The time correction method according to any one of claims 1 to 5, wherein the record of the adjustment amount is discarded after a lapse of a certain period of time.
JP2017054088A 2017-03-21 2017-03-21 Time correction method Active JP6834642B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017054088A JP6834642B2 (en) 2017-03-21 2017-03-21 Time correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017054088A JP6834642B2 (en) 2017-03-21 2017-03-21 Time correction method

Publications (2)

Publication Number Publication Date
JP2018155679A JP2018155679A (en) 2018-10-04
JP6834642B2 true JP6834642B2 (en) 2021-02-24

Family

ID=63717323

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017054088A Active JP6834642B2 (en) 2017-03-21 2017-03-21 Time correction method

Country Status (1)

Country Link
JP (1) JP6834642B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020183572A1 (en) * 2019-03-11 2020-09-17 三菱電機株式会社 Slave apparatus, time synchronization program, embedded system, and time synchronization method
JP7116706B2 (en) * 2019-05-09 2022-08-10 株式会社日立製作所 Communication control device and communication control method
EP3835821A1 (en) * 2019-12-12 2021-06-16 Siemens Aktiengesellschaft Method and device for determining a safe distance
JP7435281B2 (en) 2020-06-12 2024-02-21 株式会社明電舎 Network device detection method, communication control method, time synchronization method
CN116347582A (en) * 2021-12-23 2023-06-27 华为技术有限公司 Communication method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09230071A (en) * 1996-02-27 1997-09-05 Oki Tsushin Syst Kk Time adjusting method for software timepiece
JP4766128B2 (en) * 2009-02-27 2011-09-07 ソニー株式会社 Slave device, slave device time synchronization method, and electronic device system
US20110035511A1 (en) * 2009-08-07 2011-02-10 Cisco Technology, Inc. Remote Hardware Timestamp-Based Clock Synchronization
JP2014202734A (en) * 2013-04-10 2014-10-27 株式会社小野測器 Slave unit, master slave system, and time synchronization method
JP6501138B2 (en) * 2014-07-18 2019-04-17 セイコーソリューションズ株式会社 Delay measurement method, delay measurement device, and program

Also Published As

Publication number Publication date
JP2018155679A (en) 2018-10-04

Similar Documents

Publication Publication Date Title
JP6834642B2 (en) Time correction method
US7379480B2 (en) Fast frequency adjustment method for synchronizing network clocks
US11316605B2 (en) Method, device, and computer program for improving synchronization of clocks in devices linked according to a daisy-chain topology
EP2801162B1 (en) Method and apparatus for communicating time information between time-aware devices
US11099599B2 (en) Communication device, cascaded network and internal synchronization method
JP2010527193A (en) Method and network component for synchronizing a clock of a network component to a clock of another network component
WO2017063450A1 (en) Timestamp filtering method and apparatus
US10594424B2 (en) Time synchronization slave apparatus capable of adjusting time synchronization period, and method of determining time synchronization period
WO2013051447A1 (en) Time control device, time control method, and program
JP2014027437A (en) Communication device, communication system, synchronization processing method, and program
US20130243140A1 (en) Method for Transmitting Synchronization Messages in a Communication Network
CN104243129A (en) Receiver, method of calculating time difference, and program
US20220248353A1 (en) Synchronization method and device
CN114157381A (en) Network delay jitter-oriented dynamic delay estimation period adjustment method
US20200382233A1 (en) Information processing apparatus and time synchronization method
JP5675703B2 (en) Communication device, control device, and program
Wu et al. Synchronizing device clocks using IEEE 1588 and Blackfin embedded processors
JP5391964B2 (en) Clock synchronization method and packet communication system
CN113037418B (en) Error correction method and related device for network time service
JPH10142361A (en) Time synchronization system of transmission network
JP6907684B2 (en) Time synchronization device, time synchronization method and time synchronization program
US12003613B2 (en) Method for synchronizing time in an ethernet-based network
US20220271913A1 (en) Method for synchronizing time in an ethernet-based network
JP2019033333A (en) Time synchronization method
JP2014165581A (en) Time synchronization system, time synchronization method, slave node and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201124

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: 20210105

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210118

R150 Certificate of patent or registration of utility model

Ref document number: 6834642

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150