JPH0291579A - Frequency measuring method - Google Patents
Frequency measuring methodInfo
- Publication number
- JPH0291579A JPH0291579A JP24546688A JP24546688A JPH0291579A JP H0291579 A JPH0291579 A JP H0291579A JP 24546688 A JP24546688 A JP 24546688A JP 24546688 A JP24546688 A JP 24546688A JP H0291579 A JPH0291579 A JP H0291579A
- Authority
- JP
- Japan
- Prior art keywords
- frequency
- value
- stored
- count value
- shift
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title description 10
- 238000005259 measurement Methods 0.000 claims abstract description 13
- 238000012937 correction Methods 0.000 claims abstract description 3
- 238000000691 measurement method Methods 0.000 claims description 5
- 238000012360 testing method Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 2
- 238000007796 conventional method Methods 0.000 description 1
Landscapes
- Measuring Frequencies, Analyzing Spectra (AREA)
Abstract
Description
【発明の詳細な説明】
[産業上の利用分野]
この発明は、周波数測定方法、特に低周波から高周波に
至る広範囲の周波数測定を精度良く行うものに関する。DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a frequency measuring method, and particularly to a frequency measuring method that accurately measures a wide range of frequencies from low frequencies to high frequencies.
[従来の技術]
従来から、交流信号等の周波数を測定することが行なわ
れている。例えば、自動車のスピードメータ等において
は、回転体に磁石を取りつけ、・この磁石す移動によっ
てコイルに誘起されるパルス信号の周波数を測定するこ
とが行なわれている。[Prior Art] Measuring the frequency of alternating current signals and the like has been conventionally performed. For example, in an automobile speedometer, etc., a magnet is attached to a rotating body, and the frequency of a pulse signal induced in a coil by the movement of the magnet is measured.
このような、周波数測定において、遅い周波数を測定す
る時には1周期に要する時間をクロック信号のカウント
によって測定し、これを周波数に換算するのが一般的で
ある。一方、早い周波数を測定する場合には、一定時間
内に入ってくるパルスの数をカウントして周波数を測定
することが行なわれている。In such frequency measurements, when measuring slow frequencies, it is common to measure the time required for one cycle by counting clock signals, and convert this into a frequency. On the other hand, when measuring a fast frequency, the frequency is measured by counting the number of pulses that arrive within a certain period of time.
[発明が解決しようとする課題]
このような従来の周波数n1定方法によれば、次のよう
な問題点があった。[Problems to be Solved by the Invention] According to such a conventional frequency n1 determination method, there are the following problems.
すなわち、周期をカウントする方法では、周波数が早く
なると、1周期についてのカウント結果の数値が小さな
値となってしまい、誤差が大きくなるという問題点があ
った。また、一定時間内に入ってきたパルス数をカウン
トする方法では、周期が遅くなった時に、カウントする
時間を長くしなければならず、測定に時間が係るという
問題点があった。従って、従来の方法では、低周波から
高周波まで、高精度で周波数を測定することができなか
った。That is, the method of counting cycles has a problem in that as the frequency becomes faster, the numerical value of the count result for one cycle becomes a small value, and the error becomes large. Further, in the method of counting the number of pulses that have arrived within a certain period of time, there is a problem in that when the period becomes slow, the counting time must be increased, and the measurement takes time. Therefore, with conventional methods, it has not been possible to measure frequencies with high accuracy from low frequencies to high frequencies.
発明の目的
この発明は、上述のような問題点を解決することを課題
としてなされたものであり、低周波から高周波まで、高
精度な周波数測定が行える周波数測定方法を提供するこ
とを目的とする。Purpose of the Invention The present invention was made to solve the above-mentioned problems, and an object of the present invention is to provide a frequency measurement method that can perform high-precision frequency measurements from low frequencies to high frequencies. .
[課題を解決するための手段]
この発明に係る周波数測定方法は、被測定信号の周波数
の周期に対応して、クロック信号の数をカウントするカ
ウント工程と、このカウント工程で得られたカウント値
を所定ビット数のメモリに2進数の信号として記憶する
カウント値記憶工程と、記憶されている2進数のカウン
ト値の先頭ビットが1になるまで桁移動する桁移動工程
と、桁移動後の数値から所定数の上位ビットのデータを
取出す演算値取出し工程と、取出されたデータの逆数を
演算算出する1/T算出工程と、この1/T算出工程に
おいて得られた数値に対し、上記桁移動工程において桁
移動した桁数に対応した補正を行う桁戻し工程とを有し
、高周波信号及び低周波信号に対して、同様の精度の周
波数測定を行えることを特徴とする。[Means for Solving the Problems] The frequency measurement method according to the present invention includes a counting step of counting the number of clock signals in accordance with the period of the frequency of the signal under test, and a count value obtained in this counting step. a count value storage step in which a binary number signal is stored in a memory with a predetermined number of bits, a digit shift step in which the digits are shifted until the first bit of the stored binary count value becomes 1, and a numerical value after the digit shift. A calculation value extraction step in which a predetermined number of high-order bits of data are extracted from the data, a 1/T calculation step in which the reciprocal of the extracted data is calculated, and the above-mentioned digit shift for the numerical value obtained in this 1/T calculation step. It is characterized in that it has a digit return step that performs correction corresponding to the number of digits shifted in the process, and can perform frequency measurement with the same precision for high frequency signals and low frequency signals.
[作用]
この発明に係る周波数測定方法は、上述のような構成を
有しており、桁移動を行つた後1/T演算を行い、この
算出値に対し桁戻しを行う。このため、周期の遅い信号
に対しても、周期の早い信号に対しても同様の有効数字
の1/T演算が行える。従って、周期の早い信号から周
期位の遅い信号に対し、同様の精度の周波数測定が行え
る。[Operation] The frequency measuring method according to the present invention has the above-mentioned configuration, and after performing digit movement, performs 1/T calculation, and performs digit reversal on this calculated value. Therefore, the same 1/T calculation of significant figures can be performed for both signals with a slow period and signals with a fast period. Therefore, frequency measurement can be performed with similar precision for signals with a fast period to signals with a slow period.
[実施例コ
以下、この発明の一実施例に係る周波数測定方法に関し
、図面に基づいて説明する。[Embodiment 1] A frequency measuring method according to an embodiment of the present invention will be described below with reference to the drawings.
例えば、自動車の回転数に関するパルス信号である被測
定信号Finはカウンタに入力され、ここで1周期がカ
ウントされる(カウント)。この例においては、クロッ
ク信号が入力される度に1ずつ加算されていき、この加
算値を記憶するものが採用されている。そして、このカ
ウンタは20ビツトの記憶素子からなっているため、θ
〜1.048,575までの値を記憶できる。そこで、
クロック信号として、1,000,000 Hzのもの
を採用し、入力される被測定信号F1nの周波数が1〜
250H2であった場合には、これを1,000,00
0〜4.000の値としてカウントすることができる。For example, the signal to be measured Fin, which is a pulse signal related to the rotational speed of a car, is input to a counter, and one cycle is counted here. In this example, one is added each time a clock signal is input, and this added value is stored. Since this counter consists of a 20-bit memory element, θ
Values from ~1.048,575 can be stored. Therefore,
A clock signal of 1,000,000 Hz is used, and the frequency of the input signal under test F1n is 1 to 1.
If it is 250H2, change this to 1,000,00
It can be counted as a value between 0 and 4.000.
次に、カウンタの値の最上位の値、すなわち20ビツト
目の値が0かどうかを判定する(先頭ビットはOか?)
。すなわち、カウント値が2の19乗より小さな値であ
れば、20ビツト目は0である。Next, determine whether the most significant value of the counter value, that is, the value of the 20th bit, is 0 (Is the first bit O?)
. That is, if the count value is smaller than 2 to the 19th power, the 20th bit is 0.
そして、先頭ビットの値がOであった場合には、カウン
タで得られた値について桁移動を行う(2進桁移動)。Then, if the value of the first bit is O, digit movement is performed for the value obtained by the counter (binary digit movement).
この桁移動は20ビツトのカウンタにおいて記憶されて
いる2進数のカウント値について先頭ビットが1になる
まで記憶内容を1つずつ右送りする移動によって行う。This digit shift is performed by moving the stored contents one by one to the right for the binary count value stored in the 20-bit counter until the first bit becomes 1.
すなわち、20ビツトの記憶素子の左からカウント値の
記憶が行なわれる場合、最も右側の記憶素子(先頭ビッ
ト)の内容が0か1かを判定し、0であった場合には、
記憶内容を1つずつ右送りする。この右送りは、例えば
2を乗算することによって、左側からOを1つずつ追加
することによって行なわれる。That is, when a count value is stored from the left of a 20-bit storage element, it is determined whether the content of the rightmost storage element (first bit) is 0 or 1, and if it is 0,
Moves the memory contents one by one to the right. This right feed is performed by adding O's one by one from the left, for example by multiplying by 2.
そして、この先頭ビットの値が1になるまで繰り返し、
この移動の回数を記憶しておく (移動桁記憶)。なお
、この例の場合、カウンタにおけるカウント値が4,0
00〜t、ooo、ooo程度なので、移動の回数は7
〜θ回の桁移動が行なわれることになる。Then, repeat until the value of this first bit becomes 1,
The number of times of this movement is memorized (movement digit memory). In this example, the count value on the counter is 4,0.
Since it is about 00 to t, ooo, ooo, the number of movements is 7
The digit shift will be performed ~θ times.
先頭ビットが1となった場合には、その先頭ビットから
所定の数のデータを演算値を記憶するメモリに格納する
。例えば、8ビツトのメモリにデータを供給することに
よって、先頭ビットから8ビツト分のデータをここに記
憶する。When the first bit becomes 1, a predetermined number of data starting from the first bit are stored in a memory that stores calculated values. For example, by supplying data to an 8-bit memory, 8 bits of data starting from the first bit are stored here.
そして、この8ビツト分のデータについて逆数を演算算
出する(1/T演算)。Then, the reciprocal is calculated for this 8-bit data (1/T calculation).
次に、この算出データについて、移動桁に対応する桁戻
しを行う(2進桁戻し)。すなわち、上述の桁移動にお
いて、2をN回乗算してN個の桁移動を行っていた場合
には、演算算出後のデータについて2のN乗の乗算を行
うことによって所定の桁戻しを行う。Next, for this calculated data, a digit return corresponding to the moved digit is performed (binary digit return). That is, in the above-mentioned digit shift, if N digits were shifted by multiplying 2 N times, the predetermined digit return is performed by multiplying 2 to the N power of the data after the calculation. .
この演算について、式をもって説明すれば、次のように
なる。This calculation can be explained using a formula as follows.
すなわち、カウント値がXであって、クロック信号がI
MHzであれば、そのときの周期は、周期−x/IMH
z
である。That is, the count value is X and the clock signal is I.
If it is MHz, the period at that time is period - x / IMH
It is z.
しかし、この発明における方法においては、2のN乗の
乗算による桁移動を行っているため、桁移動後の周期T
は、
T−x/IMHz x2N
となる。However, in the method of this invention, digits are shifted by multiplying 2 to the N power, so the period T after digit shifting is
becomes T-x/IMHz x2N.
これについて1/T演算を行うと、周波数Fが次のよう
に算出される。When a 1/T operation is performed on this, the frequency F is calculated as follows.
F−1/T−IMHz/2N−x
そして、得られたFに、2Nを乗算すれば、周波数=1
/T−1/x MHz
となり、周波数が求められることが理解される。F-1/T-IMHz/2N-x Then, by multiplying the obtained F by 2N, frequency = 1
/T-1/x MHz, and it is understood that the frequency is obtained.
このようにして、カウンタにおけるカウント値からその
周波数を測定することができる。ここで、この実施例に
おいては、クロックパルスとしてかなり早い周期、すな
わち1,000.000 Hzのものを採用している。In this way, the frequency can be measured from the count value in the counter. In this embodiment, a clock pulse with a fairly fast cycle, ie, 1,000.000 Hz, is used.
このため、周波数が250 Hzの信号に対してもカウ
ント値は4,000となる。ここで、このカウント値4
.000は約2の12乗に対応する。Therefore, the count value is 4,000 even for a signal with a frequency of 250 Hz. Here, this count value 4
.. 000 corresponds to approximately 2 to the 12th power.
そして、実際に1/T演算に供されるデータは8ビツト
分のデータであり、2進として有効数字8桁の演算が行
なわれることになる。このように250 Hzの周波数
の信号に対しても十分な精度の周波数測定が行える。The data actually used for the 1/T operation is 8-bit data, and the operation is performed in binary with 8 significant digits. In this way, frequency measurement can be performed with sufficient accuracy even for signals with a frequency of 250 Hz.
さらに、この実施例においては、1/T演算に供するデ
ータの大きさによってその有効数字を2進数で2の12
乗まで任意に設定することができる。なお、2の8乗は
256なので、2進数における有効数字8桁は10進数
における3桁〜4桁の間位の有効数字に対応する。Furthermore, in this embodiment, depending on the size of the data to be subjected to the 1/T operation, the significant figures are 2/12 in binary.
It can be set arbitrarily up to the second power. Note that since 2 to the 8th power is 256, the 8 significant digits in the binary number correspond to the significant digits between the 3rd and 4th digits in the decimal number.
一方、周波数IHzの遅い周期の信号に対しては、その
カウント値が1,000,000となり、これをそのま
ま演算すると、大きなワークエリアが必要となるととも
に、演算時間が長くなる。しかし、この実施例によれば
、1/T演算に供されるのは、2進数の8桁だけである
。従って、250Hzの周波数測定と同精度の周波数測
定が行え、不必要な高精度の演算を省略し、所望の精度
の周波数測定が行える。On the other hand, for a slow-cycle signal with a frequency of IHz, the count value is 1,000,000, and if this is calculated as is, a large work area is required and the calculation time becomes long. However, according to this embodiment, only eight binary digits are subjected to the 1/T operation. Therefore, frequency measurement can be performed with the same accuracy as the frequency measurement of 250 Hz, unnecessary high-precision calculations can be omitted, and frequency measurement can be performed with desired accuracy.
[発明の効果]
以」二説明したように、この発明に係る周波数測定方法
によれば、低周波から高周波まで、同様の精度で測定が
行える。また、低周波数の信号に対しても測定速度を十
分なものとできる。[Effects of the Invention] As explained below, according to the frequency measurement method according to the present invention, measurements can be made with the same accuracy from low frequencies to high frequencies. Furthermore, the measurement speed can be made sufficient even for low frequency signals.
第1図はこの発明に係る周波数測定方法のフローチャー
ト図である。FIG. 1 is a flowchart of a frequency measurement method according to the present invention.
Claims (1)
信号の数をカウントするカウント工程と、このカウント
工程で得られたカウント値を所定ビット数のメモリに2
進数の信号として記憶するカウント値記憶工程と、 記憶されている2進数のカウント値の先頭ビットが1に
なるまで桁移動する桁移動工程と、桁移動後の数値から
所定数の上位ビットのデータを取出す演算値取出し工程
と、 取出されたデータの逆数を演算算出する1/T算出工程
と、 この1/T算出工程において得られた数値に対し、上記
桁移動工程において桁移動した桁数に対応した補正を行
う桁戻し工程と、 を有し、 高周波信号及び低周波信号に対して、同様の精度の周波
数測定を行えることを特徴とする周波数測定方法。(1) A counting step in which the number of clock signals is counted according to the period of the frequency of the signal under test, and the count value obtained in this counting step is stored in a memory of a predetermined number of bits.
A count value storage step in which the count value is stored as a base number signal, a digit shift step in which the digits are shifted until the first bit of the stored binary count value becomes 1, and a predetermined number of upper bits of data are extracted from the value after the digit shift. A calculation value extraction step to extract the calculated value, a 1/T calculation step to calculate the reciprocal of the retrieved data, and a 1/T calculation step to calculate the number of digits shifted in the digit shift step for the numerical value obtained in this 1/T calculation step. 1. A frequency measurement method, comprising: a digit return step for performing corresponding correction, and is capable of performing frequency measurements with similar precision for high-frequency signals and low-frequency signals.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP24546688A JPH0291579A (en) | 1988-09-28 | 1988-09-28 | Frequency measuring method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP24546688A JPH0291579A (en) | 1988-09-28 | 1988-09-28 | Frequency measuring method |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0291579A true JPH0291579A (en) | 1990-03-30 |
Family
ID=17134082
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP24546688A Pending JPH0291579A (en) | 1988-09-28 | 1988-09-28 | Frequency measuring method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0291579A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101893657A (en) * | 2009-05-22 | 2010-11-24 | 精工爱普生株式会社 | Frequency measuring equipment |
CN102645583A (en) * | 2012-04-25 | 2012-08-22 | 郑州轻工业学院 | Broadband rapid frequency measuring method based on cluster period phase process |
-
1988
- 1988-09-28 JP JP24546688A patent/JPH0291579A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101893657A (en) * | 2009-05-22 | 2010-11-24 | 精工爱普生株式会社 | Frequency measuring equipment |
CN102645583A (en) * | 2012-04-25 | 2012-08-22 | 郑州轻工业学院 | Broadband rapid frequency measuring method based on cluster period phase process |
CN102645583B (en) * | 2012-04-25 | 2015-04-22 | 郑州轻工业学院 | Broadband rapid frequency measuring method based on cluster period phase process |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4157738A (en) | Method for counting the number of articles using a weighing machine | |
US4289382A (en) | Measurement system for machine parts | |
US4831510A (en) | Encoder and resolver signal processing circuit | |
JPS57144441A (en) | Diagnosis device for automobile | |
JPS6097207A (en) | Method and device for leading out position and/or size of specimen to be inspected | |
CN100520419C (en) | Improved frequency determination | |
JPH0291579A (en) | Frequency measuring method | |
US4079237A (en) | Card controlled beta backscatter thickness measuring instrument | |
JPS5923362B2 (en) | electronic scale | |
JPS6020114A (en) | Display device of measuring instrument | |
WO1996003631A3 (en) | Sampled-continuous probability method of velocity measurement of the object having informatively-structural inhomogeneity | |
CN106814248A (en) | A kind of data processing method and device in digital Frequency Measuring | |
JPH0534474A (en) | Measurement timer device | |
JPH04346069A (en) | Speed signal generating circuit | |
JPH0413851Y2 (en) | ||
SU1597856A1 (en) | Method of measuring clock run | |
SU983731A1 (en) | Device for reading graphic data | |
SU1415192A1 (en) | Device for measuring fluctuations of shaft rotational speed | |
JPH0933619A (en) | Frequency measuring method in semiconductor testing device | |
JPS58120167A (en) | Detection of speed | |
SU729538A1 (en) | Arrangement for measuring magnetic characteristics of materials and articles | |
JPH035990Y2 (en) | ||
SU1325347A1 (en) | Method of checking physical and mechanical indicators of ferromagnetic articles and device for effecting same | |
JPS63215968A (en) | Speed measuring instrument | |
SU565243A2 (en) | Method for determining ferromagnetic components volume concentration |