An Evidence Based Approach To Determining Residential Occupancy and its Role in Demand Response Management

Abstract


Introduction
One of the primary motivations of occupancy detection in buildings has been reduction of energy use whilst maintaining occupant comfort through the control of heating, cooling and ventilation systems (Bing Dong et al 2010).However, with the increase of intermittent distributed renewables on the power grid, occupancy sensing provides further opportunities to assist in the flexible management of consumer demand to better match supply (Palensky and Dietrich 2011).Periods of active occupancy (when people are at home and awake) have a high correlation with user demand profiles (Capasso et al n.d., Abu-Sharkh et al 2005), because it is during times of active occupancy that consumers are most likely to be carrying out activities that require the consumption of energy, such as utilising appliances, heating, lighting etc. Torriti (Torriti 2012) considers variation in occupancy and suggests that the extent to which peak loads can be shifted is not only a function of incentive or price, but is largely dependent upon patterns of occupancy, especially for incentivised-based forms of Demand Response (DR).Indeed, for this type of DR, it is only during occupied periods that people have the capacity to modify their energy consumption behaviour.Furthermore, even 'smart' actuated DR strategies will benefit from knowledge of occupancy patterns for effective appliance scheduling (Yuce et al 2016).At the same time it is also important to take into account user comfort (Saele andGrande 2011, Yuce et al, 2014), which is of course only important during occupied periods (both active and non-active), and is closely linked with energy consumption and peak demand (Strengers 2008, Yuce, 2016).For these reasons the determination of occupancy profiles is important when accessing the potential opportunities for both incentivised and actuated DR.
One of the main challenges is reliable non-intrusive approaches to determine when occupants leave and arrive in the home and to map the associated patterns of occupancy.Most approaches to occupancy estimation sensing require ground truth training data (e.g.(Lam et al 2009, Han et al 2013)), but this requirement places a barrier to the rapid uptake of DR.To take full advantage of the potential benefits of occupancy sensing there is a need for blind occupancy estimation strategies through inference (Ebadat et al 2015).

Occupancy Inference
There have been various attempts at inferring occupancy using ubiquitous sensors.One very promising approach is use of electricity data from smart meters or electricity clamps.Statistical approaches classifying this data have been suggested that are able to provide estimates of occupancy with accuracies of more than 80% (D Chen et al 2013, Kleiminger et al 2013).Smart meter data could be used to provide this functionality meaning it could be delivered with no extra hardware expense.
Occupants generate heat, moisture and water vapour and therefore environmental sensors provide a potential approach to inferring occupancy (B Dong and Andrews 2009).One of the most common approaches is to use a CO 2 sensor combined with a detection algorithm (e.g.(Han et al 2013, Wang and Jin 1998, Lam et al 2009).Jin et al. investigate the use of indoor CO 2 concentration to infer occupancy, by modelling the dynamics of human generated CO 2 concentration in a room, demonstrating a strong link between the behaviour of CO 2 levels in the room and occupancy.However, changes in ventilation rates caused by opening doors and windows affects the reliability of approaches relying solely on CO 2 measurements (Naghiyev et al 2014).
Various studies include relative humidity in occupancy estimation (e.g.(Khan et al 2014, Lam et al 2009, Bing Dong et al 2010).The problem with using relative humidity is that it is a function of the air temperature, where a temperature decrease in a building due to thermostat setbacks for example, will result in an increase in the relative humidity because colder air is able to hold less moisture (Lawrence 2010); therefore without considering the effect of temperature, the cause of a change in relative humidity will not be clear.
Additional sensors that have been used to determine occupancy, often in combination with other sensors include: door sensors (Agarwal et al 2011), acoustic sensors (Bian et al 2005, Scott et al 2005, Jianfeng Chen et al 2005, Hailemariam et al 2011), cameras (Benezeth et al 2011), PIR sensors (Dodier et al 2006, Naghiyev et al 2014, Scott et al 2011) and ultrasound (Guo et al 2010).Alternative approaches include the use IT infrastructure: using GPS information from smartphones (Koehler et al 2013), although this requires active participation of the occupants, and a phone (with sufficient battery), which must be carried at all times; and by monitoring MAC and IP addresses (Melfi et al 2011).

Processing Sensor Data
The output from different sensors captures different possible interactions between an occupant and the environment in which they are in (Lam et al 2009).Therefore, by combining multiple sources of data from different sensors, it is possible to exploit information from a range of interactions, and thus to increase occupancy state classification accuracy.For instance, Lam et al. (Lam et al 2009) looked at combining various sensors, including CO 2 , relative humidity (RH), PIR and sound.These capture information on the following interactions, respectively: exhalation of CO 2 as the occupant breaths within the space; the occupant respiring and giving off moisture; the occupant moving in the environment; and the occupant making noise while in the space.
One of the key factors in achieving greater accuracy in occupancy prediction is processing the data in an appropriate way to generate distinguishing features.The following features have been successfully used in occupancy sensing classification problems: moving average (Lam et al 2009, Hailemariam et al 2011), range, standard deviation (D Chen et al 2013), 1 st order difference, 2 nd order difference (e.g.see (Bing Dong et al 2010, Ekwevugbe 2013)).Different features will have stronger and weaker correlations with occupancy, for example, in the study of Lam et al. (2009), which focused on an office space, CO 2 and acoustic parameters were shown to have the strongest correlation out of all the studied variables.Once the best features are established, classification of the feature set can then be carried out.

Classification to determine Occupancy
How sensor information is processed and combined is critically important for the success of the method.For compared to more sophisticated probabilistic classifiers (Langley et al 1992, Michie et al 1994).In this approach, the distribution of observations at a given time, are combined by finding, according to the Naïve Bayes assumption, the product of the likelihoods, giving a joint probability distribution of the given observables being detected (Aviles-Arriaga et al 2003).In a similar way to the HMM, the states classes with the highest probability, best describing the observations can then be found.Aviles-Arriaga et al. have shown the approach to have better performance than the HMM when the number of training examples is small (Ibid) A disadvantage of using Naïve Bayes theory for occupancy classification is that it requires the specification of prior class probabilities, which are often unknown.Another disadvantage is its inability to deal with ignorance, i.e. a lack of knowledge regarding sensor data.This might occur, for example, when there is missing data over a given time period (e.g.due to a malfunctioning sensor); the output of this sensor is unknown and therefore there is ignorance around what state this sensor would infer the system is in.A simple method which deals with these shortcomings is the Dempster-Shafer method, often described as a generalisation of Naïve Bayes theory.It is a robust method and has been shown in different instances to perform as well as, or better than the Bayes approach (Challa and Koks 2004).
This paper is concerned with a study that focuses on the combination of CO 2 , electricity and internal dew point temperature data to infer occupancy, two attributes which have independently been shown in other studies to have a strong correlation with occupancy.Occupancy patterns are considered in conjunction with consumption behaviour to provide insights, to enable more effective participation of households in demand response.In the first part, the estimation of observation probability density distributions of sensor values during occupied and unoccupied household states, while lacking concrete ground truth, is addressed.
Classification of data is then carried out in an iterative process using HMMs in combination with Dempster-Shafer fusion.Finally, methods of interpreting data are presented and the interplay between occupancy and participation in both behaviour driven and actuated demand response is discussed.

Case study building
In order to illustrate the approach of determining the occupancy and considering the interplay between occupancy and demand response, a case study approach was adopted.A well-insulated terrace house in Northern Scotland was used for collecting preliminary data for the study.The property had two storeys, with an overall floor area of 62m 2 .The occupants were a young couple with a child aged two years old.

Data collection
The building was instrumented with voltage clamps on each individual circuit in the house, which included lighting, sockets, fridge-freezer and a washing machine.A CO 2 , humidity and temperature sensor was installed upstairs in the open plan kitchen-lounge area.A heat meter was installed to record when domestic hot water was used.Data was recorded at intervals of five minutes.The monitoring period was one month starting on the 1 st of May 2015.

Determination of Occupancy
Each of the sensors can be thought of as supplying evidence for and against a space being occupied at any given time interval, .All of the evidence from a chosen cluster of sensors used (in this instance: CO 2 , electrical power and dew point temperature) in the time interval can be combined and to determine a probability of occupancy.By considering the probability over a sequence of observations, using an HMM, the hidden occupancy state (occupied or unoccupied) is inferred.

Hidden Markov Model
The problem that now needs to be solved is: given a series of sensor values, over time period T, where is a given time interval, determine the most likely series of hidden states (occupied or unoccupied) that caused these sensor outputs.The solution to this is one of the key problems addressed by the HMM.In this work the observations are the continuous values recorded by the sensors, and the hidden states, causing the recorded sensor outputs, are the possible occupancy states of the building (occupied or unoccupied).
Let the state, , be the occupancy state of the system at time, , with a likelihood of an observation, ( ), where , is a is feature vector of continuous values derived from the sensors and i is the number of the time interval.If , a sequence of observation vectors, at each time interval, , a new state is entered.The objective is to determine the hidden state sequence (the occupancy pattern) that caused this observed sequence of sensor values for time intervals over a time period, , where and is the time interval between observation outputs.It is assumed that sensor emissions (observations) of the system are independent of one another, and depend only on the state of the system at time step .Furthermore, it is assumed that the state of the system, , at time, , is dependant only on the previous state of the system , which is known as the Markov assumption and can be written as: The intuition behind this assumption is that the state at time captures enough of history of the process in order to reasonably predict the future output.
The likelihood of a given series of emissions given a series of system states is then given by: Where ( ) is the transition model (between different states of the system) and ( ) is the observation emission model.The objective is to determine the hidden states given the data, i.e. to compute Implicit in this model is the conditional independence among the attributes (emissions), given the class (state).
The elements in the transition matrix assume classical statistical probabilities.However, the emissions model, ( ), is assumed to be described by a model based on the Dempster-Shafer theory of belief (Ramasso and Denoeux 2014).This is a formal framework for reasoning that is able to take into account uncertain information (Shafer 1976).The model is described in the next section (2.3.2).

A Dempster-Shafer Based Emission Model
The Dempster-Shafer theory is a mathematical theory (Shafer 1976) which enables the combination of multiple pieces of evidence to calculate the belief in support of an event.It offers an alternative to traditional probabilistic theory for a mathematical representation of uncertainty.In Bayesian theory any evidence not assigned to a hypothesis is assigned to its negation.However, this might not be true in reality.For instance, if a particular sensor value has not been seen before it does not necessarily mean in a two state system (occupied and unoccupied) that one state is totally improbable and the other state is 100% probable, but there remains a degree of uncertainty associated with which class it belongs to (what state of the system caused it).Another frequently occurring issue in data collection is missing data from a particular sensor.In sensor fusion problems it is critical that such types of situations are taken into consideration.An important aspect of Dempster-Shafer theory is the combination of evidence from multiple sources and modelling the conflict between them, with a way to represent ignorance.In the case of missing sensor data, complete ignorance can be assigned for this sensor during the affected time periods.Sensor fusion produces two parameters for each hypothesis: the degree of belief in the hypothesis and the degree of plausibility.The approach has been applied effectively to sensor fusion (e.g.(Wu et al 2002)).One of the major advantages of this method is that the truth of the hypothesis is assessed based on the evidence from available working sensors, i.e. evidence is based on current knowledge.Each sensor will contribute its observation by assigning its belief that the system is in a particular state.Furthermore, the approach does not assume knowledge of prior probabilities, which is the case with occupancy in this study.

Basic concepts
In the Dempster-Shafer theory, the frame of discernment, denoted by , is a set of all possible mutually exhaustive events.This represents the set of all choices available to the reasoning scheme, where sources (in this case sensors) assign evidence (belief) across the frame of discernment.
Let represent the set of all subsets of to which a source of evidence can apply its belief.In this problem can be defined as: Then , the set of all subsets of .Meaning the state can be either occupied ( ), unoccupied ( ) or unknown ( ). is the null set.
Each sensor, will contributed its observation by assigning what is known as a mass function, m, over .A probability mass function is defined, also called Basic Belief Assignment (BBA) and it maps how belief is distributed across the frame, .It is defined such that it satisfies the following conditions: This means that belief from an evidence source cannot be assigned to a null hypothesis, and belief from all of the evidences sources, including any combinations of hypothesis must sum to one.Assigning evidence to , which in this case contains all the possible hypothesis (occupied or unoccupied) is an assignment of ignorance.The subset is called a focal set where its mass is non-zero, where A is a given hypothesis.The mass, ( ), expresses the proportion of all relevant and available evidence in support of the proposition that A is true, i.e. it represents the 'degree of belief' that there is in A. From mass assignments, the theory allows the upper and lower bounds of the probability interval to be defined, this interval contains the probability in the classical sense ( ( )), bounded by two non-additive measures called belief, ( ), and plausibility, Where the belief, ( ), for a set A, is defined as the sum of all masses of the subset of interest: Indeed the nature of this system means that ( ) , meaning that the system must be in either state or and therefore, in this case for occupied and unoccupied states, ( ) ( ).It can take a value ranging from 0 (no evidence) to 1 (certainty).Plausibility can be understood as the weight of evidence that doesn't contradict hypothesis A. It is a measure of the extent to which the evidence in favour of other states (not ) leaves room for belief in state .Belief and plausibility are related such that: Where ̅ is the hypothesis 'not A', e.g. if is the hypothesis that the home is occupied, ̅ is the hypothesis that it is unoccupied.
( ̅ ), is therefore the belief that the home is not occupied.The plausibility, pl(A), also ranges from 0 to 1.
Dempster's Rule of Combination is a way to combine evidence from independent sources.If ( ) and ( ) are two belief functions (for two different sensors) over the same frame of discernment, , with probability masses and , respectively, the joint mass is defined as: The use of Dempster-Shafer theory allows uncertainty to be incorporated into the final decision and allows for missing sensor data, or when the distribution of the feature data is not fully know.Furthermore, unlike Bayesian inference no a priori knowledge is required to make an inference (Hoffman and Murphy 1993).It therefore provides a practical method for the fusion of sensor data.

Application to fusion of sensor data
The normalised probability density of a feature given the system is in a particular state, ( ), gives evidence for and against a particular state (occupied or unoccupied), where is the value of the feature, indicates the current time step of the system and indicates the state of the system is in.( ) is the degree of evidence allocated to state 0 (unoccupied) for a particular feature x, and ( ) is the degree of evidence allocated to state 1 (occupied).It has been proposed that representing the uncertainty in the current state of class membership (occupancy level) can be achieved by estimating the distance between the most plausible class and all others (Zahzah and Serge 1992).This function is designed such that the greater the difference between the evidence supplied by the two classes, the greater the degree of confidence in the class membership, and the smaller the difference the greater the degree of confusion as to which state the system is in.In this analysis there are only two classes and therefore the degree of uncertainty was assumed to take the following simple form: For example, if there was absolute certainty in one of the parameters, such that, for example ( ) and ( ) , then ; in this case the system is deterministic.The masses of evidence were assigned as follows: so that ∑ ( ) =1 (the sum over all possible states) and () is the mass assigned to ignorance.It can be seen that when there is a high degree of confusion between the two states, a large part of the mass of evidence will be assigned to ().This would be the case, for example, if there was a high, yet similar degree of evidence for both hypotheses, or if there was little evidence for either.The definition of in this way means (see Equation 1) that the resulting belief function behaves as a kind of likelihood function taking into account conflict: the more evidence there is for a particular hypothesis (unoccupied or occupied) and the less evidence there is against, the greater the belief in the hypothesis, that is the greater the evidential 'likelihood' that the given hypothesis is true.In essence it gives an indication of the lower limit of the statistical probability that the hypothesis is true.
The combined belief mass is taken to be the lower limit of the combined likelihood, describing the emissions likelihoods, ( ), where x is the feature vector ( ).Although the combination is in effect an artificial probabilistic model, the result is equivalent to the classical approach Bayesian approach of combining likelihoods (Ramasso and Denoeux 2014).The HMM was implemented in Python using the approach described in (Mann et al 1999).Figure 2 illustrates graphically how the training process operates: at each time step ( ) is estimated.The Bauch-Welch algorithm used to update parameters and finally the Viterbi algorithm is applied in order to find the most likely state sequence that caused the observations.This gives the predicted occupancy profile.

Parameter Learning
As is usual in HMM application, full knowledge of ( ), the transition probabilities and ( ), the emission distributions are not known and need to be determined.In order to maximise the chance of convergence, initial estimates for the probability density functions of the parameters needs to be made.This can then be refined with the Baum-Welch algorithm (Rabiner 1988., Baum et al 1970), a particular instance of the Expectation-Maximum (EM) algorithm.

Initial Estimation of Observation Probability Density Distributions
The first thing to note is that the form of the probability density distributions associated with the different sensors is often unknown and cannot assumed to follow typical distribution forms, e.g.Gaussian..The approach taken here is to estimate the probability density distributions using evidence from events to which we have as a high degree of confidence that they are indicative of human interaction.These are referred to as switch events.A high degree of confidence can be assigned to the hypothesis that an occupant is present.
Switch events are clearly defined.For example, a switch event might be when a light switch is turned on or off, or it might be when a hot water tap is turned on or off.If necessary, identification of the best switch events for households could be inferred through a simple survey.By assuming that for a small period around the switch event that a person is present, and by considering a large number of switch events over a period of several weeks, it is possible to build up a picture of the distribution of sensor values for occupied periods.The distribution of values can then be found for all states (occupied and un-occupied periods), by finding probability density distribution over all time (taking into account all the available data), ( ).Finally, using Bayes theorem, it is possible to estimate the distribution associated with unoccupied periods: Bayes theorem states that: Where, in terms of this problem: ( | ) is the conditional probability of the system being in occupancy state, , given sensor values .( ) is the conditional probability of observing sensor data values, , given the occupancy state is .It is also known as the likelihood function and expresses how probable the observed sensor values ( ) are, given the particular state the system is in.This is what will be determined for a set of time periods when the home is occupied.( ) is the prior probability of the system being in the occupancy state .
The denominator in Equation 2 is the normalisation constant, which ensures the posterior distribution is a valid probability density and integrates to one.It can be expressed with respect to the prior and likelihood functions: For a given observation time window, , with observed data values, D, and when is discrete it can be simplified to: Where is the number of states the system can be in, which in this analysis is two.In other words ( ) is the sum of the for occupied and unoccupied states of the system.If it is assumed that the probability of the system being an given state is uniform and the probability of the system being in either state is equal, then the probability can be assumed to take a constant value of 0.5.The probability density distribution of the system being in either state, ( ), is for each time window, , the sum of occupied and unoccupied likelihoods, which is known.We therefore have: Because the state of the system is jointly exhaustive: The likelihood of being unoccupied, ( ), can therefore be estimated from the known likelihood distributions as follows:

Application of the method
Switch events used for this preliminary study were: (1) lights being turned on and off.This was determined by monitoring the lighting circuits in the home, but could equally well be determined using low cost light sensors; (2) the hot water tap being turned on and off.This was determined using heat meter data, but could equally be determined using low cost thermistors on the hot water supply pipes; (3) electrical appliances being turned on and off.This was determined by monitoring the socket circuits in the home.The switch events were determined by 1) finding the rolling mean (with a 15 minute rolling window), finding the first difference and in the case of sockets, filtering out the differences according to a threshold, in order to remove the changes caused by small, non-descript power loads.The switch events were joined together.Figure 3 shows the count of switch events for each week in the month.
It was assumed that for a window of 10 minutes either side of the switch event the occupant was present in the home.The occupied distribution for given sensors, ( ), was found by finding the probability density distribution of values occurring across all these windows.( ) was then calculated by considering all the data, inside and outside of the switch event time windows.Finally, ( ) was estimated using Equation 4.
The distributions during occupied and unoccupied periods were then found using the described procedure.A useful measure of the how the two distributions differ can be given by: Where ( ) and ( ) are the two probability density distributions.When ( ) and ( ) do not overlap and are totally distinct, would tend to one, whereas two identical distributions would result in an of zero.
Figure 4(a) illustrates how varies with the change in window size of the time window for CO 2 level, with an expected decrease in the distinctiveness between occupied and unoccupied distributions.The assumption of a window of 10 minutes either side of a switch event can be seen to be reasonable.
In order to select the most distinctive features, was found.Table 1 summaries a range of features explored.
The five highest scoring features were selected and used for classification of occupancy in the study.These were, in order of distinctiveness: instantaneous mains feed electrical power, rolling window standard deviation of CO 2 , rolling window standard deviation of mains feed, indoor dew point temperature and CO 2 concentration.for the likelihood of the system being in either an occupied or an unoccupied state given an observed sensor feature value.The mains feed electrical power use data shows a distinctive difference in distribution between occupied and unoccupied states.However there is still a degree of overlap, implying that it is possible to have low power consumption during occupied times.This is due to the fact that the occupant may be at home but not using electrical devices.The CO 2 sensor used in this study has not been calibrated, resulting in CO 2 concentrations being recorded that are outside a realistic range.However, because we are only interested in the relative difference between occupied and unoccupied periods this will not affect the algorithm performance.In fact it illustrates one of the advantages of an approach where distributions are estimated for the installed sensors in a specific household, i.e. the estimation of a realistic and representative probability density distribution for a given attribute as a function of system state.The probability density distributions for CO 2 clearly shows that higher ppm tends to occur during occupied periods, as would be expected.However, the closeness of the curve in parts may be the result of the lag between the room CO 2 concentration and changes in occupancy, such that ( | ) will contain within the distribution data, unoccupied periods, and vice versa.
The estimated distributions were used within the HMM to find estimates for the combined probability density distributions.

Results and Discussion
The described methodology was used to determine the occupancy profile for the trial period, with equal weight given to all the feature vectors in the Dempster-Shafer fusion.The simulation was run to determine occupancy during intervals between the hours of 8am and 11pm, when the occupant was likely to be awake and active.
Environmental sensors were not installed in the bedroom and electricity usage is generally low during the night, making night-time occupancy difficult to determine.The detection of sleep patterns could be attempted in further work.Figure 5 gives an example of a predicted occupancy profile for a day during week 1, and Figure 6 gives empirically based profiles for two days during the fourth week in May.These are for days for which we have specific knowledge of occupancy that was provided by the household members.This provided some validation of the method.During the first week of May the usual occupants of the property were away and the house was being used by a guest, of which we have little information.In the second week of May the house was empty for most of the week, with someone occasionally coming in for very brief periods.This can be seen in the data, but because of the lack of occupancy presence for the majority of the week, it has not been included in the analysis and discussion.In the third and fourth weeks the family returned.The following discussion is focused mainly around the second half of the month.

Sense checking the occupancy profiles
As can be seen from the example profile given in Figure 5, the predicted unoccupied period behaves as one would expect, indicated by the reduction in CO 2 concentration where the mains feed power use falls to a minimum.Notice also that the dew point temperature begins to gradually decrease during the unoccupied period.Notice also that all of the switch events for all three profiles (Figure 5, Figure 6 (a) and (b)), when we have a high degree of confidence that the occupant is in the home, occur within the predicted occupied periods.
In addition in the profile in Figure 6(a) there is a considerable amount of missing power data.At this point the calculation of the value of (see Equation 1) will go to one, indicating total ignorance of the occupancy state since no information is provided by this sensor.At these times the prediction is based on the evidence provided by the other sensors, illustrating the power of the Dempster-Shafer method.

Confirmation against known occupancy behaviour
The occupant was asked to recall patterns of occupancy during the last two weeks in May (Table 2).Although only a limited amount of information has been provided, periods of known unoccupancy were identified during two particular days in the fourth week of May.The predicted profiles for these two days are given in Figure 6.
Figure 6(a) shows that the house was predicted to be empty during the late afternoon of the 26 th May and Figure 6(b) shows the prediction that it was empty for a period during the morning on the 29 th of May, which is confirmed by the information provided by the occupants.Encouragingly the time of leaving on the 29 th of May is also predicted correctly.This provides some confidence that the predictions of the model do fit with real patterns of occupancy.

Comparison with the Harmonised European Time of Use Survey Dataset
The The HETUS dataset was used to find the mean profile for a household which had a young child between the ages of 1-3, as described by Laarhoven, which is representative of the household that generated the data used in this analysis.The associated profile is given in Figure 7(a).Although this is extracted from Belgium data, the form and shape of the curve is representative of many other European Countries for this variable.shows the mean profile calculated on an hourly basis for the second two weeks of May, when the family were living in their home.Notice that the form of the predictive curve does in fact closely follow the shape of the curve extracted from the HETUS dataset.This gives some confidence that the predicted occupancy profile is plausible and in line with what might be expected for this type of household.

Occupancy and Demand response
Demand Response (DR) refers to a deliberate intervention, normally by the utility company, to cause a change in the magnitude and shape of user load profiles (Gellings 1993).This might be done through encouraging users through incentives or through direct actuation of energy.Occupancy provides a number of different benefits to the demand response paradigm.Firstly, because occupancy is so closely tied with household energy consumption, understanding occupancy patterns across a large number of dwellings can potentially be used to improve demand forecasting through identifying the periods in different households when high demand is possible.Secondly, because it is necessary for an occupant to be present to take part in behavioural based DR, knowing the occupancy patterns, informs when it is physically possible for an end-user to shift their demand.
Thirdly, combining typical occupancy patterns of individual households with their consumption data over a defined community, allows the identification of households that have the greatest potential to participate in, and make a significant contribution to overall community demand response.These households can then be targeted.
Finally, by installing additional technology, it is also possible to remotely actuate loads and achieve load shifting without the need for the occupant to take action.This actuated demand response can be enhanced by knowledge of occupancy patterns, which provides constraints on periods when user comfort must be maintained.It also allows loads to be actuated to bring occupant benefits, e.g.switching selected loads off to avoid wasting energy and increasing end-users bills when the occupant is not at home.These benefits of occupancy to DR will now be further explored.

Providing relevant, personalised and timely information to participants
The monitoring of occupancy patterns in a home provides useful information on user behaviour and lifestyle.
This will directly and indirectly affect the possibility and willingness of people to respond to information that encourages them to move load to a different time of day.On a basic level occupancy sensing provides information concerning the household routines of the occupant, allowing regular patterns of when they are in, leave, out and return to be identified.With enough data, patterns could be identified over different time scales from individual days of the week, through to monthly and even seasonal patterns of behaviour.Occupancy patterns could also be linked with other data, such as temperature and weather, to improve accuracy when using past patterns to anticipate future occupancy.Knowing patterns of when people are likely to be in and out of their home allows only relevant information, which occupants could conceivably respond to, to be communicated.As a concrete example, if a person normally arrived back from work at 6pm in the evening on a particular day, a mobile message could be sent to them a short while before this habitual event informing them of a DR opportunity, in anticipation of when they return home.On the other hand, if on another day they normally work away from home so that the house is unoccupied, it would allow the prevention of irrelevant communications that could annoy the user.Another way of seeing this is that, occupancy sensing could inform not only the time, but the way opportunities are communicated.For example, a graphical communication interface, while displaying other data, might highlight and give special emphasis to DR possibilities that the occupant is most likely be able to respond to, so that at a quick glance they are brought to their attention.Furthermore, the instantaneous feedback of whether a home is occupied or not, despite what the prediction was, is also very valuable and can be used to inform occupants of immediate opportunities that are now available, while they are at home (even if this is not their typical pattern of occupancy).
Occupancy sensing data can be combined with other relevant information to provide a richer understanding of occupancy behaviour and allow the relevant tailoring of information.A simple example of this would be combining it with statistics concerning the occupants response to information sent at different times over an extended period, which would allow informed targeting of opportunities they are more likely to be responded to.
For instance, this type of analysis might reveal that an occupant tends to respond to DR opportunities in the evenings between 6-8pm, but very rarely in the mornings.An understanding of behavioural response patterns is both beneficial to the occupant, who can take advantage of offered incentives, as well as to the party looking to reliably achieve a shift in peak demand at a specific time of day.
Another example is combining occupancy behaviour with consumption behaviour at different times of day, in order to make a first assessment of how feasible it is for someone to participate in DR and shift loads, within their existing schedule.For effective DR, one important factor that should be considered is the degree to which both the occupancy and load are elastic with respect to one another.In other words, how easy it is to change occupancy in order to shift a load, or how flexible the loads are, such that when present in the building, the occupant can take advantage of DR opportunities to the greatest effect.In the following, an example of an approach combining occupancy with consumption behaviour to assess this elasticity is suggested, demonstrating the benefit of fusing occupancy information with other data.
Figure 8 shows a bubble plot of the relationship between occupancy and power consumption at different times of day: on the abscissa is the mean occupancy over the specified time period and on the ordinate is the mean power consumption averaged over the same period.The occupancy prediction and power consumption for the candidate household in this study is averaged over an extended period, in this case the last two weeks of May.
The size of the bubble indicates the standard deviation in each parameter.In this example the analysis has been done with a three hour time period; however this can be altered as required.The graph suggests the time of day during which a household would most likely be able to respond to a demand response event.In the case of this example, it can be seen that in the time period 6-9 am, although the likely occupancy is high, demand use is fairly low and the spread of demand is small.This might indicate a regular routine in the morning, perhaps using similar appliances on a daily basis.It is unlikely that this time of day would provide much opportunity for demand response.Compare this with the period 9-12am.The occupancy remains high, with little change in the spread, but the mean load is on average higher with a much more significant spread.This indicates that during this period of the day there is significant variation in the use of appliances and their timing.In this instance analysis of the disaggregated data from the different electrical circuits, indicated that this particular spread was caused by the occupant regularly doing the clothes washing over this time period.However, this is not done on an everyday basis, hence the spread.The high likelihood of occupancy, combined with a high spread in the load, suggests that, if informed in advance, this might be a time during which the household in this study might be able to contribute to load shifting without significantly altering their behaviour.In contrast, the time period 15:00-18:00 shows a low mean and greater spread in the occupancy.This means there is much less certainty that the residents will be in the house at this time, and therefore there is a lower probability that they will be able to respond to a DR opportunity.Furthermore, it appears that when they are in the house at this time their power use is relatively low.This is unlikely to be the best time of day to request an occupant to shift a load.It is important to emphasis that this is not definitive, a large financial incentive might indeed cause an occupant to shift load into this time period, but, what is being argued is that a greater degree of demand response is most likely if it fits in with an occupants existing patterns of energy use and their daily routines.
Following on from this, the possibility of demand response (PDR) could be defined as follows: ´ ( Where ´ is the mean power used by the occupant during a predefined period averaged over N days of data.
is the standard deviation in the power.
´ is the mean occupancy during this period, averaged over a N days.
is the standard deviation in the occupancy.is a social factor that takes a value of between 0 to 1 and quantifies the willingness of a person to respond, which in this study is considered to take a value of unity, as we focus primarily on the possibility of someone participating in demand response.The intuition behind this definition is as follows: the greater the power use during a given period, the greater the potential shiftable load, and therefore the greater potential to gain from responding to a demand response signal.Furthermore, if an occupant's everyday routine tends to have a large degree of variation in the load consumption during a specified period, this may be indicative of there being a high degree of load flexibility .On the other hand, if the same load is used regularly, at the same time, this will result in only a small standard deviation, implying that it will require a more dramatic change in occupant behaviour in order to participate.The mean occupancy gives an indication of whether the person is likely to be at home and so able to response.Somebody who is almost always at home during a given period will be more able to respond than someone who is rarely at home.Finally, the denominator takes into account that the greater the degree of variation in the occupancy, the greater the uncertainty there is at any given moment in this time period whether there will be an occupant at home and able to respond.It can be argued that this reduces the likelihood of demand response.PDR has been calculated for each of the time periods in the bubble plot (Figure 8) and the results are given in Table 3; the hypothesis is that the larger the PDR value the greater the practical possibility of DR.In this example it can be seen that the highest values occur between 9:00-12:00 in the morning and 18:00-21:00 in the evening.On the other hand between the hours of 15:00-18:00 is when a response would be least expected.These results correspond with the previous description of the bubble plot.
Figure 9 illustrates how this system might work in practice.Power use is continually monitored and occupancy patterns are determined in real time.A decision is made as to whether there is likely to be a DR opportunity (PDR; see Equation 5) in the household based on historical patterns of occupancy and consumption.In this simplified flow chart a threshold is suggested as a means to make this decision, but other methods of classification should be explored.Further work also needs to be done to explore occupancy over different time domains.The PDR value suggested here also needs further validation of its usefulness in practice, which could be gauged by measuring household load response to communication of DR opportunities given for different time periods throughout the day over an extended period.

Enhanced actuations
Knowing both typical occupancy patterns and real time information on occupancy can greatly assist automatically actuated demand response by: (1) providing boundaries to the extent that actuations need to maintain users comfort (Lu et al 2010) ,when they are in the building, while allowing greater flexibility in what can be done when the user is away; (2) providing information to allow demand response to be executed strategically, preventing heat being wasted needlessly, which is important to users who are paying the energy bill; (3) providing windows of opportunities for load shifting in order to meet anticipated user demand (e.g. by ensuring that the home is warm enough when the occupant is at home, but taking advantage of knowledge of the availability of a DR opportunity to do this, or controlling when thermal storage loads are actuated); (4) allowing rapid adaption of actuations to fit with current real time occupancy (e.g. if user is not in, even if predicted to be, the current occupancy situation could be used to inform the decision of what to actuate and whether to actuate. An example of how knowledge of occupancy can be used to enhance actuated DR is in the control of a household's central heating.Space heating represents one of the largest loads during peak demand hours (during cold periods), and electrically heated homes are therefore prime candidates for participation in demand response (Henze 2005).Marie-Andree et al. ( 2011), explored controlling the temperature in a well-insulated home (without heat storage), using the thermal envelope and mass of the building to store energy.The goal was the reduction of peak loads during winter periods by controlling a house with electrical space heating equipment without the installation of additional heat storage equipment.The study suggested a 'pre-heat' strategy was an effective approach; using 'envelope thermal storage during off peak hours and setback during peak hours'.
Although there is a small increase in overall energy consumption using the pre-heat approach, by reducing peak load and increasing the use of renewables, an overall reduction in GHG emissions is achievable.
Occupancy sensing is essential for this type of demand response so that the home is not heated unnecessarily, which could be costly over a significant period of time, whilst making the most of available opportunities, and maintaining occupant comfort.Figure 10 gives a suggested strategy of how occupancy sensing could benefit the heating control of a home of this type and allow it to participate in demand response.
The application of occupancy profiles will greatly enhance the applicability of DR initiatives.However, it does not obviate the need for detailed consideration of desired thermal comfort in determining the DR potential of space heating systems complex (Yuce et al 2014) 10).

Conclusions and Further work
Households of different compositions, have different occupancy profiles determined by lifestyle, demographics and occupations that influence the energy demand in a building for both heating and electricity.In this study a methodology was developed that enables individual household occupancy patterns to be determined using ubiquitous household sensors.The method is an evidence based approach that is able to cope with missing data.
The method makes it simple to add additional evidence from other sensors, which could provide richer information on occupant interactions within the home.Importantly, the method required only a minimum amount of prior information on the household since it is self-learning and does not require ground truth data to be collected for every house.As a result the methodology can be more readily scaled.The analysis was applied to preliminary sensor data for a household comprising a child between of two years old.Features were derived from sensors that monitored electrical power, dew point temperature and indoor CO 2 concentration and fused using the Dempster-Shafer method of combining of evidence.A Hidden Markov method was then applied to predict time daytime occupancy profile.The predicted occupancy profile is cross-validated: (1) with ground truth information provided by the household and (2) using a comparison with a typical occupancy profile derived from the Harmonised European Time of Use Survey for a household of a similar democratic to this study.The approach, according to available knowledge of ground truth, is shown be effective, while effectively handling periods of missing sensor data.Further work is required, applying the method across a larger data set, with more ground truth data, to confirm its validity.
Real time occupancy sensing in the context of DR has been discussed and its benefit both to for user-initiated and actuated load shifting has been suggested.A simple metric, the possibility of DR (PDR), was introduced as a means to assess how possible a behavioural response from a given household is.This needs to be applied across a larger dataset in order to assess its usefulness in predicting, across a community, which homes are most likely to be able to participate, and make a contribution to shifting loads to period of peak local renewable generation.This could potentially lead to a simple way through which data from smart meters could be used to assess which homes could most benefit from a dynamic tariff as an incentive to shift energy demand.Indeed, occupancy sensing has been shown to provide contextual information that potentially enables demand response programs to be more effective.The approach could be used to assist in the transition towards more active energy citizens, as envisaged by the smart grid.Tables Table 1: The distinctiveness of different features between occupied and unoccupied states.

Information Known about Occupant Behaviour during May
For the first week of May the House was sublet During the second week, the house was empty except someone occasionally coming in.All of the family were living in the house during the third and forth weeks in May The family consists of a young couple with a toddler.The house was empty for a period on the afternoon of Tuesday 26 th May.
The house was empty for a period on the Morning of Friday 29 th May, leaving the house just before 9am.
The washing machine is rarely put on timer  5, for the time periods defined in the bubble plot (Figure 8).
Time Period PDR 6:00-9:00 0.02 9:00-12:00 0.06 12:00-15:00 0.03 15:00-18:00 0.01 18:00-21:00 0.05 21:00-24:00 0.02 instance, the work by Hailemariam et al. (Hailemariam et al 2011) on combining multiple sensor data using decision trees to predict occupancy, showed that over fitting can occur when combining a large number of sensors, even reducing overall accuracy.Careful selection of the classification technique for the occupancy inference problem is vital.The work by Lam et al. (Lam et al 2009) compares three classification methods for multi-sensor data: Support Vector Machine, Neural Networks and Hidden Markov Model (HMM).The HMM classifier was found to be the method that produced a profile that best described occupancy presence.The effectiveness of the HMM for classifying occupancy profiles was confirmed by Kleiminger et al.'s (Kleiminger et al 2013) who compared K-Nearest Neighbour (KNN), Support Vector Machines (SVM), Thresholding (THR) and Hidden Markov Model (HMM) classifiers for predicting occupancy from electricity consumption profiles.The HMM showed the best overall and consistent performance, even without taking into account prior probabilities.This was further demonstrated by Chen et al. (Dong Chen et al 2015).The HMM is a tool for representing probability distributions over a sequence of observations in time series data and they are well known for their applications in pattern recognitions systems (e.g.(Gales and Young 2007, Avilés-Arriaga and Sucar-Succar 2011, Hu et al 1996, Deng and Byrne 2008)), such as in handwriting and speech.One of the major advantages of the HMM compared with other methods, is that it has a time dimension, which takes into account the transition probability between occupied and unoccupied states as a function of the sequence of observed features.One of the challenges of using the HMM with a large feature vector is the number of training examples required: the number of parameters needed to describe the model grows exponentially with the number of observation variables or states (Rabiner 1988).Indeed this could become an issue with a large distributed network of sensors to predict occupancy.In order to address this shortcoming, Aviles-Arrianga et al. (Aviles-Arriaga et al 2003) considered the combination of Naïve Bayes classifiers with HMMs.Different evaluations have shown the Naïve Bayes classifier, though simple, to perform well across a variety of domains, even

Figure 4
Figure 4 (b) to (e) shows the methodology applied to four of the different selected features: (b) instantaneous mains feed electrical power, (c) CO 2 concentration in the home; (d) the rolling window standard deviation of CO 2 , (e) internal dew point temperature.The probability density distributions can be used to find an estimate Harmonised European Time of Use Survey (HETUS, 2013), provides 10 minutely data categorised by different activities, location and by a large number of other variables.Aerts et al. (Aerts et al 2014) used hierarchical clustering of occupancy patterns of the 2005 Belgian HETUS time survey and identified seven typical occupancy patterns of residential buildings (which can be summarised as: mostly at home; mostly absent; very short daytime absence; night-time absence; daytime absence; afternoon absence; and short daytime absence).Laarhoven (Laarhoven 2014) explored three examples of the average occupancy patterns discovered by Aerts and assigned plausible, indicative demographic conditions.These were: Couple without children (daytime absence)-occupied and active hours 6am-8am, 6pm-11pm.Retired couple (mostly at home): average active occupancy 8am to 11pm; couple with Children: High occupancy at 8am, decreasing to low occupancy at 1pm and increasing to high occupancy by 10pm.

Figure 2 :
Figure 2: The combined belief of a given set of features occurring is estimated using the Dempster-Shafer method.

Figure 3 :Figure 4 :
Figure 3: A count of switch events occurring for each week in May.

Figure 5 :Figure 6 :Figure 7 :
Figure 5: An example occupancy profile from the first week in May.The dotted line (---) gives the predicted occupancy profile.

Figure 8 :
Figure 8: The relationship between occupancy and power consumption throughout the day in three hour time blocks from 06:00 until midnight.The abscissa in each time block gives the mean occupancy and associated standard deviation found by averaging over the last two weeks in May.

Figure 9 :
Figure 9: The role of occupancy in encouraging users to shift loads and actively engage in demand response.

Figure 10 :
Figure 10: How occupancy sensing can contribute to actuated demand response.
of dew point (over a 30 minute time window) 0.05 First difference of dew point 0.2 Instantaneous power lighting circuit at 5 min intervals [kW] 0.01 Instantaneous power socket circuit at 5 min intervals [kW] 0.12 CO 2 concentration in the home [ppm] 0.27 Standard deviation of CO 2 level (over a 30 minute time window) 0.39s Instantaneous mains feed electrical at 5 min intervals [kW] 0.74 Rolling standard deviation of mains feed (over a 30 minute time window) provided by the occupant on their occupancy patterns in the second two weeks of May.
. Various studies have developed indices to quantify the level of thermal comfort (e.g.see(Hoppe 1999, Jendritzky et al. 2012)), which may be useful in development of DR (Yuce et al.. 2014)For instance, Yuce et al.(Yuce et al.. 2014)have proposed a dynamic neural-network based method to estimate the Predicted Mean Vote (PMV) from sensor data in real-time, one of the most popular thermal comfort indices, while simultaneously predicting energy demand.Combining knowledge of thermal comfort, predicted user energy demand (to achieve a given level of thermal comfort) and occupancy, will facilitate more effective DR control decisions to be made (e.g.see decision box 'Optimise cost versus comfort' in Figure