[go: up one dir, main page]

JP6668082B2 - Encoder - Google Patents

Encoder Download PDF

Info

Publication number
JP6668082B2
JP6668082B2 JP2016008929A JP2016008929A JP6668082B2 JP 6668082 B2 JP6668082 B2 JP 6668082B2 JP 2016008929 A JP2016008929 A JP 2016008929A JP 2016008929 A JP2016008929 A JP 2016008929A JP 6668082 B2 JP6668082 B2 JP 6668082B2
Authority
JP
Japan
Prior art keywords
offset
phase signal
encoder
lissajous waveform
control unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016008929A
Other languages
Japanese (ja)
Other versions
JP2017129452A (en
Inventor
宏克 奥村
宏克 奥村
齋藤 豊
豊 齋藤
均 上甲
均 上甲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nidec Instruments Corp
Original Assignee
Nidec Sankyo Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nidec Sankyo Corp filed Critical Nidec Sankyo Corp
Priority to JP2016008929A priority Critical patent/JP6668082B2/en
Priority to TW106100789A priority patent/TWI714699B/en
Priority to KR1020170008402A priority patent/KR20170087415A/en
Priority to CN201710043699.3A priority patent/CN106989762B/en
Publication of JP2017129452A publication Critical patent/JP2017129452A/en
Application granted granted Critical
Publication of JP6668082B2 publication Critical patent/JP6668082B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/24471Error correction
    • G01D5/2448Correction of gain, threshold, offset or phase control
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/24471Error correction
    • G01D5/2449Error correction using hard-stored calibration data

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Description

本発明は、エンコーダに係り、例えば、π/2の位相差をもつA相信号及びB相信号の磁気センサ出力をもとに得られる回転角を算出する磁気式のエンコーダに関する。   The present invention relates to an encoder, for example, to a magnetic encoder that calculates a rotation angle obtained based on the output of a magnetic sensor of an A-phase signal and a B-phase signal having a phase difference of π / 2.

被検出物の変位量や変位の絶対値を検出する装置として、磁気式エンコーダが知られている。例えば、磁気式エンコーダとしては、NSの2極に着磁された円盤状の磁石を回転させ、その磁界変化をMR素子で検出し、得られたSin信号及びCos信号をAD変換してマイコンに取り込み、回転位置の絶対値を検出するものがある。   2. Description of the Related Art A magnetic encoder is known as a device for detecting a displacement amount and an absolute value of a displacement of an object. For example, as a magnetic encoder, a disk-shaped magnet magnetized in two poles of NS is rotated, a change in the magnetic field is detected by an MR element, and the obtained Sin signal and Cos signal are AD-converted to a microcomputer. There is one that detects the absolute value of the capture and rotation position.

このような磁気式エンコーダでは、例えば、逆正接信号の位相をパラメータとし、Sin信号を直交座標系のY座標、Cos信号を直交座標系のX座標としてプロットすると、いわゆるリサージュ波形が得られる。リサージュ波形は、Sin信号とCos信号がノイズ等のない理想的な信号と仮定すると、中心ずれや歪のない円形となる。しかし、実際は、センサのばらつき等によって、中心がずれた円形、すなわち、Y座標とX座標の交点からリサージュ波形の円周上までの距離が異なる場合がある。そのため、エンコーダを工場から出荷する際には、予めオフセット補正をかけておくのが一般的である。さらに、出荷時(初期)のオフセット調整環境と実際の使用環境、特に温度環境が異なる使用環境との違いを考慮し、オフセット誤差を調整する技術もある(例えば、特許文献1参照)。   In such a magnetic encoder, for example, a so-called Lissajous waveform is obtained by plotting the Sin signal as a Y coordinate in a rectangular coordinate system and the Cos signal as an X coordinate in a rectangular coordinate system using the phase of the arc tangent signal as a parameter. Assuming that the Sin signal and the Cos signal are ideal signals without noise or the like, the Lissajous waveform is a circular shape without center shift and distortion. However, in practice, the distance from the center of the circle, that is, the intersection of the Y coordinate and the X coordinate, to the circumference of the Lissajous waveform may be different due to variations in the sensors. Therefore, when an encoder is shipped from a factory, it is general to apply offset correction in advance. Further, there is a technique of adjusting an offset error in consideration of a difference between an offset adjustment environment at the time of shipment (initial stage) and an actual use environment, particularly a use environment having a different temperature environment (for example, see Patent Document 1).

特開2010−78340号公報JP 2010-78340 A

ところで、Y軸との交点2点とX軸との交点2点とによりオフセットを算出する技術では、小さい回転角度しか動かないような場合のアプリケーションでは、オフセット算出に限界があり、そのような状況に於いても精度向上を図ることのできる技術が求められていた。   By the way, in the technique of calculating an offset based on two points of intersection with the Y axis and two points of intersection with the X axis, there is a limit to offset calculation in an application where only a small rotation angle is moved. Therefore, a technique capable of improving the accuracy has been demanded.

本発明は、上記の状況に鑑みなされたものであって、MR素子を用いたエンコーダにおいて、オフセットを適切に反映させ精度を向上させることを目的にしている。   The present invention has been made in view of the above circumstances, and has as its object to improve accuracy by appropriately reflecting an offset in an encoder using an MR element.

本発明に係るエンコーダは、NSの2極に着磁された磁石と、前記磁石に対向するように配置され、π/2の位相差を持つA相信号とB相信号を出力する磁気センサと、前記A相信号と前記B相信号にもとづいて、回転量を算出する回転量算出部と、前記A相信号と前記B相信号にもとづいて、リサージュ波形を直交座標系上に形成し、前記リサージュ波形をもとに、前記A相信号と前記B相信号のオフセットを算出し、前記回転量算出部において前記回転量を算出する際の前記A相信号及び前記B相信号に対して当該オフセットの分だけ補正を行わせるオフセット制御部と、を備え、前記オフセット制御部は、前記リサージュ波形が呈する円周上において、所定の数に均等に分割される候補点のうち、連続する3点から形成される2つの辺の垂直二等分線の交点よりオフセットを検出する動作を異なる時点で複数回行い、前記回転量を算出するために適用する前記オフセットを決定する際に、最初の3点で検出したオフセットはそのまま使用し、以後に順次検出したオフセットは重み付けして前記最初の3点で検出したオフセットに反映させる
ここで、π/2の位相差を持つA相信号とB相信号とは、例えば、Sin信号及びCos信号を指す。従来のように、Y軸との交点2点とX軸との交点2点とによりオフセットを算出する場合と比較して、小さい回転角度でもオフセットが検出できる。その為、小さい回転角度しか動かないようなアプリケーションでも使用することができる。この際、エンコード回転直後から早くオフセットを算出でき、かつ、上述の様に、ばたつかないオフセットとして算出できる。
An encoder according to the present invention includes a magnet magnetized to two poles of NS, and a magnetic sensor arranged to face the magnet and outputting an A-phase signal and a B-phase signal having a phase difference of π / 2. A rotation amount calculation unit that calculates a rotation amount based on the A-phase signal and the B-phase signal, and forms a Lissajous waveform on a rectangular coordinate system based on the A-phase signal and the B-phase signal; An offset between the A-phase signal and the B-phase signal is calculated based on the Lissajous waveform, and the offset is calculated for the A-phase signal and the B-phase signal when the rotation amount is calculated by the rotation amount calculation unit. And an offset control unit that performs correction by an amount corresponding to a predetermined number of candidate points equally divided into a predetermined number on a circumference represented by the Lissajous waveform. Two sides formed Performed a plurality of times an operation of detecting the offset from the intersection of the perpendicular bisectors at different times, the when determining the offset to be applied to calculate the rotation amount, the detected offset is used as the first three-point The offsets sequentially detected thereafter are weighted and reflected on the offsets detected at the first three points .
Here, the A-phase signal and the B-phase signal having a phase difference of π / 2 indicate, for example, a Sin signal and a Cos signal. The offset can be detected even at a small rotation angle, as compared with the case where the offset is calculated based on two points of intersection with the Y axis and two points of intersection with the X axis as in the related art. Therefore, it can be used even in an application that moves only a small rotation angle. At this time, the offset can be calculated quickly immediately after the rotation of the encode, and can be calculated as a non-fluttering offset as described above.

前記オフセット制御部は、リサージュ波形に歪がある場合、理想円となるように補正をして前記連続する3点から前記オフセットを算出してもよい。
リサージュ波形が呈する円形に歪があった場合でも、より正確なオフセットを算出できる。
The offset control unit may calculate the offset from the three consecutive points by correcting the Lissajous waveform so that the Lissajous waveform has an ideal circle.
Even when the circular shape of the Lissajous waveform has distortion, a more accurate offset can be calculated.

また、前記連続する3点は、前記直交座標系のいずれかの座標軸と前記リサージュ波形との交点を少なくとも1つ含んでもよい。
一般に、リサージュ波形は直交座標系の軸(X軸、Y軸)との交点での歪は少ない。そこで、軸との交点が含まれることにより、歪補正において軸との交点に関しては補正を行う必要がなく、より早くオフセットを算出することができる。
In addition, the three consecutive points may include at least one intersection of any one of the coordinate axes of the rectangular coordinate system and the Lissajous waveform.
In general, the Lissajous waveform has little distortion at the intersection with the axes (X axis, Y axis) of the rectangular coordinate system. Therefore, by including the intersection with the axis, it is not necessary to correct the intersection with the axis in the distortion correction, and the offset can be calculated more quickly.

前記連続する3点は、前記直交座標系のいずれかの座標軸と前記リサージュ波形との交点であってもよい。
3点とも軸との交点とすることで、リサージュ波形の歪が少ない位置から3点を選択しているので、3点とも歪補正が不要になり、より早くオフセットを算出することができる。
The three consecutive points may be intersections between any of the coordinate axes of the rectangular coordinate system and the Lissajous waveform.
By setting all three points as intersections with the axis, three points are selected from positions where the distortion of the Lissajous waveform is small. Therefore, distortion correction is not required for all three points, and the offset can be calculated more quickly.

前記座標軸上との交点の検出は、前記A相信号または前記B相信号のいずれか一方がゼロになったときの値と、他方側の値との組み合わせから算出してもよい。
最大値検出や最小値検出をせずに、簡単な方法で軸との交点を検出し、オフセットを算出することができる。
The detection of the intersection with the coordinate axis may be calculated from a combination of a value when one of the A-phase signal and the B-phase signal becomes zero and a value on the other side.
It is possible to detect the intersection with the axis and calculate the offset by a simple method without detecting the maximum value or the minimum value.

前記オフセット制御部は、前記回転量を算出するために適用する前記オフセットを決定する際に、前回算出されたオフセットと最新に算出されたオフセットとを平滑化して用いてもよい。
最新オフセットに対して1つ前のオフセットに重み付けした値を加え平滑化(フィルタリング)したものを、前記回転量を算出するときに適用することで、環境温度変化、使用時の装置温度上昇などの変化があっても、それら変化に追従して適切なオフセットを検出でき、かつ、フィルタをかけることで、ばたつかないようなオフセットとすることができる。
When determining the offset to be applied to calculate the rotation amount, the offset control unit may smooth the previously calculated offset and the latest calculated offset before use.
By applying a value obtained by adding a weighted value to the previous offset to the latest offset and filtering (filtering) the applied offset when calculating the rotation amount, it is possible to reduce environmental temperature changes, device temperature rise during use, and the like. Even if there is a change, an appropriate offset can be detected following the change, and an offset that does not flutter can be obtained by applying a filter.

本発明によれば、MR素子を用いたエンコーダにおいて、オフセットを適切に反映させ精度を向上させることができる。   According to the present invention, in an encoder using an MR element, an offset can be appropriately reflected and accuracy can be improved.

実施形態に係る、エンコーダのハードウェア構成のイメージ図である。FIG. 2 is an image diagram of a hardware configuration of an encoder according to the embodiment. 実施形態に係る、エンコーダの機能ブロック図である。FIG. 2 is a functional block diagram of an encoder according to the embodiment. 実施形態に係る、オフセット算出手法を説明するための図である。FIG. 4 is a diagram for describing an offset calculation method according to the embodiment. 実施形態に係る、リサージュ波形と候補点の関係を示した図である。FIG. 4 is a diagram illustrating a relationship between a Lissajous waveform and candidate points according to the embodiment. 実施形態に係る、オフセットの算出工程の概要を示すフローチャートである。9 is a flowchart illustrating an outline of an offset calculation process according to the embodiment.

以下、発明を実施するための形態(以下、「実施形態」という)を、図面を参照しつつ説明する。   Hereinafter, embodiments for carrying out the invention (hereinafter, referred to as “embodiments”) will be described with reference to the drawings.

図1は、本発明の実施の形態に係るオフセット値補正が行われるエンコーダ1のハードウェア構成のイメージ図である。図2は、エンコーダ1の機能ブロックであり、主に、オフセット補正の機能に着目して示している。   FIG. 1 is an image diagram of a hardware configuration of an encoder 1 that performs offset value correction according to an embodiment of the present invention. FIG. 2 is a functional block diagram of the encoder 1 and mainly shows a function of offset correction.

エンコーダ1は、回転体の回転に連動して出力信号が変化するMR素子10と、制御部20とを有する。本実施形態では、回転体として、S極とN極の磁極が一対着磁された円盤状の磁石50が用いられている。モータ装置のフレーム等に固定され、磁石50は、モータ装置の回転出力軸等に連結された状態で使用される。   The encoder 1 has an MR element 10 whose output signal changes in conjunction with the rotation of the rotating body, and a control unit 20. In the present embodiment, a disk-shaped magnet 50 in which a pair of S poles and N poles are magnetized in a pair is used as the rotating body. The magnet 50 is used while being fixed to a frame or the like of the motor device and connected to a rotation output shaft or the like of the motor device.

エンコーダ1では、MR素子10から制御部20に向けて、互いにπ/2の位相差を有するCos信号(A相信号)とSin信号(B相信号)とが出力される。より具体的には、MR素子10は、磁石50の位相に対して、互いに90°の位相差を有するA相の磁気抵抗パターンとB相の磁気抵抗パターンとを備え、磁石50の回転に対応してA相信号とB相信号を出力する。   In the encoder 1, a Cos signal (A-phase signal) and a Sin signal (B-phase signal) having a phase difference of π / 2 are output from the MR element 10 to the control unit 20. More specifically, the MR element 10 includes an A-phase magnetoresistive pattern and a B-phase magnetoresistive pattern having a phase difference of 90 ° with respect to the phase of the magnet 50, and corresponds to the rotation of the magnet 50. To output an A-phase signal and a B-phase signal.

なお、図示では、A相センサおよびB相センサの一構成要素となるMR素子10しか図示していないが、その他、例えば、整流回路、ローパスフィルタ、差動増幅アンプ、MR素子10に励磁電流を供給するドライバなどの各種電気要素によって、A相センサおよびB相センサの出力が算出処理される。   Although only the MR element 10 which is a component of the A-phase sensor and the B-phase sensor is shown in the drawing, other than that, for example, an exciting current is supplied to a rectifier circuit, a low-pass filter, a differential amplifier, and the MR element 10. The output of the A-phase sensor and the B-phase sensor is calculated by various electric elements such as a driver to be supplied.

制御部20は、例えば、MPU、ROM、RAM等の各種電気要素によって形成されており、機能的にはA/D変換部21(以下、「ADC21」と表記する。)と、角度算出部22と、オフセット制御部23とを備える。   The control unit 20 is formed of various electric elements such as an MPU, a ROM, and a RAM, and functionally includes an A / D conversion unit 21 (hereinafter, referred to as “ADC 21”) and an angle calculation unit 22. And an offset control unit 23.

ADC21は、MR素子10から出力されたアナログ信号を取得しデジタル化し、角度算出部22及びオフセット制御部23へ出力する。角度算出部22は、MR素子10からの出力(A相信号、B相信号)をもとに磁石50の角度位置を算出する。   The ADC 21 acquires the analog signal output from the MR element 10, digitizes the analog signal, and outputs the digitized signal to the angle calculator 22 and the offset controller 23. The angle calculator 22 calculates the angular position of the magnet 50 based on the outputs (A-phase signal and B-phase signal) from the MR element 10.

オフセット制御部23は、リサージュ波形を算出する機能及びオフセット補正機能を有している。角度算出部22は、磁石50の角度位置の算出の際に、オフセット制御部23からオフセットを取得し、適正な角度位置の算出を行う。   The offset control unit 23 has a function of calculating a Lissajous waveform and an offset correction function. When calculating the angular position of the magnet 50, the angle calculating unit 22 obtains an offset from the offset control unit 23 and calculates an appropriate angular position.

オフセット制御部23は、オフセット算出部24と、オフセットデータ記憶部25と、歪補正用データ記憶部26とを備える。   The offset control unit 23 includes an offset calculation unit 24, an offset data storage unit 25, and a distortion correction data storage unit 26.

オフセット算出部24は、A相信号とB相信号のオフセットを算出し、角度算出部22の角度位置の算出処理へ提供する。具体的なオフセットの算出手順については図4及び図5を参照して後述するが、簡単には、円形のリサージュ波形を等分割した所定の候補点から連続する3点を選択し、さらに連続する2点間の垂直二等分線を2つ求め、その交点をオフセットとして算出する。エンコーダ1の起動後最初のオフセット算出処理にて得られた値は、そのまま角度算出部22で使用される。以降に得られたオフセットについては、最初のオフセットと平滑化した上で角度算出部22で使用される。これによって、起動時は極力早く最新のオフセットを反映させ、以降は、ばたつかないオフセットを用いることができる。なお、どのような重み付けをして平滑化するかは、目的に応じて適宜選択されうる。   The offset calculation unit 24 calculates the offset between the A-phase signal and the B-phase signal, and provides the result to the angle position calculation processing of the angle calculation unit 22. A specific procedure for calculating the offset will be described later with reference to FIGS. 4 and 5. However, in brief, three consecutive points are selected from predetermined candidate points obtained by equally dividing the circular Lissajous waveform, and further continuous points are selected. Two perpendicular bisectors between two points are obtained, and the intersection is calculated as an offset. The value obtained in the first offset calculation process after the activation of the encoder 1 is used by the angle calculation unit 22 as it is. The offset obtained thereafter is used by the angle calculation unit 22 after being smoothed with the first offset. As a result, the latest offset can be reflected as soon as possible at the time of startup, and thereafter, an offset that does not flutter can be used. In addition, what kind of weighting and smoothing can be appropriately selected depending on the purpose.

オフセットデータ記憶部25は、オフセットのデータを保持する。ここでは、出荷時のオフセットの値と共に、実際に使用状態となった後に算出されたオフセットの値が記憶され、上述の平滑化処理に用いられる。   The offset data storage unit 25 holds offset data. Here, the value of the offset calculated after the actual use state is stored together with the value of the offset at the time of shipment, and used for the above-described smoothing process.

歪補正用データ記憶部26は、リサージュ波形において歪みが生じている場合に、歪み補正を行うためのデータを保持する。MR素子10及びそれに付随するアンプ、ドライバ等により、ADC21が取得するアナログ信号(A相信号及びB相信号)に歪みが生じることがある。また、歪みの原因に、磁石50とMR素子10との形状上の問題、すなわち幾何学的要因もある。磁石50は、円盤状に形成され、各極が半円状となって、半円状の領域から半円状の領域に磁束線が、完全に一様ではなく丸みを持って分布される。また、MR素子10に形成されているブリッジ回路の各セグメントに印加される磁束が、場所により少しずつ異なる。これらによりリサージュ波形に歪が生じる。   The distortion correction data storage unit 26 holds data for performing distortion correction when distortion occurs in the Lissajous waveform. The analog signal (A-phase signal and B-phase signal) acquired by the ADC 21 may be distorted by the MR element 10 and an amplifier, a driver, and the like attached thereto. The distortion is caused by a problem in the shape of the magnet 50 and the MR element 10, that is, a geometrical factor. The magnet 50 is formed in a disk shape, and each pole has a semi-circular shape, so that the magnetic flux lines are distributed from semi-circular region to semi-circular region with not being completely uniform but having roundness. Further, the magnetic flux applied to each segment of the bridge circuit formed on the MR element 10 slightly differs depending on the location. These cause distortion in the Lissajous waveform.

その様な歪みは、一般には、温度特性によって一様に変化することから、予め正規化するための補正値を記憶しておき、リサージュ波形を作るときに適用することで、歪みの無い(または非常に小さい)円形を得ることができる。なお、本実施形態では、後述のように、オフセットを算出する場合に、予め所定の候補点を決めるため、実際に保持するデータ量及び歪み補正に必要な計算量は小さくてすむ。   Since such distortion generally varies uniformly depending on temperature characteristics, a correction value for normalization is stored in advance and applied when a Lissajous waveform is created, so that distortion is eliminated (or (Very small) circles can be obtained. In the present embodiment, as will be described later, when calculating an offset, a predetermined candidate point is determined in advance, so that the amount of data to be actually held and the amount of calculation necessary for distortion correction are small.

図3は、本実施形態において適用するオフセット算出手法を説明するための図である。ここでは、円形のリサージュ波形上において均等に分割された候補点から連続する3点を用いて、それら連続する3点から形成される2つの辺の垂直二等分線の交点よりオフセットを算出する。   FIG. 3 is a diagram for explaining an offset calculation method applied in the present embodiment. Here, three consecutive points from the equally divided candidate points on the circular Lissajous waveform are used, and an offset is calculated from the intersection of the perpendicular bisectors of two sides formed from the three consecutive points. .

ここで、連続する3点として、第1点P1(X1、Y1)、第2点P2(X2、Y2)、第3点P3(X3、Y3)とする。第1点P1(X1、Y1)と第2点P2(X2、Y2)の第1交点Pm1(Xm1、Ym1)、第2点P2(X2、Y2)と第3点P3(X3、Y3)の第2交点Pm2(Xm2、Ym2)は次式で得られる。
Xm1=(X1+X2)/2
Ym1=(Y1+Y2)/2
Xm2=(X2+X3)/2
Ym2=(Y2+Y3)/2
Here, the three consecutive points are a first point P1 (X1, Y1), a second point P2 (X2, Y2), and a third point P3 (X3, Y3). A first intersection Pm1 (Xm1, Ym1) between the first point P1 (X1, Y1) and a second point P2 (X2, Y2), and a second intersection P2 (X2, Y2) and a third point P3 (X3, Y3). The second intersection Pm2 (Xm2, Ym2) is obtained by the following equation.
Xm1 = (X1 + X2) / 2
Ym1 = (Y1 + Y2) / 2
Xm2 = (X2 + X3) / 2
Ym2 = (Y2 + Y3) / 2

第1交点Pm1(Xm1、Ym1)の垂直二等分線L1と、第2交点Pm2(Xm2、Ym2)の垂直二等分線L2との交点P0(X0、Y0)は、次式で得られる。この交点P0(X0、Y0)の値が新たに算出されたオフセットとなる。
X0=(Nr1×Ys2−Nr2×Ys1)/(Nr1−Nr2)
Y0=(Ys2−Ys1)/(Nr1−Nr2)
ただし、Nr1(L1の傾き)、Nr2(L2の傾き)、Ys1、Ys2は以下の式とする。
Nr1=−(X2−X1)/(Y2−Y1)
Nr2=−(X3−X2)/(Y3−Y2)
Ys1=Ym1−Nr1×Xm1
Ys2=Ym2−Nr2×Xm2
The intersection P0 (X0, Y0) of the perpendicular bisector L1 of the first intersection Pm1 (Xm1, Ym1) and the perpendicular bisector L2 of the second intersection Pm2 (Xm2, Ym2) is obtained by the following equation. . The value of this intersection P0 (X0, Y0) is the newly calculated offset.
X0 = (Nr1 × Ys2-Nr2 × Ys1) / (Nr1-Nr2)
Y0 = (Ys2-Ys1) / (Nr1-Nr2)
Here, Nr1 (slope of L1), Nr2 (slope of L2), Ys1 and Ys2 are represented by the following equations.
Nr1 =-(X2-X1) / (Y2-Y1)
Nr2 =-(X3-X2) / (Y3-Y2)
Ys1 = Ym1-Nr1 × Xm1
Ys2 = Ym2-Nr2 × Xm2

図4は、リサージュ波形と候補点の関係を示した図であって、図4(a)は4等分した例、図4(b)は図4(a)を更に等分割し8等分した例を示している。   4A and 4B are diagrams showing the relationship between the Lissajous waveform and the candidate points. FIG. 4A shows an example in which the waveform is divided into four equal parts, and FIG. 4B shows a case in which FIG. An example is shown.

図4(a)に示す様に、リサージュ波形を4等分し、かつ、X軸及びY軸との4つの交点(P1〜P4)が候補点となる場合を想定する。ここでは、図3と同様に、第1〜第3点P1〜P3を用いて、オフセットとなる交点P0を算出している。一般に、リサージュ波形と軸上(X軸上やY軸上)との交点では、歪みが少ないため、得られる交点P0(X0、Y0)のオフセットとしての値が非常に正確になる。別の観点では、歪み補正を行わなくとも、十分な精度でオフセットを得ることができる。また、円形のリサージュ波形では、中心角180度、すなわち、磁石50の回転では90度(180度/2)でオフセットが検出可能となる。すなわち、素早いオフセットの算出処理が可能となる。   As shown in FIG. 4A, it is assumed that the Lissajous waveform is divided into four equal parts, and four intersections (P1 to P4) with the X axis and the Y axis are candidate points. Here, similarly to FIG. 3, the intersection P0 serving as an offset is calculated using the first to third points P1 to P3. In general, at the intersection between the Lissajous waveform and the axis (on the X-axis or the Y-axis), the value of the offset of the obtained intersection P0 (X0, Y0) becomes very accurate because distortion is small. From another viewpoint, an offset can be obtained with sufficient accuracy without performing distortion correction. In the case of a circular Lissajous waveform, an offset can be detected at a central angle of 180 degrees, that is, 90 degrees (180 degrees / 2) when the magnet 50 is rotated. That is, a quick offset calculation process can be performed.

また、図4(b)では、8等分された位置の8つの候補点(P1〜P8)のうち、第3点P3〜第5点P5を用いて、オフセットとなる交点P0を算出している。8等分した候補点から連続する3点を選択した場合、必ずX軸又はY軸上の点が1点又は2点含まれる。また、軸上の点以外の点は、原点に対して±45度の傾きを持っており、A相信号とB相信号との交点に対応する。この位置は、歪が大きいので歪を補正した値を使用する。その結果、得られる交点P0(X0、Y0)のオフセットとしての値が非常に正確になる。この場合、円形のリサージュ波形では、中心角90度、すなわち、磁石50の回転では45度でオフセットが検出可能となる。したがって、磁石50が僅かにしか回転しないような装置に取り付けられた場合でも、オフセットを適切に算出でき、エンコーダ1の検出精度を向上させることができる。   In FIG. 4B, among the eight candidate points (P1 to P8) at the eight equally-divided positions, the intersection P0 serving as an offset is calculated using the third point P3 to the fifth point P5. I have. When three consecutive points are selected from the eight equally-divided candidate points, one or two points on the X-axis or the Y-axis are always included. Points other than points on the axis have an inclination of ± 45 degrees with respect to the origin, and correspond to intersections of the A-phase signal and the B-phase signal. At this position, since the distortion is large, a value corrected for the distortion is used. As a result, the resulting value of the offset of the intersection point P0 (X0, Y0) becomes very accurate. In this case, in the circular Lissajous waveform, the offset can be detected at a central angle of 90 degrees, that is, 45 degrees when the magnet 50 is rotated. Therefore, even when the magnet 50 is attached to a device that rotates only slightly, the offset can be appropriately calculated, and the detection accuracy of the encoder 1 can be improved.

つぎに、図5のフローチャートを用いて、オフセットの算出工程の概要を説明する。制御部20は、MR素子10から出力されたA相信号とB相信号を取得する(S10)。取得されたA相信号とB相信号は角度算出部22とオフセット制御部23に出力される。   Next, the outline of the offset calculation process will be described with reference to the flowchart of FIG. The control unit 20 acquires the A-phase signal and the B-phase signal output from the MR element 10 (S10). The acquired A-phase signal and B-phase signal are output to the angle calculator 22 and the offset controller 23.

オフセット算出部24は、A相信号とB相信号をもとに、リサージュ波形を取得する(S12)。このとき、必要に応じて、歪補正用データ記憶部26を参照して上述した歪み補正を施す。つづいて、オフセット算出部24は、所定の候補点から連続する3点を特定し(S14)、連続する2点を結び得られる辺の垂直二等分線を2つ求め、それらの交点を算出し(S16)、最新のオフセットを決定する(S18)。   The offset calculation unit 24 acquires a Lissajous waveform based on the A-phase signal and the B-phase signal (S12). At this time, the above-described distortion correction is performed with reference to the distortion correction data storage unit 26 as necessary. Subsequently, the offset calculation unit 24 specifies three consecutive points from the predetermined candidate points (S14), obtains two perpendicular bisectors of a side that can connect the two consecutive points, and calculates an intersection thereof. Then, the latest offset is determined (S18).

最新のオフセットを決定すると、オフセット算出部24は、エンコーダ1を起動した後最初のオフセットの算出であったか否かを判断する(S20)。   When the latest offset is determined, the offset calculator 24 determines whether or not the first offset has been calculated since the encoder 1 was started (S20).

最初のオフセットの算出であれば(S20のY)、オフセット算出部24は、その最新のオフセットを角度算出部22へ通知する(S22)。通知後、算出したオフセットがオフセットデータ記憶部25に保存される。   If the first offset is to be calculated (Y in S20), the offset calculator 24 notifies the angle calculator 22 of the latest offset (S22). After the notification, the calculated offset is stored in the offset data storage unit 25.

最初のオフセットの算出で無ければ(S20のN)、オフセット算出部24は、その最新のオフセットとオフセットデータ記憶部25に記録されている過去に算出されたオフセットとを用いて平滑化処理し(S26)、平滑化したオフセットを角度算出部22に通知する(S28)。通知後、算出したオフセットがオフセットデータ記憶部25に保存される(S24)。   If the first offset is not calculated (N in S20), the offset calculating unit 24 performs a smoothing process using the latest offset and the previously calculated offset recorded in the offset data storage unit 25 ( S26), and notifies the angle calculation unit 22 of the smoothed offset (S28). After the notification, the calculated offset is stored in the offset data storage unit 25 (S24).

本発明を、実施の形態をもとに説明したが、この実施の形態は例示であり、それらの各構成要素の組み合わせ等にいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。   Although the present invention has been described based on the embodiments, this embodiment is an exemplification, and various modifications can be made to combinations of the respective components, and such modifications are also included in the present invention. It is well understood by those skilled in the art that they are in the range.

1 エンコーダ
10 MR素子
20 制御部
21 ADC(A/D変換部)
22 角度算出部
23 オフセット制御部
24 オフセット算出部
25 オフセットデータ記憶部
26 歪補正用データ記憶部
50 磁石
1 encoder 10 MR element 20 control unit 21 ADC (A / D conversion unit)
22 Angle calculation unit 23 Offset control unit 24 Offset calculation unit 25 Offset data storage unit 26 Strain correction data storage unit 50 Magnet

Claims (6)

NSの2極に着磁された磁石と、
前記磁石に対向するように配置され、π/2の位相差を持つA相信号とB相信号を出力する磁気センサと、
前記A相信号と前記B相信号にもとづいて、回転量を算出する回転量算出部と、
前記A相信号と前記B相信号にもとづいて、リサージュ波形を直交座標系上に形成し、前記リサージュ波形をもとに、前記A相信号と前記B相信号のオフセットを算出し、前記回転量算出部において前記回転量を算出する際の前記A相信号及び前記B相信号に対して当該オフセットの分だけ補正を行わせるオフセット制御部と、
を備え、
前記オフセット制御部は、前記リサージュ波形が呈する円周上において、所定の数に均等に分割される候補点のうち、連続する3点から形成される2つの辺の垂直二等分線の交点よりオフセットを検出する動作を異なる時点で複数回行い、
前記回転量を算出するために適用する前記オフセットを決定する際に、最初の3点で検出したオフセットはそのまま使用し、以後に順次検出したオフセットは重み付けして前記最初の3点で検出したオフセットに反映させる
ことを特徴とするエンコーダ。
A magnet magnetized to two poles of NS,
A magnetic sensor disposed to face the magnet and outputting an A-phase signal and a B-phase signal having a phase difference of π / 2;
A rotation amount calculation unit that calculates a rotation amount based on the A-phase signal and the B-phase signal;
A Lissajous waveform is formed on a rectangular coordinate system based on the A-phase signal and the B-phase signal, an offset between the A-phase signal and the B-phase signal is calculated based on the Lissajous waveform, and the rotation amount is calculated. An offset control unit that corrects the A-phase signal and the B-phase signal when calculating the rotation amount in the calculation unit by the offset.
With
The offset control unit is configured to determine, from among the candidate points equally divided into a predetermined number on the circumference of the Lissajous waveform, the intersection of the perpendicular bisectors of two sides formed from three consecutive points. Perform the operation of detecting the offset several times at different times,
When determining the offset to be applied to calculate the rotation amount, the offset detected at the first three points is used as it is, and the offsets sequentially detected thereafter are weighted and the offset detected at the first three points is weighted. An encoder characterized in that it is reflected in the encoder.
前記オフセット制御部は、前記リサージュ波形が呈する円形に歪がある場合、理想円となるように補正をして前記連続する3点から前記オフセットを算出することを特徴とする請求項1に記載のエンコーダ。   2. The offset control unit according to claim 1, wherein, when there is a distortion in a circle presented by the Lissajous waveform, the offset control unit calculates the offset from the three consecutive points by performing correction so as to be an ideal circle. 3. Encoder. 前記連続する3点は、前記直交座標系のいずれかの座標軸と前記リサージュ波形との交点を少なくとも1つ含むことを特徴とする請求項1または2に記載のエンコーダ。   The encoder according to claim 1, wherein the three consecutive points include at least one intersection point between any one of the coordinate axes of the rectangular coordinate system and the Lissajous waveform. 前記連続する3点は、前記直交座標系のいずれかの座標軸と前記リサージュ波形との交点であることを特徴とする請求項1から3までのいずれかに記載のエンコーダ。   The encoder according to any one of claims 1 to 3, wherein the three consecutive points are intersections between any of the coordinate axes of the rectangular coordinate system and the Lissajous waveform. 前記座標軸上との交点の検出は、前記A相信号または前記B相信号のいずれか一方がゼロになったときの値と、他方の値との組み合わせから算出することを特徴とする請求項3または4に記載のエンコーダ。   4. The method according to claim 3, wherein the detection of the intersection with the coordinate axis is performed based on a combination of a value obtained when one of the A-phase signal and the B-phase signal becomes zero and the other value. Or the encoder according to 4. 前記オフセット制御部は、前記回転量を算出するために適用する前記オフセットを決定する際に、前回算出されたオフセットと最新に算出されたオフセットとを平滑化して用いることを特徴とする請求項1から5までのいずれかに記載のエンコーダ。   2. The offset control unit according to claim 1, wherein when determining the offset to be applied to calculate the rotation amount, the offset control unit smoothes and uses a previously calculated offset and a latest calculated offset. 6. The encoder according to any one of items 1 to 5.
JP2016008929A 2016-01-20 2016-01-20 Encoder Active JP6668082B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2016008929A JP6668082B2 (en) 2016-01-20 2016-01-20 Encoder
TW106100789A TWI714699B (en) 2016-01-20 2017-01-11 Encoder
KR1020170008402A KR20170087415A (en) 2016-01-20 2017-01-18 Encoder
CN201710043699.3A CN106989762B (en) 2016-01-20 2017-01-19 Encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016008929A JP6668082B2 (en) 2016-01-20 2016-01-20 Encoder

Publications (2)

Publication Number Publication Date
JP2017129452A JP2017129452A (en) 2017-07-27
JP6668082B2 true JP6668082B2 (en) 2020-03-18

Family

ID=59394669

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016008929A Active JP6668082B2 (en) 2016-01-20 2016-01-20 Encoder

Country Status (4)

Country Link
JP (1) JP6668082B2 (en)
KR (1) KR20170087415A (en)
CN (1) CN106989762B (en)
TW (1) TWI714699B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7219662B2 (en) * 2018-04-13 2023-02-08 旭化成エレクトロニクス株式会社 ROTATING ANGLE DETECTION DEVICE, ROTATING ANGLE DETECTION METHOD AND PROGRAM
CN109579880B (en) * 2018-12-26 2021-04-20 上海英威腾工业技术有限公司 Magnetic encoder with adaptive compensation function
CN112556734B (en) * 2020-11-30 2021-09-28 中国科学院长春光学精密机械与物理研究所 Moire fringe subdivision method for photoelectric encoder
KR102655067B1 (en) * 2021-12-16 2024-04-05 현대오토에버 주식회사 Signal processing apparatus

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04136714A (en) * 1990-09-28 1992-05-11 Okuma Mach Works Ltd Encoder
CA2453883A1 (en) * 2000-06-16 2001-12-16 Ichiro Saito Ink jet recording apparatus utilizing solid semiconductor element
JP4202098B2 (en) * 2001-11-21 2008-12-24 株式会社ミツトヨ Phase difference error detection device and interpolation error estimation device using the same
JP4222892B2 (en) * 2003-07-02 2009-02-12 日本電産サンキョー株式会社 Encoder with error correction function
JP2006003307A (en) * 2004-06-21 2006-01-05 Mitsutoyo Corp Encoder, and signal regulation method therefor
JP4713116B2 (en) * 2004-09-21 2011-06-29 株式会社ミツトヨ Encoder output signal correction apparatus and method
JP4768248B2 (en) * 2004-10-13 2011-09-07 株式会社ミツトヨ Encoder output signal correction apparatus and method
JP4227132B2 (en) * 2005-10-07 2009-02-18 三菱電機株式会社 Resolver
JP4893021B2 (en) * 2006-02-21 2012-03-07 ヤマハ株式会社 Magnetic sensor control device, magnetic measurement device, offset setting method and program
JP2009162673A (en) * 2008-01-09 2009-07-23 Canon Inc Position detector and method
CN102224394B (en) * 2008-11-20 2015-04-08 旭化成微电子株式会社 Physical quantity measurement device and physical quantity measurement method
JP2014025871A (en) * 2012-07-30 2014-02-06 Mitsutoyo Corp Encoder output signal correction apparatus
JP5786067B2 (en) * 2013-07-08 2015-09-30 Thk株式会社 Magnetic encoder and sensor device
US10132654B2 (en) * 2013-07-10 2018-11-20 Infineon Technologies Ag Error compensation in an angle sensor
JP6322052B2 (en) * 2013-10-28 2018-05-09 日本電産サンキョー株式会社 Sensor device
JP2015225023A (en) * 2014-05-29 2015-12-14 日本電産サンキョー株式会社 Encoder

Also Published As

Publication number Publication date
KR20170087415A (en) 2017-07-28
TWI714699B (en) 2021-01-01
JP2017129452A (en) 2017-07-27
CN106989762B (en) 2019-07-05
CN106989762A (en) 2017-07-28
TW201727199A (en) 2017-08-01

Similar Documents

Publication Publication Date Title
US11397098B2 (en) Method for detecting errors in a rotating position sensor system having sine and cosine signals
JP6668082B2 (en) Encoder
WO2011024730A1 (en) Rotation angle detection device
JP6656958B2 (en) Rotary encoder and method for correcting angle of rotary encoder
JP7070556B2 (en) Position detection device and position detection method
US10876862B2 (en) Rotary encoder
JP4858837B2 (en) Rotation angle detector
JP5249158B2 (en) Encoder offset correction method
JP7381707B2 (en) Detection device, method, system, calculation device, and calculation method
WO2018092416A1 (en) Rotary encoder signal processing device and rotary encoder signal processing method
JP2015219096A (en) Multi-turn encoder
JPH05231879A (en) Correcting method for detecting position
CN111089610B (en) Signal processing method and device of encoder and related components
JP2010078340A (en) Method for compensating error of encoder
CN113661375B (en) Angle detecting device
JP2018132357A (en) Rotary encoder
US11181398B2 (en) Rotation angle detection device
JP2009244022A (en) Phase detection circuit
JP2012137415A (en) Rotation angle detecting device
JP2021047033A (en) Encoder and encoder control method
JP2018132359A (en) Rotary encoder
JP2024155430A (en) Rotation Angle Detection Device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181207

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191126

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200109

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200204

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200226

R150 Certificate of patent or registration of utility model

Ref document number: 6668082

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150