I have a time series of kW where each sample is measured at regular intervals (10 seconds). Could anyone explain to me how could I calculate the total power consumed (kWh) over an hour?
Thanks
electricitypowerstatistics
I have a time series of kW where each sample is measured at regular intervals (10 seconds). Could anyone explain to me how could I calculate the total power consumed (kWh) over an hour?
Thanks
Best Answer
In general, if you have a list of datapoints $p_n$ for $n\in\{1,2,3,...,N\}$ sampled with timestep $\Delta t$, the integrated total $E$ is $$E=\Delta t\sum_{n=1}^{N}p_n.$$
For example, with data spaced 10 seconds apart, $\Delta t$ becomes $\frac{10\text{ sec}}{3600\text{ sec/hour}}\approx 0.0028$ hours. If you take 20 measurements (ie, 200 seconds recording), the integrated power in kWh becomes $$E=\frac{1}{360\text{ samples/hour}}\sum_{n=1}^{20}p_n$$ where $p_n$ are the instantaneous powers in kW.
This is an example of numerical integration using a Riemann Sum.