Next Article in Journal
Statistical Measures: Promising Features for Time Series Based DDoS Attack Detection
Previous Article in Journal
Size and Heading of SAR-Detected Ships through the Inertia Tensor
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Computational Topology to Monitor Human Occupancy †

Institute of Information Science and Technologies—CNR, Via G. Moruzzi 1, 56124 Pisa, Italy
*
Author to whom correspondence should be addressed.
Presented at the International Workshop on Computational Intelligence for Multimedia Understanding (IWCIM), Kos Island, Greece, 2 September 2017.
Proceedings 2018, 2(2), 99; https://doi.org/10.3390/proceedings2020099
Published: 10 January 2018

Abstract

:
The recent advances in sensing technologies, embedded systems, and wireless communication technologies, make it possible to develop smart systems to monitor human activities continuously. The occupancy of specific areas or rooms in a smart building is an important piece of information, to infer the behavior of people, or to trigger an advanced surveillance module. We propose a method based on computational topology to infer the occupancy of a room monitored for a week by a system of low-cost sensors.

1. Introduction

Improving the energy efficiency of buildings is a lively research topic. Technologies for the monitoring and consequent intervention on the environment not only help saving resources, but also improve the well-being perceived by building occupants [1]. One of the simplest policies to improve energy-efficiency while respecting the well-being of occupants, is the automatic regulation of the usage of energy based on the occupancy of the building spaces [2]. If no users are detected in the monitored space, inactive devices can be disconnected; environmental setpoints for air conditioners, heaters, and humidifiers can be decreased; lights can be lowered or turned off.
The key requisite for implementing occupancy-driven applications is an accurate, inexpensive, and non-intrusive method for monitoring occupancy. Non-intrusive means that the user is not required to have smartphones or RFID identification systems, which provide information about its presence within the space. Usually, such systems are referred to as device-free, and exploit the networks of acoustic, inertial, environmental and power sensors already installed in the buildings [3].
Recently, many authors proposed to analyse data from multiple sensors (electric power meters, accelerometers and noise meters) to identify the user’s presence or absence in a space [4,5]: variations of sensor time series, due to the arrival or exit of a user from a space, are analyzed to infer a classification template for the user’s presence/absence. Conversely, refs. [6,7,8] address the problem of identifying user activities by analyzing the spectral fingerprint of the energy consumption due to the used appliances during their activities. Ref. [9] investigates about the possibility of identifying the user activity by analyzing energy consumption patterns from electrical appliances.
Device-free sensing of building occupancy poses many challenges, as any sensor shows a noisy behavior under certain conditions. For example, inertial sensors can cause spurious detection deriving from pets movements; though CO2 sensors are less sensitive to their placement and to external events, their efficiency is directly related to the ventilation of the building. Therefore, robustness to noise is a key issue for device-free sensor system. In this work, we present an algorithm for extracting topological features from sensor time series, to support the implementation of a device-free detection algorithm of presence/absence. Basing on the theory of Persistent Homology, we evaluate the relevance of topological features as their persistence (a topological event’s lifespan) in the so-called barcodes [10]. The assumption is that persistent features identify important events, while features with a shorter lifespan correspond to noise. The result is a topological fingerprint of the user’s presence, which can be used in an unsupervised approach for state classification. The main advantages brought by Persistent Homology are low computational cost, and high resilience to noisy data.

2. Topological Data Analysis

Topology is a branch of mathematics dealing with qualitative information of an object: topology looks at the intrinsic and global properties of an object, such as its shape [11]. Recently, Topological Data Analysis (TDA) methods are increasingly used to investigate and characterize multidimensional datasets. The research on TDA was recently boosted by the introduction of the Persistent Homology (PH) theory [12], along with fast algorithms for its computation [13] and efficient implementations [14]. The application scenarios include shape and texture analysis [15], biological and molecular data analysis [16], sensor networks [17], image and signal processing [18,19,20]. In what follows, we offer a brief intuition on PH; we refer the reader to [21] for a rigorous treatment of the subject.
The core idea of PH is to represent data as filtered simplicial complexes. Given a simplicial complex (for example, a triangle mesh), filtering the complex means defining a rule to build the complex as a sequence of nested sub-complexes. An example of filtered complex is the Vietoris-Rips complex, whose construction is shown in the example of Figure 1: at the first stage of the filtration, only the nodes are included; then, in subsequent steps, the edges in the complex appear ordered by the distance between their endpoints (the filtration parameter). There are many viable choices on how to filter a complex associated to a dataset: this is one of the main strengths of PH-based approaches. Once the dataset is encoded as a filtered simplicial complex, one evaluates the birth and death of topological events (homology classes) while growing the filtration parameter: for example, when connected components appear and when are merged, when holes are created and when are closed off, and so on. The lifespan of these events is stored in a stable invariant: the  i barcode. A barcode in a given dimension i is a collection of horizontal bars in a plane: the horizontal axis corresponds to the parameter to filter the complex, while the vertical axis represents an arbitrary ordering of homology generators in dim i (see Figure 2 for an example of barcodes in dim 0 and 1). The length of each bar is interpreted as the lifespan or persistence of the corresponding generator: short bars are interpreted as noise, while long bars as important topological features.
In this paper, we compute the persistence barcodes on time series from multiple sensors placed in a room, to detect the points in time when the room is occupied. The assumption is that room occupancy is reflected by some topological features in PH. To compute the barcodes, the first step is to discretise the sensor time series and represent them as filtered complexes, as described in the next Section.

3. Feature Extraction Algorithm

Given K different sensor time series, each of length M, we represent them with a matrix (Figure 3): each column corresponds to the time series of a single sensor, whereas each row corresponds to all sensor values sampled at a given time. Then, we cluster rows into sliding windows F i [19]: each F i corresponds to W time samples of all K sensors, with each window sharing W / 2 samples with the previous one. Therefore, each F i can be seen as a point cloud, made of W points in the Euclidean space R K , where the coordinates correspond to the output of the different sensors.
For each point cloud F i associated with a sliding window, we compute the Vietoris-Rips complex filtered by the Euclidean distance between points, and compute the corresponding barcodes. The analysis of the barcodes then gives insights on the likelyhood of a window to correspond to a period when the room is occupied. In particular, we analyse the barcodes through a set of descriptors derived by the topological features summerized in each barcode [20]: the number of 0 and 1 topological events; the number of 0 and 1 topological long events (i.e., events with lifespan greater than a fixed threshold: τ 0 in dimension 0 and τ 1 in dimension 1); and the average lifespan in dimension 0 and 1.
The feature extraction algorithm is summarised in Algorithm 1. The computations have been carried out using JavaPlex [22].
Algorithm 1 PH-based Algorithm for Feature Extraction.
  • Step 1.
    •      a. Group data in blocks of length W, overlapping of W / 2 each other
    •      b. Compute the associated set of point clouds F i
    •      c. Mean-center and normalize each F i
  • Step 2.
    •       For each F i :
    •      a. Compute the associated barcodes in dimension 0 and 1 (i.e., B 0 , i and B 1 , i )
    •      b. Count the topological events in B 0 , i and B 1 , i
    •      c. Count the long topological events
    •      d. Compute the average lifespan for each barcode
The set of descriptors is evaluated as a predictor of the occupancy of the room. The detection procedure works as follows: (i) the window F i for which the descriptor reaches its highest values is selected; (ii) this selection is performed over all the descriptors; (iii) the intersection among the set of selected windows is evaluated. The detection of presence occurs in the windows belonging to the intersection; and the absence in the remaining windows.

4. Experiments

The following subsections describe our scenario and the results we got in our preliminary study.

4.1. Experimental Set-Up

The detection of the user’s presence was performed using time series acquired by three sensors: motion, acoustic, and a power meters sensor. Acoustic and motion sensors are characterized by a binary output: they return 1 if motion, or respectively high level of environmental noise, is detected, and 0 otherwise. The output of the power meter is a scalar that ranges from 0 to the level of consumed electric power.
The sensors’ time series were acquired at an average sampling rate of 1 per minute, through a monitoring system installed in an office at the National Research Council of Italy (CNR) in Pisa. The office is 25 m2 and it is used by only one employee. The typical working day at CNR ranges from 9.00 a.m. to 6.00 p.m. (Monday–Friday). Lamps, PCs and other appliances such as printers, kettles or coffee machines, may be present in the room.
The sensors deployed in the office communicate via ZigBee protocol with a gateway based on the Raspberry PI board which runs an integration middleware for sensing information. The data collected by the gateway are stored on a cloud infrastructure hosted at CNR. The cloud is organized as a set of virtual machines based on an VMware ESX Server providing three kinds of services: storage, visualization through an interactive dashboard, and tools for the analysis of data.
The data have been collected for one week asking the occupant to register the ground truth of the room occupancy.
The three time series were temporally aligned: a week of acquisition produced 8840 samples for each time series. So, the data matrix in Figure 3 has M = 8840 rows and K = 3 columns. Rows have been grouped in sliding windows of size: W = 18 , 34 , 68 . For each value of the window size W, we obtain a sequence of point clouds F i in R 3 , with the corresponding Rips-Vietoris complex and persistence barcodes.
The number of long topological features, for each F i , was counted using different values for both thresholds τ 0 and τ 1 . Precisely, we have characterized topological events on a lattice of points ( τ 0 , τ 1 ) , both ranging in the interval [ 0.1, 0.9] with step size 0.2 .

4.2. Results

4.2.1. Relation between Descriptors and Room Occupancy

Figure 4 shows the number of counted features for each F i , with W = 68 . The comparison of this graph with the ground truth suggests that the greater number of features is obtained for those windows corresponding to the presence of the user in the office. In general, features in dim 0 showed better correlation with room occupancy than features in dimension 1. This is probably due to the fact that 0-dimensional features are linked to the correlation between samples within the windows considered, while features in dim 1 are indicators of possible periodic pattern in the signal time series, which are negligible in our data.

4.2.2. Dependence on the Window Size

Figure 5 shows the dependence of the 0 dim Long Features on the window size W. It shows that the more samples are included within the same window, the more information can be extracted: increasing the window size, the number of features counted in windows corresponding to the user’s presence increases. On the other hand, a smaller window size would imply a lower number of features and may cause the loss of useful information.

4.2.3. Prediction Performance

Figure 6 shows the prediction performance obtained with the descriptor extracted from sensor time series with the values W = 68 and τ 0 = 0.1 , which provided the best set of descriptors for the detection procedure. The values ‘Presence’ and ‘no Presence’ in the axes ‘Verified’ are the ground truth, as registered by the room occupant; values ‘Presence’ and ‘no Presence’ in the axes ‘Predicted’ are those obtained by our detection algorithm. Figure 6 shows that the detection algorithm detects a ‘Presence’, which is confirmed by the ground truth. Instead, with a probability of 88% the detection algorithm detects a ‘no Presence’, which is again confirmed by the ground truth. The algorithm performance in our preliminary study is promising compared to the results in [3], considering that their period of experimentation is quite longer (one month vs one week).

5. Conclusions and Future Work

The results reported in the previous section show that PH-based methods are useful to encode the information from low-cost monitoring systems about human activity. A further analysis may be carried out in order to understand if the proposed set of topological features may characterize more precisely human activity, not limiting to the occupancy of a room. Viable options for developing a topology-based activity detection may be: increasing the number of low-cost sensors used for the data acquisition, increasing the computation of PH to dimensions > 1 , and complementing topological data analysis with adaptive detection techniques.

Acknowledgments

For the time series used to validate the results presented in this paper, we give thanks to the framework of the ”Renewable Energy and ICT for Sustainability Energy” project, supported by the Italian Ministry of University and Research (MIUR) through the project ”Active Ageing at Home” (CTN01 00128 297061).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Barsocchi, P.; Ferro, E.; Fortunati, L.; Mavilia, F.; Palumbo, F. EMS@ CNR: An energy monitoring sensor network infrastructure for in-building location-based services. In Proceedings of the 2014 International Conference on High Performance Computing & Simulation (HPCS), Bologna, Italy, 21–25 July 2014; pp. 857–862. [Google Scholar]
  2. Barsocchi, P.; Cimino, M.G.; Ferro, E.; Lazzeri, A.; Palumbo, F.; Vaglini, G. Monitoring elderly behavior via indoor position-based stigmergy. Pervasive Mob. Comput. 2015, 23, 26–42. [Google Scholar] [CrossRef]
  3. Barsocchi, P.; Crivello, A.; Girolami, M.; Mavilia, F.; Ferro, E. Are you in or out? Monitoring the human behavior through an occupancy strategy. In Proceedings of the 2016 IEEE Symposium on Computers and Communication (ISCC), Messina, Italy, 27–30 June 2016; pp. 159–162. [Google Scholar]
  4. Kleiminger, W.; Beckel, C.; Staake, T.; Santini, S. Occupancy detection from electricity consumption data. In Proceedings of the 5th ACM Workshop on Embedded Systems For Energy-Efficient Buildings, Roma, Italy, 11–15 November 2013; pp. 101–108. [Google Scholar]
  5. Chen, D.; Barker, S.; Subbaswamy, A.; Irwin, D.; Shenoy, P. Nonintrusive occupancy monitoring using smart meters. In Proceedings of the 5th ACM Workshop on Embedded Systems For Energy-Efficient Buildings, Roma, Italy, 11–15 November 2013; pp. 91–98. [Google Scholar]
  6. Patel, S.N.; Robertson, T.; Kientz, J.A.; Reynolds, M.S.; Abowd, G.D. At the flick of a switch: Detecting and classifying unique electrical events on the residential power line. In UbiComp 2007: Ubiquitous Computing; Springer-Verlag: Berlin, Germany, 2007; pp. 271–288. [Google Scholar]
  7. Ruzzelli, A.G.; Nicolas, C.; Schoofs, A.; O’Hare, G.M.P. Realtime recognition and profiling of appliances through a single electricity sensor. In Proceedings of the 2010 7th Annual IEEE Communications Society Conference on Sensor Mesh and Ad Hoc Communications and Networks (SECON), Boston, MA, USA, 21–25 June 2010; pp. 1–9. [Google Scholar]
  8. Rosdi, N.A.M.; Nordin, F.H.; Ramasamy, A.K. Identification of electrical appliances using non-intrusive magnetic field and probabilistic neural network (pnn). In Proceedings of the 2014 IEEE International Conference on Power and Energy (PECon), Kuching, Malaysia, 1–3 December 2014; pp. 47–52. [Google Scholar]
  9. Klingensmith, N.; Willis, D.; Banerjee, S. Extracting events from spatial time series. In Proceedings of the 11th ACM Conference on Embedded Network Sensor Systems, Roma, Italy, 11–15 November 2013; pp. 5–8. [Google Scholar]
  10. Ghrist, R. Barcodes: The Persistent Topology of Data. Bull. Am. Math. Soc. 2008, 45, 61–75. [Google Scholar] [CrossRef]
  11. Hatcher, A. Algebraic Topology; Cornell University: New York, NY, USA, 2001. [Google Scholar]
  12. Edelsbrunner, H.; Harer, J. Persistent homology—A survey. Contemp. Math. 2008, 453, 257–282. [Google Scholar]
  13. Zomorodian, A.; Carlsson, G. Computing Persistent Homology. Discret. Comput. Geom. 2005, 33, 249–274. [Google Scholar] [CrossRef]
  14. Otter, N.; Porter, M.A.; Tillmann, U.; Grindrod, P.; Harrington, H.A. A roadmap for the computation of persistent homology. arXiv 2017, arXiv:1506.08903. [Google Scholar] [CrossRef] [PubMed]
  15. Biasotti, S.; Falcidieno, B.; Giorgi, D.; Spagnuolo, M. Mathematical Tools for Shape Analysis and Description; Morgan & Claypool: Williston, VT, USA, 2014; Volume 6. [Google Scholar]
  16. Jonoska, N.; Saito, M. Discrete and Topological Models in Molecular Biology; Natural Computing Series; Springer: Berlin/Heidelberg, Germany, 2014. [Google Scholar]
  17. Silva, V.D.; Ghrist, R. Coverage in sensor networks via persistent homology. Algebr. Geom. Topol. 2007, 7, 339–358. [Google Scholar] [CrossRef]
  18. Carlsson, G.; Ishkhanov, T.; de Silva, V.; Zomorodian, A. On the local behaviour of spaces of natural images. Int. J. Comput. Vis. 2008, 76, 1–12. [Google Scholar] [CrossRef]
  19. Perea, J.A.; Harer, J. Sliding Windows and Persistence: An Application of Topological Methods to Signal Analysis. Found. Comput. Math. 2015, 15, 799–838. [Google Scholar] [CrossRef]
  20. Pereira, C.M.; de Mello, R.F. Persistent Homology for Time Series and Spatial Data Clustering. Expert Syst. Appl. 2015, 42, 6026–6038. [Google Scholar] [CrossRef]
  21. Biasotti, S.; De Floriani, L.; Falcidieno, B.; Frosini, P.; Giorgi, D.; Landi, C.; Papaleo, L.; Spagnuolo, M. Describing Shapes by Geometrical-topological Properties of Real Functions. ACM Comput. Surv. 2008, 40, 12:1–12:87. [Google Scholar] [CrossRef]
  22. Tausz, A.; Vejdemo-Johansson, M.; Adams, H. JavaPlex: A research software package for persistent (co)homology. In Mathematical Software—ICMS 2014; Hong, H., Yap, C., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; pp. 129–136. Available online: http://appliedtopology.github.io/javaplex/ (accessed on 1 March 2017).
Figure 1. An example of the Rips-Vietoris complex associated to a 2D point could, with the filtration parameter d induced by the Euclidean distance between points. At d = 0 the complex is made of the 0-points, as shown in (a); increasing d in (b), (c) and (d), edges, faces and tetrahedra enter the simplical complex.
Figure 1. An example of the Rips-Vietoris complex associated to a 2D point could, with the filtration parameter d induced by the Euclidean distance between points. At d = 0 the complex is made of the 0-points, as shown in (a); increasing d in (b), (c) and (d), edges, faces and tetrahedra enter the simplical complex.
Proceedings 02 00099 g001
Figure 2. An example of two barcodes (dim 0 and 1) from the experiment described in Section 3: they are computed from F 59 , with W = 68 .
Figure 2. An example of two barcodes (dim 0 and 1) from the experiment described in Section 3: they are computed from F 59 , with W = 68 .
Proceedings 02 00099 g002
Figure 3. Matrix Representation of the Data.
Figure 3. Matrix Representation of the Data.
Proceedings 02 00099 g003
Figure 4. 0-dim Long Features. The graph of the number of features (blue) is shown together with the ground truth graph (red).
Figure 4. 0-dim Long Features. The graph of the number of features (blue) is shown together with the ground truth graph (red).
Proceedings 02 00099 g004
Figure 5. 0-dim Long Features vs. Window Size: each graph shows the number of features counted in the corresponding sliding window of size 18 in (a), 34 in (b), and 68 in (c). Note that increasing the window size results in a larger number of features. (a) W = 18; (b) W = 34; (c) W = 68.
Figure 5. 0-dim Long Features vs. Window Size: each graph shows the number of features counted in the corresponding sliding window of size 18 in (a), 34 in (b), and 68 in (c). Note that increasing the window size results in a larger number of features. (a) W = 18; (b) W = 34; (c) W = 68.
Proceedings 02 00099 g005aProceedings 02 00099 g005b
Figure 6. Performance of the prediction algorithm: confusion matrix after one week.
Figure 6. Performance of the prediction algorithm: confusion matrix after one week.
Proceedings 02 00099 g006
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Barsocchi, P.; Cassará, P.; Giorgi, D.; Moroni, D.; Pascali, M.A. Computational Topology to Monitor Human Occupancy. Proceedings 2018, 2, 99. https://doi.org/10.3390/proceedings2020099

AMA Style

Barsocchi P, Cassará P, Giorgi D, Moroni D, Pascali MA. Computational Topology to Monitor Human Occupancy. Proceedings. 2018; 2(2):99. https://doi.org/10.3390/proceedings2020099

Chicago/Turabian Style

Barsocchi, Paolo, Pietro Cassará, Daniela Giorgi, Davide Moroni, and Maria Antonietta Pascali. 2018. "Computational Topology to Monitor Human Occupancy" Proceedings 2, no. 2: 99. https://doi.org/10.3390/proceedings2020099

Article Metrics

Back to TopTop