JPH11241927A - Position detecting device - Google Patents

Position detecting device

Info

Publication number
JPH11241927A
JPH11241927A JP4366398A JP4366398A JPH11241927A JP H11241927 A JPH11241927 A JP H11241927A JP 4366398 A JP4366398 A JP 4366398A JP 4366398 A JP4366398 A JP 4366398A JP H11241927 A JPH11241927 A JP H11241927A
Authority
JP
Japan
Prior art keywords
value
quadrant
quadrants
interpolation position
counter value
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
JP4366398A
Other languages
Japanese (ja)
Other versions
JP3513383B2 (en
Inventor
Koji Funaoka
幸治 船岡
Hiroyuki Sasai
浩之 笹井
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP04366398A priority Critical patent/JP3513383B2/en
Publication of JPH11241927A publication Critical patent/JPH11241927A/en
Application granted granted Critical
Publication of JP3513383B2 publication Critical patent/JP3513383B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a highly precise position detecting device capable of preventing the occurrence of an error when a detection object is moved at a high speed. SOLUTION: This device is provided with an interpolating position arithmetic part 5c for determining the interpolating position which is initialized and discontinued between a second quadrant and a third quadrant on the basis of a two- phase signal obtained from an encoder mounted on the detection object, and a composited position arithmetic part 5d for setting the counter value to 0 by rise of one rectangular wave of the cos signal of the two-phase signal, thereafter subtracting '1' from the counter value the interplating position is larger than a set value, when the counter value is odd to a 2-multiplying U/D counter 8 for counting '1' every rise or trailing, adding '1' to the counter value when the interpolating position is not more than the set value, and taking the sum of the interpolating position and the corrected counter value as a composited position.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、検出対象に取り付
けられたエンコーダから得られる2相信号をもとに、そ
の周期以上の分解能を得るための位置検出装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a position detecting apparatus for obtaining a resolution equal to or longer than a period of a two-phase signal obtained from an encoder attached to a detection target.

【0002】[0002]

【従来の技術】図9は、例えば特開昭54−19773
号公報に示された構成図である。図において、1はエン
コーダで、検出対象の位置を入力して2相信号(sin信
号およびcos信号)を出力する。2はA/D変換器、3
は上記2相信号を矩形波に整形するコンパレータ、4は
矩形波の立ち上がりおよび立ち下がりを計数するカウン
タである。5はマイクロプロセッサで、ディジタル変換
された2相信号を入力して内挿位置を求める内挿処理部
5a、および上記カウンタ4からのカウンタ値と上記内
挿位置との和を求めて合成位置とする位置演算部5bと
からなる。
2. Description of the Related Art FIG.
FIG. In the figure, reference numeral 1 denotes an encoder, which inputs a position to be detected and outputs a two-phase signal (sin signal and cos signal). 2 is an A / D converter, 3
Is a comparator for shaping the two-phase signal into a rectangular wave, and 4 is a counter for counting the rise and fall of the rectangular wave. Reference numeral 5 denotes a microprocessor, an interpolation processing unit 5a for inputting a digitally converted two-phase signal to determine an interpolation position, and calculating a sum of a counter value from the counter 4 and the interpolation position to obtain a combined position. And a position calculation unit 5b.

【0003】このような従来の位置検出装置における動
作について、図10の波形を用いて説明する。図におい
て、およびがエンコーダ1から得られるsin信号お
よびcos信号の波形で、これらをA/D変換器2で変換
した後、マイクロプロセッサ5に取り込み、内挿処理部
5aにおいて内挿処理を行う。これにより得られた内挿
位置の波形がに示したもので、sin信号およびcos信号
の周期で0から1まで連続している。またこの処理と平
行して、上記sin信号およびcos信号をコンパレータ3に
よっておよびに示したような矩形波に整形する。そ
して、カウンタ4において矩形波の立ち上がりおよび立
ち下がりを計数して、に示したようなカウンタ値を出
力する。この場合は、立ち上がり2回と立ち下がり2回
を計数した時にカウンタを+1している。最後に、で
示した内挿位置とで示したカウンタ値とを加算して、
合成位置を求める。この合成位置が求める検出対象の
位置である。
The operation of such a conventional position detecting device will be described with reference to waveforms shown in FIG. In the figure, and indicate the waveforms of a sine signal and a cos signal obtained from the encoder 1, which are converted by the A / D converter 2, taken into the microprocessor 5, and subjected to interpolation processing in the interpolation processing unit 5 a. The waveform at the interpolated position obtained by this is shown in, and is continuous from 0 to 1 in the cycle of the sin signal and the cos signal. In parallel with this processing, the sin signal and the cos signal are shaped by the comparator 3 into rectangular waves as shown in FIGS. Then, the counter 4 counts the rise and fall of the rectangular wave, and outputs a counter value as shown in FIG. In this case, the counter is incremented by one when counting two rises and two falls. Finally, add the interpolation position indicated by and the counter value indicated by
Find the synthesis position. This combined position is the position of the detection target to be obtained.

【0004】[0004]

【発明が解決しようとする課題】上記のような従来の位
置検出装置においては、2相信号の内挿処理と基本周期
の計数が完全に同期して実行され、合成する時に内挿位
置とカウンタ値の象限が一致していなければならない。
しかし、図11に示すように、検出対象が高速移動した
場合には、A/D変換処理やカウンタの処理時間に差が
有る場合、内挿位置及びカウンタ値の間に位相差が生じ
る(斜線部)。このとき、内挿位置の象限(1象限)と
カウンタ値の象限(4象限)とが異なっているため、合
成位置には瞬間的に不連続な誤差が生じる問題がある。
In the above-described conventional position detecting device, the interpolation processing of the two-phase signal and the counting of the basic period are executed in completely synchronization, and the interpolation position and the counter are used when the signals are synthesized. The quadrants of the values must match.
However, as shown in FIG. 11, when the detection target moves at high speed, if there is a difference between the A / D conversion processing and the processing time of the counter, a phase difference occurs between the interpolation position and the counter value (shaded lines). Department). At this time, since the quadrant of the interpolation position (1 quadrant) and the quadrant of the counter value (4 quadrants) are different, there is a problem that a discontinuous error occurs instantaneously at the combined position.

【0005】この発明は、上述のような課題を解決する
ためになされたもので、その目的は、検出対象が高速移
動した場合においても、誤差の発生を防止できる高精度
な位置検出装置を得るものである。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problem, and an object thereof is to provide a high-precision position detecting device capable of preventing occurrence of an error even when a detection target moves at a high speed. Things.

【0006】[0006]

【課題を解決するための手段】この発明に係る位置検出
装置においては、内挿位置は、任意の数pに対して
「p」から「p+2」まで連続して増加し、ある象限と
次の象限との象限境界で「p+2」から「p」に初期化
されるものとし、カウンタは、上記象限境界に相当する
位置以外での2相信号の矩形波の立ち上がりまたは立ち
下がりに対して、上記2相信号の基本周期を2逓倍で計
数するものとし、カウンタ値が上記象限境界またはその
近傍に相当する位置における値である場合、その時の内
挿位置が上記象限境界直前の象限の値であれば当該カウ
ンタ値を「1」減算し、当該内挿位置が上記象限境界直
後の象限の値であれば当該カウンタ値を「1」加算する
ものである。
In the position detecting device according to the present invention, the interpolated position continuously increases from "p" to "p + 2" for an arbitrary number p, and a certain quadrant and the next quadrant are added. The counter is initialized from “p + 2” to “p” at the quadrant boundary with the quadrant, and the counter operates in response to the rise or fall of the rectangular wave of the two-phase signal at a position other than the position corresponding to the quadrant boundary. The basic period of the two-phase signal is counted by a factor of 2. If the counter value is a value at a position corresponding to or near the quadrant boundary, the interpolation position at that time is the value of the quadrant immediately before the quadrant boundary. For example, the counter value is decremented by "1", and if the interpolation position is a value in the quadrant immediately after the quadrant boundary, the counter value is incremented by "1".

【0007】また、2象限と3象限の間または4象限と
1象限の間を象限境界として内挿位置を初期化し、カウ
ンタはcos矩形波の立ち上がりおよび立ち下がりでカウ
ントするものとし、2象限と3象限、または4象限と1
象限の2つの象限分におけるカウンタ値をn(n;0ま
たは自然数)とした場合、カウンタ値が「(n+1)+
2m」(m;整数)のときは、当該カウンタ値と上記内
挿位置との和を合成値とし、上記カウンタ値が「n+2
m」のときは、その時の内挿位置が上記象限境界の直前
の値であれば当該カウンタ値を「1」減算した値と当該
内挿位置との和を合成値とし、当該内挿位置が上記象限
境界直後の値であれば当該カウンタ値を「1」加算した
値と当該内挿位置との和を合成値とするものである。
Further, the interpolation position is initialized by setting a quadrant boundary between two quadrants and three quadrants or between four quadrants and one quadrant, and the counter counts at the rise and fall of the cos rectangular wave. 3 quadrants, or 4 quadrants and 1
When the counter value in the two quadrants of the quadrant is n (n; 0 or a natural number), the counter value is “(n + 1) +
2m ”(m; integer), the sum of the counter value and the interpolation position is used as a composite value, and the counter value is“ n + 2 ”.
m ”, if the interpolation position at that time is a value immediately before the quadrant boundary, the sum of a value obtained by subtracting“ 1 ”from the counter value and the interpolation position is set as a composite value, and the interpolation position is If it is a value immediately after the quadrant boundary, the sum of the value obtained by adding "1" to the counter value and the interpolation position is set as a composite value.

【0008】また、1象限と2象限の間または3象限と
4象限の間を象限境界として内挿位置を初期化し、カウ
ンタはsin矩形波の立ち上がりおよび立ち下がりでカウ
ントするものとし、1象限と2象限、または3象限と4
象限の2つの象限分におけるカウンタ値をn(n;0ま
たは自然数)とした場合、カウンタ値が「(n+1)+
2m」(m;整数)のときは、当該カウンタ値と上記内
挿位置との和を合成値とし、上記カウンタ値が「n+2
m」のときは、その時の内挿位置が上記象限境界の直前
の値であれば当該カウンタ値を「1」減算した値と当該
内挿位置との和を合成値とし、当該内挿位置が上記象限
境界直後の値であれば当該カウンタ値を「1」加算した
値と当該内挿位置との和を合成値とするものである。
Further, the interpolation position is initialized with a quadrant boundary between one quadrant and two quadrants or between three quadrants and four quadrants, and the counter counts at the rise and fall of the sin rectangular wave. 2 quadrants, or 3 quadrants and 4
When the counter value in the two quadrants of the quadrant is n (n; 0 or a natural number), the counter value is “(n + 1) +
2m ”(m; integer), the sum of the counter value and the interpolation position is used as a composite value, and the counter value is“ n + 2 ”.
m ”, if the interpolation position at that time is a value immediately before the quadrant boundary, the sum of a value obtained by subtracting“ 1 ”from the counter value and the interpolation position is set as a composite value, and the interpolation position is If it is a value immediately after the quadrant boundary, the sum of the value obtained by adding "1" to the counter value and the interpolation position is set as a composite value.

【0009】また、内挿位置を求める内挿処理とカウン
タ処理との処理時間差によって両者の間に±1象限分を
こえる位相差が生じる場合、検出対象の上記処理時間差
分の移動距離を求めて内挿位置に加算し、この加算値が
内挿位置の最大値「p+2」より大きい場合は、上記加
算値から「2」を減算した値を補正内挿位置とし、上記
加算値が内挿位置の最小値「p」より小さい場合は、上
記加算値に「2」を加算した値を補正内挿位置とし、そ
れ以外は上記加算値を補正内挿位置とすることにより得
られる「p」から「p+2」まで連続して増加する補正
内挿位置を新たに内挿位置とするものである。
If a phase difference exceeding ± 1 quadrant occurs between the interpolation processing for obtaining the interpolation position and the counter processing due to the processing time difference between the two, the moving distance of the processing time difference of the detection target is obtained. If the added value is larger than the maximum value “p + 2” of the interpolation position, a value obtained by subtracting “2” from the added value is set as the corrected interpolation position, and the added value is the interpolation position. Is smaller than the minimum value “p”, the value obtained by adding “2” to the above-mentioned added value is used as the corrected interpolation position. The corrected interpolation position continuously increasing to “p + 2” is newly set as the interpolation position.

【0010】また、モータなどの検出対象を駆動するド
ライバと上記検出対象の位置を制御する位置制御手段と
を備え、電源投入後に少なくとも1回内挿位置信号をフ
ィードバックした位置制御系を構成し、上記内挿位置が
設定された値になるように上記検出対象を移動させた
後、上記カウンタ値に設定された値を設定することで上
記カウンタ値を初期化するものである。
A position control system which includes a driver for driving a detection target such as a motor and position control means for controlling the position of the detection target, and feeds back an interpolation position signal at least once after power-on, After the detection target is moved so that the interpolation position becomes the set value, the counter value is initialized by setting the value set to the counter value.

【0011】[0011]

【発明の実施の形態】実施の形態1.図1はこの発明の
実施の一形態例による位置検出装置の構成を示す図で、
図中1〜3は図11で示した従来のものと同一または相
当部分である。また、マイクロプロセッサ5は、内挿位
置を発生させる内挿位置演算部5c、およびカウンタ値
と内挿位置とを合成して合成位置を求める合成位置演算
部5dからなる。6は、サンプルホールド回路で、入力
した2相信号をタイミングパルス発生器7から出力され
るタイミングパルスによってサンプルホールドされ、A
/D変換器2に取り込まれる。また、8は入力した矩形
波のうちcos矩形波の立ち上がりおよび立ち下がりを計
数し、cos信号の周期の2逓倍でカウントする2逓倍U/D
カウンタである。また、このカウンタ値はラッチ回路9
に入力され、タイミングパルス発生器7から出力される
タイミングパルスによってラッチされた後、マイクロプ
ロセッサ5に取り込まれる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiment 1 FIG. 1 is a diagram showing a configuration of a position detection device according to an embodiment of the present invention.
In the figure, reference numerals 1 to 3 denote the same or corresponding parts as those of the related art shown in FIG. The microprocessor 5 includes an interpolation position calculation unit 5c that generates an interpolation position, and a synthesis position calculation unit 5d that obtains a synthesis position by synthesizing the counter value and the interpolation position. Reference numeral 6 denotes a sample and hold circuit which samples and holds the input two-phase signal by a timing pulse output from a timing pulse generator 7 and
/ D converter 2. Reference numeral 8 denotes a double U / D which counts the rise and fall of the cos rectangular wave in the input rectangular wave and counts the square of the cos signal at twice the period.
It is a counter. This counter value is stored in the latch circuit 9.
After being latched by the timing pulse output from the timing pulse generator 7, it is taken into the microprocessor 5.

【0012】このように構成された位置検出装置におけ
る動作について、図2の波形を用いて説明する。図にお
いて、およびがエンコーダ1から得られるsin信号
およびcos信号の波形で、これらはサンプルホールド回
路6に入力される。そして、タイミングパルス発生器7
から出力されるタイミングパルスによってサンプルホー
ルドされた値は、高分解能のA/D変換器2でディジタ
ル値に変換された後、マイクロプロセッサ5に取り込ま
れる。内挿位置演算部5cでは、入力値にもとづいて象
限(1象限〜4象限)を判断し、例えば象限の進行につ
れて4つの象限分で「−1」から「+1」まで連続して
増加し、2象限と3象限との象限境界で不連続(「−
1」に初期化)となるような内挿位置mを求める。これ
は、予め用意した内挿テーブルを参照することで得られ
る。得られた内挿位置mの波形をに示す。この時点
で、内挿位置と2相信号との間にS/H(サンプルホール
ド)時間による位相差が生じている。またこの処理と平
行して、上記sin信号およびcos信号をコンパレータ3に
よっておよびに示したような矩形波に整形したあ
と、2逓倍U/Dカウンタ8においてcos矩形波の立ち上が
りおよび立ち下がりが計数される。このカウンタ値nは
に示すように、cos矩形波の立ち上がりまたは立ち下
がりを1回計数するごとにカウンタを+1しており、2
逓倍(cos信号の1周期で2カウント)で計数されてい
る。このカウンタ値nと2相信号との間にも、カウンタ
処理時間による位相差が生じている。このように2逓倍
で計数されたカウンタ値nはラッチ回路9に入力され、
タイミングパルス発生器7から出力されるタイミングパ
ルスによってラッチされた後、マイクロプロセッサ5の
合成位置演算部5dに取り込まれる。カウンタは1つの
cos矩形波の立ち上がり(たとえば3象限と4象限の間
に相当する位置)で0と設定するなど、カウンタ値は
「偶数」のとき2相信号の位相が4象限か1象限で、
「奇数」のときは2象限か3象限となるように初期化し
ておく。
The operation of the thus configured position detecting device will be described with reference to the waveforms of FIG. In the figure, and indicate waveforms of a sine signal and a cos signal obtained from the encoder 1, which are input to the sample and hold circuit 6. And the timing pulse generator 7
The value sampled and held by the timing pulse output from the A / D converter 2 is converted into a digital value by the high-resolution A / D converter 2 and then taken into the microprocessor 5. The interpolation position calculation unit 5c determines a quadrant (1 to 4 quadrants) based on the input value, and for example, continuously increases from "-1" to "+1" in four quadrants as the quadrant progresses. Discontinuous at the quadrant boundary between two and three quadrants ("-
1) (initialized to 1). This is obtained by referring to an interpolation table prepared in advance. The obtained waveform at the interpolation position m is shown in FIG. At this point, there is a phase difference between the interpolation position and the two-phase signal due to the S / H (sample and hold) time. In parallel with this processing, the sin signal and the cos signal are shaped into rectangular waves by the comparator 3 as shown in FIG. You. The counter value n is incremented by 1 each time the rising or falling of the cos rectangular wave is counted once, as shown in (2).
It is counted by multiplication (two counts in one cycle of the cos signal). A phase difference occurs between the counter value n and the two-phase signal due to the counter processing time. The counter value n thus counted by the doubling is input to the latch circuit 9, and
After being latched by the timing pulse output from the timing pulse generator 7, it is taken into the composite position calculation unit 5 d of the microprocessor 5. One counter
When the counter value is "even", the phase of the two-phase signal is four quadrants or one quadrant.
In the case of "odd number", initialization is performed so that the number of quadrants becomes two or three.

【0013】次に、合成位置演算部5dにおいて、内挿
位置mとカウンタ値nとから合成位置を求める。この処
理の流れを図3のフローチャートを参照しながら説明す
る。まず、カウンタ値nが不連続(「1」をカウント)
となる1象限と2象限の間や3象限と4象限の間におい
て象限を判別するため、カウンタ値が「偶数」の場合と
「奇数」の場合に分ける。カウンタ値nが「偶数」の場
合は(S1でYesのとき)、内挿位置は4象限か1象
限なので不連続がないため、カウンタ値は修正されず、
修正カウンタ値n’=nとする(S2)。カウンタ値n
が「奇数」の場合は(S1でNoのとき)、2象限と3
象限の間で内挿位置は「−1」に初期化されて不連続と
なるため、さらに、内挿位置と定数Kとを比較すること
で2象限と3象限に場合分けする。なお、定数Kは1象
限か4象限の値なら何でもよく、本実施の形態例ではK
=0にしている。内挿位置mが定数Kより大きい場合は
(S3でYesのとき)、内挿位置mは2象限なので、
カウンタ値は「1」減算され、修正カウンタ値n’=n
−1とする(S4)。また、内挿位置mが定数K以下の
場合は(S3でNoのとき)、内挿位置は3象限なの
で、カウンタ値は「1」加算され、修正カウンタ値n’
=n+1とする(S5)。最後に、修正カウンタ値n’
と内挿位置mとを加算することにより、合成位置lが得
られる(S6)。修正カウンタ値および合成位置の波形
を図2のおよびに示す。以上のように、合成位置の
波形は連続した誤差のない波形となり、内挿位置とカウ
ンタ値の間の位相差(S/H時間による位相差−カウンタ
処理時間による位相差)が±90度以下(±1象限分以
下)の場合には、内挿位置とカウンタ値との和からなる
合成位置の不連続が補正され、高速移動時にも、高分解
能な位置検出が可能となる。
Next, in the composite position calculating section 5d, a composite position is obtained from the interpolation position m and the counter value n. The flow of this processing will be described with reference to the flowchart of FIG. First, the counter value n is discontinuous ("1" is counted)
In order to determine the quadrant between 1 quadrant and 2 quadrants or between 3 quadrants and 4 quadrants, the counter value is divided into a case where the counter value is "even" and a case where the counter value is "odd". When the counter value n is “even” (Yes in S1), since the interpolation position is four quadrants or one quadrant and there is no discontinuity, the counter value is not corrected.
The corrected counter value is set to n '= n (S2). Counter value n
Is "odd" (No in S1), two quadrants and three
Since the interpolation position between the quadrants is initialized to “−1” and becomes discontinuous, the interpolation position and the constant K are further compared to divide into two quadrants and three quadrants. It should be noted that the constant K may be any value in one quadrant or four quadrants.
= 0. If the interpolation position m is larger than the constant K (Yes in S3), since the interpolation position m is two quadrants,
The counter value is subtracted by “1”, and the corrected counter value n ′ = n
−1 (S4). When the interpolation position m is equal to or smaller than the constant K (No in S3), since the interpolation position is three quadrants, the counter value is incremented by "1" and the corrected counter value n '
= N + 1 (S5). Finally, the modified counter value n '
And the interpolation position m are added to obtain a combined position 1 (S6). The corrected counter value and the waveform of the combined position are shown in FIGS. As described above, the waveform at the synthesis position is a continuous error-free waveform, and the phase difference between the interpolation position and the counter value (phase difference due to S / H time−phase difference due to counter processing time) is ± 90 degrees or less. In the case of (less than or equal to ± 1 quadrant), discontinuity of the combined position, which is the sum of the interpolation position and the counter value, is corrected, and high-resolution position detection is possible even during high-speed movement.

【0014】実施の形態2.なお、上記実施の形態1で
は、内挿位置の最小値が「−1」で最大値が「+1」と
なる内挿テーブルを用いたが、任意のオフセットPを加
算して最小値が「P−1」で最大値が「P+1」となる
内挿テーブルを用いてもよい。この場合、上記説明にお
いて、内挿位置に関係する値にオフセットPを加算すれ
ば同様である。また、上記実施の形態1では、内挿処理
において2象限と3象限の間に不連続がある内挿テーブ
ルを使用したが、1象限と4象限の間に不連続がある内
挿テーブルを使用してもよい。この場合、上記説明にお
いて、4象限と2象限、1象限と3象限を読み替えれば
よい。さらに、上記実施の形態1では、1つの矩形波の
立ち上がり(3象限と4象限の間に相当する位置)で0
と設定して、カウンタ値が「偶数」のとき2相信号の位
相が4象限か1象限になるように初期化したが、1つの
cos矩形波の立ち下がり(1象限と2象限の間に相当す
る位置)で0と設定して、カウンタ値が「奇数」のとき
に2相信号の位相が4象限か1象限になるように初期化
しても、同様の処理によって、誤差のない連続した合成
位置を得ることができる。この場合は、実施の形態1に
おいての、「偶数」と「奇数」を読み替えればよい。
Embodiment 2 FIG. In the first embodiment, the interpolation table in which the minimum value of the interpolation position is “−1” and the maximum value is “+1” is used. An interpolation table in which the maximum value is “P + 1” at “−1” may be used. In this case, the same applies if the offset P is added to the value related to the interpolation position in the above description. In the first embodiment, an interpolation table having a discontinuity between two and three quadrants is used in the interpolation processing. However, an interpolation table having a discontinuity between one and four quadrants is used. May be. In this case, in the above description, four quadrants, two quadrants, one quadrant and three quadrants may be replaced. Further, in the first embodiment, at the rising edge of one rectangular wave (the position corresponding to between the third and fourth quadrants), 0 is set.
And the phase of the two-phase signal is initialized to be four or one quadrant when the counter value is "even".
Set 0 at the falling edge of the cos rectangular wave (position corresponding to between 1 and 2 quadrants) so that when the counter value is "odd", the phase of the 2 phase signal is 4 or 1 quadrant. Even if the initialization is performed, a continuous synthesis position without error can be obtained by the same processing. In this case, “even number” and “odd number” in Embodiment 1 may be replaced with each other.

【0015】実施の形態3.なお、上記実施の形態1お
よび2においては、内挿位置を2象限と3象限の間、ま
たは1象限と4象限との間に不連続がある内挿テーブル
を使用し、カウンタはcos矩形波の立ち上がりおよび立
ち下がりをカウントするものとしたが、1象限と2象限
の間、または3象限と4象限の間に不連続がある内挿テ
ーブルを使用し、カウンタはsin矩形波の立ち上がりお
よび立ち下がりでカウントするものとしても、全く同様
のことが可能である。
Embodiment 3 In the first and second embodiments, an interpolation table in which the interpolation position is discontinuous between two and three quadrants or between one and four quadrants is used, and the counter is a cos rectangular wave. Is counted, but the interpolation table with a discontinuity between quadrants 1 and 2 or between quadrants 3 and 4 is used, and the counter uses the rising and falling edges of a sin rectangular wave. Exactly the same is possible when counting by falling.

【0016】実施の形態4.なお、上記実施の形態1に
おいては、内挿位置とカウンタ値の間の位相差が±90
度以下(±1象限分以下)の場合に、内挿位置とカウン
タ値の不連続が補正されることを示したが、本実施の形
態4においては、S/H時間とカウンタの処理時間との大
きさによって、内挿位置とカウンタ値の間に±90度を
こえる位相差が発生した場合に、その位相差を低減する
方法について説明する。図4は、この実施の形態4によ
る位置検出装置の構成を示す図で、図1に示した実施の
形態1のものと同一部分または相当部分には、同一符号
を付している。マイクロプロセッサ5内には、実施の形
態1の構成に加えて、移動速度を検出する速度検出部5
eと、内挿位置演算部5cからの内挿位置を上記移動速
度に応じて補正し、補正後の内挿位置を合成位置演算部
5dに出力する位相補正演算部5fとを設けている。
Embodiment 4 In the first embodiment, the phase difference between the interpolation position and the counter value is ± 90.
Although the discontinuity between the interpolation position and the counter value is corrected when the value is equal to or less than (degrees ± 1 quadrant), in the fourth embodiment, the S / H time and the processing time of the counter are reduced. In the case where a phase difference exceeding ± 90 degrees occurs between the interpolation position and the counter value depending on the size of the interpolation value, a method of reducing the phase difference will be described. FIG. 4 is a diagram showing a configuration of a position detecting device according to the fourth embodiment. The same or corresponding portions as those in the first embodiment shown in FIG. 1 are denoted by the same reference numerals. In the microprocessor 5, in addition to the configuration of the first embodiment, a speed detector 5 for detecting a moving speed is provided.
e, and a phase correction calculation unit 5f that corrects the interpolation position from the interpolation position calculation unit 5c according to the moving speed and outputs the corrected interpolation position to the composite position calculation unit 5d.

【0017】エンコーダからの2相信号を入力して内挿
位置を求める処理、および2相信号を矩形波に整形し
て、2逓倍で計数されたカウンタ値をその「偶数」「奇
数」によって修正する処理については、実施の形態1と
同一であるので、説明を省略する。ここでは、求められ
た上記内挿位置を検出対象の移動速度に応じて補正する
位相補正演算部5fの処理について、図5のフローチャ
ートおよび図6の波形を参照しながら説明する。まず、
速度検出部5eが得た移動速度vに定数Lを積算した値
を内挿位置演算部5cで求めた内挿位置mに加算し、
m’とする(T1)。この定数Lは、カウンタ処理時間
からS/H時間を減じた値である。これにより、図6の
で示した内挿位置mの波形に対して、m’の波形はで
示したようになる。この場合は、S/H時間がカウンタ処
理時間より長いため定数Lが負の値をとるため、m’の
波形はmの波形よりvLの大きさだけ下がったものとな
る。
A process of inputting a two-phase signal from an encoder to obtain an interpolation position, shaping the two-phase signal into a rectangular wave, and correcting a counter value counted by doubling by its "even number" and "odd number". The processing to be performed is the same as in the first embodiment, and a description thereof will be omitted. Here, the process of the phase correction calculation unit 5f for correcting the obtained interpolation position according to the moving speed of the detection target will be described with reference to the flowchart in FIG. 5 and the waveform in FIG. First,
A value obtained by integrating a constant L to the moving speed v obtained by the speed detecting unit 5e is added to the interpolation position m obtained by the interpolation position calculating unit 5c,
m ′ (T1). This constant L is a value obtained by subtracting the S / H time from the counter processing time. As a result, the waveform at m 'becomes as shown by the waveform with respect to the waveform at the interpolation position m shown by in FIG. In this case, since the S / H time is longer than the counter processing time, the constant L takes a negative value, so that the waveform of m 'is lower than the waveform of m by vL.

【0018】次に、上記m’が内挿位置の最大値P2を
越えている場合は(T2でYesのとき)、m’は2象
限の値ではなくて3象限か4象限の値なので、内挿位置
m’から「2」を減算した値を補正後の内挿位置m”と
する(T3)。また、m’が内挿位置の最小値P1より
小さい場合は(T2でNo、T4でYesのとき)、
m’は3象限の値ではなくて2象限か1象限の値なの
で、内挿位置m’に「2」を加算した値を補正後の内挿
位置m”とする(T5)。m’が内挿位置の最小値から
最大値の間の値であれば(T2でNo、T4でNoのと
き)、m’をそのまま補正後の内挿位置m”に代入する
(T6)。最後に、求めた補正後の内挿位置m”の値を
合成位置演算部5dに出力する(T7)。図6の場合で
は(P1=−1,P2=1)、に示したm’の波形
で、内挿位置の最小値P1=−1より小さくなる部分
(斜線部)が発生するので、その部分を+2することに
より、−1から+1まで連続した補正後の内挿位置m”
の波形が得られる。また、S/H時間による位相遅れが低
減されている。以上により、内挿位置とカウンタ値の位
相差が±90度をこえる場合でも、位相補正後の内挿位
置とカウンタ値との位相差は±90度以下に低減するこ
とができる。位相差が±90度以下になれば、得られた
補正後の内挿位置m”を新たに内挿位置として上記実施
の形態1と同様の処理を行うことにより、誤差のない位
置検出が可能となる。
Next, when m 'exceeds the maximum value P2 of the interpolation position (when T2 is Yes), m' is not a two-quadrant value but a three- or four-quadrant value. A value obtained by subtracting “2” from the interpolation position m ′ is set as a corrected interpolation position m ″ (T3). When m ′ is smaller than the minimum value P1 of the interpolation position (No in T2, T4) If yes),
Since m ′ is not a value in three quadrants but a value in two or one quadrant, a value obtained by adding “2” to the interpolation position m ′ is set as a corrected interpolation position m ″ (T5). If the value is between the minimum value and the maximum value of the interpolation position (No in T2 and No in T4), m ′ is directly substituted for the corrected interpolation position m ″ (T6). Finally, the value of the obtained interpolation position m ″ after the correction is output to the composite position calculation unit 5d (T7). In the case of FIG. 6, (P1 = −1, P2 = 1), the value of m ′ shown in FIG. In the waveform, a portion (hatched portion) smaller than the minimum value P1 = -1 of the interpolation position occurs. By adding +2 to the portion, the interpolation position m "after correction from -1 to +1 is corrected.
Is obtained. Further, the phase delay due to the S / H time is reduced. As described above, even when the phase difference between the interpolation position and the counter value exceeds ± 90 degrees, the phase difference between the interpolation position after the phase correction and the counter value can be reduced to ± 90 degrees or less. If the phase difference is equal to or less than ± 90 degrees, an error-free position can be detected by performing the same processing as in the first embodiment using the obtained corrected interpolation position m ″ as a new interpolation position. Becomes

【0019】実施の形態5.また、本装置が稼働中に停
電が発生した場合には、そのときの検出対象の位置、内
挿位置、およびカウンタ値の情報が消滅してしまうの
で、電源復帰時には、再度検出対象の位置に応じたカウ
ンタ値の設定を行う必要がある。そこで、電源投入時に
少なくとも1回、検出対象の内挿位置に基づいてカウン
タ値を初期化することにより、停電時のバッテリバック
アップが無くても、常に正確な位置検出が可能となる。
本実施の形態5による位置検出装置の構成を図7に示
す。これは、図4に示した実施の形態4の構成に加え
て、モータを駆動するドライバ10、およびその位置を
制御する位置制御演算部5gと、フィードバック信号を
切り替えるスイッチ5hとをマイクロプロセッサ5内に
設けたものである。このような位置検出装置において
は、まず電源投入時に、図8のフローチャートに示す処
理を行うことによりカウンタ値の初期化を行う。まず、
上記スイッチ5hを内挿位置側にし(U1)、上記位置
制御演算部5gの指令位置として1象限か4象限の内挿
位置Mを設定し(U2)、上記ドライバ10と上記位置
制御演算部5gを有効にする(U3)。モータが駆動さ
れその内挿位置が上記指令位置Mに近づいたら(U4で
Yesのとき)、カウンタ値を「偶数」に初期化し(U
5)、上記スイッチ5hを合成位置側にする(U6)。
以上により、以後モータが移動しても、カウンタ値が
「偶数」のとき2相信号は1象限か4象限になり、「奇
数」のときは2象限か3象限になるため、正常に合成位
置が検出できる。ただし、上記説明において「偶数」と
「奇数」を読み替えても、4象限と2象限、1象限と3
象限とを読み替えてもよい。
Embodiment 5 Also, if a power failure occurs during operation of this device, the information on the position of the detection target, the interpolation position, and the counter value at that time will be lost. It is necessary to set the counter value accordingly. Therefore, by initializing the counter value at least once at the time of turning on the power based on the interpolation position of the detection target, accurate position detection can always be performed without a battery backup at the time of power failure.
FIG. 7 shows the configuration of the position detecting device according to the fifth embodiment. This is because, in addition to the configuration of the fourth embodiment shown in FIG. 4, a driver 10 for driving a motor, a position control calculator 5g for controlling the position thereof, and a switch 5h for switching a feedback signal are included in the microprocessor 5. It is provided in. In such a position detecting device, first, when the power is turned on, the processing shown in the flowchart of FIG. 8 is performed to initialize the counter value. First,
The switch 5h is set to the interpolation position side (U1), an interpolation position M of one quadrant or four quadrants is set as a command position of the position control calculation unit 5g (U2), and the driver 10 and the position control calculation unit 5g are set. Is enabled (U3). When the motor is driven and the interpolation position approaches the command position M (Yes in U4), the counter value is initialized to “even” (U
5) The switch 5h is set to the combining position (U6).
As described above, even if the motor moves thereafter, the two-phase signal becomes one quadrant or four quadrants when the counter value is "even", and two quadrants or three quadrants when the counter value is "odd". Can be detected. However, even if “even number” and “odd number” are read in the above description, four and two quadrants, one quadrant and three
It may be read as a quadrant.

【0020】[0020]

【発明の効果】この発明は、以上説明したように構成さ
れているので、以下に示すような効果を奏する。
Since the present invention is configured as described above, it has the following effects.

【0021】モータなど検出対象に取り付けられたエン
コーダから得られる2相信号をもとに、ある象限と次の
象限との象限境界で初期化されるような内挿位置と、上
記2相信号の矩形波を上記象限境界に相当する位置以外
において基本周期の2逓倍で計数したカウンタ値に対し
て、カウンタ値が上記象限境界またはその近傍に相当す
る位置における値である場合には、その時の内挿位置が
上記象限境界直前の象限の値であればカウンタ値を
「1」減算し、内挿位置が上記象限境界直後の象限の値
であればカウンタ値を「1」加算し、このカウンタ値と
上記内挿位置との和を合成位置として検出するようにし
たので、内挿位置とカウンタ値の位相差が生じた場合に
も連続した合成位置が得られ、誤差のない位置検出が可
能となる。
Based on a two-phase signal obtained from an encoder attached to a detection target such as a motor, an interpolation position initialized at a quadrant boundary between a certain quadrant and the next quadrant, If the counter value is a value at a position corresponding to the quadrant boundary or its vicinity with respect to a counter value obtained by counting the rectangular wave by a multiple of the fundamental period at a position other than the position corresponding to the quadrant boundary, the counter value at that time If the insertion position is a value in the quadrant immediately before the quadrant boundary, the counter value is decremented by "1". If the interpolation position is a value in the quadrant immediately after the quadrant boundary, the counter value is incremented by "1". And the interpolation position is detected as a combined position, so that a continuous combined position can be obtained even when a phase difference occurs between the interpolation position and the counter value, and error-free position detection is possible. Become.

【0022】また、内挿位置が初期化される象限境界を
2象限と3象限の間または4象限と1象限の間とし、カ
ウンタはcos矩形波の立ち上がりおよび立ち下がりをカ
ウントするものとし、2象限と3象限、または4象限と
1象限の2つの象限分におけるカウンタ値をnと設定し
た場合、カウンタ値が「n+2m」の時は、その時の内
挿位置が2象限または4象限の値であればカウンタ値を
「1」減算し、内挿位置が3象限または1象限の値であ
ればカウンタ値を「1」加算するようにしたので、内挿
位置とカウンタ値の位相差が生じた場合にも連続した合
成位置が得られ、誤差のない位置検出が可能となる。
The quadrant boundary at which the interpolation position is initialized is set between two and three quadrants or between four and one quadrant, and the counter counts the rise and fall of the cos rectangular wave. When the counter value in two quadrants of quadrants and three quadrants or four quadrants and one quadrant is set to n, when the counter value is “n + 2m”, the interpolation position at that time is a value in two or four quadrants. If so, the counter value is subtracted by "1", and if the interpolation position is a value in three quadrants or one quadrant, the counter value is added by "1", so that a phase difference between the interpolation position and the counter value occurs. Also in this case, a continuous synthesized position is obtained, and position detection without error becomes possible.

【0023】また、内挿位置が初期化される象限境界を
1象限と2象限の間または3象限と4象限の間とし、カ
ウンタはsin矩形波の立ち上がりおよび立ち下がりをカ
ウントするものとし、1象限と2象限、または3象限と
4象限の2つの象限分におけるカウンタ値をnと設定し
た場合、カウンタ値が「n+2m」の時は、その時の内
挿位置が2象限または4象限の値であればカウンタ値を
「1」減算し、内挿位置が3象限または1象限の値であ
ればカウンタ値を「1」加算するようにしたので、内挿
位置とカウンタ値の位相差が生じた場合にも連続した合
成位置が得られ、誤差のない位置検出が可能となる。
The quadrant boundary at which the interpolation position is initialized is set between one quadrant and two quadrants or between three quadrants and four quadrants, and the counter counts the rise and fall of the sin rectangular wave. When the counter value in two quadrants of quadrants and two quadrants or three quadrants and four quadrants is set to n, when the counter value is “n + 2m”, the interpolation position at that time is a value in two or four quadrants. If so, the counter value is subtracted by "1", and if the interpolation position is a value in three quadrants or one quadrant, the counter value is added by "1", so that a phase difference between the interpolation position and the counter value occurs. Also in this case, a continuous synthesized position is obtained, and position detection without error becomes possible.

【0024】また、内挿処理とカウンタ処理との処理時
間差によって両者の間±1象限分をこえる位相差が生じ
る場合、検出対象の上記処理時間差分の移動距離を求め
て内挿位置に加算し、この加算値が内挿位置の最大値よ
り大きい場合は上記加算値から「2」減算した値を補正
内挿位置とし、上記加算値が内挿位置の最小値より小さ
い場合は、上記加算値に「2」を加算した値を補正内挿
位置とすることにより、上記位相差を1象限分以下に補
正することができるので、高速移動時にも連続で高分解
能な位置検出が可能となる。
When a phase difference exceeding ± 1 quadrant occurs between the interpolation processing and the counter processing due to the processing time difference between the interpolation processing and the counter processing, the moving distance of the processing time difference to be detected is calculated and added to the interpolation position. When the added value is larger than the maximum value of the interpolation position, a value obtained by subtracting "2" from the added value is set as the corrected interpolation position. When the added value is smaller than the minimum value of the interpolation position, the added value is calculated. By setting the value obtained by adding “2” to the correction interpolation position, the phase difference can be corrected to one quadrant or less, so that continuous high-resolution position detection is possible even during high-speed movement.

【0025】モータなどの検出対象を駆動するドライバ
と上記検出対象の位置を制御する位置制御手段とを備
え、電源投入後に少なくとも1回内挿位置を制御し、カ
ウンタ値を初期化するようにしたので、電源OFF時に
カウンタのバッテリバックアップが不要である。
A driver for driving a detection target such as a motor and a position control means for controlling the position of the detection target are provided, and the interpolation position is controlled at least once after the power is turned on to initialize a counter value. Therefore, it is not necessary to backup the battery of the counter when the power is turned off.

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

【図1】 この発明の実施の形態1〜形態3による位置
検出装置の構成を示す図である。
FIG. 1 is a diagram showing a configuration of a position detecting device according to Embodiments 1 to 3 of the present invention.

【図2】 この発明の実施の形態1における位置波形合
成の過程を示す図である。
FIG. 2 is a diagram showing a process of synthesizing a position waveform according to the first embodiment of the present invention.

【図3】 この発明の実施の形態1において、内挿位置
とカウンタ値との位相差を修正する処理の流れを示すフ
ローチャートである。
FIG. 3 is a flowchart showing a flow of processing for correcting a phase difference between an interpolation position and a counter value in the first embodiment of the present invention.

【図4】 この発明の実施の形態4による位置検出装置
の構成を示す図である。
FIG. 4 is a diagram showing a configuration of a position detection device according to a fourth embodiment of the present invention.

【図5】 この発明の実施の形態4において、内挿位置
とカウンタ値との位相差を修正する処理の流れを示すフ
ローチャートである。
FIG. 5 is a flowchart showing a flow of processing for correcting a phase difference between an interpolation position and a counter value according to the fourth embodiment of the present invention.

【図6】 この発明の実施の形態4における位置波形合
成の過程を示す図である。
FIG. 6 is a diagram showing a process of synthesizing a position waveform according to a fourth embodiment of the present invention.

【図7】 この発明の実施の形態5による位置検出装置
の構成を示す図である。
FIG. 7 is a diagram showing a configuration of a position detection device according to a fifth embodiment of the present invention.

【図8】 この発明の実施の形態5におけるカウンタ値
自動初期化処理の流れを示すフローチャートである。
FIG. 8 is a flowchart showing the flow of a counter value automatic initialization process according to Embodiment 5 of the present invention.

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

【図10】 従来の位置検出装置における位置波形合成
の過程を示す図である。
FIG. 10 is a diagram showing a process of synthesizing a position waveform in a conventional position detection device.

【図11】 従来の位置検出装置において、内挿位置と
カウンタ値との位相差によって生じる誤差を示す図であ
る。
FIG. 11 is a diagram illustrating an error caused by a phase difference between an interpolation position and a counter value in a conventional position detection device.

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

1 エンコーダ、2 A/D変換器、3 コンパレー
タ、5 マイクロプロセッサ、5c 内挿位置演算部、
5d 合成位置演算部、5e 速度検出部、5f スイ
ッチ、5g 位置制御演算部、8 2逓倍U/Dカウン
タ、10 ドライバ。
1 encoder, 2 A / D converter, 3 comparator, 5 microprocessor, 5c interpolation position calculation unit,
5d synthesis position calculation unit, 5e speed detection unit, 5f switch, 5g position control calculation unit, 82 times U / D counter, 10 driver.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 モータなど検出対象に取り付けられたエ
ンコーダから得られる2相信号(sin信号およびcos信
号)をA/D変換した値にもとづき象限(1象限〜4象
限)を判断し、その象限の進行につれて上記2相信号の
基本周期(4つの象限分)で連続して増加し、ある象限
と次の象限との象限境界で初期化される内挿位置と、上
記2相信号をコンパレータにより矩形波に整形し、その
矩形波の立ち上がりまたは立ち下がりをカウンタにより
計数したカウンタ値との合成値を上記検出対象の位置と
する位置検出装置において、 上記内挿位置は、任意の数pに対して「p」から「p+
2」まで連続して増加し、上記象限境界で「p+2」か
ら「p」に初期化されるものとし、上記カウンタは、上
記象限境界に相当する位置以外での上記矩形波の立ち上
がりまたは立ち下がりに対して、上記2相信号の基本周
期を2逓倍で係数(2つの象限分で「1」をカウント)
するものとし、上記カウンタ値が上記象限境界またはそ
の近傍に相当する位置における値である場合、その時の
内挿位置が上記象限境界直前の象限の値であれば当該カ
ウンタ値を「1」減算し、当該内挿位置が上記象限境界
直後の象限の値であれば当該カウンタ値を「1」加算す
ることを特徴とする位置検出装置。
1. A quadrant (1 to 4 quadrants) is determined based on a value obtained by A / D converting a two-phase signal (sin signal and cos signal) obtained from an encoder attached to a detection target such as a motor, and the quadrant is determined. , The interpolation position continuously increases at the basic period (four quadrants) of the two-phase signal, and is initialized at the quadrant boundary between a certain quadrant and the next quadrant, and the two-phase signal is calculated by a comparator. In a position detection device which shapes a rectangular wave, and sets a composite value of the rising and falling of the rectangular wave and a counter value counted by a counter as a position of the detection target, the interpolation position is determined for an arbitrary number p. From "p" to "p +
2), and is initialized from “p + 2” to “p” at the quadrant boundary. The counter counts the rising or falling of the rectangular wave at a position other than the position corresponding to the quadrant boundary. , The basic period of the two-phase signal is multiplied by a factor of 2 ("1" is counted in two quadrants)
If the counter value is a value at a position corresponding to or near the quadrant boundary, if the interpolation position at that time is the value of the quadrant immediately before the quadrant boundary, the counter value is subtracted by “1”. If the interpolation position is a value in a quadrant immediately after the quadrant boundary, the counter value is incremented by "1".
【請求項2】 2象限と3象限の間または4象限と1象
限の間を象限境界として内挿位置を初期化し、カウンタ
はcos矩形波の立ち上がりおよび立ち下がりでカウント
するものとし、2象限と3象限、または4象限と1象限
の2つの象限分におけるカウンタ値をn(n;0または
自然数)とした場合、カウンタ値が「(n+1)+2
m」(m;整数)のときは、当該カウンタ値と上記内挿
位置との和を合成値とし、上記カウンタ値が「n+2
m」のときは、その時の内挿位置が上記象限境界の直前
(2象限または4象限)の値であれば当該カウンタ値を
「1」減算した値と当該内挿位置との和を合成値とし、
当該内挿位置が上記象限境界直後(3象限または1象
限)の値であれば当該カウンタ値を「1」加算した値と
当該内挿位置との和を合成値とすることを特徴とする請
求項1記載の位置検出装置。
2. An interpolation position is initialized with a quadrant boundary between two and three quadrants or between four and one quadrants, and a counter counts at the rise and fall of the cos rectangular wave. When the counter value in two quadrants of three quadrants or four quadrants and one quadrant is n (n; 0 or a natural number), the counter value is “(n + 1) +2
m ”(m; an integer), the sum of the counter value and the interpolation position is used as a composite value, and the counter value is“ n + 2 ”.
m ”, if the interpolation position at that time is the value immediately before the boundary of the quadrant (two or four quadrants), the sum of the value obtained by subtracting“ 1 ”from the counter value and the interpolation position is a composite value. age,
If the interpolation position is a value immediately after the quadrant boundary (3 or 1 quadrant), the sum of the value obtained by adding "1" to the counter value and the interpolation position is set as a composite value. Item 4. The position detecting device according to Item 1.
【請求項3】 1象限と2象限の間または3象限と4象
限の間を象限境界として内挿位置を初期化し、カウンタ
はsin矩形波の立ち上がりおよび立ち下がりでカウント
するものとし、1象限と2象限、または3象限と4象限
の2つの象限分におけるカウンタ値をn(n;0または
自然数)とした場合、カウンタ値が「(n+1)+2
m」(m;整数)のときは、当該カウンタ値と上記内挿
位置との和を合成値とし、上記カウンタ値が「n+2
m」のときは、その時の内挿位置が上記象限境界の直前
(1象限または3象限)の値であれば当該カウンタ値を
「1」減算した値と当該内挿位置との和を合成値とし、
当該内挿位置が上記象限境界直後(2象限または4象
限)の値であれば当該カウンタ値を「1」加算した値と
当該内挿位置との和を合成値とすることを特徴とする請
求項1記載の位置検出装置。
3. An interpolation position is initialized with a quadrant boundary between one quadrant and two quadrants or between three quadrants and four quadrants, and a counter counts at the rise and fall of the sin rectangular wave. When the counter value in two quadrants or two quadrants of three and four quadrants is n (n; 0 or a natural number), the counter value is “(n + 1) +2
m ”(m; an integer), the sum of the counter value and the interpolation position is used as a composite value, and the counter value is“ n + 2 ”.
m ”, if the interpolation position at that time is a value immediately before the above quadrant boundary (one or three quadrants), the sum of a value obtained by subtracting“ 1 ”from the counter value and the interpolation position is a composite value. age,
If the interpolation position is a value immediately after the quadrant boundary (two or four quadrants), a sum of a value obtained by adding "1" to the counter value and the interpolation position is set as a composite value. Item 4. The position detecting device according to Item 1.
【請求項4】 内挿位置を求める内挿処理とカウンタ処
理との処理時間差によって両者の間に±1象限分をこえ
る位相差が生じる場合、検出対象の上記処理時間差分の
移動距離を求めて内挿位置に加算し、この加算値が内挿
位置の最大値「p+2」より大きい場合は、上記加算値
から「2」を減算した値を補正内挿位置とし、上記加算
値が内挿位置の最小値「p」より小さい場合は、上記加
算値に「2」を加算した値を補正内挿位置とし、それ以
外は上記加算値を補正内挿位置とすることにより得られ
る「p」から「p+2」まで連続して増加する補正内挿
位置を新たに内挿位置とすることを特徴とする請求項1
ないし3のいずれかに記載の位置検出装置。
4. When a phase difference exceeding ± 1 quadrant occurs between the interpolation processing for obtaining the interpolation position and the counter processing due to a processing time difference between the two, a moving distance of the processing time difference of the detection target is obtained. If the added value is larger than the maximum value “p + 2” of the interpolation position, a value obtained by subtracting “2” from the added value is set as the corrected interpolation position, and the added value is the interpolation position. Is smaller than the minimum value “p”, the value obtained by adding “2” to the above-mentioned added value is used as the corrected interpolation position. 2. The correction interpolation position continuously increasing to "p + 2" is newly set as an interpolation position.
4. The position detecting device according to any one of claims 1 to 3.
【請求項5】 モータなどの検出対象を駆動するドライ
バと上記検出対象の位置を制御する位置制御手段とを備
え、電源投入後に少なくとも1回内挿位置信号をフィー
ドバックした位置制御系を構成し、上記内挿位置が設定
された値になるように上記検出対象を移動させた後、上
記カウンタ値に設定された値を設定することで上記カウ
ンタ値を初期化することを特徴とする請求項1ないし4
のいずれかに記載の位置検出装置。
5. A position control system comprising: a driver for driving a detection target such as a motor; and position control means for controlling the position of the detection target, wherein a position control system that feeds back an interpolation position signal at least once after power-on is configured. 2. The counter value is initialized by moving the detection target so that the interpolation position becomes a set value, and then setting a value set as the counter value. Or 4
The position detecting device according to any one of the above.
JP04366398A 1998-02-25 1998-02-25 Position detection device Expired - Fee Related JP3513383B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP04366398A JP3513383B2 (en) 1998-02-25 1998-02-25 Position detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP04366398A JP3513383B2 (en) 1998-02-25 1998-02-25 Position detection device

Publications (2)

Publication Number Publication Date
JPH11241927A true JPH11241927A (en) 1999-09-07
JP3513383B2 JP3513383B2 (en) 2004-03-31

Family

ID=12670103

Family Applications (1)

Application Number Title Priority Date Filing Date
JP04366398A Expired - Fee Related JP3513383B2 (en) 1998-02-25 1998-02-25 Position detection device

Country Status (1)

Country Link
JP (1) JP3513383B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003083771A (en) * 2001-07-03 2003-03-19 Olympus Optical Co Ltd Encoder
JP2013088152A (en) * 2011-10-14 2013-05-13 Canon Inc Encoder and device with the same
JP2014032105A (en) * 2012-08-03 2014-02-20 Canon Inc Measurement device, lithography device, and article manufacturing method
JP2014032104A (en) * 2012-08-03 2014-02-20 Canon Inc Measurement device, lithography device, and article manufacturing method
US8922404B2 (en) 2013-05-28 2014-12-30 Kabushiki Kaisha Toshiba Signal processor
CN114324824A (en) * 2022-01-04 2022-04-12 上海市地矿工程勘察(集团)有限公司 Monitoring point location setting system and method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003083771A (en) * 2001-07-03 2003-03-19 Olympus Optical Co Ltd Encoder
US7825369B2 (en) 2001-07-03 2010-11-02 Olympus Corporation Displacement sensor, method for detecting the optimal reference position, and method for judging stability of detecting reference position of displacement sensor
JP2013088152A (en) * 2011-10-14 2013-05-13 Canon Inc Encoder and device with the same
JP2014032105A (en) * 2012-08-03 2014-02-20 Canon Inc Measurement device, lithography device, and article manufacturing method
JP2014032104A (en) * 2012-08-03 2014-02-20 Canon Inc Measurement device, lithography device, and article manufacturing method
US8922404B2 (en) 2013-05-28 2014-12-30 Kabushiki Kaisha Toshiba Signal processor
CN114324824A (en) * 2022-01-04 2022-04-12 上海市地矿工程勘察(集团)有限公司 Monitoring point location setting system and method

Also Published As

Publication number Publication date
JP3513383B2 (en) 2004-03-31

Similar Documents

Publication Publication Date Title
US6278388B1 (en) Method of converting an analog signal to digital signal by digitalizing error deviation
US7541951B2 (en) Tracking loop type digital angle converter and angle/digital converting apparatus
JPS62162968A (en) Speed detecting device
WO1984001821A1 (en) Device for detecting position of rotor of motor
JPH11241927A (en) Position detecting device
US4837492A (en) Apparatus for detecting revolution using a synchro
JP3365063B2 (en) Rotation angle detection method
JP2001197725A (en) Method for generating pwm pulse
JP2941790B1 (en) Pulse counter
JP3365913B2 (en) Position detection device
US7088072B2 (en) Motor control system
JP2943323B2 (en) Method for detecting output current of PWM inverter
JP3007268B2 (en) Sawtooth wave generator and signal interpolation device using the same
JP2607974B2 (en) Pulse coder with delay correction
JP2506856B2 (en) Motor rotation speed controller
JPS62237316A (en) Detection error correcting device for position detector
JP3314793B2 (en) Positioning control device
JPH07294285A (en) Method and apparatus for processing sensor signal
JP2007333669A (en) Encoder signal processing circuit and motor control system
JP2001317962A (en) R/d converter
JP3982766B2 (en) Stepping motor control device
JPH0552589A (en) Absolute encoder device
JPS6257316A (en) Timing extraction circuit
JPH10254549A (en) Positioning controller
JP2003528502A (en) Method and apparatus for generating a clock signal combined with a reference signal

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20031224

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040109

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

Free format text: PAYMENT UNTIL: 20080116

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090116

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100116

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100116

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110116

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120116

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130116

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130116

Year of fee payment: 9

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees