JP2012189350A - Encoder device and correction method for encoder device - Google Patents

Encoder device and correction method for encoder device Download PDF

Info

Publication number
JP2012189350A
JP2012189350A JP2011051059A JP2011051059A JP2012189350A JP 2012189350 A JP2012189350 A JP 2012189350A JP 2011051059 A JP2011051059 A JP 2011051059A JP 2011051059 A JP2011051059 A JP 2011051059A JP 2012189350 A JP2012189350 A JP 2012189350A
Authority
JP
Japan
Prior art keywords
digital data
output signal
value
correction
phase output
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.)
Pending
Application number
JP2011051059A
Other languages
Japanese (ja)
Inventor
Shigeo Koseki
栄男 小関
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kohden Co Ltd
Original Assignee
Kohden Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kohden Co Ltd filed Critical Kohden Co Ltd
Priority to JP2011051059A priority Critical patent/JP2012189350A/en
Publication of JP2012189350A publication Critical patent/JP2012189350A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To detect, with high accuracy, a rotating angle or a moving position of a detection target while suppressing reduction of interpolation accuracy as further as possible.SOLUTION: A sensor unit outputs a phase-A output signal and a phase-B output signal which are sinusoidal and of which the phases are different at 90° from each other in accordance with the rotation or move of a detection target. Four sampling values VA1-VA4 are acquired correspondingly to a position of +90° and a position of -90° with respect to a maximum value Vand a minimum value Vof the phase-A output signal, and an average value of these sampling values is defined as an offset value. Regarding the phase-B output signal, the offset value is also similarly computed. By using these offset values, the rotating angle or moving distance of the detection target for which offset correction has been performed on the sampling values of the phase-A output signal and the phase-B output signal, is computed.

Description

本発明は、検出対象物の回転角度又は移動位置を検出するエンコーダ装置に係り、特に検出対象物の回転角度又は移動位置に応じてセンサ部から出力された正弦波状の検出信号を補正するエンコーダ装置及びエンコーダ装置のための補正方法に関する。   The present invention relates to an encoder device that detects a rotation angle or a movement position of a detection object, and in particular, an encoder device that corrects a sinusoidal detection signal output from a sensor unit in accordance with the rotation angle or movement position of a detection object. And a correction method for the encoder device.

従来から、検出対象物の回転又は移動に応じて互いに90度だけ位相の異なる正弦波状の第1及び第2アナログ検出信号を出力するセンサ部と、センサ部からの第1及び第2アナログ検出信号を第1及び第2ディジタル検出信号にそれぞれディジタル変換して、前記変換した第1及び第2ディジタル検出信号を用いて検出対象物の回転角度又は移動位置を演算処理する演算処理部とを備えたエンコーダ装置はよく知られている。この場合、第1及び第2ディジタル検出信号VA(θ),VB(θ)(以下、A相出力信号VA(θ)及びB相出力信号VB(θ)という)を下記数1,2でそれぞれ表せば、回転角度(移動位置)ωは、下記数3によって表される。

Figure 2012189350
Figure 2012189350
Figure 2012189350
Conventionally, a sensor unit that outputs first and second analog detection signals having sinusoidal phases different from each other by 90 degrees in accordance with rotation or movement of a detection target, and first and second analog detection signals from the sensor unit And a calculation processing unit that performs digital conversion into the first and second digital detection signals, respectively, and calculates the rotation angle or movement position of the detection target using the converted first and second digital detection signals. Encoder devices are well known. In this case, the first and second digital detection signals V A (θ), V B (θ) (hereinafter referred to as A-phase output signal V A (θ) and B-phase output signal V B (θ)) are expressed by the following equation (1). , 2 respectively, the rotation angle (movement position) ω is expressed by the following equation (3).
Figure 2012189350
Figure 2012189350
Figure 2012189350

この場合、理想的には、前記数1,2中の両振幅値A,Bが常に等しく、オフセット値ΔA,ΔBが常に共に「0」であって、A相出力信号VA(θ)及びB相出力信号VB(θ)は完全な正弦波状信号であることが望まれる。しかしながら、実際には、オフセット値ΔA,ΔBと振幅値A,Bは、センサ部自身に潜在する誤差と、センサ部と検出対象物(例えば、磁石)の設置誤差とを含み、オフセット値ΔA,ΔBと振幅値A,Bは変動するとともに、A相出力信号VA(θ)及びB相出力信号VB(θ)も完全な正弦波状信号にはならない。その結果、前記数3の演算処理によって実際に計算される回転角度ωは誤差を含む。この誤差を内挿精度φと呼び、内挿精度φは、通常、回転角度ω(電気角)から誤差を含まない角度(機械角)を減算した下記数4で表される。本発明者らは、この内挿精度φに対するオフセット値ΔA,ΔBと振幅値A,Bの影響を、次の第1及び第2条件下による計算により確認した。

Figure 2012189350
In this case, ideally, both the amplitude values A and B in the equations 1 and 2 are always equal, the offset values ΔA and ΔB are both “0”, and the A-phase output signal V A (θ) and It is desirable that the B-phase output signal V B (θ) is a complete sine wave signal. However, actually, the offset values ΔA and ΔB and the amplitude values A and B include an error latent in the sensor unit itself and an installation error between the sensor unit and the detection target (for example, a magnet), and the offset value ΔA, ΔB and amplitude values A and B fluctuate, and the A-phase output signal V A (θ) and the B-phase output signal V B (θ) do not become perfect sinusoidal signals. As a result, the rotation angle ω that is actually calculated by the arithmetic processing of Equation 3 includes an error. This error is called the interpolation accuracy φ, and the interpolation accuracy φ is usually expressed by the following equation 4 obtained by subtracting an angle (mechanical angle) that does not include an error from the rotation angle ω (electrical angle). The present inventors confirmed the influence of the offset values ΔA and ΔB and the amplitude values A and B on the interpolation accuracy φ by the calculation under the following first and second conditions.
Figure 2012189350

(第1条件)
A相出力信号VA(θ)及びB相出力信号VB(θ)の両振幅値A,Bを等しく、両振幅巾を「2」とし、オフセット値ΔBを「0」に維持したまま、オフセット値ΔAを前記振幅巾の0〜5%(すなわち0〜0.1)の範囲で0.5%(すなわち0.01)ごとに変化させ、オフセット値ΔAを0.5%ずつ変化させるごとに、θを0〜360度に亘って変化させて内挿精度φを順次計算した。そして、θの0〜360度に亘る内挿精度φの最大値φMaxから最小値φMinを減算した値φMax−φMin(Error)を図1のグラフに黒三角印で示している。
(First condition)
Both the amplitude values A and B of the A phase output signal V A (θ) and the B phase output signal V B (θ) are equal, both amplitude widths are set to “2”, and the offset value ΔB is maintained at “0”. Each time the offset value ΔA is changed by 0.5% (that is, 0.01) within the range of 0 to 5% (that is, 0 to 0.1) of the amplitude width, and the offset value ΔA is changed by 0.5%. In addition, the interpolation accuracy φ was sequentially calculated by changing θ from 0 to 360 degrees. A value φ Max −φ Min (Error) obtained by subtracting the minimum value φ Min from the maximum value φ Max of the interpolation accuracy φ over 0 to 360 degrees of θ is indicated by black triangles in the graph of FIG.

(第2条件)
A相出力信号VA(θ)及びB相出力信号VB(θ)の両オフセットΔA,ΔBを共に「0」に保ち、振幅値A,Bの比率(1−A/B)を0〜5%の範囲で0.05%ごとに変化させ(例えば、振幅値Bを「1」とすると、振幅値Aを1〜0.95まで0.005ずつ変化させて)、振幅値A,Bの比率(1−A/B)を0.05%ずつ変化させるごとに、θを0〜360度に亘って変化させて内挿精度φを順次計算した。そして、θの0〜360度に亘る内挿精度φの最大値φMaxから最小値φMinを減算した値φMax−φMin(Error)を図1のグラフに黒四角印で示している。
(Second condition)
Both offsets ΔA and ΔB of the A-phase output signal V A (θ) and the B-phase output signal V B (θ) are both kept at “0”, and the ratio (1−A / B) of the amplitude values A and B is set to 0 to 0. The amplitude value is changed by 0.05% within a range of 5% (for example, if the amplitude value B is “1”, the amplitude value A is changed by 0.005 from 1 to 0.95), the amplitude values A and B Each time the ratio (1-A / B) was changed by 0.05%, the interpolation accuracy φ was sequentially calculated by changing θ from 0 to 360 degrees. A value φ Max −φ Min (Error) obtained by subtracting the minimum value φ Min from the maximum value φ Max of the interpolation accuracy φ over 0 to 360 degrees of θ is indicated by black square marks in the graph of FIG.

この計算結果からも理解できるように、オフセット値ΔA,ΔBの内挿精度φに与える影響は、非常に大きく振幅比A/Bの4倍強になる。したがって、オフセット値ΔA,ΔBに関する補正が振幅値A,Bに比べた遥かに重要であることが理解できる。その意味で、本発明では、詳しくは後述するように、オフセット値ΔA,ΔBに関する補正を必須とし、振幅値A,Bに関する補正を選択事項としている。   As can be understood from this calculation result, the influence of the offset values ΔA and ΔB on the interpolation accuracy φ is very large and is slightly more than four times the amplitude ratio A / B. Therefore, it can be understood that the correction regarding the offset values ΔA and ΔB is much more important than the amplitude values A and B. In this sense, in the present invention, as will be described in detail later, correction relating to the offset values ΔA and ΔB is essential, and correction relating to the amplitude values A and B is selected.

この種の補正に関しては、従来から行われており、例えば下記特許文献1に示されている。なお、この特許文献1に示されたエンコーダ装置は、円柱の側面にN極とS極を交互に円周を等分割するように着磁された多極磁石の側面に対向するように、2つの磁気センサを90度位相のずれた正弦波信号を出力するように配置した構造を有している。   This type of correction has been conventionally performed, and is disclosed in, for example, Patent Document 1 below. Note that the encoder device disclosed in Patent Document 1 is arranged so as to face the side surface of a multipolar magnet that is magnetized so as to alternately divide the circumference of the N pole and S pole alternately on the side surface of the cylinder. It has a structure in which two magnetic sensors are arranged so as to output sinusoidal signals that are 90 degrees out of phase.

そして、補正方法としては次のような方法を採用している。まず、オフセット値に関しては、0〜360度に亘るA相出力信号VA(θ)及びB相出力信号VB(θ)のそれぞれに対して、最大値VAmax,VBmax及び最小値VAmin,VBminをそれぞれ抽出し、下記数5,6に示すように、前記抽出した最大値VAmax,VBmaxと最小値VAmin,VBminの平均値(振幅中心値)をオフセット値VAoff,VBoffとしてそれぞれ設定する。

Figure 2012189350
Figure 2012189350
As a correction method, the following method is adopted. First, regarding the offset value, the maximum values V Amax and V Bmax and the minimum value V Amin are respectively obtained for the A-phase output signal V A (θ) and the B-phase output signal V B (θ) ranging from 0 to 360 degrees. , V Bmin are extracted, and the average value (amplitude center value) of the extracted maximum values V Amax , V Bmax and the minimum values V Amin , V Bmin is expressed as the offset value V Aoff , Set as V Boff respectively.
Figure 2012189350
Figure 2012189350

そして、A相出力信号VA(θ)及びB相出力信号VB(θ)から前記設定したオフセット値VAoff,VBoffをそれぞれ減算することにより、下記数7,8に示すように、A相出力信号VA(θ)及びB相出力信号VB(θ)をオフセット補正するようにしている。

Figure 2012189350
Figure 2012189350
Then, by subtracting the set offset values V Aoff and V Boff from the A-phase output signal V A (θ) and the B-phase output signal V B (θ), respectively, The phase output signal V A (θ) and the B phase output signal V B (θ) are offset-corrected.
Figure 2012189350
Figure 2012189350

また、振幅値A,Bに関しては、A相出力信号VA(θ)及びB相出力信号VB(θ)のそれぞれにおいて、前記最大値VAmax,VBmaxから最小値VAmin,VBminを減算することにより振幅巾VAmax−VAmin,VBmax−VBminをそれぞれ計算し、振幅巾VBmax−VBminに対する振幅巾VAmax−VAminの比率を、下記数9に示すように振幅補正値Aamとして計算する。

Figure 2012189350
そして、A相出力信号VA(θ)に関してはそのまま用いるが、B相出力信号VB(θ)に関しては下記数10に示すように振幅補正値Aamを乗算することにより両振幅巾が同じになるように振幅補正するようにしている。
Figure 2012189350
As for the amplitude values A and B, the minimum values V Amin and V Bmin are obtained from the maximum values V Amax and V Bmax in the A-phase output signal V A (θ) and the B-phase output signal V B (θ), respectively. By subtracting, the amplitude widths V Amax −V Amin and V Bmax −V Bmin are respectively calculated, and the ratio of the amplitude width V Amax −V Amin to the amplitude width V Bmax −V Bmin is corrected as shown in Equation 9 below. Calculate as the value Aam.
Figure 2012189350
The A-phase output signal V A (θ) is used as it is, but the B-phase output signal V B (θ) is multiplied by the amplitude correction value Aam as shown in the following equation 10 so that both amplitude widths are the same. The amplitude is corrected so that
Figure 2012189350

そして、前記数7,8のオフセット補正及び数10の振幅補正を行ったA相出力信号VA(θ)及びB相出力信号VB(θ)を用いて前記数3と同様な下記数11の演算の実行により回転角度ωを計算するようにしている。

Figure 2012189350
Then, using the A-phase output signal V A (θ) and the B-phase output signal V B (θ) that have been subjected to the offset correction of Equations 7 and 8 and the amplitude correction of Equation 10, the following Equation 11 is applied. The rotation angle ω is calculated by executing this calculation.
Figure 2012189350

また、前記オフセット補正及び振幅補正には直接関係しないが、例えば、下記特許文献2には、センサ部に検知素子である8つのAMR磁気抵抗効果素子を点対称形に配置したエンコーダ装置が示されている。このエンコーダ装置においては、検出対象物である2極磁石にセンサ部を対向させることで、センサ部に潜在する振幅比を最小にし、互いに90度だけ位相の異なる均等性のある正弦波状のA相出力信号VA(θ)及びB相出力信号VB(θ)が磁石の1回転で2周期分出力される。また、下記特許文献3,4には、センサ部に検知素子としてSV−GMR磁気抵抗効果素子及びホール素子をそれぞれ用いた前記と同種のエンコーダ装置が示されている。これらのエンコーダ装置においても、センサ部に潜在する振幅比を最小にするために、複数の検知素子が点対称形に配置されている。また、これらのエンコーダ装置では、互いに90度だけ位相の異なる均等性のある正弦波状のA相出力信号VA(θ)及びB相出力信号VB(θ)が磁石の1回転で1周期分出力される。なお、前記特許文献2〜4に記載のエンコーダ装置を、機械的分解能を増すため、検出対象物が多極に着磁されたリニア磁石及びリング磁石の側面に配置するようにしたものもある。 Although not directly related to the offset correction and the amplitude correction, for example, Patent Document 2 below shows an encoder device in which eight AMR magnetoresistive effect elements as detection elements are arranged in a point-symmetric manner in a sensor unit. ing. In this encoder device, the sensor unit is opposed to a dipole magnet that is an object to be detected, thereby minimizing the amplitude ratio latent in the sensor unit, and having a uniform sinusoidal A phase that is different in phase by 90 degrees from each other. The output signal V A (θ) and the B-phase output signal V B (θ) are output for two cycles by one rotation of the magnet. Patent Documents 3 and 4 below show encoder devices of the same type as described above, in which an SV-GMR magnetoresistive element and a Hall element are used as detection elements in the sensor section. Also in these encoder devices, in order to minimize the amplitude ratio latent in the sensor unit, a plurality of detection elements are arranged in a point-symmetric manner. Further, in these encoder devices, the sinusoidal A-phase output signal V A (θ) and B-phase output signal V B (θ) having a phase difference of 90 degrees from each other are equivalent to one cycle by one rotation of the magnet. Is output. In addition, in order to increase the mechanical resolution, the encoder devices described in Patent Documents 2 to 4 may be arranged on the side surfaces of linear magnets and ring magnets that are magnetized with multiple poles.

特開平04−118513号公報Japanese Patent Laid-Open No. 04-118513 特開昭59−41822号広報JP-A-59-41822 特開平10−70325号公報Japanese Patent Laid-Open No. 10-70325 特開2002−71381号公報JP 2002-71381 A

しかしながら、この種のエンコーダ装置においては、前述のように、センサ部自身に潜在する誤差と、検出対象物とセンサ部との相互の次のような設置誤差とが生じる。すなわち、(1)回転時における偏芯によって起こる検出対象物との傾きによる誤差、(2)検出対象物の中心と回転軸とのずれ、(3)検出対象物に対するセンサ部の傾き、及び(4)回転軸の線上からセンサの位置ずれによる設置誤差が生じる。しかも、これらの設置誤差(1)〜(4)は、一つもしくは複合的に生じる。   However, in this type of encoder device, as described above, an error that is latent in the sensor unit itself and the following installation error between the detection target and the sensor unit occur. That is, (1) an error due to a tilt with a detection target caused by eccentricity during rotation, (2) a deviation between the center of the detection target and the rotation axis, (3) a tilt of the sensor unit with respect to the detection target, and ( 4) An installation error occurs due to the displacement of the sensor from the line of the rotation axis. In addition, these installation errors (1) to (4) occur one or more.

そして、前記特許文献2〜4に示されたエンコーダ装置に対して前述した特許文献1のようなオフセット補正及び振幅を行っても、内挿精度の低下を十分に抑制できない。これは、センサ部自身に潜在するオフセット値と振幅比に関する誤差と、検出対象物に対するセンサ部の設置誤差による影響とを一緒に補正するため、センサ部自身に潜在する誤差に設置誤差が影響して、内挿精度の低下を抑制できないためであると考えられる。   And even if it performs offset correction and amplitude like patent document 1 mentioned above with respect to the encoder apparatus shown by the said patent documents 2-4, the fall of an interpolation precision cannot fully be suppressed. This is because the error related to the offset value and amplitude ratio latent in the sensor unit itself and the influence of the installation error of the sensor unit on the detection target are corrected together, so the installation error affects the error latent in the sensor unit itself. This is considered to be because a decrease in interpolation accuracy cannot be suppressed.

本発明は上記問題に対処するためになされたもので、その目的は、内挿精度の低下を極力抑えて、検出対象物の回転角度又は移動位置を高精度で検出できるようにしたエンコーダ装置及びエンコーダ装置のための補正方法を提供することにある。なお、下記本発明の各構成要件の記載においては、本発明の理解を容易にするために、実施形態の対応箇所の符号を括弧内に記載しているが、本発明の各構成要件は、実施形態の符号によって示された対応箇所の構成に限定解釈されるべきものではない。   The present invention has been made to address the above problems, and an object of the present invention is to provide an encoder device capable of detecting a rotation angle or a moving position of a detection target with high accuracy while minimizing a decrease in interpolation accuracy. It is to provide a correction method for an encoder device. In addition, in the description of each constituent element of the present invention below, in order to facilitate understanding of the present invention, reference numerals of corresponding portions of the embodiment are described in parentheses, but each constituent element of the present invention is The present invention should not be construed as being limited to the configurations of the corresponding portions indicated by the reference numerals of the embodiments.

上記目的を達成するために、本発明の構成上の特徴は、検出対象物(21,22)の回転又は移動に応じて互いに90度だけ位相の異なる正弦波状の第1及び第2アナログ検出信号を出力するセンサ部(10)と、センサ部からの第1及び第2アナログ検出信号を第1及び第2ディジタル検出信号にそれぞれディジタル変換して、前記変換した第1及び第2ディジタル検出信号を用いて検出対象物の回転角度又は移動位置を演算処理する演算処理部(31〜33)とを備えたエンコーダ装置に適用され、前記変換した第1及び第2ディジタル検出信号を補正するエンコーダ装置のための補正方法であって、センサ部からの第1及び第2アナログ検出信号を所定間隔でそれぞれサンプリングすることにより、少なくとも波形1周期分の第1及び第2ディジタルデータをそれぞれ取得するデータ取得手順(S14〜S18)と、前記取得された第1及び第2ディジタルデータの中から最大値及び最小値の位置をそれぞれ検出する位置検出手順(S20,S26)と、前記取得された第1ディジタルデータの中から、前記検出された第1ディジタルデータの最大値及び最小値の各検出位置からそれぞれ90度だけ離れた4つの位置の各ディジタルデータをそれぞれ抽出して4つの補正用ディジタルデータとするとともに、前記取得された第2ディジタルデータの中から、前記検出された第2ディジタルデータの最大値及び最小値の各検出位置からそれぞれ90度だけ離れた4つの位置の各ディジタルデータをそれぞれ抽出して4つの補正用ディジタルデータとする補正用ディジタルデータ抽出手順(S22,S28)と、前記抽出された第1ディジタルデータに関する4つの補正用ディジタルデータを平均した値を第1オフセット値として設定するとともに、前記抽出された第2ディジタルデータに関する4つの補正用ディジタルデータを平均した値を第2オフセット値として設定するオフセット値設定手順(S24,S30)と、演算処理部で第1及び第2ディジタル検出信号を用いて検出対象物の回転角度又は移動位置を演算処理する前に、センサ部から入力されて変換された第1及び第2ディジタル検出信号を第1及び第2オフセット値を用いてそれぞれ補正するオフセット値補正手順(S44,S46)とを含むことにある。   In order to achieve the above object, the constitutional feature of the present invention is that the first and second analog detection signals in the form of sinusoids whose phases are different from each other by 90 degrees in accordance with the rotation or movement of the detection object (21, 22). The first and second analog detection signals from the sensor unit are digitally converted into first and second digital detection signals, respectively, and the converted first and second digital detection signals are converted into the first and second digital detection signals. An encoder device that is applied to an encoder device that includes an arithmetic processing unit (31 to 33) that performs arithmetic processing on a rotation angle or a moving position of a detection target using the encoder and corrects the converted first and second digital detection signals. The first and second analog detection signals from the sensor unit are sampled at predetermined intervals, respectively. (2) A data acquisition procedure (S14 to S18) for acquiring digital data, and a position detection procedure (S20, S26) for detecting the positions of the maximum value and the minimum value from the acquired first and second digital data, respectively. And from the acquired first digital data, the respective digital data at four positions that are 90 degrees apart from the respective detected positions of the maximum value and the minimum value of the detected first digital data are respectively extracted. And four correction digital data, and four of the acquired second digital data, each 90 degrees away from each detected position of the maximum value and the minimum value of the detected second digital data. Digital data for correction by extracting each digital data of position and making four digital data for correction An output procedure (S22, S28) and a value obtained by averaging four digital data for correction related to the extracted first digital data are set as a first offset value, and four corrections related to the extracted second digital data are set. Offset value setting procedure (S24, S30) for setting a value obtained by averaging the digital data for use as the second offset value, and the rotation angle or movement position of the detection object using the first and second digital detection signals in the arithmetic processing unit The offset value correction procedure (S44, S46) for correcting the first and second digital detection signals input from the sensor unit and converted by using the first and second offset values before the arithmetic processing is performed. There is.

上記のように構成した本発明においては、補正用ディジタルデータ抽出手順で、センサ部から出力される第1アナログ検出信号に対応した第1ディジタル検出信号の最大値及び最小値の各検出位置からそれぞれ90度だけ離れた4つの位置の各ディジタルデータがそれぞれ抽出されて4つの補正用ディジタルデータとされるとともに、センサ部から出力されて前記第1アナログ検出信号とは90度だけ位相の異なる第2アナログ検出信号に対応した第2ディジタル検出信号の最大値及び最小値の各検出位置からそれぞれ90度だけ離れた4つの位置の各ディジタルデータがそれぞれ抽出されて4つの補正用ディジタルデータとされる。オフセット値設定手順で、前記抽出された第1ディジタルデータに関する4つの補正用ディジタルデータを平均した値が第1オフセット値として設定されるとともに、前記抽出された第2ディジタルデータに関する4つの補正用ディジタルデータを平均した値が第2オフセット値として設定される。そして、オフセット値補正手順により、演算処理部で第1及び第2ディジタル検出信号を用いて検出対象物の回転角度又は移動位置を演算処理する前に、センサ部から入力されて変換された第1及び第2ディジタル検出信号が第1及び第2オフセット値を用いてそれぞれ補正される。その結果、センサ部と検出対象物の設置誤差によって生じる内挿精度が良好となり、検出対象物の回転角度又は移動位置が高精度で検出されるようになる。   In the present invention configured as described above, in the correction digital data extraction procedure, each of the detection positions of the maximum value and the minimum value of the first digital detection signal corresponding to the first analog detection signal output from the sensor unit is determined. Each of the digital data at four positions separated by 90 degrees is extracted as four correction digital data, and is output from the sensor unit to be a second signal having a phase difference of 90 degrees from the first analog detection signal. The digital data at four positions that are 90 degrees apart from the detection positions of the maximum value and the minimum value of the second digital detection signal corresponding to the analog detection signal are extracted and used as four correction digital data. In the offset value setting procedure, a value obtained by averaging the four correction digital data related to the extracted first digital data is set as the first offset value, and the four correction digital data related to the extracted second digital data are set. A value obtained by averaging the data is set as the second offset value. Then, according to the offset value correction procedure, the arithmetic processing unit uses the first and second digital detection signals to calculate the rotation angle or the moving position of the detection target, and the first converted and input from the sensor unit. And the second digital detection signal are corrected using the first and second offset values, respectively. As a result, the interpolation accuracy caused by the installation error between the sensor unit and the detection object becomes good, and the rotation angle or movement position of the detection object can be detected with high accuracy.

また、本発明の他の特徴は、センサ部は、一つの基板上に複数の検出素子を対称形に配置したものであるとよい。これによれば、設置誤差の許容性の強いエンコーダ装置においても、検出対象物の回転角度又は移動位置がより高精度で検出されるようになる。   According to another feature of the present invention, the sensor unit may have a plurality of detection elements arranged symmetrically on a single substrate. According to this, even in an encoder apparatus having a high tolerance for installation errors, the rotation angle or the movement position of the detection target can be detected with higher accuracy.

また、前記本発明においては、前記背景技術の項で説明した振幅に関する補正を合わせて行うようにしてもよい。これによれば、検出対象物の回転角度又は移動位置がより高精度で検出されるようになる。   In the present invention, the correction related to the amplitude described in the section of the background art may be performed together. According to this, the rotation angle or the movement position of the detection target can be detected with higher accuracy.

さらに、本発明は、前記エンコーダ装置のための補正方法を、検出対象物の回転又は移動に応じて互いに90度だけ位相の異なる正弦波状の第1及び第2アナログ検出信号を出力するセンサ部と、センサ部からの第1及び第2アナログ検出信号を第1及び第2ディジタル検出信号にそれぞれディジタル変換するとともに、前記変換した第1及び第2ディジタル検出信号を前記第1及び第2アナログ検出信号の各オフセット値を用いて補正し、前記補正した第1及び第2ディジタル検出信号を用いて検出対象物の回転角度又は移動位置を演算処理する演算処理部とを備えたエンコーダ装置に適用するようにしてもよい。これによっても、前記と同様に、センサ部と検出対象物の設置誤差によって生じる内挿精度が良好となり、検出対象物の回転角度又は移動位置が高精度で検出されるようになる。   Furthermore, the present invention provides a correction method for the encoder device, wherein the sensor unit outputs sinusoidal first and second analog detection signals having phases different from each other by 90 degrees in accordance with the rotation or movement of the detection object. The first and second analog detection signals from the sensor unit are digitally converted into first and second digital detection signals, respectively, and the converted first and second digital detection signals are converted into the first and second analog detection signals, respectively. And an arithmetic processing unit that performs arithmetic processing on the rotation angle or moving position of the detection target using the corrected first and second digital detection signals. It may be. Also in this manner, as described above, the interpolation accuracy caused by the installation error between the sensor unit and the detection object becomes good, and the rotation angle or movement position of the detection object can be detected with high accuracy.

オフセット値と振幅比とが内挿精度に与える影響を説明するための内挿精度の誤差の大きさを示すグラフである。It is a graph which shows the magnitude | size of the error of the interpolation accuracy for demonstrating the influence which an offset value and an amplitude ratio have on interpolation accuracy. 本発明の一実施形態に係るエンコーダ装置に適用される補正装置を概略的に示すブロック図である。It is a block diagram which shows roughly the correction apparatus applied to the encoder apparatus which concerns on one Embodiment of this invention. 図2の演算処理装置にて実行される補正値取得プログラムを示すフローチャートである。It is a flowchart which shows the correction value acquisition program performed with the arithmetic processing apparatus of FIG. 最大値及及び最小値からプラス90度及びマイナス90度の位置にあるサンプリング値の抽出動作を説明するための説明図である。It is explanatory drawing for demonstrating the extraction operation | movement of the sampling value in the position of plus 90 degree | times and minus 90 degree | times from the maximum value and the minimum value. 前記サンプリング値の他の抽出例を説明するための説明図である。It is explanatory drawing for demonstrating the other extraction example of the said sampling value. 前記サンプリング値の他の抽出例を説明するための説明図である。It is explanatory drawing for demonstrating the other extraction example of the said sampling value. 本発明の一実施形態に係るエンコーダ装置を概略的に示すブロック図である。1 is a block diagram schematically showing an encoder device according to an embodiment of the present invention. 図7の演算処理装置にて実行される回転角度計算プログラムを示すフローチャートである。It is a flowchart which shows the rotation angle calculation program performed with the arithmetic processing apparatus of FIG. 本発明の第1実施例に係る磁気センサの概略構成図である。It is a schematic block diagram of the magnetic sensor which concerns on 1st Example of this invention. 前記第1実施例の磁気センサの等価回路を示す図である。It is a figure which shows the equivalent circuit of the magnetic sensor of the said 1st Example. 前記第1実施例の磁気センサと磁石との配置関係を説明するための概略配置図である。It is a schematic layout for demonstrating arrangement | positioning relationship between the magnetic sensor of the said 1st Example, and a magnet. 前記第1実施例の磁気センサにおいて従来の補正方法を用いて計算した内挿精度を示すグラフである。It is a graph which shows the interpolation precision calculated using the conventional correction method in the magnetic sensor of the said 1st Example. 前記第1実施例の磁気センサにおいて本発明の補正方法を用いて計算した内挿精度を示すグラフである。It is a graph which shows the interpolation precision calculated using the correction method of this invention in the magnetic sensor of the said 1st Example. 本発明の第2実施例に係る磁気センサの概略構成図である。It is a schematic block diagram of the magnetic sensor which concerns on 2nd Example of this invention. 前記第2実施例の磁気センサにおいて従来の補正方法を用いて計算した内挿精度を示すグラフである。It is a graph which shows the interpolation precision calculated using the conventional correction method in the magnetic sensor of the said 2nd Example. 前記第2実施例の磁気センサにおいて本発明の補正方法を用いて計算した内挿精度を示すグラフである。It is a graph which shows the interpolation precision calculated using the correction method of this invention in the magnetic sensor of the said 2nd Example. 本発明の第3実施例に係る磁気センサの概略構成図である。It is a schematic block diagram of the magnetic sensor which concerns on 3rd Example of this invention. 前記第3実施例の磁気センサから出力されるA相出力信号及びB相出力信号と、サンプリング位置の関係を示す波形図である。It is a wave form diagram which shows the relationship of the A position output signal and B phase output signal which are output from the magnetic sensor of the said 3rd Example, and a sampling position. 前記第3実施例の磁気センサにおいて従来の補正方法を用いて計算した内挿精度を示すグラフである。It is a graph which shows the interpolation precision calculated using the conventional correction method in the magnetic sensor of the said 3rd Example. 前記第3実施例の磁気センサにおいて本発明の補正方法を用いて計算した内挿精度を示すグラフである。It is a graph which shows the interpolation precision calculated using the correction method of this invention in the magnetic sensor of the said 3rd Example. 前記第1及び第2実施例に係り、設置誤差がない状態における磁界変化を説明するための図である。It is a figure for demonstrating the magnetic field change in a state which concerns on the said 1st and 2nd Example, and there is no installation error. 前記第1及び第2実施例に係り、設置誤差がある状態における磁界変化を説明するための図である。It is a figure for demonstrating the magnetic field change in a state with installation error concerning the said 1st and 2nd Example. 前記第3実施例に係り、設置誤差がある状態における磁界変化を説明するための図である。It is a figure for demonstrating the magnetic field change in a state with an installation error concerning the said 3rd Example. 本発明の変形例に係る磁気センサの概略構成図である。It is a schematic block diagram of the magnetic sensor which concerns on the modification of this invention. 設置誤差のない状態における、前記変形例に係る磁気センサと多極リング磁石に対する配置関係を説明するための概略配置図である。It is a schematic layout for demonstrating the arrangement | positioning relationship with respect to the magnetic sensor which concerns on the said modification, and a multipolar ring magnet in a state without installation error. 設置誤差のない状態における、前記変形例に係る磁気センサと多極リニア磁石に対する配置関係を説明するための概略配置図である。It is a schematic layout for demonstrating the arrangement | positioning relationship with respect to the magnetic sensor which concerns on the said modification, and a multipolar linear magnet in a state without installation error. 設置誤差の有する状態における、前記変形例に係る磁気センサと多極リング磁石に対する配置関係を説明するための概略配置図である。It is a schematic layout for demonstrating arrangement | positioning relationship with respect to the magnetic sensor which concerns on the said modification, and a multipolar ring magnet in the state which has an installation error. 設置誤差の有する状態における、前記変形例に係る磁気センサと多極リニア磁石に対する配置関係を説明するための概略配置図である。It is a schematic layout for demonstrating the arrangement | positioning relationship with respect to the magnetic sensor which concerns on the said modification, and a multipolar linear magnet in the state which has an installation error. 前記図24Aのように配置した磁気センサにおいて従来の補正方法及び本発明による補正方法を用いて計算した内挿精度を示すグラフである。It is a graph which shows the interpolation accuracy calculated using the correction method by the conventional correction method and this invention in the magnetic sensor arrange | positioned like the said FIG. 24A. 前記図24Bのように配置した磁気センサにおいて従来の補正方法及び本発明による補正方法を用いて計算した内挿精度を示すグラフである。It is a graph which shows the interpolation precision calculated using the correction method by the conventional correction method and this invention in the magnetic sensor arrange | positioned like the said FIG. 24B. 本発明の他の変形例に係る磁気センサと多極リング磁石とを示す概略図であるIt is the schematic which shows the magnetic sensor and multipolar ring magnet which concern on the other modification of this invention.

a.実施形態
以下、本発明の実施形態について、図面を用いて説明する。図2は、本発明に係るエンコーダ装置に適用される補正装置を概略的に示すブロック図である。磁気センサ10は、本発明のセンサ部を構成するもので、回転軸21に固定された磁石22に対向して配置され、検出対象物の回転に応じて互いに90度だけ位相の異なる正弦波状のアナログ信号であるA相出力信号VA及びB相出力信号VBを出力する。回転軸21及び磁石22は、本発明の検出対象物を構成するものである。
a. Embodiments Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 2 is a block diagram schematically showing a correction device applied to the encoder device according to the present invention. The magnetic sensor 10 constitutes a sensor unit of the present invention, and is disposed opposite to a magnet 22 fixed to a rotating shaft 21, and has a sinusoidal shape whose phases are different from each other by 90 degrees in accordance with the rotation of a detection object. An A-phase output signal V A and a B-phase output signal V B which are analog signals are output. The rotating shaft 21 and the magnet 22 constitute the detection object of the present invention.

この場合、図2に示すように、周方向に分割されてN極及びS極が配置された円板状の磁石22の上面又は底面に磁気センサ10が配置されていてもよいし、後述する具体的な実施例で説明するように、円柱の側面にN極とS極を交互に円周を等分割するように着磁された磁石の側面に対向させて磁気センサを設けてもよい。また、多極に着磁されたリニア磁石の側面に対向させて磁気センサを配置し、磁気センサは、磁石の直線的な移動に応じて90度だけ位相の異なる正弦波状のA相出力信号VA及びB相出力信号VBを出力するような構成でもよい。また、磁気センサ10に関しても、磁気抵抗効果素子をそれぞれ含む2つのパッケージを90度位相のずれた位置に配置して各パッケージがA相出力信号VA及びB相出力信号VBをそれぞれ出力するようにしてもよいし、複数の磁気抵抗素子を一つのパッケージに含むように磁気センサ10を構成して、1つのパッケージからA相出力信号VA及びB相出力信号VBを出力するようにしてもよい。さらに、1つのパッケージ内に多数の磁気抵抗効果素子を対称に配置した、ハーフブリッジ型、フルブリッジ型、ダブルブリッジ型などの磁気センサ10であってもよい。 In this case, as shown in FIG. 2, the magnetic sensor 10 may be disposed on the upper surface or the bottom surface of the disk-shaped magnet 22 that is divided in the circumferential direction and has the N-pole and the S-pole, which will be described later. As will be described in a specific embodiment, a magnetic sensor may be provided on the side surface of the cylinder so as to face the side surface of the magnet magnetized so as to alternately divide the circumference equally between the north and south poles. In addition, a magnetic sensor is arranged opposite to the side surface of the linear magnet magnetized in multiple poles, and the magnetic sensor has a sinusoidal A-phase output signal V having a phase difference of 90 degrees according to the linear movement of the magnet. It may be configured to output the A and B phase output signals V B. Also for the magnetic sensor 10, two packages each including a magnetoresistive effect element are arranged at positions shifted by 90 degrees, and each package outputs an A-phase output signal V A and a B-phase output signal V B , respectively. Alternatively, the magnetic sensor 10 may be configured to include a plurality of magnetoresistive elements in one package so that the A phase output signal V A and the B phase output signal V B are output from one package. May be. Further, it may be a magnetic sensor 10 of a half bridge type, a full bridge type, a double bridge type or the like in which a large number of magnetoresistive elements are arranged symmetrically in one package.

磁気センサ10の出力端には、サンプリング回路11及びA/D変換器12a,12bが接続されている。サンプリング回路11は、後述する演算処理装置13によって制御され、磁気センサ10からアナログ信号であるA相出力信号VA及びB相出力信号VBを所定の周期でそれぞれサンプリングして、A/D変換器12a,12bにそれぞれ出力する。A/D変換器12a,12bは、前記サンプリングされたA相出力信号VA及びB相出力信号VBのサンプリング値をそれぞれA/D変換して、演算処理装置13に出力する。演算処理装置13は、CPU,ROM,RAM、その他のメモリ装置などからなるコンピュータ装置で構成され、本実施形態では図3に示す補正値取得プログラムを記憶しているとともに実行する。 A sampling circuit 11 and A / D converters 12 a and 12 b are connected to the output terminal of the magnetic sensor 10. The sampling circuit 11 is controlled by an arithmetic processing unit 13 which will be described later, and samples the A phase output signal V A and the B phase output signal V B that are analog signals from the magnetic sensor 10 respectively in a predetermined cycle, and performs A / D conversion. Output to the units 12a and 12b, respectively. The A / D converters 12 a and 12 b A / D convert the sampled values of the sampled A-phase output signal V A and B-phase output signal V B , respectively, and output them to the arithmetic processing unit 13. The arithmetic processing unit 13 is composed of a computer device including a CPU, ROM, RAM, and other memory devices, and stores and executes the correction value acquisition program shown in FIG. 3 in this embodiment.

この演算処理装置13には、入力装置14、表示装置15及び入出力回路16が接続されている。入力装置14は、操作スイッチなどからなり、演算処理装置13の作動指示に利用される。表示装置15は、演算処理装置13の作動指示、作動内容、作動結果などを表示する。入出力回路16は、他の装置とのデータの授受などをする。また、この演算処理装置13には、演算処理装置13にて生成されたデータなどを記憶するメモリ17が接続されるようになっている。   An input device 14, a display device 15, and an input / output circuit 16 are connected to the arithmetic processing device 13. The input device 14 includes operation switches and the like, and is used for operating instructions of the arithmetic processing device 13. The display device 15 displays an operation instruction, operation content, operation result, and the like of the arithmetic processing device 13. The input / output circuit 16 exchanges data with other devices. The arithmetic processing unit 13 is connected to a memory 17 for storing data generated by the arithmetic processing unit 13.

演算処理装置13には、モータなどを含む駆動装置23も接続されている。駆動装置23は、演算処理装置13により制御されて、回転軸21及び磁石22を回転させる。なお、前述のように、磁石22がリニアに移動するものであるある場合は、駆動装置23は磁石22をリニアに駆動する。なお、回転軸21、磁石22及び磁気センサ10は、磁気センサ10から出力されるA相出力信号VA及びB相出力信号VBを用いた回転角度又は移動位置の検出に利用する装置内に既に組み込まれているものである。そして、他の装置及び回路11〜17,23は、前記回転角度又は移動位置の検出を利用する装置内とは別のものであってもよいが、前記装置内に組み込まれていてもよい。 A driving device 23 including a motor and the like is also connected to the arithmetic processing device 13. The driving device 23 is controlled by the arithmetic processing device 13 to rotate the rotating shaft 21 and the magnet 22. In addition, as mentioned above, when the magnet 22 moves linearly, the drive device 23 drives the magnet 22 linearly. The rotating shaft 21, the magnet 22, and the magnetic sensor 10 are included in a device that is used for detecting a rotation angle or a moving position using the A-phase output signal V A and the B-phase output signal V B output from the magnetic sensor 10. It is already built in. The other devices and circuits 11 to 17 and 23 may be different from the device using the detection of the rotation angle or the movement position, but may be incorporated in the device.

次に、上記のように構成した実施形態の動作について説明する。この場合、ユーザの入力装置14などを用いた指示により、演算処理装置13は、図3の補正値取得プログラムの実行を開始する。この補正値取得プログラムはステップS10にて開始され、演算処理装置13は、ステップS12にて、駆動装置23の駆動制御を開始して回転軸21及び磁石22を所定の一定速で回転させ始める。なお、前述のように、磁石22をリニアに移動させる場合には、磁石22を一定速でリニアに移動させ始める。これにより、磁石22は一定速で回転(移動)し始め、磁気センサ10は、アナログのA相出力信号VA及びB相出力信号VBをサンプリング回路11にそれぞれ出力し始める。前記ステップS12の処理後、演算処理装置13は、ステップS14にてサンプリング回路11にサンプリングの開始を指示する。この場合、アナログのA相出力信号VA及びB相出力信号VBの1周期当たりサンプリング数は、磁石22の回転速度に反比例するとともにサンプリング回路11のサンプリングレートに比例する。本実施形態においては、前記アナログのA相出力信号VA及びB相出力信号VBの1周期当たりサンプリング数が一定個数(例えば、1024個)に決められているので、演算処理装置13は、サンプリング回路11によるサンプリングレート及び駆動装置23による磁石22の回転速度の少なくとも一方を制御する。 Next, the operation of the embodiment configured as described above will be described. In this case, the arithmetic processing device 13 starts executing the correction value acquisition program of FIG. 3 according to an instruction using the input device 14 or the like of the user. This correction value acquisition program is started in step S10, and the arithmetic processing unit 13 starts driving control of the driving unit 23 in step S12 and starts rotating the rotary shaft 21 and the magnet 22 at a predetermined constant speed. As described above, when moving the magnet 22 linearly, the magnet 22 starts to move linearly at a constant speed. As a result, the magnet 22 starts rotating (moving) at a constant speed, and the magnetic sensor 10 starts outputting the analog A-phase output signal V A and the B-phase output signal V B to the sampling circuit 11 respectively. After the processing in step S12, the arithmetic processing unit 13 instructs the sampling circuit 11 to start sampling in step S14. In this case, the number of samplings per cycle of the analog A-phase output signal V A and B-phase output signal V B is inversely proportional to the rotational speed of the magnet 22 and proportional to the sampling rate of the sampling circuit 11. In the present embodiment, since the number of samplings per cycle of the analog A-phase output signal V A and B-phase output signal V B is determined to be a fixed number (for example, 1024), the arithmetic processing unit 13 At least one of the sampling rate by the sampling circuit 11 and the rotational speed of the magnet 22 by the driving device 23 is controlled.

前記ステップS14の処理後、演算処理装置13は、ステップS16にて、サンプリング回路11によってサンプリングされ、かつA/D変換器12a,12bによってそれぞれディジタル変換されたディジタルのA相出力信号VA及びB相出力信号VBのサンプリング値を取込んで記憶する。そして、演算処理装置13は、ステップS18にて駆動終点を確認する。ここでは、磁石22が1回転以上回転したかを判定する。この判定は、磁石22の回転速度と、タイマによる時間計測とによって行われる。磁石22が1回転以上回転するまで、演算処理装置13は、ステップS18にて「No」と判定して、ステップS16におけるA相出力信号VA及びB相出力信号VBのサンプリング値の取込み及び記憶処理を繰返し実行し続ける。磁石22が1回転以上回転すると、演算処理装置13は、ステップS18にて「Yes」と判定して、ステップS20に進む。 After the processing in step S14, the arithmetic processing unit 13 in step S16 samples the digital A-phase output signals V A and B sampled by the sampling circuit 11 and digitally converted by the A / D converters 12a and 12b, respectively. The sampling value of the phase output signal V B is taken in and stored. And the arithmetic processing unit 13 confirms a drive end point in step S18. Here, it is determined whether the magnet 22 has rotated one or more times. This determination is performed by the rotation speed of the magnet 22 and time measurement by a timer. Until the magnet 22 rotates one or more times, the arithmetic processing unit 13 determines “No” in step S18, and takes in the sampling values of the A-phase output signal V A and the B-phase output signal V B in step S16 and Continue to execute the storage process repeatedly. When the magnet 22 rotates one or more times, the arithmetic processing unit 13 determines “Yes” in step S18 and proceeds to step S20.

ステップS20においては、A相出力信号VAの少なくとも1周期分のサンプリング値の中から最大値VAmax及び最小値VAminを抽出する。次に、演算処理装置13は、ステップS22にて前記最大値VAmax及び最小値VAminの位置に対してプラス90度の位置とマイナス90度の位置に対応する4つのサンプリング値VA1,VA2,VA3,VA4を、A相出力信号VAの少なくとも1周期分のサンプリング値の中から抽出する。 In step S20, the maximum value V Amax and the minimum value V Amin are extracted from the sampling values for at least one period of the A-phase output signal V A. Next, in step S22, the arithmetic processing unit 13 has four sampling values VA1, VA2, corresponding to the positions of plus 90 degrees and minus 90 degrees with respect to the positions of the maximum value V Amax and the minimum value V Amin . VA3 and VA4 are extracted from sampling values for at least one period of the A-phase output signal V A.

この4つのサンプリング値VA1,VA2,VA3,VA4の抽出について図を用いて説明しておく。図4は、磁気センサ10として、上述した特許文献3,4と同様にSV−GMR磁気抵抗効果素子又はホール素子を用いた場合のA相出力信号VA及びB相出力信号VB、すなわち磁石22の1回転で1周期分のA相出力信号VA及びB相出力信号VBが出力される例を示している。図4のA相出力信号VAにおいて、丸印で示すように、最大値VAmax及び最小値VAminが抽出され、その後に、三角印で示すように、最大値VAmax及び最小値VAminの位置に対してプラス90度の位置とマイナス90度の位置に対応する4つのサンプリング値VA1,VA2,VA3,VA4が抽出される。この場合の90度に対応するサンプリング数は256個であり、最大値VAmax及び最小値VAminのサンプリング値から前後に256個離れたサンプリング値が前記4つのサンプリング値VA1,VA2,VA3,VA4として抽出されることになる。 The extraction of the four sampling values VA1, VA2, VA3, VA4 will be described with reference to the drawings. FIG. 4 shows an A-phase output signal V A and a B-phase output signal V B when the SV-GMR magnetoresistive effect element or Hall element is used as the magnetic sensor 10 as in the above-mentioned Patent Documents 3 and 4, that is, magnets. In this example, the A phase output signal V A and the B phase output signal V B for one cycle are output by one rotation of 22. In the A-phase output signal V A of FIG. 4, as indicated by a circle, the maximum value V Amax and the minimum value V Amin is extracted, then, as indicated by triangles, maximum V Amax and the minimum value V Amin Four sampling values VA1, VA2, VA3, and VA4 corresponding to a position of plus 90 degrees and a position of minus 90 degrees with respect to the position are extracted. In this case, the number of samplings corresponding to 90 degrees is 256, and 256 sampling values that are separated from the sampling values of the maximum value V Amax and the minimum value V Amin before and after are the four sampling values VA1, VA2, VA3, VA4. Will be extracted as

なお、図5に示すように、最大値VAmax及び最小値VAminの位置に対してプラス90度の位置とマイナス90度の位置に対応する4つのサンプリング値VA1,VA2,VA3,VA4が直接的に抽出されない場合(例えば、図5に示すように、最大値VAmaxの位置に対してマイナス90度の位置に対応するサンプリング値VA2を直接的に抽出できない場合)には、1つ前又は後の周期の対応する位相位置のサンプリング値(サンプリング値VA2)がサンプリング値VA1,VA2,VA3,VA4として抽出される。 As shown in FIG. 5, four sampling values VA1, VA2, VA3, and VA4 corresponding to positions of plus 90 degrees and minus 90 degrees with respect to the positions of the maximum value V Amax and the minimum value V Amin are directly obtained. In the case where the sampling value VA2 corresponding to the position of minus 90 degrees with respect to the position of the maximum value V Amax cannot be directly extracted, for example, as shown in FIG. Sampling values (sampling value VA2) at the phase position corresponding to the later period are extracted as sampling values VA1, VA2, VA3, and VA4.

また、図6は、磁気センサ22として、上述した特許文献2と同様にAMR磁気抵抗効果素子を用いた場合のA相出力信号VA及びB相出力信号VB、すなわち磁石22の1回転で2周期分のA相出力信号VA及びB相出力信号VBが出力される例を示している。したがって、この場合には、90度はサンプリング数128に相当するので、最大値VAmax及び最小値VAminのサンプリング値から前後に128個離れたサンプリング値が前記4つのサンプリング値VA1,VA2,VA3,VA4として抽出されることになる。また、この場合も、4つのサンプリング値VA1,VA2,VA3,VA4が直接的に抽出されない場合には、1つ前又は後の周期の対応する位相位置のサンプリング値がサンプリング値VA1,VA2,VA3,VA4として抽出される。さらに、この場合には、ステップS16,S18の処理により、前記図4の場合の半分の時間だけサンプリング値を取込んで処理するようにしてもよい。 FIG. 6 shows the A-phase output signal V A and the B-phase output signal V B when the AMR magnetoresistive effect element is used as the magnetic sensor 22 in the same manner as in Patent Document 2 described above, that is, one rotation of the magnet 22. An example is shown in which the A-phase output signal V A and the B-phase output signal V B for two cycles are output. Therefore, in this case, since 90 degrees corresponds to the sampling number 128, the sampling values that are 128 back and forth from the sampling values of the maximum value V Amax and the minimum value V Amin are the four sampling values VA1, VA2, and VA3. , VA4. Also in this case, if the four sampling values VA1, VA2, VA3, and VA4 are not directly extracted, the sampling values at the corresponding phase positions in the previous or subsequent cycle are the sampling values VA1, VA2, and VA3. , VA4. Further, in this case, the sampling values may be taken in and processed for half the time in the case of FIG. 4 by the processing in steps S16 and S18.

前記ステップS22の処理後、演算処理装置13は、ステップS24にて、前記抽出した4つのサンプリング値VA1,VA2,VA3,VA4を用いた下記数12の演算の実行により、4つのサンプリング値VA1,VA2,VA3,VA4の平均値をA相出力信号VAのオフセット値VAoffとして計算する。

Figure 2012189350
After the process of step S22, the arithmetic processing unit 13 performs the four sampling values VA1, 1 by executing the following equation 12 using the extracted four sampling values VA1, VA2, VA3, VA4 in step S24. The average value of VA2, VA3, VA4 is calculated as the offset value V Aoff of the A-phase output signal V A.
Figure 2012189350

前記ステップS24の処理後、演算処理装置13は、B相出力信号VBの1周期分のサンプリング値に対して、上記ステップS20〜S24と同様なステップS26〜S30の処理を実行して、B相出力信号VBの少なくとも1周期分のサンプリング値の中から最大値VBmax及び最小値VBminを抽出し、前記最大値VBmax及び最小値VBminの位置に対してプラス90度の位置とマイナス90度の位置に対応する4つのサンプリング値VB1,VB2,VB3,VB4を抽出し、下記数13の演算処理によってB相出力信号VBのオフセット値VBoffを計算する。

Figure 2012189350
After processing at step S24, the processing unit 13, the sampling values of one period of the B-phase output signal V B, by performing the processing similar steps S26~S30 as in step S20 to S24, B The maximum value V Bmax and the minimum value V Bmin are extracted from the sampling values of at least one period of the phase output signal V B , and the position of plus 90 degrees with respect to the position of the maximum value V Bmax and the minimum value V Bmin Four sampling values VB1, VB2, VB3, and VB4 corresponding to the position of minus 90 degrees are extracted, and the offset value V Boff of the B-phase output signal V B is calculated by the following arithmetic processing.
Figure 2012189350

次に、演算処理装置13は、ステップS32にて、A相出力信号VAの最大値VAmaxから最小値VAminを減算することによりA相出力信号VAの振幅巾VAmax−VAminを計算し、B相出力信号VBの最大値VBmaxから最小値VBminを減算することによりB相出力信号VBの振幅巾VBmax−VBminを計算し、これらの振幅巾VAmax−VAmin,VBmax−VBminの比を計算する下記数14の演算の実行により振幅補正値Aamを計算する。なお、この振幅補正値Aamに関しては従来の方法と同じである。

Figure 2012189350
Then, the processing unit 13, at step S32, the amplitude width V Amax -V Amin of the A-phase output signal V A by subtracting the minimum value V Amin from the maximum value V Amax of the A-phase output signal V A calculated, the amplitude width V Bmax -V Bmin of B-phase output signal V B calculated by subtracting the minimum value V Bmin from the maximum value V Bmax of B-phase output signal V B, these amplitudes width V Amax -V The amplitude correction value Aam is calculated by executing the following equation (14) for calculating the ratio of Amin , V Bmax -V Bmin . The amplitude correction value Aam is the same as the conventional method.
Figure 2012189350

次に、演算処理装置13は、前記数12〜14の演算処理により計算したオフセット値VAoff,VBoff及び振幅補正値Aamをメモリ17に保存したり、入出力回路16を介して他の装置、例えば後述する本発明の一実施形態に係るエンコーダ装置に出力する。エンコーダ装置は、これらのオフセット値VAoff,VBoff及び振幅補正値Aamを入力して保存する。前記ステップS34の処理後、演算処理装置13は、ステップS36にてこの補正値取得プログラムの実行を終了する。 Next, the arithmetic processing unit 13 stores the offset values V Aoff , V Boff and the amplitude correction value Aam calculated by the arithmetic processing of the formulas 12 to 14 in the memory 17 or other devices via the input / output circuit 16. For example, it outputs to the encoder apparatus which concerns on one Embodiment of this invention mentioned later. The encoder apparatus inputs and stores these offset values V Aoff and V Boff and the amplitude correction value Aam. After the process of step S34, the arithmetic processing unit 13 ends the execution of the correction value acquisition program in step S36.

次に、このようにして計算されたオフセット値VAoff,VBoff及び振幅補正値Aamを用いたエンコーダ装置の補正処理について説明する。エンコーダ装置は、図7に示すように、検出対象物である回転軸21及び磁石22に対向させた磁気センサ10を備えている。図2の補正装置では、上述のように、検出対象物である回転軸21及び磁石22に磁気センサ10を対向配置した状態においてオフセット値VAoff,VBoff及び振幅補正値Aamを計算するので、図7に示す磁気センサ10、回転軸21及び磁石22も図2にて示したものと同じである。また、このエンコーダ装置は、サンプリング回路31、A/D変換器32a,32b、演算処理装置33、入出力回路34及びメモリ35を備えている。これらのサンプリング回路31、A/D変換器32a,32b、演算処理装置33、入出力回路34及びメモリ35は、図2に示したサンプリング回路11、A/D変換器12a,12b、演算処理装置13、入出力回路16及びメモリ17と同様に構成されている。なお、これらのサンプリング回路31、A/D変換器32a,32b、演算処理装置33、入出力回路34及びメモリ35は、図2のサンプリング回路11、A/D変換器12a,12b、演算処理装置13、入出力回路16及びメモリ17とは別途設けられていてもよいし、共通であってもよい。特に、サンプリング回路31及びA/D変換器32a,32bは、図2のサンプリング回路11及びA/D変換器12a,12bと共通であってもよい。ただし、演算処理装置33は、回転角度計算プログラムを記憶しているとともに、回転角度計算プログラムを実行する。 Next, the correction process of the encoder device using the offset values V Aoff and V Boff and the amplitude correction value Aam calculated in this way will be described. As shown in FIG. 7, the encoder device includes a magnetic sensor 10 opposed to a rotation shaft 21 and a magnet 22 that are detection objects. In the correction device of FIG. 2, as described above, the offset values V Aoff and V Boff and the amplitude correction value Aam are calculated in a state where the magnetic sensor 10 is disposed opposite to the rotation shaft 21 and the magnet 22 which are detection objects. The magnetic sensor 10, the rotating shaft 21, and the magnet 22 shown in FIG. 7 are the same as those shown in FIG. The encoder device also includes a sampling circuit 31, A / D converters 32 a and 32 b, an arithmetic processing device 33, an input / output circuit 34, and a memory 35. These sampling circuit 31, A / D converters 32a and 32b, arithmetic processing unit 33, input / output circuit 34 and memory 35 are the same as the sampling circuit 11, A / D converters 12a and 12b, and arithmetic processing unit shown in FIG. 13, the same configuration as the input / output circuit 16 and the memory 17. The sampling circuit 31, the A / D converters 32a and 32b, the arithmetic processing unit 33, the input / output circuit 34, and the memory 35 are the same as the sampling circuit 11, the A / D converters 12a and 12b, and the arithmetic processing unit shown in FIG. 13, the input / output circuit 16 and the memory 17 may be provided separately or in common. In particular, the sampling circuit 31 and the A / D converters 32a and 32b may be common to the sampling circuit 11 and the A / D converters 12a and 12b in FIG. However, the arithmetic processing unit 33 stores a rotation angle calculation program and executes the rotation angle calculation program.

次に、前記のように構成したエンコーダ装置の動作を説明する。このエンコーダ装置においても、演算処理装置33は、磁気センサ10からのA相出力信号VA及びB相出力信号VBを所定の周期でサンプリングするように、サンプリング回路31に指示する。サンプリング回路31は、磁気センサ10からのA相出力信号VA及びB相出力信号VBを前記所定の周期でサンプリングして、サンプリング値VA,VBをA/D変換器32a,32bにそれぞれ出力する。A/D変換器32a,32bは、前記サンプリング値VA,VBをそれぞれA/D変換して、ディジタル変換されたサンプリング値VA,VBを演算処理装置33に出力する。これにより、回転軸21及び磁石22の回転角度ωに応じて変化する磁気センサ10からのA相出力信号VA及びB相出力信号VBのサンプリング値VA,VBが演算処理装置33に所定の周期で供給されるようになる。 Next, the operation of the encoder apparatus configured as described above will be described. Also in this encoder apparatus, the arithmetic processing unit 33 instructs the sampling circuit 31 to sample the A-phase output signal V A and the B-phase output signal V B from the magnetic sensor 10 at a predetermined cycle. The sampling circuit 31 samples the A-phase output signal V A and the B-phase output signal V B from the magnetic sensor 10 at the predetermined period, and outputs the sampling values VA and VB to the A / D converters 32a and 32b, respectively. To do. The A / D converters 32 a and 32 b A / D convert the sampling values VA and VB, respectively, and output the digitally converted sampling values VA and VB to the arithmetic processing unit 33. As a result, the sampling values VA and VB of the A-phase output signal V A and the B-phase output signal V B from the magnetic sensor 10 that change according to the rotation angle ω of the rotating shaft 21 and the magnet 22 are given to the arithmetic processing unit 33. It will be supplied in a cycle.

演算処理装置33は、サンプリング値VA,VBの入力ごとに、回転角度計算プログラムを実行する。この回転角度計算プログラムの実行は図8のステップS40にて開始され、演算処理装置33は、ステップS42にて、A/D変換器32a,32bでそれぞれA/D変換されたサンプリング値VA,VBをそれぞれ入力する。次に、演算処理装置33は、ステップS44にて前記入力したサンプリング値VAを前記保存したオフセット値VAoffを用いた下記数15の演算処理によりオフセット補正し、ステップS46にて前記入力したサンプリング値VBを前記保存したオフセット値VBoffを用いた下記数16の演算処理によりオフセット補正する。

Figure 2012189350
Figure 2012189350
The arithmetic processing unit 33 executes a rotation angle calculation program for each input of the sampling values VA and VB. Execution of the rotation angle calculation program is started in step S40 of FIG. 8, and the arithmetic processing unit 33 performs sampling values VA and VB which are A / D converted by the A / D converters 32a and 32b, respectively, in step S42. Enter each. Next, the arithmetic processing unit 33 performs an offset correction on the input sampling value VA in step S44 by the arithmetic processing of the following equation 15 using the stored offset value V Aoff, and the input sampling value in step S46. VB is offset-corrected by the arithmetic processing of the following equation 16 using the stored offset value V Boff .
Figure 2012189350
Figure 2012189350

次に、演算処理装置33は、ステップS48にて、前記入力したサンプリング値VBを前記保存した振幅補正値Aamを用いた下記数17の演算処理により振幅補正する。なお、この振幅補正は、従来の方法と同じである。

Figure 2012189350
Next, in step S48, the arithmetic processing unit 33 corrects the amplitude of the input sampling value VB by the arithmetic processing of the following Expression 17 using the stored amplitude correction value Aam. This amplitude correction is the same as the conventional method.
Figure 2012189350

そして、演算処理装置33は、ステップS50にて、前記補正処理したサンプリング値VA,VBを用いて下記数18の演算処理により回転軸21及び磁石22の回転角度ωを計算する。

Figure 2012189350
In step S50, the arithmetic processing unit 33 calculates the rotation angle ω of the rotating shaft 21 and the magnet 22 by the arithmetic processing of the following equation 18 using the corrected sampling values VA and VB.
Figure 2012189350

前記回転角度ωの計算後、演算処理装置13は、ステップS52にて、前記計算した回転角度ωをメモリ35に保存したり、入出力回路34を介して他の装置、例えば回転軸21及び磁石22の回転角度ωを利用する利用装置に出力したりする。そして、演算処理装置33は、ステップS54にてこの回転角度計算プログラムの実行を一端終了する。その後、A/D変換器32a,32bからのサンプリング値VA,VBがふたたび演算処理装置33に入力されると、演算処理装置33は前述したステップS40〜S54からなる回転角度計算プログラムをふたたび実行して、サンプリング値VA,VBを補正処理し、補正処理後のサンプリング値VA,VBを用いて回転角度ωを計算する。このような、回転角度計算プログラムの実行により、演算処理装置33は回転軸21及び磁石22の回転角度ωを計算しては出力する。   After the calculation of the rotation angle ω, the arithmetic processing unit 13 stores the calculated rotation angle ω in the memory 35 in step S52 or other devices such as the rotation shaft 21 and the magnet via the input / output circuit 34. Or output to a utilization device that uses the rotation angle ω of 22. Then, the arithmetic processing unit 33 ends the execution of the rotation angle calculation program in step S54. Thereafter, when the sampling values VA and VB from the A / D converters 32a and 32b are input again to the arithmetic processing unit 33, the arithmetic processing unit 33 executes the rotation angle calculation program consisting of the aforementioned steps S40 to S54 again. Thus, the sampling values VA and VB are corrected, and the rotation angle ω is calculated using the corrected sampling values VA and VB. By executing the rotation angle calculation program, the arithmetic processing unit 33 calculates and outputs the rotation angle ω of the rotating shaft 21 and the magnet 22.

したがって、本実施形態によれば、前記数12〜14の演算処理により、A相出力信号VA及びB相出力信号VBの各最大値VAmax,VBmax及び各最小値VAmin,VBminに対してプラス90度の位置とマイナス90度の位置に対応する4つのサンプリング値VA1〜VA4,VB1〜VB4の各平均値をそれぞれオフセット値VAoff,VBoffとして計算するとともに、A相出力信号VAの振幅巾VAmax−VAminとB相出力信号VBの振幅巾VBmax−VBminとの比を振幅補正値Aamとして計算する。前記数15〜17の演算処理により、これらのオフセット値VAoff,VBoff及び振幅補正値Aamを用いて、サンプリング値VA,VBをオフセット及び振幅補正する。そして、前記数18の演算処理により、補正したサンプリング値VA,VBを用いて、回転角度ωが計算される。 Therefore, according to the present embodiment, the maximum values V Amax and V Bmax and the minimum values V Amin and V Bmin of the A-phase output signal V A and the B-phase output signal V B are obtained by the arithmetic processing of Equations 12-14. The average values of the four sampling values VA1 to VA4 and VB1 to VB4 corresponding to the plus 90 degree position and the minus 90 degree position are calculated as offset values V Aoff and V Boff respectively, and the A phase output signal The ratio between the amplitude width V Amax −V Amin of V A and the amplitude width V Bmax −V Bmin of the B-phase output signal V B is calculated as the amplitude correction value Aam. The sampling values VA and VB are offset and amplitude corrected using the offset values V Aoff and V Boff and the amplitude correction value Aam by the arithmetic processing of the formulas 15-17 . Then, the rotational angle ω is calculated by using the corrected sampling values VA and VB by the arithmetic processing of Equation 18.

b.本発明の実験による検証
次に、上記実施形態による補正方法の効果について実験結果を用いて検証する。
(1)第1実施例
第1実施例に係る磁気センサ10は、ダブルフルブリッジ型磁気センサであって、2組のフルブリッジ構成の磁気抵抗効果素子(この場合、AMR磁気抵抗効果素子)を互いに45度傾けて一つの基板上に形成している。具体的には、図9Aに示すように、延設方向を互いに45度ずつずらして磁気抵抗素子1〜8を円周方向に沿って配置して、回転中心に対して同一延設方向の磁気抵抗効果素子を点対称位置に配置している。そして、図9Bの等価回路に示すように、2組のフルブリッジ回路を形成している。図9B中、端子Vcc,Gnd間に規定電圧が印加され、端子VoutA+,VoutA−間からA相出力信号VAが出力され、かつ端子VoutB+,VoutB−間からB相出力信号VBが出力される。
b. Verification by Experiment of the Present Invention Next, the effect of the correction method according to the above embodiment will be verified by using an experimental result.
(1) First Example A magnetic sensor 10 according to a first example is a double full-bridge type magnetic sensor, and includes two sets of full-bridge magnetoresistive elements (in this case, AMR magnetoresistive elements). They are formed on a single substrate inclined at 45 degrees from each other. Specifically, as shown in FIG. 9A, the extending directions are shifted from each other by 45 degrees, and the magnetoresistive elements 1 to 8 are arranged along the circumferential direction so that the magnetism in the same extending direction with respect to the center of rotation. Resistive effect elements are arranged at point-symmetric positions. Then, as shown in the equivalent circuit of FIG. 9B, two sets of full bridge circuits are formed. In FIG. 9B, the specified voltage is applied between the terminals Vcc and Gnd, the phase A output signal V A is output from the terminals VoutA + and VoutA−, and the phase B output signal V B is output from the terminals VoutB + and VoutB−. The

この磁気センサ10に対向するように回転軸21の一端に固定された周方向に分割された円板状の直径9mmの2極磁石22が配置されている。回転軸21の軸線(回転中心)と磁石22の中心線(回転中心)は一致している。このように構成した検出対象物である回転軸21及び磁石22と、磁気センサ10とを用いて、次の5つ条件(a)〜(e)下で磁石22を1回転させ、磁気センサ10から出力される1周期目のA相出力信号VA及びB相出力信号VBを360度当たり(磁石22の1回転当たり)2000ポイントのサンプリング数でサンプリングした。そして、サンプリングしたA相出力信号VA及びB相出力信号VBのサンプリング値を従来の補正方法を用いて補正し、補正したA相出力信号VA及びB相出力信号VBのサンプリング値を用いて内挿精度φ(電気角−機械角)を計算した。 A disk-shaped dipole magnet 22 having a diameter of 9 mm and arranged in the circumferential direction is fixed to one end of the rotating shaft 21 so as to face the magnetic sensor 10. The axis (rotation center) of the rotation shaft 21 and the center line (rotation center) of the magnet 22 are coincident. Using the rotating shaft 21 and the magnet 22 that are detection objects configured as described above and the magnetic sensor 10, the magnet 22 is rotated once under the following five conditions (a) to (e), and the magnetic sensor 10 is rotated. The A-phase output signal V A and the B-phase output signal V B in the first cycle output from the above are sampled at a sampling number of 2000 points per 360 degrees (per rotation of the magnet 22). Then, the sampled values of the sampled A-phase output signal V A and B-phase output signal V B are corrected using a conventional correction method, and the corrected sampling values of the A-phase output signal V A and the B-phase output signal V B are obtained. The interpolation accuracy φ (electrical angle−mechanical angle) was calculated.

すなわち、A相出力信号VA及びB相出力信号VBを、上記数5〜8を用いてオフセット補正を行うとともに、上記数9,10を用いて振幅補正を行い、補正したA相出力信号VA及びB相出力信号VBを用いた上記数4の演算の実行により内挿精度φを下記条件(a)〜(d)ごとに計算した。
(a) 磁気センサ10の中心線を回転軸21及び磁石22の軸線に一致させる。
(b) 磁気センサ10の中心線を回転軸21及び磁石22の軸線に対してX方向に+0.5mmずらす。
(c) 磁気センサ10の中心線を回転軸21及び磁石22の軸線に対してX方向に−0.5mmずらす。
(d) 磁気センサ10の中心線を回転軸21及び磁石22の軸線に対してY方向に+0.5mmずらす。
(e) 磁気センサ10の中心線を回転軸21及び磁石22の軸線に対してY方向に−0.5mmずらす。
That is, the A-phase output signal V A and the B-phase output signal V B are offset-corrected using the above formulas 5 to 8, and the amplitude is corrected using the formulas 9 and 10, and the corrected A-phase output signal is corrected. The interpolation accuracy φ was calculated for each of the following conditions (a) to (d) by executing the calculation of Equation 4 using the V A and B phase output signals V B.
(a) The center line of the magnetic sensor 10 is made to coincide with the axis of the rotary shaft 21 and the magnet 22.
(b) The center line of the magnetic sensor 10 is shifted +0.5 mm in the X direction with respect to the axis of the rotary shaft 21 and the magnet 22.
(c) The center line of the magnetic sensor 10 is shifted by −0.5 mm in the X direction with respect to the axis of the rotary shaft 21 and the magnet 22.
(d) The center line of the magnetic sensor 10 is shifted +0.5 mm in the Y direction with respect to the axis of the rotary shaft 21 and the magnet 22.
(e) The center line of the magnetic sensor 10 is shifted by −0.5 mm in the Y direction with respect to the axis of the rotary shaft 21 and the magnet 22.

上記条件(a),(b),(c),(d),(e)ごとの実験結果による内挿精度φを、図10の(a),(b),(c),(d),(e)のグラフに誤差としてそれぞれ示す。これによれば、前記条件(a)の「 磁気センサ10の中心線を回転軸21及び磁石22の軸線に一致させた場合」には、内挿精度φ(誤差)はほとんど現れないことが理解できる。これに対して、前記条件(b),(c),(d),(e)のように、「磁気センサ10の中心線を回転軸21及び磁石22の軸線に対してX方向及びY方向にそれぞれずらした場合」には、内挿精度φ(誤差)が大きくなる、すなわち悪化することが理解できる。   The interpolation accuracy φ based on the experimental results for each of the above conditions (a), (b), (c), (d), and (e) is expressed as (a), (b), (c), and (d) in FIG. , (E) are shown as errors in the graph. According to this, it is understood that the interpolation accuracy φ (error) hardly appears when “the center line of the magnetic sensor 10 is made coincident with the axis of the rotating shaft 21 and the magnet 22” in the condition (a). it can. On the other hand, as in the conditions (b), (c), (d), (e), “the center line of the magnetic sensor 10 is set in the X direction and the Y direction with respect to the axis of the rotary shaft 21 and the magnet 22. It can be understood that the interpolation accuracy φ (error) increases, that is, deteriorates.

次に、前記図9A〜9Cに示す磁気センサ10及び磁石22を用いて、前記場合と同様に、前記5つ条件(a)〜(e)下で磁石22を1回転させ、磁気センサ10から出力される1周期目のA相出力信号VA及びB相出力信号VBを360度当たり2000ポイントのサンプリング数でサンプリングした。そして、サンプリングしたA相出力信号VA及びB相出力信号VBのサンプリング値を本発明の補正方法を用いて補正し、補正したA相出力信号VA及びB相出力信号VBのサンプリング値を用いて内挿精度φ(電気角−機械角)を計算した。すなわち、A相出力信号VA及びB相出力信号VBを、上記数12,13,15,16を用いてオフセット補正を行うとともに、上記数14,17を用いて振幅補正を行い、補正したA相出力信号VA及びB相出力信号VBを用いた上記数4の演算の実行により内挿精度φを前記条件(a)〜(d)ごとに計算した。 Next, using the magnetic sensor 10 and the magnet 22 shown in FIGS. 9A to 9C, the magnet 22 is rotated once under the five conditions (a) to (e) in the same manner as in the above case. The output A phase output signal V A and B phase output signal V B in the first cycle were sampled at a sampling number of 2000 points per 360 degrees. Then, the sampled values of the sampled A-phase output signal V A and B-phase output signal V B are corrected using the correction method of the present invention, and the corrected sampling values of the A-phase output signal V A and B-phase output signal V B are corrected. Was used to calculate the interpolation accuracy φ (electrical angle−mechanical angle). That is, the A-phase output signal V A and the B-phase output signal V B are corrected by performing offset correction using the above equations 12, 13, 15, and 16, and performing amplitude correction using the above equations 14 and 17, respectively. The interpolation accuracy φ was calculated for each of the conditions (a) to (d) by executing the calculation of Equation 4 using the A-phase output signal V A and the B-phase output signal V B.

図11の(a),(b),(c),(d),(e)は、上記条件(a),(b),(c),(d),(e)ごとに、本発明の補正方法を用いた場合の内挿精度φをグラフに誤差としてそれぞれ示す。これによれば、上記条件(a)
,(b),(c),(d),(e)のように、磁気センサ10の中心線を回転軸21及び磁石22の軸線に対してX方向及びY方向にそれぞれずらした場合、すなわち回転軸21及び磁石22に対してX方向及びY方向に設置誤差を磁気センサ10を設置しても、本発明によるオフセット補正を行えば、内挿精度φ(誤差)が小さく抑えられることが理解できる。
(A), (b), (c), (d), and (e) in FIG. 11 correspond to the above-mentioned conditions (a), (b), (c), (d), and (e), respectively. The interpolation accuracy φ when using this correction method is shown as an error in the graph. According to this, the above condition (a)
, (B), (c), (d), and (e), when the center line of the magnetic sensor 10 is shifted in the X and Y directions with respect to the axis of the rotary shaft 21 and the magnet 22, respectively, Even if the magnetic sensor 10 is installed with an installation error in the X direction and the Y direction with respect to the rotating shaft 21 and the magnet 22, it is understood that if the offset correction according to the present invention is performed, the interpolation accuracy φ (error) can be kept small. it can.

(2)第2実施例
次に、第2実施例について説明する。この場合も、上記第1実施例と同様な磁気センサ10及び磁石22を用い、上記第1実施例の場合と同様な従来及び本発明の補正方法を用いて補正したA相出力信号VA及びB相出力信号VBのサンプリング値を用いて内挿精度φ(電気角−機械角)を計算した。ただし、この場合には、回転軸21及び磁石22に対する磁気センサ10の複合的な設置誤差の影響を確認するために、図12(a)の概略斜視及び図12(b)の概略正面図に示すように、磁石22が回転軸21の軸線に対して0.5mm偏芯して取り付けられている。そして、磁石22に対して磁気センサ10はX方向に+0.5mmずらして配置されている。
(2) Second Example Next, a second example will be described. Also in this case, the A phase output signal V A corrected using the same conventional magnetic sensor 10 and the correction method of the present invention as in the first embodiment, using the same magnetic sensor 10 and magnet 22 as in the first embodiment. The interpolation accuracy φ (electrical angle−mechanical angle) was calculated using the sampling value of the B phase output signal V B. However, in this case, in order to confirm the influence of the composite installation error of the magnetic sensor 10 on the rotating shaft 21 and the magnet 22, the schematic perspective view of FIG. 12A and the schematic front view of FIG. As shown, the magnet 22 is attached with an eccentricity of 0.5 mm with respect to the axis of the rotating shaft 21. The magnetic sensor 10 is arranged with a shift of +0.5 mm in the X direction with respect to the magnet 22.

図13は従来の補正方法を用いた場合の内挿精度φをグラフに誤差として示し、図14は本発明の補正方法を用いた場合の内挿精度φをグラフに誤差として示している。これによれば、前記複合的な磁気センサ10の設置誤差によっても、従来の補正方法を用いた場合には、大きな誤差が発生することが理解できる。一方、本発明の補正方法を用いた場合には、誤差が抑制されることが理解できる。   13 shows the interpolation accuracy φ when the conventional correction method is used as an error in the graph, and FIG. 14 shows the interpolation accuracy φ when the correction method of the present invention is used as an error in the graph. According to this, it can be understood that a large error occurs when the conventional correction method is used even if the composite magnetic sensor 10 is installed. On the other hand, it can be understood that the error is suppressed when the correction method of the present invention is used.

(3)第3実施例
次に、第3実施例について説明する。この場合、上記第1及び第2実施例とは異なり、図15に示すように、磁石22として円周方向に10分割されて10極着磁されたリング磁石が用いられる。磁石22も、図15の紙面垂直方向の中心軸線周りに、図示しない回転手段によって回転される。なお、この場合の磁石22の直径は7mmである。また、この第3実施例では、磁気センサ10は、上記第1及び第2実施例と同様に構成されているが、磁気抵抗効果素子の延設面が磁石22の径方向と平行なるように磁石22の側方の法線上に配置されている。
(3) Third Example Next, a third example will be described. In this case, unlike the first and second embodiments, as shown in FIG. 15, a ring magnet that is divided into 10 in the circumferential direction and magnetized with 10 poles is used as the magnet 22. The magnet 22 is also rotated by a rotating means (not shown) around the central axis in the direction perpendicular to the paper surface of FIG. In this case, the diameter of the magnet 22 is 7 mm. In this third embodiment, the magnetic sensor 10 is configured in the same manner as in the first and second embodiments, but the extending surface of the magnetoresistive effect element is parallel to the radial direction of the magnet 22. It is arranged on the normal line on the side of the magnet 22.

この場合も、磁石22を前記中心軸周りに1回転させて、この1回転中に、磁気センサ10からのA相出力信号VA及びB相出力信号VBから2000個のサンプリング値をそれぞれ取得する。なお、図16は、これらの磁気センサ10からのA相出力信号VA及びB相出力信号VBと、サンプリング位置との関係を示す波形図である。この場合、磁石22は円周方向に10極着磁されているので、磁石22の1回転当たり10波の正弦波状のA相出力信号VA及びB相出力信号VBが出力される。 Also in this case, the magnet 22 is rotated once around the central axis, and 2000 sampling values are obtained from the A-phase output signal V A and the B-phase output signal V B from the magnetic sensor 10 during this one rotation. To do. FIG. 16 is a waveform diagram showing the relationship between the A-phase output signal V A and the B-phase output signal V B from these magnetic sensors 10 and the sampling position. In this case, since the magnet 22 is magnetized 10 poles in the circumferential direction, a sine-wave A-phase output signal V A and a B-phase output signal V B of 10 waves per rotation of the magnet 22 are output.

そして、この場合には、10波の正弦波状のA相出力信号VA及びB相出力信号VBから1周期目、2周期目及び3周期目のA相出力信号VA及びB相出力信号VBのサンプリング値をそれぞれ抽出し、1周期目、2周期目及び3周期目ごとのサンプリング値に対してそれぞれ従来の補正方法を適用して、内挿精度φをそれぞれ計算した。図17の(a),(b),(c)は、A相出力信号VA及びB相出力信号VBの1周期目、2周期目及び3周期目ごとのサンプリング値に対してそれぞれ従来の補正方法を用いた場合の内挿精度φをグラフに誤差として示している。これによれば、この種の磁気センサ10において、従来の補正方法を用いた場合には、1周期目、2周期目及び3周期目のA相出力信号VA及びB相出力信号VBに大きな誤差(内挿精度φ)が含まれることが理解できる。このことは、第3実施例のように複数の磁極を有する磁石22の回転(又は移動)方向に磁気センサ10を対向させて、磁気センサ10からのA相出力信号VA及びB相出力信号VBに基づいて磁石22(検出対象物)の回転角度を検出する場合に、回転角度の検出に大きな誤差が含まれることを意味する。 Then, in this case, the first period from the sinusoidal 10 waves A phase output signal V A and the B phase output signal V B, 2-th cycle and the third cycle of the A-phase output signal V A and the B phase output signal The sampling values of V B were extracted, and the interpolation accuracy φ was calculated by applying the conventional correction method to the sampling values of the first period, the second period, and the third period, respectively. (A), (b), and (c) of FIG. 17 are respectively related to the sampling values for the first period, the second period, and the third period of the A-phase output signal V A and the B-phase output signal V B. The interpolation accuracy φ when using this correction method is shown as an error in the graph. According to this, in the magnetic sensor 10 of this type, when the conventional correction method is used, the A-phase output signal V A and the B-phase output signal V B in the first cycle, the second cycle, and the third cycle are used. It can be understood that a large error (interpolation accuracy φ) is included. This is because the magnetic sensor 10 is made to face in the rotation (or movement) direction of the magnet 22 having a plurality of magnetic poles as in the third embodiment, and the A-phase output signal V A and the B-phase output signal from the magnetic sensor 10 are used. When the rotation angle of the magnet 22 (detection target) is detected based on V B , this means that a large error is included in the detection of the rotation angle.

一方、図18の(a),(b),(c)は、A相出力信号VA及びB相出力信号VBの1周期目、2周期目及び3周期目ごとのサンプリング値に対してそれぞれ本発明の補正方法を用いた場合の内挿精度φをグラフに誤差として示している。なお、この場合には、10周期分のサンプリング数が「2000」であるので、A相出力信号VA及びB相出力信号VBの1周期分のサンプリング数は「200」となる。したがって、90度に対応するサンプリング数は「50」となる。そして、1周期目のA相出力信号VA及びB相出力信号VBの補正用ディジタルデータについて、図16に示す例で説明しておく。1周期目のA相出力信号VAの最大値VAmax及び最小値VAminの位置は、「83」及び「183」である。したがって、前記位置「83」及び「183」から90度離れた4つの位置は、それぞれ「33」,「133」,「133」,「233」となる。そして、これらの位置のサンプリング値が、1周期目のA相出力信号VAのための4つの補正用ディジタルデータとなる。また、1周期目のB相出力信号VBの最大値VBmax及び最小値VBminの位置は、「32」及び「134」である。したがって、前記位置「32」及び「134」から90度離れた4つの位置は、それぞれ「1982」,「82」,「84」,「184」となる。そして、これらの位置のサンプリング値が、1周期目のB相出力信号VBのための4つの補正用ディジタルデータとなる。 On the other hand, (a), (b), and (c) of FIG. 18 show the sampling values for the first period, the second period, and the third period of the A phase output signal V A and the B phase output signal V B. The interpolation accuracy φ when using the correction method of the present invention is shown as an error in the graph. In this case, since the sampling number for 10 cycles is “2000”, the sampling number for one cycle of the A-phase output signal V A and the B-phase output signal V B is “200”. Therefore, the number of samplings corresponding to 90 degrees is “50”. The digital data for correction of the A phase output signal V A and the B phase output signal V B in the first cycle will be described with reference to the example shown in FIG. The positions of the maximum value V Amax and the minimum value V Amin of the A-phase output signal V A in the first cycle are “83” and “183”. Accordingly, the four positions that are 90 degrees apart from the positions “83” and “183” are “33”, “133”, “133”, and “233”, respectively. The sampling values at these positions become four correction digital data for the A-phase output signal V A in the first period. The positions of the maximum value V Bmax and the minimum value V Bmin of the B-phase output signal V B in the first cycle are “32” and “134”. Therefore, the four positions 90 degrees apart from the positions “32” and “134” are “1982”, “82”, “84”, and “184”, respectively. Then, the sampling values at these positions become four correction digital data for the B-phase output signal V B in the first cycle.

このような本発明による補正方法を用いた内挿精度φ(誤差)を表す図18の(a)(b)(c)によるグラフによれば、この種の磁気センサ10においても、本発明の補正方法を用いた場合に、1周期目、2周期目及び3周期目のA相出力信号VA及びB相出力信号VBに含まれる誤差を抑制できることが理解できる。その結果、この第3実施例のように複数の磁極を有する磁石22の回転(又は移動)方向に磁気センサ10を対向させて、磁気センサ10からのA相出力信号VA及びB相出力信号VBに基づいて磁石22(検出対象物)の回転角度を検出する場合にも、本発明による補正方法を用いることにより、回転角度の誤差を抑制できることが理解できる。 According to the graphs shown in FIGS. 18A, 18B and 18C showing the interpolation accuracy φ (error) using the correction method according to the present invention, this kind of magnetic sensor 10 also has the present invention. When the correction method is used, it can be understood that errors included in the A-phase output signal V A and the B-phase output signal V B in the first period, the second period, and the third period can be suppressed. As a result, the A-phase output signal V A and the B-phase output signal from the magnetic sensor 10 are made to face the magnetic sensor 10 in the rotation (or movement) direction of the magnet 22 having a plurality of magnetic poles as in the third embodiment. Even when the rotation angle of the magnet 22 (detection target) is detected based on V B , it can be understood that the rotation angle error can be suppressed by using the correction method according to the present invention.

c.本発明の理論的な説明
各種実施例にて以下のことが確認できる。第1乃至第3実施例での従来方法である振幅中心値で補正した場合の内挿精度φ(図10(b)〜図10(e)、図13及び図17(a)〜図17(c))及び後述する変形例1,2での従来方法である振幅中心値で補正した場合の内挿精度φ(図25A(a)及び図25B(a))において、機械角における誤差の変化が一様な勾配を示す。図10(b)、図13、図17(a)〜図17(c)、図25A(a)及び図25B(a)は−cos波形に近似し、図10(c)及び図10(e)はcos波形に近似し、図10(d)はsin波形に近似し、それぞれ1周期分の勾配となる。内挿精度φの機械角における誤差の変化を、勾配と定義して、上記第1乃至第3実施例に関し、上記実施形態による補正方法について理論的に説明する。第1乃至第3実施例に関しては、極座標(r,θ)のカージオイド曲線を想定することにより理解できる。
c. Theoretical description of the present invention The following can be confirmed in various examples. Interpolation accuracy φ (FIG. 10 (b) to FIG. 10 (e), FIG. 13 and FIG. 17 (a) to FIG. 17 (b) when correction is performed with the amplitude center value which is the conventional method in the first to third embodiments. c)) and a change in the error in the mechanical angle in the interpolation accuracy φ (FIGS. 25A (a) and 25B (a)) when corrected with the amplitude center value which is the conventional method in the first and second modified examples 1 and 2 described later. Indicates a uniform gradient. 10 (b), FIG. 13, FIG. 17 (a) to FIG. 17 (c), FIG. 25A (a) and FIG. 25B (a) approximate to the −cos waveform, and FIG. 10 (c) and FIG. ) Approximates a cos waveform, and FIG. 10D approximates a sin waveform, each having a gradient of one period. The change in error in the mechanical angle of the interpolation accuracy φ is defined as a gradient, and the correction method according to the above embodiment will be theoretically described with respect to the above first to third examples. The first to third embodiments can be understood by assuming a cardioid curve of polar coordinates (r, θ).

まず、上記第1実施例の場合においては、磁石22に対する磁気センサ10の設置誤差がない場合すなわち上述した(a)の状態には、図19に示す黒丸上の磁界変化は、半径r=1のx=cosθ,y=sinθとなる。一方、磁石22に対する磁気センサ10の設置誤差が、上述した(b)〜(e)のいずれかの方向にずれた状態を図20の黒丸で示した。この黒丸での磁界変化は、図20に示すようになる。このように磁石22に対する磁気センサ10の設置誤差が、上述した(b)〜(e)のうちの一つの方向にずれた状態を、式r=1+a’・cosθとして、直交座標(x、y)で考えると、x=r・cosθ,y=r・sinθとなり、x,yが検出対象物の運動によっておこる磁界変化を表す。位置ずれがない場合の磁界変化は、a’=0すなわちr=1である。位置ずれが起こると、a’が、位置ずれの大きさに比例して大きくなる。   First, in the case of the first embodiment, when there is no installation error of the magnetic sensor 10 with respect to the magnet 22, that is, in the state (a) described above, the magnetic field change on the black circle shown in FIG. X = cos θ and y = sin θ. On the other hand, a state in which the installation error of the magnetic sensor 10 with respect to the magnet 22 is shifted in any of the above-described directions (b) to (e) is indicated by a black circle in FIG. The magnetic field change at the black circle is as shown in FIG. In this way, the state in which the installation error of the magnetic sensor 10 with respect to the magnet 22 is shifted in one of the above-described (b) to (e) is represented by the equation r = 1 + a ′ · cos θ, and orthogonal coordinates (x, y ), X = r · cos θ, y = r · sin θ, and x and y represent magnetic field changes caused by the motion of the detection target. The change in the magnetic field when there is no displacement is a ′ = 0, that is, r = 1. When a positional deviation occurs, a 'increases in proportion to the magnitude of the positional deviation.

このx=r・cosθ及びy=r・sinθに、r=1+a’・cosθを代入すると、x、yは下記数19,20のように表される。

Figure 2012189350
Figure 2012189350
When r = 1 + a ′ · cos θ is substituted into x = r · cos θ and y = r · sin θ, x and y are expressed as in the following equations 19 and 20.
Figure 2012189350
Figure 2012189350

上記第1実施例で示した設置誤差(b)〜(e)は、実際にはこの4方向だけでなく、全角(α=0〜360°)範囲であるため、その位置での検出対象物の運動によっておこる磁界変化として考えれば、A相出力信号VA及びB相出力信号VBにそれぞれ対応する磁界HA,HBを下記数21,22のように表すことができる。

Figure 2012189350
Figure 2012189350
これにより、設置誤差による磁界HA,HB の変化には、2次高調波が一定の関係で重畳していることが分かる。 The installation errors (b) to (e) shown in the first embodiment are actually not only in these four directions but also in the full-angle (α = 0 to 360 °) range, and therefore the detection target object at that position. The magnetic fields H A and H B respectively corresponding to the A-phase output signal V A and the B-phase output signal V B can be expressed as the following formulas 21 and 22.
Figure 2012189350
Figure 2012189350
Thus, it can be seen that the second harmonic is superimposed on the change of the magnetic fields H A and H B due to the installation error in a fixed relationship.

次に、上記第2実施例について説明する。この場合、2種類の位置ずれがあり、異なった2次高調波が重畳すると考えることができる。したがって、磁界HA,HBは下記数23,24で表される。

Figure 2012189350
Figure 2012189350
前記数23,24を整理すると、下記数25,26のように変形される。
Figure 2012189350
Figure 2012189350
Next, the second embodiment will be described. In this case, it can be considered that there are two kinds of positional shifts and different second harmonics are superimposed. Therefore, the magnetic fields H A and H B are expressed by the following equations 23 and 24.
Figure 2012189350
Figure 2012189350
When the equations 23 and 24 are arranged, the following equations 25 and 26 are transformed.
Figure 2012189350
Figure 2012189350

ここで、下記数27〜30で定義されるc,dを用いて、前記数25,26を変形すると、下記数31,32のようになる。

Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
これにより、この場合も、設置誤差による磁界HA,HB の変化には、2次高調波が一定の関係で重畳していることが分かる。 Here, when the above formulas 25 and 26 are modified using c and d defined by the following formulas 27 to 30, the following formulas 31 and 32 are obtained.
Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
Thus, in this case as well, it can be seen that the second harmonic is superimposed on the change of the magnetic fields H A and H B due to the installation error in a fixed relationship.

次に、上記第3実施例について説明する。この第3実施例では、磁気センサ10を磁石22の法線上に設置されており、磁気センサ10の各磁気抵抗効果素子は、点対称形をなし、かつ異なる方向(例えば、法線方向と接線方向)の磁界を検出する。この異なった方向の磁界変化、リング側面においては、歪曲した基線上を磁界が回転する。よって、磁界の変化は、図21に示すように、前記第1実施例の図20と同様なカージオイド曲線を描くこととなる。   Next, the third embodiment will be described. In the third embodiment, the magnetic sensor 10 is installed on the normal line of the magnet 22, and each magnetoresistive element of the magnetic sensor 10 has a point-symmetric shape and has different directions (for example, a normal direction and a tangent line). Direction) magnetic field. The magnetic field rotates on the distorted base line at the magnetic field changes in the different directions and the side surfaces of the ring. Therefore, the change of the magnetic field draws a cardioid curve similar to that of FIG. 20 of the first embodiment, as shown in FIG.

次に、磁気センサ10からの出力信号を考える。磁気センサ10のA,B相からの出力信号をVA、Bとしたとき、その出力信号は下記数33,34で表される。ただし、A,Bは感度であり、ΔA,ΔBはオフセット電圧である。

Figure 2012189350
Figure 2012189350
仮に、磁気センサ10内に、感度違いとオフセット電圧がない状態(すなわち、A=BかつΔA=ΔB=0)で、設置誤差が生じた場合の各出力信号は下記数35,36で表される。
Figure 2012189350
Figure 2012189350
Next, an output signal from the magnetic sensor 10 is considered. A magnetic sensor 10, when the output signal from the B phase V A, and V B, the output signal is expressed by the following Expression 33. However, A and B are sensitivities, and ΔA and ΔB are offset voltages.
Figure 2012189350
Figure 2012189350
Assuming that there is no difference in sensitivity and no offset voltage in the magnetic sensor 10 (ie, A = B and ΔA = ΔB = 0), each output signal when an installation error occurs is expressed by the following equations 35 and 36. The
Figure 2012189350
Figure 2012189350

一方、内挿精度φ(電気角−機械角)は、上述したように下記数37(前記数4と同じ)で定義される。

Figure 2012189350
ここで、下記数38,39のようx,yを定義すると、前記数37は下記数40のように表される。
Figure 2012189350
Figure 2012189350
Figure 2012189350
On the other hand, the interpolation accuracy φ (electrical angle−mechanical angle) is defined by the following equation 37 (same as the equation 4) as described above.
Figure 2012189350
Here, when x and y are defined as the following formulas 38 and 39, the formula 37 is expressed as the following formula 40.
Figure 2012189350
Figure 2012189350
Figure 2012189350

ここで、前記数40の両辺のタンジェントを取ると、前記40は下記数41のように変形される。

Figure 2012189350
前記数38,39は下記数42,43のように変形され、公式を用いた変形により前記数41は下記数44のように変形される。
Figure 2012189350
Figure 2012189350
Figure 2012189350
Here, when the tangents of both sides of the equation 40 are taken, the 40 is transformed as the following equation 41.
Figure 2012189350
The formulas 38 and 39 are transformed into the following formulas 42 and 43, and the formula 41 is transformed into the following formula 44 by transformation using a formula.
Figure 2012189350
Figure 2012189350
Figure 2012189350

前記数44をアークタンジェントに戻すと、前記数44は下記数45のようになる。

Figure 2012189350
この数45に前記数35,36で表されるVA(θ),VB(θ)を代入すると、前記数45は下記数46のように表される。
Figure 2012189350
そして、この数46をさらに変形すると、下記数47,48のようになる。
Figure 2012189350
Figure 2012189350
When the equation 44 is returned to the arctangent, the equation 44 becomes the following equation 45.
Figure 2012189350
By substituting V A (θ) and V B (θ) represented by the equations 35 and 36 into the equation 45, the equation 45 is expressed as the following equation 46.
Figure 2012189350
Further, when this equation 46 is further modified, the following equations 47 and 48 are obtained.
Figure 2012189350
Figure 2012189350

ここで、値Aは値aに比べて極めて大きい(言い換えれば、比の値a/Aは極めて小さい)ことを考慮すれば、前記数48の分母は定数となり、以下のように内挿精度φの勾配は1周期となる。
(a)α=0°のとき、内挿精度φの勾配はsin波形となる。
(b)α=90°のとき、内挿精度φの勾配はcos波形となる。
(c)α=180°のとき、内挿精度φの勾配は−sin波形となる。
(d)α=270°のとき、内挿精度φの勾配は−cos波形となる。
Here, considering that the value A is extremely larger than the value a (in other words, the ratio value a / A is extremely small), the denominator of the equation 48 is a constant, and the interpolation accuracy φ is as follows: The slope of is one cycle.
(A) When α = 0 °, the gradient of the interpolation accuracy φ is a sin waveform.
(B) When α = 90 °, the gradient of the interpolation accuracy φ is a cosine waveform.
(C) When α = 180 °, the gradient of the interpolation accuracy φ is a −sin waveform.
(D) When α = 270 °, the gradient of the interpolation accuracy φ is a −cos waveform.

次に、磁気センサ10自身に潜在する感度の違いではなく(A=B)、オフセット電圧が潜在する場合のA相出力信号VA(θ)及びB相出力信号VB(θ)は下記数49,50のように表される。

Figure 2012189350
Figure 2012189350
Next, not the difference in sensitivity latent in the magnetic sensor 10 itself (A = B), but the A phase output signal V A (θ) and the B phase output signal V B (θ) when the offset voltage is latent are as follows. 49, 50.
Figure 2012189350
Figure 2012189350

内挿精度φ(電気角−機械角)は、前記数45で表され、この数45に前記数49,50のA相出力信号VA(θ)及びB相出力信号VB(θ)を代入すると、下記数51のようになる。

Figure 2012189350
そして、この数51をさらに変形すると、下記数52,53のようになる。
Figure 2012189350
Figure 2012189350
Interpolation accuracy φ (electrical angle−mechanical angle) is expressed by the equation 45, and the A phase output signal V A (θ) and the B phase output signal V B (θ) of the equations 49 and 50 are added to the equation 45. When substituted, the following formula 51 is obtained.
Figure 2012189350
Further, when this number 51 is further modified, the following numbers 52 and 53 are obtained.
Figure 2012189350
Figure 2012189350

ここで、値Aは値ΔA,ΔBに比べて極めて大きい(言い換えれば、比の値ΔA/A,ΔB/Aは極めて小さい)ことを考慮すれば、前記数53の分母は定数となり、以下のように内挿精度φの勾配は1周期となる。
(a)ΔB=0,ΔA>0のとき、内挿精度φの勾配はcos波形となる。
(b)ΔB=0,ΔA<0のとき、内挿精度φの勾配は−cos波形となる。
(c)ΔA=0,ΔB>0のとき、内挿精度φの勾配は−sin波形となる。
(d)ΔA=0,ΔB<0のとき、内挿精度(φ)の勾配はsin波形となる。
このような内挿精度φを表す前記数48と前記数53とにより、設置誤差によって2次高調波が重畳した出力信号の影響と、磁気センサ10自身に潜在するオフセット電圧によって与える影響は同じ現象になることが分かる。
Here, considering that the value A is extremely larger than the values ΔA and ΔB (in other words, the ratio values ΔA / A and ΔB / A are extremely small), the denominator of the equation 53 is a constant, and Thus, the gradient of the interpolation accuracy φ is one cycle.
(A) When ΔB = 0 and ΔA> 0, the gradient of the interpolation accuracy φ is a cos waveform.
(B) When ΔB = 0 and ΔA <0, the gradient of the interpolation accuracy φ is a −cos waveform.
(C) When ΔA = 0 and ΔB> 0, the gradient of the interpolation accuracy φ is a −sin waveform.
(D) When ΔA = 0 and ΔB <0, the gradient of the interpolation accuracy (φ) is a sin waveform.
According to Equation 48 and Equation 53 representing the interpolation accuracy φ, the influence of the output signal in which the second harmonic is superimposed due to the installation error and the influence of the offset voltage latent in the magnetic sensor 10 itself are the same phenomenon. I understand that

次に、磁気センサ10自身に潜在するオフセット電圧と設置誤差による2次高調波が重畳した出力信号の内挿精度φの勾配を抑制するための最適補正値を計算する。この場合、A相出力信号VA(θ)及びB相出力信号VB(θ)として、下記数54,55に示す信号を定義する。

Figure 2012189350
Figure 2012189350
Next, an optimum correction value for suppressing the gradient of the interpolation accuracy φ of the output signal in which the offset voltage latent in the magnetic sensor 10 itself and the second harmonic due to the installation error are superimposed is calculated. In this case, the signals shown in the following equations 54 and 55 are defined as the A-phase output signal V A (θ) and the B-phase output signal V B (θ).
Figure 2012189350
Figure 2012189350

そして、前記数45によって定義される内挿精度φの式に前記数54,55で表されたA相出力信号VA(θ)及びB相出力信号VB(θ)を代入すると、内挿精度φは下記数56で与えられる。

Figure 2012189350
そして、前記数56を変形すると、下記数57のようになる。
Figure 2012189350
Substituting the A-phase output signal V A (θ) and the B-phase output signal V B (θ) represented by the equations 54 and 55 into the expression of the interpolation accuracy φ defined by the equation 45, the interpolation is performed. The accuracy φ is given by the following equation 56.
Figure 2012189350
Then, when the equation 56 is modified, the following equation 57 is obtained.
Figure 2012189350

内挿精度φが向上することは、前記数57でφ=0とすることにより与えられる。θがどの値でも分子式の各項の係数が「0」であればよい。そのときのオフセット電圧値をΔA、ΔBとすると、下記数58が成立する。

Figure 2012189350
そして、前記数58を変形すると、下記数59のようになる。
Figure 2012189350
The improvement of the interpolation accuracy φ is given by setting φ = 0 in the equation 57. Any value of θ may be used as long as the coefficient of each term in the molecular formula is “0”. When the offset voltage values at that time are ΔA 0 and ΔB 0 , the following equation 58 is established.
Figure 2012189350
When the above equation 58 is transformed, the following equation 59 is obtained.
Figure 2012189350

これにより、sinθの項はa・cosα=ΔB0で、cosθの項は−a・sinα=ΔA0となる。したがって、2次高調波が重畳した出力信号のオフセットの最適補正値をX、Yとすれば、値ΔA0,ΔB0は下記数61,62で表される。

Figure 2012189350
Figure 2012189350
これにより、最適補正値X,Yは、下記数62,63によって表されることになる。
Figure 2012189350
Figure 2012189350
Thus, the term of sin θ is a · cos α = ΔB 0 , and the term of cos θ is −a · sin α = ΔA 0 . Accordingly, if the optimum correction values of the offset of the output signal on which the second harmonic is superimposed are X and Y, the values ΔA 0 and ΔB 0 are expressed by the following formulas 61 and 62.
Figure 2012189350
Figure 2012189350
As a result, the optimum correction values X and Y are expressed by the following formulas 62 and 63.
Figure 2012189350
Figure 2012189350

次に、このような2次高調波が重畳する波形で、従来技術のオフセット補正のように振幅中心値がオフセット値の最適補正値になり得るかについて説明する。A相出力信号VA(θ)及びB相出力信号VB(θ)の振幅中心値XVPP,YVPPは、下記数64,65で表される。なお、数64,65中のθmax,θminは、各出力信号の最大値及び最小値の位置(角度)を示す。

Figure 2012189350
Figure 2012189350
Next, a description will be given of whether the amplitude center value can be the optimum correction value of the offset value as in the conventional offset correction in a waveform in which such second harmonics are superimposed. The amplitude center values X VPP and Y VPP of the A phase output signal V A (θ) and the B phase output signal V B (θ) are expressed by the following equations 64 and 65. In the equations 64 and 65, θmax and θmin indicate the positions (angles) of the maximum value and the minimum value of each output signal.
Figure 2012189350
Figure 2012189350

ここで、A相出力信号VA(θ)における角度θmax,θminがそれぞれほぼ90°,270°であること、及びA相出力信号VA(θ)が下記数66で表されることを考慮すれば、VA(90),VA(270)は、下記数67,68のようになる。

Figure 2012189350
Figure 2012189350
Figure 2012189350
Here, it is considered that the angles θmax and θmin in the A-phase output signal V A (θ) are approximately 90 ° and 270 °, respectively, and that the A-phase output signal V A (θ) is expressed by the following equation 66. Then, V A (90) and V A (270) are as shown in the following formulas 67 and 68.
Figure 2012189350
Figure 2012189350
Figure 2012189350

したがって、振幅中心値XVPPは、下記数69のようになる。

Figure 2012189350
Therefore, the amplitude center value X VPP is expressed by the following equation 69.
Figure 2012189350

また、B相出力信号VB(θ)における角度θmax,θminがそれぞれほぼ0°,180°であること、及びB相出力信号VB(θ)が下記数70で表されることを考慮すれば、VB (0),VB(180)は下記数71,72のようになる。

Figure 2012189350
Figure 2012189350
Figure 2012189350
Considering that the angles θmax and θmin in the B-phase output signal V B (θ) are approximately 0 ° and 180 °, respectively, and that the B-phase output signal V B (θ) is expressed by the following equation 70. For example, V B (0) and V B (180) are represented by the following formulas 71 and 72.
Figure 2012189350
Figure 2012189350
Figure 2012189350

したがって、振幅中心値YVPPは、下記数73のようになる。

Figure 2012189350
Therefore, the amplitude center value Y VPP is as shown in Equation 73 below.
Figure 2012189350

すなわち、A相出力信号VA(θ)及びB相出力信号VB(θ)の振幅中心値XVPP,YVPPは、下記数74,75のようになる。

Figure 2012189350
Figure 2012189350
That is, the amplitude center values X VPP and Y VPP of the A-phase output signal V A (θ) and the B-phase output signal V B (θ) are expressed by the following equations 74 and 75.
Figure 2012189350
Figure 2012189350

しかし、これらの振幅中心値XVPP,YVPPは、前記計算した数62,63で示される最適補正値X,Yとは一致しない。むしろ、振幅中心値XVPP,YVPPをオフセット電圧の補正値とすることは、内挿精度φの勾配を逆に増長することなる。これにより、従来のオフセット補正方法は好ましくないことが理解される。 However, these amplitude center values X VPP and Y VPP do not coincide with the optimum correction values X and Y expressed by the above-described equations 62 and 63. Rather, using the amplitude center values X VPP and Y VPP as the offset voltage correction value increases the slope of the interpolation accuracy φ on the contrary. Thus, it is understood that the conventional offset correction method is not preferable.

次に、このような2次高調波が重畳する波形で、上述した本発明による補正方法で最適補正値を導き出すことができる点について説明する。本発明によるオフセット補正では、A相出力信号VA(θ)及びB相出力信号VB(θ)において、最大値の検出位置(角度)θmaxからプラス及びマイナス側に一定量εだけシフトする2つの位置θmax+ε,θmax−εと、最小値の検出位置(角度)θminからプラス及びマイナス側に一定量εだけシフトする2つの位置θmin+ε,θmin−εとからなる4つの位置の出力信号の平均値をオフセット電圧の補正値X,Yとするものである。そして、この場合も、A相出力信号VA(θ)における角度θmax,θminがそれぞれほぼ90°,270°であること、及びA相出力信号VA(θ)が前記66で表されることを考慮すれば、VA(90+ε),VA(90−ε),VA(270+ε),VA(270−ε)は、下記数76,77,78,79のようになる。 Next, a description will be given of the fact that an optimum correction value can be derived by the correction method according to the present invention described above with a waveform in which such second harmonics are superimposed. In the offset correction according to the present invention, the A phase output signal V A (θ) and the B phase output signal V B (θ) are shifted by a certain amount ε from the maximum detection position (angle) θmax to the plus and minus sides 2. An average value of output signals at four positions consisting of two positions θmax + ε, θmax−ε and two positions θmin + ε, θmin−ε shifted by a fixed amount ε from the minimum detection position (angle) θmin to the plus and minus sides. Are the offset voltage correction values X 4 and Y 4 . Also in this case, the angles θmax and θmin in the A-phase output signal V A (θ) are approximately 90 ° and 270 °, respectively, and the A-phase output signal V A (θ) is expressed by 66. , V A (90 + ε), V A (90−ε), V A (270 + ε), and V A (270−ε) are as shown in the following formulas 76, 77, 78, and 79.

Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350

したがって、オフセット電圧の補正値Xは下記数80のように表され、これを変形すると、下記数81のようになる。

Figure 2012189350
Figure 2012189350
Accordingly, the correction value X 4 of the offset voltage is represented as the following equation 80, it is modified it is as the following equation 81.
Figure 2012189350
Figure 2012189350

また、B相出力信号VB(θ)における角度θmax,θminがそれぞれほぼ0°,180°であること、及びB相出力信号VB(θ)が前記数70で表されることを考慮すれば、VB(0+ε),VB(0−ε),VB(180+ε),VB(180−ε)は、下記数82,83,84,85のようになる。

Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
Also, considering that the angles θmax and θmin in the B-phase output signal V B (θ) are approximately 0 ° and 180 °, respectively, and that the B-phase output signal V B (θ) is expressed by the equation 70. For example, V B (0 + ε), V B (0−ε), V B (180 + ε), and V B (180−ε) are expressed by the following equations 82, 83, 84, and 85.
Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350

したがって、オフセット電圧の補正値Yは下記数86のように表され、これを変形すると、下記数87のようになる。

Figure 2012189350
Figure 2012189350
Accordingly, the correction value Y 4 of the offset voltage is represented as the following equation 86, it is modified it is as the following equation 87.
Figure 2012189350
Figure 2012189350

すなわち、A相出力信号VA(θ)及びB相出力信号VB(θ)のオフセット電圧の補正値X,Yは、下記数88,89のようになる。

Figure 2012189350
Figure 2012189350
That is, the offset voltage correction values X 4 and Y 4 of the A-phase output signal V A (θ) and the B-phase output signal V B (θ) are expressed by the following equations 88 and 89, respectively.
Figure 2012189350
Figure 2012189350

ここで、シフトする一定量εを90°とすると、前記数88,89で表された補正値X,Yは下記数90,91のようになり、これらを整理すると、最終的には下記数92,93のようになる。

Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350
Here, assuming that the constant amount ε to be shifted is 90 °, the correction values X 4 and Y 4 expressed by the equations 88 and 89 are as shown in the following equations 90 and 91. The following numbers 92 and 93 are obtained.
Figure 2012189350
Figure 2012189350
Figure 2012189350
Figure 2012189350

そして、これらの補正値X,Yは、前記計算した数62,63で示される最適補正値X,Yとは一致する。すなわち、磁気センサ10自身に潜在するオフセット電圧の補正値と設置誤差による2次高調波が重畳した出力信号の内挿精度φの勾配を抑制する最適補正値を求めるためには、前記最大値及び最大値からのシフト量εを90°に設定するとよい。その結果、本発明のオフセット補正方法を用いれば、内挿精度φの悪化を良好に抑制できることが理解される。 These correction values X 4 and Y 4 coincide with the optimum correction values X and Y represented by the above-described calculated numbers 62 and 63. That is, in order to obtain the optimum correction value for suppressing the gradient of the interpolation accuracy φ of the output signal in which the correction value of the offset voltage latent in the magnetic sensor 10 itself and the second harmonic due to the installation error are superimposed, The shift amount ε from the maximum value may be set to 90 °. As a result, it is understood that the deterioration of the interpolation accuracy φ can be satisfactorily suppressed by using the offset correction method of the present invention.

d.変形例
以上、本発明の実施形態について説明したが、本発明の実施にあたっては、上記実施形態に限定されるものではなく、本発明の目的を逸脱しない限りにおいて種々の変形も可能である。
d. Modifications The embodiment of the present invention has been described above. However, the present invention is not limited to the above embodiment, and various modifications can be made without departing from the object of the present invention.

(1)
変形例1
上記実施形態及び従来技術で説明した磁気センサ10は点対称形を成す磁気センサであったが、磁気センサ10としてはこれに限らず、本発明は種々の磁気センサにも適用される。例えば、磁気センサ10として、図22に示すように、検出素子としての磁気抵抗効果素子S1、S2,S3,S4を、着磁ピッチに対応した間隔で図示矢印で示す同一方向(すなわちピッチ方向)に線対称(図22の一点鎖線を中心に線対称)に配置した磁気センサを利用できる。この場合、磁気抵抗効果素子S1、S2,S3,S4は4個以外の2個、8個などの偶数であればよい。
(1)
Modification 1
The magnetic sensor 10 described in the above embodiment and the prior art is a point-symmetric magnetic sensor. However, the magnetic sensor 10 is not limited to this, and the present invention is also applicable to various magnetic sensors. For example, as shown in FIG. 22, as the magnetic sensor 10, the magnetoresistive effect elements S1, S2, S3, and S4 as detection elements are arranged in the same direction (that is, the pitch direction) indicated by the illustrated arrows at intervals corresponding to the magnetization pitch. In addition, a magnetic sensor arranged in a line symmetry (axisymmetric with respect to a one-dot chain line in FIG. 22) can be used. In this case, the magnetoresistive effect elements S1, S2, S3, and S4 may be even numbers such as two other than four or eight.

この磁気センサ10は、主に多極磁石の検出に用いられる。装置構造例として、磁気センサ10と磁石22の適性配置を図23A,23Bに示す。図23Aは多極リング磁石22の接線方向と、磁気センサ10のピッチ方向(図示矢印方向)が一致し、かつ磁石22の法線と磁気センサ10の対称線が一致するように配置する。この場合も、磁石22の回転に伴って、接線方向のみの磁界変化を検出することで互いに90度位相ずれた出力信号を出力するロータリーエンコーダ装置となる。図23Bは多極リニア磁石22の側面に、磁気センサ10を、磁石22と磁気センサ10のピッチ方向(図示矢印方向)が並行になるように配置する。磁石22が直動することで、その方向のみの磁界変化を検出することで互いに90度位相ずれた出力信号を出力するリニアエンコーダ装置となる。   The magnetic sensor 10 is mainly used for detecting a multipolar magnet. As examples of the structure of the apparatus, suitable arrangements of the magnetic sensor 10 and the magnet 22 are shown in FIGS. 23A and 23B. FIG. 23A is arranged so that the tangential direction of the multipolar ring magnet 22 and the pitch direction of the magnetic sensor 10 (in the direction of the arrow in the figure) coincide, and the normal line of the magnet 22 and the symmetry line of the magnetic sensor 10 coincide. In this case as well, a rotary encoder device that outputs output signals that are 90 degrees out of phase with each other by detecting a magnetic field change only in the tangential direction as the magnet 22 rotates is provided. In FIG. 23B, the magnetic sensor 10 is arranged on the side surface of the multipolar linear magnet 22 so that the pitch direction (arrow direction in the drawing) of the magnet 22 and the magnetic sensor 10 is parallel. By linearly moving the magnet 22, a linear encoder device that outputs output signals that are 90 degrees out of phase with each other by detecting a change in the magnetic field only in that direction is obtained.

これらの変形例に係るエンコーダ装置において、磁気センサ10を磁石22に対して適切に設置すれば、前記第3実施例の場合と異なり、磁気センサ10は同一方向の磁界変化を検出するから、上記図21で示したカージオイド曲線の磁界変化を検出することにはならない。しかしながら、上記第1及び第2実施例の場合と同様に、図24A及び図24Bで示すように、設置誤差を有する状態で磁気センサ10を磁石22に対して配置すると2次高調波が出力信号に重畳する。すなわち、図24Aに示すように、多極リング磁石22の場合において、磁気センサ10対称線と磁石22の法線とで設置誤差が有る場合には、2次高調波が出力信号に重畳する。また、図24Bに示すように、多極リニア磁石22の場合において、磁気センサ10が磁石22のピッチ方向に対して傾いた場合、2次高調波が出力信号に重畳する。   In the encoder apparatus according to these modified examples, if the magnetic sensor 10 is appropriately installed with respect to the magnet 22, unlike the case of the third embodiment, the magnetic sensor 10 detects a magnetic field change in the same direction. The change in the magnetic field of the cardioid curve shown in FIG. 21 is not detected. However, as in the case of the first and second embodiments, as shown in FIGS. 24A and 24B, when the magnetic sensor 10 is arranged with respect to the magnet 22 in a state having an installation error, the second harmonic is output. Superimpose on. That is, as shown in FIG. 24A, in the case of the multipolar ring magnet 22, when there is an installation error between the magnetic sensor 10 symmetry line and the normal line of the magnet 22, the second harmonic is superimposed on the output signal. As shown in FIG. 24B, in the case of the multipolar linear magnet 22, when the magnetic sensor 10 is tilted with respect to the pitch direction of the magnet 22, the second harmonic is superimposed on the output signal.

図25Aは、前記図24Aのエンコーダ装置における内挿精度φ(=電気角−機械角)を示している。この場合、(a)は従来の補正方法を用いた場合の内挿精度φをグラフに誤差として示し、(b)は本発明の補正方法を用いた場合の内挿精度φをグラフに誤差として示している。また、図25Bは、前記図24Bのエンコーダ装置における内挿精度φ(=電気角−機械角)を示している。この場合も、(a)は従来の補正方法を用いた場合の内挿精度φをグラフに誤差として示し、(b)は本発明の補正方法を用いた場合の内挿精度φをグラフに誤差として示している。これによれば、これらの変形例に係るエンコーダ装置においても、本発明による補正方法を用いることにより、従来の補正方法を用いる場合には比べて、内挿精度φ(誤差)の悪化を良好に抑制できることが理解される。   FIG. 25A shows the interpolation accuracy φ (= electric angle−mechanical angle) in the encoder device of FIG. 24A. In this case, (a) shows the interpolation accuracy φ when the conventional correction method is used as an error in the graph, and (b) shows the interpolation accuracy φ when the correction method of the present invention is used as an error in the graph. Show. FIG. 25B shows the interpolation accuracy φ (= electric angle−mechanical angle) in the encoder apparatus of FIG. 24B. Also in this case, (a) shows the interpolation accuracy φ when the conventional correction method is used as an error in the graph, and (b) shows the interpolation accuracy φ when the correction method of the present invention is used as an error in the graph. As shown. According to this, also in the encoder device according to these modified examples, by using the correction method according to the present invention, the deterioration of the interpolation accuracy φ (error) is improved compared to the case of using the conventional correction method. It is understood that it can be suppressed.

(2)
変形例2
上記実施例及び変形例に係る磁気センサ10は、1枚の基板上に複数の検出素子としての磁気抵抗効果素子を配置したものであったが、本発明は、1枚の基板上に1個の検出素子としての磁気抵抗効果粗衣を配置したエンコーダ装置にも適用される。例えば、この種のエンコーダ装置としては、図26に示すように、1つのみの磁気抵抗効果素子をそれぞれ含む複数の磁気センサ10を多極リング磁石22の側方に配置させて、磁石22の回転に応じて、互いに90°位相のずれたA相出力信号VA(θ)及びB相出力信号VB(θ)からなる出力信号を得るようにしている。なお、この場合も、前記1つのみの磁気抵抗効果素子をそれぞれ含む複数の磁気センサ10を、図23Bの場合のように、多極リニア磁石に平行に配置して、磁石の直動位置を検出するように変形することもできる。
(2)
Modification 2
In the magnetic sensor 10 according to the above-described embodiment and the modification, a plurality of magnetoresistive effect elements as detection elements are arranged on one substrate. However, in the present invention, one piece is provided on one substrate. The present invention is also applied to an encoder device in which a magnetoresistive effect garment as a detection element is arranged. For example, as an encoder device of this type, as shown in FIG. 26, a plurality of magnetic sensors 10 each including only one magnetoresistive effect element are arranged on the side of the multipolar ring magnet 22, and According to the rotation, an output signal composed of an A-phase output signal V A (θ) and a B-phase output signal V B (θ) that are 90 ° out of phase with each other is obtained. In this case as well, a plurality of magnetic sensors 10 each including only one magnetoresistive element are arranged in parallel to the multipolar linear magnet as in FIG. It can also be modified to detect.

(3)
その他の変形例
上記実施例及び前記変形例に係るエンコーダ装置における磁気センサ10では、AMR磁気抵抗効果素子を用いたが、上記従来技術で説明したように、GMR磁気抵抗効果素子を用いたり、ホール素子を用いたりすることもできる。
(3)
Other Modifications In the magnetic sensor 10 in the encoder device according to the above-described embodiment and the modification, the AMR magnetoresistive effect element is used. However, as described in the prior art, a GMR magnetoresistive effect element is used, An element can also be used.

また、上記実施例及び前記変形例に係るエンコーダ装置におけるセンサとして磁気センサを採用するようにした。しかし、上述した理論式から分かるように、検出対象物の回転又は移動に応じて、互いに90°位相のずれたA相出力信号VA(θ)及びB相出力信号VB(θ)からなる出力信号を得ることができればよいので、センサ部に磁気センサ以外のセンサを用いてもよい。例えば、検出対象物をスリットを有するように形成して、センサを光学プローブとした光学式エンコーダ装置にも本発明は適用される。 In addition, a magnetic sensor is employed as a sensor in the encoder device according to the embodiment and the modification. However, as can be seen from the above-described theoretical formula, the phase A output signal V A (θ) and the phase B output signal V B (θ) are shifted from each other by 90 ° in accordance with the rotation or movement of the detection target. Since an output signal only needs to be obtained, a sensor other than a magnetic sensor may be used for the sensor unit. For example, the present invention is also applied to an optical encoder device in which a detection target is formed to have a slit and the sensor is an optical probe.

また、上記実施形態及び変形例では、オフセット補正及び振幅補正の両補正を行うようにした。しかし、A相出力信号VA(θ)とB相出力信号VB(θ)との振幅比に起因する内挿精度φの悪化は上述のように小さい。したがって、振幅比に関する内挿精度φの悪化が問題とならない場合には、振幅補正を省略して、オフセット補正のみを行うようにしてもよい。 In the embodiment and the modification, both the offset correction and the amplitude correction are performed. However, the deterioration of the interpolation accuracy φ due to the amplitude ratio between the A-phase output signal V A (θ) and the B-phase output signal V B (θ) is small as described above. Therefore, when the deterioration of the interpolation accuracy φ related to the amplitude ratio does not matter, the amplitude correction may be omitted and only the offset correction may be performed.

さらに、動作時の環境変化により一度定めた補正値が適当でなくなる場合(例えば、温度特性が加わった場合など)には、一度定めた補正値を環境に応じてさらに補正するようにするとよい。これによれば、精度向上がさらに期待できる。   Furthermore, when the correction value once determined is not appropriate due to environmental changes during operation (for example, when temperature characteristics are added), the correction value once determined may be further corrected according to the environment. According to this, further improvement in accuracy can be expected.

10…磁気センサ、11,31…サンプリング回路、12a,12b,32a,32b…A/D変換器、13,33…演算処理装置、16,34…入出力回路、17,35…メモリ、21…回転軸、22…磁石、23…駆動装置 DESCRIPTION OF SYMBOLS 10 ... Magnetic sensor 11, 31 ... Sampling circuit, 12a, 12b, 32a, 32b ... A / D converter, 13, 33 ... Arithmetic processing unit, 16, 34 ... Input / output circuit, 17, 35 ... Memory, 21 ... Rotating shaft, 22 ... magnet, 23 ... drive device

Claims (4)

検出対象物の回転又は移動に応じて互いに90度だけ位相の異なる正弦波状の第1及び第2アナログ検出信号を出力するセンサ部と、
前記センサ部からの第1及び第2アナログ検出信号を第1及び第2ディジタル検出信号にそれぞれディジタル変換して、前記変換した第1及び第2ディジタル検出信号を用いて検出対象物の回転角度又は移動位置を演算処理する演算処理部とを備えたエンコーダ装置に適用され、
前記変換した第1及び第2ディジタル検出信号を補正するエンコーダ装置のための補正方法であって、
前記センサ部からの第1及び第2アナログ検出信号を所定間隔でそれぞれサンプリングすることにより、少なくとも波形1周期分の第1及び第2ディジタルデータをそれぞれ取得するデータ取得手順と、
前記取得された第1及び第2ディジタルデータの中から最大値及び最小値の位置をそれぞれ検出する位置検出手順と、
前記取得された第1ディジタルデータの中から、前記検出された第1ディジタルデータの最大値及び最小値の各検出位置からそれぞれ90度だけ離れた4つの位置の各ディジタルデータをそれぞれ抽出して4つの補正用ディジタルデータとするとともに、前記取得された第2ディジタルデータの中から、前記検出された第2ディジタルデータの最大値及び最小値の各検出位置からそれぞれ90度だけ離れた4つの位置の各ディジタルデータをそれぞれ抽出して4つの補正用ディジタルデータとする補正用ディジタルデータ抽出手順と、
前記抽出された第1ディジタルデータに関する4つの補正用ディジタルデータを平均した値を第1オフセット値として設定するとともに、前記抽出された第2ディジタルデータに関する4つの補正用ディジタルデータを平均した値を第2オフセット値として設定するオフセット値設定手順と、
前記演算処理部で第1及び第2ディジタル検出信号を用いて検出対象物の回転角度又は移動位置を演算処理する前に、前記センサ部から入力されて変換された第1及び第2ディジタル検出信号を第1及び第2オフセット値を用いてそれぞれ補正するオフセット値補正手順とを含むことを特徴とするエンコーダ装置のための補正方法。
A sensor unit that outputs sinusoidal first and second analog detection signals having phases different from each other by 90 degrees according to the rotation or movement of the detection target;
The first and second analog detection signals from the sensor unit are digitally converted into first and second digital detection signals, respectively, and the rotation angle of the detection object or the detection object is detected using the converted first and second digital detection signals. It is applied to an encoder device that includes an arithmetic processing unit that performs arithmetic processing on a moving position,
A correction method for an encoder device for correcting the converted first and second digital detection signals,
A data acquisition procedure for acquiring first and second digital data for at least one waveform period by sampling the first and second analog detection signals from the sensor unit at predetermined intervals, respectively.
A position detection procedure for detecting a position of a maximum value and a minimum value from the acquired first and second digital data, respectively;
From the acquired first digital data, each digital data at four positions respectively separated by 90 degrees from the respective detected positions of the maximum value and the minimum value of the detected first digital data is extracted to 4 Four correction digital data, and among the acquired second digital data, four positions separated by 90 degrees from the respective detection positions of the maximum value and the minimum value of the detected second digital data. A correction digital data extraction procedure for extracting each digital data into four correction digital data;
A value obtained by averaging the four correction digital data related to the extracted first digital data is set as a first offset value, and a value obtained by averaging the four correction digital data related to the extracted second digital data is set to the first value. 2 Offset value setting procedure to set as an offset value;
The first and second digital detection signals input from the sensor unit and converted before the calculation processing unit uses the first and second digital detection signals to calculate the rotation angle or movement position of the detection target. And an offset value correction procedure for correcting each of the values using the first and second offset values.
前記センサ部は、一つの基板上に複数の検出素子を対称形に配置したものである請求項1に記載したエンコーダ装置のための補正方法。   The correction method for an encoder apparatus according to claim 1, wherein the sensor unit includes a plurality of detection elements arranged symmetrically on a single substrate. 検出対象物の回転又は移動に応じて互いに90度だけ位相の異なる正弦波状の第1及び第2アナログ検出信号を出力するセンサ部と、
前記センサ部からの第1及び第2アナログ検出信号を第1及び第2ディジタル検出信号にそれぞれディジタル変換するとともに、前記変換した第1及び第2ディジタル検出信号を前記第1及び第2アナログ検出信号の各オフセット値を用いて補正し、前記補正した第1及び第2ディジタル検出信号を用いて検出対象物の回転角度又は移動位置を演算処理する演算処理部とを備えたエンコーダ装置において、
前記第1及び第2検出信号を所定の位置間隔でサンプリングすることにより少なくとも波形1周期分のディジタルデータを取得するデータ取得手段と、
前記取得された第1及び第2ディジタルデータの中から最大値及び最小値の位置をそれぞれ検出する位置検出手段と、
前記取得された第1ディジタルデータの中から、前記検出された第1ディジタルデータの最大値及び最小値の各検出位置からそれぞれ90度だけ離れた4つの位置の各ディジタルデータをそれぞれ抽出して4つの補正用ディジタルデータとするとともに、前記取得された第2ディジタルデータの中から、前記検出された第2ディジタルデータの最大値及び最小値の各検出位置からそれぞれ90度だけ離れた4つの位置の各ディジタルデータをそれぞれ抽出して4つの補正用ディジタルデータとする補正用ディジタルデータ抽出手段と、
前記抽出された第1ディジタルデータに関する4つの補正用ディジタルデータを平均した値を第1オフセット値として設定するとともに、前記抽出された第2ディジタルデータに関する4つの補正用ディジタルデータを平均した値を第2オフセット値として設定するオフセット値設定手段とを設けたことを特徴とするエンコーダ装置。
A sensor unit that outputs sinusoidal first and second analog detection signals having phases different from each other by 90 degrees according to the rotation or movement of the detection target;
The first and second analog detection signals from the sensor unit are digitally converted into first and second digital detection signals, respectively, and the converted first and second digital detection signals are converted into the first and second analog detection signals, respectively. And an arithmetic processing unit that performs arithmetic processing on the rotation angle or movement position of the detection target using the corrected first and second digital detection signals.
Data acquisition means for acquiring digital data for at least one waveform period by sampling the first and second detection signals at predetermined position intervals;
Position detecting means for detecting a position of a maximum value and a minimum value from the acquired first and second digital data, respectively;
From the acquired first digital data, each digital data at four positions respectively separated by 90 degrees from the respective detected positions of the maximum value and the minimum value of the detected first digital data is extracted to 4 Four correction digital data, and among the acquired second digital data, four positions separated by 90 degrees from the respective detection positions of the maximum value and the minimum value of the detected second digital data. Correction digital data extraction means for extracting each digital data to obtain four correction digital data;
A value obtained by averaging the four correction digital data related to the extracted first digital data is set as a first offset value, and a value obtained by averaging the four correction digital data related to the extracted second digital data is set to the first value. An encoder device comprising offset value setting means for setting as two offset values.
前記センサ部は、一つの基板上に複数の検出素子を対称形に配置したものである請求項3に記載したエンコーダ装置。   The encoder device according to claim 3, wherein the sensor unit includes a plurality of detection elements arranged symmetrically on a single substrate.
JP2011051059A 2011-03-09 2011-03-09 Encoder device and correction method for encoder device Pending JP2012189350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011051059A JP2012189350A (en) 2011-03-09 2011-03-09 Encoder device and correction method for encoder device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011051059A JP2012189350A (en) 2011-03-09 2011-03-09 Encoder device and correction method for encoder device

Publications (1)

Publication Number Publication Date
JP2012189350A true JP2012189350A (en) 2012-10-04

Family

ID=47082709

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011051059A Pending JP2012189350A (en) 2011-03-09 2011-03-09 Encoder device and correction method for encoder device

Country Status (1)

Country Link
JP (1) JP2012189350A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018021884A (en) * 2016-08-05 2018-02-08 株式会社リコー Phase detection device, motor system, image forming apparatus, conveying device, and sensor level acquiring method
CN109855668A (en) * 2019-03-11 2019-06-07 中电海康无锡科技有限公司 Method for self-calibrating, device, magnetic degree sensor and the system of magnetic degree sensor

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3365063B2 (en) * 1994-07-25 2003-01-08 神鋼電機株式会社 Rotation angle detection method
JP2004045286A (en) * 2002-07-12 2004-02-12 Denso Corp Method of correcting resolver
JP2004317262A (en) * 2003-04-15 2004-11-11 Sendai Nikon:Kk Measuring device
JP2007303845A (en) * 2006-05-09 2007-11-22 Victor Co Of Japan Ltd Position detecting method and imaging apparatus
JP2008003041A (en) * 2006-06-26 2008-01-10 Victor Co Of Japan Ltd Position detecting method and imaging device
JP2011033481A (en) * 2009-07-31 2011-02-17 Daido Steel Co Ltd Magnetic sensor signal processing program and magnetic sensor module

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3365063B2 (en) * 1994-07-25 2003-01-08 神鋼電機株式会社 Rotation angle detection method
JP2004045286A (en) * 2002-07-12 2004-02-12 Denso Corp Method of correcting resolver
JP2004317262A (en) * 2003-04-15 2004-11-11 Sendai Nikon:Kk Measuring device
JP2007303845A (en) * 2006-05-09 2007-11-22 Victor Co Of Japan Ltd Position detecting method and imaging apparatus
JP2008003041A (en) * 2006-06-26 2008-01-10 Victor Co Of Japan Ltd Position detecting method and imaging device
JP2011033481A (en) * 2009-07-31 2011-02-17 Daido Steel Co Ltd Magnetic sensor signal processing program and magnetic sensor module

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018021884A (en) * 2016-08-05 2018-02-08 株式会社リコー Phase detection device, motor system, image forming apparatus, conveying device, and sensor level acquiring method
CN109855668A (en) * 2019-03-11 2019-06-07 中电海康无锡科技有限公司 Method for self-calibrating, device, magnetic degree sensor and the system of magnetic degree sensor
CN109855668B (en) * 2019-03-11 2021-05-11 中电海康无锡科技有限公司 Self-calibration method and device of magnetic angle sensor, magnetic angle sensor and system

Similar Documents

Publication Publication Date Title
CN108592956B (en) Rotary encoder and absolute angle position detection method thereof
CN108426588B (en) Rotary encoder and absolute angle position detection method thereof
JP5052603B2 (en) Absolute rotation position detection method
JP6163874B2 (en) Rotation angle detection device, image processing device, and rotation angle detection method
TWI650528B (en) Rotation angle detecting device and rotation angle detecting method
CN107860404B (en) Rotary encoder and absolute angle position detection method for rotary encoder
JP2017058256A (en) Rotary encoder and absolute angle position detection method of rotary encoder
KR102195533B1 (en) Rotary encoder and angle correction method of rotary encoder
JP2018132356A (en) Rotary encoder
JP6877169B2 (en) Rotary encoder
JP2012189350A (en) Encoder device and correction method for encoder device
JP5107791B2 (en) Rotation angle sensor
CN110388943B (en) Encoder for encoding a video signal
JP5767917B2 (en) Encoder device and correction method for encoder device
JPH1019602A (en) Magnetic encoder
TWI683990B (en) Encoder
JP4224154B2 (en) Self-calibration type angle detection device and detection accuracy calibration method
JP5193930B2 (en) Small angle detection sensor
JP2004264137A (en) Method of determining correction value for noncontact rotation angle sensor and noncontact rotation angle sensor
JP5455761B2 (en) Magnetic rotation angle detector
JP2012237619A (en) Rotational angle detector
JP2023041534A (en) magnetic encoder
JP2020153981A (en) System for determining at least one rotation parameter of rotating member
JP2018132359A (en) Rotary encoder
JP2017161553A (en) Rotation angle detector, motor system, image processing device, and rotation angle detection method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140226

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141022

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141105

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150303