Electric Power Systems Research, 11 (1986) 13 - 23
13
Residential Time-of-Use Kilowatthour Meter S T E P H E N J. H R I N Y A
and C H E N M I N G
HU
Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, CA 94720 (U.S.A.) (Received May 5, 1986)
SUMMARY
To extend time-of-use (TOU) load managem e n t from industrial to residential users, a low-cost meter with capabilities similar to industrial T O U meters is required. A design study uncovered many opportunities for reducing cost and adding capabilities. For example, efficient software allowed the use o f a low-cost four-bit CMOS microcontroller, and the low-power CMOS circuits allowed the use o f either a non-rechargeable lO-year life battery or a 'supercapacitor' for reserve p o w e r during outages. N e w capabilities included the recording o f date and duration o f the longest outage and a security scheme to foil tampering. Prototype residential T O U meters were developed and tested. In 1984, the cost o f materials for the p r o t o t y p e was approximately U.S. $35 each for a quantity o f 5000 and is expected to be significantly lower for production quantities.
INTRODUCTION
Owing to increasing costs of energy, utilities are presently investigating time-of-use (TOU) billing as an approach to load management. The goal is to provide a system-wide reduction in demand at time of system peak b y use of pricing to encourage users to shift load to off-peak periods. Time-of-use rates can result in minimizing purchasing of electricity from other utilities at high rates, and possibly delay or eliminate construction of new generating facilities [1]. To implement this energy management concept, a metering system capable of recording consumption according to time o f use is required. Additional benefits to the utility include the simplifi0378-7796/86/$3.50
cation of the acquisition and recording of metering data, and provision of additional information such as peak and cumulative user demand. TOU metering has already been investigated for industrial and agricultural users where the large level of power usage justifies the considerable expense of the metering system [2]. The large number of meters needed for a residential metering system makes a simplified and much less expensive meter desirable. The object of this research was to investigate cost-effective designs of the TOU meter. The design effort centered on reducing meter complexity and cost, while maintaining as much functionality as possible. Other elements of a TOU metering system (meter readers and central office computer) were investigated in previous research [3]. The meter design requires minimization of costs for components and manufacture without sacrificing accuracy or reliability. The meter must have a long lifetime operating over a wide temperature range (--40 to +85 °C) and varying electrical and environmental conditions. Rigorous testing procedures applied to commercial meters were considered in the meter design.
WATTHOUR MEASUREMENT
Few production line products can compare with the watthour meter in accuracy, long life, and e c o n o m y [4]. TOU meter requirements for programmability and for accurate timing during outages suggest the use of a microcomputer based design. However, the large load currents which must be measured impede a totally electronic approach to watthour measurement. Time-of-use meters © Elsevier Sequoia/Printed in The Netherlands
14
designed by General Electric, Westinghouse and Sangamo have been implemented b y the addition of a microcomputer system to a standard electromechanical watthour meter [1,5-7]. To interface a watthour meter with a microcomputer, an electrical pulse must be generated each time the rotor revolves through a set angle. Sensing techniques that may be appropriate for a pulse initiator include magnetic sensing, reflective or transmissive optical sensing, or mechanical pickup. Any means of detection which places a frictional load on the rotor is unacceptable because it effects the accuracy of the kWh measurement. Approaches such as a magnetic strip, reed switch, or Hall effect may be undesirable, as they may disturb the eddy current flow in the rotor. Reflective optical Sensing is limited by the low available o u t p u t current signal which is very dependent on mechanical, alignment and susceptible to noise, making reliable sensing expensive and difficult. Mechanical pickup approaches involving modifications of the mechanical register appear expensive owing to the labor-intensive assembly required. A transmissive optical detection m e t h o d is a conceptually simple m e t h o d for pulse initiation. However, positioning of a separate LED emitter and phototransistor could lead to high assembly costs. The pulse initiator for the meter p r o t o t y p e was designed using a TRW OPB804 optical switch, chosen for its small physical size and low cost. The sensor
BOTTOM
VIEW
I~ •6mm
•
6.
(e)
I
I
A
E
q-mm ,
--@
(a)
is a U-shaped plastic package with an infrared LED m o u n t e d in one leg and a phototransistor in the other (Fig. l(a)). Such sensors are used in large quantities for positioning in printers and disk drives, thus volume prices are very low. The sensor is combined with a slotted optical sensing disk (Fig. l(b)). The disk is installed by pushing it onto the rotor shaft through the slot until it snaps into place. The slot also provides an opening for the OPB804 sensor to detect (Fig. l(c)). Light from the LED passes through the slot striking the phototransistor causing it to saturate. When the disk passes between them, the transistor cuts off. CMOS compatible logic pulses can be generated without the need for amplification or buffering (Fig. l(d)). A pulse is generated once per disk revolution, thus the mechanical Kh factor (watthour constant) is the same as the electronic K h factor used by the microcomputer. This approach provides a low-cost and reliable means of pulse generation. The addition of the sensing disk to the rotor shaft will cause a slight increase in the m o m e n t of inertia of the rotor assembly. It can be shown that a change in rotor inertia will n o t effect the operation of the meter [8]. A very important assumption essential to this sensing approach is that a radial clearance of 1.2 cm and an axial clearance of 1.75 cm are available at some position along the rotor shaft. Most meters observed have these required mechanical clearances. For meters not having the needed clearances,
(b)
270nli~¢~ 't[:i (d)
t
lOkn ME
v
INPUT
Fig. 1. Transmission optical feedthrough sensor for sensing the disk rotation: (a) OPB804 package outline; (b) slotted disk; (c) sensor detects the slot in the disk; ( d ) c i r c u i t schema for CMOS compatible logic pulses with 0.5 V noise margins.
15
the sensing mechanism modified.
would have to be
BACKUP POWER FOR TIMING AND DATA RETENTION
An essential requirement for the meter is data a n d clock carryover during power outages. This requirement is o n e of the most difficult to meet of the entire meter design. The desire for long life without servicing makes periodically replaced batteries an unattractive means of powering the clock during outages. Other approaches are available only if the clock circuitry power requirement is sufficiently low. Timer chips are available, implemented in CMOS, which with the addition of a crystal will provide most Of the timing requirements for the TOU meter. Significant cost savings may be realized if a microcomputer with internal timer register can be found with p o w e r consumption similar to that of the timer chips. CMOS logic is the choice for low-power applications, because it consumes essentially zero power when in a static state. However, static CMOS requires much more area than other VLSI implementations [9]. For this reason, microcomputers designed in CMOS tend to be much less powerful than those implemented in NMOS. Presently most CMOS microcontrollers use four-bit data words and contain only a small amount of RAM. CMOS microcomputers from several vendors were investigated. Many of these components offered low-power modes of operation. The lowest p o w e r devices were the # P D 7 5 0 0 series four-bit microcomputer family sourced by NEC. The c o m p o n e n t selected was the pPD7508. It was chosen for its relatively large on-chip m e m o r y capacity and because it has a timer/counter register. There are 224 four-bit words of RAM. Even this a m o u n t of RAM severely limits the capabilities of the meter, so software must be written with care for conservation of RAM space. There are 4096 eight-bit words of ROM on-chip. The meter software used a b o u t 2500 words. The p P D 7 5 0 8 A is an equivalent c o m p o n e n t except that some its I/O lines and RAM space are dedicated to a vacuum fluorescent display {VFD) controller.
This could allow the addition of a VFD to the meter with a minimum of hardware modifications. Another important aspect to the selection of the # P D 7 5 0 8 was that a prototyping chip (D75CG08E) with the same pinout as the 7508 and a 'piggyback' EPROM was readily available. Worse case current consumption is 900 #A, which may be lowered to 20 pA in the STOP powerdown mode of operation to be described below. The c o m p o n e n t operates from 2.7 to 5.5 V, and a wide temperature range (--40 to +85 °C) part is available. The components also have a unique dual clock system. An on-chip R/C multivibrator provides the system clock used to control instruction fetch and execution. An accurate timing reference may be provided by an on-chip crystal oscillator. A 32.768 kHz watch crystal was used for a timing reference accurate to within 6 min per m o n t h under worst-case temperature extremes. Clock recalibration during meter readings should keep the meter clock accurate enough to be acceptable for defining billing rate periods. When a power loss is detected, special software is used to maintain the timing registers. The STOP mode is entered and the system clock is stopped and the microcomputer becomes inactive. The crystal oscillator and timer continue to function normally and are the only elements that consume power. Every half second the system clock restarts, bringing the processor o u t of STOP mode. The processor then updates the timing registers and reenters STOP mode as quickly as possible. An extremely stable timing reference may be obtained by sampling the 60 Hz AC line. A zero-crossing detection circuit can be made with a few components to produce a digital pulse each time the line voltage crosses zero volts. The use of the AC line as a reference is redundant, even though it is more stable, because a crystal reference would still be needed to carry through power outages. Meter data can be stored in electrically erasable nonvolatile m e m o r y b u t the problem of keeping time through an outage would remain unsolved. Thus EEROMs alone are not a viable solution. An interesting approach to clock carryover through outages is the 'loss of voltage timer' [10]. A 250 /~F[ 66 M~2 R/C combination is kept fully charged during normal operation. When an outage
16 occurs the capacitor discharges. Upon power restoration, the time required to recharge the capacitor to a comparator reference point is measured and from this the outage duration is deduced. Accuracy is limited by c o m p o n e n t and supply voltage tolerances and by the capacitor leakage resistance. An accuracy of 15% for a six-hour outage at 55 °C was reported [10]. For reasons of accuracy, this circuit approach was n o t adopted in our design. Battery backup is the most obvious approach to clock and data carryover. Battery replacement is the drawback to this approach. Nickel-cadmium batteries are rechargeable, so t h e y appear to be an attractive option. However, Ni-Cd batteries may exhibit discharge memory, have a low cell voltage and must have a controlled charge rate, requiring additional circuitry, cost and board space. Lithium based batteries are quickly entering designs where small size, long life and low cost are the primary requirements [11]. Eight manufacturers of lithium cells were contacted and from these the Eagle-Picher LTC-7PN lithium/thionyl chloride battery was chosen because of its low cost and small size. The battery has a working voltage of 3.5 V, capacity of 750 mAh and a --40 to 125°C operating temperature range. The battery can support continuous discharge of 20 - 30 pA for three years. The discharge characteristic is flat and lifetime is not strongly temperature dependent. A drawback of the flat discharge characteristic is that it is extremely difficult to measure the remaining battery charge and signal the need for replacement. However, cell storage capacity remains greater than 85% after ten years at room temperature. Since the battery supplies current only during infrequent power outages, a lifetime of ten years is a reasonable expectation.
SUPERCAPACITOR EVALUATION The low STOP mode current (20 pA) and large operational voltage range (down to 2.7 V) make a capacitor a possible choice for a reserve power source. For carryover of one day, a 0.3 F capacitor would be required. Although this appears to be an unreasonable value, such components have been available
since 1980 from NEC, Panasonic and Toshiba [12]. Electric double-layer capacitors, dubbed supercapacitors, can pack 1 F into less than a cubic inch of volume. At every interface, an array of charged particles called an electric double layer is thought to exist. In an electric double-layer supercapacitor, charge is stored at the interface between activated carbon particles and a sulfuric acid based electrolyte. The carbon particles have a surface area of 1000 m 2 g-l, thus a capacitor with large capacitance and small size can be made [13]. NEC supercapacitors were investigated because they were readily available and inexpensive. The FZOH105Z is a 5V, 1 F device with a diameter of 28.5 mm and height of 25 mm. Since no chemical reaction occurs, the devices may be charged and discharged an unlimited number of times. Owing to the low electrolyte content and hermeticity of the unit cells, supercap lifetime is not limited by electrolyte dry-up. The components are rated for an operating temperature range of --25 to +70 °C. It was decided to investigate the FZOH105Z to see how it would perform as a reserve power source for the TOU meter, and to get a feel for its temperature dependence. To measure the effectiveness of the supercapacitor as a reserve power source, the low-power operating load of the pPD7508 was simulated and the capacitor voltage monitored. The achievable backup time is the elapsed time for a drop in capacitor voltage from 4.6 to 2.7 V. Since a backup time greater than a day is deemed desirable, a special test circuit was developed to monitor the capacitor voltage. A test circuit was controlled by an 8748 microcontroller and an MM58174 timer chip was used to keep track of elapsed time. The capacitor under test was attached to a 250 k ~ load resistor to simulate a 20 ~A load at 5 V. A 5550 ~2 resistance was switched into the load circuit by a p-channel MOS transistor to simulate the 900 pA (at 5 V) worst-case loading of the pPD7508 when it exits STOP mode. An interrupt is received from the MM58174 every 0.5 s. Upon receipt of this interrupt the 8748 turns on the p-channel switch for 5 ms, simulating the loading of a pPD7508 operating at a 1% d u t y cycle, a generous estimate (the actual d u t y cycle of the meter software
17 was 0.036%). The carryover times measured by the test circuit are thus conservative performance estimates. Five LM339 comparatots were used to check the capacitor voltage against five trigger levels set at 4.75, 4.6, 3.0, 2.73 and 2.70 V. Time elapsed between the triggering of the first trip point (4.75 V), and the triggering of the 2.7 V trip point was defined as the achievable carryover time. Carryover time measurements were made using five samples of the F Z O H 1 0 5 Z supercapacitor. High-temperature measurements were also made using a heating element and thermocouple. After the temperature stabilized, the capacitor was charged and the carryover time measurement was take. Results of the measurements are plotted in Fig. 2. 60
'
1
'
1
'
1
I
i
'
1
'
A ~0
~-
~8
O
T
E I.-
> 0
I0
u
2~-
12
J 20
I
i
30
q-O
I 50
Temperc~ture
,
I 60
i 70
(°C)
Fig. 2. P l o t o f p o w e r c a r r y o v e r t i m e v e r s u s t e m perature using the FZOH105Z supercapacitor and pPD7508 CMOS mierocontroller.
Clock and data carryover time is greater than two days at room temperature. The backup capability of the supercapacitor falls dramatically with increasing temperature owing to lowering of the internal leakage resistance. Carryover of a day can be specified up to 55°C. Of the various reserve p o w e r schemes, the lithium battery and supercapacitor appear most attractive. However, carryover of a day may only be specified for a - - 2 5 to +55 °C temperature range for the supercapacitor. A meter with supercapacitor reserve power could be satisfactory for use indoors or in areas with mild climates. For the design
specification of operation from --40 to +85 °C, lithium battery backup is recommended. A ten-year life can be expected for the lithium battery. Two p r o t o t y p e meters were built, one with a lithium battery and one with a supercapacitor. Owing to the similar circuit topologies, a c o m m o n circuit board was used for both versions.
DISPLAY
AND INTERFACE
WITH METER
READER
For time-of-use metering to be effective, information must be provided to the user to assist in load control. Industrial TOU meters generally provide a digital (vacuum fluorescent) display on which energy and demand for each rate period may be displayed. To implement a display o f this sort, a display element with wide operating temperature range and associated driver circuitry are required, adding significantly to the cost of the meter. For the residential meter, indication o f the rate period in effect may be sufficient information to decide whether or not to defer use of a large appliance. A more complicated display would probably frustrate most residential users and may even invite tampering. Two LEDs were used in the TOU meter p r o t o t y p e , one to indicate mid-peak period (yellow) and one to indicate peak period (red). Both indicators are off during the off-peak rate period and both are on to indicate error or uncalibrated status. The LEDs are flashed briefly once each disk revolution to indicate the rate at which power is being consumed. The TOU meter must provide some sort of identification to the meter reader unit during reading. A ten~ligit customer identification number is stored as ten BCD four-bit nibbles in the prototype. Another meterspecific datum is the meter Kh factor (number of disk revolutions per kWh). A 16-bit binary number (multiplied b y 0.002) was used to r e p r e s e n t K h for values ranging from 0 to 131 with a maximum error of 0.001. Meterspecific data present a storage problem. If the data were stored in RAM, there is the possibility that these data could be lost in the case of a failure of the reserve p o w e r source. The utility could use the mechanical register value and previous usage records to determine
18 billing in this case but retrieval of meterspecific data would present extra difficulty. Permanent storage such as programmable ROM is suggested for storage of meterspecific data. A 32-word by eight-bit bipolar PROM was used in the prototypes. A socket must be provided so that individually programmed PROMs may be installed in each meter. The PROM and socket are major contributors to meter cost. Fortunately, the extra PROM outputs could be used to drive the display and communications LEDs, and provide a power loss indicator. A reliable and secure data communications path must be established to exchange data with the meter reader unit. The desire to keep the meter element completely sealed off from the weather and electrically isolated from the meter reader requires elements for transmission and reception through the glass meter cover. Serial data communication using a standard eight-bit RS-232 protocol is a cost-effective approach which maintains compatibility with inexpensive portable computers that could be used as meter readers. Serial data communication is implemented using special meter software driven by the timer/counter at a bit rate of 1200 bits per second. The need for handshaking signals was eliminated by inserting a delay between each data word in both directions. The delay is longer than the longest processing delay for either side. The use of delays reduces the overall transmission rate, but is the tradeoff required so t h a t only one signal path and one emitter/detector pair is needed in each direction. Communication through the glass meter cover by magnetic or optical means was considered feasible. The first approach investigated was to use a magnetic mutual inductor. The system clock signal could be transmitted for 1/1200 s to represent a logic 1. The absence of a clock signal for a bit period could be used to represent a logic zero. The signal could be used to drive a current through a coil m o u n t e d on a 'U' ferrite core. The meter reader unit would have a similar 'U' core to complete the magnetic circuit. The magnetic approach has many advantages. Magnetic components will not degrade over long periods of time. The magnetic circuit is relatively insensitive to positioning, dust on the meter cover and
interference from naturally occurring signals. However, the magnetic approach does not meet size and cost constraints. A major problem is the size of the core element for the magnetic circuit. The distance between the poles of the 'U' core must be much greater than the expected 1 - 3 cm air gap through the meter cover so that the magnetic circuit is completed through the receiver element. The coil driver/suppression network and bandpass filter demodulator require many components and lots of board space. An optical serial data link was chosen for the interface. A TRW OPL800 photologic sensor and a spectrally matched OP131 GaAs infrared emitting diode were used for the transmitting and receiving elements. Both parts are packaged in a hermetically sealed lensed metal can and are rated for operation from --55 to 110 °C: The optical interface has few components, occupies little board space, and is inexpensive compared with a magnetic interface. Communications were observed at separations up to 8 inches. A more powerful emitter could make remote reading a future possibility. Unlike the magnetic interface, the optical interface is sensitive to external stimulus such as sunlight. Special software is required to determine and ignore extraneous signals. The optical interface may also be affected by dirt on the meter cover. The infrared emitter has a limited lifetime when compared to magnetic components, but proper current derating should insure that this is not a problem.
OTHER HARDWARE CONSIDERATIONS Meter circuit design emphasized low cost and high reliability. Operation at 115 V or 240 V line voltage is jumper selectable. The unit can operate over a range of -+25% of nominal line voltage. It should pass a halfcycle d r o p o u t test, and a basic impulse level test to 2000 V RMS. All components are specified for operation over the --40 to +85 °C temperature range. All components (except the display LEDs} have metal or ceramic packages, providing i m m u n i t y to humidity. The meter power requirement is low, typically 1.7 W {2.7 W maximum). Since the maximum signal frequency in the circuit is only 100 kHz, electromagnetic
19
FP~ 0-300
[ ---------]
rv--~,,---~,
_I. L 7 8 0 5 Iout
-
alls
R8 -2810 "
a2i°
°
I+ I ~ ° " F
-
Vdd
18on RcI]-
Pq --~
o~
A3
~
~o i
7/~ /
O~
2 °~---
--NC --NC
;
J
OPTICAL~'a ~ COMMUNICATIONS INTERFACE
~
-
2 ~
Xl
5 RES
3 2 " ~ i T,W~ x2 0 CLI
P6 P7
_L
Fig. 3. Circuit s c h e m a for t h e T O U m e t e r p r o t o t y p e using a s u p e r c a p a c i t o r source. M o d i f i c a t i o n s for use o f a l i t h i u m b a t t e r y are d e s c r i b e d in t h e t e x t .
interference should not be a major problem. Figure 3 shows the circuit used for the supercapacitor based prototype. Level shifting resistors RA and RB are not needed for the battery based prototype. However, an additional Schottky barrier diode is required in place of Rc to prevent current from entering the battery during normal operation. The physical size of the meter circuit is very small. The power supply was designed with low-profile components so that the thickness of the populated circuit board was only 28 mm. The circuit board is semicircular with a radius of 7.2 cm and width of 7.1 cm. Double-sided circuit boards were fabricated for the prototypes. A photograph of the p r o t o t y p e meter mounted onto a mechanical kWh register is shown in Fig. 4. Price quotes were obtained for all the electrical components in July and August of 1984. The total electronic hardware cost for the meter was approximately U.S. $35 for a quantity o f 5000 (minimum order quantity for masked programmed/~PD7508s). Labor cost and other markups were not
as
a
reserve
power
included because they could n o t be accurately estimated. The hardware cost should drop significantly in production quantities. A more complete circuit and pricing description may be found in ref. 8.
Fig. 4. P h o t o g r a p h o f t h e T O U m e t e r p r o t o t y p e m o u n t e d o n an e l e c t r o m e c h a n i c a l k i l o w a t t h o u r register. The optical p r o b e o f t h e m e t e r r e a d e r unit is also s h o w n .
20 SOFTWARE OVERVIEW The meter software was developed to get the most functionality from the limited RAM space of the pPD7508. When a subroutine is entered, or when a valid interrupt is received, the return address is stored as four four-bit words in the program stack. The stack space must be located somewhere in the system RAM. The a m o u n t of m e m o r y assigned to the system stack was limited to eight words. This allows nesting of two subroutines (only one for an interrupt handler). If the main program enters a subroutine, the interrupt must be disabled first, or the stack will overflow into data registers. The strict stack restrictions limit the functionality somewhat. The meter must be able to count timing pulses and keep track of the time and data. An eight-word master timing register is used to keep track of the timing pulses. A register (SCNT2) is reserved to count the 2 Hz timing pulses. When SCNT2 overflows (every four seconds) the four-second counter in the master timing register is incremented. The foursecond counter is implemented as a modulo 15 counter overflowing once per minute. Each minute the time is updated, the hour and an AM/PM flag are updated as needed. The master timing register also stores the day, date and a four-year counter used to make the leap-year adjustment. In order to keep track of time over long periods, the dates of the daylight savings time adjustments are stored. At 2:00 AM the software checks the date against the daylight savings dates and makes the one-hour adjustment if needed. The meter divides the day into three rate periods, a peak period surrounded by midpeak periods, the rest of the day being an offpeak period. The transitions between rate periods are defined by four breakpoints. Four billing periods (seasons) are definable, each with independently definable breakpoints. Seasons are defined by four day of season change dates. The season change dates and rate period breakpoints are checked every minute and season and rate period status are updated. The organization of the master timing register, dates and breakpoints is shown in Fig. 5. The meter stores eleven programmable dates which may be used to define holidays. It is desired to define a separate rate period breakpoint schedule for the holiday and
Masler
Timing
Register
Date .%lorage
Season
I .....
MMM .......
D .....
Lo~gesl
M d b4
M M M %1 1) D I) I) d rl d It l] }l II
,: .i : , , , ,,, ~ t t
L
!
......
Outage
mcltt rood,
Breakpoints
i "MO .
.
.
i
.
=:: A
Date and Duration
OO = 4 ~co~()n m o d e I ( I 11 = T E S T m o d e
O1 = 3 ~ea~on m o d e
range
) 11(X) = D e c e m b e r 1--31 ( 0 l - - I F )
~ogl't at'ok i,,t~r
(10() =
,Sunda~
:, ~utcs i ,1,c,),,,1 ,,,,,r ,er ~ ;=~a:, ~ *r~:.,:
,c:r~£(' 0 - 5 ' ~ ( O O - 3 B ) , , t c , e r n e t t / , , d e,,(,, v 4 s e c o n d s *,k ]*,,ez., [6 tni,ta)ge~ m a x i m u m
m~,n:h ~a~ Lf n t o n h
00()1
~
1"
1 1 0 = Saturday I l(}( = 1200
Fig. 5. Bit patterns for the master timing register, dates and breakpoints, and the longest outage date and duration register. All data are stored in four-bit format. weekend dates, but there is not enough RAM storage space available. This problem was solved by implementing two modes of meter operation. The first mode of operation is four-season mode. In this mode, four distinct seasonal rate schedules are defined, and holidays and Sundays default to the midpeak billing period. The second meter mode is three-season/holiday mode. Only three seasonal rate schedules may be defined; the storage space normally used for season 4 is used to define a holiday rate schedule. The unused season change date is redefined as a twelfth holiday. A TEST mode of operation was also implemented which functions identically to the other meter modes, except that the timer modulo register is loaded with a value which will overflow at roughly ten times the normal rate. In TEST mode, a 'meter day' passes every hour and 13 minutes. The TEST mode was used to aid software debugging, but is envisioned for use in production testing to simulate long periods of meter operation. Billing data for each of the three daily rate periods must be stored for the current billing period and for the previous billing period. Three types of billing data are energy usage (kWh), indicating demand and continuous cumulative demand (kW). The energy values are stored as four-digit binary coded decimal (BCD) values ranging from 0000 to 9999 kWh. Indicating demand is stored as a three-digit BCD value and cumulative demand as a four-digit value. The energy usage figures are produced simply by counting disk revolutions, and when 1 kWh has been used, the kWh register for the current rate period and the total kWh register are incremented.
21
Demand is calculated b y accumulating the number of sensor pulses over a time interval k n o w n as the demand interval. Valid demand intervals for the p r o t o t y p e are 5, 10, 15, 20, 30 and 60 min. The pulse count that would have occurred in one hour at the rate over the demand interval is then calculated. This hourly count can be multiplied b y K h to get the demand value in kW. The newly calculated demand is compared with the value in the indicating demand register for the current rate period and, if it is greater, then it becomes the new indicating demand. The difference between the new and old indicating demand is added to the continuous cumulative demand. The indicating demand will contain the peak demand found in the rate period over the whole billing period. The cumulative demand contains the sum of peak demands for the current rate period and all previous rate periods. A novel feature was added to the TOU meter that has not been previously implemented. This feature is the 'longest outage date and duration' register, used to store the date, time and duration of the longest p o w e r outage (see Fig. 5). The utility could use this information to map the geographical extent of any outage, and also monitor the speed at which service was restored to different areas. Abnormal outage information could be used to indicate possible tampering with the meter. The software constantly monitors the PROM outputs to detect a power outage. When an outage is detected, the software enters a special routine. A flag is stored which will indicate at a later time that an outage was detected. Then the microcomputer goes into a low-power operation routine which enters STOP mode. Every 0.5 s the microcomputer is pulled o u t of STOP m o d e by a timer overflow. It updates the timing registers, then reenters STOP mode. When p o w e r is restored, the processor is reset and enters an initialization routine. This routine looks for the outage flag and adjusts the longest outage register if needed. The master timing register, and the season and rate period status are updated. The software then returns to normal except that the first five minutes after the outage are exempt from demand calculation {since demand is likely to be artificially high immediately after an outage). If the outage flag was
n o t found, the initialization routine will check for the case of an extremely brief outage in which the flag could n o t be set b u t a reset occurred. This condition is checked by testing the values stored in the date, time and billing registers to see if the data words are within a valid range. The probability of random data passing such a test is extremely small. If invalid data are found, then the entire RAM is cleared and certain registers are initialized and error (uncalibrated) status is displayed.
DATA COMMUNICATIONS AND SECURITY A large portion of the meter software was used to control the data communications interface. An interface protocol was developed complete with security features. Industrial TOU meters have a standard communications protocol [14]. These standards were not used because the four-bit architecture is so different that it would be very inefficient to use eight-bit storage formats. The meter communications protocol is initiated by receipt of a start of transmission (SOT) character (hex '02'). The start bit of this character should interrupt the microprogram and cause it to read in the SOT character. Upon receipt of a valid SOT character, the meter transmits a 14-byte sequence which includes the meter Kh followed by the customer identification code. Each time a meter is read or calibrated, it is programmed with an eight-bit security code. On initial power-up the meter loads the security code register with a default value (hex '00'). After the meter responds to the SOT character, it uses the security code from the most recent calibration (or the default) in an algorithm to generate a security key. The security key is generated by arithmetically and logically manipulating bits in the customer ID together with the security code. The meter reader uses an identical algorithm to generate its version of the security key. In order to generate the key, the previously used security code must be available as part of the meter calibration data. After executing the security algorithm, the meter reader transmits its version of the security key to the meter. The security key is followed by a single-byte command which
22
determines the data transfer to take place. The meter receives the key, and compares it with its version. If t h e y match, the c o m m a n d byte is read in. However, if an improper key is sent, the meter ignores the c o m m a n d byte and reverts to its initial state (waiting for an SOT character). If the meter does not respond after the meter reader sends the key and command, the meter reader will then reexecute the communications sequence from start using the default security code on the second try. The meter software is designed to allow a second try after an invalid security key has been sent. If the second attempt is invalid, the meter will set error status on its display LEDs and ignore any signals on the communications interface for three minutes. The c o m m a n d byte may take one of five values. Two commands read data from the meter and three commands are provided to write calibration data to the meter. This seemingly large number of transmission sequences is designed to handle anticipated meter reading situations. In a short meter read, the meter responds by transmitting all billing data to the meter reader followed by outage data, date of last calibration, master timing register value and total meter kWh value (52 bytes). In a full meter read the meter transmits all calibration dates and rate period breakpoints in addition to the data provided by a short read {99 bytes). All data are sent sequentially in the same sequence as t h e y are stored in the RAM w i t h o u t reformatting. This allows for transmission of highly compacted data, speeding the communications interface, and reducing the storage requirements of the meter reader unit. A short calibration recalibrates the master timing register (six bytes). The final byte is the new security code. A meter calibration is equivalent except that three extra bytes are inserted to recalibrate the meter kWh register. A full meter calibration is used to load new dates and breakpoints into the meter (52 bytes). All communications data sequences are terminated by the transmission of a status byte from the meter to the meter reader. The status, ASCII G for good and E for error, tells the meter reader if any errors were encountered in the receipt or transmission of any data byte. If the meter reader receives an E status at the end of a communication sequence, it should repeat the sequence.
Data security was a major factor in the definition of the meter communications protocol. To gain access to the meter data, a tamperer would have to know the algorithm to generate the security key, and additionally would have to know the previous security code programmed into the meter at the last reading. The security code cannot be read through the interface. The meter will shut down the interface for three minutes upon reception of two incorrect security key values, further frustrating any illegal access. There is no means by which data can be entered into the billing registers through the communications interface. Longest outage data could be used by a central office computer program to determine if users are bypassing their meters. The meter kWh and timing values are also checked, revealing any meter inaccuracies. The meter also sends the date of last calibration. A status bit indicates whether the last calibration a t t e m p t was good or bad. The central office computer could check this date against its records to see if illegal accesses have been attempted. Finally, the meter is completely self-enclosed, and the simple display may make the meter less inviting to casual tempering. All of these features combined should make the meter very secure.
CONCLUSION
A design study for a low-cost residential time-of-use meter has been completed. Several new approaches to reduce cost and enhance performance have been analyzed and implemented. They include the use of a lowcost four-bit CMOS microcontroller, a simple transmission optical pulse initiator, the use of a non-rechargeable ten-year life lithium battery or of a 'supercapacitor' together with low-power CMOS circuitry for carryover o f timing and data through outages, elimination of alphanumeric display in favor of a simple two-LED display, and an optical communications port that requires only one emitter/receiver pair (instead of the usual two pairs) per direction. The low-cost microcontroller required an efficient and compact software program to maximize functionality. This requirement was met and new capabilities were proposed and implemented. The date
23 and duration of the longest pow e r outage since the last m e t e r reading is recorded. This could help the utility in gathering outage data and detecting tampering. To gain access t o the meter, the m et er reader must pr oduc e a security key using a special security algorithm and in f o r mati on f r om the previous reading. Th e p r o t o t y p e TOU m e t e r was d e m o n s t r a t e d to representatives o f Pacific Gas and Electric, Southern California Edison, and the California Public Utilities Commission on November 19, 1984, at the University o f California, Berkeley.
ACKNOWLEDGEMENT This research was supported by a grant f r o m Pacific Gas and Electric, Southern California Edison and San Diego Gas and Electric, arranged by Dr. Vlado Bevc and George Amaroli o f the California Public Utilities Commission. Mr. Amaroli also suggested the use o f supercapacitors.
2 Agricultural Load Management Program, Southern California Edison, January 1983. 3 M. S. Jerbic, Time of use metering system, Master's Project Rep., University of California, Berkeley, June 1983. 4 Handbook for Electricity Metering, Edison Electric Institute, Washington, DC, 8th edn., 1981. 5 TM-80 Block Diagram and System Overview, General Electric, Sumersworth, NH. 6 Time-of-Use Meters with EMF-2 Electronic Multifunction Register, Westinghouse, Raleigh, NC, Catalog 42-155, November 1983. 7 Introducing JEM-2, Scientific Columbus, Columbus, OH. 8 S. J. Hrinya, Residential time-of-use kWh meter, Master's Project Rep., University of California, Berkeley, February 1985. 9 D. Hodges and H. Jackson, Analysis and Design of Digital Integrated Circuits, 1983, pp. 97 - 378. 10 Development and testing of a multifunction electronic watthour meter, Termination Rep., EPRI Project RP 1420-1, November 11, 1983. 11 R. H. Cushman, Small, long life lithium batteries suit mainstream applications, Electron. Design News, (Dec. 8) (1983) 214 222. 12 A. Juokodis, Supercapacitors serve as standby power sources, Electron. Design, (Dee. 30) (1982) 159 164. 13 K. Sanada and M. Hosokawa, Electric double layer supercapacitor, NEC J. Res. Dev., (Oct.) (1979) 21- 28. 14 C12 Subcommittee 13, T-O-U registers, Draft Time-of-Use Registers for Watthour Meters, IEEE, New York, May 11, 1982, p. 10. -
-
REFERENCES 1 Multi tariff metering specification guide, Sangamo Tech. Bull., (10342) (1980).