Recognition Algorithm of Activity Recognition Based on Single Accelerometer

In order to improve the accuracy and variety of human motion recognition in the acceleration signal recognition. In this experiment, in addition to the station, lying, sitting, walking, running, walking speed, upstairs, downstairs action recognition of traditional research, this paper also adds to the left turn right 180 degrees, 180 degrees, 90 degrees, turn left, turn right 90 degrees, from lying to sitting, sitting from the station, from the station to sit down. Sixteen kinds of action from sit to, and used to monitor human motion more accurately. In this paper, a new SVM-KNN hierarchical classification model is proposed to identify the sixteen kinds of human actions. The experimental results show that the recognition algorithm has a high recognition rate.


Introduction
At present, in the forefront of intelligent technology research, automatic recognition of human motion is a very important and challenging technology, first of all it has a lot of applications to provide personalized service potential, such as: intelligent environment and intelligent monitoring. Second, it can be combined with many areas of research such as: intelligent life care and intelligent health care [1] .
The identification of human body action mainly refers to the analysis and recognition of the action categories and behavior patterns of the human body, and it has a wide application prospect and objective economic value. The use of human motion recognition technology to obtain the human body movement information for effective treatment, through the analysis of the results can determine the geographical environment and the body's physical movements The intelligent health monitoring based on data analysis is more and more extensive. Therefore, it is very important to identify the daily human behavior [2] . There are two aspects of human behavior recognition research that are based on visual human behavior recognition and human behavior recognition based on acceleration sensor. In this paper, the algorithm is based on the acceleration sensor of human behavior recognition algorithm research, the human action is divided into static action, intermediate action, dynamic action of three states and then more accurate identification of specific actions.

Recognition Algorithm of Activity Recognition Based on Single Accelerometer
In this paper, the human body behavior recognition system based on acceleration sensor is composed of six parts [3] .
In the human body behavior recognition system based on single acceleration sensor, the specific recognition process mainly includes the following important aspects: acceleration data acquisition, signal preprocessing, feature selection and design classifier.

Data Collection
We use MPU6050 nine-axis data acquisition and integration module for accelerated data acquisition, data acquisition module has two parts: the body acceleration data acquisition part and data receiving part. The human body acceleration acquisition part is mainly composed of gravity acceleration gyro sensor MPU-6050.MPU-6050 on the gyroscope and accelerometer were used with three 16-bit ADC, the measured analog quantity can be converted into output digital. In order to accurately track fast and slow motion, the sensor measurement range is user controllable, gyroscope can measure the range of ± 250, ± 500, ± 1000, ± 2000 ° / s (dps), accelerometer measurable range ± 2g, ± 4g, ± 8g, ± 16g. This article uses a range of ± 8g. Data reception and storage mainly by the phone, through the APP in the phone to complete [4] . The communication between the two parts of the data acquisition module is done via the Bluetooth module. This device can collect and store the user's 24-hour acceleration data. According to the body's daily behavior of the movement frequency, we choose 20HZ sampling frequency.

Data Preprocessing
The acceleration signal and the gyro signal collected by the data acquisition module not only include the acceleration signal and the gyro signal generated by each action, but also the noise signal. The noise signal will have a negative effect on the subsequent feature extraction and classification recognition process. In order to improve the accuracy of the data analysis results, the original signal is usually denoised before the feature is extracted.
Each action signal is different in length, which is not conducive to feature extraction, so the extraction of the characteristics of the signal before the window processing to solve this problem. After the signal is windowed, the original signal becomes regular and the feature is extracted. Many studies use 50% overlapping sliding window primitive signals for windowing [5] .
Each action signal is different in length, which is not conducive to feature extraction, so the extraction of the characteristics of the signal before the window processing to solve this problem. After the signal is windowed, the original signal becomes regular and the feature is extracted. Many studies use 50% overlapping sliding window primitive signals for windowing.
After extracting the feature data set, the characteristics of the extracted feature are composed of frequency domain and time domain eigenvalue, and the difference is large. In order to reduce the influence of the difference of the feature on the recognition rate, we need to carry out Z-score normalization processing to improve the correct rate of action recognition.

Feature extraction
Feature extraction is to extract the characteristic vector that characterizes human motion from the de-noising acceleration signal. In the identification of human action behavior is particularly important, it is related to the size of the various types of action, the impact of the subsequent classification is relatively large [6] . Acceleration sensor in the three-axis acceleration, each axis data can extract a variety of types of features. In this paper, the characteristics of the acceleration signal extracted from the human body are usually divided into: time domain characteristics, frequency domain characteristics, time-frequency characteristics.
There are many methods for feature extraction. In order to achieve the purpose of identifying different actions, this paper extracts different features according to the motion characteristics of different movements. It is shown that the time-domain and frequency-domain characteristics of the acceleration signal are higher than those of other features. Therefore, we extract the time-domain characteristics of the acceleration signal, including the mean, the standard deviation, the median , A quarter quartile, a quarter quartile, and a correlation coefficient between the axes; the frequency domain features include spectral energy, FFT coefficients.

Feature Selection
Due to the large number of features we have chosen, the dimension of the feature space becomes very high. The complexity of the calculation of the classification system is increased, and the information dependency between the individual feature vectors and the redundancy can be reduced. Therefore, in order to effectively reduce the dimensionality of the feature space and reduce the redundancy, the recognition rate of each action of the system is improved. We often perform feature selection after feature extraction. In the human behavior recognition system commonly used feature selection methods are principal component analysis, linear decision analysis, boosting algorithm.
Principal component analysis (PCA) is an effective method for statistical analysis of data, and is widely used in pattern recognition and signal processing. PCA is based on discrete K-L changes, with fewer features to describe the signal samples to reduce the feature space dimension analysis. The so-called PCA transformation is to obtain a multivariate observation value, through the linear transformation to eliminate the correlation between variables, with fewer variables to describe the characteristics of the observation object of a transformation method. We use the PCA algorithm to extract the best description and characterization of human motion from the extracted signal characteristics. PCA algorithm can be found in the smallest mean square to represent the projection direction of the original data, so we choose PCA for feature selection [7] .

Classifier design and algorithm
The ultimate goal of identification is to classify a variety of behaviors accurately, and the choice of classifiers relates to the performance of the whole human behavior recognition system. As the focus of the current research work is different, and will encounter different recognition objects, through the acceleration sensor to identify human behavior mainly based on template matching classification method, based on statistical pattern recognition classification method and based on artificial neural network classification Method three categories.
The classification algorithm based on statistical pattern recognition needs to spend more time and energy, but a large number of training samples can improve the robustness and recognition performance of the system. Therefore, this paper applies pattern recognition based on the classification algorithm to identify the action. Commonly used classification methods are support vector machines, decision trees,KNN.
Based on the SVM-KNN hierarchical algorithm, we propose 16 kinds of actions into three states according to the geometric features of 16 kinds of actions: static action, intermediate action and dynamic action. And then according to the type of data per layer how many types of SVM and KNN algorithm.
This paper divides into three categories according to the second layer of the hierarchical method, because the three categories are different in the waveform energy characteristics. In view of the fact that the second layer is less, and because SVM has obvious effect on the classification of small categories, it is proved that the classification effect is better than the decision tree, KNN and so on. So we use SVM at this layer for three categories of classification.

Experimental and Experimental Results Analysis
Experimental design in an experimental building, so that subjects in accordance with the design of the route to complete the corresponding action. In this experiment, a total of 20 individual action experiments were collected. In order to balance the differences between men and women, the experiment collected 10 male and 10 female data. The experimenter will be able to wear the data acquisition module to the waist. A total of 16 kinds of actions, each action each experimental person repeated 20 times. Each action duration of 2 minutes, remove the data before and after 2 minutes to retain the entire data, the acceleration sensor set to 30Hz.
We use the SVM-KNN algorithm to classify the 16 types of actions, and use the one-way crossvalidation method to evaluate the model. We use the SVM-KNN algorithm to classify the 16 types of actions. The experimental results are obtained by experiment. As shown in Table 1:

Result analysis
A series of calculation and analysis are carried out by calculating the acceleration, normalization, filtering, extracting eigenvalues, and classifying and recognizing the three -axis acceleration data of the human body under different behavior states.
This algorithm can eventually identify lying, sitting, standing, running, brisk walking, even moving, upstairs, downstairs, turn 180 degrees, turn right 180 degrees, turn 90 degrees, turn right 90 degrees 16 kinds of action. Than the traditional action recognition, action recognition type improved.
The accuracy of the algorithm is 96.65%, which is higher than that of the traditional single action recognition system.