Method for determining electrical energy consumption

Abstract: A method of operating a meter to perform the steps of generating a measure of real energy consumed, generating a measure of reactive energy consumed, and generating, from the real energy and reactive energy measures, a measure of apparent energy consumed. In one embodiment, the real energy and reactive energy measures are provided as integer quantity inputs. Particularly, assume S = kVAh, P = kWh, Q = kVARh, and R = Residue. Respective registers store values of P, [2P + 1], Q, [2Q + 1], and the sum [P² + Q²]. Initially, the P, Q, and [P² + Q²] registers are set to zero, while the [2P + 1] and [2Q + 1] registers are initialized to 1. At the arrival of a P pulse, the value in the [2P +1] register is added to the [P² + Q²] register, then the P register is incremented by 1 and the [2P + 1] register is incremented by 2. Exactly the same steps are carried out subsequent to receipt of a Q pulse. A set of registers also is used to store the S and [2S + 1] data, and generation of the S pulses is determined as follows. After arrival of either a P or Q pulse, a trial subtraction of [2S + 1] is made from the [P² + Q²] register. If the subtraction does not cause an underflow, an S pulse is generated, the S register is incremented by 1, and the [2S + 1] register is incremented by 2. If the subtraction causes an underflow, the [P² + Q²] register is reset to its previous value, the other registers are not incremented, and no S pulse is generated.

Description: I. Background of the Invention A. Field of the Invention The present invention generally relates to measurement of the cost of providing electric service, and more particularly, relates to accurate measurement of power consumption related quantities. B. Related Art The ultimate goal in the art of metering is to precisely identify the cost of providing electric service. Early meters have undergone many changes and improvements over time, all in an effort to improve further the accuracy of measurements involved in determining such cost. Although electric utility systems are designed based on total kilovolt-amperes (kVA) required by a load to be served, real power consumed over time, or energy, is the quantity typically measured for billing a consumer. Kilovolt-amperes is referred to as apparent power. Apparent power can be visualized as being composed of two components - kilowatts (kW) and kilovars (kVAR). Kilowatts sometimes is referred to as "real power" and kilovars sometimes is referred to as "reactive power". To better understand the difference between real power and reactive power, consider an induction motor (a typical load in an electric utility system). In order to operate the motor, two current components may be considered - magnetizing (reactive) current and power-producing (real) current. The magnetizing current is the current required to produce the magnetic fields necessary for the operation of the motor. Without magnetizing current, energy would not flow through the core of a transformer or across an air gap. The product of magnetizing current and voltage is reactive power. The power-producing current is the current which is converted into useful work performed by the motor. The product of power-producing current and voltage is real power. Although both real and reactive power are required from an electric utility system, it was recognized as early as 1892 that real power by itself reasonably represents the cost of providing electric service. Since measurement of the real power is a long-accepted and reliable quantity in determining the cost of providing electric service, any additional improvements to determining such cost should not only be significant, but also cost effective. Before now, the conflicting goals of keeping meter costs down but also providing a meaningful reactive power measurement prevented widespread use, especially for residential services, of reactive power measurements. With regard to the cost of measuring reactive power, and referring again to the induction motor example, an induction device typically introduces both an inductive (magnetizing) reactance and a resistance (real) into an electric utility system. In the presence of only a resistive load, current flowing in the system is in-phase with the voltage, i.e., no magnetizing current is required. When an inductive load is introduced into the system, however, total current flowing in the system is shifted out-of-phase with the voltage by an angle depending upon the relative amounts of resistance and reactance. Although total current flowing in the system is shifted out-of-phase with the voltage, the total current may be visualized as being composed of two components - an in-phase component and an out-of-phase, or quadrature, component. Reactive power can be measured by a technique commonly known as phase-shifting. The phase-shifting technique requires that a meter be configured so that the applied voltage, i.e., a voltage of a magnitude representative of the magnitude of the line voltage, in the meter be displaced 90 degrees (lagging for inductive reactance) from the phase angle of the line voltage. The applied voltage, therefore, is substantially in-phase (at least in a "vector" sense) with the quadrature current component. The product of the phase-shifted applied voltage and the current thus is a measure of reactive power. Although known phase-shifting techniques for determining reactive power are technically feasible, the known techniques have many economic disadvantages. Particularly, a reactive power measure by itself is not an accepted measure of the cost of providing electric service. A real power measure must also be provided. Until recently, one meter could not be configured to measure both real and reactive power. Therefore, two separate meters typically are utilized - one meter to measure the reactive power and another meter to measure the real power. The added costs associated with utilizing two meters to make such measurements is highly undesirable. Even if reactive power can be measured in some cost-effective manner, a problem hindering the cost-effective utilization of reactive power measurements is the relationship between volt-amperes (apparent power), watts (real power), and reactive volt-amperes (reactive power). More specifically, once reactive and real power measurements are obtained, these measurements must be combined in some meaningful way as a measure of electrical energy consumption. In linear sinusoidal circuits, a well-known relationship between apparent, real and reactive power is: kVA = [kW 2 + kVAR 2 ] 1/2 where: kVA = kilovolts-amperes (apparent power); kW = kilowatts (real power); and kVAR = reactive kilovolt-amperes (reactive power). To utilize Equation (1), a relatively sophisticated processor, compared to the processors utilized in most meters, is required. Particularly, meters typically utilize 8-bit digital processors with limited functionality and limited random-access memory. To minimize hardware costs, the processors preferably only are required to perform add/subtract and multiply/divide functions rather than the more complicated, and more computationally expensive, square/square root functions. To carry out the operations recited in Equation (1), however, a processor must be able to perform square/square root operations. The processing costs associated with carrying out Equation (1) therefore are high. With known meter devices, in an attempt to avoid increasing the cost of a processor utilized in the reactive power meter, and instead of processing data "on-site" where it is gathered, the data is stored in a local memory device (sometimes referred to herein as a recorder) of the meter. More particularly, a pulse initiating device coupled to the meter generates a discrete pulse whenever a predetermined quantity of reactive power has been measured. Each pulse stored in the recorder therefore represents a predetermined quantum of reactive energy. The pulses are stored (e.g., on magnetic tape, solid state memory device, etc.) along with time interval pulses. A similar pulse initiating device and memory device are utilized with the real power (watthour) meter. Once a month or so, a meter reader (typically a human) gathers the stored pulse data, e.g., a memory "dump" from the recorder memory to an electronic meter reader memory, and/or to a remote memory read by telephone, radio, or other means. The gathered pulse data is then provided to a central processing system. At the central processing site, the apparent power (kVA) for each respective time interval is determined from the real and reactive power pulses from each respective time interval. Apparent power demand (kVA demand), for example, is then determined using the following relationship: kVA demand = [kVAh consumed in a timed interval] / [time duration of the interval] A maximum kVA demand from a single time period is then identified. The central processor also sums the kWH pulses to obtain the total kWH energy supplied. The utilities bill consumers for total kilowatt-hour, i.e., real power consumed during the billing period. The maximum kVA demand is used to bill a consumer for investment related costs, e.g., the cost of equipment required to furnish the consumer with electricity. Particularly, in addition to recovering for the cost of real energy consumed, a utility needs to recover the capital cost associated with the supply/distribution system. A reasonable way to recover such cost is to charge users according to the user's maximum current requirement or the user's maximum apparent power requirement. A user with a high maximum current requirement requires more capital investment by the utility (e.g., a larger transformer and lines) than a low maximum current requirement user. Additionally, most users have lagging VAR loads due to the predominance of inductive devices such as motors, ballasts, transformers and the like connected to the system. To compensate for the inductive loads, the utility must operate its generators at a leading phase angle. Operating generators at other than zero phase angle reduces the capacity of the generators to generate real power for transmission to the load. The maximum kVA demand inherently includes a measure of the amount of leading phase angle required to compensate for each consumer's load. With the above described and well-known system, in addition to the expense of using two meters, the meters must be equipped with respective pulse initiating devices and memory/storage devices. Further, the kVAR meter must be equipped with a phase shifting transformer. A sophisticated central data processing system operated by skilled workers also is required. The equipment cost of such a system inhibits its wide-spread application. The system typically is only used for measuring energy requirements of large revenue users. Additionally, with the above-described system, a consumer cannot observe the status of energy consumption during a billing period and the system also does not provide real-time apparent power quantities. The above-described system provides only time-averaged quantities at the end of the billing period. Real-time information is useful, for example, so that variations in power factor can be determined during each time interval. If the power factor becomes too small (e.g., if the reactive power is large as compared to the real power) during a particular time period, the consumer may want to take steps to reduce reactive power requirements. In this manner, a consumer can attempt to minimize maximum kVA demand. In spite of the importance of reactive power measurement, reactive power often is not measured - especially in single phase residential services. Costs associated with measuring reactive power using known systems are high. As previously explained, however, a poor ratio of kW to kVA, i.e., low power factor, has a serious effect on the economic design and operating costs of a system. When power factor is low and rates are based only on kilowatt-hours, the utility is not being compensated for the power (kVA) required to generate, transmit, and distribute. Until now, no known meter system provides both an economically obtained measure of reactive power and an economic manner of using the reactive power measure to achieve the ultimate metering goal, i.e., accurate measurement of the cost of providing electric service. Further, no known meter system provides a relatively low cost simple manner of determining, in real-time, both real and reactive power requirements and power factor. A proposal for providing a microprocessor based three phase power transducer was made at the IEEE Instruments and Measurement Technology Conference of April 25-27, 1989 (pages 98-102) which provided outputs per cycle of real power, reactor power and apparent power. However, this system used a number of 6 MHz Z80 CPUs and was required to calculate squares and square roots which require significant hardware expenditure. Thus the operation was not economical for large scale use and also suffered from a lack of accuracy due to the use of relatively low cost CPUs and reduced memory availability. US-A-4,937,520 shows an instrument for measuring the errors of apparent power meters. This is an expensive instrument designed for testing purposes and not for general use. It also is required to calculate real power, reactive power and apparent power using formulae requiring the calculation of squares and square roots. Thus it is hardware and memory intensive and not suited to economical general use. II. Summary of the Invention According to a first aspect of the invention, there is provided a method of operating a meter coupled between an end user and a power delivery system, the meter comprising metering means and processing means, the processing means comprising register means for storing values of P,(2P+1), Q,(2Q+1), R, S and (2S+1) where P = real energy, Q = reactive energy, S = apparent energy and R = remainder, said method comprising the steps of: outputting, from the metering means, and upon each occurrence of the end user consuming a predetermined quantum of real energy (P), a pulse representative of the predetermined quantum of real energy (P), which pulse is provided to the processing means, and upon receipt of each real energy pulse of the processing means, controlling the processing means to perform the steps of: adding the value of the (2P+1) register means to the value of the R register means; incrementing the (2P+1) register means by two; and incrementing the P register means by one; outputting, from the metering means, and upon each occurrence of the end user consuming a predetermined quantum of reactive energy (Q), a pulse representative of the predetermined quantum of reactive energy (Q), which pulse is provided to the processing means, and upon receipt of each reactive energy pulse by the processing means, controlling the processing means to perform the steps of: adding the value of the (2Q+1) register means to the value of the R register means; incrementing the (2Q+1) register means by two; and incrementing the Q register means by one; generating, in the processing means, and from values stored in the register means, a measure of apparent energy (S). According to a second aspect of the invention, there is provided a method of operating a meter coupled between an end user and a power delivery system, the meter comprising metering means and processing means, the processing means comprising register means for storing values of W, Q, S, R, (2Q+1), (2W+1) and (2S+1), where W = watthours, Q = Qhours, S = apparent energy, and R = remainder, said method comprising the steps of: outputting, from the metering means, and upon each occurrence of the end user consuming a predetermined quantum of real energy, a pulse representative of the predetermined quantum of real energy, which pulse is provided to the processing means, and upon receipt of each real energy pulse by the processing means controlling the processing means to perform the steps of: adding the value 4*(2W-1) to the value of the R register means; subtracting the value (4*Q) from the value of the R register means; incrementing the W register means by one; and incrementing the (2W+1) register means by two; outputting, from the metering means, and upon each occurrence of the end user consuming a predetermined quantum of Q energy, a pulse representative of the predetermined quantum of Q energy, which pulse is provided to the processing means, and upon receipt of each Q energy pulse by the processing means, controlling the processing means to perform the steps of: adding the value 4*(2Q+1) to the value of the R register means; subtracting the value (4*W) from the value of the R register means; incrementing the Q register means by one; and incrementing the (2Q+1) register means by two; generating, in the processing means, and from values stored in the register means, a measure of apparent energy (S). Thus the present invention for determining kVAh utilizes inputs indicative of kWh and kVARh metered. These inputs typically are in the form of pulses indicative of a predetermined quantum of real/reactive energy. It should be understood, of course, that Qhour pulses rather than kVARh pulses can be utilized. From these inputs, and without performing any square/square root operation, kVAh is determined. Particularly, and as hereinafter described in more detail, the squaring process is carried out by simple addition. For the discussion here, assume S = kVAh, P = kWh, Q = kVARh, and R = Residue. Briefly, respective registers store values of P, [2P + 1], Q, [2Q + 1], and the sum [P 2 + Q 2 ]. Initially, the P, Q, and [P 2 + Q 2 ] registers are set to zero, while the [2P + 1] and [2Q + 1] registers are initialized to 1. At the arrival of a P pulse, the value in the [2P +1] register is added to the [P 2 + Q 2 ] register, then the P register is incremented by 1 and the [2P + 1] register is incremented by 2. Exactly the same steps are carried out subsequent to receipt of a Q pulse. A set of registers also is used to store the S and [2S + 1] data, and generation of the S pulses is determined as follows. After arrival of either a P or Q pulse, a trial subtraction of [2S + 1] is made from the [P 2 + Q 2 ] register. If the subtraction does not cause an underflow, an S pulse is generated, the S register is incremented by 1, and the [2S + 1] register is incremented by 2. If the subtraction causes an underflow, the [P 2 + Q 2 ] register is reset to its previous value, the other registers are not incremented, and no S pulse is generated. Using the present algorithm, a meter can be configured to measure both real and apparent power. This feature facilitates obtaining an apparent power measure and further facilitates reducing the costs of providing such a measure. By eliminating a need for determining squares/square roots, hardware costs are minimized and energy consumption determinations can be made on site in real time. A consumer therefore can observe the status of energy consumption (including power factor) and take any necessary actions. III. Brief Description of the Drawings The invention will now be described in greater detail, by way of example, with reference to the drawings in which: Figure 1 illustrates an example of a voltage and a current waveform in an AC circuit; Figure 2 is a vector representation of a waveform; Figure 3 illustrates the relationship between impedance, resistance, and reactance; Figure 4 illustrates the current component relationships; Figure 5 illustrates the relationship between watts, vars, and volt-amperes; Figure 6 is a high-level block diagram of one hardware embodiment which can be used with the present invention; Figure 7 is a high-level flow diagram illustrating a sequence of process steps in accordance with one embodiment of the present invention; Figure 8 is an embodiment of a metering system which can be utilized with the present invention; Figure 9 is an embodiment of metering means which can be utilized with the present invention; Figure 10 is an embodiment of processing means which can be utilized with the present invention; Figure 11 is another embodiment of a metering system which can be utilized with the present invention; Figure 12 is a more detailed block diagram of the processing means illustrated in Figure 11. IV. Detailed Description of the Drawings To facilitate ease of understanding the present invention, the following detailed description is divided in four separate sections. Section A provides some background details. Section B is an overview, Section C provides further details regarding hardware configurations, and Section D provides further detail regarding embodiments of the present algorithm. A. Background Details Figure 1 illustrates an example of a sinusoidal voltage V and current I waveform in an a-c circuit, e.g., a circuit including a power generation system and a load. In the example, the current waveform (I) lags the voltage waveform (V). The term "lag" means to come later in time. When current lags the voltage, it is said to be "out-of-phase" with the voltage. Rather than utilize fractions of a second, one cycle is said to occur in 360 electrical degrees as shown in Figure 1. At least in the United States, the standard power transmission occurs at 60 cycles per second. 360 electrical degrees, therefore, represent 1/60th of a second. More particularly: 360 degrees = 1 cycle = 1/60th sec.; 1 degree = 1/60 x 1/360 sec. = 1/21,600 sec.; and 1 degree = 1/21,600 sec. When referring to an amount of lag, rather than refer to a unit such as 1/21,600 sec., the quantity of "degrees" is used. This angle is called "phase angle" and is actually a measure of time by which the current lags voltage. Figure 1 shows current lagging voltage by 90 degrees (or 1/240 sec.) or put another way, the phase angle between voltage and current is 90 degrees. Rather than using sine waves to show phase relationship between voltage and current, phasors often are used. A phasor is used to represent a quantity which has a magnitude and a phase angle. Figure 2 illustrates a current phasor I lagging a voltage phasor V by 45 degrees. The vectors both rotate with time, usually in a counterclockwise direction about the axis. An observer standing at point A sees the projection of the phasors and would see voltage vector V pass through zero first and then some time later would see the current vector I pass through zero. Inductive reactance causes current to lag voltage. How great this lag (or phase angle) is depends upon both the reactance and the resistance of the circuit. The term "impedance" is a measure of both resistance and reactance. Impedance (Z) is the phasor sum of resistance (R) and reactance (X). The relationship is illustrated in Figure 3. The angle between the resistance (R) and the impedance (Z) phasors is equal to the phase angle. The following relationship exists between resistance, reactance and impedance: cos  = R / Z; and Z 2 = R 2 + X 2 . If an a-c circuit contains 20 ohms of resistance and 15 ohms of reactance, the impedance (or opposition) offered to the flow of current is 25 ohms, and the current would lag the voltage by the angle whose cosine = 20/25. The angle would be approximately 37 degrees. Impedance also has an effect on power. Assume that the total current, I TOTAL , is broken up into two components - an in-phase component and an out-of-phase, or quadrature, component. Solving for these two components: I IN PHASE = I TOTAL cos; and I QUADRATURE = I TOTAL sin. These relationships are shown in Figure 4. The real power in an a-c circuit is: Real Power = Watts = VI IN PHASE = VI cos. In this expression, cos  is the power factor. Another quantity in a-c power circuits is the reactive power or reactive volt-amperes (also referred to as VARS). Watts, vars, and apparent power are related as shown in Figure 5. Vars equal volts (V) times the quadrature (or right-angle) current component (I sin) of the total current. Further information regarding well-known metering details may be found in many electricity textbooks including, for example, "Handbook For Electricity Metering", Eight Edition, Edison Electric Institute, 1981 (1111 9th Street, N.W., Washington, D.C.). B. Overview Figure 6 is a high-level block diagram 100 illustrating some aspects of one embodiment of the present invention. Assume for the description here that input relating to amounts of real power and reactive power are available. The form of such inputs, e.g., pulses representative of a quantum of power, digital words, analog signals, etc., may vary and the present invention certainly is not limited by the manner or form in which such inputs are provided. Details with regard to some embodiments as to how such inputs can be provided are set forth hereinafter in Section C. It should be understood, however, that the means shown in Figure 6 also could form part of the means for obtaining any necessary inputs, e.g., on an integrated circuit. Figure 6 illustrates real power accounting means 102, reactive power accounting means 104, and apparent power accounting means 106. The term "accounting means" as used herein refers to means for registering, recording, presenting, interpreting, deriving, and/or processing a quantity. The real power accounting means 102 is utilized to keep account of the amount of real power measured at the metering point. The reactive power accounting means 104 keeps account of the amount of reactive power measured at the metering point. The apparent power accounting means 106 keeps account of the amount of apparent power measured at the metering point, i.e., derived from quantities measured at the metering point. The apparent power accounting means 106 additionally accounts power factor. Although illustrated as being separate items, it should be understood that the real power accounting means 102, the reactive power accounting means 104, and the apparent power accounting means 106 could be integrated items, such as on an integrated circuit, with shared memory locations. Figure 6 is provided only to illustrate that the present invention utilizes means, such as registers, counters, accumulators, etc., which provide and/or derive information regarding the real power, the reactive power, the power factor, and the apparent power. Figure 7 is high-level flow diagram 150 illustrating a sequence of process steps in accordance with one embodiment of the present invention. Particularly, subsequent to starting operations as indicated by a START legend 152, the first step 154 is to obtain input(s) indicating a quantum of metered real or reactive energy. The input may be in analog form, pulse form, digital form, etc. Once the input is obtained, then the respective real or reactive energy accounting means is incremented by an amount equal to the obtained input as indicated at 156. The term "increment" is not intended to be a limitation on the manner in which the real energy and reactive energy is accounted. For example, it is possible that a register/counter could be decremented or multiplied by some factor so as to enable an accounting of energy consumed. The only requirement is that metered energy consumed be reflected and accounted for, in some way, in the real and/or reactive energy accounting means. Once the value of one of the respective accounting means has been changed, the next step 158 is to determine any change/update to the apparent energy accounting means which results from the change/update to the real or reactive energy accounting means. Any change to power factor also is determined. Subsequent to making the determinations, and if no interrupt request has been received as indicated at 160, operations return to the step 154 where inputs are obtained. If an interrupt request has been received, then operations stop as indicated by an END legend 162. Although illustrated as being performed sequentially, it should be understood that some of the steps illustrated in Figure 7 could be performed in parallel or in a distributed manner. For example, an increment operation could occur in the real and/or reactive energy accounting means while the apparent energy accounting means processes a previous increment. In the foregoing manner, the present invention accounts for real power, reactive power, power factor, and apparent power. These quantities can then be combined in some manner and/or maintained separately to provide an output to be displayed and/or stored in an electronic memory. C. Alternative Hardware Configurations Many different hardware configurations may be utilized with the present invention and the present invention is not limited to any one particular hardware configuration. Therefore, although specific configurations are described herein, such configurations should in no way be construed as limitations to the present invention. Further, it should be understood that the present invention is specifically directed to a method of determining kVAh and the present invention is not directed to, for example, improved metering means, improved processing means, and/or improved input/output means. Figure 8 is a high-level block diagram 200 of one hardware embodiment which may be utilized with the present invention. As illustrated in Figure 8, a meter system 202 includes input/output means 204, metering means 206, and processing means 208. Although shown in Figure 8 as separate items, it is to be understood that the block diagram 200 is shown only to aid in developing a conceptual understanding of metering systems. For example, some of the functions which technically qualify as "metering functions" may actually be carried out in the processing means and/or in the input/output (I/O) means 204. Likewise, some processing functions may actually be carried out in the metering means 206 and/or the I/O means 204. Typically, the I/O means 204 provides an interface between power lines (not shown) and other components of the metering system 202. The I/O means 204 also includes a display and/or memory so that the data generated by and/or stored in the other components of the meter system 202 can be provided electronically or in a human-understandable format upon request. Many alternative I/O means 204 for metering systems are well-known and commercially available. 1. Metering Means The metering means 206 typically performs the function of generating some measurement of real energy and reactive energy. Details regarding one form of the metering means 206 preferably used with the present invention are provided in EP-A-0,420,545. Information regarding the metering means 206 also is set forth in Bullock, Solid State Meter Technology, North Carolina Meter School, Wilmington, North Carolina, June 20, 1990. Figure 9 is a block diagram description 250 of one embodiment of the metering means 206. Particularly, line current inputs and line voltage inputs are provided to the metering means 206 and watthour output pulses and VAR/Q hour output pulses are output by the metering means 206. The watthour output pulses and the VAR/Q hour pulses, respectively, are proportional to real and reactive energy consumption, respectively. The line voltage and the line current inputs are electrically isolated and precisely scaled by respective scaling and isolation means 210 and 212 to provide secondary signals compatible with electronic circuitry. Voltage scaling to provide 1.6 Vrms at rated input voltage (120 V, for example) is suitable. Current scaling ratios of 100,000-to-one and 10,000-to-one, respectively, may be selected for self-contained (Full-scale 200 amperes) and transformer-rated (Full-scale 20 amperes) meters, respectively. Full scale secondary current from the current sensor is then 2.0 milliamps rms. A precision current-to-voltage converter 214 in the current input path converts a current signal into a voltage for compatibility with an A/D (analog-to-digital) converter. The scaling of the current-to-voltage converter is one volt output per milliamp input (1,000 ohms). Adjustments for gain are provided by adjusting a gain stage 216 in the current path. A first A/D converter is provided for the current signal 218 and a second A/D converter 220 is provided for the voltage signal. Both A/D converters have a full-scale range of approximately +/- 3.45 volts dc, as determined by VREF from a precision voltage reference 221. The precision time base (CLOCK) 222 establishes a constant sample rate at which the A/D converters simultaneously "sample" the current and voltage inputs and convert their amplitudes to binary words. Sample rates in excess of several kilohertz are required to obtain good performance for harmonics in the input signals. Phase adjustment, to precisely match the phase of the current and voltage input signals, is provided by shifting the sample time of the voltage converter relative to the current converter in small discrete steps. To obtain output pulses proportional to watthours, each binary-coded current sample is multiplied at a multiplier 224 by its corresponding voltage sample and the product is added to an accumulator 226. Each time the accumulated sum reaches a threshold value, proportional to the meter watthour constant, an output pulse is generated. The output pulse rate has been selected to be twelve times the rate of one disk revolution for an equivalent electromechanical meter to maintain compatability with past generations of metering devices. Output pulses proportional to varhours or Qhours are obtained in the same fashion as watthours except the voltage samples used are delayed, by a delay unit 228, a time equivalent to 90 degrees for varhours or 60 degrees for Qhours, either of which can be selected. Each binary coded current sample is multiplied at a multiplier 230 by the corresponding voltage sample and a separate accumulator 232 is used for varhour or Qhour accumulations. The same threshold as the watthour accumulator threshold is used as the varhour or Qhour thresholds. A typical threshold value is 144(10 -6 ) volt-ampere-seconds (for a self-contained one-element meter for two-wire-single-phase applications). For multiple phase loads, a multiplexer (not shown) can be used to extend the meter function. Separate isolation and scaling should be provided for each current and voltage input, but the remaining elements can be "time-shared". A block diagram for multiphase load circuity is set forth in the hereinbefore referenced article entitled "Solid State Meter Technology". Accuracy is primarily limited by noise, A/D converter resolution, linearity of input scaling, linearity of the current-to-voltage converter, and linearity of the A/D converters. Stability of performance with time and temperature is limited by the stability of input scaling, stability of the current-to-voltage converter resistor, and stability of the time base and voltage reference. An apparent inaccuracy can appear at high output pulse rates combined with a few output pulses per measurement. This occurs because of the cyclic nature of power flow at twice the line frequency causing "jitter" on the output pulse rate. This can be overcome by increasing the number of output pulses per measurement. 2. Processing Means Figure 10 is a block diagram description of the processing means 208 which may be utilized with the present invention. The block diagram functions can be provided, for example, on a 1.2 micron CMOS application specific integrated circuit (ASIC) as is well known in the art. The ASIC includes a microcontroller 234 coupled to an address, data, control, and umacro bus 236 (hereinafter referred to as the "bus"). A liquid crystal display controller 238 is coupled directly to the bus 236 and indirectly coupled to the bus 236 through a logic interface 240. A power outage timer 242, coupled to an oscillator 244, is coupled to the bus 236. A memory 246 including, for example, a ROM, EEPROM, and SRAM type memory blocks, also is coupled to the bus 236. The ASIC 208 also includes (but not shown) address decoding logic to define ASIC memory map, bank switching logic to extend processor address space, and communication gating logic to route register data for programming and retrieval purposes. In operation, the microcontroller 234 performs calculating and ASIC control functions. The liquid crystal display controller 238 is utilized to control input/output means such as a liquid crystal display. The power outage timer 242, coupled to the oscillator 244, is used for timekeeping in the event of a power outage. Metering data, programs, and other information are stored in the memory 246. 3. Alternative Hardware Embodiments Figure 11 is another embodiment of a metering system 300 which could be used to practice the present invention. Particularly, kWh metering means 302, kVARh metering means 304, processing means 306, and input/output means 308 are shown. The kWh metering means 302 includes a conventional kWH pulse initiator (not shown), effective in response to line voltage and load current to produce one output pulse in response to a predetermined quantity of real power consumed by a load. The kWH pulse initiator may be, for example, a conventional electromechanical meter in which a meter disk is rotated against a magnetic drag by the interaction of magnetic fluxes produced by voltage and current stators. Output pulses from the kWH pulse initiator may be produced by a conventional electromechanical or electro-optical sensor in response to a predetermined quantum of rotary motion of the meter disk. The kWh metering means 302 may include a conventional mechanical register (not shown) for indicating the accumulated rotation of the meter disk, appropriately scaled in terms of energy consumption. Alternatively, the kWh metering means 302 may be any convenient electronic device capable of producing one output pulse in response to the consumption of any predetermined quantity of real energy required by a load. Similarly, the kVARh metering means 304 produces an output pulse in response to a predetermined consumption of reactive energy by the load. Phase shifting, by 90 degrees, the voltage multiplied with the current provides a measure of kVAR. Such phase shifting is well known in the art. As in the case of the kWH metering means 302, the kVARh metering means 304 may also be any convenient electromechanical or electronic device capable of producing one output pulse in response to a quantity required by a load. The processing means 306 of Figure 11 is illustrated in more detail in Figure 12. More particularly, the kwh pulse and the kVARh pulse outputs from the metering means 302 and 304 are provided to the processing means 306 as inputs to a kVAh determining means 310. The kWh pulse also is input to a kWh register 312 which accumulates the kWh pulses and provides the accumulated count as an output to the I/O means 308. The kVARh pulse is also provided to a Power Factor Lookup register 314. The Power Factor Lookup register 314 also receives, as input, kWh pulse and kVAh information. From the input provided, power factor can be determined as hereinafter explained. Output from the kVAh determining means 310 is provided to a kVA demand register 316 and to a kVAh register 318 which accumulates the kVAh measured. The kVA demand register 316 stores the kVA demand and also provides an end-of-period reset signal to the kVAh determining means 310. Output from the processing means 306, as illustrated in the block diagram, includes power factor, kVAh, kVA demand, and kWh. The manner of determining these values is described in more detail in the following detailed description of the algorithm. From the foregoing description of hardware embodiments, it should be understood that many different hardware configurations can be used with the present algorithm and the algorithm is not limited to use with any one particular hardware configuration. Further, it is also contemplated that the present algorithm could be used on a conventional personal computer (e.g., based on a Z80 microprocessor). Therefore, although the foregoing description of hardware configurations describe various hardware configurations which may be used with the present invention, such configurations are not to be construed as limitations of the present invention. D. Algorithm As hereinbefore described, the outputs from the metering means, i.e. kWh and kVARh, are integer quantities. Similarly, the output, kVAh, is required to be an integer quantity having the same scale factor as the inputs. To simplify an explanation of the present algorithm, the following symbols will be utilized: S = Phasor Voltampere Hours (kVAh), sometimes referred to herein as apparent power; P = Energy (kWh), sometimes referred to herein as real power; Q = Quadergy (kVARh), sometimes referred to as reactive power; and R = Residue. The following equation, derived from equation (1), explains the relationship of the above measures: S 2 + R = P 2 + Q 2 . The integer residue R is introduced to permit equality in the equation for integer values of P, Q and S. As hereinbefore described, the metering means provides P and Q pulse outputs. These pulse outputs may be stored in respective registers. Determining kVAh, therefore, reduces to the following: given P and Q, determine S and R. In practice, P and Q increment independently. At each increment, new values of S and/or R must be determined. As hereinbefore explained, the microprocessor in a meter typically, and preferably, is a low cost processor and extensive code generation and computing time would be required to determine the squares and square roots of Equation 8. A simplified algorithm, therefore, is needed. A simplified approach can be obtained by recognizing that for successive values of P and Q, e.g., [P n ], [P n+1 ], etc., the following holds: [P n+1 ] 2 - [P n ] 2 = 2[P n+1 ] - 1 = 2[P n ] + 1; and [Q n+1 ] 2 - [Q n ] 2 = 2[Q n+1 ] - 1 = 2[Q n ] + 1. That is, the value of the square of the next integer is obtained by adding to the square of the present integer either twice the value of the next integer minus one or twice the value of the present integer plus one. Using equations (9) and (10), the squaring process can be carried out by simple addition. The squaring algorithm can be explained mathematically by the following equation: Table 1 illustrates the values which would be assigned for increasing values for n: In practice, a register stores values of P, [2P + 1], Q, [2Q + 1], and the sum [P 2 + Q 2 ]. Initially, the P, Q, and [P 2 + Q 2 ] registers are set to zero, while the [2P + 1] and [2Q + 1] registers are initialized to 1. At the arrival of a P pulse, the value in the [2P +1] register is added to the [P 2 + Q 2 ] register, then the P register is incremented by 1 and the [2P + 1] register is incremented by 2. Exactly the same steps are carried out for the Q pulse. A set of registers also is used to store the S and [2S + 1] data, and generation of the S pulses is determined as follows. After arrival of either a P or Q pulse, a trial subtraction of [2S + 1] is made from the [P 2 + Q 2 ] register. If the subtraction does not cause an underflow, an S pulse is generated, the S register is incremented by 1, and the [2S + 1] register is incremented by 2. If the subtraction causes an underflow, the [P 2 + Q 2 ] register is reset to its previous value, the other registers are not incremented, and no S pulse is generated. Further, the sum of the squares register actually holds the value of the residue R since : R = [P 2 + Q 2 - S 2 ]. As the numbers continue to increase indefinitely, it is necessary to terminate the determination and start again. If the power factor varies, the algorithm provides a time average value for the kVAh and power factor. For example, assume that an electro-mechanical meter is being used and the rotation of the kilovar-hour disk of the meter moves a paper chart in a continuous manner while the rotation of the kilowatt-hour disk moves a pen across the chart in a continuous manner. The curve or line graph drawn is a plot of kVARh against kWh. The length of the line graph represents the kVAh metered while the slope of the line at any point represents the instantaneous power factor. If the system were not reset periodically, the pen would run-off the chart. This is analogous to a digital system creating numbers larger than it can handle. If, at the time of reset, the total kilowatt-hours and the total kilovar-hours are noted, a line could be drawn from the noted point back to the origin. The slope of this line would be the "average" power factor and the length of the line would be the "average" kVAh. In general, this line would be shorter than the curve drawn by the pen (unless the curve is a straight line representing a constant power factor). This is analogous to the digital determination of metering pulses. The line approximation is a secant to the curve drawn by the pen. The shorter the secant line, the more closely it approaches the length and slope of the curve. With a recorded pulse data system, the secant is as long as the number of pulses in the demand interval. Within the interval, there is no data to permit any discrete determinations. Processing the data within the meter permits the secant to be as short as desired, subject to other limitations to be described. Determination of S and R has been described, but S is not the length of the secant. Particularly: kVAh = [P 2 + Q 2 ] 1/2 = [S 2 + R] 1/2 = S c . S is an integer having a preselected maximum (convenient) integer constant value (e.g., 4, 8, 16, 32, etc.) at which value the determination is terminated, the residual is scaled and accumulated, and the determination is started again. Physically, the maximum value of S represents the largest integer secant commensurate with the accumulated values of P and Q. S c is, however, the acutal "correct" (non-integer) value obtained from the inputs P and Q. The residue R represents a partial pulse which must not be ignored or thrown away. To address this issue, consider the following: S c = S + [1 + R/S 2 ] 1/2 . The square root can be expanded using the Binomial series and then can be simplified to: S c = S + [R/2S] - [R 2 /8S 3 ] + [R 3 /16S 5 ] - [5R 4 /128S 7 ] +... This expression is a convergent series having alternate terms of opposite sign. Therefore, it oscillates about and converges toward the final value. The expression, of course, is too complicated to evaluate quickly with a small microprocessor, but an approximate value may be obtained by using a limited number of terms. The approximation error will be less than the absolute value of the first neglected term, and it may be observed that this (error) value will be smaller for large values of a maximum S value. Large values of a maximum S value, however, represent longer secants which are less accurate representations of a curvilinear function. The first two terms overestimate the actual result but a close approximation may be obtained by using a small value of a maximum S value (such as 16) and modifying the second term to obtain: S c = S + [2R/(4S + 1)]. At the termination point, the value 2R is added to a register to represent the partial pulse remaining at that time, the other registers are reset, and the computation is restarted. At the next reset point, the value 2R is again added to the register and the total is compared to 4S + 1. If an overflow occurs, an additional "makeup" pulse is generated and 4S + 1 is subtracted from the register. An alternative method having higher accuracy may be used if the reset value for S is chosen to be some small number such as 8, 16 or 32. In this approach, the value of R is used as an index to a look-up table in which the true values of the expression [(S 2 + R) 1/2 - S] are stored. These decimal fractions are multiplied by 2 16 and stored as two byte integers for high accuracy. At the termination points, the two byte integers are added to a register and a makeup pulse is generated when the register overflows. Using either alternative technique, the partial pulses are correctly accounted for, but the pulses occur slightly later in time. Choosing the value of S at which to terminate computation and reset the registers involves some trade-offs. If the value of S at termination is made larger, the proportion of pulses delayed in time is made smaller, but the secant departs more from the true kVAh curve if the power factor is varying. The look-up table also becomes larger therefore requiring more memory. If the maximum value of S is slected to be small, then the possible values of R are limited. Since termination occurs more often with smaller maximum S values, however, more processing (e.g., determination of R and reset) is required. Suitable values for the maximum value of S have been found to be in the range of 10 to 50. The generated S pulses can be accumulated in demand or in time-of-use registers, over fixed or rolling demand intervals, in conventional fashion. The algorithm is not interrupted at the end of an interval or at any other time except for a watch-dog function to initialize the algorithm in the event of a computer malfunction. Each termination of the computation at the selected value of S is associated with some specific integer values of P and Q. For power factors greater than 0.707, P is greater than Q. For power factors less than 0.707, Q is greater than P but the values of P and Q have mirror image symmetry about the 45 degrees axis. The value of Q or P at the termination point can be used as an index to another look-up table in which are stored the values of the power factor associated with each unique value of Q or P. By this means, near real time display of power factor may be obtained. Alternatively, the "average" power factor for the most recent demand interval may be determined from the values of P and S at the end of the interval. The algorithm has been extensively tested with pulse input trains representing randomly varying power factors for random periods of time. The present algorithm also has utility for use with Qhour meters. A Qhour meter is a variation of the VARhour meter. In a Qh meter, the voltage applied to the meter is delayed or lags 60 degrees behind the normal phase voltage instead of 90 degrees as in the VARh meter. Two advantages result from this approach. First, the 60 degrees lagging voltage can be obtained from the other phasors in a three phase system without using phase shifting transformers. Second, the meter will operate in a forward direction for load phase angles up to 30 degrees leading. A VARh meter, in contrast, reverses direction for all leading phase angles. The symbol Q is an electrical industry standard to represent reactive power, kVAR. It is also widely used in the utility metering industry to name a meter operating with a 60 degrees lagged voltage as described above. To avoid confusion in describing the operation of the algorithm as applied to Qh metering, the following symbols will be used: V = VARh; W = Wh; VA = VAh; and Q = Standard "Qh" at 60 degrees lag angle. It is well known that for Qh meter operation, the following equations hold: V = [2Q - W] / 3 1/2 ; V 2 = [2Q - W] 2 / 3 = [4Q 2 - 4QW + W 2 ] / 3; and 3V 2 = 4Q 2 - 4QW + W 2 . Further: S = [V 2 + W 2 ] 1/2 ; and S 2 = V 2 + W 2 . Therefore: 3S 2 = 3V 2 + 3W 2 ; = 4Q 2 - 4QW + W 2 + 3W 2 ; = 4Q 2 - 4QW + 4W 2 ; and = 4 [Q 2 - QW + W 2 ]. If S, Q, and W all have integer values, it is once again necessary to introduce an integer residue R to permit equation 25 to be an equalitiy. Particularly: R= [4Q 2 - 4QW + 4W 2 - 3S 2 ] The problem then becomes: given Q and W, determine S and R. In operation, the W, Q, S and R registers would be initialized to zero. The (2Q + 1), (2W + 1) and (2S + 1) registers would be initialized to one. Upon receipt of a W input pulse from the metering means, the following steps would be performed: (1) add 4 * (2W - 1) to the R register; (2) subtract (4 * Q) from the R register; (3) increment the W register by one; (4) increment the (2W + 1) register by two; and (5) check for S output pulse. Upon receipt of a Q pulse from the metering means, the following steps would be performed: (1) add 4 * (2Q + 1) to the R register; (2) subtract (4 * W) from the R register; (3) increment the Q register by one; (4) increment the (2Q + 1) register by two; and (5) check for S output pulse. To check whether to output a S output pulse, the following steps are performed: (1) compare 3 * (2S - 1) to the value of the R register; (2) if greater than the R register, do nothing and wait for another input pulse from the metering means; (3) if less than or equal to R register, then subtract 3 * (2S + 1) from the R register, increment the S register by one, increment the (2S + 1) register by two, and output an S output pulse. As described earlier for the VARh case, it is necessary to select a value of S at which to terminate the determination and reset. The same factors need to be considered and the same range of values (10 to 50) for S are believed to be suitable. To allow for the partial pulse represented by the value of the residual R at the termination point, the simplest procedure is to use R as an index to a look-up table. In this instance, the values in the table are obtained from the expression: {[4(Q 2 - QW + W 2 ) / 3] - S} The decimal fraction is multiplied by 2 16 and stored as a two byte integer. At each termination point, the two byte integer is added to a register and a make-up pulse is generated when the register overflows. Each termination of the computation at the selected value of S is associated with some specific integer values of W and Q. At a lagging power factor of 0.866, W is equal to Q. For lagging power factors less than 0.866, W is less than Q. For lagging power factor greater than 0.866 up to 1.0 and beyond, to a leading power factor of 0.866, W is greater than Q. The values of W and Q can therefore be used as indices to a look-up table in which are stored the values of power factor associated with each unique value of W and Q. While the present invention has been described with respect to specific embodiments, many modifications, variations, substitutions, and equivalents will be apparent to those skilled in the art. Accordingly, the invention is to be considered as limited only by the scope of the appended claims.

Claims: A method of operating a meter (202, 300) coupled between an end user and a power delivery system, the meter (202, 300) comprising metering means (206, 302) and processing means (208, 306), the processing means (208, 306) comprising register means for storing values of P,(2P+1) ,Q, (2Q+1), R, S, and (2S+1) where P=real energy, Q=reactive energy, S=apparent energy and R=remainder, said method comprising the steps of: outputting, from the metering means (206, 302), and upon each occurrence of the end user consuming a predetermined quantum of real energy (P), a pulse representative of the predetermined quantum of real energy (P), which pulse is provided to the processing means (208, 306), and upon receipt of each real energy pulse by the processing means (208, 306), controlling the processing means (208, 306) to perform the steps of: adding the value of the (2P+1) register means to the value of the R register means; incrementing the (2P+1) register means by two; and incrementing the P register means by one; outputting, from the metering means (206, 302), and upon each occurrence of the end user consuming a predetermined quantum of reactive energy (Q), a pulse representative of the predetermined quantum of reactive energy (Q), which pulse is provided to the processing means (208, 306), and upon receipt of each reactive energy pulse by the processing means (208, 306), controlling the processing means (208, 306) to perform the steps of: adding the value of the (2Q+1) register means to the value of the R register means; incrementing the (2Q+1) register means by two; and incrementing the Q register means by one; generating, in the processing means (208, 306), and from values stored in the register means, a measure of apparent energy (S). A method in accordance with claim 1, wherein the P, Q, and R, registers are initially set to zero and the (2P+1) and (2Q+1) registers are initially set to 1. A method in accordance with claim 1 ,further comprising a lookup table having S and R values for the expression [(S 2 +R) ½ -S] stored therein and wherein upon resetting the register means, the current value of R is used to locate the associated predetermined fraction for S stored in the lookup table and the fraction is then stored in a predesignated register for determining whether the S register should be incremented. A method in accordance with claim 1, further comprising the step of: determining power factor from the values stored in at least two of the register means. A method in accordance with claim 1, wherein generation of a measure of apparent energy (S) comprises the steps of: subtracting the value of the (2S-1) register means from the value of the R register means, and if the subtraction results in a positive number, then generating an S pulse; incrementing the (2S-1) register means by two; and incrementing the S register means by one. A method of operating a meter (202, 300) coupled between an end user and a power delivery system, the meter (202, 300) comprising metering means (206, 302) and processing means (208, 306), the processing means (208, 306) comprising register means for storing values of W, Q, S, R, (2Q+1), (2W+1) and (2S+1), where W=watthours, Q=Qhours, S=apparent energy, and R=remainder, said method comprising the steps of: outputting, from the metering means (206, 302), and upon each occurrence of the end user consuming a predetermined quantum of real energy, a pulse representative of the predetermined quantum of real energy, which pulse is provided to the processing means (208, 306), and upon receipt of each real energy pulse by the processing means (208, 306) controlling the processing means (208, 306) to perform the steps of: adding the value 4*(2W+1) to the value of the R register means; subtracting the value (4*Q) from the value of the R register means; incrementing the W register means by one; and incrementing the (2W+1) register means by two; outputting, from the metering means (206, 302), and upon each occurrence of the end user consuming a predetermined quantum of Q energy, a pulse representative of the predetermined quantum of Q energy, which pulse is provided to the processing means (208, 306), and upon receipt of each Q energy pulse by the processing means (208, 306), controlling the processing means (208, 306) to perform the steps of: adding the value 4*(2Q+1) to the value of the R register means; subtracting the value (4*W) from the value of the R register means; incrementing the Q register means by one; and incrementing the (2Q+1) register means by two; generating, in the processing means (208, 306), and from values stored in the register means, a measure of apparent energy (S). A method in accordance with claim 6, wherein the real energy and the Qhour energy measures are integer quantities. A method in accordance with claim 6, wherein the real, Q hour, and apparent energy are related by: R = [4Q 2 - 4QW + 4W 2 - 3S 2 ] where: S = apparent energy; R = residue; W = real energy; and Q = standard "Qh" at 60 degrees lag angle. A method in accordance with daim 6, wherein the W, Q, S, and R register means are initialized to zero and the (2Q+1), (2W+1), and (2S+1) register means are initialized to one. A method in accordance with claim 9, wherein generating a measure of apparent energy comprises the steps of: comparing the value of 3*(2S+1) to the value of the R Register means; if the value of 3*(2S+1) is greater than the value stored in the R register means, doing nothing and waiting for another input pulse from the metering means (206,302); if the value of 3*(2S+1) is less than or equal to the value stored in the R register means, then subtracting 3*(2S+1) from the R register means, incrementing the S register by one, incrementing the (2S+1) register means by two, and outputting an S output pulse. A method in accordance with claim 9, wherein the value in the R register means is used as an index in a lookup table to determine whether the remainder requires that a makeup pulse be generated. A method in accordance with claim 9, wherein the values of W and Q are utilized as indices to a lookup table in which values of power factor are stored.

Inventors: BULLOCK DONALD FRANK, HARDY SAMUEL GRAHAM, BULLOCK, DONALD FRANK, HARDY, SAMUEL GRAHAM
Applicants: GEN ELECTRIC, GENERAL ELECTRIC COMPANY
Application year: 1992
Main classification: G01R21
IPC codes: G01R21