Wednesday 9 February 2011

Brute-force thresholding to detect possible periods for fridge cycles

The chart below shows data recorded from the house's aggregate power meter and the fridge's meter over 1 day. My aim for this week is to calculate the fridge's power demand given the household's power demand.


Before doing any steady-state analysis, it is useful to use some brute-force methods to eliminate intervals where the household's aggregate demand is less than the fridge requires. Here is some pseudo code describing the algorithm I devised:

baseline = min(value_of_household_aggregate)
for each value_of_household_aggregate
if value_of_household_aggregate >= baseline + appliance_demand
mark value as a possible area for fridge cycle
endif
endfor

The following graph shows the areas for which the fridge could be on. The upper line represents the same day's household aggregate as the previous graph, while the lower line represents the areas detected for which it is possible the fridge is operating.


We can see that this approach works well in the overnight period, accurately identifying the fridge's on periods. However, the approach is less useful during the day, when there are long periods for which the aggregate demand is continuously above the baseline + appliance demand.

Since we know the fridge's minimum 'on' duration, we can improve this algorithm by eliminating time periods which are shorter than the appliance's minimum duration. This is illustrated by the following pseudo code:

for each possible_fridge_interval
if possible_fridge_interval less_than minimum_appliance_duration
remove interval
endif
endfor

This produces the following areas:


This is an improvement on our last results, as all the short intervals have now been removed.

The next step is to take the longer intervals and break them up in to intervals of the expected duration. My plan for the next few days:
  1. I am going to apply my steady-state algorithm to detect 'on' and 'off' events of a magnitude which we would expect from the fridge
  2. The detected 'on' and 'off' events which fall outside of the possible intervals detected through the brute-force method will be removed
  3. 'On' events followed by an 'off' event which are separated by the expected appliance 'on' duration will be assumed to be a correctly identified cycle
  4. 'On' or 'off' events with no other near events will have their corresponding 'on' or 'off' event estimated using the expected appliance duration
  5. The remaining long intervals will be filled by finding the best fit of cycles within the interval. A constant 'on' duration will be assumed. The 'off' duration will be estimated by fitting the 'duration between on cycles' curve to the nearest cycles before and after the long interval

No comments:

Post a Comment

Note: only a member of this blog may post a comment.