In Part 1, I introduced some aspects of using PIR motion sensors to detect human activities in an enclosed space, such as a house or an office.
In this post I will discuss some of the experiments conducted at the Deakin Software and Technology Innovation Lab (DSTIL) using such sensors, and the interesting results obtained from our analysis models.
We installed motion and contact sensors in the lab, as illustrated in Figure 1. While the former are used for motion detection, the latter detect when exterior doors are opened and closed.
The main goal of this experiment was to determine if the lab was occupied or not, purely from the data recorded by these two types of sensors.
Occupancy Detection Strategy
The initial assumption was that any activation of a motion sensor would indicate that the lab was occupied. On the other hand, the lack of motion sensor activations would not necessary imply unoccupancy, since there could be cases where one or more people are inside, but not moving. To deal with this scenario, we included the contact sensors’ activations (linked with exterior doors opening and closing) to infer the occupancy status of the lab. Hence, we hypothesised that if there was a long period of inactivity, preceded by a door open/close event, there was a high probability of the lab being unoccupied.
We encoded our detection strategy in the form of hidden Markov models as shown in Figure 2. The environment is defined as either occupied or unoccupied at any given time. Each of the arcs (arrows) in Figure 2 represents a transition, with its own probability. These state transitions can occur either between the two states, or within a state itself. Given below are the list of state transitions that can take place in the considered environment:
For example, the probability of an occupied state being followed by another occupied state can be given by P(occupied|occupied).
In the same way, the probability of the lab being occupied, given a sensor state SA can be given by P(occupied|SA).
The actual values for the above probabilities are inferred considering a number of variables, including the time of day, day of the week and the duration of the sensor activity.
The main advantage of testing the model on data collected in our lab is that we already know its occupancy state (and, therefore, we can validate the model accuracy). After the first week of data collection, we analysed the data using our probabilistic models. The highest probability states we found are shown in Figure 3. The purple regions show the date/times when the lab was unoccupied. The green regions indicate the date/times when the lab was occupied, but was relatively inactive (low activity levels), while the blue regions show when the lab was occupied and active.
As can be seen in the figure, the weekday occupancy states are quite regular, with people entering the lab early in the morning, and leaving at the end of business hours. The results of weekend data however, were surprising. In fact, according to our model, our lab was continuously occupied during the whole weekend!
Of course, we doubted this was the case (not many Ghostbusters fans down here…). But how did our models arrive at this conclusion? It was time to examine the raw sensor data collected during the weekend. Paranormal activity? …or not?
Going through the raw sensor logs from both Saturday and Sunday, we came across an extraordinary set of motion sensor readings coming from a specific sensor (marked as Sx in Figure 1). Since this had happened multiple times, our probability models had reinforced the likelihood of an occupancy state, even though none of the other motion/contact sensors had been triggered!
There are three possible explanations for this:
- Someone instantly teleported inside the lab near Sx (hence, no other sensors were triggered)(!),
- Somebody was actually in the lab and all other sensors were giving false negatives (not working) – highly unlikely since the chances of many sensors not detecting motion in the same moment is pretty low, or,
- Sx was giving false positives.
Upon further investigation, we realised that there could be a number of culprits, such as the white board placed near the sensor, which was acting as a reflective surface, or air currents from the nearby HVAC unit, or, quite (im)possibly, paranormal activity.
Allowing for False Positives
(Un)fortunately, we had to assume that there were non-paranormal causes for the triggers. In fact, PIR motion sensors have been known for generating false positives (Wren, C.R. and Tapia, E.M., 2006). Because of this, we are now including filters in the later versions of our models, that can adjust for such false positives.
Although filters can be formulated heuristically, it is important to conduct further experiments on PIR motion sensors to understand how they behave under different conditions. It is also vital to take these constraints into consideration when placing PIR motion sensors inside a building.
Further investigations regarding PIR motion sensor reliability and optimisation of their placement will be tackled in the near future.
- Wren, C.R. and Tapia, E.M., 2006, May. Toward scalable activity recognition for sensor networks. In International Symposium on Location-and Context-Awareness (pp. 168-185). Springer Berlin Heidelberg.
Header image courtesy of John Wardell.
Thanks to Nicola Pastorello and Simon Vajda for proofreading and providing suggestions.