JP3042026B2 - Phase calculator - Google Patents

Phase calculator

Info

Publication number
JP3042026B2
JP3042026B2 JP3139866A JP13986691A JP3042026B2 JP 3042026 B2 JP3042026 B2 JP 3042026B2 JP 3139866 A JP3139866 A JP 3139866A JP 13986691 A JP13986691 A JP 13986691A JP 3042026 B2 JP3042026 B2 JP 3042026B2
Authority
JP
Japan
Prior art keywords
phase
value
unit
phase shift
calculating
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 - Fee Related
Application number
JP3139866A
Other languages
Japanese (ja)
Other versions
JPH04364477A (en
Inventor
賢治 丸山
好人 藤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Meidensha Corp
Original Assignee
Meidensha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Meidensha Corp filed Critical Meidensha Corp
Priority to JP3139866A priority Critical patent/JP3042026B2/en
Publication of JPH04364477A publication Critical patent/JPH04364477A/en
Application granted granted Critical
Publication of JP3042026B2 publication Critical patent/JP3042026B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Measuring Phase Differences (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は演算処理装置を用いて位
相を算出する位相算出装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a phase calculating apparatus for calculating a phase using an arithmetic processing unit.

【0002】[0002]

【従来の技術】例えばディジタルリレーにおいては、電
力系統より電流を検出し、一定の同期した周期にてその
電流信号をサンプリングしてマイクコンピュータに導
入し、所定のプログラムに基づいてSinθとCosθとを求
めた後に位相を算出することが行われている。
BACKGROUND OF THE INVENTION For example digital relay detects a current from the power system, is introduced into microcomputers by sampling the current signal at a fixed synchronous period, the Sinθ and Cosθ based on a predetermined program Is calculated after calculating the phase.

【0003】図3は従来の位相算出方式を示したもの
で、1は演算処理部で、ISinθとICosθの信号を導入
して演算部2でtanθを求める。変換部3では変換部
(ROM)4に蓄えられたtan-1 θ用のデータを参照し
ながら位相角に変換し、位相信号として出力する。
FIG. 3 shows a conventional phase calculation method. Reference numeral 1 denotes an arithmetic processing unit, and the arithmetic unit 2 obtains tan θ by introducing signals of ISinθ and ICosθ. The conversion unit 3 converts the phase angle into a phase angle while referring to the data for tan -1 θ stored in the conversion unit (ROM) 4 and outputs the converted signal as a phase signal.

【0004】[0004]

【発明が解決しようとする課題】図3で示す従来の方法
では、位相を求めるためにtan-1 θ用のデータを用意し
なければならない。このデータは通常ROM領域に置か
れるためプログラム容量が減少する。例えば、位相角の
刻みを0.1度とすると、データは90度分必要であ
り、且つ1データ2バイトであるので(90×10)×
2=1800バイト必要となる。これは、1命令を平均
3バイトとすると600命令分のデータが必要となり、
その分プログラム容量が減少する問題を有している。
In the conventional method shown in FIG. 3, data for tan -1 θ must be prepared in order to determine the phase. Since this data is usually stored in the ROM area, the program capacity is reduced. For example, assuming that the phase angle increment is 0.1 degree, the data requires 90 degrees and one data is 2 bytes, so (90 × 10) ×
2 = 1800 bytes are required. This means that if one instruction has an average of 3 bytes, data for 600 instructions is required.
There is a problem that the program capacity is reduced accordingly.

【0005】[0005]

【課題を解決するための手段】本発明は位相を求めるも
のにおいて、SinθとCosθの信号をもとに一定角度の移
相演算をする移相演算部と、求められた移相値に対応し
たオフセット値を決定するオフセット値決定部と、この
移相値を級数展開して移相値のアークサインを求める級
数展開部と、展開された数値各領域のオフセット値を
加算る加算部とを設けたものである。
According to the present invention, there is provided a phase calculating unit for calculating a phase at a constant angle based on Sin θ and Cos θ signals, and a phase shift value corresponding to the determined phase shift value. and an offset value determination unit that determines an offset value, the
A series for calculating the arc sine of a phase shift value by series expansion of the phase shift value
The number expanding section, is provided with a addition unit you adding the offset value of each area to a number deployed.

【0006】[0006]

【作用】移相演算部はSinθ,CosθからSinθを移相し
てSin(θ−)を求め、オフセット値決定部におい
て、Sin(θ−K)の値が0<Sin(θ−)<α(但し
α<1)とし、級数展開部および加算部において、Sin
-1θ=Sin-1(θ−)+Kを求めることによって位相
を算出する。
The phase shift operation section shifts Sinθ from Sinθ and Cosθ to obtain Sin (θ− K ). In the offset value determination section, the value of Sin (θ− K) is 0 <Sin (θ− K ). <Α (α <1), and Sin in the series expansion unit and the addition unit
The phase is calculated by calculating -1 θ = Sin −1 (θ− K ) + K.

【0007】[0007]

【実施例】図1は本発明の一実施例を示したものであ
る。同図において、10は演算処理部で、この処理部1
0には、絶対値に変換されたSinθとCosθの交流信号か
ら複数の異なる移相角のSin(θ−)を求める移相演
算部11と、各移相角に対応したオフセット値Kを決定
するオフセット値決定部12と、移相演算部11にて求
められたSin(θ−)をもとに級数展開する級数展開
部13と、この級数展開部によって得られた値にオフセ
ット値を加算する加算部14とを有している。20はSi
nθとCosθとを記憶する記憶部、30は交流信号を導入
するインタフェースである。
FIG. 1 shows an embodiment of the present invention. In FIG. 1, reference numeral 10 denotes an arithmetic processing unit.
0, the phase shift operation unit 11 for obtaining a plurality of different phase shift angles Sin (θ− K ) from the AC signals of Sin θ and Cos θ converted into absolute values, and the offset value K corresponding to each phase shift angle An offset value determining unit 12 to be determined, a series expanding unit 13 that expands a series based on Sin (θ− K ) obtained by the phase shift calculating unit 11, and an offset value is added to a value obtained by the series expanding unit. And an adding unit 14 for adding 20 is Si
A storage unit for storing nθ and Cosθ is an interface for introducing an AC signal.

【0008】以上のように構成された本発明において、
図2を用いてその動作を説明する。インタフェース30
に、例えば交流のアナログ信号が導入されたとすると、
このインタフェース30でディジタル信号に変換された
後、演算処理部10でSinθおよびCosθの演算がなされ
て記憶部20に一旦記憶される。移相演算部11は、ス
テップS1においてSinθとCosθを用い、且つ移相角
を60度と仮定して x=SinθCos60°−CosθSin60° を演算してSin(θ−60°)を求める。
In the present invention configured as described above,
The operation will be described with reference to FIG. Interface 30
If, for example, an AC analog signal is introduced,
After being converted into a digital signal by the interface 30, the arithmetic processing unit 10 calculates Sinθ and Cosθ and temporarily stores it in the storage unit 20. The phase shift calculator 11 uses Sin θ and Cos θ in step S1 and calculates the phase shift angle K
Assuming a 60 degrees by calculating x = SinθCo s 60 ° -CosθSin60 ° Request Sin (θ-60 °).

【0009】オフセット値決定部12は、ステップS2
において、S1で求められたxが0より大きいか否かを
判断し、大の場合にはS3でSin(θ−60°)におけ
るオフセット値Kを60に決定して記憶部に保存する。
[0009] The offset value determination unit 12 determines in step S2
Then, it is determined whether or not x obtained in S1 is greater than 0. If x is larger, the offset value K at Sin (θ−60 °) is determined to be 60 in S3 and stored in the storage unit.

【0010】S2でxが0より小の場合には、S4で再
度移相演算部11において移相演算する。この場合の移
相角は30度と仮定し、 x=SinθCos30°−CosθSin30° を演算する。オフセット値決定部12は、ステップS5
においてS4で求められたxが0より大きいか否かを判
断し、大の場合にはS6でオフセット値Kを30に決定
して記憶部に記憶する。また、xが0より小の場合には
ステップS7においてx=Sinθとしてオフセット値を
0とする。そしてステップS8で級数展開部13は、移
相演算部11において求められたx=Sin(θ−)但
は0°,30°,60°,30°間隔)を用いて
(0°≦θ≦30°),(30°<θ≦60°),(6
0°<θ≦90°)の領域に分けられた0°≦θ≦30
°の範囲で級数展開をし、Sin-1xを求める。ステップ
S9で加算部14は、30°<θ≦60°の範囲では3
0に、60°<θ≦90°の範囲では60に夫々領域毎
に決定されている各領域のオフセット値をSin-1xに加
算することによって位相を算出する。上記では、0°≦
θ≦90°の範囲について説明してきたが、360°ま
での範囲については下記手法にて容易に可能となる。す
なわち、級数展開部13におい て、sin -1 x= si
-1 x・180/π を演算し、ラジアンを度に変換して
sin -1 を求める。更に保存されているcosθとsi
nθのデータを用いて、 cosθ< 0の場合には、a
ns=180−ansを演算して90°<θ≦ 180°
の変換を行い、また、sinθ<0の場合にはans=
360−ansの演算を行うことによって240°≦θ
≦360°に変換する。これによって、 ans=36
0°−(180°−ans)=180+ansとなり、
これらの演算ステップを図2のS9以降に実施すること
によって180°<θ<240°の変換が可能となる。
If x is smaller than 0 in S2, the phase shift operation is again performed in the phase shift operation section 11 in S4. The phase angle in this case is assumed to 30 °, calculates the x = SinθCo s 30 ° -CosθSin30 ° . The offset value determination unit 12 determines in step S5
Then, it is determined whether or not x obtained in S4 is larger than 0, and if it is large, the offset value K is determined to be 30 in S6 and stored in the storage unit. If x is smaller than 0, the offset value is set to 0 in step S7 with x = Sinθ. Then, in step S8, the series expansion unit 13 calculates x = Sin (θ− K ) obtained in the phase shift operation unit 11, where K is a 30 ° interval of 0 °, 30 °, 60 °. (0 ° ≦ θ ≦ 30 °), (30 ° < θ ≦ 60 °), (6
0 ° <0 ° ≦ θ ≦ 30 divided into areas of θ ≦ 90 °)
Perform series expansion in the range of ° to find Sin -1 x. In step S9, the adding unit 14 sets 3 in the range of 30 ° < θ ≦ 60 °.
In the range of 60 ° < θ ≦ 90 °, the phase is calculated by adding the offset value of each area determined for each area to 60 to Sin −1 x. In the above, 0 ° ≦
The range of θ ≤ 90 ° has been described, but up to 360 °.
Can be easily achieved by the following method. You
Ie, Te series expansion unit 13 smell, sin -1 x = si
Calculate n -1 x · 180 / π, convert radians to degrees
Find sin -1 . Further stored cosθ and si
Using the data of nθ, if cosθ <0, a
ns = 180−ans is calculated and 90 ° <θ ≦ 180 °
, And when sinθ <0, ans =
By performing the operation of 360-ans, 240 ° ≦ θ
Convert to ≤360 °. This gives ans = 36
0 ° − (180 ° −ans) = 180 + ans,
Implement these calculation steps after S9 in FIG.
Thus, conversion of 180 ° <θ <240 ° becomes possible.

【0011】なお上記実施例においては、角度を30度
分割にしてオフセット値を決定しているが、この角度
は、例えば15度でもよく、その場合には実施例の倍で
ある6個のオフセット値決定のための演算が必要とな
る。級数展開部11は、
In the above embodiment, the offset value is determined by dividing the angle into 30 degrees. However, this angle may be, for example, 15 degrees, and in this case, six offsets, which are twice as large as those in the embodiment, are used. An operation for determining the value is required. The series expansion unit 11

【0012】[0012]

【数1】 (Equation 1)

【0013】(但し|x|≦)の演算を行うが、xが
0〜0.5程度であれば右辺3項までで充分近似でき
る。 すなわち、x=0.5のとき、 真値 0.523598…… 第3項までの近似 0.523177…… で、その誤差が0.025度となる。このため前述し
た3領域に分けて(1)式第3項までの演算でSin-1
を求めることで実用的には充分である。また、角度の分
割領域を30度より小さく(18度)し、第3項までの
近似でx=0.309の場合には誤差は更に小さくなり
約0.0007度となる。
(Where | x | ≦ 1 ) is performed, but if x is about 0 to 0.5, it can be sufficiently approximated by up to three terms on the right side. That is, when x = 0.5, the true value 0.5523598... Approx. 0.5523177... Up to the third term, and the error is about 0.025 degrees. For this reason, Sin -1 x
Is practically sufficient. Further, when the angle division area is smaller than 30 degrees (18 degrees) and the approximation up to the third term is x = 0.309, the error is further reduced to about 0.0007 degrees.

【0014】[0014]

【発明の効果】以上本発明によれば、Sinθを任意角度
に移相し、移相された領域に分けて或る範囲内で級数展
開してSin-1xを求め、更に各領域のオフセット値を加
算することによって比較的少ないプログラムによって位
相を算出するようにしたものであるから、従来のような
tan-1θ用のデータが不要となり、その分のROM領域
が確保できるものである。
As described above, according to the present invention, Sinθ is phase-shifted to an arbitrary angle, divided into phase-shifted regions, and series-expanded within a certain range to obtain Sin -1 x, and furthermore, the offset of each region Because the phase is calculated by a relatively small number of programs by adding the values,
This eliminates the need for tan -1 θ data, and can secure a ROM area for the data.

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

【図1】本発明の一実施例を示す構成図。FIG. 1 is a configuration diagram showing one embodiment of the present invention.

【図2】本発明を説明するための位相算出演算のフロー
チャート。
FIG. 2 is a flowchart of a phase calculation operation for explaining the present invention.

【図3】従来の位相出装置の構成図。FIG. 3 is a block diagram of a conventional phase calculated detection device.

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

10…演算処理部、11…移相演算部、12…オフセッ
ト値決定部、13…級数展開部、14…加算部。
10 arithmetic processing unit, 11 phase shift operation unit, 12 offset value determination unit, 13 series expansion unit, 14 addition unit.

フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G01R 25/00 Continuation of front page (58) Field surveyed (Int.Cl. 7 , DB name) G01R 25/00

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 SinθとCosθとの信号を導入して位相を
算出するものにおいて、前記SinθとCosθの信号と任意
位相角の値をもとに移相演算して移相値Sin(θ−
)を求める移相演算部と、この移相演算部によって求
められた値と所定比較値と比較し、比較条件成立時に前
記任意位相角時におけるオフセット値Kと判断するオフ
セット値決定部と、前記移相演算部とオフセット値決定
部とによって複数位相角に対応した移相値を求め、この
移相値を級数展開して移相値のアークサインを求める
数展開演算部と、この演算部によって求められた値に前
記各オフセット値を加算する加算部を備えたことを特徴
とする位相算出装置。
1. A method for calculating a phase by introducing signals of Sinθ and Cosθ, wherein a phase shift operation is performed based on the signals of Sinθ and Cosθ and a value K of an arbitrary phase angle to obtain a phase shift value Sin (θ −
K ), an offset value determining unit that compares the value calculated by the phase shift calculating unit with a predetermined comparison value, and determines the offset value K at the arbitrary phase angle when a comparison condition is satisfied; obtains a phase value corresponding to the plurality phase angle by said phase calculating section and an offset value determination section, the
A series for calculating the arc sine of a phase shift value by series expansion of the phase shift value
A phase calculation device comprising: a number expansion calculation unit; and an addition unit that adds each of the offset values to a value obtained by the calculation unit.
JP3139866A 1991-06-12 1991-06-12 Phase calculator Expired - Fee Related JP3042026B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3139866A JP3042026B2 (en) 1991-06-12 1991-06-12 Phase calculator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3139866A JP3042026B2 (en) 1991-06-12 1991-06-12 Phase calculator

Publications (2)

Publication Number Publication Date
JPH04364477A JPH04364477A (en) 1992-12-16
JP3042026B2 true JP3042026B2 (en) 2000-05-15

Family

ID=15255378

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3139866A Expired - Fee Related JP3042026B2 (en) 1991-06-12 1991-06-12 Phase calculator

Country Status (1)

Country Link
JP (1) JP3042026B2 (en)

Also Published As

Publication number Publication date
JPH04364477A (en) 1992-12-16

Similar Documents

Publication Publication Date Title
JP3367226B2 (en) Displacement detector
JPH0783964A (en) Method for estimating amplitude and frequency of sine-wave signal, method for obtaining display of signal characteristic and system for monitoring plurality of analog-signal states in electronic circuit
US6693404B2 (en) AC current detecting device for inverter apparatus and AC current detecting method therefor
JP3042026B2 (en) Phase calculator
JPS57108681A (en) Scanning converter
JP2009025068A (en) Resolver/digital conversion method, and resolver/digital conversion circuit
JP4294114B2 (en) Digital FM detection circuit
JP2007132909A (en) Signal processor
JPH0863604A (en) Image processor and its method
JP2508036B2 (en) Digital Directional Ground Fault Relay
JP2001082981A (en) Apparatus and method for processing signal of resolver
JPH01262415A (en) Resolver angle detecting device
JPH0426066B2 (en)
JP2972798B2 (en) Maximum sine waveform signal amplitude calculation method
JP3609320B2 (en) Angle demodulator, demodulation characteristic correction apparatus, and recording medium
JP3358102B2 (en) Image composition method
JPH09236648A (en) Direction finder
JP2949295B2 (en) Phase detector
JPH0641178Y2 (en) Scale conversion device
JPS6140332B2 (en)
JPH07110349A (en) Measuring device for phase angle
JP2659463B2 (en) Time axis error detection circuit of time axis correction device
JPH0220154A (en) Multi-phase phase detecting circuit
JP2830152B2 (en) Phase difference control circuit
JPH09321625A (en) Analog integrator of digital system

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees