Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Data-Driven Models for Building Occupancy Estimation

Shadan Golestan Sepehr Kazemian Omid Ardakanian


University of Alberta University of Alberta University of Alberta
Edmonton, Canada Edmonton, Canada Edmonton, AB, Canada
golestan@ualberta.ca skazemia@ualberta.ca oardakan@ualberta.ca

ABSTRACT Conditioning (HVAC) and lighting, together accounting for about


The availability of accurate occupancy information from different 70% of the total energy end use across the building stock [20]. Thus,
spaces in a building allows for significant reduction in the energy even a modest improvement in the operation of HVAC and lighting
consumption of heating, ventilation, air conditioning, and lighting systems would yield substantial energy and cost savings in both
systems. This paper investigates the application of particle filters residential and commercial sectors.
and time series neural networks to inferring the number of occu- Building occupancy is one of the main factors determining its
pants of individual rooms from time series data collected by a set of energy consumption [6]. There are different types of spaces in a
occupancy-indicative sensors. Our approach is purely data driven building, each with a unique occupancy pattern. Despite huge vari-
and does not require developing customized and complex physics- ation in occupancy over space and time, the whole building is often
based models to predict the occupancy level of the many rooms in a treated as a uniform environment controlled with a fixed ventilation
building. We evaluate the efficacy of the proposed methods on two rate and static schedules for air conditioning and lighting, thereby
data sets, one contains measurements of dedicated sensors while wasting a lot of energy in conditioning empty or partially occupied
the other one contains measurements of HVAC sensors that are spaces. Studies suggest that potential energy savings of 20% to 40%
commonly available in commercial buildings. Our results indicate can be achieved by regulating HVAC and lighting systems based
that time series neural networks are superior in this application, on occupancy [1, 9, 17, 19]. However, fine-grained occupancy in-
estimating the number of occupants with a root-mean-squared er- formation is normally unavailable in buildings and camera-based
ror of 0.3 and 0.8 in the two data sets with a maximum of 7 and 67 occupancy monitoring is intrusive and costly at scale. This has
occupants, respectively. given rise to several techniques that are less intrusive, employing
other modes of sensing to estimate the occupancy state (viz. empty
CCS CONCEPTS or occupied) of different spaces within the building [2, 11, 23].
Despite recent advances in detecting human presence in build-
• Mathematics of computing → Probabilistic representa-
ings, existing techniques offer limited predictive power when it
tions; • Computing methodologies → Neural networks;
comes to discerning the number of occupants. This is an inherently
KEYWORDS difficult problem owing to the highly uncertain and complex nature
of occupancy dynamics. To address this, high-dimensional physics-
Data fusion, data-driven modelling, occupancy estimation based models have been developed to accurately predict internal
ACM Reference Format: heat gains of individual rooms, which are due to occupancy and
Shadan Golestan, Sepehr Kazemian, and Omid Ardakanian. 2018. Data- equipment load [12, 21]. However, these models have two major
Driven Models for Building Occupancy Estimation. In e-Energy ’18: Interna- shortcomings that limit their real-world application: (a) they must
tional Conference on Future Energy Systems, June 12–15, 2018, Karlsruhe, Ger- be customized for each room; (b) it is difficult to distinguish the
many. ACM, New York, NY, USA, 5 pages. https://doi.org/10.1145/3208903.
effect of occupancy from other latent factors. Data-driven models
3208940
can also be developed to discern the number of occupants of the
many rooms in a building [2–4, 13]. These models are easier to
1 INTRODUCTION
build and can substitute complex physics-based models with an
Buildings are responsible for more than 40% of global energy use insignificant loss of prediction accuracy [25].
and produce one third of global greenhouse gas emissions [24]. This This paper explores the application of two advanced data-driven
makes curtailment of building energy consumption a requisite step occupancy modelling techniques, namely particle filters and time
towards the worldwide effort to mitigate global warming. Buildings series neural networks, which fuse data from multiple occupancy-
contain vertically integrated mechanical and electrical systems indicative sensors, including dedicated occupancy monitoring sen-
that control their environment, such as Heating, Ventilation, Air sors and sensors that are commonly available in commercial build-
Permission to make digital or hard copies of all or part of this work for personal or ings (e.g., the HVAC sensors). We postulate that over a broad spec-
classroom use is granted without fee provided that copies are not made or distributed trum of sensor modalities, a person in a building will always leave
for profit or commercial advantage and that copies bear this notice and the full citation
on the first page. Copyrights for components of this work owned by others than the
a footprint, detectable through sufficient analysis. Compared to the
author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or physics-based models, training these models is straightforward, re-
republish, to post on servers or to redistribute to lists, requires prior specific permission quiring only a few weeks worth of data. We evaluate the accuracy of
and/or a fee. Request permissions from permissions@acm.org.
e-Energy ’18, June 12–15, 2018, Karlsruhe, Germany these techniques on a small number of rooms in two test buildings
© 2018 Copyright held by the owner/author(s). Publication rights licensed to the and show that these models are capable of predicting the number of
Association for Computing Machinery. occupants in every room with a relatively high accuracy. This paper
ACM ISBN 978-1-4503-5767-8/18/06. . . $15.00
https://doi.org/10.1145/3208903.3208940

277
e-Energy ’18, June 12–15, 2018, Karlsruhe, Germany Shadan Golestan, Sepehr Kazemian, and Omid Ardakanian

presents our preliminary results which are sufficiently promising Table 1: Our testbed
that a much broader study of these techniques is warranted. Data Sets Sensors
Building 1 VOC: Volatile organic compounds concentration
2 RELATED WORK
BLE: No. BLE beacons in the range of the receiver
There is a rich and growing corpus of work on estimating the occu- CAL: Calendar with scheduled events
pancy schedules of different rooms in a building. Most related work DAY: Flag indicating a weekday or a weekend
focuses on the application of machine learning and time-series anal-
ysis techniques to detecting human presence and determining the Building 2 CO2 : Carbon-dioxide concentration
number of occupants in a single room or a multistory building [2– Damper POS: VAV Damper position
5, 8, 13, 18, 19, 25]. Our approach is similar to these data-driven
methods have been used in the past to solve the binary occupancy
modelling techniques with two main differences. First, we adopt
detection problem [5, 18]. In this paper, the filtering problem of
particle filters and dynamic neural networks, which are powerful
interest is how to incorporate measurements of different sensors to
techniques for estimating hidden states in nonlinear dynamical sys-
estimate of the number of occupants of each room.
tems. Second, we compare the accuracy of these methods on two
In general, two models are required to estimate the hidden state
data sets with common and dedicated sensors. To our knowledge,
using a particle filter: a model describing the evolution of the state
these techniques have not been compared in previous work with
with time (the system model) and a model relating the noisy mea-
respect to the accuracy of predicting the number of occupants.
surements to the hidden state (the measurement model). The particle
In addition to the data-driven models, related work has uti-
filter represents the posterior occupancy state of a room by a set of
lized physics-based models of the indoor environment, such as the [s]
Resistance-Capacitance (RC) model [12, 21], to infer the occupancy random state samples or particles (x t with 1 ≤ s ≤ S) drawn from
schedules of a building from experimental or simulated data. The the system model, and assigns weights to these samples according
advantage of such models is their high granularity of temperature to the measurement model which represents the reliability of each
modeling, but they are high-dimensional and must be customized sensor. Assuming a Markov process of order one, the recursive
for each room, rendering them computationally expensive. Bayesian estimation can be written as:

3 METHODOLOGY p(X 0:t |Z 1:t ) =p(X t |Z t )p(X t |X t −1 )p(X 0:t −1 |Z 1:t −1 ),


Bayes
3.1 Testbed = η p(Z t |X t )p(X t |X t −1 )p(X 0:t −1 |Z 1:t −1 ), (1)
Our testbed is comprised of two buildings1 equipped with different
types of occupancy-indicative2 sensors as shown in Table 1. Build- where X t is a categorical random variable modelling the hidden
ing 1 [14] is a residential building equipped with dedicated sensors state, i.e., the number of occupants in the room at time t, and
including a Volatile Organic Compounds (VOC) sensor measuring Z t = [Z t1 , · · · , Z tM ] is a M-dimensional random variable modelling
indoor air quality, a Bluetooth Low Energy (BLE) receiver reporting measurements of M different sensors at t. If the maximum number
the number of BLE beacons in its proximity, a calendar feed indi- of occupants in the room is N , then X t takes values from 0, 1, ..., N ,
cating scheduled occupancy events, and a flag for distinguishing and p(X t = k) denotes the probability of having 0 ≤ k ≤ N
between weekdays and weekends. The BLE beacons are attached occupants at time t. Note that Z t only depends on X t ; hence, given
to key fobs carried by the occupants. The sensor measurements X t , Z t is independent of X t ′ , Z t ′ with t ′ , t.
and ground truth occupancy data are available for seven weeks Learning system and measurement models: Our goal is to
and the maximum occupant count recorded during this period is learn the transition matrix, denoted p(X t |X t −1 , Z t ) = p(X t |X t −1 ),
seven. Building 2 is a large commercial building with a Building and the observation matrix, denoted p(X t |Z t ), from the training
Management System (BMS) that archives measurements of damper data which is 50% of our data set. Once we have these two matri-
position and CO2 sensors which are integral parts of the Variable ces, we can estimate the probability of having a certain number of
Air Volume (VAV) system that exists in each zone. These sensors occupants at each time given the measurements of a set of sensors.
are commonly available in a commercial building with a central- The transition matrix encodes the probability of going from X t to
ized HVAC system. We have access to 16 days worth of VAV data X t +1 . To build the system model, we assume transition probabilities
and ground truth occupancy data from four different rooms in this are time-dependent. To estimate the transition probability at a given
building. The maximum numbers of occupants recorded in these time, we take into account all state transitions that happened in an
rooms during this time period are 29, 35, 39, and 67, respectively. interval of length τ = 10 minutes (i.e., τ is the unit of time).
We assume that for every sensor i, p(Z ti |X t = k) can be approx-
3.2 Particle Filters imated by a Gaussian distribution with a conditional mean and
variance with respect to the value of X t which can be estimated
Particle filtering (PF) is a powerful and widely used method for solv-
from the training data. We can write
ing optimal state estimation problems in non-linear non-Gaussian
(Z ti |X t = k) ∼ G( b
E(Z ti |X t = k), V(Z
b ti |X t = k) ),
scenarios [22]. The particle filtering algorithm is a special case of the
(2)
Sequential Monte Carlo (SMC) algorithm. Sequential data analysis
M
p(Z ti |X t = k),
1 Both
Ö
2A
data sets have been previously used for occupancy detection [10, 21].
p(Z t |X t = k) = (3)
sensor is deemed occupancy-indicative in a given space if there is a correlation
between its readings and the occupancy state of that space. i=1

278
Data-Driven Models for Building Occupancy Estimation e-Energy ’18, June 12–15, 2018, Karlsruhe, Germany

Multilayer Table 2: The RMSE of PF and NARX methods (Ri is the ith
perceptron room in Building 2)
Zt Xt
with one Building 2
Method Building 1
hidden layer R1 R2 R3 R4
X t −1:t −d PF 0.4 1.5 0.8 1.4 2.9
NARX 0.3 0.4 0.4 0.5 0.8
Figure 1: Time Series Neural Network block diagram. Maximum no. occupants 7 29 35 39 67
Average no. occupants 0.4 2.7 2.5 3.6 7.4
where b E(Z ti |X t = x) and V(Z
b i |X t = x) are the estimated condi-
t Peak-to-avg. occ. ratio 0.06 0.09 0.07 0.09 0.11
tional mean and variance of the ith sensor, respectively.
Algorithm 1 [22] describes the PF algorithm. Note that the more
accurately a particle estimates the state, the higher weight (impor-
tance) it would get.

ALGORITHM 1: The Particle Filter Algorithm


Input: S : Number of particles; T : Length of the data set;
Z 1:T : Measurements of the sensor(s) up to time T
Output: X1:T : Set of particles up to time T
Xt = { } ∀t ∈ {1, · · · , T }; // Initialization
for t = 1 to T do
X̄ = { };
for s = 1 to S do
[s ] [s ]
Sample x t ∼ p(X t |X t −1 = x t −1 );
[s ] [s ]
wt = p(Z t |X t = x t ); // Calculate importance factor
[s ] [s ] Figure 2: Estimated occupancy count using PF in Building 1
X̄ = X̄ + {x t , wt }
| RMSE = 0.4
for s = 1 to S do
[s ]
Draw s with probability ∝ w t ; // Importance resampling
[s ]
Add x t to Xt ;

3.3 Time Series Neural Networks


Dynamic neural networks can be also used for input-output mod-
eling of nonlinear dynamical systems [7]. In this paper, we adopt
nonlinear autoregressive network with exogenous inputs (NARX)
which is a recurrent dynamic network with feedback connections
enclosing several layers of the network. The network is similar to
a feedforward network, but in addition to the regular input Z t it is
fed with d previous output variables, i.e., {X t −1 , X t −2 , · · · , X t −d },
where d is defined in a way that the network receives the last
10-minute outputs for prediction. Figure 1 shows the network ar-
Figure 3: Estimated occupancy count using NARX in Build-
chitecture. The network is trained using the Levenberg-Marquardt
ing 1 | RMSE = 0.3
algorithm [16] utilizing MATLAB Neural Network Toolbox [15].
We use 50%, 30% and 20% of the data for training, validation, and errors of both methods are higher in those rooms that the peak-to-
testing, respectively. average occupancy ratio3 is lower, suggesting that the difference
in the prediction errors cannot be explained by the maximum or
4 RESULTS the average number of occupants alone.
We run the proposed methods on our testbed to estimate the num- Figures 2, 3, 4, 5 show the PF and NARX predictions and the
ber of occupants in each room. Table 2 shows the performance of ground truth occupancy data in Building 1 and Building 2 (Room
both PF (with 1000 particles) and NARX methods on the two data 4). As depicted in Figure 2, the prediction error of the PF algorithm
sets measured by Root Mean Squared Error (RMSE). It can be read- is higher when there is a short occupancy event, e.g., on August
ily seen that the NARX method outperforms the PF method in all 24th, the number of occupants decreased to one, and then quickly
rooms. Nevertheless, the PF method also yields a relatively accurate
prediction of the number of occupants when compared to the max- 3 The peak-to-average occupancy ratio of a room is defined as the maximum number
imum occupancy level of each room. Interestingly, the prediction of occupants divided by the average number of occupants in that room.

279
e-Energy ’18, June 12–15, 2018, Karlsruhe, Germany Shadan Golestan, Sepehr Kazemian, and Omid Ardakanian

case4 . As expected, increasing the number of particles improves the


prediction accuracy of the PF method, but this comes at the cost of
increasing its computation time.

Table 3: The RMSE of PF for different number of particles.


Building 2 Building 2 Avg. Computation
No. Particles
Room 1 Room 4 Time (s)
500 4.7 4.6 2710.1
1000 2.7 3.6 5751.0
2000 2.4 3.2 11456.0
3500 1.7 2.8 21288.3
Figure 4: Estimated occupancy count using PF in Building 2, 5000 1.7 2.7 33398.0
Room 4 | RMSE = 2.9 7000 1.4 2.4 58759.4

5 DISCUSSION
Data-driven occupancy modelling techniques show great promise
in both residential and commercial buildings equipped with ded-
icated and common occupancy-indicative sensors. As shown in
Table 2, both PF and NARX models exhibit better performance on
Building 1. This can be partly attributed to the dedicated occupancy-
indicative sensors that were installed in this building; however, it
can also be due to the fact that we had fewer occupants in this
building. We cannot draw a conclusion without analyzing data
from a building that has a higher typical occupancy level and is
equipped with dedicated sensors. In any case, both techniques also
exhibit acceptable performance on Building 2, which has a higher
Figure 5: Estimated occupancy count using NARX in Build- occupancy level and only includes commonly available sensors.
ing 2, Room 4 | RMSE = 0.8 There is an inherent trade-off between the complexity of a model
returned to two. The algorithm missed this rapid change in occu- and its predictive accuracy. However, although physics-based mod-
pancy. This can also be seen in Figure 4. In addition, the predicted els are typically more accurate, our findings confirm that black-box
occupancy count decreases gradually when the room becomes un- models can achieve comparable performance with much less train-
occupied. These two observations can be attributed to the fact that ing effort. Thus, they should be seen as contenders to complex
the CO2 concentration level builds up and drops slowly. Further- physics-based models which must be customized per room.
more, the PF algorithm predicts the occupancy slightly ahead of
the actual incident in Building 1. We attribute this to the fact that
6 CONCLUSIONS
we take scheduled events (from the calendar) into account when Modern buildings are increasingly being instrumented with a myr-
we train the models. Thus, when there is a scheduled event, the iad of networked sensors to gain more insight into their operation.
probability of seeing a change in the occupancy state increases. However, modelling and estimation of building occupancy is still
It should be noted that although NARX outperforms PF in both an open problem due to the highly uncertain and complex nature
data sets, its predicted occupancy starts to fluctuate when number of occupancy dynamics and variations seen across multiple time
of occupants increases to seven in Building 1; this is evident in scales. We developed two data-driven occupancy models by fusing
Figure 3. We further study how the room occupancy level affects data from dedicated and commonly available occupancy-indicative
the prediction accuracy of our methods. In particular, running the sensors. Using data collected from two test buildings, we showed
PF method with 1000 particles on Room 1 of Building 2, gives an that these models are capable of predicting the number of occu-
RMSE of 0.72 when there are only 23 occupants in that room. Given pants in each room with a high accuracy. This paper presents our
that the maximum occupancy of Room 1 is 29, we can conclude that preliminary results and discusses several issues that will be ad-
the PF algorithm makes more erroneous predictions as the number dressed in future work. We plan to compare the performance of
of occupants increases. these black-box models with physics-based models on a larger data
The performance of the PF method depends on the number set to understand how much we can improve the prediction accu-
of particles that it uses to represent the posterior. To study the racy by increasing the model complexity. Furthermore, we intend
sensitivity of the results to the number of particles, we run the to quantify the potential energy savings associated with the im-
PF algorithm with different numbers of particles on Building 2 plementation of a learning-based model predictive control scheme
(Room 1 and Room 4) where the algorithm performed relatively that relies on the obtained occupancy models.
poorly. Table 3 shows the average RMSE over 10 runs for each 4 The standard deviation is very small (∼ 50s).

280
Data-Driven Models for Building Occupancy Estimation e-Energy ’18, June 12–15, 2018, Karlsruhe, Germany

REFERENCES [23] Amee Trivedi, Jeremy Gummeson, David Irwin, Deepak Ganesan, and Prashant
[1] Yuvraj Agarwal, Bharathan Balaji, Seemanta Dutta, Rajesh K. Gupta, and Thomas Shenoy. 2017. iSchedule: Campus-scale HVAC scheduling via mobile WiFi moni-
Weng. 2011. Duty-cycling buildings aggressively: The next frontier in HVAC toring. In Proc. 8th International Conference on Future Energy Systems (e-Energy).
control. In Proc. 10th International Conference on Information Processing in Sensor ACM, 132–142.
Networks (IPSN). ACM/IEEE, 246–257. [24] United Nations Environmental Programme, Sustainable Buildings and Climate
[2] Omid Ardakanian, Arka Bhattacharya, and David Culler. 2016. Non-intrusive Initiative. 2009. Buildings and climate change: Summary for decision-makers.
techniques for establishing occupancy related energy savings in commercial [25] Datong P. Zhou, Qie Hu, and Claire Tomlin. 2017. Quantitative comparison of
buildings. In Proc. 3rd International Conference on Systems for Energy-Efficient data-driven and physics-based models for commercial building HVAC systems.
Built Environments (BuildSys). ACM, 21–30. In Proc. American Control Conference. 2900–2906.
[3] Irvan B Arief-Ang, Flora D Salim, and Margaret Hamilton. 2017. DA-HOC:
Semi-Supervised Domain Adaptation for Room Occupancy Prediction using CO2
Sensor Data. In Proc. 4th International Conference on Systems for Energy-Efficient
Built Environments (BuildSys). ACM, In Press.
[4] Neal Master Jay Taneja David Culler Aswani, Anil and Claire Tomlin. 2012.
Reducing transient and steady state electricity consumption in HVAC using
learning-based model-predictive control. Proc. IEEE 100, 1 (Jan. 2012), 240–253.
[5] Luis M. Candanedo, VÃľronique Feldheim, and Dominique Deramaix. 2017. A
methodology based on Hidden Markov Models for occupancy detection and
a case study in a low energy residential building. Energy and Buildings 148,
Supplement C (2017), 327–341.
[6] Wen-Kuei Chang and Tianzhen Hong. 2013. Statistical analysis and modeling of
occupancy patterns in open-plan offices using measured lighting-switch data.
Building Simulation 6, 1 (Mar. 2013), 23–32.
[7] Georg Dorffner. 1996. Neural networks for time series processing. 6 (1996),
447–468.
[8] Varick L. Erickson, Stefan Achleitner, and Alberto E. Cerpa. 2013. POEM: Power-
efficient occupancy-based energy management system. In Proc. 12th International
Conference on Information Processing in Sensor Networks (IPSN). ACM/IEEE, 203–
216.
[9] Varick L. Erickson, Miguel Á. Carreira-Perpinán, and Alberto E. Cerpa. 2011.
OBSERVE: Occupancy-based system for efficient reduction of HVAC energy. In
Proc. 10th International Conference on Information Processing in Sensor Networks
(IPSN). ACM/IEEE, 258–269.
[10] Florian Fiebig, Sebastian Kochanneck, Ingo Mauser, and Hartmut Schmeck. 2017.
Detecting occupancy in smart buildings by data fusion from low-cost sensors:
poster description. In Proc. 8th International Conference on Future Energy Systems
(e-Energy). ACM, 259–261.
[11] Sunil K. Ghai, Lakshmi V. Thanayankizil, Deva P. Seetharam, and Dipanjan
Chakraborty. 2012. Occupancy detection in commercial buildings using oppor-
tunistic context sources. In Pervasive Computing and Communications Workshops.
IEEE, 463–466.
[12] Qie Hu, Frauke Oldewurtel, Maximilian Balandat, Evangelos Vrettos, Datong
Zhou, and Claire J Tomlin. 2016. Building model identification during regular
operation - empirical results and challenges. In Proc. American Control Conference.
605–610.
[13] Ming Jin, Nikolaos Bekiaris-Liberis, Kevin Weekly, Costas Spanos, and Alexandre
Bayen. 2015. Sensing by Proxy: Occupancy Detection Based on Indoor CO2 Con-
centration. In Proc. 9th International Conference on Mobile Ubiquitous Computing,
Systems, Services and Technologies. 1–10.
[14] KIT. Accessed Jan. 2018. KIT Energy Smart Home Lab. Online https://github.
com/aifb/eshl-occupancy/. (Accessed Jan. 2018).
[15] MATLAB. 2018. Toolbox for TSNN. Online https://www.mathworks.com/help/
nnet/modeling-and-prediction-with-narx-and-time-delay-networks.html.
(2018).
[16] Jorge J Moré. 1978. The Levenberg-Marquardt algorithm: Implementation and
theory. In Numerical analysis. Springer, 105–116.
[17] Bill Von Neida, Dorene Manicria, and Allan Tweed. 2001. An Analysis of the En-
ergy and Cost Savings Potential of Occupancy Sensors for Commercial Lighting
Systems. Illuminating Engineering Society 30, 2 (2001), 111–125.
[18] Jose Luis Gomez Ortega, Liangxiu Han, and Nicholas Bowring. 2016. A novel
dynamic hidden semi-Markov model (D-HSMM) for occupancy pattern detec-
tion from sensor data stream. In Proc. 8th IFIP International Conference on New
Technologies, Mobility and Security (NTMS). 1–5.
[19] Yuzhen Peng, Adam Rysanek, Zoltán Nagy, and Arno Schlüter. 2018. Using
machine learning techniques for occupancy-prediction-based cooling control in
office buildings. Applied Energy 211 (2018), 1343–1358.
[20] Luis Pérez-Lombard, José Ortiz, and Christine Pout. 2008. A review on buildings
energy consumption information. Energy and Buildings 40, 3 (2008), 394–398.
[21] Fisayo C. Sangogboye, Krzysztof Arendt, Ashok Singh, Christian T. Veje,
Mikkel Baun Kjærgaard, and Bo Nørregaard Jørgensen. 2017. Performance
comparison of occupancy count estimation and prediction with common versus
dedicated sensors for building model predictive control. Building Simulation 10,
6 (Dec. 2017), 829–843.
[22] Sebastian Thrun, Wolfram Burgard, and Dieter Fox. 2005. Probabilistic Robotics
(Intelligent Robotics and Autonomous Agents). The MIT Press.

281

You might also like