Apparatus for measuring quantity of AC electricity

An apparatus for measuring the quantity of AC electricity, comprising a first and a second arithmetic circuit capable of calculating values corresponding to the sum of and the difference between each sample value obtained by sampling the quantity of AC electricity at a predetermined sampling period and the sample value obtained one sampling period before the former, and a third arithmetic circuit capable of calculating a value corresponding to the difference between the respective output signals of those two arithmetic circuits.

BACKGROUND OF THE INVENTION 
1. Field of the Invention 
The present invention relates to an apparatus for measuring the quantity of 
AC electricity to derive the magnitude of the quantity of AC analog 
electricity on the basis of signals obtained through periodic sampling of 
a predetermined frequency. 
2. Description of the Prior Art 
An apparatus of this kind of the prior art, such as shown in FIG. 1 is 
introduced in "Hogo Keiden Kogaku" (Protective Relay Engineering), Inst. 
of Electrical Engineers of Japan, 112-113 (Jul. 20, 1981). In FIG. 1, 
indicated at (a) is AC voltage, at (b) is sampling time at which the AC 
voltage (a) is sampled and converted into a digital value, and at (c), (d) 
and (e) are sampling times within a time interval corresponding to the 
phase angle of the AC voltage. The period T=30.degree. . When the AC 
voltage was calculated on the basis of the present AC voltage V.sub.0 and 
the AC voltage V.sub.3 of 90.degree. before (3T=90.degree. ), at the 
sampling time (c) by the use of an expression: 
##EQU1## 
the AC voltage was measured at an accuracy corresponding to 4-phase 
full-wave rectification. As well known, this accuracy is .+-.5.5%, which 
corresponds to ripple. 
According to another well-known means to measure the AC voltage at a higher 
accuracy, the AC voltages V.sub.1 and V4 at the sampling time (d) and the 
AC voltages V.sub.2 and V.sub.5 at the sampling time (e) are used 
additionally and an operation similar to the Exp. (1) is executed. In this 
case, the accuracy is .+-.0.6%. 
Since the conventional digital measuring apparatus has the above-mentioned 
constitution, on principle, the accuracy is deteriorated if the length of 
time corresponding to the phase angle 90.degree. the AC voltage is not the 
integral multiple of the sam period T. Accordingly, even if the sampling 
period is selected correctly, the measuring error can increase when the 
frequency of the AC voltage varies. 
Furthermore, in case the AC voltage has changed suddenly, the method of 
FIG. 1 needs a time corresponding to 3T+3T=6T=180.degree. to detect a 
correct value, which is quite unsatisfactory in respect of following-up 
performance. 
SUMMARY OF THE INVENTION 
Accordingly, it is an object of the present invention to provide an 
apparatus for measuring the quantity of AC electricity, capable of setting 
an optional sampling period regardless of the frequency of the quantity of 
AC electricity to be measured. 
Optional setting of the sampling period enables quick measuring in the same 
measuring accuracy as that of the conventional apparatus, or enables 
measuring at the same measuring speed as that of the conventional 
apparatus in a higher measuring accuracy. 
The present invention provides an apparatus for measuring the quantity of 
AC electricity, comprising: 
a first arithmetic circuit capable of adding two successive sample values 
of AC electricity obtained by sampling at a predetermined sampling period, 
then multiplying the sum by a first constant, and then providing the 
absolute value of the product; 
a second arithmetic circuit capable of performing subtraction between the 
two successive sample values, then multiplying the remainder by a second 
constant, and then providing the absolute value of the product; 
a third arithmetic circuit capable of multiplying the absolute value of the 
difference between the output signals of the first and the second 
arithmetic circuits by a third constant; and 
a fourth arithmetic circuit capable of calculating the quantity of AC 
electricity by adding the respective output signals of the first, the 
second and the third arithmetic circuits.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
A preferred embodiment of the present invention will be described 
hereinafter in conjunction with the accompanying drawings. 
In FIG. 2, indicated at (a) is a quantity of AC analog electricity, which 
is assumed to be a voltage expressed by v=Vsin.theta. for the sake of 
explanation. 
Indicated at (e) is a pulse train including sampling pulses repeated in a 
time sequence of t.sub.13, t.sub.12, . . . , t.sub.4, t.sub.3, t.sub.2, 
t.sub.1 and t.sub.0 at a pulse repetition period T. Sample values of the 
AC voltage (a) sampled at those times are v.sub.13, v.sub.12, . . . , 
v.sub.4, v.sub.3, v.sub.2, v.sub.1 and v.sub.0. Indicated at (f) and (g) 
are the sum of a sample value of the AC voltage at a certain time and a 
sample value at a time preceding the former by one sampling period, and 
the difference between those sample values respectively. When the AC 
voltage at a time t.sub.0 is expressed by v.sub.0 =Vsin.theta., the AC 
voltage at a time t.sub.1, a time one sampling period before the time 
t.sub.0, is expressed by v.sub.1 =Vsin(.theta.-T). Accordingly, the 
respective values of (f) and (g) at the time t.sub.0 are: 
##EQU2## 
From Exps. (2) and (3), the following periodic function is obtained. 
##EQU3## 
where k.sub.1 =1/2cos(T/2), k.sub.2 =1/2 sin(T/2) and k.sub.3 
=.sqroot.2-1. 
If the sampling period T=30.degree. and .theta.=nT (n=0, 1, 2, . . . ) as 
shown in FIG. 2 (a), the calculated results are shown by black points 
shown in FIG. 2 (h). The results of calculation performed by changing 
.theta. every time are indicated by broken line in FIG. 2 (h). When 
.theta.=15.degree.+45.degree..times.n (n=0, 1, 2, . . . ), the calculated 
value of Z.sub.0 is a minimum of 1.4142 (=.sqroot.2), whereas, when 
.theta.=37.5.degree.+45.degree..times.n (n=0, 1, 2, . . . ), the 
calculated value of Z.sub.0 is a maximum of 1.5307 (=.sqroot.2/sin 
(90.degree.-45.degree./2)). 
In FIG. 3, the values of .theta. for providing the maximum value and the 
minimum value of Z.sub.0 for sampling period T=15.degree., 30.degree., 
45.degree., 60.degree. and 120.degree. are tabulated. The maximum value 
and the minimum value are not affected at all by the variation of .theta. 
and the period of repetition either of the maximum value and of the 
minimum value is a fixed value of 45.degree.. 
FIG. 4 shows an exemplary calculated result of the detecting speed in the 
case of sudden change in the AC voltage. The AC voltage (a) is sampled 
with a period T=30.degree. and, as shown in (f), the Exp. (4) is operated 
by using each sample value and the sample value sampled one period before 
the former. As shown in (g), the results of calculations by using Exp. (4) 
are larger values before the AC voltage drops and the calculated results 
drop surely to smaller values in two sampling periods to the utmost, after 
the AC voltage has dropped to a lower level. The range between the high 
level and the low level is a transient period, in which the calculated 
results are indefinite. 
Accordingly, the detecting speed is reduced to the lowest level for a 
period less than a time corresponding to T+T=2T, namely, less than a time 
corresponding to a sampling period of 60.degree. in the case of FIG. 4, 
since T=30.degree.. Thus the detection follows up the variation of the 
input quickly. Since the following speed increases with the decrease of 
the sampling period T, the sampling period T is reduced for high-speed 
detection without changing the accuracy, if necessary. 
Examination of the calculated results in terms of sampling phase error 
gives a maximum sampling phase error: 
EQU .epsilon..sub.0 =(1.5307-1.4142).times.100/1.4142=8.24% (5) 
6 
that is, .+-.4.12%. 
FIG. 5 shows an exemplary manner of operation to reduce the sampling phase 
error, in which the mean value of three calculated results is provided. In 
FIG. 5, each block indicated by Calculation is an operation element which 
executes the operation of Exp. (4) by using sample values obtained by 
sampling the AC voltage (a) with a fixed sampling period, and each block 
indicated by "Averaging" is an operation element which executes an 
operation to obtain the mean value of the respective output signals of 
three adjacent operation elements. These operation elements execute the 
operation of the following Exp. (6). 
##EQU4## 
where k.sub.1 =1/2cos(T/2), k.sub.2 =1/2cos(T/2), and k.sub.3 
=.sqroot.2-1. 
In FIG. 5, the AC voltage is sampled at .theta.=30.degree..times.n (n=0, 1, 
2, . . . ), while in FIG. 6, the sampling phase is shifted to 
.theta..sub.1 =1.degree.+30.degree..times.n and .theta..sub.2 
=2.degree.+30.degree..times.n (n=0, 1, 2, . . . ). Although not shown, 
(0.degree..about.14.degree.), (15.degree..about.29.degree.), 
(30.degree..about.44.degree.), . . . are repeatedly periodically. The 
results, not shown, have no relation to the sampling period T. Therefore, 
if three sample values are averaged, the maximum sampling phase error is 
reduced to: 
EQU .epsilon..sub.30 =(1.49589-1.48316).times.100/1.48316.apprxeq.0.86% (7) 
that is, .+-.0.43%. 
The calculation, similar to that of FIG. 4, of the time necessary for 
detection shows that the longest time is less than T+3T, and hence the 
longest time is a time corresponding to a phase angle of 120.degree. since 
T=30.degree. in FIG. 5. This shows that even highly accurate detection can 
be achieved quickly. 
FIG. 7 shows a digital computer, by way of example, for carrying out the 
operation according to the present invention. In FIG. 7, there are shown a 
terminal 1 to which an AC voltage is applied, an A/D converter 2 which 
samples the AC voltage with a fixed sampling period T and converts the 
sample value into a corresponding digital value, signal passages 3, a CPU 
4 for executing the operation of the Exp. (4) or (6), a RAM 5 which 
temporarily stores the numerical data obtained through A/D conversion, the 
interim values in the operation and the results of operation, a ROM stores 
the Exp. (4) or (6), and a D/0 which provides the digital results of 
operation through an external terminal 8. 
FIG. 8 is a block diagram showing the processing program of the CPU 4. A 
terminal 9 receives current data, while a terminal 10 receives data 
sampled one sampling period before the former. An adder 11 carries out the 
operation of V{sin.theta.+sin(.theta.-T)}. The output signal of adder 11 
is multiplied by the first constant k.sub.1 and the absolute value of the 
product is produced by an absolute value circuit with a multiplier 12. A 
subtractor 13 carries out the operation of V{sin(.theta.-sin(.theta.-T)} 
and an absolute value circuit with a mu1tiplier 14 multiplies the output 
signal of the subtractor 13 by the second constant k.sub.2 and produces 
the absolute value of the product. A subtractor 15 carries out the 
operation of .vertline.k.sub.1 
V{sin.theta.+sin(.theta.-T)}.vertline.-.vertline.k.sub.2 
V{sin.theta.-sin(.theta.-T)}` and an absolute circuit with a m multiplier 
16 changes the result of operation of the subtractor into a corresponding 
absolute value and multiplies the absolute value by a third constant 
k.sub.3. An adder 17 produces the total sum of the outputs of the devices 
(12), (14) and (16). The output signal 18 of the adder 17 is expressed by 
the Exp. (4). A device 19 averages three adjacent values. The output 
signal 20 is expressed by the Exp. (6). 
The embodiment shown in FIG. 8 need not necessarily be a computer, but may 
consist of hardware such as adding circuits and subtracting circuits. 
Although the present invention has been described with reference to a 
preferred embodiment thereof as applied to digitally processing an AC 
analog voltage by converting the AC analog voltage into digital values, 
the present invention is not limited to an apparatus for digital 
processing, but may be embodied in an apparatus for processing analog 
voltages in analog values, which gives the similar effects. 
Furthermore, the present invention is applicable also to an apparatus to 
which a quantity of AC electricity is given in a digital value. 
Although the present invention has been described as applied to measuring 
AC voltage, the present invention is applicable to measuring any value as 
far as the value varies periodically in the form of a sine wave. 
The embodiment has been described as employing 1/2cos(T/2), 1/2sin(T/2) and 
.sqroot.2-1 as the first, the second and the third constant respectively, 
however, the constants may be the approximate values of those values 
employed in the embodiment respectively (for example, for T=30.degree., if 
1/2cos(T/2).apprxeq.1/2sin(T/2).apprxeq.2, and .sqroot.2-1.apprxeq.1/2, 
"1/2" and "2" can be processed by a right shift command and a left shift 
command respectively), for higher operation speed. The use of such 
approximate values as the constants reduces the operation time with slight 
deterioration of the accuracy. 
As described hereinbefore, according to the present invention, the quantity 
of AC electricity is measured by using a presently sampled value and the 
value sampled one sampling period before, therefore, the sampling period 
can optionally be decided, and at least either measuring speed can be 
increased or measuring accuracy can be improved.