# Big Data Energy Consumption Monitoring Technology of Obese Individuals Based on MEMS Sensor

Authors: Yongjun Zhao; Juan Zhao; Liang Ding; Congcong Xie
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

The application of micro electro mechanical system (MEMS) is more and more extensive, involving military, medical, communication and other major fields. The progress of science and technology has brought cross era changes to human beings, but also brought troubles to human beings. Because machines can replace most people, which leads to a significant reduction in human exercise, many people have the symptoms of obesity. Therefore, how to effectively detect human exercise energy consumption is of great significance to improve obesity symptoms. The energy consumption detector takes stm32f103zet6 as the core processor and uses the inertial sensor mpu6050 to build a MEMS sensor system to monitor the daily motion state and gait of human body in real time. In the design of the big data algorithm, the adaptive peak detection and step, decision tree two-level classification of motion recognition big data algorithm are organically integrated, and then combined with the acceleration vector value of the motion energy detection big data algorithm, to process the collected motion data, including the acceleration signal, gyroscope and other data processing, and finally complete the feature extraction, get the final recognition and detection results. Through the data reference, we can know that the system can recognize different human motion states. Among them, it has 95% accuracy in the motion recognition of sitting, standing, walking, running, going up and down stairs and lying back, which is basically the same as the top detectors on the market. In the energy consumption detection, it also has 95% accuracy, which proves the correctness of the experimental big data algorithm design, and also improves the accuracy It is proved that the system has good performance and high practicability, and can provide a new idea for obese individual motion detection.


---

## Body

## 1. Introduction

With the continuous progress of MEMS technology, the big data motion monitoring industry has developed rapidly in recent years. At the same time, in recent years, the construction of health monitoring system in various medical and health industries and enterprises has accelerated [1]. As an information content, gait data is becoming more and more popular. In the future, the motion state data will use the motion energy consumption classification big data algorithm to achieve specific target tasks, such as daily motion or motion energy consumption monitoring. With the application of these technologies in daily life, it is very important to accurately classify the existing motion state capture and recognition models [2]. Waegli et al. proposed an improved coarse alignment method and quaternion estimation method to calculate the initial direction. Simulation and practical experiments show that the two methods are stable in any initial direction for large data sensors with MEMS Imus error characteristics [3]. Bottenfield et al. used MEMS IMU to obtain angle, acceleration, velocity and displacement data for the simulation of eye response and head impact test. The simulated collision test was carried out by 3D printing skull model and manikin [4]. Sang et al. proposed a method to locate the pulse source using MEMS microphone and delay and beamforming. The time and position of the ball in three-dimensional space are determined by high-speed infrared scanning method. The experimental results show that the sound based ball motion estimation has a larger range of motion than the camera based method [5]. Nguyen et al. proposed a MEMS based pressure sensor, which can simultaneously measure blood pulse wave and respiratory rate with only one sensor element. The tube of the sensor device contacts the angular artery of the object and the area above the nasal cavity, resulting in changes in pressure in the tube caused by the subject’s pulse wave and breathing. Experiments show that it is feasible to extract pulse wave and respiratory related information by using the low-frequency and high-frequency components of sensor signals [6]. Park et al. uses MEMS sensor information of wearable devices to identify relevant basic hand movements. The acceleration and gyroscope collected by MEMS are used to process the sensor information, and the distance between the data sensor and the sensor is calculated according to the stored information. The experimental results show that compared with the traditional research, the action recognition method can distinguish many actions, and the average recognition rate is 97.1% [7]. Tu et al. proposed a big data algorithm for gait recognition based on MEMS acceleration sensor. Local key points are used to generate sparse gait feature location templates, and template fusion is used to transform sparse gait periodic features effectively. Finally, the nearest neighbor big data algorithm and voting mechanism are used to identify gait features. The experimental results show that the recognition rate is 98.67% and the authentication rate is 99.89% [8].Morozov et al. proposed a MEMS accelerometer model with two movable beam elements located between two fixed electrodes. The longitudinal inertial force changes the spectrum characteristics of the system and can be used as the output signal of big data sensor. The results show that the sensitivity of the big data sensor based on mode positioning is higher than that based on natural frequency drift [9]. Using data from synchronous sensors, Francesco et al. can give a comprehensive overview of user mobility. MEMS system can measure pole angle, arm cycle frequency and synchronization, and thrust applied on the ground. In addition, the data from the GPS module gives the environment image of the active session in terms of distance, slope and ground type [10]. Sheng et al. designed an adaptive attitude measurement big data algorithm based on MEMS gyroscope and accelerometer. The big data algorithm adopts extended Kalman filter to realize data fusion. At the same time, the Allan variance is used to estimate the dynamic noise of MEMS Gyro, and the big data algorithm with forgetting factor and limited memory is added. The experimental results show that the combination of the two can achieve high-precision attitude measurement, verify that the big data algorithm has good dynamic noise suppression ability, and improve the adaptability of the system to environmental changes [11]. Wang et al. proposed an adaptive tracking Kalman filter for UAV MEMS navigation. The filter transforms the strong inertial navigation system, and uses the optimal adaptive factor technology to overcome the influence of noise uncertainty and motion model error. For small UAV applications, large or small initial attitude error can be ensured without changing the model [12]. Tao et al. proposed a gait authentication method based on MEMS inertial sensors. They are fixed on smart shoes, collect motion signals and send them to the server. Then, gait parameters such as step length, gait frequency, attitude phase, swing phase and pitch angle are calculated as the characteristics of personal recognition. A new big data probabilistic neural network classification mechanism is proposed as the only mechanism to identify different users. Experimental results show that the method is effective. The average classification rates of 22 people reached 85.3% and 85.7%, respectively [13]. Reddy et al. studied two important dimensionality reduction techniques, linear discriminant analysis (LDA) and principal component analysis (PCA), on four popular machine learning (ML) algorithms [14]. Resnik et al. demonstrated the process of this study by using specially designed MEMS acceleration sensors for measurement and subsequent evaluation on a bridge in Armenia. These findings confirm the great potential of this method in monitoring support structures [15]. The fan s team used PDMS and polyimide MEMS flexible strain/pressure sensors. The device structure of MEMS can integrate three electrical sensors that output digital signals into the strain and pressure detection area. The results show that the engineering data sensors with different bending sensitivity can be applied to the control of robot arm [16].The innovative contribution of this paper is to use the inertial sensor mpu6050 to build a MEMS sensor system to monitor the daily motion state and gait of human body in real time, and introduce the dynamic threshold detection method for gait recognition. Aiming at the shortcomings of the system gyroscope, the adaptive dynamic threshold is used to improve it.


## 2. Motion State Feature Extraction Technology and Energy Consumption Monitoring Big Data Algorithm Design

### 2.1. Analysis of Gait Detection Methods

Walking is a very effective aerobic exercise for obese individuals. At present, there are mainly two methods to detect the number of steps, one is dynamic threshold detection. This method mainly calculates the number of experimental steps through the detection of dynamic threshold and dynamic accuracy. In a complete step cycle, three directions of acceleration will be generated. In the measurement, three directions are defined as X, Y and Z. Through the monitoring of acceleration in these three directions, the acceleration threshold in each direction is extracted. At the same time, the sampling frequency is set to 50 Hz to adjust the dynamic accuracy. Finally, the average value of the maximum threshold and the minimum threshold in the same direction is calculated as the dynamic threshold. The calculation method of the dynamic threshold is shown in Figure1.Figure 1
Schematic diagram of dynamic threshold big data algorithm.In Figure1, displacement register and dynamic threshold play a key role in accurate recognition. The former is composed of new and old sampling value registers, which are used to store new and old sampling data, respectively. In the judgment of acceleration, the acceleration that exceeds or equals to the dynamic accuracy is input into the new sampling value register. On the contrary, if the acceleration is ignored, the data in the new sampling value register remains unchanged. Figure 2(a) shows the change of dynamic threshold in motion. It can be seen that the acceleration curve in a complete step will pass through the dynamic threshold from top to bottom, but this method is not accurate in vibration recognition, and the recognition accuracy is low. In view of this defect, the second method can be used to optimize and improve the first method.Figure 2
Periodic sinusoidal waveform of vertical acceleration.
(a)
Dynamic threshold diagram(b)
Periodic sinusoidal waveform of vertical accelerationIn the process of walking, with the constant change of the center of gravity, the change of the acceleration signal is similar to the sine wave change curve, and the most significant change is thez-axis acceleration signal. As shown in Figure 2(b), the dotted line represents the ideal sine waveform, and the solid line represents the vertical acceleration waveform generated during walking. According to the different slopes before and after the peak value of the sine wave, the sampling values before and after the difference are made in turn, and the positive and negative slopes are used to locate the turning point of the slope, so as to judge the peak value. In addition, in the process of walking, people will have two different movement states, namely normal and abnormal, and the corresponding movement states are walking and running. In view of these two states, different threshold parameters need to be set for segmented recognition. The big data algorithm uses the acceleration vector to replace the single axis acceleration signal, which can effectively avoid the problem of low adaptability of the sensor attitude when the human body is in different movements to some extent, and can effectively avoid the confusion of the initial big data algorithm in dealing with different states of movement, which greatly improves the accuracy of the pedometer. The flow chart of the improved big data algorithm is shown in Figure 3.Figure 3
Adaptive peak detection method.As shown in Figure3, the frequency range of people in normal walking state is almost in the range [1,2.5], while the frequency range of people in fast motion state is in the range [1.5,5]. In view of the increase of step rate during running, appropriately increasing the sampling frequency can maximize the complete acquisition of gait information. To sum up, set the sampling frequency to 50 Hz. At the same time, two threshold parameters and domain window length are set for different motion states to detect the peak. The process can be divided into four parts. The first part is to calculate the acceleration vector value generated in the movement and filter the invalid data. The purpose is to detect the change of the overall acceleration and reduce the influence of the sensor posture. The second part is to determine the gait. In this process, a 20 length sliding window is selected, and the maximum value is selected as the potential peak value The acceleration threshold in walking state is between 1 g-1.34 g, and that in running state is between 1.34 g-1.83 g. These two intervals are the important basis for judging gait. The third part sets the time threshold discrimination range of normal state and abnormal state, the former range is [0.4 s, 1 s] and the latter range is [0.2S, 0.4 s]. The calculation here is based on the difference between the peak time, and the difference between the previous peak and the potential peak is calculated, and the value will be used as the basis for the second judgment; the last part is the step judgment. Here, we need to set the corresponding size of the field window for different motion states, and set the window length of the normal field and the abnormal field to be 10 and 5, respectively, and calculate the difference according to the peak sequence And the maximum difference is selected for the next judgment. If the peak is within the set range, it is determined that the monitoring object has completed one step walking, otherwise, the data remains unchanged.


### 2.2. Two Level Classified Action Recognition Big Data Algorithm Based on Decision Tree

Based on MEMS sensor technology, a two-layer classified motion recognition big data algorithm with decision tree as the core is proposed to recognize and capture common human actions. Firstly, the acceleration signals in X, Y and Z directions collected by the acceleration sensor are vector calculated to obtain the acceleration vector value VM. The energy consumption is calculated according to the formula w = FS. When the acceleration vector value changes, the time is integrated according to formula (1), and the motion energy consumption of the body in the time range is calculated.
(1)E=umg∫VM1VM2dVM∫t1t2tdtIn formula (1), E and u represent the energy consumption and parameters of human body movement; VM, VM1 and VM2, respectively, represent the acceleration vector value, the initial acceleration and the end acceleration before the movement; t1 represents the starting time, t2 represents the termination time; mg represents the weight of the subject. After consulting a large amount of data, it can be seen that when the independent operation and the velocimeter measure the attitude angle, generally speaking, in the static state, The accuracy of the system to obtain attitude angle by three directions is high, but there are some defects in dynamic performance, so gyro drift easily. Therefore, data fusion technology is needed to make up for this defect. When the object is in a static state, it can refer to formula (2).
(2)G2=Ax2+Ay2+Az2Ax, Ay, Az is the acceleration of three axes, which needs to be normalized. When the monitoring object is at rest, the vector value in z-axis direction is equal to 1. Common data fusion methods such as weighted average fusion method, although the method is simple and practical, the accuracy deviation is large. Neural network fusion method has the ability of self-learning and good nonlinearity, but the effect is still unsatisfactory in the application of parameter optimization and structural model, because of its complex operation and high limitations. Compared with the former two methods, Kalman filtering method can combine the advantages of the two methods, the big data algorithm is simple and efficient, has high robustness and strong adaptability, and can better fit the linear filtering characteristics. The principle of Kalman filter is to evaluate the system state before the unit time stage based on the state space model, find the optimal state estimation of the model in the time period, and then evaluate the actual measured value and the estimation of the system, and finally get the optimal value. The principle is shown in Figure 4.Figure 4
Schematic diagram of Kalman filter.As can be seen from Figure4, Kalman filter operation can be roughly divided into two parts, namely prediction and update correction. In the prediction stage, the first step is to calculate the prediction state Xkk−1 of the system at k, and get the matrix Pkk−1, Pkk−1 can accurately reflect the trust degree of the current estimated state. The larger the value is, the smaller the trust degree is. Pkk−1 is also defined as the error covariance matrix. The calculation formulas of the two are shown in formulas (3) and (4).
(3)Xkk−1=AXk−1k−1+BUk(4)Pkk−1=APk−1k−1AT+QkAmong them,A, B, Uk, Pkk−1, Pk−1k−1, Qk represents the matrix coefficient, the control quantity of current state, the covariance of Xkk−1 and Xk−1k−1, and the covariance of k-value estimation process. On the basis of formula (3), the angle measurement model equation is established for prior estimation, and the established equation is shown in formula (5).
(5)Angle+=Gyro−Q¯bias∗dtAmong them,angle and gyro, respectively, represent the optimal estimation of angle at a certain time and the time before that time, and the angle design measurement value of gyroscope. Q-bias is the zero drift value of the gyroscope. Generally speaking, the Q-bias of the system is the same every time. Then the system state estimation matrix is obtained by combining formula (3) and formula (4), and the result is shown in formula (6).
(6)AngleQ¯bias=1−dt01AngleQ¯bias+dt0GyroThe error covariance of the system is derived from formula (4), as shown in formula (7).
(7)Qk=covQ¯angle,Q¯anglecovQ¯bias,Q¯anglecovQ¯angle,Q¯biascovQ¯bias,Q¯biasWhereQ-angle is the covariance of gyro noise, because gyro drift noise and angle noise are two independent factors, the covariance between them is equal to 0. The second part of Kalman filter is the update phase. In this process, Kk is a two-dimensional variable, corresponding to two Kalman gains, Angle and Q-bias. The observation variable is the angle value obtained from the acceleration signal, and the measured value Accel is the measured value Zk, and the formula (8) is obtained.
(8)Kk=Pkk−1HTHPkk−1HT+R−1Kk=K¯0K¯1Among them,R, K¯0 and K¯1 represent the angle measurement noise, the Kalman gain of angle and the Kalman gain of gyroscope, respectively. The measurement equation in Kalman formula can be directly quoted here. The basic equation of Kalman is shown in formula (9).
(9)Zk=HXk+VkSinceQ¯bias and Accel have no relationship, it is concluded that,
(10)H=10(11)P×HT=abcd×10T=ac(12)H×P×HT=10×abcd×10T=a(13)Xkk=Xkk−1+KkZk−HXkk−1Finally, the error covariance is updated, as shown in formula (14).
(14)Pkk=I−KkHPkk−1I=1111Finally, formula (15) is obtained from formula (8):
(15)Pkk=Pkk−1−KkHPkk−1Among the above formulas, formula (3) (4) (8) (13), and (14) is the basic equation of Kalman filter, and the effect diagram of Kalman filter is shown in Figure 5.Figure 5
Effect of Kalman filter.
(a)
At rest(b)
In dynamic stateFinally, through the conversion, the complete Kalman filter is obtained. Figure5 (a) shows the waveform of mpu6050 when the sensor is stationary. It can be seen that the attitude angle of the gyroscope has a serious deviation with time. At this time, the X and Y axes of the sensor are parallel to the placement plane, and the Z axis is the direction of gravity. Therefore, from the overall force situation, the sensor is only affected by the acceleration of gravity. In this state, the attitude angle of the sensor is 0 in theory. The main reason of drift is the integral error of gyroscope signal. After Kalman filtering, the drift is corrected. Figure 5(b) shows the waveform generated by mpu6050 sensor after different degrees of vibration. It can be seen that the signal generated by gyroscope is calculated correctly in the period of 0-20, and it begins to drift after the time value exceeds 20, and the dynamic adaptability decreases seriously. After Kalman filter correction, the signal is very smooth, without bias. So it can be concluded that Kalman filter can accurately calculate the low attitude of the monitoring object in any state. On the one hand, it makes up for the defects of gyroscope, on the other hand, it provides a guarantee for the stable acquisition of the dynamic acceleration signal of the system, which greatly increases the accuracy of the system and improves the robustness of the system.


## 2.1. Analysis of Gait Detection Methods

Walking is a very effective aerobic exercise for obese individuals. At present, there are mainly two methods to detect the number of steps, one is dynamic threshold detection. This method mainly calculates the number of experimental steps through the detection of dynamic threshold and dynamic accuracy. In a complete step cycle, three directions of acceleration will be generated. In the measurement, three directions are defined as X, Y and Z. Through the monitoring of acceleration in these three directions, the acceleration threshold in each direction is extracted. At the same time, the sampling frequency is set to 50 Hz to adjust the dynamic accuracy. Finally, the average value of the maximum threshold and the minimum threshold in the same direction is calculated as the dynamic threshold. The calculation method of the dynamic threshold is shown in Figure1.Figure 1
Schematic diagram of dynamic threshold big data algorithm.In Figure1, displacement register and dynamic threshold play a key role in accurate recognition. The former is composed of new and old sampling value registers, which are used to store new and old sampling data, respectively. In the judgment of acceleration, the acceleration that exceeds or equals to the dynamic accuracy is input into the new sampling value register. On the contrary, if the acceleration is ignored, the data in the new sampling value register remains unchanged. Figure 2(a) shows the change of dynamic threshold in motion. It can be seen that the acceleration curve in a complete step will pass through the dynamic threshold from top to bottom, but this method is not accurate in vibration recognition, and the recognition accuracy is low. In view of this defect, the second method can be used to optimize and improve the first method.Figure 2
Periodic sinusoidal waveform of vertical acceleration.
(a)
Dynamic threshold diagram(b)
Periodic sinusoidal waveform of vertical accelerationIn the process of walking, with the constant change of the center of gravity, the change of the acceleration signal is similar to the sine wave change curve, and the most significant change is thez-axis acceleration signal. As shown in Figure 2(b), the dotted line represents the ideal sine waveform, and the solid line represents the vertical acceleration waveform generated during walking. According to the different slopes before and after the peak value of the sine wave, the sampling values before and after the difference are made in turn, and the positive and negative slopes are used to locate the turning point of the slope, so as to judge the peak value. In addition, in the process of walking, people will have two different movement states, namely normal and abnormal, and the corresponding movement states are walking and running. In view of these two states, different threshold parameters need to be set for segmented recognition. The big data algorithm uses the acceleration vector to replace the single axis acceleration signal, which can effectively avoid the problem of low adaptability of the sensor attitude when the human body is in different movements to some extent, and can effectively avoid the confusion of the initial big data algorithm in dealing with different states of movement, which greatly improves the accuracy of the pedometer. The flow chart of the improved big data algorithm is shown in Figure 3.Figure 3
Adaptive peak detection method.As shown in Figure3, the frequency range of people in normal walking state is almost in the range [1,2.5], while the frequency range of people in fast motion state is in the range [1.5,5]. In view of the increase of step rate during running, appropriately increasing the sampling frequency can maximize the complete acquisition of gait information. To sum up, set the sampling frequency to 50 Hz. At the same time, two threshold parameters and domain window length are set for different motion states to detect the peak. The process can be divided into four parts. The first part is to calculate the acceleration vector value generated in the movement and filter the invalid data. The purpose is to detect the change of the overall acceleration and reduce the influence of the sensor posture. The second part is to determine the gait. In this process, a 20 length sliding window is selected, and the maximum value is selected as the potential peak value The acceleration threshold in walking state is between 1 g-1.34 g, and that in running state is between 1.34 g-1.83 g. These two intervals are the important basis for judging gait. The third part sets the time threshold discrimination range of normal state and abnormal state, the former range is [0.4 s, 1 s] and the latter range is [0.2S, 0.4 s]. The calculation here is based on the difference between the peak time, and the difference between the previous peak and the potential peak is calculated, and the value will be used as the basis for the second judgment; the last part is the step judgment. Here, we need to set the corresponding size of the field window for different motion states, and set the window length of the normal field and the abnormal field to be 10 and 5, respectively, and calculate the difference according to the peak sequence And the maximum difference is selected for the next judgment. If the peak is within the set range, it is determined that the monitoring object has completed one step walking, otherwise, the data remains unchanged.


## 2.2. Two Level Classified Action Recognition Big Data Algorithm Based on Decision Tree

Based on MEMS sensor technology, a two-layer classified motion recognition big data algorithm with decision tree as the core is proposed to recognize and capture common human actions. Firstly, the acceleration signals in X, Y and Z directions collected by the acceleration sensor are vector calculated to obtain the acceleration vector value VM. The energy consumption is calculated according to the formula w = FS. When the acceleration vector value changes, the time is integrated according to formula (1), and the motion energy consumption of the body in the time range is calculated.
(1)E=umg∫VM1VM2dVM∫t1t2tdtIn formula (1), E and u represent the energy consumption and parameters of human body movement; VM, VM1 and VM2, respectively, represent the acceleration vector value, the initial acceleration and the end acceleration before the movement; t1 represents the starting time, t2 represents the termination time; mg represents the weight of the subject. After consulting a large amount of data, it can be seen that when the independent operation and the velocimeter measure the attitude angle, generally speaking, in the static state, The accuracy of the system to obtain attitude angle by three directions is high, but there are some defects in dynamic performance, so gyro drift easily. Therefore, data fusion technology is needed to make up for this defect. When the object is in a static state, it can refer to formula (2).
(2)G2=Ax2+Ay2+Az2Ax, Ay, Az is the acceleration of three axes, which needs to be normalized. When the monitoring object is at rest, the vector value in z-axis direction is equal to 1. Common data fusion methods such as weighted average fusion method, although the method is simple and practical, the accuracy deviation is large. Neural network fusion method has the ability of self-learning and good nonlinearity, but the effect is still unsatisfactory in the application of parameter optimization and structural model, because of its complex operation and high limitations. Compared with the former two methods, Kalman filtering method can combine the advantages of the two methods, the big data algorithm is simple and efficient, has high robustness and strong adaptability, and can better fit the linear filtering characteristics. The principle of Kalman filter is to evaluate the system state before the unit time stage based on the state space model, find the optimal state estimation of the model in the time period, and then evaluate the actual measured value and the estimation of the system, and finally get the optimal value. The principle is shown in Figure 4.Figure 4
Schematic diagram of Kalman filter.As can be seen from Figure4, Kalman filter operation can be roughly divided into two parts, namely prediction and update correction. In the prediction stage, the first step is to calculate the prediction state Xkk−1 of the system at k, and get the matrix Pkk−1, Pkk−1 can accurately reflect the trust degree of the current estimated state. The larger the value is, the smaller the trust degree is. Pkk−1 is also defined as the error covariance matrix. The calculation formulas of the two are shown in formulas (3) and (4).
(3)Xkk−1=AXk−1k−1+BUk(4)Pkk−1=APk−1k−1AT+QkAmong them,A, B, Uk, Pkk−1, Pk−1k−1, Qk represents the matrix coefficient, the control quantity of current state, the covariance of Xkk−1 and Xk−1k−1, and the covariance of k-value estimation process. On the basis of formula (3), the angle measurement model equation is established for prior estimation, and the established equation is shown in formula (5).
(5)Angle+=Gyro−Q¯bias∗dtAmong them,angle and gyro, respectively, represent the optimal estimation of angle at a certain time and the time before that time, and the angle design measurement value of gyroscope. Q-bias is the zero drift value of the gyroscope. Generally speaking, the Q-bias of the system is the same every time. Then the system state estimation matrix is obtained by combining formula (3) and formula (4), and the result is shown in formula (6).
(6)AngleQ¯bias=1−dt01AngleQ¯bias+dt0GyroThe error covariance of the system is derived from formula (4), as shown in formula (7).
(7)Qk=covQ¯angle,Q¯anglecovQ¯bias,Q¯anglecovQ¯angle,Q¯biascovQ¯bias,Q¯biasWhereQ-angle is the covariance of gyro noise, because gyro drift noise and angle noise are two independent factors, the covariance between them is equal to 0. The second part of Kalman filter is the update phase. In this process, Kk is a two-dimensional variable, corresponding to two Kalman gains, Angle and Q-bias. The observation variable is the angle value obtained from the acceleration signal, and the measured value Accel is the measured value Zk, and the formula (8) is obtained.
(8)Kk=Pkk−1HTHPkk−1HT+R−1Kk=K¯0K¯1Among them,R, K¯0 and K¯1 represent the angle measurement noise, the Kalman gain of angle and the Kalman gain of gyroscope, respectively. The measurement equation in Kalman formula can be directly quoted here. The basic equation of Kalman is shown in formula (9).
(9)Zk=HXk+VkSinceQ¯bias and Accel have no relationship, it is concluded that,
(10)H=10(11)P×HT=abcd×10T=ac(12)H×P×HT=10×abcd×10T=a(13)Xkk=Xkk−1+KkZk−HXkk−1Finally, the error covariance is updated, as shown in formula (14).
(14)Pkk=I−KkHPkk−1I=1111Finally, formula (15) is obtained from formula (8):
(15)Pkk=Pkk−1−KkHPkk−1Among the above formulas, formula (3) (4) (8) (13), and (14) is the basic equation of Kalman filter, and the effect diagram of Kalman filter is shown in Figure 5.Figure 5
Effect of Kalman filter.
(a)
At rest(b)
In dynamic stateFinally, through the conversion, the complete Kalman filter is obtained. Figure5 (a) shows the waveform of mpu6050 when the sensor is stationary. It can be seen that the attitude angle of the gyroscope has a serious deviation with time. At this time, the X and Y axes of the sensor are parallel to the placement plane, and the Z axis is the direction of gravity. Therefore, from the overall force situation, the sensor is only affected by the acceleration of gravity. In this state, the attitude angle of the sensor is 0 in theory. The main reason of drift is the integral error of gyroscope signal. After Kalman filtering, the drift is corrected. Figure 5(b) shows the waveform generated by mpu6050 sensor after different degrees of vibration. It can be seen that the signal generated by gyroscope is calculated correctly in the period of 0-20, and it begins to drift after the time value exceeds 20, and the dynamic adaptability decreases seriously. After Kalman filter correction, the signal is very smooth, without bias. So it can be concluded that Kalman filter can accurately calculate the low attitude of the monitoring object in any state. On the one hand, it makes up for the defects of gyroscope, on the other hand, it provides a guarantee for the stable acquisition of the dynamic acceleration signal of the system, which greatly increases the accuracy of the system and improves the robustness of the system.


## 3. Analysis of Big Data Energy Consumption Monitoring Technology

### 3.1. Performance Analysis of Action Recognition

The wearing position of monitoring equipment has a great impact on data collection. In order to maximize the accuracy of measurement, the wearing position is set as the waist of the monitoring object. The reason is that compared with other parts, such as wrist, ankle and so on, the detection point is closest to the position of the center of gravity of the human body and produces less interference, which can more accurately reflect the real-time state of the human body in motion. The subjects were 10 males with an average age of 24 years and an average height of 171 ± 5 cm. The subjects completed the following movements according to the requirements: normal walking; 10 km/h running; up and down 10 floors, jumping in place and three static states, which were upright, sitting flat and lying back, respectively. Each movement was repeated five times. Through the data recorded by the monitoring instrument, the change of acceleration vector value VM is obtained. The experimental results are shown in Figure6.Figure 6
Variation curve of acceleration vector VM under different states.
(a)
Walk(b)
Run(c)
Go upstairs(d)
Go downstairs(e)
Jump in place(f)
stand(g)
Set(h)
Lie backIt can be seen from Figure6 that the actions under different states are reflected by the change of the acceleration vector value VM. The acceleration vector values VM in Figures 6(b) and 6(e) are, respectively, distributed after 1.34 g-1.83 g and 1.83 g, and the boundaries of the two ranges are relatively obvious, so the two actions can be better identified. For other motion states, as shown in Figures 6(a), 6(c) and 6(d), the change curves of acceleration vector VM of normal walking, going upstairs and going downstairs are relatively close, and the distribution range is in the interval [1 g, 1.5 g], so the similarity degree is small, and it is unable to make an effective distinction. For the three static states, the fluctuation is also small, and the range value is about 1 g, so the equipment can not effectively distinguish. In view of this situation, the experimenters are arranged to test again according to the sequence of actions: slow walking, going upstairs, going downstairs, and static actions of standing up, sitting flat and lying back. Each group of actions is performed five times, and the change curve of angle is detected. The test results are shown in Figure 7.Figure 7
Angle change curve under different actions.
(a)
Walk(b)
Go upstairs(c)
Go donwstairs(d)
Standing, sitting and lying back in turnIt can be seen from the changes of the four attitude angles in Figure7 that the angle detection based on the vector value VM detection can effectively distinguish walking, going upstairs and going downstairs. From the change trend of the curve, we can know that when the monitoring object is in different states of walking, going upstairs and going downstairs, the peak range of the attitude inclination signal is in [-69, -66.8], [-60, -50], [-66.5, -60], respectively. When the three movements are carried out in turn, it is obvious that the wave crests are segmented, and this segmented performance is just the key to identify different movements. The peak ranges of standing, sitting and lying back are, respectively, distributed in [-70, -65], [-60, -55], [-50, -40]. For this, we only need to set the peak of posture inclination angle of different actions as the action judgment threshold, that is, we can effectively identify different states.


### 3.2. Performance Analysis of Motion Energy Consumption Detection

In this paper, the energy consumption detector takes stm32f103zet6 as the core processor and uses the inertial sensor mpu6050 to build a MEMS sensor system to monitor the daily motion state and gait of human body in real time. The commonly used method of human motion energy consumption detection for wearable devices is double label method, because this method has very high accuracy and anti-interference ability. Although this method is good, it has high cost and low practicability. The energy consumption of treadmill in gymnasium is compared, which is simple and economical. The treadmill used for comparison is solid f63 plus in the United States, with the maximum speed of 20 km/h. After many times of verification, the deviation of running energy consumption detection is ±3%, which fully meets the experimental requirements. The object of the experiment is a 70 kg male, and the wearing position of the device remains unchanged. In order to ensure the accuracy of the big data algorithm to the greatest extent, the sampling window period is set to t =1 s, and the refresh frequency is 50 Hz, that is, 50 samples are taken in 1 second. The experimental results are shown in Figure8. As can be seen from Figure 8(a), when the detected object runs at different speeds, the serial port data records the vector change VM value at T =0 and T =1, and the gravity acceleration g is 9.8 m/s. After formula calculation, when the test object runs at the speed of 10 km/h, the energy consumption of human movement is 9.6 kcal/min, that is, 0.16 kcal/s, and the calculated u =0.0018. The experimental results are shown in Figures 8(b) and 8(c).Figure 8
VM waveform when running at different speeds.
(a)
VM waveform when running at 10 km/h(b)
VM waveform when running at 3 km/h(c)
VM waveform when running at 5 km/hIt can be seen that when the experimenter moves at the speed of 3 km/h and 5 km/h, respectively, the corresponding energy consumption is calculated to be 0.017 kcal/s and 0.06 kcal/s, respectively. At this time, the energy consumption value on the treadmill is 0.017 kcal/s and 0.058 kcal/s, and the accuracy rate is 96%, which proves that the reliability and accuracy of the U value obtained from the test meet the requirements.


### 3.3. Accuracy Analysis

Through the comparison of the accuracy with several common sports wristbands on the market, including XM Sports Wristband, HW Sports Wristband and PG watch, three aspects of experimental accuracy were compared, including step test, action recognition and motion energy consumption detection. The experimental environment is corridor, the ambient temperature is 26°C, and the relative humidity is 26%. The experimental results are shown in Figure9.Figure 9
Comparison results of conventional accuracy.As can be seen from the experimental results in Figure9, the average accuracy of common motion detectors on the market, such as XM bracelet, PG watch and HW bracelet, is above 90%, which can meet the detection requirements, with the average accuracy of 94% ±1.2%, 96% ±1.5% and 97% ±0.6%, respectively. The average accuracy of this design system is 96.3 ± 0.8%, which is the closest to the top detection system on the market. It can maintain high accuracy in the step detection, which proves that the big data algorithm is accurate. Next, the accuracy of different action recognition is tested, and the experimental results are shown in Figure 10.Figure 10
Comparison of action recognition accuracy.Because the common motion detectors on the market have no action recognition function, as can be seen from Figure10, in the recognition of walking, running, going upstairs, going downstairs, standing, sitting and lying back, it can basically guarantee more than 90% accuracy, with an average accuracy of 95%, which proves that the accuracy of the system is high and the big data algorithm is accurate. Finally, the energy consumption detection accuracy of the four big data algorithms is analyzed, and the results are shown in Figure 11.Figure 11
Comparison of motion energy consumption accuracy.
(a)
MEMS accuracy(b)
XM Bracelet accuracy(c)
PG Watch accuracy(d)
HW Bracelet accuracyIt can be seen from Figure11 that the detection results of four kinds of sports energy consumption are densely distributed near the control results of solid running, and the dispersion of XM bracelet is large, which reflects that the detection accuracy of the detector is low. Through calculation, the average accuracy of XM bracelet, PG watch and HW bracelet is 87%, 95% and 96%, respectively, while the average accuracy of this system is 95%, which can basically meet the top technical requirements of PG and HW manufacturers. The results show that the system can fully meet the accuracy requirements when measuring the energy consumption of human movement, and can provide a new idea for the movement detection of obese individuals.


## 3.1. Performance Analysis of Action Recognition

The wearing position of monitoring equipment has a great impact on data collection. In order to maximize the accuracy of measurement, the wearing position is set as the waist of the monitoring object. The reason is that compared with other parts, such as wrist, ankle and so on, the detection point is closest to the position of the center of gravity of the human body and produces less interference, which can more accurately reflect the real-time state of the human body in motion. The subjects were 10 males with an average age of 24 years and an average height of 171 ± 5 cm. The subjects completed the following movements according to the requirements: normal walking; 10 km/h running; up and down 10 floors, jumping in place and three static states, which were upright, sitting flat and lying back, respectively. Each movement was repeated five times. Through the data recorded by the monitoring instrument, the change of acceleration vector value VM is obtained. The experimental results are shown in Figure6.Figure 6
Variation curve of acceleration vector VM under different states.
(a)
Walk(b)
Run(c)
Go upstairs(d)
Go downstairs(e)
Jump in place(f)
stand(g)
Set(h)
Lie backIt can be seen from Figure6 that the actions under different states are reflected by the change of the acceleration vector value VM. The acceleration vector values VM in Figures 6(b) and 6(e) are, respectively, distributed after 1.34 g-1.83 g and 1.83 g, and the boundaries of the two ranges are relatively obvious, so the two actions can be better identified. For other motion states, as shown in Figures 6(a), 6(c) and 6(d), the change curves of acceleration vector VM of normal walking, going upstairs and going downstairs are relatively close, and the distribution range is in the interval [1 g, 1.5 g], so the similarity degree is small, and it is unable to make an effective distinction. For the three static states, the fluctuation is also small, and the range value is about 1 g, so the equipment can not effectively distinguish. In view of this situation, the experimenters are arranged to test again according to the sequence of actions: slow walking, going upstairs, going downstairs, and static actions of standing up, sitting flat and lying back. Each group of actions is performed five times, and the change curve of angle is detected. The test results are shown in Figure 7.Figure 7
Angle change curve under different actions.
(a)
Walk(b)
Go upstairs(c)
Go donwstairs(d)
Standing, sitting and lying back in turnIt can be seen from the changes of the four attitude angles in Figure7 that the angle detection based on the vector value VM detection can effectively distinguish walking, going upstairs and going downstairs. From the change trend of the curve, we can know that when the monitoring object is in different states of walking, going upstairs and going downstairs, the peak range of the attitude inclination signal is in [-69, -66.8], [-60, -50], [-66.5, -60], respectively. When the three movements are carried out in turn, it is obvious that the wave crests are segmented, and this segmented performance is just the key to identify different movements. The peak ranges of standing, sitting and lying back are, respectively, distributed in [-70, -65], [-60, -55], [-50, -40]. For this, we only need to set the peak of posture inclination angle of different actions as the action judgment threshold, that is, we can effectively identify different states.


## 3.2. Performance Analysis of Motion Energy Consumption Detection

In this paper, the energy consumption detector takes stm32f103zet6 as the core processor and uses the inertial sensor mpu6050 to build a MEMS sensor system to monitor the daily motion state and gait of human body in real time. The commonly used method of human motion energy consumption detection for wearable devices is double label method, because this method has very high accuracy and anti-interference ability. Although this method is good, it has high cost and low practicability. The energy consumption of treadmill in gymnasium is compared, which is simple and economical. The treadmill used for comparison is solid f63 plus in the United States, with the maximum speed of 20 km/h. After many times of verification, the deviation of running energy consumption detection is ±3%, which fully meets the experimental requirements. The object of the experiment is a 70 kg male, and the wearing position of the device remains unchanged. In order to ensure the accuracy of the big data algorithm to the greatest extent, the sampling window period is set to t =1 s, and the refresh frequency is 50 Hz, that is, 50 samples are taken in 1 second. The experimental results are shown in Figure8. As can be seen from Figure 8(a), when the detected object runs at different speeds, the serial port data records the vector change VM value at T =0 and T =1, and the gravity acceleration g is 9.8 m/s. After formula calculation, when the test object runs at the speed of 10 km/h, the energy consumption of human movement is 9.6 kcal/min, that is, 0.16 kcal/s, and the calculated u =0.0018. The experimental results are shown in Figures 8(b) and 8(c).Figure 8
VM waveform when running at different speeds.
(a)
VM waveform when running at 10 km/h(b)
VM waveform when running at 3 km/h(c)
VM waveform when running at 5 km/hIt can be seen that when the experimenter moves at the speed of 3 km/h and 5 km/h, respectively, the corresponding energy consumption is calculated to be 0.017 kcal/s and 0.06 kcal/s, respectively. At this time, the energy consumption value on the treadmill is 0.017 kcal/s and 0.058 kcal/s, and the accuracy rate is 96%, which proves that the reliability and accuracy of the U value obtained from the test meet the requirements.


## 3.3. Accuracy Analysis

Through the comparison of the accuracy with several common sports wristbands on the market, including XM Sports Wristband, HW Sports Wristband and PG watch, three aspects of experimental accuracy were compared, including step test, action recognition and motion energy consumption detection. The experimental environment is corridor, the ambient temperature is 26°C, and the relative humidity is 26%. The experimental results are shown in Figure9.Figure 9
Comparison results of conventional accuracy.As can be seen from the experimental results in Figure9, the average accuracy of common motion detectors on the market, such as XM bracelet, PG watch and HW bracelet, is above 90%, which can meet the detection requirements, with the average accuracy of 94% ±1.2%, 96% ±1.5% and 97% ±0.6%, respectively. The average accuracy of this design system is 96.3 ± 0.8%, which is the closest to the top detection system on the market. It can maintain high accuracy in the step detection, which proves that the big data algorithm is accurate. Next, the accuracy of different action recognition is tested, and the experimental results are shown in Figure 10.Figure 10
Comparison of action recognition accuracy.Because the common motion detectors on the market have no action recognition function, as can be seen from Figure10, in the recognition of walking, running, going upstairs, going downstairs, standing, sitting and lying back, it can basically guarantee more than 90% accuracy, with an average accuracy of 95%, which proves that the accuracy of the system is high and the big data algorithm is accurate. Finally, the energy consumption detection accuracy of the four big data algorithms is analyzed, and the results are shown in Figure 11.Figure 11
Comparison of motion energy consumption accuracy.
(a)
MEMS accuracy(b)
XM Bracelet accuracy(c)
PG Watch accuracy(d)
HW Bracelet accuracyIt can be seen from Figure11 that the detection results of four kinds of sports energy consumption are densely distributed near the control results of solid running, and the dispersion of XM bracelet is large, which reflects that the detection accuracy of the detector is low. Through calculation, the average accuracy of XM bracelet, PG watch and HW bracelet is 87%, 95% and 96%, respectively, while the average accuracy of this system is 95%, which can basically meet the top technical requirements of PG and HW manufacturers. The results show that the system can fully meet the accuracy requirements when measuring the energy consumption of human movement, and can provide a new idea for the movement detection of obese individuals.


## 4. Conclusion

In the obese individual motion state monitoring technology, the inertial sensor mpu6050 is used to build MEMS sensor system to monitor the human daily motion state and steps in real time, and the dynamic threshold detection method is introduced to recognize the gait. In view of the shortcomings of the system gyroscope, adaptive dynamic threshold is used to improve it. In the design of the big data algorithm, the adaptive peak detection and step, decision tree two-level classification action recognition big data algorithm are organically integrated, and then combined with the acceleration vector value of the cloud top energy detection big data algorithm, to process the collected motion data, including the acceleration signal, gyroscope and other data processing, and finally complete the feature extraction, get the final recognition and detection results. Through data reference, we can know that the system can recognize different human motion states. Compared with the motion monitor with better performance on the market, the performance of this system is close to it, and to a certain extent, it is more practical. However, the data research in the big data algorithm design in this paper is not deep enough. Therefore, in the future research, the experiment needs further statistics and more data content.



---

*Source: 4923804-2021-10-14.xml*