Research on Body Posture Classification Algorithm Based on Acceleration

In this paper, based on the wireless acceleration sensor, a wearable body data acquisition system is designed. The acceleration vector magnitude and the angular velocity vector amplitude signal are selected as the breakthrough of the body posture recognition. The focus is on the classification algorithms of the 10 body types commonly used by the soldiers, including Qi Bu walking, goose step, running, low posture, side posture, high posture, push-ups, sit-ups, upstairs and downstairs. The time domain features, frequency domain features and time-frequency characteristics of the signals are analysed respectively. The high-dimensional mixed feature vectors are extracted and reduced by LDA. A support vector machine algorithm based on hybrid features is proposed. The algorithm has been verified by experiments and achieved ideal results. 1 Body posture acceleration signal preprocessing The body movements generally have a low frequency of change. The signals such as gait movements, tactical movements and physical training movements collected in this paper are low frequency signals. Due to the high sensitivity of the acceleration sensor, in addition to the above action signals, the collected signals often contain various interference noises, such as environmental noise, random noise pollution during signal transmission, clamping the sensor in the collar, and the jitter of the clothes. It also brings noise. In this paper, the acceleration vector amplitude and angular velocity vector amplitude are calculated for the self-acquired three-dimensional acceleration, threedimensional angular velocity and three-dimensional angle. Then the preconditioning of the sliding time window segmentation, low pass filtering, median filtering and normalization are performed respectively. Due to the signal strength and frequency bandwidth of these noises, the interference to the body signal is large, so it is necessary to use a low-pass filter for processing. For spikes, median filtering is required. To eliminate the interference caused by the absolute amount of different amplitudes, the signal is normalized to the interval [-1, 1]. Studies have shown that the signal frequency of body activity is mainly below 17 Hz. In this paper, the 7thorder IIR Butterworth low-pass filter is designed by the impulse response invariant method. The determined digital low-pass filter technical specification is that the intra-passband frequency is lower than 20Hz, the tolerance is within 3dB, and the stopband boundary frequency is 26 Hz, the minimum attenuation of the stop band is 15 dB, and the sampling frequency is 200 Hz. 2 Mixed feature extraction and dimensionality reduction Before feature extraction, it is necessary to analyse the signal characteristics. The autocorrelation function is a common means to study and analyse the periodicity and symmetry of signals. For the stationary stochastic process x(n) traversed by states, the autocorrelation function of Rxx is 1 1 R (m) lim (n) x(n ) N xx N n x m N      (1) Where N is the number of sampling points and m is the system delay. The autocorrelation function is divided into two types: partial autocorrelation and unbiased autocorrelation. The unbiased autocorrelation function of the signal is defined as R̂ xx


Body posture acceleration signal preprocessing
The body movements generally have a low frequency of change. The signals such as gait movements, tactical movements and physical training movements collected in this paper are low frequency signals. Due to the high sensitivity of the acceleration sensor, in addition to the above action signals, the collected signals often contain various interference noises, such as environmental noise, random noise pollution during signal transmission, clamping the sensor in the collar, and the jitter of the clothes. It also brings noise.
In this paper, the acceleration vector amplitude and angular velocity vector amplitude are calculated for the self-acquired three-dimensional acceleration, threedimensional angular velocity and three-dimensional angle. Then the preconditioning of the sliding time window segmentation, low pass filtering, median filtering and normalization are performed respectively. Due to the signal strength and frequency bandwidth of these noises, the interference to the body signal is large, so it is necessary to use a low-pass filter for processing. For spikes, median filtering is required. To eliminate the interference caused by the absolute amount of different amplitudes, the signal is normalized to the interval [-1, 1]. Studies have shown that the signal frequency of body activity is mainly below 17 Hz. In this paper, the 7thorder IIR Butterworth low-pass filter is designed by the impulse response invariant method. The determined digital low-pass filter technical specification is that the intra-passband frequency is lower than 20Hz, the tolerance is within 3dB, and the stopband boundary frequency is 26 Hz, the minimum attenuation of the stop band is 15 dB, and the sampling frequency is 200 Hz.

2
Mixed feature extraction and dimensionality reduction Before feature extraction, it is necessary to analyse the signal characteristics. The autocorrelation function is a common means to study and analyse the periodicity and symmetry of signals. For the stationary stochastic process x(n) traversed by states, the autocorrelation function of Rxx is Where N is the number of sampling points and m is the system delay. The autocorrelation function is divided into two types: partial autocorrelation and unbiased autocorrelation. The unbiased autocorrelation function of the signal is defined as Where m is an arbitrary integer. R xx is a measure of the degree of association between a signal and its signal after translation by m units. The nature of the autocorrelation function tells us that the autocorrelation function of the stationary periodic process must be a periodic function, and the period T is constant, and the autocorrelation coefficient takes the maximum value when the signal delay is equal to T. Figure 1 is a partial image of an unprocessed push-up acceleration vector magnitude autocorrelation function. By observing the acceleration autocorrelation function image, the approximate action period of the warrior doing push-ups can be obtained according to the spacing of adjacent peak-to-peak values. If the number of sampling points per cycle, the sampling frequency is known, the action frequency c (number/min) of the fighter doing push-ups can be calculated by equation (3). This provides a quantitative indicator of the fighter's action intensity assessment.
The vector amplitudes of the acceleration and angular velocity in the time window are respectively subjected to DFT transformation to obtain the amplitude spectrum. Figure 2 shows the amplitude spectrum of the push-up signal. The visible frequency is mainly concentrated in the low frequency part, and the first 15th order spectrum contains the main information. In this paper, the first 18-order spectrum is selected as the feature, so the frequency domain eigenvector is 36-dimensional.

Time-frequency feature
In terms of time-frequency characteristics of the signal, the acceleration and angular velocity signals are decomposed into four layers, and the wavelet packet energy spectrum features are extracted. Figure 3 is a schematic diagram of the energy of each layer of the four-layer wavelet decomposition. The energy of the 16th node of the fourth layer is extracted, and their respective energy ratios are characterized, so that the 32-dimensional time-frequency eigenvector is obtained. The fourth layer wavelet packet energy spectrum extraction method is as follows: firstly, the signal is decomposed by 4 layers of wavelet packets to obtain the decomposition coefficients of the 16 sub-bands of the 4th layer, and then the coefficients of each node are reconstructed, and the signals of each sub-band range are extracted, and finally The energy of each sub-band signal is calculated and the energy ratio is obtained. Figure 3. Wavelet decomposition node energy tree

LDA dimension reduction
The time domain features of the extracted signal are 22-dimensional, the frequency domain features are 36dimensional, and the time-frequency features are 32dimensional. The mixture is 90-dimensional, and the feature vector dimension is too high, which increases the workload of the classifier and requires dimensionality reduction. The dimensionality reduction method usually has two kinds of PCA and LDA, which are similar to each other and belong to the linear dimensionality reduction algorithm. The main principle of PCA is to find the mapping that best represents the original data under the minimum mean square condition, and LDA is the mapping that can distinguish the various types of data under the minimum mean square condition, so that the similar data is as close as possible, and different types of data are as separated as possible. This paper chooses the LDA dimension reduction algorithm.

Body posture classification algorithm based on Support Vector Machine
The principle of support vector machine is two classification. When multiple classification problems are involved, several multi-classification strategies are derived. At present, the support vector machine multiclass classification strategy of the current week includes one-to-one (OVO, one-versus-one), one-tomany (OVR, one-versus-rest) and hierarchical support vector machine (H-SVMs). The purpose is to transform the multi-classification problem into several two-class problem solving. Among them, the one-to-one strategy establishes a support vector machine for each sample of the two target categories. For samples containing n categories, it is necessary to train n*(n-1)/2 support vector machines; in training, classify a certain category into one category, and classify other categories into one category. For samples containing n categories, you need to train n support vector machines; the hierarchical support vector machine method is that all target categories are divided into two sub-categories, and the sub-classes are divided into two sub-categories until the sub-classes represent a single category. This method requires the least number of support vector machines to be trained. This paper deals with 10 kinds of postures, which belong to the multi-classification problem. It adopts a class of algorithms for the remainder class, and the vector machine kernel function selects the polynomial kernel function.

Experimental results and analysis
In this paper, a wearable body acquisition system based on wireless acceleration sensor is designed. The sampling rate of body data is 20Hz. In view of the timeliness of motion recognition and the integer power of 2, it is easy to calculate FFT. The window length is 64 sample points and the sliding overlap is 32. For each sample point, time window segmentation is performed on the acceleration vector and the amplitude and angular velocity vector and amplitude synchronization, so that the time window data segment is extracted once every interval of 1.6s. In this paper, a total of 40 people are collected, and 10 groups of each body are collected, so that there are 40 sets of samples for each posture, and then 10 time windows are slid out from each set of body samples, so that a total of 4000 time windows in which the synchronized acceleration time window and angular velocity time window are juxtaposed as a time window.
By processing the time window and extracting the feature vector, a hybrid feature space composed of time domain feature space, frequency domain feature space and time-frequency feature space is obtained (90 4000), and then LDA dimension reduction is performed on the mixed feature space. The feature space for vector machine classification and recognition. The experiment used the first 300 windows of each posture for the training vector machine, and the last 100 windows were used for identification verification. In the SVM body state recognition experiment based on the 90dimensional hybrid feature, the recognition rates of the 10 body states are shown in Fig. 4. The corresponding postures of the serial numbers 1~10 are Qi Bu walking, walking, running, low posture, side posture, high posture, push-ups, sit-ups, going upstairs and downstairs.

Figure 4. Recognition rate of SVM algorithm based on hybrid features
From the results of Fig. 4, the average classification recognition rate of the 10 kinds of postures in this paper reaches 98.9%, and the average error is 0.011. Since the 90-dimensional feature vector support vector machine training and recognition calculation is large and the real-time performance is poor, we perform LDA dimensionality reduction on the vector and select the appropriate dimension d according to the average error of the test. When d takes different values, the test results are shown in Figure 5. When d=9, the average error is the smallest, and the recognition effect of the 90-dimensional feature is achieved. When d=11, the error rises. So the final choice is to reduce the feature to 9 dimensions.

Conclusion
In this paper, 10 kinds of acceleration vector magnitude and angular velocity vector amplitude signal are aligned, such as Qi Bu walking, goose step, running, low posture, side posture, high posture, push-up, sit-up, upstairs and downstairs. Body mode is classified. The 90-dimensional hybrid eigenvectors including time domain, frequency domain and wavelet are extracted. The LDA is used to reduce the dimension of the mixed feature vector. The dimension vector after dimensionality reduction is only 9 dimensions, which greatly liberates the workload of the system.