JP4193102B2 - Physical quantity measuring device - Google Patents

Physical quantity measuring device Download PDF

Info

Publication number
JP4193102B2
JP4193102B2 JP2002262555A JP2002262555A JP4193102B2 JP 4193102 B2 JP4193102 B2 JP 4193102B2 JP 2002262555 A JP2002262555 A JP 2002262555A JP 2002262555 A JP2002262555 A JP 2002262555A JP 4193102 B2 JP4193102 B2 JP 4193102B2
Authority
JP
Japan
Prior art keywords
counter
physical quantity
mclk
count
pulse train
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002262555A
Other languages
Japanese (ja)
Other versions
JP2004101331A (en
Inventor
広樹 吉野
越太郎 小山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP2002262555A priority Critical patent/JP4193102B2/en
Publication of JP2004101331A publication Critical patent/JP2004101331A/en
Application granted granted Critical
Publication of JP4193102B2 publication Critical patent/JP4193102B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Arrangements For Transmission Of Measured Signals (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、物理量測定装置に関し、詳しくは物理量に応じて変化するセンサ振動周波数を計数するためのパルスカウンタに改良を加えた物理量測定装置に関する。
【0002】
【従来の技術】
従来技術における物理量測定装置は、図6に示すように、差圧/圧力、流量、温度等の物理量Pを歪として検出し、この物理量Pの大きさに応じたパルス列信号Fcでカウンタを計数し、この計数したカウント値に基づいて物理量Pcalcを算出する計数算出部110を備えた構成になっている。
【0003】
計数算出部110は、センサ/ドライバ回路111と、カウンタ及びレジスタからなる計数回路112と、周波数F及び物理量Pcalcを算出するコンピュータCPU(113)と、水晶発振器114とからなる。
【0004】
センサ/ドライバ回路111は、物理量Pを歪として検出し、物理量Pの大きさに応じた周波数で振動する振動子と発振回路とから構成されており、振動子の周波数を持つパルス列信号Fcとして出力する。
【0005】
計数回路112は、図7に示すように、制御部121、Fcカウンタ122、MCLKカウンタ123、Fcレジスタ124、MCLKレジスタ125とから構成されており、一定時間内において、水晶発振器114(図6参照)からの基準クロックMCLK及びセンサ/ドライバ回路111(図6参照)からのFc信号をカウントし、MCLKカウント値M、Fcカウント値Nとして出力する。
【0006】
MCLKカウンタ123及びFcカウンタ122は、それぞれ基準クロックMCLK、Fc信号の立ち上がりを計数する8〜32ビットのフリーランカウンタである。
【0007】
これらのカウンタの値は、計数許容信号GATEの立ち上がり直後の、Fc信号の立ち上がり直後の、基準クロックMCLKの立下りで毎回ラッチされる。ラッチと同時に読出し要求信号IRQを発生し、コンピュータCPU(113)(図6参照)へのカウント値Read要求を出す。
【0008】
基準クロックMCLKは水晶発振器114からの数MHzのパルス列であり、パルス列信号Fcはセンサ/ドライバ回路111からの数十〜数百kHzのパルス列である。計数許容信号GATEは、約GATE1パルス分の間、基準クロックMCLK、パルス信号Fcを計数する数十〜数百msecの信号である。
【0009】
読出し要求信号IRQは、コンピュータCPU(113)へのカウント値(レジスタ内)Read要求信号である。DataBusはコンピュータCPU(113)へのカウント値を送信するデータバスである。
【0010】
コンピュータCPU(113)は、計数回路112のパルス数であるMCLKカウント値M、Fcカウント値Nを受け取り、次式により物理量Pに応じた振動子の振動数を算出する。
【0011】
振動数fcalc=N/(M/fmclk)=fmclk×(N/M)・・・式(1)
fmclk;水晶発振器の固有周波数
N;Fcカウント値
M;MCLKカウント値
【0012】
このようにして得られた振動数fcalcから、図示しないが、この振動数fcalのパルスをカウントし、D/A変換して物理量Pcalcを算出する。
【0013】
さて、このような計数算出部110を備えた物理量測定装置における動作について、図6及び図7を参照して、図8に示すタイミングチャートを参照して以下説明する。
【0014】
先ず、MCLKカウンタ123、Fcカウンタ122はそれぞれ基準クロックMCLK、Fc信号の立ち上がりを計数するフリーカウンタであるが、カウント値は、計数許容信号GATEの立ち上がり(A点)直後の、信号Fcの立ち上がり(B点)直後の基準クロックMCLKの立下り(C点)で毎回ラッチされる。
【0015】
そして、毎回のラッチと同時に読出し要求信号IRQを発生し、コンピュータCPU(113)へのカウント値Read要求を出す。コンピュータCPU(113)がReadを完了すると読出し要求信号IRQはオフされる。
【0016】
ここで、ある立ち上がりにラッチされたそれぞれの値をMk+1、Nk+1とすれば、1GATE(計数時間)において計数したMCLKカウンタ及びFcカウンタのカウント値はそれぞれMk+1−Mk,Nk+1−Nkとなる。
従って上記の式(1)は、次の式(2)のように変形することができる。
【0017】
振動数fcalc
=fmclk×(Nk+1−Nk)/(Mk+1−Mk)…式(1)
となる。
【0018】
ここで、{(Mk+1−Mk)/fmclk}は、Fc信号のパルスを(Nk+1−Nk)個受け取る時間を示し、基準クロックMCLKで作られた回路内で最も正確な時間なので、基準クロックMCLKに依存し、パルス列信号Fcの値の影響を受けない。
【0019】
又、GATE周期を長くとれば、(Mk+1−Mk),(Nk+1−Nk)の値が大きくとれるため、パルス列信号Fcのゆらぎが平均化されて小さくなり、且つMCLKカウンタのカウントエラーの重み(1/(Mk+1−Mk)も小さくなる。
【0020】
【発明が解決しようとする課題】
しかしながら、従来技術で説明した物理量測定装置におけるパルスカウンタにおいて、特に振動数fcalcの揺動(ゆらぎ)が存在することである。
【0021】
振動数fcalcの揺動(ゆらぎ)は、最終的には測定装置の出力である物理量のゆらぎとして現れることとなる。
この振動数fclacの揺動の原因は以下の2つである。
(1)パルス列のFc信号のゆらぎであり、センサ及び励振回路で発生するランダムノイズにより発生する。
(2)カウンタの分解能の限界があり、それは水晶発振器のクロック(パルス幅)に依存していることに起因する。
【0022】
これらの(1)、(2)の対策として、計数許容信号GATEの周期を長くとり、MCLKカウンタ値M、Fcカウンタ値Nを多くカウントする方法がある。これにより、ゆらぎのあるFc信号に対して時間平均をとれ、又、MCLKのカウントエラーの影響を小さくできる。
【0023】
しかし、計数許容信号GATEの周期を長く取ると、周波数/物理量の更新周期(無駄時間)が長くなり応答が遅くなってしまう。逆に、計数許容信号GATEの周期を短くすると、測定装置の出力がゆらいでしまい、精度の悪化につながる。
【0024】
現状において、測定装置には0.1%以下の高精度が要求されることが多くなっているが、これを実現するための計数許容信号GATEの周期は数100msec程度となる。一方で測定装置の応答速度としては100msec以下の要求が増えている。
【0025】
上記の(2)の対策として、周波数の高い水晶発振器を使う方法があるが、消費電流に激しい制限のある2線式伝送器では高周波の発振器は使用できないという問題がある。
【0026】
従って、低い周波数の水晶発振器(基準クロック)を使用し、短い更新周期で安定した周波数計数を行うカウンタを小さい回路規模で構成し、入力量に対して高分解能且つ高速応答な物理量測定装置を実現することに解決しなければならない課題を有する。
【0027】
【課題を解決するための手段】
上記課題を解決するために、本発明に係る物理量測定装置は、次に示す構成にすることである。
(1)物理量Pの大きさに応じたパルス列信号Fcでカウンタを計数し、該計数したカウント値に基づいて物理量Pcalcを算出する計数算出部を備えた物理量測定装置において、
前記計数算出部は、
前記物理量Pの大きさに応じた振動数をパルス列信号Fcとして出力するセンサ/ドライバ手段と、
前記パルス列信号Fcでカウントを開始するFcカウンタ手段と、
前記パルス列信号Fcが発生する毎に、その直後の基準クロックでカウントを開始する複数のMCLKカウンタ手段と、
前記複数のMCLKカウンタ手段で計数したそれぞれのMCLKカウント値を加算した平均値を固有周波数で除した値を、前記Fcカウンタ手段で計数したFcカウント値で除して得られた物理量Pcalcを生成する物理量生成手段と、
を具備したことを特徴とする物理量測定装置。
(2)物理量Pの大きさに応じたパルス列信号Fcでカウンタを計数し、該計数したカウント値に基づいて物理量Pcalcを算出する計数算出部を備えた物理量測定装置において、
前記計数算出部は、
前記物理量Pの大きさに応じた振動数をパルス列信号Fcとして出力するセンサ/ドライバ手段と、
カウンタの計数時間を制御するカウンタ計数許容手段と、
前記パルス列信号Fcでカウントを開始するFcカウンタ手段と、
前記パルス列信号Fcが発生する毎に、前記パルス列信号Fc信号直後の基準クロックMCLKでカウントを開始するMCLKカウンタ手段と、
前記カウンタ計数許容手段により発生する計数許容信号GATE1,2,・・・,iが発生する毎に、前記MCLKカウンタ手段で計数したMCLKカウント値を固有周波数で除した値を前記Fcカウンタ手段で計数したFcカウント値で除して得られた固有物理量を生成し、予め設定されている前記計数許容信号GATE1,2,・・・,iの発生回数が終了したときに、前記固有物理量を平均化して物理量Pcalcを生成する生成手段と、
を具備したことを特徴とする物理量測定装置。
【0028】
【発明の実施の形態】
次に、本発明に係る物理量測定装置の種々の実施形態について、図面を参照して説明する。
【0029】
本発明に係る第1の実施形態の物理量測定装置は、図1に示すように、差圧/圧力、流量、温度等の物理量Pを歪として検出し、該物理量Pの大きさに応じたパルス列信号Fcでカウンタを計数し、該計数したカウント値に基づいて物理量Pcalcを算出する計数算出部10を備えた構成になっている。
【0030】
計数算出部10は、物理量Pの大きさに応じた振動数をパルス列信号Fcを生成して出力するセンサ/ドライバ手段であるセンサ/ドライバ回路11と、センサ/ドライバ回路11からのパルス列信号Fcを入力して計数するカウンタ及びレジスタを備えた計数回路12と、計数回路12に基準クロックMCLKを供給する水晶発振器14と、計数回路12で得られたMCLKカウンタ値M、Fcカウンタ値Nを入力して周波数F及び圧力値Pcalcを算出するコンピュータCPU(13)とからなる。
【0031】
計数回路12は、図2に示すように、コンピュータCPU(13)(図1参照)からのカウント値Read信号、読出し要求信号ACK、計数許容信号GATE、Fc信号を入力し、基準クロックMCLKにより制御する制御部21と、Fc信号によりカウントするFcカウンタ22と、基準クロックMCLKによりカウントするMCLKカウンタ23と、Fcレジスタ24と、複数のMCLKレジスタ1,2,…,i(24,25,26,27)と、アンドゲートとからなる。
【0032】
このなかで、Fcカウンタ22及びFcレジスタ24でFcカウンタ手段を構成し、MCLKカウンタ23及び複数のMCLKレジスタ1、2、…、i(25、26、27)で複数のMCLKカウンタ手段を構成する
【0033】
コンピュータCPU(13)には、複数のMCLKカウンタ手段で計数した夫々のMCLKカウント値を加算した平均値を固有周波数で除した値を、Fcカウンタ手段で計数したFcカウント値で除して得られた物理量Pcalcを生成する物理量生成手段を具備している。
【0034】
次に、このような構成からなる物理量測定装置における動作について、図1及び図2を参照して、図3に示すフローチャートを参照して以下に説明する。
【0035】
先ず、Fcレジスタ24及びMCLKレジスタ1(25)は、計数許容信号GATEの立ち上がり(A点)の直後の最初のFc信号の立ち上がり(B点)の直後の基準クロックMCLKの立下り(C点)において、MCLKカウンタ23及びFcカウンタ23の値をラッチする。
【0036】
MCLKレジスタ2(26)は、計数許容信号GATEの立ち上がり(A点)後の、2回目のFc信号の立ち上がり(D点)の直後の基準クロックMCLKの立下り(E点)において、MCLKカウンタ23の値をラッチする。
【0037】
MCLKレジスタi(27)は、計数許容信号GATEの立ち上がり(A点)後の、i回目のFc信号の立ち上がり(F点)の直後の基準クロックMCLKの立下り(G点)でMCLKカウンタ23の値をラッチする。
【0038】
そして、このようにFc信号の立ち上がり(i点)までのMCLKカウンタ23をMCLKレジスタ1,2,…,i(25,26,27)にラッチした後に、コンピュータCPU(13)に対して、読出し要求信号IRQを送出し、データバスにのせてあるFcレジスタ24及びMCLKレジスタ1,2,…,i(25,26,27)を送出する。
【0039】
コンピュータCPU(13)においては、物理量生成手段により、MCLKレジスタ1,2,…,i(25,26,27)のそれぞれのMCLKカウント値を加算した平均値を固有周波数で除した値を、Fcレジスタ24のFcカウント値で除して得られた物理量Pcalcを生成する。
【0040】
このように、基準クロックMCLKのカウンタであるMCLKカウンタは1個にし、それに対してタイミングをずらしてラッチする複数のレジスタを用意したことにより、回路規模を小さくすること及び基準クロックMCLKの配線を極力抑えることで消費電流を小さくすることができる。
【0041】
ここで、最初の計数許容信号GATEの立ち上がり(A点)のFc信号でラッチされたFcレジスタ24、MCLKレジスタ1(25)、…、MCLKレジスタi(27)の値をNk,M1k,Mikとする。
【0042】
次の計数許容信号GATEの立ち上がり(H点)のFc信号でラッチされたFcレジスタ24、MCLKレジスタ1(25)、…、MCLKレジスタi(27)の値をNk+1,M1k+1,Mik+1とすると、振動子の振動数の算出式は次の式(3)により算出することができる。
【0043】
fclac=fmclk×(k+1−k)/{{(1k+1−1k)+(2k+1−2k)+,…,+(ik+1−ik)}/i}…式(3)
【0044】
Fc信号の周波数は数100〜数100kHz前後であるので、数10〜数100μsずつずらしてMCLKレジスタ1,2,…,i(25,26,27)にデータをラッチすることになる。
【0045】
一方、計数許容信号GATEの周期は数10〜数100msなので、MCLKレジスタ1,2,…,i(25,26,27)の数i=10個程度であれば1つの計数許容信号GATE内で一連の動作は完了する。
【0046】
即ち、レジスタを最大限10個設けて、その平均値をMCLKカウント値とすれば、所謂、Fc信号のゆらぎが平均化され安定した周波数計数を行うことができるのである。
【0047】
このように、センサ及び振動回路で発生する周波数のゆらぎはランダムノイズによるものであるが、周波数タイミングでラッチしたデータから、上記の式(3)を用いて計算すると、従来技術で示した式(2)でゲート時間をi倍した場合と同程度のゆらぎ低減の効果が得られる。
【0048】
図4に示す図は、レジスタの数を増やした場合の、振動子の周波数のゆらぎの大きさの変化を示したもので、基準クロックが2MHz、Fc信号が100kHz、計数許容信号GATEが40msecとした場合の振動幅の状態をグラフにしたものである。
【0049】
この図の意味することは、レジスタの数が1個から2個に増えると急速にその振動幅が減少し、更にレジスタの数が3個から7個ぐらいになると序々に振動幅が減少し、レジスタの数が10個ぐらいまで落ち着いた減少を続け、その先のレジスタの数は増えても、あまり振動幅は減少しない。このことは、レジスタの数が最高でも10個までで、好ましくは8個から10個ぐらいであることが理想的である。
【0050】
このように、本発明では、基準クロックMCLKのカウンタであるMCLKカウンタは1個とし、それに対してタイミングをずらしてラッチする複数のレジスタ(MCLKレジスタ1,2,…,i(25,26,27)を用意することにより、回路規模を小さくすること及び基準クロックMCLKの配線を極力抑えることで消費電流を小さくすることができる。
【0051】
次に、本発明に係る第2の実施形態の物理量測定装置について、図面を参照して説明する。尚、物理量測定装置の全体構成は図1に示すものと同じであり、異なるのは計数回路のみであるので、計数回路のみを説明する
【0052】
第2の実施形態の物理量測定装置を構成する計数回路は、図5に示すように、複数の計数許容信号GATE1,2,…,iのそれそれでFcカウンタ及びMCLKカウンタの値をFcレジスタ及びMCLKレジスタにラッチするというものであり、制御部21A,21B,21C,Fcカウンタ1,2,…,i(22A,22B,22C)、MCLKカウンタ1,2,…,i(23A,23B,23C)、Fcレジスタ1,2,…,i(24A,24B,24C)、MCLKレジスタ1,2,…,i(25A,25B,25C)とから構成されている。
【0053】
このような構成において、計数許容信号GATE1の場合には、Fcカウンタ1(22A)のカウント値がFcレジスタ1(24A)にラッチされ、MCLKカウンタ1(23A)のカウント値がMCLKレジスタ1(25A)にラッチされる。
【0054】
同じく、次の計数許容信号GATE2の場合には、Fcカウンタ2(22B)のカウント値がFcレジスタ2(24B)にラッチされ、MCLKカウンタ2(23B)のカウント値がMCLKレジスタ2(25B)にラッチされる。
【0055】
そして、次の計数許容信号GATEiの場合には、Fcカウンタi(22C)のカウント値がFcレジスタi(24C)にラッチされ、MCLKカウンタi(23C)のカウント値がMCLKレジスタi(25C)にラッチされる。
【0056】
このようにして、計数許容信号GATE1,2,…,iにおけるカウント値が全てレジスタにラッチされた後に読出し要求信号IRQをコンピュータCPUに送信することにより、複数のレジスタの内容が平均化されて、物理量Pcalcが生成される。
【0057】
このように、回路規模や消費電流の制限が厳しくなければ、カウンタとレジスタの組を複数にして、カウンタの計数を許容する計数許容信号GATEを複数にして、微小時間ずらしたものを用意すると、上記第1の実施形態と同様のものが得られる。
【0058】
【発明の効果】
以上説明したように、本発明に係る物理量測定装置は、計数時間の短いカウンタ、即ち、基準クロックMCLKで計数するカウンタの値を、微小時間ずらして複数回ラッチすることにより、ゆらぎのあるパルス列信号Fcに対して時間的に平均した値を得ることができる。これは、低い周波数の基準クロックMCLKを使用し、短い更新周期で安定した周波数計数を行うカウンタを小さな回路規模で構成でき、入力物理量に対して高分解能且つ高速応答な物理量測定装置を実現できるという効果がある。
【図面の簡単な説明】
【図1】本発明に係る物理量測定装置を構成する計数算出部のブロック図である。
【図2】同計数算出部を構成する計数回路のブロック図である。
【図3】同計数算出部のタイミングチャートである。
【図4】同カウンタ数と振動幅との関係を示したグラフである。
【図5】同計数算出部を構成する計数回路のブロック図である。
【図6】従来技術における物理量測定装置を構成する計数算出部のブロック図である。
【図7】図6における計数算出部を構成する計数回路のブロック図である。
【図8】図6における計数算出部のタイミングチャートである。
【符号の説明】
10 計数算出部
11 センサ/ドライバ回路
12 計数回路
12A 計数回路
13 コンピュータ
14 水晶発振器
21 制御部
21A 制御部1
21B 制御部2
21C 制御部i
22 Fcカウンタ
22A Fcカウンタ1
22B Fcカウンタ2
22C Fcカウンタi
23 MCLKカウンタ
23A MCLKカウンタ1
23B MCLKカウンタ2
23C MCLKカウンタi
24 Fcレジスタ
24A Fcレジスタ1
24B Fcレジスタ2
24C Fcレジスタi
25 MCLKレジスタ1
25A MCLKレジスタ1
25B MCLKレジスタ2
25C MCLKレジスタi
26 MCLKレジスタ2
27 MCLKレジスタi
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a physical quantity measuring device, and more particularly to a physical quantity measuring device in which a pulse counter for counting a sensor vibration frequency that changes in accordance with a physical quantity is improved.
[0002]
[Prior art]
As shown in FIG. 6, the conventional physical quantity measuring device detects a physical quantity P such as differential pressure / pressure, flow rate, temperature, etc. as a distortion, and counts a counter with a pulse train signal Fc corresponding to the magnitude of the physical quantity P. The counter includes a count calculation unit 110 that calculates a physical quantity Pcalc based on the counted value.
[0003]
The count calculation unit 110 includes a sensor / driver circuit 111, a count circuit 112 including a counter and a register, a computer CPU (113) that calculates a frequency F and a physical quantity Pcalc, and a crystal oscillator 114.
[0004]
The sensor / driver circuit 111 includes a vibrator that oscillates at a frequency corresponding to the magnitude of the physical quantity P and an oscillation circuit that detects the physical quantity P as distortion, and outputs it as a pulse train signal Fc having the vibrator frequency. To do.
[0005]
As shown in FIG. 7, the counting circuit 112 includes a control unit 121, an Fc counter 122, an MCLK counter 123, an Fc register 124, and an MCLK register 125. The crystal oscillator 114 (see FIG. 6) within a certain period of time. ) And the Fc signal from the sensor / driver circuit 111 (see FIG. 6) are counted and output as MCLK count value M and Fc count value N.
[0006]
The MCLK counter 123 and the Fc counter 122 are 8- to 32-bit free-run counters that count rising edges of the reference clocks MCLK and Fc signals, respectively.
[0007]
The values of these counters are latched every time at the falling edge of the reference clock MCLK immediately after the rising edge of the count allowable signal GATE and immediately after the rising edge of the Fc signal. Simultaneously with the latch, a read request signal IRQ is generated to issue a count value Read request to the computer CPU (113) (see FIG. 6).
[0008]
The reference clock MCLK is a pulse train of several MHz from the crystal oscillator 114, and the pulse train signal Fc is a pulse train of tens to hundreds of kHz from the sensor / driver circuit 111. The count allowable signal GATE is a signal of several tens to several hundreds msec for counting the reference clock MCLK and the pulse signal Fc for about GATE 1 pulse.
[0009]
The read request signal IRQ is a count value (within a register) Read request signal to the computer CPU (113). DataBus is a data bus for transmitting a count value to the computer CPU (113).
[0010]
The computer CPU (113) receives the MCLK count value M and the Fc count value N, which are the number of pulses of the counting circuit 112, and calculates the vibration frequency of the vibrator according to the physical quantity P by the following equation.
[0011]
Frequency fcalc = N / (M / fmclk) = fmclk × (N / M) (1)
fmclk; natural frequency N of crystal oscillator; Fc count value M; MCLK count value
Although not shown in the figure, the pulse having the frequency fcal is counted from the frequency fcalc thus obtained, and the physical quantity Pcalc is calculated by D / A conversion.
[0013]
Now, the operation of the physical quantity measuring apparatus provided with such a count calculation unit 110 will be described below with reference to FIGS. 6 and 7 and the timing chart shown in FIG.
[0014]
First, the MCLK counter 123 and the Fc counter 122 are free counters that count the rising edges of the reference clock MCLK and the Fc signal, respectively, but the count value is the rising edge of the signal Fc immediately after the rising edge (point A) of the count allowable signal GATE. Latched at the falling edge (point C) of the reference clock MCLK immediately after point B).
[0015]
Then, a read request signal IRQ is generated simultaneously with each latch, and a count value Read request is issued to the computer CPU (113). When the computer CPU (113) completes Read, the read request signal IRQ is turned off.
[0016]
Here, if the respective values latched at a certain rise are Mk + 1 and Nk + 1, the count values of the MCLK counter and the Fc counter counted in 1 GATE (counting time) are Mk + 1−Mk and Nk + 1−Nk, respectively.
Therefore, the above equation (1) can be transformed into the following equation (2).
[0017]
Frequency fcalc
= Fmclk × (Nk + 1−Nk) / (Mk + 1−Mk) (1)
It becomes.
[0018]
Here, {(Mk + 1−Mk) / fmclk} indicates a time for receiving (Nk + 1−Nk) Fc signal pulses, and is the most accurate time in the circuit formed by the reference clock MCLK. Depends on the value of the pulse train signal Fc.
[0019]
Further, if the GATE period is increased, the values of (Mk + 1−Mk) and (Nk + 1−Nk) can be increased. Therefore, fluctuations in the pulse train signal Fc are averaged and decreased, and the weight of the count error of the MCLK counter (1 / (Mk + 1−Mk) also becomes smaller.
[0020]
[Problems to be solved by the invention]
However, in the pulse counter in the physical quantity measuring device described in the prior art, there is a particular fluctuation (fluctuation) of the frequency fcalc.
[0021]
The oscillation (fluctuation) of the frequency fcalc finally appears as a fluctuation of the physical quantity that is the output of the measuring apparatus.
There are the following two causes of the oscillation of the frequency fclac.
(1) Fc signal fluctuation in the pulse train, which is generated by random noise generated in the sensor and the excitation circuit.
(2) There is a limit on the resolution of the counter, which is due to the dependence on the clock (pulse width) of the crystal oscillator.
[0022]
As a countermeasure against these (1) and (2), there is a method in which the period of the count allowable signal GATE is made longer and the MCLK counter value M and the Fc counter value N are counted more. As a result, a time average can be taken for the Fc signal with fluctuation, and the influence of the MCLK count error can be reduced.
[0023]
However, if the cycle of the count allowance signal GATE is made longer, the frequency / physical quantity update cycle (dead time) becomes longer and the response becomes slower. On the other hand, if the cycle of the count allowable signal GATE is shortened, the output of the measuring device fluctuates, leading to deterioration in accuracy.
[0024]
At present, measuring devices are often required to have a high accuracy of 0.1% or less, but the period of the count allowable signal GATE for realizing this is about several hundreds msec. On the other hand, as a response speed of the measuring apparatus, a demand of 100 msec or less is increasing.
[0025]
As a countermeasure for the above (2), there is a method of using a crystal oscillator having a high frequency, but there is a problem that a high-frequency oscillator cannot be used in a two-wire transmitter having a severe restriction on current consumption.
[0026]
Therefore, a low-frequency crystal oscillator (reference clock) is used and a counter that performs stable frequency counting with a short update cycle is configured with a small circuit scale, realizing a high-resolution and high-speed response physical quantity measuring device for the input quantity. Having problems that must be solved.
[0027]
[Means for Solving the Problems]
In order to solve the above problems, a physical quantity measuring apparatus according to the present invention is configured as follows.
(1) In a physical quantity measuring device including a count calculation unit that counts a counter with a pulse train signal Fc corresponding to the magnitude of the physical quantity P and calculates the physical quantity Pcalc based on the counted value.
The count calculation unit
Sensor / driver means for outputting a frequency corresponding to the magnitude of the physical quantity P as a pulse train signal Fc;
Fc counter means for starting counting with the pulse train signal Fc;
A plurality of MCLK counter means for starting counting with the reference clock immediately after each generation of the pulse train signal Fc;
A physical quantity Pcalc obtained by dividing an average value obtained by adding the respective MCLK count values counted by the plurality of MCLK counter means by a natural frequency by the Fc count value counted by the Fc counter means is generated. Physical quantity generation means;
A physical quantity measuring device comprising:
(2) In a physical quantity measuring device including a count calculation unit that counts a counter with a pulse train signal Fc corresponding to the magnitude of the physical quantity P and calculates the physical quantity Pcalc based on the counted value.
The count calculation unit
Sensor / driver means for outputting a frequency corresponding to the magnitude of the physical quantity P as a pulse train signal Fc;
Counter counting permission means for controlling the counting time of the counter;
Fc counter means for starting counting with the pulse train signal Fc;
MCLK counter means for starting counting with a reference clock MCLK immediately after the pulse train signal Fc signal every time the pulse train signal Fc is generated;
.., I generated by the counter counting permission means, every time the MCLK counter value counted by the MCLK counter means is divided by the natural frequency, the Fc counter means counts the value. It was divided by Fc count value to generate a unique physical amount obtained in advance have been set the counting allowable signal GATE1,2, · · ·, when the number of occurrences of i is completed, by averaging the unique physical quantity Generating means for generating a physical quantity Pcalc,
A physical quantity measuring device comprising:
[0028]
DETAILED DESCRIPTION OF THE INVENTION
Next, various embodiments of the physical quantity measuring device according to the present invention will be described with reference to the drawings.
[0029]
As shown in FIG. 1, the physical quantity measuring apparatus according to the first embodiment of the present invention detects a physical quantity P such as differential pressure / pressure, flow rate, temperature, etc. as a strain, and a pulse train corresponding to the magnitude of the physical quantity P. The counter is counted by the signal Fc, and the count calculation unit 10 that calculates the physical quantity Pcalc based on the counted value is provided.
[0030]
The count calculation unit 10 generates a pulse train signal Fc and outputs a frequency corresponding to the magnitude of the physical quantity P, and outputs the pulse train signal Fc from the sensor / driver circuit 11 as a sensor / driver circuit. A counting circuit 12 having a counter and a register for inputting and counting, a crystal oscillator 14 for supplying a reference clock MCLK to the counting circuit 12, and an MCLK counter value M and an Fc counter value N obtained by the counting circuit 12 are input. And a computer CPU (13) for calculating the frequency F and the pressure value Pcalc.
[0031]
As shown in FIG. 2, the counting circuit 12 receives the count value Read signal, the read request signal ACK, the count allowable signal GATE, and the Fc signal from the computer CPU (13) (see FIG. 1), and is controlled by the reference clock MCLK. .., I (24, 25, 26,...), A control unit 21 that performs counting, an Fc counter 22 that counts based on an Fc signal, an MCLK counter 23 that counts based on a reference clock MCLK, an Fc register 24 27) and an AND gate.
[0032]
Among them, the Fc counter 22 and the Fc register 24 constitute an Fc counter means, and the MCLK counter 23 and the plurality of MCLK registers 1, 2,..., I (25, 26, 27) constitute a plurality of MCLK counter means. [0033]
The computer CPU (13) is obtained by dividing the average value obtained by adding the respective MCLK count values counted by the plurality of MCLK counter means by the natural frequency, and dividing by the Fc count value counted by the Fc counter means. Physical quantity generating means for generating the physical quantity Pcalc.
[0034]
Next, the operation of the physical quantity measuring apparatus having such a configuration will be described below with reference to FIGS. 1 and 2 and the flowchart shown in FIG.
[0035]
First, the Fc register 24 and the MCLK register 1 (25) have the falling edge (point C) of the reference clock MCLK immediately after the rising edge (point B) immediately after the rising edge (point A) of the count allowable signal GATE. Then, the values of the MCLK counter 23 and the Fc counter 23 are latched.
[0036]
The MCLK register 2 (26) receives the MCLK counter 23 at the falling edge (point E) of the reference clock MCLK immediately after the rising edge (point D) of the second Fc signal after the rising edge (point A) of the count allowable signal GATE. The value of is latched.
[0037]
The MCLK register i (27) sets the MCLK counter 23 at the falling edge (point G) of the reference clock MCLK immediately after the rising edge (point F) of the i-th Fc signal after the rising edge (point A) of the count allowable signal GATE. Latch the value.
[0038]
Then, after latching the MCLK counter 23 in the MCLK registers 1, 2,..., I (25, 26, 27) until the rising edge (point i) of the Fc signal in this way, the data is read out to the computer CPU (13). A request signal IRQ is transmitted, and the Fc register 24 and MCLK registers 1, 2,..., I (25, 26, 27) on the data bus are transmitted.
[0039]
In the computer CPU (13), a value obtained by dividing the average value obtained by adding the respective MCLK count values of the MCLK registers 1, 2,..., I (25, 26, 27) by the natural frequency by the physical quantity generation means is calculated as Fc. A physical quantity Pcalc obtained by dividing by the Fc count value of the register 24 is generated.
[0040]
In this way, the number of MCLK counters that are counters of the reference clock MCLK is set to one, and a plurality of registers that are latched at different timings are prepared, thereby reducing the circuit scale and wiring of the reference clock MCLK as much as possible. By suppressing it, current consumption can be reduced.
[0041]
Here, the values of the Fc register 24, MCLK register 1 (25),..., MCLK register i (27) latched by the Fc signal at the rising edge (point A) of the first count allowable signal GATE are Nk, M1k, and Mik. To do.
[0042]
When the values of the Fc register 24, MCLK register 1 (25),..., MCLK register i (27) latched by the Fc signal at the rising edge (H point) of the next count allowable signal GATE are Nk + 1, M1k + 1, Mik + 1, vibration The formula for calculating the frequency of the child can be calculated by the following formula (3).
[0043]
fclac = fmclk × (N k + 1- N k) / {{(M 1k + 1- M 1k) + (M 2k + 1- M 2k) +, ..., + (M ik + 1- M ik)} / i} ... Equation (3)
[0044]
Since the frequency of the Fc signal is around several hundreds to several hundreds of kHz, the data is latched in the MCLK registers 1, 2,..., I (25, 26, 27) with a shift of several tens to several hundreds of μs.
[0045]
On the other hand, since the cycle of the count allowable signal GATE is several tens to several hundreds of ms, if the number i of the MCLK registers 1, 2,..., I (25, 26, 27) is about 10, then within one count allowable signal GATE. A series of operations is completed.
[0046]
That is, if a maximum of 10 registers are provided and the average value is the MCLK count value, so-called fluctuations in the Fc signal are averaged and stable frequency counting can be performed.
[0047]
As described above, the fluctuation of the frequency generated in the sensor and the vibration circuit is due to random noise. If the above equation (3) is used to calculate from the data latched at the frequency timing, the equation ( In 2), the same fluctuation reduction effect as when the gate time is multiplied by i can be obtained.
[0048]
The diagram shown in FIG. 4 shows changes in the frequency fluctuation of the vibrator when the number of registers is increased. The reference clock is 2 MHz, the Fc signal is 100 kHz, and the count allowable signal GATE is 40 msec. This is a graph of the state of vibration width when
[0049]
This figure means that when the number of registers increases from one to two, the vibration width decreases rapidly, and when the number of registers increases from three to seven, the vibration width gradually decreases. Even if the number of registers continues to decrease to about 10 and the number of registers ahead increases, the vibration width does not decrease much. Ideally, the number of registers is up to 10 and preferably about 8 to 10.
[0050]
In this way, in the present invention, there is one MCLK counter that is a counter of the reference clock MCLK, and a plurality of registers (MCLK registers 1, 2,..., I (25, 26, 27) that latch at different timings relative thereto. ), The current consumption can be reduced by reducing the circuit scale and suppressing the wiring of the reference clock MCLK as much as possible.
[0051]
Next, a physical quantity measuring apparatus according to a second embodiment of the present invention will be described with reference to the drawings. The overall configuration of the physical quantity measuring device is the same as that shown in FIG. 1, and only the counting circuit is different, so only the counting circuit will be described.
As shown in FIG. 5, the counting circuit that constitutes the physical quantity measuring device of the second embodiment uses the values of the Fc counter and the MCLK counter of the plurality of count allowable signals GATE1, 2,. The control unit 21A, 21B, 21C, Fc counter 1, 2,..., I (22A, 22B, 22C), MCLK counter 1, 2, ..., i (23A, 23B, 23C) , I (24A, 24B, 24C) and MCLK registers 1, 2,..., I (25A, 25B, 25C).
[0053]
In such a configuration, in the case of the count allowance signal GATE1, the count value of the Fc counter 1 (22A) is latched in the Fc register 1 (24A), and the count value of the MCLK counter 1 (23A) is the MCLK register 1 (25A). ) Is latched.
[0054]
Similarly, in the case of the next count allowable signal GATE2, the count value of the Fc counter 2 (22B) is latched in the Fc register 2 (24B), and the count value of the MCLK counter 2 (23B) is stored in the MCLK register 2 (25B). Latched.
[0055]
In the case of the next count permission signal GATEi, the count value of the Fc counter i (22C) is latched in the Fc register i (24C), and the count value of the MCLK counter i (23C) is stored in the MCLK register i (25C). Latched.
[0056]
In this way, the contents of the plurality of registers are averaged by transmitting the read request signal IRQ to the computer CPU after all the count values in the count allowance signals GATE1, 2,..., I are latched in the registers. A physical quantity Pcalc is generated.
[0057]
In this way, if the circuit scale and current consumption are not severely limited, it is possible to prepare a plurality of counter / register pairs, a plurality of count permission signals GATE that allow the counter to be counted, and a minute time offset. The same thing as the first embodiment is obtained.
[0058]
【The invention's effect】
As described above, the physical quantity measuring device according to the present invention has a pulse train signal having fluctuations by latching a counter having a short counting time, that is, a counter counted by the reference clock MCLK, by shifting the value a plurality of times with a minute shift. A time averaged value for Fc can be obtained. This means that a counter that uses a low-frequency reference clock MCLK and performs stable frequency counting in a short update cycle can be configured with a small circuit scale, and a physical quantity measuring device that can perform high-resolution and high-speed response to input physical quantities can be realized. effective.
[Brief description of the drawings]
FIG. 1 is a block diagram of a count calculation unit constituting a physical quantity measuring device according to the present invention.
FIG. 2 is a block diagram of a counting circuit constituting the count calculation unit.
FIG. 3 is a timing chart of the count calculation unit.
FIG. 4 is a graph showing the relationship between the number of counters and the vibration width.
FIG. 5 is a block diagram of a counting circuit constituting the count calculation unit.
FIG. 6 is a block diagram of a count calculation unit that constitutes a physical quantity measuring device in the prior art.
7 is a block diagram of a counting circuit that constitutes the count calculation unit in FIG. 6. FIG.
8 is a timing chart of the count calculation unit in FIG.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 Count calculation part 11 Sensor / driver circuit 12 Count circuit 12A Count circuit 13 Computer 14 Crystal oscillator 21 Control part 21A Control part 1
21B Control unit 2
21C Control unit i
22 Fc counter 22A Fc counter 1
22B Fc counter 2
22C Fc counter i
23 MCLK counter 23A MCLK counter 1
23B MCLK counter 2
23C MCLK counter i
24 Fc register 24A Fc register 1
24B Fc register 2
24C Fc register i
25 MCLK register 1
25A MCLK register 1
25B MCLK register 2
25C MCLK register i
26 MCLK register 2
27 MCLK register i

Claims (2)

物理量Pの大きさに応じたパルス列信号Fcでカウンタを計数し、該計数したカウント値に基づいて物理量Pcalcを算出する計数算出部を備えた物理量測定装置において、
前記計数算出部は、
前記物理量Pの大きさに応じた振動数をパルス列信号Fcとして出力するセンサ/ドライバ手段と、
前記パルス列信号Fcでカウントを開始するFcカウンタ手段と、
前記パルス列信号Fcが発生する毎に、その直後の基準クロックでカウントを開始する複数のMCLKカウンタ手段と、
前記複数のMCLKカウンタ手段で計数したそれぞれのMCLKカウント値を加算した平均値を固有周波数で除した値を、前記Fcカウンタ手段で計数したFcカウント値で除して得られた物理量Pcalcを生成する物理量生成手段と、を具備したことを特徴とする物理量測定装置。
In a physical quantity measuring device including a count calculation unit that counts a counter with a pulse train signal Fc corresponding to the magnitude of the physical quantity P and calculates the physical quantity Pcalc based on the counted value,
The count calculation unit
Sensor / driver means for outputting a frequency corresponding to the magnitude of the physical quantity P as a pulse train signal Fc;
Fc counter means for starting counting with the pulse train signal Fc;
A plurality of MCLK counter means for starting counting with the reference clock immediately after each generation of the pulse train signal Fc;
A physical quantity Pcalc obtained by dividing an average value obtained by adding the respective MCLK count values counted by the plurality of MCLK counter means by a natural frequency by the Fc count value counted by the Fc counter means is generated. A physical quantity measuring device.
物理量Pの大きさに応じたパルス列信号Fcでカウンタを計数し、該計数したカウント値に基づいて物理量Pcalcを算出する計数算出部を備えた物理量測定装置において、
前記計数算出部は、
前記物理量Pの大きさに応じた振動数をパルス列信号Fcとして出力するセンサ/ドライバ手段と、
カウンタの計数時間を制御するカウンタ計数許容手段と、
前記パルス列信号Fcでカウントを開始するFcカウンタ手段と、
前記パルス列信号Fcが発生する毎に、前記パルス列信号Fc信号直後の基準クロックMCLKでカウントを開始するMCLKカウンタ手段と、
前記カウンタ計数許容手段により発生する計数許容信号GATE1,2,・・・,iが発生する毎に、前記MCLKカウンタ手段で計数したMCLKカウント値を固有周波数で除した値を前記Fcカウンタ手段で計数したFcカウント値で除して得られた固有物理量を生成し、予め設定されている前記計数許容信号GATE1,2,・・・,iの発生回数が終了したときに、前記固有物理量を平均化して物理量Pcalcを生成する生成手段と、
を具備したことを特徴とする物理量測定装置。
In a physical quantity measuring device including a count calculation unit that counts a counter with a pulse train signal Fc corresponding to the magnitude of the physical quantity P and calculates the physical quantity Pcalc based on the counted value,
The count calculation unit
Sensor / driver means for outputting a frequency corresponding to the magnitude of the physical quantity P as a pulse train signal Fc;
Counter counting permission means for controlling the counting time of the counter;
Fc counter means for starting counting with the pulse train signal Fc;
MCLK counter means for starting counting with a reference clock MCLK immediately after the pulse train signal Fc signal every time the pulse train signal Fc is generated;
.., I generated by the counter counting permission means, every time the MCLK counter value counted by the MCLK counter means is divided by the natural frequency, the Fc counter means counts the value. It was divided by Fc count value to generate a unique physical amount obtained in advance have been set the counting allowable signal GATE1,2, · · ·, when the number of occurrences of i is completed, by averaging the unique physical quantity Generating means for generating a physical quantity Pcalc,
A physical quantity measuring device comprising:
JP2002262555A 2002-09-09 2002-09-09 Physical quantity measuring device Expired - Fee Related JP4193102B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002262555A JP4193102B2 (en) 2002-09-09 2002-09-09 Physical quantity measuring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002262555A JP4193102B2 (en) 2002-09-09 2002-09-09 Physical quantity measuring device

Publications (2)

Publication Number Publication Date
JP2004101331A JP2004101331A (en) 2004-04-02
JP4193102B2 true JP4193102B2 (en) 2008-12-10

Family

ID=32262571

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002262555A Expired - Fee Related JP4193102B2 (en) 2002-09-09 2002-09-09 Physical quantity measuring device

Country Status (1)

Country Link
JP (1) JP4193102B2 (en)

Also Published As

Publication number Publication date
JP2004101331A (en) 2004-04-02

Similar Documents

Publication Publication Date Title
US8766646B2 (en) Calibration method and apparatus for clock signal and electronic device
JP4788235B2 (en) Fluid flow measuring device
CN103135661B (en) Time measurement device, microcontroller, program and Method Of Time Measurement
JP4193102B2 (en) Physical quantity measuring device
JP2006208360A (en) Device for measuring transfer time
JPH1073681A (en) Time measuring system and its time measuring method
JP4973035B2 (en) Ultrasonic flow meter
JP2001013179A (en) Measurement method for ring oscillator clock frequency, measurement circuit for ring oscillator clock frequency, and microcomputer
JP5787096B2 (en) Physical quantity measuring device, physical quantity measuring method
JPS6260673B2 (en)
JP2014140107A (en) Pulse measurement circuit and data processing device
JP4466822B2 (en) Frequency measurement circuit
CN112082607B (en) Time measurement device and method
JP2006003310A (en) Ultrasonic flowmeter
JP6500550B2 (en) Timer correction device, timer correction method and timer correction program
JP2003315115A (en) Flow measuring device
JP2019124478A (en) Time measuring circuit
JP5037755B2 (en) Temperature change measuring apparatus and method
JP2001012981A (en) Flowmeter
JP2009169539A (en) Microcomputer
JP3167804B2 (en) Timing device and coordinate input device using the same
JPH0435773B2 (en)
JPH08292822A (en) Intelligent timer
CN101495839A (en) Processing method in operation system, flow rate converter, and coriolis flow meter
JPH04265872A (en) Timing generation circuit of ic tester

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050405

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080314

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080331

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080514

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080609

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080731

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080910

R150 Certificate of patent or registration of utility model

Ref document number: 4193102

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111003

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121003

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131003

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees