JP2013175852A - Time synchronization system, master unit, slave unit, time synchronization method and time synchronization program - Google Patents
Time synchronization system, master unit, slave unit, time synchronization method and time synchronization program Download PDFInfo
- Publication number
- JP2013175852A JP2013175852A JP2012038182A JP2012038182A JP2013175852A JP 2013175852 A JP2013175852 A JP 2013175852A JP 2012038182 A JP2012038182 A JP 2012038182A JP 2012038182 A JP2012038182 A JP 2012038182A JP 2013175852 A JP2013175852 A JP 2013175852A
- Authority
- JP
- Japan
- Prior art keywords
- time
- slave device
- master device
- time synchronization
- message
- 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.)
- Abandoned
Links
Images
Landscapes
- Electric Clocks (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
本発明は、時刻同期システム、マスタ装置、スレーブ装置、時刻同期方法及び時刻同期プログラムに関し、特に、スレーブ装置の時刻をマスタ装置の時刻に同期させる時刻同期システム、マスタ装置、スレーブ装置、時刻同期方法及び時刻同期プログラムに関する。 The present invention relates to a time synchronization system, a master device, a slave device, a time synchronization method, and a time synchronization program, and in particular, a time synchronization system, a master device, a slave device, and a time synchronization method for synchronizing the time of a slave device with the time of a master device. And a time synchronization program.
Ethernet(登録商標)等のネットワークを用いたシステムの時刻同期方法として、IEEE1588規格による方法が知られている。例えば、特許文献1に、IEEE1588規格を用いた関連する時刻同期方法が記載されている。IEEE1588規格は、PTP(Precision Time Protocol)の規格であり、マスタ装置からスレーブ装置への時刻パケット(IEEE1588規格に規定された時刻同期を行うためのパケット)の通信によって、スレーブ装置の時刻をマスタ装置の時刻に同期させる方式である。
As a time synchronization method for a system using a network such as Ethernet (registered trademark), a method based on the IEEE 1588 standard is known. For example,
図6は、PTPによりマスタ装置とスレーブ装置の時刻同期を行うための関連する時刻同期方法を示している。 FIG. 6 shows a related time synchronization method for performing time synchronization between the master device and the slave device by PTP.
まず、マスタ装置は、マスタ時刻「00:00」にSyncメッセージをスレーブ装置へ送出する(S101)。スレーブ装置は、スレーブ時刻「00:06」にSyncメッセージを受信し、この受信時刻を記憶しておく。なお、Syncメッセージは、マスタ装置から複数のスレーブ装置へ同報送信される。 First, the master device sends a Sync message to the slave device at the master time “00:00” (S101). The slave device receives the Sync message at the slave time “00:06” and stores this reception time. The Sync message is broadcast from the master device to a plurality of slave devices.
次に、マスタ装置は、マスタ時刻「00:00」にSyncメッセージを送出したことを伝えるためのFollow_upメッセージをスレーブ装置へ送出する(S102)。スレーブ装置は、マスタ装置からFollow_upメッセージを受信することにより、Syncメッセージが送信されたマスタ時刻「00:00」を取得する。 Next, the master device sends a Follow_up message to the slave device to notify that the Sync message has been sent at the master time “00:00” (S102). By receiving the Follow_up message from the master device, the slave device acquires the master time “00:00” at which the Sync message was transmitted.
マスタ装置がSyncメッセージをマスタ時刻「00:00」に送信し、スレーブ装置がSyncメッセージをスレーブ時刻「00:06」に受信したため、「00:06」から「00:00」を差し引くことにより、マスタ時刻とスレーブ時刻とのオフセット時間差が「00:06」であると求まる。そして、現在のスレーブ時刻「00:08」からオフセット時間差「00:06」を差し引いて、オフセット後のスレーブ時刻を「00:02」として、スレーブ装置の時刻調整を行う(S103)。 Since the master device transmits the Sync message at the master time “00:00” and the slave device receives the Sync message at the slave time “00:06”, by subtracting “00:00” from “00:06”, It is determined that the offset time difference between the master time and the slave time is “00:06”. Then, the offset time difference “00:06” is subtracted from the current slave time “00:08”, and the slave time after the offset is set to “00:02” to adjust the time of the slave device (S103).
次に、マスタ装置とスレーブ装置間の伝搬遅延時間を求めるために、スレーブ装置は、スレーブ時刻「00:06」にDelay_requestメッセージをマスタ装置へ送出し、この送信時刻を記憶しておく(S104)。マスタ装置は、マスタ時刻「00:12」にスレーブ装置からDelay_requestメッセージを受信する。そして、マスタ装置は、マスタ時刻「00:12」にDelay_requestメッセージを受信したことを伝えるためのDelay_responseメッセージを、Delay_requestメッセージを送信したスレーブ装置へ送出する(S105)。スレーブ装置は、マスタ装置からDelay_responseメッセージを受信することにより、Delay_requestメッセージが受信されたマスタ時刻「00:12」を取得する。 Next, in order to obtain the propagation delay time between the master device and the slave device, the slave device sends a Delay_request message to the master device at the slave time “00:06”, and stores this transmission time (S104). . The master device receives the Delay_request message from the slave device at the master time “00:12”. Then, the master device sends a Delay_response message for notifying that the Delay_request message has been received at the master time “00:12” to the slave device that has transmitted the Delay_request message (S105). The slave device acquires the master time “00:12” at which the Delay_request message is received by receiving the Delay_response message from the master device.
スレーブ装置がDelay_requestメッセージをスレーブ時刻「00:06」に送信し、マスタ装置がDelay_requestメッセージをマスタ時刻「00:12」に受信したため、「00:12」から「00:06」を差し引いた値を1/2とすることにより、マスタ−スレーブ間の伝搬遅延時間が「00:03」であると求まる。そして、現在のスレーブ時刻「00:15」に伝搬遅延時間「00:03」を加えて、オフセット及び伝搬遅延時間補正後のスレーブ時刻を「00:18」として、スレーブ装置の時刻調整を行う(S106)。以上のようにして、マスタ装置とスレーブ装置の時刻同期が行われる。 Since the slave device transmits the Delay_request message at the slave time “00:06” and the master device receives the Delay_request message at the master time “00:12”, the value obtained by subtracting “00:06” from “00:12” By setting the value to 1/2, it is determined that the propagation delay time between the master and the slave is “00:03”. Then, the propagation delay time “00:03” is added to the current slave time “00:15”, and the slave time after the offset and propagation delay time correction is set to “00:18”. S106). As described above, time synchronization between the master device and the slave device is performed.
上記のように実施されるIEEE1588方式におけるマスタ装置と複数のスレーブ装置によるネットワーク構成をもったシステムの場合、スレーブ装置の時刻同期精度は、一般的にはマスタ装置との時刻パケットの通信回数が多いほど向上する。 In the case of a system having a network configuration of a master device and a plurality of slave devices in the IEEE 1588 system implemented as described above, the time synchronization accuracy of the slave device is generally large in the number of times of time packet communication with the master device. It improves.
そのため、ある程度のマスタ装置との時刻パケットの通信回数を超えれば、以降のマスタ装置とのパケット通信は、時刻補正の役割よりも時刻同期状態を維持するための役割として行われることになる。 Therefore, if the number of times of communication of the time packet with the master device exceeds a certain level, the subsequent packet communication with the master device is performed as a role for maintaining the time synchronization state rather than the role of time correction.
しかし、1つのマスタ装置に対し複数存在するスレーブ装置の中には、電源投入後、長期間電源を切断しないために時刻同期が長期安定しているものもあれば、頻繁に電源を切断/再投入するために初期起動時の時刻同期引き込みによる時刻補正動作が頻繁に行われるものもある。 However, some of the slave devices that exist for a single master device are stable for a long time because the power is not turned off for a long time after the power is turned on. In some cases, the time correction operation is frequently performed by pulling in the time synchronization at the time of initial startup.
このようなマスタ−スレーブ構成の場合、マスタ装置側が複数のスレーブ装置から受信されたDelay_requestメッセージに対して受信した順番にDelay_responseメッセージを送出してしまうと、複数存在するスレーブ装置の中で初期起動中のスレーブ装置に対しては時刻同期のための時刻補正の処理が遅くなり、結果的に初期起動後の同期引き込み時間が遅くなることになる。 In the case of such a master-slave configuration, if the master device sends out the Delay_response message in the order received in response to the Delay_request message received from a plurality of slave devices, it is in the initial startup among the plurality of slave devices. For this slave device, the time correction processing for time synchronization is delayed, and as a result, the synchronization pull-in time after the initial activation is delayed.
なお、同期引き込みとは、スレーブ装置とマスタ装置の時刻を同期させることであり、同期引き込み時間とは、スレーブ装置とマスタ装置の時刻が同期するまでの時間である。 The synchronization pull-in is to synchronize the time of the slave device and the master device, and the synchronization pull-in time is the time until the time of the slave device and the master device is synchronized.
このように関連する時刻同期方法では、スレーブ装置における初期起動時の同期引き込み時間が遅くなる場合があるという問題があった。本発明の目的は、このような課題を解決する時刻同期システム、マスタ装置、スレーブ装置、時刻同期方法及び時刻同期プログラムを提供することにある。 As described above, the related time synchronization method has a problem that the synchronization pull-in time at the initial startup in the slave device may be delayed. An object of the present invention is to provide a time synchronization system, a master device, a slave device, a time synchronization method, and a time synchronization program that solve such problems.
本発明に係る時刻同期システムは、マスタ装置からネットワークを介して送信される時刻補正メッセージにより、スレーブ装置の時刻を前記マスタ装置の時刻に同期させる時刻同期システムであって、前記スレーブ装置は、当該スレーブ装置の時刻同期状態が安定状態か否か判定する同期状態判定部と、前記同期状態判定部により前記時刻同期状態が前記安定状態であると判定された場合、安定状態通知メッセージを前記ネットワークを介して前記マスタ装置へ送信する送信部と、を有し、前記マスタ装置は、前記スレーブ装置から前記安定状態通知メッセージを受信する受信部と、前記受信部により前記安定状態通知メッセージを受信した場合、前記スレーブ装置に対する前記時刻補正メッセージの送信優先度を低下させる優先度変更部と、を有するものである。 The time synchronization system according to the present invention is a time synchronization system that synchronizes the time of a slave device with the time of the master device by a time correction message transmitted from the master device via a network, and the slave device A synchronization state determination unit that determines whether or not the time synchronization state of the slave device is a stable state, and when the synchronization state determination unit determines that the time synchronization state is the stable state, a stable state notification message is sent to the network. A transmission unit that transmits to the master device via the master device, the master device receiving the stable state notification message from the slave device, and the reception unit receives the stable state notification message A priority changing unit that lowers the transmission priority of the time correction message to the slave device; And it has a.
本発明に係るマスタ装置は、マスタ装置からネットワークを介して送信される時刻補正メッセージにより、スレーブ装置の時刻を前記マスタ装置の時刻に同期させる時刻同期システムに備えられるマスタ装置であって、前記スレーブ装置の同期状態が安定状態であることを示す安定状態通知メッセージを前記スレーブ装置から受信する受信部と、前記受信部により前記安定状態通知メッセージを受信した場合、前記スレーブ装置に対する前記時刻補正メッセージの送信優先度を低下させる優先度変更部と、を有するものである。 A master device according to the present invention is a master device provided in a time synchronization system that synchronizes the time of a slave device with the time of the master device by a time correction message transmitted from the master device via a network, and the slave device A receiving unit that receives a stable state notification message indicating that the synchronization state of the device is a stable state from the slave device, and when the receiving unit receives the stable state notification message, the time correction message for the slave device A priority changing unit that lowers the transmission priority.
本発明に係るスレーブ装置は、マスタ装置からネットワークを介して送信される時刻補正メッセージにより、スレーブ装置の時刻を前記マスタ装置の時刻に同期させる時刻同期システムに備えられるスレーブ装置であって、当該スレーブ装置の時刻同期状態が安定状態か否か判定する同期状態判定部と、前記同期状態判定部により前記時刻同期状態が前記安定状態であると判定された場合、安定状態通知メッセージを前記ネットワークを介して前記マスタ装置へ送信する送信部と、を有するものである。 The slave device according to the present invention is a slave device provided in a time synchronization system that synchronizes the time of the slave device with the time of the master device by a time correction message transmitted from the master device via the network, A synchronization state determination unit that determines whether or not the time synchronization state of the device is a stable state, and when the synchronization state determination unit determines that the time synchronization state is the stable state, a stable state notification message is transmitted via the network. And a transmission unit for transmitting to the master device.
本発明に係る時刻同期方法は、マスタ装置からネットワークを介して送信される時刻補正メッセージにより、スレーブ装置の時刻を前記マスタ装置の時刻に同期させる時刻同期方法であって、前記スレーブ装置が、当該スレーブ装置の時刻同期状態が安定状態か否か判定し、前記スレーブ装置が、前記時刻同期状態が前記安定状態であると判定された場合、安定状態通知メッセージを前記ネットワークを介して前記マスタ装置へ送信し、前記マスタ装置が、前記スレーブ装置から前記安定状態通知メッセージを受信し、前記マスタ装置が、前記安定状態通知メッセージを受信した場合、前記スレーブ装置に対する前記時刻補正メッセージの送信優先度を低下させるものである。 The time synchronization method according to the present invention is a time synchronization method for synchronizing the time of a slave device with the time of the master device by a time correction message transmitted from the master device via a network, wherein the slave device It is determined whether or not the time synchronization state of the slave device is a stable state, and if the slave device determines that the time synchronization state is the stable state, a stable state notification message is sent to the master device via the network. And when the master device receives the stable state notification message from the slave device and the master device receives the stable state notification message, the transmission priority of the time correction message to the slave device is lowered. It is something to be made.
本発明に係る時刻同期プログラムは、マスタ装置からネットワークを介して送信される時刻補正メッセージにより、スレーブ装置の時刻を前記マスタ装置の時刻に同期させる時刻同期処理を時刻同期システムに実行させる時刻同期プログラムであって、前記時刻同期処理は、前記スレーブ装置が、当該スレーブ装置の時刻同期状態が安定状態か否か判定し、前記スレーブ装置が、前記時刻同期状態が前記安定状態であると判定された場合、安定状態通知メッセージを前記ネットワークを介して前記マスタ装置へ送信し、前記マスタ装置が、前記スレーブ装置から前記安定状態通知メッセージを受信し、前記マスタ装置が、前記安定状態通知メッセージを受信した場合、前記スレーブ装置に対する前記時刻補正メッセージの送信優先度を低下させるものである。 The time synchronization program according to the present invention causes a time synchronization system to execute time synchronization processing for synchronizing the time of a slave device with the time of the master device by a time correction message transmitted from the master device via a network. In the time synchronization process, the slave device determines whether or not the time synchronization state of the slave device is a stable state, and the slave device determines that the time synchronization state is the stable state. A stable state notification message is transmitted to the master device via the network, the master device receives the stable state notification message from the slave device, and the master device receives the stable state notification message. The transmission priority of the time correction message to the slave device is reduced. Is shall.
本発明によれば、スレーブ装置における初期起動時の同期引き込み時間を短縮することが可能な時刻同期システム、マスタ装置、スレーブ装置、時刻同期方法及び時刻同期プログラムを提供することができる。 According to the present invention, it is possible to provide a time synchronization system, a master device, a slave device, a time synchronization method, and a time synchronization program that can shorten the synchronization pull-in time at the time of initial startup in the slave device.
(本発明の特徴)
本発明の実施の形態の説明に先立って、図1を用いて、本発明の特徴についてその概要を説明する。
(Features of the present invention)
Prior to the description of the embodiment of the present invention, the outline of the features of the present invention will be described with reference to FIG.
図1に示すように、本発明に係る時刻同期システム1は、ネットワーク3を介して接続されるマスタ装置(マスタノード)10とスレーブ装置(スレーブノード)20とを有している。時刻同期システム1は、マスタ装置10からネットワーク3を介して送信される時刻補正メッセージ(Delay_responseメッセージ等)により、スレーブ装置20のスレーブ時刻をマスタ装置10のマスタ時刻に同期させるシステムである。
As shown in FIG. 1, the
そして、スレーブ装置20は、時刻同期状態が安定状態か否か判定する同期状態判定部21と、同期状態判定部21により時刻同期状態が安定状態であると判定された場合、安定状態通知メッセージ(Announceメッセージ等)をネットワーク3を介してマスタ装置10へ送信する送信部22と、を有していることを主要な特徴としている。また、マスタ装置10は、スレーブ装置20から安定状態通知メッセージを受信する受信部12と、受信部12により安定状態通知メッセージを受信した場合、安定状態通知メッセージを送信したスレーブ装置20に対する時刻補正メッセージの送信優先度を低下させる優先度変更部11と、を有することを主要な特徴としている。
When the
本発明によれば、スレーブ装置が時刻同期安定状態の場合に安定状態通知メッセージを送信し、マスタ装置がこの安定状態通知メッセージに応じて時刻補正メッセージの送信優先度を低下させるため、他のスレーブ装置の通信処理が優先的に実行されることになる。これにより、初期起動中のスレーブ装置に対する通信処理を優先させることができ、初期起動時の同期引き込み時間を短縮することができる。 According to the present invention, when the slave device is in the time synchronization stable state, the slave device transmits a stable state notification message, and the master device reduces the transmission priority of the time correction message in accordance with the stable state notification message. The communication process of the device is preferentially executed. Thereby, priority can be given to the communication processing with respect to the slave apparatus in the initial activation, and the synchronization pull-in time at the initial activation can be shortened.
(本発明の実施の形態1)
以下、図面を参照して本発明の実施の形態1について説明する。まず、図2及び図3を用いて本発明の実施の形態1に係る時刻同期システム1の構成について説明する。図2は、この時刻同期システム1の概略構成を示している。図2の例は、マスタ装置10がx個のスレーブ装置20(20_1〜20_x)と接続される構成例である。
(
マスタ装置10とスレーブ装置20とはパス30により接続され、マスタ装置10は、スレーブ装置20_1〜20_xに対して、それぞれパス30_1〜30_xを用いてPTPにより時刻同期を行なう。すなわち、マスタ装置10とスレーブ装置20とを接続するネットワークの構成は限定されず、マスタ装置10とスレーブ装置20とがパス30を介して通信可能であればよい。
The
本実施形態では、マスタ装置10がスレーブ装置20へ送信するDelay_responseメッセージの送信モードとして、通常モードと同期安定モードの2種類を有している。通常モードとは、スレーブ装置20から受信するDelay_requestメッセージに対して即時対応するモードであり、同期安定モードとは、時刻同期状態が長期安定しているスレーブ装置20から受信するDelay_requestメッセージに対して低い優先度により対応するモードである。スレーブ装置20ごとに通常モードか同期安定モードが設定される。
In the present embodiment, there are two types of transmission modes for the Delay_response message transmitted from the
図3は、本発明の実施の形態1に係る時刻同期システム1の機能ブロックの構成を示している。マスタ装置10と複数のスレーブ装置20とはネットワーク3を介して接続されている。複数のスレーブ装置20は、全て同じ構成である。なお、マスタ装置10及びスレーブ装置20は、CPU(Central Processing Unit)、記憶装置、通信インタフェース等を備え、CPUが時刻同期プログラムを実行することで各機能構成が実現されていてもよい。
FIG. 3 shows a functional block configuration of the
マスタ装置10は、クロック発生部101、マスタクロック部102、メッセージ処理部103、メッセージ送受信部104を備えている。
The
クロック発生部101は、マスタ装置10の基準クロックを生成する。マスタクロック部102は、クロック発生部101で生成された基準クロックに基づいて、マスタ装置10の時刻であるマスタ時刻を生成する。例えば、マスタクロック部102は基準クロックにしたがってカウントするタイムスタンプカウンタである。
The
メッセージ処理部103は、IEEE1588(PTP)規格にしたがってスレーブ装置と時刻同期を行うためのメッセージ処理を行う。例えば、メッセージ処理部103は、起動時及び定期的にスレーブ装置20へ送信するためにSyncメッセージ、Follow_upメッセージを生成する。また、メッセージ処理部103は、スレーブ装置20からDelay_requestメッセージを受信した場合に、Delay_responseメッセージを生成する。
The
本実施形態のメッセージ処理部103は、図1の優先度変更部11に相当し、スレーブ装置20から長期安定状態を示すAnnounceメッセージを受信した場合に、当該スレーブ装置20のメッセージ処理の優先度を低下させ、他のスレーブ装置20のメッセージ処理を優先的に実行する。特に、後述のようにDelay_requestメッセージの受信に対する、Delay_responseメッセージの送信処理の優先度を変更する。
The
メッセージ送受信部104は、メッセージ処理部103が生成したメッセージをネットワーク3を介してスレーブ装置20へ送信し、また、ネットワーク3を介してスレーブ装置20から受信したメッセージをメッセージ処理部103へ通知する。
The message transmission /
スレーブ装置20は、クロック発生部201、スレーブクロック部202、メッセージ処理部203、クロック補正部205、メッセージ送受信部204を備えている。
The
クロック発生部201は、スレーブ装置20の基準クロックを生成する。スレーブクロック部202は、クロック発生部201で生成された基準クロックに基づいて、スレーブ装置20の時刻であるスレーブ時刻を生成する。例えば、スレーブクロック部202は基準クロックにしたがってカウントするタイムスタンプカウンタである。
The
メッセージ処理部203は、IEEE1588(PTP)規格にしたがってマスタ装置と時刻同期を行うためのメッセージ処理を行う。例えば、メッセージ処理部203は、マスタ装置10からSyncメッセージ、Follow_upメッセージを受信した場合にオフセットを計算しクロック補正部205に通知する。また、メッセージ処理部203は、Delay_requestメッセージを生成し、マスタ装置10からDelay_responseメッセージを受信した場合に、遅延時間を計算しクロック補正部205へ通知する。
The
本実施形態のメッセージ処理部203は、図1の同期状態判定部21に相当し、スレーブ装置20の同期状態が長期安定状態か否か判定し、長期安定状態と判定された場合にAnnounceメッセージを生成する。
The
クロック補正部205は、メッセージ処理部203が計算したオフセット及び遅延時間により、スレーブクロック部202のスレーブ時刻を補正する。これにより、クロック補正部205は、スレーブ時刻をマスタ時刻に同期させる。
The
メッセージ送受信部204は、メッセージ処理部203が生成したメッセージをネットワーク3を介してマスタ装置10へ送信し、また、ネットワーク3を介してマスタ装置10から受信したメッセージをメッセージ処理部203へ通知する。
The message transmission /
次に、図4及び図5を用いて本発明の実施の形態1に係る時刻同期システム1の動作について説明する。図4は、時刻同期システム1のマスタ装置10及びスレーブ装置20で実行される時刻同期方法の例を示している。
Next, the operation of the
まず、スレーブ装置20は、起動されるとマスタ装置10とPTPにより時刻同期を行い時刻同期中の状態となる(S201)。ここでは、スレーブ装置20_1が電源起動後長期間経過し、時刻同期が長期安定化する直前の状態であり、スレーブ装置20_xは初期起動中で時刻同期のための時刻補正動作を行っている状態であり、また、その他のスレーブ装置20は時刻同期がされて長期安定していてマスタ装置10との時刻パケット通信は時刻同期状態の確認のために行っている状態であるとする。
First, when the
次に、スレーブ装置20は、マスタ装置10との時刻同期が長期安定状態か否か判定する(S202)。例えば、スレーブ装置20は、1週間や1月等の所定期間、同期状態が続いている場合に長期安定状態と判定する。そして、安定状態かどうかは、スレーブ装置20が受信するSyncメッセージ(同期メッセージ)の受信間隔や受信回数によって判定できる。例えば、スレーブ装置20が同期状態の長期安定状態となる判定基準として、マスタ装置10から定期的に送信されるSyncメッセージを受信する時間間隔が長期間連続して任意の時間範囲内となっている場合としても良く、また、マスタ装置10から定期的に送信されるSyncメッセージを受信する時間間隔が所定の時間範囲内となる場合が任意の回数を超えた場合としても良い。Syncメッセージの受信により同期状態が維持されるため、Syncメッセージが所定範囲で受信できていれば、同期状態は安定していると判断できるからである。
Next, the
S202において、スレーブ装置20は時刻同期状態が長期間安定状態ではないと判定した場合には、スレーブ装置20からマスタ装置10へは何も通知されないため、マスタ装置10は通常モードによりDelay_responseメッセージの処理を行う(S203)。すなわち、通常モードでは、マスタ装置10は、スレーブ装置20からDelay_requestメッセージを受信すると、すぐにスレーブ装置20へDelay_responseメッセージを送信する。
In S202, when the
S202において、スレーブ装置20_1は、時刻同期状態が継続し長期安定状態になったと判定した場合には、スレーブ装置20_1は、マスタ装置10に対して長期安定状態となったことを伝えるAnnounceメッセージを送信する(S204)。
In S202, when the slave device 20_1 determines that the time synchronization state has continued and has become a long-term stable state, the slave device 20_1 transmits an Announce message that notifies the
そして、マスタ装置10は、スレーブ装置20_1からAnnounceメッセージを受信すると、スレーブ装置20_1に対するDelay_responseメッセージの送信モードを通常モードから同期安定モードに切り替える(S205)。すなわち、同期安定モードでは、マスタ装置10は、スレーブ装置20_1からDelay_requestメッセージを受信した後、他のスレーブ装置20の処理を優先的に実行し、通常モードよりも遅れた時間でスレーブ装置20_1へDelay_responseメッセージを送信する。
When the
これにより、時刻同期が長期安定状態となったスレーブ装置20_1に対しては、マスタ装置10との時刻パケット通信を通常動作よりも遅らせるようにすることが可能となるので、初期起動中で時刻同期のための時刻補正を行っているスレーブ装置20_xに対して、優先してマスタ装置10と時刻パケット通信を行うことが可能となる。
This makes it possible to delay the time packet communication with the
図5は、本発明の実施の形態1に係る時刻同期システム1における時刻同期方法の具体的な動作例を示している。
FIG. 5 shows a specific operation example of the time synchronization method in the
まず、スレーブ装置20とマスタ装置10は、IEEE1588規格にしたがって時刻同期を行う。具体的には、図6と同様に、マスタ装置10とスレーブ装置20の間で、Syncメッセージ(S301)、Follow_upメッセージ(S302)、Delay_requestメッセージ(S303)、Delay_responseメッセージ(S304)が定期的に繰り返し送受信されて、スレーブ時刻が補正され、マスタ時刻とスレーブ時刻が同期した状態となる。
First, the
そして、マスタ装置10からSyncメッセージ(S305)、Follow_upメッセージ(S306)が送信されると、スレーブ装置20は、時刻同期状態を判定する(S307、図4のS202に相当)。Syncメッセージの受信間隔等により、長期安定状態であると判定した場合、スレーブ装置20は、長期安定状態を示すAnnounceメッセージをマスタ装置10へ送信する(S308、図4のS204に相当)。マスタ装置10は、Announceメッセージを受信すると、Announceメッセージを送信したスレーブ装置20におけるDelay_responseメッセージの送信モードを同期安定モードに切り替える(S309、図4のS205に相当)。
Then, when the Sync message (S305) and the Follow_up message (S306) are transmitted from the
次に、スレーブ装置20は、マスタ装置10へDelay_requestメッセージを送信する(S310)。マスタ装置10は、Delay_requestメッセージを送信したスレーブ装置が同期安定モードであるため、Delay_responseメッセージを遅延させる(S311)。マスタ装置10は、他のスレーブ装置20のメッセージ処理を優先的に実行し、その後、長期安定状態のスレーブ装置20へDelay_responseメッセージを送信する(S312)。
Next, the
以上のように、本実施形態では、スレーブ装置が長期安定状態となった場合、同期安定状態を示すメッセージをマスタ装置に対して送信し、マスタ装置がスレーブ装置へのDelay_responseメッセージの送出順序を遅らせるようにした。これにより、以下に記載するような効果を奏する。 As described above, in the present embodiment, when the slave device is in a long-term stable state, a message indicating the synchronization stable state is transmitted to the master device, and the master device delays the order of sending the Delay_response message to the slave device. I did it. Thereby, there exists an effect as described below.
第1の効果は、スレーブ装置からはDelay_requestメッセージに合わせて同期安定状態を示すメッセージをマスタ装置に対して送信することにより、マスタ装置側がスレーブ装置へのDelay_responseメッセージの送出順序を決定するようにしたことにより、初期起動中のスレーブ装置に対してマスタ装置との時刻パケット通信を優先でき、初期起動時の同期引き込み時間を早くすることができる。 The first effect is that the master device side determines the sending order of the Delay_response message to the slave device by transmitting a message indicating the synchronization stable state to the master device in accordance with the Delay_request message from the slave device. Thus, the time packet communication with the master device can be prioritized over the slave device that is initially activated, and the synchronization pull-in time at the initial activation can be shortened.
第2の効果は、任意の時間内では、時刻同期が長期安定化しているスレーブ装置とマスタ装置のパケット通信回数が減ることにより、ネットワークへの負荷を軽減することができる。 The second effect is that the load on the network can be reduced by reducing the number of packet communications between the slave device and the master device whose time synchronization has been stabilized for a long time within an arbitrary time.
(本発明の他の実施の形態)
実施の形態1では、マスタ装置10におけるDelay_responseメッセージの送信タイミングを調整したが、実施の形態1に加えて、さらにスレーブ装置20におけるDelay_requestメッセージの送信タイミングを調整してもよい。
(Another embodiment of the present invention)
In the first embodiment, the transmission timing of the Delay_response message in the
例えば、スレーブ装置が時刻同期の長期安定状態を検出した場合、Delay_requestメッセージの送信間隔を長くしてもよい。また、マスタ装置がスレーブ装置の長期安定状態を検出し、スレーブ装置に対しDelay_requestメッセージの送信間隔を長くするように指定してもよい。 For example, when the slave device detects a long-term stable state of time synchronization, the transmission interval of the Delay_request message may be increased. In addition, the master device may detect the long-term stable state of the slave device and specify that the transmission interval of the Delay_request message is increased for the slave device.
スレーブ装置からのDelay_requestメッセージの送出間隔を長くすることにより、マスタ装置と複数あるスレーブ装置の時刻パケット通信処理数が少なくなるため、結果的に初期起動中のスレーブ装置への時刻パケット通信処理を優先して行うことが可能となる。したがって、さらに、同期引き込み時間を短縮できるとともに、ネットワークの負荷を軽減することができる。 By increasing the sending interval of the Delay_request message from the slave device, the number of time packet communication processes between the master device and a plurality of slave devices is reduced. As a result, priority is given to the time packet communication processing to the slave device that is initially activated. Can be performed. Therefore, the synchronization pull-in time can be further shortened and the network load can be reduced.
なお、本発明は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。例えば、上記の例では、Syncメッセージに続いてFollow_upメッセージを送信したが、Follow_upメッセージを送信せずにSyncメッセージのみで同期してもよい。 Note that the present invention is not limited to the above-described embodiment, and can be changed as appropriate without departing from the spirit of the present invention. For example, in the above example, the Follow_up message is transmitted following the Sync message. However, the Sync_message may be synchronized only without transmitting the Follow_up message.
1 時刻同期システム
3 ネットワーク
10 マスタ装置
11 優先度変更部
12 受信部
20(20_1〜20_x) スレーブ装置
21 同期状態判定部
22 送信部
30(30_1〜30_x) パス
101 クロック発生部
102 マスタクロック部
103 メッセージ処理部
104 メッセージ送受信部
201 クロック発生部
202 スレーブクロック部
203 メッセージ処理部
204 メッセージ送受信部
205 クロック補正部
DESCRIPTION OF
Claims (10)
前記スレーブ装置は、
当該スレーブ装置の時刻同期状態が安定状態か否か判定する同期状態判定部と、
前記同期状態判定部により前記時刻同期状態が前記安定状態であると判定された場合、安定状態通知メッセージを前記ネットワークを介して前記マスタ装置へ送信する送信部と、を有し、
前記マスタ装置は、
前記スレーブ装置から前記安定状態通知メッセージを受信する受信部と、
前記受信部により前記安定状態通知メッセージを受信した場合、前記スレーブ装置に対する前記時刻補正メッセージの送信優先度を低下させる優先度変更部と、を有する、
時刻同期システム。 A time synchronization system that synchronizes the time of the slave device with the time of the master device by a time correction message transmitted from the master device via the network,
The slave device is
A synchronization state determination unit that determines whether or not the time synchronization state of the slave device is a stable state;
A transmission unit that transmits a stable state notification message to the master device via the network when the synchronization state determination unit determines that the time synchronization state is the stable state;
The master device is
A receiver that receives the stable state notification message from the slave device;
A priority changing unit that lowers the transmission priority of the time correction message to the slave device when the receiving unit receives the stable state notification message,
Time synchronization system.
請求項1に記載の時刻同期システム。 The synchronization state determination unit determines that the slave device is in the stable state when the time synchronization state of the slave device is stable for a predetermined period;
The time synchronization system according to claim 1.
請求項2に記載の時刻同期システム。 The synchronization state determination unit determines that the synchronization state is the stable state when a reception interval of synchronization messages received from the master device is continuously within a predetermined range.
The time synchronization system according to claim 2.
請求項2に記載の時刻同期システム。 The synchronization state determination unit determines that the synchronization state is the stable state when the number of times the reception interval of the synchronization message received from the master device is within a predetermined range is a predetermined number of times.
The time synchronization system according to claim 2.
請求項1乃至4のいずれか一項に記載の時刻同期システム。 When the time synchronization state is the stable state, the transmission unit increases the transmission interval of the time request message for requesting the time correction message.
The time synchronization system according to any one of claims 1 to 4.
請求項1乃至5のいずれか一項に記載の時刻同期システム。 The time correction message is a Delay_response message of the IEEE 1588 standard.
The time synchronization system according to any one of claims 1 to 5.
前記スレーブ装置の同期状態が安定状態であることを示す安定状態通知メッセージを前記スレーブ装置から受信する受信部と、
前記受信部により前記安定状態通知メッセージを受信した場合、前記スレーブ装置に対する前記時刻補正メッセージの送信優先度を低下させる優先度変更部と、を有する、
マスタ装置。 A master device provided in a time synchronization system that synchronizes the time of a slave device with the time of the master device by a time correction message transmitted from the master device via a network,
A receiving unit that receives a stable state notification message from the slave device indicating that the synchronization state of the slave device is a stable state;
A priority changing unit that lowers the transmission priority of the time correction message to the slave device when the receiving unit receives the stable state notification message,
Master device.
当該スレーブ装置の時刻同期状態が安定状態か否か判定する同期状態判定部と、
前記同期状態判定部により前記時刻同期状態が前記安定状態であると判定された場合、安定状態通知メッセージを前記ネットワークを介して前記マスタ装置へ送信する送信部と、を有する、
スレーブ装置。 A slave device provided in a time synchronization system that synchronizes the time of the slave device with the time of the master device by a time correction message transmitted from the master device via the network,
A synchronization state determination unit that determines whether or not the time synchronization state of the slave device is a stable state;
A transmission unit that transmits a stable state notification message to the master device via the network when the synchronization state determination unit determines that the time synchronization state is the stable state;
Slave device.
前記スレーブ装置が、当該スレーブ装置の時刻同期状態が安定状態か否か判定し、
前記スレーブ装置が、前記時刻同期状態が前記安定状態であると判定された場合、安定状態通知メッセージを前記ネットワークを介して前記マスタ装置へ送信し、
前記マスタ装置が、前記スレーブ装置から前記安定状態通知メッセージを受信し、
前記マスタ装置が、前記安定状態通知メッセージを受信した場合、前記スレーブ装置に対する前記時刻補正メッセージの送信優先度を低下させる、
時刻同期方法。 A time synchronization method for synchronizing the time of the slave device with the time of the master device by a time correction message transmitted from the master device via the network,
The slave device determines whether the time synchronization state of the slave device is a stable state,
When it is determined that the time synchronization state is the stable state, the slave device transmits a stable state notification message to the master device via the network,
The master device receives the steady state notification message from the slave device;
When the master device receives the stable state notification message, the transmission priority of the time correction message to the slave device is reduced.
Time synchronization method.
前記スレーブ装置が、当該スレーブ装置の時刻同期状態が安定状態か否か判定し、
前記スレーブ装置が、前記時刻同期状態が前記安定状態であると判定された場合、安定状態通知メッセージを前記ネットワークを介して前記マスタ装置へ送信し、
前記マスタ装置が、前記スレーブ装置から前記安定状態通知メッセージを受信し、
前記マスタ装置が、前記安定状態通知メッセージを受信した場合、前記スレーブ装置に対する前記時刻補正メッセージの送信優先度を低下させる、
時刻同期プログラム。 A time synchronization program for causing a time synchronization system to execute time synchronization processing for synchronizing the time of a slave device with the time of the master device by a time correction message transmitted from the master device via a network, wherein the time synchronization processing is ,
The slave device determines whether the time synchronization state of the slave device is a stable state,
When it is determined that the time synchronization state is the stable state, the slave device transmits a stable state notification message to the master device via the network,
The master device receives the steady state notification message from the slave device;
When the master device receives the stable state notification message, the transmission priority of the time correction message to the slave device is reduced.
Time synchronization program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012038182A JP2013175852A (en) | 2012-02-24 | 2012-02-24 | Time synchronization system, master unit, slave unit, time synchronization method and time synchronization program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012038182A JP2013175852A (en) | 2012-02-24 | 2012-02-24 | Time synchronization system, master unit, slave unit, time synchronization method and time synchronization program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2013175852A true JP2013175852A (en) | 2013-09-05 |
Family
ID=49268411
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012038182A Abandoned JP2013175852A (en) | 2012-02-24 | 2012-02-24 | Time synchronization system, master unit, slave unit, time synchronization method and time synchronization program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013175852A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103532230A (en) * | 2013-09-30 | 2014-01-22 | 国家电网公司 | Intelligent power distribution network IEEE1588 timing synchronization system on basis of industrial Ethernet tangency access rings |
JP2016116143A (en) * | 2014-12-17 | 2016-06-23 | 三菱電機株式会社 | Time synchronization monitoring method, communication system and master device |
JP2017053817A (en) * | 2015-09-11 | 2017-03-16 | 株式会社日立製作所 | Time synchronization system |
CN109274763A (en) * | 2018-10-24 | 2019-01-25 | 厦门科华恒盛股份有限公司 | A kind of information synchronization method and two-node cluster hot backup equipment |
-
2012
- 2012-02-24 JP JP2012038182A patent/JP2013175852A/en not_active Abandoned
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103532230A (en) * | 2013-09-30 | 2014-01-22 | 国家电网公司 | Intelligent power distribution network IEEE1588 timing synchronization system on basis of industrial Ethernet tangency access rings |
JP2016116143A (en) * | 2014-12-17 | 2016-06-23 | 三菱電機株式会社 | Time synchronization monitoring method, communication system and master device |
JP2017053817A (en) * | 2015-09-11 | 2017-03-16 | 株式会社日立製作所 | Time synchronization system |
CN109274763A (en) * | 2018-10-24 | 2019-01-25 | 厦门科华恒盛股份有限公司 | A kind of information synchronization method and two-node cluster hot backup equipment |
CN109274763B (en) * | 2018-10-24 | 2022-06-07 | 科华恒盛股份有限公司 | Information synchronization method and dual-computer hot standby equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8081663B2 (en) | Time synchronization method and relay apparatus | |
EP2688240B1 (en) | Method, system and device for switching and selecting clock source device | |
EP3140933B1 (en) | System and method to dynamically redistribute timing and synchronization in a packet switched network | |
EP3352392B1 (en) | Time synchronization packet processing method and device | |
US20120224492A1 (en) | Communication system, communication apparatus and time synchronization method | |
JP6132734B2 (en) | Time synchronization system and apparatus | |
JP5656305B1 (en) | COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION METHOD | |
WO2015010250A1 (en) | Clock recovery in a packet based network | |
WO2015165192A1 (en) | Time synchronization method and device | |
US9730172B2 (en) | Base station device and method of updating counter of base station device | |
WO2011134371A1 (en) | Method for synchronizing clocks and clock synchronization device | |
JP2015099983A (en) | Time synchronization system, time synchronization method, and computer program | |
JP2013175852A (en) | Time synchronization system, master unit, slave unit, time synchronization method and time synchronization program | |
JP6170456B2 (en) | Slave node, control server, time synchronization destination determination method and computer program | |
CN103067111A (en) | Method and device of clock synchronization | |
JP2018082278A (en) | Network system | |
JP2013029319A (en) | Slave device, electronic apparatus system, master device, time synchronization method, and program | |
US10251141B2 (en) | Communication apparatus and communication system | |
JP2016036060A (en) | Time synchronization method and time synchronization system | |
JP5656306B1 (en) | Synchronization establishment method | |
JP2013074338A (en) | Time server, terminal, time synchronization system, time synchronization method, and program | |
JP5776009B1 (en) | Communication apparatus and communication method | |
JP6198583B2 (en) | Relay device and communication system | |
WO2014203449A1 (en) | Communication system, method for controlling communication system, transmission device, and reception device | |
KR20100036555A (en) | Network synchronization system and network synchronization method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150114 |
|
A762 | Written abandonment of application |
Free format text: JAPANESE INTERMEDIATE CODE: A762 Effective date: 20151016 |