JPH063378B2 - Encoder output interpolation circuit - Google Patents

Encoder output interpolation circuit

Info

Publication number
JPH063378B2
JPH063378B2 JP59252396A JP25239684A JPH063378B2 JP H063378 B2 JPH063378 B2 JP H063378B2 JP 59252396 A JP59252396 A JP 59252396A JP 25239684 A JP25239684 A JP 25239684A JP H063378 B2 JPH063378 B2 JP H063378B2
Authority
JP
Japan
Prior art keywords
signal
phase
output
interpolation
rom
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
JP59252396A
Other languages
Japanese (ja)
Other versions
JPS61131011A (en
Inventor
正 秋田
和雄 浅川
信彦 恩田
徹 鎌田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP59252396A priority Critical patent/JPH063378B2/en
Publication of JPS61131011A publication Critical patent/JPS61131011A/en
Publication of JPH063378B2 publication Critical patent/JPH063378B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/19Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by positioning or contouring control systems, e.g. to control position from one programmed point to another or to control movement along a programmed continuous path
    • G05B19/21Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by positioning or contouring control systems, e.g. to control position from one programmed point to another or to control movement along a programmed continuous path using an incremental digital measuring device

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はインクリメンタル形エンコーダにより位置又は
回転角を検知する場合において、その検知情報の量子化
誤差を電子回路的処理により小さくするようにしたディ
ジタル形のエンコーダ出力補間回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial field of application] The present invention, when detecting a position or a rotation angle by an incremental encoder, digitalizes a quantization error of the detected information by electronic circuit processing. Type encoder output interpolation circuit.

モータや、該モータに駆動される物体の位置及び速度を
検出する場合ロータリエンコーダあるいはリニアエンコ
ーダ等が使用されている。
A rotary encoder, a linear encoder, or the like is used to detect the position and speed of a motor or an object driven by the motor.

例えば、ロータリエンコーダはモータの回転に応じて互
いにπ/2の位相差を有するA相、B相の正弦波信号を発
生するもので、その周波数はモータの回転速度に比例し
ている。そしてこれらA相、B相の正弦波信号から位置
(変位)信号、速度信号が、例えば第8図に示す如くし
て検出される。
For example, a rotary encoder generates A-phase and B-phase sine wave signals having a phase difference of π / 2 depending on the rotation of the motor, and the frequency thereof is proportional to the rotation speed of the motor. Then, a position (displacement) signal and a velocity signal are detected from these A-phase and B-phase sine wave signals, for example, as shown in FIG.

第8図において、Mはモータ、REはロータリエンコー
ダ、PGは第11図に示す如く、A相、B相の2相の正
弦波信号が零ボルトを横切るときにパルスを発生するパ
ルス発生器、PDは位相検出器でA相信号が進んでいる
とき加算信号ADを、遅れていれば減算信号SBをアッ
プ・ダウン・カウンタUDCに与えるもの、UDCはア
ップ・ダウン・カウンタでパルス発生器PGの発生する
パルスをアップまたはダウンカウントするもの、DAは
ディジタル・アナログ変換器、FVCはパルス発生器P
Gの発生するパルス周波数に応じた電圧を出力し速度信
号を発生するFVコンバータである。
In FIG. 8, M is a motor, RE is a rotary encoder, PG is a pulse generator that generates a pulse when a two-phase sine wave signal of A phase and B phase crosses zero volt, as shown in FIG. PD is a phase detector that gives the addition signal AD to the up / down counter UDC when the A-phase signal is advancing, and the subtraction signal SB when it is delayed. UDC is an up / down counter and is used for the pulse generator PG. The one that counts up or down the generated pulse, DA is the digital-analog converter, FVC is the pulse generator P
It is an FV converter that outputs a voltage according to the pulse frequency generated by G and generates a speed signal.

例えばモータMが時計方向に回転しており、次第に減速
し、時刻t0で回転方向を反転するとすれば、ロータリエ
ンコーダREから、初め第11図A,Bに示す如く、A
相信号がB相信号よりπ/2だけ進んだ2つの正弦波信号
が発生する。位相検出器PDはこれを検出し、アップ・
ダウン・カウンタUDCに加算信号ADを出力する。こ
のときパルス発生器PGはA相、B相の正弦波信号が零
ボルトを横切る毎に、第11図に示す如く、アップパル
スUPPを発生し、アップ・ダウン・カウンタUDC及
びFVコンバータFVCに入力する。
For example, if the motor M is rotating in the clockwise direction and gradually decelerates and the direction of rotation is reversed at time t 0 , the rotary encoder RE first outputs A as shown in FIGS.
Two sine wave signals are generated in which the phase signal leads the B phase signal by π / 2. The phase detector PD detects this and
The addition signal AD is output to the down counter UDC. At this time, the pulse generator PG generates an up pulse UPP as shown in FIG. 11 every time the A-phase and B-phase sine wave signals cross zero volts, and inputs them to the up-down counter UDC and the FV converter FVC. To do.

アップ・ダウン・カウンタUDCはアップパルスUPP
が入力される度にカウントアップし、このカウント値が
DA変換器によりDA変換され、位置信号PSとなる。
Up / down counter UDC is up pulse UPP
Is counted up every time is input, this count value is DA converted by the DA converter, and becomes the position signal PS.

したがって、第9図に示す如く、時刻t0まで位置信号P
Sは階段的に歩進し、また速度信号VSは階段的に減衰
する。時刻t0後はモータMの回転方向が反転するため、
A相信号がB相信号より遅れ、今度は位相検出器PDか
ら減算信号SBが発生し、パルス発生器PGから、第1
1図に示す如く、ダウンパルスDNPが発生し、アップ
・ダウン・カウンタUDCのカウンタ値は減算される。
それ故、第9図に示す如く、時刻t0後は位置信号PSは
階段的に減少し、速度信号VSは階段的に負方向へ増大
する。
Therefore, as shown in FIG. 9, until the time t 0 , the position signal P
S steps stepwise, and the velocity signal VS decays stepwise. After the time t 0, the rotation direction of the motor M is reversed, so
The A-phase signal lags the B-phase signal, this time the phase detector PD generates the subtraction signal SB, and the pulse generator PG outputs the first signal.
As shown in FIG. 1, a down pulse DNP is generated and the counter value of the up / down counter UDC is subtracted.
Therefore, as shown in FIG. 9, after time t 0 , the position signal PS decreases stepwise and the speed signal VS increases stepwise in the negative direction.

このような第8図に示す方式によれば、位置信号PS、
速度信号VS共に階段状となり滑めらかに変化する位置
信号や速度信号が得られなかった。ところで第9図にお
ける位置信号PSおよび速度信号VSのフラットな部分
においても実際にモータは回転しており、速度も変化し
ている。即ちこのような方式では瞬時の正確な位置及び
速度信号が得られないという欠点があった。
According to the method shown in FIG. 8, the position signals PS,
It was not possible to obtain a position signal or a velocity signal in which both velocity signals VS are stepwise and smoothly change. By the way, even in the flat portion of the position signal PS and the speed signal VS in FIG. 9, the motor is actually rotating and the speed is also changing. That is, such a method has a drawback in that an instantaneous accurate position and velocity signal cannot be obtained.

〔従来の技術〕[Conventional technology]

前記欠点を改善するため、本特許出願人は特開昭55−
76905号公報に示すように、第10図の如き方式を
提案した。
In order to improve the above-mentioned drawbacks, the applicant of the present invention has disclosed in JP-A-55-55.
As shown in Japanese Patent No. 76905, a method as shown in FIG. 10 has been proposed.

第10図では、ロータリエンコーダREのA相信号とB
相信号をパルス発生器PGおよび位相検出器PDに伝達
してアップパルスUPPまたはダウンパルスDNPを出
力させこれをアップ・ダウン・カウンタUDCにて位相
検出器PDより出力される加算信号ADまたは減算信号
SBにより加算または減算し、これがディジタル・アナ
ログ変換器DAでアナログ化されることは前記第8図と
同じである。
In FIG. 10, the phase A signal and B of the rotary encoder RE are shown.
The phase signal is transmitted to the pulse generator PG and the phase detector PD to output the up pulse UPP or the down pulse DNP, and the up / down counter UDC outputs the addition signal AD or the subtraction signal from the phase detector PD. It is the same as in FIG. 8 that addition or subtraction is performed by SB and this is analogized by the digital / analog converter DA.

しかし第10図ではこのA相信号とB相信号をスライサ
SL、加算器AAD、減算器ASBに伝達する。スライ
サSLではこれらの信号をあるレベルでスライスして、
第11図に示す矩形波信号P,Qに変換するものであ
り、加算器AADおよび減算器ASBはこれらの信号を
加算または減算して、第11図に示す(A+B)信号、(A-B)
信号を出力する。これらの(A+B)信号および(A-B)信号は
マルチプレクサMPX1に伝達される。ところで前記矩
形波信号P,Qは排他的論理和回路EORに入力されて
その排他的論理和(PQ)が計算され、この排他的論
理和回路EORが「1」のときマルチプレクサMPX1は、
パルス発生回路PGの出力パルスに同期して(A+B)信号
を出力し、「0」のとき(A-B)信号を出力する。このマルチ
プレクサMPX1の出力はアッテネータATNによりD
A変換器DAの1ステップ分の電圧値に減衰される。そ
してこれがマルチプレクサMPX2の一方の入力信号に
なり、このマルチプレクサMPX2の他方の入力信号は
インバータINより出力された前記アッテネータATN
の反転信号となる。したがってマルチプレクサMPX2
の出力INPSは、第11図にINPSとして示す信号
のうち点線で示すものとなり、これが補間器INPに伝
達される。ところで補間器INPには前記ディジタル・
アナログ変換器DAから出力されたアップ・ダウン・カ
ウンタUDCのカウント値のアナログ信号PS(第11
図においてステップ状の信号として示されるもの)が伝
達されている。このため、この補間器INPではステッ
プ状のアナログ信号PSと前記マルチプレクサMPX2
の出力INPSを加算することにより、このステップ信
号PSの不連続性を除去した、連続状の位置信号PSS
が得られる。
However, in FIG. 10, the A-phase signal and the B-phase signal are transmitted to the slicer SL, the adder AAD, and the subtractor ASB. Slicer SL slices these signals at a certain level,
The square wave signals P and Q shown in FIG. 11 are converted, and the adder AAD and the subtractor ASB add or subtract these signals to obtain the (A + B) signal, (AB )
Output a signal. These (A + B) signal and (AB) signal are transmitted to the multiplexer MPX 1 . By the way, the rectangular wave signals P and Q are input to the exclusive OR circuit EOR and the exclusive OR (PQ) is calculated. When the exclusive OR circuit EOR is "1", the multiplexer MPX 1 is
The (A + B) signal is output in synchronism with the output pulse of the pulse generation circuit PG, and when it is "0", the (AB) signal is output. The output of this multiplexer MPX 1 is D by the attenuator ATN.
It is attenuated to the voltage value of one step of the A converter DA. This becomes one input signal of the multiplexer MPX 2, and the other input signal of this multiplexer MPX 2 is the attenuator ATN output from the inverter IN.
It becomes the inversion signal of. Therefore, the multiplexer MPX 2
The output INPS of is shown by the dotted line in the signal shown as INPS in FIG. 11, and this is transmitted to the interpolator INP. By the way, the interpolator INP has the digital
The analog signal PS of the count value of the up / down counter UDC output from the analog converter DA (11th
(Indicated as step signals in the figure) are transmitted. Therefore, in this interpolator INP, the stepped analog signal PS and the multiplexer MPX 2
Of the position signal PSS in which the discontinuity of the step signal PS is removed by adding the output INPS of
Is obtained.

この位置信号PSSを使用して速度検出制御を行う場
合、例えば第12図に示す如く、加減算器AD1〜AD3
と、積分器INTG1,INTG2、アンプAP1,AP2
等を使用した回路を構成し、モータの駆動電流iに比例
した信号Iiを加減算器AD1に伝達し、前記位置信号P
SSを加減算器AD3に伝達する。例えば駆動モータと
してDCモータを使用するとき、モータの電機子電流i
が角加速度に比例するので、この電流iを積分器INT
1により積分して速度信号VSSを得、さらにこの速
度信号VSSを積分器INTG2により積分して位置信
号PSS′を得、これを前記なめらかな位置信号PSSと
加減算器AD3で比較し、この差が零となるように制御
して速度信号VSSを得ることができる。
When speed detection control is performed using this position signal PSS, for example, as shown in FIG. 12, adder / subtractors AD 1 to AD 3 are used.
And integrators INTG 1 , INTG 2 , amplifiers AP 1 , AP 2
And the like, and a signal I i proportional to the motor drive current i is transmitted to the adder / subtractor AD 1 and the position signal P
The SS is transmitted to the adder / subtractor AD 3 . For example, when a DC motor is used as a drive motor, the motor armature current i
Is proportional to the angular acceleration, this current i is
The speed signal VSS is integrated by G 1 and the speed signal VSS is further integrated by the integrator INTG 2 to obtain the position signal PSS ′, which is compared with the smooth position signal PSS and the adder / subtractor AD 3 . The speed signal VSS can be obtained by controlling so that this difference becomes zero.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

このように、第10図の回路で得られた位置情報をフィ
ードバックし、サーボ系を構成すると、量子化誤差によ
るリミットサイクルが防止できるなどそれなりの効果を
上げていた。しかしながらこの回路はアナログで信号処
理を行う部分が多く、装置の小形化、低価格化が難かし
いという欠点があった。
Thus, by feeding back the position information obtained by the circuit of FIG. 10 and configuring the servo system, the limit cycle due to the quantization error can be prevented, and some effects are obtained. However, this circuit has many drawbacks in that it is difficult to reduce the size and cost of the device because there are many parts that perform analog signal processing.

特にサーボ系の制御装置をマイクロコンピユータを用い
て行う場合にはディジタル化することが必要となる。こ
のため、第13図に示す如く、マルチプレクサMPX2
の出力をAD変換器A/Dによりディジタル信号化し、
これをアップ・ダウン・カウンタUDCから計数出力さ
れる上位桁に対する下位桁の信号として補間することが
必要となり、第13図に示すような複雑な回路構成とな
り、これまた装置の小形化、低価格化が難かしいという
問題点がある。
In particular, it is necessary to digitize the servo system control device when using a microcomputer. Therefore, as shown in FIG. 13, the multiplexer MPX 2
The output of is converted into a digital signal by the AD converter A / D,
It is necessary to interpolate this as a signal of the lower digit with respect to the upper digit which is counted and output from the up / down counter UDC, resulting in a complicated circuit configuration as shown in FIG. 13, which also reduces the size of the device and lowers the price. There is a problem that it is difficult to make it.

〔問題点を解決するための手段〕[Means for solving problems]

前記の如き問題点を解決するため、本発明のエンコーダ
出力補間回路では、物体の移動または回転に応じて互に
π/2の位相差を有する2相の正弦波状信号を発生するエ
ンコーダと、前記各正弦波信号の1周期の間に物体の移
動または回転方向に応じて加算計数または減算計数を行
う計数手段を備えた物体の位置検出装置において、前記
計数手段で検出できる位置情報よりさらに小さい補間用
位置情報を出力する記憶手段と、前記2相の正弦波状信
号をそれぞれディジタル量に変換するアナログ・ディジ
タル変換手段を設け、これらのディジタル量にもとづき
前記記憶手段をアクセスする際、記憶番地をマトリック
ス状に配列した構成とし、その行番号、列番号の値をそ
れぞれ前記2相の各正弦波状信号をディジタル量に変換
した情報により選択する手段を設け、これらのディジタ
ル量に応じて前記記憶手段から補間用位置情報を出力
し、これにもとづき前記計数手段で検出した位置情報を
補間するとともに、前記正弦波状信号の1周期の間に前
記計数手段が計数する回数をnとし、前記記憶手段に記
入されている補間用位置情報のビット数をmとしたと
き、前記マトリックスの中心に中心同志が重なる仮想的
な円を考えてその円の中心において平面角360°をn
×2等分したn×2個の仮想的な扇形を導入し、そ
のn×2個の扇形に対してそれぞれ2とおりの補間
情報を割り当て、各扇形に重なる前記マトリックスの各
記憶番地にその補間情報の値を記憶することを特徴とす
る。
In order to solve the above problems, the encoder output interpolation circuit of the present invention includes an encoder that generates two-phase sinusoidal signals having a phase difference of π / 2 with each other according to movement or rotation of an object, In an object position detecting device equipped with a counting means for performing addition counting or subtraction counting according to the movement or rotation direction of an object during one cycle of each sine wave signal, interpolation smaller than the position information detectable by the counting means Storage means for outputting position information for use and analog / digital conversion means for converting each of the two-phase sinusoidal signals into digital quantities are provided, and when accessing the storage means based on these digital quantities, storage addresses are matrixed. And the row and column numbers are selected according to the information obtained by converting the two-phase sinusoidal signals into digital quantities. Means for outputting the interpolation position information from the storage means in accordance with these digital amounts, and based on this, the position information detected by the counting means is interpolated, and during one cycle of the sinusoidal signal. When the number of times counted by the counting means is n and the number of bits of the interpolation position information written in the storage means is m, a virtual circle in which the centers of the matrix overlap each other is taken into consideration. The plane angle of 360 ° at the center of
Introducing n × 2 m virtual sectors divided into 2 × 2 m equal parts, and assigning 2 m kinds of interpolation information to each of the n × 2 m sectors, and storing each of the matrices overlapping each sector. It is characterized in that the value of the interpolation information is stored in the address.

〔作用〕[Action]

本発明ではエンコーダの2相出力をそれぞれA/D変換
してディジタル量とし、次にこれらの信号をROM(Re
ad Only Memory)のアドレス入力として導くことにより
あらかじめROMに書かれた対応表に基づいて補間デー
タを得ることができるの、きわめてコンパクトな形にこ
の補間データの生成手段をまとめることができ、しかも
エンコーダの2相正弦波状信号の振幅、オフセット、位
相差の多少の変動に対しても影響されることなく連続的
に補間データを生成することができ、正確な制御を行う
ことができる。
In the present invention, the two-phase outputs of the encoder are A / D converted into digital amounts, and then these signals are stored in the ROM (Re
Since the interpolation data can be obtained based on the correspondence table written in advance in ROM by deriving it as the address input of (Ad Only Memory), the means for generating the interpolation data can be put together in an extremely compact form, and the encoder The interpolated data can be continuously generated without being affected by the fluctuations in the amplitude, offset, and phase difference of the two-phase sinusoidal signal, and accurate control can be performed.

〔実施例〕〔Example〕

本発明の一実施例を第1図乃至第7図にもとづき説明す
る。
An embodiment of the present invention will be described with reference to FIGS. 1 to 7.

第1図は本発明の一実施例構成図、第2図はROMの状
態説明図、第3図は第2図のROMを使用したときの問
題点説明図、第4図は本発明の一実施例で使用されるR
OMの構成図である。
FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is an explanatory view of a ROM state, FIG. 3 is an explanatory view of problems when the ROM of FIG. 2 is used, and FIG. R used in the examples
It is a block diagram of OM.

図中、1はモータで第8図、第10図におけるモータM
に対応するもの、2はインクリメンタル形のロータリエ
ンコーダであってπ/2の位相差を有する正弦波A相信
号、B相信号を発生するものでありモータ1の回転軸に
結合されたモータ軸の回転角を検知するセンサとして構
成され、ロータリエンコーダREに対応するもの、3は
前記正弦波のA相信号を後述するようにディジタル信号
A′に変換するアナログ・ディジタル(A/D)変換回路、
4は前記正弦波のB相信号を後述するようにディジタル
信号B′に変換するA/D変換回路、5は後述する第2図
に示す如きデータの記入されたROM、6は位相判別回
路であって前記A相信号とB相信号のうちいずれかが進
んでいるのか判別するものであり、第8図、第10図に
おけるパルス発生器PGに対応するものであり後述する
ように、A相信号が進みのときカウントアップ信号upが
「1」、逆にB相が進みのときカウントダウン信号dNが「1」
となる。7はアップ・ダウン・カウンタであり位相判別
回路6から出力される前記カウントアップ信号upまたは
カウントダウン信号dNによりパルスをアップ・ダウン・
カウントするものであり第8図、第10図のカウンタU
DCに対応するものである。
In the figure, 1 is a motor, and the motor M in FIG. 8 and FIG.
2 is an incremental rotary encoder that generates a sine wave A-phase signal and a B-phase signal having a phase difference of π / 2, and is of a motor shaft connected to the rotation shaft of the motor 1. A sensor configured to detect a rotation angle and corresponding to the rotary encoder RE, 3 is an analog-digital (A / D) conversion circuit for converting the sine-wave A-phase signal into a digital signal A'as described later,
Reference numeral 4 is an A / D conversion circuit for converting the B-phase signal of the sine wave into a digital signal B'as will be described later, 5 is a ROM in which data as shown in FIG. 2 is written, and 6 is a phase discrimination circuit. It is to determine which one of the A-phase signal and the B-phase signal is advancing, and corresponds to the pulse generator PG in FIGS. 8 and 10, and will be described in detail later. When the signal advances, the count-up signal up is "1". Conversely, when the B phase advances, the count-down signal dN is "1".
Becomes Reference numeral 7 is an up / down counter, which raises / lowers a pulse by the count-up signal up or count-down signal dN output from the phase discrimination circuit 6.
The counter U for counting is shown in FIGS. 8 and 10.
It corresponds to DC.

A/D変換回路3はA相信号を0〜Fまでの16段階にデ
ィジタル信号で出力するものであり、その負の最大値「-
8」を0とし、正の最大値をFとしたディジタル信号A′
を出力する。そしてA/D変換回路4は、同様に、B相信
号を0〜Fまでの16段階にディジタル信号で出力する
ものであって、その負の最大値「-8」を0とし、正の最大
値をFとしたディジタル信号B′を出力する。
The A / D conversion circuit 3 outputs the A-phase signal as a digital signal in 16 steps from 0 to F, and its negative maximum value "-
Digital signal A'where 8 "is 0 and the maximum positive value is F
Is output. Similarly, the A / D conversion circuit 4 outputs the B-phase signal as a digital signal in 16 steps from 0 to F, and sets the negative maximum value "-8" to 0, and the maximum positive value. A digital signal B'having a value of F is output.

ROM5は、前記アップ・ダウン・カウンタ7の出力を
補間するデータが保持されるものであって、第2図(a)
に示す演算則に基づいて第2図(b)に示す対応表が書込
まれており、この例では256通りのアドレスに対して
それぞれ4ビットの補間データが対応している。ここで
第2図(a)の演算則にある(A+B+1)の1は第2図(b)の表
の値を対象にするために付け加えものであって、0でも
よく、またビット数を大きくするにつれて無視できるも
のである。
The ROM 5 holds data for interpolating the output of the up / down counter 7, and is shown in FIG. 2 (a).
The correspondence table shown in FIG. 2B is written based on the calculation rule shown in FIG. 2. In this example, 4-bit interpolation data corresponds to 256 addresses. Here, 1 in (A + B + 1) in the operation rule of FIG. 2 (a) is an addition to target the values in the table of FIG. 2 (b), and may be 0. It can be ignored as the number of bits is increased.

位相判別器6はROM5より出力される信号P,Qにも
とづきA相信号とB相信号のいずれが進相状態にあるの
かを判別するものであり、 ROM5からはA≧0のときP=「1」、 A<0のときP=「0」 B≧0のときQ=「1」 B<0のときQ=「0」 が出力される。このため、ROM5において、第2図
(b)に示す、前記補間データとなる対応表が記入されて
いるROM5−1と同じアドレスにより、それぞれ作成
された第2図(c),(d)に示す如きPテーブル5−2,Q
テーブル5−3を設けて前記A,Bの条件に応じてそれ
ぞれのP,Qの値を出力する。この第2図(c),(d)の代
りに、第2図(b)の補間データを6ビット出力とし、そ
のうち2ビットをP,Qに割当てることもできる。
The phase discriminator 6 discriminates which of the A-phase signal and the B-phase signal is in the advanced phase based on the signals P and Q output from the ROM 5, and from the ROM 5 when A ≧ 0, P = “ 1 ", P =" 0 "when A <0, Q =" 1 "when B≥0, and Q =" 0 "when B <0. Therefore, in ROM 5, FIG.
P tables 5-2 and Q as shown in FIGS. 2 (c) and 2 (d), respectively, created by the same address as the ROM 5-1 in which the correspondence table to be the interpolation data shown in FIG. 2 (b) is written.
A table 5-3 is provided to output P and Q values in accordance with the A and B conditions. Instead of these FIG. 2 (c) and (d), the interpolation data of FIG. 2 (b) can be output as 6 bits, and 2 bits of them can be assigned to P and Q.

このようにして入力されたA相信号、B相信号に応じ
て、位相判別器6は次の第1表に示す如きカウントアッ
プ信号upまたはカウントダウン信号dNを出力する。そし
てこれらの信号によりアップ・ダウン・カウンタ7は、
ROM5から出力される補間データINPSと同期して
計数動作を行う。
The phase discriminator 6 outputs the count-up signal up or the count-down signal dN as shown in the following Table 1 according to the A-phase signal and the B-phase signal input in this way. Then, these signals cause the up / down counter 7 to
The counting operation is performed in synchronization with the interpolation data INPS output from the ROM 5.

ここで前記位相判別器6の構成を、第14図により簡単
に説明する。この位相判別器は、第14図(a)に示す如
く、4個のフリップフロップFF1〜FF4と2個のイ
ンバータIN1〜IN2と4個のアンド回路a1〜a4
で構成される矩形信号出力部と、同(b)に示す如く4個
のアンド回路a5〜a8とオア回路OR1により構成さ
れるupパルス出力部と、同(c)に示す如く4個のアンド
回路a9〜a12とオア回路OR2により構成されるdN
パルス出力部等により構成されている。なお第14図
(a)に示す4個のフリップフロップFF1〜FF4
は、同図(f)に示す如き、入出力動作を行う。ここで
J,Kは入力端子、Q,は出力端子、CLはクロック
端子である。第14図(a)に示す如く、信号P,Qが入
力されたときインバータIN1,IN2より出力される
,およびアンド回路a1〜a4より出力されるP,
Qのそれぞれの立上り、立下り信号を同(b),(c)に示すu
pパルス出力部とdNパルス出力部の各アンド回路a5〜
a8,a9〜a12に図示の状態で入力することによ
り、それぞれオア回路OR1,OR2よりupパルスおよ
びdNパルスが得られる。なお信号P,Qとこれらのupパ
ルスとdNパルスの関係は、第14図(d),(e)に示す通り
である。
Here, the configuration of the phase discriminator 6 will be briefly described with reference to FIG. This phase discriminator includes four flip-flops FF1 to FF4, two inverters IN1 to IN2 and four AND circuits a1 to a4 as shown in FIG. 14 (a).
A rectangular signal output section, an up pulse output section composed of four AND circuits a5 to a8 and an OR circuit OR1 as shown in (b), and four AND circuits shown in (c). DN composed of the circuits a9 to a12 and the OR circuit OR2
It is composed of a pulse output unit and the like. The four flip-flops FF1 to FF4 shown in FIG.
Performs an input / output operation as shown in FIG. Here, J and K are input terminals, Q is an output terminal, and CL is a clock terminal. As shown in FIG. 14 (a), when signals P and Q are input, they are output from the inverters IN1 and IN2, and P output from AND circuits a1 to a4.
U is shown in (b) and (c) of the rising and falling signals of Q respectively.
Each AND circuit a5 of p pulse output section and dN pulse output section
By inputting a8 and a9 to a12 in the illustrated state, the up pulse and the dN pulse are obtained from the OR circuits OR1 and OR2, respectively. The relationship between the signals P and Q and their up pulse and dN pulse is as shown in FIGS. 14 (d) and 14 (e).

次にROM5として第2図に示すものを使用したときの
第1図の動作を説明する。
Next, the operation of FIG. 1 when the ROM 5 shown in FIG. 2 is used will be described.

モータ1が回転するとロータリエンコーダ2の出力信号
はモータ軸の1回転について数百〜数千サイクルの正弦
波信号を互に90°の位相差をもつ2相信号としてA相
信号、B相信号を出力している。いまこれらの信号を で表わすと、ωはモータ1の回転速度に比例している。
ここで復号±は、正回転のとき+、逆回転のとき−であ
る。
When the motor 1 rotates, the output signal of the rotary encoder 2 is a sine wave signal of several hundred to several thousand cycles per one rotation of the motor shaft, which is a two-phase signal having a phase difference of 90 °. It is outputting. Now these signals When expressed by, ω is proportional to the rotation speed of the motor 1.
Here, the decoding ± is + in the forward rotation and − in the reverse rotation.

次にこれらA相信号とB相信号をA/D変換回路3,4に
より−V〜+Vを含む範囲をディジタル量に変換し、こ
れらをA′,B′とする。いまA/D変換回路3,4を4ビッ
トのA/D変換回路とすると、−Vのとき(0000)変2、+V
のとき(1111)2のようにして16段階のディジタル量に
対応させることができる。そしてこれら4ビットのディ
ジタル信号A′,B′のデータをまとめて8ビットのデ
ータとし、ROM5のアドレス選択入力に導く。この場
合のROM5は28=256通りのアドレス選択が可能
なものとする。前記の如く、ROM5には第2図(b)の
ような対応表が書込まれており、この例では256通り
のアドレスに対してそれぞれ4ビットの補間データが対
応している。
Next, these A-phase signal and B-phase signal are converted into digital quantities in the range including -V to + V by A / D conversion circuits 3 and 4, and these are designated as A'and B '. Assuming that the A / D conversion circuits 3 and 4 are 4-bit A / D conversion circuits, when -V, (0000) change 2 , + V
In this case, it is possible to correspond to 16 levels of digital quantity as in (1111) 2 . Then, the data of these 4-bit digital signals A'and B'is put together into 8-bit data, which is led to the address selection input of the ROM 5. In this case, the ROM 5 is capable of address selection of 2 8 = 256 ways. As described above, the correspondence table as shown in FIG. 2B is written in the ROM 5, and in this example, 4-bit interpolation data corresponds to 256 addresses.

これによりある瞬時においては、モータ1の回転角に対
応してROM5の256通りのアドレスのうちのただ一
つが選択されてこれに対応した補間データの値がただ一
つ選ばれることになる。ここで先に示したようにA相信
号、B相信号が の場合には、第2図(b)の補間値のROM5−1におい
て斜線部分の円形の軌跡上を、正回転のときは左廻り
に、逆回転のときは右廻りにROM5−1のアドレスが
選択されてゆく。したがって例えば正回転の場合には、
A′=(F)16,B′=(0)16からスタートすると、補間デ
ータ1,2,3,4,5,6,7,8,9,A……となって、この軌跡を1
周りする間に4周期の鋸歯状波形が得られる。逆回転の
場合には1,F,E,D,C,B,A……と逆の傾斜をもった鋸歯状
波形が得られる。このようにして、前記第10図のマル
チプレクサMPX2の補間信号出力INPSと同様な補
間データをディジタル値として得ることができる。これ
をアップ・ダウン・カウンタ7で計数したデータの下位
に付加することにより、モータ1の回転角の検知データ
の量子化誤差をアップ・ダウン・カウンタ7のみの場合
に比べてさらに1/24=1/16だけ小さくできることにな
る。
As a result, at a certain moment, only one of 256 addresses of the ROM 5 is selected corresponding to the rotation angle of the motor 1, and only one value of the interpolation data corresponding to this is selected. As shown above, the A-phase signal and the B-phase signal are In the case of, in the ROM 5-1 of the interpolated value of FIG. 2 (b), on the circular locus of the shaded portion, the address of the ROM 5-1 is turned counterclockwise for forward rotation and clockwise for reverse rotation. Will be selected. Therefore, for example, in the case of forward rotation,
Starting from A '= (F) 16 and B' = (0) 16 , the interpolation data is 1,2,3,4,5,6,7,8,9, A ..
A sawtooth waveform of 4 periods is obtained during the rotation. In the case of reverse rotation, a sawtooth waveform with an inclination opposite to 1, F, E, D, C, B, A ... Is obtained. In this way, interpolation data similar to the interpolation signal output INPS of the multiplexer MPX 2 shown in FIG. 10 can be obtained as a digital value. By adding this to the lower order of the data counted by the up / down counter 7, the quantization error of the detection data of the rotation angle of the motor 1 can be further reduced by 1/2 4 compared with the case of only the up / down counter 7. It can be reduced by 1/16.

ところで前記の例では説明を簡単にするため、A/D変換
回路3,4の出力を4ビット、ROM5−1の出力を4
ビットの場合について説明したが、勿論これらは5ビッ
ト、6ビット…と拡張していくことができる。このよう
にA/D変換回路3,4の出力ビット数と、ROM5−1
の出力ビット数は自在に変えることができ、例えばA/D
変換回路3,4のビット数を7ビット、ROM5−1の
出力ビット数を6ビットのようにすることができる。こ
の場合は、第2図(a)の演算則に1/4のスケーリングを行
なえばよい。また第2図(b)の補間データには零の値が
なく、……D,E,F,1,2,3……のように1段階飛ぶところ
があったが、これは第2図(b)の16×16の表を1まわり
外側に拡張して18×18にすれば、零の値を挿入できるこ
とからより完全な補間が可能となる。
In the above example, for simplicity of explanation, the outputs of the A / D conversion circuits 3 and 4 are 4 bits, and the output of the ROM 5-1 is 4 bits.
Although the case of bits has been described, it goes without saying that these can be expanded to 5 bits, 6 bits, and so on. Thus, the number of output bits of the A / D conversion circuits 3 and 4 and the ROM 5-1
The output bit number of can be changed freely, for example, A / D
The number of bits of the conversion circuits 3 and 4 can be set to 7 bits, and the number of output bits of the ROM 5-1 can be set to 6 bits. In this case, 1/4 scaling may be performed according to the calculation rule of FIG. In addition, the interpolated data in Fig. 2 (b) did not have a zero value, and there was a step of one step like ... D, E, F, 1, 2, 3 ..., but this is shown in Fig. 2 ( If the 16 × 16 table in b) is expanded outward by one turn to 18 × 18, a value of zero can be inserted, so that more complete interpolation is possible.

アップ・ダウン・カウンタ7は前記の如き手法で制御さ
れるもののみ限定されるものではなく、補間データと同
期して計数できるものであればよい。
The up / down counter 7 is not limited to the one controlled by the above-mentioned method, and may be any counter capable of counting in synchronization with the interpolation data.

また第2図(b)では説明の簡単のためにA相信号、B相
信号が0(V)を中心に±Vのように正負に振れる場合に
ついて説明しているが、勿論0(V)を中心にしない場合
も可能であり、その場合は、例えばA/D変換回転3,4
の入力アナログ信号の変換範囲を単にシフトすればよ
い。
Also, in FIG. 2 (b), for simplicity of explanation, a case where the A-phase signal and the B-phase signal swing positive and negative like ± V around 0 (V) is explained, but of course 0 (V) It is also possible not to center around, in which case, for example, A / D conversion rotation 3, 4
It is sufficient to simply shift the conversion range of the input analog signal of.

このようにすれば、前記第10図に示すものを構成簡単
とすることができる。しかしこの場合、第10図及び第
2図に示すROMには、それぞれ第3図について示す如
き問題がある。本発明はこれを改善するものである。
By doing so, the structure shown in FIG. 10 can be simplified. However, in this case, the ROMs shown in FIGS. 10 and 2 have the problems as shown in FIG. 3, respectively. The present invention improves on this.

第3図は問題点説明図、第4図は本発明の第1実施例に
おけるROMの説明図、第5図はROMアドレス選択軌
跡説明図、第6図はロータリエンコーダの2相出力が基
準値から変動した場合のROMアドレス選択軌跡説明
図、第7図は補間データの値の等しいデータ配置状態説
明図である。
FIG. 3 is a diagram for explaining the problems, FIG. 4 is a diagram for explaining the ROM in the first embodiment of the present invention, FIG. 5 is a diagram for explaining the ROM address selection locus, and FIG. 6 is a reference value for the two-phase output of the rotary encoder. FIG. 7 is an explanatory view of the ROM address selection locus in the case of variation from FIG.

ところで、第10図に示す装置では、ロータリエンコー
ダREの2相出力つまりA相信号、B相信号の振幅、オ
フセット、位相差等が基準値から変動した場合には、曲
線S2で示す如く、変動のない場合の曲線S1と異なり、
第3図(a)に示す補間データのつなぎ目の部分S0で不連
続になり易い。そのためこの2相出力つまりA相信号と
B相信号の変動が大きい場合には連続性が保たれている
つなぎ目とつなぎ目の中央部分にのみ位置決めさせるこ
とが行われていた。
By the way, in the apparatus shown in FIG. 10, when the two-phase output of the rotary encoder RE, that is, the amplitude, offset, phase difference, etc. of the A-phase signal, the B-phase signal, fluctuates from the reference values, as shown by the curve S 2 , Unlike the curve S 1 when there is no fluctuation,
Discontinuity is likely to occur at the joint portion S 0 of the interpolation data shown in FIG. 3 (a). Therefore, when the two-phase output, that is, the A-phase signal and the B-phase signal greatly fluctuates, positioning is performed only at the joint and the central portion of the joint where continuity is maintained.

これを例えばロータリエンコーダREの2相出力の振幅
を自動利得調整(AGC)を行って一定化しようとしても、
ロータリエンコーダREの出力は直流から数十KHzまで
変化すること、他のオフセット変動、位相差変動の影響
を分離しなければならない等難かしく、例えできたとし
ても大がかりなものとなる。
For example, even if an automatic gain adjustment (AGC) is performed to make the amplitude of the two-phase output of the rotary encoder RE constant,
The output of the rotary encoder RE changes from DC to several tens of KHz, and it is difficult to separate the effects of other offset fluctuations and phase difference fluctuations, and even if it could be compared, it would be a large scale.

前記第2図(b)に示すROM5−1を使用しても、A相
信号やB相信号の振幅が小さい場合には同様な問題が存
在する。例えば第2図(b)のROM5−1において、第
1象限の部分より第2象限の部分に移るとき、例えばB
相信号のA/D変換値B′が最大EのときでA相信号のA/D
変換値A′が8のとき、補間データはE→2となり、第
3図(b)に示す如く、つぎ目部分S0に大きな段差が存在
する。したがってこのつぎ目部分S0で停止させようと
しても、第3図(c)に示す如く、Eと2の間を往復する
振動状態が発生し、この部分で停止させることは非常に
困難であった。
Even if the ROM 5-1 shown in FIG. 2 (b) is used, the same problem exists when the amplitude of the A-phase signal or the B-phase signal is small. For example, in the ROM 5-1 of FIG. 2 (b), when moving from the first quadrant to the second quadrant, for example, B
When the A / D conversion value B'of the phase signal is the maximum E, the A / D of the A phase signal
When the conversion value A ′ is 8, the interpolation data becomes E → 2, and as shown in FIG. 3 (b), a large step exists at the joint portion S 0 . Therefore, even if it is attempted to stop at this joint portion S 0 , as shown in FIG. 3 (c), a vibration state reciprocating between E and 2 occurs, and it is very difficult to stop at this portion. It was

それ故、本発明の目的は、第2図(b)に示すROMを改
善して、エンコーダの2相出力に多少の振幅、オフセッ
ト、位相差が多少変動した場合でも、この変動が補償さ
れた形で、つぎ目のない補間データを生成できるように
したものである。
Therefore, an object of the present invention is to improve the ROM shown in FIG. 2 (b) so that even if the amplitude, offset, and phase difference of the encoder two-phase output are slightly changed, this change is compensated. In this form, seamless interpolation data can be generated.

本発明の特徴は、第4図に示す如く、ROM5′を複数
の連続した領域に区分して、この区分内には同一であり
隣接した区分とは連続的な補間データが書込まれてい
る。この第4図の例ではROM5′をアクセスするA/D
変換回路の出力は6ビットのディジタル出力であり、R
OM5′には3ビットの補間データが書込まれている。
The feature of the present invention is that, as shown in FIG. 4, the ROM 5'is divided into a plurality of continuous areas, and in this section, the same interpolation data is written continuously with the adjacent areas. . In the example of FIG. 4, the A / D for accessing the ROM 5 '
The output of the conversion circuit is a 6-bit digital output and R
3-bit interpolation data is written in OM5 '.

いま、第1図においてA/D変換回路3,4として6ビッ
トのデータをそれぞれ出力し、合計12ビットのデータ
で第4図に示すROM5′をアクセスして3ビットの補
間データを求める場合について説明する。
Now, in the case of outputting 6-bit data respectively as the A / D conversion circuits 3 and 4 in FIG. 1 and accessing the ROM 5 ′ shown in FIG. 4 with a total of 12-bit data to obtain 3-bit interpolation data explain.

それ故、モータを回転するとロータリエンコーダも回転
して前記2相信号A,Bを出力する。これらA相信号お
よびB相信号はA/D変換器3,4により6ビットのディ
ジタル信号A′,B′に変換され、前記−V〜+Vを完
全に含むアナログ量の範囲に対して(000000)2〜(11111
1)2のように、64段階のディジタル量に対応させるこ
とができる。これらの6ビットのディジタル信号A′,
B′のデータをまとめて12ビットのデータとして、第
4図に示すROM5′のアドレス選択入力に導く。この
場合のROM5′は、212=4096通りのアドレス選択が可
能なものである。
Therefore, when the motor is rotated, the rotary encoder also rotates and outputs the two-phase signals A and B. The A-phase signal and the B-phase signal are converted into 6-bit digital signals A'and B'by A / D converters 3 and 4, respectively, with respect to the analog quantity range completely including -V to + V. ) 2 ~ (11111
1) As in 2 , it is possible to correspond to a digital quantity of 64 steps. These 6-bit digital signals A ',
The data of B'are collected together as 12-bit data and led to the address selection input of the ROM 5'shown in FIG. The ROM 5'in this case is capable of address selection in 2 12 = 4096 ways.

このROM5′には、第4図に示す如く、0〜7の値が
3ビットの補間データとして記入され、原点から放射状
に延びた3角形の範囲の中は同じ値が書込まれているこ
とを示している。
As shown in FIG. 4, the values 0 to 7 are written in this ROM 5'as 3-bit interpolation data, and the same value is written in the range of the triangle extending radially from the origin. Is shown.

第4図の例に示す如く、補間データが3ビットのとき
は、360゜を23×4=32分割した11.25゜ずつに等分された領
域に同一の補間データが書込まれている。補間データの
情報量がnビット必要なときは2n×4分割すればよい。
実際には第4図で示すROM5′はマトリックスであ
り、1つのアドレスが占める領域が微小な正方形である
のに対し、補間データの値の境界は斜線であるが、その
境界にあるアドレスの補間データの値はどちらか面積の
広い方にまるめ込めばよい。
As shown in the example of FIG. 4, when the interpolated data is 3 bits, the same interpolated data is written in an area equally divided into 11.25 ° each obtained by dividing 360 ° by 2 3 × 4 = 32. When the information amount of the interpolation data requires n bits, it may be divided into 2 n × 4.
Actually, the ROM 5'shown in FIG. 4 is a matrix, and the area occupied by one address is a minute square, whereas the boundary of the interpolation data value is a diagonal line, but the interpolation of the address at that boundary is performed. The data value should be rounded up to the one with the larger area.

このような対応表をサーボの運転中に例えばマイクロコ
ンピユータで計算しながら補間データを作るには多少面
倒な計算を必要とし、リアルタイム化できなかったり、
たとえできたとしても貴重な演算時間を長時間使用する
ことになるので、あらかじめ対応表を作り第4図に示す
ようにROM(RAMでもよい)に書込んでおけば、こ
のROMの動作速度でリアルタイムに連続的な補間がで
きる。
For example, in order to create the interpolation data while calculating the correspondence table while the servo is operating, for example, with a microcomputer, it requires some complicated calculation, and it cannot be realized in real time.
Even if it can be done, valuable calculation time will be used for a long time, so if you create a correspondence table in advance and write it in ROM (may be RAM) as shown in FIG. 4, the operating speed of this ROM will increase. Real-time continuous interpolation is possible.

かくしてある瞬間においてはモータの回転角に対応して
ROMの4096通りのアドレスのうちただ一つが選択され
これに対応した補間データの値がただ一つ選ばれること
になる。
Thus, at a certain moment, only one of the 4096 addresses of the ROM is selected corresponding to the rotation angle of the motor, and only one value of the interpolation data corresponding to this is selected.

ここで、前述した如く、 の場合には、第5図に示す円形の軌跡上を正回転の場合
は左廻りに、逆回転の場合には右廻りにROM5′のア
ドレスが選択されてゆく。したがって、例えば正回転の
場合には、円形の右端の所からスタートすると、補間デ
ータは0,1,2,3,4,5,6,7,0,1,2……となって、この軌跡
を1周りする間に4周期の鋸歯状波形が得られ、逆回転
の場合には0,7,6,5,4,3,2,1,0,7,6……と逆の傾斜をも
った鋸歯状波形が得られることになる。これをアップ・
ダウン・カウンタ7で計数したデータの下位に付加する
ことにより、モータの回転角の検知データの量子化誤差
をアップ・ダウン・カウンタ7のみの場合に比べてさら
に1/23=1/8に小さくすることができる。
Here, as mentioned above, In the case of, the address of the ROM 5'is selected on the circular locus shown in FIG. 5 in the counterclockwise direction for the forward rotation and in the clockwise direction for the reverse rotation. Therefore, for example, in the case of normal rotation, if you start from the right end of the circle, the interpolation data will be 0,1,2,3,4,5,6,7,0,1,2. A sawtooth waveform of 4 cycles is obtained during one round of the trajectory, and in the case of reverse rotation, the gradient is 0,7,6,5,4,3,2,1,0,7,6 ... A sawtooth waveform having Up this
By adding to the lower part of the data counted by the down counter 7, the quantization error of the motor rotation angle detection data is further reduced to 1/2 3 = 1/8 compared with the case of only the up down counter 7. Can be made smaller.

次に第4図に示すROM5′を使用する他の理由と効果
について説明する。
Next, other reasons and effects of using the ROM 5'shown in FIG. 4 will be described.

これまでの前記説明ではエンコーダの2相出力を B=V sinωtのように簡単な形で表わしてきたが、
現実のエンコーダ2相出力は、 のように、信号のオフセット成分、振動成分、位相差成
分に多少の変動を許さなければならない。これは、エン
コーダが微細なスリットパターンを用いた精密部品であ
り、数μm〜数十μmのわずかな機械的な位置関係のず
れがこれらに変動を与えるためであり、これらの変動の
ないエンコーダを希望すると、ほとんどすべてのエンコ
ーダが不良品ということになってしまうためである。こ
のような変動がある場合の第5図の円形の軌跡の変化を
第6図に示す。第6図(a)は振幅の変動のある場合を示
し、同(b)はオフセットの変動のある場合を示し、同(c)
は位相差の変動のある場合を示す。
In the above explanation so far, the two-phase output of the encoder Although it has been expressed in a simple form such as B = V sin ωt,
The actual encoder two-phase output is As described above, it is necessary to allow some variation in the offset component, the vibration component, and the phase difference component of the signal. This is because the encoder is a precision component using a fine slit pattern, and a slight deviation in the mechanical positional relationship of several μm to several tens of μm gives fluctuations to these. This is because if you wish, almost all encoders will be defective. FIG. 6 shows changes in the circular locus of FIG. 5 in the case of such fluctuations. FIG. 6 (a) shows the case where the amplitude fluctuates, the same (b) shows the case where the offset fluctuates, and the same (c)
Indicates the case where the phase difference varies.

そしてこのような振幅変動、オフセット変動、位相差変
動があれば、第10図に示す方式では、第3図に示す如
く、つなぎ目部分S0にジャンプが生ずる。これは第2
図(b)のROM5−1を使用した場合でも、振幅が小さ
くなったときは、第2図(b)の斜線部分の基準の軌跡の
内側を通るから、補間データは、例えばA,B,C,D,E,2,3
……の軌跡を通ったり、A,B,C,D,2,3,4,5……のような
軌跡を通ったりし、E→2(第3図参照)、あるいはD
→2のようにジャンプすることがわかる(もっとも補間
回路を用いないときよりもジャンプ量は小さいが)。
If there are such amplitude fluctuations, offset fluctuations, and phase difference fluctuations, in the system shown in FIG. 10, a jump occurs at the joint portion S 0 as shown in FIG. This is the second
Even when the ROM 5-1 shown in FIG. 2B is used, when the amplitude becomes small, the data passes through the reference locus of the shaded portion in FIG. C, D, E, 2,3
... or a path like A, B, C, D, 2,3,4,5 ..., E → 2 (see Fig. 3), or D
→ You can see that it jumps as shown in 2 (although the jump amount is smaller than when the interpolation circuit is not used).

エンコーダ2相出力が基準値から変動したときこのよう
なジャンプ現象が生じる理由を解析すると、第2図(b)
のROM5−1における補間データの値が等しい点を結
んだ線は第7図(a)に示す如く、第1象限と第3象限で
は右上がりになり、第2象限と第4象限では右下がりの
パタンをしている。このため、第2図(b)よりあきらか
な如く、各象限の境界部分の隣接値はジャンプしている
部分が多数存在することになる。
Analysis of the reason why such a jump phenomenon occurs when the encoder two-phase output fluctuates from the reference value is shown in Fig. 2 (b).
The line connecting the points where the interpolation data values are the same in the ROM 5-1 rises to the right in the first and third quadrants and falls to the right in the second and fourth quadrants, as shown in FIG. 7 (a). The pattern is. Therefore, as is clear from FIG. 2 (b), there are many jumping portions of the adjacent values of the boundary portion of each quadrant.

これに対して本発明におけるROM5′では、第7図
(b)に示す如く、補間データの値の等しい所の境界線は
原点を中心とした半径方向に並んでおり、しかもこの境
界線の隣接値は互に連続値であるので、第6図(a)〜(c)
に示す如く、エンコーダ2相出力に振幅変動、オフセッ
ト変動、位相差変動があっても、第3図に示すようなジ
ャンプを生じることはない。
On the other hand, in the ROM 5'of the present invention, FIG.
As shown in (b), the boundary lines where the values of the interpolation data are equal are lined up in the radial direction with the origin as the center, and the adjacent values of these boundary lines are continuous values. a) to (c)
As shown in FIG. 3, even if there are amplitude fluctuations, offset fluctuations, and phase difference fluctuations in the encoder two-phase output, the jump as shown in FIG. 3 does not occur.

このように、本発明ではエンコーダ検知信号である2相
出力に多少の変動がある場合でも正しい連続的な補間が
行われるために正確に制御することができる。
As described above, according to the present invention, even if there is some variation in the two-phase output that is the encoder detection signal, correct continuous interpolation is performed, so that accurate control can be performed.

なお、本発明ではA/D変換回路の出力を6ビットとし、
ROMの出力を3ビットの例について説明したが、勿論
本発明はこれのみに限定するものではなく、これらは適
宜変更できるものであり、ビット数を大きくする程、よ
り量子化誤差の小さい位置(又は回転角)のデータが得
られる。また第4図では説明の簡単のため、A相信号、
B相信号が0(V)を中心に±V(V)のように正負に振れる
場合について説明したが、勿論0(V)を中心にしない場
合も可能であり、その場合は例えばA/D変換回路の入力
アナログ信号の変換範囲を単にシフトすればよい。
In the present invention, the output of the A / D conversion circuit is 6 bits,
Although an example in which the output of the ROM is 3 bits has been described, the present invention is not limited to this, of course, and these can be changed as appropriate, and the larger the number of bits, the smaller the quantization error position ( Or, the rotation angle) data is obtained. Further, in FIG. 4, for simplicity of explanation, the A-phase signal,
The case where the B-phase signal swings positive and negative like ± V (V) around 0 (V) has been explained, but it is of course possible that the phase B signal does not center around 0 (V). In that case, for example, A / D It is sufficient to simply shift the conversion range of the input analog signal of the conversion circuit.

またROMに示す補間データはアップ・ダウン・カウン
タの計数が、エンコーダ出力の2相正弦波信号が1周期
に4回計数される場合について示しているが、1周期に
2回とか1回の場合でも可能であり、またその場合RO
M出力の補間データのビット数が3ビットのものを4ビ
ット、5ビット等とし、変換表の数値が0〜7の4組を
0〜(F)16を2組、0〜(1F)16を1組としても本発明の
主旨に沿ったものであり、同じ効果が得られる。
In addition, the interpolation data shown in the ROM shows the case where the up / down counter counts the two-phase sine wave signal output from the encoder four times in one cycle. However, when it counts twice or once in one cycle. But it is possible, and in that case RO
If the number of bits of M output interpolation data is 3 bits, it is 4 bits, 5 bits, etc., 4 sets of conversion table values 0 to 7 are 2 sets of 0 to (F) 16 and 0 to (1F) 16 Even if one set is used, it is in line with the gist of the present invention, and the same effect can be obtained.

それから前記説明では補間データをROMに書込んだ場
合について説明したが、勿論RAMを使用することもで
きる。
Then, in the above description, the case where the interpolation data is written in the ROM has been described, but the RAM can of course be used.

本発明では、サーボ系の制御装置をマイクロコンピユー
タにより構成する場合のように、第13図に示す如く、
補間出力をA/D変換してディジタル化するようなものの
ように、位置情報を完全な連続量として得る必要はなく
量子化誤差を必要な値まで小さくできれば充分であると
いうことがあるとき、事実リミットサイクルが発生する
場合でも量子化誤差を小さくすれば、リミットサイクル
の振幅はそれにつれて小さくなり無視できるような場合
がある等に使用して、非常に効果がある。
In the present invention, as shown in FIG. 13, as in the case where the servo system control device is configured by a micro computer,
When it is sufficient to reduce the quantization error to the required value without having to obtain the position information as a complete continuous quantity, such as when the interpolation output is A / D converted and digitized, the fact that Even if a limit cycle occurs, if the quantization error is reduced, the amplitude of the limit cycle becomes smaller accordingly and it may be ignored, which is very effective.

〔発明の効果〕〔The invention's effect〕

本発明によればマイクロコンピユータ等によるディジタ
ル制御用に使用される位置(又は回転角)情報をディジ
タル量として出力するときに、そのカウンタ出力の補間
データをきわめて簡単な構成により得ることができる。
According to the present invention, when the position (or rotation angle) information used for digital control by a micro computer or the like is output as a digital amount, the interpolation data of the counter output can be obtained with an extremely simple configuration.

しかもインクリメンタル形エンコーダの検知出力である
2相正弦波状信号の振幅、オフセット、位相差の多少の
変動に対しても影響されることなく、位置(又は回転
角)情報の量子化誤差を任意の値に小さくした補間デー
タの生成を高速に実行することができる。
In addition, the quantization error of the position (or rotation angle) information can be set to an arbitrary value without being affected by a slight change in the amplitude, offset, or phase difference of the two-phase sinusoidal signal that is the detection output of the incremental encoder. It is possible to quickly generate the interpolated data that is extremely small.

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

第1図は本発明の一実施例構成図、第2図はROMの説
明図、第3図は問題点説明図、第4図は本発明の第1実
施例におけるROMの説明図、第5図はROMのアドレ
ス選択軌跡説明図、第6図はロータリエンコーダの2相
出力が基準値から変動した場合のROMアドレス選択軌
跡説明図、第7図は補間データの値の等しいデータ配置
状態説明図、第8図は従来のインクリメンタル形エンコ
ーダにより位置及び速度を検出する方式、第9図は第8
図の特性、第10図は第8図の欠点を改善した従来の位
置及び速度検出方式、第11図は第10図の動作特性
図、第12図は第10図により得られた位置信号を用い
て位置制御及び速度検出方式、第13図は第10図の位
置信号のディジタル化方式、第14図は位相判別器の構
成および動作説明図を示す。 図中、1はモータ、2はロータリエンコーダ、3,4は
アナログ・ディジタル変換回路、5はROM、6は位相
判別器、7はアップ・ダウン・カウンタである。
FIG. 1 is a configuration diagram of an embodiment of the present invention, FIG. 2 is an explanatory diagram of a ROM, FIG. 3 is an explanatory diagram of problems, and FIG. 4 is an explanatory diagram of a ROM in the first embodiment of the present invention. 6 is an explanatory view of the ROM address selection locus, FIG. 6 is an explanatory view of the ROM address selection locus when the two-phase output of the rotary encoder fluctuates from the reference value, and FIG. 7 is an explanatory view of the data arrangement state where the interpolation data values are the same. , FIG. 8 is a method for detecting the position and speed by a conventional incremental encoder, and FIG.
The characteristics shown in FIG. 10, FIG. 10 shows the conventional position and velocity detection method in which the drawbacks shown in FIG. 8 have been improved, FIG. 11 shows the operation characteristic chart of FIG. 10, and FIG. 12 shows the position signal obtained from FIG. The position control and speed detection method is used, FIG. 13 shows the position signal digitizing method of FIG. 10, and FIG. 14 shows the configuration and operation explanatory diagram of the phase discriminator. In the figure, 1 is a motor, 2 is a rotary encoder, 3 and 4 are analog / digital conversion circuits, 5 is a ROM, 6 is a phase discriminator, and 7 is an up / down counter.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 鎌田 徹 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (56)参考文献 特開 昭50−26975(JP,A) 特開 昭55−76905(JP,A) 特開 昭54−19773(JP,A) 特開 昭59−202008(JP,A) 実開 昭55−127214(JP,U) 実開 昭59−14516(JP,U) 特公 平1−19084(JP,B2) 特公 平4−524(JP,B2) 特開 昭61−110005(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Toru Kamata 1015 Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa FUJITSU LIMITED (56) References JP 50-26975 (JP, A) JP 55-76905 (JP, A) JP 54-19773 (JP, A) JP 59-202008 (JP, A) Actual opening 55-127214 (JP, U) Actual opening 59-14516 (JP, U) Special Japanese Patent Publication No. 1-19044 (JP, B2) Japanese Patent Publication No. 4-524 (JP, B2) JP 61-110005 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】物体の移動または回転に応じて互にπ/2
の位相差を有する2相の正弦波状信号を発生するエンコ
ーダと、前記各正弦波信号の1周期の間に物体の移動ま
たは回転方向に応じて加算計数または減算計数を行う計
数手段を備えた物体の位置検出装置において、前記計数
手段で検出できる位置情報よりさらに小さい補間用位置
情報を出力する記憶手段と、前記2相の正弦波状信号を
それぞれディジタル量に変換するアナログ・ディジタル
変換手段を設け、これらのディジタル量にもとづき前記
記憶手段をアクセスする際、記憶番地をマトリックス状
に配列した構成とし、その行番号、列番号の値をそれぞ
れ前記2相の各正弦波状信号をディジタル量に変換した
情報により選択する手段を設け、これらのディジタル量
に応じて前記記憶手段から補間用位置情報を出力し、こ
れにもとづき前記計数手段で検出した位置情報を補間す
るとともに、前記正弦波状信号の1周期の間に前記計数
手段が計数する回数をnとし、前記記憶手段に記入され
ている補間用位置情報のビット数をmとしたとき、前記
マトリックスの中心に中心同志が重なる仮想的な円を考
えてその円の中心において平面角360°をn×2
分したn×2個の仮想的な扇形を導入し、そのn×2
個の扇形に対してそれぞれ2とおりの補間情報を割
り当て、各扇形に重なる前記マトリックスの各記憶番地
にその補間情報の値を記憶することを特徴とするエンコ
ーダ出力補間回路。
1. π / 2 relative to each other according to movement or rotation of an object
An object for generating a two-phase sinusoidal signal having a phase difference of 2 and a counting means for performing addition counting or subtraction counting according to the moving or rotating direction of the object during one cycle of each of the sinusoidal signals In the position detecting device, the storage means for outputting interpolation position information smaller than the position information that can be detected by the counting means, and the analog / digital conversion means for converting each of the two-phase sinusoidal signals into a digital amount are provided. Information obtained by arranging storage addresses in a matrix when accessing the storage means based on these digital quantities and converting the values of the row numbers and column numbers into digital quantities of the two-phase sinusoidal signals. Means for selecting the interpolation position information is output from the storage means in accordance with these digital amounts, and based on this, the interpolation position information is output. The position information detected by the number means is interpolated, and the number of times the counting means counts during one cycle of the sinusoidal signal is n, and the number of bits of the interpolation position information written in the storage means is m. when a, the planar angle 360 ° by introducing n × 2 m equally divided n × 2 m pieces of virtual sector in the center of the circle consider a hypothetical circle centered comrades overlaps the center of the matrix , That n × 2
Assign the interpolation information for each 2 m as the m-number of the sector, the encoder output interpolating circuit and to store the value of the interpolation information in the storage addresses of the matrix which overlaps the respective sector.
JP59252396A 1984-11-29 1984-11-29 Encoder output interpolation circuit Expired - Lifetime JPH063378B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59252396A JPH063378B2 (en) 1984-11-29 1984-11-29 Encoder output interpolation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59252396A JPH063378B2 (en) 1984-11-29 1984-11-29 Encoder output interpolation circuit

Publications (2)

Publication Number Publication Date
JPS61131011A JPS61131011A (en) 1986-06-18
JPH063378B2 true JPH063378B2 (en) 1994-01-12

Family

ID=17236743

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59252396A Expired - Lifetime JPH063378B2 (en) 1984-11-29 1984-11-29 Encoder output interpolation circuit

Country Status (1)

Country Link
JP (1) JPH063378B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06100934B2 (en) * 1986-08-27 1994-12-12 三菱電機株式会社 Stop position control device for electric motor
JPH0751606Y2 (en) * 1987-03-03 1995-11-22 株式会社理研オプテツク Internal sync signal generator
JPH0617802B2 (en) * 1987-12-21 1994-03-09 オ−クマ株式会社 Encoder interpolation circuit
JP2501227B2 (en) * 1988-05-30 1996-05-29 ファナック株式会社 Absolute position encoder
JPH02232519A (en) * 1989-03-07 1990-09-14 Yamaha Corp Position detecting circuit for encoder
US7827008B2 (en) * 2008-10-21 2010-11-02 General Electric Company System including phase signal saving during anomaly and related method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE2729697A1 (en) * 1977-07-01 1979-01-04 Heidenhain Gmbh Dr Johannes METHOD OF INTERPOLATION
JPS5927845B2 (en) * 1978-12-06 1984-07-09 富士通株式会社 Position and speed detection method
JPS5967458A (en) * 1982-10-12 1984-04-17 Mitsubishi Electric Corp Digital speed detection system

Also Published As

Publication number Publication date
JPS61131011A (en) 1986-06-18

Similar Documents

Publication Publication Date Title
JP2754422B2 (en) Absolute encoder
US4134106A (en) Absolute resolver angle to digital converter circuit
EP0239026A2 (en) Method and apparatus for determining shaft position and for providing commutation signals
JPS616799A (en) Method and apparatus for correcting resolver errors
EP0213904B1 (en) Interpolation method and encoder
JPS62238415A (en) Output phase correction circuit for rotary encoder
JPH063378B2 (en) Encoder output interpolation circuit
JPS60157052A (en) Generator for speed signal
US4352131A (en) Memory disc addressing device
JPH0754260B2 (en) Absolute encoder
US4837492A (en) Apparatus for detecting revolution using a synchro
JPS5847212A (en) Rotary encoder
JP2609845B2 (en) Insertion circuit using decoder
JPH10132605A (en) Position detector
JPH04524B2 (en)
CN115833683A (en) Calibration method and device for electrical angle offset and permanent magnet synchronous motor
EP0257100B1 (en) Pulse distribution type position detector
JP3685944B2 (en) Encoder device high accuracy method and high accuracy encoder device
JP3104090B2 (en) Timing signal generation method and apparatus
JP3171485B2 (en) Creating a high-resolution absolute signal
JP2546323B2 (en) Multi-turn absolute encoder
JP2754586B2 (en) Absolute encoder
JP3337014B2 (en) Position signal detector
JPH1062203A (en) Position detector
JP2000314639A (en) Encoder for ac servo motor