JPH0524445B2 - - Google Patents

Info

Publication number
JPH0524445B2
JPH0524445B2 JP59012764A JP1276484A JPH0524445B2 JP H0524445 B2 JPH0524445 B2 JP H0524445B2 JP 59012764 A JP59012764 A JP 59012764A JP 1276484 A JP1276484 A JP 1276484A JP H0524445 B2 JPH0524445 B2 JP H0524445B2
Authority
JP
Japan
Prior art keywords
signal
signals
interpolation
output
encoder
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP59012764A
Other languages
Japanese (ja)
Other versions
JPS60157014A (en
Inventor
Fumio Ootomo
Takashi Taniguchi
Juji Fukuroda
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.)
Topcon Corp
Original Assignee
Topcon 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 Topcon Corp filed Critical Topcon Corp
Priority to JP1276484A priority Critical patent/JPS60157014A/en
Publication of JPS60157014A publication Critical patent/JPS60157014A/en
Publication of JPH0524445B2 publication Critical patent/JPH0524445B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/24404Interpolation using high frequency signals

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Description

【発明の詳細な説明】[Detailed description of the invention]

(産業上の利用分野) 本発明は、エンコーダ読取信号の内挿方法およ
び装置に関する。殊に、本発明は、エンコーダか
ら得られる少くとも2つの周期的波形信号をもと
に高分解能の測定を可能にする内挿方法および装
置に関する。 (従来技術) 測長あるいは測角のための器械において自動読
取を行うためのエンコーダは、検出部から位相が
90°異なる正弦波に近い2つの信号を発生する。
そして、エンコーダの演算処理部では、この2つ
の信号の組合せて種々の位相の信号を形成し、そ
れらの信号がゼロになる点を計数することにより
基準位置からの変位量を得ている。この方法で
は、測定の精度すなわち分解能は、信号の数を増
加させることにより高められるのであるが、現実
にはゼロ値検出回路のオフセツト電圧あるいはド
リフトなどのために分解能を大巾に高めることが
できない。 (発明の目的) 本発明は、従来の方法におけるような制約がな
く、分解能を飛躍的に高めることができるような
エンコーダ読取信号の内挿方法および装置を提供
することを目的とする。 (発明の構成) 本発明は、位置変化に応じてエンコーダ検出部
から得られる、互いに位相の異る複数の周期的波
形信号により移動位置を検出するエンコーダの読
取信号の内挿方法において、前記周期的波形信号
の一つを基準信号として選び、前記周期的波形信
号の各々の値がゼロとなる点によつて前記基準信
号の一周期を複数の内挿区間に分割するととも
に、各内挿区間で同方向になるべき2つの信号を
対とし、この対なる2つの信号の正負状態を検出
することにより前記基準信号の一周期の始点から
前記測定点を含む内挿区間までの内挿区間数NP
を判別し、前記測定点における上記同方向に変化
する2つの信号の値XP,YPと、前記内挿区間を
エンコーダの位置変化量で示される量αと前記基
準信号の一周期の始点から前記測定点の位置を、 式B=〔{XP/(XP−YP)}+NP〕・α に基づく演算を行なつて求めることを特徴とする
エンコーダ読取信号の内挿方法である。 本発明はまた、位相が互いに90°異なる、2つ
の周期的に変動するエンコーダ読取信号をもとに
移動位置を検出するエンコーダ読取信号の内挿装
置において、前記2つの信号のうちの少なくとも
一方の信号を基準信号とし該基準信号に対し180°
位相の異なる信号を得る信号形成手段と、前記信
号の各々がゼロになる点によつて前記信号の一周
期を分割した複数の内挿区間のうちの測定点を含
む内挿区間において一方が正で一方が負でありか
つほぼ同一方向に変化する2つの信号のうちの一
方の信号の値から他方の信号の値を減じて減算信
号を発生する減算手段と、前記一方の信号の値を
前記減算信号で割り除算信号を発生する除算手段
と、前記除算信号にあらかじめ定められた係数を
掛けて内挿結果を得る乗算手段とからなることを
特徴とするエンコーダ読取信号の内挿装置であ
る。 (発明の効果) 本発明においては、複数の信号のゼロ点により
分割される内挿区間において、測定点の位置が、
その内挿区間で選ばれる2つの信号の値を基にし
た比例演算式により算出されるので、従来のよう
に信号のゼロ点の計数を行なうものに比し、分解
能を大巾に高めることができる。 (実施例の説明) 以下、本発明の実施例を図について説明する。 <内挿の原理> 上位測定 エンコーダの検出部は、従来の装置と同様に位
相が90°異る2つの正弦波に近い波形の信号を発
生する。そのうち一つの信号波形について、測定
点までの波形の数を数えることにより、上位測定
を行う。 中位測定 測定点を含む一周期を複数の内挿区間に分割
し、測定点が含まれる内挿区間を検出する。この
ためには、エンコーダの検出部が発生する2つの
信号波形と、これら信号波形の一方の反転信号が
用いられる。第1図に、エンコーダ検出部の信号
波形およびその反転信号を三角波に近似して示
す。図において、エンコーダ検出部の出力信号は
a,bで示され、信号aの反転信号がで示され
る。信号a,bのゼロクロス点a0,b0,a1,b1
a2により、測定点を含む一周期が4個の内挿区間
0、1、2、3に分割される。後述するように、
エンコーダ検出部からの信号によりさらに多くの
仮想信号を形成すると、内挿区間はもつと細かく
分割できる。 このようにして分割された内挿区間のうち、ど
の内挿区間に測定点pが含まれているかを検出す
ることにより、中位測定が行われる。このため
に、各内挿区間を決める2つの信号を対として順
次選択(以下これを走査という)し、一方が正で
他方が負になるまでの走査回数nを得、測定点p
が含まれる内挿区間の番号NP(信号aのゼロクロ
ス点a0から測定点pを含む内挿区間までの内挿区
間の個数を意味する)を求める。たとえば、第1
図の例では、次表のような信号組合せと走査回数
が得られる。 X信号 Y信号 走査回数 a b 0 b 1 信号組合せが三通のばあいには、3番目に発生す
る信号組合せの走査回数には2とし、信号組合せ
が四通のばあいには、3番目および4番目に発生
する信号組合せの走査回数nは、それぞれ2およ
び3とする。このようにして得られる走査回数n
から、測定点pを含む内挿区間NPを演算する。
すなわち、内挿区間を決める一対の信号のうち、
位相が進んだ方の信号をX信号とし、遅れた方の
信号をY信号として、X信号が正でY信号が負の
ばあいにはNP=nにより、またX信号が負でY
信号が正のばあいにはNP=n+NM/2(ただし
NMは一周期内の内挿区間の数)により内挿区間
番号NPを得ることができる。たとえば、第1図
の測定点pの場合、X信号をa,Y信号をbに選
択した時、すなわち走査回数n=0の時はX信号
は正、Y信号は負の信号が得られる。従つてNP
=n=0となる。また測定点がp′の位置にある場
合は、X信号をb,Y信号をと選択した時、す
なわち走査回数n=1の時はX信号に負、Y信号
に正の信号が得られる。従つて内挿区間番号NP
はNP=n+4/2=3となる。但しここではNM= 4としている。 下位測定 中位測定において分割された内挿区間のうち、
測定点が含まれる内挿区間において、該測定点が
どの位置にあるかを知ることにより、内挿の行わ
れる一周期の中での測定点の位置を高分解能で検
出するものである。一つの内挿区間の大きさをエ
ンコーダの回転角また移動量で示した値をαとす
ると、測定点を含む内挿区間の始点は、内挿が行
われる一周期の始点a0からαNPだけ離れた位置に
ある。そして、測定点を含む内挿区間において、
中位測定の項で述べたようにして選ばれる2つの
信号すなわちX信号、Y信号はほぼ平行である、
と考えてよいから、内挿区間の始点から測定点ま
での回転角または移動量lは、次式で表すことが
できる。 l=XP/XP−YPα ……(1) ここに、XP、YPはX信号およびY信号の測定
点pにおける値とする。 したがつて、内挿の行われる一周期の始点a0
ら測定点pまでの回転角または移動量βは、次式
で表される。 β=(XP/XP−YP+NP)α ……(2) 仮想信号 実際のエンコーダでは、光の回折現象や平行光
以外の光による影響などにより理想的な三角波は
得られない。そして、これらの影響が大きければ
大きいほど波形が正弦波に近づく、このため、ゼ
ロクロス点近傍を除いて直線性がくずれるので、
2つの波形を合成して仮想の信号を作り、これら
の信号のうちゼロクロス点近傍のもののみを使う
ようにすることが望ましい。一般に、エンコーダ
検出部からは90°異なる2つの信号が出力され、 a=A・sin θ+Oa b=B・sin(θ−π/2)+Ob ……(3) で表される。ここでA>O,B>Oであり、Oa
とObは信号a,bそれぞれのゼロレベルのオフ
セツト値を示し、ここではOa=Ob=Oとする。
2つの信号を合成した信号iは、 i=aKa+bKb=KaA・sin θ+KbB・sin(θ−π/2
)……(4) で表される。ここで、Ka,Kbは2つの信号a,
bを加える時の割合を定める係数である。 (4)式は次のように表される。 (5)式からKa,Kbを適当に設定することにより、
任意の正弦波を得ることが可能である、というこ
とが理解される。A=Bとし、 Ka,Kb
(Industrial Application Field) The present invention relates to a method and apparatus for interpolating encoder read signals. In particular, the invention relates to an interpolation method and device that allows high-resolution measurements on the basis of at least two periodic waveform signals obtained from an encoder. (Prior art) An encoder for automatic reading in a length or angle measurement instrument has a phase difference from the detection section.
Generates two signals close to sine waves that differ by 90 degrees.
Then, in the arithmetic processing section of the encoder, these two signals are combined to form signals of various phases, and the amount of displacement from the reference position is obtained by counting the points at which these signals become zero. In this method, measurement accuracy, or resolution, can be improved by increasing the number of signals, but in reality, it is not possible to greatly increase the resolution due to offset voltage or drift of the zero value detection circuit. . (Object of the Invention) An object of the present invention is to provide a method and apparatus for interpolating an encoder read signal, which is free from the limitations of conventional methods and can dramatically improve resolution. (Structure of the Invention) The present invention provides an encoder read signal interpolation method for detecting a moving position using a plurality of periodic waveform signals having mutually different phases obtained from an encoder detection unit in response to a change in position. one period of the periodic waveform signal is selected as the reference signal, one period of the reference signal is divided into a plurality of interpolation intervals by the points where each value of the periodic waveform signal becomes zero, and each interpolation interval The number of interpolation intervals from the start point of one cycle of the reference signal to the interpolation interval including the measurement point is determined by pairing two signals that should be in the same direction at and detecting the positive/negative states of the two paired signals. N P
The values X P and Y P of the two signals changing in the same direction at the measurement point, the amount α indicated by the amount of change in the position of the encoder, and the starting point of one cycle of the reference signal are determined. An encoder read signal interpolation method characterized in that the position of the measurement point is calculated from the equation B = [{X P / (X P − Y P )} + N P ]・α. be. The present invention also provides an encoder read signal interpolation device for detecting a movement position based on two periodically varying encoder read signals whose phases are different from each other by 90°. 180° with respect to the reference signal.
a signal forming means for obtaining signals with different phases; and one of the plurality of interpolation intervals including the measurement point, which is obtained by dividing one period of the signal by points at which each of the signals becomes zero, one of which is positive. subtracting means for generating a subtraction signal by subtracting the value of one of two signals, one of which is negative and changing in substantially the same direction, from the value of the other signal; An interpolation device for an encoder read signal, comprising a division means for generating a division signal divided by a subtraction signal, and a multiplication means for multiplying the division signal by a predetermined coefficient to obtain an interpolation result. (Effect of the invention) In the present invention, in the interpolation interval divided by the zero points of a plurality of signals, the position of the measurement point is
Since it is calculated using a proportional calculation formula based on the values of two signals selected in the interpolation interval, the resolution can be greatly improved compared to the conventional method that counts the zero points of the signal. can. (Description of Examples) Examples of the present invention will be described below with reference to the drawings. <Principle of interpolation> Upper-level measurement The detection section of the encoder generates two signals with a waveform similar to a sine wave with a phase difference of 90 degrees, as in conventional devices. For one of the signal waveforms, upper level measurement is performed by counting the number of waveforms up to the measurement point. Intermediate measurement Divide one cycle that includes a measurement point into multiple interpolation intervals, and detect the interpolation interval that includes the measurement point. For this purpose, two signal waveforms generated by the detection section of the encoder and an inverted signal of one of these signal waveforms are used. FIG. 1 shows the signal waveform of the encoder detection section and its inverted signal approximated to a triangular wave. In the figure, the output signals of the encoder detection section are indicated by a and b, and the inverted signal of signal a is indicated by . Zero crossing points of signals a and b a 0 , b 0 , a 1 , b 1 ,
A 2 divides one cycle including the measurement points into four interpolation intervals 0, 1, 2, and 3. As described later,
If more virtual signals are formed using the signals from the encoder detection section, the interpolation interval can be divided into smaller sections. Median measurement is performed by detecting in which interpolation interval the measurement point p is included among the interpolation intervals divided in this manner. For this purpose, we sequentially select the two signals that determine each interpolation interval as a pair (hereinafter referred to as scanning), obtain the number of scans n until one becomes positive and the other becomes negative, and measure the measurement point p.
The number N P of the interpolation interval including the measurement point p (meaning the number of interpolation intervals from the zero-crossing point a 0 of the signal a to the interpolation interval including the measurement point p) is determined. For example, the first
In the example shown, the signal combinations and number of scans are obtained as shown in the table below. X signal Y signal Number of scans a b 0 b 1 If there are three signal combinations, set the number of scans for the third signal combination to be 2, and if there are four signal combinations, set the number of scans to the third signal combination. The number of scans n of the fourth signal combination is assumed to be 2 and 3, respectively. The number of scans n obtained in this way
From this, an interpolation interval N P including the measurement point p is calculated.
In other words, among the pair of signals that determine the interpolation interval,
The signal with a lead in phase is the X signal, and the signal with a delay is the Y signal.If the X signal is positive and the Y signal is negative, N P =n, and if the X signal is negative, Y
If the signal is positive, N P = n + N M /2 (however,
(N M is the number of interpolation intervals within one period), the interpolation interval number N P can be obtained. For example, in the case of measurement point p in FIG. 1, when the X signal is selected as a and the Y signal is selected as b, that is, when the number of scans n=0, a positive X signal and a negative Y signal are obtained. Therefore, N P
=n=0. Further, when the measurement point is at position p', when the X signal is selected as b and the Y signal is selected, that is, when the number of scans is n=1, a negative signal is obtained for the X signal and a positive signal is obtained for the Y signal. Therefore, the interpolation interval number N P
becomes N P =n+4/2=3. However, here N M = 4. Lower measurement Among the interpolation intervals divided in the intermediate measurement,
By knowing the position of a measurement point in an interpolation interval in which the measurement point is included, the position of the measurement point within one period of interpolation is detected with high resolution. If the value of the size of one interpolation interval expressed by the rotation angle or movement amount of the encoder is α, then the starting point of the interpolation interval including the measurement point is from the starting point a 0 of one period in which interpolation is performed to αN P It is located far away. Then, in the interpolation interval including the measurement points,
The two signals, namely the X signal and the Y signal, selected as described in the section on intermediate measurement, are almost parallel.
Therefore, the rotation angle or movement amount l from the starting point of the interpolation section to the measurement point can be expressed by the following equation. l=X P /X P −Y P α (1) Here, X P and Y P are the values at the measurement point p of the X signal and the Y signal. Therefore, the rotation angle or the amount of movement β from the starting point a 0 to the measurement point p in one period in which interpolation is performed is expressed by the following equation. β=(X P /X P −Y P +N P ) α ...(2) Virtual signal In an actual encoder, an ideal triangular wave cannot be obtained due to light diffraction phenomena and the influence of light other than parallel light. The greater these influences, the closer the waveform becomes to a sine wave, and as a result, the linearity breaks down except near the zero-crossing point.
It is desirable to combine the two waveforms to create a virtual signal, and use only those signals near the zero-crossing point of these signals. Generally, two signals that differ by 90 degrees are output from the encoder detection unit, and are expressed as a=A·sin θ+O a b=B·sin (θ−π/2)+O b (3). Here A>O, B>O, and O a
and O b indicate the zero level offset values of signals a and b, and here it is assumed that O a =O b =O.
The signal i obtained by combining the two signals is: i=aK a +bK b =K a A・sin θ+K b B・sin (θ−π/2
)……(4). Here, K a and K b are two signals a,
This is a coefficient that determines the ratio when adding b. Equation (4) is expressed as follows. By appropriately setting K a and K b from equation (5),
It is understood that it is possible to obtain any sine wave. Let A=B, and K a and K b

【式】に設定すると、(5)式から i=Asin(θ−π/4) ……(6) が得られ、またWhen set to [Formula], from formula (5) i=Asin(θ−π/4)……(6) is obtained, and

【式】【formula】

【式】 i′=Asin(θ−3/4π) ……(7) が得られる。これらの波形を第2図に示す。 このような仮想信号を用いることにより、信号
の一周期をさらに細かな内挿区間に分割でき、直
線精度の高い信号部分のみを使用して内挿の精度
を高めることができる。 <振幅とゼロレベルの補正> すでに述べたとおり、内挿は2つの信号レベル
の検出により、行うものであり、2つの信号のゼ
ロレベルや両者の振幅の関係は常に一定であるこ
とが重要である。しかしながら、実際のエンコー
ダ検出部から得られる2つの信号は、発光ダイオ
ードの光量変化や温度変化にともなうゼロレベル
の変化すなわちドリフトとか移動板とステータ板
の間隔変化による振幅の変化などがあり、さらに
はパターンの不均一によるゼロレベルの変化や振
幅の変化を伴うのが普通である。したがつて、エ
ンコーダ検出部から得られる信号を用いて直線内
挿読取を行うと、それらゼロレベル変化や振幅変
化が影響して高精度な結果が得られなくなる恐れ
がある。したがつて、正確度が高い測定結果を得
るためには、信号の振幅とゼロレベルの補正を行
うことが必要である。 エンコーダ検出部から得られる二つの信号は、
いずれも正弦波に近い波形をもち、位相は互いに
90°だけ異なつているが、二つの信号がこのよう
な関係にあるばあい、一方の信号がゼロ値のとき
他方の信号は最大または最小の値すなわち極値を
とり、また各々の信号はゼロ値近傍で最大の変化
率を、極値近傍で最少の変化率を示すことにな
る。このような点に着目すると、互いの信号を利
用して各信号の極値を得ることが可能となる。さ
らに詳細に述べると、たとえば第2図において、
信号a,bはともに正弦波形であり、信号bは信
号aに対し位相が90°だけ遅れている。そして、
信号aのゼロクロス点a0においては信号bは最小
値となり、ゼロクロス点a1において最大値とな
る。同様に、信号bのゼロクロス点b0,b1におい
て信号aはそれぞれ最大値、最小値をとる。そこ
で、一方の信号のゼロクロス点を検出し、そのと
きの他方の信号の値をその信号の極値と考えてよ
い。このばあい、信号のゼロレベルの変動の影響
が入るが、信号の変化率は極値近傍で最小となる
ので、その誤差は極めて小さい。 第(3)式で示される信号a,bの極値をそれぞれ
anax、anio、bnax、bnioとすると、信号aの振幅A
とゼロレベルOaは、 A=anax−anio/2 ……(8) Oa=anax+anio/2 ……(9) で表され、また信号bの振幅BとゼロレベルOb
は、 B=bnax−bnio/2 ……(10) Ob=bnax+bnio/2 ……(11) で表される。したがつて、ゼロレベルの補正は、
信号aからOaを減じ、また信号bからObを減じ
ることで行えばよい。2つの信号の振幅バランス
の補正は、AとBの比からゼロレベルの補正され
た2つの信号の一方を補正する。つまり、信号
(b−Ob)にA/Bを乗じるか、あるいは信号
(a−Oa)にB/Aを乗じることにより補正を行
う。この補正の関係の式で示すと 又は、 となる。 このようにして補正された2つの信号a′,b′は
ゼロレベルが真の零となり、振幅がともにA,B
のいずれかになる。したがつて、ゼロレベルの変
化や振幅のバランス変化を有する2つの信号は、
補正後においてゼロレベルの変化がなく、また両
信号の振幅の関係が常に一定に保たれる。 <具体的な構成> 全体構成 第3図は本発明を実施した制御回路の一例を示
すものである。図示された制御回路は、測定部1
0、補正部20、仮想信号発生部30および内挿
部40からなる。 測定部10 測定部10は信号aを入力とする比較器CMP
1と信号bを入力する比較器CMP2を有する。
これら比較器CMP1,CMP2は第5図に示すよ
うに、それぞれの入力信号を、その信号のゼロク
ロス点に立ち上りあるいは立ち下りを有する矩形
波に変換する。比較器CMP1,CMP2の出力は
方向判別器RLに与えられる。方向判別器RLは比
較器CMP1,CMP2からの矩形波信号の位相関
係からエンコーダの移動方向あるいは回転方向が
右方向であるか、左方向であるかを判別し、たと
えば右方向であるばあいには出力端子UPに、左
方向であるばあいには出力端子DNに出力パルス
を発生する。方向判別器RLの出力は、比較器
CMP1,CMP2の出力である矩形波の一方、た
とえば位相が進んだ方の矩形波に対応したパルス
の形であり、この出力はアツプダウンカウンタ
UDCに入力され、パルス数が計数される。この
計数によりエンコーダの移動量が測定できる。ア
ツプダウンカウンタUDCの出力は制御部CTLに
与えられ、制御部CTLはカウンタUDCの出力を
回転角度あるいは直接移動量に換算しこれを後述
する内挿読取による演算結果と合成して表示部
DSPに表示する。 補正部20 補正部20は、信号aを入力とするサンプルホ
ールド回路SH1,SH2と、信号bを入力とする
サンプルホールド回路SH3,SH4を有する。さ
らに、測定部10の比較器CMP1の出力を受け
るパルス発生器POS1と比較器CMP2の出力を
受けるPOS2とが設けられる。このパルス発生
器は、第4図に示すようにエクスクルーシブオア
回路21を有し、このエクスクルージブオア回路
21の一方の入力端子には比較器の矩形波出力が
そのまま与えられ、他方の入力端子には比較器出
力が抵抗22を介して接続され、この抵抗22と
エクスクルーシブオア回路21の入力端子との接
続部はコンデンサ23を介して接地される。この
パルス発生器POS1,POS2は、比較器CMP1,
CMP2の出力の立ち上り点および立ち下り点で
立ち上るパルス出力を発生する。すなわち、パル
ス発生器POS1は信号aのゼロクロス点でパル
スを発生し、パルス発生器POS2は信号bのゼ
ロクロス点でパルスを発生する。 パルス発生器POS2の出力は、2個のアンド
ゲートA1,A2の各一方の入力端子に接続され
る。アンドゲートA1の他方の入力端子は比較器
CMP1の出力に接続され、アンドゲートA2の
他方の入力端子はインバータI1を介して比較器
CMP1の出力に接続される。したがつて、アン
ドゲートA1は、第5図示すように、信号bがゼ
ロクロス点にあるとき、すなわち信号aが極値と
なるときであつて、しかも信号aが正の値をとる
ときに出力を発生する。換言すれば、アンドゲー
トA1は、信号aが最大値をとるときに出力を発
生する。同様に、アンドゲートA2は、信号bが
最小値をとるときに出力を発生する(第5図)。
これらアンドゲートA1,A2の出力は、それぞ
れサンプルホールド回路SH1,SH2に入力され
る。 同様にして、パルス発生器POS1の出力は、
2個のアンドゲートA3,A4の各一方の入力端
子に接続され、アンドゲートA3の他方の入力端
子は直接に、アンドゲートA4の他方の入力端子
はインバータI2を介して、比較器CMP2の出
力にそれぞれ接続されている。アンドゲートA3
は信号bが最大値のときに、アンドゲートA4は
信号bが最小値のときに出力を発生する(第5
図)。そして、アンドゲートA3,A4の出力は、
それぞれサンプルホールド回路SH3,SH4に入
力される(第5図)。 サンプルホールド回路SH1は、アンドゲート
A1からパルスを受けたときに信号aをサンプル
し、パルス入力がない期間はサンプルされた信号
をそのままホールドする。したがつて、サンプル
ホールド回路SH1は、信号aのほぼ最大値すな
わち信号anaxを出力する。同様に、サンプルホー
ルド回路SH2は信号aのほぼ最小値である信号
anioを、サンプルホールド回路SH3,SH4は信
号bのほぼ最大値およびほぼ最小値であるbnax
bnioをそれぞれ出力する。このようにしてサンプ
ルされる信号の最大値および最小値は、信号のゼ
ロレベルの変動の影響を受けるので、真の最大値
および最小値とは異なるが、前述したように、極
値付近での信号レベルの変化率は非常に小さいの
で、その誤差は微少である。したがつて、以下の
説明では、このサンプルされた信号を最大値また
は最小値として取扱う。 サンプルホールド回路SH1,SH2の出力は加
算器AD1の二つの入力端子にそれぞれ接続さ
れ、両者の加算値である加算器AD1の出力は減
算器SB2の負側入力端子に与えられる。減算器
SB2の正側入力端子には信号aが入力され、減
算器SB2は信号aから加算器AD1の出力を減じ
た値の出力を発生する。また、サンプルホールド
回路SH1,SH2の出力は、減算器SB1の正側
および負側と入力端子に接続される。同様に、サ
ンプルホールド回路SH3,SH4の出力は加算器
AD2に入力され、両者の加算値である加算器
AD2の出力は減算器SB4の負側入力端子に与え
られる。減算器SB4正側入力端子には信号bが
入力され、信号bから加算器AD4の出力を減じ
た値の出力が減算器SB4で得られる。また、サ
ンプルホールド回路SH3,SH4の出力は、それ
ぞれ減算器SB3の正側および負側入力端子に接
続される。 加算器AD1,AD2および減算器SB1,SB3
は演算増幅器により構成され、それらの利得をす
べて1/2に設定すると、各々の出力は次のように
なる。 加算器AD1の出力=(anax+anio)/2 減算器SB1の出力=(anax−anio)/2 加算器AD2の出力=(bnax+bnio)/2 減算器SB3の出力=(bnax−bnio)/2 すなわち、加算器AD1,AD2の出力は、そ
れぞれ信号a,bのゼロレベルOa、Obを表し、
減算器SB1,SB3の出力は、それぞれ信号a,
bの振幅A,Bを表すものとなる。 減算器SB2は、信号aからゼロレベルOaを減
じた、すなわちゼロレベル補正が行われた信号を
出力する。同様に、減算器SB4は、信号bにゼ
ロレベル補正が行われた信号を出力する。減算器
SB1,SB3の出力は割算器DV1に入力され、
その出力として振幅A,Bの比A/Bの信号が得
られる。減算器SB4の出力は乗算器MP1に与
れられ、さらに乗算器MP1には割算器DV1の
出力も与えられており、該乗算器MP1は、減算
器SB4の出力信号と割算器DV1の出力信号の積
に相当する信号を発生する。すなわち、乗算器
MP1の出力は、信号bにゼロレベル補正および
振幅補正が加えられた信号が現われる。したがつ
て、減算器SB2および乗算器MP1からはそれ
ぞれ次の信号a′,b′が出力される。 a′=Asin θ b′=Asin(θ−π/2) エンコーダ検出部からの信号a,bと補正後の
信号a′,b′をそれぞれ第5図に示す。 仮想信号発生部30 仮想信号発生部30は、補正部20の減算器
SB2の出力と乗算器MP1の出力とを入力とす
る加算器AD3、および乗算器MP1の出力が正
側入力端子に、減算器SB2の出力が負側入力端
子にそれぞれ与えられる減算器SB5を有する。
加算器AD3と減算器SB5は、利得が1/√2に
設定されており、したがつて、これらの出力は次
のようになる。 加算器AB3 c′=Asin(θ−π/4) 減算器SB5 d′=Asin(θ−3π/4) 内挿部40 内挿部40はアナログスイツチで構成される信
号切換器MPXを有し、この信号切換器MPXに減
算器SB2からの信号a′、乗算器MP1からの信号
b′、加算器AD3からの信号c′および減算器SB5
からの信号d′がそれぞれ入力される。さらに、内
挿部40には、減算器SB2からの信号を反転さ
せて反転信号′を発生する減算器SB6が設けら
れ、この減算器SB6の出力信号′も信号切換器
MPXに入力される。第6図に信号に信号切換
MPXへの入力信号a′,b′,c′,d′,′を示す。 信号切換器MPXの動作を制御するためにカウ
ンタCNTが設けられており、信号切換器MPX
は、カウンタCNTの出力信号に従つて、入力信
号a′,b′,c′,d′,′のうちから2つの信号を選
び信号X,Yとして出力する。カウンタCNTは
2ビツトのバイナリカウンタであり、制御部
CTLからのリセツト信号Rによりリセツトし、
また発振器OSCの出力信号を計数するように接
続されている。内挿読取を行なうにあたり、まず
制御部CTLからのリセツト信号Rが発生し、次
にこれを解除する。カウンタCNTは、制御部
CTLからリセツト信号Rが解除されたとき動作
を開始し、発振器OSCの信号をクロツクとして
計数する。これによる計数値は前記の走査回数に
対応する。第6図に示す信号のばあい、走査回数
nと信号X,Yとの関係は次表のとおりに信号が
選択されるよう信号切換器MPXが構成されてい
る。 n X Y 0 a′ c′ 1 c′ b′ 2 b′ d′ 3 d′ ′ カウンタCNTが計数を開始すると、その計数
の進行に伴つて信号X,Yの内容は上記の表にし
たがつて順次変化する。 信号Yは比較器CMP3に、信号Xは比較器
CMP4にそれぞれ入力され、比較器CMP3,
CMP4の出力はエクスクルーシブオア回路EOの
二つの入力端子にそれぞれ与えられる。比較器
CMP3,CMP4はその入力が正のときハイ、負
のときローレベルの出力を発生しエクスクルーシ
ブオア回路EOは、比較器CMP3,CMP4の出
力の一方がハイ、他方がローのときにハイレベル
出力を発生する。エクスクルーシブオア回路EO
のハイレベル信号は選択走査終了信号Eとしてカ
ウンタCNTと制御部CTLに入力される。すなわ
ち、カウンタCNTは、制御部CTLのリセツト信
号Rが解除されることで計数を開始し、信号切換
器MPXはカウントの進行に伴つて信号X,Yの
組合わせを前述の表のように順次切換えて出力す
る。そして信号X,Yのうち一方が正で他方が負
となつたところでエクスクルーシブオア回路EO
より選択の走査終了信号Eが発生し、これにより
カウンタCNTは計数を停止する。この状態のカ
ウンタCNTの計数値は制御部CTLに与えられ
る。また、比較器CMP3の出力は制御部CTLに
も入力される。 カウンタCNTは内挿区間の各々について一つ
づつ計数が進み、計数値が3になつたところで次
は0に戻る。本例においては5個の信号が用いら
れ、一周期が8個の内挿区間に分割されている。
カウンタCNTのカウントは信号a′の半周期ごと
に繰り返されるように形成されている。この関係
を第6図に走査回数nとして示す。次に、信号Y
の正負の関係をみると、信号a′が正の値をとる半
周期では、信号Yは常に負の値をとり、信号a′が
負のときには信号Yは正の値をとる。したがつ
て、カウンタCNTのカウント値と比較器CMP3
の出力から内挿区間番号Nを知ることができる。
たとえば、第6図の例において、測定点pではカ
ウンタCNTの出力は“1”であり、比較器CMP
3の出力はローであるから内挿区間番号Nは
“1”であると判別でき、測定点p′では、カウン
タCNTの出力は同様に“1”であるが、比較器
CMP3の出力がハイになるので、内挿区間Nは
“5”であると判別できる。 信号X,Yはそれぞれ減算器SB7の正側およ
び負側入力端子に与えられ、両信号の差が減算器
SB7から出力されて割算器DV2に与えられる。
また、信号Xは割算器DV2にも入力され、この
割算器DV2は信号Xを減算器SB7の出力で割つ
た値の信号X/(X−Y)を出力する。割算器
DV2の出力はAD変換器ADCに入力されデイジ
タル値に変換されて制御部CTLに与えられる。 制御部CTLの機能 制御部CTLは、エクスクルーシブオア回路EO
からハイレベル信号を受けたとき、前述のように
カウンタCNTの出力と比較器CMP3の出力とか
ら、測定点pnの含まれる内挿区間の番号NPを求
め、これにA/D変換器ADCからの信号XP
(XP−YP)を加算し、その値に係数αを乗ずるこ
とにより、信号a′の始点a0か測定点pまでの回転
角または移動量Lを求める。すなわち、第(2)式で
示した β={XP/(XP−YP)+NP}・α の演算結果を得る。次いで、制御部CTLは、こ
の演算結果にアツプダウンカウンタUDCからの
カウント値を加えて表示器DSPに表示する。 <他の実施例> 第7図は本発明の他の実施例を示すもので、第
3図と同一の構成には同一の符号を付して説明は
省略する。本例においては、内挿のための構成は
補正タイミング発生部50とデータ読取部60お
よび制御部CTL′とからなる。 補正タンミング発生部50 前例の補正部20におけると同様に配置された
パルス発生器POS1,POS2とアンドゲートA
1,A2,A3,A4を有する。 アンドゲートA1,A2,A3,A4の出力信
号はオアゲートORに入力されるほか、ラツチ回
路LTにも与えられている。各アンドゲートは前
述のごとく信号a,bのほぼ最大、あるいはほぼ
最小の位置でパルスを発生する。したがつて、オ
アゲートORの出力端子には、信号a,bのほぼ
最大、およびほぼ最小のすべての位置でパルスが
発生する。このオアゲートORの出力信号は、ラ
ツチ回路LTと制御部CTL′に供給される。ラツチ
回路LTにはオアゲートORの出力信号に応じて、
アンドゲートA1,A2,A3,A4のどのアン
ドゲートでパルスが発生したかということが記憶
される。制御部CTL′では、オアゲートORからの
信号を割込信号INTとして使用する。 データ読取部60 信号a,bを入力とする信号選択器MPX′と
AD変換器ADC、および記憶部RAMからなる。
この記憶部RAMは、制御部CTL′に含まれるラ
ンダムアクセスメモリと共用してもよい。 信号選択器MPX′は信号aまたは信号bを、制
御部CTL′からの信号MSにしたがいA/D変換
器ADCに供給する。A/D変換器ADCは制御部
CTL′からの信号SがハイになることによりA/
D変換動作を開始し、制御部CTL′に与える信号
AEをローレベルにする。A/D変換動作が終了
するとA/D変換器ADCは制御部CTL′に信号
AEをハイにして送る。記憶部RAMは制御部
CTLからのアドレス信号ADSと書込信号Wによ
り所定の場所にA/D変換ADCからのデータを
書込む。また、制御部からの読取信号RDによ
り、所定の場所の記憶内容を制御部CTL′にバス
信号BUSを通して送る。 制御部CTL′ 制御部CTL′の処理は、割込処理と演算処理に
大別することができる。 割込処理 オアゲートORからの割込信号INTが得られた
とき、次の動作を行う。 (i) 一時記憶 信号選択器MPX′が現在選択している内容を
一時的に内部に記憶する。 (ii) 割込要求の解読 ラツチ回路LTの内容により、割込要求の内
容が信号aの最大、最小信号bの最大、最小の
いずれかであるか(anax、anio、bnax、bnio)を
判別する。 (iii) 信号a,bの選択 割込要求の解読の結果がanaxanioの場合、信
号選択器MPX′を信号aに選択にセツトし、逆
にbnax、bnioの場合、信号選択器MPX′を信号
b選択にセツトする。 (iv) 記憶部への書込み 信号Sをまずローにし、続いてハイにする。
そして信号AEがハイになるのを待つ。また、
割込要求の解読にしたがつて、anax、anio
bnax、bnioのいずれかに対応する記憶部RAM
のアドレスを、アドレス信号ADSを通して記
憶部RAMに送る。そして、信号AEがハイと
なると、記憶部RAMへ書込信号Wを使用して
ハイのパルスを送り、A/D変換器の出力デー
タを記憶部RAMに書込む。そして信号sをロ
ーにしてA/D変換器をリセツトさせる。 (v) 割込処理に入つた時の、一時的に記憶した内
容にしたがい、信号選択器MPX′をもとへもど
す。さらに信号sをハイにしてA/D変換器を
動作させる。すなわち、割込処理に移る前に
A/D変換器が動作していたと想定して、もと
へもどす意味でこの動作を行う。 割込信号INTはbnio、anax、bnax、anio、の順
で、順次発生する。従つて、上記の割込処理に
より、記憶部の所定の場所にanax、anio、bnax
bnioのデータが書込まれる。 演算処理 演算処理中には、次の動作が繰り返される。た
だし、演算処理中に割込信号INTが発生すると、
割込処理へ移り、割込処理が御わるともとへもど
る。 (i) 信号aの測定 信号MSを用い信号選択器MPX′を信号a選
択にセツトする。 次に信号sをローからハイにし、A/D変換
器を動作させ、信号AEがハイになるのを待つ。
信号AEがハイになると、信号ADS,Wを使用
して記憶部RAMの所定の場所にA/D変換器
の出力データ(信号aのデータ)を書込む。 (ii) 信号bの測定 信号MSを用い信号選択器MPX′を信号b選
択にセツトする。“信号aの測定”と同様にし
て、記憶部の所定の場所に信号bのデータを書
込む。 (iii) データ転送 記憶部RAMへanaxのアドレスを信号ADSを
通して送り、また信号RDをハイにいしてanax
のデータを制御部内CTL′のRAMに移す。同
様にして、anio、bnax、bnio、a、bのデータ
を制御部内CTL′内のRAMに移す。 (iv) 補正演算 信号aのゼロレベルOa、振幅Aと、信号b
のゼロレベルOb、振幅Bとを式(8)、(9)、(10)、
(11)に従い演算する。次に補正された信号のデー
タa′,b′の次式により求める。 a′=(a−Oa) b′=A/B(b−Ob) ここでOa,A,Ob,B,a′,b′は必要により
制御部CTL′内のRAMに記憶するものとし、
特に明記しない。以下他のデータに関しても同
様とする。 (v) 仮想信号作成 仮想信号c′,d′を次式により求める。 (vi) 測定点pを含む内挿区間NPの演算信号a′の
反転信号′を′=O−a′から求める。信号
XP,YPとしてのデータを順次に次の組合せに
従い、データa′,b′,c′,d′,′から得て、一
方が正で他方が負であるかを調べる。また同時
にそれに対応する値を走査回数nに入れる。 XP YP n a′ c′ 0 c′ b′ 1 b′ d′ 2 d′ ′ 3 正で他方が負になつたとき、この動作を終了
させる。そして信号YPが正か負かを判定し、
負ならNP=n、正なら NP=n+NM/2としてNPを求める。ただし、こ の実施例においてはNM=8である。 (vii) 内挿の演算 式(2)にしたがい基準点a0に対する測定位置p
の回転角または移動量βを求める。 (viii) アツプダウンカウンタUDCから得られる回
転角または移動量とβを合成して表示する。
[Formula] i'=Asin(θ-3/4π)...(7) is obtained. These waveforms are shown in FIG. By using such a virtual signal, one period of the signal can be divided into even smaller interpolation intervals, and the accuracy of interpolation can be improved by using only the signal portion with high linear accuracy. <Correction of amplitude and zero level> As already mentioned, interpolation is performed by detecting two signal levels, and it is important that the zero level of the two signals and the relationship between their amplitudes are always constant. be. However, in the two signals obtained from the actual encoder detection section, there are changes in the zero level due to changes in light intensity of the light emitting diode and changes in temperature, that is, drift, and changes in amplitude due to changes in the distance between the movable plate and the stator plate. It is usually accompanied by zero level changes and amplitude changes due to pattern non-uniformity. Therefore, if linear interpolation reading is performed using the signal obtained from the encoder detection section, there is a possibility that highly accurate results cannot be obtained due to the effects of these zero level changes and amplitude changes. Therefore, in order to obtain highly accurate measurement results, it is necessary to correct the signal amplitude and zero level. The two signals obtained from the encoder detection section are
Both have waveforms close to sine waves, and the phases are mutually
Although they differ by 90 degrees, if the two signals have this relationship, when one signal has a zero value, the other signal will take the maximum or minimum value, or extreme value, and each signal will have a zero value. The maximum rate of change is shown near the value, and the minimum rate of change is shown near the extreme value. If we pay attention to such points, it becomes possible to obtain the extreme value of each signal by using each other's signals. To explain in more detail, for example in Fig. 2,
Signals a and b both have sinusoidal waveforms, and signal b is delayed in phase by 90° with respect to signal a. and,
At the zero-crossing point a0 of the signal a, the signal b has a minimum value, and at the zero-crossing point a1 , the signal b has a maximum value. Similarly, at the zero crossing points b 0 and b 1 of signal b, signal a takes the maximum value and minimum value, respectively. Therefore, the zero-crossing point of one signal may be detected, and the value of the other signal at that time may be considered as the extreme value of that signal. In this case, the influence of the zero level fluctuation of the signal is involved, but the rate of change of the signal is at its minimum near the extreme value, so the error is extremely small. The extreme values of signals a and b shown in equation (3) are
Let a nax , a nio , b nax , b nio be the amplitude A of signal a
and zero level O a are expressed as A=a nax −a nio /2 ...(8) O a = a nax + a nio /2 ...(9) and amplitude B of signal b and zero level O b
is expressed as: B = b nax - b nio /2 ... (10) O b = b nax + b nio /2 ... (11). Therefore, the zero level correction is
This can be done by subtracting O a from signal a and O b from signal b. To correct the amplitude balance of the two signals, one of the two signals is corrected to zero level from the ratio of A and B. That is, the correction is performed by multiplying the signal (b-O b ) by A/B or by multiplying the signal (a-O a ) by B/A. The equation of this correction relationship is Or becomes. The zero level of the two signals a′ and b′ corrected in this way becomes true zero, and the amplitudes of both A and B
It will be one of the following. Therefore, two signals with zero level changes and amplitude balance changes are
After correction, there is no change in the zero level, and the relationship between the amplitudes of both signals is always kept constant. <Specific Configuration> Overall Configuration FIG. 3 shows an example of a control circuit embodying the present invention. The illustrated control circuit includes the measuring section 1
0, a correction section 20, a virtual signal generation section 30, and an interpolation section 40. Measuring unit 10 The measuring unit 10 is a comparator CMP that receives signal a as input.
1 and a comparator CMP2 that inputs signal b.
As shown in FIG. 5, these comparators CMP1 and CMP2 convert their respective input signals into rectangular waves having a rising or falling edge at the zero crossing point of the signal. The outputs of the comparators CMP1 and CMP2 are given to the direction discriminator RL. The direction discriminator RL discriminates whether the moving direction or rotation direction of the encoder is rightward or leftward from the phase relationship of the rectangular wave signals from comparators CMP1 and CMP2. For example, if it is rightward, If the direction is to the left, an output pulse is generated to the output terminal DN. The output of the direction discriminator RL is the comparator
It is in the form of a pulse corresponding to one of the rectangular waves that are the outputs of CMP1 and CMP2, for example, the rectangular wave whose phase is advanced, and this output is the up-down counter.
The pulses are input to the UDC and the number of pulses is counted. This count allows the amount of movement of the encoder to be measured. The output of the up-down counter UDC is given to the control unit CTL, and the control unit CTL converts the output of the counter UDC into a rotation angle or a direct movement amount, and combines this with the calculation result by interpolation reading described later.
Display on DSP. Correction Unit 20 The correction unit 20 includes sample-and-hold circuits SH1 and SH2 that receive the signal a, and sample-and-hold circuits SH3 and SH4 that receive the signal b. Furthermore, a pulse generator POS1 that receives the output of the comparator CMP1 of the measuring section 10 and a POS2 that receives the output of the comparator CMP2 are provided. This pulse generator has an exclusive OR circuit 21 as shown in FIG. A comparator output is connected to via a resistor 22, and the connection between this resistor 22 and the input terminal of the exclusive OR circuit 21 is grounded via a capacitor 23. These pulse generators POS1, POS2 are connected to comparators CMP1,
Generates a pulse output that rises at the rising and falling points of the CMP2 output. That is, the pulse generator POS1 generates a pulse at the zero-crossing point of the signal a, and the pulse generator POS2 generates a pulse at the zero-crossing point of the signal b. The output of the pulse generator POS2 is connected to one input terminal of each of two AND gates A1 and A2. The other input terminal of AND gate A1 is a comparator
The other input terminal of AND gate A2 is connected to the output of CMP1, and the other input terminal of AND gate A2 is connected to the output of CMP1.
Connected to the output of CMP1. Therefore, as shown in FIG. 5, the AND gate A1 outputs an output when the signal b is at the zero cross point, that is, when the signal a has an extreme value, and when the signal a takes a positive value. occurs. In other words, AND gate A1 produces an output when signal a takes its maximum value. Similarly, AND gate A2 produces an output when signal b takes its minimum value (FIG. 5).
The outputs of these AND gates A1 and A2 are input to sample and hold circuits SH1 and SH2, respectively. Similarly, the output of pulse generator POS1 is
It is connected to one input terminal of each of two AND gates A3 and A4, and the other input terminal of AND gate A3 is connected directly to the output terminal of AND gate A4 via inverter I2. are connected to each. And gate A3
and gate A4 generates an output when signal b is at its minimum value (5th
figure). And the outputs of AND gates A3 and A4 are
The signals are input to sample and hold circuits SH3 and SH4, respectively (FIG. 5). The sample and hold circuit SH1 samples the signal a when receiving a pulse from the AND gate A1, and holds the sampled signal as it is during a period when no pulse is input. Therefore, the sample and hold circuit SH1 outputs approximately the maximum value of the signal a, that is, the signal a nax . Similarly, the sample-and-hold circuit SH2 outputs a signal that is approximately the minimum value of the signal a.
a nio , sample and hold circuits SH3 and SH4 detect b nax , which is approximately the maximum value and approximately the minimum value of signal b,
b Output each nio . The maximum and minimum values of a signal sampled in this way differ from the true maximum and minimum values, as they are affected by zero-level fluctuations in the signal, but as mentioned earlier, near the extreme values Since the rate of change in signal level is very small, the error is minute. Therefore, in the following discussion, this sampled signal will be treated as a maximum or minimum value. The outputs of the sample and hold circuits SH1 and SH2 are respectively connected to two input terminals of an adder AD1, and the output of the adder AD1, which is the sum of both, is given to the negative input terminal of a subtracter SB2. subtractor
A signal a is input to the positive input terminal of SB2, and the subtracter SB2 generates an output value obtained by subtracting the output of the adder AD1 from the signal a. Furthermore, the outputs of the sample and hold circuits SH1 and SH2 are connected to the positive and negative sides and input terminals of the subtracter SB1. Similarly, the outputs of sample and hold circuits SH3 and SH4 are output to the adder.
Adder that is input to AD2 and is the added value of both
The output of AD2 is given to the negative input terminal of subtracter SB4. The signal b is input to the positive input terminal of the subtracter SB4, and the output of the value obtained by subtracting the output of the adder AD4 from the signal b is obtained by the subtracter SB4. Further, the outputs of the sample and hold circuits SH3 and SH4 are respectively connected to the positive side and negative side input terminals of the subtracter SB3. Adders AD1, AD2 and subtracters SB1, SB3
is composed of operational amplifiers, and if all their gains are set to 1/2, the output of each is as follows. Output of adder AD1 = (a nax + a nio )/2 Output of subtracter SB1 = (a naxa nio )/2 Output of adder AD2 = (b nax + b nio )/2 Output of subtracter SB3 = ( b nax −b nio )/2 That is, the outputs of adders AD1 and AD2 represent the zero levels O a and O b of signals a and b , respectively,
The outputs of subtracters SB1 and SB3 are signals a and
It represents the amplitudes A and B of b. The subtracter SB2 outputs a signal obtained by subtracting the zero level O a from the signal a, that is, a signal subjected to zero level correction. Similarly, the subtracter SB4 outputs a signal obtained by performing zero level correction on the signal b. subtractor
The outputs of SB1 and SB3 are input to the divider DV1,
As its output, a signal with the ratio A/B of amplitudes A and B is obtained. The output of the subtracter SB4 is given to the multiplier MP1, and the output of the divider DV1 is also given to the multiplier MP1. Generates a signal corresponding to the product of the output signals. i.e. the multiplier
The output of MP1 is a signal obtained by adding zero level correction and amplitude correction to signal b. Therefore, the following signals a' and b' are output from the subtracter SB2 and the multiplier MP1, respectively. a'=Asin θ b'=Asin (θ-π/2) Signals a and b from the encoder detection section and signals a' and b' after correction are shown in FIG. 5, respectively. Virtual signal generation section 30 The virtual signal generation section 30 is a subtracter of the correction section 20.
It has an adder AD3 whose inputs are the output of SB2 and the output of multiplier MP1, and a subtracter SB5 whose positive input terminal is supplied with the output of multiplier MP1, and whose negative input terminal is supplied with the output of subtractor SB2. .
The adder AD3 and the subtracter SB5 have a gain set to 1/√2, so their outputs are as follows. Adder AB3 c' = Asin (θ-π/4) Subtractor SB5 d' = Asin (θ-3π/4) Interpolation section 40 The interpolation section 40 has a signal switch MPX consisting of an analog switch. , the signal a' from the subtracter SB2 and the signal from the multiplier MP1 are sent to this signal switch MPX.
b', signal c' from adder AD3 and subtracter SB5
The signals d' from the respective terminals are inputted. Furthermore, the interpolation unit 40 is provided with a subtracter SB6 that inverts the signal from the subtracter SB2 to generate an inverted signal', and the output signal' of this subtracter SB6 is also connected to a signal switch.
Input to MPX. Figure 6 shows signal switching
Input signals a′, b′, c′, d′, and ′ to MPX are shown. A counter CNT is provided to control the operation of the signal switch MPX.
selects two signals from the input signals a', b', c', d', and outputs them as signals X and Y according to the output signal of the counter CNT. Counter CNT is a 2-bit binary counter, and the control unit
Reset by reset signal R from CTL,
It is also connected to count the output signal of the oscillator OSC. When performing interpolation reading, a reset signal R is first generated from the control unit CTL, and then this is released. Counter CNT is the control unit
It starts operating when the reset signal R is released from CTL, and counts using the signal from the oscillator OSC as the clock. The resulting count value corresponds to the number of scans described above. In the case of the signals shown in FIG. 6, the signal switch MPX is configured so that the relationship between the number of scans n and the signals X and Y is as shown in the following table. n X Y 0 a'c' 1 c'b' 2 b'd' 3 d'' When counter CNT starts counting, as the counting progresses, the contents of signals It changes sequentially. Signal Y goes to comparator CMP3, signal X goes to comparator
are input to CMP4, comparators CMP3,
The output of CMP4 is given to two input terminals of exclusive OR circuit EO. comparator
CMP3 and CMP4 generate a high level output when the input is positive and a low level output when the input is negative, and the exclusive OR circuit EO generates a high level output when one of the outputs of the comparators CMP3 and CMP4 is high and the other is low. Occur. Exclusive OR circuit EO
The high level signal is inputted as the selection scan end signal E to the counter CNT and the control unit CTL. That is, the counter CNT starts counting when the reset signal R of the control unit CTL is released, and as the count progresses, the signal switch MPX sequentially changes the combination of signals X and Y as shown in the table above. Switch and output. Then, when one of the signals X and Y becomes positive and the other becomes negative, the exclusive OR circuit EO
A selected scan end signal E is generated, and the counter CNT stops counting. The count value of the counter CNT in this state is given to the control unit CTL. Further, the output of the comparator CMP3 is also input to the control unit CTL. The counter CNT counts one by one for each interpolation interval, and returns to 0 when the count reaches 3. In this example, five signals are used, and one period is divided into eight interpolation intervals.
The count of the counter CNT is configured to be repeated every half period of the signal a'. This relationship is shown in FIG. 6 as the number of scans n. Next, signal Y
Looking at the relationship between the positive and negative values, the signal Y always takes a negative value during the half cycle in which the signal a' takes a positive value, and when the signal a' takes a negative value, the signal Y takes a positive value. Therefore, the count value of counter CNT and comparator CMP3
The interpolation interval number N can be known from the output of .
For example, in the example shown in Fig. 6, the output of the counter CNT is "1" at the measurement point p, and the output of the comparator CMP is "1".
Since the output of counter CNT is low, it can be determined that the interpolation interval number N is "1", and at the measurement point p', the output of the counter CNT is also "1", but the output of the comparator
Since the output of CMP3 becomes high, it can be determined that the interpolation interval N is "5". Signals X and Y are applied to the positive and negative input terminals of subtracter SB7, respectively, and the difference between the two signals is applied to the subtracter SB7.
It is output from SB7 and given to divider DV2.
The signal X is also input to the divider DV2, which divides the signal X by the output of the subtracter SB7 and outputs a signal X/(X-Y). divider
The output of DV2 is input to the AD converter ADC, converted into a digital value, and given to the control unit CTL. Function of the control unit CTL The control unit CTL is an exclusive OR circuit EO
When a high level signal is received from the counter CNT and the output of the comparator CMP3 as described above, the number N P of the interpolation interval including the measurement point pn is calculated, and then the A/D converter ADC Signal from X P /
By adding (X P −Y P ) and multiplying that value by a coefficient α, the rotation angle or movement amount L from the starting point a 0 of the signal a′ to the measuring point p is determined. That is, the calculation result of β={X P /(X P −Y P )+ NP }·α shown in equation (2) is obtained. Next, the control unit CTL adds the count value from the up-down counter UDC to this calculation result and displays the result on the display DSP. <Other Embodiments> FIG. 7 shows another embodiment of the present invention, and the same components as those in FIG. 3 are given the same reference numerals and their explanations will be omitted. In this example, the configuration for interpolation consists of a correction timing generating section 50, a data reading section 60, and a control section CTL'. Correction tanning generation section 50 Pulse generators POS1, POS2 and AND gate A arranged in the same manner as in the correction section 20 of the previous example
1, A2, A3, and A4. The output signals of the AND gates A1, A2, A3, and A4 are input to the OR gate OR, and are also applied to the latch circuit LT. As described above, each AND gate generates a pulse at approximately the maximum or minimum position of the signals a and b. Therefore, pulses are generated at the output terminal of the OR gate OR at almost all the maximum and minimum positions of the signals a and b. The output signal of this OR gate OR is supplied to the latch circuit LT and the control section CTL'. In the latch circuit LT, depending on the output signal of the OR gate,
It is stored which AND gate among AND gates A1, A2, A3, and A4 generates a pulse. The control unit CTL' uses the signal from the OR gate OR as the interrupt signal INT. Data reading section 60 Signal selector MPX' which receives signals a and b as input
Consists of an AD converter ADC and a storage RAM.
This storage RAM may be shared with the random access memory included in the control unit CTL'. The signal selector MPX' supplies the signal a or the signal b to the A/D converter ADC according to the signal MS from the control unit CTL'. A/D converter ADC is the control section
When the signal S from CTL' goes high, A/
Signal to start D conversion operation and give to control unit CTL'
Set AE to low level. When the A/D conversion operation is completed, the A/D converter ADC sends a signal to the control unit CTL'.
Set AE to high and send. The storage RAM is the control unit
The data from the A/D conversion ADC is written to a predetermined location using the address signal ADS from the CTL and the write signal W. Furthermore, in response to the read signal RD from the control section, the contents stored at a predetermined location are sent to the control section CTL' via the bus signal BUS. Control Unit CTL' The processing of the control unit CTL' can be roughly divided into interrupt processing and arithmetic processing. Interrupt processing When the interrupt signal INT is obtained from the OR gate, perform the following operations. (i) Temporary storage The contents currently selected by the signal selector MPX' are temporarily stored internally. (ii) Deciphering the interrupt request Depending on the contents of the latch circuit LT, whether the contents of the interrupt request are the maximum or minimum of the signal a, the maximum or the minimum of the signal b (a nax , a nio , b nax , b nio ). (iii) Selection of signals a and b If the result of decoding the interrupt request is a nax a nio , the signal selector MPX' is set to select signal a, and conversely, if b nax or b nio , the signal is selected. MPX' is set to select signal b. (iv) Writing to the storage unit First set the signal S to low, then set it to high.
Then wait for signal AE to go high. Also,
According to the deciphering of the interrupt request, a nax , a nio ,
Storage RAM corresponding to either b nax or b nio
The address is sent to the storage RAM through the address signal ADS. Then, when the signal AE becomes high, a high pulse is sent to the storage RAM using the write signal W, and the output data of the A/D converter is written into the storage RAM. Then, the signal s is set low to reset the A/D converter. (v) Return the signal selector MPX' to its original state according to the temporarily stored contents when entering the interrupt process. Furthermore, the signal s is made high to operate the A/D converter. That is, assuming that the A/D converter was operating before proceeding to the interrupt processing, this operation is performed to return it to its original state. The interrupt signal INT is generated sequentially in the order of bnio , anax , bnax , and anio . Therefore, by the above interrupt processing, a nax , a nio , b nax , and
b nio data is written. Arithmetic Processing During arithmetic processing, the following operations are repeated. However, if the interrupt signal INT occurs during calculation processing,
The process moves to interrupt processing, and returns to the beginning when the interrupt processing is completed. (i) Measurement of signal a Set the signal selector MPX' to select signal a using signal MS. Next, the signal s is changed from low to high, the A/D converter is operated, and the signal AE is waited for to go high.
When the signal AE goes high, the signals ADS and W are used to write the output data of the A/D converter (data of the signal a) to a predetermined location in the storage RAM. (ii) Measurement of signal b Set the signal selector MPX' to select signal b using signal MS. In the same manner as in "Measurement of signal a", data of signal b is written to a predetermined location in the storage section. (iii) Data transfer Send the address of a nax to the storage RAM through the signal ADS, and set the signal RD high to send the address of a nax to the storage RAM.
The data is transferred to the RAM of CTL′ in the control section. Similarly, the data of anio , bnax , bnio , a, and b are transferred to the RAM in CTL' in the control section. (iv) Correction calculation Zero level O a of signal a , amplitude A, and signal b
The zero level O b and amplitude B of are expressed as (8), (9), (10),
Calculate according to (11). Next, the corrected signal data a' and b' are obtained using the following equation. a'=(a-O a ) b'=A/B(b-O b ) Here, O a , A, O b , B, a', b' are stored in the RAM in the control unit CTL' as necessary. shall
Not specified. The same applies to other data below. (v) Virtual signal creation Virtual signals c′ and d′ are obtained using the following equations. (vi) Find the inverted signal ' of the calculation signal a' in the interpolation interval N P including the measurement point p from '=O-a'. signal
Data as X P and Y P are sequentially obtained from data a', b', c', d', and ' according to the following combinations, and it is checked whether one is positive and the other is negative. At the same time, the corresponding value is entered into the number of scans n. X P Y P n a'c' 0 c'b' 1 b'd' 2 d'' 3 When one becomes positive and the other becomes negative, this operation ends. Then, determine whether the signal Y P is positive or negative,
N P is determined by setting N P =n if negative, and N P =n+N M /2 if positive. However, in this example, N M =8. (vii) Interpolation calculation Measurement position p with respect to reference point a 0 according to equation (2)
Find the rotation angle or movement amount β. (viii) The rotation angle or movement amount obtained from the up-down counter UDC and β are combined and displayed.

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

第1図は本発明の内挿の原理を説明するための
波形図、第2図は仮想信号の作成例を示す波形
図、第3図は本発明を適用したエンコーダ読取信
号の処理回路を示すブロツク図、第4図は第3図
の回路に用いられるパルス発生器の一例を示す回
路図、第5図はエンコーダ読取信号の振幅および
ゼロレベル補正を示す波形図、第6図は仮想信号
をエンコーダ読取信号および反転信号とともに示
す波形図、第7図は他の実施例による処理回路の
ブロツク図である。 10……測定部、20……補正部、30……仮
想信号発生部、40……内挿部、CTL……制御
部、DSP……表示部、CMP1,CMP2,CMP
3,CMP4……比較器、POS1,POS2……パ
ルス発生器、A1,A2,A3,A4……アンド
ゲート、SB1,SB2,SB3,SB4,SB5,
SB6,SB7……減算器、CNT……カウンタ。
Fig. 1 is a waveform diagram for explaining the principle of interpolation of the present invention, Fig. 2 is a waveform diagram showing an example of creating a virtual signal, and Fig. 3 is a processing circuit for encoder read signals to which the present invention is applied. 4 is a circuit diagram showing an example of the pulse generator used in the circuit of FIG. 3, FIG. 5 is a waveform diagram showing the amplitude and zero level correction of the encoder read signal, and FIG. 6 is a diagram showing the virtual signal. The waveform diagram shown together with the encoder read signal and the inverted signal, and FIG. 7 is a block diagram of a processing circuit according to another embodiment. 10...Measurement unit, 20...Correction unit, 30...Virtual signal generation unit, 40...Interpolation unit, CTL...Control unit, DSP...Display unit, CMP1, CMP2, CMP
3, CMP4...Comparator, POS1, POS2...Pulse generator, A1, A2, A3, A4...And gate, SB1, SB2, SB3, SB4, SB5,
SB6, SB7...Subtractor, CNT...Counter.

Claims (1)

【特許請求の範囲】 1 位置変化に応じてエンコーダ検出部から得ら
れる、互いに位相の異る複数の周期的波形信号に
より移動位置を検出するエンコーダの読取信号の
内挿方法において、 前記周期的波形信号の一つを基準信号として選
び、前記周期的波形信号の各々の値がゼロとなる
点によつて前記基準信号の一周期を複数の内挿区
間に分割するとともに、各内挿区間で同方向にな
るべき2つの信号を対とし、この対なる2つの信
号の正負状態を検出することにより前記基準信号
の一周期の始点から前記測定点を含む内挿区間ま
での内挿区間数NPを判別し、前記測定点におけ
る上記同方向に変化する2つの信号の値XP、YP
と、前記内挿区間をエンコーダの位置変化量で示
される量αと前記基準信号の一周期の始点から前
記測定点の位置を、 式B=〔{XP/(XP−YP)}+NP〕・α に基づく演算を行なつて求めることを特徴とする
エンコーダ読取信号の内挿方法。 2 前記第1項の内挿方法において、前記周期的
波形信号の少なくとも1つから反転信号を形成
し、前記周期的波形信号と前記反転信号とにより
測定点の位置を求めるエンコーダ読取信号の内挿
方法。 3 前記第1項の内挿方法において、位相が互い
に異なる少なくとも2つの周期的信号の合成によ
る仮想信号を形成し、前記周期的波形信号と仮想
信号とにより測定点の位置を求めるエンコーダ読
取信号の内挿方法。 4 位相が互いに90°異なる、2つの周期的に変
動するエンコーダ読取信号をもとに移動位置を検
出するエンコーダ読取信号の内挿装置において、 前記2つの信号のうちの少なくとも一方の信号
を基準信号とし該基準信号に対し180°位相の異な
る信号を得る信号形成手段と、前記信号の各々が
ゼロになる点によつて前記信号の一周期を分割し
た複数の内挿区間のうちの測定点を含む内挿区間
において一方が正で一方が負でありかつほぼ同一
方向に変化する2つの信号のうちの一方の信号の
値から他方の信号の値を減じて減算信号を発生す
る減算手段と、前記一方の信号の値を前記減算信
号で割り除算信号を発生する除算手段と、前記除
算信号にあらかじめ定められた係数を掛けて内挿
結果を得る乗算手段とからなることを特徴とする
エンコーダ読取信号の内挿装置。 5 前記第4項の内挿装置において、前記周期的
に変動する2つの信号の合成により仮想信号を形
成するための仮想信号形成手段を有し、周期的に
変動する前記信号と前記仮想信号とにより測定点
の位置を求めることを特徴とするエンコーダ読取
信号の内挿装置。
[Scope of Claims] 1. An encoder read signal interpolation method for detecting a moving position using a plurality of periodic waveform signals having mutually different phases obtained from an encoder detection unit in response to a change in position, comprising the steps of: One of the signals is selected as a reference signal, one period of the reference signal is divided into a plurality of interpolation intervals according to the points at which each value of the periodic waveform signal becomes zero, and the same period is divided into a plurality of interpolation intervals in each interpolation interval. The number of interpolation intervals N P from the start point of one cycle of the reference signal to the interpolation interval including the measurement point is determined by pairing two signals that should be in the same direction and detecting the positive and negative states of the two signals in the pair. The values of the two signals changing in the same direction at the measurement point X P , Y P
and the position of the measurement point from the start point of one cycle of the reference signal to the amount α indicated by the amount of change in the position of the encoder in the interpolation interval, Formula B = [{X P / (X P − Y P )} An interpolation method for an encoder read signal, characterized in that the interpolation method is obtained by performing calculations based on +N P ]・α. 2. In the interpolation method of item 1, an inverted signal is formed from at least one of the periodic waveform signals, and the position of the measurement point is determined by the periodic waveform signal and the inverted signal. Interpolation of the encoder read signal Method. 3. In the interpolation method of item 1 above, a virtual signal is formed by combining at least two periodic signals having different phases, and the position of the measurement point is determined using the periodic waveform signal and the virtual signal. Interpolation method. 4. In an encoder read signal interpolation device that detects a movement position based on two periodically fluctuating encoder read signals whose phases differ by 90 degrees from each other, at least one of the two signals is used as a reference signal. and a signal forming means for obtaining a signal having a phase difference of 180° with respect to the reference signal, and measuring points of a plurality of interpolation intervals in which one period of the signal is divided by points at which each of the signals becomes zero. subtracting means for generating a subtraction signal by subtracting the value of one signal from the value of the other signal among two signals, one of which is positive and one of which is negative and which changes in substantially the same direction in the interpolation interval including; An encoder reader comprising: a dividing means for dividing the value of one of the signals by the subtraction signal to generate a division signal; and a multiplication means for multiplying the divided signal by a predetermined coefficient to obtain an interpolation result. Signal interpolator. 5. The interpolation device according to item 4, further comprising a virtual signal forming means for forming a virtual signal by combining the two periodically fluctuating signals, and combining the periodically fluctuating signal and the virtual signal. An interpolation device for encoder read signals, characterized in that the position of a measurement point is determined by:
JP1276484A 1984-01-26 1984-01-26 Method and device for interpolating encoder read signal Granted JPS60157014A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1276484A JPS60157014A (en) 1984-01-26 1984-01-26 Method and device for interpolating encoder read signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1276484A JPS60157014A (en) 1984-01-26 1984-01-26 Method and device for interpolating encoder read signal

Publications (2)

Publication Number Publication Date
JPS60157014A JPS60157014A (en) 1985-08-17
JPH0524445B2 true JPH0524445B2 (en) 1993-04-07

Family

ID=11814464

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1276484A Granted JPS60157014A (en) 1984-01-26 1984-01-26 Method and device for interpolating encoder read signal

Country Status (1)

Country Link
JP (1) JPS60157014A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102015219272A1 (en) 2014-10-08 2016-04-14 Kabushiki Kaisha Topcon Method for interpolating a read signal of an incremental encoder

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61110005A (en) * 1984-11-05 1986-05-28 Fanuc Ltd Method and apparatus for detecting position
JPS61110006A (en) * 1984-11-05 1986-05-28 Fanuc Ltd Position detector
JPS63263418A (en) * 1987-04-22 1988-10-31 Kayaba Ind Co Ltd Processing system for position detection signal
JPH0617802B2 (en) * 1987-12-21 1994-03-09 オ−クマ株式会社 Encoder interpolation circuit
WO2006070826A1 (en) * 2004-12-28 2006-07-06 Asahi Kasei Emd Corporation Magnetic type rotation angle sensor and angle information processing device
JP6640541B2 (en) 2015-12-02 2020-02-05 株式会社トプコン Laser scanner
JP6767107B2 (en) 2015-12-07 2020-10-14 株式会社トプコン Angle detector and surveying device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5068362A (en) * 1973-10-20 1975-06-07

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5068362A (en) * 1973-10-20 1975-06-07

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102015219272A1 (en) 2014-10-08 2016-04-14 Kabushiki Kaisha Topcon Method for interpolating a read signal of an incremental encoder

Also Published As

Publication number Publication date
JPS60157014A (en) 1985-08-17

Similar Documents

Publication Publication Date Title
JP3015747B2 (en) Encoder interpolation circuit
JPH08145719A (en) Method for detecting position or angle
US5243537A (en) Method and apparatus for rapid measurement of AC waveform parameters
JP3220411B2 (en) Interpolation circuit of encoder
JPH0141923B2 (en)
GB2179515A (en) Shaft angle encoder
JPH0524445B2 (en)
JP4953714B2 (en) Encoder output interpolation method and interpolation circuit
JPH0794988B2 (en) Position measuring device with division circuit
JP2000329505A (en) Method and apparatus for generating position detection data
RU2659468C1 (en) Following sine and cosine angle-to-code converter
US6496783B1 (en) Electric power calculation system
JPS61110006A (en) Position detector
JP3365913B2 (en) Position detection device
JPS61110005A (en) Method and apparatus for detecting position
JPS60157013A (en) Method and device for correcting encoder read signal
RU2692965C1 (en) Quadrature signals phase recording method
JPH0712510A (en) Phase difference measuring device for heterodyne interferometer
US5287166A (en) Displacement meter with stared displacement values
JPH0617802B2 (en) Encoder interpolation circuit
JP3047946B2 (en) Angular position signal generator for sine and cosine signals
JPH02186221A (en) Interpolation apparatus of encoder
SU1651229A1 (en) Digital phase meter
RU1812521C (en) Digital phase meter
JPH0650254B2 (en) Measuring device and servo control device using the measuring device