Abstract
This work describes an automatic method to recognize the position of an accelerometer worn on five different parts of the body: ankle, thigh, hip, arm and wrist from raw accelerometer data. Automatic detection of body position of a wearable sensor would enable systems that allow users to wear sensors flexibly on different body parts or permit systems that need to automatically verify sensor placement. The two-stage location detection algorithm works by first detecting time periods during which candidates are walking (regardless of where the sensor is positioned). Then, assuming that the data refer to walking, the algorithm detects the position of the sensor. Algorithms were validated on a dataset that is substantially larger than in prior work, using a leave-one-subject-out cross-validation approach. Correct walking and placement recognition were obtained for 97.4% and 91.2% of classified data windows, respectively.
Keywords: Wearable sensors, accelerometer, activity recognition, body location, walking detection
1. Introduction
Wearable sensor systems are increasingly being developed for health applications such as activity recognition [1–5], energy expenditure estimation [6–11], gait analysis [12, 13], balance assessment [14] and fall detection [15–17]. The use of accelerometer-based fitness monitors has also exploded recently. In this work, we present a fully-automatic system to recognize the placement site of a body worn triaxial accelerometer. The work is motivated by three observations. The first observation is that the automatic detection of sensor placement sites could reduce the risk of people using wearable sensors inappropriately. Most wearable sensor systems assume and require that sensors be worn in a specific place on the body. This is because some activities are associated with specific body parts or because signals may vary significantly, thus changing the body’s position in certain activities [18]. For example, activity recognizers or energy expenditure estimators are usually designed for specific placement sites they are optimized on. Fitness trackers and step counters are optimized for particular body positions. Even in controlled research studies, the misplacement or swapping of sensors can corrupt data collection. A system that can detect that the sensor is not being worn correctly in real-time would be able to adapt its behavior accordingly or notify the user that it will not operate as expected. The second observation is that the automatic detection of sensor placement sites could provide valuable compliance data to researchers using wearable systems for field experiments. Wearable sensing is being increasingly used for scientific data collection, such as gathering data on health behavior. For instance, large numbers of studies use hip-worn or wrist-worn monitors for estimating physical activity, including important national surveillance studies such as the U.S. National Health and Nutrition Examination Survey (NHANES) [19] or the UK Biobank study [20]. However, researchers working with these technologies frequently report that users do not wear them properly. A system that could verify sensor placement continuously would be able to provide important metadata for these studies. The third observation is that automatic detection of sensor placement sites could create opportunities to improve the usability of wearable sensors, especially in multi-sensor systems. Allowing sensors to be worn on several body parts, where users might swap these positions without the need to interact with an interface, could allow site-dependent algorithms to be developed that perform well but maintain end-user placement choice options. For example, sensors in smartphones are also being used in a variety of applications to provide context-based services; smartphones, however, are carried in many different ways depending upon the user’s activity and preferences. Recognizing where the smartphone is (hand-held, trouser pocket, hip-pocket, jacket-pocket or placed on a table) by using its embedded accelerometers, gyroscopes and light sensor can improve the accuracy of those systems [21–22]. Ease of sensor placement becomes even more critical with multi-sensor systems, because by automatically detecting the sensor’s location, users could avoid the cognitive overhead of keeping track of which sensor goes where on the body, especially as sensors are moved around for cosmetic and comfort reasons.
Detecting sensor location is particularly important in view of telehealth applications for ambulatory monitoring. Automatic recognition of the placement site of wearable sensors could be used to verify that these sensors are actually placed in the desired location, or to allow automatic choice and tailoring of processing algorithms based on sensor location. For example, an accurate estimation of gait parameters is feasible at the ankle site [12], whereas upper limb activity recognition can be conveniently performed at the wrist site [1]. At the same time, both sites can be used for activity recognition, provided that the classification parameters are suitably chosen [23]. In short, recognizing the location of wearable sensors reduces misplacement error rates and improves the information content that can be extracted from them.
We describe an automatic, real-time strategy developed to recognize one of five body locations commonly used in health research. An algorithm was tested on a dataset of 33 participants performing over 28 complex tasks. Prior studies that have explored the automatic recognition of sensor placement are summarized in Table 1. One of the common strategies is to recognize walking, and then recognize sensor placement during walking. This is because walking is a common, highly-structured activity where most parts of the body move in different ways. In this case, the challenge then becomes to detect walking reliably without knowing where the sensor is located.
Table 1.
Recent results for accelerometer placement site recognition problems as compared with the approach presented in this
| Kunze et al. 2005 | Amini et al, 2011 | Weenk et al.,2013 | Kunze et al. 2014 | Saeedi et al. 2014 | Fujinami et al., 2010 | Shi et al., 2011 | Alanezi et al., 2013 | Wiese et al., 2013 | This work | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Recognized sensor sites (total number) | Head, trousers pocket, breast pocket, wrist (4) | Upper arms, forearms, waist, shins, thighs, head (6 classes, using 10 sensors to monitor both sides) | Feet, shanks, thighs, sternum, waist, shoulders, arms, forearms, hands, head (17) | Head, wrist, torso pockets (front or back) (5) Or Hend, wrist upper arm, knee and back (5) | Waist, wrist (left/right), right arm, left thigh, ankle (left/right), (7) | Smartphone locations: hung on the neck, jacket pocket, chest pocket, trousers pockets (front or back), hand (6) | Smartphone locations: breast pocket, hip pocket, trousers pocket, hand (4) | Smartphone locations: handheld, talking, watching a video, pockets (pants, hip, jacket) (6) | Smartphone locations: Pocket, bag, out of body, hand (4) | Ankle, thigh, hip, arm, wrist (5) | |
| Lab study: data annotated by direct observation | In-situ study: User self reported annotation | ||||||||||
| Tested activities (total number) | Working on a desk (writing emails, Internet surf and book browsing), walking along a corridor or staircase, giving a presentation, kitchen activities (making coffee, opening/closing drawers, cleaning coffee kitchen) (9) | Self-selected daily activities in lab, including walking (Unknown) | Walking (1) | 5 different datasets which include activities of daily living, household, workshop and office activities (exact number not disclosed) | Stand-to-sit, sit- to-stand, sit-to-lie, lie-to-sit, bend to grasp, rising from bending, kneeling right, rising from knee, look back, return from look back, turn, step fwd/bwd, jumping (14) | Walking, storing or removing a mobile phone into/from a certain storage position (3) | Walking (1) | Idle, walking, running (3) | Sitting on a couch, sitting on a desk chair, standing in place, walking (4) | Not available. | Lying, sitting (reading, writing, typing or Internet searching), standing still, sorting files on paperwork, cycling indoor and outdoor, natural walking, treadmill walking (different speeds/inclines), carrying a load, stairs or elevator (up/down), jumping-jacks, sweeping with broom and painting with roller/brush (28) |
| Participants | 6 healthy | 25 healthy | 11 healthy + 7 patients | 17 healthy (overall) | 1 healthy | 5 healthy | 4 healthy | 10 healthy | 15 healthy | 32 healthy | 33 healthy |
| Window length | 1 s, 50% overlap | 3 min, not overlapping | All trial (6 s) | 6 min/2.5 s, 50% overlap | Not disclosed | 15 s, not overlapping | 10 s, not overlapping | 5 s, not overlapping | 20s, not overlapping | 1 s, not overlapping | 10 s, not overlapping |
| Available data minutes | 32 (64 with 50% overlap) | 30 for each site | 3.1 for each site | >1200 (5 different datasets) | Not disclosed | 103.5 | 40 for each site | Not disclosed | 109 | 106 | ~2000 for each site |
| Accelerometer features | Time and frequency domain | Time and frequency domain | Time domain features from both accelerometer and gyroscope | Time domain | Time domain features from both accelerometer and gyroscope | Time and frequency domain | Time domain features from both accelerom. and gyroscope | Time domain features | Time and frequency domain from accelerom., proximity and light sensor | Time and frequency domain. | Time and frequency domain |
| Classification method | C4.5 | SVM | C4.5 | HMM + particle filter smoothing | kNN | Multilayer perceptrons and hidden Markov models | SVM | C4.5, naïve Bayes, logistic regression | Random forest | SVM | SVM |
| Validation method | 10-fold | 500 instances for training and 2000 for testing | 10-fold | Train/test over randomly picked subset | No validation reported | 4-fold | 5-fold | 10-fold | LOSO | LOSO | LOSO |
| Embedded walking recognizer | Yes, supervised | Yes, unsupervised | No | No | No | Yes , supervised | No | 3 class classifier: idle, walking or running | No | No | Yes, supervised |
| Suitable for online (real- time) use | Partially* | No † | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Walking classifier accuracy and false positives | Acc = 84.8% FP = 4.0% |
Acc. = 94.0% FP = 2.0% |
Not applicable | Not applicable | Not applicable | Not applicable | Not applicable | “Near perfect accuracy” | Not applicable | Not applicable | Acc = 97.4% FP = 1.1% |
| Sensor body placement recognizer accuracy | 94.0% (100% with majority voting) | 89.0% | 97.5% (all trial) | 82.0% (94.9% when using walking data only) | 99.9% | 70% on average, 100% if the user is walking | 91.7% | 88.5% | 85.0 % (79.0 % acc. only) | 75.4 % | 91.2% (92.7% with majority voting) |
the walking recognition was done offline and walking portions of data to run the position classifier were selected according to their time duration.
walking segments were recognized as the most recurrent activity pattern in the whole dataset and then windowed and processed for sensor placement site recognition.
In Amini et al., 25 participants wore a triaxial accelerometer at 6 different sites: upper arm, forearm, waist, shin, thigh and head [24]. An unsupervised strategy was used to identify walking data, based on the assumption that walking is the most frequent and consistent activity people perform throughout the day (excluding non active states such as sleeping and sitting). On walking segments, a SVM classifier operating on time and frequency domain features extracted from 3-min windows led to correct identification of one of six body locations for 89% of walking data. The sensor placement detection algorithm was validated by training on 500 randomly selected samples and testing on the remaining 2000.
Some studies have only considered walking data. Weenk et al. used a full body XSens MVN Biomech system suit to place an inertial measurement unit at 17 sites on major body parts [25]. Decision trees were used to detect location in 35 walking trials (some from healthy subjects and some from subjects recovering from knee surgery). Sensor location was correctly recognized using 10-fold cross-validation in 97.5% of sessions.
Others have explored the similar problem of recognizing the placement site of a smartphone from its sensors by using neural networks [26], SVM classifiers [27], Random Forest [28] and C4.5 decision trees [21]. Tested sites were trouser pockets (back, front), hip pocket, chest pocket, hand, neck and out-of-body positions. To date, the generalizability of these studies is unknown because they have been conducted with relatively small number of participants and little activity data per participant, on few placement sites (see Table 1).
With respect to previous studies on sensor location detection, our algorithms were tested on a much larger and more complex single dataset, involving 33 participants and over 28 different carefully annotated activities, including variations on walking (9 types) and a substantial amount of non-walking activities (19 types) (see Table 2). We propose a fully automatic strategy for detecting one of 5 positions of a wearable accelerometer with results comparable to prior work, despite the additional complexity of the dataset. Our method accomplishes this by first recognizing whether the activity being performed is walking, independent of the sensor placement site. Next, only during the “walking” segments, a second algorithm classifies the placement site of the sensor.
Table 2.
List of available activities.
| Non-walking activities | Walking activities |
|---|---|
|
|
Our goal was to develop a “black box” system that does not require user-specific training data. We therefore tested our algorithm using the leave-one-subject-out validation strategy (LOSO) rather than 10-fold cross-validation. This approach, where data relating to the participant being tested are not available in the training set, is able to represent final use conditions as closely as possible and is less likely to lead to overfitting the pilot dataset. To our knowledge, a LOSO validation approach has not been used in the prior work on body sensor location detection, with the only exception being the study by Weise et al., [28], which focused on smartphone location recognition limited to four classes: hand, pocket, bag and out-of-body. All of the studies listed in Table 1 except Weise et al. use n-fold cross validation.
We also wanted our black-box sensor location detection system to work in real-time, so that the algorithm could be used to prompt the user of a wearable computing system to take action (e.g., move a sensor, confirm a sensor location switch). Even if previous studies on placement recognition algorithms for smartphones are suitable for online implementation [21, 26–28], some of the other prior work on sensor location detection may not be [29,24].
2. Materials and methods
2.1 Data acquisition
This work uses a dataset of acceleration data tagged with activity type that was previously acquired for other studies on activity recognition. Data were collected from 33 adults recruited from the Stanford, California community. The Stanford University Institutional Review Board approved the data collection protocol, and written informed consent was obtained from all subjects before participation. Triaxial accelerometers [30] were attached using custom Velcro bands to each participant’s ankle, thigh, hip, upper arm, and wrist. The placement sites considered for this study were fixed: the wrist sensor was placed on the dorsal aspect of the dominant wrist midway between the radial and the ulnar process; the ankle sensor was placed on the outside of the ankle, just above the lateral malleolus; the thigh sensor was located on the anterior thigh midway between the top of the patella and the inguinal fold; the arm sensor was worn over the lateral side of the arm midway between the shoulder and the elbow and the hip sensor was worn on a belt around the participant’s waist on the dominant side of the body. Arm and thigh sensors were attached with both adhesive tape and a sleeve worn over and around the sensor.
The placement sites were selected by the investigators in charge of dataset acquisition, because of their relevance in exercise monitoring research. The hip and wrist are the most common locations for placement of sensors in physical activity measurement studies, including important national surveillance studies such as NHANES or UK Biobank [19, 20]. The thigh is the most common location used in recent sedentary behavior monitoring studies because it can be used to easily differentiate sitting/lying vs. standing and other activities. The ankle is used commonly in gait studies, and the upper arm is a location that has been used by some commercial fitness monitors and exercise monitoring phone apps.
The Wocket accelerometers [30] were used because they are sufficiently small that they can be comfortably worn on all five body locations at the same time. They are small, thin and lightweight devices (43 × 30 × 7 mm, 13 g) that are optimized for long-term wearability for physical activity monitoring studies, where mobile phones are used for data collection. Raw acceleration data (range ± 4 g, g = 9.81 m/s2) were acquired at 90 Hz and sent using the Bluetooth wireless protocol to a smartphone.
One limitation of this study is that the sensors were fixed in the same position on each subpart of the body in this dataset. Amini et al., for instance, considered different locations in each of the six general body regions (i.e., head, upper arm, forearm, waist, thigh, shin) [24]. However, in their study, the authors report no meaningful statistical differences in output when changing the position of the sensor within the same body region.
The experimental protocol consisted of asking participants to perform a guided sequence of laboratory-based physical activities and common daily activities. Activities were annotated during the execution of tasks using a voice recorder, and then timings on the voice recording were used to annotate start/stop times for specific activities being observed. Data and annotation were synchronized using custom software [30]. Fifteen activities with more than 0.5 min of steady state data were labeled in the original data set: lying (on back, on left side, on right side), sitting (reading, typing, writing, Internet searching), sorting files on paperwork, standing still, cycling indoor (exercise bike, 70 rpm-50 W-7 kg) and outdoor (level, uphill, downhill), natural walking, treadmill walking at different speeds (2, 3, 4 mph) and inclines (0 %, 6%, 9%), walking carrying a load, stairs up/down, elevator (up, down), jumping-jacks, sweeping with broom and painting with roller or brush). Unlabelled data and data labeled as of “unknown” activity type were discarded. Multitasking behaviors were not included, except for the activity “walking-carrying a load.”
Data from 9 of the initial 42 participants were discarded due to high data loss or to technical problems affecting the sensors, as reported in notes taken by the staff at the time of data collection. Accelerometer data from the remaining 33 participants (11 men and 22 women, age = 18–75 yr, height = 168.5 ± 9.3 cm [range 149–189], weight = 70.0 ± 15.6 kg [range 48–114]) were imported into the Mathworks Matlab (version 2013b, Natick, MA) environment, which was used for all evaluations described. Arm accelerometer data for one of the retained participants was not available. All data and codes used in the work presented here are available for use and replication (http://mhealth.ccs.neu.edu/datasets).
2.2 Feature set
Signals were processed in 10-s non-overlapping windows. This window length was chosen because applications we envision – even real-time applications – would typically not need to instantly detect sensor location, and 10 s is sufficient to detect walking frequency features. In addition, in prior work, good recognition of ambulation status was obtained from 12-s windows using wrist accelerometers [23].
After discarding those transition windows with multiple activities in them and the initial and final window for each activity, the remaining dataset included 63,191 windows, corresponding to 35.1 hours of data for each sensed site (63.8 min of data per participant on average). Of these, 9.3 hours of data were labeled as walking data.
Building on prior work [23], raw accelerometer data were converted to signal magnitude vector values ( ), thus removing the dependence of the resulting signal from the orientation of the sensor. Mean and standard deviation of the SM were considered jointly with a time-frequency analysis of SM in each 10-s window. The analysis of power spectral density aimed at characterizing the following:
The total power in the frequencies between 0.3 Hz and 15 Hz;
The first and second dominant frequencies and their powers in the same frequency band;
The dominant frequency in the 0.6–2.5 Hz band and its power;
The ratio between the power of the first dominant frequency and the total power (0.3–15 Hz);
The ratio between the dominant frequency of the current window and the previous window;
The ratio (R1) between the power at frequencies lower than 3 Hz and the total power (0.3–15 Hz);
The ratio (R2) between the power at frequencies lower than 3 Hz and the total power (0.3–15 Hz);
The ratio (R3) between the power at frequencies in the 1.5–2.5 Hz range and the total power (0.3–15 Hz).
Frequency domain features 1–5 were retained from previous studies on activity recognition using the wrist site [23, 31]. Three additional frequency domain features (R1, R2, R3) were included in this work: R1 and R2 capture the presence of impacts (high frequency components) in lower limb data; dominant frequencies common in gait are usually around 1–2 Hz, so >3 Hz would capture impacts that are more common in distal regions of the body, even at the fastest gait speed. In fact, it is known from the literature that high frequency components up to 60 Hz, which are present in lower limb recordings, are the result of limb impacts not movement dynamics [10]. R3 was introduced to capture hip movement: the dominant frequency at the hip should be around 2 Hz instead of 1 Hz, as with lower limb sensors, when foot impacts are transferred to the hip. The minimum and the maximum value of the SM within each window was also added to this feature because we expected the range of recorded SM to vary for different activities and within the walking activity and to vary at different placement sites, increasing from proximal to distal sites [10]. The total size of each feature vector was 16 features.
2.3 Preliminary considerations
The main objective of this work was to develop an algorithm to detect wearable sensor placement sites, discriminating between five common sites used in physical activity research: ankle, thigh, hip, arm and wrist. Two simpler recognition problems (ankle-wrist and ankle-hip-wrist) were considered as well.
Knowledge of the activity being performed is useful for sensor location recognition. For example, if the user is sedentary, the variability of accelerations recorded at different placement sites will be low. Walking is considered a particularly useful activity for this purpose [18, 24]. We began by assessing whether walking is the best of the 15 activities in our dataset for detecting the location of the sensor. Specifically, we attempted to train classifiers to recognize the placement by starting from all available data, all “non-sedentary” data and all available “walking” data (treadmill and natural walking data), according to the available activity labels.
2.4 Classification approach and algorithm
Support vector classifiers (SVM) were used for the supervised learning classification tasks (using a radial basis function kernel) [32]. SVM classifiers are desirable because the optimization criteria are convex, which implies that a global optimal solution is available [32]; furthermore, software toolboxes simplify application of the algorithms to particular datasets. We adopted SVMs because we found previous applications of this method on similar datasets for single-sensor activity recognition studies [23, 31] and sensor placement site recognition studies [24, 27]. We used the SVM implementation from the LibSVM toolbox [33].
Another advantage of SVM classifiers is that they may provide an estimate of class conditional probability in addition to the classification outcome. To do this, a logistic regressor was cascaded to the SVM’s output as described in detail in [33]. Such soft-assignment capabilities turned out to be useful in refining algorithm outcomes because they provided an estimate of the probability of having a particular placement classification for each data window, where Σ(pwrist + parm + phip + pthigh + pankle) = 1 [33].
In our problem, this probability estimate allows us to suspend sensor site classification until one of the class-conditional probabilities exceeds a fixed threshold. In an on-line classification system, the presence of one or more consecutive uncertain windows to be discarded introduces latency in delivering a classification outcome. Latency is traded off for additional reliability of placement recognition. To our knowledge, this soft-assignment approach has not been used in the prior work on body sensor location detection.
The parameters C and γ of the SVM classifiers (radial basis function kernel) were optimized by running a grid search across parameter combinations [33]. The optimization criterion was the aggregated validation accuracy on the sensor placement recognition problem.
The structure of the overall proposed approach is presented in Figure 1. Triaxial accelerometer data from a sensor on one of five body locations are converted to SM values and cut into 10-s windows. A 16-value feature vector is computed and employed by an SVM classifier to determine whether the window is “walking” or “non-walking.” The walking recognition algorithm works regardless of the position of the sensor. For windows designated as walking, a second SVM classification step detects the sensor placement site by using the same feature vector. In this case, soft assignment is used to improve overall site detection reliability.
Figure 1.
Overview of the placement site recognition algorithm.
2.5 Validation framework
Cross-validation is a well-established technique used in pattern recognition experiments to avoid training and testing on the same data when only small data sets are available for experimentation [34]. The leave-one-subject-out cross-validation approach (LOSO) is preferred over standard n-fold cross-validation, where data are mixed from all subjects and held-out data are random, because LOSO prevents data collected from the same participant at about the same time from ending up in both the training and test datasets [23, 35]. Therefore, LOSO results are more likely to demonstrate how a method may work under realistic conditions when a new participant, not included in the training data, is tested. All of the prior work reported in Table 1 used cross-validation, not LOSO validation, except Wiese et al. [28].
We used the LOSO technique to evaluate the algorithm. LOSO consists of training the system with the data of all subjects except one, and then testing the system on the subject that was left out.. The procedure was subsequently repeated to test all data; results were then aggregated by summing all the resulting confusion matrices.
In order to compare this method with prior work, in which a single location is often detected after a long acquisition time, a majority voting strategy was applied. In particular in each available data sequence we considered to assign a vote to the output of the classifier at each window. We then decided which class to assign the whole data sequence by evaluating the class with more votes. By doing so, we obtained a single classification output for each of the available data sequence. The number of outputs in this case was the number of subjects times the number of sensors placement sites.
3. Results
3.1 Placement site recognition from activity-labeled data
Prior work found that knowing that a person was walking could help the sensor placement site recognition task. Given that our dataset included a variety of walking and non-walking activities, we first explored the importance of using walking recognition. Experiments used the radial basis function kernel SVM classifier with parameters C = 4 and γ = 0.25.
The first three rows of Table 3 show the results obtained using LOSO cross-validation on the placement site recognition task using three different types of activity-labeled data: all data, data labeled as one of the non-resting activities, and data labeled as walking activities. Results confirmed that walking provides a structure allowing more accurate placement site recognition. The confusion matrix obtained from LOSO validation on data labeled manually as walking is shown in Table 4, part A.
Table 3.
Placement site recognition (overall accuracy) LOSO validation results using datasets with a different number of possible sensor sites. Namely, 2 sites (ankle or wrist), 3 sites (ankle, wrist or hip), and 5 sites (ankle, wrist, waist, arm or thigh).
| Number of placements
|
|||
|---|---|---|---|
| 2 sites | 3 sites | 5 sites | |
| All available data | 84.0% | 73.5% | 57.8% |
| Data labeled as non-resting activity | 94.8% | 88.5% | 74.5% |
| Data labeled as walking | 99.2% | 92.4% | 81.0% |
|
| |||
| Data classified as walking | 99.2% | 92.2% | 80.3% |
Table 4.
Confusion matrices for the 5-sites recognition task. Data windows are obtained from manually labeled data (part A), walking classified data without (part B) or with automatic rejection of uncertain windows (part C) and after application of the voting (part D). Correct classification are in bold.
| Actual location | Classified location
|
||||
|---|---|---|---|---|---|
| Ankle | Thigh | Hip | Arm | Wrist | |
| Part A: Data windows manually-labeled as walking. | |||||
| Ankle | 3329 (97.5%) | 53 (1.6%) | 2 (0.1%) | 5 (0.1%) | 26 (0.8%) |
| Thigh | 74 (2.2%) | 3012 (88.8%) | 190 (5.6%) | 14 (0.4%) | 103 (3%) |
| Hip | 3 (0.1%) | 174 (5.2%) | 2171 (64.8%) | 738 (22%) | 263 (7.9%) |
| Arm | 2 (0.1%) | 19 (0.6%) | 585 (18.4%) | 2137 (67.3%) | 433 (13.6%) |
| Wrist | 10 (0.3%) | 48 (1.4%) | 177 (5.3%) | 252 (7.5%) | 2856 (85.4%) |
| Overall accuracy is 81.0% | |||||
|
| |||||
| Part B: Data windows automatically-classified as walking (without knowledge of the location of the sensor). | |||||
| Ankle | 3499 (97.5%) | 61 (1.7%) | 1 (0%) | 4 (0.1%) | 22 (0.6%) |
| Thigh | 90 (2.5%) | 3165 (89.4%) | 194 (5.5%) | 26 (0.7%) | 67 (1.9%) |
| Hip | 4 (0.1%) | 180 (5.1%) | 2282 (64.2%) | 816 (22.9%) | 274 (7.7%) |
| Arm | 5 (0.2%) | 21 (0.6%) | 637 (19.3%) | 2224 (67.3%) | 418 (12.6%) |
| Wrist | 14 (0.5%) | 56 (1.9%) | 171 (5.8%) | 274 (9.3%) | 2434 (82.5%) |
| Overall accuracy is 80.3% | |||||
| Part C: Data windows automatically-classified as walking (without knowledge of the location of the sensor). Automatic rejection of uncertain data was also applied. | |||||
| Ankle | 3403 (98.9%) | 25 (0.7%) | 0 (0%) | 0 (0%) | 12 (0.3%) |
| Thigh | 22 (0.7%) | 2932 (95.6%) | 107 (3.5%) | 0 (0%) | 7 (0.2%) |
| Hip | 1 (0.1%) | 75 (4.1%) | 1446 (79.2%) | 231 (12.7%) | 73 (4%) |
| Arm | 2 (0.1%) | 4 (0.3%) | 180 (11.5%) | 1223 (78.1%) | 156 (10%) |
| Wrist | 6 (0.3%) | 18 (0.9%) | 53 (2.5%) | 81 (3.9%) | 1942 (92.5%) |
| Overall accuracy is 91.2 % | |||||
|
| |||||
| Part D: Data windows automatically-classified as walking (without knowledge of the location of the sensor). Uncertain data rejection and voting on all the window of each of 164 trials were also applied. | |||||
| Ankle | 33 (100%) | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) |
| Thigh | 0 (0%) | 31 (93.9%) | 2 (6.1%) | 0 (0%) | 0 (0%) |
| Hip | 0 (0%) | 1 (3%) | 28 (84.8%) | 3 (9.1%) | 1 (3%) |
| Arm | 0 (0%) | 0 (0%) | 3 (9.4%) | 27 (84.4%) | 2 (6.3%) |
| Wrist | 0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 33 (100%) |
| Overall accuracy is 92.7 % | |||||
Sensor position detection using manually-labeled walking data represents a best-case scenario; we could not expect to perform better than an overall accuracy of 81% on the recognition task (with 10-s windows). However, our goal was to detect the position of the sensor with no manual labeling activity by automatically detecting walking and then applying the location classifier.
3.2 Recognition of walking, independent of placement site
The binary classifier to identify walking vs. non-walking windows was validated using all available data as specified in Table 2. The non-walking class was not limited to sedentary activities such as sitting, reading or typing, but also included activities such as cycling, sweeping with broom, or painting, thereby making it more challenging to recognize walking in this dataset than in datasets in prior work. The classifier was not provided with the location of each sensor. The same SVM parameter set obtained for placement site recognition was also considered for the walking classifier. The results are presented in Table 5, where four different performance estimators are reported: accuracy, specificity, sensitivity (aka recall) and precision. These parameters were evaluated for each class separately and in overall terms as follows:
where TP stands for true positives (correct classification of data window as part of the selected class), TN are true negatives (correct classification of data window as not being part of the selected class), FP are false positives (wrong classification of data window as part of the selected class) and FN are false negatives in the classification (wrong classification of data window as not being part of the selected class). Overall accuracy was evaluated as the trace of the confusion matrix divided by the total number of classified windows. Overall specificity, sensitivity and precision were obtained by summing TP, TN, FP, FN values obtained for each class. The overall LOSO validation accuracy was 97.4% (Table 5). The best sensor placement location for walking detection was the ankle (98.4%) and the worst was the wrist (94.7%). Specificity, sensitivity (aka recall) and precision were above 90% for all locations with one exception: sensitivity for walking detection using the wrist site was 84.1% (i.e., a higher number of false negatives was observed).
Table 5.
Walking recognition performance.
| Ankle | Thigh | Hip | Arm | Wrist | Overall | |
|---|---|---|---|---|---|---|
| Accuracy (%) | 98.4 | 98.3 | 98.0 | 97.7 | 94.7 | 97.4 |
| Specificity (%) | 98.0 | 98.1 | 97.6 | 97.7 | 98.5 | 98.0 |
| Sensitivity (%) | 99.4 | 99.0 | 99.3 | 97.8 | 84.1 | 95.9 |
| Precision (%) | 94.7 | 94.8 | 93.5 | 94.0 | 95.3 | 94.4 |
As represented in Figure 1, by using the data classified as “walking” data from this first classification step, a second classifier for placement site recognition was validated. The LOSO approach was applied for both classifiers: they were trained on data from all participants except the data from the tested participant. Row 4 of Table 3 shows placement site classification results based on the data automatically classified as walking, without being familiar with the location of the sensor; Table 4 part B shows the confusion matrix for this recognition task.
3.3 Improving recognition reliability using soft assignment
To improve the reliability of the placement detection system, it is possible to abstain from classification in cases where results would be too uncertain. In our case, the uncertainty measure is given by the output of the classifier with soft-assignment capabilities (SVM+logistic): if the highest value of probability is lower than a fixed threshold, the classification is discarded.
Figure 2 (column 1) illustrates how overall recognition accuracy in the placement recognition task changes when the value of the threshold is increased. Figure 2 (column 2) shows the percentage of data that was discarded when varying the threshold, and Figure 2 (column 3) represents the relationship between the discarded data and obtained accuracy in the same threshold conditions. The figure illustrates how the rejection of uncertain data did not impact classification accuracy improvement equally across different sensor placement sites.
Figure 2.
Impact of soft assignment on the body placement recognition classification problem, showing accuracy (first column) and percentage of rejected windows (second column) when varying the probability threshold. The relationship between rejected data and overall accuracy of the placement site classifier is also shown (third column). In the first row, overall results are reported, followed by single site outcomes in rows two to six.
Based on the results in Figure 2, we selected a probability threshold of 0.8 to balance overall accuracy and the expected rejection rate. That threshold yielded a significant accuracy improvement at the expense of the rejection of some data windows (less than 30%, on average). Of note is that, when the value of the threshold was specified at 1, the amount of discarded data grew substantially, in particular at the hip and arm placement sites (see Figure 2). A 0.8 threshold results in a 91.2% LOSO overall accuracy on placement recognition, with 29.2% of windows labeled as uncertain. Results are reported in the confusion matrix in Table 4 part C.
Results confirmed that hip and arm sites are more difficult to recognize; however, accuracy significantly improved for these locations after discarding uncertain data. The rejected fraction of windows for each site at the 0.8 threshold is reported in Table 6, which confirms that windows consisting of data from the hip or arm are difficult to classify.
Table 6.
Percentage of rejected windows at each site, with mean and standard deviation values of the number of consecutive rejected windows. This number corresponds to the expected latencies, for each placement site.
| Rejected windows (%) | Consecutive rejected windows (m. ± s. d.) | Latency < 1 minute (%) | |
|---|---|---|---|
| Ankle | 5.1 | 1.8 ± 2.0 | 95.1 |
| Thigh | 17.2 | 2.7 ± 4.5 | 92.4 |
| Hip | 59.3 | 5.4 ± 9.2 | 79.9 |
| Arm | 63.0 | 5.0 ± 9.4 | 82.2 |
| Wrist | 34.1 | 2.6 ± 3.6 | 92.7 |
The downside to rejecting some windows is that this strategy needs more time to identify the location of a sensor. To understand how much latency can be expected in online conditions by varying the uncertainty threshold, distributions of expected delays in assigning a classification outcome for each of the 5 placement sites were evaluated. The amount of consecutive walking data that were discarded was typically low (see Table 6). In most cases, less than 6 windows classified as walking (corresponding to 1 minute of walking classified data) were needed to achieve a reliable sensor location estimate.
3.4 Offline approach: application of the voting strategy
A majority voting strategy was used to obtain a single outcome for each available trial (n = 164 unique person/location walking classified datasets of mean length 17.2 minutes) so results could be compared to prior studies. As shown in Table 4 part D, overall 92.7% of placements in the dataset were recognized correctly. These results were obtained by considering a vote for each of the classification outcomes of the person/location dataset running LOSO validation. By using the votes from the results of a 10-fold cross validation, as in prior work (e.g., [25, 29]), the overall accuracy increased to 96.3%. In particular, with 10-fold cross-validation, the validation method used in prior studies, 100% recognition accuracy was achieved for all placement sites, with the exception of the arm. LOSO validation, however, should approximate more closely performance under real-world circumstances.
4. Discussion
In the first part of the work, it was confirmed that it is advisable to take into consideration walking activity data (see Table 3) to recognize the placement site. LOSO validation results are shown for placement recognition using all available data, data labeled as non-resting, and data labeled as natural or treadmill walking. Our tests show strong improvement when focusing on ambulation data only. Starting from the consideration that walking is a frequent and highly-structured daily activity, others have found this a valuable strategy as well [24, 29].
Next, we confirmed that an algorithm can recognize walking reliably, without knowing where the sensor is located, as in [18]. Moreover, the results of the placement recognition task are not compromised when using automatically-classified walking data vs. manually-labeled walking data. As shown in Table 3, overall recognition accuracy when using the automatic walking detection decreased only by 0.7%. We demonstrated the feasibility of a fully automatic system for placement site recognition. The ankle and thigh locations were the best recognized sites, whereas hip and arm had the highest error rates.
By introducing a threshold on classification uncertainty, all error rates were reduced, with the drawback of introducing latency on sensor location estimates, which differs by location. For example, ankle classification was highly reliable; when removing less than 10% of data, recognition accuracies were close to 100%. On the other hand, the hip required rejection of ~85% of data to achieve best performance. As expected, the more different the motion of a particular part of the body is from the others during walking, the more difficult the site recognition appears to be.
The probability threshold value chosen (0.8) allowed high classification accuracy with reasonable latencies: during all online simulated tests, less than one minute of data classified as walking was sufficient in the majority of cases before a reliable guess could be made. Such a modest latency makes real-time implementation feasible. It is possible to envision a system that can quickly determine whether a sensor has been positioned incorrectly within about a minute of normal walking. This offers new opportunities to improve the performance of wearable-driven sensor systems. Because wearable systems are used in health research, automatic confirmation that the sensor has been positioned correctly is also of key significance.
The proposed methodology has been evaluated on a large dataset comprised of a complex vocabulary of activities people do in everyday life. If only consider overall accuracy of recognition of placement site, our method does not outperform previously published methods (see Table 1). However, it should be noted that most previous studies used n-fold cross-validation instead of LOSO validation, and they did so on less complex and much smaller datasets. When we used 10-fold cross validation for the placement site classifier s(with uncertain data rejection), as the prior work does, our algorithm achieved 96.4% accuracy, a marked improvement compared to the percentage (91.2%) obtained with LOSO. This work was performed on a 33-participant dataset that included a larger variety of activities (comprising many non-walking activities) than prior work (see Table 1). Finally, unlike some of the prior work, our solution is suitable for online implementation, given that the features used here do not require the evaluation of long data sequences, and their computational cost is reasonable even for smartphone processors. Moreover, once the algorithm has been trained (offline), classification can be carried out in real-time.
We used high sampling rates in our initial experiments because the data was available in our dataset. High sampling rates, however, increase memory and computational requirements. To determine whether the high sampling rates are necessary, we downsampled the dataset to 30 Hz – a rate more common with off-the-shelf sensing nodes or smartphones. No significant differences in walking recognition or placement site detection were observed using 30-Hz down-sampled data nor were any significant differences in latency introduced. It can be assumed that the information needed to classify the data windows with sufficient confidence is preserved by reducing the sampling rate to 30 Hz; hence, the computational costs can be reduced by limiting the sampling rate.
One limitation of this work is that although the dataset used for validation contains five body locations common to and important for health research, other locations may also be of interest. Prior work by Amini et al. [24] showed that small variations in position within the 6 main body regions (shin, thigh, waist, upper arm, forearm and head) did not lead to significant differences in features evaluated from data. Therefore, rather than testing more positions with less data for each position, we focus on gathering a larger amount of data on five locations covering each of the regions described by Amini et al., except for the head. These locations are known to be in use or important for clinical applications.Our dataset did not include test locations such as bags or pockets. In particular, we did not include locations used for carrying or holding smartphones in this work. Instead of considering a greater number of placement sites with less data per location, we preferred to test on larger amount of data generated from a complex set of activities that are relevant for clinical and telehealth applications. However, there is no reason why the approach described here could not be extended to smartphone locations in future works, provided that appropriate test datasets are collected. In addition to increasing the number and type of placement sites, we plan to include the assessment of computational costs and energy requirements of the proposed methodology, building suggestions in [36].
5. Conclusion
In conclusion, we demonstrate the feasibility of an automatic system for recognizing sensor placement sites by using a walking classifier and a placement site classifier together. The system is suitable for real-time implementation, where the location of a sensor could be determined under most conditions within one minute of walking. The results obtained were comparable to offline state of the art solutions, but they were obtained on a larger and more difficult dataset than in prior studies, using a more realistic cross-validation approach.
Acknowledgments
The authors have no conflicts of interest to disclose. This work and the data and sensors used was funded, in part, by the National Heart, Lung and Blood Institute, National Institutes of Health award #5UO1HL091737 (Stephen Intille, PI) and by the Italian Ministry of Education and Research under the research project PRIN 2010R277FT.The authors would like to thank Prof. William H. Haskell and Dr. Mary Rosenberger for their work collecting the original dataset.
Footnotes
Data
To facilitate replication, comparison and extension of this work, all the datasets and software used can be found at http://mhealth.ccs.neu.edu/datasets.
Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final citable form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.
References
- 1.Bao L, Intille SS. Activity recognition from user-annotated acceleration data. Pervasive. 2004;301:1–17. [Google Scholar]
- 2.Karantonis DM, Narayanan MR, Mathie M, Lovell NH, Celler BG. Implementation of a real-time human movement classifier using a triaxial accelerometer for ambulatory monitoring. IEEE Transactions on Information Technology in Biomedicine. 2006 Jan;10:156–67. doi: 10.1109/titb.2005.856864. [DOI] [PubMed] [Google Scholar]
- 3.Lee SH, Park HD, Hong SY, Lee KJ, Kim YH. A study on the activity classification using a triaxial accelerometer. Proc. of the IEEE Engineering in Medicine and Biology Society Meeting (EMBC); 2003; pp. 2941–2943. [Google Scholar]
- 4.Anguita D, Ghio A, Oneto L, Parra X, Reyes-Ortiz JL. Ambient Assisted Living and Home Care. Springer; 2012. Human activity recognition on smartphones using a multiclass hardware-friendly support vector machine; pp. 216–223. [Google Scholar]
- 5.Kwapisz JR, Weiss GM, Moore SA. Activity recognition using cell phone accelerometers. ACM SIGKDD Explorations Newsletter. 2011;12:74–82. [Google Scholar]
- 6.Staudenmayer J, Pober D, Crouter S, Bassett D, Freedson P. An artificial neural network to estimate physical activity energy expenditure and identify physical activity type from an accelerometer. Journal of Applied Physiology. 2009 Oct;107:1300–7. doi: 10.1152/japplphysiol.00465.2009. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Spierer DK, Hagins M, Rundle A, Pappas E. A comparison of energy expenditure estimates from the Actiheart and Actical physical activity monitors during low intensity activities, walking, and jogging. European Journal of Applied Physiology. 2011 Apr;111:659–67. doi: 10.1007/s00421-010-1672-7. [DOI] [PubMed] [Google Scholar]
- 8.Swartz AM, Strath SJ, Bassett DR, O'Brien WL, King Ga, Ainsworth BE. Estimation of energy expenditure using CSA accelerometers at hip and wrist sites. Medicine & Science in Sports & Exercise. 2000 Sep;32:S450–S456. doi: 10.1097/00005768-200009001-00003. [DOI] [PubMed] [Google Scholar]
- 9.Chen KY, Sun M. Improving energy expenditure estimation by using a triaxial accelerometer. Journal of Applied Physiology. 1997 Dec;83:2112–22. doi: 10.1152/jappl.1997.83.6.2112. [DOI] [PubMed] [Google Scholar]
- 10.Bouten CV, Koekkoek KT, Verduin M, Kodde R, Janssen JD. A triaxial accelerometer and portable data processing unit for the assessment of daily physical activity. IEEE Transactions on Biomedical Engineering. 1997 Mar;44:136–47. doi: 10.1109/10.554760. [DOI] [PubMed] [Google Scholar]
- 11.Albinali F, Intille SS, Haskell W, Rosenberger M. Using wearable activity type detection to improve physical activity energy expenditure estimation. Proc. of the Int'l Conf. on Ubiquitous Computing (UbiComp); Copenhagen, Denmark. 2010; pp. 311–320. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Rueterbories J, Spaich EG, Larsen B, Andersen OK. Methods for gait event detection and analysis in ambulatory systems. Medical Engineering & Physics. 2010;32:545–552. doi: 10.1016/j.medengphy.2010.03.007. [DOI] [PubMed] [Google Scholar]
- 13.Brajdic A, Harle R. Walk Detection and Step Counting on Unconstrained Smartphones. Proc. of the Int'l Conf. on Ubiquitous Computing (UbiComp); 2013. [Google Scholar]
- 14.Mayagoitia RE, Lotters JC, Veltink PH, Hermens H. Standing balance evaluation using a triaxial accelerometer. Gait and Posture. 2002 Aug;16:55–9. doi: 10.1016/s0966-6362(01)00199-0. [DOI] [PubMed] [Google Scholar]
- 15.Kangas M, Konttila A, Winblad I, Jamsa T. Determination of simple thresholds for accelerometry-based parameters for fall detection. Proc. of the IEEE Engineering in Medicine and Biology Society Meeting (EMBC); 2007; pp. 1367–70. [DOI] [PubMed] [Google Scholar]
- 16.Bourke AK, O'Donovan KJ, Olaighin G. The identification of vertical velocity profiles using an inertial sensor to investigate pre-impact detection of falls. Medical Engineering and Physics. 2008 Sep;30:937–46. doi: 10.1016/j.medengphy.2007.12.003. [DOI] [PubMed] [Google Scholar]
- 17.Shan S, Yuan T. A wearable pre-impact fall detector using feature selection and support vector machine. Proc. of the Int'l Conf. on Signal Processing (ICSP); 2010; pp. 1686–1689. [Google Scholar]
- 18.Kunze K, Lukowicz P. Sensor placement variations in wearable activity recognition. Pervasive Computing, IEEE. 2014;13:32–41. [Google Scholar]
- 19.Troiano R, Mc Clain J. Objective measures of physical activity, sleep, and strength in U.S. National Health and Nutrition Examination Survey (NHANES) 2011–2014. 8th Internat Conf on Diet and Activity Methods; Roma, Italy. 2012. [Google Scholar]
- 20.U. B. C. Centre. Addendum to main study protocol, ed. Stockport Cheshire. 2009. Category 2 enhanced phenotyping at baseline assessment visit in last 100–150,000 participants. [Google Scholar]
- 21.Alanezi K, Mishra S. Technical report. University of Colorado Boulder; 2013. Impact of smartphone position on sensor values and context discovery. [Google Scholar]
- 22.Dunton GF, Dzubur E, Kawabata K, Yanez B, Bo B, Intille S. Development of a smartphone application to measure physical activity using sensor-assisted self-report. Frontiers in Public Health. 2014;2:12. doi: 10.3389/fpubh.2014.00012. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Mannini A, Intille SS, Rosenberger M, Sabatini AM, Haskell W. Activity recognition using a single accelerometer placed at the wrist or ankle. Medicine & Science in Sports & Exercise. 2013;45:2193–2203. doi: 10.1249/MSS.0b013e31829736d6. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Amini N, Sarrafzadeh M, Vahdatpour A, Xu W. Accelerometer-based on-body sensor localization for health and medical monitoring applications. Pervasive and Mobile Computing. 2011;7:746–760. doi: 10.1016/j.pmcj.2011.09.002. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Weenk D, van Beijnum BJF, Baten CT, Hermens HJ, Veltink PH. Automatic identification of inertial sensor placement on human body segments during walking. Journal of Neuroengineering and Rehabilitation. 2013;10:31. doi: 10.1186/1743-0003-10-31. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Fujinami K, Jin C, Kouchi S. Tracking on-body location of a mobile phone. Proc. of the Int'l Symposium on Wearable Computing (ISWC); 2010; pp. 190–197. [Google Scholar]
- 27.Shi Y, Shi Y, Liu J. A rotation based method for detecting on-body positions of mobile devices. Proc. of the Int'l Conf. on Ubiquitous Computing (UbiComp); 2011; pp. 559–560. [Google Scholar]
- 28.Wiese J, Saponas TS, Brush AB. Phoneprioception: enabling mobile phones to infer where they are kept. Proc. of the SIGCHI Conference on Human Factors in Computing Systems; 2013; pp. 2157–2166. [Google Scholar]
- 29.Kunze K, Lukowicz P, Junker H, Tröster G. Location-and Context-Awareness. Springer; 2005. Where am I: Recognizing on-body positions of wearable sensors; pp. 264–275. [Google Scholar]
- 30.Intille SS, Albinali F, Mota S, Kuris B, Botana P, Haskell WL. Design of a wearable physical activity monitoring system using mobile phones and accelerometers. Proc. of the IEEE Engineering in Medicine and Biology Society Meeting (EMBC); Boston, Massachusetts USA. 2011; [DOI] [PMC free article] [PubMed] [Google Scholar]
- 31.Zhang S, Rowlands AV, Murray P, Hurst TL. Physical activity classification using the GENEA wrist-worn accelerometer. Medicine & Science in Sports & Exercise. 2012;44:742–748. doi: 10.1249/MSS.0b013e31823bf95c. [DOI] [PubMed] [Google Scholar]
- 32.Vapnik V. The Nature of Statistical Learning Theory. New York: Springer; 2000. [Google Scholar]
- 33.Chang C-C, Lin C-J. LIBSVM : A library for support vector machines. ACM Transactions on Intelligent Systems and Technology. 2011;2:1–27. [Google Scholar]
- 34.Jain AK, Duin RPW, Mao J. Statistical Pattern Recognition: A Review. IEEE Transactions on Pattern Analysis and Machine Intelligence. 2000;22:4–37. [Google Scholar]
- 35.Esterman M, Tamber-Rosenau BJ, Chiu YC, Yantis S. Avoiding non-independence in fMRI data analysis: Leave one subject out. NeuroImage. 2010;50:572–576. doi: 10.1016/j.neuroimage.2009.10.092. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Saeedi R, Schimert B, Ghasemzadeh H. Cost-sensitive feature selection for on-body sensor localization. Proceedings of the 2014 ACM International Joint Conference on Pervasive and Ubiquitous Computing: Adjunct Publication; 2014; pp. 833–842. [Google Scholar]


