JPH04264212A - Automatic offset/amplitude correction system for sensor signal - Google Patents

Automatic offset/amplitude correction system for sensor signal

Info

Publication number
JPH04264212A
JPH04264212A JP3045335A JP4533591A JPH04264212A JP H04264212 A JPH04264212 A JP H04264212A JP 3045335 A JP3045335 A JP 3045335A JP 4533591 A JP4533591 A JP 4533591A JP H04264212 A JPH04264212 A JP H04264212A
Authority
JP
Japan
Prior art keywords
signal
offset
phase
sensor
corrected
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
JP3045335A
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 JP3045335A priority Critical patent/JPH04264212A/en
Publication of JPH04264212A publication Critical patent/JPH04264212A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To automatically execute an offset correction and an amplitude correction for a signal from a sensor of a detector which detects a speed and position. CONSTITUTION:Signals from sensors in detectors which are mounted on a spindle of a machine tools and a rotating shaft of a motor to detect rotational speeds and positions are converted into digital values to obtain (S3) averages (S1 and S2). As the averages are values of amplitude centers, offset correction values HA and HB are determined (S4) in difference between the values and values of set amplitude centers. An offset correction value is added to values of signals from the sensors to determine signals PCDa and PCDb without offset (S7) and a signal of the position interpolated in a sine wave of the sensor signal is determined from the signals. Moreover. analog values of the offset correction values HA and HB are added to the sensor signal to determine an analog signal offset corrected while an amplitude correction is performed to obtain feedback signals of the position and speed.

Description

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

【0001】0001

【産業上の利用分野】本発明は、工作機械の主軸若しく
はモータの回転軸の速度・位置を検出するセンサーにお
けるオフセット,振幅補正方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an offset and amplitude correction method for a sensor that detects the speed and position of a main shaft of a machine tool or a rotating shaft of a motor.

【0002】0002

【従来の技術】工作機械の主軸若しくはモータの回転軸
の速度・位置を検出する検出器は、回転軸にコード板を
取り付け、該コード板に対して配設されたセンサーより
90度位相差のあるA相,B相の正弦波を出力し、該A
相,B相の正弦波より、回転軸の速度及び位置を検出し
ている。この場合、上記A相,B相の正弦波にオフセッ
トがあると(振幅中心が設定値よりずれている場合)正
確な速度,位置を検出できない。そのため、センサー信
号のオフセット補正回路が設けられている。
[Prior Art] A detector for detecting the speed and position of the main shaft of a machine tool or the rotating shaft of a motor has a code plate attached to the rotating shaft, and a sensor arranged with respect to the code plate has a 90 degree phase difference. Output a certain A-phase and B-phase sine wave, and
The speed and position of the rotating shaft are detected from the 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 center of amplitude deviates from the set value), accurate speed and position cannot be detected. Therefore, a sensor signal offset correction circuit is provided.

【0003】図7は従来用いられているこのセンサー信
号オフセット補正の回路図である。図7においてMA,
RMAはA相信号の正弦波とその信号を反転したA相反
転信号である。また、MBはA相信号より90度位相差
のあるB相正弦波信号でRMBはこのB相信号MBの反
転信号である。100aは差動増幅器でA相の正弦波信
号MAとその反転信号RMAの差を増幅する。また、1
00bも差動増幅器で、B相の正弦波信号MBとその反
転信号RMBの差を増幅する。101a,101bはオ
フセット調整用可変抵抗器で、VM は設定中性点電圧
であり、差動増幅器100a,100bの出力電圧を観
察し、該出力電圧の正弦波の振幅中心が上記中性点電圧
VM になりオフセットが0Vになるように上記可変抵
抗器101a,101bを調整する。また、102a,
102bはアナログ/ディジタル変換器(以下A/D変
換器という)で、上記オフセット補正された差動増幅器
100a,100bの出力をディジタル値に変換するも
のである。また、103はROMであり、上記A/D変
換器102a,102bの出力をアドレス信号とし、上
記A相正弦波と同期した矩形波信号Sg2とこの信号S
g2より45度位相差のある矩形波信号Sg3、及びB
相信号MBと同期した矩形波信号Sg4とこの信号Sg
4より45度位相差のある矩形波信号Sg5を出力する
ものである。
FIG. 7 is a circuit diagram of this conventional sensor signal offset correction. In Figure 7, MA,
RMA is a sine wave of an A-phase signal and an A-phase inverted signal obtained by inverting that signal. Further, MB is a B-phase sine wave signal having a phase difference of 90 degrees from the A-phase signal, and RMB is an inverted signal of this B-phase signal MB. A differential amplifier 100a amplifies the difference between the A-phase sine wave signal MA and its inverted signal RMA. Also, 1
00b is also a differential amplifier, which amplifies the difference between the B-phase sine wave signal MB and its inverted signal RMB. 101a and 101b are variable resistors for offset adjustment, VM is a set neutral point voltage, and the output voltages of the differential amplifiers 100a and 100b are observed, and the amplitude center of the sine wave of the output voltage is set to the above neutral point voltage. The variable resistors 101a and 101b are adjusted so that VM is reached and the offset is 0V. Also, 102a,
Reference numeral 102b is an analog/digital converter (hereinafter referred to as an A/D converter) which converts the offset-corrected outputs of the differential amplifiers 100a and 100b into digital values. Further, 103 is a ROM, which uses the outputs of the A/D converters 102a and 102b as address signals, and generates a rectangular wave signal Sg2 synchronized with the A-phase sine wave and this signal S.
Rectangular wave signal Sg3 with a 45 degree phase difference from g2, and B
Rectangular wave signal Sg4 synchronized with phase signal MB and this signal Sg
4, a rectangular wave signal Sg5 having a phase difference of 45 degrees is output.

【0004】すなわち、A/D変換器102aから出力
されるA相信号を横軸に取り、A/D変換器102bか
ら出力されるB相信号を縦軸に取るとA相,B相の各値
で示される点はリサジュー図形で円となり、正弦波1サ
イクル内の回転角が分かる。そのため、A/D変換器1
02a,102bの出力であるA相,B相の信号をRO
M103のアドレスとして入力しそのアドレスに回転角
情報を記憶させておくことによって上述した出力信号S
g2〜Sg5を出力させることができるものである。そ
して、これら信号Sg2〜SG5より、速度、位置を検
出するようにしている。なお、Sg1はROM103の
入力信号が規格値から外れた場合のアラーム信号である
。また、図7でRは抵抗である。
That is, if the A-phase signal output from the A/D converter 102a is plotted on the horizontal axis, and the B-phase signal output from the A/D converter 102b is plotted on the vertical axis, each of the A-phase and B-phase The point indicated by the value becomes a circle in the Lissajous figure, and the rotation angle within one cycle of the sine wave can be determined. Therefore, A/D converter 1
The A-phase and B-phase signals output from 02a and 102b are RO
By inputting it as the address of M103 and storing the rotation angle information in that address, the above-mentioned output signal S
It is possible to output signals g2 to Sg5. Then, the speed and position are detected from these signals Sg2 to SG5. Note that Sg1 is an alarm signal when the input signal of the ROM 103 deviates from the standard value. Further, in FIG. 7, R is a resistance.

【0005】[0005]

【発明が解決しようとする課題】上述したようにセンサ
ー信号のオフセット補正は、可変抵抗器101a,10
1bを調整することによって行われている。そのため、
オフセット値はオフセット補正が行われたときの温度や
回転軸の速度等によって決まり、固定的であり、温度変
化等によって上記オフセット値がずれ、0Vでなくなる
と上記ROM103のアドレスが変動し、検出速度,位
置も変動することになり、安定した検出ができない。さ
らに、正弦波の振幅が変動すると検出速度,位置の変動
も大きくなり、正確な値を検出できない。また、回転位
置をきめる主軸のC軸制御や、2つの主軸を同期させる
場合などにおいては、上記正弦波のある角度における値
が問題になるので、振幅の変動はこれらC軸制御,同期
運転等で正確な制御ができないという現象が生じる。
[Problems to be Solved by the Invention] As described above, offset correction of the sensor signal is performed using the variable resistors 101a and 10.
This is done by adjusting 1b. Therefore,
The offset value is determined by the temperature at the time offset correction is performed, the speed of the rotating shaft, etc., and is fixed. If the offset value shifts due to temperature changes and is no longer 0V, the address in the ROM 103 will change, and the detected speed will change. , the position will also fluctuate, making stable detection impossible. Furthermore, if the amplitude of the sine wave fluctuates, the detection speed and position will also fluctuate, making it impossible to detect accurate values. In addition, in cases such as C-axis control of the spindle that determines the rotational position or synchronization of two spindles, the value at a certain angle of the above sine wave becomes a problem, so amplitude fluctuations are affected by these C-axis control, synchronous operation, etc. A phenomenon occurs in which accurate control cannot be achieved.

【0006】そこで本発明の目的は、センサー信号を自
動的にオフセット補正しかつ振幅も自動的に補正するオ
フセット・振幅補正方式を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an offset/amplitude correction method that automatically corrects the offset of a sensor signal and also automatically corrects the amplitude.

【0007】[0007]

【課題を解決するための手段】本発明は、工作機械の主
軸若しくはモータの回転軸の回転によって90度位相差
のある信号を出力するセンサーからの信号を所定周期で
サンプリングしデジタル値にして平均値を求め、該平均
値と中性点電圧値よりオフセット補正量を求め、該オフ
セット補正量をアナログ量に変換し、該アナログ量化さ
れたオフセット補正量に基づいて上記センサー信号をオ
フセット補正し、オフセット補正が行われた信号に対し
て該信号の振幅の規格化を行ない振幅を補正し速度・位
置のフィードバック信号とすると共に、各サンプリング
周期毎検出されたセンサーからの信号のディジタル値に
ディジタル量の上記フセット補正量を加算してオフセッ
ト補正されたA相,B相の信号値を求め、該オフセット
補正されたA相,B相の信号値より正弦波内を内挿した
回転位置の信号をも求めるようにした。
[Means for Solving the Problems] The present invention samples signals from a sensor that outputs signals with a 90 degree phase difference depending on the rotation of the main shaft of a machine tool or the rotating shaft of a motor at a predetermined period, converts them into digital values, and averages them. determine an offset correction amount from the average value and the neutral point voltage value, convert the offset correction amount into an analog amount, and perform offset correction on the sensor signal based on the analog quantified offset correction amount; The amplitude of the offset-corrected signal is normalized, the amplitude is corrected, and the signal is used as a feedback signal for velocity/position. At the same time, the digital value of the signal from the sensor detected at each sampling period is converted into a digital value. The above offset correction amount is added to obtain the offset-corrected signal values of the A-phase and B-phase, and the rotational position signal is obtained by interpolating the inside of the sine wave from the offset-corrected A-phase and B-phase signal values. I also asked for it.

【0008】[0008]

【作用】上記サンプリング周期より十分速い速度で上記
回転軸が回転していると、上記平均値は、A相,B相の
振幅中心の値になる。そこで、この平均値によって求め
られた振幅中心と、設定されたA相,B相の中性点電圧
値(振幅中心電圧値)との差を求めると、これはオフセ
ット補正量となる。このオフセット補正量をアナログ値
に変換しこの変換されたオフセット補正量をセンサーか
らの信号に対して補正すれば、オフセットのない(正弦
波の中性点電圧が設定電圧に等しい)信号となる。こう
してオフセット補正された信号に対しての振幅の規格化
を行ない振幅補正を行ない速度・位置のフィードバック
信号とする。さらに、各サンプリング周期毎検出された
センサーからの信号のディジタル値にディジタル量の上
記フセット補正量を加算すれば、オフセット補正された
A相,B相の信号が得られ、このオフセット補正された
A相,B相の信号より、従来と同様な方法により正弦波
を内挿する回転角の位置示すポジションコーダ相当用の
信号が得られる。
[Operation] When the rotating shaft rotates at a speed sufficiently faster than the sampling period, the average value becomes the value at the center of the amplitude of the A phase and B phase. Therefore, when the difference between the amplitude center determined from this average value and the set neutral point voltage values (amplitude center voltage values) of the A phase and B phase is determined, this becomes the offset correction amount. If this offset correction amount is converted into an analog value and the converted offset correction amount is corrected for the signal from the sensor, a signal without offset (the neutral point voltage of the sine wave is equal to the set voltage) will be obtained. The amplitude of the offset-corrected signal is normalized and the amplitude is corrected to obtain a velocity/position feedback signal. Furthermore, by adding the digital offset correction amount to the digital value of the signal from the sensor detected every sampling period, offset-corrected A-phase and B-phase signals are obtained, and this offset-corrected A-phase and B-phase signals are obtained. From the phase and B phase signals, a signal equivalent to a position coder indicating the position of the rotation angle for interpolating the sine wave is obtained using a method similar to the conventional method.

【0009】[0009]

【実施例】図1,図2は本発明の一実施例のセンサー信
号オフセット・振幅補正の回路図である。図中、1a,
1bはA相正弦波信号MAとその反転信号RMAとの差
及びB相正弦波信号MBとその反転信号RMBとの差を
夫々増幅する差動増幅器、2a,2bはA/D変換器、
3a,3b,5a,5b,8a,8bはラッチ回路、4
はマイクロコンピュータでプロセッサ、ROM,RAM
等のメモリを有する。6a,6bはディジタル/アナロ
グ変換器(以下D/A変換器という)、7a,7bは加
算器、9はROM、ポジションコーダ相当信号作成用回
路、11a,11bは加減算器、12a,12bはA/
D変換器、13はROM、14a,14bはD/A変換
器、15a,15bは減算器である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIGS. 1 and 2 are circuit diagrams for sensor signal offset/amplitude correction according to an embodiment of the present invention. In the figure, 1a,
1b is a differential amplifier that amplifies the difference between the A-phase sine wave signal MA and its inverted signal RMA, and the difference between the B-phase sine wave signal MB and its inverted signal RMB; 2a and 2b are A/D converters;
3a, 3b, 5a, 5b, 8a, 8b are latch circuits, 4
is a microcomputer with processor, ROM, and RAM
It has memory such as. 6a and 6b are digital/analog converters (hereinafter referred to as D/A converters), 7a and 7b are adders, 9 is a ROM, a circuit for creating a signal equivalent to a position coder, 11a and 11b are adders/subtractors, and 12a and 12b are A /
A D converter, 13 is a ROM, 14a and 14b are D/A converters, and 15a and 15b are subtracters.

【0010】センサーから出力されたA相信号MAとそ
の反転信号RMA、及びB相信号MBとその反転信号R
MBは夫々差動増幅器1a,1bで増幅され、A/D変
換器2a,2bでディジタル信号に変換される。そして
、マイクロコンピュータ4からのラッチ指令LT1によ
ってラッチ回路3a,3bにラッチされ、その後上記マ
イクロコンピュータ4から出力される読み出し指令でデ
ータバスDBを介してマイクロコンピュータ4に入力さ
れるようになっている。。なお、A/D変換器2a,2
bは8ビットの出力を出力しA相、B相信号はそれぞれ
8ビットのディジタル値で表されることになる。
A-phase signal MA and its inverted signal RMA, and B-phase signal MB and its inverted signal R output from the sensor.
The MBs are amplified by differential amplifiers 1a and 1b, respectively, and converted into digital signals by A/D converters 2a and 2b. Then, it is latched by the latch circuits 3a and 3b in response to a latch command LT1 from the microcomputer 4, and is then input to the microcomputer 4 via the data bus DB in response to a read command output from the microcomputer 4. . . Note that the A/D converters 2a, 2
b outputs an 8-bit output, and the A-phase and B-phase signals are each represented by 8-bit digital values.

【0011】一方マイクロコンピュータ4のプロセッサ
は、図3に示す処理を所定周期毎実施している。なお、
本実施例においては、サンプリングしたデータ数が25
6でオフセット補正値を求めるようにしている。また、
このサンプリングデータ数が多くなる程低速域までオフ
セット補正が可能になる。
On the other hand, the processor of the microcomputer 4 executes the process shown in FIG. 3 at predetermined intervals. In addition,
In this example, the number of sampled data is 25.
6 to find the offset correction value. Also,
As the number of sampling data increases, offset correction becomes possible up to a low speed range.

【0012】まず、本装置に電源が投入されたときマイ
クロコンピュータ4のプロセッサは初期化を行ない、サ
ンプリングデータD(0)〜D(255)を記憶するR
AMの各値を中性点電圧VM の値(10進法で128
)に設定し、指標iを「0」に設定する。そして、マイ
クロコンピュータ4のプロセッサはラッチ回路3a,3
bにラッチ指令LT1を出力した後、読み出し指令をラ
ッチ回路3a,3bに出力し、ラッチ回路3a,3bに
記憶するデータD(i)を読み取る(ステップS1)、
次に指標iに対応するRAMのアドレスに該読み取った
データD(i)を格納する(ステップS2)。なお、各
アドレスの0〜7ビットにはA相のデータが、8〜15
ビットにはB相のデータが記憶される。そして、RAM
のアドレス0〜255に記憶するA相,B相のデータの
平均値Na,Nbを次の1式,2式を演算することによ
って求め(ステップS3)、円のリサジュー図形の中心
点を求める。なお、Da(i)をデータD(i)のA相
のデータ、Db(i)をデータD(i)のB相のデータ
としている。
First, when the power is turned on to this device, the processor of the microcomputer 4 initializes and stores sampling data D(0) to D(255).
Each value of AM is converted to the value of neutral point voltage VM (128 in decimal notation)
) and set the index i to "0". The processor of the microcomputer 4 has latch circuits 3a and 3.
After outputting a latch command LT1 to b, outputting a read command to latch circuits 3a and 3b, and reading data D(i) stored in latch circuits 3a and 3b (step S1);
Next, the read data D(i) is stored in the RAM address corresponding to the index i (step S2). Note that the 0 to 7 bits of each address contain A phase data of 8 to 15 bits.
B-phase data is stored in the bit. And RAM
The average values Na and Nb of the A-phase and B-phase data stored in addresses 0 to 255 are obtained by calculating the following equations 1 and 2 (step S3), and the center point of the Lissajous figure of the circle is obtained. Note that Da(i) is the A-phase data of the data D(i), and Db(i) is the B-phase data of the data D(i).

【0013】     Na=[Da(0)+Da(1)+Da(2)
+…      … +Da(255) ]/256 
   …(1)    Nb=[Db(0)+Db(1
)+Db(2)+…      … +Db(255)
 ]/256    …(2)そして、この平均値Na
,Nbの「2」の補数NEG(Na),NEG(Nb)
をオフセット補正値HA,HBとし、データバスDBに
出力し(ステップS4,S5)、ラッチ回路5a,5b
にラッチ指令LT3を出力してこのオフセット補正値H
A,HBをラッチ回路5a,5bにラッチさせる(ステ
ップS6)。次に、上記オフセット補正値HA,HBに
それぞれ当該周期で検出されたA相,B相のデータDa
(i),Db(i)を3式,4式に示すように加算し、
中性点電圧VM に対応する値「128」を減算してポ
ジションコーダ相当信号PCD(PCDa,PCDb)
を求めてデータバスDBに出力し(ステップS7,S8
)、ラッチ回路8a,8bにラッチ信号LT2を出力し
(ステップS9)、ラッチ回路8a,8bに記憶させる
。なお、本実施例においては、後述するROM9のA相
,B相のそれぞれのアドレスが6ビットで構成されてい
るので、ポジションコーダ相当信号PCD(PCDa,
PCDb)は下位2ビットが切り捨てられ上位6ビット
のみが出力される。
[0013] Na=[Da(0)+Da(1)+Da(2)
+……+Da(255)]/256
...(1) Nb=[Db(0)+Db(1)
)+Db(2)+......+Db(255)
]/256...(2) And this average value Na
, "2's" complement of Nb NEG (Na), NEG (Nb)
are set as offset correction values HA, HB and output to the data bus DB (steps S4, S5), and the latch circuits 5a, 5b
This offset correction value H is output by outputting the latch command LT3 to
A and HB are latched by latch circuits 5a and 5b (step S6). Next, the A-phase and B-phase data Da detected in the corresponding period are added to the offset correction values HA and HB, respectively.
Add (i) and Db(i) as shown in equations 3 and 4,
Subtract the value "128" corresponding to the neutral point voltage VM to obtain the position coder equivalent signal PCD (PCDa, PCDb)
is determined and output to the data bus DB (steps S7, S8
), outputs the latch signal LT2 to the latch circuits 8a, 8b (step S9), and stores it in the latch circuits 8a, 8b. In this embodiment, since each address of the A phase and B phase of the ROM 9, which will be described later, is composed of 6 bits, the position coder equivalent signal PCD (PCDa,
PCDb), the lower 2 bits are discarded and only the upper 6 bits are output.

【0014】           PCDa=Da(i)+HA−1
28        …(3)          P
CDb=Db(i)+HB−128        …
(4)そして、指標iを「1」インクリメントし(ステ
ップS10)、該指標iが「256」であるか否か判断
し(ステップS11)、「256」でなければ当該周期
の処理を終了し、指標iが「256」であれば、該指標
iを「0」にセットし(ステップS12)当該周期を終
了する。以下、プロセッサは上記処理を所定周期毎繰り
返す。
PCDa=Da(i)+HA-1
28...(3) P
CDb=Db(i)+HB-128...
(4) Then, the index i is incremented by "1" (step S10), and it is determined whether the index i is "256" (step S11), and if it is not "256", the processing for the corresponding cycle is terminated. , if the index i is "256", the index i is set to "0" (step S12) and the cycle ends. Thereafter, the processor repeats the above process every predetermined period.

【0015】次に、上記オフセット補正値HA,HBが
オフセット補正値になること及び、ポジションコーダ相
当信号PCDに相当することを図4と共に説明する。
Next, it will be explained with reference to FIG. 4 that the offset correction values HA and HB become offset correction values and correspond to the position coder equivalent signal PCD.

【0016】A相を横軸に取り、B相を縦軸に取り、リ
サジュー図形を描くとすると、A相とB相は90度位相
差があることから円を描くことになる。そこで、A相,
B相のデータ正弦波データDa,Dbによりリサジュー
図形を描くと、例えば図4中円C1であったとすれば、
このデータDa,Dbの平均をとると中心点Nmの座標
値(Na,Nb)が求まる。そして、中心点Nmの「2
」の補数を取ったものがオフセット補正値HA,HBと
なる。この補正値により補正すれば、設定中性点VM 
を中心にする補正された円C2になりオフセットが補正
される。この補正されたA相,B相の値より正弦波内を
内挿する回転角が分かることになる。例えば、算出され
た中心点のA相の値Naが「148」であるとすると、
2進数で各ビットの「1」と「0」を逆にし2進数の「
1」を加算することで補数をとると「108」となる。 すなわち、補正値HA=NEG(148)=108とな
り、A相の検出値が例えば「236」で、この値に上記
補正値「108」を加算するし、中性点電圧VM に相
当する値「128」を減算すると「216」となり、A
相に対してオフセット補正が行われたことになる。B相
についても、同様な処理を行なうことで、オフセット補
正が行われる。
If a Lissajous figure is drawn with phase A on the horizontal axis and phase B on the vertical axis, a circle will be drawn since the phases A and B have a 90 degree phase difference. Therefore, phase A,
When a Lissajous figure is drawn using the B-phase data sine wave data Da and Db, for example, if it is a circle C1 in FIG.
By taking the average of these data Da and Db, the coordinate values (Na, Nb) of the center point Nm can be found. Then, “2” of the center point Nm
'' becomes the offset correction values HA and HB. If corrected using this correction value, the set neutral point VM
The offset is corrected to create a corrected circle C2 centered at . The rotation angle for interpolating within the sine wave can be determined from the corrected A-phase and B-phase values. For example, if the calculated A-phase value Na at the center point is "148",
By reversing the “1” and “0” of each bit in binary numbers, we get the binary number “1” and “0”.
If we take the complement by adding ``1'', we get ``108''. That is, the correction value HA = NEG (148) = 108, and the detected value of the A phase is, for example, "236", the above correction value "108" is added to this value, and the value corresponding to the neutral point voltage VM is "128" is subtracted, it becomes "216", which is A
This means that offset correction has been performed on the phase. Offset correction is also performed for the B phase by performing similar processing.

【0017】ステップS5でオフセット補正値HA,H
Bがマイクロコンピュータ4から出力され、ラッチ回路
5a,5bにラッチ信号LT3でラッチされると、この
ラッチ回路5a,5bの出力は、D/A変換器でアナロ
グ電圧に変換され、この電圧に補正電圧正規化電圧VN
 及び中性点の電圧VM が加算され、オフセット補正
値を正規化したオフセット補正電圧HA,HBを加算器
7a,7bで作成する。例えば、D/A変換器の出力が
4〜5Vであるとこれを2〜3Vに変換する。
In step S5, offset correction values HA, H
When B is output from the microcomputer 4 and latched by the latch signal LT3 in the latch circuits 5a and 5b, the output of the latch circuits 5a and 5b is converted into an analog voltage by a D/A converter, and corrected to this voltage. Voltage normalized voltage VN
and the neutral point voltage VM are added, and adders 7a and 7b create offset correction voltages HA and HB by normalizing the offset correction value. For example, if the output of the D/A converter is 4 to 5V, it is converted to 2 to 3V.

【0018】そして、加減算器11a,11bはこの正
規化されたオフセット電圧HA,HBに差動増幅器1a
,1bから出力されるA相,B相の正弦波電圧を加算し
、中性点電圧VM を減じて速度帰還信号VA,VBを
出力する。すなわち、この速度帰還信号VA,VBは中
性点電圧VM との電位差であり、0Vを中心とし上下
に振動するものとなる。
Then, the adder/subtractors 11a and 11b apply the normalized offset voltages HA and HB to the differential amplifier 1a.
, 1b are added, and the neutral point voltage VM is subtracted to output speed feedback signals VA and VB. That is, the speed feedback signals VA and VB are the potential difference with the neutral point voltage VM, and vibrate up and down with 0V as the center.

【0019】さらに、この速度帰還信号VA,VBはA
/D変換器12a,12bに入力され、ディジタル値に
変換され、この信号はROM13のアドレスとして入力
され、該ROM13には、速度帰還信号VA,VBの値
の組み合わせに応じて振幅補正用データが記憶されてお
り、この振幅補正用データが出力され、これをD/A変
換器14a,14bでアナログ電圧VAc,VBcに変
換し、加算器15a,15bで、この振幅補正用電圧V
Ac,VBcと加減算器11a,11bから出力される
速度帰還信号VA,VB、さらに中性点電圧VM,VM
 が加算されて速度帰還信号VfA,VfBが出力され
る。 すなわち図5に示すように、中性点電圧VM を振幅中
心とする正弦波のA相,B相の正弦波信号が速度帰還信
号VfA,VfBとして出力されることになる。
Furthermore, these speed feedback signals VA and VB are A
The signal is input to the /D converters 12a and 12b and converted into a digital value, and this signal is input as an address to the ROM 13, and the ROM 13 stores amplitude correction data in accordance with the combination of the values of the velocity feedback signals VA and VB. This amplitude correction data is output, and is converted into analog voltages VAc and VBc by D/A converters 14a and 14b, and added by adders 15a and 15b.
Ac, VBc, speed feedback signals VA, VB output from adders/subtractors 11a, 11b, and neutral point voltages VM, VM
are added to output speed feedback signals VfA and VfB. That is, as shown in FIG. 5, sinusoidal A-phase and B-phase sine wave signals having the amplitude center at the neutral point voltage VM are output as speed feedback signals VfA and VfB.

【0020】一方、ステップS6で出力されステップS
7で出力されるラッチ信号LT2によりラッチ回路8a
,8bでラッチされたポジションコーダ相当信号用デー
タはROM9のアドレスに入力される。このROM9に
は、図6に示すように正弦波半サイクルを16分割して
その回転角を4ビットで記憶しており、この各ビットの
出力がこのROM9から出力され、この出力より、ポジ
ションコーダ相当信号作成用回路10で図6に示すよう
に、正弦波の1/4周期を1周期とするA相,B相のポ
ジションコーダ相当信号PA,PBを出力する。なお、
このROM9,ポジションコーダ相当信号作成用回路1
0の詳細は特願平2−330006号に記載されたもの
と同等である。
On the other hand, the output in step S6 is
The latch circuit 8a is activated by the latch signal LT2 output at 7.
, 8b is input to the address of the ROM 9. As shown in FIG. 6, this ROM9 stores the rotation angle of 16 divided sine wave half cycles in 4 bits.The output of each bit is outputted from this ROM9, and from this output, the position coder As shown in FIG. 6, the equivalent signal generating circuit 10 outputs A-phase and B-phase position coder equivalent signals PA and PB, each of which has one period equal to 1/4 period of a sine wave. In addition,
This ROM9, position coder equivalent signal creation circuit 1
The details of 0 are the same as those described in Japanese Patent Application No. 2-330006.

【0021】[0021]

【発明の効果】本発明においては、センサーからの信号
の振幅中心を求め、この中心が設定されている振幅中心
になるようにオフセット補正が常に行われるので、セン
サー信号の周波数変化や温度変化によってオフセットが
ずれても自動的に補正され、その結果、正確な速度及び
位置のフィードバック信号をうることができる。さらに
、センサー信号の振幅も規格化されたものに補正される
ので、センサー信号の正弦波サイクル内を内挿した位置
も正確になり、回転位置を決める主軸のC軸制御、及び
主軸の同期制御が正確になる。
[Effects of the Invention] In the present invention, the amplitude center of the signal from the sensor is determined, and offset correction is always performed so that this center becomes the set amplitude center. Any offset deviations are automatically corrected, resulting in accurate velocity and position feedback signals. Furthermore, since the amplitude of the sensor signal is also corrected to a standardized value, the interpolated position within the sine wave cycle of the sensor signal is also accurate, and the C-axis control of the spindle, which determines the rotational position, and the synchronous control of the spindle. becomes accurate.

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

【図1】本発明の一実施例のセンサー信号オフセット・
振幅補正の回路図の一部である。
FIG. 1: Sensor signal offset and
This is part of the amplitude correction circuit diagram.

【図2】同回路図の続きである。FIG. 2 is a continuation of the same circuit diagram.

【図3】同実施例におけるマイクロコンピュータのプロ
セッサが実施する処理のフローチャートである。
FIG. 3 is a flowchart of processing executed by the processor of the microcomputer in the same embodiment.

【図4】同実施例におけるオフセット補正の説明図であ
る。
FIG. 4 is an explanatory diagram of offset correction in the same embodiment.

【図5】同実施例における振幅補正の説明図である。FIG. 5 is an explanatory diagram of amplitude correction in the same embodiment.

【図6】同実施例のポジションコーダ相当信号作成の説
明図である。
FIG. 6 is an explanatory diagram of creating a position coder-equivalent signal in the same embodiment.

【図7】従来のオフセット補正回路図である。FIG. 7 is a diagram of a conventional offset correction circuit.

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

1a,1b  差動増幅器 2a,2b,12a,12b  A/D変換器3a,3
b,5a,5b,8a,8b  ラッチ回路4  マイ
クロコンピュータ 6a,6b  ディジタル/アナログ変換器(以下D/
A変換器) 7a,7b  加算器 9,13  ROM 10  ポジションコーダ相当信号作成用回路11a,
11b  加減算器 14a,14b  D/A変換器 15a,15b  減算器
1a, 1b Differential amplifier 2a, 2b, 12a, 12b A/D converter 3a, 3
b, 5a, 5b, 8a, 8b Latch circuit 4 Microcomputer 6a, 6b Digital/analog converter (hereinafter referred to as D/
A converter) 7a, 7b Adder 9, 13 ROM 10 Position coder equivalent signal creation circuit 11a,
11b Addition/subtraction device 14a, 14b D/A converter 15a, 15b Subtractor

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】  工作機械の主軸若しくはモータの回転
軸の回転によって90度位相差のある信号を出力するセ
ンサーの信号より上記回転軸の速度及び位置を検出する
速度・位置検出方式であって、上記センサーからの信号
を所定周期でサンプリングしデジタル値にして平均値を
求め、該平均値と中性点電圧値よりオフセット補正量を
求め、該オフセット補正量をアナログ量に変換し、該ア
ナログ量化されたオフセット補正量に基づいて上記セン
サー信号をオフセット補正し、オフセット補正が行われ
た信号に対して該信号の振幅の規格化を行ない振幅を補
正し速度・位置のフィードバック信号としたセンサー信
号の自動オフセット・振幅補正方式。
1. A speed/position detection method for detecting the speed and position of a rotating shaft of a machine tool or a rotating shaft of a motor based on a signal from a sensor that outputs a signal with a 90 degree phase difference according to the rotation of the rotating shaft, The signal from the above sensor is sampled at a predetermined period, converted into a digital value, and the average value is determined. The offset correction amount is determined from the average value and the neutral point voltage value. The offset correction amount is converted to an analog value. The sensor signal is offset-corrected based on the offset correction amount, and the amplitude of the signal is normalized for the offset-corrected signal, and the amplitude is corrected. Automatic offset/amplitude correction method.
【請求項2】  工作機械の主軸若しくはモータの回転
軸の回転によって90度位相差のある信号を出力するセ
ンサーの信号より上記回転軸の速度及び位置を検出する
速度・位置検出方式であって、上記センサーからの信号
を所定周期でサンプリングしデジタル値にして平均値を
求め、該平均値と中性点電圧値よりオフセット補正量を
求め、各サンプリング周期毎検出されたセンサーからの
信号のディジタル値に上記フセット補正量を加算してオ
フセット補正されたA相,B相の信号値を求め、該オフ
セット補正されたA相,B相の信号値より正弦波内を内
挿した回転位置の信号を求めるようにしたセンサー信号
の自動オフセット方式。
2. A speed/position detection method that detects the speed and position of the rotating shaft from a sensor outputting a signal with a 90 degree phase difference depending on the rotation of the main shaft of a machine tool or the rotating shaft of a motor, The signal from the sensor is sampled at a predetermined period, converted into a digital value, and the average value is determined. The offset correction amount is determined from the average value and the neutral point voltage value, and the digital value of the signal from the sensor detected at each sampling period is calculated. The offset-corrected A-phase and B-phase signal values are obtained by adding the above offset correction amount to the offset-corrected A-phase and B-phase signal values. Automatic offset method for sensor signals as desired.
【請求項3】  上記センサーからの信号をサンプリン
グしデジタル値にして求めた平均値と中性点電圧値より
求められたオフセット補正量を、各サンプリング周期毎
検出されたセンサーからの信号のディジタル値に加算し
てオフセット補正されたA相,B相の信号値を求め、該
オフセット補正されたA相,B相の信号値より正弦波内
を内挿した回転位置の信号をも求めるようにした請求項
1記載のセンサー信号の自動オフセット・振幅補正方式
3. The average value obtained by sampling the signal from the sensor and converting it into a digital value and the offset correction amount obtained from the neutral point voltage value are calculated as the digital value of the signal from the sensor detected at each sampling period. The offset-corrected A-phase and B-phase signal values are obtained by adding the offset-corrected A-phase and B-phase signal values, and the rotational position signal is also obtained by interpolating the inside of the sine wave from the offset-corrected A-phase and B-phase signal values. The automatic offset/amplitude correction method for a sensor signal according to claim 1.
JP3045335A 1991-02-19 1991-02-19 Automatic offset/amplitude correction system for sensor signal Pending JPH04264212A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3045335A JPH04264212A (en) 1991-02-19 1991-02-19 Automatic offset/amplitude correction system for sensor signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3045335A JPH04264212A (en) 1991-02-19 1991-02-19 Automatic offset/amplitude correction system for sensor signal

Publications (1)

Publication Number Publication Date
JPH04264212A true JPH04264212A (en) 1992-09-21

Family

ID=12716430

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3045335A Pending JPH04264212A (en) 1991-02-19 1991-02-19 Automatic offset/amplitude correction system for sensor signal

Country Status (1)

Country Link
JP (1) JPH04264212A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005164367A (en) * 2003-12-02 2005-06-23 Tamagawa Seiki Co Ltd Correction method for sine wave-like analog signal, correction method for diplophase sine wave-like analog signal, and position data generation method
JP2012105515A (en) * 2010-11-15 2012-05-31 Denso Corp Control apparatus for rotary machine
JP2018185198A (en) * 2017-04-25 2018-11-22 日本精工株式会社 Angle detector, relative angle detector, torque sensor, electric power steering device, and vehicle

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005164367A (en) * 2003-12-02 2005-06-23 Tamagawa Seiki Co Ltd Correction method for sine wave-like analog signal, correction method for diplophase sine wave-like analog signal, and position data generation method
JP2012105515A (en) * 2010-11-15 2012-05-31 Denso Corp Control apparatus for rotary machine
JP2018185198A (en) * 2017-04-25 2018-11-22 日本精工株式会社 Angle detector, relative angle detector, torque sensor, electric power steering device, and vehicle

Similar Documents

Publication Publication Date Title
US5719789A (en) Method of and apparatus for detecting an amount of displacement
JP3368837B2 (en) Resolver signal processor
US5760562A (en) Apparatus and method for generating digital position signals for a rotatable shaft
JP2501227B2 (en) Absolute position encoder
JPH0534105A (en) Multiple-rotation absolute-value encoder
JP2571096B2 (en) Encoder
JPH0772842B2 (en) Numerical control unit with tracking error detection function
JPH04264212A (en) Automatic offset/amplitude correction system for sensor signal
US6950769B2 (en) Encoder signal interpolation divider
JPS59225316A (en) Absolute position detecting method using rotary type absolute value detector
JPH07143799A (en) Secondary resistance detector for induction motor
JPS63111408A (en) Digital position detector
JP2760872B2 (en) Rotational position detector
JPS6136648B2 (en)
CN112666865B (en) Clock synchronization turntable control system based on induction synchronizer
JPH0772163A (en) Detection apparatus for rotational speed of ac motor
JPH04365542A (en) Automatic offset correction system for sensor signal
JPH0212013A (en) Position detector
JPH06292391A (en) Controller for revolution speed of alternating-current motor
KR100310028B1 (en) Detection method of motor rotation angle using AC tacho generator
JPH03223621A (en) Interpolating method with phase correction for encoder
JPH01162101A (en) Absolute position detector
JP2938472B2 (en) Rotation angle detector
JPH04299215A (en) System for detecting signal abnormality of highresolution encoder
JPS6267401A (en) Apparatus for detecting angle