JP3596942B2 - Speed detector - Google Patents

Speed detector Download PDF

Info

Publication number
JP3596942B2
JP3596942B2 JP14342595A JP14342595A JP3596942B2 JP 3596942 B2 JP3596942 B2 JP 3596942B2 JP 14342595 A JP14342595 A JP 14342595A JP 14342595 A JP14342595 A JP 14342595A JP 3596942 B2 JP3596942 B2 JP 3596942B2
Authority
JP
Japan
Prior art keywords
detection target
pulse
time
phase
speed
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 - Fee Related
Application number
JP14342595A
Other languages
Japanese (ja)
Other versions
JPH08334526A (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.)
Nidec Shimpo Corp
Original Assignee
Nidec Shimpo Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nidec Shimpo Corp filed Critical Nidec Shimpo Corp
Priority to JP14342595A priority Critical patent/JP3596942B2/en
Publication of JPH08334526A publication Critical patent/JPH08334526A/en
Application granted granted Critical
Publication of JP3596942B2 publication Critical patent/JP3596942B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【産業上の利用分野】
本発明は、サーボモータの回転速度、製造ラインのライン速度などをデジタル的に検出する速度検出装置に関する。
【0002】
【従来の技術】
一般に、メカトロニクスなどの分野においては、サーボモータなどの検出対象物の速度を正確に検出して制御を行うことが要求される。
【0003】
このため、従来より、ロータリエンコーダを回転検出部として検出対象物に取り付け、このロータリエンコーダからの出力パルスのパルス数をカウンタでカウントすることで検出対象物の速度を検出するようにした速度検出装置が提供されている。
【0004】
すなわち、この速度検出装置では、図10に示すように、一定のサンプリング期間T内に到来するパルス数Nをカウントとし、次式によって速度Vを検出する。
【0005】
V=p・N/T (a)
ただし、pは1パルスあたりの検出対象物の移動量(回転量)である。
【0006】
このような速度検出装置が備えるロータリエンコーダの内、特にインクリメンタル型のロータリエンコーダは、小型かつ比較的安価であるために回転検出部として広く用いられている。
【0007】
このインクリメンタル型のロータリエンコーダ(以後、単にエンコーダと称する)は、検出対象物の正転と逆転とが分かるように、90°位相の異なるA相とB相の2相のパルスP−A,P−Bが同時に出力されるようになっている。そして、通常、検出対象物の低速域での分解能を高めるために、逓倍回路を設けてA相パルスP−AとB相パルスP−Bの立ち上がりおよび立ち下がりのエッジをそれぞれ微分することで、4逓倍されたパルスP−N(以降、これを単に位置パルスと称する)が得られるようにしている。
【0008】
【発明が解決しようとする課題】
上記のエンコーダにおいては、従来、次の2つの問題点がある。
【0009】
問題点1
上記のエンコーダにおいて、A相とB相の両パルスP−A,P−Bの位相差が正確に90°(1/4ピッチ)に設定されておれば、位置パルスP−Nのパルス数Nは検出対象物の移動量(回転量)に比例する。
【0010】
しかし、エンコーダを実装する際には、その位相差を正確に90°に設定するのが困難で、通常、位相誤差が含まれる。このため、A相パルスP−AとB相パルスP−Bの位相差は、90°±45°の範囲になっている。このような位相誤差を生じる原因には、エンコーダ製作時の許容誤差、エンコーダの取り付け精度、エンコーダからの出力パルスを処理する信号処理回路の誤差等が挙げられる。
【0011】
いま、図11に示すように、A相とB相の両パルスP−A,P−Bの位相差が正確に90°(1/4ピッチ)に設定されているとした場合、これを4逓倍して得られる理想の位置パルスP−Nのパルス間隔は、図中の破線で示すようになり、また、A相とB相の両パルスP−A,P−Bに位相誤差が生じている場合、これを4逓倍して得られる位置パルスP−Nのパルス間隔は、図中の実線で示すようになる。
【0012】
ここで、位相誤差のない理想の位置パルスP−Nの各間隔に対応する検出対象物の移動量をpとし、また、位相誤差がある場合の位置パルスP−Nの各間隔に対応する検出対象物の移動量をp,p,p,pとしたとき、各移動量p,p,p,pは、次式の関係になる。
【0013】

Figure 0003596942
ここに、δ,δ,δ,δは、理想の位置パルス(破線)からの実際の位置パルス(実線)のずれに対応する検出対象物の移動量の偏位であり、これらの各偏位δ〜δは、位置パルスP−Nの4パルス(A相パルスまたはB相パルスの1周期に相当)ごとに周期性をもって定まる。
【0014】
このように、エンコーダに位相誤差が生じている場合において、検出対象物の速度Vを(a)式に基づいて検出しようとすると、検出対象物の移動量とパルス数Nとが比例しないために、検出速度に誤差を生じることになる。
【0015】
これを図12に基づいてさらに詳しく説明する。
【0016】
いま、サンプリング期間T中にN個の位置パルスP−Nの入力があった場合の検出対象物の移動量をL、各々の位置パルスP−Nの間隔に対応する検出対象物の移動量をp,pi+1,…,pi+N−1としたとき、Lは、
L=p+pi+1+……+pi+N−1 (c)
で与えられる。
【0017】
ここで、各々の位置パルスP−Nごとに生じる偏位δ〜δi+Nは、中間の偏位δi+1〜δi+N−1は相殺されて、最初と最後の偏位δ,δi+Nの項のみが残る。したがって、(c)式は、次のようになる。
【0018】
L=p・N+(δi+N−δ) (d)
したがって、エンコーダの位相誤差を考慮した場合の検出対象物の速度Vは、
Figure 0003596942
つまり、エンコーダに位相誤差が生じているときには、本来、検出対象物の速度Vを(e)式に基づいて算出すべきであるのに、従来技術では、(a)式に基づいて速度Vを算出しているから、(δi+N−δ)/(p・N)の誤差を含むことになる。
【0019】
前述のように、各偏位δ〜δi+Nは、位置パルスP−Nの4パルスごとに周期性をもつから、パルス数Nが4の倍数である場合には、δi+N=δとなり、誤差(δi+N−δ)/(p・N)は零となる(たとえば、(b)式参照)。
【0020】
しかし、パルス数Nが4の倍数以外の場合には、誤差の発生が避けられない。特に、検出対象物の速度が低くなってサンプリング期間T内に到来するパルス数Nが小さくなると、(e)式の関係からも分かるように誤差の影響が大きくなる。たとえば、N=1の場合には、最大±50%の誤差に達する。
【0021】
この問題点1に対処するため、特開平2−201269号公報に開示された従来技術では、パルス数Nが4の倍数の場合に速度誤差が零になる点に着目し、4パルスおきにデータをサンプリングして(a)式に基づいて速度検出を行うようにしている。
【0022】
しかしながら、この従来技術では、パルス数Nが4の倍数以外の場合には検出対象物の速度を検出することができないので、検出対象物の速度がその途中で変動した場合でもそれを知ることができない。さらに、検出対象物の速度が低くなってN≦3となった場合には、速度を全く検出することができない。
【0023】
また、特開平4−69079号公報に開示された従来技術では、検出対象物の速度の高低、したがって入力されるパルス数の大小に応じてパルスカウント法と周期カウント法の2つの方法を切り替えるようにし、特に、パルス数が少ない場合には、補正値を用いてパルス周期を補正して速度を検出するようにしている。
【0024】
しかし、この従来技術のように、入力されるパルス数の大小に応じてパルスカウント法と周期カウント法とを切り替えてデータ処理を行う場合には、データ処理の回路が2系統必要となり、回路構成が複雑化する。しかも、いずれの時点で方法を切り替えるべきかの基準を設定するのが困難である。
【0025】
問題点2
前回と今回の各サンプリング時点で得られたカウンタのカウント値をそれぞれN,N、サンプリング期間をTとしたとき、サンプリング期間T中に到来するパルス数Nは、両カウント値N,Nの差、すなわち、
N=N−N
により得ることができる。
【0026】
しかし、前回のサンプリング時点と今回のサンプリング時点との間に検出対象物の移動(回転)方向が反転した場合には、±1パルス分に相当する移動量の誤差を生じる。
【0027】
これを図13に基づいてさらに詳しく説明する。
【0028】
いま、カウンタがリセットされた状態から検出対象物が正転されて順次位置パルスP−Nが発生された場合、カウンタのカウント値は、1→2→3→…と次第に増大する。そして、カウント値がN+2に達した直後に検出対象物の回転方向が反転したとする。このとき、エンコーダにおいては、カウント値N+2を発生させたのと同じスリットによってカウンタが1つカウントダウンされるためにカウント値はN+1となり、引き続いて、反転が継続すると、カウント値は、N→N−1と変化する。そして、N−1の時点でサンプリング期間が経過して計測が終了したとすれば、検出対象物の移動量(回転量)は本来p・Nであるのに、カウンタのカウント値はN−1となっているから、このカウント値N−1に基づいて算出される移動量Lは、p・(N−1)となる。つまり、検出対象物の回転がサンプリングの途中で反転することでp×1パルス分の移動量の誤差が生じる。
【0029】
この現象は、A相パルスP−AとB相パルスP−Bに位相誤差が生じている場合だけでなく、両パルスP−A,P−Bの位相差が正確に90°に設定されていて位相誤差のない場合においても起こり得る問題である。
【0030】
本発明は、上記の問題点1,2を解決するためになされたもので、エンコーダの出力に位相誤差が含まれていたとしても、この位相誤差の影響を有効に排除し、また、移動方向が途中で反転した場合の悪影響も除いて、検出対象物の速度が低速から高速の全範囲にわたって精度良くかつ短時間の内に検出できるようにすることを課題とする。
【0031】
【課題を解決するための手段】
上記の課題を解決するための本発明の原理について説明する。
【0032】
図1において、いま、位相誤差がある場合に得られる位置パルスP−N(図中、実線で示す)に対して、i,i+1,…,j,j+1というように順次符号を付し、また、位相誤差のない理想的な位置パルスP−N(図中、破線で示す)に対して、i,i+1,…,j,j+1というように順次符号を付すものとする。
【0033】
このとき、検出対象物が正方向に移動(正転)する場合には、位置パルスP−Nが番号でi→i+1→…→j→j+1というように順次入力されるのに伴ってカウンタのカウント値は、N→Ni+1→…→N→Nj+1というように次第に増加する。また、検出対象物が負方法に移動(逆転)する場合には、位置パルスP−Nが番号でj+1→j→…→i+1→iというように順次入力されるのに伴ってカウンタのカウント値は、Nj+1→N→…→Ni+1→Nというように、次第に減少する。
【0034】
ここで、カウンタのカウント値がたとえばNを継続して示すのは、位置パルスP−Nの番号iからi+1までの区間である。そして、検出対象物が正方向に移動(正転)している場合に、カウント値がNi−1からNに変化するのは、番号iに対応する位置パルスP−Nの入力時点である。一方、検出対象物が負方向に移動(逆転)している場合に、カウント値がNi+1からNに変化するのは、番号i+1に対応する位置パルスP−Nの入力時点である。つまり、カウント値が同じNを示しても、その変化時点は検出対象物の移動方向の正負によって異なるタイミングとなる。
【0035】
したがって、番号i,i+1,…,j,j+1で示す理想的な位置パルスの各1ピッチあたりの検出対象物の移動量をp、番号i,i+1,…,j,j+1で示す位相誤差のある場合の位置パルスP−Nとの各偏位をそれぞれδ,δi+1,…,δ,δj+1としたとき、番号iの位置パルスP−Nの入力時点を基準として、この時点からカウント値がNになった時点までの偏位Δiは、次式で与えられる。
【0036】
Figure 0003596942
同様に、jの位置パルスの入力時点を基準として、この時点からカウント値がNになった時点までの偏位Δは、次式で与えられる。
【0037】
Figure 0003596942
上記の各偏位δ,δi+1,…δ,δj+1は、従来技術において説明したように、位置パルスP−Nの4パルスごとに周期性をもって定まるものである。したがって、図1において、今回のサンプリング時点で得られたカウンタのカウント値をN、前回のサンプリング時点で得られたカウント値をNとすれば、検出対象物の移動量Lは、前述の(d)式を求めたのと同様にして、次式で与えられる。
【0038】
L=p・(N−N)+(Δ−Δ) (3)
(3)式において、右辺の第1項p・(N−N)は位相誤差がない場合の検出対象物の移動量であり、第2項(Δ−Δ)は検出対象物の移動方向を考慮した位相誤差の補正量に相当し、所謂、本発明の移動量補正値である。そして、この補正値(Δ−Δ)は、(1)、(2)式の関係からも分かるように、検出対象物の移動方向(回転方向)によって異なる値をとる。
【0039】
たとえば、図2に示すように、前回と今回のサンプリング時点でいずれも検出対象物が正方向に移動しておれば、Δ−Δ=δ−δとなる。また、前回のサンプリング時点で正方向、今回のサンプリング時点で逆方向に移動しておれば、Δ−Δ=(p+δj+1)−δとなる。
【0040】
ここで、ある一つの関数αを、次式のように定義する。
【0041】
α(N,UD)=Δ/p (4)
ただし、NとΔは、あるサンプリング時点で決まるカウント値および偏差、UDは、そのサンプリング時点で得られる検出対象物の移動方向(正負)の情報である。
【0042】
この(4)式で与えられる関数αを用いると、(3)式を次のように表現することができる。
【0043】
L=p・[(N−N)+{α(N,UD)−α(N,UD)}] (5)
(5)式の右辺第2項の{}内のα(N,UD)とα(N,UD)とは、共に移動方向を考慮した位相誤差の補正値であり、これらの補正値α(N,UD),α(N,UD)を具体的に求めることができれば、エンコーダに位相誤差が生じているときでも、検出対象物の移動方向を考慮した速度Vを精度良く求めることができる。
【0044】
すなわち、両カウント値N,Nが得られる時間間隔をTとすれば、検出対象物の速度Vは、
Figure 0003596942
となる。
【0045】
そこで、次に、上記の補正値α(N,UD),α(N,UD)の決定の仕方について説明する。なお、以降、表記を簡略化する上で、α(N,UD)はα、α(N,UD)はαというように記載する。
【0046】
図11に示したように、いま、位置パルスP−Nの4パルス分(A相パルスまたはB相パルスの1周期分)に着目すると、理想的な位置パルスP−Nとの偏位δ〜δはA相パルスとB相パルスの各変化点x〜xごとに決まる固有の値をとり、かつ、4パルスごとに周期性をもって定まる。
【0047】
そこで、図3に示すように、A相パルスとB相パルスの各変化点x〜xに挟まれた各々の区間x〜x,x〜x,x〜x,x〜xについて、それぞれ“0”〜“3”までの番号を付け、また、
α=δ/p,α=δ/p、α=δ/p,α=δ/p (7)
とすれば、各変化点x〜xごとに必要な補正値は、(1),(2)式および(4)式の関係からも分かるように、図4に示す対応関係となる。
【0048】
たとえば、区間が“0”のときで、検出対象物が正方向に移動するときには補正値としてαを、負方向に移動するときには補正値としてα+1を用いればよいことが分かる。
【0049】
このように、図4の関係を用いれば、必要な補正値を決定することができるが、そのためには、検出対象物の移動方向と、区間“0”〜”3”とを共に特定する必要がある。つまり、検出対象物の移動方向、および今回と前回の各サンプリング時刻で得られる各カウント値N,Nがいずれの区間“0〜3”で得られたものであるかを特定することができれば、図4の関係から必要な補正値が決まるので、速度Vを求めることができる。
【0050】
次に、検出対象物の移動方向と、各区間“0”〜“3”を特定するための手法について説明する。
【0051】
検出対象物が正方向(正転)と負方向(逆転)のいずれに移動しているかを知るには、エンコーダから出力されるA相パルスP−Aに対するB相パルスP−Bの位相が進んでいるか、あるいは遅れているかを論理演算を用いて調べることで判別することができる。
【0052】
また、区間“0”〜“3”を特定するためには、たとえば、図4に示すように、カウンタのカウント値の下位2ビットの値n,nに着目したとき、“n,n”が区間“0”の箇所では“0,0”、区間“1”の箇所では“0,1”、区間“2”の箇所では“1,0”、区間“3”の箇所では“1,1”となるような手段を設ければ、各区間“0”〜“3”を容易に特定することができる。
【0053】
次に、図4に示した補正値α〜αの具体的な数値の決定の仕方について説明する。
【0054】
図5に示すように、A相パルスP−AまたはB相パルスP−Bの1周期分に相当する数の位置パルスP−Nが得られるように、検出対象物を一定の低速でかつ一方向(ここでは正方向とする)に移動させる。その場合、位置パルスP−Nのパルス間隔は、検出対象物の移動量に比例したものとなる。また、補正値α〜αは、(7)式からも分かるように、位相誤差のない理想的な位置パルスP−Nに基づく検出対象物の移動量pを基準として決まるものである。さらに、各変化点x〜xは、検出対象物の絶対的な位置を示すものではなく、相対的な位置を示すものである。したがって、最初の変化点xに対応する補正値αを基準点とみなせば、α=0と考えてよい。
【0055】
よって、α,α,αの各補正値は、
Figure 0003596942
となる。
【0056】
つまり、一般式として、αi(i=0〜3)は、次式で与えられる。
【0057】
Figure 0003596942
そして、この(8)式に基づいて補正値α〜αの具体的な数値を決定してから、図4に示すテーブルを作成して、これを初期データとして予めメモリ等に登録しておけば、これらのデータを速度を演算する上での補正データとして利用することができる。
【0058】
本発明は、上述の原理に基づいてなされたもので、次の構成を採用した。
【0059】
すなわち、本発明の速度検出装置は、検出対象物の移動量と移動方向に応じた個数と位相とを有する2相のパルスを出力するパルス出力手段と、前記2相のパルスを入力して検出対象物の位置を検出する位置検出手段と、前記2相のパルスを入力して検出対象物の移動方向を判別する方向判別手段と、今回サンプリングした検出対象物の位置の変化が発生した時刻と前回サンプリングした検出対象物の位置の変化が発生した時刻とから両時刻の時間間隔を計測する時間間隔計測手段と、前回のサンプリング時点において前記方向判別手段と位置検出手段でそれぞれ検出された移動方向と位置の両情報、および位置の情報を補正するための位置補正値をそれぞれ記憶する記憶手段と、今回のサンプリング時点において前記方向判別手段と位置検出手段でそれぞれ検出された移動方向と位置の両情報、および時間間隔計測手段で計測された時間間隔の情報、ならびに前記記憶手段に記憶されている前回のサンプリング時点において得られた移動方向と位置の両情報、および位置補正値の情報に基づいて検出対象物に関する速度を演算する演算手段とを備える。
【0060】
【作用】
上記構成において、演算手段は、時間間隔内の検出対象物の移動量に基づいて速度を算出するときに、検出対象物の移動量を補正値で補正し、補正された移動量に基づいて2相パルスの位相誤差を排除した速度を検出する。
【0061】
このため、エンコーダの出力に位相誤差が含まれていたとしても、この位相誤差の影響を有効に排除することができる。しかも、移動方向が途中で反転した場合の悪影響も除くことができるので、検出対象物の速度が低速から高速の全範囲にわたって精度良くかつ短時間の内に検出できるようになる。
【0062】
【実施例】
図6は、本発明の実施例に係る速度検出装置の構成を示すブロック図、図7は同装置の動作説明に供するタイミングチャートである。
【0063】
図6において、符号1は速度検出装置の全体を示し、2はパルス出力手段、4は位置検出手段、6は方向判別手段、8は時間間隔計測手段、10は記憶手段、12は演算手段である。
【0064】
パルス出力手段2は、図示しないサーボモータなどの検出対象物に取り付けられて、検出対象物の移動量と移動方向に応じた個数と位相とを有する2相のパルスを出力するものであり、本例では、互いに90°の位相差を有するA相とB相の両パルスP−A,P−Bを出力するエンコーダで構成される。
【0065】
位置検出手段4は、エンコーダ2からのA相,B相の両パルスP−A,P−Bを入力して検出対象物の位置を検出するものであって、本例では、逓倍回路4aとカウンタ4bとからなる。
【0066】
上記の逓倍回路4aは、A相,B相の両パルスP−A,P−Bを微分して4逓倍された位置パルスP−N、および、A相,B相の両パルスP−A,P−Bの1周期内の原点位置(本例では区間0の開始点)を示す原点パルスP−Zを、次の論理演算式に基づいて作成して出力する。
【0067】
−N=P−A↑+P−A↓+P−B↑+P−B
−Z=(P−A)・P−B↓+P−A↓・(P−B
(9)
ここに、符号↑はパルスの立ち上がり、↓はパルスの下がりエッジの各タイミングを、また、括弧()はローレベルを意味する。
【0068】
また、カウンタ4bは、本例では、2進のアップ/ダウンカウンタで構成され、逓倍回路4aで得られる位置パルスP−Nをクロックとして入力し、方向判別手段6からの方向判別結果に基づいてアップカウントあるいはダウンカウントするとともに、逓倍回路4aからの原点パルスP−Zを下位2ビットn,nのみの出力データをリセットするパルスとして入力するようになっている。
【0069】
すなわち、原点パルスP−Zが入力されるたびに、カウンタ4bのカウント値の下位2ビットn,nは必ずリセットされるため、原点パルスP−Zの入力時点と区間0の開始点の位置とが常に同期し、したがって、図4に示すように、カウンタ4bの下位2ビットn,nの内容によって、各区間0〜3を特定できることになる。つまり、カウンタ4bは、位置の情報をもつことになる。
【0070】
方向判別手段6は、A相,B相の各パルスP−A,P−Bを入力して検出対象物の移動方向を判別するものであって、論理回路6aとRSフリップフロップ6bとからなる。
【0071】
論理回路6aは、A相パルスP−Aに対するB相パルスP−Bの位相が進んでいるか、あるいは遅れているかを判別し、B相パルスP−Bの位相が遅れているときにはアップパルスP−UPを、また、これとは逆のときにはダウンパルスP−DOWNをそれぞれ出力するものである。すなわち、各パルスP−UP,P−DOWNは、次の論理演算式に基づいて発生される。
【0072】
Figure 0003596942
RSフリップフロップ6bは、論理回路6aからのアップパルスP−UPをセットパルスとして、ダウンパルスP−DOWNをリセットパルスとしてそれぞれ入力し、アップパルスP−UPが入力されるときには検出対象物が正方向に移動(正転)していると判断してハイレベル、ダウンパルスP−DOWNが入力されるときには負方向に移動(逆転)していると判断してローレベルの判別信号をそれぞれ出力する。
【0073】
時間間隔計測手段8は、今回サンプリングした検出対象物の位置の変化が発生した時刻と、前回サンプリングした検出対象物の位置の変化が発生した時刻とから両時刻の時間間隔Tを計測するものであり、本例では、発振器8a、時刻カウンタ8b、時刻レジスタ8c、および後述のCPU12で構成される。
【0074】
発振器8aは、計時用の一定の基準パルスを発生するものである。また、時刻カウンタ8bは、発振器8aからの基準パルスを順次カウントするもので、そのカウント値は時刻情報をもつことになる。
【0075】
時刻レジスタ8cは、逓倍回路4aからの位置パルスP−Nが入力されるたびに、時刻カウンタ8bからのカウント値をラッチするものであり、したがって、各々の位置パルスが入力された時点の各時刻の情報を発生する。
【0076】
したがって、CPU12においては、前回のサンプリング時点で得られた時刻レジスタ8bの値と、今回のサンプリング時点で得られた時刻レジスタ8bの値との差から時間間隔Tを求める。
【0077】
記憶手段10は、位置検出手段4と方向判別手段6とでそれぞれ検出される位置と移動方向の各情報、ならびにサンプリング時刻における時刻レジスタ8cの内容をそれぞれ記憶するとともに、位置の情報を補正するための各位置補正値(図4に示したテーブル)を記憶するものであって、本例ではICメモリで構成される。なお、図4に示したテーブルは、前述のように、予め(8)式に基づいて補正値α〜αの具体的な数値を決定することにより作成される。
【0078】
演算手段12は、今回のサンプリング時点において位置検出手段、方向判別手段、時間間隔検出手段でそれぞれ検出された検出対象物の移動方向、位置、および時刻の各情報、ならびにICメモリ10に格納されている前回のサンプリング時点の時刻、その時刻における検出対象物の移動方向、位置の各情報、ならびに位置補正値の情報に基づいて検出対象物に関する速度を前述の(6)式に基づいて演算するもので、本例ではマイクロコンピュータで構成される。なお、マイクロコンピュータは、上記の各手段4〜10の構成の全部または一部を含んだものであてもよい。
【0079】
次に、上記構成の速度検出装置により検出対象物の速度を検出する場合の動作について、図7に示すタイミングチャートを参照して説明する。
【0080】
エンコーダ2からは、検出対象物の移動量と移動方向に応じてA相パルスP−AとB相パルスP−Bが出力される。この場合、両パルスP−A,P−Bには位相誤差が含まれているものとする。
【0081】
方向判別手段6は、A相,B相の各パルスP−A,P−Bを入力して検出対象物の移動方向を判別する。
【0082】
すなわち、論理回路6aは、A相パルスP−Aに対して、B相パルスP−Bの位相が遅れているときにはアップパルスP−UPを、また、これとは逆のときにはダウンパルスP−DOWNをそれぞれ(10)に基づいて発生して出力する
RSフリップフロップ6bは、論理回路6aからのアップパルスP−UPが入力されるときには検出対象物が正方向に移動(正転)していると判断してハイレベルの判別信号を、ダウンパルスP−DOWNが入力されるときには負方向に移動(逆転)していると判断してローレベルの判別信号をそれぞれ出力する。そして、この判別信号が位置検出手段4のカウンタ4bに与えられるとともに、演算手段12に取り込まれる。
【0083】
位置検出手段4は、エンコーダ2からのA相,B相の両パルスP−A,P−Bを入力して検出対象物の位置の情報を出力する。
【0084】
すなわち、逓倍回路4aは、A相,B相の両パルスP−A,P−Bを微分して4逓倍された位置パルスP−N、および、A相,B相の両パルスP−A,P−Bの1周期内の原点位置(区間0の開始点)を示す原点パルスP−Zを(9)式に基づいて作成して出力する。
【0085】
カウンタ4bは、逓倍回路4aで得られる位置パルスP−Nをクロックとして入力し、方向判別手段6からの方向判別結果に基づいてアップカウントあるいはダウンカウントするとともに、逓倍回路4aからの原点パルスP−Zを下位2ビットn,nのみの出力データをリセットするパルスとして入力する。これにより、原点パルスP−Zの入力時点と区間0の開始点の位置とが常に一致するため、カウンタ4bのカウント値が位置の情報として演算手段12に取り込まれる。
【0086】
一方、発振器8aから発生される計時用の基準パルスは、時刻カウンタ8bによって順次カウントされ、そのカウント値が時刻情報として時刻レジスタ8cに出力される。時刻レジスタ8cは、逓倍回路4aからの位置パルスP−Nが入力されるたびに、時刻カウンタ8bからのカウント値をラッチする。したがって、時刻レジスタ8cからは、各々の位置パルスが入力された時点の各時刻の情報が発生される。
【0087】
演算手段12は、所定のサンプリング時刻が到来するたびに、位置検出手段4、方向判別手段6および時刻レジスタ8cからの各情報を取り込んで、これらの情報をICメモリ10に格納する。
【0088】
さらに、演算手段12は、今回のサンプリング時刻が到来したときに位置検出手段4、方向判別手段6および時刻レジスタ8cから取り込んだ各情報と、ICメモリ10に既に格納されている前回のサンプリング時刻により得られた位置、方向、時刻の各情報、ならびに図4のテーブルとから、(6)式に基づいて検出対象物の速度を算出し、その算出結果を出力する。
【0089】
このように、この実施例の速度検出装置は、エンコーダ2に含まれる位相誤差と検出対象物の移動方向の反転を考慮して、速度Vを求めるので、エンコーダ2の位相誤差や反転の影響を有効に排除することができ、低速から高速の全範囲にわたって精度良くかつ短時間の内に速度を検出することができる。
【0090】
【変形例】
位置検出手段の変形例
図6に示した位置検出手段4に代えて、図8に示す構成の位置検出手段4’を設けることもできる。
【0091】
すなわち、この位置検出手段4’は、逓倍回路4a’、カウンタ4b’、および組合回路4c’からなる。
【0092】
逓倍回路4a’は、A相,B相の両パルスP−A,P−Bを微分して4逓倍された位置パルスP−Nを前記(9)式に基づいて出力するとともに、A相パルスP−AまたはB相パルスP−Bの1周期(本例では区間3→0または区間0→3の変化時点)を示す周期パルスP−N’を、次の論理演算式に基づいて作成して出力する。
【0093】
Figure 0003596942
ここに、符号↑はパルスの立ち上がり、↓はパルスの下がりエッジの各タイミングを、また、括弧()はローレベルを意味する。
【0094】
また、カウンタ4b’は、2進のアップ/ダウンカウンタで構成され、逓倍回路4a’で得られる周期パルスP−N’をクロックとして入力し、方向判別手段6からの方向判別結果に基づいてアップカウントあるいはダウンカウントするものであって、上記の実施例のカウンタ4bの下位2ビットn,nを除いた上位ビットn〜の出力が得られるようになっている。
【0095】
また、組合回路4c’は、A相とB相の両パルスP−A,P−Bを入力し、これらのパルスP−A,P−Bに基づいて2ビットからなる1周期内の位置の情報n,nを、図9に示す条件に基づいて作成して出力する。
【0096】
この変形例の場合にも、位置検出手段4’の出力をマイクロコンピュータ12に取り込んだ後、その下位2ビットn,nの値によって区間0〜3を特定できるから、方向判別手段6からの方向の情報と併せれば、図4のテーブルの各補正値を利用することが可能となる。
【0097】
その他の変形例
本発明は、A相パルスP−AとB相パルスのP−Bの1周期内での位相誤差を補正するだけでなく、エンコーダにおける1回転を周期とした位相誤差に対しても有効である。
【0098】
すなわち、エンコーダの場合、1回転内の位置の情報は、1回転ごとに1回発生する。エンコーダの回転軸の機械的な原点位置を表すために発生されるZ相パルスによって、その時のカウンタ4a,4a’の値を基準に現在の位置を知ることができる。したがって、1回転内の変化点の補正値α(iはエンコーダのZ相パルスからのパルス数)を、(8)式の関係を求めたのと同様の手法によって予め算出しておき、(6)式に基づいて速度Vを得ることも可能である。
【0099】
さらに、本発明は、1相のエンコーダやアブソリュート型のロータリエンコーダに対しても有効である。すなわち、1相のエンコーダの場合は、方向判別はできないので、方向反転に起因した誤差は除けないものの、この場合でも正方向の回転のみが生じるものとみなして(1),(2)式を適用し、(4)式の関数を定めればよい。
【0100】
アブソリュート型のロータリエンコーダの場合は、出力データから一意的に現在の位置を知ることができる。また、出力データとしてはグレイコードが使用されることが多いが、この場合は、最下位ビットの変化を時間間隔計測手段8のタイミング信号とし、方向および位置の変化量はグレイコードをストレートコードに変換した後の差分をとることにより求めればよい。
【0101】
【発明の効果】
本発明によれば、次の効果を奏する。
【0102】
(1) エンコーダの出力に位相誤差が含まれていたとしても、この位相誤差の影響を有効に排除することができる。しかも、移動方向が途中で反転した場合の悪影響も除くことができる。
【0103】
このため、検出対象物の速度が低速から高速の全範囲にわたって精度良くかつ短時間の内に検出できるようになる。
【図面の簡単な説明】
【図1】本発明の原理を説明するために供する図である。
【図2】検出対象物の移動方向によって位相誤差の偏差を補正するための適正な補正値を選択する場合の説明図である。
【図3】位置パルスの各変化点x〜xと、それらの各変化点x〜xごとに必要な補正値との関係を示す説明図である。
【図4】エンコーダに位相誤差がある場合に、速度を演算する上で利用する補正値のデータテーブルである。
【図5】図4の補正値を具体的に決定する場合の説明図である。
【図6】本発明の実施例に係る速度検出装置の全体構成を示すブロック図である。
【図7】同装置の動作説明に供するタイミングチャートである。
【図8】本発明の速度検出装置において、位置検出手段の変形例を示すブロック図である。
【図9】図8の位置検出手段による位置検出情報の説明図である。
【図10】パルスカウント法によって速度を求める場合の説明図である。
【図11】エンコーダの出力に位相誤差が含まれている場合の各パルス間隔および偏差の関係を示すタイミングチャートである。
【図12】エンコーダの出力に位相誤差が含まれている場合に、検出される速度に誤差を生じることを説明するための図である。
【図13】検出対象物の移動方向が途中で逆転する場合に、検出される速度に誤差を生じることを説明するための図である。
【符号の説明】
1…速度検出装置、2…パルス発生手段(エンコーダ)、4…位置検出手段、4a…逓倍回路、4b…カウンタ、6…方向判別手段、6a…論理回路、6b…RSフリップフロップ、8…時間間隔計測手段、8a…発振器、8b…時刻カウンタ、8c…時刻レジスタ、10…記憶手段(ICメモリ)、12…演算手段(マイクロコンピュータ)。[0001]
[Industrial applications]
The present invention relates to a speed detection device that digitally detects a rotation speed of a servomotor, a line speed of a manufacturing line, and the like.
[0002]
[Prior art]
Generally, in the field of mechatronics and the like, it is required to accurately detect the speed of a detection target such as a servomotor and perform control.
[0003]
For this reason, conventionally, a rotary encoder is attached to a detection target as a rotation detection unit, and the speed of the detection target is detected by counting the number of pulses output from the rotary encoder by a counter. Is provided.
[0004]
That is, in this speed detection device, as shown in FIG. 10, the number of pulses N arriving within a certain sampling period T is counted, and the speed V is detected by the following equation.
[0005]
V = p · N / T (a)
Here, p is the movement amount (rotation amount) of the detection target per pulse.
[0006]
Among the rotary encoders provided in such a speed detecting device, an incremental type rotary encoder is widely used as a rotation detecting unit because it is small and relatively inexpensive.
[0007]
This incremental type rotary encoder (hereinafter, simply referred to as an encoder) is a two-phase pulse P having two phases A and B, which are different from each other by 90 °, so that the normal rotation and the reverse rotation of the detection target can be recognized.-A, P-BAre output at the same time. Usually, a multiplying circuit is provided to increase the resolution of the detection target in the low-speed range, and the A-phase pulse P-AAnd B-phase pulse P-BThe pulse P multiplied by 4 is obtained by differentiating the rising and falling edges of-N(Hereinafter simply referred to as a position pulse).
[0008]
[Problems to be solved by the invention]
Conventionally, the encoder has the following two problems.
[0009]
Problem 1
In the above encoder, both pulses A and B of phase P-A, P-BIs set to exactly 90 ° (1 / pitch), the position pulse P-NIs proportional to the movement amount (rotation amount) of the detection target.
[0010]
However, when mounting the encoder, it is difficult to set the phase difference to exactly 90 °, and usually includes a phase error. Therefore, the A-phase pulse P-AAnd B-phase pulse P-BIs in a range of 90 ° ± 45 °. Causes of such a phase error include an allowable error at the time of manufacturing the encoder, mounting accuracy of the encoder, and an error of a signal processing circuit that processes an output pulse from the encoder.
[0011]
Now, as shown in FIG.-A, P-BIs set to exactly 90 ° (1/4 pitch), the ideal position pulse P obtained by multiplying this by four is obtained.-NAre as shown by the broken line in the figure, and both the A-phase and B-phase pulses P-A, P-BHas a phase error, a position pulse P obtained by multiplying this by four-NAre as shown by the solid line in the figure.
[0012]
Here, an ideal position pulse P having no phase error-NLet p be the amount of movement of the detection object corresponding to each of the intervals, and position pulse P when there is a phase error.-NThe movement amount of the detection target corresponding to each interval of0, P1, P2, P3, And each movement amount p0, P1, P2, P3Has the following relationship:
[0013]
Figure 0003596942
Where δ0, Δ1, Δ2, Δ3Are the deviations of the amount of movement of the detection target corresponding to the deviation of the actual position pulse (solid line) from the ideal position pulse (broken line), and each of these deviations δ0~ Δ3Is the position pulse P-N(Period of A-phase pulse or B-phase pulse).
[0014]
As described above, when the velocity V of the detection target is detected based on the equation (a) when the phase error occurs in the encoder, the moving amount of the detection target and the pulse number N are not proportional. This causes an error in the detection speed.
[0015]
This will be described in more detail with reference to FIG.
[0016]
Now, during the sampling period T, N position pulses P-NIs input, the amount of movement of the detection target is L, and each position pulse P-NIs the movement amount of the detection object corresponding to the interval ofi, Pi + 1, ..., pi + N-1And L is
L = pi+ Pi + 1+ …… + pi + N-1                        (C)
Given by
[0017]
Here, each position pulse P-NDeviation δi~ Δi + NIs the intermediate deviation δi + 1~ Δi + N-1Are offset by the first and last deviation δi, Δi + NOnly the term remains. Therefore, the expression (c) is as follows.
[0018]
L = p · N + (δi + N−δi) (D)
Therefore, the speed V of the detection target when the phase error of the encoder is considered is
Figure 0003596942
That is, when a phase error occurs in the encoder, the speed V of the detection target should be originally calculated based on the equation (e), but in the related art, the speed V is calculated based on the equation (a). Since it is calculated, (δi + N−δi) / (P · N).
[0019]
As described above, each deviation δi~ Δi + NIs the position pulse P-NHas a periodicity for each of the four pulses, when the number of pulses N is a multiple of four, δi + N= ΔiAnd the error (δi + N−δi) / (P · N) becomes zero (for example, see equation (b)).
[0020]
However, when the pulse number N is not a multiple of 4, an error cannot be avoided. In particular, as the speed of the detection target decreases and the number of pulses N arriving within the sampling period T decreases, the influence of the error increases as can be seen from the relationship of the equation (e). For example, when N = 1, the error reaches a maximum of ± 50%.
[0021]
In order to address this problem 1, the prior art disclosed in Japanese Patent Application Laid-Open No. 2-201269 focuses on the point that the speed error becomes zero when the number of pulses N is a multiple of four, and focuses on data every four pulses. Is sampled, and speed detection is performed based on equation (a).
[0022]
However, according to this conventional technique, the speed of the detection target cannot be detected when the pulse number N is not a multiple of 4, so that even if the speed of the detection target fluctuates halfway, it can be known. Can not. Furthermore, when the speed of the detection target decreases and N ≦ 3, the speed cannot be detected at all.
[0023]
Further, in the prior art disclosed in Japanese Patent Application Laid-Open No. 4-69079, two methods, a pulse counting method and a period counting method, are switched according to the speed of the detection target, and therefore the number of input pulses. In particular, when the number of pulses is small, the speed is detected by correcting the pulse period using the correction value.
[0024]
However, when data processing is performed by switching between the pulse counting method and the period counting method according to the number of input pulses as in this prior art, two data processing circuits are required, and Is complicated. Moreover, it is difficult to set a reference at which point the method should be switched.
[0025]
Problem 2
The count values of the counters obtained at the previous and current sampling times are respectively Ni, NjWhen the sampling period is T, the number of pulses N arriving during the sampling period T is equal to the two count values Ni, NjThe difference between
N = Nj-Ni
Can be obtained by
[0026]
However, if the movement (rotation) direction of the detection target is reversed between the last sampling time and the current sampling time, an error of the movement amount corresponding to ± 1 pulse occurs.
[0027]
This will be described in more detail with reference to FIG.
[0028]
Now, the detection target is rotated forward from the state where the counter is reset, and the position pulse P-NIs generated, the count value of the counter gradually increases from 1 → 2 → 3 →. Then, it is assumed that the rotation direction of the detection target is reversed immediately after the count value reaches N + 2. At this time, in the encoder, the count value becomes N + 1 because the counter is counted down by one by the same slit that generated the count value N + 2. When the inversion continues, the count value becomes N → N− It changes to 1. Then, if the sampling period elapses at the time of N-1 and the measurement is completed, the count value of the counter is N-1 even though the movement amount (rotation amount) of the detection target is originally pN. Therefore, the movement amount L calculated based on the count value N-1 is p · (N−1). That is, when the rotation of the detection target is reversed during the sampling, an error of the movement amount for p × 1 pulse occurs.
[0029]
This phenomenon is caused by the A-phase pulse P-AAnd B-phase pulse P-BNot only when there is a phase error in-A, P-BThis is a problem that can occur even when the phase difference is accurately set to 90 ° and there is no phase error.
[0030]
The present invention has been made to solve the above problems 1 and 2. Even if a phase error is included in the output of the encoder, the effect of the phase error can be effectively eliminated, and the moving direction can be reduced. It is an object of the present invention to detect the speed of the detection target object accurately and within a short time over the entire range from low speed to high speed, excluding the adverse effect when the image is reversed halfway.
[0031]
[Means for Solving the Problems]
The principle of the present invention for solving the above problems will be described.
[0032]
In FIG. 1, the position pulse P obtained when there is a phase error now-N(Indicated by solid lines in the figure) are sequentially denoted by i, i + 1,..., J, j + 1, and an ideal position pulse P having no phase error is assigned.-N(Shown by a broken line in the figure)0, I0+1, ..., j0, J0It is assumed that a code such as +1 is sequentially assigned.
[0033]
At this time, when the detection target moves in the forward direction (forward rotation), the position pulse P-NAre sequentially input in the order of i → i + 1 →... → j → j + 1, and the count value of the counter becomes Ni→ Ni + 1→… → Nj→ Nj + 1And so on. When the detection target moves (reverses) in a negative manner, the position pulse P-NAre sequentially input in the order of j + 1 → j →... → i + 1 → i, and the count value of the counter becomes Nj + 1→ Nj→… → Ni + 1→ NiAnd so on.
[0034]
Here, the count value of the counter is, for example, NiIs continuously indicated by the position pulse P-NIs a section from number i to i + 1. When the detection target is moving in the forward direction (forward rotation), the count value becomes Ni-1To NiChanges to the position pulse P corresponding to the number i.-NAt the time of input. On the other hand, when the detection target is moving in the negative direction (reverse rotation), the count value becomes Ni + 1To NiChanges to the position pulse P corresponding to the number i + 1.-NAt the time of input. In other words, Ni, The timing of the change varies depending on whether the moving direction of the detection target is positive or negative.
[0035]
Therefore, the number i0, I0+1, ..., j0, J0The amount of movement of the detection target per pitch of the ideal position pulse indicated by +1 is represented by p, and the position pulse P in the presence of a phase error indicated by numbers i, i + 1,..., J, j + 1.-NΔi, Δi + 1,…, Δj, Δj + 1And the number i0Position pulse P-NThe count value is NiThe deviation Δi up to the point in time is given by the following equation.
[0036]
Figure 0003596942
Similarly, j0, The count value is NjDeviation Δ up to the point wherejIs given by the following equation.
[0037]
Figure 0003596942
Each deviation δ abovei, Δi + 1, ... δj, Δj + 1Is the position pulse P, as described in the prior art.-NAre determined with a periodicity every four pulses. Therefore, in FIG. 1, the count value of the counter obtained at the time of this sampling is set to Nj, The count value obtained at the previous samplingiThen, the movement amount L of the detection target object is given by the following equation in the same manner as in the above equation (d).
[0038]
L = p · (Nj-Ni) + (Δj−Δi(3)
In the equation (3), the first term p · (Nj-Ni) Is the amount of movement of the detection target when there is no phase error, and the second term (Δj−Δi) Is equivalent to the amount of phase error correction considering the direction of movement of the detection targetThen, it is a so-called movement amount correction value of the present invention.Then, the correction value (Δj−Δi) Takes different values depending on the moving direction (rotation direction) of the detection target, as can be seen from the relations of equations (1) and (2).
[0039]
For example, as shown in FIG. 2, if the detection target has moved in the forward direction at both the previous sampling time and the current sampling time, Δj−Δi= Δj−δiIt becomes. Also, if it has moved in the forward direction at the previous sampling time and in the reverse direction at the current sampling time, Δj−Δi= (P + δj + 1) -ΔiIt becomes.
[0040]
Here, one certain function α is defined as in the following equation.
[0041]
α (N, UD) = Δ / p (4)
Here, N and Δ are a count value and a deviation determined at a certain sampling point, and UD is information on the moving direction (positive or negative) of the detection target at the sampling point.
[0042]
Using the function α given by equation (4), equation (3) can be expressed as follows.
[0043]
L = p · [(Nj-Ni) + {Α (Nj, UDj) -Α (Ni, UDi)}] (5)
Α (N in {} of the second term on the right side of equation (5)j, UDj) And α (Ni, UDi) Are phase error correction values taking the moving direction into consideration, and these correction values α (Nj, UDj), Α (Ni, UDi) Can be accurately obtained, even when a phase error occurs in the encoder, the speed V in consideration of the moving direction of the detection target can be accurately obtained.
[0044]
That is, both count values Ni, NjIf the time interval at which is obtained is T, the speed V of the detection target is
Figure 0003596942
It becomes.
[0045]
Then, the correction value α (Nj, UDj), Α (Ni, UDi) Will be described. Hereafter, in order to simplify the notation, α (Nj, UDj) Is αj, Α (Ni, UDi) Is αiIt is described as follows.
[0046]
As shown in FIG. 11, the position pulse P-NFocusing on four pulses (one period of the A-phase pulse or the B-phase pulse), the ideal position pulse P-NDeviation δ0~ Δ3Is the change point x between the A-phase pulse and the B-phase pulse0~ X3It takes a unique value determined every time, and has a periodicity every four pulses.
[0047]
Therefore, as shown in FIG. 3, each change point x of the A-phase pulse and the B-phase pulse0~ X3Each section x sandwiched between0~ X1, X1~ X2, X2~ X3, X3~ X0Are numbered from “0” to “3”, respectively.
α0= Δ0/ P, α1= Δ1/ P, α2= Δ2/ P, α3= Δ3/ P (7)
Then, each change point x0~ X3The correction values required for each of the cases have the correspondence relationships shown in FIG. 4 as can be seen from the relationships of the expressions (1), (2) and (4).
[0048]
For example, when the section is “0” and the detection target moves in the forward direction, the correction value is α0Is corrected as α when moving in the negative direction.1It can be seen that +1 should be used.
[0049]
As described above, a necessary correction value can be determined by using the relationship in FIG. 4. For this purpose, it is necessary to specify both the moving direction of the detection target and the sections “0” to “3”. There is. That is, the moving direction of the detection target and the count values N obtained at the current and previous sampling times.j, NiCan be specified in any of the sections “0 to 3”, the necessary correction value is determined from the relationship in FIG. 4, so that the speed V can be obtained.
[0050]
Next, a description will be given of a moving direction of the detection target and a technique for specifying each of the sections “0” to “3”.
[0051]
To know whether the detection target is moving in the forward direction (forward rotation) or the negative direction (reverse rotation), the A-phase pulse P output from the encoder is used.-AB-phase pulse P-BCan be determined by checking using a logical operation whether the phase is advanced or delayed.
[0052]
In order to specify the sections “0” to “3”, for example, as shown in FIG.1, N0Is focused on, "n1, N0"Is" 0, 0 "in the section" 0 "," 0, 1 "in the section" 1 "," 1, 0 "in the section" 2 ", and" 1 "in the section" 3 ". , 1 ", the sections" 0 "to" 3 "can be easily specified.
[0053]
Next, the correction value α shown in FIG.0~ Α3How to determine the specific numerical values of will be described.
[0054]
As shown in FIG.-AOr B-phase pulse P-BOf position pulses P corresponding to one cycle of-NIs moved at a constant low speed and in one direction (here, the positive direction) so as to obtain the following. In that case, the position pulse P-NIs proportional to the amount of movement of the detection target. The correction value α0~ Α3Is an ideal position pulse P with no phase error, as can be seen from equation (7).-NIs determined based on the movement amount p of the detection target based on Further, each change point x0~ X3Does not indicate the absolute position of the detection target, but indicates the relative position. Therefore, the first change point x0Correction value α corresponding to0If is considered as the reference point, α0= 0.
[0055]
Therefore, α1, Α2, Α3Each correction value of
Figure 0003596942
It becomes.
[0056]
That is, as a general expression, αi (i = 0 to 3) is given by the following expression.
[0057]
Figure 0003596942
Then, based on the equation (8), the correction value α0~ Α3After determining the specific numerical values, a table shown in FIG. 4 is created, and if this table is registered in advance in a memory or the like as initial data, these data can be used as correction data for calculating the speed. Can be used.
[0058]
The present invention has been made based on the above principle, and has the following configuration.
[0059]
That is, the speed detecting device of the present invention comprises: a pulse output means for outputting a two-phase pulse having a number and a phase corresponding to a moving amount and a moving direction of a detection target; Position detecting means for detecting the position of the object; direction determining means for inputting the two-phase pulse to determine the moving direction of the detected object; A time interval measuring means for measuring a time interval between the two times from a time at which the position of the detection target sampled last time has changed; and a moving direction detected by the direction discriminating means and the position detecting means at the previous sampling time, respectively. Storage means for storing both information of the position and the position and a position correction value for correcting the position information; Both the information on the movement direction and the position detected by the means, the information on the time interval measured by the time interval measurement means, and the information on the movement direction and the position obtained at the previous sampling time stored in the storage means. A calculating means for calculating a speed related to the detection target based on both information and information on the position correction value.
[0060]
[Action]
In the above configuration, when calculating the speed based on the movement amount of the detection target within the time interval, the calculation unit corrects the movement amount of the detection target with the correction value, and calculates the speed based on the corrected movement amount. Detects the speed excluding the phase error of the phase pulse.
[0061]
Therefore, even if the output of the encoder includes a phase error, the effect of the phase error can be effectively eliminated. In addition, since the adverse effect when the moving direction is reversed halfway can be eliminated, the speed of the detection target can be detected accurately and in a short time over the entire range from low speed to high speed.
[0062]
【Example】
FIG. 6 is a block diagram showing the configuration of the speed detecting device according to the embodiment of the present invention, and FIG. 7 is a timing chart for explaining the operation of the speed detecting device.
[0063]
In FIG. 6, reference numeral 1 denotes the entire speed detecting apparatus, 2 denotes pulse output means, 4 denotes position detecting means, 6 denotes direction determining means, 8 denotes time interval measuring means, 10 denotes storage means, and 12 denotes arithmetic means. is there.
[0064]
The pulse output means 2 is attached to a detection target such as a servomotor (not shown), and outputs two-phase pulses having the number and phase corresponding to the amount and direction of movement of the detection target. In the example, both A-phase and B-phase pulses P having a phase difference of 90 ° from each other are set.-A, P-BIt consists of an encoder that outputs
[0065]
The position detecting means 4 receives both the A-phase and B-phase pulses P from the encoder 2.-A, P-BIs input to detect the position of the detection target. In this example, the multiplication circuit 4a and the counter 4b are provided.
[0066]
The above-described multiplying circuit 4a outputs both the P-phase and P-phase pulses P-A, P-BIs a position pulse P that is differentiated and quadrupled.-N, And both pulses A and B of phase P-A, P-BOrigin pulse P indicating the origin position within one cycle of (the start point of section 0 in this example)-ZIs generated and output based on the following logical operation expression.
[0067]
P-N= P-A↑ + P-A↓ + P-B↑ + P-B
P-Z= (P-A) ・ P-B↓ + P-A↓ ・ (P-B)
(9)
Here, the symbol ↑ indicates the rising edge of the pulse, ↓ indicates each timing of the falling edge of the pulse, and parentheses () indicate the low level.
[0068]
Further, in this example, the counter 4b is constituted by a binary up / down counter, and the position pulse P obtained by the multiplication circuit 4a.-NIs input as a clock, and up-counting or down-counting is performed based on the direction discrimination result from the direction discriminating means 6, and the origin pulse P-ZIs the lower 2 bits n0, N1Only output data is inputted as a reset pulse.
[0069]
That is, the origin pulse P-ZIs input, the lower 2 bits n of the count value of the counter 4b0, N1Is always reset, the origin pulse P-ZIs always synchronized with the position of the start point of section 0, and therefore, as shown in FIG.0, N1, The sections 0 to 3 can be specified. That is, the counter 4b has position information.
[0070]
The direction discriminating means 6 detects each pulse P of the A phase and the B phase.-A, P-BTo determine the moving direction of the detection target, and comprises a logic circuit 6a and an RS flip-flop 6b.
[0071]
The logic circuit 6a outputs the A-phase pulse P-AB-phase pulse P-BOf the B phase pulse P-BIs delayed, the up-pulse P-UPAnd vice versa.-DOWNRespectively. That is, each pulse P-UP, P-DOWNIs generated based on the following logical operation expression.
[0072]
Figure 0003596942
The RS flip-flop 6b receives the up pulse P from the logic circuit 6a.-UPIs the set pulse, and the down pulse P-DOWNAre input as reset pulses, and the up pulse P-UPIs input, it is determined that the detection target is moving in the forward direction (forward rotation), and a high level, down pulse P-DOWNIs input, it is determined that the motor is moving in the negative direction (reverse rotation), and a low-level determination signal is output.
[0073]
The time interval measuring means 8 measures the time interval T between the two times from the time when the position of the detection target sampled this time changes and the time when the position of the detection target sampled last time changes. In this example, the oscillator 12 includes an oscillator 8a, a time counter 8b, a time register 8c, and a CPU 12, which will be described later.
[0074]
The oscillator 8a generates a fixed reference pulse for clocking. The time counter 8b sequentially counts reference pulses from the oscillator 8a, and the count value has time information.
[0075]
The time register 8c stores the position pulse P from the multiplication circuit 4a.-NIs latched every time is input, and therefore, information of each time when each position pulse is input is generated.
[0076]
Therefore, the CPU 12 calculates the time interval T from the difference between the value of the time register 8b obtained at the previous sampling time and the value of the time register 8b obtained at the current sampling time.
[0077]
The storage means 10 stores the information on the position and the moving direction detected by the position detection means 4 and the direction determination means 6 and the contents of the time register 8c at the sampling time, respectively, and corrects the information on the position. Are stored (the table shown in FIG. 4), and in this example, are constituted by an IC memory. Note that, as described above, the table shown in FIG. 4 stores the correction value α in advance based on Expression (8).0~ Α3Is determined by determining the specific numerical value of.
[0078]
The calculating means 12 stores the information on the moving direction, the position, and the time of the detection object detected by the position detecting means, the direction determining means, and the time interval detecting means at the time of the current sampling, and the information is stored in the IC memory 10. Calculating the speed related to the detection target based on the above-mentioned expression (6) based on the information on the time of the previous sampling point, the moving direction and the position of the detection target at that time, and the information on the position correction value. Thus, in this example, it is constituted by a microcomputer. Note that the microcomputer may include all or a part of the configuration of each of the units 4 to 10 described above.
[0079]
Next, an operation when the speed of the detection target is detected by the speed detection device having the above configuration will be described with reference to a timing chart shown in FIG.
[0080]
The encoder 2 outputs an A-phase pulse P according to the moving amount and moving direction of the detection target.-AAnd B-phase pulse P-BIs output. In this case, both pulses P-A, P-BContains a phase error.
[0081]
The direction discriminating means 6 detects each pulse P of the A phase and the B phase.-A, P-BTo determine the moving direction of the detection target.
[0082]
That is, the logic circuit 6a outputs the A-phase pulse P-A, The B-phase pulse P-BIs delayed, the up-pulse P-UPAnd vice versa.-DOWNAre generated and output based on (10), respectively.
The RS flip-flop 6b receives the up pulse P from the logic circuit 6a.-UPIs input, it is determined that the detection target is moving in the forward direction (forward rotation), and a high-level determination signal is output from the down pulse P.-DOWNIs input, it is determined that the motor is moving in the negative direction (reverse rotation), and a low-level determination signal is output. Then, this determination signal is given to the counter 4 b of the position detecting means 4 and is taken into the calculating means 12.
[0083]
The position detecting means 4 receives both the A-phase and B-phase pulses P from the encoder 2.-A, P-BTo output information on the position of the detection target.
[0084]
That is, the multiplying circuit 4a outputs both the A-phase and B-phase pulses P-A, P-BIs a position pulse P that is differentiated and quadrupled.-N, And both pulses A and B of phase P-A, P-BOrigin pulse P indicating the origin position (start point of section 0) within one cycle of-ZIs created and output based on the equation (9).
[0085]
The counter 4b is provided with a position pulse P obtained by the multiplication circuit 4a.-NIs input as a clock, and up-count or down-count is performed based on the direction discrimination result from the direction discriminating means 6, and the origin pulse P from the multiplication circuit 4a is input.-ZIs the lower 2 bits n0, N1Only output data is input as a reset pulse. Thereby, the origin pulse P-ZIs always coincident with the position of the start point of the section 0, the count value of the counter 4b is taken into the calculating means 12 as position information.
[0086]
On the other hand, the reference pulse for timing generated from the oscillator 8a is sequentially counted by the time counter 8b, and the count value is output to the time register 8c as time information. The time register 8c stores the position pulse P from the multiplication circuit 4a.-NIs input, the count value from the time counter 8b is latched. Therefore, from the time register 8c, information of each time when each position pulse is input is generated.
[0087]
The arithmetic means 12 takes in each information from the position detecting means 4, the direction determining means 6 and the time register 8c every time a predetermined sampling time arrives, and stores these information in the IC memory 10.
[0088]
Further, the calculating means 12 calculates the information obtained from the position detecting means 4, the direction determining means 6 and the time register 8c when the current sampling time arrives, and the previous sampling time already stored in the IC memory 10. Based on the obtained information on the position, direction, and time, and the table in FIG. 4, the speed of the detection target is calculated based on the equation (6), and the calculation result is output.
[0089]
As described above, the speed detection device of this embodiment determines the velocity V in consideration of the phase error included in the encoder 2 and the reversal of the moving direction of the detection target, and thus the influence of the phase error and the reversal of the encoder 2 is obtained. The speed can be effectively eliminated, and the speed can be detected accurately and within a short time over the entire range from low speed to high speed.
[0090]
[Modification]
Modification of position detection means
Instead of the position detecting means 4 shown in FIG. 6, a position detecting means 4 'having the configuration shown in FIG. 8 can be provided.
[0091]
That is, the position detecting means 4 'includes a multiplying circuit 4a', a counter 4b ', and a combination circuit 4c'.
[0092]
The multiplying circuit 4a 'outputs both the A-phase and B-phase pulses P-A, P-BIs a position pulse P that is differentiated and quadrupled.-NIs output based on the above equation (9), and the A-phase pulse P-AOr B-phase pulse P-B(In this example, the change point in the section 3 → 0 or the section 0 → 3)-NIs generated and output based on the following logical operation expression.
[0093]
Figure 0003596942
Here, the symbol ↑ indicates the rising edge of the pulse, ↓ indicates each timing of the falling edge of the pulse, and parentheses () indicate the low level.
[0094]
The counter 4b 'is composed of a binary up / down counter, and the periodic pulse P obtained by the multiplication circuit 4a' is used.-N′ As a clock, and counts up or down based on the direction discrimination result from the direction discriminating means 6. The lower 2 bits n of the counter 4b of the above-described embodiment.0, N1Upper bits n excluding2Are obtained.
[0095]
Further, the combination circuit 4c 'outputs the pulses P of both the A phase and the B phase.-A, P-BAnd these pulses P-A, P-BBased on the information n of the position in one cycle consisting of 2 bits0, N1Is created and output based on the conditions shown in FIG.
[0096]
Also in the case of this modified example, after the output of the position detecting means 4 'is taken into the microcomputer 12, the lower two bits n0, N1Can be specified by the value of, and when used together with the direction information from the direction determining means 6, each correction value in the table of FIG. 4 can be used.
[0097]
Other modifications
In the present invention, the A-phase pulse P-AAnd P of B-phase pulse-BThis is effective not only for correcting the phase error within one cycle of the above, but also for the phase error of the encoder having one cycle as a cycle.
[0098]
That is, in the case of the encoder, information on the position within one rotation is generated once per rotation. The current position can be known based on the values of the counters 4a and 4a 'at that time by the Z-phase pulse generated to indicate the mechanical origin position of the rotary shaft of the encoder. Therefore, the correction value α of the change point within one rotationi(I is the number of pulses from the Z-phase pulse of the encoder) is calculated in advance by the same method as that used to obtain the relationship of Expression (8), and the speed V can be obtained based on Expression (6). It is.
[0099]
Further, the present invention is also effective for a one-phase encoder and an absolute type rotary encoder. That is, in the case of a one-phase encoder, since the direction cannot be determined, the error caused by the direction reversal cannot be excluded. However, in this case, it is considered that only the forward rotation occurs, and the equations (1) and (2) are used. By applying this, the function of equation (4) may be determined.
[0100]
In the case of an absolute type rotary encoder, the current position can be uniquely known from the output data. Gray code is often used as output data. In this case, the change of the least significant bit is used as the timing signal of the time interval measuring means 8, and the change in direction and position is changed from a gray code to a straight code. The difference may be obtained by taking the difference after the conversion.
[0101]
【The invention's effect】
According to the present invention, the following effects can be obtained.
[0102]
(1) Even if the output of the encoder includes a phase error, the effect of the phase error can be effectively eliminated. In addition, the adverse effect when the moving direction is reversed halfway can be eliminated.
[0103]
For this reason, the speed of the detection target can be accurately detected within a short time over the entire range from low speed to high speed.
[Brief description of the drawings]
FIG. 1 is a diagram provided for explaining the principle of the present invention.
FIG. 2 is an explanatory diagram in a case where an appropriate correction value for correcting a deviation of a phase error according to a moving direction of a detection target is selected.
FIG. 3 shows each change point x of the position pulse0~ X3And their respective changing points x0~ X3FIG. 7 is an explanatory diagram showing a relationship with a correction value required for each case.
FIG. 4 is a data table of correction values used in calculating a speed when an encoder has a phase error.
FIG. 5 is an explanatory diagram when a correction value in FIG. 4 is specifically determined.
FIG. 6 is a block diagram illustrating an overall configuration of a speed detection device according to an embodiment of the present invention.
FIG. 7 is a timing chart for explaining the operation of the apparatus.
FIG. 8 is a block diagram showing a modified example of the position detecting means in the speed detecting device of the present invention.
FIG. 9 is an explanatory diagram of position detection information by a position detection unit in FIG. 8;
FIG. 10 is an explanatory diagram when a speed is obtained by a pulse counting method.
FIG. 11 is a timing chart showing a relationship between each pulse interval and a deviation when a phase error is included in the output of the encoder.
FIG. 12 is a diagram for explaining that an error occurs in a detected speed when a phase error is included in an output of an encoder.
FIG. 13 is a diagram for explaining that an error occurs in the detected speed when the moving direction of the detection target reverses halfway.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Speed detection device, 2 ... Pulse generation means (encoder), 4 ... Position detection means, 4a ... Multiplier circuit, 4b ... Counter, 6 ... Direction determination means, 6a ... Logic circuit, 6b ... RS flip-flop, 8 ... Time Interval measuring means, 8a oscillator, 8b time counter, 8c time register, 10 storage means (IC memory), 12 arithmetic means (microcomputer).

Claims (1)

検出対象物の移動量と移動方向に応じた個数と位相とを有する2相のパルスを出力するパルス出力手段と、
前記2相のパルスを入力して検出対象物の位置を検出する位置検出手段と、
前記2相のパルスを入力して検出対象物の移動方向を判別する方向判別手段と、
今回サンプリングした検出対象物の位置の変化が発生した時刻と前回サンプリングした検出対象物の位置の変化が発生した時刻とから両時刻の時間間隔を計測する時間間隔計測手段と、
前回のサンプリング時点において前記方向判別手段と位置検出手段でそれぞれ検出された移動方向と位置の両情報、および位置の情報を補正するための位置補正値をそれぞれ記憶する記憶手段と、
今回のサンプリング時点において前記方向判別手段と位置検出手段でそれぞれ検出された移動方向と位置の両情報、および時間間隔計測手段で計測された時間間隔の情報、ならびに前記記憶手段に記憶されている前回のサンプリング時点において得られた移動方向と位置の両情報、および位置補正値の情報に基づいて検出対象物に関する速度を演算する演算手段と、
を備え、前記時間間隔内の検出対象物の位置の変化である移動量に基づいて速度を算出するときに、検出対象物の移動量を検出対象物の移動方向を考慮した位相誤差を打ち消す移動量補正値で補正することにより、補正された移動量に基づいて2相のパルスの位相誤差を排除し、かつ、移動方向が途中で反転した場合でも正確な速度を検出することを特徴とする速度検出装置。
Pulse output means for outputting a two-phase pulse having a number and a phase according to the movement amount and the movement direction of the detection target;
Position detection means for inputting the two-phase pulse and detecting the position of the detection target;
Direction determining means for determining the moving direction of the detection target by inputting the two-phase pulse;
A time interval measuring means for measuring a time interval between the time at which the change in the position of the detection target sampled this time has occurred and the time at which the change in the position of the detection target sampled last time has occurred,
Storage means for storing both information of the movement direction and the position detected by the direction determination means and the position detection means at the time of the previous sampling, and a position correction value for correcting the position information, respectively;
At the time of this sampling, both information on the moving direction and the position detected by the direction discriminating means and the position detecting means, the information on the time interval measured by the time interval measuring means, and the previous time stored in the storage means, respectively. Calculating means for calculating the speed related to the detection target based on both the information of the movement direction and the position obtained at the time of sampling, and the information of the position correction value,
When calculating a speed based on a movement amount that is a change in the position of the detection target within the time interval, a movement that cancels a phase error in consideration of a movement direction of the detection target in consideration of a movement direction of the detection target. By correcting with the amount correction value, the phase error of the two-phase pulse is eliminated based on the corrected movement amount, and an accurate speed is detected even when the movement direction is reversed halfway. Speed detector.
JP14342595A 1995-06-09 1995-06-09 Speed detector Expired - Fee Related JP3596942B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14342595A JP3596942B2 (en) 1995-06-09 1995-06-09 Speed detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14342595A JP3596942B2 (en) 1995-06-09 1995-06-09 Speed detector

Publications (2)

Publication Number Publication Date
JPH08334526A JPH08334526A (en) 1996-12-17
JP3596942B2 true JP3596942B2 (en) 2004-12-02

Family

ID=15338439

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14342595A Expired - Fee Related JP3596942B2 (en) 1995-06-09 1995-06-09 Speed detector

Country Status (1)

Country Link
JP (1) JP3596942B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6492637B1 (en) 1999-05-10 2002-12-10 Citizen Watch Co., Ltd. Dimension measuring device
JP4798473B2 (en) * 2001-03-06 2011-10-19 株式会社安川電機 Position detection device
JP4610377B2 (en) * 2005-03-09 2011-01-12 東洋電機製造株式会社 Speed detection device
JP5299844B2 (en) * 2009-01-23 2013-09-25 富士電機株式会社 Speed monitoring device
US8793085B2 (en) * 2011-08-19 2014-07-29 Allegro Microsystems, Llc Circuits and methods for automatically adjusting a magnetic field sensor in accordance with a speed of rotation sensed by the magnetic field sensor
JP2019086399A (en) * 2017-11-07 2019-06-06 株式会社東海理化電機製作所 Rotation operating device
JP2019086400A (en) * 2017-11-07 2019-06-06 株式会社東海理化電機製作所 Rotation operating device

Also Published As

Publication number Publication date
JPH08334526A (en) 1996-12-17

Similar Documents

Publication Publication Date Title
JP2720642B2 (en) Multi-turn absolute value encoder
EP0840096A1 (en) Interpolation circuit for encoder
JP3596942B2 (en) Speed detector
EP0199826A1 (en) Method of detecting position
JP3173174B2 (en) Speed detector
WO1982004129A1 (en) Speed detecting device
KR900005879B1 (en) Pulse distribution type position detector
US6310458B1 (en) Blended velocity estimation
JP2002311040A (en) Speed detector
JP4519183B2 (en) AB phase signal generator, RD converter and angle detection device
JPS62237316A (en) Detection error correcting device for position detector
JPS61110005A (en) Method and apparatus for detecting position
JP3449177B2 (en) Position detection device with incremental encoder
JP2562436Y2 (en) Detector
JP3248209B2 (en) Position detection method
JPH04285815A (en) Position counter circuit of rotary encoder
JPH07190807A (en) Pulse count circuit of encoder
JP3283188B2 (en) Pulse count circuit
JP2691052B2 (en) Encoder resolution conversion method and device and image detection device
JPH0466288B2 (en)
JP3015751B2 (en) Encoder interpolation circuit
KR100581791B1 (en) Method of processing overflow of absolute encoder
JPH05332788A (en) Data processing device for rotary encoder
JPH07210249A (en) Digital servo device
KR100252079B1 (en) Apparatus for detecting position

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040330

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040506

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040624

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040824

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040907

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080917

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090917

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090917

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100917

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110917

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees