JP2011064459A - Correction circuit of encoder signal - Google Patents

Correction circuit of encoder signal Download PDF

Info

Publication number
JP2011064459A
JP2011064459A JP2009212593A JP2009212593A JP2011064459A JP 2011064459 A JP2011064459 A JP 2011064459A JP 2009212593 A JP2009212593 A JP 2009212593A JP 2009212593 A JP2009212593 A JP 2009212593A JP 2011064459 A JP2011064459 A JP 2011064459A
Authority
JP
Japan
Prior art keywords
correction value
speed
signal
unit
correction
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
JP2009212593A
Other languages
Japanese (ja)
Inventor
Takahiro Masuda
隆宏 増田
Taro Kishibe
太郎 岸部
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.)
Panasonic Corp
Original Assignee
Panasonic 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 Panasonic Corp filed Critical Panasonic Corp
Priority to JP2009212593A priority Critical patent/JP2011064459A/en
Publication of JP2011064459A publication Critical patent/JP2011064459A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a correction circuit of an encoder signal, capable of outputting interpolation division data having no deviation without generating a gap in a correction value, even when update of the correction value is switched from an invalid state into a valid state, with respect to a two-phase analog sine wave including periodical fluctuations in the offset, amplitude and phase. <P>SOLUTION: An encoder for outputting position data 14a from an analog sinusoidal wave signal of orthogonal A-phase and B-phase has a constitution which includes a correction value calculating section 20; a speed determining section 21 for outputting a speed determination flag 21a; a correction value update determining section for invalidating a correction value update flag 22a, when the speed determination flag 21a has a high speed, and validating the correction value update flag when the speed determining flag has a low speed and an operation correction value 20a agrees with a signal correction value 23a; and a correction value update section 23 for updating by the operation correction value 20a, the signal correction value 23a used for signal correction in the valid case in accordance with the correction value update flag 22a, and holding the signal correction value, without updating in an invalid case. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、直交する2相のアナログ正弦波信号を内挿分割処理して高分解能を得るエンコーダにおいて、2相のアナログ正弦波信号のオフセット、振幅、位相を補正する方法に関する。   The present invention relates to a method of correcting offset, amplitude, and phase of a two-phase analog sine wave signal in an encoder that obtains high resolution by interpolating and processing orthogonal two-phase analog sine wave signals.

一般にモータ制御で使用される回転型の光学式エンコーダでは、
赤外線LEDなどの光源から出力される光をフォトダイオードなどの受光素子が受取る際に、受光素子表面のスリットパターンと回転軸に取付けられたスリット板との相対位置により透過する光量を増減させ、受光素子の光電変換によって出力される直交する2相アナログ信号をコンパレータによりパルス変換し、パルスをアップ/ダウンカウントすることで位置情報を検出している。
In rotary optical encoders generally used in motor control,
When a light receiving element such as a photodiode receives light output from a light source such as an infrared LED, the amount of transmitted light is increased or decreased depending on the relative position between the slit pattern on the surface of the light receiving element and the slit plate attached to the rotating shaft. The orthogonal two-phase analog signal output by the photoelectric conversion of the element is subjected to pulse conversion by a comparator, and the position information is detected by counting up / down the pulse.

この種のエンコーダに対し高分解能化を図る方法として、スリットのパターン間隔を微細化することでパルスカウント数を増加させる方法がある。しかしこの方法ではスリットの加工精度の限界や隣接するスリット同士での光の干渉等が発生し高分解能化は困難であった。   As a method for increasing the resolution of this type of encoder, there is a method of increasing the pulse count by reducing the slit pattern interval. However, with this method, it is difficult to achieve high resolution because of limitations in slit processing accuracy and interference of light between adjacent slits.

そこで近年ではスリット形状を変更することで受光量を調整してアナログ信号を正弦波状にし、直交する2相アナログ正弦波信号を用いた内挿分割処理でパルスカウント間を補間することで高分解能化を図る方法が主流となっている。実際の内挿分割処理では複雑な演算処理が必要なため、アナログ正弦波信号をAD変換器でディジタル信号に変換し、ディジタル信号処理により三角関数の逆変換を用いることで内挿分割データを生成する。   Therefore, in recent years, by changing the slit shape, the amount of received light is adjusted to make the analog signal a sine wave, and interpolating between the pulse counts by interpolation division processing using orthogonal two-phase analog sine wave signals makes it possible to increase the resolution. The method of aiming at is becoming mainstream. Since complex interpolation processing is required in actual interpolation division processing, an analog sine wave signal is converted into a digital signal by an AD converter, and interpolation division data is generated by using inverse conversion of a trigonometric function by digital signal processing. To do.

このとき、正確な逆変換を行うためにはディジタル信号に対してオフセット、振幅、位相の補正が必要であり、たとえば2相正弦波x,yについてx=0となる時のyの瞬時値y1,y2と、y=0となる時のxの瞬時値x1,x2と|x|=|y|となるときのxの瞬時値x3,x4を記憶する記憶手段と、x1,x2,y1,y2,x3,x4から振幅誤差、位相誤差、直流オフセットを演算する誤差演算手段と、これらの検出された各誤差を用いて2相正弦波信号を補正して理想的な2相正弦波信号を得る誤差補正手段と、このようにして得られた理想的な2相正弦波からtan逆変換によって回転角を検出する位置検出部とを設け、前記記憶手段は、移動体の移動速度が所定値以上の場合には前記y1,y2,x1,x2,x3,x4を更新することなく保持しており、前記移動体の移動速度が前記所定値以下の場合には前記y1,y2,x1,x2,x3,x4をそれぞれx=0となる時点、y=0となる時点、|x|=|y|となる時点において順次更新して記憶するようになっている誤差補正機能付き位置検出装置が提案されている。(例えば、特許文献1参照)   At this time, in order to perform accurate inverse conversion, offset, amplitude, and phase correction is necessary for the digital signal. For example, the instantaneous value y1 of y when x = 0 for the two-phase sine waves x and y. , Y2 and storage means for storing the instantaneous values x1, x2 of x when y = 0 and the instantaneous values x3, x4 of x when | x | = | y |, and x1, x2, y1, An error calculating means for calculating an amplitude error, a phase error, and a DC offset from y2, x3, and x4, and correcting the two-phase sine wave signal using these detected errors to obtain an ideal two-phase sine wave signal. An error correction means for obtaining, and a position detection unit for detecting the rotation angle by tan inverse transformation from the ideal two-phase sine wave obtained in this way, and the storage means is configured such that the moving speed of the moving body is a predetermined value. In the above case, y1, y2, x1, x2, x3, x Is maintained without updating, and when the moving speed of the moving body is equal to or lower than the predetermined value, y1, y2, x1, x2, x3, and x4 are respectively set to x = 0, y = 0 and At this time, a position detecting device with an error correction function is proposed which is updated and stored sequentially at a time when | x | = | y |. (For example, see Patent Document 1)

特開平5−256638号公報JP-A-5-256638

特許文献1の方法はAD変換器のサンプル周波数や演算周期の制限による瞬時値の誤差を低減するには有効である。しかし、通常AD変換器に入力される直交する2相アナログ正弦波信号にはスリット板を取り付ける際の偏芯や傾き等によりオフセット・振幅・位相
に周期的な変動が含まれているため、瞬時値の更新が停止されている(無効)状態から更新を開始(有効)するときにギャップが発生する。さらに瞬時値から演算される補正値にも同様のギャップが含まれるため補正された信号から生成される内挿分割データ(位置データ)がステップ状にずれる。例えばモータ制御に使用するエンコーダの位置データにこのようなステップ状のずれが発生すると、検出速度の変動につながりトルクが脈動するため異音の原因となる。
The method of Patent Document 1 is effective in reducing the error of the instantaneous value due to the limitation of the sampling frequency of the AD converter and the calculation cycle. However, the orthogonal two-phase analog sine wave signal normally input to the AD converter contains periodic fluctuations in offset, amplitude, and phase due to eccentricity and inclination when the slit plate is attached. A gap occurs when updating is started (validated) from a state where updating of values is stopped (invalid). Further, since the same gap is included in the correction value calculated from the instantaneous value, the interpolation division data (position data) generated from the corrected signal is shifted stepwise. For example, if such a step-like deviation occurs in the position data of an encoder used for motor control, the detection speed varies and torque pulsates, causing abnormal noise.

上記課題を解決するために本発明は、直交するA相とB相のアナログ正弦波信号(A0とB0)をAD変換してA1とB1を出力するAD変換部と、A1とB1を正規化された直交位相差のディジタル正弦波信号A2とB2へと補正する信号補正部と、A2とB2から内挿分割データに変換する内挿変換部と、A0とB0と原点信号(Z0)をパルス変換してUP/DOWNカウントすることでパルスカウント値を出力するパルスカウント部と、前記パルスカウント値と前記内挿分割データを合成することで位置データを出力する位置データ合成部とを備えるエンコーダおいて、A1とB1を補正するための補正値を演算し演算補正値を生成する補正値演算部と、あらかじめ設定速度1および設定速度1に対してヒステリシス特性をもつ設定速度2を設定し前記位置データの時間変化量から演算した検出速度と比較して検出速度が設定速度1以上になると高速と判定し、高速時に検出速度が設定速度2以下になると低速と判定し速度判定フラグを出力する速度判定部と、前記信号補正部でA1とB1の補正に使用する信号補正値の更新を有効/無効にする補正値更新フラグを出力する補正値更新判定部と、前記補正値更新フラグに従い有効の場合は前記信号補正値を前記演算補正値で更新し、無効の場合は信号補正値を更新せず保持する補正値更新部とを備え、前記補正値更新判定部では前記速度判定フラグが高速のときに前記補正値更新フラグを無効とし、速度判定フラグが低速でさらに前記演算補正値と前記信号補正値とが一致したときに補正値更新フラグを有効にする構成としている。   In order to solve the above-described problems, the present invention provides an AD converter that AD-converts A-phase and B-phase analog sine wave signals (A0 and B0) and outputs A1 and B1, and normalizes A1 and B1. A signal correction unit that corrects the digital sine wave signals A2 and B2 having a quadrature phase difference, an interpolation conversion unit that converts A2 and B2 into interpolation division data, and pulses A0, B0, and an origin signal (Z0). An encoder comprising a pulse count unit that outputs a pulse count value by performing conversion and UP / DOWN counting, and a position data synthesis unit that outputs position data by synthesizing the pulse count value and the interpolated divided data. A correction value calculation unit for calculating a correction value for correcting A1 and B1 and generating a calculation correction value, and setting with hysteresis characteristics for the set speed 1 and the set speed 1 in advance When the detection speed is higher than the set speed 1 compared to the detection speed calculated from the time variation of the position data, the speed is determined to be high, and when the detection speed is lower than the set speed 2 at high speed, the speed is determined to be low. A speed determination unit that outputs a speed determination flag; a correction value update determination unit that outputs a correction value update flag that enables / disables updating of a signal correction value used for correction of A1 and B1 by the signal correction unit; A correction value update unit that updates the signal correction value with the calculated correction value when enabled according to a correction value update flag, and holds the signal correction value without updating when disabled, the correction value update determination unit The correction value update flag is disabled when the speed determination flag is high speed, and the correction value update flag is enabled when the speed determination flag is low speed and the calculated correction value and the signal correction value match. To have.

また、前記補正値更新フラグが有効から無効になったときの位置データをラッチ位置データとして出力する位置データラッチ部をさらに備え、前記補正値更新判定部では前記速度判定フラグが高速のときに補正値更新フラグを無効とし、速度判定フラグが低速で、さらに前記演算補正値と前記信号補正値とが一致した場合あるいは前記位置データと前記ラッチ位置データとが一致した場に補正値更新フラグを有効にする構成としてもよい。   The correction value update determination unit further includes a position data latch unit that outputs position data when the correction value update flag becomes invalid from valid to invalid, and the correction value update determination unit corrects when the speed determination flag is high. The value update flag is disabled, the speed determination flag is low, and the correction value update flag is enabled when the calculation correction value and the signal correction value match or when the position data and the latch position data match. It is good also as composition to make.

本発明の請求項1に記載のエンコーダ信号の補正回路によれば、オフセット・振幅・位相に周期的な変動が含まれる2相アナログ正弦波に対して補正値の更新を無効から有効に切替える場合でも、補正値のギャップは発生せずにずれのない滑らかな内挿分割データ(位置データ)を出力する信号補正をすることができ、スリット板の偏芯や傾き等に影響されないエンコーダ信号の補正回路を提供することができる。   According to the encoder signal correction circuit of the first aspect of the present invention, the correction value update is switched from invalid to valid for a two-phase analog sine wave in which the offset, amplitude, and phase include periodic fluctuations. However, the correction of the encoder signal that is not affected by the eccentricity or inclination of the slit plate can be performed without generating a gap in the correction value, and can output a signal that outputs smooth interpolated division data (position data) without deviation. A circuit can be provided.

また、請求項2に記載のエンコーダ信号の補正回路によれば、更新を無効にして保持している補正値に対して周囲温度の変化等により演算している補正値が一致しなくなった場合にも、一定時間後に補正値を保持したときの位置データと現在の位置データが一致したときに更新を有効にすることで、更新が無効のまま解除されない状態を回避でき、安定した信号補正を行えるエンコーダ信号の補正回路を提供することができる。   According to the encoder signal correction circuit of the second aspect, when the correction value calculated by the change of the ambient temperature or the like does not coincide with the correction value held by invalidating the update. In addition, by enabling the update when the position data when the correction value is held after a certain time and the current position data match, it is possible to avoid a state where the update remains invalid and is not released, and stable signal correction can be performed. An encoder signal correction circuit can be provided.

本発明の実施例1におけるエンコーダの位置検出回路のブロック図1 is a block diagram of an encoder position detection circuit according to a first embodiment of the present invention. 本発明の実施例2におけるエンコーダの位置検出回路のブロック図Block diagram of an encoder position detection circuit in Embodiment 2 of the present invention

(実施例1)
以下、図1を用いて本発明によるエンコーダ信号の補正回路について説明する。
Example 1
The encoder signal correction circuit according to the present invention will be described below with reference to FIG.

図1はエンコーダの位置検出回路のブロック図であり、AD変換部10、信号補正部11、内挿変換部12、パルスカウント部13、位置データ合成部14、補正値演算部20、速度判定部21、補正値更新判定部22、補正値更新部23により構成される。   FIG. 1 is a block diagram of an encoder position detection circuit, which includes an AD conversion unit 10, a signal correction unit 11, an interpolation conversion unit 12, a pulse count unit 13, a position data synthesis unit 14, a correction value calculation unit 20, and a speed determination unit. 21, a correction value update determination unit 22, and a correction value update unit 23.

A0およびB0とZ0は図示しない光学系回路から出力されるA相およびB相のアナログ原信号とアナログ原点信号である。光学系回路は発光素子と受光素子とスリット板により構成され、A0とB0は90度位相差を持つ正弦波信号でZ0はエンコーダの原点位置を示す信号である。発光素子はLEDやレーザー光、受光素子はフォトダイオードやフォトトランジスタが用いられ、受光素子表面には格子状のスリットパターンがある。スリット板は、光を透過するガラスや樹脂材でできており、スリット板上に光を遮断する格子状のマスクを設けている。発光素子からの光はスリット板を介して受光素子が透過した光を受けるように配置し、スリット板はエンコーダの回転軸に設置され回転するとスリットパターンとスリット板の相対位置が変化するため、回転に合わせて正弦波の波形と原点位置を示すパルスが受光素子から出力されるようにスリットが形成されている。   A0, B0, and Z0 are A-phase and B-phase analog original signals and analog origin signals output from an optical system circuit (not shown). The optical system circuit includes a light emitting element, a light receiving element, and a slit plate. A0 and B0 are sinusoidal signals having a phase difference of 90 degrees, and Z0 is a signal indicating the origin position of the encoder. The light emitting element is an LED or a laser beam, the light receiving element is a photodiode or a phototransistor, and the surface of the light receiving element has a lattice slit pattern. The slit plate is made of glass or a resin material that transmits light, and a lattice-like mask that blocks light is provided on the slit plate. The light from the light emitting element is arranged to receive the light transmitted by the light receiving element through the slit plate. The slit plate is installed on the rotating shaft of the encoder, and the relative position between the slit pattern and the slit plate changes when rotating. A slit is formed so that a pulse indicating the sine wave waveform and the origin position is output from the light receiving element.

AD変換部10はA0とB0をそれぞれ一定周期のサンプリングでディジタル信号に変換してA1とB1を出力する。実際の光学系回路から出力されるアナログ信号の振幅は数100mVであるため、増幅器などを用いて十数倍に増幅して、AD変換部10の入力レンジに合わせた電圧に変換して利用すれば、ディジタル信号の精度を高くすることができる。また、変換したディジタル信号を複数回平均化あるいはディジタルフィルタ処理を施してノイズの影響を低減した信号を出力してもよい。   The AD converter 10 converts A0 and B0 into digital signals by sampling at a fixed period, and outputs A1 and B1. Since the amplitude of the analog signal output from the actual optical system circuit is several hundred mV, it is amplified by a factor of ten using an amplifier or the like and converted to a voltage that matches the input range of the AD converter 10 for use. Thus, the accuracy of the digital signal can be increased. Alternatively, the converted digital signal may be averaged a plurality of times or subjected to digital filter processing to output a signal in which the influence of noise is reduced.

ここで、ディジタル変換したA1とB1は増幅器のばらつきやAD変換部の変換誤差からオフセットは中心値より外れ、振幅は信号のフルレンジとは異なり、位相差も直交(90度)からずれる。そのため、次に内挿変換部12で正確な内挿分割データ12aに変換するには信号の正規化と直交化が必要なため、信号補正部11によりA1とB1を補正する。   Here, in the digitally converted A1 and B1, offsets deviate from the center value due to amplifier variations and AD converter conversion errors, the amplitude differs from the full signal range, and the phase difference deviates from quadrature (90 degrees). Therefore, signal normalization and orthogonalization are required for the next conversion by the interpolation conversion unit 12 to the accurate interpolation division data 12a, so that the signal correction unit 11 corrects A1 and B1.

信号補正部11では後述する補正値更新部23から出力されるオフセット補正値、振幅補正値、位相補正値からなる信号補正値23aによりA1とB1を補正し、オフセットと振幅がそれぞれ正規化された直交位相差を持つA2とB2を出力する。A1とB1を正規化するため、オフセットの補正ではA1とB1それぞれに対してオフセット補正値を加算することでオフセットをキャンセルし、振幅の補正ではオフセットをキャンセルした信号に対して振幅補正値を乗算することでフルレンジの振幅とする。さらに正規化された2つの信号に対して位相補正値を用いた位相シフト処理を行うことで位相を直交化する。   The signal correction unit 11 corrects A1 and B1 with a signal correction value 23a including an offset correction value, an amplitude correction value, and a phase correction value output from a correction value update unit 23, which will be described later, and the offset and amplitude are normalized. A2 and B2 having quadrature phase difference are output. In order to normalize A1 and B1, offset correction cancels the offset by adding an offset correction value to each of A1 and B1, and amplitude correction multiplies the signal whose offset is canceled by the amplitude correction value. By doing so, it becomes the amplitude of the full range. Further, the phase is orthogonalized by performing phase shift processing using the phase correction value on the two normalized signals.

内挿変換部12は正規化された直交位相差を持つA2とB2に対して三角関数の逆変換(逆正弦変換あるいは逆正接変換)をすることで内挿分割データ12aを出力する。   The interpolation conversion unit 12 outputs interpolation division data 12a by performing inverse transformation (inverse sine transformation or inverse tangent transformation) of a trigonometric function on A2 and B2 having a normalized quadrature phase difference.

パルスカウント部13はA0およびB0とZ0をそれぞれコンパレータ等の比較増幅器により2値パルスに変換し、A0とB0を2値化したパルスによりUP/DOWNカウントを行い、Z0を2値化したパルスによりカウントをゼロクリアするパルスカウント値13aを出力する。   The pulse count unit 13 converts A0, B0, and Z0 into binary pulses by a comparison amplifier such as a comparator, performs UP / DOWN counting with a binary pulse of A0 and B0, and uses a binary pulse of Z0. A pulse count value 13a for clearing the count to zero is output.

位置データ合成部14はパルスカウント値13aと内挿分割データ12aとを位相合成することでパルスカウント値のカウントの間を内挿分割データで補間し、高分解能の位置データ14aを出力する。位相合成する際には、AD変換部のサンプリング周期や補正処
理の演算遅れ等によりパルスカウント部のカウント変化タイミングと内挿分割データの変化タイミングにずれが生じているため、タイミングを調整して合成することで連続的な位置データを出力することができる。
The position data synthesizing unit 14 synthesizes the phase of the pulse count value 13a and the interpolated divided data 12a to interpolate between the counts of the pulse count values with the interpolated divided data, and outputs high-resolution position data 14a. When performing phase synthesis, there is a discrepancy between the count change timing of the pulse count unit and the change timing of the interpolated divided data due to the sampling period of the AD conversion unit and the calculation delay of the correction processing. By doing so, continuous position data can be output.

補正値演算部20はA1およびB1それぞれのオフセット値・振幅値と、A1とB1の位相差を検出し、A1とB1を補正するための演算補正値20aを生成する。オフセット値・振幅値の検出には入力されたA1およびB1それぞれの正弦波1周期内の最大値と最小値を検出し、平均を取ることでオフセット値、差を取ることで振幅値を検出する。検出したオフセット値と信号レンジの中心値との差の逆符号をオフセット補正値とし、検出した振幅値の逆数を振幅補正値とする。また、位相差の検出はA1とB1を一旦正規化した後の交点値を逆正弦変換することで検出する。検出した位相差と正規化され直交位相差をもつ理想正弦波の交点値を逆正弦変換した値との差を位相補正値とする。これらオフセット補正値、振幅補正値、位相補正値を合わせて演算補正値20aとして出力する。 速度判定部21は位置データ14aから検出速度を演算し、あらかじめ決定された設定速度1と設定速度2と比較して高速/低速を判定し速度判定フラグ21aを出力(例えば高速のときHレベル、低速のときLレベル)する。検出速度の演算ではAD変換部でのサンプリングの整数倍の周期で位置データ合成部14から出力される位置データ14aをサンプリングし、サンプリング間の位置データ差分から検出速度を演算する。検出速度を演算する他の方法として光学系回路により出力されるアナログ信号のA0とB0をコンパレータ等の比較増幅器により2値パルスに変換し、パルスのエッジ間隔の時間から速度を演算する方法も用いてもよい。このとき検出速度を複数回平均化あるいはディジタルフィルタ処理を施すことで安定した検出速度を得ることができる。設定速度1はAD変換部10でアナログ正弦波をサンプリングする周期や補正値演算部20の信号処理における演算遅れにより演算補正値20aの精度が許容できなくなる速度を設定すればよく、検出速度が設定速度1以上で高速と判定し速度判定フラグ21aをHレベル出力する。また、設定速度2は設定速度1に対してヒステリシス特性を持たせて設定値を低くした速度で、ヒステリシス幅は設定速度1で低速から高速に切替わる際に高速/低速が頻繁に切替わらない範囲を設定すればよく、検出速度が設定速度2以下で低速と判定し速度判定フラグ21aをLレベル出力する。   The correction value calculation unit 20 detects the offset value / amplitude value of each of A1 and B1 and the phase difference between A1 and B1, and generates a calculation correction value 20a for correcting A1 and B1. For the detection of the offset value and the amplitude value, the maximum value and the minimum value within one cycle of the input A1 and B1 are detected, the offset value is obtained by averaging, and the amplitude value is detected by taking the difference. . The reverse sign of the difference between the detected offset value and the center value of the signal range is set as an offset correction value, and the reciprocal of the detected amplitude value is set as an amplitude correction value. The phase difference is detected by performing inverse sine transformation on the intersection value after once normalizing A1 and B1. The difference between the detected phase difference and the value obtained by inverse sine transformation of the normalized sine wave having a quadrature phase difference is defined as a phase correction value. These offset correction value, amplitude correction value, and phase correction value are combined and output as a calculation correction value 20a. The speed determination unit 21 calculates a detection speed from the position data 14a, compares the predetermined set speed 1 and the set speed 2 with each other, determines high speed / low speed, and outputs a speed determination flag 21a (for example, H level when high speed, L level at low speed). In the calculation of the detection speed, the position data 14a output from the position data synthesizing section 14 is sampled at a cycle that is an integral multiple of the sampling in the AD conversion section, and the detection speed is calculated from the position data difference between the samplings. As another method for calculating the detection speed, a method is also used in which analog signals A0 and B0 output from the optical system circuit are converted into binary pulses by a comparison amplifier such as a comparator, and the speed is calculated from the time of the pulse edge interval. May be. At this time, a stable detection speed can be obtained by averaging the detection speed a plurality of times or performing digital filter processing. The set speed 1 may be set to a speed at which the accuracy of the calculation correction value 20a is not allowed due to the sampling period of the analog sine wave by the AD conversion unit 10 or the calculation delay in the signal processing of the correction value calculation unit 20, and the detection speed is set. When the speed is 1 or more, it is determined that the speed is high, and the speed determination flag 21a is output at H level. Also, the setting speed 2 is a speed obtained by lowering the setting value by giving a hysteresis characteristic to the setting speed 1, and the hysteresis width does not frequently switch between high speed and low speed when switching from low speed to high speed at the setting speed 1. The range may be set, and it is determined that the detected speed is equal to or lower than the set speed 2, and the speed determination flag 21a is output at the L level.

補正値更新判定部22は速度判定フラグ21aと演算補正値20aと補正値23aとに従って信号補正部11で使用する補正値の更新を有効/無効にする補正値更新フラグ22aを出力(例えば有効のときHレベル、無効のときLレベル)する。速度判定フラグ21aがHレベル(高速)のときは補正値の更新を無効とし、補正値更新フラグ22aをLレベル出力する。また、速度判定フラグがLレベル(低速)でなおかつ演算補正値20aと補正値23aが一致したときに補正値の更新を有効とし、補正値更新フラグ22aをHレベル出力する。ここで一致と判定する場合、AD変換のサンプリングによる誤差や演算補正値20aの演算誤差は含んでおらず、実際にはこれらの誤差成分を考慮して一致判定に幅(例えば補正値の数%)を持たせ、演算補正値20aと信号補正値23aの差が幅以下となったときに一致と判定する。なお、電源投入直後などの高速/低速が確定していない状態では補正値の更新を有効(Hレベル)としておくことで後述する補正値更新部23で信号補正値23aが更新され、安定した補正処理を行うことができる。   The correction value update determination unit 22 outputs a correction value update flag 22a that validates / invalidates the update of the correction value used in the signal correction unit 11 according to the speed determination flag 21a, the calculation correction value 20a, and the correction value 23a (for example, a valid value). (H level when disabled, L level when disabled). When the speed determination flag 21a is at the H level (high speed), the correction value update is invalidated, and the correction value update flag 22a is output at the L level. Further, when the speed determination flag is L level (low speed) and the calculation correction value 20a and the correction value 23a coincide with each other, update of the correction value is validated, and the correction value update flag 22a is output at H level. Here, in the case of determining a match, it does not include an error due to AD conversion sampling or a calculation error of the calculation correction value 20a. ) And a match is determined when the difference between the calculation correction value 20a and the signal correction value 23a is less than or equal to the width. Note that in a state where high speed / low speed are not fixed, such as immediately after power-on, the correction value update is made effective (H level), whereby the signal correction value 23a is updated by the correction value update unit 23 described later, and stable correction is performed. Processing can be performed.

補正値更新部23は補正値更新フラグ22aに従ってHレベル(補正値の更新有効)の場合は補正値演算部20で生成される演算補正値20aを信号補正値23aとして更新出力し、Lレベル(補正値の更新無効)の場合は信号補正値23aを更新せずにそのときの値を保持出力する。   The correction value update unit 23 updates and outputs the calculation correction value 20a generated by the correction value calculation unit 20 as the signal correction value 23a in the case of H level (correction value update valid) according to the correction value update flag 22a. If the correction value update is invalid), the signal correction value 23a is not updated and the value at that time is held and output.

以上のように実施例1の位置検出回路と補正処理によって、オフセット・振幅・位相に周期的な変動が含まれる2相アナログ正弦波に対して補正値の更新を無効から有効に切替
える場合でも、そのときに演算される更新値(演算補正値)と信号の補正で使用している補正値(信号補正値)が同じ値であるため切替えのギャップは発生せずにずれのない滑らかな内挿分割データ(位置データ)を出力する信号補正ができ、スリット板の偏芯や傾き等に影響されないエンコーダを得ることができる。
As described above, even when the update of the correction value is switched from invalid to valid for the two-phase analog sine wave including the cyclic fluctuation in the offset, amplitude, and phase by the position detection circuit and the correction process of the first embodiment, Since the update value (calculation correction value) calculated at that time is the same as the correction value (signal correction value) used in signal correction, there is no switching gap and smooth interpolation without deviation. Signal correction for outputting the divided data (position data) can be performed, and an encoder that is not affected by the eccentricity or inclination of the slit plate can be obtained.

(実施例2)
図2を用いて本発明における実施例2を説明する。
(Example 2)
A second embodiment of the present invention will be described with reference to FIG.

実施例1とは位置データラッチ部24を備え、補正値更新判定部23で補正値の更新の有効/無効の判定方法が異なるところであり、その違いについて説明する。   The position data latch unit 24 is different from that of the first embodiment, and the correction value update determination unit 23 is different in a method for determining whether the correction value update is valid / invalid. The difference will be described.

位置データラッチ部24は補正値更新フラグ22aの立下りエッジすなわち補正値の更新有効(Hレベル)から無効(Lレベル)への変化点を検出し、エッジが検出されたときに位置データ合成部14から出力されている位置データ14aをラッチ位置データ24aとして出力する。こうすることで補正値の更新が有効から無効になったときの位置データを検出できる。   The position data latch unit 24 detects a falling edge of the correction value update flag 22a, that is, a change point of the correction value update from valid (H level) to invalid (L level), and when the edge is detected, the position data synthesis unit 14 is output as latch position data 24a. By doing this, it is possible to detect the position data when the correction value update becomes invalid from valid.

補正値更新判定部22は速度判定フラグ21aと演算補正値20aと補正値23aと位置データ14aとラッチ位置データ24aに従って信号補正部11で使用する補正値の更新を有効(Hレベル)/無効(Lレベル)にする補正値更新フラグ22aを出力する。速度判定フラグ21aがHレベル(高速)のときは補正値の更新を無効とし、補正値更新フラグ22aをLレベル出力する。また、速度判定フラグがLレベル(低速)でなおかつ演算補正値20aと補正値23aが一致したときに補正値の更新を有効とし、補正値更新フラグ22aをHレベル出力する。さらに、速度判定フラグがHレベル(高速)からLレベル(低速)となったときの位置データ14aを保持し、そこから補正値の更新が有効のまま位置データが一定量変化(例えば回転型のエンコーダなら1回転)した場合には位置データ14aとラッチ位置データ24aが一致したときに補正値の更新を有効とし、補正値更新フラグ22aをHレベル出力する。ここで位置データ14aとラッチ位置データ24aが一致と判定する場合も演算補正値20aと信号補正値23aと同様に一致判定に幅を持たせる。   The correction value update determination unit 22 validates (H level) / invalidates the update of the correction value used in the signal correction unit 11 according to the speed determination flag 21a, the calculation correction value 20a, the correction value 23a, the position data 14a, and the latch position data 24a ( The correction value update flag 22a to be set to (L level) is output. When the speed determination flag 21a is at the H level (high speed), the correction value update is invalidated, and the correction value update flag 22a is output at the L level. Further, when the speed determination flag is L level (low speed) and the calculation correction value 20a and the correction value 23a coincide with each other, update of the correction value is validated, and the correction value update flag 22a is output at H level. Furthermore, the position data 14a when the speed determination flag changes from H level (high speed) to L level (low speed) is held, and the position data changes by a certain amount (for example, the rotation type) while the correction value update is valid from there. When the encoder is rotated once), the correction value update is validated when the position data 14a and the latch position data 24a coincide with each other, and the correction value update flag 22a is output at the H level. Here, even when it is determined that the position data 14a and the latch position data 24a coincide with each other, the coincidence determination has a width similar to the calculation correction value 20a and the signal correction value 23a.

以上のように実施例2の位置検出回路と補正処理によって、補正値更新を無効にして保持している信号補正値23aに対して周囲温度の変化等により演算補正値20aが一致しなくなった場合にも、一定時間後に補正値を保持したときの位置データ(ラッチ位置データ)と位置データが一致したときに補正値更新を有効にすることで、補正値更新が無効のまま解除されない状態を回避でき、安定した信号補正を行えるエンコーダを得ることができる。   As described above, when the position correction circuit 20 according to the second embodiment and the correction process make the correction value update invalid and the signal correction value 23a that is held does not match the calculation correction value 20a due to a change in ambient temperature or the like. In addition, the correction value update is enabled when the position data matches the position data (latch position data) when the correction value is held after a certain time, thereby avoiding the state where the correction value update remains invalid and cannot be released. And an encoder capable of performing stable signal correction can be obtained.

なお、補正値の更新の有効/無効の切替えはオフセット・振幅・位相をそれぞれ独立に操作してもよいし、複数の補正値をまとめて操作してもよいし、いずれかの補正値の有効/無効を切替えるときに他の補正値の有効/無効も同時に切替えてもよい。   The correction value update valid / invalid switching may be performed by operating the offset / amplitude / phase independently, or by operating a plurality of correction values together, or by validating one of the correction values. When switching / invalidity, the validity / invalidity of other correction values may be switched at the same time.

また、実施例1と実施例2の2相アナログ原信号は正弦波として説明したが、波形に歪のある擬似正弦波、三角波についても同様の構成で補正を行うことができる。   In addition, although the two-phase analog original signal in the first and second embodiments has been described as a sine wave, a pseudo sine wave and a triangular wave whose waveform is distorted can be corrected with the same configuration.

本発明のエンコーダ信号の位相補正回路は、モータ制御装置に限らず、高分解能の位置情報を得るためにエンコーダを搭載した装置に有用である。   The encoder signal phase correction circuit of the present invention is useful not only for motor control devices but also for devices equipped with an encoder for obtaining high-resolution position information.

10 AD変換部
11 信号補正部
12 内挿変換部
12a 内挿分割データ
13 パルスカウント部
13a パルスカウント値
14 位置データ合成部
14a 位置データ
20 補正値演算部
20a 演算補正値
21 速度判定部
21a 速度判定フラグ
22 補正値更新判定部
22a 補正値更新フラグ
23 補正値更新部
23a 信号補正値
A0,B0 A相、B相アナログ原信号
Z0 アナログ原点信号
A1,B1 ディジタル変換後のA相、B相信号
A2,B2 信号補正後のA相、B相信号
DESCRIPTION OF SYMBOLS 10 AD conversion part 11 Signal correction part 12 Interpolation conversion part 12a Interpolation division | segmentation data 13 Pulse count part 13a Pulse count value 14 Position data synthetic | combination part 14a Position data 20 Correction value calculating part 20a Calculation correction value 21 Speed determination part 21a Speed determination Flag 22 Correction value update determination unit 22a Correction value update flag 23 Correction value update unit 23a Signal correction value A0, B0 A phase, B phase analog original signal Z0 Analog origin signal A1, B1 A phase, B phase signal after digital conversion A2 , B2 A-phase and B-phase signals after signal correction

Claims (2)

直交するA相とB相のアナログ正弦波信号(A0とB0)をAD変換してA1とB1を出力するAD変換部と、A1とB1を正規化された直交位相差のディジタル正弦波信号A2とB2へと補正する信号補正部と、A2とB2から内挿分割データに変換する内挿変換部と、A0とB0と原点信号(Z0)をパルス変換してUP/DOWNカウントすることでパルスカウント値を出力するパルスカウント部と、前記パルスカウント値と前記内挿分割データを合成することで位置データを出力する位置データ合成部とを備えるエンコーダおいて、A1とB1を補正するための補正値を演算し演算補正値を生成する補正値演算部と、あらかじめ設定速度1および設定速度1に対してヒステリシス特性をもつ設定速度2を設定し前記位置データの時間変化量から演算した検出速度と比較して検出速度が設定速度1以上になると高速と判定し、高速時に検出速度が設定速度2以下になると低速と判定し速度判定フラグを出力する速度判定部と、前記信号補正部でA1とB1の補正に使用する信号補正値の更新を有効/無効にする補正値更新フラグを出力する補正値更新判定部と、前記補正値更新フラグに従い有効の場合は前記信号補正値を前記演算補正値で更新し、無効の場合は信号補正値を更新せず保持する補正値更新部とを備え、前記補正値更新判定部では前記速度判定フラグが高速のときに前記補正値更新フラグを無効とし、速度判定フラグが低速でさらに前記演算補正値と前記信号補正値とが一致したときに補正値更新フラグを有効にすることを特徴としたエンコーダ信号の補正回路。 A / D conversion unit that AD-converts analog A-phase and B-phase analog sine wave signals (A0 and B0) and outputs A1 and B1, and a digital sine wave signal A2 having a quadrature phase difference in which A1 and B1 are normalized And a signal correction unit that corrects to B2, an interpolation conversion unit that converts A2 and B2 into interpolation division data, A0, B0, and origin signal (Z0) are pulse-converted and pulsed by UP / DOWN counting Correction for correcting A1 and B1 in an encoder including a pulse count unit that outputs a count value and a position data synthesis unit that outputs position data by synthesizing the pulse count value and the interpolated divided data A correction value calculation unit for calculating a value and generating a calculation correction value, a preset speed 1 and a preset speed 2 having hysteresis characteristics with respect to the preset speed 1 and setting the time of the position data A speed determination unit that determines that the detected speed is higher than the set speed 1 compared to the detected speed calculated from the conversion amount, and determines that the detected speed is lower when the detected speed is lower than the set speed 2 at high speed and outputs a speed determination flag; A correction value update determination unit for outputting a correction value update flag for validating / invalidating update of the signal correction value used for correction of A1 and B1 by the signal correction unit; A correction value updating unit that updates the signal correction value with the calculation correction value, and retains the signal correction value without updating if invalid, and the correction value update determination unit includes the correction value update unit when the speed determination flag is high. A correction circuit for an encoder signal, wherein the correction value update flag is invalidated, and the speed determination flag is low, and the correction value update flag is validated when the calculation correction value and the signal correction value coincide with each other. 前記補正値更新フラグが有効から無効になったときの位置データをラッチ位置データとして出力する位置データラッチ部をさらに備え、前記補正値更新判定部では前記速度判定フラグが高速のときに補正値更新フラグを無効とし、速度判定フラグが低速で、さらに前記演算補正値と前記信号補正値とが一致した場合あるいは前記位置データと前記ラッチ位置データとが一致した場に補正値更新フラグを有効にすることを特徴としたエンコーダ信号の補正回路。 A position data latch unit that outputs position data when the correction value update flag becomes invalid from valid to invalid is further provided, and the correction value update determination unit updates the correction value when the speed determination flag is high speed. The flag is disabled, the speed determination flag is low, and the correction value update flag is enabled when the calculation correction value and the signal correction value match or when the position data and the latch position data match. An encoder signal correction circuit characterized by that.
JP2009212593A 2009-09-15 2009-09-15 Correction circuit of encoder signal Pending JP2011064459A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009212593A JP2011064459A (en) 2009-09-15 2009-09-15 Correction circuit of encoder signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009212593A JP2011064459A (en) 2009-09-15 2009-09-15 Correction circuit of encoder signal

Publications (1)

Publication Number Publication Date
JP2011064459A true JP2011064459A (en) 2011-03-31

Family

ID=43950887

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009212593A Pending JP2011064459A (en) 2009-09-15 2009-09-15 Correction circuit of encoder signal

Country Status (1)

Country Link
JP (1) JP2011064459A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013156062A (en) * 2012-01-27 2013-08-15 Panasonic Corp Optical encoder
WO2015012343A1 (en) * 2013-07-26 2015-01-29 Ntn株式会社 Rotation detection device and bearing unit equipped with rotation detection device
JP2015017916A (en) * 2013-07-12 2015-01-29 株式会社ミツトヨ Detection head, optical encoder, and adjustment method of optical encoder
JP2016038228A (en) * 2014-08-06 2016-03-22 太陽誘電株式会社 Displacement measurement device, signal processing device, and signal processing method
CN109163751A (en) * 2018-08-27 2019-01-08 珠海格力电器股份有限公司 A kind of control device and method and encoder of encoder
WO2019142875A1 (en) * 2018-01-19 2019-07-25 日本精工株式会社 Electric power steering device and rotation angle detection method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013156062A (en) * 2012-01-27 2013-08-15 Panasonic Corp Optical encoder
JP2015017916A (en) * 2013-07-12 2015-01-29 株式会社ミツトヨ Detection head, optical encoder, and adjustment method of optical encoder
WO2015012343A1 (en) * 2013-07-26 2015-01-29 Ntn株式会社 Rotation detection device and bearing unit equipped with rotation detection device
JP2015025732A (en) * 2013-07-26 2015-02-05 Ntn株式会社 Rotation detection device and bearing with rotation detection device
CN105393091A (en) * 2013-07-26 2016-03-09 Ntn株式会社 Rotation detection device and bearing unit equipped with rotation detection device
US9823094B2 (en) 2013-07-26 2017-11-21 Ntn Corporation Rotation detection device and bearing unit equipped with rotation detection device
JP2016038228A (en) * 2014-08-06 2016-03-22 太陽誘電株式会社 Displacement measurement device, signal processing device, and signal processing method
WO2019142875A1 (en) * 2018-01-19 2019-07-25 日本精工株式会社 Electric power steering device and rotation angle detection method
JPWO2019142875A1 (en) * 2018-01-19 2020-05-28 日本精工株式会社 Electric power steering device and method for detecting rotation angle of motor for electric power steering device
CN109163751A (en) * 2018-08-27 2019-01-08 珠海格力电器股份有限公司 A kind of control device and method and encoder of encoder

Similar Documents

Publication Publication Date Title
JP4277887B2 (en) Encoder signal correction circuit
JP4453758B2 (en) Encoder signal phase correction circuit
JP2011064459A (en) Correction circuit of encoder signal
JP4240090B2 (en) Encoder signal correction circuit
EP2343510B1 (en) Rotary encoder
JP2006112862A (en) Encoder output signal corrector and method
JP6624446B2 (en) Interpolation method and interpolation device
EP2113748B1 (en) Absolute position measurement type encoder
JP2014025871A (en) Encoder output signal correction apparatus
JP2010216961A (en) Encoder output signal correction apparatus and method
US20160103001A1 (en) Method of interpolating read-out signal of incremental encoder
JP2008304249A (en) Encoder signal processing device and its signal processing method
JP2010145203A (en) Linear encoder signal processing device and signal processing method
JP6071196B2 (en) Encoder
US7099790B2 (en) Sensor signal processor
JP7120222B2 (en) Position detection device and position detection method
JP2010071783A (en) Optical encoder
JP5125320B2 (en) Encoder correction value control method
JP2013205366A (en) Position detection device
US20100004888A1 (en) Measurement apparatus
JP4224677B2 (en) Optical encoder position detection method
JP4581953B2 (en) Encoder output signal correction circuit
JP4780038B2 (en) Encoder signal processing circuit
JP7203584B2 (en) absolute rotary encoder
JP2023019809A (en) Absolute encoder and device equipped with the same