JP4708293B2 - COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND RECORDING MEDIUM CONTAINING COMMUNICATION PROGRAM - Google Patents

COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND RECORDING MEDIUM CONTAINING COMMUNICATION PROGRAM Download PDF

Info

Publication number
JP4708293B2
JP4708293B2 JP2006261568A JP2006261568A JP4708293B2 JP 4708293 B2 JP4708293 B2 JP 4708293B2 JP 2006261568 A JP2006261568 A JP 2006261568A JP 2006261568 A JP2006261568 A JP 2006261568A JP 4708293 B2 JP4708293 B2 JP 4708293B2
Authority
JP
Japan
Prior art keywords
frame
communication
communication device
time
clock
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
JP2006261568A
Other languages
Japanese (ja)
Other versions
JP2007124633A (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 JP2006261568A priority Critical patent/JP4708293B2/en
Publication of JP2007124633A publication Critical patent/JP2007124633A/en
Application granted granted Critical
Publication of JP4708293B2 publication Critical patent/JP4708293B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Small-Scale Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a telecommunication apparatus capable of performing more exact time synchronization of a clock means in each telecommunication apparatus in the telecommunication apparatus constituting a telecommunication system which performs a transmission in a plurality of telecommunication devices. <P>SOLUTION: When the reception of a frame (TF) is recognized at the moment of multicast being carried out from a first telecommunication device 1 by a TF acknowledgement portion 30, a sampler 40 samples the time at that time, and this is set to tTX. A framer 50 creates the synchronous frame (SF) containing the sampled tTX, and transmits to a tertiary telecommunication device 3. <P>COPYRIGHT: (C)2007,JPO&amp;INPIT

Description

本発明は、同期を必要とするフレームを通信する通信装置、通信方法、プログラム、および、プログラムを記録したコンピュータ読み取り可能な記録媒体に関するものである。   The present invention relates to a communication device, a communication method, a program, and a computer-readable recording medium on which a program is recorded, for communicating frames that require synchronization.

従来、複数の端末装置を備えた通信ネットワークが知られている。図12は、このような通信ネットワークの一例を示した図である。同図では、通信ネットワーク70は、端末装置71、端末装置72、および端末装置73から構成されている。また、端末装置71は通信装置81を、端末装置72は通信装置82を、端末装置73は通信装置83を、それぞれ備えている。   Conventionally, a communication network including a plurality of terminal devices is known. FIG. 12 is a diagram showing an example of such a communication network. In the figure, the communication network 70 includes a terminal device 71, a terminal device 72, and a terminal device 73. The terminal device 71 includes a communication device 81, the terminal device 72 includes a communication device 82, and the terminal device 73 includes a communication device 83.

以下に、端末装置71が端末装置72・73に対して映像データや音声データ等の実時間性の保証が要求されるストリームデータを送信する状況を考える。各通信装置81〜83は映像データや音声データを再生する際に参照となる時計を持っているが、その時計は水晶発信器の持つ精度の範囲内で揺らぐのが普通である。仮に水晶発信器の発振周波数がその公称値の値を持つ場合の時計の進み具合を標準時計と呼ぶ場合、図13に示すとおり、通信装置が持つ実際の時計の進み度合いは、標準時計の進み度合いよりも、速かったり、または、遅かったりする。また、通信装置の時計の進み度合いは、通常、各通信装置81〜83により異なる。それゆえ、図14に示すとおり、通信装置間では時刻が相違してしまう。   A situation will be considered below in which the terminal device 71 transmits to the terminal devices 72 and 73 stream data such as video data and audio data that is required to be guaranteed in real time. Each of the communication devices 81 to 83 has a clock which becomes a reference when reproducing video data and audio data, and the clock usually swings within the accuracy range of the crystal oscillator. If the progress of the clock when the oscillation frequency of the crystal oscillator has the nominal value is called a standard clock, as shown in FIG. 13, the actual clock progress of the communication device is the progress of the standard clock. It is faster or slower than the degree. Further, the degree of advancement of the timepiece of the communication device is usually different for each communication device 81-83. Therefore, as shown in FIG. 14, the time differs between the communication devices.

しかし例えば通信装置82に対して映像データ、通信装置83に対して音声データをリアルタイムに伝送するような状況を例に取って考えると、通信装置82と通信装置83とをお互いに高い精度で同期させる必要があることは明らかである。これを実現するための具体的な方法としては、通信装置82と通信装置83の双方を通信装置81に対して同期させる、通信装置83を通信装置82に対して同期させる、通信装置82を通信装置83に対して同期させる、などの方法が考えられる。なお、以下では、「端末装置の時計」と記した場合には、端末装置内の通信装置の時計を示すものとする。   However, for example, taking a situation where video data is transmitted to the communication device 82 and audio data is transmitted to the communication device 83 in real time, the communication device 82 and the communication device 83 are synchronized with each other with high accuracy. Obviously there is a need to do that. Specific methods for realizing this include synchronizing both the communication device 82 and the communication device 83 with the communication device 81, synchronizing the communication device 83 with the communication device 82, and communicating with the communication device 82. A method of synchronizing with the device 83 is conceivable. In the following description, the “clock of the terminal device” indicates the clock of the communication device in the terminal device.

IEEE802.11(非特許文献1)の規格に従った無線LAN(Local Area Network)上で上位層同士がお互いに同期を取る方法として非特許文献2・特許文献1の提案がある。   There are proposals of Non-Patent Document 2 and Patent Document 1 as a method in which upper layers synchronize with each other on a wireless LAN (Local Area Network) in accordance with the standard of IEEE 802.11 (Non-Patent Document 1).

各上位層は上位層レベルの時計を有しており、それらをお互いに同期させる手段として、一つの通信装置が上位層レベルでクロックマスターとなる。図15のようにクロックマスターは定期的に自局時計をサンプリングし、サンプリングした時刻を同期用のマルチキャストフレーム(フレームの識別子情報をnと記す)に入れて時計を共有したい通信装置に対して送信する。クロックマスターは自局が同期用マルチキャストフレームの最後尾部を送信または受信した瞬間のタイミングを知ることができ、その瞬間における上位層の時計の時刻(tTX[n]と記す)を記録する。   Each upper layer has an upper layer level clock, and one communication device serves as a clock master at the upper layer level as means for synchronizing them with each other. As shown in FIG. 15, the clock master periodically samples its own clock, puts the sampled time in a multicast frame for synchronization (frame identifier information is denoted as n), and transmits it to a communication device that wants to share the clock. To do. The clock master can know the timing of the instant when the local station transmits or receives the tail of the multicast frame for synchronization, and records the time of the upper layer clock (denoted as tTX [n]) at that moment.

また非クロックマスター通信装置は同フレームの最後尾部を受信した瞬間のタイミングを知ることができ、その瞬間における上位層の時計の時刻(tRX[n]と記す)を記録する。なお、上記のフレームの最後尾部を送信または受信したタイミングは無線LAN層が上位層に対して精度良く通知できるように設計しておく必要がある。   Further, the non-clock master communication device can know the timing of the moment when the last part of the frame is received, and records the time of the upper layer clock (denoted as tRX [n]) at that moment. The timing at which the last part of the frame is transmitted or received needs to be designed so that the wireless LAN layer can accurately notify the upper layer.

クロックマスターは自分が前回送付した同期用のマルチキャストフレームの識別子情報nとtTX[n]の情報を次の同期用のマルチキャストフレーム(フレームの識別子情報はn+1)に入れて非クロックマスター通信装置に対して送付する。非クロックマスター通信装置は識別子が(n+1)である同期用のマルチキャストフレームを受信した際に、その中に埋め込まれているtTX[n]の情報と、自局が保持しているtRX[n]の情報を比較することで、識別子がnである同期用のマルチキャストフレームを両局が受信した瞬間における両局の上位層の時計の値を比較することができる。   The clock master puts the synchronization multicast frame identifier information n and tTX [n] sent by itself in the next synchronization multicast frame (the frame identifier information is n + 1) to the non-clock master communication device. Send to. When the non-clock master communication device receives the synchronization multicast frame with the identifier (n + 1), the information of tTX [n] embedded therein and the tRX [ n] can be compared to compare the clock values of the upper layers of both stations at the moment when both stations received the synchronization multicast frame having the identifier n.

マルチキャストフレームは送達確認(ACK)を伴わない手法で送信されているので両局が同フレームを受信した時刻はほぼ同じであると想定できるので、この比較により非クロックマスター局は自局の時計がクロックマスターに対して早いか遅いかを知ることができ、それをもとに自局の時計をクロックマスターの時計に合わせ込む調整を行うことができる。
IEEE Std 802.11(1999年1月) IEEE Std 802.11e Draft13(2005年1月) US Patent Application 20030172179(公開日:2003年9月11日)
Since multicast frames are transmitted using a method that does not involve acknowledgment (ACK), it can be assumed that the time when both stations received the same frame is almost the same. It is possible to know whether it is early or late with respect to the clock master, and based on that, it is possible to adjust the clock of the local station to the clock of the clock master.
IEEE Std 802.11 (January 1999) IEEE Std 802.11e Draft 13 (January 2005) US Patent Application 200301172179 (release date: September 11, 2003)

しかしながら、一つの同期用のマルチキャストフレーム(n番目)が正しく受信されなかった場合、そこに含まれる一個前(n−1)のtTX[n−1]情報と、さらにtRX[n]の両方の値を知ることができなくなり、その結果、二回分の時計の調整(tTX[n−1]とtRX[n−1]、および、tTX[n]とtRX[n])を連続して行うことができなくなるという課題があった。   However, when one synchronization multicast frame (n-th) is not received correctly, both the previous (n−1) tTX [n−1] information included therein and tRX [n] The value cannot be known, and as a result, the clock is adjusted twice (tTX [n-1] and tRX [n-1] and tTX [n] and tRX [n]) continuously. There was a problem of being unable to.

例えば図16にはPLLを用いて非クロックマスターの時計の調整を行う場合の事例を示している。図の横軸が時間であり、縦軸がクロックマスターと非クロックマスターの時計の差分である。図において(1)が全てのタイミングで問題なく時計(PLL)の調整を行うことができた場合、(2)が一回、T3のタイミングで調整を行うことができなかった場合、(3)が二回連続、T3とT4とのタイミングで調整を行うことができなかった場合、をそれぞれ表しており、図は各場合に両局の時計の差にどの程度の影響を及ぼすかを示している。図から分かるように、クロックマスターと非クロックマスターとの間の時計のずれは調整を出来なかった回数とともに大きくなる。   For example, FIG. 16 shows a case where the clock of a non-clock master is adjusted using a PLL. The horizontal axis in the figure is time, and the vertical axis is the difference between the clock master and the non-clock master clock. In the figure, (1) is able to adjust the clock (PLL) without any problems at all timings, (2) is not able to adjust once at the timing of T3, (3) Shows the case where the adjustment cannot be made at the timing of T3 and T4 twice, and the figure shows how much the difference between the clocks of both stations is affected in each case Yes. As can be seen from the figure, the time difference between the clock master and the non-clock master increases with the number of adjustments that cannot be made.

また、特許文献1の同期方式をIEEE802.11eに用いる場合、無線LAN層でマルチキャストフレームを送信できる通信装置は中央局であるAP(Access Point)に限定されている。このため、クロックマスターがAPでない場合には、クロックマスターは最初に同期用のマルチキャストフレームをAPに伝送し、APは受信したフレームを全局に対してマルチキャストし直す必要があった。つまり、マルチキャストの通信は二回に分けて行うことになり、そのための帯域が無駄になるという課題があった。   Further, when the synchronization method of Patent Document 1 is used for IEEE802.11e, a communication device that can transmit a multicast frame in the wireless LAN layer is limited to an AP (Access Point) that is a central station. For this reason, when the clock master is not an AP, the clock master first transmits a multicast frame for synchronization to the AP, and the AP needs to multicast the received frame to all stations again. That is, multicast communication is performed in two steps, and there is a problem that a bandwidth for that is wasted.

本発明は、上記の問題点に鑑みてなされたものであり、その目的は、複数の通信装置が通信を行う通信システムを構成する通信装置において、各通信装置における時計手段の時刻の同期をより的確に行うことを可能とする通信装置、通信方法、通信プログラム、および通信プログラムを記録した記録媒体を提供することにある。   The present invention has been made in view of the above-described problems, and an object of the present invention is to further synchronize time of clock means in each communication device in a communication device constituting a communication system in which a plurality of communication devices communicate. An object of the present invention is to provide a communication device, a communication method, a communication program, and a recording medium recording the communication program that can be accurately performed.

本発明に係る通信装置は、上記課題を解決するために、複数の通信装置が通信ネットワークを介して通信接続されている通信システムを構成する通信装置であって、時刻を示す時計手段と、上記通信ネットワークにおいて複数の通信装置に対して送達確認を必要としない状態で送信された特定の第1フレームの受信、または、送信を検知する送信側第1フレーム認識手段と、上記送信側第1フレーム認識手段によって、第1フレームの受信または送信が検知された時の第1フレーム検知時刻を上記時計手段が示す時刻に基づいて決定する時刻検知手段と、上記第1フレーム検知時刻情報を含む第2フレームを、送達確認を必要とする状態で上記通信ネットワークを介して外部の通信装置に送信する第2フレーム送信手段とを備える構成である。   In order to solve the above problem, a communication device according to the present invention is a communication device that constitutes a communication system in which a plurality of communication devices are connected to each other via a communication network, and includes a clock unit that indicates time, A first frame recognizing means for detecting reception or transmission of a specific first frame transmitted without requiring delivery confirmation to a plurality of communication devices in a communication network; and the first frame on the transmitting side. Time detecting means for determining the first frame detection time when the reception or transmission of the first frame is detected by the recognition means based on the time indicated by the clock means; and a second including the first frame detection time information Second frame transmission means for transmitting a frame to an external communication device via the communication network in a state requiring delivery confirmation.

また、本発明に係る通信方法は、複数の通信装置が通信ネットワークを介して通信接続されている通信システムを構成する通信装置の通信方法であって、上記通信ネットワークにおいて複数の通信装置に対して送信された特定の第1フレームの受信、または、送信を検知する送信側第1フレーム認識ステップと、上記送信側第1フレーム認識ステップによって、第1フレームの受信または送信が検知された時の第1フレーム検知時刻を、上記通信装置が備える時計手段が示す時刻に基づいて決定する時刻検知ステップと、上記第1フレーム検知時刻情報を含む第2フレームを、上記通信ネットワークを介して外部の通信装置に送信する第2フレーム送信ステップとを有する方法である。   The communication method according to the present invention is a communication method of a communication apparatus constituting a communication system in which a plurality of communication apparatuses are connected for communication via a communication network. The transmission side first frame recognition step for detecting the reception or transmission of the specific first frame transmitted and the transmission side first frame recognition step and the first frame reception time when the reception or transmission of the first frame is detected. A time detection step for determining one frame detection time based on a time indicated by a clock means included in the communication device, and a second frame including the first frame detection time information via an external communication device via the communication network A second frame transmission step of transmitting to the second frame.

上記の構成または方法によれば、まず、複数の通信装置に対して、特定の第1フレームが送信される。ここで、第1フレームは、当該通信装置が送信したものであってもよいし、他の通信装置が送信したものであってもよい。そして、第1フレームの受信または送信が検知された第1フレーム検知時刻情報を含む第2フレームが、外部の通信装置に送信される。すなわち、第1フレームが、各通信装置における時計手段の時刻を合わせるタイミングを決定するフレームであり、第2フレームが、上記タイミングの情報をやりとりするためのフレームとなる。   According to the above configuration or method, first, a specific first frame is transmitted to a plurality of communication devices. Here, the first frame may be transmitted by the communication apparatus or may be transmitted by another communication apparatus. Then, the second frame including the first frame detection time information at which the reception or transmission of the first frame is detected is transmitted to the external communication device. That is, the first frame is a frame for determining the timing for adjusting the time of the clock means in each communication device, and the second frame is a frame for exchanging the timing information.

ここで、従来では、同期用のマルチキャストフレームが以上の2つの役割、つまり時計をほぼ同時にサンプリングするための基準時点の特定機能と、サンプリングした時計の時刻を伝送する機能とを有している。よって、この同期用のマルチキャストフレームの受信に失敗すると、前記したように、2回分の時計合わせが不可能となり、各通信装置における時計の時刻のずれが大きくなるという問題がある。   Conventionally, the multicast frame for synchronization has the above two roles, that is, the function of specifying the reference time point for sampling the clock almost simultaneously and the function of transmitting the time of the sampled clock. Therefore, when the reception of the multicast frame for synchronization fails, there is a problem that the clock cannot be set twice, as described above, and the time difference between the clocks in each communication device becomes large.

これに対して、上記の構成または方法によれば、例え第1フレームの送受信が失敗したとしても、第2フレームの送受信は送達確認が行われることによりほぼ確実に行われるので、時計合わせは1回分行われないだけで済むことになる。よって、時計合わせが正常に行われる可能性を高めることが可能となるので、各通信装置における時計の同期がより的確に行われる通信システムを提供することが可能となる。   On the other hand, according to the above configuration or method, even if the transmission / reception of the first frame fails, the transmission / reception of the second frame is almost certainly performed by confirming the delivery. You don't have to do it once. Therefore, since it is possible to increase the possibility that the clock is set correctly, it is possible to provide a communication system in which the clocks in each communication device are more accurately synchronized.

また、本発明に係る通信装置は、複数の通信装置が通信ネットワークを介して通信接続されている通信システムを構成する通信装置であって、時刻を示す時計手段と、上記通信ネットワークにおいて複数の通信装置に対して送信された特定の第1フレームの受信、または、送信を検知する送信側第1フレーム認識手段と、上記送信側第1フレーム認識手段によって、第1フレームの受信または送信が検知された時の第1フレーム検知時刻を上記時計手段が示す時刻に基づいて決定する時刻検知手段と、上記第1フレーム検知時刻情報を含む第2フレームを、上記通信ネットワークを介して外部の通信装置に送信する第2フレーム送信手段とを備える構成である。   The communication device according to the present invention is a communication device that constitutes a communication system in which a plurality of communication devices are communicably connected via a communication network, and includes a clock means for indicating time and a plurality of communication devices in the communication network. Reception or transmission of the first frame is detected by the transmission side first frame recognition means for detecting reception or transmission of a specific first frame transmitted to the apparatus and the transmission side first frame recognition means. Time detection means for determining the first frame detection time based on the time indicated by the clock means and a second frame including the first frame detection time information to an external communication device via the communication network. And a second frame transmitting means for transmitting.

上記の構成によれば、第1フレームまたは第2フレームを失った場合、第2の通信装置の時計の調整は一回行われないだけで済む。よって、図16のように(詳細は後述する)、本発明の構成は従来の構成に対し、各通信装置における時計の同期がより的確に行われる通信システムを提供することが可能となる。   According to the above configuration, when the first frame or the second frame is lost, the clock of the second communication device need not be adjusted only once. Therefore, as shown in FIG. 16 (details will be described later), the configuration of the present invention can provide a communication system in which time synchronization in each communication device is performed more accurately than the conventional configuration.

また、本発明に係る通信装置は、上記の構成において、上記第2フレームが、送達確認を必要とする状態で上記通信ネットワークを介して外部の通信装置に送信される構成としてもよい。   The communication device according to the present invention may be configured such that, in the above configuration, the second frame is transmitted to an external communication device via the communication network in a state where delivery confirmation is required.

上記の構成によれば、第2フレームを失った場合は第2フレームの再送が可能になり、第2フレームの伝送はほぼ確実に行われることができる。よって、時計合わせが正常に行われる可能性を高めることが可能となるので、各通信装置における時計の同期がより的確に行われる通信システムを提供することが可能となる。   According to the above configuration, when the second frame is lost, the second frame can be retransmitted, and the transmission of the second frame can be performed almost certainly. Therefore, since it is possible to increase the possibility that the clock is set correctly, it is possible to provide a communication system in which the clocks in each communication device are more accurately synchronized.

また、本発明に係る通信装置は、上記の構成において、上記第1フレームが、上記通信ネットワークにおいて送達確認を必要としない状態で複数の通信装置に対して送信されたものである構成としてもよい。   The communication device according to the present invention may be configured such that, in the above configuration, the first frame is transmitted to a plurality of communication devices in a state that does not require delivery confirmation in the communication network. .

上記の構成によれば、上記第1フレームとして、例えばブロードキャストまたはマルチキャスト形式のフレームを用いることができる。   According to the above configuration, for example, a broadcast or multicast frame can be used as the first frame.

また、本発明に係る通信装置は、複数の通信装置が通信ネットワークを介して通信接続されている通信システムを構成する通信装置であって、時刻を示す時計手段と、上記通信ネットワークにおいて複数の通信装置に対して送達確認を必要としない状態で送信された特定の第1フレームの受信、または、送信を検知する受信側第1フレーム認識手段と、上記受信側第1フレーム認識手段によって、第1フレームの受信または送信が検知された時の第1フレーム検知時刻を上記時計手段が示す時刻に基づいて決定する時刻検知手段と、上記本発明に係る通信装置から、上記第2フレームを、上記通信ネットワークを介して受信する第2フレーム受信手段と、上記第2フレームに含まれている第1フレーム検知時刻情報と、上記受信側第1フレーム認識手段によって検知された第1フレーム検知時刻とに基づいて、上記時計手段の時刻を調整する調整手段とを備える構成である。   The communication device according to the present invention is a communication device that constitutes a communication system in which a plurality of communication devices are communicably connected via a communication network, and includes a clock means for indicating time and a plurality of communication devices in the communication network. The reception side first frame recognition means for detecting the reception or transmission of a specific first frame transmitted without requiring delivery confirmation to the device, and the reception side first frame recognition means Time detection means for determining the first frame detection time when reception or transmission of a frame is detected based on the time indicated by the clock means; and the second frame from the communication device according to the invention. Second frame receiving means for receiving via the network; first frame detection time information included in the second frame; and the first frame on the receiving side. Based on the first frame detection time detected by the recognizing means is configured to include an adjusting means for adjusting the time of the clock means.

また、本発明に係る通信装置は、複数の通信装置が通信ネットワークを介して通信接続されている通信システムを構成する通信装置であって、時刻を示す時計手段と、上記通信ネットワークにおいて複数の通信装置に対して送信された特定の第1フレームの受信、または、送信を検知する受信側第1フレーム認識手段と、上記受信側第1フレーム認識手段によって、第1フレームの受信または送信が検知された時の第1フレーム検知時刻を上記時計手段が示す時刻に基づいて決定する時刻検知手段と、上記本発明に係る通信装置から、上記第2フレームを、上記通信ネットワークを介して受信する第2フレーム受信手段と、上記第2フレームに含まれている第1フレーム検知時刻情報と、上記受信側第1フレーム認識手段によって検知された第1フレーム検知時刻とに基づいて、上記時計手段の時刻を調整する調整手段とを備える構成である。   The communication device according to the present invention is a communication device that constitutes a communication system in which a plurality of communication devices are communicably connected via a communication network, and includes a clock means for indicating time and a plurality of communication devices in the communication network. Reception or transmission of the first frame is detected by the reception side first frame recognition means for detecting reception or transmission of the specific first frame transmitted to the apparatus and the reception side first frame recognition means. Time detection means for determining the first frame detection time at the time based on the time indicated by the clock means, and second time for receiving the second frame from the communication device according to the present invention via the communication network. Detected by the frame receiving means, the first frame detection time information included in the second frame, and the receiving-side first frame recognition means On the basis of the frame sensing time, which is configured to include an adjusting means for adjusting the time of the clock means.

また、本発明に係る通信方法は、複数の通信装置が通信ネットワークを介して通信接続されている通信システムを構成する通信装置の通信方法であって、上記通信ネットワークにおいて複数の通信装置に対して送信された特定の第1フレームの受信、または、送信を検知する受信側第1フレーム認識ステップと、上記受信側第1フレーム認識ステップによって、第1フレームの受信または送信が検知された時の第1フレーム検知時刻を、上記通信装置が備える時計手段が示す時刻に基づいて決定する時刻検知ステップと、上記本発明に係る通信装置から、上記第2フレームを、上記通信ネットワークを介して受信する第2フレーム受信ステップと、上記第2フレームに含まれている第1フレーム検知時刻情報と、上記受信側第1フレーム認識ステップによって検知された第1フレーム検知時刻とに基づいて、上記時計手段の時刻を調整する調整ステップとを有する方法である。   The communication method according to the present invention is a communication method of a communication apparatus constituting a communication system in which a plurality of communication apparatuses are connected for communication via a communication network. The reception side first frame recognition step for detecting the reception or transmission of the specific first frame transmitted and the reception side first frame recognition step and the first frame reception time when the reception or transmission of the first frame is detected. A time detection step for determining one frame detection time based on a time indicated by a clock means included in the communication device; and a second detection step for receiving the second frame from the communication device according to the present invention via the communication network. A two-frame receiving step, first frame detection time information included in the second frame, and the receiving-side first frame recognition Based on the first frame detection time detected by step, a method having an adjusting step of adjusting the time of the clock means.

上記の構成または方法によれば、第1フレームによって時計手段の時刻を合わせるタイミングが決定され、第2フレームを受信することによって、時計手段の調整をどの程度を行えばよいかを認識することが可能となる。よって、第2フレームを送信した通信装置における時計手段の時刻との同期を的確に行うことが可能となる。   According to the above configuration or method, the timing for adjusting the time of the clock means is determined by the first frame, and it is possible to recognize how much the clock means should be adjusted by receiving the second frame. It becomes possible. Therefore, it is possible to accurately synchronize with the time of the clock means in the communication apparatus that has transmitted the second frame.

また、本発明に係る通信装置は、上記の構成において、上記第1フレームが、上記通信ネットワークにおいて送達確認を必要としない状態で複数の通信装置に対して送信されたものである構成としてもよい。   The communication device according to the present invention may be configured such that, in the above configuration, the first frame is transmitted to a plurality of communication devices in a state that does not require delivery confirmation in the communication network. .

上記の構成によれば、上記第1フレームとして、例えばブロードキャストまたはマルチキャスト形式のフレームを用いることができる。   According to the above configuration, for example, a broadcast or multicast frame can be used as the first frame.

また、本発明に係る通信装置は、上記の構成において、上記調整手段が、上記時計手段の時刻を設定するパラメータおよび/または上記時計手段の時計が進む速度を調整するパラメータを調整する構成としてもよい。   Further, the communication device according to the present invention may be configured such that, in the above configuration, the adjusting unit adjusts a parameter for setting a time of the clock unit and / or a parameter for adjusting a speed at which the clock of the clock unit advances. Good.

上記の構成によれば、第2フレームを送信した通信装置における時計手段と、自装置が備える時計手段との同期が外れている場合には、自装置の時計手段の現在時刻の推定値を直接書き込むことで、時刻の同期を素早く行うことが可能となる。また、第2フレームを送信した通信装置における時計手段の時刻と、自装置が備える時計手段の時刻とが同期している場合には、自装置が備える時計手段の時計が進む速度を微調整して同期を保つことができる。   According to the above configuration, when the clock means in the communication apparatus that has transmitted the second frame is out of synchronization with the clock means included in the own apparatus, the estimated value of the current time of the clock means in the own apparatus is directly By writing, time synchronization can be performed quickly. In addition, when the time of the clock means in the communication device that has transmitted the second frame is synchronized with the time of the clock means provided in the own device, the speed at which the clock of the clock means provided in the own device is advanced is finely adjusted. Can be kept in sync.

また、本発明に係る通信装置は、上記の構成において、上記送信側第1フレーム認識手段が、上記第1フレームの特定部分の受信または送信を検知する構成としてもよい。   The communication apparatus according to the present invention may be configured such that, in the above configuration, the transmission-side first frame recognition means detects reception or transmission of a specific portion of the first frame.

また、本発明に係る通信装置は、上記の構成において、上記受信側第1フレーム認識手段が、上記第1フレームの特定部分の受信または送信を検知する構成としてもよい。   The communication apparatus according to the present invention may be configured such that, in the above configuration, the receiving-side first frame recognition means detects reception or transmission of a specific portion of the first frame.

上記の構成によれば、第1フレームの特定の部分を基準点として同期を行うことが可能となる。よって、同期精度を向上させることができる。   According to the above configuration, synchronization can be performed using a specific portion of the first frame as a reference point. Therefore, the synchronization accuracy can be improved.

また、本発明に係る通信装置は、上記の構成において、上記調整手段がバッファを備え、上記バッファが、最新n個(n≧1の整数)までの上記第1フレーム検知時刻を格納する構成としてもよい。   In the communication apparatus according to the present invention, in the above configuration, the adjustment unit includes a buffer, and the buffer stores the first frame detection time up to the latest n (n ≧ 1). Also good.

上記の構成によれば、バッファを用いることにより、送信または受信できた最新n個(n≧1の整数)までの第1フレーム検知時刻を格納することができる。例えば第2フレームの伝送に時間が掛かりすぎることにより、第2フレームの伝送が終わる前に次の第1フレームが伝送されてしまう場合がある。この場合、もしn=1であれば、前の第1フレーム検知時刻を消すか、あるいは新しい第1フレーム検知時刻を記録しないという選択肢があるが、いずれにしても1回時計の調整ができなくなる。これに対してn≧2にしておけば、前の第1フレーム検知時刻と新しい第1フレーム検知時刻との両方を記録することができ、両方に対して時計の調整が可能となる。よって、nを第2フレームの最大の遅延に設定することにより同期の精度を劣化させないことができる。   According to the above configuration, by using the buffer, it is possible to store up to n latest frame detection times (integers where n ≧ 1) that can be transmitted or received. For example, if the transmission of the second frame takes too long, the next first frame may be transmitted before the transmission of the second frame is completed. In this case, if n = 1, there is an option of deleting the previous first frame detection time or not recording a new first frame detection time, but in any case, the clock cannot be adjusted once. . On the other hand, if n ≧ 2, both the previous first frame detection time and the new first frame detection time can be recorded, and the clock can be adjusted for both. Therefore, the accuracy of synchronization can be prevented from deteriorating by setting n to the maximum delay of the second frame.

また、本発明に係る通信装置は、上記の構成において、上記第1フレームに、該第1フレームを識別する識別子が含まれており、上記第2フレーム送信手段が、上記第2フレームに、該第2フレームに含まれる第1フレーム検知時刻情報に対応する第1フレームの識別子を含める構成としてもよい。   In the communication device according to the present invention, in the configuration described above, the first frame includes an identifier for identifying the first frame, and the second frame transmission unit includes the second frame in the second frame. It may be configured to include the identifier of the first frame corresponding to the first frame detection time information included in the second frame.

また、本発明に係る通信装置は、上記の構成において、上記第1フレームに、該第1フレームを識別する識別子が含まれており、上記第2フレーム受信手段が、第1フレーム検知時刻情報に対応する第1フレームの識別子を含んだ第2フレームを受信し、上記バッファが、最新n個(n≧1の整数)までの上記第1フレーム検知時刻および上記識別子の組合せを格納する構成としてもよい。   In the communication device according to the present invention, in the configuration described above, the first frame includes an identifier for identifying the first frame, and the second frame reception unit includes the first frame detection time information. The second frame including the identifier of the corresponding first frame is received, and the buffer stores the first n frame detection times and the combination of the identifiers up to the latest n (n ≧ 1). Good.

上記の構成によれば、識別子を用いることにより、例えば第1フレームあるいは第2フレームを失った場合、自装置が過去に受信した第1フレームの識別子と、第2フレームに含まれる第1フレーム検知時刻情報に対応する識別子とを比較することによって、両者の対応付けを容易に認識することが可能となる。   According to the above configuration, by using the identifier, for example, when the first frame or the second frame is lost, the identifier of the first frame received by the device itself and the first frame detection included in the second frame are detected. By comparing the identifier corresponding to the time information, it is possible to easily recognize the association between the two.

また、本発明に係る通信装置は、上記の構成において、上記調整手段が、受信した第2フレームに含まれる識別子と同じ識別子を上記バッファから探し、同じ識別子がバッファに存在する場合に、この識別子に対応する第1フレーム検知時刻をtRX0とし、前回のtRX0をtRX1とし、受信した第2フレームに含まれる第1フレーム検知時刻情報をtTX0とし、前回のtTX0をtTX1として、(1)今回が初期化後に始めて第2フレームの識別子がバッファに見つかった場合、あるいは、(2)ABS(tTX0−tRX0)>TH(ABSは絶対値)(THは定数)の場合、上記時計手段の時刻を(現在の時計手段の時刻−tRX0+tTX0+K(Kは定数))に設定し、上記(1)または(2)の条件が満たされない場合には、tTX0とtRX0とに基づいて、上記時計手段の進む速度を調整する構成としてもよい。   In the communication apparatus according to the present invention, in the above configuration, the adjustment unit searches the buffer for the same identifier as the identifier included in the received second frame, and when the same identifier exists in the buffer, the identifier (1) This time is initial When the second frame identifier is found in the buffer for the first time after conversion, or (2) ABS (tTX0-tRX0)> TH (ABS is an absolute value) (TH is a constant), the time of the clock means is set to (current Time-tRX0 + tTX0 + K (K is a constant)), and if the above condition (1) or (2) is not satisfied, Based on the RX0, may be configured to adjust the speed of travel of said clock means.

上記の構成によれば、初期段階の時計の設定、第2フレームが長期的にわたって連続的に失われた場合、あるいは各通信装置における時計手段の時刻がずれ過ぎた場合に、各時計手段の時刻を一挙に近づけることができる。   According to the above configuration, the time of each clock means is set when the clock of the initial stage is set, when the second frame is continuously lost over a long period of time, or when the time of the clock means in each communication device is excessively shifted. Can be approached at once.

また、本発明に係る通信装置は、上記の構成において、上記調整手段は、自装置の時計手段の同期が行われているか否かを示す同期済みフラグを記憶する構成としてもよい。   Further, the communication device according to the present invention may be configured such that, in the above configuration, the adjustment unit stores a synchronized flag indicating whether or not the clock unit of the own device is synchronized.

上記の構成によれば、同期が取れているのかどうかを表す同期済みフラグを用いることにより、調整手段は同期状態に適した対応を行うことができ、より正確な調整を行うことができる。   According to the above configuration, by using the synchronized flag indicating whether or not synchronization is achieved, the adjustment unit can perform a response suitable for the synchronization state, and can perform more accurate adjustment.

また、本発明に係る通信装置は、上記の構成において、リセット時に前記同期済みフラグは偽に初期化される構成としてもよい。   The communication apparatus according to the present invention may be configured such that, in the above configuration, the synchronized flag is initialized to false at the time of reset.

上記の構成によれば、初期状態では同期が取れていない状態であるため、リセット時にこの状態を表すことができる。   According to said structure, since it is a state which cannot synchronize in an initial state, this state can be represented at the time of reset.

また、本発明に係る通信装置は、上記の構成において、上記調整手段が、受信した第2フレームに含まれる第1フレーム検知時刻情報と、上記バッファに格納されている全ての第1フレーム検知時刻との差分絶対値が最も小さい第1フレーム検知時刻を選択し、選択した第1フレーム検知時刻をtRX0とし、前回のtRX0をtRX1とし、受信した第2フレームの第1フレーム検知時刻情報をtTX0とし、前回のtTX0をtTX1として、(1)前記差分絶対値がTH(THは定数)より小さいあるいは等しい場合、tTX0とtRX0とに基づいて、上記時計手段の進む速度を調整してかつ上記同期済みフラグを真に設定し、上記(1)の条件が満たされていないかつ前記同期済みフラグが偽である、あるいは、上記(1)の条件が満たされていないかつ前記同期済みフラグが真であって、かつ、ABS(tTX0−tRX1)>TH1(ABSは絶対値)(TH1は定数)である、あるいは、上記(1)の条件が満たされていないかつ前記同期済みフラグが真であって、かつ、ABS(tTX0−tTX1)>TH1である場合、上記時計手段の時刻を(現在の時計手段の時刻−tRX0+tTX0+K(Kは定数))に設定し、かつ前記同期済みフラグを偽に設定する構成としてもよい。   Further, in the communication apparatus according to the present invention, in the above configuration, the adjustment unit includes first frame detection time information included in the received second frame and all first frame detection times stored in the buffer. The first frame detection time with the smallest absolute value is selected, the selected first frame detection time is tRX0, the previous tRX0 is tRX1, and the first frame detection time information of the received second frame is tTX0. (1) When the absolute value of the difference is smaller than or equal to TH (TH is a constant), the speed at which the timepiece advances is adjusted based on tTX0 and tRX0 and the synchronization is completed. Set the flag to true and the condition (1) above is not met and the synchronized flag is false, or the condition (1) above is met And the synchronized flag is true and ABS (tTX0-tRX1)> TH1 (ABS is an absolute value) (TH1 is a constant), or the condition (1) is not satisfied and If the synchronized flag is true and ABS (tTX0−tTX1)> TH1, the time of the clock means is set to (current time of clock means−tRX0 + tTX0 + K (K is a constant)), and The synchronized flag may be set to false.

上記の構成によれば、識別子を用いていないため、LAN層は上位層に第1フレームを送信または受信した瞬間のみを知らせればよく、LAN層と上位層とが別のチップの場合に、相互でやりとりすべき情報の実装価格を抑えることができる。価格が安くなる原因は以下の通りである。識別子を用いた場合、識別子をLAN層から上位層に知らせる必要がある。通常のPCIインタフェースを用いて識別子を上位に知らせることは可能であるが、PCIインタフェースでは様々な遅延・ジッタが発生するため、高度な同期のためにPCIインタフェースを用いることはできない。このため、別途リアルタイム性があるインタフェースを準備する必要がある。上位層のチップと無線LANのチップとは通常別のチップであるため、チップのピン数が増えたりボードの設計も複雑になったりする。なお、通常チップのピン数を増やすことは望ましくないことであり、できるだけ減らしてチップの価格を下げる努力が重要である。識別子を用いない方法の場合、LAN層チップと上位層チップの間の信号線として、例えば、第1フレームを送信または受信したタイミングにおいて一定時間だけ立ち上がる、あるいは電圧レベルが変化する、というような1本の信号線だけで必要な全ての情報のやりとりを達成することができる。   According to the above configuration, since the identifier is not used, the LAN layer only needs to inform the upper layer of the moment when the first frame is transmitted or received. When the LAN layer and the upper layer are different chips, It is possible to reduce the implementation price of information to be exchanged between each other. The reasons why the price is cheap are as follows. When the identifier is used, it is necessary to notify the identifier from the LAN layer to the upper layer. Although it is possible to notify the identifier to the host using a normal PCI interface, the PCI interface cannot be used for advanced synchronization because various delays and jitters occur in the PCI interface. For this reason, it is necessary to prepare an interface having real-time characteristics separately. Since the upper layer chip and the wireless LAN chip are usually different chips, the number of pins of the chip increases and the design of the board becomes complicated. Usually, it is not desirable to increase the number of pins of a chip, and it is important to make an effort to reduce the price of the chip by reducing it as much as possible. In the case of a method that does not use an identifier, the signal line between the LAN layer chip and the upper layer chip, for example, rises for a certain time at the timing of transmitting or receiving the first frame, or the voltage level changes 1 All necessary information exchange can be achieved with only the signal lines of the book.

また、本発明に係る通信装置は、上記の構成において、上記調整手段が、上記時計手段の調整にPLL(Phase Locked Loop)を用いる構成としてもよい。   The communication device according to the present invention may be configured such that, in the above configuration, the adjusting unit uses a PLL (Phase Locked Loop) for adjusting the clock unit.

上記の構成によれば、PLLを用いることにより、より精度の高い同期を達成することができる。   According to the above configuration, more accurate synchronization can be achieved by using the PLL.

また、本発明に係る通信装置は、上記の構成において、無線LAN(Local Area Network)またはPLC(Power Line Communication)に対応している構成としてもよい。   Moreover, the communication apparatus according to the present invention may be configured to support a wireless LAN (Local Area Network) or a PLC (Power Line Communication) in the above configuration.

上記の構成によれば、無線LANまたはPLCのネットワーク環境でも高い精度の同期を達成することができる。   According to the above configuration, high-accuracy synchronization can be achieved even in a wireless LAN or PLC network environment.

また、本発明に係る通信装置は、上記の構成において、上記第1フレームは無線LANのビーコンフレームである構成としてもよい。   In the communication apparatus according to the present invention, the first frame may be a wireless LAN beacon frame.

上記の構成によれば、伝送方式にIEEE802.11eを用いた場合でも直接第2フレームを第1の通信装置から第2の通信装置に伝送することができる。一方、特許文献1の同期方式をIEEE802.11eに用いてかつクロックマスターがAPでない場合、同期用のマルチキャストフレームを二回に分けて伝送する必要がある。よって、以上の条件では本発明の伝送方式はより少ない帯域を利用して同期を行うことができる。また、IEEE802.11eを用いる場合、本発明の第1フレームをビーコンフレームにすることができ、本発明と特許文献1の両方は定期的にビーコンフレーム伝送する必要があるため、本発明の第1フレーム(ビーコンフレーム)が利用する帯域は追加帯域にならない。   According to the above configuration, the second frame can be directly transmitted from the first communication device to the second communication device even when IEEE 802.11e is used as the transmission method. On the other hand, when the synchronization method of Patent Document 1 is used for IEEE802.11e and the clock master is not an AP, the multicast frame for synchronization needs to be transmitted in two steps. Therefore, under the above conditions, the transmission method of the present invention can perform synchronization using a smaller band. When IEEE802.11e is used, the first frame of the present invention can be a beacon frame, and both the present invention and Patent Document 1 need to transmit beacon frames periodically. The band used by the frame (beacon frame) is not an additional band.

また、本発明に係る通信装置は、上記の構成において、無線LAN(Local Area Network)に対応しており、上記第1フレームは無線LANのビーコンフレームであり、前記識別子はビーコンフレームに含まれるTSF(Timing Synchronization Function)タイマーのタイムスタンプあるいはシーケンス番号である構成としてもよい。   Further, the communication device according to the present invention corresponds to a wireless LAN (Local Area Network) in the above configuration, the first frame is a beacon frame of the wireless LAN, and the identifier is a TSF included in the beacon frame. (Timing Synchronization Function) A time stamp or sequence number of a timer may be used.

上記の構成によれば、識別子をビーコンフレームに含まれるTSFタイマーのタイムスタンプあるいはシーケンス番号にすることにより、新たなフレームを定義しないで規格化された既存の情報を識別子として利用することができる。   According to the configuration described above, by using the identifier as the time stamp or sequence number of the TSF timer included in the beacon frame, it is possible to use the existing information standardized without defining a new frame as the identifier.

なお、上記通信装置は、コンピュータによって実現してもよく、この場合には、コンピュータを上記各手段として動作させることにより上記通信装置をコンピュータにて実現させる通信プログラム、およびそれを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。   The communication device may be realized by a computer. In this case, a communication program for causing the communication device to be realized by the computer by causing the computer to operate as the above-described means, and a computer-readable program that records the communication program. Various recording media are also within the scope of the present invention.

本発明に係る通信装置は、以上のように、時刻を示す時計手段と、上記通信ネットワークにおいて複数の通信装置に対して送達確認を必要としない状態で送信された特定の第1フレームの受信、または、送信を検知する送信側第1フレーム認識手段と、上記送信側第1フレーム認識手段によって、第1フレームの受信または送信が検知された時の第1フレーム検知時刻を上記時計手段が示す時刻に基づいて決定する時刻検知手段と、上記第1フレーム検知時刻情報を含む第2フレームを、送達確認を必要とする状態で上記通信ネットワークを介して外部の通信装置に送信する第2フレーム送信手段とを備える構成である。   The communication device according to the present invention, as described above, receives the clock means that indicates the time and the reception of the specific first frame transmitted in a state that does not require delivery confirmation to the plurality of communication devices in the communication network, Alternatively, the clock means indicates the first frame detection time when reception or transmission of the first frame is detected by the transmission side first frame recognition means for detecting transmission and the transmission side first frame recognition means. And second frame transmission means for transmitting a second frame including the first frame detection time information to an external communication device via the communication network in a state requiring delivery confirmation. It is the structure provided with.

これにより、時計合わせが正常に行われる可能性を高めることが可能となるので、各通信装置における時計の同期がより的確に行われる通信システムを提供することが可能となる。   As a result, it is possible to increase the possibility that the clock is set correctly, and thus it is possible to provide a communication system in which the clocks in each communication device are more accurately synchronized.

本発明の一実施形態について図面に基づいて説明すると以下の通りである。   An embodiment of the present invention is described below with reference to the drawings.

図1は、本実施形態に係る通信システムの概略構成を示している。同図に示すように、通信システムは、第1通信装置1、第2通信装置2、および第3通信装置3を備えた構成となっている。第1〜第3通信装置1〜3は、互いにネットワーク210を介して通信接続されている。また、図2は、上記通信システムにおける通信シーケンスを示している。   FIG. 1 shows a schematic configuration of a communication system according to the present embodiment. As shown in the figure, the communication system includes a first communication device 1, a second communication device 2, and a third communication device 3. The first to third communication devices 1 to 3 are connected to each other via a network 210. FIG. 2 shows a communication sequence in the communication system.

第1通信装置1は送達確認を伴わない形式の瞬間フレーム(TF:第1フレーム)を定期的に伝送する通信装置である。ただし送達確認を伴わない伝送形式としては、ブロードキャストフレーム、マルチキャストフレーム、およびACKフレームを用いないユニキャストフレームなどが挙げられる。なお、瞬間フレームは、送達確認を伴う形式であってもよい。   The first communication device 1 is a communication device that periodically transmits an instantaneous frame (TF: first frame) in a form without delivery confirmation. However, examples of transmission formats that do not accompany delivery confirmation include broadcast frames, multicast frames, and unicast frames that do not use ACK frames. Note that the instantaneous frame may be in a form with delivery confirmation.

TFは第1通信装置1より時刻T1に伝送され、ネットワーク210を通ってT2に第3通信装置3に到着し、T3に第2通信装置2に到着する。   The TF is transmitted from the first communication device 1 at time T1, passes through the network 210, arrives at the third communication device 3 at T2, and arrives at the second communication device 2 at T3.

ネットワークとして例えば無線LANを想定すると、T2−T1は電波が第1通信装置1から第3通信装置3に届くまでの時間であり、T3−T1は電波が第1通信装置1から第2通信装置2に届くまでの時間である。なお電波は通常1nsに約30cm移動する。   Assuming, for example, a wireless LAN as a network, T2-T1 is a time until the radio wave reaches the third communication device 3 from the first communication device 1, and T3-T1 is a radio wave from the first communication device 1 to the second communication device. It is the time to reach 2. The radio wave normally moves about 30 cm in 1 ns.

第2通信装置2はTF認識部(送信側第1フレーム認識手段)30、時計(時計手段)20、サンプラー(時刻検知手段)40、およびフレーマ(第2フレーム送信手段)50を備えた構成となっている。   The second communication device 2 includes a TF recognition unit (transmission-side first frame recognition means) 30, a clock (clock means) 20, a sampler (time detection means) 40, and a framer (second frame transmission means) 50. It has become.

第2通信装置2ではTFが受信されるとTFはTF認識部30で認識され、TF認識部30は、TFの例えばフレームの最初または最後のようにフレームの特定部分を基準点として、その基準の瞬間(T5)を認識してサンプラー40に知らせ、サンプラー40はこの瞬間に時計20の時刻をtTXとしてサンプリングする。フレーマ50はサンプリングされたtTXを含んだ同期フレーム(SF:第2フレーム)を作成して、第2通信装置2はT6時点でSFを第3通信装置3に伝送する。なお、T3からT5までの期間はTF認識部に必要となる固定処理時間である。   In the second communication device 2, when the TF is received, the TF is recognized by the TF recognition unit 30, and the TF recognition unit 30 uses the specific part of the frame as a reference point, for example, at the beginning or the end of the frame, and the reference The sampler 40 is recognized and notified to the sampler 40, and the sampler 40 samples the time of the clock 20 as tTX at this moment. The framer 50 creates a synchronization frame (SF: second frame) including the sampled tTX, and the second communication device 2 transmits the SF to the third communication device 3 at time T6. The period from T3 to T5 is a fixed processing time required for the TF recognition unit.

SFはネットワーク210を通ってT7に第3通信装置3に到着する。   The SF arrives at the third communication device 3 through the network 210 at T7.

第3通信装置3はTF認識部(受信側第1フレーム認識手段)130、時計(時計手段)120、サンプラー(時刻検知手段)140、フレーマ(第2フレーム受信手段)150、および、調整部(調整手段)160を備えた構成となっている。   The third communication device 3 includes a TF recognition unit (reception-side first frame recognition unit) 130, a clock (clock unit) 120, a sampler (time detection unit) 140, a framer (second frame reception unit) 150, and an adjustment unit ( (Adjustment means) 160 is provided.

第2通信装置2でTFが受信されるのとほぼ当時に同じTFは第3通信装置3で受信される。TFは第3通信装置3のTF認識部130で認識され、TF認識部130はTFの例えばフレームの最初または最後のようにフレームの特定部分を基準点として、その基準の瞬間(T4)を認識してサンプラー140に知らせ、サンプラー140はこの瞬間に時計120をtRXとしてサンプリングし、tRXは調整部160に渡される。なお、T2からT4までの期間はTF認識部に必要となる固定処理時間である。   The third communication device 3 receives the same TF almost at the same time that the second communication device 2 receives the TF. The TF is recognized by the TF recognition unit 130 of the third communication device 3, and the TF recognition unit 130 recognizes the reference instant (T4) using a specific part of the frame as a reference point, for example, at the beginning or end of the frame. The sampler 140 samples the timepiece 120 as tRX at this moment, and tRX is passed to the adjustment unit 160. The period from T2 to T4 is a fixed processing time required for the TF recognition unit.

次に第2通信装置2が伝送したSFは第3通信装置3にT7に到着する。ここでSFはフレーマ150に渡され、フレーマ150はSFにある少なくともtTXの値を取り出して調整部160に渡す。次に調整部160は少なくともtTXの情報を受けると、時計120のパラメータを調整するための調整処理を行う。調整処理の具体的な処理内容は後述する。   Next, the SF transmitted by the second communication device 2 arrives at the third communication device 3 at T7. Here, the SF is passed to the framer 150, and the framer 150 extracts at least the value of tTX in the SF and passes it to the adjustment unit 160. Next, when the adjustment unit 160 receives at least information on tTX, the adjustment unit 160 performs an adjustment process for adjusting the parameters of the timepiece 120. Specific processing contents of the adjustment processing will be described later.

これまでの説明では瞬間フレームを受信したクロックマスター(第2通信装置2)がその後すぐに同期フレームを送信すると仮定しており、それゆえ非クロックマスターは瞬間フレームを受信した後すぐに同期フレームを受信すると言うことを仮定しているが、瞬間フレーム・同期フレームが実際に伝送されるタイミングは以下のような原因により変ってくると考えられる。
(1)第2通信装置2または第3通信装置3に非リアルタイムOS(Operating System)が処理している場合、処理時間のばらつきが大きい場合。
(2)ネットワークが混雑している場合。
(3)同期フレームの伝送にエラーが生じて再送に時間が掛かる場合。
In the description so far, it is assumed that the clock master (second communication device 2) that receives the instantaneous frame transmits the synchronization frame immediately after that, and therefore, the non-clock master transmits the synchronization frame immediately after receiving the instantaneous frame. Although it is assumed that it is received, the timing at which the instantaneous frame / synchronization frame is actually transmitted is considered to change due to the following reasons.
(1) When the non-real-time OS (Operating System) is processing the second communication device 2 or the third communication device 3, and the processing time varies greatly.
(2) When the network is congested.
(3) When an error occurs in the transmission of the synchronization frame and it takes time to retransmit.

したがって、ある同期フレームがどの瞬間フレームに対応しているのかがわかりにくくなるケースが考えられる。しかしこの問題は複数のtRX値を格納しておくことにより解決可能である。   Therefore, there may be a case where it is difficult to understand which instantaneous frame corresponds to a certain synchronization frame. However, this problem can be solved by storing a plurality of tRX values.

例えば同期フレームの伝送に長い時間が掛かり、ある瞬間フレームに対応する同期フレームが到着するよりも前に次の瞬間フレームが伝送されてしまったとしても、遅れて到着した同期フレームに含まれるtTX値に対応するtRX値がまだバッファに残っていれば、問題なく時計120の調整を行うことができる。   For example, even if the transmission of a synchronization frame takes a long time and the next instantaneous frame is transmitted before the arrival of the synchronization frame corresponding to a certain instantaneous frame, the tTX value included in the synchronization frame that arrives late If the tRX value corresponding to is still in the buffer, the clock 120 can be adjusted without any problem.

このように調整部160は最新のn個(n≧1の整数)のTFのデータを格納できるバッファを用いてもよい。データは少なくとも第3通信装置3がTFを送信または受信した瞬間にサンプリングされた時計120のtRXを含む。   As described above, the adjustment unit 160 may use a buffer that can store the latest n (n ≧ 1 integer) TF data. The data includes at least tRX of the clock 120 sampled at the moment when the third communication device 3 transmits or receives TF.

ただし、両局は充分精度の良い水晶発信器を持っており、対応するtTX値とtRX値とはお互いに非常に近い値になっていると仮定しても良いし、後述のように、クロックマスターはtTX値と同時に、それに対応する瞬間フレームの識別子に関する情報を非クロックマスターに対して通知し、非クロックマスターはtRX値とそれに対応する瞬間フレームの識別子の情報を記憶していると仮定しても良い。   However, both stations have sufficiently accurate crystal oscillators, and it can be assumed that the corresponding tTX value and tRX value are very close to each other. At the same time as the tTX value, the master notifies the non-clock master of information on the identifier of the corresponding instantaneous frame, and it is assumed that the non-clock master stores the tRX value and the information of the identifier of the corresponding instantaneous frame. May be.

なお、データを格納する際にバッファが一杯である場合には、最新のデータを格納するために最も古いデータを削除するようにすれば、より新しいサンプル結果を参照することが可能である。   If the buffer is full when data is stored, it is possible to refer to a newer sample result by deleting the oldest data in order to store the latest data.

これの具体的な事例を図3に示す。ここではまず第1通信装置1により瞬間フレームのTF1が送信され、第2通信装置2と第3通信装置3とでそれぞれTF1を受信した時刻における時計のサンプル値であるtTX1とtRX1がサンプリングされる。第3通信装置3ではさらにtRX1がバッファに格納される。次に第2通信装置2はTF1に対するSF1を伝送するが、これの伝送に時間が掛かり、SF1が第3通信装置3に着く前に次の瞬間フレームのTF2が第1通信装置1により伝送される場合を考える。   A specific example of this is shown in FIG. Here, TF1 of an instantaneous frame is first transmitted by the first communication device 1, and tTX1 and tRX1, which are sample values of the clock at the time when the TF1 is received by the second communication device 2 and the third communication device 3, respectively, are sampled. . In the third communication device 3, tRX1 is further stored in the buffer. Next, the second communication device 2 transmits SF1 for TF1, but it takes time to transmit this, and TF2 of the next instantaneous frame is transmitted by the first communication device 1 before SF1 arrives at the third communication device 3. Consider the case.

この場合、第2通信装置2と第3通信装置3とでTF2を受信した時刻における時計のサンプル値であるtTX2とtRX2がサンプリングされ、さらに第3通信装置3ではtRX2がバッファに格納される。そして、その後SF1が遅れて第3通信装置3に着く。   In this case, tTX2 and tRX2, which are sample values of the clock at the time when TF2 is received by the second communication device 2 and the third communication device 3, are sampled, and tRX2 is stored in the buffer in the third communication device 3. After that, SF1 arrives at the third communication device 3 with a delay.

この場合、第3通信装置3が時計120の調整を行うためにはtTX1とtRX1が必要になる。もしn=1であれば、tRX2がバッファに格納された際にtRX1はバッファから削除されているため、この調整ができなくなり時計の同期精度が劣化するがn=2であればtRX1の値がまだバッファ内に残っているため上記の調整を行うことが可能である。上記の説明で明らかなように、バッファの大きさを表すnの値は、同期フレームの伝送遅延のばらつき度合いをカバーできる値にしておくことが重要である。なお、SFを受信した際に対応するtRXをバッファから探す方法は後述する。   In this case, tTX1 and tRX1 are required for the third communication device 3 to adjust the timepiece 120. If n = 1, tRX1 is deleted from the buffer when tRX2 is stored in the buffer, so this adjustment cannot be made and the synchronization accuracy of the clock deteriorates. However, if n = 2, the value of tRX1 is Since it is still in the buffer, the above adjustment can be performed. As is apparent from the above description, it is important that the value of n representing the size of the buffer be a value that can cover the degree of variation in the transmission delay of the synchronization frame. A method for searching for the corresponding tRX from the buffer when the SF is received will be described later.

なお、第2通信装置2が第1の通信装置に対応し、第3通信装置3が第2の通信装置に対応する。また本実施例においては、TF認識部30・130、およびフレーマ50・150が通信手段に対応する。   The second communication device 2 corresponds to the first communication device, and the third communication device 3 corresponds to the second communication device. In this embodiment, the TF recognition units 30 and 130 and the framers 50 and 150 correspond to communication means.

なお、第1通信装置1と第2通信装置2とは同じであっても良い。この場合、第2通信装置2はTFを受信するのではなくTFを送信することになり、TF認識部30はTFの例えばフレームの最初または最後のようにフレームの特定部分を基準にして、その基準点の瞬間を認識して時計20の時刻をtTXとしてサンプラー40がサンプリングする。   The first communication device 1 and the second communication device 2 may be the same. In this case, the second communication device 2 does not receive the TF but transmits the TF, and the TF recognition unit 30 uses the specific part of the frame as a reference, for example, at the beginning or end of the frame, and The sampler 40 samples the moment of the reference point and samples the time of the clock 20 as tTX.

また、第1通信装置1と第3通信装置3とは同じであっても良い。この場合、第3通信装置3はTFを受信するのではなくTFを送信することになり、TF認識部130はTFの例えばフレームの最初または最後のようにフレームの特定な部分を基準にして、その基準点の瞬間を認識して時計120の時刻をtRXとしてサンプラー140がサンプリングする。   Further, the first communication device 1 and the third communication device 3 may be the same. In this case, the third communication device 3 transmits TF instead of receiving TF, and the TF recognition unit 130 uses a specific part of the frame as a reference, for example, at the beginning or end of the frame, The sampler 140 samples the moment of the reference point and uses the time of the clock 120 as tRX.

なお、第2通信装置2に時計を合わせる通信装置は複数(第3通信装置3A,第3通信装置3B・・・)あっても良い。この場合、第2通信装置2は送達確認を伴わない形式でTFをこれらの全通信装置に対して同時に伝送し、その後、送達確認を伴う形式でSFをこれらの全通信装置に対して個々に伝送する。なお、第3通信装置3A,第3通信装置3B・・・の動作は第3通信装置3と同じである。ここで、第2通信装置2が、ブロードキャストまたはマルチキャストでTFをこれらの全通信装置に対して同時に伝送してもよい。また、SFは送達確認を伴うユニキャストフレームであってもよいし、送達確認を伴わない形式であってもよい。   Note that there may be a plurality of communication devices (third communication device 3A, third communication device 3B,...) That align the clock with the second communication device 2. In this case, the second communication device 2 transmits TF to all these communication devices at the same time in a form without delivery confirmation, and then sends SF to each of these communication devices individually in a form with delivery confirmation. To transmit. The operations of the third communication device 3A, the third communication device 3B,... Are the same as those of the third communication device 3. Here, the second communication device 2 may simultaneously transmit TF to all these communication devices by broadcast or multicast. In addition, the SF may be a unicast frame with confirmation of delivery or a format without confirmation of delivery.

なお、同じネットワーク内に第2通信装置2Aの時計20Aに時計を合わせる通信装置群から構成されるサブネットワーク、第2通信装置2Bの時計20Bに時計を合わせる通信装置群から構成される別のサブネットワークなど、複数の第2通信装置2(複数のサブネットワーク)が存在しても良い。   In the same network, a subnetwork composed of a group of communication devices that synchronize the clock with the clock 20A of the second communication device 2A, and another subgroup composed of a communication device group that synchronizes the clock with the clock 20B of the second communication device 2B. A plurality of second communication devices 2 (a plurality of sub-networks) such as a network may exist.

なお、時計の調整にはPLLを用いても良い。PLLを用いることにより、時計20に対する時計120のずれを低減させることができる。   A PLL may be used to adjust the clock. By using the PLL, the shift of the timepiece 120 with respect to the timepiece 20 can be reduced.

なお、第1〜第3通信装置1・2・3の通信手段は例えばIEEE802.11系の無線LANやPLCであってもよい。この場合、第1通信装置1はAPであり、TFはビーコンフレームであっても良い。   Note that the communication means of the first to third communication apparatuses 1, 2, and 3 may be, for example, an IEEE 802.11 wireless LAN or PLC. In this case, the first communication device 1 may be an AP and the TF may be a beacon frame.

(実施の形態1)
本発明の一実施形態に関して以下に説明する。本実施形態では、識別子を用いて同期を行う場合であり、第3通信装置3では瞬間フレームの識別子と同期フレームの識別子とを比較することにより、簡単にtTXとtRXとが同じ瞬間にサンプリングされた時刻であるということを確認できる。なお、本実施形態の説明は識別子に関連する部分のみとする。
(Embodiment 1)
One embodiment of the present invention will be described below. In the present embodiment, synchronization is performed using an identifier, and the third communication device 3 simply samples tTX and tRX at the same moment by comparing the identifier of the instantaneous frame with the identifier of the synchronous frame. It can be confirmed that it is the time. Note that the description of this embodiment is limited to the portion related to the identifier.

まず、瞬間フレーム(TF)にシーケンス番号などの識別子が含まれていると仮定する。   First, it is assumed that an identifier such as a sequence number is included in the instantaneous frame (TF).

第2通信装置2はTFを受信するとTFから識別子を読み出す。次に、TFを送信または受信した瞬間にサンプリングされた時計20のtTX値と上記識別子を含んだ同期フレーム(SF)を作成して第3通信装置3に伝送する。   When receiving the TF, the second communication device 2 reads the identifier from the TF. Next, a synchronization frame (SF) including the tTX value of the clock 20 sampled at the moment when TF is transmitted or received and the identifier is generated and transmitted to the third communication device 3.

第3通信装置3の調整部160にはn個(n≧1の整数)までの最新のtRX値と識別子とのセットを格納できるバッファがあるとする。   It is assumed that the adjustment unit 160 of the third communication device 3 has a buffer that can store a set of up to n (n ≧ 1 integers) latest tRX values and identifiers.

第3通信装置3がTFを受信した際、TFを受信した瞬間にサンプリングされた時計120のtRX値と識別子とをバッファに格納する。次に第3通信装置3がSFを受信した際、SFからtTXと識別子を読み出し、調整部160はSFの識別子と同じ識別子をバッファから探す。もしSFの識別子がバッファに見つかった場合、調整部160は以下の処理を行う。   When the third communication device 3 receives the TF, the tRX value and the identifier of the watch 120 sampled at the moment of receiving the TF are stored in the buffer. Next, when the third communication device 3 receives the SF, the tTX and the identifier are read from the SF, and the adjustment unit 160 searches the buffer for the same identifier as the SF identifier. If the SF identifier is found in the buffer, the adjustment unit 160 performs the following processing.

まず、見つかった識別子に対応するtRX値をレジスタtRX0に格納する。また受信したSFの中に含まれるtTX値をレジスタtTX0に格納し、前回のレジスタtTX0の値をレジスタtTX1に移動する。次に、もし今回が初期化後に初めてSFの識別子がバッファに見つかった場合には、第2通信装置2および第3通信装置3の時計は相互に大きくずれていると考えられるので、前記時計120に前記時計20の現在時刻の推定値を書き込む制御を行うことが適切であると考えられる。具体的には前記時計120の時刻を(現在の時計120の時刻−tRX0+tTX0+K(Kは定数))に設定する。なおKは、現在の時計120の時刻をサンプリングし、以上の演算をして、時計120に値を設定するまでの処理時間を表す定数である。PLLを用いている場合、本条件ではPLLのパラメータの初期化を行うことが好ましい。   First, the tRX value corresponding to the found identifier is stored in the register tRX0. Further, the tTX value included in the received SF is stored in the register tTX0, and the previous value of the register tTX0 is moved to the register tTX1. Next, if the SF identifier is found in the buffer for the first time after initialization, it is considered that the clocks of the second communication device 2 and the third communication device 3 are greatly deviated from each other. It is considered appropriate to perform control to write the estimated value of the current time of the clock 20 at the same time. Specifically, the time of the clock 120 is set to (current time of the clock 120−tRX0 + tTX0 + K (K is a constant)). Note that K is a constant representing the processing time from sampling the current time of the clock 120, performing the above calculation, and setting a value in the clock 120. When a PLL is used, it is preferable to initialize the PLL parameters under these conditions.

また一旦同期が取れた後でも、第2通信装置2および第3通信装置3のうち少なくとも一つの装置が瞬間フレームを長時間にわたって受信できなかった場合か、第3通信装置3が長時間にわたって同期フレームを受信できなかった場合には、上と同様の処理を行って時計120に対して時計20の現在時刻の推定値を一挙に書き込む制御を行うことが望ましいと考えられる。上記の判定は例えばABS(tTX0―tRX0)>THとして行うことができる。ただしABSは絶対値を表している。   In addition, even after the synchronization is established once, at least one of the second communication device 2 and the third communication device 3 cannot receive the instantaneous frame for a long time, or the third communication device 3 is synchronized for a long time. If the frame cannot be received, it may be desirable to perform control similar to the above to write the estimated value of the current time of the clock 20 to the clock 120 at once. The above determination can be made, for example, as ABS (tTX0-tRX0)> TH. However, ABS represents an absolute value.

なお、THはSFを受信した際、時計20と時計120との同期が取れているかどうかを確認するための閾値である。本閾値の値を決定する際の指針を以下に示す。   TH is a threshold value for confirming whether the clock 20 and the clock 120 are synchronized when SF is received. Guidelines for determining this threshold value are as follows.

まずTFが伝送されるたびに、時計20と時計120の時刻がほぼ同時にtTXとtRXとしてサンプリングされるが、tTXとtRXは完全に同じ値ではない。その理由としては、時計20と時計120とがもともと完全に同期して同じ時刻を示していないことと、伝搬路で生じるマルチパス現象や各局間の伝送距離に依存してTFの伝送時間に差が生じるということが挙げられる(電波は1nsに約30cm移動する)。よって、時計20と時計120とがある範囲内で同期が取れている場合、同じTFに対してサンプリングされたtTXとtRXとの差分絶対値もある誤差内に収まると考えられる。例えば時計20と時計120とが100nsの範囲で同期している場合、余裕を持ってTHを1μs程度に設定しても良い。この場合、(tTX−tRX)の差分絶対値がTH以下である場合にtTXとtRXは同じTFによってサンプリングされたと判断することができる。   First, every time TF is transmitted, the time of the clock 20 and the clock 120 is sampled as tTX and tRX almost simultaneously, but tTX and tRX are not completely the same value. The reason for this is that the clock 20 and the clock 120 are not completely synchronized to indicate the same time, and the transmission time of the TF differs depending on the multipath phenomenon occurring in the propagation path and the transmission distance between the stations. (The radio wave moves about 30 cm in 1 ns). Therefore, when the clock 20 and the clock 120 are synchronized within a certain range, it is considered that the absolute value of the difference between tTX and tRX sampled for the same TF also falls within a certain error. For example, when the clock 20 and the clock 120 are synchronized within a range of 100 ns, TH may be set to about 1 μs with a margin. In this case, if the difference absolute value of (tTX−tRX) is equal to or less than TH, it can be determined that tTX and tRX are sampled by the same TF.

一旦同期が取れてしまった後は時計20と時計120とは充分近い値になっていると考えられる。この状態では時計20の現在時刻の推定値を時計120に書き込むよりは、tTX0とtRX0との情報から時計120の進む速度を微調整するという方針で時計の合わせ込みを行うことが望ましい。この方が個々のサンプル時刻の揺らぎが平滑化され、より滑らかな時計の合わせこみを行うことができる。   Once synchronization is established, the clock 20 and the clock 120 are considered to be sufficiently close to each other. In this state, it is desirable to adjust the clock according to the policy of finely adjusting the speed of advance of the clock 120 from the information of tTX0 and tRX0, rather than writing the estimated value of the current time of the clock 20 to the clock 120. In this way, fluctuations in individual sample times are smoothed, and a smoother clock adjustment can be performed.

なお、第1〜第3通信装置1・2・3の通信手段は例えばIEEE802.11系であり、第1通信装置1はAPであり、TFはビーコンフレームであった場合、ビーコンフレームに含まれるTSFタイマーのタイムスタンプあるいはシーケンス番号を識別子としても良い。   Note that the communication means of the first to third communication devices 1, 2, and 3 is, for example, an IEEE 802.11 system, the first communication device 1 is an AP, and TF is a beacon frame, it is included in the beacon frame. The time stamp or sequence number of the TSF timer may be used as the identifier.

(実施の形態2)
本発明の別の実施形態に関して以下に説明する。本実施形態は、実施の形態1で用いたような識別子を用いないで同期を行う場合である。この場合、識別子を使っていないため、第3通信装置3では、バッファに格納されているデータから受信した同期フレームに含まれるtTXに対応するtRXを探す必要がある。その方法は以下の通りである。
(Embodiment 2)
Another embodiment of the present invention is described below. This embodiment is a case where synchronization is performed without using an identifier as used in the first embodiment. In this case, since the identifier is not used, the third communication device 3 needs to search for tRX corresponding to tTX included in the synchronization frame received from the data stored in the buffer. The method is as follows.

調整部160は以下の同期済みフラグ(Sync)、tTX0,tTX1,tRX0、tRX1とtRX2のレジスタを含む。Syncは時計120の同期が取れているかどうかを表すレジスタであり、時計20の時刻と時計120の時刻との差分絶対値がある誤差内に収まっていることを意味する。tTX0は受信したSFに含まれるtTX値を保持するレジスタである。tTX1は前回受信したSFに含まれていたtTX値を保持するレジスタである。tRX0は受信したSFに含まれるtTX値に対応するtRX値を保持するレジスタである。tRX1は前回受信したSFに含まれるtTX値に対応するtRXを保持するレジスタである。時計の調整を行う調整部160のアルゴリズムを図4に示す。なお、TFの処理は図4のチャートには示していないが、TFを受信した瞬間に時計120がサンプリングされて、そのサンプル結果のtRXの値が調整部160に渡され、調整部160はtRXの値をバッファ内に格納する。   The adjustment unit 160 includes the following registers for synchronized flag (Sync), tTX0, tTX1, tRX0, tRX1 and tRX2. Sync is a register indicating whether or not the clock 120 is synchronized, and means that the absolute difference between the time of the clock 20 and the time of the clock 120 is within a certain error. tTX0 is a register that holds a tTX value included in the received SF. tTX1 is a register that holds the tTX value included in the SF received last time. tRX0 is a register that holds a tRX value corresponding to the tTX value included in the received SF. tRX1 is a register that holds tRX corresponding to the tTX value included in the previously received SF. FIG. 4 shows an algorithm of the adjustment unit 160 that adjusts the clock. Although the processing of TF is not shown in the chart of FIG. 4, the timepiece 120 is sampled at the moment of receiving TF, and the value of tRX of the sample result is passed to the adjustment unit 160, and the adjustment unit 160 The value of is stored in the buffer.

まず、リセット(S10)後、最初にS20に移行する。S20ではSyncは偽に設定される。次にS30でSFが受信されるのを待つ。SFが受信されると、S40に遷移し、S40ではSFに含まれるtTXをtTX0に格納する。   First, after reset (S10), the process proceeds to S20 first. In S20, Sync is set to false. Next, it waits for SF to be received in S30. When the SF is received, the process proceeds to S40. In S40, tTX included in the SF is stored in tTX0.

次に調整部160のバッファに格納されている全tRX値に対してtTX0との差分絶対値が最も小さいものを選択してレジスタtRX0に格納する。次にS50に移行し、ここでtTX0とtRX0の差分の絶対値がTH(THは定数)以下であるかどうかの確認を行う。これが真であれば時計は同期が取れている状態を示し、S90に遷移する。偽であれば時計の同期が取れていない、あるいはtTX0とtRX0とが同一SFに対応したサンプル値になっていないことを意味し、この場合にはS60に遷移する。実際に同期が外れているかどうかはSyncの値を確かめることで確認できる(S60)。   Next, the one having the smallest absolute difference from tTX0 is selected from all the tRX values stored in the buffer of adjustment unit 160 and stored in register tRX0. Next, the process proceeds to S50, where it is confirmed whether or not the absolute value of the difference between tTX0 and tRX0 is less than TH (TH is a constant). If this is true, the clock indicates a synchronized state, and the process proceeds to S90. If it is false, it means that the clocks are not synchronized, or tTX0 and tRX0 are not sample values corresponding to the same SF, and in this case, the process proceeds to S60. Whether or not synchronization is actually lost can be confirmed by checking the value of Sync (S60).

Syncが偽であれば、時計の同期が外れている状況を示し、S70に遷移する。もしSyncが真であれば、時計の同期は取れていることを意味し、S120に遷移する。S70では時計120の時刻を(現在の時計120の時刻−tRX0+tTX0+K)に設定し、S20に戻る。S90では同期が取れている状態であり、まず、Syncを真に設定し、tTX0とtRX0とを元に時計120の進む速度を微調整してS100に遷移する。S100ではtRX1をtRX0に設定し、S110に移行してtTX1をtTX0に設定し、S30に戻って次のSFを待つ。S120では((tTX0−tRX1)>TH1))OR((tTX0−tTX1)>TH1))の比較を行う。ただしTH1はTFが送信される間隔と比較して充分に長い時間を示す。   If Sync is false, it indicates that the clock is out of synchronization, and the process proceeds to S70. If Sync is true, it means that the clock is synchronized, and the process proceeds to S120. In S70, the time of the clock 120 is set to (current time of the clock 120−tRX0 + tTX0 + K), and the process returns to S20. In S90, the state is synchronized. First, Sync is set to true, and the speed at which the timepiece 120 advances is finely adjusted based on tTX0 and tRX0, and the process proceeds to S100. In S100, tRX1 is set to tRX0, the process proceeds to S110, tTX1 is set to tTX0, and the process returns to S30 to wait for the next SF. In S120, ((tTX0-tRX1)> TH1)) OR ((tTX0-tTX1)> TH1)) is compared. However, TH1 indicates a sufficiently long time compared to the interval at which TF is transmitted.

前者の不等式が成立するのは第3通信装置3で長時間TFが受信できなかった場合を示しており、後者の不等式が成立するのは第2通信装置2で長時間TFが受信できなかった場合を示す。したがってこのいずれかが成立すれば時計20と時計120との同期が外れている可能性が高いことを示している。   The former inequality holds when the third communication device 3 cannot receive the TF for a long time, and the latter inequality holds when the second communication device 2 cannot receive the TF for a long time. Show the case. Therefore, if either of these holds, it indicates that there is a high possibility that the clock 20 and the clock 120 are out of synchronization.

これが偽であれば、時計はまだ同期が取れている可能性が高いことを意味し、S110でtTX1=tTX0にし、S30に戻って次のSFを待つ。真であれば、時計の同期が外れてしまったことを意味し、S70に遷移する。   If this is false, it means that there is a high possibility that the clock is still synchronized. In S110, tTX1 = tTX0 is set, and the flow returns to S30 to wait for the next SF. If true, it means that the clock is out of synchronization, and the process proceeds to S70.

次に、本実施形態の処理を行った場合の事例を示す。なお、これらの事例ではTH1=1050,TH2=10、K=0、バッファのn=3とする。   Next, a case where the processing of this embodiment is performed will be shown. In these cases, TH1 = 1050, TH2 = 10, K = 0, and buffer n = 3.

図5に初期状態から順調に同期が取れる場合を示す。まず、リセット後、時計20と時計120との同期が取れていない状態(Sync=偽)である。最初にTF1が伝送されると、第2通信装置2でtTXは1000とサンプリングされ、第3通信装置3ではtRXは6500とサンプリングされてバッファに格納される。次にSF1は第2通信装置2から第3通信装置3に伝送され、第3通信装置3はSF1を元に図4の時計の調整の処理を行い詳細は以下である。   FIG. 5 shows a case where the synchronization can be smoothly achieved from the initial state. First, after reset, the timepiece 20 and the timepiece 120 are not synchronized (Sync = false). When TF1 is transmitted for the first time, tTX is sampled as 1000 in the second communication device 2, and tRX is sampled as 6500 in the third communication device 3 and stored in the buffer. Next, SF1 is transmitted from the second communication device 2 to the third communication device 3, and the third communication device 3 performs the process of adjusting the timepiece of FIG. 4 based on SF1, and the details are as follows.

S40ではtTX0=1000、tRX0=6500になる。次にTH2=10のため、S50は偽になる。次にS60からS70に行き、S70ではtRX2=6560になり、S80で時計120の時刻は(6560−6500+1000+0)=1060に設定される。この時点で時計20は1059を表しているため、同期が取れたことになる。   In S40, tTX0 = 1000 and tRX0 = 6500. Next, since TH2 = 10, S50 becomes false. Next, the process goes from S60 to S70. In S70, tRX2 = 6560, and in S80, the time of the clock 120 is set to (6560-6500 + 1000 + 0) = 1060. At this time, the clock 20 indicates 1059, and thus synchronization is achieved.

次にTF2が伝送され、tTXは1100、tRXは1101とサンプリングされる。SF2が伝送された後、第3通信装置3は時計の調整の処理を始め、まずS40でtTX0=1100、tRX0=1101と設定され、S50は真になりS90に移行する。S90ではSync=真に設定され、同期が取れている状態を示す。また、tTX0とtRX0とを元に、時計120の進む速度の調整が行われる。最後にS100でtRX1は1101に設定され、S110でtTX1は1100に設定され、S30に戻る。   Next, TF2 is transmitted, and tTX is sampled as 1100 and tRX as 1101. After SF2 is transmitted, the third communication apparatus 3 starts the time adjustment process. First, tTX0 = 1100 and tRX0 = 1101 are set in S40, S50 becomes true, and the process proceeds to S90. In S90, Sync = true is set, indicating a synchronized state. Further, the speed at which the timepiece 120 advances is adjusted based on tTX0 and tRX0. Finally, tRX1 is set to 1101 in S100, tTX1 is set to 1100 in S110, and the process returns to S30.

図6に初期状態から最初のTFが第2通信装置2で失敗になった場合の事例を示す。まず、リセット後、時計20と時計120との同期が取れていない状態(Sync=偽)である。最初にTF1が伝送されると、第2通信装置2でtTXは1000とサンプリングされ、第3通信装置3はTF1を受信できないため、何もしない。次にSF1は第2通信装置2から第3通信装置3に伝送され、第3通信装置3はSF1を元に図4の時計の調整の処理を行い詳細は以下である。   FIG. 6 shows a case where the first TF from the initial state fails in the second communication device 2. First, after reset, the timepiece 20 and the timepiece 120 are not synchronized (Sync = false). When TF1 is transmitted for the first time, tTX is sampled as 1000 in the second communication device 2, and the third communication device 3 does not receive TF1, and therefore does nothing. Next, SF1 is transmitted from the second communication device 2 to the third communication device 3, and the third communication device 3 performs the process of adjusting the timepiece of FIG. 4 based on SF1, and the details are as follows.

S40ではtTX0=1000、tRX0=未定値になる。次に、TH2=10のため、S50は偽になる。次にS60からS70に行き、S70ではtRX2=6560になり、S80で時計120の時刻は(6560−未定値+1000+0)=未定値に設定され、時計120はまだ同期が取れていない状態である。次にTF2が伝送され、tTXは1100、tRXはXX(未定値)とサンプリングされる。SF2が伝送された後、第3通信装置3は時計の調整の処理を始め、まずS40でtTX0=1100、tRX0=XXになる。次にTH2=10のため、S50は偽になる。次にS60からS70に行き、S70ではtRX2=XX+79になり、S80で時計120の時刻は(XX+79−XX+1100+0)=1079に設定される。この時点で時計20は1080を表しているため、同期が取れたことになる。次のTF3とSF3は順調に伝送され、図5の説明と同様になり、SF3に対する時計の調整の処理でSyncは真に設定さ、同期が取れている状態を表す。   In S40, tTX0 = 1000 and tRX0 = undecided value. Next, since TH2 = 10, S50 becomes false. Next, the process goes from S60 to S70. In S70, tRX2 = 6560, and in S80, the time of the clock 120 is set to (6560−undecided value + 1000 + 0) = undecided value, and the clock 120 is not yet synchronized. Next, TF2 is transmitted, and tTX is sampled as 1100, and tRX is sampled as XX (undecided value). After SF2 is transmitted, the third communication apparatus 3 starts the time adjustment process. First, in S40, tTX0 = 1100 and tRX0 = XX. Next, since TH2 = 10, S50 becomes false. Next, the process goes from S60 to S70. In S70, tRX2 = XX + 79, and in S80, the time of the clock 120 is set to (XX + 79−XX + 1100 + 0) = 1079. At this time, the clock 20 indicates 1080, and thus synchronization is achieved. The next TF3 and SF3 are transmitted smoothly and are the same as described with reference to FIG. 5, and Sync is set to true in the process of adjusting the clock with respect to SF3 and represents a synchronized state.

図7に初期状態から最初のTFが第3通信装置3で失われ、次のTFが第3通信装置3で失われる事例を示す。まず、リセット後、時計20と時計120との同期が取れていない状態(Sync=偽)である。最初にTF1が伝送されると、第2通信装置2ではTF1は失敗になり第2通信装置2はTF1の処理をしなく、第3通信装置3ではtRXは6500とサンプリングされてバッファに格納される。次にTF2が伝送され、第2通信装置2でtTXは1100とサンプリングされ、第3通信装置3はTF2を受信できないため、何もしない。次にSF2は第2通信装置2から第3通信装置3に伝送され、第3通信装置3はSF2を元に図4の時計の調整の処理を行い詳細は以下である。   FIG. 7 shows a case where the first TF is lost in the third communication device 3 and the next TF is lost in the third communication device 3 from the initial state. First, after reset, the timepiece 20 and the timepiece 120 are not synchronized (Sync = false). When TF1 is transmitted for the first time, TF1 fails in the second communication device 2, the second communication device 2 does not process TF1, and the third communication device 3 samples tRX as 6500 and stores it in the buffer. The Next, TF2 is transmitted, tTX is sampled as 1100 in the second communication apparatus 2, and the third communication apparatus 3 does not receive TF2, and therefore does nothing. Next, SF2 is transmitted from the second communication device 2 to the third communication device 3, and the third communication device 3 performs the time adjustment processing of FIG. 4 based on SF2, and details are as follows.

S40ではtTX0=1100、tRX0=6500になる。次に、TH2=10のため、S50は偽になる。次にS60からS70に行き、S70ではtRX2=6683になり、S80で時計120の時刻は(6683−6500+1100+0)=1283に設定され、時計120はまだ同期が取れていない状態である。次にTF3が伝送され、tTXは1200、tRXは1302とサンプリングされる。SF3が伝送された後、第3通信装置3は時計の調整の処理を始め、まずS40でtTX0=1200、tRX0=1302になる。次にTH2=10のため、S50は偽になる。次にS60からS70に行き、S70ではtRX2=1350になり、S80で時計120の時刻は(1350−1302+1200+0)=1248に設定される。この時点で時計20は1250を表しているため、同期が取れたことになる。次のTF4とSF4が順調に伝送された場合、図5の説明と同様になり、SF4に対する時計の調整の処理でSyncは真に設定さ、同期が取れている状態を表す。   In S40, tTX0 = 1100 and tRX0 = 6500. Next, since TH2 = 10, S50 becomes false. Next, the process goes from S60 to S70. In S70, tRX2 = 6683, and in S80, the time of the clock 120 is set to (6683-6500 + 1100 + 0) = 1283, and the clock 120 is not yet synchronized. Next, TF3 is transmitted, tTX is sampled as 1200, and tRX is sampled as 1302. After SF3 is transmitted, the third communication device 3 starts the time adjustment process. First, in S40, tTX0 = 1200 and tRX0 = 1302. Next, since TH2 = 10, S50 becomes false. Next, the process goes from S60 to S70. In S70, tRX2 = 1350 is set, and in S80, the time of the clock 120 is set to (1350-1302 + 1200 + 0) = 1248. At this time, the clock 20 indicates 1250, and thus synchronization is achieved. When the next TF4 and SF4 are transmitted smoothly, the description is the same as the description of FIG.

図8に時計120の同期が取れている状態(Sync=真)から、第2通信装置2でTFが受信できない状態の事例を示す。最初は同期が取れていて、TF1に対するTF1とSF1の伝送は問題なく伝送されるため、第3通信装置3ではSF1を受信した時、順調にS30、S40、S50、S90、S100、S110の順に処理を行う。次にTF2が伝送されると、第2通信装置2ではTF2は失敗になり第2通信装置2はTF2の処理をしなく、第3通信装置3ではtRXは1101とサンプリングされてバッファに格納される。次にTF3が伝送され、TF3とSF3は順調に伝送され、時計20と時計120との誤差はTH2に収まっているため、処理は順調に進む。よって、本事例では第2通信装置2がTF2を受信できなかったため、SF2に対する時計120の調整の処理が行われないが、一つだけのTFを失っても時計はずれは大きく変らなく、次のTF3で処理は順調に進む。   FIG. 8 shows a case where the second communication apparatus 2 cannot receive TF from the state where the clock 120 is synchronized (Sync = true). At first, synchronization is established, and transmission of TF1 and SF1 with respect to TF1 is transmitted without any problem. Therefore, when SF3 is received by the third communication device 3, in order of S30, S40, S50, S90, S100, and S110. Process. Next, when TF2 is transmitted, TF2 fails in the second communication device 2, the second communication device 2 does not process TF2, and in the third communication device 3, tRX is sampled as 1101 and stored in the buffer. The Next, TF3 is transmitted, and TF3 and SF3 are transmitted smoothly. Since the error between the clock 20 and the clock 120 is within TH2, the process proceeds smoothly. Therefore, in this case, since the second communication device 2 could not receive TF2, the adjustment processing of the clock 120 with respect to SF2 is not performed. However, even if only one TF is lost, the clock deviation does not change greatly, and Processing proceeds smoothly at TF3.

図9に時計120の同期が取れている状態(Sync=真)から、第3通信装置3でTFが受信できない状態の事例を示す。最初は同期が取れていて、TF1に対するTF1とSF1の伝送も問題なく伝送されるため、第3通信装置3ではSF1を受信した時、順調にS30、S40、S50、S90、S100、S110の順に処理を行い、S100でtRX1は1000に設定さ、S110でtTX1は1000に設定される。次にTF2が伝送され、第2通信装置2でtTX0は1100とサンプリングされ、第3通信装置3はTF2を受信できないため、何もしない。次にSF2は第2通信装置2から第3通信装置3に伝送され、第3通信装置3はSF2を元に図4の時計の調整の処理を行い詳細は以下である。   FIG. 9 shows a case where the third communication device 3 cannot receive TF from the state where the clock 120 is synchronized (Sync = true). At first, synchronization is established, and the transmission of TF1 and SF1 to TF1 is also transmitted without any problem. Therefore, when SF3 is received by the third communication device 3, the order of S30, S40, S50, S90, S100, and S110 is smoothly performed. In step S100, tRX1 is set to 1000, and in step S110, tTX1 is set to 1000. Next, TF2 is transmitted, tTX0 is sampled as 1100 in the second communication device 2, and the third communication device 3 does not receive TF2, and therefore does nothing. Next, SF2 is transmitted from the second communication device 2 to the third communication device 3, and the third communication device 3 performs the time adjustment processing of FIG. 4 based on SF2, and details are as follows.

S40ではtTX0=1100、tRX0=1000になる。次に、TH2=10であり、1100−1000=100のため、S50は偽になる。次にS60からS120に行き、S120ではtTX0=1100、tRX1=1000、tTX1=1000、TH1=1050のため、S120は真になって、S110でtTX1=1100に設定してS30に戻る。次にTF3が伝送され、TF3とSF3は順調に伝送され、時計20と時計120の誤差はTH2に収まっているため、処理は順調に進む。よって、本事例では第3通信装置3がTF2を受信できなかったため、SF2に対する時計120の時計の調整は行われないが、一つだけのTFを失っても時計はずれは大きく変らなく、次のTF3で処理は順調に進む。   In S40, tTX0 = 1100 and tRX0 = 1000. Next, since TH2 = 10 and 1100−1000 = 100, S50 becomes false. Next, the process goes from S60 to S120. In S120, since tTX0 = 1100, tRX1 = 1000, tTX1 = 1000, and TH1 = 1050, S120 becomes true, and in S110, tTX1 = 1100 is set and the process returns to S30. Next, TF3 is transmitted, and TF3 and SF3 are transmitted smoothly. Since the error between the clock 20 and the clock 120 is within TH2, the process proceeds smoothly. Therefore, in this example, since the third communication device 3 could not receive TF2, adjustment of the clock of the clock 120 with respect to SF2 is not performed, but even if only one TF is lost, the clock deviation does not change greatly, and Processing proceeds smoothly at TF3.

図10に時計120の同期が取れている状態(Sync=真)から、第3通信装置3でTFが連続的に長い間受信できない状態の事例を示す。TF1およびTF2の処理は図9の事例と同様であり、SF1の時計の調整の処理の最後にtRX1は1000に設定される。TF2以降、TFは長い間第3通信装置3で受信できず、SFに対する処理はSF2からSF11までは、tTX0とtRX1との差分はTH1=1000より小さいため、時計の調整の処理はSF2と同じ処理になる。TF12の処理では、tTX0は約2100になり、tRX1は1000のため、この差分はTH1=1050より大きくなり、状態はS120からS70に進み、最後はS20でSync=偽、つまり同期が取れていない状況になる。この状況はTFとSFが順調に伝送できるようになるT23まで続き、TF23以降の処理は図6と同じ処理になる。   FIG. 10 shows an example of a state in which the third communication device 3 cannot receive TF continuously for a long time from a state where the clock 120 is synchronized (Sync = true). The processing of TF1 and TF2 is the same as the case of FIG. 9, and tRX1 is set to 1000 at the end of the processing of adjusting the timepiece of SF1. After TF2, the TF cannot be received by the third communication apparatus 3 for a long time. Since the process for SF is from SF2 to SF11, the difference between tTX0 and tRX1 is smaller than TH1 = 1000. Therefore, the clock adjustment process is the same as SF2. It becomes processing. In the processing of TF12, tTX0 is about 2100 and tRX1 is 1000, so this difference is larger than TH1 = 1050, the state proceeds from S120 to S70, and finally S20 is Sync = false, that is, no synchronization is achieved. It becomes a situation. This situation continues until T23 when TF and SF can be transmitted smoothly, and the processing after TF23 is the same as that in FIG.

図11に時計120の同期が取れている状態(Sync=真)から、第2通信装置2でTFが連続的に長い間受信できない状態の事例を示す。TF1およびTF2の処理は図8の事例と同様である。最初は同期が取れていて、TF1に対するTF1とSF1の伝送も問題なく伝送されるため、第3通信装置3ではSF1を受信した時、順調にS30、S40、S50、S90、S100、S110の順に処理を行い、S110でtTX1は1000に設定される。TF2からTF82までは、第2通信装置2でTFが受信できない状態が続き、SFも伝送されなく第3通信装置3は時計120の時刻をサンプリングしてバッファを更新するが、時計120の調整は行わない。TF83の伝送でTFが第2通信装置2と2で受信できるようになり第2通信装置2でtTXは9200とサンプリングされ、第3通信装置3ではtRXは9230とサンプリングされてバッファに格納される。TF2からTF82まで時計120の調整が行われなかったため、時計20と時計120の違いは9230−9200=30>TH2(10)になっていて、同期がはずれている状態である。次にSF83は第2通信装置2から第3通信装置3に伝送され、第3通信装置3はSF83を元に図4の時計の調整の処理を行い詳細は以下である。   FIG. 11 shows a case where the second communication device 2 cannot receive TF continuously for a long time from the state where the clock 120 is synchronized (Sync = true). The processing of TF1 and TF2 is the same as the case of FIG. At first, synchronization is established, and the transmission of TF1 and SF1 to TF1 is also transmitted without any problem. Therefore, when SF3 is received by the third communication device 3, the order of S30, S40, S50, S90, S100, and S110 is smoothly performed. Processing is performed, and tTX1 is set to 1000 in S110. From TF2 to TF82, the state where TF cannot be received by the second communication device 2 continues, and SF is not transmitted, and the third communication device 3 updates the buffer by sampling the time of the clock 120. Not performed. With the transmission of TF83, the TF can be received by the second communication devices 2 and 2, and the second communication device 2 samples tTX as 9200, and the third communication device 3 samples tRX as 9230 and stores it in the buffer. . Since the timepiece 120 is not adjusted from TF2 to TF82, the difference between the timepiece 20 and the timepiece 120 is 9230-9200 = 30> TH2 (10), and the state is out of synchronization. Next, SF 83 is transmitted from the second communication device 2 to the third communication device 3, and the third communication device 3 performs the time adjustment processing of FIG. 4 based on the SF 83, and details are as follows.

S40ではtTX0=9200、tRX0=9230になる。次にTH2=10のため、S50は偽になる。次にS60からS110に行き、tTX0−tTX1=9200−1000=8000>TH1(1000)のため、S70に遷移する。S70とS80で時計120は9251に設定され、S20でSync=偽になる。次のTF94とSF94が順調に伝送された場合、Sync=真になり、同期が取れた状態に戻る。   In S40, tTX0 = 9200 and tRX0 = 9230. Next, since TH2 = 10, S50 becomes false. Next, the process goes from S60 to S110 and transitions to S70 because tTX0-tTX1 = 9200-1000 = 8000> TH1 (1000). The watch 120 is set to 9251 in S70 and S80, and Sync = false in S20. When the next TF 94 and SF 94 are transmitted smoothly, Sync = true, and the state returns to the synchronized state.

以上のように、本実施形態に係る通信装置は、第1の通信装置であって、通信手段と、時計1と、前記時計1をサンプリングするサンプリング手段とを備え、前記通信手段は送達確認を伴わない特定のフレーム(瞬間フレーム)を送信または受信した瞬間を前記サンプリング手段に知らせ、前記サンプリング手段は前記瞬間に前記時計1の時刻をtTXとしてサンプリングし、前記通信手段は前記tTXを含む同期フレームを作成して送達確認を伴う手法で第2の通信装置に伝送する構成としてもよい。なお、瞬間フレームは、送達確認を伴う形式であってもよいし、ブロードキャストまたはユニキャストフレームであっても良い。また、同期フレームは、送達確認を伴わない形式であってもよいし、同期送達確認を伴うユニキャストフレームであっても良い。   As described above, the communication device according to the present embodiment is the first communication device, and includes the communication unit, the timepiece 1, and the sampling unit that samples the timepiece 1, and the communication unit performs delivery confirmation. The sampling means is notified of the moment when a specific frame (instantaneous frame) is transmitted or received, and the sampling means samples the time of the clock 1 as tTX at the instant, and the communication means includes a synchronization frame including the tTX. It is good also as a structure which transmits and transmits to a 2nd communication apparatus by the method with delivery confirmation. The instantaneous frame may be in a form accompanied with delivery confirmation, or may be a broadcast or unicast frame. Further, the synchronization frame may be in a format that does not accompany delivery confirmation, or may be a unicast frame that accompanies synchronization delivery confirmation.

また、本実施形態に係る通信装置は、第2の通信装置であって、通信手段と、時計2と、前記時計2をサンプリングするサンプリング手段と、前記時計2を調整する調整手段とを備え、前記通信手段は前記瞬間フレームを送信または受信した瞬間を前記サンプリング手段に知らせ、前記サンプリング手段は前記瞬間に前記時計2の時刻をtRXとしてサンプリングして前記調整手段に渡し、前記通信手段は前記同期フレームを第1の通信装置から受信して前記同期フレームから少なくとも前記tTXを取り出して前記調整手段に渡し、前記調整手段は前記通信手段より少なくとも前記tTXを受けると、時計1に自局の時計2を合わせる操作をする構成としてもよい。   The communication apparatus according to the present embodiment is a second communication apparatus, and includes a communication unit, a timepiece 2, a sampling unit that samples the timepiece 2, and an adjustment unit that adjusts the timepiece 2. The communication means informs the sampling means of the moment when the instantaneous frame is transmitted or received, the sampling means samples the time of the clock 2 as tRX at the instant and passes it to the adjustment means, and the communication means A frame is received from the first communication device, and at least the tTX is extracted from the synchronization frame and transferred to the adjusting means. When the adjusting means receives at least the tTX from the communication means, the timepiece 1 receives its own clock 2 It is good also as a structure which performs operation which matches.

上記の第1と第2の通信装置の構成によれば、本発明は瞬間フレームを第1と第2の通信装置の時計をほぼ同時にサンプリングするための基準時点とし、瞬間フレームではない別のフレーム(同期フレーム)を使って第1の通信装置がサンプリングした時計1のtTXを第1の通信装置から第2の通信装置に伝送する。   According to the configuration of the first and second communication devices described above, the present invention uses the instantaneous frame as a reference time point for sampling the clocks of the first and second communication devices almost simultaneously, and another frame that is not the instantaneous frame. The tTX of the clock 1 sampled by the first communication device using (synchronization frame) is transmitted from the first communication device to the second communication device.

一方、特許文献1では同期用のマルチキャストフレームが以上の二つの役割、つまり時計をほぼ同時にサンプリングするための基準時点と、サンプリングした時計の時刻を伝送することである。特許文献1では同期用のマルチキャストフレームを失った場合、二回連続に時計の調整を行うことができなくなるが、上記の構成によれば、瞬間フレームを失った場合でも、第2の通信装置の時計の調整は一回行われないだけで済む。よって、図16のように、本発明により特許文献1よりも高い同期精度を得ることが可能である。なお、本発明で用いる同期フレームは送達確認を行う手法で伝送を行うため、無線LAN層レベルで再送を行うことが可能である。したがって同期フレームを失う確率は、瞬間フレームを失う確率と比較して無視できるほど小さいとみなすことができる。   On the other hand, in Patent Document 1, the multicast frame for synchronization transmits the above two roles, that is, the reference time point for sampling the clock almost simultaneously and the time of the sampled clock. In Patent Document 1, when the synchronization multicast frame is lost, the clock cannot be adjusted twice in succession. However, according to the above configuration, even if the instantaneous frame is lost, the second communication device The clock need not be adjusted once. Therefore, as shown in FIG. 16, it is possible to obtain a higher synchronization accuracy than that of Patent Document 1 according to the present invention. Since the synchronization frame used in the present invention is transmitted by a method of confirming delivery, it can be retransmitted at the wireless LAN layer level. Therefore, the probability of losing a synchronization frame can be considered to be negligibly small compared to the probability of losing an instantaneous frame.

また、第2の通信装置であって、前記調整手段は前記時計2の時刻を設定する、または時計が進む速度を調整する処理を含む構成としてもよい。   Further, in the second communication device, the adjustment unit may include a process of setting a time of the timepiece 2 or adjusting a speed at which the timepiece is advanced.

上記の構成によれば、前記時計2と前記時計1の同期が外れている場合には前記時計1の現在時刻の推定値を前記時計2に対して直接書き込むことで、前記時計2の時刻を前記時計1の時刻に素早く近づけることができる。また、前記時計2と前記時計1の時刻が同期している場合には、前記時計2の時計が進む速度を微調整して同期を保つことができる。   According to the above configuration, when the timepiece 2 and the timepiece 1 are out of synchronization, an estimated value of the current time of the timepiece 1 is directly written into the timepiece 2 to thereby set the time of the timepiece 2. The time of the timepiece 1 can be quickly approached. When the time of the timepiece 2 and the timepiece 1 is synchronized, the speed at which the timepiece of the timepiece 2 advances can be finely adjusted to keep the synchronization.

また、第1あるいは第2の通信装置であって、前記送信または受信した瞬間は例えばフレームの最初または最後のようにフレームの特定な部分を基準点とする構成としてもよい。   Further, the first or second communication device may be configured such that a specific part of the frame is used as a reference point at the moment of transmission or reception, for example, at the beginning or end of the frame.

上記の構成によれば、瞬間フレームの特定部分を基準点にすることにより、第1と第2の通信装置がそれぞれ時計1と時計2をサンプリングする瞬間をより一致させることができ、同期精度を向上させることができる。   According to the above configuration, by using a specific portion of the instantaneous frame as a reference point, the instants at which the first and second communication devices sample the clock 1 and the clock 2 can be made to coincide with each other, and synchronization accuracy can be improved. Can be improved.

また、第2の通信装置であって、前記調整手段にバッファを備え、前記バッファは送信または受信できた最新n個(n≧1の整数)までの前記瞬間フレームのデータを格納することができ、前記データには少なくとも前記tRXが含まれている構成としてもよい。   In the second communication device, the adjustment unit includes a buffer, and the buffer can store data of the latest n frames (n ≧ 1 integer) that can be transmitted or received. The data may include at least the tRX.

上記の構成によれば、バッファを用いることにより、送信または受信できた
最新n個(n≧1の整数)までの瞬間フレームの少なくともtRXを格納できる。例えば同期フレームの伝送に時間が掛かりすぎ、同期フレームの伝送が終わる前に次の瞬間フレームが伝送されてしまう場合がある。この場合、もしn=1であれば、瞬間フレームに対する前のtRXを消す、あるいは新しいtRXを記録しない選択肢があるが、いずれにしても一回時計の調整ができなくなる。n=2にしておけば、前のtRXと新しいtRXの両方を記録することができ、両方に対して時計の調整ができる。よって、nを同期フレームの最大の遅延に設定することにより同期の精度を劣化させないことができる。
According to the above configuration, by using the buffer, at least tRX of the latest n frames (n ≧ 1 integer) that can be transmitted or received can be stored. For example, it may take too much time to transmit the synchronization frame, and the next instantaneous frame may be transmitted before the transmission of the synchronization frame is completed. In this case, if n = 1, there is an option to erase the previous tRX for the instantaneous frame or not record a new tRX, but in any case the clock cannot be adjusted once. If n = 2, both the previous tRX and the new tRX can be recorded and the clock can be adjusted for both. Therefore, the accuracy of synchronization can be prevented from deteriorating by setting n to the maximum delay of the synchronization frame.

また、第1の通信装置であって、前記第1の通信装置の前記通信手段が作成する前記同期フレームには同期フレームを識別する識別子が含まれ、前記識別子は前記同期フレームに含まれる前記tTXに対応する前記瞬間フレームから複写した構成としてもよい。   Further, in the first communication device, the synchronization frame created by the communication unit of the first communication device includes an identifier for identifying the synchronization frame, and the identifier is included in the tTX included in the synchronization frame. It is good also as a structure copied from the said instantaneous frame corresponding to.

また、第1の通信装置が伝送した同期フレームを受信する第2の通信装置であって、前記バッファに格納するデータには少なくとも前記tRXと前記tRXに対応する前記瞬間フレームに含まれる識別子のセットが含まれる構成としてもよい。   In addition, the second communication device receives a synchronization frame transmitted by the first communication device, and the data stored in the buffer includes at least the tRX and a set of identifiers included in the instantaneous frame corresponding to the tRX. May be included.

上記の構成によれば、識別子を用いることにより、例えば瞬間フレームあるいは同期フレームを失った場合、第2の通信装置では自局が過去に受信した瞬間フレームの識別子と同期フレームに含まれるtTXに対応する識別子を比較することにより、tTXとtRXが同じ同期フレームに対応したサンプリング結果であるかどうかを容易に確認することができる。   According to the above configuration, when the identifier is used, for example, when the instantaneous frame or the synchronization frame is lost, the second communication apparatus supports the identifier of the instantaneous frame received by the local station in the past and tTX included in the synchronization frame. It is possible to easily confirm whether or not tTX and tRX are sampling results corresponding to the same synchronization frame.

また、第2の通信装置であって、前記調整手段は受信した前記同期フレームの識別子と同じ識別子を前記バッファから探し、同じ識別子がバッファに存在する場合、この識別子に対応するtRXをtRX0とし、前回のtRX0をtRX1とし、受信した前記同期フレームのtTXをtTX0とし、前回のtTX0をtTX1として、(1)もし今回が初期化後に始めて前記同期フレームの識別子がバッファに見つかった場合、あるいは、ABS(tTX0―tRX0)>TH(ABSは絶対値)(THは定数)の場合、前記時計2の時刻を(現在の時計2の時刻―tRX0+tTX0+K(Kは定数))に設定するように前記パラメータを調整し、(2)もし(1)の条件が満たさない場合はtTX0とtRX0を元に前記パラメータを調整して前記時計2の進む速度を調整する構成としてもよい。   Further, in the second communication device, the adjustment unit searches the buffer for the same identifier as the identifier of the received synchronization frame, and when the same identifier exists in the buffer, tRX corresponding to the identifier is set to tRX0, The previous tRX0 is set to tRX1, the tTX of the received synchronization frame is set to tTX0, and the previous tTX0 is set to tTX1. If (tTX0−tRX0)> TH (ABS is an absolute value) (TH is a constant), the parameter is set so that the time of the clock 2 is set to (the current time of the clock 2−tRX0 + tTX0 + K (K is a constant)). (2) If the condition of (1) is not met, adjust the parameter based on tTX0 and tRX0. It may be configured to adjust the speed of travel of the clock 2 and.

上記の構成によれば、初期段階の時計の設定、同期フレームが長期的にわたって連続的に失われた場合、あるいは時計2が時計1とがずれ過ぎた場合、再び時計2の時刻を時計1の時刻に一挙に近づけることができる。   According to the above configuration, when the timepiece setting of the initial stage, the synchronization frame is lost continuously over a long period of time, or the timepiece 2 is too far from the timepiece 1, the time of the timepiece 2 is set again. You can get closer to the time.

また、第2の通信装置であって、前記調整手段は同期済みフラグを含む構成としてもよい。   Further, in the second communication device, the adjustment unit may include a synchronized flag.

また、第2の通信装置であって、リセット時に前記同期済みフラグは偽に初期化される構成としてもよい。   Further, the second communication device may be configured such that the synchronized flag is initialized to false at the time of resetting.

また、第2の通信装置であって、前記調整手段は受信した同期フレームに含まれる前記tTXに対して前記tTXと前記バッファに格納されている全tRXと差分絶対値が最も小さいtRXを選択し、選択したtRXをtRX0とし、前回のtRX0をtRX1とし、受信した前記同期フレームのtTXをtTX0とし、前回のtTX0をtTX1として、(1)もし前記差分絶対値がTH(THは定数)より小さいあるいは等しい場合、tTX0とtRX0を元に前記パラメータを調整して前記時計2の進む速度を調整してかつ前記同期済みフラグを真に設定し、(2)もし(1)の条件が満たされていないかつ前記同期済みフラグが偽である、あるいは(1)の条件が満たされていないかつ前記同期済みフラグが真であってかつABS(tTX0―tRX1)>TH1(ABSは絶対値)(TH1は定数)である、あるいは(1)の条件が満たされていないかつ前記同期済みフラグが真であってかつABS(tTX0―tTX1)>TH1である場合、前記時計2の時刻を(現在の時計2の時刻―tRX0+tTX0+K(Kは定数))に設定するように前記パラメータを調整してかつ前記同期済みフラグを偽に設定する構成としてもよい。   Further, in the second communication apparatus, the adjustment unit selects the tTX, the total tRX stored in the buffer, and the tRX having the smallest difference absolute value with respect to the tTX included in the received synchronization frame. If the selected tRX is tRX0, the previous tRX0 is tRX1, the tTX of the received synchronization frame is tTX0, and the previous tTX0 is tTX1, (1) If the difference absolute value is smaller than TH (TH is a constant) Alternatively, if they are equal, the parameter is adjusted based on tTX0 and tRX0 to adjust the speed of advance of the timepiece 2 and the synchronized flag is set to true. (2) If the condition of (1) is satisfied And the synchronized flag is false, or the condition (1) is not satisfied and the synchronized flag is true and ABS ( TX0-tRX1)> TH1 (ABS is an absolute value) (TH1 is a constant), or the condition (1) is not satisfied and the synchronized flag is true and ABS (tTX0-tTX1)> TH1 In this case, the parameter may be adjusted to set the time of the timepiece 2 to (the time of the current timepiece 2−tRX0 + tTX0 + K (K is a constant)), and the synchronized flag may be set to false. .

上記の構成では、識別子を用いていないため、LAN層は上位層に瞬間フレームを送信または受信したタイミングのみを知らせればよく、LAN層と上位層が別のチップの場合に相互でやりとりすべき情報の実装価格を安く抑えることができる。価格が安くなる原因は以下の通りである。識別子を用いた場合、識別子をLAN層から上位層に知らせる必要がある。通常のPCIインタフェースを用いて識別子を上位に知らせることは可能であるが、PCIインタフェースでは様々な遅延・ジッタが発生するため、高度な同期のためにPCIインタフェースを用いることはできない。このため、別途リアルタイム性があるインタフェースを準備する必要があり、上位層のチップと無線LANのチップは通常別のチップであるため、チップのピン数が増えたりボードの設計が複雑になったりする。なお、通常チップのピン数を増やすことは望ましくないことであり、できるだけ減らしてチップの価格を下げる努力が重要である。識別子を用いない方法の場合、LAN層チップと上位層チップの間の信号線として、例えば、瞬間フレームを送信または受信したタイミングにおいて一定時間だけ立ち上がる、あるいは電圧レベルが変化する、というような1本の信号線だけで必要な全ての情報のやりとりを達成することができる。   In the above configuration, since the identifier is not used, the LAN layer only needs to inform the upper layer of the timing at which the instantaneous frame is transmitted or received, and should be exchanged when the LAN layer and the upper layer are different chips. The information implementation price can be kept low. The reasons why the price is cheap are as follows. When the identifier is used, it is necessary to notify the identifier from the LAN layer to the upper layer. Although it is possible to notify the identifier to the host using a normal PCI interface, the PCI interface cannot be used for advanced synchronization because various delays and jitters occur in the PCI interface. For this reason, it is necessary to prepare a separate real-time interface. Since the upper layer chip and the wireless LAN chip are usually different chips, the number of pins of the chip increases and the board design becomes complicated. . Usually, it is not desirable to increase the number of pins of a chip, and it is important to make an effort to reduce the price of the chip by reducing it as much as possible. In the case of a method that does not use an identifier, for example, one signal line between the LAN layer chip and the upper layer chip that rises for a certain time at the timing of transmitting or receiving an instantaneous frame or the voltage level changes. All necessary information can be exchanged using only the signal line.

また、第2の通信装置であって、時計の調整のためにPLL(Phase Locked Loop)を用いる構成としてもよい。   Further, the second communication device may be configured to use a PLL (Phase Locked Loop) for clock adjustment.

上記の構成によれば、第2の通信装置にPLLを用いるため、より精度の高い同期を達成することができる。   According to said structure, since PLL is used for the 2nd communication apparatus, synchronization with higher precision can be achieved.

また、第1または第2の通信装置であって、前記通信手段は無線LAN(Local Area Network)またはPLC(Power Line Communication)に対応している構成としてもよい。   Further, in the first or second communication apparatus, the communication unit may be configured to support a wireless LAN (Local Area Network) or a PLC (Power Line Communication).

また、第1または第2の通信装置であって、通信装置が通信する前記瞬間フレームは無線LANのビーコンフレームである構成としてもよい。   Moreover, it is a 1st or 2nd communication apparatus, Comprising: The said instantaneous frame with which a communication apparatus communicates is good also as a structure which is a beacon frame of wireless LAN.

以上の構成によれば、無線LANあるいはPLCのネットワーク環境でも高い精度の同期を達成することができる。   According to the above configuration, high-accuracy synchronization can be achieved even in a wireless LAN or PLC network environment.

また、上記の構成によれば、伝送方式にIEEE802.11eを用いた場合でも直接同期フレームを第1の通信装置から第2の通信装置に伝送することができる。一方、特許文献3の同期方式をIEEE802.11eに用いてかつクロックマスターがAPでない場合、同期用のマルチキャストフレームを二回に分けて伝送する必要がある。よって、以上の条件では本発明の伝送方式はより少ない帯域を利用して同期を行うことができる。また、IEEE802.11eを用いる場合、本発明の瞬間フレームをビーコンフレームにすることができ、本発明と特許文献3の両方は定期的にビーコンフレーム伝送する必要があるため、本発明の瞬間フレーム(ビーコンフレーム)が利用する帯域は追加帯域にならない。   Further, according to the above configuration, the synchronization frame can be directly transmitted from the first communication device to the second communication device even when IEEE 802.11e is used as the transmission method. On the other hand, when the synchronization method of Patent Document 3 is used for IEEE802.11e and the clock master is not an AP, the multicast frame for synchronization needs to be transmitted in two steps. Therefore, under the above conditions, the transmission method of the present invention can perform synchronization using a smaller band. In addition, when using IEEE802.11e, the instantaneous frame of the present invention can be a beacon frame, and both the present invention and Patent Document 3 need to transmit beacon frames periodically. The band used by the beacon frame is not an additional band.

また、前記識別子を用いる第1または第2の通信装置であって、前記識別子はビーコンフレームに含まれるTSF(Timing Synchronization Function)タイマーのタイムスタンプあるいはシーケンス番号である構成としてもよい。   The identifier may be a first or second communication device that uses the identifier, and the identifier may be a time stamp or a sequence number of a TSF (Timing Synchronization Function) timer included in the beacon frame.

以上の構成によれば、識別子をビーコンフレームに含まれるTSFタイマーのタイムスタンプあるいはシーケンス番号にすることにより、新たなフレームを定義しないで規格化された既存の情報を識別子として利用することができる。   According to the above configuration, by using the identifier as the time stamp or sequence number of the TSF timer included in the beacon frame, it is possible to use the existing information standardized without defining a new frame as the identifier.

最後に、第2通信装置2および第3通信装置3の各ブロックは、ハードウェアロジックによって構成してもよいし、次のようにCPUを用いてソフトウェアによって実現してもよい。   Finally, each block of the second communication device 2 and the third communication device 3 may be configured by hardware logic, or may be realized by software using a CPU as follows.

すなわち、第2通信装置2および第3通信装置3は、各機能を実現する制御プログラムの命令を実行するCPU(central processing unit)、上記プログラムを格納したROM(read only memory)、上記プログラムを展開するRAM(random access memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の目的は、上述した機能を実現するソフトウェアである第2通信装置2および第3通信装置3の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記第2通信装置2および第3通信装置3に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。   That is, the second communication device 2 and the third communication device 3 expand a CPU (central processing unit) that executes instructions of a control program that realizes each function, a ROM (read only memory) that stores the program, and the program. A random access memory (RAM), and a storage device (recording medium) such as a memory for storing the program and various data. The object of the present invention is to read the program code (execution format program, intermediate code program, source program) of the control program of the second communication device 2 and the third communication device 3 which is software that realizes the above-described functions with a computer. The recording medium recorded as possible is supplied to the second communication device 2 and the third communication device 3, and the computer (or CPU or MPU) reads and executes the program code recorded on the recording medium. Achievable.

上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD/CD−R等の光ディスクを含むディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ系などを用いることができる。   Examples of the recording medium include a tape system such as a magnetic tape and a cassette tape, a magnetic disk such as a floppy (registered trademark) disk / hard disk, and an optical disk such as a CD-ROM / MO / MD / DVD / CD-R. Card system such as IC card, IC card (including memory card) / optical card, or semiconductor memory system such as mask ROM / EPROM / EEPROM / flash ROM.

また、第2通信装置2および第3通信装置3を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークとしては、特に限定されず、例えば、インターネット、イントラネット、エキストラネット、LAN、ISDN、VAN、CATV通信網、仮想専用網(virtual private network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、通信ネットワークを構成する伝送媒体としては、特に限定されず、例えば、IEEE1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL回線等の有線でも、IrDAやリモコンのような赤外線、Bluetooth(登録商標)、802.11無線、HDR、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。   The second communication device 2 and the third communication device 3 may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. The communication network is not particularly limited. For example, the Internet, intranet, extranet, LAN, ISDN, VAN, CATV communication network, virtual private network, telephone line network, mobile communication network, satellite communication. A net or the like is available. Further, the transmission medium constituting the communication network is not particularly limited. For example, even in the case of wired such as IEEE 1394, USB, power line carrier, cable TV line, telephone line, ADSL line, etc., infrared rays such as IrDA and remote control, Bluetooth ( (Registered trademark), 802.11 wireless, HDR, mobile phone network, satellite line, terrestrial digital network, and the like can also be used. The present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

本発明は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。   The present invention is not limited to the above-described embodiments, and various modifications can be made within the scope shown in the claims. That is, embodiments obtained by combining technical means appropriately changed within the scope of the claims are also included in the technical scope of the present invention.

時報送信ジッタを小さくできるため、小さなジッタが要求されるデータ通信を行う必要がある通信装置や、通信装置を備える端末装置等の様々な通信機器に適用できる。   Since the time signal transmission jitter can be reduced, the present invention can be applied to various communication devices such as a communication device that needs to perform data communication requiring a small jitter and a terminal device including the communication device.

本発明の一実施形態に係る通信システムの概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the communication system which concerns on one Embodiment of this invention. 上記通信システムにおける通信シーケンスを示す図である。It is a figure which shows the communication sequence in the said communication system. 同期フレームの伝送が終わる前に次の瞬間フレームが伝送されてしまう事例を示した図である。It is the figure which showed the example where the next instantaneous frame is transmitted before transmission of a synchronous frame is complete | finished. tTXとtRX情報を用いて識別子の情報を用いない場合に時計の同期を行うフローチャートである。It is a flowchart which synchronizes a clock, when not using the information of an identifier using tTX and tRX information. 初期状態から順調に時計の同期が行われる場合の通信シーケンスを示す図である。It is a figure which shows a communication sequence in case a timepiece is synchronized smoothly from an initial state. 初期状態から最初のTFが第2通信装置で失敗になった場合の通信シーケンスを示す図である。It is a figure which shows a communication sequence when the first TF from an initial state fails in a 2nd communication apparatus. 初期状態から最初のTFが第2通信装置で失敗され、次のTFが第3通信装置で失われる場合の通信シーケンスを示す図である。It is a figure which shows a communication sequence in case the first TF is failed by the 2nd communication apparatus from an initial state, and the next TF is lost by the 3rd communication apparatus. 時計の同期が取れている状態(Sync=真)から、第2通信装置でTFが受信できない場合の通信シーケンスを示す図である。It is a figure which shows a communication sequence when TF cannot be received in the 2nd communication apparatus from the state (Sync = true) where the clock is synchronized. 時計の同期が取れている状態(Sync=真)から、第3通信装置でTFが受信できない場合の通信シーケンスを示す図である。It is a figure which shows a communication sequence when TF cannot be received in the 3rd communication apparatus from the state (Sync = true) where the clock is synchronized. 時計の同期が取れている状態(Sync=真)から、第3通信装置でTFが連続的に長い間受信できない場合の通信シーケンスを示す図である。It is a figure which shows a communication sequence when TF cannot be continuously received for a long time by the 3rd communication apparatus from the state (Sync = true) in which the clock is taken. 時計の同期が取れている状態(Sync=真)から、第2通信装置でTFが連続的に長い間受信できない場合の通信シーケンスを示す図である。It is a figure which shows a communication sequence when TF cannot be continuously received for a long time by the 2nd communication apparatus from the state (Sync = true) in which the clock is synchronized. 通信装置を備えた端末装置からなる通信ネットワークを示した図である。It is the figure which showed the communication network which consists of a terminal device provided with the communication apparatus. 通信装置に含まれる時計の時刻の進み度合いと、標準時の進み度合いとの関係を示した図である。It is the figure which showed the relationship between the advance degree of the time of the clock contained in a communication apparatus, and the advance degree of standard time. 上記通信装置間で行われる、時刻情報の交換を示した図である。It is the figure which showed the exchange of time information performed between the said communication apparatuses. 従来技術に関するものであって、同期用のマルチキャストフレームを用いて同期を行う図である。It is a figure regarding a prior art, Comprising: It is a figure which synchronizes using the multicast frame for a synchronization. PLLの調整が順調に行われた場合、一回調整が行われなかった場合と二回連続で調整が行われなかった場合の時計のずれを示した図である。It is the figure which showed the shift | offset | difference of the clock when the adjustment of PLL is performed smoothly, the case where adjustment is not performed once, and the case where adjustment is not performed twice continuously.

符号の説明Explanation of symbols

1 第1通信装置
2 第2通信装置
3 第3通信装置
20 時計(時計手段)
30 TF認識部(送信側第1フレーム認識手段)
40 サンプラー(時刻検知手段)
50 フレーマ(第2フレーム送信手段)
120 時計(時計手段)
130 TF認識部(受信側第1フレーム認識手段)
140 サンプラー(時刻検知手段)
150 フレーマ(第2フレーム受信手段)
160 調整部(調整手段)
210 ネットワーク
DESCRIPTION OF SYMBOLS 1 1st communication apparatus 2 2nd communication apparatus 3 3rd communication apparatus 20 Clock (timepiece means)
30 TF recognition unit (transmission side first frame recognition means)
40 Sampler (time detection means)
50 framer (second frame transmission means)
120 Clock (clock means)
130 TF recognition unit (reception side first frame recognition means)
140 Sampler (time detection means)
150 framer (second frame receiving means)
160 Adjustment unit (adjustment means)
210 network

Claims (23)

複数の通信装置が通信ネットワークを介して通信接続されている通信システムを構成する通信装置であって、
時刻を示す時計手段と、
上記通信ネットワークにおいて複数の通信装置に対して送信された特定の第1フレームの受信、または、送信を検知する送信側第1フレーム認識手段と、
上記送信側第1フレーム認識手段によって、第1フレームの受信または送信が検知された時の第1フレーム検知時刻を上記時計手段が示す時刻に基づいて決定する時刻検知手段と、
上記第1フレーム検知時刻情報を含む第2フレームを、上記通信ネットワークを介して外部の通信装置に送信する第2フレーム送信手段とを備えることを特徴とする通信装置。
A communication device constituting a communication system in which a plurality of communication devices are connected for communication via a communication network,
Clock means for indicating time;
Receiving a specific first frame transmitted to a plurality of communication devices in the communication network, or transmitting first frame recognition means for detecting transmission;
A time detection means for determining a first frame detection time when reception or transmission of the first frame is detected by the transmission side first frame recognition means based on a time indicated by the clock means;
A communication apparatus comprising: a second frame transmission unit configured to transmit a second frame including the first frame detection time information to an external communication apparatus via the communication network.
上記第2フレームが、送達確認を必要とする状態で上記通信ネットワークを介して外部の通信装置に送信されることを特徴とする請求項1記載の通信装置。   The communication apparatus according to claim 1, wherein the second frame is transmitted to an external communication apparatus via the communication network in a state where delivery confirmation is required. 上記第1フレームが、上記通信ネットワークにおいて送達確認を必要としない状態で複数の通信装置に対して送信されたものであることを特徴とする請求項1または2記載の通信装置。   3. The communication apparatus according to claim 1, wherein the first frame is transmitted to a plurality of communication apparatuses in a state where delivery confirmation is not required in the communication network. 複数の通信装置が通信ネットワークを介して通信接続されている通信システムを構成する通信装置であって、
時刻を示す時計手段と、
上記通信ネットワークにおいて複数の通信装置に対して送信された特定の第1フレームの受信、または、送信を検知する受信側第1フレーム認識手段と、
上記受信側第1フレーム認識手段によって、第1フレームの受信または送信が検知された時の第1フレーム検知時刻を上記時計手段が示す時刻に基づいて決定する時刻検知手段と、
請求項1記載の通信装置から、上記第2フレームを、上記通信ネットワークを介して受信する第2フレーム受信手段と、
上記第2フレームに含まれている第1フレーム検知時刻情報と、上記受信側第1フレーム認識手段によって検知された第1フレーム検知時刻とに基づいて、上記時計手段の時刻を調整する調整手段とを備えることを特徴とする通信装置。
A communication device constituting a communication system in which a plurality of communication devices are connected for communication via a communication network,
Clock means for indicating time;
Receiving a specific first frame transmitted to a plurality of communication devices in the communication network, or receiving side first frame recognition means for detecting transmission;
Time detection means for determining a first frame detection time when reception or transmission of the first frame is detected by the reception side first frame recognition means based on a time indicated by the clock means;
A second frame receiving means for receiving the second frame from the communication device according to claim 1 via the communication network;
Adjusting means for adjusting the time of the clock means based on the first frame detection time information included in the second frame and the first frame detection time detected by the receiving-side first frame recognition means; A communication apparatus comprising:
上記第1フレームが、上記通信ネットワークにおいて送達確認を必要としない状態で複数の通信装置に対して送信されたものであることを特徴とする請求項4記載の通信装置。   5. The communication apparatus according to claim 4, wherein the first frame is transmitted to a plurality of communication apparatuses in a state where delivery confirmation is not required in the communication network. 上記調整手段が、上記時計手段の時刻を設定するパラメータおよび/または上記時計手段の時計が進む速度を調整するパラメータを調整することを特徴とする請求項4または5記載の通信装置。   6. The communication apparatus according to claim 4, wherein the adjusting means adjusts a parameter for setting a time of the timepiece means and / or a parameter for adjusting a speed at which the timepiece of the timepiece means is advanced. 上記送信側第1フレーム認識手段が、上記第1フレームの特定部分の受信または送信を検知することを特徴とする請求項1記載の通信装置。   2. The communication apparatus according to claim 1, wherein the transmission-side first frame recognition means detects reception or transmission of a specific portion of the first frame. 上記受信側第1フレーム認識手段が、上記第1フレームの特定部分の受信または送信を検知することを特徴とする請求項4または5記載の通信装置。   6. The communication apparatus according to claim 4, wherein the receiving-side first frame recognizing unit detects reception or transmission of a specific portion of the first frame. 上記調整手段がバッファを備え、
上記バッファが、最新n個(n≧1の整数)までの上記第1フレーム検知時刻を格納することを特徴とする請求項4または5記載の通信装置。
The adjusting means comprises a buffer;
6. The communication apparatus according to claim 4, wherein the buffer stores the first n frame detection times up to the latest n (n ≧ 1).
上記第1フレームに、該第1フレームを識別する識別子が含まれており、
上記第2フレーム送信手段が、上記第2フレームに、該第2フレームに含まれる第1フレーム検知時刻情報に対応する第1フレームの識別子を含めることを特徴とする請求項1記載の通信装置。
The first frame includes an identifier for identifying the first frame,
2. The communication apparatus according to claim 1, wherein the second frame transmitting means includes an identifier of the first frame corresponding to the first frame detection time information included in the second frame in the second frame.
上記第1フレームに、該第1フレームを識別する識別子が含まれており、
上記第2フレーム受信手段が、第1フレーム検知時刻情報に対応する第1フレームの識別子を含んだ第2フレームを受信し、
上記バッファが、最新n個(n≧1の整数)までの上記第1フレーム検知時刻および上記識別子の組合せを格納することを特徴とする請求項9記載の通信装置。
The first frame includes an identifier for identifying the first frame,
The second frame receiving means receives a second frame including an identifier of the first frame corresponding to the first frame detection time information;
10. The communication apparatus according to claim 9, wherein the buffer stores combinations of the first frame detection time and the identifier up to the latest n (n ≧ 1).
上記調整手段が、受信した第2フレームに含まれる識別子と同じ識別子を上記バッファから探し、同じ識別子がバッファに存在する場合に、この識別子に対応する第1フレーム検知時刻をtRX0とし、前回のtRX0をtRX1とし、
受信した第2フレームに含まれる第1フレーム検知時刻情報をtTX0とし、前回のtTX0をtTX1として、
(1)今回が初期化後に始めて第2フレームの識別子がバッファに見つかった場合、あるいは、
(2)ABS(tTX0−tRX0)>TH(ABSは絶対値)(THは定数)の場合、
上記時計手段の時刻を(現在の時計手段の時刻−tRX0+tTX0+K(Kは定数))に設定し、
上記(1)または(2)の条件が満たされない場合には、tTX0とtRX0とに基づいて、上記時計手段の進む速度を調整することを特徴とする請求項11記載の通信装置。
The adjusting means searches the buffer for the same identifier as that included in the received second frame, and when the same identifier exists in the buffer, the first frame detection time corresponding to this identifier is set to tRX0, and the previous tRX0 Is tRX1,
The first frame detection time information included in the received second frame is tTX0, and the previous tTX0 is tTX1.
(1) If the second frame identifier is found in the buffer for the first time after initialization, or
(2) When ABS (tTX0-tRX0)> TH (ABS is an absolute value) (TH is a constant),
The time of the clock means is set to (current time of clock means−tRX0 + tTX0 + K (K is a constant)),
12. The communication apparatus according to claim 11, wherein when the condition (1) or (2) is not satisfied, the speed of the clock means is adjusted based on tTX0 and tRX0.
上記調整手段は、自装置の時計手段の同期が行われているか否かを示す同期済みフラグを記憶することを特徴とする請求項9記載の通信装置。   10. The communication apparatus according to claim 9, wherein the adjustment means stores a synchronized flag indicating whether or not the clock means of the own apparatus is synchronized. リセット時に前記同期済みフラグは偽に初期化されることを特徴とする請求項13記載の通信装置。   14. The communication apparatus according to claim 13, wherein the synchronized flag is initialized to false when resetting. 上記調整手段が、受信した第2フレームに含まれる第1フレーム検知時刻情報と、上記バッファに格納されている全ての第1フレーム検知時刻との差分絶対値が最も小さい第1フレーム検知時刻を選択し、
選択した第1フレーム検知時刻をtRX0とし、前回のtRX0をtRX1とし、
受信した第2フレームの第1フレーム検知時刻情報をtTX0とし、前回のtTX0をtTX1として、
(1)前記差分絶対値がTH(THは定数)より小さいあるいは等しい場合、
tTX0とtRX0とに基づいて、上記時計手段の進む速度を調整してかつ上記同期済みフラグを真に設定し、
上記(1)の条件が満たされていないかつ前記同期済みフラグが偽である、あるいは
上記(1)の条件が満たされていないかつ前記同期済みフラグが真であって、かつ、
ABS(tTX0−tRX1)>TH1(ABSは絶対値)(TH1は定数)である、あるいは、
上記(1)の条件が満たされていないかつ前記同期済みフラグが真であって、かつ、
ABS(tTX0−tTX1)>TH1である場合、
上記時計手段の時刻を(現在の時計手段の時刻−tRX0+tTX0+K(Kは定数))に設定し、かつ前記同期済みフラグを偽に設定することを特徴とする請求項13記載の通信装置。
The adjustment means selects the first frame detection time having the smallest difference absolute value between the first frame detection time information included in the received second frame and all the first frame detection times stored in the buffer. And
The selected first frame detection time is tRX0, the previous tRX0 is tRX1,
The first frame detection time information of the received second frame is set to tTX0, and the previous tTX0 is set to tTX1.
(1) When the absolute value of the difference is smaller than or equal to TH (TH is a constant),
Based on tTX0 and tRX0, the speed of the clock means is adjusted and the synchronized flag is set to true,
The condition (1) is not satisfied and the synchronized flag is false, or the condition (1) is not satisfied and the synchronized flag is true, and
ABS (tTX0-tRX1)> TH1 (ABS is an absolute value) (TH1 is a constant), or
The condition (1) above is not satisfied and the synchronized flag is true, and
If ABS (tTX0-tTX1)> TH1,
14. The communication apparatus according to claim 13, wherein the time of said clock means is set to (current time of clock means-tRX0 + tTX0 + K (K is a constant)), and said synchronized flag is set to false.
上記調整手段が、上記時計手段の調整にPLL(Phase Locked Loop)を用いることを特徴とする請求項4または5記載の通信装置。   6. The communication apparatus according to claim 4, wherein the adjusting means uses a PLL (Phase Locked Loop) for adjusting the timepiece means. 無線LAN(Local Area Network)またはPLC(Power Line Communication)に対応していることを特徴とする請求項1、2、4、または5記載の通信装置。   6. The communication device according to claim 1, wherein the communication device is compatible with a wireless LAN (Local Area Network) or a PLC (Power Line Communication). 上記第1フレームは無線LANのビーコンフレームであることを特徴とする請求項17記載の通信装置。   18. The communication apparatus according to claim 17, wherein the first frame is a wireless LAN beacon frame. 無線LAN(Local Area Network)に対応しており、
上記第1フレームは無線LANのビーコンフレームであり、
前記識別子はビーコンフレームに含まれるTSF(Timing Synchronization Function)タイマーのタイムスタンプあるいはシーケンス番号であることを特徴とする請求項10または11記載の通信装置。
It supports wireless LAN (Local Area Network),
The first frame is a wireless LAN beacon frame,
12. The communication apparatus according to claim 10, wherein the identifier is a time stamp or a sequence number of a TSF (Timing Synchronization Function) timer included in the beacon frame.
複数の通信装置が通信ネットワークを介して通信接続されている通信システムを構成する通信装置の通信方法であって、
上記通信ネットワークにおいて複数の通信装置に対して送信された特定の第1フレームの受信、または、送信を検知する送信側第1フレーム認識ステップと、
上記送信側第1フレーム認識ステップによって、第1フレームの受信または送信が検知された時の第1フレーム検知時刻を、上記通信装置が備える時計手段が示す時刻に基づいて決定する時刻検知ステップと、
上記第1フレーム検知時刻情報を含む第2フレームを、上記通信ネットワークを介して外部の通信装置に送信する第2フレーム送信ステップとを有することを特徴とする通信方法。
A communication method of a communication device that constitutes a communication system in which a plurality of communication devices are connected for communication via a communication network,
Receiving a specific first frame transmitted to a plurality of communication devices in the communication network, or transmitting side first frame recognition step for detecting transmission;
A time detection step of determining a first frame detection time when reception or transmission of the first frame is detected by the transmission side first frame recognition step based on a time indicated by a clock means included in the communication device;
And a second frame transmission step of transmitting a second frame including the first frame detection time information to an external communication device via the communication network.
複数の通信装置が通信ネットワークを介して通信接続されている通信システムを構成する通信装置の通信方法であって、
上記通信ネットワークにおいて複数の通信装置に対して送信された特定の第1フレームの受信、または、送信を検知する受信側第1フレーム認識ステップと、
上記受信側第1フレーム認識ステップによって、第1フレームの受信または送信が検知された時の第1フレーム検知時刻を、上記通信装置が備える時計手段が示す時刻に基づいて決定する時刻検知ステップと、
請求項1記載の通信装置から、上記第2フレームを、上記通信ネットワークを介して受信する第2フレーム受信ステップと、
上記第2フレームに含まれている第1フレーム検知時刻情報と、上記受信側第1フレーム認識ステップによって検知された第1フレーム検知時刻とに基づいて、上記時計手段の時刻を調整する調整ステップとを有することを特徴とする通信方法。
A communication method of a communication device that constitutes a communication system in which a plurality of communication devices are connected for communication via a communication network,
Receiving a specific first frame transmitted to a plurality of communication devices in the communication network, or receiving side first frame recognition step for detecting transmission;
A time detection step of determining a first frame detection time when reception or transmission of the first frame is detected by the reception side first frame recognition step based on a time indicated by a clock means included in the communication device;
A second frame receiving step for receiving the second frame from the communication device according to claim 1 via the communication network;
An adjusting step for adjusting the time of the clock means based on the first frame detection time information included in the second frame and the first frame detection time detected by the receiving-side first frame recognition step; A communication method characterized by comprising:
請求項1〜19のいずれか1項に記載の通信装置を動作させる通信プログラムであって、コンピュータを上記の各手段として機能させるための通信プログラム。   A communication program for operating the communication device according to any one of claims 1 to 19, wherein the communication program causes a computer to function as each of the above means. 請求項22に記載の通信プログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the communication program according to claim 22 is recorded.
JP2006261568A 2005-09-27 2006-09-26 COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND RECORDING MEDIUM CONTAINING COMMUNICATION PROGRAM Expired - Fee Related JP4708293B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006261568A JP4708293B2 (en) 2005-09-27 2006-09-26 COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND RECORDING MEDIUM CONTAINING COMMUNICATION PROGRAM

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2005280889 2005-09-27
JP2005280889 2005-09-27
JP2006261568A JP4708293B2 (en) 2005-09-27 2006-09-26 COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND RECORDING MEDIUM CONTAINING COMMUNICATION PROGRAM

Publications (2)

Publication Number Publication Date
JP2007124633A JP2007124633A (en) 2007-05-17
JP4708293B2 true JP4708293B2 (en) 2011-06-22

Family

ID=38147908

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006261568A Expired - Fee Related JP4708293B2 (en) 2005-09-27 2006-09-26 COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND RECORDING MEDIUM CONTAINING COMMUNICATION PROGRAM

Country Status (1)

Country Link
JP (1) JP4708293B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5081874B2 (en) * 2009-08-03 2012-11-28 関西電力株式会社 Data collection system
JP5656305B1 (en) 2014-04-17 2015-01-21 パナソニックIpマネジメント株式会社 COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION METHOD
JP6566205B2 (en) 2015-10-30 2019-08-28 パナソニックIpマネジメント株式会社 Communication apparatus and communication system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001076280A (en) * 1999-09-07 2001-03-23 Omron Corp Method, system and terminal for radio communications
JP2003298630A (en) * 2002-04-01 2003-10-17 Mitsubishi Electric Corp Time synchronization method
JP2006322788A (en) * 2005-05-18 2006-11-30 Fujitsu General Ltd Time synchronizing system

Also Published As

Publication number Publication date
JP2007124633A (en) 2007-05-17

Similar Documents

Publication Publication Date Title
US11375312B2 (en) Method, device, loudspeaker equipment and wireless headset for playing audio synchronously
US9667370B2 (en) Communication device with peer-to-peer assist to provide synchronization
CN101083523B (en) Method and device for realizing integrated time stamp clock synchronous phase-locked loop
US8879586B2 (en) Inband timestamping
US7860125B2 (en) Flexible time stamping
US9830298B2 (en) Media time based USB frame counter synchronization for Wi-Fi serial bus
US20130003757A1 (en) Syntonized communication system
US7461284B2 (en) Adaptive elasticity FIFO
JP2017521027A (en) Network clock comparison system and method
CN101548510A (en) Method and apparatus for transmitting transport stream packets
WO2005076513A1 (en) Jitter correcting apparatus capable of ensuring synchronism between transmitter apparatus and receiver apparatus
JP2008064474A (en) Clock apparatus, clock system, synchronization method, clock apparatus control program, and communication apparatus
US20220360350A1 (en) Method and apparatus for acquiring timestamp of data stream, storage medium, and electronic apparatus
JP4708293B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION PROGRAM, AND RECORDING MEDIUM CONTAINING COMMUNICATION PROGRAM
US6757304B1 (en) Method and apparatus for data communication and storage wherein a IEEE1394/firewire clock is synchronized to an ATM network clock
US10915490B2 (en) Audio streams over peripheral component interconnect (PCI) express (PCIE) links
CN108183762B (en) The method for synchronizing time of RapidIO network system and RapidIO network system
CN115904307B (en) Data buffer overflow processing method and communication system
JP3499818B2 (en) Time stamp offset adjusting method and packet transmission device using the same
US8041183B2 (en) Device for recording and playing stream data
CN102811110A (en) Transmission delay control method and transmission delay control system
US7366207B1 (en) High speed elastic buffer with clock jitter tolerant design
CN112019288B (en) Time synchronization method, service single board and network equipment
JP2009071537A (en) Data transfer system and data transfer method
US20230179314A1 (en) In-band signaling for ingress ptp packets at a master entity

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080806

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110222

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110315

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110316

LAPS Cancellation because of no payment of annual fees