The desired power is calculated from: P =
VIcosθ
[2].
The value of voltage, current and power factor is displayed in the LCD with a 2 second interval. So about after each 9 seconds we are calculating the power. This time is converted to hour and multiplied with the power value to get the energy consumption