# Accurate Detection of Intelligent Running Posture Based on Artificial Intelligence Sensor

Authors: Chenguang Zhang; Kun Cheng
Journal: Journal of Sensors
 (2022)

---

## Abstract

In order to solve the problem of low accuracy of human posture recognition during motion, the author proposes a human posture recognition and detection method based on multiple sensors. The method uses acceleration sensor, angular velocity sensor, and single-chip microcomputer to collect data; uses time domain and frequency domain analysis methods to analyze the collected data; and then uses Bayesian classifier to classify and identify the current motion posture of the human body. The obtained results are as follows: in the traditional method, with the increase of subjects, the accuracy of the classification method continues to decline; when the number of subjects reaches 50, the accuracy rate is only 60%; in the experiment, the zero crossing times of the acceleration signal axis are selected, and the axis area of the angular velocity signal is used as the characteristic item to distinguish the two different attitudes of going upstairs and going downstairs; the discrimination can reach about 90%. The authors combine the data collected by the acceleration sensor and the angular velocity sensor to perform feature extraction and classification, and the classification accuracy can reach more than 95%. It is proved that the method proposed by the authors can perform human gesture recognition very quickly and has a high accuracy rate.


---

## Body

## 1. Introduction

The degree of human health can be reflected by the posture of the human body, so it is more and more popular to judge the degree of physical health by the posture of the human body [1]. In the field of pattern recognition, the recognition of human motion gestures has become a hot research topic [2]. In recent years, with the rapid development of human-computer interaction and other technologies, human motion gesture recognition technology has been widely used in various aspects such as competitive sports, rehabilitation therapy, and somatosensory games [3]. Among these applications, in the field of biomedicine, the typical application is the application dedicated to the detection and evaluation of the daily life of the elderly and this special population undergoing rehabilitation therapy [4].With the progress of the times and the development of society, the aging of the population is becoming more and more serious, and a new type of family living alone or called empty-nest family has appeared in the society. This is because in rural areas in my country, most people aged 15-30 leave the countryside to study or work in other places. The elderly in rural areas always live alone with no one taking care of them, and at present, the country cannot provide good social security for these elderly people living alone [5]. Due to the decline of the functions of the elderly in all aspects of the body, the current social focus is more on the physical health of the elderly who live alone without care. In people’s daily life, the posture of the human body is closely related to the health of the human body; the injury caused by the fall of the elderly is very serious and even endangers life safety; serious harm caused may include soft tissue injury, muscle tear, collision, cerebral hemorrhage or accidental head injury, and spinal fracture [6, 7].Collecting the movement data of the elderly in daily life, establishing a large sample movement database, and then estimating and predicting the mobility of the elderly through data mining and analysis of movement information and predicting the possibility of potential falls and, accidental falls due to various internal and external factors are of great significance.


## 2. Literature Review

The recognition of human motion poses has received more and more attention from researchers and enterprises. There are already corresponding products on the market. The current human motion gesture recognition technology can be divided into the following two types: the first is to use video technology to detect the motion state of the elderly [8]. The second is monitoring through portable devices [9]. The advantage of using the wearable portable body motion gesture recognition device is that there are no restrictions on the monitoring places of the elderly, the elderly can go anywhere at will and can monitor their movement status, which is superior to video surveillance [10].The recognition system of human body motion posture based on video device and the monitoring system of human body motion state based on video method are to carry out specific monitoring on the places where the elderly often come and go; in this way, the movement state of the elderly can be monitored with high probability, and since the video technology can intuitively judge the fall posture of the elderly, it will also be of great help to the later treatment [11]. Scientific researchers have also conducted in-depth research on the recognition system of human motion and posture based on video devices and have achieved good results in video surveillance; however, video surveillance can only perform real-time monitoring of fixed places, which affects the travel of the elderly; if the elderly do not appear in frequently occurring areas, video surveillance will not work, and video surveillance will also cause the leakage of the personal privacy of the elderly [12].Wearable sensor-based attitude monitoring system, a wearable-based portable motion state monitoring method, is not limited by the monitoring area, and because it is a portable device, therefore, it is easy to carry, and the elderly can decide where they want to go according to their own ideas, and at the same time, they can also let medical staff or relatives know their own motion status. When the motion parameters change, the current motion posture of the human body can be judged by algorithms [13, 14].The disadvantages of the testing equipment currently on the market are as follows:(1)
The reliability of detection is not high due to the limitation of sensor reliability and software algorithm(2)
The cost is higher, the volume is larger, and it is not conducive to portability(3)
Due to the limitation of product technology, the scope of application of the product is greatly limited, and the quality of the product needs to be improved [15]In the 1950s, some scholars used sensors to judge the motion state of the human body [16]. With the development of MEMS technology, the use of sensor technology to monitor the state of human motion has achieved unprecedented development [17]. In addition, many technologies are borrowed from speech recognition technology and are also used to judge the motion state of the human body [18]. In terms of human motion gesture recognition, some basic actions of people’s daily life, such as walking, jogging, sitting, and standing, can also be successfully recognized [19, 20].Based on the current research, the authors aim at the motion gesture recognition of wearable sensors, combined with the signals of the acceleration sensor and the angular velocity sensor; the collected data is analyzed using the time domain and frequency domain analysis methods, and then, the Bayesian classifier is used to classify and identify the current motion posture of the human body.


## 3. Research Methods

### 3.1. Circuit Planning and Design Production

In the process of recognizing the current motion posture of the human body, the most important step is to collect the data of the current motion posture of the human body; in order to achieve accurate classification and recognition of the current motion posture of the human body, it is necessary to rely on the analysis of these collected data; the accuracy of the collected data is of crucial significance for the subsequent modeling analysis, pose classification, and recognition using Matlab on the host computer; the realization of the device for collecting human motion and attitude information has also become an important issue [21].The human motion information collection device follows the design guidelines of low cost, low power consumption, easy to wear, and strong environmental adaptability [22]. The human body motion information collection device includes a microprocessor, a three-axis acceleration sensor, a three-axis angular velocity sensor, and a power management module, which is responsible for collecting and storing motion data and information [23]. Among them, each sensor measures the vector data of acceleration and angular velocity, respectively. The microprocessor is responsible for collecting the information of each sensor and storing the collected information in its own Flash; when the human body motion information collecting device is connected to the upper computer, the stored information is read out, and it is sent to the host computer through the UART communication interface. The power management module is responsible for supplying power to the microprocessor, each sensor, and all the electronic components on the circuit board. The specific structural block diagram is shown in Figure 1.Figure 1
Structure block diagram of human motion gesture recognition system.


### 3.2. Experiment Organization and Conduct

In order to obtain the characteristic data of the human body in various states, this subject needs to measure the daily activities of volunteers [24].We collected data from 37 males and 13 females, for a total of 50 subjects in the specified motion poses. During the experiment, we counted the age, height, and weight of the subjects, mainly because in many previous research works, there have been cases of misclassification and identification due to individual differences of subjects. The mean and variance of subjects’ age were 22.2 years and 0.7, respectively; the mean and variance of height were 1.72 meters and 0.006; and the mean and variance of weight were 64.04 kg and 2.93, respectively.During the experiment, we did not specifically require the subjects to exercise in a specified way [25]. The subjects all followed their usual habitual movement posture for the test. For example, in the process of collecting the movement posture data of going up and down the stairs, the subjects can be allowed to go up two steps at a time, or they can run downstairs. We have not made too many requirements for this.


### 3.3. Experimental Data Collection and Recording

The experimental data is collected and stored in the built-in 64K Flash of the IAP15F2K6IS2, and then, the data is transmitted to the host computer through the UART serial communication protocol. From the data sheet of the ADXL345 accelerometer, it is known that this accelerometer needs to use 6 bytes to store the collected data each time; these data will be stored in the IAP15F2K6IS2 in the form of two’s complement; when using Matlab for time domain, frequency domain, and classification, the decimal data needs to be used; however, the data uploaded to the host computer by the UART serial communication protocol is in hexadecimal, so it is necessary to perform accurate data type conversion many times in this process.For example, first, the sensor needs to use 6 consecutive bytes of data registers to store the data of a certain time. According to the introduction of the data sheet of the ADXL345 accelerometer, among these 6 consecutive bytes, the first two bytes of data is axis data, the middle two bytes of data isx-axis data, and the last two bytes of data is data for the y-axis. Then, use the IC bus protocol to store these data in the 64 K Flash that comes with the microcontroller for temporary storage. Finally, a piece of data stored in the microcontroller is uploaded to the host computer through the UART serial communication protocol and stored in the “.TXT” text, and then, the data is processed by Matlab; these data need to be converted to decimal form before processing. “O0FE” converted to decimal form is -1, “0002” converted to decimal form is +2, and “005A” converted to decimal form is +90. Multiply the data of each axis by the currently set resolution 3.9 mg/LSB of the sensor; it is the size of the acceleration we need to measure in the end, that is,
(1)ax=−3.9g,ay=+7.8g,az=+351g.In the formula,ax, ay, and az represent the output results of x-, y-, and z-axes; g represents the acceleration of gravity, which is the unit of acceleration.


### 3.4. Data Collection of Human Motion Gesture Recognition System

The data acquisition device of the human motion gesture recognition system adopted by the authors uses the Keil uVision4 development environment and performs top-down software programming according to the compilation principle of C language; the data acquisition device includes a microcontroller IAP1SF2K6IS2 and an acceleration sensor or a microcontroller IAP15F2K6IS2 and an angular velocity sensor.The main functions of the microcontroller is as follows: determine the current state of collecting data or uploading data; collect sensor data in real time and write the collected data into Flash; and read data from Flash, and transmit it to the host computer through the UART communication interface. Therefore, the software programming in the microcontroller mainly includes the following modules, including microcontroller initialization, sensor initialization, data acquisition, and reading and writing. The steps required for the initialization of the microcontroller mainly include initializing the system clock and setting the timer and initializing the I2C communication interface protocol, the UART communication interface protocol, and various related peripheral I/O interfaces. The configuration required for acceleration and angular velocity sensors mainly includes initialization and zero drift calibration. The data acquisition operation is completed by using the I2C communication interface. The data read and write operation is to write data to the Flash of the microcontroller and read data from the Flash of the microcontroller. The data transmission operation is realized through the UART interface to transfer the data of the microcontroller, one-way transmission function uploaded to the host computer, as shown in Figure2.Figure 2
The embedded program flow chart of the data acquisition device of the human motion gesture recognition system.


## 3.1. Circuit Planning and Design Production

In the process of recognizing the current motion posture of the human body, the most important step is to collect the data of the current motion posture of the human body; in order to achieve accurate classification and recognition of the current motion posture of the human body, it is necessary to rely on the analysis of these collected data; the accuracy of the collected data is of crucial significance for the subsequent modeling analysis, pose classification, and recognition using Matlab on the host computer; the realization of the device for collecting human motion and attitude information has also become an important issue [21].The human motion information collection device follows the design guidelines of low cost, low power consumption, easy to wear, and strong environmental adaptability [22]. The human body motion information collection device includes a microprocessor, a three-axis acceleration sensor, a three-axis angular velocity sensor, and a power management module, which is responsible for collecting and storing motion data and information [23]. Among them, each sensor measures the vector data of acceleration and angular velocity, respectively. The microprocessor is responsible for collecting the information of each sensor and storing the collected information in its own Flash; when the human body motion information collecting device is connected to the upper computer, the stored information is read out, and it is sent to the host computer through the UART communication interface. The power management module is responsible for supplying power to the microprocessor, each sensor, and all the electronic components on the circuit board. The specific structural block diagram is shown in Figure 1.Figure 1
Structure block diagram of human motion gesture recognition system.


## 3.2. Experiment Organization and Conduct

In order to obtain the characteristic data of the human body in various states, this subject needs to measure the daily activities of volunteers [24].We collected data from 37 males and 13 females, for a total of 50 subjects in the specified motion poses. During the experiment, we counted the age, height, and weight of the subjects, mainly because in many previous research works, there have been cases of misclassification and identification due to individual differences of subjects. The mean and variance of subjects’ age were 22.2 years and 0.7, respectively; the mean and variance of height were 1.72 meters and 0.006; and the mean and variance of weight were 64.04 kg and 2.93, respectively.During the experiment, we did not specifically require the subjects to exercise in a specified way [25]. The subjects all followed their usual habitual movement posture for the test. For example, in the process of collecting the movement posture data of going up and down the stairs, the subjects can be allowed to go up two steps at a time, or they can run downstairs. We have not made too many requirements for this.


## 3.3. Experimental Data Collection and Recording

The experimental data is collected and stored in the built-in 64K Flash of the IAP15F2K6IS2, and then, the data is transmitted to the host computer through the UART serial communication protocol. From the data sheet of the ADXL345 accelerometer, it is known that this accelerometer needs to use 6 bytes to store the collected data each time; these data will be stored in the IAP15F2K6IS2 in the form of two’s complement; when using Matlab for time domain, frequency domain, and classification, the decimal data needs to be used; however, the data uploaded to the host computer by the UART serial communication protocol is in hexadecimal, so it is necessary to perform accurate data type conversion many times in this process.For example, first, the sensor needs to use 6 consecutive bytes of data registers to store the data of a certain time. According to the introduction of the data sheet of the ADXL345 accelerometer, among these 6 consecutive bytes, the first two bytes of data is axis data, the middle two bytes of data isx-axis data, and the last two bytes of data is data for the y-axis. Then, use the IC bus protocol to store these data in the 64 K Flash that comes with the microcontroller for temporary storage. Finally, a piece of data stored in the microcontroller is uploaded to the host computer through the UART serial communication protocol and stored in the “.TXT” text, and then, the data is processed by Matlab; these data need to be converted to decimal form before processing. “O0FE” converted to decimal form is -1, “0002” converted to decimal form is +2, and “005A” converted to decimal form is +90. Multiply the data of each axis by the currently set resolution 3.9 mg/LSB of the sensor; it is the size of the acceleration we need to measure in the end, that is,
(1)ax=−3.9g,ay=+7.8g,az=+351g.In the formula,ax, ay, and az represent the output results of x-, y-, and z-axes; g represents the acceleration of gravity, which is the unit of acceleration.


## 3.4. Data Collection of Human Motion Gesture Recognition System

The data acquisition device of the human motion gesture recognition system adopted by the authors uses the Keil uVision4 development environment and performs top-down software programming according to the compilation principle of C language; the data acquisition device includes a microcontroller IAP1SF2K6IS2 and an acceleration sensor or a microcontroller IAP15F2K6IS2 and an angular velocity sensor.The main functions of the microcontroller is as follows: determine the current state of collecting data or uploading data; collect sensor data in real time and write the collected data into Flash; and read data from Flash, and transmit it to the host computer through the UART communication interface. Therefore, the software programming in the microcontroller mainly includes the following modules, including microcontroller initialization, sensor initialization, data acquisition, and reading and writing. The steps required for the initialization of the microcontroller mainly include initializing the system clock and setting the timer and initializing the I2C communication interface protocol, the UART communication interface protocol, and various related peripheral I/O interfaces. The configuration required for acceleration and angular velocity sensors mainly includes initialization and zero drift calibration. The data acquisition operation is completed by using the I2C communication interface. The data read and write operation is to write data to the Flash of the microcontroller and read data from the Flash of the microcontroller. The data transmission operation is realized through the UART interface to transfer the data of the microcontroller, one-way transmission function uploaded to the host computer, as shown in Figure2.Figure 2
The embedded program flow chart of the data acquisition device of the human motion gesture recognition system.


## 4. Analysis of Results

### 4.1. Comparison of Traditional Classification Methods for Going Up and Downstairs

When recognizing some basic daily actions, such as standing, walking, running, and falling, it is difficult to accurately identify the posture of the human body going up and down the stairs using the same method, as shown in Table1. By analyzing Figure 3, it can be known that the researchers did not invite too many subjects during the experiment, and the recognition rate obtained was also very low, and with the increase of subjects, the recognition rate decreased significantly.Table 1
The traditional classification method of going up and down the stairs.
ClassifierNumber of collectorsNumber of action categoriesBayesian15L1 distance249Decision trees, support vector machines, naive Bayes28K-NN68J4868MLP64GMM505Figure 3
Recognition rate of traditional classification going up and downstairs.


### 4.2. Feature Item Selection

In the process of distinguishing human body posture, in order to achieve the effect of accurately distinguishing the posture of the human body going up and down the stairs, it is necessary to select the most representative features as much as possible, reduce the difficulty of classification, and realize the accurate analysis of the posture of the human body going up and down the stairs.Feature extraction refers to finding useful information in the data and searching for the most representative features from many features, thereby reducing the difficulty of subsequent processing.The zero crossing times of thex-, y-, and z-axes of the acceleration signal can be selected, combined with the area of the x-, y-, and z-axes of the angular velocity signal, as the characteristic item to distinguish the two different attitudes of going upstairs and going downstairs.


### 4.3. Classifier Selection

Before classification, the classifier is first trained on samples. Among the 50 sets of experimental data we collected, the feature items of 45 sets of experimental data were extracted for sample training of the classifier. Then, use the trained classifier to classify the features of the remaining 5 sets of experimental data. The classification results are shown in Figures4 and 5.Figure 4
Classification results of going downstairs.Figure 5
Classification results of going upstairs.As can be seen from the classification results in Figures4 and 5, the authors combine the data collected by the acceleration sensor and the angular velocity sensor, perform feature extraction and classification to achieve accurate classification of the posture of the human body going up and down the stairs, and can relatively accurately distinguish the different postures of the subject going up and down the stairs.


## 4.1. Comparison of Traditional Classification Methods for Going Up and Downstairs

When recognizing some basic daily actions, such as standing, walking, running, and falling, it is difficult to accurately identify the posture of the human body going up and down the stairs using the same method, as shown in Table1. By analyzing Figure 3, it can be known that the researchers did not invite too many subjects during the experiment, and the recognition rate obtained was also very low, and with the increase of subjects, the recognition rate decreased significantly.Table 1
The traditional classification method of going up and down the stairs.
ClassifierNumber of collectorsNumber of action categoriesBayesian15L1 distance249Decision trees, support vector machines, naive Bayes28K-NN68J4868MLP64GMM505Figure 3
Recognition rate of traditional classification going up and downstairs.


## 4.2. Feature Item Selection

In the process of distinguishing human body posture, in order to achieve the effect of accurately distinguishing the posture of the human body going up and down the stairs, it is necessary to select the most representative features as much as possible, reduce the difficulty of classification, and realize the accurate analysis of the posture of the human body going up and down the stairs.Feature extraction refers to finding useful information in the data and searching for the most representative features from many features, thereby reducing the difficulty of subsequent processing.The zero crossing times of thex-, y-, and z-axes of the acceleration signal can be selected, combined with the area of the x-, y-, and z-axes of the angular velocity signal, as the characteristic item to distinguish the two different attitudes of going upstairs and going downstairs.


## 4.3. Classifier Selection

Before classification, the classifier is first trained on samples. Among the 50 sets of experimental data we collected, the feature items of 45 sets of experimental data were extracted for sample training of the classifier. Then, use the trained classifier to classify the features of the remaining 5 sets of experimental data. The classification results are shown in Figures4 and 5.Figure 4
Classification results of going downstairs.Figure 5
Classification results of going upstairs.As can be seen from the classification results in Figures4 and 5, the authors combine the data collected by the acceleration sensor and the angular velocity sensor, perform feature extraction and classification to achieve accurate classification of the posture of the human body going up and down the stairs, and can relatively accurately distinguish the different postures of the subject going up and down the stairs.


## 5. Conclusion

In the field of pattern recognition, the recognition of human motion gestures has become a hot research topic. In recent years, with the rapid development of human-computer interaction and other technologies, human motion gesture recognition technology has been widely used in various aspects such as competitive sports, rehabilitation therapy, and somatosensory games. However, the recognition of human motion posture is still in its infancy, and the distinction of many human motion postures is extremely difficult, and there are many technical problems to be solved. Although sensor-based human motion gesture recognition technology has developed rapidly in recent years, there have been many studies that can accurately identify the human body in the process of daily life activities; the most basic gestures are shown; the authors study the posture of the human body going upstairs and downstairs. The result obtained is as follows:(1)
The collection of motion data is the basis of gesture recognition research. The authors’ portable human motion information acquisition device is composed of a three-axis acceleration sensor, a three-axis angular velocity sensor, a microprocessor, and a power management module. The collected data is stored in the 64K Flash that comes with the microprocessor, and then, the stored data is uploaded to the host computer through the UART protocol for subsequent data conversion, calculation, and analysis(2)
Using the time domain, that is, the acceleration modulus algorithm to identify the current motion posture of the human body, can quickly identify the current motion posture of the human body, but if the time domain-based recognition method is simply used, it is easy to cause errors and confusion in posture recognition. In order to improve this recognition error, we combine the frequency domain analysis method to analyze the frequency domain characteristics of the signal to distinguish some basic daily postures of the human body (especially the falling posture of the human body) and improve the accuracy of the recognition of some basic daily postures of the human body(3)
A Bayesian classifier is applied to solve the confusion problem of upstairs and downstairs movements. First, filter and calculate the data collected by the acceleration sensor and angular velocity sensor. Then, feature extraction is performed on the preprocessed acceleration data and angular velocity data. Finally, a Bayesian classifier is used for classification and identification



---

*Source: 6561159-2022-07-16.xml*