JPH1062203A - Position detector - Google Patents

Position detector

Info

Publication number
JPH1062203A
JPH1062203A JP21874596A JP21874596A JPH1062203A JP H1062203 A JPH1062203 A JP H1062203A JP 21874596 A JP21874596 A JP 21874596A JP 21874596 A JP21874596 A JP 21874596A JP H1062203 A JPH1062203 A JP H1062203A
Authority
JP
Japan
Prior art keywords
counter
value
phase
latch
timing
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.)
Granted
Application number
JP21874596A
Other languages
Japanese (ja)
Other versions
JP3365913B2 (en
Inventor
Masateru Doi
正照 土居
Keiji Kubo
圭司 久保
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP21874596A priority Critical patent/JP3365913B2/en
Publication of JPH1062203A publication Critical patent/JPH1062203A/en
Application granted granted Critical
Publication of JP3365913B2 publication Critical patent/JP3365913B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To obtain a detection result with correct and high resolution even when a time shift is generated between count timing and the output timing of a correction value in a system for adding a count value to a correction value and executing positional detection of high resolution by providing the system with a hysteresis function and executing accurate counting. SOLUTION: Latches 11, 12 respectively detect sample holding timing values of two-phase rectangular waves APH, BPH inputted to a counter 7, a comparison corrector 13 compares the values of the rectangular waves APH, BPH samplied by the latches 11, 12 with the values of two-phase sine wave signals Vad, Vbd and outputs a compared correction value and an adder 9 adds a count value C from the counter 7 and a correction value from a computing element 8 to the compared correction value from the corrector 13 and outputs the added value as a detected position.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、NC制御機械ある
いはロボット等における腕等の移動体の移動位置を高分
解能に検出する位置検出装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a position detecting device for detecting a moving position of a moving body such as an arm in an NC control machine or a robot with high resolution.

【0002】[0002]

【従来の技術】従来、この種の位置検出器は、空間的に
90度の位相差を持った2相の正弦波信号(以下、これ
らをVa、Vbとする)を利用して位置検出を行ってお
り、通常この種の位置検出器をエンコーダと称してい
る。
2. Description of the Related Art Conventionally, this type of position detector performs position detection using two-phase sine wave signals having a phase difference of 90 degrees spatially (hereinafter, these are referred to as Va and Vb). This type of position detector is usually called an encoder.

【0003】従来のエンコーダは、例えば発光ダイオー
ドからの射出光を、その回転位置が検出されるべき所定
の回転軸に取付けられた回転コード板に当て、回転コー
ド板及び回転コード板と対向する固定板に設けられたス
リットを通過した光をフォトダイオード等の受光素子で
受光して電圧に変換し、それによって回転コード板の回
転に応じて回転コード板に設けられたスリット間隔を1
ピッチ・1周期とする正弦波信号Va、Vbを得るよう
に構成されている。なお、この場合2つの正弦波信号V
a、Vbについて空間的に90度の位相差を持たせるた
め1/4ピッチだけずれた位置に2個の受光素子を設け
ている。
In a conventional encoder, for example, light emitted from a light emitting diode is applied to a rotating code plate attached to a predetermined rotating shaft whose rotational position is to be detected, and the rotating code plate and a fixed code facing the rotating code plate are fixed. The light passing through the slit provided in the plate is received by a light receiving element such as a photodiode and converted into a voltage, whereby the slit interval provided in the rotary code plate is reduced by one according to the rotation of the rotary code plate.
It is configured to obtain sine wave signals Va and Vb having a pitch of one cycle. In this case, two sine wave signals V
Two light receiving elements are provided at positions shifted by 1/4 pitch in order to have a spatial difference of 90 degrees between a and Vb.

【0004】次いで、これらの各正弦波信号Va、Vb
をコンパレータに入力してその出力側に正弦波信号の正
・負の値に応じてそれぞれハイレベル(以下ハイと記
す)とロウレベル(以下ロウと記す)となる矩形波信号
AP及びBPを作り、 矩形波信号APの立ち上がり時に矩形波信号BPがロ
ウになっているとき 矩形波信号BPの立ち下がり時に矩形波信号APがロ
ウになっているとき 矩形波信号APの立ち下がり時に矩形波信号BPがハ
イになっているとき 矩形波信号BPの立ち上がり時に矩形波信号APがハ
イになっているとき にはアップダウンカウンタを逐次カウントアップさせ、
一方 矩形波信号APの立ち上がり時に矩形波信号BPがハ
イになっているとき 矩形波信号BPの立ち下がり時に矩形波信号APがハ
イになっているとき 矩形波信号APの立ち下がり時に矩形波信号BPがロ
ウになっているとき 矩形波信号BPの立ち上がり時に矩形波信号APがロ
ウになっているとき にはアップダウンカウンタを逐次カウントダウンさせ、
これによって回転コード板の回転角度を検出するように
している。
Next, these sine wave signals Va, Vb
Is input to a comparator, and rectangular wave signals AP and BP having a high level (hereinafter, referred to as high) and a low level (hereinafter, referred to as low) are generated on the output side according to the positive and negative values of the sine wave signal, respectively. When the rectangular wave signal BP is low when the rectangular wave signal AP rises When the rectangular wave signal AP is low when the square wave signal BP falls, the rectangular wave signal BP is changed when the rectangular wave signal AP falls When it is high When the square wave signal AP is high at the rise of the square wave signal BP, the up / down counter is sequentially counted up,
On the other hand, when the square wave signal BP is high when the square wave signal AP rises, when the square wave signal AP is high when the square wave signal BP falls, the square wave signal BP when the square wave signal AP falls Is low When the rectangular wave signal AP is low when the rectangular wave signal BP rises, the up / down counter is sequentially counted down,
Thereby, the rotation angle of the rotary code plate is detected.

【0005】この位置検出方法においては、上述したよ
うに回転コード板の回転に応じて矩形波信号AP又はB
Pの1サイクル(1ピッチ)中にその回転角の計算を4
回(4逓倍と呼ぶ)しか行えない。
In this position detection method, as described above, the rectangular wave signal AP or B
During one cycle of P (one pitch), the rotation angle is calculated by 4
Times (called quadruple multiplication).

【0006】そこで、出力信号Va、Vbが正弦波信号
であることを利用して、 矩形波信号APの立ち上がり時に矩形波信号BPがロ
ウになっているとき 矩形波信号APの立ち下がり時に矩形波信号BPがハ
イになっているとき にはアップダウンカウンタを逐次カウントアップさせ、
一方 矩形波信号APの立ち上がり時に矩形波信号BPがハ
イになっているとき 矩形波信号APの立ち下がり時に矩形波信号BPがロ
ウになっているとき にはアップダウンカウンタを逐次カウントダウンさせ、
そのカウント値に{tan-1(Va/Vb)}/πの補
正量を加算することにより、1サイクル中の回転角を4
倍以上の高い分解能で検出する方法が知られている。
Therefore, taking advantage of the fact that the output signals Va and Vb are sinusoidal signals, when the rectangular wave signal BP is low when the rectangular wave signal AP rises, the rectangular wave is generated when the rectangular wave signal AP falls. When the signal BP is high, the up / down counter is counted up sequentially.
On the other hand, when the rectangular wave signal BP is high when the rectangular wave signal AP rises, and when the rectangular wave signal BP is low when the rectangular wave signal AP falls, the up / down counter is sequentially counted down.
By adding a correction amount of {tan -1 (Va / Vb)} / π to the count value, the rotation angle in one cycle is set to 4
There is known a method of performing detection with a resolution that is twice as high.

【0007】図10に上記方式の位置検出器の構成を示
す。31、32は正弦波信号Va、Vbのサンプルホー
ルド回路、33、34はデジタル変換するA/D変換
器、35、36は正弦波信号Va、Vbから矩形波信号
AP、BPを得るコンパレータ、37は矩形波信号A
P、BPにより上記のようにアップダウンカウントする
カウンタ、38は上記{tan-1(Va/Vb)}/π
の補正量を演算する演算器、39はカウンタ37と演算
器38の出力値を加算する加算器、40はサンプルホー
ルド回路31、32とカウンタ37を同期して動作させ
るタイミング制御回路である。
FIG. 10 shows the structure of a position detector of the above type. 31 and 32 are sample and hold circuits for sine wave signals Va and Vb, 33 and 34 are A / D converters for digital conversion, 35 and 36 are comparators for obtaining rectangular wave signals AP and BP from sine wave signals Va and Vb, 37 Is a square wave signal A
A counter for counting up and down by P and BP as described above, and 38 is the above {tan -1 (Va / Vb)} / π
, 39 is an adder for adding the output values of the counter 37 and the calculator 38, and 40 is a timing control circuit for operating the sample and hold circuits 31, 32 and the counter 37 in synchronization.

【0008】[0008]

【発明が解決しようとする課題】ところで、上記構成の
位置検出器において、実使用上ノイズのある環境におい
ても正確にカウントするため、入力周波数に制限のある
カウンタを用いて正弦波信号Va、Vbの高周波をカッ
トすると同時に、正弦波信号を矩形波に変換するコンパ
レータ35、36にヒステリシスという機能を追加して
いる。
By the way, in the position detector having the above configuration, in order to accurately count even in an environment where there is a noise in actual use, sine wave signals Va and Vb are set using a counter having a limited input frequency. A function called hysteresis is added to the comparators 35 and 36 which convert the sine wave signal into a rectangular wave at the same time as cutting the high frequency of the signal.

【0009】このため、図8、図9に示すように、2相
の正弦波信号をVa、Vb、コンパレータ35、36か
ら出力される矩形波信号をAP、BP、コンパレータ3
5、36としてヒステリシス付きコンパレータを用いた
場合の矩形波信号をAPH、BPHとすると、カウンタ
37の出力値は、図8、図9の(d)に示すように、カ
ウントアップ、カウントダウンするタイミングが本来の
正弦波信号Va、Vbのゼロレベルとタイミングが一致
しないという現象が生じる。したがって、カウンタ37
のカウント値と演算器38の補正値を単純に加算した場
合、図8、図9の(f)に示すように、ヒシテリシスが
動作している範囲において正しい位置検出が行えないと
いう問題があった。
For this reason, as shown in FIGS. 8 and 9, the two-phase sine wave signals are represented by Va and Vb, and the rectangular wave signals output from the comparators 35 and 36 are represented by AP, BP and comparator 3.
Assuming that the rectangular wave signals in the case of using the comparators with hysteresis as APH and BPH are 5, 36, the output value of the counter 37 has the timing of counting up and counting down as shown in (d) of FIGS. A phenomenon occurs in which the timing does not match the zero level of the original sine wave signals Va and Vb. Therefore, the counter 37
When the count value and the correction value of the arithmetic unit 38 are simply added, there is a problem that correct position detection cannot be performed in a range in which the hysteresis is operating, as shown in (f) of FIGS. .

【0010】本発明は、上記従来の問題点に鑑み、カウ
ント値と補正値を加算して高分解能の位置検出を行う方
式においてヒステリシス機能を持たせて正確にカウント
するとともに正しく高分解能の位置検出結果を得ること
ができる位置検出装置を提供することを目的としてい
る。
SUMMARY OF THE INVENTION In view of the above-mentioned conventional problems, the present invention has a hysteresis function in a method of adding a count value and a correction value to perform high-resolution position detection, and performs accurate counting and accurate high-resolution position detection. An object is to provide a position detecting device capable of obtaining a result.

【0011】[0011]

【課題を解決するための手段】本発明の位置検出装置
は、移動体の移動に応じて発生させた空間的に90度の
位相差を有する2相の正弦波信号の各電圧値Va、Vb
をサンプルホールドする手段と、サンプルホールドされ
た各電圧値Va、Vbをデジタル信号に変換するA/D
変換器と、A/D変換器からの2相の正弦波デジタル信
号から{tan-1(Vb/Va)}/πの値を演算する
演算器と、2相の正弦波をヒステリシスを持ったゼロレ
ベルと比較することにより2相矩形波に変換するコンパ
レータと、サンプルホールドタイミングと同期して2相
の矩形波から移動体の移動に応じて正弦波が変化した数
を数えるカウンタと、同時にカウンタに入力される2相
の矩形波のサンプルホールド時の値を検出するラッチを
持ち、ラッチによりサンプルした2相の矩形波の値と2
相の正弦波の値とを比較することにより補正値を出力す
る比較補正器と、演算器とカウンタと比較補正器の出力
を加算する加算器と、サンプルホールド、カウント読み
だし、ラッチのタイミングが同時に起こるように制御す
るタイミング制御手段とを備え、カウンタに入力される
2相の矩形波のサンプルホールドタイミング時の値をラ
ッチにより検出し、その値と2相の正弦波の値とを比較
して比較補正値を得ることにより、カウント値と補正値
の加算値にさらに±1又は0の補正を行うものである。
According to the position detecting apparatus of the present invention, each voltage value Va, Vb of a two-phase sine wave signal having a phase difference of 90 degrees spatially generated according to the movement of a moving body.
Means for sampling and holding, and an A / D for converting the sampled and held voltage values Va and Vb into digital signals
A converter, a calculator for calculating a value of {tan -1 (Vb / Va)} / π from a two-phase sine wave digital signal from the A / D converter, and a two-phase sine wave having hysteresis A comparator for converting to a two-phase rectangular wave by comparing with a zero level, a counter for counting the number of changes in the sine wave from the two-phase rectangular wave in accordance with the movement of the moving object in synchronization with the sample and hold timing, and a counter simultaneously Has a latch for detecting the value of the two-phase square wave input to the sampler at the time of sample and hold, and the value of the two-phase square wave sampled by the latch and 2
The comparison corrector that outputs a correction value by comparing the value of the phase sine wave, the adder that adds the output of the arithmetic unit, the counter, and the comparison corrector, the sample hold, the count reading, and the latch timing Timing control means for controlling the two-phase rectangular wave input at the same time, detecting the value of the two-phase rectangular wave input to the counter at the sample and hold timing by the latch, and comparing the detected value with the value of the two-phase sine wave. By obtaining the comparison correction value, the added value of the count value and the correction value is further corrected by ± 1 or 0.

【0012】上記演算器と比較補正器と加算器は、マイ
コンとROMとRAMとソフトウェアにて構成したり、
デジタルハードウェアにて構成することができる。
The arithmetic unit, the comparison corrector, and the adder are constituted by a microcomputer, a ROM, a RAM, and software.
It can be configured by digital hardware.

【0013】また、カウンタを同期式カウンタで構成
し、その入力初段ラッチ出力を比較補正器のラッチの入
力として利用し、同期式カウンタの読みだし可能タイミ
ングに同期してサンプルホールド、ラッチのタイミング
を遅らせることにより、サンプルホールドカウンタとラ
ッチの同期のずれが起こらないように構成することもで
きる。
The counter is constituted by a synchronous counter, and its input first-stage latch output is used as an input of a latch of a comparison corrector, and the timing of sample hold and latch is synchronized with the readable timing of the synchronous counter. By delaying the delay, it is possible to prevent the synchronization between the sample hold counter and the latch from shifting.

【0014】[0014]

【発明の実施の形態】以下、本発明の位置検出装置の一
実施形態を図1〜図9を参照しながら説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the position detecting device according to the present invention will be described below with reference to FIGS.

【0015】図1において、1、2は2相のアナログ入
力の正弦波信号Va、Vbをサンプルホールドするサン
プルホールド回路、3、4はサンプルホールドされた2
相のアナログ正弦波信号Va、Vbをデジタル変換する
A/D変換器である。5、6は2相のアナログ正弦波信
号Va、Vbをヒステリシスを持ったゼロレベルと比較
することにより2相の矩形波信号APH、BPHを得る
ヒステリシス付コンパレータ、7は90度位相の異なる
矩形波信号APH、BPHの状態により移動体の移動に
応じて正弦波が変化した数を数えるカウンタであり、1
周期(360度)の変化でカウンタ値を2増減するよう
に構成されている。8は正弦波信号Va、Vbを入力と
し、Vaが0でないとき{tan-1(Va/Vb)}/
πを演算して補正量として出力し、Vaが0のときは1
/2を出力する演算器である。11、12は同時にカウ
ンタ7に入力される2相の矩形波信号APH、BPHの
サンプルホールド時の値(ハイまたはロウ)を検出して
記憶するラッチである。10はサンプルホールド回路
1、2におけるサンプルホールドとカウンタ7の読み出
しとラッチ11、12のタイミングを制御するタイミン
グ制御回路である。13はラッチ11、12によりサン
プルした2相の矩形波信号APH、BPHの値と2相の
正弦波デジタル信号Va、Vbの値(正負)とを比較す
ることにより±1又は0の補正値を出力する比較補正器
である。9はカウンタ7と演算器8と比較補正器13の
出力を加算する加算器である。14は、演算器8と加算
器9と比較補正器13を合わせた演算部である。
In FIG. 1, reference numerals 1 and 2 denote sample and hold circuits for sampling and holding two-phase analog input sine wave signals Va and Vb.
This is an A / D converter for digitally converting the phase analog sine wave signals Va and Vb. Reference numerals 5 and 6 denote comparators with hysteresis for obtaining two-phase rectangular wave signals APH and BPH by comparing the two-phase analog sine wave signals Va and Vb with a zero level having hysteresis. A counter that counts the number of sine waves that have changed according to the movement of the moving object depending on the state of the signals APH and BPH.
The counter value is increased or decreased by 2 according to a change in the cycle (360 degrees). 8 receives sine wave signals Va and Vb as inputs, and when Va is not 0, {tan -1 (Va / Vb)} /
π is calculated and output as a correction amount, and 1 when Va is 0
/ 2 is an arithmetic unit that outputs / 2. Latches 11 and 12 detect and store the values (high or low) of the two-phase rectangular wave signals APH and BPH input to the counter 7 at the time of sample hold. Reference numeral 10 denotes a timing control circuit for controlling the sample and hold in the sample and hold circuits 1 and 2, the reading of the counter 7, and the timing of the latches 11 and 12. Reference numeral 13 indicates a correction value of ± 1 or 0 by comparing the values of the two-phase rectangular wave signals APH and BPH sampled by the latches 11 and 12 with the values (positive and negative) of the two-phase sine wave digital signals Va and Vb. This is a comparison corrector that outputs. Reference numeral 9 denotes an adder for adding the outputs of the counter 7, the arithmetic unit 8, and the comparison corrector 13. An operation unit 14 includes the operation unit 8, the adder 9, and the comparison corrector 13.

【0016】図2は演算部14の具体構成例を示し、マ
イコン15とROM16とRAM17にて構成されてい
る。図3はマイコン15の動作を示すフローチャートで
ある。図3において、Cはカウンタ値、La、Lbはラ
ッチ11、12の出力値、Vad、Vbdは正弦波信号
Va、Vbのデジタル値、Lは位置測定値である。マイ
コン15は、図2に示すように、 Laがロウ、Lbがハイ、Vadが正または0、V
bdが正のとき−1の補正 Laがハイ、Lbがロウ、Vadが負または0、V
bdが負のとき−1の補正 Laがハイ、Lbがハイ、Vadが負、Vbdが正
のとき+1の補正 Laがロウ、Lbがロウ、Vadが正、Vbdが負
のとき+1の補正 をソフトウェアで行うようにしている。
FIG. 2 shows an example of a specific configuration of the arithmetic unit 14, which is composed of a microcomputer 15, a ROM 16, and a RAM 17. FIG. 3 is a flowchart showing the operation of the microcomputer 15. In FIG. 3, C is a counter value, La and Lb are output values of latches 11 and 12, Vad and Vbd are digital values of sine wave signals Va and Vb, and L is a position measurement value. As shown in FIG. 2, the microcomputer 15 determines that La is low, Lb is high, Vad is positive or 0, V
Correction of -1 when bd is positive La is high, Lb is low, Vad is negative or 0, V
When bd is negative, the correction is -1. When La is high, Lb is high, Vad is negative, and when Vbd is positive, the correction is +1. When La is low, Lb is low, Vad is positive, and Vbd is negative, the correction is +1. I do it with software.

【0017】図4は演算部14の他の具体構成例を示
し、ROM18とシフトレジスタ19とROM20と加
算器21にて構成されている。ROM18は、Vad、
Vbdをアドレスラインに入力することにより、Vad
が0でないとき{tan-1(Vb/Va)}/πをテジ
タル化したものを、Vaが0のときは1/2をデジタル
化したものをデータラインに出力するようにそのデータ
が設定されている。シフトレジスタ19は、カウンタ7
の出力を入力とし、掛け算器として作用してROM18
の出力に桁を合わせるように設定されている。ROM2
0は、アドレスラインにラッチ11、12の出力La、
Lb、及びVad、Vbdを入力することによりデータ
ラインに図5に示す論理表に示す補正値をROM18の
出力の桁に合わせたデータとして出力するように設定さ
れている。加算器21は以上のROM18とシフトレジ
スタ19とROM20の出力を加算するように構成され
ている。
FIG. 4 shows another specific example of the configuration of the arithmetic unit 14, which comprises a ROM 18, a shift register 19, a ROM 20, and an adder 21. ROM 18 stores Vad,
By inputting Vbd to the address line, Vad
The data is set so that a digitalized version of {tan -1 (Vb / Va)} / π is output to the data line when is not 0, and a digitalized version of 1/2 is output when Va is 0. ing. The shift register 19 includes the counter 7
Of the ROM 18 acting as a multiplier
Is set to match the digit to the output of. ROM2
0 is the output La of the latches 11 and 12 on the address line,
By inputting Lb, Vad, and Vbd, the correction value shown in the logic table shown in FIG. 5 is output to the data line as data corresponding to the digit of the output of the ROM 18. The adder 21 is configured to add the outputs of the ROM 18, shift register 19, and ROM 20 described above.

【0018】図6は、カウンタ7とラッチ11、12の
具体構成例として一般的な同期カウンタを用いた構成例
を示している。22〜25はDフリップフロップと呼ば
れ、Dに入力されたデジタル信号をC.CLKで示した
同期信号のタイミングで保持出力する作用を行うもの、
26はアップダウンカウンタと呼ばれ、UPに入力した
パルスをカウントアップし、DOWNに入力したパルス
をカウントダウンするものである。27はラッチ11を
構成するDフリップフロップ、28はラッチ12を構成
するDフリップフロップであり、R.CLKはタイミン
グ制御回路10から出力されるサンプルホールド、ラッ
チ、カウンタ読み出しタイミング信号であり、図7に示
すようにカウンタ動作終了後のカウンタ読み出し可能タ
イミングで、同期信号C.CLKより遅らせて発生させ
る。このように構成すると、実際の読み出しタイミング
は、希望する読み出しタイミングより少し遅れるが、最
大でC.CLKの1周期以下であるので、C.CLKを
十分に速くすることにより無視できる。
FIG. 6 shows a configuration example using a general synchronous counter as a specific configuration example of the counter 7 and the latches 11 and 12. Reference numerals 22 to 25 are called D flip-flops. One that performs the function of holding and outputting at the timing of the synchronization signal indicated by CLK;
Reference numeral 26 denotes an up / down counter, which counts up pulses input to UP and counts down pulses input to DOWN. Reference numeral 27 denotes a D flip-flop constituting the latch 11, and reference numeral 28 denotes a D flip-flop constituting the latch 12. CLK is a sample hold, latch, and counter read timing signal output from the timing control circuit 10, and is a counter read enabled timing after the end of the counter operation as shown in FIG. It is generated later than CLK. With this configuration, the actual read timing is slightly delayed from the desired read timing, but at most C.I. CLK or less than one cycle of C.CLK. It can be ignored by making CLK fast enough.

【0019】図8、図9にカウントアップの場合と、カ
ウントダウンの場合のタイミングチャートを示す。
(a)は正弦波信号Va、Vb、(b)はゼロレベルコ
ンパレータにて生成した矩形波信号AP、BP、(c)
はヒステリシス付きゼロレベルコンパレータにて生成し
た矩形波信号APH、BPH、(d)はカウント値、
(e)は演算器8の出力値、(f)はカウント値と演算
値との加算値、(g)は本実施形態の位置検出値である
カウント値と演算値と比較補正値の加算値を示してい
る。
FIGS. 8 and 9 show timing charts in the case of counting up and in the case of counting down, respectively.
(A) is a sine wave signal Va, Vb, (b) is a rectangular wave signal AP, BP generated by a zero level comparator, (c)
Is a square wave signal APH, BPH generated by the zero level comparator with hysteresis, (d) is a count value,
(E) is the output value of the arithmetic unit 8, (f) is the added value of the count value and the calculated value, and (g) is the added value of the count value, the calculated value and the comparison correction value, which are the position detection values of the present embodiment. Is shown.

【0020】なお、以上の説明ではカウンタ部を2逓倍
の構成で比較補正器の説明をしたが、その他の1逓倍、
4逓倍時の場合についても同様にそれぞれの比較補正器
を用いて実施可能である。
In the above description, the comparison / correction device has been described in which the counter section is configured to multiply by two.
In the case of quadruple multiplication, the operation can be similarly performed using the respective comparators and compensators.

【0021】[0021]

【発明の効果】本発明の位置検出装置によれば、以上の
説明から明らかなように、2相正弦波信号から2相矩形
波信号を生成するヒステリシス付きコンパレータと、2
相矩形波信号により位置をカウントするカウンタと、2
相正弦波信号から補正量を演算する演算器と、加算器
と、タイミング制御手段とを備え、カウント値と補正量
を加算して高分解能の位置検出を行う位置検出装置にお
いて、同時にカウンタに入力される2相矩形波のサンプ
ルホールド時の値を検出するラッチを持ち、ラッチによ
りサンプルした2相矩形波の値と2相正弦波信号の値と
を比較することにより補正値を出力する比較補正器を設
け、加算器で演算器とカウンタと比較補正器の出力を加
算するようにしているので、ヒステリシスによってカウ
ントアップ、カウントダウンするタイミングが正弦波信
号がゼロレベルのときに厳密に一致していなくても、正
しい測定値を得ることができ、従ってヒステリシス機能
を持たせて正確にカウントしかつそのためカウントタイ
ミングと補正量の出力タイミングがずれても正しい高分
解能の検出結果を得ることができるという効果を発揮す
る。
According to the position detecting device of the present invention, as apparent from the above description, a comparator with hysteresis for generating a two-phase rectangular wave signal from a two-phase sine wave signal,
A counter that counts the position by a phase square wave signal;
A position detection device that includes a computing unit that calculates a correction amount from a phase sine wave signal, an adder, and a timing control unit, and that adds a count value and a correction amount to perform high-resolution position detection, and simultaneously inputs the counter value to a counter A latch for detecting the value of the sampled and held two-phase square wave at the time of sample hold, and outputs a correction value by comparing the value of the two-phase square wave sampled by the latch with the value of the two-phase sine wave signal The output of the arithmetic unit, the counter, and the output of the comparison and correction unit is added by the adder, so the timing of counting up and counting down due to hysteresis does not exactly match when the sine wave signal is at the zero level. However, the correct measurement value can be obtained, and therefore, a hysteresis function can be provided to count accurately, and therefore the count timing and correction amount can be output. Exerts effect that it is the timing to obtain a detection result of the correct resolution higher offset.

【0022】また、演算器、比較補正器、加算器をマイ
コンとROMとRAMとソフトウェアにより構成する
と、正しい測定値を低コストで得ることができる。
If the arithmetic unit, comparison corrector and adder are constituted by a microcomputer, ROM, RAM and software, correct measured values can be obtained at low cost.

【0023】また、演算器、比較補正器、加算器をデジ
タルハードウェアにて構成すると、正しい測定値が1マ
イクロ秒以下の短時間で得られ、高速にて位置検出する
ことができる。
If the arithmetic unit, comparison corrector, and adder are constituted by digital hardware, correct measured values can be obtained in a short time of 1 microsecond or less, and position detection can be performed at high speed.

【0024】また、カウンタとして同期式カウンタを用
い、その入力初段ラッチをラッチ入力として利用してカ
ウンタとラッチの同期のずれが起こらないように構成す
ると、希望する読み取りタイミングを少し遅らせるだけ
で、配線による遅延等に関係なく、ラッチとカウンタの
状態とを完全に同期させることが可能となり、正しい測
定値が得られる。
When a synchronous counter is used as a counter and its input first-stage latch is used as a latch input so that the synchronization between the counter and the latch does not deviate, the desired read timing can be slightly delayed and wiring can be performed. Irrespective of the delay or the like, the state of the latch and the state of the counter can be completely synchronized, and a correct measured value can be obtained.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の位置検出装置の一実施形態の構成図で
ある。
FIG. 1 is a configuration diagram of an embodiment of a position detection device according to the present invention.

【図2】同実施形態におけるマイコンを利用した演算部
の構成図である。
FIG. 2 is a configuration diagram of a calculation unit using a microcomputer in the embodiment.

【図3】マイコンの動作フローチャートである。FIG. 3 is an operation flowchart of a microcomputer.

【図4】同実施形態におけるROMを利用した演算部の
構成図である。
FIG. 4 is a configuration diagram of a calculation unit using a ROM in the embodiment.

【図5】比較演算器として機能するROMの論理図であ
る。
FIG. 5 is a logic diagram of a ROM functioning as a comparison arithmetic unit.

【図6】同実施形態における同期式カウンタを利用した
ラッチの構成図である。
FIG. 6 is a configuration diagram of a latch using a synchronous counter according to the first embodiment.

【図7】同期式カウンタを利用した場合の同期信号のタ
イミング図である。
FIG. 7 is a timing chart of a synchronization signal when a synchronous counter is used.

【図8】同実施形態におけるカウントアップ時のタイミ
ングチャートである。
FIG. 8 is a timing chart at the time of counting up in the embodiment.

【図9】同実施形態におけるカウントダウン時のタイミ
ングチャートである。
FIG. 9 is a timing chart at the time of countdown in the embodiment.

【図10】従来例の位置検出装置の構成図である。FIG. 10 is a configuration diagram of a conventional position detection device.

【符号の説明】[Explanation of symbols]

1、2 サソンプルホールド回路 3、4 A/D変換器 5、6 ヒステリシス付きコンパレータ 7 カウンタ 8 演算器 9 加算器 10 タイミング制御回路 11、12 ラッチ 13 比較補正器 15 マイコン 16 ROM 17 RAM 18 演算器としてのROM 19 シフトレジスタ 20 比較補正器としてのROM 21 加算器 22、24 同期式カウンタの初段ラッチ用Dフリップ
フロップ 26、27 ラッチ用Dフリップフロップ
1, 2 Sasson pull hold circuit 3, 4 A / D converter 5, 6 Comparator with hysteresis 7 Counter 8 Computing unit 9 Adder 10 Timing control circuit 11, 12 Latch 13 Comparison compensator 15 Microcomputer 16 ROM 17 RAM 18 Computing unit ROM 19 as a shift register 20 ROM as a comparison / correction device 21 Adders 22, 24 D flip-flops for the first-stage latch of the synchronous counter 26, 27 D flip-flops for the latch

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 移動体の移動に応じて発生させた空間的
に90度の位相差を有する正弦波信号の各電圧値Va、
Vbをサンプルホールドする手段と、 サンプルホールドされた各電圧値Va、Vbをデジタル
信号に変換するA/D変換器と、 A/D変換器からの2相の正弦波デジタル信号から{t
an-1(Vb/Va)}/πの値を演算する演算器と、 2相の正弦波をヒステリシスを持ったゼロレベルと比較
することにより2相の矩形波に変換するコンパレータ
と、 サンプルホールドタイミングと同期して2相の矩形波か
ら移動体の移動に応じて正弦波が変化した数を数えるカ
ウンタと、 同時にカウンタに入力される2相の矩形波のサンプルホ
ールド時の値を検出するラッチを持ち、ラッチによりサ
ンプルした2相の矩形波の値と2相の正弦波の値とを比
較することにより補正値を出力する比較補正器と、 演算器とカウンタと比較補正器の出力を加算する加算器
と、 サンプルルホールド、カウント読みだし、ラッチのタイ
ミングが同時に起こるように制御するタイミング制御手
段とを備えたことを特徴とする位置検出装置。
1. Each voltage value Va, of a sine wave signal having a phase difference of 90 degrees spatially generated according to the movement of a moving body,
Means for sampling and holding Vb, an A / D converter for converting each of the sampled and held voltage values Va and Vb into a digital signal, Δt from a two-phase sine wave digital signal from the A / D converter
an arithmetic unit for calculating the value of an -1 (Vb / Va)} / π; a comparator for converting a two-phase sine wave to a zero-level with hysteresis to convert it into a two-phase rectangular wave; A counter that counts the number of changes in the sine wave from the two-phase rectangular wave in response to the movement of the moving object in synchronization with the timing, and a latch that detects the sample-hold value of the two-phase rectangular wave input to the counter at the same time. And a comparison corrector that outputs a correction value by comparing the value of the two-phase square wave and the value of the two-phase sine wave sampled by the latch, and adds the outputs of the arithmetic unit, the counter, and the comparison corrector A position detecting device comprising: an adder that performs sampling and hold; sample reading, counting reading, and timing control means for controlling latch timing to occur simultaneously.
【請求項2】 演算器と比較補正器と加算器を、マイコ
ンとROMとRAMとソフトウェアにて構成したことを
特徴とする請求項1記載の位置検出装置。
2. The position detecting device according to claim 1, wherein the arithmetic unit, the comparison corrector, and the adder are configured by a microcomputer, a ROM, a RAM, and software.
【請求項3】 演算器と比較補正器と加算器を、デジタ
ルハードウェアにて構成したことを特徴とする請求項1
記載の位置検出装置。
3. An arithmetic unit, a comparison corrector, and an adder are constituted by digital hardware.
The position detecting device as described in the above.
【請求項4】 カウンタを同期式カウンタで構成し、そ
の入力初段ラッチ出力を比較補正器のラッチの入力とし
て利用し、同期式カウンタの読みだし可能タイミングに
同期してサンプルホールド、ラッチのタイミングを遅ら
せることにより、カウンタとラッチの同期のずれが起こ
らないように構成したことを特徴とする請求項1記載の
位置検出装置。
4. A counter comprising a synchronous counter, and an input first-stage latch output thereof is used as an input of a latch of a comparison corrector, and the timing of sample-hold and latch is synchronized with the readable timing of the synchronous counter. 2. The position detecting device according to claim 1, wherein the delay is delayed so that the synchronization between the counter and the latch does not shift.
JP21874596A 1996-08-20 1996-08-20 Position detection device Expired - Lifetime JP3365913B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21874596A JP3365913B2 (en) 1996-08-20 1996-08-20 Position detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21874596A JP3365913B2 (en) 1996-08-20 1996-08-20 Position detection device

Publications (2)

Publication Number Publication Date
JPH1062203A true JPH1062203A (en) 1998-03-06
JP3365913B2 JP3365913B2 (en) 2003-01-14

Family

ID=16724762

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21874596A Expired - Lifetime JP3365913B2 (en) 1996-08-20 1996-08-20 Position detection device

Country Status (1)

Country Link
JP (1) JP3365913B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007198805A (en) * 2006-01-24 2007-08-09 Ricoh Co Ltd Position detector, position detection method, and image forming device
JP2008520988A (en) * 2004-11-23 2008-06-19 アイイーイー インターナショナル エレクトロニクス アンド エンジニアリング エス.エイ. Error compensation method for 3D camera
JP2009112684A (en) * 2007-11-09 2009-05-28 Hitachi Medical Corp Ultrasonograph, ultrasonic measurement program
WO2022250022A1 (en) * 2021-05-27 2022-12-01 ミネベアミツミ株式会社 Rotation detection device, rotation detection method, and rotation detection program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008520988A (en) * 2004-11-23 2008-06-19 アイイーイー インターナショナル エレクトロニクス アンド エンジニアリング エス.エイ. Error compensation method for 3D camera
JP4869246B2 (en) * 2004-11-23 2012-02-08 アイイーイー インターナショナル エレクトロニクス アンド エンジニアリング エス.エイ. Method of calculating distance value in one scene from output of 3D image sensor
JP2007198805A (en) * 2006-01-24 2007-08-09 Ricoh Co Ltd Position detector, position detection method, and image forming device
JP2009112684A (en) * 2007-11-09 2009-05-28 Hitachi Medical Corp Ultrasonograph, ultrasonic measurement program
WO2022250022A1 (en) * 2021-05-27 2022-12-01 ミネベアミツミ株式会社 Rotation detection device, rotation detection method, and rotation detection program

Also Published As

Publication number Publication date
JP3365913B2 (en) 2003-01-14

Similar Documents

Publication Publication Date Title
EP0331189B1 (en) Position/speed detection method and apparatus
JPH06167354A (en) Interpolation unit for scale
JP3015747B2 (en) Encoder interpolation circuit
JP4953714B2 (en) Encoder output interpolation method and interpolation circuit
JP2008002904A (en) Device and program for calculating amplitude of output signal of encoder
US11788867B2 (en) Incremental encoder position interpolation
JP2003121135A (en) Reader for linear scale
US6950769B2 (en) Encoder signal interpolation divider
US20050090998A1 (en) Sensor signal processor
JP3365913B2 (en) Position detection device
EP0199826A1 (en) Method of detecting position
KR900005879B1 (en) Pulse distribution type position detector
JPH0524445B2 (en)
EP0200791A1 (en) Method and apparatus for detecting position
JPH11241927A (en) Position detecting device
JP2002228488A (en) Apparatus and method for automatically adjusting output signal from encoder
JPH11325972A (en) Method for improving accuracy of encoder device and high-accuracy encoder device
JPH0529045B2 (en)
JP2551680B2 (en) Position detection device
JP4227352B2 (en) Coincidence detection apparatus and method
JPH04285815A (en) Position counter circuit of rotary encoder
JP3345559B2 (en) High division encoder device
JP2002243501A (en) Automatic adjustment device for encoder output signal
JPS6347612A (en) Displacement detector
JP2002372437A (en) Offset compensating circuit for encoder

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081101

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20091101

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20091101

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20101101

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20111101

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20121101

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20131101

Year of fee payment: 11

EXPY Cancellation because of completion of term