JP7506784B1 - Time distribution device, synchronization system, and program - Google Patents
Time distribution device, synchronization system, and program Download PDFInfo
- Publication number
- JP7506784B1 JP7506784B1 JP2023038086A JP2023038086A JP7506784B1 JP 7506784 B1 JP7506784 B1 JP 7506784B1 JP 2023038086 A JP2023038086 A JP 2023038086A JP 2023038086 A JP2023038086 A JP 2023038086A JP 7506784 B1 JP7506784 B1 JP 7506784B1
- Authority
- JP
- Japan
- Prior art keywords
- time
- clock
- time distribution
- distribution device
- wired communication
- 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
Links
- 238000004891 communication Methods 0.000 claims abstract description 65
- 238000012937 correction Methods 0.000 claims abstract description 65
- 238000005259 measurement Methods 0.000 claims abstract description 15
- 230000001360 synchronised effect Effects 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 description 21
- 238000001514 detection method Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 7
- 230000004044 response Effects 0.000 description 7
- 238000000034 method Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 208000033748 Device issues Diseases 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000007257 malfunction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000010363 phase shift Effects 0.000 description 1
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
【課題】時刻配信装置を複数台備える冗長構成において、装置間での時刻差が生じないように装置時計を調整する。【解決手段】時刻配信装置は、他の時刻配信装置から有線通信を介して入力される位相信号に、他の時刻配信装置の時計の所定の周期で含まれる同期タイミングで、周波数信号発生器が発生する特定の周波数の信号に基づく自装置の時計から、時刻を取得し、取得した時刻が、同期タイミングについて予め定められた時刻となるように、自装置の時計を補正する第1時計補正部と、第1時計補正部により補正した自装置の時計と、有線通信とは異なる通信を介して得られる他の時刻配信装置の時計との時刻差を測定する時差測定部と、測定された時刻差と、所定の周期に基づいて、所定の周期を単位としたずれに対応する時刻差だけ、自装置の時計を補正する第2時計補正部と、自装置の時計で得られる時刻を、外部に配信する時刻配信部と、を含む。【選択図】図2[Problem] In a redundant configuration having multiple time distribution devices, the device clocks are adjusted so that no time difference occurs between the devices. [Solution] A time distribution device includes a first clock correction unit that acquires time from its own clock based on a signal of a specific frequency generated by a frequency signal generator at a synchronization timing included in a phase signal input from another time distribution device via wired communication at a predetermined period of the clock of the other time distribution device, and corrects its own clock so that the acquired time becomes a predetermined time for the synchronization timing, a time difference measurement unit that measures the time difference between the clock of its own device corrected by the first clock correction unit and the clock of the other time distribution device obtained via communication other than wired communication, a second clock correction unit that corrects its own clock by a time difference corresponding to the deviation in units of the predetermined period based on the measured time difference and the predetermined period, and a time distribution unit that distributes the time obtained by the clock of its own device to an external device. [Selected Figure] Figure 2
Description
本発明は、時刻配信装置、同期システム、及びプログラムに係り、特に、時刻を配信する時刻配信装置、同期システム、及びプログラムに関する。 The present invention relates to a time distribution device, a synchronization system, and a program, and in particular to a time distribution device, a synchronization system, and a program for distributing time.
PTP(Precision Time Protocol) GrandMaster(GM)のような時刻を配信する機器は、冗長化のためにシステム内に複数設置するのが通常であり、一般的には各GMでGNSS(Global Navigation Satellite System)に同期する(GNSSから時刻、位相、周波数を得る)ことで、GM間の時刻差はGNSS同期精度以内に抑え、装置間における高精度な時刻同期を実現している。 Time-distributing devices such as PTP (Precision Time Protocol) GrandMasters (GMs) are typically installed in multiple locations within a system for redundancy purposes, and each GM typically synchronizes with the Global Navigation Satellite System (GNSS) (obtaining time, phase, and frequency from the GNSS), thereby limiting the time difference between GMs to within the GNSS synchronization accuracy and achieving highly accurate time synchronization between devices.
また、特許文献1では、複数のマスタノードと、ローカルマスタクロックと時刻同期することによって、ローカルスレーブクロックに対する補正を実行するように構成されたスレーブノードとを備え、第1のマスタノードは、所定の周期で、ソースクロックノードからのタイミング同期信号と同期することによって、第1のローカルマスタクロックに対する補正を実行し、ソースクロックを基準に、第2のローカルマスタクロックが、第1のローカルマスタクロックよりも誤差が大きい場合、第2のマスタノードは、第1のローカルマスタクロックと時刻同期することによって第1の補正を実行し、第1のローカルマスタクロックを基準に、第2のローカルマスタクロックの誤差が所定の範囲内にあることを条件に、ソースクロックノードからのタイミング同期信号と同期することによって第2の補正を実行する時刻同期システムが知られている。 Patent Document 1 discloses a time synchronization system that includes multiple master nodes and slave nodes configured to execute corrections to a local slave clock by time synchronizing with a local master clock, where the first master node executes corrections to the first local master clock by synchronizing with a timing synchronization signal from a source clock node at a predetermined cycle, and when the second local master clock has a larger error than the first local master clock based on the source clock, the second master node executes the first correction by time synchronizing with the first local master clock, and executes the second correction by synchronizing with a timing synchronization signal from the source clock node, provided that the error of the second local master clock based on the first local master clock is within a predetermined range.
時刻同期には、時刻、位相、周波数の3つの同期要素を装置間で合わせる必要があるが、GNSSが使用できず共通の同期要素が周波数のみの環境下においては、NTP(Network Time Protocol)などの時刻同期プロトコルを使用しても、ナノ秒単位の高精度な時刻同期は不可能である。 Time synchronization requires that three synchronization elements - time, phase, and frequency - be coordinated between devices. However, in an environment where GNSS cannot be used and the only common synchronization element is frequency, high-precision time synchronization to the nanosecond level is not possible even if a time synchronization protocol such as NTP (Network Time Protocol) is used.
高精度な時刻同期が出来てないと、GMが切り替わったときに配信する時刻差が生じて、GMから時刻を受信している装置の制御に大きな影響を与えてしまう。また、GMから受信した時刻を基に位相信号を出力している場合などは、位相が急にシフトする事象が発生してしまう。 If high-precision time synchronization is not possible, a difference in the time delivered when the GM is switched will occur, which will have a significant impact on the control of the device receiving the time from the GM. Also, if a phase signal is output based on the time received from the GM, a sudden phase shift will occur.
本発明は、上記問題点を解決するために成されたものであり、時刻配信装置を複数台備える冗長構成において、装置間で時刻差が生じないように装置時計を調整することができ、複数の装置間で同じ時刻を配信することができる時刻配信装置、同期システム、及びプログラムを提供することを目的とする。 The present invention has been made to solve the above problems, and aims to provide a time distribution device, synchronization system, and program that can adjust device clocks so that no time difference occurs between devices in a redundant configuration with multiple time distribution devices, and can distribute the same time between multiple devices.
上記目的を達成するために、本発明に係る時刻配信装置は、他の時刻配信装置から有線通信を介して入力される位相信号に所定の周期で含まれる同期タイミングで、自装置の時計から時刻を取得し、前記取得した時刻が、前記同期タイミングについて予め定められた時刻となるように、自装置の時計を補正する第1時計補正部と、前記第1時計補正部により補正した自装置の時計と、前記有線通信とは異なる通信を介して得られる前記他の時刻配信装置の時計との時刻差を測定する時差測定部と、前記測定された時刻差と、前記所定の周期とに基づいて、前記所定の周期を単位としたずれに対応する時刻差だけ、自装置の時計を補正する第2時計補正部と、自装置の時計で得られる時刻を、外部に配信する時刻配信部と、を含んで構成されている。 To achieve the above object, the time distribution device of the present invention includes a first clock correction unit that acquires time from its own clock at a synchronization timing included at a predetermined period in a phase signal input from another time distribution device via wired communication and corrects the clock of its own device so that the acquired time becomes a predetermined time for the synchronization timing; a time difference measurement unit that measures the time difference between the clock of its own device corrected by the first clock correction unit and the clock of the other time distribution device obtained via communication other than the wired communication; a second clock correction unit that corrects the clock of its own device by a time difference corresponding to the deviation in units of the predetermined period based on the measured time difference and the predetermined period; and a time distribution unit that distributes the time obtained by the clock of its own device to an external device.
ここで、位相信号に含まれる同期タイミングは、所定の周期であり、その時刻が予め定められている。 Here, the synchronization timing included in the phase signal has a predetermined period, and the time is determined in advance.
この発明によれば、複数の時刻配信装置のそれぞれで、有線通信を介して入力される位相信号に含まれる同期タイミングを用いて自装置の時計を補正した場合に、複数の時刻配信装置間のずれが、同期タイミングの周期を単位としたずれに対応することを利用して、所定の周期を単位としたずれに対応する時刻差だけ、自装置の時計を補正する。これにより、時刻配信装置を複数台備える冗長構成において、装置間で時刻差が生じないように装置時計を調整することができ、複数の装置間で同じ時刻を配信することができる。 According to this invention, when each of the multiple time distribution devices corrects its own clock using the synchronization timing included in the phase signal input via wired communication, the deviation between the multiple time distribution devices corresponds to a deviation in units of the synchronization timing period, and the clock of the device is corrected by the time difference corresponding to the deviation in units of a predetermined period. As a result, in a redundant configuration with multiple time distribution devices, the device clocks can be adjusted so that no time difference occurs between the devices, and the same time can be distributed between the multiple devices.
また、時刻配信装置において、周波数信号発生器が発生する特定の周波数の信号に基づき、自装置の時計を進めることができる。 In addition, in a time distribution device, the device's own clock can be advanced based on a signal of a specific frequency generated by a frequency signal generator.
また、時刻配信装置において、前記第1時計補正部は、予め求められた、有線通信に由来した遅延時間に基づいて、所定の周期で含まれる同期タイミングを検出した時刻が、前記同期タイミングについて予め定められた時刻となるように、自装置の時計を補正することができる。 In addition, in the time distribution device, the first clock correction unit can correct the clock of the device itself based on a predetermined delay time derived from wired communication so that the time at which the synchronization timing contained in a predetermined cycle is detected becomes a predetermined time for the synchronization timing.
また、本発明の同期システムは、少なくとも1つがマスタ時刻配信装置として機能し、残りがスレーブ時刻配信装置として機能する複数の時刻配信装置を含む同期システムであって、前記マスタ時刻配信装置は、前記スレーブ時刻配信装置に対して、第1の時刻に、有線通信を介して第1の位相信号を出力し、前記スレーブ時刻配信装置は、前記マスタ時刻配信装置から有線通信を介して入力される前記第1の位相信号に所定の周期で含まれる同期タイミングで、自装置の時計から時刻を取得し、前記第1の位相信号の入力時刻に遅延時間がないと仮定して、前記取得した時刻が、前記同期タイミングについて予め定められた時刻となるように、自装置の時計を補正し、前記補正された自装置の時計に基づき、前記所定の周期で同期タイミングを含む第2の位相信号を、前記有線通信を介して前記マスタ時刻配信装置へ出力し、前記マスタ時刻配信装置は、前記スレーブ時刻配信装置から有線通信を介して入力される前記第2の位相信号に前記所定の周期で含まれる同期タイミングで、自装置の時計から第2の時刻を取得し、前記第1の時刻と前記第2の時刻との時刻差を所定の周期で割った余りの時間に基づいて、前記有線通信に由来した遅延時間を推定し、前記スレーブ時刻配信装置に前記推定した遅延時間を送信する。 The synchronization system of the present invention is a synchronization system including a plurality of time distribution devices, at least one of which functions as a master time distribution device and the remaining functions as slave time distribution devices, in which the master time distribution device outputs a first phase signal to the slave time distribution device via wired communication at a first time, and the slave time distribution device acquires time from its own clock at a synchronization timing included in the first phase signal input from the master time distribution device via wired communication at a predetermined period, and, assuming that there is no delay time in the input time of the first phase signal, the acquired time is determined to be a predetermined value for the synchronization timing. The clock of the device is corrected to a specified time, and a second phase signal including a synchronization timing at the specified cycle is output to the master time distribution device via the wired communication based on the corrected clock of the device. The master time distribution device obtains the second time from the clock of the device at the synchronization timing included at the specified cycle in the second phase signal input from the slave time distribution device via wired communication, estimates a delay time caused by the wired communication based on the remainder when the time difference between the first time and the second time is divided by the specified cycle, and transmits the estimated delay time to the slave time distribution device.
また、本発明の同期システムは、少なくとも1つがマスタ時刻配信装置として機能し、残りがスレーブ時刻配信装置として機能する複数の時刻配信装置を含む同期システムであって、前記複数の時刻配信装置の各々は、自装置の時計で得られる時刻を外部に配信する時刻配信部と、自装置がスレーブ時刻配信装置として機能する場合、マスタ時刻配信装置から有線通信を介して入力される位相信号に、マスタ時刻配信装置の時計の所定の周期で含まれる同期タイミングで、自装置の時計から、時刻を取得し、前記取得した時刻が、前記同期タイミングについて予め定められた時刻となるように、自装置の時計を補正する第1時計補正部と、自装置がスレーブ時刻配信装置として機能する場合、前記第1時計補正部により補正した自装置の時計と、前記有線通信とは異なる通信を介して得られるマスタ時刻配信装置の時計との時刻差を測定する時差測定部と、自装置がスレーブ時刻配信装置として機能する場合、前記測定された時刻差と、前記所定の周期とに基づいて、前記所定の周期を単位としたずれに対応する時刻差だけ、自装置の時計を補正する第2時計補正部と、を備えており、前記時刻配信部は、自装置がマスタ時刻配信装置として機能する場合、自装置の時計で得られる時刻を外部に配信し、自装置がスレーブ時刻配信装置として機能する場合、前記第2時計補正部で補正した自装置の時計で得られる時刻を外部に配信する。 The synchronization system of the present invention is a synchronization system including a plurality of time distribution devices, at least one of which functions as a master time distribution device and the rest function as slave time distribution devices, and each of the plurality of time distribution devices includes a time distribution unit that distributes the time obtained by the clock of the own device to an external device, and a first clock correction unit that, when the own device functions as a slave time distribution device, acquires time from the clock of the own device at a synchronization timing included in a predetermined period of the clock of the master time distribution device in a phase signal input from the master time distribution device via wired communication, and corrects the clock of the own device so that the acquired time becomes a time predetermined for the synchronization timing, and a time distribution unit that determines whether the own device is a slave time distribution device. When the device functions as a master time distribution device, the device is provided with a time difference measurement unit that measures the time difference between the clock of the device itself corrected by the first clock correction unit and the clock of the master time distribution device obtained through communication different from the wired communication, and when the device functions as a slave time distribution device, a second clock correction unit that corrects the clock of the device itself by the time difference corresponding to the deviation in units of the specified period based on the measured time difference and the specified period. When the device functions as a master time distribution device, the time distribution unit distributes the time obtained by the clock of the device itself to the outside, and when the device functions as a slave time distribution device, the time obtained by the clock of the device itself corrected by the second clock correction unit to the outside.
また、本発明のプログラムは、コンピュータを、本発明の時刻配信装置の各部として機能させるためのプログラムである。 The program of the present invention is also a program for causing a computer to function as each part of the time distribution device of the present invention.
本発明によれば、時刻配信装置を複数台備える冗長構成において、装置間で時刻差が生じないように装置時計を調整することができ、複数の装置間で同じ時刻を配信することができる。 According to the present invention, in a redundant configuration with multiple time distribution devices, the device clocks can be adjusted so that there is no time difference between the devices, and the same time can be distributed between the multiple devices.
以下、図面を参照して本発明の実施の形態を詳細に説明する。 The following describes in detail an embodiment of the present invention with reference to the drawings.
まず、本発明の実施の形態の概要を説明する。 First, we will provide an overview of the embodiment of the present invention.
本発明の実施の形態では、共通の周波数信号(10MHz)のみの入力で時刻配信装置間の時刻同期を実現する。 In an embodiment of the present invention, time synchronization between time distribution devices is achieved by inputting only a common frequency signal (10 MHz).
具体的には、時刻配信装置を複数台備える冗長構成とし、時刻配信装置間で代表装置(マスタ時刻配信装置)と従属装置(スレーブ時刻配信装置)に分ける。共通の同期要素が周波数のみの環境下においても、時刻配信装置間で時刻同期させ時刻配信装置間の時刻差を解消することで、時刻配信する時刻配信装置が切り替わった場合も、同期システム全体への影響を抑える。 Specifically, a redundant configuration is provided with multiple time distribution devices, and the time distribution devices are divided into a representative device (master time distribution device) and a subordinate device (slave time distribution device). Even in an environment where the only common synchronization element is frequency, the time distribution devices are synchronized in time to eliminate the time difference between the time distribution devices, thereby minimizing the impact on the entire synchronization system even when the time distribution device distributing the time is switched.
<本発明の実施の形態のシステム構成>
本発明の実施の形態に係る同期システムの構成について説明する。図1に示すように、本発明の実施の形態に係る同期システム100は、周波数信号発生器10と、時刻配信装置20、22と、スイッチ装置24、26と、時刻終端装置28、29とを備えている。周波数信号発生器10と時刻配信装置20の間、周波数信号発生器10と時刻配信装置22の間、及び時刻配信装置20と時刻配信装置22の間は、それぞれ有線で接続されている。また、時刻配信装置20、時刻配信装置22、スイッチ装置24、26、及び時刻終端装置28、29は、イーサネット(登録商標)などのLAN(Local Area Network)を介して接続されている。
<System configuration according to the embodiment of the present invention>
The configuration of a synchronization system according to an embodiment of the present invention will be described. As shown in Fig. 1, a synchronization system 100 according to an embodiment of the present invention includes a frequency signal generator 10, time distribution devices 20 and 22, switch devices 24 and 26, and time termination devices 28 and 29. The frequency signal generator 10 and the time distribution device 20, the frequency signal generator 10 and the time distribution device 22, and the time distribution device 20 and the time distribution device 22 are connected by wires. The time distribution device 20, the time distribution device 22, the switch devices 24 and 26, and the time termination devices 28 and 29 are connected via a LAN (Local Area Network) such as Ethernet (registered trademark).
周波数信号発生器10は、電気信号である特定の周波数(例えば、10MHz)の信号を、有線通信で時刻配信装置20及び時刻配信装置22に出力する。 The frequency signal generator 10 outputs an electrical signal of a specific frequency (e.g., 10 MHz) to the time distribution device 20 and the time distribution device 22 via wired communication.
時刻配信装置20、22は、設定により、一方が、マスタ時刻配信装置として機能し、他方が、スレーブ時刻配信装置として機能する。本実施の形態では、時刻配信装置20がマスタ時刻配信装置として機能するように設定され、時刻配信装置22がスレーブ時刻配信装置として機能するように設定されている場合を例に説明する。 Depending on the settings, one of the time distribution devices 20 and 22 functions as a master time distribution device and the other functions as a slave time distribution device. In this embodiment, an example will be described in which the time distribution device 20 is set to function as a master time distribution device and the time distribution device 22 is set to function as a slave time distribution device.
すなわち、マスタ時刻配信装置としての時刻配信装置20は、自装置の時刻を、スイッチ装置24を介して、PTPで配信し、時刻情報を時刻終端装置28、29に配信する。スレーブ時刻配信装置としての時刻配信装置22は、時刻配信装置20が故障等により時刻情報を配信できない場合に、時刻配信装置20に代わって、スイッチ装置26を介して、PTPで時刻情報を時刻終端装置28、29に配信する。 That is, the time distribution device 20 as the master time distribution device distributes its own time by PTP via the switch device 24 and distributes the time information to the time termination devices 28 and 29. The time distribution device 22 as the slave time distribution device distributes the time information to the time termination devices 28 and 29 by PTP via the switch device 26 on behalf of the time distribution device 20 when the time distribution device 20 is unable to distribute the time information due to a malfunction or the like.
スイッチ装置24、26は、PTPに対応したスイッチ装置である。 Switch devices 24 and 26 are switch devices compatible with PTP.
時刻終端装置28、29が出力する位相信号は、同期している必要がある。 The phase signals output by the time terminal devices 28 and 29 must be synchronized.
本実施の形態における時刻配信装置20、22は、CPUと、RAMと、後述する各種処理ルーチンを実行するためのプログラムや各種データを記憶したROMと、を含むコンピュータで構成することが出来る。この時刻配信装置20、22は、機能的には図2に示すように、入力部30と、通信部32と、装置時計34と、タイミング信号検出部36と、時計補正部38と、時刻補正計算部40と、ケーブル遅延情報設定部42と、時差測定部44と、周期差計算部46と、周期情報設定部48とを備えている。通信部32が、時刻配信部の一例であり、時計補正部38と、時刻補正計算部40とが、第1時計補正部の一例であり、時計補正部38と、周期差計算部46とが、第2時計補正部の一例である。なお、以下では、スレーブ時刻配信装置である時刻配信装置22の各構成について説明する。 The time distribution devices 20 and 22 in this embodiment can be configured as a computer including a CPU, a RAM, and a ROM that stores programs and various data for executing various processing routines described later. As shown in FIG. 2, the time distribution devices 20 and 22 functionally include an input unit 30, a communication unit 32, a device clock 34, a timing signal detection unit 36, a clock correction unit 38, a time correction calculation unit 40, a cable delay information setting unit 42, a time difference measurement unit 44, a period difference calculation unit 46, and a period information setting unit 48. The communication unit 32 is an example of a time distribution unit, the clock correction unit 38 and the time correction calculation unit 40 are examples of a first clock correction unit, and the clock correction unit 38 and the period difference calculation unit 46 are examples of a second clock correction unit. In the following, each configuration of the time distribution device 22, which is a slave time distribution device, will be described.
入力部30には、周波数信号発生器10から出力された電気信号である特定の周波数(例えば、10MHz)の信号が、有線通信を介して入力される。 A signal of a specific frequency (e.g., 10 MHz), which is an electrical signal output from the frequency signal generator 10, is input to the input unit 30 via wired communication.
また、入力部30には、マスタ時刻配信装置である他の時刻配信装置20から出力された位相信号(1PPS(Pulse Per Second)信号)が、有線通信を介して入力される。なお、本実施形態では、1秒周期で正秒のタイミングで出力される1PPS信号を使用するが、周期性を持ち且つPPS信号が出力されるタイミングが時刻配信装置間で取り決められていれば、1PPS信号に限らない。 The input unit 30 also receives a phase signal (1 PPS (Pulse Per Second) signal) output from another time distribution device 20, which is a master time distribution device, via wired communication. Note that in this embodiment, a 1 PPS signal that is output exactly on the second with a 1 second period is used, but the signal is not limited to a 1 PPS signal as long as it has periodicity and the timing at which the PPS signal is output is agreed upon between the time distribution devices.
位相信号生成部49は、装置時計34の正秒のタイミングで位相信号(1PPS信号)を生成する。
出力部50は、位相信号生成部49により生成された位相信号(1PPS信号)を、有線通信を介して時刻配信装置20へ出力する。
The phase signal generating unit 49 generates a phase signal (1 PPS signal) at the timing of every second of the device clock 34 .
The output unit 50 outputs the phase signal (1 PPS signal) generated by the phase signal generating unit 49 to the time distribution device 20 via wired communication.
通信部32は、装置間の時刻差を測定するために、時刻配信装置20との間で通信を行うと共に、装置時計34で得られる時刻を時刻終端装置28、29へ配信するためにスイッチ装置26との間で通信を行う。 The communication unit 32 communicates with the time distribution device 20 to measure the time difference between the devices, and also communicates with the switch device 26 to distribute the time obtained by the device clock 34 to the time terminal devices 28 and 29.
装置時計34は、自装置の時刻源である。装置時計34は、周波数信号発生器10から出力された特定の周波数の信号を用いて、時計を進める。 The device clock 34 is the time source for the device itself. The device clock 34 advances the clock using a signal of a specific frequency output from the frequency signal generator 10.
タイミング信号検出部36は、入力された位相信号に所定の周期(例えば、1秒ごと)で含まれる同期タイミングを検出し、検出したタイミングを装置時計34に通知する。装置時計34は、当該タイミングが通知されると、時刻をラッチして、時刻補正計算部40へ出力する。ここで、「時刻をラッチする」とは、その時点の時刻を取得することを意味する。 The timing signal detection unit 36 detects the synchronization timing contained in the input phase signal at a predetermined period (e.g., every second) and notifies the device clock 34 of the detected timing. When the device clock 34 is notified of the timing, it latches the time and outputs it to the time correction calculation unit 40. Here, "latching the time" means obtaining the time at that point in time.
例えば、図3に示すように、1PPS信号の同期タイミング(1PPS信号のパルスタイミング)の各々を検出したタイミングで、装置時計34で得られる時刻をラッチする。 For example, as shown in FIG. 3, the time obtained by the device clock 34 is latched when each synchronization timing of the 1PPS signal (pulse timing of the 1PPS signal) is detected.
時計補正部38は、時刻補正計算部40及び周期差計算部46の各々から得られる補正量の指示に基づいて、装置時計34の時刻を補正する。 The clock correction unit 38 corrects the time of the device clock 34 based on the correction amount instructions obtained from each of the time correction calculation unit 40 and the period difference calculation unit 46.
ケーブル遅延情報設定部42には、マスタ時刻配信装置である時刻配信装置20との有線通信に起因した遅延時間が予め設定されている。 The cable delay information setting unit 42 pre-sets the delay time caused by wired communication with the time distribution device 20, which is the master time distribution device.
時刻補正計算部40は、タイミング信号検出部36で検出された同期タイミングに応じて装置時計34でラッチされた時刻と、ケーブル遅延情報設定部42に設定された遅延時間とに基づいて、装置時計34でラッチした同期タイミングの時刻が、同期タイミングについて予め定められた時刻となるように、装置時計34の時刻の補正量を計算する。 The time correction calculation unit 40 calculates the amount of correction for the time of the device clock 34 based on the time latched by the device clock 34 in response to the synchronization timing detected by the timing signal detection unit 36 and the delay time set in the cable delay information setting unit 42 so that the time of the synchronization timing latched by the device clock 34 becomes the time predetermined for the synchronization timing.
例えば、図3に示すように、1PPS信号の同期タイミング(パルスタイミング)に応じて装置時計34でラッチされた時刻TS0(199.9)と、時刻TS0に最も近い予め定められた時刻TS1(200.0)との差分td1を算出し、さらに、差分td1に有線通信の遅延時間td0を加えた時差td2を算出し、時刻TS1に時差td2を加えた時刻TS2(200.0+td0)が、入力された1PPS信号の同期タイミングに一致するように、装置時計34の時刻の補正量を計算する(図3のStep1参照)。ここで、信号が1PPS信号である場合、「同期タイミングについて予め定められた時刻」とは、装置時計34の時刻で、199.0秒や200.0秒といった秒未満が0となる正秒の時刻とのことであり、単位は秒である。 For example, as shown in Fig. 3, the difference td1 between the time Ts0 (199.9) latched by the device clock 34 in response to the synchronization timing (pulse timing) of the 1PPS signal and the predetermined time Ts1 (200.0) closest to the time Ts0 is calculated, and the time difference td2 is calculated by adding the delay time td0 of the wired communication to the difference td1 , and the correction amount of the time of the device clock 34 is calculated so that the time Ts2 ( 200.0 + td0 ) obtained by adding the time difference td2 to the time Ts1 matches the synchronization timing of the input 1PPS signal (see Step 1 in Fig. 3). Here, when the signal is a 1PPS signal, the "predetermined time for the synchronization timing" refers to the time of the device clock 34, which is a positive second time such as 199.0 seconds or 200.0 seconds, where a value less than a second is 0, and the unit is seconds.
この補正量に従って時計補正部38が補正することにより、マスタ時刻配信装置である時刻配信装置20の1PPS信号の同期タイミングの時刻TM0(100.0)と、装置時計34でラッチされる、1PPS信号の同期タイミングの時刻TS2(200.0+td0)の位相(同期タイミング)とは一致する。 By the clock correction unit 38 making corrections according to this correction amount, the phase (synchronization timing) of the time T M0 (100.0) of the synchronization timing of the 1 PPS signal of the time distribution device 20, which is the master time distribution device, and the time T S2 (200.0 + t d0 ) of the synchronization timing of the 1 PPS signal latched by the device clock 34 become consistent.
時差測定部44は、通信部32による時刻配信装置20との通信を用いて、時刻配信装置20の時計との時刻差を測定する(図3のStep2参照)。 The time difference measurement unit 44 measures the time difference with the clock of the time distribution device 20 using communication with the time distribution device 20 via the communication unit 32 (see Step 2 in Figure 3).
具体的には、図4に示すように、まず、時刻配信装置22から、パケット送信時の装置時計34の時刻を表すタイムスタンプT1を含む時刻取得要求を、時刻配信装置20へ送信する。次に、時刻配信装置20は、タイムスタンプT1を含む時刻取得要求を受信した時刻を、タイムスタンプT2として時刻配信装置20の装置時計34で取得し、記録する。そして、時刻配信装置20は、タイムスタンプT2と、パケット送信時の時刻配信装置20の装置時計34の時刻を表すタイムスタンプT3とを含む時刻応答を、時刻配信装置22へ送信する。次に、時刻配信装置22は、タイムスタンプT2、T3を含む時刻応答を受信した時刻を、タイムスタンプT4として装置時計34で取得し、記録する。 Specifically, as shown in FIG. 4, first, the time distribution device 22 transmits a time acquisition request including timestamp T1, which indicates the time of the device clock 34 at the time of packet transmission, to the time distribution device 20. Next, the time distribution device 20 acquires and records the time at which the time acquisition request including timestamp T1 was received as timestamp T2 in the device clock 34 of the time distribution device 20. Then, the time distribution device 20 transmits a time response including timestamp T2 and timestamp T3, which indicates the time of the device clock 34 of the time distribution device 20 at the time of packet transmission, to the time distribution device 22. Next, the time distribution device 22 acquires and records the time at which the time response including timestamps T2 and T3 was received as timestamp T4 in the device clock 34.
そして、時差測定部44は、以下の式に従って、時刻配信装置22を基準とした時刻差Td3を計算する。 Then, the time difference measurement unit 44 calculates the time difference Td3 based on the time distribution device 22 according to the following formula:
Td3=(T3-T4)+((T4-T1)-(T3-T2))/2 T d3 = (T3 - T4) + ((T4 - T1) - (T3 - T2)) / 2
ここで、上記で計算されるTd3は、必ず測定誤差を含むため、時刻配信装置22の装置時計34を、Td3で補正しても、時刻配信装置20の装置時計34とは一致しない。 Here, since Td3 calculated above necessarily includes a measurement error, even if the device clock 34 of the time distribution device 22 is corrected with Td3 , it will not match the device clock 34 of the time distribution device 20.
周期差計算部46は、時差測定部44により測定された時刻差と、周期情報設定部48で設定されたPPS周期(所定の周期、例えば、1秒)の長さとに基づいて、当該時刻差について、PPS周期単位でのずれでカウントした場合、何PPS周期分のずれに対応するかを計算し、計算されたPPS周期の数の分だけ補正するための装置時計34の時刻の補正量を、時計補正部38へ出力する。すなわち、PPS周期を単位としたずれに対応する時刻差だけ、自装置の時計を補正する(図3のStep3参照)。 The period difference calculation unit 46 calculates how many PPS periods the time difference corresponds to when counted as a deviation in PPS periods based on the time difference measured by the time difference measurement unit 44 and the length of the PPS period (a predetermined period, for example, 1 second) set by the period information setting unit 48, and outputs the amount of correction to the time of the device clock 34 for the calculated number of PPS periods to the clock correction unit 38. In other words, the clock of the device itself is corrected by the time difference corresponding to the deviation in units of PPS periods (see Step 3 in Figure 3).
そこで、周期差計算部46は、時差測定部44で測定した時刻差Td3と、周期情報設定部48で予め設定されているPPS周期を用いて、PPS周期×N(N=0,1,…)が、Td3に最も近くなるときのNを算出する。ここで、PPS周期×N(N=0,1,…)が、Td3に最も近くなるときのNを算出するため、PPS周期の半分(すなわち、500ms)まで、時刻配信装置20、22の間での時刻差の誤差が許容される。 Therefore, the period difference calculation unit 46 uses the time difference Td3 measured by the time difference measurement unit 44 and the PPS period previously set in the period information setting unit 48 to calculate N when the PPS period × N (N = 0, 1, ...) is closest to Td3 . In order to calculate N when the PPS period × N (N = 0, 1, ...) is closest to Td3 , an error in the time difference between the time distribution devices 20, 22 is allowed up to half the PPS period (i.e., 500 ms).
そして、Nの値からPPS周期ズレに対応する時刻差を算出し、時刻配信装置22の装置時計34の時刻の補正量とする。この補正量に従って、時計補正部38が、装置時計34の時刻を補正すると、装置時計34の時刻が、N個のPPS周期分ずらされ、時刻配信装置20、22の間でのPPS周期ズレが解消する。例えば、図3に示すように、時刻配信装置22の装置時計34の時刻が、100のPPS周期分ずらされ、時刻配信装置20、22の間でのPPS周期ズレが解消する。 Then, the time difference corresponding to the PPS period deviation is calculated from the value of N, and this is used as the correction amount for the time of the device clock 34 of the time distribution device 22. When the clock correction unit 38 corrects the time of the device clock 34 according to this correction amount, the time of the device clock 34 is shifted by N PPS periods, and the PPS period deviation between the time distribution devices 20, 22 is eliminated. For example, as shown in FIG. 3, the time of the device clock 34 of the time distribution device 22 is shifted by 100 PPS periods, and the PPS period deviation between the time distribution devices 20, 22 is eliminated.
周期情報設定部48には、PPS周期の長さが予め設定されている。 The length of the PPS period is preset in the period information setting unit 48.
上記では、スレーブ時刻配信装置の構成について説明したが、時刻配信装置20、22が、マスタ時刻配信装置である場合には、入力部30と、通信部32と、装置時計34と、出力部50とを備え、タイミング信号検出部36と、時計補正部38と、時刻補正計算部40と、ケーブル遅延情報設定部42と、時差測定部44と、周期差計算部46と、周期情報設定部48とが省略される。 The configuration of a slave time distribution device has been described above, but when the time distribution devices 20, 22 are master time distribution devices, they are provided with an input unit 30, a communication unit 32, a device clock 34, and an output unit 50, and the timing signal detection unit 36, the clock correction unit 38, the time correction calculation unit 40, the cable delay information setting unit 42, the time difference measurement unit 44, the period difference calculation unit 46, and the period information setting unit 48 are omitted.
<本発明の実施の形態の作用>
次に、本発明の実施の形態の時刻配信装置20、22による処理について図5、図6を参照して説明する。
<Operation of the embodiment of the present invention>
Next, the processing performed by the time distribution devices 20, 22 according to the embodiment of the present invention will be described with reference to FIGS.
まず、図5に示すように、周波数信号発生器10から出力された電気信号である特定の周波数の信号が、時刻配信装置20、22に入力されているものとする。また、時刻配信装置20、22間では、相互に1PPS信号が入出力されるよう接続されているものとする。ここで、時刻配信装置20、22の各々が起動されると、冗長プロトコルにより、時刻配信装置20、22について、マスタ時刻配信装置とするか、スレーブ時刻配信装置とするかを決定する(Step0)。この決定は特定のアルゴリズムにより決定してもいいし、設定により固定的に決定しても良い。特定のアルゴリズムとしては、先に時刻同期した装置を優先して、マスタ時刻配信装置として決定してもよいし、装置起動後の経過時間に応じて、マスタ時刻配信装置を決定してもよい。 First, as shown in FIG. 5, a signal of a specific frequency, which is an electrical signal output from a frequency signal generator 10, is input to the time distribution devices 20 and 22. In addition, the time distribution devices 20 and 22 are connected so that a 1 PPS signal is input and output between them. Here, when each of the time distribution devices 20 and 22 is started, a redundancy protocol is used to determine whether the time distribution device 20 or 22 will be the master time distribution device or the slave time distribution device (Step 0). This determination may be made using a specific algorithm, or may be fixedly determined by settings. As a specific algorithm, the device that was time-synchronized first may be given priority and determined as the master time distribution device, or the master time distribution device may be determined depending on the time elapsed after the device is started.
そして、時刻配信装置20、22の各々は、図6に示す時刻補正処理ルーチンを実行する。 Then, each of the time distribution devices 20 and 22 executes the time correction processing routine shown in FIG. 6.
まず、ステップS100において、自装置が、マスタ時刻配信装置として設定されているか、スレーブ時刻配信装置として設定されているかを判定する。スレーブ時刻配信装置として設定されている場合には、ステップS102へ移行し、初期時刻設定を行う。一方、マスタ時刻配信装置として設定されている場合には、マスタ時刻配信装置としての動作を開始する。 First, in step S100, the device determines whether it is set as a master time distribution device or as a slave time distribution device. If it is set as a slave time distribution device, the device proceeds to step S102 and performs initial time setting. On the other hand, if it is set as a master time distribution device, it starts operating as a master time distribution device.
そして、ステップS104において、入力されている1PPS信号及び特定の周波数の信号との同期がとれているか否かを判定する。1PPS信号及び特定の周波数の信号との同期がとれていない場合には、1PPS信号及び特定の周波数の信号との同期がとれるまで待機し、1PPS信号及び特定の周波数の信号との同期がとれると、ステップS106へ進む。ここで、「同期が取れている」とは、信号を正常に受信出来ていることをいう。 Then, in step S104, it is determined whether or not synchronization has been achieved between the input 1 PPS signal and the signal of the specific frequency. If synchronization has not been achieved between the 1 PPS signal and the signal of the specific frequency, the process waits until synchronization is achieved between the 1 PPS signal and the signal of the specific frequency, and when synchronization is achieved between the 1 PPS signal and the signal of the specific frequency, the process proceeds to step S106. Here, "synchronized" means that the signal is being received normally.
このとき、1PPS信号との同期がとれると、タイミング信号検出部36は、入力された1PPS信号に所定の周期で含まれる同期タイミングを検出し、検出したタイミングを装置時計34に通知する。装置時計34は、当該タイミングが通知されると、時刻をラッチして、時刻補正計算部40へ出力する。 At this time, when synchronization with the 1PPS signal is achieved, the timing signal detection unit 36 detects the synchronization timing contained in the input 1PPS signal at a predetermined cycle and notifies the device clock 34 of the detected timing. When the device clock 34 is notified of the timing, it latches the time and outputs it to the time correction calculation unit 40.
ステップS106では、時刻補正計算部40は、タイミング信号検出部36で検出された同期タイミングに応じて装置時計34でラッチされた時刻と、ケーブル遅延情報設定部42に設定された遅延時間と、同期タイミングについて予め定められた時刻とに基づいて、装置時計34でラッチした同期タイミングの時刻が、同期タイミングについて予め定められた時刻となるように、装置時計34の時刻の補正量を計算する。 In step S106, the time correction calculation unit 40 calculates the amount of correction for the time of the device clock 34 based on the time latched by the device clock 34 in response to the synchronization timing detected by the timing signal detection unit 36, the delay time set in the cable delay information setting unit 42, and the predetermined time for the synchronization timing, so that the time of the synchronization timing latched by the device clock 34 becomes the predetermined time for the synchronization timing.
そして、時計補正部38は、時刻補正計算部40から得られる補正量の指示に基づいて、装置時計34の時刻を補正する(図5のStep1参照)。 Then, the clock correction unit 38 corrects the time of the device clock 34 based on the correction amount instruction obtained from the time correction calculation unit 40 (see Step 1 in Figure 5).
ステップS108では、時差測定部44は、通信部32による時刻配信装置20との通信を用いて、時刻配信装置20の時計との時刻差を測定する。具体的には、図5のStep2に示すように、マスタ時刻配信装置に対して、時刻取得要求を送信し、時刻応答を受信して、時刻配信装置20の時計との時刻差を測定する。 In step S108, the time difference measurement unit 44 measures the time difference with the clock of the time distribution device 20 by using communication with the time distribution device 20 via the communication unit 32. Specifically, as shown in Step 2 of FIG. 5, a time acquisition request is sent to the master time distribution device, a time response is received, and the time difference with the clock of the time distribution device 20 is measured.
ステップS110では、周期差計算部46は、時差測定部44により測定された時刻差と、周期情報設定部48で設定されたPPS周期の長さとに基づいて、当該時刻差について、PPS周期単位でのずれでカウントする。このずれをPPS周期差とする。 In step S110, the period difference calculation unit 46 counts the time difference in terms of the deviation in PPS periods based on the time difference measured by the time difference measurement unit 44 and the length of the PPS period set by the period information setting unit 48. This deviation is regarded as the PPS period difference.
ステップS112では、周期差計算部46は、何PPS周期分のずれに対応するかのカウント値に基づいて、PPS周期差のずれがあるか否かを判定する。PPS周期差のずれがない場合には、自装置の時計の補正が必要ないと判断し、冗長同期が完了したとして、スレーブ時刻配信装置としての動作を開始する。 In step S112, the period difference calculation unit 46 determines whether or not there is a PPS period difference based on the count value corresponding to the difference in how many PPS periods. If there is no PPS period difference, it determines that correction of the clock of its own device is not necessary, and begins operation as a slave time distribution device, assuming that redundant synchronization is complete.
一方、PPS周期差のずれがある場合には、ステップS114において、周期差計算部46は、何PPS周期分のずれに対応するかのカウント値に基づいて、計算されたPPS周期の数の分だけ補正するための装置時計34の時刻の補正量を、時計補正部38へ出力する。 On the other hand, if there is a deviation in the PPS period difference, in step S114, the period difference calculation unit 46 outputs to the clock correction unit 38 the amount of correction to the time of the device clock 34 to correct it by the calculated number of PPS periods based on the count value corresponding to the deviation in PPS periods.
そして、ステップS116において、時計補正部38は、PPS周期を単位としたずれに対応する時刻差だけ、自装置の時計を補正し(図5のStep3参照)、冗長同期が完了したとして、スレーブ時刻配信装置としての動作を開始する。 Then, in step S116, the clock correction unit 38 corrects the clock of its own device by the time difference corresponding to the deviation in units of PPS periods (see Step 3 in Figure 5), and starts operating as a slave time distribution device, assuming that redundant synchronization is complete.
また、図7に示すように、マスタ時刻配信装置である時刻配信装置20が故障した場合には、スレーブ時刻配信装置である時刻配信装置22が、時刻配信装置20に対して、時刻取得要求を送信したときの応答待ちのタイムアウトにより、時刻配信装置20が故障していると判断する(Step10)。そして、時刻配信装置22がマスタ時刻配信装置に切り替わる(Step11)。このとき、時刻配信装置20と時刻配信装置22とは、前述したように同期済で冗長同期状態であるため、配信する時刻について位相差は無い。よって、時刻配信装置20に時刻同期していた端末(時刻終端装置28、29)が、時刻配信装置22の時刻同期に遷移しても時刻飛びなどの影響を排除できる。 As shown in FIG. 7, if the time distribution device 20, which is the master time distribution device, fails, the time distribution device 22, which is the slave time distribution device, determines that the time distribution device 20 has failed due to a timeout while waiting for a response when a time acquisition request is sent to the time distribution device 20 (Step 10). Then, the time distribution device 22 switches to the master time distribution device (Step 11). At this time, since the time distribution device 20 and the time distribution device 22 are synchronized and in a redundant synchronization state as described above, there is no phase difference in the time to be distributed. Therefore, even if a terminal (time terminal device 28, 29) that was time-synchronized with the time distribution device 20 transitions to time synchronization with the time distribution device 22, the effects of time jumps and the like can be eliminated.
そして、時刻配信装置20が故障から復旧すると、時刻配信装置20、22について、マスタ時刻配信装置とするか、スレーブ時刻配信装置とするかを決定する際に、決定アルゴリズムによりマスタ時刻配信装置が決定される。このとき、マスタ時刻配信装置に時刻同期している端末への影響を考慮すると、「先に時刻同期した装置優先」として後から起動(故障復旧)した装置は、スレーブ時刻配信装置に遷移するのが一般的である。 When the time distribution device 20 recovers from the failure, the decision algorithm is used to determine whether the time distribution devices 20, 22 will be the master time distribution device or the slave time distribution device. At this time, taking into consideration the impact on the terminals that are time-synchronized with the master time distribution device, it is common for the device that is started later (recovered from the failure) to transition to a slave time distribution device, with "priority given to the device that was time-synchronized first."
以上説明したように、本発明の実施の形態に係る同期システムによれば、共通の周波数信号に基づく装置時計を有する複数の時刻配信装置のそれぞれで、有線通信を介して入力される1PPS信号のパルスタイミングを用いて自装置の時計を補正した場合に、複数の時刻配信装置間のずれが、PPS周期を単位としたずれに対応することを利用して、PPS周期を単位としたずれに対応する時刻差だけ、自装置の時計を補正する。これにより、時刻配信装置を複数台備える冗長構成において、共通の周波数信号に基づく装置時計を有する装置間で時刻差が生じないように装置時計を調整することができ、複数の装置間で同じ時刻を配信することができる。 As described above, according to the synchronization system of the embodiment of the present invention, when each of multiple time distribution devices having device clocks based on a common frequency signal corrects its own device's clock using the pulse timing of one PPS signal input via wired communication, the clock of the own device is corrected by the time difference corresponding to the deviation in units of PPS cycles, taking advantage of the fact that the deviation between multiple time distribution devices corresponds to the deviation in units of PPS cycles. As a result, in a redundant configuration having multiple time distribution devices, the device clocks can be adjusted so that no time difference occurs between devices having device clocks based on a common frequency signal, and the same time can be distributed between multiple devices.
また、共通の同期要素が周波数のみの環境下においても、時刻配信装置で時刻同期させ時刻配信装置間の時刻差を解消することで、時刻配信する時刻配信装置が切り替わった場合も、同期システム全体への影響を抑えることができる。 Even in an environment where the only common synchronization element is frequency, by synchronizing time using the time distribution device and eliminating the time difference between time distribution devices, the impact on the entire synchronization system can be reduced even if the time distribution device distributing the time is switched.
なお、本発明は、上述した実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲内で様々な変形や応用が可能である。 The present invention is not limited to the above-described embodiment, and various modifications and applications are possible without departing from the spirit of the invention.
例えば、上述した実施の形態では、ケーブル遅延情報設定部42には、マスタ時刻配信装置との有線通信での予め求められた遅延時間が設定されている場合を例に説明したが、これに限定されるものではない。マスタ時刻配信装置との有線通信での遅延時間を推定するようにしてもよい。この場合には、時刻配信装置は、更に遅延時間推定部を含む。遅延時間推定部は、マスタ時刻配信装置の装置時計から、所定の周期で第1時刻を取得し、マスタ時刻配信装置から有線通信を介して入力される位相信号(1PPS信号)に所定の周期で含まれる同期タイミングで、自装置の時計から、時刻を取得し、遅延時間がないと仮定して、取得した時刻が、同期タイミングについて予め定められた時刻となるように、自装置の時計を補正する。そして、スレーブ時刻配信装置は、補正された自装置の時計の所定の周期で同期タイミングを含む位相信号(1PPS信号)を、有線通信を介してマスタ時刻配信装置へ出力し、マスタ時刻配信装置において入力される位相信号(1PPS信号)に所定の周期で含まれる同期タイミングで、マスタ時刻配信装置の装置時計から、第2時刻を取得し、第1時刻と第2時刻との時刻差を所定の周期で割った余りの時間に基づいて、遅延時間を推定する。そして、時刻補正計算部40は、遅延時間推定部により推定された遅延時間を用いて、装置時計の時刻の補正量を計算する。 For example, in the above-described embodiment, the cable delay information setting unit 42 is set with a predetermined delay time in wired communication with the master time distribution device, but the present invention is not limited to this. The delay time in wired communication with the master time distribution device may be estimated. In this case, the time distribution device further includes a delay time estimation unit. The delay time estimation unit acquires the first time at a predetermined cycle from the device clock of the master time distribution device, acquires the time from the clock of the device itself at a synchronization timing included at a predetermined cycle in the phase signal (1 PPS signal) input from the master time distribution device via wired communication, and corrects the clock of the device itself so that the acquired time becomes a predetermined time for the synchronization timing, assuming that there is no delay time. The slave time distribution device then outputs a phase signal (1 PPS signal) containing synchronization timing at a predetermined cycle of the corrected clock of the slave time distribution device to the master time distribution device via wired communication, acquires the second time from the device clock of the master time distribution device at the synchronization timing contained at the predetermined cycle in the phase signal (1 PPS signal) input at the master time distribution device, and estimates the delay time based on the remainder when the time difference between the first time and the second time is divided by the predetermined cycle. The time correction calculation unit 40 then calculates the amount of correction to the time of the device clock using the delay time estimated by the delay time estimation unit.
ここで、第1時刻はマスタ時刻配信装置が1PPS信号を発した時刻であり、第2時刻はスレーブ時刻配信装置が発した1PPS信号をマスタ時刻配信装置が受信した時刻であるが、例えばスレーブ時刻配信装置内での種々の処理に時間がかかった場合には、スレーブ時刻配信装置は、位相信号をマスタ時刻配信装置に対して、即、返すことができないこともある。つまり、第2時刻と第1時刻の時刻差が、ケーブル遅延の2倍になるとは限らない(スレーブ時刻配信装置内部の処理遅延が含まれることもある)。ただし、その場合でも、スレーブ時刻配信装置から1PPS信号が送信されるタイミングは所定の周期(1秒)であるため、第1時刻と第2時刻との時刻差のうち、秒単位の時間は、スレーブ時刻配信装置の処理遅延に由来するものであり、秒未満の時間(位相信号のずれの時間(位相差))がケーブルに由来する遅延である。そこで、本実施形態では、時刻差を所定の周期で割った余りの時間を用いて遅延時間を推定する。本実施形態では、所定の周期は1PPS(1秒)であり、且つ、正秒のタイミングであるため、時刻差を所定の周期で割った余りの時間とは、秒未満の時間となる。よって、第1時刻と第2時刻との時刻差を所定の周期で割った余りの時間に基づいて、遅延時間を推定できる。なお、「時刻差を所定の周期で割った余りの時間」とは、時刻差から、所定の周期単位の時間を減算したときの残りの時間である。 Here, the first time is the time when the master time distribution device issues a 1PPS signal, and the second time is the time when the master time distribution device receives the 1PPS signal issued by the slave time distribution device. However, for example, if various processes in the slave time distribution device take time, the slave time distribution device may not be able to immediately return the phase signal to the master time distribution device. In other words, the time difference between the second time and the first time is not necessarily twice the cable delay (it may include a processing delay inside the slave time distribution device). However, even in this case, since the timing at which the 1PPS signal is transmitted from the slave time distribution device is a predetermined period (1 second), the time in seconds of the time difference between the first time and the second time is due to the processing delay of the slave time distribution device, and the time less than a second (the time of the phase signal deviation (phase difference)) is due to the delay due to the cable. Therefore, in this embodiment, the delay time is estimated using the remainder when the time difference is divided by the predetermined period. In this embodiment, the predetermined period is 1 PPS (1 second), and the timing is exact, so the remainder when the time difference is divided by the predetermined period is a time less than a second. Therefore, the delay time can be estimated based on the remainder when the time difference between the first time and the second time is divided by the predetermined period. Note that the "remainder when the time difference is divided by the predetermined period" is the time remaining when the time unit of the predetermined period is subtracted from the time difference.
例えば、図8に示すように、マスタ時刻配信装置は、予め決められたタイミングで1PPS信号を出力する。スレーブ時刻配信装置は有線通信の遅延値Td0だけ遅れて1PPS信号を受信するが、ここでは、その遅延値が0であるものとして、同期動作を開始する。そして、スレーブ時刻配信装置は、有線通信の遅延時間が0であるとして、マスタ時刻配信装置との間の時刻同期動作を開始し、1PPS信号のパルスタイミングに応じて装置時計34でラッチされた時刻TS0(199.9)と、パルスタイミングについて予め定められた時刻TS1(200.0)との差分td1を算出し、さらに、差分td1だけ、装置時計34の時刻を補正する(図8のStep1参照) For example, as shown in Fig. 8, the master time distribution device outputs a 1PPS signal at a predetermined timing. The slave time distribution device receives the 1PPS signal with a delay of wired communication delay value Td0 , but in this example, the delay value is assumed to be 0 and starts a synchronization operation. The slave time distribution device then assumes that the delay time of wired communication is 0 and starts a time synchronization operation with the master time distribution device, calculates a difference td1 between the time Ts0 (199.9) latched by the device clock 34 in accordance with the pulse timing of the 1PPS signal and a time Ts1 (200.0) that is predetermined for the pulse timing, and further corrects the time of the device clock 34 by the difference td1 (see Step 1 in Fig. 8).
そして、マスタ時刻配信装置は、スレーブ時刻配信装置から出力される1PPS信号の位相と自装置の装置時計との位相差から、有線通信の遅延値td0’を算出する。有線通信の遅延値td0、td0’の和を、双方向の有線通信の遅延時間の合計値TRTDとし、双方向の有線通信の遅延時間の合計値TRTDの1/2を片方向の有線通信の遅延時間として推定する。ここで、双方向の有線通信のケーブル長は同じであることが前提である。なお、双方向の有線通信のケーブル長が異なる場合には、双方向の有線通信のケーブル長の比を用いて、双方向の有線通信の遅延時間の合計値TRTDから片方向の有線通信の遅延時間を推定すればよい。 The master time distribution device calculates a delay value t d0 ' of the wired communication from the phase difference between the phase of the 1 PPS signal output from the slave time distribution device and the device clock of the own device. The sum of the delay values t d0 , t d0 ' of the wired communication is set as the total delay time TRTD of the two-way wired communication, and the delay time of the one-way wired communication is estimated to be 1/2 of the total delay time TRTD of the two-way wired communication. Here, it is assumed that the cable lengths of the two-way wired communication are the same. Note that, if the cable lengths of the two-way wired communication are different, the delay time of the one-way wired communication can be estimated from the total delay time TRTD of the two-way wired communication using the ratio of the cable lengths of the two-way wired communication.
上記のように、時刻配信装置間で時刻同期動作の前に、有線通信の遅延時間の推定を実施することで、スレーブ時刻配信装置に対する、有線通信の遅延時間の設定を省くことができる。 As described above, by estimating the delay time of wired communication between time distribution devices before time synchronization operation, it is possible to eliminate the need to set the delay time of wired communication for the slave time distribution device.
また、2台の時刻配信装置を備えた冗長構成とした場合を例に説明したが、これに限定されるものではなく、3台以上の時刻配信装置を備えた冗長構成としてもよい。この場合、1台をマスタ時刻配信装置とし、それ以外をスレーブ時刻配信装置とすればよい。 In addition, while the above description is based on an example of a redundant configuration with two time distribution devices, the present invention is not limited to this and a redundant configuration with three or more time distribution devices may be used. In this case, one device may be designated as a master time distribution device and the others as slave time distribution devices.
10 周波数信号発生器
20、22 時刻配信装置
28、29 時刻終端装置
30 入力部
32 通信部
34 装置時計
36 タイミング信号検出部
38 時計補正部
40 時刻補正計算部
42 ケーブル遅延情報設定部
44 時差測定部
46 周期差計算部
48 周期情報設定部
50 出力部
100 同期システム
REFERENCE SIGNS LIST 10 Frequency signal generator 20, 22 Time distribution device 28, 29 Time termination device 30 Input unit 32 Communication unit 34 Device clock 36 Timing signal detection unit 38 Clock correction unit 40 Time correction calculation unit 42 Cable delay information setting unit 44 Time difference measurement unit 46 Period difference calculation unit 48 Period information setting unit 50 Output unit 100 Synchronization system
Claims (8)
前記取得した時刻が、前記同期タイミングについて予め定められた時刻となるように、自装置の時計を補正する第1時計補正部と、
前記第1時計補正部により補正した自装置の時計と、前記有線通信とは異なる通信を介して得られる前記他の時刻配信装置の時計との時刻差を測定する時差測定部と、
前記測定された時刻差と、前記所定の周期とに基づいて、前記所定の周期を単位としたずれに対応する時刻差だけ、自装置の時計を補正する第2時計補正部と、
自装置の時計で得られる時刻を、外部に配信する時刻配信部と、
を含む時刻配信装置。 Obtaining time from the clock of the own device at a synchronous timing included at a predetermined period in a phase signal input via wired communication from another time distribution device;
a first clock correction unit that corrects a clock of the device itself so that the acquired time coincides with a predetermined time for the synchronization timing;
a time difference measurement unit that measures a time difference between a clock of the own device corrected by the first clock correction unit and a clock of the other time distribution device obtained via a communication different from the wired communication;
a second clock correction unit that corrects a clock of the device by a time difference corresponding to a deviation in units of the predetermined period, based on the measured time difference and the predetermined period;
a time distribution unit that distributes the time obtained by the clock of the device to an external device;
A time distribution device including:
前記マスタ時刻配信装置は、
前記スレーブ時刻配信装置に対して、第1の時刻に、有線通信を介して第1の位相信号を出力し、
前記スレーブ時刻配信装置は、
前記マスタ時刻配信装置から有線通信を介して入力される前記第1の位相信号に所定の周期で含まれる同期タイミングで、自装置の時計から時刻を取得し、
前記第1の位相信号の入力時刻に遅延時間がないと仮定して、前記取得した時刻が、前記同期タイミングについて予め定められた時刻となるように、自装置の時計を補正し、
前記補正された自装置の時計に基づき、前記所定の周期で同期タイミングを含む第2の位相信号を、前記有線通信を介して前記マスタ時刻配信装置へ出力し、
前記マスタ時刻配信装置は、前記スレーブ時刻配信装置から有線通信を介して入力される前記第2の位相信号に前記所定の周期で含まれる同期タイミングで、自装置の時計から第2の時刻を取得し、
前記第1の時刻と前記第2の時刻との時刻差を所定の周期で割った余りの時間に基づいて、前記有線通信に由来した遅延時間を推定し、前記スレーブ時刻配信装置に前記推定した遅延時間を送信する、
同期システム。 A synchronization system including a plurality of time distribution devices, at least one of which functions as a master time distribution device and the remaining time distribution devices function as slave time distribution devices,
The master time distribution device
outputting a first phase signal to the slave time distribution device via wired communication at a first time;
The slave time distribution device
acquiring a time from a clock of the own device at a synchronization timing included at a predetermined period in the first phase signal input from the master time distribution device via wired communication;
correcting a clock of the device itself so that the acquired time coincides with a predetermined time for the synchronization timing, assuming that there is no delay time in the input time of the first phase signal;
outputting a second phase signal including a synchronization timing at the predetermined period based on the corrected clock of the own device to the master time distribution device via the wired communication;
the master time distribution device acquires a second time from its own clock at a synchronization timing included in the second phase signal input from the slave time distribution device via wired communication, at the predetermined period;
estimate a delay time caused by the wired communication based on a remainder obtained by dividing a time difference between the first time and the second time by a predetermined period, and transmit the estimated delay time to the slave time distribution device.
Synchronous system.
前記複数の時刻配信装置の各々は、
自装置の時計で得られる時刻を外部に配信する時刻配信部と、
自装置がスレーブ時刻配信装置として機能する場合、マスタ時刻配信装置から有線通信を介して入力される位相信号に、マスタ時刻配信装置の時計の所定の周期で含まれる同期タイミングで、自装置の時計から、時刻を取得し、
前記取得した時刻が、前記同期タイミングについて予め定められた時刻となるように、自装置の時計を補正する第1時計補正部と、
自装置がスレーブ時刻配信装置として機能する場合、前記第1時計補正部により補正した自装置の時計と、前記有線通信とは異なる通信を介して得られるマスタ時刻配信装置の時計との時刻差を測定する時差測定部と、
自装置がスレーブ時刻配信装置として機能する場合、前記測定された時刻差と、前記所定の周期とに基づいて、前記所定の周期を単位としたずれに対応する時刻差だけ、自装置の時計を補正する第2時計補正部と、
を備えており、
前記時刻配信部は、自装置がマスタ時刻配信装置として機能する場合、自装置の時計で得られる時刻を外部に配信し、
自装置がスレーブ時刻配信装置として機能する場合、前記第2時計補正部で補正した自装置の時計で得られる時刻を外部に配信する
同期システム。 A synchronization system including a plurality of time distribution devices, at least one of which functions as a master time distribution device and the remaining time distribution devices function as slave time distribution devices,
Each of the plurality of time distribution devices
a time distribution unit that distributes the time obtained by the clock of the device to an external device;
When the device itself functions as a slave time distribution device, the device acquires the time from the clock of the device itself at a synchronous timing included in a predetermined cycle of the clock of the master time distribution device in a phase signal input from the master time distribution device via wired communication,
a first clock correction unit that corrects a clock of the device itself so that the acquired time coincides with a predetermined time for the synchronization timing;
a time difference measurement unit that, when the device itself functions as a slave time distribution device, measures the time difference between the clock of the device itself corrected by the first clock correction unit and the clock of the master time distribution device obtained via communication different from the wired communication;
a second clock correction unit that corrects the clock of the device itself by a time difference corresponding to a deviation in units of the predetermined period, based on the measured time difference and the predetermined period, when the device itself functions as a slave time distribution device;
Equipped with
When the time distribution unit functions as a master time distribution device, the time distribution unit distributes the time obtained by the clock of the device to an external device;
When the device itself functions as a slave time distribution device, the synchronization system distributes to an external device the time obtained by the clock of the device itself corrected by the second clock correction unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2023038086A JP7506784B1 (en) | 2023-03-10 | 2023-03-10 | Time distribution device, synchronization system, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2023038086A JP7506784B1 (en) | 2023-03-10 | 2023-03-10 | Time distribution device, synchronization system, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP7506784B1 true JP7506784B1 (en) | 2024-06-26 |
JP2024128836A JP2024128836A (en) | 2024-09-24 |
Family
ID=91586609
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2023038086A Active JP7506784B1 (en) | 2023-03-10 | 2023-03-10 | Time distribution device, synchronization system, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7506784B1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018037885A (en) | 2016-08-31 | 2018-03-08 | 株式会社メディアリンクス | Time synchronization system |
JP2019035591A (en) | 2017-08-10 | 2019-03-07 | 日本電信電話株式会社 | Time management device, time reference device, reference time management system, and reference time management method |
JP2020077929A (en) | 2018-11-06 | 2020-05-21 | セイコーソリューションズ株式会社 | Time distribution device, synchronization system, and program |
JP2020096257A (en) | 2018-12-11 | 2020-06-18 | 日本電信電話株式会社 | Time comparison device, and time quality monitor device |
-
2023
- 2023-03-10 JP JP2023038086A patent/JP7506784B1/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018037885A (en) | 2016-08-31 | 2018-03-08 | 株式会社メディアリンクス | Time synchronization system |
JP2019035591A (en) | 2017-08-10 | 2019-03-07 | 日本電信電話株式会社 | Time management device, time reference device, reference time management system, and reference time management method |
JP2020077929A (en) | 2018-11-06 | 2020-05-21 | セイコーソリューションズ株式会社 | Time distribution device, synchronization system, and program |
JP2020096257A (en) | 2018-12-11 | 2020-06-18 | 日本電信電話株式会社 | Time comparison device, and time quality monitor device |
Also Published As
Publication number | Publication date |
---|---|
JP2024128836A (en) | 2024-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Gergeleit et al. | Implementing a distributed high-resolution real-time clock using the CAN-bus | |
US9923656B2 (en) | Methods, systems, and computer readable media for testing recovered clock quality | |
CN110492965B (en) | Method and device for synchronizing time of serial messages in master-slave system | |
US11316605B2 (en) | Method, device, and computer program for improving synchronization of clocks in devices linked according to a daisy-chain topology | |
US20090086764A1 (en) | System and method for time synchronization on network | |
US20150295702A1 (en) | Synchronization apparatus, synchronization system, radio communication apparatus and synchronization method | |
US8949648B2 (en) | System and method to overcome wander accumulation to achieve precision clock distribution over large networks | |
JP2006262461A (en) | Applications of multiple time synchronization domains | |
JP6419981B2 (en) | Method and apparatus for providing global clock in system | |
WO2011025746A1 (en) | Measurement and adjustment of real-time values according to residence time in networking equipment without access to real time | |
CN105376043B (en) | A kind of method for synchronizing time of double board systems | |
US11456849B2 (en) | Method and apparatus for synchronizing different communication ports | |
JP6058713B2 (en) | Time synchronization method and time synchronization apparatus | |
EP4044466B1 (en) | Synchronization method and device | |
JP7230690B2 (en) | Time synchronization program, information processing device and time synchronization method | |
CN113965288A (en) | Method and device for improving precision time protocol PTP time synchronization precision | |
Wu et al. | Synchronizing device clocks using IEEE 1588 and Blackfin embedded processors | |
JP7506784B1 (en) | Time distribution device, synchronization system, and program | |
JP2020077929A (en) | Time distribution device, synchronization system, and program | |
JP6385849B2 (en) | Time synchronization method and time synchronization apparatus | |
KR20190072745A (en) | Stable Network-based Time Synchronization Method | |
JP2001036538A (en) | Time synchronization method and its system | |
JP3538374B2 (en) | Time supply system and time supply device | |
KR20080101503A (en) | Node apparatus for clock synchronization in distributed system and method for clock synchronization | |
Luckinger et al. | AUTOSAR-compliant clock synchronization over CAN using software timestamping |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230310 |
|
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: 20240604 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240614 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7506784 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |