Energy meters serve as the linchpin of the smart grid's ability to maximize efficiency for energy producers, distributors, and consumers. Within designs for utility meters, as well as non-billing measurement applications, energy-metering ICs must deliver suitably accurate values for critically important parameters such as apparent power. Because these ICs provide a variety of calculation methods, engineers face a choice not only of device but also of measurement algorithm. For engineers designing energy measurement applications, a broad range of measurement capabilities are available in devices from IC manufacturers including Analog Devices, Cirrus Logic, Maxim Integrated Products, STMicroelectronics, and Texas Instruments.

Traditional electromechanical meters have served as the mainstay of energy metering, recording usage of active power for an industry-wide usage profile dominated in the past by resistive loads. Over the years, however, the growth in inductive loads from appliance compressors and motors has shifted the usage profile from a purely active load to one where reactive power contributes significantly to total energy utilization. Standard methods for measuring total delivered power, or apparent power, have become less accurate as nonlinear loads introduce phase imbalances and increase the harmonic content on the power line. For utilities obligated to bill for active power only, the disparity between delivered power and revenue power not only affects the bottom line but impacts power quality itself.

For all grid stakeholders, achieving greater accuracy in measurement of reactive power and apparent power is fundamental to achieving greater efficiencies in energy utilization. At the heart of measurement systems ranging from smart meters for utility billing and non-billing meters for smart appliances, the choice of energy measurement algorithm provides the foundation for accurate delivery of these power parameters.

**Software-based designs**

Engineers can achieve accurate energy measurements using software-based approaches with general-purpose MCUs or specialized devices with hardcoded measurement algorithms. For the software-based approach, engineers can combine MCUs with separate AFE ICs designed specifically for energy metering (see the TechZone article, "AFE ICs Simplify High-Precision Energy-Metering Design"). Alternatively, specialized systems-on-chip (SoC) combine industry-standard MCU cores with metrology engines that offload some elements of measurement calculation from the MCU.

SoCs such as the Teridian/Maxim Integrated Products 71M654x (41/42/43/45) or Texas Instruments MSP430FE42x combine sigma-delta analog/digital converters, embedded metrology processor, and general-purpose MCU. In this type of architecture, the MCU takes advantage of on-chip bus speeds to monitor, control, and exchange data with the embedded measurement processor (Figure 1).

*Figure 1: For software-based energy measurement, specialized devices such as the Texas Instruments MSP430FE42x combine an on-chip signal processor, MCU, memory, and an array of peripherals. Data exchange through high-speed chip-internal buses helps ensure rapid execution of software-based measurement algorithms that leverage specialized hardware within the signal processor. (Courtesy of Texas Instruments.) *

This host-based approach offers a balance of development simplicity and flexibility. Engineers can take advantage of existing software libraries such as the free TI MSP430 Energy Library to speed development. If library code lacks some required feature, engineers can enhance it with custom code to implement specialized algorithms as needed to optimize accuracy and performance.

For many applications, standalone energy-metering ICs provide a solution that speeds development of compact, low-power designs. Among available ICs, engineers can find varied support for a wide range of energy calculations with diverse options that allow them to trade measurement accuracy for speed of calculation. **RMS values **

Regardless how engineers implement an energy-metering application, its accuracy begins with the ability to provide accurate values for Vrms and Irms. Accurate root mean square (RMS) values provide the foundation for more complex calculations including active power, reactive power, and apparent power — particularly in environments with distorted waveforms and nonlinear loads.

Standalone metering ICs calculate RMS values by squaring the instantaneous voltage (V[n]) and current (I[n]) at each n sample point, taking the average for N samples, and calculating the square root as in the following formulas:

Because this approach subsumes the inclusion of all harmonics in the RMS calculation, it provides very accurate results. Devices such as the Analog Devices ADE78xx apply this approach simultaneously on each of its seven analog input channels, storing the results in 24-bit registers.

Some members of the ADE78xx family also provide an alternative method for computing RMS values. This different method exploits the practical case that the RMS value for an AC signal corresponds to the DC value needed to produce an equivalent amount of power in the load. Accordingly, the ADE7868/78 devices compute the absolute value of the input signal and then extract the DC component by filtering the result. This value, called the absolute mean value, is proportional to RMS values for fundamental components, but becomes inaccurate in the presence of harmonics in the channel. **Active power **

Using accurate Vrms and Irms values, active power is computed according to the formula:

Where Vn is the voltage RMS value of the nth harmonic in the line frequency, In is the current RMS value of the nth harmonic in the line frequency, and φn is the phase difference between the voltage and the current nth harmonic.

Integrating active power over time yields active energy. Devices in this class report power, energy, or both. In addition, some devices provide different variations of the results. For example, the STMicroelectronics STPM (01FTR/10BTR) family of devices report two values of active energy: Type 0 total active energy includes all harmonic content, while type 1 total active energy is limited to the first harmonic, obtained by filtering the type 0 active energy. **Reactive power **

As mentioned earlier, measurement of active power alone would be sufficient in a perfectly resistive electrical environment. Because of the growing importance of nonlinear loads, the need for achieving accurate measurement of reactive power and apparent power continues to increase.

Reactive power VAR is defined according the following formula:

In a pure electrical environment containing only sine waves operating at a fixed frequency, a variety of methods perform equally well in providing a measurement of reactive power. A method supported by international standards harkens back to the days of electromechanical meters, where reactive power is computed by multiplying current and voltage shifted 90° in phase.

A variety of metering IC devices supports this standard approach. For example, the Cirrus Logic CS5490 multiples instantaneous current I by a 90° phase-shifted value of instantaneous voltage to generate reactive power, also called quadrature power Q, particularly in the context of arbitrary phase shifts (Figure 2). Because the gain of the integrators used to perform the phase shifting is inversely related to line frequency, the CS5490 signal path includes an epsilon register, which contains a value based on line frequency and is used to correct the gain of the integrators.

*Figure 2: This representative processing flow illustrates the sequence of operations used within the Cirrus Logic CS5490 to deliver instantaneous voltage V, instantaneous current I, instantaneous active power P, and instantaneous reactive power Q. Here, an integrator with gain adjusted by value epsilon phase shifts instantaneous voltage by 90° for calculating reactive power. (Courtesy of Cirrus Logic.) *

In practice, this calculation is limited to the first harmonic under the assumption that additional harmonics will contribute negligible amounts of energy to the final measurement. The presence of noise and harmonics introduces errors in this calculation, so some devices provide more accurate methods of reactive power calculation using more finely tuned phase measurements and including additional harmonics in the calculation. For example, the ADE7868/ADE7878 can compute the total reactive power on every phase, integrating all fundamental and harmonic components of the voltages and currents. **Apparent power **

Finding apparent power is a key challenge in accurate energy metering, and available devices offer diverse approaches supporting varying levels of accuracy. With traditional electromechanical meters, apparent power was estimated using an approach called the vector approach that relied on the formula:

Traditionally, apparent power S was estimated by using two electromechanical utility meters: one to measure active power and another to estimate reactive power. This VAR meter measured power resulting from voltage and current set 90° out of phase as mentioned earlier. The accuracy of this approach degrades with increasing harmonics in the channel.

Besides this vector approach, an alternative approach for calculating apparent power is based on the observation that apparent power is simply the maximum real power that can be delivered to the load. Because Vrms and Irms are the voltage and current delivered to the load, apparent power becomes Vrms x Irms – further highlighting the importance of accurate RMS measurements in energy-metering applications. This method, called the arithmetic method, is generally considered a more accurate representation of the power delivered to the load in part because Vrms and Irms account for harmonics, as noted earlier.

Many energy-metering ICs offer a choice of methods for calculating apparent power. For example, the Cirrus Logic CS5490 uses the arithmetic method as its default algorithm for calculating apparent power. For applications with different requirements, however, engineers can set the device to use the vector method by setting the APCM bit to 1 in the device's CONFIG2 register (Figure 3).

*Figure 3: With the Cirrus Logic CS5490, engineers can program the device to use the vector method or arithmetic method for calculation of apparent power S. In this device, the resulting apparent power S value is used to calculate power factor PF. The values V, I, Q, and P, used as inputs to this stage, are produced by the signal flow illustrated in Figure 2. (Courtesy of Cirrus Logic.) *

The ADE7854/ADE7868/ADE7878 devices compute the arithmetic apparent power on each phase. Here, Vrms and Irms are multiplied with adjustable gain with the results stored in a dedicated register xVA (for phase x) as well as accumulated to provide apparent energy in a two-stage operation (Figure 4). In the first stage conducted within the DSP, the device accumulates the instantaneous apparent power for that phase in an internal register. When the value in this register reaches the specified threshold xVATHR, the device triggers a pulse and subtracts the threshold value from the internal register. In the second stage outside the DSP, these pulses are accumulated into a 32-bit register xVAHR for each phase. This procedure provides a scaling capability that allows the engineer to specify that amount of energy represented by one LSB of the xVAHR registers.

*Figure 4: A two-step process in the Analog Devices AD78xx generates apparent power for each phase using the arithmetic method and providing a result that can be scaled programmatically. (Courtesy of Analog Devices) *

Along with these measurements, many devices report a number of derivative results. For example, given accurate RMS measurements, power factor PF is calculated by dividing active power by apparent power. These devices also report more fundamental results such as voltage sag, voltage swell, and overcurrent, which are nevertheless important for equipment power protection.

Voltage sag detection is used to determine when the voltage falls below a predetermined level for a specified period of time. Voltage swell and overcurrent detection indicate when the voltage or current rises above a predetermined level for a specified duration D. The Cirrus Logic CS4390, for example, allows engineers to set the duration D in the device's VSAGdur, VSELLdur, and IOVERdur registers. For each enabled input channel, the measured value is rectified and compared to the associated register. Over the duration D window, the device counts the number of samples above and below the level. If the number of samples below the level exceeds the number of samples above the level, the VSAG bit is set in a status register. Similarly, VSWELL or IOVER bits are set when those values are exceeded. A downstream MCU or logic circuit can monitor these status bits and take appropriate action when these power faults are detected.

On the front end, many energy-metering ICs also provide built-in support for sensor and temperature compensation. For example, the Rogowski coil current sensor introduces a 90° phase shift in measured current. Energy-metering ICs include specialized interfaces and circuits designed specifically to provide appropriate phase compensation for those sensors. **Summary **

While the smart grid promises greater efficiencies in generation, distribution, and utilization of power, its effectiveness rests on the accuracy of energy measurements collected by smart energy meters. In calculating energy utilization, smart meters depend on the ability of energy measurement devices to provide accurate representations of actual power delivered to the load. As loads become more nonlinear and introduce harmonics beyond the fundamental, the choice of method used to calculate apparent power becomes correspondingly more important. For engineers, available energy measurement ICs support a variety of measurement methods, permitting selection of the most appropriate algorithm for target requirements.