JP2668033B2 - Moving body position / speed detection method and device and origin position return method - Google Patents

Moving body position / speed detection method and device and origin position return method

Info

Publication number
JP2668033B2
JP2668033B2 JP2532489A JP2532489A JP2668033B2 JP 2668033 B2 JP2668033 B2 JP 2668033B2 JP 2532489 A JP2532489 A JP 2532489A JP 2532489 A JP2532489 A JP 2532489A JP 2668033 B2 JP2668033 B2 JP 2668033B2
Authority
JP
Japan
Prior art keywords
encoder
pulse
moving body
detection
sampling
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
JP2532489A
Other languages
Japanese (ja)
Other versions
JPH02205717A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2532489A priority Critical patent/JP2668033B2/en
Publication of JPH02205717A publication Critical patent/JPH02205717A/en
Application granted granted Critical
Publication of JP2668033B2 publication Critical patent/JP2668033B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)
  • Control Of Position Or Direction (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ロボット等の位置・速度制御に用いる位置
・速度信号を検出するに当って、エンコーダを用い、エ
ンコーダパルス間を補間することにより、サンプリング
時の検出値の高分解能化・検出誤差縮小化をはかる方法
及び装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial field of application] The present invention uses an encoder to interpolate between encoder pulses in detecting a position / speed signal used for position / speed control of a robot or the like. The present invention relates to a method and an apparatus for increasing the resolution of a detection value at the time of sampling and reducing the detection error.

〔従来の技術〕[Conventional technology]

従来、エンコーダパルス間を補間することにより高分
解能化をはかった移動体の位置・速度検出方法及び装置
については、特開昭60−216262号公報に開示されてい
る。この従来例につき、第42図乃至第44図を用いて説明
する。第42図は位置検出のタイムチャート図、第43図は
位置・速度検出のフローチャート図、第44図は位置・速
度検出装置のブロック図を示す。移動体の粗位置は、エ
ンコーダ原信号を波形整形回路に通すことにより得られ
る零交差位置で発生するパルスのパルス数を計数するこ
とにより求めている。微細位置は、2相信号及び零値信
号をサンプリング時にサンプルホールドし、鋸歯状波信
号(S5信号)によりパルス幅変調し、S8〜S10信号を得
て、時間幅TA〜TCを計数器で計数することにより、ディ
ジタル値に変換し、下式(1)より微細位置を求めてい
る。
Japanese Patent Laid-Open No. 60-216262 discloses a method and apparatus for detecting the position / speed of a moving body, which has been conventionally improved in resolution by interpolating between encoder pulses. This conventional example will be described with reference to FIGS. 42 to 44. FIG. 42 is a time chart of position detection, FIG. 43 is a flowchart of position / speed detection, and FIG. 44 is a block diagram of a position / speed detection device. The coarse position of the moving body is obtained by counting the number of pulses generated at the zero crossing position obtained by passing the encoder original signal through the waveform shaping circuit. Fine position, the 2-phase signal and the zero value signal to sample and hold at the time of sampling, and pulse width modulated by the sawtooth signal (S 5 signal), to obtain S 8 to S 10 signal, the time width T A through T C Is converted into a digital value by counting with a counter, and the fine position is obtained from the following equation (1).

=tan-1〔−(TC−TA)/(TC−TB)〕 ……(1) そして粗位置と微細位置の和として位置を求め、位置
の変化から速度を求める方法及びそれを実現するための
装置が開示されている。
= Tan -1 [- (T C -T A) / (T C -T B) ] ... (1) The position calculated as the sum of the coarse position and fine position, the method obtains the speed from the change in position and it Is disclosed.

また、インクリメンタル方式の移動量検出器を有する
サーボモータで駆動される移動体の原点位置復帰方法に
ついては、特開昭61−123905号公報に開示されている。
この従来例につき、第47図及び第48図を用いて説明す。
第47図は回転運動する移動体の特定位置装置を示す図、
第48図は移動体の原点位置復帰動作時に検出される各領
域の関係を示す図である。第47図において、移動体24と
結合された被検出体27には、別個の原点位置・オーバラ
ン検出部92と領域判別部93があり、各部を4個の検出セ
ンサ25a,25b,90,91で検出する構成となっている。移動
体24の原点位置復帰動作時には、第48図に示すように移
動体24がオーバランしていないことを確認し、移動体24
の原点位置に対していずれの側にあるかを領域判別セン
サ91で検出した上で原点位置の方向へ誤りなく移動さ
せ、真の原点位置の近傍に設定されている原点位置を検
出し、真の原点位置の方向に移動体24を移動させ、エン
コーダのZ相を検出した位置を真の原点位置とし、移動
体の絶対位置を検出する方法が開示されている。
A method of returning to the origin position of a moving body driven by a servomotor having an incremental movement amount detector is disclosed in JP-A-61-123905.
This conventional example will be described with reference to FIGS. 47 and 48.
FIG. 47 is a diagram showing a specific position device for a moving body that rotates.
FIG. 48 is a diagram showing the relationship between the regions detected during the home position returning operation of the moving body. In FIG. 47, the detection target 27 coupled to the moving body 24 has a separate origin position / overrun detection unit 92 and a region discrimination unit 93, and each unit includes four detection sensors 25a, 25b, 90, and 91. It is configured to be detected by. At the time of the home position return operation of the moving body 24, it is confirmed that the moving body 24 has not overrun as shown in FIG.
After detecting with the area discriminating sensor 91 which side is located with respect to the origin position of, it is moved without error in the direction of the origin position, and the origin position set near the true origin position is detected, and A method is disclosed in which the moving body 24 is moved in the direction of the origin, and the position where the Z phase of the encoder is detected is set as the true origin position, and the absolute position of the moving body is detected.

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

上記従来技術はエンコーダ原信号及び零値信号をサン
プリング時点でサンプルホールドし、その値を用いて逆
正接等の演算を行っているため、サンプリング時にエン
コーダ原信号及び零値信号にノイズが混入した場合(第
30図参照)、各々同程度にノイズが混入すればTC−TA,T
C−TBを演算するため微細位置検出誤差は小さくなると
考えられるが、実際は不規則なノイズが各信号に重畳さ
れると考えられる。従ってサンプリング時に大きいノイ
ズが混入した場合は著しく微細位置検出誤差が大きくな
る欠点があった。
In the above prior art, since the encoder original signal and the zero-value signal are sampled and held at the time of sampling, and operations such as arctangent are performed using the values, when noise is mixed in the encoder original signal and the zero-value signal at the time of sampling, (No.
If noise is mixed to the same extent, T C −T A , T
Although C fine position detection error for computing the -T B is considered to be small, in fact it is considered an irregular noise is superposed on the signal. Therefore, when a large noise is mixed in at the time of sampling, there is a disadvantage that a fine position detection error is significantly increased.

エンコーダ原信号等のノイズ混入は、フィルタを通す
などノイズ対策を施すことよりある程度低域可能である
が、溶接等の大電力使用機器と共に使用する場合はノイ
ズ混入による微細位置検出誤差が大きくなることは避け
られない。
Noise mixing of the encoder original signal etc. can be reduced to some extent by taking measures against noise such as passing through a filter. Is inevitable.

また、移動体の位置・速度検出方法及び装置に関する
上記従来技術は、エンコーダ2相原信号及び零値信号を
用いて粗位置・微細位置検出を行っているため、エンコ
ーダ2相原信号の位相差に90゜から位相ずれがある場
合、著しく検出誤差が大きくなる問題があった。通常エ
ンコーダ2相原信号の許容位相差は90゜±30゜である。
位相ずれにより生ずる検出誤差につき、第45図及び第46
図を用いて説明する。第45図は位相ずれ30゜(正転時位
相差120゜,逆転時位相差60゜)の場合の位置検出のタ
イミチャート図を示し、第46図は微細位置45゜における
位相ずれと微細位置検出誤差の関係を示している。まず
粗位置検出誤差については、第45図において、エンコー
ダパルス(T1信号)の発生間隔が対応エンコーダ信号位
相で120゜,60゜,120゜,60゜…と変化するため、30゜の
区間で1パルスの計数誤差が生ずる。これは回転方向,
位相ずれ符号が異なる場合も同様である。また、微細位
置検出誤差については、TA,TB,TCの検出値(S8〜S10
号)が、第42図に示した検出値と大きく異なっており、
位相差90゜を仮定した前記(1)式の演算結果として求
まる微細位置にも大きい差異が生ずる。微細位置検出誤
差Δθは微細位置θF,位相ずれの場合次式(2)で
示される。
Also, in the above-described conventional technology relating to the method and apparatus for detecting the position and velocity of a moving object, coarse position and fine position detection is performed using an encoder two-phase original signal and a zero-value signal. When there is a phase shift from ゜, there has been a problem that the detection error is significantly increased. Normally, the allowable phase difference between the two-phase original encoder signals is 90 ° ± 30 °.
The detection error caused by the phase shift is shown in FIGS. 45 and 46.
This will be described with reference to the drawings. FIG. 45 shows a timing chart of position detection in the case of a phase shift of 30 ° (forward rotation phase difference 120 °, reverse rotation phase difference 60 °), and FIG. 46 shows a phase shift at the fine position 45 ° and the fine position. The relationship of the detection error is shown. The first coarse position detection error, in Figure 45, since the generation interval of the encoder pulses (T 1 signal) is 120 ° in the corresponding encoder signal phase, 60 °, 120 °, varying 60 ° ... and 30 ° intervals Causes a one-pulse counting error. This is the direction of rotation,
The same applies when the phase shift codes are different. As for the fine position detection error, T A, T B, the detection value of T C (S 8 ~S 10 signal), and significantly different from the detected values shown in FIG. 42,
A large difference also occurs in the fine position obtained as a result of the calculation of the above equation (1) assuming a phase difference of 90 °. The fine position detection error Δθ F is represented by the following equation (2) in the case of the fine position θ F and a phase shift.

ΔθはΔθ=0゜では0であり、θが90゜に近
づくほど大きくなる。θ=45゜の場合につき第46図に
示したが、最大25゜の微細位置検出誤差があり、位置を
粗位置,微細位置の和として求めることによる補正効果
が不十分である。
Δθ F is 0 when Δθ F = 0 °, and increases as θ F approaches 90 °. Although FIG. 46 shows the case of θ F = 45 °, there is a maximum 25 ° fine position detection error, and the correction effect by obtaining the position as the sum of the coarse position and the fine position is insufficient.

また、インクリメンタル方式のエンコーダの接続され
たサーボモータにより駆動される移動体の原点位置復帰
方法に関する上記従来技術は、原点位置検出センサと領
域判別センサの両方の出力信号を用いて原点位置復帰を
行っていたので復帰方法が複雑となる問題があった。
In addition, the above-described conventional technology relating to a method of returning to the origin position of a moving body driven by a servomotor connected to an incremental encoder performs the origin position return using output signals of both an origin position detection sensor and an area determination sensor. Therefore, there was a problem that the return method became complicated.

本発明の目的は、ノイズ混入による微細位置検出誤差
を小さくできる位置・速度検出方法及び装置を提供する
ことにある。
An object of the present invention is to provide a position / speed detection method and apparatus capable of reducing a fine position detection error due to noise contamination.

また、本発明の目的は、エンコーダ2相原信号位相差
に90゜から位相ずれがある場合に移動体の位置・速度検
出誤差を低減する方法・装置を提供することにあり、更
に移動体の原点復帰動作を最小数のセンサ信号を用いて
簡易な検出アルゴリズムで行い、上記位相ずれ検出を移
動の無駄な動作なく行えるような方法を提供することに
ある。
It is another object of the present invention to provide a method and apparatus for reducing a position / speed detection error of a moving body when the phase difference between the encoder two-phase original signal phase shifts from 90 °. An object of the present invention is to provide a method in which the return operation is performed by a simple detection algorithm using a minimum number of sensor signals, and the phase shift can be detected without useless movement.

〔課題を解決するための手段〕[Means for solving the problem]

上記ノイズ混入による微細位置検出誤差を小さくする
という目的を達成するために、微細位置を検出する方法
として、サンプリング時のエンコーダA相,B相信号,零
値信号をA/D変換するのではなく、各信号を電圧制御発
振器を通すことにより、電圧により周波数可変の高周波
数パルスを発生させ、エンコーダパルス発生時からサン
プリング時までの総パルス数を計数することにより(第
31図参照)、エンコーダA,B相信号及び零値信号の積分
値相当量を求め、この値をもとに微細位置を演算する方
法とした。これにより、エンコーダ原信号に正負のノイ
ズが混入しても積分することによりその影響は軽微とな
り、部分的に大きいノイズが混入しても総パルス数に占
める割合が小さいため、演算全体に及ぼす影響を小さく
することができる。
In order to achieve the purpose of minimizing the fine position detection error due to the above-mentioned noise mixing, as a method of detecting the fine position, instead of performing A / D conversion on the encoder A-phase, B-phase signal and zero-value signal at the time of sampling, By passing each signal through a voltage-controlled oscillator, a high-frequency pulse whose frequency is variable by voltage is generated, and the total number of pulses from the time of encoder pulse generation to the time of sampling is counted (No.
In this method, the integrated value equivalent of the encoder A and B phase signals and the zero-value signal is obtained, and the fine position is calculated based on this value. As a result, even if positive and negative noises are mixed in the encoder original signal, the influence is reduced by integrating, and even if partially large noises are mixed, the ratio of the noise to the total number of pulses is small. Can be made smaller.

すなわち、本発明に係る移動体の位置・速度検出方法
は、移動体に接続されたエンコーダからのエンコーダパ
ルスによる粗位置検出工程と、エンコーダ原信号を電圧
−周波数変換手段に入力して得られる正弦波状周波数分
布を有するパルス列を用いて粗位置パルス発生時からの
パルス数を計数して行なう微細位置検出工程と、前記粗
位置と微細位置の和として移動体の位置検出を行なう工
程と、位置の変化量に基いて移動体の速度を検出する工
程と、を含むものである。
That is, the position / velocity detection method of a moving body according to the present invention is a sine obtained by detecting a coarse position by an encoder pulse from an encoder connected to the moving body and inputting an encoder original signal to a voltage-frequency conversion means. A fine position detecting step performed by counting the number of pulses from the time of generating the coarse position pulse using a pulse train having a wavy frequency distribution; a step of detecting the position of the moving body as the sum of the coarse position and the fine position; Detecting the speed of the moving object based on the amount of change.

また、本発明は、移動体に接続されたエンコーダから
のエンコーダパルスによる粗位置検出工程と、エンコー
ダ原信号を電圧−周波数変換手段に入力して得られる正
弦波状周波数分布を有するパルス列を用いて粗位置パル
ス発生時からのパルス数を計数して行なう微細位置検出
工程と、前記粗位置と微細位置の和として移動体の位置
検出を行なう工程と、を含む移動体の位置検出方法であ
る。
Further, the present invention provides a coarse position detection step using an encoder pulse from an encoder connected to a moving object, and a coarse position detection using a pulse train having a sinusoidal frequency distribution obtained by inputting an encoder original signal to a voltage-frequency conversion means. A method for detecting the position of a moving body, comprising: a fine position detecting step of counting the number of pulses from the position pulse generation; and a step of detecting the position of the moving body as a sum of the coarse position and the fine position.

前記位置・速度検出方法において、エンコーダのパル
ス検出位置間の補間を行うために、2相の90゜位相の異
なるエンコーダ原信号のパルス検出時からサンプリング
時までのパルス変換されたパルス数を計数し、零値信号
を電圧制御発振器、計数器を通して同一時刻間で得られ
るパルス数を前記各パルス数から減じて得られる各パル
ス数より、エンコーダパルス発生位置からサンプリング
位置までの微細位置を演算し、前記粗位置と前記微細位
置の和として求められる精位置を位置情報とし、サンプ
リング時の精位置の変化から移動体の速度を検出するも
のがよい。
In the position / speed detection method, in order to perform interpolation between the pulse detection positions of the encoder, the number of pulse-converted pulses from the pulse detection to sampling of the encoder original signals with two 90 ° phases different from each other is counted. , A voltage-controlled oscillator with a zero value signal, from each pulse number obtained by subtracting the number of pulses obtained at the same time through a counter from each of the pulse numbers, a fine position from the encoder pulse generation position to the sampling position is calculated, It is preferable that the fine position obtained as the sum of the coarse position and the fine position is used as position information, and the speed of the moving body is detected from a change in the fine position during sampling.

また、前記位置・速度検出方法において、エンコーダ
原信号のパルス検出時からはじめてのサンプリング時
(第kサンプリング時)までのエンコーダA,B相原信号
及び零値信号を電圧制御発振器、計数器を通して得られ
る各パルス数NA (k),NB (k),NO (k)を記憶し、第k+nサ
ンプリング時まで、エンコーダ原信号のパルス検出が無
い場合は第k+iサンプリング時(1in)の各検
出パルス数を により算出し、エンコーダ原信号のパルス検出位置から
サンプリング時までの微細位置を演算し、前記粗位置と
前記微細位置の和として求められる精位置を位置情報と
し、サンプリング時の位置の変化から速度を検出するも
のがよい。
In the position / velocity detection method, the encoder A and B phase original signals and the zero-value signal from the pulse detection of the encoder original signal to the first sampling (k-th sampling) can be obtained through the voltage-controlled oscillator and the counter. Each pulse number N A (k) , N B (k) , N O (k) is stored. Unless the pulse of the encoder original signal is detected until the (k + n ) -th sampling, each detection at the (k + i) -th sampling (1 in) The number of pulses The fine position from the pulse detection position of the encoder original signal to the time of sampling is calculated, and the fine position obtained as the sum of the coarse position and the fine position is used as position information, and the speed is calculated from the change in position at the time of sampling. What should be detected is good.

また、前記位置・速度検出方法において、位置検出時
にエンコーダ2相原信号各々の正負関係から定まる1/4
周期位置を検出し、移動方向をエンコーダ2相原信号を
パルス化する際に得られる方向弁別信号に基づく粗検出
と、エンコーダパルス発生間隔で微細位置変化量の符号
検出による微細検出を組み合わせて検出するものがよ
い。
In the position / velocity detection method, when the position is detected, a 1/4 value determined from the positive / negative relationship of each of the encoder two-phase original signals is used.
Coarse detection based on the direction discrimination signal obtained when the periodic position is detected and the encoder 2 phase original signal is pulsed in the moving direction is combined with the fine detection by the sign detection of the fine position change amount at the encoder pulse generation interval. Things are good.

また、本発明に係る移動体の位置・速度検出装置は、
移動体に接続されたエンコーダによる位置・速度検出装
置において、エンコーダ原信号よりエンコーダパルス及
び移動方向弁別信号を発生する波形整形回路と、前記エ
ンコーダパルスにより粗位置を検出するアップ・ダウン
計数器と、その粗位置をサンプリング時毎にサンプリン
グ信号を発生するサンプリング・パルス・タイマからの
当該サンプリング時間に同期化させる一時記憶回路とを
備えた粗位置検出部と、エンコーダ原信号及び零値信号
を入力として前記エンコーダパルス及びサンプリングパ
ルスがゲート信号となり前記電圧−周波数変換手段より
送出される3種のパルス列の計数を開始・終了する計数
器を備えた微細位置検出部と、エンコーダパルス間でエ
ンコーダ2相原信号をの正負関係より定まる1/4周期位
置検出回路と、前記粗位置検出部、微細位置検出部及び
1/4周期位置検出回路の動作制御を行う中央処理部と、
を備えたものである。
In addition, the position / speed detection device of the moving body according to the present invention,
In a position / speed detection device using an encoder connected to a moving body, a waveform shaping circuit that generates an encoder pulse and a movement direction discrimination signal from an encoder original signal, and an up / down counter that detects a coarse position by the encoder pulse, A coarse position detection unit having a temporary storage circuit for synchronizing the coarse position with the sampling time from a sampling pulse timer for generating a sampling signal every time sampling is performed, and an encoder original signal and a zero value signal as inputs. The encoder pulse and the sampling pulse serve as a gate signal, and a fine position detector including a counter for starting and ending counting of three types of pulse trains sent from the voltage-frequency conversion means, and an encoder two-phase original signal between encoder pulses A 1/4 period position detection circuit determined by the positive / negative relationship of Position detection unit, a fine position detector and
A central processing unit that controls the operation of the 1/4 cycle position detection circuit,
It is provided with.

前記位置・速度検出装置において、微細位置検出部の
電圧−周波数変換手段は、バイアスされた出力電圧を発
生させるバイアス電圧印加回路と、前記バイアス電圧印
加回路出力が入力となり入力電圧により異なる周波数の
パルス列を発生する電圧制御発振器と、を備え、3種の
パルス列は前記電圧制御発振器より送出されるものがよ
い。
In the position / velocity detection device, the voltage-frequency conversion means of the fine position detection unit includes a bias voltage application circuit that generates a biased output voltage, and a pulse train having a frequency that varies depending on the input voltage with the output of the bias voltage application circuit as an input. And a voltage-controlled oscillator for generating the pulse train. Preferably, the three types of pulse trains are sent from the voltage-controlled oscillator.

また、電圧制御発振器を電圧可変抵抗を有するCR発振
回路により構成し、前記電圧制御発振器の発振周波数が
入力電圧と一時関数関係となるように前記バイアス電圧
印加回路、前記電圧可変抵抗等の各構成要素を構成した
ものがよい。ここで、電圧可変抵抗を電圧印加側がコイ
ルで巻回されている磁性材料と、微小隙間でその両端が
接しており出力端子を有する磁気抵抗素子とにより構成
されているものがよい。また、電圧可変抵抗以外の抵抗
もしくはコンデンサが複数種類並列に設けられ、出力段
には分周器が設けられ、中央処理部からの信号により特
定の抵抗もしくはコンデンサ及び分周器の特定の分周比
が選択可能に構成されたものがよい。また、要求分解能
に応じて特定の抵抗もしくはコンデンサ及び分周器の特
定の分周比を選択することにより、前記電圧制御発振器
において特定の発振周波数可変幅をうる手段を備えたも
のがよい。前記位置・速度検出装置において、移動体の
位置・速度検出装置を移動体を駆動するモータのモータ
制御装置と接続し、モータ制御方法に関するプログラム
を中央処理部に備えているものがよい。ここで、モータ
制御装置により駆動されるモータがロボット関節駆動用
であり、位置検出用エンコーダがモータもしくは駆動さ
れる関節に結合されているものがよい。
Further, the voltage controlled oscillator is configured by a CR oscillation circuit having a voltage variable resistor, and each configuration of the bias voltage application circuit, the voltage variable resistor, etc. so that the oscillation frequency of the voltage controlled oscillator has a temporary functional relationship with the input voltage. What constituted the element is good. Here, it is preferable that the variable voltage resistor is composed of a magnetic material whose voltage application side is wound by a coil, and a magnetoresistive element having both ends thereof in contact with each other in a minute gap and having an output terminal. In addition, multiple types of resistors or capacitors other than voltage variable resistors are provided in parallel, a frequency divider is provided at the output stage, and a specific resistor or capacitor and a specific frequency divider are provided according to the signal from the central processing unit. It is preferable that the ratio is selectable. Further, it is preferable that the voltage controlled oscillator includes means for obtaining a specific oscillation frequency variable width by selecting a specific resistance or capacitor and a specific frequency division ratio of the frequency divider according to the required resolution. In the position / speed detection device, it is preferable that the position / speed detection device of the moving body is connected to a motor control device of a motor for driving the moving body, and a program related to a motor control method is provided in the central processing unit. Here, it is preferable that the motor driven by the motor control device is for driving a robot joint, and the encoder for position detection is coupled to the motor or the driven joint.

また、前記位置・速度検出装置において、A相計数
器、B相計数器、零値計数器を各々一対の計数器で構成
し、一方の計数器の計数終了時に他方の計数器に計数開
始させる手段を備えたものがよい。
In the position / velocity detecting device, the A-phase counter, the B-phase counter, and the zero-value counter are each constituted by a pair of counters, and when one of the counters finishes counting, the other counter starts counting. It is better to have means.

次に、上記位相ずれがある場合の検出誤差を低減する
という目的を達成するために、移動体の位置・検出につ
いては、移動体の等速動作区間において、タイマにより
エンコーダのパルス発生間隔を検出することによりエン
コーダ2相原信号位相差の90゜からの位相ずれを検出
し、エンコーダ原信号,1/4周期位置,移動方向との関係
を記憶し、通常動作開始時及び移動方向変化時にエンコ
ーダ原信号の1/4周期位置を検出することにより、エン
コーダパルスを基準となる1/4周期位置より2パルス(1
80゜)毎に計数することにより、粗位置を検出し、180
゜間をエンコーダ2相原信号,零値信号,移動方向,位
相ずれに基づき逆正接演算を行うことにより微細位置
(補間量)を求め、粗位置と微細位置の和として位置を
求めるようにしたものである。
Next, in order to achieve the purpose of reducing the detection error when there is a phase shift, for the position and detection of the moving body, the pulse generation interval of the encoder is detected by the timer in the constant speed operation section of the moving body. By detecting the phase difference of the encoder two-phase original signal phase difference from 90 °, the relationship between the encoder original signal, the quarter cycle position, and the moving direction is stored. By detecting the quarter period position of the signal, two pulses (1
The coarse position is detected by counting every
The fine position (interpolation amount) is obtained by performing arctangent calculation based on the encoder two-phase original signal, the zero value signal, the moving direction, and the phase shift, and the position is obtained as the sum of the coarse position and the fine position. It is.

すなわち、本発明に係る移動体の位置・速度検出方法
は、移動体に接続されたエンコーダにより、ある時刻の
位置・速度を求める際に、移動体移動時にエンコーダ2
相原信号が零値を切る時刻に発生するエンコーダパルス
を計数することにより粗位置を検出し、エンコーダ2相
信号と零値信号をもとに前記エンコーダパルス間の微細
位置(補間量)を検出し、粗位置と微細位置の和として
位置を検出し、その位置の変化量に基づき速度を検出す
る移動体の位置・速度検出方法において、移動体の等速
度動作にエンコーダパルスの時間間隔を計時し、あわせ
てその間隔におけるエンコーダ2相原信号の正負より定
まるエンコーダの1/4周期位置q(正転時、逆転時共に
0→1→2→3→0となるよう各移動方向につき番号付
けられる)及び移動方向S(正転:1,逆転:−1)を検
出し、特定の連続するq値(例えばq=0,1)を有する
エンコーダパルス間隔tq=0,tq=1より次式により
エンコーダ2相原信号の90゜からの位相ずれを検出・
記憶し、 次に、移動体の通常動作中における移動方向変化時の
変化直前・直後のエンコーダ2相原信号の1/4周期位置q
1,q2{ただし、通常動作開始時のq値はq2とし、整数x
の整数yの剰余をmody(x)と表記する場合、q1=mod4
(q2−1)}及びサンプリング時の1/4周期位置qを検
出し、基準となる1/4周期位置(例えばq=0)より2
パルス毎に粗位置を計数するよう計数値を補正する方法
をとり、サンプリング時のエンコーダパルス計数値P0,
回転角度/エンコーダパルス数=k2,移動方向変化直前
・直後の移動方向S1,S2(正転:1,逆転:−1,但し、通常
動作開始時はS2:移動方向,S1:移動方向と反対方向とす
る)とした場合、粗位置θを次式で求め、 (i)移動方向変化時からmod2(q)=1となるまで θ=k2{P0+S1・mod2(q2)} (ii)移動方向変化後でmod2(q)=1となった後 θ=k2{P0−S2・mod2(q)} 微細位置θはエンコーダパルス2パルス分の範囲
(エンコーダ原信号の位相180゜分)を補間するよう
に、エンコーダ2相原信号,零値信号,移動方向,1/4周
期位置及び位相ずれをもとに逆正接演算(例えば、サン
プリング時のエンコーダ2相原信号瞬時値eA,eB,零値信
号瞬時値eC,位相ずれ,移動方向Sとし、例えば次式
において、 S,,eA,eB,eCを与えてθを求める)を行うことによ
り求め、位置θを粗位置θと微細位置θの和として
検出するものである。
That is, in the method for detecting the position and speed of the moving body according to the present invention, when the position and speed at a certain time are obtained by the encoder connected to the moving body,
The coarse position is detected by counting the encoder pulses generated at the time when the phase original signal crosses the zero value, and the fine position (interpolation amount) between the encoder pulses is detected based on the encoder two-phase signal and the zero value signal. In the method of detecting the position and speed of a moving body, which detects a position as a sum of a coarse position and a fine position and detects a speed based on a change amount of the position, a time interval of an encoder pulse is measured for a constant speed operation of the moving body. In addition, the quarter period position q of the encoder determined by the sign of the encoder two-phase original signal at that interval (numbers are assigned to each moving direction so that 0 → 1 → 2 → 3 → 0 for both forward and reverse rotations) And the moving direction S (normal rotation: 1, reverse rotation: -1) is detected, and encoder pulse intervals tq = 0 and tq = 1 having specific continuous q values (for example, q = 0, 1) are obtained from the following equation. 2 phase original signal of encoder Detecting a phase shift of 90 ° -
Remember, Next, a quarter cycle position q of the encoder two-phase original signal immediately before and immediately after the change in the moving direction during the normal operation of the moving body
1 , q 2 {However, the q value at the start of normal operation is assumed to be q 2 and the integer x
If the remainder of the integer y is expressed as mod y (x), q 1 = mod 4
(Q 2 -1)} and a quarter period position q at the time of sampling are detected, and two quarters from the reference quarter period position (eg, q = 0) are detected.
A method of correcting the count value so as to count the coarse position for each pulse is employed, and the encoder pulse count value P 0 ,
Rotation angle / encoder pulse number = k 2 , movement direction S 1 , S 2 just before and after change in movement direction (forward: 1, reverse: −1, but when normal operation starts, S 2 : movement direction, S 1 : The direction opposite to the moving direction), the rough position θ R is calculated by the following equation. (I) θ R = k 2 {P 0 + S from the time when the moving direction changes until mod 2 (q) = 1 1 · mod 2 (q 2 )} (ii) After mod 2 (q) = 1 after changing the moving direction θ R = k 2 {P 0 −S 2 · mod 2 (q)} Fine position θ F Is the arctangent based on the encoder two-phase original signal, zero value signal, moving direction, quarter period position and phase shift so as to interpolate the range of two encoder pulses (180 ° phase of the encoder original signal). operation (e.g., an encoder 2 Aihara signal instantaneous value e a the time of sampling, e B, zero value signal instantaneous value e C, out of phase, and a moving direction S, for example, in the formula, S ,, e A , e B , e C are given to obtain θ F ), and the position θ is detected as the sum of the coarse position θ R and the fine position θ F.

前記位置・速度検出位置において、移動体の初期動作
(インクリメンタル方式エンコーダを用いた場合は、原
点復帰動作及び通常動作開始位置への移動,絶対番地方
式のエンコーダを用いた場合は通常動作開始位置への移
動)時の等速動作区間を利用してエンコーダパルス間隔
を計時し、エンコーダ2相原信号位相差の90゜からの位
相ずれを検出するものがよい。また、移動体の移動方向
検出をエンコーダ原信号をパルス化する際に得られる粗
検出と、エンコーダパルス間における微細位置の変化量
の符号変化から検出する微細検出とから求めるものがよ
い。また、移動体の通常動作時の等速区間において、エ
ンコーダのパルス間隔,1/4周期位置及び移動方向を検出
・記憶し、エンコーダ2相原信号の位相差の90゜からの
位相ずれを演算・記憶し、サンプリング時にサンプリン
グ直前に検出された位相ずれに基づき逆正接を演算し、
微細位置を検出するものがよい。また、微細位置検出に
当り、正弦波状エンコーダ2相原信号及び零値信号を電
圧制御発振器に通すことにより正弦波状周波数分布を有
するパルス列に変換し、エンコーダのパルス検出時から
サンプリング時までのパルス数を計数し、エンコーダパ
ルス検出時からサンプリング時までの2相正弦波積分量
相当値より、逆正接演算を行うことにより微細位置を検
出するものがよい。また、微細位置検出に当り、サンプ
リング時にエンコーダ2相原信号と零値信号をサンプリ
ングホールドし、A/D変換し、サンプリング時の2相正
弦波瞬時値より逆正接演算を行うことにより微細位置を
検出するものがよい。
At the position / velocity detection position, the initial operation of the moving body (when using an incremental encoder, return to origin and move to the normal operation start position; when using an absolute address encoder, move to the normal operation start position) It is preferable to measure the encoder pulse interval by using the constant velocity operation section during (movement of) and detect the phase shift of the encoder 2-phase original signal phase difference from 90 °. Further, it is preferable that the detection of the moving direction of the moving body is performed based on the rough detection obtained when the encoder original signal is pulsed and the fine detection detected from the sign change of the change amount of the fine position between the encoder pulses. In addition, the encoder pulse interval, 1/4 cycle position, and moving direction are detected and stored in the constant velocity section during normal operation of the moving object, and the phase shift from the encoder 2-phase original signal phase difference of 90 ° is calculated. Calculate the arc tangent based on the phase shift detected immediately before sampling at the time of sampling,
What detects a fine position is good. In addition, when detecting a fine position, the sine wave encoder two-phase original signal and zero value signal are passed through a voltage controlled oscillator to be converted into a pulse train having a sine wave frequency distribution, and the number of pulses from the encoder pulse detection to sampling is calculated. It is preferable to detect the fine position by counting and performing arctangent calculation from the value corresponding to the two-phase sinusoidal wave integral amount from the encoder pulse detection time to the sampling time. In addition, when detecting the fine position, the encoder two-phase original signal and zero value signal are sampled and held during sampling, A / D converted, and the arctangent calculation is performed from the two-phase sine wave instantaneous value at sampling to detect the fine position. What you do is good.

また、本発明に係る移動体の位置・速度検出装置は、
移動体に接続されたエンコーダによる移動体の位置・速
度検出装置において、エンコーダのパルス間隔を検出す
るタイマと、1/4周期位置検出回路と、各移動方向S
(正転時1,逆転時−1)につき、エンコーダ2相原信号
の位相差の90゜からの位相ずれ(0)及び1/4周期位
置qより2相原信号瞬時値比もしくは積分量相当値比に
対応する逆正接データ{例えばq=0の場合S・sinθF
/cos(θ+)}より微細位置θを探索可能なデー
タの記憶されたROMを有することを特徴とするものであ
る。ここで、エンコーダ2相原信号よりエンコーダパル
ス及び移動方向弁別信号を発生する波形整形回路と前記
エンコーダパルスにより粗位置を検出するアップ・ダウ
ン計数器と、その粗位置をサンプリング時間毎にサンプ
リング信号を発生するサンプリング・パルス・タイマか
らの当該サンプリング時間に同期化させる一時記憶回路
とを備えた粗位置検出部と、エンコーダ2相原信号及び
零値信号を入力としてバイアスされた出力電圧を発生さ
せるバイアス電圧印加回路,前記バイアス電圧印加回路
出力が入力となり、入力電力により異なる周波数のパル
ス列を発生する電圧制御発振器,前記エンコーダパルス
及びサンプリングパルスがゲート信号となり前記電圧制
御発振器より送出される3種のパルス列の計数を開始・
終了する計数器とを備えた微細位置検出部と、前記各検
出部の動作制御を行う中央処理部とを備えたものがよ
い。
In addition, the position / speed detection device of the moving body according to the present invention,
In a position / speed detecting device for a moving body using an encoder connected to the moving body, a timer for detecting a pulse interval of the encoder, a 1/4 cycle position detecting circuit, and each moving direction S
For (forward rotation 1, reverse rotation -1), the phase difference (0) of the phase difference of the encoder two-phase original signal from 90 ° and the two-phase original signal instantaneous value ratio or integral value ratio from the quarter period position q Arc tangent data corresponding to {For example, when q = 0, S · sin θ F
It is characterized by having a ROM in which data capable of searching the fine position θ F from / cos (θ F +)} is stored. Here, a waveform shaping circuit for generating an encoder pulse and a moving direction discrimination signal from an encoder two-phase original signal, an up / down counter for detecting a coarse position by the encoder pulse, and a sampling signal for generating the coarse position for each sampling time A coarse position detection unit having a temporary storage circuit for synchronizing with the sampling time from a sampling pulse timer to be applied, and applying a bias voltage for generating an output voltage biased with an encoder two-phase original signal and a zero-value signal as inputs. Circuit, a voltage-controlled oscillator that receives the output of the bias voltage applying circuit as input, and generates a pulse train of a different frequency depending on the input power, and counts three types of pulse trains sent from the voltage-controlled oscillator, with the encoder pulse and the sampling pulse as gate signals. Start
It is preferable to include a fine position detecting unit having a counter for ending and a central processing unit for controlling the operation of each detecting unit.

また、前記装置において、エンコーダ2相原信号より
エンコーダパルス及び移動方向弁別信号を発生する波形
整形回路と前記エンコーダパルスにより粗位置を検出す
るアップ・ダウン計数器と、その粗位置をサンプリング
時間毎にサンプリング信号を発生するサンプリング・パ
ルス・タイマからの当該サンプリング時間に同期化させ
る一時記憶回路とを備えた粗位置検出部と、エンコーダ
2相原信号及び零値信号にバイアス電圧を印加するバイ
アス電圧印加回路と、前記各信号をサンプリング・パル
スに同期してサンプルホールドするサンプルホールダ
と、サンプルホールダ出力をA/D変換するA/D変換器とを
備えた微細位置検出部と、前記各検出部の動作制御を行
う中央処理部とを備えたものがよい。
In the apparatus, a waveform shaping circuit for generating an encoder pulse and a moving direction discrimination signal from an encoder two-phase original signal, an up / down counter for detecting a coarse position by the encoder pulse, and sampling the coarse position for each sampling time A coarse position detection unit having a temporary storage circuit for synchronizing with a sampling time from a sampling pulse timer for generating a signal; a bias voltage application circuit for applying a bias voltage to an encoder two-phase original signal and a zero-value signal; A fine position detection unit including a sample holder for sampling and holding each signal in synchronization with a sampling pulse, an A / D converter for A / D converting the output of the sample holder, and operation control of each detection unit And a central processing unit for performing the above.

また、前記装置において、移動体と接続されたエンコ
ーダがインクリメンタル方式でのもので構成され、移動
体の移動限界位置のみで検出される限界位置検出部と真
の原点位置近傍の原点位置で検出されるステップ状の原
点位置検出部とを有し、原点位置の各移動方向の可動範
囲でその段差を保ち移動体と一体的に駆動される被検出
体と、移動体の移動限界両端位置に配置されそれぞれ前
記被検出体の限界位置検出部を検出する限界位置検出セ
ンサと、前記真の原点位置近傍の前記原点位置に配置さ
れ前記被検出体の原点位置検出部が原点位置にあるかま
たは原点位置両側のどちらの領域にあるかを検出する原
点位置検出センサと、移動体と結合された衝突部材と、
移動体が移動限界位置を越えて移動した際前記衝突部材
と当接し移動体の移動を停止するストッパとを備えたも
のがよい。
Further, in the device, the encoder connected to the moving body is configured by an incremental system, and a limit position detecting unit that is detected only at a movement limit position of the moving body and an origin position near a true origin position are detected. A step-like origin position detecting section, which is located at both ends of the moving limit of the moving body, with the detected body being driven integrally with the moving body while maintaining the step in the movable range of the origin position in each moving direction. And a limit position detection sensor for detecting a limit position detection unit of the object to be detected, and an origin position detection unit of the object to be detected which is disposed at the origin position near the true origin position or is at the origin position. An origin position detection sensor that detects which region is on both sides of the position, a collision member coupled to the moving body,
It is preferable that the movable body is provided with a stopper that comes into contact with the collision member and stops the movement of the movable body when the movable body moves beyond the movement limit position.

また、前記装置において、移動体の位置・速度検出装
置を移動体を駆動するモータのモータ制御装置と接続
し、モータ制御方法に関するプログラムを中央処理部に
備えているものがよい。ここで、モータ制御装置により
駆動されるモータがロボット関節駆動用であり、位置検
出用エンコーダがモータもしくは駆動される関節に結合
されているものがよい。
In the above device, it is preferable that the position / speed detecting device of the moving body is connected to a motor control device of a motor for driving the moving body, and a program relating to a motor control method is provided in the central processing unit. Here, it is preferable that the motor driven by the motor control device is for driving a robot joint, and the encoder for position detection is coupled to the motor or the driven joint.

また、移動体の原点位置復帰方法については、移動体
と結合された原点位置検出部を有する被検出体を原点位
置でステップ状の段差を有し、両移動方向の動作範囲内
でその段差を保つ構造とすることにより、原点位置検出
センサ1ヶで原点位置と、原点位置に対していずれの移
動方向側にあるかの領域判別を行うことができ、原点復
帰動作アルゴリズムを簡略化できるようにした。また、
本原点復帰方法等の前記移動体の初期動作時に位相ずれ
を検出を行うことにより、移動体の無駄な動作を省略で
きるようにしたものである。
As for the method of returning the origin position of the moving body, the detected body having the origin position detecting unit coupled to the moving body has a step-like step at the origin position, and the step is made within the operating range in both moving directions. With this structure, the origin position detection sensor can discriminate the origin position and the area of the moving direction relative to the origin position, and the origin return operation algorithm can be simplified. did. Also,
By detecting the phase shift during the initial operation of the moving body such as the present origin returning method, unnecessary movement of the moving body can be omitted.

すなわち、本発明に係る移動体の位置・速度検出方法
は、インクリメンタル方式のエンコーダを有するサーボ
モータにより駆動される移動体の原点位置復帰方法にお
いて、動作開始時に検出センサにより移動体が原点位置
に対して、いずれの側にあるかを検出し、移動体を原点
位置方向へ移動し、等速区間において、初期動作時の位
相ずれ検出を行い、真の原点位置近傍に設けられている
原点位置を検出センサにより検出し、次に原点位置に対
してエンコーダZ相(真の原点位置)が検出される方向
に移動体を移動し、エンコーダZ相が検出されると移動
体の移動が停止されるものである。
That is, the method for detecting the position and speed of a moving object according to the present invention is a method for returning to the origin position of a moving object driven by a servomotor having an incremental encoder. To detect which side it is on, move the moving body in the direction of the origin, detect the phase shift during the initial operation in the constant velocity section, and determine the origin located near the true origin. The moving body is moved in the direction in which the encoder Z phase (true origin position) is detected with respect to the origin position after detection by the detection sensor, and the movement of the moving body is stopped when the encoder Z phase is detected. Things.

〔作用〕[Action]

移動体と接続されたエンコーダは、その移動部に一定
間隔毎に目盛が設けられており、それに光を照射するこ
とによりフォトダイオードで目盛の移動を検出する(光
学式)もしくは磁気センサで目盛の移動を検出する(磁
気式)ことにより90゜位相の異なる2相の正弦波状のエ
ンコーダ原信号(A相,B相)が得られる。A,B相互いの
位相の進み・遅れは移動体の移動方向に依存する。
The encoder connected to the moving body is provided with graduations at regular intervals in its moving part, and by irradiating light to the graduations, the movement of the graduation is detected by a photodiode (optical type) or the graduation is measured by a magnetic sensor. By detecting the movement (magnetic type), two-phase sinusoidal encoder original signals (A-phase and B-phase) having a 90 ° phase difference can be obtained. The phase lead / lag between A and B depends on the moving direction of the moving body.

本位置・速度検出装置は、波形整形回路によりエンコ
ーダ原信号をその零点位置におけるパルス列に変換し、
計数器で計数することにより粗位置を算出する。また、
パルス間を補間するため、エンコーダ原信号をバイアス
し、電圧可変抵抗と接続することにより、電圧可変抵抗
の印加電圧と抵抗が反比例関係にある電圧領域で利用で
きる。このような特性の電圧可変抵抗を有する発振器を
発振させることにより、エンコーダ原信号入力端子にお
ける印加電圧と発振器発振周波数が一次関数関係となる
ようにする。
This position / speed detection device converts the encoder original signal into a pulse train at its zero point position by a waveform shaping circuit,
The coarse position is calculated by counting with a counter. Also,
In order to interpolate between pulses, the encoder original signal is biased and connected to a voltage variable resistor, so that it can be used in a voltage region where the applied voltage of the voltage variable resistor and the resistance are in inverse proportion. By oscillating an oscillator having a voltage variable resistor having such characteristics, the applied voltage at the encoder original signal input terminal and the oscillator oscillation frequency have a linear function relationship.

これにより、発振器発振パルス数をエンコーダパルス
発生時からサンプリング時まで計数することにより、エ
ンコーダ原信号の同時刻間の積分量に相当する量をうる
ことができ、三角関係演算により補間量(微細位置)を
求めることができる。
Thus, by counting the number of oscillator oscillation pulses from the time of encoder pulse generation to the time of sampling, an amount corresponding to the integral amount of the encoder original signal at the same time can be obtained. ) Can be asked.

また、サンプリング周期の間にエンコーダパルスが発
生しない場合は、前回のエンコーダパルス発生時から積
算パルス数を求め、三角関数演算を行うことにより同様
に補間量(微細位置)を求めることができる。
If no encoder pulse is generated during the sampling period, the number of integrated pulses is calculated from the previous generation of the encoder pulse, and the amount of interpolation (fine position) can be similarly calculated by performing a trigonometric function operation.

前述の粗位置と微細位置を加算することにより精密な
位置をうることができる。前述の発振器発振パルス計数
値は大きい値を示すため、部分的に大きいノイズがエン
コーダ原信号に重畳された場合もその影響を受けにくい
高分解能の位置・速度検出が可能となる。
A precise position can be obtained by adding the coarse position and the fine position described above. Since the above-mentioned oscillator oscillation pulse count value shows a large value, even when a partially large noise is superimposed on the encoder original signal, a high-resolution position / speed detection which is not easily affected by the noise can be performed.

また、移動体と接続されたエンコーダは、一定間隔毎
に被検出格子が設けられており、移動体が移動するとほ
ぼ90゜位相差のある零ボルトを中心とした2相の正弦波
状原信号を発生する。ここで、移動方向により位相差の
符号は異なる。エンコーダ2相原信号は波形整形回路に
通すことにより、各正弦波状信号の零交差位置(ほぼ1/
4周期毎)にパルスを発生し、更に移動方向弁別信号を
発生する。移動速度が大きくなると正弦波の周期が短く
なるため一定時間に発生するパルス数が多くなる。移動
体の位置・速度は、高速動作時はこのパルス数を計数す
るのみでも、ある程度正確に検出可能であるが、低速動
作時はサンプリング周期内に発生するパルス数が少なく
なり、全く無い場合もあり、パルス間の補間を行う必要
が生ずる。正弦波状のエンコーダ2相原信号をもとに逆
正接を求めて補間位置を求める方法は、その検出分解能
を高めることにより補間位置を高分解能で求めることが
可能である。この方法は、サンプリング時の2相信号と
零信号の差の商に相当する量から逆正接演算を行うた
め、エンコーダ2相信号の振幅変動,零点ドリフトの影
響を受けにくいという長所がある。しかし、エンコーダ
2相原信号位相差に90゜から位相ずれがある場合、90゜
位相差を仮定した逆正接演算を行うため、検出誤差が大
きくなるという短所がある。
In addition, the encoder connected to the moving body is provided with a detection target grid at regular intervals, and when the moving body moves, a two-phase sinusoidal original signal centered on zero volt having a phase difference of about 90 ° is generated. Occur. Here, the sign of the phase difference differs depending on the moving direction. The encoder two-phase original signal is passed through a waveform shaping circuit to determine the zero-crossing position (approximately 1 /
A pulse is generated every four cycles), and a moving direction discrimination signal is generated. As the moving speed increases, the period of the sine wave becomes shorter, so that the number of pulses generated in a certain time increases. The position and speed of the moving object can be detected to some extent accurately only by counting the number of pulses during high-speed operation, but the number of pulses generated within the sampling period decreases during low-speed operation Therefore, it becomes necessary to perform interpolation between pulses. In the method of obtaining the arc tangent based on the sinusoidal encoder two-phase original signal to obtain the interpolation position, it is possible to obtain the interpolation position with high resolution by increasing the detection resolution. This method has an advantage in that the arc tangent operation is performed from the amount corresponding to the quotient of the difference between the two-phase signal and the zero signal at the time of sampling, so that the method is less susceptible to amplitude fluctuation and zero point drift of the encoder two-phase signal. However, when there is a phase shift from 90 ° in the phase difference of the encoder two-phase original signal, the arc tangent calculation assuming the 90 ° phase difference is performed, so that there is a disadvantage that a detection error increases.

本発明で着目した点は、ほぼ1/4周期毎に発生するエ
ンコーダパルスは、上記位相ずれがある場合にも1パル
ス置きに計数すれば、2パルス間隔は180゜であること
を利用し、エンコーダパルスに基づく粗位置検出はある
基準の1/4周期位置より2パルス毎に計数することによ
り行い、180゜間の微細位置検出は、初期動作時に上記
位相ずれを検出し、通常動作サンプリング時の1/4周期
位置,位相ずれ,移動方向,エンコーダ2相原信号及び
零値信号に基づき位相ずれを考慮した正接を演算するこ
とにより行う構成とした。これにより、エンコーダ2相
原信号位相差の90゜からの位相ずれは補正され、低速動
作時にも正確な位置が検出できる。
The point focused on in the present invention is that the encoder pulse generated almost every quarter cycle is counted at every other pulse even if there is the phase shift, and that the interval between two pulses is 180 °, Coarse position detection based on encoder pulses is performed by counting every two pulses from a quarter period position of a certain reference, and fine position detection for 180 ° is detected during the initial operation by detecting the above phase shift, during normal operation sampling The tangent is calculated by taking into account the phase shift based on the 1/4 cycle position, the phase shift, the moving direction, the encoder two-phase original signal and the zero value signal. As a result, the phase shift of the encoder two-phase original signal phase difference from 90 ° is corrected, and an accurate position can be detected even during low-speed operation.

また、移動体の原点位置復帰方法においては、移動体
と結合された原点位置・領域判別用被検出体を原点位置
でステップ状段差を有し、各移動方向可動範囲内でその
段差を保つ構造とすることにより、原点位置検出センサ
は、初期位置の信号レベルにより、移動体が原点位置に
対していずれの側にあるかを検出することができ、ステ
ップ状段差部で原点位置を検出することができ、領域判
別センサを別に設ける必要が無くなり、また、原点位置
復帰動作アルゴリズムを簡略化することができる。更
に、本原点位置復帰動作中にエンコーダ2相原信号の90
゜からの位相ずれを検出することにより、前記移動の位
置・速度検出を移動体の無駄な動作を省いて行うことが
できる。
In addition, in the method of returning the origin position of the moving body, the origin position / area discriminating detection target combined with the moving body has a step-like step at the origin position, and the step is maintained within the movable range in each moving direction. With this, the origin position detection sensor can detect which side the moving body is with respect to the origin position based on the signal level of the initial position, and detect the origin position with the step-shaped step portion. Therefore, it is not necessary to separately provide an area determination sensor, and the algorithm for returning to the original position can be simplified. In addition, during the home position return operation, 90
By detecting the phase shift from ゜, the detection of the position and speed of the movement can be performed without unnecessary use of the moving body.

〔実施例〕〔Example〕

以下、本発明の第1の実施例を第1図〜第8図,第11
図〜第13図を用いて説明する。第1図は本発明の位置・
速度検出のタイムチャート図を示し、第2図は本発明の
位置・速度検出装置のブロック図を示し(図中破線部は
第2の実施例で用いられる)第3図は1/4周期位置とエ
ンコーダ原信号の正負及び移動方向との関係を示し、第
4図は本発明の位置・速度検出方法のフローチャート図
を示し、第5図は本実施例の電圧制御発振器の回路図を
示し、第6図は本発明のバイアス電圧印加回路と電圧可
変抵抗の例を示し、第7図は第5図の電圧制御発振器を
第2図の位置・速度検出装置に適用した場合のA点印加
電圧と電圧制御発振器の発振周波数の関係を示し、第8
図は第6図に示した電圧可変抵抗の抵抗値と入力電圧の
関係を示し、第11図,第12図は第5図に示した電圧制御
発振器の発振周波数と受動素子特性値の関係を示し、第
13図はサンプリング周期がエンコーダパルス発生周期と
比して小さい場合の位置検出のタイムチャート図を示し
ている。
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS.
This will be described with reference to FIGS. FIG. 1 shows the position of the present invention.
FIG. 2 shows a time chart of speed detection, FIG. 2 shows a block diagram of a position / speed detection device of the present invention (the broken line part is used in the second embodiment), and FIG. FIG. 4 shows a flow chart of a position / speed detection method of the present invention, FIG. 5 shows a circuit diagram of a voltage controlled oscillator of the present embodiment, FIG. 6 shows an example of the bias voltage applying circuit and the voltage variable resistor of the present invention, and FIG. 7 shows the voltage applied to the point A when the voltage controlled oscillator of FIG. 5 is applied to the position / speed detecting device of FIG. And the oscillation frequency of the voltage controlled oscillator,
The figure shows the relationship between the resistance value of the voltage variable resistor shown in FIG. 6 and the input voltage. FIGS. 11 and 12 show the relationship between the oscillation frequency of the voltage controlled oscillator shown in FIG. 5 and the characteristic value of the passive element. Shown,
FIG. 13 shows a time chart of position detection when the sampling cycle is smaller than the encoder pulse generation cycle.

まず位置・速度検出装置の全体構成を第2図及び第1
図を用いて説明する。移動体と接続されたエンコーダよ
り発生する2相はエンコーダ原信号が粗位置検出部36,
微細位置検出部37に送られる。粗位置検出部36は波形整
形回路1とアップ・ダウン計数器2より構成される。波
形整形回路1は波形整形,エンコーダA,B相の零クロス
時のパルス発生(T1信号),移動体の移動方向弁別信号
発生(S2信号)を行う。アップ・ダウン計数器2はT1
号が移動方向毎に2チャンネルで入力されるため、正方
向移動パルス数と逆方向移動パルス数が計数され、サン
プリング・パルス・タイマ6により発生されるサンプリ
ング・パルスに同期して一時記憶回路3にラッチされ
る。
First, FIG. 2 and FIG.
This will be described with reference to the drawings. The two phases generated by the encoder connected to the moving body are such that the original encoder signal is the coarse position detector 36,
It is sent to the fine position detection unit 37. The coarse position detector 36 is composed of a waveform shaping circuit 1 and an up / down counter 2. The waveform shaping circuit 1 performs waveform shaping, pulse generation at the zero crossing of encoders A and B phases (T 1 signal), and movement direction discrimination signal generation (S 2 signal) of the moving body. In the up / down counter 2, since the T 1 signal is input in two channels for each moving direction, the number of forward moving pulses and the number of backward moving pulses are counted and the sampling pulse generated by the sampling pulse timer 6 is counted. It is latched in the temporary storage circuit 3 in synchronization with the pulse.

また、微細位置検出部37はバイアス電圧印加回路4,電
圧制御発振器5,A相計数器7,B相計数器8及び零値計数器
9より構成される。微細位置検出部37にエンコーダ原信
号が送られるとまずバイアス電圧印加回路4でバイアス
された電圧波形となる。これは電圧制御発振器5の中に
設けられた電圧可変抵抗が印加電圧−抵抗値が双曲線特
性を示す印加電圧レベルの中央に零値を設定する機能を
有する。電圧制御発振器5は電圧可変抵抗を抵抗要素と
して含むCR発振回路により構成されており、電圧可変抵
抗の印加電圧と発振周波数は一次関数関係となるように
設定されている。従って、正弦波状のエンコーダ原信号
が微細位置検出部37に入力されると、A,B相バイアス電
圧信号は、正弦波状の周波数分布を有するパルス列に変
換され、零値バイアス電圧信号は均一周波数のパルス列
に変換される(第1図参照)。A,B相及び零値計数器
は、T1信号によりリセットされて計数開始し、サンプリ
ングパルスにより一時記憶回路にラッチすることによ
り、第1図中央に斜線で示す計数器出力が得られる。サ
ンプリングされないT1信号のパルス間では計数値は記憶
されずにリセットされる。また各移動方向につきエンコ
ーダパルス(T1信号)発生区間において、エンコーダ2
相原信号の正負関係は一定であり、正負関係により番号
づけられる区間位置を1/4周期位置と呼ぶ。1/4周期位置
は各移動方向に0→1→2→3→0となるよう第3図の
ように番号づけられており、1/4周期位置検出回路15に
より検出される。この装置には粗位置検出部36、微細位
置検出部37等を上位で制御するCPU12、逆正接テーブル
等有するROM13、プログラム領域を有するRAM14等がデー
タバス10、アドレスバス11を介して接続されている。
The fine position detector 37 is composed of a bias voltage applying circuit 4, a voltage controlled oscillator 5, an A phase counter 7, a B phase counter 8 and a zero value counter 9. When the encoder original signal is sent to the fine position detection unit 37, the voltage waveform is firstly biased by the bias voltage application circuit 4. This has a function that the voltage variable resistor provided in the voltage controlled oscillator 5 sets a zero value at the center of the applied voltage level at which the applied voltage-resistance value shows a hyperbolic characteristic. The voltage controlled oscillator 5 is composed of a CR oscillation circuit including a voltage variable resistor as a resistance element, and the applied voltage of the voltage variable resistor and the oscillation frequency are set to have a linear function relationship. Therefore, when the sinusoidal encoder original signal is input to the fine position detector 37, the A and B phase bias voltage signals are converted into a pulse train having a sinusoidal frequency distribution, and the zero-value bias voltage signal has a uniform frequency. It is converted into a pulse train (see FIG. 1). The A, B-phase and zero-value counters are reset by the T 1 signal to start counting, and are latched in the temporary memory circuit by the sampling pulse, whereby the counter output shown by the shaded area in the center of FIG. 1 is obtained. Count values are between pulses of T 1 signals not sampled is reset without being stored. In addition the encoder pulses per direction of movement (T 1 signal) generation section, the encoder 2
The positive / negative relationship of the phase original signal is constant, and the section position numbered by the positive / negative relationship is called a quarter period position. The 1/4 cycle position is numbered as 0 → 1 → 2 → 3 → 0 in each moving direction as shown in FIG. 3, and is detected by the 1/4 cycle position detection circuit 15. The coarse position detection unit 36, the CPU 12 for controlling the fine position detection unit 37 and the like at a higher level, the ROM 13 having the arctangent table and the like, the RAM 14 having the program area and the like are connected via the data bus 10 and the address bus 11. I have.

次に電圧制御発振器5の構成及び動作について第5図
及至第8図、第11図及び第12図を用いて説明する。電圧
制御発振器5の回路構成例を第5図に示した。本発振回
路は抵抗18〜20、コンデンサ12、インバータ素子22〜24
により構成され、インバータ素子22,23が直流電源とし
て作用し、コンデンサ21の充放電に伴うラインバータ素
子22,23入力側の電位が各側のしきい電圧値を越える度
にインバータ素子22,23の入出力側の信号レベルが反転
することを利用して発振する動作原理となっている。イ
ンバータ素子24は波形整形の役割をはたす。インバータ
素子として信号の立上り時間の極めて短いトランジスタ
・トランジスタ・ロジック回路42S04を用いた場合、R1
+R3(Ω),R2(Ω),C()を可変として実験を行っ
た所、発振周波数f(Hz)と上記受動素子値の間に発振
限界付近から離れた領域でほぼ次式(3)の関係がなり
たつことがわかった(第11図、第12図参照)。
Next, the configuration and operation of the voltage controlled oscillator 5 will be described with reference to FIGS. 5 to 8, 11 and 12. FIG. 5 shows an example of a circuit configuration of the voltage controlled oscillator 5. This oscillation circuit has resistors 18-20, capacitor 12, inverter elements 22-24
The inverter elements 22 and 23 act as a DC power supply, and each time the potential on the input side of the inverter elements 22 and 23 accompanying charging and discharging of the capacitor 21 exceeds the threshold voltage value on each side, the inverter elements 22 and 23 The operation principle is based on the fact that the signal level on the input / output side is inverted. The inverter element 24 plays a role of waveform shaping. When a transistor / transistor / logic circuit 42S04 having an extremely short signal rise time is used as an inverter element, R 1
+ R 3 (Ω), R 2 (Ω), and C ( F ) were made variable, and the following equation was obtained between the oscillation frequency f ( Hz ) and the above passive element value in a region away from the vicinity of the oscillation limit. It was found that the relationship of (3) was established (see FIGS. 11 and 12).

式(3)中の定数はトランジスタ・トランジスタ・ロ
ジック回路内のトランジスタの特性値、抵抗値などの諸
定数から決まる値であり、他のインバータ素子を用いた
場合は変化すると考えられるが、各受動素子特性値間の
定性的関係は十分示す式であると考えられ、本発振回路
の発振周波数は一般に次式(4)で示されると考えられ
る。(ただしα,β,γは正の定数である) また、第11図、第12図からわかるように、R1+R3、R2
を増大させると発振周波数fは下がるが、インバータ素
子22,23の入出力端許容電流から定まる発振限界が存在
し、発振周波数fの可変域は限られる。
The constant in the equation (3) is a value determined from various constants such as the characteristic value and resistance value of the transistor in the transistor, the transistor, and the logic circuit, and it is considered that it changes when other inverter elements are used. The qualitative relationship between the element characteristic values is considered to be a sufficiently expressed equation, and the oscillation frequency of the present oscillation circuit is generally considered to be expressed by the following equation (4). (However, α, β, γ are positive constants) Also, as can be seen from FIGS. 11 and 12, R 1 + R 3 , R 2
Is increased, the oscillation frequency f decreases, but there is an oscillation limit determined by the input / output terminal allowable current of the inverter elements 22 and 23, and the variable range of the oscillation frequency f is limited.

第5図ではR1を電圧可変抵抗としていることから、R1
が電圧可変抵抗印加電圧Vと次式(5)で示す反比例関
係にあり、R00+R3=γ,R2一定とすると、前記式(4)
は次式(6)の形となり、発振周波数fと印加電圧Vの
間に一次関数関係が成立する。
In FIG. 5, since R 1 is a voltage variable resistor, R 1
Is inversely proportional to the voltage V applied to the voltage variable resistance as shown in the following equation (5), and if R 00 + R 3 = γ, R 2 is constant, the above equation (4)
Has the form of the following equation (6), and a linear function relationship is established between the oscillation frequency f and the applied voltage V.

R1=δ/(V+ε)+R00 ……(5) 抵抗値と印加電圧の間に反比例関係の成りたつ材料と
して、例えばFeNi合金からなる磁気抵抗素子は、第6図
に示すよう1次側でコイルに電圧を印加し、電磁石を構
成すると第8図に示す特性が得られるため、コイル印加
電圧VがVα≦V≦Vβの範囲内では双曲線特性を近似
することが可能である。Vα,Vβの中間値V00がバイア
ス電圧となるように、例えば第6図に示すようなバイア
ス電圧印加回路によりバイアス電圧を印加し、エンコー
ダ原信号の最大最小電圧印加時にコイル印加電圧がVα
以上Vβ以下となるよう設定すれば、エンコーダ原信号
電圧ejと電圧可変抵抗印加電圧V,エンコーダ原信号電圧
ejと発振周波数fの間には次式(7)(8)の関係がな
りたつ。
R 1 = δ / (V + ε) + R 00 (5) A magnetoresistive element made of, for example, a FeNi alloy as a material having an inversely proportional relationship between the resistance value and the applied voltage is constructed by applying a voltage to the coil on the primary side to form an electromagnet as shown in FIG. Is obtained, the hyperbolic characteristic can be approximated when the coil applied voltage V is within the range of V α ≦ V ≦ V β . A bias voltage is applied by, for example, a bias voltage application circuit as shown in FIG. 6 so that the intermediate value V 00 of V α and V β becomes the bias voltage, and the coil application voltage is applied when the maximum and minimum voltages of the encoder original signal are applied. V α
If set to be less than V beta, the encoder original signal voltage e j and the voltage variable resistor applied voltage V, the encoder original signal voltage
The following equations (7) and (8) are established between e j and the oscillation frequency f.

f=ξ′ηej+ξ′V00+ζ′ =ξej+ξ(ξ′,ζ′:一定値) ……(8) 従って、第7図に示すエンコーダ原信号電圧と発振周
波数の1次関数関係が得られる。
f = ξ'ηe j + ξ'V 00 + ζ '= ξe j + ξ (ξ', ζ ': constant value) (8) Therefore, a linear function relationship between the encoder original signal voltage and the oscillation frequency shown in FIG. Is obtained.

次に、本実施例の位置・速度検出方法について第4図
及び第13図を用いて説明する。
Next, the position / speed detection method of this embodiment will be described with reference to FIGS. 4 and 13.

まず、粗位置検出方法について述べる。サンプリング
パルスと同期して一時記憶回路にラッチされた正方向、
逆方向移動位置θup(h),θdwn(k)(正確にはパ
ルス数の形で記憶されるが、位置換算量として扱う)よ
り粗位置θR(k)は次式(9)により計算される。
First, a coarse position detection method will be described. Positive direction latched in the temporary storage circuit in synchronization with the sampling pulse,
The coarse position θR (k) is calculated by the following equation (9) from the reverse movement positions θup (h) and θdwn (k) (accurately stored in the form of the number of pulses, but treated as a position conversion amount). .

θR(k)=θup(h)−θdwn(k) ……(9) 正方向移動量は正、逆方向移動量は負の符号をとる。
エンコーダA,B相原信号eA,eBが次式(10)で示される場
合、粗位置分解能はπ/2KE(エンコーダの一回転当りの
目盛数KEとする)となる。
θR (k) = θup (h) −θdwn (k) (9) The positive direction movement amount has a positive sign, and the reverse direction movement amount has a negative sign.
When the encoder A and B phase original signals e A and e B are expressed by the following equation (10), the coarse position resolution is π / 2K E (the number of graduations per encoder rotation is K E ).

ここではA相がB相に対して90゜位相遅れを正方向移
動、90゜位相進みを逆方向移動とする。
Here, the phase A is 90 ° phase lag with respect to the phase B, and the phase lag is 90 ° phase lead in the forward direction.

次に微細位置検出方法について述べる。第1図に示す
ように、A,B相の計数器出力は、移動方向、1/4周期位置
により各々異なる計数器出力f(Nj)を示す。これはバ
イアスされた正弦波周波数分布を有する計数器出力をそ
の正弦波の0゜,90゜,180゜,270゜位相の所から任意の
位置θまで積分した結果と対応している。そこで、
(8)(10)式を用いてエンコーダA,B相、零値の各区
間の周波数分布を示す式、計数値を下式(11),(12)
に示した。
Next, a fine position detecting method will be described. As shown in FIG. 1, the A and B phase counter outputs indicate different counter outputs f (N j ) depending on the moving direction and the quarter period position. This corresponds to the result of integrating the output of the counter having the biased sine wave frequency distribution from the 0 °, 90 °, 180 °, and 270 ° phases of the sine wave to an arbitrary position θ. Therefore,
(8) Equation (10) is used to express the frequency distribution of each section of encoder A, B phase and zero value, and the count value is calculated by the following equations (11) and (12).
It was shown to.

第1図はサンプリング周期がエンコーダのパルス発生
周期より長い例を示したが、短い場合(低速動作時)を
第13図を用いて説明する。図中斜線部は各サンプリング
時の計数値を面積で示している。この場合、サンプリン
グ周期内にエンコーダパルスが入らない場合は(13)式
に示すようにエンコーダパルスが入った時から積算した
計数値をNj値として用いていることにより、サンプリン
グ周期がエンコーダパルス発生周期より長い場合と同様
に扱うことができる。
FIG. 1 shows an example in which the sampling period is longer than the pulse generation period of the encoder. In the figure, hatched portions indicate count values at the time of each sampling by area. In this case, if the encoder pulse does not enter within the sampling period, the sampling period is calculated by using the count value accumulated from the time when the encoder pulse enters as the Nj value as shown in equation (13). It can be treated as if it were longer than the period.

第k〜k+4サンプリング時: また、移動方向についてもエンコーダ原信号をパルス
化する際に選られる方向弁別信号(S2信号)により粗検
出し、エンコーダパルス発生間隔における微細位置変化
量の符号の変化の有無を検出することによる微細検出を
併用すれば、第1図の移動方向変化時を正確に把えるこ
とができ、移動方向が変化する際の位置も正確に検出す
ることができる。
At the time of k-th to k + 4 sampling Further, due to the fact that crude detected by the direction discrimination signal depending upon pulsing the encoder original signal (S 2 signal) also moving direction, to detect the presence or absence of a change in sign of the fine positional variation in encoder pulse generation interval If the fine detection is used together, it is possible to accurately grasp the time when the moving direction changes in FIG. 1 and to accurately detect the position when the moving direction changes.

式(12)に基づき、i/2 π位置(粗位置パルス発生位
置)からの微細位置θを求めると表1に示す式が得ら
れる。本式の演算はROM13中に設けられた逆正接テーブ
ルを参照して行う。
Based on equation (12), equations shown in Table 1 is obtained when obtaining the fine position theta F from i / 2 [pi position (coarse position pulse generation positions). The calculation of this formula is performed with reference to an arc tangent table provided in the ROM 13.

以上から、粗位置θR(h)、微細位置θF(k)を
求めることができ、サンプリング時の精位置θ(k)
は、 θ(k)=θR(h)+θF(k) ……(14) として求められる。エンコーダ原信号にノイズが混入し
た場合もノイズ混入によるNA,NB,NO各々の計数誤差Δ
NA,ΔNB,ΔNO≪NA,NB,NOであるため(第31図参照)、表
1に示した演算・判定結果に及ぼす影響は小さく、微細
位置検出誤差を低減できる。
From the above, the coarse position θR (h) and the fine position θF (k) can be obtained, and the fine position θ (k) at the time of sampling can be obtained.
Is obtained as θ (k) = θR (h) + θF (k) (14) Even when noise is mixed in the encoder original signal, the counting error Δ of each of N A , N B , and N O due to the noise mixing
Since N A , ΔN B , ΔN O << N A , N B , N O (see FIG. 31), the influence on the calculation / judgment results shown in Table 1 is small and the fine position detection error can be reduced.

また、速度ω(k)は前回サンプリング時の精位置θ
(k−1)と今回サンプリング時の精位置θ(k)、サ
ンプリング周期に反比例する計数K5とすると式(15)に
より求められる。
The velocity ω (k) is the precise position θ at the time of the previous sampling.
(K-1) and fine position of the current time of sampling theta (k), is determined by the equation (15) when a counting K 5 which is inversely proportional to the sampling period.

ω(k)=K5(θ(k)−θ(k−1)) ……(15) 本方法によると、ノイズ混入による高速検出誤差も低
減できる。
ω (k) = K 5 (θ (k) −θ (k−1)) (15) According to this method, high-speed detection error due to noise mixing can be reduced.

次に本発明の第2の実施例を第2図、第4図、第9図
及至第12図を用いて説明する。第9図は本発明の第2の
実施例の位置・速度検出装置の中の電圧制御発振器の回
路図、第10図は第9図に示す電圧制御発振器を装置に適
用した場合の発振器周波数可変軸と可変抵抗値の関係を
示す図である。第1の実施例で示した位置・速度検出装
置は発振周波数可変域が第7図のように固定されている
ため、用途(要求分解能)に応じた分解能の変更ができ
ない。この解決はエンコーダ原信号の最大最小電圧印加
時の発振周波数可変幅を変えることにより可能となる。
可変幅は、発振周波数を変化させると変化する。周波数
可変幅Δf,電圧可変抵抗印加電圧両振幅をΔVとすると
(6)式よりΔf=ξ′(R2)ΔVとなり、R2大となる
とξ′小となるため、R2大となるとΔf小となる。第9
図に示す電圧制御発振器は(4)式に示す発振周波数と
受動素子特性値の関係を有するため、抵抗20の抵抗値R2
もしくはコンデンサ21の静電容量を可変とすれば発振周
波数及びその可変幅を変えられる。ここでは、発振周波
数と一時関数関係にある抵抗R2として複数種類オーダの
異なる抵抗値を有する抵抗を並列接続し、マルチプレク
サ28にCPU12より信号を送り、用途に応じた設定を可能
とした構成の装置を示した。また、第11、12図に示すよ
うに発振回路は低周波数域では発振限界が存在するた
め、R2を大きくして発振周波数を低くするのには限界が
ある。そこで、発振回路の発振周波数は高く保ち、出力
段に発振周波数及びその可変幅を小さくする分周器30を
設け、その分周比(通常で)をマルチプレクサ29で切り
換え可能とすることにより、電圧制御発振器から安定し
た低周波数で小さい周波数可変幅を有する発振パルス
(低分解能パルス)をうることが可能となる。
Next, a second embodiment of the present invention will be described with reference to FIG. 2, FIG. 4, FIG. 9 and FIG. FIG. 9 is a circuit diagram of a voltage-controlled oscillator in the position / speed detection device of the second embodiment of the present invention, and FIG. 10 is an oscillator frequency variable when the voltage-controlled oscillator shown in FIG. 9 is applied to the device. FIG. 4 is a diagram illustrating a relationship between an axis and a variable resistance value. In the position / speed detection device shown in the first embodiment, since the oscillation frequency variable range is fixed as shown in FIG. 7, the resolution cannot be changed according to the application (required resolution). This solution is possible by changing the oscillation frequency variable width when the maximum and minimum voltages of the encoder original signal are applied.
The variable width changes when the oscillation frequency is changed. Assuming that the amplitude of both the frequency variable width Δf and the voltage applied to the voltage variable resistor is ΔV, Δf = ξ ′ (R 2 ) ΔV according to equation (6). If R 2 is large, ξ ′ is small, and if R 2 is large, Δf is Δf. It will be small. Ninth
Since the voltage controlled oscillator shown in the figure has a relationship between the oscillation frequency and the characteristic value of the passive element shown in the equation (4), the resistance value R 2
Alternatively, if the capacitance of the capacitor 21 is made variable, the oscillation frequency and its variable width can be changed. Here, in parallel a resistor having a different resistance value of a plurality of types order as the resistance R 2 in the temporary functional relationship with the oscillation frequency, the multiplexer 28 sends a signal from the CPU 12, enables the setting according to the use and the structure The device is shown. Further, as shown in FIGS. 11 and 12, the oscillation circuit has an oscillation limit in the low frequency range, and therefore there is a limit in increasing R 2 to lower the oscillation frequency. Therefore, the oscillation frequency of the oscillation circuit is kept high, a frequency divider 30 for reducing the oscillation frequency and its variable width is provided in the output stage, and the frequency division ratio (normally) can be switched by the multiplexer 29, so that the voltage An oscillation pulse (low resolution pulse) having a stable low frequency and a small frequency variable width can be obtained from the controlled oscillator.

第10図は、第9図の発振回路構成とした際の発振周波
数可変幅と抵抗R2の関係を示したものであり、広い周波
数域にわたって安定したパルス発振と可変幅変更が可能
となる。また、第2図、第4図の破線部は本実施例を適
用する場合に、位置・速度検出装置及び方法に追加され
る部分を示している。本実施例を用いると、ハードウェ
ア、ソフトウェアともに煩雑さをほとんど増すことなく
電圧制御発振器の発振周波数可変幅を拡げ、用途に応じ
た最適の分解能をうることが可能となる。また、第9図
では抵抗R2として複数種類の中から1つ選択する方式を
示したが、CPU12よりD/A変換器を介して抵抗値をほぼ連
続的に可変とできる電圧可変抵抗をR2に用いることによ
り、より細かい発振周波数可変幅の設定を行うことが可
能となる。
FIG. 10 shows the relationship between the oscillation frequency variable width and the resistance R 2 when the oscillation circuit configuration of FIG. 9 is used, and stable pulse oscillation and variable width change are possible over a wide frequency range. 2 and 4 show portions added to the position / speed detecting device and method when the present embodiment is applied. When this embodiment is used, the oscillation frequency variable width of the voltage controlled oscillator can be expanded and the optimum resolution according to the application can be obtained with almost no increase in complexity in both hardware and software. Although FIG. 9 shows the method of selecting one from a plurality of types as the resistance R 2 , the voltage variable resistance R that can change the resistance value almost continuously from the CPU 12 via the D / A converter is used. The use of 2 enables finer setting of the oscillation frequency variable width.

次に、計数器7〜9の詳細構成につき、第14図及び第
15図を用いて説明する。位置は計数器により、移動体の
高速移動時にはエンコーダ粗位置パルス発生時からサン
プリングパルス発生時まで検出しなければならず、低速
移動時にはサンプリングパルス発生間隔で検出すること
になる。従って、エンコーダパルスもしくはサンプリン
グパルスが入った時は計数器をクリアする若しくはラッ
チする必要があり、かつ、クリア、ラッチ時間にもパル
ス計数を続ける必要がある。そこで、第14図に示すよう
に各計数器7〜9を計数器aと対計数器bにより構成
し、エンコーダパルス信号もしくはサンプリングパルス
信号が入ると、計数器、対計数器を切り換えて位置検出
を行う構成とした。また、中央処理部がいずれの計数器
の計数値を読み出すか判定するため、計数器の計数開始
信号(S信号)もラッチ回路38に取り込まれるよう構成
されている。第15図に、サンプリングパルス信号若しく
はエンコーダパルスが入った時の計数器、対計数器のオ
ン・オフ動作をタイムチャート図で示した。両方オンと
なることはなく、常に一方にて計数が行われる。
Next, the detailed configuration of the counters 7 to 9 will be described with reference to FIGS.
This will be described with reference to FIG. The position must be detected by the counter from the time when the encoder coarse position pulse is generated to the time when the sampling pulse is generated when the moving body moves at high speed, and is detected at the sampling pulse generation interval when moving at low speed. Therefore, when an encoder pulse or a sampling pulse is input, it is necessary to clear or latch the counter, and it is necessary to continue pulse counting during the clear and latch times. Therefore, as shown in FIG. 14, each of the counters 7 to 9 is composed of a counter a and a counter counter b, and when an encoder pulse signal or a sampling pulse signal is input, the counter and counter counter are switched to detect the position. It is configured to perform. The latch circuit 38 is also configured so that a counting start signal (S signal) of the counter is also taken in by the latch circuit 38 so that the central processing unit determines which counter value to read out. FIG. 15 is a time chart showing the on / off operation of the counter and the counter when the sampling pulse signal or the encoder pulse is input. Both are never turned on, and counting is always performed on one side.

次に、本発明の第3の実施例を第16図、第4図及び第
17図を用いて説明する。第16図は本発明の位置・速度検
出装置を位置・速度を検出する移動体を駆動するモータ
の制御装置に適用した場合のモータ制御装置のブロック
図、第17図は、本発明の位置・速度検出装置により位置
・速度を検出される移動体がロボットアーム、ロボット
手首軸である場合の移動体の構造例(水平多関節形直接
駆動ロボット)を示す図である。
Next, a third embodiment of the present invention will be described with reference to FIGS.
This will be described with reference to FIG. FIG. 16 is a block diagram of a motor control device when the position / speed detection device of the present invention is applied to a control device of a motor that drives a moving body for detecting position / speed, and FIG. It is a figure which shows the structural example (horizontal articulated direct drive robot) of a mobile body when the mobile body whose position and speed are detected by a speed detection apparatus is a robot arm and a robot wrist axis.

第16図を用いて、本発明の位置・速度検出装置をモー
タ制御装置に適用し位置制御を行う例を示す。モータ制
御装置17にトルク指令を与える部分まではソフトウェア
サーボで構成されており、サンプリング周期毎に移動体
もしくはモータの位置・速度が検出されると、あらかじ
め生成されている移動体39の移動軌跡を実現するため
に、位置偏差、速度偏差が検出され、モータの不感帯、
トルクリミットを考慮したトルク指令が生成され、モー
タ制御装置17よりモータ40にトルク電流が供給される。
第4図に本動作のフローを示したが、移動体39が目標位
置に達するまでモータ制御装置17に送られるトルク指令
はサンプリング周期毎に書き換えられ、目標位置に対
し、位置偏差が0となると、移動体に外力(例えば重
力)に対する保持トルクのみモータに発生させるトルク
指令が生成される。モータ制御のソフトウェアサーボ部
42の演算機能は、本位置・速度検出装置43の中央処理部
に持たせることも可能であり、モータ制御に必要な諸パ
ラメータ値は、ソフトウェアで設定することにより、ハ
ードウェアを変更することなく実現可能であるという利
点がある。
FIG. 16 shows an example in which the position / speed detection device of the present invention is applied to a motor control device to perform position control. Up to a portion that gives a torque command to the motor control device 17 is configured by software servo, and when the position / speed of the moving body or the motor is detected at each sampling cycle, the movement locus of the moving body 39 generated in advance is determined. To achieve this, position deviation and speed deviation are detected, the dead zone of the motor,
A torque command in consideration of the torque limit is generated, and a torque current is supplied from the motor control device 17 to the motor 40.
FIG. 4 shows the flow of this operation. The torque command sent to the motor control device 17 until the moving body 39 reaches the target position is rewritten every sampling cycle, and when the position deviation with respect to the target position becomes zero. A torque command that causes the motor to generate only a holding torque for an external force (for example, gravity) on the moving body is generated. Software servo for motor control
The calculation function of 42 can also be provided in the central processing unit of the position / speed detection device 43, and various parameter values required for motor control can be set by software without changing hardware. It has the advantage of being feasible.

次に、本位置・速度検出装置の適用される例として、
制御対象が水平多関節形8ロボットである例を第17図を
用いて説明する。本ロボットは第1アーム50、第2アー
ム57がアウタロータ形直接駆動モータ44,51により回転
駆動され、第2アーム先端に作業用ツールを先端に有す
る上下・回転動作の可能な手首軸(スプライン軸)71が
設けられている。手首軸71は、その上下動作については
モータ58よりベルト63を介して回転動力がボールネジ65
に伝達され、ボールネジナット部と結合されたブラケッ
ト67にスプライン軸71が回転可能、上下方向拘束で設け
られ、ころがり軸受等で半径方向に支持されているた
め、ブラケット67及びスプライン軸71はボールネジ65の
回転に対して回り止めされた状態で、ボールネジ65の回
転と共にネジのピッチ分だけ上下方向に移動する構造に
なっている。
Next, as an example to which the present position / speed detection device is applied,
An example in which the control target is a horizontal articulated eight robot will be described with reference to FIG. In this robot, the first arm 50 and the second arm 57 are rotationally driven by the outer rotor type direct drive motors 44 and 51, and the second arm has a working tool at the tip thereof, and a wrist shaft (spline shaft) capable of vertical and rotational movements. ) 71 are provided. Regarding the vertical movement of the wrist shaft 71, the rotational power is transmitted from the motor 58 via the belt 63 to the ball screw 65.
The spline shaft 71 is rotatably mounted on the bracket 67 coupled to the ball screw nut portion in a vertical direction and is supported in the radial direction by a rolling bearing or the like. When the ball screw 65 is rotated, it moves vertically by the pitch of the screw in a state where it is prevented from rotating.

また、手首軸71の回転動作はモータ60より減速機61、
ベルト63、スプライン軸受取付部材69、スプライン軸受
70を介してスプライン篏合されているスプライン軸71に
動力伝達される。
In addition, the rotation operation of the wrist shaft 71 is performed by the motor
Belt 63, spline bearing mounting member 69, spline bearing
The power is transmitted to the spline shaft 71 fitted with the spline via 70.

主軸及び手首軸にはインクリメンタル方式のエンコー
ダが設けられ、エンコーダの基準位置からの相対回転
数、回転角の検出が行われている。また、基準位置への
復帰動作、オーバラン防止のための検出センサ47、54
(一部のみ図示)及び被検出体46,53,66,68が設けられ
ており、オーバラン検出後さらに行き過ぎた動作を防止
するためのストッパ49,56,72及び移動体で当接する衝突
部材48,55,73が設けられている。
The main shaft and the wrist shaft are provided with an encoder of an incremental system, and a relative rotation number and a rotation angle from a reference position of the encoder are detected. In addition, detection sensors 47 and 54 for returning to the reference position and preventing overrun are provided.
(Only a part is shown) and detected objects 46, 53, 66, and 68 are provided, and stoppers 49, 56, and 72 for preventing the operation from going too far after the overrun is detected, and a collision member 48 contacted by the moving body. , 55, 73 are provided.

第1アーム50、第2アーム57を回転駆動する直接駆動
モータ44,51は、モータ出力軸に減速機が設けられてい
ないため、減速機を装着しモータ回転軸にエンコーダを
取りつけて位置検出をする場合と比して同一の位置分解
能をうるのに減速比倍の高分解能のものが求められる。
その点で、本発明で述べた位置・検出方法は高分解能で
かつ用途に応じて可変分解能とすることができ、有効で
ある。
The direct drive motors 44 and 51 for rotating the first arm 50 and the second arm 57 do not have a speed reducer on the motor output shaft. In order to obtain the same position resolution as compared with the case of performing the above, it is required to have a high resolution that is double the reduction ratio.
In that respect, the position / detection method described in the present invention is effective because it has high resolution and variable resolution depending on the application.

以下、次に位相ずれによる検出誤差を低減する本発明
の第1の実施例を第18図及至第29図及至第3図により説
明する。本実施例ではモータに移動体及びエンコーダが
結合され、エンコーダ信号等のセンサ信号が位置・速度
検出装置に取り込まれ、位置・速度検出を行う例につき
説明する。第18図は本実施例の移動体の通常動作時の位
置・速度検出のタイムチャート図、第19図はインクリメ
ンタル方式のエンコーダを用いた移動体の全体動作のう
ち特に位相ずれ検出を示すタイムチャート図、第20図は
絶対番地方式のエンコーダを用いた移動体の全体動作の
うち特に位相ずれ検出を示すタイムチャート図、第21図
は移動体の位置・速度検出装置のブロック図、第22図は
インクリメンタル方式のエンコーダを用いた場合の初期
動作(原点復帰動作)のフローチャート図、第23図は絶
対番地方式のエンコーダを用いた場合の初期動作のフロ
ーチャート図、第24図は移動体の通常動作時の位置・速
度検出方法を示すフローチャート図、第25図は移動体の
位置・速度制御装置のブロック図、第26図はインクリメ
ンタル方式のエンコーダを装着した直接駆動モータによ
りアーム状移動体を回転駆動する装置の縦断面図、第27
図は第26図のXXVII−XXVII部断面図、第28図は第26図及
び第27図で示した回転駆動装置の各領域及び原点位置復
帰方法を示す図、第29図は第18図で示した微細位置検出
に用いる逆正接データテーブルの構成を示す図である。
Hereinafter, a first embodiment of the present invention for reducing the detection error due to the phase shift will be described with reference to FIGS. 18, 29 and 3. In the present embodiment, an example will be described in which a moving body and an encoder are coupled to a motor, and a sensor signal such as an encoder signal is taken into a position / speed detection device and position / speed detection is performed. FIG. 18 is a time chart of position / velocity detection at the time of normal operation of the moving object of the present embodiment, and FIG. 19 is a time chart particularly showing phase shift detection in the whole operation of the moving object using the incremental encoder. FIG. 20, FIG. 20 is a time chart showing the phase shift detection in particular of the overall operation of the moving body using the absolute address type encoder, FIG. 21 is a block diagram of the moving body position / speed detecting device, FIG. Is a flowchart of an initial operation (origin return operation) when an incremental encoder is used, FIG. 23 is a flowchart of an initial operation when an absolute address encoder is used, and FIG. 24 is a normal operation of the moving body. Fig. 25 is a flowchart showing the position / speed detection method at the time, Fig. 25 is a block diagram of the position / speed control device for the moving body, and Fig. 26 is equipped with an incremental encoder. Longitudinal sectional view of a device for rotating the arm-like movable body by abutting the drive motor, 27
FIG. 26 is a cross-sectional view taken along the line XXVII-XXVII of FIG. 26, FIG. 28 is a diagram showing each area of the rotary drive device shown in FIG. 26 and FIG. 27, and a method of returning to the origin position. It is a figure which shows the structure of the arctangent data table used for the shown fine position detection.

エンコーダ2相原信号位相差に90゜から位相ずれがあ
る場合の位置検出誤差を低減するためには位相ずれを検
出しなければならない。エンコーダ2相原信号位相差の
90゜からの位相ずれを移動体に無駄な動作を行わせるこ
となく検出するため、本発明では移動体の初期動作時に
検出することにした。エンコーダには、相対位置を検出
可能なインクリメンタル方式のものと、常に絶対位置が
検出可能な絶対番地方式のものがある。インクリメンタ
ル方式のエンコーダを用いて移動体の位置検出を行う場
合には、動作開始時に移動体の絶対位置が不明であるた
め、初期動作としてあらかじめ設定された原点位置への
復帰動作を行ってから、移動体を動作開始位置へ移動
し、通常動作を開始する。従って、原点位置復帰動作若
しくは、動作開始位置への移動の等速区間を利用すれ
ば、移動体に無駄な動作を行わせることなく位相ずれ検
出を行うことが可能である。また、絶対番地方式のエン
コーダを用いて移動体の位置検出を行う場合には、原点
位置復帰動作は、不要であるが、作業開始位置まで移動
体を移動させる初期動作時の等速区間において位相ずれ
検出を行えば、無駄な動作なく位相ずれ検出が行える。
In order to reduce the position detection error when the phase difference between the encoder two-phase original signal phase shifts from 90 °, the phase shift must be detected. Encoder 2 phase original signal phase difference
In order to detect the phase shift from 90 ° without causing the moving body to perform a useless operation, the present invention detects the phase shift at the time of the initial operation of the moving body. Encoders include an incremental encoder that can detect a relative position and an absolute address encoder that can always detect an absolute position. When detecting the position of the moving body using the incremental encoder, since the absolute position of the moving body is unknown at the start of the operation, after performing the return operation to the preset home position as an initial operation, The moving body is moved to the operation start position, and normal operation starts. Therefore, if the home position return operation or the constant velocity section of the movement to the operation start position is used, it is possible to detect the phase shift without causing the moving body to perform an unnecessary operation. When the position of the moving body is detected using the absolute address type encoder, the home position return operation is not necessary, but the phase in the constant speed section at the time of the initial operation of moving the moving body to the work start position is unnecessary. If the shift is detected, the phase shift can be detected without useless operation.

位相ずれの検出に当っては、エンコーダを波形整形し
た後で出力されるエンコーダパルスの間隔を計時するこ
とにより行う。位相ずれ無しで移動体等速動作時にはエ
ンコーダパルス間隔は常に一定であるが位相ずれがある
場合は一定ではなく1つおきに同一となる。
The phase shift is detected by measuring the interval between encoder pulses output after waveform shaping of the encoder. The encoder pulse interval is always constant during the constant speed operation of the moving body without a phase shift, but when there is a phase shift, it is not constant but equal every other pulse.

まず、本発明で対象とするモータ、移動体、エンコー
ダを含む装置について述べる。インクリメンタル方式の
エンコーダの装着された直接駆動モータによりアーム状
移動体を(動作範囲240゜)を回転駆動する装置を第26
図を用いて説明する。モータステータ23aはベース30に
結合されており、モータロータ23bには移動体24、特定
位置検出用被検出体27及び衝突部材29が結合されてい
る。また、エンコーダ22はモータロータ23b、ステータ2
3aの相対位置を検出できるよう配置されている。絶対番
地方式のエンコーダの装着された装置では、特定位置検
出用被検出体27及び検出用センサ25,26の無い構造とな
る。第26図で示した特定位置検出用被検出体27、衝突部
材29、ストッパ28の形状を第27図を用いて説明する。被
検出体27はオーバラン検出部31と原点位置検出・領域判
別部32より構成することにより原点位置検出用センサ26
は領域判別用にも兼用でき、両側のオーバラン検出用セ
ンサ25a,25bと合わせて3ヶのセンサで全ての特定位置
検出を行うことができる。これにより、第47図に示した
従来例と比してセンサ数を1ヶ減らすことができる。ま
た、移動体24はオーバラン検出用センサ25a,25bにより
オーバランが検出されて更に行き過ぎた動作を行うと、
移動体24と結合されている衝突部材29がストッパ28に当
接し、移動動作を停止する構造となっている。
First, an apparatus including a motor, a moving body, and an encoder that is an object of the present invention will be described. A device for rotating an arm-shaped moving body (operating range 240 °) by a direct drive motor with an incremental encoder
This will be described with reference to the drawings. The motor stator 23a is connected to the base 30, and the moving body 24, the detected object 27 for specific position detection, and the collision member 29 are connected to the motor rotor 23b. The encoder 22 includes a motor rotor 23b and a stator 2
It is arranged so that the relative position of 3a can be detected. The device equipped with the absolute address type encoder has a structure without the specific position detection target object 27 and the detection sensors 25 and 26. The shapes of the specific position detecting object 27, the collision member 29, and the stopper 28 shown in FIG. 26 will be described with reference to FIG. The object to be detected 27 is composed of an overrun detecting section 31 and an origin position detecting / area discriminating section 32 so that an origin position detecting sensor 26 is provided.
Can also be used for area determination, and all the specific positions can be detected by three sensors in combination with the overrun detection sensors 25a and 25b on both sides. As a result, the number of sensors can be reduced by one as compared with the conventional example shown in FIG. In addition, when the overrun is detected by the overrun detection sensors 25a and 25b and the mobile unit 24 performs an excessively excessive operation,
The collision member 29 connected to the moving body 24 comes into contact with the stopper 28 to stop the moving operation.

本装置の原点位置復帰動作を第28図を用いて説明す
る。原点位置検出センサ26は、初期位置において、移動
体24が原点位置に対していずれの側(L領域、R領域)
にあるかを判定し、原点位置の方向を検知し、移動体24
を原点位置方向へ動作させる。原点位置検出センサ26に
より原点位置が検出されると、移動体24を真の原点位置
の方向へ移動させる。そして、エンコーダのZ相が検出
された位置を真の原点位置と定め、移動を停止する。以
後の動作は、この位置を基準位置として相対変位を検出
することにより行う。本原点位置復帰方法は第48図に示
した従来例と比して原点領域部の検出を行わない分だけ
動作アルゴリズムが簡略化されている。
The origin position returning operation of this device will be described with reference to FIG. At the initial position, the origin position detection sensor 26 determines which side (L region, R region) the moving body 24 is relative to the origin position.
The moving object 24
Move toward the origin position. When the origin position is detected by the origin position detection sensor 26, the moving body 24 is moved in the direction of the true origin position. Then, the position where the Z phase of the encoder is detected is determined as the true origin position, and the movement is stopped. The subsequent operation is performed by detecting the relative displacement with this position as the reference position. In the present origin position return method, the operation algorithm is simplified as compared with the conventional example shown in FIG. 48, because the origin area is not detected.

次に、本発明の位置・速度検出方法を説明する。本発
明の位置・速度検出は、移動体の初期動作時のエンコ
ーダ2相原信号位相差の90゜からの位相ずれ検出、移
動体の通常動作時の前記位相ずれを考慮した位置・速度
検出、2つの手順により構成されている。まずについ
て、第19図及至第23図を用いて説明する。第19図及至第
23図を用いて説明する。第19図及び20図にインクリメン
タル方式、絶対番地方式のエンコーダを用いた場合の位
置検出のタイムチャート図を示した。移動体の初期動作
は、アンクリメンタル方式では、原点復帰動作と通常動
作開始位置への移動の2動作があり、絶対番地方式では
通常動作開始位置への移動から成っている。従って、位
相ずれ検出は各方式において、いずれかの動作の中にて
行えばよい。第19図は原点復帰動作時に、第20図は通常
動作開始位置への移動時に位相ずれ検出を行う例を示し
ている。図に示すように等速動作区間では、エンコーダ
パルスの時間間隔はエンコーダ2相原信号の零交差時の
位相差に対応する。従って、エンコーダ2相原信号の正
負関係から各移動方向S(正転:1、逆転:−1)に第3
図に示すような4つの1/4周期位置q(=0,1,2,3)を定
義し、第21図の1/4周期位置検出回路より検出すること
により、基準となる1/4周期位置(q=0とする)から
の連続するパルス間隔tq=0及びtq=1より次式(16)
により位相ずれτが演算できる。
Next, the position / speed detection method of the present invention will be described. The position / velocity detection according to the present invention includes detection of a phase shift from the encoder 2-phase original signal phase difference of 90 ° during initial movement of the moving body, position / velocity detection in consideration of the phase shift during normal movement of the moving body, 2 It consists of two steps. First, the description will be made with reference to FIGS. 19 to 23. Fig. 19 to No.
This will be described with reference to FIG. FIGS. 19 and 20 show time charts of position detection in the case of using an encoder of an incremental type or an absolute address type. The initial operation of the moving body includes two operations, that is, a return-to-origin operation and a movement to the normal operation start position in the uncremental method, and a movement to the normal operation start position in the absolute address method. Therefore, the phase shift detection may be performed in any operation in each method. FIG. 19 shows an example of detecting the phase shift at the time of the home return operation, and FIG. 20 shows an example of detecting the phase shift at the time of moving to the normal operation start position. As shown in the drawing, in the constant speed operation section, the time interval between the encoder pulses corresponds to the phase difference at the time of the zero crossing of the encoder two-phase original signal. Therefore, from the positive / negative relationship of the encoder two-phase original signal, the third direction in each movement direction S (forward: 1, reverse: -1)
By defining four 1/4 cycle positions q (= 0,1,2,3) as shown in the figure and detecting them by the 1/4 cycle position detection circuit in FIG. From the continuous pulse interval tq = 0 and tq = 1 from the periodic position (assuming q = 0), the following equation (16) is obtained.
Can calculate the phase shift τ.

第22図及び第23図にインクリメンタル方式、絶対番地
方式の初期動作のフローチャートを示している。タイマ
は2ヶ用い、エンコーダパルスが入力する度に相互に別
のタイマで計時することにより、計時遅れを防ぐことが
可能となる。また、各タイマは等速区間中の偶数番目、
奇数番目のエンコーダパルス間隔を検出・記憶している
ため、各々の同一のq値におけるパルスの時間間隔平均
値q=0、q=1を用いて式(16)より演算するこ
とにより、誤差の小さい位相ずれ検出が可能となる。第
21図に本実施例の移動体の位置・速度検出装置のブロッ
ク図を示したが、移動体の初期動作に関係する部位とし
ては、エンコーダ原信号より1/4周期位置を検出する1/4
周期位置検出回路18、エンコーダ原信号を波形整形回路
1に通して得られるエンコーダ・パルスの時間間隔を検
出する位相ずれ検出タイマ17、インクリメンタル方式で
必要となる特定位置検出部35及びそれらのデータの読み
出しを行うためのデコーダ19などがある。
FIG. 22 and FIG. 23 show flowcharts of the initial operation of the incremental method and the absolute address method. Two timers are used, and each time an encoder pulse is input, different timers are used to measure the time, so that a time delay can be prevented. Also, each timer is an even number in the constant velocity section,
Since the odd-numbered encoder pulse intervals are detected and stored, the average of the time intervals of the pulses at the same q value, q = 0, q = 1, is used to calculate from the equation (16), thereby obtaining the error. A small phase shift can be detected. No.
FIG. 21 shows a block diagram of the position / velocity detection device for a moving body of this embodiment.
A periodic position detection circuit 18, a phase shift detection timer 17 for detecting a time interval between encoder pulses obtained by passing the encoder original signal through the waveform shaping circuit 1, a specific position detection unit 35 required in the incremental system, and a data There is a decoder 19 for reading.

次に、前記の移動体の通常動作時の前記位相ずれを
考慮した位置・速度検出について、第18図、第21図、第
24図、第25図、第29図を用いて説明する。第18図は移動
体の位置・速度検出のタイムチャートを示し、第21図
は、位置・速度検出装置のブロック図を示しているが、
この2つの図を主に用いて説明する。第18図は、位相ず
れ30゜の場合を示しているが、移動体は等速動作しいて
いるにも拘らずエンコーダパルスは不均一な周期で発生
するため、エンコーダパルスのみを計数した位置(粗位
置)には、30゜の位相部分で±1パルスの計数誤差が生
ずる。そこで、本発明では、エンコーダパルス発生位相
差は2パルス毎に180゜となることを利用し、粗位置は
基準とする1/4周期位置(q=0.2とする)より2パルス
毎に計数する補正を行う構成とした(第18図中実線部参
照)。これは、整数xを整数yでわった剰余をmod
y(x)と表記するとした時、移動方向変化時の変化直
前・直後のエンコーダ2相原信号の1/4周期位置q1,q2
移動方向S1,S2(但し、正転:1、逆転:−1)、第kサ
ンプリング時のエンコーダ・パルス計数値PO(k)、回転
角/エンコーダパルス数=K2、粗位置検出値θR(k)とす
ると、次式で示される。
Next, position / velocity detection in consideration of the phase shift during the normal operation of the moving body will be described with reference to FIGS.
This will be described with reference to FIGS. 24, 25, and 29. FIG. 18 shows a time chart of position / speed detection of the moving body, and FIG. 21 shows a block diagram of the position / speed detection device.
Description will be made mainly using these two figures. FIG. 18 shows a case where the phase shift is 30 °, but the encoder pulse is generated at a non-uniform period even though the moving body is operating at a constant speed. (Coarse position), a counting error of ± 1 pulse occurs in a phase portion of 30 °. Therefore, in the present invention, the fact that the encoder pulse generation phase difference becomes 180 ° every two pulses is used, and the coarse position is counted every two pulses from a reference quarter period position (q = 0.2). The correction is performed (see the solid line in FIG. 18). This is the remainder of the integer x divided by the integer y mod
When expressed as y (x), the quarter-period positions q 1 and q 2 of the encoder 2-phase original signal immediately before and immediately after the change in the moving direction change,
Moving direction S 1 , S 2 (However, forward rotation: 1, reverse rotation: -1), encoder pulse count value P O (k) at the time of k-th sampling, rotation angle / encoder pulse number = K 2 , coarse position detection If the value is θ R (k) , it is expressed by the following equation.

(i)移動方向変化時からmod2(q)=1となるまで θR(k)=K2{PO(k)+S1・mod2(q1)} ……(17) (ii)移動方向変化後にmod2(q)=1となった後 θR(k)=K2{PO(k)+S2・mod2(q)} ……(18) また、式(17)(18)は、通常動作開始時は動作開始
時の1/4周期位置をq2とし、q1=mod4(q2−1)とし、
動作開始時移動方向をS2とし、S1=−S2とすることによ
りそのまま利用できる。
(I) From the time of the change of the moving direction to the time when mod 2 (q) = 1, θ R (k) = K 2PO (k) + S 1 · mod 2 (q 1 )} (17) (ii) After mod 2 (q) = 1 after the change in the moving direction, θ R (k) = K 2PO (k) + S 2 · mod 2 (q)} (18) Also, equation (17) ( 18), the normal operation starts is a 1/4 cycle position at the start operation and q 2, and q 1 = mod 4 (q 2 -1),
The operation start time of movement direction and S 2, can be directly used by the S 1 = -S 2.

次に、粗位置は2パルス毎に計数するため、サンプリ
ング時の位置を高精度に求めるため、180゜位相(2パ
ルス分)内の微細位置(補間量)を位相ずれを考慮して
検出する。その微細位置検出方法について述べる。ここ
では位相ずれとし、移動体正方向移動時にはエンコー
ダ原信号のA相はB相に対して90゜+の位相遅があ
り、移動体逆方向移動時にはA相はB相に対して90゜−
の位相進みがあるとする(第18図参照)。この場合、
第18図に示すようにサンプリング時にエンコーダ2相原
信号及び零値信号を各々サンプリングホールドすると
(A,B相電圧eA,eB、零値電圧eCとする)、移動方向S
(正方向:1、逆方向:−1)とすると、第kサンプリン
グ時の微細位置θF(k)と各信号値の間には次の関係が成
立する。
Next, since the coarse position is counted every two pulses, a fine position (interpolation amount) within a 180 ° phase (two pulses) is detected in consideration of a phase shift in order to obtain a position at the time of sampling with high accuracy. . The method for detecting the fine position will be described. Here, the phase shift is assumed. When the moving body moves in the forward direction, the A phase of the encoder original signal has a phase delay of 90 ° + with respect to the B phase.
(See FIG. 18). in this case,
As shown in FIG. 18, when sampling and holding the encoder two-phase original signal and the zero-value signal at the time of sampling (A and B-phase voltages e A and e B and zero-value voltage e C ), the moving direction S
If (positive direction: 1, reverse direction: -1), the following relationship is established between the fine position θ F (k) at the k-th sampling and each signal value.

(S(k)=1のとき、0≦θF(k)≦180゜,S(k)=−1のと
き、−180゜≦θF(k)≦0とする) 上記θ値は、位相ずれにより等速動作時にも異なる
エンコーダ・パルス間隔がいずれも90゜となるよう補正
が加えられている。また、移動体の移動方向S(k)はエン
コーダ原信号を波形整形回路でパルス化する際に得られ
る方向弁別信号より検出される粗検出を(19)式より得
られる微細位置θの変化量の符号より検出される微細
検出により補正することにより、高精度に移動方向を検
出できる。
(When S (k) = 1, 0 ≦ θ F (k) ≦ 180 °, and when S (k) = − 1, −180 ° ≦ θ F (k) ≦ 0) The above θ F value is In addition, a correction is made so that the different encoder pulse intervals are all 90 ° even at the constant speed operation due to the phase shift. Further, the moving direction S (k) of the moving body is a change in the fine position θ F obtained by the coarse detection detected from the direction discrimination signal obtained when the encoder original signal is pulsed by the waveform shaping circuit by the equation (19). The movement direction can be detected with high accuracy by performing correction by fine detection detected from the sign of the quantity.

以上検出された粗位置θR(k)と微細位置θF(k)より次
式(20)(21)により位置θ(k)、速度ω(k)を求めるこ
とができる(K5はサンプリング周期の逆数に比例する係
数である)。
Or the detected rough positions theta R (k) and the fine position theta following equation from F (k) (20) located theta (k) by (21) can be determined velocity ω a (k) (K 5 is a sampling Is a coefficient proportional to the reciprocal of the period).

θ(k)=θR(k)+θF(k) ……(20) ω(k)=K5(θ(k)−θ(k-1) ……(21) 本位置・速度検出法はサンプリング周期の間にエンコ
ーダパルスが1つも入らない低速動作時にも逆正接演算
により微細位置変化が検出されるため低速動作にも適用
可能な方法である。上記の通常動作時の位置・速度検出
のフローチャート図を第24図に示した。通常動作開始時
の1/4周期位置はエンコーダパルスの発生位置によって
は誤検出する可能性があるため、1パルス発生後に1/4
周期位置mod4(q2+1)を検出し、動作開始時の1/4周
期位置q2を検出する構成とした。また、サンプリングパ
ルスが発生した時にわり込みが入り、各種検出及び演算
を行う構成とし、それ以外の時刻においては常に1/4周
期位置の検出・記憶と移動方向変化の有無の検出を行
い、移動方向変化時には変化前後の1/4周期位置q1,q2
び移動方向S1,S2を検出、記憶し、その後のサンプル時
の(17),(18)式の演算に利用する構成とした。ま
た、(19)式の逆正接テーブルは第29図に示すように、
移動方向により異なるアドレス群にわりつけられてお
り、位相ずれとエンコーダ2相原信号電圧比をアドレス
指定することにより、(19)式に示す微細位置θが検
出できるようにした。
θ (k) = θ R (k) + θ F (k) ... (20) ω (k) = K 5(k)(k-1) ... (21) Is a method which can be applied to low-speed operation because a minute position change is detected by arctangent calculation even at low-speed operation in which no encoder pulse enters during the sampling period. Is shown in Fig. 24. Since the 1/4 period position at the start of the normal operation may be erroneously detected depending on the position where the encoder pulse is generated, 1/4 period after 1 pulse is generated
The configuration is such that the periodic position mod 4 (q 2 +1) is detected and the quarter period position q 2 at the start of the operation is detected. In addition, when a sampling pulse is generated, it is interrupted, and various detections and calculations are performed.At other times, the detection and storage of the quarter cycle position and the detection of the change in the movement direction are always performed. When the direction is changed, the 1/4 period positions q 1 and q 2 before and after the change and the movement directions S 1 and S 2 are detected and stored, and are used for the calculation of the equations (17) and (18) at the time of the subsequent sampling. did. The arc tangent table of equation (19) is, as shown in FIG.
The moving direction is assigned a different address groups, by addressing the phase shift and the encoder 2 Aihara signal voltage ratio, and can be detected fine position theta F shown in (19).

また、移動体の通常動作時の位置・速度検出を行うの
に使用する装置は第21図に示した装置における粗位置検
出部15,微細位置検出部16等であり、サンプリングパル
スに同期してエンコーダパルスを計数し、その計数値を
中央処理部36に取り込み、(17),(18)式に示す粗位
置補正を行う。また、微細位置検出に当っては、A/D変
換器7〜9入力電圧を正値とするようにエンコーダ原信
号をバイアス電圧印加回路5に通すことにより、バイア
ス及びゲイン調整を行い、サンプリングパルスに同期し
てサンプルホールダ6でサンプルホールドし、A/D変換
器7〜9によりディジタル変換され、eA〜eC検出値が中
央処理部36に取り込まれ、以上の検出値と移動方向、1/
4周期位置検出値から微細位置演算、位置・速度演算が
行われる。本装置は従来例のブロック図(第44図参照)
と微細位置検出部の構成が若干異なるが、従来例はeA
eCのA/D変換をパルス幅変調により行っているのであ
り、従来例の微細位置検出部を第21図の微細位置検出部
にそのまま適用しても同一の方法により位置検出誤差を
著しく低減することができる。
The devices used to detect the position / velocity of the moving body during normal operation are the coarse position detecting unit 15, the fine position detecting unit 16, etc. in the device shown in FIG. 21, and are synchronized with the sampling pulse. The encoder pulses are counted, the count value is taken into the central processing unit 36, and the coarse position correction shown in the equations (17) and (18) is performed. In the fine position detection, the bias and gain are adjusted by passing the encoder original signal through the bias voltage applying circuit 5 so that the input voltages of the A / D converters 7 to 9 become positive values, thereby adjusting the sampling pulse. In synchronism with the above, the sample and hold are performed by the sample holder 6 and are digitally converted by the A / D converters 7 to 9. The detected values of e A to e C are taken into the central processing unit 36, and the above detected values and the moving direction, 1 /
Fine position calculation and position / velocity calculation are performed from the four period position detection values. This device is a block diagram of a conventional example (see Fig. 44)
And slightly different configuration of micro position detection unit, but the prior art is e A ~
e C A / D conversion is performed by pulse width modulation, so even if the conventional fine position detection unit is applied to the fine position detection unit in Fig. 21 as it is, the position detection error is significantly reduced by the same method. can do.

また、第25図は、本位置・速度検出装置をロボットア
ーム等移動体24を駆動するモータ23の制御装置82と接続
して、移動体24の位置制御を行う例を示す。前記の移動
体の位置・速度検出においては、移動体の位置・速度を
検出するのが目的であったが、本装置では、目標位置に
到達する移動体24の動作をうるために、位置偏差、速度
偏差をもとにトルク指令を生成し、モータ制御装置82よ
りトルク電流を発生し、モータ23を駆動することによ
り、移動体24が目標位置に到達するまでサンプリング周
期毎にトルク指令値が変更される。また、位置指令発生
部からトルク指令発生部までソフトウェアサーボで構成
されているため、第21図の中央処理部36に所要のプログ
ラム,データを備えることにより、本位置・速度検出装
置を移動体の位置・速度制御装置の一部として用いるこ
とができる。上記制御演算アルゴリズムは第24図中にも
一点鎖線部として示した。
FIG. 25 shows an example in which the position / velocity detecting device is connected to a control device 82 of a motor 23 for driving the moving body 24 such as a robot arm, and the position of the moving body 24 is controlled. In the detection of the position and speed of the moving object, the purpose was to detect the position and speed of the moving object.However, in this apparatus, in order to obtain the operation of the moving object 24 reaching the target position, the position deviation By generating a torque command based on the speed deviation, generating a torque current from the motor control device 82 and driving the motor 23, the torque command value is changed every sampling cycle until the moving body 24 reaches the target position. Be changed. Also, since the position command generation unit to the torque command generation unit are constituted by software servos, the central processing unit 36 shown in FIG. It can be used as a part of the position / speed control device. The above control calculation algorithm is also shown in FIG. 24 as a one-dot chain line portion.

次に本発明の第2の実施例として、エンコーダ2相原
信号及び零値信号より微細位置を検出するに当って、サ
ンプリング時のエンコーダ原信号の瞬時値を検出するの
ではなく、エンコーダ・パルス発生時からサンプリング
時までの積分値相当量をディジタル量としてうることに
より行う方法及び装置を第30図乃至第40図を用いて説明
する。第30図はエンコーダ原信号瞬時値検出を示す図、
第31図はエンコーダ原信号積分値検出を示す図、第32図
はエンコーダ原信号積分検出時に、サンプリング周期の
間にエンコーダパルスが発生しない低速動作時の検出値
を示す図、第33図はエンコーダ原信号の積分値相当ディ
ジタル量を検出することにより移動体の通常動作時の位
置・速度検出方法及び移動体位置制御方法を示す図、第
34図はエンコーダ原信号の積分値相当ディジタル量を検
出する移動体の位置・速度検出装置のブロック図、第35
図は電圧制御発振器の構成例を示す図、第36図は電圧可
変抵抗とバイアス電圧印加回路の構成例を示す図、第37
図は磁気抵抗素子の特性例を示す図、第38図は第35図に
示した電圧制御発振器の発振周波数とバイアス電圧印加
回路入力電圧の関係を示す図、第39図及び第40図は第35
図に示した電圧制御発振器の発振周波数と受動素子特性
値の関係を示す図である。
Next, as a second embodiment of the present invention, in detecting a fine position from the encoder two-phase original signal and zero value signal, the encoder pulse generation is performed instead of detecting the instantaneous value of the encoder original signal at the time of sampling. A method and apparatus for obtaining an integral value equivalent from time to sampling as a digital value will be described with reference to FIGS. 30 to 40. FIG. 30 is a diagram showing detection of an encoder original signal instantaneous value,
FIG. 31 is a diagram showing encoder original signal integral value detection, FIG. 32 is a diagram showing encoder original signal integral value detection values during low-speed operation in which no encoder pulse is generated during the sampling period, and FIG. 33 is an encoder A diagram showing a position / speed detecting method and a moving body position control method during a normal operation of the moving body by detecting a digital amount corresponding to an integrated value of an original signal,
FIG. 34 is a block diagram of a position / velocity detection device of a moving object for detecting a digital amount corresponding to an integral value of an encoder original signal.
FIG. 36 is a diagram showing a configuration example of a voltage-controlled oscillator, FIG. 36 is a diagram showing a configuration example of a voltage variable resistor and a bias voltage applying circuit, FIG.
FIG. 38 is a diagram showing a characteristic example of a magnetoresistive element, FIG. 38 is a diagram showing the relationship between the oscillation frequency of the voltage controlled oscillator shown in FIG. 35 and the input voltage of the bias voltage applying circuit, FIG. 39 and FIG. 35
FIG. 3 is a diagram illustrating a relationship between an oscillation frequency of the voltage controlled oscillator illustrated in FIG. 1 and a passive element characteristic value.

まず、第30図及び第31図を持いてエンコーダ原信号の
瞬時値を検出する場合と、エンコーダパルス発生時から
サンプリング時までの積分値を検出する場合の比較を行
う。瞬時値検出により前記(19)式の演算を行う場合は
第30図に示すようにエンコーダ原信号にノイズが混入し
ている場合に検出誤差が大きくなる欠点がある。ノイズ
混入を防ぐにはバイアス電圧印加回路出力端にフィルタ
を設けるなど対策することによりある程度低減可能であ
るが、溶接作業などの大電流使用環境付近で使用する場
合には低減効果にも限界がある。その点第31図に示す積
分値検出を行うと、エンコーダ原信号にノイズが混入し
た場合にもノイズ成分が検出値に占める割合は小さく検
出誤差を低減できる。ここでは、第34図に示すように、
エンコーダ原信号をバイアスした信号を入力電圧と発振
周波数に一次関数関係のある電圧制御発振器40に通すこ
とにより、パルス列に変換し、エンコーダ、パルス発
生、サンプリングパルスに同期して計数器37〜39により
エンコーダ原信号の積分値相当量NA,NB,NCを検出できる
ようにしたものである。微細位置θは各移動方向S
(正方向1、逆方向−1)につき1/4周期位置qによら
ず次式で計算される。(KE:1回転当りのエンコーダの目
盛数) (但し、S=1のとき0≦θ≦180゜,S=−1のとき1
80゜≦θ≦0) また、第32図に示すようにサンプリング周期内にエン
コーダパルスが入らない(粗位置の変化量から求めた速
度を粗速度と呼ぶと、粗速度0)低速動作時は、(22)
式の関係式は成り立たないため、NA,NB,NC値として次式
(23)に示すようにエンコーダパルスの発生時(j=
0)からサンプリング時(j=n)までの総和を求めて
(22)式より微細位置を求める必要がある。
First, referring to FIGS. 30 and 31, a comparison will be made between the case of detecting the instantaneous value of the encoder original signal and the case of detecting the integrated value from the time when the encoder pulse is generated to the time when sampling is performed. When the calculation of the equation (19) is performed by the instantaneous value detection, there is a drawback that the detection error becomes large when noise is mixed in the encoder original signal as shown in FIG. Although noise can be reduced to some extent by taking measures such as providing a filter at the output terminal of the bias voltage application circuit, it can be reduced to some extent. However, there is a limit to the reduction effect when using near a high current use environment such as welding work. . In that respect, when the integrated value detection shown in FIG. 31 is performed, even when noise is mixed in the original encoder signal, the ratio of the noise component to the detected value is small and the detection error can be reduced. Here, as shown in FIG. 34,
By passing the biased signal of the encoder original signal through a voltage controlled oscillator 40 having a linear function relationship between the input voltage and the oscillation frequency, the signal is converted into a pulse train, and is synchronized with the encoder, pulse generation, and sampling pulse by the counters 37 to 39. It is so arranged that the integral value equivalents N A , N B and N C of the encoder original signal can be detected. The fine position θ F depends on each movement direction S
It is calculated by the following formula regardless of the 1/4 cycle position q for (forward direction 1, backward direction-1). ( KE : Number of encoder scales per rotation) (However, when S = 1, 0 ≦ θ F ≦ 180 °, when S = −1, 1
80 ° ≦ θ F ≦ 0) In addition, as shown in FIG. 32, when the encoder pulse does not enter within the sampling period (the speed obtained from the variation of the coarse position is called the coarse speed, the coarse speed is 0). Is (22)
Because not hold expression of relation, N A, N B, the following equation upon the occurrence of encoder pulses as shown in (23) as the N C value (j =
It is necessary to obtain the total from 0) to sampling (j = n) to obtain the fine position from the equation (22).

従って第33図に示したフローチャート図においても粗
速度0か否かの判定を行っている。その他は第24図に示
した第1の実施例と同一である。
Therefore, it is also determined whether or not the coarse speed is 0 in the flowchart shown in FIG. The other points are the same as those of the first embodiment shown in FIG.

次に、上記電圧制御発振器40の例について第35図乃至
第40図を用いて説明する。第35図に抵抗41〜43、コンデ
ンサ44及びインバータ素子45〜47より構成されるCR形発
振回路を示す。本発振回路は、インバータ素子45,46が
直流電源として作用し、コンデンサ44の充放電に伴うイ
ンバータ素子45,46入出力側の電位が各側のしきい電圧
値を越える度にインバータ素子45,46の入出力側の信号
レベルが反転することを利用して発振する動作原理とな
っている。インバータ素子47は波形整形の役割をはた
す。インバータ素子として信号の立上り時間の極めて短
いトランジスタ・トランジスタ・ロジック回路74S04を
用いた場合、R1+R3(Ω),R2(Ω),C(F)を可変と
してB点の発振周波数f(Hz)と上記受動素子特性値間
には第39図、第40図に示す関係が得られ、発振限界付近
から離れた領域ではほぼ次式(24)の関係がなりたつこ
とがわかった。
Next, an example of the voltage controlled oscillator 40 will be described with reference to FIGS. 35 to 40. FIG. 35 shows a CR oscillator circuit composed of resistors 41 to 43, capacitors 44 and inverter elements 45 to 47. In this oscillation circuit, the inverter elements 45, 46 act as a DC power source, and the inverter elements 45, 46 are charged and discharged by the capacitor 44 each time the potential on the input / output side exceeds the threshold voltage value on each side. The operating principle is to oscillate by utilizing the inversion of the signal level on the input / output side of 46. The inverter element 47 plays a role of waveform shaping. When a transistor / transistor logic circuit 74S04 having an extremely short signal rise time is used as an inverter element, R 1 + R 3 (Ω), R 2 (Ω), C (F) are made variable, and the oscillation frequency f ( Hz) and the characteristic values of the above passive elements, the relationships shown in FIGS. 39 and 40 were obtained, and it was found that the relationship of the following expression (24) was established in the region away from the oscillation limit.

式中の定数はトランジスタ・トランジスタ・ロジック
回路内のトランジスタの特性値、抵抗値などの諸定数か
ら決まる値であり、他のインバータ素子を用いた場合は
変化すると考えられるが、各受動素子特性値間の定性的
関係は十分示す式であると考えられ、本発振回路の発振
周波数は一般に次式(25)で示されると考えられる。
(ただし、α,β,γは正の定数である) 式(25)から明らかなように電圧可変抵抗を用いれば
抵抗一次側電圧を変えることにより、発振周波数を変え
ることができる。ここでは、抵抗一次側にエンコーダ原
信号をバイアスした信号を印加し、電圧制御発振器40を
通すことによりパルス列に変換する。式(25)におい
て、R1を電圧可変抵抗とし、電圧可変抵抗として、第36
図に示すような1次側をコイル48で巻回されたコア49に
微小な隙間を隔てて設けられている磁気抵抗素子50の両
端子より可変抵抗をうる構造のものを用いる。原理とし
ては、第36図においてA点印加電圧が変化するとコイル
48に流れる電流が変化し、磁気抵抗素子50に作用する磁
気力が変化することによる磁気抵抗素子の抵抗変化を利
用するものである。磁気抵抗素子は一般に第37図に示す
抵抗特性を示すため、双曲線特性を有する部位で利用で
きるようバイアス電圧を印加し、R00+R3=γと設定す
ると電圧制御発振器の発振周波数fと印加電圧Vの間に
は次式(26),(27)の一次関数関係が成りたつ。
The constants in the equation are values determined from various constants such as transistor, transistor, and transistor characteristic values in the logic circuit, resistance values, etc. The qualitative relationship between them is considered to be a sufficiently expressed equation, and the oscillation frequency of the present oscillation circuit is generally considered to be expressed by the following equation (25).
(However, α, β, γ are positive constants) As is clear from the equation (25), if a voltage variable resistor is used, the oscillation frequency can be changed by changing the primary voltage of the resistor. Here, a signal obtained by biasing the encoder original signal is applied to the primary side of the resistor, and the signal is converted into a pulse train by passing through the voltage controlled oscillator 40. In the formula (25), the R 1 and voltage variable resistor as a voltage variable resistor 36
As shown in the figure, a structure is used in which a variable resistance can be obtained from both terminals of a magnetoresistive element 50 provided on a core 49 wound with a coil 48 on the primary side with a minute gap. The principle is that when the applied voltage at point A changes in FIG.
The change in the current flowing through 48 and the change in the magnetic force acting on the magnetoresistive element 50 are used to change the resistance of the magnetoresistive element. Since the magnetoresistive element generally exhibits the resistance characteristic shown in Fig. 37, if a bias voltage is applied so that it can be used in a region having a hyperbolic characteristic and R 00 + R 3 = γ is set, the oscillation frequency f of the voltage controlled oscillator and the applied voltage are A linear function relationship between the following equations (26) and (27) is established between V.

R1=δ/(V+ε)+R00 ……(26) エンコーダ原信号ejがバイアス電圧印加回路5におい
て、第37図のV00(=(Vα+Vβ)/2)のバイアス電
圧が印加され、コイル両端電圧がVα以上Vβ以下とな
るよう設定すれば、エンコーダ原信号が第36図A点に印
加されると、エンコーダ原信号電圧ejと電圧可変抵抗印
加電圧V、発振周波数fの間には次式(28)(29)の関
係がなりたつ。
R 1 = δ / (V + ε) + R 00 …… (26) If the encoder original signal e j is set in the bias voltage application circuit 5 to a bias voltage of V 00 (= (Vα + Vβ) / 2) shown in FIG. 37 and the voltage across the coil is set to be not less than Vα and not more than Vβ, When the original signal is applied to point A in FIG. 36, the following equations (28) and (29) are established between the encoder original signal voltage e j , the voltage V applied to the variable resistor, and the oscillation frequency f.

f=ξ′ηej+ξ′V00+ζ′ =ξej+ζ(ξ′,ζ′:一定値) ……(29) 従って、第38図に示すようにエンコーダ原信号電圧と
発振周波数の1次関数関係が得られる。
f = ξ'ηe j + ξ'V 00 + ζ '= ξe j + ζ (ξ', ζ ': constant value) (29) Therefore, as shown in FIG. A functional relationship is obtained.

これから、移動体の正方向移動時には、エンコーダ原
信号に対応する電圧制御発振器出力パルス列の周波数及
び計数値は次式(30)〜(32)で示される。
From this, when the moving body moves in the forward direction, the frequency and count value of the voltage controlled oscillator output pulse train corresponding to the encoder original signal are represented by the following equations (30) to (32).

1/4周期位置q=0,1の場合 1/4周期位置q=2,3の場合 逆方向移動の場合も同様に求められ、これらの式より
求められる前記式(22)により微細位置θを求めるこ
とができる。
1/4 period position q = 0,1 1/4 period position q = 2,3 For the reverse movement likewise also required, by the equation obtained from the equations (22) can be obtained a fine position theta F.

また、作業により求められるエンコーダ分解能は異な
るため、所望の分解能をうるため、第35図に示すように
R2可変として式(27)に戻づき発振周波数可変幅Δf
(=ξ′(R2)ΔV,ξ′:R2tとすると小となる。ΔV:エ
ンコーダ電圧両振幅に対応する電圧可変抵抗印加電圧両
振幅)を可変とする装置が考えられる。また、R2可変と
した場合は、第39図に示すように発振周波数の低い領域
(R2tの場合)では発振限界が存在することから、第35
図に示すようにB点では高周波数でパルス発振させ、分
周器52で1/2nに発振周波数を下げることにより安定した
発振が可能となる。抵抗値R2と分周比は位置速度検出装
置の中央処理部36よりマルチプレクサ51a,51bに信号を
送り適当な値を選ぶことによりC点発振周波数可変幅
(エンコーダ分解能に対応)を用途に応じて最適に選択
することが可能となる。
Also, since the encoder resolution required by the work is different, the desired resolution can be obtained, as shown in Fig. 35.
As R 2 is variable, it returns to equation (27) and the oscillation frequency variable width Δf
(= Ξ '(R 2 ) ΔV, ξ': R 2 t is small. ΔV: A voltage variable resistance applied voltage both amplitude corresponding to both encoder voltage amplitude) A device that can be considered is considered. Also, if the R 2 variable, since the oscillation limit (in the case of R 2 t) FIG. 39 are shown as an oscillation frequency lower region exists, 35
As shown in the figure, pulse oscillation is performed at a high frequency at the point B, and the oscillation frequency is reduced to 1/2 n by the frequency divider 52, thereby enabling stable oscillation. The resistance value R 2 and the frequency division ratio are determined by transmitting a signal from the central processing unit 36 of the position / speed detection device to the multiplexers 51a, 51b to select an appropriate value so that the C point oscillation frequency variable width (corresponding to the encoder resolution) can be adjusted according to the application. It is possible to make an optimal selection.

次に、本発明の第3の実施例を第41図を用いて説明す
る。第41図は移動体の初期動作及び通常動作において、
エンコーダ2相原信号位相差の90゜からの位相ずれを検
出する移動体の位置・速度検出方法のタイムチャート図
を示す。第1の実施例では移動体の初期動作における等
速区間を利用してエンコーダ2相原信号位相差の90゜か
らの位相ずれを検出する例を示したが、産業用ロボット
などでは長時間にわたって連続運転する場合が多く、環
境条件の変化などによりエンコーダ2相原信号位相差の
90゜からの位相ずれが変化することが考えられる。そこ
で、通常動作中の等速区間において位相ずれを検出し、
初期動作時に検出し記憶されているデータを書き替える
ことにより、長時間連続運転にも適した位相ずれ補正を
行うことができ、位置・速度検出誤差を低減できる。第
41図において、位相検出タイマは初期動作時のみならず
通常動作時の等速区間においても位相検出を行ってお
り、位相ずれを式(16)に基づき算出し、記憶データを
修正することができる。
Next, a third embodiment of the present invention will be described with reference to FIG. FIG. 41 shows the initial operation and the normal operation of the moving body,
FIG. 4 is a time chart diagram of a method for detecting a position / velocity of a moving body for detecting a phase shift from 90 ° of a phase difference of an encoder two-phase original signal. In the first embodiment, an example is shown in which the phase difference from 90 ° of the encoder two-phase original signal phase difference is detected using the constant velocity section in the initial operation of the moving body. In many cases, the two-phase encoder signal phase difference
It is conceivable that the phase shift from 90 ° changes. Therefore, a phase shift is detected in a constant speed section during normal operation,
By rewriting the data detected and stored during the initial operation, it is possible to correct the phase shift suitable for long-term continuous operation and reduce the position / speed detection error. No.
In Fig. 41, the phase detection timer detects the phase not only during the initial operation but also during the constant speed section during normal operation, and the phase shift can be calculated based on equation (16) and the stored data can be corrected. .

次に本発明の位置・速度検出対象となる移動体がロボ
ットアーム、ロボット手首軸である例を前記第17図を用
いて説明する。第17図は水平多関節形直接駆動ロボット
であり、第1アーム50、第2アーム57は直接駆動モータ
44,51により駆動され、ロボット手首上下軸はサーボモ
ータ58の回転をベルト63で動力伝達し、ボールネジ65で
回転・直進運動変換を行うことにより駆動されており、
ロボット手首回転軸はサーボモータ60の回転が回転形減
速機61で減速され、ベルト64、スプライン軸受取付部材
69、スプライン軸受70を介してスプライン軸71に動力伝
達される。手首上下軸の動作は、ボールネジ65ナット部
と結合されているブラケット67が上下動作することによ
りブラケット67に対して上下方向拘束、回転方向自由に
連結されているスプライン軸71がスプライン軸受70の対
してスプライン嵌合されているため上下方向に動作する
ことによりなされる。
Next, an example in which the moving object to be detected as the position / speed of the present invention is a robot arm or a robot wrist axis will be described with reference to FIG. FIG. 17 shows a horizontal articulated direct drive robot. The first arm 50 and the second arm 57 are direct drive motors.
It is driven by 44, 51, and the robot wrist vertical axis is driven by transmitting the rotation of the servo motor 58 by the belt 63 and converting the rotation and rectilinear motion by the ball screw 65.
The rotation of the servo wrist rotating shaft of the robot wrist is reduced by the rotary type reducer 61, the belt 64, the spline bearing mounting member
69, power is transmitted to the spline shaft 71 via the spline bearing 70. The movement of the wrist vertical axis is such that the bracket 67 connected to the nut part of the ball screw 65 moves up and down to restrain the bracket 67 in the vertical direction, and the spline shaft 71 freely connected in the rotational direction is opposed to the spline bearing 70. This is achieved by operating in the up-down direction due to the spline fitting.

第17図で示したエンコーダはすべてインクリメンタル
方式の例を示しており、4軸すべてに特定位置検出用被
検出体46,53,66,68及び特定位置検出センサ47,54(一部
を図示した)が設けられている。第1、第2アーム・手
首上下軸にはオーバランした時、各軸の動作を停止させ
るストッパが設けられている。
The encoders shown in FIG. 17 are all examples of the incremental system, and the specific position detection target objects 46, 53, 66, 68 and the specific position detection sensors 47, 54 (partially shown) are provided on all four axes. ) Is provided. A stopper is provided on the first and second arm / wrist vertical axes to stop the operation of each axis when an overrun occurs.

第1アーム50、第2アーム57を駆動する直接駆動モー
タ44,51は出力軸に減速機が無いため、減速機付きでモ
ータ回転軸にエンコーダを装着して位置検出する場合と
比べると、出力軸で同一位置分解能をうるのにエンコー
ダに減速比倍の高分解能のものが求められる。その点、
本発明で述べた位置検出方法は高分解能でかつ用途に応
じて可変分解能とすることができ有効である。
Since the direct drive motors 44 and 51 for driving the first arm 50 and the second arm 57 do not have a speed reducer on the output shaft, the output is smaller than when a position is detected by mounting an encoder on the motor rotation shaft with a speed reducer. In order to obtain the same positional resolution on the shaft, the encoder must have a high resolution of twice the reduction ratio. That point,
The position detection method described in the present invention is effective because it has a high resolution and a variable resolution depending on the application.

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

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

(1) エンコーダ原信号の積分量相当のパルス数を計
数して微細位置検出を行っているため、エンコーダ原信
号に部分的に大きいノイズが混入した場合にも微細位置
検出誤差を小さくすることが可能である。
(1) Since the fine position detection is performed by counting the number of pulses equivalent to the integral amount of the encoder original signal, the fine position detection error can be reduced even when a large noise is partially mixed in the encoder original signal. It is possible.

(2) エンコーダ原信号をパルス列に変換する発振回
路はその発振周波数可変幅を外部信号により容易に変更
可能であり、用途に応じた分解能をエンコーダよりうる
ことが可能である。
(2) The oscillation circuit that converts the encoder original signal into a pulse train can easily change the oscillation frequency variable width by an external signal, and can obtain a resolution corresponding to the application from the encoder.

(3) サンプリング周期がエンコーダパルス発生周期
より短い低速動作時にも本位置・速度検出方法は高分解
能の位置・速度検出が可能である。
(3) The present position / speed detection method enables high-resolution position / speed detection even during low-speed operation in which the sampling period is shorter than the encoder pulse generation period.

(4) 移動方向検出を粗検出と微細検出を併用して行
うことにより、移動方向変化時にも位置を正確に検出で
きる。
(4) By detecting the moving direction using both the coarse detection and the fine detection, the position can be accurately detected even when the moving direction changes.

(5) サーボモータにより駆動される移動体の位置検
出用エンコーダの2相原信号位相差に90゜から位相ずれ
がある場合にも位相ずれを考慮してエンコーダパルス間
の補間位置を検出するため位置検出誤差を小さくでき
る。
(5) A position for detecting the interpolation position between encoder pulses in consideration of the phase shift even when there is a phase shift from 90 ° in the two-phase original signal phase difference of the position detection encoder of the moving body driven by the servomotor. The detection error can be reduced.

(6) サンプリング周期内にエンコーダパルスが全く
発生しない低速動作時にもエンコーダ原信号に基づき位
置・速度検出を行っているため、移動体の低速動作時の
制御性は損われない。
(6) Even in a low-speed operation in which no encoder pulse is generated within the sampling period, the position and speed are detected based on the encoder original signal, so that the controllability of the moving body in the low-speed operation is not impaired.

(7) 移動方向を粗検出・微細検出を組み合わせて行
っているため低速移動時の移動方向変化時にも移動方向
を正確に検出でき、位置を正確に検出できる。
(7) Since the movement direction is performed by a combination of coarse detection and fine detection, the movement direction can be accurately detected even when the movement direction changes during low-speed movement, and the position can be accurately detected.

(8) 移動体が長時間連続動作時にもその等速区間に
おいて、エンコーダ2相原信号位相差の90゜からの位相
ずれを検出することにより、環境条件の変化により位相
ずれ変化にも対応可能である。
(8) Even when the moving body is continuously operated for a long time, by detecting a phase shift of the encoder two-phase original signal phase difference from 90 ° in the constant velocity section, it is possible to cope with a phase shift change due to a change in environmental conditions. is there.

(9) 電圧制御発振器を用いてエンコーダパルス間の
補間位置検出を行うことにより、エンコーダ原信号のノ
イズ混入による補間位置検出誤差を低減できる。
(9) By performing the interpolation position detection between the encoder pulses using the voltage controlled oscillator, it is possible to reduce the interpolation position detection error due to the noise mixing of the encoder original signal.

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

第1図は本発明の位置・速度検出のタイムチャート図、
第2図は本発明の位置出装置のブロック図、第3図はエ
ンコーダの1/4周期位置とエンコーダ原信号符号の関係
を示す図、第4図は本発明の位置・速度検出方法のフロ
ーチャート図、第5図は第1の実施例の電圧制御発振器
の回路図、第6図は本発明のバイアス電圧印加回路と電
圧可変抵抗の例を示す図、第7図は第5図の電圧制御発
振器を第2図の位置・速度検出装置に適用した場合の第
2図A点印加電圧と電圧制御発振器の発振周波数の関係
を示す図、第8図は第6図に示した電圧可変抵抗の抵抗
値と入力電圧の関係を示す図、第9図は本発明の第2の
実施例の電圧制御発振器の回路図、第10図は第9図の電
圧制御発振器を装置に組み込んだ場合の電圧制御発振器
の発振周波数可変幅と可変抵抗値の関係を示す図、第11
図及び第12図は第5図に示す電圧制御発振器の動作素子
特性値を変化させた時の発振周波数の変化を示す図、第
13図はサンプリング周期がエンコーダパルス発生周期よ
り短い低速動作時の位置検出のタイムチャート図、第14
図は計数器の詳細な構成図、第15図は計数器・対計数器
の動作タイムチャート図、第16図は本発明の第3の実施
例で述べた位置・速度検出装置を移動体の位置・速度制
御装置に適用した場合の制御装置のブロック図、第17図
は位置・速度検出装置の検出対象の例として示した産業
用ロボットの構造図、第18図は本発明の移動体の通常動
作時の位置・速度検出方法のタイムチャート図、第19図
は本発明の第1の実施例インクリメンタル方式のエンコ
ーダを用いた移動体の位相ずれ検出方法を示すタイムチ
ャート図、第20図は本発明の第1の実施例の絶対番地方
式のエンコーダを用いた移動体の位相ずれ検出方法を示
すタイムチャート図、第21図は本実施例の移動体の位置
・速度検出装置のブロック図、第22図はインクリメンタ
ル方式のエンコーダを用いた移動体の初期動作方法を示
すフローチャート図、第23図は絶対番地方式のエンコー
ダを用いた移動体の初期動作方法を示すフローチャート
図、第24図は本発明の移動体の通常動作時の位置・速度
検出方法を示すフローチャート図、第25図は本発明の移
動体の位置・速度検出装置を含む移動体の位置・速度制
御装置のブロック図、第26図はインクリメンタル方式の
エンコーダを用い、直接駆動モータによりアーム状移動
体を回転駆動する装置の構造を示す縦断面図、第27図は
第26図のXXVII−XXVII部断面図、第28図はインクリメン
タル方式のエンコーダを用いた移動体の原点位置復帰方
法を示す図、第29図はエンコーダのパルス間の補間位置
の演算を行うのに用いるテーブルの構成を示す図、第30
図はサンプリング時にエンコーダ原信号の瞬時値検出を
行う場合の検出量を示す図、第31図はサンプリング時に
エンコーダ原信号のエンコーダパルス発生時からの積分
値検出を行う場合の検出量を示す図、第32図はサンプリ
ング周期の間にエンコーダパルスが1ヶも発生しない場
合のエンコーダ原信号の積分値検出を行う場合の検出量
を示す図、第33図は本発明の第2の実施例の移動体の通
常動作時の位置・速度検出方法を示すフローチャート、
第34図は第2の実施例の移動体の位置・速度検出装置の
ブロック図、第35図は第34図における電圧制御発振器の
回路構成例を示す図、第36図は第34図におけるバイアス
電圧印加回路の例及び電圧可変抵抗の構成例を示す図、
第37図は磁気抵抗素子の特性を示す図、第38図は第35図
の電圧制御発振器と第36図の電圧可変抵抗、バイアス電
圧印加回路を組み合わせた場合の発振特性を示す図、第
39図及び第40図は第35図の示す電圧制御発振器の発振周
波数と受動素子特性値の関係を示す図、第41図は本発明
の第3の実施例の位相ずれ検出方法を示すタイムチャー
図、第42図は従来の移動体の位置・速度検出方法を示す
タイムチャート図、第43図は従来の移動体の位置・速度
検出方法を示すフローチャート図、第44図は従来の移動
体の位置・速度検出装置のブロック図、第45図はエンコ
ーダ2相原信号位相差に90゜からの位相ずれがある場合
の移動体の位置・速度検出のタイムチャート図、第46図
は真の微細位置45゜時のエンコーダ2相原信号位相差の
90゜からの位相ずれとと微細位置検出誤差の関係を示す
図、第47図は従来の移動体の特定位置検出センサと特定
位置被検出体の配置を示す図、第48図は従来の移動体の
原点位置復帰方法を示す図である。
FIG. 1 is a time chart of position / speed detection of the present invention,
FIG. 2 is a block diagram of the position locating device of the present invention, FIG. 3 is a diagram showing the relationship between the 1/4 period position of the encoder and the encoder original signal code, and FIG. 4 is a flowchart of the position / speed detecting method of the present invention. FIG. 5, FIG. 5 is a circuit diagram of the voltage controlled oscillator of the first embodiment, FIG. 6 is a diagram showing an example of a bias voltage applying circuit and a voltage variable resistor of the present invention, and FIG. FIG. 2 shows the relationship between the applied voltage at point A and the oscillation frequency of the voltage-controlled oscillator when the oscillator is applied to the position / speed detecting device shown in FIG. 2. FIG. 8 shows the relationship between the voltage variable resistor shown in FIG. FIG. 9 is a diagram showing a relationship between a resistance value and an input voltage, FIG. 9 is a circuit diagram of a voltage-controlled oscillator according to a second embodiment of the present invention, and FIG. 10 is a voltage when the voltage-controlled oscillator of FIG. FIG. 11 is a diagram showing the relationship between the oscillation frequency variable width of the controlled oscillator and the variable resistance value,
12 and 12 are diagrams showing changes in the oscillation frequency when the operating element characteristic values of the voltage controlled oscillator shown in FIG. 5 are changed,
Figure 13 is a time chart of position detection during low-speed operation where the sampling cycle is shorter than the encoder pulse generation cycle.
FIG. 15 is a detailed configuration diagram of the counter, FIG. 15 is an operation time chart of the counter / counter, and FIG. 16 is a diagram showing the position / speed detecting device described in the third embodiment of the present invention. FIG. 17 is a block diagram of a control device when applied to a position / speed control device, FIG. 17 is a structural diagram of an industrial robot shown as an example of a detection target of a position / speed detection device, and FIG. FIG. 19 is a time chart of a position / velocity detection method at the time of normal operation, FIG. 19 is a time chart showing a method of detecting a phase shift of a moving body using an incremental encoder of the first embodiment of the present invention, and FIG. FIG. 21 is a time chart showing a method for detecting a phase shift of a moving object using an absolute address type encoder according to the first embodiment of the present invention. FIG. 21 is a block diagram of a position / speed detecting device for the moving object according to the present embodiment. Fig. 22 uses an incremental encoder FIG. 23 is a flowchart showing an initial operation method of a moving object using an encoder of an absolute address type, and FIG. 24 is a flowchart showing an initial operation method of the moving object using an absolute address type encoder. FIG. 25 is a flow chart showing a speed detection method, FIG. 25 is a block diagram of a position / speed control device of a moving object including a position / speed detection device of the moving object of the present invention, and FIG. FIG. 27 is a longitudinal sectional view showing a structure of a device for rotatingly driving an arm-shaped moving body by a drive motor, FIG. 27 is a cross-sectional view taken along the line XXVII-XXVII of FIG. 26, and FIG. FIG. 29 is a diagram showing a position return method, FIG. 29 is a diagram showing a configuration of a table used to calculate an interpolation position between encoder pulses, and FIG.
The figure shows the detection amount when the instantaneous value detection of the encoder original signal is performed at the time of sampling, and FIG. 31 shows the detection amount when performing the integral value detection from the time of the encoder pulse generation of the encoder original signal at the time of sampling. FIG. 32 is a diagram showing a detection amount when detecting an integral value of an encoder original signal when no encoder pulse is generated during a sampling period, and FIG. 33 is a diagram showing a movement amount according to the second embodiment of the present invention. Flow chart showing the position and speed detection method during normal operation of the body,
FIG. 34 is a block diagram of a position / velocity detecting device for a moving object according to a second embodiment, FIG. 35 is a diagram showing a circuit configuration example of a voltage controlled oscillator in FIG. 34, and FIG. A diagram showing an example of a voltage application circuit and a configuration example of a voltage variable resistor,
FIG. 37 is a diagram showing characteristics of the magnetoresistive element, FIG. 38 is a diagram showing oscillation characteristics when the voltage controlled oscillator of FIG. 35 is combined with the voltage variable resistor and the bias voltage applying circuit of FIG. 36,
39 and 40 are diagrams showing the relationship between the oscillation frequency of the voltage controlled oscillator shown in FIG. 35 and the characteristic values of the passive elements, and FIG. 41 is a time chart showing the phase shift detecting method according to the third embodiment of the present invention. Figure, FIG. 42 is a time chart diagram showing a conventional moving body position / speed detection method, FIG. 43 is a flowchart diagram showing a conventional moving body position / speed detection method, and FIG. 44 is a conventional moving body detection method. Block diagram of position / velocity detector, Fig. 45 is a time chart of position / velocity detection of a moving object when the phase difference of the encoder two-phase original signals is 90 ° out of phase, and Fig. 46 is a true fine position. 45 degree encoder 2 phase original signal phase difference
Fig. 47 is a diagram showing the relationship between the phase shift from 90 ° and fine position detection error. Fig. 47 is a diagram showing the arrangement of the specific position detection sensor and the specific position detected object of the conventional moving body. Fig. 48 is the conventional movement. It is a figure which shows the origin position return method of a body.

フロントページの続き (56)参考文献 特開 昭54−19773(JP,A) 特開 昭61−123905(JP,A) 特開 昭59−109809(JP,A) 実開 昭58−3643(JP,U) 特公 平4−65985(JP,B2) 特公 平5−29045(JP,B2)Continuation of the front page (56) References JP-A-54-19773 (JP, A) JP-A-61-123905 (JP, A) JP-A-59-109809 (JP, A) , U) Japanese Patent Publication No. 4-658985 (JP, B2) Japanese Patent Publication No. 5-29045 (JP, B2)

Claims (27)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】移動体に接続されたエンコーダからのエン
コーダパルスによる粗位置検出工程と、エンコーダ原信
号を電圧−周波数変換手段に入力して得られる正弦波状
周波数分布を有するパルス列を用いて粗位置パルス発生
時からのパルス数を計数して行なう微細位置検出工程
と、前記粗位置と微細位置の和として移動体の位置検出
を行なう工程と、位置の変化量に基いて移動体の速度を
検出する工程と、を含む移動体の位置・速度検出方法。
1. A coarse position detecting step using an encoder pulse from an encoder connected to a moving body, and a coarse position using a pulse train having a sinusoidal frequency distribution obtained by inputting an encoder original signal to a voltage-frequency converting means. A fine position detection step of counting the number of pulses from the time of generation of the pulse, a step of detecting the position of the moving body as the sum of the coarse position and the fine position, and detecting the speed of the moving body based on the amount of change in position A method of detecting the position / velocity of a moving body, including the step of:
【請求項2】移動体に接続されたエンコーダからのエン
コーダパルスによる粗位置検出工程と、エンコーダ原信
号を電圧−周波数変換手段に入力して得られる正弦波状
周波数分布を有するパルス列を用いて粗位置パルス発生
時からのパルス数を計数して行なう微細位置検出工程
と、前記粗位置と微細位置の和として移動体の位置検出
を行なう工程と、を含む移動体の位置検出方法。
2. A coarse position detecting step using an encoder pulse from an encoder connected to a moving body, and a coarse position using a pulse train having a sinusoidal frequency distribution obtained by inputting an encoder original signal to a voltage-frequency converting means. A method for detecting the position of a moving object, comprising: a fine position detecting step of counting the number of pulses from the time of generation of the pulse; and a step of detecting the position of the moving object as the sum of the coarse position and the fine position.
【請求項3】請求項1において、エンコーダのパルス検
出位置間の補間を行うために、2相の90゜位相の異なる
エンコーダ原信号のパルス検出時からサンプリング時ま
でのパルス変換されたパルス数を計数し、零値信号を電
圧制御発振器、計数器を通して同一時刻間で得られるパ
ルス数を前記各パルス数から減じて得られる各パルス数
より、エンコーダパルス発生位置からサンプリング位置
までの微細位置を演算し、前記粗位置と前記微細位置の
和として求められる精位置を位置情報とし、サンプリン
グ時の精位置の変化から移動体の速度を検出する移動体
の位置・速度検出方法。
3. The number of pulse-converted pulses from the time of pulse detection to the time of sampling of encoder original signals having two 90-degree phases different from each other in order to perform interpolation between the pulse detection positions of the encoder. Count and calculate the fine position from the encoder pulse generation position to the sampling position from each pulse number obtained by subtracting the pulse number obtained at the same time through the voltage controlled oscillator and counter from the pulse number A position / velocity detection method for a moving body, in which the precise position obtained as the sum of the rough position and the fine position is used as position information and the velocity of the moving body is detected from the change in the precise position at the time of sampling.
【請求項4】請求項1又は3において、エンコーダ原信
号のパルス検出時からはじめてのサンプリング時(第k
サンプリング時)までのエンコーダA,B相原信号及び零
値信号を電圧制御発振器、計数器を通して得られる各パ
ルス数NA (k),NB (k),NO (k)を記憶し、第k+nサンプリ
ング時まで、エンコーダ原信号のパルス検出が無い場合
は第k+iサンプリング時(1in)の各検出パル
ス数を により算出し、エンコーダ原信号のパルス検出位置から
サンプリング時までの微細位置を演算し、前記粗位置と
前記微細位置の和として求められる精位置を位置情報と
し、サンプリング時の位置の変化から速度を検出する移
動体の位置・速度検出方法。
4. The method according to claim 1 or 3, wherein sampling is performed for the first time from pulse detection of the encoder original signal (k-th sampling).
Encoder A, B Aihara signal and a voltage controlled oscillator the zero value signal to the time of sampling), the number of pulses N A obtained through counter (k), N B (k ), stores N O (k), the If there is no pulse detection of the encoder original signal until k + n sampling, set the number of each detection pulse at the k + ith sampling (1 in) The fine position from the pulse detection position of the encoder original signal to the time of sampling is calculated, and the fine position obtained as the sum of the coarse position and the fine position is used as position information, and the speed is calculated from the change in position at the time of sampling. The method of detecting the position and speed of the moving object to be detected.
【請求項5】請求項1,3又は4において、位置検出時に
エンコーダ2相原信号各々の正負関係から定まる1/4周
期位置を検出し、移動方向をエンコーダ2相原信号をパ
ルス化する際に得られる方向弁別信号に基づく粗検出
と、エンコーダパルス発生間隔で微細位置変化量の符号
検出による微細検出を組み合わせて検出する移動体の位
置・速度検出方法。
5. The encoder according to claim 1, 3 or 4, wherein at the time of position detection, a quarter cycle position determined from the positive / negative relationship of each of the encoder two-phase original signals is detected, and a moving direction is obtained when the encoder two-phase original signals are pulsed. A method for detecting the position and speed of a moving object, wherein the coarse detection based on the direction discrimination signal and the fine detection based on the sign of the fine position change at the encoder pulse generation interval are combined.
【請求項6】移動体に接続されたエンコーダによる位置
・速度検出装置において、エンコーダ原信号よりエンコ
ーダパルス及び移動方向弁別信号を発生する波形整形回
路と、前記エンコーダパルスにより粗位置を検出するア
ップ・ダウン計数器と、その粗位置をサンプリング時間
毎にサンプリング信号を発生するサンプリング・パルス
・タイマからの当該サンプリング時間に同期化させる一
時記憶回路とを備えた粗位置検出部と、 エンコーダ原信号及び零値信号を入力として前記エンコ
ーダパルス及びサンプリングパルスがゲート信号となり
前記電圧−周波数変換手段より送出される3種のパルス
列の計数を開始・終了する計数器を備えた微細位置検出
部と、 エンコーダパルス間でエンコーダ2相原信号の正負関係
より定まる1/4周期位置検出回路と、前記粗位置検出
部、微細位置検出部及び1/4周期位置検出回路の動作制
御を行う中央処理部と、を備えた移動体の位置・速度検
出装置。
6. A position / velocity detecting device using an encoder connected to a moving body, wherein a waveform shaping circuit for generating an encoder pulse and a moving direction discrimination signal from an encoder original signal, and an up / down detector for detecting a coarse position by the encoder pulse. A coarse position detector comprising a down counter, a temporary storage circuit for synchronizing the coarse position with the sampling time from a sampling pulse timer for generating a sampling signal for each sampling time, an encoder original signal and zero. A fine position detection unit having a counter for starting and ending counting of three types of pulse trains sent from the voltage-frequency conversion means, with the encoder pulse and the sampling pulse as gate signals with a value signal as an input; 1/4 cycle position detection determined by the positive / negative relation of the encoder 2-phase original signal Circuit and the coarse position detection unit, a fine position detector and the position-speed detector of a moving body, comprising: a central processing unit, a controlling operation of the 1/4 cycle position detection circuit.
【請求項7】請求項6において、微細位置検出部の電圧
−周波数変換手段は、バイアスされた出力電圧を発生さ
せるバイアス電圧印加回路と、前記バイアス電圧印加回
路出力が入力となり入力電圧により異なる周波数のパル
ス列を発生する電圧制御発振器と、を備え、3種のパル
ス列は前記電圧制御発振器より送出されるものである移
動体の位置・速度検出装置。
7. The voltage-frequency conversion means of the fine position detecting section according to claim 6, wherein the voltage-frequency conversion means includes a bias voltage application circuit for generating a biased output voltage; And a voltage-controlled oscillator for generating a pulse train of the moving object, wherein the three kinds of pulse trains are transmitted from the voltage-controlled oscillator.
【請求項8】請求項6において、電圧制御発振器を電圧
可変抵抗を有するCR発振回路により構成し、前記電圧制
御発振器の発振周波数が入力電圧と一次関数関係となる
ように前記バイアス電圧印加回路、前記電圧可変抵抗等
の各構成要素を構成した移動体の位置・速度検出装置。
8. A bias voltage applying circuit according to claim 6, wherein said voltage controlled oscillator is constituted by a CR oscillation circuit having a voltage variable resistor, and said oscillation frequency of said voltage controlled oscillator has a linear function with an input voltage. A position / velocity detection device for a moving body, which comprises each of the constituent elements such as the voltage variable resistor.
【請求項9】請求項8において、電圧可変抵抗を電圧印
加側がコイルで巻回されている磁性材料と、微小隙間で
その両端が接しており出力端子を有する磁気抵抗素子と
により構成した移動体の位置・速度検出装置。
9. The moving body according to claim 8, wherein the variable voltage resistor comprises a magnetic material wound on the coil on the voltage application side and a magnetoresistive element having both ends in contact with a minute gap and having an output terminal. Position / speed detector.
【請求項10】請求項8又は9において、電圧可変抵抗
以外の抵抗もしくはコンデンサが複数種類並列に設けら
れ、出力段には分周器が設けられ、中央処理部からの信
号により特定の抵抗もしくはコンデンサ及び分周器の特
定の分周比が選択可能に構成された移動体の位置・速度
検出装置。
10. A resistor or a capacitor other than a voltage variable resistor is provided in parallel in a plurality of types, a frequency divider is provided in an output stage, and a specific resistor or a capacitor is provided by a signal from a central processing unit. A moving object position / speed detecting device configured to select a specific frequency division ratio of a capacitor and a frequency divider.
【請求項11】請求項8において、要求分解能に応じて
特定の抵抗もしくはコンデンサ及び分周器の特定の分周
比を選択することにより、前記電圧制御発振器において
特定の発振周波数可変幅をうる手段を備えた移動体の位
置・速度検出装置。
11. A means for obtaining a specific oscillation frequency variable width in said voltage controlled oscillator by selecting a specific resistor or capacitor and a specific division ratio of a frequency divider according to a required resolution. A position / velocity detection device for a moving body.
【請求項12】請求項7〜11のいずれかにおいて、移動
体の位置・速度検出装置を移動体を駆動するモータのモ
ータ制御装置と接続し、モータ制御方法に関するプログ
ラムを中央処理部に備えている移動体の位置・速度検出
装置。
12. The central processing unit according to claim 7, wherein the position / speed detecting device of the moving body is connected to a motor control device of a motor for driving the moving body, and a program relating to the motor control method is provided in the central processing unit. Position / speed detector for moving objects.
【請求項13】請求項12において、モータ制御装置によ
り駆動されるモータがロボット関節駆動用であり、位置
検出用エンコーダがモータもしくは駆動される関節に結
合されている移動体の位置・速度検出装置。
13. The position / speed detecting device for a moving body according to claim 12, wherein the motor driven by the motor control device is for driving a robot joint, and the position detecting encoder is connected to the motor or the joint to be driven. .
【請求項14】請求項5〜13のいずれかにおいて、A相
計数器、B相計数器、零値計数器を各々一対の計数器で
構成し、一方の計数器の計数終了時に他方の計数器に計
数開始させる手段を備えた移動体の位置・速度検出装
置。
14. An apparatus according to claim 5, wherein each of the A-phase counter, the B-phase counter and the zero-value counter comprises a pair of counters, and when the counting of one of the counters is completed, the counting of the other counter is completed. A position / velocity detecting device for a moving object, comprising means for causing a container to start counting.
【請求項15】移動体に接続されたエンコーダにより、
ある時刻の位置・速度を求める際に、移動体移動時にエ
ンコーダ2相原信号が零値を切る時刻に発生するエンコ
ーダパルスを計数することにより粗位置を検出し、エン
コーダ2相信号と零値信号をもとに前記エンコーダパル
ス間の微細位置(補間量)を検出し、粗位置と微細位置
の和として位置を検出し、その位置の変化量に基づき速
度を検出する移動体の位置・速度検出方法において、 移動体の等速度動作にエンコーダパルスの時間間隔を計
時し、あわせてその間隔におけるエンコーダ2相原信号
の正負より定まるエンコーダの1/4周期位置q(正転
時、逆転時共に0→1→2→3→0となるよう各移動方
向につき番号付けられる)及び移動方向S(正転:1,逆
転:−1)を検出し、特定の連続するq値(例えばq=
0,1)を有するエンコーダパルス間隔tq=0,tq=1
より次式によりエンコーダ2相原信号の90゜からの位相
ずれを検出・記憶し、 次に、移動体の通常動作中における移動方向変化時の変
化直前・直後のエンコーダ2相原信号の1/4周期位置q1,
q2{ただし、通常動作開始時のq値はq2とし、整数xの
整数yの剰余をmody(x)と表記する場合、q1=mod
4(q2−1)}及びサンプリング時の1/4周期位置qを検
出し、基準となる1/4周期位置(例えばq=0)より2
パルス毎に粗位置を計数するよう計数値を補正する方法
をとり、サンプリング時のエンコーダパルス計数値P0,
回転角度/エンコーダパルス数=k2,移動方向変化直前
・直後の移動方向S1,S2(正転:1,逆転:−1,但し、通常
動作開始時はS2:移動方向,S1:移動方向と反対方向とす
る)とした場合、粗位置θを次式で求め、 (i)移動方向変化時からmod2(q)=1となるまで θ=k2{P0+S1・mod2(q2)} (ii)移動方向変化後でmod2(q)=1となった後 θ=k2{P0−S2・mod2(q)} 微細位置θはエンコーダパルス2パルス分の範囲(エ
ンコーダ原信号の位相180゜分)を補間するように、エ
ンコーダ2相原信号,零値信号,移動方向,1/4周期位置
及び位相ずれをもとに逆正接演算(例えば、サンプリン
グ時のエンコーダ2相原信号瞬時値eA,eB,零値信号瞬時
値eC,位相ずれ,移動方向Sとし、例えば次式におい
て、 S,,eA,eB,eCを与えてθを求める)を行うことによ
り求め、位置θを粗位置θと微細位置θの和として
検出することを特徴とする移動体の位置・速度検出方
法。
15. An encoder connected to a moving body,
When calculating the position / velocity at a certain time, the coarse position is detected by counting the encoder pulses generated at the time when the encoder 2-phase original signal crosses the zero value when the moving body moves, and the encoder 2-phase signal and the zero-value signal are detected. A position / speed detection method for a moving object, wherein a position (interpolation amount) between the encoder pulses is detected based on the detected position, the position is detected as the sum of the coarse position and the fine position, and the speed is detected based on the amount of change in the position. In the above, the time interval of the encoder pulse is measured for the constant speed operation of the moving body, and the quarter period position q of the encoder determined by the sign of the encoder two-phase original signal at that interval (0 → 1 for both forward and reverse rotations) → 2 → 3 → 0 for each moving direction) and the moving direction S (normal rotation: 1, reverse rotation: −1) are detected, and a specific continuous q value (for example, q =
0,1) encoder pulse interval t q = 0 , t q = 1
From the following equation, the phase shift of the encoder two-phase original signal from 90 ° is detected and stored, and Next, the 1/4 cycle position q 1 of the encoder two-phase original signal immediately before and after the change when the moving direction changes during the normal operation of the moving body,
q 2 {However, when the q value at the start of normal operation is q 2, and the remainder of the integer y of the integer x is represented by mod y (x), q 1 = mod
4 (q 2 −1)} and the 1/4 cycle position q at the time of sampling are detected, and 2 is obtained from the reference 1/4 cycle position (for example, q = 0).
A method of correcting the count value so as to count the coarse position for each pulse is employed, and the encoder pulse count value P 0 ,
Rotation angle / encoder pulse number = k 2 , movement direction S 1 , S 2 just before and after change in movement direction (forward: 1, reverse: −1, but when normal operation starts, S 2 : movement direction, S 1 : The direction opposite to the moving direction), the rough position θ R is calculated by the following equation. (I) θ R = k 2 {P 0 + S from the time when the moving direction changes until mod 2 (q) = 1 1 · mod 2 (q 2 )} (ii) After mod 2 (q) = 1 after changing the moving direction θ R = k 2 {P 0 −S 2 · mod 2 (q)} Fine position θ F Is the arctangent based on the encoder two-phase original signal, zero value signal, moving direction, quarter period position and phase shift so as to interpolate the range of two encoder pulses (180 ° phase of the encoder original signal). operation (e.g., an encoder 2 Aihara signal instantaneous value e a the time of sampling, e B, zero value signal instantaneous value e C, out of phase, and a moving direction S, for example, in the formula, S ,, e A , e B , e C are given to obtain θ F ), and the position θ is detected as the sum of the coarse position θ R and the fine position θ F. Position / speed detection method.
【請求項16】請求項15において、移動体の初期動作
(インクリメンタル方式エンコーダを用いた場合は、原
点復帰動作及び通常動作開始位置への移動,絶対番地方
式のエンコーダを用いた場合は通常動作開始位置への移
動)時の等速動作区間を利用してエンコーダパルス間隔
を計時し、エンコーダ2相原信号位相差の90゜からの位
相ずれを検出する移動体の位置・速度検出方法。
16. An apparatus according to claim 15, wherein an initial operation of the moving body is performed (returning to an origin return operation and a normal operation start position when an incremental encoder is used, and a normal operation starts when an absolute address encoder is used). A method for detecting the position / speed of a moving body, which measures the encoder pulse interval using the constant speed operation section at the time of (movement to a position) and detects a phase shift of the encoder two-phase original signal phase difference from 90 °.
【請求項17】請求項15又は16において、移動体の移動
方向検出をエンコーダ原信号をパルス化する際に得られ
る粗検出と、エンコーダパルス間における微細位置の変
化量の符号変化から検出する微細検出とから求める移動
体の位置・速度検出方法。
17. The method according to claim 15, wherein a moving direction of the moving body is detected by coarse detection obtained when the encoder original signal is pulsed and a fine change detected by a sign change of a fine position change amount between encoder pulses. A method for detecting the position and speed of a moving object obtained from detection.
【請求項18】請求項15〜17のいずれかにおいて、移動
体の通常動作時の等速区間において、エンコーダのパル
ス間隔,1/4周期位置及び移動方向を検出・記憶し、エン
コーダ2相原信号の位相差の90゜からの位相ずれを演算
・記憶し、サンプリング時にサンプリング直前に検出さ
れた位相ずれに基づき逆正接を演算し、微細位置を検出
する移動体の位置・速度検出方法。
18. The encoder two-phase original signal according to claim 15, wherein a pulse interval, a quarter-period position and a moving direction of the encoder are detected and stored in a constant speed section during a normal operation of the moving body. A method for calculating and storing a phase shift from 90 ° of the phase difference, calculating an arc tangent based on the phase shift detected immediately before sampling at the time of sampling, and detecting a fine position, thereby detecting a fine position.
【請求項19】請求項15〜18のいずれかにおいて、微細
位置検出に当り、正弦波状エンコーダ2相原信号及び零
値信号を電圧制御発振器に通すことにより正弦波状周波
数分布を有するパルス列に変換し、エンコーダのパルス
検出時からサンプリング時までのパルス数を計数し、エ
ンコーダパルス検出時からサンプリング時までの2相正
弦波積分量相当値より、逆正接演算を行うことにより微
細位置を検出する移動体の位置・速度検出方法。
19. A pulse train having a sinusoidal frequency distribution by passing a sinusoidal encoder two-phase original signal and a zero-value signal through a voltage-controlled oscillator for fine position detection according to any one of claims 15 to 18, The number of pulses from the encoder pulse detection to the sampling time is counted, and the arc tangent operation is calculated from the value corresponding to the two-phase sine wave integral from the encoder pulse detection to the sampling time to determine the fine position of the moving object. Position / speed detection method.
【請求項20】請求項15〜18のいずれかにおいて、微細
位置検出に当り、サンプリング時にエンコーダ2相原信
号と零値信号をサンプリングホールドし、A/D変換し、
サンプリング時の2相正弦波瞬時値より逆正接演算を行
うことにより微細位置を検出する移動体の位置・速度検
出方法。
20. An apparatus according to claim 15, wherein at the time of fine position detection, an encoder two-phase original signal and a zero-value signal are sampled and held at the time of sampling, and A / D converted.
A position / velocity detection method for a moving body, which detects a fine position by performing an arctangent calculation from instantaneous values of a two-phase sine wave at the time of sampling.
【請求項21】移動体に接続されたエンコーダによる移
動体の位置・速度検出装置において、エンコーダのパル
ス間隔を検出するタイマと、1/4周期位置検出回路と、
各移動方向S(正転時1,逆転時−1)につき、エンコー
ダ2相原信号の位相差の90゜からの位相ずれ(0)及
び1/4周期位置qより2相原信号瞬時値比もしくは積分
量相当値比に対応する逆正接データ{例えばq=0の場
合S・sinθF/cos(θ+)}より微細位置θを探
索可能なデータの記憶されるROMを有することを特徴と
する移動体の位置・速度検出装置。
21. A position / velocity detecting device for a moving body by an encoder connected to the moving body, wherein a timer for detecting a pulse interval of the encoder, a quarter period position detecting circuit,
For each moving direction S (forward 1 and reverse -1), the phase difference (0) of the phase difference of the encoder 2 phase original signal from 90 ° and the 2 phase original signal instantaneous value ratio or integration from 1/4 cycle position q It is characterized by having a ROM in which data capable of searching the fine position θ F from the arctangent data corresponding to the quantity equivalent value ratio (for example, S · sin θ F / cos (θ F +) when q = 0) is stored. Position / velocity detection device for moving objects.
【請求項22】請求項21において、エンコーダ2相原信
号よりエンコーダパルス及び移動方向弁別信号を発生す
る波形整形回路と前記エンコーダパルスにより粗位置を
検出するアップ・ダウン計数器と、その粗位置をサンプ
リング時間毎にサンプリング信号を発生するサンプリン
グ・パルス・タイマからの当該サンプリング時間に同期
化させる一時記憶回路とを備えた粗位置検出部と、 エンコーダ2相原信号及び零値信号を入力としてバイア
スされた出力電圧を発生させるバイアス電圧印加回路,
前記バイアス電圧印加回路出力が入力となり、入力電力
により異なる周波数のパルス列を発生する電圧制御発振
器,前記エンコーダパルス及びサンプリングパルスがゲ
ート信号となり前記電圧制御発振器より送出される3種
のパルス列の計数を開始・終了する計数器とを備えた微
細位置検出部と、 前記各検出部の動作制御を行う中央処理部とを備えた移
動体の位置・速度検出装置。
22. A waveform shaping circuit for generating an encoder pulse and a moving direction discrimination signal from an encoder two-phase original signal, an up / down counter for detecting a coarse position by the encoder pulse, and sampling the coarse position. A coarse position detector having a temporary storage circuit for synchronizing with the sampling time from a sampling pulse timer for generating a sampling signal every time; and an output biased with an encoder two-phase original signal and a zero value signal as inputs. Bias voltage application circuit for generating voltage,
The output of the bias voltage application circuit becomes an input, a voltage-controlled oscillator that generates a pulse train having a different frequency according to the input power, and the counting of the three types of pulse trains sent from the voltage-controlled oscillator is started, with the encoder pulse and the sampling pulse becoming gate signals. A position / velocity detection device for a moving object, comprising: a fine position detection unit having a counter to be terminated; and a central processing unit for controlling the operation of each detection unit.
【請求項23】請求項21において、エンコーダ2相原信
号よりエンコーダパルス及び移動方向弁別信号を発生す
る波形整形回路と前記エンコーダパルスにより粗位置を
検出するアップ・ダウン計数器と、その粗位置をサンプ
リング時間毎にサンプリング信号を発生するサンプリン
グ・パルス・タイマからの当該サンプリング時間に同期
化させる一時記憶回路とを備えた粗位置検出部と、 エンコーダ2相原信号及び零値信号にバイアス電圧を印
加するバイアス電圧印加回路と、前記各信号をサンプリ
ング・パルスに同期してサンプルホールドするサンプル
ホールダと、サンプルホールダ出力をA/D変換するA/D変
換器とを備えた微細位置検出部と、前記各検出部の動作
制御を行う中央処理部とを備えた移動体の位置・速度検
出装置。
23. A waveform shaping circuit for generating an encoder pulse and a moving direction discrimination signal from an encoder two-phase original signal, an up / down counter for detecting a coarse position by the encoder pulse, and sampling the coarse position. A coarse position detector including a temporary storage circuit for synchronizing with the sampling time from a sampling pulse timer for generating a sampling signal every time; and a bias for applying a bias voltage to the encoder two-phase original signal and the zero value signal A fine position detection unit including a voltage application circuit, a sample holder that samples and holds each of the signals in synchronization with a sampling pulse, and an A / D converter that performs A / D conversion on the output of the sample holder; A position / velocity detection device for a moving object, comprising a central processing unit for controlling the operation of the unit.
【請求項24】請求項21〜23のいずれかにおいて、移動
体と接続されたエンコーダがインクリメンタル方式での
もので構成され、移動体の移動限界位置のみで検出され
る限界位置検出部と真の原点位置近傍の原点位置で検出
されるステップ状の原点位置検出部とを有し、原点位置
の各移動方向の可動範囲でその段差を保ち移動体と一体
的に駆動される被検出体と、移動体の移動限界両端位置
に配置されそれぞれ前記被検出体の限界位置検出部を検
出する限界位置検出センサと、前記真の原点位置近傍の
前記原点位置に配置され前記被検出体の原点位置検出部
が原点位置にあるかまたは原点位置両側のどちらの領域
にあるかを検出する原点位置検出センサと、移動体と結
合された衝突部材と、移動体が移動限界位置を越えて移
動した際前記衝突部材と当接し移動体の移動を停止する
ストッパとを備えた移動体の位置・速度検出装置。
24. An encoder according to any one of claims 21 to 23, wherein the encoder connected to the moving body is of an incremental type, and a true position detecting unit for detecting only the moving limit position of the moving body and a true position detecting unit. A detected object having a step-like origin position detection unit detected at the origin position near the origin position, and maintaining the step in the movable range in each movement direction of the origin position and being driven integrally with the moving body, Limit position detection sensors disposed at both ends of the movement limit of the moving object to detect limit position detection units of the object to be detected, and an origin position detection of the object to be detected arranged at the origin position near the true origin position An origin position detection sensor that detects whether the part is at the origin position or in which area on both sides of the origin position, a collision member coupled to the moving body, and the above-mentioned when the moving body moves beyond the movement limit position. Collision part A position / speed detection device for a moving body, comprising a stopper that abuts against a material and stops the movement of the moving body.
【請求項25】請求項21〜24のいずれかにおいて、移動
体の位置・速度検出装置を移動体を駆動するモータのモ
ータ制御装置と接続し、モータ制御方法に関するプログ
ラムを中央処理部に備えている移動体の位置・速度検出
装置。
25. A computer according to claim 21, wherein the position / speed detecting device of the moving body is connected to a motor control device of a motor for driving the moving body, and a program relating to the motor control method is provided in the central processing unit. A moving body position / speed detection device.
【請求項26】請求項25において、モータ制御装置によ
り駆動されるモータがロボット関節駆動用であり、位置
検出用エンコーダがモータもしくは駆動される関節に結
合されている移動体の位置・速度検出装置。
26. An apparatus according to claim 25, wherein the motor driven by the motor control device is for driving a robot joint, and the encoder for position detection is a position or velocity detecting device for a moving body coupled to the motor or the driven joint. .
【請求項27】インクリメンタル方式のエンコーダを有
するサーボモータにより駆動される移動体の原点位置復
帰方法において、動作開始時に検出センサにより移動体
が原点位置に対して、いずれの側にあるかを検出し、移
動体を原点位置方向へ移動し、等速区間において、初期
動作時の位相ずれ検出を行い、真の原点位置近傍に設け
られている原点位置を検出センサにより検出し、次に原
点位置に対してエンコーダZ相(真の原点位置)が検出
される方向に移動体を移動し、エンコーダZ相が検出さ
れると移動体の移動が停止されることを特徴とする移動
体の原点位置復帰方法。
27. A method for returning to the origin position of a moving body driven by a servo motor having an incremental encoder, wherein a detection sensor detects at which side the moving body is located with respect to the origin position at the start of operation. Move the moving body in the direction of the origin, detect the phase shift during the initial operation in the constant velocity section, detect the origin located near the true origin with the detection sensor, and then move to the origin. The moving body is moved in a direction in which an encoder Z phase (true origin position) is detected, and the movement of the moving body is stopped when the encoder Z phase is detected. Method.
JP2532489A 1989-02-03 1989-02-03 Moving body position / speed detection method and device and origin position return method Expired - Lifetime JP2668033B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2532489A JP2668033B2 (en) 1989-02-03 1989-02-03 Moving body position / speed detection method and device and origin position return method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2532489A JP2668033B2 (en) 1989-02-03 1989-02-03 Moving body position / speed detection method and device and origin position return method

Publications (2)

Publication Number Publication Date
JPH02205717A JPH02205717A (en) 1990-08-15
JP2668033B2 true JP2668033B2 (en) 1997-10-27

Family

ID=12162790

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2532489A Expired - Lifetime JP2668033B2 (en) 1989-02-03 1989-02-03 Moving body position / speed detection method and device and origin position return method

Country Status (1)

Country Link
JP (1) JP2668033B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5803952B2 (en) * 2013-02-15 2015-11-04 株式会社安川電機 Controller, time chart creation device, computer program, information storage medium, device control method, and time chart creation method
US10996079B1 (en) * 2019-12-03 2021-05-04 Rockwell Automation Technologies, Inc. Encoder offset fine tuning

Also Published As

Publication number Publication date
JPH02205717A (en) 1990-08-15

Similar Documents

Publication Publication Date Title
JP3234177B2 (en) Position control device
JP2572026B2 (en) Speed signal generator
US4376970A (en) High speed digital position monitoring system
US5202842A (en) Rotational position detecting device which compensates for eccentricity of rotating object
US4621224A (en) Position/speed detection method and apparatus
JP2668033B2 (en) Moving body position / speed detection method and device and origin position return method
US5065081A (en) Zero error digital servo system
KR910004415B1 (en) Digital position detector
KR900002511B1 (en) Speed detecting device
JPH0565827B2 (en)
JPH10132605A (en) Position detector
EP0257100A1 (en) Pulse distribution type position detector
JP3676482B2 (en) Position detection device
JPH0521166B2 (en)
JPS61149841A (en) Viscometer
JPH0341314A (en) Device and method for detecting position and speed
JP2597374B2 (en) Position control device
KR850001903B1 (en) High speed digital position monitoring system
Watanabe et al. A microstep controller of a DC servomotor
JP2542184B2 (en) Origin positioning method
US10884012B1 (en) Velocity determination system and method
JPS63273114A (en) Constant position stop controller
JPH0283708A (en) Setting method for coordinate original point of traveling object
JP2714654B2 (en) Control system for variable reluctance motor
JPS61173162A (en) Velocity detecting circuit