JP6452427B2 - Time synchronization monitoring method, communication system, and master device - Google Patents

Time synchronization monitoring method, communication system, and master device Download PDF

Info

Publication number
JP6452427B2
JP6452427B2 JP2014254641A JP2014254641A JP6452427B2 JP 6452427 B2 JP6452427 B2 JP 6452427B2 JP 2014254641 A JP2014254641 A JP 2014254641A JP 2014254641 A JP2014254641 A JP 2014254641A JP 6452427 B2 JP6452427 B2 JP 6452427B2
Authority
JP
Japan
Prior art keywords
time
slave
message
clock
master
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
JP2014254641A
Other languages
Japanese (ja)
Other versions
JP2016116143A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2014254641A priority Critical patent/JP6452427B2/en
Publication of JP2016116143A publication Critical patent/JP2016116143A/en
Application granted granted Critical
Publication of JP6452427B2 publication Critical patent/JP6452427B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/14Monitoring arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays

Description

本発明は、マスタ装置とスレーブ装置との間で時刻同期用パケットを交換することによって、マスタ装置とスレーブ装置との間の時刻同期を監視する時刻同期監視方法、通信システム、及びマスタ装置に関するものである。   The present invention relates to a time synchronization monitoring method, a communication system, and a master device that monitor time synchronization between a master device and a slave device by exchanging time synchronization packets between the master device and the slave device. It is.

近年、ネットワーク通信におけるデータのパケット化に伴い、パケットベースで時刻同期を行う方法が提案されている。例えば、IEEE(The Institute of Electrical and Electronics Engineers)1588には、PTP(Precision Time Protocol)が規定されている(非特許文献1参照)。PTPの時刻同期精度は、マイクロ秒単位又はナノ秒単位であり、ミリ秒単位の時刻同期精度を持つ時刻同期プロトコルであるNTP(Network Time Protocol)に比べて、高精度である。   In recent years, with packetization of data in network communication, a method of performing time synchronization on a packet basis has been proposed. For example, IEEE (The Institute of Electrical and Electronics Engineers) 1588 defines PTP (Precision Time Protocol) (see Non-Patent Document 1). The time synchronization accuracy of PTP is in units of microseconds or nanoseconds, and is higher than that of NTP (Network Time Protocol), which is a time synchronization protocol having time synchronization accuracy in milliseconds.

PTPは、基準時刻(マスタクロック)を持つマスタ装置(主装置)と、基準時刻(スレーブクロック)を持つスレーブ装置(従装置)とを含む通信システムに適用される。PTPでは、マスタ装置とスレーブ装置との間で定期的に時刻同期用パケットを交換し、その過程で得られた情報に基づいて、スレーブ装置の基準時刻を補正する。   PTP is applied to a communication system including a master device (master device) having a reference time (master clock) and a slave device (slave device) having a reference time (slave clock). In PTP, time synchronization packets are periodically exchanged between a master device and a slave device, and the reference time of the slave device is corrected based on information obtained in the process.

PTPの時刻同期処理は、以下の処理工程を有している。
第一に、マスタ装置がスレーブ装置に、時刻同期用パケットであるSyncメッセージ(Clock Sync message)を送信する。
第二に、マスタ装置がスレーブ装置に、時刻同期用パケットであるFollowupメッセージ(Clock Sync Followup message)を送信する。Followupメッセージは、マスタ装置からSyncメッセージを送信した際の時刻T1(マスタクロックに基づく時刻)を示す情報を含んでいる。スレーブ装置は、時刻T1(マスタクロックに基づく時刻)と、Syncメッセージを受信した際の時刻T2(スレーブクロックに基づく時刻)とを記録する。
第三に、スレーブ装置がマスタ装置に、時刻同期用パケットであるDelay_Reqメッセージ(Clock Delay Request message)を送信する。マスタ装置は、Delay_Reqメッセージを受信した際の時刻である時刻T4(マスタクロックに基づく時刻)を記録する。
第四に、マスタ装置がスレーブ装置に、時刻同期用パケットであるDelay_Respメッセージ(Clock Delay Response message)を送信する。Delay_Respメッセージは、時刻T4(マスタクロックに基づく時刻)を示す情報を含んでいる。スレーブ装置は、Delay_Respメッセージを受信したことで、マスタ装置がDelay_Reqメッセージを受信したことを確認できるため、Delay_Reqメッセージを送信した際の時刻T3(スレーブクロックに基づく時刻)を記録する。
The PTP time synchronization process has the following processing steps.
First, the master device transmits a Sync message (Clock Sync message), which is a time synchronization packet, to the slave device.
Second, the master device transmits a Followup message (Clock Sync Followup message) that is a time synchronization packet to the slave device. The Followup message includes information indicating the time T1 (time based on the master clock) when the Sync message is transmitted from the master device. The slave device records time T1 (time based on the master clock) and time T2 (time based on the slave clock) when the Sync message is received.
Thirdly, the slave device transmits a Delay_Req message (Clock Delay Request message), which is a time synchronization packet, to the master device. The master device records time T4 (time based on the master clock) which is the time when the Delay_Req message is received.
Fourth, the master device transmits a Delay_Resp message (Clock Delay Response message), which is a time synchronization packet, to the slave device. The Delay_Resp message includes information indicating time T4 (time based on the master clock). Since the slave device can confirm that the master device has received the Delay_Req message by receiving the Delay_Resp message, the slave device records time T3 (time based on the slave clock) when the Delay_Req message is transmitted.

スレーブ装置は、時刻T1、T2、T3、及びT4(すなわち、4つのタイムスタンプ)を記録しているため、マスタ装置からスレーブ装置への方向の伝搬時間(Propagation Time)である時刻差分(T2−T1)と、スレーブ装置からマスタ装置への方向の伝搬時間である時刻差分(T4−T3)とを算出可能である。スレーブ装置は、これらの2つの時刻差分から、伝送路における伝搬時間(遅延時間)を示す値として、上述の2つの時刻差分の平均値((T2−T1)+(T4−T3))/2を算出する。   Since the slave device records times T1, T2, T3, and T4 (that is, four time stamps), a time difference (T2−) that is a propagation time (propagation time) from the master device to the slave device. T1) and a time difference (T4-T3) that is a propagation time in the direction from the slave device to the master device can be calculated. The slave device calculates the average value ((T2-T1) + (T4-T3)) / 2 of the two time differences as a value indicating the propagation time (delay time) in the transmission path from these two time differences. Is calculated.

さらに、マスタ装置からスレーブ装置への方向の伝搬時間である時刻差分(T2−T1)から、上記平均値(((T2−T1)+(T4−T3))/2)を減算することによって、マスタ装置の時刻(マスタクロックに基づく時刻)を基準にして、スレーブ装置の時刻(スレーブクロックに基づく時刻)を補正するために用いられるオフセット値((T2−T1)−(T4−T3))/2が算出される。スレーブ装置は、オフセット値が値0になるように基準時刻(スレーブクロック)の補正を行うことで、マスタ装置の基準時刻(マスタクロック)との時刻同期が可能である。   Furthermore, by subtracting the average value (((T2-T1) + (T4-T3)) / 2) from the time difference (T2-T1) which is the propagation time in the direction from the master device to the slave device, The offset value ((T2-T1)-(T4-T3)) / used to correct the time of the slave device (time based on the slave clock) based on the time of the master device (time based on the master clock) 2 is calculated. The slave device can be synchronized with the reference time (master clock) of the master device by correcting the reference time (slave clock) so that the offset value becomes 0.

IEEE Std 1588(TM)‐2008、“IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems”、2008年7月24日、(6.6.3“Synchronization ordinary and boundary clocks”及びFig.12)IEEE Std 1588 (TM) -2008, “IEEE Standard for a Precise Clock Synchronized Protocol for Network for Networked and Roc. )

前述したように、PTPは、スレーブ装置が、4つのタイムスタンプを用いて、伝送路の伝搬時間(遅延時間)とオフセット値とを算出し、これらの値を基にスレーブ装置にて基準時刻の補正を行うプロトコルである。   As described above, in the PTP, the slave device calculates the propagation time (delay time) and the offset value of the transmission path using the four time stamps, and based on these values, the slave device calculates the reference time. This is a protocol for performing correction.

このように、PTPには、4つのタイムスタンプを取得するための4回の同期用パケット送信が存在しているが、スレーブ装置の基準時刻の同期精度をマスタ装置に通知するシーケンスは存在しない。このため、マスタ装置は、スレーブ装置の基準時刻の同期処理が完了したか否かを判定することができない。同様に、マスタ装置には、スレーブクロックを監視するシーケンスが存在しないため、マスタクロック又はスレーブクロックに時刻ずれが発生した際に、これを検出することができない。   Thus, in PTP, there are four synchronization packet transmissions for obtaining four time stamps, but there is no sequence for notifying the master device of the synchronization accuracy of the reference time of the slave device. For this reason, the master device cannot determine whether or not the synchronization processing of the reference time of the slave device is completed. Similarly, since there is no sequence for monitoring the slave clock in the master device, this cannot be detected when a time shift occurs in the master clock or the slave clock.

すなわち、マスタ装置は、前述のスレーブ装置における基準時刻の同期処理の完了判定及び前述のマスタクロック又はスレーブクロックの時刻ずれの検出をすることができないため、マスタ装置において、スレーブ装置の基準時刻の同期精度についての品質確保、保守及び管理を行うことが難しいという問題がある。また、このような問題を解決するためには、PTPにおける4回の時刻同期用パケットの送受信の工程の他に、スレーブ装置の基準時刻の同期処理の完了通知をマスタ装置に送信するためのシーケンスを追加する、又は、スレーブ装置に時刻同期処理の完了検知用ハードウェアを実装する、などの対策が必要となる。   In other words, since the master device cannot determine the completion of the synchronization processing of the reference time in the slave device and detect the time lag of the master clock or the slave clock, the master device can synchronize the reference time of the slave device. There is a problem that it is difficult to ensure quality, maintain and manage accuracy. Further, in order to solve such a problem, in addition to the process of transmitting / receiving four time synchronization packets in the PTP, a sequence for transmitting a completion notification of the synchronization processing of the reference time of the slave device to the master device It is necessary to take measures such as adding a hardware or hardware for detecting completion of time synchronization processing to the slave device.

そこで、本発明は、上記従来技術の課題に鑑みてなされたものであり、マスタ装置とスレーブ装置との間の高精度な時刻同期を可能にする時刻同期監視方法、通信システム、及びマスタ装置を提供することを目的とする。   Therefore, the present invention has been made in view of the above-described problems of the prior art, and provides a time synchronization monitoring method, a communication system, and a master device that enable highly accurate time synchronization between a master device and a slave device. The purpose is to provide.

本発明の一態様に係る時刻同期監視方法は、マスタ装置のマスタクロックとスレーブ装置のスレーブクロックとの間の同期を監視する時刻同期監視方法であって、前記マスタ装置が、前記マスタクロックに基づく第1時刻に第1メッセージを送信し、前記スレーブ装置が、前記スレーブクロックに基づく第2時刻に前記第1メッセージを受信する第1メッセージ送受信ステップと、前記マスタ装置が、前記第1時刻を示す情報を含む第2メッセージを送信し、前記スレーブ装置が、前記第2メッセージを受信する第2メッセージ送受信ステップと、前記スレーブ装置が、前記スレーブクロックに基づく第3時刻に、前記第3時刻を示す情報を含む第3メッセージを送信し、前記マスタ装置が、前記第3メッセージを受信する要求メッセージ送受信ステップと、前記マスタ装置が、前記マスタクロックに基づく時刻であって前記第3メッセージを受信した際の時刻である第4時刻を示す情報を含む、第4メッセージを送信し、前記スレーブ装置が、前記第4メッセージを受信する応答メッセージ送受信ステップと、前記マスタ装置が、前記第4時刻と前記第3時刻との間の差分である監視用時刻差分が予め決められた許容範囲内であるか否かの判断を行い、前記判断の結果を出力する判断ステップとを有することを特徴とする。   A time synchronization monitoring method according to an aspect of the present invention is a time synchronization monitoring method for monitoring synchronization between a master clock of a master device and a slave clock of a slave device, wherein the master device is based on the master clock. A first message transmission / reception step of transmitting a first message at a first time, and wherein the slave device receives the first message at a second time based on the slave clock; and the master device indicates the first time. A second message transmitting / receiving step of transmitting a second message including information, wherein the slave device receives the second message; and the slave device indicates the third time at a third time based on the slave clock. A third message including information is transmitted, and the master device transmits a request message for receiving the third message. Transmitting a fourth message including information indicating a fourth time which is a time based on the master clock and the time when the third message is received, and the slave device The response message transmission / reception step for receiving the fourth message and whether the master device has a monitoring time difference that is a difference between the fourth time and the third time within a predetermined allowable range. A determination step of determining whether or not to output the result of the determination.

本発明の他の態様に係る時刻同期監視方法は、マスタ装置のマスタクロックと第1から第M(Mは2以上の整数)のスレーブ装置の第1から第Mのスレーブクロックとの間の同期を監視する時刻同期監視方法であって、前記マスタクロックと第m(mは1以上M以下の整数)のスレーブ装置の第mのスレーブクロックとの間の同期の監視のために実行される時刻同期監視処理は、前記マスタ装置が、前記マスタクロックに基づく第1時刻に第1メッセージを送信し、前記第mのスレーブ装置が、前記第mのスレーブクロックに基づく第2時刻に前記第1メッセージを受信する第1メッセージ送受信ステップと、前記マスタ装置が、前記第1時刻を示す情報を含む第2メッセージを送信し、前記第mのスレーブ装置が、前記第2メッセージを受信する第2メッセージ送受信ステップと、前記第mのスレーブ装置が、前記第mのスレーブクロックに基づく第3時刻に、前記第3時刻を示す情報を含む第3メッセージを送信し、前記マスタ装置が、前記第3メッセージを受信する要求メッセージ送受信ステップと、前記マスタ装置が、前記マスタクロックに基づく時刻であって前記第3メッセージを受信した際の時刻である第4時刻を示す情報を含む、第4メッセージを送信し、前記第mのスレーブ装置が、前記第4メッセージを受信する応答メッセージ送受信ステップと、前記マスタ装置が、前記第4時刻と前記第3時刻との間の差分である監視用時刻差分が予め決められた許容範囲内であるか否かの判断を行い、前記判断の結果を出力する判断ステップとを有することを特徴とする。   According to another aspect of the present invention, there is provided a time synchronization monitoring method in which synchronization between a master clock of a master device and first to Mth slave clocks of first to Mth (M is an integer of 2 or more) slave devices. Is a time synchronization monitoring method for monitoring synchronization between the master clock and the m-th slave clock of the m-th (m is an integer of 1 to M) slave device. In the synchronization monitoring process, the master device transmits a first message at a first time based on the master clock, and the m-th slave device transmits the first message at a second time based on the m-th slave clock. A first message transmission / reception step for receiving the message, the master device transmits a second message including information indicating the first time, and the m-th slave device receives the second message. A second message transmission / reception step, wherein the m-th slave device transmits a third message including information indicating the third time at a third time based on the m-th slave clock; A request message transmission / reception step for receiving the third message, and information indicating a fourth time that is a time based on the master clock and when the master device receives the third message, A response message transmitting and receiving step in which the mth slave device receives the fourth message, and the master device is a monitoring time that is a difference between the fourth time and the third time. And determining whether or not the difference is within a predetermined allowable range, and outputting a result of the determination.

本発明の一態様によれば、マスタ装置は、マスタクロックとスレーブクロックとの間の監視用時刻差分に基づいて、スレーブ装置のスレーブクロックの時刻同期処理が完了しているか否かを判定することができる。   According to one aspect of the present invention, the master device determines whether the time synchronization processing of the slave clock of the slave device is completed based on the monitoring time difference between the master clock and the slave clock. Can do.

また、本発明の他の態様によれば、マスタ装置は、マスタクロックと複数のスレーブクロックとの間の複数の監視用時刻差分に基づいて、複数のスレーブ装置のスレーブクロックの時刻同期処理が完了しているか否かを判定することができ、さらに、マスタクロックと複数のスレーブクロックのいずれにも時刻ずれがない、又は、マスタ装置のマスタクロックに時刻ずれが発生していることを判定することができる。   According to another aspect of the present invention, the master device completes the time synchronization processing of the slave clocks of the plurality of slave devices based on the plurality of monitoring time differences between the master clock and the plurality of slave clocks. Furthermore, it is possible to determine whether there is a time lag in either the master clock or the plurality of slave clocks, or a time lag has occurred in the master clock of the master device. Can do.

比較例の通信システムの構成を示すブロック図である。It is a block diagram which shows the structure of the communication system of a comparative example. 比較例が採用する時刻同期方法としてのPTPを示すシーケンス図である。It is a sequence diagram which shows PTP as a time synchronization method which a comparative example employ | adopts. 本発明の実施の形態1の時刻同期監視方法を実施する通信システムの構成を示すブロック図である。It is a block diagram which shows the structure of the communication system which implements the time synchronous monitoring method of Embodiment 1 of this invention. 実施の形態1の時刻同期監視方法を採用するPTPを示すシーケンス図である。FIG. 3 is a sequence diagram showing a PTP that employs the time synchronization monitoring method of the first embodiment. 実施の形態1のマスタ装置の同期精度監視部の動作を示すフローチャートである。4 is a flowchart illustrating an operation of a synchronization accuracy monitoring unit of the master device according to the first embodiment. 本発明の実施の形態2の時刻同期監視方法を実施する通信システムの構成を示すブロック図である。It is a block diagram which shows the structure of the communication system which implements the time synchronous monitoring method of Embodiment 2 of this invention. 実施の形態2の時刻同期監視方法を採用するPTPを示すシーケンス図である。FIG. 10 is a sequence diagram showing a PTP that employs the time synchronization monitoring method of the second embodiment. 実施の形態2のマスタ装置の同期精度監視部の動作を示すフローチャートである。10 is a flowchart illustrating an operation of a synchronization accuracy monitoring unit of the master device according to the second embodiment. 本発明の実施の形態3の時刻同期監視方法を実施する通信システムの構成を示すブロック図である。It is a block diagram which shows the structure of the communication system which implements the time synchronous monitoring method of Embodiment 3 of this invention. 実施の形態1から3のマスタ装置の変形例のハードウェア構成図である。FIG. 10 is a hardware configuration diagram of a modified example of the master device according to the first to third embodiments.

以下に、本発明の実施の形態を図面に基づいて詳細に説明する。以下の説明においては、最初に、比較例を図1及び図2に基づいて説明し、次に、実施の形態1から3及び変形例を図3から図10に基づいて詳細に説明する。なお、本発明は、以下に記載する実施の形態1から3及び変形例に限定されるものではない。   Embodiments of the present invention will be described below in detail with reference to the drawings. In the following description, first, a comparative example will be described based on FIGS. 1 and 2, and then Embodiments 1 to 3 and a modified example will be described in detail based on FIGS. 3 to 10. The present invention is not limited to Embodiments 1 to 3 and modifications described below.

《比較例》
図1は、PTPを用いる比較例の通信システムの構成を示すブロック図である。図1に示されるように、この通信システムは、マスタ装置1とスレーブ装置2とで構成される。マスタ装置1とスレーブ装置2とは、有線回線3によって接続される。マスタ装置1は、上位装置との通信を行う送受信部11と、スレーブ装置2との通信を行う送受信部12と、パケット抽出部13と、時刻同期処理部14と、時刻同期用パケット生成部15と、基準時刻取得部16とを備える。スレーブ装置2は、マスタ装置1との通信を行う送受信部21と、下位装置との通信を行う送受信部22と、パケット抽出部23と、時刻同期処理部24と、時刻同期用パケット生成部25と、時刻情報処理部26とを備える。
《Comparative example》
FIG. 1 is a block diagram illustrating a configuration of a communication system of a comparative example using PTP. As shown in FIG. 1, this communication system includes a master device 1 and a slave device 2. The master device 1 and the slave device 2 are connected by a wired line 3. The master device 1 includes a transmission / reception unit 11 that performs communication with the host device, a transmission / reception unit 12 that performs communication with the slave device 2, a packet extraction unit 13, a time synchronization processing unit 14, and a time synchronization packet generation unit 15. And a reference time acquisition unit 16. The slave device 2 includes a transmission / reception unit 21 that communicates with the master device 1, a transmission / reception unit 22 that communicates with a lower-level device, a packet extraction unit 23, a time synchronization processing unit 24, and a time synchronization packet generation unit 25. And a time information processing unit 26.

図2は、図1の比較例が採用する時刻同期方法としてのPTPを示すシーケンス図である。PTPの時刻同期処理は、以下の処理工程を有している。
第一に、マスタ装置1における時刻同期処理部14は、基準時刻取得部16からマスタクロックを取得する。時刻同期処理部14は、取得したマスタクロックを基に、時刻同期用パケット生成部15にて時刻同期用パケットであるSyncメッセージを生成し、時刻T1に、このSyncメッセージをスレーブ装置2に向けて送信する。スレーブ装置は、Syncメッセージを時刻T2に受信し、Syncメッセージを受信した際の時刻T2を示す情報を記憶する。
FIG. 2 is a sequence diagram showing PTP as a time synchronization method adopted by the comparative example of FIG. The PTP time synchronization process has the following processing steps.
First, the time synchronization processing unit 14 in the master device 1 acquires the master clock from the reference time acquisition unit 16. Based on the acquired master clock, the time synchronization processing unit 14 generates a Sync message that is a time synchronization packet in the time synchronization packet generation unit 15, and sends the Sync message to the slave device 2 at time T 1. Send. The slave device receives the Sync message at time T2, and stores information indicating the time T2 when the Sync message is received.

第二に、マスタ装置1における時刻同期処理部14は、時刻同期用パケット生成部15にて、時刻T1を示す情報を含んだ時刻同期用パケットであるFollowupメッセージを生成し、スレーブ装置2に向けて送信する。スレーブ装置2におけるパケット抽出部23は、下りパケットの中からFollowupメッセージを抽出し、時刻同期処理部24は、抽出されたFollowupメッセージから取得した時刻T1を示す情報と記憶されている時刻T2を示す情報を時刻情報処理部26に伝達する。   Second, the time synchronization processing unit 14 in the master device 1 generates a Followup message, which is a time synchronization packet including information indicating the time T1, in the time synchronization packet generation unit 15 and sends it to the slave device 2. To send. The packet extraction unit 23 in the slave device 2 extracts the Followup message from the downlink packet, and the time synchronization processing unit 24 indicates the information indicating the time T1 acquired from the extracted Followup message and the stored time T2. Information is transmitted to the time information processing unit 26.

第三に、スレーブ装置2における時刻同期処理部24は、時刻情報処理部26からスレーブクロックを取得する。時刻同期処理部24は、取得したスレーブクロックを基に、時刻同期用パケット生成部25にて時刻同期用パケットであるDelay_Reqメッセージを生成させ、時刻T3に、これをマスタ装置1に向けて送信する。   Third, the time synchronization processing unit 24 in the slave device 2 acquires a slave clock from the time information processing unit 26. Based on the acquired slave clock, the time synchronization processing unit 24 causes the time synchronization packet generation unit 25 to generate a Delay_Req message, which is a time synchronization packet, and transmits it to the master device 1 at time T3. .

第四に、マスタ装置1におけるパケット抽出部13は、送受信部12で受信された上りパケットの中からDelay_Reqメッセージを抽出し、時刻同期処理部14は、Delay_Reqメッセージの受信を契機に時刻同期用パケット生成部15にて、マスタ装置1がDelay_Reqメッセージを受信した際の時刻T4を示す情報を含んだ時刻同期用パケットであるDelay_Respメッセージを生成し、スレーブ装置2に向けて送信する。スレーブ装置2におけるパケット抽出部23は、下りパケットの中からDelay_Respメッセージを抽出し、時刻同期処理部24は、Delay_Respメッセージから取得した時刻T4を示す情報を時刻情報処理部26に伝達する。   Fourth, the packet extraction unit 13 in the master device 1 extracts the Delay_Req message from the uplink packet received by the transmission / reception unit 12, and the time synchronization processing unit 14 receives the Delay_Req message as a trigger for the time synchronization packet. The generation unit 15 generates a Delay_Resp message that is a time synchronization packet including information indicating the time T <b> 4 when the master device 1 receives the Delay_Req message, and transmits the generated message to the slave device 2. The packet extraction unit 23 in the slave device 2 extracts the Delay_Resp message from the downlink packet, and the time synchronization processing unit 24 transmits information indicating the time T4 acquired from the Delay_Resp message to the time information processing unit 26.

スレーブ装置2における時刻情報処理部26は、時刻T1、T2、T3、及びT4を示す情報を用いて、マスタ装置1からスレーブ装置2への方向の伝搬時間(T2−T1)と、スレーブ装置2からマスタ装置1への方向の伝搬時間(T4−T3)を算出する。上述の2つの伝搬時間(すなわち、遅延時間)から、伝送路における伝搬時間の平均値を、次式、((T2−T1)+(T4−T3))/2、で算出する。さらに、マスタ装置1からスレーブ装置2への方向の伝搬時間(T2−T1)と伝送路における伝搬時間の平均値(((T2−T1)+(T4−T3))/2)とから、スレーブ装置2のオフセット値を、次式、((T2−T1)−(T4−T3))/2、で算出し、スレーブ装置2においては、オフセット値が値「0」になるように基準時刻(スレーブクロック)の補正を行う。このような基準時刻の補正は、例えば、定期的に繰り返される。   The time information processing unit 26 in the slave device 2 uses the information indicating the times T1, T2, T3, and T4, the propagation time (T2-T1) in the direction from the master device 1 to the slave device 2, and the slave device 2. The propagation time (T4-T3) in the direction from to the master device 1 is calculated. From the above two propagation times (that is, delay times), the average value of the propagation times in the transmission path is calculated by the following equation: ((T2-T1) + (T4-T3)) / 2. Further, from the propagation time (T2−T1) in the direction from the master device 1 to the slave device 2 and the average value of the propagation time in the transmission path (((T2−T1) + (T4−T3)) / 2), the slave The offset value of the device 2 is calculated by the following equation ((T2-T1)-(T4-T3)) / 2, and in the slave device 2, the reference time (so that the offset value becomes the value “0”) (Slave clock) is corrected. Such correction of the reference time is periodically repeated, for example.

しかし、比較例においては、マスタ装置1は、スレーブ装置2の基準時刻の同期精度をマスタ装置1に通知するシーケンスは存在しない。このため、マスタ装置1は、スレーブ装置2の基準時刻の同期処理が完了したか否かを判定することができない。これに対し、以下の実施の形態1から3及び変形例においては、マスタ装置は、監視用時刻差分(T4−T3)を用いて、スレーブ装置の基準時刻の同期処理が完了したか否かを判定することができる。   However, in the comparative example, there is no sequence in which the master device 1 notifies the master device 1 of the synchronization accuracy of the reference time of the slave device 2. For this reason, the master device 1 cannot determine whether or not the synchronization processing of the reference time of the slave device 2 has been completed. On the other hand, in the following first to third embodiments and modifications, the master device uses the monitoring time difference (T4-T3) to determine whether or not the slave device reference time synchronization processing is completed. Can be determined.

《実施の形態1》
図3は、実施の形態1の時刻同期監視方法を実施する通信システムの構成を示すブロック図である。図3において、図1(比較例)に示される構成要素と同一又は対応する構成要素には、図1に示される符号と同じ符号を付す。図3に示されるように、この通信システムは、マスタ装置1aとスレーブ装置2aとで構成される。以下の説明において、マスタ装置及びスレーブ装置は、いずれも通信機能を備えた装置であり、例えば、局側通信装置及び端末側(加入者側)通信装置である。マスタ装置1aとスレーブ装置2aとは、有線回線3によって接続される。有線回線3は、ネットワークを含んでもよいが、PTP対応のネットワークである必要がある。図3に示される実施の形態1のマスタ装置1aは、送受信部11と、送受信部12と、パケット抽出部13と、時刻同期処理部14と、時刻同期用パケット生成部15と、基準時刻取得部16とに加えて、同期精度監視部17を備える点において、図1に示されるマスタ装置1と相違する。また、図3に示される実施の形態1のスレーブ装置2aは、送受信部21と、送受信部22と、パケット抽出部23と、時刻同期処理部24a(図1では符号24)と、時刻同期用パケット生成部25と、時刻情報処理部26とを備える点において、図1に示されるスレーブ装置2と共通するが、時刻同期処理部24aの指示に基づいて時刻同期用パケット生成部25が生成する時刻同期用パケットであるDelay_Reqメッセージに、このDelay_Reqメッセージを送信した際の時刻T3(スレーブクロックに基づく時刻)を示す情報が含まれる点において、図1に示される比較例のスレーブ装置2と相違する。
Embodiment 1
FIG. 3 is a block diagram illustrating a configuration of a communication system that implements the time synchronization monitoring method according to the first embodiment. 3, components that are the same as or correspond to the components shown in FIG. 1 (comparative example) are assigned the same reference numerals as those shown in FIG. As shown in FIG. 3, the communication system includes a master device 1a and a slave device 2a. In the following description, a master device and a slave device are both devices having a communication function, for example, a station side communication device and a terminal side (subscriber side) communication device. The master device 1a and the slave device 2a are connected by a wired line 3. The wired line 3 may include a network, but needs to be a PTP-compatible network. The master device 1a of the first embodiment shown in FIG. 3 includes a transmission / reception unit 11, a transmission / reception unit 12, a packet extraction unit 13, a time synchronization processing unit 14, a time synchronization packet generation unit 15, and a reference time acquisition. It differs from the master device 1 shown in FIG. 1 in that a synchronization accuracy monitoring unit 17 is provided in addition to the unit 16. 3 includes a transmission / reception unit 21, a transmission / reception unit 22, a packet extraction unit 23, a time synchronization processing unit 24a (reference numeral 24 in FIG. 1), and a time synchronization unit. Although common to the slave device 2 shown in FIG. 1 in that the packet generation unit 25 and the time information processing unit 26 are provided, the time synchronization packet generation unit 25 generates based on an instruction from the time synchronization processing unit 24a. 1 is different from the slave device 2 of the comparative example shown in FIG. 1 in that the Delay_Req message, which is a time synchronization packet, includes information indicating the time T3 (time based on the slave clock) when the Delay_Req message is transmitted. .

なお、マスタ装置1aは、送受信部11及び12と、パケット抽出部13と、時刻同期処理部14と、時刻同期用パケット生成部15と、基準時刻取得部16と、同期精度監視部17とを含むマスタ装置1aの全体の各種動作を制御する制御部と情報記憶部(メモリ)とを備えてもよい。また、同期精度監視部17は、同期精度の監視を行う監視部の他に、演算を行う算出部と算出された値を一時的に記憶する記憶部とを備えてもよい。また、スレーブ装置2aは、送受信部21及び22と、パケット抽出部23と、時刻同期処理部24aと、時刻同期用パケット生成部25と、時刻情報処理部26とを含むスレーブ装置2aの全体の各種動作を制御する制御部と情報記憶部(メモリ)とを備えてもよい。   The master device 1a includes transmission / reception units 11 and 12, a packet extraction unit 13, a time synchronization processing unit 14, a time synchronization packet generation unit 15, a reference time acquisition unit 16, and a synchronization accuracy monitoring unit 17. You may provide the control part and information storage part (memory) which control the various operation | movement of the whole master apparatus 1a including. In addition to the monitoring unit that monitors the synchronization accuracy, the synchronization accuracy monitoring unit 17 may include a calculation unit that performs calculation and a storage unit that temporarily stores the calculated value. In addition, the slave device 2a includes the transmission / reception units 21 and 22, the packet extraction unit 23, the time synchronization processing unit 24a, the time synchronization packet generation unit 25, and the time information processing unit 26. You may provide the control part and information storage part (memory) which control various operation | movement.

図4は、実施の形態1の時刻同期監視方法を採用するPTPを示すシーケンス図である。図4のシーケンスは、スレーブ装置2aの時刻同期処理部24aが、送信するDelay_Reqメッセージに、このDelay_Reqメッセージを送信した際の時刻T3(スレーブクロックに基づく時刻)を示す情報を含む点において、図2に示される比較例のシーケンスと相違する。   FIG. 4 is a sequence diagram showing a PTP that employs the time synchronization monitoring method of the first embodiment. The sequence shown in FIG. 4 includes information indicating time T3 (time based on the slave clock) when the Delay_Req message is transmitted by the time synchronization processing unit 24a of the slave device 2a. The sequence of the comparative example shown in FIG.

図4に示されるように、実施の形態1の時刻同期監視方法では、第1の処理(第1メッセージ送受信ステップS1)として、マスタ装置1aが、マスタクロックに基づく時刻T1(第1時刻)に時刻同期メッセージ(第1メッセージ)としてのSyncメッセージ(Clock Sync message)を送信し、スレーブ装置2aが、スレーブクロックに基づく時刻T2(第2時刻)にSyncメッセージを受信する。スレーブ装置2aは、時刻T2を示す情報をメモリに一時的に記憶する。   As shown in FIG. 4, in the time synchronization monitoring method of the first embodiment, as the first process (first message transmission / reception step S1), the master device 1a operates at time T1 (first time) based on the master clock. A Sync message (Clock Sync message) is transmitted as a time synchronization message (first message), and the slave device 2a receives the Sync message at time T2 (second time) based on the slave clock. The slave device 2a temporarily stores information indicating the time T2 in the memory.

次の第2の処理(第2メッセージ送受信ステップS2)として、マスタ装置1aが、時刻T1を示す情報を含む時刻同期メッセージ(第2メッセージ)としてのSync_Followupメッセージ(Clock Sync Followup message)を送信し、スレーブ装置2aが、このSync_Followupメッセージを受信する。スレーブ装置2aは、時刻T1を示す情報をメモリに一時的に記憶する。   As the next second processing (second message transmission / reception step S2), the master device 1a transmits a Sync_Followup message (Clock Sync Followup message) as a time synchronization message (second message) including information indicating the time T1, The slave device 2a receives this Sync_Followup message. The slave device 2a temporarily stores information indicating the time T1 in the memory.

次の第3の処理(要求メッセージ送受信ステップS3)として、スレーブ装置2aが、スレーブクロックに基づく時刻T3(第3時刻)に、この時刻T3を示す情報を含む時刻同期メッセージ(第3メッセージ)としてのDelay_Reqメッセージ(Clock Delay Request message)を送信し、マスタ装置1aが、時刻T4に、このDelay_Reqメッセージを受信する。スレーブ装置2aは、時刻T3を示す情報をメモリに一時的に記憶する。また、マスタ装置1aは、時刻T3を示す情報と時刻T4を示す情報をメモリに一時的に記憶する。   As the next third processing (request message transmission / reception step S3), the slave device 2a at time T3 (third time) based on the slave clock as a time synchronization message (third message) including information indicating this time T3. The Delay_Req message (Clock Delay Request message) is transmitted, and the master device 1a receives the Delay_Req message at time T4. The slave device 2a temporarily stores information indicating the time T3 in the memory. The master device 1a temporarily stores information indicating the time T3 and information indicating the time T4 in the memory.

次の第4の処理(応答メッセージ送受信ステップS4)として、マスタ装置1aが、マスタクロックに基づく時刻であって時刻同期クロック(第3メッセージ)を受信した際の時刻である時刻T4(第4時刻)を示す情報を含む第4メッセージとしてのDelay_Respメッセージ(Clock Delay Response message)を送信し、スレーブ装置2aが、Delay_Respメッセージを受信する。スレーブ装置2aは、時刻T4を示す情報をメモリに一時的に記憶する。   As the next fourth process (response message transmission / reception step S4), time T4 (fourth time), which is the time when the master device 1a receives the time synchronization clock (third message) based on the master clock. ), A Delay_Resp message (Clock Delay Response message) is transmitted as a fourth message, and the slave device 2a receives the Delay_Resp message. The slave device 2a temporarily stores information indicating the time T4 in the memory.

次に、スレーブ装置2aは、マスタクロックに基づく時刻T1、スレーブクロックに基づく時刻T2、スレーブクロックに基づく時刻T3、及びマスタクロックに基づく時刻T4を用いて、スレーブ装置2aの基準時刻であるスレーブクロックを補正する。このときの補正は、比較例で説明した補正方法と同様である。例えば、スレーブ装置2aの時刻情報処理部26は、伝送路における伝搬時間(遅延時間)の平均値を、((T2−T1)+(T4−T3))/2で算出する。次に、スレーブ装置2aの時刻情報処理部26は、マスタ装置1aからスレーブ装置2aへの方向の伝搬時間(T2−T1)から伝送路における伝搬時間の平均値(((T2−T1)+(T4−T3))/2)を減算することによって、スレーブ装置2aのオフセット値を、((T2−T1)−(T4−T3))/2を算出し、スレーブ装置2aの時刻情報処理部26は、オフセット値が値「0」になるように基準時刻(スレーブクロック)の補正を行う。   Next, the slave device 2a uses the time T1 based on the master clock, the time T2 based on the slave clock, the time T3 based on the slave clock, and the time T4 based on the master clock to obtain the slave clock that is the reference time of the slave device 2a. Correct. The correction at this time is the same as the correction method described in the comparative example. For example, the time information processing unit 26 of the slave device 2a calculates the average value of the propagation time (delay time) in the transmission path by ((T2-T1) + (T4-T3)) / 2. Next, the time information processing unit 26 of the slave device 2a determines the average propagation time (((T2-T1) + ((T2-T1) + (T2)) from the propagation time (T2-T1) in the direction from the master device 1a to the slave device 2a. By subtracting T4-T3)) / 2), the offset value of the slave device 2a is calculated as ((T2-T1)-(T4-T3)) / 2, and the time information processing unit 26 of the slave device 2a is calculated. Corrects the reference time (slave clock) so that the offset value becomes the value “0”.

さらに、実施の形態1においては、マスタ装置1aの同期精度監視部17が、時刻T4と時刻T3との間の差分である監視用時刻差分(T4−T3)が予め決められた許容範囲内であるか否かの判断を行い、判断の結果を出力する判断ステップを有する。判断ステップにおいて、監視用時刻差分(T4−T3)が前記許容範囲外であると判断された場合に、判断の結果は、スレーブ装置2aの基準時刻であるスレーブクロックに時刻ずれがあることを示す情報である。監視用時刻差分(T4−T3)が前記許容範囲内であると判断された場合に、判断の結果は、スレーブ装置2aの基準時刻であるスレーブクロックに時刻ずれがないことを示す情報である。この情報は、例えば、送受信部11を通して上位装置に通知される。   Furthermore, in the first embodiment, the synchronization accuracy monitoring unit 17 of the master device 1a has a monitoring time difference (T4-T3) that is a difference between the time T4 and the time T3 within a predetermined allowable range. It has a determination step of determining whether or not there is and outputting the result of the determination. When it is determined in the determination step that the monitoring time difference (T4-T3) is outside the allowable range, the determination result indicates that there is a time lag in the slave clock that is the reference time of the slave device 2a. Information. When it is determined that the monitoring time difference (T4-T3) is within the allowable range, the determination result is information indicating that there is no time shift in the slave clock that is the reference time of the slave device 2a. This information is notified to the higher-level device through the transmission / reception unit 11, for example.

図5は、実施の形態1のマスタ装置1aの同期精度監視部17の動作を示すフローチャートである。図5に基づいて、同期精度監視部17の動作を説明する。   FIG. 5 is a flowchart illustrating the operation of the synchronization accuracy monitoring unit 17 of the master device 1a according to the first embodiment. The operation of the synchronization accuracy monitoring unit 17 will be described based on FIG.

マスタ装置1aの同期精度監視部17は、スレーブ装置2aからDelay_Reqメッセージを受信する度に(ステップS11)、Delay_Reqメッセージがスレーブ装置2aから送信された際の時刻T3とマスタ装置1aがDelay_Respメッセージを送信した際の時刻T4を用いて、スレーブ装置2からマスタ装置1aへの方向の伝搬時間(すなわち、遅延時間)である監視用時刻差分(T4−T3)を算出し(ステップS12及びS13)、及びこれを記録する(ステップS14)。   Each time the synchronization accuracy monitoring unit 17 of the master device 1a receives the Delay_Req message from the slave device 2a (step S11), the master device 1a transmits the Delay_Resp message at time T3 when the Delay_Req message is transmitted from the slave device 2a. Using the time T4 at the time of calculation, a monitoring time difference (T4-T3) that is a propagation time (ie, delay time) in the direction from the slave device 2 to the master device 1a is calculated (steps S12 and S13), and This is recorded (step S14).

マスタ装置1aの同期精度監視部17は、監視用時刻差分(T4−T3)が予め決められた許容範囲内に収まる場合(ステップS15)、スレーブクロックがオフセット値により補正されたと判断し、スレーブ装置2aにおける時刻同期が完了したと判定する(ステップS16)。同期精度監視部17は、監視用時刻差分(T4−T3)が許容範囲内に収まらない場合、スレーブクロックがオフセット値により補正されていないと判断し、スレーブ装置2aにおける時刻同期が完了していないと判定する(ステップS17)。   When the monitoring time difference (T4−T3) is within a predetermined allowable range (step S15), the synchronization accuracy monitoring unit 17 of the master device 1a determines that the slave clock has been corrected by the offset value, and the slave device It is determined that the time synchronization in 2a is completed (step S16). If the monitoring time difference (T4-T3) does not fall within the allowable range, the synchronization accuracy monitoring unit 17 determines that the slave clock is not corrected by the offset value, and the time synchronization in the slave device 2a is not completed. (Step S17).

なお、図5においては、ステップS15において、監視用時刻差分(T4−T3)が許容範囲内に収まった場合に補正完了と判定(ステップS17)する場合を説明したが、PTPのプロセスを複数回繰り返し、監視用時刻差分(T4−T3)の判定(ステップS15に相当する判定)を複数回繰り返す場合もある。この場合には、例えば、監視用時刻差分(T4−T3)が10回連続で許容範囲内に収まった場合(判定を複数回繰り返す場合には「許容範囲内に収束した場合」ともいう)に、ステップS15の判定をYESとしてもよい。   In FIG. 5, the case where it is determined that correction is completed (step S <b> 17) when the monitoring time difference (T <b> 4 − T <b> 3) is within the allowable range has been described in step S <b> 15. The determination of the monitoring time difference (T4-T3) (determination corresponding to step S15) may be repeated a plurality of times. In this case, for example, when the monitoring time difference (T4−T3) is within the allowable range for 10 consecutive times (also referred to as “when converged within the allowable range” when the determination is repeated a plurality of times). The determination in step S15 may be YES.

以上に説明したように、実施の形態1の時刻同期監視方法、通信装置、及びマスタ装置1aによれば、マスタ装置1aの同期精度監視部17にて監視用時刻差分の算出及び記録、さらに変動監視を行うことで、シーケンスの追加及びハードウェア機能の追加を行わずに、マスタ装置1aからスレーブ装置2の時刻同期精度を監視することができる。また、マスタ装置1aの判断結果(監視結果)を、マスタ装置1aの送受信部11から上位装置に通知することで、警報機能を備えた通信システムとすることができ、保守の確実性及び迅速性が向上する。   As described above, according to the time synchronization monitoring method, the communication device, and the master device 1a of the first embodiment, the synchronization accuracy monitoring unit 17 of the master device 1a calculates and records the monitoring time difference, and further varies. By performing monitoring, it is possible to monitor the time synchronization accuracy of the slave device 2 from the master device 1a without adding a sequence or adding a hardware function. Further, by notifying the determination result (monitoring result) of the master device 1a to the host device from the transmission / reception unit 11 of the master device 1a, a communication system having an alarm function can be provided, and the reliability and quickness of maintenance Will improve.

《実施の形態2》
図6は、実施の形態2の時刻同期監視方法を実施する通信システムの構成を示すブロック図である。図6において、図3(実施の形態1)に示される構成要素と同一又は対応する構成要素には、図3に示される符号と同じ符号を付す。図6に示されるように、この通信システムは、マスタ装置1bと、第1から第M(Mは2以上の整数)のスレーブ装置2_1,2_2,…,2_Mとで構成される。マスタ装置1bは、スイッチングハブ41を介して第1から第Mのスレーブ装置2_1,2_2,…,2_Mの各々と接続される。図6に示される実施の形態2のマスタ装置1bは、上位装置との通信を行う送受信部11と、各スレーブ装置との通信を行う送受信部12と、パケット抽出部13と、時刻同期処理部14と、時刻同期用パケット生成部15と、基準時刻取得部16と、同期精度監視部17aとを備える。なお、第1から第M(Mは2以上の整数)のスレーブ装置2_1,2_2,…,2_Mの内の任意の1台を示す場合には、第mのスレーブ装置2_m(又は、スレーブ装置2_m)とも表記する。なお、実施の形態1におけるスレーブ装置2aと同じ構成を持つ。
<< Embodiment 2 >>
FIG. 6 is a block diagram illustrating a configuration of a communication system that implements the time synchronization monitoring method according to the second embodiment. 6, components that are the same as or correspond to the components shown in FIG. 3 (Embodiment 1) are given the same reference numerals as those shown in FIG. As shown in FIG. 6, this communication system includes a master device 1b and first to Mth slave devices 2_1, 2_2,..., 2_M (M is an integer equal to or greater than 2). The master device 1b is connected to each of the first to Mth slave devices 2_1, 2_2,..., 2_M via the switching hub 41. The master device 1b according to the second embodiment shown in FIG. 6 includes a transmission / reception unit 11 that communicates with a host device, a transmission / reception unit 12 that communicates with each slave device, a packet extraction unit 13, and a time synchronization processing unit. 14, a time synchronization packet generation unit 15, a reference time acquisition unit 16, and a synchronization accuracy monitoring unit 17 a. When any one of the first to Mth (M is an integer of 2 or more) slave devices 2_1, 2_2,..., 2_M is shown, the mth slave device 2_m (or slave device 2_m ). It has the same configuration as slave device 2a in the first embodiment.

図7は、実施の形態2の時刻同期監視方法を採用するPTPを示すシーケンス図である。図7は、マスタ装置1bと第1から第Mのスレーブ装置2_1,2_2,…,2_M−1,2_Mとの間のPTPを示す。   FIG. 7 is a sequence diagram showing a PTP that employs the time synchronization monitoring method of the second embodiment. FIG. 7 shows PTP between the master device 1b and the first to Mth slave devices 2_1, 2_2,..., 2_M-1, 2_M.

図7に示されるように、実施の形態2の時刻同期監視方法では、第1の処理(第1メッセージ送受信ステップ)として、マスタ装置1bが、マスタクロックに基づく時刻T1_1(第1時刻)に時刻同期メッセージ(第1メッセージ)としての第1のSyncメッセージ(Clock Sync message)を送信し、第1のスレーブ装置2_1が、スレーブクロックに基づく時刻T2_1(第2時刻)に第1のSyncメッセージを受信する。   As shown in FIG. 7, in the time synchronization monitoring method according to the second embodiment, as the first process (first message transmission / reception step), the master device 1b sets the time at time T1_1 (first time) based on the master clock. A first sync message (clock sync message) is transmitted as a synchronization message (first message), and the first slave device 2_1 receives the first sync message at time T2_1 (second time) based on the slave clock. To do.

次の第2の処理(第2メッセージ送受信ステップ)として、マスタ装置1bが、時刻T1_1(第1時刻)を示す情報を含む時刻同期メッセージ(第2メッセージ)としての第1のSync_Followupメッセージ(Clock Sync Followup message)を送信し、スレーブ装置2_1が、第2メッセージを受信する。   As the next second processing (second message transmission / reception step), the master device 1b receives a first Sync_Followup message (Clock Sync) as a time synchronization message (second message) including information indicating the time T1_1 (first time). (Followup message) is transmitted, and the slave device 2_1 receives the second message.

その後、第1の処理(第1メッセージ送受信ステップ)及び第2処理(第2メッセージ送受信ステップ)を、第2から第Mのスレーブ装置2_2,…,2_Mとの間で順に実行する。   Thereafter, the first process (first message transmission / reception step) and the second process (second message transmission / reception step) are sequentially executed between the second to M-th slave devices 2_2,.

次の第3の処理(要求メッセージ送受信ステップ)として、第1から第Mのスレーブ装置2_1,2_2,…,2_Mが、スレーブクロックに基づく時刻T3_1,T3_2,…,T3_M(第3時刻)に、時刻T3_1,T3_2,…,T3_M(第3時刻)を示す情報を含む時刻同期メッセージ(第3メッセージ)としての第1から第MのDelay_Reqメッセージ(Clock Delay Request message)を順に送信し、マスタ装置1bが、第1から第Mのスレーブ装置2_1,2_2,…,2_Mが第1から第MのDelay_Reqメッセージを受信する。   As the next third processing (request message transmission / reception step), the first to M-th slave devices 2_1, 2_2,..., 2_M perform the times T3_1, T3_2, ..., T3_M (third time) based on the slave clock. First to M-th Delay_Req messages (Clock Delay Request messages) as time synchronization messages (third messages) including information indicating times T3_1, T3_2,..., T3_M (third time) are sequentially transmitted, and the master device 1b. However, the first to Mth slave devices 2_1, 2_2,..., 2_M receive the first to Mth Delay_Req messages.

次の第4の処理(応答メッセージ送受信ステップ)として、マスタ装置1bが、マスタクロックに基づく時刻であって時刻同期クロック(第3メッセージ)を受信した際の時刻である時刻T4_1,T4_2,…,T4_M(第4時刻)を示す情報を含み、第4メッセージとしての第1から第MのDelay_Respメッセージ(Clock Delay Responce message)を順に送信し、スレーブ装置2_1,2_2,…,2_M−1,2_Mが、第1から第MのDelay_Respメッセージを受信する。   As the next fourth process (response message transmission / reception step), times T4_1, T4_2,..., Which are times when the master device 1b receives the time synchronization clock (third message) based on the master clock. The first to Mth Delay_Resp messages (Clock Delay Response messages) as the fourth message are sequentially transmitted, including information indicating T4_M (fourth time), and the slave devices 2_1, 2_2,..., 2_M-1, 2_M , 1st to Mth Delay_Resp messages are received.

次に、第1から第Mのスレーブ装置2_1,2_2,…,2_Mは、マスタクロックに基づく時刻T1_1,T1_2,…,T1_Mと、スレーブクロックに基づく時刻T2_1,T2_2,…,T2_Mと、スレーブクロックに基づく時刻T3_1,T3_2,…,T3_Mと、及びマスタクロックに基づく時刻T4_1,T4_2,…,T4_Mを用いて、第1から第Mのスレーブ装置2_1,2_2,…,2_Mの各スレーブクロックを補正する。   Next, the first to M-th slave devices 2_1, 2_2,..., 2_M have times T1_1, T1_2,..., T1_M based on the master clock, times T2_1, T2_2,. , T3_M based on the master clock and times T4_1, T4_2,..., T4_M based on the master clock are used to correct the first to Mth slave devices 2_1, 2_2,. To do.

次の、判断ステップにおいて、マスタ装置1bは、時刻T4_1,T4_2,…,T4_Mと時刻T3_1,T3_2,…,T3_Mとの間の差分である監視用時刻差分(T4_1−T3_1)、(T4_2−T3_2)、…、(T4_M−T3_M)が予め決められた許容範囲内に収まっているか否かの判断を行い、判断の結果を出力する。判断ステップにおいて、監視用時刻差分が許容範囲外であると判断された場合に、判断の結果は、スレーブクロックに時刻ずれがあることを示す情報である。実施の形態2のマスタ装置1bが行う時刻同期監視方法の内の、マスタ装置1bと、第1から第Mのスレーブ装置2_1,2_2,…,2_Mの個々との間の処理は、実施の形態1の時刻監視方法と同様である。しかし、実施の形態2の時刻同期監視方法では、マスタ装置1bが生成した第1から第Mのスレーブ装置2_1,2_2,…,2_Mについての監視用差分値の全てを用いて、通信システムの状態を判定している。以下に、これらの判定を行う、マスタ装置1bの同期精度監視部17aの動作を説明する。   In the next determination step, the master device 1b determines the monitoring time differences (T4_1-T3_1) and (T4_2-T3_2) which are the differences between the times T4_1, T4_2,..., T4_M and the times T3_1, T3_2,. ),..., (T4_M-T3_M) are determined within a predetermined allowable range, and the determination result is output. When it is determined in the determination step that the monitoring time difference is outside the allowable range, the determination result is information indicating that the slave clock has a time lag. Of the time synchronization monitoring method performed by the master device 1b of the second embodiment, the processing between the master device 1b and each of the first to Mth slave devices 2_1, 2_2,. This is the same as the time monitoring method 1. However, in the time synchronization monitoring method of the second embodiment, the status of the communication system is determined using all the monitoring difference values for the first to M-th slave devices 2_1, 2_2, ..., 2_M generated by the master device 1b. Is judged. Below, operation | movement of the synchronous precision monitoring part 17a of the master apparatus 1b which performs these determination is demonstrated.

図7は、実施の形態2のマスタ装置1bの同期精度監視部17aの動作を示すフローチャートである。図7に基づいて同期精度監視部17aの動作を説明する。   FIG. 7 is a flowchart illustrating the operation of the synchronization accuracy monitoring unit 17a of the master device 1b according to the second embodiment. The operation of the synchronization accuracy monitoring unit 17a will be described with reference to FIG.

マスタ装置1bの同期精度監視部17aは、スレーブ装置2_mからDelay_Reqメッセージを受信する度に(ステップS21)、Delay_Reqメッセージがスレーブ装置2bから送信された際の時刻T3_mとマスタ装置1bがDelay_Respメッセージを送信した際の時刻T4_mを用いて、スレーブ装置2_mからマスタ装置1bへの方向の伝搬時間である監視用時刻差分(T4_m−T3_m)を算出し(ステップS22及びS23)及びこれを記録する(ステップS24)。   Each time the synchronization accuracy monitoring unit 17a of the master device 1b receives the Delay_Req message from the slave device 2_m (step S21), the master device 1b transmits the Delay_Resp message at time T3_m when the Delay_Req message is transmitted from the slave device 2b. The time difference for monitoring (T4_m−T3_m), which is the propagation time in the direction from the slave device 2_m to the master device 1b, is calculated using the time T4_m at the time (steps S22 and S23) and recorded (step S24). ).

同期精度監視部17aは、監視用時刻差分(T4_m−T3_m)が予め決められた許容範囲内に収まる場合(ステップS25)、スレーブクロックがオフセット値により補正されたと判断し、スレーブ装置2_mにおける時刻同期が完了したと判定する(ステップS26)。同期精度監視部17aは、監視用時刻差分(T4_m−T3_m)が許容範囲内に収まらず変動し続ける場合、スレーブクロックがオフセット値により補正されていないと判断し、スレーブ装置2_mにおける時刻同期が完了していないと判定する(ステップS27)。なお、図8におけるステップS21からS27の処理は、実施の形態1で説明した図5のステップS11からS17の処理と同じである。図8におけるステップS21からS27の処理をM回繰り返した後、同期精度監視部17aの処理は、ステップS28に進む。   When the monitoring time difference (T4_m−T3_m) falls within a predetermined allowable range (step S25), the synchronization accuracy monitoring unit 17a determines that the slave clock is corrected by the offset value, and performs time synchronization in the slave device 2_m. Is determined to be completed (step S26). When the monitoring time difference (T4_m−T3_m) does not fall within the allowable range and continues to fluctuate, the synchronization accuracy monitoring unit 17a determines that the slave clock is not corrected by the offset value, and time synchronization in the slave device 2_m is completed. It determines with not having carried out (step S27). Note that the processing in steps S21 to S27 in FIG. 8 is the same as the processing in steps S11 to S17 in FIG. 5 described in the first embodiment. After the processes from step S21 to S27 in FIG. 8 are repeated M times, the process of the synchronization accuracy monitoring unit 17a proceeds to step S28.

マスタ装置1bは、ステップS28以前のステップにおいて、第1から第Mのスレーブ装置2_1,…,2_MからDelay_Reqメッセージを受信する度に、Delay_Reqメッセージが第1から第Mのスレーブ装置2_1,…,2_Mから送信された際の時刻T3(すなわち、T3_1,…,T3_M)を示す時刻情報とマスタ装置1bが第1から第Mのスレーブ装置2_1,…,2_MからDelay_Reqメッセージを受信した際の時刻T4(すなわち、T4_1,…,T4_M)を示す時刻情報を用いて、第1から第Mのスレーブ装置2_1,…,2_Mからマスタ装置1bへ向かう方向の監視用時刻差分(T4−T3)(すなわち、(T4_1−T3_1)、…、(T4_M−T3_M))を各スレーブ装置2_1,…,2_Mについて算出し記録している。   Each time the master device 1b receives the Delay_Req message from the first to Mth slave devices 2_1,..., 2_M in the steps before step S28, the Delay_Req message is changed from the first to Mth slave devices 2_1,. Time information indicating the time T3 (ie, T3_1,..., T3_M) and the time T4 when the master device 1b receives the Delay_Req message from the first to M-th slave devices 2_1,. That is, using the time information indicating T4_1,..., T4_M), the monitoring time difference (T4-T3) in the direction from the first to M-th slave devices 2_1,. T4_1-T3_1),... (T4_M-T3_M)) for each slave device 2_1, , It is calculated for 2_M record.

ステップS28において、マスタ装置1bの同期精度監視部17aは、記録している各スレーブ装置2_1,…,2_Mにおける複数の監視用時刻差分(T4_1−T3_1)、…、(T4_M−T3_M)の全てが許容範囲内に収まった場合には(ステップS28においてYES)、マスタクロックと各スレーブクロックに時刻ずれがないと判定する。ステップS28において、マスタ装置1bの同期精度監視部17aは、記録している各スレーブ装置2_1,…,2_Mにおける複数の監視用時刻差分(T4_1−T3_1)、…、(T4_M−T3_M)の一部又は全部が許容範囲内に収まらなかった場合には(ステップS28においてNO)、処理は、ステップS30に進み、複数の監視用時刻差分(T4_1−T3_1)、…、(T4_M−T3_M)の全てが、一定範囲内にあり且つ同方向のずれであるかを判定する。ここで、一定範囲の上限は、前記許容範囲の上限よりも低い値である。また、同方向のずれとは、(T4_1−T3_1)、…、(T4_M−T3_M)の全ての符号が同じ符号になる場合を意味する。T4_mはマスタクロックに基づく時刻であり、T3_mはスレーブクロックに基づく時刻であるため、(T4_m−T3_m)は正の値だけでなく、負の値になることがある。   In step S28, the synchronization accuracy monitoring unit 17a of the master device 1b determines that all of the plurality of monitoring time differences (T4_1-T3_1),..., (T4_M-T3_M) recorded in the slave devices 2_1,. If it falls within the allowable range (YES in step S28), it is determined that there is no time difference between the master clock and each slave clock. In step S28, the synchronization accuracy monitoring unit 17a of the master device 1b includes a part of the plurality of monitoring time differences (T4_1-T3_1),..., (T4_M-T3_M) in the recorded slave devices 2_1,. Alternatively, when all of them do not fall within the allowable range (NO in step S28), the process proceeds to step S30, and all of the plurality of monitoring time differences (T4_1-T3_1),..., (T4_M-T3_M) , It is determined whether the displacement is within a certain range and in the same direction. Here, the upper limit of the certain range is a value lower than the upper limit of the allowable range. Further, the shift in the same direction means a case where all the codes of (T4_1-T3_1),..., (T4_M-T3_M) are the same code. Since T4_m is a time based on the master clock and T3_m is a time based on the slave clock, (T4_m−T3_m) may be not only a positive value but also a negative value.

ステップS30において、M個の監視用時刻差分(T4_1−T3_1)、…、(T4_M−T3_M)の全てが、一定範囲内にあり且つ同方向のずれであると判定した場合には(ステップS30においてYES)、マスタクロックずれが発生したと判断する(ステップS31)。一方、ステップS30において、判断がNOの場合、すなわち、「一定範囲内に収まらない監視用時刻差分が1つ以上ある場合」又は「M個の監視用時刻差分の中に正の値と負の値がある場合」には、第1から第Mのスレーブ装置のいずれかに時刻ずれ(ステップS25で用いた許容範囲内の時刻ずれ)が発生したか、又は、他の障害(例えば、いずれかのスレーブ装置に障害が発生、又は、伝送路障害)が発生したと判断する(ステップS32)。なお、本発明の時刻同期監視方法は、図8のフロ−チャートに限定されない。   If it is determined in step S30 that all of the M monitoring time differences (T4_1−T3_1),..., (T4_M−T3_M) are within a certain range and are in the same direction (in step S30) YES), it is determined that a master clock shift has occurred (step S31). On the other hand, if the determination is NO in step S30, that is, “when there is one or more monitoring time differences that do not fall within a certain range” or “a positive value and a negative value among the M monitoring time differences”. If there is a value, a time shift (time shift within the allowable range used in step S25) has occurred in any of the first to M-th slave devices, or another fault (for example, any It is determined that a failure or a transmission path failure has occurred in the slave device (step S32). The time synchronization monitoring method of the present invention is not limited to the flowchart of FIG.

以上に説明したように、実施の形態2の時刻同期監視方法によれば、許容範囲を超える時刻ずれが生じていない場合に、マスタクロックとスレーブクロックの監視(ステップS29)、マスタクロックの監視(ステップS31)、及び、各スレーブ装置と伝送路の障害検出(ステップS32)が可能である。したがって、実施の形態2の時刻同期監視方法によれば、マスタ装置1bの同期精度監視部17aにて、複数台のスレーブ装置2_1,…,2_Mにおける監視用時刻差分を算出し、算出結果を記録し、監視用時刻差分の変動監視を行うことで、シーケンスやハードウェア機能の追加を行わずに、マスタクロックとスレーブクロックの監視及びスレーブ装置と伝送路の障害監視が可能である。   As described above, according to the time synchronization monitoring method of the second embodiment, when there is no time lag exceeding the allowable range, monitoring of the master clock and slave clock (step S29), monitoring of the master clock ( Step S31) and failure detection of each slave device and the transmission path (step S32) are possible. Therefore, according to the time synchronization monitoring method of the second embodiment, the synchronization accuracy monitoring unit 17a of the master device 1b calculates the monitoring time differences in the plurality of slave devices 2_1, ..., 2_M, and records the calculation results. By monitoring the variation in the monitoring time difference, it is possible to monitor the master clock and the slave clock and monitor the failure of the slave device and the transmission path without adding a sequence or a hardware function.

《実施の形態3》
実施の形態1及び2は、マスタ装置の動作クロック周波数とスレーブ装置の動作クロック周波数とが非同期であっても、マスタ装置がスレーブ装置の時刻同期精度を監視可能な方式について説明した。実施の形態3は、図9に示されるように、マスタ装置1cとスレーブ装置2cが同期イーサネット(登録商標)(Sync−E)処理部20及び30を具備し、Sync−E機能にて周波数同期した状態の通信システムに関する。実施の形態3では、マスタ装置1cとスレーブ装置2cがSync−E機能にて動作クロック周波数が同期した状態における、時刻同期監視方法を説明する。
<< Embodiment 3 >>
The first and second embodiments have described the method in which the master device can monitor the time synchronization accuracy of the slave device even when the operation clock frequency of the master device and the operation clock frequency of the slave device are asynchronous. In the third embodiment, as shown in FIG. 9, the master device 1c and the slave device 2c include synchronous Ethernet (registered trademark) (Sync-E) processing units 20 and 30, and the frequency synchronization is performed using the Sync-E function. It is related with the communication system of the state. In the third embodiment, a time synchronization monitoring method in a state where the master device 1c and the slave device 2c are synchronized in the operation clock frequency by the Sync-E function will be described.

図9は、実施の形態3の時刻同期監視方法を実施する通信システムの構成を示すブロック図である。図9において、図3(実施の形態1)に示される構成要素と同一又は対応する構成要素には、図3に示される符号と同じ符号を付す。図9に示されるように、この通信システムは、マスタ装置1cとスレーブ装置2cとで構成される。マスタ装置1cとスレーブ装置2cとは、有線回線3によって接続される。図9に示される実施の形態3のマスタ装置1cは、送受信部11と、送受信部12と、パケット抽出部13と、時刻同期処理部14と、時刻同期用パケット生成部15と、基準時刻取得部16と、同期精度監視部17とに加えて、クロック源18と、周波数分配部19と、Sync−E処理部20とを備える点において、実施の形態1のマスタ装置1aと相違する。また、図9に示される実施の形態3のスレーブ装置2cは、送受信部21と、送受信部22と、パケット抽出部23と、時刻同期処理部24aと、時刻同期用パケット生成部25と、時刻情報処理部26とに加えて、周波数分配部29と、Sync−E処理部30とを備える点において、実施の形態1のスレーブ装置2aと相違する。   FIG. 9 is a block diagram illustrating a configuration of a communication system that implements the time synchronization monitoring method according to the third embodiment. 9, components that are the same as or correspond to the components shown in FIG. 3 (Embodiment 1) are given the same reference numerals as those shown in FIG. As shown in FIG. 9, the communication system includes a master device 1c and a slave device 2c. The master device 1c and the slave device 2c are connected by a wired line 3. The master device 1c of the third embodiment shown in FIG. 9 includes a transmission / reception unit 11, a transmission / reception unit 12, a packet extraction unit 13, a time synchronization processing unit 14, a time synchronization packet generation unit 15, and a reference time acquisition. It differs from the master device 1a of the first embodiment in that it includes a clock source 18, a frequency distribution unit 19, and a Sync-E processing unit 20 in addition to the unit 16 and the synchronization accuracy monitoring unit 17. 9 includes a transmission / reception unit 21, a transmission / reception unit 22, a packet extraction unit 23, a time synchronization processing unit 24a, a time synchronization packet generation unit 25, and a time In addition to the information processing unit 26, the frequency distribution unit 29 and the Sync-E processing unit 30 are different from the slave device 2a of the first embodiment.

図9に示されるSync−E機能と時刻同期処理の関係性を説明する。マスタ装置1cは、クロック源18から得た基準周波数を周波数分配部19で装置内に分配し動作する。マスタ装置1cのSync−E処理部20は、基準周波数の情報を含んだ周波数同期用フレームを、マスタ装置1cからスレーブ装置2cへの方向に送信する。周波数同期用フレームを受信したスレーブ装置2cには、Sync−E処理部30にて基準周波数の情報を抽出し、周波数分配部29がスレーブ装置2c内に分配する。したがって、マスタ装置1cとスレーブ装置2cは、基準周波数にて周波数同期した状態で動作する。マスタ装置1cとスレーブ装置2cは周波数同期しているため、双方における時刻監視用パケットを示す情報の差分は、図1の比較例の場合に比べ小さくなる。   The relationship between the Sync-E function shown in FIG. 9 and time synchronization processing will be described. The master device 1c operates by distributing the reference frequency obtained from the clock source 18 in the device by the frequency distribution unit 19. The Sync-E processing unit 20 of the master device 1c transmits a frequency synchronization frame including information on the reference frequency in the direction from the master device 1c to the slave device 2c. In the slave device 2c that has received the frequency synchronization frame, the Sync-E processing unit 30 extracts the reference frequency information, and the frequency distribution unit 29 distributes the information in the slave device 2c. Therefore, the master device 1c and the slave device 2c operate in a state where the frequency is synchronized with the reference frequency. Since the master device 1c and the slave device 2c are frequency-synchronized, the difference in information indicating the time monitoring packet in both is smaller than in the comparative example of FIG.

図9における同期精度監視部17の動作を説明する。同期精度監視部17は、Delay_Reqメッセージがスレーブ装置2cから送信された際の時刻T3を示す情報とマスタ装置1cがDelay_Respメッセージを送信した際の時刻T4を示す情報を用いて、スレーブ装置2cからマスタ装置1cへの方向の伝搬時間である監視用時刻差分(T4−T3)を算出及び記録する。同期精度監視部17は、監視用時刻差分が予め決められた許容範囲内に収束した場合、スレーブクロックがオフセット値により補正されたと判断し、スレーブ装置2cにおける時刻同期が完了したと判定する。監視用時刻差分(T4−T3)が収束せず変動し続ける場合、スレーブクロックがオフセット値により補正されていないと判断し、スレーブ装置2cにおける時刻同期が完了していないと判定する。実施の形態3においては、Sync−E機能によってマスタ装置1cとスレーブ装置2cは、周波数同期しており、双方における時刻監視用パケットの時刻ずれは小さくなるため、同期精度監視部17にて監視する監視用時刻差分はより狭い範囲に収束する。したがって、Sync−E機能にて装置間を周波数同期させ、本発明による同期精度の監視を行うことで、実施の形態1及び2に比べ時刻同期精度の監視はより高精度となる。   The operation of the synchronization accuracy monitoring unit 17 in FIG. 9 will be described. The synchronization accuracy monitoring unit 17 uses the information indicating the time T3 when the Delay_Req message is transmitted from the slave device 2c and the information indicating the time T4 when the master device 1c transmits the Delay_Resp message, from the slave device 2c to the master. The monitoring time difference (T4-T3), which is the propagation time in the direction to the device 1c, is calculated and recorded. When the monitoring time difference converges within a predetermined allowable range, the synchronization accuracy monitoring unit 17 determines that the slave clock has been corrected by the offset value, and determines that the time synchronization in the slave device 2c has been completed. When the monitoring time difference (T4-T3) continues to fluctuate without converging, it is determined that the slave clock is not corrected by the offset value, and it is determined that the time synchronization in the slave device 2c is not completed. In the third embodiment, the master device 1c and the slave device 2c are frequency-synchronized by the Sync-E function, and the time difference between the time monitoring packets in both is reduced. The monitoring time difference converges to a narrower range. Therefore, by synchronizing the frequency between the devices using the Sync-E function and monitoring the synchronization accuracy according to the present invention, the time synchronization accuracy can be monitored more accurately than in the first and second embodiments.

《変形例》
図10は、上記実施の形態1から3のマスタ装置の構成を示すハードウェア構成図である。図10に示されるマスタ装置は、ソフトウェアとしてのプログラムを格納する記憶装置としてのメモリ91と、メモリ91に格納されたプログラムを実行する情報処理部としてのプロセッサ92とを有する。図10に示されるマスタ装置は、実施の形態1から3の子局装置の構造の具体例を示している。図10に示される装置の動作は、実施の形態1から3のマスタ装置の動作と同じである。
<Modification>
FIG. 10 is a hardware configuration diagram showing the configuration of the master device according to the first to third embodiments. The master device shown in FIG. 10 includes a memory 91 as a storage device that stores a program as software, and a processor 92 as an information processing unit that executes the program stored in the memory 91. The master device shown in FIG. 10 shows a specific example of the structure of the slave station device according to the first to third embodiments. The operation of the apparatus shown in FIG. 10 is the same as that of the master apparatus according to the first to third embodiments.

図10に示される装置が、実施の形態1から3のマスタ装置における処理を実現する場合には、図10に示されるマスタ装置の各構成は、プロセッサ92がメモリ91に記憶されたプログラムを実行することにより、実現される。なお、マスタ装置の各構成を実現するために、プロセッサ92とメモリ91と用いる場合を例示したが、マスタ装置の各構成の一部をプロセッサ92とメモリ91で実現し、他の部分をハードウェア回路で実現してもよい。図10に示されるマスタ装置によって、実施の形態1から3で説明した時刻同期監視方法を実現することができる。   When the apparatus shown in FIG. 10 realizes the processing in the master apparatus according to the first to third embodiments, each configuration of the master apparatus shown in FIG. 10 causes the processor 92 to execute a program stored in the memory 91. This is realized. In addition, in order to implement | achieve each structure of a master apparatus, the case where it used with the processor 92 and the memory 91 was illustrated, However, A part of each structure of a master apparatus is implement | achieved by the processor 92 and the memory 91, and another part is hardware It may be realized by a circuit. The time synchronization monitoring method described in the first to third embodiments can be realized by the master device shown in FIG.

1a,1b,1c マスタ装置(主装置)、 2a,2_1,2_2,…,2_M,2c スレーブ装置(従装置)、 3 有線回線、 11,12,21,22 送受信部、 13,23 パケット抽出部、 14,24 時刻同期処理部、 15,25 時刻同期用パケット生成部、 16 基準時刻取得部、 17,17a 同期精度監視部、 18 クロック源、 19 周波数分配部、 20 Sync−E処理部、 26 時刻情報処理部、 29 周波数分配部、 30 Sync−E処理部、 41 スイッチングハブ。   1a, 1b, 1c Master device (main device), 2a, 2_1, 2_2, ..., 2_M, 2c Slave device (slave device), 3 Wired line, 11, 12, 21, 22 Transceiver, 13, 23 Packet extractor 14, 24 Time synchronization processing unit, 15, 25 Time synchronization packet generation unit, 16 Reference time acquisition unit, 17, 17a Synchronization accuracy monitoring unit, 18 Clock source, 19 Frequency distribution unit, 20 Sync-E processing unit, 26 Time information processing unit, 29 frequency distribution unit, 30 Sync-E processing unit, 41 switching hub.

Claims (12)

マスタ装置のマスタクロックとスレーブ装置のスレーブクロックとの間の同期を監視する時刻同期監視方法であって、
前記マスタ装置が、前記マスタクロックに基づく第1時刻に第1メッセージを送信し、前記スレーブ装置が、前記スレーブクロックに基づく第2時刻に前記第1メッセージを受信する第1メッセージ送受信ステップと、
前記マスタ装置が、前記第1時刻を示す情報を含む第2メッセージを送信し、前記スレーブ装置が、前記第2メッセージを受信する第2メッセージ送受信ステップと、
前記スレーブ装置が、前記スレーブクロックに基づく第3時刻に、前記第3時刻を示す情報を含む第3メッセージを送信し、前記マスタ装置が、前記第3メッセージを受信する要求メッセージ送受信ステップと、
前記マスタ装置が、前記マスタクロックに基づく時刻であって前記第3メッセージを受信した際の時刻である第4時刻を示す情報を含む、第4メッセージを送信し、前記スレーブ装置が、前記第4メッセージを受信する応答メッセージ送受信ステップと、
前記マスタ装置が、前記第4時刻と前記第3時刻との間の差分である監視用時刻差分が予め決められた許容範囲内であるか否かの判断を行い、前記判断の結果を出力する判断ステップと
を有することを特徴とする時刻同期監視方法。
A time synchronization monitoring method for monitoring synchronization between a master clock of a master device and a slave clock of a slave device,
A first message transmission / reception step in which the master device transmits a first message at a first time based on the master clock, and the slave device receives the first message at a second time based on the slave clock;
A second message transmitting / receiving step in which the master device transmits a second message including information indicating the first time, and the slave device receives the second message;
A request message transmission / reception step in which the slave device transmits a third message including information indicating the third time at a third time based on the slave clock, and the master device receives the third message;
The master device transmits a fourth message including information indicating a fourth time that is a time based on the master clock and is a time when the third message is received, and the slave device transmits the fourth message A response message sending and receiving step for receiving a message;
The master device determines whether or not a monitoring time difference that is a difference between the fourth time and the third time is within a predetermined allowable range, and outputs the result of the determination A time synchronization monitoring method comprising: a determination step.
前記判断ステップにおいて前記監視用時刻差分が前記許容範囲外であると判断された場合に、前記判断の結果は、前記スレーブクロックに時刻ずれがあることを示す情報である
ことを特徴とする請求項1に記載の時刻同期監視方法。
The determination result is information indicating that there is a time lag in the slave clock when the time difference for monitoring is determined to be outside the allowable range in the determination step. The time synchronization monitoring method according to 1.
前記スレーブ装置が、前記第1時刻、前記第2時刻、前記第3時刻、及び前記第4時刻に基づいて、前記スレーブクロックを補正する時刻補正ステップをさらに有することを特徴とする請求項1又は2に記載の時刻同期監視方法。   The slave device further includes a time correction step of correcting the slave clock based on the first time, the second time, the third time, and the fourth time. 2. The time synchronization monitoring method according to 2. 前記第1メッセージ送受信ステップの前に、前記マスタ装置が、前記マスタ装置の動作クロック周波数を示す第1の動作クロック周波数情報を前記スレーブ装置に送信し、前記スレーブ装置が、前記スレーブ装置の動作クロック周波数を、前記マスタ装置の動作クロック周波数に一致させるステップをさらに有することを特徴とする請求項1から3のいずれか1項に記載の時刻同期監視方法。   Before the first message transmission / reception step, the master device transmits first operation clock frequency information indicating the operation clock frequency of the master device to the slave device, and the slave device operates the operation clock of the slave device. 4. The time synchronization monitoring method according to claim 1, further comprising a step of matching a frequency with an operation clock frequency of the master device. 5. マスタ装置のマスタクロックと第1から第M(Mは2以上の整数)のスレーブ装置の第1から第Mのスレーブクロックとの間の同期を監視する時刻同期監視方法であって、前記マスタクロックと第m(mは1以上M以下の整数)のスレーブ装置の第mのスレーブクロックとの間の同期の監視のために実行される時刻同期監視処理は、
前記マスタ装置が、前記マスタクロックに基づく第1時刻に第1メッセージを送信し、前記第mのスレーブ装置が、前記第mのスレーブクロックに基づく第2時刻に前記第1メッセージを受信する第1メッセージ送受信ステップと、
前記マスタ装置が、前記第1時刻を示す情報を含む第2メッセージを送信し、前記第mのスレーブ装置が、前記第2メッセージを受信する第2メッセージ送受信ステップと、
前記第mのスレーブ装置が、前記第mのスレーブクロックに基づく第3時刻に、前記第3時刻を示す情報を含む第3メッセージを送信し、前記マスタ装置が、前記第3メッセージを受信する要求メッセージ送受信ステップと、
前記マスタ装置が、前記マスタクロックに基づく時刻であって前記第3メッセージを受信した際の時刻である第4時刻を示す情報を含む、第4メッセージを送信し、前記第mのスレーブ装置が、前記第4メッセージを受信する応答メッセージ送受信ステップと、
前記マスタ装置が、前記第4時刻と前記第3時刻との間の差分である監視用時刻差分が予め決められた許容範囲内であるか否かの判断を行い、前記判断の結果を出力する判断ステップと
を有することを特徴とする時刻同期監視方法。
A time synchronization monitoring method for monitoring synchronization between a master clock of a master device and first to Mth slave clocks of first to Mth (M is an integer of 2 or more) slave devices, the master clock And the time synchronization monitoring process executed for monitoring the synchronization between the slave device and the m-th slave clock of the m-th (m is an integer of 1 to M) slave device,
The master device transmits a first message at a first time based on the master clock, and the m-th slave device receives the first message at a second time based on the m-th slave clock. A message sending and receiving step;
A second message transmitting / receiving step in which the master device transmits a second message including information indicating the first time, and the m-th slave device receives the second message;
The m-th slave device transmits a third message including information indicating the third time at a third time based on the m-th slave clock, and the master device receives the third message. A message sending and receiving step;
The master device transmits a fourth message including information indicating a fourth time that is a time based on the master clock and is a time when the third message is received, and the m-th slave device includes: A response message transmission / reception step for receiving the fourth message;
The master device determines whether or not a monitoring time difference that is a difference between the fourth time and the third time is within a predetermined allowable range, and outputs the result of the determination A time synchronization monitoring method comprising: a determination step.
前記判断ステップにおいて、前記第1から第Mのスレーブ装置の全てについて、前記監視用時刻差分が前記許容範囲内であると判断された場合に、前記判断の結果は、前記マスタクロック及び前記第1から第Mのスレーブクロックのいずれにも時刻ずれがないことを示す情報である
ことを特徴とする請求項5に記載の時刻同期監視方法。
In the determination step, when it is determined that the monitoring time difference is within the allowable range for all of the first to M-th slave devices, the determination result is the master clock and the first clock. The time synchronization monitoring method according to claim 5, wherein the time synchronization monitoring method is information indicating that there is no time lag in any of the first to Mth slave clocks.
前記第1から第Mのスレーブ装置の全てについて、前記判断ステップにおいて、前記監視用時刻差分が予め決められた範囲内であり、且つ、前記第1から第Mのスレーブ装置の全てについて、前記監視用時刻差分の符号が同じである場合に、前記判断の結果は、前記マスタクロックに時刻ずれがあることを示す情報である
ことを特徴とする請求項5又は6に記載の時刻同期監視方法。
For all of the first to Mth slave devices, in the determination step, the monitoring time difference is within a predetermined range, and for all of the first to Mth slave devices, the monitoring is performed. The time synchronization monitoring method according to claim 5 or 6, wherein, when the codes of the time differences for use are the same, the result of the determination is information indicating that there is a time lag in the master clock.
前記マスタクロックと第m(mは1以上M以下の整数)のスレーブ装置の第mのスレーブクロックとの間の同期の監視のために実行される時刻同期監視処理は、前記第1メッセージ送受信ステップの前に、前記マスタ装置が、前記マスタ装置の動作クロック周波数を示す第1の動作クロック周波数情報を前記第mのスレーブ装置に送信し、前記第mのスレーブ装置が、前記第mのスレーブ装置の動作クロック周波数を、前記マスタ装置の動作クロック周波数に一致させるステップをさらに有することを特徴とする請求項5から7のいずれか1項に記載の時刻同期監視方法。   The time synchronization monitoring process executed for monitoring the synchronization between the master clock and the m-th slave clock of the m-th (m is an integer from 1 to M) slave device includes the first message transmission / reception step. Before the master device transmits first operation clock frequency information indicating an operation clock frequency of the master device to the m-th slave device, and the m-th slave device transmits the m-th slave device. The time synchronization monitoring method according to claim 5, further comprising a step of causing the operation clock frequency of the master device to coincide with the operation clock frequency of the master device. マスタ装置と、
前記マスタ装置と通信するスレーブ装置と
を有し、
前記マスタ装置のマスタクロックと前記スレーブ装置のスレーブクロックとの間の同期を監視する通信システムであって、
前記マスタ装置が、前記マスタクロックに基づく第1時刻に第1メッセージを送信し、前記スレーブ装置が、前記スレーブクロックに基づく第2時刻に前記第1メッセージを受信し、
前記マスタ装置が、前記第1時刻を示す情報を含む第2メッセージを送信し、前記スレーブ装置が、前記第2メッセージを受信し、
前記スレーブ装置が、前記スレーブクロックに基づく第3時刻に、前記第3時刻を示す情報を含む第3メッセージを送信し、前記マスタ装置が、前記第3メッセージを受信し、
前記マスタ装置が、前記マスタクロックに基づく時刻であって前記第3メッセージを受信した際の時刻である第4時刻を示す情報を含む、第4メッセージを送信し、前記スレーブ装置が、前記第4メッセージを受信し、
前記マスタ装置が、前記第4時刻と前記第3時刻との間の差分である監視用時刻差分が予め決められた許容範囲内であるか否かの判断を行い、前記判断の結果を出力する
ことを特徴とする通信システム。
A master device;
A slave device communicating with the master device,
A communication system for monitoring synchronization between a master clock of the master device and a slave clock of the slave device,
The master device transmits a first message at a first time based on the master clock, and the slave device receives the first message at a second time based on the slave clock;
The master device transmits a second message including information indicating the first time, the slave device receives the second message,
The slave device transmits a third message including information indicating the third time at a third time based on the slave clock, and the master device receives the third message,
The master device transmits a fourth message including information indicating a fourth time that is a time based on the master clock and is a time when the third message is received, and the slave device transmits the fourth message Receive the message,
The master device determines whether or not a monitoring time difference that is a difference between the fourth time and the third time is within a predetermined allowable range, and outputs the result of the determination A communication system characterized by the above.
マスタ装置と、
前記マスタ装置と通信する第1から第M(Mは2以上の整数)のスレーブ装置と
を有し、
前記マスタ装置のマスタクロックと前記第1から第Mのスレーブ装置のスレーブクロックとの間の同期を監視する通信システムであって、
前記マスタクロックと第m(mは1以上M以下の整数)のスレーブ装置の第mのスレーブクロックとの間の同期の監視のために実行される時刻同期監視処理において、
前記マスタ装置が、前記マスタクロックに基づく第1時刻に第1メッセージを送信し、前記第mのスレーブ装置が、前記第mのスレーブクロックに基づく第2時刻に前記第1メッセージを受信し、
前記マスタ装置が、前記第1時刻を示す情報を含む第2メッセージを送信し、前記第mのスレーブ装置が、前記第2メッセージを受信し、
前記第mのスレーブ装置が、前記第mのスレーブクロックに基づく第3時刻に、前記第3時刻を示す情報を含む第3メッセージを送信し、前記マスタ装置が、前記第3メッセージを受信し、
前記マスタ装置が、前記マスタクロックに基づく時刻であって前記第3メッセージを受信した際の時刻である第4時刻を示す情報を含む、第4メッセージを送信し、前記第mのスレーブ装置が、前記第4メッセージを受信し、
前記マスタ装置が、前記第4時刻と前記第3時刻との間の差分である監視用時刻差分が予め決められた許容範囲内であるか否かの判断を行い、前記判断の結果を出力する
ことを特徴とする通信システム。
A master device;
First to Mth (M is an integer of 2 or more) slave devices communicating with the master device,
A communication system for monitoring synchronization between a master clock of the master device and slave clocks of the first to M-th slave devices,
In a time synchronization monitoring process executed for monitoring synchronization between the master clock and the m-th slave clock of the m-th (m is an integer of 1 to M) slave device,
The master device transmits a first message at a first time based on the master clock, and the m-th slave device receives the first message at a second time based on the m-th slave clock;
The master device transmits a second message including information indicating the first time; the m-th slave device receives the second message;
The mth slave device transmits a third message including information indicating the third time at a third time based on the mth slave clock, and the master device receives the third message,
The master device transmits a fourth message including information indicating a fourth time that is a time based on the master clock and is a time when the third message is received, and the m-th slave device includes: Receiving the fourth message;
The master device determines whether or not a monitoring time difference that is a difference between the fourth time and the third time is within a predetermined allowable range, and outputs the result of the determination A communication system characterized by the above.
スレーブ装置と通信を行うマスタ装置であって、
送受信部と、
マスタクロックを出力する基準時刻取得部と、
時刻同期用パケットを生成する時刻同期用パケット生成部と、
前記スレーブ装置から送信された信号から時刻同期用パケットを抽出するパケット抽出部と、
前記マスタクロックと前記スレーブ装置のスレーブクロックとの間の同期精度を監視する同期精度監視部と、
を有し、
前記マスタ装置が、前記マスタクロックに基づく第1時刻に第1メッセージを送信し、前記スレーブ装置が、前記スレーブクロックに基づく第2時刻に前記第1メッセージを受信し、
前記マスタ装置が、前記第1時刻を示す情報を含む第2メッセージを送信し、前記スレーブ装置が、前記第2メッセージを受信し、
前記スレーブ装置が、前記スレーブクロックに基づく第3時刻に、前記第3時刻を示す情報を含む第3メッセージを送信し、前記マスタ装置が、前記第3メッセージを受信し、
前記マスタ装置が、前記マスタクロックに基づく時刻であって前記第3メッセージを受信した際の時刻である第4時刻を示す情報を含む、第4メッセージを送信し、前記スレーブ装置が、前記第4メッセージを受信し、
前記マスタ装置が、前記第4時刻と前記第3時刻との間の差分である監視用時刻差分が予め決められた許容範囲内であるか否かの判断を行い、前記判断の結果を出力する
ことを特徴とするマスタ装置。
A master device that communicates with a slave device,
A transceiver unit;
A reference time acquisition unit for outputting a master clock;
A time synchronization packet generator for generating a time synchronization packet;
A packet extraction unit for extracting a time synchronization packet from a signal transmitted from the slave device;
A synchronization accuracy monitoring unit that monitors the synchronization accuracy between the master clock and the slave clock of the slave device;
Have
The master device transmits a first message at a first time based on the master clock, and the slave device receives the first message at a second time based on the slave clock;
The master device transmits a second message including information indicating the first time, the slave device receives the second message,
The slave device transmits a third message including information indicating the third time at a third time based on the slave clock, and the master device receives the third message,
The master device transmits a fourth message including information indicating a fourth time that is a time based on the master clock and is a time when the third message is received, and the slave device transmits the fourth message Receive the message,
The master device determines whether or not a monitoring time difference that is a difference between the fourth time and the third time is within a predetermined allowable range, and outputs the result of the determination A master device characterized by that.
第1から第M(Mは2以上の整数)のスレーブ装置と通信を行うマスタ装置であって、
送受信部と、
マスタクロックを出力する基準時刻取得部と、
時刻同期用パケットを生成する時刻同期用パケット生成部と、
前記第1から第Mのスレーブ装置から送信された信号から時刻同期用パケットを抽出するパケット抽出部と、
前記マスタクロックと前記第1から第Mのスレーブ装置のスレーブクロックとの間の同期精度を監視する同期精度監視部と、
を有し、
前記マスタクロックと第m(mは1以上M以下の整数)のスレーブ装置の第mのスレーブクロックとの間の同期の監視のために実行される時刻同期監視処理において、
前記マスタ装置が、前記マスタクロックに基づく第1時刻に第1メッセージを送信し、前記第mのスレーブ装置が、前記第mのスレーブクロックに基づく第2時刻に前記第1メッセージを受信し、
前記マスタ装置が、前記第1時刻を示す情報を含む第2メッセージを送信し、前記第mのスレーブ装置が、前記第2メッセージを受信し、
前記第mのスレーブ装置が、前記第mのスレーブクロックに基づく第3時刻に、前記第3時刻を示す情報を含む第3メッセージを送信し、前記マスタ装置が、前記第3メッセージを受信し、
前記マスタ装置が、前記マスタクロックに基づく時刻であって前記第3メッセージを受信した際の時刻である第4時刻を示す情報を含む、第4メッセージを送信し、前記第mのスレーブ装置が、前記第4メッセージを受信し、
前記マスタ装置が、前記第4時刻と前記第3時刻との間の差分である監視用時刻差分が予め決められた許容範囲内であるか否かの判断を行い、前記判断の結果を出力する
ことを特徴とするマスタ装置。
A master device that communicates with first to Mth slave devices (M is an integer of 2 or more),
A transceiver unit;
A reference time acquisition unit for outputting a master clock;
A time synchronization packet generator for generating a time synchronization packet;
A packet extraction unit for extracting a time synchronization packet from a signal transmitted from the first to M-th slave devices;
A synchronization accuracy monitoring unit that monitors the synchronization accuracy between the master clock and the slave clocks of the first to M-th slave devices;
Have
In a time synchronization monitoring process executed for monitoring synchronization between the master clock and the m-th slave clock of the m-th (m is an integer of 1 to M) slave device,
The master device transmits a first message at a first time based on the master clock, and the m-th slave device receives the first message at a second time based on the m-th slave clock;
The master device transmits a second message including information indicating the first time; the m-th slave device receives the second message;
The mth slave device transmits a third message including information indicating the third time at a third time based on the mth slave clock, and the master device receives the third message,
The master device transmits a fourth message including information indicating a fourth time that is a time based on the master clock and is a time when the third message is received, and the m-th slave device includes: Receiving the fourth message;
The master device determines whether or not a monitoring time difference that is a difference between the fourth time and the third time is within a predetermined allowable range, and outputs the result of the determination A master device characterized by that.
JP2014254641A 2014-12-17 2014-12-17 Time synchronization monitoring method, communication system, and master device Active JP6452427B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014254641A JP6452427B2 (en) 2014-12-17 2014-12-17 Time synchronization monitoring method, communication system, and master device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014254641A JP6452427B2 (en) 2014-12-17 2014-12-17 Time synchronization monitoring method, communication system, and master device

Publications (2)

Publication Number Publication Date
JP2016116143A JP2016116143A (en) 2016-06-23
JP6452427B2 true JP6452427B2 (en) 2019-01-16

Family

ID=56142371

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014254641A Active JP6452427B2 (en) 2014-12-17 2014-12-17 Time synchronization monitoring method, communication system, and master device

Country Status (1)

Country Link
JP (1) JP6452427B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101831165B1 (en) * 2016-06-29 2018-04-04 (주)컨텍 Device for monitoring and analyzing time synchronization state between ntp sever and ntp client
JP2018098711A (en) * 2016-12-15 2018-06-21 日本電信電話株式会社 Time synchronization system, client terminal device, time synchronization method, and time synchronization program
JP6984482B2 (en) 2018-02-22 2021-12-22 オムロン株式会社 Communication systems, communication devices and communication methods
JP2021192470A (en) * 2018-09-07 2021-12-16 ソニーグループ株式会社 Content distribution system and content distribution method, and program
DE112019004576T5 (en) * 2018-09-13 2021-07-01 Sony Semiconductor Solutions Corporation Communication device and communication system
JP6612006B1 (en) * 2019-03-18 2019-11-27 三菱電機株式会社 Time synchronization apparatus, communication system, time synchronization method, and time synchronization program
JP7116706B2 (en) * 2019-05-09 2022-08-10 株式会社日立製作所 Communication control device and communication control method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013175852A (en) * 2012-02-24 2013-09-05 Nec Saitama Ltd Time synchronization system, master unit, slave unit, time synchronization method and time synchronization program
JP6045163B2 (en) * 2012-03-23 2016-12-14 三菱電機株式会社 Communication system and time information utilization method

Also Published As

Publication number Publication date
JP2016116143A (en) 2016-06-23

Similar Documents

Publication Publication Date Title
JP6452427B2 (en) Time synchronization monitoring method, communication system, and master device
US9548831B2 (en) Synchronizing system, synchronizing method, first synchronizing device, second synchronizing device, and computer program
JP6192995B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMPUTER PROGRAM
WO2016004644A1 (en) Method and apparatus for monitoring ethernet clock synchronization
US20140241381A1 (en) Time control device, time control method, and program
CN105577348B (en) Frequency deviation monitoring method and device based on time synchronization network
JP6058713B2 (en) Time synchronization method and time synchronization apparatus
JP2013017104A (en) Communication system
JP2013083451A (en) Time control device, time control method, and program
JPWO2011077558A1 (en) Communication device and time synchronization system
JP5675703B2 (en) Communication device, control device, and program
JP5650072B2 (en) Frequency / time synchronization method and frequency / time synchronization apparatus
JP6254028B2 (en) Slave node and time synchronization method
JP5298592B2 (en) Time stamp packet communication system, time stamp packet transmitter, time stamp packet receiver
JP2012114815A (en) Phase synchronization device and phase synchronization method
JP5391964B2 (en) Clock synchronization method and packet communication system
JP2015004649A (en) Slave device, master/slave system and time synchronization method
JP2003179662A5 (en)
JP2014032055A (en) Communication system
WO2013069176A1 (en) Transmitter, transmission method, and non-temporary computer-readable medium in which program is stored
KR20150027606A (en) Apparatus and method for coverting data rate
JP5225473B2 (en) Communication apparatus and communication system
JP2015117941A (en) Communication system and time synchronization method
JP6274918B2 (en) Communications system
JP6310758B2 (en) Time synchronization apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171005

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181211

R150 Certificate of patent or registration of utility model

Ref document number: 6452427

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250