JP2010117150A - Velocity detector - Google Patents

Velocity detector Download PDF

Info

Publication number
JP2010117150A
JP2010117150A JP2008288565A JP2008288565A JP2010117150A JP 2010117150 A JP2010117150 A JP 2010117150A JP 2008288565 A JP2008288565 A JP 2008288565A JP 2008288565 A JP2008288565 A JP 2008288565A JP 2010117150 A JP2010117150 A JP 2010117150A
Authority
JP
Japan
Prior art keywords
edge
speed
rotation direction
value
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
JP2008288565A
Other languages
Japanese (ja)
Inventor
Ikuya Sato
以久也 佐藤
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Systems Co Ltd
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 Fuji Electric Systems Co Ltd filed Critical Fuji Electric Systems Co Ltd
Priority to JP2008288565A priority Critical patent/JP2010117150A/en
Publication of JP2010117150A publication Critical patent/JP2010117150A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Control Of Electric Motors In General (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a highly versatile and inexpensive velocity detector allowing a velocity to be detected with high accuracy even in an extra-low velocity range. <P>SOLUTION: This velocity detector includes: a latch signal preparer 21 for detecting an edge of an output pulse of an encoder; a rotative direction detector 32 for detecting a rotative direction based on the edge; a rotative direction holder 33; a time counter 23 for measuring time in synchronization with a velocity calculation period; data latches 25-1 to 25-4 for holding time measurement values from an output of the signal preparer 21; an edge change information holder 29 for detecting the state of a change in the edge within the calculation period to hold it as edge change information; and a CPU 30A for predicting a next appearing edge from the rotative direction and the change information in the event that no change arises in the edge within the calculation period to calculate a rotative velocity by using a time correction value proportional to the calculation period, a time measurement value, and the rotative direction. <P>COPYRIGHT: (C)2010,JPO&amp;INPIT

Description

本発明は、例えば電動機を可変速駆動する電動機駆動装置において、電動機に取り付けたエンコーダの出力パルスを用いて電動機速度を検出する速度検出装置に関するものである。   The present invention relates to a speed detection device that detects a motor speed using an output pulse of an encoder attached to the motor, for example, in a motor drive device that drives the motor at a variable speed.

電動機を可変速駆動する装置として、インバータが知られている。インバータの機能の中で、電動機の速度を高精度に制御するために、電動機に取り付けたエンコーダの出力パルス信号に基づいて電動機速度を検出し、速度指令値との偏差をゼロにする速度調節機能を用いて制御を行うものがある。   An inverter is known as a device for driving an electric motor at a variable speed. Speed control function that detects the motor speed based on the output pulse signal of the encoder attached to the motor and makes the deviation from the speed command value zero in order to control the motor speed with high accuracy. There is something that controls using.

しかし、エンコーダの出力パルスは通常、1回転あたりのパルス数が決められており、パルスは回転速度によって粗密が発生する。パルスが粗となる低速領域では、検出精度が悪化して速度検出値に誤差が生じるため、速度制御性能を悪化させる原因となる。速度制御性能が悪化すると、例えばクレーンなどでは、速度制御誤差がトルクのリプルとなり、積荷に振動が伝わって問題になる。あるいは速度制御誤差により、自動運転中に積荷の停止位置に誤差が生じ、他の機器に影響を及ぼす等の問題が生じる。
また、エンコーダの取り付け方により、出力パルスの位相誤差が発生し、この出力パルスに基づく検出方法では、速度検出値に位相誤差の影響が現れ、上述したようなトルクリプル等の問題を引き起こす。
However, the number of pulses per revolution is usually determined for the output pulses of the encoder, and the pulses are coarse and dense depending on the rotational speed. In the low speed region where the pulse is rough, the detection accuracy is deteriorated and an error occurs in the speed detection value, which causes the speed control performance to deteriorate. When the speed control performance deteriorates, for example, in a crane or the like, the speed control error becomes a torque ripple, and vibration is transmitted to the load, which becomes a problem. Alternatively, the speed control error causes an error in the load stop position during automatic operation, which causes problems such as affecting other devices.
Further, the phase error of the output pulse is generated depending on how the encoder is attached, and in the detection method based on this output pulse, the influence of the phase error appears on the speed detection value, causing problems such as torque ripple as described above.

そこで、上述の問題を解決するため、特許文献1には、エンコーダの出力パルスの立ち上がりエッジ、立ち下がりエッジを利用して速度を検出する方法が開示されている。以下、この従来技術について簡単に説明する。   Therefore, in order to solve the above-described problem, Patent Document 1 discloses a method for detecting the speed by using the rising edge and the falling edge of the output pulse of the encoder. The prior art will be briefly described below.

図10は、特許文献1に記載された従来技術の構成図である。
図10において、ラッチ信号作成部21は、エンコーダから出力されるA相、B相という位相の異なった2種類のパルスからそれぞれの立ち上がりエッジ、立ち下がりエッジを検出し、合計4種類のラッチ信号ED0〜ED3を作成する。角度計測カウンタ22は、ラッチ信号(4F)と電動機の回転方向を示すUP/DOWN信号を用いてカウンタのUP,DOWNを行う。
FIG. 10 is a configuration diagram of the prior art described in Patent Document 1. In FIG.
In FIG. 10, the latch signal generating unit 21 detects the rising edge and the falling edge from two types of pulses having different phases of A phase and B phase output from the encoder, and a total of four types of latch signals ED0. Create ED3. The angle measurement counter 22 performs UP / DOWN of the counter using the latch signal (4F) and the UP / DOWN signal indicating the rotation direction of the electric motor.

時間計測カウンタ23は、速度演算周期に同期してゼロになるダウンカウンタである。4種類のラッチ信号ED0〜ED3のそれぞれに対応させて、角度計測カウンタ22の値をラッチして保存する第1データラッチ24−1〜24−4と、時間計測カウンタ23の値をラッチして保存する第2データラッチ25−1〜25−4とを設け、更に、速度演算周期毎に入力データをラッチする角度データラッチ27−1〜27−4,時間データラッチ28−1〜28−4を設ける。
なお、CPU30では、速度演算周期毎に角度計測値(データラッチ27−1〜27−4の値)と時間計測値(データラッチ28−1〜28−4の値)とを読み込み、検出フローチャートに従って電動機の速度を検出する。
The time measurement counter 23 is a down counter that becomes zero in synchronization with the speed calculation cycle. Corresponding to each of the four types of latch signals ED0 to ED3, the first data latch 24-1 to 24-4 that latches and stores the value of the angle measurement counter 22, and the value of the time measurement counter 23 are latched. Second data latches 25-1 to 25-4 for storing are provided, and angle data latches 27-1 to 27-4 and time data latches 28-1 to 28-4 for latching input data for each speed calculation cycle. Is provided.
The CPU 30 reads the angle measurement values (values of the data latches 27-1 to 27-4) and the time measurement values (values of the data latches 28-1 to 28-4) for each speed calculation cycle, and follows the detection flowchart. Detect the speed of the motor.

また、26は、ラッチ信号ED0〜ED3からA相パルス、B相パルスのエッジ変化を検出して保持するエッジ保持部、29は、エッジ保持部26の出力信号FIL0〜FIL3から、エッジの変化が1回でもあれば「1」を、変化が1回もなければ「0」を設定して保持することによりエッジの変化情報を保持するエッジ変化情報保持部、31はコントローラ、51は第3データラッチを示す。   Reference numeral 26 denotes an edge holding unit that detects and holds edge changes of the A-phase pulse and B-phase pulse from the latch signals ED0 to ED3, and 29 denotes an edge change from the output signals FIL0 to FIL3 of the edge holding unit 26. An edge change information holding unit for holding edge change information by setting and holding "1" if there is even one change and "0" if there is no change, 31 is a controller, 51 is the third data Indicates a latch.

図11は、上記従来技術による速度検出動作を示すフローチャートである。
速度演算周期毎にエッジの変化の有無を図10のエッジ保持部26により検出し、速度演算周期毎にラッチしたエッジ変化情報保持部29の出力値F0〜F3をCPU30が読み込む。速度演算周期において一度でもエッジを検出していたら、カウント値の大小から最新のエッジを検索し、最新エッジに対応するデータラッチ27−1〜27−4の角度計測値とデータラッチ28−1〜28−4の時間計測値とを用いて、数式1に基づき速度ωを演算する。
FIG. 11 is a flowchart showing the speed detection operation according to the conventional technique.
The edge holding unit 26 in FIG. 10 detects the presence or absence of an edge change for each speed calculation cycle, and the CPU 30 reads the output values F0 to F3 of the edge change information holding unit 29 latched for each speed calculation cycle. If the edge is detected even once in the speed calculation cycle, the latest edge is searched from the magnitude of the count value, and the angle measurement values of the data latches 27-1 to 27-4 corresponding to the latest edge and the data latches 28-1 to 28-1 are searched. The speed ω is calculated based on Equation 1 using the time measurement value 28-4.

Figure 2010117150
Figure 2010117150

ただし、θNewは今回のサンプルタイミングで読み込んだ角度計測値、θOLDは前回のサンプルタイミングで読み込んだ角度計測値、Tはサンプリング周期、TNewは今回のサンプルタイミングで読み込んだ時間計測値、TOLDは前回のサンプルタイミングで読み込んだ時間計測値である。
また、回転速度が低く、速度演算周期内にパルスが一度も存在しなかった場合は、TOLDにサンプリング周期Tを加えて速度ωを推定する。
However, θ New angle measurement value read in the current sample timing, θ OLD angle measurement value read in the previous sample timing, T S is the sampling period, T New time measurement value read in the current sample timing, T OLD is a time measurement value read at the previous sample timing.
If the rotation speed is low and no pulse exists within the speed calculation period, the sampling period T S is added to T OLD to estimate the speed ω S.

特開平6−118090号公報([0024]〜[0043]、図2,図14)JP-A-6-1118090 ([0024] to [0043], FIGS. 2 and 14)

上記の従来技術では、低速域において速度演算周期内にエンコーダからパルスが発生せず、エッジが存在しない場合には、サンプルタイミングを基準として最新のエッジに対応する時間にサンプリング周期Tを加算することで時間計測値を補正し、速度ωを推定している。
しかしながら、速度演算周期の2〜3回にわたってエンコーダからパルスが発生しないような極低速域では、速度の真値に対して誤差が発生し、電動機のトルクリプル等の問題を生じることになる。
そこで、本発明の解決課題は、極低速域においても真値に対する定常誤差を生じることがなく、高精度に速度を検出可能とした速度検出装置を提供することにある。
In the above prior art, a pulse from the encoder is not generated in the speed calculation cycle in the low speed range, if the edge is not present, adds the sampling period T S in time corresponding to the latest edge sample timing as a reference Thus, the time measurement value is corrected, and the speed ω S is estimated.
However, in an extremely low speed region where no pulse is generated from the encoder over two or three times of the speed calculation cycle, an error occurs with respect to the true value of the speed, causing problems such as torque ripple of the motor.
Therefore, a problem to be solved by the present invention is to provide a speed detection device capable of detecting a speed with high accuracy without causing a steady error with respect to a true value even in an extremely low speed range.

上記課題を解決するため、請求項1に係る発明は、速度検出対象としての回転体に取り付けられたエンコーダの出力パルスから、回転体の回転速度を検出する速度検出装置において、
前記出力パルスのエッジを検出するエッジ検出手段と、
検出されたエッジに基づいて回転体の回転方向を検出する回転方向検出手段と、
速度演算周期に同期した時間を計測する時間計測手段と、
前記エッジ検出手段の出力により前記時間計測手段の時間計測値を保持する時間記憶手段と、
速度演算周期内のエッジの変化状態を検出しエッジ変化情報として保持するエッジ変化情報保持手段と、
前記回転方向及びエッジ変化情報から、速度演算周期内にエッジの変化がない場合に次に発生するエッジを予測するエッジ予測手段と、
速度演算周期内にエッジの変化がない場合に、速度演算周期に比例する時間補正値を最新のエッジ変化があったときの前記時間計測値に対し加算または減算した値と、前記回転方向とを用いて、現在の速度演算周期における回転体の回転速度を演算する演算手段と、
を備えたものである。
In order to solve the above-mentioned problem, the invention according to claim 1 is a speed detection device for detecting a rotation speed of a rotating body from an output pulse of an encoder attached to the rotating body as a speed detection target.
Edge detection means for detecting an edge of the output pulse;
Rotation direction detection means for detecting the rotation direction of the rotating body based on the detected edge;
A time measuring means for measuring time synchronized with the speed calculation cycle;
Time storage means for holding the time measurement value of the time measurement means by the output of the edge detection means;
Edge change information holding means for detecting the edge change state within the speed calculation cycle and holding it as edge change information;
Edge prediction means for predicting the next edge to be generated when there is no change in edge within the speed calculation cycle from the rotation direction and edge change information;
When there is no change in the edge within the speed calculation cycle, a value obtained by adding or subtracting a time correction value proportional to the speed calculation cycle to the time measurement value when the latest edge change has occurred, and the rotation direction Calculation means for calculating the rotational speed of the rotating body in the current speed calculation cycle,
It is equipped with.

本発明によれば、速度演算周期内にエンコーダからパルスが発生せず、エッジが存在しないような極低速域においても、速度演算周期から時間補正値を求め、この時間補正値を時間計測値に対し加算または減算した値と回転方向とを用いることで、高精度な速度検出が可能である。   According to the present invention, the time correction value is obtained from the speed calculation cycle even in an extremely low speed region where no pulse is generated from the encoder within the speed calculation cycle and no edge exists, and this time correction value is used as the time measurement value. By using the added or subtracted value and the rotation direction, speed detection with high accuracy is possible.

以下、図に沿って本発明の実施形態を説明する。
まず、本発明の前提として、本出願人による先願発明(特願2007−259720)について説明する。この先願発明の特徴は、速度演算周期内にパルスが発生しないような極低速域においては次に発生するエッジを予測し、この予測エッジに応じた時間補正値を用いて速度演算用の時間計測値を補正することにある。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
First, as a premise of the present invention, the prior application invention (Japanese Patent Application No. 2007-259720) by the present applicant will be described. The feature of this invention of the prior application is that the next occurring edge is predicted in an extremely low speed region where no pulse is generated within the speed calculation cycle, and the time measurement for speed calculation is performed using the time correction value corresponding to the predicted edge. The value is to be corrected.

前後するが、図3は先願発明を示す構成図であり、図10と同一の部分には同一の参照符号を付してある。
図3において、21はエッジ検出手段としてのラッチ信号作成部であり、エンコーダ(図示せず)から出力される位相の異なったA相パルス、B相パルスの立ち上がりエッジと立ち下がりエッジとを検出し、ラッチ信号ED0,ED1,ED2,ED3を作成する。上記エンコーダは、例えば速度を検出するべき回転体である電動機回転軸に連結されて、その回転速度に比例した数のA相パルス、B相パルスを出力する。
ここで、エンコーダはA相,B相の2相に限定されず、3相以上であっても良いが、以下では、2相エンコーダから出力されるA相パルス、B相パルスの立ち上がりエッジ及び立ち下がりエッジの4種類のエッジを用いて速度を検出する場合について説明する。
3 is a block diagram showing the invention of the prior application, and the same parts as those in FIG. 10 are denoted by the same reference numerals.
In FIG. 3, reference numeral 21 denotes a latch signal generation unit as an edge detection means, which detects A-phase pulses and B-phase pulse rising edges and falling edges outputted from encoders (not shown). The latch signals ED0, ED1, ED2, and ED3 are generated. The encoder is connected to, for example, a motor rotation shaft that is a rotating body whose speed is to be detected, and outputs A-phase pulses and B-phase pulses in a number proportional to the rotation speed.
Here, the encoder is not limited to two phases of A phase and B phase, but may be three or more phases. However, in the following, the rising edge and the rising edge of the A phase pulse and B phase pulse output from the two phase encoder are used. A case where the velocity is detected using four types of falling edges will be described.

上記A相パルス、B相パルスは、回転方向検出部32にも入力されている。この回転方向検出部32は、後述するように、A相パルス、B相パルス及びラッチ信号ED0,ED1,ED2,ED3から、電動機の回転方向(CW:正転,CCW:逆転)を検出するものである。回転方向検出部32から出力される信号CW/CCWは、回転方向保持部33に入力され、速度演算周期信号(サンプリング信号)SMPLによりラッチされて回転方向検出信号CWDETとして出力される。
また、回転方向検出部32からは、回転方向が変化したことを示す回転方向変化検出信号CHNGも出力されており、この信号CHNGは、回転方向変化エッジ記憶部34に入力されている。回転方向変化エッジ記憶部34は、回転方向が変化した際のエッジ情報を保持し、回転方向変化エッジ信号CHNGEDとしてCPU30Aに出力する。
The A-phase pulse and B-phase pulse are also input to the rotation direction detector 32. As will be described later, the rotation direction detector 32 detects the rotation direction (CW: forward rotation, CCW: reverse rotation) of the motor from the A-phase pulse, the B-phase pulse, and the latch signals ED0, ED1, ED2, ED3. It is. The signal CW / CCW output from the rotation direction detection unit 32 is input to the rotation direction holding unit 33, is latched by a speed calculation period signal (sampling signal) SMPL, and is output as a rotation direction detection signal CWDET.
The rotation direction detection unit 32 also outputs a rotation direction change detection signal CHNG indicating that the rotation direction has changed. This signal CHNG is input to the rotation direction change edge storage unit 34. The rotation direction change edge storage unit 34 holds edge information when the rotation direction changes, and outputs it to the CPU 30A as a rotation direction change edge signal CHNGED.

前記ラッチ信号ED0,ED1,ED2,ED3は、時間記憶手段としてのデータラッチ25−1〜25−4に入力されていると共に、エッジ保持部26にも入力されている。
データラッチ25−1〜25−4には、図10と同様に時間計測カウンタ23から出力された時間計測値(時間カウント値)TDE0EN〜TDE3ENが入力されており、ラッチ信号ED0,ED1,ED2,ED3によってこれらの時間計測値TDE0EN〜TDE3ENを記憶し、次段のデータラッチ28−1〜28−4に送るように構成されている。上記時間計測カウンタ23は、速度演算周期に同期してゼロになるダウンカウンタである。
データラッチ28−1〜28−4では、速度演算周期信号SMPLによりラッチした時間計測値TDE0EN〜TDE3ENを、時間計測値T0EN〜T3ENとしてCPU30Aに送出する。
The latch signals ED0, ED1, ED2, and ED3 are input to the data latches 25-1 to 25-4 as time storage means and also input to the edge holding unit 26.
The data latches 25-1 to 25-4 receive time measurement values (time count values) T DE0EN to T DE3EN output from the time measurement counter 23 as in FIG. 10, and latch signals ED0, ED1, These time measurement values TDE0EN to TDE3EN are stored by ED2 and ED3 and sent to the data latches 28-1 to 28-4 in the next stage. The time measurement counter 23 is a down counter that becomes zero in synchronization with the speed calculation cycle.
The data latches 28-1 to 28-4 send the time measurement values T DE0EN to T DE3EN latched by the speed calculation cycle signal SMPL to the CPU 30A as the time measurement values T 0EN to T 3EN .

ラッチ信号ED0,ED1,ED2,ED3は、J−Kフリップフロップ等からなるエッジ保持部26に入力され、速度演算周期における各エッジの変化の有無が検出される。エッジ保持部26では、各ラッチ信号ED0,ED1,ED2,ED3について、エッジの変化が1回でもあれば「1」を設定して保持し、変化が1回もなければ「0」を設定して保持する。これらの保持データは、エッジ変化情報保持部29に送られ、速度演算周期信号SMPLによりラッチされてエッジ変化検出信号EDF0〜EDF3としてCPU30Aに送出される。   The latch signals ED0, ED1, ED2, and ED3 are input to the edge holding unit 26 including a J-K flip-flop, and the presence / absence of change of each edge in the speed calculation cycle is detected. The edge holding unit 26 sets and holds “1” for each latch signal ED0, ED1, ED2, and ED3 if the edge changes even once, and sets “0” if there is no change. Hold. These held data are sent to the edge change information holding unit 29, latched by the speed calculation cycle signal SMPL, and sent to the CPU 30A as edge change detection signals EDF0 to EDF3.

図4は、前記回転方向検出部32の動作を示すタイミングチャートである。
回転方向検出部32は、ラッチ信号ED0,ED1,ED2,ED3が発生した際の、A相パルス,B相パルスの状態から回転方向を検出する。
すなわち、図4において、例えば時点(3)でA相パルスの立ち上がりエッジを信号ED0により検出したときに(ED0が「1」)、B相パルスが検出されない場合(B相パルスが「0」)は、正回転と判断して信号CW(=「1」)を出力する。一方、時点(4)においてB相パルスの立ち下がりエッジを信号ED3により検出したときに(ED3が「1」)、A相パルスが検出された場合(A相パルスが「1」)には、逆回転と判断して信号CCW(=「0」)を出力する。
こうして得られた回転方向検出信号は、回転方向保持部33において速度演算周期信号SMPLによりラッチされ、回転方向検出信号CWDETとしてCPU30Aに送られる。
なお、図4において、TCHNGは回転方向が変化した時点を示している。
FIG. 4 is a timing chart showing the operation of the rotation direction detector 32.
The rotation direction detector 32 detects the rotation direction from the state of the A-phase pulse and the B-phase pulse when the latch signals ED0, ED1, ED2, and ED3 are generated.
That is, in FIG. 4, for example, when the rising edge of the A-phase pulse is detected by the signal ED0 at time (3) (ED0 is “1”), the B-phase pulse is not detected (B-phase pulse is “0”). Determines that the rotation is normal, and outputs a signal CW (= “1”). On the other hand, when the falling edge of the B phase pulse is detected by the signal ED3 at the time point (4) (ED3 is “1”), when the A phase pulse is detected (the A phase pulse is “1”), It is determined that the rotation is reverse, and a signal CCW (= “0”) is output.
The rotation direction detection signal thus obtained is latched by the speed calculation period signal SMPL in the rotation direction holding unit 33 and sent to the CPU 30A as the rotation direction detection signal CWDET.
In FIG. 4, T CHNG indicates a point in time when the rotation direction changes.

図3のCPU30Aでは、速度演算周期毎に、データラッチ28−1〜28−4からの時間計測値T0EN〜T3ENと、回転方向保持部33からの回転方向検出信号CWDETと、エッジ変化情報保持部29からのエッジ変化検出信号EDF0〜EDF3とを用いて、電動機の速度を検出する。
ここで、回転方向変化エッジ信号CHNGEDは、逆回転時も考慮して速度を検出する場合に用いられるが、その詳細については後述する。
In the CPU 30A of FIG. 3, for each speed calculation cycle, the time measurement values T 0EN to T 3EN from the data latches 28-1 to 28-4 , the rotation direction detection signal CWDET from the rotation direction holding unit 33, and edge change information Using the edge change detection signals EDF0 to EDF3 from the holding unit 29, the speed of the electric motor is detected.
Here, the rotation direction change edge signal CHNGED is used when the speed is detected in consideration of reverse rotation, and details thereof will be described later.

図5は、正回転時における速度検出動作を示すタイミングチャートである。ここでは、一例として、図5における時点(1)のサンプルタイミング(速度演算周期信号SMPLのタイミング)で速度を検出するものとして説明する。
図5の時点(1)において、図示するサンプルタイミングによれば、最新のエッジは信号ED0によるA相パルスの立ち上がりエッジである。これは、エッジ変化検出信号EDF0〜EDF3から、EDF0が「1」であり、その他のEDF1〜EDF3が「0」であることから判断する。なお、図5ではEDF0の値のみを図示し、EDF1〜EDF3を省略してある。
FIG. 5 is a timing chart showing the speed detection operation during forward rotation. Here, as an example, description will be made assuming that the speed is detected at the sample timing (timing of the speed calculation cycle signal SMPL) at the time point (1) in FIG.
At the time (1) in FIG. 5, according to the illustrated sample timing, the latest edge is the rising edge of the A-phase pulse by the signal ED0. This is determined from the edge change detection signals EDF0 to EDF3 because EDF0 is “1” and the other EDF1 to EDF3 are “0”. In FIG. 5, only the value of EDF0 is shown, and EDF1 to EDF3 are omitted.

このため、信号ED0によりラッチした時間計測値TDE0EN=T0EN1が最新の時間計測値(今回値)であり、前回の信号ED0が発生した時の時間計測値TDE0EN=T0EN0を前回値として使用する。このT0EN0の値は、時点(1)でデータラッチ28−1から読み込むことはできないが、前回のエッジ変化検出信号EDF0が「1」であった時点(1)’でCPU30A内のメモリに保存しておくことにより使用可能である。
また、速度演算周期に対応する時間計測カウンタ23の最大値をTmaxとし、前回値T0EN0から今回値T0EN1までの間にEDF0がゼロであったサンプリング回数をNとして、これらをCPU30Aのメモリに記憶しておき、数式2に基づいて速度nを演算する。
Therefore, the time measurement value T DE0EN = T 0EN1 latched by the signal ED0 is the latest time measurement value (current value), and the time measurement value T DE0EN = T 0EN0 when the previous signal ED0 is generated is the previous value. use. The value of T 0EN0 cannot be read from the data latch 28-1 at the time (1), but is stored in the memory in the CPU 30A at the time (1) ′ when the previous edge change detection signal EDF0 is “1”. It is possible to use it by keeping it.
Further, the maximum value of the time measurement counter 23 corresponding to the speed calculation cycle is set to T max, and the number of samplings in which EDF 0 was zero between the previous value T 0EN0 and the current value T 0EN 1 is set to N 0 , and these are set in the CPU 30A. The speed n is calculated on the basis of Formula 2 after being stored in the memory.

Figure 2010117150
Figure 2010117150

なお、数式2において、CWsignは回転方向を示し、正回転(CW)を「1」、逆回転(CCW)を「−1」とする。また、Kはエンコーダの1回転あたりの出力パルス数に関係する定数である。 In Equation 2, CW sign indicates a rotation direction, and forward rotation (CW) is “1” and reverse rotation (CCW) is “−1”. K is a constant related to the number of output pulses per rotation of the encoder.

図5に示すように、回転方向が変化していない場合には、A相パルス、B相パルスは順序通り発生する。例えば、図5において、A相パルスの立ち上がり→B相パルスの立ち上がり→A相パルスの立ち下がり→B相パルスの立ち下がりという順序は不変である。このため、図5の時点(1)のサンプルタイミングで速度検出を行う場合、回転方向が変化していなければ、前回のA相パルスの立ち上がりから今回のA相パルスの立ち上がりまでに計4回のエッジが発生したことがわかる。   As shown in FIG. 5, when the rotation direction is not changed, the A-phase pulse and the B-phase pulse are generated in order. For example, in FIG. 5, the order of rising edge of A phase pulse → rising edge of B phase pulse → falling edge of A phase pulse → falling edge of B phase pulse is unchanged. For this reason, when speed detection is performed at the sample timing at the time point (1) in FIG. 5, if the rotation direction has not changed, a total of four times from the rising edge of the previous A phase pulse to the rising edge of the current A phase pulse. It can be seen that an edge has occurred.

よって、数式2の分子を、A相パルス1周期内に存在するA相,B相パルスのエッジ数とおいて速度nを検出することができる。なお、数式2における分子の4は、A相パルス,B相パルスを出力する2相エンコーダの場合に、A相パルス(またはB相パルス)の1周期内に存在する全相(つまりA相,B相)パルスのエッジ数であり、エンコーダの相数によって異なるのは明らかである。また、数式2における定数Kは、前述した如く、使用するエンコーダの1回転あたりの出力パルス数によって変化する。
従って、エンコーダの相数や出力パルス数に応じて上記エッジ数(数式2における分子の数値)や定数KをCPU30Aが変更すれば、数式2により、エンコーダの相数や出力パルス数に関係なく速度を検出することができる。
Therefore, the velocity n can be detected by using the numerator of Equation 2 as the number of edges of the A-phase and B-phase pulses existing within one period of the A-phase pulse. In the case of a two-phase encoder that outputs an A-phase pulse and a B-phase pulse, the numerator 4 in Equation 2 represents all phases (that is, A-phase, It is obvious that the number of edges of the B phase pulse varies depending on the number of phases of the encoder. In addition, the constant K in Equation 2 varies depending on the number of output pulses per rotation of the encoder used as described above.
Therefore, if the CPU 30A changes the number of edges (numerical value in Equation 2) and the constant K according to the number of encoder phases and the number of output pulses, the equation 2 shows the speed regardless of the number of encoder phases and the number of output pulses. Can be detected.

さて、前述した図4の時点TCHNGにおいて回転方向が変化すると、各相パルスのエッジが出現する順序が崩れる。例えば、時点TCHNGより後で今回のラッチ信号ED3の後にサンプルタイミングが発生した際に、今回のラッチ信号ED3によりラッチした時間計測値T3EN1と前回のラッチ信号ED3によりラッチした時間計測値T3EN0とを使用しても、B相パルスの立ち下がりエッジに対応する前回及び今回のラッチ信号ED3の間に発生したエッジは、ラッチ信号ED0,ED1に対応するエッジ(A相パルスの立ち上がりエッジ,B相パルスの立ち上がりエッジ)と、今回のラッチ信号ED3に対応するB相パルスの立ち下がりエッジだけであるから、合計3個である。つまり、A相パルスの立ち下がりエッジに対応するラッチ信号ED2が、前回及び今回のラッチ信号ED3の間に存在しない。 Now, if the rotation direction changes at the time T CHNG in FIG. 4 described above, the order in which the edges of the respective phase pulses appear is broken. For example, when the sample timing after the later time of the latch signal from the time T CHNG ED3 occurs, this latch signal time measurements latched by the time the latched measured values T 3EN1 and the previous latch signals ED3 by ED3 T 3EN0 , The edge generated between the previous and current latch signals ED3 corresponding to the falling edge of the B-phase pulse is the edge corresponding to the latch signals ED0 and ED1 (the rising edge of the A-phase pulse, B Phase pulse rising edge) and the falling edge of the B-phase pulse corresponding to the current latch signal ED3. That is, the latch signal ED2 corresponding to the falling edge of the A-phase pulse does not exist between the previous and current latch signals ED3.

すなわち、図5に示した如く回転方向に変化がない場合には、前回及び今回のラッチ信号の間に4個のエッジが存在するため数式2の分子の値は4で良いが、回転方向が変化した場合には、数式2の分子の値を3にする必要があり、数式2をそのまま使用すると速度演算値に誤差が生じる。
そこで、回転方向の変化検出要因となったエッジ情報を記憶する回転方向変化エッジ記憶部34を設け、この記憶部34による回転方向変化エッジ情報(回転方向変化エッジ信号CHNGED)を加味してCPU30Aが速度を演算する。
That is, when there is no change in the rotation direction as shown in FIG. 5, since there are four edges between the previous and current latch signals, the numerator value of Equation 2 may be 4, but the rotation direction is When changed, the value of the numerator of Formula 2 needs to be 3, and if Formula 2 is used as it is, an error occurs in the speed calculation value.
In view of this, a rotation direction change edge storage unit 34 for storing edge information that causes a change in rotation direction is provided, and the CPU 30A takes into account the rotation direction change edge information (rotation direction change edge signal CHNGED) by the storage unit 34. Calculate the speed.

図6は、回転方向変化エッジ記憶部34の動作を示すタイミングチャートである。時点TCHNGにおいて、回転方向が正転(CW)から逆転(CCW)に変化したとする。なお、サンプルタイミングは、図6に▽で示したタイミングであるとする。
回転方向が変化したことをCPU30Aが知り得るのは、時点TCHNGの直後のサンプルタイミングの時点(2)である。このとき、エンコーダパルスのエッジの最新情報はラッチ信号ED3から取得される。また、回転方向に変化がなく正転のままであれば、ラッチ信号ED1の次に信号ED2が検出されるが、図6の例では信号ED1の次に信号ED3が検出されるので、回転方向が変化したこともラッチ信号ED3から検出される。
そこで、回転方向の変化検出要因となったエッジ(ラッチ信号)を回転方向変化エッジ信号CHNGEDとして回転方向変化エッジ記憶部34が保存し、CPU30Aによる速度検出に使用する。なお、上述したようにエッジの最新情報を与えるラッチ信号と回転方向の変化を検出した(変化検出要因となった)ラッチ信号とが常に同一とは限らないため、回転方向変化エッジ信号CHNGEDを用いる必要がある。
FIG. 6 is a timing chart showing the operation of the rotation direction change edge storage unit 34. It is assumed that the rotation direction changes from forward rotation (CW) to reverse rotation (CCW) at time T CHNG . The sample timing is assumed to be the timing indicated by ▽ in FIG.
The direction of rotation can know that CPU30A that has changed is the time the sample timing immediately after time point T CHNG (2). At this time, the latest information on the edge of the encoder pulse is acquired from the latch signal ED3. If there is no change in the rotation direction and the rotation is normal, the signal ED2 is detected next to the latch signal ED1, but the signal ED3 is detected next to the signal ED1 in the example of FIG. Is also detected from the latch signal ED3.
Therefore, the rotation direction change edge storage unit 34 stores the edge (latch signal) that has become the rotation direction change detection factor as the rotation direction change edge signal CHNGED and uses it for speed detection by the CPU 30A. Note that the rotation direction change edge signal CHNGED is used because the latch signal that gives the latest edge information and the latch signal that detects the change in the rotation direction (which is the change detection factor) are not always the same as described above. There is a need.

図7は、回転方向が変化した場合も含む速度検出のフローチャートである。
回転方向の変化の有無(ステップS1)は、信号CWDETの前回値と今回値とが一致しているか否かによって判断する。信号CWDETの今回値と前回値とが一致していれば(S1 NO)、ステップS5,S6を経て数式2により速度nを演算する(S7)。
信号CWDETの今回値と前回値とが一致していない場合は(S1 YES)、速度演算周期の間で回転方向が変化しているとみなす。そして、回転方向変化エッジ信号CHNGEDを読み込み、回転方向が変化した際のエッジ(ラッチ信号)の情報を検索する(S2)。ここで、図6の例では、回転方向変化エッジ信号CHNGEDとして「3」が保持されている。この信号CHNGEDの「3」はラッチ信号ED3を意味しており、B相パルスの立ち下がりエッジによって回転方向に変化が起きたことがわかる。
FIG. 7 is a flowchart of speed detection including the case where the rotation direction changes.
The presence / absence of a change in the rotation direction (step S1) is determined based on whether or not the previous value and the current value of the signal CWDET match. If the current value of the signal CWDET coincides with the previous value (NO in S1), the speed n is calculated by Equation 2 through steps S5 and S6 (S7).
When the current value and the previous value of the signal CWDET do not match (S1 YES), it is considered that the rotation direction has changed during the speed calculation cycle. Then, the rotation direction change edge signal CHNGED is read, and information on the edge (latch signal) when the rotation direction is changed is searched (S2). Here, in the example of FIG. 6, “3” is held as the rotation direction change edge signal CHNGED. “3” of the signal CHNGED means the latch signal ED3, and it can be seen that a change occurs in the rotation direction due to the falling edge of the B-phase pulse.

次に、上記信号CHNGED(B相パルスの立ち下がりに対応する)に応じた時間計測値T3ENを用いて、速度nを演算する。すなわち、回転方向が変化している場合は、回転方向変化を検出した際のエッジ情報に応じた時間計測値と、前回の時間計測値とからエッジ間隔を求め、その間に発生するエッジの数は4ではなく3であるとして、数式3により速度nを演算する(S3,S4)。 Next, the speed n is calculated using the time measurement value T 3EN corresponding to the signal CHNGED (corresponding to the falling edge of the B phase pulse). That is, when the rotation direction is changing, the edge interval is obtained from the time measurement value according to the edge information when the rotation direction change is detected and the previous time measurement value, and the number of edges generated during that time is Assuming 3 instead of 4, the speed n is calculated by Equation 3 (S3, S4).

Figure 2010117150
Figure 2010117150

なお、数式3以外にも、回転方向の変化を検出したエッジがわかっていれば、回転方向が変化する直前のエッジに対応する時間計測値(図6の例ではED1に対応するT1ENの値)を用いて、エッジ数を2として計算しても良い。いずれにしても、速度演算式は数式3に限定されるものではない。 In addition to Equation 3, if the edge where the rotation direction change is detected is known, the time measurement value corresponding to the edge immediately before the rotation direction changes (the value of T 1EN corresponding to ED1 in the example of FIG. 6). ) To calculate the number of edges as 2. In any case, the speed calculation formula is not limited to Formula 3.

次いで、極低速時の速度検出動作を、CPU30Aの構成と共に図3,図8を参照しつつ説明する。
図3に示したCPU30Aは、速度演算周期毎にデータラッチ28−1〜28−4内の時間計測値T0EN,T1EN,T2EN,T3ENを内部の記憶部35−1〜35−4に読み込み、時間計測値T0MEM1,T1MEM1,T2MEM1,T3MEM1を更新する。
すなわち、CPU内部の時間計測値は、内部の記憶部36に記憶されたエッジ変化情報EDF0MEM,EDF1MEM,EDF2MEM,EDF3MEMに基づいて速度演算周期内にエッジの変化が検出されたとき、前回の時間計測値T0MEM0,T1MEM0,T2MEM0,T3MEM0を今回値T0MEM1,T1MEM1,T2MEM1,T3MEM1に更新する。なお、別の記憶部37内の回転方向情報は、速度演算周期毎に今回値CWMEM1、前回値CWMEM0としてそれぞれ更新される。
Next, the speed detection operation at an extremely low speed will be described with reference to FIGS. 3 and 8 together with the configuration of the CPU 30A.
The CPU 30A shown in FIG. 3 stores the time measurement values T 0EN , T 1EN , T 2EN , T 3EN in the data latches 28-1 to 28-4 for each speed calculation cycle in the internal storage units 35-1 to 35-4. And time measurement values T0MEM1 , T1MEM1 , T2MEM1 , and T3MEM1 are updated.
In other words, the time measurement value inside the CPU is determined based on the edge change information EDF0MEM, EDF1MEM, EDF2MEM, EDF3MEM stored in the internal storage unit 36, when the edge change is detected within the speed calculation cycle. The values T0MEM0 , T1MEM0 , T2MEM0 , T3MEM0 are updated to the current values T0MEM1 , T1MEM1 , T2MEM1 , T3MEM1 . The rotation direction information in the other storage unit 37 is updated as the current value CWMEM1 and the previous value CWMEM0 for each speed calculation cycle.

最新エッジ検出部38は、記憶部36のエッジ変化情報から、一つだけエッジが検出された場合はそれを最新エッジとみなし、そのエッジに対応する記憶部35−1〜35−4内の時間計測値を最新エッジの時間計測値とみなす。仮に、速度演算周期内に複数のエッジが検出された場合は、時間計測値が小さいエッジの方がサンプルタイミングに近いものとして、そのエッジを最新エッジとみなす。
これは、サンプルタイミングに同期する時間計測カウンタ23がダウンカウンタであり、カウンタの値が小さい方がサンプルタイミングに近いとみなせるからである。なお、時間計測カウンタ23はダウンカウンタに限定されるわけではなく、アップカウンタであっても良い。アップカウンタの場合は、サンプルタイミングに近い方が時間計測値は大きくなるので、カウンタの種類に合わせて最新エッジを検出する。
最新エッジ検出部38により得た最新エッジ判別信号(EDF0〜EDF3に対応させて、「0」〜「3」の値をとる)と、最新エッジに対応する時間計測値とは、記憶部37からの回転方向判別信号及び記憶部36からのエッジ有無判別信号と共にエッジ予測・速度演算部39に送られる。
When only one edge is detected from the edge change information in the storage unit 36, the latest edge detection unit 38 regards it as the latest edge, and the time in the storage units 35-1 to 35-4 corresponding to the edge. The measurement value is regarded as the time measurement value of the latest edge. If a plurality of edges are detected within the speed calculation cycle, the edge with the smaller time measurement value is considered to be closer to the sample timing, and the edge is regarded as the latest edge.
This is because the time measurement counter 23 synchronized with the sample timing is a down counter, and the smaller counter value can be regarded as closer to the sample timing. The time measurement counter 23 is not limited to a down counter, and may be an up counter. In the case of an up counter, since the time measurement value becomes larger near the sample timing, the latest edge is detected according to the type of the counter.
The latest edge discrimination signal obtained by the latest edge detection unit 38 (takes values of “0” to “3” corresponding to EDF0 to EDF3) and the time measurement value corresponding to the latest edge are stored in the storage unit 37. The rotation direction determination signal and the edge presence / absence determination signal from the storage unit 36 are sent to the edge prediction / speed calculation unit 39.

図8は、最新エッジ検出部38、エッジ予測・速度演算部39等の動作を示すタイミングチャートである。
最新エッジ判別信号及び最新エッジ時間計測値は、前述のように最新エッジ検出部38にて作成され、図8の時点(1)のように、エンコーダパルスのエッジが発生した直後のサンプルタイミングで更新される。いま、時点(1)’に着目すると、時点(1)から(1)’までの速度演算周期内にエンコーダパルスのエッジは検出されず、CPU30Aの内部のエッジ変化情報EDF0MEM,EDF1MEM,EDF2MEM,EDF3MEMは、全てゼロである。ここで、時点(1)以後は、最新エッジ検出部38から出力される最新エッジ判別信号が、A相パルスの立ち上がりエッジを示す「0」となっている。
FIG. 8 is a timing chart showing operations of the latest edge detection unit 38, the edge prediction / speed calculation unit 39, and the like.
The latest edge discrimination signal and the latest edge time measurement value are created by the latest edge detection unit 38 as described above, and updated at the sample timing immediately after the edge of the encoder pulse is generated as shown in FIG. 8 (1). Is done. Now, focusing on the time point (1) ′, the edge of the encoder pulse is not detected within the speed calculation cycle from the time point (1) to (1) ′, and the edge change information EDF0MEM, EDF1MEM, EDF2MEM, EDF3MEM inside the CPU 30A. Are all zero. Here, after the time point (1), the latest edge determination signal output from the latest edge detector 38 is “0” indicating the rising edge of the A-phase pulse.

このとき、時点(1)ではA相パルスの立ち上がりエッジを検出しているので、時点(1)’では、回転方向が正であれば、次に発生するのはB相パルスの立ち上がりエッジであると予測できる。従って、時点(1)以後にエッジ予測・速度演算部39から出力される次のエッジ予測値(最新エッジ判別信号と同様に、EDF0〜EDF3に対応させて「0」〜「3」の値をとる)は、B相パルスの立ち上がりエッジを示す「1」となる。
なお、回転方向が逆のときは、次に発生するのはB相パルスの立ち下がりエッジであるから、次のエッジ予測値が「3」となる。
以下、回転方向が正回転であるものとして説明を続ける。
At this time, since the rising edge of the A-phase pulse is detected at the time point (1), if the rotation direction is positive at the time point (1) ′, it is the rising edge of the B-phase pulse that occurs next. Can be predicted. Therefore, the next edge prediction value output from the edge prediction / speed calculation unit 39 after time (1) (similar to the latest edge determination signal, values “0” to “3” corresponding to EDF0 to EDF3 are set. Is taken as “1” indicating the rising edge of the B-phase pulse.
When the rotation direction is reversed, the next edge prediction value is “3” because the next occurrence is the falling edge of the B-phase pulse.
Hereinafter, the description will be continued assuming that the rotation direction is forward rotation.

時点(1)’におけるエッジ予測値から、先願発明では、エッジ時間補正値T1cmpを数式4により演算する。 In the invention of the prior application, the edge time correction value T 1 cmp is calculated by Equation 4 from the predicted edge value at time (1) ′.

Figure 2010117150
Figure 2010117150

ただし、Nは、前回、B相立ち上がりエッジを検出してから時点(1)’までのサンプリング回数を表し、Tmaxは、サンプリング周期に同期した時間計測カウンタ23の最大値である。 However, N 1 represents the number of times of sampling from the previous detection of the B-phase rising edge to the time point (1) ′, and T max is the maximum value of the time measurement counter 23 synchronized with the sampling period.

数式4における定数(1/2)は、次のエッジが、サンプリング周期の中央で発生すると予測したためである。図8のa点に着目すると、予測誤差は次に発生するエンコーダパルスがサンプリング周期内のどの点であっても、サンプリング周期の1/2以内となり、検出誤差を最小にすることができる。なお、上記の定数は1/2に限定されるものではなく、状況に応じて変更してもよい。
エッジ予測・速度演算部39は、前回のB相パルスの立ち上がりエッジに対応する時間計測値、数式4のエッジ時間補正値、及び回転方向から、数式5により速度nを計算する。ただし、数式5において、T1MEM1は、前回のB相パルスの立ち上がりエッジを検出した際の時間計測値であり、今回のサンプルタイミングではエッジを検出していないので、更新されない。
The constant (1/2) in Equation 4 is because the next edge is predicted to occur at the center of the sampling period. Focusing on the point a in FIG. 8, the prediction error is within ½ of the sampling period at any point in the sampling period where the next encoder pulse is generated, and the detection error can be minimized. In addition, said constant is not limited to 1/2, You may change according to a condition.
The edge prediction / speed calculation unit 39 calculates the speed n according to Expression 5 from the time measurement value corresponding to the rising edge of the previous B-phase pulse, the edge time correction value of Expression 4, and the rotation direction. However, in Formula 5, T1MEM1 is a time measurement value when the rising edge of the previous B-phase pulse is detected, and is not updated because the edge is not detected at the current sample timing.

Figure 2010117150
Figure 2010117150

図9は、上記の先願発明と従来技術により速度検出を行った場合のシミュレーション結果を示しており、横軸は時間を、縦軸は速度を示している。このシミュレーションでは、真の速度を10r/min(1分間あたり10回転)とし、演算方式のみ従来技術と先願発明との二通りにして演算結果を比較した。なお、エッジの検出方法やカウンタのクロック周波数などは同一とした。
図9より、従来技術では、エッジを検出した次の速度演算周期内にエッジが存在しない場合に誤差が大きくなり、階段状に真値に収束する。一方、先願発明では、従来技術に比べて誤差が小さく、良好に検出できている。従来技術のように検出値に誤差が大きいと、検出値をもとにして速度制御を行っている場合には、トルクリプルが増大する恐れがあり好ましくない。これに対し、先願発明によれば検出値の誤差を従来技術に対して大幅に低減できるため、トルクリプルなどの影響を低減することができる。
FIG. 9 shows a simulation result when speed detection is performed by the above-described prior invention and the prior art, where the horizontal axis indicates time and the vertical axis indicates speed. In this simulation, the true speed was set to 10 r / min (10 revolutions per minute), and the calculation results were compared only in the calculation method using the conventional technique and the prior invention. The edge detection method and counter clock frequency are the same.
As shown in FIG. 9, in the conventional technique, when there is no edge within the next speed calculation period after detecting the edge, the error increases and converges to a true value in a staircase pattern. On the other hand, in the invention of the prior application, the error is small compared to the prior art, and it can be detected well. If the detected value has a large error as in the prior art, torque ripple may increase when speed control is performed based on the detected value, which is not preferable. In contrast, according to the invention of the prior application, the error of the detected value can be greatly reduced as compared with the prior art, so that the influence of torque ripple and the like can be reduced.

さて、上述した先願発明に対して、本発明の実施形態では、サンプリング周期に同期した時間計測カウンタ23の最大値Tmaxのk(kは補正係数)倍の値をエッジ時間補正値T1cmpとして演算し、直前にエッジが発生したときの時間計測値T1MEM1に対してサンプリング周期ごとに前記エッジ時間補正値T1cmpを加算または減算することにより得た値を用いて速度nを検出し、平均値と真値との間の定常誤差を低減するようにした。
本発明の実施形態の回路構成は先願発明に係る図3と同様であり、エッジ予測・速度演算部39におけるエッジ時間補正値T1cmp及び速度nの演算内容が異なるだけである。
すなわち、この実施形態では、数式6によりエッジ時間補正値T1cmpを演算する。
Now, in contrast to the above-described prior invention, in the embodiment of the present invention, a value that is k times (k is a correction coefficient) times the maximum value T max of the time measurement counter 23 synchronized with the sampling period is set as the edge time correction value T 1 cmp. And the velocity n is detected using a value obtained by adding or subtracting the edge time correction value T 1 cmp for each sampling period to the time measurement value T 1MEM1 when the edge occurs immediately before, The steady-state error between the average value and the true value was reduced.
The circuit configuration of the embodiment of the present invention is the same as that of FIG. 3 according to the invention of the prior application, and only the calculation contents of the edge time correction value T 1 cmp and the speed n in the edge prediction / speed calculation unit 39 are different.
That is, in this embodiment, the edge time correction value T 1 cmp is calculated according to Equation 6.

Figure 2010117150
Figure 2010117150

エッジ予測・速度演算部39は、前記同様に前回のB相パルスの立ち上がりエッジに対応する時間計測値、数式6のエッジ時間補正値T1cmp、及び回転方向から、数式7により速度nを計算する。 Similarly to the above, the edge prediction / speed calculation unit 39 calculates the speed n using Equation 7 from the time measurement value corresponding to the rising edge of the previous B-phase pulse, the edge time correction value T 1 cmp of Equation 6, and the rotation direction. .

Figure 2010117150
Figure 2010117150

数式7におけるエッジ時間補正値T1cmpの±の記号は、サンプリング周期ごとにエッジを検出したサンプルタイミングまで交互にプラス、マイナスを繰り返す。また、数式6における補正係数kを大きくすると、速度検出誤差が大きくなるが、速度指令値が変化したときの真値への収束時間が短くなり、応答性が改善する。一方、補正係数kを小さくすると、逆に速度検出誤差は小さくなるが、応答性が低下する。更に、k=0とすると、エッジ時間補正値T1cmpは常にゼロとなるので、前回の時間計測値が保持され、定常状態では真値と一致した速度検出値を得ることができる。
このように、本実施形態によれば、エッジ時間補正値T1cmpを仕様に応じて自由に設定可能である。
なお、図1は、最新エッジ検出部、エッジ予測・速度演算部等の動作を示すタイミングチャートであり、先願発明における図8に相当している。
The symbol “±” of the edge time correction value T 1 cmp in Expression 7 alternately repeats plus and minus until the sample timing at which the edge is detected for each sampling period. Further, when the correction coefficient k in Equation 6 is increased, the speed detection error increases, but the convergence time to the true value when the speed command value changes is shortened, and the responsiveness is improved. On the other hand, when the correction coefficient k is decreased, the speed detection error is decreased, but the response is decreased. Furthermore, if k = 0, the edge time correction value T 1 cmp is always zero, so that the previous time measurement value is retained, and a speed detection value that matches the true value can be obtained in a steady state.
Thus, according to the present embodiment, the edge time correction value T 1 cmp can be freely set according to the specification.
FIG. 1 is a timing chart showing operations of the latest edge detection unit, edge prediction / speed calculation unit, and the like, and corresponds to FIG. 8 in the prior application invention.

次に、図2は、先願発明及び本実施形態による速度検出のシミュレーション結果を示しており、回転速度を5r/min(1分間あたり5回転)に固定し、先願発明による速度検出値と本実施形態による速度検出値とを対比してある。
この図から明らかなように、先願発明では、真値よりも高い値から階段状に真値に収束している。これは、エッジが発生した際に真値と一致するようにエッジ時間補正値が徐々に増加していくためである。この場合、平均的に見ると真値の5r/minよりも高い値となり、厳密な速度制御を行う場合に問題がある。
一方、本実施形態によれば、前回の時間計測値に、サンプリング周期に比例したエッジ時間補正値を加算または減算した値を用いているため、速度の平均値は真値にほぼ一致し、リプルが少なく良好な結果が得られている。
Next, FIG. 2 shows a simulation result of speed detection according to the invention of the prior application and the present embodiment. The rotation speed is fixed at 5 r / min (5 rotations per minute), The speed detection value according to the present embodiment is compared.
As is apparent from this figure, in the prior invention, the value converges from a value higher than the true value to the true value stepwise. This is because the edge time correction value gradually increases so as to coincide with the true value when an edge occurs. In this case, when viewed on average, the value is higher than the true value of 5 r / min, and there is a problem in performing strict speed control.
On the other hand, according to this embodiment, since the value obtained by adding or subtracting the edge time correction value proportional to the sampling period is used for the previous time measurement value, the average value of the speed substantially matches the true value, and the ripple Good results have been obtained with less.

本発明の実施形態における最新エッジ検出部、エッジ予測・速度演算部等の動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the newest edge detection part in the embodiment of this invention, an edge prediction and speed calculating part, etc. 先願発明及び本発明の実施形態による速度検出のシミュレーション結果を示す図である。It is a figure which shows the simulation result of the speed detection by embodiment of prior invention and this invention. 先願発明を示す構成図である。It is a block diagram which shows prior invention. 先願発明における回転方向検出部の動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the rotation direction detection part in prior invention. 先願発明における速度検出動作を示すタイミングチャートである。It is a timing chart which shows speed detection operation in a prior invention. 先願発明における回転方向変化エッジ記憶部の動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the rotation direction change edge memory | storage part in a prior invention. 先願発明における速度検出動作を示すフローチャートである。It is a flowchart which shows the speed detection operation | movement in prior invention. 先願発明における最新エッジ検出部、エッジ予測・速度演算部等の動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the newest edge detection part in the prior application invention, an edge prediction and speed calculating part, etc. 従来技術及び先願発明による速度検出のシミュレーション結果を示す図である。It is a figure which shows the simulation result of the speed detection by a prior art and prior application invention. 従来技術を示す構成図である。It is a block diagram which shows a prior art. 従来技術による速度検出動作を示すフローチャートである。It is a flowchart which shows the speed detection operation | movement by a prior art.

符号の説明Explanation of symbols

21:ラッチ信号作成部
23:時間計測カウンタ
25−1〜25−4:データラッチ
26:エッジ保持部
28−1〜28−4:データラッチ
29:エッジ変化情報保持部
30A,30B:CPU
31:コントローラ
32:回転方向検出部
33:回転方向保持部
34:回転方向変化エッジ記憶部
35−1〜35−4,36,37:記憶部
38:最新エッジ検出部
39:エッジ予測・速度演算部
40:予測補正値演算部
21: Latch signal creation unit 23: Time measurement counter 25-1 to 25-4: Data latch 26: Edge holding unit 28-1 to 28-4: Data latch 29: Edge change information holding unit 30A, 30B: CPU
31: Controller 32: Rotation direction detection unit 33: Rotation direction holding unit 34: Rotation direction change edge storage unit 35-1 to 35-4, 36, 37: Storage unit 38: Latest edge detection unit 39: Edge prediction / speed calculation Unit 40: Prediction correction value calculation unit

Claims (1)

速度検出対象としての回転体に取り付けられたエンコーダの出力パルスから、回転体の回転速度を検出する速度検出装置において、
前記出力パルスのエッジを検出するエッジ検出手段と、
検出されたエッジに基づいて回転体の回転方向を検出する回転方向検出手段と、
速度演算周期に同期した時間を計測する時間計測手段と、
前記エッジ検出手段の出力により前記時間計測手段の時間計測値を保持する時間記憶手段と、
速度演算周期内のエッジの変化状態を検出しエッジ変化情報として保持するエッジ変化情報保持手段と、
前記回転方向及びエッジ変化情報から、速度演算周期内にエッジの変化がない場合に次に発生するエッジを予測するエッジ予測手段と、
速度演算周期内にエッジの変化がない場合に、速度演算周期に比例する時間補正値を最新のエッジ変化があったときの前記時間計測値に対し加算または減算した値と、前記回転方向とを用いて、現在の速度演算周期における回転体の回転速度を演算する演算手段と、
を備えたことを特徴とする速度検出装置。
In the speed detection device that detects the rotational speed of the rotating body from the output pulse of the encoder attached to the rotating body as a speed detection target,
Edge detection means for detecting an edge of the output pulse;
Rotation direction detection means for detecting the rotation direction of the rotating body based on the detected edge;
A time measuring means for measuring time synchronized with the speed calculation cycle;
Time storage means for holding the time measurement value of the time measurement means by the output of the edge detection means;
Edge change information holding means for detecting the edge change state within the speed calculation cycle and holding it as edge change information;
Edge prediction means for predicting the next edge to be generated when there is no change in edge within the speed calculation cycle from the rotation direction and edge change information;
When there is no change in the edge within the speed calculation cycle, a value obtained by adding or subtracting a time correction value proportional to the speed calculation cycle to the time measurement value when the latest edge change has occurred, and the rotation direction Calculation means for calculating the rotational speed of the rotating body in the current speed calculation cycle,
A speed detection device comprising:
JP2008288565A 2008-11-11 2008-11-11 Velocity detector Pending JP2010117150A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008288565A JP2010117150A (en) 2008-11-11 2008-11-11 Velocity detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008288565A JP2010117150A (en) 2008-11-11 2008-11-11 Velocity detector

Publications (1)

Publication Number Publication Date
JP2010117150A true JP2010117150A (en) 2010-05-27

Family

ID=42304927

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008288565A Pending JP2010117150A (en) 2008-11-11 2008-11-11 Velocity detector

Country Status (1)

Country Link
JP (1) JP2010117150A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0377067A (en) * 1989-08-21 1991-04-02 Honda Motor Co Ltd Rotating speed measuring instrument
JPH06118090A (en) * 1992-10-06 1994-04-28 Meidensha Corp Speed detector
JP2009085924A (en) * 2007-10-03 2009-04-23 Fuji Electric Systems Co Ltd Speed detection device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0377067A (en) * 1989-08-21 1991-04-02 Honda Motor Co Ltd Rotating speed measuring instrument
JPH06118090A (en) * 1992-10-06 1994-04-28 Meidensha Corp Speed detector
JP2009085924A (en) * 2007-10-03 2009-04-23 Fuji Electric Systems Co Ltd Speed detection device

Similar Documents

Publication Publication Date Title
JP6107557B2 (en) Angle detection device and angle detection method
JP2012042411A (en) Sensor error correction device, sensor error correction method, and program for sensor error correction
JP2011022126A (en) Phase difference type resolver
Ilmiawan et al. An easy speed measurement for incremental rotary encoder using multi stage moving average method
JP4253372B2 (en) Elevator speed control apparatus and recording medium recording elevator speed detection program
JP4998789B2 (en) Speed detection device
CN109768755B (en) Semiconductor device, angle value correction circuit and method thereof
JP2009025176A (en) Rotational position signal processing apparatus
JP5149820B2 (en) Controller and processing equipment
JPH06118090A (en) Speed detector
JP2010117150A (en) Velocity detector
JP2009095154A (en) Motor controller and its speed detection method
JP4952631B2 (en) Speed detection device
JP4998788B2 (en) Speed detection device
JP2010008235A (en) Speed detection device
US10498278B2 (en) Motor controller
JP5664895B2 (en) Electric motor control device
JP5865059B2 (en) Waveform measuring instrument
JP2013019726A (en) Absolute position detector with abnormality detection function
JP2014098642A (en) Angle correction device and rotation angle sensor
JPH061279B2 (en) Digital speed detector
JP2008089409A (en) Rotational speed detector
JP6101117B2 (en) Pulse motor control device
JP5018793B2 (en) Rotational speed measuring device
JP2011107022A (en) Resolver device

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20110422

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111013

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130328

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20130724