JPH0942995A - Phase error correction method for two periodic signals and phase error correction device - Google Patents

Phase error correction method for two periodic signals and phase error correction device

Info

Publication number
JPH0942995A
JPH0942995A JP19034695A JP19034695A JPH0942995A JP H0942995 A JPH0942995 A JP H0942995A JP 19034695 A JP19034695 A JP 19034695A JP 19034695 A JP19034695 A JP 19034695A JP H0942995 A JPH0942995 A JP H0942995A
Authority
JP
Japan
Prior art keywords
phase
phase error
periodic signals
signals
difference
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.)
Granted
Application number
JP19034695A
Other languages
Japanese (ja)
Other versions
JP3524225B2 (en
Inventor
Naoki Kawamata
直樹 川又
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP19034695A priority Critical patent/JP3524225B2/en
Publication of JPH0942995A publication Critical patent/JPH0942995A/en
Application granted granted Critical
Publication of JP3524225B2 publication Critical patent/JP3524225B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To facilitate to form a device, and lessen the dispersion of precision resulting from individuals who adjust the device by obtaining the difference between the amplitude of first intersection of two signals of same cycle having a phase difference and the amplitude of second intersection when the same signals have a desirable phase difference. SOLUTION: Two periodic signals 3a, 3b are generated by a signal generator 1, being kept each converted into electric signals by an electric circuit 2, and sent to a digital signal processing means 5 signal amplitude equal by variable amplifiers 12a, 12b. The amplitude of first intersection where the signals 3a, 3b cross mutually is detected by the processing means 5, and the difference between the detected amplitude of the intersection and the amplitude of second intersection when respective signals have a desirable phase difference is obtained. A phase error, which is a deviation amount from phases when respective phases are in a desirable state, is obtained from the obtained amplitude difference. A correction factor, by which the phase difference of the signals 3a, 3b are corrected to a desirable phase difference, is obtained from the phase error, and a phase correction is conducted on the signals 3a, 3b having equal cycles using the correction factor.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明はエンコーダなどのよ
うに位置または角度の移動に応じて位相差のある二つの
周期信号を生じる信号発生装置において、位相差を望ま
しい値に補正する位相誤差補正装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a phase error correction device for correcting a phase difference to a desired value in a signal generator such as an encoder which generates two periodic signals having a phase difference according to the movement of a position or an angle. It is about.

【0002】[0002]

【従来の技術】従来、位相差がある二つの周期信号の補
正はアナログ的に行われている。この補正は、例えば、
二つの周期信号のリサージュ波形が真円となるように調
整することで位相差が調節される。
2. Description of the Related Art Conventionally, correction of two periodic signals having a phase difference is performed in an analog manner. This correction, for example,
The phase difference is adjusted by adjusting the Lissajous waveforms of the two periodic signals so as to form a perfect circle.

【0003】図7は従来の位相補正装置の構成を示す図
である。
FIG. 7 is a diagram showing the structure of a conventional phase correction device.

【0004】図7中、701は位置または角度の変化に
応じて二つの周期信号を発生する信号発生手段、702
は信号発生手段701にて発生した二つの周期信号を位
相差が調節された電気信号に変換するための電気回路、
702aは電気回路702上で抵抗値を調整して位相差
を補正するためのボリューム、703a,703bは電
気信号に変換された二つの周期信号、720は二つの周
期信号703a,703bのそれぞれを縦軸と横軸に取
った波形(以下リサージュ)を表示すための測定器、7
21は測定器720により表示されたリサージュであ
る。
In FIG. 7, reference numeral 701 denotes a signal generating means for generating two periodic signals according to changes in position or angle, and 702.
Is an electric circuit for converting the two periodic signals generated by the signal generating means 701 into an electric signal whose phase difference is adjusted,
702a is a volume for adjusting the resistance value on the electric circuit 702 to correct the phase difference, 703a and 703b are two periodic signals converted into electric signals, and 720 is the two periodic signals 703a and 703b. Measuring device for displaying the waveforms (hereinafter Lissajous) taken on the axis and the horizontal axis, 7
21 is a Lissajous displayed by the measuring device 720.

【0005】従来、アナログ・レゾルバ2相信号を出力
するエンコーダの信号補正は、出荷時にエンコーダの信
号を電気信号に変換する電気回路702上で抵抗値を調
整することで行ってきた。
Conventionally, signal correction of an encoder that outputs an analog resolver two-phase signal has been performed by adjusting a resistance value on an electric circuit 702 that converts the signal of the encoder into an electric signal at the time of shipment.

【0006】まず、振幅とオフセットを図示しないボリ
ュームによって補正する。通常は同一振幅、オフセット
ゼロとしてから位相を調整する。以下に位相を補正する
方法について説明する。
First, the amplitude and offset are corrected by a volume not shown. Normally, the phase is adjusted after setting the same amplitude and zero offset. The method of correcting the phase will be described below.

【0007】上記のエンコーダの周期信号の位相差は9
0度を正規の値としているので、二つの周期信号のそれ
ぞれを縦軸および横軸として表示すると、円を描くこと
がわかっている。
The phase difference between the periodic signals of the above encoder is 9
Since 0 degree is a normal value, it is known that a circle is drawn when each of the two periodic signals is displayed on the vertical axis and the horizontal axis.

【0008】信号発生手段701から出力される二つの
周期信号は、電気回路702によって振幅とオフセット
が補正されて信号703a,703bとして取り出され
る。各信号703a,703bは測定器720に入力さ
れ、リサージュ721が描かれる。信号703a,70
3bとリサージュ721の関係を図8に示す。
The electric circuit 702 corrects the amplitude and offset of the two periodic signals output from the signal generating means 701 and outputs them as signals 703a and 703b. Each of the signals 703a and 703b is input to the measuring device 720, and the Lissajous 721 is drawn. Signals 703a, 70
The relationship between 3b and Lissajous 721 is shown in FIG.

【0009】図8(a)は位相誤差が5度の時の信号7
03a,703bとリサージュ721の関係である。右
上と左下に延びた形になっている。図8(b)は位相誤
差が−5度の時のリサージュで図8(a)とは逆の関係
となっている。
FIG. 8A shows the signal 7 when the phase error is 5 degrees.
03a, 703b and Lissajous 721. The shape extends to the upper right and lower left. FIG. 8B is a Lissajous when the phase error is −5 degrees, and has a relationship opposite to that of FIG. 8A.

【0010】調整を行う際には上記のように表示される
リサージュ721を観測しながら、ボリューム702a
を調整して、リサージュ721が図8(c)に示すよう
に真円になるようにする。このとき、二つの周期信号の
位相差は90度になり、正しく調整されたことになる。
従来はこのようにして位相の補正がなされていた。
When making the adjustment, while observing the Lissajous 721 displayed as described above, the volume 702a
Are adjusted so that the Lissajous 721 becomes a perfect circle as shown in FIG. At this time, the phase difference between the two periodic signals becomes 90 degrees, which means that the two signals are properly adjusted.
Conventionally, the phase has been corrected in this way.

【0011】上記のようにして位相補正が行われた信号
により角度検出を行う信号処理装置としては図9および
図10に示すものがある。
As a signal processing device for detecting an angle based on the signal whose phase has been corrected as described above, there are those shown in FIGS. 9 and 10.

【0012】図9は従来よりロータリエンコーダ(以下
「エンコーダ」という)で使用されている信号処理回路
の一例の構成を示すブロック図である。
FIG. 9 is a block diagram showing an example of the configuration of a signal processing circuit conventionally used in a rotary encoder (hereinafter referred to as "encoder").

【0013】同図は内挿回路のブロック図を示してい
る。同図において、90A、90Bは周波数増倍器であ
り、夫々入力信号A,Bの周波数を2倍にして出力す
る。92は位相検出器であり、周波数増倍器90A,9
Bにより増倍された2つの正弦波信号A,Bを取り込
んで両者から位置または角度に官する情報である位相を
検出する。93は積算器であり、位相検出器92からの
位相信号を積算して累積角θを出力する。
The figure shows a block diagram of the interpolation circuit. In the figure, 90 A and 90 B are frequency multipliers, which double the frequencies of the input signals A and B, respectively, and output them. Reference numeral 92 is a phase detector, which is a frequency multiplier 90 A , 9
The two sine wave signals A and B multiplied by 0 B are taken in, and the phase, which is the information affecting the position or angle, is detected from both. Reference numeral 93 is an integrator, which integrates the phase signals from the phase detector 92 and outputs a cumulative angle θ.

【0014】上記の信号処理回路において、エンコーダ
から出力される2つの入力信号AおよびBはエンコーダ
の回転角に応じて互いに90゜の位相差の付いた正弦波
信号である。これらの入力信号A,Bはエンコーダの回
転軸が1回転するとp0個の正弦波パルスを出力する。
この入力信号AおよびBは周波数増倍器90A,90B
より2倍の周波数(回転軸の1回転当たり2p0)を持
つ信号に変換され、位相検出器92に出力される。
In the above signal processing circuit, the two input signals A and B output from the encoder are sine wave signals having a phase difference of 90 ° from each other according to the rotation angle of the encoder. These input signals A and B output p 0 sine wave pulses when the rotary shaft of the encoder makes one rotation.
The input signals A and B are converted by the frequency multipliers 90 A and 90 B into signals having a doubled frequency (2p 0 per one rotation of the rotary shaft) and output to the phase detector 92.

【0015】位相検出器92は入力された2つの入力信
号の位相を所定の精度、例えば1/40周期の精度で検
出し、ディジタル信号化して次段の積算器93に出力す
る。積算器93は入力したディジタル信号をパルス数と
して累積カウントして、その積算カウント数nから次式
によって累積の回転角度θを求め、出力している。
The phase detector 92 detects the phases of the two input signals that have been input with a predetermined accuracy, for example, an accuracy of 1/40 cycle, converts it into a digital signal, and outputs it to the integrator 93 in the next stage. The integrator 93 cumulatively counts the input digital signal as the number of pulses, obtains the cumulative rotation angle θ from the cumulative count number n by the following equation, and outputs it.

【0016】θ=360゜・n/(2・40・p0) この場合、最終的にエンコーダの回転軸の1回転当たり
の出力パルス数はエンコーダが出力する信号の80倍、
即ち、80・p0となる。
Θ = 360 ° · n / (2 · 40 · p 0 ) In this case, finally, the number of output pulses per rotation of the rotary shaft of the encoder is 80 times the signal output by the encoder,
That is, it becomes 80 · p 0 .

【0017】しかし、上述した方法では回路規模が大き
くなる等の問題点があり、別の方法が考案されている。
図10は上記の方法を採用した信号処理回路のブロック
図である。図中、91A、91Bは、A/D変換器であ
り、アナログ信号A,Bをディジタル信号AD,BDに変
換する。97はDSP、マイクロコンピュータなどの演
算装置(CPU)である。
However, the above-mentioned method has a problem that the circuit scale becomes large, and another method has been devised.
FIG. 10 is a block diagram of a signal processing circuit adopting the above method. In the figure, 91 A and 91 B are A / D converters, which convert the analog signals A and B into digital signals A D and B D. Reference numeral 97 is an arithmetic unit (CPU) such as a DSP or a microcomputer.

【0018】図10において、エンコ―ダから出力され
る2つの入力信号AおよびBは、A/D変換器91A
91Bによりディジタル信号ADおよびBDに変換され、
CPU97に入力される。そして演算装置(CPU)9
7はディジタル信号ADおよびBDを用いて次式により入
力信号A,Bの1周期内の位相δを求め出力する。
In FIG. 10, two input signals A and B output from the encoder are A / D converters 91 A ,
91 B converts into digital signals A D and B D ,
It is input to the CPU 97. And arithmetic unit (CPU) 9
Reference numeral 7 obtains and outputs the phase δ within one cycle of the input signals A and B by the following equation using the digital signals A D and B D.

【0019】δ=tan-1(BD/AD) 一方、入力信号A,Bは周波数増倍器90A,90Bに入
力され、m倍の周波数に増倍された出力は位相検出器9
2に入力される。位相検出器92は入力信号の位相を1
/t周期の精度で検出してディジタル信号化し、積算器
93へ出力する。積算器93は人力ディジタル信号をカ
ウントし、累積カウント数nを得て、 p=n/(m・t) 但しpは整数 により入力信号A,Bの累積パルス数pを出力し、1周
期内の位相δと加算して累積回転角度θを次式の演算よ
り求めて、出力する。
Δ = tan -1 (B D / A D ) On the other hand, the input signals A and B are input to the frequency multipliers 90 A and 90 B , and the output multiplied by the m-fold frequency is the phase detector. 9
2 is input. The phase detector 92 sets the phase of the input signal to 1
It is detected with a precision of / t cycle, converted into a digital signal, and output to the integrator 93. The integrator 93 counts the human power digital signal to obtain the cumulative count number n, and p = n / (m · t), where p is an integer and outputs the cumulative pulse number p of the input signals A and B, and within one cycle. And the cumulative rotation angle θ are calculated by the following equation and output.

【0020】 θ=360゜・{p+(δ/2π)}/p0 上記の方法によると比較的小規模な回路構成で精度良く
入力信号の位相δを検出することが可能となるが、エン
コーダからの入力信号をA/D変換したディジタル信号
D,BDから演算により位相δを求めているため、その
計算精度はA/D変換器91A,91Bの精度により決定
される。従ってA/D変換器ヘの入力信号AAおよびBA
は、その信号のピークが揃っており、しかもそれがA/
D変換器のレンジの中でできるだけ大きなものであるこ
とが精度的に望ましい。
Θ = 360 ° · {p + (δ / 2π)} / p 0 According to the above method, the phase δ of the input signal can be accurately detected with a relatively small-scale circuit configuration. Since the phase δ is obtained by calculation from the digital signals A D and B D obtained by A / D converting the input signal from, the calculation accuracy is determined by the accuracy of the A / D converters 91 A and 91 B. Therefore, the input signals A A and B A to the A / D converter are
Has the peaks of its signal, and it is A /
It is desirable in terms of accuracy to be as large as possible within the range of the D converter.

【0021】しかしながら、実際にエンコーダから出力
される入力信号A,Bの振幅は、エンコーダのスリット
板の回転精度等の影響を受けて変動しているため、A/
D変換の際には入力信号のピーク値が或る値に収まるよ
うにレベルを調整しなければならない。このため、入力
信号に振幅変動が有る場合は、入力信号の或る部分では
A/D変換器への入力ピーク値が小さくなりA/D変換
精度が落ち、全体として位相の検出精度を劣化させてし
まうことがある。
However, since the amplitudes of the input signals A and B actually output from the encoder fluctuate under the influence of the rotational accuracy of the slit plate of the encoder, etc., A /
During D conversion, the level must be adjusted so that the peak value of the input signal falls within a certain value. Therefore, when the input signal has amplitude fluctuations, the input peak value to the A / D converter becomes small in a certain part of the input signal and the A / D conversion accuracy decreases, which deteriorates the phase detection accuracy as a whole. It may happen.

【0022】上記のような問題点を解決するものとし
て、物体の変位に応じて出力される、所定の位相差を持
つ2つの正弦波状の入力信号を利用して該物体の変位量
を検出する変位量検出装置において、該入力信号の増幅
ゲインを任意に設定できる増幅手段と、増幅された該入
力信号をディジタル信号に変換するA/D変換手段と、
ディジタル信号に変換された2つの該入力信号から、所
定の関係式によって該入力信号の位相を算出する演算手
段と、該物体の所定の変位範囲にわたって該入力信号を
記憶する波形記憶手段と、該増幅手段の増幅ゲインを設
定するゲイン設定手段とを設け、変位量の検出時に該入
力信号をディジタル信号に変換する際、該所定の変位範
囲を複数の部分に分割し、各分割した部分においてその
最大入力ピーク信号をディジタル信号に変換したときの
ピークレベルを揃えるように該増幅手段の増幅ゲインを
調整する調整手段を設けた変位量検出装置が提案されて
いる。
In order to solve the above problems, the displacement amount of the object is detected by using two sinusoidal input signals having a predetermined phase difference, which are output according to the displacement of the object. In the displacement amount detecting device, an amplification means capable of arbitrarily setting an amplification gain of the input signal, an A / D conversion means for converting the amplified input signal into a digital signal,
Calculating means for calculating the phase of the input signal from a predetermined relational expression from the two input signals converted into digital signals; waveform storing means for storing the input signal over a predetermined displacement range of the object; Gain setting means for setting the amplification gain of the amplifying means is provided, and when the input signal is converted into a digital signal when the displacement amount is detected, the predetermined displacement range is divided into a plurality of parts, and the divided parts are divided into a plurality of parts. There has been proposed a displacement amount detecting device provided with adjusting means for adjusting the amplification gain of the amplifying means so that the peak levels when the maximum input peak signal is converted into a digital signal are made uniform.

【0023】[0023]

【発明が解決しようとする課題】上述した従来の位相の
補正方法では、人間がリサージュ図形を目で見て調整し
ているため、個人差が出ることは避けられない。また、
熟練した作業者が行ったとしても±1度程度の誤差がど
うしても残り、それ以下に調整することは非常に困難で
あった。図9および図10を用いて説明した変位量検出
装置においても、増幅手段のゲイン調整が自動化されて
いるだけで、信号発生装置の出力自体を補正するもので
はなかった。
In the above-described conventional phase correction method, since the human visually adjusts the Lissajous figure, it is unavoidable that individual differences occur. Also,
Even if a skilled worker performs it, an error of about ± 1 degree will inevitably remain, and it is very difficult to adjust it below that. Also in the displacement amount detecting device described with reference to FIGS. 9 and 10, the gain adjustment of the amplifying means is only automated, and the output itself of the signal generating device is not corrected.

【0024】また、調整を行うためには信号を表示する
ための測定器が必要であり、時間の経過等により再補正
が必要となったときにはエンコーダを使用中の状態から
専用の治具に設置し直すなどの手間がかかり、使い勝手
の良いものではなかった。
In addition, a measuring instrument for displaying a signal is required for the adjustment, and when re-correction is required due to the passage of time or the like, the encoder is installed from a state in use to a dedicated jig. It took a lot of work such as reworking, and it was not easy to use.

【0025】上記の課題を解決するため、本発明では位
相補正の手順を自動化する。
In order to solve the above problems, the present invention automates the phase correction procedure.

【0026】自動化するために二つの周期信号をアナロ
グデジタル変換でデジタル化して、デジタル信号処理手
段で自動化した処理手順を実行する。
For automation, the two periodic signals are digitized by analog-digital conversion, and the processing procedure automated by the digital signal processing means is executed.

【0027】ただ、検出器そのものは光や磁界等の物理
量であり、これらを電気信号に変換するためにアナログ
電気回路部分はかならず残る。また、デジタル変換に適
用できるレベルに振幅の大きさを揃えるためにもアナロ
グ電気回路は必要である。
However, the detector itself is a physical quantity such as light or magnetic field, and an analog electric circuit portion is always left in order to convert these into electric signals. Further, an analog electric circuit is necessary to adjust the amplitude to a level applicable to digital conversion.

【0028】したがって、本発明は上記のような電気回
路に含まれる調整機能を否定するものではなく、従来の
方法で調整しきれない精度を補うものとして、また、従
来の方法ではどうしても入ってしまう個人差を吸収する
ことを目的として本発明の補正があるわけである。
Therefore, the present invention does not deny the adjustment function included in the electric circuit as described above, but complements the accuracy that cannot be adjusted by the conventional method, and is inevitably included by the conventional method. The correction of the present invention is intended to absorb individual differences.

【0029】上記の目的を達成するための本発明の二つ
の周期信号の位相誤差補正方法は、位相差を有する周期
が等しい二つの信号が交差する第1の交点の振幅を検出
し、該検出した交点の振幅と各信号が望ましい位相差で
あるときの第2の交点の振幅との差を求め、前記第1の
交点および第2の交点間の振幅の差から各信号が望まし
い状態にあるときの位相からのずれ量である位相誤差を
求め、前記位相誤差から各信号の位相差を望ましい位相
差に補正するための係数である補正係数を求め、前記周
期の等しい二つの信号を前記補正係数を用いて位相補正
することを特徴とする。
The phase error correction method for two periodic signals of the present invention for achieving the above object detects the amplitude of a first intersection point at which two signals having the same period having a phase difference intersect each other, and the detection is performed. The difference between the amplitude of the intersecting point and the amplitude of the second intersecting point when each signal has a desired phase difference is obtained, and each signal is in a desirable state from the difference in amplitude between the first intersecting point and the second intersecting point. Then, a phase error, which is the amount of deviation from the phase, is obtained, and a correction coefficient, which is a coefficient for correcting the phase difference of each signal to a desired phase difference, is obtained from the phase error. It is characterized in that the phase is corrected using a coefficient.

【0030】この場合、第1の交点の振幅の検出は、二
つの周期信号の差の絶対値が予め定められた範囲より小
さなところで行うこととしてもよい。
In this case, the amplitude of the first intersection may be detected when the absolute value of the difference between the two periodic signals is smaller than a predetermined range.

【0031】また、第1の交点の振幅の検出は、二つの
周期信号の差の絶対値が最小となるところで行うことと
してもよい。
Further, the amplitude of the first intersection may be detected at the point where the absolute value of the difference between the two periodic signals becomes the minimum.

【0032】上記のいずれの場合においても、第1の交
点および第2の交点の振幅の差から位相誤差を求めるこ
とを、各信号の位相差が望ましい状態にあるときの交点
付近で周期信号を線形化し、代数計算で求めることによ
り行うこととしてもよい。
In any of the above cases, the phase error is obtained from the difference between the amplitudes of the first intersection and the second intersection, and the periodic signal is obtained in the vicinity of the intersection when the phase difference between the signals is in a desired state. It may be performed by linearizing and obtaining by algebraic calculation.

【0033】また、交点の振幅の差から位相誤差を求め
ることを、各信号の位相差が望ましい状態にあるときの
交点付近における逆三角関数のテーブルを参照すること
により行うこととしてもよい。
Further, the phase error may be obtained from the amplitude difference at the intersection by referring to the table of the inverse trigonometric function near the intersection when the phase difference between the signals is in a desired state.

【0034】さらに、交点の振幅の差から位相誤差を求
めることを、逆三角関数の計算によって求めることとし
てもよい。
Furthermore, obtaining the phase error from the difference in the amplitude of the intersection may be obtained by calculating the inverse trigonometric function.

【0035】本発明のさらに他の形態による二つの周期
信号の位相誤差補正方法は、ある位相差を持つ周期の等
しい二つの信号のいずれか一方を基準信号とし、前記基
準信号がある位相のときに他方の信号の振幅を測定し、
前記振幅から各信号が望ましい状態にあるときの位相か
らの位相のずれ量である位相誤差を求め、前記位相誤差
から各信号の位相差を望ましい位相差に補正するための
補正係数を求め、前記周期の等しい二つの信号を前記補
正係数を用いて位相補正することを特徴とする。上記各
発明のいずれにおいても、位相誤差の検出、補正係数の
導出および位相補正は前記二つの周期信号の振幅を等し
くした後に行うこととしてもよい。
According to another aspect of the present invention, there is provided a method for correcting a phase error between two periodic signals, wherein one of two signals having a certain phase difference and having the same period is used as a reference signal, and the reference signal has a certain phase. And measure the amplitude of the other signal,
Obtaining a phase error that is the amount of phase shift from the phase when each signal is in the desired state from the amplitude, and obtaining a correction coefficient for correcting the phase difference of each signal to the desired phase difference from the phase error, It is characterized in that two signals having the same period are phase-corrected by using the correction coefficient. In any of the above inventions, the phase error detection, the correction coefficient derivation, and the phase correction may be performed after the amplitudes of the two periodic signals are made equal.

【0036】また、補正係数は、位相誤差に基づいた近
似計算により求め、前記近似計算は、漸化式の反復計算
を有限回繰り返すこととしてもよい。
Further, the correction coefficient may be obtained by an approximate calculation based on the phase error, and the approximate calculation may be a finite number of recursive iterative calculations.

【0037】また、補正係数は、位相誤差と補正係数と
の関係のテーブルを参照して求めることとしてもよい。
The correction coefficient may be obtained by referring to the table of the relationship between the phase error and the correction coefficient.

【0038】また、補正係数は、位相誤差に基づいた三
角関数の計算によって求めることとしてもよい。
The correction coefficient may be obtained by calculating a trigonometric function based on the phase error.

【0039】さらに、前記二つの周期信号の値と補正係
数とを用いた位相補正の計算は代数計算で求めることと
してもよい。
Further, the calculation of the phase correction using the values of the two periodic signals and the correction coefficient may be obtained by algebraic calculation.

【0040】本発明の二つの周期信号の位相誤差補正装
置は、位相差を有する周期が等しい二つの信号のそれぞ
れをデジタル化するためのアナログデジタル変換手段
と、前記周期の等しい二つの信号を位相補正するデジタ
ル信号処理手段とを有し、前記デジタル信号処理手段
は、上記のいずれかに記載の方法により位相の補正を行
うことを特徴とする。
The phase error correction device for two periodic signals of the present invention comprises an analog-digital conversion means for digitizing two signals having the same period and having a phase difference, and the two signals having the same period in phase. And a digital signal processing means for performing correction, and the digital signal processing means performs the phase correction by any one of the methods described above.

【0041】この場合、電源のオンオフにかかわらず記
憶値を失わない記憶手段を有し、デジタル信号処理手段
は、補正係数を装置に記憶しておき、電源をオンにした
とき前回の補正値を使って補正することとしてもよい。
In this case, the digital signal processing means has a storage unit that does not lose the stored value regardless of whether the power is turned on or off, and the digital signal processing unit stores the correction coefficient in the device and stores the previous correction value when the power is turned on. You may use and correct it.

【0042】上記のように構成される本発明において
は、従来のように目視を用いることなく数値計算によっ
てのみ位相の補正が行われるので、装置化が容易とな
り、装置の調整時における個人差による精度のバラつき
が少なくなる。
In the present invention configured as described above, the phase is corrected only by numerical calculation without using visual observation as in the prior art, so that the device can be easily made and it may depend on individual differences when adjusting the device. Less variation in accuracy.

【0043】[0043]

【発明の実施の形態】次に、本発明について図面を参照
して説明する。
Next, the present invention will be described with reference to the drawings.

【0044】なお、本発明の様な、位相差のある二つの
周期信号の位相差を望ましい値に補正する装置として、
デジタル変換してデジタル信号処理手段により処理する
構成や振幅を補正する方法は上述したようにすでに提案
されているので、ここでは二つの周期信号の振幅が等し
いことを前提として位相差の補正について説明する。
As an apparatus for correcting the phase difference between two periodic signals having a phase difference to a desired value as in the present invention,
Since the configuration for digitally converting and processing by the digital signal processing means and the method for correcting the amplitude have already been proposed as described above, here, the correction of the phase difference will be described on the assumption that the amplitudes of the two periodic signals are equal. To do.

【0045】実施例1 図1は本発明の第1の実施例の構成を表す図であり、以
下に本実施例で用いられる近似計算の方法を含めて説明
する。
Example 1 FIG. 1 is a diagram showing the configuration of a first example of the present invention, and the method of approximation calculation used in this example will be described below.

【0046】図1中、1は位置または角度の変化に応じ
て二つの周期信号を発生する信号発生器、2は信号発生
器1の信号を電気信号に変換する電気回路、12a,1
2bは電気回路2の出力信号の振幅を等しく保つための
可変増幅器であり、増幅率可変に構成されている。4
a,4bはA/D変換器(アナログデジタル変換手
段)、3a,3bは電気信号に変換され、デジタル信号
に変換された第2および第1の周期信号、5はデジタル
信号処理手段であり、可変増幅器12a,12bの増幅
率を決定している。
In FIG. 1, 1 is a signal generator that generates two periodic signals in response to changes in position or angle, 2 is an electric circuit that converts the signal of the signal generator 1 into an electric signal, and 12a, 1a.
Reference numeral 2b is a variable amplifier for keeping the amplitude of the output signal of the electric circuit 2 equal, and has a variable amplification factor. Four
a and 4b are A / D converters (analog-digital conversion means), 3a and 3b are electric signals, and second and first periodic signals converted into digital signals, and 5 are digital signal processing means, The amplification factors of the variable amplifiers 12a and 12b are determined.

【0047】デジタル信号処理手段5は周期信号3の最
大値と最小値から適切な増幅率となるように各可変増幅
器12a,12b増幅率を決定し、これにより二つの周
期信号の振幅は等しく保たれている。
The digital signal processing means 5 determines the amplification factors of the variable amplifiers 12a and 12b from the maximum value and the minimum value of the periodic signal 3 so as to obtain an appropriate amplification factor, whereby the amplitudes of the two periodic signals are kept equal. Is dripping

【0048】図2は二つの周期信号3a,3bの位相関
係を説明する図である、上述したように可変増幅器12
で調整されることから各周期信号の振幅は等しくなって
いる。
FIG. 2 is a diagram for explaining the phase relationship between the two periodic signals 3a and 3b. As mentioned above, the variable amplifier 12 is used.
The amplitude of each periodic signal is the same because it is adjusted by.

【0049】図2に示される周期信号のうち、第1の周
期信号3bは、二つの周期信号のうちの基準となるもの
であり、3a−1は位相誤差のないときの第2の周期信
号で第1の周期信号3bとの位相差は90度である。3
a−2は位相誤差がδのときの第2の周期信号、6は位
相誤差がないときの交点で、正規化した場合、すなわち
最大振幅の値を1.0とすると45度における正弦ある
いは余弦の値となる(この値をDEG45とする)。7
は位相誤差δがあるときの交点でこの振幅をCROSS
ABとする。
Of the periodic signals shown in FIG. 2, the first periodic signal 3b is the reference of the two periodic signals, and 3a-1 is the second periodic signal when there is no phase error. Therefore, the phase difference from the first periodic signal 3b is 90 degrees. 3
a-2 is the second periodic signal when the phase error is δ, 6 is the intersection when there is no phase error, and when normalized, that is, when the maximum amplitude value is 1.0, the sine or cosine at 45 degrees Value (this value is referred to as DEG45). 7
CROSS this amplitude at the intersection when there is a phase error δ
Let's call it AB.

【0050】図3は交点を求めるための第1の方法を示
すフローチャートである。CROSSABを求める第1
の方法について図3を参照して説明する。なお、これら
の処理は一定のサンプリング周期毎にアナログデジタル
変換手段でデジタル信号に変換された値を元にデジタル
信号処理手段5によって実施される。
FIG. 3 is a flow chart showing the first method for finding the intersection. First to find CROSSAB
The method will be described with reference to FIG. It should be noted that these processes are carried out by the digital signal processing means 5 based on the value converted into the digital signal by the analog-to-digital conversion means at regular sampling intervals.

【0051】交点検出モードが開始されると、各サンプ
リング毎に周期信号3のデジタル変換値を得る(ステッ
プS1)。次に、二つの周期信号の値の差の絶対値と予
め定められたしきい値ERRとの差を比較する(ステッ
プS2)。差の絶対値がしきい値ERRより大きなとき
には交点でないとして何も行わなずに終了判定を行う
(ステップS4)。差の絶対値がしきい値ERRより小
さなときにはAまたはBの値の絶対値を交点の値CRO
SSABとし(ステップS3)、終了判定を行う(ステ
ップS4)。以上の操作を交点検出モードを抜けるまで
繰り返し、交点検出モードを抜けたときのCROSSA
Bの値を交点の値とする。
When the intersection detection mode is started, the digital conversion value of the periodic signal 3 is obtained for each sampling (step S1). Next, the difference between the absolute value of the difference between the values of the two periodic signals and the predetermined threshold value ERR is compared (step S2). When the absolute value of the difference is larger than the threshold value ERR, it is determined that the intersection is not reached and nothing is performed to determine the end (step S4). When the absolute value of the difference is smaller than the threshold value ERR, the absolute value of the value of A or B is set to the intersection value CRO.
It is set to SSAB (step S3), and the end determination is performed (step S4). The above operation is repeated until exiting the intersection detection mode, and CROSSA when exiting the intersection detection mode
Let the value of B be the value of the intersection.

【0052】交点検出モードにおいては、位相の補正は
行わない。すなわち、位相誤差0に設定される。
In the intersection point detection mode, the phase is not corrected. That is, the phase error is set to 0.

【0053】図4はCROSSABを求める第2の方法
を示すフローチャートである。CROSSABを求める
第2の方法について図4を参照して説明する。
FIG. 4 is a flow chart showing a second method for finding CROSSAB. A second method for obtaining CROSSAB will be described with reference to FIG.

【0054】交点検出モードにはいると、ERRMIN
に十分大きな値を設定し(ステップS5)、各サンプリ
ング毎に周期信号のデジタル変換値を得る(ステップS
6)。次に、二つの周期信号の値の差の絶対値とステッ
プS5にて設定したERRMINとを比較する(ステッ
プS7)。差の絶対値がERRMINよりも大きなとき
には交点でないとして何も行わずに終了判定を行う(ス
テップS9)。差の絶対値がERRMINより小さなと
きには、この時の差の絶対値を新しいERRMINの値
とし、AまたはBの値をCROSSABとして(ステッ
プS8)、終了判定を行う(ステップS9)。以上の操
作を交点検出モードを抜けるまで繰り返し、交点検出モ
ードを抜けたときのCROSSABの値を交点の値とす
る。
In the intersection detection mode, ERRMIN
Is set to a sufficiently large value (step S5), and a digital conversion value of the periodic signal is obtained for each sampling (step S5).
6). Next, the absolute value of the difference between the values of the two periodic signals is compared with ERRMIN set in step S5 (step S7). When the absolute value of the difference is larger than ERRMIN, it is determined that the intersection is not reached and nothing is performed to determine the end (step S9). When the absolute value of the difference is smaller than ERRMIN, the absolute value of the difference at this time is set as a new ERRMIN value, the value of A or B is set as CROSSAB (step S8), and the end determination is made (step S9). The above operation is repeated until the intersection detection mode is exited, and the value of CROSSAB when exiting the intersection detection mode is taken as the intersection value.

【0055】次に、交点6と交点7の差から位相誤差δ
を求める方法を説明する。
Next, the phase error δ is calculated from the difference between the intersection points 6 and 7.
A method for obtaining the following will be described.

【0056】図5は交点の振幅の値CROSSABから
位相誤差δを求める方法を説明する図である。
FIG. 5 is a diagram for explaining a method of obtaining the phase error δ from the amplitude value CROSSAB at the intersection.

【0057】周期信号3a−1、3a−2、3bを45
度における微分係数で直線近似したときの直線をそれぞ
れ9a,9b,10aとする。交点7の値をCROSS
ABとすると直線9a,9b,10aが囲む三角形の底
辺の長さの半分は、 δ/2=(CROSSAB−DBG45)÷DBG45・・・(1) で求めることができる。
The periodic signals 3a-1, 3a-2 and 3b are set to 45
The straight lines when linearly approximated by the differential coefficient in degrees are 9a, 9b, and 10a, respectively. The value at intersection 7 is CROSS
Assuming AB, the half length of the base of the triangle surrounded by the straight lines 9a, 9b, 10a can be calculated by δ / 2 = (CROSSAB-DBG45) ÷ DBG45 (1).

【0058】直線10aと平行で横軸11と直線9bと
の交点を通る線を10bとすると横軸11,直線10
b,直線9bの囲む三角形と直線9a,9b,10aの
囲む三角形は同じものであるから、底辺の長さ、すなわ
ち位相誤差δは式(1)で求めた値を2倍することによ
り求めることができる。
If the line parallel to the straight line 10a and passing through the intersection of the horizontal axis 11 and the straight line 9b is 10b, then the horizontal axis 11 and the straight line 10
b, the triangle enclosed by the straight line 9b and the triangle enclosed by the straight lines 9a, 9b, 10a are the same, so the length of the base, that is, the phase error δ, is obtained by doubling the value obtained by the equation (1). You can

【0059】次に、位相誤差δをもつ周期信号3a−2
から位相誤差のない周期信号3a−1を求める方法を説
明する。3bをA=cosθ、3a−1をB=sin
θ、3a−2をB’=sin(θ+δ)とする。
Next, the periodic signal 3a-2 having the phase error δ
A method of obtaining the periodic signal 3a-1 having no phase error from will be described. 3b is A = cos θ, 3a-1 is B = sin
Let θ and 3a−2 be B ′ = sin (θ + δ).

【0060】位相を補正することは位相誤差δを含んだ
測定値B’を位相誤差のないBにすることである。三角
関数の公式からB’は次式のように分解できる。
To correct the phase is to make the measured value B ′ including the phase error δ into B having no phase error. From the trigonometric formula, B'can be decomposed as follows.

【0061】 B’=sin(θ+δ)=sinθcosδ+cosθsinδ =Bcosδ+ASinδ・・・(2) したがって、Bは測定値A、B’とδから求められるs
inδとcosδとを使って次式から求めることができ
る。
B ′ = sin (θ + δ) = sin θcosδ + cos θsinδ = Bcosδ + ASinδ (2) Therefore, B is obtained from the measured values A, B ′ and δ.
It can be obtained from the following equation using inδ and cosδ.

【0062】 B=(B’−A・sinδ)÷cosδ・・・(3) したがって、補正するためには係数sinδとcosδ
の値を求めなければならない。
B = (B′−A · sin δ) ÷ cos δ (3) Therefore, the coefficients sin δ and cos δ are used for correction.
The value of must be calculated.

【0063】次に、δから補正係数sinδとcosδ
を求める方法について説明する。
Next, correction coefficients sin δ and cos δ are calculated from δ.
The method of obtaining

【0064】sinδはδが0近傍のときにはδにほぼ
等しいという性質を利用して、sinδをδで近似す
る。
Since sin δ is approximately equal to δ when δ is near 0, sin δ is approximated by δ.

【0065】cosδはsin2δ+cos2δ=1の関
係から、sinδ≒δを代入して、 cosδ=(1−δ21/2・・・(4) の計算で求めることができる。平方根の計算はデジタル
信号処理の中の関数でやるか、またはα=1−δ2とお
いて、x2−α=0の解Xをニュートン法の近似計算を
繰り返すことにより求める。繰り返し回数は収束を判定
して打ち切る方法が一般的であるが、平方根の値を求め
るように解の存在と収束性がわかっていて、かつ、サン
プリング周期中に計算を終了したいときはあらかじめ反
復計算の回数を決めておき、その回数だけ計算したら近
似計算を終了させることもできる。
From the relationship of sin 2 δ + cos 2 δ = 1, cos δ can be calculated by substituting sin δ≅δ and calculating cos δ = (1-δ 2 ) 1/2 (4). The calculation of the square root is performed by a function in digital signal processing, or α = 1-δ 2 is set, and the solution X of x 2 −α = 0 is obtained by repeating the approximation calculation of the Newton method. The number of iterations is generally determined by stopping the convergence, but if the existence of the solution and the convergence are known so as to find the value of the square root, and you want to end the calculation during the sampling period, repeat the calculation beforehand. It is also possible to decide the number of times of, and terminate the approximation calculation after calculating the number of times.

【0066】求めた解Xはcosδの近似値である。The obtained solution X is an approximate value of cos δ.

【0067】上記のようにして求めたsinδとcos
δの近似値を(3)式のsinδとcosδに代入して
位相を補正する。補正係数であるsinδとcosδの
近似値は、補正誤差δを求めた後は一定値であるのでサ
ンプリング中に十分計算することができる。
Sin δ and cos obtained as described above
The approximate value of δ is substituted into sin δ and cos δ in equation (3) to correct the phase. Since the approximate values of the correction coefficients sin δ and cos δ are constant after the correction error δ is obtained, they can be sufficiently calculated during sampling.

【0068】補正係数をバッテリバックアップされたメ
モリや不揮発性のメモリなどに記憶(保存)しておけば
電源をオフにしても値を失うことなく、電源オンの時に
前回の補正係数で補正することができる。なお、補正は
エンコーダを交換したときや、経時変化が起きたときな
ど必要なときだけでよい。
If the correction coefficient is stored (saved) in a battery-backed memory or a non-volatile memory, the value will not be lost even if the power is turned off, and the correction coefficient can be corrected by the previous correction coefficient when the power is turned on. You can It should be noted that the correction may be made only when necessary, such as when the encoder is replaced or when a change with time occurs.

【0069】実施例2:テーブル参照の方法 本発明の第2の実施例について説明する。Second Embodiment: Table Reference Method A second embodiment of the present invention will be described.

【0070】本実施例の構成および交点の求め方の二つ
の方法については実施例1と同じであり、位相誤差δの
求め方のみが実施例1と異なるため、以下には位相誤差
δの求め方について図2を参照して説明する。
The structure of this embodiment and the two methods of obtaining the intersection are the same as those of the first embodiment, and only the method of obtaining the phase error δ is different from that of the first embodiment. This will be described with reference to FIG.

【0071】位相誤差がないときの周期信号は45度で
交わり、このときの位相はπ/4ラジアンである。位相
誤差δのときの交点の位相をθcとする。
The periodic signals when there is no phase error intersect at 45 degrees, and the phase at this time is π / 4 radians. The phase of the intersection at the phase error δ is θc.

【0072】交点の位相θcを求めるためには、余弦の
逆三角関数が必要である。このため、デジタル信号処理
手段5(図1参照)には図6(a)に示すような45度
前後の余弦の逆三角関数を示す第1のテーブル格納して
おく。図6(a)に示す第1のテーブルは45度を中心
に±5度の範囲をカバーしている場合を示す。交点CR
OSSABの値を指標にしてテーブル1を参照すると、
交点の位相θcを求めることができる。位相誤差δは以
下の式から求められる。
In order to obtain the phase θc of the intersection, the inverse trigonometric function of cosine is required. Therefore, the digital signal processing means 5 (see FIG. 1) stores a first table indicating the inverse trigonometric function of the cosine around 45 degrees as shown in FIG. 6A. The first table shown in FIG. 6A shows a case in which a range of ± 5 degrees centering on 45 degrees is covered. Intersection CR
Referring to Table 1 using the value of OSSAB as an index,
The phase θc of the intersection can be obtained. The phase error δ is obtained from the following equation.

【0073】δ=(θc−π/4)×2・・・(5) 次に、位相誤差δから補正係数を求める方法について説
明する。
Δ = (θc−π / 4) × 2 (5) Next, a method of obtaining the correction coefficient from the phase error δ will be described.

【0074】図6(b),(c)のそれぞれは0度前後
の正弦と余弦の関係を示す第2のテーブル,第3のテー
ブルであり、デジタル信号処理手段5に格納されてい
る。図では±5度までの範囲をカバーしている場合を示
している。位相誤差δを指標としてテーブルからsin
δとcosδの値を求めることができる。
6B and 6C are a second table and a third table showing the relationship between sine and cosine around 0 degree, respectively, which are stored in the digital signal processing means 5. The figure shows the case of covering the range up to ± 5 degrees. From the table using the phase error δ as an index, sin
The values of δ and cos δ can be obtained.

【0075】なお、上記の各テーブルの構成についてい
うと、0度に対するsinとcosの対称性(sinは
絶対値が等しく符号が異なる、cosはδの符号にかか
わらず同じ値である)を利用してテーブルの容量を半分
にすることもできる。
Regarding the structure of each table described above, the symmetry of sin and cos with respect to 0 degree (sin has the same absolute value and different sign, cos has the same value regardless of the sign of δ) is used. You can also halve the capacity of the table.

【0076】上記の各テーブルに書き込まれた値を
(3)式に代入して位相を補正する。補正係数の保存に
ついても実施例1と同様にできる。
The values written in the above tables are substituted into the equation (3) to correct the phase. The correction coefficient can be stored in the same manner as in the first embodiment.

【0077】実施例3:三角関数を計算する。Example 3: A trigonometric function is calculated.

【0078】上記二つの実施例は三角関数計算および逆
三角関数計算を直接できない場合について説明したが、
三角関数および逆三角関数を計算できる場合にはもっと
単純にできる。その場合について説明する。
In the above two embodiments, the case where the trigonometric function calculation and the inverse trigonometric function calculation cannot be directly performed has been described.
If we can compute trigonometric and inverse trigonometric functions, we can do simpler. The case will be described.

【0079】交点の求め方は実施例1と同じである。逆
三角関数が計算できれば、交点の位相を、 θc=cos-1(CROSSAB)・・・(6) と計算でき、この値と45度(π/4)との差が求める
位相差の半分に相当するので、式(5)に代入して位相
誤差δを求めることができる。補正計数もsinδとc
osδが計算できるので求めることができる。
The method of obtaining the intersection is the same as in the first embodiment. If the inverse trigonometric function can be calculated, the phase of the intersection can be calculated as θc = cos -1 (CROSSAB) (6), and the difference between this value and 45 degrees (π / 4) is half the phase difference obtained. Since this is equivalent, the phase error δ can be obtained by substituting it in the equation (5). Corrected counts are also sin δ and c
Since osδ can be calculated, it can be obtained.

【0080】したがって、このsinδとcosδの値
を(3)式に適用すれば、位相を補正することができ
る。補正係数の保存についても実施例1と同様にでき
る。
Therefore, the phase can be corrected by applying the values of sin δ and cos δ to the equation (3). The correction coefficient can be stored in the same manner as in the first embodiment.

【0081】実施例1では位相誤差検出と補正係数の両
者を近似計算で求める方法について説明し、実施例2で
は両者をテーブル参照で求める方法について説明し、実
施例3では両者を関数で求める方法について説明した
が、位相誤差検出をテーブル参照で行い、補正係数を近
似計算で求めたり、任意に組み合わせて実現することも
もちろん可能である。
In the first embodiment, a method for obtaining both the phase error detection and the correction coefficient by approximate calculation will be described, in the second embodiment, a method for obtaining both by a table reference will be described, and in the third embodiment, both will be obtained by a function. However, it is of course possible to detect the phase error by referring to a table and obtain the correction coefficient by an approximate calculation, or to realize it by arbitrarily combining.

【0082】実施例4:上記の各実施例では、基準信号
のある位相の時の他方の信号の振幅値から位相誤差δを
求める際に、二つの周期信号の交点から位相誤差δを求
める場合について示したが、本実施例では一方の周期信
号を基準としてある位相における他方の振幅から位相誤
差δを求める方法について説明する。
Embodiment 4 In each of the above embodiments, when the phase error δ is obtained from the intersection of two periodic signals when the phase error δ is obtained from the amplitude value of the other signal when the reference signal has a certain phase However, in this embodiment, a method of obtaining the phase error δ from the amplitude of the other one in a certain phase with reference to one periodic signal will be described.

【0083】本実施例について図2を参照して説明す
る。第1の周期信号3bを基準信号とする。例として基
準信号である第1の周期信号3bの振幅が1になるとき
の第2の周期信号3aの振幅を測定する方法について述
べる。位相誤差が0のときの第2の周期信号3aの値は
3a−1に示す様に0である。3a−2に示す様に、位
相誤差があるときには振幅の値は13に示す点になる
(この時の振幅をCROSSZとする)。このCROS
SZから位相誤差δを求める方法は実施例1から実施例
3で説明したように3通りの手段がある。
This embodiment will be described with reference to FIG. The first periodic signal 3b is used as a reference signal. As an example, a method of measuring the amplitude of the second periodic signal 3a when the amplitude of the first periodic signal 3b which is the reference signal becomes 1 will be described. The value of the second periodic signal 3a when the phase error is 0 is 0 as indicated by 3a-1. As indicated by 3a-2, when there is a phase error, the value of the amplitude becomes a point indicated by 13 (the amplitude at this time is CROSSZ). This CROS
There are three methods for obtaining the phase error δ from SZ as described in the first to third embodiments.

【0084】方法1:線形化による近似では、位相誤差
δの時のCROSSZの値はsinδであるから、実施
例1の補正係数の導出で説明した場合とは逆の近似でs
inδの値をδの近似値とする。すなわち、CROSS
Zの値を位相誤差δの近似値とする。
Method 1: In the approximation by the linearization, the value of CROSSZ at the time of the phase error δ is sin δ. Therefore, s is the inverse approximation to the case explained in the derivation of the correction coefficient of the first embodiment.
Let the value of in δ be an approximate value of δ. That is, CROSS
The value of Z is an approximate value of the phase error δ.

【0085】方法2:0度付近の正弦の逆三角関数をテ
ーブルで持っていて、CROSSZを指標としでテーブ
ルを参照してδの値を求める。テーブルは図6(a)の
テーブル1と同様のもので、テーブル1が45度を中心
とするのに対し、0度を中心とする。図6(d)に±5
度の範囲の第4のテーブルを示す。
Method 2: A table has an inverse trigonometric function of sine around 0 degree, and the value of δ is obtained by referring to the table with CROSSZ as an index. The table is similar to the table 1 in FIG. 6A, and the table 1 is centered at 45 degrees, whereas the table 1 is centered at 0 degrees. ± 5 in Fig. 6 (d)
4 shows a fourth table of degree ranges.

【0086】方法3:逆三角関数を計算して次式で位相
誤差δを求める。
Method 3: The inverse trigonometric function is calculated and the phase error δ is calculated by the following equation.

【0087】 δ=sin-1(CROSSZ)・・・(7) 上記の3通りの手段のいずれかによって位相誤差δを求
めれば、実施例1から3に述べた方法で補正係数を導出
し、位相補正の計算を実行することができる。補正係数
の保存についても実施例1と同様にできる。
Δ = sin −1 (CROSSZ) (7) If the phase error δ is obtained by any of the above three means, the correction coefficient is derived by the method described in the first to third embodiments, Phase correction calculations can be performed. The correction coefficient can be stored in the same manner as in the first embodiment.

【0088】[0088]

【発明の効果】本発明は以上説明したように構成されて
いるので、以下に記載するような効果を奏する。
Since the present invention is configured as described above, it has the following effects.

【0089】1.位相の補正が予め定められた数値計算
によってのみ行われるので、装置化が容易となり、出来
上がった装置の精度を調整した個人差による精度のバラ
つきが少ないものとすることができる効果がある。
1. Since the correction of the phase is performed only by a predetermined numerical calculation, there is an effect that the device can be easily made and the variation of the accuracy due to the individual difference in adjusting the accuracy of the completed device can be reduced.

【0090】2.微小な差も検出可能で高精度に補正で
きる。
2. Even a minute difference can be detected and can be corrected with high accuracy.

【0091】3.周期信号の信号処理手段の中に実現す
ることができるので、使用状態から取り外したり測定器
を取付けることなく、実際に使用している状態のまま補
正することが可能。
3. Since it can be implemented in the signal processing means of the periodic signal, it is possible to make corrections in the state of actual use without removing the instrument from its use or attaching a measuring instrument.

【0092】4.補正係数を保存しておけるので、電源
を入れる度に補正しなければならないという手間が省け
る。
[0092] 4. Since the correction coefficient can be saved, it is possible to save the trouble of having to make correction every time the power is turned on.

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

【図1】本発明の実施例の構成を表す図である。FIG. 1 is a diagram showing a configuration of an exemplary embodiment of the present invention.

【図2】二つの周期信号の位相関係を表す図である。FIG. 2 is a diagram showing a phase relationship between two periodic signals.

【図3】第1のフローチャートを表す図である。FIG. 3 is a diagram illustrating a first flowchart.

【図4】第2のフローチャートを表す図である。FIG. 4 is a diagram illustrating a second flowchart.

【図5】交点の振幅から位相誤差を求める方法を説明す
る図である。
FIG. 5 is a diagram illustrating a method of obtaining a phase error from the amplitude of an intersection.

【図6】テーブルを説明する図である。FIG. 6 is a diagram illustrating a table.

【図7】従来例の構成を表す図である。FIG. 7 is a diagram showing a configuration of a conventional example.

【図8】従来例の調整方法を説明する図である。FIG. 8 is a diagram illustrating a conventional adjustment method.

【図9】従来より行われている増幅率調整手段の構成を
示す図である。
FIG. 9 is a diagram showing a configuration of an amplification factor adjusting means that has been conventionally used.

【図10】従来より行われている増幅率調整手段の構成
を示す図である。
FIG. 10 is a diagram showing a configuration of a conventional amplification factor adjusting means.

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

1 信号発生器 2 電気回路 3a 第2の周期信号 3b,3b−1,3b−2 第1の周期信号 4a,4b アナログデジタル変換手段 5 デジタル信号処理手段 6,7 交点 9 周期信号を線形化した直線 10 周期信号を線形化した直線 11 振幅ゼロの線 12a,12b 可変増幅器 13 位相誤差のあるときの検出点 S1〜S9 ステップ DESCRIPTION OF SYMBOLS 1 signal generator 2 electric circuit 3a 2nd periodic signal 3b, 3b-1, 3b-2 1st periodic signal 4a, 4b analog-digital conversion means 5 digital signal processing means 6, 7 intersection 9 linearization of the periodic signal Straight line 10 Straight line obtained by linearizing a periodic signal 11 Lines of zero amplitude 12a, 12b Variable amplifier 13 Detection points when there is a phase error S1 to S9 steps

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 位相差を有する周期が等しい二つの信号
が交差する第1の交点の振幅を検出し、該検出した交点
の振幅と各信号が望ましい位相差であるときの第2の交
点の振幅との差を求め、 前記第1の交点および第2の交点間の振幅の差から各信
号が望ましい状態にあるときの位相からのずれ量である
位相誤差を求め、 前記位相誤差から各信号の位相差を望ましい位相差に補
正するための係数である補正係数を求め、 前記周期の等しい二つの信号を前記補正係数を用いて位
相補正することを特徴とする二つの周期信号の位相誤差
補正方法。
1. The amplitude of a first intersection at which two signals having the same period having a phase difference intersect each other is detected, and the amplitude of the detected intersection and the second intersection when each signal has a desired phase difference. A difference with the amplitude is obtained, a phase error that is a deviation amount from the phase when each signal is in a desirable state is obtained from the difference in the amplitude between the first intersection and the second intersection, and each signal is obtained from the phase error. Of the phase difference between the two periodic signals, wherein a correction coefficient that is a coefficient for correcting the phase difference of 1 to a desired phase difference is obtained, and the two signals having the same cycle are phase-corrected using the correction coefficient. Method.
【請求項2】 請求項1記載の二つの周期信号の位相誤
差補正方法において、 第1の交点の振幅の検出は、二つの周期信号の差の絶対
値が予め定められた範囲より小さなところで行うことを
特徴とする二つの周期信号の位相誤差補正方法。
2. The phase error correction method for two periodic signals according to claim 1, wherein the amplitude of the first intersection is detected when the absolute value of the difference between the two periodic signals is smaller than a predetermined range. A phase error correction method for two periodic signals, characterized in that
【請求項3】 請求項1記載の二つの周期信号の位相誤
差補正方法において、 第1の交点の振幅の検出は、二つの周期信号の差の絶対
値が最小となるところで行うことを特徴とする二つの周
期信号の位相誤差補正方法。
3. The phase error correction method for two periodic signals according to claim 1, wherein the amplitude of the first intersection is detected when the absolute value of the difference between the two periodic signals is minimum. A method for correcting the phase error between two periodic signals.
【請求項4】 請求項1乃至請求項3のいずれかに記載
の二つの周期信号の位相誤差補正方法において、 第1の交点および第2の交点の振幅の差から位相誤差を
求めることを、各信号の位相差が望ましい状態にあると
きの交点付近で周期信号を線形化し、代数計算で求める
ことにより行うことを特徴とする二つの周期信号の位相
誤差補正方法。
4. The phase error correction method for two periodic signals according to claim 1, wherein the phase error is calculated from the difference in amplitude between the first intersection and the second intersection. A method for correcting a phase error between two periodic signals, which is characterized by linearizing the periodic signal in the vicinity of an intersection when the phase difference between the respective signals is in a desirable state, and by performing algebraic calculation.
【請求項5】 請求項1乃至請求項3のいずれかに記載
の二つの周期信号の位相誤差補正方法において、 交点の振幅の差から位相誤差を求めることを、各信号の
位相差が望ましい状態にあるときの交点付近における逆
三角関数のテーブルを参照することにより行うことを特
徴とする二つの周期信号の位相誤差補正方法。
5. The phase error correction method for two periodic signals according to claim 1, wherein the phase error is determined from the difference in amplitude of the intersections, and the phase difference between the respective signals is desirable. The method for correcting the phase error of two periodic signals is performed by referring to the table of the inverse trigonometric function in the vicinity of the intersection at time.
【請求項6】 請求項1乃至請求項3のいずれかに記載
の二つの周期信号の位相誤差補正方法において、 交点の振幅の差から位相誤差を求めることを、逆三角関
数の計算によって求めることを特徴とする二つの周期信
号の位相誤差補正方法。
6. The phase error correction method for two periodic signals according to claim 1, wherein the phase error is obtained from the difference in amplitude of the intersections by calculating an inverse trigonometric function. A method for correcting a phase error between two periodic signals, characterized by:
【請求項7】 ある位相差を持つ周期の等しい二つの信
号のいずれか一方を基準信号とし、 前記基準信号がある位相のときに他方の信号の振幅を測
定し、 前記振幅から各信号が望ましい状態にあるときの位相か
らの位相のずれ量である位相誤差を求め、 前記位相誤差から各信号の位相差を望ましい位相差に補
正するための補正係数を求め、 前記周期の等しい二つの信号を前記補正係数を用いて位
相補正することを特徴とする二つの周期信号の位相誤差
補正方法。
7. One of two signals having a certain phase difference and having the same period is used as a reference signal, the amplitude of the other signal is measured when the reference signal has a certain phase, and each signal is desirable from the amplitude. Obtain the phase error that is the amount of phase shift from the phase when in the state, obtain the correction coefficient for correcting the phase difference of each signal to the desired phase difference from the phase error, two signals with the same period A phase error correction method for two periodic signals, characterized in that phase correction is performed using the correction coefficient.
【請求項8】 請求項1乃至請求項7のいずれかに記載
の二つの周期信号の位相誤差補正方法において、 位相誤差の検出、補正係数の導出および位相補正は前記
二つの周期信号の振幅を等しくした後に行うことを特徴
とする二つの周期信号の位相誤差補正方法。
8. The phase error correction method for two periodic signals according to claim 1, wherein the phase error is detected, the correction coefficient is derived, and the phase correction is performed by using the amplitudes of the two periodic signals. A method for correcting a phase error of two periodic signals, which is performed after equalization.
【請求項9】 請求項1乃至請求項8のいずれかに記載
の二つの周期信号の位相誤差補正方法において、 補正係数は、位相誤差に基づいた近似計算により求め、 前記近似計算は、漸化式の反復計算を有限回繰り返すこ
とを特徴とする二つの周期信号の位相誤差補正方法。
9. The phase error correction method for two periodic signals according to claim 1, wherein the correction coefficient is obtained by approximation calculation based on the phase error, and the approximation calculation is recursion. A method for correcting a phase error of two periodic signals, which is characterized by repeating the iterative calculation of equations a finite number of times.
【請求項10】 請求項1乃至請求項7のいずれかに記
載の二つの周期信号の位相誤差補正方法において、 補正係数は、位相誤差と補正係数との関係のテーブルを
参照して求めることを特徴とする二つの周期信号の位相
誤差補正方法。
10. The method for correcting a phase error of two periodic signals according to claim 1, wherein the correction coefficient is obtained by referring to a table of the relationship between the phase error and the correction coefficient. A characteristic method for correcting a phase error between two periodic signals.
【請求項11】 請求項1乃至請求項7のいずれかに記
載の二つの周期信号の位相誤差補正方法において、 補正係数は、位相誤差に基づいた三角関数の計算によっ
て求めることを特徴とする二つの周期信号の位相誤差補
正方法。
11. The phase error correction method for two periodic signals according to any one of claims 1 to 7, wherein the correction coefficient is obtained by calculation of a trigonometric function based on the phase error. Method for phase error correction of two periodic signals.
【請求項12】 請求項1乃至請求項11のいずれかに
記載の二つの周期信号の位相誤差補正方法において、 前記二つの周期信号の値と補正係数とを用いた位相補正
の計算は代数計算で求めることを特徴とする二つの周期
信号の位相誤差補正方法。
12. The method for correcting a phase error of two periodic signals according to claim 1, wherein the calculation of the phase correction using the values of the two periodic signals and the correction coefficient is an algebraic calculation. A method for correcting a phase error of two periodic signals, which is characterized by
【請求項13】 位相差を有する周期が等しい二つの信
号のそれぞれをデジタル化するためのアナログデジタル
変換手段と、 前記周期の等しい二つの信号を位相補正するデジタル信
号処理手段とを有し、 前記デジタル信号処理手段は、請求項1乃至請求項12
のいずれかに記載の方法により位相の補正を行うことを
特徴とする二つの周期信号の位相誤差補正装置。
13. An analog-digital conversion means for digitizing each of two signals having a same cycle and having a phase difference, and a digital signal processing means for correcting a phase of the two signals having the same cycle, The digital signal processing means is any one of claims 1 to 12.
2. A phase error correction device for two periodic signals, wherein the phase is corrected by the method described in any one of 1.
【請求項14】 請求項13記載の二つの周期信号の位
相誤差補正装置において、 電源のオンオフにかかわらず記憶値を失わない記憶手段
を有し、 デジタル信号処理手段は、補正係数を装置に記憶してお
き、電源をオンにしたとき前回の補正値を使って補正す
ることを特徴とする二つの周期信号の位相誤差補正装
置。
14. The phase error correction apparatus for two periodic signals according to claim 13, further comprising a storage unit that does not lose a stored value regardless of whether the power is on or off, and the digital signal processing unit stores the correction coefficient in the apparatus. In addition, the phase error correction device for two periodic signals is characterized in that when the power is turned on, correction is performed using the previous correction value.
JP19034695A 1995-07-26 1995-07-26 Phase error correction method and phase error correction device for two periodic signals Expired - Fee Related JP3524225B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19034695A JP3524225B2 (en) 1995-07-26 1995-07-26 Phase error correction method and phase error correction device for two periodic signals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19034695A JP3524225B2 (en) 1995-07-26 1995-07-26 Phase error correction method and phase error correction device for two periodic signals

Publications (2)

Publication Number Publication Date
JPH0942995A true JPH0942995A (en) 1997-02-14
JP3524225B2 JP3524225B2 (en) 2004-05-10

Family

ID=16256673

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19034695A Expired - Fee Related JP3524225B2 (en) 1995-07-26 1995-07-26 Phase error correction method and phase error correction device for two periodic signals

Country Status (1)

Country Link
JP (1) JP3524225B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002350183A (en) * 2001-05-30 2002-12-04 Sankyo Seiki Mfg Co Ltd Encoder
WO2004092683A1 (en) * 2003-04-11 2004-10-28 Mitsubishi Denki Kabushiki Kaisha Rotary encoder
DE19934478B4 (en) * 1999-07-27 2007-12-27 GEMAC-Gesellschaft für Mikroelektronikanwendung Chemnitz mbH Digital interpolation device
WO2007148461A1 (en) * 2006-06-19 2007-12-27 Panasonic Corporation Phase correction circuit of encoder signal
CN106643821A (en) * 2017-03-09 2017-05-10 常州寻心电子科技有限公司 Angular position detection method and angular displacement sensor
JP2017161553A (en) * 2017-06-22 2017-09-14 株式会社リコー Rotation angle detector, motor system, image processing device, and rotation angle detection method
US10409670B2 (en) * 2013-05-02 2019-09-10 Fanuc Corporation Encoder with accuracy correction function
CN110546464A (en) * 2017-04-25 2019-12-06 日本精工株式会社 Rotation angle detection device and rotation angle detection method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5149820B2 (en) 2009-01-19 2013-02-20 キヤノン株式会社 Controller and processing equipment

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19934478B4 (en) * 1999-07-27 2007-12-27 GEMAC-Gesellschaft für Mikroelektronikanwendung Chemnitz mbH Digital interpolation device
JP2002350183A (en) * 2001-05-30 2002-12-04 Sankyo Seiki Mfg Co Ltd Encoder
JP4582955B2 (en) * 2001-05-30 2010-11-17 日本電産サンキョー株式会社 Encoder
WO2004092683A1 (en) * 2003-04-11 2004-10-28 Mitsubishi Denki Kabushiki Kaisha Rotary encoder
US7046176B2 (en) 2003-04-11 2006-05-16 Mitsubishi Denki Kabushiki Kaisha Rotary encoder
DE10392675B4 (en) * 2003-04-11 2006-10-12 Mitsubishi Denki K.K. rotary encoder
KR100882400B1 (en) * 2006-06-19 2009-02-05 파나소닉 주식회사 Phase correction circuit of encoder signal
DE112007000005B4 (en) 2006-06-19 2009-12-31 Panasonic Corp., Kadoma position detector
WO2007148461A1 (en) * 2006-06-19 2007-12-27 Panasonic Corporation Phase correction circuit of encoder signal
US7933373B2 (en) 2006-06-19 2011-04-26 Panasonic Corporation Phase correction circuit of encoder signal
US10409670B2 (en) * 2013-05-02 2019-09-10 Fanuc Corporation Encoder with accuracy correction function
CN106643821A (en) * 2017-03-09 2017-05-10 常州寻心电子科技有限公司 Angular position detection method and angular displacement sensor
CN106643821B (en) * 2017-03-09 2023-05-23 常州寻心电子科技有限公司 Angular position detection method and angular displacement sensor
CN110546464A (en) * 2017-04-25 2019-12-06 日本精工株式会社 Rotation angle detection device and rotation angle detection method
JP2017161553A (en) * 2017-06-22 2017-09-14 株式会社リコー Rotation angle detector, motor system, image processing device, and rotation angle detection method

Also Published As

Publication number Publication date
JP3524225B2 (en) 2004-05-10

Similar Documents

Publication Publication Date Title
KR0169550B1 (en) Absolute position detection apparatus and error compensation method therefor
CN1769844B (en) Encoder output signal correction apparatus and method
CN1773220B (en) Encoder output signal correction apparatus and method
JP3772121B2 (en) Encoder signal processing device
US7852969B2 (en) System and method for dynamic calibration of a quadrature encoder
JP3524225B2 (en) Phase error correction method and phase error correction device for two periodic signals
EP0746907B1 (en) Absolute encoder using multiphase analog signals
US6768956B2 (en) High precision position detecting apparatus capable of removing error contained in signal
JP3208933B2 (en) Position measuring device
JP3312504B2 (en) Position detection device
KR20180114743A (en) Absolute encoder, method for generating look-up table of sinusoidal wave, and method for detecting absolute angle using the same
JP3365063B2 (en) Rotation angle detection method
JP2003222534A (en) Phase difference error detection device and interpolation error estimation device using it
JPH11190606A (en) Rotation quantity measuring method and rotation quantity measuring device
JPH02251720A (en) Interpolating method of encoder
JP2009288241A6 (en) Method for determining a time difference between a first event and a second event
JP4259780B2 (en) Interpolation error estimation method and interpolation error estimation device
JP3092100B2 (en) Position detector with error correction function
JPS61149822A (en) Correcting device for phase error
JP3208932B2 (en) Position measuring device
JP2003035566A (en) Absolute position detector with correcting function
JPH0496131A (en) Signal calibrating device
JP3075452B2 (en) Position measuring device
JPH0861980A (en) Displacement amount detecting device
JP3451851B2 (en) Rotation speed detector

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20031216

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20031216

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040121

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040212

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

Free format text: PAYMENT UNTIL: 20080220

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090220

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100220

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100220

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110220

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120220

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130220

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140220

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees