Detection Using Motion Sensors: Part 1 – Challenges in Activity Detection

Blog / Niroshini Fernando / August 17, 2016

Detecting human activities can encompass a broad landscape, including ADL (activities of daily living) as well as higher level categorisations such as detecting if a space is occupied by user/s, and identifying behaviour patterns over a period of time.

(For an introduction to ADL, have a look here: Activities of Daily Living) Although motion sensors are useful for activity detection, effectively using the information produced by simple motion sensors pose some challenges, as this post discusses.

Motion Sensors

Commercially available motion sensors can be broadly classified into two categories: passive and active. Passive motion sensors, or PIRs (Passive Infrared) detect motion via reacting to changes in infrared radiation. In contrast, active motion sensors transmit signals continuously and rely on the reflected feedback from the area of coverage. Hence, active motion sensors consume more power than PIRs, while PIRs are more prone to false positives.

This post only focuses on PIRs, which can typically detect movement within a range of 30-130 feet, and generate binary events. That is, whenever movement is sensed, they register an ACTIVE event and when they stop sensing any movement, they generate an INACTIVE event.

Why Motion Sensors?

Of course, this doesn’t sound very exciting when compared with other methods of sensing such as in wearables and video cameras, which typically use sensors like accelerometers and gyroscopes.

However, the humble motion sensor has two advantages; it is non-invasive and cheap. So, in certain scenarios where there is a high concern about privacy and need for cheap non-invasive sensing, motion sensors can give useful insights.

What Can Motion Sensors Tell Us?

Let us say we have a motion sensor in a room. If we examine the data over a period of time, we’d see a series of motion events with timestamps. These can tell us things like how many times this room was used per day and how long it was used for (duration of activity).

For our experiments, we have various sensors installed in our lab and even in some of our houses, and the histogram and the empirical cumulative distribution (CDF) plots for one such motion sensor are shown below in Figure 1. Note that this data was collected over a period of around 30 days.

Fig.1 – The figure on the left shows a frequency plot for number of active triggers per every 30 minutes. The figure on the right shows the empirical cumulative distribution (CDF) plot for the same data.

As Figure 1 illustrates (left figure), the maximum number of active triggers per half an hour was around 35. So, the probability that the number of active triggers per half an hour is equal to, or less than 35 is 1 (see right figure). The probability of having no events per half an hour is around 0.35.

What Motion Sensors Cannot Tell?

However, the relationship between motion sensor readings and the activity we are interested in, is often indirect and ambiguous. For example, can we use motion sensors to detect if someone is sleeping in their bedroom? A motion sensor in the bedroom can detect if someone is inside. Once they fall asleep or are motionless, the sensor will indicate that the room has gone still. But the person may also have left the room. To address this, we can place another motion sensor just outside the bedroom, which can detect when a person enters/exits, as given in Figure 2.

Fig.2 – A house plan showing installed motion sensors in orange.

Unfortunately, this logic can fail when there are multiple occupants, i.e., a second person in the hallway can also trigger the outside sensor.

Herein lies the main challenge of motion sensor data. Because it is coarse grained there is no way to measure the intensity of the activity, i.e., ten persons would register the same reading as one person, and a person slowly vacuuming the floor would also be registered the same as someone energetically dancing.

Some interesting questions

While data from one motion sensor may not tell us much, it may be possible to identify overall trends of and relationships between several motion sensors.

Some questions to consider are:

  • Would combining several motion sensor readings yield more useful information?
  • How do we accommodate sensor failures/delays?
  • What is the most effective placement of sensors? And,
  • Is there an optimum number of sensors per space/activity?

Selecting the best inference model/s for analysing such sensor data is also non-trivial. Algorithms, such as DBSCAN, t-digest and S-H-ESD, can provide opportunities to detect anomalies in behaviour.

Thanks to Shannon Pace and Mohamed Abdelrazek for proof reading and providing suggestions.