JPH0371016A - Signal calibrating device - Google Patents
Signal calibrating deviceInfo
- Publication number
- JPH0371016A JPH0371016A JP20582389A JP20582389A JPH0371016A JP H0371016 A JPH0371016 A JP H0371016A JP 20582389 A JP20582389 A JP 20582389A JP 20582389 A JP20582389 A JP 20582389A JP H0371016 A JPH0371016 A JP H0371016A
- Authority
- JP
- Japan
- Prior art keywords
- value
- amplitude
- delta
- theta
- minx
- 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
Links
- 230000006870 function Effects 0.000 claims description 10
- 238000001514 detection method Methods 0.000 claims description 7
- 238000010606 normalization Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000035939 shock Effects 0.000 description 1
- 230000002277 temperature effect Effects 0.000 description 1
Landscapes
- Indication And Recording Devices For Special Purposes And Tariff Metering Devices (AREA)
- Transmission And Conversion Of Sensor Element Output (AREA)
- Optical Transform (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
この発明は、元信号がコサイン、サイン関数状であるも
のにおいて、ゼロ点、振幅の変動を検出し、自動的に補
償する信号校正装置に関し、特に前記コサイン、サイン
関数状の信号が位置の関数であるエンコーダ信号から逆
正接演算により微細な角度を検出する際に好適な信号の
前処理装置に関するものである。[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a signal calibration device that detects and automatically compensates for zero point and amplitude fluctuations when the original signal is in the form of a cosine or sine function. In particular, the present invention relates to a signal preprocessing device suitable for detecting a minute angle by arctangent calculation from an encoder signal in which the cosine or sine function signal is a function of position.
コサイン、サイン関数状の信号は計測装置などにおいて
しばしば用いられる。この代表的な例は微細な角度を計
測するための装置であって、エンコーダのアナログ出力
が1回転をN周期(Nは殻に数百〜数千)とするコサイ
ン、サイン関数状であることを利用して逆正接演算によ
り1周期をさらに細分化することが行われている。Cosine and sine function signals are often used in measurement devices and the like. A typical example of this is a device for measuring minute angles, where the encoder's analog output is in the form of a cosine or sine function where one revolution is N periods (N is hundreds to thousands of shells). One period is further subdivided by arctangent calculation using .
このような装置において、元信号のゼロ点の変動や振幅
の不一致があると計測結果に誤差を含む。従来はアナロ
グ部分に温度特性のよい特別な部品を使用すること、温
度の影響を受けにくい回路構成とすること等により、ゼ
ロ点、振幅が一定に保たれるように配慮されているが、
アナログ信号を取り扱う限りこれらの変動を完全に抑え
ることは難しいという問題があった。また、このような
装置は高価であり調整も難しいという問題があった。In such a device, if there is a fluctuation in the zero point of the original signal or a mismatch in amplitude, the measurement result will contain an error. Conventionally, care has been taken to keep the zero point and amplitude constant by using special parts with good temperature characteristics in the analog part, and by creating a circuit configuration that is less susceptible to temperature effects.
There has been a problem in that it is difficult to completely suppress these fluctuations as long as analog signals are handled. Additionally, such devices are expensive and difficult to adjust.
この発明は、このような問題点を解決するためになされ
たもので、ゼロ点、振幅の変動を自動的に補償する信号
校正装置を提供することを目的とする。The present invention was made to solve these problems, and an object of the present invention is to provide a signal calibration device that automatically compensates for fluctuations in the zero point and amplitude.
(課題を解決するための手段)
この発明にかかる信号校正装置は、正規化手段と、逆正
接演算手段と、ピーク値検出手段と、振幅・ゼロ点演算
手段と、制御手段とからなるものである。(Means for Solving the Problems) A signal calibration device according to the present invention includes a normalization means, an arctangent calculation means, a peak value detection means, an amplitude/zero point calculation means, and a control means. be.
この発明においては、元信号を xo:go−CQSθ+Z0 x、=g1s5.ne +z。 In this invention, the original signal is xo:go-CQSθ+Z0 x,=g1s5. ne+z.
で近似するとき、振幅(go、 g+)およびゼロ点(
zo、 z+)に初期値を与え、振幅、ゼロ点の値を用
いて次式
%式%)
により cosθ、sinθの近似値を得て前記cos
θ。When approximated by , the amplitude (go, g+) and zero point (
Give initial values to zo, z+), use the amplitude and zero point values to obtain approximate values of cos θ and sin θ using the following formula (%), and calculate the above cos
θ.
sinθの近似値からθを得る。(以下θを一π〜十π
の範囲で表す)。Obtain θ from the approximate value of sin θ. (Hereinafter, θ is 1π to 11π
).
(実施例)
第1図はこの発明の一実施例の構成を示すブロック図で
ある。第1図において、1は正規化手段で、90”位相
の異なる2つの信号
Xo”go・C05o+Z。(Embodiment) FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. In FIG. 1, 1 is a normalization means, which generates two signals Xo''go・C05o+Z having a 90'' phase difference.
X+=g+°sinθ+z。X+=g+°sinθ+z.
を入力とし、振幅、ゼロ点の値を用いてCOSθ。As input, calculate COSθ using the amplitude and zero point values.
sinθの近似値を得るものである。2は逆正接演算手
段で、 COSθ、 sfnθからθを求めるもので
ある。3はピーク値検出手段で、
一δ≦θ≦δのときxoの最大値maxx。This is to obtain an approximate value of sin θ. Reference numeral 2 denotes an arctangent calculating means, which calculates θ from COSθ and sfnθ. 3 is a peak value detection means, which detects the maximum value maxx of xo when δ≦θ≦δ.
一一δ≦θ≦−十δのとき 2 2 X、の最大値maXX+ 一一一δ≦θ≦−−+δのとき 2 2 ×1の最小値ll1inx H π−δ≦θ≦π−δのとき x0の最小値m1nx。When 11δ≦θ≦−10δ 2 2 The maximum value of X, maXX+ 111 When δ≦θ≦−−+δ 2 2 ×1 minimum value ll1inx H When π−δ≦θ≦π−δ Minimum value m1nx of x0.
を求めるものである。4は振幅・ゼロ点演算手段で、ピ
ーク値検出手段3で求めた最大値、最小値からg。+g
l、ZO+Zlを求め更新するものである。5は前記各
部を制御する制御手段である。This is what we seek. 4 is an amplitude/zero point calculation means which calculates g from the maximum value and minimum value obtained by the peak value detection means 3. +g
l, ZO+Zl are calculated and updated. Reference numeral 5 denotes a control means for controlling each of the above-mentioned parts.
この発明の信号校正装置は、実用的にはマイクロプロセ
ッサを用いて構成される。入力信号X。。The signal calibration device of the present invention is practically constructed using a microprocessor. Input signal X. .
X、はそれぞれアナログディジタル変換されて、マイク
ロプロセッサに入力される。マイクロプロセッサはメモ
リ(普通はROM:リードオンリーメモリ)に書かれた
プログラムに従って正規化。X, are respectively converted into analog and digital signals and input to the microprocessor. The microprocessor normalizes according to a program written in memory (usually ROM: read-only memory).
逆正接演算、ピーク値検出、振幅・ゼロ点演算を繰り返
し実行する。Repeats arctangent calculation, peak value detection, amplitude/zero point calculation.
プログラムフローチャートの一例を第2図に示す。この
図で、 (1)〜 (16)は各ステップを示す。An example of a program flowchart is shown in FIG. In this figure, (1) to (16) indicate each step.
第3図はこの発明の原理を示すもので、コサイン、サイ
ン関数状である2つの信号X O+ X Iをそれぞれ
X座標、Y座標として直交座標上にプロツトした時の図
を示している。図では振幅の変動を強調して示している
。FIG. 3 shows the principle of the present invention, and shows two signals X O+X I having cosine and sine functions plotted on rectangular coordinates as X and Y coordinates, respectively. The figure emphasizes amplitude fluctuations.
第1図の実施例の動作を第2図、第3図を用いて説明す
る。The operation of the embodiment shown in FIG. 1 will be explained using FIGS. 2 and 3.
ます、正規化手段1において、zO+ Zlを用いて原
点・振幅補正を行ってsinθ、 cosθを求める
(1)〜(5)。これから逆正接演算手段2によりθを
求める (6)。この演算に際しては、単にサインとコ
サインの比を先に計算してアークタンジェントを求める
のではなく、サインとコサインの符号関係により=π〜
十πの範囲でθを求めることが必要である。このような
関数は、例えばC言語ではatan2として知られてい
る。求めたθが0.π/2.π、−π/2付近である時
の×。、×1の値から (7)〜(10)、図のように
maXX o、 m1nX o、maX)(、、m1n
x、を求める(11)〜(14)。最大値と最小値の差
の局が振幅g。、 g+となり、最大値と最小値の平均
値が新しいゼロ点Z。+ Zlとなる。平均値の計算は
最小値に振幅を加えてもよい。次回からの信号補正は新
しく求められた振幅、ゼロ点を用いて行えはよい。ゼロ
点が大幅にずれている場合には正しい振幅は求められな
い。しかしながら、このような場合もゼロ点の補正は正
しく行われるので、繰り返し補正を行うことで徐々に正
確な振幅が求められる。実際にはゼロ点の変動はごく僅
かであるため、常に正確な振幅か与えられる。θが0、
π/2.π、−π/2となることは滅多にないため、こ
れらの付近(±δの範囲)てmaXX。First, in the normalization means 1, the origin and amplitude are corrected using zO+Zl to obtain sin θ and cos θ (1) to (5). From this, θ is determined by the arctangent calculation means 2 (6). In this calculation, rather than simply calculating the ratio of sine and cosine first to find the arctangent, we use the sign relationship between sine and cosine to calculate =π~
It is necessary to find θ within the range of 1π. Such a function is known as atan2 in the C language, for example. The obtained θ is 0. π/2. π, × when it is around −π/2. From the values of , ×1, (7) to (10), as shown in the figure, maXX o, m1nX o, maX) (,, m1n
(11) to (14) to find x. The station of the difference between the maximum value and the minimum value is the amplitude g. , g+, and the average value of the maximum and minimum values is the new zero point Z. + Zl. The average value may be calculated by adding the amplitude to the minimum value. It is a good idea to perform signal correction from the next time using the newly obtained amplitude and zero point. If the zero point is significantly shifted, the correct amplitude cannot be determined. However, even in such a case, the zero point correction is performed correctly, so by repeatedly performing the correction, a more accurate amplitude can be obtained gradually. In reality, the fluctuation of the zero point is very small, so an accurate amplitude is always given. θ is 0,
π/2. π and -π/2 are rare, so maXX is around these (within the range of ±δ).
maXX H、m1nx O+ mi、nx Iの更新
を行う。δは1/IQ回転からl/1000回転の範囲
、好ましくは1150回転から1/200回転の範囲で
適宜選択する。δの範囲を大きくすると更新の行われる
頻度は増加するが誤差が増える。誤差は1150回転で
約08%、1/200回転て0.05%である。次に述
べるように、最大値、最小値の更新を単一の値を用いる
のてはなく、重み付き平均により行うことで実際の誤差
はさらに少なくなる。Update maXX H, m1nx O+ mi, and nx I. δ is appropriately selected in the range of 1/IQ rotation to 1/1000 rotation, preferably in the range of 1150 rotation to 1/200 rotation. Increasing the range of δ increases the frequency of updates, but increases the error. The error is about 08% at 1150 rotations and 0.05% at 1/200 rotations. As described below, the actual error can be further reduced by updating the maximum and minimum values using a weighted average rather than using a single value.
最大値、最小値の更新は指数平滑フィルタによって行う
のがよい。これは、実質的に過去に向かって指数関数的
に重み係数か減少する加重平均を求めることに相当する
。計算式は、元信号の値をX、更新すべき値をmとする
とき、式
%式%)
で与えられる。ここでpは小さな定数であり、この値を
2−″ とすることて乗算をシフト演算に置き換えるこ
とができる。ここで、nは4〜20程度で、更新の速度
と値の安全性の兼ね合から適宜選択すればよい。nの値
を小さくすると、補正は急速に行われるが、ノイズの影
響を受は易くなる。It is preferable to update the maximum and minimum values using an exponential smoothing filter. This essentially corresponds to finding a weighted average in which the weighting coefficient decreases exponentially toward the past. The calculation formula is given by the following formula, where the value of the original signal is X and the value to be updated is m. Here, p is a small constant, and by setting this value to 2-'', multiplication can be replaced with a shift operation.Here, n is about 4 to 20, which is a balance between update speed and value safety. If the value of n is small, the correction will be performed quickly, but it will be more susceptible to the influence of noise.
衝撃その他の原因で振幅が急激に変化することもあろう
。このような場合、もしθがある補正の行われる範囲で
停止していると、最大値か最小値の一方のみが補正され
てゼロ点がずれる。ゼロ点の誤差は一般に振幅の誤差よ
り害が大きいためこのような動作は好ましくない。これ
を避けるためには、最大値と最小値の一方を補正した後
は他方が補正されるまで補正を中断すればよい。マイク
ロプロセッサではメモリ中に補正フラグを設けることで
、この機能は容易に実現できる。The amplitude may change rapidly due to shock or other causes. In such a case, if θ is stopped within a certain correction range, only either the maximum value or the minimum value will be corrected and the zero point will shift. This operation is undesirable because zero point errors are generally more harmful than amplitude errors. In order to avoid this, after correcting either the maximum value or the minimum value, the correction may be interrupted until the other is corrected. In a microprocessor, this function can be easily realized by providing a correction flag in the memory.
(発明の効果〕
以上詳細に説明したように、この発明は正規化手段、逆
正接演算手段、ピーク値検出手段、振幅・ゼロ点演算手
段および制御手段とて信号校正装置を構成したので、計
測装置などにおいてしばしば用いられるコサイン、サイ
ン関数状の信号のゼロ点、振幅の変動が自動的に除去さ
れ、安価な部品を用い単純な構成の回路で誤差を低減す
ることが可能であり、また、精密な調整も不要であり精
度の高い計測装置を安価に構成することが可能となる。(Effects of the Invention) As explained in detail above, the present invention configures a signal calibration device with a normalization means, an arctangent calculation means, a peak value detection means, an amplitude/zero point calculation means, and a control means. The zero point and amplitude fluctuations of cosine and sine function signals often used in equipment are automatically removed, and errors can be reduced with a simple circuit using inexpensive components. Precise adjustment is not required, and a highly accurate measuring device can be constructed at low cost.
第1図はこの発明の一実施例の構成を示すブロック図、
第2図は、第1図の実施例の動作を説明するためのフロ
ーヂャート、第3図はこの発明の原理を示す図である。
図中、1は正規化手段、2は逆正接演算手段、3はピー
ク値検出手段、4は振幅・ゼロ点演算手段、5は制御手
段である。FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.
FIG. 2 is a flowchart for explaining the operation of the embodiment shown in FIG. 1, and FIG. 3 is a diagram showing the principle of the invention. In the figure, 1 is a normalization means, 2 is an arctangent calculation means, 3 is a peak value detection means, 4 is an amplitude/zero point calculation means, and 5 is a control means.
Claims (1)
れる信号もしくはθに相当する信号を得る装置であって
、 振幅、ゼロ点の値を用いて次式 cosθ=(x_0−z_0)/g_0、sinθ=(
x_1−z_1)/g_1によりcosθ、sinθの
近似値を得る正規化手段と、 前記cosθ、sinθの近似値からθを得る逆正接演
算手段と、 δを微小角度とするときθが−δ以上であり、かつ+δ
以下であるときx_0の値からx_0の最大値maxx
_0を求め、θがπ/2+δ以下であるとき、x_1の
値からx_1の最大値maxx_1を求め、θが−π/
2−δ以上であり、かつ−π/2+δ以下であるときx
_1の値からx_1の最小値minx_1を求め、θが
π−δ以上であるかまたは−π−δ以下であるとき、x
_0の値からx_0の最小値minx_0を求めるピー
ク値検出手段と、 これらの最大値、最小値から振幅およびゼロ点を次式 g_0=(maxx_0−minx_0)/2g_1=
(maxx_1−minx_1)/2z_0=minx
_0+g_0 z_1=minx_1+g_1 によりそれぞれ求め、更新する振幅・ゼロ点演算手段と
、 信号x_0、x_1が得られる毎に上記各手段の演算を
繰り返し行わせる制御手段と、 を備えたことを特徴とする信号校正装置。[Claims] A signal approximated to cos θ and sin θ or a signal corresponding to θ from two signals approximated by cosine and sine functions and having a 90° phase difference x_0=g_0・cosθ+z_0 x_1=g_1・sinθ+z_1 This is a device for obtaining the following equation cosθ=(x_0-z_0)/g_0, sinθ=((
normalizing means for obtaining approximate values of cos θ and sin θ by x_1−z_1)/g_1; arc tangent calculating means for obtaining θ from the approximate values of cos θ and sin θ; Yes, and +δ
If below, the maximum value maxx of x_0 from the value of x_0
Find _0, and when θ is less than or equal to π/2+δ, find the maximum value maxx_1 of x_1 from the value of x_1, and if θ is -π/
When x is greater than or equal to 2-δ and less than or equal to -π/2+δ
Find the minimum value minx_1 of x_1 from the value of _1, and when θ is greater than or equal to π-δ or less than or equal to -π-δ, x
Peak value detection means for determining the minimum value minx_0 of x_0 from the value of _0, and calculating the amplitude and zero point from these maximum and minimum values using the following formula g_0=(maxx_0-minx_0)/2g_1=
(maxx_1-minx_1)/2z_0=minx
Signal calibration characterized by comprising: amplitude/zero point calculation means for calculating and updating each of the signals x_0 and x_1 by _0+g_0 z_1=minx_1+g_1; and control means for repeatedly performing the calculations of each of the above-mentioned means every time the signals x_0 and x_1 are obtained. Device.
Priority Applications (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP20582389A JP2790862B2 (en) | 1989-08-10 | 1989-08-10 | Signal calibration device |
EP90308795A EP0412825B1 (en) | 1989-08-10 | 1990-08-09 | Signal compensator |
DE69030220T DE69030220T2 (en) | 1989-08-10 | 1990-08-09 | Signal compensator |
KR1019900012315A KR100193293B1 (en) | 1989-08-10 | 1990-08-10 | Signal correction device |
US08/230,554 US5581488A (en) | 1989-08-10 | 1994-04-20 | Apparatus and method for compensating for noise in signals |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP20582389A JP2790862B2 (en) | 1989-08-10 | 1989-08-10 | Signal calibration device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH0371016A true JPH0371016A (en) | 1991-03-26 |
JP2790862B2 JP2790862B2 (en) | 1998-08-27 |
Family
ID=16513296
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP20582389A Expired - Lifetime JP2790862B2 (en) | 1989-08-10 | 1989-08-10 | Signal calibration device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2790862B2 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005294847A (en) * | 2004-04-02 | 2005-10-20 | Tetsumei Cho | Light and series light |
JP2006194861A (en) * | 2004-12-16 | 2006-07-27 | Alps Electric Co Ltd | Compensation value calculation method of angle detection sensor, and angle detecting sensor using this |
JP2010032347A (en) * | 2008-07-29 | 2010-02-12 | Canon Inc | Detection apparatus |
CN108195939A (en) * | 2018-01-29 | 2018-06-22 | 吉林大学 | Monofilament degree of orientation measuring device and measuring method based on cross zero detecting method |
-
1989
- 1989-08-10 JP JP20582389A patent/JP2790862B2/en not_active Expired - Lifetime
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005294847A (en) * | 2004-04-02 | 2005-10-20 | Tetsumei Cho | Light and series light |
JP2006194861A (en) * | 2004-12-16 | 2006-07-27 | Alps Electric Co Ltd | Compensation value calculation method of angle detection sensor, and angle detecting sensor using this |
JP4689435B2 (en) * | 2004-12-16 | 2011-05-25 | アルプス電気株式会社 | Angle detection sensor |
JP2010032347A (en) * | 2008-07-29 | 2010-02-12 | Canon Inc | Detection apparatus |
CN108195939A (en) * | 2018-01-29 | 2018-06-22 | 吉林大学 | Monofilament degree of orientation measuring device and measuring method based on cross zero detecting method |
Also Published As
Publication number | Publication date |
---|---|
JP2790862B2 (en) | 1998-08-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6943544B2 (en) | Adjustment of a magneto-resistive angle sensor | |
US5165269A (en) | Electronic flux gate compass calibration technique | |
US4799385A (en) | Angular rate sensor with phase shift correction | |
US5463393A (en) | Method and apparatus for correcting errors in an amplitude encoded signal | |
US6534969B1 (en) | Offset-compensated angle measuring system | |
CA2041621A1 (en) | Method and apparatus for measuring a phase-modulated signal | |
EP0866309B1 (en) | Method for calibrating a vehicle compass system | |
AU2005255137B2 (en) | Method and arrangement for correcting an angle-measuring and/or distance-measuring sensor system | |
KR20080026395A (en) | Method and system of 2-axis compass calibration considering magnetic environment and method and system of measuring azimuth using it | |
JP2000131006A (en) | Relative straight line position measuring device | |
EP1579174A2 (en) | Method of calibrating bias drift with temperature for a vibrating structure gyroscope | |
CN114543843B (en) | Method for calibrating and correcting channel error of resonant gyroscope | |
CN106989762B (en) | Encoder | |
JPH0371016A (en) | Signal calibrating device | |
JP2013019829A (en) | Physical quantity detection device, and inspection method of physical quantity detection device | |
KR100193293B1 (en) | Signal correction device | |
US5828984A (en) | Data processing method for an electronic compass system | |
JPH0371017A (en) | Signal calibrating device | |
JP2839341B2 (en) | Calibration device for position signal | |
JP2000180170A (en) | Earth magnetism detecting device | |
JPH06138199A (en) | Guidance controller of flying object | |
JPH0462419A (en) | Azimuth detector | |
US11300428B2 (en) | Signal processing arrangement and signal processing method | |
SU1479889A2 (en) | Controlled phase shifter | |
JPH11344339A (en) | Electromagnetic compass |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080612 Year of fee payment: 10 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090612 Year of fee payment: 11 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100612 Year of fee payment: 12 |
|
EXPY | Cancellation because of completion of term | ||
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100612 Year of fee payment: 12 |