JP6684409B1 - Time synchronization system - Google Patents

Time synchronization system Download PDF

Info

Publication number
JP6684409B1
JP6684409B1 JP2019189387A JP2019189387A JP6684409B1 JP 6684409 B1 JP6684409 B1 JP 6684409B1 JP 2019189387 A JP2019189387 A JP 2019189387A JP 2019189387 A JP2019189387 A JP 2019189387A JP 6684409 B1 JP6684409 B1 JP 6684409B1
Authority
JP
Japan
Prior art keywords
time
increment
value
time difference
difference
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
JP2019189387A
Other languages
Japanese (ja)
Other versions
JP2020072474A (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.)
Network Additions Co.,Ltd.
Original Assignee
Network Additions Co.,Ltd.
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 Network Additions Co.,Ltd. filed Critical Network Additions Co.,Ltd.
Priority to PCT/JP2019/041932 priority Critical patent/WO2020090664A1/en
Application granted granted Critical
Publication of JP6684409B1 publication Critical patent/JP6684409B1/en
Publication of JP2020072474A publication Critical patent/JP2020072474A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G5/00Setting, i.e. correcting or changing, the time-indication
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G7/00Synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter

Abstract

【課題】IPネットワークを通じた同期メッセージ交換において高精度の時刻同期を行う。【解決手段】スレーブ装置は、グランドマスター装置との同期メッセージの交換を通じて、第1の時点において第1の時間差を取得し、第1の時間差と基準値とを結ぶ第1の直線を判定し、同期メッセージの交換を通じて、第2の時点において第2の時間差を取得し、第2の時間差と基準値とを結ぶ第2の直線を判定し、第1の直線の傾きが第2の直線の傾きよりも小さい場合、第1の直線上の第2の時点に対応する値に基づいて、グランドマスター装置のマスタータイムとスレーブ装置のローカルタイムとの間のオフセットを算出する。【選択図】図3PROBLEM TO BE SOLVED: To perform highly accurate time synchronization in a synchronization message exchange via an IP network. A slave device obtains a first time difference at a first time point by exchanging a synchronization message with a grand master device, and determines a first straight line connecting the first time difference and a reference value, Through the exchange of the synchronization message, the second time difference is acquired at the second time point, the second straight line connecting the second time difference and the reference value is determined, and the slope of the first straight line is the slope of the second straight line. If it is smaller than the above, the offset between the master time of the grand master device and the local time of the slave device is calculated based on the value corresponding to the second time point on the first straight line. [Selection diagram] Fig. 3

Description

本開示は、時刻同期システムに関する。   The present disclosure relates to a time synchronization system.

近年、多くの分野でネットワーク経由の時刻同期をPTP(Precision Time Protocol)を用いて行う事が増えてきている。一例としては、携帯電話のネットワークとか放送用のIPネットワークが上げられる。一方、ネットワークについては従来のSDH(Synchronous Digital Hierarchy)網からイーサネット(登録商標)をベースとしたIPネットワークに急速に切り替わりつつある。これにより、IPネットワークを通してのPTPによる時刻同期を行う事が求められてきている。   In recent years, in many fields, time synchronization via a network is increasing using PTP (Precision Time Protocol). As an example, a mobile phone network or a broadcasting IP network can be used. On the other hand, as for networks, conventional SDH (Synchronous Digital Hierarchy) networks are being rapidly switched to Ethernet (registered trademark) -based IP networks. Therefore, it is required to perform time synchronization by PTP through the IP network.

IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems、IEEE Std 1588−2008、IEEE、2008年7月24日IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurements and Control Systems, IEEE Std 1588-2008, July 24, 2008.

網全体としてクロックが同期していており、ネットワーク内の遅延時間もスタッフィングによる変動範囲に収まるSDH網とは異なり、IPネットワークではネットワーク内のスイッチおよびルータ内のパケットのバッファリングによる遅延時間の変動が大きく、PTPのバウンダリ クロック(Boundary clock)あるいはピア・ツー・ピア トランスペアレントクロック(Peer−to−Peer transparent clock)、あるいはエンド・ツー・エンド トランスペアレントクロック(End−to−end transparent clock)で動作するスイッチおよびルータから成るネットワーク上でなければ、ディレイリクエスト・レスポンスメカニズム(Delay request−response mechanism)と単純なオフセット計算を用いて高い精度の同期を取ることは難しい。   Unlike the SDH network, in which clocks are synchronized in the entire network and the delay time in the network falls within the range of fluctuation due to stuffing, in the IP network, fluctuations in delay time due to buffering of packets in switches and routers in the network occur. A switch and a large PTP boundary clock, a peer-to-peer transparent clock, or an end-to-end transparent clock. Unless it is on a network consisting of routers, delay request / response mechanism (Delay request-resp nse Mechanism) and high accuracy synchronization thing is difficult using a simple offset calculation.

一方、通常ワイドエリアのIPネットワーク内には様々なベンダー、様々な世代の機器があり、時刻同期が必要なネットワーク内の全ての機器がPTPのこれらの動作のいずれかをサポートしているようにネットワークを構築するのは現実的ではない。   On the other hand, there are usually various vendors and various generations of devices in a wide area IP network, and it is assumed that all devices in the network that require time synchronization support any of these operations of PTP. Building a network is not realistic.

本実施形態は、ネットワーク内のスイッチおよびルータがPTP未サポートのネットワークにおいて、同期メッセージ交換(Synchronization message exchange)によって獲得したタイムスタンプを基に、より高精度の時刻同期を行う。   In the present embodiment, more accurate time synchronization is performed based on the time stamps acquired by the synchronization message exchange in the network in which the switches and routers in the network do not support PTP (Synchronization message exchange).

一実施形態にかかるスレーブ装置は、オーディナリークロックのPTPスレーブにおいてフリーランニングが可能なローカルタイムを備え、当該ローカルタイムを基に同期メッセージ交換(Synchronization message exchange)のタイムスタンプを作成する手段、およびに同期メッセージ交換によって獲得したタイムスタンプの差分を基に以後のタイムスタンプの差分の予測値を計算し、その予測値を用いてローカルタイムの補正を行う手段、およびタイムスタンプの実測値を基に予測値を修正する手段を備える。具体的には、スレーブ装置は、PTPに従って動作するスレーブ装置であって、グランドマスター装置との同期メッセージの交換を通じて、前記同期メッセージの送信時刻と受信時刻との間の時間差を取得し、前記時間差と基準値とを結ぶ直線を判定し、前記直線上の値に基づいて、グランドマスター装置のマスタータイムとスレーブ装置のローカルタイムとの間のオフセットを算出する、ように構成された制御装置を備える。   A slave device according to an embodiment includes a local time that allows free running in a PTP slave of an ordinary clock, a means for creating a time stamp of a synchronization message exchange based on the local time, and a means for synchronizing with the means. A means to calculate the predicted value of the difference of the subsequent time stamps based on the difference of the time stamps acquired by exchanging messages, and the means to correct the local time by using the predicted value, and the predicted value based on the measured value of the time stamp. And means for correcting Specifically, the slave device is a slave device that operates according to PTP, and obtains the time difference between the transmission time and the reception time of the synchronization message through the exchange of the synchronization message with the grand master device, and obtains the time difference. And a reference value, and based on the value on the straight line, a controller configured to calculate the offset between the master time of the grand master device and the local time of the slave device is provided. .

本実施形態によれば、放送のSFN(Single Frequensy Network)等で必要なマイクロ秒レベルでの高精度な時刻同期を、PTPをサポートしていないIPネットワーク上で実現する事ができる。   According to the present embodiment, it is possible to realize highly accurate time synchronization at the microsecond level necessary for broadcasting SFN (Single Frequency Network) and the like on an IP network that does not support PTP.

これにより、時刻同期に高価なGPSあるいはPTPをサポートした専用ネットワークを用いる必要がなくなり、時刻同期に必要な機器あるいは回線に要するコストの削減に寄与し、維持メンテナンスの費用が低減される。   As a result, it is not necessary to use an expensive dedicated network supporting GPS or PTP for time synchronization, which contributes to a reduction in the cost required for equipment or lines required for time synchronization, and a reduction in maintenance costs.

一実施形態にかかるシステム構成の概要を例示する図である。FIG. 1 is a diagram illustrating an overview of a system configuration according to an embodiment. PTPの基本的な同期メッセージ交換を示す図である。FIG. 5 is a diagram showing a basic synchronous message exchange of PTP. 一実施形態にかかる、同期メッセージ交換における時間差の遷移を示す図である。FIG. 6 is a diagram showing a transition of a time difference in synchronous message exchange according to one embodiment. 一実施形態にかかる、同期メッセージ交換における時間差の遷移を示す図である。FIG. 6 is a diagram showing a transition of a time difference in synchronous message exchange according to one embodiment. 一実施形態にかかる、同期メッセージ交換における時間差の遷移を示す図である。FIG. 6 is a diagram showing a transition of a time difference in synchronous message exchange according to one embodiment. 一実施形態にかかるPTPスレーブ装置の構成を示す図である。It is a figure which shows the structure of the PTP slave apparatus concerning one Embodiment. 一実施形態にかかるPTPスレーブ装置の論理モジュールを示す図である。It is a figure which shows the logic module of the PTP slave apparatus concerning one Embodiment.

以下、図面を参照しながら実施形態について詳細に説明する。実施形態の説明の全体を通して、同じ要素には同じ番号を付している。   Hereinafter, embodiments will be described in detail with reference to the drawings. The same elements are given the same numbers throughout the description of the embodiments.

図1は、一実施形態にかかる時刻同期システムの構成の概要を例示する図である。IEEE 1588 PTP(以下、「PTP」)では、クロック分配のために階層型マスタ−スレーブ構造が採用されている。階層型マスタ−スレーブ構造は、グランドマスター装置およびスレーブ装置を含む。グランドマスター装置(自身のクロックを外部に発信する基点となるノード)は、グランドマスタークロック(GMC:Grand Master Clock)とも称され、スレーブ装置に時刻情報を配信する。グランドマスター装置自身は、グローバルなソースクロック(GPSや原子時計など)から生成される外部同期信号を使用して、自身のマスタータイムを補正する。   FIG. 1 is a diagram illustrating an outline of a configuration of a time synchronization system according to an embodiment. IEEE 1588 PTP (hereinafter "PTP") employs a hierarchical master-slave structure for clock distribution. The hierarchical master-slave structure includes grand master devices and slave devices. The grand master device (a node serving as a base point for transmitting its own clock to the outside) is also referred to as a grand master clock (GMC) and distributes time information to slave devices. The grand master device itself corrects its own master time using an external synchronization signal generated from a global source clock (GPS, atomic clock, etc.).

本実施形態にかかるメッセージ交換システムは、上述したPTPに従って階層型マスタ−スレーブ構造を採用する。図1に示される時刻同期システムは、概略的に、PTPグランドマスター装置101、ならびにPTPスレーブ装置102、103、および104を含む。グランドマスター装置101と、スレーブ装置102、103、および104とは、イーサネット1101、1102、1103、および1104を通じてIPネットワーク110にそれぞれ接続される。IPネットワーク110は、グランドマスター装置101とスレーブ装置102、103、および104との間で交換されるPTPメッセージ(同期メッセージ)を中継する中間ノード(スイッチおよびルータなど、図示せず)を含む。スレーブ装置102、103、および104は各々、IPネットワーク110を経由してグランドマスター装置101との間で同期メッセージ交換(Synchronization message exchange)を行い、グランドマスター装置101のマスタータイムとのオフセットに基づいて自身のローカルタイムを補正する。   The message exchange system according to the present embodiment adopts a hierarchical master-slave structure according to the PTP described above. The time synchronization system shown in FIG. 1 generally includes a PTP grandmaster device 101, and PTP slave devices 102, 103, and 104. The grand master device 101 and the slave devices 102, 103, and 104 are connected to the IP network 110 via Ethernets 1101, 1102, 1103, and 1104, respectively. IP network 110 includes intermediate nodes (switches and routers, not shown) that relay PTP messages (synchronization messages) exchanged between grandmaster device 101 and slave devices 102, 103, and 104. The slave devices 102, 103, and 104 each perform a synchronization message exchange (Synchronization message exchange) with the grand master device 101 via the IP network 110, and based on the offset from the master time of the grand master device 101. Correct your own local time.

図2は、PTPの基本的な同期メッセージ交換を示す。PTPでは、以下のようにグランドマスター装置101とスレーブ装置102、103、および104との間で、スレーブ装置のローカルタイムを補正するための同期メッセージが交換される。以下の説明では、スレーブ装置102のみを例とする。   FIG. 2 shows the basic synchronization message exchange of PTP. In PTP, a synchronization message for correcting the local time of the slave device is exchanged between the grand master device 101 and the slave devices 102, 103 and 104 as described below. In the following description, only the slave device 102 will be taken as an example.

まず、グランドマスター装置101がスレーブ装置102にSyncメッセージを送信する。Syncメッセージには、Syncメッセージの送信時刻(タイムスタンプ)(t1)が含まれる。スレーブ装置102がSyncメッセージを受信すると、Syncメッセージの送信時刻(t1)および到着時刻(t2)(タイムスタンプ)がスレーブ装置102によって測定される。   First, the grand master device 101 transmits a Sync message to the slave device 102. The Sync message includes the transmission time (time stamp) (t1) of the Sync message. When the slave device 102 receives the Sync message, the transmission time (t1) and the arrival time (t2) (time stamp) of the Sync message are measured by the slave device 102.

次に、スレーブ装置102がグランドマスター装置101にDelay_Reqメッセージを送信する。スレーブ装置102がDelay_Reqメッセージを送信すると、Delay_Reqメッセージの送信時刻(t3)(タイムスタンプ)がスレーブ装置102によって測定される。   Next, the slave device 102 transmits a Delay_Req message to the grand master device 101. When the slave device 102 transmits the Delay_Req message, the transmission time (t3) (time stamp) of the Delay_Req message is measured by the slave device 102.

次に、グランドマスター装置101がスレーブ装置102にDelay_Respメッセージを送信する。Delay_Respメッセージには、Delay_Reqメッセージの実際の到着時刻(t4)(タイムスタンプ)が含まれる。スレーブ装置102がDelay_Respメッセージを受信すると、Delay_Reqメッセージの実際の到着時刻(t4)がスレーブ装置102によって測定される。   Next, the grand master device 101 sends a Delay_Resp message to the slave device 102. The Delay_Resp message includes the actual arrival time (t4) (time stamp) of the Delay_Req message. When the slave device 102 receives the Delay_Resp message, the actual arrival time (t4) of the Delay_Req message is measured by the slave device 102.

図2では、1ステップモードで行われる同期メッセージ交換を示したが、本実施形態は、2ステップモードで行われる同期メッセージ交換にも当然に適用される。2ステップモードで行われる同期メッセージ交換では、グランドマスター装置101がスレーブ装置102にFollow_Upメッセージを送信する。ここで、Syncメッセージの送信において、メッセージの送信時刻を事前に把握するのは困難であるので、Syncメッセージではt1の予測値が測定され、Follow_Upメッセージでt1の実際の値が測定される。これによって誤差が補償される。以下では、上述したSyncメッセージ、Follow_Upメッセージ、Delay_Reqメッセージ、およびDelay_Respメッセージを、同期メッセージと称する。   Although FIG. 2 shows the synchronous message exchange performed in the one-step mode, the present embodiment is naturally applied to the synchronous message exchange performed in the two-step mode. In the synchronous message exchange performed in the two-step mode, the grand master device 101 sends a Follow_Up message to the slave device 102. Here, in sending the Sync message, it is difficult to know the sending time of the message in advance, so the predicted value of t1 is measured in the Sync message, and the actual value of t1 is measured in the Follow_Up message. This compensates for the error. Hereinafter, the Sync message, Follow_Up message, Delay_Req message, and Delay_Resp message described above are referred to as synchronization messages.

PTPでは、グランドマスター装置101とスレーブ装置102との間の伝送遅延時間dが同期メッセージ交換の往路および復路で同じであることと仮定としている。よって、スレーブ装置102が測定した4つのタイムスタンプt1、t2、t3、およびt4に基づいて、グランドマスター装置101のマスタータイムとスレーブ装置102のローカルタイムとの間のオフセットΔtを計算することができる。同期メッセージ交換の往復経路の遅延時間が同じと仮定しているので、式(1)乃至(4)が成立する。   In PTP, it is assumed that the transmission delay time d between the grand master device 101 and the slave device 102 is the same on the forward path and the return path of the synchronous message exchange. Therefore, the offset Δt between the master time of the grand master device 101 and the local time of the slave device 102 can be calculated based on the four time stamps t1, t2, t3, and t4 measured by the slave device 102. . Since it is assumed that the delay time of the round-trip path of the synchronous message exchange is the same, the expressions (1) to (4) are established.

t2−t1=Δt+d 式(1)
t4−t3=Δt+d 式(2)
{(t2−t1)+(t4−t3)}/2=d 式(3)
Δt=(t2−t1)−d 式(4)
t2-t1 = Δt + d Formula (1)
t4-t3 = Δt + d Formula (2)
{(T2-t1) + (t4-t3)} / 2 = d Formula (3)
Δt = (t2-t1) -d Formula (4)

スレーブ装置102は、式(1)乃至(4)に従ってオフセットΔtを計算し、オフセットΔtに基づいて、自身のローカルタイムを補正することができる。   The slave device 102 can calculate the offset Δt according to the equations (1) to (4) and correct its own local time based on the offset Δt.

しかし、現実的にはIPネットワークの伝送遅延時間はトラフィック量、あるいはトラフィックの特性により常に変化してばらついており、伝送遅延時間は往路と復路では異なる。   However, in reality, the transmission delay time of the IP network is constantly changing and fluctuating depending on the amount of traffic or the characteristics of the traffic, and the transmission delay time is different between the forward path and the return path.

IPネットワーク内の中間ノードがPTPに従ってバウンダリ クロック、ピア・ツー・ピア トランスペアレントクロック、またはエンド・ツー・エンド トランスペアレントクロックとして動作する場合、変動する伝送遅延時間を計測し、スレーブ装置に伝送遅延時間を通知する。中間ノードが上述した機能を実装することによって、スレーブ装置は伝送遅延時間を把握することができる。よって、オフセットΔtの計算値が伝送遅延時間のばらつきの影響を受けない。   When an intermediate node in an IP network operates as a boundary clock, a peer-to-peer transparent clock, or an end-to-end transparent clock according to PTP, it measures a variable transmission delay time and notifies the slave device of the transmission delay time. To do. When the intermediate node implements the above-mentioned function, the slave device can grasp the transmission delay time. Therefore, the calculated value of the offset Δt is not affected by the variation in the transmission delay time.

PTP未サポートの中間ノードは、上述した伝送遅延時間をスレーブ装置に通知することができない。よって、PTP未サポートのネットワーク上では、この伝送遅延時間のばらつきを定量化する手段がない。このため、オフセットの計算値が伝送遅延時間のばらつきの影響を受けることになり、結果として同期精度が悪化する事となる。   An intermediate node that does not support PTP cannot notify the slave device of the above-mentioned transmission delay time. Therefore, there is no means for quantifying this variation in transmission delay time on a network that does not support PTP. Therefore, the calculated offset value is affected by the variation in the transmission delay time, and as a result, the synchronization accuracy deteriorates.

また、IEEE Std 1588−2008に示されているPTPの標準的なスレーブ装置のローカルクロックでは、補正済みローカルタイムを次の同期メッセージ交換に用いている。つまり、スレーブ装置は、ばらつきのある伝送遅延時間に基づいて、t1〜t4を測定し、測定したt1〜t4に基づいて自身のローカルタイムを補正し、補正後のローカルタイムで再度、t1〜t4を測定することになる。従って、同期メッセージ交換に用いているローカルタイムそのものが安定せずにジッタまたはワンダーが現れる事となる。PTP未サポートのネットワーク上においては前述した伝送遅延時間のばらつきに加え、ローカルタイムの不安定さにより同期精度がさらに悪化する事になる。   Also, in the local clock of the PTP standard slave device shown in IEEE Std 1588-2008, the corrected local time is used for the next synchronization message exchange. That is, the slave device measures t1 to t4 based on the variable transmission delay time, corrects its own local time based on the measured t1 to t4, and again t1 to t4 with the corrected local time. Will be measured. Therefore, the local time itself used for the synchronization message exchange is not stable and jitter or wander appears. On a network that does not support PTP, in addition to the above-mentioned variation in transmission delay time, instability of local time further deteriorates synchronization accuracy.

本実施形態では、伝送遅延時間のばらつきとローカルタイムの不安定さがオフセットΔtの計算に与える影響を最小にし、高精度のオフセット値を得ることができる。   In the present embodiment, it is possible to minimize the influence of variations in transmission delay time and instability of local time on the calculation of the offset Δt, and obtain a highly accurate offset value.

本実施形態では、スレーブ装置102、103、および104の各々は、2つのローカルタイムLT1およびLT2を有する。ローカルタイムLT1は、上述したPTPに従って時刻が補正されず、同期メッセージ交換(つまり、4つのタイムスタンプt1、t2、t3、およびt4を計算するために)にのみ用いられる(フリーランニング)。ローカルタイムLT2は、上述したPTPに従って、グランドマスター装置101のマスタータイムとのオフセットに基づいて補正される。   In the present embodiment, each of the slave devices 102, 103 and 104 has two local times LT1 and LT2. The local time LT1 is not time-corrected according to the PTP described above and is only used for synchronous message exchanges (ie to calculate the four time stamps t1, t2, t3 and t4) (free running). The local time LT2 is corrected based on the offset from the master time of the grand master device 101 according to the PTP described above.

フリーランニングのローカルタイムLT1を用いて同期メッセージ交換を行うことにより、上述したローカルタイムの不安定さにより同期の精度がさらに悪化する事を防止することができる。グランドマスター装置のマスタータイムとスレーブ装置のローカルタイムとのオフセットΔtは、両方のクロックの定常的な周波数の差によるものとなる。従って、グランドマスター装置のマスタータイムとスレーブ装置のローカルタイムとのオフセットと伝送遅延時間から成る(t2−t1)と(t4−t3)は、機器の周辺温度等の影響を最低限とした一定の条件の下では、経由した時間に比例して直線的に変化する。   By exchanging the synchronization message using the free-running local time LT1, it is possible to prevent the synchronization accuracy from further deteriorating due to the instability of the local time described above. The offset Δt between the master time of the grand master device and the local time of the slave device is due to the steady frequency difference between both clocks. Therefore, (t2-t1) and (t4-t3), which consist of the offset between the master time of the grand master device and the local time of the slave device and the transmission delay time, are fixed to minimize the influence of the ambient temperature of the equipment. Under the condition, it changes linearly in proportion to the transit time.

図3のグラフは、スレーブ装置のローカルクロックの周波数がグランドマスター装置のクロックの周波数よりも高いケースを例に、フリーランニングのローカルタイムLT1を用いた同期メッセージ交換における時間差(t2−t1)と時間差(t4−t3)の遷移を示している。図3の上のグラフ(以下、「(t2−t1)グラフ」)では、縦軸は、スレーブ装置が同期メッセージを交換するときに計算する(t2−t1)を表す。横軸は、t2を基準とした、スレーブ装置のローカルタイムLT1の時間軸を表す。同様に、図3の下のグラフ(以下、「(t4−t2)グラフ」)では、縦軸は、スレーブ装置が同期メッセージを交換するときに計算する(t4−t3)を表す。横軸は、t3を基準とした、スレーブ装置のローカルタイムLT1の時間軸を表す。   The graph of FIG. 3 shows a case where the frequency of the local clock of the slave device is higher than the frequency of the clock of the grand master device as an example, and the time difference (t2-t1) and the time difference in the synchronous message exchange using the free-running local time LT1. The transition of (t4-t3) is shown. In the upper graph of FIG. 3 (hereinafter, “(t2-t1) graph”), the vertical axis represents (t2-t1) calculated when the slave devices exchange synchronization messages. The horizontal axis represents the time axis of the local time LT1 of the slave device based on t2. Similarly, in the lower graph of FIG. 3 (hereinafter, “(t4-t2) graph”), the vertical axis represents (t4-t3) calculated when the slave devices exchange synchronization messages. The horizontal axis represents the time axis of the local time LT1 of the slave device based on t3.

以下では、時間差(t2−t1)および時間差(t4−t3)のいずれも、グランドマスター装置とスレーブ装置との間の同期メッセージ交換における同期メッセージの送信時刻と受信時刻との間の時間差を指す。   In the following, both the time difference (t2-t1) and the time difference (t4-t3) refer to the time difference between the transmission time and the reception time of the synchronization message in the synchronization message exchange between the grand master device and the slave device.

(t2−t1)グラフでは、折れ線301は、スレーブ装置が同期メッセージを交換するときに実測した(t2−t1)を表す。折れ線304は、実測した(t2−t1)に基づいて計算した伝送遅延時間dの実測値を表す。同様に、(t4−t3)グラフでは、折れ線311は、スレーブ装置が同期メッセージを交換するときに実測した(t4−t3)を表す。折れ線314が、実測した(t4−t3)に基づいて計算した伝送遅延時間dの実測値を表す。   In the (t2-t1) graph, the polygonal line 301 represents (t2-t1) measured when the slave device exchanges the synchronization message. The polygonal line 304 represents the actual measurement value of the transmission delay time d calculated based on the actually measured (t2-t1). Similarly, in the (t4-t3) graph, the polygonal line 311 represents (t4-t3) measured when the slave device exchanges the synchronization message. A polygonal line 314 represents the measured value of the transmission delay time d calculated based on the measured (t4−t3).

グラフの横軸であるスレーブ装置のローカルタイムLT1(t2の時点を基準)が経過するに従い、直線302で示される(t2−t1)の最短値は、グランドマスター装置のクロックとスレーブ装置のローカルクロックの周波数差に従い直線的に変化していく。同様に、スレーブ装置のローカルタイムLT1(t3の時点を基準)が経過するに従い、直線312で示される(t4−t3)の最短値は、グランドマスター装置のクロックとスレーブ装置のローカルクロックの周波数差に従い直線的に変化していく。ここで最短値とは伝送遅延時間dが定常的に最短の固定値であると仮定した場合の(t2−t1)および(t4−t3)の理論値である。   As the slave device local time LT1 (referenced to the time point of t2) on the horizontal axis of the graph elapses, the shortest value of (t2-t1) indicated by the straight line 302 is the clock of the grand master device and the local clock of the slave device. It changes linearly according to the frequency difference. Similarly, as the slave device local time LT1 (based on the time point t3) elapses, the shortest value of (t4-t3) indicated by the straight line 312 is the frequency difference between the clock of the grand master device and the local clock of the slave device. It changes linearly according to. Here, the shortest value is a theoretical value of (t2-t1) and (t4-t3) when it is assumed that the transmission delay time d is constantly the shortest fixed value.

実際の同期メッセージ交換での(t2−t1)、あるいは(t4−t3)の実測値は、伝送遅延時間dが折れ線304あるいは折れ線314に示すようにばらつくため、折れ線301あるいは折れ線311のように変化する。スレーブ装置のローカルタイムLT1のクロック周波数がグランドマスター装置のクロック周波数よりも高いこのケースでは、常にt2>t1である。よって、(t2−t1)の実測値の絶対値は決して(t2−t1)の最短値を下回る事はない。   The actual measurement value of (t2-t1) or (t4-t3) in the actual synchronous message exchange changes like the broken line 301 or the broken line 311 because the transmission delay time d varies as shown by the broken line 304 or the broken line 314. To do. In this case, where the clock frequency of the local time LT1 of the slave device is higher than the clock frequency of the grand master device, t2> t1 always holds. Therefore, the absolute value of the measured value of (t2-t1) never falls below the shortest value of (t2-t1).

本実施形態では、この点に着目し、(t2−t1)の実測値の時系列を基に同期メッセージ交換における(t2−t1)の値の予測値を算出する。同様に、(t4−t3)の実測値の時系列を基に同期メッセージ交換における(t4−t3)の値の予測値を算出する。そして、(t2−t1)および(t4−t3)の実測値ではなく、予測値を用いてローカルタイムLT2の補正を行う。一方で、ローカルタイムLT2の補正を行う場合には、ローカルタイムLT1の補正は行わず、同期メッセージの交換(つまり、(t2−t1)および(t4−t3)を実測するとき)においてローカルタイムLT1を使用する。   In this embodiment, paying attention to this point, the predicted value of the value of (t2-t1) in the synchronous message exchange is calculated based on the time series of the measured value of (t2-t1). Similarly, the predicted value of the value of (t4-t3) in the synchronous message exchange is calculated based on the time series of the measured value of (t4-t3). Then, the local time LT2 is corrected using the predicted value instead of the measured values of (t2-t1) and (t4-t3). On the other hand, when the local time LT2 is corrected, the local time LT1 is not corrected, and the local time LT1 is exchanged during the synchronization message exchange (that is, when (t2-t1) and (t4-t3) are actually measured). To use.

図3において、同期メッセージ交換での(t2−t1)の実測値の時系列のなかで開始時点(図3のT00)の基準値a1と(t2−t1)の時系列の実測値を結んだ直線群のなかで最も傾斜が少ない直線(以下、予測値直線)の延長線(図3のT01時点では直線305)上の値が、次の同期メッセージ交換の時点で(t2−t1)の予測値として使用される。設定値a1は、(t2−t1)の予測値に対する基準値とする。   In FIG. 3, in the time series of the measured values of (t2-t1) in the synchronous message exchange, the reference value a1 at the start point (T00 in FIG. 3) and the measured value of the time series of (t2-t1) are connected. The value on the extension line (the straight line 305 at the time point T01 of FIG. 3) of the straight line having the smallest inclination (hereinafter, the predicted value straight line) in the straight line group is predicted at the time point of the next synchronization message exchange (t2-t1). Used as a value. The set value a1 is a reference value for the predicted value of (t2-t1).

同様に、同期メッセージ交換での(t4−t3)の時系列の実測値のなかで開始時点(図3のT00)の基準値a2を結んだ直線群のなかで最も傾斜が少ない直線(予測値直線)の延長線(図3のT02時点では315)上の値が、次の同期メッセージ交換の時点で(t4−t3)の予測値として使用される。設定値a2は、(t4−t3)の予測値に対する基準値とする。   Similarly, the straight line with the smallest inclination (predicted value) among the straight line group connecting the reference value a2 at the start time point (T00 in FIG. 3) among the time series measured values of (t4−t3) in the synchronization message exchange. The value on the extension of the straight line (315 at time T02 in FIG. 3) is used as the predicted value of (t4-t3) at the time of the next synchronization message exchange. The set value a2 is a reference value for the predicted value of (t4-t3).

そして、同期メッセージ交換での実測値と時系列の開始時点(T00のa1あるいはa2)を結んだ直線の傾斜が、その時点での予測値直線の傾斜を下回らない限りは、予測値を用いてローカルタイムLT2の補正を行う。つまり、ローカルタイムLT2の補正において、予測値直線(直線305)上にある予測値が時間差(t2−t1)として使用され、予測値直線(直線315)上にある予測値が時間差(t4−t3)として使用されて、伝送遅延時間dが算出される。ここで傾斜が下回わる、すなわち傾斜が少ないとは横軸たる時間軸に対する傾斜角が小さい事の意味である。   Then, unless the slope of the straight line connecting the measured value in the synchronization message exchange and the time series start time point (a1 or a2 of T00) is less than the slope of the predicted value line at that time, the predicted value is used. The local time LT2 is corrected. That is, in the correction of the local time LT2, the predicted value on the predicted value straight line (straight line 305) is used as the time difference (t2-t1), and the predicted value on the predicted value straight line (straight line 315) is the time difference (t4-t3). ), The transmission delay time d is calculated. Here, the inclination is lower, that is, the inclination is smaller, means that the inclination angle with respect to the time axis, which is the horizontal axis, is small.

図3において(t2−t1)グラフでは、前述したようにT01の時点で、(t2−t1)実測値308とT00での始点であるa1を結んだ直線305が最も傾斜が少ない。よって、直線305は、次の同期メッセージ交換での予測値直線となる。例えば、T01の次の同期メッセージ交換を行うT011の時点では、(t2−t1)の実測値307が得られているが、基準値a1と実測値307とを結んだ直線は、直線305よりも傾斜角が大きい。よって、T011の時点で時刻補正を行う場合、直線305上のT011の時点でのt2に対応する予測値E1が時間差(t2−t1)として用いられる。   In the graph (t2-t1) in FIG. 3, as described above, the straight line 305 connecting the (t2-t1) measured value 308 and the starting point a1 at T00 has the smallest inclination at time T01. Therefore, the straight line 305 is a predicted value straight line in the next synchronization message exchange. For example, at the time of T011 at which the synchronous message exchange next to T01 is performed, the measured value 307 of (t2-t1) is obtained, but the straight line connecting the reference value a1 and the measured value 307 is more than the straight line 305. The inclination angle is large. Therefore, when performing the time correction at the time point T011, the predicted value E1 corresponding to t2 at the time point T011 on the straight line 305 is used as the time difference (t2-t1).

同様に(t4−t3)グラフでは、T02の時点で、(t4−t3)実測値318とT00での始点であるa2を結んだ直線315が最も傾斜が少ない(傾斜角がマイナス方向に大きい)。よって、直線315は、次の同期メッセージ交換での予測値直線となる。例えば、T02の次の同期メッセージ交換を行うT021の時点では、(t4−t3)の実測値317が得られているが、基準値a2と実測値317とを結んだ直線は、直線315よりも傾斜角が大きい。よって、T021の時点で時刻補正を行う場合、直線315上のT021の時点でのt3に対応する予測値E3が時間差(t2−t1)として用いられる。   Similarly, in the (t4-t3) graph, the straight line 315 connecting the (t4-t3) measured value 318 and the starting point a2 at T00 has the smallest inclination at the time of T02 (the inclination angle is large in the negative direction). . Therefore, the straight line 315 is a predicted value straight line in the next synchronization message exchange. For example, the measured value 317 of (t4−t3) is obtained at the time of T021 at which the synchronous message exchange next to T02 is performed, but the straight line connecting the reference value a2 and the measured value 317 is more than the straight line 315. The inclination angle is large. Therefore, when performing the time correction at time T021, the predicted value E3 corresponding to t3 at time T021 on the straight line 315 is used as the time difference (t2-t1).

(t2−t1)グラフでは、さらに次の同期メッセージ交換を行うT012の時点において(t2−t1)の実測値309を得られている。実測値309とT00での始点であるa1を結んだ直線306の傾斜が、T012の時点での予測値直線305の傾斜よりも小さい。よって、予測値直線を直線306に変更し、直線305上の予測値310ではなく、直線306上のT012の時点でのt2に対応する実測値309が予測値として用いられる。予測値309に基づいて、時間差(t2−t1)を算出し、ローカルタイムLT2の補正を行う。   In the (t2-t1) graph, the measured value 309 of (t2-t1) is obtained at the time T012 when the next synchronization message exchange is further performed. The slope of the straight line 306 connecting the measured value 309 and the starting point a1 at T00 is smaller than the slope of the predicted value line 305 at T012. Therefore, the predicted value straight line is changed to the straight line 306, and the actual measurement value 309 corresponding to t2 at the time T012 on the straight line 306 is used as the predicted value instead of the predicted value 310 on the straight line 305. The time difference (t2-t1) is calculated based on the predicted value 309, and the local time LT2 is corrected.

これ以後のローカルタイムLT2の補正においては、直線306よりも少ない傾斜の予測値直線を形成する実測値が得られるまで、直線306上の予測値(例えば、図3のT03の時点では、直線306上のT03の時点でのt2に対応する予測値E2)を用いて時間差(t2−t1)を算出し、ローカルタイムLT2の補正を行う。   In the subsequent correction of the local time LT2, the predicted value on the straight line 306 (for example, the straight line 306 at the time of T03 in FIG. 3 is obtained until the actual measurement value forming the predicted value straight line having the inclination smaller than that of the straight line 306 is obtained. The time difference (t2-t1) is calculated using the predicted value E2) corresponding to t2 at the time T03 above, and the local time LT2 is corrected.

上記と同様の処理を(t4−t3)についても行う。さらに次の同期メッセージ交換を行うT022の時点において(t4−t3)の実測値319を得られている。実測値319とT00での始点であるa2を結んだ直線316の傾斜が、T022の時点での予測値直線315の傾斜よりも小さい。よって、予測値直線を直線316に変更し、直線315上の予測値320ではなく、直線316上のT022の時点でのt3に対応する実測値319が予測値として用いられる。予測値319に基づいて、時間差(t4−t3)を算出し、ローカルタイムLT2の補正を行う。   The same processing as above is performed for (t4-t3). Further, the measured value 319 of (t4-t3) is obtained at the time of T022 when the next synchronization message exchange is performed. The slope of the straight line 316 connecting the measured value 319 and the starting point a2 at T00 is smaller than the slope of the predicted value line 315 at T022. Therefore, the predicted value straight line is changed to the straight line 316, and the actual measurement value 319 corresponding to t3 at time T022 on the straight line 316 is used as the predicted value instead of the predicted value 320 on the straight line 315. The time difference (t4−t3) is calculated based on the predicted value 319, and the local time LT2 is corrected.

これ以後のローカルタイムLT2の補正においては、直線316よりも少ない傾斜の予測値直線を形成する実測値が得られるまで、直線316上の予測値を用いて時間差(t4−t3)を算出する。   In the subsequent correction of the local time LT2, the time difference (t4−t3) is calculated using the predicted value on the straight line 316 until an actual measurement value forming a predicted value straight line having a slope smaller than that of the straight line 316 is obtained.

T023の時点での同期メッセージ交換において(t4−t3)の実測値321が得られている。実測値321とT00での始点であるa2を結んだ直線322の傾斜がその時点での予測値の直線316の傾斜よりも小さい。よって、予測値直線を直線322に変更し、直線322上の予測値を用いて時間差(t4−t3)を算出し、ローカルタイムLT2の補正を行う。   The measured value 321 of (t4−t3) is obtained in the synchronous message exchange at the time of T023. The slope of the straight line 322 connecting the measured value 321 and the starting point a2 at T00 is smaller than the slope of the straight line 316 of the predicted value at that time. Therefore, the predicted value straight line is changed to the straight line 322, the time difference (t4−t3) is calculated using the predicted value on the straight line 322, and the local time LT2 is corrected.

これ以後のローカルタイムLT2の補正においては、直線322よりも少ない傾斜の実測値が得られるまで直線322上の予測値を用いて時間差(t4−t3)を算出する。つまり、本実施形態では、スレーブ装置においてローカルタイムLT2の時刻補正を行うとき、その時点までで得られた(t2−t1)の実測値と基準値a1とを結ぶ最も傾斜が小さい直線上の、その時点に対応する予測値を(t2−t1)として用いる。また、ローカルタイムLT2の時刻補正を行うとき、その時点までで得られた(t4−t3)の実測値と基準値a2とを結ぶ最も傾斜が小さい直線上の、その時点に対応する予測値を(t4−t3)として用いる。   In the subsequent correction of the local time LT2, the time difference (t4−t3) is calculated using the predicted value on the straight line 322 until the measured value of the inclination smaller than that of the straight line 322 is obtained. That is, in the present embodiment, when performing time correction of the local time LT2 in the slave device, on the straight line with the smallest inclination connecting the measured value of (t2-t1) obtained up to that point and the reference value a1, The predicted value corresponding to that time point is used as (t2-t1). Further, when performing the time correction of the local time LT2, the predicted value corresponding to that time point on the straight line having the smallest inclination connecting the measured value of (t4-t3) obtained up to that time point and the reference value a2 is obtained. Used as (t4-t3).

上述した予測値について、例えば、図3に示した予測値E1は、式(5)に従って算出することができる。
E1=a1+(T011−T00)×(308−a1/(T01−T00))
式(5)
T00は、T00の時点でのt2(タイムスタンプ)の値であり、T011は、T011の時点でのt2の値であり、T01は、T01の時点でのt2の値である。
Regarding the above-mentioned predicted value, for example, the predicted value E1 shown in FIG. 3 can be calculated according to the equation (5).
E1 = a1 + (T011-T00) × (308-a1 / (T01-T00))
Formula (5)
T00 is the value of t2 (time stamp) at the time of T00, T011 is the value of t2 at the time of T011, and T01 is the value of t2 at the time of T01.

また、図3に示した予測値E2は、式(6)に従って算出することができる。
E2=a1+(T03−T00)×(309−a1/(T012−T00))
式(6)
T00は、T00の時点でのt2(タイムスタンプ)の値であり、T03は、T03の時点でのt2の値であり、T012は、T012の時点でのt2の値である。
The predicted value E2 shown in FIG. 3 can be calculated according to the equation (6).
E2 = a1 + (T03-T00) * (309-a1 / (T012-T00))
Formula (6)
T00 is the value of t2 (time stamp) at the time of T00, T03 is the value of t2 at the time of T03, and T012 is the value of t2 at the time of T012.

さらに、図3に示した予測値E3は、式(7)に従って算出することができる。
E3=a2+(T021−T00)×(318−a2/(T02−T00))
式(7)T00は、T00の時点でのt3(タイムスタンプ)の値であり、T02は、T02の時点でのt3の値であり、T021は、T021の時点でのt3の値である。
Furthermore, the predicted value E3 shown in FIG. 3 can be calculated according to the equation (7).
E3 = a2 + (T021-T00) * (318-a2 / (T02-T00))
Formula (7) T00 is the value of t3 (time stamp) at the time of T00, T02 is the value of t3 at the time of T02, and T021 is the value of t3 at the time of T021.

実施形態にかかるスレーブ装置は、2つのモードのいずれかに従って動作する。1つ目のモードは、従来のPTPに従って動作する「従来型PTPモード」である。2つ目のモードは、上述した予測値直線上の予測値を用いて(t2−t1)および(t4−t3)を算出し、ローカルタイムLT2を補正し、ローカルタイムLT1を補正しない処理を実行する「拡張PTPモード」である。2つのモード切り替えは、手動による切り替えであってもよく、または後述する基準値a1およびa2を算出するために、伝送遅延時間のばらつきが低減してきたタイミングで自動で切り替わってもよい。   The slave device according to the embodiment operates according to one of two modes. The first mode is the "conventional PTP mode" which operates according to the conventional PTP. In the second mode, a process of calculating (t2-t1) and (t4-t3) using the above-mentioned predicted value on the predicted value straight line, correcting the local time LT2, and not correcting the local time LT1 is executed. "Extended PTP mode". The two modes may be switched manually, or may be automatically switched at the timing when the variation in transmission delay time is reduced in order to calculate reference values a1 and a2 described later.

次にa1およびa2の値をどのように設定するかを説明する。図3の(t2−t1)グラフでのa1は、T00の時点での(t2−t1)の予測値に対する基準値であり、(t2−t1)の最短値より少ない事を前提としている。図3の(t4−t3)グラフでのa2は、T00の時点での(t4−t3)の予測値に対する基準値であり、(t4−T3)の最短値より少ない事を前提としている。   Next, how to set the values of a1 and a2 will be described. A1 in the (t2-t1) graph of FIG. 3 is a reference value for the predicted value of (t2-t1) at the time of T00, and is assumed to be smaller than the shortest value of (t2-t1). A2 in the (t4-t3) graph of FIG. 3 is a reference value for the predicted value of (t4-t3) at the time of T00, and is assumed to be smaller than the shortest value of (t4-T3).

(t2−t1)および(t4−T3)の最短値を把握する事はできない。よって、基準値a1は、例えば、スレーブ装置が「従来型PTPモード」で動作し、所定の回数だけ同期メッセージ交換を行った結果として得られた(t2−t1)の最短値に所定の演算処理(例えば0.5倍等の所定の値を掛け合わせた値を減算)を行った値が設定されてもよい。この場合、スレーブ装置が「従来型PTPモード」において同期メッセージ交換を行い、伝送遅延時間d(つまり、測定された(t2−t1))のばらつきが小さくなったと判断したときの(t2−t1)の最短値に所定の演算処理が行われてもよい。同様に、基準値a2は、スレーブ装置が「従来型PTPモード」で動作し、所定の回数だけ同期メッセージ交換を行った結果として得られた(t4−t3)の最短値に所定の演算処理(例えば0.5倍等の所定の値を掛け合わせた値を減算)を行った値が設定されてもよい。この場合、スレーブ装置が「従来型PTPモード」において同期メッセージ交換を行い、伝送遅延時間d(つまり、測定された(t4−t3))のばらつきが小さくなったと判断したときの(t4−t3)の最短値に所定の演算処理が行われてもよい。   The shortest value of (t2-t1) and (t4-T3) cannot be grasped. Therefore, the reference value a1 is, for example, a predetermined arithmetic processing that is the shortest value (t2-t1) obtained as a result of the slave device operating in the "conventional PTP mode" and exchanging synchronous messages a predetermined number of times. A value obtained by (subtracting a value obtained by multiplying a predetermined value such as 0.5 times) may be set. In this case, when the slave device performs the synchronous message exchange in the "conventional PTP mode" and determines that the variation of the transmission delay time d (that is, the measured (t2-t1)) is small (t2-t1). Predetermined arithmetic processing may be performed on the shortest value of. Similarly, the reference value a2 is set to the shortest value of (t4−t3), which is obtained as a result of the slave device operating in the “conventional PTP mode” and exchanging the synchronous messages a predetermined number of times (the predetermined arithmetic processing ( For example, a value obtained by subtracting a value obtained by multiplying a predetermined value such as 0.5 times may be set. In this case, when the slave device performs the synchronous message exchange in the "conventional PTP mode" and determines that the variation of the transmission delay time d (that is, the measured (t4-t3)) becomes small (t4-t3). Predetermined arithmetic processing may be performed on the shortest value of.

また、基準値a1は、例えば、スレーブ装置が「従来型PTPモード」で動作し、所定の回数だけ同期メッセージ交換を行った結果として得られた(t2−t1)の平均値に所定の演算処理(例えば0.5倍等の所定の値を掛け合わせた値を減算)を行った値が設定されてもよい。この場合、スレーブ装置が「従来型PTPモード」において同期メッセージ交換を行い、伝送遅延時間d(つまり、測定された(t2−t1))のばらつきが小さくなったと判断したときの(t2−t1)の平均値に所定の演算処理が行われてもよい。同様に、基準値a2は、スレーブ装置が「従来型PTPモード」で動作し、所定の回数だけ同期メッセージ交換を行った結果として得られた(t4−t3)の平均値に所定の演算処理(例えば0.5倍等の所定の値を掛け合わせた値を減算)を行った値が設定されてもよい。この場合、スレーブ装置が「従来型PTPモード」において同期メッセージ交換を行い、伝送遅延時間d(つまり、測定された(t4−t3))のばらつきが小さくなったと判断したときの(t2−t1)の平均値に所定の演算処理が行われてもよい。   Further, the reference value a1 is, for example, a predetermined arithmetic processing to the average value of (t2-t1) obtained as a result of the slave device operating in the "conventional PTP mode" and exchanging synchronization messages a predetermined number of times. A value obtained by (subtracting a value obtained by multiplying a predetermined value such as 0.5 times) may be set. In this case, when the slave device performs the synchronous message exchange in the "conventional PTP mode" and determines that the variation of the transmission delay time d (that is, the measured (t2-t1)) is small (t2-t1). Predetermined arithmetic processing may be performed on the average value of. Similarly, the reference value a2 is a predetermined arithmetic processing ((t4−t3)) obtained as a result of the slave device operating in the “conventional PTP mode” and performing synchronous message exchanges a predetermined number of times. For example, a value obtained by subtracting a value obtained by multiplying a predetermined value such as 0.5 times may be set. In this case, when the slave device performs the synchronous message exchange in the "conventional PTP mode" and determines that the variation of the transmission delay time d (that is, the measured (t4-t3)) becomes small (t2-t1). Predetermined arithmetic processing may be performed on the average value of.

上述したように、スレーブ装置が同期メッセージ交換における伝送遅延時間dのばらつきが小さくなったと判定した場合、上述した「従来型PTPモード」から「拡張PTPモード」に遷移してもよい。伝送遅延時間dのばらつきが小さくなった結果として得られる(t2−t1)および(t4−t3)の最短値または平均値から、適切なa1およびa2を設定することができるからである。上述した基準値a1およびa2の設定、ならびにモード間の遷移は、後述するPTPプロトコルエンジン611によって実行される。   As described above, when the slave device determines that the variation of the transmission delay time d in the synchronous message exchange has become small, the “conventional PTP mode” may be changed to the “extended PTP mode”. This is because it is possible to set appropriate a1 and a2 from the shortest value or the average value of (t2-t1) and (t4-t3) obtained as a result of the smaller variation in the transmission delay time d. The above-described setting of the reference values a1 and a2 and the transition between the modes are executed by the PTP protocol engine 611 described later.

別の方法としては、基準値a1は、0に設定されてもよい。基準値a2についても同様である。基準値a2については、そもそも、スレーブ装置のローカルタイムLT1の精度が低いので、スレーブ装置のローカルクロックの周波数がグランドマスター装置のクロックの周波数よりも高い場合でも、t3>t4であることがあり得る。よって、伝送遅延時間dの値が小さい場合に、(t4−t3)が(t4−t3)の最短値を下回る事を避けるために、a2は、0未満の所定の値が設定されてもよい。   Alternatively, the reference value a1 may be set to zero. The same applies to the reference value a2. Regarding the reference value a2, since the accuracy of the local time LT1 of the slave device is low in the first place, it is possible that t3> t4 even when the frequency of the local clock of the slave device is higher than the frequency of the clock of the grand master device. . Therefore, in order to avoid that (t4-t3) falls below the shortest value of (t4-t3) when the value of the transmission delay time d is small, a2 may be set to a predetermined value less than 0. .

あるいはネットワーク構成が既知の場合に、ネットワークを構成している機器の理論的な最短値の合計が基準値a1およびa2に設定されてもよい。   Alternatively, when the network configuration is known, the total of the theoretical minimum values of the devices that configure the network may be set as the reference values a1 and a2.

上記の処理を行う事で、始点であるT00からの時間が経過するにつれて、(t2−t1)の予測値は(T2−t1)の最短値に近づいていき、同期メッセージ交換での実測値のばらつきがローカルタイムの補正のためのオフセットの計算に与える影響も低減していく。(t4−t3)についても同様である。   By performing the above process, the predicted value of (t2-t1) approaches the shortest value of (T2-t1) as the time from the starting point T00 elapses, and the predicted value of the synchronous message exchange becomes The influence of variations on offset calculation for local time correction will also be reduced. The same applies to (t4-t3).

これにより、伝送遅延時間のばらつきがオフセットの計算に与える影響を最小にし、高精度のオフセット値を得る事が可能となりPTPをサポートしていないIPネットワーク上で高精度な時刻同期を実現する事ができる。   As a result, it is possible to minimize the influence of variations in transmission delay time on the offset calculation, and to obtain a highly accurate offset value, thereby achieving highly accurate time synchronization on an IP network that does not support PTP. it can.

図4は、スレーブ装置のローカルクロックの周波数がグランドマスター装置のクロックの周波数よりも低いケースを例に、フリーランニングのローカルタイムLT1を用いた同期メッセージ交換における時間差(t2−t1)の遷移を示す。考え方は、図3で説明したのと同様である。図5は、スレーブ装置のローカルタイムの周波数がグランドマスター装置のタイムの周波数よりも低いケースを例に、フリーランニングのローカルタイムLT1を用いた同期メッセージ交換における時間差(t4−t3)の遷移を示す。考え方は、図3で説明したのと同様である。   FIG. 4 shows the transition of the time difference (t2-t1) in the synchronous message exchange using the free-running local time LT1 in the case where the frequency of the local clock of the slave device is lower than the frequency of the clock of the grand master device. . The idea is the same as that explained in FIG. FIG. 5 shows the transition of the time difference (t4-t3) in the synchronous message exchange using the free-running local time LT1 in the case where the frequency of the local time of the slave device is lower than the frequency of the time of the grand master device. . The idea is the same as that explained in FIG.

図6は、図1におけるスレーブ装置102の構成を示す図である。スレーブ装置103および104も同様の構成を有するので、図6では、スレーブ装置102の構成のみを示す。スレーブ装置102は、プロトコル上は、PTPで定義されたオーディナリークロックのスレーブクロックとして動作する。すなわち、同期メッセージ交換でのスレーブとして動作をする。しかし、スレーブ装置102の構成はIEEE Std 1588−2008に示されているPTPの標準的なスレーブの構成とは異なる。   FIG. 6 is a diagram showing the configuration of the slave device 102 in FIG. Since slave devices 103 and 104 have the same configuration, only the configuration of slave device 102 is shown in FIG. The slave device 102 operates as a slave clock of the ordinary clock defined by PTP in terms of protocol. That is, it operates as a slave in synchronous message exchange. However, the configuration of the slave device 102 is different from the standard slave configuration of PTP shown in IEEE Std 1588-2008.

スレーブ装置102は、制御装置601、通信装置602、メモリ603、および記憶装置604を含み、それらの要素が内部バスを介してそれぞれ結合されている。   The slave device 102 includes a control device 601, a communication device 602, a memory 603, and a storage device 604, each of which is coupled via an internal bus.

制御装置601は、マイクロプロセッサであり、記憶装置604に記憶されたプログラムをメモリ603に読み出して実行する。制御装置601は、スレーブ装置102の全体を制御する。制御装置601は、ASIC(Application Specific Integrated circuit)、PLD(Programmable Logic Device)、またはFPGA(Field Programmable Gate Array)などのハードウェアを使用して実装されてもよい。   The control device 601 is a microprocessor, and reads the program stored in the storage device 604 into the memory 603 and executes it. The control device 601 controls the entire slave device 102. The control device 601 may be implemented using hardware such as an ASIC (Application Specific Integrated circuit), a PLD (Programmable Logic Device), or an FPGA (Field Programmable Gate Array).

通信装置602は、IPネットワーク110を介してグランドマスター装置101との間で同期メッセージを送受信するネットワークインタフェースである。通信装置602は、後述するイベントインタフェース618および汎用インタフェース619を実装する。   The communication device 602 is a network interface that sends and receives a synchronization message to and from the grand master device 101 via the IP network 110. The communication device 602 implements an event interface 618 and a general-purpose interface 619 described later.

図7は、スレーブ装置102の論理モジュールを示す図である。スレーブ装置102は、論理モジュールとして、PTPプロトコルエンジン611、フリーラン可能ローカルタイム部612、タイムスタンプ発生部613、オフセット計算部614、ローカルタイム補正部615、時間差計算部616、および予測値直線設定部617を含む。これらの論理モジュールは、通信装置602に対して制御装置601が所定のプログラムを実行し制御すること、あるいは制御装置601内で所定のプログラムを実行することによって実装される。スレーブ装置102はまた、イーサネット1102に接続された単一の物理ポート上の2つの論理インタフェースであるイベントインタフェース618および汎用インタフェース619を含む。   FIG. 7 is a diagram showing logic modules of the slave device 102. The slave device 102 includes, as logic modules, a PTP protocol engine 611, a free-runnable local time unit 612, a time stamp generation unit 613, an offset calculation unit 614, a local time correction unit 615, a time difference calculation unit 616, and a predicted value straight line setting unit. 617 is included. These logic modules are implemented by the control device 601 executing and controlling a predetermined program for the communication device 602, or by executing a predetermined program in the control device 601. The slave device 102 also includes an event interface 618 and a general purpose interface 619, which are two logical interfaces on a single physical port connected to the Ethernet 1102.

イベントインタフェース618、は同期メッセージ交換用のインタフェースであり、同期メッセージ交換用のタイムスタンプを生成するタイムスタンプ発生部613に接続されている。   The event interface 618 is an interface for synchronous message exchange, and is connected to a time stamp generation unit 613 that generates a time stamp for synchronous message exchange.

汎用インタフェース619は、タイムスタンプを持たないメッセージの送受信に使用され、PTPプロトコルエンジン611に接続されている。PTPプロトコルエンジン611はPTPメッセージを送受信し、データセットを更新し、ポートに関連付けられたステートマシンを実行する。   The general-purpose interface 619 is used for transmitting / receiving a message having no time stamp, and is connected to the PTP protocol engine 611. The PTP protocol engine 611 sends and receives PTP messages, updates the dataset, and executes the state machine associated with the port.

フリーラン可能ローカルタイム部612は、同期メッセージ交換に用いられるローカルタイムLT1を維持する。フリーラン可能ローカルタイム部612は、ローカルタイムLT1からのクロックを基にフリーランニングが可能なカウンタである。フリーラン可能ローカルタイム部612は、図3に示した同期メッセージ交換用のタイムスタンプ情報(t2およびt3)をタイムスタンプ発生部613に与える。図3の予測値直線の始点T00において、つまり、「従来型PTPモード」から「拡張PTPモード」に遷移するとき、ローカルタイム補正部615からローカルタイムLT2のクロック情報(タイムスタンプ)を取り込み、その値を基にフリーランでカウントアップする。   The free-runnable local time unit 612 maintains the local time LT1 used for the synchronization message exchange. The free-runnable local time unit 612 is a counter capable of free running based on the clock from the local time LT1. The free-runnable local time unit 612 provides the time stamp generation unit 613 with the time stamp information (t2 and t3) for synchronizing message exchange shown in FIG. At the start point T00 of the predicted value line in FIG. 3, that is, when the "conventional PTP mode" is changed to the "extended PTP mode", the clock information (time stamp) of the local time LT2 is fetched from the local time correction unit 615, and Count up by free run based on the value.

タイムスタンプ発生部613は、イベントインタフェース618がグランドマスター装置101から同期メッセージを受信すると、図3の予測値を得るための同期メッセージ交換用(つまり、スレーブ装置102が「拡張PTPモード」にあるとき)にはフリーラン可能ローカルタイム部612からのローカルタイムLT1を用いてタイムスタンプt2およびt3を生成する。タイムスタンプ発生部613は、通常の同期メッセージ交換、例えば、図3における予測値直線の始点T00より以前の同期メッセージ交換においては(つまり、スレーブ装置102が「従来型PTPモード」にあるとき)、ローカルタイム補正部615からのローカルタイムを用いてタイムスタンプを生成する。   When the event interface 618 receives the synchronization message from the grand master device 101, the time stamp generation unit 613 exchanges the synchronization message to obtain the predicted value of FIG. 3 (that is, when the slave device 102 is in the “extended PTP mode”). In (), the time stamps t2 and t3 are generated using the local time LT1 from the free-runnable local time part 612. The time stamp generation unit 613 performs normal synchronization message exchange, for example, in the synchronization message exchange before the start point T00 of the predicted value line in FIG. 3 (that is, when the slave device 102 is in the “conventional PTP mode”). A time stamp is generated using the local time from the local time correction unit 615.

オフセット計算部614は、図3の予測値を得るための同期メッセージ交換時には(つまり、スレーブ装置102が「拡張PTPモード」にあるとき)、予測値直線設定部617から渡された時間差値((t2−t1)の値または(t4−t3)の値)を基にオフセットを計算し、ローカルタイム補正部615に渡す。通常の同期メッセージ交換、例えば図3における予測値直線の始点T00より以前の同期メッセージ交換においては(つまり、スレーブ装置102が「従来型PTPモード」にあるとき)、時間差計算部616から渡された時間差値を用いてオフセットを計算し、ローカルタイム補正部615に渡す。   At the time of exchanging the synchronous message for obtaining the predicted value of FIG. 3 (that is, when the slave device 102 is in the “extended PTP mode”), the offset calculation unit 614 transfers the time difference value ((( The offset is calculated based on the value of (t2-t1) or the value of (t4-t3), and is passed to the local time correction unit 615. In a normal synchronization message exchange, for example, a synchronization message exchange before the start point T00 of the predicted value straight line in FIG. 3 (that is, when the slave device 102 is in the “conventional PTP mode”), it is passed from the time difference calculation unit 616. The offset is calculated using the time difference value and passed to the local time correction unit 615.

時間差計算部616は、PTPプロトコルエンジン611から渡されたt1、t2、t3、t4の値を基に時間差値((t2−t1)の値または(t4−t3)の値)を計算し、予測値直線設定部617およびオフセット計算部614に対して、計算した時間差値およびその時間差値を与えた同期メッセージ交換用のローカルタイム情報(t2またはt3)を渡す。   The time difference calculation unit 616 calculates a time difference value (value of (t2-t1) or value of (t4-t3)) based on the values of t1, t2, t3, and t4 passed from the PTP protocol engine 611, and makes a prediction. The calculated time difference value and the local time information (t2 or t3) for exchanging the synchronization message, to which the calculated time difference value is given, are passed to the value line setting unit 617 and the offset calculation unit 614.

予測値直線設定部617は、図3、図4、および図5に示す時間差グラフの処理を行う機能を備え、予測値の直線(予測値直線)を設定し、その予測値の直線に基づいた時間差情報((t2−t1)の値または(t4−t3)の値)をオフセット計算部614に渡す。   The predicted value straight line setting unit 617 has a function of performing processing of the time difference graphs shown in FIGS. 3, 4, and 5, sets a predicted value straight line (predicted value straight line), and based on the predicted value straight line. The time difference information (value of (t2-t1) or value of (t4-t3)) is passed to the offset calculation unit 614.

予測値直線設定部617は、予測値直線の始点の時間情報(図3ではT00)、現在の時間情報、予測値直線の始点の基準値(図3ではa1およびa2)、現状の予測値直線を形成している実測値(図3の予測値直線305の場合の時刻T01における実測値308、あるいは予測値直線315の場合の時刻T02における実測値318)とその実測値を得た同期メッセージ交換用のローカルタイム情報を保持している。   The prediction value straight line setting unit 617 uses the time information (T00 in FIG. 3) of the start point of the prediction value line, the current time information, the reference value (a1 and a2 in FIG. 3) of the start point of the prediction value line, and the current prediction value line. 3 (measured value 308 at time T01 in the case of the predicted value straight line 305 in FIG. 3 or measured value 318 at time T02 in the case of the predicted value straight line 315) and the synchronous message exchange that obtains the measured value. Holds local time information for.

時間差計算部616から新たな時間差値と新たなローカルタイム情報を受け取った予測値直線設定部617は、時間差グラフ上で当該時間差値と当該スレーブ時間情報でプロットされるポイントを予測値直線の始点と結んだ直線を引いて現状の予測値直線との傾斜の比較を行う。   The predicted value straight line setting unit 617 that has received the new time difference value and the new local time information from the time difference calculation unit 616 sets the point plotted by the time difference value and the slave time information on the time difference graph as the start point of the predicted value straight line. A straight line is drawn to compare the slope with the current predicted value straight line.

新たな時間差値と新たなローカルタイム情報で引いた直線のスレーブ時間軸に対する傾斜角が現状の予測値直線より少ない場合、当該直線を新たな予測値直線とし、新たな時間差値と新たなスレーブ時間をオフセット計算部614に渡す。   If the inclination angle of the straight line drawn by the new time difference value and the new local time information with respect to the slave time axis is less than the current predicted value straight line, the straight line is set as the new predicted value straight line, and the new time difference value and new slave time Is passed to the offset calculation unit 614.

新たな時間差値と新たなローカルタイム情報で引いた直線の傾斜が現状の予測値直線より大きい場合には予測値直線の変更は行わず、新たなローカルタイムに対応する予測値直線上の値を時間差値としてオフセット計算部614に渡す。   If the slope of the straight line drawn by the new time difference value and the new local time information is larger than the current predicted value line, the predicted value line is not changed and the value on the predicted value line corresponding to the new local time is changed. The time difference value is passed to the offset calculation unit 614.

ローカルタイム補正部615は、オフセット計算部614から渡されたオフセットを用いてローカルタイムを補正し、補正済みローカルタイム情報620を出力する。   The local time correction unit 615 corrects the local time using the offset passed from the offset calculation unit 614 and outputs the corrected local time information 620.

補正済みローカルタイム情報620の作成に関しては、論理的な緩慢化に加え必要とあれば通常のDLLあるいはPLL、ホールドオーバーのテクノロジーを用いたコントロールループがワンダーあるいはジッタの抑制のために用いられる。   Regarding the creation of the corrected local time information 620, a control loop using a normal DLL or PLL or holdover technology is used for wonder or jitter suppression in addition to logical slowing.

以下、図6に示すスレーブ装置102の動作を説明する。   The operation of the slave device 102 shown in FIG. 6 will be described below.

スレーブ装置102がイーサネット1102より受信したPTPのパケットは、同期メッセージ交換用パケットの場合はイベントインタフェース618により受信され、そのほかのメッセージの場合には汎用インタフェース619により受信される。   The PTP packet received by the slave device 102 from the Ethernet 1102 is received by the event interface 618 in the case of a synchronous message exchange packet, and is received by the general-purpose interface 619 in the case of other messages.

イベントインタフェース618が受信した同期メッセージ交換用のパケットは、タイムスタンプ発生部613においてパケット内の時間情報の確認を受けPTPプロトコルエンジン611に渡される。   The synchronous message exchange packet received by the event interface 618 is passed to the PTP protocol engine 611 after the time stamp generating unit 613 confirms the time information in the packet.

汎用インタフェース619が受信したパケットの情報もPTPプロトコルエンジン611に渡される。PTPプロトコルエンジン611は、タイムスタンプ発生部613あるいは汎用インタフェース619から渡されたパケットの情報によりデータセットを更新し、ポートに関連付けられたステートマシンを実行する。   The packet information received by the general-purpose interface 619 is also passed to the PTP protocol engine 611. The PTP protocol engine 611 updates the data set with the information of the packet passed from the time stamp generation unit 613 or the general-purpose interface 619, and executes the state machine associated with the port.

タイムスタンプ発生部613からの情報に対しては、PTPプロトコルエンジン611は、同期メッセージ交換のプロトコルシーケンスを実行するとともに、その結果たるt1、t2、t3、およびt4の情報を時間差計算部616に与える。   With respect to the information from the time stamp generation unit 613, the PTP protocol engine 611 executes the protocol sequence of the synchronous message exchange, and gives the resulting information of t1, t2, t3, and t4 to the time difference calculation unit 616. .

時間差計算部616は、それらの情報を基に時間差値((t2−t1)の値または(t4−t3)の値)を計算し、予測値直線設定部617およびオフセット計算部614に対して、計算した時間差値およびその時間差値を与えた同期メッセージ交換用のローカルタイム情報(t2またはt3)を渡す。   The time difference calculation unit 616 calculates a time difference value (value of (t2-t1) or value of (t4-t3)) based on the information, and the predicted value straight line setting unit 617 and the offset calculation unit 614 The calculated time difference value and the local time information (t2 or t3) for exchanging the synchronization message, which gives the time difference value, are passed.

予測値直線設定部617は、時間差計算部616より渡された時間差値とローカルタイム情報でプロットされるポイントを予測値直線の基準値と結んだ直線を引いて現状の予測値直線との傾斜の比較を行い、新たな時間差値と新たなスレーブ時間で引いた直線のスレーブ時間軸に対する傾斜角が現状の予測値直線より少ない場合、当該直線を新たな予測値直線とし、新たな時間差値と新たなローカルタイム情報をオフセット計算部614に渡す。   The predicted value straight line setting unit 617 draws a straight line connecting the time difference value passed from the time difference calculation unit 616 and the point plotted in the local time information with the reference value of the predicted value straight line to determine the slope of the current predicted value straight line. If the inclination angle of the straight line drawn by the new time difference value and the new slave time with respect to the slave time axis is smaller than the current predicted value straight line, the straight line is set as the new predicted value straight line and the new time difference value and new The local time information is passed to the offset calculation unit 614.

そうでない場合には、予測値直線の変更は行わず、新たなローカルタイム情報に対応する予測値直線上の値を時間差値としてオフセット計算部614に渡す。   If not, the predicted value straight line is not changed, and the value on the predicted value straight line corresponding to the new local time information is passed to the offset calculation unit 614 as the time difference value.

傾斜の比較は、図3に示した(t2−t1)グラフでのT011の時点を基準にすると、例えば、以下のように行う。図3に示したように、T011の時点での予測値直線は直線305であり、実測値307(時間差(t2−t1))が得られている。直線305を得るための実測値が、T01の時点で実測された実測値308である。よって、記憶装置604には、T01の時点で実測された実測値308(時間差(t2−t1))およびT01の時点でのローカルタイムLT1を基準としたt2が記憶されている。   The slope comparison is performed as follows, for example, with reference to the time point T011 in the (t2-t1) graph shown in FIG. As shown in FIG. 3, the predicted value line at T011 is the straight line 305, and the measured value 307 (time difference (t2-t1)) is obtained. The actual measurement value for obtaining the straight line 305 is the actual measurement value 308 actually measured at time T01. Therefore, the storage device 604 stores the actual measurement value 308 (time difference (t2-t1)) actually measured at time T01 and t2 based on the local time LT1 at time T01.

よって、予測値直線設定部617は、T011の時点での予測値直線(直線305)上のT011の時点でのt2に対応する予測値(E1)を算出し、算出した予測値E1を実測値307と比較する。実測値の方が小さいと、予測値直線を基準値a1と実測値とを結んだ直線に変更し、その時点(T011)の時点でのt2および実測値を記憶する。つまり、傾斜の比較は、第1の時点TP1で実測した第1の時間差(t2−t1)と第1の時点TP1でのt2と、第2の時点TP2で実測した第2の時間差(t2−t1)と第2の時点TP2でのt2に基づいて、第2の時間差(t2−t1)が、第1の時間差(t2−t1)と基準値a1とを結ぶ直線上の第2の時点TP2でのt2に対応する予測値(EV)よりも大きいか否かを判定することによって行われる。
EV=a1+(TP2−TP0)×(第1の時間差(t2−t1)−a1)/(TP1−T00) 式(8)
TP2は、TP2の時点でのt2(タイムスタンプ)の値であり、TP0は、基準値a1に対応する時点でのt2の値であり、TP1は、TP1の時点でのt2の値である。
Therefore, the predicted value straight line setting unit 617 calculates the predicted value (E1) corresponding to t2 at the time point T011 on the predicted value line (straight line 305) at the time point T011, and calculates the calculated predicted value E1 as the actual measurement value. Compare with 307. When the measured value is smaller, the predicted value straight line is changed to a straight line connecting the reference value a1 and the measured value, and t2 and the measured value at that time point (T011) are stored. In other words, the slopes are compared by measuring the first time difference (t2-t1) at the first time point TP1, t2 at the first time point TP1, and the second time difference (t2- at the second time point TP2). Based on t1) and t2 at the second time point TP2, the second time difference (t2-t1) is the second time point TP2 on the straight line connecting the first time difference (t2-t1) and the reference value a1. It is performed by determining whether it is larger than the predicted value (EV) corresponding to t2 in.
EV = a1 + (TP2-TP0) * (first time difference (t2-t1) -a1) / (TP1-T00) Formula (8)
TP2 is the value of t2 (time stamp) at the time of TP2, TP0 is the value of t2 at the time corresponding to the reference value a1, and TP1 is the value of t2 at the time of TP1.

予測値EVが第2の時間差(t2−t1)よりも小さい場合、a1と第2の時間差(t2−t1)とを結ぶ直線が予測値直線となる。一方、予測値EVが第2の時間差(t2−t1)よりも大きい場合、a1と第1の時間差(t2−t1)とを結ぶ直線が予測値直線となる。   When the predicted value EV is smaller than the second time difference (t2-t1), the straight line connecting a1 and the second time difference (t2-t1) is the predicted value line. On the other hand, when the predicted value EV is larger than the second time difference (t2-t1), the straight line connecting a1 and the first time difference (t2-t1) is the predicted value straight line.

t4−t3についても同様に、傾斜の比較は、第1の時点TP1で実測した第1の時間差(t4−t3)と第1の時点TP1でのt2と、第2の時点TP2で実測した第2の時間差(t4−t3)と第2の時点TP2でのt2に基づいて、第2の時間差(t4−t3)が、第1の時間差(t4−t3)と基準値a2とを結ぶ直線上の第2の時点TP2でのt2に対応する予測値(EV)よりも大きいか否かを判定することによって行われる。
EV=a2+(TP2−TP0)×(第1の時間差(t4−t3)−a1)/(TP1−T00) 式(9)
TP2は、TP2の時点でのt3(タイムスタンプ)の値であり、TP0は、基準値a1に対応する時点でのt3の値であり、TP1は、TP1の時点でのt3の値である。
Similarly for t4 to t3, the slopes are compared by the first time difference (t4 to t3) measured at the first time point TP1, t2 at the first time point TP1, and the second time point measured at the second time point TP2. The second time difference (t4-t3) is on the straight line connecting the first time difference (t4-t3) and the reference value a2, based on the time difference (t4-t3) of 2 and the time t2 at the second time point TP2. It is performed by determining whether or not it is larger than the predicted value (EV) corresponding to t2 at the second time point TP2.
EV = a2 + (TP2-TP0) * (first time difference (t4-t3) -a1) / (TP1-T00) Formula (9)
TP2 is the value of t3 (time stamp) at the time of TP2, TP0 is the value of t3 at the time corresponding to the reference value a1, and TP1 is the value of t3 at the time of TP1.

予測値EVが第2の時間差(t4−t3)よりも小さい場合、a2と第2の時間差(t4−t3)とを結ぶ直線が予測値直線となる。一方、予測値EVが第2の時間差(t4−t3)よりも大きい場合、a2と第1の時間差(t4−t3)とを結ぶ直線が予測値直線となる。   When the predicted value EV is smaller than the second time difference (t4-t3), the straight line connecting a2 and the second time difference (t4-t3) is the predicted value straight line. On the other hand, when the predicted value EV is larger than the second time difference (t4-t3), the straight line connecting a2 and the first time difference (t4-t3) is the predicted value straight line.

オフセット計算部614は、高精度な時刻同期を取る場合、例えば図3の予測値直線の始点T00より以後の同期メッセージ交換(つまり、スレーブ装置102が「拡張PTPモード」にあるとき)においては予測値直線設定部617から渡された時間差値((t2−t1)の値または(t4−t3)の値)を基にオフセットを計算し、ローカルタイム補正部615に渡す。   The offset calculation unit 614 predicts, for example, in synchronization message exchange (that is, when the slave device 102 is in the “extended PTP mode”) after the start point T00 of the predicted value straight line in FIG. 3 when highly accurate time synchronization is performed. An offset is calculated based on the time difference value (value of (t2-t1) or value of (t4-t3)) passed from the value straight line setting unit 617, and is passed to the local time correction unit 615.

オフセット計算部614は、通常の同期メッセージ交換、例えば図3における予測値直線の始点T00より以前の同期メッセージ交換においては(つまり、スレーブ装置102が「従来型PTPモード」にあるとき)、時間差計算部616から渡された時間差値を用いてオフセットを計算し、ローカルタイム補正部615に渡す。   The offset calculation unit 614 calculates the time difference in a normal synchronous message exchange, for example, in the synchronous message exchange before the start point T00 of the predicted value line in FIG. 3 (that is, when the slave device 102 is in the “conventional PTP mode”). The offset is calculated using the time difference value passed from the unit 616 and passed to the local time correction unit 615.

これにより、高精度の時刻同期を取る場合に(つまり、スレーブ装置102が「拡張PTPモード」にあるとき)、予測値直線を基にしたローカルタイムの補正を行い、その予備段階として通常の同期メッセージ交換を行う場合には(つまり、スレーブ装置102が「従来型PTPモード」にあるとき)、通常のオーディナリークロックとしてのローカルタイムの補正を行うことが可能となる。   As a result, when highly accurate time synchronization is performed (that is, when the slave device 102 is in the “extended PTP mode”), the local time is corrected based on the predicted value straight line, and normal synchronization is performed as a preliminary step. When exchanging messages (that is, when the slave device 102 is in the "conventional PTP mode"), it is possible to correct the local time as a normal ordinary clock.

PTPプロトコルエンジン611により同期メッセージ交換のプロトコルシーケンスが実行されると、タイムスタンプ発生部613は、高精度の時刻同期を取る場合には(つまり、スレーブ装置102が「拡張PTPモード」にあるとき)、フリーラン可能ローカルタイム部612からのローカルタイムを用いてタイムスタンプを生成し、通常の同期メッセージ交換においては(つまり、スレーブ装置102が「従来型PTPモード」にあるとき)、ローカルタイム補正部615からローカルタイムを用いてタイムスタンプを生成し、同期メッセージ交換に用いる。   When the protocol sequence of the synchronous message exchange is executed by the PTP protocol engine 611, the time stamp generating unit 613 performs time synchronization with high accuracy (that is, when the slave device 102 is in the “extended PTP mode”). , A local time from the free-runnable local time unit 612 is used to generate a time stamp, and in a normal synchronous message exchange (that is, when the slave device 102 is in the “conventional PTP mode”), the local time correction unit. A time stamp is generated from 615 using the local time and is used for the synchronous message exchange.

これにより、高精度の時刻同期を取る場合には、安定したフリーランのローカルタイムLT1によるタイムスタンプを用い、通常の同期メッセージ交換を行う場合には補正済みのローカルタイムによるタイムスタンプを用いる事が可能となる。   As a result, a stable free-run local time LT1 may be used for high precision time synchronization, and a corrected local time stamp may be used for normal synchronization message exchange. It will be possible.

以上、説明したように本実施形態では、同期メッセージ交換で得たタイムスタンプ情報を基に次のタイムスタンプの予測値を算出し、ローカルタイムの補正に用いる。また、本実施形態では、PTPスレーブ装置において、フリーランニングのローカルタイムと、グランドマスター装置の時間に同期するように補正を行った補正済みローカルタイムの二つのローカルタイムを設ける。よって、フリーランニング可能なローカルタイムを同期メッセージ交換で用いる事により伝送遅延時間のばらつきとローカルタイムの不安定さがオフセットの計算に与える影響を最小にし、高精度の時刻同期を得る事を可能としている。   As described above, in the present embodiment, the predicted value of the next time stamp is calculated based on the time stamp information obtained by the synchronization message exchange and used for the correction of the local time. Further, in this embodiment, the PTP slave device is provided with two local times, that is, a free-running local time and a corrected local time corrected so as to be synchronized with the time of the grand master device. Therefore, by using the free-running local time for synchronization message exchange, it is possible to minimize the influence of variations in transmission delay time and instability of local time on offset calculation, and to obtain highly accurate time synchronization. There is.

これにより、ネットワーク内の中間ノード(スイッチおよびルータなど)がPTP未サポートのネットワークにおいて同期メッセージ交換(Synchronization message exchange)によって獲得したタイムスタンプを基に、より高精度の時刻同期を取ることができる。   As a result, more accurate time synchronization can be achieved based on the time stamps acquired by the intermediate nodes (switches, routers, etc.) in the network in the PTP-unsupported network by the synchronization message exchange.

本実施形態で実装される処理は、コンピュータ実行可能命令を含むコンピュータプログラムによって実行されてもよい。コンピュータ実行可能命令は、制御装置によって実行されるとき、制御装置に、本実施形態で実装される処理を実行させる。上記コンピュータプログラムは、コンピュータ可読記憶媒体に記憶されてもよい。   The processes implemented in this embodiment may be executed by a computer program including computer-executable instructions. The computer-executable instructions, when executed by the controller, cause the controller to perform the processes implemented in this embodiment. The computer program may be stored in a computer-readable storage medium.

本明細書および図面において開示される実施形態は一例にすぎず、本発明の技術的範囲を定める際に、本開示の内容に限定して解釈されるべきではない。説明のため各処理を分けて記載したが、各処理を統合、連携させ、それぞれが有する処理の一部または全部を他方が行うように実装され得る。   The embodiments disclosed in the present specification and the drawings are merely examples, and should not be construed as being limited to the contents of the present disclosure when defining the technical scope of the present invention. Although each process is described separately for the sake of description, the processes may be integrated and coordinated so that the other part performs some or all of the processes of each process.

101 PTPグランドマスター装置
102、103、104 PTPスレーブ装置
1101、1102、1103、1104 イーサネット
110 IPネットワーク
601 制御装置
602 通信装置
603 メモリ
604 記憶装置
611 PTPプロトコルエンジン
612 フリーラン可能ローカルタイム部
613 タイムスタンプ発生部
614 オフセット計算部
615 ローカルタイム補正部
616 時間差計算部
617 予測値直線設定部
618 イベントインタフェース
619 汎用インタフェース
101 PTP grand master device 102, 103, 104 PTP slave device 1101, 1102, 1103, 1104 Ethernet 110 IP network 601 Control device 602 Communication device 603 Memory 604 Storage device 611 PTP protocol engine 612 Free run possible local time part 613 Time stamp generation 614 Offset calculation unit 615 Local time correction unit 616 Time difference calculation unit 617 Prediction value straight line setting unit 618 Event interface 619 General purpose interface

Claims (6)

PTPに従って動作するスレーブ装置であって、
第1の時点において、グランドマスター装置との同期メッセージの交換を通じて、前記同期メッセージの送信時刻と受信時刻との間の第1の時間差を取得し、前記第1の時間差は、前記第1の時点よりも前の基準時点に対応する基準値からの第1の増分を有し、前記第1の増分は、前記基準時点から前記第1の時点までの時間に対応し、
前記第1の時点よりも後に前記同期メッセージの交換を行うときの第2の時点において、前記第1の時間差からの第2の増分を有する第2の時間差を算出し、前記第2の増分は、前記第1の増分と同一の増加率を有し、および前記第1の時点から前記第2の時点までの時間に対応し、
前記第2の時間差に基づいて、前記グランドマスター装置のマスタータイムと前記スレーブ装置のローカルタイムとの間のオフセットを算出し、
前記第1の時点よりも後の第3の時点において、前記同期メッセージの送信時刻と受信時刻との間の第3の時間差を取得し、前記第3の時間差は、前記基準値からの第3の増分を有し、
前記基準値からの第4の増分を有する第4の時間差を算出し、前記第4の増分は、前記第1の増分と同一の増加率を有し、
前記第3の増分と前記第4の増分とを比較し、前記第3の増分および前記第4の増分は、前記基準時点から前記第3の時点までの時間に対応し、
前記第3の時点よりも後に前記同期メッセージの交換を行うときの第4の時点において、前記第3の時間差からの第5の増分を有する第5の時間差、または前記第4の時間差からの第6の増分を有する第6の時間差を算出し、前記第5の増分は、前記第3の増分と同一の増加率を有し、および前記第3の時点から前記第4の時点までの時間に対応し、前記第6の増分は、前記第4の増分と同一の増加率を有し、および前記第3の時点から前記第4の時点までの時間に対応し、
前記第5の時間差または前記第6の時間差に基づいて、前記オフセットを算出する、
ように構成された制御装置を備えたことを特徴とするスレーブ装置。
A slave device operating according to PTP,
At a first time point, a first time difference between a transmission time and a reception time of the synchronization message is obtained through an exchange of a synchronization message with a grandmaster device, and the first time difference is the first time point. A first increment from a reference value corresponding to an earlier reference instant, said first increment corresponding to a time from said reference instant to said first instant,
Calculating a second time difference having a second increment from the first time difference at a second time point when exchanging the synchronization message after the first time point, the second increment being , Having the same rate of increase as the first increment, and corresponding to the time from the first time point to the second time point,
Calculating an offset between the master time of the grand master device and the local time of the slave device based on the second time difference ;
At a third time point after the first time point, a third time difference between the transmission time and the reception time of the synchronization message is acquired, and the third time difference is the third time from the reference value. Has an increment of
Calculating a fourth time difference having a fourth increment from the reference value, the fourth increment having the same rate of increase as the first increment;
Comparing the third increment with the fourth increment, the third increment and the fourth increment corresponding to a time from the reference time point to the third time point,
A fifth time difference having a fifth increment from the third time difference or a fourth time difference from the fourth time difference at a fourth time point when exchanging the synchronization message after the third time point. Calculating a sixth time difference having an increment of 6, the fifth increment having the same rate of increase as the third increment, and the time from the third time point to the fourth time point. Correspondingly, the sixth increment has the same rate of increase as the fourth increment, and corresponds to the time from the third time point to the fourth time point,
Calculating the offset based on the fifth time difference or the sixth time difference,
A slave device comprising a control device configured as described above.
前記制御装置は、前記第3の増分が前記第4の増分よりも小さいと判定した場合、前記第5の時間差に基づいて、前記オフセットを算出するようにさらに構成されたことを特徴とする請求項に記載のスレーブ装置。 The control device is further configured to calculate the offset based on the fifth time difference when it is determined that the third increment is smaller than the fourth increment. The slave device according to Item 1 . 前記スレーブ装置は、第1のローカルタイムおよび第2のローカルタイムを含み、
前記制御装置は、
前記第1のローカルタイムに基づいて、前記第1の時間差を取得し、
前記算出したオフセットに基づいて、前記第2のローカルタイムを補正する、
ようにさらに構成されたことを特徴とする請求項1に記載のスレーブ装置。
The slave device includes a first local time and a second local time,
The control device is
Acquiring the first time difference based on the first local time,
Correcting the second local time based on the calculated offset,
The slave device according to claim 1, further configured as follows.
前記基準値は、ゼロに設定される、ことを特徴とする請求項1乃至3のいずれか一項に記載のスレーブ装置。 The slave device according to any one of claims 1 to 3 , wherein the reference value is set to zero. 前記制御装置は、前記同期メッセージの交換を通じて、伝送遅延時間を算出するようにさらに構成され、
前記基準値は、前記算出された伝送遅延時間の最短値に所定の値を減算した値が設定される、ことを特徴とする請求項1乃至3のいずれか一項に記載のスレーブ装置。
The controller is further configured to calculate a transmission delay time through the exchange of the synchronization message,
The reference value, the slave device according to any one of claims 1 to 3 value obtained by subtracting a predetermined value to the minimum value of the transmission delay time the calculated is set, it is characterized.
PTPに従って動作するスレーブ装置によって実行される方法であって、
第1の時点において、グランドマスター装置との同期メッセージの交換を通じて、前記同期メッセージの送信時刻と受信時刻との間の第1の時間差を取得するステップであって、前記第1の時間差は、前記第1の時点よりも前の基準時点に対応する基準値からの第1の増分を有し、前記第1の増分は、前記基準時点から前記第1の時点までの時間に対応する、ステップと、
前記第1の時点よりも後に前記同期メッセージの交換を行うときの第2の時点において、前記第1の時間差からの第2の増分を有する第2の時間差を算出するステップであって、前記第2の増分は、前記第1の増分と同一の増加率を有し、および前記第1の時点から前記第2の時点までの時間に対応する、ステップと、
前記第2の時間差に基づいて、前記グランドマスター装置のマスタータイムと前記スレーブ装置のローカルタイムとの間のオフセットを算出するステップと、
前記第1の時点よりも後の第3の時点において、前記同期メッセージの送信時刻と受信時刻との間の第3の時間差を取得するステップであって、前記第3の時間差は、前記基準値からの第3の増分を有する、ステップと、
前記基準値からの第4の増分を有する第4の時間差を算出するステップであって、前記第4の増分は、前記第1の増分と同一の増加率を有する、ステップと、
前記第3の増分と前記第4の増分とを比較するステップであって、前記第3の増分および前記第4の増分は、前記基準時点から前記第3の時点までの時間に対応する、ステップと、
前記第3の時点よりも後に前記同期メッセージの交換を行うときの第4の時点において、前記第3の時間差からの第5の増分を有する第5の時間差、または前記第4の時間差からの第6の増分を有する第6の時間差を算出するステップであって、前記第5の増分は、前記第3の増分と同一の増加率を有し、および前記第3の時点から前記第4の時点までの時間に対応し、前記第6の増分は、前記第4の増分と同一の増加率を有し、および前記第3の時点から前記第4の時点までの時間に対応する、ステップと、
前記第5の時間差または前記第6の時間差に基づいて、前記オフセットを算出するステップと、
を備えたことを特徴とする方法。
A method performed by a slave device operating according to PTP, comprising:
Obtaining a first time difference between a transmission time and a reception time of the synchronization message at the first time point through exchanging a synchronization message with a grandmaster device, wherein the first time difference is A first increment from a reference value corresponding to a reference time point prior to the first time point, said first increment corresponding to a time from said reference time point to said first time point; ,
Calculating a second time difference having a second increment from the first time difference at a second time when exchanging the synchronization message after the first time. An increment of 2 has the same rate of increase as the first increment and corresponds to the time from the first time point to the second time point;
Calculating an offset between the master time of the grand master device and the local time of the slave device based on the second time difference;
A step of obtaining a third time difference between the transmission time and the reception time of the synchronization message at a third time point after the first time point, wherein the third time difference is the reference value. With a third increment from
Calculating a fourth time difference having a fourth increment from the reference value, the fourth increment having the same rate of increase as the first increment;
Comparing the third increment and the fourth increment, the third increment and the fourth increment corresponding to a time from the reference time point to the third time point. When,
A fifth time difference having a fifth increment from the third time difference or a fourth time difference from the fourth time difference at a fourth time point when exchanging the synchronization message after the third time point. Calculating a sixth time difference having an increment of 6, said fifth increment having the same rate of increase as said third increment, and said third to fourth time points. The sixth increment has the same rate of increase as the fourth increment, and corresponds to the time from the third time point to the fourth time point.
Calculating the offset based on the fifth time difference or the sixth time difference;
A method comprising:
JP2019189387A 2018-10-29 2019-10-16 Time synchronization system Active JP6684409B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/041932 WO2020090664A1 (en) 2018-10-29 2019-10-25 Time synchronization system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018202527 2018-10-29
JP2018202527 2018-10-29

Publications (2)

Publication Number Publication Date
JP6684409B1 true JP6684409B1 (en) 2020-04-22
JP2020072474A JP2020072474A (en) 2020-05-07

Family

ID=70286847

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019189387A Active JP6684409B1 (en) 2018-10-29 2019-10-16 Time synchronization system

Country Status (2)

Country Link
JP (1) JP6684409B1 (en)
WO (1) WO2020090664A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221731A (en) * 2021-12-09 2022-03-22 北京罗克维尔斯科技有限公司 Time synchronization precision determination method and system and electronic equipment
CN114221731B (en) * 2021-12-09 2024-04-16 北京罗克维尔斯科技有限公司 Time synchronization precision determining method and system and electronic equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AT523930B1 (en) * 2020-11-06 2022-01-15 B & R Ind Automation Gmbh Time synchronization in a real-time network

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8473638B2 (en) * 2008-05-02 2013-06-25 James Aweya Method and apparatus for time and frequency transfer in communication networks
US8416812B2 (en) * 2008-09-22 2013-04-09 Codrut Radu Radulescu Network timing synchronization systems
JP5534548B2 (en) * 2009-03-10 2014-07-02 日本電気株式会社 Receiving side node for clock synchronization, method and program thereof
EP2434674B1 (en) * 2010-09-24 2013-10-30 Siemens Aktiengesellschaft Method for synchronising time in a communications network
JP5783017B2 (en) * 2011-12-02 2015-09-24 富士通株式会社 Oscillator frequency error correction apparatus, frequency error correction method, frequency error correction program, and frequency error correction system
WO2014037685A1 (en) * 2012-09-05 2014-03-13 Khalifa University of Science, Technology, and Research Method and system for clock offset and skew estimation
US9395697B2 (en) * 2012-10-26 2016-07-19 Qualcomm Technologies International, Ltd. Method and apparatus for calculating transmission delay across a network
US10305616B2 (en) * 2014-12-16 2019-05-28 Robert Bosch Gmbh Method of synchronising clocks of network devices
US9973292B2 (en) * 2016-04-01 2018-05-15 Khalifa University Of Science, Technology And Research Methods and systems for estimating offset and skew using linear programming
JP6953735B2 (en) * 2016-04-01 2021-10-27 富士通株式会社 Information processing equipment, information processing system, information processing method and information processing program
JP2018006913A (en) * 2016-06-29 2018-01-11 国立研究開発法人情報通信研究機構 Information communication system and information communication equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221731A (en) * 2021-12-09 2022-03-22 北京罗克维尔斯科技有限公司 Time synchronization precision determination method and system and electronic equipment
CN114221731B (en) * 2021-12-09 2024-04-16 北京罗克维尔斯科技有限公司 Time synchronization precision determining method and system and electronic equipment

Also Published As

Publication number Publication date
JP2020072474A (en) 2020-05-07
WO2020090664A1 (en) 2020-05-07

Similar Documents

Publication Publication Date Title
JP5358813B2 (en) Network node, time synchronization method, and network system
CN102104475B (en) IEEE 1588-based synchronization system and synchronization method thereof
US10432336B2 (en) System and method of synchronizing a distributed clock in a packet-compatible network
JP5811794B2 (en) Communication device
JP5377663B2 (en) COMMUNICATION SYSTEM, COMMUNICATION DEVICE, AND TIME SYNCHRONIZATION METHOD
US9258073B2 (en) Network element for a packet-switched network
US11316605B2 (en) Method, device, and computer program for improving synchronization of clocks in devices linked according to a daisy-chain topology
JP5515735B2 (en) Time synchronization system, master node, slave node, relay device, time synchronization method, and time synchronization program
JP6192995B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMPUTER PROGRAM
US9641269B2 (en) Apparatus and method for synchronizing clocks among communication devices
JPWO2012118178A1 (en) Synchronization system, synchronization method, first synchronization device, second synchronization device, and computer program
JP2012222833A (en) System and method to overcome wander accumulation to achieve precision clock distribution over large networks
JP2013083451A (en) Time control device, time control method, and program
GB2595885A (en) Method and apparatus for synchronizing different communication ports
JP5650072B2 (en) Frequency / time synchronization method and frequency / time synchronization apparatus
JP6684409B1 (en) Time synchronization system
Meier et al. IEEE 1588 syntonization and synchronization functions completely realized in hardware
JP6254028B2 (en) Slave node and time synchronization method
JP6010802B2 (en) Time synchronization system, time synchronization method, slave node, and computer program
CN113424466A (en) Method and device for clock synchronization
Moreira et al. IEEE 1588 Transparent Clock architecture for FPGA-based network devices
US20170117980A1 (en) Time synchronization for network device
JP2015188152A (en) Slave node, control server, time synchronization destination determination method, and computer program
Pandey et al. Analysis and Design of Precision Time Protocol System Based on IEEE1588 Standards
KR20100048124A (en) Time synchronization method in bridged local area network

Legal Events

Date Code Title Description
A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20191016

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20191030

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191112

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191211

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200129

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200220

R150 Certificate of patent or registration of utility model

Ref document number: 6684409

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250