Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4289983B2 - Phase velocity detector - Google Patents
[go: Go Back, main page]

JP4289983B2 - Phase velocity detector - Google Patents

Phase velocity detector Download PDF

Info

Publication number
JP4289983B2
JP4289983B2 JP2003391706A JP2003391706A JP4289983B2 JP 4289983 B2 JP4289983 B2 JP 4289983B2 JP 2003391706 A JP2003391706 A JP 2003391706A JP 2003391706 A JP2003391706 A JP 2003391706A JP 4289983 B2 JP4289983 B2 JP 4289983B2
Authority
JP
Japan
Prior art keywords
phase
pulse
signal
digital value
phase signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2003391706A
Other languages
Japanese (ja)
Other versions
JP2005156208A (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.)
Toyo Electric Manufacturing Ltd
Original Assignee
Toyo Electric Manufacturing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyo Electric Manufacturing Ltd filed Critical Toyo Electric Manufacturing Ltd
Priority to JP2003391706A priority Critical patent/JP4289983B2/en
Publication of JP2005156208A publication Critical patent/JP2005156208A/en
Application granted granted Critical
Publication of JP4289983B2 publication Critical patent/JP4289983B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Description

本発明はシャフトレス輪転印刷機や工作機械などの高精度が要求される複数の電動機の同期制御や位置決め制御に関し、特に、電動機が停止中や低速回転中だけでなく高速回転中においても電動機の位相や速度を超高精度で検出する装置に関するものである。   The present invention relates to synchronous control and positioning control of a plurality of electric motors that require high accuracy such as a shaftless rotary printing machine and a machine tool, and in particular, not only when the motor is stopped or during low-speed rotation but also during high-speed rotation. The present invention relates to an apparatus for detecting phase and speed with extremely high accuracy.

複数の電動機間の高精度な同期制御を行うシャフトレス輪転印刷機や精密な位置決めを行う工作機械などにおいては、電動機もしくは出力軸の位相や速度を精度良く検出しなければならず、その為に精度の良いロータリーエンコーダが必要であるが、従来このロータリーエンコーダはアブソリュートエンコーダやインクリメントエンコーダが使用されている。   For shaftless rotary printing machines that perform high-precision synchronous control between multiple motors and machine tools that perform precise positioning, the phase and speed of the motor or output shaft must be detected with high accuracy. A rotary encoder with high precision is required, but this rotary encoder conventionally uses an absolute encoder or an increment encoder.

そして、アブソリュートエンコーダを使用して位相の検出精度を向上させる為に、アブソリュートのデジタル信号の他にこれを補間するアナログ信号も具備するアブソリュートエンコーダが従来考案されている(例えば、特許文献1参照)。
しかし、かような改善が行われているが依然としてデジタル信号も使用するもので、デジタル信号の桁数分のトラックやセンサーをアブソリュートエンコーダに内蔵させ、外部においては多数の信号線を準備する必要がある。又、通常アブソリュートエンコーダは、制御装置側から位相の読み込みを指令した後、実際に位相データを獲得するまでに時間を要することもあり、特に高速で運転中の回転体の位相を短時間で検出することは困難もしくは不可能であった。
In order to improve the detection accuracy of the phase using an absolute encoder, an absolute encoder having an analog signal for interpolating the absolute digital signal in addition to the absolute digital signal has been conventionally devised (see, for example, Patent Document 1). .
However, although such improvements have been made, digital signals are still used, and it is necessary to incorporate tracks and sensors for the number of digits of the digital signal in the absolute encoder and to prepare a large number of signal lines outside. is there. Ordinarily, an absolute encoder may take time to actually acquire phase data after instructing the phase reading from the control device side, and in particular, it detects the phase of a rotating body that is operating at high speed in a short time. It was difficult or impossible to do.

一方、インクリメンタルエンコーダでは、回転に応じて複数のサイクルを発生し、90°の位相差を有する2相の矩形波であるA相とB相出力と1回転を識別するZ相出力を有するものがあり(以下、矩形波インクリメンタルエンコーダと称す)、前記A相とB相出力の矩形波の立ち上がり又は立ち下がりを制御装置側の位相カウンタで計数し、前記Z相により該位相カウンタをゼロにリセットすることにより回転位相を求めることが従来実施されている(例えば、特許文献2参照)。
この方法では、前記のカウンタで矩形波のエッジを計数するだけなのでリアルタイムに回転位相を検出できる利点がある。しかし、該矩形波インクリメンタルエンコーダの分解能は例えば現状において1回転あたり約20000パルスが上限と考えられ、これを通常行われるように×4逓倍して使用したとき1回転あたりの位相の検出分解能は80000が限界となる。
かように、検出分解能に制約があるので任意の時刻の位相を検出するには限界があり、これを図により示せば図31の(a)の如くとなる。
すなわち該図31の(a)において、任意の時刻t1が前記矩形波インクリメンタルエンコーダの矩形波の立ち上がり又は立ち下がりのエッジと離れている程、検出する位相の誤差は大きくなる。
On the other hand, an incremental encoder generates a plurality of cycles according to rotation and has a Z-phase output that identifies A-phase and B-phase outputs, which are two-phase rectangular waves having a phase difference of 90 °, and one rotation. Yes (hereinafter referred to as a rectangular wave incremental encoder), the rising or falling edge of the A-phase and B-phase output rectangular waves is counted by the phase counter on the control device side, and the phase counter is reset to zero by the Z-phase Thus, the rotational phase is conventionally obtained (see, for example, Patent Document 2).
This method has an advantage that the rotational phase can be detected in real time because only the edges of the rectangular wave are counted by the counter. However, the resolution of the rectangular wave incremental encoder is considered to be, for example, an upper limit of about 20000 pulses per revolution at present, and when this is used after multiplying by 4 times as usual, the resolution for detecting the phase per revolution is 80000. Is the limit.
As described above, there is a limit in detecting the phase at an arbitrary time because of the limited detection resolution. If this is shown in the figure, it becomes as shown in FIG.
That is, in (a) of FIG. 31, as the arbitrary time t1 is farther from the rising or falling edge of the rectangular wave of the rectangular wave incremental encoder, the detected phase error becomes larger.

ここで、インクリメンタルエンコーダは前記の矩形波を出力するものの他、2相の正弦波を出力するエンコーダ(以下、正弦波インクリメンタルエンコーダと称す)があり、これを用いて従来から位相の検出が行われている(例えば特許文献3参照)。
図31の(b)に該正弦波インクリメンタルエンコーダの出力波形の例を示す。同図に示すように、90°位相差の正弦波であるA相とB相はインクリメンタルエンコーダの1回転毎に複数サイクルの正弦波を出力する。そして、図31の(b)の任意の時刻t1におけるA相とB相の値をそれぞれa1、b1とすれば、このときの位相はA相とB相をパルス化してこのエッジを計数したパルス位相Cを粗い位相とし、マイクロコントローラなどを使用して次の(1)式から密な位相である補間位相αを求めることができる。
α=αmax×{arcTAN(a1/b1)}/90・・・・・(1)式
かように、前記図31の(a) の矩形波インクリメンタルエンコーダの場合と相違して、該図31の(b)の正弦波インクリメンタルエンコーダでは任意の時刻t1における補間位相を上記(1)式に依り得ることが可能で、該補間位相と前記パルス位相を組み合わせて高精度の回転位相を求めるものである。
ここで、図31の(b)において電気角90°はマイクロコントローラなどによりαmaxなるデジタル値で検出し、θ°はαなるデジタル値で検出するものとしている。例えば、補間位相を無符号の12ビットのデータサイズとすればαmaxは4095となる。
Here, in addition to outputting the rectangular wave, there is an encoder that outputs a two-phase sine wave (hereinafter referred to as a sine wave incremental encoder), and this is used to detect the phase conventionally. (For example, refer to Patent Document 3).
FIG. 31B shows an example of the output waveform of the sine wave incremental encoder. As shown in the figure, the A phase and the B phase, which are sine waves having a phase difference of 90 °, output a sine wave of a plurality of cycles for each rotation of the incremental encoder. If the values of the A phase and the B phase at an arbitrary time t1 in FIG. 31B are a1 and b1, respectively, the phases at this time are pulses obtained by pulsing the A phase and the B phase and counting the edges. By using the phase C as a rough phase and using a microcontroller or the like, the interpolation phase α which is a dense phase can be obtained from the following equation (1).
α = αmax × {arcTAN (a1 / b1)} / 90 (1) Thus, unlike the rectangular wave incremental encoder shown in FIG. In the sine wave incremental encoder of (b), the interpolation phase at an arbitrary time t1 can be obtained by the above equation (1), and the interpolation phase and the pulse phase are combined to obtain a highly accurate rotational phase. .
Here, in FIG. 31B, an electrical angle of 90 ° is detected by a digital value of αmax by a microcontroller or the like, and θ ° is detected by a digital value of α. For example, if the interpolation phase is an unsigned 12-bit data size, αmax is 4095.

図32の(a)は、前記パルス位相をYビットの分解能で、前記補間位相をXビットの分解能で検出するときの1回転の位相の合成を説明するものであり、図32の(b)はパルス位相がC、補間位相がαの場合を示すものである。そして、説明を容易とする為に具体例で示せば、正弦波インクリメンタルエンコーダの1回転当たりのサイクル数が512のとき、これを×4逓倍して使用すれば前記パルス位相Cの分解能は2048となり、前記補間位相を12ビットのデータサイズとすれば該補間位相αの分解能は4096となり、このとき1回転の位相は下記の(2)式の分解能となる。
4096×4×512=8,388,608・・・・・・・・・・・(2)式
かような手段により、1回転の位相を非常に高い分解能で求めることが可能である。
実開昭56−96322号 特許第3073727号 特開2000−314638
(A) of FIG. 32 explains the composition of one rotation phase when the pulse phase is detected with Y-bit resolution and the interpolation phase is detected with X-bit resolution, and (b) of FIG. Indicates the case where the pulse phase is C and the interpolation phase is α. For ease of explanation, a specific example shows that when the number of cycles per rotation of the sine wave incremental encoder is 512, the resolution of the pulse phase C becomes 2048 if this is multiplied by x4. If the interpolation phase has a data size of 12 bits, the resolution of the interpolation phase α is 4096. At this time, the phase of one rotation is the resolution of the following equation (2).
4096 × 4 × 512 = 8,388,608 (2) The phase of one rotation can be obtained with very high resolution by such means.
Japanese Utility Model Publication No.56-96322 Japanese Patent No. 3073727 JP 2000-314638 A

図33は前記特許文献2など、従来から実施されている矩形波インクリメンタルエンコーダを使用して回転位相を検出するとき、1回転の原点を前記Z相出力より得て前記位相カウンタをゼロにリセットし、A相とB相出力の矩形波の立ち上がり又は立ち下がりを前記位相カウンタで計数して回転位相を得る経緯を示すものである。
図33の(a)は前記矩形波インクリメンタルエンコーダのA相、B相及びZ相出力を示し、図33の(b)は前記位相カウンタの時間的推移を示す。
ここで、前記Z相出力が ’1’となる期間は前記図33の(a)に示すとおり一定のパルス幅を有するもので、これにより前記図33の(b)に示す回転位相において、期間P及びQに示すとおり回転位相が不必要にゼロとなる期間が発生し高精度の回転位相を得るに支障があった。
FIG. 33 shows that when a rotational phase is detected using a rectangular wave incremental encoder that has been conventionally implemented, such as in Patent Document 2, the origin of one rotation is obtained from the Z-phase output, and the phase counter is reset to zero. FIG. 6 shows how the rotation phase is obtained by counting the rising or falling edges of the rectangular waves of the A-phase and B-phase outputs with the phase counter.
33A shows the A-phase, B-phase, and Z-phase outputs of the rectangular wave incremental encoder, and FIG. 33B shows the temporal transition of the phase counter.
Here, the period in which the Z-phase output is “1” has a constant pulse width as shown in FIG. 33 (a), so that in the rotational phase shown in FIG. 33 (b), the period As indicated by P and Q, a period in which the rotational phase is unnecessarily zero occurs, which hinders obtaining a highly accurate rotational phase.

又、正弦波インクリメンタルエンコーダを使用する場合は前記図32の(a)で示したとおり、前記パルス位相と前記補間位相の合成により1回転の位相を高分解能で求め得るが、前記パルス位相と前記補間位相の組み合わせに誤りが発生すると正しい回転位相や回転速度を得ることができない。
本発明は上記問題点を解決するためになされたものであって、本発明の目的は、回転方向が正転であっても逆転であっても、インクリメンタルエンコーダを使用して正確な1回転の基準を生成せしめ、高精度の回転位相と回転速度を検出することができ、また、正弦波インクリメンタルエンコーダもしくは正弦波インクリメンタルエンコーダが付属する電動機が停止中や低速回転中のみならず高速回転中であっても、前記パルス位相と前記補間位相を常に正確に検出し、超高精度の回転位相と回転速度を得ることにある。
When a sine wave incremental encoder is used, as shown in FIG. 32 (a), the phase of one rotation can be obtained with high resolution by combining the pulse phase and the interpolation phase. If an error occurs in the combination of interpolation phases, the correct rotation phase and rotation speed cannot be obtained.
The present invention has been made to solve the above-mentioned problems, and the object of the present invention is to make an accurate one rotation using an incremental encoder regardless of whether the rotation direction is forward rotation or reverse rotation. It is possible to generate a reference, detect the rotational phase and rotational speed with high accuracy, and the motor with a sine wave incremental encoder or sine wave incremental encoder is not only stopped or at low speed but also at high speed. However, it is to always detect the pulse phase and the interpolation phase accurately and to obtain a rotational phase and a rotational speed with extremely high accuracy.

上記課題を本発明においては、次のように解決する。
(1)90°位相差の2つの正弦波であるA相信号とB相信号のインクリメンタル信号を出力する正弦波インクリメンタルエンコーダを用い、A相信号とB相信号を本発明の請求項1の位相速度検出装置に入力する。この正弦波インクリメンタルエンコーダは1回転に複数サイクルのA相信号と前記B相信号と、1回転を識別するZ相信号をを出力する。
上記位相速度検出装置は、A相及びB相のコンパレータとパルス抽出器と、上記Z相のコンパレータと原点検出器と、パルス位相検出器を内蔵し、該コンパレータは前記A相信号とB相信号から、それぞれ2値化した矩形A相信号と矩形B相信号を生成して上記パルス抽出器に出力する。
上記パルス抽出器は、上記矩形A相信号と矩形B相信号から、上記正弦波インクリメンタルエンコーダの正転時にはクロック信号に同期した正転パルス信号を、また、逆転時にはクロック信号に同期した逆転パルス信号を抽出して出力する。また、上記矩形A相信号と矩形B相信号の立上がり、立下りをクロック信号に同期させた、シンクロA相信号とシンクロB相信号を出力し、上記Z相のコンパレータは、上記Z相信号から2値化した矩形Z相信号を生成する。上記原点検出器には、前記パルス抽出器が出力する前記正転パルスと前記逆転パルスと、上記矩形Z相信号が入力され、上記原点検出器は、上記正転パルスが出力されているか逆転パルスが出力されているかに応じて前記正弦波インクリメンタルエンコーダの回転方向を識別し、前記正弦波インクリメンタルエンコーダが正転方向に回転しているときは前記矩形Z相信号の先端または後端から短い所定のパルス幅の基準原点信号を出力し、前記正弦波インクリメンタルエンコーダが逆転方向に回転しているときは前記矩形Z相信号の後端または先端から短い所定のパルス幅の基準原点信号を出力する。 上記パルス位相検出器は、前記正弦波インクリメンタルエンコーダの前記A相信号とB相信号の1回転当たりのサイクル数による最大パルス位相より充分に大きい値をカウントし出力するアップダウンカウンタと、選択手段を備え、上記パルス位相検出器のアップダウンカウンタのアップカウント端子、ダウンカウント端子には、それぞれ前記パルス抽出器が出力する前記正転パルスと前記逆転パルスが入力され、アップダウンカウンタのリセット端子には、前記原点検出器が出力する前記基準原点信号が入力され、上記アップダウンカウンタは、上記正転パルスが入力されたときアップカウントし、上記逆転パルスが入力されたダウンカウントし、上記リセット端子に基準原点信号が入力されたときゼロにリセットされる。
上記選択手段は、上記アップ・ダウンカウンタの出力が正のときは、そのカウント値を前記正弦波インクリメンタルエンコーダのパルス位相として出力し、前記アップ・ダウンカウンタの出力が負のときは前記最大パルス位相に1を加算した最大パルス数と前記アップ・ダウンカウンタのカウント値を加算したものを前記正弦波インクリメンタルエンコーダのパルス位相として出力する
In the present invention, the above problem is solved as follows.
(1) A sine wave incremental encoder that outputs an incremental signal of an A phase signal and a B phase signal, which are two sine waves having a phase difference of 90 °, is used. Input to the speed detector. This sine wave incremental encoder outputs a plurality of cycles of an A-phase signal and the B-phase signal per rotation and a Z-phase signal that identifies one rotation .
The phase velocity detector includes an A-phase and B-phase comparator, a pulse extractor, a Z-phase comparator, an origin detector, and a pulse phase detector. The comparators include the A-phase signal and the B-phase signal. Then, a binarized rectangular A-phase signal and rectangular B-phase signal are generated and output to the pulse extractor.
The pulse extractor uses the rectangular A-phase signal and the rectangular B-phase signal to generate a normal rotation pulse signal synchronized with the clock signal when the sine wave incremental encoder rotates in the normal direction, and a reverse rotation pulse signal synchronized with the clock signal during the reverse rotation. Is extracted and output. In addition, a synchronized A phase signal and a synchronized B phase signal are output in which the rising and falling edges of the rectangular A phase signal and the rectangular B phase signal are synchronized with the clock signal. A binarized rectangular Z-phase signal is generated. The origin detector receives the normal rotation pulse and the reverse rotation pulse output from the pulse extractor and the rectangular Z-phase signal, and the origin detector outputs whether the normal rotation pulse is output or the reverse rotation pulse. The rotation direction of the sine wave incremental encoder is identified according to whether the sine wave incremental encoder is rotating, and when the sine wave incremental encoder is rotating in the forward rotation direction, a predetermined short period from the front or rear end of the rectangular Z-phase signal A reference origin signal having a pulse width is output, and when the sine wave incremental encoder is rotating in the reverse direction, a reference origin signal having a short predetermined pulse width is output from the rear end or the front end of the rectangular Z-phase signal. The pulse phase detector includes an up / down counter for counting and outputting a value sufficiently larger than a maximum pulse phase based on the number of cycles per rotation of the A phase signal and the B phase signal of the sine wave incremental encoder, and a selection unit. The forward rotation pulse and the reverse rotation pulse output from the pulse extractor are input to the up count terminal and the down count terminal of the up / down counter of the pulse phase detector, respectively, and the reset terminal of the up / down counter is The reference origin signal output from the origin detector is input, and the up / down counter counts up when the forward rotation pulse is input, counts down when the reverse rotation pulse is input, and outputs to the reset terminal. It is reset to zero when the reference origin signal is input.
The selection means outputs the count value as a pulse phase of the sine wave incremental encoder when the output of the up / down counter is positive, and the maximum pulse phase when the output of the up / down counter is negative. The sum of the maximum number of pulses obtained by adding 1 and the count value of the up / down counter is output as the pulse phase of the sine wave incremental encoder .

)本発明の請求項の位相速度検出装置は、請求項の位相速度検出装置に、A/D変換器とコントローラを内蔵させる。
上記A/D変換器は、前記正弦波インクリメンタルエンコーダが出力する前記A相信号とB相信号をデジタル値に変換したA相デジタル値とB相デジタル値を出力する。
また、前記A相及びB相のコンパレータは、前記A相信号と前記B相信号をハイレベルと判定するレベルVhと、ロウレベルと判定するレベルVlと比較して、前記A相信号と前記B相信号から前記矩形A相信号と前記矩形B相信号を生成するものであり、この場合、該Vhが該Vl以上である。
上記コントローラには、前記パルス位相検出器の出力である前記パルス位相と、前記パルス抽出器が出力するシンクロA相信号とシンクロB相信号と、前記A/D変換器が出力する前記A相デジタル値及びB相デジタル値が連続して入力され、コントローラは、以下のようにして、パルス位相を補正する。
(i) 前記正弦波インクリメンタルエンコーダが正転で回転しているとき、前記A相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を加算する補正を行い、前記A相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を加算する補正を行う。
また、前記B相デジタル値が正で前記シンクロB相信号が' 0' のときは前記パルス位相について1を加算する補正を行い、前記B相デジタル値が負で前記シンクロB相信号が' 1' のときは前記パルス位相について1を加算する補正を行う。
(ii)前記正弦波インクリメンタルエンコーダが逆転で回転しているとき、前記A相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を減算する補正を行い、前記A相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を減算する補正を行う。
また、前記B相デジタル値が正で前記シンクロB相信号が' 0' のときは前記パルス位相について1を減算する補正を行い、前記B相デジタル値が負で前記シンクロB相信号が' 1' のときは前記パルス位相について1を減算する補正を行う。
(2) phase velocity detecting apparatus according to claim 2 of the present invention, the phase velocity detecting apparatus according to claim 1, to an A / D converter and a controller.
The A / D converter outputs an A-phase digital value and a B-phase digital value obtained by converting the A-phase signal and the B-phase signal output from the sine wave incremental encoder into digital values.
The A-phase and B-phase comparators compare the A-phase signal and the B-phase signal by comparing the A-phase signal and the B-phase signal with a level Vh for determining the high level and a level Vl for determining the low level. The rectangular A-phase signal and the rectangular B-phase signal are generated from the signal, and in this case, Vh is equal to or higher than Vl.
The controller includes the pulse phase output from the pulse phase detector, the synchronized A-phase signal and the synchronized B-phase signal output from the pulse extractor, and the A-phase digital signal output from the A / D converter. The value and the B-phase digital value are continuously input, and the controller corrects the pulse phase as follows.
(i) When the sine wave incremental encoder is rotating in the normal direction, when the A phase digital value is positive and the synchro A phase signal is '0', a correction is performed to add 1 to the pulse phase; When the A-phase digital value is negative and the synchro A-phase signal is '1', correction is performed by adding 1 to the pulse phase.
Further, when the B-phase digital value is positive and the synchronized B-phase signal is “0”, correction is performed by adding 1 to the pulse phase, and the B-phase digital value is negative and the synchronized B-phase signal is “1”. When ', correction is performed by adding 1 to the pulse phase.
(ii) When the sine wave incremental encoder rotates in reverse, when the A-phase digital value is positive and the synchro A-phase signal is '0', correction is performed to subtract 1 from the pulse phase, When the A-phase digital value is negative and the synchro A-phase signal is “1”, correction is performed by subtracting 1 from the pulse phase.
When the B-phase digital value is positive and the synchronized B-phase signal is “0”, correction is performed by subtracting 1 from the pulse phase, and the B-phase digital value is negative and the synchronized B-phase signal is “1”. When ', correction is performed to subtract 1 from the pulse phase.

)本発明の請求項の位相速度検出装置は、請求項の位相速度検出装置に、A/D変換器とコントローラを内蔵させる。
上記A/D変換器は、前記正弦波インクリメンタルエンコーダが出力する前記A相信号とB相信号をデジタル値に変換したA相デジタル値とB相デジタル値を出力する。
また、前記A相及びB相のコンパレータは、前記A相信号と前記B相信号をハイレベルと判定するレベルVhと、ロウレベルと判定するレベルVlと比較して、前記A相信号と前記B相信号から前記矩形A相信号と前記矩形B相信号を生成するものであり、この場合、該Vhが該Vl未満である。
上記コントローラには、前記パルス位相検出器の出力である前記パルス位相と、前記パルス抽出器が出力するシンクロA相信号とシンクロB相信号と、前記A/D変換器が出力する前記A相デジタル値及びB相デジタル値が連続して入力され、コントローラは、以下のようにして、パルス位相を補正する。
(i) 前記正弦波インクリメンタルエンコーダが正転で回転しているとき、前記A相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を減算する補正を行い、前記A相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を減算する補正を行う。
また、前記B相デジタル値が負で前記シンクロB相信号が' 1' のときは前記パルス位相について1を減算する補正を行い、前記B相デジタル値が正で前記シンクロB相信号が' 0' のときは前記パルス位相について1を減算する補正を行う。
(ii)前記正弦波インクリメンタルエンコーダが逆転で回転しているとき、前記A相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、前記A相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を加算する補正を行う。
また、前記B相デジタル値が負で前記シンクロB相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、前記B相デジタル値が正で前記シンクロB相信号が' 0' のときは前記パルス位相について1を加算する補正を行う。
(3) phase velocity detecting apparatus according to claim 3 of the present invention, the phase velocity detecting apparatus according to claim 1, to an A / D converter and a controller.
The A / D converter outputs an A-phase digital value and a B-phase digital value obtained by converting the A-phase signal and the B-phase signal output from the sine wave incremental encoder into digital values.
The A-phase and B-phase comparators compare the A-phase signal and the B-phase signal by comparing the A-phase signal and the B-phase signal with a level Vh for determining the high level and a level Vl for determining the low level. The rectangular A-phase signal and the rectangular B-phase signal are generated from the signal, and in this case, the Vh is less than the Vl.
The controller includes the pulse phase output from the pulse phase detector, the synchronized A-phase signal and the synchronized B-phase signal output from the pulse extractor, and the A-phase digital signal output from the A / D converter. The value and the B-phase digital value are continuously input, and the controller corrects the pulse phase as follows.
(i) When the sine wave incremental encoder is rotating forward, when the A phase digital value is negative and the synchro A phase signal is '1', a correction is performed to subtract 1 from the pulse phase; When the A-phase digital value is positive and the synchro A-phase signal is “0”, correction is performed by subtracting 1 from the pulse phase.
Further, when the B-phase digital value is negative and the synchronized B-phase signal is “1”, correction is performed by subtracting 1 from the pulse phase, and the B-phase digital value is positive and the synchronized B-phase signal is “0”. When ', correction is performed to subtract 1 from the pulse phase.
(ii) When the sine wave incremental encoder rotates in reverse, when the A-phase digital value is negative and the synchro A-phase signal is '1', correction is performed to add 1 to the pulse phase, When the A-phase digital value is positive and the synchro A-phase signal is “0”, correction is performed by adding 1 to the pulse phase.
Further, when the B-phase digital value is negative and the synchronized B-phase signal is “1”, correction is performed by adding 1 to the pulse phase, and the B-phase digital value is positive and the synchronized B-phase signal is “0”. When ', correction is performed by adding 1 to the pulse phase.

)本発明の請求項の位相速度検出装置は、請求項の位相速度検出装置に、A/D変換器とコントローラを内蔵させる。
上記A/D変換器は、前記正弦波インクリメンタルエンコーダが出力する前記A相信号とB相信号をデジタル値に変換したA相デジタル値とB相デジタル値を出力する。
また、前記A相及びB相のコンパレータは、前記A相信号と前記B相信号をハイレベルと判定するレベルVhと、ロウレベルと判定するレベルVlと比較して、前記A相信号と前記B相信号から前記矩形A相信号と前記矩形B相信号を生成するものであり、この場合、該Vhが該Vl以上である。
上記コントローラには、前記パルス位相検出器の出力である前記パルス位相と、前記パルス抽出器が出力するシンクロA相信号とシンクロB相信号と、前記A/D変換器が出力する前記A相デジタル値及びB相デジタル値が連続して入力され、コントローラは、以下のようにして、パルス位相を補正する。
(i) 前記正弦波インクリメンタルエンコーダが正転で回転しているとき、前記A相デジタル値がゼロで前記B相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を加算する補正を行い、前記A相デジタル値がゼロで前記B相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を加算する補正を行う。
また、前記B相デジタル値がゼロで前記A相デジタル値が負で前記シンクロB相信号が' 0' のときは前記パルス位相について1を加算する補正を行い、前記B相デジタル値がゼロで前記A相デジタル値が正で前記シンクロB相信号が' 1' のときは前記パルス位相について1を加算する補正を行う。
(ii)前記正弦波インクリメンタルエンコーダが逆転で回転しているとき、前記A相デジタル値がゼロのときは前記パルス位相についての補正を行なわず、前記B相デジタル値がゼロのときも前記パルス位相について補正を行なわない。
(4) phase velocity detecting apparatus according to claim 4 of the present invention, the phase velocity detecting apparatus according to claim 1, to an A / D converter and a controller.
The A / D converter outputs an A-phase digital value and a B-phase digital value obtained by converting the A-phase signal and the B-phase signal output from the sine wave incremental encoder into digital values.
The A-phase and B-phase comparators compare the A-phase signal and the B-phase signal by comparing the A-phase signal and the B-phase signal with a level Vh for determining the high level and a level Vl for determining the low level. The rectangular A-phase signal and the rectangular B-phase signal are generated from the signal, and in this case, Vh is equal to or higher than Vl.
The controller includes the pulse phase output from the pulse phase detector, the synchronized A-phase signal and the synchronized B-phase signal output from the pulse extractor, and the A-phase digital signal output from the A / D converter. The value and the B-phase digital value are continuously input, and the controller corrects the pulse phase as follows.
(i) When the sine wave incremental encoder is rotating in the forward direction, the pulse phase is determined when the A phase digital value is zero, the B phase digital value is positive, and the synchro A phase signal is '0'. Correction for adding 1 is performed. When the A-phase digital value is zero, the B-phase digital value is negative, and the synchro A-phase signal is '1', correction for adding 1 is performed for the pulse phase.
Further, when the B-phase digital value is zero, the A-phase digital value is negative, and the synchronized B-phase signal is “0”, correction is performed by adding 1 to the pulse phase, and the B-phase digital value is zero. When the A-phase digital value is positive and the synchro B-phase signal is '1', correction is performed by adding 1 to the pulse phase.
(ii) When the sine wave incremental encoder rotates in reverse, the pulse phase is not corrected when the A-phase digital value is zero, and the pulse phase is also corrected when the B-phase digital value is zero. No correction is made for.

)本発明の請求項の位相速度検出装置は、請求項の位相速度検出装置に、A/D変換器とコントローラを内蔵させる。
上記A/D変換器は、前記正弦波インクリメンタルエンコーダが出力する前記A相信号とB相信号をデジタル値に変換したA相デジタル値とB相デジタル値を出力する。
また、前記A相及びB相のコンパレータは、前記A相信号と前記B相信号をハイレベルと判定するレベルVhと、ロウレベルと判定するレベルVlと比較して、前記A相信号と前記B相信号から前記矩形A相信号と前記矩形B相信号を生成するものであり、この場合、該Vhが該Vl未満である。
上記コントローラには、前記パルス位相検出器の出力である前記パルス位相と、前記パルス抽出器が出力するシンクロA相信号とシンクロB相信号と、前記A/D変換器が出力する前記A相デジタル値及びB相デジタル値が連続して入力され、コントローラは、以下のようにして、パルス位相を補正する。
(i) 前記正弦波インクリメンタルエンコーダが正転で回転しているとき、前記A相デジタル値がゼロのときは前記パルス位相についての補正を行なわず、前記B相デジタル値がゼロのときも前記パルス位相について補正を実施しない。
(ii)前記正弦波インクリメンタルエンコーダが逆転で回転しているとき、前記A相デジタル値がゼロで前記B相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、前記A相デジタル値がゼロで前記B相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を加算する補正を行う。
また、前記B相デジタル値がゼロで前記A相デジタル値が正で前記シンクロB相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、前記B相デジタル値がゼロで前記A相デジタル値が負で前記シンクロB相信号が' 0' のときは前記パルス位相について1を加算する補正を行う。
(5) the phase velocity detecting device according to claim 5 of the present invention, the phase velocity detecting apparatus according to claim 1, to an A / D converter and a controller.
The A / D converter outputs an A-phase digital value and a B-phase digital value obtained by converting the A-phase signal and the B-phase signal output from the sine wave incremental encoder into digital values.
The A-phase and B-phase comparators compare the A-phase signal and the B-phase signal by comparing the A-phase signal and the B-phase signal with a level Vh for determining the high level and a level Vl for determining the low level. The rectangular A-phase signal and the rectangular B-phase signal are generated from the signal, and in this case, the Vh is less than the Vl.
The controller includes the pulse phase output from the pulse phase detector, the synchronized A-phase signal and the synchronized B-phase signal output from the pulse extractor, and the A-phase digital signal output from the A / D converter. The value and the B-phase digital value are continuously input, and the controller corrects the pulse phase as follows.
(i) When the sine wave incremental encoder is rotating forward, the pulse phase is not corrected when the A-phase digital value is zero, and the pulse is also output when the B-phase digital value is zero. No correction is made for the phase.
(ii) When the sine wave incremental encoder is rotating in reverse, when the A phase digital value is zero, the B phase digital value is negative and the synchro A phase signal is '1', the pulse phase is 1 When the A-phase digital value is zero, the B-phase digital value is positive, and the synchro A-phase signal is “0”, correction is performed to add 1 to the pulse phase.
Further, when the B phase digital value is zero, the A phase digital value is positive, and the synchronized B phase signal is “1”, correction is performed by adding 1 to the pulse phase, and the B phase digital value is zero. When the A-phase digital value is negative and the synchronized B-phase signal is “0”, correction is performed by adding 1 to the pulse phase.

)本発明の請求項の位相速度検出装置は、請求項2,3,4または請求項5の位相速度検出装置において、発信器が出力するパルスを計数する基準カウンタとデータラッチを設ける。
そして、上記発信器が出力するパルスのエッジに同期したラッチ指令により、同一時刻の前記基準カウンタの出力値と前記パルス位相と前記シンクロA相信号と前記シンクロB相信号と前記A相デジタル値及び前記B相デジタル値をラッチして、所定の時間間隔で前記コントローラに入力する。
上記コントローラは、上記時間間隔における上記基準カウンタの出力値の変化量より、上記時間間隔と前記正弦波インクリメンタルエンコーダの回転位相の変化量を検出し、上記時間間隔と回転位相の変化量より上記正弦波インクリメンタルエンコーダの回転速度を演算し検出する。
( 6 ) The phase velocity detection device according to claim 6 of the present invention is the phase velocity detection device according to claim 2, 3, 4 or 5, wherein a reference counter and a data latch for counting pulses output from the transmitter are provided. .
The reference value output from the reference counter, the pulse phase, the synchronized A-phase signal, the synchronized B-phase signal, the A-phase digital value, and the latch command synchronized with the edge of the pulse output from the transmitter The B phase digital value is latched and input to the controller at predetermined time intervals.
The controller detects a change amount of the rotation phase of the sine wave incremental encoder from the change amount of the output value of the reference counter in the time interval, and detects the change amount of the sine from the change amount of the time interval and the rotation phase. Calculates and detects the rotation speed of the wave incremental encoder.

本発明においては、正弦波インクリメンタルエンコーダもしくは正弦波インクリメンタルエンコーダが付属する電動機が停止中や低速回転中のみならず高速回転中であっても、回転位相と回転速度を常に精度よく検出することを可能となる。
これにより、高速回転中の複数の電動機相互の高精度の同期制御や、高速の位置決め制御を実現することができる。
In the present invention, it is possible to always detect the rotation phase and the rotation speed with high accuracy even when the sine wave incremental encoder or the motor attached with the sine wave incremental encoder is stopped or rotating at a low speed as well as at a high speed. It becomes.
As a result, it is possible to realize high-precision synchronous control among a plurality of motors during high-speed rotation and high-speed positioning control.

以下、本発明の一実施例を図面に基づいて説明する。
図1、図5、図10は請求項1に、図13は請求項、請求項、請求項及び請求項に関わる実施例を説明し、図29は請求項に関わる実施例を説明するものである。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
1, 5, and 10 illustrate an embodiment related to claim 1 , FIG. 13 illustrates an embodiment related to claims 2 , 3 , 4, and 5 , and FIG. 29 illustrates an embodiment related to claim 6 . Is described.

図1は実施例1の全体の構成を説明する図であり、図2、図3及び図4は実施例1を更に詳細に説明するものである。始めに図1において1aは正弦波インクリメンタルエンコーダ、2aは位相速度検出装置であり、該位相速度検出装置2aは3、5及び6の機器を内蔵し、3はコンパレータ、5は一定周波数の基準クロックを生成する発信器、6は本実施例によるパルス抽出器であり次にこれらについて順次説明を行う。   FIG. 1 is a diagram illustrating the overall configuration of the first embodiment, and FIGS. 2, 3 and 4 illustrate the first embodiment in more detail. First, in FIG. 1, 1a is a sine wave incremental encoder, 2a is a phase velocity detection device, the phase velocity detection device 2a includes 3, 5, and 6 devices, 3 is a comparator, and 5 is a reference clock having a constant frequency. Is a pulse extractor according to this embodiment, which will be described in turn.

前記コンパレータ3は、前記正弦波インクリメンタルエンコーダ1aが出力するA相とB相の正弦波を' 0' と' 1' の2値の矩形A相信号と矩形B相信号に変換するものであり、該矩形A相信号と矩形B相信号は、上記パルス抽出器6のPA入力とPB入力に接続され、前記発信器5は該パルス抽出器6のCLK入力に基準クロックCLKを供給する。 次に、前記パルス抽出器6のQ1出力とQ2出力は例えば、前記正弦波インクリメンタルエンコーダ1aが正転方向に回転するときQ1出力に回転に応じた正転パルスを、前記正弦波インクリメンタルエンコーダ1aが逆転方向に回転するときQ2出力に回転に応じた逆転パルスを出力する。そして、前記パルス抽出器6のQA出力とQB出力は、回転に応じた正転パルスを送出する前記Q1出力、又は逆転パルスを送出する前記Q2出力を生成するに至った前記PA入力と前記PB入力の状態を保持したシンクロA相信号QAとシンクロB相信号QBを出力する。   The comparator 3 converts the A-phase and B-phase sine waves output from the sine wave incremental encoder 1a into binary rectangular A-phase signals and rectangular B-phase signals of '0' and '1'. The rectangular A phase signal and the rectangular B phase signal are connected to the PA input and PB input of the pulse extractor 6, and the transmitter 5 supplies a reference clock CLK to the CLK input of the pulse extractor 6. Next, the Q1 output and Q2 output of the pulse extractor 6, for example, when the sine wave incremental encoder 1a rotates in the normal rotation direction, the forward rotation pulse corresponding to the rotation is sent to the Q1 output, and the sine wave incremental encoder 1a When rotating in the reverse direction, a reverse pulse corresponding to the rotation is output to the Q2 output. The QA output and the QB output of the pulse extractor 6 are the Q1 output for sending the forward rotation pulse corresponding to the rotation, or the PA input and the PB for generating the Q2 output for sending the reverse rotation pulse. Synchronized A-phase signal QA and synchronized B-phase signal QB are maintained.

次に、前記正弦波インクリメンタルエンコーダ1aが正転方向に回転するとき、前記パルス抽出器6の動作について更に図2を参照しつつ説明する。
図2の(a)は前記正弦波インクリメンタルエンコーダ1aが正転のときのA相とB相の出力の時間的推移を示し、正転のとき例えばB相がA相より90°の進みとし、前記正弦波インクリメンタルエンコーダ1aが1回転でA相及びB相の正弦波はそれぞれNサイクル生成するものとしている。
図2の(b)は前記A相のコンパレータ3の出力の時間的推移を示すもので、該コンパレータ3はA相の正弦波入力を概略ゼロと比較して' 0' と' 1' の2値信号である矩形A相信号を出力し前記パルス抽出器6のPA入力となる。そして、同様に図2の(c)は前記B相のコンパレータ3の出力の矩形B相信号の時間的推移を示すと共に前記パルス抽出器6のPB入力を示す。ここで、前記図2の(b)の(1) と(2) は前記PA入力のそれぞれ立ち上がりと立ち下がりを示し、前記図2の(c)の(3) と(4) は前記PB入力のそれぞれ立ち上がりと立ち下がりを示し、これらの説明は後述するものである。
Next, the operation of the pulse extractor 6 when the sine wave incremental encoder 1a rotates in the forward rotation direction will be further described with reference to FIG.
(A) of FIG. 2 shows the temporal transition of the output of the A phase and the B phase when the sine wave incremental encoder 1a is rotating forward, and for the forward rotation, for example, the B phase is advanced by 90 ° from the A phase. The sine wave incremental encoder 1a is rotated once to generate N cycles of A phase and B phase sine waves.
FIG. 2 (b) shows the temporal transition of the output of the A-phase comparator 3. The comparator 3 compares the A-phase sine wave input with approximately zero and outputs two values of '0' and '1'. A rectangular A-phase signal, which is a value signal, is output and becomes the PA input of the pulse extractor 6. Similarly, FIG. 2C shows the temporal transition of the rectangular B-phase signal output from the B-phase comparator 3 and the PB input of the pulse extractor 6. Here, (1) and (2) in (b) of FIG. 2 indicate the rising and falling of the PA input, respectively, and (3) and (4) in (c) of FIG. 2 are the PB input. The rise and fall of each are shown, and the description thereof will be described later.

更に、図2の(d)は前記発信器5が出力する基準クロックCLKの時間的推移を示し、該基準クロックCLKは前記パルス抽出器6のCLK入力に接続されている。ここで、該図2の(d)は説明の為、前記図2の(a)から図2の(c)と対比して目視できるように示すが、実用例を示せば前記図2の(a)において1回転当たりのNが例えば512サイクルで回転速度が1800rpm(revolutions per minute)のとき、前記図2の(a)のA相又はB相の正弦波の周波数は15.36KHzとなり、一方前記図2の(d)に示す前記発信器5の基準クロックの周波数は例えば20MHzである。かように、前記発信器5の周波数は前記正弦波インクリメンタルエンコーダ1aのA相とB相が出力する正弦波の周波数に比して充分に高く選定するものである。   Further, (d) of FIG. 2 shows a temporal transition of the reference clock CLK output from the transmitter 5, and the reference clock CLK is connected to the CLK input of the pulse extractor 6. Here, (d) in FIG. 2 is shown so that it can be seen in comparison with (c) in FIG. 2 (a) to FIG. 2 (c) for explanation. In a), when N per revolution is, for example, 512 cycles and the rotational speed is 1800 rpm (revolutions per minute), the frequency of the A phase or B phase sine wave in FIG. 2A is 15.36 KHz, The frequency of the reference clock of the transmitter 5 shown in FIG. 2D is, for example, 20 MHz. Thus, the frequency of the transmitter 5 is selected sufficiently higher than the frequency of the sine wave output from the A phase and B phase of the sine wave incremental encoder 1a.

次に、図2の(e)は前記正弦波インクリメンタルエンコーダ1aが正転方向に回転しているとき、前記パルス抽出器6のQ1出力に回転に応じた正転パルスを出力する状態を示す。該図2の(e)は前記図2の(a)で示す入力周波数の×4逓倍のパルス周波数の例で、このとき実用例を示せば、前記図2の(a)において1回転当たりのNが例えば512サイクルのとき、前記正弦波インクリメンタルエンコーダ1aは1回転で512×4逓倍で2048個の正転パルスを生成することとなる。
又、前述のとおり前記図2の(e)は前記図2の(a)で示す入力周波数の×4逓倍のパルス周波数の例で示したが×1逓倍あるいは×2逓倍であってもよい。ここで、図2の(f)は前記正弦波インクリメンタルエンコーダ1aが逆転方向に回転するとき、前記パルス抽出器6の逆転パルスを出力するQ2出力の状態を示すが、正転方向に回転しているとき該Q2出力は変化しない。
Next, FIG. 2E shows a state in which a normal rotation pulse corresponding to the rotation is output to the Q1 output of the pulse extractor 6 when the sine wave incremental encoder 1a rotates in the normal rotation direction. FIG. 2 (e) is an example of a pulse frequency multiplied by 4 times the input frequency shown in FIG. 2 (a). At this time, if a practical example is shown, in FIG. When N is, for example, 512 cycles, the sine wave incremental encoder 1a generates 2048 forward rotation pulses at 512 × 4 multiplications in one rotation.
Further, as described above, FIG. 2E shows an example of a pulse frequency of x4 times the input frequency shown in FIG. 2A, but it may be x1 or x2. Here, FIG. 2 (f) shows the state of the Q2 output that outputs the reverse pulse of the pulse extractor 6 when the sine wave incremental encoder 1a rotates in the reverse direction. The Q2 output does not change when

そして、図2の(g)と(h)は前記パルス抽出器6が出力するシンクロA相信号QAとシンクロB相信号QBの時間的遷移を示すもので、回転に応じたパルスを出力する前記Q1出力又はQ2出力を生成した前記PA入力と前記PB入力の状態を保持し出力する。これを更に説明すれば、前記図2の(b)の(1) で示すPA入力の立ち上がりは前記図2の(d)の基準クロックCLKで同期化され、図2の(e)の時刻t1における正転パルスを生成する。そして、前記図2の(d)の基準クロックCLKにより前記正転パルスと正確に同期した前記図2の(g)で示すとおりシンクロA相信号QAが' 1' となる。更に前記図2の(b)の(2) で示すPA入力の立ち下がりは基準クロックCLKで同期化され、前記図2の(e)の時刻t2における正転パルスを生成すると同時に、前記図2の(g)で示すとおりシンクロA相信号QAが' 0' となる。同様に前記図2の(c)の(3) と(4) におけるPB入力の立ち上がりと立ち下がりは基準クロックCLKで同期化され、前記図2の(e)の時刻t3とt4における正転パルスを生成すると同時に、前記図2の(h)で示すとおりシンクロB相信号QBが' 1' 、' 0' と変化する。   2 (g) and 2 (h) show temporal transitions of the synchro A phase signal QA and the synchro B phase signal QB output from the pulse extractor 6, and output the pulse corresponding to the rotation. The state of the PA input and the PB input that generated the Q1 output or the Q2 output is held and output. More specifically, the rising edge of the PA input indicated by (1) in FIG. 2B is synchronized with the reference clock CLK in FIG. 2D, and the time t1 in FIG. The forward rotation pulse at is generated. Then, as shown in FIG. 2 (g), which is accurately synchronized with the normal rotation pulse by the reference clock CLK of FIG. 2 (d), the synchro A phase signal QA becomes “1”. Further, the falling edge of the PA input indicated by (2) in FIG. 2B is synchronized with the reference clock CLK, and at the same time as generating the normal rotation pulse at the time t2 in FIG. As shown in (g), the synchro A-phase signal QA becomes “0”. Similarly, the rise and fall of the PB input in (3) and (4) of FIG. 2 (c) are synchronized with the reference clock CLK, and forward rotation pulses at times t3 and t4 in FIG. 2 (e). As shown in FIG. 2 (h), the synchronized B-phase signal QB changes to '1' and '0'.

すなわち、本実施例は前記図2の(g)と(h)で示す前記パルス抽出器6が出力するシンクロA相信号QAとシンクロB相信号QBの変化を、前記図2の(e)で示す正転パルスと時間的に厳密に同期せしめ、これにより前記図2の(e)のQ1出力の正転パルスを生成した相がA相に起因するかB相に起因するか、前記シンクロA相信号QAとシンクロB相信号QBをモニタすることにより常に正確に認識することを可能とするものである。なお、上記では、PBの立ち上がり(3) 、立下り(4) の際の時刻t3,t4で生ずるパルスについて説明したが、t1、t2の間に図示されるパルス、t3、t4の間に図示されるパルスもPBの立ち上がり、立ち下がりの時点に生ずるパルスである。   That is, in this embodiment, changes in the synchro A phase signal QA and the synchro B phase signal QB output from the pulse extractor 6 shown in FIGS. 2 (g) and (h) are shown in FIG. 2 (e). 2 is synchronized with the normal rotation pulse shown in FIG. 2 to determine whether the phase that generated the normal rotation pulse of the Q1 output in FIG. 2E is caused by the A phase or the B phase. By monitoring the phase signal QA and the synchro B phase signal QB, it is possible to always recognize correctly. In the above description, the pulse generated at times t3 and t4 at the rise (3) and fall (4) of PB has been described. However, the pulse is illustrated between t1 and t2, and is illustrated between t3 and t4. The pulse generated is also a pulse generated at the rise and fall times of PB.

次に、図3は前記正弦波インクリメンタルエンコーダ1aが逆転方向に回転するとき前記パルス抽出器6の動作を説明するものである。図3の(a)は前記正弦波インクリメンタルエンコーダ1aが逆転するときのA相とB相の出力の時間的推移を示し、図2の(a)に換えてA相がB相より90°の進みとなる。又、図3の(a)から(h)において図2の(a)から(h)と同じ記号を付すものはこれと同じ前記パルス抽出器6の入力や出力を示しその説明は割愛する。   FIG. 3 illustrates the operation of the pulse extractor 6 when the sine wave incremental encoder 1a rotates in the reverse direction. FIG. 3A shows the temporal transition of the output of the A phase and the B phase when the sine wave incremental encoder 1a reverses, and the A phase is 90 ° from the B phase in place of FIG. Advance. 3A to 3H, the same reference numerals as those in FIGS. 2A to 2H denote the same input and output of the pulse extractor 6, and the description thereof is omitted.

ここで、前記図3の(b)の(5) と(6) は前記パルス抽出器6のPA入力のそれぞれ立ち上がりと立ち下がりを示し、前記図3の(c)の(7) と(8) は前記PB入力のそれぞれ立ち上がりと立ち下がりを示す。そして、前記図3の(b)の(5) で示すPA入力の立ち上がりは図3の(d)の基準クロックCLKで同期化され、図3の(f)の時刻t5における逆転パルスを生成する。そして、前記図3の(d)の基準クロックCLKにより該逆転パルスと正確に同期した図3の(g)で示すシンクロA相信号QAが' 1' となる。更に前記図3の(b)の(6) で示すPA入力の立ち下がりは基準クロックCLKで同期化され、前記図3の(f)の時刻t6における逆転パルスを生成すると同時に、前記図3の(g)で示すとおりシンクロA相信号QAが' 0' となる。同様に前記図3の(c)の(7) と(8) におけるPB入力の立ち上がりと立ち下がりは基準クロックCLKで同期化され、前記図3の(f)の時刻t7とt8における逆転パルスを生成すると同時に、前記図3の(h)で示すとおりシンクロB相信号QBが' 1' 、' 0' と変化する。なお、逆転のときは図3の(e)に示す前記パルス抽出器6の正転パルスのQ1出力は変化しない。   Here, (5) and (6) in FIG. 3 (b) show the rise and fall of the PA input of the pulse extractor 6, respectively, and (7) and (8) in (c) of FIG. ) Indicates the rise and fall of the PB input, respectively. The rising edge of the PA input indicated by (5) in FIG. 3 (b) is synchronized with the reference clock CLK in FIG. 3 (d) to generate a reverse pulse at time t5 in FIG. 3 (f). . Then, the synchronized A-phase signal QA shown in (g) of FIG. 3 which is accurately synchronized with the reverse pulse by the reference clock CLK of (d) of FIG. 3 becomes “1”. Further, the falling edge of the PA input indicated by (6) in FIG. 3B is synchronized with the reference clock CLK, and at the same time as generating a reverse pulse at time t6 in FIG. As shown in (g), the synchronized A-phase signal QA becomes “0”. Similarly, the rise and fall of the PB input in (7) and (8) of FIG. 3 (c) are synchronized with the reference clock CLK, and the reverse pulses at time t7 and t8 in FIG. Simultaneously with the generation, the synchro B-phase signal QB changes to “1” and “0” as shown in FIG. During reverse rotation, the Q1 output of the forward rotation pulse of the pulse extractor 6 shown in FIG. 3 (e) does not change.

かように本実施例は正転のときと同様に逆転方向に回転するときも、前記図3の(g)と(h)で示す前記パルス抽出器6の出力であるシンクロA相信号QAとシンクロB相信号QBの変化を前記図3の(f)で示す逆転パルスと時間的に正確に同期せしめ、これにより前記図3の(f)のQ2出力の逆転パルスを生成した相がA相に起因するかB相に起因するか、前記シンクロA相信号QAとシンクロB相信号QBをモニタすることにより常に正確に認識することを可能とするものである。   Thus, in this embodiment, when rotating in the reverse direction as in the normal rotation, the synchro A phase signal QA which is the output of the pulse extractor 6 shown in (g) and (h) of FIG. The change of the synchro B phase signal QB is accurately synchronized in time with the reverse pulse shown in FIG. 3 (f), so that the phase that generates the reverse pulse of the Q2 output in FIG. By monitoring the synchro A-phase signal QA and the synchro-B phase signal QB, it is possible to always accurately recognize whether it is caused by the above or the B phase.

次に、図4に前記パルス抽出器6の一実施例を示す。図4において6はパルス抽出器であり、PA入力、PB入力、CLK入力、Q1出力、Q2出力、QA出力及びQB出力は前記図1で同じ記号を付すものと同じでありその説明は割愛する。そして、601、603、605、607及び609はNOTゲートであり、602、604、606、608、613、614、615及び616はDフリップフロップであり、610はANDゲート、611及び612はORゲートである。なお、本実施例の以下の説明において、各種フリップフロップのCLK入力は入力する信号の立ち上がりでラッチ動作をするものとする。   Next, FIG. 4 shows an embodiment of the pulse extractor 6. In FIG. 4, 6 is a pulse extractor, and PA input, PB input, CLK input, Q1 output, Q2 output, QA output and QB output are the same as those shown in FIG. . 601, 603, 605, 607 and 609 are NOT gates, 602, 604, 606, 608, 613, 614, 615 and 616 are D flip-flops, 610 is an AND gate, and 611 and 612 are OR gates. It is. In the following description of this embodiment, it is assumed that the CLK input of various flip-flops performs a latch operation at the rising edge of the input signal.

始めに、前記Dフリップフロップ602、604とNOTゲート603、605は前記PA入力の立ち上がりと立ち下がりを検出するものであり、同様に前記Dフリップフロップ606、608とNOTゲート607、609は前記PB入力の立ち上がりと立ち下がりの検出に用いる。ここで、Dフリップフロップ602のQ出力を(602Q)と表記しNOTゲート603の出力を(/602Q)と表記し、前記Dフリップフロップ604、606、608及びNOTゲート605、607、609のそれぞれの出力もこれに準じて表記すれば、ANDゲート610の(1) を付すものは次の論理演算を実行する。
(1) :( 602Q) ∩ (/604Q) ∩ (606Q) ・・・・・・(3)式
上記(3)式の第1項と第2項の(( 602Q)∩(/604Q) )により前記図2の(b)の(1) の立ち上がりを検出し、更に第3項の(∩(606Q))によりB相が' 1' であることより正転を検出し、前記図2の(e)の時刻t1における正転パルスを生成するに至る。同様に、図4のANDゲート610の(2) から(4) を付すものはそれぞれ次の(4)式から(6)式に示す論理演算を実行し、これらの第1項と第2項から立ち上がり又は立ち下がりを検出し更に第3項により正転を検出し、前記図2の(e)の時刻t2、t3及びt4における正転パルスを生成するに至る。ここで、前記図2の(b)と(c)で付す(1) から(4) は前記図4のANDゲート610に付す(1) から(4) に対応しているので留意されたい。
(2) :( /602Q) ∩ ( 604Q) ∩ (/606Q) ・・・・・・・(4)式
(3) :( 606Q) ∩ (/608Q) ∩ (/602Q) ・・・・・・・(5)式
(4) :( /606Q) ∩ ( 608Q) ∩ ( 602Q) ・・・・・・・(6)式
そしてこの(1) から(4) のANDゲート610の出力は前記ORゲート611を経由して前記Dフリップフロップ613に送られ、該Dフリップフロップ613は前記CLK入力の立ち上がりに同期して正転パルスをQ1出力に送出する。
First, the D flip-flops 602 and 604 and NOT gates 603 and 605 detect rising and falling of the PA input. Similarly, the D flip-flops 606 and 608 and NOT gates 607 and 609 are connected to the PB. Used to detect the rise and fall of the input. Here, the Q output of the D flip-flop 602 is expressed as (602Q) and the output of the NOT gate 603 is expressed as (/ 602Q). In the same way, the output of the AND gate 610 attached with (1) executes the following logical operation.
(1): (602Q) ∩ (/ 604Q) ∩ (606Q) ·················································· (3) 2 detects the rising edge of (1) in FIG. 2 (b), and further detects forward rotation from the third term (∩ (606Q)) because the B phase is “1”. The forward rotation pulse at time t1 in (e) is generated. Similarly, each of the AND gates 610 to which (2) to (4) are attached in FIG. 4 executes the logical operations shown in the following equations (4) to (6), respectively. Then, rising or falling is detected, and forward rotation is detected by the third term, and forward rotation pulses are generated at times t2, t3, and t4 in FIG. Here, it should be noted that (1) to (4) given in (b) and (c) in FIG. 2 correspond to (1) to (4) given to the AND gate 610 in FIG.
(2): (/ 602Q) ∩ (604Q) ∩ (/ 606Q) · · · · · · · · ·
(3): (606Q) ∩ (/ 608Q) ∩ (/ 602Q) · · · · · · · · · · · · (5)
(4): (/ 606Q) ∩ (608Q) ∩ (602Q) Equation (6) And the output of the AND gate 610 of (1) to (4) passes through the OR gate 611. The D flip-flop 613 sends a normal rotation pulse to the Q1 output in synchronization with the rising edge of the CLK input.

一方、ANDゲート610の(5) から(8) を付すものはそれぞれ次の(7)式から(10)式の論理演算を実行し、前記図3の(b)、(c)の(5) から(8) を付すエッヂを検出し、前記図3の(f)の時刻t5からt8における逆転パルスを生成するに至る。
(5) :( 602Q) ∩ (/604Q) ∩ (/606Q) ・・・・・・・(7)式
(6) :( /602Q) ∩ ( 604Q) ∩ ( 606Q) ・・・・・・・(8)式
(7) :( 606Q) ∩ (/608Q) ∩ ( 602Q) ・・・・・・・(9)式
(8) :( /606Q) ∩ ( 608Q) ∩ (/602Q) ・・・・・・(10)式
この(5) から(8) のANDゲート610の出力は前記ORゲート612を経由して前記Dフリップフロップ614に送られ、該Dフリップフロップ614は前記CLK入力の立ち上がりに同期して逆転パルスをQ2出力に送出する。
On the other hand, each of AND gates 610 with (5) to (8) performs the logical operation of the following equations (7) to (10), respectively, and (5) of (b) and (c) of FIG. ) To (8) are detected, and reverse pulses are generated from time t5 to time t8 in FIG. 3 (f).
(5): (602Q) ∩ (/ 604Q) ∩ (/ 606Q) ····························
(6): (/ 602Q) ∩ (604Q) ∩ (606Q) ··············································
(7): (606Q) ∩ (/ 608Q) ∩ (602Q) ··············· (9)
(8): (/ 606Q) ∩ (608Q) ∩ (/ 602Q) ··················································· (10) The D flip-flop 614 sends a reverse pulse to the Q2 output in synchronization with the rising edge of the CLK input.

更に、前記(3)式から(10)式の出力が' 1' となるのはこれらの式の第1項目の前記Dフリップフロップ602又は606の出力が変化する時に依るもので、前記図4において該Dフリップフロップ602と606の出力は、前記Dフリップフロップ615と616を経由して前記シンクロA相信号QAと前記シンクロB相信号QBの出力に送出されるものである。そして、該Dフリップフロップ615と616と前記Dフリップフロップ613と614は同一の前記CLK信号の立ち上がりに同期して動作するものである。 これにより、本実施例は前記Q1出力とQ2出力から送出される正転パルスと逆転パルスと、時間的に正確に同期せしめた前記正弦波インクリメンタルエンコーダ1aのA相とB相を2値化し保持した前記シンクロA相信号QAと前記シンクロB相信号QBを送出し、前記正転パルスと逆転パルスを生成した相がA相に起因するかB相に起因するか、前記シンクロA相信号QAと前記シンクロB相信号QBをモニタすることにより正確に認識することを可能とするものである。   Further, the reason why the output of the equations (3) to (10) becomes '1' depends on the change of the output of the D flip-flop 602 or 606 of the first item of these equations. The outputs of the D flip-flops 602 and 606 are sent to the outputs of the synchronized A-phase signal QA and the synchronized B-phase signal QB via the D flip-flops 615 and 616, respectively. The D flip-flops 615 and 616 and the D flip-flops 613 and 614 operate in synchronization with the rise of the same CLK signal. As a result, the present embodiment binarizes and holds the A phase and B phase of the sine wave incremental encoder 1a synchronized in time with the normal rotation pulse and the reverse rotation pulse transmitted from the Q1 output and the Q2 output. The synchronized A-phase signal QA and the synchronized B-phase signal QB are transmitted, and whether the phase that generated the forward pulse and the reverse pulse is caused by the A phase or the B phase, the synchronized A phase signal QA and It is possible to accurately recognize the sync B-phase signal QB by monitoring.

ここで、前記図4において前記NOTゲート601は前記基準クロックCLKを反転し、前記PA入力とPB入力の立ち上がりと立ち下がりを検出するDフリップフロップ602、604と607、609のCLK入力にクロックを供給するもので、これによりそれぞれのANDゲート610の出力に依り得られる正転パルスと逆転パルスを前記基準クロックCLKの立ち下がりに同期して生成させ、基準クロックCLKの立ち上がりに同期する前記Dフリップフロップ613、614、615及び616のD入力に充分なデータセットアップ時間を確保する為、便宜的に設けたものである。
又、前記図4の前記ORゲート611及び612は前記正弦波インクリメンタルエンコーダ1aのA相とB相を×4逓倍する例で示したが、これに換えて×2逓倍や×1逓倍するものであっても良い。又、前記Q1出力とQ2出力をそれぞれ正転パルスと逆転パルスを出力する実施例で示したが、これに換えて例えばQ1出力を正転及び逆転方向に回転するに応じて歩進パルスを生成するものとし、Q2出力を正転のときは例えば' 0' を逆転のときは' 1' を出力するものとし、このQ1出力とQ2出力と時間的に正確に同期せしめた、前記正弦波インクリメンタルエンコーダ1aのA相とB相を2値化した前記シンクロA相信号QAと前記シンクロB相信号QBを送出させても良い。
In FIG. 4, the NOT gate 601 inverts the reference clock CLK, and supplies a clock to the CLK inputs of D flip-flops 602, 604, 607, and 609 that detect rising and falling of the PA input and PB input. The D flip-flop is supplied so that a normal rotation pulse and a reverse rotation pulse that can be obtained depending on the output of each AND gate 610 are generated in synchronization with the falling edge of the reference clock CLK, and are synchronized with the rising edge of the reference clock CLK. This is provided for the sake of convenience in order to ensure a sufficient data setup time for the D input of the groups 613, 614, 615 and 616.
The OR gates 611 and 612 shown in FIG. 4 are shown as an example in which the A phase and the B phase of the sine wave incremental encoder 1a are multiplied by x4. Instead, the OR gates 611 and 612 are multiplied by x2 or x1. There may be. Also, the Q1 output and the Q2 output are shown in the embodiment for outputting the forward rotation pulse and the reverse rotation pulse, respectively. When the Q2 output is normal rotation, for example, “0” is output, and when the Q2 output is reverse rotation, “1” is output. The sine wave incrementally synchronized with the Q1 output and the Q2 output accurately in time. The synchro A phase signal QA and the synchro B phase signal QB obtained by binarizing the A phase and the B phase of the encoder 1a may be transmitted.

図5は実施例2の全体の構成を説明する図であり、図6,図7、図8及び図9は実施例2を更に詳細に説明するものである。該図5において1bは正弦波インクリメンタルエンコーダで前記図1の正弦波インクリメンタルエンコーダ1aに1回転を識別するZ相信号を付加したものであり、2bは位相速度検出装置、4はコンパレータ、7は本実施例による原点検出器で、その他図1と同じ記号を付す3、5及び6はこれと同じ機能を有しその説明を割愛する。   FIG. 5 is a diagram for explaining the overall configuration of the second embodiment, and FIGS. 6, 7, 8, and 9 explain the second embodiment in more detail. In FIG. 5, 1b is a sine wave incremental encoder to which a Z-phase signal for identifying one rotation is added to the sine wave incremental encoder 1a of FIG. 1, 2b is a phase velocity detector, 4 is a comparator, and 7 is a main encoder. In the origin detector according to the embodiment, reference numerals 3, 5 and 6 denoted by the same reference numerals as those in FIG.

始めに、前記正弦波インクリメンタルエンコーダ1bは前記Z相信号を出力するもので、図6を参照してこれの説明を行う。該図6は前記正弦波インクリメンタルエンコーダ1bが出力する信号を説明し、該図6の(a)は前記図2の(a)と同じくA相とB相の出力の時間的推移を示しその説明は割愛する。次に、該図6の(b)は例えばLowレベルを0V、Highレベルを5Vとして前記正弦波インクリメンタルエンコーダ1bの出力するZ相の出力の時間的推移を示す。該図6の(b)で示すとおり、Z相は1回転毎にHighレベルとなり1回転を識別するものである。そして、前記図5において該正弦波インクリメンタルエンコーダ1bのZ相の出力は、前記位相速度検出装置2bが内蔵するコンパレータ4で波形整形され' 0' と' 1' に2値化された矩形Z相信号となり、後述する原点検出器7のPZ入力に送出される。   First, the sine wave incremental encoder 1b outputs the Z-phase signal, which will be described with reference to FIG. FIG. 6 illustrates the signal output from the sine wave incremental encoder 1b, and FIG. 6 (a) shows the temporal transition of the output of the A phase and the B phase as in FIG. 2 (a). Will be omitted. Next, FIG. 6B shows the temporal transition of the output of the Z phase output from the sine wave incremental encoder 1b, for example, with the Low level set to 0V and the High level set to 5V. As shown in FIG. 6 (b), the Z phase becomes a high level for each rotation and identifies one rotation. In FIG. 5, the output of the Z phase of the sine wave incremental encoder 1b is shaped by the comparator 4 built in the phase velocity detector 2b, and the waveform is shaped into a binary Z phase of '0' and '1'. A signal is sent to the PZ input of the origin detector 7 described later.

次に、図5の前記原点検出器7はP1入力、P2入力、PZ入力、CLK入力及びQZ出力を有し、該P1入力には前記パルス抽出器6のQ1出力から送出される前記正転パルスが入力され、前記P2入力には前記Q2出力からの前記逆転パルスが入力される。又、前記原点検出器7の前記PZ入力には前述するとおり前記コンパレータ4の出力が入力され、前記CLK入力には前記発信器5からの基準クロックCLKが入力される。そして、前記PZ入力に入力される前記矩形Z相信号はパルス幅が広いもしくは不定のものであるが、前記原点検出器7により正転方向に回転するときも逆転方向に回転するときも、前記正弦波インクリメンタルエンコーダ1bの同じ位相で発生する短いパルス幅の正確な基準原点信号を前記QZ出力から送出するものである。   Next, the origin detector 7 in FIG. 5 has a P1 input, a P2 input, a PZ input, a CLK input, and a QZ output, and the P1 input receives the normal rotation sent from the Q1 output of the pulse extractor 6. A pulse is input, and the reverse pulse from the Q2 output is input to the P2 input. Further, as described above, the output of the comparator 4 is input to the PZ input of the origin detector 7, and the reference clock CLK from the transmitter 5 is input to the CLK input. The rectangular Z-phase signal input to the PZ input has a wide or indefinite pulse width. However, when the origin detector 7 rotates in the forward direction or the reverse direction, An accurate reference origin signal having a short pulse width generated at the same phase of the sine wave incremental encoder 1b is transmitted from the QZ output.

次に図7を参照して、この原点検出器7の動作について更に詳細に説明する。始めに図7の(a)は前記正弦波インクリメンタルエンコーダ1bが正転及び逆転方向に回転するときのA相とB相の出力の時間的推移を示し、正転は時刻t3迄、逆転は時刻t3以降としている。そして、図7の(b)は前記正弦波インクリメンタルエンコーダ1bのZ相出力の時間的推移を前記図7の(a)のA相とB相の出力と対比して示しており、説明を容易とする為に正転のとき時刻t1からt2でZ相が出力した後、速やかに時刻t3で回転方向が逆転したとしている。ここで該図7の(b)において、正転のときの時刻t1における前記正弦波インクリメンタルエンコーダ1bの位相は、逆転のときの時刻t5における位相と同一であることに留意されたい。同様に正転のときの時刻t2における前記正弦波インクリメンタルエンコーダ1bの位相は、逆転のときの時刻t4における位相と同一であることに留意されたい。   Next, the operation of the origin detector 7 will be described in more detail with reference to FIG. First, FIG. 7A shows the temporal transition of the outputs of the A phase and the B phase when the sine wave incremental encoder 1b rotates in the normal rotation and reverse rotation directions. After t3. FIG. 7B shows the temporal transition of the Z-phase output of the sine wave incremental encoder 1b in comparison with the outputs of the A-phase and B-phase of FIG. Therefore, after the Z phase is output from time t1 to t2 at the time of forward rotation, the rotation direction is quickly reversed at time t3. Here, in FIG. 7B, it should be noted that the phase of the sinusoidal incremental encoder 1b at the time t1 during forward rotation is the same as the phase at the time t5 during reverse rotation. Similarly, it should be noted that the phase of the sine wave incremental encoder 1b at time t2 at the time of forward rotation is the same as the phase at time t4 at the time of reverse rotation.

次に、図7の(c)は前記原点検出器7のCLK入力の時間的推移を示し、該CLK入力の1周期をToscとしている。そして、図7の(d)は前記原点検出器7のQZ出力の時間的推移を示すもので、図示するとおり正転のときは時刻t1における前記Z相の立ち上がりに同期してパルス幅がToscの基準原点信号を生成し、逆転のときは時刻t5における前記Z相の立ち下がりに同期してパルス幅がToscの基準原点信号を生成し前記QZ出力とするものである。かように本実施例は、前記正弦波インクリメンタルエンコーダ1bの出力するZ相のパルス幅が広いものであっても短時間にパルス幅を定めた基準原点信号を生成すると共に、正転のときも逆転のときも前記正弦波インクリメンタルエンコーダ1bの同じ位相で、正確に前記基準原点信号を生成するものである。   Next, (c) of FIG. 7 shows the time transition of the CLK input of the origin detector 7, and one cycle of the CLK input is Tosc. FIG. 7 (d) shows the temporal transition of the QZ output of the origin detector 7. As shown in the figure, during normal rotation, the pulse width is Tosc in synchronization with the rise of the Z phase at time t1. The reference origin signal is generated, and at the time of reverse rotation, the reference origin signal having a pulse width of Tosc is generated in synchronization with the fall of the Z phase at time t5 and used as the QZ output. Thus, the present embodiment generates a reference origin signal having a pulse width defined in a short time even when the pulse width of the Z phase output from the sine wave incremental encoder 1b is wide, and also during forward rotation. Even in the case of reverse rotation, the reference origin signal is accurately generated with the same phase of the sine wave incremental encoder 1b.

かような前記原点検出器7の一実施例を図8に示し説明する。該図8において原点検出器7、P1入力、P2入力、PZ入力、CLK入力及びQZ出力は前記図5で説明するものと同じでその説明は割愛し、701、705、706及び707はNOTゲートであり、702はJKフリップフロップ、703及び704はDフリップフロップ、708及び709はANDゲート、710はORゲートである。始めに、前記JKフリップフロップ702は前記図5のパルス抽出器6が出力する正転パルスのP1入力と逆転パルスのP2入力をそれぞれK、J入力とし、これによりQ出力は前記正弦波インクリメンタルエンコーダ1bの回転方向を検出することとなり正転のときは0、逆転のときは1となる。そして、正転のときはNOTゲート705を経由して後述のANDゲート708を選択し、逆転のときは同じく後述のANDゲート709を選択する。ここで、K、J入力の前記正転パルスと前記逆転パルスが前記基準クロックCLKの立ち上がりに同期して変化する場合、該K,J入力のデータセットアップ時間を確保する為、便宜上、NOTゲート701を設け、前記基準クロックCLKの立ち下がりに同期してJKフリップフロップ702のQ出力に回転方向を送出するとしている。   An embodiment of the origin detector 7 will be described with reference to FIG. In FIG. 8, the origin detector 7, P1 input, P2 input, PZ input, CLK input and QZ output are the same as those described in FIG. 5, and the description thereof is omitted. 701, 705, 706 and 707 are NOT gates. 702 is a JK flip-flop, 703 and 704 are D flip-flops, 708 and 709 are AND gates, and 710 is an OR gate. First, the JK flip-flop 702 uses the P1 input of the forward pulse and the P2 input of the reverse pulse output from the pulse extractor 6 of FIG. 5 as the K and J inputs, respectively, so that the Q output becomes the sine wave incremental encoder. The rotation direction of 1b is detected, and is 0 for forward rotation and 1 for reverse rotation. When forward rotation, an after-mentioned AND gate 708 is selected via a NOT gate 705, and when reverse rotation, an later-described AND gate 709 is selected. Here, when the forward rotation pulse and the reverse rotation pulse of the K and J inputs change in synchronization with the rising edge of the reference clock CLK, in order to secure the data setup time of the K and J inputs, the NOT gate 701 is used for convenience. And the rotation direction is sent to the Q output of the JK flip-flop 702 in synchronization with the fall of the reference clock CLK.

同じく前記図8において、直列に接続された前記Dフリップフロップ703と704はPZ入力の前記矩形Z相信号の立ち上がりと立ち下がりを検出する為のものであり、前記ANDゲート708は前記Dフリップフロップ703と前記NOTゲート706の出力から正転のときの基準原点信号を生成し、前記ANDゲート709は前記Dフリップフロップ704と前記NOTゲート707の出力から逆転のときの基準原点信号を生成する。そして、前記ORゲート710に依り前記ANDゲート708と709の出力は1つにまとめられQZ出力に基準原点信号を出力することになる。   Similarly, in FIG. 8, the D flip-flops 703 and 704 connected in series are for detecting the rise and fall of the rectangular Z-phase signal of PZ input, and the AND gate 708 is the D flip-flop. A reference origin signal for forward rotation is generated from the outputs of 703 and the NOT gate 706, and the AND gate 709 generates a reference origin signal for reverse rotation from the outputs of the D flip-flop 704 and the NOT gate 707. The outputs of the AND gates 708 and 709 are combined into one according to the OR gate 710, and the reference origin signal is output to the QZ output.

前記図8の実施例について図9を参照しつつ更に説明する。該図9は原点検出器7の動作を説明するもので、図9の(a)は前記正弦波インクリメンタルエンコーダ1bが正転及び逆転方向に回転するときのA相とB相の出力の時間的推移を示し、時刻t1迄は正転、時刻t1以降は逆転方向に回転するものとしている。図9の(b)は前記原点検出器7の正転パルスであるP1入力を示すもので、前記図2の(e)で示した信号と同一であり説明は割愛し、同様に図9の(c)は前記原点検出器7の逆転パルスであるP2入力を示すもので、前記図3の(f)で示した信号と同一であり説明は割愛する。そして、図9の(d)と(e)はそれぞれ前記原点検出器7のPZ入力とQZ出力を示す。   The embodiment of FIG. 8 will be further described with reference to FIG. FIG. 9 illustrates the operation of the origin detector 7. FIG. 9 (a) shows the temporal output of the A phase and B phase when the sine wave incremental encoder 1b rotates in the forward and reverse directions. It is assumed that the rotation is normal until time t1 and rotates in the reverse direction after time t1. FIG. 9B shows the P1 input which is a normal rotation pulse of the origin detector 7, which is the same as the signal shown in FIG. 2E and will not be described. Similarly, FIG. (C) shows the P2 input which is a reverse pulse of the origin detector 7, which is the same as the signal shown in (f) of FIG. 3 and will not be described. 9D and 9E show the PZ input and QZ output of the origin detector 7, respectively.

ここで、前記図9の時間T1とT2の期間を拡大して、前記図9の(e)の基準原点信号のQZ出力を生成する経緯を次に説明する。図9の(f)、(g)及び(h)は前記図9の(b)、(c)及び(d)をそれぞれ拡大して示し、図9の(i)は基準クロックCLKが入力されるCLK入力を示し1周期をToscとしており、実用例を示せば基準クロックCLKが20MHzのときToscは僅か0.05μSとなる。
次に、図9の(j)は回転方向を検出する前記JKフリップフロップ702の出力を示し、例えば前記図9の(f)における時刻t40の正転パルスにより時刻t41において' 0' となり、逆転については前記図9の(g)における時刻t50の逆転パルスにより時刻t51において' 1' となる。かように前記JKフリップフロップ702の出力は前記正弦波インクリメンタルエンコーダ1bの回転方向を示し、時間T1における正転のときは前記NOTゲート705を経由して前記ANDゲート708を選択し、時間T2における逆転のときは前記ANDゲート709を選択する。
Here, the process of generating the QZ output of the reference origin signal of (e) of FIG. 9 by expanding the period of time T1 and T2 of FIG. 9 will be described. 9 (f), (g) and (h) are enlarged views of (b), (c) and (d) of FIG. 9, and (i) of FIG. 9 is inputted with the reference clock CLK. In the practical example, when the reference clock CLK is 20 MHz, Tosc is only 0.05 μS.
Next, (j) in FIG. 9 shows the output of the JK flip-flop 702 that detects the rotation direction. For example, the forward rotation pulse at time t40 in FIG. Is set to '1' at time t51 by the reverse pulse at time t50 in FIG. 9 (g). Thus, the output of the JK flip-flop 702 indicates the rotation direction of the sine wave incremental encoder 1b, and in the forward rotation at time T1, the AND gate 708 is selected via the NOT gate 705, and at time T2. In the case of reverse rotation, the AND gate 709 is selected.

次に、図9の(k)と(l)は前記Dフリップフロップ703と704の出力を示すが、該Dフリップフロップ703と704は前記PZ入力のシフターであり、従って前記図9の(h)の時刻t60におけるPZ入力の立ち上がりは前記図9の(k)においては時刻t61にて、前記図9の(l)においては時刻t62にて' 0' から' 1' となる。そして、正転のとき選択される前記ANDゲート708の出力は図9の(m)の時刻t61からt62で示すとおり' 1' となる。同様に前記図9の(h)の時刻t70におけるPZ入力の立ち下がりは前記図9の(k)においては時刻t71にて、前記図9の(l)においては時刻t72にて' 1' から' 0' となり、逆転のとき選択される前記ANDゲート709の出力は図9の(n)の時刻t71からt72で示すとおり' 1' となるものである。   9 (k) and (l) show the outputs of the D flip-flops 703 and 704. The D flip-flops 703 and 704 are shifters of the PZ input. The rising edge of the PZ input at time t60 changes from “0” to “1” at time t61 in FIG. 9K and at time t62 in FIG. The output of the AND gate 708 selected at the time of normal rotation becomes “1” as shown from time t61 to time t62 in FIG. Similarly, the fall of the PZ input at time t70 in FIG. 9 (h) starts from “1” at time t71 in FIG. 9 (k), and at time t72 in FIG. 9 (l). The output of the AND gate 709 selected at the time of reverse rotation becomes “1” as shown from time t71 to t72 in FIG. 9 (n).

そして、前記ANDゲート708と709の出力は、前記ORゲート710により図9の(o)に示す如くパルス幅Toscの基準原点信号となりQZ出力に送出されるものである。かように、前記図9の(e)に示したQZ出力の生成について前記図9の(f)から(o)で説明した。ここで、前記図9の(a)と(e)において、正転のときQZが' 1' となる時刻t2における前記正弦波インクリメンタルエンコーダ1bの位相と、逆転のときQZが' 1' となる時刻t3における前記正弦波インクリメンタルエンコーダ1bの位相は等しいものであり、これにより、前記正弦波インクリメンタルエンコーダ1bの1回転の原点を正転のときも逆転のときも等しく検出するものである。又、前記図9の(d)で示すとおりPZ入力の' 1' であるパルス幅が長いものであっても、前記図9の(e)と(o)で示す基準原点信号となるQZ出力は、前記基準クロックCLKによりパルス幅がToscと充分に短いものであり、これにより、前記正弦波インクリメンタルエンコーダ1bの1回転の原点を精度良く検出するものである。なお、これまでの説明では前記図(d)と(e)に示すとおり、基準原点信号は正転のときはZ相信号の先端から逆転のときは後端から得るとしたが、これに換えて正転のときはZ相信号の後端から逆転のときは先端から得るとしても良いのは明かである。   The outputs of the AND gates 708 and 709 are output to the QZ output by the OR gate 710 as a reference origin signal having a pulse width Tosc as shown in FIG. As described above, the generation of the QZ output shown in FIG. 9E has been described with reference to FIGS. Here, in FIGS. 9A and 9E, the phase of the sinusoidal incremental encoder 1b at time t2 when QZ becomes '1' during forward rotation and QZ becomes '1' during reverse rotation. The phases of the sine wave incremental encoder 1b at the time t3 are equal, and thereby the origin of one rotation of the sine wave incremental encoder 1b is detected equally during forward rotation and reverse rotation. Further, as shown in FIG. 9 (d), even if the pulse width of PZ input “1” is long, the QZ output serving as the reference origin signal shown in FIGS. 9 (e) and 9 (o) is The pulse width of the reference clock CLK is sufficiently short as Tosc, thereby detecting the origin of one rotation of the sine wave incremental encoder 1b with high accuracy. In the above description, the reference origin signal is obtained from the front end of the Z-phase signal at the forward rotation and from the rear end at the reverse rotation as shown in FIGS. Obviously, it may be obtained from the rear end of the Z-phase signal during forward rotation and from the front end during reverse rotation.

図10は実施例3の全体の構成を説明する図であり、図11と図12は実施例3を更に詳細に説明するものである。始めに該図10において2cは位相速度検出装置、8は本実施例によるパルス位相検出器で、その他図5と同じ記号を付す1b、3、4、5、6及び7はこれと同じ機能を有しその説明を割愛する。   FIG. 10 is a diagram illustrating the overall configuration of the third embodiment, and FIGS. 11 and 12 illustrate the third embodiment in more detail. First, in FIG. 10, 2c is a phase velocity detector, 8 is a pulse phase detector according to this embodiment, and 1b, 3, 4, 5, 6 and 7 having the same symbols as those in FIG. 5 have the same functions. I will omit the explanation.

そして、前記位相速度検出装置2cは本実施例によるパルス位相検出器8を内蔵し、該パルス位相検出器8はP1入力、P2入力、PZ入力及びjビットデータサイズのパルス位相出力を有し、該P1入力には前記パルス抽出器6のQ1出力から送出される正転パルスが入力され、前記P2入力には前記パルス抽出器6のQ2出力からの逆転パルスが入力される。又、前記PZ入力には前記原点検出器7から回転方向が正転であっても逆転であっても、前記正弦波インクリメンタルエンコーダ1bの正確な基準原点信号が入力される。これにより、前記パルス位相検出器8は正転方向及び逆転方向に回転するときも、前記正弦波インクリメンタルエンコーダ1bの正確なパルス位相を出力するものである。   The phase velocity detector 2c incorporates a pulse phase detector 8 according to this embodiment, and the pulse phase detector 8 has a P1 input, a P2 input, a PZ input, and a pulse phase output of j-bit data size, A forward rotation pulse transmitted from the Q1 output of the pulse extractor 6 is input to the P1 input, and a reverse rotation pulse from the Q2 output of the pulse extractor 6 is input to the P2 input. In addition, an accurate reference origin signal of the sine wave incremental encoder 1b is input to the PZ input from the origin detector 7 regardless of whether the rotation direction is normal rotation or reverse rotation. Thereby, the pulse phase detector 8 outputs an accurate pulse phase of the sine wave incremental encoder 1b even when rotating in the forward direction and the reverse direction.

次に、図11は前記パルス位相検出器8の一実施例を示すもので、該図11において801はアップ・ダウンカウンタ、802は係数器、803は加算器及び804はセレクタである。そして、前記アップ・ダウンカウンタ801は、前記P1入力をUP入力によりアップカウントし前記P2入力をDOWN入力によりダウンカウントするもので、前記P1入力には前記図2の(e)で説明する前記パルス抽出器6のQ1出力から送出される正転パルスが入力されるものである。ここで、以下の説明を容易とする為に実用例を示せば、前記正弦波インクリメンタルエンコーダ1bは1回転当たり512サイクルのA相又はB相の正弦波を発生し、これを×4逓倍して正転パルスを生成するとすれば1回転の最大パルス数は2048となる。
そして、この正転パルスを計数することにより、前記正弦波インクリメンタルエンコーダ1bの回転位相は、1回転が0から最大パルス位相が2047の範囲で検出できることとなる。そして、2047を16進数で表記すれば7FFhであり2進数では111、1111、1111bと最大11ビットのデータサイズとなるが、このとき、前記アップ・ダウンカウンタ801の計数するカウント値の最大は11ビットを越えて大きい、例えば16ビットとするものである。なお、本発明において16進数で数値を表記するときは数値の末尾に' h' を、2進数で数値を表記するときは数値の末尾に' b' を添えるものとする。
FIG. 11 shows an embodiment of the pulse phase detector 8. In FIG. 11, 801 is an up / down counter, 802 is a coefficient unit, 803 is an adder, and 804 is a selector. The up / down counter 801 counts up the P1 input by UP input and down-counts the P2 input by DOWN input. The P1 input has the pulse described in FIG. 2 (e). The forward rotation pulse sent from the Q1 output of the extractor 6 is inputted. Here, in order to facilitate the following explanation, a practical example will be shown. The sine wave incremental encoder 1b generates a 512-cycle A-phase or B-phase sine wave per rotation, which is multiplied by x4. If a normal rotation pulse is generated, the maximum number of pulses per rotation is 2048.
By counting the forward rotation pulses, the rotation phase of the sine wave incremental encoder 1b can be detected in the range of 0 for one rotation to 2047 for the maximum pulse phase. When 2047 is expressed in hexadecimal, it is 7FFh, and in binary, 111, 1111, and 1111b have a maximum data size of 11 bits. At this time, the maximum count value counted by the up / down counter 801 is 11 It is larger than the bits, for example, 16 bits. In the present invention, when a numerical value is expressed in hexadecimal, 'h' is added to the end of the numerical value, and when a numerical value is expressed in binary number, 'b' is added to the end of the numerical value.

次に、前記P2入力には、前記図3の(f)で説明する前記パルス抽出器6のQ2出力から送出される逆転パルスが入力され、前記アップ・ダウンカウンタ801のDOWN入力への信号となる。そして、前記正弦波インクリメンタルエンコーダ1bが逆転方向に回転するとき、前記アップ・ダウンカウンタ801が16ビットデータサイズとすれば、カウント値は例えば次のとおりダウンカウントする。
0001h
0000h
FFFFh
FFFEh=1111、1111、1111,1110b・・・・(11)式
ここで、前記アップ・ダウンカウンタ801のデータサイズは充分大きく選定しているので該カウント値はダウンカウントによりゼロとなることはなく、後述するRST入力により1回転毎にゼロにリセットされるものであり、これにより前記カウント値の最上位ビット(以下、MSBと称す)は必ず符号ビットとなる。
Next, the P2 input is inputted with a reverse pulse sent from the Q2 output of the pulse extractor 6 described in FIG. 3 (f), and a signal to the DOWN input of the up / down counter 801 Become. When the sine wave incremental encoder 1b rotates in the reverse direction, if the up / down counter 801 has a 16-bit data size, the count value is counted down as follows, for example.
0001h
0000h
FFFFh
FFFEh = 1111, 1111, 1111, 1110b (11) Here, since the data size of the up / down counter 801 is selected to be sufficiently large, the count value does not become zero due to the down count. The RST input, which will be described later, is reset to zero every rotation, and as a result, the most significant bit (hereinafter referred to as MSB) of the count value is always a sign bit.

前記アップ・ダウンカウンタ801が出力するカウント値について、以上で説明したことを要約すれば、前記正弦波インクリメンタルエンコーダ1bが1回転することにより検出するパルス位相の最大値をiビットのデータサイズとすれば、前記アップ・ダウンカウンタ801が計数するカウント値はiビットを充分に越えるjビットのデータサイズとするものである。   Summarizing the above description of the count value output by the up / down counter 801, the maximum value of the pulse phase detected by one rotation of the sine wave incremental encoder 1b is taken as the i-bit data size. For example, the count value counted by the up / down counter 801 has a data size of j bits sufficiently exceeding i bits.

次に前記図11において、前記アップ・ダウンカウンタ801が出力するjビットのカウント値は、前記セレクタ804と加算器803に送られる。ここで、該図11において数値データの流れは太線で示すものであり、本発明の他の図の説明においても同様とする。そして、係数器802は前記正弦波インクリメンタルエンコーダ1bの最大パルス位相をPmaxとすれば、これに1を加算した(Pmax+1)となる1回転当たりの最大パルス数なる定数を出力する。これを具体例により示せば、最大パルス位相Pmaxが2047のとき係数器802は最大パルス数2048を出力するものである。   Next, in FIG. 11, the j-bit count value output from the up / down counter 801 is sent to the selector 804 and the adder 803. Here, the flow of numerical data in FIG. 11 is indicated by a bold line, and the same applies to the description of other figures of the present invention. Then, if the maximum pulse phase of the sine wave incremental encoder 1b is Pmax, the coefficient unit 802 outputs a constant that is the maximum number of pulses per rotation that is obtained by adding 1 to this (Pmax + 1). If this is shown by a specific example, the coefficient unit 802 outputs the maximum number of pulses 2048 when the maximum pulse phase Pmax is 2047.

そして、前記加算器803は前記アップ・ダウンカウンタ801の出力と前記係数器802の出力を加算したデータを前記セレクタ804に出力し、前記セレクタ804はA1からAjからなるA入力に、前述のとおり前記アップ・ダウンカウンタ801が出力するカウント値を入力し、B1からBjからなるB入力に、前記加算器803が出力するデータを入力する。そして、該セレクタ804はS入力に' 0' が入力されたときはA入力を選択し、S入力に' 1' が入力されたときはB入力を選択してQ1からQjよりなるQ出力へ出力し、これにより、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときも、逆転方向に回転するときも常に正しくパルス位相を検出するものである。   The adder 803 outputs the data obtained by adding the output of the up / down counter 801 and the output of the coefficient unit 802 to the selector 804, and the selector 804 changes the A input from A1 to Aj as described above. The count value output from the up / down counter 801 is input, and the data output from the adder 803 is input to the B input composed of B1 to Bj. The selector 804 selects the A input when “0” is input to the S input, and selects the B input when “1” is input to the S input to change the Q output from Q1 to Qj. Thus, the pulse phase is always detected correctly both when the sine wave incremental encoder 1b rotates in the forward direction and when it rotates in the reverse direction.

次に、図12により前記図11の一実施例の動作について更に説明する。図12の(a)は前記P1入力の正転パルスの時間的推移を示し、時刻t3迄と時刻t8以降において正転パルスが入力されるとし、図12の(b)は前記P2入力の逆転パルスの時間的推移を示し、時刻t4から時刻t7迄逆転パルスが入力されるとし、図12の(c)は前記PZ入力の状態を示し時刻t1、t2,t5,t6及びt9で1回転の原点を検出し' 1' になるとしている。
そして、図12の(d)は前記アップ・ダウンカウンタ801が出力するカウント値を示し、正転のときは例えば時刻t1からカウントアップし、時刻t2において最大パルス位相Pmaxに達すると共に前記PZ入力によりいったんゼロにリセットされつつカウントアップを継続し、逆転のときは時刻t4よりカウントダウンし、時刻t5においてカウント値はゼロになると共に前記PZ入力によってもゼロとなる。
そして、時刻t5以降は前記(11)式で説明したとおり負の方向にカウントダウンを継続し、時刻t6において負の最大パルス位相(−Pmax)に達すると共に、前記PZ入力により一旦ゼロにリセットされつつカウントダウンを継続する。かように、前記図12の(d)で示すとおり前記アップ・ダウンカウンタ801の出力は、前記正弦波インクリメンタルエンコーダ1bの位相を正負で検出するものである。
Next, the operation of the embodiment of FIG. 11 will be further described with reference to FIG. 12A shows the temporal transition of the forward rotation pulse of the P1 input, and it is assumed that the forward rotation pulse is input until time t3 and after time t8, and FIG. 12B shows the reverse rotation of the P2 input. FIG. 12 (c) shows the state of the PZ input and shows one rotation at times t1, t2, t5, t6 and t9. It is assumed that the origin is detected and becomes “1”.
FIG. 12 (d) shows the count value output by the up / down counter 801. In normal rotation, for example, it counts up from time t1, reaches the maximum pulse phase Pmax at time t2, and at the time of the PZ input. The counter continues to count up while being reset to zero, and at the time of reverse rotation, it counts down from time t4. At time t5, the count value becomes zero and also becomes zero by the PZ input.
After time t5, the countdown continues in the negative direction as described in the above equation (11), reaches the negative maximum pulse phase (−Pmax) at time t6, and is once reset to zero by the PZ input. Continue the countdown. Thus, as shown in FIG. 12 (d), the output of the up / down counter 801 detects the phase of the sine wave incremental encoder 1b positively or negatively.

次に、図12の(e)は前記アップ・ダウンカウンタ801の出力のMSBであるQjのワンビット出力、すなわち前記セレクタ804のS入力を示し、該Qj出力は前記図12の(d)に示すカウント値が正のとき' 0' 、負のとき' 1' となる。
そして、図12の(f)は前記セレクタ804の出力、すなわち前記パルス位相検出器8が出力するパルス位相の時間的推移を示し、時刻t5迄は前記セレクタ804のS入力は' 0' であることより、前記アップ・ダウンカウンタ801の出力がそのままパルス位相として前記セレクタ804の出力となり、時刻t5以降は前記セレクタ804のS入力は' 1' であることより、前記加算器803の出力がパルス位相として前記セレクタ804の出力となる。
ここで、前記係数器802の出力値を(Pmax+1)とすれば、
(Pmax+1)−アップ・ダウンカウンタ801の出力・・・・(12)式
なる値が前記加算器803の出力となり、前記図12の(f)の時刻t5以降で示すとおりパルス位相は正数で得ることができる。
又、前記図12の(f)の時刻t6においてPZ入力が' 1' となるとき、逆転のときはパルス位相が最大パルス位相にプリセットされるべきものであるが、前記図12の(d)の時刻t6で示すとおり、前記アップ・ダウンカウンタ801は正転のときと同様にゼロにリセットするのみで、簡単な構成で前記正弦波インクリメンタルエンコーダ1bのパルス位相検出器を実現するものである。
Next, (e) in FIG. 12 shows the one-bit output of Qj which is the MSB of the output of the up / down counter 801, that is, the S input of the selector 804, and the Qj output is shown in (d) of FIG. When the indicated count value is positive, it is “0”, and when it is negative, it is “1”.
12 (f) shows the temporal transition of the output of the selector 804, that is, the pulse phase output from the pulse phase detector 8. The S input of the selector 804 is '0' until time t5. As a result, the output of the up / down counter 801 is directly used as the pulse phase as the output of the selector 804. After time t5, the S input of the selector 804 is '1', so that the output of the adder 803 is pulsed. The phase is the output of the selector 804.
Here, if the output value of the coefficient multiplier 802 is (Pmax + 1),
(Pmax + 1) −output of up / down counter 801... (12) is the output of the adder 803, and the pulse phase is a positive number as shown after time t5 in FIG. Obtainable.
In addition, when the PZ input becomes '1' at time t6 in FIG. 12 (f), the pulse phase should be preset to the maximum pulse phase in the case of reverse rotation. As shown at time t6, the up / down counter 801 simply resets to zero as in the normal rotation, and realizes the pulse phase detector of the sine wave incremental encoder 1b with a simple configuration.

かように本実施例は、前記アップ・ダウンカウンタ801のカウント値のデータサイズを最大パルス位相よりも充分大きくすることを特徴とし、これにより前記正弦波インクリメンタルエンコーダ1bの最大パルス位相が異なるものを使用するときも、前記係数器802の値を変更するのみでパルス位相を検出可能とし、又、前記アップ・ダウンカウンタ801のカウント値が負のときは該カウント値のMSBを用いることにより前記(12)式による位相をパルス位相とし、正転のときのみならず逆転のときも常に正のパルス位相を得るものである。
又、正転のときのみならず逆転方向に回転するときも、前記PZ入力により前記アップ・ダウンカウンタ801のカウント値をゼロにリセットすればよい特徴がある。そして、前記パルス位相検出器8のPZ入力には、前記図7の(d)において説明した正転のときも逆転のときも、前記正弦波インクリメンタルエンコーダ1bの同じ位相で生成される極めてパルス幅の狭い基準原点信号が供給されているので、超高精度の回転位相を検出できる特徴がある。
Thus, the present embodiment is characterized in that the data size of the count value of the up / down counter 801 is sufficiently larger than the maximum pulse phase, whereby the maximum pulse phase of the sine wave incremental encoder 1b is different. When used, it is possible to detect the pulse phase only by changing the value of the coefficient unit 802. When the count value of the up / down counter 801 is negative, the MSB of the count value is used. The phase according to the equation (12) is used as a pulse phase, and a positive pulse phase is always obtained not only during forward rotation but also during reverse rotation.
Further, there is a feature that the count value of the up / down counter 801 may be reset to zero by the PZ input not only in the normal rotation but also in the reverse rotation direction. The PZ input of the pulse phase detector 8 has an extremely pulse width generated at the same phase of the sine wave incremental encoder 1b during the forward rotation and the reverse rotation described in FIG. Since a narrow reference origin signal is supplied, there is a feature that the rotational phase can be detected with extremely high accuracy.

図13は本発明の請求項、請求項、請求項及び請求項に関わる実施例4の全体の構成を説明するものであり、図14は前記図13の全体の動作を説明する図である。始めに前記図13において、2dは位相速度検出装置、9はマイクロプロセッサ又はデジタルシグナルプロセッサなどを使用するものであるが以下の説明においてはマイクロコントローラと称し、10はパラレル出力ポート、11及び12はパラレル入力ポート、13及び14はA/D変換器であり、その他前記図10と同じ記号を付すものはこれと同じ機能を有しその説明を割愛する。 FIG. 13 illustrates the overall configuration of the fourth embodiment related to claims 2 , 3 , 4, and 5 of the present invention, and FIG. 14 illustrates the overall operation of FIG. 13. FIG. First, in FIG. 13, 2d uses a phase velocity detector, 9 uses a microprocessor or digital signal processor, but in the following description, it is called a microcontroller, 10 is a parallel output port, 11 and 12 are The parallel input ports 13 and 14 are A / D converters, and those having the same symbols as those in FIG. 10 have the same functions and will not be described.

そして、前記マイクロコントローラ9のD1からDnはデータバスをCはリード、ライト信号及びアドレスなどのコントロール信号を表し、前記パラレル出力ポート10及び前記パラレル入力ポート11、12においてDを付すものはデータ入力を、Qを付すものはデータ出力を示し、Cはコントロール信号の入力を示す。
又、A/D変換器13及び14はそれぞれ前記正弦波インクリメンタルエンコーダ1bのA相信号とB相信号を入力し、ST入力がアクティブになるとA/D変換を実行して、アナログの正弦波である前記A相信号とB相信号をデジタル値に変換したA相デジタル値とB相デジタル値をD1からDk出力へ送出し、Cはコントロール信号の入力を示すものである。
そして、前記マイクロコントローラ9は前記パラレル入力ポート11経由で前記パルス位相検出器8が出力するパルス位相を、前記パラレル入力ポート12経由で前記パルス抽出器6が出力する前記シンクロA相信号とシンクロB相信号を、前記パラレル出力ポート10経由で前記A/D変換器13及び14のST入力をアクティブとして、前記A相デジタル値とB相デジタル値を連続して入力する。これにより、前記マイクロコントローラ9は前記正弦波インクリメンタルエンコーダ1bの回転位相を精度良く検出するものである。 ここで、前記マイクロコントローラ9のC出力、パラレル出力ポート10のC入力、パラレル入力ポート11、12のC入力及びA/D変換器13、14のC入力は、リード、ライト信号やアドレス信号など通常、マイクロコントローラを使用するときのコントロール信号を表し説明を割愛する。
D1 to Dn of the microcontroller 9 represent a data bus, C represents a control signal such as a read signal, a write signal, and an address, and the parallel output port 10 and the parallel input ports 11 and 12 with D are data inputs. , Q indicates data output, and C indicates control signal input.
The A / D converters 13 and 14 respectively receive the A phase signal and the B phase signal of the sine wave incremental encoder 1b. When the ST input becomes active, the A / D converters 13 and 14 execute A / D conversion to generate an analog sine wave. An A-phase digital value and a B-phase digital value obtained by converting a certain A-phase signal and B-phase signal into digital values are sent from D1 to Dk output, and C indicates an input of a control signal.
The microcontroller 9 outputs the pulse phase output from the pulse phase detector 8 via the parallel input port 11 and the synchro A phase signal and synchro B output from the pulse extractor 6 via the parallel input port 12. For the phase signal, the ST input of the A / D converters 13 and 14 is made active via the parallel output port 10 and the A phase digital value and the B phase digital value are continuously input. Thereby, the microcontroller 9 detects the rotational phase of the sine wave incremental encoder 1b with high accuracy. Here, the C output of the microcontroller 9, the C input of the parallel output port 10, the C input of the parallel input ports 11 and 12, and the C input of the A / D converters 13 and 14 are read, write signals, address signals, etc. Usually, it represents a control signal when the microcontroller is used, and a description thereof will be omitted.

次に、請求項からの本発明について説明する前に、図14により前記図13の全体の動作について予め説明する。図14の(a)は前記正弦波インクリメンタルエンコーダ1bのA相とB相出力の時間的推移を表し、時刻t3において前記A/D変換器13、14の変換値であるA相デジタル値とB相デジタル値をそれぞれa1、b1としている。
又、該図14の(a)に対応して、図14の(b)と(c)は前記パルス抽出機6が出力する前記シンクロA相信号QAとシンクロB相信号QBの時間的推移を表し、図14の(d)は前記原点検出器7が出力する前記基準原点信号QZの時間的推移を、図14の(e)は前記パルス位相検出器8が出力するパルス位相の時間的推移を示す。
そして、該図14の(d)の時刻t4においてQZは' 1' になるとし、このとき前記図14の(e)においてパルス位相はゼロにリセットされるものである。更に、該図14の(e)において時刻t1にて前記パルス位相は(c−4)とし、以降は前記図14の(b)のQAと図14の(c)のQBの変化と共に+1ずつカウントアップし、時刻t2においては(c+2)、時刻t3においては(c+6)となり、前述のとおり時刻t4においてゼロとなり、以降は1,2・・・と推移するものである。なお、該図14の(e)において前記パルス位相は、前記正弦波インクリメンタルエンコーダ1bのA相とB相の一周期を便宜的に4逓倍して検出する例で示している。
Next, before describing the present invention from claim 2, the entire operation of FIG. 13 will be described in advance with reference to FIG. FIG. 14A shows the temporal transition of the A-phase and B-phase outputs of the sine wave incremental encoder 1b, and the A-phase digital values and B converted as the conversion values of the A / D converters 13 and 14 at time t3. The phase digital values are a1 and b1, respectively.
Corresponding to (a) of FIG. 14, (b) and (c) of FIG. 14 show temporal transitions of the synchro A phase signal QA and synchro B phase signal QB output from the pulse extractor 6. 14D shows the time transition of the reference origin signal QZ output from the origin detector 7, and FIG. 14E shows the time transition of the pulse phase output from the pulse phase detector 8. FIG. Indicates.
Then, QZ becomes '1' at time t4 in FIG. 14 (d), and at this time, the pulse phase is reset to zero in FIG. 14 (e). Further, in FIG. 14 (e), the pulse phase is set to (c-4) at time t1, and thereafter, +1 is incremented with QA in FIG. 14 (b) and QB in FIG. 14 (c). The counter counts up to (c + 2) at time t2, (c + 6) at time t3, and reaches zero at time t4 as described above. 14 (e) shows an example in which the pulse phase is detected by multiplying one cycle of the A phase and the B phase of the sine wave incremental encoder 1b by four for convenience.

次に、図14の(f)は前記正弦波インクリメンタルエンコーダ1bの仮想上の補間位相の時間的推移を模擬的に示し、図14の(g)は前記マイクロコントローラ9が、前記正弦波インクリメンタルエンコーダ1bの回転位相を検出するタイミングを示す。
始めに、前記図14の(e)で示す前記パルス位相は、前記正弦波インクリメンタルエンコーダ1bのA相とB相の一周期を4逓倍して計数するものであり、図14の(f)は前記パルス位相の最下位ビット(該A相とB相の一周期の4分の1以下)の補間位相の仮想上の時間的推移を示す。
これを更に説明すれば、前記図14の(a)において時間T3で示す区間が一周期の4分の1であり、この区間の補間位相は前記図14の(f)の時間T3に示す如くゼロからαmaxの間で推移するものである。
そして、該マイクロコントローラ9は、前記図13に図示しない電動機の制御など種々のジョブをも実行するものであるが、1スキャン毎に前記正弦波インクリメンタルエンコーダ1bの回転位相の検出を、例えば前記図14の(g)に示す時刻t1、t2及びt3にて処理を行うとしている。
そして、該回転位相の検出の為に、前記マイクロコントローラ9は前記パルス位相検出器8が出力するパルス位相と、前記A/D変換器13と14が出力するA相デジタル値とB相デジタル値を連続して入力し、前記補間位相の検出は前記図14の(a)の時刻t3で入力したa1とb1から前記(1)式により例えばαを得るものである。
かように、粗い位相として前記パルス位相を、密な位相として補間位相を検出し、前記図32の(a)による前記正弦波インクリメンタルエンコーダ1bの回転位相を超高精度で得ることとなる。
Next, (f) of FIG. 14 schematically shows temporal transition of the virtual interpolation phase of the sine wave incremental encoder 1b, and (g) of FIG. 14 shows the sine wave incremental encoder. The timing which detects the rotational phase of 1b is shown.
First, the pulse phase shown in (e) of FIG. 14 is obtained by multiplying one cycle of the A phase and the B phase of the sine wave incremental encoder 1b by four, and (f) of FIG. The virtual temporal transition of the interpolation phase of the least significant bit of the pulse phase (less than one quarter of one cycle of the A phase and the B phase) is shown.
To explain this further, the section shown at time T3 in FIG. 14A is a quarter of one cycle, and the interpolation phase of this section is as shown at time T3 in FIG. 14F. It changes between zero and αmax.
The microcontroller 9 also executes various jobs such as control of an electric motor (not shown in FIG. 13), and the rotation phase of the sine wave incremental encoder 1b is detected for each scan. It is assumed that the processing is performed at times t1, t2, and t3 shown in FIG.
For detecting the rotational phase, the microcontroller 9 detects the pulse phase output from the pulse phase detector 8, the A phase digital value and the B phase digital value output from the A / D converters 13 and 14. The interpolation phase is detected by obtaining, for example, α from the a1 and b1 input at time t3 in FIG.
Thus, the pulse phase is detected as a coarse phase and the interpolation phase is detected as a fine phase, and the rotational phase of the sine wave incremental encoder 1b shown in FIG. 32A is obtained with extremely high accuracy.

ここで、前記正弦波インクリメンタルエンコーダ1bの回転位相を超高精度で得る為には、例えば前記図14の(e)の時刻t3において、パルス位相(C+6)と補間位相αの組み合わせを正しく検出しなければならず、前記位相速度検出装置2dを構成する電子部品のばらつきが有るときも、前記正弦波インクリメンタルエンコーダ1bが高速で回転するときも、前記パルス位相を時間T3の始めの時刻においては(C+5)と 又、時間T3の終わりの時刻においては(C+7)と誤って検出してはならない。
以上のとおり実施例4について説明を明かとする為、始めに前記図13の全体の動作について前記図14を参照しつつ説明を行ったものであるが、以下に請求項に関する発明から順次説明を行う。
Here, in order to obtain the rotational phase of the sine wave incremental encoder 1b with extremely high accuracy, for example, at time t3 in FIG. 14E, the combination of the pulse phase (C + 6) and the interpolation phase α is correctly detected. Even when there are variations in the electronic components constituting the phase velocity detection device 2d and when the sine wave incremental encoder 1b rotates at a high speed, the pulse phase is set at the beginning of time T3 ( C + 5) and at the time of the end of time T3, it should not be erroneously detected as (C + 7).
To a clear explanation for Example 4 As described above, although the overall operation of the Figure 13 at the beginning that has been described with reference to FIG. 14, sequentially from the invention relates to claim 2 below description I do.

図15は前記図13における前記コンパレータ3の動作を説明するもので、図15の(a)は前記正弦波インクリメンタルエンコーダ1bが正転のときのA相とB相の出力の時間的推移を示し、これに対応して図15の(b)と(c)は、A相とB相の前記コンパレータ3の出力を前記パルス抽出器6で保持したシンクロA相信号QAとシンクロB相信号QBの時間的推移を示す。
そして、前記コンパレータ3は入力がVh以上で' 1' となり入力がVl未満で' 0' となるものであるが、前記図15はVhがVlを越えて大きいときの動作を示すものであって、例えば前記図15の(a)の時刻t1においては前記正弦波インクリメンタルエンコーダ1bのA相がVhを越えるので、前記図15の(b)に示すとおりシンクロA相信号QAは' 0' から' 1' となり、時刻t2においてはA相がVl未満となるので、前記図15の(b)に示すとおりシンクロA相信号QAは' 1' から' 0' となる。
以上はA相について説明したが、B相のシンクロB相信号QBについても同様に前記図15の(c)に示す如くとなり、該シンクロB相信号QBが前記QAより90°進みとなる。ここで、図15の(d)、(e)及び(f)は前記正弦波インクリメンタルエンコーダ1bが逆転方向に回転する場合でこれの説明は後述する。
FIG. 15 illustrates the operation of the comparator 3 in FIG. 13. FIG. 15 (a) shows the temporal transition of the output of the A phase and the B phase when the sine wave incremental encoder 1b is rotating forward. Correspondingly, (b) and (c) of FIG. 15 show the sync A phase signal QA and the sync B phase signal QB in which the outputs of the A phase and B phase comparators 3 are held by the pulse extractor 6. Shows the time transition.
The comparator 3 is “1” when the input is Vh or more and becomes “0” when the input is less than Vl. FIG. 15 shows the operation when Vh is greater than Vl. For example, since the A phase of the sine wave incremental encoder 1b exceeds Vh at time t1 in FIG. 15A, the synchro A phase signal QA is changed from '0' to '0' as shown in FIG. 15B. Since the A phase becomes less than V1 at time t2, the synchronized A phase signal QA changes from '1' to '0' as shown in FIG. 15 (b).
Although the above description has been made on the A phase, the sync B phase signal QB of the B phase is similarly as shown in FIG. 15C, and the sync B phase signal QB is advanced by 90 ° from the QA. Here, (d), (e), and (f) in FIG. 15 are cases where the sine wave incremental encoder 1b rotates in the reverse direction, which will be described later.

次に、図16は前記コンパレータ3が前記図15の(a)、(b)及び(c)で示す特性を有して、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転し、A相とB相の出力がゼロ付近をクロスするとき、本発明による前記パルス位相検出器8が検出するパルス位相の補正を説明するもので、図16の(a)、(b)及び(c)は、前記図15の(a)、(b)及び(c)と同じくそれぞれ前記正弦波インクリメンタルエンコーダ1bのA相とB相の出力、前記パルス抽出器6が出力するシンクロA相信号QA及びシンクロB相信号QBを示す。   Next, FIG. 16 shows that the comparator 3 has the characteristics shown in (a), (b) and (c) of FIG. 15, and that the sine wave incremental encoder 1b rotates in the forward rotation direction. FIG. 16A, FIG. 16B and FIG. 16C illustrate correction of the pulse phase detected by the pulse phase detector 8 according to the present invention when the output of the B phase crosses near zero. 15A, 15B and 15C, respectively, the outputs of the A and B phases of the sine wave incremental encoder 1b, the synchro A phase signal QA and the synchro B phase output from the pulse extractor 6, respectively. Signal QB is shown.

始めに図16の(a)において、前記図13における前記マイクロコントローラ9が、前記A/D変換器13及び14から入力する前記A相デジタル値と前記B相デジタル値をそれぞれVA、VBと表記する。そして、前記マイクロコントローラ9はプログラムにより図示しない仮想コンパレータvaとvbを内蔵し、前記A相デジタル値VAが正のときは前記仮想コンパレータvaを' 1' とし負のときは該vaを' 0' とし、同様に前記B相デジタル値VBが正のときは前記仮想コンパレータvbを' 1' とし負のときは該vbを' 0' とするものである。   First, in FIG. 16A, the microcontroller 9 in FIG. 13 represents the A-phase digital value and the B-phase digital value input from the A / D converters 13 and 14 as VA and VB, respectively. To do. The microcontroller 9 incorporates virtual comparators va and vb (not shown) by a program. When the A-phase digital value VA is positive, the virtual comparator va is '1', and when it is negative, the va is '0'. Similarly, when the B-phase digital value VB is positive, the virtual comparator vb is '1', and when it is negative, vb is '0'.

次に、図16の(a)と(b)について説明すると、時刻t1において前記A相デジタル値VAは負なので前記仮想コンパレータvaは' 0' となり前記シンクロA相信号QAも' 0' で、該vaとQAは一致するので、前記パルス位相は正しいものとし補正を行わない。次に、時刻t2において前記A相デジタル値VAは正なので前記仮想コンパレータvaは' 1' となり、一方、前記シンクロA相信号QAは' 0' で、該vaとQAは不一致なので前記パルス位相は補正が必要であり、前記A相デジタル値VAが正で前記シンクロA相信号QAより進んでいるので前記パルス位相に1を加える補正を行い、時刻t3においては、前記A相デジタル値VAは正なので前記仮想コンパレータvaは' 1' となり前記シンクロA相信号QAも' 1' で、該vaとQAは一致するので前記パルス位相は正しいものとし補正を行わない。
同様に、時刻t4において前記A相デジタル値VAは正なので前記仮想コンパレータvaは' 1' となり前記シンクロA相信号QAも' 1' で、該vaとQAは一致するので前記パルス位相は正しいものとし補正を行わず、時刻t5においては、前記A相デジタル値VAは負なので前記仮想コンパレータvaは' 0' となり前記シンクロA相信号QAは' 1' で、該vaとQAは不一致なので前記パルス位相は補正が必要であり、前記A相デジタル値VAが負でシンクロA相信号QAより進んでいるので前記パルス位相に1を加える補正を行う。さらに、時刻t6において前記A相デジタル値VAは負なので前記仮想コンパレータvaは' 0' となり前記シンクロA相信号QAは' 0' で、該vaとQAは一致するので前記パルス位相は正しいものとし補正を行わない。そして、上記を要約すると前記パルス位相の補正は下記のとおりとなる。
時刻t1: VA<0よりva=0、QA=0→一致するので補正は不要
時刻t2: 0<VAよりva=1、QA=0→不一致なので補正が必要
このときはVAがゼロを立ち上がりでクロスするときで、va
がQAより正転方向に進みとなり( +1) の補正を行う
時刻t3: 0<VAよりva=1、QA=1→一致するので補正は不要
時刻t4: 0<VAよりva=1、QA=1→一致するので補正は不要
時刻t5: VA<0よりva=0、QA=1→不一致なので補正が必要
このときはVAがゼロを立ち下がりでクロスするときで、va
がQAより正転方向に進みとなり( +1) の補正を行う
時刻t6: VA<0よりva=0、QA=0→一致するので補正は不要
Next, with reference to FIGS. 16A and 16B, since the A-phase digital value VA is negative at time t1, the virtual comparator va becomes '0', and the synchronized A-phase signal QA is also '0'. Since va and QA match, the pulse phase is assumed to be correct and correction is not performed. Next, since the A-phase digital value VA is positive at time t2, the virtual comparator va is '1'. On the other hand, the synchronized A-phase signal QA is '0' and the va and QA do not match, so the pulse phase is Correction is necessary, and since the A-phase digital value VA is positive and is ahead of the synchro A-phase signal QA, correction is performed by adding 1 to the pulse phase. At time t3, the A-phase digital value VA is positive. Therefore, the virtual comparator va is “1”, and the synchro A phase signal QA is also “1”. Since the va and QA coincide with each other, the pulse phase is assumed to be correct and correction is not performed.
Similarly, since the A-phase digital value VA is positive at time t4, the virtual comparator va becomes “1”, and the synchronized A-phase signal QA is also “1”. Since the va and QA match, the pulse phase is correct. At time t5, since the A-phase digital value VA is negative, the virtual comparator va is “0”, and the synchronized A-phase signal QA is “1”, and the va and QA are inconsistent. The phase needs to be corrected. Since the A-phase digital value VA is negative and is ahead of the synchronized A-phase signal QA, correction is performed by adding 1 to the pulse phase. Further, since the A-phase digital value VA is negative at time t6, the virtual comparator va becomes '0', the synchronized A-phase signal QA is '0', and the va and QA coincide with each other, so that the pulse phase is correct. Do not make corrections. In summary, the correction of the pulse phase is as follows.
Time t1: Since VA <0, va = 0 and QA = 0 → they match, so no correction is required.Time t2: From 0 <VA, va = 1, QA = 0 → no match, so correction is necessary.
At this time, when VA crosses zero at the rising edge, va
Is corrected in the forward direction from QA, and correction of (+1) is performed. Time t3: 0 <VA from va = 1, QA = 1 → Since matching, no correction is required. Time t4: 0 <VA from va = 1, QA = 1 → Matches, so no correction required Time t5: VA <0, va = 0, QA = 1 → mismatch, so correction is required
At this time, when VA crosses zero at the falling edge, va
Advances in the forward direction from QA and corrects (+1). Time t6: Since VA <0, va = 0, QA = 0 → match, so no correction is required

上記は、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときのA相について説明したが、同様にB相について前記図16の(a)と(c)を参照して、前記パルス位相の補正は下記のとおりとなる。
時刻t7: 0<VBよりvb=1、QB=1→一致するので補正は不要
時刻t8: VB<0よりvb=0、QB=1→不一致なので補正が必要
このときはVBがゼロを立ち下がりでクロスするときで、vb
がQBより正転方向に進みとなり( +1) の補正を行う
時刻t9: VB<0よりvb=0、QB=0→一致するので補正は不要
時刻t10: VB<0よりvb=0、QB=0→一致するので補正は不要
時刻t11: 0<VBよりvb=1、QB=0→不一致なので補正が必要
このときはVBがゼロを立ち上がりでクロスするときで、vb
がQBより正転方向に進みとなり( +1) の補正を行う
時刻t12: 0<VBよりvb=1、QB=1→一致するので補正は不要
The above describes the A phase when the sine wave incremental encoder 1b rotates in the forward rotation direction. Similarly, referring to FIGS. 16A and 16C for the B phase, the pulse phase The correction is as follows.
Time t7: Since 0 <VB, vb = 1, QB = 1 → match, so no correction is required. Time t8: From VB <0, vb = 0, QB = 1 → No match, so correction is necessary.
At this time, when VB crosses zero at the falling edge, vb
Will advance in the forward direction from QB, and the correction of (+1) will be made. Time t9: Since VB <0, VB = 0, QB = 0 → they match, so no correction is required. 0 → matches, so no correction required Time t11: 0 <VB, vb = 1, QB = 0 → mismatch so correction is required
At this time, when VB crosses zero at the rise, vb
Advances in the forward direction from QB, and the correction of (+1) is performed. Time t12: Since 0 <VB, vb = 1, QB = 1 → they match, so correction is unnecessary

以上で説明した前記図16は、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときのパルス位相の補正を説明するものであるが、次に、逆転方向に回転する場合を説明する。始めに、図15の(d)、(e)及び(f)は前記図15の(a)、(b)及び(c)と同じ信号の逆転の場合の時間的推移を示し、このとき前記シンクロB相信号QBは前記シンクロA相信号QAより90°遅れとなる。そして、図17は前記正弦波インクリメンタルエンコーダ1bが逆転方向に回転するときの前記パルス位相の補正を説明するもので、図17の(a)、(b)及び(c)は前記図16の(a)、(b)及び(c)と同じ信号の逆転の場合を示し、A相から順次、前記パルス位相の補正について説明する。
時刻t21: VA<0よりva=0、QA=0→一致するので補正は不要
時刻t22: 0<VAよりva=1、QA=0→不一致なので補正が必要
このときはVAがゼロを立ち上がりでクロスするときで、va
がQAより逆転方向に進みとなり( −1) の補正を行う
時刻t23: 0<VAよりva=1、QA=1→一致するので補正は不要
時刻t24: 0<VAよりva=1、QA=1→一致するので補正は不要
時刻t25: VA<0よりva=0、QA=1→不一致なので補正が必要
このときはVAがゼロを立ち下がりでクロスするときで、va
がQAより逆転方向に進みとなり( −1) の補正を行う
時刻t26: VA<0よりva=0、QA=0→一致するので補正は不要
かように、逆転方向に回転するときで前記パルス位相に補正が必要となるときは、前記図16と相違して進みの(−1)の補正を行うものである。
FIG. 16 described above explains the correction of the pulse phase when the sine wave incremental encoder 1b rotates in the forward direction. Next, the case where the sine wave incremental encoder 1b rotates in the reverse direction will be described. First, (d), (e), and (f) of FIG. 15 show temporal transitions in the case of inversion of the same signal as (a), (b), and (c) of FIG. The sync B phase signal QB is delayed by 90 ° from the sync A phase signal QA. FIG. 17 illustrates the correction of the pulse phase when the sine wave incremental encoder 1b rotates in the reverse direction. FIGS. 17A, 17B, and 17C are the same as FIGS. The case of reversal of the same signal as in a), (b) and (c) is shown, and the correction of the pulse phase will be described sequentially from the A phase.
Time t21: Since VA <0, va = 0 and QA = 0 → match, so correction is not required. Time t22: From 0 <VA, va = 1, QA = 0 → mismatch, so correction is necessary.
At this time, when VA crosses zero at the rising edge, va
Is corrected in the reverse direction from QA and the correction of (-1) is performed. Time t23: 0 <VA from VA = 1, QA = 1 → Since matching, no correction is required. Time t24: 0 <VA from va = 1, QA = 1 → matches, so no correction required Time t25: VA <0, va = 0, QA = 1 → no match, so correction is required
At this time, when VA crosses zero at the falling edge, va
Advances from QA in the reverse direction and corrects (-1). Time t26: From VA <0, va = 0, QA = 0 → Since it matches, the pulse is rotated when rotating in the reverse direction so that correction is unnecessary. When the phase needs to be corrected, the forward correction (-1) is performed unlike the case of FIG.

次に、前記図17の(a)と(c)を参照して、前記正弦波インクリメンタルエンコーダ1bが逆転方向に回転するときのB相の前記パルス位相の補正について説明する。
時刻t27: 0<VBよりvb=1、QB=1→一致するので補正は不要
時刻t28: VB<0よりvb=0、QB=1→不一致なので補正が必要
このときはVBがゼロを立ち下がりでクロスするときで、vb
がQBより逆転方向に進みとなり( −1) の補正を行う
時刻t29: VB<0よりvb=0、QB=0→一致するので補正は不要
時刻t30: VB<0よりvb=0、QB=0→一致するので補正は不要
時刻t31: 0<VBよりvb=1、QB=0→不一致なので補正が必要
このときはVBがゼロを立ち上がりでクロスするときで、vb
がQBより逆転方向に進みとなり( −1) の補正を行う
時刻t32: 0<VBよりvb=1、QB=1→一致するので補正は不要
Next, with reference to FIGS. 17A and 17C, correction of the B phase pulse phase when the sine wave incremental encoder 1b rotates in the reverse direction will be described.
Time t27: Since 0 <VB, vb = 1, QB = 1 → they match, so correction is not required Time t28: From VB <0, vb = 0, QB = 1 → no match, so correction
At this time, when VB crosses zero at the falling edge, vb
Is corrected in the reverse direction from QB, and the correction of (-1) is performed. Time t29: Since VB <0, Vb = 0, QB = 0 → Same, no correction is required. Time t30: From VB <0, vb = 0, QB = 0 → Match, so no correction required Time t31: 0 <VB, vb = 1, QB = 0 → mismatch, correction required
At this time, when VB crosses zero at the rise, vb
Advances in the reverse direction from QB, and the correction of (-1) is performed. Time t32: Since 0 <VB, vb = 1, QB = 1.fwdarw.

以上で説明した前記図16及び図17における前記パルス位相の補正を、前記マイクロコントローラ9のプログラムにより実施する例を図18に示し説明する。ここで、本実施例においては、該図18に示すように' f' と共に付す追番により処理を行うブロックもしくは処理のルートを指すものとし、前記マイクロコントローラ9は該図18においてブロックf1、f2及びf3の次の処理を始めに行う。
f1:A相デジタル値VAとB相デジタル値VBを入力する。又、シンクロA相信号QAとシンクロB相信号QBを入力した後f2へ。
f2:VAがゼロのとき、パルス位相の補正は実施せずルートf21を経て処理を終える。VAがゼロでないときはf3へ。
f3:VBがゼロのとき、パルス位相の補正は実施せずルートf21を経て処理を終える。VBがゼロでないときはf4へ。
かように、前記A相デジタル値VA又はB相デジタル値VBがゼロのときは、前記図16及び図17による前記パルス位相の補正を実施せず処理を終える。
An example in which the correction of the pulse phase in FIGS. 16 and 17 described above is implemented by the program of the microcontroller 9 will be described with reference to FIG. Here, in this embodiment, as shown in FIG. 18, it is assumed that the block or the route of the processing is performed by the serial number attached with 'f', and the microcontroller 9 in FIG. And f3 are performed first.
f1: The A phase digital value VA and the B phase digital value VB are input. Also, after inputting the sync A phase signal QA and the sync B phase signal QB, go to f2.
f2: When VA is zero, the pulse phase is not corrected and the process is terminated via the route f21. If VA is not zero, go to f3.
f3: When VB is zero, the pulse phase is not corrected and the process is terminated through the route f21. If VB is not zero, go to f4.
As described above, when the A-phase digital value VA or the B-phase digital value VB is zero, the process is finished without performing the correction of the pulse phase according to FIGS.

次に、前記図18のブロックf4からブロックf6はA相について前記パルス位相の補正を行うか否かを判定し、A相について該パルス位相の補正を行うときは、ブロックf7とf8で回転方向により補正量を(+1)とするか(−1)とするかを決定するものである。
始めに、ブロックf4からブロックf5を経てブロックf7に至るルートf5n迄の処理について説明すると、ブロックf4において前記A相デジタル値VAがゼロ未満のときはブロックf5に至り(ブロックf4において' no' のときはVAがゼロ以下であるが、ブロックf2においてVAがゼロのときを除外しているので、ブロックf5に至るときは' ゼロ未満' となる)、このとき前記仮想コンパレータvaは' 0' となる。
次にブロックf5において前記シンクロA相信号QAが' 1' のときルートf5nに至る。
すなわち、ルートf5nに至るときは、前記仮想コンパレータvaが' 0' 、前記シンクロA相信号QAが' 1' と不一致となり前記パルス位相の補正が必要であって、このときは前記仮想コンパレータvaが' 0' なのでA相が立ち下がりの場合であり、正転のときは前記図16の時刻t5における補正が、逆転のときは前記図17の時刻t25における補正が必要となる。
次にブロックf7において、前記図16の時刻t5を参照すれば、A相の立ち下がりにおいて前記B相デジタル値VBが負のとき回転方向を正転と判定して、パルス位相の(+1)の補正を行うブロックf14へ分岐し、前記図17の時刻t25を参照すれば、A相の立ち下がりにおいて前記B相デジタル値VBが正のとき回転方向を逆転と判定して、パルス位相の(−1)の補正を行うブロックf15へ分岐する。
Next, blocks f4 to f6 in FIG. 18 determine whether or not to correct the pulse phase for the A phase. When correcting the pulse phase for the A phase, the rotation direction is determined in the blocks f7 and f8. This determines whether the correction amount is (+1) or (-1).
First, the process from the block f4 to the route f5n from the block f5 through the block f5 to the block f7 will be described. When the A-phase digital value VA is less than zero in the block f4, the processing reaches the block f5 (in block f4, “no” VA is less than or equal to zero, but excludes the case where VA is zero in the block f2, so when reaching the block f5, it becomes 'less than zero'). At this time, the virtual comparator va is set to '0' Become.
Next, in the block f5, when the synchro A phase signal QA is '1', the route f5n is reached.
That is, when the route f5n is reached, the virtual comparator va is '0', and the synchro A phase signal QA is inconsistent with '1' and the pulse phase needs to be corrected. At this time, the virtual comparator va Since it is '0', this is a case where the A phase falls, and correction at time t5 in FIG. 16 is necessary for normal rotation, and correction at time t25 in FIG. 17 is necessary for reverse rotation.
Next, in block f7, referring to time t5 in FIG. 16, when the B-phase digital value VB is negative at the fall of the A-phase, it is determined that the rotation direction is normal rotation, and (+1) of the pulse phase Branching to the block f14 to be corrected, and referring to the time t25 in FIG. 17, when the B phase digital value VB is positive at the fall of the A phase, the rotation direction is determined to be reverse, and the pulse phase (− Branch to block f15 where the correction of 1) is performed.

以上の、ブロックf4からブロックf5を経てルートf5nに至る経緯とブロックf7の処理について要約すると次のとおりであり、前記図16及び図17の処理と対比して示す。
f5n: f4にてVA<0よりva=0,f5にてQA=1となり、
vaとQAは不一致で補正が必要でブロックf7へ
このルートf5nはA相が立ち下がりのときである
f7: 0<VBを満たさないときは正転でf14へ ・・・・・・ 図16の時刻t5
0<VBを満たすときは逆転でf15へ ・・・・・・ 図17の時刻t25
同様に、ブロックf4からブロックf6を経てルートf6nに至る経緯とブロックf8の処理について要約すると次のとおりであり、前記図16及び図17の処理と対比して示す。
f6n: f4にて0<VAよりva=1,f6にてQA=0となり、
vaとQAは不一致で補正が必要でブロックf8へ
このルートf6nはA相が立ち上がりのときである
f8: 0<VBを満たすときは正転でf14へ ・・・・・・ 図16の時刻t2
0<VBを満たさないときは逆転でf15へ ・・・・・・ 図17の時刻t22
The above-described process from the block f4 through the block f5 to the route f5n and the processing of the block f7 are summarized as follows, and are shown in comparison with the processing of FIG. 16 and FIG.
f5n: VA = 0 from VA <0 at f4, QA = 1 at f5,
va and QA are inconsistent and need to be corrected, go to block f7
This route f5n is when the phase A is falling. F7: When 0 <VB is not satisfied, forward rotation to f14 ........ time t5 in FIG.
When 0 <VB is satisfied, reverse rotation to f15... Time t25 in FIG.
Similarly, the process from the block f4 through the block f6 to the route f6n and the process of the block f8 are summarized as follows, and are shown in comparison with the processes of FIGS.
f6n: 0 <VA at f4, va = 1 from fA, QA = 0 at f6,
va and QA are inconsistent and need to be corrected, go to block f8
This route f6n is when the A-phase is rising. F8: When 0 <VB is satisfied, forward rotation is performed to f14 .... time t2 in FIG.
When 0 <VB is not satisfied, the rotation is reversed to f15... Time t22 in FIG.

次に、ブロックf4からブロックf5を経てルートf5yに至る経緯と、ブロックf4からブロックf6を経てルートf6yに至る経緯は以下のとおりで、このときは前記パルス位相の補正を必要とせずB相の処理へ移る。
f5y: f4にてVA<0よりva=0,f5にてQA=0
vaとQAは一致するので補正が不要でブロックf9へ
図16の時刻t1、t6又は図17の時刻t21、t26のときである
f6y: f4にて0<VAよりva=1,f6にてQA=1
vaとQAは一致するので補正が不要でブロックf9へ
図16の時刻t3、t4又は図17の時刻t23とt24のときである
Next, the process from the block f4 through the block f5 to the route f5y and the process from the block f4 through the block f6 to the route f6y are as follows. At this time, the correction of the pulse phase is not required and the B phase is corrected. Move on to processing.
f5y: VA <0 at VA <0 at f4, QA = 0 at f5
Since va and QA match, no correction is required and the process goes to block f9.
It is the time t1, t6 in FIG. 16 or the time t21, t26 in FIG. 17. f6y: 0 <VA at f4, VA = 1 from fA, QA = 1 at f6
Since va and QA match, no correction is required and the process goes to block f9.
It is the time t3, t4 in FIG. 16 or the time t23 and t24 in FIG.

以上で、前記図18において、A相についてブロックf4からf8で行う前記パルス位相の補正について説明したが、次に、B相についてブロックf9からf13で行うパルス位相の補正について説明を行う。
前記図18のブロックf9からブロックf11はB相について前記パルス位相の補正が必要か否かを判定し、ブロックf12とf13で回転方向により、補正量を(+1)とするか(−1)とするかを決定するものである。
始めに、ブロックf9よりブロックf10を経てブロックf12に至るルートf10n迄の処理は、ブロックf9において前記B相デジタル値VBがゼロ未満のときはブロックf10に至り(ブロックf9において' no' のときはVBがゼロ以下であるが、ブロックf3においてVBがゼロのときを除外しているので、ブロックf10に至るときは' ゼロ未満' となる)、このとき前記仮想コンパレータvbは' 0' となる。
次にブロックf10において前記シンクロB相信号QBが' 1' のときルートf10nに至る。
すなわち、ルートf10nに至るときは、前記仮想コンパレータvbが' 0' 、前記シンクロB相信号QBが' 1' と不一致となり前記パルス位相の補正が必要であって、このときは前記仮想コンパレータvbが' 0' なのでB相が立ち下がりの場合であり、正転のときは前記図16の時刻t8における補正を、逆転のときは前記図17の時刻t28における補正が必要となる。
次にブロックf12において、前記図16の時刻t8を参照すれば、B相の立ち下がりにおいて前記A相デジタル値VAが正のとき回転方向を正転と判定してパルス位相の(+1)の補正を行うブロックf14へ分岐し、前記図17の時刻t28を参照すれば、B相の立ち下がりにおいて前記A相デジタル値VAが負のとき回転方向を逆転と判定してパルス位相の(−1)の補正を行うブロックf15へ分岐する。
As described above, in FIG. 18, the correction of the pulse phase performed in the blocks f4 to f8 for the A phase has been described. Next, the correction of the pulse phase performed in the blocks f9 to f13 for the B phase will be described.
The block f9 to the block f11 in FIG. 18 determine whether or not the pulse phase needs to be corrected for the B phase, and whether the correction amount is (+1) or not (-1) depending on the rotation direction in the blocks f12 and f13. To decide what to do.
First, the process from the block f9 to the route f10n through the block f10 to the block f12 reaches the block f10 when the B-phase digital value VB is less than zero in the block f9 (when 'no' in the block f9) VB is less than or equal to zero, but excludes the case where VB is zero in the block f3, so that when reaching the block f10, it becomes “less than zero”). At this time, the virtual comparator vb becomes “0”.
Next, in the block f10, when the synchro B phase signal QB is "1", the route f10n is reached.
That is, when the route f10n is reached, the virtual comparator vb is “0” and the synchro B phase signal QB is inconsistent with “1”, and the pulse phase needs to be corrected. At this time, the virtual comparator vb Since it is '0', this is a case where the B phase falls, and correction at time t8 in FIG. 16 is necessary for normal rotation, and correction at time t28 in FIG. 17 is necessary for reverse rotation.
Next, in block f12, referring to time t8 in FIG. 16, when the A-phase digital value VA is positive at the fall of the B-phase, the rotation direction is determined to be normal rotation and the pulse phase is corrected by (+1). Referring to time t28 in FIG. 17, when the A phase digital value VA is negative at the fall of the B phase, the rotation direction is determined to be reverse and the pulse phase (−1) is determined. Branches to block f15 where the correction is performed.

以上の、ブロックf9からブロックf10を経てルートf10nに至る経緯と、ブロックf12の処理について要約すると次のとおりであり、前記図16及び図17の処理と対比して示す。
f10n:f9にてVB<0よりvb=0,f10にてQB=1
vbとQBは不一致で補正が必要でブロックf12へ
このルートf10nはB相が立ち下がりのときである
f12: 0<VAを満たすときは正転でf14へ ・・・・・・図16の時刻t8
0<VAを満たさないときは逆転でf15へ ・・・・・・ 図17の時刻t28
同様に、ブロックf9からブロックf11を経てルートf11nに至る経緯と、ブロックf13の処理について要約すると次のとおりとなり、前記図16及び図17の処理と対比して示す。
f11n:f9にて0<VBよりvb=1,f11にてQB=0となり、
vbとQBは不一致で補正が必要でブロックf13へ
このルートf11nはB相が立ち上がりのときである
f13: 0<VAを満たさないときは正転でf14へ ・・・・・・ 図16の時刻t11
0<VAを満たすときは逆転でf15へ ・・・・・・ 図17の時刻t31
The above process from the block f9 through the block f10 to the route f10n and the process of the block f12 are summarized as follows, and are shown in comparison with the processes of FIGS.
f10n: V9 at f9 from VB <0, vb = 0 at f10, QB = 1 at f10
vb and QB are inconsistent and need to be corrected, go to block f12
This route f10n is when the B phase falls. F12: When 0 <VA is satisfied, the rotation is forward to f14, and time t8 in FIG.
When 0 <VA is not satisfied, the rotation is reversed to f15... Time t28 in FIG.
Similarly, the process from the block f9 to the route f11n through the block f11 and the process of the block f13 are summarized as follows, which is shown in comparison with the processes of FIGS.
f11n: 0 <VB at f9, vb = 1 from fB, QB = 0 at f11,
vb and QB are inconsistent and need to be corrected, go to block f13
This route f11n is when the B phase rises. F13: When 0 <VA is not satisfied, forward rotation is performed to f14.
When 0 <VA is satisfied, the rotation is reversed to f15... Time t31 in FIG.

そして、ブロックf9からブロックf10を経てルートf10yに至る経緯と、ブロックf9からブロックf11を経てルートf11yに至る経緯は以下のとおりで、このときは前記パルス位相の補正を必要とせずルートf21を経て図18の処理を終える。
f10y:f9にてVB<0よりvb=0,f10にてQB=0
vbとQBは一致するので補正が不要でエンドへ
図16の時刻t9、t10又は図17の時刻t29、t30のときである
f11y:f9にて0<VBよりvb=1,f11にてQB=1
vbとQBは一致するので補正が不要でエンドへ
図16の時刻t7、t12又は図17の時刻t27とt32のときである
The process from the block f9 through the block f10 to the route f10y and the process from the block f9 through the block f11 to the route f11y are as follows. At this time, no correction of the pulse phase is required and the route f21y is passed through. The process of FIG. 18 is finished.
f10y: vb = 0 from f9 at v9, QB = 0 at f10
Since vb and QB match, no correction is required and the end
At time t9, t10 in FIG. 16 or at time t29, t30 in FIG. 17 f11y: 0 <VB at f9, QB = 1 at vb = 1, f11
Since vb and QB match, no correction is required and the end
It is the time t7, t12 in FIG. 16 or the time t27 and t32 in FIG.

かようにして、前記マイクロコントローラ9は前記図18の処理を周期的に行うもので、前記コンパレータ3が前記図15に示す動作を行うとき、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときも逆転方向に回転するときも、前記図16、図17及び図18に示すとおり、前記正弦波インクリメンタルエンコーダ1bのA相とB相がゼロをクロスするとき前記パルス位相の補正を行う。
この補正は、前記A相デジタル値VA及びB相デジタル値VBを基準として前記パルス位相の補正を行い、前記図32の(a)の上位桁のパルス位相を正確に求めるものである。そして、前記図32の(a)の下位桁の補間位相は、前記パルス位相を補正するときに基準とした前記A相デジタル値VA及びB相デジタル値VBを用いて前記(1)式から得るものである。
かようにして、パルス位相と補間位相の組み合わせは常に正しいことを補償せしめ、前記正弦波インクリメンタルエンコーダ1bが低速のみならず高速で回転するときも、常に正しい回転位相を検出することを可能とする。
ここで、かようなパルス補正が必要となるのは、前記図13においてパルス抽出機6やパルス位相検出器8からなるパルス位相の検出機構と、A/D変換器13、14からなる補間位相の検出機構が異なるものであり、両検出機構において動作レベルのばらつきや動作時間の遅延等によりパルス位相と補間位相の組み合わせが常に正しいことが補償されない為である。
Thus, the microcontroller 9 periodically performs the processing of FIG. 18, and when the comparator 3 performs the operation shown in FIG. 15, the sine wave incremental encoder 1b rotates in the forward direction. Even when rotating in the reverse direction, as shown in FIGS. 16, 17, and 18, the pulse phase is corrected when the A phase and B phase of the sine wave incremental encoder 1b cross zero.
In this correction, the pulse phase is corrected on the basis of the A-phase digital value VA and the B-phase digital value VB, and the higher-order pulse phase shown in FIG. The interpolation phase of the lower digits in FIG. 32A is obtained from the equation (1) using the A-phase digital value VA and the B-phase digital value VB that are used as a reference when correcting the pulse phase. Is.
In this way, it is compensated that the combination of the pulse phase and the interpolation phase is always correct, and it is possible to always detect the correct rotational phase even when the sine wave incremental encoder 1b rotates at a high speed as well as a low speed. .
Here, such a pulse correction is required because the pulse phase detection mechanism including the pulse extractor 6 and the pulse phase detector 8 in FIG. 13 and the interpolation phase including the A / D converters 13 and 14 are used. This is because the detection mechanisms are different from each other, and it is not compensated that the combination of the pulse phase and the interpolation phase is always correct due to variations in operation levels, delays in operation time, and the like.

次に、図19、図20、図21及び図22により請求項に関する実施例について説明する。始めに、図19は前記図15と異なる前記コンパレータ3の動作を示すもので、図19の(a)は前記正弦波インクリメンタルエンコーダ1bが正転のときのA相とB相の出力の時間的推移を示し、これに対応して図19の(b)と(c)は、A相とB相の前記コンパレータ3の出力を前記パルス抽出器6で保持したシンクロA相信号QAとシンクロB相信号QBの時間的推移を示す。
そして、前記コンパレータ3は入力がVh以上で' 1' となり入力がVl未満で' 0' となるものであるが、前記図19はVhがVl未満のときの動作を示すものであって、例えば前記図19の(a)の時刻t1においては前記正弦波インクリメンタルエンコーダ1bのA相がVhを越えるので、前記図19の(b)に示すとおりシンクロA相信号QAは' 0' から' 1' となり、時刻t2においてはA相がVl未満となるので、前記図19の(b)に示すとおりシンクロA相信号QAは' 1' から' 0' となる。
以上はA相について説明したが、B相のシンクロB相信号QBについても同様に前記図19の(c)に示す如くとなり、該シンクロB相信号QBが前記QAより90°進みとなる。そして、図19の(d)、(e)及び(f)は前記正弦波インクリメンタルエンコーダ1bが逆転方向に回転する場合でこれの説明は後述する。
Next, an embodiment related to claim 3 will be described with reference to FIGS. 19, 20, 21 and 22. FIG. First, FIG. 19 shows the operation of the comparator 3 different from that in FIG. 15. FIG. 19A shows the temporal output of the A phase and the B phase when the sine wave incremental encoder 1b is rotating forward. Corresponding to this, (b) and (c) of FIG. 19 show synchronized A phase signals QA and synchronized B phases in which the outputs of the comparators 3 of A phase and B phase are held by the pulse extractor 6. The time transition of the signal QB is shown.
The comparator 3 is “1” when the input is Vh or more and becomes “0” when the input is less than Vl. FIG. 19 shows the operation when Vh is less than Vl. Since the A phase of the sine wave incremental encoder 1b exceeds Vh at time t1 in FIG. 19A, the synchro A phase signal QA changes from “0” to “1” as shown in FIG. 19B. Thus, at time t2, the A phase becomes less than Vl. Therefore, as shown in FIG. 19B, the synchro A phase signal QA changes from '1' to '0'.
Although the above description has been made on the A phase, the sync B phase signal QB of the B phase is similarly as shown in FIG. 19C, and the sync B phase signal QB is advanced by 90 ° from the QA. 19D, 19E, and 19F show the case where the sine wave incremental encoder 1b rotates in the reverse direction, which will be described later.

ここで、前記図15のVhがVlを越えて大きいときは前記コンパレータ3が通常のヒステリシス特性を有するときであり、これとは別に、前記図19のVhがVl未満のときを考慮するのは、前記コンパレータ3など装置を構成する電子部品に特性のばらつきが有るときも、確実に前記正弦波インクリメンタルエンコーダ1bの回転位相を検出する為である。   Here, when Vh in FIG. 15 is larger than Vl, it is when the comparator 3 has a normal hysteresis characteristic. Separately, it is considered that Vh in FIG. 19 is less than Vl. This is because the rotational phase of the sine wave incremental encoder 1b can be reliably detected even when there are variations in characteristics of the electronic components constituting the apparatus such as the comparator 3.

次に、図20は前記コンパレータ3が前記図19の(a)、(b)及び(c)で示す特性を有して、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転し、A相とB相の出力がゼロ付近をクロスするとき、本実施例による前記パルス位相検出器8が検出するパルス位相の補正を説明するもので、図20の(a)、(b)及び(c)は、前記図19の(a)、(b)及び(c)と同じくそれぞれ前記正弦波インクリメンタルエンコーダ1bのA相とB相の出力、前記パルス抽出器6が出力するシンクロA相信号QA及びシンクロB相信号QBを示す。   Next, FIG. 20 shows that the comparator 3 has the characteristics shown in (a), (b) and (c) of FIG. 19, and the sine wave incremental encoder 1b rotates in the normal rotation direction. FIG. 20A, FIG. 20B, and FIG. 20C illustrate the correction of the pulse phase detected by the pulse phase detector 8 according to the present embodiment when the output of the B phase crosses near zero. 19A, 19B and 19C, respectively, the outputs of the A and B phases of the sine wave incremental encoder 1b, the synchro A phase signal QA and the synchro B output from the pulse extractor 6, respectively. The phase signal QB is shown.

始めに図20の(a)において、前記図13における前記マイクロコントローラ9が前記A/D変換器13、及び14から入力する前記A相デジタル値と前記B相デジタル値をそれぞれVA、VBと表記する。そして、前記マイクロコントローラ9はプログラムにより図示しない仮想コンパレータvaとvbを内蔵し、前記A相デジタル値VAが正のときは前記仮想コンパレータvaを' 1' とし負のときは該vaを' 0' とし、同様に前記B相デジタル値VBが正のときは前記仮想コンパレータvbを' 1' とし負のときは該vbを' 0' とするものである。   First, in FIG. 20A, the A-phase digital value and the B-phase digital value input from the A / D converters 13 and 14 by the microcontroller 9 in FIG. 13 are expressed as VA and VB, respectively. To do. The microcontroller 9 incorporates virtual comparators va and vb (not shown) by a program. When the A-phase digital value VA is positive, the virtual comparator va is '1', and when it is negative, the va is '0'. Similarly, when the B-phase digital value VB is positive, the virtual comparator vb is '1', and when it is negative, vb is '0'.

次に、図20の(a)と(b)について説明すると、時刻t41において前記A相デジタル値VAは負なので前記仮想コンパレータvaは' 0' となり前記シンクロA相信号QAも' 0' で、該vaとQAは一致するので、前記パルス位相は正しいものとし補正を行わない。
次に、時刻t42において前記A相デジタル値VAは負なので前記仮想コンパレータvaは' 0' となり、一方前記シンクロA相信号QAは' 1' で、該vaとQAは不一致なので前記パルス位相は補正が必要であり、前記A相デジタル値VAが負で前記シンクロA相信号QAより遅れているので前記パルス位相から1を減ずる補正を行い、時刻t43においては、前記A相デジタル値VAは正なので前記仮想コンパレータvaは' 1' となり前記シンクロA相信号QAも' 1' で、該vaとQAは一致するので前記パルス位相は正しいものとし補正を行わない。
同様に、時刻t44において前記A相デジタル値VAは正なので前記仮想コンパレータvaは' 1' となり前記シンクロA相信号QAも' 1' で、該vaとQAは一致するので前記パルス位相は正しいものとし補正を行わず、時刻t45においては、前記A相デジタル値VAは正なので前記仮想コンパレータvaは' 1' となり前記シンクロA相信号QAは' 0' で、該vaとQAは不一致なので前記パルス位相は補正が必要であり、前記A相デジタル値VAが正でシンクロA相信号より遅れているので前記パルス位相から1を減ずる補正を行う。
時刻t46において前記A相デジタル値VAは負なので前記仮想コンパレータvaは' 0' となり前記シンクロA相信号QAは' 0' で、該vaとQAは一致するので前記パルス位相は正しいものとし補正を行わない。そして、上記を要約すると前記パルス位相の補正は下記のとおりとなる。
時刻t41: VA<0よりva=0、QA=0→一致するので補正は不要
時刻t42: VA<0よりva=0、QA=1→不一致なので補正が必要
このときはVAがゼロを立ち上がりでクロスするときで、va
がQAより正転方向に遅れとなり( −1) の補正を行う
時刻t43: 0<VAよりva=1、QA=1→一致するので補正は不要
時刻t44: 0<VAよりva=1、QA=1→一致するので補正は不要
時刻t45: 0<VAよりva=1、QA=0→不一致なので補正が必要
このときはVAがゼロを立ち下がりでクロスするときで、va
がQAより正転方向に遅れとなり( −1) の補正を行う
時刻t46: VA<0よりva=0、QA=0→一致するので補正は不要
Next, with reference to FIGS. 20A and 20B, since the A-phase digital value VA is negative at time t41, the virtual comparator va becomes '0' and the synchronized A-phase signal QA is also '0'. Since va and QA match, the pulse phase is assumed to be correct and correction is not performed.
Next, since the A-phase digital value VA is negative at time t42, the virtual comparator va becomes “0”, while the synchronized A-phase signal QA is “1”, and the va and QA do not match, so the pulse phase is corrected. Since the A-phase digital value VA is negative and delayed from the synchro A-phase signal QA, correction is performed by subtracting 1 from the pulse phase. At time t43, the A-phase digital value VA is positive. The virtual comparator va becomes “1”, the synchro A phase signal QA is also “1”, and since va and QA coincide with each other, the pulse phase is assumed to be correct and correction is not performed.
Similarly, since the A-phase digital value VA is positive at time t44, the virtual comparator va becomes '1', and the synchronized A-phase signal QA is also '1'. Since va and QA match, the pulse phase is correct. At time t45, since the A-phase digital value VA is positive, the virtual comparator va is “1”, and the synchronized A-phase signal QA is “0”. Since the va and QA do not match, the pulse The phase needs to be corrected. Since the A-phase digital value VA is positive and lags behind the synchro A-phase signal, correction is performed by subtracting 1 from the pulse phase.
Since the A-phase digital value VA is negative at time t46, the virtual comparator va becomes '0', and the synchronized A-phase signal QA is '0'. Since va and QA coincide with each other, the pulse phase is assumed to be correct. Not performed. In summary, the correction of the pulse phase is as follows.
Time t41: Since VA <0, va = 0 and QA = 0 → match, so no correction is required. Time t42: From VA <0, va = 0, QA = 1 → No match, so correction is necessary.
At this time, when VA crosses zero at the rising edge, va
Is delayed in the forward rotation direction from QA, and correction of (-1) is performed. Time t43: 0 <VA since va = 1, QA = 1 → Since matching, no correction is required. Time t44: 0 <VA from va = 1, QA = 1 → Match, so no correction required Time t45: 0 <VA from VA = 1, QA = 0 → mismatch, correction required
At this time, when VA crosses zero at the falling edge, va
Is delayed in the forward direction from QA, and the correction of (-1) is performed. Time t46: Since VA <0, va = 0, QA = 0 → they match, so correction is unnecessary

上記は、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときのA相について説明したが、同様にB相について前記図20の(a)と(c)を参照して、前記パルス位相の補正は下記のとおりとなる。
時刻t47: 0<VBよりvb=1、QB=1→一致するので補正は不要
時刻t48: 0<VBよりvb=1、QB=0→不一致なので補正が必要
このときはVBがゼロを立ち下がりでクロスするときで、vb
がQBより正転方向に遅れとなり( −1) の補正を行う
時刻t49: VB<0よりvb=0、QB=0→一致するので補正は不要
時刻t50: VB<0よりvb=0、QB=0→一致するので補正は不要
時刻t51: VB<0よりvb=0、QB=1→不一致なので補正が必要
このときはVBがゼロを立ち上がりでクロスするときで、vb
がQBより正転方向に遅れとなり( −1) の補正を行う
時刻t52: 0<VBよりvb=1、QB=1→一致するので補正は不要
The above describes the A phase when the sine wave incremental encoder 1b rotates in the forward rotation direction. Similarly, with reference to FIGS. The correction is as follows.
Time t47: Since 0 <VB, vb = 1, QB = 1 → match, so no correction is required. Time t48: From 0 <VB, vb = 1, QB = 0 → No match, so correction is necessary.
At this time, when VB crosses zero at the falling edge, vb
Is delayed in the forward direction from QB, and the correction of (-1) is performed. Time t49: Since VB <0, Vb = 0, QB = 0 → Same, no correction is required. Time t50: From VB <0, vb = 0, QB = 0-> match, so no correction required Time t51: VB <0, vb = 0, QB = 1-> mismatch, correction required
At this time, when VB crosses zero at the rise, vb
Is delayed in the forward direction from QB, and the correction of (-1) is performed. Time t52: Since 0 <VB, vb = 1, QB = 1 → they match, so correction is unnecessary

以上で説明した前記図20は、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときのパルス位相の補正を説明するものであるが、次に、逆転方向に回転する場合を説明する。
始めに、図19の(d)、(e)及び(f)は前記図19の(a)、(b)及び(c)と同じ信号の逆転の場合の時間的推移を示し、このとき前記シンクロB相信号QBは前記シンクロA相信号QAより90°遅れとなる。そして、図21は前記正弦波インクリメンタルエンコーダ1bが逆転方向に回転するときの前記パルス位相の補正を説明するもので、図21の(a)、(b)及び(c)は前記図20の(a)、(b)及び(c)と同じ信号の逆転の場合を示し、A相から順次、前記パルス位相の補正について説明する。
時刻t61: VA<0よりva=0、QA=0→一致するので補正は不要
時刻t62: VA<0よりva=0、QA=1→不一致なので補正が必要
このときはVAがゼロを立ち上がりでクロスするときで、vaがQAより逆転方向に遅れとなり( +1) の補正を行う
時刻t63: 0<VAよりva=1、QA=1→一致するので補正は不要
時刻t64: 0<VAよりva=1、QA=1→一致するので補正は不要
時刻t65: 0<VAよりva=1、QA=0→不一致なので補正が必要
このときはVAがゼロを立ち下がりでクロスするときで、vaがQAより逆転方向に遅れとなり( +1) の補正を行う
時刻t66: VA<0よりva=0、QA=0→一致するので補正は不要
かように、逆転方向に回転するときで前記パルス位相に補正が必要となるときは、前記図20と相違して遅れの(+1)の補正を行うものである。
FIG. 20 described above explains the correction of the pulse phase when the sine wave incremental encoder 1b rotates in the forward direction. Next, the case where the sine wave incremental encoder 1b rotates in the reverse direction will be described.
First, (d), (e), and (f) in FIG. 19 show temporal transitions in the case of inversion of the same signal as in (a), (b), and (c) of FIG. The sync B phase signal QB is delayed by 90 ° from the sync A phase signal QA. FIG. 21 illustrates the correction of the pulse phase when the sine wave incremental encoder 1b rotates in the reverse direction. FIGS. 21 (a), 21 (b) and 21 (c) are the same as FIGS. The case of the same signal reversal as in a), (b) and (c) is shown, and the correction of the pulse phase will be described sequentially from the A phase.
Time t61: Since VA <0, va = 0, QA = 0 → match, so no correction is required. Time t62: From VA <0, va = 0, QA = 1 → No match, so correction is necessary.
In this case, when VA crosses zero at the rising edge, va is delayed in the reverse direction from QA, and the correction of (+1) is performed. Unnecessary Time t64: 0 <VA since va = 1, QA = 1 → match, so correction is not required. Time t65: From 0 <VA, va = 1, QA = 0 → mismatch, so correction is necessary.
In this case, when VA crosses zero at the falling edge, va is delayed in the reverse direction from QA, and correction is performed (+1). If the pulse phase needs to be corrected when rotating in the reverse rotation direction, unlike in the case of FIG. 20, the delay (+1) is corrected.

次に、前記図21の(a)と(c)を参照して、前記正弦波インクリメンタルエンコーダ1bが逆転方向に回転するとき、同様にB相の前記パルス位相の補正について説明する。
時刻t67: 0<VBよりvb=1、QB=1→一致するので補正は不要
時刻t68: 0<VBよりvb=1、QB=0→不一致なので補正が必要
このときはVBがゼロを立ち下がりでクロスするときで、vb
がQBより逆転方向に遅れとなり( +1) の補正を行う
時刻t69: VB<0よりvb=0、QB=0→一致するので補正は不要
時刻t70: VB<0よりvb=0、QB=0→一致するので補正は不要
時刻t71: VB<0よりvb=0、QB=1→不一致なので補正が必要
このときはVBがゼロを立ち上がりでクロスするときで、vb
がQBより逆転方向に遅れとなり( +1) の補正を行う
時刻t72: 0<VBよりvb=1、QB=1→一致するので補正は不要
Next, with reference to FIGS. 21A and 21C, the correction of the pulse phase of the B phase when the sine wave incremental encoder 1b rotates in the reverse direction will be described.
Time t67: Since 0 <VB, vb = 1, QB = 1 → match, so no correction is required.
At this time, when VB crosses zero at the falling edge, vb
Is delayed from QB in the reverse direction and correction of (+1) is performed. Time t69: Since VB <0, Vb = 0, QB = 0 → they match, so no correction is required. Time t70: VB <0, vb = 0, QB = 0 → Correction is not necessary because it matches. Time t71: Since VB <0, vb = 0, QB = 1 → Inconsistency, correction is required
At this time, when VB crosses zero at the rising edge, vb
Is delayed in the reverse direction from QB, and correction of (+1) is performed. Time t72: Since 0 <VB, vb = 1, QB = 1 → they match, so correction is unnecessary

以上で説明した前記図20及び図21における前記パルス位相の補正を、前記マイクロコントローラ9のプログラムにより実施する例を図22に示し説明する。ここで、前記図18と同様に該図22において、' f' と共に付す追番により処理を行うブロックもしくは処理のルートを指すものとし、前記マイクロコントローラ9は該図22においてブロックf1、f2及びf3の次の処理を始めに行う。
f1:A相デジタル値VAとB相デジタル値VBを入力する。又、シンクロA相信号
QAとシンクロB相信号QBを入力した後f2へ。
f2:VAがゼロのとき、パルス位相の補正は実施せずルートf21を経て処理を終える。VAがゼロでないときはf3へ。
f3:VBがゼロのとき、パルス位相の補正は実施せずルートf21を経て処理を終える。VBがゼロでないときはf4へ。
かように、前記A相デジタル値VA又はB相デジタル値VBがゼロのときは、前記図20及び図21による前記パルス位相の補正を実施せず処理を終える。
An example in which the correction of the pulse phase in FIGS. 20 and 21 described above is implemented by the program of the microcontroller 9 will be described with reference to FIG. Here, as in FIG. 18, in FIG. 22, it is assumed that the block or the route of processing is performed by the serial number attached with “f”, and the microcontroller 9 in FIG. 22 has blocks f 1, f 2 and f 3. The following processing is performed first.
f1: The A phase digital value VA and the B phase digital value VB are input. Also, after inputting the sync A phase signal QA and the sync B phase signal QB, go to f2.
f2: When VA is zero, the pulse phase is not corrected and the process is terminated via the route f21. If VA is not zero, go to f3.
f3: When VB is zero, the pulse phase is not corrected and the process is terminated through the route f21. If VB is not zero, go to f4.
Thus, when the A-phase digital value VA or the B-phase digital value VB is zero, the processing is finished without performing the correction of the pulse phase according to FIGS.

次に、前記図22のブロックf4からブロックf6はA相について前記パルス位相の補正を行うか否かを判定し、A相についてパルス位相の補正を行うときは、ブロックf7とf8で回転方向により補正量を(+1)とするか(−1)とするかを決定するものである。
始めに、ブロックf4からブロックf5を経てブロックf7に至るルートf5n迄の処理について説明すると、ブロックf4において前記A相デジタル値VAがゼロ未満のときはブロックf5に至り(ブロックf4において' no' のときはVAがゼロ以下であるが、ブロックf2においてVAがゼロのときを除外しているので、ブロックf5に至るときは' ゼロ未満' となる)、このとき前記仮想コンパレータvaは' 0' となる。
次にブロックf5において前記シンクロA相信号QAが' 1' のときルートf5nに至る。
すなわち、ルートf5nに至るときは、前記仮想コンパレータvaが' 0' 、前記シンクロA相信号QAが' 1' と不一致となり前記パルス位相の補正が必要であって、このときは前記仮想コンパレータvaが' 0' なのでA相が立ち上がりの場合であり、正転のときは前記図20の時刻t42における補正が、逆転のときは前記図21の時刻t62における補正が必要となる。
次にブロックf7において、前記図20の時刻t42を参照すれば、A相の立ち上がりにおいて前記B相デジタル値VBが正のとき回転方向を正転と判定して、パルス位相を(−1)の補正を行うブロックf15へ分岐し、前記図21の時刻t62を参照すれば、A相の立ち上がりにおいて前記B相デジタル値VBが負のとき回転方向を逆転と判定して、パルス位相を(+1)の補正を行うブロックf14へ分岐する。
Next, blocks f4 to f6 in FIG. 22 determine whether or not to correct the pulse phase for the A phase. When correcting the pulse phase for the A phase, the blocks f7 and f8 depend on the rotation direction. It is determined whether the correction amount is (+1) or (-1).
First, the processing from the block f4 to the route f5n from the block f4 through the block f5 to the block f7 will be described. When the A-phase digital value VA is less than zero in the block f4, the processing reaches the block f5 (in block f4, “no” At this time, VA is less than or equal to zero, but excludes the case where VA is zero in the block f2, so that when reaching the block f5, it becomes “less than zero”). At this time, the virtual comparator va becomes “0”. Become.
Next, in the block f5, when the synchro A phase signal QA is "1", the route f5n is reached.
That is, when the route f5n is reached, the virtual comparator va is “0” and the synchro A phase signal QA is not equal to “1”, and the pulse phase needs to be corrected. At this time, the virtual comparator va Since it is '0', this is a case where the A phase is rising, and correction at time t42 in FIG. 20 is necessary for normal rotation, and correction at time t62 in FIG. 21 is necessary for reverse rotation.
Next, in block f7, referring to time t42 in FIG. 20, when the B phase digital value VB is positive at the rise of the A phase, the rotation direction is determined to be normal rotation, and the pulse phase is set to (-1). Branching to the block f15 for performing correction, and referring to the time t62 in FIG. 21, when the B phase digital value VB is negative at the rise of the A phase, the rotation direction is determined to be reverse, and the pulse phase is set to (+1). Branches to block f14 to perform the correction.

以上の、ブロックf4からブロックf5を経由してルートf5nに至る経緯と、ブロックf7の処理について要約すると次のとおりであり、前記図20及び図21の処理と対比して示す。
f5n: f4にてVA<0よりva=0,f5にてQA=1となり、
vaとQAは不一致で補正が必要でブロックf7へ
このルートf5nはA相が立ち上がりのときである
f7: 0<VBを満たすときは正転でf15へ ・・・・・・ 図20の時刻t42
0<VBを満たさないときは逆転でf14へ ・・・・・・ 図21の時刻t62
同様に、ブロックf4からブロックf6を経由してルートf6nに至る経緯と、ブロックf8の処理について要約すると次のとおりであり、前記図20及び図21の処理と対比して示す。
f6n: f4にて0<VAよりva=1,f6にてQA=0となり
vaとQAは不一致で補正が必要でブロックf8へ
このルートf6nはA相が立ち下がりのときである。
f8: 0<VBを満たさないときは正転でf15へ ・・・・・・ 図20の時刻t45
0<VBを満たすときは逆転でf14へ ・・・・・・ 図21の時刻t65
The above-described process from the block f4 to the route f5n via the block f5 and the process of the block f7 are summarized as follows, and are shown in comparison with the processes of FIGS.
f5n: VA = 0 from VA <0 at f4, QA = 1 at f5,
va and QA are inconsistent and need to be corrected, go to block f7
This route f5n is when the A phase rises. F7: When 0 <VB is satisfied, forward rotation and go to f15... Time t42 in FIG.
When 0 <VB is not satisfied, the rotation is reversed to f14... Time t62 in FIG.
Similarly, the process from the block f4 to the route f6n via the block f6 and the process of the block f8 are summarized as follows, and are shown in comparison with the processes of FIGS.
f6n: 0 <VA at f4, va = 1 from f, QA = 0 at f6
va and QA are inconsistent and need to be corrected, go to block f8
This route f6n is when the A phase falls.
f8: When 0 <VB is not satisfied, forward rotation and go to f15... time t45 in FIG.
When 0 <VB is satisfied, reverse rotation to f14... Time t65 in FIG.

次に、ブロックf4からブロックf5を経てルートf5yに至る経緯と、ブロックf4からブロックf6を経てルートf6yに至る経緯は以下のとおりで、このときは前記パルス位相の補正を必要とせずB相の処理へ移る。
f5y: f4にてVA<0よりva=0,f5にてQA=0
vaとQAは一致するので補正が不要でブロックf9へ
図20の時刻t41、t46、又は図21の時刻t61、t66のときである。
f6y: f4にて0<VAよりva=1,f6にてQA=1
vaとQAは一致するので補正が不要でブロックf9へ
図20の時刻t43、t44又は図21の時刻t63とt64のときである。
Next, the process from the block f4 through the block f5 to the route f5y and the process from the block f4 through the block f6 to the route f6y are as follows. At this time, the correction of the pulse phase is not required. Move on to processing.
f5y: VA <0 at VA <0 at f4, QA = 0 at f5
Since va and QA match, no correction is required and the process goes to block f9.
This is the time t41 and t46 in FIG. 20 or the time t61 and t66 in FIG.
f6y: 0 <VA at f4, va = 1 from fA, QA = 1 at f6
Since va and QA match, no correction is required and the process goes to block f9.
This is the time t43, t44 in FIG. 20 or the time t63 and t64 in FIG.

以上で、前記図22においてA相についてブロックf4からf8で行う前記パルス位相の補正について説明したが、次に、B相についてブロックf9からf13で行うパルス位相の補正について説明を行う。
前記図22のブロックf9からブロックf11はB相について前記パルス位相の補正を行うか否かを判定し、ブロックf12とf13で回転方向により、補正量を(+1)とするか(−1)とするかを決定するものである。
始めに、ブロックf9よりブロックf10を経てブロックf12に至るルートf10n迄の処理は、ブロックf9において前記B相デジタル値VBがゼロ未満のときはブロックf10に至り(ブロックf9において' no' のときはVBがゼロ以下であるが、ブロックf3においてVBがゼロのときを除外しているので、ブロックf10に至るときは' ゼロ未満' となる)、このとき前記仮想コンパレータvbは' 0' となる。
次にブロックf10において前記シンクロB相信号QBが' 1' のときルートf10nに至る。
すなわち、ルートf10nに至るときは、前記仮想コンパレータvbが' 0' と、前記シンクロB相信号QBが' 1' と不一致となり前記パルス位相の補正が必要であって、このときは前記仮想コンパレータvbが' 0' なのでB相が立ち上がりの場合であり、正転のときは前記図20の時刻t51における補正が、逆転のときは前記図21の時刻t71における補正が必要となる。
次にブロックf12において、前記図20の時刻t51を参照すれば、B相の立ち上がりにおいて前記A相デジタル値VAが負のとき回転方向を正転と判定してパルス位相の(−1)の補正を行うブロックf15へ分岐し、前記図21の時刻t71を参照すれば、B相の立ち上がりにおいて前記A相デジタル値VAが正のとき回転方向を逆転と判定してパルス位相の(+1)の補正を行うブロックf14へ分岐する。
The correction of the pulse phase performed in blocks f4 to f8 for the A phase in FIG. 22 has been described above. Next, the correction of the pulse phase performed in blocks f9 to f13 for the B phase will be described.
The blocks f9 to f11 in FIG. 22 determine whether or not to correct the pulse phase for the B phase. In blocks f12 and f13, whether the correction amount is (+1) or (-1) depending on the rotation direction. To decide what to do.
First, the process from the block f9 to the route f10n through the block f10 to the block f12 reaches the block f10 when the B-phase digital value VB is less than zero in the block f9 (when 'no' in the block f9) VB is less than or equal to zero, but excludes the case where VB is zero in the block f3, so that when reaching the block f10, it becomes “less than zero”). At this time, the virtual comparator vb becomes “0”.
Next, in the block f10, when the synchro B phase signal QB is "1", the route f10n is reached.
That is, when the route f10n is reached, the virtual comparator vb does not match “0” and the synchro B phase signal QB does not match “1”, and the pulse phase needs to be corrected. At this time, the virtual comparator vb Is “0”, the phase B is rising, and correction at time t51 in FIG. 20 is required for forward rotation, and correction at time t71 in FIG. 21 is required for reverse rotation.
Next, in block f12, referring to time t51 in FIG. 20, when the A-phase digital value VA is negative at the rise of the B-phase, the rotation direction is determined to be normal rotation and the pulse phase is corrected by (−1). Referring to time t71 in FIG. 21, when the A phase digital value VA is positive at the rise of the B phase, the rotation direction is determined to be reverse, and the pulse phase is corrected by (+1). Branch to block f14 where

以上の、ブロックf9からブロックf10を経てルートf10nに至る経緯と、ブロックf12の処理について要約すると次のとおりであり、前記図20及び図21の処理と対比して示す。
f10n:f9にてVB<0よりvb=0,f10にてQB=1となり
vbとQBは不一致で補正が必要でブロックf12へ
このルートf10nはB相が立ち上がりのときである。
f12: 0<VAを満たさないときは正転でf15へ ・・・・・・ 図20の時刻t51
0<VAを満たすときは逆転でf14へ ・・・・・・図21の時刻t71
同様に、ブロックf9からブロックf11を経てルートf11nに至る経緯と、ブロックf13の処理について要約すると次のとおりとなり、前記図20及び図21の処理と対比して示す。
f11n:f9にて0<VBよりvb=1,f11にてQB=0となり
vbとQBは不一致で補正が必要でブロックf13へ
このルートf11nはB相が立ち下がりのときである。
f13: 0<VAを満たすときは正転でf15へ ・・・・・・図20の時刻t48
0<VAを満たさないときは逆転でf14へ ・・・・・・ 図21の時刻t68
The above-described process from the block f9 through the block f10 to the route f10n and the processing of the block f12 are summarized as follows, and are shown in comparison with the processing of FIG. 20 and FIG.
f10n: From VB <0 at f9, vb = 0, and at f10, QB = 1.
vb and QB are inconsistent and need to be corrected, go to block f12
This route f10n is when the B phase rises.
f12: When 0 <VA is not satisfied, forward rotation and go to f15... time t51 in FIG.
When 0 <VA is satisfied, reverse rotation to f14... Time t71 in FIG.
Similarly, the process from the block f9 to the route f11n through the block f11 and the process of the block f13 are summarized as follows, which is shown in comparison with the processes of FIGS.
f11n: 0 <VB at f9, vb = 1 from fB, QB = 0 at f11
vb and QB are inconsistent and need to be corrected, go to block f13
This route f11n is when the B phase falls.
f13: When 0 <VA is satisfied, forward rotation and go to f15... time t48 in FIG.
When 0 <VA is not satisfied, the rotation is reversed to f14... Time t68 in FIG.

そして、ブロックf9からブロックf10を経てルートf10yに至る経緯と、ブロックf9からブロックf11を経てルートf11yに至る経緯は以下のとおりで、このときは前記パルス位相の補正を必要とせずルートf21を経て図22の処理を終える。
f10y:f9にてVB<0よりvb=0,f10にてQB=0
vbとQBは一致するので補正が不要でエンドへ
図20の時刻t49、t50、又は図21の時刻t69、t70のときである。
f11y:f9にて0<VBよりvb=1,f11にてQB=1
vbとQBは一致するので補正が不要でエンドへ
図20の時刻t47、t52、又は図21の時刻t67とt72のときである。
The process from the block f9 through the block f10 to the route f10y and the process from the block f9 through the block f11 to the route f11y are as follows. The process of FIG. 22 is finished.
f10y: vb = 0 from f9 at v9, QB = 0 at f10
Since vb and QB match, no correction is required and the end
This is the time t49, t50 in FIG. 20 or the time t69, t70 in FIG.
f11y: 0 <VB at f9, vb = 1, and QB = 1 at f11
Since vb and QB match, no correction is required and the end
This is the time t47, t52 in FIG. 20, or the time t67 and t72 in FIG.

かようにして、前記マイクロコントローラ9は前記図22の処理を周期的に行い、前記コンパレータ3が前記図19に示す動作を行うとき、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときも逆転方向に回転するときも前記図20、図21及び図22に示すとおり、前記正弦波インクリメンタルエンコーダ1bのA相とB相がゼロをクロスするときも前記パルス位相の補正を行い、前記正弦波インクリメンタルエンコーダ1bが低速のみならず高速で回転するときも、常に正しいパルス位相を検出するものである。   In this way, the microcontroller 9 periodically performs the processing of FIG. 22, and when the comparator 3 performs the operation shown in FIG. 19, the sine wave incremental encoder 1b also rotates in the forward rotation direction. Even when rotating in the reverse direction, as shown in FIGS. 20, 21, and 22, the pulse phase is corrected even when the A phase and the B phase of the sine wave incremental encoder 1b cross zero, and the sine wave is corrected. Even when the incremental encoder 1b rotates at a high speed as well as a low speed, the correct pulse phase is always detected.

ここで、前記図13において、前記パルス位相検出器8が出力するパルス位相の補正の実施例を、前記図18と図22に示し説明を行うものであるが、該実施例では前記正弦波インクリメンタルエンコーダ1bの前記A相デジタル値VA、又は前記B相デジタル値VBがゼロのときを除外するものであった。
次に、前記図13において該VA又はVBがゼロのとき、本発明による前記パルス位相の補正の実施例を示し説明する。
Here, in FIG. 13, an embodiment of correcting the pulse phase output from the pulse phase detector 8 is shown and described in FIGS. 18 and 22, and in this embodiment, the sine wave incremental is used. The case where the A-phase digital value VA or the B-phase digital value VB of the encoder 1b is zero is excluded.
Next, when the VA or VB is zero in FIG. 13, an example of the correction of the pulse phase according to the present invention will be described.

始めに、図23、図24及び図25は、前記図13における前記コンパレータ3が前記図15の(a)から(f)で示す特性を有するときで、前記正弦波インクリメンタルエンコーダ1bのA相信号又はB相信号がゼロのときであって、請求項に関わる前記パルス位相の補正の実施例を説明するものである。そして、図23について説明すれば、図23の(a)は前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときのA相信号とB相信号の時間的推移を示し、図23の(b)と(c)はそれぞれ前記パルス抽出器6が出力するシンクロA相信号QA及びシンクロB相信号QBを示す。そして、前記図23の(a)では前記コンパレータ3が動作するレベルを前記図15の(a)と同じくVh及びVlとし、VhがVlより大きい場合であって、前記図13における前記マイクロコントローラ9が前記A/D変換器13及び14から入力する前記A相デジタル値とB相デジタル値をそれぞれVA、VBとしている。そして、該A相デジタル値VAは時刻t13及びt14においてゼロになるとし、前記B相デジタル値VBは時刻t15及びt16においてゼロになるとし、次に、A相を例とすれば図23の(b)に示すとおり、前記シンクロA相信号QAは時刻(t13+Δt13)において' 1' に、時刻(t14+Δt14)において' 0' に遅延して変化するものである。 First, FIG. 23, FIG. 24 and FIG. 25 show the A-phase signal of the sine wave incremental encoder 1b when the comparator 3 in FIG. 13 has the characteristics shown in (a) to (f) of FIG. Alternatively, when the B-phase signal is zero, an example of correction of the pulse phase according to claim 4 will be described. 23, (a) of FIG. 23 shows temporal transitions of the A-phase signal and the B-phase signal when the sine wave incremental encoder 1b rotates in the forward rotation direction, and (b) of FIG. ) And (c) show the synchronized A-phase signal QA and synchronized B-phase signal QB output from the pulse extractor 6, respectively. In FIG. 23 (a), the level at which the comparator 3 operates is Vh and Vl as in FIG. 15 (a), and Vh is larger than Vl. The microcontroller 9 in FIG. Are the A-phase digital value and the B-phase digital value input from the A / D converters 13 and 14, respectively, as VA and VB. Then, it is assumed that the A-phase digital value VA becomes zero at times t13 and t14, the B-phase digital value VB becomes zero at times t15 and t16, and then the A phase is taken as an example in FIG. As shown in b), the synchro A-phase signal QA changes with a delay of '1' at time (t13 + Δt13) and '0' at time (t14 + Δt14).

次に、図23の(d)は前記パルス位相検出器8が出力するパルス位相を示し、該パルス位相は前記シンクロA相信号QAと前記シンクロB相信号QBと、完全に同期してカウントアップ又はダウンするもので、A相を例にすれば時刻(t13+Δt13)にて前記シンクロA相信号QAが' 1' となる時に前記パルス位相は(C−1)から(C)に、時刻(t14+Δt14)にて前記シンクロA相信号QAが' 0' となる時に前記パルス位相は(C+1)から(C+2)にカウントアップする。
そして、図23の(e)は前記マイクロコントローラ9が前記A相デジタル値VAとB相デジタル値VBから算出し得る補間位相を仮想的に連続して表し、例えば時刻t13からt15迄、補間位相はゼロから増大し最大補間位相がαmax迄カウントアップするものである。
Next, (d) of FIG. 23 shows the pulse phase output from the pulse phase detector 8, and the pulse phase is counted up in synchronization with the synchro A phase signal QA and the synchro B phase signal QB. Or, if the A phase is taken as an example, when the synchro A phase signal QA becomes '1' at time (t13 + Δt13), the pulse phase changes from (C-1) to (C) at time (t14 + Δt14). ), The pulse phase is counted up from (C + 1) to (C + 2) when the synchro A phase signal QA becomes '0'.
FIG. 23E shows the interpolation phase virtually calculated by the microcontroller 9 from the A-phase digital value VA and the B-phase digital value VB. For example, the interpolation phase from time t13 to t15 is shown. Increases from zero and the maximum interpolation phase is counted up to αmax.

ここで、前記マイクロコントローラ9が、例えば時刻t13においてA相デジタル値VAがゼロであることより補間位相をゼロと検出した時、前記パルス位相は前記図23の(d)で示すとおり(C−1)である。然るに、図23の(e)において点Aのパルス位相を(C−1)とすれば、該点Aより補間位相が増大し最大補間位相αmaxに到達した後ゼロとなる点B、すなわち時刻t13のパルス位相は1を加えて(C)と補正すべきであり、この補正後の仮想パルス位相の時間的推移を図23の(f)に示す。かように、前記図23の(d)に示すパルス位相が理想的な前記図23の(f)とならない理由は、前記コンパレータ3を実現するに当たり、' 1' を検出するレベルVhと' 0' を検出するレベルVlを共にゼロとすることは非実用的もしくは実現が不可能であって、VhとVlが前記図15のとおりとなることを禁じ得ない為である。   Here, for example, when the microcontroller 9 detects that the interpolation phase is zero at time t13 because the A-phase digital value VA is zero, the pulse phase is as shown in (d) of FIG. 1). However, if the pulse phase at point A is (C-1) in FIG. 23E, the interpolation phase increases from point A and reaches zero after reaching the maximum interpolation phase αmax, that is, time t13. Is corrected by adding 1 to (C), and the temporal transition of the corrected virtual pulse phase is shown in FIG. Thus, the reason why the pulse phase shown in (d) of FIG. 23 does not become the ideal (f) of FIG. 23 is that the level Vh for detecting “1” and “0” in realizing the comparator 3. This is because it is impractical or impossible to set both the level Vl for detecting 'to zero, and it cannot be prohibited that Vh and Vl become as shown in FIG.

そして、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するとき、A相について上記に示した本発明による補正の処理を要約すれば、前記マイクロコントローラ9は前記図23の(a)に示すA相の立ち上がりの時刻t13においてA相デジタル値VAがゼロを検出し、前記図23の(b)に示す如く前記シンクロA相信号QAが' 0' を検出した時、前記Vhがゼロより大きいことに起因し、該シンクロA相信号QAが' 1' となるべきところが遅延してパルス位相がカウントアップしていないと判定し、前記図23の(d)の時刻t13のパルス位相(C−1)に1を加える補正を行い(C)とする。 同様に、前記マイクロコントローラ9は前記図23の(a)に示すA相の立ち下がりの時刻t14においてA相デジタル値VAがゼロを検出し、前記図23の(b)に示す如く前記シンクロA相信号QAが' 1' を検出した時、Vlがゼロより小さいことに起因し、該シンクロA相信号QAが' 0' となるべきところが遅延していると判定し、前記図23の(d)の時刻t14のパルス位相(C+1)に1を加える補正を行い(C+2)とする。
以上はA相について説明を行ったがB相についても同様に、前記マイクロコントローラ9は前記図23の(a)の時刻t15及びt16においてB相デジタル値VBがゼロを検出した時、A相と同様の処理を行うものである。
Then, when the sinusoidal incremental encoder 1b rotates in the forward rotation direction, the correction process according to the present invention described above for the A phase can be summarized as follows. When the phase A digital value VA detects zero at the phase rising time t13 and the synchro phase A signal QA detects '0' as shown in FIG. 23B, the Vh is greater than zero. Therefore, it is determined that the sync A phase signal QA is supposed to be “1” and the pulse phase is not counted up, and the pulse phase (C−1) at time t13 in FIG. ) To add 1 to (C). Similarly, the microcontroller 9 detects that the A-phase digital value VA is zero at the falling time t14 of the A-phase shown in (a) of FIG. 23, and the synchro A as shown in (b) of FIG. When the phase signal QA detects “1”, it is determined that the place where the synchronized A-phase signal QA should be “0” is delayed due to the fact that Vl is smaller than zero. ) Is corrected by adding 1 to the pulse phase (C + 1) at time t14 (C + 2).
The phase A has been described above. Similarly, for the phase B, the microcontroller 9 detects that the phase B digital value VB is zero at the times t15 and t16 in FIG. The same processing is performed.

以上で説明した図23は、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときであるが、次に逆転方向に回転するとき、前記マイクロコントローラ9が前記正弦波インクリメンタルエンコーダ1bのA相信号又はB相信号をゼロと検出したとき、前記パルス位相の補正を図24に依り説明するもので、該図24の(a)から(e)は前記図23のそれと同じ信号の時間的推移を示し、図24の(d)においてはパルス位相が時間の推移とともにカウントダウンし、図24の(e)における補間位相も減少方向に推移するものである。そして、図24の(a)において前記A相デジタル値VAは時刻t33及びt34においてゼロになるとし、前記B相デジタル値VBは時刻t35及びt36においてゼロになるとし、A相を例とすれば図24の(b)に示すとおり、前記シンクロA相信号QAは時刻(t33+Δt33)において' 1' に、時刻(t34+Δt34)において' 0' に遅延して変化するものである。   FIG. 23 described above is when the sine wave incremental encoder 1b rotates in the forward direction, but when the sine wave incremental encoder 1b rotates in the reverse direction next time, the microcontroller 9 causes the A-phase signal of the sine wave incremental encoder 1b. Alternatively, when the B phase signal is detected as zero, the correction of the pulse phase will be described with reference to FIG. 24. FIGS. 24A to 24E show the time transition of the same signal as that of FIG. In FIG. 24 (d), the pulse phase counts down with time, and the interpolation phase in FIG. 24 (e) also decreases. In FIG. 24A, it is assumed that the A-phase digital value VA is zero at times t33 and t34, and the B-phase digital value VB is zero at times t35 and t36. As shown in FIG. 24 (b), the synchro A-phase signal QA changes with a delay to '1' at time (t33 + Δt33) and to '0' at time (t34 + Δt34).

そして、図24の(d)の前記パルス位相検出器8が出力するパルス位相は、前記シンクロA相信号QAとB相デジタル値VBと、完全に同期してカウントアップ又はダウンするもので、A相を例にすれば時刻(t33+Δt33)にて前記シンクロA相信号QAが' 1' となる時に前記パルス位相は(C)から(C−1)に、時刻(t34+Δt34)にて前記シンクロA相信号QAが' 0' となる時に前記パルス位相は(C−2)から(C−3)にカウントダウンする。そして、図24の(e)は、前記マイクロコントローラ9が前記A相デジタル値VAとB相デジタル値VBから算出し得る補間位相を仮想的に連続して表し、例えば時刻t33からt36迄、補間位相は最大補間位相がαmaxからゼロ迄カウントダウンするものである。   The pulse phase output from the pulse phase detector 8 in FIG. 24D is counted up or down completely in synchronization with the sync A phase signal QA and the B phase digital value VB. Taking the phase as an example, the pulse phase changes from (C) to (C-1) at the time (t33 + Δt33), and the sync A phase at the time (t34 + Δt34). When the signal QA becomes '0', the pulse phase counts down from (C-2) to (C-3). FIG. 24E shows the interpolation phase virtually calculated by the microcontroller 9 from the A-phase digital value VA and the B-phase digital value VB. For example, the interpolation is performed from time t33 to t36. The phase is such that the maximum interpolation phase counts down from αmax to zero.

ここで、前記マイクロコントローラ9は、例えば前記図24の(a)の時刻t33の点BにおいてA相デジタル値VAをゼロと検出したとき、補間位相を前記図24の(e)の点Bに示すとおりゼロと算出するもので、このとき前記図24の(d)で示すとおり前記パルス位相は(C)である。ここで、図24の(e)において点Aのパルス位相を(C)とすれば、該点Aより補間位相が減少してゼロとなる点Bのパルス位相も同じく(C)で正しい。かように、前記正弦波インクリメンタルエンコーダ1bが逆転方向に回転するとき、前記マイクロコントローラ9がA相デジタル値VA又はB相デジタル値VBをゼロと検出しても、正転のときと相違してパルス位相を補正する必要が無いものである。   Here, for example, when the microcontroller 9 detects that the A-phase digital value VA is zero at the point B at time t33 in FIG. 24A, the microcontroller 9 sets the interpolation phase to the point B in FIG. As shown, zero is calculated. At this time, the pulse phase is (C) as shown in FIG. Here, if the pulse phase at point A is (C) in (e) of FIG. 24, the pulse phase at point B where the interpolation phase decreases from point A and becomes zero is also correct in (C). Thus, when the sine wave incremental encoder 1b rotates in the reverse direction, even if the microcontroller 9 detects the A-phase digital value VA or the B-phase digital value VB as zero, it differs from the normal rotation. There is no need to correct the pulse phase.

以上で説明した前記図13のコンパレータが前記図15の動作特性を有するとき、正転のときは前記図23、逆転のときは前記図24で説明した前記パルス位相の補正を、前記マイクロコントローラ9のプログラムにより実施する例を図25に示し説明する。始めに、前記マイクロコントローラ9は該図25においてブロックf1、f2及びf3の次の処理を行う。
f1:A相デジタル値VA、B相デジタル値VB、シンクロA相信号QA、シンクロB相信号QB及びパルス位相を入力した後f2へ。
f2:VAがゼロのときはf4へ、VAがゼロでないときはf3へ。
f3:VBがゼロのときはf4へ、VBがゼロでないときはパルス位相の補正は実施せずルートf3nを経て処理を終える。
かように、前記A相デジタル値VA又はB相デジタル値VBがゼロのときは、前記図23及び図24による前記パルス位相の補正を実施するものでブロックf4へ進む。
次に、ブロックf4では前記正弦波インクリメンタルエンコーダ1bの回転方向の検出を行い、逆転のときは前記図24において説明したとおり、前記パルス位相の補正は必要としないのでルートf4nを経て処理を終え、正転のときはブロックf5へ進み、前記図23において説明したパルス位相の補正を行う。なお、回転方向の検出は例えば、パルス位相が前スキャンより増加していれば正転、減少していれば逆転とすればよい。
When the comparator of FIG. 13 described above has the operating characteristics of FIG. 15, the correction of the pulse phase described in FIG. 23 at the time of forward rotation and FIG. 24 at the time of reverse rotation is performed by the microcontroller 9. An example of implementation by the program will be described with reference to FIG. First, the microcontroller 9 performs the following processing of blocks f1, f2 and f3 in FIG.
f1: After inputting the A phase digital value VA, the B phase digital value VB, the synchro A phase signal QA, the synchro B phase signal QB and the pulse phase, go to f2.
f2: When VA is zero, go to f4, and when VA is not zero, go to f3.
f3: When VB is zero, the process proceeds to f4. When VB is not zero, the pulse phase is not corrected and the process is finished through the route f3n.
Thus, when the A-phase digital value VA or the B-phase digital value VB is zero, the pulse phase correction according to FIGS. 23 and 24 is performed, and the process proceeds to block f4.
Next, in the block f4, the rotation direction of the sine wave incremental encoder 1b is detected, and as described in FIG. 24 at the time of reverse rotation, since the correction of the pulse phase is not necessary, the process is finished through the route f4n. When the rotation is normal, the process proceeds to block f5 to correct the pulse phase described with reference to FIG. The rotation direction may be detected by, for example, normal rotation if the pulse phase has increased from the previous scan, and reverse rotation if it has decreased.

そして、ブロックf5は前記A相デジタル値VAがゼロであるか、前記B相デジタル値VBがゼロであるかを判定し、ブロックf6からf8はA相の前記VAがゼロのときの前記パルス位相の補正に関するもので、前記図23を参照し次の処理を行う。
f5: VAがゼロのときはf6へ進み、A相によるパルス位相の補正を行う。VAがゼロでないときはVBがゼロでありf9へ進み、B相によるパルス位相の補正を行う。 f6: VAがゼロでVBが正のときはVAが立ち上がりのときでf8へ進む。又VAがゼロでVBが負のときはVAが立ち下がりのときでf7へ進む。
f7: このときはVAが立ち下がりのときゼロとなるときで、このときQAが' 1' ならばQAが' 0' となるが遅れているので、f12へ進み前記パルス位相に1を加える補正を行う。QAが' 0' のとき補正は不要でf11nを経て処理を終える。
f8: このときはVAが立ち上がりのときゼロとなるときで、このときQAが' 0' ならばQAが' 1' となるを遅れているので、f12へ進み前記パルス位相に1を加える補正を行う。QAが' 1' のとき補正は不要でf11nを経て処理を終える。
次に、ブロックf9からf11は、B相の前記VBがゼロのときの前記パルス位相の補正に関するもので、A相と同様に前記図23を参照し次の処理を行う。
f9: VBがゼロでVAが負のときはVBが立ち上がりのときでf11へ進む。また、VBがゼロでVAが正のときはVBが立ち下がりのときで、f10へ進む。
f10: このときはVBが立ち下がりのときゼロとなるときで、このときQBが' 1' ならばQBが' 0' となるを遅れているので、f12へ進み前記パルス位相に1を加える補正を行う。QBが' 0' のとき補正は不要でf11nを経て処理を終える。
f11: このときはVBが立ち上がりのときゼロとなるときで、このときQBが' 0' ならばQBが' 1' となるを遅れているので、f12へ進み前記パルス位相に1を加える補正を行う。QBが' 1' のとき補正は不要でf11nを経て処理を終える。
The block f5 determines whether the A-phase digital value VA is zero or the B-phase digital value VB is zero, and the blocks f6 to f8 are the pulse phases when the A-phase VA is zero. The following processing is performed with reference to FIG.
f5: When VA is zero, the process proceeds to f6, and the pulse phase is corrected by the A phase. When VA is not zero, VB is zero and the process proceeds to f9 to correct the pulse phase by the B phase. f6: When VA is zero and VB is positive, the process proceeds to f8 when VA rises. When VA is zero and VB is negative, the process proceeds to f7 when VA falls.
f7: At this time, when VA falls to zero, at this time, if QA is '1', QA becomes '0', but since it is delayed, the process proceeds to f12 and is corrected to add 1 to the pulse phase I do. When QA is “0”, no correction is necessary, and the process is finished through f11n.
f8: At this time, when VA becomes zero when rising, if QA is '0', since QA is delayed from becoming '1', the process proceeds to f12, and correction for adding 1 to the pulse phase is performed. Do. When QA is “1”, no correction is necessary, and the process is finished through f11n.
Next, blocks f9 to f11 relate to correction of the pulse phase when the VB of the B phase is zero, and the following processing is performed with reference to FIG.
f9: When VB is zero and VA is negative, the process proceeds to f11 when VB rises. When VB is zero and VA is positive, VB falls and the process proceeds to f10.
f10: At this time, VB becomes zero when falling, and if QB is '1' at this time, since QB is delayed from becoming '0', the process proceeds to f12, and correction is performed to add 1 to the pulse phase. I do. When QB is “0”, no correction is necessary, and the process is finished through f11n.
f11: At this time, VB becomes zero when rising, and if QB is '0', since QB is delayed from becoming '1', the process proceeds to f12, and correction for adding 1 to the pulse phase is performed. Do. When QB is “1”, no correction is necessary, and the process is finished through f11n.

かようにして、前記図13のコンパレータ3が前記図15に示す動作を行うとき、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときも逆転方向に回転するときも前記図23、図24及び図25に示すとおり、前記マイクロコントローラ9が前記正弦波インクリメンタルエンコーダ1bのA相デジタル値VA又はB相デジタル値VBをゼロと検出したときに前記パルス位相の補正を行う。これにより、前記正弦波インクリメンタルエンコーダ1bが低速のみならず高速で回転するときも、常に正しいパルス位相を検出するものである。   Thus, when the comparator 3 of FIG. 13 performs the operation shown in FIG. 15, the sine wave incremental encoder 1b rotates in the forward direction and in the reverse direction, as shown in FIGS. As shown in FIG. 25, when the microcontroller 9 detects that the A-phase digital value VA or the B-phase digital value VB of the sine wave incremental encoder 1b is zero, the pulse phase is corrected. Thus, the correct pulse phase is always detected even when the sine wave incremental encoder 1b rotates at a high speed as well as a low speed.

次に、前記図13における前記コンパレータ3が、前記図19の(a)から(f)で示す特性を有するときであって、前記正弦波インクリメンタルエンコーダ1bのA相信号又はB相信号がゼロのとき、請求項に関わる前記パルス位相の補正の実施例を図26、図27及び図28により説明する。
始めに、図26について前記図23と類似して、図26の(a)は前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときのA相信号とB相信号の時間的推移を示し、図26の(b)と(c)はそれぞれ前記パルス抽出器6が出力するシンクロA相信号QA及びシンクロB相信号QBを示す。
そして、前記図26の(a)では前記コンパレータ3が動作するレベルを前記図19の(a)と同じくVh及びVlとし、VhがVlより小さい場合であって、前記図13における前記マイクロコントローラ9が前記A/D変換器13及び14から入力する前記A相デジタル値とB相デジタル値をそれぞれVA、VBとしている。そして、該A相デジタル値VAは時刻t53及びt54においてゼロになるとし、前記B相デジタル値VBは時刻t55及びt56においてゼロになるとし、次にA相を例とすれば図26の(b)に示すとおり、前記シンクロA相信号QAは時刻(t53−Δt53)において' 1' に、時刻(t54−Δt54)において' 0' に早期に変化するものである。
Next, when the comparator 3 in FIG. 13 has the characteristics shown in FIGS. 19A to 19F, the A-phase signal or B-phase signal of the sine wave incremental encoder 1b is zero. An embodiment of correction of the pulse phase according to claim 5 will be described with reference to FIGS. 26, 27, and 28. FIG.
First, similar to FIG. 23 with respect to FIG. 26, (a) of FIG. 26 shows temporal transitions of the A-phase signal and the B-phase signal when the sine wave incremental encoder 1b rotates in the forward rotation direction. FIGS. 26B and 26C show the synchro A phase signal QA and the synchro B phase signal QB output from the pulse extractor 6, respectively.
In FIG. 26 (a), the level at which the comparator 3 operates is Vh and Vl as in FIG. 19 (a), and Vh is smaller than Vl. The microcontroller 9 in FIG. Are the A-phase digital value and B-phase digital value input from the A / D converters 13 and 14, respectively, as VA and VB. The phase A digital value VA is assumed to be zero at times t53 and t54, the phase B digital value VB is assumed to be zero at times t55 and t56, and the phase A is taken as an example in FIG. ), The synchro A-phase signal QA changes early to '1' at time (t53-Δt53) and to '0' at time (t54-Δt54).

次に、図26の(d)は前記パルス位相検出器8が出力するパルス位相を示し、該パルス位相は前記シンクロA相信号QAと前記シンクロB相信号QBと、完全に同期してカウントアップ又はダウンするもので、A相を例にすれば時刻(t53−Δt53)にて前記シンクロA相信号QAが' 1' となる時に前記パルス位相は(C−1)から(C)に、時刻(t54−Δt54)にて前記シンクロA相信号QAが' 0' となる時に前記パルス位相は(C+1)から(C+2)にカウントアップする。
そして、図26の(e)は前記マイクロコントローラ9が前記A相デジタル値VAとB相デジタル値VBから算出し得る補間位相を仮想的に連続して表し、例えば時刻t53からt55迄、補間位相はゼロから最大補間位相がαmax迄カウントアップするものである。
Next, (d) of FIG. 26 shows the pulse phase output by the pulse phase detector 8, and the pulse phase is counted up in synchronization with the synchro A phase signal QA and the synchro B phase signal QB. If the A phase is taken as an example, the pulse phase changes from (C-1) to (C) when the sync A phase signal QA becomes '1' at time (t53-Δt53). When the synchro A-phase signal QA becomes “0” at (t54−Δt54), the pulse phase is counted up from (C + 1) to (C + 2).
FIG. 26E shows the interpolation phase virtually calculated by the microcontroller 9 from the A-phase digital value VA and the B-phase digital value VB. For example, the interpolation phase from time t53 to t55 is shown. Is counted up from zero to the maximum interpolation phase αmax.

かような前記図26において、A相デジタル値VA又はB相デジタル値VBがゼロのときのパルス位相の補正について次に示すと、前記マイクロコントローラ9は、例えば前記図26の(a)の時刻t53の点BにおいてA相デジタル値VAをゼロと検出したとき、補間位相を前記図26の(e)の点Bに示すゼロと算出するもので、このとき前記図26の(d)で示すとおり前記パルス位相は(C)である。
ここで、図26の(e)において点Aのパルス位相を(C−1)とすれば、該点Aより補間位相が増大し最大補間位相αmaxに到達した後ゼロとなる点B、すなわち時刻t53のパルス位相は1を加えて(C)となるべきもので、前記図26の(d)から得られるパルス位相と等しい。これは、時刻t53より時間Δt53だけ早い時刻に、前記図26のパルス位相がカウントアップされる為である。
かように、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するとき、前記マイクロコントローラ9がA相デジタル値VA又はB相デジタル値VBをゼロと検出しても、パルス位相を補正する必要が無いものである。
In FIG. 26, the correction of the pulse phase when the A-phase digital value VA or the B-phase digital value VB is zero will be described as follows. For example, the microcontroller 9 performs the time shown in FIG. When the A-phase digital value VA is detected as zero at the point B at t53, the interpolation phase is calculated as zero shown at the point B in (e) of FIG. 26. At this time, it is shown by (d) in FIG. As described above, the pulse phase is (C).
Here, if the pulse phase at point A in FIG. 26 (e) is (C-1), point B becomes zero after the interpolation phase increases from point A and reaches the maximum interpolation phase αmax, that is, time The pulse phase at t53 should be (C) by adding 1, and is equal to the pulse phase obtained from (d) of FIG. This is because the pulse phase of FIG. 26 is counted up at a time earlier than time t53 by time Δt53.
Thus, when the sine wave incremental encoder 1b rotates in the forward direction, even if the microcontroller 9 detects the A-phase digital value VA or the B-phase digital value VB as zero, it is necessary to correct the pulse phase. There is nothing.

以上で説明した図26は、前記コンパレータ3が前記図19の(a)から(f)で示す特性を有するときに、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときであるが、次に逆転方向に回転するとき、前記マイクロコントローラ9が前記正弦波インクリメンタルエンコーダ1bのA相信号又はB相信号をゼロと検出したとき、前記パルス位相の補正を図27に依り説明するもので、該図27の(a)から(e)は前記図26のそれと同じ信号の時間的推移を示し、図27の(d)においてはパルス位相が時間の推移とともにカウントダウンし、図27の(e)における補間位相も減少方向に推移するものである。
そして、図27の(a)において前記A相デジタル値VAは時刻t73及びt74においてゼロになるとし、前記B相デジタル値VBは時刻t75及びt76においてゼロになるとし、A相を例とすれば図27の(b)に示すとおり、前記シンクロA相信号QAは時刻(t73−Δt73)において' 1' に、時刻(t74−Δt74)において' 0' に早期に変化するものである。
FIG. 26 described above is a case where the sine wave incremental encoder 1b rotates in the forward rotation direction when the comparator 3 has the characteristics shown in FIGS. 19 (a) to 19 (f). When the microcontroller 9 detects that the A-phase signal or B-phase signal of the sine wave incremental encoder 1b is zero when rotating in the reverse direction, the correction of the pulse phase will be described with reference to FIG. 27 (a) to (e) show the time transition of the same signal as that of FIG. 26. In FIG. 27 (d), the pulse phase counts down with time, and in FIG. 27 (e). The interpolation phase also changes in the decreasing direction.
In FIG. 27A, it is assumed that the A-phase digital value VA becomes zero at times t73 and t74, and the B-phase digital value VB becomes zero at times t75 and t76. As shown in FIG. 27 (b), the synchro A phase signal QA changes early to '1' at time (t73-Δt73) and to '0' at time (t74-Δt74).

そして、図27の(d)の前記パルス位相検出器8が出力するパルス位相は、前記シンクロA相信号QAとB相デジタル値VBと、完全に同期してカウントアップ又はダウンするもので、A相を例にすれば時刻(t73−Δt73)にて前記シンクロA相信号QAが' 1' となる時に前記パルス位相は(C)から(C−1)に、時刻(t74−Δt74)にて前記シンクロA相信号QAが' 0' となる時に前記パルス位相は(C−2)から(C−3)にカウントダウンする。
そして、図27の(e)は、前記マイクロコントローラ9が前記A相デジタル値VAとB相デジタル値VBから算出し得る補間位相を仮想的に連続して表し、例えば時刻t75からt73迄、補間位相は最大補間位相がαmaxからゼロ迄カウントダウンするものである。
The pulse phase output from the pulse phase detector 8 in FIG. 27 (d) counts up or down completely in synchronization with the synchro A phase signal QA and the B phase digital value VB. Taking the phase as an example, the pulse phase changes from (C) to (C-1) and from time (t74-Δt74) when the synchro A-phase signal QA becomes '1' at time (t73-Δt73). When the synchro A phase signal QA becomes '0', the pulse phase counts down from (C-2) to (C-3).
FIG. 27E shows the interpolation phase virtually calculated by the microcontroller 9 from the A-phase digital value VA and the B-phase digital value VB. For example, the interpolation is performed from time t75 to t73. The phase is such that the maximum interpolation phase counts down from αmax to zero.

かような前記図27において、A相デジタル値VA又はB相デジタル値VBがゼロのときのパルス位相の補正について次に示すと、前記マイクロコントローラ9は、例えば前記図27の(a)の時刻t73の点BにおいてA相デジタル値VAをゼロと検出したとき、補間位相を前記図27の(e)の点Bに示すとおりゼロと算出するもので、このとき前記図27の(d)で示すとおり前記パルス位相は(C−1)である。
ここで、図27の(e)において点Aのパルス位相を(C)とすれば、該点Aより補間位相が減少しゼロとなる点B、すなわち時刻t73のパルス位相も本来(C)のままであり、これにより時刻t73における前記図27の(d)で示す前記パルス位相は1を加算する補正が必要である。
かように、パルス位相の補正が必要となる理由は、前記コンパレータ3を実現するに当たり、' 1' を検出するレベルVhと' 0' を検出するレベルVlを共にゼロとすることは非実用的もしくは実現が不可能であって、VhとVlが前記図15又は前記図19のとおりとなることを禁じ得ない為である。
In FIG. 27, the correction of the pulse phase when the A-phase digital value VA or the B-phase digital value VB is zero will be described as follows. For example, the microcontroller 9 performs the time shown in FIG. When the A-phase digital value VA is detected as zero at the point B at t73, the interpolation phase is calculated as zero as indicated by the point B in FIG. 27 (e). At this time, in FIG. As shown, the pulse phase is (C-1).
Here, if the pulse phase at point A is (C) in (e) of FIG. 27, the interpolation phase decreases from point A and becomes zero, that is, the pulse phase at time t73 is originally of (C). As a result, the pulse phase shown in FIG. 27D at time t73 needs to be corrected by adding 1.
Thus, the reason why the pulse phase needs to be corrected is that it is impractical to set both the level Vh for detecting '1' and the level Vl for detecting '0' to zero in realizing the comparator 3. Or it is impossible to realize, and it cannot be prohibited that Vh and Vl are as shown in FIG. 15 or FIG.

そして、前記正弦波インクリメンタルエンコーダ1bが逆転方向に回転するとき、A相について上記に示した本実施例による補正の処理を要約すれば、前記マイクロコントローラ9は前記図27の(a)に示すA相の立ち上がりの時刻t73においてA相デジタル値VAがゼロを検出し、前記図27の(b)に示す如く前記シンクロA相信号QAが' 1' を検出した時、前記Vhがゼロより小さいことに起因し、該シンクロA相信号QAが' 0' であるべきところが早期に' 1' に変化してパルス位相が余分にダウンカウントしていると判定し、前記図27の(d)の時刻t73のパルス位相(C−1)に1を加えて戻す補正を行い(C)とする。
同様に、前記マイクロコントローラ9は前記図27の(a)に示すA相の立ち下がりの時刻t74においてA相デジタル値VAがゼロを検出し、前記図27の(b)に示す如く前記シンクロA相信号QAが' 0' を検出した時、Vlがゼロより大きいことに起因し、該シンクロA相信号QAが' 1' であるべきところが早期に' 0' に変化してパルス位相が余分にダウンカウントしていると判定し、前記図27の(d)の時刻t74のパルス位相(C−3)に1を加えて戻す補正を行い(C−2)とする。
以上はA相について説明を行ったがB相についても同様に、前記マイクロコントローラ9は前記図27の(a)の時刻t75及びt76においてB相デジタル値VBをゼロと検出した時、A相と同様の処理を行うものである。
When the sine wave incremental encoder 1b rotates in the reverse rotation direction, the correction process according to the present embodiment described above for the A phase can be summarized as follows. When the phase A digital value VA detects zero at the phase rising time t73 and the synchro phase A signal QA detects '1' as shown in FIG. 27B, the Vh is smaller than zero. 27, it is determined that the place where the sync A phase signal QA should be “0” is changed to “1” at an early stage and the pulse phase is excessively counted down, and the time shown in FIG. A correction is made by adding 1 to the pulse phase (C-1) at t73 and returning to (C).
Similarly, the microcontroller 9 detects that the A-phase digital value VA is zero at the falling time t74 of the A-phase shown in (a) of FIG. 27, and the synchro A as shown in (b) of FIG. When phase signal QA detects '0', Vl is greater than zero, and the sync A phase signal QA should change to '0' at an early stage, resulting in an extra pulse phase. It is determined that the count is down, and correction is performed by adding 1 to the pulse phase (C-3) at time t74 in FIG.
The phase A has been described above. Similarly, for the phase B, the microcontroller 9 detects that the phase B digital value VB is zero at times t75 and t76 in FIG. The same processing is performed.

以上で説明した前記図13のコンパレータ3が前記図19の動作特性を有するとき、正転のときは前記図26、逆転のときは前記図27で説明した前記パルス位相の補正を、前記マイクロコントローラ9のプログラムにより実施する例を図28に示し説明する。始めに、前記マイクロコントローラ9は該図28においてブロックf1、f2及びf3の次の処理を行う。
f1:A相デジタル値VA、B相デジタル値VB、シンクロA相信号QA、シンクロB相信号QB及びパルス位相を入力した後f2へ。
f2:VAがゼロのときはf4へ、VAがゼロでないときはf3へ。
f3:VBがゼロのときはf4へ、VBがゼロでないときはパルス位相の補正は実施せずルートf3nを経て処理を終える。
かように、前記A相デジタル値VA又はB相デジタル値VBがゼロのときは、前記図26及び図27による前記パルス位相の補正を実施するものでブロックf4へ進む。
次に、ブロックf4では前記正弦波インクリメンタルエンコーダ1bの回転方向の検出を行い、正転のときは前記図26において説明したとおり前記パルス位相の補正は必要としないのでルートf4yを経て処理を終え、逆転のときはブロックf15へ進み、前記図27において説明したパルス位相の補正を行う。
なお、回転方向の検出は例えば、パルス位相が前スキャンより増加していれば正転、減少していれば逆転とすればよい。
When the comparator 3 of FIG. 13 described above has the operating characteristics of FIG. 19, the correction of the pulse phase described in FIG. 26 at the time of forward rotation and FIG. 27 at the time of reverse rotation is performed by the microcontroller. FIG. 28 shows an example in which the program of No. 9 is implemented. First, the microcontroller 9 performs the following processing of blocks f1, f2 and f3 in FIG.
f1: After inputting the A-phase digital value VA, the B-phase digital value VB, the synchronized A-phase signal QA, the synchronized B-phase signal QB and the pulse phase, go to f2.
f2: When VA is zero, go to f4, and when VA is not zero, go to f3.
f3: When VB is zero, the process proceeds to f4. When VB is not zero, the pulse phase is not corrected and the process is finished through the route f3n.
Thus, when the A-phase digital value VA or the B-phase digital value VB is zero, the correction of the pulse phase according to FIGS. 26 and 27 is performed, and the process proceeds to block f4.
Next, in block f4, the rotation direction of the sine wave incremental encoder 1b is detected, and during forward rotation, the correction of the pulse phase is not necessary as described in FIG. When the rotation is reversed, the process proceeds to block f15, and the pulse phase correction described with reference to FIG. 27 is performed.
The rotation direction may be detected by, for example, normal rotation if the pulse phase has increased from the previous scan, and reverse rotation if it has decreased.

そして、図28のブロックf15は前記A相デジタル値VAがゼロであるか、前記B相デジタル値VBがゼロであるかを判定し、ブロックf16からf18はA相の前記VAがゼロのときの前記パルス位相の補正に関するもので、前記図27を参照し次の処理を行う。
f15: VAがゼロのときはf16へ進み、A相によるパルス位相の補正を行う。VAがゼロでないときはVBがゼロでありf19へ進み、B相によるパルス位相の補正を行う。
f16: VAがゼロでVBが負のときはVAが立ち上がりのときでf18へ進む。また、VAがゼロでVBが正のときはVAが立ち下がりのときでf17へ進む。
f17: このときはVAが立ち下がりのときゼロとなるときで、このときQAが' 0' ならばQAが' 0' となるが早まってパルス位相が余分にダウンカウントしているのでf22へ進み、前記パルス位相に1を加えて戻す補正を行う。QAが' 1' のとき補正は不要でf21nを経て処理を終える。
f18: このときはVAが立ち上がりのときゼロとなるときで、このときQAが' 1' ならばQAが' 1' となるが早まってパルス位相が余分にダウンカウントしているのでf22へ進み、前記パルス位相に1を加えて戻す補正を行う。QAが' 0' のとき補正は不要でf21nを経て処理を終える。
次に、ブロックf19からf21は、B相の前記VBがゼロのときの前記パルス位相の補正に関するもので、A相と同様に前記図27を参照し次の処理を行う。
f19: VBがゼロでVAが正のときはVBが立ち上がりのときでf21へ進む。また、VBがゼロでVAが負のときはVBが立ち下がりのときでf20へ進む。
f20: このときはVBが立ち下がりのときゼロとなるときで、このときQBが' 0ならばQBが' 0' となるが早まってパルス位相が余分にダウンカウントしているのでf22へ進み、前記パルス位相に1を加えて戻す補正を行う。QBが' 1' のとき補正は不要でf21nを経て処理を終える。
f21: このときはVBが立ち上がりのときゼロとなるときで、このときQBが' 1' ならばQBが' 1' となるが早まってパルス位相が余分にダウンカウントしているのでf22へ進み、前記パルス位相に1を加えて戻す補正を行う。QBが' 0' のとき補正は不要でf21nを経て処理を終える。
The block f15 in FIG. 28 determines whether the A-phase digital value VA is zero or the B-phase digital value VB is zero. Blocks f16 to f18 indicate that the A-phase VA is zero. This relates to the correction of the pulse phase, and the following processing is performed with reference to FIG.
f15: When VA is zero, the process proceeds to f16, and the pulse phase is corrected by the A phase. When VA is not zero, VB is zero and the process proceeds to f19 to correct the pulse phase by the B phase.
f16: When VA is zero and VB is negative, the process proceeds to f18 when VA rises. When VA is zero and VB is positive, the process proceeds to f17 when VA falls.
f17: At this time, when VA falls, it becomes zero. If QA is '0' at this time, QA becomes '0', but since the pulse phase is excessively counted down, the process proceeds to f22. Then, correction is performed by adding 1 to the pulse phase. When QA is “1”, no correction is necessary, and the process is finished through f21n.
f18: At this time, when VA rises to zero, if QA is '1' at this time, QA becomes '1', but since the pulse phase is excessively down-counted, the process proceeds to f22, Correction is performed by adding 1 to the pulse phase. When QA is “0”, no correction is necessary, and the process ends through f21n.
Next, blocks f19 to f21 relate to correction of the pulse phase when the VB of the B phase is zero, and the following processing is performed with reference to FIG.
f19: When VB is zero and VA is positive, the process proceeds to f21 when VB rises. When VB is zero and VA is negative, the process proceeds to f20 when VB falls.
f20: At this time, when VB falls to zero, when QB is “0”, QB becomes “0”, but since the pulse phase is excessively counted down, the process proceeds to f22. Correction is performed by adding 1 to the pulse phase. When QB is “1”, no correction is necessary, and the process is finished through f21n.
f21: At this time, when VB rises to zero, if QB is '1', QB becomes '1', but since the pulse phase is excessively down-counted, the process proceeds to f22, Correction is performed by adding 1 to the pulse phase. When QB is “0”, no correction is necessary, and the process is finished through f21n.

かようにして、前記図13のコンパレータ3が前記図19に示す動作を行うとき、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときも逆転方向に回転するときも前記図26、図27及び図28に示すとおり、前記マイクロコントローラ9が前記正弦波インクリメンタルエンコーダ1bのA相デジタル値VA又はB相デジタル値VBをゼロと検出したときに前記パルス位相の補正を行う。
これにより、前記正弦波インクリメンタルエンコーダ1bが低速のみならず高速で回転するときも、常に正しいパルス位相を検出するものである。
Thus, when the comparator 3 in FIG. 13 performs the operation shown in FIG. 19, the sine wave incremental encoder 1b rotates in the forward direction and in the reverse direction, as shown in FIGS. As shown in FIG. 28, when the microcontroller 9 detects the A-phase digital value VA or the B-phase digital value VB of the sine wave incremental encoder 1b as zero, the pulse phase is corrected.
Thus, the correct pulse phase is always detected even when the sine wave incremental encoder 1b rotates at a high speed as well as a low speed.

これ迄を要約すれば、90°位相差の2相のA相、B相の正弦波と1回転の基準信号を示すZ相を出力する正弦波インクリメンタルエンコーダを使用して、正転又は逆転方向を問わずZ相信号から正確な基準原点信号を生成すると共に、A相及びB相信号からシンクロA相信号、シンクロB相信号、パルス位相、A相デジタル値及びB相デジタル値を検出し、該シンクロA相信号、シンクロB相信号及びパルス位相は完全に同期して動作をするよう構成し、A相デジタル値とB相デジタル値を基準にシンクロA相信号とシンクロB相信号を前記マイクロコントローラ9により監視し、前記図18、図22、図25及び図28の全てのパルス位相の補正の処理を繰り返し実行することに依り、いかなるときもパルス位相と補間位相の組み合わせを正しく検出することが可能となる。
また、前記図13の正弦波インクリメンタルエンコーダ1bは図示するとおり、前記位相速度検出装置と僅かにA相、B相及びZ相の信号線を接続するのみで、20ビットを越える分解能の回転位相を安定して得ることが可能となり極めてコストメリットがあるものである。
To summarize, a sine wave incremental encoder that outputs two phase A and B phase sine waves with a phase difference of 90 ° and a Z phase indicating a reference signal of one rotation can be used. Regardless of the Z phase signal, an accurate reference origin signal is generated, and the sync A phase signal, sync B phase signal, pulse phase, A phase digital value and B phase digital value are detected from the A phase and B phase signals, The synchro A phase signal, synchro B phase signal and pulse phase are configured to operate in complete synchronization, and the synchro A phase signal and synchro B phase signal are converted to the micro signal based on the A phase digital value and the B phase digital value. The combination of the pulse phase and the interpolation phase is monitored at any time by monitoring the controller 9 and repeatedly executing the correction processing of all the pulse phases shown in FIGS. 18, 22, 25 and 28. We are possible to correctly detect.
Further, as shown in the figure, the sine wave incremental encoder 1b shown in FIG. 13 has a rotational phase with a resolution exceeding 20 bits by simply connecting the phase velocity detection device to the A-phase, B-phase and Z-phase signal lines. It can be obtained stably and is extremely cost-effective.

図29は実施例5の全体の構成を説明する図であり、図30は実施例5の動作を更に説明するものである。
始めに、該図29において2eは位相速度検出装置、15はNOTゲート、16はDフリップフロップであり、17、18及び20はそれぞれiビット、2ビット及びmビットのデータラッチで、CLK入力の立ち上がりでD入力をラッチしてQ出力に送出する。19は基準カウンタ、21はパラレル入力ポートである。その他、図13と同じ記号を付すものはこれらと同じ機能を有しその説明を割愛する。
FIG. 29 is a diagram for explaining the overall configuration of the fifth embodiment, and FIG. 30 further explains the operation of the fifth embodiment.
First, in FIG. 29, 2e is a phase velocity detector, 15 is a NOT gate, 16 is a D flip-flop, 17, 18 and 20 are i-bit, 2-bit and m-bit data latches, respectively. At the rising edge, the D input is latched and sent to the Q output. Reference numeral 19 is a reference counter, and 21 is a parallel input port. In addition, what attaches | subjects the same symbol as FIG. 13 has the same function as these, and omits the description.

更に図29において、前記NOTゲート15は前記発信器5の出力の基準クロックCLKを反転した信号を、前記Dフリップフロップ16のCLK入力に供給し、該Dフリップフロップ16のD入力に加えられる信号をラッチし出力する。すなわち、前記Dフリップフロップ16のD入力の信号は、前記基準クロックの立ち下がりに同期化されるものである。
ここで、前記基準クロックCLKの立ち上がりではなく立ち下がりでラッチするとしているのは、後述するデータラッチ17、18及び20のD入力に加えられる信号は前記基準クロックCLKの立ち上がりで変化するものとしており、便宜上、データラッチのD入力対CLK入力のデータのセットアップ時間を満たす為である。
そして、前記マイクロコントローラ9から任意のタイミングで出力されるラッチ指令は、前記パラレル出力ポート10を経由し上述の前記Dフリップフロップ16で前記基準クロックCLKの立ち下がりに同期化された後、前記A/D変換器13及び14のA/D変換の開始と前記データラッチ17、18及び20のD入力のラッチを同時に実施することとなる。
Further, in FIG. 29, the NOT gate 15 supplies a signal obtained by inverting the reference clock CLK of the output of the transmitter 5 to the CLK input of the D flip-flop 16, and is applied to the D input of the D flip-flop 16. Is latched and output. That is, the signal at the D input of the D flip-flop 16 is synchronized with the falling edge of the reference clock.
Here, it is assumed that latching is performed at the falling edge instead of the rising edge of the reference clock CLK. The signal applied to the D input of the data latches 17, 18 and 20 described later changes at the rising edge of the reference clock CLK. For the sake of convenience, this is to satisfy the setup time of the data input from the D input to the CLK input of the data latch.
The latch command output from the microcontroller 9 at an arbitrary timing is synchronized with the falling edge of the reference clock CLK by the D flip-flop 16 via the parallel output port 10 and then the A The A / D conversion start of the / D converters 13 and 14 and the D input latch of the data latches 17, 18 and 20 are simultaneously performed.

次に、前記データラッチ17は前記パルス位相検出器8が出力する前記パルス位相を入力とし、前記データラッチ18は前記パルス抽出器6が出力する前記シンクロA相信号とシンクロB相信号を入力とする。
又、基準カウンタ19は前記基準クロックCLKの立ち上がりで動作するmビットのカウンタであり、該基準カウンタ19はベースタイムを出力し、該ベースタイムは前記データラッチ20の入力となる。そして、前記マイクロコントローラ9は前記A/D変換器13及び14のA相デジタル値とB相デジタル値と、パラレル入力ポート11、12及び21を経由して前記前記データラッチ17、18及び20の出力を入力し、これにより前記基準クロックCLKの立ち下がりに同期した同一時刻の前記A相デジタル値、B相デジタル値、前記パルス位相、前記シンクロA相信号、シンクロB相信号及びベースタイムを得ることとなる。
Next, the data latch 17 receives the pulse phase output from the pulse phase detector 8, and the data latch 18 receives the sync A phase signal and sync B phase signal output from the pulse extractor 6. To do.
The reference counter 19 is an m-bit counter that operates at the rising edge of the reference clock CLK. The reference counter 19 outputs a base time, which is input to the data latch 20. The microcontroller 9 sends the A-phase digital values and B-phase digital values of the A / D converters 13 and 14 to the data latches 17, 18 and 20 via parallel input ports 11, 12 and 21. By inputting an output, the A phase digital value, the B phase digital value, the pulse phase, the synchronized A phase signal, the synchronized B phase signal and the base time at the same time synchronized with the falling edge of the reference clock CLK are obtained. It will be.

更に、図30により図29の本発明による速度検出の動作について説明する。図30の(a)は前記マイクロコントローラ9のスキャンの状態を表すもので、該マイクロコントローラ9は、前記図29に図示しない電動機の制御など種々のジョブを実行するものであるが、前記正弦波インクリメンタルエンコーダ1bの回転位相や回転速度の検出を、1スキャン毎に例えば図30の(a)に示す時刻t1、t2の' 1' となるそれぞれM1とM2で表す期間で行うとしている。次に、図30の(b)は前記マイクロコントローラ9により前記Dフリップフロップ16のD入力に加えられるラッチ指令を、図30の(c)は前記基準クロックCLKを、図30の(d)は前記Dフリップフロップ16のQ出力から送出される同期化されたラッチ指令を表している。前記マイクロコントローラ9は、前記図30の(a)の時刻t1から始まるM1の期間内でラッチ指令を出力し、該ラッチ指令は前記パラレル出力ポート10を経由し前記Dフリップフロップ16のD入力に加えられ、前記図30の(b)のR1に示す如くラッチ指令となる。そして、該ラッチ指令R1は前記Dフリップフロップ16により、前記図30の(c)の時刻t11における前記基準クロックCLKの立ち下がりに同期化され、前記図30の(d)のS1に示す如く同期化されたラッチ指令となる。   Further, the operation of speed detection according to the present invention shown in FIG. 29 will be described with reference to FIG. FIG. 30A shows the scanning state of the microcontroller 9, and the microcontroller 9 executes various jobs such as control of an electric motor (not shown in FIG. 29). It is assumed that the rotation phase and the rotation speed of the incremental encoder 1b are detected for each scan in, for example, periods represented by M1 and M2, which are '1' at times t1 and t2 shown in FIG. Next, FIG. 30B shows a latch command applied to the D input of the D flip-flop 16 by the microcontroller 9, FIG. 30C shows the reference clock CLK, and FIG. It represents a synchronized latch command sent from the Q output of the D flip-flop 16. The microcontroller 9 outputs a latch command within a period M1 starting from time t1 in FIG. 30A, and the latch command is sent to the D input of the D flip-flop 16 via the parallel output port 10. In addition, a latch command is issued as indicated by R1 in FIG. The latch command R1 is synchronized by the D flip-flop 16 with the falling edge of the reference clock CLK at time t11 in FIG. 30C, and is synchronized as indicated by S1 in FIG. Latch command.

次に、図30の(e)は前記正弦波インクリメンタルエンコーダ1bのA相信号とB相信号を、図30の(f)は前記マイクロコントローラ9が演算し得る仮想上の連続した補間位相を、図30の(g)は前記パルス位相検出器8が出力するパルス位相の時間的推移を示す。
そして、前記図30の(d)の同期化されたラッチ指令S1により時刻t11において、前記A/D変換器13と14の出力は前記図30の(e)の点U1のA相デジタル値と点V1のB相デジタル値を保持し、前記図30の(g)では前記パルス位相(C−1)を前記データラッチ17に保持し、図30に図示しないが前記図29における前記シンクロA相信号、シンクロB相信号を前記データラッチ18に保持し、前記ベースタイムを前記データラッチ20に保持することとなる。
次に、前記マイクロコントローラ9は前記図30の(a)のM1の期間内において、これらの保持したデータを前記A/D変換器13、14及びデータラッチ17、18、20から入力すると共に、前記の点U1のA相デジタル値と点V1のB相デジタル値より、図30の(f)の点W1の補間位相を演算するものである。
Next, (e) in FIG. 30 shows the A-phase signal and B-phase signal of the sine wave incremental encoder 1b, and (f) in FIG. 30 shows virtually continuous interpolation phases that can be calculated by the microcontroller 9. FIG. 30 (g) shows the temporal transition of the pulse phase output from the pulse phase detector 8. FIG.
Then, at time t11 according to the synchronized latch command S1 in FIG. 30 (d), the outputs of the A / D converters 13 and 14 become the A-phase digital value at the point U1 in FIG. 30 (e). The B phase digital value at the point V1 is held, and in FIG. 30G, the pulse phase (C-1) is held in the data latch 17, and although not shown in FIG. 30, the synchro A phase in FIG. The signal and the sync B phase signal are held in the data latch 18, and the base time is held in the data latch 20.
Next, the microcontroller 9 inputs the held data from the A / D converters 13 and 14 and the data latches 17, 18 and 20 within the period M1 in FIG. Based on the A phase digital value at the point U1 and the B phase digital value at the point V1, the interpolation phase at the point W1 in (f) of FIG. 30 is calculated.

以上は、前記マイクロコントローラ9の時刻t1における処理を説明したが、次のスキャンの時刻t2においても同様の処理を行う。
すなわち、該マイクロコントローラ9は前記図30の(a)の時刻t2から始まるM2の期間でラッチ指令を出力し、これにより前記Dフリップフロップ16のD入力に加えられる信号は、前記図30の(b)のR2に示す如くラッチ指令となる。
そして、該ラッチ指令R2は前記図30の(c)の時刻t21における前記基準クロックCLKの立ち下がりに同期化され、前記図30の(d)のS2に示す如く同期化されたラッチ指令となり、該同期化されたラッチ指令S2により時刻t21において、前記A/D変換器13と14の出力は前記図30の(e)の点U2のA相デジタル値と点V2のB相デジタル値を保持し、前記図30の(g)においては前記パルス位相(C+2)と、図30に図示しないが前記図29における前記シンクロA相信号、シンクロB相信号と、前記ベースタイムをそれぞれ前記データラッチ17、18及び20に保持することとなる。 そして、前記マイクロコントローラ9は前記図30の(a)のM2の期間内において、これらの保持したデータを前記A/D変換器13、14及びデータラッチ17、18、20から入力すると共に、前記の点U2のA相デジタル値と点V2のB相デジタル値より、図30の(f)の点W2の補間位相を演算するものである。
Although the processing at the time t1 of the microcontroller 9 has been described above, the same processing is performed at the time t2 of the next scan.
That is, the microcontroller 9 outputs a latch command in the period M2 starting from the time t2 in FIG. 30A, and the signal applied to the D input of the D flip-flop 16 is as shown in FIG. As shown in R2 of b), a latch command is issued.
The latch command R2 is synchronized with the falling edge of the reference clock CLK at time t21 in FIG. 30C, and becomes a synchronized latch command as indicated by S2 in FIG. At time t21 by the synchronized latch command S2, the outputs of the A / D converters 13 and 14 hold the A-phase digital value at the point U2 and the B-phase digital value at the point V2 in FIG. 30 (g), the pulse phase (C + 2), and although not shown in FIG. 30, the sync A phase signal, sync B phase signal and the base time in FIG. , 18 and 20. The microcontroller 9 inputs the held data from the A / D converters 13 and 14 and the data latches 17, 18, and 20 within the period M2 in FIG. From the A-phase digital value at point U2 and the B-phase digital value at point V2, the interpolation phase at point W2 in (f) of FIG. 30 is calculated.

ここで、本実施例の特徴は、前記図30の(a)で示した前記マイクロコントローラ9のスキャンにより決定される任意の時刻、例えばt1やt2において、前記正弦波インクリメンタルエンコーダ1bのパルス位相と補間位相を得ることにより回転位相を常時正確に検出することが可能で、これにより更に、例えば時刻t11とt21間の回転位相の変化量も極めて精度良く検出するものである。
又、図30の(c)を参照して、時刻t11においてラッチされ入力される前記基準カウンタ19によるベースタイムは、時刻t12における前記基準クロックCLKの立ち上がり迄を計数したものであり、同様に時刻t21においてラッチされ入力される前記基準カウンタ19によるベースタイムは、時刻t22における前記基準クロックCLKの立ち上がり迄を計数したものである。
そして、時刻t21で得た上記のベースタイムから時刻t11で得た上記のベースタイムを減算したものに、前記基準クロックCLKの周期を乗算して得られるスキャン時間は図30の(d)に示す時間ΔT1となる。
Here, the feature of this embodiment is that the pulse phase of the sine wave incremental encoder 1b is determined at an arbitrary time determined by the scanning of the microcontroller 9 shown in FIG. 30A, for example, t1 and t2. By obtaining the interpolation phase, it is possible to always detect the rotational phase accurately, and for this reason, for example, the amount of change in the rotational phase between times t11 and t21 is also detected with extremely high accuracy.
Referring to (c) of FIG. 30, the base time by the reference counter 19 latched and inputted at time t11 is counted up to the rising edge of the reference clock CLK at time t12. The base time by the reference counter 19 latched and input at t21 is counted up to the rising edge of the reference clock CLK at time t22.
The scan time obtained by multiplying the base time obtained at time t11 by subtracting the base time obtained at time t21 and the period of the reference clock CLK is shown in FIG. Time ΔT1 is reached.

ここで、前記発信器5は極めて精度の優れた水晶振動子を使用するもので、該発信器5が出力する基準クロックCLKは、周波数の安定度と共に波形のデューティも一定で安定している為、前記時間ΔT1は同じく図30の(d)に図示する時間ΔT11に等しい。 かようにして得られるスキャン時間ΔT11は、前記基準クロックCLKの2つの離れたエッジ間の該基準クロックCLKのパルス数と該基準クロックCLKの周期を乗算したもので、極めて正確なスキャン時間を得るものである。そして、前記正弦波インクリメンタルエンコーダ1bの回転速度は図30を例にすれば、時刻t21における前記パルス位相と前記補間位相からなる回転位相から時刻t11における回転位相を減算してスキャン時間ΔT11における回転位相の変化量を求め、これを前記スキャン時間ΔT11で除して求めるものであり、本発明による回転位相の変化量とスキャン時間ΔT11は極めて精度良く検出するものであるから、該回転位相の変化量とスキャン時間を演算して得られる前記正弦波インクリメンタルエンコーダ1bの回転速度も、極めて精度が良いものとすることができる。   Here, the oscillator 5 uses a crystal oscillator with extremely high accuracy, and the reference clock CLK output from the oscillator 5 is stable in frequency and with a constant waveform duty. The time ΔT1 is equal to the time ΔT11 illustrated in FIG. The scan time ΔT11 obtained in this way is obtained by multiplying the number of pulses of the reference clock CLK between two separate edges of the reference clock CLK by the period of the reference clock CLK, thereby obtaining a very accurate scan time. Is. Then, the rotation speed of the sine wave incremental encoder 1b, for example, in FIG. 30, is obtained by subtracting the rotation phase at the time t11 from the rotation phase consisting of the pulse phase and the interpolation phase at the time t21, and the rotation phase at the scan time ΔT11. Is obtained by dividing the change amount by the scan time ΔT11, and the change amount of the rotation phase and the scan time ΔT11 according to the present invention are detected with extremely high accuracy. The rotational speed of the sine wave incremental encoder 1b obtained by calculating the scan time can be made extremely accurate.

かような本発明により、前記正弦波インクリメンタルエンコーダ1bが正転方向に回転するときも逆転方向に回転するときも、又停止中や低速回転中のみならず高速で回転中であっても、前記原点検出器7によりZ相信号から正確な1回転の基準を生成すると共に、前記図18、前記図22、前記図25及び図27により前記パルス位相の補正を行い、この補正後のパルス位相と補間位相により超高精度の回転位相と回転速度の検出を可能とし、これにより、シャフトレス輪転印刷機など複数の電動機間の高精度の同期制御や高速の位置決め制御を実現するものである。   According to the present invention, when the sine wave incremental encoder 1b rotates in the forward direction or in the reverse direction, whether the sine wave incremental encoder 1b is rotated at a high speed as well as a stop or a low speed, The origin detector 7 generates an accurate reference for one rotation from the Z-phase signal, and corrects the pulse phase according to FIG. 18, FIG. 22, FIG. 25 and FIG. It is possible to detect the rotation phase and rotation speed with high accuracy by the interpolation phase, thereby realizing high-accuracy synchronous control and high-speed positioning control between a plurality of electric motors such as a shaftless rotary printing press.

実施例1の全体の構成を説明する図である。1 is a diagram illustrating an overall configuration of Example 1. FIG. 正転のとき図1のパルス抽出器の動作を詳細に説明する図である。It is a figure explaining operation | movement of the pulse extractor of FIG. 1 in detail at the time of forward rotation. 逆転のとき図1のパルス抽出器の動作を詳細に説明する図である。It is a figure explaining operation | movement of the pulse extractor of FIG. 1 in detail at the time of reverse rotation. パルス抽出器の一実施例を説明する図である。It is a figure explaining one Example of a pulse extractor. 実施例2の全体の構成を説明する図である。FIG. 6 is a diagram illustrating an overall configuration of a second embodiment. 正弦波インクリメンタルエンコーダが出力する信号を説明する図である。It is a figure explaining the signal which a sine wave incremental encoder outputs. 原点検出器の動作を詳細に説明する図である。It is a figure explaining the operation | movement of an origin detector in detail. 原点検出器の一実施例を説明する図である。It is a figure explaining one Example of an origin detector. 図9の原点検出器の一実施例の動作を説明する図である。It is a figure explaining operation | movement of one Example of the origin detector of FIG. 実施例3の全体の構成を説明する図である。FIG. 10 is a diagram illustrating an overall configuration of a third embodiment. パルス位相検出器の一実施例を説明する図である。It is a figure explaining one Example of a pulse phase detector. 図11のパルス位相検出器の一実施例の動作を説明する図である。It is a figure explaining operation | movement of one Example of the pulse phase detector of FIG. 実施例4の全体の構成を説明する図である。FIG. 10 is a diagram illustrating an overall configuration of a fourth embodiment. 図13の実施例4の全体の動作を説明する図である。It is a figure explaining the whole operation | movement of Example 4 of FIG. コンパレータの動作その1を説明する図である。It is a figure explaining the operation | movement 1 of a comparator. パルス位相の補正を説明する図−その1である。FIG. 1 is a diagram for explaining correction of a pulse phase. パルス位相の補正を説明する図−その2である。FIG. 2 is a diagram for explaining correction of a pulse phase. 図16と図17のパルス位相の補正の実施例を説明する図である。It is a figure explaining the Example of correction | amendment of the pulse phase of FIG. 16 and FIG. コンパレータの動作その2を説明する図である。It is a figure explaining the operation | movement 2 of a comparator. パルス位相の補正を説明する図−その3である。FIG. 3 is a third diagram illustrating correction of pulse phase. パルス位相の補正を説明する図−その4である。FIG. 4 is a diagram for explaining correction of a pulse phase. 図20と図21のパルス位相の補正の実施例を説明する図である。It is a figure explaining the Example of correction | amendment of the pulse phase of FIG. 20 and FIG. パルス位相の補正を説明する図−その5である。FIG. 5 is a diagram for explaining correction of a pulse phase—part 5; パルス位相の補正を説明する図−その6である。FIG. 6 is a diagram for explaining correction of a pulse phase—part 6; 図23と図24のパルス位相の補正の実施例を説明する図である。It is a figure explaining the Example of correction | amendment of the pulse phase of FIG. 23 and FIG. パルス位相の補正を説明する図−その7である。FIG. 7 is a diagram for explaining correction of a pulse phase—part 7; パルス位相の補正を説明する図−その8である。FIG. 8 is a diagram for explaining correction of a pulse phase; 図26と図27のパルス位相の補正の実施例を説明する図である。It is a figure explaining the Example of correction | amendment of the pulse phase of FIG. 26 and FIG. 実施例5の全体の構成を説明する図である。FIG. 10 is a diagram illustrating an overall configuration of a fifth embodiment. 速度検出を説明する図である。It is a figure explaining speed detection. インクリメンタル信号を説明する図である。It is a figure explaining an incremental signal. 1回転の位相検出を説明する図である。It is a figure explaining the phase detection of 1 rotation. 従来の回転位相の検出を説明する図である。It is a figure explaining the detection of the conventional rotation phase.

符号の説明Explanation of symbols

1a 正弦波インクリメンタルエンコーダ
1b 正弦波インクリメンタルエンコーダ
2a 位相速度検出装置
2b 位相速度検出装置
2c 位相速度検出装置
2d 位相速度検出装置
2e 位相速度検出装置
3 コンパレータ
4 コンパレータ
5 発信器
6 パルス抽出器
601 NOTゲート
602 Dフリップフロップ
603 NOTゲート
604 Dフリップフロップ
605 NOTゲート
606 Dフリップフロップ
607 NOTゲート
608 Dフリップフロップ
609 NOTゲート
610 ANDゲート
611 ORゲート
612 ORゲート
613 Dフリップフロップ
614 Dフリップフロップ
615 Dフリップフロップ
616 Dフリップフロップ
7 原点検出器
701 NOTゲート
702 JKフリップフロップ
703 Dフリップフロップ
704 Dフリップフロップ
705 NOTゲート
706 NOTゲート
707 NOTゲート
708 ANDゲート
709 ANDゲート
710 ORゲート
8 パルス位相検出器
801 アップ・ダウンカウンタ
802 係数器
803 加算器
804 セレクタ
9 マイクロコントローラ
10 パラレル出力ポート
11 パラレ入力ポート
12 パラレ入力ポート
13 A/D変換器
14 A/D変換器
15 NOTゲート
16 Dフリップフロップ
17 データラッチ
18 データラッチ
19 カウンタ
20 データラッチ
21 パラレル入力ポート
1a sine wave incremental encoder 1b sine wave incremental encoder 2a phase velocity detector 2b phase velocity detector 2c phase velocity detector 2d phase velocity detector 2e phase velocity detector 3 comparator 4 comparator 5 transmitter 6 pulse extractor 601 NOT gate 602 D flip-flop 603 NOT gate 604 D flip-flop 605 NOT gate 606 D flip-flop 607 NOT gate 608 D flip-flop 609 NOT gate 610 AND gate 611 OR gate 612 OR gate 613 D flip-flop 614 D flip-flop 615 D flip-flop 616 D Flip flop 7 Origin detector 701 NOT gate 702 JK flip flop 703 D flip Flop 704 D flip-flop 705 NOT gate 706 NOT gate 707 NOT gate 708 AND gate 709 AND gate 710 OR gate 8 pulse phase detector 801 up / down counter 802 coefficient unit 803 adder 804 selector 9 microcontroller 10 parallel output port 11 parallel output Input port 12 Parallel input port 13 A / D converter 14 A / D converter 15 NOT gate 16 D flip-flop 17 Data latch 18 Data latch 19 Counter 20 Data latch 21 Parallel input port

Claims (6)

90°位相差を有する2つの正弦波であるA相信号とB相信号のインクリメンタル信号を出力する正弦波インクリメンタルエンコーダの前記A相信号と前記B相信号を入力とし、該正弦波インクリメンタルエンコーダの回転位相速度を検出する位相速度検出装置であって、
上記正弦波インクリメンタルエンコーダは1回転毎に複数サイクルの前記A相信号と前記B相信号と、1回転を識別するZ相信号を出力するものであり、
上記位相速度検出装置はA相及びB相のコンパレータとパルス抽出器と、上記Z相のコンパレータと原点検出器と、パルス位相検出器を内蔵し、
該コンパレータは前記A相信号とB相信号から、それぞれ2値化した矩形A相信号と矩形B相信号を生成して上記パルス抽出器に出力し、
上記パルス抽出器は、上記矩形A相信号と矩形B相信号から、上記正弦波インクリメンタルエンコーダの正転時にはクロック信号に同期した正転パルス信号を、また、逆転時にはクロック信号に同期した逆転パルス信号を抽出して出力するとともに、
上記矩形A相信号と矩形B相信号の立上がり、立下りをクロック信号に同期させた、シンクロA相信号とシンクロB相信号を出力し、
上記Z相のコンパレータは、上記Z相信号から2値化した矩形Z相信号を生成し、
上記原点検出器には、前記パルス抽出器が出力する前記正転パルスと前記逆転パルスと、上記矩形Z相信号が入力され、
上記原点検出器は、上記正転パルスが出力されているか逆転パルスが出力されているかに応じて前記正弦波インクリメンタルエンコーダの回転方向を識別し、
前記正弦波インクリメンタルエンコーダが正転方向に回転しているときは前記矩形Z相信号の先端または後端から短い所定のパルス幅の基準原点信号を出力し、
前記正弦波インクリメンタルエンコーダが逆転方向に回転しているときは前記矩形Z相信号の後端または先端から短い所定のパルス幅の基準原点信号を出力し、
上記パルス位相検出器は、前記正弦波インクリメンタルエンコーダの前記A相信号とB相信号の1回転当たりのサイクル数による最大パルス位相より充分に大きい値をカウントし出力するアップダウンカウンタと、選択手段を備え
上記パルス位相検出器のアップダウンカウンタのアップカウント端子、ダウンカウント端子には、それぞれ前記パルス抽出器が出力する前記正転パルスと前記逆転パルスが入力され、アップダウンカウンタのリセット端子には、前記原点検出器が出力する前記基準原点信号が入力され、
上記アップダウンカウンタは、上記正転パルスが入力されたときアップカウントし、上記逆転パルスが入力されたダウンカウントし、上記リセット端子に基準原点信号が入力されたときゼロにリセットされるものであり、
上記選択手段は、上記アップ・ダウンカウンタの出力が正のときは、そのカウント値を前記正弦波インクリメンタルエンコーダのパルス位相として出力し、
前記アップ・ダウンカウンタの出力が負のときは前記最大パルス位相に1を加算した最大パルス数と前記アップ・ダウンカウンタのカウント値を加算したものを前記正弦波インクリメンタルエンコーダのパルス位相として出力する
ことを特徴とする位相速度検出装置。
Rotating the sine wave incremental encoder by inputting the A phase signal and the B phase signal of a sine wave incremental encoder that outputs two sine wave A phase signals and B phase signal incremental signals having a 90 ° phase difference. A phase velocity detection device for detecting a phase velocity,
The sine wave incremental encoder outputs a plurality of cycles of the A-phase signal and the B-phase signal for each rotation, and a Z-phase signal for identifying one rotation .
The phase velocity detector includes an A-phase and B-phase comparator and pulse extractor, the Z-phase comparator and origin detector, and a pulse phase detector.
The comparator generates a binarized rectangular A phase signal and a rectangular B phase signal from the A phase signal and the B phase signal, respectively, and outputs them to the pulse extractor.
The pulse extractor uses the rectangular A-phase signal and the rectangular B-phase signal to generate a normal rotation pulse signal synchronized with the clock signal when the sine wave incremental encoder rotates in the normal direction, and a reverse rotation pulse signal synchronized with the clock signal during the reverse rotation. Is extracted and output, and
Outputting a synchronized A phase signal and a synchronized B phase signal in which the rising and falling edges of the rectangular A phase signal and the rectangular B phase signal are synchronized with the clock signal ;
The Z-phase comparator generates a rectangular Z-phase signal binarized from the Z-phase signal,
To the origin detector, the normal rotation pulse and the reverse rotation pulse output from the pulse extractor and the rectangular Z-phase signal are input,
The origin detector identifies a rotation direction of the sine wave incremental encoder according to whether the forward rotation pulse or the reverse rotation pulse is output,
When the sine wave incremental encoder is rotating in the forward direction, a reference origin signal having a short predetermined pulse width is output from the front or rear end of the rectangular Z-phase signal,
When the sine wave incremental encoder rotates in the reverse direction, a reference origin signal having a short predetermined pulse width is output from the rear end or front end of the rectangular Z-phase signal,
The pulse phase detector includes an up / down counter for counting and outputting a value sufficiently larger than a maximum pulse phase based on the number of cycles per rotation of the A phase signal and the B phase signal of the sine wave incremental encoder, and a selection unit. Preparation
The forward pulse and the reverse pulse output from the pulse extractor are input to the upcount terminal and the downcount terminal of the up / down counter of the pulse phase detector, respectively, and the reset terminal of the up / down counter is connected to the reset terminal of the up / down counter. The reference origin signal output from the origin detector is input,
The up / down counter counts up when the forward rotation pulse is input, counts down when the reverse rotation pulse is input, and is reset to zero when the reference origin signal is input to the reset terminal. ,
When the output of the up / down counter is positive, the selection means outputs the count value as a pulse phase of the sine wave incremental encoder,
When the output of the up / down counter is negative, the maximum pulse number obtained by adding 1 to the maximum pulse phase and the count value of the up / down counter are added as the pulse phase of the sine wave incremental encoder < A phase velocity detector characterized by the above.
上記位相速度検出装置はA/D変換器とコントローラを内蔵し、
上記A/D変換器は、前記正弦波インクリメンタルエンコーダが出力する前記A相信号とB相信号をデジタル値に変換したA相デジタル値とB相デジタル値を出力するものであり、
前記A相及びB相のコンパレータは、前記A相信号と前記B相信号をハイレベルと判定するレベルVhと、ロウレベルと判定するレベルVlと比較して、前記A相信号と前記B相信号から前記矩形A相信号と前記矩形B相信号を生成するものであって、該Vhが該Vl以上であり、
上記コントローラには、前記パルス位相検出器の出力である前記パルス位相と、前記パルス抽出器が出力するシンクロA相信号とシンクロB相信号と、前記A/D変換器が出力する前記A相デジタル値及びB相デジタル値が連続して入力され、
前記正弦波インクリメンタルエンコーダが正転で回転しているとき、前記A相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を加算する補正を行い、前記A相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、
また、前記B相デジタル値が正で前記シンクロB相信号が' 0' のときは前記パルス位相について1を加算する補正を行い、前記B相デジタル値が負で前記シンクロB相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、
前記正弦波インクリメンタルエンコーダが逆転で回転しているとき、前記A相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を減算する補正を行い、前記A相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を減算する補正を行い、
また、前記B相デジタル値が正で前記シンクロB相信号が' 0' のときは前記パルス位相について1を減算する補正を行い、前記B相デジタル値が負で前記シンクロB相信号が' 1' のときは前記パルス位相について1を減算する補正を行う
ことを特徴とした請求項の位相速度検出装置。
The phase velocity detection device includes an A / D converter and a controller,
The A / D converter outputs an A-phase digital value and a B-phase digital value obtained by converting the A-phase signal and the B-phase signal output from the sine wave incremental encoder into digital values,
The A-phase and B-phase comparators compare the A-phase signal and the B-phase signal with a level Vh that determines the A-phase signal and the B-phase signal as a high level and a level Vl that determines a low level. The rectangular A-phase signal and the rectangular B-phase signal are generated, and the Vh is not less than the Vl,
The controller includes the pulse phase output from the pulse phase detector, the synchronized A-phase signal and the synchronized B-phase signal output from the pulse extractor, and the A-phase digital signal output from the A / D converter. Value and B phase digital value are input continuously,
When the sine wave incremental encoder is rotating in the normal rotation, when the A phase digital value is positive and the synchro A phase signal is '0', correction is performed by adding 1 to the pulse phase, and the A phase When the digital value is negative and the synchro A-phase signal is '1', the pulse phase is corrected by adding 1;
Further, when the B-phase digital value is positive and the synchronized B-phase signal is “0”, correction is performed by adding 1 to the pulse phase, and the B-phase digital value is negative and the synchronized B-phase signal is “1”. If ', perform correction to add 1 to the pulse phase,
When the sine wave incremental encoder rotates in reverse, when the A phase digital value is positive and the synchro A phase signal is '0', correction is performed to subtract 1 from the pulse phase, and the A phase digital When the value is negative and the synchro A phase signal is '1', a correction is made to subtract 1 from the pulse phase,
When the B-phase digital value is positive and the synchronized B-phase signal is “0”, correction is performed by subtracting 1 from the pulse phase, and the B-phase digital value is negative and the synchronized B-phase signal is “1”. 'phase velocity detecting apparatus according to claim 1 characterized by performing a correction to subtract 1 for the pulse phase when the.
上記位相速度検出装置はA/D変換器とコントローラを内蔵し、
上記A/D変換器は、前記正弦波インクリメンタルエンコーダが出力する前記A相信号とB相信号をデジタル値に変換したA相デジタル値とB相デジタル値を出力するものであり、
前記A相及びB相のコンパレータは、前記A相信号と前記B相信号をハイレベルと判定するレベルVhと、ロウレベルと判定するレベルVlと比較して、前記A相信号と前記B相信号から前記矩形A相信号と前記矩形B相信号を生成するものであって、該Vhが該Vl未満であり、
上記コントローラには、前記パルス位相検出器の出力である前記パルス位相と、前記パルス抽出器が出力するシンクロA相信号とシンクロB相信号と、前記A/D変換器が出力する前記A相デジタル値及びB相デジタル値が連続して入力され、
前記正弦波インクリメンタルエンコーダが正転で回転しているとき、前記A相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を減算する補正を行い、前記A相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を減算する補正を行い、
また、前記B相デジタル値が負で前記シンクロB相信号が' 1' のときは前記パルス位相について1を減算する補正を行い、前記B相デジタル値が正で前記シンクロB相信号が' 0' のときは前記パルス位相について1を減算する補正を行い、
前記正弦波インクリメンタルエンコーダが逆転で回転しているとき、前記A相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、前記A相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を加算する補正を行い、
また、前記B相デジタル値が負で前記シンクロB相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、前記B相デジタル値が正で前記シンクロB相信号が' 0' のときは前記パルス位相について1を加算する補正を行う
ことを特徴とした請求項の位相速度検出装置。
The phase velocity detection device includes an A / D converter and a controller,
The A / D converter outputs an A-phase digital value and a B-phase digital value obtained by converting the A-phase signal and the B-phase signal output from the sine wave incremental encoder into digital values,
The A-phase and B-phase comparators compare the A-phase signal and the B-phase signal with a level Vh that determines the A-phase signal and the B-phase signal as a high level and a level Vl that determines a low level. Generating the rectangular A phase signal and the rectangular B phase signal, wherein Vh is less than Vl;
The controller includes the pulse phase output from the pulse phase detector, the synchronized A-phase signal and the synchronized B-phase signal output from the pulse extractor, and the A-phase digital signal output from the A / D converter. Value and B phase digital value are input continuously,
When the sine wave incremental encoder is rotating in the forward direction, when the A phase digital value is negative and the synchro A phase signal is '1', correction is performed to subtract 1 from the pulse phase, and the A phase When the digital value is positive and the synchro A phase signal is '0', the pulse phase is corrected by subtracting 1;
Further, when the B-phase digital value is negative and the synchronized B-phase signal is “1”, correction is performed by subtracting 1 from the pulse phase, and the B-phase digital value is positive and the synchronized B-phase signal is “0”. If ', perform correction to subtract 1 for the pulse phase,
When the sine wave incremental encoder rotates in reverse, if the A phase digital value is negative and the synchro A phase signal is '1', a correction is made to add 1 to the pulse phase, and the A phase digital When the value is positive and the synchro A phase signal is '0', a correction is made by adding 1 to the pulse phase,
Further, when the B-phase digital value is negative and the synchronized B-phase signal is “1”, correction is performed by adding 1 to the pulse phase, and the B-phase digital value is positive and the synchronized B-phase signal is “0”. 'phase velocity detecting apparatus according to claim 1 characterized by performing the correction of adding 1 for the pulse phase when the.
上記位相速度検出装置はA/D変換器とコントローラを内蔵し、
上記A/D変換器は、前記正弦波インクリメンタルエンコーダが出力する前記A相信号とB相信号をデジタル値に変換したA相デジタル値とB相デジタル値を出力するものであり、
前記A相及びB相のコンパレータは、前記A相信号と前記B相信号をハイレベルと判定するレベルVhと、ロウレベルと判定するレベルVlと比較して、前記A相信号と前記B相信号から前記矩形A相信号と前記矩形B相信号を生成するものであって、該Vhが該Vl以上であり、
上記コントローラには、前記パルス位相検出器の出力である前記パルス位相と、前記パルス抽出器が出力するシンクロA相信号とシンクロB相信号と、前記A/D変換器が出力する前記A相デジタル値及びB相デジタル値が連続して入力され、
前記正弦波インクリメンタルエンコーダが正転で回転しているとき、前記A相デジタル値がゼロで前記B相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を加算する補正を行い、前記A相デジタル値がゼロで前記B相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、
また、前記B相デジタル値がゼロで前記A相デジタル値が負で前記シンクロB相信号が' 0' のときは前記パルス位相について1を加算する補正を行い、前記B相デジタル値がゼロで前記A相デジタル値が正で前記シンクロB相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、
前記正弦波インクリメンタルエンコーダが逆転で回転しているとき、前記A相デジタル値がゼロのときは前記パルス位相についての補正を行なわず、前記B相デジタル値がゼロのときも前記パルス位相について補正を行なわない
ことを特徴とした請求項の位相速度検出装置。
The phase velocity detection device includes an A / D converter and a controller,
The A / D converter outputs an A-phase digital value and a B-phase digital value obtained by converting the A-phase signal and the B-phase signal output from the sine wave incremental encoder into digital values,
The A-phase and B-phase comparators compare the A-phase signal and the B-phase signal with a level Vh that determines the A-phase signal and the B-phase signal as a high level and a level Vl that determines a low level. The rectangular A-phase signal and the rectangular B-phase signal are generated, and the Vh is not less than the Vl,
The controller includes the pulse phase output from the pulse phase detector, the synchronized A-phase signal and the synchronized B-phase signal output from the pulse extractor, and the A-phase digital signal output from the A / D converter. Value and B phase digital value are input continuously,
When the sine wave incremental encoder is rotating forward, when the A phase digital value is zero, the B phase digital value is positive, and the synchro A phase signal is '0', 1 is added to the pulse phase. When the A-phase digital value is zero, the B-phase digital value is negative, and the synchro A-phase signal is '1', a correction for adding 1 to the pulse phase is performed.
Further, when the B-phase digital value is zero, the A-phase digital value is negative, and the synchronized B-phase signal is “0”, correction is performed by adding 1 to the pulse phase, and the B-phase digital value is zero. When the A-phase digital value is positive and the synchro B-phase signal is '1', correction is performed by adding 1 to the pulse phase,
When the sine wave incremental encoder is rotating in reverse, the pulse phase is not corrected when the A phase digital value is zero, and the pulse phase is also corrected when the B phase digital value is zero. 2. The phase velocity detection device according to claim 1 , wherein the phase velocity detection device is not performed.
上記位相速度検出装置はA/D変換器とコントローラを内蔵し、
上記A/D変換器は、前記正弦波インクリメンタルエンコーダが出力する前記A相信号とB相信号をデジタル値に変換したA相デジタル値とB相デジタル値を出力するものであり、
前記A相及びB相のコンパレータは、前記A相信号と前記B相信号をハイレベルと判定するレベルVhと、ロウレベルと判定するレベルVlと比較して、前記A相信号と前記B相信号から前記矩形A相信号と前記矩形B相信号を生成するものであって、該Vhが該Vl未満であり、
上記コントローラには、前記パルス位相検出器の出力である前記パルス位相と、前記パルス抽出器が出力するシンクロA相信号とシンクロB相信号と、前記A/D変換器が出力する前記A相デジタル値及びB相デジタル値が連続して入力され、
前記正弦波インクリメンタルエンコーダが正転で回転しているとき、前記A相デジタル値がゼロのときは前記パルス位相についての補正を行なわず、前記B相デジタル値がゼロのときも前記パルス位相について補正を行なわず、
前記正弦波インクリメンタルエンコーダが逆転で回転しているとき、前記A相デジタル値がゼロで前記B相デジタル値が負で前記シンクロA相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、前記A相デジタル値がゼロで前記B相デジタル値が正で前記シンクロA相信号が' 0' のときは前記パルス位相について1を加算する補正を行い、
前記B相デジタル値がゼロで前記A相デジタル値が正で前記シンクロB相信号が' 1' のときは前記パルス位相について1を加算する補正を行い、前記B相デジタル値がゼロで前記A相デジタル値が負で前記シンクロB相信号が' 0' のときは前記パルス位相について1を加算する補正を行う
ことを特徴とした請求項の位相速度検出装置。
The phase velocity detection device includes an A / D converter and a controller,
The A / D converter outputs an A-phase digital value and a B-phase digital value obtained by converting the A-phase signal and the B-phase signal output from the sine wave incremental encoder into digital values,
The A-phase and B-phase comparators compare the A-phase signal and the B-phase signal with a level Vh that determines the A-phase signal and the B-phase signal as a high level and a level Vl that determines a low level. Generating the rectangular A phase signal and the rectangular B phase signal, wherein Vh is less than Vl;
The controller includes the pulse phase output from the pulse phase detector, the synchronized A-phase signal and the synchronized B-phase signal output from the pulse extractor, and the A-phase digital signal output from the A / D converter. Value and B phase digital value are input continuously,
When the sine wave incremental encoder is rotating forward, the pulse phase is not corrected when the A-phase digital value is zero, and the pulse phase is also corrected when the B-phase digital value is zero. Without doing
When the sine wave incremental encoder rotates in reverse, when the A phase digital value is zero, the B phase digital value is negative and the synchro A phase signal is '1', 1 is added to the pulse phase. Correction is performed, and when the A phase digital value is zero, the B phase digital value is positive, and the synchro A phase signal is '0', correction is performed by adding 1 to the pulse phase,
When the B-phase digital value is zero, the A-phase digital value is positive, and the synchronized B-phase signal is '1', correction is performed by adding 1 to the pulse phase, and the B-phase digital value is zero and the A phase wherein the digital value is negative synchro B-phase signal is "0" the phase velocity detecting apparatus according to claim 1 characterized by performing the correction of adding 1 for the pulse phase when the.
上記位相速度検出装置は、発信器が出力するパルスを計数する基準カウンタとデータラッチを備え、
上記発信器が出力するパルスのエッジに同期したラッチ指令により、同一時刻の前記基準カウンタの出力値と前記パルス位相と前記シンクロA相信号と前記シンクロB相信号と前記A相デジタル値及び前記B相デジタル値をラッチして、所定の時間間隔で前記コントローラに入力し、
上記コントローラは、上記時間間隔における上記基準カウンタの出力値の変化量より、上記時間間隔と前記正弦波インクリメンタルエンコーダの回転位相の変化量を検出し、上記時間間隔と回転位相の変化量より上記正弦波インクリメンタルエンコーダの回転速度を演算し検出する
ことを特徴とする請求項2,3,4または請求項5の位相速度検出装置。
The phase velocity detection device includes a reference counter that counts pulses output from the transmitter and a data latch,
According to a latch command synchronized with the edge of the pulse output from the transmitter, the output value of the reference counter, the pulse phase, the synchronized A-phase signal, the synchronized B-phase signal, the A-phase digital value, and the B at the same time. Latch the phase digital value and input it to the controller at predetermined time intervals;
The controller detects a change amount of the rotation phase of the sine wave incremental encoder from the change amount of the output value of the reference counter in the time interval, and detects the change amount of the sine from the change amount of the time interval and the rotation phase. 6. The phase velocity detection device according to claim 2 , wherein the rotation velocity of the wave incremental encoder is calculated and detected.
JP2003391706A 2003-11-21 2003-11-21 Phase velocity detector Expired - Lifetime JP4289983B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003391706A JP4289983B2 (en) 2003-11-21 2003-11-21 Phase velocity detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003391706A JP4289983B2 (en) 2003-11-21 2003-11-21 Phase velocity detector

Publications (2)

Publication Number Publication Date
JP2005156208A JP2005156208A (en) 2005-06-16
JP4289983B2 true JP4289983B2 (en) 2009-07-01

Family

ID=34718644

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003391706A Expired - Lifetime JP4289983B2 (en) 2003-11-21 2003-11-21 Phase velocity detector

Country Status (1)

Country Link
JP (1) JP4289983B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108731707A (en) * 2018-06-04 2018-11-02 大族激光科技产业集团股份有限公司 Double incremental encoders measure absolute position method and apparatus

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4868859B2 (en) * 2006-01-24 2012-02-01 株式会社リコー Position detection apparatus, position detection method, and image forming apparatus
JP4835606B2 (en) * 2008-02-20 2011-12-14 株式会社明電舎 Rotating body phase / speed detector
JP6077389B2 (en) * 2013-05-28 2017-02-08 株式会社東芝 Signal processing device
JP6903543B2 (en) * 2017-10-11 2021-07-14 東洋電機製造株式会社 ABZ phase divider

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108731707A (en) * 2018-06-04 2018-11-02 大族激光科技产业集团股份有限公司 Double incremental encoders measure absolute position method and apparatus
CN108731707B (en) * 2018-06-04 2021-01-01 大族激光科技产业集团股份有限公司 Method and device for measuring absolute position with double incremental encoder

Also Published As

Publication number Publication date
JP2005156208A (en) 2005-06-16

Similar Documents

Publication Publication Date Title
CN104639849B (en) A/D converter, solid state image sensor and imaging system
CN110518906B (en) Signal generating circuit and method thereof, digital time conversion circuit and method thereof
JP4289983B2 (en) Phase velocity detector
CN105917584A (en) Digital period divider
US20150049799A1 (en) Digital pulse width generator and method for generating digital pulse width
CN110518907B (en) Signal generating circuit and method thereof, digital time conversion circuit and method thereof
JP6825260B2 (en) Speed detector and speed control system
KR100959215B1 (en) Speed detection device
US9319050B1 (en) Multiple synchronizable signal generators using a single field programmable gate array
CN1912549B (en) Method and circuit for interpolating encoder output
JP4352921B2 (en) Rotation position detector
JP5023051B2 (en) Pulse synthesis circuit
JP5408980B2 (en) Binarization circuit and rotation detection device
JP6300371B2 (en) Motor drive control device and motor drive control method
TWI790124B (en) Test circuit and test method
CN112383257B (en) Rotary transformer feedback signal frequency division method and system based on AD2S1210 rotary transformer decoding chip
JP4519183B2 (en) AB phase signal generator, RD converter and angle detection device
WO2012106079A1 (en) Advanced converters for memory cell sensing and methods
US10648836B2 (en) Device for determining the movement of a rotary element, particularly for readings of water and/or gas meters
JP2010074637A (en) Up/down counter device
JP3067729B2 (en) Encoder signal processing method and device
CN105988399A (en) Method for realizing output of electronic gear by adopting field programmable logic gate array
US20080117086A1 (en) High speed quadrature counter
Ismail et al. Integrally accurate resolver-to-digital converter (RDC)
JP2551680B2 (en) Position detection device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060524

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081205

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090120

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090312

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: 20090331

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090331

R150 Certificate of patent or registration of utility model

Ref document number: 4289983

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120410

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130410

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140410

Year of fee payment: 5

EXPY Cancellation because of completion of term