Not applicable.
The present invention relates to a method and apparatus for measuring a waveform and, more particularly, to an electricity metering method and apparatus using a data processor interrupt to initiate sampling of voltage and current waveforms.
Electric power is typically generated at a remote, central generating facility and transported to the consumer over a distribution system. To reduce power transportation losses, a step-up, subtransmission transformer is used to increase the voltage and reduce the current for transmission over a transmission line. The actual transmission line voltage usually depends on the distance between the subtransmission transformers and the consumers of the electricity but is commonly in the range of 2–35 kilo-volts (“kV”). Distribution substation transformers and distribution transformers of an electric utility's secondary power distribution system reduce the voltage from the transmission line level to a distribution voltage for delivery and use by industrial, commercial, and residential consumers. In the United States, for example, electric power is typically delivered to the consumer as an alternating current (AC) voltage ranging from 120 volts (“V”) to 660 V, depending upon the use. As generated, the fundamental AC voltage and current approximate “in-phase,” 60 Hertz (“Hz”) sine waves over time.
The consumption of power by individual consumers and the performance of the distribution system are monitored by power meters. Power meters are used to monitor a number of electrical parameters related to power distribution and use, including the active power, the time rate of transferring or transforming energy, and the apparent power, the product of the root mean square (RMS) voltage and current. In addition, the reactive power, the product of the RMS voltage and the quadrature component of the current, and the power factor or quality factor, the ratio of active power to apparent power, are commonly monitored. The usefulness of monitoring a variety of electric power parameters has favored adoption of digital power meters that incorporate digital data processing systems. In a digital power meter, the voltage and current waveforms are captured as digital data and the data processing system calculates the various electric power parameters from the digital waveform data using appropriate mathematical formulas that are typically stored in the meter.
Referring to
where:
where:
Accurate measurement of the various electrical parameters, including effective power, with a digital power meter requires accurate control of the sampling interval. Typically, digital electric power meters include a sampling unit for each phase of the single phase or 3-phase current carried by the transmission line. The sampling unit controls and performs the sampling and digitizing of the voltage and current waveforms. A sampling unit typically comprises a voltage transducer, a current transducer, an analog-to-digital converter (ADC) to convert the instantaneous amplitudes of the voltage or current samples to discrete digital signals of finite precision; one or more digital signal processors (DSP) to read and store the digital values of the voltage and current samples and a sampling clock to provide a precise sampling interval to the ADC and DSP. Typically, a DSP dedicated to the task of reading and storing the sample values of the voltage and current polls the ADC or responds to an interrupt initiated by the sampling clock to read the ADC.
The processing power of microprocessors has significantly increased and microprocessors are available with sufficient processing power to perform the sampling of the voltage and current waveforms as well as the other tasks related to the operation of a power meter. Microprocessors are often used to perform a plurality of tasks that may occur coincidently and commonly use interrupts to determine the order of performance of the various tasks. A microprocessor responds to an interrupt request signal, usually from external hardware, by suspending processing of a lower priority task; storing addresses for the interrupted program instructions and any intermediate results of the suspended task; and initiating processing of the interrupt service routine, the program instructions for the higher priority interrupting task. Upon completion of the interrupting task, the microprocessor returns to the interrupted task and, unless a higher priority, second interrupt has been received, continues processing the interrupted task. While microprocessors are commonly used to perform multiple tasks, interrupt latency makes combining the real time tasks, such as those performed by the sampling unit of a power meter, with the other data processing tasks related to meter operation problematic. Interrupt latency refers to the time interval between the assertion of an interrupt and the initiation of the interrupt service routine for the asserted interrupt. Interrupt latency makes the timing of the initiation of the execution of the interrupt uncertain, making the timing of real-time tasks, such as sampling unreliable, and, as a result, potentially making the output of the meter inaccurate. If a data processing device could perform sampling as well as other power meter tasks, a digital signal processor dedicated to the sampling task would be unnecessary and the cost of digital power meters could be significantly reduced.
What is desired, therefore, is a method and apparatus for periodically sampling an electrical waveform with a data processor that performs tasks other than waveform sampling.
Referring in detail to the drawings where similar parts of the invention are identified by like reference numerals, and, more particularly, to
The sinusoidal AC voltage 20 and current 22 waveforms are defined, respectively, by the equations:
v=Vm cos(ωt+θv) (3)
i=Im cos(ωt+θi) (4)
where:
The effective power of in-phase, analog sinusoidal voltage and current waveforms is the integral of the product of the instantaneous magnitudes of the voltage and current averaged over a time period, usually a cycle of the waveform:
where:
Increasingly loads imposed on electrical distribution systems comprise power electronic loads, including AC and DC variable speed drives, power rectifiers and inverters, arc furnaces, and discharge lighting, such as fluorescent lighting. Typically, power electronic loads include a front end section comprising a rectification bridge and a parallel input filter capacitor. The front end section acts as a peak detector because current flows to charge the capacitor only during a portion of each half cycle of the sine wave when the instantaneous AC voltage exceeds the voltage on the capacitor. Between these current peaks, the load draws energy stored in the capacitor.
Referring to
The specific harmonics produced by a power electronic load are determined by the number of rectifiers (pulse number) used in the rectification circuit and can be determined by the equation:
h=(n×p)±1 (7)
where: n=an integer (1, 2, 3 . . . )
In a digital power meter the effective power 36 is typically approximated by averaging the sum of the products of the instantaneous voltage, for example instantaneous voltage 24, and current, for example instantaneous current 26, for each of a plurality of sampling intervals 30 making up at least one cycle of the waveform:
where:
Referring to
The outputs of the current transducer 96 and the voltage transducer 94 represent, respectively, the amplitudes of the current and voltage waveforms in the conductors 100, 101 supplying the load 84. In the digital power meter 80, the outputs of the voltage 94 and current 96 transducers are input to analog-to-digital converters (ADC) 104, 106. The ADCs 104, 106 comprise a sample and hold section 108 and a quantizer section 110. The sample and hold section 108 keeps the voltage at the input to the quantizer section 110 constant while the analog-to-digital conversion is taking place, that is, the output of the sample and hold section is allowed to change only at periodic intervals at which time the quantizer input becomes identical to the instantaneous value of the input signal from the respective voltage 94 or current 96 transducer. Changes in the input signals from the voltage 94 and current 96 transducers that occur between these sampling instances are ignored. Sampling converts the independent variable of the waveform equation, time, from a continuum to a plurality of discrete moments. In the quantizer section 110 of the ADC 104, 106, the value of the dependent variable, the input voltage or current signal, respectively, is quantized and converted to a discrete digital number for each of the discrete sampling moments.
The outputs of the ADCs 104, 106 are read by a data processing system. In the typical digital power meter, the data processing system comprises a sampling unit data processor, typically a microprocessor or digital signal processor (DSP), that is dedicated to the task of reading and storing the digital number quantifying each of the current and voltage sample values and a second data processor, including program instructions, data storage and peripheral devices, that is adapted to read the stored digital sample values and calculate the current, voltage, power, and other electrical parameters that are output by the power meter. A 3-phase power meter commonly includes a sampling unit for each of the three phases and each sampling unit typically comprises a voltage transducer, a current transducer, ADCs, and a sampling unit data processor. However, providing a data processor dedicated to the tasks of sampling the voltage and current adds unnecessary data processing capabilities and costs to the power meter if the sampling can be controlled and performed by the data processor that performs the other functions of the power meter, such as calculating the electrical parameters to be output by the meter.
While the processing power of microprocessors has increased substantially and microprocessors are commonly used to perform multiple tasks, interrupts are commonly utilized to switch between tasks that may occur coincidently and interrupt latency is problematic when performing real-time tasks. A microprocessor responds to an interrupt request signal, usually from external hardware, by suspending processing of a lower priority task, storing pointers to the interrupted program instructions and any intermediate results of the suspended task, and initiating processing of the program instructions of the interrupt service routine, the program instructions, for the higher priority interrupting task. Upon completion of the interrupting task, the microprocessor returns to the interrupted task and, unless a higher priority, second interrupt has been received, continues processing the interrupted task. Referring to
In the power meter 80, the outputs of the ADCs 104, 106 that sample and digitize the outputs of the voltage 94 and current 96 transducers is read by a data processing device 112, typically, a microprocessor, programmable logic device (PLC), or digital signal processor. The device is part of a data processing system comprising the data processing device 112, program instructions, and related data storage and peripheral devices. The data processing system includes a memory 118 that is adapted to store instructions and data (e.g., number of turns in the secondary winding, voltage sample values, current sample values, etc.) used by the data processing device in calculating the current, voltage, power, and other related electrical parameters. The data processing device 112 is also connected to a display system 120 permitting display of the metered quantities. A user interface may be incorporated in the display section permitting manual selection of different metered quantities for display. Other peripheral devices, components, and features may be provided including, for example, a communications interface 122 that enables remote reporting of the meter results or transmission of instrument data to a remote data processing system.
The data processing device 112 includes an interrupt handler 114 providing an interface for assertion of an interrupt request (IRQ) signal by a device such as a sampling timer 124. While interrupts commonly originate with devices external to the associated data processing device, the sampling timer 124 may be an external device or may be created internally in the data processor and its memory 118. When an IRQ is asserted 152, operation of the interrupt handler 114 is initiated 158. The interrupt handler 114 determines the priority of the interrupt and that the asserted interrupt can not be masked, delayed until completion of some current task. Since sampling is performed in real time, the sampling interrupt is typically designated as a non-maskable, high priority interrupt. The interrupt handler 114 routes the interrupt signal to the core of the microprocessor which typically saves the addresses of the next instruction and any intermediate results for the interrupted program, disables lower priority interrupts, and jumps to the starting address or interrupt vector of the interrupt service routine, the program instructions for the interrupting task. When the interrupt handler 156 has finished, the microprocessor is ready to perform the first instruction of the interrupt service routine containing an instruction for reading and storing the output of at least one of the ADCs 104, 106. When the data processing device 112 has completed the program instructions of the interrupt service routine, it recovers the addresses related to the instructions and data for the interrupted task and begins executing the interrupted task 160.
Referring to
If the time corresponding to the clock signal count accumulated on the counter has not reached the interrupt request initiation time 208, the counter continues to increment in response to clock signals. However, if the time has reached the interrupt request initiation time 208 and a flag has not been set indicating that the interrupt request has been asserted 210, the interrupt request flag is set 212, and the interrupt request is asserted 214 at the data processor 112. The interrupt handler 114 is started 158 initiating the interrupt process by storing addresses for instructions and data for the interrupted task and obtaining the interrupt vector for the interrupt service routine for the sampling interrupt. The interrupt handler finishes and the data processing device may begin processing the sampling interrupt service routine if additional action is necessary to prepare the data processing device to read sample values 216. In response to a program instruction in the sampling interrupt service routine, the data processing device 112 pauses 162 in anticipation of a second signal from the sampling timer 216.
The counter continues to increment 206 in response to signals from the clock 204 and, since the interrupt request flag is set 210, the time corresponding to the accumulated clock signal count is compared to the sampling interval 218. When the time corresponding to the accumulated clock signal count on the counter equals a second set value, the sampling interval 218, a signal is sent to the sample and hold sections 108 of the ADCs 104, 106 to hold the input to the quantizer 110 at the current value of the respective outputs of the voltage 94 and current 96 transducers 220. The signal also causes the data processing device 112 to execute the program instructions of the sampling interrupt service routine to cause the data processing device to read and store the digital outputs of at least one of the ADCs 222. The data processing device reads and stores the ADC outputs for the sample 164 and completes the sampling interrupt service routine before returning to the interrupted task 160. The sampling signal from the counter also resets the interrupt request flag 224 and initializes the counter 202 to begin timing the next sampling interval.
By asserting an interrupt request in anticipation of a period of latency preceding readiness of the data processing device to sample the voltage and current, the data processing device of a power meter can utilize an interrupt to reliability perform real-time sampling in conjunction with performing other tasks related to the power meter's operation.
The detailed description, above, sets forth numerous specific details to provide a thorough understanding of the present invention. However, those skilled in the art will appreciate that the present invention may be practiced without these specific details. In other instances, well known methods, procedures, components, and circuitry have not been described in detail to avoid obscuring the present invention.
All the references cited herein are incorporated by reference.
The terms and expressions that have been employed in the foregoing specification are used as terms of description and not of limitation, and there is no intention, in the use of such terms and expressions, of excluding equivalents of the features shown and described or portions thereof, it being recognized that the scope of the invention is defined and limited only by the claims that follow.
This application claims the benefit of U.S. patent application Ser. No. 60/620,111 filed Oct. 18, 2004.
Number | Name | Date | Kind |
---|---|---|---|
5079510 | Komatsu et al. | Jan 1992 | A |
5122735 | Porter et al. | Jun 1992 | A |
5548209 | Lusignan et al. | Aug 1996 | A |
5920190 | Peterson et al. | Jul 1999 | A |
6308140 | Dowling et al. | Oct 2001 | B1 |
6657424 | Voisine et al. | Dec 2003 | B1 |
6889271 | Germer et al. | May 2005 | B1 |
7006934 | Jonker et al. | Feb 2006 | B1 |
Number | Date | Country | |
---|---|---|---|
20060091828 A1 | May 2006 | US |
Number | Date | Country | |
---|---|---|---|
60620111 | Oct 2004 | US |