JP4467478B2 - Transmission apparatus and time synchronization method - Google Patents

Transmission apparatus and time synchronization method Download PDF

Info

Publication number
JP4467478B2
JP4467478B2 JP2005204683A JP2005204683A JP4467478B2 JP 4467478 B2 JP4467478 B2 JP 4467478B2 JP 2005204683 A JP2005204683 A JP 2005204683A JP 2005204683 A JP2005204683 A JP 2005204683A JP 4467478 B2 JP4467478 B2 JP 4467478B2
Authority
JP
Japan
Prior art keywords
time
value
transmission
packet
minimum
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.)
Expired - Fee Related
Application number
JP2005204683A
Other languages
Japanese (ja)
Other versions
JP2007027985A (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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2005204683A priority Critical patent/JP4467478B2/en
Publication of JP2007027985A publication Critical patent/JP2007027985A/en
Application granted granted Critical
Publication of JP4467478B2 publication Critical patent/JP4467478B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、伝送装置および時刻同期方法に関し、特に、時刻の同期を行なう伝送装置および時刻同期方法に関する。   The present invention relates to a transmission apparatus and a time synchronization method, and more particularly, to a transmission apparatus and a time synchronization method that perform time synchronization.

ネットワークに接続された複数の端末間で時刻を合わせることは、従来からなされていることであるが、ネットワークの性質により3つの場合に分けることができる。   Although it has been conventionally performed to synchronize the time between a plurality of terminals connected to the network, it can be divided into three cases depending on the nature of the network.

1つ目は、時刻情報を専用に伝送する媒体が存在する場合である。たとえば、電波時計の利用、GPSの利用、ISDN回線を用いた共通クロックの供給、商用電源による同期などの方法がある。   The first is a case where there is a medium for transmitting time information exclusively. For example, there are methods such as using a radio clock, using GPS, supplying a common clock using an ISDN line, and synchronizing with a commercial power source.

2つ目は、時刻情報を専用に伝送する媒体は存在せず、時刻情報を確定的な遅延時間で受信できる場合である。たとえば、IEEE802.11規格無線LANには、TSF(Timing Synchronization Function)という時刻同期を取るための機能がある。   The second case is a case where there is no medium for transmitting time information exclusively, and the time information can be received with a definite delay time. For example, the IEEE 802.11 standard wireless LAN has a function for time synchronization called TSF (Timing Synchronization Function).

この方法においては、無線LAN上のAP(アクセスポイント)がタイミング・マスタとなり、周期的に送信するビーコン信号に時刻情報を含めてブロードキャスト送信する。各STA(端末)は、ビーコン信号を受信し、それに含まれる時刻情報に基づいて自局のタイマを合わせる。APがビーコン信号を送信してから、STAがビーコン信号を受信するまでの遅延時間は確定的である。   In this method, an AP (access point) on the wireless LAN serves as a timing master, and broadcast transmission is performed including time information in a beacon signal periodically transmitted. Each STA (terminal) receives a beacon signal and adjusts its own timer based on time information included therein. The delay time from when the AP transmits the beacon signal to when the STA receives the beacon signal is deterministic.

3つ目は、時刻情報を専用に伝送する媒体は存在せず、時刻情報を受信するまでの遅延時間が確定的でない場合である。このような場合に時刻を合わせる技術は、David L. Mills, “Network Time Protocol (Version 3) Specification, Implementation and Analysis”,[online], IETF RFC-1305, Mar. 1992,[平成17年6月29日検索],インターネット<URL http://www.faqs.org/rfcs/rfc1305.html>(非特許文献1)、David L. Mills, “Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI”, [online], IETF RFC-2030, Oct. 1996, [平成17年6月29日検索],インターネット<URL http://www.faqs.org/rfcs/rfc2030.html>(非特許文献2)、David L. Mills, “Internet time synchronization: the Network Time Protocol”, IEEE Trans. Communications COM-39, 10 (October 1991), 1482-1493. [平成17年6月29日検索],インターネット<URL http://www.eecis.udel.edu/~mills/database/papers/trans.pdf>(非特許文献3)および特開平10―303987号公報(特許文献1)に開示されている。   The third is a case where there is no dedicated medium for transmitting time information and the delay time until the time information is received is not deterministic. The technology for adjusting the time in such a case is described in David L. Mills, “Network Time Protocol (Version 3) Specification, Implementation and Analysis”, [online], IETF RFC-1305, Mar. 1992, [June 2005]. 29 days search], Internet <URL http://www.faqs.org/rfcs/rfc1305.html> (Non-Patent Document 1), David L. Mills, “Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI ”, [online], IETF RFC-2030, Oct. 1996, [searched on June 29, 2005], Internet <URL http://www.faqs.org/rfcs/rfc2030.html> (non-patent Reference 2), David L. Mills, “Internet time synchronization: the Network Time Protocol”, IEEE Trans. Communications COM-39, 10 (October 1991), 1482-1493. [Search June 29, 2005], Internet <URL http://www.eecis.udel.edu/~mills/database/papers/trans.pdf> (Non-Patent Document 3) and JP-A-10-303987 (Patent Document 1) The

David L. Mills, “Network Time Protocol (Version 3) Specification, Implementation and Analysis”,[online], IETF RFC-1305, Mar. 1992,[平成17年6月29日検索],インターネット<URL http://www.faqs.org/rfcs/rfc1305.html>(非特許文献1)、および、David L. Mills, “Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI”, [online], IETF RFC-2030, Oct. 1996, [平成17年6月29日検索],インターネット<URL http://www.faqs.org/rfcs/rfc2030.html>(非特許文献2)は、それぞれ、NTP(Network Time Protocol)およびSNTP(Simple NTP)の仕様書である。   David L. Mills, “Network Time Protocol (Version 3) Specification, Implementation and Analysis”, [online], IETF RFC-1305, Mar. 1992, [Search June 29, 2005], Internet <URL http: / /www.faqs.org/rfcs/rfc1305.html> (Non-Patent Document 1), and David L. Mills, “Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI”, [online], IETF RFC-2030, Oct. 1996, [Searched on June 29, 2005], Internet <URL http://www.faqs.org/rfcs/rfc2030.html> (Non-Patent Document 2) is an NTP ( This is a specification of Network Time Protocol) and SNTP (Simple NTP).

NTPは、IPネットワーク上で時刻を合わせるための一般的なプロトコルである。NTPは、RFC(Request For Comment)−1305、または、その簡易版のSNTP(Simple NTP)RFC−2030のことを指す。   NTP is a general protocol for adjusting time on an IP network. NTP refers to RFC (Request For Comment) -1305 or a simplified version of SNTP (Simple NTP) RFC-2030.

NTPはインターネット上で時刻を合わせるために広く普及している。
図18は、NTPを用いる時刻合わせの手法を説明するための図である。図18を参照して、NTPを用いる時刻合わせの手法では、以下の(1)、(2)、(3)の順に処理が行われる。なお、C,Cはクライアント側のタイムスタンプを示す。S,Sはサーバー側のタイムスタンプを示す。
(1)クライアントはサーバーにパケットを送信する(時刻C)。
(2)サーバーはクライアントからパケットを受信し(時刻S)、送信元アドレスをあて先にして送り返す(時刻S)。
(3)クライアントはサーバーからパケットを受信する(時刻C)。
(1)、(2)、(3)の処理における各パケットにはC,S,Sのタイムスタンプが含まれる。
NTP is widely used for setting the time on the Internet.
FIG. 18 is a diagram for explaining a time adjustment method using NTP. Referring to FIG. 18, in the time adjustment method using NTP, processing is performed in the following order (1), (2), and (3). C 1 and C 2 indicate time stamps on the client side. S 1 and S 2 indicate time stamps on the server side.
(1) The client transmits a packet to the server (time C 1 ).
(2) The server receives the packet from the client (time S 1 ), and sends it back with the source address as the destination (time S 2 ).
(3) The client receives a packet from the server (time C 2 ).
Each packet in the processes (1), (2), and (3) includes a time stamp of C 1 , S 1 , and S 2 .

ラウンドトリップ時間(往復の伝送遅延時間)δiは、以下の式(101)〜式(103)により求められる。
a=S−C ・・・(101)
b=S−C ・・・(102)
δi=a−b ・・・(103)
クライアントのサーバーに対するクロックオフセット(時刻のずれ)θiは、以下の式(104)により求められる。
θi=(a+b)/2 ・・・(104)
また、真のクロックオフセットをθとすると、真のクロックオフセットθは、以下の式(105)により評価できる(非特許文献3参照)。そのため、クロックオフセットθiの誤差が、ラウンドトリップ時間δiより大きくなることはない。
θi−δi/2≦θ≦θi+δi/2 ・・・(105)
これは、ラウンドトリップ時間が大きいデータを使うと、クロックオフセットθiの誤差が大きくなる可能性があることを意味している。
The round trip time (round trip transmission delay time) δi is obtained by the following equations (101) to (103).
a = S 1 -C 1 (101)
b = S 2 -C 2 (102)
δi = a−b (103)
The clock offset (time shift) θi with respect to the server of the client is obtained by the following equation (104).
θi = (a + b) / 2 (104)
When the true clock offset is θ, the true clock offset θ can be evaluated by the following equation (105) (see Non-Patent Document 3). Therefore, the error of the clock offset θi does not become longer than the round trip time δi.
θi−δi / 2 ≦ θ ≦ θi + δi / 2 (105)
This means that if data having a large round trip time is used, the error of the clock offset θi may increase.

このため、NTPでは、一回の補正において、パケットを複数回送受信して、ラウンドトリップ時間δiが最小の時のデータを使って、クロックオフセットθiとして採用することが行なわれることがある。これをデータフィルタと呼ぶ。   For this reason, in NTP, in one correction, a packet may be transmitted and received a plurality of times and used as the clock offset θi using data when the round trip time δi is minimum. This is called a data filter.

さらに、NTPでは、クロックオフセットθをループフィルタにかけて、その結果を元にPLL(Phase Locked Loop)を動作させて、自律的なローカル時刻を生成することもある。   Further, in NTP, an autonomous local time may be generated by applying a clock filter θ to a loop filter and operating a PLL (Phase Locked Loop) based on the result.

1回のクロックオフセット情報だけでは誤差が生じるので、ループフィルタを使用して誤差を平滑化する。   Since an error occurs only with one clock offset information, the error is smoothed using a loop filter.

また、クロックオフセットθが得られるたびに、ローカル時刻の値を修正すると、ローカル時刻が前後にスキップすることがあるが、PLLを組むことで、ローカル時刻を連続的に調整することができる。データフィルタや、PLLを組み合わせたNTPを図19に示す。ここで、ループフィルタの中身は一例である。   Further, if the local time value is corrected each time the clock offset θ is obtained, the local time may be skipped back and forth, but the local time can be continuously adjusted by forming a PLL. An NTP combining a data filter and a PLL is shown in FIG. Here, the contents of the loop filter are an example.

特開平10―303987号公報(特許文献1)に開示されている技術も、NTPと同様に、2つのノード間でタイムスタンプを含んだパケットの送受信を繰り返す。具体的には、クロックオフセットθの計算を複数回行ない、その結果が正規分布をしているか否かを判定する。当該判定により、正規分布に近くないときには変数変換によって正規分布に近い分布に変換して統計処理を行なう。これにより、クロックオフセットθの統計的な性質を把握できるので、時刻同期の精度が、どの程度正確かかがわかる。
David L. Mills, “Network Time Protocol (Version 3) Specification, Implementation and Analysis”,[online], IETF RFC-1305, Mar. 1992,[平成17年6月29日検索],インターネット<URL http://www.faqs.org/rfcs/rfc1305.html> David L. Mills, “Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI”, [online], IETF RFC-2030, Oct. 1996, [平成17年6月29日検索],インターネット<URL http://www.faqs.org/rfcs/rfc2030.html> David L. Mills, “Internet time synchronization: the Network Time Protocol”, IEEE Trans. Communications COM-39, 10 (October 1991), 1482-1493. [平成17年6月29日検索],インターネット<URL http://www.eecis.udel.edu/~mills/database/papers/trans.pdf> 特開平10―303987号公報
The technique disclosed in Japanese Patent Laid-Open No. 10-303987 (Patent Document 1) also repeats transmission / reception of a packet including a time stamp between two nodes, similarly to NTP. Specifically, the clock offset θ is calculated a plurality of times, and it is determined whether or not the result has a normal distribution. If it is determined that the distribution is not close to the normal distribution, statistical processing is performed by converting the distribution to a distribution close to the normal distribution by variable conversion. Thereby, since the statistical property of the clock offset θ can be grasped, it is possible to know how accurate the time synchronization is.
David L. Mills, “Network Time Protocol (Version 3) Specification, Implementation and Analysis”, [online], IETF RFC-1305, Mar. 1992, [Search June 29, 2005], Internet <URL http: / /www.faqs.org/rfcs/rfc1305.html> David L. Mills, “Simple Network Time Protocol (SNTP) Version 4 for IPv4, IPv6 and OSI”, [online], IETF RFC-2030, Oct. 1996, [searched June 29, 2005], Internet <URL http://www.faqs.org/rfcs/rfc2030.html> David L. Mills, “Internet time synchronization: the Network Time Protocol”, IEEE Trans. Communications COM-39, 10 (October 1991), 1482-1493. [Search June 29, 2005], Internet <URL http: //www.eecis.udel.edu/~mills/database/papers/trans.pdf> JP-A-10-303987

本発明が解決しようとする課題は以下のようなものである。本発明では時刻情報を専用に伝送する媒体は存在せず、時刻情報を受信するまでの遅延時間が確定的でない場合を対象とする。   Problems to be solved by the present invention are as follows. In the present invention, there is no medium for transmitting time information exclusively, and the case where the delay time until the time information is received is not definite.

また、本発明では、一般的なIPネットワークを想定している。IPネットワークを構成するのは、有線LAN、無線LAN、モデム、ルータ、スイッチングハブ、光ファイバーなどがある。特定の媒体に依存せず、複数の媒体をまたがる場合もある。また、データ通信網以外の通信網の存在を想定しない。   In the present invention, a general IP network is assumed. The IP network includes a wired LAN, a wireless LAN, a modem, a router, a switching hub, an optical fiber, and the like. There is a case where it does not depend on a specific medium and may extend over a plurality of media. In addition, the existence of a communication network other than the data communication network is not assumed.

このような構成の場合、ネットワーク状態の変化または端末内部の状態変化により、伝送遅延時間にばらつきが生じる。   In such a configuration, the transmission delay time varies due to a change in the network state or a change in the state inside the terminal.

ネットワーク状態の変化とは、ネットワーク上を流れるトラフィック(パケット量)が刻一刻と変化するということである。トラフィックは、他の端末や実行中のアプリケーションに影響される。また、トラフィックは、ルータなどの中継装置にも影響される。トラフィックが輻輳すると、パケットが中継装置を通過するのに長い時間かかったり、パケットが失われたりすることがある。また、トラフィックは、端末自身のネットワークI/Fのバッファ量にも影響される。また、トラフィックは、無線LANなどの場合、媒体の通信状況にも影響される。   The change in the network state means that the traffic (packet amount) flowing on the network changes every moment. Traffic is affected by other terminals and running applications. Traffic is also affected by relay devices such as routers. When the traffic is congested, it may take a long time for the packet to pass through the relay device, or the packet may be lost. The traffic is also affected by the buffer amount of the terminal's own network I / F. Traffic is also affected by the communication status of the medium in the case of a wireless LAN or the like.

端末内部の状態変化とは、CPU使用率の状況、割込み応答時間、オペレーティングシステムのタスク切り替えにかかる時間などの変化のことである。端末内部の状態変化により、パケットの送受信の処理時間にばらつきが生じる。   The state change inside the terminal is a change in the CPU usage rate, interrupt response time, time required for switching tasks of the operating system, and the like. Variations in the processing time of packet transmission / reception occur due to a change in the state inside the terminal.

また、伝送遅延時間にばらつきが生じるだけでなく、クライアントとサーバーとの間で、行きと帰りで伝送路の性質が非対称になる場合もある。   Further, not only does the transmission delay time vary, but the nature of the transmission path may become asymmetric between the client and the server on the way back and forth.

たとえば、片方向に映像伝送をしている時は、行きと帰りでトラフィックの発生量に偏りが生じる。行きと帰りが、同じネットワーク経路であって、同じ伝送速度であっても、トラフィックの発生量の偏りによって、伝送路の性質が非対称になる。この場合、行きと帰りの伝送遅延時間の平均値が異なる。   For example, when video transmission is performed in one direction, the amount of traffic generated is unbalanced between going and returning. Even if the return and return are the same network path and the same transmission speed, the characteristics of the transmission path become asymmetric due to the deviation in the amount of traffic generated. In this case, the average value of the transmission delay time for going and returning is different.

NTPがクロックオフセットθを求めるときは、基本的にパケットの送受信1回の情報を使う。NTPはクロックオフセットθを求めるとき、行きと帰りで伝送遅延時間が同じであると仮定しているが、実際には、伝送遅延時間にばらつきが生じる。その上、行きと帰りで伝送路の性質が非対称になる場合があるなどの理由で、行きと帰りで伝送遅延時間が同じになることはあまり期待できない。   When the NTP obtains the clock offset θ, basically, information of one packet transmission / reception is used. NTP assumes that the transmission delay time is the same on the return and return when obtaining the clock offset θ, but in reality, the transmission delay time varies. In addition, the transmission delay time cannot be expected to be the same between the going and the returning because the properties of the transmission path may become asymmetrical between the going and the returning.

したがって、パケットの送受信1回だけの情報で計算したクロックオフセットθiは、真のクロックオフセットθと比べて、かなりの誤差がある。   Therefore, the clock offset θi calculated from the information of only one packet transmission / reception has a considerable error compared to the true clock offset θ.

そこで、NTPではデータフィルタをしたり、ループフィルタによって誤差を平滑化したりすることで、パケット送受信1回あたりクロックオフセットθiの誤差の影響がなるべく少なくなるようにしている。   Therefore, in NTP, the data filter is performed, or the error is smoothed by a loop filter, so that the influence of the error of the clock offset θi per packet transmission / reception is minimized.

しかしながら、NTPには以下の2つの問題があると考えられる。
(1)片方向に映像伝送をすると精度が悪くなる。
(2)PLLが安定動作するまでに時間がかかる。
これらの問題を詳細に検討すると以下のようになる。
(1)片方向だけに映像伝送をすると、行きと帰りでトラフィックの発生量に偏りが生じる。トラフィック量が多いと、平均的な伝送遅延時間が大きくなることが知られている。トラフィック量が多い方向の平均伝送遅延時間が、逆方向の平均伝送遅延時間と比べて大きくなる。
However, NTP is considered to have the following two problems.
(1) When video transmission is performed in one direction, the accuracy deteriorates.
(2) It takes time until the PLL operates stably.
A detailed examination of these issues is as follows.
(1) When video transmission is performed only in one direction, the amount of traffic generated is biased between going and returning. It is known that the average transmission delay time increases when the amount of traffic is large. The average transmission delay time in the direction with a large amount of traffic becomes larger than the average transmission delay time in the reverse direction.

NTPは、データフィルタをしたとしても、基本的にパケットの送受信1回の情報を使って、クロックオフセットを推定するので、映像伝送中はクロックオフセットの誤差が大きくなる傾向がある。この場合、ループフィルタによって誤差を平滑化しても、誤差の影響を小さくすることは困難である。
(2)NTPで高精度に時刻合わせをするには、PLLが必要となるが、誤差を小さく抑え込むには、PLLパラメータ(図19におけるKP、KI)を小さくしなければならない。しかし、PLLパラメータを小さくすると、PLLが安定動作するまでに時間がかかるようになる。誤差を小さく抑え込むのと、PLLが安定動作するまでの時間はトレードオフの関係にある。
Even if a data filter is used for NTP, the clock offset is basically estimated by using information of one packet transmission / reception, so that the error of the clock offset tends to increase during video transmission. In this case, even if the error is smoothed by the loop filter, it is difficult to reduce the influence of the error.
(2) A PLL is required to set the time accurately with NTP, but in order to suppress the error small, the PLL parameters (KP and KI in FIG. 19) must be reduced. However, if the PLL parameter is decreased, it takes time until the PLL operates stably. There is a trade-off relationship between suppressing the error small and the time until the PLL operates stably.

図20は、クライアントからサーバーへ映像伝送をした時の構成を示す図である。図20を参照して、クライアントからサーバーへの方向を「行き」とする。サーバーからクライアントへの方向を「帰り」とする。クライアントとサーバー間で測定パケットを往復させて、ラウンドトリップ時間を行きの伝送遅延時間と帰りの伝送遅延時間とに分離する。図20の構成により、クライアントからサーバーへ映像伝送をした場合の行きと帰りの伝送遅延時間を測定した結果を以下に示す。   FIG. 20 is a diagram illustrating a configuration when video transmission is performed from the client to the server. Referring to FIG. 20, the direction from the client to the server is “going”. The direction from the server to the client is “return”. The measurement packet is reciprocated between the client and the server, and the round trip time is separated into a transmission delay time for the outgoing route and a transmission delay time for the return route. The results of measuring the transmission and return transmission delay times in the case of video transmission from the client to the server with the configuration of FIG. 20 are shown below.

図21は、時間経過とともに、行きの伝送遅延時間の変化を示す図である。
図22は、時間経過とともに、帰りの伝送遅延時間の変化を示す図である。
FIG. 21 is a diagram illustrating a change in the outbound transmission delay time as time elapses.
FIG. 22 is a diagram illustrating a change in the return transmission delay time with time.

図23は、行きおよび帰り、それぞれの平均伝送遅延時間を示す図である。
図21、図22および図23の結果から、映像伝送中は、行き方向の平均伝送遅延時間が大きくなり、帰り方向の平均伝送遅延時間はそれほど変わらないことがわかる。映像伝送中は行きの方向だけ平均伝送遅延時間が大きくなり、行きと帰りで伝送路の対称性が失われることになる。このような場合、NTPでは精度が悪くなる。
FIG. 23 is a diagram showing the average transmission delay time for each of going and returning.
From the results of FIGS. 21, 22 and 23, it can be seen that the average transmission delay time in the forward direction increases during video transmission, and the average transmission delay time in the return direction does not change much. During video transmission, the average transmission delay time increases only in the direction of travel, and the symmetry of the transmission path is lost on the way back and forth. In such a case, the accuracy of NTP deteriorates.

また、特開平10―303987号公報に開示されている技術では、クロックオフセットθの統計的性質を見て、ローカル時刻の調整を行なう。しかし、(1)で述べたように、片方向だけに映像伝送を行なう場合、行きと帰りで伝送路の対称性が失われるので、クロックオフセットθiの誤差が大きくなる。その間はクロックオフセットの統計的性質が変わる(平均値がずれる)ことになるので、この方法ではうまく対応できないと考えられる。   In the technique disclosed in Japanese Patent Laid-Open No. 10-303987, the local time is adjusted by looking at the statistical property of the clock offset θ. However, as described in (1), when video transmission is performed only in one direction, since the symmetry of the transmission path is lost on the way back and forth, the error of the clock offset θi increases. In the meantime, the statistical properties of the clock offset change (the average value shifts), so it is considered that this method cannot cope well.

本発明は、上述の問題点を解決するためになされたものであって、その目的は、片方向の映像伝送を行っているような場合でも精度良く時刻合わせを行なうことができる伝送装置を提供することである。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a transmission apparatus capable of accurately adjusting the time even when one-way video transmission is performed. It is to be.

本発明の他の目的は、誤差を小さく抑えるまでの時間を少なくし、精度良く時刻合わせを行なうことができる時刻同期方法を提供することである。   Another object of the present invention is to provide a time synchronization method capable of reducing the time until the error is suppressed and performing time adjustment with high accuracy.

上述の課題を解決するために、この発明のある局面に従うと、ネットワークに接続された、第1周波数で動作する装置と、データ通信する、第2周波数で動作する伝送装置は、時刻を管理する時刻管理手段と、装置へ、測定パケットを、順次、送信する送信手段とを備え、装置は、測定パケットの受信毎に、測定パケットを受信した第1時刻の情報と、測定パケットを返信パケットとして返信する第2時刻の情報とを含んだ返信パケットを、順次、返信し、返信パケットに含まれる第1および第2時刻の情報と、受信した返信パケットに対応する測定パケットを送信した第3時刻の情報および返信パケットを受信した第4時刻の情報とから構成される時刻情報に基づいて、装置との時刻オフセットを、順次、算出する算出手段と、第1周波数と、第2周波数との比を示す周波数比と、時刻オフセットと、時刻管理手段が管理する任意の基準となる時刻とに基づいて、時刻管理手段の管理する時刻を補正する補正手段とをさらに備える。   In order to solve the above-described problem, according to one aspect of the present invention, a transmission device connected to a network and operating at a first frequency and performing data communication with a device operating at a second frequency manages time. A time management unit, and a transmission unit that sequentially transmits the measurement packet to the apparatus. The apparatus receives the information about the first time when the measurement packet is received and the measurement packet as a reply packet each time the measurement packet is received. The reply packet including the second time information to be returned is sequentially returned, and the first and second time information included in the reply packet and the third time at which the measurement packet corresponding to the received reply packet is transmitted. And a first frequency calculating unit for sequentially calculating a time offset with respect to the apparatus based on time information composed of the information on the second time and information on the fourth time when the reply packet is received, And a correction means for correcting the time managed by the time management means based on a frequency ratio indicating a ratio with the second frequency, a time offset, and an arbitrary reference time managed by the time management means. .

好ましくは、周波数比をα、補正前の時刻をC、任意の基準となる時刻をC、および時刻オフセットをβとした場合、補正手段は、算出手段がF(C)=α×(C−C)+βにより算出した時刻F(C)に基づいて、管理する時刻を補正する。 Preferably, when the frequency ratio is α, the time before correction is C, the time to be an arbitrary reference is C 0 , and the time offset is β, the correction means has F (C) = α × (C Based on the time F (C) calculated by −C 0 ) + β, the management time is corrected.

好ましくは、周波数比をα、および時刻オフセットをβとした場合、算出手段は、複数の時刻情報に基づいてαのとり得る値の最小値αminおよび最大値αmaxを算出し、複数の時刻情報に基づいてβのとり得る値の最小値βminおよび最大値βmaxを算出し、
算出手段は、αのとり得る値の範囲のうちの1つの値を周波数比としてのαとし、βのとり得る値の範囲のうちの1つの値を時刻オフセットとしてのβとする。
Preferably, when the frequency ratio is α and the time offset is β, the calculation means calculates a minimum value αmin and a maximum value αmax of values that α can take based on a plurality of time information, and sets the plurality of time information. The minimum value βmin and the maximum value βmax of the possible values of β are calculated based on
The calculation means sets one value in a range of values that α can take as α as a frequency ratio, and sets one value in a range of values β can take as β as a time offset.

好ましくは、周波数比をα、任意の基準となる時刻をC、装置へデータを伝送する際に生じる遅延時間の最小値となる第1最小伝送遅延時間および装置から伝送装置へデータを伝送する際に生じる遅延時間の最小値となる第2最小伝送遅延時間をε、送信手段がn(自然数)番目の測定パケットを送信した時刻をC、装置がn番目の測定パケットを受信した時刻をS、装置がn番目の返信パケットを返信した時刻をS、および伝送装置がn番目の返信パケットを受信した時刻をCとした場合、算出手段は、n番目の時刻情報に基づいてαのとり得る値の最小値αminを、(S−β+ε)/(C−C)により算出し、n番目の時刻情報に基づいてαのとり得る値の最大値αmaxを、(S−β−ε)/(C−C)により算出し、算出手段は、複数の時刻情報に基づいて、αminのとり得る値の最大値を算出し、αmaxのとり得る値の最小値を算出する。 Preferably, the frequency ratio is α, the arbitrary reference time is C 0 , the first minimum transmission delay time that is the minimum delay time that occurs when data is transmitted to the device, and the data is transmitted from the device to the transmission device Ε is the second minimum transmission delay time, which is the minimum delay time, and C 1 is the time when the transmission means transmits the n (natural number) measurement packet, and the time when the device receives the nth measurement packet. If S 1 , the time when the device returned the nth reply packet is S 2 , and the time when the transmission device received the nth reply packet is C 2 , the calculating means is based on the nth time information. The minimum value αmin of α can be calculated by (S 2 −β + ε) / (C 2 −C 0 ), and the maximum value αmax of α can be calculated based on the nth time information as (S 1− β−ε) / (C 1 −C 0 The calculation means calculates the maximum value that αmin can take based on a plurality of pieces of time information, and calculates the minimum value that αmax can take.

好ましくは、周波数比をα、時刻オフセットをβ、送信手段がn(自然数)番目の測定パケットを送信した時刻をC、装置がn番目の測定パケットを受信した時刻をS、装置がn番目の返信パケットを返信した時刻をS、および伝送装置がn番目の返信パケットを受信した時刻をC、伝送装置と装置との間でデータを往復させる際に生じる遅延時間を示す時間をRTTとした場合、算出手段は、n番目の時刻情報に基づいてRTTを算出し、算出手段は、複数の時刻情報に基づいて、RTTのとり得る値の最小値minRTTを算出し、算出手段は、βを変化させる値の最小値および最大値を、それぞれ、所定値S00およびminRTTとし、βを変化させる範囲の中で、βを変化させながら、αminのとり得る値の最大値およびαmaxのとり得る値の最小値を算出し、αが存在可能であるβの範囲に基づいて、βのとり得る値の最小値βminおよび最大値βmaxを算出する。 Preferably, the frequency ratio is α, the time offset is β, the time when the transmission means transmits the n (natural number) measurement packet is C 1 , the time when the device receives the nth measurement packet is S 1 , and the device is n The time when the second reply packet is returned is S 2 , the time when the transmission apparatus receives the nth reply packet is C 2 , and the time indicating the delay time that occurs when data is reciprocated between the transmission apparatus and the apparatus. In the case of RTT, the calculating unit calculates the RTT based on the nth time information, the calculating unit calculates the minimum value minRTT that the RTT can take based on the plurality of time information, and the calculating unit The minimum and maximum values for changing β are the predetermined values S00 and minRTT, respectively, and the maximum value of αmin that can be taken while changing β within the range of changing β. Calculating the minimum value of the possible values of fine .alpha.max, based on a range of beta alpha can be present, to calculate a minimum βmin and maximum value βmax of possible values of beta.

好ましくは、時刻オフセットをβとした場合、算出手段は、βのとり得る値の最小値βminおよび最大値βmaxの算術平均により算出した値を、時刻オフセットとしてのβとする。   Preferably, when the time offset is β, the calculation unit sets β as a time offset to a value calculated by an arithmetic average of the minimum value βmin and the maximum value βmax of β.

好ましくは、周波数比をαとした場合、算出手段は、αのとり得る値の最小値αminおよび最大値αmaxの算術平均により算出した値を、周波数比としてのαとする。   Preferably, when the frequency ratio is α, the calculation means sets a value calculated by arithmetic average of the minimum value αmin and the maximum value αmax of α as α as the frequency ratio.

好ましくは、装置はコンテンツを再生する機能を備え、同一のコンテンツを装置と伝送装置との間で同時に再生する。   Preferably, the device has a function of playing back content, and the same content is played back simultaneously between the device and the transmission device.

好ましくは、算出手段は、装置へデータを伝送する際に生じる第1伝送遅延時間および装置から伝送装置へデータを伝送する際に生じる第2伝送遅延時間の少なくとも一方を算出する。   Preferably, the calculating means calculates at least one of a first transmission delay time that occurs when data is transmitted to the apparatus and a second transmission delay time that occurs when data is transmitted from the apparatus to the transmission apparatus.

好ましくは、周波数比をα、時刻オフセットをβ、任意の基準となる時刻をC、送信手段がn(自然数)番目の測定パケットを送信した時刻をC、装置がn番目の測定パケットを受信した時刻をS、装置がn番目の返信パケットを返信した時刻をS、および伝送装置がn番目の返信パケットを受信した時刻をCとした場合、算出手段は、n番目の時刻情報に基づいて、第1伝送遅延時間を、S−{α×(C−C)+β}により算出し、第2伝送遅延時間を、{α×(C−C)+β}−Sにより算出する。 Preferably, the frequency ratio is α, the time offset is β, the arbitrary reference time is C 0 , the time when the transmission unit transmits the n (natural number) measurement packet is C 1 , and the device receives the nth measurement packet. When the received time is S 1 , the time when the device returns the nth reply packet is S 2 , and the time when the transmission device receives the nth reply packet is C 2 , the calculation means calculates the nth time. Based on the information, the first transmission delay time is calculated by S 1 − {α × (C 1 −C 0 ) + β}, and the second transmission delay time is {α × (C 2 −C 0 ) + β}. It is calculated by the -S 2.

この発明の他の局面に従うと、ネットワークに接続された、第1周波数で動作する装置と、データ通信する、第2周波数で動作する伝送装置との間で同期を行なう時刻同期方法は、と、装置へ、測定パケットを、順次、送信する工程とを含み、装置は、測定パケットの受信毎に、測定パケットを受信した第1時刻の情報と、測定パケットを返信パケットとして返信する第2時刻の情報とを含んだ返信パケットを、順次、返信し、返信パケットに含まれる第1および第2時刻の情報と、受信した返信パケットに対応する測定パケットを送信した第3時刻の情報および返信パケットを受信した第4時刻の情報とから構成される時刻情報に基づいて、装置との時刻オフセットを、順次、算出する工程と、第1周波数と、第2周波数との比を示す周波数比と、時刻オフセットと、時刻を管理する工程が管理する任意の基準となる時刻とに基づいて、時刻を管理する工程の管理する時刻を補正する工程とをさらに含む。   According to another aspect of the present invention, a time synchronization method for synchronizing between a device operating at a first frequency connected to a network and a transmission device operating at a second frequency for data communication, A step of sequentially transmitting measurement packets to the device, and each time the measurement packet is received, the device transmits information on the first time when the measurement packet is received and a second time when the measurement packet is returned as a reply packet. The reply packet including the information is sequentially returned, and the first and second time information included in the reply packet and the third time information and the reply packet transmitted the measurement packet corresponding to the received reply packet A step of sequentially calculating a time offset with the apparatus based on time information composed of the received fourth time information, and a frequency indicating a ratio between the first frequency and the second frequency. The ratio and the time offset, based on the time at which any of the criteria process to manage to manage time, further comprising a step of correcting the time managed process that manages the time.

好ましくは、周波数比をα、補正前の時刻をC、任意の基準となる時刻をC、および時刻オフセットをβとした場合、補正する工程は、算出する工程がF(C)=α×(C−C)+βにより算出した時刻F(C)に基づいて、管理する時刻を補正する。 Preferably, when the frequency ratio is α, the pre-correction time is C, the arbitrary reference time is C 0 , and the time offset is β, the correction step is F (C) = α × Based on the time F (C) calculated by (C−C 0 ) + β, the management time is corrected.

好ましくは、周波数比をα、および時刻オフセットをβとした場合、算出する工程は、複数の時刻情報に基づいてαのとり得る値の最小値αminおよび最大値αmaxを算出し、複数の時刻情報に基づいてβのとり得る値の最小値βminおよび最大値βmaxを算出し、算出する工程は、αのとり得る値の範囲のうちの1つの値を周波数比としてのαとし、βのとり得る値の範囲のうちの1つの値を時刻オフセットとしてのβとする。   Preferably, when the frequency ratio is α and the time offset is β, the calculating step calculates a minimum value αmin and a maximum value αmax of α based on a plurality of time information, and a plurality of time information The minimum value βmin and the maximum value βmax of the values that β can take are calculated based on the above, and in the calculating step, one value in the range of values that α can take is set as α as the frequency ratio, and β can take One value in the range of values is β as a time offset.

好ましくは、周波数比をα、任意の基準となる時刻をC、装置へデータを伝送する際に生じる遅延時間の最小値となる第1最小伝送遅延時間および装置から伝送装置へデータを伝送する際に生じる遅延時間の最小値となる第2最小伝送遅延時間をε、送信する工程がn(自然数)番目の測定パケットを送信した時刻をC、装置がn番目の測定パケットを受信した時刻をS、装置がn番目の返信パケットを返信した時刻をS、および伝送装置がn番目の返信パケットを受信した時刻をCとした場合、算出する工程は、n番目の時刻情報に基づいてαのとり得る値の最小値αminを、(S−β+ε)/(C−C)により算出し、n番目の時刻情報に基づいてαのとり得る値の最大値αmaxを、(S−β−ε)/(C−C)により算出し、算出する工程は、複数の時刻情報に基づいて、αminのとり得る値の最大値を算出し、αmaxのとり得る値の最小値を算出する。 Preferably, the frequency ratio is α, the arbitrary reference time is C 0 , the first minimum transmission delay time that is the minimum delay time that occurs when data is transmitted to the device, and the data is transmitted from the device to the transmission device Ε is the second minimum transmission delay time, which is the minimum delay time, and C 1 is the time when the transmitting step transmits the n (natural number) measurement packet, and the time when the device receives the nth measurement packet. S 1 , the time when the device returned the nth reply packet as S 2 , and the time when the transmission device received the nth reply packet as C 2 , Based on (S 2 −β + ε) / (C 2 −C 0 ), a minimum value αmin of values that α can take is calculated based on the nth time information. (S 1 -β-ε) / (C Calculated by -C 0), the step of calculating, based on the plurality of time information, calculates the maximum value of the possible values of .alpha.min, it calculates the minimum value of the possible values of .alpha.max.

好ましくは、周波数比をα、時刻オフセットをβ、送信する工程がn(自然数)番目の測定パケットを送信した時刻をC、装置がn番目の測定パケットを受信した時刻をS、装置がn番目の返信パケットを返信した時刻をS、および伝送装置がn番目の返信パケットを受信した時刻をC、伝送装置と装置との間でデータを往復させる際に生じる遅延時間を示す時間をRTTとした場合、算出する工程は、n番目の時刻情報に基づいてRTTを算出し、算出する工程は、複数の時刻情報に基づいて、RTTのとり得る値の最小値minRTTを算出し、算出する工程は、βを変化させる値の最小値および最大値を、それぞれ、所定値S00およびminRTTとし、βを変化させる範囲の中で、βを変化させながら、αminのとり得る値の最大値およびαmaxのとり得る値の最小値を算出し、αが存在可能であるβの範囲に基づいて、βのとり得る値の最小値βminおよび最大値βmaxを算出する。 Preferably, the frequency ratio is α, the time offset is β, the transmission step is C 1 when the n (natural number) measurement packet is transmitted, the time when the device receives the nth measurement packet is S 1 , and the device is The time at which the n-th reply packet is returned is S 2 , the time at which the transmission apparatus receives the n-th reply packet is C 2 , and the time indicating the delay time that occurs when data is reciprocated between the transmission apparatus and the apparatus , RTT is calculated based on the n-th time information, and the calculating step calculates a minimum value minRTT of possible values of the RTT based on a plurality of time information, In the calculating step, the minimum value and the maximum value of the value for changing β are set to a predetermined value S00 and minRTT, respectively, and while changing β within the range of changing β, That the maximum value of the values and to calculate the minimum value of the possible values of .alpha.max, based on a range of beta alpha can be present, to calculate a minimum βmin and maximum value βmax of possible values of beta.

好ましくは、時刻オフセットをβとした場合、算出する工程は、βのとり得る値の最小値βminおよび最大値βmaxの算術平均により算出した値を、時刻オフセットとしてのβとする。   Preferably, when the time offset is β, in the calculation step, a value calculated by an arithmetic average of the minimum value βmin and the maximum value βmax of β can be set as β as the time offset.

好ましくは、周波数比をαとした場合、算出する工程は、αのとり得る値の最小値αminおよび最大値αmaxの算術平均により算出した値を、周波数比としてのαとする。   Preferably, when the frequency ratio is α, in the calculating step, a value calculated by an arithmetic average of the minimum value αmin and the maximum value αmax of α can be set as α as the frequency ratio.

本発明に係る伝送装置は、装置が、測定パケットを受信した第1時刻の情報、測定パケットを返信パケットとして返信する第2時刻の情報、測定パケットを送信した第3時刻の情報および返信パケットを受信した第4時刻の情報とから構成される時刻情報に基づいて、装置および伝送装置の各々が動作する周波数比と、時刻オフセットと、時刻管理手段が管理する任意の時刻とに基づいて、時刻管理手段の管理する時刻を補正する。   The transmission apparatus according to the present invention includes information on the first time when the apparatus receives the measurement packet, information on the second time when the measurement packet is returned as a reply packet, information on the third time when the measurement packet is transmitted, and a reply packet. Based on the time information composed of the received fourth time information, the time based on the frequency ratio at which each of the device and the transmission device operates, the time offset, and the arbitrary time managed by the time management means The time managed by the management means is corrected.

したがって、誤差を小さく抑えるまでの時間を少なくし、精度良く時刻合わせを行なうことができるという効果を奏する。   Therefore, there is an effect that the time until the error is suppressed can be reduced and the time can be accurately adjusted.

本発明に係る時刻同期方法は、装置が、測定パケットを受信した第1時刻の情報、測定パケットを返信パケットとして返信する第2時刻の情報、測定パケットを送信した第3時刻の情報および返信パケットを受信した第4時刻の情報とから構成される時刻情報に基づいて、装置および伝送装置の各々が動作する周波数比と、時刻オフセットと、時刻を管理する工程が管理する任意の時刻とに基づいて、時刻を管理する工程の管理する時刻を補正する。   The time synchronization method according to the present invention includes a first time information when the apparatus receives the measurement packet, a second time information when the measurement packet is returned as a reply packet, a third time information when the measurement packet is transmitted, and a reply packet. Based on the time information configured from the information on the fourth time at which the device and the transmission device are received, based on the frequency ratio at which each of the device and the transmission device operates, the time offset, and the arbitrary time managed by the time managing step Thus, the time managed by the process for managing the time is corrected.

したがって、誤差を小さく抑えるまでの時間を少なくし、精度良く時刻合わせを行なうことができるという効果を奏する。   Therefore, there is an effect that the time until the error is suppressed can be reduced and the time can be accurately adjusted.

以下、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがって、それらについての詳細な説明は繰り返さない。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description, the same parts are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.

図1は、本実施の形態を構成する、一例としてのシステム1000を示す図である。図1を参照して、システム1000は、クライアント100と、ネットワーク110と、サーバー120とから構成される。ネットワーク110は、たとえば、インターネットなどのネットワークである。クライアント100と、サーバー120とは、ネットワーク110を介して、相互に接続される。   FIG. 1 is a diagram showing an example system 1000 that constitutes the present embodiment. With reference to FIG. 1, a system 1000 includes a client 100, a network 110, and a server 120. The network 110 is a network such as the Internet, for example. The client 100 and the server 120 are connected to each other via the network 110.

本実施の形態では、クライアント100の時刻(ローカルカウンタの値)をサーバー120の時刻に合わせるものとする。以下においては、ローカルカウンタの値をローカルカウンタ値ともいう。   In this embodiment, it is assumed that the time of the client 100 (the value of the local counter) is set to the time of the server 120. Hereinafter, the value of the local counter is also referred to as a local counter value.

クライアント100は、CPU(Central Processing Unit)101、メモリ102、通信インタフェース103、発振器104、ローカルカウンタ105、バス109とを備える。CPU101、メモリ102、通信インタフェース103およびローカルカウンタ105は、バス109に接続される。ローカルカウンタ105はCPU101に組み込まれていてもよい。   The client 100 includes a CPU (Central Processing Unit) 101, a memory 102, a communication interface 103, an oscillator 104, a local counter 105, and a bus 109. The CPU 101, the memory 102, the communication interface 103, and the local counter 105 are connected to the bus 109. The local counter 105 may be incorporated in the CPU 101.

CPU101は、クライアント100を通信装置として動作させるためのプログラムを実行する。   The CPU 101 executes a program for causing the client 100 to operate as a communication device.

メモリ102は、CPU101が実行するプログラムやその際に必要な値などを記憶する。通信インタフェース103は、ネットワーク110に接続された他の端末と通信するための送信部と受信部とを含む。ローカルカウンタ105は、発振器104の発振周波数に基づき、ローカルカウンタ値がインクリメントされる。CPU101は、ローカルカウンタ105のローカルカウンタ値の読み出しを行なう。   The memory 102 stores a program executed by the CPU 101 and values necessary for the program. The communication interface 103 includes a transmission unit and a reception unit for communicating with other terminals connected to the network 110. In the local counter 105, the local counter value is incremented based on the oscillation frequency of the oscillator 104. The CPU 101 reads the local counter value of the local counter 105.

サーバー120は、CPU121、メモリ122、通信インタフェース123、発振器124、ローカルカウンタ125、バス129とを備える。CPU121、メモリ122、通信インタフェース123およびローカルカウンタ125は、バス129に接続される。ローカルカウンタ125はCPU121に組み込まれていてもよい。   The server 120 includes a CPU 121, a memory 122, a communication interface 123, an oscillator 124, a local counter 125, and a bus 129. The CPU 121, the memory 122, the communication interface 123, and the local counter 125 are connected to the bus 129. The local counter 125 may be incorporated in the CPU 121.

CPU121は、サーバー120を通信装置として動作させるためのプログラムを実行する。   The CPU 121 executes a program for causing the server 120 to operate as a communication device.

メモリ122は、CPU121が実行するプログラムやその際に必要な値などを記憶する。通信インタフェース123は、ネットワーク110に接続された他の端末と通信するための送信部と受信部とを含む。ローカルカウンタ125は、発振器124の発振周波数に基づき、ローカルカウンタ値がインクリメントされる。なお、ローカルカウンタ125は、図1に図示されていない構成によって、協定世界時であるUTC(Coordinated Universal Time)に同期していてもよい。   The memory 122 stores programs executed by the CPU 121 and values necessary at that time. The communication interface 123 includes a transmission unit and a reception unit for communicating with other terminals connected to the network 110. In the local counter 125, the local counter value is incremented based on the oscillation frequency of the oscillator 124. Note that the local counter 125 may be synchronized with UTC (Coordinated Universal Time), which is Coordinated Universal Time, by a configuration not shown in FIG.

CPU121は、ローカルカウンタ125のローカルカウンタ値の読み出しを行なう。
なお、図1のシステム1000における、クライアント100およびサーバー120の内部構成は、必要最小限の構成のみ図示しており、その他の構成要素は、図示されていない。
The CPU 121 reads the local counter value of the local counter 125.
Note that the internal configurations of the client 100 and the server 120 in the system 1000 of FIG. 1 are shown only as a minimum necessary configuration, and other components are not shown.

クライアント100およびサーバー120は、たとえば、一般的なPC(Personal Computer)である。PCの場合、ローカルカウンタはOS(Operating System)が提供するAPI(Application Program Interface)を使う。例えば、OSが、Microsoft Windows(登録商標)の場合、カウンタとして、QueryPerformanceCounterが使用できる。   The client 100 and the server 120 are, for example, general PCs (Personal Computers). In the case of a PC, the local counter uses an API (Application Program Interface) provided by an OS (Operating System). For example, when the OS is Microsoft Windows (registered trademark), QueryPerformanceCounter can be used as a counter.

また、OSが、Linux(登録商標)の場合、カウンタとして、gettimeofdayが使用できる。これらの精度はいずれも1μ秒以下であるので、目標とする時刻合わせの精度を考えると十分利用可能である。なお、QueryPerformanceCounterは、ハードウェアによって周波数が異なる。周波数はQueryPerformanceFrequencyで取得できる。   Further, when the OS is Linux (registered trademark), gettimeofday can be used as a counter. Since both of these accuracies are 1 μsec or less, they can be sufficiently used in consideration of the accuracy of target time adjustment. Note that the frequency of QueryPerformanceCounter varies depending on the hardware. The frequency can be acquired with QueryPerformanceFrequency.

本実施の形態は、一般的なPCの構成でも可能である。しかしながら、クライアント100およびサーバー120の各々が、専用のハードウェア(回路)を備えていてもよい。   This embodiment can also be configured with a general PC. However, each of the client 100 and the server 120 may include dedicated hardware (circuit).

専用のハードウェア(回路)は、たとえば、PCI(Peripheral Component Interconnect)規格のハードウエアボードである。当該ハードウエアボードは、PCとしてのクライアント100およびサーバー120の各々に、PCI(Peripheral Component Interconnect)バスなどの拡張バスを通じて接続される。   The dedicated hardware (circuit) is, for example, a PCI (Peripheral Component Interconnect) standard hardware board. The hardware board is connected to each of the client 100 and the server 120 as a PC through an expansion bus such as a PCI (Peripheral Component Interconnect) bus.

専用のハードウェア(回路)は、高精度(少なくとも1μ秒以下の解像度を持つ)で、安定した発振器を積んでいることが望ましい。専用のハードウェア(回路)は、この発振器に基づいたローカルカウンタを提供し、さらに、ローカルカウンタ値の進み方を補正する回路があってもよい。   The dedicated hardware (circuit) is desirably loaded with a stable oscillator with high accuracy (having a resolution of at least 1 μsec or less). Dedicated hardware (circuit) provides a local counter based on this oscillator, and there may be a circuit for correcting how the local counter value advances.

図2は、専用のハードウェア108を搭載した、一例としてのクライアント100Aの構成を示す図である。図2を参照して、専用のハードウェア108はバス109を通じてCPU101からアクセスされる。専用のハードウェア108には、発振器104と、ローカルカウンタ105と、補正回路106と、レジスタ107とが少なくとも搭載される。   FIG. 2 is a diagram illustrating a configuration of a client 100A as an example on which dedicated hardware 108 is installed. Referring to FIG. 2, dedicated hardware 108 is accessed from CPU 101 through bus 109. The dedicated hardware 108 includes at least an oscillator 104, a local counter 105, a correction circuit 106, and a register 107.

ローカルカウンタ105は、発振器104の発振周波数に基づき、ローカルカウンタ値がインクリメントされる。補正回路106は、ローカルカウンタ105とレジスタ107に設定されたパラメータにより、ローカルカウンタ値を補正する。補正回路106は、CPU101などに対して補正後のローカルカウンタ値を提供する。   In the local counter 105, the local counter value is incremented based on the oscillation frequency of the oscillator 104. The correction circuit 106 corrects the local counter value based on the parameters set in the local counter 105 and the register 107. The correction circuit 106 provides the corrected local counter value to the CPU 101 and the like.

レジスタ107には、補正に必要なパラメータが記憶されている。具体的には、任意の基準となる時刻C、クロック周波数比α(推定値)、C=Cにおける時刻オフセットβ(推定値)が記憶されている。これらのパラメータは、以下に説明する処理によってCPU101が計算して設定される。本発明がとっている手法は、クロック周波数のドリフト(ずれ)に弱いため、発振器104と発振器124は、発振周波数が安定していることが望ましい。発振器には、温度補償型の水晶発振器か、さらにはルビジウムやセシウムの発振器を使うことが望ましい。 The register 107 stores parameters necessary for correction. Specifically, time C 0 , clock frequency ratio α (estimated value), and time offset β (estimated value) at C = C 0 are stored as arbitrary references. These parameters are calculated and set by the CPU 101 by the process described below. Since the technique taken by the present invention is vulnerable to clock frequency drift, it is desirable that the oscillator 104 and the oscillator 124 have stable oscillation frequencies. It is desirable to use a temperature-compensated crystal oscillator or a rubidium or cesium oscillator as the oscillator.

図3は、クライアント100側のローカルカウンタとサーバー120側のローカルカウンタの関係を示したものである。図3を参照して、クライアント100は、サーバー120に対して時刻合わせのための測定パケットPKを送信する。この測定パケットPKには、クライアント100が送信する時点のクライアント100側のローカルカウンタ値(C)が付加されている。 FIG. 3 shows the relationship between the local counter on the client 100 side and the local counter on the server 120 side. Referring to FIG. 3, client 100 transmits a measurement packet PK for time adjustment to server 120. A local counter value (C 1 ) on the client 100 side at the time when the client 100 transmits is added to the measurement packet PK.

サーバー120は、測定パケットPKを受信すると、測定パケットPKの送信元アドレスをあて先アドレスとした返信パケットPKRを作成する。そして、サーバー120は、返信パケットPKRを、対応する宛先へ送り返す。   Upon receiving the measurement packet PK, the server 120 creates a reply packet PKR with the transmission source address of the measurement packet PK as the destination address. Then, the server 120 sends back a reply packet PKR to the corresponding destination.

返信パケットPKRには、Cの他に、サーバー120が受信した時点のサーバー120側のローカルカウンタ値(S)と、サーバー120が送信する時点のサーバー120側のローカルカウンタ値(S)が付加されている。 In addition to C 1 , the reply packet PKR includes a local counter value (S 1 ) on the server 120 side when the server 120 receives and a local counter value (S 2 ) on the server 120 side when the server 120 transmits. Is added.

クライアント100は、サーバー120から返信パケットPKRを受信する。クライアント100が返信パケットPKRを受信した時点のクライアント100側のローカルカウンタ値をCとする。 The client 100 receives the reply packet PKR from the server 120. The local counter value on the client 100 side at which the client 100 receives the reply packet PKR and C 2.

本発明は、上記のプロトコルを、適当な時間間隔で繰り返すことによってクライアント100とサーバー120間のパケット伝送に関する時刻情報(C,S,S,C)を得る。そして、それらを使って両者の間の時刻合わせを行なうことができる、特徴的な技術を開示するものである。以下にその具体的方法を述べることにする。 The present invention obtains time information (C 1 , S 1 , S 2 , C 2 ) related to packet transmission between the client 100 and the server 120 by repeating the above protocol at an appropriate time interval. And the characteristic technique which can perform time adjustment between both using them is disclosed. The specific method will be described below.

まず、クライアント100は、サーバー120に対して、N個の測定パケットPKを送信することで、N個の時刻情報(C1k,S1k,S2k,C2k)を得る(k=0,1,・・・,N−1)。(C1k,C2k)は、クライアント100側のローカルカウンタ値を示す。(S1k,S2k)は、サーバー120側のローカルカウンタ値を示す。 First, the client 100 obtains N pieces of time information (C 1k , S 1k , S 2k , C 2k ) by transmitting N measurement packets PK to the server 120 (k = 0, 1). , ..., N-1). (C 1k , C 2k ) indicates a local counter value on the client 100 side. (S 1k , S 2k ) indicates a local counter value on the server 120 side.

ここで、以下の式(1)により、クライアント100のローカルカウンタ値を、サーバー120のローカルカウンタ値に補正できるとする。
F(C)=α×(C−C)+β ・・・(1)
式(1)において、F(C)は補正後のクライアント100のローカルカウンタ値を示す。Cは補正する前のクライアント100のローカルカウンタ値を示す。αはサーバー120の発振器124の発振周波数と、クライアント100の発振器104の発振周波数とのクロック周波数比を示す。βはC=Cにおけるサーバー120のローカルカウンタ値を示す。Cはクライアント100における任意の基準となるローカルカウンタ値を示す。
Here, it is assumed that the local counter value of the client 100 can be corrected to the local counter value of the server 120 by the following equation (1).
F (C) = α × (C−C 0 ) + β (1)
In Expression (1), F (C) represents the local counter value of the client 100 after correction. C indicates the local counter value of the client 100 before correction. α represents a clock frequency ratio between the oscillation frequency of the oscillator 124 of the server 120 and the oscillation frequency of the oscillator 104 of the client 100. β represents the local counter value of the server 120 at C = C 0 . C 0 indicates a local counter value as an arbitrary reference in the client 100.

式(1)が成立する条件は、クライアント100およびサーバー120の有する発振器の発振周波数が十分に安定していることである。なお、実際には、温度変化、湿度変化、その他の影響により、発信器の発振周波数が変化することがありうる。また、発振器自体の性能などの理由により、発振周波数が変化することもありうる。   The condition for satisfying Expression (1) is that the oscillation frequencies of the oscillators included in the client 100 and the server 120 are sufficiently stable. Actually, the oscillation frequency of the transmitter may change due to temperature change, humidity change, and other influences. In addition, the oscillation frequency may change due to the performance of the oscillator itself.

発信器の発振周波数は、ずっと安定であるとは言えないが、測定期間中(たとえば、数10分程度)は安定であるものとする。数10分程度ならば、発振周波数が安定であると仮定しても問題はない。   The oscillation frequency of the transmitter cannot be said to be stable for a long time, but is assumed to be stable during the measurement period (for example, about several tens of minutes). If it is about several tens of minutes, there is no problem even if it is assumed that the oscillation frequency is stable.

クライアント100のローカルカウンタ値が、式(1)によってサーバー120のローカルカウンタ値に補正できるとすれば、以下の式(2)、式(3)が成立する。
−F(C)>ε ・・・(2)
F(C)−S>ε ・・・(3)
式(2)の左辺は、クライアント100からサーバー120へ(この方向を「行き」とする)のパケット伝送遅延時間を表している。式(3)の左辺は、サーバー120からクライアント100へ(この方向を「帰り」とする)のパケット伝送遅延時間を表している。
Assuming that the local counter value of the client 100 can be corrected to the local counter value of the server 120 by the equation (1), the following equations (2) and (3) are established.
S 1 −F (C 1 )> ε (2)
F (C 2 ) -S 2 > ε (3)
The left side of Expression (2) represents a packet transmission delay time from the client 100 to the server 120 (this direction is “going”). The left side of Expression (3) represents a packet transmission delay time from the server 120 to the client 100 (this direction is “return”).

εは、行きと帰りの伝送遅延時間の最小値(以下、最小伝送遅延時間ともいう)とする。伝送遅延時間は、物理的に0より小さくなることはないので、ε≧0である。   Let ε be the minimum value of the transmission delay time for going and returning (hereinafter also referred to as the minimum transmission delay time). Since the transmission delay time is not physically smaller than 0, ε ≧ 0.

まず、式(1)の変数CにCを代入してF(C)を算出する。式(1)の変数CにCを代入してF(C)を算出する。そして、式(2)に、算出したF(C)を代入し、式(3)にF(C)を代入する。そして、αについて解くと、以下の式(4)が得られる。
(S−β+ε)/(C−C)<α<(S−β−ε)/(C−C)・・・(4)
式(4)は、αが存在可能な範囲を示している。式(1)の右辺において、Cは任意に決定してよいが、α、βは未知数である。したがって、βを固定値とすれば、式(4)よりαの存在範囲を絞ることができる。
αの下限値をαmin、αの上限値をαmaxとすると、αmin、αmaxは、式(4)より、以下の式(5A)、式(5B)となる。
αmin←(S−β+ε)/(C−C) ・・・(5A)
αmax←(S−β−ε)/(C−C) ・・・(5B)
ここで、「←」は変数に代入することを表す。
First, F (C 1 ) is calculated by substituting C 1 into the variable C in equation (1). F (C 2 ) is calculated by substituting C 2 for the variable C in equation (1). Then, the calculated F (C 1 ) is substituted into the equation ( 2 ), and F (C 2 ) is substituted into the equation (3). Then, when α is solved, the following equation (4) is obtained.
(S 2 −β + ε) / (C 2 −C 0 ) <α <(S 1 −β−ε) / (C 1 −C 0 ) (4)
Formula (4) shows a range where α can exist. On the right side of Equation (1), C 0 may be arbitrarily determined, but α and β are unknowns. Therefore, if β is a fixed value, the existence range of α can be narrowed down from Equation (4).
Assuming that the lower limit value of α is αmin and the upper limit value of α is αmax, αmin and αmax are expressed by the following equations (5A) and (5B) from equation (4).
αmin ← (S 2 −β + ε) / (C 2 −C 0 ) (5A)
αmax ← (S 1 −β−ε) / (C 1 −C 0 ) (5B)
Here, “←” represents substitution into a variable.

式(4)は、ある特定のデータ{C,S,S,C}における、αの満たすべき範囲を示しているが、一連のデータすべてにおいて式(4)が満たされるべきである。 Equation (4) shows the range to be satisfied by α in certain specific data {C 1 , S 1 , S 2 , C 2 }, but equation (4) should be satisfied for all the series of data. is there.

図4は、実際のデータを使用して、αminとαmaxをプロットした図を示す。なお、βの値は、仮に決定しておく。図4を参照して、αの上限値αmaxと、αの下限値αminの範囲が、時間の経過とともに狭まっていく様子がわかる。また、一連のデータすべてにおいてαmin<α<αmaxとなるαが存在することがわかる。   FIG. 4 shows a plot of αmin and αmax using actual data. Note that the value of β is temporarily determined. Referring to FIG. 4, it can be seen that the range between the upper limit value αmax of α and the lower limit value αmin of α is narrowed with time. Further, it can be seen that α satisfying αmin <α <αmax exists in all the series of data.

図4をさらに詳細に見ると、αmaxが前後の点と比べて上方向に大きくぶれてプロットされた点と、αminが前後の点と比べて下方向に大きくぶれてプロットされた点があることがわかる。このαmaxが上方向にぶれてプロットされた点は、行きの伝送時間が前後の点と比べてはるかに大きいことによるものである。また、αminが下方向にぶれてプロットされた点は、帰りの伝送時間が前後の点と比べてはるかに大きいことによるものである。   Looking at FIG. 4 in more detail, there are a point where αmax is plotted greatly deviating upward compared to the previous and subsequent points, and a point where αmin is greatly deviating downward compared to the previous and subsequent points. I understand. The point where αmax is plotted in the upward direction is due to the fact that the outgoing transmission time is much longer than the previous and subsequent points. The point where αmin is plotted in the downward direction is due to the fact that the return transmission time is much longer than the previous and subsequent points.

一連のデータすべてにおいて、αmin<α<αmaxが成立するαが存在するかどうかを判定するために、αの下限値αminについてはその最大値を、αの上限値αmaxについてはその最小値を取っていく。   In order to determine whether or not α satisfying αmin <α <αmax exists in all the series of data, the maximum value is taken for the lower limit value αmin of α, and the minimum value is taken for the upper limit value αmax of α. To go.

測定パケットの送信と受信によって、クライアント100が、k番目のデータの組{C1k,S1k,S2k,C2k}を得る毎に、式(5A)、式(5B)および、以下の式(6A)、式(6B)の計算を行なう(以下、計算処理Aともいう)。
MAX_αmin←MAX(αmin,MAX_αmin) ・・・(6A)
MIN_αmax←MIN(αmax,MIN_αmax) ・・・(6B)
式(6A)の左辺のMAX_αminは、現時点における、αminの最大値を示す。式(6B)の左辺のMIN_αmaxは、現時点における、αmaxの最小値を示す。式(6A)のMAX(a,b) は、{a,b}のうち大きい方の値を返す関数である。式(6B)のMIN(a,b) は、{a,b}のうち小さい方の値を返す関数である。
Each time the client 100 obtains the k-th data set {C 1k , S 1k , S 2k , C 2k } by transmitting and receiving the measurement packet, the expressions (5A), (5B), and (6A) and Equation (6B) are calculated (hereinafter also referred to as calculation processing A).
MAX_αmin ← MAX (αmin, MAX_αmin) (6A)
MIN_αmax ← MIN (αmax, MIN_αmax) (6B)
MAX_αmin on the left side of Equation (6A) indicates the maximum value of αmin at the current time point. MIN_αmax on the left side of Expression (6B) indicates the minimum value of αmax at the current time point. MAX (a, b) in Expression (6A) is a function that returns the larger value of {a, b}. MIN (a, b) in Expression (6B) is a function that returns the smaller value of {a, b}.

計算処理Aを繰り返すことで、αは1前後の数値となる。そのため、MAX_αminの初期値は0に、MIN_αmaxの初期値は、たとえば、2に設定するとよい。この場合、αの存在可能範囲は、以下の式(7)のようになる。
MAX_αmin<α<MIN_αmax ・・・(7)
βを仮に決定すると、一連のデータから式(5A)、式(5B)、式(6A)、式(6B)より{MAX_αmin,MIN_αmax}が得られる。
By repeating the calculation process A, α becomes a numerical value around 1. Therefore, the initial value of MAX_αmin may be set to 0, and the initial value of MIN_αmax may be set to 2, for example. In this case, the possible range of α is as shown in the following formula (7).
MAX_αmin <α <MIN_αmax (7)
If β is determined temporarily, {MAX_αmin, MIN_αmax} is obtained from the series of data from Equation (5A), Equation (5B), Equation (6A), and Equation (6B).

ここで、MAX_αmin>MIN_αmaxが成立する場合、仮決定したβでは、一連のデータすべてにおいてαmin<α<αmaxとなるαが存在しないことになる。αが存在しないということは、式(1)によって、クライアント100のローカルカウンタ値をサーバー120のローカルカウンタ値に補正できないことを意味する。これは、式(1)のβの設定がおかしいことが考えられる。   Here, when MAX_αmin> MIN_αmax is established, there is no α satisfying αmin <α <αmax in all the series of data in the temporarily determined β. The absence of α means that the local counter value of the client 100 cannot be corrected to the local counter value of the server 120 by the equation (1). This is probably because the setting of β in equation (1) is strange.

次に、βを可能な範囲で変化させながら、それぞれのβにおいて{MAX_αmin, MIN_αmax}を計算する。   Next, {MAX_αmin, MIN_αmax} is calculated for each β while changing β as much as possible.

βの初期存在可能範囲は、ある1回の測定データ{C1n,S1n,S2n,C2n}を用いて、以下の式(8)のように決定するとよい。
=C1n,β=[S1n−RTT,S1n] ・・・(8)
式(8)において、[A,B]は、βが、AからBまでの範囲にあることを示す。式(8)のRTTはラウンドトリップ時間を示す。RTTは、以下の式(8A)により算出される。
RTT=(C2n−C1n)−(S2n−S1n) ・・・(8A)
測定データは、なるべくラウンドトリップ時間RTTが小さいものを選ぶとよい。その方がβの初期存在可能範囲が狭くなるためである。具体的には、測定パケットの往復を、100回程度繰り返し、その中からラウンドトリップ時間RTTが最小のものを選ぶといった方法をとる。
The initial possible range of β may be determined as shown in the following formula (8) using a single measurement data {C 1n , S 1n , S 2n , C 2n }.
C 0 = C 1n , β = [S 1n −RTT, S 1n ] (8)
In Formula (8), [A, B] indicates that β is in the range from A to B. RTT in equation (8) represents the round trip time. RTT is calculated by the following equation (8A).
RTT = (C 2n −C 1n ) − (S 2n −S 1n ) (8A)
It is preferable to select measurement data having a round trip time RTT as small as possible. This is because the initial possible range of β becomes narrower. Specifically, the round trip of the measurement packet is repeated about 100 times, and a method in which the round trip time RTT is selected is selected.

βを変化させる方法としては、たとえば、βの初期存在可能範囲の中で、一定間隔毎にβを変化させる。この間隔は、目標とする時刻合わせの精度によって決定する。   As a method of changing β, for example, β is changed at regular intervals within the initial possible range of β. This interval is determined by the accuracy of target time adjustment.

一定間隔でβを変える具体的方法としては例えば、βの初期存在可能範囲を[βs,βe]、目標精度をRとして、以下の式(9A)、式(9B)より得られるβiを使用する。
N=INT((βe−βs)/R) ・・・(9A)
βi=βs+(βe−βs)/N×i,(i=0〜N) ・・・(9B)
式(9A)のINT(X)は整数に丸める関数である。
式(9A)、式(9B)により得られる複数個のβの各々に対し、式(5A)、式(5B)、式(6A)および式(6B)から、MAX_αmin、MIN_αmaxを算出する。
As a specific method of changing β at regular intervals, for example, βi obtained from the following equations (9A) and (9B) is used where β is the initial possible range of β and β is the target accuracy. .
N = INT ((βe−βs) / R) (9A)
βi = βs + (βe−βs) / N × i, (i = 0 to N) (9B)
INT (X) in Expression (9A) is a function that rounds to an integer.
MAX_αmin and MIN_αmax are calculated from Equation (5A), Equation (5B), Equation (6A), and Equation (6B) for each of a plurality of βs obtained by Equation (9A) and Equation (9B).

ここで、MAX_αmin<MIN_αmaxであれば、算出されたMAX_αmin、MIN_αmaxのデータをプロットする。MAX_αmin>MIN_αmaxであれば、算出されたMAX_αmin、MIN_αmaxのデータをプロットしない。一度、矛盾が生じた(MAX_αmin>MIN_αmaxとなった)時のβは、これ以上計算しても無意味なので、計算の対象から外してもよい。矛盾が生じた時のβを対象外とすることで、βの存在可能範囲を狭めていく。以下、上記のβの存在可能範囲を狭めていく処理を、β存在範囲狭め処理ともいう。   If MAX_αmin <MIN_αmax, the calculated data of MAX_αmin and MIN_αmax is plotted. If MAX_αmin> MIN_αmax, the calculated data of MAX_αmin and MIN_αmax is not plotted. Once the contradiction has occurred (MAX_αmin> MIN_αmax), β can be excluded from the calculation because it is meaningless to calculate any more. By excluding β when contradiction occurs, the possible range of β is narrowed. Hereinafter, the above-described process of narrowing the possible range of β is also referred to as a β-existing range narrowing process.

上記の処理により、βを横軸に、αを縦軸にとってβ-αプロット図を作成すると図5のようになる。図5を参照して、図5(a)、図5(b)で上の曲線がMIN_αmax、下の曲線がMAX_αminである。MAX_αmin、MIN_αmaxのデータを取り始めた時(データが少ない時)のプロット図は図5(a)のようになる。MAX_αmin、MIN_αmaxのデータが増えていくと次第に図5(b)のようになる。上の曲線と下の曲線に囲まれた範囲が、{α、β}の存在可能範囲を示す。測定時間を長くして、MAX_αmin、MIN_αmaxのデータを増やしていくと、αの範囲はかなり狭まっていくが、βはある程度までしか狭まらない。
αの範囲が狭まるのは、次の理由による。(αmax−αmin)に、式(5A)、式(5B)を代入し、S=S+δとすると、以下の式(9)のようになる。
αmax−αmin=(C−C)×(S−β)/(C−C)/(C−C)−δ/(C−C)−ε/(C−C)−ε/(C−C)・・・(9)
δは、サーバー120が、測定パケットを受信して、クライアント100へ送信するまでの時間である。すなわち、サーバー120における通信処理のための時間であってサーバー120のみに依存するのでδは一定の範囲に収まる。「一定の範囲に収まる」とは、常にδ<Mが成り立つ、すなわち、δには上限値が存在するということである。また、最小伝送遅延時間εも一定の範囲におさまる。一方、(C−C)や(C−C)は測定時間を長くするといくらでも大きくなる。
With the above processing, a β-α plot is created as shown in FIG. 5 with β on the horizontal axis and α on the vertical axis. Referring to FIG. 5, the upper curve in FIGS. 5A and 5B is MIN_αmax, and the lower curve is MAX_αmin. A plot when data of MAX_αmin and MIN_αmax is started (when the data is small) is as shown in FIG. As the data of MAX_αmin and MIN_αmax increases, it gradually becomes as shown in FIG. A range surrounded by the upper curve and the lower curve indicates a possible range of {α, β}. When the measurement time is lengthened and the data of MAX_αmin and MIN_αmax is increased, the range of α is considerably narrowed, but β is narrowed only to a certain extent.
The range of α is narrowed for the following reason. Substituting Equation (5A) and Equation (5B) into (αmax−αmin) and assuming S 2 = S 1 + δ, the following Equation (9) is obtained.
αmax−αmin = (C 2 −C 1 ) × (S 1 −β) / (C 1 −C 0 ) / (C 2 −C 0 ) −δ / (C 2 −C 0 ) −ε / (C 1 -C 0) -ε / (C 2 -C 0) ··· (9)
δ is a time until the server 120 receives the measurement packet and transmits it to the client 100. That is, since it is a time for communication processing in the server 120 and depends only on the server 120, δ falls within a certain range. “Fit within a certain range” means that δ <M always holds, that is, δ has an upper limit value. Also, the minimum transmission delay time ε falls within a certain range. On the other hand, (C 1 -C 0 ) and (C 2 -C 0 ) increase as much as the measurement time is increased.

よって、式(9)の右辺の第2項以降は、測定時間を長くすると、
δ/(C−C)→0
ε/(C−C)→0
ε/(C−C)→0
としてよい。ここでは、「→」は(測定時間を長くすると)限りなく“0”に近づくことを表す。ここで、Cは、前述したように、クライアント100における任意の基準となるローカルカウンタ値である。βは、前述したように、C=Cにおけるサーバー120のローカルカウンタ値である。
Therefore, from the second term on the right side of Equation (9), if the measurement time is lengthened,
δ / (C 2 -C 0 ) → 0
ε / (C 1 -C 0 ) → 0
ε / (C 2 −C 0 ) → 0
As good as Here, “→” indicates that the value approaches “0” infinitely (when the measurement time is lengthened). Here, C 0 is a local counter value as an arbitrary reference in the client 100 as described above. As described above, β is a local counter value of the server 120 at C = C 0 .

ここで、Cは基準時刻(測定を開始した時刻(すなわち、1番目の測定パケットを送信した時刻)と見なす)におけるクライアントの時刻を表し、βは基準時刻におけるサーバーの時刻を表す。また、CやCは現在時刻におけるクライアントの時刻を表す。SやSは現在時刻におけるサーバーの時刻を表す。そのため、測定を続けると(S−β)と(C−C)は、基準時刻から現在時刻までの時間と同じように増えていく。したがって、(S−β)および(C−C)の各々は、測定時間と見なしてもよいので、
(S−β)/(C−C)→1
としてよい。(実際にはサーバーとクライアントのクロック周波数比で1付近となる。)
Here, C 0 represents the time of the client at the reference time (considered as the time when the measurement was started (that is, the time when the first measurement packet was transmitted)), and β represents the time of the server at the reference time. C 1 and C 2 represent the client time at the current time. S 1 and S 2 represents the time of the server at the current time. Therefore, if the measurement is continued, (S 1 -β) and (C 2 -C 0 ) increase in the same manner as the time from the reference time to the current time. Therefore, since each of (S 1 -β) and (C 2 -C 0 ) may be regarded as a measurement time,
(S 1 -β) / (C 2 -C 0 ) → 1
As good as (In actuality, the ratio between the server and client clock frequencies is around 1.)

よって、(αmax−αmin)〜(C−C)/(C−C)と見積もることができる。(「〜」は、だいたい同じ値であることを表す。)(C−C)は、サーバー120の処理時間を含めたラウンドトリップ時間で、一定の範囲に収まる。また、(C−C)は、(S−β)および(C−C)と同様、基準時刻から現在時刻までの時間と同じように増えていく。したがって、(C−C)は測定時間と見なしてよい。よって、測定時間を長くすると
(C−C)/(C−C)→0
としてよい。以上より、測定時間を長くすれば、(αmax−αmin)は0に近づく。
Therefore, it can be estimated as (αmax−αmin) to (C 2 −C 1 ) / (C 1 −C 0 ). ( "~" Is generally indicating that it is the same value.) (C 2 -C 1) is a round trip time including the processing time of the server 120, fit into a certain range. Further, (C 1 -C 0 ) increases in the same manner as the time from the reference time to the current time, as in (S 1 -β) and (C 2 -C 0 ). Therefore, (C 1 -C 0 ) may be regarded as the measurement time. Therefore, if the measurement time is lengthened, (C 2 -C 1 ) / (C 1 -C 0 ) → 0
As good as From the above, if the measurement time is lengthened, (αmax−αmin) approaches zero.

βの範囲が狭まらないのは、次の理由による。まず、式(1)の変数CにCを代入してF(C)を算出する。式(1)の変数CにCを代入してF(C)を算出する。そして、式(2)に、算出したF(C)を代入し、式(3)にF(C)を代入する。そして、βについて解くと、以下の式(10)が得られる。
−α×(C−C)+ε<β<S−α×(C−C)−ε・・・(10)
ここで、αは未知数であるが、仮に決定しておく。βの下限値をβmin、βの上限値をβmaxとすると、βmin、βmaxは、式(10)より、以下の式(11A)、式(11B)となる。
βmin←S−α×(C−C)+ε ・・・(11A)
βmax←S−α×(C−C)−ε ・・・(11B)
式(11A)、式(11B)の{βmin,βmax}は特定のαにおける値を示している。αが異なれば、{βmin,βmax}も異なってくる。
(βmax−βmin)に、式(11A)、式(11B)を代入すると、式(12)となる。
βmax−βmin=α×(C−C)−(S−S)−2×ε
・・・(12)
式(12)のα×(C−C)−(S−S)は、サーバー120側のクロックで見たラウンドトリップ時間を示している。ラウンドトリップ時間は、パケット伝送に要する時間なので一定以上の時間を要するものであり、測定時間を長くしていくらでも小さくなるという性質はない。
The reason why the range of β is not narrowed is as follows. First, F (C 1 ) is calculated by substituting C 1 into the variable C in equation (1). F (C 2 ) is calculated by substituting C 2 for the variable C in equation (1). Then, the calculated F (C 1 ) is substituted into the equation ( 2 ), and F (C 2 ) is substituted into the equation (3). Then, when β is solved, the following equation (10) is obtained.
S 2 −α × (C 2 −C 0 ) + ε <β <S 1 −α × (C 1 −C 0 ) −ε (10)
Here, α is an unknown number, but is determined temporarily. Assuming that the lower limit value of β is βmin and the upper limit value of β is βmax, βmin and βmax are expressed by the following equations (11A) and (11B) from equation (10).
βmin ← S 2 −α × (C 2 −C 0 ) + ε (11A)
βmax ← S 1 −α × (C 1 −C 0 ) −ε (11B)
{Βmin, βmax} in Equation (11A) and Equation (11B) indicates a value at a specific α. If α is different, {βmin, βmax} is also different.
If Expression (11A) and Expression (11B) are substituted into (βmax−βmin), Expression (12) is obtained.
βmax−βmin = α × (C 2 −C 1 ) − (S 2 −S 1 ) −2 × ε
(12)
Α × (C 2 −C 1 ) − (S 2 −S 1 ) in Expression (12) indicates a round trip time viewed from the server 120 side clock. Since the round trip time is a time required for packet transmission, it takes a certain time or more, and there is no property that the measurement time is lengthened and becomes as small as possible.

最小伝送遅延時間εは、固定値である。よって、(βmax−βmin)は測定時間を長くしていくらでも小さくなるという性質はなく、ある程度の値までしか小さくならない。   The minimum transmission delay time ε is a fixed value. Therefore, (βmax−βmin) does not have a property of becoming small as long as the measurement time is lengthened, and is reduced only to a certain value.

図6は、実際のデータを使用して、βminとβmaxをプロットした図を示す。なお、αの値は、仮に決定しておく。図6を参照して、βの上限値βmaxと、βの下限値βminの範囲が狭まらない様子がわかる。   FIG. 6 shows a plot of βmin and βmax using actual data. Note that the value of α is temporarily determined. Referring to FIG. 6, it can be seen that the range between the upper limit value βmax of β and the lower limit value βmin of β is not narrowed.

なお、参考までに、測定時間を長くしてもβの存在可能範囲は狭まらないが、式(12)から明らかなように、最小伝送遅延時間εを大きくすればするほど、βの存在可能範囲は狭めることができる。   For reference, even if the measurement time is increased, the possible range of β does not narrow, but as is clear from equation (12), the larger the minimum transmission delay time ε is, the more β exists. The possible range can be narrowed.

最小伝送遅延時間εは、以下のように設定することができる。伝送遅延時間は、ネットワークを流れる時間の他に、端末で処理する時間も含まれる。端末で処理する時間は、OSのコンテキスト切替、割込み応答時間などが含まれる。端末の処理時間が、例えば40μ秒は少なくともかかることがあらかじめわかっていればε=40μ秒と設定してよい。端末の処理時間は、同一マシン上で時刻合わせのための測定パケットを送受信することによって求めることができる。   The minimum transmission delay time ε can be set as follows. The transmission delay time includes not only the time for flowing through the network but also the time for processing in the terminal. The processing time at the terminal includes OS context switching, interrupt response time, and the like. If it is known in advance that the processing time of the terminal takes at least 40 μs, for example, ε = 40 μs may be set. The processing time of the terminal can be obtained by transmitting / receiving a measurement packet for time adjustment on the same machine.

また、ネットワークの経路上に特定の媒体が存在することがわかっていて、その媒体の最小の伝送遅延時間があらかじめわかっていれば、その時間を、端末の処理時間に含めることができる。特に、最小伝送遅延時間εを設定できなければ、ε=0のままでよい。   Also, if it is known that a specific medium exists on the network path and the minimum transmission delay time of the medium is known in advance, the time can be included in the processing time of the terminal. In particular, if the minimum transmission delay time ε cannot be set, ε = 0 may be maintained.

以上の説明により、{α、β}の存在可能範囲が得られたが、実際の{α、β}は、図5のβ−αプロット図の中にあるはずである。これ以上は、何らかの仮定を置かなければ{α、β}を決定することはできない。   Although the possible range of {α, β} has been obtained by the above description, the actual {α, β} should be in the β-α plot diagram of FIG. Above this, {α, β} cannot be determined unless some assumption is made.

本実施例では、{α、β}を推定する一例を示す。先ず、βを推定する。図5のβ−αプロット図において、βの存在可能範囲をβ=[β1,β2]とすると、βの推定値βestを、以下の式(13)で求めるものとする。なお、図5においてプロット点が存在するβの最下限値をβ1、βの最上限値をβ2とする。
βest=(β1+β2)/2 ・・・(13)
式(13)は、βの存在可能範囲の中で最下限と最上限の算術平均をとっているが、これに限らず、たとえば、式(13A)のような加重平均のようなものであってもよい。
βest=β1×ω+β2×(1−ω),0<ω<1 ・・・(13A)
次に、αを推定する。αの推定値αestは、以下の式(14)で求めるものとする。
αest=(MAX_αmin[βest]+MIN_αmax[βest])/2・・・(14)
ここで、{MAX_αmin[βest],MIN_αmax[βest]}は、前述の式により、β=βestで計算した{MAX_αmin,MIN_αmax}をそれぞれ表している。
In this embodiment, an example of estimating {α, β} is shown. First, β is estimated. In the β-α plot diagram of FIG. 5, when the possible range of β is β = [β1, β2], an estimated value βest of β is obtained by the following equation (13). In FIG. 5, the lowest lower limit value of β where the plot points exist is β1, and the highest upper limit value of β is β2.
βest = (β1 + β2) / 2 (13)
Equation (13) takes the arithmetic mean of the lowest and highest limits in the possible range of β, but is not limited to this. For example, it is a weighted average like Equation (13A). May be.
βest = β1 × ω + β2 × (1−ω), 0 <ω <1 (13A)
Next, α is estimated. The estimated value αest of α is obtained by the following equation (14).
αest = (MAX_αmin [βest] + MIN_αmax [βest]) / 2 (14)
Here, {MAX_αmin [βest], MIN_αmax [βest]} represents {MAX_αmin, MIN_αmax} calculated with β = βest, respectively, according to the above formula.

式(14)は、αestをMIN_αmaxとMAX_αminの算術平均で求めているが、これに限らず、たとえば、式(14A)のような加重平均のようなものであってもよい。
αest=MAX_αmin[βest]×ω+MIN_αmax[βest]×(1−ω),0<ω<1 ・・・(14A)
式(13)は、行きと帰りの最小の伝送遅延時間が同じであると仮定したものである。この仮定は、物理的には行きの伝送路と帰りの伝送路で対称性を保っていることが前提となっているが、常に伝送路の対称性が保っている必要はない。
In the equation (14), αest is obtained by the arithmetic average of MIN_αmax and MAX_αmin. However, the present invention is not limited to this, and for example, a weighted average like the equation (14A) may be used.
αest = MAX_αmin [βest] × ω + MIN_αmax [βest] × (1-ω), 0 <ω <1 (14A)
Equation (13) assumes that the minimum transmission delay time for going and returning is the same. This assumption is based on the premise that symmetry is physically maintained between the outgoing transmission line and the return transmission line, but it is not always necessary to maintain the symmetry of the transmission line.

本実施の形態では、測定パケットを送受信している一連の測定期間の間に、行きの伝送遅延時間が最小値に近くなるパケットと、帰りの伝送遅延時間が最小値に近くなるパケットの両方が観測されればよい。   In the present embodiment, both a packet whose outbound transmission delay time is close to the minimum value and a packet whose return transmission delay time is close to the minimum value during a series of measurement periods during which measurement packets are transmitted and received are It only has to be observed.

本実施の形態では、片方向の映像伝送を行っている間でも、最小値に近い伝送遅延時間を持つパケットが観測されるものである。前述の図21は、本実施の形態における、時間経過における行きの伝送遅延時間の変化を示す図でもある。例えば、図21において、行きと帰りで伝送路の対称性が失われる映像伝送中であっても最小伝送遅延時間(約100μ秒)に十分近いデータが得られている。   In this embodiment, a packet having a transmission delay time close to the minimum value is observed even during one-way video transmission. FIG. 21 described above is also a diagram showing a change in the transmission delay time in the course of time in the present embodiment. For example, in FIG. 21, data sufficiently close to the minimum transmission delay time (about 100 μsec) is obtained even during video transmission in which the symmetry of the transmission path is lost between going and returning.

こうして得られた{α,β}の推定値{αest,βest}を式(1)に代入すると、クライアント側の任意の時点のローカルカウンタ値を、以下の式(1A)に基づいた計算により、サーバー側に合わせることができる。
F(C)=αest×(C−C)+βest ・・・(1A)
また、行きの伝送遅延時間および帰りの伝送遅延時間は、それぞれ、以下の式(2A)および式(3A)で求めることができる。
行きの伝送遅延時間=S−{αest×(C−C)+βest}・・・(2A)
帰りの伝送遅延時間={αest×(C−C)+βest}−S・・・(3A)
以上の計算により、片方向の伝送遅延時間を測定することができる。
By substituting the estimated value {αest, βest} of {α, β} obtained in this way into equation (1), the local counter value at an arbitrary point on the client side is calculated by the calculation based on the following equation (1A): Can be adjusted to the server side.
F (C) = αest × (C−C 0 ) + βest (1A)
The outbound transmission delay time and the return transmission delay time can be obtained by the following equations (2A) and (3A), respectively.
Outgoing transmission delay time = S 1 − {αest × (C 1 −C 0 ) + βest} (2A)
Return transmission delay time = {αest × (C 2 −C 0 ) + βest} −S 2 (3A)
With the above calculation, the transmission delay time in one direction can be measured.

以下、本発明の特徴を分かり易くするために単純な例で説明する。
図7は、測定パケットを往復させて得られたデータの一例を示す図である。ここでは、説明を簡単にするため、サーバー120およびクライアント100における、時刻の進み方は同じものとする。すなわち、サーバー120とクライアント100とのクロック周波数比を示すαは、“1”であるとする。式(1)にα=1を代入すると、以下の式(1B)を得る。
F(C)=(C−C)+β ・・・(1B)
図7を参照して、クライアント100の時刻はサーバー120の時刻より、ちょうど1時間進んでいるものとする。クライアント100は、クライアント100の時刻11:00:00に測定パケットPK1を送信する。サーバー120は、サーバー120の時刻10:04:00に測定パケットPK1を受信する。サーバー120は、サーバー120の時刻10:05:00に測定パケットPKR1を送信する。
Hereinafter, a simple example will be described in order to facilitate understanding of the features of the present invention.
FIG. 7 is a diagram illustrating an example of data obtained by reciprocating the measurement packet. Here, in order to simplify the explanation, it is assumed that the time advance in the server 120 and the client 100 is the same. That is, α indicating the clock frequency ratio between the server 120 and the client 100 is “1”. Substituting α = 1 into equation (1), the following equation (1B) is obtained.
F (C) = (C−C 0 ) + β (1B)
Referring to FIG. 7, it is assumed that the time of client 100 is exactly one hour ahead of the time of server 120. The client 100 transmits the measurement packet PK1 at the time 11:00 of the client 100. The server 120 receives the measurement packet PK1 at time 10:00 of the server 120. The server 120 transmits the measurement packet PKR1 at the time 10:00 of the server 120.

クライアント100は、クライアント100の時刻11:10:00に測定パケットPKR1を受信する。以上のように、クライアント100と、サーバー120との間で、測定パケットが往復する。   The client 100 receives the measurement packet PKR1 at the time 11:10:00 of the client 100. As described above, the measurement packet reciprocates between the client 100 and the server 120.

クライアント100は、1番目(最初)の測定パケット(PK1,PKR1)の往復により、{C,S,S,C}={11:00:00,10:04:00,10:05:00,11:10:00}のデータを得る。クライアント100は、2,3,・・・,n番目の測定パケットの往復により、同様のデータを得る。 The client 100 performs {C 1 , S 1 , S 2 , C 2 } = {11: 00: 00: 00, 10:00:00, 10: by the round trip of the first (first) measurement packet (PK1, PKR1). Data of 05:00, 11:10:00} is obtained. The client 100 obtains similar data by reciprocating the 2, 3,..., N th measurement packet.

式(1B)において、Cは、任意の時刻でもよいが、C=11:00:00とする。βはC=Cの時点でのサーバー120の時刻であるが、クライアント100にはわからない。βは未知数である。 In Formula (1B), C 0 may be any time, but C 0 = 11: 00: 00: 00. β is the time of the server 120 at the time of C = C 0 , but the client 100 does not know. β is an unknown.

以下に、データが得られるごとにβの存在可能範囲がどのようになるかを示す。まず、1番目のデータにおけるラウンドトリップ時間は、行きが4分で帰りは5分の計9分である。   The following shows what the possible range of β will be each time data is obtained. First, the round trip time in the first data is 9 minutes in total, 4 minutes for going and 5 minutes for returning.

注意すべき点は、クライアント100にとって、行きと帰りの合計の時間が9分であることしかわからないことである。行きと帰りがそれぞれどれだけ時間がかかったかはわからない。しかしながら、{行きの時間=9分,帰りの時間=0分}〜{行きの時間=0分,帰りの時間=9分}の範囲にあることは確かである。   It should be noted that the client 100 only knows that the total time for going and returning is 9 minutes. I don't know how long it took to go and go back. However, it is certain that the range is {bound time = 9 minutes, return time = 0 minutes} to {bound time = 0 minutes, return time = 9 minutes}.

クライアント100側の時刻11:00:00に送信された測定パケットが、サーバー側の時刻10:04:00で受信されているので、C=11:00:00の時点でのサーバーの時刻βは、10:04:00−00:09:00=9:55:00より、9:55:00<β<10:04:00(以下、式Aともいう)の範囲に存在するはずである。   Since the measurement packet transmitted at the time 11:00 on the client 100 side is received at the time 10:00:00 on the server side, the server time β at the time of C = 11: 00: From 10:04:00 to 00: 09: 00 = 9: 55: 00, it should be in the range of 9:55:00 <β <10:04:00 (hereinafter also referred to as Formula A).

次に、2番目のデータにおけるラウンドトリップ時間は、行きが3分で帰りは6分の計9分である。したがって、10:23:00−00:09:00=10:14:00より、10:14:00<β+(11:20:00−11:00:00)<10:23:00となり、9:54:00<β<10:03:00(以下、式Bともいう)が得られる。   Next, the round trip time for the second data is 9 minutes in total, with 3 minutes going and 6 minutes returning. Therefore, from 10: 23: 00-00: 09: 0 = 10: 14: 00, 10:14:00 <β + (11: 20: 00-11: 00: 00) <10:23:00, 9 : 54: 00 <β <10:03:00 (hereinafter also referred to as Formula B).

式Aおよび式Bより、9:55:00<β<10:03:00(以下、式Cともいう)を得る。したがって、2番目のデータを加味することでβの存在可能範囲が狭まったことが分かる。   From Formula A and Formula B, 9:55:00 <β <10:03:00 (hereinafter also referred to as Formula C) is obtained. Therefore, it can be seen that the possible range of β is narrowed by adding the second data.

次に3番目のデータにおけるラウンドトリップ時間は、行きが5分で帰りは2分の計7分である。したがって、したがって、10:45:00−00:07:00=10:38:00より、10:38:00<β+(11:40:00−11:00:00)<10:45:00となり、9:58:00<β<10:05:00が得られる。式A、式Bおよび式Cより、9:58:00<β<10:03:00(以下、式Dともいう)を得る。したがって、3番目のデータを加味することでβの存在可能範囲がさらに狭まったことが分かる。   Next, the round trip time in the third data is 5 minutes for going and 2 minutes for returning, totaling 7 minutes. Therefore, from 10:45:00 to 00: 07: 00 = 10: 38: 00, 10:38:00 <β + (11: 40: 00-11: 00: 00) <10:45:00 9:58:00 <β <10:05:00. From Formula A, Formula B, and Formula C, 9:58:00 <β <10:03:00 (hereinafter also referred to as Formula D) is obtained. Therefore, it can be seen that the possible range of β is further narrowed by adding the third data.

個々のデータ例で示すように「行き」の伝送遅延時間が、今までの最小値を更新すれば、βの上限値が更新される(2番目のデータにより得られる式B参照)。また、「帰り」の伝送遅延時間が、今までの最小値を更新すれば、βの下限値が更新される(3番目のデータにより得られる式D参照)。このように測定パケットの往復を繰り返すことで、βの存在可能範囲がある程度まで狭めることができる。   As shown in the individual data examples, if the transmission delay time of “going” is updated with the minimum value so far, the upper limit value of β is updated (see Formula B obtained from the second data). Further, if the transmission delay time of “return” is updated with the minimum value so far, the lower limit value of β is updated (see Expression D obtained from the third data). By repeating the round trip of the measurement packet in this way, the possible range of β can be narrowed to some extent.

どこまで狭めることができるかを考察すると、「行きの最小伝送遅延時間」+「帰りの最小伝送遅延時間」まで狭めることができる。   Considering how far it can be narrowed, it can be narrowed to “minimum transmission delay time for outbound” + “minimum transmission delay time for return”.

これは1つの測定パケットを往復させて得られるものではない。複数の測定パケットを往復させた中で、行きが最小伝送遅延時間となる測定パケットと、帰りが最小伝送遅延時間となる測定パケットは必ずしも一致していない。むしろ、一致していないことの方が多い。   This is not obtained by reciprocating one measurement packet. Among the plurality of measurement packets that are reciprocated, the measurement packet that has the minimum transmission delay time is not necessarily the same as the measurement packet that has the minimum transmission delay time. Rather, there are many things that do not agree.

複数の測定パケットを往復させて、一連のデータをすべて考慮することでβの存在可能範囲を狭めることができる。そして、βの存在可能範囲を狭めてから、βの値を推定する。βの値の推定方法は、式(13)で述べたようにβの上限値とβの下限値の算術平均とする。   The range in which β can exist can be narrowed by reciprocating a plurality of measurement packets and considering all the series of data. Then, after the possible range of β is narrowed, the value of β is estimated. The method of estimating the value of β is the arithmetic average of the upper limit value of β and the lower limit value of β as described in Expression (13).

この例では、βの上限値=10:03:00、βの下限値=9:58:00であるので、式(13)より、βest=(10:03:00+9:58:00)/2=10:00:30が得られる。つまり、クライアント100はサーバー120と比べて11:00:00−10:00:30=0:59:30進んでいると推定された。   In this example, since the upper limit value of β = 10: 03: 00 and the lower limit value of β = 9: 58: 00, βest = (10: 03: 00 + 9: 58: 00) / 2 from equation (13). = 10:00:30 is obtained. That is, it is estimated that the client 100 has advanced 11: 00: 00: 00: 30 = 0: 59: 30 as compared to the server 120.

物理的に伝送路が対称であれば、測定パケットの往復をある程度繰り返すと、「行きの最小伝送遅延時間」と「帰りの最小伝送遅延時間」は、ほとんど同じ値になると考えられるので、式(13)で述べた推定方法は合理性がある。   If the transmission path is physically symmetric, the round trip of the measurement packet is repeated to some extent, so the “minimum transmission delay time” and “minimum transmission delay time” are considered to be almost the same value. The estimation method described in 13) is reasonable.

以上のようにすることで、クライアント100の時刻をサーバー120の時刻に合わせることができる。   As described above, the time of the client 100 can be set to the time of the server 120.

実際には、サーバー120とクライアント100で時刻の進み方は合っていないので、αも未知数である。本発明では、{α,β}がともに未知数であるとして、{α,β}の存在可能範囲を狭めていく手法をとる。   Actually, since the time advance does not match between the server 120 and the client 100, α is also an unknown number. In the present invention, assuming that {α, β} are both unknown, a method of narrowing the possible range of {α, β} is adopted.

以下、プログラムを実行するクライアント100側のCPU101とサーバー120側のCPU121の動作について、詳しく説明する。   Hereinafter, operations of the CPU 101 on the client 100 side and the CPU 121 on the server 120 side that execute the program will be described in detail.

図8は、サーバー120で実行されるプログラムのフローチャートを示す図である。図8を参照して、ステップS101では,ネットワークの初期化が行なわれる。具体的には、CPU121が、パケットを送受信するためのポートを開いて、パケットを送受信可能な状態にする。その後、ステップS102に進む。   FIG. 8 is a diagram illustrating a flowchart of a program executed by the server 120. Referring to FIG. 8, in step S101, the network is initialized. More specifically, the CPU 121 opens a port for transmitting / receiving packets so that packets can be transmitted / received. Thereafter, the process proceeds to step S102.

ステップS102では、CPU121が、スレッドA1およびスレッドA2を生成する。スレッドA1およびスレッドA2の各々は、独立して処理される。なお、スレッドA1では、初期値が0に設定されたカウンタrd_cntが使用される。スレッドA2では、初期値が0に設定されたカウンタwr_cntが使用される。   In step S102, the CPU 121 generates a thread A1 and a thread A2. Each of the thread A1 and the thread A2 is processed independently. In the thread A1, a counter rd_cnt whose initial value is set to 0 is used. In the thread A2, a counter wr_cnt whose initial value is set to 0 is used.

スレッドA1では、CPU121が、ステップS105、S106、S107、S108を実行する。スレッドA2では、CPU121が、S103、S104を実行する。   In the thread A1, the CPU 121 executes steps S105, S106, S107, and S108. In the thread A2, the CPU 121 executes S103 and S104.

ステップS103では、CPU121が、測定パケットを受信したか否かを判定する。ステップS103において、YESならば、ステップS104に進む。一方、ステップS103において、NOならば、再度、ステップS103の処理が行なわれる。   In step S103, the CPU 121 determines whether a measurement packet has been received. If YES in step S103, the process proceeds to step S104. On the other hand, if NO at step S103, the process at step S103 is performed again.

ステップS104では、CPU121が、サーバー側のローカルカウンタ値(時刻)を取得し、変数S1に代入する。ローカルカウンタ(時刻)の取得はハードウェアの構成に依存するので、それに合わせた方法を取る。測定パケットのペイロード領域1には変数Cが含まれている。そして、CPU121が、カウンタwr_cntを1インクリメントする。その後、再度、ステップS103の処理が行なわれる。 In step S104, the CPU 121 acquires a local counter value (time) on the server side and substitutes it into the variable S1. Since the acquisition of the local counter (time) depends on the hardware configuration, a method corresponding to that is taken. It contains variable C 1 is in the payload area 1 of the measurement packet. Then, the CPU 121 increments the counter wr_cnt by 1. Thereafter, the process of step S103 is performed again.

スレッドA1では、まず、ステップS105の処理が行なわれる。
ステップS105では、CPU121が、ステップS103により、受信された測定パケットがあるか否かを判定する。当該判定は、カウンタrd_cntと、ステップS104において1インクリメントされたカウンタwr_cntとが異なるか否かにより判定される。
In the thread A1, first, the process of step S105 is performed.
In step S105, the CPU 121 determines whether there is a measurement packet received in step S103. This determination is made based on whether or not the counter rd_cnt is different from the counter wr_cnt incremented by 1 in step S104.

ステップS105において、YESならば,ステップS106に進む。一方、ステップS106において、NOならば、後述するステップS108に進む。   If YES in step S105, the process proceeds to step S106. On the other hand, if NO at step S106, the process proceeds to step S108 described later.

図9は、測定パケットおよび返信パケットの構成の一例を示す図である。
図9(A)は、測定パケットの構成の一例を示す図である。測定パケットは、送信元アドレス、宛先アドレスおよびペイロード領域1から構成される。
FIG. 9 is a diagram illustrating an example of the configuration of the measurement packet and the reply packet.
FIG. 9A shows an example of the configuration of a measurement packet. The measurement packet includes a transmission source address, a destination address, and a payload area 1.

図9(B)は、返信パケットの構成の一例を示す図である。返信パケットは、送信元アドレス、宛先アドレス、ペイロード領域1、ペイロード領域2、ペイロード領域3から構成される。   FIG. 9B is a diagram illustrating an example of the configuration of a reply packet. The reply packet includes a transmission source address, a destination address, a payload area 1, a payload area 2, and a payload area 3.

なお、図9に示したパケット構成は、説明に必要な最小限のものであって、それ以外にヘッダーや、ペイロード領域が含まれていてもよい。また、測定パケットと返信パケットのペイロード領域は十分小さいので、単体で送受信しなくても、その他のサーバーとクライアント間でやりとりされる任意のパケットに含めて送受信してもよい。   Note that the packet configuration shown in FIG. 9 is the minimum necessary for the description, and a header and a payload area may be included in addition to that. Further, since the payload areas of the measurement packet and the reply packet are sufficiently small, they may be transmitted / received by being included in an arbitrary packet exchanged between other servers and clients without being transmitted / received alone.

再び、図8を参照して、ステップS106では、返信パケット作成処理が行なわれる。返信パケット作成処理では、CPU121が、サーバー120のローカルカウンタ値(時刻)を取得し、変数Sに代入する。 Referring to FIG. 8 again, in step S106, a reply packet creation process is performed. In reply packet creation process, CPU 121 obtains the local counter value server 120 (time) is substituted into the variable S 2.

次に、CPU121が、返信パケットのペイロード領域1、ペイロード領域2およびペイロード領域3に、C、S、Sをそれぞれ設定する。そして、受信した測定パケットの送信元アドレスを、返信パケットの宛先アドレスに設定する。以上により、返信パケットが作成される。そして、CPU101が、カウンタrd_cntを1インクリメントする。その後、ステップS107に進む。 Next, the CPU 121 sets C 1 , S 1 , and S 2 in the payload area 1, payload area 2, and payload area 3 of the reply packet, respectively. Then, the source address of the received measurement packet is set as the destination address of the reply packet. Thus, a reply packet is created. Then, the CPU 101 increments the counter rd_cnt by 1. Thereafter, the process proceeds to step S107.

ステップS107では、CPU121が、生成した返信パケットを、クライアント100へ送信する。その後、ステップS108に進む。   In step S <b> 107, the CPU 121 transmits the generated reply packet to the client 100. Thereafter, the process proceeds to step S108.

ステップS108では、CPU121が、50msウエイトする。なお、ウエイトする時間は、50msに限定されることなく、適宜変更されてもよい。その後、再度、ステップS105の処理が行なわれる。   In step S108, the CPU 121 waits for 50 ms. Note that the waiting time is not limited to 50 ms and may be changed as appropriate. Thereafter, the process of step S105 is performed again.

なお、測定パケットを受信する処理(S103)と、返信パケットを送信する処理(S107)は、同じスレッドで行なわれてもよい。   Note that the process of receiving the measurement packet (S103) and the process of transmitting the reply packet (S107) may be performed in the same thread.

図10は、クライアント100で実行されるプログラムのフローチャートを示す図である。図10を参照して、ステップS201では、ネットワークの初期化が行なわれる。具体的には、CPU101が、パケットを送受信するためのポートを開いて、パケットを送受信可能な状態にする。その後、ステップS202に進む。   FIG. 10 is a diagram illustrating a flowchart of a program executed on the client 100. Referring to FIG. 10, in step S201, the network is initialized. More specifically, the CPU 101 opens a port for transmitting / receiving packets so that packets can be transmitted / received. Thereafter, the process proceeds to step S202.

ステップS202では、CPU101が、スレッドB1およびスレッドB2を生成する。スレッドB1およびスレッドB2の各々は、独立して処理される。スレッドB1では、CPU101が、ステップS203,S204,S205を実行する。スレッドB2では、CPU101が、S206、S207、S208を実行する。   In step S202, the CPU 101 generates a thread B1 and a thread B2. Each of the thread B1 and the thread B2 is processed independently. In the thread B1, the CPU 101 executes steps S203, S204, and S205. In the thread B2, the CPU 101 executes S206, S207, and S208.

ステップS203では、測定パケット作成処理が行なわれる。測定パケット作成処理では、CPU101が、クライアント100のローカルカウンタ値(時刻)を取得し、Cに代入する。次に、CPU101が、測定パケットのペイロード領域1にCを設定する。そして、CPU101が、測定パケットの宛先アドレスに、サーバー120のアドレスを設定する。以上により、測定パケットが作成される。その後、ステップS204に進む。 In step S203, a measurement packet creation process is performed. In the measurement packet creation processing, CPU 101 obtains the local counter value of the client 100 a (time) is substituted into C 1. Next, CPU 101 sets the C 1 in the payload area 1 of the measurement packet. Then, the CPU 101 sets the address of the server 120 as the destination address of the measurement packet. As described above, a measurement packet is created. Thereafter, the process proceeds to step S204.

ステップS204では、CPU101が、生成した測定パケットを、サーバー120へ送信する。その後、ステップS205に進む。   In step S <b> 204, the CPU 101 transmits the generated measurement packet to the server 120. Thereafter, the process proceeds to step S205.

ステップS205では、CPU101が、100msウエイトする。なお、ウエイトする時間は、100msに限定されることなく、適宜変更されてもよい。その後、再度、ステップS203の処理が行なわれる。   In step S205, the CPU 101 waits for 100 ms. Note that the waiting time is not limited to 100 ms and may be changed as appropriate. Thereafter, the process of step S203 is performed again.

ステップS206では、CPU101が、返信パケットを受信したか否かを判定する。ステップS206において、YESならば、ステップS207に進む。一方、ステップS206において、NOならば、再度、ステップS206の処理が行なわれる。   In step S206, the CPU 101 determines whether a reply packet has been received. If YES in step S206, the process proceeds to step S207. On the other hand, if NO at step S206, the process at step S206 is performed again.

ステップS207では、CPU101が、クライアント100のローカルカウンタ値(時刻)を取得し、Cに代入する。次に、CPU101が、返信パケットのペイロード領域1、ペイロード領域2およびペイロード領域3に、それぞれ含まれるC、S、Sを取得する。その後、ステップS208に進む。 In step S207, CPU 101 obtains the local counter value of the client 100 a (time), is substituted into C 2. Next, the CPU 101 acquires C 1 , S 1 , and S 2 included in the payload area 1, the payload area 2, and the payload area 3 of the reply packet, respectively. Thereafter, the process proceeds to step S208.

ステップS208では、ステップS207により得た{C,S,S,C}を引数として、処理Aが行なわれる。処理Aが終了すると、再度、ステップS206の処理が行なわれる。 In step S208, process A is performed using {C 1 , S 1 , S 2 , C 2 } obtained in step S207 as an argument. When the process A ends, the process of step S206 is performed again.

以上の処理により、測定パケットを、クライアント100と、サーバー120との間で往復させることにより、データ{C,S,S,C}を得ることができる。 Through the above processing, data {C 1 , S 1 , S 2 , C 2 } can be obtained by reciprocating the measurement packet between the client 100 and the server 120.

図11は、処理Aのフローチャートである。処理Aには、本発明の要となるアルゴリズムが含まれている。処理Aは{C,S,S,C}を引数として受け取る。図11を参照して、ステップS301では、処理Aの呼び出し回数が100回以内であるか否かが、CPU101により判定される。ステップS301において、YESならば、ステップS302に進む。一方、ステップS301において、NOならば、後述するステップS303に進む。なお、ステップS302には、内容の正確性を期すため、C言語で記述されたプログラムの一部が記載されている。 FIG. 11 is a flowchart of processing A. The process A includes an algorithm that is a key of the present invention. Process A receives {C 1 , S 1 , S 2 , C 2 } as an argument. Referring to FIG. 11, in step S <b> 301, CPU 101 determines whether or not the number of calls for process A is within 100 times. If YES in step S301, the process proceeds to step S302. On the other hand, if NO at step S301, the process proceeds to step S303 described later. In step S302, a part of a program written in C language is described in order to ensure the accuracy of the contents.

ステップS302の処理が繰り返されることで、CPU101が、Cを決定するために、最初の100個のデータの中からラウンドトリップ時間が最小となるデータを選び、その時のCをCにする。 By the process of step S302 is repeated, CPU 101 is to determine C 0, select the data round-trip time is minimized among the first 100 data, the C 1 at that time C 0 .

ステップS302では、CPU101が、前述の式(8A)を用いて、ラウンドトリップ時間(RTT)を計算する。CPU101は、ステップS302の処理が繰り返される毎に、前回算出したRTTと、今回算出したRTTを比較し、値の小さい方を、メモリ102に記憶させる。   In step S302, the CPU 101 calculates a round trip time (RTT) using the above-described equation (8A). Each time the process of step S302 is repeated, the CPU 101 compares the previously calculated RTT with the currently calculated RTT, and stores the smaller value in the memory 102.

CPU101は、ステップS302の処理の実行回数が、100回となると、それまでのラウンドトリップRTTの最小のデータを使って、配列を確保し、初期値を設定する。S302内のプログラムのiminおよびimaxは、それぞれ、βminおよびβmaxに対応する。当該初期値の設定では、βの下限値βminおよび上限値βmaxの初期値の設定が行なわれる。また、100回というのは目安であって、適宜変更してもよい。その後、ステップS302の処理が終了すると、この処理Aは終了し、図10の処理に戻り、再度、ステップS206の処理が行なわれる。   When the number of executions of the process in step S302 reaches 100, the CPU 101 secures an array and sets an initial value using the minimum data of the round trip RTT so far. The imin and imax of the program in S302 correspond to βmin and βmax, respectively. In the initial value setting, initial values of the lower limit value βmin and the upper limit value βmax of β are set. Moreover, 100 times is a standard and may be changed as appropriate. Thereafter, when the process of step S302 ends, the process A ends, the process returns to the process of FIG. 10, and the process of step S206 is performed again.

ステップS303では、処理Bが行なわれる。
図12は、処理BをC言語で記述したプログラムを示す図である。図12を参照して、プログラムの最初のfor文の処理は、前述のステップS302で設定されたβの範囲内で、β(プログラム内ではi)を変化させながら、αの上限値MIN_αmaxおよび下限値MAX_αminが算出される。具体的には、処理Bでは、CPU101が、前述の式(5A)、式(5B)、式(6A)、式(6B)に基づいて、MAX_αminおよびMIN_αmaxを算出する。次に、CPU101は、前述のβ存在範囲狭め処理を行なうことで、βの存在可能範囲を狭める。
In step S303, process B is performed.
FIG. 12 is a diagram showing a program in which process B is described in C language. Referring to FIG. 12, the processing of the first for statement of the program is performed by changing the upper limit value MIN_αmax and the lower limit of α while changing β (i in the program) within the range of β set in step S302 described above. A value MAX_αmin is calculated. Specifically, in the process B, the CPU 101 calculates MAX_αmin and MIN_αmax based on the above formula (5A), formula (5B), formula (6A), and formula (6B). Next, the CPU 101 narrows the possible range of β by performing the above-described β existence range narrowing process.

次に、CPU101は、前述の式(13)に基づいて、βestを算出する。また、CPU101は、前述の式(14)に基づいて、αestを算出する。   Next, the CPU 101 calculates βest based on the above equation (13). Further, the CPU 101 calculates αest based on the above-described equation (14).

次に、CPU101は、前述の式(2A)および式(3A)にそれぞれ基づいて、行きおよび帰りの伝送遅延時間を算出する。行きおよび帰りの伝送遅延時間を算出するのは任意である。その後、ステップS304に進む。

ステップS304では、CPU101が、処理Aにより取得したC、処理Bにより取得したαest、βestのデータを、他のプログラムでも使用できる形式でメモリ102に記憶させる。その後、この処理Aは終了し、前述の図10の処理に戻り、ステップS206の処理が行なわれる。C、αest、βestのデータは、クライアントが、図2の専用ハードウェア108を備えている場合、レジスタ107に記憶させてもよい。
Next, CPU 101 calculates the outbound and return transmission delay times based on the above-described equations (2A) and (3A), respectively. It is optional to calculate the outbound and return transmission delay times. Thereafter, the process proceeds to step S304.

In step S304, the CPU 101 causes the memory 102 to store the C 0 acquired by the process A and the αest and βest data acquired by the process B in a format that can be used by other programs. Thereafter, the process A ends, the process returns to the process of FIG. 10 described above, and the process of step S206 is performed. The data of C 0 , αest, and βest may be stored in the register 107 when the client includes the dedicated hardware 108 of FIG.

なお、処理Aが長時間行なわれると、クライアント100の発振器104またはサーバー120の発振器124の発振周波数が変化することにより、βの存在可能範囲がなくなる場合が生じ得る。測定期間中に上記のような発振周波数の変化が起こると、式(1A)によるローカルカウント値の補正ができなくなることがある。   If the process A is performed for a long time, the oscillation frequency of the oscillator 104 of the client 100 or the oscillator 124 of the server 120 may change, so that the possible range of β may be lost. If the oscillation frequency changes as described above during the measurement period, the local count value may not be corrected by equation (1A).

上記のように、βの存在可能範囲がなくなった場合、図11において定義されている静的変数を初期値に戻し、ステップS301、S302、S303、S304の処理を、再度行なえばよい。あるいは、βの存在可能範囲がなくなる、なくならないに関わらず、一定時間ごとにクライアントの基準時刻であるCを変更して、前述の計算を行なってもよい。 As described above, when the possible range of β disappears, the static variables defined in FIG. 11 are returned to the initial values, and the processes of steps S301, S302, S303, and S304 may be performed again. Alternatively, the above-described calculation may be performed by changing C 0 that is the reference time of the client at regular intervals regardless of whether the possible range of β disappears or does not disappear.

次に、クライアント100で行なわれるローカルカウンタ値を補正する処理(以下、カウンタ補正処理ともいう)について説明する。カウンタ補正処理は、図10のクライアント100で実行されるプログラムの処理とは、独立して同時に行なわれる。カウンタ補正処理は、たとえば、サーバー120と、クライアント100との間で、時刻同期が必要な、コンテンツを再生するアプリケーションプログラム(以下、コンテンツ再生プログラムともいう)で行なわれる処理である。この場合、サーバー120およびクライアント100の各々では、同一のコンテンツが、コンテンツ再生プログラムにより同時に再生される。   Next, processing for correcting the local counter value (hereinafter also referred to as counter correction processing) performed by the client 100 will be described. The counter correction processing is performed simultaneously with the processing of the program executed by the client 100 in FIG. The counter correction process is, for example, a process performed by an application program that reproduces content (hereinafter also referred to as a content reproduction program) that requires time synchronization between the server 120 and the client 100. In this case, in each of the server 120 and the client 100, the same content is simultaneously reproduced by the content reproduction program.

図13は、カウンタ補正処理のフローチャートを示す図である。図13を参照して、ステップS405では、CPU101が、任意の時刻を示すローカルカウンタ値Cを取得する。その後、ステップS410に進む。   FIG. 13 is a diagram illustrating a flowchart of the counter correction process. Referring to FIG. 13, in step S405, CPU 101 obtains local counter value C indicating an arbitrary time. Thereafter, the process proceeds to step S410.

ステップS410では、CPU101が、メモリ102に記憶されたαest、βest、Cのデータを読み出す。その後、ステップS420に進む。 In step S410, CPU 101 is, Arufaest stored in the memory 102, βest, the data of C 0 is read. Thereafter, the process proceeds to step S420.

ステップS420では、CPU101が、ローカルカウンタ値C、αest、βest、Cを、前述の式(1A)に代入することで、補正後のクライアント100のローカルカウンタ値であるF(C)を算出する。 In step S420, CPU 101 is a local counter value C, αest, βest, the C 0, by substituting the equation (1A) described above, calculates the F (C) is a local counter value of the client 100 after the correction .

補正後のローカルカウンタ値F(C)は、サーバー120と時刻同期がとれている。
そして、このカウンタ補正処理は終了する。以上のカウンタ補正処理により、クライアント100のローカルカウンタ値をサーバー120のローカルカウンタ値に合わせることができる。
The corrected local counter value F (C) is time synchronized with the server 120.
Then, the counter correction process ends. Through the counter correction process described above, the local counter value of the client 100 can be matched with the local counter value of the server 120.

なお、カウンタ補正処理は、アプリケーションプログラム内で繰返し行なわれる。また、図2の専用のハードウェア108があれば、補正後のローカルカウンタを自律的に走らせることもできる。ローカルカウンタ105から現在の時刻であるローカルカウンタ値Cが得られる。レジスタ107から、C,αest、βestが得られる。レジスタ107に設定される処理は、前述した処理Aによって定期的に行われる。補正回路106は、これらの値を前述の式(1A)に代入することで、ローカルカウンタ値を補正する。補正後のローカルカウンタ値はCPU101から読み出し可能となる。 The counter correction process is repeatedly performed in the application program. If the dedicated hardware 108 shown in FIG. 2 is provided, the corrected local counter can be autonomously run. A local counter value C that is the current time is obtained from the local counter 105. From the register 107, C 0 , αest, and βest are obtained. The process set in the register 107 is periodically performed by the process A described above. The correction circuit 106 corrects the local counter value by substituting these values into the above equation (1A). The corrected local counter value can be read from the CPU 101.

本発明が、従来技術のNTPと異なる点は、以下の3点である。
1)式(1A)(式(1))によってクライアント100のローカルカウンタ値をサーバー120のローカルカウンタ値に補正する点。
2)複数回の測定パケットの往復によって得られる一連のデータすべてを使って{α,β}の存在可能範囲を狭めていく点。
3)複数回の測定パケットの往復の後、行きと帰りの最小伝送遅延時間が、ほぼ同じ値に近づくことに着目して{α,β}を推定している点。
The present invention is different from the conventional NTP in the following three points.
1) The point that the local counter value of the client 100 is corrected to the local counter value of the server 120 by the equation (1A) (equation (1)).
2) The point where the possible range of {α, β} is narrowed by using all of a series of data obtained by a round trip of measurement packets.
3) The point that {α, β} is estimated by focusing on the fact that the minimum transmission delay time for going and returning approaches approximately the same value after multiple rounds of measurement packets.

なお、βの推定値に、式(13)を使うことが望ましいと考えられるが、βの推定値が大きく外れるのは、行きの最小伝送遅延時間と帰りの最小伝送遅延時間が大きく異なる場合である。   Although it is considered that it is desirable to use the equation (13) for the estimated value of β, the estimated value of β largely deviates when the minimum transmission delay time on the way and the minimum transmission delay time on the return are greatly different. is there.

たとえば、図7において、サーバー120から、クライアント100へ送信される最後の返信パケットPKR3が、2分ではなく、0分で、サーバー120に到着した(11:46:00)とする。この場合、ラウンドトリップ時間は5分となる。   For example, in FIG. 7, it is assumed that the last reply packet PKR3 transmitted from the server 120 to the client 100 arrives at the server 120 in 0 minutes (11:46:00) instead of 2 minutes. In this case, the round trip time is 5 minutes.

10:45:00−00:05:00=10:40:00<β+(11:40:00−11:00:00)<10:45:00より、10:00:00<β<10:05:00が得られる。そして、図7における変更後の全てのデータに基づいて、10:00:00<β<10:03:00を得る。   10: 45: 00-00: 05: 00 = 10: 40: 00 <β + (11: 40: 00-11: 00: 00) <10:45:00, 10: 00: 0 <β <10: 05:00 is obtained. Then, 10: 00: 0 <β <10:03:00 is obtained based on all the changed data in FIG.

図7において、行きの最小伝送遅延時間は3分であるのに対し、帰りの最小伝送遅延時間は0分である。この場合、式(13)より、βest=(10:03:00+10:00:00)/2=10:01:30と推定されるが、正解の10:00:00と比べて誤差が大きくなる。   In FIG. 7, the minimum transmission delay time for outbound is 3 minutes, while the minimum transmission delay time for return is 0 minutes. In this case, from equation (13), it is estimated that βest = (10: 03: 00 + 10: 00: 0) / 2 = 10: 0: 30, but the error becomes larger than the correct answer 10: 00: 00: 00. .

一方、行きの最小伝送遅延時間と、帰りの最小伝送遅延時間とが等しくなる時、βの推定値は極めて真に近くなる。   On the other hand, when the minimum transmission delay time for outbound and the minimum transmission delay time for return are equal, the estimated value of β becomes extremely close to true.

たとえば、図7において、サーバー120から、クライアント100へ送信される最後の返信パケットPKR3が、2分ではなく、3分で、サーバー120に到着した(11:49:00)とする。この場合、ラウンドトリップ時間は8分となる。   For example, in FIG. 7, it is assumed that the last reply packet PKR3 transmitted from the server 120 to the client 100 arrives at the server 120 in 11 minutes (11:49:00) instead of 2 minutes. In this case, the round trip time is 8 minutes.

10:45:00−00:08:00=10:37:00<β+(11:40:00−11:00:00)<10:45:00より、09:57:00<β<10:05:00が得られる。図7における変更後の全てのデータに基づいて、09:57:00<β<10:03:00を得る。   10: 45: 00-00: 08: 0 = 10: 33: 00 <β + (11: 40: 00-11: 00: 00) <10:45:00, 09:57:00 <β <10: 05:00 is obtained. Based on all the changed data in FIG. 7, 09:57:00 <β <10:03:00 is obtained.

この場合、行きの最小伝送遅延時間と、帰りの最小伝送遅延時間はともに3分である。また、式(13)より、βest=(10:03:00+09:57:00)/2=10:00:00と推定されるが、この推定値は、正解である。   In this case, the minimum transmission delay time for the outbound route and the minimum transmission delay time for the return route are both 3 minutes. Further, from equation (13), it is estimated that βest = (10: 03: 00 + 09: 57: 00) / 2 = 10: 00: 00, but this estimated value is a correct answer.

しばらく測定を続けると、行きと帰りの最小伝送遅延時間は(通信路が物理的に対称ならば)、ほぼ同じとなるはずので、本発明におけるβの推定方法は合理性がある。   If the measurement is continued for a while, the minimum transmission delay time for going and returning should be almost the same (if the communication path is physically symmetric), so the method for estimating β in the present invention is reasonable.

次に、NTP(データフィルタ、PLLを含む)の技術(以下、従来技術Aともいう)の時刻合わせのシミュレーション結果を示す図と、本発明の時刻合わせのシミュレーション結果を示す図を比較する。以下のシミュレーション結果は、クライアント100から、サーバー120へ、映像伝送した時の結果である。   Next, a diagram showing a simulation result of time adjustment of an NTP (including data filter and PLL) technology (hereinafter also referred to as Conventional Technology A) and a diagram showing a simulation result of time adjustment of the present invention are compared. The following simulation results are obtained when video is transmitted from the client 100 to the server 120.

図14は、従来技術Aにより時刻合わせを行なったシミュレーション結果を示す図である。   FIG. 14 is a diagram showing a simulation result in which time adjustment is performed by the prior art A.

図15は、本発明により時刻合わせを行なったシミュレーション結果を示す図である。
図14を参照して、従来技術Aより時刻合わせを行なったシミュレーション結果では誤差が大きいことがわかる。一方、図15を参照して、本発明により時刻合わせを行なったシミュレーション結果では誤差が小さく抑えられていることがわかる。すなわち、本発明によれば、片方向だけに映像伝送を行った場合のように行きと帰りで伝送路の対称性が失われる時でも、精度良く時刻合わせを行うことができる。
FIG. 15 is a diagram showing a simulation result of time adjustment according to the present invention.
Referring to FIG. 14, it can be seen that the error is large in the simulation result in which the time is adjusted from the prior art A. On the other hand, with reference to FIG. 15, it can be seen that the error is suppressed small in the simulation result of time adjustment according to the present invention. That is, according to the present invention, it is possible to perform time adjustment with high accuracy even when the symmetry of the transmission path is lost on the way back and forth as in the case where video transmission is performed only in one direction.

次に、クライアント100からサーバー120へ映像伝送しない場合における、従来技術Aの時刻合わせのシミュレーション結果を示す図と、本発明の時刻合わせのシミュレーション結果を示す図を比較する。   Next, a diagram showing a simulation result of time adjustment according to the related art A in a case where video transmission from the client 100 to the server 120 is not performed is compared with a diagram showing a simulation result of time adjustment according to the present invention.

図16は、従来技術Aにより時刻合わせを行なったシミュレーション結果を示す図である。   FIG. 16 is a diagram illustrating a simulation result in which time adjustment is performed by the related art A.

図17は、本発明により時刻合わせを行なったシミュレーション結果を示す図である。
図16を参照して、従来技術Aにより時刻合わせを行なったシミュレーション結果では、誤差が小さく抑えられているが、誤差が小さく抑えられるまでに、ある程度の時間を要することがわかる。一方、図17を参照して、本発明により時刻合わせを行なったシミュレーション結果では誤差が小さく抑えられており、かつ、誤差が小さく抑えられるまで時間が短いことがわかる。
FIG. 17 is a diagram showing a simulation result of time adjustment according to the present invention.
Referring to FIG. 16, in the simulation result in which the time is adjusted by the conventional technique A, the error is suppressed small, but it can be seen that a certain amount of time is required until the error is suppressed small. On the other hand, with reference to FIG. 17, it can be seen that the error is suppressed to a small value in the simulation result of time adjustment according to the present invention and that the time is short until the error is suppressed to a small value.

本発明を適用できる具体的なシステムの例を以下に記す。システムの一例としては、ネットワークに接続された複数の表示デバイスから構成されるシステムである。また、システムの他の例としては、各々が、スピーカーを有する複数の装置から構成されるシステムである。この場合、複数の装置の各々が有するスピーカーから同時に音を出力する。   Examples of specific systems to which the present invention can be applied are described below. An example of the system is a system including a plurality of display devices connected to a network. Another example of the system is a system that includes a plurality of devices each having a speaker. In this case, sound is output simultaneously from the speakers included in each of the plurality of devices.

また、本発明は、遠隔地の二地点で片方向の遅延時間を測定する装置、その他時刻同期が重要な意味を持つすべてのアプリケーションプログラムに適用できる。   In addition, the present invention can be applied to a device that measures a one-way delay time at two points in a remote place and other application programs in which time synchronization is important.

時刻同期が重要な意味を持つアプリケーションで行なわれる処理は、トランザクション処理、分散コンピューティング、ネットワーク処理など多岐に渡る。   Processing performed in applications where time synchronization is important has a wide variety of processing such as transaction processing, distributed computing, and network processing.

本発明を構成する要素としては、一般的なPCであってよい。しかしながら、専用のハードウェア(回路)によって、高精度で安定した発振器に基づいたローカルカウンタが提供され、ローカルカウンタの値と進み方を補正する回路がある場合、{αest,βest,C}に基づいて、クライアント側のローカルカウンタをハードウェアで補正してもよい。 The element constituting the present invention may be a general PC. However, if dedicated hardware (circuitry) provides a local counter based on a highly accurate and stable oscillator, and there is a circuit that corrects the value and progress of the local counter, {αest, βest, C 0 } Based on this, the client-side local counter may be corrected by hardware.

本発明では、サーバー−クライアント間で測定パケットと返信パケットの送受信を行っているが、{C,S,S,C}を取得するステップでは、一般的なNTPの枠組みを使ってもよい。 In the present invention, the measurement packet and the reply packet are transmitted and received between the server and the client. In the step of obtaining {C 1 , S 1 , S 2 , C 2 }, a general NTP framework is used. Also good.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

本実施の形態を構成する、一例としてのシステムを示す図である。It is a figure which shows the system as an example which comprises this Embodiment. 専用のハードウェアを搭載した、一例としてのクライアントの構成を示す図である。It is a figure which shows the structure of the client as an example which mounts exclusive hardware. クライアント側のローカルカウンタとサーバー側のローカルカウンタの関係を示したものである。The relationship between the local counter on the client side and the local counter on the server side is shown. 実際のデータを使用して、αminとαmaxをプロットした図を示す。The figure which plotted (alpha) min and (alpha) max using actual data is shown. 本発明におけるβ-αプロット図を示す図である。It is a figure which shows the beta-alpha plot figure in this invention. 実際のデータを使用して、βminとβmaxをプロットした図を示す。The figure which plotted (beta) min and (beta) max using actual data is shown. 測定パケットを往復させて得られたデータの一例を示す図である。It is a figure which shows an example of the data obtained by reciprocating a measurement packet. サーバーで実行されるプログラムのフローチャートを示す図である。It is a figure which shows the flowchart of the program performed with a server. 測定パケットおよび返信パケットの構成の一例を示す図である。It is a figure which shows an example of a structure of a measurement packet and a reply packet. クライアントで実行されるプログラムのフローチャートを示す図である。It is a figure which shows the flowchart of the program performed with a client. 処理Aのフローチャートである。It is a flowchart of the process A. 処理BをC言語で記述したプログラムを示す図である。It is a figure which shows the program which described the process B in C language. カウンタ補正処理のフローチャートを示す図である。It is a figure which shows the flowchart of a counter correction process. 従来技術Aにより時刻合わせを行なったシミュレーション結果を示す図である。It is a figure which shows the simulation result which performed time adjustment by the prior art A. 本発明により時刻合わせを行なったシミュレーション結果を示す図である。It is a figure which shows the simulation result which performed time adjustment by this invention. 従来技術Aにより時刻合わせを行なったシミュレーション結果を示す図である。It is a figure which shows the simulation result which performed time adjustment by the prior art A. 本発明により時刻合わせを行なったシミュレーション結果を示す図である。It is a figure which shows the simulation result which performed time adjustment by this invention. NTPを用いる時刻合わせの手法を説明するための図である。It is a figure for demonstrating the method of the time adjustment which uses NTP. NTPにおけるデータフィルタやPLLを組み合わせた構成を示す図である。It is a figure which shows the structure which combined the data filter and PLL in NTP. クライアントからサーバーへ映像伝送をした時の構成を示す図である。It is a figure which shows a structure when transmitting a video from a client to a server. 時間経過とともに、行きの伝送遅延時間の変化を示す図である。It is a figure which shows the change of the transmission transmission delay time with time passage. 時間経過とともに、帰りの伝送遅延時間の変化を示す図である。It is a figure which shows the change of the return transmission delay time with progress of time. 行きおよび帰り、それぞれの平均伝送遅延時間を示す図である。It is a figure which shows the average transmission delay time of each going and returning.

符号の説明Explanation of symbols

100 クライアント、101,121 CPU、102,122 メモリ、103,123 通信I/F、104,124 発振器、105,125 ローカルカウンタ、106 補正回路、107 レジスタ、108 専用のハードウェア、110 通信網、120 サーバー。   100 client, 101, 121 CPU, 102, 122 memory, 103, 123 communication I / F, 104, 124 oscillator, 105, 125 local counter, 106 correction circuit, 107 register, 108 dedicated hardware, 110 communication network, 120 server.

Claims (17)

ネットワークに接続された、第1周波数で動作する装置と、データ通信する、第2周波数で動作する伝送装置であって、
時刻を管理する時刻管理手段と、
前記装置へ、測定パケットを、順次、送信する送信手段とを備え、
前記装置は、前記測定パケットの受信毎に、前記測定パケットを受信した第1時刻の情報と、前記測定パケットを返信パケットとして返信する第2時刻の情報とを含んだ前記返信パケットを、順次、返信し、
前記返信パケットに含まれる第1および第2時刻の情報と、受信した前記返信パケットに対応する前記測定パケットを送信した第3時刻の情報および前記返信パケットを受信した第4時刻の情報とから構成される時刻情報に基づいて、前記装置との時刻オフセットを、順次、算出する算出手段と、
前記第1周波数と、前記第2周波数との比を示す周波数比と、前記時刻オフセットと、前記時刻管理手段が管理する任意の基準となる時刻とに基づいて、前記時刻管理手段の管理する時刻を補正する補正手段とをさらに備える、伝送装置。
A transmission device connected to a network and operating at a second frequency and communicating with a device operating at a first frequency;
Time management means for managing the time;
Transmission means for sequentially transmitting measurement packets to the device;
Each time the measurement packet is received, the apparatus sequentially receives the reply packet including information on a first time when the measurement packet is received and information on a second time when the measurement packet is returned as a reply packet. Reply,
The first and second time information included in the reply packet, the third time information at which the measurement packet corresponding to the received reply packet is transmitted, and the fourth time information at which the reply packet is received. Calculation means for sequentially calculating the time offset with the device based on the time information to be performed;
The time managed by the time management means based on the frequency ratio indicating the ratio between the first frequency and the second frequency, the time offset, and an arbitrary reference time managed by the time management means. And a correction unit for correcting the transmission.
前記周波数比をα、補正前の時刻をC、前記任意の基準となる時刻をC、および前記時刻オフセットをβとした場合、前記補正手段は、前記算出手段がF(C)=α×(C−C)+βにより算出した時刻F(C)に基づいて、管理する時刻を補正する、請求項1に記載の伝送装置。 When the frequency ratio is α, the time before correction is C, the arbitrary reference time is C 0 , and the time offset is β, the correction means has the calculation means F (C) = α × The transmission apparatus according to claim 1, wherein the management time is corrected based on the time F (C) calculated by (C−C 0 ) + β. 前記周波数比をα、および前記時刻オフセットをβとした場合、前記算出手段は、複数の前記時刻情報に基づいてαのとり得る値の最小値αminおよび最大値αmaxを算出し、複数の前記時刻情報に基づいてβのとり得る値の最小値βminおよび最大値βmaxを算出し、
前記算出手段は、αのとり得る値の範囲のうちの1つの値を前記周波数比としてのαとし、βのとり得る値の範囲のうちの1つの値を前記時刻オフセットとしてのβとする、請求項1または請求項2に記載の伝送装置。
When the frequency ratio is α and the time offset is β, the calculation means calculates a minimum value αmin and a maximum value αmax of a possible value of α based on a plurality of the time information, and a plurality of the times Based on the information, the minimum value βmin and the maximum value βmax of the values that β can take are calculated,
The calculation means sets one value in a range of possible values of α as α as the frequency ratio, and sets one value in a range of possible values of β as β as the time offset, The transmission apparatus according to claim 1 or 2.
前記周波数比をα、前記任意の基準となる時刻をC、前記装置へデータを伝送する際に生じる遅延時間の最小値となる第1最小伝送遅延時間および前記装置から前記伝送装置へデータを伝送する際に生じる遅延時間の最小値となる第2最小伝送遅延時間をε、前記送信手段がn(自然数)番目の測定パケットを送信した時刻をC、前記装置がn番目の測定パケットを受信した時刻をS、前記装置がn番目の前記返信パケットを返信した時刻をS、および前記伝送装置が前記n番目の返信パケットを受信した時刻をCとした場合、前記算出手段は、n番目の前記時刻情報に基づいてαのとり得る値の最小値αminを、(S−β+ε)/(C−C)により算出し、n番目の前記時刻情報に基づいてαのとり得る値の最大値αmaxを、(S−β−ε)/(C−C)により算出し、
前記算出手段は、複数の前記時刻情報に基づいて、αminのとり得る値の最大値を算出し、αmaxのとり得る値の最小値を算出する、請求項1〜請求項3のいずれかに記載の伝送装置。
The frequency ratio is α, the arbitrary reference time is C 0 , the first minimum transmission delay time that is the minimum delay time that occurs when data is transmitted to the device, and the data from the device to the transmission device Ε is the second minimum transmission delay time that is the minimum delay time that occurs during transmission, C 1 is the time when the transmitting means transmits the n (natural number) measurement packet, and the device determines the nth measurement packet. When the received time is S 1 , the time when the device returns the nth reply packet is S 2 , and the time when the transmission device receives the nth reply packet is C 2 , the calculation means , Based on the nth time information, a minimum value αmin that α can take is calculated by (S 2 −β + ε) / (C 2 −C 0 ), and α is calculated based on the nth time information. Maximum possible value The .alpha.max, calculated by (S 1 -β-ε) / (C 1 -C 0),
The said calculation means calculates the maximum value of the value which can take (alpha) min based on the said some time information, and calculates the minimum value of the value which can take (alpha) max. Transmission equipment.
前記周波数比をα、前記時刻オフセットをβ、前記送信手段がn(自然数)番目の測定パケットを送信した時刻をC、前記装置がn番目の測定パケットを受信した時刻をS、前記装置がn番目の前記返信パケットを返信した時刻をS、および前記伝送装置が前記n番目の返信パケットを受信した時刻をC、前記伝送装置と前記装置との間でデータを往復させる際に生じる遅延時間を示す時間をRTTとした場合、前記算出手段は、n番目の前記時刻情報に基づいてRTTを算出し、
前記算出手段は、複数の前記時刻情報に基づいて、RTTのとり得る値の最小値minRTTを算出し、
前記算出手段は、βを変化させる値の最小値および最大値を、それぞれ、所定値S00およびminRTTとし、βを変化させる範囲の中で、βを変化させながら、αminのとり得る値の最大値およびαmaxのとり得る値の最小値を算出し、αが存在可能であるβの範囲に基づいて、βのとり得る値の最小値βminおよび最大値βmaxを算出する、請求項1〜請求項4のいずれかに記載の伝送装置。
The frequency ratio is α, the time offset is β, the time when the transmission unit transmits the n (natural number) measurement packet is C 1 , the time when the device receives the nth measurement packet is S 1 , and the device S 2 is the time at which the nth reply packet is returned, and C 2 is the time at which the transmission apparatus receives the nth reply packet, when data is reciprocated between the transmission apparatus and the apparatus. When the time indicating the generated delay time is RTT, the calculation means calculates the RTT based on the nth time information,
The calculation means calculates a minimum value minRTT of possible values of RTT based on a plurality of the time information,
The calculation means sets the minimum and maximum values for changing β as predetermined values S00 and minRTT, respectively, and changes the maximum value of αmin while changing β within the range of changing β. And a minimum value βmin and a maximum value βmax of the possible values of β are calculated based on a range of β in which α can exist. The transmission apparatus in any one of.
前記時刻オフセットをβとした場合、
前記算出手段は、βのとり得る値の最小値βminおよび最大値βmaxの算術平均により算出した値を、前記時刻オフセットとしてのβとする、請求項1〜請求項5のいずれかに記載の伝送装置。
When the time offset is β,
The transmission according to any one of claims 1 to 5, wherein the calculating means sets a value calculated by an arithmetic average of a minimum value βmin and a maximum value βmax of β to be β as the time offset. apparatus.
前記周波数比をαとした場合、
前記算出手段は、αのとり得る値の最小値αminおよび最大値αmaxの算術平均により算出した値を、前記周波数比としてのαとする、請求項1〜請求項6のいずれかに記載の伝送装置。
When the frequency ratio is α,
The transmission according to any one of claims 1 to 6, wherein the calculation means sets a value calculated by an arithmetic average of a minimum value αmin and a maximum value αmax of α to be α as the frequency ratio. apparatus.
前記装置はコンテンツを再生する機能を備え、
同一のコンテンツを前記装置と前記伝送装置との間で同時に再生する、請求項1〜請求項7のいずれかに記載の伝送装置。
The device has a function of playing back content,
The transmission apparatus according to claim 1, wherein the same content is simultaneously reproduced between the apparatus and the transmission apparatus.
前記算出手段は、前記装置へデータを伝送する際に生じる第1伝送遅延時間および前記装置から前記伝送装置へデータを伝送する際に生じる第2伝送遅延時間の少なくとも一方を算出する、請求項1〜請求項8のいずれかに記載の伝送装置。   The calculation means calculates at least one of a first transmission delay time that occurs when data is transmitted to the device and a second transmission delay time that occurs when data is transmitted from the device to the transmission device. The transmission apparatus according to claim 8. 前記周波数比をα、前記時刻オフセットをβ、前記任意の基準となる時刻をC、前記送信手段がn(自然数)番目の測定パケットを送信した時刻をC、前記装置がn番目の測定パケットを受信した時刻をS、前記装置がn番目の前記返信パケットを返信した時刻をS、および前記伝送装置が前記n番目の返信パケットを受信した時刻をCとした場合、前記算出手段は、n番目の前記時刻情報に基づいて、前記第1伝送遅延時間を、S−{α×(C−C)+β}により算出し、前記第2伝送遅延時間を、{α×(C−C)+β}−Sにより算出する、請求項1〜請求項9のいずれかに記載の伝送装置。 The frequency ratio is α, the time offset is β, the arbitrary reference time is C 0 , the time when the transmission unit transmits the n (natural number) measurement packet is C 1 , and the device is the nth measurement. When the time when the packet is received is S 1 , the time when the device returns the nth reply packet is S 2 , and the time when the transmission device receives the nth reply packet is C 2 , the calculation is performed. The means calculates the first transmission delay time by S 1 − {α × (C 1 −C 0 ) + β} based on the n-th time information, and calculates the second transmission delay time by {α The transmission device according to claim 1, wherein the transmission device is calculated by × (C 2 −C 0 ) + β} −S 2 . ネットワークに接続された、第1周波数で動作する装置と、データ通信する、第2周波数で動作する伝送装置との間で同期を行なう時刻同期方法であって、
時刻を管理する工程と、
前記装置へ、測定パケットを、順次、送信する工程とを含み、
前記装置は、前記測定パケットの受信毎に、前記測定パケットを受信した第1時刻の情報と、前記測定パケットを返信パケットとして返信する第2時刻の情報とを含んだ前記返信パケットを、順次、返信し、
前記返信パケットに含まれる第1および第2時刻の情報と、受信した前記返信パケットに対応する前記測定パケットを送信した第3時刻の情報および前記返信パケットを受信した第4時刻の情報とから構成される時刻情報に基づいて、前記装置との時刻オフセットを、順次、算出する工程と、
前記第1周波数と、前記第2周波数との比を示す周波数比と、前記時刻オフセットと、前記時刻を管理する工程が管理する任意の基準となる時刻とに基づいて、前記時刻を管理する工程の管理する時刻を補正する工程とをさらに含む、時刻同期方法。
A time synchronization method for synchronizing between a device operating at a first frequency connected to a network and a transmission device operating at a second frequency for data communication,
A process for managing time;
Sequentially transmitting measurement packets to the device,
Each time the measurement packet is received, the apparatus sequentially receives the reply packet including information on a first time when the measurement packet is received and information on a second time when the measurement packet is returned as a reply packet. Reply,
The first and second time information included in the reply packet, the third time information at which the measurement packet corresponding to the received reply packet is transmitted, and the fourth time information at which the reply packet is received. Sequentially calculating a time offset with the device based on the time information to be performed;
The step of managing the time based on a frequency ratio indicating a ratio between the first frequency and the second frequency, the time offset, and an arbitrary reference time managed by the step of managing the time. And a step of correcting the time managed by the time synchronization method.
前記周波数比をα、補正前の時刻をC、前記任意の基準となる時刻をC、および前記時刻オフセットをβとした場合、前記補正する工程は、前記算出する工程がF(C)=α×(C−C)+βにより算出した時刻F(C)に基づいて、管理する時刻を補正する、請求項11に記載の時刻同期方法。 When the frequency ratio is α, the time before correction is C, the arbitrary reference time is C 0 , and the time offset is β, the correction step is F (C) = The time synchronization method according to claim 11, wherein the management time is corrected based on the time F (C) calculated by α × (C−C 0 ) + β. 前記周波数比をα、および前記時刻オフセットをβとした場合、前記算出する工程は、複数の前記時刻情報に基づいてαのとり得る値の最小値αminおよび最大値αmaxを算出し、複数の前記時刻情報に基づいてβのとり得る値の最小値βminおよび最大値βmaxを算出し、
前記算出する工程は、αのとり得る値の範囲のうちの1つの値を前記周波数比としてのαとし、βのとり得る値の範囲のうちの1つの値を前記時刻オフセットとしてのβとする、請求項11または請求項12に記載の時刻同期方法。
When the frequency ratio is α and the time offset is β, the calculating step calculates a minimum value αmin and a maximum value αmax of a possible value of α based on the plurality of time information, and Based on the time information, the minimum value βmin and the maximum value βmax of the possible values of β are calculated,
In the calculating step, one value in a range of possible values of α is α as the frequency ratio, and one value in a range of possible values of β is β as the time offset. The time synchronization method according to claim 11 or claim 12.
前記周波数比をα、前記任意の基準となる時刻をC、前記装置へデータを伝送する際に生じる遅延時間の最小値となる第1最小伝送遅延時間および前記装置から前記伝送装置へデータを伝送する際に生じる遅延時間の最小値となる第2最小伝送遅延時間をε、前記送信する工程がn(自然数)番目の測定パケットを送信した時刻をC、前記装置がn番目の測定パケットを受信した時刻をS、前記装置がn番目の前記返信パケットを返信した時刻をS、および前記伝送装置が前記n番目の返信パケットを受信した時刻をCとした場合、前記算出する工程は、n番目の前記時刻情報に基づいてαのとり得る値の最小値αminを、(S−β+ε)/(C−C)により算出し、n番目の前記時刻情報に基づいてαのとり得る値の最大値αmaxを、(S−β−ε)/(C−C)により算出し、
前記算出する工程は、複数の前記時刻情報に基づいて、αminのとり得る値の最大値を算出し、αmaxのとり得る値の最小値を算出する、請求項11〜請求項13のいずれかに記載の時刻同期方法。
The frequency ratio is α, the arbitrary reference time is C 0 , the first minimum transmission delay time that is the minimum delay time that occurs when data is transmitted to the device, and the data from the device to the transmission device Ε is the second minimum transmission delay time that is the minimum delay time generated during transmission, C 1 is the time when the transmitting step transmits the n (natural number) measurement packet, and the device is the nth measurement packet. Is calculated when S 1 is the time when the device has received the reply, S 2 when the device has returned the nth reply packet, and C 2 is the time when the transmission device has received the nth reply packet. The process calculates a minimum value αmin that α can take based on the n-th time information by (S 2 −β + ε) / (C 2 −C 0 ), and based on the n-th time information α can take Maximum value αmax of, calculated by (S 1 -β-ε) / (C 1 -C 0),
14. The calculation according to claim 11, wherein the calculating step calculates a maximum value that αmin can take based on a plurality of pieces of time information, and calculates a minimum value that αmax can take. The time synchronization method described.
前記周波数比をα、前記時刻オフセットをβ、前記送信する工程がn(自然数)番目の測定パケットを送信した時刻をC、前記装置がn番目の測定パケットを受信した時刻をS、前記装置がn番目の前記返信パケットを返信した時刻をS、および前記伝送装置が前記n番目の返信パケットを受信した時刻をC、前記伝送装置と前記装置との間でデータを往復させる際に生じる遅延時間を示す時間をRTTとした場合、前記算出する工程は、n番目の前記時刻情報に基づいてRTTを算出し、
前記算出する工程は、複数の前記時刻情報に基づいて、RTTのとり得る値の最小値minRTTを算出し、
前記算出する工程は、βを変化させる値の最小値および最大値を、それぞれ、所定値S00およびminRTTとし、βを変化させる範囲の中で、βを変化させながら、αminのとり得る値の最大値およびαmaxのとり得る値の最小値を算出し、αが存在可能であるβの範囲に基づいて、βのとり得る値の最小値βminおよび最大値βmaxを算出する、請求項11〜請求項14のいずれかに記載の時刻同期方法。
The frequency ratio is α, the time offset is β, the transmission step is C 1 when the n-th (natural number) measurement packet is transmitted, and the time when the device receives the n-th measurement packet is S 1 . When S 2 is the time when the device has returned the n-th reply packet, and C 2 is the time when the transmission device has received the n-th reply packet, when data is reciprocated between the transmission device and the device. When the time indicating the delay time occurring in RTT is RTT, the calculating step calculates RTT based on the nth time information,
The step of calculating calculates a minimum value minRTT of possible values of RTT based on a plurality of the time information,
In the calculating step, the minimum value and the maximum value of the value for changing β are set to a predetermined value S00 and minRTT, respectively, and the maximum value that αmin can take while changing β in the range of changing β. The minimum value βmin and the maximum value βmax of β can be calculated based on the range of β in which α can exist, and the minimum value of the value and αmax that can be taken. The time synchronization method according to any one of 14.
前記時刻オフセットをβとした場合、
前記算出する工程は、βのとり得る値の最小値βminおよび最大値βmaxの算術平均により算出した値を、前記時刻オフセットとしてのβとする、請求項11〜請求項15のいずれかに記載の時刻同期方法。
When the time offset is β,
16. The calculating step according to any one of claims 11 to 15, wherein a value calculated by an arithmetic average of a minimum value βmin and a maximum value βmax of β can be set as β as the time offset. Time synchronization method.
前記周波数比をαとした場合、
前記算出する工程は、αのとり得る値の最小値αminおよび最大値αmaxの算術平均により算出した値を、前記周波数比としてのαとする、請求項11〜請求項16のいずれかに記載の時刻同期方法。
When the frequency ratio is α,
The calculation step according to any one of claims 11 to 16, wherein a value calculated by an arithmetic average of a minimum value αmin and a maximum value αmax of α can be set as α as the frequency ratio. Time synchronization method.
JP2005204683A 2005-07-13 2005-07-13 Transmission apparatus and time synchronization method Expired - Fee Related JP4467478B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005204683A JP4467478B2 (en) 2005-07-13 2005-07-13 Transmission apparatus and time synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005204683A JP4467478B2 (en) 2005-07-13 2005-07-13 Transmission apparatus and time synchronization method

Publications (2)

Publication Number Publication Date
JP2007027985A JP2007027985A (en) 2007-02-01
JP4467478B2 true JP4467478B2 (en) 2010-05-26

Family

ID=37788187

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005204683A Expired - Fee Related JP4467478B2 (en) 2005-07-13 2005-07-13 Transmission apparatus and time synchronization method

Country Status (1)

Country Link
JP (1) JP4467478B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5574988B2 (en) * 2008-03-12 2014-08-20 ゲネレク オーワイ Data transfer method and system for loudspeakers in a digital sound reproduction system
US8473638B2 (en) * 2008-05-02 2013-06-25 James Aweya Method and apparatus for time and frequency transfer in communication networks
KR101449719B1 (en) * 2008-05-21 2014-10-13 삼성전자 주식회사 Time synchronizing method and apparatus of network
KR101479883B1 (en) * 2010-09-15 2015-01-12 미쓰비시덴키 가부시키가이샤 Communication device and delay detection method
JP5741010B2 (en) 2011-01-26 2015-07-01 日本電気株式会社 Synchronization system
KR102132309B1 (en) * 2012-09-14 2020-07-09 디티에스, 인코포레이티드 Playback synchronization
US10191509B2 (en) 2016-04-01 2019-01-29 Fujitsu Limited Information processing device, information processing method, and computer readable storage medium
WO2020075235A1 (en) * 2018-10-10 2020-04-16 株式会社メディアリンクス エルエスアイラボ Clock generation device and clock generation method

Also Published As

Publication number Publication date
JP2007027985A (en) 2007-02-01

Similar Documents

Publication Publication Date Title
US11483226B2 (en) Key performance indicators (KPI) for tracking and correcting problems for a network-under-test
JP4467478B2 (en) Transmission apparatus and time synchronization method
US10666371B2 (en) System for establishing and maintaining a clock reference indicating one-way latency in a data network
US11303374B2 (en) Time determination of distributed events without distribution of reference time, phase, or frequency
Elson et al. Fine-grained network time synchronization using reference broadcasts
CN101803268B (en) Clock synchronization system, method and program thereof
EP1520365B1 (en) A system and method for correcting the clock drift and maintaining the synchronization in wireless networks
US10142088B2 (en) Network clock skew estimation and calibration
JP5941293B2 (en) How to time-synchronize free-running nodes in an avionics network
JP2014147105A (en) Timing system and method for time synchronization through packet network
JP2009525710A (en) Advanced clock control in packet networks
JP2014238357A (en) Reception device, time difference calculation method and program
KR20100048124A (en) Time synchronization method in bridged local area network
Melvin et al. Time, Frequency and Phase Synchronisation for Multimedia—Basics, Issues, Developments and Opportunities
EP2341649A1 (en) Frequency synchronization method and system in a communication network
Martínek et al. White Paper: Timestamping and Clock Synchronisation in P4-Programmable Platforms
Melvin et al. and Opportunities
Vinogradov et al. Measurement of one-way delays in IP networks
Chowdhury Packet Timing: Precision Time Protocol
Malmström Berghem Transfer time over RIST protocol to become independent of NTP
Exel et al. Clock synchronization in distributed systems using NTP and PTP
Ou et al. The one-way delay measurement algorithm on to time synchronization of NTP
Tomaciello et al. One-way delay measurement: State of art
IVANCIU Teză de Doctorat
Kaya Time synchronization in measurement networks

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070822

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100122

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130305

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130305

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140305

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees