JP7737186B1 - Absolute position detection device and absolute position detection method - Google Patents
Absolute position detection device and absolute position detection methodInfo
- Publication number
- JP7737186B1 JP7737186B1 JP2025014059A JP2025014059A JP7737186B1 JP 7737186 B1 JP7737186 B1 JP 7737186B1 JP 2025014059 A JP2025014059 A JP 2025014059A JP 2025014059 A JP2025014059 A JP 2025014059A JP 7737186 B1 JP7737186 B1 JP 7737186B1
- Authority
- JP
- Japan
- Prior art keywords
- detection
- group
- element group
- detector
- code
- 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.)
- Active
Links
Landscapes
- Transmission And Conversion Of Sensor Element Output (AREA)
Abstract
【課題】1本の非繰り返しコードパターンからなる着磁パターンを有する磁気スケールのみを使用して、高分解能な絶対位置を検出する。
【解決手段】絶対位置検出装置は、非繰り返しコードパターンからなる着磁パターンを記録した1本の磁気トラックを有する磁気スケールと検出装置とを備えている。検出装置は、磁気スケールに対向配置したそれぞれ複数の検出素子をからなる2組の検出素子群を有し、着磁パターンから得られた磁気スケールのコード情報に基づくコード区間位置に対応したコード区間位置算出値を算出するとともに、2組の検出素子群から選択した複数の検出素子対における各検出素子の検出値の差分値を用いて磁気スケールの区間内挿値を算出し、コード区間位置算出値と区間内挿値とから磁気スケールの全長にわたる絶対位置を得る。
【選択図】図1
An absolute position is detected with high resolution using only a magnetic scale having a magnetized pattern consisting of one non-repeating code pattern.
[Solution] The absolute position detecting device includes a magnetic scale having one magnetic track on which a magnetization pattern consisting of a non-repeating code pattern is recorded, and a detecting device. The detecting device has two sets of detecting element groups, each consisting of a plurality of detecting elements, arranged opposite to each other on the magnetic scale, calculates a code section position calculation value corresponding to the code section position based on code information of the magnetic scale obtained from the magnetization pattern, calculates a section interpolation value of the magnetic scale using a difference value between the detection values of each detecting element in a plurality of detecting element pairs selected from the two detecting element groups, and obtains the absolute position over the entire length of the magnetic scale from the code section position calculation value and the section interpolation value.
[Selected Figure] Figure 1
Description
本発明は、絶対位置検出装置および位置検出方法に関する。 The present invention relates to an absolute position detection device and a position detection method.
計測や位置決め制御等に用いられる磁気スケール装置には、絶対値型磁気スケール装置とインクリメンタル型磁気スケール装置が知られている。インクリメンタル型磁気スケール装置は移動体の移動に応じて単位変位毎に1単位のパルスを出力させるものであり、絶対値型磁気スケール装置は移動物体の原点からの絶対位置に応じた出力値を出力させるものである。 Magnetic scale devices used for measurement, positioning control, etc. are known to be absolute value magnetic scale devices and incremental value magnetic scale devices. Incremental value magnetic scale devices output one unit pulse for each unit displacement as the moving object moves, while absolute value magnetic scale devices output an output value that corresponds to the absolute position of the moving object from the origin.
絶対値型磁気スケール装置は、インクリメンタル型磁気スケール装置と異なり、一旦電源を切っても原点に戻す必要性がなく、外部からのノイズの影響による累積誤差が発生しない、また、検出ヘッドがスケールから外れてもスケール上に戻すことにより、戻した点の絶対位置が即座に得られるため、各種産業用機械において直線移動物体の位置、あるいは絶対位置の計測等に多用されている。 Unlike incremental magnetic scale devices, absolute value magnetic scale devices do not need to be returned to the origin when the power is turned off, and no cumulative errors occur due to the influence of external noise. Furthermore, even if the detection head comes off the scale, the absolute position of the returned point can be instantly obtained by returning it to the scale. Therefore, absolute value magnetic scale devices are widely used in various industrial machines to measure the position or absolute position of linearly moving objects.
絶対値型磁気スケール装置として、例えば、特許文献1には、同一ビットの組み合せコードが発生しない着磁パターンを記録した第1の磁気トラックに、着磁パターンの1ビット長を周期とする交番着磁パターンを記録した第2の磁気トラッを並設させた磁気スケールを備え、第1の磁気トラックの着磁パターンから得られたコード位置信号に、第2の磁気トラックから得たられた2相信号に基づく1周期上の区間絶対位置信号を内挿することによって、高分解能なデジタル絶対位置信号を発生させる絶対値型磁気スケール装置が開示されている。 For example, Patent Document 1 discloses an absolute value magnetic scale device that includes a magnetic scale in which a first magnetic track recording a magnetization pattern in which no identical bit combination codes are generated is juxtaposed with a second magnetic track recording an alternating magnetization pattern whose period is one bit length of the magnetization pattern. The absolute value magnetic scale device generates a high-resolution digital absolute position signal by interpolating a section absolute position signal over one period based on a two-phase signal obtained from the second magnetic track into a code position signal obtained from the magnetization pattern of the first magnetic track.
特許文献1に開示された絶対値型磁気スケール装置では、磁気スケールに、第1の磁気トラックとしての絶対値トラックと第2の磁気トラックとしての交番磁気トラックの2本の磁気トラックを隣接させて設ける必要がある。そのため、磁気スケールの構造が複雑となり製造コストが高くなっていた。また、磁気スケール幅を広くとる必要があるとともに、検出ヘッドも磁気スケールに合わせた大きさとなるため、絶対値型磁気スケール装置の小型化が困難であった。 The absolute value magnetic scale device disclosed in Patent Document 1 requires that two magnetic tracks be arranged adjacent to each other on the magnetic scale: an absolute value track as the first magnetic track and an alternating magnetic track as the second magnetic track. This makes the magnetic scale structure complex and increases manufacturing costs. Furthermore, the magnetic scale width must be wide, and the detection head must be sized to match the magnetic scale, making it difficult to miniaturize the absolute value magnetic scale device.
本発明は、これらの実情に鑑みてなされたものであり、交番磁気トラックを用いることなく、1本の非繰り返しコードパターンからなる着磁パターンを有する磁気スケールのみを使用して、高分解能な絶対位置を検出することができ、装置の小型化とローコスト化が可能な絶対位置検出装置および絶対位置検出方法を提供することをその目的とする。 The present invention was made in consideration of these circumstances, and its purpose is to provide an absolute position detection device and method that can detect high-resolution absolute position using only a magnetic scale with a magnetized pattern consisting of a single non-repeating code pattern, without using an alternating magnetic track, and that allows for the device to be made smaller and less expensive.
上記課題を解決するために、本発明の第1の技術手段は、所定のピッチで着磁されたn(nは2以上の整数)ビットの非繰り返しコードパターンを有する着磁パターンであって、連続する(n+1)ピッチ分の内に少なくとも1つのS極からN極に変化する部分と1つのN極からS極に変化する部分の両方を有する着磁パターンが記録された磁気スケールと、前記磁気スケールに対向して1ピッチ間隔で配設された少なくともn個の検出素子からなる第1検出素子群と、該第1検出素子群の各前記検出素子と半ピッチずらせて配設された少なくともn個の検出素子からなる第2検出素子群を有する検出装置とを備え、前記検出装置は、前記第1検出素子群または前記第2検出素子群の各前記検出素子の検出値から得られるnビットのコード情報に基づいて、該コード情報に対応したコード区間位置におけるコード区間位置算出値を算出するコード区間位置算出部と、前記第1検出素子群または前記第2検出素子群の前記コード区間位置に対応した内挿値算出用検出素子を特定する内挿値算出用検出素子特定部と、前記内挿値算出用検出素子の検出値から、前記コード区間位置における区間内挿値を算出する区間内挿値算出部と、前記コード区間位置算出値と前記区間内挿値から、前記磁気スケールの全長にわたる絶対位置信号を得る絶対位置算出部を有することを特徴とする。 In order to solve the above problem, the first technical means of the present invention comprises a magnetic scale on which a magnetization pattern having a non-repeating code pattern of n bits (n is an integer of 2 or more) magnetized at a predetermined pitch is recorded, the magnetization pattern having both at least one portion where the pole changes from south to north and one portion where the pole changes from north to south within a continuous (n+1) pitch, a detection device having a first detection element group consisting of at least n detection elements arranged at one pitch intervals facing the magnetic scale, and a second detection element group consisting of at least n detection elements arranged at a half pitch offset from each of the detection elements of the first detection element group, The magnetic scale is characterized by comprising a code section position calculation unit that calculates a code section position calculation value at a code section position corresponding to n-bit code information obtained from the detection values of each detection element of the first detection element group or the second detection element group, based on the code information; an interpolated value calculation detection element identification unit that identifies an interpolated value calculation detection element of the first detection element group or the second detection element group that corresponds to the code section position; an interval interpolated value calculation unit that calculates an interval interpolated value at the code section position from the detection values of the interpolated value calculation detection elements; and an absolute position calculation unit that obtains an absolute position signal over the entire length of the magnetic scale from the code section position calculation value and the interval interpolated value.
本発明の第2の技術手段は、第1の技術手段において、前記検出装置は、前記第1検出素子群の前記コード区間位置毎に、第1検出素子群内挿値算出用検出素子として、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対と、前記第2検出素子群の前記コード区間位置毎に、第2検出素子群内挿値算出用検出素子として、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対とを記憶したルックアップテーブルを有し、前記内挿値算出用検出素子特定部は、前記第1検出素子群または前記第2検出素子群の前記コード区間位置に応じて、前記ルックアップテーブルに記憶した前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における前記検出素子対の各前記検出素子の検出値の差分値の大きさに基づいて、前記区間内挿値を算出するための前記検出素子として、前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子のいずれかを特定し、前記区間内挿値算出部は、前記内挿値算出用検出素子特定部によって特定された前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における、2対の前記検出素子対のそれぞれの前記検出素子対の各前記検出素子の検出値の差分値の比に基づいて、前記コード区間位置における前記区間内挿値を算出することを特徴とする。 A second technical means of the present invention is the first technical means, wherein the detection device has a lookup table that stores, for each code section position of the first detection element group, two pairs of detection element pairs, each consisting of one detection element of the first detection element group and one detection element of the second detection element group, as detection elements for calculating first detection element group interpolated values, and, for each code section position of the second detection element group, two pairs of detection element pairs, each consisting of one detection element of the first detection element group and one detection element of the second detection element group, as detection elements for calculating second detection element group interpolated values, and the interpolated value calculation detection element identification unit selects and stores the two pairs of detection element pairs in the lookup table according to the code section position of the first detection element group or the second detection element group. The interval interpolation value calculation unit identifies either the first detection element group interpolation value calculation detector element or the second detection element group interpolation value calculation detector element as the detector element for calculating the interval interpolation value based on the magnitude of the difference in detection values between the detector elements of the pair of detector elements in the first detection element group interpolation value calculation detector element or the second detection element group interpolation value calculation detector element stored in a file, and the interval interpolation value calculation unit calculates the interval interpolation value at the code interval position based on the ratio of the difference in detection values between the detector elements of each of the two pairs of detector elements in the first detection element group interpolation value calculation detector element or the second detection element group interpolation value calculation detector element identified by the interpolation value calculation detector element identification unit.
本発明の第3の技術手段は、第1の技術手段において、前記検出装置は、前記第1検出素子群の前記コード区間位置毎に、第1検出素子群内挿値算出用検出素子として、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対と、前記第2検出素子群の前記コード区間位置毎に、第2検出素子群内挿値算出用検出素子として、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対とを記憶したルックアップテーブルを有し、前記内挿値算出用検出素子特定部は、前記第1検出素子群の各前記検出素子の検出値の絶対値最小値と前記第2検出素子群の各前記検出素子の検出値の絶対値最小値とを比較し、前記第1検出素子群または前記第2検出素子群の前記コード区間位置における前記区間内挿値を算出するための前記検出素子として、前記絶対値最小値の大きい方の前記ルックアップテーブルに記憶した前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子を特定し、前記区間内挿値算出部は、前記内挿値算出用検出素子特定部によって特定された前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における、2対の前記検出素子対のそれぞれの前記検出素子対の各前記検出素子の検出値の差分値の比に基づいて、前記コード区間位置における前記区間内挿値を算出することを特徴とする。 A third technical means of the present invention is the first technical means, wherein the detection device has a lookup table that stores, for each code section position of the first detection element group, two pairs of detection element pairs, each consisting of one detection element of the first detection element group and one detection element of the second detection element group, as detection elements for calculating an interpolated value for the first detection element group, and two pairs of detection element pairs, each consisting of one detection element of the first detection element group and one detection element of the second detection element group, as detection elements for calculating an interpolated value for the second detection element group, for each code section position of the second detection element group; and the detection element specification unit for calculating an interpolated value determines the minimum absolute value of the detection values of each detection element of the first detection element group and the minimum absolute value of each detection element of the second detection element group. The section interpolation value calculation unit compares the minimum absolute value of the detection values of the output elements with the minimum absolute value of the detection values of the output elements, and identifies the first detection element group interpolation value calculation detection element or the second detection element group interpolation value calculation detection element stored in the lookup table with the larger absolute minimum value as the detection element for calculating the section interpolation value at the code section position of the first detection element group or the second detection element group, and calculates the section interpolation value at the code section position based on the ratio of the difference values between the detection values of each of the detection elements in each of the two detection element pairs for the first detection element group interpolation value calculation detection element or the second detection element group interpolation value calculation detection element identified by the interpolation value calculation detection element identification unit.
本発明の第4の技術手段は、第1の技術手段において、前記検出装置は、前記磁気スケールの非繰り返しコードパターンから得られるコード情報を記憶した記憶部を有し、前記内挿値算出用検出素子特定部は、前記第1検出素子群と前記第2検出素子群の前記コード区間位置に応じて、前記記憶部に記憶した前記コード情報を参照して、前記第1検出素子群の前記コード区間位置に対応した第1検出素子群内挿値算出用検出素子としての選定条件を満たす、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対と、前記第2検出素子群の前記コード区間位置に対応した第2検出素子群内挿値算出用検出素子としての選定条件を満たす、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対のいずれかを特定し、前記区間内挿値算出部は、前記内挿値算出用検出素子特定部によって特定された前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における、2対の前記検出素子対のそれぞれの前記検出素子対の各前記検出素子の検出値の差分値の比に基づいて、前記コード区間位置における前記区間内挿値を算出することを特徴とする。 A fourth technical means of the present invention is the first technical means, wherein the detection device has a memory unit that stores code information obtained from a non-repeating code pattern of the magnetic scale, and the interpolation value calculation detection element identification unit references the code information stored in the memory unit according to the code section positions of the first detection element group and the second detection element group, and selects two pairs of detection element pairs, each pair consisting of one detection element of the first detection element group and one detection element of the second detection element group, that satisfy the selection conditions as detection elements for first detection element group interpolation value calculation corresponding to the code section position of the first detection element group, and one detection element of the second detection element group. One of two pairs of detector elements, each consisting of one detector element of the first detector element group and one detector element of the second detector element group, that meets the selection conditions for the detector elements for calculating the interpolated value of the second detector element group corresponding to the code section position is identified, and the section interpolation value calculation unit calculates the section interpolation value at the code section position based on the ratio of the difference values between the detection values of each of the two pairs of detector elements, for the detector elements for calculating the interpolated value of the first detector element group or the detector elements for calculating the interpolated value of the second detector element group identified by the detector element identification unit for calculating the interpolated value of the interpolated value.
本発明の第5の技術手段は、前記内挿値算出用検出素子特定部は、前記第1検出素子群または前記第2検出素子群の各前記検出素子の検出値から取得したnビットのコード情報、および、前記第1検出素子群または前記第2検出素子群の各前記検出素子が対向する前記磁気スケールの前記着磁パターンから推定される前後の磁極の極性に基づいて、前記第1検出素子群と前記第2検出素子群の前記コード区間位置に応じて、前記第1検出素子群の前記コード区間位置に対応した第1検出素子群内挿値算出用検出素子としての選定条件を満たす、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対と、前記第2検出素子群の前記コード区間位置に対応した第2検出素子群内挿値算出用検出素子としての選定条件を満たす、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対のいずれかを特定し、前記区間内挿値算出部は、前記内挿値算出用検出素子特定部によって特定された前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における、2対の前記検出素子対のそれぞれの前記検出素子対の各前記検出素子の検出値の差分値の比に基づいて、前記コード区間位置における前記区間内挿値を算出することを特徴とする。 A fifth technical means of the present invention is that the interpolation value calculation detection element identification unit identifies one detection element of the first detection element group and one detection element of the second detection element group as a detection element pair, which satisfy the selection conditions as a first detection element group interpolation value calculation detection element corresponding to the code section position of the first detection element group, in accordance with the code section positions of the first detection element group and the second detection element group, based on n-bit code information acquired from the detection value of each detection element of the first detection element group or the second detection element group, and the polarity of the front and rear magnetic poles estimated from the magnetization pattern of the magnetic scale to which each detection element of the first detection element group or the second detection element group faces. Two pairs of detector elements are identified, each pair consisting of one detector element of the first detector element group and one detector element of the second detector element group, which satisfy the selection conditions for the detector elements for calculating the interpolated value of the second detector element group corresponding to the code section position of the second detector element group. The interval interpolation value calculation unit calculates the interval interpolation value at the code section position based on the ratio of the difference values between the detection values of the respective detector elements of the two pairs of detector elements for calculating the interpolated value of the first detector element group or the second detector element group identified by the interpolation value calculation detector element identification unit.
本発明の第6の技術手段は、第1の技術手段において、前記検出装置は、前記第1検出素子群および前記第2検出素子群の両端に位置する前記検出素子の外側に、半ピッチずらせてそれぞれ1つの補助検出素子をさらに備え、前記内挿値算出用検出素子特定部は、前記第1検出素子群と前記第2検出素子群の各前記検出素子および前記補助検出素子の検出値から取得した前記磁気スケールの着磁パターンに基づいて、前記第1検出素子群と前記第2検出素子群の前記コード区間位置に応じて、前記第1検出素子群の前記コード区間位置に対応した第1検出素子群内挿値算出用検出素子としての選定条件を満たす、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対と、前記第2検出素子群の前記コード区間位置に対応した第2検出素子群内挿値算出用検出素子としての選定条件を満たす、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対のいずれかを特定し、前記区間内挿値算出部は、前記内挿値算出用検出素子特定部によって特定された前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における、2対の前記検出素子対のそれぞれの前記検出素子対の各前記検出素子の検出値の差分値の比に基づいて、前記コード区間位置における前記区間内挿値を算出することを特徴とする。 A sixth technical means of the present invention is the first technical means, wherein the detection device further includes one auxiliary detection element each shifted by half a pitch outside the detection elements located at both ends of the first detection element group and the second detection element group, and the interpolation value calculation detection element identification unit identifies one detection element of the first detection element group and one detection element of the second detection element group that meets the selection conditions as a first detection element group interpolation value calculation detection element corresponding to the code section position of the first detection element group based on the magnetization pattern of the magnetic scale acquired from the detection values of each detection element and auxiliary detection element of the first detection element group and the second detection element group, depending on the code section position of the first detection element group and the second detection element group. and two pairs of detector elements, each pair consisting of one detector element of the first detector element group and one detector element of the second detector element group, that satisfy the selection conditions for the detector elements for calculating the interpolated value of the second detector element group corresponding to the code section position of the second detector element group. The interval interpolation value calculation unit calculates the interval interpolation value at the code section position based on the ratio of the difference values between the detection values of the detector elements of each of the two pairs of detector elements, for the detector elements for calculating the interpolated value of the first detector element group or the detector elements for calculating the interpolated value of the second detector element group identified by the detector element identification unit for calculating the interpolated value of the first detector element group or the detector elements for calculating the interpolated value of the second detector element group.
本発明の第7の技術手段は、第1から第6の技術手段において、前記第1検出素子群内挿値算出用検出素子および前記第2検出素子群内挿値算出用検出素子としての2対の前記検出素子は、それぞれ一方の前記検出素子対の前記検出素子の検出値の差分値が、前記磁気スケールの変位が(m-1)ピッチ(mは正の整数)の近傍位置においてゼロの値となる前記検出素子の組み合わせであり、他方の前記検出素子対の前記検出素子の検出値の差分値が、(m-1/2)ピッチの近傍位置においてゼロの値となる検出素子の組み合わせであることを特徴とする。 The seventh technical means of the present invention is characterized in that, in the first to sixth technical means, the two pairs of detection elements serving as the detection elements for calculating the first detection element group interpolated value and the detection elements for calculating the second detection element group interpolated value are a combination of detection elements in which the difference in detection values of the detection elements of one of the detection element pairs is zero when the magnetic scale displacement is in the vicinity of (m-1) pitches (m is a positive integer), and a combination of detection elements in which the difference in detection values of the detection elements of the other detection element pair is zero when the magnetic scale displacement is in the vicinity of (m-1/2) pitches.
本発明の第8の技術手段は、所定のピッチで着磁されたn(nは2以上の整数)ビットの非繰り返しコードパターンを有する着磁パターンであって、連続する(n+1)ピッチ分の内に少なくとも1つのS極からN極に変化する部分と1つのN極からS極に変化する部分の両方を有する着磁パターンが記録された1本の磁気トラックを有する磁気スケールと、前記磁気スケールに対向して1ピッチ間隔で配設された少なくともn個の検出素子からなる第1検出素子群と、該第1検出素子群の各前記検出素子と半ピッチずらせて配設された少なくともn個の検出素子からなる第2検出素子群の2組の検出素子群を有する検出装置とを備えた、絶対位置検出装置であって、
前記検出装置は、前記磁気スケールの前記着磁パターンから得られたコード情報に基づくコード区間位置に対応したコード区間位置算出値を算出するとともに、2組の前記検出素子群から選択した複数の検出素子対における各検出素子の検出値の差分値を用いて前記コード区間位置における区間内挿値を算出し、前記コード区間位置算出値と前記区間内挿値とから前記磁気スケールの全長にわたる絶対位置を得ることを特徴とする。
An eighth technical means of the present invention is an absolute position detection device comprising: a magnetic scale having one magnetic track on which a magnetization pattern is recorded, the magnetization pattern having a non-repeating code pattern of n (n is an integer of 2 or more) bits magnetized at a predetermined pitch, the magnetization pattern having both at least one portion where the pole changes from south to north and one portion where the pole changes from north to south within consecutive ( n+1) pitches; and a detection device having two detection element groups, a first detection element group consisting of at least n detection elements arranged at one pitch interval facing the magnetic scale, and a second detection element group consisting of at least n detection elements arranged at a half pitch offset from each of the detection elements in the first detection element group,
The detection device calculates a code section position calculation value corresponding to a code section position based on code information obtained from the magnetization pattern of the magnetic scale, calculates a section interpolation value at the code section position using a difference value between detection values of each detection element in a plurality of detection element pairs selected from the two detection element groups, and obtains an absolute position over the entire length of the magnetic scale from the code section position calculation value and the section interpolation value.
本発明の第9の技術手段は、所定のピッチで着磁されたn(nは2以上の整数)ビットの非繰り返しコードパターンを有する着磁パターンであって、連続する(n+1)ピッチ分の内に少なくとも1つのS極からN極に変化する部分と1つのN極からS極に変化する部分の両方を有する着磁パターンが記録された1本の磁気トラックを有する磁気スケールと、前記磁気スケールに対向して1ピッチ間隔で配設された少なくともn個の検出素子からなる第1検出素子群と、該第1検出素子群の各前記検出素子と半ピッチずらせて配設された少なくともn個の検出素子からなる第2検出素子群の2組の検出素子群を有する検出装置とを用いた絶対位置検出方法であって、
2組の前記検出素子群の検出値から前記磁気スケールの前記着磁パターンのコード情報を取得し、該コード情報に基づく前記磁気スケールのコード区間位置に対応したコード区間位置算出値を算出するとともに、2組の前記検出素子群から選択した複数の検出素子対における各検出素子の検出値の差分値に基づいて前記コード区間位置における区間内挿値を算出し、前記コード区間位置に基づく位置算出値と前記区間内挿値とから前記磁気スケールの全長にわたる絶対位置を得ることを特徴とする。
A ninth technical means of the present invention is an absolute position detection method using a magnetic scale having one magnetic track on which a magnetization pattern is recorded, the magnetization pattern having a non-repeating code pattern of n (n is an integer of 2 or more) bits magnetized at a predetermined pitch, the magnetization pattern having both at least one portion where the pole changes from south to north and one portion where the pole changes from north to south within consecutive ( n+1) pitches, and a detection device having two detection element groups, i.e., a first detection element group consisting of at least n detection elements arranged at one pitch interval facing the magnetic scale, and a second detection element group consisting of at least n detection elements arranged at a half pitch offset from each of the detection elements in the first detection element group ,
code information of the magnetization pattern of the magnetic scale is obtained from detection values of the two groups of detection elements, a code section position calculation value corresponding to a code section position of the magnetic scale is calculated based on the code information, and an interval interpolation value at the code section position is calculated based on a difference value between detection values of each detection element in a plurality of pairs of detection elements selected from the two groups of detection elements, and an absolute position over the entire length of the magnetic scale is obtained from the position calculation value based on the code section position and the interval interpolation value.
本発明によれば、1本の非繰り返しコードパターンからなる着磁パターンを有する磁気スケールのみを使用して、高分解能なデジタル絶対位置を検出することができ、装置の小型化とローコスト化が可能な絶対位置検出装置および絶対位置検出方法を提供することができる。 The present invention provides an absolute position detection device and absolute position detection method that can detect high-resolution digital absolute position using only a magnetic scale with a magnetized pattern consisting of a single non-repeating code pattern, thereby enabling the device to be made smaller and less expensive.
以下、図面を参照しながら、本発明の絶対位置検出装置および絶対位置検出方法に係る好適な実施形態について説明する。以下の説明において、異なる図面においても同じ符号を付した構成は同様のものであるとして、その説明を省略する場合がある。なお、本発明はこれらの実施形態での例示に限定されるものではなく、特許請求の範囲に記載された事項の範囲内および均等の範囲内におけるすべての変更を含む。また、複数の実施形態について組み合わせが可能である限り、本発明は任意の実施形態を組み合わせたものを含む。 Preferred embodiments of the absolute position detection device and absolute position detection method of the present invention will be described below with reference to the drawings. In the following description, components with the same reference numerals in different drawings are considered to be similar, and their description may be omitted. Note that the present invention is not limited to the examples of these embodiments, and includes all modifications within the scope of the claims and equivalents. Furthermore, to the extent that multiple embodiments can be combined, the present invention includes any combination of embodiments.
[第1の実施形態]
図1は、本発明の実施形態に係る絶対位置検出装置の一構成例を示す図である。絶対位置検出装置1は、所定のピッチPで着磁された1本の磁気トラックを有する磁気スケール10と、検出装置20とを備えている。磁気スケール10は、N極を「0」、S極を「1」とした場合に、M系列(Maximum Length Sequence)等の非繰り返しコードパターンとなるような着磁パターンを備えている。以下、本実施形態において説明する磁気スケール10のパラメータは、ビット数を6ビット、ピッチPを6mmの場合について説明する。この場合、全長が360mm、有効長が330mmとなる。磁気スケール10の詳細、および、全長と有効長の関係については後述する。
[First embodiment]
FIG. 1 is a diagram showing an example of the configuration of an absolute position detection device according to an embodiment of the present invention. The absolute position detection device 1 includes a magnetic scale 10 having one magnetic track magnetized at a predetermined pitch P, and a detection device 20. The magnetic scale 10 has a magnetization pattern that forms a non-repeating code pattern such as an M series (Maximum Length Sequence) when a north pole is designated as "0" and a south pole is designated as "1." Hereinafter, the parameters of the magnetic scale 10 described in this embodiment will be explained assuming that the number of bits is 6 and the pitch P is 6 mm. In this case, the total length is 360 mm and the effective length is 330 mm. Details of the magnetic scale 10 and the relationship between the total length and the effective length will be described later.
(コード位置番号)
図2は、6ビットの非繰り返しコードパターンの例とコード位置番号の関係を説明するための図である。本実施形態では、検出装置20内で磁気スケール10の1ピッチ分毎に順番に番号を割り振っており、この番号をコード位置番号と呼ぶ。コード位置番号は、図2に示すように、左側から順番に0から振っており、全長で0~59で有効範囲は0~54であり、磁気スケール10の全長と有効長に対応している。なお、コード位置番号の磁気スケール10に対する起点については後述する。
(Code position number)
2 is a diagram illustrating the relationship between an example of a 6-bit non-repeating code pattern and the code position number. In this embodiment, numbers are assigned sequentially for each pitch of the magnetic scale 10 within the detection device 20, and these numbers are called code position numbers. As shown in FIG. 2, the code position numbers are assigned sequentially from left to right, starting from 0, and the total length is 0 to 59, with an effective range of 0 to 54, corresponding to the total length and effective length of the magnetic scale 10. The starting point of the code position number with respect to the magnetic scale 10 will be described later.
(検出装置)
検出装置20は、複数の検出素子からなる検出素子群Sと、検出素子群Sのアナログ出力データから位置計算を行い絶対位置を外部出力するマイコンMを備えている。図1に示す構成例では、マイコンMを機能ブロックとして記載しているが、マイコンMは、図示しないCPU、ROM、RAMなどのハードウェアを備えている。検出装置20の詳細は後述する。
(Detection device)
The detection device 20 includes a detection element group S consisting of a plurality of detection elements, and a microcomputer M that performs position calculations based on analog output data from the detection element group S and outputs the absolute position to the outside. In the configuration example shown in Fig. 1, the microcomputer M is depicted as a functional block, but the microcomputer M also includes hardware such as a CPU, ROM, and RAM (not shown). Details of the detection device 20 will be described later.
(検出素子群)
図1に示す構成例の検出素子群Sの各検出素子は、磁気スケール10に対向して配設され、磁気スケール10の各磁界に対応したアナログ値を出力するものであり、静磁界の大きさと方向を検出可能な、例えば、ホール効果を使ったホールセンサー用いることができる。本実施形態では、磁気スケール10の非繰り返しコードパターンの極性の変化点における不正確なコード情報の読み取りを避けるため、A群とB群の2組の検出素子群が設けてある。A群、B群の検出素子群は、それぞれ非繰り返しコードのビット数と同数、すなわち6個の検出素子を備えている。A群の6個の検出素子A1~A6は、1ピッチ間隔で配設されており、B群の6個の検出素子B1~B6は、1ピッチ間隔でA群の各検出素子と半ピッチずらせて配設されている。このため、検出素子A1、B1、A2、B2・・・と、A群の検出素子とB群の検出素子とが、交互に1/2スケールピッチの間隔で配置されている。
(Detection element group)
Each detection element in the detection element group S in the exemplary configuration shown in FIG. 1 is disposed facing the magnetic scale 10 and outputs an analog value corresponding to each magnetic field of the magnetic scale 10. A Hall sensor, for example, using the Hall effect, capable of detecting the magnitude and direction of a static magnetic field can be used. In this embodiment, two detection element groups, group A and group B, are provided to avoid inaccurate reading of code information at polarity change points in the non-repeating code pattern of the magnetic scale 10. Each of the detection element groups A and B has six detection elements, the same number as the number of bits in the non-repeating code. The six detection elements A1 to A6 in group A are disposed at one-pitch intervals, and the six detection elements B1 to B6 in group B are disposed at one-pitch intervals, offset by half a scale pitch from each of the detection elements in group A. Therefore, the detection elements A1, B1, A2, B2, etc., and the detection elements in group A and the detection elements in group B are alternately disposed at half-scale pitch intervals.
ここで、A群の検出素子群とB群の検出素子群とは、それぞれ本発明の第1検出素子群と第2検出素子群に相当する。また、以降の説明において、A群の検出素子群を単にA群と呼び、B群の検出素子群を単にB群と呼ぶことがある、さらに、検出素子A1~検出素子A6および検出素子B1~検出素子B6の各検出素子自体、および、これらの検出素子の検出値についても、単にA1~A6およびB1~B6と呼ぶことがある。また、コード位置番号が大きくなる方向を前方とする。このため、B群の検出素子群は、A群の検出素子群よりも半ピッチ分進んだ位置にある。 Here, the detector element group A and the detector element group B correspond to the first detector element group and the second detector element group, respectively, in this invention. Furthermore, in the following explanation, the detector element group A will sometimes be referred to simply as group A, and the detector element group B will sometimes be referred to simply as group B. Furthermore, the detector elements A1 to A6 and B1 to B6 themselves, as well as the detection values of these detector elements, will sometimes be referred to simply as A1 to A6 and B1 to B6. The direction in which the code position number increases is considered forward. Therefore, the detector element group B is located half a pitch ahead of the detector element group A.
図7は、A群およびB群の各検出素子と磁気スケールとの位置関係を説明するための図である。図7において、紙面で最も左のA群の検出素子A1が磁気スケール10の左端(コード位置番号0側)に重なる位置からさらに左側に1.5mm移動した地点を磁気スケール10の0点とし、検出素子A1が0点から検出素子B6が363mmにある地点(A1が330mmにある地点)までを有効範囲としている。また、検出装置20の検出素子A1、B1が絶対位置算出のために相対移動できる範囲として、コード位置番号0~54が有効範囲となっている。 Figure 7 is a diagram illustrating the positional relationship between each detection element in groups A and B and the magnetic scale. In Figure 7, the point 1.5 mm to the left of the position where detection element A1 of group A, the leftmost element on the page, overlaps the left edge of magnetic scale 10 (on the code position number 0 side), is set to point 0 on magnetic scale 10, and the effective range is from point 0 for detection element A1 to the point where detection element B6 is 363 mm away (the point where A1 is 330 mm away). Furthermore, the effective range for relative movement of detection elements A1 and B1 of detection device 20 to calculate absolute position is code position numbers 0 to 54.
(マイコン)
図1に示す構成例に戻り、マイコンMは、検出素子群Sの各検出素子が出力するアナログ検出値をマルチプレクサ21で選択し、A/D変換部22でデジタル値に変換し、マイコンMのRAMに送られる。マイコンMのCPUは、ROMに内蔵された各種プログラムに従って動作することによって、位置算出部30に示す絶対位置算出のための各種機能を実現しており、RAMに送られた各検出素子の検出値を、内部演算することによって、絶対位置を出力している。マイコンMのROMにはプログラムの他に、位置演算等に使用するルックアップテーブル36も記録している。
(microcomputer)
Returning to the configuration example shown in Fig. 1, the microcomputer M uses a multiplexer 21 to select analog detection values output by each detection element of the detection element group S, converts them into digital values in an A/D converter 22, and sends them to the RAM of the microcomputer M. The CPU of the microcomputer M operates in accordance with various programs stored in the ROM to realize various functions for calculating the absolute position shown in the position calculation unit 30, and outputs the absolute position by internally calculating the detection values of each detection element sent to the RAM. In addition to the programs, the ROM of the microcomputer M also stores a lookup table 36 used for position calculations, etc.
位置算出部30は、コード情報等取得部31、コード区間位置算出部32、内挿値算出用検出素子特定部33、区間内挿値算出部34、絶対位置算出部35の各機能部を備えている。これらの機能部は、検出装置の動作説明において詳細に説明を行うが、コード情報等取得部31は、A群、B群の各検出素子群の検出値から磁気スケール10のコード情報等を取得するためのものである。また、コード区間位置算出部32は、コード情報等取得部31が取得したA群とB群のコード情報に基づいて、磁気スケール10のコードによって定まる変位であるコード区間位置算出値を算出するためのものである。 The position calculation unit 30 includes the following functional units: a code information acquisition unit 31, a code interval position calculation unit 32, a detection element identification unit for calculating interpolated values 33, an interval interpolated value calculation unit 34, and an absolute position calculation unit 35. These functional units will be explained in detail in the explanation of the operation of the detection device. The code information acquisition unit 31 is used to acquire code information, etc. of the magnetic scale 10 from the detection values of each detection element group A and B. The code interval position calculation unit 32 is used to calculate a code interval position calculation value, which is a displacement determined by the code of the magnetic scale 10, based on the code information of groups A and B acquired by the code information acquisition unit 31.
内挿値算出用検出素子特定部33は、各コード区間位置に対する内挿値を算出するための検出素子を特定するためのものであり、本実施形態では、図示しない記憶部にルックアップテーブルとして予めコード情報に対応させた内挿値算出用検出素子を記憶している。区間内挿値算出部34は、内挿値算出用検出素子特定部33で特定した検出素子の検出値に基づいて、対応するコード区間位置の内挿値を算出するためのものである。また、絶対位置算出部35は、コード区間位置算出部32で算出したコード区間位置算出値に区間内挿値算出部34で算出した区間内挿値を加算して、磁気スケール10の絶対位置を算出するためのものである。 The interpolated value calculation detection element identification unit 33 is used to identify detection elements for calculating interpolated values for each code interval position. In this embodiment, the detection elements for calculating interpolated values corresponding to code information are stored in advance as a lookup table in a storage unit (not shown). The interval interpolated value calculation unit 34 is used to calculate an interpolated value for the corresponding code interval position based on the detection values of the detection elements identified by the interpolated value calculation detection element identification unit 33. The absolute position calculation unit 35 is used to calculate the absolute position of the magnetic scale 10 by adding the interval interpolated value calculated by the interval interpolated value calculation unit 34 to the code interval position calculated by the code interval position calculation unit 32.
(外部出力部)
マイコンMは、絶対位置算出部35で算出した絶対位置データを外部出力部23に出力するための通信手段を備えており、例えば、SPI通信のためのインターフェースを内蔵している。外部出力部23は、SPI通信を用いて、マイコンMが算出した絶対位置データをD/A変換器にデータを送り、絶対位置を電圧出力として外部に出力している。
(External output section)
The microcomputer M is provided with a communication means for outputting the absolute position data calculated by the absolute position calculation unit 35 to the external output unit 23, and includes, for example, an interface for SPI communication. The external output unit 23 uses SPI communication to send the absolute position data calculated by the microcomputer M to a D/A converter, and outputs the absolute position to the outside as a voltage output.
(磁気スケールの着磁パターンの条件)
磁気スケール10には前述したように非繰り返しコードパターンが着磁されるが、高分解能で位置検出するためには、非繰り返しコードパターンに加えて次の条件を満たす必要がある。
(着磁パターン条件)磁気スケールの着磁パターン中の全ての部分で、(ビット数+1)ピッチ分のパターン内に「S極からN極」になる部分と「N極からS極」になる部分が両方存在すること。
(Magnetic scale magnetization pattern conditions)
As described above, the magnetic scale 10 is magnetized with a non-repeating code pattern. In order to detect a position with high resolution, the following conditions must be satisfied in addition to the non-repeating code pattern.
(Magnetic pattern condition) In all parts of the magnetic scale's magnetization pattern, there must be both parts that change from south pole to north pole and parts that change from north pole to south pole within the pattern for (number of bits + 1) pitches.
したがって、本発明の磁気スケールは、所定のピッチで着磁されたnビットの非繰り返しコードパターンを有する着磁パターンであって、連続する(n+1)(nは正の整数)ピッチ分の内に少なくともそれぞれ1つのS極からN極に変化する部分と1つのN極からS極に変化する部分の両方を有している。これは、コード区間位置の内挿値を算出するために、それぞれ後述する所定の条件を満たすA群の検出素子とB群の検出素子の対を特定するために必要な条件となっている。 Therefore, the magnetic scale of the present invention is a magnetization pattern having an n-bit non-repeating code pattern magnetized at a predetermined pitch, and within each of (n+1) consecutive pitches (n is a positive integer), there is at least one portion where the pole changes from south to north and one portion where the pole changes from north to south. This is a necessary condition for identifying pairs of detecting elements in group A and group B, each of which satisfies the predetermined conditions described below, in order to calculate the interpolated value of the code section position.
本実施形態の場合、6ビットの非繰り返しコードであるため、全長にわたって7ピッチ分の内に、「S極からN極」と「N極からS極」になる部分が両方存在する必要がある。図2に示す着磁パターンは、上記の条件を満たすパターンの一例であって、6ビットの非繰り返しコードパターンの一部であり、かつ、すべての7ピッチ分のパターン内に「S極からN極」になる部分と「N極からS極」になる部分とが両方存在している。そして、このような着磁パターンであれば高分解能な位置検出をすることができる。 In the case of this embodiment, since the code is a 6-bit non-repeating code, both "south pole to north pole" and "north pole to south pole" sections must exist within the entire seven pitch length. The magnetization pattern shown in Figure 2 is an example of a pattern that meets the above conditions; it is part of a 6-bit non-repeating code pattern, and both "south pole to north pole" and "north pole to south pole" sections exist within all seven pitches of the pattern. Such a magnetization pattern enables high-resolution position detection.
一方、図3は、6ビットの非繰り返しコードパターンを有するが、本発明の対象外となる磁気スケールの例を説明するための図である。図3に示す着磁パターンは6ビットの非繰り返しコードパターンを有しているが、左端の7ピッチの分のパターンの中に、「N極からS極」になる部分が存在するものの、「S極からN極」になる部分が存在しないため、このような着磁パターンでは高分解能な位置検出をすることができない。 On the other hand, Figure 3 is a diagram illustrating an example of a magnetic scale that has a 6-bit non-repeating code pattern but is outside the scope of the present invention. The magnetization pattern shown in Figure 3 has a 6-bit non-repeating code pattern, but although there is a section in the pattern for the 7 pitches on the left side that goes from "N pole to S pole," there is no section that goes from "S pole to N pole." Therefore, high-resolution position detection is not possible with this magnetization pattern.
6ビットのフルスケールの磁気スケールの場合、有効長は64×6mmの384mmとなり、全長は(64+5)×6mmの414mmとなるが、本実施形態の場合、上記の条件を満たす必要から、有効長は55×6mmの330mm、全長は(55 + 5)×6mmの360mmとなっている。 For a 6-bit full-scale magnetic scale, the effective length is 64 x 6 mm, or 384 mm, and the total length is (64 + 5) x 6 mm, or 414 mm. However, in this embodiment, in order to meet the above conditions, the effective length is 55 x 6 mm, or 330 mm, and the total length is (55 + 5) x 6 mm, or 360 mm.
(処理動作に必要な事前準備)
以下、本実施形態における絶対位置検出装置の処理動作に必要な事前準備について説明する。まず、磁気スケール10の1ピッチ分の内挿値を設定する。この内挿値の大きさによって分解能が決まる。本実施形態では、分解能を0.05mmとするために1ピッチ6mmを120分割している。次に、各検出素子の無磁界環境における検出値を取得し、検出装置20にオフセット値として記録する。このオフセット値は、絶対位置検出装置の動作時おいて各検出素子の磁界検出値を補正するために用いられる。さらに、ルックアップテーブル36に、「コード情報-コード位置番号対応表」と「コード位置番号-内挿値算出用検出素子対応表」を記録する。
(Preparation required for processing operations)
The following describes the preparations required for the processing operations of the absolute position detection device in this embodiment. First, an interpolated value for one pitch of the magnetic scale 10 is set. The resolution is determined by the size of this interpolated value. In this embodiment, one pitch of 6 mm is divided into 120 parts to achieve a resolution of 0.05 mm. Next, the detection values of each detection element in a magnetic field-free environment are acquired and recorded as offset values in the detection device 20. These offset values are used to correct the magnetic field detection values of each detection element when the absolute position detection device is in operation. Furthermore, a "code information-code position number correspondence table" and a "code position number-detection element correspondence table for calculating interpolated values" are recorded in the lookup table 36.
図4は、検出素子から得られるコード情報に対応するコード位置番号を示す、「コード情報-コード位置番号対応表」の一例を説明するための図であり、「コード情報-コード位置番号対応表」は、A群およびB群の各検出素子群が取得した6ビットの値から得られるコード情報を、コード位置番号に変換するためのものである。図4の表Iは、N極を「0」、S極を「1」とした場合の各検出素子の極性と、これに対応する6桁の2進数と、さらに10進数に変換したコード情報と、コード情報に対応するコード位置番号と、コード位置番号に対応する磁気スケールの変位を検出素子A1またはB1の変位を、それぞれ対応させたものである。 Figure 4 is a diagram illustrating an example of a "code information-code position number correspondence table" showing the code position numbers corresponding to the code information obtained from the detection elements. The "code information-code position number correspondence table" is used to convert the code information obtained from the 6-bit values acquired by each of the detection element groups A and B into a code position number. Table I in Figure 4 shows the correspondence between the polarity of each detection element (where north pole is "0" and south pole is "1"), the corresponding 6-digit binary number, the code information converted to decimal, the code position number corresponding to the code information, and the displacement of detection element A1 or B1 with the displacement of the magnetic scale corresponding to the code position number.
本実施形態では、図4の表1に示すコード位置番号が55~63(検出素子A1の変位が330mm~384mmまでの変位にある場合)の各検出素子極性は、先述した磁気スケールの着磁パターン条件に合致しないため、使用されることがなく、磁気スケール10に着磁されることがない。また、表IIは、コード情報とコード位置番号をコード情報順にソートしたものであり、ルックアップテーブルには表IIの情報が記録される。本実施形態の磁気スケール10には存在しないコード情報に対応するコード位置番号には、便宜上、「255」の値を入れている。 In this embodiment, the polarities of the detection elements with code position numbers 55 to 63 shown in Table 1 of Figure 4 (when the displacement of detection element A1 is between 330 mm and 384 mm) do not match the magnetization pattern conditions of the magnetic scale described above, and are therefore not used and are not magnetized on the magnetic scale 10. Table II also sorts the code information and code position numbers in code information order, and the information in Table II is recorded in the lookup table. For convenience, the value "255" is entered for code position numbers corresponding to code information that does not exist on the magnetic scale 10 of this embodiment.
図5は、コード位置番号に応じて使用する内挿値算出用検出素子を対応させた「コード位置番号-内挿値算出用検出素子対応表」の一例である。「コード位置番号-内挿値算出用検出素子対応表」は、検出装置20がコード情報を読み込んでコード位置番号を取得した際、そのコード位置番号の位置での内挿値の計算に使用するための複数の検出素子(検出素子A1~B6)をそれぞれ記録している。本実施形態では、A群のコード位置番号に対応した表αと、B群のコード位置番号に対応した表βを備えており、コード位置番号に応じて、それぞれ4つの検出素子Aw、Ax、Ay、AzとBw、Bx、By、Bzを記録している。AwとAx、AyとAz、BwとBx、および、ByとBzは、それぞれ検出素子対として内挿値を算出するために選択された検出素子である。これらの検出素子を選択するための基準については後述する。 Figure 5 is an example of a "Code Position Number - Detector Element for Calculating Interpolated Values Correspondence Table" that associates the detector element for calculating interpolated values to be used with the code position number. The "Code Position Number - Detector Element for Calculating Interpolated Values Correspondence Table" records multiple detector elements (detector elements A1 to B6) used to calculate the interpolated value at the code position number when the detection device 20 reads code information and obtains the code position number. In this embodiment, there is a table α corresponding to the code position numbers of group A, and a table β corresponding to the code position numbers of group B. Four detector elements Aw, Ax, Ay, Az, and Bw, Bx, By, and Bz are recorded according to the code position number. Aw and Ax, Ay and Az, Bw and Bx, and By and Bz are the detector elements selected as pairs to calculate the interpolated value. The criteria for selecting these detector elements will be described later.
(処理フロー)
以下、本実施形態において、検出装置20が磁気スケールの磁界の検出値を検出素子から取得し、そのデータを基にマイコンによって絶対位置の計算を行う処理について説明する。図6A、図6Bは、位置算出部における絶対位置算出の一例を示す処理フロー図である。
(Processing flow)
The following describes the process in this embodiment in which the detection device 20 acquires the detection value of the magnetic field of the magnetic scale from the detection elements and calculates the absolute position using the microcomputer based on that data. Figures 6A and 6B are processing flow diagrams showing an example of absolute position calculation in the position calculation unit.
まず、ステップS1において、A群とB群全ての検出素子における磁気スケールの磁界の検出値を取得する。本実施形態では、A群6個(A1~A6)、B群6個(B1~B6)の計12個の検出値を取得している。図8Aは、コード位置番号0~1(変位0~12mm)において、A群の各検出素子から得られた検出値の例を示す図であり、図8Bは、コード位置番号0~1において、B群の各検出素子から得られた検出値の例を示す図である。図7では、図8Aと図8Bに示した検出値を取得した際における、磁気スケールと各検出素子の位置関係を示しており、例えば、検出素子A1は変位0~12mmの範囲にあり、検出素子B6は変位33~45mmの範囲に位置している。 First, in step S1, the detection values of the magnetic field of the magnetic scale for all detection elements in groups A and B are obtained. In this embodiment, a total of 12 detection values are obtained: six in group A (A1-A6) and six in group B (B1-B6). Figure 8A is a diagram showing example detection values obtained from each detection element in group A at code position numbers 0-1 (displacement 0-12 mm), and Figure 8B is a diagram showing example detection values obtained from each detection element in group B at code position numbers 0-1. Figure 7 shows the positional relationship between the magnetic scale and each detection element when the detection values shown in Figures 8A and 8B were obtained. For example, detection element A1 is located in the displacement range of 0-12 mm, and detection element B6 is located in the displacement range of 33-45 mm.
次に、ステップS2において、A群とB群の全ての検出素子の検出値の絶対値を計算する。その際、A群の検出素子の絶対値の最小値とB群の検出素子の絶対値の最小値を求めておく。 Next, in step S2, the absolute values of the detection values of all detection elements in groups A and B are calculated. In this process, the minimum absolute value of the detection values of the detection elements in group A and the minimum absolute value of the detection elements in group B are found.
次に、ステップS3に移り、A群とB群両方の検出値をそれぞれコード情報に変換する。コード情報への変換は、図4の表Iで示したように、N極を「0」、S極を「1」として6桁の2進数に変換した後、10進数に変換してコード情報を取得する。ここで、検出素子がN極とS極の境目にある時、検出値が0(ゼロ)の値に近くなり、正確なコード情報を読み取れない場合がある。しかし、本実施形態では、A群とB群とは半ピッチずれているため、A群の検出素子がN極とS極の境目にある時はB群の検出素子が境目から離れ、B群の検出素子がN極とS極の境目にある時はA群の検出素子が境目から離れることになるため、どちらかは正しいコード情報を読み取れることになる。A群とB群のどちらのコード情報を採用するかという点については、後述する。 Next, proceed to step S3, where the detected values from both groups A and B are converted into code information. As shown in Table I of Figure 4, the code information is first converted into a six-digit binary number, with north poles represented as "0" and south poles represented as "1," and then converted back to decimal to obtain the code information. When the detection element is located at the boundary between the north and south poles, the detected value approaches 0 (zero), and accurate code information may not be read. However, in this embodiment, groups A and B are offset by half a pitch. Therefore, when the detection element in group A is located at the boundary between the north and south poles, the detection element in group B is away from the boundary, and when the detection element in group B is located at the boundary between the north and south poles, the detection element in group A is away from the boundary. Therefore, the correct code information can be read from either group. The question of which code information from group A or group B to use will be discussed later.
次に、ステップS4に移り、А群とB群のコード情報から、予め記録してあるルックアップテーブル36を用いて、А群とB群のそれぞれのコード位置番号を取得する。本実施形態では、ルックアップテーブル36に記録した図4の表IIを参照してコード位置番号を取得している。なお、本実施形態では、取得したコード位置番号は、A群のコード位置番号とB群のコード位置番号とが同じ場合と、B群の位置がA群の位置よりも半ピッチ進んでいるため、B群のコード位置番号がA群のコード位置番号よりも1だけ大きい場合とが発生する。ステップS1~ステップS4までの処理は、位置算出部30のコード情報等取得部31が行う。 Next, proceed to step S4, where the chord position numbers for groups A and B are obtained from the chord information for groups A and B using a pre-recorded lookup table 36. In this embodiment, the chord position numbers are obtained by referencing Table II in Figure 4, which is recorded in the lookup table 36. Note that in this embodiment, the obtained chord position numbers may be the same for group A and group B, or may be one greater than the chord position number for group A because the position of group B is half a pitch ahead of the position of group A. The processing from steps S1 to S4 is performed by the chord information acquisition unit 31 of the position calculation unit 30.
次に、ステップS5に移り、A群のコード位置番号が使用している磁気スケールの範囲外かどうかを判定する。範囲外であった場合(「YES」の場合)、ステップS6に移り、A群の無効フラグを立てた後、ステップS9の処理に進む。本実施形態では、コード位置番号が0~54が有効範囲であり、図4の表IIで示すように、有効範囲外のコード位置番号には「255」が割り当てられている。 Next, proceed to step S5, where it is determined whether the code position number for group A is outside the range of the magnetic scale being used. If it is outside the range (if "YES"), proceed to step S6, set the invalid flag for group A, and then proceed to step S9. In this embodiment, the valid range for code position numbers is 0 to 54, and as shown in Table II in Figure 4, "255" is assigned to code position numbers outside the valid range.
ステップS5でA群のコード位置番号が範囲内であった場合(「NO」の場合)、ステップS7に移り、取得したA群のコード位置番号から位置計算に使用する4つの検出素子を、予め記録してあるルックアップテーブル36から取得する。本実施形態では、図5の表αに示す各コード位置番号に対応した4つの検出素子をAw、Ax、Ay、Azとして選択しており、例えば、A群のコード位置番号が1の場合は、4つの検出素子Aw、Ax、Ay、AzとしてそれぞれA5、B3、A6、B3が選ばれる。以降、4つの検出素子Aw、Ax、Ay、Azのそれぞれの検出値についても単にAw、Ax、Ay、Azと呼ぶ。図9Aに、コード位置番号0~1において、A群の各検出素子から内挿値算出のために選択された検出素子の検出値を示す。 If the code position number for group A is within the range in step S5 ("NO"), proceed to step S7, where the four detection elements to be used for position calculation based on the acquired code position number for group A are obtained from the pre-recorded lookup table 36. In this embodiment, the four detection elements Aw, Ax, Ay, and Az corresponding to each code position number shown in Table α in Figure 5 are selected. For example, when the code position number for group A is 1, A5, B3, A6, and B3 are selected as the four detection elements Aw, Ax, Ay, and Az, respectively. Hereinafter, the detection values of the four detection elements Aw, Ax, Ay, and Az will also be simply referred to as Aw, Ax, Ay, and Az. Figure 9A shows the detection values of the detection elements selected from each detection element in group A for calculating the interpolated value for code position numbers 0 to 1.
ステップS7からステップS8に移り、A群の検出素子対の各検出素子の検出値の差分値を計算する。本実施形態では、地磁気の影響や温度変化等の影響を減らすため、4つの検出素子の検出値から2つの差分値を計算する。2つの差分値をそれぞれAu、Avとすると次式で計算できる。
Au=Ax-Aw・・・式1
Av=Az-Ay・・・式2
図10Aは、コード位置番号0~1において、A群の検出素子対の各検出素子の検出値の差分値を示す図である。図10Aに示すように、差分値Auは、変位が3mmの位置でゼロを横切っており、差分値Avは、変位が6mmの位置でゼロを横切っていることが分かる。
The process proceeds from step S7 to step S8, where the difference values of the detection values of each detection element of the detection element pair in group A are calculated. In this embodiment, two difference values are calculated from the detection values of the four detection elements to reduce the influence of geomagnetism, temperature changes, etc. If the two difference values are Au and Av, respectively, they can be calculated using the following equation.
Au=Ax-Aw...Formula 1
Av=Az-Ay...Formula 2
10A is a diagram showing the difference between the detection values of each detection element of the detection element pair in group A at code position numbers 0 to 1. As shown in Fig. 10A, it can be seen that the difference value Au crosses zero at a position where the displacement is 3 mm, and the difference value Av crosses zero at a position where the displacement is 6 mm.
ステップS6またはステップS8からステップS9に移り、B群のコード位置番号が使用している磁気スケールの範囲外かどうかを判定する。範囲外であった場合(「YES」の場合)、ステップS10に移り、B群の無効フラグを立てた後、ステップS13の処理に進む。ステップS5での判断と同様に、B群についてもコード位置番号が0~54が有効範囲であり、図4の表IIで示すように、有効範囲外のコード位置番号には「255」が割り当てられている。 The process proceeds from step S6 or step S8 to step S9, where it is determined whether the code position number for group B is outside the range of the magnetic scale being used. If it is outside the range (if "YES"), it proceeds to step S10, where an invalid flag for group B is set, and then processing proceeds to step S13. As with the determination in step S5, the valid range for code position numbers for group B is 0 to 54, and as shown in Table II in Figure 4, "255" is assigned to code position numbers outside the valid range.
ステップS9でB群のコード位置番号が範囲内であった場合(「NO」の場合)、ステップS11に移り、取得したB群のコード位置番号から位置計算に使用する4つの検出素子を、予め記録してあるルックアップテーブル36から取得する。本実施形態では、図5の表βに示す各コード位置番号に対応した4つの検出素子をBw、Bx、By、Bzとして選択しており、例えば、B群のコード位置番号が0の場合は、4つの検出素子Bw、Bx、By、BzとしてそれぞれA6、B5、A6、B4が選ばれる。以降、4つの検出素子Bw、Bx、By、Bzのそれぞれの検出値についても単にBw、Bx、By、Bzと呼ぶ。なお、ステップS11の処理は、位置算出部30の内挿値算出用検出素子特定部33が行う。図9Bに、コード位置番号0~1において、B群の各検出素子から内挿値算出のために選択された検出素子Bw、Bx、By、Bzの検出値を示す。 If the code position number for group B is within the range in step S9 ("NO"), proceed to step S11, where the four detection elements to be used for position calculation are retrieved from the pre-recorded lookup table 36 based on the retrieved code position number for group B. In this embodiment, the four detection elements Bw, Bx, By, and Bz are selected as the four corresponding code position numbers shown in Table β of Figure 5. For example, when the code position number for group B is 0, A6, B5, A6, and B4 are selected as the four detection elements Bw, Bx, By, and Bz, respectively. Hereinafter, the detection values of the four detection elements Bw, Bx, By, and Bz are simply referred to as Bw, Bx, By, and Bz. Note that the processing of step S11 is performed by the detection element identification unit 33 for interpolated value calculation in the position calculation unit 30. Figure 9B shows the detection values of the detection elements Bw, Bx, By, and Bz selected from the detection elements of group B for interpolated value calculation at code position numbers 0 to 1.
次に、ステップS11からステップS12に移り、B群の検出素子対の各検出素子の検出値の差分値を計算する。本実施形態では、地磁気の影響や温度変化等の影響を減らすため、4つの検出素子の検出値から2つの差分値を計算する。2つの差分値をそれぞれAu、Avとすると次式で計算できる。
Bu=Bx-Bw・・・式3
Bv=Bz-By・・・式4
図10Bは、コード位置番号0~1において、B群の検出素子対の各検出素子の検出値の差分値を示す図である。図10Bに示すように、差分値Buは、変位が0mmと6mmの位置でゼロを横切っており、差分値Bvは、変位が3mmと9mmの位置でゼロを横切っていることが分かる。なお、ステップS5~ステップS12までの処理は、位置算出部30の内挿値算出用検出素子特定部33が主として行う。
Next, the process proceeds from step S11 to step S12, where the difference values of the detection values of each detection element of the detection element pair of group B are calculated. In this embodiment, two difference values are calculated from the detection values of the four detection elements to reduce the influence of geomagnetism, temperature changes, etc. If the two difference values are Au and Av, respectively, they can be calculated using the following equation.
Bu=Bx-Bw...Formula 3
Bv=Bz-By...Formula 4
10B is a diagram showing the difference between the detection values of each detection element of the detection element pair in group B at code position numbers 0 to 1. As shown in FIG. 10B, it can be seen that the difference value Bu crosses zero at displacement positions of 0 mm and 6 mm, and the difference value Bv crosses zero at displacement positions of 3 mm and 9 mm. Note that the processing from step S5 to step S12 is mainly performed by the interpolation value calculation detection element identification unit 33 of the position calculation unit 30.
次に、ステップS13に移り、A群の無効フラグとB群の無効フラグの両方の無効フラグが立っているか判断し、立っている場合(「YES」の場合)、ステップS14に移って、エラー出力を行ない、絶対位置の算出を終了する。この処理は、主に検出装置の検出素子群Sが磁気スケールの有効範囲外にある場合に発生する。 Next, the process moves to step S13, where it is determined whether both the invalid flags for group A and group B are set. If they are set (YES), the process moves to step S14, where an error is output and the calculation of the absolute position is terminated. This process mainly occurs when the detection element group S of the detection device is outside the effective range of the magnetic scale.
ステップS13で、A群の無効フラグとB群の無効フラグの両方の無効フラグが立っていない場合(「NO」の場合)、ステップS15以降の処理に移り、A群とB群どちらのコード位置番号の差分値を使用して絶対位置計算に用いる区間内挿値を算出するのか判定する。まず、ステップS15において、A群の無効フラグが立っているかどうかを判別し、A群の無効フラグがたっている場合(「YES」の場合)、ステップS20に移り、B群の差分値Bu、Bvを用いて区間内挿値の計算を行う。また、ステップS15で、A群の無効フラグが立っていない場合(「NO」の場合)、ステップS16に移り、B群の無効フラグが立っているかどうかを判別する。ステップS16で、B群の無効フラグが立っている場合(「YES」の場合)は、ステップS19に移り、A群の差分値Au、Avを用いて区間内挿値の計算を行う。 If neither the invalid flag for group A nor the invalid flag for group B is set in step S13 (if "NO"), the process proceeds to step S15 and subsequent steps, where it is determined whether the difference value of the code position number of group A or group B should be used to calculate the interval interpolation value used in the absolute position calculation. First, in step S15, it is determined whether the invalid flag for group A is set. If the invalid flag for group A is set (if "YES"), the process proceeds to step S20, where the interval interpolation value is calculated using the difference values Bu and Bv of group B. Also, if the invalid flag for group A is not set (if "NO") in step S15, the process proceeds to step S16, where it is determined whether the invalid flag for group B is set. If the invalid flag for group B is set (if "YES") in step S16, the process proceeds to step S19, where the interval interpolation value is calculated using the difference values Au and Av of group A.
また、ステップS16で、B群の無効フラグが立っていない場合(「NO」の場合)、すなわち、A群とB群の両方の無効フラグが立っていない場合、ステップS17に移り、A群のコード位置番号とB群のコード位置番号とが同じであるかどうかを判別する。A群のコード位置番号とB群のコード位置番号とが同じならば(「YES」の場合)、ステップS18の処理に移る。ステップS18では、差分値Bvの大きさが負の値の場合(「YES」の場合)は、ステップS19に移り、A群の差分値Au、Avを用いて区間内挿値の計算を行う。また、差分値Bvの大きさが負の値でない場合(「NO」の場合)は、ステップS20に移り、B群の差分値Bu、Bvを用いて区間内挿値の計算を行う。 Also, if the invalid flag for group B is not set in step S16 (if "NO"), that is, if the invalid flags for both group A and group B are not set, proceed to step S17, where it is determined whether the code position number for group A and the code position number for group B are the same. If the code position number for group A and the code position number for group B are the same (if "YES"), proceed to processing in step S18. If the magnitude of the difference value Bv is negative (if "YES") in step S18, proceed to step S19, where the interval interpolation value is calculated using the difference values Au and Av for group A. If the magnitude of the difference value Bv is not negative (if "NO"), proceed to step S20, where the interval interpolation value is calculated using the difference values Bu and Bv for group B.
ステップS17で、A群のコード位置番号とB群のコード位置番号が異なっている場合(「NO」の場合)は、ステップS21に移り、B群のコード位置番号がA群のコード位置番号がBより1大きい値ならば(「YES」の場合)、ステップS22に移る。ステップS22では、差分値Avの大きさが負の値の場合(「YES」の場合)は、ステップS20に移り、B群の差分値Bu、Bvを用いて区間内挿値の計算を行う。また、差分値Avの大きさが負の値でない場合(「NO」の場合)は、ステップS19に移り、A群の差分値Au、Avを用いて区間内挿値の計算を行う。 If the code position number of group A and the code position number of group B are different in step S17 (if "NO"), proceed to step S21. If the code position number of group B is one greater than the code position number of group A (if "YES"), proceed to step S22. If the magnitude of the difference value Av is negative in step S22 (if "YES"), proceed to step S20, where the interval interpolation value is calculated using the difference values Bu and Bv of group B. If the magnitude of the difference value Av is not negative (if "NO"), proceed to step S19, where the interval interpolation value is calculated using the difference values Au and Av of group A.
ステップS21では、B群のコード位置番号がA群のコード位置番号より1大きい値でない場合(「NO」の場合)は、ステップS23に移り、A群の各検出値の絶対値の最小値がB群の各検出値の絶対値の最小値より大きいかどうかを判別する。そして、A群の各検出値の絶対値の最小値がB群の各検出値の絶対値の最小値より大きい場合(「YES」の場合)は、ステップS19に移り、A群の差分値Au、Avを用いて区間内挿値の計算を行う。また、A群の各検出値の絶対値の最小値がB群の各検出値の絶対値の最小値より大きくない場合(「NO」の場合)は、ステップS20に移り、B群の差分値Bu、Bvを用いて区間内挿値の計算を行う。 In step S21, if the code position number of group B is not one greater than the code position number of group A (if "NO"), proceed to step S23, where it is determined whether the minimum absolute value of the detected values of group A is greater than the minimum absolute value of the detected values of group B. If the minimum absolute value of the detected values of group A is greater than the minimum absolute value of the detected values of group B (if "YES"), proceed to step S19, where the interval interpolation value is calculated using the difference values Au and Av of group A. If the minimum absolute value of the detected values of group A is not greater than the minimum absolute value of the detected values of group B (if "NO"), proceed to step S20, where the interval interpolation value is calculated using the difference values Bu and Bv of group B.
ステップS19またはステップS20で区間内挿値を計算した後は、ステップS24に移り、コード位置番号によるコード区間位置算出値に区間内挿値を加算することによって、絶対位置を求める。ステップS24の処理は、位置算出部30の絶対位置算出部35が行う。 After calculating the interval interpolation value in step S19 or step S20, the process proceeds to step S24, where the absolute position is calculated by adding the interval interpolation value to the code interval position calculated using the code position number. The processing of step S24 is performed by the absolute position calculation unit 35 of the position calculation unit 30.
図11は、コード位置番号0~1において、区間内挿値を算出するためにA群とB群のいずれの内挿値算出用検出素子の差分値を用いるかを説明するための図である。区間Aは、A群のコード位置番号とB群のコード位置番号が同じ場合の範囲を示しており、区間Bは、B群のコード位置番号がA群のコード位置番号より1大きい値の場合の範囲を示している。また、区間C1はA群のコード位置番号が変化する近辺の範囲、区間C2は、B群のコード位置番号が変化する近辺の範囲を示している。 Figure 11 is a diagram explaining which difference value of the interpolation value calculation detection element in group A or group B is used to calculate the interval interpolation value for code position numbers 0 to 1. Interval A indicates the range where the code position number in group A and the code position number in group B are the same, and interval B indicates the range where the code position number in group B is one greater than the code position number in group A. Additionally, interval C1 indicates the range around where the code position number in group A changes, and interval C2 indicates the range around where the code position number in group B changes.
図12は、コード位置番号0~1において、A群とB群の各検出素子の検出値の絶対値の最小値の変化を示す図である。検出素子群Sの変位が図11に示した区間C1またはC2にある場合に、図12に示すデータにしたがって、ステップS23の判別を行っている。そして、区間C1では、B群の差分値Bu、Bvを用いて区間内挿値の計算を行い、区間C2では、A群の差分値Au、Avを用いて区間内挿値の計算を行っている。また、図11に示す区間Dは、A群のコード位置番号が範囲外となるため、ステップS15の判定によって、B群の差分値Bu、Bvを用いて区間内挿値の計算を行っている。 Figure 12 shows the change in the minimum absolute value of the detection values of each detection element in groups A and B for code position numbers 0 to 1. When the displacement of detection element group S is within range C1 or C2 shown in Figure 11, step S23 is performed according to the data shown in Figure 12. In range C1, the difference values Bu and Bv of group B are used to calculate the interval interpolation value, and in range C2, the difference values Au and Av of group A are used to calculate the interval interpolation value. In range D shown in Figure 11, the code position number of group A is outside the range, so step S15 determines that the difference values Bu and Bv of group B are used to calculate the interval interpolation value.
(区間内挿値算出)
図13は、B群の検出素子対の各検出素子の検出値の差分値を用いて区間内挿値を算出する方法を説明するための図である。磁気スケール10と検出装置20との変位が0~3mmの位置にあるときは、B群のコード位置番号とB群の差分値Bu、Bvを用いて区間内挿値の計算を行う。差分値Buは変位0mmの位置で0の値となっており、差分値Bvは3mmの位置で0の値となっている。変位0~3mmの範囲において、差分値Buは常に負であり、差分とBvは常に正である。差分値Buと差分値Bvの変化が平行であると仮定すると変位Lの大きさは、1ピッチの長さをPとすると、比例関係により次式で求まる。
L=Bu/(Bu-Bv)×P/2・・・式3
(interval interpolation calculation)
13 is a diagram illustrating a method for calculating an interval interpolation value using the difference between the detection values of each detection element in the detection element pair of group B. When the displacement between the magnetic scale 10 and the detection device 20 is between 0 and 3 mm, the interval interpolation value is calculated using the code position number of group B and the difference values Bu and Bv of group B. The difference value Bu is 0 at a displacement of 0 mm, and the difference value Bv is 0 at a displacement of 3 mm. In the range of displacement between 0 and 3 mm, the difference value Bu is always negative, and the difference Bv is always positive. Assuming that the changes in the difference values Bu and Bv are parallel, the magnitude of the displacement L can be calculated by the following equation, based on a proportional relationship, where P is the length of one pitch.
L=Bu/(Bu-Bv)×P/2...Formula 3
図14は、A群の検出素子対の各検出素子の検出値の差分値を用いて区間内挿値を算出する方法を説明するための図である。磁気スケール10と検出装置20との変位が3~6mmの位置にあるときは、A群のコード位置番号とA群の差分値Au、Avを用いて区間内挿値の計算を行う。差分値Auは変位3mmの位置で0の値となっており、差分値Avは6mmの位置で0の値となっている。また、変位3~6mmの範囲において、差分値Auは常に負であり、差分とAvは常に正である。差分値Auと差分値Avの変化が平行であると仮定すると、変位3mm(P/2)の位置を起点としたLの大きさは、比例関係により次式で求まる。
L=Au/(Au-Av)×P/2・・・式4
FIG. 14 is a diagram illustrating a method for calculating an interval interpolation value using the difference between the detection values of each detection element of a detection element pair in group A. When the displacement between the magnetic scale 10 and the detection device 20 is between 3 and 6 mm, the interval interpolation value is calculated using the code position number of group A and the difference values Au and Av of group A. The difference value Au is 0 at a displacement of 3 mm, and the difference value Av is 0 at a displacement of 6 mm. Furthermore, in the range of 3 to 6 mm of displacement, the difference value Au is always negative, and the difference Av is always positive. Assuming that the changes in the difference values Au and Av are parallel, the magnitude of L, starting from the position of 3 mm of displacement (P/2), can be calculated using the following proportional relationship:
L=Au/(Au-Av)×P/2...Formula 4
したがって、変位が0~6mmの範囲内において、
B群のコード位置番号を参照していた場合、区間内挿値は、
Bu/(Bu-Bv)×P/2・・・式5
で求まり、A群のコード位置番号を参照していた場合、区間内挿値は、
Au/(Au-Av)×P/2+P/2・・・式6
で求まる。
Therefore, within the range of displacement of 0 to 6 mm,
If the code position number of group B is referenced, the interval interpolation value is
Bu/(Bu-Bv)×P/2...Equation 5
If the code position number of group A is referenced, the interval interpolation value is
Au/(Au-Av)×P/2+P/2...Formula 6
can be calculated using the formula:
また、1ピッチ6mmの内挿値は120であるため、B群のコード位置番号を参照していた場合、区間内挿値は、
Bu/(Bu-Bv)×60・・・式7
で求まり、A群のコード位置番号を参照していた場合、区間内挿値は、
Au/(Au-Av)×60+60・・・式8
で求まる。
In addition, since the interpolated value for one pitch of 6 mm is 120, when the code position number of group B is referenced, the section interpolated value is
Bu/(Bu-Bv)×60...Formula 7
If the code position number of group A is referenced, the interval interpolation value is
Au/(Au-Av)×60+60...Formula 8
can be calculated using the formula:
絶対位置は、コード位置番号によるコード区間位置算出値に区間内挿値を加算することによって求めるが、その際、コード位置番号としては、A群のコード位置番号を参照していた場合はA群のコード位置番号を採用し、B群のコード位置番号を参照していた場合はB群のコード位置番号を採用すればよい。本実施形態の場合、1ピッチは6mmに設定しているため、0~54の値をとるコード位置番号に6mmを乗算した値が、コード位置番号によるコード区間位置算出値となる。なお、コード区間位置算出値の算出は、位置算出部30のコード区間位置算出部32が行っている。 The absolute position is found by adding the interval interpolation value to the chord interval position calculated from the chord position number. In this case, if a chord position number from group A was referenced, the chord position number from group A is used, and if a chord position number from group B was referenced, the chord position number from group B is used. In this embodiment, one pitch is set to 6 mm, so the chord interval position calculated from the chord position number is the value obtained by multiplying the chord position number, which takes values from 0 to 54, by 6 mm. The chord interval position calculation value is calculated by the chord interval position calculation unit 32 of the position calculation unit 30.
図15は、コード区間位置算出値と区間内挿値から絶対位置を算出した際の結果を示す図である。図15(A)は上記の処理フローから求めた区間内挿値の変化を示す図であり、図15(B)は、コード位置番号に対応したコード区間位置算出値の変化を示す図である。そして、図15(C)は、図15(A)に示す区間内挿値と図15(B)に示すコード区間位置算出値を加算することで得られる絶対位置算出値を示しており、絶対位置の値は変位に対してほぼ直線的な変化をしていることが分かる。図15では、変位が0~12mmでコード位置番号が0、1の範囲のみを示しているが、コード位置番号2~54の範囲においても、上記の処理フローにしたがって、絶対位置を算出することができる。 Figure 15 shows the results of calculating absolute position from the calculated code section position value and the section interpolation value. Figure 15(A) shows the change in the section interpolation value obtained from the above processing flow, and Figure 15(B) shows the change in the calculated code section position value corresponding to the code position number. Figure 15(C) shows the calculated absolute position value obtained by adding the section interpolation value shown in Figure 15(A) and the calculated code section position value shown in Figure 15(B). It can be seen that the absolute position value changes almost linearly with displacement. Figure 15 only shows the range of displacement from 0 to 12 mm and code position numbers 0 and 1, but absolute position can also be calculated for code position numbers 2 to 54 according to the above processing flow.
(検出素子群切り替え部分での絶対位置の連続性)
連続的に磁気スケール10の絶対位置を検出するために、本実施形態では、A群とB群の検出素子群の切り替え部分で絶対位置算出値の飛びをなくす必要がある。A群とB群の検出素子群の切り替え部分、すなわち、A群のコード位置番号から得られた内挿値算出用検出素子の検出値を用いる場合とB群のコード位置番号から得られた内挿値算出用検出素子の検出値を用いる場合との切り替え部分では、位置計算のための計算式が変わるが、切り替え部分での位置の計算値が一致していれば飛びは発生していない。以下、本実施形態において、検出素子群の切り替え部分の一の計算値が一致しているかどうかを検証する。
(Continuity of absolute position at the detection element group switching part)
In order to continuously detect the absolute position of the magnetic scale 10, in this embodiment, it is necessary to eliminate jumps in the calculated absolute position value at the switching portion between the detecting element groups A and B. At the switching portion between the detecting element groups A and B, i.e., at the switching portion between the case where the detected values of the detecting elements for calculating interpolated values obtained from the code position numbers of group A are used and the case where the detected values of the detecting elements for calculating interpolated values obtained from the code position numbers of group B are used, the formula for calculating the position changes, but if the calculated values for the position at the switching portion match, no jumps have occurred. Below, in this embodiment, it will be verified whether the calculated values at one of the switching portions of the detecting element groups match.
前提として、コード位置番号の切り替えは、図11に示すように磁気スケール10の端から、B群のコード位置番号0、A群のコード位置番号0、B群のコード位置番号1へと順次切り替えが進み、スケール端のA群のコード位置番号54まで切り替えが続く。各コード位置番号で選択する検出素子の検出値について、第5図のコード位置番号-内挿値算出用検出素子対応表を参照すれば、B群のコード位置番号とA群のコード位置番号が同じ値の場合、B群のBy、Bzの検出素子対の検出素子とA群のAw、Axの検出素子対の検出素子が一致しており、B群のコード位置番号がA群コードの位置番号より1つ大きい場合、B群のBw、Bxの検出素子対の検出素子とA群のAy、Azの検出素子対の検出素子が一致している。 As a premise, as shown in Figure 11, the code position number is switched sequentially from the end of the magnetic scale 10, starting from code position number 0 in group B, code position number 0 in group A, code position number 1 in group B, and continuing until code position number 54 in group A at the end of the scale. Regarding the detection value of the detector element selected for each code position number, referring to the code position number - detector element correspondence table for calculating interpolated values in Figure 5, if the code position number in group B and the code position number in group A are the same, the detector element in the By, Bz detector pair in group B matches the detector element in the Aw, Ax detector pair in group A. If the code position number in group B is one greater than the code position number in group A, the detector element in the Bw, Bx detector pair in group B matches the detector element in the Ay, Az detector pair in group A.
ここで、式1~式4を参照すれば、
Au=Ax-Aw・・・式1
Av=Az-Ay・・・式2
Bu=Bx-Bw・・・式3
Bv=Bz-By・・・式4
であるから、A群とB群のコード位置番号が等しい場合、差分値Bvと差分値Auは等しい値となり、B群のコード位置番号がA群コードの位置番号より1つ大きい場合、差分値Avと差分値Buが等しい値になっている。そして、図11で示すように、A群とB群の検出素子群の切り替え地点は差分値Bvあるいは差分値Avが0になる部分である。このことは、コード位置番号が大きくなっても変わらず、B群のコード位置番号k(0~54)からA群のコード位置番号kに切り替わる部分は、差分値Bvと差分値Auが共に0である。
Here, referring to Equations 1 to 4,
Au=Ax-Aw...Formula 1
Av=Az-Ay...Formula 2
Bu=Bx-Bw...Formula 3
Bv=Bz-By...Formula 4
Therefore, when the code position numbers of group A and group B are the same, the difference values Bv and Au are equal, and when the code position number of group B is one greater than the code position number of group A, the difference values Av and Bu are equal. As shown in Figure 11, the switching point between the detection element groups of group A and group B is the point where the difference value Bv or difference value Av becomes 0. This does not change even if the code position number increases, and at the point where the code position number switches from group B code position number k (0 to 54) to group A code position number k, the difference values Bv and Au are both 0.
以上を前提として、図6Bに示す処理フローのステップS19、ステップS20、および、ステップS24の計算を行うと、B群のコード位置番号k(0~54)からA群のコード位置番号kに切り替わる部分の絶対位置算出値は、次のようになる。
式5によるB群の区間内挿値を用いた位置計算では、
Bu/(Bu-Bv)×P/2+k×P=Bu/(Bu-0)×P/2+k×P=P/2+k×P、
式6によるA群の区間内挿値を用いた位置計算では、
Au/(Au-Av)×P/2+P/2+k×P=0/(0-Av)×P/2+P/2+k×P=P/2+k×P、
となり、同じ値となる。ここで、k×Pの値は、コード区間位置算出値に相当し、以下、同様である。
Based on the above assumptions, when the calculations in steps S19, S20, and S24 of the processing flow shown in FIG. 6B are performed, the calculated absolute position value of the portion where code position number k (0 to 54) in group B switches to code position number k in group A is as follows:
In the position calculation using the interval interpolation value of group B according to Equation 5,
Bu/(Bu-Bv)×P/2+k×P=Bu/(Bu-0)×P/2+k×P=P/2+k×P,
In the position calculation using the section interpolation value of group A according to Equation 6,
Au/(Au-Av)×P/2+P/2+k×P=0/(0-Av)×P/2+P/2+k×P=P/2+k×P,
Here, the value of k×P corresponds to the chord section position calculation value, and the same applies below.
ここで、1ピッチの内挿値120を用いると、本実施形態のB群のコード位置番号0からA群コード位置番号0へ切り替える地点では、
式5によるB群の区間内挿値を用いた位置計算では、
Bu/(Bu-0)×60+0×120=60+0×120=60、
式6によるA群の区間内挿値を用いた位置計算では、
0/(0-Av)×60+60+0×120=0+60+0×120=60、
となり、値が一致している。
Here, when the interpolation value of 120 for one pitch is used, at the point where the chord position number of the B group is switched to the chord position number of the A group in this embodiment,
In the position calculation using the interval interpolation value of group B according to Equation 5,
Bu/(Bu-0)×60+0×120=60+0×120=60,
In the position calculation using the section interpolation value of group A according to Equation 6,
0/(0-Av)×60+60+0×120=0+60+0×120=60,
and the values match.
同様に、A群のコード位置番号k(0~53)からB群のコード位置番号k+1に切り替わる部分は差分値Avと差分値Buが共に0である。図6Bに示す、ステップS19、ステップS20、および、ステップS24の計算を行うと、A群のコード位置番号k(0~53)からB群のコード位置番号k+1に切り替わる部分の位置は、次のようになる。
式6によるA群の区間内挿値を用いた位置計算では、Au/(Au-0)×P/2+P/2+k×P=Au/(Au-0)×P/2+P/2+k×P=P+k×P、
式5によるB群の区間内挿値を用いた位置計算では、Bu/(Bu-Bv)×P/2=0/(0-Bv)×P/2+(k+1)×P=P+k×P、
となり、同じ値となる。
Similarly, at the portion where code position number k (0 to 53) in group A switches to code position number k+1 in group B, difference values Av and Bu are both 0. When the calculations in steps S19, S20, and S24 shown in Figure 6B are performed, the position at which code position number k (0 to 53) in group A switches to code position number k+1 in group B is determined as follows:
In the position calculation using the section interpolation value of group A according to Equation 6, Au/(Au-0)×P/2+P/2+k×P=Au/(Au-0)×P/2+P/2+k×P=P+k×P,
In the position calculation using the section interpolation value of group B according to Equation 5, Bu/(Bu-Bv) x P/2 = 0/(0-Bv) x P/2 + (k+1) x P = P + k x P,
and the values are the same.
同様に、1ピッチの内挿値120を用いると、本実施形態のA群のコード位置番号0からB群のコード位置番号1に切り替わる地点では、
式6によるA群の区間内挿値を用いた位置計算では、Au/(Au-0)×60+60+0×120=60+60+0×120=120、
式5によるB群の区間内挿値を用いた位置計算では、0/(0-Bv)×60+(0+1)×120=0+1×120=120、
となり、値が一致している。
以上のように、本実施形態では、A群からB群への切り替え部分、および、B群からA群への切り替え部分での、計算位置の値が同じになっているため、検出素子群の切り替え部分での位置算出値の飛びは発生しないため、絶対位置の連続性が確保できている。
Similarly, when the interpolation value 120 of one pitch is used, at the point where the chord position number 0 of group A switches to the chord position number 1 of group B in this embodiment,
In the position calculation using the section interpolation value of group A according to Equation 6, Au/(Au-0) x 60 + 60 + 0 x 120 = 60 + 60 + 0 x 120 = 120,
In the position calculation using the section interpolation value of group B according to Equation 5, 0/(0-Bv) x 60 + (0 + 1) x 120 = 0 + 1 x 120 = 120,
and the values match.
As described above, in this embodiment, the calculated position values are the same at the switching point from group A to group B and at the switching point from group B to group A, so there is no jump in the calculated position value at the switching point between the detection element groups, ensuring continuity of the absolute position.
(コード位置番号-内挿値算出用検出素子対応表)
図5に示したコード位置番号-内挿値算出用検出素子対応表の作成方法について説明する。まず、前提として、B群のコード位置番号とA群のコード位置番号が同じ値の場合、図5において薄いハッチングで示すように、B群のBy、Bzの検出素子対とA群のAw、Axの検出素子対が一致しており、B群のコード位置番号がA群コードの位置番号より1つ大きい場合、図5において濃いハッチングで示すように、B群のBw、Bxの検出素子対とA群のAy、Azの検出素子対が一致している。一致していない個所は、磁気スケール10の両端に相当する、B群のコード位置番号0のBw、Bxの検出素子対とA群のコード位置番号54のAy、Azの検出素子対のみである。よって、本実施形態で作成されるコード位置番号-内挿値算出用検出素子対応表は、A群のコード位置番号0~54における検出素子Aw、Ax、Ay、Azと、B群のコード位置番号0における検出素子Bw、Bxを選定することで作成できる。
(Code position number - detection element correspondence table for calculating interpolated values)
A method for creating the code position number-detector element correspondence table for calculating interpolated values shown in Fig. 5 will be described. First, as a premise, when the code position number of group B and the code position number of group A are the same value, the pair of detector elements By and Bz in group B matches the pair of detector elements Aw and Ax in group A, as shown by light hatching in Fig. 5. When the code position number of group B is one greater than the code position number of group A, the pair of detector elements Bw and Bx in group B matches the pair of detector elements Ay and Az in group A, as shown by thick hatching in Fig. 5. The only locations where they do not match are the pair of detector elements Bw and Bx at code position number 0 in group B and the pair of detector elements Ay and Az at code position number 54 in group A, which correspond to both ends of the magnetic scale 10. Therefore, the code position number - detection element correspondence table for calculating interpolated values created in this embodiment can be created by selecting detection elements Aw, Ax, Ay, and Az at code position numbers 0 to 54 in group A, and detection elements Bw and Bx at code position number 0 in group B.
次に、各コード位置番号での内挿値算出用検出素子Aw、Ax、Ay、Azの条件について説明する。図6Bに示す処理フローのステップS19の計算において、内挿値を算出するために適切な差分値Au、Avを得るためのAw、Ax、および、Ay、Azの各検出素子対の組み合わせを、各コード位置番号において選択する。内挿値算出用検出素子Aw、Ax、Ay、Azは、該当するコード位置番号におけるすべての検出素子A1~B6の中から条件に合うものが選択される。 Next, we will explain the conditions for the detector elements Aw, Ax, Ay, and Az used to calculate the interpolated value at each code position number. In the calculation of step S19 of the processing flow shown in Figure 6B, combinations of detector element pairs Aw, Ax, and Ay, Az are selected for each code position number to obtain appropriate difference values Au and Av for calculating the interpolated value. The detector elements Aw, Ax, Ay, and Az used to calculate the interpolated value that meet the conditions are selected from all detector elements A1 to B6 at the corresponding code position number.
図16は、A群がコード位置番号0にある場合に、全ての検出素子の検出値を示す図である。図17、図18は、A群がコード位置番号0にある場合に、内挿値算出用検出素子の選定条件を示した表であり、図17は、内挿値算出用検出素子Aw、Axの条件として表Aと表Bの2例を示しており、図18は、内挿値算出用検出素子Ay、Azの条件として表Cと表Dの2例を示している。図17、図18では、コード位置番号の範囲内で、左側、中心、右側における検出値の特徴を記載している。また、図19、図20は、A群がコード位置番号0にある場合に、内挿値算出用検出素子の選定条件を満たす検出素子対の各検出素子の検出値を示す図であり、図19の(A)と(B)は、それぞれ、図17に示す表Aと表Bの条件に合う検出素子を、また、図20の(C)と(D)は、それぞれ、図18に示す表Cと表Dの条件に合う検出素子の検出値を示している。 Figure 16 shows the detection values of all detection elements when group A is at code position number 0. Figures 17 and 18 are tables showing the selection conditions for detection elements for calculating interpolated values when group A is at code position number 0. Figure 17 shows two examples, Tables A and B, of the conditions for detection elements Aw and Ax for calculating interpolated values, and Figure 18 shows two examples, Tables C and D, of the conditions for detection elements Ay and Az for calculating interpolated values. Figures 17 and 18 show the characteristics of the detection values on the left, center, and right sides within the range of code position numbers. Figures 19 and 20 show the detection values of each detection element in a detection element pair that meets the selection conditions for a detection element for calculating an interpolated value when group A is at code position number 0. (A) and (B) in Figure 19 show the detection elements that meet the conditions in Tables A and B shown in Figure 17, respectively, and (C) and (D) in Figure 20 show the detection values of the detection elements that meet the conditions in Tables C and D shown in Figure 18, respectively.
例えば、図17の表Aに示したAwの条件を満たす検出素子は、左側がマイナス、中心が0付近、右側がプラスとなる検出値を有している。この条件に合う検出値を有する検出素子を図16から選択すると、検出素子B5が該当する。また、図17の表Aに示したAxの条件を満たす検出素子は、左側が0付近、中心がマイナスとなる検出値を有している。この条件に合う検出値を有する検出素子を図16から選択すると、検出素子A5が該当する。したがって、図17の表Aに示した条件では、AwがB5、AxがA5となり、各検出値は、図19の(A)に示すとおりとなる。 For example, a detection element that meets the Aw condition shown in Table A of Figure 17 has a detection value that is negative on the left, near 0 in the center, and positive on the right. When selecting a detection element from Figure 16 that has a detection value that meets this condition, detection element B5 is the one that fits. Furthermore, a detection element that meets the Ax condition shown in Table A of Figure 17 has a detection value that is near 0 on the left and negative in the center. When selecting a detection element from Figure 16 that has a detection value that meets this condition, detection element A5 is the one that fits. Therefore, under the conditions shown in Table A of Figure 17, Aw is B5 and Ax is A5, and the detection values are as shown in (A) of Figure 19.
また、図17の表Bに示したAwの条件を満たす検出素子は、左側が0付近、中心がプラスとなる検出値を有している。この条件に合う検出値を有する検出素子を図16から選択すると、検出素子A6該当する。また、図17の表Bに示したAxの条件を満たす検出素子は、左側がプラス、中心が0付近、右側がマイナスなる検出値を有している。この条件に合う検出値を有する検出素子を図16から選択すると、検出素子B4が該当する。したがって、図17の表Bに示した条件では、AwがA6、AxがB4ととなり、各検出値は、図19の(B)に示すとおりとなる。このように、内挿値算出用検出素子の選定条件を満たす検出素子対は1対とは限らず、検出素子群と磁気スケールの位置関係によって、複数の検出素子対を選択することができる。なお、図5に示すコード位置番号-内挿値算出用検出素子対応表では、A群コード位置番号0の場合の内挿値算出用検出素子として、AwがA6、AxがB4の場合を示している。 Furthermore, detector elements that satisfy the Aw condition shown in Table B of Figure 17 have detection values that are near 0 on the left side and positive in the center. Selecting a detector element with a detection value that meets this condition from Figure 16 results in detector element A6. Also, detector elements that satisfy the Ax condition shown in Table B of Figure 17 have detection values that are positive on the left side, near 0 in the center, and negative on the right side. Selecting a detector element with a detection value that meets this condition from Figure 16 results in detector element B4. Therefore, under the conditions shown in Table B of Figure 17, Aw is A6 and Ax is B4, and the respective detection values are as shown in Figure 19 (B). Thus, there is not necessarily one pair of detector elements that meets the selection conditions for detector elements for interpolation value calculation. Multiple pairs of detector elements can be selected depending on the positional relationship between the detector element group and the magnetic scale. The code position number vs. detector element for interpolation value calculation correspondence table shown in Figure 5 indicates that the detector elements for interpolation value calculation when A group code position number is 0 have Aw=A6 and Ax=B4.
次に、検出素子群Sと磁気スケール10との位置関係に応じて、内挿値算出用検出素子の選定条件について説明する。図21は、A群がコード位置番号0~54において磁気スケールの着磁パターンを読み取った際の着磁パターンの極性を、前後の1ピッチ分を含めて示した図である。A群がコード位置番号0~54にある際に、A群の検出素子対Aw、Axの条件は次の通りとなる。
Awの選択条件:B群でN極からS極になる部分
Axの選択条件:A群でN極の部分、かつ左側がS極になる部分
あるいは
Awの選択条件:A群でS極の部分、かつ左側がN極になる部分
Axの選択条件:B群でS極からN極になる部分
以下、これらの条件を「A群検出素子選択条件1」という。
Next, we will explain the conditions for selecting detection elements for calculating interpolated values depending on the positional relationship between the detection element group S and the magnetic scale 10. Fig. 21 is a diagram showing the polarity of the magnetization pattern when group A reads the magnetization pattern of the magnetic scale at code position numbers 0 to 54, including one pitch before and after. When group A is at code position numbers 0 to 54, the conditions for the pair of detection elements Aw and Ax of group A are as follows:
Selection condition for Aw: A portion in group B that changes from a north pole to a south pole Selection condition for Ax: A portion in group A that has a north pole and the left side becomes a south pole Or selection condition for Aw: A portion in group A that has a south pole and the left side becomes a north pole Selection condition for Ax: A portion in group B that changes from a south pole to a north pole Hereinafter, these conditions will be referred to as "A group detection element selection condition 1".
同様に、A群の検出素子対Ay、Azの選択条件は以下の通りとなる。
Ayの選択条件:A群でN極の部分、かつ右側がS極になる部分
Azの選択条件:B群でS極からN極になる部分
あるいは
Ayの選択条件:B群でN極からS極になる部分
Azの選択条件:A群でS極の部分、かつ右側がN極になる部分
以下、これらの条件を「A群検出素子選択条件2」という。
Similarly, the selection conditions for the pair of detecting elements Ay and Az in group A are as follows:
Selection condition for Ay: A portion in group A where the north pole is located and the right side becomes the south pole Selection condition for Az: A portion in group B where the south pole becomes the north pole Selection condition for Ay: A portion in group B where the north pole becomes the south pole Selection condition for Az: A portion in group A where the right side becomes the north pole Hereinafter, these conditions will be referred to as "A group detection element selection condition 2".
ここで、B群の検素子B1~B6はA群の検出素子A1~A6から半ピッチ分進んだ位置にあるため、A群が読み取ったコード情報が採用される場合は、着磁パターンの条件からB群の少なくとも1つの検出素子は、N極からS極、あるいは、S極からN極になる検出素子が存在する。そして、検出素子対Aw、Ax及び検出素子対Ay、Azのそれぞれ一方の検出素子は、B群のN極からS極、あるいは、S極からN極になる検出素子が選択され、他方の検出素子は、A群の検出素子の中から、後述するように、所定の位置で、一方のB群の検出素子の検出値と同じ検出値を有する検出素子が選ばれる。この点は、B群が読み取ったコード情報が採用される場合も同様である。 Here, because the detection elements B1-B6 in group B are located half a pitch ahead of the detection elements A1-A6 in group A, when the code information read by group A is adopted, the conditions of the magnetization pattern dictate that at least one detection element in group B will be a detection element that changes from north to south pole or south to north pole. One of the detection elements Aw, Ax and one of the detection element pairs Ay, Az are selected as a detection element in group B that changes from north to south pole or south to north pole, and the other detection element is selected from the detection elements in group A that, at a specified position, has the same detection value as one of the detection elements in group B, as described below. This is also true when the code information read by group B is adopted.
図22は、B群がコード位置番号0において磁気スケールの着磁パターンを読み取った際の着磁パターンの極性を、前後の1ピッチ分を含めて示した図である。そして、B群がコード位置番号0にある際のB群の検出素子対Bw、Bxの選択条件は次の通りとなる。
Bwの選択条件:A群でN極からS極になる部分
Bxの選択条件:B群でN極の部分、かつ左側がS極になる部分
あるいは
Bwの選択条件:B群でS極の部分、かつ左側がN極になる部分
Bxの選択条件:A群でS極極からNになる部分
以下、これらの条件を「B群検出素子選択条件1」という。
22 is a diagram showing the polarity of the magnetization pattern, including one pitch before and after, when group B reads the magnetization pattern of the magnetic scale at code position number 0. When group B is at code position number 0, the selection conditions for the pair of detecting elements Bw and Bx of group B are as follows:
Selection condition for Bw: A portion in group A that changes from a north pole to a south pole Selection condition for Bx: A portion in group B that has a north pole and the left side becomes a south pole Selection condition for Bw: A portion in group B that has a south pole and the left side becomes a north pole Selection condition for Bx: A portion in group A that changes from a south pole to a north pole Hereinafter, these conditions will be referred to as "B group detection element selection condition 1."
A群検出素子選択条件1、A群検出素子選択条件2を満たす検出素子対の候補の数は、各コード位置番号によって異なるが、実際には、複数の候補の中からルックアップテーブルに書き込む検出素子対を決める必要がある。上記の選択条件を満たしていれば、高分解能で絶対位置検出を行うことが可能であるが、検出素子の個体差を考慮して精度良く絶対位置検出を行うためには、最も理想的な検出素子を実測して決めることが望ましい。 The number of candidate detector element pairs that satisfy A-group detector element selection condition 1 and A-group detector element selection condition 2 varies depending on each code position number, but in practice, it is necessary to select the detector element pairs to be written to the lookup table from among multiple candidates. If the above selection conditions are met, it is possible to perform high-resolution absolute position detection. However, in order to perform accurate absolute position detection taking into account individual differences between detector elements, it is desirable to measure and determine the most ideal detector elements.
まず、必要なデータとして、磁気スケール10に対してA群とB群が切り替わる理想の地点での全検出素子の検出値を取得する。図23は、磁気スケール10に対してA群とB群が切り替わる理想的な位置を示した図であり、理想的な位置は、図23に示すように、検出素子A1が磁気スケール10の端にある地点から1.5mm後方に移動した地点を起点となる0mmとして、3mm、6mm、9mm・・・の地点となり、1ピッチの大きさをP、コード位置番号をkとすると次のようになる。
B群コード位置番号kからA群コード位置番号kへの切り替え地点:1/2×P+P×k
A群コード位置番号kからB群コード位置番号k+1への切り替え地点:P×(k+1)
First, the necessary data is obtained from the detection values of all detection elements at the ideal point where group A and group B switch with respect to the magnetic scale 10. Fig. 23 is a diagram showing the ideal position where group A and group B switch with respect to the magnetic scale 10. As shown in Fig. 23, the ideal positions are 0 mm, which is the point where detection element A1 has moved 1.5 mm backward from the point at the end of the magnetic scale 10, and then points 3 mm, 6 mm, 9 mm, and so on, with the size of one pitch being P and the code position number being k, as follows:
Switching point from group B code position number k to group A code position number k: 1/2 × P + P × k
Switching point from group A code position number k to group B code position number k+1: P × (k+1)
そして、B群からA群への切り替え地点では、Ax-Aw=Au=0であることが望ましいので、全ての選択候補の中から実測値でAx-Awが0に最も近い値となる検出素子の組みを検出素子対として採用する。また、A群からB群への切り替え地点ではAz-Ay=Av=0であることが望ましいので、全ての選択候補の中から実測値でAz-Ayが最も0に近い値となる検出素子の組みを検出素子対として採用する。 At the point where switching from group B to group A is desired, Ax - Aw = Au = 0, so from all selection candidates, the pair of detection elements whose actual measured value of Ax - Aw is closest to 0 is adopted as the detection element pair. Also, at the point where switching from group A to group B is desired, Az - Ay = Av = 0, so from all selection candidates, the pair of detection elements whose actual measured value of Az - Ay is closest to 0 is adopted as the detection element pair.
ここで、図11を参照すれば、差分値Au、Bvは、変位3mm、9mmの地点、すなわち、mを正の整数とした場合、(m-1/2)ピッチの地点で0となっており、差分値Av、Buは、変位6mm、12mmの地点、すなわち、(m-1)ピッチ0となっていることが分かる。このように、内挿値算出用検出素子の2対の検出素子の一方の検出素子対は、磁気スケールの変位が(m-1/2)ピッチの近傍位置において0となる差分値を有する組み合わせであり、他方の検出素子対は、変位が(m-1)ピッチの位置において0の差分値を有する組み合わせとなっている。 Referring to Figure 11, it can be seen that the difference values Au and Bv are 0 at displacements of 3 mm and 9 mm, i.e., at a pitch of (m-1/2) where m is a positive integer, and the difference values Av and Bu are 0 at displacements of 6 mm and 12 mm, i.e., at a pitch of (m-1). Thus, one pair of detection elements of the two pairs of detection elements used for calculating interpolated values is a combination in which the difference value is 0 when the magnetic scale displacement is near a pitch of (m-1/2), and the other pair of detection elements is a combination in which the difference value is 0 when the displacement is at a pitch of (m-1).
[第2の実施形態]
第1の実施形態では、1本の磁気トラックを有する磁気スケールを備えた絶対位置検出装置において、連続的に絶対位置を検出するために、A群とB群の切り替え地点での飛びをなくする手段として、次の手段を採用していた。
(1)B群コード位置番号とA群コード位置番号が同じ値の場合、B群のBy、BzとA群のAw、Axを一致させる、
(2)B群のコード位置番号がA群のコード位置番号よりも1つ大きい場合は、B群のBw、BxとA群のAy、Azが一致させ、さらに、
(3)A群とB群の切り替え地点を、差分値Au、Avが0になる地点にする。
Second Embodiment
In the first embodiment, in an absolute position detection device equipped with a magnetic scale having one magnetic track, the following means was employed to eliminate jumps at the switching point between group A and group B in order to continuously detect the absolute position.
(1) When the group B code position number and the group A code position number are the same value, By and Bz of group B are matched with Aw and Ax of group A.
(2) If the code position number of group B is one greater than the code position number of group A, Bw and Bx of group B are matched with Ay and Az of group A, and further,
(3) The switching point between group A and group B is set to the point where the difference values Au and Av become zero.
しかしながら、本実施形態で示すように、A群とB群の切り替え地点での差分値Au、Avを完全に0に一致させなくても、A群とB群の切り替え地点での算出値の飛びが発生する可能性はあるものの、高分解能で絶対値位置計算を行うことは可能である。具体的には、A群の検出素子の検出値の絶対値最小値とB群の検出素子の検出値の絶対値最小値とを比較し、絶対値最小値が大きい方のコード位置番号と、コード位置番号に対応する内挿値算出用検出素子を用いて絶対位置を算出することができる。 However, as shown in this embodiment, even if the difference values Au and Av at the switching point between groups A and B are not made to be exactly 0, it is possible to perform absolute position calculations with high resolution, although there is a possibility of jumps in the calculated value at the switching point between groups A and B. Specifically, the minimum absolute value of the detection values of the detection elements in group A is compared with the minimum absolute value of the detection values of the detection elements in group B, and the absolute position can be calculated using the code position number with the larger minimum absolute value and the detection element for calculating the interpolated value that corresponds to that code position number.
例えば、先述した図12は、コード位置番号0~1において、A群とB群の各検出素子の検出値の絶対値の最小値の変化を示す図であり、変位が3~6mmにおいては、A群の検出素子の各検出値の絶対値の最小値は、B群の検出素子の各検出値の絶対値の最小値よりも大きいため、変位が3~6mmの区間においては、A群のコード位置番号に応じて、コード区間位置算出値を算出し、図5に示すコード位置番号-内挿値算出用検出素子対応表におけるA群のコード位置番号に対応した検出素子を用いて、区間内挿値を算出すればよい。本実施形態の処理を図6Bに示す処理フローで説明すれば、ステップS17、 ステップS18、ステップS21、ステップS22の処理を省き、ステップS16で「NO」の場合に、ステップS23へ処理を移すことに相当する。 For example, the aforementioned Figure 12 shows the change in the minimum absolute value of the detection values of each detection element in Groups A and B for code position numbers 0 to 1. When the displacement is 3 to 6 mm, the minimum absolute value of the detection values of the detection elements in Group A is greater than the minimum absolute value of the detection values of the detection elements in Group B. Therefore, in the section where the displacement is 3 to 6 mm, the code section position calculation value is calculated according to the code position number in Group A, and the section interpolation value is calculated using the detection element corresponding to the code position number in Group A in the code position number - detection element correspondence table for calculating interpolated values shown in Figure 5. If the processing of this embodiment is explained using the processing flow shown in Figure 6B, this corresponds to omitting steps S17, S18, S21, and S22, and proceeding to step S23 if step S16 returns "NO."
[第3の実施形態]
第1の実施形態および第2の実施形態では、コード位置番号を取得後、ルックアップテーブルに記憶したコード位置番号-内挿値算出用検出素子対応表を参照して、A群とB群のコード位置番号に応じて、それぞれ4つの内挿値算出用の検出素子の検出値を取得し、
それらの検出値を使用して絶対位置計算を行っていたが、コード位置番号-内挿値算出用検出素子対応表を用いることなく、絶対位置を算出する方法について説明する。
[Third embodiment]
In the first and second embodiments, after acquiring the code position number, the code position number-detection element for calculating interpolated values correspondence table stored in the lookup table is referenced, and detection values of four detection elements for calculating interpolated values are acquired according to the code position numbers of group A and group B,
These detected values are used to calculate the absolute position, but a method for calculating the absolute position without using the code position number - interpolated value calculation detection element correspondence table will be described below.
A群がコード位置番号0~54におけるA群の内挿値算出用の選定条件として、A群検出素子選択条件1、A群検出素子選択条件2があることについては、先述したとおりである。また、図5にしたコード位置番号-内挿値算出用検出素子対応表作成のために、B群がコード位置番号0にある際の、Bw、Bxの選定条件については、B群検出素子選択条件1があることについても先述したとおりであるが、B群がコード位置番号1~54にある際にも、B群検出素子選択条件1が成り立つ。 As mentioned above, there are two selection conditions for calculating the interpolated value of group A when the group A is at code position numbers 0 to 54: group A detector selection condition 1 and group A detector selection condition 2. Also, as mentioned above, in order to create the code position number - detector element for calculating interpolated values correspondence table shown in Figure 5, there is group B detector selection condition 1 for the selection condition of Bw and Bx when group B is at code position number 0. However, group B detector selection condition 1 also holds when group B is at code position numbers 1 to 54.
また、B群がコード位置番号0~54にある際の、B群の検出素子対By、Bzの選択条件は次の通りとなる。
Byの選択条件:B群でN極の部分、かつ、右側がS極になる部分
Bzの選択条件:A群でS極からN極になる部分
あるいは
Byの選択条件:A群でN極からS極になる部分
Bzの選択条件:B群でS極の部分、かつ、右側がN極になる部分
以下、これらの条件を「B群検出素子選択条件2」という。
When group B is in the code position numbers 0 to 54, the selection conditions for the pair of detecting elements By and Bz of group B are as follows:
Selection condition for By: A portion in group B where the north pole is located and the right side becomes the south pole Selection condition for Bz: A portion in group A where the south pole is located and the north pole Selection condition for By: A portion in group A where the north pole is located and the south pole is located Selection condition for Bz: A portion in group B where the south pole is located and the right side becomes the north pole Hereinafter, these conditions will be referred to as "group B detection element selection condition 2."
図24は、コード位置番号29付近における、A群またはB群の各検出素子群と磁気スケールの着磁パターンを示した図であり、図24(A)は、A群がコード位置番号29にある場合を示しており、また、図24(B)は、B群がコード位置番号29にある場合を示している。このような位置関係にある場合に、先述した、「A群検出素子選択条件1」、「A群検出素子選択条件2」、「B群検出素子選択条件1」、および、「B群検出素子選択条件2」にしたがって、内挿値算出用の検出素子Aw、Ax、Ay、Az、および、Bw、Bx、By、Bzを選定すると、Aw=B6、Ax=A4、Ay=A6、Az=B3、Bw=A1、Bx=B4、By=B6、Bz=A4、あるいは、Aw=A1、Ax=B3、Ay=B6、Az=A3、Bw=B1、Bx=A4、By=A1、Bz=B3の結果が得られる。 Figure 24 shows the magnetization pattern of each detection element group A or B and the magnetic scale near code position number 29, with Figure 24 (A) showing the case where group A is at code position number 29, and Figure 24 (B) showing the case where group B is at code position number 29. When this positional relationship is met, selecting the detector elements Aw, Ax, Ay, Az, and Bw, Bx, By, Bz for calculating the interpolated value in accordance with the aforementioned "A group detector element selection condition 1," "A group detector element selection condition 2," "B group detector element selection condition 1," and "B group detector element selection condition 2" results in Aw=B6, Ax=A4, Ay=A6, Az=B3, Bw=A1, Bx=B4, By=B6, Bz=A4, or Aw=A1, Ax=B3, Ay=B6, Az=A3, Bw=B1, Bx=A4, By=A1, Bz=B3.
このように、予め記憶したコード位置番号-内挿値算出用検出素子対応表を用いなくても、磁気スケールの極性と各検出素子の位置関係から内挿値算出用検出素子を特定することが可能となる。磁気スケールの極性については、A群、B群の各検出素子の検出値の正負の値から、各検出素子に対向している磁気スケールの極性を判別する。そして、磁気スケールの極性の並びから、上記の「A群検出素子選択条件1」、「A群検出素子選択条件2」、「B群検出素子選択条件1」、および、「B群検出素子選択条件2」にしたがって、A群、B群それぞれに4つの内挿値算出用の検出素子を選択し、第1または第2の実施形態で説明した方法と同様に、それらの検出値から区間内挿値を算出することができる。ただし、この方法は、A群、B群の各検出素子が対向する磁気スケールの6ピッチ分の磁極パターンが、S極からN極に変化する部分とN極からS極に変化する部分の両方を有する着磁パターンであるときに成立するが、そうでない場合は成立しない。 In this way, it is possible to identify the detection elements for calculating interpolated values from the polarity of the magnetic scale and the positional relationship of each detection element, without using a pre-stored code position number - detection element for calculating interpolated values correspondence table. Regarding the polarity of the magnetic scale, the polarity of the magnetic scale facing each detection element is determined from the positive/negative value of the detection value of each detection element in groups A and B. Then, based on the arrangement of the magnetic scale polarities, four detection elements for calculating interpolated values are selected for each of groups A and B in accordance with the above-mentioned "Group A Detection Element Selection Condition 1," "Group A Detection Element Selection Condition 2," "Group B Detection Element Selection Condition 1," and "Group B Detection Element Selection Condition 2." The interval interpolated value can then be calculated from these detection values, similar to the method described in the first or second embodiment. However, this method is valid when the magnetic pole pattern for six pitches of the magnetic scale facing each detection element in groups A and B is a magnetization pattern that has both a portion where the pole changes from south to north and a portion where the pole changes from north to south. It is not valid otherwise.
図25は、コード位置番号29付近における磁気スケールの着磁パターンの極性の変化を示す図であり、図26は、コード位置番号29付近で、A群またはB群の各検出素子が検出した磁気スケールの着磁パターンの極性の変化が、6ピッチの中で1回のみ現れる場合の例を示した図である。図25に示す着磁パターンは、連続する7ピッチ分の範囲に少なくとも1つのS極からN極に変化する部分と1つのN極からS極に変化する部分の両方を有しており、本発明の着磁パターンの条件を満たしているが、コード位置番号29の個所では、図26に示すように、A群、B群の各検出素子が対向する磁気スケールの6ピッチ分の範囲で、S極からN極に変化する部分が1カ所しか存在しない。 Figure 25 shows the change in polarity of the magnetization pattern of the magnetic scale near code position number 29, and Figure 26 shows an example where the change in polarity of the magnetization pattern of the magnetic scale detected by each detection element of group A or group B near code position number 29 occurs only once within six pitches. The magnetization pattern shown in Figure 25 has at least one portion where the pole changes from south to north and one portion where the pole changes from north to south within a range of seven consecutive pitches, and meets the conditions for the magnetization pattern of the present invention. However, at code position number 29, as shown in Figure 26, there is only one portion where the pole changes from south to north within a range of six pitches of the magnetic scale where each detection element of group A and group B faces.
このため、コード位置番号0~28の範囲では、上記の方法で絶対位置の検出ができるが、コード位置番号29の部分では、A群、B群の各検出素子が対向する6ビット分の磁極を用いただけでは、全ての内挿値算出用の検出素子Aw、Ax、Ay、Az、および、Bw、Bx、By、Bzを選定することができない。ちなみに、A群、B群の各検出素子の極性が図26図に示す6ビット分しか把握できない場合、「A群検出素子選択条件1」、「A群検出素子選択条件2」、「B群検出素子選択条件1」、および、「B群検出素子選択条件2」にしたがって、A群、B群それぞれに4つの内挿値算出用の検出素子を選択したとしても、Ax=A4、Az=B3、Bx=B4、Bz=A4、あるいは、Ax=B3、Az=A3、Bx=A4、Bz=B3と、検出素子対の片方の検出素子しか選定できない。 For this reason, while the absolute position can be detected using the above method within the code position number range of 0 to 28, at code position number 29, it is not possible to select all of the detector elements Aw, Ax, Ay, Az, and Bw, Bx, By, Bz for calculating the interpolated values simply by using the 6-bit magnetic poles that each detector element in groups A and B faces. Incidentally, if the polarity of each detector element in groups A and B can only be determined for the 6 bits shown in Figure 26, even if four detector elements for calculating the interpolated values are selected for each of groups A and B according to "Group A Detector Element Selection Condition 1," "Group A Detector Element Selection Condition 2," "Group B Detector Element Selection Condition 1," and "Group B Detector Element Selection Condition 2," only one of the detector elements in the pair can be selected: Ax = A4, Az = B3, Bx = B4, Bz = A4, or Ax = B3, Az = A3, Bx = A4, Bz = B3.
一方、磁気スケール10は、連続する7ピッチ分の範囲に少なくとも1つのS極からN極に変化する部分と1つのN極からS極に変化する部分の両方を有しているという着磁パターン条件を満たしているから、この条件に基づいて、6ピッチ分の着磁パターンの中に、S極からN極に変化する部分とのN極からS極に変化する部分のいずれか1つだけを有する場合であっても、6ピッチ分の前後の磁極の極性を推定するが可能である。 On the other hand, the magnetic scale 10 satisfies the magnetization pattern condition of having at least one part that changes from a south pole to a north pole and one part that changes from a north pole to a south pole within a range of seven consecutive pitches. Therefore, based on this condition, even if the magnetization pattern for six pitches only has one part that changes from a south pole to a north pole or one part that changes from a north pole to a south pole, it is possible to estimate the polarity of the magnetic poles before and after six pitches.
したがって、本実施形態では、A群、B群のそれぞれ6個の検出素子が対向する磁気スケールの6ピッチ分の磁極パターンの中に、S極からN極に変化する部分とN極からS極に変化する部分の両方があるときは、6ピッチ分の磁極パターンに基づいて、また、そうでないときは、6ピッチ分の磁極パターンの前後の磁極の極性を推定することによって、コード位置番号-内挿値算出用検出素子対応表を用いることなく、内挿値算出用の検出素子を選定している。 Therefore, in this embodiment, when the six-pitch magnetic pole pattern of the magnetic scale, which the six detection elements of each of groups A and B face, contains both a portion where the pole changes from south to north and a portion where the pole changes from north to south, the detection element for calculating the interpolated value is selected based on the six-pitch magnetic pole pattern; otherwise, the polarity of the magnetic poles before and after the six-pitch magnetic pole pattern is estimated, and the detection element for calculating the interpolated value is selected without using the code position number - detection element for calculating the interpolated value correspondence table.
[第4の実施形態]
第3の実施形態では、A群、B群の各検出素子が検出した6ビット分の磁極パターンの中に、S極からN極に変化する部分とN極からS極に変化する部分の両方がないときは、検出した磁極の前後の磁極の極性を推定することによって、内挿値算出用の検出素子を選定しているが、本実施形態では、予め、使用する磁気スケールの着磁パターンを示すコード情報をルックアップテーブルに記憶している。
[Fourth embodiment]
In the third embodiment, when the 6-bit magnetic pole pattern detected by each of the detection elements in groups A and B does not include both a portion where the pole changes from south to north and a portion where the pole changes from north to south, the polarities of the magnetic poles before and after the detected magnetic pole are estimated to select a detection element for calculating an interpolated value. However, in this embodiment, code information indicating the magnetization pattern of the magnetic scale to be used is stored in advance in a lookup table.
図27は、本発明の実施形態に係る絶対位置検出装置における、磁気スケールの着磁パターンの一例を示す図である。図27に示すように、コード位置番号に対応させて、磁気スケールの極性を、例えば、N極を「0」、S極を「1」として予めルックアップテーブルにコード情報として記憶しておけば、このルックアップテーブルを参照することによって、図24に示すように、左端の検出素子A1やB1が検出している磁極の左側にある磁極の極性(図24の磁気スケール10の左端部分の「N」極)と、右端の検出素子A6やB6が検出している磁極の右側にある磁極の極性(図24の磁気スケール10の右端部分の「N」極)を把握することができる。 Figure 27 is a diagram showing an example of the magnetization pattern of the magnetic scale in an absolute position detection device according to an embodiment of the present invention. As shown in Figure 27, if the polarity of the magnetic scale is stored in advance as code information in a lookup table, corresponding to the code position number, with, for example, a north pole being "0" and a south pole being "1," then by referencing this lookup table, it is possible to determine the polarity of the magnetic pole to the left of the magnetic pole detected by the leftmost detection elements A1 and B1 (the "north" pole at the left end of magnetic scale 10 in Figure 24) and the polarity of the magnetic pole to the right of the magnetic pole detected by the rightmost detection elements A6 and B6 (the "north" pole at the right end of magnetic scale 10 in Figure 24), as shown in Figure 24.
具体的には、検出装置20は、コード位置番号を取得した後、着磁パターンを記憶したルックアップテーブル参照し、左部分の磁極の極性は(コード位置番号-1)の部分の極性を参照し、右部分の極性は(コード位置番号+ビット数)の部分の極性を参照する。そして、検出した6ピッチ分の磁極の極性と前後の磁極の極性を基に、第3の実施形態で示したA群、B群の検出素子選択条件から内挿値算出用検出素子を選択することができる。 Specifically, after acquiring the code position number, the detection device 20 references a lookup table that stores the magnetization pattern, and references the polarity of the (code position number - 1) portion to determine the polarity of the magnetic poles in the left portion, and the polarity of the (code position number + number of bits) portion to determine the polarity of the magnetic poles in the right portion. Then, based on the polarities of the magnetic poles for the detected six pitches and the polarities of the magnetic poles before and after, it can select detection elements for calculating the interpolated value from the detection element selection conditions for groups A and B shown in the third embodiment.
[第5の実施形態]
第3の実施形態では、A群、B群の各検出素子が検出した6ビット分の磁極の前後の磁極の極性を着磁パターン条件に基づいて推定することにより、また、第4の実施形態では、磁気スケールの着磁パターンを記録したルックアップテーブルを参照することによって、A群、B群の各検出素子が検出した6ビット分の磁極の前後の磁極の極性を特定し、それぞれ条件に合った内挿値算出用検出素子を選択しているが、本実施形態では、A群、B群の各検出素子が検出した6ビット分の磁極の前後の磁極の極性を、別途設けた補助検出素子を用いて判別している。
Fifth Embodiment
In the third embodiment, the polarities of the magnetic poles before and after the 6-bit magnetic poles detected by each of the detection elements of groups A and B are estimated based on the magnetization pattern conditions, and in the fourth embodiment, the polarities of the magnetic poles before and after the 6-bit magnetic poles detected by each of the detection elements of groups A and B are identified by referring to a lookup table in which the magnetization pattern of the magnetic scale is recorded, and a detection element for calculating an interpolated value that meets the respective conditions is selected. However, in the present embodiment, the polarities of the magnetic poles before and after the 6-bit magnetic poles detected by each of the detection elements of groups A and B are determined by using auxiliary detection elements that are separately provided.
図28は、本発明の実施形態に係る絶対位置検出装置において、補助検出素子を有する一構成例を示す図である。図28に示すように、本実施形態では、検出素子群Sとして、A群検出素子A1~A6とB群検出素子B1~B6の前後、すなわち、検出素子A1の左側と検出素子B6の右側に、それぞれ補助検出素子C1、C2を配設している。そして、補助検出素子C1、C2の検出値から、A群検出素子A1~A6とB群検出素子B1~B6が対向する前後の磁極の極性が判別できるため、第3の実施形態で示した選定条件にしたがって、内挿値算出用検出素子を選択することができる。 Figure 28 is a diagram showing an example configuration of an absolute position detection device according to an embodiment of the present invention, including auxiliary detection elements. As shown in Figure 28, in this embodiment, auxiliary detection elements C1 and C2 are arranged in front of and behind the A group detection elements A1 to A6 and the B group detection elements B1 to B6 as the detection element group S, i.e., to the left of detection element A1 and the right of detection element B6, respectively. Furthermore, the polarity of the magnetic poles in front of and behind the A group detection elements A1 to A6 and the B group detection elements B1 to B6 facing each other can be determined from the detection values of auxiliary detection elements C1 and C2, making it possible to select detection elements for calculating interpolated values according to the selection conditions shown in the third embodiment.
1…絶対位置検出装置、10…磁気スケール、20…検出装置、21…マルチプレクサ、
22…A/D変換部、23…外部出力部、30…位置算出部、31…コード情報等取得部、32…コード区間位置算出部、33…内挿値算出用検出素子特定部、34…区間内挿値算出部、35…絶対位置算出部、36…ルックアップテーブル、A1~A6…A群の検出素子(検出値)、B1~B6…B群の検出素子(検出値)、C1、C2…補助検出素子、M…マイコン、S…検出素子群。
1... absolute position detection device, 10... magnetic scale, 20... detection device, 21... multiplexer,
22...A/D conversion unit, 23...external output unit, 30...position calculation unit, 31...code information acquisition unit, 32...code section position calculation unit, 33...detection element identification unit for interpolated value calculation, 34...section interpolated value calculation unit, 35...absolute position calculation unit, 36...lookup table, A1 to A6...detection elements (detection values) of group A, B1 to B6...detection elements (detection values) of group B, C1, C2...auxiliary detection elements, M...microcomputer, S...detection element group.
Claims (9)
前記磁気スケールに対向して1ピッチ間隔で配設された少なくともn個の検出素子からなる第1検出素子群と、該第1検出素子群の各前記検出素子と半ピッチずらせて配設された少なくともn個の検出素子からなる第2検出素子群を有する検出装置とを備え、
前記検出装置は、前記第1検出素子群または前記第2検出素子群の各前記検出素子の検出値から得られるnビットのコード情報に基づいて、該コード情報に対応したコード区間位置におけるコード区間位置算出値を算出するコード区間位置算出部と、
前記第1検出素子群または前記第2検出素子群の前記コード区間位置に対応した内挿値算出用検出素子を特定する内挿値算出用検出素子特定部と、
前記内挿値算出用検出素子の検出値から、前記コード区間位置における区間内挿値を算出する区間内挿値算出部と、
前記コード区間位置算出値と前記区間内挿値から、前記磁気スケールの全長にわたる絶対位置信号を得る絶対位置算出部を有することを特徴とする、絶対位置検出装置。 a magnetic scale on which a magnetization pattern is recorded, the magnetization pattern having a non-repeating code pattern of n bits (n is an integer of 2 or more) magnetized at a predetermined pitch, the magnetization pattern having both at least one portion where a pole changes from south to north and one portion where a pole changes from north to south within a continuous (n+1) pitch;
a detection device including a first detection element group consisting of at least n detection elements arranged at one-pitch intervals facing the magnetic scale, and a second detection element group consisting of at least n detection elements arranged at half-pitch intervals from each of the detection elements in the first detection element group,
the detection device includes a code section position calculation unit that calculates, based on n-bit code information obtained from the detection values of each of the detection elements of the first detection element group or the second detection element group, a code section position calculation value at a code section position corresponding to the code information;
an interpolation-value-calculating detector element specifying unit that specifies an interpolation-value-calculating detector element corresponding to the code section position of the first detector element group or the second detector element group;
an interval interpolation value calculation unit that calculates an interval interpolation value at the code interval position from the detection value of the interpolation value calculation detection element;
an absolute position calculation unit that obtains an absolute position signal over the entire length of the magnetic scale from the code section position calculation value and the section interpolation value;
前記内挿値算出用検出素子特定部は、前記第1検出素子群または前記第2検出素子群の前記コード区間位置に応じて、前記ルックアップテーブルに記憶した前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における前記検出素子対の各前記検出素子の検出値の差分値の大きさに基づいて、前記区間内挿値を算出するための前記検出素子として、前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子のいずれかを特定し、
前記区間内挿値算出部は、前記内挿値算出用検出素子特定部によって特定された前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における、2対の前記検出素子対のそれぞれの前記検出素子対の各前記検出素子の検出値の差分値の比に基づいて、前記コード区間位置における前記区間内挿値を算出することを特徴とする、請求項1に記載の絶対位置検出装置。 the detection device includes a lookup table that stores, for each code section position of the first detector element group, two pairs of detector element pairs, each consisting of one detector element of the first detector element group and one detector element of the second detector element group, as detector elements for first detector element group interpolation value calculation, and, for each code section position of the second detector element group, two pairs of detector element pairs, each consisting of one detector element of the first detector element group and one detector element of the second detector element group, as detector elements for second detector element group interpolation value calculation,
the interpolated value calculation detector element specifying unit specifies either the first detector element group interpolated value calculation detector element or the second detector element group interpolated value calculation detector element as the detector element for calculating the interval interpolated value, based on a magnitude of a difference value between detection values of each of the detector elements in the pair of detector elements in the first detector element group interpolated value calculation detector element or the second detector element group interpolated value calculation detector element stored in the lookup table, in accordance with the code interval position of the first detector element group or the second detector element group;
2. The absolute position detection device according to claim 1, wherein the interval interpolation value calculation unit calculates the interval interpolation value at the code interval position based on a ratio of difference values between detection values of each of the detection elements of each of the two pairs of detection elements in the first detection element group interpolation value calculation detection elements or the second detection element group interpolation value calculation detection elements identified by the interpolation value calculation detection element identification unit.
前記内挿値算出用検出素子特定部は、前記第1検出素子群の各前記検出素子の検出値の絶対値最小値と前記第2検出素子群の各前記検出素子の検出値の絶対値最小値とを比較し、前記第1検出素子群または前記第2検出素子群の前記コード区間位置における前記区間内挿値を算出するための前記検出素子として、前記絶対値最小値の大きい方の前記ルックアップテーブルに記憶した前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子を特定し、
前記区間内挿値算出部は、前記内挿値算出用検出素子特定部によって特定された前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における、2対の前記検出素子対のそれぞれの前記検出素子対の各前記検出素子の検出値の差分値の比に基づいて、前記コード区間位置における前記区間内挿値を算出することを特徴とする、請求項1に記載の絶対位置検出装置。 the detection device includes a lookup table that stores, for each code section position of the first detector element group, two pairs of detector element pairs, each consisting of one detector element of the first detector element group and one detector element of the second detector element group, as detector elements for first detector element group interpolation value calculation, and, for each code section position of the second detector element group, two pairs of detector element pairs, each consisting of one detector element of the first detector element group and one detector element of the second detector element group, as detector elements for second detector element group interpolation value calculation,
the interpolated value calculation detector element specifying unit compares the minimum absolute value of the detection value of each of the detector elements of the first detector element group with the minimum absolute value of the detection value of each of the detector elements of the second detector element group, and specifies the first detector element group interpolated value calculation detector element or the second detector element group interpolated value calculation detector element stored in the lookup table with the larger minimum absolute value as the detector element for calculating the section interpolated value at the code section position of the first detector element group or the second detector element group;
2. The absolute position detection device according to claim 1, wherein the interval interpolation value calculation unit calculates the interval interpolation value at the code interval position based on a ratio of difference values between detection values of each of the detection elements of each of the two pairs of detection elements in the first detection element group interpolation value calculation detection elements or the second detection element group interpolation value calculation detection elements identified by the interpolation value calculation detection element identification unit.
前記内挿値算出用検出素子特定部は、前記第1検出素子群と前記第2検出素子群の前記コード区間位置に応じて、前記記憶部に記憶した前記コード情報を参照して、前記第1検出素子群の前記コード区間位置に対応した第1検出素子群内挿値算出用検出素子としての選定条件を満たす、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対と、前記第2検出素子群の前記コード区間位置に対応した第2検出素子群内挿値算出用検出素子としての選定条件を満たす、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対のいずれかを特定し、
前記区間内挿値算出部は、前記内挿値算出用検出素子特定部によって特定された前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における、2対の前記検出素子対のそれぞれの前記検出素子対の各前記検出素子の検出値の差分値の比に基づいて、前記コード区間位置における前記区間内挿値を算出することを特徴とする、請求項1に記載の絶対位置検出装置。 the detection device has a storage unit that stores code information obtained from the non-repeating code pattern of the magnetic scale,
the interpolation value calculation detector element specifying unit refers to the code information stored in the storage unit in accordance with the code section positions of the first detector element group and the second detector element group, and specifies either one of two detector element pairs, each consisting of one detector element of the first detector element group and one detector element of the second detector element group, that satisfy a selection condition as a first detector element group interpolation value calculation detector element corresponding to the code section position of the first detector element group, or one of two detector element pairs, each consisting of one detector element of the first detector element group and one detector element of the second detector element group, that satisfy a selection condition as a second detector element group interpolation value calculation detector element corresponding to the code section position of the second detector element group;
2. The absolute position detection device according to claim 1, wherein the interval interpolation value calculation unit calculates the interval interpolation value at the code interval position based on a ratio of difference values between detection values of each of the detection elements of each of the two pairs of detection elements in the first detection element group interpolation value calculation detection elements or the second detection element group interpolation value calculation detection elements identified by the interpolation value calculation detection element identification unit.
前記区間内挿値算出部は、前記内挿値算出用検出素子特定部によって特定された前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における、2対の前記検出素子対のそれぞれの前記検出素子対の各前記検出素子の検出値の差分値の比に基づいて、前記コード区間位置における前記区間内挿値を算出することを特徴とする、請求項1に記載の絶対位置検出装置。 the interpolated value calculation detect element specifying unit specifies, in accordance with the code section positions of the first detect element group and the second detect element group, either one of two detect element pairs, each consisting of one detect element of the first detect element group and one detect element of the second detect element group, that satisfy a selection condition as a first detect element group interpolated value calculation detect element corresponding to the code section position of the first detect element group, or one of two detect element pairs, each consisting of one detect element of the first detect element group and one detect element of the second detect element group, that satisfy a selection condition as a second detect element group interpolated value calculation detect element corresponding to the code section position of the second detect element group, based on n-bit code information acquired from the detection value of each detect element of the first detect element group or the second detect element group, and the polarity of the front and rear magnetic poles estimated from the magnetization pattern of the magnetic scale that each detect element of the first detect element group or the second detect element group faces;
2. The absolute position detection device according to claim 1, wherein the interval interpolation value calculation unit calculates the interval interpolation value at the code interval position based on a ratio of difference values between detection values of each of the detection elements of each of the two pairs of detection elements in the first detection element group interpolation value calculation detection elements or the second detection element group interpolation value calculation detection elements identified by the interpolation value calculation detection element identification unit.
前記内挿値算出用検出素子特定部は、前記第1検出素子群と前記第2検出素子群の各前記検出素子および前記補助検出素子の検出値から取得した前記磁気スケールの着磁パターンに基づいて、前記第1検出素子群と前記第2検出素子群の前記コード区間位置に応じて、前記第1検出素子群の前記コード区間位置に対応した第1検出素子群内挿値算出用検出素子としての選定条件を満たす、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対と、前記第2検出素子群の前記コード区間位置に対応した第2検出素子群内挿値算出用検出素子としての選定条件を満たす、前記第1検出素子群の1つの前記検出素子と前記第2検出素子群の1つの前記検出素子を1つの検出素子対とする2対の検出素子対のいずれかを特定し、
前記区間内挿値算出部は、前記内挿値算出用検出素子特定部によって特定された前記第1検出素子群内挿値算出用検出素子または前記第2検出素子群内挿値算出用検出素子における、2対の前記検出素子対のそれぞれの前記検出素子対の各前記検出素子の検出値の差分値の比に基づいて、前記コード区間位置における前記区間内挿値を算出することを特徴とする、請求項1に記載の絶対位置検出装置。 the detection device further includes one auxiliary detection element shifted by half a pitch outside the detection elements located at both ends of the first detection element group and the second detection element group,
the interpolated value calculation detect element specifying unit specifies, in accordance with the code section positions of the first detect element group and the second detect element group, either one of two detect element pairs, each consisting of one detect element of the first detect element group and one detect element of the second detect element group, that satisfy a selection condition as a first detect element group interpolated value calculation detect element corresponding to the code section position of the first detect element group, or one of two detect element pairs, each consisting of one detect element of the first detect element group and one detect element of the second detect element group, that satisfy a selection condition as a second detect element group interpolated value calculation detect element corresponding to the code section position of the second detect element group,
2. The absolute position detection device according to claim 1, wherein the interval interpolation value calculation unit calculates the interval interpolation value at the code interval position based on a ratio of difference values between detection values of each of the detection elements of each of the two pairs of detection elements in the first detection element group interpolation value calculation detection elements or the second detection element group interpolation value calculation detection elements identified by the interpolation value calculation detection element identification unit.
前記検出装置は、前記磁気スケールの前記着磁パターンから得られたコード情報に基づくコード区間位置に対応したコード区間位置算出値を算出するとともに、2組の前記検出素子群から選択した複数の検出素子対における各検出素子の検出値の差分値を用いて前記コード区間位置における区間内挿値を算出し、前記コード区間位置算出値と前記区間内挿値とから前記磁気スケールの全長にわたる絶対位置を得ることを特徴とする、絶対位置検出装置。 an absolute position detection device comprising: a magnetic scale having one magnetic track on which a magnetization pattern is recorded, the magnetization pattern having a non-repeating code pattern of n (n is an integer of 2 or more) bits magnetized at a predetermined pitch, the magnetization pattern having both at least one portion where the pole changes from south to north and one portion where the pole changes from north to south within consecutive (n+1) pitches; and a detection device having two detection element groups: a first detection element group consisting of at least n detection elements arranged at one pitch interval facing the magnetic scale; and a second detection element group consisting of at least n detection elements arranged at a half pitch offset from each of the detection elements of the first detection element group ,
the detection device calculates a code section position calculation value corresponding to a code section position based on code information obtained from the magnetization pattern of the magnetic scale, calculates a section interpolation value at the code section position using a difference value between detection values of each detection element in a plurality of detection element pairs selected from two detection element groups, and obtains an absolute position over the entire length of the magnetic scale from the code section position calculation value and the section interpolation value.
2組の前記検出素子群の検出値から前記磁気スケールの前記着磁パターンのコード情報を取得し、該コード情報に基づく前記磁気スケールのコード区間位置に対応したコード区間位置算出値を算出するとともに、2組の前記検出素子群から選択した複数の検出素子対における各検出素子の検出値の差分値に基づいて前記コード区間位置における区間内挿値を算出し、前記コード区間位置に基づく位置算出値と前記区間内挿値とから前記磁気スケールの全長にわたる絶対位置を得ることを特徴とする、絶対位置検出方法。 an absolute position detection method using a magnetic scale having one magnetic track on which a magnetization pattern is recorded, the magnetization pattern having a non-repeating code pattern of n (n is an integer of 2 or more) bits magnetized at a predetermined pitch, the magnetization pattern having both at least one portion where the pole changes from south to north and one portion where the pole changes from north to south within consecutive (n+ 1) pitches; and a detection device having two detection element groups, a first detection element group consisting of at least n detection elements arranged at one pitch interval facing the magnetic scale, and a second detection element group consisting of at least n detection elements arranged at a half pitch offset from each of the detection elements in the first detection element group ,
an absolute position detection method comprising: acquiring code information of the magnetization pattern of the magnetic scale from detection values of two sets of detection element groups; calculating a code section position calculation value corresponding to a code section position of the magnetic scale based on the code information; calculating a section interpolation value at the code section position based on a difference value between detection values of each detection element in a plurality of detection element pairs selected from the two sets of detection element groups; and obtaining an absolute position over the entire length of the magnetic scale from the position calculation value based on the code section position and the section interpolation value.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2025014059A JP7737186B1 (en) | 2025-01-30 | 2025-01-30 | Absolute position detection device and absolute position detection method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2025014059A JP7737186B1 (en) | 2025-01-30 | 2025-01-30 | Absolute position detection device and absolute position detection method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP7737186B1 true JP7737186B1 (en) | 2025-09-10 |
Family
ID=96988769
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2025014059A Active JP7737186B1 (en) | 2025-01-30 | 2025-01-30 | Absolute position detection device and absolute position detection method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7737186B1 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6479618A (en) * | 1987-09-21 | 1989-03-24 | Macome Corp | Absolute value type magnetic scale apparatus |
| JP2012519297A (en) * | 2009-03-02 | 2012-08-23 | アールエルエス メリルナ テニカ ディー.オー.オー. | Encoder read head |
| JP2015219180A (en) * | 2014-05-20 | 2015-12-07 | 三菱電機株式会社 | Absolute position detector |
| JP2021167744A (en) * | 2020-04-09 | 2021-10-21 | Dmg森精機株式会社 | Position detector |
-
2025
- 2025-01-30 JP JP2025014059A patent/JP7737186B1/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6479618A (en) * | 1987-09-21 | 1989-03-24 | Macome Corp | Absolute value type magnetic scale apparatus |
| JP2012519297A (en) * | 2009-03-02 | 2012-08-23 | アールエルエス メリルナ テニカ ディー.オー.オー. | Encoder read head |
| JP2015219180A (en) * | 2014-05-20 | 2015-12-07 | 三菱電機株式会社 | Absolute position detector |
| JP2021167744A (en) * | 2020-04-09 | 2021-10-21 | Dmg森精機株式会社 | Position detector |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2754422B2 (en) | Absolute encoder | |
| US5068529A (en) | Absolute position detection encoder | |
| CN102037332B (en) | Position measuring device | |
| US5115239A (en) | Magnetic absolute position encoder with an undulating track | |
| US7148817B2 (en) | Device for positional and/or length determination | |
| US4766376A (en) | Magnetic position detector for detecting an absolute position of a movable member | |
| CN112117079B (en) | Encoder magnet structure, encoder, motor, electrical equipment and vehicle | |
| JP6103927B2 (en) | Position detection device, drive control device, and lens device | |
| JP2648181B2 (en) | Linear encoder | |
| JP2001074507A (en) | Device and method for determining positions of parts which move relatively with each other | |
| JP7737186B1 (en) | Absolute position detection device and absolute position detection method | |
| JP2010145203A (en) | Linear encoder signal processing device and signal processing method | |
| KR20190033035A (en) | Method and system for linear position sensing using magnetic sensors | |
| JP7718747B1 (en) | Absolute position detection device and absolute position detection method | |
| JP2571394B2 (en) | Absolute value type magnetic scale device | |
| EP1342992B1 (en) | Position transducer | |
| JP3008503B2 (en) | Position detection device | |
| JP3063044B2 (en) | Absolute encoder | |
| US20220107208A1 (en) | Position-measuring device for measuring an absolute position | |
| JP3336396B2 (en) | Absolute encoder | |
| JPH06201310A (en) | Position detector | |
| JPH03285113A (en) | 1-track absolute encoder capable of detecting absolute position when electricity is supplied | |
| JPH0549045B2 (en) | ||
| JP2754586B2 (en) | Absolute encoder | |
| JP2691943B2 (en) | 1-track type absolute encoder |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20250411 |
|
| A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20250411 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250617 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250723 |
|
| 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: 20250819 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250822 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7737186 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |