JPH05107280A - Sampling type measuring apparatus - Google Patents

Sampling type measuring apparatus

Info

Publication number
JPH05107280A
JPH05107280A JP27124391A JP27124391A JPH05107280A JP H05107280 A JPH05107280 A JP H05107280A JP 27124391 A JP27124391 A JP 27124391A JP 27124391 A JP27124391 A JP 27124391A JP H05107280 A JPH05107280 A JP H05107280A
Authority
JP
Japan
Prior art keywords
value
calculating means
average
sampling
slope
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.)
Pending
Application number
JP27124391A
Other languages
Japanese (ja)
Inventor
Yukio Kashiwabara
幸男 柏原
Kentaro Hazama
健太郎 間
Katsuya Tachibana
勝也 橘
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric 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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP27124391A priority Critical patent/JPH05107280A/en
Publication of JPH05107280A publication Critical patent/JPH05107280A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measurement Of Current Or Voltage (AREA)

Abstract

PURPOSE:To obtain a sampling type measuring apparatus which achieves a reduction in time until a mean is obtained in a measuring apparatus which calculates the mean using an exponentialized mean computation. CONSTITUTION:An inclination calculating means 16 latches initial output data {P (0), P (1),...} of an arithmetic means 12 in plurality to obtain the slope A at the rising of the output data, a stable value calculating means 18 sets a time constant T of a waveform of the output data to obtain a stable value P (M) of the output data by computation of P (M)=A.T and slope calculating means 16 adds an exponentialized mean computation as given by the formula below to an instantaneous value b (n) introduced to output an initial output data to the slope calculating means 16. As a result, the stable value P (M) obtained from the stable value calculating means 18 is introduced and a computation means 12 is provided to perform the computation of the following formula continuously with P(n-1)=P (M). The formula is P (n)=P (n-1)+(1/G).{b (n)-P (n-1)}.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、サンプリング式測定器
に関する。更に詳述するとサンプリングして得られた値
に指数化平均演算を加えてその平均値を得る測定器に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sampling type measuring instrument. More specifically, the present invention relates to a measuring instrument that obtains the average value by adding exponential average calculation to the value obtained by sampling.

【0002】[0002]

【従来の技術】サンプリング式測定器として、電力計を
例に上げて説明を行う。アナログ信号をデジタル信号へ
変換するアナログ/デジタル変換器(以下、AD変換器と
記す)を用いて、入力電圧波形及び入力電流波形をデジ
タルサンプリングし、これに乗算を加えて有効電力を求
めるサンプリング式の電力計がある。従来のサンプリン
グ式電力計では、入力波形の1周期の整数倍と、サンプ
リング周期の整数倍とが一致しない場合に、測定電力値
に誤差が生じていた。誤差が生じる理由を図面で説明す
る。従来のサンプリング式電力計では、有効電力W(つ
まり瞬時電力 Vn・Inの平均値)は、(1) 式で示すよう
な算術平均を行うことで得ていた。 W= (1/N)・Σ Vn ・In (1) Vn:入力電圧のサンプリング値 In:入力電流のサンプリング値 N:サンプル数 Σ:n=1〜Nまでの加算和
2. Description of the Related Art A power meter will be described as an example of a sampling type measuring instrument. A sampling formula that digitally samples the input voltage waveform and the input current waveform using an analog / digital converter (hereinafter referred to as AD converter) that converts an analog signal into a digital signal, and adds the result to this to obtain active power. There is a power meter. In the conventional sampling type power meter, when the integral multiple of one cycle of the input waveform and the integral multiple of the sampling cycle do not match, an error occurs in the measured power value. The reason why an error occurs will be described with reference to the drawings. In the conventional sampling power meter, the active power W (that is, the average value of the instantaneous power Vn · In) is obtained by performing the arithmetic average as shown in the equation (1). W = (1 / N) ・ Σ Vn ・ In (1) Vn: Input voltage sampling value In: Input current sampling value N: Number of samples Σ: Sum of additions from n = 1 to N

【0003】ここで図6に示す波形のように、入力波形
の1周期Tinがサンプリング周期T ADの整数倍でない場
合、即ち、 n1・Tin≠n2・TAD n1=1,2,3,… n2=3,4,5,… ただし、n2≧2・n1+1の関係がある。この関係は、入
力波形の同一の位相位置をサンプリングし続けるのを防
ぐ意味である。の場合、図6のような端数TYが生じる。
このように端数TYが生じると、上式に示す有効電力Wに
誤差を与えてしまう。
Here, as shown in FIG. 6, the input waveform
1 cycle TinIs the sampling period T ADIf not an integer multiple of
That is, n1 · Tin≠ n2 · TAD n1 = 1, 2, 3, ... N2 = 3, 4, 5, ... However, there is a relationship of n2 ≧ 2 · n1 + 1. This relationship is
Prevents continued sampling of the same phase position of the force waveform
Meaning In the case of, the fraction TY as shown in FIG. 6 occurs.
When the fraction TY is generated in this way, the active power W shown in the above equation becomes
It gives an error.

【0004】そこで上記端数TYの影響を小さくしようと
すると、測定器自身の構成が複雑・高価となったり、測
定時間が長くかかったりする問題が発生していた。この
ようなことから本出願人は、指数化平均演算を行うこと
で、サンプリング値(瞬時値)の平均値を速やかに算出
できる特願平02-222100号「サンプリング式電力計」
(平成2年8月23日),特願平02-224915 号「平均値整
流形測定装置」(平成2年8月27日)等の出願(これら
出願を以下先願と記す)を行った。これら指数化平均演
算方式を用いる先願の測定器は、瞬時値b(n)を導入し
(2)式に示す所謂指数化平均演算を行うことで、瞬時値b
(n)の平均値を算出するものである。その指数化平均結
果の推移をアナログ的に表現すると、図2(4) (ロ)と
なる。このような指数化平均演算を行う演算器は、例え
ば演算部とメモリを備えている。演算部は、瞬時データ
b(n)が加えられる毎に、(2) 式の演算を繰り返す。
Therefore, if it is attempted to reduce the influence of the fraction TY, there arises a problem that the structure of the measuring instrument itself becomes complicated and expensive, and the measuring time is long. Therefore, the applicant of the present invention is able to quickly calculate the average value of sampling values (instantaneous values) by performing indexed average calculation.
(August 23, 1990), Japanese Patent Application No. 02-224915 “Average value rectification type measuring device” (August 27, 1990), etc. (these applications are referred to as prior applications) .. The measuring instrument of the prior application that uses these indexed average calculation methods introduces an instantaneous value b (n).
By performing the so-called exponential averaging shown in equation (2), the instantaneous value b
The average value of (n) is calculated. The transition of the indexed average result is expressed in analog form as shown in Fig. 2 (4) (b). A computing unit that performs such indexed average computation includes, for example, a computing unit and a memory. The calculation section uses instantaneous data
Every time b (n) is added, the calculation of equation (2) is repeated.

【0005】即ち、今回サンプリングしたサンプリング
回数n番目の瞬時値b(n)と、前回のサンプリング回数(n
-1) までの平均演算結果P(n-1)との差を取り出し、この
差、つまり{b(n)-P(n-1)} を定数1/G 倍する。ここで、
1/G << 1であるから、(1/G)・{b(n)-P(n-1)} は、前回
までの平均演算結果P(n-1)と、今回のサンプリング値b
(n)の“差を薄めたもの”である。そして、この“差を
薄めたもの”を前回の平均演算結果P(n-1)に加算して今
回のサンプリング回数nまでの平均演算結果データP(n)
を得ているので、この演算を多数回繰り返すと、(2) 式
のP(n)は、b(n)の波形の平均値になることを意味してい
る。 P(n)=P(n-1)+ (1/G)・{b(n)-P(n-1)} (2) P(n):サンプリング回数nまでに処理された指数化平均
結果 P(n-1):サンプリング回数(n-1) までに処理された指数
化平均結果 b(n):サンプリング回数n番目における被測定信号の瞬
時値 1/G :定数(なお、1/G << 1) このような指数化平均演算によれば、入力波形の1周期
の整数倍と、サンプリング周期の整数倍とを一致させる
必要がなく、従来例と比較して速やかに平均値を得るこ
とができる。
That is, the instantaneous value b (n) of the nth sampling number of the current sampling and the previous sampling number (n
The difference from the average calculation result P (n-1) up to -1) is taken out, and this difference, that is, {b (n) -P (n-1)} is multiplied by a constant 1 / G. here,
Since 1 / G << 1, (1 / G) · {b (n) -P (n-1)} is the average calculation result P (n-1) up to the previous time and this sampling value b
It is the "narrowed difference" of (n). Then, this "thinned difference" is added to the previous average calculation result P (n-1), and the average calculation result data P (n) up to the current sampling number n
Therefore, if this calculation is repeated many times, it means that P (n) in the equation (2) becomes the average value of the waveform of b (n). P (n) = P (n-1) + (1 / G) ・ {b (n) -P (n-1)} (2) P (n): Exponential average processed up to the sampling count n Result P (n-1): Result of exponential averaging processed up to sampling number (n-1) b (n): Instantaneous value of the measured signal at the nth sampling number 1 / G: Constant (1 / G << 1) According to such exponential averaging, it is not necessary to match the integral multiple of one cycle of the input waveform with the integral multiple of the sampling cycle, and the average value can be calculated more quickly than the conventional example. Obtainable.

【0006】[0006]

【発明が解決しようとする課題】しかし、これら先願に
係わるサンプリング式測定器については、その応答性を
更に速める余地があった。この点を図2を参照して説明
する。図2(4) は測定対象の波形の平均値がステップ状
に変化した場合、指数化平均演算結果の推移を示す波形
である。先願では、(2) 式において、指数化平均を初期
値P(0)=0から始めている。このように動作すると、瞬
時値(瞬時電力)の平均値P(M)が得られるまで一定の応
答時間tkがかかる。図2(4) (ロ)では僅かなサンプル
数(演算回数)で、指数化平均出力が一定になるように
示したが、実際の動作は、通常1000回程の演算回数を経
て一定になる。この応答時間を短くするため定数(1/G)
の値を大きくすると、応答は速くなるが、低い周波数の
電力を測定する場合、指数化平均後の出力にリプルを含
み、測定値がふらつく問題がある。
However, there is a room for further increasing the responsiveness of the sampling type measuring instruments according to these prior applications. This point will be described with reference to FIG. FIG. 2 (4) is a waveform showing the transition of the indexed average calculation result when the average value of the waveform to be measured changes stepwise. In the prior application, the indexed average is started from the initial value P (0) = 0 in the equation (2). When operated in this way, it takes a certain response time tk until the average value P (M) of the instantaneous values (instantaneous power) is obtained. In FIG. 2 (4) (b), the indexed average output is shown to be constant with a small number of samples (number of calculations), but the actual operation is usually constant after about 1000 calculations. Constant (1 / G) to shorten this response time
The larger the value of, the faster the response, but when measuring low frequency power, the output after exponential averaging contains ripples and there is a problem that the measured value fluctuates.

【0007】本発明の目的は、指数化平均演算を用いて
サンプリングした波形の平均値を算出する測定器におい
て、その平均値を得るまでの時間を短縮したサンプリン
グ式測定器を提供することである。
An object of the present invention is to provide a measuring instrument for calculating an average value of a waveform sampled by using an exponential averaging operation, and a sampling type measuring instrument which shortens the time until the average value is obtained. ..

【0008】[0008]

【課題を解決するための手段】本発明は、アナログ入力
信号を周期tsでサンプリングしてこれに各種演算を加
え、この結果得られる瞬時値b(n)の平均値を得て、アナ
ログ入力信号を測定する装置において、下記演算手段(1
2)の初期の出力データ{P(0),P(1), …} を複数個取り込
み、この出力データの立ち上がり時の傾斜Aを得る傾斜
算出手段と、前記出力データの波形の時定数Tが設定さ
れ、この出力データの安定値P(M)をP(M)=A・Tの演算
より得る安定値算出手段と、導入した瞬時値b(n)へ、下
式に示す指数化平均演算を加えて、前記初期の出力デー
タを傾斜算出手段に出力し、その結果、前記安定値算出
手段から得られる安定値P(M)を導入し、P(n-1)=P(M)と
して、下式の演算を継続して行う演算手段(12)と、を備
えるようにしたものである。 P(n)=P(n-1)+ (1/G)・{b(n)-P(n-1)} P(n):サンプリング回数nまでに処理された指数化平均
結果 P(n-1):サンプリング回数(n-1) までに処理された指数
化平均結果 b(n):サンプリング回数n番目における瞬時値 1/G :定数(なお、1/G << 1)
According to the present invention, an analog input signal is sampled at a period ts, various calculations are performed on the sampled analog signal, and an average value of instantaneous values b (n) obtained as a result is obtained. In the device for measuring
2) Initial output data {P (0), P (1), ...} Is taken in a plurality of times to obtain a slope A at the time of rising of the output data, and a time constant T of the waveform of the output data. Is set, the stable value P (M) of this output data is obtained by the calculation of P (M) = A · T, and the introduced instantaneous value b (n) is converted into the exponential average shown in the following formula. By adding a calculation, the initial output data is output to the slope calculating means, and as a result, the stable value P (M) obtained from the stable value calculating means is introduced, and P (n-1) = P (M) The calculation means (12) for continuously performing the calculation of the following equation is provided. P (n) = P (n-1) + (1 / G) * {b (n) -P (n-1)} P (n): Exponential averaged result P (processed up to the sampling count n n-1): Exponential average result processed up to the sampling count (n-1) b (n): Instantaneous value at the nth sampling count 1 / G: Constant (1 / G << 1)

【0009】[0009]

【作用】アナログ入力信号の平均値がステップ状に変化
すると、指数化平均演算を行う演算手段(12)の出力デー
タP(n)は、指数関数的に変化してやがて平均値P(M)にて
安定する。一般に指数関数的に変化する応答波形の安定
値P(M)は、P(M)=A・Tで求められる。ここで、Tは、
応答波形の時定数、Aは、応答波形の接線の傾きであ
る。傾斜算出手段は、演算手段から出力される応答波形
P(n)の幾つかのデータを基にして、応答波形の傾斜Aを
得る。例えば、指数化平均演算の初期値をP(0)、最初の
サンプリングに基づく指数化平均結果をP(1)、サンプリ
ング周期をtsとすれば、A={P(1) −P(0)} /tsであ
る。従って、この傾斜Aの値は、サンプル数が僅かな時
点で知ることができる。一方、(2) 式の関数における時
定数Tは、T=ts・G で表される(Gは(2)式に示さ
れているGのことである)。ここで、Gの値、及びサン
プル周期tsは、予めサンプリング測定器の設計段階で決
定される定数であるので、時定数Tの値は既知である。
安定値算出手段は、この既知の時定数Tと、前記傾斜A
を用いて、応答波形の安定値P(M)を、P(M)=A・Tで求
める。この様に安定値算出手段18で得られた安定値P(M)
は、原理的には、演算手段12から出力される応答波形の
安定値であるが、しかし、僅かのサンプル数から算出し
た値であるため、真の安定値とは、通常、誤差が存在す
る。そこで本発明では、安定値算出手段18で算出された
安定値P(M)を初期値{(2)式で示す P(n-1)=P(M)}と
して、再び指数化平均演算を行っている。従って、算出
された安定値P(M)を初期値とした(2) 式の指数化平均演
算値P(n)は、直ちに真の安定値Pに近い値となるので、
その後の指数化平均演算は、僅かな演算回数を繰り返す
ことで、真の安定値に極めて近い値となる。従って、先
願より迅速に平均値を得ることができる。
[Function] When the average value of the analog input signal changes stepwise, the output data P (n) of the calculating means (12) for performing exponential averaging changes exponentially and eventually the average value P (M). Stabilizes at. In general, the stable value P (M) of the response waveform that changes exponentially is obtained by P (M) = AT. Where T is
The time constant of the response waveform, A is the slope of the tangent line of the response waveform. The slope calculating means is a response waveform output from the calculating means.
Based on some data of P (n), the slope A of the response waveform is obtained. For example, if the initial value of the exponential averaging operation is P (0), the exponential averaging result based on the first sampling is P (1), and the sampling period is ts, A = {P (1) −P (0) } / Ts. Therefore, the value of the slope A can be known when the number of samples is small. On the other hand, the time constant T in the function of the equation (2) is represented by T = ts · G (G is G shown in the equation (2)). Here, the value of G and the sampling period ts are constants determined in advance at the design stage of the sampling measuring instrument, and therefore the value of the time constant T is known.
The stable value calculating means uses the known time constant T and the slope A
Using, the stable value P (M) of the response waveform is calculated by P (M) = AT. Thus, the stable value P (M) obtained by the stable value calculating means 18
Is a stable value of the response waveform output from the calculating means 12 in principle, but since it is a value calculated from a small number of samples, there is usually an error with the true stable value. .. Therefore, in the present invention, the stable value P (M) calculated by the stable value calculating means 18 is set as the initial value {P (n-1) = P (M)} shown in the equation (2), and the indexed average calculation is performed again. Is going. Therefore, the exponential average calculation value P (n) of the equation (2) with the calculated stable value P (M) as the initial value immediately becomes a value close to the true stable value P.
Subsequent indexed average calculation becomes a value that is extremely close to the true stable value by repeating a small number of calculations. Therefore, the average value can be obtained more quickly than in the previous application.

【0010】[0010]

【実施例】図1は本発明を適用したサンプリング式電力
計の構成例を示す図、図2は図1装置の各部の波形を示
すタイムチャート、図3は指数化平均演算結果の応答曲
線と接線との関係を示す図、図4は図3の部分拡大図、
図5は繰返し動作を示す図、図6は従来の問題を説明す
る図、図7と図8は本発明を適用した別の構成例を示す
図である。
1 is a diagram showing a configuration example of a sampling type power meter to which the present invention is applied, FIG. 2 is a time chart showing waveforms of respective parts of the apparatus of FIG. 1, and FIG. 3 is a response curve of an exponential average calculation result. FIG. 4 is a diagram showing a relationship with a tangent line, FIG. 4 is a partially enlarged view of FIG. 3,
FIG. 5 is a diagram showing a repetitive operation, FIG. 6 is a diagram for explaining a conventional problem, and FIGS. 7 and 8 are diagrams showing another configuration example to which the present invention is applied.

【0011】図1において、1,2はサンプルホールド
回路(以下、単にS/H 回路と言う)であり、S/H 回路1
は電圧波形Vを、S/H 回路2は電流波形iを同一時刻に
取り込む動作を行う。即ち、S/H 回路1,2には図示し
ない同一のクロック信号が加えられる。図2(1) ,(2)
は、図1装置の端子P1,P2に加えられる電圧波形と電流
波形を示し、図2におけるV(1),V(2),…、i(1),i(2),…
は、サンプル値を示している。3,4はアナログ信号を
デジタル信号へ変換するAD変換器(以下、単にADC と言
う)であり、S/H 回路1,2から取り込んだアナログ信
号V(1),V(2),…、i(1),i(2),…を次々とデジタル信号へ
変換する。n番目のサンプルデータをV(n),i(n)と記
す。11は掛算器であり、同一時刻にサンプリングしたAD
C 3の出力V(n)と、ADC 4の出力i(n)を導入し、この2
つのデータの掛算 b(n) =V(n)・i(n)を行うものであ
る。この掛算値b(n)は、n番目のサンプリング時におけ
る瞬時電力値を示す。このように掛算器11で得られる瞬
時電力の波形を図2(3) に示す。有効電力は、図2(3)
に示す瞬時電力波形の平均値である。
In FIG. 1, reference numerals 1 and 2 denote sample and hold circuits (hereinafter simply referred to as S / H circuits), which are S / H circuits 1
Represents the voltage waveform V and the S / H circuit 2 acquires the current waveform i at the same time. That is, the same clock signal (not shown) is applied to the S / H circuits 1 and 2. Figure 2 (1), (2)
Shows a voltage waveform and a current waveform applied to the terminals P1 and P2 of the device in FIG. 1, and V (1), V (2), ..., i (1), i (2) ,.
Indicates sample values. Reference numerals 3 and 4 denote AD converters (hereinafter simply referred to as ADCs) for converting analog signals into digital signals, and analog signals V (1), V (2), ... i (1), i (2), ... Are converted to digital signals one after another. The nth sample data will be referred to as V (n) and i (n). 11 is a multiplier, AD sampled at the same time
Introducing the output V (n) of C 3 and the output i (n) of ADC 4,
The multiplication of two data b (n) = V (n) · i (n) is performed. The multiplication value b (n) indicates the instantaneous power value at the nth sampling. The waveform of the instantaneous power obtained by the multiplier 11 is shown in Fig. 2 (3). Active power is shown in Fig. 2 (3).
It is the average value of the instantaneous power waveform shown in.

【0012】図1の装置は、この瞬時電力波形の平均値
を演算手段12と、メモリ14と、傾斜検出手段16と、安定
値算出手段18と、CPU 20とにより求めている。演算手段
12とメモリ14とで、(2) 式の演算を行うが、その動作は
既述した。ただし、先願における演算手段12は、(2) 式
の演算を例えば1000回にわたり繰り返すことで、瞬時電
力波形の平均値を得ていたが、本発明では例えば50回程
行うことで、瞬時電力波形の平均値P(M)を得ることがで
きる。以下その理由は明らかになる。16は傾斜算出手段
であり、メモリ14を介して演算手段12の初期の出力デー
タP(0),P(1) を取り込み、この出力データの立ち上がり
傾斜Aを得るものである。例えば、S/H 回路1,2にお
けるサンプリング周期をts、演算手段12における指数化
平均演算の初期値をP(0)、最初のサンプリングに基づく
指数化平均結果をP(1)、とすれば、傾斜算出手段16は、
A={P(1) −P(0)} /ts の演算を行うことで、指数化
平均曲線の立ち上がり傾斜Aを算出する。従って、この
傾斜Aの値は、サンプル数が僅かな時点で知ることがで
きる。18は安定値算出手段であり、掛算機能を有してい
る。そして、CPU 20から演算手段12が出力する指数化平
均曲線波形の時定数Tを導入し、また、傾斜算出手段16
からこの波形の傾斜Aを導入し、導入した2つの信号か
ら、指数化平均曲線(図2(4) の曲線)の安定値P(M)を
P(M)=A・Tの演算より得るものである。ただし、この
ように算出された安定値P(M)は、僅かなデータから算出
した傾斜Aに基づいて算出したものであるため、通常、
真の安定値Pと誤差がある。そこで本発明は、この算出
された安定値P(M)を、演算手段12に送出し、演算手段12
にて、(n-1) 番目のデータP(n-1)を、P(n-1)=P(M)とし
て、n番目を、 P(n)=P(M)+(1/G) ・{b(n)-P(M)} (3) として、以降の指数化演算を行う。つまり、算出された
安定値P(M)は、真の安定値Pに近似した値であるため、
その後、指数化平均演算を僅かに繰り返すことで、真の
安定値とほぼ等しい平均値に到達することができる。CP
U 20は、安定値算出手段18へ時定数Tを出力し、また
(3) 式の演算を所定の回数繰り返した後の指数化平均演
算結果P(n)を演算手段12から導入し、これに基づいて有
効電力を表示器21に表示させるものである。
In the apparatus of FIG. 1, the average value of the instantaneous power waveform is calculated by the calculating means 12, the memory 14, the slope detecting means 16, the stable value calculating means 18, and the CPU 20. Computing means
The operation of the equation (2) is performed by the memory 12 and the memory 14, and the operation is already described. However, the calculation means 12 in the prior application obtained the average value of the instantaneous power waveform by repeating the calculation of the formula (2) 1000 times, for example, but in the present invention, by performing the calculation about 50 times, the instantaneous power waveform The average value P (M) of can be obtained. The reason will be clarified below. Reference numeral 16 denotes a slope calculating means, which takes in the initial output data P (0), P (1) of the calculating means 12 via the memory 14 and obtains the rising slope A of this output data. For example, if the sampling period in the S / H circuits 1 and 2 is ts, the initial value of the exponential averaging operation in the arithmetic means 12 is P (0), and the exponential averaging result based on the first sampling is P (1). The inclination calculating means 16
By calculating A = {P (1) -P (0)} / ts, the rising slope A of the indexed average curve is calculated. Therefore, the value of the slope A can be known when the number of samples is small. Reference numeral 18 is a stable value calculating means, which has a multiplication function. Then, the CPU 20 introduces the time constant T of the exponential average curve waveform output by the calculating means 12, and the slope calculating means 16
Then, the slope A of this waveform is introduced, and the stable value P (M) of the indexed average curve (curve in Fig. 2 (4)) is calculated from the two introduced signals.
It is obtained by the calculation of P (M) = A · T. However, since the stable value P (M) calculated in this way is calculated based on the slope A calculated from a small amount of data,
There is an error with the true stable value P. Therefore, according to the present invention, the calculated stable value P (M) is sent to the calculating means 12 and the calculating means 12
, The (n-1) th data P (n-1) is set to P (n-1) = P (M), and the nth is P (n) = P (M) + (1 / G ) ・ As {b (n) -P (M)} (3), perform the following indexing operation. That is, the calculated stable value P (M) is a value approximate to the true stable value P,
Then, by slightly repeating the indexed average calculation, it is possible to reach an average value that is substantially equal to the true stable value. CP
U 20 outputs the time constant T to the stable value calculating means 18, and
The calculation means 12 introduces the indexed average calculation result P (n) after the calculation of the formula (3) is repeated a predetermined number of times, and based on this, the active power is displayed on the display 21.

【0013】以上のような図1装置において、僅かな指
数化演算回数により、真の平均値Pに近い値が、僅かな
指数化平均演算回数で得られる動作を図3〜図5を参照
して説明する。
In the apparatus of FIG. 1 as described above, an operation in which a value close to the true average value P is obtained with a small number of indexing arithmetic operations by a small number of indexing arithmetic operations will be described with reference to FIGS. Explain.

【0014】まず、指数化平均曲線の時定数Tについて
説明する。(2) 式において、サンプリング回数nを時間
tに置き換えて(2) 式を変形すると指数化平均演算結果
P(t)は、(4) 式に近似することができる。 P(t)=1−e-(t/T) (4) つまり、図3に示す指数化平均曲線は、(4) 式の関数で
表される。
First, the time constant T of the indexed average curve will be described. In equation (2), if the number of sampling times n is replaced with time t and equation (2) is modified, the exponential average calculation result is obtained.
P (t) can be approximated by equation (4). P (t) = 1-e- (t / T) (4) That is, the indexed average curve shown in FIG. 3 is expressed by the function of the equation (4).

【0015】図3は、アナログ入力信号(ここでは有効
電力)の平均値u(M)が、時刻0において、ステップ状に
u(0)→u(M)へ変化した場合の、指数化平均演算結果の応
答曲線を示した図である。図3の曲線(ロ)において、
P(0)は(2) 式の初期値、P(1)は1回目のサンプリングに
基づく指数化平均演算結果であるから、立ち上がりの接
線の傾きAは、 A={P(1)-P(0)} /ts =(1/G) ・u(M)/ts =(1/G) ・P(M)/ts (5) である(ts:サンプル周期)。なお、指数化平均演算結
果の平均値はP(M)であり、結局は、P(M)=u(M) であ
る。
FIG. 3 shows that the average value u (M) of the analog input signal (active power in this case) is stepwise at time 0.
FIG. 6 is a diagram showing a response curve of an exponential average calculation result when u (0) → u (M) is changed. In the curve (b) of FIG. 3,
Since P (0) is the initial value of Eq. (2) and P (1) is the result of exponential averaging based on the first sampling, the slope A of the rising tangent is A = {P (1) -P (0)} / ts = (1 / G) -u (M) / ts = (1 / G) -P (M) / ts (5) (ts: sample period). The average value of the indexed average calculation results is P (M), and eventually P (M) = u (M).

【0016】指数化平均演算は、(4) 式のように一次特
性曲線に近似することができるので、時定数Tは、次式
で表される。 T=−ts/log(1-1/G) (6) ここで安定値=(傾きA)・(時定数T) で求める
と、(7) 式で示す誤差Eが存在する。 E=1−AT =1+1/{ G・log(1-1/G)} (7) しかし、本願の装置では G>>1なので、誤差E=0
となり、 P(M)=A・T (8) となる。従って、(5) 式と(8) 式より、(4) 式の関数に
おける時定数Tは、 T=ts・G と表される。そして、Gの値、及びサンプル周期tsは、
予めサンプリング測定器の設計段階で決定される定数で
あるので、時定数Tの値は既知である。従って、CPU 20
には、この時定数Tの値が予め設定されており、このT
を安定値算出手段18へ出力している。
Since the exponential averaging operation can be approximated to the linear characteristic curve as in the equation (4), the time constant T is represented by the following equation. T = -ts / log (1-1 / G) (6) Here, when the stable value = (slope A) · (time constant T) is obtained, the error E shown in the equation (7) exists. E = 1−AT = 1 + 1 / {G · log (1-1 / G)} (7) However, in the device of the present application, G >> 1, so the error E = 0
And P (M) = AT (8). Therefore, from equations (5) and (8), the time constant T in the function of equation (4) is expressed as T = ts · G. Then, the value of G and the sampling period ts are
The value of the time constant T is known because it is a constant that is determined in advance at the design stage of the sampling measuring device. Therefore, CPU 20
, The value of this time constant T is set in advance.
Is output to the stable value calculating means 18.

【0017】次に接線の傾斜Aについて説明する。つま
り、理論的には、最初のサンプリングにより演算手段12
が指数化平均結果P(1)を算出した時点で、(5) 式により
傾斜算出手段16は傾斜Aを直ちに算出することができ
る。しかし、実際の状態では、たった1回のサンプリン
グ動作により得られた指数化平均結果から、この傾斜A
を正確に割り出すことはできない。その主な理由は、次
の通りである。演算手段12へ加えられる信号b(n)は、一
般に図2(3) に示す如く、変動する値である。従って、
(2) 式の演算を行って得られる指数化平均波形の各ステ
ップが、図3(ロ)に示す波形のように順調に変化して
いくものではない。即ち、一般的には、図4に示すよう
に各ステップの高さにバラツキを生じながら、大筋とし
て図3(ロ)の波形のように変化していくものである。
なお、図4は波形の立ち上がり部分を拡大した図であ
る。従って、最初の複数回のサンプリングで得られた波
形の平均の傾きを当該指数化平均曲線の傾きとした方が
正確である。例えば、サンプリング動作を5回行った後
に、 A={P(5) −P(0)} /5・ts より、傾斜Aを求めることができる。このようにして得
られた傾斜値Aを傾斜算出手段16は、安定値算出手段18
に出力する。
Next, the slope A of the tangent line will be described. In other words, theoretically, the calculation means 12
When the indexed average result P (1) is calculated by, the slope calculating means 16 can immediately calculate the slope A by the equation (5). However, in an actual state, from the indexed average result obtained by only one sampling operation, this slope A
Cannot be accurately determined. The main reasons are as follows. The signal b (n) applied to the calculating means 12 generally has a varying value as shown in FIG. 2 (3). Therefore,
Each step of the exponential average waveform obtained by performing the calculation of the equation (2) does not change smoothly like the waveform shown in FIG. That is, in general, the height of each step varies as shown in FIG. 4 and the waveform generally changes as shown in FIG. 3B.
Note that FIG. 4 is an enlarged view of the rising portion of the waveform. Therefore, it is more accurate to use the average slope of the waveform obtained by the first multiple samplings as the slope of the indexed average curve. For example, after performing the sampling operation 5 times, the slope A can be obtained from A = {P (5) -P (0)} / 5 · ts. The slope calculating means 16 determines the slope value A thus obtained by the stable value calculating means 18.
Output to.

【0018】安定値算出手段18は、CPU 20から時定数T
を、傾斜算出手段16から傾斜Aを導入し、(6) 式の演算
より、平均値、即ち有効電力P(M)を算出する。この様に
安定値算出手段18で得られた安定値P(M)は、原理的に
は、演算手段12から出力される応答波形の安定値である
が、しかし、傾斜Aの値は、バラツキの存在する瞬時値
に基づいて算出されたものであるため、この傾斜Aから
得た安定値P(M)と、真の安定値とは、通常、誤差が存在
する。そこで本発明では、安定値算出手段18で算出され
た安定値P(M)を初期値{(2)式で示す P(n-1)=P(M)}
として、再び指数化平均演算を行っている。しかし、算
出された安定値P(M)は、既に真の安定値Pに近似した値
であるため、その後、僅かな指数化平均演算を繰り返す
ことで、真の安定値Pに極めて近い値(有効電力)とな
る。従って、先願より迅速に平均値を得ることができ
る。
The stable value calculation means 18 uses the time constant T from the CPU 20.
The gradient A is introduced from the gradient calculating means 16 and the average value, that is, the active power P (M) is calculated by the calculation of the equation (6). In this way, the stable value P (M) obtained by the stable value calculating means 18 is, in principle, a stable value of the response waveform output from the calculating means 12, but the value of the slope A varies. Since it is calculated based on the existing instantaneous value of, there is usually an error between the stable value P (M) obtained from this slope A and the true stable value. Therefore, in the present invention, the stable value P (M) calculated by the stable value calculating means 18 is an initial value {P (n-1) = P (M)} shown in the equation (2).
As a result, the indexed average calculation is performed again. However, the calculated stable value P (M) is a value that has already been approximated to the true stable value P. Therefore, by repeating a slight exponential averaging operation thereafter, a value extremely close to the true stable value P ( Active power). Therefore, the average value can be obtained more quickly than in the previous application.

【0019】このようにして得られた有効電力の値は、
表示器21に表示されるが、この表示値は或る周期で更新
される。この更新動作を図5を参照して説明する。図5
は、演算手段12に加えられる瞬時値b(n)の平均値を一点
鎖線で示し、演算手段12が出力する指数化平均演算結果
をP(1),P(2),P(3), …で示している。なお、この例で
は、時刻t2にて、瞬時値b(n)の平均値が、PAからPBに急
変している。例えば時刻0にて、演算手段12の内容は、
クリアされた状態であり(即ち、初期値P(0)=0であ
る)、加えられている瞬時値b(n)の平均値はPAである
(図5参照)。このような状態で、1回目の指数化平均
演算を行い、その結果、P(1)を得る。更に、2回目の指
数化平均演算を行い、P(2)を得る。そして、P(0),P(1),
P(2)のデータから、既述した傾斜A1を算出し、その結
果、安定値算出手段18にて、安定値P(3)を算出する。こ
の算出された安定値P(3)は、真の平均値PAにほぼ近似し
た値である。演算手段12は、この安定値P(M)=P(3) とし
て、(3) 式の演算を行う。従って、演算手段12の次の出
力データは、P(2)→P(4)へ大きく変化し、その後P(5),P
(6),…のデータを得る。そして、P(7)はほとんどPAに近
いので、この値を平均値(例えば有効電力)として表示
器21に表示する。そして時刻Q1にて、CPU 20からメモリ
14へクリア信号(図示せず)を加えて、演算手段12の初
期値を再び“0”とし、時刻t1にて再び上述の動作を行
い立ち上がりの傾斜A2を算出し、有効電力PAの値を算出
してこれを表示する。
The value of the active power thus obtained is
Although it is displayed on the display 21, this display value is updated in a certain cycle. This update operation will be described with reference to FIG. Figure 5
Is an average value of the instantaneous value b (n) added to the calculating means 12 is shown by a dashed line, the exponential average calculation result output by the calculating means 12 P (1), P (2), P (3), It is indicated by…. In this example, the average value of the instantaneous values b (n) suddenly changes from PA to PB at time t2. For example, at time 0, the contents of the calculation means 12 are
The state is cleared (that is, the initial value P (0) = 0), and the average value of the added instantaneous values b (n) is PA (see FIG. 5). In such a state, the first indexed average calculation is performed, and as a result, P (1) is obtained. Further, the second indexed average calculation is performed to obtain P (2). And P (0), P (1),
The slope A1 described above is calculated from the data of P (2), and as a result, the stable value calculating means 18 calculates the stable value P (3). The calculated stable value P (3) is a value approximately approximate to the true average value PA. The calculation means 12 calculates the equation (3) with the stable value P (M) = P (3). Therefore, the next output data of the calculating means 12 changes greatly from P (2) to P (4), and then P (5), P (4).
(6), get the data of ... Since P (7) is almost close to PA, this value is displayed on the display unit 21 as an average value (for example, active power). Then, at time Q1, the memory from the CPU 20
A clear signal (not shown) is added to 14 to reset the initial value of the calculating means 12 to “0” again, and at time t1, the above-mentioned operation is performed again to calculate the rising slope A2, and the value of the active power PA is calculated. Calculate and display this.

【0020】なお、上述では図5に示す如く、表示の更
新毎に指数化平均演算結果をクリアしていたが、クリア
せず、前の表示データを次の演算の初期値として用いて
も、上述と同様な理由により、わずかな演算回数で真の
平均値に到達する。この場合の動作経過を図5の演算結
果P(31),P(32),P(33),…と、傾斜A4で示す。即ち、この
場合、前の指数化平均演算結果を初期値に用いるので、
その点を起点として、入力の変化の方向に応じた傾斜A4
になる(図5参照)。
In the above description, as shown in FIG. 5, the indexed average calculation result is cleared each time the display is updated. However, even if the previous display data is used as the initial value for the next calculation without clearing it, For the same reason as described above, the true average value is reached with a small number of calculations. The operation progress in this case is shown by the calculation results P (31), P (32), P (33), ... And the slope A4 in FIG. That is, in this case, since the previous indexed average calculation result is used as the initial value,
From that point as the starting point, the slope A4 according to the direction of change of input
(See FIG. 5).

【0021】要するに先願に係わるサンプリング式測定
器は、図2(5) の(ロ)のような応答曲線であるため安
定値P(M)になるまで時間がかかったが、本願によれば僅
かなサンプリング動作により(イ)のような傾斜の直線
を求め、これより直ちに安定値P(M)を算出する。この安
定値P(M)は、真の平均値にほぼ近い値であるため、この
値P(M)を(3) 式のP(n-1)に代入することで、その後、少
ないサンプリング動作で平均値に到達する。
In short, since the sampling type measuring instrument according to the prior application has a response curve as shown in (2) of FIG. 2 (5), it takes time to reach the stable value P (M). A straight line having an inclination like (a) is obtained by a slight sampling operation, and the stable value P (M) is immediately calculated from this. Since this stable value P (M) is close to the true average value, by substituting this value P (M) into P (n-1) in Eq. The average value is reached at.

【0022】図7は、指数化平均演算を用いて、入力信
号を整流した波形の平均値を求める測定装置を示す図で
ある。同図において、S/H 回路1には、測定対象の電圧
信号または電流信号が加えられ、そのサンプリング値は
ADC3にてデジタル信号へ変換される。このデジタル信
号は、絶対値演算器5に加えられ、ここで信号の振幅を
示すデータのみが抽出される。即ち、アナログ回路で言
えば、整流が行われる。この振幅を示すデータは、測定
対象の電圧または電流が交流であれば、脈動した値であ
るので、演算手段12以下の部分で、その平均値が取り出
される。なお、演算手段12以降の構成・動作は、図1と
全く同様であり、その説明は省略する。
FIG. 7 is a diagram showing a measuring device for obtaining an average value of a waveform obtained by rectifying an input signal by using an exponential averaging operation. In the figure, the voltage signal or current signal to be measured is added to the S / H circuit 1, and its sampling value is
Converted to a digital signal by ADC3. This digital signal is applied to the absolute value calculator 5, and only data indicating the amplitude of the signal is extracted here. That is, in terms of analog circuits, rectification is performed. If the voltage or current to be measured is an alternating current, the data indicating this amplitude is a pulsating value, so the average value is taken out by the portion below the calculating means 12. Note that the configuration and operation of the calculation means 12 and subsequent ones are exactly the same as those in FIG.

【0023】図8は、指数化平均演算を用いて、入力信
号の実効値を測定できる装置を示す図である。同図にお
いて、S/H 回路1には、測定対象の電圧v(または電流
信号)が加えられ、そのサンプリング値はADC 3にてデ
ジタル信号へ変換される。そして、2乗演算器7にて、
b(n)=v2 の信号へ変換される。このb(n)のデータ
は、測定対象の電圧v(または電流)が交流であれば、
脈動した値であるので、演算手段12以下の部分で、その
平均値が取り出される。つまり、安定値算出手段18の出
力として、 (1/N)・Σv2 が得られる。そして、この
平均値を開平器19にて、開平演算を行い実効値を得てい
る。
FIG. 8 is a diagram showing an apparatus capable of measuring an effective value of an input signal by using an exponential averaging operation. In the figure, the voltage v (or current signal) to be measured is applied to the S / H circuit 1, and the sampling value thereof is converted into a digital signal by the ADC 3. Then, in the square calculator 7,
It is converted into a signal of b (n) = v 2 . If the voltage v (or current) to be measured is an alternating current, this b (n) data is
Since it is a pulsating value, the average value is taken out by the portion below the calculating means 12. That is, (1 / N) · Σv 2 is obtained as the output of the stable value calculating means 18. Then, this average value is squared by the square root 19 to obtain an effective value.

【0024】[0024]

【発明の効果】以上説明したように本発明によれば、僅
かなサンプル回数に基づいて、応答波形の安定値P(M)を
演算により得ているので、先願より迅速に平均値を得る
ことができる。
As described above, according to the present invention, since the stable value P (M) of the response waveform is obtained by calculation based on a small number of samplings, the average value can be obtained more quickly than the prior application. be able to.

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

【図1】本発明を適用したサンプリング式電力計の構成
例を示す図
FIG. 1 is a diagram showing a configuration example of a sampling type power meter to which the present invention is applied.

【図2】図1装置の各部の波形を示すタイムチャートFIG. 2 is a time chart showing waveforms at various parts of the apparatus shown in FIG.

【図3】指数化平均演算結果の応答曲線と接線との関係
を示す図
FIG. 3 is a diagram showing a relationship between a response curve of an indexed average calculation result and a tangent line.

【図4】図3の部分拡大図FIG. 4 is a partially enlarged view of FIG.

【図5】繰返し動作を示す図FIG. 5 is a diagram showing a repetitive operation.

【図6】従来の問題を説明する図FIG. 6 is a diagram illustrating a conventional problem.

【図7】本発明を適用した別の構成例を示す図FIG. 7 is a diagram showing another configuration example to which the present invention is applied.

【図8】本発明を適用した別の構成例を示す図FIG. 8 is a diagram showing another configuration example to which the present invention is applied.

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

12 演算手段 14 メモリ 16 傾斜算出手段 18 安定値算出手段 20 CPU 12 Calculation means 14 Memory 16 Inclination calculation means 18 Stable value calculation means 20 CPU

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】アナログ入力信号を周期tsでサンプリング
してこれに各種演算を加え、この結果得られる瞬時値b
(n)の平均値を得て、アナログ入力信号を測定する装置
において、 下記演算手段(12)の初期の出力データ{P(0),P(1), …}
を複数個取り込み、この出力データの立ち上がり時の傾
斜Aを得る傾斜算出手段と、 前記出力データの波形の時定数Tが設定され、この出力
データの安定値P(M)をP(M)=A・Tの演算より得る安定
値算出手段と、 導入した瞬時値b(n)へ、下式に示す指数化平均演算を加
えて、前記初期の出力データを傾斜算出手段に出力し、
その結果、前記安定値算出手段から得られる安定値P(M)
を導入し、P(n-1)=P(M)として、下式の演算を継続して
行う演算手段(12)と、 を備えたことを特徴とするサンプリング式測定器。 P(n)=P(n-1)+ (1/G)・{b(n)-P(n-1)} P(n):サンプリング回数nまでに処理された指数化平均
結果 P(n-1):サンプリング回数(n-1) までに処理された指数
化平均結果 b(n):サンプリング回数n番目における瞬時値 1/G :定数(なお、1/G << 1)
1. An instantaneous value b obtained as a result of sampling an analog input signal at a period ts and applying various calculations to it.
In a device that measures the analog input signal by obtaining the average value of (n), the initial output data of the following computing means (12) {P (0), P (1),…}
Slope calculating means for obtaining a slope A at the rising edge of the output data and a time constant T of the waveform of the output data are set, and a stable value P (M) of the output data is set to P (M) = A stable value calculating means obtained from the calculation of A and T, and an exponential averaging operation shown in the following equation is added to the introduced instantaneous value b (n) to output the initial output data to the slope calculating means,
As a result, the stable value P (M) obtained from the stable value calculating means
And a calculation means (12) for continuously calculating the following equation with P (n-1) = P (M), and a sampling type measuring instrument. P (n) = P (n-1) + (1 / G) * {b (n) -P (n-1)} P (n): Exponential averaged result P (processed up to the sampling count n n-1): Exponential average result processed up to the sampling count (n-1) b (n): Instantaneous value at the nth sampling count 1 / G: Constant (1 / G << 1)
JP27124391A 1991-10-18 1991-10-18 Sampling type measuring apparatus Pending JPH05107280A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27124391A JPH05107280A (en) 1991-10-18 1991-10-18 Sampling type measuring apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27124391A JPH05107280A (en) 1991-10-18 1991-10-18 Sampling type measuring apparatus

Publications (1)

Publication Number Publication Date
JPH05107280A true JPH05107280A (en) 1993-04-27

Family

ID=17497357

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27124391A Pending JPH05107280A (en) 1991-10-18 1991-10-18 Sampling type measuring apparatus

Country Status (1)

Country Link
JP (1) JPH05107280A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111224678A (en) * 2018-11-27 2020-06-02 日本电产株式会社 Signal processing device, motor and fan motor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111224678A (en) * 2018-11-27 2020-06-02 日本电产株式会社 Signal processing device, motor and fan motor
JP2020085679A (en) * 2018-11-27 2020-06-04 日本電産株式会社 Signal processing device, motor, and fan motor

Similar Documents

Publication Publication Date Title
EP0473877B1 (en) Sampling type measuring device
GB2408107A (en) Electrical power meter with phase compensation
JP4664837B2 (en) Voltage and other effective value calculation circuit and measuring instrument
US20050171992A1 (en) Signal processing apparatus, and voltage or current measurer utilizing the same
JPH10232250A (en) Rms converter, and method and apparatus for measuring rms value
JPH05107280A (en) Sampling type measuring apparatus
JP3290946B2 (en) Power calculation device
JPH0540136A (en) Sampling-type measuring apparatus
JP3360814B2 (en) A / D converter
US20030193324A1 (en) System for difference calculation using a quad slope converter
US4667198A (en) Apparatus for measuring quantity of AC electricity
JP3085496B2 (en) Sampling type measuring device
JP3047036B2 (en) Power measurement device
JP3271323B2 (en) Time measurement circuit
JP2562046Y2 (en) Averaging operation circuit
JPH0734540B2 (en) A / D converter
JPH0514936U (en) Sampling type measuring instrument
US10476483B2 (en) Decimation filter
JPH04286965A (en) Effective value measuring device
JPH04212015A (en) Average value rectifying type measuring apparatus
RU2256928C2 (en) Method for measuring non-stability of frequency and device for realization of said method
JPH0798336A (en) Sampling type measuring device
JPH03274470A (en) Power measuring apparatus
JP2690410B2 (en) Analog / digital conversion circuit
JPH06294828A (en) Power measuring apparatus