Abstract
Human activity recognition based on wireless body area networks plays an essential role in various applications such as health monitoring, rehabilitation, and physical training. Currently, most of the human activity recognition is based on smartphone, and it provides more possibilities for this task with the rapid proliferation of wearable devices. To obtain satisfactory accuracy and adapt to various scenarios, we built a smart-belt which embedded the VG350 as posture data collector. This article proposes a hierarchical activity recognition structure, which divides the recognition process into two levels. Then a multi-classification Support Vector Machine algorithm optimized by Particle Swarm Optimization is applied to identify five kinds of conventional human postures. And we compare the effectiveness of triaxial accelerometer and gyroscope when used together and separately. Finally, we conduct systematic performance analysis. Experimental results show that our overall classification accuracy is 92.3% and the F-Measure can reach 92.63%, which indicates the human activity recognition system is accurate and effective.
Keywords
Introduction
Wireless body area networks (WBANs)1,2 consist of small movable, communication ability sensors and a body master station (or BAN (Body Area Network) coordinator). Each sensor can be worn or implanted in the body.3,4 In recent years, with the development of microelectronic technology, wearable, implantable, and intrusive healthcare devices have emerged such as blood-oxygen sensors worn at the fingertips, watch-type sleep quality measurer, and implantable identification components. And the fifth generation communication system will support higher capacity and more user access. Without the body area networks, these sensors and actuators can only work independently, so the communication resources cannot be effectively utilized. In the application of body area networks, the recognition of human activity is a strong support to realize health monitoring, 5 rehabilitation, and physical training. 6 Therefore, it is necessary to design a human activity recognition system with high recognition accuracy.
Human activity recognition based on WBANs utilizes wearable sensors to collect the activity data mostly, then analyzes and processes the data to find the discriminative features that contribute to complete the recognition. Human activity recognition has many potential applications. First, in the aspect of health monitoring, it is possible to make more effective healthcare by recognizing abnormal posture such as fall and tremble. Second, in rehabilitation and physical training, human activity recognition can be used as technical foundation and assistant devices of the limb recovery system, and sports training process like the learning of golf-related actions. At present, there are two primary methods of activity recognition: vision-based and sensor-based. The technique of activity recognition based on vision appears earlier, most of which are recorded by camera, such as typical of Kinect designed by Microsoft. 7 Although many efficient technologies were proposed in recent years, this kind of method still faces many challenges. The equipment is expensive, and the influence of light, even the target size and the color of the clothes, will have an impact on activity recognition, which restricts the development of vision-based method. With the development of technology and the improvement of manufacturing, inertial sensors become smaller, lighter, lower price, and higher accuracy. The activity recognition based on inertial sensors develops rapidly. This method replaces the vision-based process because of the following advantages: (1) The inertial sensor is small enough to embed in a smartphone or other wearable devices, and now the activity recognition is mostly based on smartphone and wearable devices;8–10 and (2) the inertial sensor has a lower demand for environmental condition, the performance is stable, and the measurement error is small. Therefore, it is more reliable than the vision-based.
We choose the smart-belt instead of smartphone as a carrier for information collection for the following two considerations: the location of the belt is determinate, and the position of the smartphone is more changeable. Some people used to hold it in their hands, whereas others like to put it in the pockets, which brings great difficulties in activity recognition. The other is energy consumption, and the blowout of mobile applications brought enormous energy consumption troubles; it is difficult for a smartphone to support the power consumption of activity recognition system additionally. But the smart-belt can solve this problem well because of the functional specificity. This article presents a hierarchical structure of human posture recognition, which divides human posture into static posture and dynamic posture at first level, and in the second degree, five kinds of daily activities (sit, stand, squat, walk, and jump) were recognized, respectively. The architecture is superior to the others, which not only dramatically reduces computational complexity but also solves the problem of error transmission skillfully by using the characteristic of activity. The classification algorithm is another critical factor in the classification process; the standard classification algorithms are Neural Networks, Naive Bayesian, Random Forest, Support Vector Machine (SVM), and Decision Tree.11,12 SVM has the advantages of high fitting precision, strong learning ability, short training time, few choice parameters, good generalization ability, strong generalization ability, and global optimum which ensure the accuracy of human activity recognition. But the high dynamic of human posture data has higher requirements on the classifier. In our study, a multi-classification SVM optimized by Particle Swarm Optimization (PSO) is used to identify the human postures. We also explore the power of triaxial accelerometer and triaxial gyroscope in human activity recognition when they are used together or separately.
The remainder of the article is organized as follows. In the “Related work” section, related works are introduced. The “Data acquisition and preprocessing” section gives the details about data acquisition and preprocessing. The human activity recognition via smart-belt is presented in the “Activity recognition with smart-belt” section. The “Experimental results and analysis” section represents experimental results and analysis, and finally the “Conclusion” section concludes the article.
Related work
In this part, we briefly introduce the related researches on human activity recognition in WBANs.
Over the past few years, many technologies and approaches have been proposed for human activity recognition in WBANs. 13 Wang et al. 14 completed a comparative study on human activity recognition using inertial sensors in a smartphone, and a novel feature selection approach is proposed in their work. Chen and Shen make a comprehensive performance analysis of smartphone-sensor behavior for human activity recognition. In this article, a cycle detection algorithm is presented to segment the action data. 15 Garcia-Ceja et al. 16 use acceleration data from a wristwatch that aim to identify long-term activities and compare the utility of Conditional Random Fields and Hidden Markov Models for the segmentation task. DS Zois et al. 17 propose an energy-efficient, heterogeneous sensor selection for physical activity detection in WBANs. T Bhattacharya et al. 18 develop an application in remote healthcare monitoring using posture detection based on WBANs; in this article, triaxial accelerometer is required to find the tilt of a person with respect to the line passing through the center of gravity. JK Lee et al. 19 investigate inertial sensing-based pre-impact detection of falls involving near-fall scenarios and propose a novel fall detection method using a wearable inertial sensor. And Hu et al. 20 propose a human body posture recognition algorithm based on Back Propagation (BP) neural network for WBAN, in their work, walk, run, squat, and sit were recognized with accuracy of 91.67%. Liu et al. 21 introduce human daily activity recognition for healthcare using wearable and visual sensing data; they build an activity recognition system, which learns a nonlinear SVM algorithm to identify 20 different human activities from accelerometer and camera data. Wang et al. 13 design an activity recognition system based on a hierarchical model and divide the body activities into simple postures and complex activities, and the recognition rate is only 82.87%. P Gupta and T Dallas 22 present an accurate activity recognition system utilizing a body worn wireless accelerometer, and six daily activities and transitional events can be recognized with an accuracy of about 95%. Wang et al. 23 combine SVM and association rule learning to improve the performance of human activity recognition based on streaming data in smart environments.
Data acquisition and preprocessing
In this part, we provide considerable details about data acquisition and preprocessing through the following three aspects.
Hardware system
With the rapid development of MEMS (micro-electromechanical systems), human activity recognition ushered in the great opportunity and challenge. In our work, we select the VG350 to build our hardware system. VG350 is MEMSIC’s OEM (a semiconductor company) and commercial MEMS-based inertial system. At the core of the VG350 is a rugged 6-DOF (degrees of freedom) MEMS inertial sensor cluster, which includes three axes of MEMS angular rate sensing and three axes of MEMS linear acceleration sensing. Each sensor within the group is individually factory calibrated for temperature and nonlinearity effects during MEMSIC’s manufacturing and test process using automated thermal chambers and rate tables. VG350 utilizes a multi-state configurable Extended Kalman Filter (EKF) to correct for drift errors and estimate sensor bias values.
We design the hardware system as a smart-belt, and Figure 1 shows the construction of the system, and the coordinate system of smart-belt is given as well. This structure has several advantages. First, the belt is almost everyone’s necessity, and the smart-belt can achieve all the functions of an ordinary strap so that it could be a perfect substitute. Second, the smart-belt is tied around the waist, and this position approximates the center of gravity of the body. It is pretty essential for a high accuracy of human activity recognition and is commonly used in many studies as well.

Hardware system.
Data collection
The dataset used in this study was collected in a laboratory by the smart-belt. We recruit six subjects in the university campus, whose weights range from 60 to 75 kg and heights range from 168 to 183 cm. All of the subjects are male, aging from 23 to 26. In the process of data collection, each subject was required to make five ordinary human activities in the way they used to. And to ensure the accuracy of experimental results and representative, we choose five common activities in our daily life: sit, stand, squat, walk, and jump. Furthermore, walking and jumping are dynamic activities, which are difficult to keep a linear motion. Thus, for our experiment subjects, it is allowed to change the direction in their own way. When we start to collect data, the matching software of VG350 continuously receives linear accelerometer and gyroscope sensor data from three axes of themselves and sample rate is about 20 Hz. Then the data are stored into a local text file. Figure 2 displays the original data curve of VG350.

Original data curve of VG350.
Data preprocessing
Benefit from the EKF, most of the noise in the VG350’s raw data has been eliminated. However, the filtered data are still consecutive and long-lasting, so cannot directly utilize as training or testing data. With this problem, a data segmentation mechanism is applied, which divides the original data into many small data segments. In our study, the length of each small part was set to 2 s, and this period of time guarantees at least one complete action cycle. Besides, segmentation is also contributed to feature extraction, and we can see the changes of related feature in different time period.
Activity recognition with smart-belt
This section briefly introduces the classifier we used, including binary classification SVM and multi-class SVM. Especially focused on the hierarchical SVM classification framework we proposed and how to discriminate different human activities by analyzing sensor data.
Classifier
SVM was first put forward by Vapnik; it is widely used for pattern classification and nonlinear regression. The main idea is to create a classification hyperplane as decision surface and maximize the isolation edge between the positive cases and the negative examples. SVM is an approximate implementation of the structural risk minimization based on mathematical theory. This principle is on account of the fact that the error rate (generalization error) of the learning machine is on test data. And it is limited by the sum of the training error rate and a term dependent on the VC dimension (Vapnik–Chervonenkis dimension). In the case of separable mode, SVM is zero for the previous term and minimizes the second term. Thus, although it does not take advantage of the problematic domain problem, the SVM provides an excellent generalization performance on the pattern classification problem, which is a unique attribute to SVM. The concept of the inner product nucleus between the support vector

SVM architecture.
In Figure 3, K is kernel function and the main types are as follows: linear kernel function, polynomial kernel function, radial basis function, and two-layer perception kernel function.
Binary classification SVM
The C-Support Vector Classification (C-SVC) model is a relatively standard two-class SVM model, and the specific form is as follows.
1. Set a known training set
where
2. Select the appropriate kernel function
Get the optimal solution:
3. Select a positive component
4. Construct decision function
Multi-class SVM
The SVM algorithm was initially designed for binary classification problems. When dealing with multiple types of issues, we need to construct the appropriate multi-classifier. At present, there are two main ways to construct SVM multi-classifier. One is the direct method, which modifies the objective function rightly and combines the parameters of multiple classification surfaces into an optimization problem. Multi-class classification is achieved by solving the optimization problem. This approach seems simple, but with a high computational complexity, and is difficult to implement, so it only applied to small-scale issues. The other is an indirect approach which constructed by combining multiple binary classifiers, and conventional methods include one-versus-rest and one-versus-one.
1. One-versus-rest method
During training, the samples of a class are grouped into one category in turn, the remaining samples classified as another category, so k class of samples to construct k SVM. Classify unknown samples into the class with maximum classification function values.
2. One-versus-one method
The approach is to design an SVM between any two types of samples, so k samples need to design k (k – 1)/2 SVMs. When sorting an unknown sample, the category with the highest number of votes is the category of the unknown sample.
In our study, A Library for Support Vector Machines (LIBSVM) is used to achieve multi-classification, which belongs to one-versus-one method. LIBSVM is an integrated software for support vector classification (C-SVC, nu-Support Vector Classification (nu-SVC)), regression (epsilon-Support Vector Regression (epsilon-SVR), nu-Support Vector Regression (nu-SVR)), and distribution estimation (one-class SVM). At the same time, its following characteristics are the key to our study: different SVM formulations, efficient multi-class classification, cross-validation for model selection, probability estimates, various kernels (including precomputed kernel matrix), and weighted SVM for unbalanced data.
A hierarchical activity recognition structure
Great performance has been achieved by many different structures in human activity recognition. But their flows are compelling too, some simple recognition structures get a high accuracy, and many complex structures also achieved good performance, but the calculation complexity and time price are much higher. Based on this problem, a hierarchical architecture for human activity recognition as shown in Figure 4 is presented. It has a clear structure and fully utilizes the discriminative information of different activities. In the first level, the human body’s various postures are divided into two categories, one is static action, the other is dynamic posture; and in the second degree, we divide the static action and dynamic action, respectively. The disadvantage of this structure is the error transmission, that is, the incorrect classification from the first level to the second level, but the static action and dynamic action are essentially different, so we can get a high recognition rate and the transmission error is too small to have an impact. In other words, the architecture takes full use of the essential differences of static motions and dynamic gestures to achieve the classification of complex gestures at a lower cost.

Hierarchical activity recognition structure.
Human activity recognition via the structure
The activity recognition can be simply summarized as the procedure of data collection, preprocessing, feature extraction, and classification. The first two steps were described before, and in this section, we briefly discuss the other two parts. In the first level, we divide the activities into static action and dynamic action through SVM. Without consideration of the essential difference between static actions and dynamic postures and the comparison of the different sensor combinations about their recognition rates, we select the data of triaxial accelerometer and triaxial gyroscope as classification training data. Compared to Principal Component Analysis (PCA), Relief-F, and other feature extraction algorithms, this method is simple but efficient, and achieved excellent results. In the second level, because of the increased complexity of the classification, it is difficult to obtain a reasonable recognition rate and we use PSO algorithm to improve system performance; the algorithm flowchart is shown in Figure 5. PSO is an intelligent algorithm based on group intelligence. It was proposed by Kennedy and Eberhart in 1995, and its primary concept stems from the study of artificial life and predation behavior of birds. In static action classification stage, we aim to successfully distinguish between squatting, standing, and sitting. Because there is only a small difference in the attitude and angle of these three actions, we choose gyroscope values as the most discriminative training data. In dynamic action classification stage, acceleration rate and Euler angle are selected as the training data of classification. In the case of dynamic action test, an angle change is allowed, so the data of the gyroscope are not used. In conclusion, the training and testing subsets should contain highly relevant features in the same class but are not related to each other and then were used to train the classifier. In this architecture, the activity recognition of SVM optimized by PSO is novelty and effective.

PSO algorithm flowchart.
Experimental results and analysis
This section presents experimental setup and conducts a systematic performance analysis of human activity recognition via smart-belt. At the same time, the recognition accuracy of static actions and dynamic postures under different sensor combinations is compared. Finally, we compare the results to the previous study.
Experimental setup
Training and testing process are crucial to the successful implementation of classification. In order to get a good classification performance under the SVM algorithm, we need to determine the training dataset and testing dataset from the whole collected samples first. After the segmentation of the initial sensor data, randomly select 80% of each paragraph as a training dataset and 20% as a testing dataset. And then normalize the training dataset and the testing dataset, using the normalized mapping as follows
where
The power of triaxial accelerometer and triaxial gyroscope embedded in the smart-belt in human activity recognition when they are used together or separately is another task of our study. We set up the following three scenarios to evaluate the recognition performance: (1) only the data generated by the triaxial accelerometer are used, (2) only sensor data correlated to gyroscope are considered, and (3) both accelerometer and gyroscope data are included. Obviously, in the first two cases, we treat the accelerometer and gyroscope as a data source, respectively, and the cooperation of the two as the last case. This comparison benefits us to obtain and select more discriminant feature subset to differentiate static action and dynamic action. Therefore, the setting of the three scenarios is effective and rational to realize the task.
In any study, it is difficult to describe the rationality and universality of the research problem with a single sample, and the results are difficult to convince. We select 10 different heights and weights of the representative volunteers to test, and tell them to complete the following five daily activities in their own ways: squat, sit, stand, walk, and jump. Because it has been proved that there are certainly differences between the habitual actions and the postures under required conditions. Furthermore, in the process of each volunteer’s action being segmented, the duration of each action is 4 s, and the first 2 s are abandoned, in order to reduce the interference at the beginning of the actions. The remaining 2 s ensure this time could contain a complete action cycle at least; this setting fully considers the rationality of the data in human activity recognition and is of great significance to the performance improvement of the classifier.
Performance analysis
In order to evaluate the reliability of classification performance and improve the efficiency of the algorithm under proposed classification architecture, we use a set of evaluation system 15 through the confusion matrix as shown in Table 1. In this table, we take the binary classification as an example to introduce the evaluation system. The SVM classification algorithm we used belongs to the supervised learning model, and the accuracy is judged by the label information of the testing set output. In this chart, horizontal represents the predicted label information and vertical on behalf of the true label information. For this binary classification problem, the instance was divided into a positive class and a negative class. However, in the actual classification, there are four kinds of situations:
True positive (TP): The positive sample is classified as positive class under this model.
False positive (FP): The negative sample is classified as positive class under this model.
False negative (FN): The positive sample is classified as negative class under this model.
True negative (TN): The negative sample is classified as negative class under this model.
Confusion matrix of binary classification.
TP: true positive; FN: false negative; FP: false positive; TN: true negative.
Based on the above four situations, we can use the following four evaluation criteria to reflect the classification performance: accuracy, precision, recall, and F-Measure.
1. Accuracy is the most common index when we judge the advantages and weakness of the classification algorithm
where
where
2. Precision is another critical index of the evaluation system. It reflects the ability of the model to differentiate negative samples, and the higher the Precision, the stronger the differentiation ability of the model to negative samples. We can calculate Precision using formula (8)
3. Recall embodies the recognition ability of the classification model to the positive sample, and the higher the recall, the stronger the model can identify the positive sample, and Recall is defined as
4. F-Measure provides a method to combine Precision and Recall into a single metric, which calculated using equation (10). Since we want to retrieve the results, Precision and Recall are the higher the better, but, in fact, the two in some cases are contradictory. F-Measure is the weighted harmonic averaging of precision and recall, and the higher the F-Measure, the more robust the classification model is
Experimental results
The results of human activity recognition based on WBANs are presented in the following four aspects: (1) in the process of classifying static motions and dynamic actions, the comparison of the recognition rate of accelerometer and gyroscope in three different cases; (2) static actions classification based on SVM in the proposed classification structure; (3) dynamic action classification based on SVM in the proposed classification structure; and (4) the overall recognition rate table and the classifier performance evaluation. In these four parts, the recognition rate is not only visually displayed but also analyzed the reasons for each case in detail.
Static–dynamic action recognition is the first level of the classification architecture; a high accuracy is necessary in order to avoid error transmission to the next layer. It is useful to compare the recognition rate obtained with different training and testing data, that is, using different sensor data for this part. As we can see from Table 2, when the accelerometer record is used as the input data, the recognition rate of the testing data after training is 82.8%. And only use the gyroscope data for training, static actions and dynamic actions recognition rate can reach 98.8%. When accelerometer and gyroscope are used together as data source, the recognition rate of dynamic actions and static actions is as high as 99.3%. The parameters of three cases in static–dynamic action recognition are given, respectively. The parameter c is the cost parameter, g is the kernel function parameter, and t is the kernel function. In this experiment, the kernel function selects sigmoid.
The second stage of human activity recognition based on the WBANs under this classification architecture is the recognition of static actions and dynamic gestures. The result of the recognition of the static actions is shown in Figure 6: X-axis for the test set samples, and Y-axis for the classification labels, in which “1” on behalf of squatting, “2” stands for sitting, and “3” represents standing. An asterisk embedded in circles indicates that the classification is correct, otherwise the rating is wrong. And the probability of correctly matching the testing set label information from the graph is 85%. One part of the squat is incorrectly identified as sitting, because sitting and squatting are more similar in body shapes. Since the volunteers are allowed to collect activity data in their own accustomed ways, this makes sitting and squatting emerge some of the same points that the torso has an angled slant, and because of this, some squat samples are incorrectly identified as sitting. In addition, there are very few failed sample categories.
Figure 7 is the result of dynamic action classification, which achieves the label matching probability of 84%. The label “1” represents walking and label “2” stands for jumping. We can see that some jumping samples were mistaken for walking. This is because dynamic motion is a continuous process, and the initial preparation stage and the landing moment of jumping are similar to the part process of walking.
The probability that the correct matching of label information is not enough to show the performance of classifier and the superiority of classification architecture. The confusion matrix in Table 3 shows five action label information that correctly matches and mismatch, the bold values represent the correct classification of the sample and Table 4 shows precision, recall, and F-Measure of the five activities, respectively. At the same time, we can see that under the classifier and classification framework we used; five actions can achieve a high accuracy and balance performance. This fully embodies the superiority of SVM classifier optimized by PSO and the efficiency of the architecture, which we proposed. Furthermore, in Table 4, we calculated the four performance evaluation indices of the classification system. The Precision of the classification system is 92.96%, and the Recall under this condition can reach 92.3%. F-Measure, as a harmonic mean between Precision and Recall, can reflect the equilibrium degree of the two, and the F-Measure of this system is 92.63%. The closer F-Measure to 1 indicates that the performance of classifier is better, so the system achieves a better classification performance. Finally, the Accuracy of the activity recognition system is up to 92.3%.
Comparison result.

Actual class and predict class of static action.

Actual class and predict class of dynamic action.
Confusing matrix of experimental result.
Performance evaluation index of each action.
Comparison with previous work
In our previous study, Hu et al. 20 proposed a human body posture recognition algorithm based on BP neural network that can identify squat, sit, stand, and walk with an accuracy of 91.67%. In contrast, this article uses SVM to identify five kinds of daily posture with an accuracy of 92.3%, and not only increase in the number of postures but also improve the accuracy of the recognition. Furthermore, a systematic performance analysis is also involved in this article, and F-Measure reaches 92.63%, which indicates a good trade-off of the human activity recognition system.
Conclusion
In this system, the smart-belt constructs the bridge between the posture information and health monitoring, which plays an essential role in the process of improving people’s life quality. In this study, we first provide a brief review of introduction and related work of human activity recognition in WBANs. Then we discuss the acquisition and preprocessing of data. To explore more discriminative classification information, we have tried to select the relevant sensor data according to the transcendental action characteristics as training and testing data, and proved the validity and simplicity of this novel method. Furthermore, we put forward a hierarchical classification structure. Under this framework, the human activity recognition is made up with two levels. In the first level, the human body’s various conventional gestures are divided into two categories, one is static actions, the other is dynamic postures, and second degree is the identification of static action and dynamic motion. To investigate the power of the gyroscope and accelerometer in human activity recognition based on WBANs, we establish a comparative experiment. The result shows that the gyroscope can provide more valuable information than the accelerometer, and the combination of the two contributes to a better accuracy; this experiment also proved the results in Wang et al. 14 Finally, extensive experimental results and analysis are conducted to evaluate the effectiveness of the SVM classifier optimized by PSO under the hierarchical classification architecture: in the first level, static–dynamic classification accuracy rate of more than 99%, and the activity recognition accuracy of second level up to 92.3%. Overall, it appears that human activity recognition will bring great opportunities and challenges for WBANs. However, due to practical constraints and future randomness, this article cannot provide a comprehensive review and accuracy prediction of future. The findings of this article have a number of important implications for future practice.
For the future work, we plan to execute further research in the following aspects. First, we need to explore a highly reliable feature extraction and selection method to ensure the performance of the classifier. Second, expanding more actions on the existing basis of the classification system is also an essential part of future work. Meanwhile, like the fall and other special gestures, detection of health monitoring is equally important. Third, exploring more applications of human activity recognition in WBANs is the top priority of our future work. Especially in human health monitoring, whether patient’s guardianship in hospital or the sub-health state group, human activity recognition will play a vital role in their monitoring and rehabilitation process. Therefore, we intend to develop a health monitoring platform based on human activity recognition and its application to provide a better assurance for human health.
Footnotes
Handling Editor: Feng Ye
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
