 Introduction
A whole house energy monitor measures the energy used by appliances connected to the house mains. To understand how it does this work, it is useful to know something about how appliances interact with the electrical system.
Not all appliances interact with the electricity system, in the same way. This article will first discuss resistive loads and how the power they use is calculated. It then goes on to discuss reactive loads and a bit about non-linear loads. Finally, it will show how we measure the direction of power flow, which is important if energy is being both generated and consumed.

Incandescent light bulbs, kettles, irons, electric water heaters, electric cookers are all quite straight forward they use all the energy given to them. They are resistive loads, which means that their current draw is equal to the voltage divided by their resistance (Ohms Law). A purely resistive load gives a voltage and current waveform output similar to the following: Diagram 1 – Voltage, current, power graph of a resistive load
The yellow line is power at a given time (at any given instant its called instantaneous power) which is equal to the product of the voltage and current at a given time. Notice, how the power is always positive in this case, the positive direction is energy flowing to the load.

However, things like fridges, washing machines, pillar drills and arc welders are not so straight forward as these appliances take a certain amount of energy and then release some energy back into the mains supply. These have inductive (e.g. motors) or capacitive (e.g. arc welders) components in addition to the resistive component. A partially inductive load gives a voltage and current waveform output similar to the following: Diagram 2 – Voltage, current, power graph of a partially reactive load
Notice how the yellow line now goes negative for a period of time, the positive bit is energy flowing to the load and the negative bit is energy flowing back from the load.
The other thing to think about is that the voltage and current waveforms have been shifted apart, imagine charging a fairly large capacitor with a resistor in series (so that it can’t charge instantly): To start with the capacitor is empty. The voltage on the supply rises and is higher than the voltage on the capacitor and so current flows into the capacitor (the positive direction on the graph), which leads to the voltage on the capacitor rising. The voltage on the supply now falls, the voltage across the capacitor is now higher than the supply voltage as it is charged and so current starts to flow back in the direction of the supply (the negative direction on the graph). This causes the current waveform to appear as if it is shifted as in the graph. (The shift is known as phase shift).

Real Power, Reactive power and Apparent Power
Looking at both voltage, current and power graphs above at mains frequency the power draw fluctuates 50/60 times a second, for us humans we cant keep up with change at this speed and so we have a more useful value for power: the average of the instantaneous power which we call real power! (or active power).
Real power is often defined as the power used by a device to produce useful work. Looking at the graph above the positive bits are power going to the load from the supply and the negative bits are power going back from the load to the supply, the power that was actually used by the load the power going to minus the power going back is the real power.
Reactive power (or imaginary power) is a measure of the power going back and forth between the load and the supply that does no useful work.
Another useful measure of power is Apparent Power which is the product of the Root-Mean-Squared (RMS) average of the Voltage and the RMS average of the Current. For purely resistive loads, real power is equal to apparent power. But for all other loads real power is less than apparent power. Apparent power is a measure of the real and reactive power but, it is not a sum of the two, as the sum of the two does not take into account phase differences.
Relationship between real, reactive and apparent power for IDEAL sinusoidal loads:
Real Power = Apparent Power x cosΦ
Reactive Power = Apparent Power x sinΦ
cosΦ is also known as power factor.

This relationship for power factor is only valid for linear sinusoidal loads. Most power supplies for DC devices like Laptops exert a non-linear load on the mains, their current draw often looks like this: We can still calculate power factor from the following equation:
Power Factor = Real Power / Apparent Power
and the relationship
(Apparent Power)2 = (Real Power)2 + (Reactive Power)2
is still correct, but power factor = cosΦ would not be correct, higher order harmonics would need to be added.
The power factor value measures how much the mains efficiency is affected by BOTH phase lag φ AND harmonic content of the input current.

Determining the direction of power flow
Until now, this article has assumed that the load is consuming power. If however we are generating power, then the direction the current flows is reversed. But because the current is alternating, the direction is reversing anyway, 50 (or 60) times each second. We need a reference to compare the current direction against. Fortunately, we have that in the form of the voltage. In diagram 1, the voltage and current waves both rose and fell together. When the voltage was positive (above the x axis) then the current too was positive, and when the voltage was negative (below the x axis) then the current too was negative. Power is equal to the product of the voltage and current and so the power was always positive—all of the power curve is above the x axis.
If the house is generating power, the direction of the current is reversed compared to how it was before. Now, when the voltage is positive (above the x axis) then the current is negative (below the x axis), and when the voltage is negative then the current is positive. The power always negative—all of the power curve is below the x axis. Diagram 4 – Voltage, current, power graph when generating
The sign of the power therefore indicates whether power is being consumed or generated.
To sum up
There are a lot of things we can measure about energy use in AC systems. Each one with its uses. For the household energy metering application, however, real power is likely to be the most useful value as it tells you how much power all your appliances are actually using and it is what the utility bills you for. This is whole about AC Power Measurement.