There are three locations where data can be missing:
The system replaces missing values with the first available value in the series. For example, if M1 is a faulty meter installed in Building 1, which fails to record a daily energy reading for three days, and its replacement meter records 20 on day four, linear interpolation assigns 20 to each of the missing days.
The system replaces missing values by calculating the slope between the last and next collected values. The interpolation equation is:
slope = (nextValue - previousValue) / (nextTimestamp - currentTimestamp)For example, meter 1 functioned accurately and logged values for three days after which a fault occurred in the meter. It took three days to identify and fix the fault. On day six the system began to log values again. The missing values in this data set occur between intervals. If the recorded value for each day at the beginning of the series is 20, and the recorded value for the sixth day is 30, the calculation for day four is:
20 + ((30-20)/(6-3)) = 23.33And the calculation for day 5 is:
20 + ((30-23.33)/(6-5)) = 26.66The system replaces missing values with the last recorded value in the series. For example, meter 1 takes a reading for each of three days after which it goes into fault for two days, ending the series. The reading for day three is 20. It makes no difference what the readings are for days one and two. The system interpolates the value for days four and five as 20.