[go: up one dir, main page]

JP2004317262A - Measuring device - Google Patents

Measuring device Download PDF

Info

Publication number
JP2004317262A
JP2004317262A JP2003110807A JP2003110807A JP2004317262A JP 2004317262 A JP2004317262 A JP 2004317262A JP 2003110807 A JP2003110807 A JP 2003110807A JP 2003110807 A JP2003110807 A JP 2003110807A JP 2004317262 A JP2004317262 A JP 2004317262A
Authority
JP
Japan
Prior art keywords
value
periodic signal
correction
correction value
sine wave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003110807A
Other languages
Japanese (ja)
Other versions
JP4109149B2 (en
Inventor
Toru Morita
徹 森田
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.)
Nikon Corp
Sendai Nikon Corp
Original Assignee
Nikon Corp
Sendai Nikon 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 Nikon Corp, Sendai Nikon Corp filed Critical Nikon Corp
Priority to JP2003110807A priority Critical patent/JP4109149B2/en
Publication of JP2004317262A publication Critical patent/JP2004317262A/en
Application granted granted Critical
Publication of JP4109149B2 publication Critical patent/JP4109149B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Optical Transform (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

【課題】精度の高いピーク値を求めるピーク値検出方法、また、精度の高いピーク値やバリイ値、精度の高い補正値を求める計測装置を提供すること。
【解決手段】回転ディスク3の回転移動に伴って検出されたA相擬似正弦波とB相擬似正弦波を取得し、一方の擬似正弦波がミドルレンジを単調増加あるいは単調減少しているときに検出された他方のピーク値あるいはバリイ値をラッチする。これを回転ディスク3が単一方向に回転する間の4周期分において行う。4周期でラッチされた各4個のピーク値およびバリイ値に基づき、A相擬似正弦波およびB相擬似正弦波のDCオフセット値を求め、その値をA相擬似正弦波およびB相擬似正弦波からキャンセルすることにより、A相擬似正弦波およびB相擬似正弦波を補正する。
【選択図】 図1
An object of the present invention is to provide a peak value detection method for obtaining a high-accuracy peak value, and a measuring device for obtaining a high-accuracy peak value, a barrier value, and a high-accuracy correction value.
An A-phase pseudo sine wave and a B-phase pseudo sine wave detected along with the rotational movement of a rotary disk are acquired, and when one of the pseudo sine waves monotonically increases or monotonously decreases the middle range. The other detected peak value or barrier value is latched. This is performed for four cycles while the rotating disk 3 rotates in a single direction. A DC offset value of the A-phase pseudo sine wave and the B-phase pseudo sine wave is obtained based on each of the four peak values and the barrier values latched in four cycles, and the obtained values are used as the A-phase pseudo-sine wave and the B-phase pseudo-sine wave. , The A-phase pseudo sine wave and the B-phase pseudo sine wave are corrected.
[Selection diagram] Fig. 1

Description

【0001】
【発明の属する技術分野】
本発明は、エンコーダ装置などの計測装置に関する。
【0002】
【従来の技術】
モータの位置変位を検出する計測器として、発光素子と受光素子とその間に設けられる回転ディスクとを用いた光学式のエンコーダ装置が知られている。回転ディスクには微小なスリットが形成され、位置変位が生じると光を透過または遮光する。この光の変化を受光素子により検知し、位置変位を検知する。受光素子の出力は増幅回路により増幅され、よく知られた90度位相差を持つ擬似正弦波を得る。
【0003】
増幅された2相擬似正弦波信号は、細分化回路(内挿回路)により、正弦波の1波長をより細かく分割してより精細な位置情報を得る。細分化する方法はいくつかの方法が公知であるが、抵抗アレイを用いて位相差を持たせて細分化する方法(抵抗分割方式)、または、A/Dコンバータを用いて逆正接関数を利用する方法(tan−1θ方式)等が広く知られている。これらの方法により、擬似正弦波の1波長よりも細分化された、より高分解能な位置情報を得る。
【0004】
このとき、2相擬似正弦波(A相信号、B相信号)が検出系の機械的な誤差、電気的な増幅回路自体が持つ電気的オフセット等により、DC的なオフセットを持ってしまうことがある。一方、1波長内を細分化して高分解能化を図る方法は、擬似正弦波(A相信号、B相信号)が理論的に、理想的な正弦波、余弦波であることを前提として細分化処理を行なう。例えばA相,B相各々の信号を、sinθ、cosθとみなし、(sinθ)÷(cosθ)なる除算を行なってtanθを求めることができる。除算結果(商)を基に、θ=tan−1(商)なる変換を行なって位置情報に相当するθを求める。
【0005】
ここで、除算の基となるsinθ、cosθにオフセットが生じていた場合、逆三角関数を求めた結果は正確なθから誤差を有した結果となる。即ち、細分化した位置情報の位置誤差となり、位置情報の精度低下を招く。この精度低下は、位置センサないし計測器としては著しい性能低下になる。このような欠点を補うため、擬似正弦波の電圧波形をオシロスコープ等でモニタしながら、可変抵抗器等の調整手段を回路に設け、人間が手間隙をかけてオフセットをマニュアル調整し、精度低下を防ぐことが行われていた。しかし、これらの方法では、特別な回路をわざわざ設けたり、人間が手間隙かけて精密な調整を行なわなければならないという問題が生じていた。
【0006】
そこで、本出願の発明者は、擬似正弦波のピーク値とバリイ値を検出し、周期ごとに平均値を求め擬似正弦波を補正する方法を考案した(例えば、特許文献1参照)。また、擬似正弦波のA相が一定レベルとクロスするたびのB相の値をサンプリングし、その値に基づきB相の補正をする。同様に、B相が一定レベルとクロスするたびのA相の値をサンプリングし、その値に基づきA相の補正をする方法を考案した(例えば、特許文献2参照)。
【0007】
【特許文献1】
特開平6−26882号公報
【特許文献2】
特開平6−34392号公報
【発明が解決しようとする課題】
しかし、上述した方法では必ずしも精度の高いピーク値やバリイ値、また、精度の高い補正値を求めることができないという問題が生じていた。
【0008】
本発明は、精度の高いピーク値やバリイ値、精度の高い補正値を求める計測装置を提供する。
【0009】
【課題を解決するための手段】
請求項1の発明は、被測定物の移動に伴って検出された実質的に90度の位相差を有し同一周期を有する第1の周期的信号と第2の周期的信号とを使用して第1の周期的信号のピーク値を検出する計測装置に適用され、第1の周期的信号と第2の周期的信号を取得する信号取得手段と、取得された第2の周期的信号が、第2の周期的信号の所定の基準レベルをまたいで第1の所定値から第2の所定値へ単調増加あるいは単調減少したとき、その間に取得された第1の周期的信号のピーク値を被測定物が単一方向へ移動中におけるピーク値として検出するピーク値検出手段とを備えることを特徴とするものである。
請求項2の発明は、被測定物の移動に伴って検出された実質的に90度の位相差を有し同一周期を有する第1の周期的信号と第2の周期的信号とを使用して被測定物の位置情報を取得する計測装置に適用され、第1の周期的信号の第1の補正値を求める第1の補正値検出手段と、求めた第1の補正値に基づき第1の周期的信号を補正する第1の補正手段と、第2の周期的信号の第2の補正値を求める第2の補正値検出手段と、求めた第2の補正値に基づき第2の周期的信号を補正する第2の補正手段と、補正された第1の周期的信号と補正された第2の周期的信号に基づき、細分化処理を行って細分化された被測定物の位置情報を取得する細分化処理手段とを備え、第1の補正値検出手段は、第2の周期的信号が、第2の周期的信号の所定の基準レベルをまたいだ第1の所定値と第2の所定値間で単調増加したとき、その間の第1の周期的信号のピーク値あるいはバリイ値の一方を取得し、また、第1の所定値と第2の所定値間で単調減少したとき、その間の第1の周期的信号のピーク値あるいはバリイ値の他方を取得し、該取得した第1の周期的信号のピーク値およびバリイ値に基づき第1の補正値を求め、第2の補正値検出手段は、第1の周期的信号が、第1の周期的信号の所定の基準レベルをまたいだ第3の所定値と第4の所定値間で単調増加したとき、その間の第2の周期的信号のピーク値あるいはバリイ値の一方を取得し、第3の所定値と第4の所定値間で単調減少したとき、その間の第2の周期的信号のピーク値あるいはバリイ値の他方を取得し、該取得した第2の周期的信号のピーク値およびバリイ値に基づき第2の補正値を求めることを特徴とするものである。
請求項3の発明は、被測定物の移動に伴って検出された実質的に90度の位相差を有し同一周期を有する第1の周期的信号と第2の周期的信号とを使用して被測定物の位置情報を取得する計測装置に適用され、第1の周期的信号の第1の補正値を求める第1の補正値検出手段と、求めた第1の補正値に基づき第1の周期的信号を補正する第1の補正手段と、第2の周期的信号の第2の補正値を求める第2の補正値検出手段と、求めた第2の補正値に基づき第2の周期的信号を補正する第2の補正手段と、補正された第1の周期的信号と補正された第2の周期的信号に基づき、細分化処理を行って細分化された被測定物の位置情報を取得する細分化処理手段とを備え、第1の補正値検出手段は、被測定物が単一方向への移動中に少なくとも2周期分のピーク値およびバリイ値を取得し、取得した第1の周期的信号のピーク値およびバリイ値に基づき第1の補正値を求め、求めた第1の補正値を第1の補正手段に出力し、第2の補正値検出手段は、被測定物が単一方向への移動中に第1の周期的信号と同期して少なくとも2周期分のピーク値およびバリイ値を取得し、取得した第2の周期的信号のピーク値およびバリイ値に基づき第2の補正値を求め、求めた第2の補正値を第2の補正手段に出力することを特徴とするものである。
請求項4の発明は、請求項3記載の計測装置において、第1の補正値検出手段は、少なくとも2周期分のピーク値およびバリイ値を取得するまで、第1の補正値を出力しないか補正値ゼロを出力し、第2の補正値検出手段は、少なくとも2周期分のピーク値およびバリイ値を取得するまで、第2の補正値を出力しないか補正値ゼロを出力することを特徴とするものである。
請求項5の発明は、請求項3〜4のいずれか1項記載の計測装置において、少なくとも2周期分は、2の累乗分の周期数であることを特徴とするものである。請求項6の発明は、請求項3〜5のいずれか1項記載の計測装置において、少なくとも2周期分は、計測装置の電源オンよりカウントすることを特徴とするものである。
【0010】
【発明の実施の形態】
図1は、本発明の計測装置の一実施の形態を示すエンコーダ装置のブロック図である。エンコーダ装置は、モータなどに取り付けられ、モータの回転位置変位を検出する。エンコーダ装置が取り付けられたモータは、例えば、ロボットに使用される。発光素子1と受光素子2の間に回転ディスク3が設けられ、回転ディスク3はモータの回転軸の回転と伴に回転する。回転ディスク3には、微小なスリットが形成され、位置変位が生じると光を透過または遮光する。この光の変化を受光素子2により検知し、位置変位を検知する。受光素子2の出力は増幅回路4により増幅され、公知な2相擬似正弦波(A相/B相)を出力する。A相擬似正弦波とB相擬似正弦波は、位相が90度ずれている。
【0011】
本実施の形態では、増幅された2相擬似正弦波信号を、細分化回路(内挿回路)5により、正弦波の1波長をより細かく分割してより精細な位置情報を得る。細分化する方法はいくつかの方法が公知であり、抵抗アレイを用いて位相差を持たせて細分化する方法(抵抗分割方式)、またはA/Dコンバータを用いて逆正接関数を利用する方法(tan−1θ方式)等が広く知られている。これらの方法により、擬似正弦波の1波長よりも細分化された、より高分解能な位置情報を得る。本実施の形態では、逆正接関数を利用する方法(tan−1θ方式)を採用する。
【0012】
A相擬似正弦波は、従来技術の項でも説明したように、種々の要因によりDCオフセットを有する。A相擬似正弦波は、DCオフセットを有したまま、A/Dコンバータ6に入力される。A/Dコンバータ6の出力(nビット、n:自然数)は、一方は減算器7に、他方は、DCオフセット検出回路8に入力される。B相擬似正弦波も、同様に、DCオフセットを有したまま、A/Dコンバータ9に入力される。A/Dコンバータ9の出力(nビット、n:自然数)は、一方は減算器10に、他方は、DCオフセット検出回路11に入力される。
【0013】
エンコーダ装置の電源投入直後は、イニシャル・リセット動作により、オフセット検出回路8、11の出力はゼロを保持している。よって、このときは元来の2相擬似正弦波から「ゼロ」を減じる。即ち、データは素通しとなって後段の細分化回路5へ伝達される。次に、ある規定値以上の位置変位が生じた後、DCオフセット検出回路8、11は、後述する動作によりA相擬似正弦波、B相擬似正弦波のDCオフセットをそれぞれ自動的に算出する。A相擬似正弦波およびB相擬似正弦波共にDCオフセットが求まった後に、双方同時にDCオフセット検出回路8、11の出力をゼロから変化させる。これにより、2つの減算器7、10の出力は、元来の2相擬似正弦波のDCオフセットを除去した値となる。
【0014】
細分化回路5は、DCオフセットを除去された2相擬似正弦波を基に細分化処理を行なう。細分化処理では、A相擬似正弦波およびB相擬似正弦波を、sinθおよびcosθとみなし、(sinθ)÷(cosθ)なる除算を行なってtanθを求める。すなわち、DCオフセットがキャンセルされた正確なsinθおよびcosθが細分化回路5に入力され、細分化誤差が低減される。除算結果(商)を基に、θ=tan−1(商)なる変換を行なって細分化された位置情報に相当するθを求める。エンコーダ装置に対して指定された分解能により、(sinθ)÷(cosθ)をどの程度細かく演算するかが決まる。
【0015】
図2は、DCオフセットを検出する基本原理を示す図である。擬似正弦波が基準電位(基準レベル)に対して、図で示すようにプラス電位方向にDCオフセットを有していたとする。ここで、1波長以上の単一方向の位置変位が生じれば、ピーク値、バリィ値(谷値)をそれぞれ最大値、最小値として扱うことができる。従って、ピークとバリィの和を2で割ることにより、単純な演算処理で近似的にDCオフセットを求めることが可能である。
【0016】
図3は、DCオフセット検出のブロック図を示す図である。図では、A相擬似正弦波のみのDCオフセット検出回路8を示す。B相擬似正弦波のDCオフセット回路11も同様な構成であるので説明を省略する。DCオフセットを有するA相擬似正弦波は、A/Dコンバータ6でA/D変換される。A/D変換されたデジタルデータ(nビット)は、ピークホールド回路21およびバリィホールド回路22に伝達され、そこで常時モニタされる。ここでは、単一方向の位置変位が生じた場合にのみ、ピークホールド機能、バリィホールド機能により最大値、最小値を例えば4回、求める。これら4個の最大値、最小値はそれぞれ後段の平均化回路23、24によって平均化されて出力される。平均化により、より安定した信頼性の高い最大値、最小値を求める構成となる。
【0017】
平均化され最大値(ピーク値の平均値)、最小値(バリィ値の平均値)は、後段の加算回路25によって加算され、つづく後段の除算回路26で、2で除算される。上述の図2の説明の通り、ここで2で除算した結果(商)は、近似的にDCオフセットとして扱うことができる。即ち、この時点でDCオフセット値27が求まる。
【0018】
図4は、エンコーダ装置がパワーONしてから、DCオフセットキャンセル機能が有効になるまでの様子と、細分化誤差との関係を示す図である。被測定物の単一方向の位置変位が続き、ピークホールド、バリィホールドがそれぞれ4回ホールドされた後に、DCオフセットがキャンセルされ、細分化誤差が低減される様子が示されている。符号28のタイミングでオフセットキャンセル動作が開始されてオフセット除去機能が有効になった後に、高精度な細分化が行なわれる。
【0019】
次に、図5および図6を使用して、DCオフセット値を求めキャンセル(補正)するアルゴリズムについて詳細に説明する。図5は、処理の流れを説明するフローチャートである。DCオフセット検出回路8、11は、ASICで実現され、すべてロジック回路により構成されている。図5は、このロジック回路の処理の流れを説明するフローチャートである。図6は、以下の説明に使用するA相擬似正弦波およびB相擬似正弦波を示すグラフである。
【0020】
まず、概要を説明する。A相擬似正弦波およびB相擬似正弦波の他方が、中心値(基準レベル、1.0V)近辺で単調増加あるいは単調減少しており、対象擬似正弦波である他の一方が、レベル1(1.3V)以上、あるいはレベル2(0.7V)以下で極値をとったとき、その極値を最大値あるいは最小値とみなし、データを保持する。この条件に収まらない場合、データは正式採用しない。これを、被測定物が単一方向に移動し、A相擬似正弦波およびB相擬似正弦波が4周期分検出できるまで行う。すなわち、最大値および最小値をそれぞれ4個取得できるまで行う。保持した最大値および最小値計それぞれ4個の平均値を求め、それを加算して2で除算してDCオフセット値(補正値)を得る。
【0021】
このようにして求めたA相擬似正弦波およびB相擬似正弦波各相のDCオフセット値(初期値ゼロ)を、A/Dコンバータ6,9の出力値より減じて、DCオフセットをキャンセルする。すなわち、A/Dコンバータ6,9の出力値をDCオフセット値で補正する。永遠に採用されるべきデータが取り込めないとき、オフセットキャンセラは動作しない。すなわち、DCオフセット検出回路8、11から出力するオフセット値は初期値ゼロのままとなる。この場合、何らかの異常と考えられるので、この異常は位相平面エラーに反映される。
【0022】
図5のフローチャートは、A相擬似正弦波の最大値、最小値(ピーク値、バリイ値)を求める場合を示す。B相擬似正弦波の最大値、最小値(ピーク値、バリイ値)を求める場合も同様であるので、代表してA相擬似正弦波で説明する。基準レベル近傍の1.0V±0.3Vをミドルレンジ、1.3V以上2.0V以下を最大値採用レンジ、0.7V以下0V以上を最小値採用レンジとする。
【0023】
まず、STATE:0のステップS1では、B相擬似正弦波がミドルレンジから外れているか否かを判定する。外れている場合はSTATE:1のステップS2に進み、外れていない場合はステップS1に留まり外れるまで待つ。ステップS2では、B相擬似正弦波がミドルレンジ内かつA相擬似正弦波がミドルレンジを外れているか否かを判定する。すなわち、ステップS2は、図6において、B相擬似正弦波がミドルレンジ外部からミドルレンジ内部に入ってきたか否かを判定する。
【0024】
ステップS2で、B相擬似正弦波がミドルレンジ内かつA相擬似正弦波がミドルレンジを外れていると判定すると、STATE:2のステップS3に進む。B相擬似正弦波がミドルレンジ内かつA相擬似正弦波がミドルレンジを外れていることを否定判定すると、それが肯定判定になるまで待つ。ステップS3では、A相擬似正弦波の値をピーク値の初期値としてセットし、B相擬似正弦波についてミドルレンジフラグをセットする。ミドルレンジフラグは、B相擬似正弦波が基準レベルより低い値の場合は−、基準レベルより高い値の場合は+のフラグをセットする。
【0025】
STATE:3のステップS4では、A相擬似正弦波のピークホールドを開始する。すなわち、A相擬似正弦波の値が増加していれば常に新しい値で更新し、減少する場合は以前の値を保持する。ステップS5では、B相擬似正弦波が基準レベルをクロスしたか否かを判定する。基準レベルをクロスしたと判定するとSTATE:4のステップS6に進み、STATE:3から抜け出る。
【0026】
ステップS6では、B相擬似正弦波が単調増加あるいは単調減少してミドルレンジフラグに設定されている+側あるいは−側の反対側からミドルレンジを出たか否かを判定する。出たと判定すると、STATE:5のステップS7に進む。まだ出ていないと判定すると、ステップS6に留まり出るまで待つ。ピーク値を求める場合において、STATE:2〜STATE:4の間のA相擬似正弦波のレンジは、最大値採用レンジである。バリイ値を求める場合において、STATE:2〜STATE:4のA相擬似正弦波のレンジは、最小値採用レンジである。
【0027】
ステップS7では、A相擬似正弦波のピークホールド(バリイ値のホールドを含む)を終了し、そのピーク値あるいはバリイ値をラッチする。B相擬似正弦波のミドルレンジフラグをリセットし、カウンタをインクリメントする。このカウンタは、A相擬似正弦波のピーク値およびバリイ値を取得するたびにインクリメントされる。ステップS8では、カウンタ値が8になったか否かを判定する。まだ8までカウントされていないと判定すると、STATE:0のステップS1から処理を繰り返す。カウンタ値が8になったと判定すると、処理を終了する。処理が終了すると、A相擬似正弦波の最大値および最小値が4個ずつ計8個求まり、それぞれの値はラッチ回路に保持されている。
【0028】
一方、STATE:3では、AND回路31で、STATE:3とB相擬似正弦波逆転領域外信号32とAND(積)を取り、RESET1信号を生成する。B相擬似正弦波逆転領域外信号32は、B相擬似正弦波をモニタし、B相擬似正弦波がミドルレンジフラグにセットされている+側あるいは−側と同一の側からミドルレンジを出た場合にセットされる信号である。すなわち、B相擬似正弦波が基準レベルをクロスする前に、ミドルレンジに入った側と同じ側に出た場合である。これは、被測定対象物の移動が、B相擬似正弦波が基準レベルをクロスする前に逆転したことを意味する。このとき、RESET1信号を生成し、STATE:0のステップS1に戻る。
【0029】
また、STATE:4においても、AND回路33で、STATE:4とB相擬似正弦波逆転領域外信号32とAND(積)を取り、RESET2信号を生成する。この場合は、B相擬似正弦波が単調増加あるいは単調減少しながらミドルレンジの一方から他方へ抜け出ず、ミドルレンジに入った側と同じ側に出た場合である。これは、被測定対象物の移動が、B相擬似正弦波が基準レベルをクロスした後ミドルレンジを抜けきる前に逆転したことを意味する。このとき、RESET2信号を生成し、STATE:0のステップS1に戻る。
【0030】
STATE:5では、XNOR回路34で、前回取得したA相擬似正弦波のピーク値あるいはバリイ値の符号35と今回取得したピーク値あるいはバリイ値の符号36とXNOR(排他的論理和の否定)を取る。符号が一致している場合はRESET3信号を生成し、符号が一致していない場合は、RESET3信号を生成しない。ここで言う符号とは、基準レベルよりも大きな値であるピーク値の場合は+の符号、基準レベルよりも小さな値であるバリイ値の場合は−の符号である。符号が一致しない場合は、被測定物が単一方向に移動していることを意味する。符号が一致する場合は、前回ピーク値の場合に今回もピーク値を検出し、前回バリイ位置の場合に今回もバリイ値を検出したことを意味する。すなわち、ピーク値あるいはバリイ置を検出した後、被測定物が反転移動したことを意味する。
【0031】
RESET1信号、RESET2信号、RESET3信号は、カウンタ回路、最大値最小値のラッチ回路、ミドルレンジフラグなどをすべてリセットする。すなわち、A相擬似正弦波の最大値最小値もとめるシーケンスをリセットし、最初からやり直す。また、エンコーダ装置の電源がオンされるときもリセットが働く。
【0032】
このようにして求められたA相擬似正弦波の最大値4個は、平均化回路23で平均値を求め、最小値4個は平均化回路24で平均値を求め、2つの平均値を加算回路25で加算し、除算回路26で2で除算し、A相擬似正弦波のDCオフセット値(補正値)を得る。このようにして求めたDCオフセット値(補正値)を、減算器7でA/Dコンバータ6の出力値より減じて、DCオフセットをキャンセルする。すなわち、A/Dコンバータ6の出力値をDCオフセット値で補正する。B相擬似正弦波のDCオフセット値(補正値)も同様にして求め、A/Dコンバータ9の出力値をDCオフセット値で補正する。
【0033】
以上説明した本実施の形態のエンコーダ装置は、次のような効果を奏する。
(1)特別な外付け可変抵抗器による手動調整等を必要とせずに、エンコーダ装置のアナログ擬似正弦波のDCオフセットを自動的にキャンセルすることが可能となる。その結果、細分化誤差を低減し位置検出精度の向上を図ることができる。エンコーダ装置を使用する制御系にあてはめた場合に、位置制御上の偏差低減、即ち位置制御上の特性向上に貢献する。更にAC特性に目を転ずれば、刻々と変わるエンコーダ装置の位置情報の差分は速度情報そのものである。つまりエンコーダ装置の位置精度向上は、速度制御上の偏差即ち速度ムラ(速度リップル)の抑制に貢献するという利点がうまれる。
(2)DCオフセットがキャンセルされた2相擬似正弦波が、細分化回路に入力されるので、DCオフセットが原因となる細分化誤差を確実に低減することができる。
(3)ピーク値やバリイ値を求める場合、他方の擬似正弦波が基準レベルをまたいで所定レベル1から所定レベル2へ単調増加あるいは単調減少したとき、その間に取得された極値を最大値あるいは最小値とみなしてデータを保持する。他方の擬似正弦波がゼロクロスあるいは基準レベルをクロスしたときに、そのときの値を最大値あるいは最小値とみなす場合に比べて、より正確なピーク値あるいはバリイ値を求めることができる。また、被測定物が反転移動したことによりピーク値となった場合を確実に排除することができる。すなわち、被測定物が反転せず単一方向へ移動中におけるピーク値あるいはバリイ値を確実に検出することができる。
(4)複数周期のピーク値およびバリイ値を求めた後、DCオフセット値を求めているので、より信頼性の高いDCオフセット値を求めることができる。例えば、回転ディスク3のスリットにゴミがあった場合や、傷などの不具合が発生した場合の影響を低減することができる。また、ノイズなどの外乱の影響を低減することができる。
(5)上記では、複数周期を4周期としているが、2以上の数ならどのような数であってもよい。この場合、2周期、8周期などの2のn乗の数値がより好ましい。加算や平均等の演算がやりやすいからである。
(6)複数の周期は、被測定物の反転を含まない単一方向へ移動する間に取得できる複数周期である。これにより、精度の高いDCオフセット値を求めることができる。
(7)所定の複数周期分のピーク値およびバリイ値を取得した後、A相擬似正弦波およびB相擬似正弦波を同時に、求めたDCオフセット値で補正するようにしている。これにより、あるタイミングから確実にDCオフセット値がキャンセルされた精度の高い2相の擬似正弦波を出力することができる。その結果、あるタイミングから確実に精度の高い細分化処理されて精度の高い位置情報を得ることができる。
(8)エンコーダ装置の電源をオンするごとにリセットをしているので、電源オンごとにDCオフセット値である補正値を新たに求める。これにより、エンコーダ装置の経年変化などにも確実に対応でき、精度の高い位置情報を求めることができる。
【0034】
上記実施の形態では、モータの回転位置を求めるエンコーダ装置の例を説明したが、必ずしもこの内容に限定する必要はない。直線位置を求めるエンコーダ装置であってもよい。すなわち、あらゆるエンコーダ装置に適用することができる。
【0035】
上記実施の形態では、DCオフセット検出回路8、11はASICによるロジック回路の例を説明したが、必ずしもこの内容に限定する必要はない。マイクロCPUなどを使用したものであってもよい。その場合、前述した図5の処理が、プログラムにより実行される。
【0036】
上記実施の形態では、細分化回路5として逆正接関数を利用する方法(tan−1θ方式)を採用するが、必ずしもこの内容に限定する必要はない。抵抗アレイを用いて細分化する方法やその他の方式を用いた細分化回路であってもよい。
【0037】
上記実施の形態では、種々の実施の形態および変形例を説明したが、本発明はこれらの内容に限定されるものではない。本発明の技術的思想の範囲内で考えられるその他の態様も本発明の範囲内に含まれる。
【0038】
【発明の効果】
本発明は、以上説明したように構成しているので、次のような効果を奏する。計測に使用する周期的信号において、被測定物の逆転移動によるピーク値などの検出を確実に排除し、より精度の高いピーク値あるいはバリイ値を確実に検出することができる。また、周期的信号の信頼性の高い補正値を求めることができる。例えば、回転ディスクのスリットにゴミがあった場合や、傷などの不具合が発生した場合、ノイズなどの外乱の影響などを低減することができる。
【図面の簡単な説明】
【図1】本発明の計測装置の一実施の形態を示すエンコーダ装置のブロック図である。
【図2】DCオフセットを検出する基本原理を示す図である。
【図3】DCオフセット検出のブロック図を示す図である。
【図4】エンコーダ装置がパワーONしてから、DCオフセットキャンセル機能が有効になるまでの様子と、細分化誤差との関係を示す図である。
【図5】DCオフセット検出回路の処理の流れを説明するフローチャートである。
【図6】DCオフセット検出回路の処理の流れの説明に使用するA相擬似正弦波およびB相擬似正弦波を示すグラフである。
【符号の説明】
1 発光素子
2 受光素子
3 回転ディスク
4 増幅回路
5 細分化回路
6、9 A/Dコンバータ
7、10 減算器
8、11 DCオフセット検出回路
21 ピークホールド回路
22 バリィホールド回路
23、24 平均化回路
25 加算回路
26 除算回路
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a measuring device such as an encoder device.
[0002]
[Prior art]
2. Description of the Related Art As a measuring device for detecting a displacement of a motor, an optical encoder device using a light emitting element, a light receiving element, and a rotating disk provided therebetween is known. A minute slit is formed in the rotating disk to transmit or block light when a positional displacement occurs. This change in light is detected by the light receiving element, and the positional displacement is detected. The output of the light receiving element is amplified by an amplifier circuit to obtain a well-known pseudo sine wave having a phase difference of 90 degrees.
[0003]
The amplified two-phase pseudo sine wave signal is further divided into one wavelength of the sine wave by a subdivision circuit (interpolation circuit) to obtain finer position information. Several methods are known for the subdivision method. A subdivision method is performed by providing a phase difference using a resistance array (resistance division method), or an arctangent function is used using an A / D converter. How to do (tan -1 θ method) is widely known. According to these methods, higher-resolution position information segmented than one wavelength of the pseudo sine wave is obtained.
[0004]
At this time, the two-phase pseudo sine wave (A-phase signal, B-phase signal) may have a DC offset due to a mechanical error of the detection system, an electrical offset of the electrical amplification circuit itself, and the like. is there. On the other hand, the method of achieving high resolution by subdividing one wavelength is based on the premise that a pseudo sine wave (A-phase signal, B-phase signal) is theoretically an ideal sine wave and cosine wave. Perform processing. For example, the signals of the A phase and the B phase can be regarded as sin θ and cos θ, and tan θ can be obtained by performing the division of (sin θ) θ (cos θ). Based on the division result (quotient), θ = tan -1 (Quotient) is converted to obtain θ corresponding to the position information.
[0005]
Here, when an offset occurs in sin θ and cos θ as the basis of the division, the result of obtaining the inverse trigonometric function is a result having an error from the accurate θ. That is, a position error of the subdivided position information is caused, and the accuracy of the position information is reduced. This decrease in precision results in a significant decrease in performance as a position sensor or measuring instrument. In order to compensate for such a drawback, an adjustment means such as a variable resistor is provided in the circuit while monitoring the voltage waveform of the pseudo sine wave with an oscilloscope or the like, so that a human can manually adjust the offset with a gap between the hands to prevent a decrease in accuracy. That was being done. However, these methods have a problem that a special circuit has to be provided and a human has to perform a fine adjustment with a gap between hands.
[0006]
Therefore, the inventor of the present application has devised a method of detecting a peak value and a barrier value of a pseudo sine wave, calculating an average value for each period, and correcting the pseudo sine wave (for example, see Patent Document 1). In addition, every time the phase A of the pseudo sine wave crosses a certain level, the value of the phase B is sampled, and the phase B is corrected based on the value. Similarly, a method has been devised in which the value of the A phase is sampled each time the B phase crosses a certain level, and the A phase is corrected based on the value (for example, see Patent Document 2).
[0007]
[Patent Document 1]
JP-A-6-26882
[Patent Document 2]
JP-A-6-34392
[Problems to be solved by the invention]
However, the above-described method has a problem in that it is not always possible to obtain a highly accurate peak value or a barrier value, or a highly accurate correction value.
[0008]
The present invention provides a measuring device for obtaining a highly accurate peak value, a barrier value, and a highly accurate correction value.
[0009]
[Means for Solving the Problems]
The invention according to claim 1 uses a first periodic signal and a second periodic signal having substantially the same phase and having a phase difference of substantially 90 degrees detected with the movement of an object to be measured. Signal acquisition means for acquiring a first periodic signal and a second periodic signal, the signal acquisition means being adapted to detect a peak value of the first periodic signal, and obtaining the second periodic signal. When the first periodic signal monotonically increases or monotonically decreases from the first predetermined value to the second predetermined value across the predetermined reference level of the second periodic signal, the peak value of the first periodic signal acquired during that time is calculated as Peak value detection means for detecting as a peak value when the device under test is moving in a single direction.
The invention according to claim 2 uses a first periodic signal and a second periodic signal which have a phase difference of substantially 90 degrees and have the same period, which are detected as the object to be measured is moved. A first correction value detecting means for obtaining a first correction value of the first periodic signal, and a first correction value detecting means for obtaining a first correction value of the first periodic signal. First correction means for correcting the second periodic signal, second correction value detecting means for obtaining a second correction value of the second periodic signal, and a second period based on the second correction value obtained. Correction means for correcting the static signal, and position information of the device under test subdivided by performing subdivision processing based on the corrected first periodic signal and the corrected second periodic signal. And a first correction value detecting means, wherein the second correction signal is a predetermined value of the second correction signal. When monotonically increasing between a first predetermined value and a second predetermined value across a quasi-level, one of a peak value and a bary value of the first periodic signal during the increase is obtained, and the first predetermined value is obtained. And when the value decreases monotonically between the second predetermined value and the other, the other of the peak value or the bary value of the first periodic signal is obtained, and based on the obtained peak value and the bary value of the first periodic signal, The first correction value is obtained, and the second correction value detecting means determines whether the first periodic signal has a third predetermined value and a fourth predetermined value that cross a predetermined reference level of the first periodic signal. When the value increases monotonically between the first and second predetermined values, one of the peak value and the bary value of the second periodic signal is acquired, and when the value monotonically decreases between the third predetermined value and the fourth predetermined value, the second value during the second period increases. The other of the peak value and the bary value of the periodic signal is acquired, and the acquired second It is characterized in that for obtaining a second correction value based on the peak value and Barii value signal.
The invention according to claim 3 uses a first periodic signal and a second periodic signal having a phase difference of substantially 90 degrees and having the same period detected with the movement of the object to be measured. A first correction value detecting means for obtaining a first correction value of the first periodic signal, and a first correction value detecting means for obtaining a first correction value of the first periodic signal. First correction means for correcting the second periodic signal, second correction value detecting means for obtaining a second correction value of the second periodic signal, and a second period based on the second correction value obtained. Correction means for correcting the static signal, and position information of the device under test subdivided by performing subdivision processing based on the corrected first periodic signal and the corrected second periodic signal. And a first correction value detecting means for detecting at least two rounds during the movement of the device under test in a single direction. A first correction value based on the obtained peak value and the validity value of the first periodic signal, and outputs the calculated first correction value to the first correction means. The second correction value detection means acquires the peak value and the bary value for at least two cycles in synchronization with the first periodic signal while the device under test is moving in the single direction, and A second correction value is obtained based on a peak value and a bary value of the second periodic signal, and the obtained second correction value is output to a second correction unit.
According to a fourth aspect of the present invention, in the measuring device according to the third aspect, the first correction value detecting means does not output the first correction value until the peak value and the bary value for at least two cycles are obtained. Outputting a value of zero, and wherein the second correction value detecting means does not output the second correction value or outputs the zero correction value until the peak value and the barrier value for at least two cycles are obtained. Things.
According to a fifth aspect of the present invention, in the measuring device according to any one of the third to fourth aspects, at least two cycles are the number of cycles of a power of two. According to a sixth aspect of the present invention, in the measuring device according to any one of the third to fifth aspects, at least two cycles are counted by turning on the power to the measuring device.
[0010]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 is a block diagram of an encoder device showing an embodiment of the measuring device of the present invention. The encoder device is attached to a motor or the like and detects a rotational position displacement of the motor. The motor to which the encoder device is attached is used, for example, in a robot. A rotating disk 3 is provided between the light emitting element 1 and the light receiving element 2, and the rotating disk 3 rotates with the rotation of the rotating shaft of the motor. A minute slit is formed in the rotating disk 3 to transmit or block light when a positional displacement occurs. This change in light is detected by the light receiving element 2 to detect the position displacement. The output of the light receiving element 2 is amplified by the amplifier circuit 4 and outputs a known two-phase pseudo sine wave (A phase / B phase). The phases of the A-phase pseudo sine wave and the B-phase pseudo sine wave are shifted by 90 degrees.
[0011]
In the present embodiment, the amplified two-phase pseudo sine wave signal is finely divided by the subdivision circuit (interpolation circuit) 5 into one wavelength of the sine wave to obtain more precise position information. Several methods are known as a subdivision method. A subdivision method is performed by providing a phase difference using a resistance array (resistance division method), or a method using an arctangent function using an A / D converter. (Tan -1 θ method) is widely known. According to these methods, higher-resolution position information segmented than one wavelength of the pseudo sine wave is obtained. In the present embodiment, a method using an arctangent function (tan -1 θ method).
[0012]
The A-phase pseudo sine wave has a DC offset due to various factors as described in the related art section. The A-phase pseudo sine wave is input to the A / D converter 6 while having a DC offset. One of the outputs (n bits, n: natural number) of the A / D converter 6 is input to the subtracter 7 and the other is input to the DC offset detection circuit 8. Similarly, the B-phase pseudo sine wave is input to the A / D converter 9 while having a DC offset. One of the outputs (n bits, n: natural number) of the A / D converter 9 is input to the subtracter 10 and the other is input to the DC offset detection circuit 11.
[0013]
Immediately after the power of the encoder device is turned on, the outputs of the offset detection circuits 8 and 11 hold zero due to the initial reset operation. Therefore, at this time, “zero” is subtracted from the original two-phase pseudo sine wave. That is, the data is transmitted to the subsequent subdivision circuit 5 without any data transmission. Next, after a position displacement equal to or more than a certain specified value occurs, the DC offset detection circuits 8 and 11 automatically calculate the DC offsets of the A-phase pseudo sine wave and the B-phase pseudo sine wave, respectively, by an operation described later. After the DC offset is determined for both the A-phase pseudo sine wave and the B-phase pseudo sine wave, the outputs of the DC offset detection circuits 8 and 11 are simultaneously changed from zero. As a result, the outputs of the two subtracters 7 and 10 have a value obtained by removing the DC offset of the original two-phase pseudo sine wave.
[0014]
The subdivision circuit 5 performs subdivision processing based on the two-phase pseudo sine wave from which the DC offset has been removed. In the subdivision processing, the A-phase pseudo sine wave and the B-phase pseudo sine wave are regarded as sin θ and cos θ, and tan θ is obtained by dividing (sin θ) ÷ (cos θ). That is, the correct sin θ and cos θ from which the DC offset has been canceled are input to the subdivision circuit 5, and the subdivision error is reduced. Based on the division result (quotient), θ = tan -1 (Quotient) is converted to obtain θ corresponding to the subdivided position information. The resolution specified for the encoder device determines how finely (sin θ) ÷ (cos θ) is calculated.
[0015]
FIG. 2 is a diagram illustrating a basic principle of detecting a DC offset. It is assumed that the pseudo sine wave has a DC offset in the plus potential direction with respect to the reference potential (reference level) as shown in the figure. Here, if a position displacement of one wavelength or more in a single direction occurs, the peak value and the valley value (valley value) can be treated as the maximum value and the minimum value, respectively. Therefore, by dividing the sum of the peak and the bary by 2, it is possible to approximately obtain the DC offset by a simple arithmetic processing.
[0016]
FIG. 3 is a diagram showing a block diagram of DC offset detection. In the figure, a DC offset detection circuit 8 including only the A-phase pseudo sine wave is shown. Since the DC offset circuit 11 of the B-phase pseudo sine wave has the same configuration, the description is omitted. The A-phase pseudo sine wave having a DC offset is A / D converted by the A / D converter 6. The A / D-converted digital data (n bits) is transmitted to a peak hold circuit 21 and a valid hold circuit 22, where it is constantly monitored. Here, only when a positional displacement in a single direction occurs, the maximum value and the minimum value are obtained, for example, four times by the peak hold function and the variable hold function. These four maximum values and minimum values are averaged and output by averaging circuits 23 and 24 at the subsequent stage, respectively. By averaging, a more stable and reliable maximum value and minimum value are obtained.
[0017]
The averaged maximum value (the average value of the peak values) and the minimum value (the average value of the bary values) are added by the addition circuit 25 at the subsequent stage, and then divided by 2 in the division circuit 26 at the subsequent stage. As described above with reference to FIG. 2, the result (quotient) obtained by dividing by 2 can be approximately treated as a DC offset. That is, the DC offset value 27 is obtained at this point.
[0018]
FIG. 4 is a diagram illustrating a relationship between a state from when the power of the encoder device is turned on to a time when the DC offset cancel function is enabled and a segmentation error. This shows a state where the displacement of the device under test in a single direction continues, the peak hold and the valley hold are each held four times, and then the DC offset is canceled and the segmentation error is reduced. After the offset cancel operation is started at the timing of the reference numeral 28 and the offset removing function becomes effective, high-precision segmentation is performed.
[0019]
Next, an algorithm for obtaining and canceling (correcting) a DC offset value will be described in detail with reference to FIGS. FIG. 5 is a flowchart illustrating the flow of the process. The DC offset detection circuits 8 and 11 are realized by ASICs, and are all configured by logic circuits. FIG. 5 is a flowchart illustrating the flow of the processing of the logic circuit. FIG. 6 is a graph showing an A-phase pseudo sine wave and a B-phase pseudo sine wave used in the following description.
[0020]
First, an outline will be described. The other of the A-phase pseudo sine wave and the B-phase pseudo sine wave monotonically increases or monotonically decreases near the center value (reference level, 1.0 V), and the other pseudo sine wave of the target is level 1 ( When an extreme value is taken at 1.3 V or more or at level 2 (0.7 V) or less, the extreme value is regarded as the maximum value or the minimum value, and the data is held. If this condition is not met, the data will not be officially adopted. This is performed until the device under test moves in a single direction and the A-phase pseudo sine wave and the B-phase pseudo sine wave can be detected for four periods. That is, the process is performed until four maximum values and four minimum values can be obtained. An average value of each of the held maximum value and minimum value totals is obtained, added, and divided by 2 to obtain a DC offset value (correction value).
[0021]
The DC offset value (initial value of zero) of each phase of the A-phase pseudo-sine wave and the B-phase pseudo-sine wave thus obtained is subtracted from the output values of the A / D converters 6 and 9 to cancel the DC offset. That is, the output values of the A / D converters 6 and 9 are corrected with the DC offset value. When data to be adopted forever cannot be acquired, the offset canceller does not operate. That is, the offset values output from the DC offset detection circuits 8 and 11 remain at the initial value of zero. In this case, some abnormality is considered, and this abnormality is reflected in the phase plane error.
[0022]
The flowchart in FIG. 5 shows a case where the maximum value and the minimum value (peak value, bary value) of the A-phase pseudo sine wave are obtained. The same applies to the case where the maximum value and the minimum value (peak value, bary value) of the B-phase pseudo sine wave are obtained. 1.0V ± 0.3V near the reference level is the middle range, the range from 1.3V to 2.0V is the maximum value range, and the range from 0.7V to 0V is the minimum value range.
[0023]
First, in step S1 of STATE: 0, it is determined whether or not the B-phase pseudo sine wave is out of the middle range. If it is off, the process proceeds to step S2 of STATE: 1. If it is not off, it stays at step S1 and waits until it comes off. In step S2, it is determined whether the B-phase pseudo sine wave is within the middle range and the A-phase pseudo sine wave is outside the middle range. That is, in step S2, it is determined whether or not the B-phase pseudo sine wave has entered the middle range from outside the middle range in FIG.
[0024]
If it is determined in step S2 that the B-phase pseudo sine wave is within the middle range and the A-phase pseudo sine wave is outside the middle range, the process proceeds to step S3 of STATE: 2. If a negative determination is made that the B-phase pseudo sine wave is in the middle range and the A-phase pseudo sine wave is out of the middle range, the process waits until the determination becomes affirmative. In step S3, the value of the A-phase pseudo sine wave is set as the initial value of the peak value, and the middle range flag is set for the B-phase pseudo sine wave. The middle range flag sets a flag of-when the B-phase pseudo sine wave has a value lower than the reference level, and sets a + flag when the value is higher than the reference level.
[0025]
In step S4 of STATE: 3, the peak hold of the A-phase pseudo sine wave is started. That is, if the value of the A-phase pseudo sine wave increases, it is always updated with a new value, and if it decreases, the previous value is held. In step S5, it is determined whether or not the B-phase pseudo sine wave has crossed the reference level. If it is determined that the reference level has been crossed, the process proceeds to step S6 of STATE: 4, and exits from STATE: 3.
[0026]
In step S6, it is determined whether or not the B-phase pseudo sine wave monotonically increases or monotonically decreases and exits the middle range from the side opposite to the + side or the-side set in the middle range flag. If it is determined that it has come out, the process proceeds to step S7 of STATE: 5. If it is determined that it has not come out yet, it waits until it stops at step S6. When obtaining the peak value, the range of the A-phase pseudo sine wave between STATE: 2 and STATE: 4 is the maximum value adoption range. When obtaining the barrier value, the range of the A-phase pseudo sine wave of STATE: 2 to STATE: 4 is the minimum value adoption range.
[0027]
In step S7, the peak hold (including the hold of the barrier value) of the A-phase pseudo sine wave is ended, and the peak value or barrier value is latched. The middle range flag of the B-phase pseudo sine wave is reset, and the counter is incremented. This counter is incremented every time the peak value and the barrier value of the A-phase pseudo sine wave are obtained. In step S8, it is determined whether the counter value has reached 8. If it is determined that the count has not yet been counted up to 8, the process is repeated from step S1 of STATE: 0. If it is determined that the counter value has reached 8, the processing is terminated. When the processing is completed, the maximum value and the minimum value of the A-phase pseudo sine wave are obtained four by eight, that is, a total of eight values are held in the latch circuit.
[0028]
On the other hand, in STATE: 3, the AND circuit 31 takes an AND (product) of the STATE: 3 and the B-phase pseudo sine wave inversion area outside signal 32 to generate a RESET1 signal. The B-phase pseudo sine wave inversion area outside signal 32 monitors the B-phase pseudo sine wave, and the B-phase pseudo sine wave leaves the middle range from the same side as the + side or the − side set in the middle range flag. This signal is set in the case. In other words, this is the case where the B-phase pseudo sine wave exits on the same side as the one entering the middle range before crossing the reference level. This means that the movement of the object to be measured is reversed before the B-phase pseudo sine wave crosses the reference level. At this time, a RESET1 signal is generated, and the process returns to step S1 of STATE: 0.
[0029]
Also, in STATE: 4, the AND circuit 33 takes an AND (product) of the STATE: 4 and the B-phase pseudo sine wave inversion area out-of-range signal 32 to generate a RESET2 signal. In this case, the B-phase pseudo sine wave does not escape from one side of the middle range to the other side while increasing or decreasing monotonously, and exits on the same side as the side that entered the middle range. This means that the movement of the object to be measured has been reversed before the B-phase pseudo sine wave crossed the reference level and passed through the middle range. At this time, a RESET2 signal is generated, and the process returns to step S1 of STATE: 0.
[0030]
At STATE: 5, the XNOR circuit 34 calculates the XOR (negation of exclusive OR) of the peak value or bary value sign 35 of the previously obtained A-phase pseudo sine wave and the currently obtained peak value or bary value sign 36 at the XNOR circuit 34. take. If the codes match, a RESET3 signal is generated. If the codes do not match, no RESET3 signal is generated. The sign referred to here is a plus sign when the peak value is larger than the reference level, and a minus sign when the bary value is smaller than the reference level. If the signs do not match, it means that the device under test is moving in a single direction. If the signs match, it means that the peak value was detected this time in the case of the previous peak value, and that the validity value was also detected this time in the case of the previous valid position. In other words, it means that the measured object has reversed and moved after detecting the peak value or the bary position.
[0031]
The RESET1, RESET2, and RESET3 signals all reset the counter circuit, the maximum and minimum value latch circuits, the middle range flag, and the like. That is, the sequence for determining the maximum value and the minimum value of the A-phase pseudo sine wave is reset, and the process is restarted from the beginning. The reset also operates when the power of the encoder device is turned on.
[0032]
The four maximum values of the A-phase pseudo sine wave thus obtained are averaged by the averaging circuit 23, and the four minimum values are averaged by the averaging circuit 24 to add the two average values. The addition is performed by the circuit 25 and the division is performed by 2 in the division circuit 26 to obtain a DC offset value (correction value) of the A-phase pseudo sine wave. The DC offset value (correction value) obtained in this way is subtracted by the subtractor 7 from the output value of the A / D converter 6 to cancel the DC offset. That is, the output value of the A / D converter 6 is corrected with the DC offset value. The DC offset value (correction value) of the B-phase pseudo sine wave is similarly obtained, and the output value of the A / D converter 9 is corrected with the DC offset value.
[0033]
The encoder device according to the present embodiment described above has the following effects.
(1) It is possible to automatically cancel the DC offset of the analog pseudo sine wave of the encoder device without requiring manual adjustment by a special external variable resistor. As a result, it is possible to reduce the segmentation error and improve the position detection accuracy. When applied to a control system using an encoder device, it contributes to reduction of deviation in position control, that is, improvement of characteristics in position control. Further turning to the AC characteristics, the difference between the position information of the encoder device that changes every moment is the speed information itself. In other words, there is an advantage that the improvement in the position accuracy of the encoder device contributes to suppression of deviation in speed control, that is, speed unevenness (speed ripple).
(2) Since the two-phase pseudo sine wave from which the DC offset has been canceled is input to the subdivision circuit, the subdivision error caused by the DC offset can be reliably reduced.
(3) When calculating the peak value or the barrier value, when the other pseudo sine wave monotonically increases or decreases from the predetermined level 1 to the predetermined level 2 across the reference level, the extreme value acquired during that time is set to the maximum value or Data is held assuming the minimum value. When the other pseudo sine wave crosses the zero cross or the reference level, a more accurate peak value or a valid value can be obtained as compared with a case where the value at that time is regarded as a maximum value or a minimum value. Further, it is possible to reliably eliminate the case where the measured object reaches the peak value due to the reversal movement. That is, it is possible to reliably detect the peak value or the barrier value when the device under test is moving in a single direction without being inverted.
(4) Since the DC offset value is obtained after obtaining the peak value and the barrier value in a plurality of cycles, a more reliable DC offset value can be obtained. For example, it is possible to reduce the influence of a case where dust is present in the slit of the rotating disk 3 or a case where a defect such as a scratch occurs. Further, the influence of disturbance such as noise can be reduced.
(5) In the above description, the plurality of cycles is four, but any number of two or more may be used. In this case, a value of 2 to the power of n such as two periods or eight periods is more preferable. This is because calculations such as addition and averaging are easy to do.
(6) The plurality of periods are a plurality of periods that can be acquired while the device under test moves in a single direction that does not include inversion. As a result, a highly accurate DC offset value can be obtained.
(7) After acquiring the peak value and the barrier value for a plurality of predetermined periods, the A-phase pseudo sine wave and the B-phase pseudo sine wave are simultaneously corrected with the obtained DC offset value. As a result, it is possible to output a highly accurate two-phase pseudo sine wave in which the DC offset value is surely canceled from a certain timing. As a result, highly accurate segmentation processing is reliably performed from a certain timing, and highly accurate position information can be obtained.
(8) Since the reset is performed every time the power of the encoder device is turned on, a correction value that is a DC offset value is newly obtained each time the power is turned on. As a result, it is possible to reliably cope with the aging of the encoder device, and to obtain highly accurate position information.
[0034]
In the above-described embodiment, an example of the encoder device that determines the rotational position of the motor has been described. However, the present invention is not necessarily limited to this. An encoder device for obtaining a linear position may be used. That is, it can be applied to any encoder device.
[0035]
In the above embodiment, the DC offset detection circuits 8 and 11 have been described as examples of the logic circuit using the ASIC, but it is not necessarily limited to this content. It may use a micro CPU or the like. In that case, the above-described processing of FIG. 5 is executed by a program.
[0036]
In the above embodiment, the method (tan) using the arctangent function as the subdivision circuit 5 -1 θ method), but it is not necessarily limited to this content. A subdivision circuit using a method of subdivision using a resistor array or another method may be used.
[0037]
In the above embodiments, various embodiments and modified examples have been described, but the present invention is not limited to these contents. Other embodiments that can be considered within the scope of the technical idea of the present invention are also included in the scope of the present invention.
[0038]
【The invention's effect】
Since the present invention is configured as described above, it has the following effects. In a periodic signal used for measurement, detection of a peak value or the like due to reverse movement of the device under test is reliably excluded, and a more accurate peak value or barrier value can be reliably detected. Further, a highly reliable correction value of the periodic signal can be obtained. For example, when dust is present in the slit of the rotating disk or when a defect such as a scratch occurs, the influence of disturbance such as noise can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram of an encoder device showing one embodiment of a measuring device of the present invention.
FIG. 2 is a diagram illustrating a basic principle of detecting a DC offset.
FIG. 3 is a diagram showing a block diagram of DC offset detection.
FIG. 4 is a diagram illustrating a relationship between a state from when the encoder device is powered on until a DC offset cancel function is enabled and a segmentation error.
FIG. 5 is a flowchart illustrating a processing flow of a DC offset detection circuit.
FIG. 6 is a graph showing an A-phase pseudo sine wave and a B-phase pseudo sine wave used for describing the flow of processing of the DC offset detection circuit.
[Explanation of symbols]
1 Light-emitting element
2 Light receiving element
3 rotating disc
4 Amplifier circuit
5 Subdivision circuit
6, 9 A / D converter
7, 10 Subtractor
8,11 DC offset detection circuit
21 Peak hold circuit
22 Bali Hold Circuit
23, 24 Averaging circuit
25 Addition circuit
26 Division circuit

Claims (6)

被測定物の移動に伴って検出された実質的に90度の位相差を有し同一周期を有する第1の周期的信号と第2の周期的信号とを使用して前記第1の周期的信号のピーク値を検出する計測装置において、
前記第1の周期的信号と前記第2の周期的信号を取得する信号取得手段と、
前記取得された第2の周期的信号が、前記第2の周期的信号の所定の基準レベルをまたいで第1の所定値から第2の所定値へ単調増加あるいは単調減少したとき、その間に取得された第1の周期的信号のピーク値を前記被測定物が単一方向へ移動中におけるピーク値として検出するピーク値検出手段とを備えることを特徴とする計測装置。
The first periodic signal and the second periodic signal having a phase difference of substantially 90 degrees and having the same period detected along with the movement of the device under test are used for the first periodic signal. In a measuring device that detects the peak value of a signal,
Signal acquisition means for acquiring the first periodic signal and the second periodic signal;
When the acquired second periodic signal monotonically increases or decreases from a first predetermined value to a second predetermined value across a predetermined reference level of the second periodic signal, A peak value detecting means for detecting a peak value of the first periodic signal obtained as a peak value while the device under test is moving in a single direction.
被測定物の移動に伴って検出された実質的に90度の位相差を有し同一周期を有する第1の周期的信号と第2の周期的信号とを使用して被測定物の位置情報を取得する計測装置において、
前記第1の周期的信号の第1の補正値を求める第1の補正値検出手段と、
前記求めた第1の補正値に基づき前記第1の周期的信号を補正する第1の補正手段と、
前記第2の周期的信号の第2の補正値を求める第2の補正値検出手段と、
前記求めた第2の補正値に基づき前記第2の周期的信号を補正する第2の補正手段と、
前記補正された第1の周期的信号と前記補正された第2の周期的信号に基づき、細分化処理を行って細分化された前記被測定物の位置情報を取得する細分化処理手段とを備え、
前記第1の補正値検出手段は、前記第2の周期的信号が、前記第2の周期的信号の所定の基準レベルをまたいだ第1の所定値と第2の所定値間で単調増加したとき、その間の第1の周期的信号のピーク値あるいはバリイ値の一方を取得し、また、前記第1の所定値と前記第2の所定値間で単調減少したとき、その間の第1の周期的信号のピーク値あるいはバリイ値の他方を取得し、該取得した第1の周期的信号のピーク値およびバリイ値に基づき前記第1の補正値を求め、
前記第2の補正値検出手段は、前記第1の周期的信号が、前記第1の周期的信号の所定の基準レベルをまたいだ第3の所定値と第4の所定値間で単調増加したとき、その間の第2の周期的信号のピーク値あるいはバリイ値の一方を取得し、前記第3の所定値と第4の所定値間で単調減少したとき、その間の第2の周期的信号のピーク値あるいはバリイ値の他方を取得し、該取得した第2の周期的信号のピーク値およびバリイ値に基づき前記第2の補正値を求めることを特徴とする計測装置。
Position information of the device under test using the first and second periodic signals having a phase difference of substantially 90 degrees and having the same period detected as the device under test moves. In a measuring device that acquires
First correction value detection means for obtaining a first correction value of the first periodic signal;
First correction means for correcting the first periodic signal based on the obtained first correction value;
Second correction value detection means for obtaining a second correction value of the second periodic signal;
A second correction unit that corrects the second periodic signal based on the obtained second correction value;
Based on the corrected first periodic signal and the corrected second periodic signal, performing subdivision processing to obtain subdivided position information of the DUT. Prepare,
The first correction value detection means may be configured such that the second periodic signal monotonically increases between a first predetermined value and a second predetermined value across a predetermined reference level of the second periodic signal. When one of the peak value and the bary value of the first periodic signal during that period is obtained, and when the value monotonously decreases between the first predetermined value and the second predetermined value, the first period during the period is obtained. Obtaining the other of the peak value or the bary value of the target signal, obtaining the first correction value based on the obtained peak value and the bary value of the first periodic signal,
The second correction value detecting means may be configured such that the first periodic signal monotonically increases between a third predetermined value and a fourth predetermined value across a predetermined reference level of the first periodic signal. At this time, one of the peak value or the bary value of the second periodic signal during that time is obtained, and when the value monotonically decreases between the third predetermined value and the fourth predetermined value, the second periodic signal during that time is obtained. A measuring apparatus for acquiring the other of the peak value and the bary value, and obtaining the second correction value based on the obtained peak value and the bary value of the second periodic signal.
被測定物の移動に伴って検出された実質的に90度の位相差を有し同一周期を有する第1の周期的信号と第2の周期的信号とを使用して被測定物の位置情報を取得する計測装置において、
前記第1の周期的信号の第1の補正値を求める第1の補正値検出手段と、
前記求めた第1の補正値に基づき前記第1の周期的信号を補正する第1の補正手段と、
前記第2の周期的信号の第2の補正値を求める第2の補正値検出手段と、
前記求めた第2の補正値に基づき前記第2の周期的信号を補正する第2の補正手段と、
前記補正された第1の周期的信号と前記補正された第2の周期的信号に基づき、細分化処理を行って細分化された前記被測定物の位置情報を取得する細分化処理手段とを備え、
前記第1の補正値検出手段は、前記被測定物が単一方向への移動中に少なくとも2周期分のピーク値およびバリイ値を取得し、前記取得した第1の周期的信号のピーク値およびバリイ値に基づき前記第1の補正値を求め、前記求めた第1の補正値を前記第1の補正手段に出力し、
前記第2の補正値検出手段は、前記被測定物が前記単一方向への移動中に前記第1の周期的信号と同期して前記少なくとも2周期分のピーク値およびバリイ値を取得し、前記取得した第2の周期的信号のピーク値およびバリイ値に基づき前記第2の補正値を求め、前記求めた第2の補正値を前記第2の補正手段に出力することを特徴とする計測装置。
Position information of the device under test using the first and second periodic signals having a phase difference of substantially 90 degrees and having the same period detected as the device under test moves. In a measuring device that acquires
First correction value detection means for obtaining a first correction value of the first periodic signal;
First correction means for correcting the first periodic signal based on the obtained first correction value;
Second correction value detection means for obtaining a second correction value of the second periodic signal;
A second correction unit that corrects the second periodic signal based on the obtained second correction value;
Based on the corrected first periodic signal and the corrected second periodic signal, performing subdivision processing to obtain subdivided position information of the DUT. Prepare,
The first correction value detection means acquires the peak value and the bary value for at least two cycles while the device under test is moving in a single direction, and acquires the peak value and the peak value of the acquired first periodic signal. Calculating the first correction value based on the bary value, outputting the obtained first correction value to the first correction unit,
The second correction value detection means acquires the peak value and the bary value of the at least two cycles in synchronization with the first periodic signal while the device under test moves in the single direction, Measuring the second correction value based on the peak value and the bary value of the obtained second periodic signal, and outputting the obtained second correction value to the second correction unit; apparatus.
請求項3記載の計測装置において、
前記第1の補正値検出手段は、前記少なくとも2周期分のピーク値およびバリイ値を取得するまで、前記第1の補正値を出力しないか補正値ゼロを出力し、
前記第2の補正値検出手段は、前記少なくとも2周期分のピーク値およびバリイ値を取得するまで、前記第2の補正値を出力しないか補正値ゼロを出力することを特徴とする計測装置。
The measuring device according to claim 3,
The first correction value detection means does not output the first correction value or outputs a zero correction value until the peak value and the bary value for at least two cycles are obtained,
The measurement apparatus according to claim 2, wherein the second correction value detecting means does not output the second correction value or outputs zero correction value until the peak value and the barrier value for at least two cycles are obtained.
請求項3〜4のいずれか1項記載の計測装置において、
前記少なくとも2周期分は、2の累乗分の周期数であることを特徴とする計測装置。
The measuring device according to any one of claims 3 to 4,
The measurement device according to claim 1, wherein the at least two cycles are cycles of a power of two.
請求項3〜5のいずれか1項記載の計測装置において、
前記少なくとも2周期分は、前記計測装置の電源オンよりカウントすることを特徴とする計測装置。
The measuring device according to any one of claims 3 to 5,
The measuring device is characterized in that the counting for at least two cycles is performed when the power of the measuring device is turned on.
JP2003110807A 2003-04-15 2003-04-15 Measuring device Expired - Lifetime JP4109149B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003110807A JP4109149B2 (en) 2003-04-15 2003-04-15 Measuring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003110807A JP4109149B2 (en) 2003-04-15 2003-04-15 Measuring device

Publications (2)

Publication Number Publication Date
JP2004317262A true JP2004317262A (en) 2004-11-11
JP4109149B2 JP4109149B2 (en) 2008-07-02

Family

ID=33471559

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003110807A Expired - Lifetime JP4109149B2 (en) 2003-04-15 2003-04-15 Measuring device

Country Status (1)

Country Link
JP (1) JP4109149B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012189350A (en) * 2011-03-09 2012-10-04 Hamamatsu Koden Kk Encoder device and correction method for encoder device
JP2013181982A (en) * 2012-03-01 2013-09-12 Avago Technologies General Ip (Singapore) Private Ltd Optical encoder having led current adjustment system
CN106323220A (en) * 2016-08-09 2017-01-11 北京智联安科技有限公司 Method for eliminating direct-current offset of angular displacement sensor
JP2020034392A (en) * 2018-08-29 2020-03-05 富士電機株式会社 Encoder, processing device, and processing method
JPWO2023286521A1 (en) * 2021-07-14 2023-01-19

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012189350A (en) * 2011-03-09 2012-10-04 Hamamatsu Koden Kk Encoder device and correction method for encoder device
JP2013181982A (en) * 2012-03-01 2013-09-12 Avago Technologies General Ip (Singapore) Private Ltd Optical encoder having led current adjustment system
CN106323220A (en) * 2016-08-09 2017-01-11 北京智联安科技有限公司 Method for eliminating direct-current offset of angular displacement sensor
JP2020034392A (en) * 2018-08-29 2020-03-05 富士電機株式会社 Encoder, processing device, and processing method
JPWO2023286521A1 (en) * 2021-07-14 2023-01-19

Also Published As

Publication number Publication date
JP4109149B2 (en) 2008-07-02

Similar Documents

Publication Publication Date Title
US10775200B2 (en) Rotary encoder and absolute angular position detection method thereof
CN110940371B (en) Calibration method, device and equipment of rotary magnetoelectric encoder
US9255817B2 (en) Rotation-angle detection device, image processing apparatus, and rotation-angle detection method
JP3772121B2 (en) Encoder signal processing device
KR102502508B1 (en) Correction table generating apparatus, encoder, and correction table generating method
JP4768248B2 (en) Encoder output signal correction apparatus and method
TWI564548B (en) Method for self-calibrating a rotary encoder
JP5058334B2 (en) Rotation angle detector
US9423281B2 (en) Self-calibrating single track absolute rotary encoder
CN100582676C (en) Correction circuit for encoder signal
JP2004177154A (en) Rotation angle detector
JP2014025871A (en) Encoder output signal correction apparatus
JP7000263B2 (en) Initial setting method and initial setting device
JP2008304249A (en) Encoder signal processing apparatus and signal processing method thereof
JP4109149B2 (en) Measuring device
JP7240387B2 (en) angle detector
WO2007055092A1 (en) Encoder signal processing device
JPH06147922A (en) Displacement measuring device
JP4794509B2 (en) Device for detecting the rotational position of a rotating body using a resolver
JP2004333156A (en) Encoder signal interpolation divider
JP5162739B2 (en) Encoder signal processing method, encoder device, and servo motor
KR20180114743A (en) Absolute encoder, method for generating look-up table of sinusoidal wave, and method for detecting absolute angle using the same
CN109844462B (en) Pulse conversion device and pulse conversion method for incremental encoder
JP7646372B2 (en) Method, program, information processing device, and system for calculating position or angle of test object
JP2001296142A (en) Rotary position detector and rotational speed detector

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051108

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071225

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080221

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: 20080318

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080403

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

Free format text: PAYMENT UNTIL: 20110411

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4109149

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110411

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

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

Free format text: PAYMENT UNTIL: 20110411

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20140411

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140411

Year of fee payment: 6

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

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

Free format text: PAYMENT UNTIL: 20140411

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term