Original Paper
Abstract
Background: Unfortunately, global efforts to promote “how much” physical activity people should be undertaking have been largely unsuccessful. Given the difficulty of achieving a sustained lifestyle behavior change, many scientists are reexamining their approaches. One such approach is to focus on understanding the context of the lifestyle behavior (ie, where, when, and with whom) with a view to identifying promising intervention targets.
Objective: The aim of this study was to develop and implement an innovative algorithm to determine “where” physical activity occurs using proximity sensors coupled with a widely used physical activity monitor.
Methods: A total of 19 Bluetooth beacons were placed in fixed locations within a multilevel, mixed-use building. In addition, 4 receiver-mode sensors were fitted to the wrists of a roving technician who moved throughout the building. The experiment was divided into 4 trials with different walking speeds and dwelling times. The data were analyzed using an original and innovative algorithm based on graph generation and Bayesian filters.
Results: Linear regression models revealed significant correlations between beacon-derived location and ground-truth tracking time, with intraclass correlations suggesting a high goodness of fit (R2=.9780). The algorithm reliably predicted indoor location, and the robustness of the algorithm improved with a longer dwelling time (>100 s; error <10%, R2=.9775). Increased error was observed for transitions between areas due to the device sampling rate, currently limited to 0.1 Hz by the manufacturer.
Conclusions: This study shows that our algorithm can accurately predict the location of an individual within an indoor environment. This novel implementation of “context sensing” will facilitate a wealth of new research questions on promoting healthy behavior change, the optimization of patient care, and efficient health care planning (eg, patient-clinician flow, patient-clinician interaction).
doi:10.2196/mhealth.8516
Keywords
Introduction
Background
Contextual characteristics of the physical and built environment are known to affect health, both directly and indirectly, through the influence on individual activities and health-related behaviors [
- ]. Indeed, individual choices can be determined by social and physical environmental context [ ], which may also affect the intervention strategies needed to influence and change behavior. Therefore, it is crucial to measure the time (the “when”), the place (the “where”), and the potential social settings where human movement behaviors (physical activity and sedentary time) occur. Recent methodological advances have emphasized the need for more holistic approaches, which can allow for greater specificity and flexibility in exploring and understanding the relationships between behavior and place [ , ]. Tracking and determining where specific movement behaviors are performed could provide valuable information and could greatly enhance research determining the correlates of physical activity and sedentary behaviors. Most commonly, movement behaviors (the “what”) are objectively measured using wearable devices such as accelerometers, which can record motion and postural changes over time [ ]. However, there are limitations to accelerometery—most notably, their inability to accurately assess lifting and carrying, cycling, and water-based activities, and the general lack of contextual information relating to activity mode and/or location and domain [ , ]. Indeed, current methods of objectively assessing behavior do not provide information on the situational context of where behavior is conducted within free-living enclosed environments. Therefore, more appropriate technologies have been sought to measure the behavioral context. Improved measures would be of use in etiological studies in tracking trends in movement behavior within populations, making objective comparisons between populations, and monitoring the effect of interventions [ ].Global positioning systems (GPS) have been used to identify activities in outdoor locations [
, ]; however, a GPS cannot receive signals in the majority of indoor environments or provide room-level location [ ]. This is problematic as most people spend the majority of their time in an indoor environment. Indoor tracking systems are a potential alternative solution [ ], and according to the review of Loveday et al [ ], several technological tools are available which are able to measure indoor location, for instance, Bluetooth low energy (BLE) beacons, radio-frequency identification, and real-time locating systems. These technologies have primarily been used to track activities in warehousing environments [ ] or identify when a patient is in or out of their hospital bed [ ]. Despite this, the technologies offer a great opportunity to be applied to the measurement of movement behaviors. BLE beacon functionality has also been incorporated within physical activity monitors, which provides the opportunity to assess duration, intensity, and context of movement behaviors only using one monitor. However, beacon functionality and support are limited, and there is currently a lack of validated algorithms that are using off-the-shelf activity monitoring products to aid behavioral scientists to determine location from the data. Validated and simple-to-implement algorithms for off-the-shelf activity monitors would increase the ability of behavioral scientists to utilize this innovative technology in their own research.Furthermore, algorithms available in the literature use BLE and accelerometry for precise localization inside a specific room rather than multiple rooms or larger environments [
, ]. More accurate assessments of free-living behavior would help to (1) characterize the relationship between movement behaviors, (2) context and disease prevention (ie, the dose-response relationship), (3) assess the efficacy of intervention strategies, and (4) monitor the behavior and activity patterns of various populations [ ].Objectives
The primary aim of this study was to conceive, create, and test a novel algorithm using accelerometry-based, proximity-enabled sensors to detect location for a more sensitive and accurate understanding of where specific movement behaviors are occurring in an indoor context. The secondary aim of this study was to provide a working example of how location and accelerometer data can be combined. By assessing these data together, a novel measurement and consequently a novel line of research can be created that is focused on the interactions of context and information about movement behaviors.
Methods
Experimental Protocol and Equipment
The algorithm was developed using data collected within a typical indoor workplace location at Loughborough University. The building comprised a multifloor, multiroom setting with a mixture of open-plan and partitioned office spaces.
As a location prediction may be influenced by individual factors such as walking speed and dwelling time in a given location, 4 trials were developed to model the potential effect upon indoor location acquisition:
- Trial 1: normal walking speed (self-paced at approximately 1.4 m/s), stopping for at least 3 min in each area (rooms and social areas) on a specified route.
- Trial 2: slow walking speed (self-paced relative to the normal speed walk at approximately 0.9 m/s or slower), stopping for at least 2 min in each selected area (rooms and social areas) on a specified route.
- Trial 3: fast walking speed (self-paced at approximately 2.0 m/s), stopping for at least 1 min in each area (rooms and social areas) on a specified route.
- Trial 4: the walking speed, dwelling time, and route were not prescribed (ie, not previously decided).
Each trial started and finished in the same location, and all trials were also video-recorded using a wearable camera (HD-1080p, 60 fps) which served as criterion validity. A second technician recorded the sequence of the areas and the total time for each trial.
represents the walking speed and dwelling time for each trial. represents the speed and dwelling time of each trial, and shows the path of trials 1 to 3.ActiGraph accelerometers (GT9X Link, ActiGraph, Pensacola, United States) were used to provide time-stamped acceleration and indoor location. ActiGraph provides the most widely used accelerometers to measure physical activity and sedentary behavior. ActiGraphs are used within several national surveillance programs, including the US National Health and Nutrition Examination Survey. Researchers using ActiGraph in their own studies are therefore able to compare their own data with nationally representative samples. Equipped with BLE functionality, the devices can utilize proximity tagging, which allows for identification of other nearby devices. To enable location to be assessed, the devices are either initialized as a beacon or a receiver.
Beacons should be placed around the environment in a high and unobstructed placement, if possible. Certain rooms were relatively small; therefore, one beacon was sufficient to cover the whole room and provide a discreet room occupancy measure (in line with ActiGraph recommendations). In these areas, the beacon was placed on the wall, 20 cm above the room’s door. To ensure sufficient social area coverage, more than one beacon was required. These were placed on 2 opposing walls of the area at 20 cm above the area’s door. Corridor beacons were placed in such a way that one beacon was used to cover a straight passage of a corridor (1 corridor required 2 beacons due to the length of the corridor), with a second beacon then placed when the corridor changed direction (always at 20 cm above the corridor’s door). The beacons were placed in this way to ensure reproducibility of the experimental situation in different built environments. To evaluate the performance of the proposed algorithm, 17 beacons were used in total, with 4 beacons used in 2 social areas (2 beacons in each), 1 beacon each in 5 rooms, 6 in corridors, and 1 in stairway (1 beacon). For a visual representation of the beacon locations, see
.To track location, a receiver device is worn on the wrist, which records received signal strength indication (RSSI) readings from the beacons within the environment. In total, 4 ActiGraph devices were used as receivers, and 1 individual wore all devices, with 2 devices on each wrist. Receivers were initialized to record proximity at the highest sample rate possible (10-s intervals, 0.1Hz). Accelerometers were initialized and downloaded using ActiLife Version 6.13.3 (ActiGraph, Pensacola, United States).
In this study, accelerometers were initialized to collect acceleration data at a sample rate of 100 Hz. Accelerometer data were then processed to obtain a measure of activity every 10 s [
]. The metric selected is based on jerk (derivative of the acceleration) and consists of the following steps: (1) Module of acceleration:(2) moving SD of the module of the acceleration with window size 5 samples; and (3) average of the SD of the acceleration calculated in step 2 with nonoverlapping windows (window size 1000 samples, ie, 10 s at 100 Hz).
The first 2 steps aim to cancel the gravitational effect on the accelerometer data independently from the orientation of the sensor, while the third step defines the metric, which is proportional to the jerk level in the last 10 s. A k-mean classifier was then used to classify activity levels into low, middle, or high by using the previous metric from each test.
Localization Algorithm
To produce the algorithm, a 4-step process is conducted that derives indoor location from receiver RSSI data: “graph generation,” “Bayesian filtering,” a priori motion model generation and state update, and “exception management.” This process is summarized in
.Graph Generation
The position of the beacons on the floorplan is first represented as a graph, where each state represents the proximity to a specific beacon and the arrows indicate the possible paths among the beacons.
shows the first and second floor graph used within the experiment; the first floor is connected to the second floor by the beacon “Stairs.” We grouped the beacons inside the same social area or corridor and named them excluding the lowercase letter.The sparse transition matrix A represents the graph of the beacons:
This matrix contains elements ai,j that will assume the value:
1: if the beacons i and j are connected with a walking pathway,
0: if the beacons i and j are not connected with a walking pathway, and
N: number of beacons in the map.
i,j = 1 … N
Bayesian Filtering
Bayesian filtering aims to apply Bayesian statistics and Bayes rule to probabilistic inference problems [
]. It describes the probability of an event, in this case, the proximity to a beacon, based on prior knowledge of conditions that might be related to the event, such as the step counts and the proximity to a beacon in the previous sample. The criterion of optimality used for Bayesian filtering is the Bayes risk of minimum mean-square error [ ]. Bayesian filtering is optimal because it searches for the posterior distribution, which integrates and uses all available information, in this case the RSSI measurement, expressed by probabilities [ ]. Bayesian filtering works in 2 stages: (1) “a priori motion models” based where only the generated graph or step count measurements are used to estimate the probability of being in a specific room and (2) “state update” then corrects the estimation based on RSSI measurements.A Priori Motion Models
In total, 3 a priori motion models were tested based on heuristic hypothesis on the movement of the participant.
Model 1
The connection weight among the beacons is constant, meaning that the technician can move to another room or stay in the same one with the same probability. This model can be described using a transition matrix model M=A.
Model 2
The connection weight among the beacons changes accordingly to the step count measurements. We can describe this model using a transition matrix model in which the elements mi,j of the transition matrix model M are built as follows:
mi,j= ai,j if i ≠j;
mi,j = 0.5 if i = j and the step counts estimates more than 2 steps in the last 10 s (a higher number of steps indicates a lower probability of remaining in the same room); and
mi,j = 2.0 if i = j and the step counts estimates 2 or less steps in the last 10 s (a lower number of steps indicates a higher probability of changing room).
Model 3
The connection weight among the beacons changes according to the step counts measurements but not for the corridors. This hypothesis is reasonable because the likelihood of a transition does not depend so strongly from the step counts measurements due to the length of a corridor. This model can be described using a transition matrix model in which the elements mi,j of the transition matrix model M are built as follows:
mi,j= ai,j if i ≠j;
If i is a beacon in a standard room or social area:
mi,j = 0.5 if i = j and the step counts estimates more than 2 steps in the last 10 s;
mi,j = 2.0 if i = j and the step counts estimates 2 or less steps in the last 10 s;
else
mi,j = w
The value of w was manipulated in increments of 0.25 from 0.25 to 1.25. A lower value of w would indicate a higher likelihood to move into another room while in a corridor; in contrast, a higher value of w would indicate a lower likelihood to move in another room while in a corridor. If w=1.0, then the corridor was treated neutrally with respect to other transitions.
The position of the receiver can be defined as a state vector that contains the probability to be closer to a specific beacon. The position was estimated at the time k, based on the current state vector at the time k and the probability transition matrix as:
X ̃k + 1 = norm (XkM)
where
Xk 1 × N state vector of the N probabilities (1 for each beacon) at the sample k;
X ̃k + 1 1 × N estimation of the N probabilities (1 for each beacon) at the sample k + 1; and
the state vector Xo is initialized with equal probability for all the beacons.
State Update
The probability of being in proximity to a beacon i at the sample time was heuristically estimated k, indicated as yi(k), based on the Bluetooth RSSI strength RSSIi:
The rationale for these selections was:
- The distance is inversely proportional to the RSSI in case of free air, although there are limitations on the estimation of distance indoor because of reflection and scattering [ ].
- The value of the RSSI does not exceed −45dB when the receiver is less than 1 m away from the beacon.
- The communication is interrupted when the RSSI is less than −90dB.
The measurement vector was normalized at each sample time Yk with respect to the sum of the probabilities of all the beacons:
It is possible to measure the posterior probability Xk + 1 based on Yk + 1 measurements and the estimation from the a priori model using the Bayes equation:
Xk + 1 = norm (X ̃k + 1 ⨀ Yk + 1)
where Xk + 1 is the state vector of the N probabilities (one for each beacon) at the sample k + 1 and ⨀ indicates a point-wise vector multiplication.
The most probable position is the beacon i:
Exception Management
A block for exception management was implemented to make the algorithm more robust with respect to the following 3 failures:
- This exception manages cases in which the estimated position based on the model is not in accordance with the RSSI measurements. Indeed, the measurement could not fit the estimated probability when there is at least one RSSI measurement (c ≠0) but the previous estimation is not fitting the a priori motion model (Xk + 1 = 0 for all the beacons). This exception was managed by imposing a uniform probability for all the areas (resampling) and setting the updated state as the previous one because the RSSI measurement might have been corrupted by a glitch due to reflection or scattering.
- There are no RSSI measurements (c=0), and therefore no update was performed in that step.
- Due to reflection and scattering, the RSSI measurement could create hopping effects between 2 contiguous rooms. To improve the characteristic of stability in these cases, it was imposed that hopping from a room A to a room B and then back to the room A can happen only if the transition is stable for at least 2 samples (20 s). In this case, the updated probability of the room was left unchanged, and the most probable room before the hopping event was selected.
Statistical Analysis
For the analyses, each transition period was defined as when the receiver moved from one room to the next. The total transition period for the trial l was indicated as Tt,l. The total nontransition period for the trial l was defined as the remaining period and was indicated as Tnt,l
The total time of the trial Tl was:
Tl= Tt,l + Tnt,l
We considered the errors on the transitions (êt,l) and the errors on the nontransition (ênt,l) for trial l, and we calculated the relative transition errors for trial l:
et,l= 100 ×êt,l/ Tt,l
The relative nontransition errors for trial l was:
ent,l= 100 ×ênt,l/ Tnt,l
The error caused by tracking problems on the transitions for trial l was:
ēnt,l= 100 ×ênt,l/ Tl
The relative error in trial l was:
The average error on transitions was:
The average error on nontransitions was:
The average error caused by tracking problems on the transitions was:
The average error was:
Furthermore, the total dwelling time within each room was evaluated for each trial to quantify the consistency of the location and videotaped tracking time. A two-way mixed intraclass correlation coefficients with absolute agreement was performed. Differences between estimates are reported as mean differences (95% CI). The regression model between the location tracking time and the videotaped tracking time was analyzed. The goodness of fit between the measured values and the expected value (videotaped tracking time) was tested by the following: sum of squares due to error (SSE), which is a measure of the discrepancy between the data and the model estimated R2, between 0 and 1, with a value closer to 1 indicating that a higher proportion of variance is accounted for by the model; adjusted R2, (ie, R2 adjusted for the residual degrees of freedom); and finally, root mean square error (RMSE, ie, the sample SD between predicted and observed values).
Accelerometry step counts were synchronized with the criterion video using timestamps from an exported .csv file, and the error was evaluated by measuring the time for which the estimated room position and the criterion were different. The validity of the algorithm was determined using the absolute percentage error scores calculated for each trial.
Results
Algorithm Performance
In general, all algorithm models calculated an average percentage error ranging from 14% to 17%. The two main sources of error within these models were (1) transition state, that is, moving from a room to a corridor or vice versa in the transition period and (2) nontransition state, defined as the dwelling time longer than 20 s (equal to two recorded samples of RSSI). Transition estimates improved when the algorithm used model 3 and the corridor was treated neutrally with respect to other transitions, where the connection weight among the beacons changed according to the step count measurements but not for the corridors (in which the weight was constant). The results for each model and trial are outlined in
.All algorithm models calculated low average error in the nontransition state with a decrease in error from 3% in the model 1 to between 0.31% and 0.47% in model 3 variations. In the transition state, an average error of between 31% and 34% was exhibited across all algorithm models. Generally, the relative error is affected more by transition errors if there is a higher transition rate.
The tracking quality is represented by
for all trials. The red line represents the criterion location obtained from the video, and the blue line represents the locations obtained from the 4 receivers. From these graphs, it is evident that the quality of tracking is better for trials with lower transition rates.Algorithm model | Trial 1 (slow pace) | Trial 2 (medium pace) | Trial 3 (brisk pace) | Trial 4 (random) | Average error | |
Model 1a, % | ||||||
Error on nontransitions ent,l | 3 | 8 | 6 | 8 | 6 | |
Error on transitions et,l | 27 | 40 | 25 | 3 | 32 | |
Error caused by tracking problems on the transitions ēnt,l | 7 | 14 | 14 | 34 | 4 | |
Error el | 9 | 20 | 16 | 35 | 17 | |
Model 2b, % | ||||||
Error on nontransitions ent,l | 3 | 7 | 8 | 5 | ||
Error on transitions et,l | 25 | 3 | 29 | 38 | 31 | |
Error caused by tracking problems on the transitions ēnt,l | 6 | 13 | 16 | 35 | 14 | |
Error el | 8 | 17 | 17 | 35 | 16 | |
Model 3c(w=1.25), % | ||||||
Error on nontransitions ent,l | 0.31 | 4 | 2 | 8 | 3 | |
Error on transitions et,l | 23 | 39 | 31 | 38 | 31 | |
Error caused by tracking problems on the transitions ēnt,l | 6 | 14 | 17 | 35 | 14 | |
Error el | 6 | 16 | 18 | 35 | 15 | |
Model 3 (w=1.00), % | ||||||
Error on nontransitions ent,l | 0.31 | 1 | 2 | 4 | 1 | |
Error on transitions et,l | 25 | 39 | 30 | 35 | 31 | |
Error caused by tracking problems on the transitions ēnt,l | 6 | 14 | 16 | 32 | 13 | |
Error el | 6 | 15 | 17 | 33 | 14 | |
Model 3 (w=0.75), % | ||||||
Error on nontransitions ent,l | 0.31 | 1 | 2 | 4 | 1 | |
Error on transitions et,l | 25 | 39 | 31 | 34 | 32 | |
Error caused by tracking problems on the transitions ēnt,l | 6 | 14 | 17 | 31 | 13 | |
Error el | 7 | 15 | 17 | 32 | 14 | |
Model 3 (w=0.50), % | ||||||
Error on nontransitions ent,l | 0.47 | 1 | 0 | 4 | 1 | |
Error on transitions et,l | 26 | 39 | 31 | 35 | 30 | |
Error caused by tracking problems on the transitions ēnt,l | 7 | 14 | 17 | 32 | 14 | |
Error el | 7 | 15 | 17 | 32 | 14 | |
Model 3 (w=0.25), % | ||||||
Error on nontransitions ent,l | 0.31 | 1 | 0 | 4 | 1 | |
Error on transitions et,l | 27 | 41 | 34 | 36 | 34 | |
Error caused by tracking problems on the transitions ēnt,l | 7 | 14 | 18 | 33 | 14 | |
Error el | 7 | 15 | 18 | 33 | 15 |
aModel 1: The connection weight among the beacons is constant.
bModel 2: The connection weight among the beacons changes according to the step count measurements.
cModel 3: The connection weight among the beacons changes according to the step counts measurements but not for the corridors.
Linear regression models y = p1x + p2 showed coefficients with 95% CI of p1=1.069 (1.046-1.061) and p2=−7.098 (−10.27 to −3.925) between algorithm and criterion time in seconds (
). Moreover, the intraclass correlation highlighted a very high goodness of fit of the model R2=.9780 ( ).Greater location prediction robustness was obtained when the receivers spent over 100 s within a specific area, which is equivalent to more than 10 samples (quantization error less than 10%), for which we obtained an R2=.9775 (
). Conversely, the algorithm poorly estimates dwelling time (R2=.4719) when the time spent in an area is under 100 s ( ).RMSE is between 15.28 s and 15.62 s (see
) independent from the time spent in a specific area. For this reason, the main source of error can be attributed to the transitioning of the receiver from one area to another because:- the highest amount of error is observed during transitions (3%-34%; ); and
- the sampling rate of the sensor is 10 s. The sampling effect is evident in the gaps between the estimations in .
Column A of
displays the confusion matrices of model 3 (w=1.0) for all trials. A darker diagonal line represents a better prediction from the algorithm. From the graphs, it is evident that errors often occur between adjacent beacons. For trial 1 (column A), the algorithm confused 1C1 with 1S1 because beacon 1C1b is close to 1S1a. Likewise, for trial 3 (column A), the algorithm confused 1C1 with 1C3 because beacon 1C1b is close to 1C3. The close proximity of certain beacons increases the possibility that refraction effects lead to a misclassification of the room that the receiver is located within. However, this effect is only evident in the case of transitions, and it never happens for beacons placed on different floors even though the distance between the beacons is relatively small, such as in the case of the beacons 2C1 and 1C3.Column B displays the confusion matrices of model 3 (w=1.0) for all trials but only in nontransition states. Location prediction was high (values higher than 0.99) within nontransition states such as the standard rooms (R), the social areas (S), and the stairs. However, within trial 2, the algorithm confused the standard room 1R3 and the corridor 1C2 in 10% of the cases because of the proximity between the beacons. Therefore, precautions must be taken in the placement of the sensors to avoid such ambiguities.
Measurements | SSE (s^2) | R-squareda | Adjusted R-squaredb | RMSE (s) |
Measurements under 100 s (130 points) | 31,700 | .4759 | .4719 | 15.62 |
Measurements over 100 s (73 points) | 17,290 | .9775 | .9772 | 15.28 |
All measurements (203 points) | 49,543 | .9780 | .9779 | 15.51 |
aR2, between 0 and 1, with a value closer to 1 indicating that a higher proportion of variance is accounted for by the model.
bAdjusted R2 that adjusts R2 for the residual degrees of freedom.
Behavioral Analysis
Given that the proposed algorithm is able to accurately determine indoor location, it is worth considering the utility this offers researchers in assessing where behavior occurs indoors.
shows the combination of localization tracking and activity data in the case of trial 1. It is evident that the highest levels of activities are conducted between rooms, in corridors and stairs, just before and after transition. Conversely, activities of a low or moderate nature were most commonly conducted within rooms.The combination of localization tracking and activity levels can be used to create a Lasagna plot. The absolute time associated to each room and activity level is represented by a color gradient from blue (time equal to 0) to yellow (time equal to 230 s). The graphs were initially produced without sorting the data by absolute time, and this made it difficult to extract useful information. Therefore, for
(trial 1), locations were sorted in descending order based upon absolute time. It is clear that there are areas where the receiver spent longer periods of time such as within rooms and social areas and areas where the time spent was minimal such as within corridors and stairs. represents the combination of localization tracking and activity levels with the area sorted based on the route of trial 1.We also considered the relative time to compare the activity levels in each room regardless of the time the participant stays in a specific area.
represents sorted location data based upon the relative time at low-level activity. The rooms and social areas are mainly represented on the left side of the plot (indicating predominantly low activity in these areas), while the corridors and stairs on the right-hand side (indicating predominantly high activity in these areas). represents the combination of localization tracking and activity levels with the area sorted based on the route of trial 1.Discussion
Understanding the contribution of context to the health-behavior relationship first requires the accurate measurement of location, which is often overlooked when quantifying movement behaviors. In this study, an algorithm was presented that integrated indoor location and accelerometer measured step counts to create a better representation of the human-environment interactions. This approach to indoor location facilitates the assessment of 3 main elements: (1) time, (2) location, and (3) activity level. This is advantageous over deriving time and activity levels alone, as discerning the contribution of context to movement behaviors will allow researchers to create location-specific interventions that may act as more potent “levers” for sustained lifestyle behavior change.
Algorithm Performance
Generally, the algorithm models calculated lower error during nontransition states, which could be explained by the fact that the time of each transition was always faster than the sampling rate of the sensors (see
). Consequently, the transition state error is always higher, where the location time was shorter. This is not related to the time per se but the RSSI recording as the signal may be collected in the previous or next location during the sample interval of 10 s. Transitional error is high probably using the current methodology and contributes approximately 30% of error within the models. Sampling rate is currently manufacturer limited; however, an investigation into higher sampling rates should be explored to ascertain if error associated with transitional states can be reduced, or if specific guidance can be provided to account for the RSSI transition. Moreover, a potential way to improve the performance of the algorithm could be by modeling the RSSI distribution [ , ], but this kind of static model is not practically applicable in realistic environments due to dynamic changes in RSSI brought about by refraction and scattering. In this study, we endeavored to test the algorithm in a realistic environment, where it is more likely there will be a nontransitional situation (ie, dwelling in 1 location) than transitional (ie, not making frequent transitions between areas).Context and Activity
Considering the combination of accelerometric and location data within specific built environments makes it possible to objectively assess the contribution of different environments to overall levels of behavior [
]. This type of data can answer questions about environmental exposure and behaviors that are specific in particular locations or at certain times of day. Typically, accelerometers provide objective information on physical activity intensity and duration. While the intensity of the activity may be an important concept for health, it lacks specificity to recognize specific activities [ ]. The addition of context to accelerometer data provides an opportunity to develop a novel line of research focused on the interactions of environment and movement behaviors in a temporal, spatial, and behavioral way [ ]. Moreover, intervention studies that measure changes in locations and behavior will provide more robust evidence of the effects of the interventions and their causality [ ].Typically, to record and analyze location and accelerometer data, different devices are used, which requires the synchronization of multiple data sources. This can be challenging; in fact, poor synchronization could directly impact the proper processing and interpretation of the data. In this study, only one sensor was used to record both measures. This is an important and, to our knowledge, novel step in indoor location research. The timestamped data from the ActiGraph receivers can give a rich and detailed sequence of the types of activities people are engaging in (intensity, duration, etc), what spaces are used, and at what time in the day. In fact, as time-based analysis is further integrated into behavioral studies, more complex space-time modeling analysis and strategies can be applied to model the possible range of activities that an individual can engage in, and to determine if events and exposures during one day could influence activities during the next day [
]. A prerequisite for this level of space-time modeling is an accurate measure of time spent in a given location. Additionally, location data could help researchers better understand if spending more time in one environment influences certain behaviors, if there is a specific number of times a person must be in an environment to exhibit certain behaviors, or if there are specific times of the day to observe certain behaviors. Subsequently, the introduction of the additional time and behavioral variables could offer a novel insight into locations that are promoting or inhibiting of a behavior.The combination of location data with behavior is a starting point for researchers to understand the determinants of different behaviors in indoor environments. For example, the illustrative combination of accelerometer and location data from this study showed that more activity was performed during the transitions from one area to another than within certain rooms or social areas. Furthermore, it was possible to identify a third cluster of areas (2S1-IC3) in which the participant performs mostly middle-level activities. From this, behavior could be classified as mainly low, middle, or high, potentially giving insight on where the participant mainly performs their daily activities.
To the best of the authors’ knowledge, the approach implemented herein is novel. In particular, being able to provide objectively measured data regarding changes in location and activities, rather than self-reported information, may provide greater utility and relevance to researchers and stakeholders. Simple epidemiological measures of behavior and activity, such as questionnaires, have performed adequately to demonstrate associations with a number of chronic disease outcomes; however, they rarely separate activity into its different dimensions, nor have they facilitated an estimation of dose-response effects [
]. Therefore, improved measurement methods, such as indoor location tracking, would be of use in epidemiological studies to record trends in behavior and activity within populations, making objective comparisons between populations, and in monitoring the effect of interventions and programs [ ]. Nevertheless, due to the lack of research within the contextual domain, it is still unclear what additional benefit will be added to our current understanding. It is therefore essential that algorithms such as the one presented within this paper be refined and used in practice before the quantification of context is advocated as a necessary measurement within behavioral research.Limitations
Some technical and practical difficulties associated with the approach reported within this paper must be highlighted. First, one issue relates to difficulties in establishing a valid protocol that can ensure consistent performance in different environments, without the need for ad hoc testing and calibration. In fact, some aspects are likely to deviate to some degree, such as the possible variation in performance coming from differences in building materials and morphology.
Quantifying contextual movement behaviors using the presented technologies could be considered costly due to the number of devices required to accurately capture location over multiple domains. These limitations equally apply to existing measurement practices such as the combination of accelerometry and GPS [
]; however, these practices do not appear to have been decisively held back by these limitations. This is, presumably, due to the idea that the value added by the combination of activity data and GPS outweighs these limitations [ ]. Future iterations of contextual technologies will hopefully alleviate these concerns.A final limitation is related to the contextual tracking system that was used. The ActiGraph model does not allow the user to adjust the strength of the BLE signal or the sampling rate for data collection. In our opinion, the possibility to adapt the signal of the beacons to the size of the different areas could improve the performance of the tracking location algorithm. Indeed, this could avoid situations where signals from beacons in multiple rooms are recorded simultaneously. Additionally, the maximum sampling rate for the BLE signal is 10 s. There are situations where transitioning between 2 or more adjacent areas could take place between samples and consequently, the algorithm would not be able to accurately track location. A higher sample rate of the BLE signal, for example, 5 s or even every second, would make it possible to have a more precise indoor tracking output.
Conclusions
The aim of this study was to create and test a novel algorithm, using accelerometry-based proximity-enabled sensors, to combine the “where,” the “when,” and the “what” of movement behaviors by the novel exploitation of existing technologies (conventionally used only to understand the “what”). Compared with a criterion measure, it has been demonstrated that the new approach can reliability predict location within rooms and social areas; however, there is increased error for transition between areas. This combination allows us to objectively and reliably determine the individual characteristics of contextual behavior. This new information can be used to better inform evidence-based practice and research interventions. The results have shown that it is possible to capture location information in indoor environments and that this can be combined with activity monitoring data to create variables previously unavailable for research.
It is clear that many behaviors and health issues are directly related to the context; thus, this novel approach is a powerful tool for researchers to monitor the “where,” “when,” and “what” of daily activities. As a first step into utilizing both context and behavior from one device, there is a need to conduct more research to refine the algorithm and bring about more technological advancement to reduce the current limitations, before indoor location can be utilized within intervention and epidemiological research.
Our study shows that a novel implementation of “context sensing” will facilitate a wealth of new research questions on promoting healthy behavior change, the optimization of patient care, and efficient health care planning (eg, patient-clinician flow; patient-clinician interaction). This fresh perspective will help both researchers to develop new strategies to study human behavior, and policy makers to design new public health initiatives aimed at improving positive and functional behavior within the population.
Acknowledgments
This work was supported by the Medical Research Councils’ Lifelong Health and Wellbeing Initiative in partnership with the Department of Health (grant number MR/K025090/1), and partially by the LU-HEFCE Catalyst grant and by the LU-EESE startup grant. Also, this research is part of the research portfolio supported by the National Institute for Health Research Collaboration for Leadership in Applied Health Research and Care East Midlands (NIHR CLAHRC for EM) and by the National Institute for Health Research (NIHR) Leicester Biomedical Research Centre based at University Hospitals of Leicester and Loughborough University. The views expressed are those of the authors and not necessarily those of the NHS, the NIHR or the Department of Health. Dr Sessa has been supported by the FY2016 Grant Program for Promotion of International Joint Research of Waseda University.
Authors' Contributions
DM, SS, AS, MZ and DEW conceived and designed the experiments. DM and AL performed the experiments. DM and SS analyzed the data. MZ and DEW contributed reagents/materials/analysis tools. MZ and DEW supervised the experiments and the analysis. DM, SS, and APK wrote the paper. DM, SS, APK, AL, AS, MZ, and DEW reviewed and edited the paper.
Conflicts of Interest
None declared.
Multimedia Appendix 1
A visual representation of the speed and dwelling time of each trial.
PNG File, 11KB
Multimedia Appendix 2
A two-dimensional floorplan representing the beacon locations and path of trials 1-3.
PNG File, 369KB
Multimedia Appendix 3
Lasagna plots representing the combination of localization tracking and activity levels. Areas are not sorted by absolute time. The color between blue (time equal to zero) and yellow (time equal to 230 s) represents the time being active.
PNG File, 47KB
Multimedia Appendix 4
Lasagna plots representing the combination of localization tracking and activity levels. Areas are not sorted in descending order by relative time. The color between blue (time equal to zero) and yellow (time equal to 230 s) represents the activity level spent-time.
PNG File, 53KBReferences
- Berrigan D, Hipp JA, Hurvitz PM, James P, Jankowska MM, Kerr J, TREC Spatial and Contextual Measures and Modeling Work Group. Geospatial and contextual approaches to energy balance and health. Ann GIS 2015;21(2):157-168 [FREE Full text] [CrossRef] [Medline]
- Cummins S, Curtis S, Diez-Roux AV, Macintyre S. Understanding and representing 'place' in health research: a relational approach. Soc Sci Med 2007 Nov;65(9):1825-1838. [CrossRef] [Medline]
- Kirchner TR, Shiffman S. Spatio-temporal determinants of mental health and well-being: advances in geographically-explicit ecological momentary assessment (GEMA). Soc Psychiatry Psychiatr Epidemiol 2016 Dec;51(9):1211-1223 [FREE Full text] [CrossRef] [Medline]
- Popay J, Thomas C, Williams G, Bennett S, Gatrell A, Bostock L. A proper place to live: health inequalities, agency and the normative dimensions of space. Soc Sci Med 2003 Jul;57(1):55-69. [Medline]
- Sampson RJ, Morenoff JD, Gannon-Rowley T. Assessing “ neighborhood effects”: Social processes and new directions in research. Annu Rev Sociol 2002;28:443-478 [FREE Full text] [CrossRef]
- Conroy DE, Maher JP, Elavsky S, Hyde AL, Doerksen SE. Sedentary behavior as a daily process regulated by habits and intentions. Health Psychol 2013 Nov;32(11):1149-1157 [FREE Full text] [CrossRef] [Medline]
- Jankowska MM, Schipperijn J, Kerr J. A framework for using GPS data in physical activity and sedentary behavior studies. Exerc Sport Sci Rev 2015 Jan;43(1):48-56 [FREE Full text] [CrossRef] [Medline]
- Spinney R, Smith L, Ucci M, Fisher A, Konstantatou M, Sawyer A, et al. Indoor tracking to understand physical activity and sedentary behaviour: exploratory study in UK office buildings. PLoS One 2015;10(5):e0127688 [FREE Full text] [CrossRef] [Medline]
- Copeland JL, Esliger DW. Accelerometer assessment of physical activity in active, healthy older adults. J Aging Phys Act 2009 Jan;17(1):17-30. [Medline]
- Hills AP, Mokhtar N, Byrne NM. Assessment of physical activity and energy expenditure: an overview of objective measures. Front Nutr 2014;1:5 [FREE Full text] [CrossRef] [Medline]
- García Ó, Prieto J, Alonso RS, Corchado JM. A framework to improve energy efficient behaviour at home through activity and context monitoring. Sensors (Basel) 2017 Jul 31;17(8) [FREE Full text] [CrossRef] [Medline]
- Rennie KL, Wareham NJ. The validation of physical activity instruments for measuring energy expenditure: problems and pitfalls. Public Health Nutr 1998 Dec;1(4):265-271. [Medline]
- Wheeler BW, Cooper AR, Page AS, Jago R. Greenspace and children's physical activity: a GPS/GIS analysis of the PEACH project. Prev Med 2010 Aug;51(2):148-152. [CrossRef] [Medline]
- Röbesaat J, Zhang P, Abdelaal M, Theel O. An improved BLE indoor localization with Kalman-Based fusion: an experimental study. Sensors (Basel) 2017 Apr 26;17(5) [FREE Full text] [CrossRef] [Medline]
- Krenn PJ, Titze S, Oja P, Jones A, Ogilvie D. Use of global positioning systems to study physical activity and the environment: a systematic review. Am J Prev Med 2011 Nov;41(5):508-515 [FREE Full text] [CrossRef] [Medline]
- Loveday A, Sherar LB, Sanders JP, Sanderson PW, Esliger DW. Technologies that assess the location of physical activity and sedentary behavior: a systematic review. J Med Internet Res 2015 Aug 05;17(8):e192 [FREE Full text] [CrossRef] [Medline]
- Rousek JB, Pasupathy K, Gannon D, Hallbeck S. Asset management in healthcare: evaluation of RFID. IIE Trans Healthc Syst Eng 2014;4(3):144-155. [CrossRef]
- Ranasinghe DC, Shinmoto Torres RL, Hill K, Visvanathan R. Low cost and batteryless sensor-enabled radio frequency identification tag based approaches to identify patient bed entry and exit posture transitions. Gait Posture 2014 Jan;39(1):118-123. [CrossRef] [Medline]
- Castillo-Cara M, Lovón-Melgarejo J, Bravo-Rocca G, Orozco-Barbosa L, García-Varea I. An empirical study of the transmission power setting for bluetooth-based indoor localization mechanisms. Sensors (Basel) 2017 Jun 07;17(6):- [FREE Full text] [CrossRef] [Medline]
- Wood TM. Issues and future directions in assessing physical activity: an introduction to the conference proceedings. Res Q Exerc Sport 2000 Jun;71 Suppl 2:ii-vii. [CrossRef] [Medline]
- O'Brien JT, Gallagher P, Stow D, Hammerla N, Ploetz T, Firbank M, et al. A study of wrist-worn activity measurement as a potential real-world biomarker for late-life depression. Psychol Med 2017 Jan;47(1):93-102 [FREE Full text] [CrossRef] [Medline]
- Chen Z. Bayesian filtering: from Kalman filters to particle filters, and beyond. 2003. URL: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.107.7415&rep=rep1&type=pdf
- Bar-Shalom Y, Willet PK, Tian X. Tracking and Data Fusion. Storrs, CT, USA: YBS publishing; 2011.
- Benkic K, Malajner M, Planinsic P, Cucej Z. Using RSSI value for distance estimation in wireless sensor networks based on ZigBee. 2008 Presented at: 15th International Conference on Systems, Signals and Image Processing, 2008. IWSSIP 2008; June 25-28, 2008; Bratislava, Slovakia. [CrossRef]
- Kerr J, Sallis JF, Saelens BE, Cain KL, Conway TL, Frank LD, et al. Outdoor physical activity and self rated health in older adults living in two regions of the U.S. Int J Behav Nutr Phys Act 2012 Jul 30;9:89 [FREE Full text] [CrossRef] [Medline]
Abbreviations
BLE: Bluetooth low energy |
GPS: global positioning system |
RMSE: root mean square error |
RSSI: records received signal strength indication |
SSE: sum of squares due to error |
Edited by G Eysenbach; submitted 24.07.17; peer-reviewed by K Bosak, B Dobkin, A Lau; comments to author 24.08.17; revised version received 19.02.18; accepted 10.03.18; published 20.04.18
Copyright©Daniele Magistro, Salvatore Sessa, Andrew P Kingsnorth, Adam Loveday, Alessandro Simeone, Massimiliano Zecca, Dale W Esliger. Originally published in JMIR Mhealth and Uhealth (http://mhealth.jmir.org), 20.04.2018.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR mhealth and uhealth, is properly cited. The complete bibliographic information, a link to the original publication on http://mhealth.jmir.org/, as well as this copyright and license information must be included.