JP7211902B2 - Time measuring device and method - Google Patents
Time measuring device and method Download PDFInfo
- Publication number
- JP7211902B2 JP7211902B2 JP2019110828A JP2019110828A JP7211902B2 JP 7211902 B2 JP7211902 B2 JP 7211902B2 JP 2019110828 A JP2019110828 A JP 2019110828A JP 2019110828 A JP2019110828 A JP 2019110828A JP 7211902 B2 JP7211902 B2 JP 7211902B2
- Authority
- JP
- Japan
- Prior art keywords
- period
- clock
- speed clock
- speed
- measurement
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01F—MEASURING VOLUME, VOLUME FLOW, MASS FLOW OR LIQUID LEVEL; METERING BY VOLUME
- G01F1/00—Measuring the volume flow or mass flow of fluid or fluent solid material wherein the fluid passes through a meter in a continuous flow
- G01F1/66—Measuring the volume flow or mass flow of fluid or fluent solid material wherein the fluid passes through a meter in a continuous flow by measuring frequency, phase shift or propagation time of electromagnetic or other waves, e.g. using ultrasonic flowmeters
- G01F1/667—Arrangements of transducers for ultrasonic flowmeters; Circuits for operating ultrasonic flowmeters
Landscapes
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Fluid Mechanics (AREA)
- General Physics & Mathematics (AREA)
- Measurement Of Unknown Time Intervals (AREA)
- Analysing Materials By The Use Of Radiation (AREA)
- Investigating Or Analyzing Materials By The Use Of Ultrasonic Waves (AREA)
Description
本発明は、入力された対象期間の時間長を、低速クロックおよび高速クロックに基づいて計測する時間計測技術に関する。 The present invention relates to time measurement technology for measuring the time length of an input target period based on a low-speed clock and a high-speed clock.
超音波流量計では、トランスデューサ間で送受信した超音波パルスの伝搬時間に基づいて流体の流速を求めるため、伝搬時間を精度よく計測する時間計測技術が必要となる。
従来、このような時間計測技術の1つとして、低速クロックと高速クロックを組み合わせて高精度な計測を行う方式が提案されている(例えば、特許文献1など参照)。
Since the ultrasonic flowmeter obtains the flow velocity of the fluid based on the propagation time of the ultrasonic pulses transmitted and received between the transducers, a time measurement technology is required to accurately measure the propagation time.
Conventionally, as one of such time measurement techniques, there has been proposed a method of performing highly accurate measurement by combining a low-speed clock and a high-speed clock (for example, see Patent Document 1).
前述の従来方式では、対象期間の計測開始時点が、低速クロックの基準周期に同期しているものとしているが、対象期間の時間長は任意に変化するため、対象期間の計測終了時点は、基準周期に対して非同期となる。このため、計測開始時点から、計測終了時点後に到来した基準周期と同期する計測経過時点までの概要期間を、低速クロックのクロック数(パルス数)で計測するとともに、計測終了時点から計測経過時点までの超過期間を、高速クロックのクロック数(パルス数)で計測し、これら概要期間と超過期間のカウント結果に基づき、対象期間の時間長を計算するようにしたものである。 In the conventional method described above, the measurement start point of the target period is assumed to be synchronized with the reference cycle of the low-speed clock. Asynchronous to the cycle. For this reason, the general period from the start of measurement to the elapsed measurement synchronized with the reference period that arrived after the end of measurement is measured by the number of clocks (pulses) of the low-speed clock. is measured by the number of clocks (pulses) of the high-speed clock, and the time length of the target period is calculated based on the results of counting the summary period and the excess period.
リングオシレータなどの高周波タイプのクロック生成回路を用いた場合、高速クロックを生成する際に要する消費電力は、低速クロックに比較してかなり大きいため、超過期間でのみ高速クロックを生成すれば、高速クロックの生成に要する消費電力を抑制することができる。
一方、クロック生成回路は、クロックの生成開始時には周期が安定せず、周期が安定するまで一定の期間が必要となる。
When a high-frequency clock generation circuit such as a ring oscillator is used, the power consumption required to generate a high-speed clock is considerably higher than that of a low-speed clock. It is possible to suppress the power consumption required for the generation of
On the other hand, the clock generation circuit does not stabilize the cycle at the start of clock generation, and requires a certain period of time until the cycle stabilizes.
図6は、高速クロックの周期変動を示すタイミングチャートである。図6には、低速クロックCLKLに同期して時刻t0から高速クロックCLKHが生成開始されているが、時刻t0から1基準周期経過した時刻t1、さらには2基準周期分経過した時刻t2でも、高速クロックCLKHの周期が安定していない例が示されている。 FIG. 6 is a timing chart showing period fluctuations of the high-speed clock. In FIG. 6, the high-speed clock CLKH starts to be generated from time t0 in synchronization with the low-speed clock CLKL. An example is shown in which the cycle of the clock CLKH is not stable.
したがって、対象期間の計測終了時点、すなわち超過期間の開始時点で高速クロックの生成を開始した場合、超過期間の計測に用いられる高速クロックは、安定後の定常周期とは異なる周期となる。このため、定常周期を前提として高速クロックで超過期間ΔTを計測した場合には、カウント結果に誤差が生じ、対象期間の計測精度の低下につながるという問題点があった。 Therefore, when the generation of the high-speed clock is started at the end of measurement of the target period, that is, at the start of the excess period, the high-speed clock used to measure the excess period has a cycle different from the steady cycle after stabilization. Therefore, when the excess period ΔT is measured with a high-speed clock assuming a steady period, an error occurs in the counting result, leading to a problem of deterioration in measurement accuracy of the target period.
本発明はこのような課題を解決するためのものであり、対象期間の計測精度を高めることができる時間計測技術を提供することを目的としている。 The present invention is intended to solve such problems, and an object thereof is to provide a time measurement technique capable of improving the measurement accuracy of the target period.
このような目的を達成するために、本発明にかかる時間計測装置は、一定の基準周期で低速クロックを生成する低速クロック生成回路と、前記低速クロックより高速の高速クロックを生成する高速クロック生成回路と、入力された対象期間の計測開始時点および計測終了時点に基づいて、前記低速クロックおよび前記高速クロックをカウントし、得られたカウント結果に基づいて前記対象期間の時間長を計測する計測処理回路とを備え、前記計測処理回路は、前記計測開始時点から、前記計測終了時点以降に到来した前記基準周期と同期する計測経過時点までの概要期間を、前記低速クロックでカウントする低速クロックカウンタと、前記計測終了時点から前記計測経過時点までの超過期間を、前記計測終了時点に生成を開始する前記高速クロック生成回路からの前記高速クロックでカウントする高速クロックカウンタと、前記基準周期当たりにおける前記高速クロックのクロック数を示す基準クロック数を記憶する記憶回路と、前記低速クロックカウンタおよび前記高速クロックカウンタのカウント結果と、前記基準クロック数と、前記基準周期の時間長とに基づいて、前記対象期間の時間長を計算する時間計算回路と、前記基準クロック数は、前記高速クロックの生成を開始してから複数個の前記基準周期分に相当する周期変動期間内に生成される前記高速クロックに関する、前記基準周期当たりにおける前記高速クロックのクロック数からなるものである。 In order to achieve such an object, the time measuring device according to the present invention includes a low-speed clock generation circuit that generates a low-speed clock with a constant reference period, and a high-speed clock generation circuit that generates a high-speed clock faster than the low-speed clock. and a measurement processing circuit that counts the low-speed clock and the high-speed clock based on the input measurement start time and measurement end time of the target period, and measures the time length of the target period based on the obtained count result. and the measurement processing circuit includes a low-speed clock counter that counts, with the low-speed clock, an approximate period from the measurement start time to the measurement lapse time synchronized with the reference period that has arrived after the measurement end time, a high-speed clock counter that counts an excess period from the measurement end point to the measurement elapsed point with the high-speed clock from the high-speed clock generation circuit that starts generating at the measurement end point; and the high-speed clock per the reference period. a storage circuit for storing a reference clock number indicating the clock number of the target period, based on the count results of the low-speed clock counter and the high-speed clock counter, the reference clock number, and the time length of the reference period; a time calculation circuit that calculates a length of time; and the number of reference clocks relates to the high-speed clock generated within a cycle fluctuation period corresponding to a plurality of the reference cycles after the start of generation of the high-speed clock. It consists of the number of clocks of the high-speed clock per reference period.
また、本発明にかかる上記時間計測装置の一構成例は、前記時間計算回路が、前記低速クロックカウンタおよび前記高速クロックカウンタのカウント結果と前記基準クロック数とに基づいて、前記超過期間における前記低速クロックの数を計算し、得られた低速カウント数と前記基準周期の時間長とに基づいて、前記超過期間の時間長を計算し、前記概要期間の時間長から前記超過期間の時間長を減算することにより、前記対象期間の時間長を計算するようにしたものである。 Further, in one configuration example of the time measurement device according to the present invention, the time calculation circuit calculates the low-speed clock in the excess period based on the count results of the low-speed clock counter and the high-speed clock counter and the number of reference clocks. calculating the number of clocks, calculating the time length of the excess period based on the obtained low speed count number and the time length of the reference period, and subtracting the time length of the excess period from the time length of the summary period; By doing so, the time length of the target period is calculated.
また、本発明にかかる上記時間計測装置の一構成例は、前記計測処理回路が、前記高速クロック生成回路でのクロック生成開始時点から最初の基準周期分に相当する期間に生成される前記高速クロックのクロック数を示す第1の基準クロック数と、前記最初の基準周期に隣接する次の基準周期分に相当する期間に生成される前記高速クロックのクロック数を示す第2の基準クロック数とから、これら第1の基準クロック数と第2の基準クロック数との中間に位置するクロック数を、前記基準クロック数として計算する基準クロック計算回路をさらに含むものである。 In one configuration example of the time measurement device according to the present invention, the measurement processing circuit generates the high-speed clock for a period corresponding to the first reference period from the start of clock generation in the high-speed clock generation circuit. and a second reference clock number indicating the number of clocks of the high-speed clock generated in a period corresponding to the next reference period adjacent to the first reference period. and a reference clock calculation circuit for calculating a clock number located between the first reference clock number and the second reference clock number as the reference clock number.
また、本発明にかかる上記時間計測装置の一構成例は、前記計測処理回路が、前記高速クロック生成回路でのクロック生成開始時点から最初の基準周期分に相当する期間に生成される前記高速クロックのクロック数を、前記第1の基準クロック数として計測する第1の基準クロック計測回路と、前記最初の基準周期に後続する次の基準周期分に相当する期間に生成される前記高速クロックのクロック数を、前記第2の基準クロック数として計測する第2の基準クロック計測回路とをさらに含むものである。 In one configuration example of the time measurement device according to the present invention, the measurement processing circuit generates the high-speed clock for a period corresponding to the first reference period from the start of clock generation in the high-speed clock generation circuit. as the first reference clock number; and a clock of the high-speed clock generated in a period corresponding to the next reference period following the first reference period. and a second reference clock measuring circuit for measuring the number as the second reference clock number.
また、本発明にかかる上記時間計測装置の一構成例は、前記基準クロック計算回路が、前記第1の基準クロック数および前記第2の基準クロック数をそれぞれの重みで積和演算することにより、前記基準クロック数を計算するようにしたものである。 In one configuration example of the time measuring device according to the present invention, the reference clock calculation circuit performs a product-sum operation on the first reference clock number and the second reference clock number with respective weights, The number of reference clocks is calculated.
また、本発明にかかる上記時間計測装置の一構成例は、前記基準クロック計算回路が、前記第1の基準クロック数をMs1とし、前記第2の基準クロック数をMs2とし、Ms1およびMs2の重みをw1,w2とした場合、前記基準クロック数Msを、次の式で計算するようにしたものである。
また、本発明にかかる上記時間計測装置の一構成例は、前記基準クロック計算回路が、前記第1の基準クロック数をMs1とし、前記第2の基準クロック数をMs2とし、Ms1とMs2の差分の絶対値を|Ms1-Ms2|とし、0より大きく|Ms1-Ms2|より小さい値をmとした場合、前記基準クロック数Msを、次の式で計算するようにしたものである。
また、本発明にかかる時間計測方法は、低速クロック生成回路、高速クロック生成回路、および計測処理回路を備え、入力された対象期間の時間長を計測する時間計測装置で用いられる時間計測方法であって、前記低速クロック生成回路が、一定の基準周期で低速クロックを生成する低速クロック生成ステップと、前記高速クロック生成回路が、前記低速クロックより高速の高速クロックを生成する高速クロック生成ステップと、前記計測処理回路が、前記対象期間の計測開始時点および計測終了時点に基づいて、前記低速クロックおよび前記高速クロックをカウントし、得られたカウント結果に基づいて前記対象期間の時間長を計測する計測処理ステップとを備え、前記計測処理ステップは、前記計測開始時点から、前記計測終了時点以降に到来した前記基準周期と同期する計測経過時点までの期間に、前記低速クロックをカウントする低速クロックカウントステップと、前記計測終了時点から前記計測経過時点までの期間に前記高速クロックをカウントする高速クロックカウントステップと、前記基準周期当たりにおける前記高速クロックのクロック数を示す基準クロック数を記憶する記憶ステップと、前記低速クロックカウントステップおよび前記高速クロックカウントステップのカウント結果と、前記基準クロック数と、前記基準周期の時間長とに基づいて、前記対象期間の時間長を計算する時間計算ステップとを含み、前記基準クロック数は、前記高速クロックの生成を開始してから複数個の前記基準周期分に相当する周期変動期間内に生成される前記高速クロックに関する、前記基準周期当たりにおける前記高速クロックのクロック数からなるものである。 Further, a time measurement method according to the present invention is a time measurement method used in a time measurement device that includes a low-speed clock generation circuit, a high-speed clock generation circuit, and a measurement processing circuit and measures the time length of an input target period. a low-speed clock generation step in which the low-speed clock generation circuit generates a low-speed clock with a constant reference period; a high-speed clock generation step in which the high-speed clock generation circuit generates a high-speed clock faster than the low-speed clock; Measurement processing in which a measurement processing circuit counts the low-speed clock and the high-speed clock based on the measurement start time and the measurement end time of the target period, and measures the time length of the target period based on the obtained count result. a low-speed clock count step of counting the low-speed clock during a period from the measurement start time to the measurement lapse time synchronized with the reference period that has arrived after the measurement end time; and a high-speed clock counting step of counting the high-speed clock during a period from the measurement end point to the measurement elapsed point; a storage step of storing a reference clock number indicating the number of the high-speed clocks per reference period; a time calculation step of calculating the time length of the target period based on the count results of the low-speed clock count step and the high-speed clock count step, the number of reference clocks, and the time length of the reference period; The number of clocks is the number of clocks of the high-speed clock per the reference period regarding the high-speed clock generated within a period variation period corresponding to a plurality of the reference periods after the start of generation of the high-speed clock. It is.
本発明によれば、対象期間の計測終了時点、すなわち超過期間の開始時点において、高速クロック生成回路で高速クロックの生成を開始した場合でも、生成開始時における高速クロックの周期変動を考慮した基準クロック数が、超過期間の計測に用いられることになる。このため、高速クロックの周期が安定した定常周期を前提として高速クロックで超過期間を計測した場合と比較して、カウント結果の誤差を低減でき、結果として、対象期間の計測精度を高めることが可能となる。 According to the present invention, even if the high-speed clock generation circuit starts generating the high-speed clock at the end of the measurement of the target period, i.e., at the start of the excess period, the reference clock takes into account the cycle fluctuation of the high-speed clock at the start of generation. number will be used to measure overtime. As a result, errors in the count result can be reduced compared to when the excess period is measured with the high-speed clock assuming a steady period with a stable high-speed clock, and as a result, it is possible to improve the measurement accuracy of the target period. becomes.
次に、本発明の実施の形態について図面を参照して説明する。
[第1の実施の形態]
まず、図1を参照して、本発明の第1の実施の形態にかかる時間計測装置10について説明する。図1は、時間計測装置の構成を示すブロック図である。
この時間計測装置10は、例えば超音波流量計などのフィールド機器に搭載されて、入力された対象期間Tmの時間長を、低速クロックCLKLおよび高速クロックCLKHに基づいて計測する装置である。
Next, embodiments of the present invention will be described with reference to the drawings.
[First embodiment]
First, a
The
図1に示すように、時間計測装置10は、主な回路部として、低速クロック生成回路11A、高速クロック生成回路11B、および計測処理回路12を備えている。
As shown in FIG. 1, the
低速クロック生成回路11Aは、一定の基準周期Tsで低速クロックCLKLを生成する回路部である。
高速クロック生成回路11Bは、低速クロックCLKLより高速の高速クロックCLKHを生成する回路部である。
これら低速クロック生成回路11Aおよび高速クロック生成回路11Bは、一般的なクロック生成回路からなる。特に、高い計測精度が求められ、高速クロックCLKHの周期を100ps以下(10GHz以上)とするような場合には、例えばNOTゲート回路をリング状に奇数個接続したリングオシレータなどの高周波タイプが用いられる。
The low-speed clock generation circuit 11A is a circuit section that generates a low-speed clock CLKL with a constant reference period Ts.
The high-speed
These low-speed clock generation circuit 11A and high-speed
計測処理回路12は、入力されたスタートパルスPstartおよびストップパルスPstopで特定される、対象期間Tmの計測開始時点T1および計測終了時点T2に基づいて、低速クロックCLKLおよび高速クロックCLKHをカウントし、得られたカウント結果、すなわち低速カウント数(パルス数)Nおよび高速カウント数(パルス数)Mに基づいて、対象期間Tmを計測する回路部である。
The
計測処理回路12は、主な回路部として、低速クロックカウンタ13A、高速クロックカウンタ13B、第1の基準クロック計測回路14A、第2の基準クロック計測回路14B、基準クロック計算回路15、記憶回路16、および時間計算回路17を備えている。以下では、測定処理回路12が、複数の回路部で構成されている場合を例として説明するが、これに限定されるものでなく、CPUとプログラムとを協働させることにより、これら回路部の一部または全部を構成してもよい。
The
低速クロックカウンタ13Aは、計測開始時点T1から、計測終了時点T2以降に到来した基準周期Tsと同期する計測経過時点T3までの概要期間Tを低速クロックCLKLでカウントし、カウント結果として低速カウント数Nを出力する回路部である。
高速クロックカウンタ13Bは、計測終了時点T2から計測経過時点T3までの超過期間ΔTを高速クロックCLKHをカウントし、カウント結果として高速カウント数Mを出力する回路部である。
The low-
The high-
第1の基準クロック計測回路14Aは、高速クロック生成回路11Bでのクロック生成開始時点(t0)から最初の基準周期Ts分に相当する期間Ts1に生成される高速クロックCLKHのクロック数を、第1の基準クロック数Ms1として計測(カウント)する回路部である。
第2の基準クロック計測回路14Bは、最初の基準周期Tsに後続する次の基準周期Ts分に相当する期間Ts2における高速クロックCLKHのクロック数を、第2の基準クロック数Ms2として計測(カウント)する回路部である。
The first reference
The second reference
基準クロック計算回路15は、高速クロック生成回路11Bにおいて、高速クロックCLKHの生成を開始してから複数個の基準周期Ts分に相当する一定の周期変動期間Tx内に生成される高速クロックCLKHに関する、基準周期Ts当たりにおける高速クロックCLKHのクロック数を、基準クロック数Msとして計算する回路部である。
The reference
具体的には、基準クロック計算回路15は、計測終了時点T2、すなわち高速クロック生成回路11Bでのクロック生成開始時点から最初の基準周期Tsに相当する期間Ts1に生成される高速クロックCLKHのクロック数を示す第1の基準クロック数Ms1と、最初の基準周期Tsに隣接する次の基準周期Tsに相当する期間Ts2に生成される高速クロックCLKHのクロック数を示す第2の基準クロック数Ms2とを統計処理することにより、これら第1の基準クロック数Ms1と第2の基準クロック数Ms2との中間に位置するクロック数を、基準クロック数Msとして計算する機能を有している。基準クロック数Msの計算過程に関する詳細については後述する。
Specifically, the reference
本実施の形態では、高速クロックCLKHのクロック生成開始時点t0から基準周期Tsで2周期分、すなわち期間Ts1と期間Ts2を周期変動期間Txとする場合を例として説明する。これにより、超音波流量計における対象期間Tmを時間計測装置10で計測する場合に生じうる、計測終了時点T2から計測経過時点T3までの概要期間Tが1基準周期Ts分だけずれる場合にも対応可能な基準クロック数Msを計算することができる。
なお、周期変動期間Txは基準周期Tsで2周期分の時間長に限定されるものではなく、時間計測装置10の計測対象となる対象期間Tmの変動特性や、高速クロック生成回路11Bの生成開始時における周期変動特性に応じて、基準周期Tsで3周期分以上に相当する期間を周期変動期間Txとしてもよい。
In the present embodiment, an example will be described in which two periods of the reference period Ts from the clock generation start time t0 of the high-speed clock CLKH, that is, the period Ts1 and the period Ts2 are defined as the period variation period Tx. As a result, even when the
Note that the period fluctuation period Tx is not limited to the time length of two periods of the reference period Ts. A period corresponding to three or more cycles of the reference period Ts may be set as the period variation period Tx according to the period variation characteristics of time.
記憶回路16は、全体として半導体メモリやレジスタからなり、基準クロック計算回路15で計算された、基準周期Ts当たりにおける高速クロックCLKHのクロック数を示す基準クロック数Msと、低速クロックCLKLの周期である基準周期Tsの時間長とを記憶する回路部である。
The
時間計算回路17は、低速クロックカウンタ13Aおよび高速クロックカウンタ13Bのカウント結果である低速カウント数Nおよび高速カウント数Mと、記憶回路16の基準クロック数Msおよび基準周期Tsの時間長とに基づいて、対象期間Tmの時間長を計算する回路部である。対象期間Tmの計算過程に関する詳細については後述する。
The
[第1の実施の形態の動作]
次に、図2、図3、および図4を参照して、本実施の形態にかかる時間計測装置10の動作について説明する。図2は、対象期間の計算過程を示すシーケンス図である。図3は、第1の実施の形態にかかる対象期間の計算過程を示すブロック図である。図4は、第1の実施の形態にかかる基準クロック数の計算過程を示すタイミングチャートである。
[Operation of the first embodiment]
Next, operation of the
[対象期間の計算過程]
まず、本実施の形態にかかる対象期間Tmの計算過程について説明する。
一般的な超音波流量計では、低速クロックCLKLの基準周期Tsと同期して、スタートパルスPstartが生成され、このスタートパルスPstartに応じて、一方のトランスデューサから超音波パルスが一定数連続して送信される。この超音波パルスは、他方のトランスデューサで受信され、その受信波形がしきい値を超えた時点にストップパルスPstopが生成される。
[Calculation process for the target period]
First, the calculation process of the target period Tm according to the present embodiment will be described.
In a general ultrasonic flowmeter, a start pulse Pstart is generated in synchronization with the reference period Ts of the low-speed clock CLKL, and a certain number of ultrasonic pulses are continuously transmitted from one transducer in response to this start pulse Pstart. be done. This ultrasonic pulse is received by the other transducer, and a stop pulse Pstop is generated when the received waveform exceeds the threshold.
これらスタートパルスPstartからストップパルスPstopまでの期間が、超音波パルスの伝搬時間に相当し、この伝搬時間に基づいて流体流量が計算される。
したがって、図2に示すように、時間計測装置10は、入力信号であるスタートパルスPstartからストップパルスPstopまでの期間を対象期間Tmとして計測し、得られた計測時間値を出力する。以下では、対象期間Tm、概要期間T、超過期間ΔT、および基準周期Tsの時間長を、それぞれTm,T,ΔT,およびTsということもある。
The period from the start pulse Pstart to the stop pulse Pstop corresponds to the propagation time of the ultrasonic pulse, and the fluid flow rate is calculated based on this propagation time.
Therefore, as shown in FIG. 2, the
低速クロック生成回路11Aは、常時、一定の基準周期Tsで低速クロックCLKLを生成しているものとし、基準周期Tsと対象期間Tmの計測開始時点T1を示すスタートパルスPstartとは、同期しているものとする。一方、対象期間Tmの時間長は任意に変化するため、対象期間Tmの計測終了時点T2は、基準周期Tsに対して非同期となる。このため、低速クロックカウンタ13Aは、計測開始時点T1から、計測終了時点T2後に到来した基準周期Tsと同期する計測経過時点T3までの概要期間Tを、低速クロックCLKLで計測する。
The low-speed clock generation circuit 11A is assumed to always generate the low-speed clock CLKL with a constant reference period Ts, and the reference period Ts and the start pulse Pstart indicating the measurement start point T1 of the target period Tm are synchronized. shall be On the other hand, since the time length of the target period Tm changes arbitrarily, the measurement end point T2 of the target period Tm is asynchronous with respect to the reference period Ts. Therefore, the low-
また、計測処理回路12からのイネーブル信号ELに応じて、高速クロック生成回路11Bは、計測終了時点T2から高速クロックCLKHの生成を開始し、高速クロックカウンタ13Bは、計測終了時点T2から計測経過時点T3までの超過期間ΔTを、高速クロックCLKHで計測する。
時間計算回路17は、これら概要期間Tと超過期間ΔTの計測結果に基づき、対象期間Tmの時間長を計算する。
Further, in response to the enable signal EL from the
The
図2に示すように、対象期間Tmの時間長は、概要期間Tから超過期間ΔTを減算したTm=T-ΔTで計算される。この際、概要期間Tは、低速クロックCLKLの基準周期Tsの整数倍すなわち低速カウント数N倍で表される。一方、超過期間ΔTは、高速クロックCLKHで計測されるため、高速クロックCLKHの周期の整数倍すなわち高速カウント数M倍で表される。このため、高速カウント数Mを基準周期Tsの個数で表す際、基準周期Ts当たりの高速カウント数すなわち基準クロック数Msを用いれば、超過期間ΔTに相当する超過低速カウント数ΔNは、次の式(1)で求められる。 As shown in FIG. 2, the time length of the target period Tm is calculated by Tm=T−ΔT, which is obtained by subtracting the excess period ΔT from the general period T. At this time, the general period T is represented by an integral multiple of the reference period Ts of the low-speed clock CLKL, that is, N times the low-speed count number. On the other hand, since the excess period ΔT is measured by the high-speed clock CLKH, it is represented by an integral multiple of the period of the high-speed clock CLKH, ie, M times the high-speed count. Therefore, when expressing the number of high-speed counts M by the number of reference cycles Ts, if the number of high-speed counts per reference cycle Ts, that is, the number of reference clocks Ms is used, the number of excess low-speed counts ΔN corresponding to the excess period ΔT can be obtained by the following equation: (1).
また、低速カウント数Nは低速クロックカウンタ13Aでカウントされ、高速カウント数Mは高速クロックカウンタ13Bでカウントされる。したがって、記憶回路16に基準クロック数Msと基準周期Tsの時間長とを設定しておけば、対象期間Tmの時間長は、時間計算回路17により、次の式(2)で求められる。
The low speed count number N is counted by the low
[基準クロック数の計算過程]
次に、図2,図3および図4を参照して、基準クロック数Msの計算過程について説明する。 本実施の形態にかかる時間計測装置10では、消費電力の削減を目的として、高速クロック生成回路11Bを超過期間ΔTに合わせて起動する。これは、高速クロック生成回路11Bとして、リングオシレータなどの高周波タイプのクロック生成回路を用いた場合、消費電力が大きいためである。
[Calculation process of reference clock number]
Next, referring to FIGS. 2, 3 and 4, the process of calculating the number of reference clocks Ms will be described. In the
このような高速クロック生成回路11Bの場合、前述の図6に示したように、クロックの生成開始時には周期が安定せず、周期が安定するまで一定の期間が必要となる。したがって、対象期間Tmの計測終了時点T2で高速クロックCLKHの生成を開始した場合、超過期間ΔTの計測に用いられる高速クロックCLKHは、安定後の定常周期とは異なる周期となる。このため、定常周期を前提して超過期間ΔTを計測した場合にはカウント結果に誤差が発生し、対象期間Tmの計測精度の低下につながる。
In the case of such a high-speed
このため、本実施の形態にかかる時間計測装置10では、第1の基準クロック計測回路14A、第2の基準クロック計測回路14B、および基準クロック計算回路15を設け、高速クロック生成回路11Bにおいて、高速クロックCLKHの生成を開始してから複数個の基準周期Ts分に相当する一定の周期変動期間Tx内、例えば2基準周期Ts内に生成される高速クロックCLKHに関する、基準周期Ts当たりにおける高速クロックCLKHのクロック数を、基準クロック数Msとして予め計算するようにしたものである。
For this reason, the
この際、図3および図4に示すように、まず、第1の基準クロック計測回路14Aにおいて、計測終了時点T2、すなわち高速クロック生成回路11Bでのクロック生成開始時点から最初の基準周期Tsに相当する期間Ts1に生成される高速クロックCLKHのクロック数を示す第1の基準クロック数Ms1をカウントする。次に、第2の基準クロック計測回路14Bにおいて、最初の基準周期Tsに隣接する次の基準周期Tsに相当する期間Ts2に生成される高速クロックCLKHのクロック数を示す第2の基準クロック数Ms2をカウントする。
At this time, as shown in FIGS. 3 and 4, first, in the first reference
この後、基準クロック計算回路15において、第1の基準クロック数Ms1および第2の基準クロック数Ms2を、予め設定されているそれぞれの重みw1,w2で積和演算することにより、基準クロック数Msを次の式(3)により計算する。但し、これら重みw1,w2の関係は、w1+w2=1であるものとする。これにより、これら第1の基準クロック数Ms1と第2の基準クロック数Ms2との中間に位置するクロック数が、基準クロック数Msとして計算される。
After that, in the reference
図4には、基準クロック数Msの計算例が示されている。ここでは、計測経過時点T3が、計測終了時点T2から1/2基準周期Ts分だけ超過した時刻T3aにあるケース、すなわち、超過期間ΔTaが計測終了時点T2から時刻T3aまでの期間であるケースAと、計測経過時点T3が、計測終了時点T2から3/2基準周期Ts分だけ超過した時刻T3bにあるケース、すなわち、超過期間ΔTbが計測終了時点T2から時刻T3bまでの期間であるケースBについて説明する。これらケースAとケースBは、超音波流量計において超音波パルスの伝搬時間を計測する上で、ケースAからケースBに切り替わる場合があり、これらケースA,Bの切替タイミングにおいて、計測結果が不連続とならないように配慮する必要がある。 FIG. 4 shows a calculation example of the number of reference clocks Ms. In this case, the measurement elapsed time T3 is at the time T3a after the measurement end time T2 by 1/2 the reference period Ts, that is, the case A in which the excess period ΔTa is the period from the measurement end time T2 to the time T3a. and the case where the measurement elapsed time T3 is at the time T3b after the measurement end time T2 by 3/2 the reference period Ts, that is, the case B in which the excess period ΔTb is the period from the measurement end time T2 to the time T3b. explain. These cases A and B may switch from case A to case B when measuring the propagation time of the ultrasonic pulse in the ultrasonic flowmeter. Care should be taken to avoid continuation.
図4に示すように、計測終了時点T2から高速クロックCLKHの生成を開始したものとし、計測終了時点T2から基準周期Ts1つ分の期間Ts1に、第1の基準クロック計測回路14Aで高速クロックCLKHをカウントして得られた第1の基準クロック数がMs1=64であるものとする。一方、その次の基準周期Ts1つ分の期間Ts2に、第2の基準クロック計測回路14Bで高速クロックCLKHをカウントして得られた第2の基準クロック数がMs2=36であったものとする。
As shown in FIG. 4, it is assumed that generation of the high-speed clock CLKH is started from the measurement end point T2, and the first reference
また、期間Ts1の前半および後半の各半周期に、高速クロックカウンタ13Bで高速クロックCLKHをカウントして得られたカウント数が40,24であり、期間Ts2の前半および後半の各半周期に、高速クロックカウンタ13Bで高速クロックCLKHをカウントして得られたカウント数が20,16であったものとする。
Further, the count numbers obtained by counting the high-speed clock CLKH by the high-
ここで、基準クロック数Msとして第1の基準クロック数Ms1=64を用いた場合、ケースAの超過期間ΔTaを低速クロックCLKLで換算して得られた超過低速カウント数ΔNaは、ΔNa=Ma/Ms1=40/64≒0.625となる。また、ケースBの超過期間ΔTbを低速クロックCLKLで換算して得られた超過低速カウント数ΔNbは、ΔNb=Mb/Ms1=84/64≒1.313となる。
一方、基準クロック数Msとして第2の基準クロック数Ms2=36を用いた場合、ケースAの超過期間ΔTaにおける超過低速カウント数ΔNaは、ΔNa=Ma/Ms2=40/36≒1.111となる。また、ケースBの超過期間ΔTbにおける超過低速カウント数ΔNbは、ΔNb=Mb/Ms2=84/36≒2.333となる。
Here, when the first reference clock number Ms1=64 is used as the reference clock number Ms, the excess low-speed count number ΔNa obtained by converting the excess period ΔTa of case A with the low-speed clock CLKL is ΔNa=Ma/ Ms1=40/64≈0.625. Also, the excess low speed count number ΔNb obtained by converting the excess period ΔTb of case B with the low speed clock CLKL is ΔNb=Mb/Ms1=84/64≈1.313.
On the other hand, when the second reference clock number Ms2=36 is used as the reference clock number Ms, the excess low speed count number ΔNa in the excess period ΔTa of case A is ΔNa=Ma/Ms2=40/36≈1.111. . Further, the excess low speed count number ΔNb in the excess period ΔTb of case B is ΔNb=Mb/Ms2=84/36≈2.333.
したがって、これら第1の基準クロック数Ms1と第2の基準クロック数Ms2のいずれを用いた場合でも、ケースAとケースBとの間で超過低速カウント数ΔNa,ΔNbが不連続となり、結果として得られる対象期間Tmの時間長も不連続となる。 Therefore, regardless of whether the first reference clock number Ms1 or the second reference clock number Ms2 is used, the excessively low speed count numbers ΔNa and ΔNb are discontinuous between cases A and B, resulting in The time length of the target period Tm is also discontinuous.
一方、本実施の形態において、例えば、重みw1,w2をそれぞれ8/28,20/28とした場合、第1の基準クロック数Ms1=64、第2の基準クロック数Ms2=36であるから、基準クロック数Msは、Ms=64×8/28+36×20/28=44となる。これにより、ケースAの超過期間ΔTaにおける超過低速カウント数ΔNaは、ΔNa=Ma/Ms=40/44≒0.909となる。また、ケースBの超過期間ΔTbにおける超過低速カウント数ΔNbは、ΔNb=Mb/Ms=84/44≒1.909となる。 On the other hand, in this embodiment, for example, when the weights w1 and w2 are 8/28 and 20/28, respectively, the first reference clock number Ms1=64 and the second reference clock number Ms2=36. The number of reference clocks Ms is Ms=64×8/28+36×20/28=44. As a result, the excess low speed count number ΔNa in the excess period ΔTa of case A is ΔNa=Ma/Ms=40/44≈0.909. Further, the excess low speed count number ΔNb in the excess period ΔTb of case B is ΔNb=Mb/Ms=84/44≈1.909.
したがって、本実施の形態にかかる基準クロック数Ms用いた場合、ケースAとケースBとの間で超過低速カウント数ΔNa,ΔNbが連続しており、結果として得られる対象期間Tmの時間長も連続することになる。 Therefore, when the reference clock number Ms according to the present embodiment is used, the excessively low speed count numbers ΔNa and ΔNb are continuous between the case A and the case B, and the time length of the target period Tm obtained as a result is also continuous. will do.
[第1の実施の形態の効果]
このように、本実施の形態は、低速クロックカウンタ13Aが、計測開始時点T1から、計測終了時点T2以降に到来した基準周期Tsと同期する計測経過時点T3までの概要期間Tを低速クロックCLKLでカウントし、高速クロックカウンタ13Bが、計測終了時点T2から計測経過時点T3までの超過期間ΔTを高速クロックCLKHでカウントし、時間計算回路17が、低速クロックカウンタ13Aおよび高速クロックカウンタ13Bのカウント結果、すなわち低速カウント数Nおよび高速カウント数Mと、基準クロック数Msと、基準周期Tsの時間長とに基づいて、対象期間Tmの時間長を計算し、高速クロックCLKHの生成を開始してから複数個の基準周期Ts分に相当する周期変動期間Tx内に生成される高速クロックCLKHに関する、基準周期Ts当たりにおける高速クロックCLKHのクロック数を、基準クロック数Msとして用いるようにしたものである。
[Effects of the first embodiment]
As described above, in the present embodiment, the low-
具体的には、時間計算回路17が、低速クロックカウンタ13Aおよび高速クロックカウンタ13Bのカウント結果、すなわち低速カウント数Nおよび高速カウント数Mと、基準クロック数Msとに基づいて、対象期間Tmにおける低速カウント数Nを計算し、得られた低速カウント数Nと基準周期Tsの時間長とに基づいて、対象期間Tmの時間長を計算するようにしたものである。
Specifically, based on the count results of the low-
これにより、対象期間Tmの計測終了時点T2、すなわち超過期間ΔTの開始時点において、高速クロック生成回路11Bで高速クロックCLKHの生成を開始した場合でも、生成開始時における高速クロックCLKHの周期変動を考慮した基準クロック数Msが、超過期間ΔTの計測に用いられることになる。このため、高速クロックCLKHの周期が安定した定常周期を前提として高速クロックCLKHで超過期間ΔTを計測した場合と比較して、カウント結果の誤差を低減でき、結果として、対象期間Tmの計測精度を高めることが可能となる。
As a result, even if the high-speed
また、本実施の形態において、計測処理回路12に基準クロック計算回路15を設け、高速クロック生成回路11Bでのクロック生成開始時点t0から最初の基準周期Ts分に相当する期間Ts1に生成される高速クロックCLKHのクロック数を示す第1の基準クロック数Ms1と、最初の基準周期Tsに隣接する次の基準周期Ts分に相当する期間Ts2に生成される高速クロックCLKHのクロック数を示す第2の基準クロック数Ms2とから、これら第1の基準クロック数Ms1と第2の基準クロック数Ms2との中間に位置するクロック数を、基準クロック数Msとして計算するようにしてもよい。
Further, in the present embodiment, the reference
これにより、高速クロックCLKHの生成を開始してから複数個の基準周期Ts分に相当する周期変動期間Tx内に生成される高速クロックCLKHに関する、基準周期Ts当たりにおける高速クロックCLKHのクロック数を、基準クロック数Msとして容易に計算できる。また、時間計測装置10で基準クロック数Msを計算できるため、基準クロック数Msを計算するための別個の操作を必要とせず、時間計測に必要なシステム構成を大幅に簡素化できる。
As a result, regarding the high-speed clock CLKH generated within the period variation period Tx corresponding to a plurality of reference periods Ts after the start of generation of the high-speed clock CLKH, the number of high-speed clocks CLKH per reference period Ts is It can be easily calculated as the number of reference clocks Ms. Moreover, since the reference clock number Ms can be calculated by the
また、本実施の形態において、計測処理回路12に第1の基準クロック計測回路14Aと第2の基準クロック計測回路14Bとを設け、第1の基準クロック計測回路14Aが、高速クロック生成回路11Bでのクロック生成開始時点t0から最初の基準周期Ts分に相当する期間Ts1に生成される高速クロックCLKHのクロック数を、第1の基準クロック数Ms1として計測し、第2の基準クロック計測回路14Bが、最初の基準周期Tsに後続する次の基準周期Ts分に相当する期間Ts2に生成される高速クロックCLKHのクロック数を、第2の基準クロック数Ms2として計測するようにしてもよい。
これにより、極めて簡素な回路構成で、基準クロック計算回路15における基準クロック数Msの計算に必要となる第1の基準クロック数Ms1と第2の基準クロック数Ms2を計測することができる。
Further, in this embodiment, the
As a result, the first reference clock number Ms1 and the second reference clock number Ms2 necessary for calculating the reference clock number Ms in the reference
また、本実施の形態において、基準クロック計算回路15が、第1の基準クロック数Ms1および第2の基準クロック数Ms2をそれぞれの重みw1,w2で積和演算することにより、基準クロック数Msを計算するようにしてもよい。
具体的には、基準クロック計算回路15が、第1の基準クロック数をMs1とし、第2の基準クロック数をMs2とし、Ms1およびMs2の重みをw1,w2とした場合、基準クロック数Msを、前述した式(3)で計算するようにしてもよい。
これにより、極めて簡素な演算処理で基準クロック数Msを計算することができる。
Further, in the present embodiment, the reference
Specifically, when the reference
This makes it possible to calculate the number of reference clocks Ms with extremely simple arithmetic processing.
[第2の実施の形態]
次に、本発明の第2の実施の形態にかかる時間計測装置10について説明する。
第1の実施の形態では、基準クロック計算回路15において基準クロック数Msを計算する際、第1の基準クロック数Ms1、第2の基準クロック数Ms2の重みをw1,w2とし、前述の式(3)に示した積和演算により、基準クロック数Msを計算する場合を例として説明した。
[Second embodiment]
Next, a
In the first embodiment, when the reference clock number Ms is calculated in the reference
本実施の形態では、基準クロック数Msの計算過程として、基準クロック計算回路15が、第1の基準クロック数Ms1、第2の基準クロック数Ms2の差分を用いて基準クロック数Msを計算する場合について説明する。なお、本実施の形態にかかる時間計測装置10のうち、基準クロック計算回路15以外の構成、および、対象期間Tmの計算過程については、第1の実施の形態と同様であり、ここでの詳細な説明は省略する。
In the present embodiment, as the calculation process of the reference clock number Ms, the reference
[対象期間の計算過程]
図5を参照して、本実施の形態にかかる対象期間Tmの計算過程について説明する。図5は、第2の実施の形態にかかる対象期間の計算過程を示すブロック図である。
本実施の形態において、基準クロック数Msの計算過程として、基準クロック計算回路15は、第1の基準クロック数をMs1とし、第2の基準クロック数をMs2とし、Ms1とMs2の差分の絶対値を|Ms1-Ms2|とし、0より大きく|Ms1-Ms2|より小さい値を係数mとした場合、基準クロック数Msを、次の式(4)で計算する。
[Calculation process for the target period]
A process of calculating the target period Tm according to the present embodiment will be described with reference to FIG. FIG. 5 is a block diagram showing the process of calculating the target period according to the second embodiment.
In this embodiment, in the process of calculating the reference clock number Ms, the reference
[第2の実施の形態の効果]
このように本実施の形態は、基準クロック計算回路15が、基準クロック計算回路15は、第1の基準クロック数をMs1とし、第2の基準クロック数をMs2とし、Ms1とMs2の差分の絶対値を|Ms1-Ms2|とし、0より大きく|Ms1-Ms2|より小さい値を係数mとした場合、基準クロック数Msを、前述した式(4)で計算するようにしたものである。
[Effects of Second Embodiment]
As described above, in the present embodiment, the reference
これにより、係数mを0<m<|Ms1-Ms2|の範囲で調整するだけで、第1の基準クロック数Ms1と第2の基準クロック数Ms2との中間に位置するクロック数を、基準クロック数Msとして計算することができ、基準クロック数Msの計算処理負担を軽減できる。 As a result, by simply adjusting the coefficient m within the range of 0<m<|Ms1-Ms2| It can be calculated as the number Ms, and the calculation processing load of the reference clock number Ms can be reduced.
[実施の形態の拡張]
以上、実施形態を参照して本発明を説明したが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解しうる様々な変更をすることができる。また、各実施形態については、矛盾しない範囲で任意に組み合わせて実施することができる。
[Expansion of Embodiment]
Although the present invention has been described with reference to the embodiments, the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention. In addition, each embodiment can be implemented in any combination within a non-contradictory range.
10…時間計測装置、11A…低速クロック生成回路、11B…高速クロック生成回路、12…計測処理回路、13A…低速クロックカウンタ、13B…高速クロックカウンタ、14A…第1の基準クロック計測回路、14B…第2の基準クロック計測回路、15…基準クロック計算回路、16…記憶回路、17…時間計算回路、CLKL…低速クロック、CLKH…高速クロック、Pstart…スタートパルス、Pstop…ストップパルス、N…低速カウント数、M…高速カウント数、Ms1…第1の基準クロック数、Ms2…第2の基準クロック数、Ms…基準クロック数、w1,w2…重み、m…係数、Ts…基準周期、T…概要期間、Tm…対象期間、T1…計測開始時点、T2…計測終了時点、T3…計測経過時点、ΔT,ΔTa,ΔTb…超過期間、ΔN,ΔNa,ΔNb…超過低速カウント数、Tx…周期変動期間、Ts1,Ts2…期間。
REFERENCE SIGNS
Claims (8)
前記低速クロックより高速の高速クロックを生成する高速クロック生成回路と、
入力された対象期間の計測開始時点および計測終了時点に基づいて、前記低速クロックおよび前記高速クロックをカウントし、得られたカウント結果に基づいて前記対象期間の時間長を計測する計測処理回路とを備え、
前記計測処理回路は、
前記計測開始時点から、前記計測終了時点以降に到来した前記基準周期と同期する計測経過時点までの概要期間を、前記低速クロックでカウントする低速クロックカウンタと、
前記計測終了時点から前記計測経過時点までの超過期間を、前記計測終了時点に生成を開始する前記高速クロック生成回路からの前記高速クロックでカウントする高速クロックカウンタと、
前記基準周期当たりにおける前記高速クロックのクロック数を示す基準クロック数を記憶する記憶回路と、
前記低速クロックカウンタおよび前記高速クロックカウンタのカウント結果と、前記基準クロック数と、前記基準周期の時間長とに基づいて、前記対象期間の時間長を計算する時間計算回路と、
前記基準クロック数は、前記高速クロックの生成を開始してから複数個の前記基準周期分に相当する周期変動期間内に生成される前記高速クロックに関する、前記基準周期当たりにおける前記高速クロックのクロック数からなる
ことを特徴とする時間計測装置。 a low-speed clock generation circuit that generates a low-speed clock with a constant reference period;
a high-speed clock generation circuit that generates a high-speed clock faster than the low-speed clock;
a measurement processing circuit that counts the low-speed clock and the high-speed clock based on the input measurement start time and measurement end time of the target period, and measures the time length of the target period based on the obtained count result; prepared,
The measurement processing circuit is
a low-speed clock counter that counts, with the low-speed clock, an approximate period from the measurement start point to the measurement lapse point that is synchronized with the reference period that has arrived after the measurement end point;
a high-speed clock counter that counts an excess period from the measurement end point to the measurement elapsed point using the high-speed clock from the high-speed clock generation circuit that starts generating at the measurement end point;
a storage circuit for storing a reference clock number indicating the number of clocks of the high-speed clock per reference period;
a time calculation circuit that calculates the time length of the target period based on the count results of the low-speed clock counter and the high-speed clock counter, the number of reference clocks, and the time length of the reference period;
The number of reference clocks is the number of high-speed clocks per reference period for the high-speed clock generated within a period variation period corresponding to a plurality of reference periods after the start of generation of the high-speed clock. A time measuring device characterized by comprising:
前記時間計算回路は、前記低速クロックカウンタおよび前記高速クロックカウンタのカウント結果と前記基準クロック数とに基づいて、前記超過期間における前記低速クロックの数を計算し、得られた低速カウント数と前記基準周期の時間長とに基づいて、前記超過期間の時間長を計算し、前記概要期間の時間長から前記超過期間の時間長を減算することにより、前記対象期間の時間長を計算することを特徴とする時間計測装置。 In the time measuring device according to claim 1,
The time calculation circuit calculates the number of low-speed clocks in the excess period based on the count results of the low-speed clock counter and the high-speed clock counter and the reference clock number, and calculates the obtained low-speed count number and the reference clock number. The time length of the excess period is calculated based on the time length of the cycle, and the time length of the target period is calculated by subtracting the time length of the excess period from the time length of the summary period. A time measuring device.
前記計測処理回路は、前記高速クロック生成回路でのクロック生成開始時点から最初の基準周期分に相当する期間に生成される前記高速クロックのクロック数を示す第1の基準クロック数と、前記最初の基準周期に隣接する次の基準周期分に相当する期間に生成される前記高速クロックのクロック数を示す第2の基準クロック数とから、これら第1の基準クロック数と第2の基準クロック数との中間に位置するクロック数を、前記基準クロック数として計算する基準クロック計算回路をさらに含むことを特徴とする時間計測装置。 In the time measuring device according to claim 1 or claim 2,
The measurement processing circuit comprises: a first reference clock number indicating the number of clocks of the high-speed clock generated in a period corresponding to the first reference period from the start of clock generation in the high-speed clock generation circuit; From a second reference clock number indicating the number of clocks of the high-speed clock generated in a period corresponding to the next reference period adjacent to the reference period, the first reference clock number and the second reference clock number are obtained. A time measuring device, further comprising a reference clock calculation circuit for calculating a clock number positioned between , as the reference clock number.
前記計測処理回路は、
前記高速クロック生成回路でのクロック生成開始時点から最初の基準周期分に相当する期間に生成される前記高速クロックのクロック数を、前記第1の基準クロック数として計測する第1の基準クロック計測回路と、
前記最初の基準周期に後続する次の基準周期分に相当する期間に生成される前記高速クロックのクロック数を、前記第2の基準クロック数として計測する第2の基準クロック計測回路とをさらに含む
ことを特徴とする時間計測装置。 In the time measuring device according to claim 3,
The measurement processing circuit is
A first reference clock measurement circuit for measuring, as the first reference clock number, the number of clocks of the high-speed clock generated in a period corresponding to the first reference period from the start of clock generation in the high-speed clock generation circuit. When,
a second reference clock measuring circuit for measuring, as the second reference clock number, the clock number of the high-speed clock generated in a period corresponding to the next reference period following the first reference period; A time measuring device characterized by:
前記基準クロック計算回路は、前記第1の基準クロック数および前記第2の基準クロック数をそれぞれの重みで積和演算することにより、前記基準クロック数を計算することを特徴とする時間計測装置。 In the time measuring device according to claim 3 or claim 4,
The time measurement device, wherein the reference clock calculation circuit calculates the reference clock number by performing a product-sum operation on the first reference clock number and the second reference clock number with respective weights.
前記基準クロック計算回路は、前記第1の基準クロック数をMs1とし、前記第2の基準クロック数をMs2とし、Ms1およびMs2の重みをw1,w2とした場合、前記基準クロック数Msを、次の式で計算することを特徴とする時間計測装置。
When the first reference clock number is Ms1, the second reference clock number is Ms2, and the weights of Ms1 and Ms2 are w1 and w2, the reference clock calculation circuit calculates the reference clock number Ms as follows: A time measuring device characterized by calculating with the following formula.
前記基準クロック計算回路は、前記第1の基準クロック数をMs1とし、前記第2の基準クロック数をMs2とし、Ms1とMs2の差分の絶対値を|Ms1-Ms2|とし、0より大きく|Ms1-Ms2|より小さい値をmとした場合、前記基準クロック数Msを、次の式で計算することを特徴とする時間計測装置。
The reference clock calculation circuit defines the first reference clock number as Ms1, the second reference clock number as Ms2, and the absolute value of the difference between Ms1 and Ms2 as |Ms1−Ms2|, which is larger than 0 and |Ms1 A time measuring device, wherein the reference clock number Ms is calculated by the following equation, where m is a value smaller than -Ms2|.
前記低速クロック生成回路が、一定の基準周期で低速クロックを生成する低速クロック生成ステップと、
前記高速クロック生成回路が、前記低速クロックより高速の高速クロックを生成する高速クロック生成ステップと、
前記計測処理回路が、前記対象期間の計測開始時点および計測終了時点に基づいて、前記低速クロックおよび前記高速クロックをカウントし、得られたカウント結果に基づいて前記対象期間の時間長を計測する計測処理ステップとを備え、
前記計測処理ステップは、
前記計測開始時点から、前記計測終了時点以降に到来した前記基準周期と同期する計測経過時点までの期間に、前記低速クロックをカウントする低速クロックカウントステップと、
前記計測終了時点から前記計測経過時点までの期間に前記高速クロックをカウントする高速クロックカウントステップと、
前記基準周期当たりにおける前記高速クロックのクロック数を示す基準クロック数を記憶する記憶ステップと、
前記低速クロックカウントステップおよび前記高速クロックカウントステップのカウント結果と、前記基準クロック数と、前記基準周期の時間長とに基づいて、前記対象期間の時間長を計算する時間計算ステップとを含み、
前記基準クロック数は、前記高速クロックの生成を開始してから複数個の前記基準周期分に相当する周期変動期間内に生成される前記高速クロックに関する、前記基準周期当たりにおける前記高速クロックのクロック数からなる
ことを特徴とする時間計測方法。 A time measurement method used in a time measurement device that includes a low-speed clock generation circuit, a high-speed clock generation circuit, and a measurement processing circuit and measures the time length of an input target period,
a low-speed clock generation step in which the low-speed clock generation circuit generates a low-speed clock with a constant reference period;
a high-speed clock generation step in which the high-speed clock generation circuit generates a high-speed clock faster than the low-speed clock;
Measurement in which the measurement processing circuit counts the low-speed clock and the high-speed clock based on the measurement start time and the measurement end time of the target period, and measures the time length of the target period based on the obtained count result. a processing step;
The measurement processing step includes
a low-speed clock count step of counting the low-speed clock during a period from the measurement start time to the measurement lapse time synchronized with the reference period that has arrived after the measurement end time;
a high-speed clock count step of counting the high-speed clock during a period from the measurement end point to the measurement elapsed point;
a storage step of storing a reference clock number indicating the clock number of the high-speed clock per the reference period;
a time calculation step of calculating the time length of the target period based on the count results of the low-speed clock count step and the high-speed clock count step, the number of reference clocks, and the time length of the reference period;
The number of reference clocks is the number of high-speed clocks per reference period for the high-speed clock generated within a period variation period corresponding to a plurality of reference periods after the start of generation of the high-speed clock. A time measurement method characterized by comprising:
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019110828A JP7211902B2 (en) | 2019-06-14 | 2019-06-14 | Time measuring device and method |
CN202010435036.8A CN112082607B (en) | 2019-06-14 | 2020-05-21 | Time measurement device and method |
TW109117715A TWI772810B (en) | 2019-06-14 | 2020-05-27 | Time measurement apparatus and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019110828A JP7211902B2 (en) | 2019-06-14 | 2019-06-14 | Time measuring device and method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020204472A JP2020204472A (en) | 2020-12-24 |
JP7211902B2 true JP7211902B2 (en) | 2023-01-24 |
Family
ID=73734976
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019110828A Active JP7211902B2 (en) | 2019-06-14 | 2019-06-14 | Time measuring device and method |
Country Status (3)
Country | Link |
---|---|
JP (1) | JP7211902B2 (en) |
CN (1) | CN112082607B (en) |
TW (1) | TWI772810B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008081610A1 (en) | 2006-12-27 | 2008-07-10 | Panasonic Corporation | Ultrasonic flow meter |
Family Cites Families (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6045835B2 (en) * | 1978-06-15 | 1985-10-12 | 松下電工株式会社 | Clock pulse divider circuit for pulse counting timer |
JPH0534474A (en) * | 1991-08-01 | 1993-02-09 | Mitsubishi Electric Corp | Measurement timer device |
JP3689973B2 (en) * | 1996-05-16 | 2005-08-31 | 松下電器産業株式会社 | Flow measuring device |
JP3689021B2 (en) * | 2001-05-25 | 2005-08-31 | 三菱電機株式会社 | Timing control apparatus and timing control method |
JP2003078427A (en) * | 2001-09-05 | 2003-03-14 | Nec Corp | Portable telephone terminal, intermittent reception controlling method used for the same, and program thereof |
US20040061530A1 (en) * | 2002-08-12 | 2004-04-01 | Satoru Tanigawa | Clock conversion apparatus, clock conversion method, video display apparatus, and memory address setting method |
US7379395B2 (en) * | 2004-06-30 | 2008-05-27 | Teradyne, Inc. | Precise time measurement apparatus and method |
JP4788235B2 (en) * | 2005-08-16 | 2011-10-05 | パナソニック株式会社 | Fluid flow measuring device |
JP4973035B2 (en) * | 2006-07-06 | 2012-07-11 | パナソニック株式会社 | Ultrasonic flow meter |
JP2010223780A (en) * | 2009-03-24 | 2010-10-07 | Nec Corp | Measuring device, frequency-ratio measuring circuit, measuring method and program |
JP2012127663A (en) * | 2010-12-13 | 2012-07-05 | Panasonic Corp | Flow rate measuring device |
JP5906388B2 (en) * | 2012-05-17 | 2016-04-20 | パナソニックIpマネジメント株式会社 | Flow measuring device |
CN102928677A (en) * | 2012-11-09 | 2013-02-13 | 湖南航天远望测控技术有限公司 | Nano pulse signal acquiring method |
CN104614028B (en) * | 2015-03-07 | 2019-02-12 | 姜跃炜 | Split-second precision calibration method for ultrasonic flowmeter |
CN106612104B (en) * | 2015-10-26 | 2023-06-09 | 深圳市博巨兴微电子科技有限公司 | Real-time clock error compensation device and method |
JP6957278B2 (en) * | 2017-09-08 | 2021-11-02 | ローム株式会社 | Ultrasonic flowmeter |
-
2019
- 2019-06-14 JP JP2019110828A patent/JP7211902B2/en active Active
-
2020
- 2020-05-21 CN CN202010435036.8A patent/CN112082607B/en active Active
- 2020-05-27 TW TW109117715A patent/TWI772810B/en active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008081610A1 (en) | 2006-12-27 | 2008-07-10 | Panasonic Corporation | Ultrasonic flow meter |
Also Published As
Publication number | Publication date |
---|---|
CN112082607A (en) | 2020-12-15 |
JP2020204472A (en) | 2020-12-24 |
TWI772810B (en) | 2022-08-01 |
TW202113516A (en) | 2021-04-01 |
CN112082607B (en) | 2024-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4788235B2 (en) | Fluid flow measuring device | |
US9379714B1 (en) | Circuits and methods of TAF-DPS vernier caliper for time-of-flight measurement | |
JP5524972B2 (en) | Flow measuring device | |
JP2012127663A (en) | Flow rate measuring device | |
CN106527099B (en) | A kind of time-to-digit converter and its time measuring circuit and method | |
KR100220672B1 (en) | Time interval measurer having parallel architecture | |
JP2013120836A (en) | Semiconductor integrated circuit | |
JP7211902B2 (en) | Time measuring device and method | |
JP4973035B2 (en) | Ultrasonic flow meter | |
JP4835068B2 (en) | Fluid flow measuring device | |
US9383726B2 (en) | Physical quantity measuring apparatus and physical quantity measuring method | |
JP5787096B2 (en) | Physical quantity measuring device, physical quantity measuring method | |
JP3651124B2 (en) | Ultrasonic measuring device and flow measuring device including the same | |
JP2019124478A (en) | Time measuring circuit | |
KR102420037B1 (en) | Time-to-digital converter supporting run-time calibration | |
JP5294718B2 (en) | Frequency converter | |
JP2008014800A (en) | Flow measuring instrument | |
JP2006214793A (en) | Device for measuring flow rate | |
JP3601523B2 (en) | Flow measurement device | |
JP2019045343A (en) | Pulse output device, electromagnetic flowmeter, and pulse output method | |
JP2001012981A (en) | Flowmeter | |
JP2003315115A5 (en) | ||
TWI426283B (en) | Duty cycle measuring systems and methods for the same | |
KR100532041B1 (en) | Flow meter having improved measuring preciseness using charging/discharging characteristics of capacitor | |
RU2638972C2 (en) | Method of frequency measurement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220324 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20221205 |
|
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: 20221220 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230112 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7211902 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |