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

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

Info

Publication number
JP6907684B2
JP6907684B2 JP2017094323A JP2017094323A JP6907684B2 JP 6907684 B2 JP6907684 B2 JP 6907684B2 JP 2017094323 A JP2017094323 A JP 2017094323A JP 2017094323 A JP2017094323 A JP 2017094323A JP 6907684 B2 JP6907684 B2 JP 6907684B2
Authority
JP
Japan
Prior art keywords
time
internal clock
clock
inclination
reference clock
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
JP2017094323A
Other languages
Japanese (ja)
Other versions
JP2018189592A (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 JP2017094323A priority Critical patent/JP6907684B2/en
Publication of JP2018189592A publication Critical patent/JP2018189592A/en
Application granted granted Critical
Publication of JP6907684B2 publication Critical patent/JP6907684B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electric Clocks (AREA)

Description

本発明はネットワークの時刻同期の技術に関する。 The present invention relates to a network time synchronization technique.

IEEE1588PTP(Precision Time Protocol)は、ネットワークに属する各装置の時刻情報を基準の時刻情報に基づき同期するためのプロトコルである。このプロトコルに基づく時刻同期方式は、時刻同期処理の演算により基準時刻とネットワークの各装置の時刻との時間差が得られるので当該各装置の内部時計が進む速度を調整して当該基準時刻と同期させることができる。そして、このとき得られた時間差は伝送遅延の変動に誤差を含み、正確ではないのでサーボ制御が適用されることが多い(例えば、特許文献1)。 IEEE1588 PTP (Precision Time Protocol) is a protocol for synchronizing the time information of each device belonging to the network based on the reference time information. In the time synchronization method based on this protocol, the time difference between the reference time and the time of each device in the network can be obtained by the calculation of the time synchronization process, so the speed at which the internal clock of each device advances is adjusted to synchronize with the reference time. be able to. The time difference obtained at this time includes an error in the fluctuation of the transmission delay and is not accurate, so servo control is often applied (for example, Patent Document 1).

国際公開第2011/077558号International Publication No. 2011/077558

IEEE1588PTPはPTPパケットの往復時間を正確に得ることにより基準時計とネットワーク上の各装置の時計(内部時計)の時間差を算出することができる。そのネットワークがPTP対応の装置だけで構成されていれば正確となる。 The IEEE1588 PTP can calculate the time difference between the reference clock and the clock (internal clock) of each device on the network by accurately obtaining the round-trip time of the PTP packet. It will be accurate if the network is composed only of PTP-compatible devices.

しかしながら、IEEE1588PTPに対応していないネットワークでは、伝送時間が変動するので、誤差を含むので、前記装置の内部時計の調整においてサーボ制御が適用されている。 However, in a network that does not support IEEE1588PTP, since the transmission time fluctuates and includes an error, servo control is applied in the adjustment of the internal clock of the device.

例えば、PTPパケットは、L2スイッチを経由して到達するとき、一つのポートからPTPパケットが他のポートに送信される間はその送信完了を待つことになる。そして、その待ち時間はパケットサイズやパケット数により変動する。そのため、待った時間の1/2の時間だけ時間差が生じる。PTPパケットは往復しているが、その行きと帰りで待ち時間が異なり、時間の誤差が遅れ方向と進み方向に生じる。 For example, when a PTP packet arrives via the L2 switch, it waits for the completion of transmission while the PTP packet is transmitted from one port to another port. The waiting time varies depending on the packet size and the number of packets. Therefore, a time difference occurs by 1/2 of the waiting time. Although the PTP packet makes a round trip, the waiting time differs between the going and returning, and a time error occurs in the delay direction and the advance direction.

一般にサーボ制御は、外乱対策として現在の測定値と目標値の差分に基づくPID制御により目標時に近づくように調整する。 Generally, the servo control is adjusted so as to approach the target time by PID control based on the difference between the current measured value and the target value as a measure against disturbance.

一方、PTP時計は正確に調整できることに加えて外乱も生じないのでサーボ制御は不要となる。しかしながら、伝送遅延時間の変動により、測定値に誤差を含むので正確に調整できないことがあるので結局のところサーボ制御が必要となる。 On the other hand, since the PTP clock can be adjusted accurately and does not cause disturbance, servo control becomes unnecessary. However, due to fluctuations in the transmission delay time, it may not be possible to make accurate adjustments because the measured values include errors, so servo control is required after all.

サーボ制御は次の問題がある。時刻同期が完了するまでに長い時間を要する(例えば、1〜20分程度)。PTPパケットの伝送時間が往復で均等でない状態が継続すると正しい時間には同期できないことがある。 Servo control has the following problems. It takes a long time to complete the time synchronization (for example, about 1 to 20 minutes). If the transmission time of the PTP packet continues to be uneven on a round trip, it may not be possible to synchronize at the correct time.

PTPに対応していない装置が存在する場合にはサーボ制御が採用されるが、PTP対応の装置で構成されたシステムまたはネットワークを直結したシステムであればサーボ制御を利用する理由はない。 Servo control is adopted when there is a device that does not support PTP, but there is no reason to use servo control if it is a system composed of PTP-compatible devices or a system directly connected to a network.

本発明は、上記の事情に鑑み、サーボ制御を要することなく時刻同期の応答性の向上及び短縮化を図ることを課題とする。 In view of the above circumstances, it is an object of the present invention to improve and shorten the responsiveness of time synchronization without requiring servo control.

そこで、本発明の一態様は、ネットワークに属する装置の内部時計を当該ネットワークの基準時計と同期させる時刻同期装置であって、前記内部時計と前記基準時計の時刻変化に基づき当該内部時計の時刻変化の傾きを補正するための調整量を算出する調整量演算部と、前記調整量に基づき前記内部時計の傾きを補正することにより当該内部時計と前記基準時計の時刻変化の傾きを一致させる傾き補正部と、前記傾きをさらに補正して前記内部時計の時刻値を前記基準時計の時刻値と一致させた後に当該傾きを前記基準時計の時刻変化の傾きと一致させる時刻補正部とを備える。 Therefore, one aspect of the present invention is a time synchronization device that synchronizes the internal clock of the device belonging to the network with the reference clock of the network, and the time change of the internal clock is based on the time change of the internal clock and the reference clock. The adjustment amount calculation unit that calculates the adjustment amount for correcting the inclination of the internal clock, and the inclination correction that corrects the inclination of the internal clock based on the adjustment amount to match the inclination of the time change of the internal clock and the reference clock. A unit and a time correction unit that further corrects the inclination to match the time value of the internal clock with the time value of the reference clock and then matches the inclination with the inclination of the time change of the reference clock.

前記調整量演算部の一態様は、前回の時刻同期時の前記基準時計と前記内部時計の時刻値の差と今回の時刻同期時の当該基準時計と当該内部時計の時刻値の差に基づき前記調整量を算出する。 One aspect of the adjustment amount calculation unit is based on the difference between the time values of the reference clock and the internal clock at the time of the previous time synchronization and the difference between the time values of the reference clock and the internal clock at the time of the current time synchronization. Calculate the adjustment amount.

前記調整量演算部の一態様は、前記今回の時刻同期の後に、前記内部時計の1秒間で当該内部時計の時刻変化の傾きを補正する。 One aspect of the adjustment amount calculation unit corrects the inclination of the time change of the internal clock in one second of the internal clock after the time synchronization of this time.

本発明の一態様は、ネットワークに属する装置の内部時計を当該ネットワークの基準時計と同期させる時刻同期装置が実行する時刻同期方法であって、前記内部時計と前記基準時計の時刻変化に基づき当該内部時計の時刻変化の傾きを補正するための調整量を算出する過程と、前記調整量に基づき前記内部時計の傾きを補正することにより当該内部時計と前記基準時計の時刻変化の傾きを一致させる過程と、前記傾きをさらに補正して前記内部時計の時刻値を前記基準時計の時刻値と一致させた後に当該傾きを前記基準時計の時刻変化の傾きと一致させる過程とを有する。 One aspect of the present invention is a time synchronization method executed by a time synchronization device that synchronizes an internal clock of a device belonging to a network with a reference clock of the network, and the internal clock is based on a time change between the internal clock and the reference clock. The process of calculating the adjustment amount for correcting the inclination of the time change of the clock and the process of matching the inclination of the time change of the internal clock and the reference clock by correcting the inclination of the internal clock based on the adjustment amount. The process includes a process of further correcting the inclination to match the time value of the internal clock with the time value of the reference clock, and then matching the inclination with the inclination of the time change of the reference clock.

尚、本発明は、コンピュータを上記の時刻同期装置として機能させる時刻同期プログラムの態様することもできる。 The present invention can also be an aspect of a time synchronization program that causes the computer to function as the time synchronization device described above.

以上の本発明によれば、サーボ制御を要することなく時刻同期の応答性の向上及び短縮化を図ることができる。 According to the above invention, it is possible to improve and shorten the responsiveness of time synchronization without requiring servo control.

本発明の実施形態における時刻同期システムのブロック構成図。The block block diagram of the time synchronization system in embodiment of this invention. 前記実施形態における時刻同期装置のブロック構成図。The block block diagram of the time synchronization apparatus in the said embodiment. ネットワークの基準時計と当該ネットワークに属する装置の内部時計の時刻値を経時的に示したグラフ。A graph showing the time values of the reference clock of the network and the internal clock of the device belonging to the network over time. 前記内部時計の時刻変化の傾きを補正する過程を説明したグラフ。The graph explaining the process of correcting the inclination of the time change of the internal clock. 所定時間以内に前記傾きを補正する過程を説明したグラフ。The graph explaining the process of correcting the inclination within a predetermined time. 前記補正の後に前記内部時計を前記基準時計と同期させる過程を説明したグラフ。The graph explaining the process of synchronizing the internal clock with the reference clock after the correction.

以下に図面を参照しながら本発明の実施形態について説明する。 An embodiment of the present invention will be described below with reference to the drawings.

[本実施形態の概要及び構成]
図1に示した本実施形態の時刻同期システム1はネットワーク2のIEEE1588PTP(以下、PTP)に基づく時刻同期システムの一例である。
[Outline and configuration of this embodiment]
The time synchronization system 1 of the present embodiment shown in FIG. 1 is an example of a time synchronization system based on the IEEE1588 PTP (hereinafter, PTP) of the network 2.

ネットワーク2は、管理サーバ30が属するローカルネットワーク3と、複数の装置6が属するローカルネットワーク4と、このローカルネットワーク3,4を接続する広域ネットワーク5とを有する。そして、個々の装置6は本発明の一態様である時刻同期装置10を備える。 The network 2 includes a local network 3 to which the management server 30 belongs, a local network 4 to which a plurality of devices 6 belong, and a wide area network 5 connecting the local networks 3 and 4. Then, each device 6 includes a time synchronization device 10 which is one aspect of the present invention.

図3に例示したグラフにおいて、縦軸は本態様のネットワーク2の基準時計31とネットワーク2に属する装置6の内部時計61の時刻値を示し、横軸は時間を示す。図示のように時間が経過すると前記時刻値は増大する。基準時計31及び内部時計61は、水晶振動子等の水晶デバイスの周波数に基づき進行するものであるが、周波数に誤差が生じるので、時刻値の経過の傾きが相違し、両者の時刻値の差は経時的に増大する。 In the graph illustrated in FIG. 3, the vertical axis represents the time value of the reference clock 31 of the network 2 of this embodiment and the internal clock 61 of the device 6 belonging to the network 2, and the horizontal axis represents the time. As shown in the figure, the time value increases as time elapses. The reference clock 31 and the internal clock 61 advance based on the frequency of a crystal device such as a crystal oscillator, but since an error occurs in the frequency, the inclination of the passage of time value is different, and the difference between the time values of the two. Increases over time.

ここで、1回目のPTP処理(PTPに基づく時刻同期)が実行されると基準時計31と内部時計61の時間差Diff_Aを得ることができる。次いで、2回目のPTP処理が実行されると、さらに、この基準時計31と内部時計61の時間差Diff_Bを得ることができる。この1回目,2回目のPTP処理のタイミングT2_A,T2_Bは基準時計31がPTPパケットを送信したタイミングであり、個々の装置6での任意のタイミングで処理が実行できない。 Here, when the first PTP process (time synchronization based on PTP) is executed, the time difference Diff_A between the reference clock 31 and the internal clock 61 can be obtained. Then, when the second PTP process is executed, the time difference Diff_B between the reference clock 31 and the internal clock 61 can be further obtained. The timings T2_A and T2_B of the first and second PTP processing are the timings at which the reference clock 31 transmits the PTP packet, and the processing cannot be executed at arbitrary timings in the individual devices 6.

そこで、前記得られた二つの時間差の差分を以下の式(1)のように1回目と2回目の経過時間で除すれば基準時計31と内部時計61の時刻変化の傾きの差が得られる。この差の値は、内部時計61と基準時計31の前記傾きを一致させるための単位時間当たりの調整量となる。 Therefore, if the difference between the two obtained time differences is divided by the elapsed time of the first time and the second time as shown in the following equation (1), the difference in the slope of the time change between the reference clock 31 and the internal clock 61 can be obtained. .. The value of this difference is an adjustment amount per unit time for matching the inclinations of the internal clock 61 and the reference clock 31.

(単位時間当たりの調整量)=(Diff_B−Diff_A)/(T2_B−T2_A)…(1)
この調整量を適用した事例を図4,5に示す。内部時計61の時刻値の進む速度を変更する方法は水晶デバイスの周波数をカウントしたときのカウント数を少なくすれば時計は早く進み、大きくすれば時計は遅く進むことになる。前記調整としては、内部時計61の機構に依り異なり、例えば、図4に示した任意のタイミングで調整を行う方式と、図5に示した内部時計の1秒の区切りで調整を行う方式が挙げられる。
(Adjustment amount per unit time) = (Diff_B-Diff_A) / (T2_B-T2_A) ... (1)
Examples of applying this adjustment amount are shown in FIGS. 4 and 5. The method of changing the advancing speed of the time value of the internal clock 61 is that if the number of counts when counting the frequency of the crystal device is reduced, the clock advances faster, and if it is increased, the clock advances slower. The adjustment differs depending on the mechanism of the internal clock 61, and examples thereof include a method of adjusting at an arbitrary timing shown in FIG. 4 and a method of adjusting the internal clock shown in FIG. 5 at 1-second intervals. Be done.

図4,5の調整方式においては、内部時計61の現在の速度を基準時計31の時刻変化の傾きに合わせるために単位時間当たりの調整量を加算した値とする。 In the adjustment methods of FIGS. 4 and 5, the current speed of the internal clock 61 is set to a value obtained by adding the adjustment amount per unit time in order to match the slope of the time change of the reference clock 31.

また、図5の方式では、補正するまでの最大1.0秒の待機がある。PTPパケットの送信するタイミングは基準時刻に基づくものであるが、時計の1秒のタイミングとは関係がない。既に時刻同期の調整が一度行われていれば、基準時計31と内部時計61の傾きは略同等であり影響は小さい。もし時刻同期の揺れを小さくしたい場合には図6に示された調整により時間差を解消できる。 Further, in the method of FIG. 5, there is a waiting time of up to 1.0 second until the correction is made. The timing of transmitting the PTP packet is based on the reference time, but has nothing to do with the timing of 1 second of the clock. If the time synchronization has already been adjusted once, the inclinations of the reference clock 31 and the internal clock 61 are substantially the same, and the influence is small. If it is desired to reduce the fluctuation of the time synchronization, the time difference can be eliminated by the adjustment shown in FIG.

図4により内部時計61の時刻値の傾きを基準時計31に一致させることができるが、その時点ではDiff_Bの時間差が残っており、図5に示したように、基準時計31と内部時計61の時刻値は平行線を辿ることになる。 According to FIG. 4, the slope of the time value of the internal clock 61 can be made to match the reference clock 31, but at that time, the time difference of Diff_B remains, and as shown in FIG. 5, the reference clock 31 and the internal clock 61 The time value follows parallel lines.

そこで、図6に例示した内部時計61の時刻の補正を行う。すなわち、内部時計61の次の1秒間の時間帯で基準時計31と内部時計61の時刻差が0となるように内部時計61の時刻変化の傾き(式(2))を調整する。さらに、この傾きを基準時計31の時刻変化の傾きと一致させると、内部時計61は基準時計31と同期した時刻となる。尚、時刻同期装置10のハードウェアが内部時計61を任意の期間で正確に調整できるのであれば1秒に限定する必要はない。 Therefore, the time of the internal clock 61 illustrated in FIG. 6 is corrected. That is, the slope of the time change of the internal clock 61 (Equation (2)) is adjusted so that the time difference between the reference clock 31 and the internal clock 61 becomes 0 in the time zone of 1 second next to the internal clock 61. Further, when this inclination is matched with the inclination of the time change of the reference clock 31, the internal clock 61 becomes the time synchronized with the reference clock 31. If the hardware of the time synchronization device 10 can accurately adjust the internal clock 61 in an arbitrary period, it is not necessary to limit the time to 1 second.

(1秒間の傾き)=(現在の傾き)−(Diff_B/1秒)…(2)
以上のように2回のPTP処理により測定する期間と、その結果から内部時計61を調整する期間がある。この二つの期間を同時に実施することは可能であるが複雑であり、応答性が少し改善する。
(Inclination for 1 second) = (Current inclination)-(Diff_B / 1 second) ... (2)
As described above, there is a period of measurement by two PTP treatments and a period of adjusting the internal clock 61 from the result. It is possible to carry out these two periods at the same time, but it is complicated and the responsiveness is slightly improved.

図2に例示の本実施形態の時刻同期装置10の構成例について説明する。 A configuration example of the time synchronization device 10 of the present embodiment illustrated in FIG. 2 will be described.

時刻同期装置10は、コンピュータのハードウェア資源とソフトウェア資源との協働により、調整量演算部11、傾き補正部12及び時刻補正部13を実装する。 The time synchronization device 10 implements the adjustment amount calculation unit 11, the tilt correction unit 12, and the time correction unit 13 in collaboration with the hardware resources and software resources of the computer.

調整量演算部11は、内部時計61と基準時計31の時刻変化に基づき内部時計61の時刻変化の傾きを補正するための調整量を算出する。具体的には前回の時刻同期時の基準時計31と内部時計61の時刻値の差と今回の時刻同期時の基準時計31と内部時計61の時刻値の差に基づき前記調整量を算出する。より具体的には前記前回から前記今回までの期間が1秒間である場合の前記調整量が挙げられる。 The adjustment amount calculation unit 11 calculates an adjustment amount for correcting the inclination of the time change of the internal clock 61 based on the time change of the internal clock 61 and the reference clock 31. Specifically, the adjustment amount is calculated based on the difference between the time values of the reference clock 31 and the internal clock 61 at the time of the previous time synchronization and the difference between the time values of the reference clock 31 and the internal clock 61 at the time of the current time synchronization. More specifically, the adjustment amount when the period from the previous time to the present time is 1 second can be mentioned.

傾き補正部12は、前記調整量に基づき内部時計61の傾きを補正することにより内部時計61と基準時計31の時刻変化の傾きを一致させる。例えば、前記前回から前記今回までの期間が1秒間である場合の前記調整量に基づき内部時計61の傾きを補正することにより内部時計61と基準時計31の時刻変化の傾きを一致させる。 The inclination correction unit 12 corrects the inclination of the internal clock 61 based on the adjustment amount to match the inclinations of the time changes of the internal clock 61 and the reference clock 31. For example, by correcting the inclination of the internal clock 61 based on the adjustment amount when the period from the previous time to the present time is 1 second, the inclinations of the time changes of the internal clock 61 and the reference clock 31 are matched.

時刻補正部13は、前記傾きをさらに補正して内部時計61の時刻値を基準時計31の時刻値と一致させた後に当該傾きを基準時計31の時刻変化の傾きと一致させる。 The time correction unit 13 further corrects the inclination to match the time value of the internal clock 61 with the time value of the reference clock 31, and then matches the inclination with the inclination of the time change of the reference clock 31.

[本実施形態の動作例]
以下に実施形態の時刻同期装置10の具体的な動作例について説明する。
[Operation example of this embodiment]
A specific operation example of the time synchronization device 10 of the embodiment will be described below.

時刻同期装置10は、PTP処理により得られた時間差が所定の値、例えば、1秒よりも大きい場合、内部時計61の年月日分秒の単位を合わせる。このとき、1秒未満の時間差と内部時計61の水晶デバイスの精度により時刻値の進み速度に差異が存在する。最初は水晶デバイスの標準周波数で時間が生成されており、内部時計61の調整が実行されていないので、内部時計61の時刻変化の傾きが0として記録する。 When the time difference obtained by the PTP processing is larger than a predetermined value, for example, 1 second, the time synchronization device 10 adjusts the unit of the year, month, day, minute, and second of the internal clock 61. At this time, there is a difference in the advancing speed of the time value due to the time difference of less than 1 second and the accuracy of the crystal device of the internal clock 61. Initially, the time is generated at the standard frequency of the crystal device, and the adjustment of the internal clock 61 is not executed. Therefore, the slope of the time change of the internal clock 61 is recorded as 0.

基準時計31は、任意のタイミングでPTPに基づくSyncパケットを送信する。装置6側の時刻同期装置10は、前記Syncパケットを受信すると、Delay_Reqパケットを基準時計31に返信する。その後、時刻同期装置10は、基準時計31からDelay_Respパケットの返信を受けると、PTP演算により基準時計31と内部時計61の時間差を算出する。この時間差は、1回目の時間差Diff_Aとして、時刻同期装置10の記憶部に記録され、さらに、内部時計61の時刻T2_Aは当該記憶部に記録される。その後、時刻同期装置10は、基準時計31からの次のSyncパケットを受信すると、2回目の時間差Diff_Bとこのときの時刻T2_Bを前記記憶部に記録する。 The reference clock 31 transmits a Sync packet based on PTP at an arbitrary timing. When the time synchronization device 10 on the device 6 side receives the Sync packet, it returns the Delay_Req packet to the reference clock 31. After that, when the time synchronization device 10 receives the reply of the Delay_Resp packet from the reference clock 31, the time synchronization device 10 calculates the time difference between the reference clock 31 and the internal clock 61 by the PTP calculation. This time difference is recorded in the storage unit of the time synchronization device 10 as the first time difference Diff_A, and the time T2_A of the internal clock 61 is recorded in the storage unit. After that, when the time synchronization device 10 receives the next Sync packet from the reference clock 31, the time synchronization device 10 records the second time difference Diff_B and the time T2_B at this time in the storage unit.

そして、時刻同期装置10は、以下のS1(調整量の演算)、S2(傾きの補正)、S3(時刻の補正)の過程の実行により、内部時計61を基準時計31と同期させる。 Then, the time synchronization device 10 synchronizes the internal clock 61 with the reference clock 31 by executing the following processes of S1 (calculation of adjustment amount), S2 (correction of inclination), and S3 (correction of time).

S1:調整量演算部11は、式(1)の演算により基準時計31と内部時計61の時刻変化の傾きを一致させるための調整量を算出する。 S1: The adjustment amount calculation unit 11 calculates the adjustment amount for matching the slopes of the time changes of the reference clock 31 and the internal clock 61 by the calculation of the equation (1).

S2:傾き補正部12は、内部時計61を基準時計31の進む速度に合わせるため、前記調整量に基づき内部時計61の時刻変化の傾きを補正することにより、内部時計61と基準時計31の時刻変化の傾きを一致させる。 S2: The inclination correction unit 12 corrects the inclination of the time change of the internal clock 61 based on the adjustment amount in order to adjust the internal clock 61 to the advancing speed of the reference clock 31, so that the time of the internal clock 61 and the reference clock 31 is adjusted. Match the slopes of change.

具体的には、以下の式(3)による演算により前記傾きを補正する。 Specifically, the inclination is corrected by the calculation according to the following equation (3).

傾き(補正後)
=傾き(前回値)−(単位時間当たりの調整量)
=傾き(前回値)−((Diff_B−Diff_A)/(T2_B−T2_A))…(3)
内部時計61の時刻が進んでいる場合、単位時間当たりの調整量は正の値となるので、補正前の内部時計61の時刻変化の傾きに対して減算する。本態様例では、内部時計61の水晶デバイスの周波数カウンタ値を増大させることにより、内部時計61の経過速度を遅く調整する。この周波数カウンタ値の調整は、以下の式(4)の演算より実行される。
Tilt (after correction)
= Slope (previous value)-(Adjustment amount per unit time)
= Slope (previous value)-((Diff_B-Diff_A) / (T2_B-T2_A)) ... (3)
When the time of the internal clock 61 is advanced, the adjustment amount per unit time is a positive value, so it is subtracted from the slope of the time change of the internal clock 61 before correction. In this embodiment, the elapsed speed of the internal clock 61 is adjusted to be slow by increasing the frequency counter value of the crystal device of the internal clock 61. The adjustment of the frequency counter value is executed by the calculation of the following equation (4).

周波数カウンタ値(補正後)
=周波数カウンタ値(前回値)+(1秒当たりの調整量)
=周波数カウンタ値(前回値)+(標準カウンタ値)×((Diff_B−Diff_A)/(T2_B−T2_A))…(4)
内部時計61の時刻調整において、上記調整後の周波数カウンタ値が適用されると、図4,5のように、内部時計61の時刻変化の傾きは基準時計31の時刻変化と同じ傾きに補正される。
Frequency counter value (after correction)
= Frequency counter value (previous value) + (adjustment amount per second)
= Frequency counter value (previous value) + (standard counter value) x ((Diff_B-Diff_A) / (T2_B-T2_A)) ... (4)
When the frequency counter value after the adjustment is applied in the time adjustment of the internal clock 61, the slope of the time change of the internal clock 61 is corrected to the same slope as the time change of the reference clock 31 as shown in FIGS. NS.

S3:時刻補正部13は、Diff_Bの時間差を解消するために、図6に示したように、内部時計61の次の1秒間の時間帯で以下の演算により得られた周波数カウンタ値を適用する。 S3: The time correction unit 13 applies the frequency counter value obtained by the following calculation in the time zone of the next 1 second of the internal clock 61 as shown in FIG. 6 in order to eliminate the time difference of Diff_B. ..

すなわち、以下の演算により、内部時計61の次の1秒間の時間帯で基準時計31と内部時計61の時刻差が0となるように内部時計61の時刻変化の傾きを調整する。その後、この傾きをS2にて補正された基準時計31の時刻変化の傾きと一致させる。 That is, the inclination of the time change of the internal clock 61 is adjusted by the following calculation so that the time difference between the reference clock 31 and the internal clock 61 becomes 0 in the time zone of 1 second next to the internal clock 61. After that, this inclination is made to match the inclination of the time change of the reference clock 31 corrected in S2.

1秒間の傾き=(現在の傾き)−(Diff_B/1秒)
周波数カウンタ値(調整後)
=周波数カウンタ値(前回値)+(1秒間の調整量)
=周波数カウンタ値(前回値)+(標準カウンタ値)×(Diff_B/1秒)
尚、次の1秒まで待たされる時間を補正する場合は以下のようになる。
1 second tilt = (current tilt)-(Diff_B / 1 second)
Frequency counter value (after adjustment)
= Frequency counter value (previous value) + (adjustment amount per second)
= Frequency counter value (previous value) + (standard counter value) x (Diff_B / 1 second)
When correcting the time to wait until the next 1 second, it is as follows.

周波数カウンタ値(調整後)
=周波数カウンタ値(前回値)+(標準カウンタ値)×((Diff_B×(1+待ち時間[秒]))/1秒)
1秒間だけ周波数カウンタ値(調整後)を適用して、その後、元の周波数カウンタ値(前回値)に戻せば図6のように基準時計31と同期することができる。
Frequency counter value (after adjustment)
= Frequency counter value (previous value) + (standard counter value) x ((Diff_B x (1 + waiting time [seconds])) / 1 second)
If the frequency counter value (adjusted) is applied for only one second and then returned to the original frequency counter value (previous value), it can be synchronized with the reference clock 31 as shown in FIG.

以上の一連の処理は2〜3秒で完了するのでサーボ制御と比較して応答性が高くなる。 Since the above series of processes is completed in 2 to 3 seconds, the responsiveness is higher than that of the servo control.

水晶デバイスは長期的には温度や電圧による変動があり、短期的にはある周波数を中心とする変動がある。長期的な変動は十分追従できるが数秒程度の短期間で周波数が変動すると影響を受ける。 Quartz devices fluctuate due to temperature and voltage in the long term, and fluctuate around a certain frequency in the short term. Long-term fluctuations can be followed sufficiently, but if the frequency fluctuates in a short period of about several seconds, it will be affected.

以上のように本態様の時刻同期装置10によれば、内部時計61と基準時計31の時刻変化に基づき装置6の内部時計61の時刻変化の傾きが補正される。そして、この傾きが補正された内部時計61の時刻値が基準時計31の時刻値と一致するように補正される。 As described above, according to the time synchronization device 10 of the present embodiment, the inclination of the time change of the internal clock 61 of the device 6 is corrected based on the time change of the internal clock 61 and the reference clock 31. Then, the time value of the internal clock 61 whose inclination is corrected is corrected so as to match the time value of the reference clock 31.

本態様によれば、内部時計61の時刻の調整が短時間で完了する。例えば、サーボ制御は時刻同期に1〜20分を要するが、本態様の時刻同期方式によれば3〜30秒で1μsec以内に同期できる。 According to this aspect, the time adjustment of the internal clock 61 is completed in a short time. For example, servo control requires 1 to 20 minutes for time synchronization, but according to the time synchronization method of this embodiment, synchronization can be performed within 1 μsec in 3 to 30 seconds.

特に、前記補正された基準時計31の時刻変化の傾きが内部時計61の時刻の補正に適用されることにより、時刻同期装置の時刻同期の応答性が向上する。例えば、2〜3秒の応答時間となる。 In particular, by applying the slope of the time change of the corrected reference clock 31 to the time correction of the internal clock 61, the responsiveness of the time synchronization of the time synchronization device is improved. For example, the response time is 2-3 seconds.

また、内部時計61の時刻変化が基準時計31の時刻変化と一致した状態で内部時計61が基準時計31と同期するので、内部時計61と基準時計31との誤差を把握できるので、システム設計が容易となる。 Further, since the internal clock 61 synchronizes with the reference clock 31 in a state where the time change of the internal clock 61 matches the time change of the reference clock 31, the error between the internal clock 61 and the reference clock 31 can be grasped, so that the system design can be performed. It will be easy.

一方、従来技術であるサーボ制御は応答性が遅く、また、含まれる誤差が明確ではないため、システム設計が困難となる。 On the other hand, servo control, which is a conventional technique, has slow responsiveness and the included error is not clear, which makes system design difficult.

さらに、一定時間毎のPTP処理の継続と所定期間の内部時計61の時刻補正が排他的に実行されるので、当該PTP処理と当該時刻補正を同時に実行する場合と比べても演算が簡素となり、また、サーボ制御のPID制御のパラメータの設定が不要となる。 Further, since the continuation of the PTP processing at regular time intervals and the time correction of the internal clock 61 for a predetermined period are exclusively executed, the calculation becomes simpler than the case where the PTP processing and the time correction are executed at the same time. Further, it is not necessary to set the PID control parameter of the servo control.

また、前回のPTP処理の基準時計31と内部時計61の時刻値の差と当該前回から一秒後の当該時刻値の差に基づく内部時計61の時刻変化の補正が可能となっている。したがって、この同期方式が保護継電器などの高精度の同期性が要求されない電力設備に適用されることにより、高精度な基準時計を備える必要がないので、設備コストが低減する。そして、これにより、電力設備の低廉な冗長化が実現し、電力ネットワークシステムの可用性が向上する。 Further, it is possible to correct the time change of the internal clock 61 based on the difference between the time values of the reference clock 31 and the internal clock 61 of the previous PTP processing and the difference of the time values one second after the previous time. Therefore, by applying this synchronization method to electric power equipment such as a protective relay that does not require high-precision synchronization, it is not necessary to provide a high-precision reference clock, so that the equipment cost is reduced. As a result, low-cost redundancy of electric power equipment is realized, and the availability of the electric power network system is improved.

本発明の他の態様としては、時刻同期装置10の一部若しくは全てとしてコンピュータを機能させるプログラムで構成しこれを当該コンピュータに実行させることにより実現できる。または、時刻同期装置10が実行する時刻同期方法のS1〜S3の過程の一部若しくは全てをコンピュータに実行させるプログラムで構成しこれを当該コンピュータに実行させることにより実現できる。そして、このプログラム(時刻同期プログラム)をそのコンピュータが読み取り可能な周知の記録媒体に格納して提供できる。または、前記プログラムをインターネットや電子メール等でネットワークを介して提供できる。 Another aspect of the present invention can be realized by configuring a program that causes a computer to function as a part or all of the time synchronization device 10 and causing the computer to execute the program. Alternatively, it can be realized by configuring a program that causes a computer to execute a part or all of the processes of S1 to S3 of the time synchronization method executed by the time synchronization device 10, and causing the computer to execute the program. Then, this program (time synchronization program) can be stored and provided in a well-known recording medium that can be read by the computer. Alternatively, the program can be provided via a network via the Internet, e-mail, or the like.

本発明は、以上の実施形態に限定されるものではなく、本発明の特許請求の範囲内で様々な態様で実施が可能である。 The present invention is not limited to the above embodiments, and can be implemented in various embodiments within the scope of the claims of the present invention.

1…時刻同期システム
2…ネットワーク、31…基準時計
6…装置、61…内部時計
10…時刻同期装置
11…調整量演算部、12…傾き補正部、13…時刻補正部
1 ... Time synchronization system 2 ... Network, 31 ... Reference clock 6 ... Device, 61 ... Internal clock 10 ... Time synchronization device 11 ... Adjustment amount calculation unit, 12 ... Tilt correction unit, 13 ... Time correction unit

Claims (3)

ネットワークに属する装置の内部時計を当該ネットワークの基準時計と同期させる時刻同期装置であって、
前回の時刻同期時の前記基準時計と前記内部時計の時刻値の差と今回の時刻同期時の当該基準時計と当該内部時計の時刻値の差に基づき前記内部時計と前記基準時計との時刻変化の傾きを一致させるための調整量を算出する調整量演算部と、
前記今回の時刻同期の後に前記内部時計の1秒間の時間帯で前記調整量に基づき前記内部時計の時刻変化の傾きを補正することにより当該内部時計と前記基準時計の時刻変化の傾きを一致させる傾き補正部と、
前記内部時計のさらに次の1秒間の時間帯で前記傾きをさらに補正して前記内部時計の時刻値を前記基準時計の時刻値と一致させた後に当該傾きを前記基準時計の時刻変化の傾きと一致させる時刻補正部と
を備えたことを特徴とする時刻同期装置。
A time synchronization device that synchronizes the internal clock of a device belonging to a network with the reference clock of the network.
Time variation of the previous time the internal clock based on the difference of the synchronization time of the reference clock and the difference between the time value of the current time synchronization when the reference clock and the internal clock of the time value of the internal clock and the reference clock The adjustment amount calculation unit that calculates the adjustment amount to match the inclination of
After the current time synchronization, the inclination of the time change of the internal clock is corrected based on the adjustment amount in the time zone of 1 second of the internal clock so that the inclination of the time change of the internal clock and the reference clock are matched. Tilt correction unit and
After further correcting the inclination in the time zone of the next 1 second of the internal clock to match the time value of the internal clock with the time value of the reference clock, the inclination is referred to as the inclination of the time change of the reference clock. With the time correction unit to match
A time synchronization device characterized by being equipped with.
ネットワークに属する装置の内部時計を当該ネットワークの基準時計と同期させる時刻同期装置が実行する時刻同期方法であって、
前回の時刻同期時の前記基準時計と前記内部時計の時刻値の差と今回の時刻同期時の当該基準時計と当該内部時計の時刻値の差に基づき前記内部時計と前記基準時計との時刻変化の傾きを一致させるための調整量を算出する調整量演算過程と、
前記今回の時刻同期の後に前記内部時計の1秒間の時間帯で前記調整量に基づき前記内部時計の時刻変化の傾きを補正することにより当該内部時計と前記基準時計の時刻変化の傾きを一致させる傾き補正過程と、
前記内部時計のさらに次の1秒間の時間帯で前記傾きをさらに補正して前記内部時計の時刻値を前記基準時計の時刻値と一致させた後に当該傾きを前記基準時計の時刻変化の傾きと一致させる時刻補正過程と
を有することを特徴とする時刻同期方法。
A time synchronization method executed by a time synchronization device that synchronizes the internal clock of a device belonging to a network with the reference clock of the network.
Time variation of the previous time the internal clock based on the difference of the synchronization time of the reference clock and the difference between the time value of the current time synchronization when the reference clock and the internal clock of the time value of the internal clock and the reference clock The adjustment amount calculation process for calculating the adjustment amount for matching the slopes of
After the current time synchronization, the inclination of the time change of the internal clock is corrected based on the adjustment amount in the time zone of 1 second of the internal clock so that the inclination of the time change of the internal clock and the reference clock are matched. Tilt correction process and
After further correcting the inclination in the time zone of the next 1 second of the internal clock to match the time value of the internal clock with the time value of the reference clock, the inclination is referred to as the inclination of the time change of the reference clock. With the time correction process to match
A time synchronization method characterized by having.
コンピュータを請求項項に記載の時刻同期装置として機能させることを特徴とする時刻同期プログラム。 A time synchronization program, characterized in that the computer functions as the time synchronization device according to claim 1.
JP2017094323A 2017-05-11 2017-05-11 Time synchronization device, time synchronization method and time synchronization program Active JP6907684B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017094323A JP6907684B2 (en) 2017-05-11 2017-05-11 Time synchronization device, time synchronization method and time synchronization program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017094323A JP6907684B2 (en) 2017-05-11 2017-05-11 Time synchronization device, time synchronization method and time synchronization program

Publications (2)

Publication Number Publication Date
JP2018189592A JP2018189592A (en) 2018-11-29
JP6907684B2 true JP6907684B2 (en) 2021-07-21

Family

ID=64480259

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017094323A Active JP6907684B2 (en) 2017-05-11 2017-05-11 Time synchronization device, time synchronization method and time synchronization program

Country Status (1)

Country Link
JP (1) JP6907684B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6969150B2 (en) * 2017-05-11 2021-11-24 株式会社明電舎 Time synchronization device, time synchronization method and time synchronization program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5141972B2 (en) * 2007-12-07 2013-02-13 オムロン株式会社 Industrial controller
EP2424136B1 (en) * 2010-08-24 2013-10-02 Siemens Aktiengesellschaft System and method for time synchronization in a communication network

Also Published As

Publication number Publication date
JP2018189592A (en) 2018-11-29

Similar Documents

Publication Publication Date Title
US7379480B2 (en) Fast frequency adjustment method for synchronizing network clocks
US9671761B2 (en) Method, time consumer system, and computer program product for maintaining accurate time on an ideal clock
US7114091B2 (en) Synchronization of distributed systems
CN105680969A (en) Clock synchronization method and device
JP6834642B2 (en) Time correction method
US10505652B2 (en) Methods and systems for estimating offset skew and drift
CN109302255B (en) Time synchronization control method, device and system and computer readable storage medium
GB2586175A (en) System for timestamping events on edge devices
CN103532693B (en) Time synchronizing device and method
US20200382233A1 (en) Information processing apparatus and time synchronization method
US11853116B2 (en) Clock error-bound tracker
JP6907684B2 (en) Time synchronization device, time synchronization method and time synchronization program
WO2020194714A1 (en) Communication system, communication device, and program
CN110375596B (en) Time consistency control method for cooperative guidance simulation system
US11860689B2 (en) Time synchronization method, service board, and network device
EP2627040A1 (en) Method for eliminating systematical error components in a set of one-way delay measurement results for communications between two or more computing systems in a communication network, apparatus for performing the method and computer program product
CN111865468A (en) Precise time synchronization method
CN113037418B (en) Error correction method and related device for network time service
CN110618604B (en) Method and device for improving time keeping precision by using NTP auxiliary source
KR101972798B1 (en) Network Time Protocol based Time synchronization apparatus and method
JP2020077929A (en) Time distribution device, synchronization system, and program
JP6969150B2 (en) Time synchronization device, time synchronization method and time synchronization program
US12052093B2 (en) Clock calibration in a computing system using temperature sensors
EP3732806B1 (en) Method, device and system for estimating offset skew and drift
Mahmood et al. Limitations in implementing wireless clock synchronization using the timing advertisement approach from IEEE 802.11

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200303

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210113

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210119

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210316

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210614

R150 Certificate of patent or registration of utility model

Ref document number: 6907684

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150