JP3173174B2 - Speed detector - Google Patents

Speed detector

Info

Publication number
JP3173174B2
JP3173174B2 JP26641392A JP26641392A JP3173174B2 JP 3173174 B2 JP3173174 B2 JP 3173174B2 JP 26641392 A JP26641392 A JP 26641392A JP 26641392 A JP26641392 A JP 26641392A JP 3173174 B2 JP3173174 B2 JP 3173174B2
Authority
JP
Japan
Prior art keywords
edge
signal
data
latch
counter
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.)
Expired - Lifetime
Application number
JP26641392A
Other languages
Japanese (ja)
Other versions
JPH06118090A (en
Inventor
康弘 山本
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.)
Meidensha Corp
Original Assignee
Meidensha 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 Meidensha Corp filed Critical Meidensha Corp
Priority to JP26641392A priority Critical patent/JP3173174B2/en
Publication of JPH06118090A publication Critical patent/JPH06118090A/en
Application granted granted Critical
Publication of JP3173174B2 publication Critical patent/JP3173174B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】この発明はモータの回転制御等に
応用されるインクリメンタルエンコーダを用いた速度検
出装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a speed detecting device using an incremental encoder applied to a motor rotation control or the like.

【0002】[0002]

【従来の技術】従来のインバータ装置に使用されている
速度検出装置には、現在のようにカスタムICが簡単に
開発できなかったため、ICメーカのマイコン周辺タイ
マーLSI(例えばインテル8254)等を用いて構成
していた。次に、速度検出原理について述べる。速度の
定義は角度=θ、時刻=tとすると、速度ωはω=dθ
/dtで表わされる。この式をいま、差分近似で表わす
と、次のようになる。
2. Description of the Related Art As a speed detecting device used in a conventional inverter device, a custom IC cannot be easily developed as at present. Therefore, a microcomputer peripheral timer LSI (for example, Intel 8254) of an IC maker is used. Was composed. Next, the principle of speed detection will be described. Assuming that the speed is defined as angle = θ and time = t, the speed ω is ω = dθ
/ Dt. If this expression is now represented by difference approximation, it is as follows.

【0003】速度ω=Δθ/Δt=θtn−θtn-1/tn
−tn-1(nはサンプリングタイミング) 従って、図15のようにθ,tのデータが離散値として
与えられた場合、時刻tn-1〜tn間で速度演算を行え
ば、最も応答の早い速度検出ができ、tnとtn-2,t
n-3…と前々回と古いデータを用いるほど、応答は悪い
が定常時の平均速度精度が向上する。従って、速度計測
は各時刻tnとそのときの位相角のみを検出し、CPU
等の演算部を用いてソフトウェアで差分演算を行う手段
を採っている。
Speed ω = Δθ / Δt = θ tn −θ tn-1 / t n
-T n-1 (n is a sampling timing) Thus, theta as shown in Figure 15, if the data of t is given as a discrete value, by performing speed operation between the time t n-1 ~t n, most responsive Speed detection of t n , t n-2 , t
As the older data is used, the response is worse, but the average speed accuracy in a steady state is improved. Therefore, the speed measurement detects only each time t n and the phase angle at that time, and the CPU
Means for performing a difference calculation by software using a calculation unit such as.

【0004】図16はインクリメンタルエンコーダの出
力信号で、A,Bは90゜位相差を持った信号、Zは原
点信号である。図16の波形のA,B相の1周期(X1
〜X4)においては、4種類のエッジが存在する。従っ
て、A,B相の各エッジ変化点を抽出すれば、エンコー
ダパルスの4逓倍(4F)の信号が得られる。
FIG. 16 shows output signals of an incremental encoder. A and B are signals having a phase difference of 90 °, and Z is an origin signal. A waveform in FIG. 16, one period of phase B (X 1
~ X 4 ), there are four types of edges. Therefore, by extracting the edge change points of the A and B phases, a signal of 4 times (4F) the encoder pulse is obtained.

【0005】しかし、精度については上記エンコーダで
は1周期Tに対して、(1)1周期間の誤差は0.00
5×T、(2)整数倍周期間の誤差は0.01×T、
(3)4逓倍を用いた1/4Tの整数倍周期の誤差0.
10×Tと、4逓倍を用いた場合、位相精度は周期誤差
の10倍以下の誤差が含まれることになる。このため、
速度検出には1周期Tの整数倍の値を用る必要がある。
また、以下パルス周期は時間の記号と混用を避けるため
θを用いる。
However, regarding the accuracy, (1) the error between one cycle is 0.00 with respect to one cycle T in the encoder.
5 × T, (2) error between integer multiple periods is 0.01 × T,
(3) An error of an integer multiple cycle of 1 / 4T using quadruple multiplication.
When 10 × T and quadrupling are used, the phase accuracy includes an error of 10 times or less of the periodic error. For this reason,
It is necessary to use an integer multiple of one period T for speed detection.
In the following, θ is used for the pulse cycle to avoid mixing with the symbol of time.

【0006】上述したエンコーダのA,B信号は誘導電
動機(IM)の回転子軸の一端にパルスピックアップ
(PP)を取り付け、このPPから得る。そして、IM
の正転/逆転と、信号のエッジを次のように定義する。
The A and B signals of the encoder described above are obtained from a pulse pickup (PP) attached to one end of a rotor shaft of an induction motor (IM) and from the PP. And IM
And the signal edge are defined as follows.

【0007】(a)IMが反時計方向CCWで回転して
いるとき、PPからの出力波形を波形整形し、極性選択
された信号を図17に示す。
(A) When the IM is rotating in the counterclockwise direction CCW, the waveform of the output waveform from the PP is shaped, and a signal whose polarity is selected is shown in FIG.

【0008】(b)IMが時計方向CWで回転している
ときのPPの出力波形を示すと図18のようになる。
(B) FIG. 18 shows the output waveform of PP when the IM is rotating clockwise CW.

【0009】なお、図17、図18において、エッジ選
択信号ED0〜ED3はスリットの位置に対応してお
り、図19のような物理的位置角を意味している。
In FIG. 17 and FIG. 18, the edge selection signals ED0 to ED3 correspond to the positions of the slits, and represent physical position angles as shown in FIG.

【0010】次に上述したエンコーダの信号を前述した
LSI(インテル8254)に供給して速度検出を行う
場合について述べる。図20、図21において、エンコ
ーダ出力信号(A相,B相)は波形整形部1に入力さ
れ、ここで、パルスエッジが検出されるとともにエンコ
ーダ信号の周期毎の信号1F又は4逓倍の信号4Fに変
換される。この信号1F又は4Fによりエンコーダ位相
差カウンタ2を動作させ、エンコーダの回転角を計測す
る。そして、時間計測カウンタ3にて基準クロックCL
Kをカウントすることにより、カウンタ2の回転角に対
応する時間を計測する。
Next, a case will be described in which the above encoder signal is supplied to the aforementioned LSI (Intel 8254) to detect the speed. 20 and 21, an encoder output signal (A phase, B phase) is input to a waveform shaping unit 1, where a pulse edge is detected and a signal 1F or a quadrupled signal 4F for each period of the encoder signal. Is converted to The encoder phase difference counter 2 is operated by the signal 1F or 4F, and the rotation angle of the encoder is measured. Then, the time measurement counter 3 outputs the reference clock CL.
By counting K, a time corresponding to the rotation angle of the counter 2 is measured.

【0011】計測には、まず予測速度に対してカウンタ
3の時間カウントがオーバーフローせず、かつある程度
の精度が得られるパルス数を計算してカウンタ2に設定
し、カウンタ開始信号を与える。カウンタ2はカウンタ
開始信号の次のエンコーダからの入力パルス時刻からカ
ウンタに設定されたパルス数だけエンコーダパルスを計
測し、カウンタ値が設定値に達するまでの間、カウンタ
3にカウントイネーブル信号が与えられる。これによ
り、カウンタ3はカウンタ2に設定されたパルス数に相
当する時間を計測することができ、これらの値の比によ
り速度検出ができる。そして、演算速度を用いて次回の
エンコーダ位相差カウンタの値を設定し、計測開始信号
を与える動作を繰り返す。
In the measurement, first, the time count of the counter 3 does not overflow the predicted speed, and the number of pulses at which a certain degree of accuracy is obtained is calculated and set to the counter 2, and a counter start signal is given. The counter 2 measures the number of encoder pulses equal to the number of pulses set in the counter from the input pulse time from the encoder next to the counter start signal, and supplies a count enable signal to the counter 3 until the counter value reaches the set value. . As a result, the counter 3 can measure the time corresponding to the number of pulses set in the counter 2, and can detect the speed based on the ratio of these values. Then, the operation of setting the value of the next encoder phase difference counter using the calculation speed and giving the measurement start signal is repeated.

【0012】[0012]

【発明が解決しようとする課題】前述のように構成した
従来例では次のような不具合がある。
The prior art constructed as described above has the following disadvantages.

【0013】(1)エンコーダ位相差カウンタに設定す
る計測パルス数は速度予測値を用いて計算しなければな
らず演算が必要である。
(1) The number of measurement pulses to be set in the encoder phase difference counter must be calculated using a predicted speed value, and requires an operation.

【0014】(2)エンコーダ位相差カウンタ設定に用
いた速度予測値より実速度が大幅に遅い場合は時間計測
カウンタはオーバーフローし、速度検出ができない。
(2) If the actual speed is much slower than the predicted speed used for setting the encoder phase difference counter, the time measurement counter overflows and the speed cannot be detected.

【0015】(3)零速附近ではエンコーダパルス周期
が長くなり、低速まで計測しようとすると、時間計測カ
ウンタのビット長を長くする必要がある。
(3) The encoder pulse cycle becomes longer near zero speed, and if the measurement is to be performed at a lower speed, the bit length of the time measurement counter must be increased.

【0016】(4)エンコーダ位相差カウンタの計測終
了時から、次回のエンコーダ位相差カウンタ値が設定さ
れ、開始信号が与えられるまでの間は、パルスを計測し
ておらず情報を拾っている期間がある。もし、図22に
示すように、エンコーダ位相差カウンタの計測期間と休
止期間の間に速度変動ムラがあると、正確な平均速度が
計測できないこともある。
(4) From the end of measurement of the encoder phase difference counter to the time when the next encoder phase difference counter value is set and the start signal is given, a period in which pulses are not measured and information is collected. There is. As shown in FIG. 22, if there is uneven speed fluctuation between the measurement period of the encoder phase difference counter and the pause period, an accurate average speed may not be measured.

【0017】(5)図23に示すように、低速域では信
号1Fが速度演算周期毎に得られず、信号4Fを用いて
4逓倍した信号間の位相角を用いて計測しなければなら
ない。この場合、エンコーダの相間の位相誤差が大き
く、計測速度に誤差が多く含まれてしまう。
(5) As shown in FIG. 23, in the low speed range, the signal 1F cannot be obtained every speed calculation cycle, and the measurement must be performed using the phase angle between the signals quadrupled using the signal 4F. In this case, the phase error between the phases of the encoder is large, and the measurement speed includes many errors.

【0018】この発明は上記の事情に鑑みてなされたも
ので、速度変動ムラがあっても正確な平均速度を計測す
ることができるとともに4種類のエッジについて個々に
速度演算して平均化して精度の向上を図ることができる
速度検出装置を提供することを目的とする。
The present invention has been made in view of the above circumstances, and it is possible to measure an accurate average speed even if there is unevenness in speed, and calculate and average the speed of each of the four types of edges to obtain an accuracy. It is an object of the present invention to provide a speed detecting device capable of improving the speed.

【0019】[0019]

【0020】[0020]

【課題を解決するための手段】この発明は上記の目的をSUMMARY OF THE INVENTION The present invention achieves the above object.
達成するために、エンコーダからのパルス列を波形整形Pulse train from encoder to achieve
するとともに波形のエッジ回転の方向及びエッジの種類And the type of edge rotation direction and edge of the waveform
を検出出力するラッチ信号作成部と、A latch signal generator for detecting and outputting このラッチ信号作This latch signal
成部から出力されるエッジ検出と回転方向信号によりアThe edge detection and rotation direction signal output from the component
ップ/ダウンカウントを行ない、信号のエッジ位置角をCount up / down and determine the edge position angle of the signal.
検出出力する角度計測カウンタと、An angle measurement counter for detecting and outputting, 基準クロックをカウReference clock
ントして時刻を検出し、出力するとともに設定された周To detect the time, output it, and
期毎に周期信号を送出する時刻計測カウンタと、A time counter for sending a periodic signal every period; 前記ラSaid la
ッチ信号作成部からの出力信号が供給され、エッジ変化Output signal is supplied from the
時に各エッジの種類に応じた信号によりセット動作を行Sometimes set operation is performed by a signal corresponding to the type of each edge.
ない、各エッジの種類のエッジ変化の有無を保持するエNo, an error that holds the presence or absence of an edge change for each edge type
ッジ検出保持部と、Edge detection holding unit, 前記ラッチ信号作成部から送出されSent from the latch signal generator
るエッジ変化信号をイネーブル信号として各エッジ種類Edge change signal as enable signal for each edge type
に応じて前記角度計測カウンタから送出されるエッジのOf the edge sent from the angle measurement counter in accordance with
角度および時刻計測カウンタから送出されるエッジの発Generation of edge sent from angle and time measurement counter
生時刻を保持する第1、第2のデータラッチ部と、First and second data latch units for holding a raw time; 前記Said
エッジ検出保持部および第1、第2のデータラッチ部のOf the edge detection holding unit and the first and second data latch units.
データが転送され、CPUの演算処理部から読み出し可Data is transferred and can be read from the CPU processing unit
能な第3のデータラッチ部と、A third data latch unit, 外部および内部ラッチ指External and internal latch fingers
令や前記時刻計測カウンタから送出される周期信号が与Command or a periodic signal sent from the time counter.
えられ、これらの条件に基づいて前記第3のデータラッBased on these conditions, the third data
チ部に最新データを第1、第2のデータラッチ部から転The latest data from the first and second data latch
送される信号を発生するコントロール部とからなることConsisting of a control unit that generates the transmitted signal
を特徴とするものである。It is characterized by the following.

【0021】[0021]

【作用】90度位相差出力(A相,B相)を回転角検出
器から得、得られた位相差出力のA相,B相の立上り、
立下りの4種類のエッジの位相角と時刻のデータをラッ
チして速度演算を行う。このような演算を行うことによ
り計測値を取込む周期を速くし、速度変動ムラがあって
も正確な平均値を得ることができる。
A 90-degree phase difference output (A-phase, B-phase) is obtained from the rotation angle detector.
The speed calculation is performed by latching data of the phase angle and time of the four types of falling edges. By performing such a calculation, the cycle for taking in the measured values can be made faster, and an accurate average value can be obtained even if there is speed fluctuation unevenness.

【0022】[0022]

【実施例】以下この発明の実施例を図面に基づいて説明
する。図1は第1実施例で、この図1において、11は
例えば、IMの回転子軸に取り付けられたインクリメン
タルエンコーダからなる回転角度検出器11で、この回
転角検出器11からは90゜位相差があるA,B相の出
力信号が送出される。このA,B相の出力信号にはA信
号の立上り、立下り、B信号の立上り、立下りの4種類
のエッジが存在する。これらのエッジが発生したとき
に、物理的な回転スリットの位相角に相当するエッジ種
類毎に各エッジの位相角と時刻が計測部12で計測さ
れ、出力に角度と時刻データが送出される。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows a first embodiment. In FIG. 1, reference numeral 11 denotes a rotation angle detector 11 composed of, for example, an incremental encoder attached to an IM rotor shaft. A and B phase output signals are transmitted. The A and B phase output signals have four types of edges, that is, the rising and falling edges of the A signal and the rising and falling edges of the B signal. When these edges occur, the measuring section 12 measures the phase angle and time of each edge for each edge type corresponding to the physical phase angle of the rotating slit, and sends the angle and time data to the output.

【0023】両データは第1ラッチ群13に入力され、
この第1ラッチ群13は常に入力されるデータを最新デ
ータとして更新されるように構成されている。第1ラッ
チ群13の更新されたデータは速度演算周期毎に第2ラ
ッチ群14に転送される。第2ラッチ群14に入力され
たデータは速度検出周期毎に任意のエッジ種類を用いて
速度演算部15で演算され、出力に速度が検出される。
Both data are input to the first latch group 13,
The first latch group 13 is configured so that input data is always updated as the latest data. The updated data of the first latch group 13 is transferred to the second latch group 14 every speed calculation cycle. The data input to the second latch group 14 is calculated by the speed calculator 15 using an arbitrary edge type for each speed detection cycle, and the speed is detected at the output.

【0024】図2は第2実施例で、この図2は第1実施
例の詳細なブロック図である。21はエンコーダからの
2相信号(A相,B相)が供給されるラッチ信号作成部
で、このラッチ信号作成部21には波形整形回路が組み
込まれている。ラッチ信号作成部21にエンコーダから
の2相(A,B相)信号が入力されると、その信号より
まずパルスエッジが検出し、そのパルス変化により正転
エッジ/逆転エッジを検出し、UP/DOWN信号を出
力する。また、各エッジ変化を物理的なスリット等の軸
角転角により、4種類に分類し、対応する後述のデータ
ラッチ部へデータラッチイネーブル信号EN0〜EN3
を出力する。なお、イネーブル信号EN0〜EN3は4
つのうちエッジ毎に1つのみ動作する。図3A,Bはエ
ンコーダからUP/DOWN信号を得るときの動作タイ
ミングチャートおよびエッジ選択信号ED0〜ED3を
得るときの動作タイミングチャートである。
FIG. 2 shows a second embodiment, and FIG. 2 is a detailed block diagram of the first embodiment. Reference numeral 21 denotes a latch signal generation unit to which two-phase signals (A phase and B phase) are supplied from the encoder. The latch signal generation unit 21 incorporates a waveform shaping circuit. When a two-phase (A, B-phase) signal is input from the encoder to the latch signal generation unit 21, a pulse edge is first detected from the signal, and a normal rotation edge / reverse rotation edge is detected based on the pulse change. Outputs a DOWN signal. Further, each edge change is classified into four types according to the axial angle shift angle of a physical slit or the like, and data latch enable signals EN0 to EN3 are supplied to a corresponding data latch unit described later.
Is output. The enable signals EN0 to EN3 are 4
Only one of them operates for each edge. 3A and 3B are an operation timing chart when obtaining the UP / DOWN signal from the encoder and an operation timing chart when obtaining the edge selection signals ED0 to ED3.

【0025】22は角度計測カウンタ(角検出カウン
タ)で、このカウンタ22にはラッチ信号作成部11か
らの出力信号のうち4逓倍(4F)信号とUP/DOW
N信号が供給される。両信号は角度計測カウンタ22で
図4に示すタイミングチャートに示すように計測され、
出力にエンコーダの回転角がカウンタデータとして得ら
れる。なお、図4は16進カウンタ2桁の場合を示す。
Reference numeral 22 denotes an angle measurement counter (angle detection counter). The counter 22 includes a quadruple (4F) signal of the output signal from the latch signal generator 11 and an UP / DOW.
An N signal is provided. Both signals are measured by the angle measurement counter 22 as shown in the timing chart of FIG.
The rotation angle of the encoder is obtained as counter data at the output. FIG. 4 shows a case where the hexadecimal counter has two digits.

【0026】23は時刻計測カウンタ(時刻検出カウン
タ)で、このカウンタ23は計測基準クロックCLKと
周期設定値とを計測し、出力に演算周期カウント値とタ
イミング出力(周期信号)SMPLを得る。そのタイミ
ングチャートを図5に示す。このカウンタ23は前記4
F信号発生時刻となる基準時刻を計測するもので、カウ
ンタの有効ビット長は速度演算周期以上であればよい。
ここでは、カウンタ23を速度演算周期発生器として用
いる場合を示し、また、カウンタ23はDOWNカウン
タの例として示した。
Reference numeral 23 denotes a time measurement counter (time detection counter). The counter 23 measures the measurement reference clock CLK and the cycle set value, and obtains an operation cycle count value and a timing output (cycle signal) SMPL at the output. The timing chart is shown in FIG. This counter 23 has the value of 4
It measures the reference time, which is the time when the F signal is generated, and the effective bit length of the counter only needs to be equal to or longer than the speed calculation cycle.
Here, a case is shown in which the counter 23 is used as a speed calculation cycle generator, and the counter 23 is shown as an example of a DOWN counter.

【0027】24−1、24−2…24−4は第1デー
タラッチ部(角度データラッチ)で、この第1データラ
ッチ部24−1、24−2…24−4には角度計測カウ
ンタ22のカウント値出力(角度出力)が供給される。
また、これらラッチ部24−1…24−4にはイネーブ
ル信号ENとしてエッジ選択信号ED0〜ED3が供給
される。これにより各エッジの角度をラッチする。第1
のデータラッチ部24−1は図6に示すD型フリップフ
ロップから構成され、これらフリップフロップは角度計
測カウンタ22のビット数と同数により構成される。な
お、第1データラッチ部24−2…24−4も同様に構
成される。図7は図6の第1データラッチ部24−1の
動作タイミングチャートで、図中「18H」、「1
H」、「1AH」は実際にはこのような動作はないが回
路動作を明確にするための説明用のものである。また、
25−1…25−4は第2データラッチ部で、これらラ
ッチ部25−1…25−4の構成は第1データラッチ部
24−1…24−4と同一構成である。第2データラッ
チ部25−1…25−4には時刻計測カウンタ23のカ
ウント値出力TCNが供給される。
24-4 are first data latch units (angle data latches). The first data latch units 24-1, 24-2. (Count output) is supplied.
24-4 are supplied with edge selection signals ED0 to ED3 as enable signals EN. This latches the angle of each edge. First
Are configured by D-type flip-flops shown in FIG. 6, and these flip-flops are formed by the same number of bits as the angle measurement counter 22. The first data latch units 24-2 to 24-4 have the same configuration. Figure 7 is a operation timing chart of the first data latch unit 24-1 of FIG. 6, in the figure "18 H", "1
“9 H ” and “1A H ” do not actually have such an operation but are used for explanation to clarify the circuit operation. Also,
25-4 are second data latch units. The configuration of these latch units 25-1 to 25-4 is the same as that of the first data latch units 24-1 to 24-4. The second data latch units 25-1 to 25-4 are supplied with the count value output TCN of the time measurement counter 23.

【0028】26はラッチ信号作成部21から送出され
るエッジ選択信号ED0〜ED3が供給されるエッジ検
出保持部で、このエッジ検出保持部26は図8に示すよ
うにJ−Kフリップフロップから形成され、速度検出周
期中にED0〜ED3の各エッジの変化検出の有無を検
出保持する。1回でも対応するエッジの変化があれば、
「1」を設定し、1回も生じなかった場合は「0」を保
持する。この保持データは第1データラッチ部24−1
…24−4から第2データラッチ部25−1…25−4
にデータ転送する毎に「0」にリセットする。図9は図
8のタイミングチャートである。
Reference numeral 26 denotes an edge detection and holding unit to which edge selection signals ED0 to ED3 sent from the latch signal generation unit 21 are supplied. The edge detection and holding unit 26 is formed of a JK flip-flop as shown in FIG. Then, during the speed detection period, the presence / absence of the change detection of each edge of ED0 to ED3 is detected and held. If there is a corresponding edge change even once,
"1" is set, and "0" is held if no occurrence has occurred. The held data is stored in the first data latch unit 24-1.
.. 24-4 to the second data latch section 25-1.
Is reset to "0" every time data is transferred. FIG. 9 is a timing chart of FIG.

【0029】32は第3データラッチ部で、この第3デ
ータラッチ部は次の3つの回路から構成されている。ま
ず、27−1…27−4は角度データラッチで、このラ
ッチはパルスエッジ毎に更新繰り返している第1データ
ラッチ部24−1…24−4のラッチデータについて速
度演算周期信号SMPLが出力された時刻のデータをラ
ッチする。CPU30からは前記角度データラッチ27
−1…27−4を通して角度情報が読み取られる。上記
のようにデータラッチ部の構成を2重化としたため、C
PU30からの読出し動作中でも第1データラッチ部2
4−1…24−4は計測及びデータの変更が可能となる
利点がある。
Reference numeral 32 denotes a third data latch unit, which is composed of the following three circuits. First, 27-1... 27-4 are angle data latches. The latch outputs a speed calculation cycle signal SMPL for the latch data of the first data latch units 24-1. Latches the data at the specified time. The CPU 30 sends the angle data latch 27
Angle information is read through -1... 27-4. As described above, since the configuration of the data latch unit is duplicated,
First data latch unit 2 during read operation from PU 30
4-1... 24-4 have an advantage that measurement and data can be changed.

【0030】28−1…28−4は第3データラッチ部
32のうちの時刻データラッチで、このラッチ28−1
…28−4は速度演算周期信号SMPLのタイミング
で、第2データラッチ部25−1…25−4のデータを
転送/保持する。この時刻データラッチ28−1…28
−4もCPU30から読出し可能である。
28-4 are time data latches in the third data latch section 32.
.., 28-4 transfer / hold the data of the second data latch units 25-1 to 25-4 at the timing of the speed calculation cycle signal SMPL. The time data latches 28-1 ... 28
-4 can also be read from the CPU 30.

【0031】29は第3データラッチ部32のうちのエ
ッジ検出部で、この検出部29もSMPL信号のタイミ
ングでラッチ動作を行う。このエッジ検出部29はエッ
ジ検出保持部26からのデータが入力され、1ビットで
構成され、CPU30から読み出し可能になっている。
Reference numeral 29 denotes an edge detection section of the third data latch section 32. This detection section 29 also performs a latch operation at the timing of the SMPL signal. The edge detection unit 29 receives data from the edge detection and holding unit 26, is configured by 1 bit, and is readable by the CPU 30.

【0032】31は速度演算周期信号SMPLを出力す
るコントロール部で、このコントロール部31には時刻
計測カウンタ23からのタイミング出力、CPU30か
らのラッチ信号及び外部端子からのラッチ信号等により
上記SMPL信号を送出し、この信号が第3データラッ
チ部とエッジ検出保持部26のイネーブル信号ENとな
る。
A control unit 31 outputs a speed calculation period signal SMPL. The control unit 31 receives the SMPL signal based on a timing output from the time measurement counter 23, a latch signal from the CPU 30 and a latch signal from an external terminal. This signal is used as an enable signal EN for the third data latch unit and the edge detection holding unit 26.

【0033】次に上記実施例の速度検出演算について述
べる。速度検出演算には次の2通りの手段がある。
Next, the speed detection calculation of the above embodiment will be described. The speed detection calculation includes the following two methods.

【0034】(1)SMPL周期間にエッジ検出が1つ
以上存在する場合、(2)SMPL周期間にエッジ検出
が1つも無い場合。
(1) When one or more edge detections exist during the SMPL cycle, and (2) When there is no edge detection during the SMPL cycle.

【0035】まず、上記(1)の場合について述べる。
図10のように低速でエンコーダパルス周期が長く(A
相,B相のように)、速度演算周期TS間に4逓倍の信
号が4種類ともないような場合であっても、現在の検出
時刻をT1とすると、T2→T1間に少なくとも1つのパ
ルスの変化が存在する場合(図中、td,teがT2→T1
間にエッジ検出した時刻である)、この新しい方のデー
タ(カウント値の小さい方)を用いて速度演算を行う
(ここではte)。そして、位相はパルスの1周期で計
算するため、対応するエッジでかつ前回CPUに検出さ
れた値taの時刻のデータを用いる。
First, the case (1) will be described.
As shown in FIG. 10, the encoder pulse cycle is long at a low speed (A
Phase, B-phase), even if there are no four types of quadrupled signals during the speed calculation period T S , if the current detection time is T 1 , at least between T 2 → T 1 When there is one pulse change (t d and t e are T 2 → T 1 in the figure)
The speed is calculated using the newer data (the smaller count value) (here, t e ). The phase is to compute in one period of the pulse, using data time of the corresponding edge a and the value t a which was detected last CPU.

【0036】位相角の差はΔθ=θe−θaにより計算で
きる。しかし、時間については、 T2→Te間=(Ts−Te) T3→T2間=Tsa→Td間=Ta の3つのサンプル周期にわたる期間の和であり、 ΔT=(Ts−Te)+Ts+Taとなる。
The difference between the phase angles can be calculated by Δθ = θ e −θ a . However, for the time, T 2 → T e = (T s −T e ) T 3 → T 2 = T s T a → T d = T a The sum of the periods over three sample periods: [Delta] T = a (T s -T e) + T s + T a.

【0037】そして、速度ωはω=Δθ/ΔTの式で計
算する。高速で、サンプル周期毎に4逓倍の信号が4種
類とも発生する場合には、上記のT3→T2間のデータは
存在せず、Ta…TOLD,Te=TNewと一般形とおくと、
ωは次式で計算できる。
The speed ω is calculated by the equation ω = Δθ / ΔT. Fast, when the signal of quadruple the sample period each occurs all four types, absent data between the above T 3 → T 2, T a ... T OLD, T e = T New and general form After all,
ω can be calculated by the following equation.

【0038】 ω=(θNew−θOLD)/{(TS−TNew)+TOLD} この実施例では、前述の図10のようにT3→T2間にパ
ルスが無い期間が存在する場合には図11に示すように
サンプル周期TS分をTaの値に加算すればよく、加算を
ソフトウェアで実現すれば、4逓倍信号が1サンプル期
間に1パルスしか入力されず、前回パルスとの1周期分
の時間差が時刻計測カウンタ23をオーバする場合で
も、エンコーダパルスの1周期の整数倍について時刻計
測カウンタ23以上の時刻が正確に計測できる。また、
4逓倍の全てのエッジデータを記憶しておけば、サンプ
ル時にどのエッジが発生しても、任意のエッジの1周期
の整数倍の周期が得られる。
Ω = (θ New −θ OLD ) / {(T S −T New ) + T OLD } In this embodiment, there is a period during which there is no pulse between T 3 → T 2 as shown in FIG. case may be added to the sample period T S content as shown in FIG. 11 to the value of T a, if realized added by software, quadrupled signal is not inputted only one pulse in one sample period, the last pulse Even when the time difference of one cycle exceeds the time measurement counter 23, the time of the time measurement counter 23 or more can be accurately measured for an integral multiple of one cycle of the encoder pulse. Also,
If all the edge data of the quadruple are stored, a cycle that is an integral multiple of one cycle of an arbitrary edge can be obtained regardless of which edge occurs at the time of sampling.

【0039】ここで、TS+Taのようにパルスが発生し
ない場合を述べると、F(0)〜F(3)のフラグにて
対応するエッジが発生しないときには、前回データにT
sだけ加算するようにすれば、何周期にわたり、エッジ
が来なくても、Taの前回値は正確に維持できる。これ
を各エッジ毎に判定及び加算処理を行えばよい。
Here, a case where no pulse is generated, such as T S + T a , is described. If no corresponding edge is generated by the flags of F (0) to F (3), T
If only to sum s, over what period, without coming edges, the previous value of T a may be maintained accurately. This may be determined and added for each edge.

【0040】次に前記(2)のSMPL周期間にエッジ
検出が1つも無い場合について述べる。図12Aはタイ
ミングチャート、図12BはSMPL割込直後の前回値
時刻データの推移を示す説明図で、ΔT=ZT(0)〜
ZT(3)のうち最も古い値(値の大きなもの)(図1
2Bではta+2Ts)、Δθ=1(エンコーダ1周期)
とすると、T1のサンプル直後に最も古い値のデータの
エッジが発生すると仮定した場合の速度推定値は次式で
求められる。
Next, a case where there is no edge detection during the SMPL cycle of (2) will be described. FIG. 12A is a timing chart, and FIG. 12B is an explanatory diagram showing a transition of the previous value time data immediately after the SMPL interrupt. ΔT = ZT (0))
The oldest value (large value) of ZT (3) (FIG. 1)
In 2B, t a + 2T s ), Δθ = 1 (one cycle of encoder)
When the speed estimated value assuming that the edge of the data of the oldest value immediately after a sample of T 1 is generated is given by the following equation.

【0041】 ω=Δθ/ΔT=(1/ΔT)×Sgn(ω’) Sgn(ω’)は前回の速度検出値の回転方向極性であ
る。
Ω = Δθ / ΔT = (1 / ΔT) × Sgn (ω ′) Sgn (ω ′) is the rotation direction polarity of the previous detected speed value.

【0042】もし、次回のサンプルT0の時刻までエン
コーダパルスが発生しない場合、ZT(0)〜ZT
(3)はTsだけ速度推定後加算されており、ΔT=ta
・3Tsのように前回よりTsだけ長いΔTで速度推定で
き、図13のようにパルス入力停止時でも、推定速度が
低下しながら追従できる。いわゆる、タウマチック動作
を行う。
[0042] If the encoder pulse does not occur until the time of the next sample T 0, ZT (0) ~ZT
(3) is added after the speed estimated by T s, ΔT = t a
Speed can be estimated at ΔT longer by T s than the previous time, such as 3T s , and even when the pulse input is stopped as shown in FIG. A so-called taumatic operation is performed.

【0043】図14は上述した速度検出演算動作のフロ
ーチャートである。
FIG. 14 is a flowchart of the above-described speed detection calculation operation.

【0044】[0044]

【発明の効果】以上述べたように、この発明によれば、
次のような効果が得られる。
As described above, according to the present invention,
The following effects can be obtained.

【0045】(1)この発明では常にデータを計測して
いるので、(a)計測値を取込む周期を速くすることが
でき、(b)速度ムラがあっても漏なくデータをカウン
トするため正確な平均値が計測でき、(c)従来のよう
な角度計測カウンタ値の設定のための速度演算が不要と
なる。
(1) Since data is always measured in the present invention, (a) the period for taking in the measured values can be shortened, and (b) data can be counted without fail even if there is speed unevenness. An accurate average value can be measured, and (c) the speed calculation for setting the angle measurement counter value as in the related art is unnecessary.

【0046】(2)4種類のエッジに関して個別に計測
値をラッチするので、(a)従来の1F信号(同一エッ
ジ間で計測)や4F信号(隣合ったエッジ間で計測)に
より速度演算の切換えが計測後任意に選択できる、
(b)従来の1F信号の場合でも4種類のエッジについ
て個々に速度演算して平均化することにより、精度向上
を図ることができる。
(2) Since the measured values are individually latched for the four types of edges, (a) the speed calculation of the conventional 1F signal (measured between the same edges) and the 4F signal (measured between adjacent edges) is performed. Switching can be selected arbitrarily after measurement,
(B) Even in the case of a conventional 1F signal, the accuracy can be improved by individually calculating the speed and averaging the four types of edges.

【0047】(3)位相角と時刻の形で検出するので、
(a)速度演算は前回値との差のみでなく、CPUメモ
リ上に格納した前々回等のデータを用いて、計測時間を
長くすることにより、精度も向上でき、(b)時刻計測
カウンタも速度演算周期間だけ計測できれば、それ以上
長い場合はソフトウェアで内部メモリに速度検出を加算
するようにすれば、長時間タイマが構成できる。
(3) Since the phase angle and the time are detected,
(A) The speed calculation can be improved not only by the difference from the previous value, but also by increasing the measurement time by using the data before the last time stored in the CPU memory, and the accuracy can be improved. If the measurement can be performed only during the calculation cycle, and if it is longer than that, the speed detection is added to the internal memory by software, so that a long time timer can be configured.

【0048】(4)角度計測カウンタは位置制御に用い
る位置検出器と兼用できる。
(4) The angle measurement counter can also be used as a position detector used for position control.

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

【図1】この発明の第1実施例を示すブロック図であ
る。
FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】この発明の第2実施例を示すブロック図であ
る。
FIG. 2 is a block diagram showing a second embodiment of the present invention.

【図3】A,Bはラッチ信号作成部のタイミングチャー
トである。
FIGS. 3A and 3B are timing charts of a latch signal generation unit.

【図4】角度計測カウンタのタイミングチャートであ
る。
FIG. 4 is a timing chart of an angle measurement counter.

【図5】時刻計測カウンタのタイミングチャートであ
る。
FIG. 5 is a timing chart of a time measurement counter.

【図6】データラッチ部の構成説明図である。FIG. 6 is an explanatory diagram of a configuration of a data latch unit.

【図7】図6の動作タイミングチャートである。FIG. 7 is an operation timing chart of FIG. 6;

【図8】エッジ検出保持部の構成説明図である。FIG. 8 is an explanatory diagram of a configuration of an edge detection holding unit.

【図9】図8の動作タイミングチャートである。9 is an operation timing chart of FIG.

【図10】速度検出演算を説明するためのもので、エッ
ジ検出が1つ以上ある場合のタイミングチャートであ
る。
FIG. 10 is a timing chart for explaining speed detection calculation and in a case where there is one or more edge detections.

【図11】速度検出演算を説明するためのタイミングチ
ャートである。
FIG. 11 is a timing chart for explaining speed detection calculation.

【図12】Aは速度検出演算を説明するためのもので、
エッジ検出が1つも無い場合のタイミングチャート、B
は前回値時刻データ説明図である。
FIG. 12A is a diagram for explaining speed detection calculation.
Timing chart when there is no edge detection, B
Is an explanatory diagram of the previous value time data.

【図13】パルス入力停止時における速度検出演算のタ
イミングチャートである。
FIG. 13 is a timing chart of the speed detection calculation when the pulse input is stopped.

【図14】速度検出演算を説明するフローチャートであ
る。
FIG. 14 is a flowchart illustrating speed detection calculation.

【図15】θ,tのデータが離散値として与えられた場
合の説明図である。
FIG. 15 is an explanatory diagram when θ and t data are given as discrete values.

【図16】インクリメンタルエンコーダの出力波形図で
ある。
FIG. 16 is an output waveform diagram of an incremental encoder.

【図17】IMが反時計方向に回転しているときのパル
スピックアップの出力波形図である。
FIG. 17 is an output waveform diagram of the pulse pickup when the IM is rotating counterclockwise.

【図18】IMが時計方向に回転しているときのパルス
ピックアップの出力波形図である。
FIG. 18 is an output waveform diagram of the pulse pickup when the IM is rotating clockwise.

【図19】エッジ選択信号とスリット位置との物理的位
置角の説明図である。
FIG. 19 is an explanatory diagram of a physical position angle between an edge selection signal and a slit position.

【図20】従来例を示すブロック図である。FIG. 20 is a block diagram showing a conventional example.

【図21】図20の動作タイミングチャートである。21 is an operation timing chart of FIG.

【図22】速度変動ムラがあるときの平均速度計測説明
図である。
FIG. 22 is an explanatory diagram of average speed measurement when there is speed fluctuation unevenness.

【図23】低速域における動作タイミングチャートであ
る。
FIG. 23 is an operation timing chart in a low speed range.

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

11…回転角度検出器 12…計測部 13…第1ラッチ群 14…第2ラッチ群 15…速度演算部 21…ラッチ信号作成部 22…角度計測カウンタ 23…時刻計測カウンタ 24−1〜24−4…第1データラッチ部 25−1〜25−4…第2データラッチ部 26…エッジ検出保持部 27−1〜27−4、28−1〜28−4、29…第3
データラッチ部 30…CPU 31…コントロール部
DESCRIPTION OF SYMBOLS 11 ... Rotation angle detector 12 ... Measurement part 13 ... 1st latch group 14 ... 2nd latch group 15 ... Speed calculation part 21 ... Latch signal creation part 22 ... Angle measurement counter 23 ... Time measurement counter 24-1-24-4 ... first data latch units 25-1 to 25-4 ... second data latch units 26 ... edge detection and holding units 27-1 to 27-4, 28-1 to 28-4, 29 ... third
Data latch unit 30 CPU 31 Control unit

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 エンコーダからのパルス列を波形整形す
るとともに波形のエッジ、回転の方向及びエッジの種類
を検出出力するラッチ信号作成部と、 このラッチ信号作成部から出力されるエッジ検出と回転
方向信号によりアップ/ダウンカウントを行ない、信号
のエッジ位置角を検出出力する角度計測カウンタと、 基準クロックをカウントして時刻を検出し、出力すると
ともに設定された周期毎に周期信号を送出する時刻計測
カウンタと、 前記ラッチ信号作成部からの出力信号が供給され、エッ
ジ変化時に各エッジの種類に応じた信号によりセット動
作を行ない、各エッジの種類のエッジ変化の有無を保持
するエッジ検出保持部と、 前記ラッチ信号作成部から送出されるエッジ変化信号を
イネーブル信号として各エッジ種類に応じて前記角度計
測カウンタから送出されるエッジの角度および時刻計測
カウンタから送出されるエッジの発生時刻を保持する第
1、第2のデータラッチ部と、 前記エッジ検出保持部および第1、第2のデータラッチ
部のデータが転送され、CPUの演算処理部から読み出
し可能な第3のデータラッチ部と、 外部および内部ラッチ指令や前記時刻計測カウンタから
送出される周期信号が与えられ、これらの条件に基づい
て前記第3のデータラッチ部に最新データを第1、第2
のデータラッチ部から転送させる信号を発生するコント
ロール部とからなることを特徴とする 速度検出装置。
1. A waveform of a pulse train from an encoder is shaped.
And the edge of the waveform, the direction of rotation and the type of edge
Latch signal generating section for detecting and outputting, and edge detection and rotation output from the latch signal generating section.
Count up / down by direction signal
The angle measuring counter for detecting outputs an edge position angle, to detect the time by counting a reference clock, and outputs
Time measurement for sending a periodic signal for each set period
An output signal from the counter and the latch signal generator is supplied to
When the edge changes, it is set by a signal corresponding to the type of each edge
And keeps the presence or absence of edge change of each edge type
And an edge change signal sent from the latch signal generator.
The angle meter according to each edge type as an enable signal
Edge angle and time measurement sent from measurement counter
No. that holds the occurrence time of the edge sent from the counter
1, a second data latch unit, the edge detection holding unit, and first and second data latches
Data is transferred and read from the arithmetic processing unit of the CPU.
From the external and internal latch commands and the time measurement counter.
Given the periodic signal to be sent, based on these conditions
The latest data is stored in the third data latch section by the first and second data latch sections.
Controller that generates a signal to be transferred from the data latch
A speed detecting device comprising a roll part .
JP26641392A 1992-10-06 1992-10-06 Speed detector Expired - Lifetime JP3173174B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26641392A JP3173174B2 (en) 1992-10-06 1992-10-06 Speed detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26641392A JP3173174B2 (en) 1992-10-06 1992-10-06 Speed detector

Publications (2)

Publication Number Publication Date
JPH06118090A JPH06118090A (en) 1994-04-28
JP3173174B2 true JP3173174B2 (en) 2001-06-04

Family

ID=17430592

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26641392A Expired - Lifetime JP3173174B2 (en) 1992-10-06 1992-10-06 Speed detector

Country Status (1)

Country Link
JP (1) JP3173174B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015230187A (en) * 2014-06-03 2015-12-21 東洋電機製造株式会社 Rotation phase velocity detection device

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4867534B2 (en) * 2006-09-11 2012-02-01 株式会社明電舎 Motor speed detection device
JP4998788B2 (en) * 2007-09-28 2012-08-15 富士電機株式会社 Speed detection device
JP4998789B2 (en) * 2007-10-03 2012-08-15 富士電機株式会社 Speed detection device
JP4952631B2 (en) * 2008-03-28 2012-06-13 富士電機株式会社 Speed detection device
JP2010008235A (en) * 2008-06-27 2010-01-14 Fuji Electric Systems Co Ltd Speed detection device
JP2010117150A (en) * 2008-11-11 2010-05-27 Fuji Electric Systems Co Ltd Velocity detector
JP6825260B2 (en) * 2016-08-08 2021-02-03 株式会社明電舎 Speed detector and speed control system
JP6757287B2 (en) * 2017-04-11 2020-09-16 東洋電機製造株式会社 Speed detector
JP7327222B2 (en) * 2020-03-12 2023-08-16 株式会社明電舎 SPEED DETECTION DEVICE AND SPEED DETECTION METHOD
JP6976371B2 (en) * 2020-03-13 2021-12-08 三菱電機株式会社 Rotation speed detector

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015230187A (en) * 2014-06-03 2015-12-21 東洋電機製造株式会社 Rotation phase velocity detection device

Also Published As

Publication number Publication date
JPH06118090A (en) 1994-04-28

Similar Documents

Publication Publication Date Title
JP3173174B2 (en) Speed detector
JPH01320424A (en) Apparatus for detecting position of mobile machine element
JP4253372B2 (en) Elevator speed control apparatus and recording medium recording elevator speed detection program
JPS5913957A (en) Speed detecting circuit
US5198750A (en) Extremely wide range frequency measurement method
JP3596942B2 (en) Speed detector
JPH0217415A (en) Method and apparatus for evaluating signal of increment type transmitter
JP3423211B2 (en) Encoder misalignment detector
JP2002311040A (en) Speed detector
JPH04346069A (en) Speed signal generating circuit
JPH01320468A (en) Method and apparatus for measuring revolutions of machine
KR19990043005A (en) Motor speed detection device using incremental encoder
Li et al. An improved M/T speed algorithm based on RISC-V DSP
JPH04285815A (en) Position counter circuit of rotary encoder
JP2002531834A (en) Mixed speed estimation
Rull et al. Programmable logic design for an encoder-based velocity sensor in a DSP-controlled motion system
JPH0560808A (en) Period measuring instrument, frequency measuring instrument, period and frequency measuring method, and meter driving device
KR100286043B1 (en) speed detecting system and method thereof
SU752425A1 (en) Shaft angular position- to-code converter
KR940004954B1 (en) Arrangement for speed regulation of electric motor
JP3248209B2 (en) Position detection method
KR19990085942A (en) Speed detection device and method
JPH0340847B2 (en)
JPH0351764A (en) Apparatus for detecting speed and acceleration
JP3152327B2 (en) Speed change detection device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080330

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090330

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090330

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100330

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110330

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110330

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120330

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130330

Year of fee payment: 12

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130330

Year of fee payment: 12