JP2002311040A - Speed detector - Google Patents

Speed detector

Info

Publication number
JP2002311040A
JP2002311040A JP2001116823A JP2001116823A JP2002311040A JP 2002311040 A JP2002311040 A JP 2002311040A JP 2001116823 A JP2001116823 A JP 2001116823A JP 2001116823 A JP2001116823 A JP 2001116823A JP 2002311040 A JP2002311040 A JP 2002311040A
Authority
JP
Japan
Prior art keywords
value
pulse
circuit
timer
time
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
JP2001116823A
Other languages
Japanese (ja)
Inventor
Shinya Morimoto
進也 森本
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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric 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 Yaskawa Electric Corp filed Critical Yaskawa Electric Corp
Priority to JP2001116823A priority Critical patent/JP2002311040A/en
Publication of JP2002311040A publication Critical patent/JP2002311040A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a speed detector capable of detecting an accurate speed even when a duty imbalance and a phase error exist in a bi-phase pulse of an encoder, and responding to a present motor control device by only replacing the speed detector. SOLUTION: The speed detector includes a state determining means for determining four states from an A-phase state, a B-phase state, and output of a code detecting circuit, and four means for storing a time between pulses corresponding to each of the states, calculates a reference value of the time between the pluses by measuring the time between the pulses of the output pulse of a quadrupling circuit and housing in the four means for storing a time between pulses, calculates a time correcting value by comparing data housed in the four means for storing a time between pulses, and corrects the value of a timer storing means 2.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】2相のパルスを出力するエン
コーダの信号を用いてモータの速度を検出する速度検出
装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a speed detecting device for detecting a speed of a motor by using a signal of an encoder that outputs two-phase pulses.

【0002】[0002]

【従来の技術】エンコーダパルスから速度を演算する従
来の速度検出装置を図3に示す。通常、速度の検出は制
御装置から速度の制御のサンプリング周期毎にラッチ信
号を発生させ、検出装置は前記ラッチ信号が入力された
タイミングでエンコーダのパルスをカウントしたデータ
を一次的に記憶して、速度制御からの読み込み要求によ
って前記記憶したデータを転送する。図3において、1
4はエンコーダ出力パルス信号、13は4逓倍回路から
出力される符号信号、12は4逓倍パルス信号、2はカ
ウント回路、3はこのカウンタ回路(2)からの出力信
号を記憶し、カウンタ値15を出力するカウンタ記憶手
段である。4は基準クロックを出すパルス発生回路、5
はこのパルス発生回路(4)からのパルス信号とラッチ
信号18を入力し、時間を計測するタイマ回路1であ
る。6はこのタイマ回路1から出力される信号を記憶す
るタイマ記憶手段1である。7は4逓倍パルス信号12
とラッチ信号18とパルス発生回路4から出力される基
準クロック信号とを入力し時間を計測するタイマ回路2
である。このタイマ回路2(7)の出力はタイマ記憶手
段2により記憶される。。カウンタ回路(2)は、4逓
倍回路(1)から出力される符号信号(13)と4逓倍
パルス信号とラッチ信号(18)とを入力し、パルスの
アップ、ダウンを計測する。
2. Description of the Related Art FIG. 3 shows a conventional speed detecting device for calculating a speed from an encoder pulse. Normally, the speed detection generates a latch signal for each sampling period of the speed control from the control device, and the detection device temporarily stores data obtained by counting the pulses of the encoder at the timing when the latch signal is input, The stored data is transferred according to a read request from the speed control. In FIG. 3, 1
4 is an encoder output pulse signal, 13 is a code signal output from the quadruple circuit, 12 is a quadruple pulse signal, 2 is a count circuit, 3 is an output signal from the counter circuit (2), and a counter value 15 is stored. Is a counter storage unit that outputs 4 is a pulse generating circuit for outputting a reference clock, 5
Is a timer circuit 1 which receives the pulse signal and the latch signal 18 from the pulse generation circuit (4) and measures time. Reference numeral 6 denotes a timer storage unit 1 for storing a signal output from the timer circuit 1. 7 is a quadrupled pulse signal 12
Timer circuit 2 for inputting a clock signal, a latch signal 18 and a reference clock signal output from pulse generating circuit 4 and measuring time
It is. The output of the timer circuit 2 (7) is stored in the timer storage means 2. . The counter circuit (2) inputs the code signal (13), the quadrupled pulse signal, and the latch signal (18) output from the quadruple circuit (1), and measures pulse up / down.

【0003】次に動作を説明する。従来、パルスの少な
い低分解能エンコーダを用いた場合や低速度運転時な
ど、速度制御のサンプリング時間内に変化するパルス数
が少ない場合に演算を正確に行う手法として、図3のよ
うな構成の検出器を使っていた。つまり、エンコーダか
らの出力パルスのA,B相を入力し4逓倍した後にカウン
タ回路によりカウントする。パルス発生回路は時間を計
測するための基準クロックであり、5のタイマ回路1、
7のタイマ回路2の入力信号として使う。7のタイマ回
路2は前記4逓倍パルス信号により値をリセットされ、
最後の4逓倍パルスが入力されてからの時間をカウント
する。前記カウンタ回路、前記タイマ回路1、前記タイ
マ回路2は、制御装置から出力されるラッチ信号によ
り、現在値をそれぞれカウンタ記憶手段(3)、6のタ
イマ記憶手段1、8のタイマ記憶手段2に記憶する。制
御装置は前記カウンタ記憶手段(3)、前記タイマ記憶
手段1(6)、前記タイマ記憶手段2(8)に格納され
たデータを読み込み速度を計算する。計算方法は、図2
に示すような方法で行う。つまり、前記カウンタ記憶手
段(3)からラッチ時点の4逓倍カウント値N(n)、前
記タイマ記憶手段1(6)からタイマ値T1(n)、前記
タイマ記憶手段2(8)からラッチ直前の4逓倍パルス
からラッチ時点までの時間T2(n)を読み込み、それぞ
れの前回値(N(n-1), T1(n-1), T2(n-1))と比較
して、次式(1)〜(3)に示すようにして前回のラッ
チの直前のパルスと今回のラッチ直前のパルスの間の時
間ΔTとパルス数ΔNを求め、エンコーダパルス周波数
Fを計算してモータの速度を求めていた。 ΔN = N(n) - N(n-1) (1) ΔT = (T1(n) - T1(n-1) - T2(n) + T2(n-1))/Ft (2) F= ΔN/ΔT (3) ただしFtはタイマの基本クロック周波数
Next, the operation will be described. Conventionally, when the number of pulses that change within the sampling time of speed control is small, such as when using a low-resolution encoder with a small number of pulses or at the time of low-speed operation, detection of the configuration shown in FIG. I was using a bowl. That is, the A and B phases of the output pulse from the encoder are input and multiplied by 4, and then counted by the counter circuit. The pulse generation circuit is a reference clock for measuring time, and the five timer circuits 1
7 is used as an input signal of the timer circuit 2. 7, the value of the timer circuit 2 is reset by the quadrupled pulse signal,
The time since the last quadrupled pulse is input is counted. The counter circuit, the timer circuit 1, and the timer circuit 2 store the current values in the counter storage means (3), the timer storage means 1 of the timer storage means 8, and the timer storage means 2 of the timer storage means 8 in response to a latch signal output from the control device. Remember. The control device reads data stored in the counter storage means (3), the timer storage means 1 (6), and the timer storage means 2 (8) and calculates the speed. The calculation method is shown in Fig. 2.
The method is performed as shown in FIG. That is, the quadrupled count value N (n) at the time of latching from the counter storage means (3), the timer value T1 (n) from the timer storage means 1 (6), and the timer value immediately before latching from the timer storage means 2 (8). The time T2 (n) from the quadrupled pulse to the latch time is read and compared with the previous values (N (n-1), T1 (n-1), T2 (n-1)), and the following equation ( As shown in 1) to (3), the time ΔT and the number of pulses ΔN between the pulse immediately before the previous latch and the pulse immediately before the current latch are obtained, and the encoder pulse frequency F is calculated to obtain the motor speed. I was ΔN = N (n) −N (n−1) (1) ΔT = (T1 (n) −T1 (n−1) −T2 (n) + T2 (n−1)) / Ft (2) F = ΔN / ΔT (3) where Ft is the basic clock frequency of the timer

【0004】[0004]

【発明が解決しようとする課題】従来の速度検出の方法
ではエンコーダの2相パルスにパルスのデューティ不均
衡や前記2相パルス間の位相誤差がある場合、パルス数
の少ないエンコーダを使ったり、1サイクル当たりのパ
ルス数が少なくなるような速いサンプリング周期で検出
および制御を行ったり、極低速度の運転が必要な時など
には速度検出誤差の影響が大きくなり電動機にトルクの
リップル等が発生するという問題点があった。この問題
に対し、特開平10-90293では、パルスの位相誤差を検出
してパルス数に換算して補正を加える方法が提案されて
いる。しかし、この方法では検出器だけでなく演算方法
も変わるため、現行の速度検出装置の置き換えとしては
使用できない。そこで本発明の目的は、エンコーダの2
相パルスにパルスのデューティ不均衡や前記2相パルス
間の位相誤差がある場合でも、正確な速度の検出が可能
であり、現行のモータ制御装置に対し、速度検出装置の
置き換えのみによって対応可能な速度検出装置を提供す
ることにある。
According to the conventional speed detection method, when the two-phase pulse of the encoder has a pulse duty imbalance or a phase error between the two-phase pulses, an encoder having a small number of pulses can be used. Detection and control are performed at a fast sampling cycle that reduces the number of pulses per cycle, and when extremely low speed operation is required, the effect of speed detection error increases and torque ripples occur in the motor. There was a problem. To solve this problem, Japanese Patent Application Laid-Open No. H10-90293 proposes a method of detecting a phase error of a pulse and converting it into the number of pulses to make correction. However, in this method, since not only the detector but also the calculation method is changed, it cannot be used as a replacement for the current speed detection device. Therefore, an object of the present invention is to provide an encoder
Even if the phase pulse has a pulse duty imbalance or a phase error between the two-phase pulses, accurate speed detection is possible, and the current motor control device can be handled only by replacing the speed detection device. An object of the present invention is to provide a speed detecting device.

【0005】[0005]

【課題を解決するための手段】90度位相の異なる2相
のパルスを出力するエンコーダの2相のパルスA相とB
相を入力し、前記A相と前記B相のパルスの状態から符
号を検出し前記A相と前記B相の立ち上がりと立ち下が
りのタイミングでパルスを発生させる4逓倍回路と前記
4逓倍回路が発生するパルスと符号を入力してUP-DOWN
カウントするカウンタ回路と前記カウンタ回路の値をラ
ッチしてカウンタ値を記憶するカウンタ記憶手段と一定
時間間隔の矩形波を出力するパルス発生回路と前記パル
ス発生回路のパルスを入力してカウントするタイマ回路
1と前記タイマ回路1の値をラッチしタイマ値を記憶す
るタイマ記憶手段1と前記パルス発生回路のパルスを入
力してカウントし、前記4逓倍回路の出力パルスを入力
してカウンタ値をリセットするタイマ回路2と前記タイ
マ回路2の値をラッチしタイマ値を記憶するタイマ記憶
手段2とを備えた速度検出装置において、前記A相とB
相の状態と前記符号検出回路の出力とから4つの状態を
判別する状態判別手段と各状態に対応する4つのパルス
間時間記憶手段とを持ち、前記4逓倍回路の出力パルス
のパルス間の時間を計測して前記4つのパルス間時間記
憶手段に格納してパルス間時間の基準値を計算し、前記
4つのパルス間時間記憶手段に格納したデータとの比較
を行い時間補正値を計算し、前記タイマ記憶手段2の値
に補正を加えることを特徴とする速度検出装置。前記パ
ルス間時間の大きさによって補正を停止する手段を備え
たことを特徴とする請求項1記載の速度検出装置。前記
4逓倍回路の出力パルスのパルス間の時間を計測して前
記4つのパルス間時間記憶手段に格納し、前記格納した
4つの値を用いてパルス間時間の基準値を計算し、前記
格納した4つの値と前記基準値とから各パルスの時間誤
差を求め、前記時間差と前記4つのパルス間時間記憶手
段に格納した値との比を誤差格納手段に格納し、前記誤
差格納手段に記憶された値と前記平均値との積からタイ
マ値補正量を求め、前記タイマ記憶手段2の値に補正を
加えることを特徴とする請求項1記載の速度検出装置。
前記誤差格納手段設定されるデータは、前記時間差と前
記4つのパルス間時間記憶手段に格納した値との比を4
つの領域毎に平均化した値とすることを特徴とする請求
項3記載の速度検出装置。前記誤差格納手段の格納を停
止する手段を備えたことを特徴とする請求項3記載の速
度検出装置。ラッチ時点のカウント値とタイマ値1及び
ラッチ時点からラッチ直前の4逓倍パルスの発生時点ま
でのタイマ値2を出力し、前記タイマ値2はパルス検出
時間の補正を加えた結果を出力するようにする。補正方
法として、入力した2相のパルスを4逓倍したパルスの
パルス間時間を前記2相パルスの状態別に4種類分計測
し、計測した結果の平均値と今回の状態とから時間誤差
量を計算し、タイマ値2に対して補正を加える。
Means for Solving the Problems Two-phase pulses A and B of an encoder for outputting two-phase pulses different in phase by 90 degrees.
A quadruple circuit and a quadruple circuit for inputting a phase, detecting a sign from the states of the A-phase and B-phase pulses, and generating pulses at the rising and falling timings of the A-phase and the B-phase are generated. UP-DOWN by inputting pulse and sign
Counter circuit for counting, counter storage means for latching the value of the counter circuit and storing the counter value, pulse generating circuit for outputting rectangular waves at fixed time intervals, and timer circuit for inputting and counting pulses of the pulse generating circuit 1 and a timer storage means 1 for latching the value of the timer circuit 1 and storing the timer value, and inputting and counting pulses of the pulse generation circuit, and inputting an output pulse of the quadruple circuit to reset the counter value. In a speed detecting device comprising a timer circuit 2 and a timer storage means 2 for latching a value of the timer circuit 2 and storing a timer value,
It has state discriminating means for discriminating four states from the phase state and the output of the code detection circuit, and four inter-pulse time storage means corresponding to each state, and the time between pulses of the output pulse of the quadruple circuit. Is measured and stored in the four inter-pulse time storage means to calculate a reference value of the inter-pulse time, and is compared with the data stored in the four inter-pulse time storage means to calculate a time correction value; A speed detecting device, wherein the value of the timer storage means 2 is corrected. 2. The speed detecting device according to claim 1, further comprising a unit that stops the correction according to the magnitude of the inter-pulse time. The time between pulses of the output pulse of the quadruple circuit was measured and stored in the four inter-pulse time storage means. A reference value of the inter-pulse time was calculated using the four stored values, and the stored value was stored. A time error of each pulse is obtained from four values and the reference value, a ratio of the time difference to a value stored in the four inter-pulse time storage means is stored in an error storage means, and the ratio is stored in the error storage means. 2. The speed detection device according to claim 1, wherein a timer value correction amount is obtained from a product of the calculated value and the average value, and the value of the timer storage means is corrected.
The data set in the error storage means is a ratio of the time difference to the value stored in the four inter-pulse time storage means.
4. The speed detecting device according to claim 3, wherein the value is averaged for each of the two areas. 4. The speed detection device according to claim 3, further comprising a unit that stops storing the error storage unit. The count value and the timer value 1 at the latching time and the timer value 2 from the latching time to the generation of the quadrupled pulse immediately before the latching are output, and the timer value 2 outputs the result obtained by adding the correction of the pulse detection time. I do. As a correction method, the inter-pulse time of a pulse obtained by multiplying the input two-phase pulse by four is measured for four types for each state of the two-phase pulse, and a time error amount is calculated from the average value of the measured results and the current state. Then, the timer value 2 is corrected.

【0006】[0006]

【発明の実施の形態】本発明の実施例に基づいて説明す
る。本発明の構成ブロック図を図1に示す。従来例の図
3と同一名称には同一符号を付け、重複説明を省略す
る。図1において従来の図3と異なる部分は、状態判別
手段(9)、パルス間時間記憶手段(10)、補正値演
算回路(11)、OR回路(19)、加算回路(20)
を設けた点にある。状態判別手段9は、A相とB相のエ
ンコーダ出力パルス信号(14)と4逓倍回路1から出
力される符号信号(13)とに基づいてパルス間時間記
憶手段(10)へA相、B相信号のLOW-HIGHから求まる
前回の状態を出力する。パルス間時間記憶手段(10)
は状態判別手段から出力される信号とタイマ回路2
(7)から出力される信号とを入力して補正値演算回路
11へ前記前回の状態に対応するデータを出力する。補
正値演算回路(11)は、パルス間時間記憶手段からの
出力信号と4逓倍回路から出力される符号信号に基づい
て演算される補正値を加算回路20へ出力する。加算回
路20はタイマ記憶手段2(8)の出力信号と補正値演
算回路(11)の出力信号とを加算してタイマ2値(1
6)を作る。OR回路19は、ラッチ信号(18)と4
逓倍パルス信号(12)とを入力し、その論理和をタイ
マ回路2のラッチ信号として出力する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described. FIG. 1 shows a configuration block diagram of the present invention. The same reference numerals as in FIG. 3 of the conventional example denote the same parts, and a duplicate description will be omitted. In FIG. 1, the parts different from the conventional FIG. 3 are a state determination means (9), an inter-pulse time storage means (10), a correction value calculation circuit (11), an OR circuit (19), and an addition circuit (20).
Is provided. Based on the A-phase and B-phase encoder output pulse signals (14) and the code signal (13) output from the quadruple circuit 1, the state determination means 9 sends the A-phase and B-phase data to the inter-pulse time storage means (10). Outputs the previous state obtained from the phase signal LOW-HIGH. Time between pulse storage means (10)
Is a signal output from the state determination means and the timer circuit 2
The signal output from (7) is input and data corresponding to the previous state is output to the correction value calculation circuit 11. The correction value calculation circuit (11) outputs a correction value calculated based on the output signal from the inter-pulse time storage means and the code signal output from the quadruple circuit to the addition circuit 20. The addition circuit 20 adds the output signal of the timer storage means 2 (8) and the output signal of the correction value calculation circuit (11) to obtain a timer 2 value (1
Make 6). The OR circuit 19 outputs the latch signal (18) and 4
The multiplication pulse signal (12) is input, and the logical sum thereof is output as a latch signal of the timer circuit 2.

【0007】次に動作を説明する。エンコーダの2相の
出力パルスA,B相を入力し4逓倍回路によりA,B各相のエ
ッジを取り出して4逓倍パルスを作成し、A,B相の状態
から回転方向(符号)を求める。求めた4逓倍パルスと符
号を用いてカウンタ回路によりUP-DOWNカウントする。
パルス発生回路は時間を計測するための基準クロックで
あり、タイマ回路1、タイマ回路2の入力信号として使
う。タイマ回路2は前記4逓倍パルス信号により値をリ
セットされ、最後の4逓倍パルスが入力されてからの時
間をカウントする。latch信号は制御装置の出力であ
り、前記カウンタ回路、前記タイマ回路1、前記タイマ
回路2に入力され、値をそれぞれカウンタ記憶手段、タ
イマ記憶手段1、タイマ記憶手段2に記憶する。状態判
別手段は、前記A,B相の信号と前記符号とを用いて、前
記A,B相の信号のLOW-HIGHから求まる4つの状態を判別
し、前記符号より前回の状態を求める。タイマ回路2は
4逓倍信号とlatch信号のorでラッチされ、ラッチされ
たデータはlatch信号によるラッチの場合はタイマ記憶
手段2に記憶され、4逓倍パルスによってラッチされた
場合は前記前回の状態により、4つのパルス間時間記憶
手段に格納される。
Next, the operation will be described. The two-phase output pulses A and B of the encoder are input, and the edges of each phase A and B are extracted by a quadruple circuit to generate quadrupled pulses, and the rotation direction (sign) is obtained from the state of the A and B phases. The counter circuit counts UP-DOWN using the obtained quadrupled pulse and the sign.
The pulse generation circuit is a reference clock for measuring time, and is used as an input signal of the timer circuit 1 and the timer circuit 2. The value of the timer circuit 2 is reset by the quadrupled pulse signal, and counts the time since the last quadrupled pulse was input. The latch signal is an output of the control device and is input to the counter circuit, the timer circuit 1, and the timer circuit 2, and stores the values in the counter storage unit, the timer storage unit 1, and the timer storage unit 2, respectively. The state determination means determines four states obtained from the LOW-HIGH of the A and B phase signals using the A and B phase signals and the code, and obtains a previous state from the code. The timer circuit 2 is latched by the quadrupled signal and the latch signal or, and the latched data is stored in the timer storage means 2 in the case of latching by the latch signal, and by the previous state when latched by the quadrupled pulse. Are stored in the four pulse time storage means.

【0008】補正値演算回路について図4に基づき説明
する。前記4つのパルス間時間記憶手段に格納した結果
をそれぞれS1、S2、S3、S4とすると、次式により平均値
S(n-1)を求める。 S(n-1) = (S1 + S2 + S3 + S4) / 4 (4) 図4ではラッチ(n-1)時点の状態がS3領域であるので、S
2領域の終りからラッチ時点までのタイマ2の値がタイ
マ記憶手段2に記憶される(T2(n-1))。このデータに
対する補正量Terr(n-1)はS1を基準として Terr(n-1) = S(n-1) × 2 − (S1 + S2) (5) により求まり補正後のタイマ2値T2'(n-1)は次式によ
り求まる。 T2'(n-1) = T2(n-1) + Terr(n-1) (6) 次のラッチ(n)時点でも同様にして平均値S(n)を求め、S
1を基準として補正値Terr(n)を求めてT2(n)に対して
補正してT2'(n)を求める。 S(n) = (S1 + S2 + S3 + S4) / 4 (7) Terr(n) = S(n) × 3 − (S1 + S2 + S3) (8) T'2(n) = T2(n) + Terr(n) (9) Terr(n)はラッチ(n)時点がS4領域であるためS1〜S3まで
のデータを使って求める。
The correction value calculation circuit will be described with reference to FIG. Assuming that the results stored in the four inter-pulse time storage means are S1, S2, S3, and S4, respectively,
Find S (n-1). S (n-1) = (S1 + S2 + S3 + S4) / 4 (4) In FIG. 4, since the state at the time of latch (n-1) is the S3 area,
The value of the timer 2 from the end of the two areas to the latch time is stored in the timer storage means 2 (T2 (n-1)). The correction amount Terr (n-1) for this data is obtained by Terr (n-1) = S (n-1) × 2− (S1 + S2) (5) based on S1, and the timer 2 value T2 ′ after the correction is obtained. (n-1) is obtained by the following equation. T2 '(n-1) = T2 (n-1) + Terr (n-1) (6) At the next latch (n), the average value S (n) is obtained in the same manner.
A correction value Terr (n) is obtained based on 1 and T2 (n) is corrected by correcting T2 (n). S (n) = (S1 + S2 + S3 + S4) / 4 (7) Terr (n) = S (n) × 3− (S1 + S2 + S3) (8) T′2 (n) = T2 ( n) + Terr (n) (9) Terr (n) is obtained using data from S1 to S3 since the latch (n) point is in the S4 area.

【0009】補正量の演算は逆転中であれば、S4を基準
としてS3、S2と更新される順に加算した値を使って求め
る。例えばラッチ時点がS2領域である場合は S4とS3を
使い補正量Terrは次式のようになる。 S = (S1 + S2 + S3 + S4) / 4 (10) Terr = S * 2 - (S4 + S3) (11) モータ速度が速くなった場合はS1,S2,S3,S4が0に近くな
るためほとんど補正が効かなくなるが、ラッチ間のエン
コーダパルスが多くなるために誤差が小さくなる。モー
タ速度が遅くなり、タイマ回路のオーバーフローが発生
する場合があるため、この場合は補正自体をしないよう
にする必要がある。タイマ回路2のとり得る最大値が本
発明による検出装置の誤差補正回路の限界であるが、従
来の方式に戻るだけであるため影響は少ない。請求項3
では上記補正量Terrと平均値との比を現在の領域の誤差
補正計数として誤差格納手段に保存し、前記誤差格納手
段に記憶された値と前記平均値との積からタイマ値補正
量を求めることによって誤差補正を行う。
If the calculation of the correction amount is in the reverse rotation, the correction amount is obtained by using the value obtained by adding S3 and S2 in the order of updating based on S4. For example, if the latch time is in the S2 region, the correction amount Terr is expressed by the following equation using S4 and S3. S = (S1 + S2 + S3 + S4) / 4 (10) Terr = S * 2-(S4 + S3) (11) When the motor speed increases, S1, S2, S3, and S4 approach 0. Therefore, the correction hardly works, but the error becomes small because the encoder pulse between the latches increases. Since the motor speed becomes slow and the timer circuit may overflow, it is necessary in this case not to perform the correction itself. Although the maximum value that the timer circuit 2 can take is the limit of the error correction circuit of the detection device according to the present invention, the effect is small since it only returns to the conventional method. Claim 3
Then, the ratio between the correction amount Terr and the average value is stored in the error storage unit as an error correction count of the current area, and the timer value correction amount is obtained from the product of the value stored in the error storage unit and the average value. In this way, error correction is performed.

【0010】4つの領域の平均値をS、各領域における
誤差をTerr1,Terr2,Terr3,Terr4とすると各領域の誤差
補正計数kerr1,kerr2,kerr3,kerr4は S1領域の誤差補正計数:kerr1 = Terr1 / S (12) S2領域の誤差補正計数:kerr2 = Terr2 / S (13) S3領域の誤差補正計数:kerr3 = Terr3 / S (14) S4領域の誤差補正計数:kerr4 = Terr4 / S (15) となる。これを4逓倍パルスが来る度に計算し、平均化
処理(例えば一次遅れ処理)を通した結果を前記誤差格納
手段に記憶しておく。前記誤差格納手段に格納されたデ
ータをK1,K2,K3,K4とすると、T2への補正は平均値Sと
誤差補正計数により求めることができる。S2領域の場合
は T2' = T2 + S × K2 (16) となる。ここで、K1,K2,K3,K4はあらかじめモータを一
定速度で回転させて求めて前記誤差格納手段への格納し
ておき、実際に使用する際は前記誤差格納手段への格納
を停止させ、あらかじめ求めた値を使って補正を行うよ
うにすればモータ速度の変動が大きな場合でも正確な誤
差補正が可能になる。
Assuming that the average value of the four areas is S and the errors in each area are Terr1, Terr2, Terr3, and Terr4, the error correction counts kerr1, kerr2, kerr3, and kerr4 in each area are the error correction counts in the S1 area: kerr1 = Terr1 / S (12) Error correction count for S2 area: kerr2 = Terr2 / S (13) Error correction count for S3 area: kerr3 = Terr3 / S (14) Error correction count for S4 area: kerr4 = Terr4 / S (15) Becomes This is calculated each time a quadrupled pulse arrives, and the result of averaging (eg, first-order lag processing) is stored in the error storage means. Assuming that the data stored in the error storage means are K1, K2, K3, and K4, the correction to T2 can be obtained by the average value S and the error correction count. In the case of the S2 area, T2 ′ = T2 + S × K2 (16) Here, K1, K2, K3, K4 are obtained by rotating the motor at a constant speed in advance and stored in the error storage means, and when actually used, stop storing in the error storage means, If the correction is performed using the value obtained in advance, accurate error correction can be performed even when the motor speed fluctuates greatly.

【0011】制御装置は前記カウンタ記憶手段からラッ
チ時点の4逓倍カウント値N(n)、前記タイマ記憶手段
1からタイマ値T1(n)、前記タイマ記憶手段2からラ
ッチ直前の4逓倍パルスからラッチ時点までの時間に補
正を加えた値T2'(n)を読み込み、それぞれの前回値
(N(n-1), T1(n-1), T2(n-1))と比較して、前記
(1)(2)(3)式により求める。
The control device latches the quadrupled count value N (n) at the time of latching from the counter storage means, the timer value T1 (n) from the timer storage means 1, and the quadrupled pulse immediately before the latch from the timer storage means 2. The value T2 '(n) obtained by adding the correction to the time up to the time point is read and compared with the previous values (N (n-1), T1 (n-1), T2 (n-1)), and (1) It is calculated by the formulas (2) and (3).

【0012】[0012]

【発明の効果】以上のように本発明によれば、90度位
相の異なる2相のパルスを出力するエンコーダの2相の
A相とB相パルスを入力し、前記A相と前記B相のパル
スの状態から符号を検出し前記A相と前記B相の立ち上
がりと立ち下がりのタイミングでパルスを発生させる4
逓倍回路と前記4逓倍回路が発生するパルスと符号を入
力してUP-DOWNカウントするカウンタ回路と前記カウン
タ回路の値をラッチしてカウンタ値を記憶するカウンタ
記憶手段と一定時間間隔の矩形波を出力するパルス発生
回路と前記パルス発生回路のパルスを入力してカウント
するタイマ回路1と前記タイマ回路1の値をラッチしタ
イマ値を記憶するタイマ記憶手段1と前記パルス発生回
路のパルスを入力してカウントし、前記4逓倍回路の出
力パルスを入力してカウンタ値をリセットするタイマ回
路2と前記タイマ回路2の値をラッチしタイマ値を記憶
するタイマ記憶手段2とを備えた速度検出装置におい
て、前記A相とB相の状態と前記符号検出回路の出力と
から4つの状態を判別する状態判別手段と各状態に対応
する4つのパルス間時間記憶手段とを持ち、前記4逓倍
回路の出力パルスのパルス間の時間を計測して前記4つ
のパルス間時間記憶手段に格納してパルス間時間の基準
値を計算し、前記4つのパルス間時間記憶手段に格納し
たデータとの比較を行い時間補正値を計算し、前記タイ
マ記憶手段2の値に補正を加えるようにしたので、エン
コーダの2相パルスにパルスのデューティ不均衡や前記
2相パルス間の位相誤差がある場合でも、タイマ値に補
正を加えることで正確な速度の検出が可能になる。さら
に、現行の制御装置に対して本発明による速度検出装置
を適用した場合、速度検出装置内でタイマ値をあらかじ
め補正しているため、速度の演算を修正することなく、
正確な速度を計算できるようになる。
As described above, according to the present invention, two A-phase and B-phase pulses of the encoder for outputting two-phase pulses having a phase difference of 90 degrees are inputted, and the A-phase and the B-phase pulses are inputted. Detecting a sign from the state of the pulse and generating a pulse at the rising and falling timings of the A-phase and the B-phase 4
A multiplying circuit, a counter circuit for inputting pulses and codes generated by the quadruple circuit and counting up and down, a counter storing means for latching the value of the counter circuit and storing the counter value, and a rectangular wave at a constant time interval. A pulse generating circuit to be output, a timer circuit 1 for inputting and counting the pulses of the pulse generating circuit, a timer storage means 1 for latching the value of the timer circuit 1 and storing the timer value, and a pulse for the pulse generating circuit. And a timer circuit 2 for inputting an output pulse of the quadruple circuit and resetting a counter value, and a timer storage means 2 for latching the value of the timer circuit 2 and storing the timer value. State determining means for determining four states from the A-phase and B-phase states and the output of the code detection circuit, and four inter-pulse times corresponding to each state. Having a storage means, measuring the time between pulses of the output pulse of the quadruple circuit, storing the measured time in the four-pulse time storage means and calculating a reference value of the inter-pulse time, Since the time correction value is calculated by comparing with the data stored in the storage means and the value of the timer storage means 2 is corrected, the duty imbalance of the pulse to the two-phase pulse of the encoder or the two-phase pulse Even when there is a phase error between the two, the correction of the timer value enables accurate speed detection. Furthermore, when the speed detection device according to the present invention is applied to the existing control device, the timer value is corrected in advance in the speed detection device, so that the speed calculation is not corrected,
You will be able to calculate the exact speed.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施例を示す図FIG. 1 is a diagram showing an embodiment of the present invention.

【図2】エンコーダパルスから速度を演算する従来方法
を説明する図
FIG. 2 is a diagram illustrating a conventional method of calculating a speed from an encoder pulse.

【図3】従来の速度検出装置のブロック図FIG. 3 is a block diagram of a conventional speed detection device.

【図4】本発明のエンコーダパルスの補正方法を説明す
る図
FIG. 4 is a diagram illustrating a method for correcting an encoder pulse according to the present invention.

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

1 4逓倍回路 2 カウンタ回路 3 カウンタ記憶手段 4 パルス発生回路 5 タイマ回路1 6 タイマ記憶手段1 7 タイマ回路2 8 タイマ記憶手段2 9 状態判別手段 10 パルス間時間記憶手段 11 補正値演算回路 12 4逓倍パルス信号 13 符号信号 14 エンコーダ出力パルス信号 15 カウンタ値 16 タイマ2値 17 タイマ1値 18 latch信号 19 OR回路 20 加算回路 1 4 Multiplying circuit 2 Counter circuit 3 Counter storing means 4 Pulse generating circuit 5 Timer circuit 1 6 Timer storing means 1 7 Timer circuit 2 8 Timer storing means 2 9 State discriminating means 10 Inter-pulse time storing means 11 Correction value calculating circuit 12 4 Multiplier pulse signal 13 Code signal 14 Encoder output pulse signal 15 Counter value 16 Timer 2 value 17 Timer 1 value 18 Latch signal 19 OR circuit 20 Adder circuit

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 90度位相の異なる2相のパルスを出力
するエンコーダの2相のパルスA相とB相を入力し、前
記A相と前記B相のパルスの状態から符号を検出し前記
A相と前記B相の立ち上がりと立ち下がりのタイミング
でパルスを発生させる4逓倍回路と前記4逓倍回路が発
生するパルスと符号を入力してUP-DOWNカウントするカ
ウンタ回路と前記カウンタ回路の値をラッチしてカウン
タ値を記憶するカウンタ記憶手段と一定時間間隔の矩形
波を出力するパルス発生回路と前記パルス発生回路のパ
ルスを入力してカウントするタイマ回路1と前記タイマ
回路1の値をラッチしタイマ値を記憶するタイマ記憶手
段1と前記パルス発生回路のパルスを入力してカウント
し、前記4逓倍回路の出力パルスを入力してカウンタ値
をリセットするタイマ回路2と前記タイマ回路2の値を
ラッチしタイマ値を記憶するタイマ記憶手段2とを備え
た速度検出装置において、 前記A相とB相の状態と前記符号検出回路の出力とから
4つの状態を判別する状態判別手段と各状態に対応する
4つのパルス間時間記憶手段とを持ち、前記4逓倍回路
の出力パルスのパルス間の時間を計測して前記4つのパ
ルス間時間記憶手段に格納してパルス間時間の基準値を
計算し、前記4つのパルス間時間記憶手段に格納したデ
ータとの比較を行い時間補正値を計算し、前記タイマ記
憶手段2の値に補正を加えることを特徴とする速度検出
装置。
An encoder which outputs two-phase pulses having phases different from each other by 90 degrees receives two-phase pulses A and B, and detects a sign from the states of the A-phase and B-phase pulses to detect the A-phase and B-phase pulses. A quadruple circuit that generates pulses at the rising and falling timings of the phase and the B phase, a counter circuit that inputs the pulse and sign generated by the quadruple circuit and counts up and down, and latches the value of the counter circuit Counter storing means for storing a counter value, a pulse generating circuit for outputting a rectangular wave at fixed time intervals, a timer circuit 1 for inputting and counting pulses of the pulse generating circuit, and a timer for latching the value of the timer circuit 1 Timer storage means 1 for storing a value and a timer for inputting and counting pulses of the pulse generation circuit, and for inputting an output pulse of the quadruple circuit to reset a counter value A speed detection device comprising a path 2 and a timer storage means 2 for latching a value of the timer circuit 2 and storing a timer value, wherein four states are obtained from the A-phase and B-phase states and the output of the sign detection circuit. And four inter-pulse time storage means corresponding to each state. The time between pulses of the output pulse of the quadruple circuit is measured and stored in the four inter-pulse time storage means. And calculating a time correction value by comparing the reference value of the inter-pulse time with the data stored in the four inter-pulse time storage means, and correcting the value of the timer storage means 2. Speed detector.
【請求項2】 前記パルス間時間の大きさによって補正
を停止する手段を備えたことを特徴とする請求項1記載
の速度検出装置。
2. The speed detecting apparatus according to claim 1, further comprising means for stopping the correction according to the magnitude of the inter-pulse time.
【請求項3】 前記4逓倍回路の出力パルスのパルス間
の時間を計測して前記4つのパルス間時間記憶手段に格
納し、前記格納した4つの値を用いてパルス間時間の基
準値を計算し、前記格納した4つの値と前記基準値とか
ら各パルスの時間誤差を求め、前記時間差と前記4つの
パルス間時間記憶手段に格納した値との比を誤差格納手
段に格納し、前記誤差格納手段に記憶された値と前記平
均値との積からタイマ値補正量を求め、前記タイマ記憶
手段2の値に補正を加えることを特徴とする請求項1記
載の速度検出装置。
3. The time between pulses of the output pulse of the quadruple circuit is measured and stored in the four inter-pulse time storage means, and a reference value of the inter-pulse time is calculated using the four stored values. Calculating a time error of each pulse from the stored four values and the reference value; storing a ratio between the time difference and a value stored in the four inter-pulse time storage means in an error storage means; 2. The speed detection device according to claim 1, wherein a timer value correction amount is obtained from a product of the value stored in the storage unit and the average value, and the value in the timer storage unit is corrected.
【請求項4】 前記誤差格納手段設定されるデータは、
前記時間差と前記4つのパルス間時間記憶手段に格納し
た値との比を4つの領域毎に平均化した値とすることを
特徴とする請求項3記載の速度検出装置。
4. The data set in the error storage means,
4. The speed detecting apparatus according to claim 3, wherein a ratio between the time difference and a value stored in the four pulse time storage means is a value averaged for each of four regions.
【請求項5】 前記誤差格納手段の格納を停止する手段
を備えたことを特徴とする請求項3記載の速度検出装
置。
5. The speed detecting device according to claim 3, further comprising means for stopping storage of said error storing means.
JP2001116823A 2001-04-16 2001-04-16 Speed detector Pending JP2002311040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001116823A JP2002311040A (en) 2001-04-16 2001-04-16 Speed detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001116823A JP2002311040A (en) 2001-04-16 2001-04-16 Speed detector

Publications (1)

Publication Number Publication Date
JP2002311040A true JP2002311040A (en) 2002-10-23

Family

ID=18967487

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001116823A Pending JP2002311040A (en) 2001-04-16 2001-04-16 Speed detector

Country Status (1)

Country Link
JP (1) JP2002311040A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100719110B1 (en) * 2005-11-11 2007-05-17 삼성전자주식회사 Controller apparatus to acquire the encoder speed information and method thereof
WO2015012343A1 (en) 2013-07-26 2015-01-29 Ntn株式会社 Rotation detection device and bearing unit equipped with rotation detection device
CN108549024A (en) * 2018-02-09 2018-09-18 中国科学院长春光学精密机械与物理研究所 A kind of velocity-measuring system and method for prediction type M/T
KR20190067468A (en) * 2017-12-07 2019-06-17 현대자동차주식회사 Motor control method
KR20220095279A (en) * 2020-12-29 2022-07-07 계양전기 주식회사 Method for calculating motor rotating speed using hall sensor

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100719110B1 (en) * 2005-11-11 2007-05-17 삼성전자주식회사 Controller apparatus to acquire the encoder speed information and method thereof
WO2015012343A1 (en) 2013-07-26 2015-01-29 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
KR20190067468A (en) * 2017-12-07 2019-06-17 현대자동차주식회사 Motor control method
JP2019103382A (en) * 2017-12-07 2019-06-24 現代自動車株式会社Hyundai Motor Company Motor control method
JP7168363B2 (en) 2017-12-07 2022-11-09 現代自動車株式会社 motor control method
KR102588927B1 (en) 2017-12-07 2023-10-16 현대자동차주식회사 Motor control method
CN108549024A (en) * 2018-02-09 2018-09-18 中国科学院长春光学精密机械与物理研究所 A kind of velocity-measuring system and method for prediction type M/T
KR20220095279A (en) * 2020-12-29 2022-07-07 계양전기 주식회사 Method for calculating motor rotating speed using hall sensor
KR102510806B1 (en) * 2020-12-29 2023-03-20 계양전기 주식회사 Method for calculating motor rotating speed using hall sensor

Similar Documents

Publication Publication Date Title
JP2002311040A (en) Speed detector
JP3173174B2 (en) Speed detector
JP3596942B2 (en) Speed detector
JPH07229910A (en) Pulse counter circuit
US8019037B2 (en) Phase difference detection device and rotation position detection device
JP3860324B2 (en) Motor speed control device
JPS61110005A (en) Method and apparatus for detecting position
JP2006300699A (en) Speed detector, and abnormal speed detecting method therefor
KR19990043005A (en) Motor speed detection device using incremental encoder
JPH11174074A (en) Correction circuit for speed pulse
JPH04285815A (en) Position counter circuit of rotary encoder
JP2523207Y2 (en) Speed detector
JPH07210249A (en) Digital servo device
JP6452210B1 (en) Speed detection device
JPH1123319A (en) Position detector by incremental encorder
JP2001215238A (en) Speed detector
JPS62237316A (en) Detection error correcting device for position detector
JP3248209B2 (en) Position detection method
KR19990001541A (en) Speed detection method and device
JPH10260197A (en) Detecting circuit for velocity pulse
JPH05332788A (en) Data processing device for rotary encoder
JP2010096579A (en) Encoder signal processing circuit and encoder
KR19990085942A (en) Speed detection device and method
JPH08140383A (en) Controller for servo motor
JPH04340469A (en) Motor speed detector