JPH04365542A - Automatic offset correction system for sensor signal - Google Patents

Automatic offset correction system for sensor signal

Info

Publication number
JPH04365542A
JPH04365542A JP3165281A JP16528191A JPH04365542A JP H04365542 A JPH04365542 A JP H04365542A JP 3165281 A JP3165281 A JP 3165281A JP 16528191 A JP16528191 A JP 16528191A JP H04365542 A JPH04365542 A JP H04365542A
Authority
JP
Japan
Prior art keywords
phase
signal
sine wave
signals
offset 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
JP3165281A
Other languages
Japanese (ja)
Inventor
Mitsuhiko Hirota
広田 光彦
Tadashi Inoue
正 井上
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.)
Fanuc Corp
Original Assignee
Fanuc 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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP3165281A priority Critical patent/JPH04365542A/en
Publication of JPH04365542A publication Critical patent/JPH04365542A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To perform accurate offset correction even when offset of a signal from a sensor is fluctuated owing to a fluctuation in temperature and an object to be detected is moved at a low speed. CONSTITUTION:A DC component is removed by high-pass filters 2a and 2b by means of phase A and Phase b signals SA and SB from a sensor generated by differential amplifiers 1a and 1b. From the signals generated through the high-pass filters 2a and 2b, a zero cross point is detected by means of comparators 5a and 5b. Phase A and phase B signals SA and SB at the zero cross point are inputted to offset correction calculating circuits 7a and 7b to determine an offset correction value. By means of the correction value, the phase A and phase B are corrected by adding circuits 10a and 10b. Even when offset of a signal from the sensor is fluctuated, since the fluctuated offset is detected for correction, constantly accurate offset correction is practicable.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、モータや工作機械の主
軸等の回転軸,移動する物体の位置や速度を検出する検
出器に関し、回転軸や移動物体が移動することにより、
正弦波信号を発生し、その正弦波信号よりその回転軸や
移動物体の位置,速度を検出する検出器のセンサ信号の
オフセット自動補正方式に関する。
[Industrial Application Field] The present invention relates to a detector for detecting the position and speed of a rotating shaft such as a motor or a main shaft of a machine tool, or a moving object.
The present invention relates to an automatic offset correction method for a sensor signal of a detector that generates a sine wave signal and uses the sine wave signal to detect the position and speed of a rotating axis or a moving object.

【0002】0002

【従来の技術】回転軸や移動物体の移動速度や位置を検
出する検出器において、回転軸や移動物体が移動すると
センサーより90度位相差のあるA相,B相の正弦波を
出力し、該A相,B相の正弦波より、回転軸や移動物体
の速度及び位置を検出するものが知られている。この場
合、上記A相,B相の正弦波にオフセットがあると(振
幅中心の中性点電圧が設定値よりずれている場合)正確
な速度,位置を検出できない。そのため、センサー信号
のオフセット補正を行なわねばならない。
[Prior Art] In a detector that detects the moving speed and position of a rotating shaft or a moving object, when the rotating shaft or moving object moves, the sensor outputs A-phase and B-phase sine waves with a 90 degree phase difference. It is known to detect the speed and position of a rotating shaft or a moving object from the A-phase and B-phase sine waves. In this case, if there is an offset in the A-phase and B-phase sine waves (if the neutral point voltage at the center of the amplitude deviates from the set value), accurate speed and position cannot be detected. Therefore, offset correction of the sensor signal must be performed.

【0003】従来、このオフセット補正は、正弦波信号
とその反転信号の差を増幅する差動増幅器に設けられた
オフセット調整用可変抵抗器を調整し、差動増幅器の出
力電圧の正弦波の振幅中心が中性点電圧になりオフセッ
トが0Vになるようにする方法が採用されている。
Conventionally, this offset correction has been carried out by adjusting an offset adjustment variable resistor provided in a differential amplifier that amplifies the difference between a sine wave signal and its inverted signal, and adjusting the amplitude of the sine wave of the output voltage of the differential amplifier. A method is adopted in which the center becomes the neutral point voltage and the offset becomes 0V.

【0004】上記方法においては、オフセット値がオフ
セット補正が行われたときの温度や回転軸や移動物体の
速度等によって決まり、固定的であり、温度変化等によ
って上記オフセット値がずれ、0Vでなくなると検出速
度,位置も変動することになり、安定した検出ができな
いという欠点がある。
[0004] In the above method, the offset value is determined by the temperature at the time the offset correction is performed, the speed of the rotating axis, the moving object, etc., and is fixed, and the offset value shifts due to temperature changes and ceases to be 0V. This has the disadvantage that stable detection cannot be achieved because the detection speed and position also fluctuate.

【0005】そこで、本願出願人は、温度等に影響され
ず、センサからの正弦波信号のオフセット値が変動して
も、そのオフセットを自動的に補正する方式として、セ
ンサから検出される正弦波信号をサンプリングして、そ
のサンプリングデータの平均を求めることにより、補正
値を求め、この補正値によってセンサからの正弦波信号
を補正することによって自動的にオフセット補正する方
式を提案した(特願平3−45335号公報参照)。
[0005] Therefore, the applicant of the present application has proposed a method for automatically correcting the offset value of the sine wave signal from the sensor even if the offset value of the sine wave signal from the sensor fluctuates without being affected by temperature etc. We proposed a method to automatically correct the offset by sampling the signal and calculating the average of the sampled data to obtain a correction value, and then correcting the sine wave signal from the sensor using this correction value (Patent application No. 3-45335).

【0006】[0006]

【発明が解決しようとする課題】上記サンプリングデー
タによるオフセット補正方式であると、回転軸や移動物
体の移動速度が低速の場合、正確な補正値を求めること
ができないという欠点がある。例えば、速度が低速で、
正弦波の半周期、1.5周期等しかサンプリングできな
い場合、そのサンプリングデータの平均を補正値とする
から、この補正値は正弦波の中性点の値を示さないこと
になり、正確なオフセット補正を行なうことができない
という問題がある。また、多数のサンプリングデータを
必要とするため、構成が複雑となり高価なものにすると
いう問題もある。
The above-mentioned offset correction method using sampling data has the disadvantage that an accurate correction value cannot be determined when the rotating shaft or moving object moves at a low speed. For example, if the speed is slow,
If only half a period, 1.5 periods, etc. of a sine wave can be sampled, the average of the sampled data is used as the correction value, so this correction value does not indicate the value of the neutral point of the sine wave, so it is not possible to accurately offset the sine wave. There is a problem that correction cannot be performed. Furthermore, since a large amount of sampling data is required, there is also the problem that the configuration becomes complicated and expensive.

【0007】そこで、本発明の目的は、被検出体が低速
で移動している場合でも、正確なオフセット補正を行な
うことができるセンサ信号の自動オフセット補正方式を
提供することにある。
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide an automatic offset correction method for sensor signals that can perform accurate offset correction even when a detected object is moving at a low speed.

【0008】[0008]

【課題を解決するための手段】移動体の移動によって正
弦波信号と該正弦波信号より90度位相差のある正弦波
信号のA相,B相の信号を発生する検出器のオフセット
補正方式において、本発明は、上記A相,B相の正弦波
信号の直流成分を除去した信号の中性点(振幅中心位置
)を求め、該中性点における上記A相,B相の値をそれ
ぞれ補正値とし、A相,B相の信号に対してそれぞれ上
記補正値を補正することによって自動的にオフセット補
正を行なうようにした。
[Means for solving the problem] In an offset correction method for a detector that generates a sine wave signal and A-phase and B-phase signals of the sine wave signal having a phase difference of 90 degrees from the sine wave signal due to the movement of a moving object. , the present invention determines the neutral point (amplitude center position) of the signal from which the DC component of the A-phase and B-phase sine wave signals has been removed, and corrects the values of the A-phase and B-phase at the neutral point, respectively. offset correction is automatically performed by correcting the above correction values for the A-phase and B-phase signals, respectively.

【0009】[0009]

【作用】正弦波信号の直流成分を除去した信号の中性点
は、正弦波の振幅中心位置を表すので、該中性点におけ
るセンサからのA相,B相信号の正弦波信号の振幅中心
位置であり、直流成分の値を示すことになる。この直流
成分の値がオフセット値であり、この値を補正量として
A相,B相の正弦波信号を補正すれば、オフセットを除
去した信号を得ることができる。
[Operation] The neutral point of the signal from which the DC component of the sine wave signal has been removed represents the amplitude center position of the sine wave, so the amplitude center of the sine wave signal of the A-phase and B-phase signals from the sensor at the neutral point It is the position and indicates the value of the DC component. The value of this DC component is an offset value, and if the A-phase and B-phase sine wave signals are corrected using this value as a correction amount, a signal from which the offset has been removed can be obtained.

【0010】0010

【実施例】図1は本発明の一実施例のオフセット自動補
正回路のブロック図で、MAはセンサからのA相の正弦
波信号、RMAは該正弦波信号MAの反転信号である。 また、MBはセンサからのB相の正弦波信号、RMBは
その反転信号である。1a,1bは差動増幅器で、差動
増幅器1aはA相センサ信号MAとA相センサ反転信号
RMAとの差を増幅する。差動増幅器1bはB相センサ
信号MBとB相センサ反転信号RMBとの差を増幅する
。VM は基準電圧であり該各センサ信号MA,RMA
,MB,RMBの中心電圧に等しく設定され(実施例で
はVM =Vcc/2)、差動増幅器1aの出力信号S
A,差動増幅器1bの出力信号SBにそれぞれ加算され
る。例えば、 MA=(k1+VM )+sinθ RMA=(k2+VM )+sin(θ+180)(k
1,k2は各信号のオフセット量)とすると、A相信号
SA は(実施例では増幅倍率1倍)、       SA =(MA−RMA)+VM    
      =α+2sinθ+VM        
                 …(1)(なおα
=k1−k2でオフセット量である)となる。同様に、
B相信号SB は、       SB =β+2cosθ+VM     
                    …(2)(
なおβはオフセット量である) となる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram of an automatic offset correction circuit according to an embodiment of the present invention, where MA is an A-phase sine wave signal from a sensor and RMA is an inverted signal of the sine wave signal MA. Furthermore, MB is a B-phase sine wave signal from the sensor, and RMB is its inverted signal. 1a and 1b are differential amplifiers, and the differential amplifier 1a amplifies the difference between the A-phase sensor signal MA and the A-phase sensor inverted signal RMA. Differential amplifier 1b amplifies the difference between B-phase sensor signal MB and B-phase sensor inverted signal RMB. VM is the reference voltage and each sensor signal MA, RMA
, MB, RMB (in the example, VM = Vcc/2), and the output signal S of the differential amplifier 1a
A and the output signal SB of the differential amplifier 1b, respectively. For example, MA=(k1+VM)+sinθ RMA=(k2+VM)+sin(θ+180)(k
1, k2 is the offset amount of each signal), then the A-phase signal SA is (amplification factor 1x in the example), SA = (MA-RMA) + VM
=α+2sinθ+VM
…(1) (Also α
=k1-k2 is the offset amount). Similarly,
The B-phase signal SB is: SB = β + 2 cos θ + VM
…(2)(
Note that β is the offset amount).

【0011】2a,2bはハイパスフィルタでそれぞれ
A相信号SA ,B相信号SB からコンデンサCで直
流成分を除去し、且つ「Vcc/2」を付加するもので
ある。 なお、電圧Vcc=2VM と設定されている。また周
波数f(Hz)のときゲインが−3dbになり、出力が
この周波数f以下のとき、後述するウインドコンパレー
タ4a,4bの上限値Vh と下限値VL 間にいるよ
うにコンデンサC,抵抗Rの値が設定されている。4a
,4bはウインドコンパレータで、上記ハイパスフィル
タ2a,2bの出力VA ,VB がそれぞれ上限値V
H と下限値VL 間にあるときハイレベルの信号Ha
,Hbを出力するものである。すなわち、VH ≧VA
 ,VB ≧VL のとき、ハイレベルの信号Ha,H
bを出力する。
Reference numerals 2a and 2b are high-pass filters that remove DC components from the A-phase signal SA and B-phase signal SB, respectively, using a capacitor C, and add "Vcc/2" to them. Note that the voltage Vcc is set to 2VM. Also, when the frequency is f (Hz), the gain is -3db, and when the output is below this frequency f, the capacitor C and resistor R are connected so that they are between the upper limit value Vh and lower limit value VL of window comparators 4a and 4b, which will be described later. Value is set. 4a
, 4b are window comparators, and the outputs VA and VB of the high-pass filters 2a and 2b are set to the upper limit value V, respectively.
High level signal Ha when between H and lower limit value VL
, Hb. That is, VH ≧VA
, VB ≧VL, high level signals Ha, H
Output b.

【0012】また、5a,5bはコンパレータで、それ
ぞれ上記ハイパスフィルタ2a,2bの出力VA ,V
B が基準電圧VM (=Vcc/2)以上のときハイ
レベルの信号Ja,Jbをアンド回路8a,8bに出力
する。アンド回路8aにはコンパレータ5aの出力信号
Ja,コンパレータ5bの出力Jbのインバート信号及
びB相のウインドコンパレータ4bの出力Hbのインバ
ート信号が入力されている。またアンド回路8bにはコ
ンパレータ5bの出力信号Jb,コンパレータ5aの出
力Jaのインバート信号及びA相のウインドコンパレー
タ4aの出力Haのインバート信号が入力されている。 6a,6bは差動増幅器1a,1bの出力SA,SB 
をディジタル信号に変換するA/D変換器である。
Further, 5a and 5b are comparators, and outputs VA and V of the high-pass filters 2a and 2b, respectively.
When B is higher than the reference voltage VM (=Vcc/2), high level signals Ja and Jb are output to the AND circuits 8a and 8b. The output signal Ja of the comparator 5a, the inverted signal of the output Jb of the comparator 5b, and the inverted signal of the output Hb of the B-phase window comparator 4b are input to the AND circuit 8a. Further, the AND circuit 8b receives the output signal Jb of the comparator 5b, the inverted signal of the output Ja of the comparator 5a, and the inverted signal of the output Ha of the A-phase window comparator 4a. 6a and 6b are the outputs SA and SB of the differential amplifiers 1a and 1b.
This is an A/D converter that converts the signal into a digital signal.

【0013】7a,7bはオフセット補正値計算回路で
、N個のレジスタと該N個のレジスタに記憶する値を加
算しNで除して平均値を求め、この平均値の補数をオフ
セット補正値としてD/A変換器9a,9bに出力する
回路を有している。アンド回路8a,8bの出力信号が
立ち上がったときレジスタの値を1つシフトし、A/D
変換器6a,6bの値をそれぞれレジスタに取り込み、
レジスタに記憶する値の平均値の補数をオフセット補正
値として出力するものである。すなわち、アンド回路8
a,8bの出力信号が立ち上がったときレジスタRnに
レジスタRn−1の値を格納し、同様にRn−1 にR
n−2 の値…R2にR1の値を格納しR1にA/変換
器6a,6bの出力を格納し、各レジスタR1〜Rnの
値を加算してNで除して平均を求め、この平均値の各ビ
ットの値を逆転し最下位のビットに「1」を加算して補
数を求めオフセット補正値とし、この補正値をD/A変
換器9a,9bでアナログ信号変換し、加算回路10a
,10bに出力する。
7a and 7b are offset correction value calculation circuits, which add N registers and the values stored in the N registers, divide by N to obtain an average value, and calculate the complement of this average value as an offset correction value. It has a circuit for outputting data to D/A converters 9a and 9b. When the output signals of AND circuits 8a and 8b rise, the value of the register is shifted by one, and the A/D
The values of converters 6a and 6b are respectively taken into registers,
The complement of the average value of the values stored in the register is output as an offset correction value. That is, AND circuit 8
When the output signals of a and 8b rise, the value of register Rn-1 is stored in register Rn, and similarly, Rn-1 is set to Rn-1.
Value of n-2... Store the value of R1 in R2, store the output of the A/converters 6a, 6b in R1, add the values of each register R1 to Rn, divide by N to find the average, and calculate the average value. The value of each bit of the average value is reversed and "1" is added to the least significant bit to obtain the complement, which is used as an offset correction value. This correction value is converted into an analog signal by D/A converters 9a and 9b, and the addition circuit 10a
, 10b.

【0014】加算回路10a,10bは上記各補正値と
差動増幅器1a,1bの出力のA相信号SA ,SB 
を加算すると共に基準電圧VM を減算し、オフセット
補正されたA相,B相の信号NA,NB を出力する。
Addition circuits 10a and 10b combine the above correction values with A-phase signals SA and SB of the outputs of differential amplifiers 1a and 1b.
and subtracts the reference voltage VM, and outputs offset-corrected A-phase and B-phase signals NA and NB.

【0015】センサを取付けた回転軸もしくは移動体の
速度が低速でセンサ信号MA,RMA, MB,RMB
の周波数が周波数f以下の場合には、ハイパスフイルタ
2a,2bのゲインが−3db以下となるので、図2(
a),(b)に破線で示すように、ハイパスフイルタ2
a,2bの出力信号VA,VBはウインドコンパレータ
4a,4bの上限値VH ,VL を越えることがない
。そのため、該コンパレータ4a,4bの出力信号Ha
,Hbはローレベルになることはなく、オフセット補正
値計算回路7a,7bにはA/D変換器の出力が取り込
まれることはない。しかし、被検出体の速度が速くなり
、センサ信号の周波数が周波数fを越えると、図2(a
),(b)に実線で示すように、ハイパスフイルタ2a
,2bの出力VA,VB はそれぞれの正弦波の90度
,270度近傍でウインドコンパレータ4a,4bの上
限値VH ,VL を越え、この時、図2(c),(d
)に示すように、ウインドコンパレータ4a,4bの出
力信号Ha,Hbはローレベルになる。一方、A相信号
SA ,B相信号SB は90度位相差があることから
、A相の信号VAの正弦波が90度もしくは270度近
傍においてB相の信号VB は中性点位置を通過する。 すなわち、基準電圧VM と交差する、以下この基準電
圧VM と交差することを零クロスするという。また、
その零クロスする点を零クロス点という。同様にB相の
信号VB の正弦波が90度もしくは270度近傍にお
いてA相の信号VA は零クロスする。また、基準電圧
VM とA相の信号VA ,B相の信号VBをそれぞれ
比較するコンパレータ5a,5bの出力信号は零クロス
点で変化し、基準電圧VM 以上にA相の信号VA ,
B相の信号VB がなると図2(e),(f)に示すよ
うに、ハイレベルの信号を出力する。
[0015] When the speed of the rotating shaft or moving body to which the sensor is attached is low, the sensor signals MA, RMA, MB, RMB
2 (
As shown by the broken lines in a) and (b), the high-pass filter 2
The output signals VA, VB of a, 2b do not exceed the upper limit values VH, VL of the window comparators 4a, 4b. Therefore, the output signal Ha of the comparators 4a and 4b
, Hb never go to low level, and the output of the A/D converter is never taken into the offset correction value calculation circuits 7a and 7b. However, if the speed of the detected object increases and the frequency of the sensor signal exceeds the frequency f, then
), (b), the high-pass filter 2a
, 2b exceed the upper limit values VH and VL of the window comparators 4a and 4b near 90 degrees and 270 degrees of the respective sine waves, and at this time, the
), the output signals Ha and Hb of the window comparators 4a and 4b become low level. On the other hand, since the A-phase signal SA and B-phase signal SB have a 90 degree phase difference, the B-phase signal VB passes through the neutral point position when the sine wave of the A-phase signal VA is near 90 degrees or 270 degrees. . That is, crossing the reference voltage VM is hereinafter referred to as a zero crossing. Also,
The zero-crossing point is called the zero-crossing point. Similarly, when the sine wave of the B-phase signal VB approaches 90 degrees or 270 degrees, the A-phase signal VA crosses zero. Further, the output signals of the comparators 5a and 5b, which compare the reference voltage VM with the A-phase signal VA and the B-phase signal VB, respectively, change at the zero cross point, and the A-phase signals VA, 5B exceed the reference voltage VM.
When the B-phase signal VB is reached, a high level signal is output as shown in FIGS. 2(e) and 2(f).

【0016】その結果、コンパレータ5aの出力Ja,
B相のウインドコンパレータ4bの出力信号Hbのイン
バート信号,B相のコンパレータ5bの出力Jbのイン
バート信号を入力するアンド回路8aの出力は図2(g
)に示すように、A相の信号VA が零クロスする位置
で立ち上がり、この立ち上がり信号でA/D変換器6a
の出力をオフセット補正値計算回路7aに取り込むこと
になる。すなわち、オフセット補正値計算回路7aには
A相信号SA の零クロス点の値が取り込まれ記憶され
ることになる。同様に、B相のオフセット補正値計算回
路7bには、B相信号SB の零クロス点の値が取り込
まれることになる。
As a result, the output Ja of the comparator 5a,
The output of the AND circuit 8a which inputs the inverted signal of the output signal Hb of the B-phase window comparator 4b and the inverted signal of the output Jb of the B-phase comparator 5b is shown in FIG.
), the A-phase signal VA rises at the zero-crossing position, and this rising signal causes the A/D converter 6a to
The output of is taken into the offset correction value calculation circuit 7a. That is, the value of the zero cross point of the A-phase signal SA is taken in and stored in the offset correction value calculation circuit 7a. Similarly, the value of the zero cross point of the B-phase signal SB is taken into the B-phase offset correction value calculation circuit 7b.

【0017】なお、この実施例では、コンパレータ5a
,5bの出力が立ち上がるときの零クロス点のA相,B
相の信号SA,SB の値をサンプリングするようにし
たが、このコンパレータ5a,5bの出力が立ち下がる
ときも零クロス点であり、この点のA相,B相の信号S
A,SB の値もサンプリングするようにしてもよい。 この場合には、A相に対しては、コンパレータ5aの出
力Jaのインバート信号,B相のコンパレータ5bの出
力信号Jb及びB相のウインドコンパレータ4bの出力
Hbのインバート信号を入力するアンド回路を付加し、
このアンド回路の出力と上記アンド回路8aの出力のオ
アをとるオア回路を設け、このオア回路の出力信号の立
ち上がりで、A/D変換器6aの値をサンプリングする
ようにすればよい。また、B相に対しては、同様にコン
パレータ5bの出力Jbのインバート信号,A相のコン
パレータ5aの出力信号Ja及びA相のウインドコンパ
レータ4aの出力Haのインバート信号を入力するアン
ド回路を付加し、このアンド回路の出力と上記アンド回
路8bの出力のオアをとるオア回路を設け、このオア回
路の出力信号の立ち上がりで、A/D変換器6bの値を
サンプリングするようにすればよい。
Note that in this embodiment, the comparator 5a
, 5b of phase A and B at the zero cross point when the output rises.
Although the values of the phase signals SA and SB are sampled, when the outputs of the comparators 5a and 5b fall, it is also a zero cross point, and the A and B phase signals S at this point
The values of A and SB may also be sampled. In this case, for the A phase, an AND circuit is added that inputs the inverted signal of the output Ja of the comparator 5a, the output signal Jb of the B phase comparator 5b, and the inverted signal of the output Hb of the B phase window comparator 4b. death,
An OR circuit may be provided to OR the output of this AND circuit and the output of the AND circuit 8a, and the value of the A/D converter 6a may be sampled at the rising edge of the output signal of this OR circuit. Furthermore, for the B phase, an AND circuit is added which similarly inputs the inverted signal of the output Jb of the comparator 5b, the output signal Ja of the A-phase comparator 5a, and the inverted signal of the output Ha of the A-phase window comparator 4a. An OR circuit may be provided to OR the output of this AND circuit and the output of the AND circuit 8b, and the value of the A/D converter 6b may be sampled at the rising edge of the output signal of this OR circuit.

【0018】以上のようにして、オフセット補正値計算
回路7a,7bにそれぞれA相信号SA ,B相信号S
B の零クロス点の電圧が順次N個記憶されることにな
り、その平均がとられ、平均値の補数がオフセット補正
値として出力されD/A変換器9a,9bでアナロク信
号に変換される。
As described above, the A-phase signal SA and the B-phase signal S are supplied to the offset correction value calculation circuits 7a and 7b, respectively.
N zero-cross point voltages of B are sequentially stored, their average is taken, and the complement of the average value is output as an offset correction value and converted into an analog signal by D/A converters 9a and 9b. .

【0019】次に上記平均値の補数がオフセット補正値
になることを説明する  。
Next, it will be explained that the complement of the above average value becomes the offset correction value.

【0020】オフセット補正値計算回路7a,7bに記
憶される値はA,B相信号SA,SBの零クロス点の値
であるから、上記第1式,第2式において、sinθ=
0,cosθ=0のときの値であり、直流成分であるオ
フセットの値VM +αまたはVM +βの値がそれぞ
れオフセット補正値計算回路7a,7bに記憶されるこ
とになる。そこで、A/D変換器6a,6bの出力を8
ビットとし、上記オフセットの値VM +α,VM +
βの値を8ビットのディジタル値で記憶するとし、基準
電圧VM のディジタル値を28 、すなわち、2進法
で「10000000」とすれば、 (VM +α)の補数=29 −(VM +α)=29
 −(28 +α) =28 −α =VM −α 同様に (VM +β)の補数=VM −β となる。上記(VM +α)の補数,(VM +β)の
補数をオフセット補正値として、D/A変換器9a,9
bで変換し、次の第3式,第4式に示すように、加算器
10a,10bでそれぞれA相信号SA とA相の補正
値(VM −α)を加算し、B相信号SB とB相の補
正値(VM −β)を加算し、そしてそれぞれ基準信号
VM を減じると基準信号VM を中性点とするオフセ
ット補正がなされたA相,B相信号NA,NB を得る
ことができる。
Since the values stored in the offset correction value calculation circuits 7a and 7b are the values at the zero cross points of the A and B phase signals SA and SB, in the first and second equations above, sin θ=
0, cos θ=0, and the offset value VM + α or VM + β, which is a DC component, is stored in the offset correction value calculation circuits 7a and 7b, respectively. Therefore, the outputs of the A/D converters 6a and 6b are
bit, and the above offset value VM + α, VM +
Assuming that the value of β is stored as an 8-bit digital value, and the digital value of the reference voltage VM is 28, that is, "10000000" in binary notation, then the complement of (VM + α) = 29 - (VM + α) = 29
−(28 + α) = 28 −α = VM − α Similarly, the complement of (VM + β) = VM − β. Using the complement of (VM + α) and the complement of (VM + β) as offset correction values, the D/A converters 9a and 9
As shown in the following third and fourth equations, adders 10a and 10b add the A-phase signal SA and the A-phase correction value (VM - α), respectively, and obtain the B-phase signal SB and By adding the B-phase correction value (VM - β) and subtracting the reference signal VM, it is possible to obtain the A-phase and B-phase signals NA and NB that have undergone offset correction with the reference signal VM as the neutral point. .

【0021】     NA =SA +(VM −α)−VM   
     =VM +α+2sinθ+(VM −α)
−VM         =VM +2sinθ   
                       …(
3)    NB =SB +VM −β−VM   
      =VM +β+2cosθ+(VM −β
)−VM         =VM +2cosθ  
                        …
(4)上記実施例においては、ハイパスフイルタ2a,
2bを設けて所定周波数f以下の周波数の入力信号を減
衰させてウインドコンパレータ4a,4bからこの低周
波入力のときには常にハイレベルの信号を出させるよう
にしているが、これは、被検出体の移動速度が遅く、セ
ンサ信号の正弦波周波数が低いとき、零クロス点の検出
が難しく、誤検出をする恐れがあることから、低周波時
における零クロス点のA,B相信号SA,SB をサン
プリングしないようにしたものである。
[0021]NA=SA+(VM−α)−VM
= VM + α + 2 sin θ + (VM - α)
−VM=VM+2sinθ
…(
3) NB =SB +VM -β-VM
= VM + β + 2 cos θ + (VM - β
)−VM=VM+2cosθ

(4) In the above embodiment, the high pass filter 2a,
2b is provided to attenuate the input signal with a frequency below a predetermined frequency f, so that the window comparators 4a and 4b always output a high level signal when this low frequency input is received. When the moving speed is slow and the sine wave frequency of the sensor signal is low, it is difficult to detect the zero cross point and there is a risk of false detection. This is to avoid sampling.

【0022】また、A相のウインドコンパレータ4aの
出力HA をB相のアンド回路8bに、B相のウインド
コンパレータ4bの出力HB をA相のアンド回路8a
に入力する理由は、ハイパスフィルタ2a,2bを行な
うと、被検出体が停止しているときに、コンデンサが充
電されており、移動を開始したときハイパスフィルタ2
a,2bから瞬間的に急激に変化する電圧が出力され零
クロスすることが生じるので、これによるサンプリング
を防止するために、一方の相のウインドコンパレータの
出力がローレベルのときに(この時に他方の相の正弦波
は零クロスする)、各信号SA,SB のサンプリング
を行なうようにして誤サンプリングを防止させたもので
ある。
Further, the output HA of the A-phase window comparator 4a is sent to the B-phase AND circuit 8b, and the output HB of the B-phase window comparator 4b is sent to the A-phase AND circuit 8a.
The reason for inputting is that when the high-pass filters 2a and 2b are applied, the capacitor is charged when the detected object is stopped, and when the object starts moving, the high-pass filter 2a and 2b are input.
A, 2b outputs a voltage that changes rapidly and may cross zero, so in order to prevent sampling due to this, when the output of the window comparator of one phase is at a low level (at this time, the output of the window comparator of one phase is (the sine wave of the phase crosses zero), each signal SA, SB is sampled to prevent erroneous sampling.

【0023】なお、この検出器を最初に作動させる時に
は、上記オフセット補正値計算回路7a,7bの各レジ
スタに基準電圧VM に対応する値を初期設定しておき
作動させれば、その後、センサからの正弦波信号が周波
数fを越えると、各レジスタに零クロス点の各信号SA
,SB の値が順次格納され更新されることとなり、し
かも、D/A変換器9a,9bからは常に更新されたオ
フセット補正値が出力されることになるので、センサか
らの正弦波信号が周波数f以下となり、被検出体の速度
が低速になった時でも、その直前に記憶した零クロス点
のA,B相の信号SA,SB の値によるオフセット補
正値によりA,B相の信号SA,SB が補正されるこ
とになる。そのため、温度等によってセンサからの信号
のオフセットが変動しても、その変動したオフセットを
常に補正することとなる。
Note that when this detector is first operated, a value corresponding to the reference voltage VM is initially set in each register of the offset correction value calculation circuits 7a and 7b. When the sine wave signal exceeds the frequency f, each signal SA at the zero cross point is stored in each register.
, SB are sequentially stored and updated, and the D/A converters 9a and 9b always output updated offset correction values, so that the sine wave signal from the sensor has a frequency f or less and the speed of the detected object becomes low, the A, B phase signals SA, SB will be corrected. Therefore, even if the offset of the signal from the sensor changes due to temperature or the like, the changed offset is always corrected.

【0024】[0024]

【発明の効果】以上のように、本発明においては、セン
サからの正弦波信号の中性点の値を順次検出し更新して
、該中性点の値よりオフセット補正値を求め、オフセッ
ト補正を行なうようにしたので、温度変化等によりセン
サ信号のオフセットが変動しても、そのオフセットが補
正され、常に正確なオフセット補正ができる。また、低
速域でも、誤りなく正確なオフセット補正ができ、被検
出体である回転軸や移動物体の速度,位置の制御が正確
でむらのないものにすることができる。さらに、オフセ
ット補正のために検出するデータも、中性点の値だけで
あるため、構成が簡単という効果がある。
As described above, in the present invention, the value of the neutral point of the sine wave signal from the sensor is sequentially detected and updated, the offset correction value is determined from the value of the neutral point, and the offset correction value is calculated. Therefore, even if the offset of the sensor signal fluctuates due to temperature changes, the offset is corrected, and accurate offset correction can be performed at all times. Further, even in a low speed range, accurate offset correction can be performed without error, and the speed and position of the rotating shaft or moving object, which is the object to be detected, can be controlled accurately and evenly. Furthermore, since the data detected for offset correction is only the value of the neutral point, the configuration is simple.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の一実施例におけるオフセット自動補正
回路のブロック図である。
FIG. 1 is a block diagram of an automatic offset correction circuit in one embodiment of the present invention.

【図2】同実施例における動作タイミングの説明図であ
る。
FIG. 2 is an explanatory diagram of operation timing in the same embodiment.

【符号の説明】[Explanation of symbols]

1a,1b  差動増幅器 2a,2b  ハイパスフィルタ 4a,4b  ウインドコンパレータ 5a,5b  コンパレータ 6a,6b  アナログ/ディジタル変換器(A/D変
換器) 7a,7b  オフセット補正値計算回路8a,8b 
 アンド回路 9a,9b  ディジタル/アナログ変換器(D/A変
換器) 10a,10b  加算回路
1a, 1b Differential amplifier 2a, 2b High pass filter 4a, 4b Window comparator 5a, 5b Comparator 6a, 6b Analog/digital converter (A/D converter) 7a, 7b Offset correction value calculation circuit 8a, 8b
AND circuit 9a, 9b Digital/analog converter (D/A converter) 10a, 10b Adder circuit

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】  移動体の移動によって正弦波信号と該
正弦波信号より90度位相差のある正弦波信号のA相,
B相の信号を発生する検出器のオフセット補正方式にお
いて、上記A相,B相の正弦波信号の直流成分を除去し
た信号の中性点を求め、該中性点における上記A相,B
相の値をそれぞれ補正値とし、A相,B相の信号に対し
てそれぞれ上記補正値を補正することを特徴とするセン
サ信号の自動オフセット補正方式。
Claim 1: A phase of a sine wave signal and a sine wave signal having a phase difference of 90 degrees from the sine wave signal due to the movement of a moving body;
In an offset correction method for a detector that generates a B-phase signal, the neutral point of the signal from which the DC component of the A-phase and B-phase sine wave signals has been removed is determined, and the A-phase and B-phase signals at the neutral point are determined.
An automatic offset correction method for sensor signals, characterized in that phase values are used as correction values, and the correction values are corrected for A-phase and B-phase signals, respectively.
【請求項2】  移動体の移動によって正弦波信号と該
正弦波信号より90度位相差のある正弦波信号のA相,
B相の信号を発生する検出器のオフセット補正方式にお
いて、上記A相,B相の正弦波信号からハイパスフィル
タによっての直流成分を除去し、A相,B相の一方の信
号が所定レベル以上のときの他方の信号の中性点を求め
、該中性点における上記A相,B相の値をそれぞれ補正
値とし、A相,B相の信号に対してそれぞれ上記補正値
を補正することを特徴とするセンサ信号の自動オフセッ
ト補正方式。
[Claim 2] A phase of a sine wave signal and a sine wave signal having a phase difference of 90 degrees from the sine wave signal due to the movement of the moving body;
In the offset correction method for a detector that generates a B-phase signal, the DC component is removed from the A-phase and B-phase sine wave signals by a high-pass filter, and one of the A-phase and B-phase signals exceeds a predetermined level. Find the neutral point of the other signal when Features an automatic offset correction method for sensor signals.
【請求項3】  移動体の移動によって正弦波信号と該
正弦波信号より90度位相差のある正弦波信号のA相,
B相の信号を発生する検出器のオフセット補正方式にお
いて、上記A相,B相の正弦波信号からハイパスフィル
タによっての直流成分を除去すると共にハイパスフイル
タによって後所定周波数以下の信号を減衰させた後、A
相,B相の一方の信号が所定レベル以上のときの他方の
信号の中性点を求め、該中性点における上記A相,B相
の値をそれぞれ補正値とし、A相,B相の信号に対して
それぞれ上記補正値を補正することを特徴とするセンサ
信号の自動オフセット補正方式。
3. The A phase of the sine wave signal and the sine wave signal having a phase difference of 90 degrees from the sine wave signal due to the movement of the moving body,
In the offset correction method for a detector that generates a B-phase signal, a high-pass filter removes the DC component from the A-phase and B-phase sine wave signals, and the high-pass filter attenuates signals below a predetermined frequency. ,A
When one of the phase and B signals is at a predetermined level or higher, find the neutral point of the other signal, use the above values of the A phase and B phase at the neutral point as correction values, and calculate the values of the A phase and B phase. An automatic offset correction method for sensor signals, characterized in that each signal is corrected by the above correction value.
【請求項4】  上記中性点における上記A相,B相の
値をそれぞれ複数記憶し、その平均をそれぞれ補正値と
した請求項1,請求項2若しくは請求項3記載のセンサ
信号の自動オフセット補正方式。
4. Automatic offset of a sensor signal according to claim 1, claim 2, or claim 3, wherein a plurality of values of the A phase and B phase at the neutral point are each stored, and the average thereof is used as the respective correction value. Correction method.
JP3165281A 1991-06-11 1991-06-11 Automatic offset correction system for sensor signal Pending JPH04365542A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3165281A JPH04365542A (en) 1991-06-11 1991-06-11 Automatic offset correction system for sensor signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3165281A JPH04365542A (en) 1991-06-11 1991-06-11 Automatic offset correction system for sensor signal

Publications (1)

Publication Number Publication Date
JPH04365542A true JPH04365542A (en) 1992-12-17

Family

ID=15809354

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3165281A Pending JPH04365542A (en) 1991-06-11 1991-06-11 Automatic offset correction system for sensor signal

Country Status (1)

Country Link
JP (1) JPH04365542A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998051997A1 (en) * 1997-05-12 1998-11-19 Fanuc Ltd Offset correcting circuit for encoder
KR100489102B1 (en) * 2003-04-30 2005-05-12 현대자동차주식회사 a device and the method for a compensation of sensor signal in automobile
JP2010276482A (en) * 2009-05-28 2010-12-09 Shindengen Electric Mfg Co Ltd Position detection device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998051997A1 (en) * 1997-05-12 1998-11-19 Fanuc Ltd Offset correcting circuit for encoder
US6215426B1 (en) 1997-05-12 2001-04-10 Fanuc Ltd. Offset correcting circuit for encoder
KR100489102B1 (en) * 2003-04-30 2005-05-12 현대자동차주식회사 a device and the method for a compensation of sensor signal in automobile
JP2010276482A (en) * 2009-05-28 2010-12-09 Shindengen Electric Mfg Co Ltd Position detection device

Similar Documents

Publication Publication Date Title
KR101468323B1 (en) Apparatus and method for compensating output signal of magnetic encoder using digital pll
JP2003254785A (en) Signal processor for encoder
US5625310A (en) Signal processing apparatus and displacement detecting apparatus using the same
JPH07218288A (en) Absolute position detector and its error correcting method
Van Hoang et al. Signal compensation and extraction of high resolution position for sinusoidal magnetic encoders
EP0724137B1 (en) Interpolation device
US20140055129A1 (en) Resolver interface
AU2004229639B2 (en) High resolution, high dynamic range analog-to-digital converter system and related techniques
KR101834526B1 (en) Apparatus for compensating output signal of magnetic encoder
JP2571096B2 (en) Encoder
US7720180B2 (en) Tracking error detection and correction methods and apparatus
CN116182924A (en) Phase compensation method, device and magnetic encoder
US6598196B1 (en) Technique for correcting errors in position encoders
JPH0757111B2 (en) Magnetic disk servo circuit
JPH04365542A (en) Automatic offset correction system for sensor signal
JPH10311743A (en) Offset correction circuit of encoder
JP2004219333A (en) Encoder output signal correcting device
JPH0658769A (en) Signal processing method and displacement detector using method thereof
JP2002243501A (en) Automatic adjustment device for encoder output signal
JPH03296618A (en) Correcting method of waveform for interpolation
JPH03223621A (en) Interpolating method with phase correction for encoder
Groling et al. High-performance position evaluation of optical encoders via a CORDIC algorithm and oversampling techniques on an FPGA
JPH05256638A (en) Position detector with error compensating function
JPH04264212A (en) Automatic offset/amplitude correction system for sensor signal
JPH0622331B2 (en) DA converter