Dilemma and Solution of Traditional Feature Extraction Methods Based on Inertial Sensors

Correctly identifying human activities is very significant in modern life. Almost all feature extraction methods are based directly on acceleration and angular velocity. However, we found that some activities have no difference in acceleration and angular velocity. *erefore, we believe that for these activities, any feature extraction method based on acceleration and angular velocity is difficult to achieve good results. After analyzing the difference of these indistinguishable movements, we propose several new features to improve accuracy of recognition. We compare the traditional features and our custom features. In addition, we examined whether the time-domain features and frequency-domain features based on acceleration and angular velocity are different. *e results show that (1) our custom features significantly improve the precision of the activities that have no difference in acceleration and angular velocity; and (2) the combination of time-domain features and frequency-domain features does not significantly improve the recognition of different activities.


Introduction
e classification of human motion based on inertial sensors has been proven to have many important applications in the medical and health fields.In previous studies, time-domain and frequency-domain features are widely used for feature calculation.
ere are many studies that use wavelet transform to extract features to classify human activities.However, the research of Preece et al. [1] shows that the time-and frequency-domain features often exceed wavelet features, indicating that the wavelet feature may be not the most effective method for calculating the human body motion classification features.Some time-domain features are derived to classify human activities, such as the mean, median, variance, skewness, kurtosis [2], and interquartile range [3].In order to extract frequency-domain features, the sensor data window is first changed to the frequency domain using discrete Fourier Transform [4].en, we can extract some features from the frequency domain to distinguish different activities, such as power spectral density (PSD) [5], peak frequency [5,6], entropy [7], DC component [7], median frequency [8], spectral energy [9], and frequency-domain entropy [10].Of course, there are other methods that process data from accelerometers and gyroscopes.But all in all, to the best of our knowledge, these features are extracted directly from acceleration and angular velocity, which inevitably have some common drawbacks.
We studied 12 kinds of activities and found it easy to confuse elevator up and elevator down.ese two kinds of activities do not have obvious differences in acceleration and angular velocity, so the time and frequency-domain features based on acceleration and angular velocity cannot achieve good classification results.erefore, for those motions that have no significant difference in angular velocity and acceleration, no matter how the features are extracted from the acceleration and angular velocity, it is difficult to achieve good results.
In addition, we begin to wonder if there is any essential difference between time-domain features and frequencydomain features based on acceleration and angular velocity.In order to solve this discredit, we have separately tested the effects of time-domain features and frequencydomain features.
en, we tested the combination of the two kinds of features and found that the combination of time-domain features and frequency-domain features was slightly higher than only time-domain features.From the experimental results analysis, we believe that, for human activity classification problem, the timedomain features and the frequency-domain features are two aspects of the same rules, and there is no essential difference.
Our contributions in this paper are two-fold: (1) to the best of our knowledge, this is the first time that features of motion classification based on velocity and displacement have been proposed, which solve some problems that cannot be solved by traditional time-and frequency-domain features; (2) As far as we know, for the first time, we have studied the difference between the time-domain features and frequency-domain features.

Methods
Indeed, the time-domain and frequency-domain features based on acceleration and angular velocity have achieved some success.However, for activities without obvious difference between acceleration and angular velocity, such as elevator up and elevator down, the traditional method of extracting features based on acceleration and angular velocity is difficult to work.In order to solve this problem, we carefully analyze the two activities of elevator up and elevator down, summarize the differences between them, and propose some new features for distinguishing such activities.After analysis, we sum up the following rules: (i) When the elevator goes up, the speed is upward; when the elevator goes down, the speed is downward.(ii) When the elevator just starts to move or stops moving, its speed is small and its angular speed is large.(iii) When the elevator just starts to rise or fall, the direction of the speed is the same as the direction of the acceleration; when the elevator stops to rise or fall, the direction of the speed is opposite to the direction of the acceleration.
Based on the above evidences, we propose four features to distinguish these activities on each axis of the accelerometer.First, according to the first rule, we introduce three features, namely, the starting speed, the ending speed, and the displacement.Second, according to the second and third rules, we introduce the fourth feature.As some activities have just started and are about to stop, their speed is small and difficult to distinguish.erefore, we extracted another feature to enhance the difference between two activities.When the velocity direction is the same as the acceleration direction, we use v + a as the feature; otherwise, we use v − a as feature.In order to describe the movement of the human body in different directions as much as possible, we have introduced the following twelve new features to enhance the difference between different activities.ese features are summarized in Table 1.
Suppose the time window we choose is T, the sampling frequency is n, then the total number of samples is Tn.In the experiment, the time window we selected was two seconds.e displacement, time, and acceleration corresponding to the ith sampling interval are x(i), t(i), and a(i).
e speed corresponding to the sampling point is v(i).Data section of one time window is shown in Figure 1. e gravity acceleration is g.Due to the high sampling frequency, the time interval between each sample point is short.At the same time, in order to simplify the calculation, we believe that there is uniform linear motion between each sampling point.Now, we derive the speed and displacement formula.
We think these sampling points are equally timedistributed, so we have the following conclusions.
First, we derive the formula for the end speed of each axis.According to the kinematics formula, we can easily get the following formula and simplify it by combining it with Equation (1). ( Next, we introduce the determination of the starting speed.If this window is the first window, we default to a starting speed of zero.Otherwise, the starting speed is the end speed of the previous window marked as v −1 (Tn): As for the displacement of each axis, since we think that there is uniform linear motion between each sampling point, the displacement formula can be derived as follows. 2 Mobile Information Systems In the experiment, in order to calculate the last three features we defined in Table 1, that is, Velocity Plus Acceleration Along X, Velocity Plus Acceleration Along Y, and Velocity Plus Acceleration Along Z, our speed takes the end velocity of the two-second time window, and the acceleration takes the difference between the average acceleration of the two-second time window and the gravitational acceleration in each axis.In this way, we can calculate the last three features, and the expression is shown in (6), in which Velocity Plus Acceleration Along * stands for the last three features.
Velocity plus acceleration along Finally, we introduce the calculation method of gravity acceleration we used in the experiment.Since the tester is just wearing the device for data acquisition, it is generally at ... Mobile Information Systems a standstill and the starting speed is zero, which is used in our experiments.erefore, for the sake of convenience, in the experiment, we believe that the initial acceleration of each axis is the component of gravity acceleration and assume that the component of gravity acceleration in each axis remains unchanged.We take the average of the first 10 sampling points of each axis as the component of gravity acceleration in each axis, recorded as g.

Datasets.
In order to illustrate the validity of our custom features, we have selected the USC_HAD of University of Southern California as the verification dataset [11].ey use an off-the-shelf sensing platform called MotionNode to capture human activity signals and build their dataset.
MotionNode is a 6-DOF inertial measurement unit (IMU) specifically designed for human motion sensing applications, which integrates a 3-axis accelerometer and, 3-axis gyroscope.ey selected 14 subjects (7 male; 7 female) to participate in the data collection.e sampling frequency is 100 Hz.Twelve kinds of activities collected are Walking Forward, Walking Left, Walking Right, Walking Upstairs, Walking Downstairs, Running Forward, Jumping Up, Sitting, Standing, Sleeping, Elevator Up, and Elevator Down.

Results.
In order to verify the validity of our custom features, we extracted some common time-and frequencydomain features.In the time domain, we chose the mean, median, variance, skewness, kurtosis, and interquartile range as time-domain features.In the frequency domain, we choose peak frequency, median frequency, power spectral density, DC component, spectral energy, and information entropy as frequency-domain features.en, we added our custom features to these time-and frequency-domain features and compared their results.In the experiments, we adopted the two commonly used models, SVM and random forest.For SVM, the kernel function we use is a polynomial kernel function.For RF, the number of decision trees we choose is 50.First, in order to check whether the distinction between the lift of the elevator and the descending of the elevator is achieved, we tested the precision and recall of our custom features on both models.Precision and recall are often used as performance measures for classifiers in classification problems.Table 2 shows the precision and recall of the models' identification of elevators up when adding custom features to time-and frequency-domain features and the combination of time and frequency-domain features without custom features.Table 3 shows the precision and recall of the models' identification of elevators down when adding custom features and no custom features.e left column below each model is the precision rate, and the right column is the recall rate.From Tables 2 and 3, we can see that, after adding the custom features, the model has significantly improved the recognition rate of the elevator up and the elevator down.
Also, we use the ROC (receiver operating characteristics) curve and corresponding AUC (area under the ROC curve) values to check whether the distinction between the lift of the elevator, and the descending of the elevator is achieved.For SVM, we conducted a test.e ROC curves for the two types of classification results for elevator up and elevator down are shown in Figure 2.
From the above figure, we can see that in the SVM, after adding our custom features, the ROC curves of elevator up and elevator down completely cover the ROC curve of the original feature.e AUC value for the no custom features' ROC curve is 0.8572, while the AUC value for adding custom features' ROC curve is 0.9729.e ROC curve shows that our custom features have achieved very good results in distinguishing between the elevator up and the elevator down.
In order to further explain the significance of our custom features we have extracted and verify the difference between time-domain features and frequency-domain features, we have compared our custom features with the time-domain features and frequency-domain features.We performed comparative experiments on four combinations of features over SVM.We conducted five experiments for each experiment.e detailed experimental results are summarized in Table 4. e accuracy in the table is the total classification accuracy of the 12 activities.For convenience, we denote the time-domain feature as 1, the frequency-domain feature as 2, and the custom feature as 3.
From the experimental results, we can see that individual frequency-domain features and time-domain features can achieve good results.However, when frequency-domain features are combined with time-domain features, no significant improvement is obtained, indicating that there is no essential difference between features extracted from the frequency domain and features extracted from the time domain.e superposition of the two did not achieve better results.e time-domain feature is better when combined with our custom features than combined with frequencydomain features.Based on the comprehensive analysis, we believe that our custom feature is a supplement to traditional time-domain features rather than a redundant feature.
e traditional time-domain features and frequencydomain features are all based on the acceleration and angular velocity but there is no essential difference, so the superposition of the two will not bring significant improvement.Our custom feature is the mining of the rules of speed and displacement, which is very di erent from the traditional mining of acceleration and angular velocity.So, when these features are introduced in the time-domain feature, we can obtain certain promotion.Especially for those motions which have no obvious di erence between angular velocity and acceleration but there is a clear difference in speed and displacement, we can achieve good results with these custom features.For example, there is no obvious di erence in acceleration and angular velocity in the smooth upward movement of the elevator and the smooth descending of the elevator, but there is a clear di erence in speed and displacement.So, when introduce our custom feature, we can obviously increase the recognition rate of the two kinds of motions.
To calculate these features we de ne, we must know the initial state of motion, especially the initial state of speed.In our experiment, we assumed that the initial state is zero.In the database we use, most of the data are collected after the tester reaches a steady state of various motion postures, which does not satisfy our assumptions.If we can record data when the tester just wears the inertial sensors, so as to meet our assumptions, we believe we can achieve better results.For other types of sports, such as running, walking, and station, there is a di erence in speed, which will bring a higher recognition rate.

Discussion
In this article, we begin with the elevator up and elevator down, which are indistinguishable based on the existing feature extraction methods and analyze the di erences and rules between these two types of movements.en, we have proposed four features on each axis of the accelerometer that have signi cantly improved the distinction between the two types of movements, elevator up, and elevator down.In the experiment, we found that the combination of frequencydomain features and time-domain features does not signi cantly improve the distinction of activities.e two kinds of features are two di erent aspects of acceleration and angular velocity, and there is no essential di erence.From the experimental results, the time-domain features are better than the frequency-domain features and can more fully re ect the di erences between di erent activities.Our custom features are not another response to acceleration, but instead, these features can be used to distinguish movements that di er in the speed of movement.In particular, it is of great signi cance to distinguish between movements that do not have a signi cant di erence in acceleration and angular velocity but have a signi cant di erence in speed.
In the experiment, for the sake of convenience, we assumed that the component of the gravitational acceleration remains unchanged, which is obviously not in line with the actual situation.Next, related personnel may consider introducing some basic theories of motion analysis in order to accurately calculate the components of the gravitational acceleration and thus more accurately calculate the features we introduce.We believe that when the features of velocity and displacement are introduced, we can make a great breakthrough in the existing human motion classi cation problem and to some extent get rid of the dilemma that some motions cannot be accurately identi ed on the features of acceleration and angular velocity.
Feature name Description End velocity along X End speed along the x-axis End velocity along Y End speed along the y-axis End velocity along Z End speed along the z-axis Starting velocity along X Starting speed along the x-axis Starting velocity along Y Starting speed along the y-axis Starting velocity along Z Starting speed along the z-axis Displacement along X Displacement along the x-axis Displacement along Y Displacement along the y-axis Displacement along Z Displacement along the z-axis Velocity plus acceleration along X v + a if the product of v along the x-axis and a is positive, v − a otherwise Velocity plus acceleration along Y v + a if the product of v along the y-axis and a is positive, v − a otherwise Velocity plus acceleration along Z v + a if the product of v along the z-axis and a is positive, v − a otherwise t (1) a (1)

Figure 1 :
Figure 1: Data section of one time window.

Figure 2 :
Figure 2: ROC curve of elevator up and elevator down over SVM.

Table 2 :
Precision and recall of the identification of elevators up when adding custom features and no custom features.

Table 3 :
Precision and recall of the identification of elevators down when adding custom features and no custom features.

Table 4 :
Classi cation accuracy of 12 activities on four combinations of frequency-domain features, time-domain features, and custom features over SVM.