JP3950847B2 - Clock synchronization system and clock synchronization method - Google Patents
Clock synchronization system and clock synchronization method Download PDFInfo
- Publication number
- JP3950847B2 JP3950847B2 JP2003418052A JP2003418052A JP3950847B2 JP 3950847 B2 JP3950847 B2 JP 3950847B2 JP 2003418052 A JP2003418052 A JP 2003418052A JP 2003418052 A JP2003418052 A JP 2003418052A JP 3950847 B2 JP3950847 B2 JP 3950847B2
- Authority
- JP
- Japan
- Prior art keywords
- timing information
- value
- timing
- clock
- frequency
- 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
Links
Images
Description
本発明は、ネットワーク、特にインターネットプロトコルネットワーク(以下、IPネットワークと記す)を介して接続された装置間のクロック同期をとるシステムおよび方法に関する。 The present invention relates to a system and method for synchronizing clocks between devices connected via a network, particularly an Internet protocol network (hereinafter referred to as an IP network).
IPネットワークを介して映像データや音声データなどを伝送する通信システムにおける装置間の同期を取る方式として、送信側で使用されている基準クロックの精度を、IPネットワークを経由して受信側へ伝えることで、受信側のクロック精度を基準クロックの精度に合わせるクロック同期方式がある。その一例として、送信装置が基準クロックに基づく時刻情報をIPネットワーク上に送出し、受信装置が、出力周波数が固定された発振器からの内部クロックによって時刻をカウントするとともに、該カウントにより得られる時刻情報を、定期的に、IPネットワークを介して受信される時刻情報に基づいて修正する、といった同期方式がある。 As a method of synchronizing devices in a communication system that transmits video data, audio data, etc. over an IP network, the accuracy of the reference clock used on the transmission side is transmitted to the reception side via the IP network. Thus, there is a clock synchronization method in which the clock accuracy on the receiving side is matched with the accuracy of the reference clock. As an example, the transmitting device sends time information based on the reference clock to the IP network, and the receiving device counts the time with the internal clock from the oscillator whose output frequency is fixed, and the time information obtained by the counting. There is a synchronization method that periodically corrects the time based on time information received via the IP network.
しかし、IPネットワークにおいて生じるデータ転送遅延時間にはトラフィック等の状況によるばらつき(ゆらぎ)がある。このため、上記同期方式では、そのデータ転送遅延時間のゆらぎによって時刻情報の受信タイミングが毎回変動し、修正後の時刻が一定の精度にならない。 However, there is a variation (fluctuation) in the data transfer delay time generated in the IP network depending on the traffic conditions. For this reason, in the above-described synchronization method, the reception timing of the time information varies every time due to fluctuations in the data transfer delay time, and the corrected time does not have a constant accuracy.
また、受信装置の発振器の精度が悪い場合は、クロックの周波数が送信側の基準クロックに比べて早かったり、遅かったりする。このようにクロックの周波数にずれがあると、送信装置と受信装置との間の時刻情報のずれが時間の経過とともに大きくなるため、受信装置における毎回の修正量が徐々に大きくなってしまう。この周波数のずれによる修正量のずれは、データ転送遅延時間のゆらぎが無い場合は、規則的な変化となる。しかし、通常は、データ転送遅延時間のゆらぎが存在するために、受信装置における修正量のずれは、そのような規則的な変化にはならず不定となる。このため、受信装置では、正確な時刻情報を連続して維持することは困難である。 In addition, when the accuracy of the oscillator of the receiving apparatus is poor, the clock frequency may be faster or slower than the reference clock on the transmission side. When there is a shift in the clock frequency in this way, the shift in time information between the transmission apparatus and the reception apparatus increases with time, and the amount of correction in each reception apparatus gradually increases. The correction amount deviation due to this frequency deviation is a regular change when there is no fluctuation in the data transfer delay time. However, since fluctuations in the data transfer delay time usually exist, the deviation of the correction amount in the receiving apparatus does not become such a regular change but becomes indefinite. For this reason, it is difficult for the receiving device to maintain accurate time information continuously.
そこで、データ転送遅延時間のゆらぎやクロックの周波数のずれを考慮したクロック同期が可能なIP端末装置が提案されている(特許文献1参照)。このIP端末装置は、送信側から一定間隔で送信された同期タイミングパケットを受信して内部クロックを送信側の基準クロックに同期させるものであって、内部クロックをカウントするクロックカウンタを備える。通信開始後、最初の同期タイミングパケットの受信タイミングにおけるクロックカウンタのカウンタ値(X0)と、それ以降の同期タイミングパケットの受信タイミングにおけるクロックカウンタのカウンタ値(Xn)とから、以下の式で与えられる2つの傾きK1、K2を求め、これら傾きの差分が一定の範囲内になる状態のときの、両傾きの平均から修正量のずれの規則的な変化を推定する。 In view of this, an IP terminal device capable of clock synchronization in consideration of fluctuations in data transfer delay time and clock frequency deviation has been proposed (see Patent Document 1). This IP terminal device receives a synchronization timing packet transmitted at a constant interval from the transmission side, synchronizes the internal clock with the reference clock on the transmission side, and includes a clock counter that counts the internal clock. From the start of communication, the counter value (X0) of the clock counter at the reception timing of the first synchronization timing packet and the counter value (Xn) of the clock counter at the subsequent reception timing of the synchronization timing packet are given by the following equations. Two inclinations K1 and K2 are obtained, and when the difference between these inclinations is within a certain range, a regular change in the deviation of the correction amount is estimated from the average of both inclinations.
K1={(Xn−X0)+Y}/T1
K2={(Xn−X0)−Y}/T1
ここで、Yはゆらぎの上限値である。
K2 = {(Xn−X0) −Y} / T1
Here, Y is an upper limit value of fluctuation.
上述したように、受信装置が、内部クロックでカウントした時刻情報を、定期的に、IPネットワークを介して受信される時刻情報に基づいて修正する同期方式においては、データ転送遅延時間のゆらぎがあるために、修正後の時刻が一定の精度にならないという問題がある。また、受信装置の発振器の精度が悪い場合に、正確な時刻情報を維持することが困難であるという問題がある。なお、後者の問題については、高価な高精度の発振器を用いることで解決することができるが、その場合は、コスト面で不利なものとなる。 As described above, in the synchronous method in which the receiving device periodically corrects the time information counted by the internal clock based on the time information received via the IP network, there is fluctuation in the data transfer delay time. Therefore, there is a problem that the corrected time does not have a certain accuracy. Further, there is a problem that it is difficult to maintain accurate time information when the accuracy of the oscillator of the receiving device is poor. The latter problem can be solved by using an expensive high-precision oscillator, but in that case, it is disadvantageous in terms of cost.
特許文献1に記載のIP端末装置においては、2つの傾きK1、K2を求め、さらに、これら傾きK1、K2の差分が一定の範囲内になる状態において両傾きの平均を求める、といった複雑な処理を行う必要がある、という問題がある。
In the IP terminal device described in
加えて、上述した傾きK1、K2に関する式の「/T1」は、正しくは「/(n×T1)」であり、パケットを受信するたびにnの値をインクリメントするものであると推測されることから、IPネットワークにおいて、パケット抜け(網内破棄)が頻発する環境下では、傾きK1、K2を正確に求めることができない、という問題もある。 In addition, “/ T1” in the expressions related to the slopes K1 and K2 described above is correctly “/ (n × T1)”, and is assumed to increment the value of n each time a packet is received. Therefore, in the IP network, there is a problem that the slopes K1 and K2 cannot be obtained accurately in an environment where packet loss (intra-network discard) frequently occurs.
本発明の目的は、上記の問題を解決し、受信側のクロックの精度を送信側のクロック精度に簡単、かつ、正確に合わせることのできる、クロック同期システムおよびクロック同期方法ならびにクロック周波数誤差判定方法を提供することにある。 SUMMARY OF THE INVENTION An object of the present invention is to solve the above-described problems and to easily and accurately match the clock accuracy on the receiving side with the clock accuracy on the transmitting side, a clock synchronization system, a clock synchronization method, and a clock frequency error determination method. Is to provide.
本発明のさらなる目的は、パケット抜け(網内破棄)が頻発する環境下においても、受信側のクロックの精度を正確に維持することのできる、クロック同期システムおよびクロック同期方法ならびにクロック周波数誤差判定方法を提供することにある。 A further object of the present invention is to provide a clock synchronization system, a clock synchronization method, and a clock frequency error determination method capable of accurately maintaining the accuracy of the clock on the receiving side even in an environment where packet loss (intra-network discard) occurs frequently. Is to provide.
本発明の他の目的は、そのようなクロック同期システムを構成する送信装置および受信装置を提供することにある。 Another object of the present invention is to provide a transmitter and a receiver that constitute such a clock synchronization system.
本発明のクロック同期システムの特徴は、基準クロックに基づいて所定の送信間隔で、少なくとも該所定の送信間隔の情報を含むタイミング情報を送信する送信装置と、ネットワークを介して前記タイミング情報を受信する受信装置とを有し、前記受信装置は、入力された制御電圧の大きさに応じて出力クロックの周波数が変化する発振器と、前記発振器の出力から得られる内部クロックに基づいて前記タイミング情報の受信間隔を計時する計時手段と、前記内部クロックの周波数が前記基準クロックの周波数と一致する理想状態で前記計時手段が前記タイミング情報に含まれている送信間隔を計時した場合の値を理論値として演算する期待値演算部と、前記計時手段にて受信間隔が計時されるたびに、その計時された値と前記期待値演算部にて演算された理論値との差分を求めて累積加算するとともに、該累積加算値が、所定の閾値範囲から外れた場合に、前記内部クロックの周波数が前記基準クロックの周波数に近づくように前記制御電圧の大きさを制御する誤差判定部とを有することにある。 The clock synchronization system according to the present invention is characterized in that, at a predetermined transmission interval based on a reference clock, at least a transmission device that transmits timing information including information on the predetermined transmission interval, and the timing information is received via a network. A receiving device, wherein the receiving device receives the timing information based on an oscillator whose output clock frequency varies according to the magnitude of the input control voltage, and an internal clock obtained from the output of the oscillator. Time-counting means for measuring the interval, and a value when the time-measurement means times the transmission interval included in the timing information in an ideal state where the frequency of the internal clock matches the frequency of the reference clock is calculated as a theoretical value Each time the reception interval is timed by the timing means, the timed value and the expected value calculation unit. The difference between the calculated theoretical value and the cumulative value is cumulatively added, and when the cumulative added value is out of a predetermined threshold range, the control is performed so that the frequency of the internal clock approaches the frequency of the reference clock. And an error determination unit that controls the magnitude of the voltage.
上記の構成において、理論値は、データ転送遅延時間のゆらぎの無い状態でタイミング情報を受信した場合の受信間隔(送信間隔に一致する)を、周波数が基準クロックの周波数と一致する理想状態の内部クロックで計時した値に相当する。したがって、内部クロックで計時した受信間隔の値が理論値に近づくように制御すれば、内部クロックの周波数が基準クロックの周波数に近づくこととなる。 In the above configuration, the theoretical value is the reception interval (matching the transmission interval) when the timing information is received with no fluctuation in the data transfer delay time, and the internal value in the ideal state where the frequency matches the frequency of the reference clock. It corresponds to the value measured with the clock. Therefore, if the value of the reception interval measured with the internal clock is controlled so as to approach the theoretical value, the frequency of the internal clock approaches the frequency of the reference clock.
また、受信装置の発振器の精度が悪く、内部クロックと基準クロックとの間に周波数ずれがある場合、内部クロックで計時された値と理論値との間に差分を生じる。この差分は、データ転送遅延時間のゆらぎが無い場合、規則的に変化するため、その規則的な変化を検出して内部クロックの周波数を修正することで、容易に基準クロックとの同期をとることが可能である。しかし、実際は、内部クロックで計時された値と理論値との間の差分には、データ転送遅延時間のゆらぎによる変動を伴うため、そのような規則的な変化を検出することは困難である。このため、上記の本発明では、タイミング情報の受信間隔が計時されるたびに、その計時された値と理論値との差分が求められて累積加算される。この累積加算値は、例えば内部クロックの周波数が基準クロックの周波数より速い場合は、データ転送遅延時間のゆらぎによる変動を伴うものの、周期的に除々に増加することとなる。反対に、内部クロックの周波数が基準クロックの周波数より遅い場合は、累積加算値は周期的に減少していくこととなる。この周期的な累積加算値の増減は、上記差分の規則的な変化に対応するものであり、累積加算値が所定の閾値範囲から外れた場合に、内部クロックの周波数が基準クロックの周波数に近づくように制御することで、容易に基準クロックとの同期をとることが可能であり、内部クロックを一定の精度で維持することができる。 In addition, when the accuracy of the oscillator of the receiving apparatus is poor and there is a frequency shift between the internal clock and the reference clock, a difference is generated between the value measured by the internal clock and the theoretical value. Since this difference changes regularly when there is no fluctuation in the data transfer delay time, it is easy to synchronize with the reference clock by detecting the regular change and correcting the frequency of the internal clock. Is possible. However, in actuality, the difference between the value measured by the internal clock and the theoretical value is accompanied by fluctuation due to fluctuations in the data transfer delay time, and thus it is difficult to detect such a regular change. Therefore, in the present invention described above, every time the timing information reception interval is timed, the difference between the timed value and the theoretical value is obtained and cumulatively added. For example, when the frequency of the internal clock is faster than the frequency of the reference clock, the cumulative addition value gradually increases periodically, although the fluctuation is caused by fluctuation of the data transfer delay time. On the other hand, when the frequency of the internal clock is slower than the frequency of the reference clock, the cumulative added value decreases periodically. This periodic increase / decrease of the cumulative addition value corresponds to the regular change of the difference, and when the cumulative addition value falls outside the predetermined threshold range, the frequency of the internal clock approaches the frequency of the reference clock. By controlling in this way, it is possible to easily synchronize with the reference clock, and the internal clock can be maintained with a certain accuracy.
上記の累積加算値に基づく内部クロックの周波数の修正は、内部クロックで計時された値と理論値との間の差分をとって累積加算するだけであるので、特許文献1に記載の2つの傾きK1、K2を求める手法に比べて処理が簡単である。
Since the correction of the frequency of the internal clock based on the cumulative addition value described above is merely the cumulative addition by taking the difference between the value measured by the internal clock and the theoretical value, the two slopes described in
上述した本発明のクロック同期システムにおいて、前記計時手段は、前記タイミング情報を受信すると、それまで保持していたカウント値をクリアして、該タイミング情報の受信から次回のタイミング情報の受信までの間隔を前記内部クロックに基づいてカウントするタイミングカウンタと、前記タイミングカウンタのクリアされる直前のカウント値を保持するラッチ回路とを有し、前記誤差判定部が、前記タイミング情報が受信されるたびに、前記ラッチ回路に保持されたカウント値と前記期待値演算部にて演算された理論値との差分を求めて累積加算するように構成してもよい。このような構成により、上記本発明のクロック同期システムの特徴を有するシステムの実現が可能となる。 In the clock synchronization system of the present invention described above, when the timing means receives the timing information, it clears the count value held so far, and the interval from reception of the timing information to reception of the next timing information. A timing counter that counts based on the internal clock, and a latch circuit that holds a count value immediately before the timing counter is cleared, each time the error determination unit receives the timing information, A difference between the count value held in the latch circuit and the theoretical value calculated by the expected value calculation unit may be obtained and cumulatively added . With the configuration as this, the realization of a system having features of the clock synchronization system of the present invention becomes possible.
上記の場合、前記タイミング情報は、何番目に送信された情報であるかを示す順序番号をさらに含み、前記受信装置は、前記タイミング情報を受信すると、該受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断するデータ抽出部をさらに有し、前記データ抽出部が、前記連続性に異常があると判断した場合は、前記ラッチ回路に保持されている値を前記期待値演算部にて演算される理論値として強制的に設定するようにしてもよい。この構成によれば、パケット抜け(網内破棄)や転送順序の入れ替わりなどが生じた場合は、受信されたタイミング情報に含まれている順序番号が不連続なものとなり、連続性に異常が生じたと判断される。そして、順序番号が不連続なものとなったタイミング情報については、算出される差分は強制的に0とされる。このため、差分の累積加算値に、パケット抜け(網内破棄)や転送順序の入れ替わりなどが影響することはない。 In the above case, the timing information further includes an order number indicating the number of information transmitted, and when the receiving apparatus receives the timing information, the order included in the received timing information A data extraction unit for determining the continuity based on the number, and when the data extraction unit determines that the continuity is abnormal, the value held in the latch circuit is set to the expected value. You may make it set compulsorily as a theoretical value calculated in a calculating part. According to this configuration, when packet loss (intra-network discarding) or transfer order change occurs, the sequence number included in the received timing information becomes discontinuous, resulting in an abnormality in continuity. It is judged that For the timing information whose sequence numbers are discontinuous, the calculated difference is forcibly set to zero. For this reason, the packet loss (intra-network discard) or the transfer order is not affected by the accumulated difference value.
上述した本発明のクロック同期システムにおいて、前記計時手段は、前記タイミング情報を受信すると、前記期待値演算部にて演算された理論値が初期値として設定されるとともに、該タイミング情報の受信から次回のタイミング情報の受信までの間隔を前記内部クロックに基づいてダウンカウントするタイミングダウンカウンタと、前記タイミングダウンカウンタの初期値が設定される直前のカウント値を保持するラッチ回路とを有し、前記誤差判定部が、前記タイミング情報が受信されるたびに、前記ラッチ回路に保持されたカウント値と前記期待値演算部にて演算された理論値との差分を求めて累積加算するように構成してもよい。このような構成によっても、上記本発明のクロック同期システムの特徴を有するシステムの実現が可能となる。 In the clock synchronization system of the present invention described above, when the timing means receives the timing information, the theoretical value calculated by the expected value calculation unit is set as an initial value, and the next time from the reception of the timing information. A timing down counter that counts down the interval until reception of the timing information based on the internal clock, and a latch circuit that holds a count value immediately before the initial value of the timing down counter is set, and the error Each time the timing information is received, the determination unit obtains a difference between the count value held in the latch circuit and the theoretical value calculated by the expected value calculation unit, and cumulatively adds the difference. Also good . By configuration as this, the realization of a system having features of the clock synchronization system of the present invention becomes possible.
上記の場合、前記タイミング情報は、何番目に送信された情報であるかを示す順序番号をさらに含み、前記受信装置は、前記タイミング情報を受信すると、該受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断するデータ抽出部をさらに有し、前記データ抽出部が、前記連続性に異常があると判断した場合は、前記ラッチ回路に保持されているカウント値を強制的に0にしてもよい。この構成によっても、差分の累積加算値に、パケット抜け(網内破棄)や転送順序の入れ替わりなどが影響することはない。 In the above case, the timing information further includes an order number indicating the number of information transmitted, and when the receiving apparatus receives the timing information, the order included in the received timing information A data extraction unit for determining the continuity based on the number, and if the data extraction unit determines that the continuity is abnormal, the count value held in the latch circuit is forcibly It may be set to 0. Even with this configuration, packet loss (intra-network discard) or transfer order change does not affect the accumulated difference value.
上述した本発明のクロック同期システムのいずれかの構成において、前記送信装置が、前記受信装置との通信開始後、一定の期間は、前記所定の送信間隔として第1の送信間隔で前記タイミング情報を生成して送信し、その後は、前記第1の送信間隔より長い第2の送信間隔で前記タイミング情報を生成して送信するようにしてもよい。この構成によれば、受信装置では、通信開始後、一定の期間は、第2の送信間隔より短い第1の送信間隔に基づいて算出された論理値と内部クロックで計時された値(受信間隔)との差分が求められ、この差分の累積加算値が所定の閾値範囲から外れた場合に内部クロックの周波数の修正が行われる。そして、一定の期間経過後は、第1の送信間隔より長い第2の送信間隔に基づいて算出された論理値と内部クロックで計時された値(受信間隔)との差分が求められ、この差分の累積加算値が所定の閾値範囲から外れた場合に内部クロックの周波数の修正が行われる。このような修正を行う場合、通信開始後の一定の期間においては、送信間隔が短いために、内部クロックの修正をより早く行うことができ、また、一定の期間経過後においては、送信間隔が長いことにより、タイミング情報を効率的に送信することが可能となる。 In any one of the configurations of the clock synchronization system of the present invention described above, the transmission device may receive the timing information at a first transmission interval as the predetermined transmission interval for a certain period after the start of communication with the reception device. The timing information may be generated and transmitted at a second transmission interval longer than the first transmission interval. According to this configuration, in the receiving apparatus, for a certain period after the start of communication, the logical value calculated based on the first transmission interval shorter than the second transmission interval and the value measured by the internal clock (reception interval) When the accumulated addition value of the difference is out of a predetermined threshold range, the frequency of the internal clock is corrected. After a certain period, the difference between the logical value calculated based on the second transmission interval longer than the first transmission interval and the value (reception interval) measured by the internal clock is obtained. When the accumulated addition value is out of the predetermined threshold range, the frequency of the internal clock is corrected. When such correction is performed, the transmission interval is short in a certain period after the start of communication, so that the internal clock can be corrected more quickly. By being long, timing information can be transmitted efficiently.
本発明のクロック同期方法の特徴は、送信装置が、基準クロックに基づいて所定の送信間隔で、少なくとも該所定の送信間隔の情報を含むタイミング情報を前記受信装置へ送信する第1のステップと、受信装置が、前記タイミング情報を受信するたびに、前回のタイミング情報の受信から今回のタイミング情報の受信までの間隔を自己のクロックでカウントしたカウント値と、前記自己のクロックの周波数が前記基準クロックの周波数と一致する理想状態で、該自己のクロックに基づいて前記受信したタイミング情報に含まれている前記所定の送信間隔をカウントした場合の値である理論値との差分を求めて累積加算するとともに、該累積加算値が、所定の閾値範囲から外れた場合に、前記自己のクロックの周波数を前記基準クロックの周波数に近づく方向に調整する第2のステップとを含むことになる。 The clock synchronization method according to the present invention is characterized in that the transmitting device transmits, at a predetermined transmission interval based on a reference clock, timing information including at least information on the predetermined transmission interval to the receiving device; Each time the receiving apparatus receives the timing information, the count value obtained by counting the interval from the reception of the previous timing information to the reception of the current timing information with the own clock, and the frequency of the own clock is the reference clock. In the ideal state that matches the frequency of the self, the difference from the theoretical value that is a value when the predetermined transmission interval included in the received timing information is counted based on the own clock is obtained and accumulated. In addition, when the cumulative addition value is out of a predetermined threshold range, the frequency of the own clock is changed to the frequency of the reference clock. It will contain a second step of adjusting a direction approaching.
上記の場合、前記タイミング情報は、何番目に送信された情報であるかを示す順序番号をさらに含み、前記受信装置が、前記タイミング情報を受信すると、該受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断し、該判断が異常となった場合は、前記受信したタイミング情報について算出される差分を強制的に0にするステップをさらに含んでいてもよい。 In the above case, the timing information further includes an order number indicating the number of information transmitted, and when the receiving apparatus receives the timing information, the order included in the received timing information A step of determining the continuity based on the number and forcibly setting the difference calculated for the received timing information to 0 when the determination becomes abnormal may be further included.
また、前記第1のステップは、前記送信装置が、前記受信装置との通信開始後、一定の期間は、前記所定の送信間隔として第1の送信間隔で前記タイミング情報を生成して送信し、その後は、前記第1の送信間隔より長い第2の送信間隔で前記タイミング情報を生成して送信するステップを含む、請求項22または23に記載のクロック同期方法。 Further, in the first step, the transmission device generates and transmits the timing information at the first transmission interval as the predetermined transmission interval for a certain period after the communication with the reception device starts. 24. The clock synchronization method according to claim 22, further comprising a step of generating and transmitting the timing information at a second transmission interval longer than the first transmission interval.
上記のとおりの本発明のクロック同期においても、上述した本発明のクロック同期システムの特徴と同様な作用を奏する。 Also in the clock synchronization of the present invention as described above, the same operation as the above-described feature of the clock synchronization system of the present invention is achieved.
本発明のクロック周波数誤差判定方法の特徴は、送信装置が基準クロックに基づいて所定の送信間隔で送信した、少なくとも該所定の送信間隔の情報を含むタイミング情報を、ネットワークを介して受信する受信装置において行われるクロック周波数誤差判定方法において、前記タイミング情報の受信間隔を自己のクロックでカウントするステップと、前記自己のクロックの周波数が前記基準クロックの周波数と一致する理想状態で、該自己のクロックに基づいて前記タイミング情報に含まれている前記所定の送信間隔をカウントした場合の値である理論値を演算するステップと、前記受信間隔のカウント値が得られるたびに、該得られたカウント値と前記理論値との差分を求めて累積加算するステップと、前記累積加算した値が所定の閾値範囲から外れるかどうかで、前記自己のクロックの前記基準クロックに対する周波数誤差を判定するステップとを含むことにある。 The clock frequency error determination method of the present invention is characterized in that a receiving apparatus that receives timing information including at least information on the predetermined transmission interval, which is transmitted by the transmitting apparatus at a predetermined transmission interval based on a reference clock, via a network. In the clock frequency error determination method performed in the step of counting the reception interval of the timing information with its own clock, and in an ideal state where the frequency of the own clock matches the frequency of the reference clock, A step of calculating a theoretical value that is a value when the predetermined transmission interval included in the timing information is counted, and each time the count value of the reception interval is obtained, the obtained count value Obtaining a difference from the theoretical value and accumulating the difference, and the accumulated value is a predetermined threshold value. On whether out of the circumference is to and determining a frequency error with respect to the reference clock of the own clock.
上記の場合、前記タイミング情報は、何番目に送信された情報であるかを示す順序番号をさらに含み、前記タイミング情報を受信すると、その受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断し、該判断が異常となった場合に、前記受信したタイミング情報について算出される差分を強制的に0にするステップとをさらに含んでいてもよい。 In the above case, the timing information further includes an order number indicating the number of transmitted information. When the timing information is received, the timing information is based on the order number included in the received timing information. A step of determining the continuity and forcibly setting the difference calculated for the received timing information to 0 when the determination becomes abnormal.
上記のとおりの本発明のクロック周波数誤差判定方法においても、上述した本発明のクロック同期システムの特徴と同様な作用を奏する。 The clock frequency error determination method according to the present invention as described above also exhibits the same operation as the characteristics of the clock synchronization system according to the present invention described above.
本発明の受信装置の特徴は、送信装置が基準クロックに基づいて所定の送信間隔で送信した、少なくとも該所定の送信間隔の情報を含むタイミング情報を、ネットワークを介して受信する受信装置において、入力された制御電圧の大きさに応じて出力クロックの周波数が変化する発振器と、前記発振器の出力から得られる内部クロックに基づいて前記タイミング情報の受信間隔を計時する計時手段と、前記内部クロックの周波数が前記基準クロックの周波数と一致する理想状態で前記計時手段が前記タイミング情報に含まれている送信間隔を計時した場合の値を理論値として演算する期待値演算部と、前記計時手段にて受信間隔が計時されるたびに、その計時された値と前記期待値演算部にて演算された理論値との差分を求めて累積加算するとともに、該累積加算値が、所定の閾値範囲から外れた場合に、前記内部クロックの周波数が前記基準クロックの周波数に近づくように前記制御電圧の大きさを制御する誤差判定部とを有することにある。 The receiving apparatus according to the present invention is characterized in that, in a receiving apparatus that receives at least timing information including information on the predetermined transmission interval, which is transmitted by the transmitting apparatus at a predetermined transmission interval based on a reference clock. An oscillator in which the frequency of the output clock changes according to the magnitude of the control voltage, a clocking means for timing the reception interval of the timing information based on the internal clock obtained from the output of the oscillator, and the frequency of the internal clock An expected value calculation unit that calculates a theoretical value as a value when the timing unit counts the transmission interval included in the timing information in an ideal state that matches the frequency of the reference clock; and the timing unit receives Every time the interval is timed, the difference between the timed value and the theoretical value calculated by the expected value calculation unit is obtained and cumulatively added. Both include an error determination unit that controls the magnitude of the control voltage so that the frequency of the internal clock approaches the frequency of the reference clock when the cumulative addition value is out of a predetermined threshold range. is there.
上記の場合、前記計時手段は、前記タイミング情報を受信すると、それまで保持していたカウント値をクリアして、該タイミング情報の受信から次回のタイミング情報の受信までの間隔を前記内部クロックに基づいてカウントするタイミングカウンタと、前記タイミングカウンタのクリアされる直前のカウント値を保持するラッチ回路とを有し、前記誤差判定部が、前記タイミング情報が受信されるたびに、前記ラッチ回路に保持されたカウント値と前記期待値演算部にて演算された理論値との差分を求めて累積加算するように構成されてもよい。この場合、前記タイミング情報は、何番目に送信された情報であるかを示す順序番号をさらに含み、前記タイミング情報を受信すると、該受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断するデータ抽出部をさらに有し、前記データ抽出部が、前記連続性に異常があると判断した場合は、前記ラッチ回路に保持されている値を前記期待値演算部にて演算される理論値として強制的に設定するように構成してもよい。 In the above case, when the timing means receives the timing information, it clears the count value held so far, and sets the interval from the reception of the timing information to the reception of the next timing information based on the internal clock. And a latch circuit that holds a count value immediately before the timing counter is cleared, and the error determination unit is held in the latch circuit every time the timing information is received. A difference between the count value and the theoretical value calculated by the expected value calculation unit may be obtained and cumulatively added. As this case, before Symbol timing information further includes a sequence number indicating which information transmitted ordinal number, when receiving the timing information, on the basis of the sequence number contained in the timing information thus received A data extraction unit for determining continuity; when the data extraction unit determines that the continuity is abnormal, the value stored in the latch circuit is calculated by the expected value calculation unit; You may comprise so that it may be forcedly set as a theoretical value to be performed.
また、前記計時手段は、前記タイミング情報を受信すると、前記期待値演算部にて演算された理論値が初期値として設定されるとともに、該タイミング情報の受信から次回のタイミング情報の受信までの間隔を前記内部クロックに基づいてダウンカウントするタイミングダウンカウンタと、前記タイミングダウンカウンタの初期値が設定される直前のカウント値を保持するラッチ回路とを有し、前記誤差判定部が、前記タイミング情報が受信されるたびに、前記ラッチ回路に保持されたカウント値と前記期待値演算部にて演算された理論値との差分を求めて累積加算するように構成されてもよい。この場合、前記誤差判定部が、前記累積加算値が前記所定の閾値範囲の上限値を超えた場合に前記制御電圧を高くし、前記累積加算値が前記所定の閾値範囲の下限値を下回った場合に前記制御電圧を低くするようにしてもよい。また、前記タイミング情報は、何番目に送信された情報であるかを示す順序番号をさらに含み、前記タイミング情報を受信すると、該受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断するデータ抽出部をさらに有し、前記データ抽出部が、前記連続性に異常があると判断した場合は、前記ラッチ回路に保持されているカウント値を強制的に0にするようにしてもよい。 When the timing means receives the timing information, the theoretical value calculated by the expected value calculation unit is set as an initial value, and an interval from reception of the timing information to reception of the next timing information A timing down counter that counts down based on the internal clock, and a latch circuit that holds a count value immediately before the initial value of the timing down counter is set. Each time it is received, a difference between the count value held in the latch circuit and the theoretical value calculated by the expected value calculation unit may be obtained and cumulatively added. In this case, the error determination unit increases the control voltage when the cumulative added value exceeds the upper limit value of the predetermined threshold range, and the cumulative added value falls below the lower limit value of the predetermined threshold range. In some cases, the control voltage may be lowered. In addition, the timing information further includes a sequence number indicating what number of information is transmitted. When the timing information is received, the continuity is determined based on the sequence number included in the received timing information. A data extraction unit that determines whether the count value held in the latch circuit is forcibly set to 0 when the data extraction unit determines that the continuity is abnormal. Also good.
上記のとおりの本発明の受信装置においても、上述した本発明のクロック同期システムの特徴と同様な作用を奏する。 The receiving device of the present invention as described above also exhibits the same operation as the characteristics of the clock synchronization system of the present invention described above.
本発明の送信装置の特徴は、ネットワークを介して接続された受信装置に、クロック同期をとるためのタイミング情報を送信する送信装置において、外部より供給された基準クロックに基づいて、前記タイミング情報を所定の送信間隔で送信させるための周期タイミングを生成するタイミングカウンタと、前記周期タイミングに基づいて、前記所定の送信間隔の情報と送信順序を示す順序番号とを含むデータを生成し、これを前記タイミング情報として送出するデータ生成部とを有することにある。この場合、前記データ生成部が、前記受信装置との通信開始後、一定の期間は、前記所定の送信間隔として第1の送信間隔で前記タイミング情報を生成して送出し、その後は、前記第1の送信間隔より長い第2の送信間隔で前記タイミング情報を生成して送出するようにしてもよい。 The transmitting device of the present invention is characterized in that, in a transmitting device that transmits timing information for clock synchronization to a receiving device connected via a network, the timing information is based on a reference clock supplied from the outside. A timing counter for generating a cycle timing for transmitting at a predetermined transmission interval, and data including information on the predetermined transmission interval and a sequence number indicating a transmission order are generated based on the cycle timing, A data generation unit that transmits the timing information. In this case, the data generation unit generates and sends the timing information at the first transmission interval as the predetermined transmission interval for a certain period after the start of communication with the receiving device, and thereafter The timing information may be generated and transmitted at a second transmission interval longer than one transmission interval.
上記のとおりの本発明の送信装置によれば、上記本発明の受信装置との組み合せにより、上述した本発明のクロック同期システムの特徴で述べた作用を奏する。 According to the transmission apparatus of the present invention as described above, the operation described in the above-described features of the clock synchronization system of the present invention is achieved by the combination with the reception apparatus of the present invention.
以上説明したとおり、本発明によれば、データ転送遅延時間のゆらぎがあっても、内部クロックの基準クロックに対する周波数誤差の傾向を、内部クロックで計時された値(受信間隔)と理論値との間に差分の累積加算値を利用した簡単な演算処理で、正確に判断することができる。よって、内部クロックを一定の精度で維持することができ、かつ、内部クロック精度誤差をより小さくすることができる。 As described above, according to the present invention, even if the data transfer delay time fluctuates, the tendency of the frequency error with respect to the reference clock of the internal clock is expressed by the value (reception interval) measured by the internal clock and the theoretical value. Accurate determination can be made by a simple calculation process using the cumulative addition value of the difference between them. Therefore, the internal clock can be maintained with a constant accuracy, and the internal clock accuracy error can be further reduced.
また、内部クロックを一定の精度で維持することができることから、受信装置に用いる発振器として安価な電圧制御型の水晶発振器を用いることができる。よって、受信装置のコストを低くすることができる。このコスト低減効果は、送信装置に対して受信装置の数が多いほど大きくなる。 In addition, since the internal clock can be maintained with a certain accuracy, an inexpensive voltage-controlled crystal oscillator can be used as the oscillator used in the receiving apparatus. Therefore, the cost of the receiving device can be reduced. This cost reduction effect increases as the number of receiving devices increases with respect to the transmitting device.
さらに、差分の累積加算値が所定の閾値範囲から外れるたびに、内部クロックの周波数を基準クロックの周波数に近づけるように修正するため、一回の周波数の調整量を低く抑えることができる。よって、周波数精度の調整によるクロックタイミングの変動を小さく抑えることができる。 Furthermore, since the internal clock frequency is corrected so as to approach the reference clock frequency each time the accumulated difference value is out of the predetermined threshold range, the frequency adjustment amount can be kept low. Therefore, fluctuations in clock timing due to adjustment of frequency accuracy can be suppressed.
さらに、受信装置側でタイミング情報の順序番号を管理しており、IPネットワークの一時的な状態変動によってタイミング情報の抜けや、転送順序の入れ替わりが発生した場合には、そのタイミング情報の受信データを無効にするようになっているので、内部クロックの基準クロックに対する周波数誤差の傾向を正確に判断することができ、受信装置における周波数精度の信頼度が向上する。 Furthermore, the order number of the timing information is managed on the receiving device side, and when the timing information is lost or the transfer order is changed due to a temporary state change of the IP network, the received data of the timing information is changed. Since it is made invalid, the tendency of the frequency error of the internal clock with respect to the reference clock can be accurately determined, and the reliability of the frequency accuracy in the receiving apparatus is improved.
次に、本発明の実施形態について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.
本発明の一実施形態であるクロック同期システムを構成する受信装置、送信装置の主要部をそれぞれ図1、図2に示し、システム全体の構成を図3に示す。以下、図1〜図3を参照して、本実施形態のクロック同期システムの構成を説明する。 The main parts of a receiving apparatus and a transmitting apparatus constituting a clock synchronization system according to an embodiment of the present invention are shown in FIGS. The configuration of the clock synchronization system of this embodiment will be described below with reference to FIGS.
図3を参照すると、基準発振器301から基準クロックが供給される送信装置2がIPネットワーク302を介して受信装置1と通信可能に接続されている。送信装置2の主要部は、図2に示すように、タイミングカウンタ201、データ生成部202、UDPインタフェース203、IPインタフェース204およびETHERインタフェース205からなる。
Referring to FIG. 3, a
タイミングカウンタ201は、基準発振器301から供給される基準クロックを分周したクロックに基づいて、予め定められた間隔でタイミング情報を送出するための周期タイミングを生成するものである。このタイミングカウンタ201のカウント時間設定は可変で、外部から予め設定することができる。
The
データ生成部202は、順序番号データとタイミング間隔データを含むタイミング情報を生成し、その生成したタイミング情報をタイミングカウンタ201から供給される周期タイミングでUDPインタフェース203に供給する。順序番号データは、生成したタイミング情報が何番目の情報にあたるかを示すデータであって、その値はタイミング情報を生成する度に1ずつ加算され、ある一定の値に達したところで初期値に戻るようになっている。タイミング間隔データは、タイミング情報の送出間隔を示すデータであって、タイミングカウンタ201から供給される周期タイミングの間隔と一致する。
The
UDPインタフェース203は、データ生成部202から供給されたタイミング情報に、当該タイミング情報を転送するためのUDPポート番号が書かれたUDPヘッダを付加してIPインタフェース204へ転送する。
The
IPインタフェース204は、UDPインタフェース203から転送されたデータに、宛先IPアドレスとして受信装置1のIPアドレス、発信元IPアドレスとして自己のIPアドレスが書かれたIPヘッダを付加し、これを送信データとしてETHERインタフェース205へ供給する。図4に、送信データのフォーマット例を示す。この例では、送信データ401は、先頭からIPヘッダ、UDPヘッダが順次設けられており、UDPヘッダの後に、タイミング情報である順序番号データおよびタイミング間隔データが順次格納されるようになっている。IPヘッダの宛先IPアドレスは、受信装置1のIPアドレスである。UDPヘッダのポート番号は、タイミング情報転送のために割り当てた固有の値である。
The
ETHERインタフェース205は、IPネットワークの物理インタフェースとしてイーサネットのインタフェース機能を有しており、IPインタフェース204から供給された送信データをIPネットワーク302上に送出する。このIPネットワーク302上に送出された送信データが、受信装置1にて受信される。
The
受信装置1の主要部は、図1に示すように、ETHERインタフェース101、IPインタフェース102、UDPインタフェース103、タイミングカウンタ104、カウンタデータラッチ部105、データ抽出部106、期待値演算部107、差分演算部108、誤差判定部109、D/Aコンバータ110、電圧制御水晶発振回路(VCXO)111および分周期112からなる。
As shown in FIG. 1, the main part of the receiving
ETHERインタフェース101は、IPネットワーク302の物理インタフェースとしてイーサネットのインタフェース機能を有しており、送信装置2からIPネットワーク302を介して受信したデータをIPインタフェース102へ転送する。IPインタフェース102は、IPプロトコルの終端機能を有しており、受信データの宛先IPアドレスと、受信装置1に予め割り当てられているIPアドレスとを比較し、両IPアドレスが一致している場合にのみ、受信データをUDPインタフェース103へ転送する。すなわち、受信装置1宛で、かつ、発信元IPアドレスが送信装置1と判断された受信データのみが、IPインタフェース102からUDPインタフェース103へ転送される。
The
UDPインタフェース103は、UDPプロトコルの終端機能を有しており、IPインタフェース102から転送された受信データのUDPヘッダの宛先ポート番号がタイミング情報転送のために割り当てられたポート番号(固有値)であるかを照合する。照合が一致した場合は、UDPインタフェース103は、タイミング情報の受信を検出した旨をタイミングカウンタ104へ通知するとともに、タイミング情報に該当するデータをデータ抽出部106へ転送する。タイミングカウンタ104は、VCXO111の出力クロックを分周器112で分周したクロックが入力されており、この入力クロックでカウント動作を行う。また、タイミングカウンタ104は、UDPインタフェース103からタイミング情報受信検出の通知を受けると、カウント値をクリアしてカウント動作を継続する。
The
カウンタデータラッチ部105は、タイミングカウンタ104がタイミング情報受信検出の通知を受けてカウント値をクリアする直前のカウント値を保持する。このカウンタデータラッチ部105がラッチしたカウント値は、前回のタイミング情報を受信したタイミングから、次にタイミング情報を受信するタイミングまでの間隔をカウントした値に相当する。データ抽出部106は、UDPインタフェース103から転送されたデータから、順序番号データとタイミング間隔データを抽出する。順序番号データは、タイミング情報の送出順序が判別できる連番であって、ある一定の値まで増加したところで初期値に戻される。タイミング間隔データは、タイミング情報が送出される間隔の時間情報を示す。
The counter data latch
期待値演算部107は、データ抽出部106から供給される順序番号データとタイミング間隔データからタイミング情報の送信間隔を取得する。また、期待値演算部107は、VCXO111の出力クロックの周波数が送信側の基準クロックの周波数と等しい状態(理想のクロック精度)にあるときに、その取得したタイミング情報の送信間隔についてタイミングカウンタ104がどれだけカウントするかの理論値を演算する。差分演算部108は、カウンタデータラッチ部105がラッチしたカウント値から、期待値演算部107が出力するカウント理論値を差し引いた値を演算する。
The expected
誤差判定部109の出力であるディジタル値はD/Aコンバータ110を介して制御電圧としてVCXO111に供給されている。誤差判定部109は、差分演算部108の演算結果を累積加算し、この累積加算結果が予め定められた上限値、下限値の範囲内であるかどうかを判定する。累積加算結果が上限値を超えた場合は、誤差判定部109は、D/Aコンバータ110の出力を減少させるようにディジタル値出力を制御する。反対に、累積加算結果が下限値を下回った場合は、誤差判定部109は、D/Aコンバータ110の出力を増加させるようにディジタル値出力を制御する。累積加算の演算結果が上限値と下限値の範囲内にある場合は、誤差判定部109は、ディジタル値出力の制御は行わずに、D/Aコンバータ110の出力をそのまま維持させる。
The digital value output from the
D/Aコンバータ110は、誤差判定部109から供給されるディジタル値に応じたアナログ電圧をVCXO111へ供給する。VCXO111は、D/Aコンバータ110から供給されるアナログ電圧が高い場合は、出力クロックの周波数が高くなり、アナログ電圧が低い場合は出力クロックの周波数が低くなるように制御される。このVCXO111の出力は、分周器112に供給されるとともに、精度調整クロックとして外部へ出力されている。分周器112は、VCXO111の出力を分周したクロックをカウント用クロックとしてタイミングカウンタ104へ供給する。
The D /
なお、データ抽出部106は、タイミング情報から抽出した順序番号データに、抜けや番号の入れ替わりの異常を検出した場合は、期待値演算部107に対して、カウント理論値の代わりにカウンタデータラッチ部105のカウント値と同じ値を差分演算部108へ出力する旨を通知する。この通知により、順序番号異常検出時は、差分演算部108の差分演算結果が0となり、タイミング情報のデータは無効になる。
When the
次に、本実施形態のクロック同期システムのクロック同期動作について説明する。 Next, the clock synchronization operation of the clock synchronization system of this embodiment will be described.
(1)送信装置2の動作:
図5に、送信装置2におけるタイミング情報の送信動作の一手順を示す。送信装置2が起動されると、まず、タイミングカウンタ201のカウント時間設定が行われる(ステップS10)。カウント時間はタイミング情報の送出間隔を決める定数で、ここでは10秒とする。カウント時間設定後、タイミングカウンタ201が、基準発振器301から供給される基準クロックによるカウントを開始し(ステップS11)、データ生成部202が、タイミングカウンタ201から周期タイミングが通知される前に、タイミング情報を生成する。このデータ生成部202にて生成されるタイミング情報は、図4に示した送信データ401における順序番号データとタイミング間隔データである。この時点の送信データ401における順序番号データは「0」で、タイミング間隔データは固定値「10秒」である。
(1) Operation of transmitting apparatus 2:
FIG. 5 shows a procedure of the timing information transmission operation in the
カウントが開始されると、タイミングカウンタ201がタイムアウトしたか否かが判断される(ステップS13)。カウント開始から10秒が経過してタイムアウトすると、タイミングカウンタ201は、そのタイムアウトしたタイミングで周期タイミングをデータ生成部202に通知するとともに、カウント値をクリアして、再びカウントを開始する(ステップS14)。タイムアウトしていない場合は、タイミングカウンタ201は、タイムアウトするまでカウント動作を継続する。
When the counting is started, it is determined whether or not the
データ生成部201は、タイミングカウンタ201から周期タイミングの通知を受けると、上記ステップS12で生成したタイミング情報をUDPインタフェース203へ転送してデータ送信を行わせる(ステップS15)。このデータ送信では、UDPインタフェース203が、タイミング情報転送のための宛先ポート番号を書いたUDPヘッダを付加する。タイミング情報転送のための宛先ポート番号は、予め送信装置2と受信装置1の間で定めている固有の値である。また、IPインタフェース204が、UDPインタフェース203から転送されたデータに、宛先IPアドレスとして受信装置のIPアドレス、発信元IPアドレスとして送信装置のIPアドレスを書いたIPヘッダを付加する。そして、ETHERインタフェース205が、IPインタフェース204が生成したデータをIPネットワーク302上へ送出する。
When receiving the notification of the cycle timing from the
データ送信後、データ生成部201は、送信したデータのタイミング情報の順序番号xがn(ここでは、n=5と仮定する。)になったかどうかを判断する(ステップS16)。この判断で「No」となった場合は、データ生成部201は、順序番号xの値を「1」増やして、ステップS12にて次のタイミング情報を生成する。「Yes」となった場合は、データ生成部201は、順序番号xの値を「0」にして、ステップS12にて次のタイミング情報を生成する。
After the data transmission, the
以上のタイミング情報の送信動作によれば、送信装置2は、10秒毎に、タイミング情報のデータを送信する。タイミング情報に含まれる順序番号データは、最初の送信時は「0」で、送信の度に1つずつ増加していき、「5」になった後は、「0」にクリアされて、再び送信の度に1つずつ増加する。よって、受信側では、この順序番号データを参照することで、タイミング情報が正しい順番で受信されているかどうかを確認することができる。
According to the timing information transmission operation described above, the
(2)受信装置1の動作:
(2−a)まず、受信装置1におけるクロック同期の一連の動作について説明する。図6に、受信装置1のクロック同期動作の一手順を示す。受信装置1では、タイミング情報のデータが受信されると(ステップS20)、その受信データからタイミング情報が抽出される(ステップS21)。このタイミング情報の抽出では、まず、IPインタフェース102が、ETHERインタフェース101にて受信したデータのIPヘッダのIPアドレスを比較する。宛先IPアドレスが受信装置1のIPアドレスであり、かつ、発信元IPアドレスが送信装置2のIPアドレスと一致する場合には、IPインタフェース102は、受信データをUDPインタフェース103へ転送する。UDPインタフェース103は、IPインタフェース102から転送された受信データのUDPヘッダの宛先ポート番号が、タイミング情報転送のために割り当てられた番号(固有値)と一致するかどうかを調べ、一致した場合は、タイミング情報を検出したことをタイミングカウンタ104へ通知するとともに、受信データをデータ抽出部106へ転送する。
(2) Operation of receiving apparatus 1:
(2-a) First, a series of clock synchronization operations in the receiving
タイミングカウンタ104は、前回のタイミング情報受信時からのカウント動作を継続しており、UDPインタフェース103からデータ受信検出通知を受けると、該通知を受けた時点のカウント値Cyをカウンタデータラッチ部105にラッチさせた後、カウント値をクリアして、カウントを再び開始する(ステップS22)。これに並行して、データ抽出部106が、今回のUDPインタフェース103から転送された受信データのタイミング情報に含まれている順序番号データの番号が、前回の受信データのタイミング情報に含まれている順序番号データの番号に1を加えた番号であるかどうか、すなわちタイミング情報が正常な順序で受信されているかどうかを確認する(ステップS23)。
The
順序番号データの番号に抜けや入れ替わりがなく、上記ステップS23にて「正常」と判断した場合は、データ抽出部106は、今回の受信データのタイミング情報に含まれているタイミング間隔データより、送信装置2の送出タイミング間隔が10秒であることを期待値演算部107へ通知し、期待値演算部107がその通知に基づいてカウント理論値Cxを演算する(ステップS24)。具体的には、分周部112の出力クロックの周波数が基準発振器301から供給される基準クロックの周波数と等しい状態において、タイミングカウンタ104が1秒間に10000カウントするものと仮定した場合は、期待値演算部107は、送信装置1の送出タイミング間隔が10秒であることと、タイミングカウンタ104が1秒間に10000カウントすることを前提とし、受信データ間隔が10秒であった場合のタイミングカウンタ104のカウント理論値として「100000」を演算する。
If there is no omission or replacement in the number of the sequence number data and it is determined as “normal” in step S23, the
他方、順序番号データの番号に抜けや入れ替わりがあり、上記ステップS23にて「異常」と判断した場合は、データ抽出部106が、期待値演算部107に対して、カウント理論値Cxとして、カウンタデータラッチ部105にてラッチしてあるカウント値Cyと同じ値を差分演算部108へ出力するよう通知を行う(ステップS25)。
On the other hand, if the number of the sequence number data is missing or replaced, and if it is determined as “abnormal” in step S23, the
上記ステップS22にてカウンタデータラッチ部105からラッチしたカウント値Cyが供給され、上記ステップS24またはS25にて期待値演算部107からカウント理論値Cxが供給されると、差分演算部108が、カウント値Cyからカウント理論値Cxを差し引いた値を演算する(ステップS26)。そして、誤差判定部109が、差分演算部108の演算結果を累積加算する(ステップS27)とともに、この累積加算結果が予め定められた上限値、下限値の閾値範囲内であるかどうかを調べる(ステップS28)。
When the count value Cy latched from the counter data latch
上記ステップS28にて、累積加算結果が上限値を超えた場合は、誤差判定部109は、VCXO111の周波数を低下させるように制御する(ステップS29)。反対に、上記ステップS28にて、累積加算結果が下限値を下回った場合は、誤差判定部109は、VCXO111の周波数を上昇させるように制御する(ステップS30)。これら以外の場合、すなわち、累積加算結果が閾値範囲内にある場合は、誤差判定部109は、VCXO111の周波数制御は行わない(ステップS31)。ステップS29〜S31のいずれかのステップが行われた後は、上記ステップS20に戻ってデータを受信する。
When the cumulative addition result exceeds the upper limit value in step S28, the
(2−b)次に、タイミングカウンタ104のカウント値と期待値演算部107のカウント理論値との関係について、図7を参照して具体的に説明する。
(2-b) Next, the relationship between the count value of the
図7において、送信タイミングA0、A1、A2、A3、A4は、送信装置2がタイミング情報を送信するタイミングであり、そのタイミング間隔は10秒である。受信タイミングB0、B1、B2、B3、B4は、受信装置2が、送信装置2が送信したタイミング情報をIPネットワーク302を介して受信するタイミングであって、それぞれ送信タイミングA0、A1、A2、A3、A4で送信されたタイミング情報の受信タイミングに相当する。IPネットワーク302の転送遅延はトラフィック等の状況により均等でないためにばらつき(ゆらぎ)があり、このため受信タイミングB0、B1、B2、B3、B4の各間隔には、タイミング情報の送信間隔である10秒に対して転送遅延のゆらぎに応じた偏差が生じている。具体的には、受信タイミングB0、B1の間隔および受信タイミングB3、B4の間隔は、いずれも10秒より長くなっているが、受信タイミングB1、B2の間隔および受信タイミングB2、B3の間隔は、いずれも10秒より短くなっている。
In FIG. 7, transmission timings A0, A1, A2, A3, and A4 are timings at which the
図7に示した例の場合、タイミングカウンタ104は、受信タイミングB0でカウント値をクリアし、次の受信タイミングB1までの間隔をカウントする。受信タイミングB1で、タイミングカウンタ104のカウント値がカウンタデータラッチ部105にてラッチされる。期待値演算部107は、受信タイミングB0から10秒後のタイミングC1でのカウント値、すなわち周波数が基準クロックの周波数に等しいクロックでカウント動作した場合のタイミングカウンタ104のカウント値をカウント理論値とする。差分演算部108は、カウンタデータラッチ部105にてラッチされたカウント値から期待値演算部107にて演算されたカウント理論値を差し引いた差分値D1を求める。この場合は、受信タイミングB0、B1の間隔が10秒より長いので、差分値D1は正の値となる。誤差判定部109は、この差分値D1が上限値、下限値の閾値範囲内にあるかどうかを判定し、この判定結果に応じて図6のステップS29〜S31のいずれかのVCXO111の周波数制御を行う。
In the example shown in FIG. 7, the
続いて、タイミングカウンタ104は、受信タイミングB1でカウント値をクリアし、次の受信タイミングB2までの間隔をカウントする。受信タイミングB2で、タイミングカウンタ104のカウント値がカウンタデータラッチ部105にてラッチされる。期待値演算部107は、受信タイミングB1から10秒後のタイミングC2でのカウント値、すなわち周波数が基準クロックの周波数に等しいクロックでカウント動作した場合のタイミングカウンタ104のカウント値をカウント理論値とする。差分演算部108は、カウンタデータラッチ部105にてラッチされたカウント値から期待値演算部107にて演算されたカウント理論値を差し引いた差分値D2を求める。この場合は、受信タイミングB1、B2の間隔が10秒より短いので、差分値D2は負の値となる。誤差判定部109は、こうして演算された差分値D2を、上記差分値D1と累積加算し、その加算結果に応じて図6のステップS29〜S31のいずれかのVCXO111の周波数制御を行う。
Subsequently, the
上記と同様な手順で、受信タイミングB2、B3の間では差分値D3が、受信タイミングB3、B4の間では差分値D4がそれぞれ演算されて累積加算され、その加算結果に応じて図6のステップS29〜S31のいずれかのVCXO111の周波数制御が行われる。受信タイミングB4以降も、同様な差分値の演算およびその累積加算結果に基づくVCXO111の周波数制御が行われる。
In the same procedure as described above, the difference value D3 is calculated between the reception timings B2 and B3, and the difference value D4 is calculated and cumulatively added between the reception timings B3 and B4. Depending on the addition result, the steps of FIG. The frequency control of the
(2−c)次に、差分値の累積加算結果に基づくVCXO111の周波数制御について詳細に説明する。
(2-c) Next, the frequency control of the
図8に、図1に示した誤差判定部109の具体的な構成を示す。図8を参照すると、誤差判定部109は、加算回路501、絶対値比較回路502、符号判定回路503、セレクタ回路504および加算回路505からなる。
FIG. 8 shows a specific configuration of the
加算回路501は、差分演算部108の出力値と前回の加算結果を加算する。絶対値比較回路502は、加算回路501にて累積加算された結果と予め設定されている上限値および下限値とを絶対値で比較し、その比較結果をセレクタ回路504に通知する。ここでは、上限値と下限値の絶対値の大きさは同じとし、その値は可変であり、外部から自由に設定できるものとする。符号判定回路503は、加算回路501にて累積加算された結果が正の値であるか、負の値であるかの符号判定を行い、その判定結果をセレクタ回路504に通知する。
The
セレクタ回路504は、「+1」、「−1」、「0」の3つのディジタル値のうちから1つの制御値を選択して出力するものであって、その選択は、絶対値比較回路502からの比較結果および符号判定回路503からの判定結果に応じて行われる。具体的には、絶対値比較回路502からの比較結果として、累積加算結果が上限値(=下限値の絶対値)を超えた旨が通知され、符号判定回路503からの判定結果として正の値である旨が通知された場合は、セレクタ回路504は制御値として「−1」を選択出力する。また、絶対値比較回路502からの比較結果として、累積加算結果が上限値(=下限値の絶対値)を超えた旨が通知され、符号判定回路503からの判定結果として負の値である旨が通知された場合は、セレクタ回路504は制御値として「+1」を選択出力する。絶対値比較回路502からの比較結果として、累積加算結果が上限値(=下限値の絶対値)以内である旨が通知された場合は、セレクタ回路504は制御値として「0」を選択出力する。
The
加算回路505は、その出力であるディジタル値がD/Aコンバータ110を介してVCXO111に制御電圧として供給されるようになっている。また、加算回路505は、初期値としてVCXO111の制御範囲の中央に相当する制御値を保持しており、この保持した値にセレクタ回路504の選択した制御値を順次加算する。
The
以上のように構成された誤差判定部109では、加算回路501にて累積加算された結果が予め設定されている上限値を超えると、絶対値比較回路502が、累積加算結果が上限値(=下限値の絶対値)を超えた旨の比較結果をセレクタ回路504へ通知すると同時に、符号判定回路503が、累積加算結果が正の値である旨の判定結果をセレクタ回路504へ通知する。そして、セレクタ回路504が、これら比較結果および判定結果に応じて制御値として「−1」を選択出力し、加算回路505が、現在保持しているディジタル値に「−1」を加算する。この結果、VCXO111は、その出力クロックの周波数が低くなる方向に制御される。
In the
加算回路501にて累積加算された結果が予め設定されている下限値を下回ると、絶対値比較回路502が、累積加算結果が上限値(=下限値の絶対値)を超えた旨の比較結果をセレクタ回路504へ通知すると同時に、符号判定回路503が、累積加算結果が負の値である旨の判定結果をセレクタ回路504へ通知する。そして、セレクタ回路504が、これら比較結果および判定結果に応じて制御値として「+1」を選択出力し、加算回路505が、現在保持しているディジタル値に「+1」を加算する。この結果、VCXO111は、その出力クロックの周波数が高くなる方向に制御される。
When the result of cumulative addition by the
加算回路501にて累積加算された結果が予め設定されている上限値および下限値の閾値範囲内にある場合は、絶対値比較回路502が、累積加算結果が上限値(=下限値の絶対値)以下である旨の比較結果をセレクタ回路504へ通知すると同時に、符号判定回路503が、累積加算結果の符号判定結果(この場合の符号は、「正」と「負」のいずれかをとる)をセレクタ回路504へ通知する。そして、セレクタ回路504が、これら比較結果および判定結果に応じて制御値として「0」を選択出力し、加算回路505が、現在保持しているディジタル値に「0」を加算する。この結果、VCXO111は、現在の状態を維持するように制御される。
If the result of cumulative addition by the
以下、誤差判定部109による制御動作について具体例を挙げて説明する。
Hereinafter, the control operation by the
加算回路501が、差分演算部108の演算結果である、図7に示した差分値D1、D2、D3、D4を順次累積加算するものとする。ここで、あるタイミング情報の受信タイミングBxは、送信タイミングAxに対してIPネットワーク302の転送遅延が加わるが、必ずIPネットワーク302の最大遅延時間と最小遅延時間の間にある。このため、差分値Dxの大きさは、最大遅延時間と最小遅延時間の差に相当する値よりも大きくなることはない。
Assume that the adding
図9に、図7に示した差分値D1〜D4を累積加算した値の変化を模式的に示す。受信タイミングB1〜B4は、いずれも最大遅延時間T2と最小遅延時間T1との間にある。差分値Dxについて符号を加味して累積加算した結果は、±(T2−T1)以内の値となる。例えば、IPネットワーク302の最大遅延時間T2を6秒、最小遅延時間T1を1秒と仮定すると、加算回路501の累積加算値は±5秒相当の±50000以下の値となる。
FIG. 9 schematically shows a change in the value obtained by cumulatively adding the difference values D1 to D4 shown in FIG. The reception timings B1 to B4 are all between the maximum delay time T2 and the minimum delay time T1. The result of cumulative addition with the sign added to the difference value Dx is a value within ± (T2−T1). For example, assuming that the maximum delay time T2 of the
図10は、図1に示したタイミングカウンタ104が理想精度のクロックでカウント動作している場合の動作例である。この例では、図7に示した差分値D1〜D4が以下のような値をとると仮定する。
FIG. 10 shows an operation example when the
D1=+4000(+0.4秒)
D2=−3000(−0.3秒)
D3=−4000(−0.4秒)
D4=+3000(+0.3秒)
上記の場合、累積加算値は、受信タイミングB1の時点で「+4000」、受信タイミングB2の時点で「+1000」、受信タイミングB3の時点で「−3000」、受信タイミングB4の時点で「0」となる。
D1 = + 4000 (+0.4 seconds)
D2 = −3000 (−0.3 seconds)
D3 = −4000 (−0.4 seconds)
D4 = + 3000 (+0.3 seconds)
In the above case, the cumulative addition value is “+4000” at the time of reception timing B1, “+1000” at the time of reception timing B2, “−3000” at the time of reception timing B3, and “0” at the time of reception timing B4. Become.
ところが、VCXO111の出力クロックの周波数が基準クロックの周波数より高い場合は、タイミングカウンタ104は、理想の周波数(基準クロックの周波数に一致する)のクロックで動作する場合に比べて多めにカウントすることになる。図11に、タイミングカウンタ104が、図10に示した例に比べて毎回100だけ多くカウントする場合の動作例を示す。この例では、図7に示した差分値D1〜D4が以下のような値をとる。
However, when the frequency of the output clock of the
D1=+4100(+0.41秒)
D2=−2900(−0.29秒)
D3=−3900(−0.39秒)
D4=+3100(+0.31秒)
上記の場合、累積加算値は、受信タイミングB1の時点で「+4100」、受信タイミングB2の時点で「+1200」、受信タイミングB3の時点で「−2700」、受信タイミングB4の時点で「+400」となる。このような累積加算値の変化が継続すると、加算回路501の累積加算値は増加し続けることとなり、ある受信タイミングで上限の前提である+50000を超える。絶対値比較回路502は上限値および下限値の絶対値を50000としており、累積加算値が50000の閾値を超えたことをセレクタ回路504へ通知する。同時に、符号判定回路503は、累積加算値の符号が正であることをセレクタ回路504へ通知する。そして、セレクタ回路504が、D/Aコンバータ110のディジタル値に「−1」を加算する制御値を選択する。
D1 = + 4100 (+0.41 second)
D2 = -2900 (-0.29 seconds)
D3 = −3900 (−0.39 seconds)
D4 = + 3100 (+0.31 seconds)
In the above case, the cumulative addition value is “+4100” at the time of reception timing B1, “+1200” at the time of reception timing B2, “−2700” at the time of reception timing B3, and “+400” at the time of reception timing B4. Become. When such a change in the cumulative addition value continues, the cumulative addition value of the
反対に、VCXO111の周波数が基準クロックの周波数より低い場合は、タイミングカウンタ104は、理想の周波数(基準クロックの周波数に一致する)のクロックで動作する場合に比べて少なめにカウントすることになる。図12に、タイミングカウンタ104が、図10に示した例に比べて毎回100だけ少なくカウントする場合の動作例を示す。この例では、図7に示した差分値D1〜D4が以下のような値をとる。
On the other hand, when the frequency of the
D1=+3900(+0.39秒)
D2=−3100(−0.31秒)
D3=−4100(−0.41秒)
D4=+2900(+0.29秒)。
D1 = + 3900 (+0.39 seconds)
D2 = -3100 (-0.31 second)
D3 = -4100 (-0.41 second)
D4 = + 2900 (+0.29 seconds).
上記の場合、累積加算値は、受信タイミングB1の時点で「+3900」、受信タイミングB2の時点で「+800」、受信タイミングB3の時点で「−3800」、受信タイミングB4の時点で「−400」となる。このような累積加算値の変化が継続すると、加算回路501の累積加算値は減少し続けることとなり、ある受信タイミングで下限の前提である−50000を下回る。絶対値比較回路502は上限値および下限値の絶対値を50000としており、累積加算値が50000の閾値を超えたことをセレクタ回路504へ通知する。同時に、符号判定回路503は、累積加算値の符号が負であることをセレクタ回路504へ通知する。そして、セレクタ回路504が、D/Aコンバータ110のディジタル値に「+1」を加算する制御値を選択する。
In the above case, the cumulative addition value is “+3900” at the time of reception timing B1, “+800” at the time of reception timing B2, “−3800” at the time of reception timing B3, and “−400” at the time of reception timing B4. It becomes. If such a change in the cumulative addition value continues, the cumulative addition value of the
以上説明したように、本実施形態のクロック同期システムによれば、受信装置1は、タイミング情報の受信を繰り返すことで、自装置内のVCXO111の周波数精度誤差を判定する。そして、VCXO111の周波数が基準クロックの周波数より低い場合は、D/Aコンバータ110の出力電圧を高くしてVCXO111の周波数を高くし、反対に、VCXO111の周波数が基準クロックの周波数より高い場合は、D/Aコンバータ110の出力電圧を低くしてVCXO111の周波数を低くする。このような制御を行う場合、例えば、タイミングカウンタ104が、理想の周波数(基準クロックの周波数に一致する)のクロックでタイミング情報の送信間隔である10秒間をカウントした値を「100000」とすると、IPネットワーク302の安定な状態が長時間続く場合は、送信装置2の基準クロックに対して10ppmの精度で受信装置1のVCXO111の周波数の調整が可能である。
As described above, according to the clock synchronization system of the present embodiment, the receiving
また、タイミング情報の順序番号に「・・2、4、3、5、0、1、2・・」のような連続性に異常がある場合は、データ抽出部106が、そのことを検出し、期待値演算部107に対して、通常のカウント理論値の演算を行うのではなく、カウンタデータラッチ部105にてラッチされているカウント値と同じ値をカウント理論値とするように通知する。この結果、順序番号4、3、5の受信データに対して、期待値演算部107は、カウント理論値としてカウンタデータラッチ部105にてラッチされているカウント値と同じ値を差分演算部108へ出力することになる。これにより、差分演算部108の差分値は0となり、順序番号4、3、5の受信データは無効となる。
In addition, when the sequence number of the timing information has an abnormality in continuity such as “• 2, 4, 3, 5, 0, 1, 2,...”, The
また、受信装置1の起動時は、初回の受信データにおいて、タイミングカウンタ104のカウント値に意味を持たないため、データ抽出部106が、期待値演算部107に対して、カウンタデータラッチ部105にてラッチされているカウント値と同じ値をカウント理論値とするように通知する。これにより、初回の差分演算部108の差分値が0となり、初回の受信データは無効となる。
In addition, when the receiving
(他の実施形態)
図13は、本発明の他の実施形態であるクロック同期システムに用いられる受信装置の主要部の構成を示すブロック図である。この受信装置は、図3に示したシステムにおいて用いられるものであって、図1に示した受信装置1の構成において、差分演算部108を除去し、タイミングカウンタ104に代えてタイミングダウンカウンタ604を設けたものである。本実施形態では、期待値演算部107のカウント理論値をタイミングダウンカウンタ604の初期値としてセットすることで、図1の差分演算部108が不要な構成を実現している。
(Other embodiments)
FIG. 13 is a block diagram showing a configuration of a main part of a receiving apparatus used in a clock synchronization system according to another embodiment of the present invention. This receiving apparatus is used in the system shown in FIG. 3, and in the configuration of the receiving
タイミングダウンカウンタ604は、周知のダウンカウンタで構成されるものであって、期待値演算部107が受信データよりカウント理論値を演算した結果がカウンタ初期値としてセットされ、次の受信タイミングまでそのセットされた初期値からダウンカウントするようになっている。ダウンカウントが初期値より多い場合は、負の値でカウント値を表現する。また、タイミングダウンカウンタ604は、UDPインタフェース103からタイミング情報検出の通知を受けると、その時点のカウント値をカウンタデータラッチ部105にラッチさせるとともに、期待値演算部107の理論値を初期値としてセットし、ダウンカウントを継続する。カウンタデータラッチ部105にてラッチされる値は、期待値演算部107の理論値から、受信データ間隔のカウント値を差し引いた値に等しい。
The timing down
誤差判定部109は、カウンタデータラッチ部105にてラッチされた値を累積加算する。VCXO111の周波数が基準クロックの周波数より高い場合は、タイミングダウンカウンタ604は理想の周波数(基準クロックの周波数に一致する)のクロックでカウントする場合に比べて多めにカウントするため、累積加算結果は負の値として大きくなる。反対に、VCXO111の周波数が基準クロックの周波数より低い場合は、タイミングダウンカウンタ604は理想の周波数(基準クロックの周波数に一致する)のクロックでカウントする場合に比べて少なめにカウントするため、累積加算結果は正の値として大きくなる。この関係は、図1に示した受信装置1の場合と逆になる。したがって、本実施形態では、誤差判定部109は、累積加算値が下限値を下回った場合は、D/Aコンバータ110へのディジタル値に「−1」を加算する制御を選択し、累積加算値が上限値を超えた場合には、D/Aコンバータ110へのディジタル値に「+1」を加算する制御を選択する。
The
以上のように本実施形態の受信装置では、タイミング情報の受信を繰り返すことで、自装置内のVCXO111の周波数精度誤差を判定するが、VCXO111の周波数が基準クロックの周波数より低い場合は、D/Aコンバータ110の出力電圧を低くしてVCXO111の周波数を低くし、反対に、VCXO111の周波数が基準クロックの周波数より高い場合は、D/Aコンバータ110の出力電圧を高くしてVCXO111の周波数を高くする。
As described above, the receiving apparatus according to the present embodiment determines the frequency accuracy error of the
なお、タイミング情報の順序番号の連続性に異常を検出した場合、データ抽出部106は、カウンタデータラッチ部105に対しラッチデータを0とするように通知して受信データを無効とする。
If an abnormality is detected in the continuity of the sequence numbers of the timing information, the
以上説明した各実施形態のクロック同期システムにおいて、送信装置2は、例えばサーバに代表されるコンピュータ装置であってもよく、また、受信装置1は、例えばパーソナルコンピュータに代表されるコンピュータ装置であってもよい。
In the clock synchronization system of each embodiment described above, the
また、1つの送信装置と複数の受信装置1とがネットワークを介して接続され、それぞれの受信装置1において上述した各実施形態で説明したような動作を実行するようにしてもよい。
In addition, one transmitter and a plurality of
さらに、IPネットワーク302の最大転送遅延時間より大きな時間間隔で、送信装置2がタイミング情報を送出するようにし、IPネットワーク302の最大遅延偏差に合わせて受信装置1の誤差判定部の閾値を設定してもよい。このような構成とすることで、IPネットワーク302の転送特性に柔軟に対応した、受信装置1のクロック精度誤差判定が可能となる。
Further, the
また、送信装置2が、受信装置1との通信開始後、一定の期間は、短い送信間隔(第1の送信間隔)でタイミング情報を生成して送信し、その後は、長い送信間隔(第2の送信間隔)でタイミング情報を生成して送信するようにしてもよい。このように構成することで、受信装置1では、最初の一定期間において、周波数の調整をより早く行うことが可能となる。加えて、周波数の調整が十分に行われた後は、送信間隔を長くして、効率的にタイミング情報を送信することができる。
Further, the
1 受信装置
2 送信装置
101、205 ETHERインタフェース
102、204 IPインタフェース
103、203 UDPインタフェース
104、201、604 タイミングカウンタ
105 カウンタデータラッチ部
106 データ抽出部
107 期待値演算部
108 差分演算部
109 誤差判定部
110 D/Aコンバータ
111 VCXO
112 分周器
202 データ生成部
301 基準発振器
302 IPネットワーク
401 送信データ
501、505 加算回路
502 絶対値比較回路
503 符号判定回路
504 セレクタ回路
DESCRIPTION OF
112
Claims (17)
ネットワークを介して前記タイミング情報を受信する受信装置とを有し、
前記受信装置は、
入力された制御電圧の大きさに応じて出力クロックの周波数が変化する発振器と、
前記発振器の出力から得られる内部クロックに基づいて前記タイミング情報の受信間隔を計時する計時手段と、
前記内部クロックの周波数が前記基準クロックの周波数と一致する理想状態で前記計時手段が前記タイミング情報に含まれている送信間隔を計時した場合の値を理論値として演算する期待値演算部と、
前記計時手段にて受信間隔が計時されるたびに、その計時された値と前記期待値演算部にて演算された理論値との差分を求めて累積加算するとともに、該累積加算値が、所定の閾値範囲から外れた場合に、前記内部クロックの周波数が前記基準クロックの周波数に近づくように前記制御電圧の大きさを制御する誤差判定部とを有することを特徴とするクロック同期システム。 A transmission device that transmits timing information including at least information on the predetermined transmission interval at a predetermined transmission interval based on a reference clock;
A receiving device for receiving the timing information via a network;
The receiving device is:
An oscillator in which the frequency of the output clock changes according to the magnitude of the input control voltage;
Clocking means for clocking the reception interval of the timing information based on an internal clock obtained from the output of the oscillator;
An expected value calculation unit that calculates a value when the timekeeping means measures a transmission interval included in the timing information in an ideal state where the frequency of the internal clock matches the frequency of the reference clock;
Each time the reception interval is timed by the time measuring means, the difference between the timed value and the theoretical value calculated by the expected value calculation unit is obtained and cumulatively added. And an error determination unit that controls the magnitude of the control voltage so that the frequency of the internal clock approaches the frequency of the reference clock when the frequency falls outside the threshold range.
前記タイミング情報を受信すると、それまで保持していたカウント値をクリアして、該タイミング情報の受信から次回のタイミング情報の受信までの間隔を前記内部クロックに基づいてカウントするタイミングカウンタと、
前記タイミングカウンタのクリアされる直前のカウント値を保持するラッチ回路とを有し、
前記誤差判定部が、前記タイミング情報が受信されるたびに、前記ラッチ回路に保持されたカウント値と前記期待値演算部にて演算された理論値との差分を求めて累積加算する、請求項1に記載のクロック同期システム。 The timing means is
When the timing information is received, the count value held so far is cleared, and a timing counter that counts an interval from the reception of the timing information to the reception of the next timing information based on the internal clock,
A latch circuit that holds a count value immediately before the timing counter is cleared;
The error determination unit obtains and cumulatively adds a difference between a count value held in the latch circuit and a theoretical value calculated by the expected value calculation unit every time the timing information is received. The clock synchronization system according to 1.
前記受信装置は、前記タイミング情報を受信すると、該受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断するデータ抽出部をさらに有し、
前記データ抽出部が、前記連続性に異常があると判断した場合は、前記ラッチ回路に保持されている値を前記期待値演算部にて演算される理論値として強制的に設定する、請求項2に記載のクロック同期システム。 The timing information further includes a sequence number indicating what number the transmitted information is,
The receiving device further includes a data extraction unit that, when receiving the timing information, determines a continuity based on a sequence number included in the received timing information,
When the data extracting unit determines that the continuity is abnormal, the value held in the latch circuit is forcibly set as a theoretical value calculated by the expected value calculating unit. the clock synchronization system as set forth in 2.
前記タイミング情報を受信すると、前記期待値演算部にて演算された理論値が初期値として設定されるとともに、該タイミング情報の受信から次回のタイミング情報の受信までの間隔を前記内部クロックに基づいてダウンカウントするタイミングダウンカウンタと、
前記タイミングダウンカウンタの初期値が設定される直前のカウント値を保持するラッチ回路とを有し、
前記誤差判定部が、前記タイミング情報が受信されるたびに、前記ラッチ回路に保持されたカウント値と前記期待値演算部にて演算された理論値との差分を求めて累積加算する、請求項1に記載のクロック同期システム。 The timing means is
When the timing information is received, the theoretical value calculated by the expected value calculation unit is set as an initial value, and the interval from the reception of the timing information to the reception of the next timing information is based on the internal clock. The timing down counter to count down,
A latch circuit that holds a count value immediately before the initial value of the timing down counter is set,
The error determination unit obtains and cumulatively adds a difference between a count value held in the latch circuit and a theoretical value calculated by the expected value calculation unit every time the timing information is received. The clock synchronization system according to 1.
前記受信装置は、前記タイミング情報を受信すると、該受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断するデータ抽出部をさらに有し、
前記データ抽出部が、前記連続性に異常があると判断した場合は、前記ラッチ回路に保持されているカウント値を強制的に0にする、請求項4に記載のクロック同期システム。 The timing information further includes a sequence number indicating what number the transmitted information is,
The receiving device further includes a data extraction unit that, when receiving the timing information, determines a continuity based on a sequence number included in the received timing information,
5. The clock synchronization system according to claim 4, wherein, when the data extraction unit determines that the continuity is abnormal, the count value held in the latch circuit is forcibly set to 0. 6.
入力された制御電圧の大きさに応じて出力クロックの周波数が変化する発振器と、
前記発振器の出力から得られる内部クロックに基づいて前記タイミング情報の受信間隔を計時する計時手段と、
前記内部クロックの周波数が前記基準クロックの周波数と一致する理想状態で前記計時手段が前記タイミング情報に含まれている送信間隔を計時した場合の値を理論値として演算する期待値演算部と、
前記計時手段にて受信間隔が計時されるたびに、その計時された値と前記期待値演算部にて演算された理論値との差分を求めて累積加算するとともに、該累積加算値が、所定の閾値範囲から外れた場合に、前記内部クロックの周波数が前記基準クロックの周波数に近づくように前記制御電圧の大きさを制御する誤差判定部とを有する受信装置。 A receiving device that receives timing information including information on at least the predetermined transmission interval, which is transmitted by the transmitting device at a predetermined transmission interval based on a reference clock, via a network;
An oscillator in which the frequency of the output clock changes according to the magnitude of the input control voltage;
Clocking means for clocking the reception interval of the timing information based on an internal clock obtained from the output of the oscillator;
An expected value calculation unit that calculates a theoretical value as a value when the time measuring unit measures a transmission interval included in the timing information in an ideal state where the frequency of the internal clock matches the frequency of the reference clock;
Each time the reception interval is timed by the time measuring means, the difference between the timed value and the theoretical value calculated by the expected value calculation unit is obtained and cumulatively added. And an error determination unit that controls the magnitude of the control voltage so that the frequency of the internal clock approaches the frequency of the reference clock when the frequency falls outside the threshold range.
前記タイミング情報を受信すると、それまで保持していたカウント値をクリアして、該タイミング情報の受信から次回のタイミング情報の受信までの間隔を前記内部クロックに基づいてカウントするタイミングカウンタと、
前記タイミングカウンタのクリアされる直前のカウント値を保持するラッチ回路とを有し、
前記誤差判定部が、前記タイミング情報が受信されるたびに、前記ラッチ回路に保持されたカウント値と前記期待値演算部にて演算された理論値との差分を求めて累積加算する、請求項7に記載の受信装置。 The timing means is
When the timing information is received, the count value held so far is cleared, and a timing counter that counts an interval from the reception of the timing information to the reception of the next timing information based on the internal clock,
A latch circuit that holds a count value immediately before the timing counter is cleared;
The error determination unit obtains and cumulatively adds a difference between a count value held in the latch circuit and a theoretical value calculated by the expected value calculation unit every time the timing information is received. 8. The receiving device according to 7 .
前記タイミング情報を受信すると、該受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断するデータ抽出部をさらに有し、
前記データ抽出部が、前記連続性に異常があると判断した場合は、前記ラッチ回路に保持されている値を前記期待値演算部にて演算される理論値として強制的に設定する、請求項8に記載の受信装置。 The timing information further includes a sequence number indicating what number the transmitted information is,
When receiving the timing information, further comprising a data extraction unit for determining the continuity based on the sequence number included in the received timing information,
When the data extracting unit determines that the continuity is abnormal, the value held in the latch circuit is forcibly set as a theoretical value calculated by the expected value calculating unit. 9. The receiving device according to 8 .
前記タイミング情報を受信すると、前記期待値演算部にて演算された理論値が初期値として設定されるとともに、該タイミング情報の受信から次回のタイミング情報の受信までの間隔を前記内部クロックに基づいてダウンカウントするタイミングダウンカウンタと、
前記タイミングダウンカウンタの初期値が設定される直前のカウント値を保持するラッチ回路とを有し、
前記誤差判定部が、前記タイミング情報が受信されるたびに、前記ラッチ回路に保持されたカウント値と前記期待値演算部にて演算された理論値との差分を求めて累積加算する、請求項7に記載の受信装置。 The timing means is
When the timing information is received, the theoretical value calculated by the expected value calculation unit is set as an initial value, and the interval from the reception of the timing information to the reception of the next timing information is based on the internal clock. The timing down counter to count down,
A latch circuit that holds a count value immediately before the initial value of the timing down counter is set,
The error determination unit obtains and cumulatively adds a difference between a count value held in the latch circuit and a theoretical value calculated by the expected value calculation unit every time the timing information is received. 8. The receiving device according to 7 .
前記タイミング情報を受信すると、該受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断するデータ抽出部をさらに有し、
前記データ抽出部が、前記連続性に異常があると判断した場合は、前記ラッチ回路に保持されているカウント値を強制的に0にする、請求項10に記載の受信装置。 The timing information further includes a sequence number indicating what number the transmitted information is,
When receiving the timing information, further comprising a data extraction unit for determining the continuity based on the sequence number included in the received timing information,
The receiving device according to claim 10 , wherein when the data extracting unit determines that the continuity is abnormal, the count value held in the latch circuit is forcibly set to zero.
外部より供給された基準クロックに基づいて、前記タイミング情報を所定の送信間隔で送信させるための周期タイミングを生成するタイミングカウンタと、
前記周期タイミングに基づいて、前記所定の送信間隔の情報と送信順序を示す順序番号とを含むデータを生成し、これを前記タイミング情報として送出するデータ生成部とを有し、
前記データ生成部が、前記受信装置との通信開始後、一定の期間は、前記所定の送信間隔として第1の送信間隔で前記タイミング情報を生成して送出し、その後は、前記第1の送信間隔より長い第2の送信間隔で前記タイミング情報を生成して送出する送信装置。 A transmission device that transmits timing information for clock synchronization to a reception device connected via a network,
A timing counter for generating a periodic timing for transmitting the timing information at a predetermined transmission interval based on a reference clock supplied from the outside;
A data generation unit that generates data including information on the predetermined transmission interval and a sequence number indicating a transmission order based on the cycle timing, and transmits the data as the timing information,
The data generation unit generates and transmits the timing information at a first transmission interval as the predetermined transmission interval for a certain period after the start of communication with the receiving device, and thereafter, the first transmission feeding a long second transmission interval than the interval you sent to generate the timing information communication apparatus.
前記送信装置が、基準クロックに基づいて所定の送信間隔で、少なくとも該所定の送信間隔の情報を含むタイミング情報を前記受信装置へ送信する第1のステップと、
前記受信装置が、前記タイミング情報を受信するたびに、前回のタイミング情報の受信から今回のタイミング情報の受信までの間隔を自己のクロックでカウントしたカウント値と、前記自己のクロックの周波数が前記基準クロックの周波数と一致する理想状態で、該自己のクロックに基づいて前記受信したタイミング情報に含まれている前記所定の送信間隔をカウントした場合の値である理論値との差分を求めて累積加算するとともに、該累積加算値が、所定の閾値範囲から外れた場合に、前記自己のクロックの周波数を前記基準クロックの周波数に近づく方向に調整する第2のステップとを含むクロック同期方法。 A clock synchronization method performed in a communication system in which a transmission device and a reception device are connected via a network,
A first step in which the transmitting device transmits timing information including at least information on the predetermined transmission interval to the receiving device at a predetermined transmission interval based on a reference clock;
Each time the receiving device receives the timing information, a count value obtained by counting the interval from the reception of the previous timing information to the reception of the current timing information with its own clock, and the frequency of the own clock is the reference Accumulated addition by calculating the difference from the theoretical value that is the value when counting the predetermined transmission interval included in the received timing information based on the own clock in an ideal state that matches the frequency of the clock And a second step of adjusting the frequency of the own clock in a direction approaching the frequency of the reference clock when the accumulated addition value is out of a predetermined threshold range.
前記受信装置が、前記タイミング情報を受信すると、該受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断し、該判断が異常となった場合は、前記受信したタイミング情報について算出される差分を強制的に0にするステップをさらに含む、請求項13に記載のクロック同期方法。 The timing information further includes a sequence number indicating what number the transmitted information is,
When the receiving device receives the timing information, it determines the continuity based on the sequence number included in the received timing information, and if the determination becomes abnormal, the received timing information The clock synchronization method according to claim 13 , further comprising forcibly setting the calculated difference to zero.
前記タイミング情報の受信間隔を自己のクロックでカウントするステップと、
前記自己のクロックの周波数が前記基準クロックの周波数と一致する理想状態で、該自己のクロックに基づいて前記タイミング情報に含まれている前記所定の送信間隔をカウントした場合の値である理論値を演算するステップと、
前記受信間隔のカウント値が得られるたびに、該得られたカウント値と前記理論値との差分を求めて累積加算するステップと、
前記累積加算した値が所定の閾値範囲から外れるかどうかで、前記自己のクロックの前記基準クロックに対する周波数誤差を判定するステップとを含むクロック周波数誤差判定方法。 A clock frequency error determination method performed in a receiving device that receives timing information including information on at least the predetermined transmission interval, which is transmitted by the transmitting device at a predetermined transmission interval based on a reference clock, via a network,
Counting the timing information reception interval with its own clock;
A theoretical value which is a value when the predetermined transmission interval included in the timing information is counted based on the own clock in an ideal state where the frequency of the own clock matches the frequency of the reference clock. A step of calculating;
Each time the count value of the reception interval is obtained, a step of obtaining a difference between the obtained count value and the theoretical value and accumulating the difference;
And determining a frequency error of the own clock with respect to the reference clock based on whether or not the accumulated value is out of a predetermined threshold range.
前記タイミング情報を受信すると、その受信したタイミング情報に含まれている順序番号に基づいてその連続性を判断し、該判断が異常となった場合に、前記受信したタイミング情報について算出される差分を強制的に0にするステップとをさらに含む、請求項16に記載のクロック周波数誤差判定方法。 The timing information further includes a sequence number indicating what number the transmitted information is,
When the timing information is received, the continuity is determined based on the sequence number included in the received timing information, and when the determination becomes abnormal, the difference calculated for the received timing information is calculated. The clock frequency error determination method according to claim 16 , further comprising: forcibly setting to zero.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003418052A JP3950847B2 (en) | 2003-12-16 | 2003-12-16 | Clock synchronization system and clock synchronization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003418052A JP3950847B2 (en) | 2003-12-16 | 2003-12-16 | Clock synchronization system and clock synchronization method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005184092A JP2005184092A (en) | 2005-07-07 |
JP3950847B2 true JP3950847B2 (en) | 2007-08-01 |
Family
ID=34780368
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003418052A Expired - Fee Related JP3950847B2 (en) | 2003-12-16 | 2003-12-16 | Clock synchronization system and clock synchronization method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3950847B2 (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4058067B2 (en) | 2005-09-28 | 2008-03-05 | 株式会社日立コミュニケーションテクノロジー | Communications system |
JP2008022326A (en) * | 2006-07-13 | 2008-01-31 | Kddi Corp | Data transmission method and system for asynchronous network |
JP4947447B2 (en) * | 2010-02-02 | 2012-06-06 | サイレックス・テクノロジー株式会社 | Real-time data transmission system |
JP4914933B2 (en) * | 2010-11-05 | 2012-04-11 | 株式会社日立製作所 | Communication system and slave device |
AT513112A1 (en) * | 2012-07-11 | 2014-01-15 | Felix Dipl Ing Dr Himmelstoss | Synchronization method and apparatus for oscillators |
JP6209065B2 (en) * | 2013-11-15 | 2017-10-04 | シナプティクス・ジャパン合同会社 | Communication apparatus and bidirectional communication system |
JP6385849B2 (en) * | 2015-02-17 | 2018-09-05 | 日本電信電話株式会社 | Time synchronization method and time synchronization apparatus |
JP6599135B2 (en) * | 2015-06-08 | 2019-10-30 | ナブテスコ株式会社 | Operated device, remote control system, remote control method, program |
WO2020044909A1 (en) * | 2018-08-31 | 2020-03-05 | 株式会社安川電機 | Industrial equipment control device and industrial equipment data collecting system |
CN113359948A (en) * | 2021-05-27 | 2021-09-07 | 山东中瑞电气有限公司 | Time synchronization device and synchronization method |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05236007A (en) * | 1992-02-17 | 1993-09-10 | Nec Corp | Sequence number provision data receiver |
JPH0630043A (en) * | 1992-07-13 | 1994-02-04 | Nec Corp | Voice packet communication system |
JP2778618B2 (en) * | 1995-02-10 | 1998-07-23 | 日本電気株式会社 | Transmission control method |
JP2000059347A (en) * | 1998-08-05 | 2000-02-25 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for radio communication |
JP3630601B2 (en) * | 1999-12-24 | 2005-03-16 | 沖電気工業株式会社 | IP terminal device, frequency error range estimation method, frequency difference estimation method, and estimated required time calculation method |
-
2003
- 2003-12-16 JP JP2003418052A patent/JP3950847B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005184092A (en) | 2005-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8295267B2 (en) | Clock synchronization system, method, and apparatus for communication | |
CN103763055A (en) | Method for precise time synchronization | |
EP2297627B1 (en) | Electronic timer system including look-up table based synchronization | |
US7916758B2 (en) | Method and system for precise-clock synchronization, and device for precise-clock frequency/time synchronization | |
US8223772B2 (en) | Clock supply device and transmission device | |
US11552871B2 (en) | Receive-side timestamp accuracy | |
JP3950847B2 (en) | Clock synchronization system and clock synchronization method | |
JP5223427B2 (en) | Clock synchronization system | |
EP1520365A1 (en) | A system and method for correcting the clock drift and maintaining the synchronization in wireless networks | |
US7596153B2 (en) | Clock-state correction and/or clock-rate correction using relative drift-rate measurements | |
WO2010058831A1 (en) | Packet-filter-used clock synchronization system, apparatus, method and program thereof | |
JP2016123009A (en) | Semiconductor device, electronic device module, and network system | |
JP2001186180A (en) | Ip terminal device, method for estimating frequency error range, method of estimating frequency difference and method of calculating estimated required time | |
WO2009155263A1 (en) | Circuit for correcting an output clock frequency in a receiving device | |
JP2011234128A (en) | Baud rate detecting device for serial communication, baud rate correcting device for serial communication, and baud rate detecting method for serial communication | |
US10615957B2 (en) | Communications device with adaptive clock frequency | |
EP2458756A2 (en) | Node system and supervisory node | |
US7366207B1 (en) | High speed elastic buffer with clock jitter tolerant design | |
US20080201598A1 (en) | Device and Method For Preventing Lost Synchronization | |
Derogarian et al. | A time synchronization circuit with an average 4.6 ns one-hop skew for wired wearable networks | |
JP7312779B2 (en) | Information communication system and information communication device | |
CN114513273B (en) | Method and device for realizing PTP chip clock module | |
CN115664627B (en) | 1588 protocol-based frequency synchronization precision detection method and adaptive system | |
JP5409165B2 (en) | Clock correction period correction method and radio base station apparatus | |
JP2000216760A (en) | Data transmission system and method for transmitting clock in the same system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20060203 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070117 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070307 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20070404 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070423 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |