v(n) = Voltage sample at a sample instant ‘n'
i(n) = Current sample at a sample instant ‘n'
Sample count = Number of samples in 1 second
Kv = Scaling factor for voltage
Ki = Scaling factor for current
4.2.1.2 Power and Energy
Power and energy are calculated for a frame'sworth of active and reactive energy samples. These samples are phase corrected and passed on to the foreground process that uses the number of samples (sample count) and use the formulae listed below to calculate total active and reactive powers.