Interpolating meter data
A meter reading is missing, but the readings before and after it are known. Then you can interpolate the gap. This is how it works for meter readings.
Readings, not consumption per interval
A meter reading is the register value at a point in time, in kWh. The difference with the previous reading is the consumption. So interpolate the readings and compute consumption afterwards. That way the total over the gap is always right: it is the difference between the two known readings.
An example
Two readings are missing, the rest is known.
| time | reading (kWh) | |
|---|---|---|
| 08:00 | 12347.494 | measured |
| 08:15 | 12347.649 | repaired |
| 08:30 | 12347.803 | repaired |
| 08:45 | 12347.957 | measured |
The difference is 0.463 kWh over three intervals, about 0.154 kWh each. The repaired readings are rounded to whole Wh, the way a register counts. The total stays 0.463 kWh.
When linear is not enough
- Long gaps. A straight line does not know the daily pattern. Solar generation shows it best: nothing at night, a lot during the day. eclipse flags such gaps.
- A decrease in the reading. Never interpolate across a meter replacement or reset.
- The edges. For the first and last point of a series only one side is known. That is extrapolation.
The Dutch market has its own method for smart meters, described in IC274. It spreads consumption over a gap using profile fractions. eclipse currently works linearly.
Keep reading: How to interpolate time series data in pandas
More about eclipse: Fix and interpolate meter data through an API.