Sensor Selection for Classification of Physical Activity in Long-Term Wearable Devices

Classification of physical activity based on the k-NN algorithm is assessed with different combinations of sensors (from accelerometer, gyroscope, barometer) with respect to classification accuracy, power consumption and computation time. For that purpose, a wearable sensor platform is proposed and a study with 20 subjects is conducted. The combination of accelerometer and barometer is found to provide the best trade-off for the three criteria: It provides an F1 score of 94.96 ± 1.73 %, while computation time and power consumption are reduced by 45 % and 88 %, respectively, compared to the full sensor set.


I. INTRODUCTION
For monitoring of chronic diseases such as congestive heart failure (CHF) or chronic obstructive pulmonary disease (COPD), physical activity can serve in a twofold way: as a marker of health status itself due to adaptation of a person's daily activities to its physical fitness; and as context information for other measurement quantities, e. g. for evaluation of heart rate or shortness of breath based on the current physical load (see, e. g., [1]- [3] and the NYHA classification of CHF [4]).
When such an activity classification module shall be developed for wearable devices in long-term use, accurate classification is one of the major requirement but not the only one: Energy efficiency for the sake of long wearing times depends on the power consumption of the sensors in use and on the amount of data that has to be transmitted to off-body data hubs.To keep the transmitted data low, on-board real-time classification is needed, hence, computation time is critical.
Therefore, we here compare the effect of sensor selection on the described requirements classification accuracy, energy consumption and computation time.Different combinations of sensors out of accelerometer, gyroscope and barometer are evaluated for typical activities from daily life: standing, walking, walking stairs and jogging.In future projects, the proposed activity classification module shall be combined with a mobile communication platform and additional sensors for ECG and heart/lung sounds as proposed by the authors [5]- [9].

A. Sensor Platform
The wearable sensor platform is based on an Arduino Micro, which contains the ATmega32U4 microcontroller (Microchip Technology).Data is provided via I2C by the 10 DOF sensor module GY86, which comprises the high-resolution barometric pressure sensor MS5611 (TE Connectivity; range 10 mbar to 1200 mbar) as well as the MPU6050 (InvenSense Inc.) 3D accelerometer and 3D gyroscope, with ranges ±4 g and ±500 °s−1 selected, respectively.The magnetic field sensor, which is also contained in the GY86, was not used.For data storage the microSD breakout board+ (Adafruit) was connected via SPI.Sensor sampling rate is limited by the writing speed on the SD card and amounted to 28 s −1 .The entire platform is fixed at the test subject's upper body by use of a chest band (see Fig. 1).
The sensors are calibrated at the beginning of each measurement with the platform fixed at the test subject and the person taking an upright body position for 1 s.
Energy is provided by a mobile power bank, which is fixed at the test subject's hip during measurement.
The study protocol was divided into two parts, which provided the training and test data and had an approximate duration of 20 min and 30 min, respectively.Both protocol stages comprised several phases of the activities standing in upright position, walking in the flat, walking upstairs, walking downstairs and jogging.
From both accelerometer and gyroscope, the three vector components and the absolute value of the 3D vector were obtained as measurement variables, as well as barometric pressure.This gives nine variables in total.
1) Data Preprocessing: Barometric pressure was smoothed by use of a Savitzky-Golay filter with width 121 samples and degree 1.
6) Parameter Optimization: The free parameters were optimized with respect to the F1 score [30] which combines the two common measures of classification accuracy, sensitivity S and precision For a given activity A, TP denotes the number of A windows that were correctly classified as A ("true positives"), FP the number of non-A windows that were falsely classified as A ("false positives") and FN the number of A windows that were falsely classified as non-A ("false negatives").

7) Computation time:
Computation time for each classification with a given parameter set was determined.In order to obtain a hardware-independent quantity, absolute computation time was normalized by the computation time for the full sensor set at optimal parameters (see section III with Tab.I).

D. Power consumption
The power consumed was derived from the data sheets of the senors for normal operating mode [31], [32].

III. RESULTS
Optimization with all three sensors gave an optimal window width and overlap of 112 samples and 90 %, respectively.For the optimizations with a reduced sensor set, these parameters were kept fixed.
The results of the optimization of all remaining free parameters are summarized in Tab.I.With the optimal parameter set in the full sensor set a total F1 score of (95.71 ± 1.76) % with sensitivity (96.52 ± 1.72) % and precision (94.93 ± 2.00) % is obtained.While the activities standing and jogging are well classified, distinguishing between the different ways of walking is more challenging and leads to lower classification performance.
With a reduced sensor set, classification performance worsens as expected.However, when the accelerometer together with either gyroscope or barometer is used, nearly the same accuracy is reached, with total F1 score, sensitivity and precision decreased by less than 1 %.With a single sensor, a total F1 score of 91 % for accelerometer and gyroscope and of 62 % for barometer is obtained.
Power consumption strongly depends on the sensor set used.With about 12 mW, consumption of the gyroscope is by a factor 7.2 larger than the accelerometer and even four orders or magnitude larger than the barometer.
Computation time is reduced by up to 61 % with accelerometer only and by 45 % and 46 % with accelerometer plus barometer and gyroscope plus barometer, respectively.A general trend, however, cannot be observed; instead, computation depends on the specific sensor set and its optimized parameters.

IV. CONCLUSION
Sensor selection determines classification accuracy and computation time and has a large effect on power consumption: Leaving out the gyroscope reduces energy consumption by 88 % and computation time by 45 %, while F1 score, sensitivity and precision are decreased by less than 1 %.Power consumption can further be decreased by using the barometric sensor only, yet at the expense of a considerable worsening of classification performance (F1 score 62.08 %).Hence, the sensor combination of accelerometer and barometer provides the best trade-off concerning classification accuracy, computation time and power consumption in our setup.
After fixing a specific sensor set, the three performance factors can be further tuned by adapting the free parameters of the classification algorithm.

Fig. 1 .
Fig. 1.Wearable sensor platform fixed at a test subject's upper body.
: (1) linear normalization on range [−1, 1]; (2) linear normalization on range [0, 1]; (3) standardization. 69 ; G: gyroscope; P: barometric pressure b n. i. (no improvement): Full number of features used, as neither algorithm for feature selection provided an improved F1 score with reduced number of features.c Values given as mean ± standard deviation.d Computation time normalized on the computation time of the full sensor set (A+G+P).

TABLE I OPTIMIZATION
RESULTS FOR DIFFERENT SENSOR COMBINATIONS.