This document presents ActivFi, a proof of concept for using Wi-Fi signals to recognize human activity. The researchers implemented an Android application that collects Received Signal Strength Indicator (RSSI) values from Wi-Fi nodes placed on the body. Their preliminary results found that different activities (sitting, standing, walking) produced distinct RSSI fluctuation patterns that could potentially be used to train a classifier. The researchers conclude that Wi-Fi signals contain patterns related to human movement and activity recognition may be possible using a Wi-Fi based sensor network.
Wi-Fi Based Activity Recognition Using RSSI Patterns
1. THE COLLEGE OF WILLIAM AND MARY, CSCI 634 ADV. COMPUTER NETWORKING FALL 2014 1
ActivFi: A Proof of Concept
for Wi-Fi Based Activity Recognition
John Savino, Shengye Wan
Department of Computer Science
The College of William and Mary
Williamsburg, VA, 23185, USA
{Jesavino, Swan}@email.wm.edu
!
Abstract—There are many practical applications that can utilize
knowledge of when a user performs specific activities. To do this,
many current works implement a Body Sensor Network (BSN) to
read data about the current user’s activity in order to classify
it into meaningful information. But current work has mainly
focused on using ZigBee radio under the 802.15.4 protocol.
While results have been successful, ZigBee radio is not included
in most commercial smartphone hardware, which presents a
problem for marketing the software to commercial users. In
contrast to previous work, we provide a proof of concept that Wi-
Fi communication patterns can be exploited to recognize human
activity. We implement ActivFi, a Wi-Fi based sensing solution
which utilizes signal strength indicators in a BSN to recognize
human activity. We provide data to conclude that there is a
pattern to be recognized in a Wi-Fi based sensor network, and
that this data can be used to train a classifier in future work.
Keywords—Wi-Fi, Body Sensor Networks, Human Activity
Recognition.
1 INTRODUCTION
AS the modern society becomes more fo-
cused on fitness and monitoring our day
to day activity levels, a need for commer-
cially accessible activity recognition software
arises. With the ability to potentially monitor
the elderly in assisted living situations, provide
recommendations for the user about improve-
ments to their current fitness levels, or even
provide custom alert settings based on activity
patterns, the trend towards activity recognition
has numerous practical applications. The key
component in making this work is the imple-
mentation of a Body Sensor Network (BSN).
In this network, a wearable node will transmit
data to a central aggregator, which will use this
information to classify the user’s activity.
While there has been previous work in effec-
tively classifying the data from a BSN, the setup
of the network causes some complications. Pre-
vious work has developed the network using
ZigBee wireless radio. ZigBee is a high-level
radio protocol which works well for activity
recognition, but the chips for this radio are
not typically available in modern smartphones.
Because of this, a mobile, day to day solution
is not possible using only a smartphone as the
aggregator with a collection of wearable nodes.
There are two solutions that can solve this
problem. The first is to use the Bluetooth chips
currently in smartphones, and the second is to
use Wi-Fi to transmit the sensor data. While
the first approach could provide a commercial
solution, our proposed solution will focus on
utilizing the Wi-Fi radio. Previously, packet loss
was used as the main metric in the aggregator,
as will be discussed in section 2 with other
related works. But the sending power of Wi-Fi
is much stronger than that of ZigBee, so we will
be using the Received Signal Strength Indicator
(RSSI) for classifying the activity.
We propose ActivFi, a classification system
for human activity recognition using Wi-Fi.
ActivFi works by collecting RSSI values of all
nodes connected to a local access point. As we
will demonstrate in section 4, different activities
2. THE COLLEGE OF WILLIAM AND MARY, CSCI 634 ADV. COMPUTER NETWORKING FALL 2014 2
like sitting, standing, and walking, all have
substantially different patterns of RSSI fluctu-
ations.
ActivFi works using one access point as a
base station, and two or more clients placed
on different locations of the subject body. Our
testing evaluates the use of one sensor by the
wrist and one sensor by the ankle, typical of
other body sensor networks. By logging the
RSSI values, ActivFi allows us to distinguish
between different human activities, and as we
will show in section 5, leaves many possibilities
for future work. Distinguishing different RSSI
patterns will be explored in detail in section 4.
In this paper we demonstrate that ActivFi has
the following features:
• The application can connect with one
or more clients, serving as sensor nodes
across the body. The central access point
can aggregate the RSSI values from the
connection with these nodes to later be
categorized.
• It is easily portable to a more practical
sensing network, using a small aggrega-
tor in addition to commercial Wi-Fi chips
as the sensing nodes in the network.
ActivFi is unique because it is the first to
attempt to classify human activity using Wi-
Fi. The main contributions of this paper are
summarized as follows:
• We present the design of an Android
application which allows for the aggrega-
tion of Wi-Fi data in an on body sensor
network.
• We provide a proof of concept that by
using average RSSI values in addition to
the variance of all collected RSSI data,
it is possible to classify human activity
using Wi-Fi. We believe we are the first
to present such a study.
2 RELATED WORK
As mentioned before, RadioSense [1] is a so-
lution which utilizes ZigBee radio to classify
human activity. It uses the fact that human skin
is impermeable, and thus causes packet losses,
to classify each activity. So instead of looking at
data specifically coming from a sensor, it will
use different patterns in packet loss to perform
the recognition. Because we are using WiFi,
which has a much stronger sending power, we
do not believe this solution will work for us.
PBN, or Practical Body Networking, attempts
to use a smartphone as part of a base station [2].
In their setup, users must wear nodes equipped
with tinyOS, in addition to having a USB teth-
ered base station attached to their smartphone.
This type of setup provide sufficient evidence
that a phone will provide the proper power
for real time data analysis, but the requirement
of using an additional sensor to retrieve that
data does not fit our desire for a practical,
commercial product. In addition, [3] presents a
method for using RSSI values to classify body
postures. This works using a Hidden Markov
Model to analyze variation in proximity be-
tween different sensors on the body. This idea
is very closely related to our work, as the
authors in this paper do not attempt to classify
specific activities, only the posture variations
are considered.
In addition, networks of accelerometers have
been considered for accurately classifying mo-
tion. Game design drives a lot of research in
this area [4], and systems have been devel-
oped which rely on data from multiple sensors
across the body for the purpose of accurate
and fair game motion. While wearing a set
of accelerometers can provide accurate motion
detection, we believe that wearing this many
sensors on a day to day basis is impractical and
cumbersome.
The field of uses for body sensor networks
is also growing. Because medical data is ex-
tremely sensitive, and thus presents a poten-
tial to be exploited, thought must be given
for security. Encryption mechanisms are being
developed to make sure that this data is made
safe [5]. Depending on the type of network
deployed, information leak is a concern for
recognizing activity. Because we use a WiFi
based network, making sure the data is sent
only to those given permission to access it
is another motivating factor for our research.
Using WiFi makes this challenge easily solvable
in the future of our work.
Much work has also been done in the field of
free space path loss. Much of the basis for our
work is based on Free Space Path Loss being
3. THE COLLEGE OF WILLIAM AND MARY, CSCI 634 ADV. COMPUTER NETWORKING FALL 2014 3
able to be used to calculate distances based on
signal strength and frequency of waves [6]. Be-
cause there is a relation, and more importantly,
and linear model to calculate this distance, it
intuitively follows that the dynamic factor of
signal strength alone should be able to model
this change in difference.
3 IMPLEMENTATION
There are many reasons why we believe that
Wi-Fi can be utilized to accurately classify hu-
man activity.
3.1 Exploiting Free Space Path Loss
As has been shown in related works, free space
path loss has been a largely studied field in the
realms of physics and wave manipulation. Wi-
Fi signals have two important characteristics,
relevant to the field of path loss. The first is fre-
quency. In our setup of having one access point,
the frequency is held constant. This transfers
the path loss equation, where d is distance and
f is frequency:
FSPL(dB) = 20 log10 d + 20 log10 f + 92.45
from three dimensions into two dimensions.
The 92.45 is a constant used for unit conversion.
Only the signal strength of the access point will
change with the perceived distance between the
nodes. So instead of calculating the distance be-
tween an access point and the node connected
to it, we can just look at the RSSI values and
treat them as a relative distance between a node
and access point.
3.2 Design
We implement our idea as an application on the
Android open source platform. The application
creates threads for a receiver, which is the
access point, and a variable number of clients,
which act as the sensor nodes. A connection
is established between the access point and
sensor nodes. The access point thread then
polls the clients using the WifiReceiver class
to extract the RSSI values from the connec-
tion info. The application is designed to be
standalone, so once the connection is created,
the polling can be done continuously. In our
experiments though, we limit the polling time
to one minute.
3.3 Experiment Setup
In our experiment, we use a Samsung Galaxy
S3 as the wrist client, and a Sony Xperia V
as the ankle client in our body network. In
addition, a Samsung Note 10.1 2014 acts as
the access point and aggregator for the body
network. Our setup can be seen in Figure 1. The
setup for walking is the same as standing, but
the subject is moving. This setup is primarily
due to a limitation of resources. It would not
be difficult to extend our work to use only a
smartphone or other Wi-Fi hotspot as the access
point, in addition to some sort of client node or
nodes to connect via Wi-Fi to the access point.
In gathering data, a user places the access
point on either the right or left hip. The client
phone is placed by the ankle on the leg cor-
responding to the placement of the AP. This
allows for standardization when attempting to
classify the activity. In our experiments, we use
a second client placed on the left wrist. The
client will connect to the hotspot so the AP
can monitor information about the connection.
Each run during experimentation lasts for one
minute, and consists of the user doing one
activity. RSSI values are logged at a frequency
of 2562 MHz and are logged every 100ms.
We found one minute trials to be suitable as
channel state should remain relatively constant
across a minute time span, and 600 data points
are more than enough for our analysis.
We chose to run our experiment with three
trials per activity. This way, we can assure our
data for each activity is representative of the
activity, and not due to network fluctuations or
other interference. We chose our three activities,
sitting, standing, and walking, as we feel they
represent the greatest percentage of day to day
movement, and thus it would not be difficult
to extend further to other activities.
Our app is designed with the intent to pri-
marily gather data. The hotspot is created, serv-
ing as the access point for the network. Then,
every 100ms, the access point logs Received
Signal Strength values. By logging these values,
we can look for patterns in how the values
change when sitting, standing and walking.
4. THE COLLEGE OF WILLIAM AND MARY, CSCI 634 ADV. COMPUTER NETWORKING FALL 2014 4
(a) Sitting (b) Standing and Walking
Fig. 1: Example of where we placed the sensor nodes. The nodes for walking are held in the same
place as those when standing.
-60
-50
-40
-30
-20
-10
0
RSSI(dB)
Time (ms)
Sitting RSSI Over Time
Foot 1 Hand 1 Foot 2 Hand 2 Foot 3 Hand 3
(a) Sitting
-70
-60
-50
-40
-30
-20
-10
0
RSSI(dB)
Time (ms)
Standing RSSI over Time
Foot 1 Hand 1 Foot 2 Hand 2 Foot 3 Hand 3
(b) Standing
Fig. 2: RSSI values over time for each of the static activities. All three trials for the static activities
are shown on the graph. The time domain for each of the three graphs is one minute, with the
RSSI values being measured every 100ms.
4 EVALUATION
We show the logged RSSI values for each ac-
tivity in Figure 2. Each chart plots how the
received signal strength changes over our one
minute trial. When we look at the charts for
the two static motions, sitting and standing,
we can see that for the most part, the results
are consistent with what one might expect. The
signal strength is relatively constant across all
three trials, both for the hands and feet. This
is to be expected, since the distance from the
access point is not changing for either node,
so any variation in the channel can mostly be
5. THE COLLEGE OF WILLIAM AND MARY, CSCI 634 ADV. COMPUTER NETWORKING FALL 2014 5
-70
-60
-50
-40
-30
-20
-10
0
RSSI(dB)
Time (ms)
Walking RSSI over Time
Foot 1 Hand 1 Foot 2 Hand 2 Foot 3 Hand 3
Fig. 3: RSSI values over time for our walking
trial. The time domain is one minute in length,
with the RSSI values being measured every
attributed to external factors. In comparing the
two, the biggest difference immediately visible
is that standing has a much higher variance
in the signal compared to walking. This can
be attributed to a greater distance between the
clients and the sensor, so their is more room for
interference.
Our results from the walking trials provide
interesting data for classification. As we can see
in Figure 3, across all three trials, there is a clear
distinction between signal strength of the node
on the hand and the node on the foot. Oddly
enough, the foot always has a stronger signal
strength. This could possibly be attributed to
less change in distance from the hip to the foot
when compared to the hand. Typically, when
walking, a persons hand swings more rapidly
than the foot, so this could be the cause of such
a visible difference in the logged RSSI values.
In addition, we can see a clear cyclic pattern in
the hand, which we will explore in our section
on Fourier Analysis.
4.1 Classification
In order for a classification algorithm to be de-
veloped, we must show that we can in fact dis-
tinguish between the three different activities
we have classified. The table in Figure 4 shows
the average difference between the RSSI values
of the hand and the foot, the variance of the
difference calculations, and then the variance
of the individual hand and foot RSSI values.
Looking at the average RSSI difference column
first, we can see that sitting has the small-
est average difference, followed by standing,
followed by walking. This comparison makes
sense, as it is consistent with what we saw
in Figure 2. We can use this information to
distinguish between all three activities, though
this information is by no means enough to
provide high enough accuracy for a classifier.
For instance, the average difference value is the
same for the third standing and walking trials,
so a classifier has the potential to inaccurately
classify the activity because of this.
To improve our classification, we can look
at the variance of the difference between RSSI
values. From here, it is very clear that sitting
has the smallest variance, and standing the
largest, across the trials. While this is not true
every single time, the combination of mean
and variance should be enough to provide a
classifier with a high accuracy. More will be
discussed on implementation of a classifier in
our future works section.
Through our study, we also wanted to deter-
mine how many sensor nodes we would need
in order to accurately classify human activity.
If a body sensor network could be reduced to
one access point and one sensor node without
forsaking accuracy, the consumer would greatly
benefit both from reduced hardware cost in
addition to device power consumption. We
also looked at the variance across individual
nodes in all of the trials. While the hand sensor
typically had a greater variance than the foot
sensor, there is no immediately visible pattern
that we could find. While it might be possible to
exploit other factors like packet loss or channel
information, we did not consider these in our
experiment.
4.2 Frequency Analysis
In addition to using simple statistics like the
mean and variance to train a classifier, we can
also look for patterns in specific hand or foot
RSSI values over time. As we can see in Figure
5, there is a very clear cyclic pattern in the RSSI
values in the hand. This is most likely due to
the impermeability of the human body, so the
6. THE COLLEGE OF WILLIAM AND MARY, CSCI 634 ADV. COMPUTER NETWORKING FALL 2014 6
(a) Mean and Variance Data
Fig. 4: The Mean Difference between RSSI values at the hand and foot, the variance of this
difference, and the individual variance for each hand and foot across the three trials.
-70
-60
-50
-40
-30
-20
-10
0
RSSI(dB)
Time (ms)
Walking RSSI Values over Time
Foot Hand
Fig. 5: The RSSI values for the hand and foot for
one of our walking trials. To note is the cyclic
pattern that can be seen in the motion of the
hand.
signal strength will actually decrease when the
body comes between the access point and the
client [1].
Because there is such a discernible pattern
to the frequency, we transform the data from
the time domain into the frequency domain [7].
This allows us to check to see if the peaks in
the signal magnitude occur with any sort of
regular pattern. As we can see in Figure 6, there
is a cyclic nature to the peaks in the transform
of the hand while walking. This supports the
idea that the signal strength will change with
a regular period, and furthermore can help
add another layer of confidence to a trained
classifier. In addition, as expected, there is no
consistent pattern of peaks in the transform of
the RSSI values in the sitting trial.
5 FUTURE WORK
We have shown that there are patterns in RSSI
values that can be utilized to train a classifier
for activity recognition. This is the immedi-
ate next step if we should continue with this
work. A lot of work has gone into classifi-
cation algorithms, and the same concepts can
easily be applied to this work. Presumably,
an application designed to utilize our findings
would first go through a short but necessary
training period in order to calculate some base
mean and variance scores. Due to differences in
body shape and size, we can see these values
differing from person to person, hence why the
training period would be necessary.
Once the device is trained, a simple clas-
sification algorithm can perform a real time
7. THE COLLEGE OF WILLIAM AND MARY, CSCI 634 ADV. COMPUTER NETWORKING FALL 2014 7
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
Amplitude
Frequency
Frequency Analysis of the Hand when
Sitting
(a) Sitting
0
0.1
0.2
0.3
0.4
0.5
0.6
Magnitude
Frequency
Frequency Analysis of the Hand while
Walking
(b) Standing
Fig. 6: Outcome of the Fast Fourier Transform on the RSSI values of the hand in a sitting trial
and in a walking trial. There is a highly visible pattern to the signal peaks in the walking trial.
This pattern is considerably more present when walking than when sitting.
mean and variance calculation. The algorithm
can monitor changes in both of these values
in order to achieve the classification. There are
also opportunities to improve the classifier by
logging the average and variance values for the
RSSI while the user is in different locations.
This would account for different external inter-
ference in a variety of different environments.
In addition, because of a limited number of
resources and time, we used a bulky tablet for
our access point and two bulky smartphones
for sensor nodes. We can obviously improve
both of these functions. It would not be chal-
lenging to transfer the hotspot application to a
smartphone to use that as a base station. The
only requirement is that either the device must
be rooted to act as a access point, or must be
subscribed to the carriers plan.
Keeping the sensor nodes small could also
be added easily in the future. Because the base
station calculates the received signal strength,
simple Wi-Fi chips can be implanted in ankle
or wrist bands, watch bands, or even in a shoe.
Because of the training period our classifier
would have, this would be a very straightfor-
ward expansion of our project.
Finally, future work can be done to determine
if the sensor network can be condensed to only
include one node, either on the ankle, wrist
or possibly elsewhere. We hope our work will
open the door for future experimentation in this
area.
6 CONCLUSION
We have shown that a Wi-Fi based sensor
network is possible for accurate human ac-
tivity recognition. By measuring base values
of average difference between Received Signal
Strength Indicators, in addition to the variance
of this difference, a classifier can be trained
to distinguish between sitting, standing and
walking. We believe that expanding this system
would be commercially viable, and easy to
expand from our test environment. Because our
approach was successful in identifying patterns
between different activities, and more impor-
tantly, uses Wi-Fi, our system can be imple-
mented in today’s commercial smartphones for
your everyday consumer.
REFERENCES
[1] X. Qi, G. Zhou, Y. Li, and G. Peng, “Radiosense: Exploting
wireless communication patterns for body sensor network
activity recognition,” Real-Time Systems Symposium, 2012.
[2] M. Keally, G. Zhou, G. Xing, J. Wu, and A. Pyles, “Pbn:
Towards practical activity recognition using smartphone-
based body sensor networks,” SenSys, 2011.
[3] M. Quwaider and S. Biswas, “Body posture identification
using hidden markov model with a wearable sensor net-
work,” BodyNets, 2008.
8. THE COLLEGE OF WILLIAM AND MARY, CSCI 634 ADV. COMPUTER NETWORKING FALL 2014 8
[4] A. Whitehead, H. Johnston, K. Fox, N. Crampton, and
J. Tuen, “Homogeneous accelerometer-based sensor net-
works for game interaction,” Computers in Entertainment,
2011.
[5] C. C. Tan, H. Wang, S. Zhong, and Q. Li, “Body sensor net-
work security: An identity-based cryptography approach,”
WiSec, 2008.
[6] R. Miller, “Part 1: Wifi-based trilateration on android,”
May 2013.
[7] W. Kester, “Fast fourier transforms.”