Introduction

Physical activity (PA) plays an important role in the health of individuals with spinal cord injury (SCI). PA is a protective factor that reduces the risk of illnesses such as cardiovascular disease and type II diabetes1, 2, 3 and other common comorbidities in this population (for example, pressure ulcers).4, 5

An appropriate method of quantifying PA levels in individuals with SCI during their daily activities is essential for several reasons.6 First, these methods may be used in epidemiological studies to establish more precisely the effects of PA on their health. Second, it can be used to monitor the effectiveness of PA promotion programs in this population. Finally, with the appropriate hardware and software, those suffering from SCI may carry out continuous control of their energy expenditure and thereby adjust their physical and nutritional habits to achieve a healthy lifestyle.

Accelerometers are currently the devices most commonly used to measure PA, although other methods such as heart rate7, 8 and questionnaires9, 10 have been validated for people with SCI. Early studies quantified PA by estimating energy expenditure. However, recent works estimate not only energy expenditure, but also the type of activity being carried out, according to the acceleration pattern produced,11, 12, 13, 14, 15, 16 important in studies on the SCI population. The performance of certain activities could either prevent or aggravate certain health problems (for example, shoulder pain).17, 18

Although studies have been published that establish the necessary mathematical models for estimating types of physical activities,11, 12, 13, 14, 15, 16 few of them have tackled this problem in subjects with SCI. Specifically, Postma et al.,19 using a total of six accelerometers, were able to identify wheelchair propulsion from other activities (for example, lying down, body transfer, doing dishes…). Their classifier achieved an accuracy of 92%. Later, Hiremath et al.20 classified the type of activity performed by SCI subjects using accelerometry, galvanic skin response, skin temperature and near-body temperatures. They were able to distinguish between resting, propulsion, arm-ergometer and deskwork, with an accuracy of 96.2% using quadratic discriminant analysis (QDA). Although four types of activities were included in this latter study, a broader study needed to be carried out in order to identify a wider range of activities. Therefore, the aims of the present work were:

  1. 1

    To develop and test classification algorithms to identify (1) 10 individual activities and (2) 5 grouped activities, performed by manual wheelchair users with SCI equipped with accelerometers.

  2. 2

    To establish the minimum number of accelerometers needed for a given accuracy for each application.

Materials and methods

Participants

A total of 20 subjects took part in the study [40.03 (10.57) years, 75.8 (17.54) kg and 1.76 (0.09) m]. The researchers recruited participants from two different institutions: (1) Hospital la Fe of Valencia and (2) Asociación Provincial de Lesionados Medulares y Grandes Discapacitados (ASPAYM). The subjects had suffered spinal damage between the T2 and L5 vertebrae, and had been diagnosed at least 1 year before the start of this study. The level and completeness of the SCI (Table 1) were determined by a complete neurological examination conducted by a medical specialist, using the American Spinal Injury Association Impairment Scale. Their independence status expressed as mean (s.d.) was 65.3 (7.61). This independence measurement was determined using Spinal Cord Independence Measure version III.21

Table 1 Subject’s characteristics

The exclusion criteria were: (1) history of depressive or cognitive disorders; (2) posttraumatic cervical myelopathy, (3) motor or sensory impairment of the upper extremities, (4) ischemic heart disorder or recent osteoporotic fractures; (5) presence of tracheotomy; or (6) sacrotuberous ulcers or hypertension.

All the subjects gave written consent to participate in the study that was previously approved by the university’s ethical committee. We certify that all applicable institutional and governmental regulations concerning the ethical use of human volunteers were followed during the course of this research.

Data collection

The subjects were asked to perform 10 physical activities (using their own wheelchair): lying down, body transfers, moving items, mopping, working on a computer, watching TV, arm-ergometer exercise, passive propulsion, slow propulsion and fast propulsion. A detailed description of each activity can be found in a previous study.22 Each activity was carried out for 10 min with 1–2 min of rest between activities, with only one exception in the case of body transfers, in which the activity took place for 1 min followed by 1 min of rest for a total of 10 min to avoid overloading the shoulder musculoskeletal system. All these measurements have been supervised by the same researcher to ensure the successful completion of these activities.

During these activities, body forces were monitored by four accelerometers (Actigraph model GT3X, Actigraph, Pensacola, FL, USA) having the sampling frequency of 30 Hz. A bandpass digital filter between 0.25 and 2.5 Hz was implemented in order to reduce the influence of the static acceleration and the higher frequency components (manufacturer hardware characteristic). Then, the accelerations (expressed in counts) were rectified and integrated in 1-s epochs. The accelerometers were placed one on each wrist, one on the nondominant waist and on the nondominant side of the chest (Figure 1). Elastic belts were used in order to minimize movements of the accelerometers, and the spatial orientation was similar in all the subjects.

Figure 1
figure 1

Location of the accelerometers.

Signal processing

The Matlab R2012a (Mathworks Inc., Natick, MA, USA) was used for signals processing. We worked out 14 variables for each axis (that is, X, Y, Z and resultant vector) at 4, 5, 6 and 7 min for each activity.

The s.d., variance and the 10th, 25th, 50th, 75th and 90th percentiles, interquartile range and the range between the 10th and 90th percentiles were calculated in the time domain. The lag-one correlation of each min was also worked out as a measure of temporal dynamics.15

The acceleration signal was analyzed using the two-level wavelet transform, the mother wavelet being Daubechies 2.23 We calculated the Euclidean norm of the detail coefficients of the first and second levels of resolution and the approximation coefficients of the second level (that is, ND1, ND2, NA2).

The sample entropy was computed for each axis (tolerance=0.3 s.d.; patter length=2).24 Finally, we computed the cross-correlation between the three orthogonal axes (that is, x–y, y–z and x–z cross-correlations).25 The total number of variables was 59 for each accelerometer (that is, 14 variables for the four axes and three variables for the correlation between axes).

Data analysis

Classifiers were designed for individual activities and grouped activities; those for individual activities had 10 possible categories (that is, each activity performed) and grouped activities had 5 categories (Table 2), established according to the activity’s objective or function.

Table 2 Individual and grouped activities

In order to determine the required number of accelerometers to properly identify the activities or groups of activities, the data from several accelerometers were combined. The configurations tested were: (1) dominant wrist accelerometer, (2) nondominant wrist accelerometer, (3) both wrist accelerometers and (4) all four accelerometers.

The first step was to split the database (800 data=20 subjects × 10 PAs × 4 min per PA) into two data sets (Figure 2). One was used to train and validate the classifiers (n=640) and the other to test them (n=160). We checked that there were no statistically significant differences in the computed variables between data sets by means of the Wilcoxon rank sum test (P>0.05) and that the percentage of cases of each activity was the same in both data sets.

Figure 2
figure 2

Schematic overview of the process to obtain the individual activity classifiers. The process is the same for individual and grouped activity classifiers.

A principal component analysis was then applied to reduce the dimensions of the data matrix parameters. This analysis was applied to the training set of the above-cited four combinations of accelerometers. These databases were reduced from 59, 59, 118 and 236 variables, respectively to 22, 22, 41 and 78 principal components (99% of the variance was maintained). The coefficients of this analysis of the training set were applied to the test set so as to obtain the principal components of these data. The principal components of the two data sets were used as inputs in the subsequent analysis.

We used three different machine learning algorithms to design the classifiers:26 linear discriminant analysis, QDA and support vector machines (SVMs). The classifiers were designed and validated using a 10-fold stratified cross-validation that was performed 20 times to reduce the randomization effect. The optimal combination of variables was determined using a forward sequential feature selection algorithm that included only those variables that significantly improved classifier accuracy. The feature selection algorithm stopped when the addition of any new variable did not improve classifier accuracy by 0.5%. Once the classifiers were designed with the training set, we applied them to the test set and computed the classification accuracy:

Results

Table 3 shows the accuracy of the different classifiers implemented in the test set using the information from the different accelerometer configurations to distinguish each of the 10 individual activity types. As expected, it can be seen that in general the accuracy of the classifier improves as the number of accelerometers increases. However, the accuracy obtained is always <75%, regardless of the number/position of the accelerometer and the classification algorithm used.

Table 3 Accuracy of the individual activities classifiers

Figure 3 shows the accuracy of the individual activity classifiers in each of the 10 categories. It can be observed that in many activities accuracy values near or above 90% are achieved, particularly when two or four accelerometers are used. However, some activities (for example, PC work or passive propulsion), which could be confused with each other, have particularly low accuracy values, giving a slightly low overall accuracy value for the classifier.

Figure 3
figure 3

Accuracy of the classifiers for individual activities with the algorithms: (top) linear discriminant analysis, (middle) quadratic discriminant analysis and (bottom) support vector machines.

On the other hand, the grouped activity classifiers showed good accuracy in all cases (between 83.2 and 93.6%; Table 4). Again, it can be seen that in general, the higher the number of accelerometers, the higher the classification accuracy. In contrast, the classification algorithm does not seem to significantly influence the prediction capability. It is noteworthy that there are three classifiers with accuracy values above 90%: (1) two wrists with QDA, (2) all with QDA and (3) all with SVMs.

Table 4 Accuracy of the grouped activities classifiers

The accuracy of the classifiers for each category is shown in Figure 4. It can be observed that those with the lowest values are body transfers and locomotion. It is also noteworthy that the accuracies of the body transfer and housework categories seem to be the most dependent on the number of accelerometers used, whereas the accuracy of the other three categories is fairly stable, regardless of the number of accelerometers and algorithms used.

Figure 4
figure 4

Accuracy of the classifiers for grouped activities with the algorithms: (top) linear discriminant analysis, (middle) quadratic discriminant analysis and (bottom) support vector machines.

Finally, Table 5 shows the confusion matrix of the QDA classifier for grouped activities that uses information from the accelerometers on both wrists. As shown, the rate of properly classified sedentary activities is very high (93.75–100%) and only 6.25% of the cases of working with computers or passive propulsion are misclassified. The classification error in the locomotion category is mainly because of the fact that the slow propulsion activity is misclassified as housework in 39.34% of cases. In the housework category, high accuracy values are observed for both activities. Of the cases, 90.56% of the moving items cases and 85.94% of the mopping cases were properly classified; 14.41% of the transferring activity cases were misclassified as housework. Finally, it is noteworthy that 100% accuracy is reached in moderate physical activity

Table 5 Confusion matrix of the QDA classifier, implemented using information from two accelerometers placed in both wrists for grouped activities

Discussion

In the present work we designed and implemented several classifiers using only recordings from accelerometers in SCI patients to distinguish (1) 10 individual activities and (2) 5 categories of grouped activities according to the activity’s aim or function. None of the classifiers obtained an overall accuracy of >73% in identifying the 10 activities, regardless of the number of accelerometers and the algorithm used. The relatively low values are most likely because of the fact that some of the activities shared similar patterns, for example, watching television, working with a PC or passive propulsion. Additional information would be needed to overcome this limitation.

When the activities were grouped by their aim or function, promising results were obtained. In general, it has been observed that the more accelerometers used, the higher the classifier accuracy. Three classifiers were obtained with an average accuracy of >90%: (1) two wrists with QDA, (2) all with QDA and (3) all with SVMs. In configurations (2) and (3), the use of four accelerometers did not provide a significant increase in the accuracy of the classifier using the QDA algorithm. Compared with configuration (3), classifier (1) has the advantage that the QDA algorithm is computationally much more efficient and could be easily implemented in a real-time system. Moreover, using only two accelerometers greatly simplifies the recording protocol and also improves patient comfort during recording. This suggests that the optimal setting of the classifier to distinguish the five categories of SCI activities tested was obtained with the QDA algorithm and the accelerometers on both wrists.

Sedentary activities and moderately intensive physical activities obtained good rates of correct classification (always >93.75%). These results are comparable with those of other authors who obtained 92% accuracy in distinguishing different activities in SCI patients.19 However, in this latter study, six accelerometers were used and only two categories were classified: two types of wheelchair propulsion versus other activities: lying down, body transfer and doing dishes.19 The accuracy values obtained in the present work are similar to those obtained by other authors:20 it obtained 96.2% in identifying four types of activities (rest, deskwork, arm-ergometer and propulsion). Unlike other authors who used input variables of acceleration, galvanic skin response, skin temperature and near body,20 in the present work only acceleration data (from the two wrists) were used.

On the other hand, the accuracy values obtained for the activity recognition systems in SCI patients compare favorably with those published regarding the able-bodied population. Trost et al.16 obtained 88.4% accuracy in classifying activities clustered into the following categories: sedentary, light household activities and games, household activities and moderate-to-high-intensity sports, walking and running. In addition, in this context, Khan et al.12 reached 97.9% of properly classified recording time in the following activities: lying, standing, walking and running. Liu et al.13 combined several sensors (two accelerometers and a flow meter) and achieved 84.7% correct classification in 13 different activities. Therefore, the activity recognition systems proposed in the present study show similar accuracy to those in other populations when considering groups of similar activities.

It is remarkable that the grouped activities classifier, employing the recordings from two accelerometers with the QDA algorithm, often identified some locomotion activities, such as housework. In spite of the fact that rapid propulsion was correctly distinguished from other household chores, probably because of the greater magnitude of the accelerations, slow propulsion was misclassified as housework in 39.34% of cases. This may be because while performing household tasks (mopping or moving objects) the subjects had to propel the wheelchair at a slow speed (similar to slow propulsion). The inclusion of additional parameters that take into account the temporal structure of the data or the variation of the spectral parameters over time could help to improve accuracy in these cases.

Finally, this study has some limitations. First, it would be advisable to expand the database in terms of the numbers of both subjects and activities. Second, although some extent of variability has been included in the data used to design the classifiers as participants used their own wheelchair that could have different dynamic responses for each of the movements, the physical activities were carried out in a controlled environment, following the instructions of a supervisor, with a break between activities so as to minimize fatigue. Future studies should confirm the good results obtained in this work in conditions closer to everyday life. In such conditions, events such as transitions between activities, the type or inclination of the surfaces and so on could worsen classification accuracy. In summary, we believe that this work provides the basis for a minimally intrusive expert system that would monitor daily physical activity in SCI subjects, for whom monitoring is of great significance.

In short, the highest accuracy values (83.2–93.6%) were those obtained on activities grouped according to objective or function. Classifiers of individual activities showed lower classification accuracy (55–72.5%). The best performance was obtained from four accelerometers and QDA or SVM algorithms. However, an activity recognition system with good accuracy (>90%) was also achieved with only two accelerometers and the QDA algorithm. Because of the fact that two accelerometers are less stressful for the subject, it would be useful to implement this system in future studies to identify activities in subjects with SCI.