TW201727199A - Encoder appropriately reflecting an offset and improving accuracy in an encoder using an MR element - Google Patents

Encoder appropriately reflecting an offset and improving accuracy in an encoder using an MR element Download PDF

Info

Publication number
TW201727199A
TW201727199A TW106100789A TW106100789A TW201727199A TW 201727199 A TW201727199 A TW 201727199A TW 106100789 A TW106100789 A TW 106100789A TW 106100789 A TW106100789 A TW 106100789A TW 201727199 A TW201727199 A TW 201727199A
Authority
TW
Taiwan
Prior art keywords
offset
encoder
phase signal
points
intersection
Prior art date
Application number
TW106100789A
Other languages
Chinese (zh)
Other versions
TWI714699B (en
Inventor
Hirokatsu Okumura
Yutaka Saito
Hitoshi Joko
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
Publication of TW201727199A publication Critical patent/TW201727199A/en
Application granted granted Critical
Publication of TWI714699B publication Critical patent/TWI714699B/en

Links

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)

Abstract

This invention provides a technique for appropriately reflecting an offset in order to improve accuracy in an encoder using an MR element. An encoder includes an MR element 10 and a control unit 20. The control unit 20 includes an ADC 21, an angle calculation unit 22, and an offset control unit 23. The angle calculation unit 22 acquires the A-phase signal and the B-phase signal from the MR element 10 via the ADC 21, and calculates the angular position of a magnet 50. The offset control unit 23 calculates a Lissajous waveform according to the A-phase signal and the B-phase signal, and also calculates, by using three consecutive points from predetermined candidate points obtained by equally dividing a circular Lissajous waveform, two vertical dividing lines between two points, wherein the intersection is calculated as an offset.

Description

編碼器Encoder

本發明係關於一種編碼器,例如係關於一種算出基於具有π/2之相位差之A相信號及B相信號之磁感測器輸出獲得之旋轉角之磁式編碼器。The present invention relates to an encoder, for example, to a magnetic encoder for calculating a rotation angle obtained based on a magnetic sensor output of an A-phase signal and a B-phase signal having a phase difference of π/2.

作為檢測被檢測物之位移量或位移之絕對值之裝置,已知有磁式編碼器。例如,作為磁式編碼器,存在如下者,即,使被磁化成NS之2極之圓盤狀之磁鐵旋轉,利用MR(Magnetic Random,磁阻)元件檢測其磁場變化,將所獲得之Sin信號及Cos信號進行AD(Analog/Digital,類比/數位)轉換並擷取至微電腦,檢測出旋轉位置之絕對值。 於此種磁式編碼器中,例如若將反正切信號之相位作為參數,將Sin信號作為正交座標系統之Y座標,將Cos信號作為正交座標系統之X座標進行描繪,則獲得所謂之利薩如波形。若假定Sin信號及Cos信號為無噪音等之理想之信號,則成為無中心偏移或變形之圓形。但是,實際上存在因感測器之偏差等而為中心偏移之圓形,即自Y座標與X座標之交點至利薩如波形之圓周上之距離不同之情形。因此,於自工廠出貨編碼器時,通常預先進行偏移修正。進而,亦存在如下技術,即,考慮出貨時(初始)之偏移調整環境與實際之使用環境、尤其溫度環境不同之使用環境之不同,對偏移誤差進行調整(例如,參照專利文獻1)。 [先前技術文獻] [專利文獻] [專利文獻1]日本專利特開2010-78340號公報 然而,於藉由與Y軸之交點2點及與X軸之交點2點算出偏移之技術中,在僅活動較小之旋轉角度般之情形之應用中,偏移算出存在極限,從而謀求即使於此種狀況下亦可實現精度提高之技術。 本發明係鑒於上述狀況而完成者,目的在於在使用MR元件之編碼器中,使偏移適當反映而提高精度。As a means for detecting the absolute value of the displacement amount or displacement of the object to be detected, a magnetic encoder is known. For example, as a magnetic encoder, a disk-shaped magnet magnetized to have two poles of NS is rotated, and a magnetic field change is detected by an MR (Magnetic Random) element, and the obtained Sin is obtained. The signal and Cos signal are converted into AD (Analog/Digital) and captured to the microcomputer to detect the absolute value of the rotational position. In such a magnetic encoder, for example, if the phase of the arctangent signal is taken as a parameter, the Sin signal is used as the Y coordinate of the orthogonal coordinate system, and the Cos signal is drawn as the X coordinate of the orthogonal coordinate system, so that the so-called Lisa is like a wave. If the Sin signal and the Cos signal are assumed to be ideal signals without noise or the like, they become circular without center offset or deformation. However, there is actually a circle which is center-shifted due to the deviation of the sensor or the like, that is, a distance from the intersection of the Y coordinate and the X coordinate to the circumference of the Lissajous waveform. Therefore, when the encoder is shipped from the factory, the offset correction is usually performed in advance. Further, there is a technique in which the offset error is adjusted in consideration of the difference in the environment in which the offset adjustment environment at the time of shipment (initial) differs from the actual use environment, particularly the temperature environment (for example, refer to Patent Document 1) ). [Prior Art Document] [Patent Document 1] Japanese Patent Laid-Open Publication No. 2010-78340, however, in the technique of calculating the offset by two points of intersection with the Y-axis and two points of intersection with the X-axis, In the case where only a small rotation angle is used, there is a limit in the offset calculation, and a technique for improving the accuracy even in such a situation can be achieved. The present invention has been made in view of the above circumstances, and an object thereof is 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相信號之偏移;且上述偏移控制部係根據由在上述利薩如波形所呈現之圓周上被均等地分割為特定數量之候選點中之連續之3點形成之2個邊之垂直平分線之交點而檢測偏移。 此處,所謂具有π/2之相位差之A相信號及B相信號例如係指Sin信號及Cos信號。與如先前般藉由與Y軸之交點2點及與X軸之交點2點算出偏移之情形相比,即使為較小之旋轉角度亦可檢測偏移。因此,即使於僅活動較小之旋轉角度之應用中亦可使用。 亦可為,上述偏移控制部於利薩如波形存在變形之情形時,以成為理想圓之方式進行修正並根據上述連續之3點算出上述偏移。 即使於利薩如波形所呈現之圓形存在變形之情形時,亦可算出更加準確之偏移。 又,亦可為,上述連續之3點至少包含1個上述正交座標系統之任一座標軸與上述利薩如波形之交點。 一般而言,利薩如波形在與正交座標系統之軸(X軸、Y軸)之交點處之變形較少。因此,藉由包含與軸之交點,而於變形修正中無需對與軸之交點進行修正,能夠更快算出偏移。 亦可為,上述連續之3點為上述正交座標系統之任一座標軸與上述利薩如波形之交點。 藉由將3點均作為與軸之交點,而自利薩如波形之變形較少之位置選擇3點,因此3點均無需變形修正,因此能夠更快算出偏移。 亦可為,與上述座標軸上之交點之檢測係根據上述A相信號或上述B相信號之其中任一者變為零時之值與另一者之值之組合而算出。 可不進行最大值檢測或最小值檢測,而利用簡單之方法檢測與軸之交點,從而算出偏移。 亦可為,上述偏移控制部於決定應用於算出上述旋轉量之上述偏移時,將上次算出之偏移與最新算出之偏移平滑化後使用。 藉由於算出上述旋轉量時應用對最新偏移加上對前一個偏移進行加權所得之值而進行平滑化(濾波)所得者,即使存在環境溫度變化、使用時之裝置溫度上升等變化,亦可追隨該等變化而檢測出適當之偏移,並且藉由進行濾波,能夠形成無變動之偏移。 亦可為,上述偏移控制部於決定應用於算出上述旋轉量之上述偏移時,直接使用於最初之3點所檢測出之偏移,而以後依次檢測出之偏移則在進行加權後使其反映至於上述最初之3點所檢測出之偏移。 能夠於編碼器旋轉後立即迅速地算出偏移,且如上所述,能夠作為無變動之偏移而算出。 根據本發明,於使用MR元件之編碼器中,能夠使偏移適當地反映而提高精度。The encoder of the present invention includes: a magnet magnetized to have two poles of NS; and a magnetic sensor configured to face the magnet to output 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 an offset control unit that forms a Lissajous system on the orthogonal coordinate system based on the A-phase signal and the B-phase signal a waveform, and calculating an offset between the A-phase signal and the B-phase signal based on the Lissajous waveform; and the offset control unit is equally divided into a specific number according to a circle represented by the Lissajous waveform The offset is detected by the intersection of the vertical bisectors of the two sides formed by three consecutive points among the candidate points. Here, the A-phase signal and the B-phase signal having a phase difference of π/2 are, for example, Sin signals and Cos signals. The offset can be detected even with a small rotation angle as compared with the case where the offset is calculated by the two points of the intersection with the Y-axis and the two points of the intersection with the X-axis as before. Therefore, it can be used even in applications where only a small rotation angle is active. Alternatively, when the Lissajous waveform is deformed, the offset control unit may perform correction so as to become an ideal circle, and calculate the offset based on the three consecutive points. Even in the case where the shape of the circle represented by the Lissajous figure is deformed, a more accurate offset can be calculated. Moreover, the continuous three points may include at least one coordinate axis of one of the orthogonal coordinate systems and an intersection of the Lissajous waveform. In general, the Lissajous waveform has less distortion at the intersection with the axis of the orthogonal coordinate system (X-axis, Y-axis). Therefore, by including the intersection with the axis, it is not necessary to correct the intersection with the axis in the deformation correction, and the offset can be calculated more quickly. Alternatively, the three consecutive points may be the intersection of any coordinate axis of the orthogonal coordinate system and the Lissajous waveform. By using all three points as the intersection with the axis, three points are selected from the position where the deformation of the Lissajous waveform is small, so that no deformation correction is required for all three points, so the offset can be calculated more quickly. Alternatively, the detection of the intersection with the coordinate axis may be calculated based on a combination of the value of the A phase signal or the B phase signal becoming zero and the value of the other. The maximum value detection or the minimum value detection can be performed, and the intersection with the axis can be detected by a simple method to calculate the offset. When the offset control unit determines to apply the offset to calculate the amount of rotation, the offset control unit may use the offset calculated from the previous calculation and the latest calculated offset. When the amount of rotation is calculated, the smoothing (filtering) is performed by adding the value obtained by weighting the latest offset to the previous offset, and even if there is a change in the ambient temperature or a rise in the temperature of the device during use, Appropriate offsets can be detected following these changes, and by filtering, an unvariable offset can be formed. The offset control unit may directly use the offset detected at the first three points when determining the offset applied to calculate the rotation amount, and the offset detected in the subsequent steps may be weighted. It is reflected as the offset detected at the first three points mentioned above. The offset can be quickly calculated immediately after the encoder is rotated, and as described above, can be calculated as an offset without variation. According to the present invention, in an encoder using an MR element, the offset can be appropriately reflected to improve the accuracy.

以下,參照圖式對用於實施發明之形態(以下稱作「實施形態」)進行說明。 圖1係進行本發明之實施形態之偏移值修正之編碼器1之硬體構成之概念圖。圖2係編碼器1之功能方塊圖,主要著眼於偏移修正之功能而表示。 編碼器1具有與旋轉體之旋轉連動而輸出信號變化之MR元件10及控制部20。於本實施形態中,作為旋轉體,使用被磁化成一對S極及N極之磁極之圓盤狀之磁鐵50。固定於馬達裝置之框架等,並且磁鐵50係以連結於馬達裝置之旋轉輸出軸等之狀態被使用。 於編碼器1中,自MR元件10朝向控制部20輸出彼此具有π/2之相位差之Cos信號(A相信號)及Sin信號(B相信號)。更具體而言,MR元件10具備相對於磁鐵50之相位彼此具有90°之相位差之A相之磁阻圖案及B相之磁阻圖案,並對應於磁鐵50之旋轉而輸出A相信號及B相信號。 再者,於圖式中,雖僅圖示有成為A相感測器及B相感測器之一構成要素之MR元件10,但除此之外例如亦可藉由整流電路、低通濾波器、差動增幅放大器、向MR元件10供給勵磁電流之驅動器等各種電氣要素對A相感測器及B相感測器之輸出進行算出處理。 控制部20例如由MPU(Microprocessor Unit,微處理單元)、ROM(Read Only Memory,唯讀記憶體)、RAM(Random Access Memory,隨機存取記憶體)等各種電氣要素形成,功能上具備A/D(Analog/Digital,類比/數位)轉換部21(以下,記為「ADC21」)、角度算出部22及偏移控制部23。 ADC21獲取自MR元件10輸出之類比信號並進行數位化,並將其輸出至角度算出部22及偏移控制部23。角度算出部22基於來自MR元件10之輸出(A相信號、B相信號)算出磁鐵50之角度位置。 偏移控制部23具有算出利薩如波形之功能及偏移修正功能。角度算出部22於磁鐵50之角度位置之算出時,自偏移控制部23獲取偏移,進行適當之角度位置之算出。 偏移控制部23具備偏移算出部24、偏移資料記憶部25及變形修正用資料記憶部26。 偏移算出部24算出A相信號與B相信號之偏移,並提供至角度算出部22之角度位置之算出處理。關於具體之偏移之算出順序,將參照圖4及圖5於下文敍述,但簡單而言,自將圓形之利薩如波形等分割之候選點選擇連續之3點,進而求出2條連續之2點間之垂直平分線,將其交點算出為偏移。藉由編碼器1啟動後最初之偏移算出處理獲得之值直接被用於角度算出部22。對於以後獲得之偏移,於與最初之偏移平滑化之後被用於角度算出部22。藉此,於啟動時儘早反映最新之偏移,以後可使用無變動之偏移。再者,進行如何之加權而平滑化可根據目的而適當選擇。 偏移資料記憶部25保持偏移之資料。此處,記憶出貨時之偏移之值以及在實際使用狀態後算出之偏移之值,用於上述之平滑化處理。 變形修正用資料記憶部26保持在利薩如波形中產生變形之情形時,用於進行變形修正之資料。存在如下情形,即,因MR元件10及其附帶之放大器、驅動器等,使ADC21獲取之類比信號(A相信號及B相信號)產生變形。又,變形之原因中,亦存在磁鐵50與MR元件10之形狀上之問題,即幾何學之主要原因。磁鐵50形成為圓盤狀,各極為半圓狀,自半圓狀之區域至半圓狀之區域,磁通線並不完全一致而呈帶有圓形之分佈。又,對形成於MR元件10之橋接電路之各區段施加之磁通根據場所而稍微不同。由此,利薩如波形產生變形。 此種變形一般因溫度特性而一致變化,因此預先記憶用於正規化之修正值,並於製作利薩如波形時應用,藉此可獲得無變形(或變形非常小)之圓形。再者,於本實施形態中,如下文所述,於算出偏移之情形時,由於預先確定特定之候補點,因此實際保持之資料量及變形修正所需要之計算量較小即可。 圖3係用於說明本實施形態中應用之偏移算出方法之圖。此處,自於圓形之利薩如波形上均等地分割之候選點中使用連續之3點,根據由該等連續之3點形成之2個邊之垂直平分線之交點算出偏移。 此處,作為連續之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 通過第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 圖4係表示利薩如波形與候選點之關係之圖,圖4(a)表示將利薩如波形4等分之例,圖4(b)表示將圖4(a)進一步等分割而將利薩如波形8等分之例。 如圖4(a)所示,假定將利薩如波形4等分,且與X軸及Y軸之4個交點(P1~P4)成為候選點之情形。此處,與圖3同樣地,使用第1~第3點P1~P3算出成為偏移之交點P0。一般而言,於利薩如波形與軸上(X軸上或Y軸上)之交點處變形較少,因此所獲得之作為交點P0(X0,Y0)之偏移之值非常準確。就其他觀點而言,即使不進行變形修正,亦能以充分之精度獲得偏移。又,藉由磁鐵50旋轉一周而輸出2週期量之Sin信號及Cos信號,因此於圓形之利薩如波形中,能夠以中心角180度、即磁鐵50之旋轉為90度(180度/2)來檢測偏移,即,能夠快速地進行偏移之算出處理。 又,於圖4(b)中,使用進一步進行等分割而將利薩如波形8等分之位置之8個候選點(P1~P8)中之第3點P3~第5點P5,算出成為偏移之交點P0。於自8等分之候選點選擇連續之3點之情形時,必須包含1點或2點X軸或Y軸上之點。又,軸上之點以外之點相對於原點具有±45度之斜率,對應於A相信號與B相信號之交點。該位置由於變形較大,因此使用對變形進行了修正之值。其結果,所獲得之作為交點P0(X0,Y0)之偏移之值非常準確。於此情形時,於圓形之利薩如波形中,能夠以中心角90度、即磁鐵50之旋轉為45度來檢測偏移。因此,即使於磁鐵50安裝於僅稍微旋轉之裝置之情形時,亦可適當地算出偏移,能夠提高編碼器1之檢測精度。 繼而,使用圖5之流程圖說明偏移之算出步驟之概要。控制部20獲取自MR元件10輸出之A相信號及B相信號(S10)。所獲取之A相信號及B相信號被輸出至角度算出部22及偏移控制部23。 偏移算出部24基於A相信號及B相信號而獲取利薩如波形(S12)。此時,視需要參照變形修正用資料記憶部26而實施上述之變形修正。繼而,偏移算出部24自特定之候選點特定出連續之3點(S14),求出2條連結連續之2點而獲得之邊之垂直平分線,並算出其等之交點(S16),確定最新之偏移(S18)。 若確定最新之偏移,則偏移算出部24判斷是否為啟動編碼器1後最初之偏移之算出(S20)。 若為最初之偏移之算出(S20之Y(是)),則偏移算出部24將該最新之偏移通知給角度算出部22(S22)。通知後,將所算出之偏移保存至偏移資料記憶部25(S24)。 若非最初之偏移之算出(S20之N(否)),則偏移算出部24使用該最新之偏移與記錄於偏移資料記憶部25之過去算出之偏移進行平滑化處理(S26),將平滑化後之偏移通知給角度算出部22(S28)。通知後,將所算出之偏移保存至偏移資料記憶部25(S24)。 基於實施形態對本發明進行了說明,但該實施形態為例示,業者應當理解該等各構成要素之組合等可存在各種變化例,並且該等變化例亦屬於本發明之範圍內。Hereinafter, a mode for carrying out the invention (hereinafter referred to as "embodiment") will be described with reference to the drawings. Fig. 1 is a conceptual diagram showing the hardware configuration of an encoder 1 for performing offset value correction according to an embodiment of the present invention. Fig. 2 is a functional block diagram of the encoder 1, mainly focusing on the function of the offset correction. The encoder 1 has an MR element 10 and a control unit 20 that output a signal change in conjunction with the rotation of the rotating body. In the present embodiment, as the rotating body, a disk-shaped magnet 50 magnetized into a pair of S poles and N pole magnetic poles is used. It is fixed to a frame or the like of the motor device, and the magnet 50 is used in a state of being coupled to a rotation output shaft or the like of the motor device. In the encoder 1, a Cos signal (A-phase signal) and a Sin signal (B-phase signal) having a phase difference of π/2 from each other are output from the MR element 10 toward 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 each other in phase with the magnet 50, and outputs an A-phase signal corresponding to the rotation of the magnet 50 and Phase B signal. Further, in the drawings, only the MR element 10 which is one of the components of the A-phase sensor and the B-phase sensor is illustrated, but other than this, for example, a rectification circuit or a low-pass filter may be used. Various electrical components such as a comparator, a differential amplifier amplifier, and a driver that supplies an excitation current to the MR element 10 perform calculation processing on the outputs of the A-phase sensor and the B-phase sensor. The control unit 20 is formed of, for example, an MPU (Microprocessor Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like, and has a function A/. D (Analog/Digital) conversion unit 21 (hereinafter referred to as "ADC 21"), angle calculation unit 22, and offset control unit 23. The ADC 21 acquires the analog signal output from the MR element 10 and digitizes it, and outputs it to the angle calculation unit 22 and the offset control unit 23. The angle calculation unit 22 calculates the angular position of the magnet 50 based on the output from the MR element 10 (A phase signal, B phase signal). 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 calculation unit 22 acquires the offset from the offset control unit 23, and calculates an appropriate angular position. 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. The offset calculation unit 24 calculates the offset between the A-phase signal and the B-phase signal, and supplies the calculation to the angular position of the angle calculation unit 22. The calculation procedure of the specific offset will be described below with reference to FIGS. 4 and 5, but in short, two consecutive points are selected from the candidate points of the circular Lissajous waveform, etc., and two are obtained. The vertical bisector between two consecutive points is calculated as the offset. The value obtained by the first offset calculation process after the encoder 1 is started is directly used in the angle calculation unit 22. The offset obtained later is used for the angle calculation unit 22 after smoothing with the initial offset. In this way, the latest offset is reflected as early as possible at startup, and the unchanging offset can be used later. Furthermore, how to perform weighting and smoothing can be appropriately selected depending on the purpose. The offset data storage unit 25 holds the offset data. Here, the value of the offset at the time of shipment and the value of the offset calculated after the actual use state are used for the above-described smoothing processing. The distortion correction data storage unit 26 holds data for performing deformation correction when the Lissajous waveform is deformed. There is a case where the analog signal (A phase signal and B phase signal) acquired by the ADC 21 is deformed by the MR element 10 and its accompanying amplifier, driver, and the like. Further, among the causes of the deformation, there are also problems in the shape of the magnet 50 and the MR element 10, that is, the main cause of geometry. The magnets 50 are formed in a disk shape, each of which is extremely semicircular, and has a circular distribution from the semicircular region to the semicircular region. Further, the magnetic flux applied to each section of the bridge circuit formed in the MR element 10 is slightly different depending on the location. Thus, Lissajous deforms like a waveform. Such deformation generally varies uniformly due to temperature characteristics, so the correction value for normalization is memorized in advance and applied when a Lissajous waveform is produced, whereby a circular shape without deformation (or very small deformation) can be obtained. Further, in the present embodiment, as described below, when the offset is calculated, since the specific candidate point is determined in advance, the amount of data actually required to be held and the amount of calculation required for the distortion correction may be small. Fig. 3 is a view for explaining an offset calculation method applied in the embodiment. Here, three consecutive points are used for the candidate points equally divided on the waveform of the circular Lissajous figure, and the offset is calculated from the intersection of the vertical bisectors of the two sides formed by the three consecutive points. Here, as the three consecutive points, the first point P1 (X1, Y1), the second point P2 (X2, Y2), and the third point P3 (X3, Y3) are set. The vertical bisector connecting the first point P1 (X1, Y1) and the second point P2 (X2, Y2) and the first intersection Pm1 (Xm1, Ym1) of the side, and the second point P2 (X2, Y2) The vertical bisector with the side of the third point P3 (X3, Y3) and the second intersection Pm2 (Xm2, Ym2) of the side are obtained by the following equation. Xm1=(X1+X2)/2 Ym1=(Y1+Y2)/2 Xm2=(X2+X3)/2 Ym2=(Y2+Y3)/2 Vertical bisector passing through the first intersection Pm1(Xm1, Ym1) L1 is obtained by the following equation by the intersection P0 (X0, Y0) passing through the vertical bisector L2 of the second intersection Pm2 (Xm2, Ym2). The value of the intersection P0 (X0, Y0) becomes the newly calculated offset. X0=(Nr1×Ys2-Nr2×Ys1)/(Nr1-Nr2) Y0=(Ys2-Ys1)/(Nr1-Nr2) where Nr1 (slope of L1), Nr2 (slope of L2), Ys1, Ys2 are set For the following formula. Nr1=-(X2-X1)/(Y2-Y1) Nr2=-(X3-X2)/(Y3-Y2) Ys1=Ym1-Nr1×Xm1 Ys2=Ym2-Nr2×Xm2 Figure 4 shows the Lissajous waveform Fig. 4(a) shows an example in which the Lissajous waveform is equally divided, and Fig. 4(b) shows that Fig. 4(a) is further divided and the Lissajous waveform 8 is equally divided. example. As shown in FIG. 4(a), it is assumed that the Lissajous waveform 4 is equally divided, and four intersections (P1 to P4) of the X-axis and the Y-axis are candidates. Here, similarly to FIG. 3, the intersection point P0 which becomes an offset is computed using the 1st - 3rd point P1 - P3. In general, the deformation of the Lissajous waveform and the axis (on the X-axis or the Y-axis) is less, so the value obtained as the offset of the intersection P0 (X0, Y0) is very accurate. From other points of view, the offset can be obtained with sufficient accuracy even without deformation correction. Further, since the Sin signal and the Cos signal are output for two cycles by the rotation of the magnet 50, the circular Lissajous waveform can be rotated at a central angle of 180 degrees, that is, the rotation of the magnet 50 is 90 degrees (180 degrees / 2) The offset is detected, that is, the calculation processing of the offset can be performed quickly. Further, in FIG. 4(b), the third point P3 to the fifth point P5 among the eight candidate points (P1 to P8) at the position where the Lissajous waveform 8 is equally divided are calculated using the equal division. The intersection point of the offset P0. In the case of selecting 3 consecutive points from the candidate points of 8 equal parts, it is necessary to include points on the X-axis or the Y-axis of 1 or 2 points. Further, the point other than the point on the axis has a slope of ±45 degrees with respect to the origin, corresponding to the intersection of the A-phase signal and the B-phase signal. Since the position is large in deformation, the value corrected for the deformation is used. As a result, the obtained value of the offset as the intersection point P0 (X0, Y0) is very accurate. In this case, in the circular Lissajous waveform, the offset can be detected at a central angle of 90 degrees, that is, the rotation of the magnet 50 is 45 degrees. 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. Next, an outline of the calculation procedure of the offset will be described using the flowchart of FIG. 5. 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 calculation unit 22 and the offset control unit 23. 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 deformation correction is performed by referring to the deformation correction data storage unit 26 as necessary. Then, the offset calculation unit 24 specifies three consecutive points from the specific candidate points (S14), and obtains two vertical bisectors of the sides obtained by connecting two consecutive points, and calculates the intersection point of the points (S16). Determine the latest offset (S18). When the latest offset is determined, the offset calculation unit 24 determines whether or not the first offset is calculated after the encoder 1 is started (S20). When the first offset is calculated (Y of S20), the offset calculation unit 24 notifies the angle calculation unit 22 of the latest offset (S22). After the notification, the calculated offset is stored in the offset data storage unit 25 (S24). If the initial offset is not calculated (N of S20), the offset calculation unit 24 performs smoothing processing using the latest offset and the offset calculated in the past in the offset data storage unit 25 (S26). The smoothed offset is notified to the angle calculation unit 22 (S28). After the notification, the calculated offset is stored in the offset data storage unit 25 (S24). The present invention has been described with reference to the embodiments. However, the embodiment is exemplified, and it should be understood that the various combinations of the constituent elements and the like may be variously modified, and such modifications are also within the scope of the present invention.

1‧‧‧編碼器
10‧‧‧MR元件
20‧‧‧控制部
21‧‧‧ADC(AD轉換部)
22‧‧‧角度算出部
23‧‧‧偏移控制部
24‧‧‧偏移算出部
25‧‧‧偏移資料記憶部
26‧‧‧變形修正用資料記憶部
50‧‧‧磁鐵
L1‧‧‧垂直平分線
L2‧‧‧垂直平分線
P0‧‧‧交點
P1~P8‧‧‧候選點
Pm1‧‧‧第1交點
Pm2‧‧‧第2交點
1‧‧‧Encoder
10‧‧‧MR components
20‧‧‧Control Department
21‧‧‧ADC (AD conversion unit)
22‧‧‧Angle calculation unit
23‧‧‧Offset Control Department
24‧‧‧Offset calculation unit
25‧‧‧Offset Data Memory Department
26‧‧‧Data memory department for deformation correction
50‧‧‧ magnet
L1‧‧‧ vertical bisector
L2‧‧‧ vertical bisector
P0‧‧‧ intersection
P1~P8‧‧‧ candidate points
Pm1‧‧‧1st intersection
Pm2‧‧‧2nd intersection

圖1係實施形態之編碼器之硬體構成之概念圖。 圖2係實施形態之編碼器之功能方方塊圖。 圖3係用於說明實施形態之偏移算出方法之圖。 圖4(a)、(b)係表示實施形態之利薩如波形與候選點之關係之圖。 圖5係表示實施形態之偏移之算出步驟之概要之流程圖。Fig. 1 is a conceptual diagram showing the hardware configuration of an encoder of an embodiment. Figure 2 is a functional block diagram of the encoder of the embodiment. Fig. 3 is a view for explaining a method of calculating an offset in the embodiment. 4(a) and 4(b) are diagrams showing the relationship between the Lissajous waveform and the candidate points in the embodiment. Fig. 5 is a flow chart showing an outline of a procedure for calculating the offset of the embodiment.

10‧‧‧MR元件 10‧‧‧MR components

20‧‧‧控制部 20‧‧‧Control Department

21‧‧‧ADC(AD轉換部) 21‧‧‧ADC (AD conversion unit)

22‧‧‧角度算出部 22‧‧‧Angle calculation unit

23‧‧‧偏移控制部 23‧‧‧Offset Control Department

24‧‧‧偏移算出部 24‧‧‧Offset calculation unit

25‧‧‧偏移資料記憶部 25‧‧‧Offset Data Memory Department

26‧‧‧變形修正用資料記憶部 26‧‧‧Data memory department for deformation correction

Claims (12)

一種編碼器,其特徵在於,具備: 磁鐵,其被磁化成NS之2極; 磁感測器,其以與上述磁鐵對向之方式配置,輸出具有π/2之相位差之A相信號及B相信號; 旋轉量算出部,其基於上述A相信號及上述B相信號而算出旋轉量;及 偏移控制部,其基於上述A相信號及上述B相信號,於正交座標系統上形成利薩如波形,並基於上述利薩如波形而算出上述A相信號與上述B相信號之偏移;且 上述偏移控制部係根據由上述利薩如波形所呈現之圓周上之被均等地分割為特定數量之候選點中之連續之3點形成之2個邊之垂直平分線之交點而檢測偏移。An encoder comprising: a magnet magnetized to have two poles of NS; a magnetic sensor configured to face the magnet and output an A-phase signal having a phase difference of π/2 and a B-phase signal; a rotation amount calculation unit that calculates a rotation amount based on the A-phase signal and the B-phase signal; and an offset control unit that forms on the orthogonal coordinate system based on the A-phase signal and the B-phase signal Is a waveform, and calculates an offset between the A-phase signal and the B-phase signal based on the Lissajous waveform; and the offset control unit is equally distributed on the circumference represented by the Lissajous waveform The offset is detected by dividing the intersection of the vertical bisectors of the two sides formed by the continuous three points among the specific number of candidate points. 如請求項1之編碼器,其中上述偏移控制部於上述利薩如波形所呈現之圓形存在變形之情形時,以成為理想圓之方式進行修正並根據上述連續之3點算出上述偏移。The encoder of claim 1, wherein the offset control unit corrects the circular shape of the Lissajous waveform as a perfect circle and calculates the offset based on the consecutive three points. . 如請求項2之編碼器,其中上述連續之3點至少包含1個上述正交座標系統之任一座標軸與上述利薩如波形之交點。The encoder of claim 2, wherein said consecutive three points comprise at least one coordinate axis of one of said orthogonal coordinate systems and an intersection of said Lissajous waveform. 如請求項3之編碼器,其中上述連續之3點係上述正交座標系統之任一座標軸與上述利薩如波形之交點。The encoder of claim 3, wherein the continuous three points are the intersection of any coordinate axis of the orthogonal coordinate system and the Lissajous waveform. 如請求項3之編碼器,其中與上述座標軸上之交點之檢測係根據上述A相信號或上述B相信號之其中任一者變為零時之值與另一者之值之組合而算出。The encoder of claim 3, wherein the detection of the intersection with the coordinate axis is calculated based on a combination of the value of the A phase signal or the B phase signal becoming zero and the value of the other. 如請求項1至5中任一項之編碼器,其中上述偏移控制部於決定應用於算出上述旋轉量之上述偏移時,將上次算出之偏移與最新算出之偏移平滑化後使用。The encoder according to any one of claims 1 to 5, wherein, when the offset control unit determines to apply the offset to calculate the rotation amount, smoothing the previously calculated offset from the newly calculated offset use. 如請求項6之編碼器,其中上述偏移控制部於決定應用於算出上述旋轉量之上述偏移時,直接使用於最初之3點所檢測出之偏移,而以後依次檢測出之偏移則在進行加權後反映至於上述最初之3點所檢測出之偏移。The encoder of claim 6, wherein the offset control unit directly uses the offset detected at the first three points when determining the offset applied to calculate the rotation amount, and sequentially detects the offset later. Then, after the weighting, the offset detected by the first three points is reflected. 如請求項1之編碼器,其中上述連續之3點至少包含1個上述正交座標系統之任一座標軸與上述利薩如波形之交點。The encoder of claim 1, wherein the consecutive three points comprise at least one coordinate axis of one of the orthogonal coordinate systems and an intersection of the Lissajous waveform. 如請求項8之編碼器,其中上述連續之3點係上述正交座標系統之任一座標軸與上述利薩如波形之交點。The encoder of claim 8, wherein the continuous three points are the intersection of any coordinate axis of the orthogonal coordinate system and the Lissajous waveform. 如請求項8之編碼器,其中與上述座標軸上之交點之檢測係根據上述A相信號或上述B相信號之其中任一者變為零時之值與另一者之值之組合而算出。The encoder of claim 8, wherein the detection of the intersection with the coordinate axis is calculated based on a combination of the value of the A phase signal or the B phase signal becoming zero and the value of the other. 如請求項8至10中任一項之編碼器,其中上述偏移控制部於決定應用於算出上述旋轉量之上述偏移時,將上次算出之偏移與最新算出之偏移平滑化後使用。The encoder according to any one of claims 8 to 10, wherein, when the offset control unit determines to apply the offset to calculate the amount of rotation, smoothing the offset calculated last time and the latest calculated offset use. 如請求項11之編碼器,其中上述偏移控制部於決定應用於算出上述旋轉量之上述偏移時,直接使用於最初之3點所檢測出之偏移,而以後依次檢測出之偏移則在進行加權後反映至於上述最初之3點所檢測出之偏移。The encoder of claim 11, wherein the offset control unit directly uses the offset detected at the first three points when determining the offset applied to calculate the rotation amount, and sequentially detects the offset later. Then, after the weighting, the offset detected by the first three points is reflected.
TW106100789A 2016-01-20 2017-01-11 Encoder TWI714699B (en)

Applications Claiming Priority (2)

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

Publications (2)

Publication Number Publication Date
TW201727199A true TW201727199A (en) 2017-08-01
TWI714699B TWI714699B (en) 2021-01-01

Family

ID=59394669

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106100789A TWI714699B (en) 2016-01-20 2017-01-11 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
CA2350392A1 (en) * 2000-06-16 2001-12-16 Canon Kabushiki Kaisha 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
JP4908637B2 (en) * 2008-11-20 2012-04-04 旭化成エレクトロニクス株式会社 Physical quantity measuring apparatus and physical quantity measuring 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
TWI714699B (en) 2021-01-01
CN106989762A (en) 2017-07-28
JP6668082B2 (en) 2020-03-18
JP2017129452A (en) 2017-07-27
CN106989762B (en) 2019-07-05
KR20170087415A (en) 2017-07-28

Similar Documents

Publication Publication Date Title
JP5333863B2 (en) Rotation angle detector
TWI714699B (en) Encoder
US11397098B2 (en) Method for detecting errors in a rotating position sensor system having sine and cosine signals
US10876862B2 (en) Rotary encoder
JP6656958B2 (en) Rotary encoder and method for correcting angle of rotary encoder
JP4858837B2 (en) Rotation angle detector
JP2005351849A (en) Rotational angle detecting device and rotational angle detection method
TW201842299A (en) Rotation angle detection device and rotation angle detection method
JP7070556B2 (en) Position detection device and position detection method
CN111464107B (en) Motor, motor data analysis method, device and system
JP5249158B2 (en) Encoder offset correction method
JP2005208028A (en) Angle operation method for variable reluctance resolver, and angle operation unit for the same
CN113358008B (en) Button system and method for determining the position of a magnet of a button system
JP6877169B2 (en) Rotary encoder
JPH05231879A (en) Correcting method for detecting position
CN111089610A (en) Signal processing method and device of encoder and related components
US11181398B2 (en) Rotation angle detection device
JP2004264137A (en) Method of determining correction value for noncontact rotation angle sensor and noncontact rotation angle sensor
TWI683990B (en) Encoder
JP5193930B2 (en) Small angle detection sensor
JP2009244022A (en) Phase detection circuit
WO2024143256A1 (en) Angle detecting device
JP2018132359A (en) Rotary encoder
JP2024155430A (en) Rotation Angle Detection Device
JP2023041534A (en) magnetic encoder