JP4542027B2 - Time synchronization method, time client, time server, application device, and time synchronization system - Google Patents

Time synchronization method, time client, time server, application device, and time synchronization system Download PDF

Info

Publication number
JP4542027B2
JP4542027B2 JP2005346686A JP2005346686A JP4542027B2 JP 4542027 B2 JP4542027 B2 JP 4542027B2 JP 2005346686 A JP2005346686 A JP 2005346686A JP 2005346686 A JP2005346686 A JP 2005346686A JP 4542027 B2 JP4542027 B2 JP 4542027B2
Authority
JP
Japan
Prior art keywords
time
packet
client
server
request packet
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
JP2005346686A
Other languages
Japanese (ja)
Other versions
JP2007158425A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2005346686A priority Critical patent/JP4542027B2/en
Publication of JP2007158425A publication Critical patent/JP2007158425A/en
Application granted granted Critical
Publication of JP4542027B2 publication Critical patent/JP4542027B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electric Clocks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Description

本発明は、通信手段で接続された2つ以上の装置間で時刻を同期させる方法及びシステムに関し、特に、インターネットなどの通信手段を介して高精度に時刻同期を行うための時刻同期方法及びシステムに関する。   The present invention relates to a method and system for synchronizing time between two or more devices connected by communication means, and in particular, a time synchronization method and system for performing time synchronization with high accuracy via communication means such as the Internet. About.

通信手段を介して接続された2つ以上の装置間の時刻同期を行う従来技術として、インターネット規格であるRFC1305に規定されたNTP(Network time protocol)がある(非特許文献1)。NTPは、インターネットなどのIP(Internet protocol)ネットワークを通信手段として、そのようなIPネットワークに対し、時刻の基準を提供するサーバ(時刻サーバともいう)とこのサーバに時刻を一致させるクライアント(時刻クライアントともいう)とが接続している場合に、サーバとクライアントとの間で機能するプロトコルである。NTPでは、サーバとクライアントとの間でのパケットを往復させたときのそのパケットの往復伝送遅延時間2dと、サーバの示す時刻とクライアントのローカルな時刻との差Δtとを用いて、クライアントのローカル時計を調整し、サーバの時刻に対してクライアントのローカルな時刻を同期させる。以下、NTPによる時刻同期の具体的な手順を説明する。   As a conventional technique for performing time synchronization between two or more devices connected via communication means, there is an NTP (Network Time Protocol) defined in RFC1305 which is an Internet standard (Non-patent Document 1). NTP uses an IP (Internet protocol) network such as the Internet as a communication means, and a server (also referred to as a time server) that provides a time reference for such an IP network and a client (time client) that matches the time with this server. Is also a protocol that functions between the server and the client. In NTP, the local time of the client is calculated by using the round-trip transmission delay time 2d of the packet when the packet is reciprocated between the server and the client, and the difference Δt between the time indicated by the server and the local time of the client. Adjust the clock to synchronize the client local time with the server time. Hereinafter, a specific procedure of time synchronization by NTP will be described.

NTPでは、往復伝送遅延時間2dやクライアントローカル時計のサーバとの相対的な差Δtを計算するために、クライアントは、まず、サーバに対してクライアントのローカル時刻をメッセージ送信する。サーバは、このメッセージに対し、開始タイムスタンプ、受信タイムスタンプ、送信タイムスタンプを備える応答を返す。この応答時にサーバでは、クライアントから送られた時刻を開始タイムスタンプにコピーする。そして、受信タイムスタンプと送信タイムスタンプをサーバの時計の日時に設定する。   In NTP, in order to calculate the relative difference Δt between the round-trip transmission delay time 2d and the client local clock server, the client first sends a message to the server about the local time of the client. In response to this message, the server returns a response with a start timestamp, a receive timestamp, and a send timestamp. At the time of this response, the server copies the time sent from the client to the start time stamp. Then, the reception time stamp and the transmission time stamp are set to the date and time of the server clock.

クライアントは、サーバからの応答に含まれる開始タイムスタンプ、受信タイムスタンプ、送信タイムスタンプをそれぞれ記録する変数t1、t2、t3を管理するとともに、さらに、クライアントのローカルな時計で測った応答受信時刻である終了タイムスタンプを記録する変数t4を管理しており、サーバの応答を受信したとき、クライアントの時計で測った到着時刻を、終了タイムスタンプ変数に設定する。下記の表は、4つのタイムスタンプの要約である。 The client manages the variables t 1 , t 2 , and t 3 for recording the start time stamp, the reception time stamp, and the transmission time stamp included in the response from the server, respectively, and further, the response measured by the local clock of the client manages the variable t 4 to record the end time stamp is the reception time, when receiving the response of the server, the arrival time as measured by the client of the clock, set to end timestamp variable. The table below summarizes the four time stamps.

Figure 0004542027
Figure 0004542027

これらの変数を用いると、往復伝送遅延時間2dは
2d={(t4−t1)−(t3−t2)}
で表わされる。
Using these variables, the round trip transmission delay time 2d is 2d = {(t 4 −t 1 ) − (t 3 −t 2 )}.
It is represented by

クライアントからサーバへの往路とサーバからクライアントへの復路で遅延量が等しいと仮定すると、クライアントが応答を受信した時刻は、サーバが応答を送信した時刻に片道の遅延量を加えた値t3+dとなるので、クライアントの時計のサーバの時計に対する誤差Δtを次のように求めることができる。 Assuming that the delay amount is the same in the outbound path from the client to the server and the return path from the server to the client, the time when the client received the response is a value obtained by adding the one-way delay amount to the time when the server transmitted the response t 3 + d Therefore, the error Δt of the client clock with respect to the server clock can be obtained as follows.

Δt=t0−(t3+d)={(t1−t2)−(t3−t4)}/2
したがって、NTPでは、Δt=0となるようにクライアントの時計を修正することで、クライアントのローカルな時計をサーバの時計に時刻同期させることができる。
Network Time Protocol (Version3) Specification, Implementation and Analysis, David L. Mills, IETF RFC-1305
Δt = t 0 − (t 3 + d) = {(t 1 −t 2 ) − (t 3 −t 4 )} / 2
Therefore, in NTP, the client's local clock can be synchronized with the server clock by correcting the client clock so that Δt = 0.
Network Time Protocol (Version3) Specification, Implementation and Analysis, David L. Mills, IETF RFC-1305

上述したようにNTPでは、クライアントにおけるローカル時計の誤差Δtを計算する際に、サーバとクライアントとの間の伝送遅延量が往復で等しいという仮定を用いている。したがって、往路と復路の遅延差が存在する場合、この仮定が成立しないので、NTPの精度が劣化し、もしくはオフセットが生じる。   As described above, in the NTP, when calculating the error Δt of the local clock in the client, the assumption that the transmission delay amount between the server and the client is equal in the round trip is used. Therefore, when there is a delay difference between the forward path and the backward path, this assumption is not satisfied, so that the accuracy of NTP deteriorates or an offset occurs.

クライアントとサーバとの間の通信経路で、NTPによる時刻要求パケットとその他のアプリケーションのパケットとがパケット多重される場合を考える。そのようなアプリケーションのパケットが周期性を有し、その周期が高安定、もしくはサーバ時刻と同期していると、時刻クライアントが送出する時刻要求パケットの周期とアプリケーションのパケットの周期が一致もしくは単純な比率になることがある。そのとき、両者の位相関係によっては、パケットを多重化するルータもしくはスイッチにおいて、往路の時刻要求パケットがアプリケーションのパケットと衝突し、常に一定の遅延を受けることが起こり得る。そのような場合には、伝送遅延量が往復で等しいという仮定が成り立たなくなる。   Consider a case where a time request packet by NTP and a packet of another application are packet-multiplexed on a communication path between a client and a server. When such application packets have periodicity and the period is highly stable or synchronized with the server time, the period of the time request packet sent by the time client and the period of the application packet match or are simple. May be a ratio. At that time, depending on the phase relationship between the two, it is possible that the forward time request packet collides with the application packet in the router or switch that multiplexes the packets and always receives a certain delay. In such a case, the assumption that the transmission delay amount is the same in both round trips does not hold.

時刻サーバ側においても、時刻クライアントからの時刻要求パケットはクライアント側からサーバ側(往路)に向かうアプリケーションパケットの周期性の影響を受けるので、サーバ側からクライアント側(復路)に向かうアプリケーションのパケットの周期と一致もしくは単純な比率になる場合には、同様に、復路の時刻パケットが常に一定の遅延を受けることがある。   Even on the time server side, the time request packet from the time client is affected by the periodicity of the application packet going from the client side to the server side (outbound), so the cycle of the application packet going from the server side to the client side (return) In the same manner, the time packet on the return path may always be subjected to a certain delay.

このように、アプリケーションパケットが多重される通信経路を介して時刻要求パケット、時刻応答パケットが送信される場合、NTPでは、時刻要求パケット、往路及び復路のアプリケーションパケットの周期及び位相の組み合わせによっては、±(アプリケーションパケット時間長)のオフセットが生じる可能性があり、高精度で時刻同期を行う際の障害となっている。   As described above, when a time request packet and a time response packet are transmitted via a communication path in which application packets are multiplexed, in NTP, depending on the combination of the period and phase of the time request packet, the forward path and the return path application packet, There is a possibility that an offset of ± (application packet time length) may occur, which is an obstacle to time synchronization with high accuracy.

IEEE 802.1qやDiffserveなどの規格では、特定の種類のパケットの送信を優先させる優先制御を定めているが、一般にIPルータ/スイッチで用いられているストア・アンド・フォワード型の転送では出力中のパケットが終了しないと次のパケットの転送が開始できないので、これらの規格にしたがって時刻同期パケット(時刻要求パケット及び時刻応答パケット)の優先制御を行ったとしても、上述したオフセットの問題を解決することはできない。アプリケーションパケット出力中に時刻同期パケットが到着しても、アプリケーションパケットの終了を待ってから時刻同期パケットが出力されることになるからである。   Standards such as IEEE 802.1q and Diffserver define priority control that prioritizes the transmission of specific types of packets, but in store-and-forward transfers that are generally used in IP routers / switches, output is in progress. Since the transfer of the next packet cannot be started unless the current packet ends, even if priority control of the time synchronization packet (time request packet and time response packet) is performed according to these standards, the above-described offset problem is solved. It is not possible. This is because even if the time synchronization packet arrives while the application packet is output, the time synchronization packet is output after waiting for the end of the application packet.

本発明は上記のような事情に鑑みてなされたもので、高精度に時刻同期することが可能な方法及びシステムを提供することにある。   The present invention has been made in view of the above circumstances, and it is an object of the present invention to provide a method and system capable of time synchronization with high accuracy.

時刻クライアントにおける本発明の時刻同期方法は、通信手段を介して時刻クライアントと時刻サーバ接続されており、かつ、通信手段にアプリケーション装置が接続されており、通信手段の経路において、時刻クライアントから時刻サーバに送信される時刻要求パケットまたは時刻サーバから時刻クライアントに送信される時刻応答パケットと、アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、時刻クライアントが時刻サーバに時刻要求パケットを送信し、これに対応して時刻サーバが時刻クライアントに時刻応答パケットを返信し、時刻要求パケットならびに時刻応答パケットが伝えるパケットの送受信時刻をもとに、時刻サーバが保持する時刻に時刻クライアントのローカル時計の時刻を同期させる時刻同期方法において、時刻要求パケットの送出の基本周期を発生する段階と、基本周期ごとに、基本周期に対して任意に変化する遅延時間を与えて時刻要求パケットを生成し、生成した時刻要求パケットを時刻サーバに送出する段階と、を有することを特徴とする。 In the time synchronization method of the present invention in the time client, the time client and the time server are connected via the communication means, and the application device is connected to the communication means. The time request packet sent to the server or the time response packet sent from the time server to the time client is multiplexed with the periodic application packet sent by the application device, and the time client sends the time request packet to the time server. In response to this, the time server returns a time response packet to the time client, and based on the transmission / reception time of the time request packet and the packet transmitted by the time response packet , the time client holds the local time at the time held by the time server. The time on the clock In the time synchronization method to be generated, a time request packet is generated by generating a basic period for sending a time request packet and a delay time arbitrarily changing with respect to the basic period for each basic period. Sending a request packet to a time server.

時刻サーバにおける本発明の時刻同期方法は、通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、通信手段にアプリケーション装置が接続されており、通信手段の経路において、時刻クライアントから時刻サーバに送信される時刻要求パケットまたは時刻サーバから時刻クライアントに送信される時刻応答パケットと、アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、時刻クライアントが時刻サーバに時刻要求パケットを送信し、これに対応して時刻サーバが時刻クライアントに時刻応答パケットを返信し、時刻要求パケットならびに時刻応答パケットが伝えるパケットの送受信時刻をもとに、時刻サーバが保持する時刻に時刻クライアントのローカル時計の時刻を同期させる時刻同期方法において、時刻要求パケットを受信した際に、任意に変化する遅延時間を与えた後に、受信した時刻要求パケットに対応する時刻応答パケットを送出する段階を有することを特徴とする。 In the time synchronization method of the present invention in the time server, the time client and the time server are connected via the communication means, and the application device is connected to the communication means. The time request packet sent to the server or the time response packet sent from the time server to the time client is multiplexed with the periodic application packet sent by the application device, and the time client sends the time request packet to the time server. In response to this, the time server returns a time response packet to the time client, and based on the transmission / reception time of the time request packet and the packet transmitted by the time response packet, the time client holds the local time at the time held by the time server. Synchronize clock time In that time synchronization method, when receiving a time request packet, after giving a delay time that varies arbitrarily, characterized in that it comprises the step of sending the time response packet corresponding to the time request packet received.

アプリケーション装置における本発明の時刻同期方法は、通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、通信手段にアプリケーション装置が接続されており、通信手段の経路において、時刻クライアントから時刻サーバに送信される時刻要求パケットまたは時刻サーバから時刻クライアントに送信される時刻応答パケットと、アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、時刻クライアントが時刻サーバに時刻要求パケットを送信し、これに対応して時刻サーバが時刻クライアントに時刻応答パケットを返信し、時刻要求パケットならびに時刻応答パケットが伝えるパケットの送受信時刻をもとに、時刻サーバが保持する時刻に時刻クライアントのローカル時計の時刻を同期させる時刻同期方法において、アプリケーション装置において、アプリケーションパケットの送出の基本周期を発生する段階と、基本周期ごとに、基本周期に対して任意に変化する遅延時間を与えてアプリケーションパケットを生成し、生成したアプリケーションパケットを通信手段に送出する段階と、を有することを特徴とする。 In the time synchronization method of the present invention in the application device, the time client and the time server are connected via the communication means, and the application device is connected to the communication means. The time request packet sent to the server or the time response packet sent from the time server to the time client is multiplexed with the periodic application packet sent by the application device, and the time client sends the time request packet to the time server. In response to this, the time server returns a time response packet to the time client, and based on the transmission / reception time of the time request packet and the packet transmitted by the time response packet, the time client holds the local time at the time held by the time server. Clock In time synchronization method for synchronizing, in the application device, and generating a fundamental period of the transmission of the application packets, each basic period, an application packet is given a delay time that varies arbitrarily with respect to the fundamental period Generating and sending the generated application packet to the communication means.

本発明の時刻クライアントは、通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、通信手段にアプリケーション装置が接続されており、通信手段の経路において、時刻クライアントから時刻サーバに送信される時刻要求パケットまたは時刻サーバから時刻クライアントに送信される時刻応答パケットと、アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、時刻クライアントが時刻サーバに時刻要求パケットを送信し、これに対応して時刻サーバが時刻クライアントに時刻応答パケットを返信し、時刻要求パケットならびに時刻応答パケットが伝えるパケットの送受信時刻をもとに、時刻サーバが保持する時刻に時刻クライアントのローカル時計の時刻を同期させるシステムにおける時刻クライアントにおいて、時刻要求パケットを一定周期からはずして送出することを特徴とする。 In the time client of the present invention, the time client and the time server are connected via the communication means, and the application device is connected to the communication means, and is transmitted from the time client to the time server in the path of the communication means. Time request packet or a time response packet transmitted from the time server to the time client and a periodic application packet transmitted by the application device are multiplexed, and the time client transmits the time request packet to the time server. The time server returns a time response packet to the time client, and based on the transmission / reception time of the time request packet and the packet transmitted by the time response packet, the time of the local clock of the time client is set to the time held by the time server. To the system to synchronize In kicking time client, characterized by sending by removing the time request packet from the fixed cycle.

本発明の別の時刻クライアントは、通信手段を介して時刻クライアントと時刻サーバ接続されておりかつ、通信手段にアプリケーション装置が接続されており、通信手段の経路において、時刻クライアントから時刻サーバに送信される時刻要求パケットまたは時刻サーバから時刻クライアントに送信される時刻応答パケットと、アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、時刻クライアントが時刻サーバに時刻要求パケットを送信し、これに対応して時刻サーバが時刻クライアントに時刻応答パケットを返信し、時刻要求パケットならびに時刻応答パケットが伝えるパケットの送受信時刻をもとに、時刻サーバが保持する時刻に時刻クライアントのローカル時計の時刻を同期させるシステムにおける時刻クライアントにおいて、時刻要求パケットの送出の基本周期を発生するタイミング発生手段と、基本周期に対して任意に変化する遅延時間dを与えて時刻要求パケットを生成し、生成した時刻要求パケットを時刻サーバに送出するパケット生成手段と、を有する。 Another time client of the present invention is connected with a time client and a time server via the communication means, and the application device is connected to the communication means, in the path of the communication means, the time from the time a client server The time request packet sent to the time or the time response packet sent from the time server to the time client and the periodic application packet sent by the application device are multiplexed, and the time client sends the time request packet to the time server Correspondingly, the time server returns a time response packet to the time client, and based on the transmission / reception time of the time request packet and the packet transmitted by the time response packet, the local clock of the time client is held at the time held by the time server. system to synchronize the time Time at the time client, and a timing generating means for generating a fundamental period of the transmission of the time request packet, generates a time request packet is given a delay time d that varies arbitrarily with respect to the fundamental period, the generated time request packet in Packet generating means for sending to the server.

本発明の時刻クライアントにおいて、任意に変化する遅延時間dは、Lを通信手段におけるアプリケーションパケットもしくは伝送路の最大パケット時間長、Ltpを時刻要求パケットのパケット長、Gをパケット間最小間隔、Iを基本周期として、例えば、
0≦d≦dmax (ただし、L≦dmax≦I−Ltp−G)
を満たすようにランダムに決められる遅延時間である。ここで、dmax=Lとすることが好ましい。
In the time client of the present invention, the arbitrarily varying delay time d is such that L is the maximum packet time length of the application packet or transmission path in the communication means, L tp is the packet length of the time request packet, G is the minimum interval between packets, I As a fundamental period, for example,
0 ≦ d ≦ d max (where L ≦ d max ≦ I−L tp −G)
It is a delay time that is randomly determined so as to satisfy. Here, it is preferable to set d max = L.

本発明の時刻サーバは、通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、通信手段にアプリケーション装置が接続されており、通信手段の経路において、時刻クライアントから時刻サーバに送信される時刻要求パケットまたは時刻サーバから時刻クライアントに送信される時刻応答パケットと、アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、時刻クライアントが時刻サーバに時刻要求パケットを送信し、これに対応して時刻サーバが時刻クライアントに時刻応答パケットを返信し、時刻要求パケットならびに時刻応答パケットが伝えるパケットの送受信時刻をもとに、時刻サーバが保持する時刻に時刻クライアントのローカル時計の時刻を同期させるシステムにおける時刻サーバにおいて、時刻応答パケットを受信した時点からの、任意に変化する遅延時間dを与えた後に時刻応答パケットを送出する手段を有することを特徴とする。 In the time server of the present invention, the time client and the time server are connected via the communication means, and the application device is connected to the communication means, and is transmitted from the time client to the time server in the path of the communication means. Time request packet or a time response packet transmitted from the time server to the time client and a periodic application packet transmitted by the application device are multiplexed, and the time client transmits the time request packet to the time server. The time server returns a time response packet to the time client, and based on the transmission / reception time of the time request packet and the packet transmitted by the time response packet, the time of the local clock of the time client is set to the time held by the time server. in the system to be synchronized In time server, from the time of receiving the time response packet, characterized in that it comprises means for delivering a time response packet after giving a delay time d of arbitrarily varying.

本発明の時刻サーバにおいて、任意に変化する遅延時間dは、Lを通信手段におけるアプリケーションパケットもしくは伝送路の最大パケット時間長として、例えば、
0≦d≦dmax(ただし、L≦dmax
を満たすようにランダムに決められる遅延時間である。ここで、dmax=Lとすることが好ましい。
In the time server of the present invention, the delay time d that is arbitrarily changed may be set such that L is the maximum packet time length of the application packet or transmission path in the communication means,
0 ≦ d ≦ d max (where L ≦ d max )
It is a delay time that is randomly determined so as to satisfy. Here, it is preferable to set d max = L.

このような時刻サーバは、具体的には、例えば、時刻要求パケットをそれぞれ蓄積することが可能な複数のバッファと、時刻要求パケットを受信したときに、複数のバッファのうちの空バッファの1つに時刻要求パケットを蓄積する入力スイッチ手段と、複数のバッファのうちの1つのランダムに選択し、選択されたバッファが空であればランダムな時間の経過後に次のバッファの選択を行うスケジューラ手段と、スケジューラ手段で選択されたバッファが空でないときにそのバッファに蓄積された時刻要求パケットに基づいて時刻応答パケットを生成し送出する時刻応答パケット生成手段と、を備える。あるいは時刻サーバは、例えば、時刻要求パケットをそれぞれ蓄積することが可能な複数のバッファと、時刻要求パケットを受信したときに、複数のバッファのうちの空バッファの1つにその時刻要求パケットを蓄積する入力スイッチ手段と、時刻要求パケットをバッファに蓄積する際に、その時刻要求パケットに対応する時刻応答パケットの生成予約時刻をランダムに設定し、その生成予約時刻になったときに対応するバッファを選択するスケジューラ手段と、スケジューラ手段で選択されたバッファに蓄積された時刻要求パケットに基づいて時刻応答パケットを生成し送出する時刻応答パケット生成手段と、を備える。   Specifically, such a time server includes, for example, a plurality of buffers each capable of storing a time request packet, and one of the empty buffers among the plurality of buffers when the time request packet is received. Input switch means for storing a time request packet at a time, and scheduler means for randomly selecting one of a plurality of buffers and selecting the next buffer after a lapse of random time if the selected buffer is empty; And time response packet generating means for generating and sending a time response packet based on the time request packet stored in the buffer when the buffer selected by the scheduler means is not empty. Alternatively, the time server, for example, stores a plurality of buffers each capable of storing a time request packet and, when receiving the time request packet, stores the time request packet in one of the plurality of buffers. When the time request packet is stored in the buffer, the generation reservation time of the time response packet corresponding to the time request packet is randomly set, and the buffer corresponding to the generation reservation time is set. Scheduler means for selecting, and time response packet generating means for generating and sending a time response packet based on the time request packet stored in the buffer selected by the scheduler means.

本発明のアプリケーション装置は、通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、通信手段に、ローカル時計を備えて通信手段に対してアプリケーションパケットを送出するアプリケーション装置が接続されており、通信手段の経路において、時刻クライアントから時刻サーバに送信される時刻要求パケットまたは時刻サーバから時刻クライアントに送信される時刻応答パケットと、アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、時刻クライアントが時刻サーバに時刻要求パケットを送信し、これに対応して時刻サーバが時刻クライアントに時刻応答パケットを返信し、時刻要求パケットならびに時刻応答パケットが伝えるパケットの送受信時刻をもとに、時刻サーバが保持する時刻に時刻クライアントのローカル時計の時刻を同期させるシステムにおける、通信手段に接続されたアプリケーション装置において、アプリケーションパケットの送出の基本周期を発生するタイミング発生手段と、基本周期に対して任意に変化する遅延時間dを与えてアプリケーションパケットを生成し、生成したアプリケーションパケットを通信手段に送出するパケット生成手段と、を有することを特徴とする。
In the application apparatus of the present invention, a time client and a time server are connected via a communication means, and an application apparatus that includes a local clock and sends an application packet to the communication means is connected to the communication means. In the communication path, a time request packet transmitted from the time client to the time server or a time response packet transmitted from the time server to the time client and a periodic application packet transmitted by the application device are multiplexed. The time client sends a time request packet to the time server, and in response, the time server returns a time response packet to the time client. Based on the transmission / reception time of the time request packet and the packet transmitted by the time response packet, , Time sir There the system for synchronizing the time of the local clock time client time to hold, in the connected application device to the communication unit, a timing generating means for generating a fundamental period of the transmission of the application packet, optionally the basic cycle And a packet generation unit configured to generate an application packet by giving a varying delay time d, and to send the generated application packet to the communication unit.

本発明のアプリケーション装置において、任意に変化する遅延時間dは、Lを通信手段におけるアプリケーションパケットもしくは伝送路の最大パケット時間長、Ltpを時刻要求パケットのパケット長、Gをパケット間最小間隔、Iをアプリケーションパケット送出の基本周期として、例えば、
0≦d≦dmax (ただし、L≦dmax≦I−Ltp−G)
を満たすようにランダムに決められる遅延時間である。ここで、dmax=Lとすることが好ましい。
In the application apparatus of the present invention, the delay time d that arbitrarily changes is as follows: L is the maximum packet time length of the application packet or transmission path in the communication means, L tp is the packet length of the time request packet, G is the minimum interval between packets, I As the basic period of application packet transmission, for example,
0 ≦ d ≦ d max (where L ≦ d max ≦ I−L tp −G)
It is a delay time that is randomly determined so as to satisfy. Here, it is preferable to set d max = L.

本発明においては、時刻クライアントにおいて、時刻要求パケットに対応した時刻応答パケットを受信して往復伝送遅延時間を求め、複数の往復伝送遅延時間のうちの最小のものに基づいてローカル時計を修正するようにすることが好ましい。   In the present invention, the time client receives the time response packet corresponding to the time request packet to determine the round trip transmission delay time, and corrects the local clock based on the minimum of the plurality of round trip transmission delay times. It is preferable to make it.

本発明の時刻同期システムは、本発明の時刻クライアントと、本発明の時刻サーバと、を有する。あるいは本発明の時刻同期システムは、本発明の時刻クライアントと、本発明の時刻サーバと、本発明のアプリケーション装置と、を有する。   The time synchronization system of the present invention includes the time client of the present invention and the time server of the present invention. Or the time synchronization system of this invention has the time client of this invention, the time server of this invention, and the application apparatus of this invention.

本発明では、時刻クライアントにおいて時刻要求パケットの生成の基本周期に対して任意に変化する遅延時間を与えて時刻要求パケットを生成して送出することにより、及び/または、時刻サーバにおいて時刻要求パケットを受信した際に、任意に変化する遅延時間を与えた後にその時刻要求パケットに対応した時刻応答パケットを送出することにより、周期性を持ったアプリケーショントラフィックが存在する環境下においても、経路上のルータ(スイッチ)において往路の時刻要求パケット及び復路の時刻応答パケットがアプリケーションパケットと衝突せずに通過する場合が存在するようになるため、高精度な時刻同期が可能になる。   In the present invention, the time request packet is generated and transmitted by giving a delay time arbitrarily changing with respect to the basic period of generation of the time request packet in the time client, and / or the time request packet is transmitted in the time server. When receiving, after giving an arbitrarily changing delay time, a time response packet corresponding to the time request packet is sent, so that even in an environment where there is periodic application traffic, a router on the path In the (switch), there are cases where the forward time request packet and the backward time response packet pass without colliding with the application packet, so that highly accurate time synchronization is possible.

同様に、周期性を有するアプリケーションパケットを送出するアプリケーション装置において、アプリケーションパケットによるトラフィックの周期性が低減されるようにすることによっても、経路上のルータ(スイッチ)において時刻要求パケット及び時刻応答パケットがアプリケーションパケットと衝突せずに通過する場合が存在するようになるため、高精度な時刻同期が可能になる。   Similarly, in an application device that transmits application packets having periodicity, the time periodicity of the time request packet and the time response packet is also reduced in the router (switch) on the route by reducing the periodicity of the traffic due to the application packet. Since there are cases where the packet passes without colliding with the application packet, highly accurate time synchronization becomes possible.

本発明の時刻サーバ、時刻クライアントとアプリケーション装置を組み合わせて用いることにより、時刻要求パケットや時刻応答パケットが周期的な衝突をせずにルータ(スイッチ)を通過する割合が高まり、より高精度な時刻同期が可能になる。   By using the time server, time client, and application device of the present invention in combination, the rate at which time request packets and time response packets pass through routers (switches) without periodic collisions increases, and more accurate time Synchronization is possible.

次に、本発明の好ましい実施の形態について、図面を参照して説明する。   Next, a preferred embodiment of the present invention will be described with reference to the drawings.

図1は、時刻同期システムの基本的な構成を示している。インターネットなどのネットワーク1に対し、高精度に時刻を保持している時刻サーバ2が接続し、さらに、ローカルな時計を有するとともに時刻サーバ2に対してこのローカルな時計を時刻同期させようとする時刻クライアント3が接続している。ネットワーク1では、周期性を有する他のアプリケーションパケットも伝送されている。そこで本実施形態では、時刻同期のための手法として基本的にはNTPを利用するものの、周期性を持った他のアプリケーションパケットが時刻同期の精度に与える影響を低減するため、NTPによる従来の時刻同期システムに対して、以下に述べるように、いくつかの改良を行うこととする。   FIG. 1 shows a basic configuration of the time synchronization system. A time server 2 holding time with high accuracy is connected to a network 1 such as the Internet, and further has a local clock and a time to synchronize the local clock with the time server 2 Client 3 is connected. In the network 1, other application packets having periodicity are also transmitted. Therefore, in this embodiment, although NTP is basically used as a method for time synchronization, in order to reduce the influence of other application packets having periodicity on the accuracy of time synchronization, the conventional time by NTP is used. Several improvements will be made to the synchronization system as described below.

(時刻クライアント)
まず時刻クライアントにおいて、時刻要求パケットの生成タイミングを改良し、時刻要求パケットが一定の周期からランダムにずれた間隔で送出されるようにする。図2は、このような時刻クライアント3の内部構成と時刻要求パケットの送出タイミングとを示す図である。図2では、時刻クライアントにおける時刻要求パケットの送信に関係する部分を示されている。
(Time client)
First, in the time client, the generation timing of the time request packet is improved so that the time request packet is transmitted at an interval that is randomly deviated from a certain period. FIG. 2 is a diagram showing the internal configuration of such a time client 3 and the transmission timing of the time request packet. FIG. 2 shows a portion related to transmission of the time request packet in the time client.

時刻クライアントは、時刻クライアントのローカル時計(図2には不図示)と、このローカル時計に同期した周期IのパルスI(t)を発生するトリガ発生器11と、パルスI(t)に対して遅延を与えて遅延パルスO(t)を発生する遅延発生器12と、遅延パルスO(t)に基づいて時刻要求パケットを送出する時刻要求パケット生成器13と、を備えている。ここで周期Iは一定の周期であり、これを時刻要求パケットの送出基本周期Iと呼ぶことにする。遅延発生器12は、パルスI(t)を入力とし、パルスI(t)が到着すると、周期ごとに乱数によって決められた遅延d(t,k)を与えて、遅延パルスO(t)を出力するように構成されている。時刻要求パケット生成器13は、遅延パルスO(t)が到着した瞬間に、クライアント時刻を開始タイムスタンプとして時刻要求パケットを送出するように構成されている。   The time client has a local clock (not shown in FIG. 2) of the time client, a trigger generator 11 that generates a pulse I (t) having a period I synchronized with the local clock, and a pulse I (t). A delay generator 12 that gives a delay to generate a delay pulse O (t) and a time request packet generator 13 that sends a time request packet based on the delay pulse O (t) are provided. Here, the period I is a constant period, and this is referred to as a time request packet transmission basic period I. The delay generator 12 receives the pulse I (t), and when the pulse I (t) arrives, the delay generator 12 gives a delay d (t, k) determined by a random number for each period, and outputs the delay pulse O (t). It is configured to output. The time request packet generator 13 is configured to send a time request packet using the client time as a start time stamp at the moment when the delay pulse O (t) arrives.

このような時刻クライアント3では、クライアントにおけるローカルな時刻をTcで表わすこととすると、
c=k・I+d(k)+T0
となる時刻に、時刻要求パケットの送出が行なわれる。ここで、kは任意の整数、T0は定数であり、またd(k)は、0からdmax(ただしL≦dmax≦I−LTP−G;Lはアプリケーションパケットもしくは伝送路の最大パケット時間長、LTPは時刻同期パケット時間長、Gはパケット間最小間隔)の値をとる任意の変動値とする。d(k)は乱数に基づいて定められるようにすることが好ましい。
In such a time client 3, if the local time in the client is represented by Tc ,
T c = k · I + d (k) + T 0
At this time, a time request packet is transmitted. Here, k is an arbitrary integer, T 0 is a constant, and d (k) is 0 to d max (where L ≦ d maxILTP− G; L is the maximum of the application packet or transmission path) The packet time length, L TP is a time synchronization packet time length, and G is an arbitrary variation value that takes the value of the minimum interval between packets. It is preferable that d (k) is determined based on a random number.

図2に示した時刻クライアント3では、上述したような改良が加えられることにより、時刻要求パケットの送出タイミングが1パケット時間長以上の分散を持つようになる。このことは、図2においては、それぞれの時刻要求パケット14の送出タイミングが、周期Iで定まるタイミングから、d(k),d(k+1),…などのようにばらついていることによって示されている。その結果、いかなる周期のアプリケーションパケットに対しても、ルータ(もしくはスイッチ)において往路の時刻要求パケットがアプリケーションのパケットと衝突せずに通過する場合が存在するようになる。なお、時刻要求パケットの送出タイミングにおいて、1パケット時間長以上の分散があればアプリケーションのパケットと衝突せずにルータ(もしくはスイッチ)を通過する場合が存在するので、アプリケーションパケットもしくは伝送路の最大パケット時間長をLとすると、d(k)の最大値dmaxはLで十分である。 In the time client 3 shown in FIG. 2, the improvement as described above is added, so that the transmission timing of the time request packet has a dispersion of one packet time length or more. This is shown in FIG. 2 by the fact that the transmission timing of each time request packet 14 varies as d (k), d (k + 1),... From the timing determined by the period I. Yes. As a result, there is a case in which an outgoing time request packet passes through an application packet having any period without colliding with an application packet in a router (or switch). Note that if there is a variance of one packet time length or more at the time request packet transmission timing, it may pass through the router (or switch) without colliding with the application packet, so the application packet or the maximum packet of the transmission path When the time length is L, L is sufficient as the maximum value d max of d (k).

図3は、図2に示した時刻クライアントにおける遅延発生器12の状態遷移の一例を示した状態遷移図である。デフォルトでの出力値をO(t)=0として、状態Aから開始される。入力パルスI(t)が到着するまでは状態Aにあり、パルスI(t)が入力されると、変数Dに0からLまでの乱数を格納し状態Bに遷移する。状態遷移図においては、乱数を発生する関数がRand()で表記されている。状態Bでは、Dが0になるまで、単位時刻あたり1を減じていく。D=0になった時、出力値O(t)=1として、状態Aに遷移する。   FIG. 3 is a state transition diagram showing an example of state transition of the delay generator 12 in the time client shown in FIG. The default output value is O (t) = 0, and the process starts from state A. The state is in the state A until the input pulse I (t) arrives. When the pulse I (t) is input, a random number from 0 to L is stored in the variable D and the state transitions to the state B. In the state transition diagram, a function for generating a random number is represented by Rand (). In state B, 1 is subtracted per unit time until D becomes zero. When D = 0, the output value O (t) = 1 and the state A is entered.

(バースト制御)
VCO(電圧制御発振器)の制御など、ほぼ一定の周期で時刻誤差を修正したい場合には、NTPによる従来の時刻同期システムにおいて、次の改良を加える。
(Burst control)
When it is desired to correct the time error at a substantially constant cycle, such as when controlling a VCO (voltage controlled oscillator), the following improvements are added to the conventional time synchronization system using NTP.

ネットワーク1に対して時刻サーバ2と時刻クライアント3が接続している点は図2に示すものと同じであるが、時刻クライアント3は、バースト周期をI、バースト内での時刻要求パケットの送出基本周期をB、クライアントにおけるローカルな時刻をTcとした場合に、
c=k・I+h・B+d(k,h)+T0
となる時刻に時刻要求パケットの送出を行う。ここで、上述と同様に、kは任意の整数、T0は定数、Lはアプリケーションパケットもしくは伝送路の最大パケット時間長である。さらにここでは、バースト長をhmaxとして、hは0からhmaxまでの整数であり、BはB≧L+LTP+Gを満たす定数である。LTPは時刻同期パケット時間長であり、Gはパケット間の最小間隔である。d(k,h)は、{0,1,2,…,L}のいずれかの値をとる任意の変動値とする。
The time server 2 and the time client 3 are connected to the network 1 in the same manner as shown in FIG. 2 except that the time client 3 has a burst cycle of I and the basic transmission of time request packets within the burst. If the period is B and the local time at the client is T c ,
T c = k · I + h · B + d (k, h) + T 0
The time request packet is transmitted at the time. Here, as described above, k is an arbitrary integer, T 0 is a constant, and L is the maximum packet time length of an application packet or a transmission path. Further, here, assuming that the burst length is h max , h is an integer from 0 to h max , and B is a constant satisfying B ≧ L + L TP + G. L TP is the time synchronization packet time length, and G is the minimum interval between packets. d (k, h) is an arbitrary fluctuation value that takes any value of {0, 1, 2,..., L}.

このような時刻Tcにおいて時刻要求パケットを送出した場合には、各バースト内において、アプリケーションパケットと衝突しない時刻要求パケットが存在する確率が高くなるため、バースト周期での制御が可能になる。 When a time request packet is transmitted at such a time T c , the probability that there is a time request packet that does not collide with an application packet in each burst is high, so control in the burst cycle becomes possible.

図4は、このようなバースト制御を行う場合における、遅延発生器12の状態遷移を示したものである。デフォルトでの出力値をO(t)=0として、状態Aから開始される。入力パルスI(t)が到着するまでは状態Aにあり、パルスI(t)が入力されると、変数g,hにそれぞれ0を格納し、dに0からLまでの乱数を格納して、状態Bに遷移する。状態Bでは、単位時間ごとにdが0になるまで1を減じ、gを1ずつ増加させていく。
d=0になった時、出力値O(t)=1として、h<hmaxであれば状態Cに、h≧hmaxであれば状態Aに遷移する。
FIG. 4 shows the state transition of the delay generator 12 when such burst control is performed. The default output value is O (t) = 0, and the process starts from state A. Until input pulse I (t) arrives, it is in state A. When pulse I (t) is input, 0 is stored in variables g and h, and random numbers from 0 to L are stored in d. , Transition to state B. In state B, 1 is decreased until d becomes 0 every unit time, and g is increased by 1.
When d = 0, the output value O (t) = 1, and if h <h max , transition is made to state C, and if h ≧ h max , transition is made to state A.

状態Cでは、g<Bの間、単位時刻ごとにgを1ずつ増加させていく。g≧Bになった時点で、gに0を格納し、dに0からLまでの乱数を格納し、hを1増加させて状態Bに遷移する。   In state C, g is incremented by 1 for each unit time while g <B. When g ≧ B, 0 is stored in g, a random number from 0 to L is stored in d, h is incremented by 1, and a transition is made to state B.

(RTTフィルタ)
上述したように時刻クライアント3側での時刻要求パケットの送出タイミングをずらす手法において、開始タイムスタンプをt1、受信タイムスタンプをt2、送信タイムスタンプをt3、終了タイムスタンプをt4とした時、各バースト内において、時刻サーバ2からの時刻応答パケットのうち、往復伝送遅延時間RTT=(t2−t1)+(t4−t3)を最小にする時刻応答パケットの時刻情報に基づいてクライアント時刻の更新もしくはVCO制御を行うことで、高精度な同期が可能になる。これは、通信経路上のルータ(スイッチ)において過剰な遅延を受けていない、時刻情報の精確な応答パケットが選択される確率が高いためである。
(RTT filter)
As described above, in the method of shifting the transmission timing of the time request packet on the time client 3 side, the start time stamp is t 1 , the reception time stamp is t 2 , the transmission time stamp is t 3 , and the end time stamp is t 4 . The time information of the time response packet that minimizes the round-trip transmission delay time RTT = (t 2 −t 1 ) + (t 4 −t 3 ) among the time response packets from the time server 2 in each burst. Based on the update of the client time or the VCO control based on this, high-precision synchronization becomes possible. This is because there is a high probability that an accurate response packet of time information that is not subjected to excessive delay in a router (switch) on the communication path is selected.

図5は、このようにバースト内での時刻応答パケットのうち、RTTが最小である時刻応答パケットに応じて時刻同期を行う時刻クライアントの構成の一例を示すブロック図である。図5は、時刻クライアントにおける時刻応答パケットの受信に関係する部分の構成を示している。   FIG. 5 is a block diagram illustrating an example of a configuration of a time client that performs time synchronization according to a time response packet having the smallest RTT among time response packets in a burst. FIG. 5 shows a configuration of a part related to reception of a time response packet in the time client.

図5に示す時刻クライアントは、その時刻クライアントのローカル時計41を備えており、このローカル時計41の時刻を時刻サーバの時計の時刻に同期させることを目的として構成されている。時刻クライアントは、ローカル時計41からの時刻信号に基づいてバーストトリガB(t)を発生するバーストトリガ発生回路42と、時刻応答パケットを受信する受信回路43と、往復伝送遅延時間RTTを計算する伝送遅延時間計算回路(RTT)44と、サーバの時計とローカル時計41との時刻誤差Δを計算するクライアント時刻誤差計算回路(Δ)45と、往復伝送遅延時間RTTに基づきバースト内での最小伝送遅延時間RTTburstを計算するバースト内最小伝送遅延時間計算回路46と、クライアント時刻誤差Δに基づきバースト内でのクライアント時刻誤差Δburstを計算するバースト内クライアント時刻誤差計算回路47と、バーストトリガのパルスとクライアント時刻誤差Δburstとに基づいて、バースト内での最小伝送遅延時間RTTburstに基づくクライアント時刻誤差dtを計算するクライアント時刻誤差計算回路48と、クライアント時刻誤差dtに基づいてローカル時計41の時刻を修正する時刻修正回路49と、を備えている。なお、終了タイムスタンプt4を付与するために、ローカル時計41からの時刻信号は、受信回路43にも供給されている。 The time client shown in FIG. 5 includes a local clock 41 of the time client, and is configured to synchronize the time of the local clock 41 with the time of the clock of the time server. The time client, based on the time signal from the local clock 41, generates a burst trigger B (t), a burst trigger generation circuit 42, a reception circuit 43 that receives a time response packet, and a transmission that calculates a round trip transmission delay time RTT. A delay time calculation circuit (RTT) 44, a client time error calculation circuit (Δ) 45 for calculating a time error Δ between the server clock and the local clock 41, and a minimum transmission delay in the burst based on the round trip transmission delay time RTT Intra-burst minimum transmission delay time calculation circuit 46 for calculating time RTT burst , Intra-burst client time error calculation circuit 47 for calculating client time error Δ burst in burst based on client time error Δ, burst trigger pulse, Based on the client time error Δburst and the minimum transmission delay in the burst Client time error calculating circuit 48 for calculating a client time error dt based on RTT burst, provided with a time correction circuit 49 to correct the local clock time 41, the based on the client time error dt. Note that the time signal from the local clock 41 is also supplied to the receiving circuit 43 in order to give the end time stamp t 4 .

次に、この時刻クライアントの動作について説明する。   Next, the operation of this time client will be described.

ローカル時計41に基づいて不図示の時刻要求パケット送信回路によって時刻要求パケットが時刻サーバ(不図示)に送られると、時刻サーバは時刻応答パケットをこの時刻クライアントに送信する。この時刻応答パケットが受信回路43で受信されると、その時刻応答パケットに含まれる4つのタイムスタンプ(開始タイムスタンプt1、受信タイムスタンプt2、送信タイムスタンプt3及び終了タイムスタンプt4)411が伝送遅延時間計算回路44とクライアント時刻誤差計算回路45とに入力する。伝送遅延時間計算回路44は往復伝送遅延時間RTTを計算してその計算結果をバースト内最小伝送遅延時間計算回路46に供給し、クライアント時刻誤差計算回路45はクライアント時刻誤差Δを計算してその計算結果をバースト内クライアント時刻誤差計算回路47に供給する。 When a time request packet is sent to a time server (not shown) by a time request packet transmission circuit (not shown) based on the local clock 41, the time server transmits a time response packet to this time client. When the time response packet is received by the receiving circuit 43, four time stamps included in the time response packet (start timestamp t 1, reception timestamp t 2, transmission time stamp t 3 and end timestamp t 4) 411 is input to the transmission delay time calculation circuit 44 and the client time error calculation circuit 45. The transmission delay time calculation circuit 44 calculates the round-trip transmission delay time RTT and supplies the calculation result to the intra-burst minimum transmission delay time calculation circuit 46. The client time error calculation circuit 45 calculates the client time error Δ and calculates it. The result is supplied to the intra-burst client time error calculation circuit 47.

バースト内最小伝送遅延時間計算回路46は、バーストトリガ発生回路42からのパルスでRTTburst=∞にリセットされており、RTT計算結果412が入力されると、その計算結果をRTTburstの現在値と比較し、小さい方の値をRTTburstに入れる。この際、RTTbburstの値が更新されたのであれば、更新パルス413が出力し、バースト内クライアント時刻誤差計算回路47に供給される。バースト内クライアント時刻誤差計算回路47は、更新パルス413が出力された時のクライアント時刻誤差Δの値を保持し、バースト内クライアント時刻誤差Δburstとして出力する。 The intra-burst minimum transmission delay time calculation circuit 46 is reset to RTT burst = ∞ with a pulse from the burst trigger generation circuit 42. When the RTT calculation result 412 is input, the calculation result is used as the current value of the RTT burst. Compare and place the smaller value in the RTT burst . At this time, if the value of RTTb burst has been updated, an update pulse 413 is output and supplied to the intra-burst client time error calculation circuit 47. The intra-burst client time error calculation circuit 47 holds the value of the client time error Δ when the update pulse 413 is output, and outputs the value as the intra-burst client time error Δ burst .

クライアント時刻誤差計算回路48は、バーストトリガ発生回路42からのバーストトリガB(t)のパルスに同期してバースト内クライアント時刻誤差Δburstを捕捉して、クライアント時刻情報417として出力する。時刻補正回路49は、クライアント時刻誤差417の情報を基に、ローカル時計41の時刻の修正を行う。 The client time error calculation circuit 48 captures the in- burst client time error Δ burst in synchronization with the pulse of the burst trigger B (t) from the burst trigger generation circuit 42 and outputs it as client time information 417. The time correction circuit 49 corrects the time of the local clock 41 based on the information of the client time error 417.

このようにして図5に示される時刻クライアントでは、バースト内での最小伝送遅延時間RTTburstに基づいて、ローカル時計41の時刻の修正が行われることになる。 In this way, the time client shown in FIG. 5 corrects the time of the local clock 41 based on the minimum transmission delay time RTT burst in the burst .

(時刻サーバ)
次に、NTPによる従来の時刻同期における問題点を解決するための、時刻サーバ2側で行われる改良について説明する。
(Time server)
Next, the improvement performed on the time server 2 side for solving the problems in the conventional time synchronization by NTP will be described.

ネットワーク内のルータ(もしくはスイッチ)において、周期性のあるアプリケーションパケットと時刻要求パケットとが多重される場合、時刻要求パケットはアプリケーションパケット間に配置されるために、アプリケーションの周期性の影響を強く受けることになる。時刻サーバでの処理遅延が一定であるとすると、時刻要求パケットの場合と同様に、時刻サーバからの時刻応答パケットがルータ(もしくはスイッチ)において周期性のある(同一または別の)アプリケーションパケットと多重される場合には、往路及び復路のアプリケーションパケットの周期が一致もしくは単純な比率になる場合に、時刻応答パケットが常に復路のアプリケーションパケットと衝突することがある。   When a periodic application packet and a time request packet are multiplexed in a router (or switch) in the network, the time request packet is placed between application packets, and thus is strongly affected by the periodicity of the application. It will be. Assuming that the processing delay in the time server is constant, the time response packet from the time server is multiplexed with a periodic (same or different) application packet in the router (or switch) as in the case of the time request packet. In such a case, the time response packet may always collide with the return path application packet when the periods of the forward path and return path application packets coincide or become a simple ratio.

そこで、時刻サーバ2における改良として、時刻クライアント3において時刻要求パケットの送信周期にゆらぎを設けるのと同様に、時刻サーバ2においても、時刻要求パケットを受信してから時刻応答パケットを送信するまでの時間間隔にゆらぎを設定することが考えられる。図6は、このような時刻サーバ2の内部構成を示している。   Therefore, as an improvement in the time server 2, the time server 2 receives the time request packet and transmits the time response packet in the same manner as the time client 3 has a fluctuation in the transmission cycle of the time request packet. It is conceivable to set fluctuations in the time interval. FIG. 6 shows the internal configuration of such a time server 2.

時刻サーバは、時刻サーバ内の高精度な時計としての時刻カウンタ51と、時刻要求パケット510を格納するバッファ53と、時刻要求パケット510に対して遅延を与える遅延発生器52と、時刻応答パケットを生成して送信する時刻応答生成器54と、を備えている。   The time server includes a time counter 51 as a highly accurate clock in the time server, a buffer 53 that stores the time request packet 510, a delay generator 52 that gives a delay to the time request packet 510, and a time response packet. And a time response generator 54 for generating and transmitting.

この時刻サーバでは、時刻要求パケット510が到着すると、時刻カウンタ51の現在値512が受信タイムスタンプt2として、時刻要求パケット510とともにバッファ53に入力される。遅延発生器52は、時刻要求パケット510が到着すると、パケットごとに乱数によって決められた遅延d(t,k)の後に、出力パルス515を出力する。時刻応答生成器54は、出力パルス515をトリガとしてバッファ53から時刻要求パケット514の読み出しを開始し、この時点での時刻カウンタ51のカウンタ値を送信タイムスタンプt3として、時刻要求パケット514に含まれる情報と受信タイムスタンプt2と送信タイムスタンプt3とを含む時刻応答パケット511を生成して送信する。 In this time server, when the time request packet 510 arrives, the current value 512 of the time counter 51 is input to the buffer 53 together with the time request packet 510 as the reception time stamp t 2 . When the time request packet 510 arrives, the delay generator 52 outputs an output pulse 515 after a delay d (t, k) determined by a random number for each packet. The time response generator 54 starts reading the time request packet 514 from the buffer 53 using the output pulse 515 as a trigger, and the counter value of the time counter 51 at this time is included in the time request packet 514 as a transmission time stamp t 3. The time response packet 511 including the received information, the reception time stamp t 2 and the transmission time stamp t 3 is generated and transmitted.

このような時刻サーバにおいては、時刻要求パケットの受信時刻をTRX、サーバにおける時刻処理時間をS0とした場合、
S=TRX+S0+d(k)
となる時刻TSにおいて、時刻応答パケットが送出される。ここで、kは任意の整数、d(k)は0からdmax(dmax≧L;Lはアプリケーションパケットもしくは伝送路の最大パケット時間長)の値をとる任意の変動値とする。
In such a time server, when the reception time of the time request packet is T RX and the time processing time in the server is S 0 ,
T S = T RX + S 0 + d (k)
At time T S , a time response packet is transmitted. Here, k is an arbitrary integer, and d (k) is an arbitrary fluctuation value that takes a value from 0 to d max (d max ≧ L; L is the maximum packet time length of an application packet or a transmission path).

このような改良を時刻サーバに加えることで、時刻サーバからの時刻応答パケットの送出タイミングが1パケット時間長以上の分散をもつため、いかなる周期のアプリケーションパケットに対しても、ルータ(もしくはスイッチ)において復路の時刻応答パケットがアプリケーションのパケットと衝突せずに通過する場合が存在するようになる。   By adding such improvements to the time server, the transmission timing of the time response packet from the time server has a dispersion of one packet time length or more. Therefore, any application packet of any period can be received at the router (or switch). There is a case where the return time response packet passes without colliding with the application packet.

(バッファ制御)
ところで、一般に時刻クライアントは1つの時刻サーバに対して時刻同期を行うだけであるが,時刻サーバにおいては、多数の時刻クライアントからの時刻同期要求を処理する必要があり、高頻度に到着する時刻要求パケットに対応しなければならない。そこで図7に示す時刻サーバは、時刻要求パケットを格納するためのバッファを複数備えるとともに、各時刻要求パケットの受信してから対応する時刻応答パケットを送信するまでの時間間隔にゆらぎを設定するようにしたものである。
(Buffer control)
By the way, in general, the time client only performs time synchronization with respect to one time server. However, in the time server, it is necessary to process time synchronization requests from a large number of time clients, and time requests that arrive frequently. Must correspond to a packet. Therefore, the time server shown in FIG. 7 includes a plurality of buffers for storing time request packets, and sets fluctuations in the time interval from reception of each time request packet to transmission of the corresponding time response packet. It is a thing.

すなわち図7に示した時刻サーバは、時刻サーバ内の高精度な時計としての時刻カウンタ61と、N(ただしN≧2)個のバッファ63と、時刻応答パケット611を生成して送信する時刻応答生成器64と、到着した時刻要求パケット610をいずれかのバッファ63に振り分ける入力スイッチ65と、バッファ63を選択して時刻要求パケット613を時刻応答生成器64に供給する出力スイッチ66と、出力スイッチ66を制御するスケジューラ67と、を備えている。各バッファ63からは入力スイッチ65に対し、そのバッファの使用状況を示す信号616が供給されている。入力スイッチ65は、各バッファの使用状況を示す信号617をスケジューラ67に出力する。出力スイッチ66は、選択したバッファ63に対して、時刻要求パケットの出力を開始させる出力パルス615を出力する。   That is, the time server shown in FIG. 7 generates a time counter 61 as a highly accurate clock in the time server, N (where N ≧ 2) buffers 63, and a time response that generates and transmits a time response packet 611. A generator 64, an input switch 65 that distributes the time request packet 610 that has arrived to one of the buffers 63, an output switch 66 that selects the buffer 63 and supplies the time request packet 613 to the time response generator 64, and an output switch And a scheduler 67 for controlling 66. A signal 616 indicating the usage status of the buffer is supplied from each buffer 63 to the input switch 65. The input switch 65 outputs a signal 617 indicating the usage status of each buffer to the scheduler 67. The output switch 66 outputs an output pulse 615 for starting output of the time request packet to the selected buffer 63.

この時刻サーバでは、時刻要求パケット610が到着すると、入力スイッチ65は、各バッファ63の使用状況を示す信号616に基づいて、空のバッファの1つを選択し、時刻カウンタ61の現在値612を受信タイムスタンプt2として、その到着した時刻要求パケット610とともにバッファ63に格納する。スケジューラ67は、バッファの使用状況を示す信号617から、予め決められた手順でN個のバッファ63のうちの1つを選択し、その選択結果を示す選択信号618を出力スイッチ66に送る。出力スイッチ66は、選択信号618で示されるバッファに対して出力パルス615を送出し、その結果、そのバッファ63からの読み出しが開始される。時刻応答生成器54は、バッファからの読み出し時点での時刻カウンタ61のカウンタ値を送信タイムスタンプt3として、時刻要求パケット614に含まれる情報と受信タイムスタンプt2と送信タイムスタンプt3とを含む時刻応答パケット611を生成して送信する。 In this time server, when the time request packet 610 arrives, the input switch 65 selects one of the empty buffers based on the signal 616 indicating the usage status of each buffer 63, and sets the current value 612 of the time counter 61. The received time stamp t 2 is stored in the buffer 63 together with the arrival time request packet 610. The scheduler 67 selects one of the N buffers 63 from the signal 617 indicating the buffer usage status in a predetermined procedure, and sends a selection signal 618 indicating the selection result to the output switch 66. The output switch 66 sends an output pulse 615 to the buffer indicated by the selection signal 618. As a result, reading from the buffer 63 is started. The time response generator 54 uses the counter value of the time counter 61 at the time of reading from the buffer as the transmission time stamp t 3 , and uses the information included in the time request packet 614, the reception time stamp t 2, and the transmission time stamp t 3 . A time response packet 611 including this is generated and transmitted.

このような時刻サーバにおいては、受信側では時刻要求パケット及び受信時刻TRXの情報が、一旦、N個のバッファのうち空バッファの1つに蓄積される。送信側ではランダムにN個のバッファの1つが選択され、選択されたバッファが空でなければ時刻応答パケットの生成・送出を行った後、次のバッファの選択に戻る。空であった場合には、d(k)(ただしd(k)は0からdmax(dmax≧L)の値をとる任意の変動値)時間後に次のバッファの選択に戻る。ここでLは、アプリケーションパケットもしくは伝送路の最大パケット時間長である。このようにしてこの時刻サーバでは、高頻度な時刻要求パケットの到着に対し、サーバ内での遅延時間に分散を与えて時刻応答パケットの送出を行うことができる。 In such a time server, the information on the time request packet and the reception time T RX is temporarily stored in one of the N buffers in the reception side. On the transmission side, one of N buffers is selected at random, and if the selected buffer is not empty, a time response packet is generated and transmitted, and then the process returns to the selection of the next buffer. If it is empty, d (k) (where d (k) is an arbitrary variation value ranging from 0 to d max (d max ≧ L)) and returns to the selection of the next buffer. Here, L is the maximum packet time length of the application packet or the transmission path. In this way, in this time server, it is possible to distribute the delay time in the server with respect to the arrival of a high frequency time request packet and transmit the time response packet.

図8は、図7に示した時刻サーバにおけるスケジューラ67の状態遷移の一例を示している。デフォルトでの選択信号618の出力値O(t)はヌル(null)、すなわち何も選択していないものとし、初期状態をAとする。この初期状態Aから、変数sに対して1からNまでの乱数を代入し,状態Bに遷移する。s番目(ただしs≦N)のバッファの使用状況を示す信号buf[s]を参照し、s番目のバッファが空(empty)でない時には選択信号618にsを出力して状態Cに遷移する。状態Cにおいては、s番目のバッファが空になるまで選択信号618にsを出力して、空になった時に次のバッファを選択して状態Bに遷移する。この場合、次のバッファの選択も乱数に基づいて行われる。   FIG. 8 shows an example of state transition of the scheduler 67 in the time server shown in FIG. The output value O (t) of the selection signal 618 by default is null, that is, nothing is selected, and the initial state is A. From this initial state A, a random number from 1 to N is assigned to the variable s, and a transition is made to state B. The signal buf [s] indicating the usage status of the s-th (where s ≦ N) buffer is referenced. When the s-th buffer is not empty, s is output to the selection signal 618 and the state C is transited. In the state C, s is output to the selection signal 618 until the s-th buffer becomes empty, and when it becomes empty, the next buffer is selected and the state B is changed. In this case, the next buffer is also selected based on the random number.

一方、状態Bにおいてs番目のバッファが空の場合には、変数dに0からLまでの乱数を代入して状態Dに遷移する。状態Dにおいてはdを1ずつ減算していき、0以下になった時に次のバッファを選択して状態Bに遷移する。   On the other hand, when the s-th buffer is empty in state B, a random number from 0 to L is assigned to variable d and the state transitions to state D. In state D, d is decremented by 1 and when it becomes 0 or less, the next buffer is selected and transition is made to state B.

(バッファ制御の別の例)
複数のバッファを有する時刻サーバの場合、時刻要求パケットを読み出すバッファの選択に乱数を用いるのではなく、バッファに時刻要求パケットを蓄積する時点でその時刻要求パケットを読み出すタイミングを乱数に基づいて予め決めてしまうこともできる。そのような制御を行う場合は、図7に示した時刻サーバにおいて、時刻要求パケットの受信側においては、時刻要求パケット及び受信時刻TRXの情報を、一旦、N個のバッファのうちの空バッファの1つに蓄積する。同時にスケジューラ67は、時刻応答パケットの生成予約時刻をTRX+d(k)(ただしd(k)は0からdmax(dmax≧L)の値をとる任意の変動値)にセットする。このように生成予約時刻が設定され、その予約時刻に達すると、スケジューラ67は、該当するバッファを選択する。その結果、上述したものと同様にして、時刻応答生成器64が、時刻応答パケットの生成・送出を行う。なお、予約時刻に他の時刻応答パケットが送出中の場合には、現在送出中のパケットの終了を待った後、改めてその時点での送信タイムスタンプt3を用いて、該当する時刻応答パケットの生成・送出を行うことができる。
(Another example of buffer control)
In the case of a time server having a plurality of buffers, a random number is not used for selecting a buffer for reading a time request packet, but the timing for reading the time request packet at the time of accumulating the time request packet in the buffer is determined in advance based on the random number. You can also. In the case of performing such control, in the time server shown in FIG. 7, on the time request packet receiving side, the information on the time request packet and the reception time TRX is temporarily stored in an empty buffer among the N buffers. Accumulate in one of the At the same time, the scheduler 67 sets the time response packet generation reservation time to T RX + d (k) (where d (k) is an arbitrary fluctuation value that takes a value from 0 to d max (d max ≧ L)). The generation reservation time is set in this way, and when the reservation time is reached, the scheduler 67 selects the corresponding buffer. As a result, the time response generator 64 generates and transmits a time response packet in the same manner as described above. If another time response packet is being transmitted at the reserved time, after waiting for the end of the currently transmitted packet, the corresponding time response packet is generated again using the transmission time stamp t 3 at that time. -Sending can be performed.

図9は、生成予約時刻を設定するように構成されている場合のスケジューラ67の動作を示す状態遷移図である。この場合、バッファ63の使用状況を示す信号617に関係する状態遷移(状態C,D)と選択信号618に関係する状態遷移(状態A,B)とは、独立に遷移する。選択信号618のデフォルトがヌルであることは、図8の場合と同じである。   FIG. 9 is a state transition diagram showing the operation of the scheduler 67 when it is configured to set the generation reservation time. In this case, the state transition (states C and D) related to the signal 617 indicating the usage status of the buffer 63 and the state transition (states A and B) related to the selection signal 618 are independently changed. The default selection signal 618 is null as in FIG.

バッファの使用状況を示す信号617に関係する状態遷移では、初期状態Cにおいて、時刻要求パケットI(t)の入力を待ち合わせ、時刻要求パケットが到着するとその時刻要求パケットをバッファに蓄積するとともに、その時刻要求パケットI(t)に対応する時刻応答パケットの生成予約時刻をdelay{I(t)}として、delay{I(t)}に対し、0からLまでの乱数だけ現在の時刻tより遅い時刻を設定し、状態Dに遷移する。時刻要求パケットが終了すると、状態Dから状態Cに戻る。   In the state transition related to the signal 617 indicating the use status of the buffer, in the initial state C, the input of the time request packet I (t) is waited. When the time request packet arrives, the time request packet is accumulated in the buffer, and The generation reservation time of the time response packet corresponding to the time request packet I (t) is set to delay {I (t)}, and the delay {I (t)} is later than the current time t by a random number from 0 to L. A time is set and the state D is entered. When the time request packet ends, the state D is returned to the state C.

一方、選択信号618に関する状態遷移では、初期状態をAとして、予約時刻を過ぎたバッファの1つを返す関数Select(t)が有効な値sを返した時に、sを選択信号O(t)として出力し、状態Bに遷移する。状態Bでは、該当するバッファ(s番目のバッファ)からの出力の完了を待ち、生成予約時刻delay[s]をリセットして、状態Aに戻る。   On the other hand, in the state transition related to the selection signal 618, when the function Select (t) that returns one of the buffers whose reservation time has passed and the initial state is A returns a valid value s, s is selected as the selection signal O (t). And transition to state B. In the state B, the completion of output from the corresponding buffer (s-th buffer) is waited, the generation reservation time delay [s] is reset, and the state A is returned.

(サーバ・アンド・クライアントシステム)
以上、本発明に基づく時刻クライアントと時刻サーバとを説明したが、これらの時刻クライアントと時刻サーバとを組み合わせることによって、クライアントとサーバ間の通信経路において周期性を持ったアプリケーショントラフィックが存在する環境下においても、高精度な時刻同期が可能になる。図10は、上述した時刻クライアント及び時刻サーバを用いたサーバ・アンド・クライアントシステムのネットワーク構成の一例を示している。時刻クライアント91は、クライアント側のルータ93を介してサーバ側のルータ94を経て、時刻サーバ92と接続している。また、ネットワーク装置95,96がそれぞれルータ93,94に接続されトラフィックを相互に送りあうものとする。
(Server and client system)
As described above, the time client and the time server according to the present invention have been described. By combining these time client and time server, there is an environment where application traffic having periodicity exists in the communication path between the client and the server. In this case, highly accurate time synchronization is possible. FIG. 10 shows an example of a network configuration of a server-and-client system using the above-described time client and time server. The time client 91 is connected to the time server 92 via the server side router 94 via the client side router 93. Further, it is assumed that network devices 95 and 96 are connected to routers 93 and 94, respectively, and send traffic to each other.

図11は、このようなネットワーク構成のサーバ・アンド・クライアントシステムにおける各ルータにおけるパケットの到着と送出のタイミングを模式的に示したものである。   FIG. 11 schematically shows packet arrival and transmission timings in each router in the server-and-client system having such a network configuration.

(1)は、クライアント側のルータ93でのパケットの到着状況を示している。この例では、時刻クライアント91からの時刻要求パケットA1〜A3の基本周期とネットワーク装置95からの送出パケットB1〜B3の基本周期が一致しているが、時刻クライアント91において、時刻要求パケットA1〜A3の送出タイミングに対して任意の変動したタイミングを与えているので、時刻要求パケットA1,A2はネットワーク装置95からの送出パケットB1,B2と衝突するものの、時刻要求パケットA3のように、ネットワーク装置95のパケットとは衝突していない時刻要求パケットが存在する。(2)は、このような状況下でのクライアント側ルータ93からのパケット送出状況を示している。時刻要求パケットとネットワーク装置95からの送出パケットが衝突した場合には、時刻要求パケットA1a,A2aに示されるように、時刻要求パケットは、ネットワーク装置からのパケットB1a,B1bの後に送出され、過剰な遅延を受けることになる。これは時刻同期誤差の原因となる。しかしながら、時刻要求パケットA3aは、パケットB3aによる遅延を受けずに、ルータ93から送出される。したがって、時刻要求パケットA3,A3aに基づいて時刻同期を行えば、正確な時刻同期を達成できることになる。   (1) shows the arrival status of the packet at the router 93 on the client side. In this example, the basic period of the time request packets A1 to A3 from the time client 91 and the basic period of the transmission packets B1 to B3 from the network device 95 are the same, but in the time client 91, the time request packets A1 to A3. Since the time request packets A1 and A2 collide with the transmission packets B1 and B2 from the network device 95, the network device 95 is similar to the time request packet A3. There is a time request packet that does not collide with any other packet. (2) shows a packet transmission situation from the client side router 93 under such a situation. When the time request packet and the transmission packet from the network device 95 collide, as shown in the time request packets A1a and A2a, the time request packet is transmitted after the packets B1a and B1b from the network device, and excessively. You will be delayed. This causes a time synchronization error. However, the time request packet A3a is sent from the router 93 without being delayed by the packet B3a. Therefore, if time synchronization is performed based on the time request packets A3 and A3a, accurate time synchronization can be achieved.

時刻サーバ92からの復路についても同様のことが言える。(3)は、サーバ側のルータ94におけるパケットの到着状況を示しており、A1c,A2c,A3cは時刻サーバからの時刻応答パケットを表わし、C1,C2,C3はネットワーク機器96からの送出パケットを表わしている。時刻サーバも、時刻要求パケットを受信後、任意の変動した遅延を与えて時刻応答パケットを送出するので、時刻応答パケットA1b,A3bのように、ネットワーク装置96の送出パケットと衝突しない場合が存在する。(4)は、サーバ側のルータ94からのパケットの送出状況を示しているが、衝突したパケットA2bは、(4)に示すように、ネットワーク機器96からの送出パケットC2bの後にルータ94から送出され、過剰な遅延を受けるため、時刻同期誤差の原因となる。A3,A3a,A3b,A3cのように往復ともに他のパケットと衝突しなかった場合を、伝送遅延時間を計算することにより検出し,そのような場合のパケットの時刻誤差の情報を基にクライアント時刻を修正することで、高精度に時刻クライアント91と時刻サーバ92との間の同期を確立することが可能になる。   The same can be said for the return trip from the time server 92. (3) shows the arrival status of packets in the router 94 on the server side, A1c, A2c, and A3c represent time response packets from the time server, and C1, C2, and C3 represent packets sent from the network device 96. It represents. Since the time server also sends a time response packet with an arbitrary fluctuating delay after receiving the time request packet, there is a case where the time server does not collide with the transmission packet of the network device 96 like the time response packets A1b and A3b. . (4) shows the packet transmission status from the router 94 on the server side. As shown in (4), the collided packet A2b is transmitted from the router 94 after the transmission packet C2b from the network device 96. And an excessive delay causes time synchronization errors. A case where the packet does not collide with other packets in both round trips, such as A3, A3a, A3b, and A3c, is detected by calculating the transmission delay time, and the client time is determined based on the packet time error information in such a case. By correcting the above, it becomes possible to establish synchronization between the time client 91 and the time server 92 with high accuracy.

(アプリケーション装置)
次に、NTPによる従来の時刻同期における問題点を解決するための、周期性を有するアプリケーションパケットを送出する装置において行われる改良について説明する。上述した時刻クライアントでは、時刻要求パケットの生成タイミングを改良し、時刻要求パケットが一定の周期からランダムにずれた間隔で送出されるようにすることによって、時刻要求パケットや時刻応答パケットとその他のアプリケーションからのアプリケーションパケットとが衝突しない場合が必ず生じるようにしている。ここで時刻要求パケットの代わりにアプリケーションパケットの送出タイミングを一定の周期からずらすことによっても、時刻要求パケットや時刻応答パケットとその他のアプリケーションパケットとが衝突しない場合が必ず生じるようにすることができる。
(Application device)
Next, an improvement performed in an apparatus for sending application packets having periodicity for solving the problems in conventional time synchronization by NTP will be described. In the above-mentioned time client, the time request packet generation timing is improved, and the time request packet is sent out at an interval that is randomly deviated from a certain period, so that the time request packet, the time response packet, and other applications are transmitted. There is always a case where there is no collision with the application packet from. Here, even when the transmission timing of the application packet is shifted from a certain period instead of the time request packet, the case where the time request packet or the time response packet does not collide with other application packets can be surely generated.

図12は、このようにアプリケーションパケットの送出タイミングが改良されたアプリケーション装置を示すブロック図である。ここでいうアプリケーション装置とは、時刻要求パケット以外のパケットであって周期性を有するアプリケーションパケットを生成し、生成したアプリケーションパケットをネットワークに対して送出するもののことを言う。   FIG. 12 is a block diagram showing an application apparatus with improved application packet transmission timing. The application device here means a packet other than the time request packet, which generates an application packet having periodicity, and sends the generated application packet to the network.

アプリケーション装置70は、アプリケーション装置の内部時計に同期した周期I(これを基本周期という)のパルスI(t)を生成するトリガ発生器71と、パルスI(t)に遅延を与えて遅延パルスO(t)を発生する遅延発生器72と、遅延パルスO(t)に基づいて時刻要求パケットを送出するアプリケーションパケット生成器73と、を備えている。遅延発生器72は、パルスI(t)を入力とし、パルスI(t)が到着すると、周期ごとに乱数によって決められた遅延d(k)ののち、遅延パルスO(t)を出力するように構成されている。アプリケーションパケット生成器73は、遅延パルスO(t)が到着した瞬間に、アプリケーションパケットを送出するように構成されている。   The application apparatus 70 includes a trigger generator 71 that generates a pulse I (t) having a period I (this is referred to as a basic period) synchronized with the internal clock of the application apparatus, and a delay to the pulse I (t). A delay generator 72 for generating (t) and an application packet generator 73 for transmitting a time request packet based on the delay pulse O (t). The delay generator 72 receives the pulse I (t), and when the pulse I (t) arrives, outputs a delay pulse O (t) after a delay d (k) determined by a random number for each period. It is configured. The application packet generator 73 is configured to send an application packet at the moment when the delay pulse O (t) arrives.

このようなアプリケーション装置では、そのアプリケーション装置におけるローカルな時刻をTcで表わすこととすると、
c=k・I+d(k)+T0
となる時刻に、アプリケーションパケットの送出が行なわれる。ここで、kは任意の整数、T0は定数であり、またd(k)は、0からdmax(ただしL≦dmax≦I−LTP−G;Lはアプリケーションパケットもしくは伝送路の最大パケット時間長、LTPは時刻同期パケット時間長、Gはパケット間最小間隔)の値をとる任意の変動値とする。d(k)は乱数に基づいて定められるようにすることが好ましい。
In such an application device, when the local time in the application device is represented by T c ,
T c = k · I + d (k) + T 0
The application packet is transmitted at the time. Here, k is an arbitrary integer, T 0 is a constant, and d (k) is 0 to d max (where L ≦ d maxILTP− G; L is the maximum of the application packet or transmission path) The packet time length, L TP is a time synchronization packet time length, and G is an arbitrary variation value that takes the value of the minimum interval between packets. It is preferable that d (k) is determined based on a random number.

このアプリケーション装置70では、上述したような改良が加えられることにより、図12においてパケットの位置が周期Iで定まるタイミングからd(k),d(k+1),…などのようにばらついていることように、アプリケーションパケットの送出タイミングが1パケット時間長以上の分散を持つようになる。その結果、アプリケーションパケットが、ルータ(もしくはスイッチ)において、時刻要求パケットや時刻応答パケットに対しても衝突せずに通過する場合が存在するようになる。なお、アプリケーションパケットの送出タイミングにおいて、1パケット時間長以上の分散があればアプリケーションのパケットと衝突せずにルータ(もしくはスイッチ)を通過する場合が存在するので、アプリケーションパケットもしくは伝送路の最大パケット時間長をLとすると、d(k)の最大値dmaxはLで十分である。言い換えれば、dmax=Lとして運用することで、アプリケーションパケットを受信する側でのパケット受信タイミングの分散を小さくしつつ、ネットワークを共有する時刻クライアントでの時刻合わせ精度を確保できるようになる。 In the application device 70, the improvement as described above is added, and therefore the position of the packet in FIG. 12 varies from the timing determined by the period I as d (k), d (k + 1),. In addition, the transmission timing of the application packet has a dispersion of one packet time length or more. As a result, there are cases where the application packet passes through the router (or switch) without colliding with the time request packet and the time response packet. Note that if there is a dispersion of one packet time length or longer in the transmission timing of the application packet, there is a case where it passes through the router (or switch) without colliding with the application packet, so the maximum packet time of the application packet or the transmission path When the length is L, L is sufficient as the maximum value d max of d (k). In other words, by operating with d max = L, it becomes possible to secure the time adjustment accuracy at the time clients sharing the network while reducing the dispersion of the packet reception timing at the application packet receiving side.

(アプリケーション装置の共存下でのサーバ・アンド・クライアントシステム)
本発明に基づく時刻クライアント、時刻サーバ及びアプリケーション装置を組み合わせることにより、クライアントとサーバ間の通信経路においてアプリケーション装置からのアプリケーションパケットのトラフィックが存在しても、より高精度に時刻同期を行うことができるようになる。図13は、上述した時刻クライアント、時刻サーバ及びアプリケーション装置を用いたネットワーク構成の一例を示している。時刻クライアント81は、クライアント側のルータ93を介してサーバ側のルータ84を経て、時刻サーバ82と接続している。また、アプリケーション装置85,86がそれぞれルータ83,84に接続されトラフィックを相互に送りあうものとする。特にこの構成においては、アプリケーション装置85,86は、周期性を有するアプリケーションパケットを送出するものであるが、それぞれ、図12に示したような構成を有しているので、アプリケーションパケットは、その送出の基本周期からゆらぎを持って送出されるようになっている。
(Server and client system in the presence of application devices)
By combining the time client, time server, and application device according to the present invention, even when there is application packet traffic from the application device in the communication path between the client and the server, time synchronization can be performed with higher accuracy. It becomes like this. FIG. 13 shows an example of a network configuration using the above-described time client, time server, and application device. The time client 81 is connected to the time server 82 via the router 93 on the server side via the router 93 on the client side. In addition, application devices 85 and 86 are connected to routers 83 and 84, respectively, and send traffic to each other. In particular, in this configuration, the application devices 85 and 86 transmit application packets having periodicity. Since each of the application devices 85 and 86 has a configuration as shown in FIG. The basic period is sent with fluctuations.

このネットワークシステムにおいては、時刻クライアント81、時刻サーバ82及びアプリケーション装置85,86でのパケット出力のタイミングに分散があるために、各ルータ83,84においてパケット同士が衝突することなく、すなわち過剰な遅延を受けずにパケットが透過する確率が存在する。時刻クライアント81では、往復の遅延時間が小さな時刻同期パケットの情報を中心にしてそのクライアント時刻を修正することで、周期性を有するアプリケーションパケットのトラフィックの影響をさらに低減して、高精度に時刻クライアント81と時刻サーバ82との間の同期を確立することが可能になる。   In this network system, the packet output timings at the time client 81, the time server 82, and the application devices 85 and 86 are distributed, so that packets do not collide with each other at the routers 83 and 84, that is, an excessive delay. There is a probability that the packet will be transmitted without receiving. The time client 81 corrects the client time centering on the information of the time synchronization packet with a small round-trip delay time, thereby further reducing the influence of the traffic of the application packet having periodicity and highly accurately It is possible to establish synchronization between 81 and the time server 82.

時刻同期システムの基本構成を示すブロック図である。It is a block diagram which shows the basic composition of a time synchronization system. 時刻要求パケットの間隔にゆらぎが設定された時刻クライアントを示すブロック図である。It is a block diagram which shows the time client by which the fluctuation was set to the space | interval of a time request packet. 図2に示した時刻クライアントにおける遅延発生器の状態遷移図である。FIG. 3 is a state transition diagram of a delay generator in the time client shown in FIG. 2. 図2に示した時刻クライアントにおける別の例の遅延発生器の状態遷移図である。FIG. 4 is a state transition diagram of another example of the delay generator in the time client shown in FIG. 2. 時刻クライアントの構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of a time client. 時刻応答パケットの間隔にゆらぎが設定された時刻サーバを示すブロック図である。It is a block diagram which shows the time server by which the fluctuation was set to the space | interval of a time response packet. 高頻度な時刻要求パケットの到着に対して、サーバ内での遅延時間に分散を与えて時刻応答パケットを送出する時刻サーバを示すブロック図である。It is a block diagram which shows the time server which gives dispersion | distribution to the delay time in a server with respect to arrival of a high frequency time request packet, and sends a time response packet. 図7に示した時刻サーバにおけるスケジューラの状態遷移図である。It is a state transition diagram of the scheduler in the time server shown in FIG. 図7に示した時刻サーバにおける別の例のスケジューラの状態遷移図である。FIG. 8 is a state transition diagram of another example scheduler in the time server illustrated in FIG. 7. 時刻サーバと時刻クライアントとを有する時刻同期システムのネットワーク構成の一例を示す図である。It is a figure which shows an example of the network structure of the time synchronization system which has a time server and a time client. 図10に示すシステムにおける遅延時間を説明するタイミングチャートである。It is a timing chart explaining the delay time in the system shown in FIG. アプリケーションパケットの間隔にゆらぎが設定されたアプリケーション装置を示すブロック図である。It is a block diagram which shows the application apparatus with which the fluctuation | variation was set to the interval of an application packet. 時刻サーバと時刻クライアントとアプリケーション装置とを有する時刻同期システムのネットワーク構成の一例を示す図である。It is a figure which shows an example of the network structure of the time synchronization system which has a time server, a time client, and an application apparatus.

符号の説明Explanation of symbols

1 ネットワーク
2,82,92 時刻サーバ
3,81,91 時刻クライアント
11,71 トリガ発生器
12,52,72 遅延発生器
13 時刻要求パケット生成器
41 ローカル時計
42 バーストトリガ発生回路
43 受信回路
44 伝送遅延時間計算回路
45,48 クライアント時刻誤差計算回路
46 バースト内最小伝送遅延時間計算回路
47 バースト内クライアント時刻誤差計算回路
49 時刻修正回路
51,61 時刻カウンタ
53,63 バッファ
54,64 時刻応答生成器
65 入力スイッチ
66 出力スイッチ
67 スケジューラ
70,85,86 アプリケーション装置
71 アプリケーションパケット生成器
83,84,93,94 ルータ
95,96 ネットワーク装置
1 Network 2, 82, 92 Time Server 3, 81, 91 Time Client 11, 71 Trigger Generator 12, 52, 72 Delay Generator 13 Time Request Packet Generator 41 Local Clock 42 Burst Trigger Generation Circuit 43 Reception Circuit 44 Transmission Delay Time calculation circuit 45, 48 Client time error calculation circuit 46 Intra-burst minimum transmission delay time calculation circuit 47 In-burst client time error calculation circuit 49 Time correction circuit 51, 61 Time counter 53, 63 Buffer 54, 64 Time response generator 65 Input Switch 66 Output switch 67 Scheduler 70, 85, 86 Application device 71 Application packet generator 83, 84, 93, 94 Router 95, 96 Network device

Claims (18)

通信手段を介して時刻クライアントと時刻サーバ接続されており、かつ、前記通信手段にアプリケーション装置が接続されており、
前記通信手段の経路において、前記時刻クライアントから前記時刻サーバに送信される時刻要求パケットまたは前記時刻サーバから前記時刻クライアントに送信される時刻応答パケットと、前記アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、
前記時刻クライアントが前記時刻サーバに時刻要求パケットを送信し、これに対応して前記時刻サーバが前記時刻クライアントに時刻応答パケットを返信し、前記時刻要求パケットならびに前記時刻応答パケットが伝えるパケットの送受信時刻をもとに、前記時刻サーバが保持する時刻に前記時刻クライアントのローカル時計の時刻を同期させる時刻同期方法において、
前記時刻要求パケットの送出の基本周期を発生する段階と、
前記基本周期からずらして前記時刻要求パケットを生成し、生成した前記時刻要求パケットを前記時刻サーバに送出する段階と、
を有することを特徴とする、時刻同期方法。
A time client and a time server are connected via the communication means , and an application device is connected to the communication means;
A time request packet transmitted from the time client to the time server or a time response packet transmitted from the time server to the time client, and a periodic application packet transmitted by the application device in the path of the communication means Are multiplexed,
The time client transmits a time request packet to the time server, and in response thereto, the time server returns a time response packet to the time client, and the transmission / reception time of the time request packet and the packet transmitted by the time response packet Based on the above, in the time synchronization method of synchronizing the time of the local clock of the time client with the time held by the time server,
And generating the basic period of delivery of the time request packet,
The method comprising the offset from the base period to generate the time request packet, and sends the generated the time request packet to the time server,
A time synchronization method characterized by comprising:
通信手段を介して時刻クライアントと時刻サーバ接続されており、かつ、前記通信手段にアプリケーション装置が接続されており、
前記通信手段の経路において、前記時刻クライアントから前記時刻サーバに送信される時刻要求パケットまたは前記時刻サーバから前記時刻クライアントに送信される時刻応答パケットと、前記アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、
前記時刻クライアントが前記時刻サーバに時刻要求パケットを送信し、これに対応して前記時刻サーバが前記時刻クライアントに時刻応答パケットを返信し、前記時刻要求パケットならびに前記時刻応答パケットが伝えるパケットの送受信時刻をもとに、前記時刻サーバが保持する時刻に前記時刻クライアントのローカル時計の時刻を同期させる時刻同期方法において、
前記時刻要求パケットの送出の基本周期を発生する段階と、
前記基本周期ごとに、前記基本周期に対して任意に変化する遅延時間を与えて前記時刻要求パケットを生成し、生成した前記時刻要求パケットを前記時刻サーバに送出する段階と、
を有することを特徴とする、時刻同期方法。
A time client and a time server are connected via the communication means , and an application device is connected to the communication means;
A time request packet transmitted from the time client to the time server or a time response packet transmitted from the time server to the time client, and a periodic application packet transmitted by the application device in the path of the communication means Are multiplexed,
The time client transmits a time request packet to the time server, and in response thereto, the time server returns a time response packet to the time client, and the transmission / reception time of the time request packet and the packet transmitted by the time response packet Based on the above, in the time synchronization method of synchronizing the time of the local clock of the time client with the time held by the time server,
And generating the basic period of delivery of the time request packet,
For each of the basic period, the steps of the given delay time arbitrarily changed with respect to the fundamental period to generate the time request packet, and sends the generated the time request packet to the time server,
A time synchronization method characterized by comprising:
通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、前記通信手段にアプリケーション装置が接続されており、
前記通信手段の経路において、前記時刻クライアントから前記時刻サーバに送信される時刻要求パケットまたは前記時刻サーバから前記時刻クライアントに送信される時刻応答パケットと、前記アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、
前記時刻クライアントが前記時刻サーバに時刻要求パケットを送信し、これに対応して前記時刻サーバが前記時刻クライアントに時刻応答パケットを返信し、前記時刻要求パケットならびに前記時刻応答パケットが伝えるパケットの送受信時刻をもとに、前記時刻サーバが保持する時刻に前記時刻クライアントのローカル時計の時刻を同期させる時刻同期方法において、
前記時刻要求パケットを受信した際に、任意に変化する遅延時間を与えた後に、受信した前記時刻要求パケットに対応する前記時刻応答パケットを送出する段階
を有することを特徴とする、時刻同期方法。
A time client and a time server are connected via the communication means , and an application device is connected to the communication means;
A time request packet transmitted from the time client to the time server or a time response packet transmitted from the time server to the time client, and a periodic application packet transmitted by the application device in the path of the communication means Are multiplexed,
The time client transmits a time request packet to the time server, and in response thereto, the time server returns a time response packet to the time client, and the transmission / reception time of the time request packet and the packet transmitted by the time response packet Based on the above, in the time synchronization method of synchronizing the time of the local clock of the time client with the time held by the time server ,
When receiving the time request packet, after giving a delay time that varies arbitrarily, the step of sending the time response packet corresponding to the time request packet received
A time synchronization method characterized by comprising:
前記時刻要求パケットに対応した時刻応答パケットを受信して往復伝送遅延時間を求める段階と、
複数の前記往復伝送遅延時間のうちの最小のものに基づいて前記ローカル時計を修正する段階と、
をさらに有する、請求項2または3に記載の時刻同期方法。
Receiving a time response packet corresponding to the time request packet to determine a round trip transmission delay time;
Modifying the local clock based on a minimum of a plurality of the round trip transmission delay times;
The time synchronization method according to claim 2, further comprising:
通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、前記通信手段にアプリケーション装置が接続されており、
前記通信手段の経路において、前記時刻クライアントから前記時刻サーバに送信される時刻要求パケットまたは前記時刻サーバから前記時刻クライアントに送信される時刻応答パケットと、前記アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、
前記時刻クライアントが前記時刻サーバに時刻要求パケットを送信し、これに対応して前記時刻サーバが前記時刻クライアントに時刻応答パケットを返信し、前記時刻要求パケットならびに前記時刻応答パケットが伝えるパケットの送受信時刻をもとに、前記時刻サーバが保持する時刻に前記時刻クライアントのローカル時計の時刻を同期させる時刻同期方法において、
記アプリケーション装置において、
アプリケーションパケットの送出の基本周期を発生する段階と、
記基本周期ごとに、前記基本周期に対して任意に変化する遅延時間を与えて前記アプリケーションパケットを生成し、生成したアプリケーションパケットを前記通信手段に送出する段階と、
を有することを特徴とする、時刻同期方法。
A time client and a time server are connected via the communication means , and an application device is connected to the communication means;
A time request packet transmitted from the time client to the time server or a time response packet transmitted from the time server to the time client, and a periodic application packet transmitted by the application device in the path of the communication means Are multiplexed,
The time client transmits a time request packet to the time server, and in response thereto, the time server returns a time response packet to the time client, and the transmission / reception time of the time request packet and the packet transmitted by the time response packet Based on the above, in the time synchronization method of synchronizing the time of the local clock of the time client with the time held by the time server ,
In previous Kia application equipment,
Generating a basic period for sending application packets; and
Before each Symbol fundamental period, the steps of the generating the application packet is given a delay time that any changes to the basic cycle, and sends the generated application packet to the communication unit,
A time synchronization method characterized by comprising:
通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、前記通信手段にアプリケーション装置が接続されており、
前記通信手段の経路において、前記時刻クライアントから前記時刻サーバに送信される時刻要求パケットまたは前記時刻サーバから前記時刻クライアントに送信される時刻応答パケットと、前記アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、
前記時刻クライアントが前記時刻サーバに時刻要求パケットを送信し、これに対応して前記時刻サーバが前記時刻クライアントに時刻応答パケットを返信し、前記時刻要求パケットならびに前記時刻応答パケットが伝えるパケットの送受信時刻をもとに、前記時刻サーバが保持する時刻に前記時刻クライアントのローカル時計の時刻を同期させるシステムにおける時刻クライアントにおいて、
時刻要求パケットを一定周期からはずして送出することを特徴とする、時刻クライアント。
A time client and a time server are connected via the communication means, and an application device is connected to the communication means;
A time request packet transmitted from the time client to the time server or a time response packet transmitted from the time server to the time client, and a periodic application packet transmitted by the application device in the path of the communication means Are multiplexed,
The time client transmits a time request packet to the time server, and in response thereto, the time server returns a time response packet to the time client, and the transmission / reception time of the time request packet and the packet transmitted by the time response packet In the time client in the system that synchronizes the time of the local clock of the time client with the time held by the time server ,
A time client, characterized in that the time request packet is sent out of a certain period.
信手段を介して時刻クライアントと時刻サーバ接続されておりかつ、前記通信手段にアプリケーション装置が接続されており、
前記通信手段の経路において、前記時刻クライアントから前記時刻サーバに送信される時刻要求パケットまたは前記時刻サーバから前記時刻クライアントに送信される時刻応答パケットと、前記アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、
前記時刻クライアントが前記時刻サーバに時刻要求パケットを送信し、これに対応して前記時刻サーバが前記時刻クライアントに時刻応答パケットを返信し、前記時刻要求パケットならびに前記時刻応答パケットが伝えるパケットの送受信時刻をもとに、前記時刻サーバが保持する時刻に前記時刻クライアントの前記ローカル時計の時刻を同期させるシステムにおける時刻クライアントにおいて、
時刻要求パケットの送出の基本周期を発生するタイミング発生手段と、
前記基本周期に対して任意に変化する遅延時間dを与えて前記時刻要求パケットを生成し、生成した時刻要求パケットを前記時刻サーバに送出するパケット生成手段と、
を有することを特徴とする時刻クライアント。
Is connected to the time client and time server via the communication means, and the application device is connected to said communication means,
A time request packet transmitted from the time client to the time server or a time response packet transmitted from the time server to the time client, and a periodic application packet transmitted by the application device in the path of the communication means Are multiplexed,
The time client transmits a time request packet to the time server, and in response thereto, the time server returns a time response packet to the time client, and the transmission / reception time of the time request packet and the packet transmitted by the time response packet In the time client in the system that synchronizes the time of the local clock of the time client with the time held by the time server ,
Timing generating means for generating a basic period of transmission of a time request packet;
A packet generation means for generating the time request packet by giving a delay time d arbitrarily changing with respect to the basic period, and sending the generated time request packet to the time server;
A time client characterized by comprising:
前記任意に変化する遅延時間dは、Lを前記通信手段におけるアプリケーションパケットもしくは伝送路の最大パケット時間長、Ltpを前記時刻要求パケットのパケット長、Gをパケット間最小間隔、Iを前記基本周期として、
0≦d≦dmax (ただし、L≦dmax≦I−Ltp−G)
を満たすようにランダムに決められる遅延時間である、請求項7に記載の時刻クライアント。
The arbitrarily changing delay time d is such that L is the maximum packet time length of the application packet or transmission path in the communication means, L tp is the packet length of the time request packet, G is the minimum interval between packets, and I is the basic period. As
0 ≦ d ≦ d max (where L ≦ d max ≦ I−L tp −G)
The time client according to claim 7, wherein the time client is a delay time randomly determined so as to satisfy.
前記時刻要求パケットに対応した時刻応答パケットを前記時刻サーバから受信する手段と、
前記受信した時刻応答パケットに基づいて往復伝送遅延時間を求める手段と、
複数の前記往復伝送遅延のうちの最小ものに対応する時刻応答パケットに含まれる時刻情報に基づいて、前記ローカル時計が示す時刻を更新する更新手段と、
を有する、請求項7または8に記載の時刻クライアント。
Means for receiving a time response packet corresponding to the time request packet from the time server;
Means for determining a round trip transmission delay time based on the received time response packet;
Updating means for updating the time indicated by the local clock based on time information included in a time response packet corresponding to a minimum one of the plurality of round-trip transmission delays;
The time client according to claim 7 or 8, comprising:
前記時刻要求パケットの送出の基本周期よりも長い時間長のバースト時間を設定するバースト時間設定手段をさらに備え、
前記バースト時間内において前記往復伝送遅延時間を最小にする前記時刻応答パケットの時刻情報に基づいて、前記時刻の更新が行われる、請求項9に記載の時刻クライアント。
Burst time setting means for setting a burst time with a length longer than the basic period of transmission of the time request packet;
The time client according to claim 9, wherein the time is updated based on time information of the time response packet that minimizes the round trip transmission delay time within the burst time.
通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、前記通信手段にアプリケーション装置が接続されており、
前記通信手段の経路において、前記時刻クライアントから前記時刻サーバに送信される時刻要求パケットまたは前記時刻サーバから前記時刻クライアントに送信される時刻応答パケットと、前記アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、
前記時刻クライアントが前記時刻サーバに時刻要求パケットを送信し、これに対応して前記時刻サーバが前記時刻クライアントに時刻応答パケットを返信し、前記時刻要求パケットならびに前記時刻応答パケットが伝えるパケットの送受信時刻をもとに、前記時刻サーバが保持する時刻に前記時刻クライアントのローカル時計の時刻を同期させるシステムにおける時刻サーバにおいて、
前記時刻応答パケットを受信した時点からの、任意に変化する遅延時間dを与えた後に前記時刻応答パケットを送出する手段を有することを特徴とする時刻サーバ。
A time client and a time server are connected via the communication means , and an application device is connected to the communication means;
A time request packet transmitted from the time client to the time server or a time response packet transmitted from the time server to the time client, and a periodic application packet transmitted by the application device in the path of the communication means Are multiplexed,
The time client transmits a time request packet to the time server, and in response thereto, the time server returns a time response packet to the time client, and the transmission / reception time of the time request packet and the packet transmitted by the time response packet In the time server in the system for synchronizing the time of the local clock of the time client to the time held by the time server,
A time server comprising: means for transmitting the time response packet after giving a delay time d that arbitrarily changes from the time when the time response packet is received.
前記任意に変化する遅延時間dは、Lを前記通信手段におけるアプリケーションパケットもしくは伝送路の最大パケット時間長として、
0≦d≦dmax(ただし、L≦dmax
を満たすようにランダムに決められる遅延時間である、請求項11に記載の時刻サーバ。
The arbitrarily changing delay time d is L, where L is the application packet in the communication means or the maximum packet time length of the transmission path,
0 ≦ d ≦ d max (where L ≦ d max )
The time server according to claim 11, wherein the time server is a delay time that is randomly determined so as to satisfy.
通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、前記通信手段にアプリケーション装置が接続されており、
前記通信手段の経路において、前記時刻クライアントから前記時刻サーバに送信される時刻要求パケットまたは前記時刻サーバから前記時刻クライアントに送信される時刻応答パケットと、前記アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、
前記時刻クライアントが前記時刻サーバに時刻要求パケットを送信し、これに対応して前記時刻サーバが前記時刻クライアントに時刻応答パケットを返信し、前記時刻要求パケットならびに前記時刻応答パケットが伝えるパケットの送受信時刻をもとに、前記時刻サーバが保持する時刻に前記時刻クライアントのローカル時計の時刻を同期させるシステムにおける時刻サーバにおいて、
前記時刻要求パケットをそれぞれ蓄積することが可能な複数のバッファと、
前記時刻要求パケットを受信したときに、前記複数のバッファのうちの空バッファの1つに当該時刻要求パケットを蓄積する入力スイッチ手段と、
前記複数のバッファのうちの1つのランダムに選択し、選択されたバッファが空であればランダムな時間の経過後に次のバッファの選択を行うスケジューラ手段と、
前記スケジューラ手段で選択されたバッファが空でないときに当該バッファに蓄積された時刻要求パケットに基づいて前記時刻応答パケットを生成し送出する時刻応答パケット生成手段と、
を備えることを特徴とする時刻サーバ。
A time client and a time server are connected via the communication means , and an application device is connected to the communication means;
A time request packet transmitted from the time client to the time server or a time response packet transmitted from the time server to the time client, and a periodic application packet transmitted by the application device in the path of the communication means Are multiplexed,
The time client transmits a time request packet to the time server, and in response thereto, the time server returns a time response packet to the time client, and the transmission / reception time of the time request packet and the packet transmitted by the time response packet In the time server in the system for synchronizing the time of the local clock of the time client to the time held by the time server,
A plurality of buffers each capable of storing the time request packet;
Input switch means for storing the time request packet in one of the empty buffers of the plurality of buffers when the time request packet is received;
Scheduler means for randomly selecting one of the plurality of buffers and selecting a next buffer after a lapse of random time if the selected buffer is empty;
Time response packet generation means for generating and sending the time response packet based on the time request packet stored in the buffer when the buffer selected by the scheduler means is not empty;
A time server comprising:
通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、前記通信手段にアプリケーション装置が接続されており、
前記通信手段の経路において、前記時刻クライアントから前記時刻サーバに送信される時刻要求パケットまたは前記時刻サーバから前記時刻クライアントに送信される時刻応答パケットと、前記アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、
前記時刻クライアントが前記時刻サーバに時刻要求パケットを送信し、これに対応して前記時刻サーバが前記時刻クライアントに時刻応答パケットを返信し、前記時刻要求パケットならびに前記時刻応答パケットが伝えるパケットの送受信時刻をもとに、前記時刻サーバが保持する時刻に前記時刻クライアントのローカル時計の時刻を同期させるシステムにおける時刻サーバにおいて、
前記時刻要求パケットをそれぞれ蓄積することが可能な複数のバッファと、
前記時刻要求パケットを受信したときに、前記複数のバッファのうちの空バッファの1つに当該時刻要求パケットを蓄積する入力スイッチ手段と、
前記時刻要求パケットを前記バッファに蓄積する際に、当該時刻要求パケットに対応する時刻応答パケットの生成予約時刻をランダムに設定し、当該生成予約時刻になったときに対応するバッファを選択するスケジューラ手段と、
前記スケジューラ手段で選択されたバッファに蓄積された時刻要求パケットに基づいて前記時刻応答パケットを生成し送出する時刻応答パケット生成手段と、
を備えることを特徴とする時刻サーバ。
A time client and a time server are connected via the communication means , and an application device is connected to the communication means;
A time request packet transmitted from the time client to the time server or a time response packet transmitted from the time server to the time client, and a periodic application packet transmitted by the application device in the path of the communication means Are multiplexed,
The time client transmits a time request packet to the time server, and in response thereto, the time server returns a time response packet to the time client, and the transmission / reception time of the time request packet and the packet transmitted by the time response packet In the time server in the system for synchronizing the time of the local clock of the time client to the time held by the time server,
A plurality of buffers each capable of storing the time request packet;
Input switch means for storing the time request packet in one of the empty buffers of the plurality of buffers when the time request packet is received;
When storing the time request packet in the buffer, scheduler means for randomly setting a generation reservation time of a time response packet corresponding to the time request packet and selecting a buffer corresponding to the generation reservation time When,
Time response packet generating means for generating and sending the time response packet based on the time request packet stored in the buffer selected by the scheduler means;
A time server comprising:
通信手段を介して時刻クライアントと時刻サーバが接続されており、かつ、前記通信手段に、ローカル時計を備えて前記通信手段に対してアプリケーションパケットを送出するアプリケーション装置が接続されており、
前記通信手段の経路において、前記時刻クライアントから前記時刻サーバに送信される時刻要求パケットまたは前記時刻サーバから前記時刻クライアントに送信される時刻応答パケットと、前記アプリケーション装置が送出する周期性のあるアプリケーションパケットが多重されており、
前記時刻クライアントが前記時刻サーバに時刻要求パケットを送信し、これに対応して前記時刻サーバが前記時刻クライアントに時刻応答パケットを返信し、前記時刻要求パケットならびに前記時刻応答パケットが伝えるパケットの送受信時刻をもとに、前記時刻サーバが保持する時刻に前記時刻クライアントのローカル時計の時刻を同期させるシステムにおける、前記通信手段に接続されたアプリケーション装置において、
前記アプリケーションパケットの送出の基本周期を発生するタイミング発生手段と、
前記基本周期に対して任意に変化する遅延時間dを与えて前記アプリケーションパケットを生成し、生成したアプリケーションパケットを前記通信手段に送出するパケット生成手段と、
を有することを特徴とするアプリケーション装置。
A time client and a time server are connected via a communication means, and an application device that is provided with a local clock and sends an application packet to the communication means is connected to the communication means,
A time request packet transmitted from the time client to the time server or a time response packet transmitted from the time server to the time client, and a periodic application packet transmitted by the application device in the path of the communication means Are multiplexed,
The time client transmits a time request packet to the time server, and in response thereto, the time server returns a time response packet to the time client, and the transmission / reception time of the time request packet and the packet transmitted by the time response packet In the application device connected to the communication means in the system that synchronizes the time of the local clock of the time client with the time held by the time server ,
Timing generating means for generating a basic period of transmission of the application packet;
Packet generating means for generating the application packet by giving a delay time d arbitrarily changing with respect to the basic period, and sending the generated application packet to the communication means;
An application device comprising:
前記任意に変化する遅延時間dは、Lを前記通信手段におけるアプリケーションパケットもしくは伝送路の最大パケット時間長、Ltpを前記時刻要求パケットのパケット長、Gをパケット間最小間隔、Iを前記基本周期として、
0≦d≦dmax (ただし、L≦dmax≦I−Ltp−G)
を満たすようにランダムに決められる遅延時間である、請求項15に記載のアプリケーション装置。
The arbitrarily changing delay time d is such that L is the maximum packet time length of the application packet or transmission path in the communication means, L tp is the packet length of the time request packet, G is the minimum interval between packets, and I is the basic period. As
0 ≦ d ≦ d max (where L ≦ d max ≦ I−L tp −G)
The application device according to claim 15, wherein the delay time is randomly determined so as to satisfy.
請求項6乃至10のいずれか1項に記載の時刻クライアントと、請求項11乃至14のいずれか1項に記載の時刻サーバと、を有する時刻同期システム。   A time synchronization system comprising: the time client according to any one of claims 6 to 10; and the time server according to any one of claims 11 to 14. 請求項6乃至10のいずれか1項に記載の時刻クライアントと、請求項11乃至14のいずれか1項に記載の時刻サーバと、請求項15または16に記載のアプリケーション装置と、を有する時刻同期システム。   A time synchronization comprising the time client according to any one of claims 6 to 10, the time server according to any one of claims 11 to 14, and the application device according to claim 15 or 16. system.
JP2005346686A 2005-11-30 2005-11-30 Time synchronization method, time client, time server, application device, and time synchronization system Active JP4542027B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005346686A JP4542027B2 (en) 2005-11-30 2005-11-30 Time synchronization method, time client, time server, application device, and time synchronization system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005346686A JP4542027B2 (en) 2005-11-30 2005-11-30 Time synchronization method, time client, time server, application device, and time synchronization system

Publications (2)

Publication Number Publication Date
JP2007158425A JP2007158425A (en) 2007-06-21
JP4542027B2 true JP4542027B2 (en) 2010-09-08

Family

ID=38242251

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005346686A Active JP4542027B2 (en) 2005-11-30 2005-11-30 Time synchronization method, time client, time server, application device, and time synchronization system

Country Status (1)

Country Link
JP (1) JP4542027B2 (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5448679B2 (en) * 2009-09-25 2014-03-19 三菱電機株式会社 Wireless base station equipment
JP5675703B2 (en) 2012-06-04 2015-02-25 株式会社東芝 Communication device, control device, and program
JP5923430B2 (en) * 2012-10-09 2016-05-24 株式会社日立製作所 Communication control device
JP6010802B2 (en) * 2013-02-22 2016-10-19 東日本電信電話株式会社 Time synchronization system, time synchronization method, slave node, and computer program
JP6171595B2 (en) 2013-06-07 2017-08-02 富士通株式会社 Packet relay device and packet transmission device
KR101604303B1 (en) 2013-10-30 2016-03-18 삼성에스디에스 주식회사 Apparatus and Method for Executing Update and Recording Medium Using the Same, Server and Method for Providing Update
JP6327866B2 (en) * 2014-01-28 2018-05-23 東芝エネルギーシステムズ株式会社 Protection relay device and protection system
CN103841210B (en) * 2014-03-21 2017-03-15 上海富欣智能交通控制有限公司 It is method of data synchronization that adjustable main is standby
JP6499018B2 (en) * 2015-06-05 2019-04-10 株式会社東芝 COMMUNICATION DEVICE, COMMUNICATION SYSTEM, ESTIMATION METHOD, AND PROGRAM
JP6523058B2 (en) * 2015-06-05 2019-05-29 株式会社東芝 Communication system and estimation method
CN106647228B (en) * 2016-12-05 2020-06-16 许继集团有限公司 Converter station master clock fault judgment system
US10340980B1 (en) * 2018-05-07 2019-07-02 Landis+Gyr Technologies, Llc Time synchronization apparatuses and methods for power-distribution systems and the like
JP7278074B2 (en) 2018-12-27 2023-05-19 キヤノン株式会社 Time synchronization system, time synchronization system control method, radiation imaging system, time client, time client control method
CN114553354A (en) * 2021-12-16 2022-05-27 深圳市太铭科技有限公司 Method for keeping clock synchronization of NTP (network time protocol) server

Also Published As

Publication number Publication date
JP2007158425A (en) 2007-06-21

Similar Documents

Publication Publication Date Title
JP4542027B2 (en) Time synchronization method, time client, time server, application device, and time synchronization system
US10666371B2 (en) System for establishing and maintaining a clock reference indicating one-way latency in a data network
EP1350355B1 (en) Time synchronization in computer network
US10178009B2 (en) Method, a computer program product, and a carrier for indicating one-way latency in a data network
US7483448B2 (en) Method and system for the clock synchronization of network terminals
EP1990938A1 (en) Method for synchronizing a clock of a network component with a clock of a further network component and network component therefor
CN102577194B (en) System and method of synchronizing clocks in a distributed network
US8923367B2 (en) Communication apparatus, communication system, and communication method
EP1346507B1 (en) Method for synchronization in a local area network including a store-and-forward device
JP2005253033A (en) Network synchronization device, clock transmission method, and clock transmission packet network
KR20090024170A (en) Network time protocol precision timestamping service
US20120005716A1 (en) Systems and methods for video statistical multiplexing adapting to internet protocol networks
JP2000332802A (en) Communication method, communication system, communication terminal and repeater
JP2014027437A (en) Communication device, communication system, synchronization processing method, and program
JP5675703B2 (en) Communication device, control device, and program
Diarra et al. Improved clock synchronization start-up time for Ethernet AVB-based in-vehicle networks
TW201628363A (en) Method of transmitting data between network devices over a non-deterministic network
KR20100048124A (en) Time synchronization method in bridged local area network
JP2001244932A (en) Method and system for measuring network delay
JP2009153055A (en) Relay apparatus, receiver, and transmitter
JP4170882B2 (en) Network synchronization device, clock transmission method, and clock transmission packet network
Kim et al. One-way delay estimation without clock sychronization
JP7278074B2 (en) Time synchronization system, time synchronization system control method, radiation imaging system, time client, time client control method
JP2006148774A (en) Synchronizing device
Ou et al. The one-way delay measurement algorithm on to time synchronization of NTP

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100317

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100517

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100624

R150 Certificate of patent or registration of utility model

Ref document number: 4542027

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130702

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350