Hi Michal

I hope this is not too late or too low level…

You need to be careful about kW and kWh. Pulses count kWh or Wh of energy - the number of pulses per kWh will be displayed on your meter. For example, my meter tells me that 3200 pulses are sent for every kWh, so each pulse is telling me that 0.3125 Wh of energy have passed through the meter (1000 Wh / 3200 pulses/kWh). If the pulses are t seconds apart, then the average power over the period since the last pulse is 0.3125*3600/t where the factor given here as 0.3125 will depend on your meter and the 3600 is the number of seconds in an hour. If for example you get a pulse every 2 seconds from my meter, then the average power is 562.5 W or 0.563 kW.

Alternatively, if you count the number of pulses, P, over a fixed period of time, Tf seconds, then the average power over the period just passed is 0.3125*P*3600/Tf for my meter. For electricity trading the period used is usually half-hours, so the average power over the last half-hour is 0.3125*P*2 This often causes confusion as the energy recorded in kWh per half hour implies and average power (kW) which is 2 times the kWh recorded. There is also potential confusion in data recording whether the data for a particular timestamp is kWh for the last half hour or for the following period – good practice is that the data at a particular timestamp is the kWh for the period ending at that time, so the data at 00:00 is the last period of the previous day for example.

You have no way of knowing what the maximum and minimum power was over a fixed time period unless you record the time between each pulse. If you do record this time, then you can find the minimum (longest period) and maximum (shortest period) during a longer recording period - this can significantly enhance the quality of data recorded over longer periods without leading to overwhelming amounts of data.

All the best

Simon Redford