JP6825260B2 - Speed detector and speed control system - Google Patents

Speed detector and speed control system Download PDF

Info

Publication number
JP6825260B2
JP6825260B2 JP2016155197A JP2016155197A JP6825260B2 JP 6825260 B2 JP6825260 B2 JP 6825260B2 JP 2016155197 A JP2016155197 A JP 2016155197A JP 2016155197 A JP2016155197 A JP 2016155197A JP 6825260 B2 JP6825260 B2 JP 6825260B2
Authority
JP
Japan
Prior art keywords
pulse
buffer
speed detection
speed
phase
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.)
Active
Application number
JP2016155197A
Other languages
Japanese (ja)
Other versions
JP2018025391A (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 JP2016155197A priority Critical patent/JP6825260B2/en
Publication of JP2018025391A publication Critical patent/JP2018025391A/en
Application granted granted Critical
Publication of JP6825260B2 publication Critical patent/JP6825260B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Control Of Electric Motors In General (AREA)

Description

本発明は、可変速装置など、回転機(モータ、発電機等)などの回転速度を検出する方式およびその速度制御方式に関する。本発明が対象とする回転位置センサは90度位相差をもつ2相パルスエンコーダであり、発生パルス数と時間差より速度を検出する。この速度検出期間の長さを変えると長所や短所が変化する。本発明は、これらの長所のみを生かすような検出方式や速度制御方式に関する。 The present invention relates to a method for detecting the rotational speed of a rotating machine (motor, generator, etc.) such as a variable speed device, and a speed control method thereof. The rotation position sensor targeted by the present invention is a two-phase pulse encoder having a phase difference of 90 degrees, and detects the speed from the number of generated pulses and the time difference. Changing the length of this speed detection period changes the strengths and weaknesses. The present invention relates to a detection method and a speed control method that take advantage of only these advantages.

先行技術文献としては、特許文献1があり、この原理は非特許文献1に記載されている。特許文献1では、90°位相差をもつ2相の方形波信号を出力するエンコーダにおいて、一定周期(速度演算周期信号SMPL)で速度を検出する方式を提案している。 The prior art document is Patent Document 1, and this principle is described in Non-Patent Document 1. Patent Document 1 proposes a method of detecting a speed at a fixed period (speed calculation period signal SMPL) in an encoder that outputs a two-phase square wave signal having a phase difference of 90 °.

特許文献1の特徴は、2相信号の90°位相差の誤差が大きいので、4種類のパルスエッジに応じた4個の検出回路を搭載し、この4種類の検出値から同じエッジ種類のデータを選択して位相差や時間差を計算することにより速度検出の精度を改善したものである。 The feature of Patent Document 1 is that the error of 90 ° phase difference of the two-phase signal is large, so four detection circuits corresponding to four types of pulse edges are mounted, and the same edge type data is obtained from these four types of detection values. The accuracy of speed detection is improved by selecting and calculating the phase difference and time difference.

本発明では、基本的には従来例と同様に発生するパルスの位相差を時間差で除算して速度検出をするものであるが、特許文献1のような4多重方式という特長までは必要としていない。それよりも、一般的な速度検出周期を可変設定できるようにしたり、異なる速度検出期間を有する複数の速度検出を組み合わせたりする方式を提案するものである。 In the present invention, basically, the phase difference of the generated pulses is divided by the time difference to detect the speed as in the conventional example, but the feature of the four-multiplex method as in Patent Document 1 is not required. .. Rather, it proposes a method in which a general speed detection cycle can be set variably, or a method of combining a plurality of speed detections having different speed detection periods is proposed.

そこで説明を簡素化するために、1相パルス信号の例を採用して説明している。もしこの原理を特許文献1のような4多重方式にも拡張することは容易に実現できるので、ここでは異なる方式を組み合わせることについての説明は省略する。 Therefore, in order to simplify the explanation, an example of a one-phase pulse signal is adopted for the explanation. If this principle can be easily extended to the quadruple system as in Patent Document 1, the description of combining different methods will be omitted here.

特許第3173174号公報Japanese Patent No. 3173174

電気学会、電気論D,155巻11号 pp1316−1324(平成7年)の2章Institute of Electrical Engineers of Japan, Electrical Theory D, Vol. 155, No. 11, pp1316-1324 (1995), Chapter 2

従来の速度検出方式では、エンコーダが出力するパルス信号を、高速クロックで動作するディジタル回路によりパルス発生時刻やパルスカウンタ値(位相情報)を逐次計測しておき、一定周期のサンプル信号にてディジタル回路内のラッチ(レジスタ)に記憶する。そして、このサンプル信号と同時に、CPUなどの演算処理装置に割込信号が与えられる。この割込信号により速度検出処理が起動されると、前記ラッチデータを読み出し、そして前回までに読み出した時刻や位相の検出情報との差分から速度検出演算を行っている。 In the conventional speed detection method, the pulse signal output by the encoder is sequentially measured for the pulse generation time and pulse counter value (phase information) by a digital circuit that operates with a high-speed clock, and the digital circuit is a sample signal with a fixed cycle. Stored in the internal latch (register). Then, at the same time as this sample signal, an interrupt signal is given to an arithmetic processing unit such as a CPU. When the speed detection process is activated by this interrupt signal, the latch data is read, and the speed detection calculation is performed from the difference from the time and phase detection information read up to the previous time.

本明細書にて対策する問題点は、このエンコーダが発生するパルス信号にジッタと呼ばれる発生時刻の揺らぎが生じると、速度検出にオフセット誤差が生じる現象であり、この誤差を抑制するために速度検出期間の長さを可変にして適切なものを選定することを提案する。 The problem to be dealt with in this specification is a phenomenon in which an offset error occurs in speed detection when a fluctuation of the generation time called jitter occurs in the pulse signal generated by this encoder, and speed detection is performed in order to suppress this error. We propose to make the length of the period variable and select an appropriate one.

例えば図10(a)のような一定速度における1相パルス信号の場合を考えると、パルスP1aとP1b、もう一つはパルスP1bとP1cのパルス間の検出情報より速度が検出できる。これに対して、ジッタによるパルス発生時刻の揺らぎにより誤差が発生する原理を示すために、図10(b)のようにパルスP1bの発生時刻がΔTだけずれてパルスP2bの時刻で発生したと仮定して説明する。 For example, considering the case of a one-phase pulse signal at a constant speed as shown in FIG. 10A, the speed can be detected from the detection information between the pulses P1a and P1b and the other pulse P1b and P1c. On the other hand, in order to show the principle that an error occurs due to the fluctuation of the pulse generation time due to jitter, it is assumed that the pulse P1b generation time is shifted by ΔT and occurs at the pulse P2b time as shown in FIG. 10 (b). I will explain.

理想的なジッタ誤差の無い図10(a)では2回の速度検出が可能であり、パルスP1aとP1b間からは(1a)式、パルスP1bとP1c間からは(1b)式となる。同様に図10(b)の場合では、(2a)式と(2b)式として演算することになる。 In FIG. 10A without an ideal jitter error, the velocity can be detected twice, and the equation (1a) is obtained between the pulses P1a and P1b and the equation (1b) is obtained between the pulses P1b and P1c. Similarly, in the case of FIG. 10B, the calculation is performed as the equations (2a) and (2b).

ω1ab=(θ1b−θ1a)/(t1b−t1a)…(1a)
ω1bc=(θ1c−θ1b)/(t1c−t1b)…(1b)
ω2ab=(θ2b−θ2a)/(t2b−t2a)…(2a)
ω2bc=(θ2c−θ2b)/(t2c−t2b)…(2b)
ここで、誤差の影響を具体的に示すために、仮の数値を代入してみる。速度計算上はエンコーダパルスの発生位相差は一定であると仮定するので、図10(a)でも図10(b)でもパルス間の位相差は(3)式のように等しくなる。ここでは値を“1”と仮定している。
ω1ab = (θ1b−θ1a) / (t1b−t1a)… (1a)
ω1bc = (θ1c−θ1b) / (t1c−t1b)… (1b)
ω2ab = (θ2b−θ2a) / (t2b−t2a)… (2a)
ω2bc = (θ2c−θ2b) / (t2c−t2b)… (2b)
Here, in order to show the effect of the error concretely, let's substitute a temporary numerical value. Since it is assumed that the generated phase difference of the encoder pulse is constant in the speed calculation, the phase difference between the pulses becomes equal in both FIGS. 10 (a) and 10 (b) as shown in the equation (3). Here, the value is assumed to be "1".

(θ1b−θ1a)=(θ1c−θ1b)=(θ2b−θ2a)=(θ2c−θ2b)=1…(3)
時間差については、図10(a)のジッタが無い理想的なパルスの方は、(4)式のように2個の時間差は等しくなる。
(Θ1b-θ1a) = (θ1c-θ1b) = (θ2b-θ2a) = (θ2c-θ2b) = 1 ... (3)
Regarding the time difference, in the case of the ideal pulse without jitter in FIG. 10A, the two time differences are equal as shown in Eq. (4).

(t1b−t1a)=(t1c−t1b)=1…(4)
これに対して図10(b)側では、ジッタによる時間の揺らぎ(発生時刻のずれ)をΔT=0.3と仮定すると、2個の時間差は(5a)式と(5b)式のような異なる値になる。
(T1b-t1a) = (t1c-t1b) = 1 ... (4)
On the other hand, on the side of FIG. 10B, assuming that the time fluctuation (deviation of the time of occurrence) due to jitter is ΔT = 0.3, the two time differences are as shown in equations (5a) and (5b). It will be a different value.

(t2b−t2a)=1+0.3=1.3…(5a)
(t2c−t2b)=1−0.3=0.7…(5b)
この仮定の下で、(1a)式と(1b)式および(2a)式と(2b)式の4個の速度を計算してみると次のような値になり、(1a’)式と(1b’)式が示す真の速度1.0に対して、(2a’)式と(2b’)式の方にはジッタによって生じた速度検出誤差が含まれていることが明らかになる。
(T2b-t2a) = 1 + 0.3 = 1.3 ... (5a)
(T2c-t2b) = 1-0.3 = 0.7 ... (5b)
Under this assumption, the four velocities of equations (1a) and (1b) and equations (2a) and (2b) are calculated as follows, and the equations (1a') and It becomes clear that the equations (2a') and (2b') include the velocity detection error caused by the jitter, while the true velocity 1.0 indicated by the equation (1b').

ω1ab=(θ1b−θ1a)/(t1b−t1a)=1/1=1.0…(1a’)
ω1bc=(θ1c−θ1b)/(t1c−t1b)=1/1=1.0…(1b’)
ω2ab=(θ2b−θ2a)/(t2b−t2a)=1/1.3≒0.76923…(2a’)
ω2bc=(θ2c−θ2b)/(t2c−t2b)=1/0.7≒1.42857…(2b’)
次に従来例として、この速度検出誤差を統計手法により抑制する方法、つまり最も簡単な2回の平均値を取る方法を考える。
ω1ab = (θ1b-θ1a) / (t1b-t1a) = 1/1 = 1.0 ... (1a')
ω1bc = (θ1c-θ1b) / (t1c-t1b) = 1/1 = 1.0 ... (1b')
ω2ab = (θ2b−θ2a) / (t2b−t2a) = 1 / 1.3≈0.76923 ... (2a')
ω2bc = (θ2c−θ2b) / (t2c−t2b) = 1 / 0.7≈1.42857 ... (2b')
Next, as a conventional example, a method of suppressing this speed detection error by a statistical method, that is, a method of taking the simplest average value of two times is considered.

理想的なパルスの場合には、(1a’)式と(1b’)式の平均値は(6)式となり、やはり真値のままである。 In the case of an ideal pulse, the average value of the equations (1a') and (1b') is the equation (6), which is also the true value.

ω1ave_ac=(ω1ab+ω1bc)/2=(1.0+1.0)/2=1.0…(6)
ジッタを含むパルスの方は、(2a’)式と(2b’)式の平均値は(7)式となり真値とは一致しないので誤差は零にはならない。
ω1ave_ac = (ω1ab + ω1bc) / 2 = (1.0 + 1.0) / 2 = 1.0 ... (6)
For the pulse containing jitter, the average value of equations (2a') and (2b') is equation (7), which does not match the true value, so the error does not become zero.

ω2ave_ac=(ω2ab+ω2bc)/2≒(0.76923+1.42857)/2=1.0989…(7)
ジッタによる時間誤差を含むのは中間のパルスP1bのタイミングだけであるので、直感的にはその両側の速度の平均をとれば誤差を零にできると想定することが多い。しかし実際には統計処理では、オフセット誤差が残る。これが本発明の真の解決したい課題である。では、なぜ平均値が零にならないかについて次に説明する。
ω2ave_ac = (ω2ab + ω2bc) / 2≈ (0.76923 + 1.42857) / 2 = 1.0989 ... (7)
Since it is only the timing of the intermediate pulse P1b that includes the time error due to jitter, it is often assumed intuitively that the error can be made zero by averaging the velocities on both sides. However, in reality, offset error remains in statistical processing. This is the true problem to be solved by the present invention. Then, the reason why the average value does not become zero will be explained next.

上記までは数値例を示したが、オフセット誤差の説明については図11のグラフを使用する。図11は横軸に(2a’)式と(2b’)式の分母のような時間差(T)をとり、縦軸に(2a’)式と(2b’)式の計算結果である速度検出(ω)をプロットしたものである。ジッタによる誤差時間(+ΔT,−ΔT)が存在するので横軸の2点から垂線を引き、この垂線上に速度検出値をプロットしてみると、これらは原点に対して反比例の特性上に存在することになる。 Although numerical examples have been shown so far, the graph of FIG. 11 is used for the explanation of the offset error. In FIG. 11, the horizontal axis is the time difference (T) like the denominator of the equations (2a') and (2b'), and the vertical axis is the speed detection which is the calculation result of the equations (2a') and (2b'). It is a plot of (ω). Since there is an error time (+ ΔT, −ΔT) due to jitter, draw a perpendicular line from the two points on the horizontal axis and plot the velocity detection value on this perpendicular line, and these exist on the characteristic inversely proportional to the origin. Will be done.

誤差成分が分数の分母にのみ存在するために、反比例のような誤差分布になることは容易に想像がつく。もし、誤差分布が「傾きが−1の直線上」に存在してくれるならば、2点の平均値をとれば誤差は零になる。しかし(2a’)式と(2b’)式の速度誤差のように、ジッタによる速度検出は反比例特性、つまり常に「−1の傾きの直線」よりも振幅が大きい方向の誤差を含んでしまう。したがって、大量の平均処理を行っても誤差を零にすることはできず、真値よりも常に振幅が大きくなるというオフセット誤差が残ってしまう。これが問題点であり、ここでは「ジッタによる速度のオフセット誤差」または単に「オフセット誤差」と呼ぶことにする。 Since the error component exists only in the denominator of the fraction, it is easy to imagine that the error distribution will be inversely proportional. If the error distribution exists on a "straight line with a slope of -1", the error will be zero if the average value of the two points is taken. However, like the velocity error of the equations (2a') and (2b'), the velocity detection by jitter includes an inverse proportional characteristic, that is, an error in a direction having a larger amplitude than the "straight line having a slope of -1". Therefore, even if a large amount of averaging processing is performed, the error cannot be made zero, and an offset error that the amplitude is always larger than the true value remains. This is a problem and will be referred to here as "speed offset error due to jitter" or simply "offset error".

上記の問題点は、ジッタというパルス発生時刻のバラツキが要因であり、その誤差が相対的に小さくなって無視できるほどの長い時間間隔で速度検出すれば、大きな速度誤差は生じないはずである。統計処理をするのではなく、速度検出演算時の分母の時間差の値が大きくなるように、つまり分子の位相差(パルスカウント数の差)を大きくするべきである。例えば図10(b)の例では、(7)式のように短い検出期間の速度検出を統計処理するよりも、(8)式のようにP2aからP2cまでの3パルスという長い間隔にて、分子と分母を個別に積算してから除算する方がオフセット誤差の抑制には有効である。 The above problem is caused by a variation in pulse generation time called jitter, and if the error is relatively small and the speed is detected at a negligibly long time interval, a large speed error should not occur. Instead of performing statistical processing, the value of the time difference in the denominator during the velocity detection calculation should be large, that is, the phase difference (difference in the number of pulse counts) of the numerator should be large. For example, in the example of FIG. 10B, rather than statistically processing the velocity detection with a short detection period as in Eq. (7), at long intervals of 3 pulses from P2a to P2c as in Eq. (8). It is more effective to suppress the offset error by integrating the numerator and denominator individually and then dividing.

ω2ave_ac’=(θ2c−θ2a)/(t2c−t2a)…(8)
従来より「検出期間を長くすると精度が良い」という経験則が知られていたが、厳密には「オフセット誤差」の原理までは一般的には認識されていないようである。そのため「計測時間を短くしておき、統計処理で解決できる」という誤解をされやすい。そこで以上のような詳細な説明を行うことにより、計測時間の適切な選定の重要性と、本課題に対しては統計処理の効果に限界が存在することを明らかにしてきた。ここまでは、速度検出という限定した部分であったが、以降からは速度制御系に視野を広げ、そして、このオフセット誤差を抑制するための方式を提案する。
ω2ave_ac'= (θ2c-θ2a) / (t2c-t2a) ... (8)
Conventionally, the empirical rule that "the longer the detection period, the better the accuracy" has been known, but strictly speaking, it seems that the principle of "offset error" is not generally recognized. Therefore, it is easy to misunderstand that "the measurement time can be shortened and the problem can be solved by statistical processing". Therefore, by giving the above detailed explanation, it has been clarified that the importance of appropriately selecting the measurement time and that there is a limit to the effect of statistical processing on this subject. Up to this point, it was a limited part of speed detection, but from now on, we will expand the field of view to the speed control system and propose a method to suppress this offset error.

特許文献1ではサンプル時間(CPU割込周期)がこの速度検出時間を支配している。単純に精度を高めるには速度検出の時間差を長くすればよいが、同時に検出遅れ(ムダ時間)も大きくなってしまい、速度制御の応答性を制限する要因となってくる。逆に速度検出時間を短くすれば、速度検出誤差は大きいものの時間遅れ(ムダ時間)が小さくなるので、応答性は高くできる。しかし、ジッタによる速度検出誤差のバラツキが増加するために、モータの制御時に速度制御出力であるトルク指令に大きな脈動成分が生じてしまい、トルク品質が劣化する問題も生じる。 In Patent Document 1, the sample time (CPU interrupt cycle) controls this speed detection time. To simply improve the accuracy, the time difference in speed detection may be lengthened, but at the same time, the detection delay (waste time) also increases, which is a factor that limits the responsiveness of speed control. On the contrary, if the speed detection time is shortened, the speed detection error is large, but the time delay (waste time) is small, so that the responsiveness can be improved. However, since the variation in the speed detection error due to jitter increases, a large pulsating component is generated in the torque command which is the speed control output when the motor is controlled, and there is a problem that the torque quality is deteriorated.

このジッタの発生要因について考えてみると、エンコーダの原理的な種類や組み立て精度などによるバラツキなどに起因するので発生量は一定ではない。そのため「速度制御精度と応答性能とを両立できる」という相反する要求を満足するには、個別のシステムの状況に応じて速度検出時間(割り込み周期)を調整・変更する必要がある。かといって、CPU割込みの周期自体を変化させてしまうと、同じ割込処理で実行している速度制御以外の制御演算に対して特性変化をさせてしまう危惧も生じてくる。 Considering the cause of this jitter, the amount of jitter generated is not constant because it is caused by variations due to the principle type of encoder and assembly accuracy. Therefore, in order to satisfy the conflicting requirements that "speed control accuracy and response performance can be compatible", it is necessary to adjust or change the speed detection time (interrupt cycle) according to the situation of each individual system. On the other hand, if the CPU interrupt cycle itself is changed, there is a concern that the characteristics of control operations other than the speed control executed by the same interrupt process may be changed.

本発明は上記課題を解決するものであり、その目的は、割込周期を変えることなく、速度検出におけるオフセット誤差を抑制して速度検出精度を向上させることができる速度検出装置および速度制御システムを提供することにある。 The present invention solves the above problems, and an object of the present invention is to provide a speed detection device and a speed control system capable of suppressing an offset error in speed detection and improving speed detection accuracy without changing the interrupt period. To provide.

上記課題を解決するための請求項1に記載の速度検出装置は、回転機の回転速度を検出する速度検出装置であって、
回転機の回転角度を検出するパルスエンコーダの出力パルスに基づいて、設定したサンプル周期毎に、パルス有無情報、パルス位相情報およびパルス発生時刻情報を取得するパルス情報取得部と、
前記サンプル周期毎に取得された前記パルス位相情報を各々記憶するパルス位相バッファと、
前記サンプル周期毎に取得された前記パルス発生時刻情報を各々記憶するパルス時刻バッファと、
複数サンプル周期前に取得され記憶されたパルス情報を選択するための選択信号を設定する選択信号設定部と、
前記選択信号設定部で設定された選択信号によって、前記パルス位相バッファ内の複数サンプル周期前のパルス位相情報を選択し、前記パルス時刻バッファ内の複数サンプル周期前のパルス発生時刻情報を選択する過去情報選択部と、
前記パルス位相バッファ内の最新パルス位相と前記過去情報選択部によって選択された複数サンプル周期前のパルス位相との差分と、前記パルス時刻バッファ内の最新パルス発生時刻と前記過去情報選択部によって選択された複数サンプル周期前のパルス発生時刻との差分に基づいて速度検出値を演算する速度検出演算部と、を備え、
前記パルス情報取得部は、
前記パルスエンコーダからの出力パルスを波形整形してパルスの立上り、立下りの各エッジを検出する波形整形回路と、
前記波形整形回路で検出されたパルスの立上りエッジ、立下りエッジによりアップ/ダウンカウントを行い、カウント値をパルス位相値として出力するパルス位相アップダウンカウンタと、
基準クロックをカウントして時刻データを出力し、固定値に設定されたサンプル周期毎に割込信号を出力するタイマ回路と、
前記波形整形回路からパルスの各エッジの検出信号が入力されたときの前記タイマ回路の時刻データを記憶保持し、パルス発生時刻として出力するパルス発生時刻計測回路と、
前記波形整形回路からのパルスの各エッジの検出信号によりセットされ、前記タイマ回路からの割込信号によりリセットされ、該割込信号の発生周期の間にパルスが発生したか否かを示すパルス有無信号を出力するフリップフロップ回路と、
前記タイマ回路からの割込信号をイネーブル信号として、前記パルス位相アップダウンカウンタから送出されるパルス位相値、前記パルス発生時刻計測回路から送出されるパルス発生時刻および前記フリップフロップ回路から送出されるパルス有無信号を各々保持する読み出し用バッファと、を備え、
前記パルス位相バッファおよびパルス時刻バッファは、前記タイマ回路からの割込信号および前記読み出し用バッファからのパルス有無信号の論理積信号をイネーブル信号として、前記読み出し用バッファのパルス位相値およびパルス発生時刻を読み出して記憶する、最新情報記憶用バッファとn段(nは整数)の過去情報記憶用バッファとで各々構成され、
前記選択信号設定部の選択信号は、前記n段の過去情報記憶用バッファのうちいずれかの段のバッファを指定する信号に設定され、
前記過去情報選択部は、前記n段の過去情報記憶用バッファのうち前記選択信号設定部の選択信号で指定された段のバッファの情報を選択する、
ことを特徴とする。
The speed detection device according to claim 1 for solving the above problems is a speed detection device that detects the rotation speed of a rotating machine.
A pulse information acquisition unit that acquires pulse presence / absence information, pulse phase information, and pulse generation time information for each set sample period based on the output pulse of the pulse encoder that detects the rotation angle of the rotating machine.
A pulse phase buffer that stores the pulse phase information acquired for each sample cycle, and a pulse phase buffer.
A pulse time buffer that stores the pulse generation time information acquired for each sample cycle, and a pulse time buffer.
A selection signal setting unit that sets a selection signal for selecting pulse information acquired and stored before a plurality of sample cycles, and a selection signal setting unit.
In the past, the pulse phase information before the plurality of sample cycles in the pulse phase buffer is selected by the selection signal set by the selection signal setting unit, and the pulse generation time information before the plurality of sample cycles in the pulse time buffer is selected. Information selection section and
The difference between the latest pulse phase in the pulse phase buffer and the pulse phase before a plurality of sample cycles selected by the past information selection unit, the latest pulse generation time in the pulse time buffer, and the past information selection unit are selected. It is equipped with a speed detection calculation unit that calculates the speed detection value based on the difference from the pulse generation time before a plurality of sample cycles .
The pulse information acquisition unit
A waveform shaping circuit that shapes the output pulse from the pulse encoder to detect the rising and falling edges of the pulse, and
A pulse phase up / down counter that counts up / down by the rising and falling edges of the pulse detected by the waveform shaping circuit and outputs the count value as the pulse phase value.
A timer circuit that counts the reference clock, outputs time data, and outputs an interrupt signal for each sample cycle set to a fixed value.
A pulse generation time measurement circuit that stores and retains the time data of the timer circuit when a detection signal for each edge of the pulse is input from the waveform shaping circuit and outputs the pulse generation time.
The presence or absence of a pulse that is set by the detection signal of each edge of the pulse from the waveform shaping circuit, reset by the interrupt signal from the timer circuit, and indicates whether or not the pulse is generated during the generation cycle of the interrupt signal. A flip-flop circuit that outputs a signal and
With the interrupt signal from the timer circuit as an enable signal, the pulse phase value sent from the pulse phase up / down counter, the pulse generation time sent from the pulse generation time measurement circuit, and the pulse sent from the flip-flop circuit. It is equipped with a read buffer that holds each presence / absence signal.
The pulse phase buffer and the pulse time buffer use the logical product signal of the interrupt signal from the timer circuit and the pulse presence / absence signal from the read buffer as an enable signal, and set the pulse phase value and the pulse generation time of the read buffer as enable signals. It is composed of a buffer for storing the latest information and a buffer for storing past information in n stages (n is an integer) that are read and stored.
The selection signal of the selection signal setting unit is set to a signal that specifies a buffer of any one of the n-stage past information storage buffers.
The past information selection unit selects the information of the buffer of the stage designated by the selection signal of the selection signal setting unit from the n stages of the past information storage buffer.
It is characterized by that.

上記構成によれば、複数パルス周期前のパルス情報から最新パルス情報までの速度検出期間を長くする(選択信号設定部で設定する)ことができ、速度検出における、パルス信号の発生時刻のゆらぎによるオフセット誤差を抑制して速度検出精度を向上させることができる。 According to the above configuration, the speed detection period from the pulse information before a plurality of pulse cycles to the latest pulse information can be lengthened (set by the selection signal setting unit), and it depends on the fluctuation of the pulse signal generation time in the speed detection. The offset error can be suppressed and the speed detection accuracy can be improved.

また、請求項2に記載の速度検出装置は、請求項1において、
前記選択信号設定部は、
第1のサンプル周期前に取得され記憶されたパルス情報を選択するための第1の選択信号と、前記第1のサンプル周期前よりも過去の第2のサンプル周期前に取得され記憶されたパルス情報を選択するための第2の選択信号とを設定し、
前記過去情報選択部は、
前記第1の選択信号によって、前記パルス位相バッファ内の第1のサンプル周期前のパルス位相情報および前記パルス時刻バッファ内の第1のサンプル周期前のパルス時刻情報を選択する第1の過去情報選択部と、
前記第2の選択信号によって、前記パルス位相バッファ内の第2のサンプル周期前のパルス位相情報および前記パルス時刻バッファ内の第2のサンプル周期前のパルス時刻情報を選択する第2の過去情報選択部とを有し、
前記速度検出演算部は、
前記パルス位相バッファ内の最新パルス位相と前記第1の過去情報選択部によって選択された第1のサンプル周期前のパルス位相との差分と、前記パルス時刻バッファ内の最新パルス発生時刻と前記第1の過去情報選択部によって選択された第1のサンプル周期前のパルス発生時刻との差分に基づいて第1の速度検出値を演算する第1の速度検出演算部と、
前記パルス位相バッファ内の最新パルス位相と前記第2の過去情報選択部によって選択された第2のサンプル周期前のパルス位相との差分と、前記パルス時刻バッファ内の最新パルス発生時刻と前記第2の過去情報選択部によって選択された第2のサンプル周期前のパルス発生時刻との差分に基づいて第2の速度検出値を演算する第2の速度検出演算部とを有している
ことを特徴とする。
The speed detection device according to claim 2 is the speed detection device according to claim 1.
The selection signal setting unit
A first selection signal for selecting pulse information acquired and stored before the first sample cycle, and a pulse acquired and stored before a second sample cycle earlier than before the first sample cycle. Set with a second selection signal for selecting information,
The past information selection unit
First past information selection that selects the pulse phase information before the first sample cycle in the pulse phase buffer and the pulse time information before the first sample cycle in the pulse time buffer by the first selection signal. Department and
A second past information selection that selects the pulse phase information before the second sample cycle in the pulse phase buffer and the pulse time information before the second sample cycle in the pulse time buffer by the second selection signal. Has a part and
The speed detection calculation unit
The difference between the latest pulse phase in the pulse phase buffer and the pulse phase before the first sample cycle selected by the first past information selection unit, the latest pulse generation time in the pulse time buffer, and the first The first speed detection calculation unit that calculates the first speed detection value based on the difference from the pulse generation time before the first sample cycle selected by the past information selection unit of
The difference between the latest pulse phase in the pulse phase buffer and the pulse phase before the second sample cycle selected by the second past information selection unit, the latest pulse generation time in the pulse time buffer, and the second. It is characterized by having a second speed detection calculation unit that calculates a second speed detection value based on the difference from the pulse generation time before the second sample cycle selected by the past information selection unit of. And.

また、請求項3に記載の速度検出装置は、請求項1において、
前記選択信号設定部は、
第1のサンプル周期前に取得され記憶された、前記n段の過去情報記憶用バッファのうち何れかの段を指定する第1の選択信号と、前記第1のサンプル周期前よりも過去の第2のサンプル周期前に取得され記憶された、前記n段の過去情報記憶用バッファのうち何れかの段を指定する第2の選択信号とを設定し、
前記過去情報選択部は、
前記第1の選択信号によって指定された段の、前記パルス位相バッファの過去情報記憶用バッファ内の第1のサンプル周期前のパルス位相情報および前記パルス時刻バッファの過去情報記憶用バッファ内の第1のサンプル周期前のパルス時刻情報を選択する第1の過去情報選択部と、
前記第2の選択信号によって指定された段の、前記パルス位相バッファの過去情報記憶用バッファ内の第2のサンプル周期前のパルス位相情報および前記パルス時刻バッファの過去情報記憶用バッファ内の第2のサンプル周期前のパルス時刻情報を選択する第2の過去情報選択部とを有し、
前記速度検出演算部は、
前記パルス位相バッファの最新情報記憶用バッファ内の最新パルス位相と前記第1の過去情報選択部によって選択された第1のサンプル周期前のパルス位相との差分と、前記パルス時刻バッファの最新情報記憶用バッファ内の最新パルス発生時刻と前記第1の過去情報選択部によって選択された第1のサンプル周期前のパルス発生時刻との差分に基づいて第1の速度検出値を演算する第1の速度検出演算部と、
前記パルス位相バッファの最新情報記憶用バッファ内の最新パルス位相と前記第2の過去情報選択部によって選択された第2のサンプル周期前のパルス位相との差分と、前記パルス時刻バッファの最新情報記憶用バッファ内の最新パルス発生時刻と前記第2の過去情報選択部によって選択された第2のサンプル周期前のパルス発生時刻との差分に基づいて第2の速度検出値を演算する第2の速度検出演算部とを有している
ことを特徴とする。
The speed detection device according to claim 3 is the speed detection device according to claim 1 .
The selection signal setting unit
The first selection signal that specifies any stage of the n-stage past information storage buffer acquired and stored before the first sample cycle, and the first selection signal that is earlier than before the first sample cycle. A second selection signal for designating any of the n stages of the past information storage buffer acquired and stored before the sample cycle of 2 is set.
The past information selection unit
The pulse phase information before the first sample cycle in the past information storage buffer of the pulse phase buffer and the first in the past information storage buffer of the pulse time buffer of the stage designated by the first selection signal. The first past information selection unit that selects the pulse time information before the sample cycle of
The pulse phase information before the second sample cycle in the past information storage buffer of the pulse phase buffer and the second in the past information storage buffer of the pulse time buffer of the stage specified by the second selection signal. It has a second past information selection unit that selects pulse time information before the sample cycle of
The speed detection calculation unit
The difference between the latest pulse phase in the latest information storage buffer of the pulse phase buffer and the pulse phase before the first sample cycle selected by the first past information selection unit, and the latest information storage of the pulse time buffer. The first speed for calculating the first speed detection value based on the difference between the latest pulse generation time in the buffer and the pulse generation time before the first sample cycle selected by the first past information selection unit. Detection calculation unit and
The difference between the latest pulse phase in the latest information storage buffer of the pulse phase buffer and the pulse phase before the second sample cycle selected by the second past information selection unit, and the latest information storage of the pulse time buffer. The second speed for calculating the second speed detection value based on the difference between the latest pulse generation time in the buffer and the pulse generation time before the second sample cycle selected by the second past information selection unit. It is characterized by having a detection calculation unit.

前記第2の選択信号で設定された第2のサンプル周期前と最新時刻の間は、第1の選択信号で設定された第1のサンプル周期前と最新時刻の間よりも速度検出期間が長い。このため上記構成によれば、異なる2つの速度検出期間による速度検出演算が可能となり、例えば短く設定した速度検出期間による速度検出演算(第1の速度検出演算部)と、長く設定した速度検出期間による速度検出演算(第2の速度検出演算部)とを行うことにより、早い応答性能を満たす速度検出値(第1の速度検出値)と、高い速度検出精度を満たす速度検出値(第2の速度検出値)の両方を得ることができる。 The speed detection period between before the second sample cycle set by the second selection signal and the latest time is longer than between before the first sample cycle set by the first selection signal and the latest time. .. Therefore, according to the above configuration, the speed detection calculation by two different speed detection periods becomes possible. For example, the speed detection calculation by the speed detection period set short (the first speed detection calculation unit) and the speed detection period set long. By performing the speed detection calculation (second speed detection calculation unit) by, the speed detection value (first speed detection value) satisfying the fast response performance and the speed detection value (second speed detection value) satisfying the high speed detection accuracy. Both speed detection values) can be obtained.

また、請求項4に記載の速度制御システムは、
回転機の速度指令と回転機の速度検出値の偏差に対して比例制御を行う比例制御項と、回転機の速度指令と回転機の速度検出値の偏差に対して積分制御を行う積分制御項とを有して、回転機の速度制御を行う速度制御システムであって、
請求項2又は3に記載の速度検出装置を備え、
前記比例制御項における回転機の速度検出値として、前記速度検出装置の第1の速度検出演算部で演算された第1の速度検出値を用い、
前記積分制御項における回転機の速度検出値として、前記速度検出装置の第2の速度検出演算部で演算された第2の速度検出値を用いる、
ことを特徴とする。
Further, the speed control system according to claim 4 is
A proportional control term that performs proportional control for the deviation between the speed command of the rotating machine and the speed detection value of the rotating machine, and an integral control term that performs integral control for the deviation between the speed command of the rotating machine and the speed detection value of the rotating machine. It is a speed control system that controls the speed of the rotating machine.
The speed detection device according to claim 2 or 3 is provided.
As the speed detection value of the rotating machine in the proportional control term, the first speed detection value calculated by the first speed detection calculation unit of the speed detection device is used.
As the speed detection value of the rotating machine in the integration control term, the second speed detection value calculated by the second speed detection calculation unit of the speed detection device is used.
It is characterized by that.

上記構成によれば、比例制御項の速度検出値として、速度検出期間が短く速い応答性能を満たす第1の速度検出値が用いられるため、ムダ時間が少なくなって応答性能が高められる。 According to the above configuration, as the speed detection value of the proportional control term, the first speed detection value that satisfies the short speed detection period and fast response performance is used, so that the waste time is reduced and the response performance is improved.

また、積分制御項の速度検出値として、速度検出期間が長く高い速度検出精度を満たす第2の速度検出値が用いられるため、速度制御精度が高められる(速度検出期間が長く、ムダ時間が大となっても積分項の制御において、悪影響は少ない)。したがって、速度制御精度と応答性能とを両立する制御系を構築することができる。 Further, as the speed detection value of the integral control term, the second speed detection value satisfying the high speed detection accuracy with a long speed detection period is used, so that the speed control accuracy is improved (the speed detection period is long and the waste time is large). Even if it becomes, there is little adverse effect on the control of the integral term). Therefore, it is possible to construct a control system that achieves both speed control accuracy and response performance.

また、請求項5に記載の速度制御システムは、
回転機の速度指令と回転機の速度検出値の偏差に対して比例制御を行う比例制御項と、回転機の速度指令と回転機の速度検出値の偏差に対して積分制御を行う積分制御項とを有して、回転機の速度制御を行う速度制御システムであって、
請求項3に記載の速度検出装置を備え、
回転機の速度指令を時間積分して位相指令を求める速度指令/位相指令変換回路を設け、
前記速度検出装置のタイマ回路からの割込信号をイネーブル信号として、前記速度指令/位相指令変換回路で求められた位相指令を保持する位相指令読み出し用バッファと、
最新情報記憶用バッファおよびn段(nは整数)の過去情報記憶用バッファとで構成され、前記速度検出装置の読み出し用バッファからのパルス有無信号をイネーブル信号として、前記位相指令読み出し用バッファ内の位相指令を読み出して記憶する位相指令バッファと、
前記速度検出装置の選択信号設定部で設定された第2の選択信号によって指定された段の、前記位相指令バッファの過去情報記憶用バッファ内の第2のサンプル周期前の位相指令を選択する第3の過去情報選択部と、
前記位相指令バッファの最新情報記憶用バッファ内の最新位相指令と前記第3の過去情報選択部によって選択された第2のサンプル周期前の位相指令との差分を、前記速度検出装置の第2の速度検出演算部における最新パルス発生時刻と第2のサンプル周期前のパルス発生時刻との差分で除算する演算回路とによって、
平均化速度指令を求める平均化速度指令演算部をさらに設け、
前記積分制御項における回転機の速度指令として、前記平均化速度指令演算部で求められた平均化速度指令を用い、
前記比例制御項における回転機の速度検出値として、前記速度検出装置の第1の速度検出演算部で演算された第1の速度検出値を用い、
前記積分制御項における回転機の速度検出値として、前記速度検出装置の第2の速度検出演算部で演算された第2の速度検出値を用いる
ことを特徴とする。
Further, the speed control system according to claim 5 is
A proportional control term that performs proportional control for the deviation between the speed command of the rotating machine and the speed detection value of the rotating machine, and an integral control term that performs integral control for the deviation between the speed command of the rotating machine and the speed detection value of the rotating machine. It is a speed control system that controls the speed of the rotating machine.
The speed detection device according to claim 3 is provided.
A speed command / phase command conversion circuit is provided to obtain the phase command by time-integrating the speed command of the rotating machine.
A buffer for reading out the phase command, which holds the phase command obtained by the speed command / phase command conversion circuit, with the interrupt signal from the timer circuit of the speed detection device as the enable signal.
It is composed of a buffer for storing the latest information and a buffer for storing past information in n stages (n is an integer), and a pulse presence / absence signal from the read buffer of the speed detection device is used as an enable signal in the phase command read buffer. A phase command buffer that reads and stores phase commands,
The first phase command before the second sample cycle in the past information storage buffer of the phase command buffer of the stage designated by the second selection signal set by the selection signal setting unit of the speed detection device is selected. 3 past information selection section and
The difference between the latest phase command in the latest information storage buffer of the phase command buffer and the phase command before the second sample cycle selected by the third past information selection unit is determined by the second speed detection device. By the calculation circuit that divides by the difference between the latest pulse generation time and the pulse generation time before the second sample cycle in the speed detection calculation unit.
An averaging speed command calculation unit for obtaining the averaging speed command is further provided.
As the speed command of the rotating machine in the integration control term, the averaging speed command obtained by the averaging speed command calculation unit is used.
As the speed detection value of the rotating machine in the proportional control term, the first speed detection value calculated by the first speed detection calculation unit of the speed detection device is used.
As the speed detection value of the rotating machine in the integration control term, the second speed detection value calculated by the second speed detection calculation unit of the speed detection device is used.

上記構成によれば、積分制御項において、加速中は、速度検出期間が長くムダ時間の大きい第2の速度検出値と平均化速度指令との差が小さくなり、速度検出遅れ時間による影響を小さくできる。このため、加速中に前記検出時間遅れ成分が積分器に溜まる量が抑制され、一定速度に移行した際の、前記積分器に溜まった量の放出によるオーバーシュートを抑制することができる。これによって速度制御の精度が向上する。 According to the above configuration, in the integration control term, during acceleration, the difference between the second speed detection value having a long speed detection period and a large waste time and the averaging speed command becomes small, and the influence of the speed detection delay time becomes small. it can. Therefore, the amount of the detection time delay component accumulated in the integrator during acceleration is suppressed, and overshoot due to the release of the amount accumulated in the integrator when shifting to a constant speed can be suppressed. This improves the accuracy of speed control.

(1)請求項1〜5に記載の発明によれば、速度検出におけるオフセット誤差が抑制され、速度検出精度が向上する。
(2)請求項2、3に記載の発明によれば、異なる2つの速度検出期間による速度検出演算が可能となり、例えば短く設定した速度検出期間による速度検出演算(第1の速度検出演算部)と、長く設定した速度検出期間による速度検出演算(第2の速度検出演算部)とを行うことにより、早い応答性能を満たす速度検出値(第1の速度検出値)と、高い速度検出精度を満たす速度検出値(第2の速度検出値)の両方を得ることができる。
(3)請求項4に記載の発明によれば、比例制御項の速度検出値として、速度検出期間が短く速い応答性能を満たす第1の速度検出値が用いられるため、ムダ時間が少なくなって応答性能が高められる。
(1) According to the inventions of claims 1 to 5 , offset error in speed detection is suppressed, and speed detection accuracy is improved.
(2) According to the inventions of claims 2 and 3 , speed detection calculation by two different speed detection periods is possible, for example, speed detection calculation by a short set speed detection period (first speed detection calculation unit). By performing the speed detection calculation (second speed detection calculation unit) based on the long set speed detection period, the speed detection value (first speed detection value) satisfying the fast response performance and the high speed detection accuracy can be obtained. Both of the satisfied speed detection values (second speed detection values) can be obtained.
(3) According to the invention of claim 4 , as the speed detection value of the proportional control term, the first speed detection value satisfying the short speed detection period and the fast response performance is used, so that the waste time is reduced. Response performance is improved.

また、積分制御項の速度検出値として、速度検出期間が長く高い速度検出精度を満たす第2の速度検出値が用いられるため、速度制御精度が高められる(速度検出期間が長く、ムダ時間が大となっても積分項の制御において、悪影響は少ない)。したがって、速度制御精度と応答性能とを両立する制御系を構築することができる。
(4)請求項5に記載の発明によれば、積分制御項において、加速中に検出時間遅れ成分が積分器に溜まる量が抑制され、一定速度に移行した際の、前記積分器に溜まった量の放出によるオーバーシュートを抑制することができる。これによって速度制御の精度が向上する。
Further, as the speed detection value of the integral control term, the second speed detection value satisfying the high speed detection accuracy with a long speed detection period is used, so that the speed control accuracy is improved (the speed detection period is long and the waste time is large). Even if it becomes, there is little adverse effect on the control of the integral term). Therefore, it is possible to construct a control system that achieves both speed control accuracy and response performance.
(4) According to the invention of claim 5 , in the integration control term, the amount of the detection time delay component accumulated in the integrator during acceleration is suppressed, and when the speed shifts to a constant speed, the detection time delay component is accumulated in the integrator. Overshoot due to release of quantity can be suppressed. This improves the accuracy of speed control.

本発明の実施例1による速度検出装置の全体構成図。The overall block diagram of the speed detection apparatus according to Example 1 of this invention. 本発明の実施例1における要部構成図。The block diagram of the main part in Example 1 of this invention. 本発明の実施例1の速度検出装置の動作を説明するタイムチャート。A time chart illustrating the operation of the speed detection device according to the first embodiment of the present invention. 本発明の実施例2による速度検出装置の構成図。The block diagram of the speed detection apparatus according to Example 2 of this invention. 本発明の実施例2による速度制御システムの構成図。The block diagram of the speed control system according to Example 2 of this invention. 速度検出遅れ時間による速度指令との差分を起因として生じる問題点を説明する速度−時間特性図。A speed-time characteristic diagram illustrating a problem caused by a difference from a speed command due to a speed detection delay time. 本発明の実施例3による速度検出装置の構成図。The block diagram of the speed detection apparatus according to Example 3 of this invention. 本発明の実施例3による速度制御システムの構成図。The block diagram of the speed control system according to Example 3 of this invention. 本発明の実施例3による効果を説明する速度−時間特性図。The speed-time characteristic diagram explaining the effect by Example 3 of this invention. エンコーダが発生するパルス信号と位相、時刻の関係を示す説明図。Explanatory drawing which shows the relationship between the pulse signal generated by an encoder, phase, and time. パルス発生時刻が揺らいだ際に、平均処理では速度検出のオフセット誤差を無くすことができないことを表す説明図。An explanatory diagram showing that the offset error of speed detection cannot be eliminated by averaging when the pulse generation time fluctuates.

以下、図面を参照しながら本発明の実施の形態を説明するが、ディジタル回路とCPU演算は相互に置き換えが可能な部分があるので、本発明は下記の実施形態例に限定されるものではない。本実施形態では、まず最初に、割込周期は固定したままで、個別装置において速度検出時間を任意に可変設定できる方式を実施例1として提案する。それから、実施例2以降にて、さらに「速度制御精度と応答性能とを両立できる」改善策を提案する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings, but the present invention is not limited to the following examples of embodiments because there are parts in which the digital circuit and the CPU calculation can be replaced with each other. .. In the present embodiment, first, a method in which the speed detection time can be arbitrarily variably set in the individual device while the interrupt cycle is fixed is proposed as the first embodiment. Then, in the second and subsequent examples, further improvement measures "which can achieve both speed control accuracy and response performance" are proposed.

図1は実施例1の速度検出装置の構成を示している。図1の構成は大きく分けて、左側の「ディジタル検出回路」と右側の「CPU演算」に分けられる。ディジタル検出回路の部分は、基本的には特許文献1や非特許文献1の検出回路と同様である。しかし4多重方式回路や正転と逆転との切り替えまで考慮すると複雑になるので、本発明では、説明を簡素にするために、パルスエンコーダからの出力パルスを波形整形する波形整形回路の出力は、後述する図3のような正転パルス(Edg_up)のみの1相パルス信号に限定して取り扱うことにする。 FIG. 1 shows the configuration of the speed detection device of the first embodiment. The configuration of FIG. 1 can be roughly divided into a "digital detection circuit" on the left side and a "CPU calculation" on the right side. The part of the digital detection circuit is basically the same as the detection circuit of Patent Document 1 and Non-Patent Document 1. However, considering the 4-multiplex circuit and switching between forward and reverse rotation, it becomes complicated. Therefore, in the present invention, in order to simplify the explanation, the output of the waveform shaping circuit that shapes the output pulse from the pulse encoder is It will be limited to the one-phase pulse signal of only the normal rotation pulse (Edg_up) as shown in FIG. 3 described later.

図1において、50は回転機の回転角度を検出するパルスエンコーダであり、モータなどの回転体の位相に応じてパルス信号を発生する。 In FIG. 1, reference numeral 50 denotes a pulse encoder that detects a rotation angle of a rotating machine, and generates a pulse signal according to the phase of a rotating body such as a motor.

51はパルスエンコーダ50からの出力パルスを波形整形する波形整形回路であり、パルスエンコーダ50の出力パルスの立上り、立下がりの各エッジを検出し、位相に相当するカウンタのUP/DOWN信号(Edg_up/Edg_dw)に変換する。 Reference numeral 51 denotes a waveform shaping circuit for waveform-shaping the output pulse from the pulse encoder 50, which detects the rising and falling edges of the output pulse of the pulse encoder 50 and detects the UP / DOWN signal (Edg_up /) of the counter corresponding to the phase. Convert to Edg_dw).

52は、波形整形回路51から出力されるカウンタのUP/DOWN信号のOR演算を行ってパルス発生信号Edgを出力するOR回路である。以降、「パルス発生信号」を「パルス」と簡素化して使用する場合もある。 Reference numeral 52 denotes an OR circuit that performs OR calculation of the UP / DOWN signal of the counter output from the waveform shaping circuit 51 and outputs the pulse generation signal Edg. Hereinafter, the “pulse generation signal” may be simplified and used as “pulse”.

53は、波形整形回路51で検出されたパルスの立上りエッジ、立下りエッジによりアップ/ダウンカウントを行い、カウント値をパルス位相値(θpp)として出力するパルス位相アップダウンカウンタであり、UP/DOWN信号(Edg_up/Edg_dw)によりカウンタ値θppをインクリメント(Up)/デクリメント(Dw)する。 Reference numeral 53 denotes a pulse phase up / down counter that counts up / down by the rising edge and falling edge of the pulse detected by the waveform shaping circuit 51 and outputs the count value as a pulse phase value (θpp), and is an UP / DOWN. The counter value θpp is incremented (Up) / decremented (Dw) by the signal (Edg_up / Edg_dw).

54は、パルスの発生時刻を計測するための基準時刻を生成するタイマ回路であり、ディジタル回路の基準クロックをカウントして時刻データtを出力する。またタイマ回路54は、CPUからD型フリップフロップ55を介して入力されるサンプル周期設定に応じて、該サンプル周期毎に割込信号Smpl(m)を出力する機能も有している。 Reference numeral 54 denotes a timer circuit that generates a reference time for measuring the pulse generation time, counts the reference clock of the digital circuit, and outputs the time data t. Further, the timer circuit 54 also has a function of outputting an interrupt signal Smpl (m) for each sample cycle according to the sample cycle setting input from the CPU via the D-type flip-flop 55.

ここで、Smpl(m)の(m)は発生するタイミングを示すための識別子であり、mの具体的な値については「m1,m2,m3…」として表す。56は、前記パルス発生信号Edgが発生したときのタイマ回路54から出力された時刻データtを記憶保持し、パルス発生時刻tppとして出力するパルス発生時刻計測回路であり、OR回路52の出力(Edg)をイネーブル信号とするラッチ回路(DEN−ff)で構成されている。 Here, (m) of Smpl (m) is an identifier for indicating the timing of occurrence, and the specific value of m is represented as "m1, m2, m3 ...". Reference numeral 56 denotes a pulse generation time measurement circuit that stores and holds the time data t output from the timer circuit 54 when the pulse generation signal Edg is generated and outputs the pulse generation time tpp, and is an output (Edg) of the OR circuit 52. ) Is a latch circuit (DEN-ff) as an enable signal.

57は、OR回路52からのパルス発生信号Edgによりセットされ、タイマ回路54からの割込信号Smpl(m)によりリセットされ、該割込信号の発生周期の間にパルスエッジ(Edg)が発生したか否かを検出するフリップフロップ回路である。このフリップフロップ回路57は、セット優先のSR−フリップフロップ(SRff)回路であり、割込信号Smpl(m)間にパルスエッジ(Edg)が発生していなければ「0」、発生していれば「1」のパルス有無フラグを出力し、次段の読み出し用バッファ58に出力(厳密には、受信側のEN(イネーブル)信号発生時にデータの転送が行われる)。 57 is set by the pulse generation signal Edg from the OR circuit 52, reset by the interrupt signal Smpl (m) from the timer circuit 54, and a pulse edge (Edg) is generated during the generation cycle of the interrupt signal. It is a flip-flop circuit that detects whether or not it is. This flip-flop circuit 57 is a set-priority SR-flip-flop (SRff) circuit, and is "0" if a pulse edge (Edg) is not generated between interrupt signals Smpl (m), and if it is generated, it is "0". The pulse presence / absence flag of "1" is output and output to the read buffer 58 of the next stage (strictly speaking, data is transferred when the EN (enable) signal on the receiving side is generated).

このように割込信号Smpl(m)は、速度検出演算が可能/不可能であるかの判定のためにフリップフロップ回路57に使用されるだけでなく、後述する多段バッファから成る読み出し用バッファ58のデータ転送の制御にも利用される。したがって、前記3種類の「パルス有無フラグとパルス位相値θppとパルス発生時刻tpp」は同時に更新される。 As described above, the interrupt signal Spl (m) is not only used in the flip-flop circuit 57 for determining whether the speed detection operation is possible / impossible, but also the read buffer 58 composed of the multi-stage buffer described later. It is also used to control data transfer. Therefore, the three types of "pulse presence / absence flag, pulse phase value θpp, and pulse generation time tpp" are updated at the same time.

読み出し用バッファ58は、前記タイマ回路54からの割込信号Smpl(m)をイネールブル信号として、パルス位相アップダウンカウンタ53から送出されるパルス位相値θpp、パルス発生時刻計測回路56から送出されるパルス発生時刻tppおよびフリップフロップ回路57から送出されるパルス有無フラグ(パルス有無信号)を各々保持する。 The read buffer 58 uses the interrupt signal Smpl (m) from the timer circuit 54 as an enable signal, the pulse phase value θpp transmitted from the pulse phase up / down counter 53, and the pulse transmitted from the pulse generation time measurement circuit 56. The occurrence time tpp and the pulse presence / absence flag (pulse presence / absence signal) transmitted from the flip flop circuit 57 are held respectively.

この読み出し用バッファ58は、割込信号Smpl(m)の発生時刻における「パルス有無フラグ」、「パルス位相値θpp」、「パルス発生時刻tpp」の3個の瞬時値を記憶するラッチ回路58a〜58c(図示Dff1〜Dff3)で構成されている。 The read buffer 58 is a latch circuit 58a that stores three instantaneous values of "pulse presence / absence flag", "pulse phase value θpp", and "pulse generation time tpp" at the generation time of the interrupt signal Smpl (m). It is composed of 58c (Dff1 to Dff3 in the figure).

ラッチ回路58a〜58cの出力側はCPUなどから計測値として読み出すものであり、複数のデータがバスアクセスされる期間中に値が変化して同時性が失われないように、割込信号Smpl(m)の発生タイミングで同時にラッチさせ、それ以外の期間では値を保持させている。 The output side of the latch circuits 58a to 58c is read as a measured value from a CPU or the like, and the interrupt signal Smpl (so that the value does not change and the simultaneity is not lost during the period when a plurality of data are accessed by bus) It is latched at the same time when m) occurs, and the value is held during other periods.

尚、前記波形整形回路51、OR回路52、パルス位相アップダウンカウンタ53、タイマ回路54、D型フリップフロップ55、パルス発生時刻計測回路56、フリップフロップ回路57および読み出し用バッファ58によってパルス情報取得部を構成している。 The pulse information acquisition unit is provided by the waveform shaping circuit 51, the OR circuit 52, the pulse phase up / down counter 53, the timer circuit 54, the D-type flip-flop 55, the pulse generation time measurement circuit 56, the flip-flop circuit 57, and the read buffer 58. Consists of.

61は前記ラッチ回路58b(Dff2)のレジスタ値(パルス位相値θpp)を読み出して記憶するパルス位相バッファ(多段バッファ;Buff2)であり、62は前記ラッチ回路58c(Dff3)のレジスタ値(パルス発生時刻tpp)を読み出して記憶するパルス時刻バッファ(多段バッファ;Buff3)である。 Reference numeral 61 denotes a pulse phase buffer (multi-stage buffer; Bff2) that reads and stores the register value (pulse phase value θpp) of the latch circuit 58b (Dff2), and 62 is a register value (pulse generation) of the latch circuit 58c (Dff3). It is a pulse time buffer (multi-stage buffer; Buff3) that reads and stores the time tpp).

63は、複数サンプル周期前に取得され、パルス位相バッファ61、パルス時刻バッファ62に記憶されたパルス情報(パルス位相値θpp、パルス発生時刻tpp)を選択するための選択信号(Sel)を設定する速度差データ選択回路(選択信号設定部)である。選択信号Selは、具体的にはサンプル周期毎に出力される割込信号Smpl(m)の識別子である(m)の値であり、複数サンプル周期前に相当する値に設定される。 Reference numeral 63 denotes a selection signal (Sel) for selecting pulse information (pulse phase value θpp, pulse generation time tpp) acquired before the plurality of sample cycles and stored in the pulse phase buffer 61 and the pulse time buffer 62. It is a speed difference data selection circuit (selection signal setting unit). Specifically, the selection signal Self is a value (m) which is an identifier of the interrupt signal Spl (m) output for each sample cycle, and is set to a value corresponding to a plurality of sample cycles before.

64は、前記パルス位相バッファ61に記憶されたパルス位相情報のうち、前記選択信号Selが示す複数サンプル周期前の(過去の)パルス位相情報を選択する前回値選択用セレクタ(Select2)(過去情報選択部)である。 Reference numeral 64 denotes a previous value selection selector (Select2) (past information) that selects the (past) pulse phase information before the plurality of sample cycles indicated by the selection signal Ser among the pulse phase information stored in the pulse phase buffer 61. Selection part).

65は、前記パルス時刻バッファ62に記憶されたパルス時刻情報のうち、前記選択信号Selが示す複数サンプル周期前の(過去の)パルス時刻情報を選択する前回値選択用セレクタ(Select3)(過去情報選択部)である。 Reference numeral 65 denotes a previous value selection selector (Select3) (past information) that selects the (past) pulse time information before the plurality of sample cycles indicated by the selection signal Ser among the pulse time information stored in the pulse time buffer 62. Selection part).

前記パルス位相バッファ61およびパルス時刻バッファ62は、従来の例えば特許文献1では最新のパルス情報を1段目のバッファに、過去のパルス情報を2段目のバッファに記憶させておき、この2個の情報に基づいて速度検出値を演算するものであったが、本発明では図2に示すように、多段のFIFO(ファーストインファーストアウト)動作をするスタックメモリ(多段バッファ)に拡張している。 In the conventional pulse phase buffer 61 and pulse time buffer 62, for example, in Patent Document 1, the latest pulse information is stored in the first-stage buffer, and the past pulse information is stored in the second-stage buffer. The speed detection value was calculated based on the above information, but in the present invention, as shown in FIG. 2, it is expanded to a stack memory (multi-stage buffer) that performs a multi-stage FIFO (first in first out) operation. ..

図2において、71は、図1の割込信号Smpl(m)(タイマ回路54の出力)およびパルス有無信号(ラッチ回路Dff1の出力)の論理積を演算するAND回路である。 In FIG. 2, 71 is an AND circuit that calculates the logical product of the interrupt signal Spl (m) (output of the timer circuit 54) and the pulse presence / absence signal (output of the latch circuit Dff1) of FIG.

72は、図1の読み出し用バッファ58から読み出されたパルス位相情報およびパルス発生時刻情報(検出データ)を格納する多段バッファであり、最新情報を記憶するラッチ回路72−0(Dff0)(最新情報記憶用バッファ)と、過去情報を記憶するn段(nは整数)のラッチ回路72−1〜72−5(Dff1〜Dff5)(過去情報記憶用バッファ)とで構成されている。 Reference numeral 72 denotes a multi-stage buffer for storing the pulse phase information and pulse generation time information (detection data) read from the read buffer 58 of FIG. 1, and a latch circuit 72-0 (Dff0) (latest) for storing the latest information. It is composed of an information storage buffer) and n-stage (n is an integer) latch circuits 72-1 to 72-5 (Dff1 to Dff5) (past information storage buffer) for storing past information.

尚本実施例では、過去情報記憶用バッファであるn段のラッチ回路を5つとして構成しているが、他の複数段数で構成してもよい。また、図1の読み出し用バッファ58のラッチ回路58a〜58cのDff1〜Dff3と、図2のラッチ回路72−1〜72−3のDff1〜Dff3は同一記号の表記を使用しているが、これらは異なる回路である。 In this embodiment, the n-stage latch circuit, which is a buffer for storing past information, is configured as five, but it may be configured with another plurality of stages. Further, Dff1 to Dff3 of the latch circuits 58a to 58c of the read buffer 58 of FIG. 1 and Dff1 to Dff3 of the latch circuits 72-1 to 72-3 of FIG. 2 use the same symbol notation. Is a different circuit.

ラッチ回路72−0のD端子には、読み出し用バッファ58のラッチ回路58bの出力(パルス位相情報)又はラッチ回路58cの出力(パルス時刻情報)が検出データとして入力される。 The output (pulse phase information) of the latch circuit 58b of the read buffer 58 or the output (pulse time information) of the latch circuit 58c is input to the D terminal of the latch circuit 72-0 as detection data.

ラッチ回路72−0のQ出力はラッチ回路72−1のD端子に入力され、ラッチ回路72−1のQ出力はラッチ回路72−2のD端子に入力され、ラッチ回路72−2のQ出力はラッチ回路72−3のD端子に入力され、ラッチ回路72−3のQ出力はラッチ回路72−4のD端子に入力され、ラッチ回路72−4のQ出力はラッチ回路72−5のD端子に入力されている。 The Q output of the latch circuit 72-0 is input to the D terminal of the latch circuit 72-1, the Q output of the latch circuit 72-1 is input to the D terminal of the latch circuit 72-2, and the Q output of the latch circuit 72-2. Is input to the D terminal of the latch circuit 72-3, the Q output of the latch circuit 72-3 is input to the D terminal of the latch circuit 72-4, and the Q output of the latch circuit 72-4 is the D of the latch circuit 72-5. It is input to the terminal.

各ラッチ回路72−0〜72−5は、割込信号とパルス有無信号の論理積をとったAND回路71の出力をイネーブル信号とし、読み込みデータの書き込みや、バッファ間(ラッチ回路72−0〜72−5間)のデータ移動が割込処理により実行される。 Each latch circuit 72-0 to 72-5 uses the output of the AND circuit 71, which is the logical product of the interrupt signal and the pulse presence / absence signal, as an enable signal for writing read data and between buffers (latch circuit 72-0 to 72-5). The data movement between 72 and 5) is executed by the interrupt process.

このように割込信号とパルス有無信号の論理積信号をイネーブル信号としているため、パルス有無信号(パルス有無フラグ)が「パルスが発生」した場合のみ各バッファ(ラッチ回路72−0〜72−5)を動作させ、パルスが無い場合には過去の値を保持させることができる。このようなパルス有無信号によるデータ転送制限機能を有しているため、回転速度が低下してパルス発生周期が割込信号周期よりも長くなって「パルス休止」状態になっても対応できる。 Since the logical product signal of the interrupt signal and the pulse presence / absence signal is used as the enable signal in this way, each buffer (latch circuit 72-0 to 72-5) only when the pulse presence / absence signal (pulse presence / absence flag) "pulse is generated". ) Can be operated and the past value can be retained when there is no pulse. Since it has such a data transfer limiting function based on the pulse presence / absence signal, it can cope with a "pulse pause" state in which the rotation speed decreases and the pulse generation cycle becomes longer than the interrupt signal cycle.

図2の73は、図1の前回値選択用セレクタ64,65(Select2,Select3)の機能を実現する前回値選択用セレクタであり、ラッチ回路72−1〜72−5の各Q出力であるデータData(1)〜Data(5)のうち、速度差データ選択回路63(スタックバッファ)からの選択信号Selが示す複数サンプル周期前のデータを選択する。 Reference numeral 73 in FIG. 2 is a selector for selecting the previous value that realizes the functions of the selectors 64 and 65 (Select2 and Select3) for selecting the previous value in FIG. 1, and is each Q output of the latch circuits 72-1 to 72-5. From the data Data (1) to Data (5), the data before the plurality of sample cycles indicated by the selection signal Self from the speed difference data selection circuit 63 (stack buffer) is selected.

前記選択信号SelをCPUへの設定により切り替える(速度差データ選択回路63における選択信号を変更する)ことにより、固定したサンプル周期でデータをラッチさせていても、任意のサンプル回数より以前の時刻で発生したパルスの情報を取り出すことが可能になる。 By switching the selection signal Self according to the setting in the CPU (changing the selection signal in the speed difference data selection circuit 63), even if the data is latched at a fixed sample cycle, the time is earlier than an arbitrary number of samples. It becomes possible to take out the information of the generated pulse.

図1の66は、パルス位相バッファ61内の最新パルス位相と、前回値選択用セレクタ64で選択された複数サンプル周期前のパルス位相との差分を計算する減算器(Sub2)であり、67は、パルス時刻バッファ62内の最新パルス時刻と、前回値選択用セレクタ65で選択された複数サンプル周期前のパルス時刻との差分を計算する減算器(Sub3)である。 66 in FIG. 1 is a subtractor (Sub2) for calculating the difference between the latest pulse phase in the pulse phase buffer 61 and the pulse phase before a plurality of sample cycles selected by the previous value selection selector 64, and 67 is a subtractor (Sub2). , A subtractor (Sub3) that calculates the difference between the latest pulse time in the pulse time buffer 62 and the pulse time before a plurality of sample cycles selected by the previous value selection selector 65.

68は、減算器66の出力である位相差分を、減算器67の出力である時間差分で除算して速度検出1(速度検出値)を出力する除算器である。前記減算器66,67および除算器68によって本発明の速度検出演算部を構成している。 Reference numeral 68 denotes a divider that outputs the speed detection 1 (speed detection value) by dividing the phase difference that is the output of the subtractor 66 by the time difference that is the output of the subtractor 67. The subtractors 66 and 67 and the divider 68 constitute the speed detection calculation unit of the present invention.

前記パルス位相バッファ61、パルス時刻バッファ62、速度差データ選択回路63、前回値選択用セレクタ64,65、減算器66,67、除算器68は、CPU演算機能の構成要素としてソフトウェアなどで実装することを想定している。 The pulse phase buffer 61, the pulse time buffer 62, the speed difference data selection circuit 63, the previous value selection selectors 64 and 65, the subtractors 66 and 67, and the divider 68 are implemented by software or the like as components of the CPU calculation function. It is assumed that.

尚、前記速度差データ選択回路63の選択信号Selをどのように決定するかは、「発明が解決しようとする課題」の欄で述べたように、速度演算を計算する時間間隔は短いほうが応答性能を高くでき、逆に長いほうが精度が良いことに鑑みて、エンコーダの種類やパルス数およびジッタの発生量などから経験的に設定するなどの方法が考えられる。 As for how to determine the selection signal Self of the speed difference data selection circuit 63, as described in the column of "Problems to be solved by the invention", the shorter the time interval for calculating the speed calculation, the better the response. Considering that the performance can be improved and the accuracy is better when the length is longer, a method such as empirically setting the encoder type, the number of pulses, and the amount of jitter generated can be considered.

次に、上記のように構成された装置の動作を図3のタイムチャートとともに説明する。図3ではモータなどの回転機が正転方向に一定速度で回転している状態の例を示しており、(a)は波形整形回路51からパルス位相アップダウンカウンタ53に出力されるup信号であるEdg_upを示している。 Next, the operation of the apparatus configured as described above will be described together with the time chart of FIG. FIG. 3 shows an example of a state in which a rotating machine such as a motor is rotating at a constant speed in the forward rotation direction, and (a) is an up signal output from the waveform shaping circuit 51 to the pulse phase up / down counter 53. It shows a certain Edg_up.

図3(b)はパルス位相アップダウンカウンタ53の位相カウンタ値、すなわちパルス位相値θppと時間tの関係である時間位相特性を示し、図3(c)はタイマ回路54から出力される割込信号Smpl(m)を示し、図3(d)はパルス位相バッファ61の位相θ(m)の最新データの更新状況を示し、図3(e)はパルス時刻バッファ62のパルス時刻t(m)の最新データの更新状況を示している。 FIG. 3B shows the phase counter value of the pulse phase up / down counter 53, that is, the time phase characteristic which is the relationship between the pulse phase value θpp and the time t, and FIG. 3C shows the interruption output from the timer circuit 54. The signal Spl (m) is shown, FIG. 3 (d) shows the update status of the latest data of the phase θ (m) of the pulse phase buffer 61, and FIG. 3 (e) shows the pulse time t (m) of the pulse time buffer 62. Shows the update status of the latest data of.

図3(f)は、特許文献1のように2個の連続するサンプル周期で読み出した位相と時刻の情報から速度を検出する従来方式による速度検出値を速度検出1’として示し、図3(g)は、図1の実施例による速度検出値を速度検出1として示している。 FIG. 3 (f) shows the speed detection value by the conventional method of detecting the speed from the phase and time information read in two consecutive sample cycles as in Patent Document 1 as the speed detection 1', and is shown in FIG. 3 (f). g) shows the speed detection value according to the embodiment of FIG. 1 as speed detection 1.

図3において、Edg_upのパルスがほぼ一定間隔で発生しており、位相カウンタ値θpp(θ1,θ2,θ3,…)もパルス発生ごとにインクリメントしている。ここでは後述の説明のために、個々のEdg_upパルスに識別用の番号を割り振ってある。このパルス発生時と同時に時刻データtpp(t1,t2,t3,…)もパルス発生時刻計測回路56(DEN−ff)にラッチされている。 In FIG. 3, pulses of Edg_up are generated at substantially regular intervals, and the phase counter values θpp (θ1, θ2, θ3, ...) Are also incremented for each pulse generation. Here, for the sake of explanation described later, identification numbers are assigned to individual Edg_up pulses. At the same time as this pulse is generated, the time data tpp (t1, t2, t3, ...) Is also latched by the pulse generation time measurement circuit 56 (DEN-ff).

これに対して、割込信号Smpl(m1,m2,m3,…)が発生するタイミングでラッチ回路58b(Dff2)にθppが、ラッチ回路58c(Dff3)にtppが各々ラッチされ、CPUはこのラッチデータを読み出して、FIFOスタック動作をするバッファ(パルス位相バッファ61、パルス時刻バッファ62)に記憶する。図3では、バッファの最新データの更新状況をθ(m)とt(m)に示しており、もしサンプル割込信号(Smpl)の周期間中に複数のパルスが発生した場合には、最後にラッチされた最新時刻のパルス情報が読み出される。 On the other hand, θpp is latched in the latch circuit 58b (Dff2) and tpp is latched in the latch circuit 58c (Dff3) at the timing when the interrupt signal Spl (m1, m2, m3, ...) Is generated, and the CPU latches this latch. The data is read out and stored in buffers (pulse phase buffer 61, pulse time buffer 62) that perform FIFO stack operation. In FIG. 3, the update status of the latest data in the buffer is shown in θ (m) and t (m), and if a plurality of pulses are generated during the period of the sample interrupt signal (Smpl), it is the last. The pulse information of the latest time latched on is read out.

例えば図3(c)のSmplのm3とm4の間では、図3(a)に示すEdg_upの3個のパルス7,8,9が発生しているため、最後にラッチされたパルス9のパルス情報が読み出され、図3(d),(e)のθ6→θ9、t6→t9へ更新される。 For example, between m3 and m4 of Smpl in FIG. 3 (c), three pulses 7, 8 and 9 of Edg_up shown in FIG. 3 (a) are generated, so that the pulse of the pulse 9 latched last is generated. The information is read out and updated from θ6 to θ9 and t6 to t9 in FIGS. 3D and 3E.

従来方式による速度検出1’では、2個の連続するサンプル周期で読み出した位相と時刻情報から速度演算を行っていた。図3(f)ではそれを具体的にどの時刻のサンプル情報を使っていつ演算するかを明示している。 In the speed detection 1'by the conventional method, the speed calculation is performed from the phase and time information read in two consecutive sample cycles. In FIG. 3 (f), it is clarified specifically when to calculate using the sample information at which time.

例えば、Smpl(m4)の時刻では、最新位相θ9と最新時刻t9を読み出し、前回のバッファ値であるθ6とt6との差分より、速度検出ω1’(m4)=(θ9−θ6)/(t9−t6)を計算していた。これを図3(b)の時間位相特性において図示すると、実線の矢印のようなパルス間で速度検出をしていることに相当している。 For example, at the time of Smpl (m4), the latest phase θ9 and the latest time t9 are read out, and the speed detection ω1'(m4) = (θ9-θ6) / (t9) is obtained from the difference between the previous buffer values θ6 and t6. -T6) was calculated. When this is illustrated in the time phase characteristic of FIG. 3B, it corresponds to the velocity detection between the pulses as shown by the solid arrows.

一方実施例1による速度検出1は、過去の情報を「複数サンプル前の情報」とすることにより、等価的に速度計測期間を長くするものであり、図3(g)において、どの時刻のサンプル情報を使って、いつ演算するのかを明示している。 On the other hand, in the speed detection 1 according to the first embodiment, the speed measurement period is equivalently lengthened by setting the past information as "information before a plurality of samples", and the sample at which time is shown in FIG. 3 (g). The information is used to specify when to calculate.

尚図3(g)の例では、図1の速度差データ選択回路63において設定される「複数サンプル周期前」を指定する選択信号Selの値を、「4サンプル周期前」に設定している。 In the example of FIG. 3 (g), the value of the selection signal Self that specifies "before a plurality of sample cycles" set in the speed difference data selection circuit 63 of FIG. 1 is set to "before a four-sample cycle". ..

例えばSmpl(m4)の時刻においては、最新情報θ9とt9に対して、前回値としてSmpl(4−4)=Smpl(0)のサンプルタイミングで読み出した情報である位相θ0と時刻t0が選択され、速度検出1を、ω1(m4)=(θ9−θ0)/(t9−t0)として計算する。 For example, at the time of Spl (m4), the phase θ0 and the time t0, which are the information read at the sample timing of Smpl (4-4) = Smpl (0), are selected as the previous values with respect to the latest information θ9 and t9. , Velocity detection 1 is calculated as ω1 (m4) = (θ9-θ0) / (t9-t0).

そして同様に、次のサンプルタイミングSmpl(5)では最新情報θ11、t11と、前回値としてSmpl(5−4)=Smpl(1)のサンプルタイミングで読み出した情報であるθ1、t1との差分より速度検出1が更新される。 Similarly, in the next sample timing Smpl (5), from the difference between the latest information θ11 and t11 and the information read at the sample timing of Smpl (5-4) = Smpl (1) as the previous value, θ1 and t1. Speed detection 1 is updated.

これを図3(b)の時間位相特性において図示すると、破線の矢印のようなパルス間で速度検出をしていることに相当している。 When this is illustrated in the time phase characteristic of FIG. 3 (b), it corresponds to speed detection between pulses as shown by the broken line arrow.

本実施例1によれば、サンプル周期(割込周期)自体を長い時間に変更する方式ではなく、一定のサンプル周期に設定しておき、過去の情報をスタックできるバッファとそれから任意のデータを選択できる機能を使うことにより、あたかもサンプル周期を長くしたような精度の速度検出が可能になる。 According to the first embodiment, instead of changing the sample cycle (interrupt cycle) itself to a long time, a fixed sample cycle is set, and a buffer capable of stacking past information and arbitrary data are selected from the buffer. By using the function that can be used, speed detection with an accuracy as if the sample period was lengthened becomes possible.

さらに、サンプル周期自体を長くしてしまうと、速度検出値の更新周期も同じように間延びしてしまい、速度検出波形が時間軸でも速度軸でも粗く変化するようになる。これに対して、実施例1の方式では、図3のように速度検出データはサンプル割込信号Smpl(m)の周期でデータを小刻みに更新するので、時間軸も速度軸も小刻みに変化するようになる。これは、データを更新する周期が長いことに起因するムダ時間成分を抑制できることを意味しており、その分だけ速度応答を改善できる効果もある。 Further, if the sample cycle itself is lengthened, the update cycle of the speed detection value is also extended in the same manner, and the speed detection waveform changes roughly on both the time axis and the speed axis. On the other hand, in the method of the first embodiment, as shown in FIG. 3, the speed detection data is updated in small steps at the cycle of the sample interrupt signal Smpl (m), so that the time axis and the speed axis change in small steps. Will be. This means that the waste time component due to the long data update cycle can be suppressed, and there is also an effect that the speed response can be improved by that amount.

さらに、Smpl(m)の周期は速度指令や速度制御演算の周期でもあるので、エンコーダの性能(パルス分解能やバラツキ)などにかかわらず、制御装置ではできるだけ短くかつ一定にしておきたい。その点でも、本発明方式ではサンプル周期を固定して、速度検出期間のみ任意に長くすることができるので、速度検出以外の制御系に対して影響を与えないという、装置全体の制御系から見た利点もある。 Further, since the cycle of Smpl (m) is also the cycle of speed command and speed control calculation, it is desired to keep it as short and constant as possible in the control device regardless of the performance of the encoder (pulse resolution and variation). In that respect as well, in the method of the present invention, the sample period can be fixed and only the speed detection period can be arbitrarily lengthened, so that the control system other than the speed detection is not affected, as seen from the control system of the entire device. There are also advantages.

実施例1では、固定割込周期であっても、速度検出期間を可変にできる構成を示した。これは、CPU内部のメモリ機能などを有効利用すれば簡単に実現できる。さらに、速度演算回数を増やせば、異なる速度検出期間を有する複数の速度検出演算を実行することもできる。そこで、複数の速度検出を有効利用することが実施例2のポイントであり、これらを速度制御と組み合わせることにより機能改善を図っている。 In Example 1, a configuration in which the speed detection period can be changed even with a fixed interrupt cycle is shown. This can be easily realized by effectively using the memory function inside the CPU. Further, by increasing the number of speed calculations, it is possible to execute a plurality of speed detection calculations having different speed detection periods. Therefore, the point of the second embodiment is to effectively utilize a plurality of speed detections, and the function is improved by combining these with the speed control.

図4に、速度検出1と速度検出2の2個の速度検出演算を実行する例を示す。図4において、図1と異なる部分を説明すると、選択信号設定部として、図1の速度差データ選択回路63に代えて第1のサンプル周期前に取得され記憶されたパルス情報を選択するための第1の選択信号Sel1(前回1)と、第1のサンプル周期前よりも過去の第2のサンプル周期前に取得され記憶されたパルス情報を選択するための第2の選択信号Sel2(前回2)とを設定する速度差データ選択回路83が設けられている。 FIG. 4 shows an example of executing two speed detection operations, speed detection 1 and speed detection 2. Explaining a part different from FIG. 1 in FIG. 4, the selection signal setting unit is used to select pulse information acquired and stored before the first sample cycle instead of the speed difference data selection circuit 63 of FIG. The first selection signal Self1 (previous 1) and the second selection signal Self2 (previous 2) for selecting the pulse information acquired and stored before the second sample cycle earlier than before the first sample cycle. ) And the speed difference data selection circuit 83 are provided.

また、第1の過去情報選択部として、第1の選択信号Sel1によりパルス位相バッファ61内の第1のサンプル周期前のパルス位相情報を選択する前回値1選択用セレクタ64−1と、パルス時刻バッファ62内の第1のサンプル周期前のパルス時刻情報を選択する前回値1選択用セレクタ65−1とが設けられている。 Further, as the first past information selection unit, the previous value 1 selection selector 64-1 that selects the pulse phase information before the first sample cycle in the pulse phase buffer 61 by the first selection signal Self1 and the pulse time are used. A selector 65-1 for selecting the previous value 1 for selecting the pulse time information before the first sample cycle in the buffer 62 is provided.

また、第2の過去情報選択部として、第2の選択信号Sel2によりパルス位相バッファ61内の第2のサンプル周期前のパルス位相情報を選択する前回値2選択用セレクタ64−2と、パルス時刻バッファ62内の第2のサンプル周期前のパルス時刻情報を選択する前回値2選択用セレクタ65−2とが設けられている。 Further, as the second past information selection unit, the previous value 2 selection selector 64-2 for selecting the pulse phase information before the second sample cycle in the pulse phase buffer 61 by the second selection signal Self2, and the pulse time. A selector 65-2 for selecting the previous value 2 for selecting the pulse time information before the second sample cycle in the buffer 62 is provided.

また、第1の速度検出演算部として、パルス位相バッファ61の最新パルス位相と前回値1選択用セレクタ64−1によって選択された第1のサンプル周期前のパルス位相との差分を計算する減算器66−1と、パルス時刻バッファ62の最新パルス発生時刻と前回値1選択用セレクタ65−1によって選択された第1のサンプル周期前のパルス発生時刻との差分を計算する減算器67−1と、減算器66−1の偏差出力である位相差分を、減算器67−1の偏差出力である時間差分で除算して速度検出1(第1の速度検出値)を出力する除算器68−1とが設けられている。 Further, as the first speed detection calculation unit, a subtractor that calculates the difference between the latest pulse phase of the pulse phase buffer 61 and the pulse phase before the first sample cycle selected by the previous value 1 selection selector 64-1. 66-1 and a subtractor 67-1 that calculates the difference between the latest pulse generation time of the pulse time buffer 62 and the pulse generation time before the first sample cycle selected by the previous value 1 selection selector 65-1. , The phase difference, which is the deviation output of the subtractor 66-1, is divided by the time difference, which is the deviation output of the subtractor 67-1, and the speed detection 1 (first speed detection value) is output. And are provided.

また、第2の速度検出演算部として、パルス位相バッファ61の最新パルス位相と前回値2選択用セレクタ64−2によって選択された第2のサンプル周期前のパルス位相との差分を計算する減算器66−2と、パルス時刻バッファ62の最新パルス発生時刻と前回値2選択用セレクタ65−2によって選択された第2のサンプル周期前のパルス発生時刻との差分を計算する減算器67−2と、減算器66−2の偏差出力である位相差分を、減算器67−2の偏差出力である時間差分で除算して速度検出2(第2の速度検出値)を出力する除算器68−2とが設けられている。 Further, as the second speed detection calculation unit, a subtractor that calculates the difference between the latest pulse phase of the pulse phase buffer 61 and the pulse phase before the second sample cycle selected by the previous value 2 selection selector 64-2. 66-2 and a subtractor 67-2 that calculates the difference between the latest pulse generation time of the pulse time buffer 62 and the pulse generation time before the second sample cycle selected by the previous value 2 selection selector 65-2. , The phase difference, which is the deviation output of the subtractor 66-2, is divided by the time difference, which is the deviation output of the subtractor 67-2, and the speed detection 2 (second speed detection value) is output. And are provided.

その他の部分は図1と同一に構成されている。 Other parts are configured in the same manner as in FIG.

図4の構成において、速度検出演算までの各動作は図1と同様であり、異なる速度検出期間により演算した速度検出1と速度検出2を得ることができる。 In the configuration of FIG. 4, each operation up to the speed detection calculation is the same as that of FIG. 1, and the speed detection 1 and the speed detection 2 calculated by different speed detection periods can be obtained.

このように、2種類の速度検出において異なる速度検出期間を設定しておき、それぞれの速度検出の長所を生かすことにより、発明が解決しようとする課題の欄で示した「速度検出周期が短いとジッタによる速度誤差が大きくなり、逆に長いとムダ時間が長くなって応答性能に制限が生じる」という課題を対策することができる。その対策を行った回転機の速度制御系の構成図が図5であり、本発明を一般的な比例積分(微分)制御(PI(D)制御)と呼ばれる速度制御方式に適用した例である。 In this way, by setting different speed detection periods for the two types of speed detection and making the best use of the advantages of each speed detection, the "short speed detection cycle" shown in the column of the problem to be solved by the invention It is possible to deal with the problem that the speed error due to jitter becomes large, and conversely, if it is long, the waste time becomes long and the response performance is limited. FIG. 5 shows a configuration diagram of the speed control system of the rotating machine for which the countermeasure is taken, and is an example in which the present invention is applied to a speed control method called general proportional integration (differential) control (PI (D) control). ..

図5では、CPU演算部分を枠として表現して中央に配置してあり、この枠外の左側が図1や図4のディジタル検出回路に相当し、該ディジタル検出回路内のパルスエンコーダ50以外の各回路を速度検出回路100としている。 In FIG. 5, the CPU calculation portion is represented as a frame and arranged in the center, and the left side outside the frame corresponds to the digital detection circuits of FIGS. 1 and 4, and each of the components other than the pulse encoder 50 in the digital detection circuit. The circuit is a speed detection circuit 100.

CPU演算部分のASR制御部(Automatic Speed Regulator;自動速度制御部)200は、次のように構成されている。 The ASR control unit (Automatic Speed Regulator) 200 of the CPU calculation unit is configured as follows.

速度指令発生部201は、時間に応じて回転機の目標速度を速度指令として出力し、速度制御はこれに追従する動作を行う。 The speed command generation unit 201 outputs the target speed of the rotating machine as a speed command according to the time, and the speed control performs an operation following the speed command.

速度検出演算部210は図4右側のCPU演算部分に相当し、速度検出1と速度検出2という、速度検出期間が異なる2種類の速度検出値を出力する。 The speed detection calculation unit 210 corresponds to the CPU calculation part on the right side of FIG. 4, and outputs two types of speed detection values having different speed detection periods, speed detection 1 and speed detection 2.

減算器202において速度指令と速度検出1の偏差がとられ、減算器203において速度指令と速度検出2の偏差がとられる。 The subtractor 202 takes the deviation between the speed command and the speed detection 1, and the subtractor 203 takes the deviation between the speed command and the speed detection 2.

204は減算器202の偏差出力に対して比例(微分)制御を行う比例制御項としてのP(D)制御部であり、205は減算器203の偏差出力に対して積分制御を行う積分制御項としてのI制御部である。 204 is a P (D) control unit as a proportional control term that performs proportional (differential) control with respect to the deviation output of the subtractor 202, and 205 is an integral control term that performs integral control with respect to the deviation output of the subtractor 203. I control unit as.

P(D)制御部204およびI制御部205の各出力を加算器206で加算したPI制御出力は、回転機に発生させたいトルク指令に相当する。 The PI control output obtained by adding the outputs of the P (D) control unit 204 and the I control unit 205 by the adder 206 corresponds to the torque command to be generated in the rotating machine.

300は、加算器206の出力であるトルク指令を回転機に流す電流指令に変換するトルク/電流指令変換部である。 Reference numeral 300 denotes a torque / current command conversion unit that converts a torque command, which is the output of the adder 206, into a current command to be passed through the rotating machine.

トルク/電流指令変換部300の出力は減算器400において電流検出値(実電流)との偏差がとられる。 The output of the torque / current command conversion unit 300 is deviated from the current detection value (actual current) in the subtractor 400.

ACR制御部500は、減算器400の偏差出力に対してACR制御を行って出力電圧指令を出力するものであり、前記電流指令に実電流が追従するように電流制御(ACR)する。 The ACR control unit 500 performs ACR control on the deviation output of the subtractor 400 and outputs an output voltage command, and performs current control (ACR) so that the actual current follows the current command.

上記の構成において、ASR制御部200内のPI制御は、「P制御が高速な応答性能を実現し、I制御が定常誤差などをゆっくりと補正する」という2種類の機能を組み合わせた制御方式である。したがって速度指令との偏差をとる速度検出情報もこれに対応した機能を十分に発揮できる性質を有するものを使用すればよい。 In the above configuration, the PI control in the ASR control unit 200 is a control method that combines two types of functions: "P control realizes high-speed response performance and I control slowly corrects steady-state errors". is there. Therefore, the speed detection information that takes the deviation from the speed command may also have the property of being able to fully exert the corresponding function.

そこで本実施例では、図4の速度検出1を得るための第1の選択信号Sel1を、例えば2サンプル周期前のパルス情報を選択するための選択信号に設定し、速度検出2を得るための第2の選択信号Sel2を、例えば8サンプル周期前のパルス情報を選択するための選択信号に設定しておく。これによって、速度検出1は短い検出期間を有し、速度検出2は長い検出期間を有することになる。 Therefore, in this embodiment, the first selection signal Self1 for obtaining the speed detection 1 in FIG. 4 is set as, for example, a selection signal for selecting pulse information two sample cycles before, and the speed detection 2 is obtained. The second selection signal Self2 is set as, for example, a selection signal for selecting pulse information before the 8 sample cycle. As a result, the velocity detection 1 has a short detection period, and the velocity detection 2 has a long detection period.

図5のASR制御部200における比例制御(P(D)制御部204)は応答性の性能に影響するので、速度検出1の検出期間が短い情報を使用してムダ時間を少なくし、比例項の制御ゲインをできるだけ高く設定して応答性能を高める。 Since the proportional control (P (D) control unit 204) in the ASR control unit 200 of FIG. 5 affects the responsiveness performance, the information with a short detection period of the speed detection 1 is used to reduce the waste time and the proportional term. Set the control gain of to as high as possible to improve the response performance.

一方で、積分項の時定数は機械の慣性モーメントにより決まる値であり、通常は速度検出周期よりも長いことが多い。そこで、積分項(I制御部205)の速度検出には、ムダ時間の大きな信号を用いても悪影響は少ないことを利用して、速度検出2の計測時間が長い(ムダ時間は大きいが精度が良い)情報を使用する。 On the other hand, the time constant of the integration term is a value determined by the moment of inertia of the machine, and is usually longer than the velocity detection period. Therefore, for the speed detection of the integration term (I control unit 205), the measurement time of the speed detection 2 is long (the waste time is large, but the accuracy is high) by utilizing the fact that even if a signal having a large waste time is used, there is little adverse effect. Use information (good).

このように、2種類の速度検出が有している特長が発揮できるように、制御項によって使用する速度情報を使い分けることにより、「速度制御精度と応答性能」とを両立する制御系を構築することができる。 In this way, a control system that achieves both "speed control accuracy and response performance" is constructed by properly using the speed information used according to the control term so that the features of the two types of speed detection can be exhibited. be able to.

実施例2の図4および図5では、2種類の速度検出を組み合わせたPI制御方式を提示したが、速度指令については共通な最新の速度指令を使用している。しかし速度と時間の関係を示す図6のように、一定加速度で加速している場合を考えると、速度検出2のように速度検出時間を長く設定するとムダ時間も長くなってしまうため、変化している速度指令(実線)に対して速度検出(破線)の追従遅れが大きくなる。 In FIGS. 4 and 5 of the second embodiment, a PI control method combining two types of speed detection is presented, but the latest common speed command is used for the speed command. However, considering the case of accelerating at a constant acceleration as shown in FIG. 6 showing the relationship between speed and time, if the speed detection time is set long as in speed detection 2, the waste time also becomes long, so the change changes. The follow-up delay of speed detection (broken line) becomes large with respect to the speed command (solid line).

この追従遅れ成分はI制御(205)内に蓄積されてしまい、加速中に網塗り部分が積算されることになる。次に速度指令が一定速度に移行すると、積算した積分項を吐き出す必要があるために、一定な速度指令よりも斜線部のようにオーバーシュートする。実施例3では、この加減速後のオーバーシュートを抑制する対策を行う。具体的には、実施例2のようにPI制御のうち積分(I)制御側の速度検出を速度検出2としておき、さらに積分制御の速度指令にも改善を加えるものである。 This follow-up delay component is accumulated in the I control (205), and the meshed portion is integrated during acceleration. Next, when the speed command shifts to a constant speed, it is necessary to spit out the integrated integral term, so that the speed command overshoots like a shaded area rather than the constant speed command. In the third embodiment, measures are taken to suppress the overshoot after acceleration / deceleration. Specifically, as in the second embodiment, the speed detection on the integral (I) control side of the PI control is set as the speed detection 2, and the speed command of the integral control is also improved.

速度指令の修正方法の構成例を図7に示す。図7において図4と異なる部分を説明すると、まず速度指令をディジタル回路内のフリップフロップ90(DEN−ff)に書き込み、フリップフロップ90の出力にディジタル回路のクロック周期Tcを乗算器91で乗算する。 FIG. 7 shows a configuration example of a method for correcting the speed command. Explaining the part different from FIG. 4 in FIG. 7, first, the speed command is written to the flip-flop 90 (DEN-ff) in the digital circuit, and the clock period Tc of the digital circuit is multiplied by the multiplier 91 to the output of the flip-flop 90. ..

乗算器91の出力(位相成分)は、位相の前回値θref_clk(位相指令積算器93のQ出力)と位相の増分(乗算器91の出力)を加算する加算器92と、D型フリップフロップで構成される位相指令積算器93と、OR回路52の出力をイネーブル信号とするフリップフロップ回路94とから成る積分回路(速度指令/位相指令変換回路)に投入され、フリップフロップ回路94のQ出力には速度指令を時間積分した位相指令θrefが得られる。このため、前記積分回路は模擬的な回転位相指令発生器とみなすことができる。 The output (phase component) of the multiplier 91 is an adder 92 that adds the previous value θref_clk of the phase (Q output of the phase command integrator 93) and the increment of the phase (output of the multiplier 91), and a D-type flip-flop. It is input to an integrator circuit (speed command / phase command conversion circuit) including a phase command multiplier 93 to be configured and a flip-flop circuit 94 whose enable signal is the output of the OR circuit 52, and is used as the Q output of the flip-flop circuit 94. Obtains a phase command θref obtained by time-integrating the speed command. Therefore, the integrating circuit can be regarded as a simulated rotation phase command generator.

58dは前記位相指令θrefをラッチするラッチ回路(Dff4)(位相指令読み出し用バッファ)であり、パルス位相アップダウンカウンタ53の出力をラッチするラッチ回路58bと同様に割込信号Smpl(m)をイネーブル信号としている。 Reference numeral 58d is a latch circuit (Dff4) (buffer for reading the phase command) that latches the phase command θref, and enables the interrupt signal Smpl (m) in the same manner as the latch circuit 58b that latches the output of the pulse phase up / down counter 53. It is a signal.

95は、ラッチ回路58dのQ出力(位相指令)を読み出して多段にスタックする位相指令バッファ(Buff4)であり、速度検出側の例えばパルス位相バッファ61と同様に最新情報記憶用バッファおよびn段(nは整数)の過去情報記憶用バッファとで構成されている。 Reference numeral 95 denotes a phase command buffer (Buff 4) that reads out the Q output (phase command) of the latch circuit 58d and stacks them in multiple stages. Like the pulse phase buffer 61 on the speed detection side, the latest information storage buffer and n stages (Buff 4). n is an integer) and is composed of a buffer for storing past information.

96は、速度差データ選択回路83から出力される第2の選択信号Sel2によって指定された段の、位相指令バッファ95の過去情報記憶用バッファ内の第2のサンプル周期前の位相指令を選択する位相指令選択用セレクタ(第3の過去情報選択部)である。 96 selects the phase command before the second sample cycle in the past information storage buffer of the phase command buffer 95 at the stage specified by the second selection signal Self2 output from the speed difference data selection circuit 83. This is a phase command selection selector (third past information selection unit).

尚、位相指令バッファ95は例えば図2と同様の多段バッファで構成される。 The phase command buffer 95 is composed of, for example, a multi-stage buffer similar to that shown in FIG.

97は、位相指令バッファ95の最新情報記憶用バッファ内の最新位相指令と、前記位相指令選択用セレクタ96によって選択された第2のサンプル周期前の位相指令との差分を計算する減算器である。 Reference numeral 97 denotes a subtractor for calculating the difference between the latest phase command in the latest information storage buffer of the phase command buffer 95 and the phase command before the second sample cycle selected by the phase command selection selector 96. ..

98は、減算器97の出力である位相指令差分を、減算器67−2の出力である時間差分で除算して平均化速度指令を出力する除算器である。 Reference numeral 98 denotes a divider that outputs an averaging speed command by dividing the phase command difference, which is the output of the subtractor 97, by the time difference, which is the output of the subtractor 67-2.

尚、ラッチ回路58d、位相指令バッファ95、位相指令選択用セレクタ96、減算器97および除算器98によって、本発明の平均化速度指令演算部を構成している。 The latch circuit 58d, the phase command buffer 95, the phase command selection selector 96, the subtractor 97, and the divider 98 constitute the averaging speed command calculation unit of the present invention.

その他の部分は図4と同一に構成されている。 Other parts are configured in the same manner as in FIG.

図7のように構成された装置を、図5と同様の速度制御系に適用した構成例を図8に示す。図8のASR制御部200’内の220は図7の速度検出演算部および平均化速度指令演算部を表している。 FIG. 8 shows a configuration example in which the device configured as shown in FIG. 7 is applied to the same speed control system as in FIG. 220 in the ASR control unit 200'in FIG. 8 represents the speed detection calculation unit and the averaging speed command calculation unit in FIG.

図8においてI制御部205は、減算器213の出力である平均化速度指令と速度検出2の偏差分に対して積分制御を行うものであり、その他の部分は図5と同様に構成されている。 In FIG. 8, the I control unit 205 performs integral control for the deviation between the averaging speed command and the speed detection 2 which are the outputs of the subtractor 213, and the other parts are configured in the same manner as in FIG. There is.

本実施例3では、実施例2に対して、さらに速度指令を積分演算することにより位相指令に変換し、これから元の速度情報に戻す際に、速度検出2と同期した時刻でラッチさせた位相指令バッファ95の情報を使用して平均化速度指令を計算するようにしたので、速度と時間の関係を示す図9のように、細い実線の速度指令が加速中においても、太い実線の平均化速度指令が破線の速度検出2の時間遅れとほぼ同じ程度の遅れ時間を有するようになる。 In the third embodiment, the speed command is converted into a phase command by further integrating the speed command with respect to the second embodiment, and when returning to the original speed information from now on, the phase latched at the time synchronized with the speed detection 2. Since the averaging speed command is calculated using the information in the command buffer 95, the thick solid line is averaged even when the thin solid line speed command is accelerating as shown in FIG. 9 showing the relationship between speed and time. The speed command will have a delay time approximately the same as the time delay of the speed detection 2 of the broken line.

その結果、積分(I)制御を、この平均化速度指令と速度検出2との差分で演算するように変更することにより、加速中において検出時間遅れ成分がI制御部205の積分器に積算される量が抑制され、一定速度に移行した際のオーバーシュート量を抑制することができる。この、平均化速度指令に遅延を挿入するのは、実施例2と同様に、「積分項の時定数は機械の慣性モーメントにより決まる値であり、通常は速度検出周期よりも長いことが多い」ことを利用するものである。 As a result, by changing the integration (I) control so as to calculate by the difference between the averaging speed command and the speed detection 2, the detection time delay component is integrated in the integrator of the I control unit 205 during acceleration. The amount of overshoot can be suppressed, and the amount of overshoot when shifting to a constant speed can be suppressed. Inserting a delay into this averaging speed command is the same as in Example 2, "the time constant of the integration term is a value determined by the moment of inertia of the machine, and is usually longer than the speed detection cycle." It is something that makes use of that.

ジッタを含むパルスエンコーダでは、検出速度にオフセット誤差が生じるのを抑制するために、例えば実施例2のように積分制御に使用する速度検出の検出期間を長くすると、増加した時間遅れ成分により加減速状態にて積分項に蓄積される値が大きくなり、一定速度に移行した際のオーバーシュートが大きくなる。これに対し実施例3では速度検出とほぼ同等な遅れ時間を有する速度指令、すなわち「平均化速度指令」を生成し、速度検出との差分をとるようにしたので、図9で述べたように加減速後の速度のオーバーシュート量を小さくすることができる。すなわち、速度制御の精度が向上される。 In a pulse encoder containing jitter, in order to suppress the occurrence of an offset error in the detection speed, if the detection period of speed detection used for integration control is lengthened as in Example 2, acceleration / deceleration due to the increased time delay component. The value accumulated in the integral term increases in the state, and the overshoot when shifting to a constant speed increases. On the other hand, in the third embodiment, a speed command having a delay time almost equal to that of the speed detection, that is, an "averaged speed command" is generated so as to take a difference from the speed detection. Therefore, as described in FIG. The amount of overshoot of the speed after acceleration / deceleration can be reduced. That is, the accuracy of speed control is improved.

50…パルスエンコーダ
51…波形整形回路
52…OR回路
53…パルス位相アップダウンカウンタ
54…タイマ回路
55…D型フリップフロップ
56…パルス発生時刻計測回路
57,94…フリップフロップ回路
58…読み出し用バッファ
58a〜58d,72−0〜72−5…ラッチ回路
61…パルス位相バッファ
62…パルス時刻バッファ
63,83…速度差データ選択回路
64,65,73…前回値選択用セレクタ
64−1,65−1…前回値1選択用セレクタ
64−2,65−2…前回値2選択用セレクタ
66,66−1,66−2,67,67−1,67−2,97,202,203,213,400…減算器
71…AND回路
68,68−1,68−2,98…除算器
91…乗算器
93…位相指令積算器
95…位相指令バッファ
100…速度検出回路
200,200’…ASR制御部
201…速度指令発生部
204…P(D)制御部
205…I制御部
300…トルク/電流指令変換部
500…ACR制御部
50 ... Pulse encoder 51 ... Waveform shaping circuit 52 ... OR circuit 53 ... Pulse phase up / down counter 54 ... Timer circuit 55 ... D-type flip-flop 56 ... Pulse generation time measurement circuit 57, 94 ... Flip-flop circuit 58 ... Read buffer 58a ~ 58d, 72-0 to 72-5 ... Latch circuit 61 ... Pulse phase buffer 62 ... Pulse time buffer 63, 83 ... Speed difference data selection circuit 64, 65, 73 ... Previous value selection selector 64-1, 65-1 … Selector for selection of previous value 1 64-2, 65-2… Selector for selection of previous value 2 66,66-1,66-2,67,67-1,67-2,97,202,203,213,400 ... Subtractor 71 ... AND circuit 68, 68-1, 68-2, 98 ... Divider 91 ... Multiplier 93 ... Phase command integrator 95 ... Phase command buffer 100 ... Speed detection circuit 200, 200'... ASR control unit 201 ... Speed command generator 204 ... P (D) control unit 205 ... I control unit 300 ... Torque / current command conversion unit 500 ... ACR control unit

Claims (5)

回転機の回転速度を検出する速度検出装置であって、
回転機の回転角度を検出するパルスエンコーダの出力パルスに基づいて、設定したサンプル周期毎に、パルス有無情報、パルス位相情報およびパルス発生時刻情報を取得するパルス情報取得部と、
前記サンプル周期毎に取得された前記パルス位相情報を各々記憶するパルス位相バッファと、
前記サンプル周期毎に取得された前記パルス発生時刻情報を各々記憶するパルス時刻バッファと、
複数サンプル周期前に取得され記憶されたパルス情報を選択するための選択信号を設定する選択信号設定部と、
前記選択信号設定部で設定された選択信号によって、前記パルス位相バッファ内の複数サンプル周期前のパルス位相情報を選択し、前記パルス時刻バッファ内の複数サンプル周期前のパルス発生時刻情報を選択する過去情報選択部と、
前記パルス位相バッファ内の最新パルス位相と前記過去情報選択部によって選択された複数サンプル周期前のパルス位相との差分と、前記パルス時刻バッファ内の最新パルス発生時刻と前記過去情報選択部によって選択された複数サンプル周期前のパルス発生時刻との差分に基づいて速度検出値を演算する速度検出演算部と、を備え、
前記パルス情報取得部は、
前記パルスエンコーダからの出力パルスを波形整形してパルスの立上り、立下りの各エッジを検出する波形整形回路と、
前記波形整形回路で検出されたパルスの立上りエッジ、立下りエッジによりアップ/ダウンカウントを行い、カウント値をパルス位相値として出力するパルス位相アップダウンカウンタと、
基準クロックをカウントして時刻データを出力し、固定値に設定されたサンプル周期毎に割込信号を出力するタイマ回路と、
前記波形整形回路からパルスの各エッジの検出信号が入力されたときの前記タイマ回路の時刻データを記憶保持し、パルス発生時刻として出力するパルス発生時刻計測回路と、
前記波形整形回路からのパルスの各エッジの検出信号によりセットされ、前記タイマ回路からの割込信号によりリセットされ、該割込信号の発生周期の間にパルスが発生したか否かを示すパルス有無信号を出力するフリップフロップ回路と、
前記タイマ回路からの割込信号をイネーブル信号として、前記パルス位相アップダウンカウンタから送出されるパルス位相値、前記パルス発生時刻計測回路から送出されるパルス発生時刻および前記フリップフロップ回路から送出されるパルス有無信号を各々保持する読み出し用バッファと、を備え、
前記パルス位相バッファおよびパルス時刻バッファは、前記タイマ回路からの割込信号および前記読み出し用バッファからのパルス有無信号の論理積信号をイネーブル信号として、前記読み出し用バッファのパルス位相値およびパルス発生時刻を読み出して記憶する、最新情報記憶用バッファとn段(nは整数)の過去情報記憶用バッファとで各々構成され、
前記選択信号設定部の選択信号は、前記n段の過去情報記憶用バッファのうちいずれかの段のバッファを指定する信号に設定され、
前記過去情報選択部は、前記n段の過去情報記憶用バッファのうち前記選択信号設定部の選択信号で指定された段のバッファの情報を選択する、
ことを特徴とする速度検出装置。
A speed detection device that detects the rotation speed of a rotating machine.
A pulse information acquisition unit that acquires pulse presence / absence information, pulse phase information, and pulse generation time information for each set sample period based on the output pulse of the pulse encoder that detects the rotation angle of the rotating machine.
A pulse phase buffer that stores the pulse phase information acquired for each sample cycle, and a pulse phase buffer.
A pulse time buffer that stores the pulse generation time information acquired for each sample cycle, and a pulse time buffer.
A selection signal setting unit that sets a selection signal for selecting pulse information acquired and stored before a plurality of sample cycles, and a selection signal setting unit.
In the past, the pulse phase information before the plurality of sample cycles in the pulse phase buffer is selected by the selection signal set by the selection signal setting unit, and the pulse generation time information before the plurality of sample cycles in the pulse time buffer is selected. Information selection section and
The difference between the latest pulse phase in the pulse phase buffer and the pulse phase before a plurality of sample cycles selected by the past information selection unit, the latest pulse generation time in the pulse time buffer, and the past information selection unit are selected. It is equipped with a speed detection calculation unit that calculates the speed detection value based on the difference from the pulse generation time before a plurality of sample cycles .
The pulse information acquisition unit
A waveform shaping circuit that shapes the output pulse from the pulse encoder to detect the rising and falling edges of the pulse, and
A pulse phase up / down counter that counts up / down by the rising and falling edges of the pulse detected by the waveform shaping circuit and outputs the count value as the pulse phase value.
A timer circuit that counts the reference clock, outputs time data, and outputs an interrupt signal for each sample cycle set to a fixed value .
A pulse generation time measurement circuit that stores and retains the time data of the timer circuit when a detection signal for each edge of the pulse is input from the waveform shaping circuit and outputs the pulse generation time.
The presence or absence of a pulse that is set by the detection signal of each edge of the pulse from the waveform shaping circuit, reset by the interrupt signal from the timer circuit, and indicates whether or not the pulse is generated during the generation cycle of the interrupt signal. A flip-flop circuit that outputs a signal and
With the interrupt signal from the timer circuit as an enable signal, the pulse phase value sent from the pulse phase up / down counter, the pulse generation time sent from the pulse generation time measurement circuit, and the pulse sent from the flip-flop circuit. It is equipped with a read buffer that holds each presence / absence signal.
The pulse phase buffer and the pulse time buffer use the logical product signal of the interrupt signal from the timer circuit and the pulse presence / absence signal from the read buffer as an enable signal, and set the pulse phase value and the pulse generation time of the read buffer as enable signals. It is composed of a buffer for storing the latest information and a buffer for storing past information in n stages (n is an integer) that are read and stored.
The selection signal of the selection signal setting unit is set to a signal that specifies a buffer of any one of the n-stage past information storage buffers.
The past information selection unit selects the information of the buffer of the stage designated by the selection signal of the selection signal setting unit from the n stages of the past information storage buffer.
A speed detector characterized by the fact that.
前記選択信号設定部は、
第1のサンプル周期前に取得され記憶されたパルス情報を選択するための第1の選択信号と、前記第1のサンプル周期前よりも過去の第2のサンプル周期前に取得され記憶されたパルス情報を選択するための第2の選択信号とを設定し、
前記過去情報選択部は、
前記第1の選択信号によって、前記パルス位相バッファ内の第1のサンプル周期前のパルス位相情報および前記パルス時刻バッファ内の第1のサンプル周期前のパルス時刻情報を選択する第1の過去情報選択部と、
前記第2の選択信号によって、前記パルス位相バッファ内の第2のサンプル周期前のパルス位相情報および前記パルス時刻バッファ内の第2のサンプル周期前のパルス時刻情報を選択する第2の過去情報選択部とを有し、
前記速度検出演算部は、
前記パルス位相バッファ内の最新パルス位相と前記第1の過去情報選択部によって選択された第1のサンプル周期前のパルス位相との差分と、前記パルス時刻バッファ内の最新パルス発生時刻と前記第1の過去情報選択部によって選択された第1のサンプル周期前のパルス発生時刻との差分に基づいて第1の速度検出値を演算する第1の速度検出演算部と、
前記パルス位相バッファ内の最新パルス位相と前記第2の過去情報選択部によって選択された第2のサンプル周期前のパルス位相との差分と、前記パルス時刻バッファ内の最新パルス発生時刻と前記第2の過去情報選択部によって選択された第2のサンプル周期前のパルス発生時刻との差分に基づいて第2の速度検出値を演算する第2の速度検出演算部とを有している
ことを特徴とする請求項1に記載の速度検出装置。
The selection signal setting unit
A first selection signal for selecting pulse information acquired and stored before the first sample cycle, and a pulse acquired and stored before a second sample cycle earlier than before the first sample cycle. Set with a second selection signal for selecting information,
The past information selection unit
First past information selection that selects the pulse phase information before the first sample cycle in the pulse phase buffer and the pulse time information before the first sample cycle in the pulse time buffer by the first selection signal. Department and
A second past information selection that selects the pulse phase information before the second sample cycle in the pulse phase buffer and the pulse time information before the second sample cycle in the pulse time buffer by the second selection signal. Has a part and
The speed detection calculation unit
The difference between the latest pulse phase in the pulse phase buffer and the pulse phase before the first sample cycle selected by the first past information selection unit, the latest pulse generation time in the pulse time buffer, and the first The first speed detection calculation unit that calculates the first speed detection value based on the difference from the pulse generation time before the first sample cycle selected by the past information selection unit of
The difference between the latest pulse phase in the pulse phase buffer and the pulse phase before the second sample cycle selected by the second past information selection unit, the latest pulse generation time in the pulse time buffer, and the second. It is characterized by having a second speed detection calculation unit that calculates a second speed detection value based on the difference from the pulse generation time before the second sample cycle selected by the past information selection unit of. The speed detection device according to claim 1.
前記選択信号設定部は、
第1のサンプル周期前に取得され記憶された、前記n段の過去情報記憶用バッファのうち何れかの段を指定する第1の選択信号と、前記第1のサンプル周期前よりも過去の第2のサンプル周期前に取得され記憶された、前記n段の過去情報記憶用バッファのうち何れかの段を指定する第2の選択信号とを設定し、
前記過去情報選択部は、
前記第1の選択信号によって指定された段の、前記パルス位相バッファの過去情報記憶用バッファ内の第1のサンプル周期前のパルス位相情報および前記パルス時刻バッファの過去情報記憶用バッファ内の第1のサンプル周期前のパルス時刻情報を選択する第1の過去情報選択部と、
前記第2の選択信号によって指定された段の、前記パルス位相バッファの過去情報記憶用バッファ内の第2のサンプル周期前のパルス位相情報および前記パルス時刻バッファの過去情報記憶用バッファ内の第2のサンプル周期前のパルス時刻情報を選択する第2の過去情報選択部とを有し、
前記速度検出演算部は、
前記パルス位相バッファの最新情報記憶用バッファ内の最新パルス位相と前記第1の過去情報選択部によって選択された第1のサンプル周期前のパルス位相との差分と、前記パルス時刻バッファの最新情報記憶用バッファ内の最新パルス発生時刻と前記第1の過去情報選択部によって選択された第1のサンプル周期前のパルス発生時刻との差分に基づいて第1の速度検出値を演算する第1の速度検出演算部と、
前記パルス位相バッファの最新情報記憶用バッファ内の最新パルス位相と前記第2の過去情報選択部によって選択された第2のサンプル周期前のパルス位相との差分と、前記パルス時刻バッファの最新情報記憶用バッファ内の最新パルス発生時刻と前記第2の過去情報選択部によって選択された第2のサンプル周期前のパルス発生時刻との差分に基づいて第2の速度検出値を演算する第2の速度検出演算部とを有している
ことを特徴とする請求項1に記載の速度検出装置。
The selection signal setting unit
The first selection signal that specifies any stage of the n-stage past information storage buffer acquired and stored before the first sample cycle, and the first selection signal that is earlier than before the first sample cycle. A second selection signal for designating any of the n stages of the past information storage buffer acquired and stored before the sample cycle of 2 is set.
The past information selection unit
The pulse phase information before the first sample cycle in the past information storage buffer of the pulse phase buffer and the first in the past information storage buffer of the pulse time buffer of the stage designated by the first selection signal. The first past information selection unit that selects the pulse time information before the sample cycle of
The pulse phase information before the second sample cycle in the past information storage buffer of the pulse phase buffer and the second in the past information storage buffer of the pulse time buffer of the stage specified by the second selection signal. It has a second past information selection unit that selects pulse time information before the sample cycle of
The speed detection calculation unit
The difference between the latest pulse phase in the latest information storage buffer of the pulse phase buffer and the pulse phase before the first sample cycle selected by the first past information selection unit, and the latest information storage of the pulse time buffer. The first speed for calculating the first speed detection value based on the difference between the latest pulse generation time in the buffer and the pulse generation time before the first sample cycle selected by the first past information selection unit. Detection calculation unit and
The difference between the latest pulse phase in the latest information storage buffer of the pulse phase buffer and the pulse phase before the second sample cycle selected by the second past information selection unit, and the latest information storage of the pulse time buffer. The second speed for calculating the second speed detection value based on the difference between the latest pulse generation time in the buffer and the pulse generation time before the second sample cycle selected by the second past information selection unit. The speed detection device according to claim 1 , further comprising a detection calculation unit.
回転機の速度指令と回転機の速度検出値の偏差に対して比例制御を行う比例制御項と、回転機の速度指令と回転機の速度検出値の偏差に対して積分制御を行う積分制御項とを有して、回転機の速度制御を行う速度制御システムであって、
請求項2又は3に記載の速度検出装置を備え、
前記比例制御項における回転機の速度検出値として、前記速度検出装置の第1の速度検出演算部で演算された第1の速度検出値を用い、
前記積分制御項における回転機の速度検出値として、前記速度検出装置の第2の速度検出演算部で演算された第2の速度検出値を用いる、
ことを特徴とする速度制御システム。
A proportional control term that performs proportional control for the deviation between the speed command of the rotating machine and the speed detection value of the rotating machine, and an integral control term that performs integral control for the deviation between the speed command of the rotating machine and the speed detection value of the rotating machine. It is a speed control system that controls the speed of the rotating machine.
The speed detection device according to claim 2 or 3 is provided.
As the speed detection value of the rotating machine in the proportional control term, the first speed detection value calculated by the first speed detection calculation unit of the speed detection device is used.
As the speed detection value of the rotating machine in the integration control term, the second speed detection value calculated by the second speed detection calculation unit of the speed detection device is used.
A speed control system characterized by that.
回転機の速度指令と回転機の速度検出値の偏差に対して比例制御を行う比例制御項と、回転機の速度指令と回転機の速度検出値の偏差に対して積分制御を行う積分制御項とを有して、回転機の速度制御を行う速度制御システムであって、
請求項3に記載の速度検出装置を備え、
回転機の速度指令を時間積分して位相指令を求める速度指令/位相指令変換回路を設け、
前記速度検出装置のタイマ回路からの割込信号をイネーブル信号として、前記速度指令/位相指令変換回路で求められた位相指令を保持する位相指令読み出し用バッファと、
最新情報記憶用バッファおよびn段(nは整数)の過去情報記憶用バッファとで構成され、前記速度検出装置の読み出し用バッファからのパルス有無信号をイネーブル信号として、前記位相指令読み出し用バッファ内の位相指令を読み出して記憶する位相指令バッファと、
前記速度検出装置の選択信号設定部で設定された第2の選択信号によって指定された段の、前記位相指令バッファの過去情報記憶用バッファ内の第2のサンプル周期前の位相指令を選択する第3の過去情報選択部と、
前記位相指令バッファの最新情報記憶用バッファ内の最新位相指令と前記第3の過去情報選択部によって選択された第2のサンプル周期前の位相指令との差分を、前記速度検出装置の第2の速度検出演算部における最新パルス発生時刻と第2のサンプル周期前のパルス発生時刻との差分で除算する演算回路とによって、
平均化速度指令を求める平均化速度指令演算部をさらに設け、
前記積分制御項における回転機の速度指令として、前記平均化速度指令演算部で求められた平均化速度指令を用い、
前記比例制御項における回転機の速度検出値として、前記速度検出装置の第1の速度検出演算部で演算された第1の速度検出値を用い、
前記積分制御項における回転機の速度検出値として、前記速度検出装置の第2の速度検出演算部で演算された第2の速度検出値を用いる
ことを特徴とする速度制御システム。
A proportional control term that performs proportional control for the deviation between the speed command of the rotating machine and the speed detection value of the rotating machine, and an integral control term that performs integral control for the deviation between the speed command of the rotating machine and the speed detection value of the rotating machine. It is a speed control system that controls the speed of the rotating machine.
The speed detection device according to claim 3 is provided.
A speed command / phase command conversion circuit is provided to obtain the phase command by time-integrating the speed command of the rotating machine.
A buffer for reading out the phase command, which holds the phase command obtained by the speed command / phase command conversion circuit, with the interrupt signal from the timer circuit of the speed detection device as the enable signal.
It is composed of a buffer for storing the latest information and a buffer for storing past information in n stages (n is an integer), and a pulse presence / absence signal from the read buffer of the speed detection device is used as an enable signal in the phase command read buffer. A phase command buffer that reads and stores phase commands,
The first phase command before the second sample cycle in the past information storage buffer of the phase command buffer of the stage designated by the second selection signal set by the selection signal setting unit of the speed detection device is selected. 3 past information selection section and
The difference between the latest phase command in the latest information storage buffer of the phase command buffer and the phase command before the second sample cycle selected by the third past information selection unit is determined by the second speed detection device. By the calculation circuit that divides by the difference between the latest pulse generation time and the pulse generation time before the second sample cycle in the speed detection calculation unit.
An averaging speed command calculation unit for obtaining the averaging speed command is further provided.
As the speed command of the rotating machine in the integration control term, the averaging speed command obtained by the averaging speed command calculation unit is used.
As the speed detection value of the rotating machine in the proportional control term, the first speed detection value calculated by the first speed detection calculation unit of the speed detection device is used.
A speed control system characterized in that a second speed detection value calculated by a second speed detection calculation unit of the speed detection device is used as the speed detection value of the rotating machine in the integration control term.
JP2016155197A 2016-08-08 2016-08-08 Speed detector and speed control system Active JP6825260B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016155197A JP6825260B2 (en) 2016-08-08 2016-08-08 Speed detector and speed control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016155197A JP6825260B2 (en) 2016-08-08 2016-08-08 Speed detector and speed control system

Publications (2)

Publication Number Publication Date
JP2018025391A JP2018025391A (en) 2018-02-15
JP6825260B2 true JP6825260B2 (en) 2021-02-03

Family

ID=61194534

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016155197A Active JP6825260B2 (en) 2016-08-08 2016-08-08 Speed detector and speed control system

Country Status (1)

Country Link
JP (1) JP6825260B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7327222B2 (en) * 2020-03-12 2023-08-16 株式会社明電舎 SPEED DETECTION DEVICE AND SPEED DETECTION METHOD
JP2023070856A (en) 2021-11-10 2023-05-22 オムロン株式会社 Control device, control system, and processing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4885710A (en) * 1987-06-25 1989-12-05 Delco Electronics Corporation Method and apparatus for low speed estimation
JP3173174B2 (en) * 1992-10-06 2001-06-04 株式会社明電舎 Speed detector
JP2010008235A (en) * 2008-06-27 2010-01-14 Fuji Electric Systems Co Ltd Speed detection device

Also Published As

Publication number Publication date
JP2018025391A (en) 2018-02-15

Similar Documents

Publication Publication Date Title
JP3015747B2 (en) Encoder interpolation circuit
CN108959183B (en) Forward interpolation method for angle sensor and rotary encoder
US9599453B2 (en) Device and method for processing signals which represent an angular position of a motor shaft
JP6438441B2 (en) Encoder signal processing apparatus, encoder, signal processing method, and program
JP6825260B2 (en) Speed detector and speed control system
CN106092148B (en) Counter-based circuit for measuring movement of an object
US20150331006A1 (en) Velocity Measurement Device and Velocity Measurement Method
US20180188282A1 (en) Method and device for measuring speed of permanent magnet synchronous motor
EP2177917B1 (en) Velocity detection method and motor control device using the method
JP4253372B2 (en) Elevator speed control apparatus and recording medium recording elevator speed detection program
JP6740795B2 (en) Speed control system
JPH06118090A (en) Speed detector
US6999006B2 (en) Rotation position detecting device
JPH061279B2 (en) Digital speed detector
JP6000652B2 (en) Pulse motor control device and pulse signal generation method
JP5727758B2 (en) Motor control circuit
JPH11241927A (en) Position detecting device
JP6101117B2 (en) Pulse motor control device
JP2010074637A (en) Up/down counter device
JP5664895B2 (en) Electric motor control device
JP2002311040A (en) Speed detector
JP3067729B2 (en) Encoder signal processing method and device
EP3876162A1 (en) Learning method, learning system, and learning program
JP7468511B2 (en) Motor control device
JP3015751B2 (en) Encoder interpolation circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190719

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200604

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200707

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200824

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20201215

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201228

R150 Certificate of patent or registration of utility model

Ref document number: 6825260

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150