# Research on Intelligent Bodybuilding System Based on Machine Learning

Authors: Chen Chen
Journal: Journal of Sensors
 (2022)

---

## Abstract

In recent years, people’s health is facing many challenges as their workload is increasing and their lives are becoming more and more stressful. In this context, healthy living has become a topic of concern and more and more people are choosing to promote their bodies through fitness. To address these existing problems in action recognition research, this paper designs and implements a machine learning-based intelligent fitness system to monitor three important parameters in physical activity: the type of action, the number of actions, and the period of action. Through the action recognition algorithm and the period calculation method, the three important parameters of action type, number of actions, and action period are calculated to generate a more comprehensive description of the limb actions. Experiments are conducted to show that the proposed deep neural network learns well on small datasets, achieving 97.61% action recognition accuracy and SVM achieving over 96% recognition accuracy.


---

## Body

## 1. Introduction

Targeted physical activity is an important and effective improvement and treatment for these conditions [1–4]. For athletes, injuries occur during sport, and timely and appropriate rehabilitation is an important part of ensuring that athletes recover and return to play. Physical rehabilitation is also an important part of treatment for patients whose physical activity is affected by illnesses such as strokes [5]. In addition, with the increase in work intensity and the explosion of information, people are often working long hours and at high intensity, which has led to a decline in physical function and an increase in obesity, directly affecting physical health, and this highlights the importance of timely fitness and exercise [6].However, effective fitness and exercise need to follow a certain scientific approach; otherwise, not only will it fail to achieve the purpose of strengthening the body and treating diseases, but it may even backfire and cause secondary damage to the body. For example, many athletes train with repetitive loads for long periods of time in order to improve their performance, and in a study by Hussain et al. [7], they found that repetitive activities and unreasonable technical movements for long periods of time are likely to cause sports injuries. In addition, some athletes who undergo firmness band reconstruction perform low-intensity recovery procedures during postoperative rehabilitation, but studies have shown that performing high-intensity recovery procedures is more beneficial for later functional performance. In a survey of sports injuries among university students, Moreno-Guerrero et al. [8] found that over 40% of students suffered injuries due to incorrect technical movements or lack of knowledge about them.A wireless body area network consisting of multiple sensors can assist doctors in the initial remote consultation of patients [9]. And artificial intelligence technologies such as machine learning and deep learning have not only given smarter performance to the network’s edge devices but have also made progress in aiding the diagnosis of difficult diseases. In areas such as personal fitness and healthcare, there is also a growing use of microelectromechanical system-based posture modules (containing accelerometers, gyroscopes, magnetometers, etc.) to recognise and monitor the body’s movements and to share them in social networks or sports sharing with others in social networks or sports communities [10].It is thus clear that technological advances have made it possible to assist sports and exercise with electronic technology, and it is therefore necessary to propose a multiuser-oriented exercise monitoring system [11]. It refers to the ease with which instructors can monitor the physical movements of exercise participants, thus improving to a certain extent the difficulty of accessing professional guidance in the physical ridge exercise scenario. Such a system can be deployed in places such as gyms or body curfew classes, where the instructor can easily understand each participant’s exercise, including whether the movement categories are correct and whether the number and period of movements are appropriate [12].Consider a rehabilitation centre scenario: two athletes who have undergone surgery for an Achilles tendon rupture are now recovering. Postsurgical weight-bearing training is crucial for the recovery of the Achilles tendon, so they are rehabilitating with centrifugal contractions of the Achilles tendon [13]. At the same time, several other elderly people with mild strokes are undergoing periodic gait training of the lower limbs [14]. In addition, there were people using dumbbells for upper limb strength training in the same building. As the limbs are equipped with wearable devices, each of their limb movements is recorded and uploaded to the data centre via a wireless LAN. The medical staff can clearly see on the screen what type of exercise each person is performing and whether they are moving too fast or too many times. The medical staff will give timely guidance on inappropriate movements, thus ensuring their safety and improving the effectiveness of their workouts [15]. As can be seen, the existence of such a system makes it possible to monitor exercise for multiple users, making it easier for people to access professional exercise guidance when participating in physical exercise, thus improving the professionalism of sports and exercise participants, effectively avoiding sports injuries, and improving the effectiveness of physical exercise.In view of this, it is of practical importance and scientific and theoretical value to propose and develop a multiuser motion monitoring system with the abovementioned features.


## 2. Related Work

Human motion recognition is an important application of modern computer technology. The aim of motion recognition is to enable computers to perceive and understand the type of human activity, leading to related applications such as gesture control in human-computer interaction, fitness data tracking in wearable devices, and physical games in entertainment.Research on human movement recognition can be further subdivided into two categories, namely, human activity recognition and body movement recognition [16]. Human activity recognition is a macrolevel study of how to distinguish between the daily activity statuses of humans, such as walking, sitting, running, lying down, cycling, and walking up and down the stairs. On the other hand, by combining it with the IoT and multimodal sensing technologies (inferring the user’s type of activity from a combination of sound, movement, and expression), human activity recognition can be used for intelligent healthcare, such as automatically locating and sending distress messages to healthcare professionals when an elderly person is recognised to have fallen [17]. The user can perform specific actions to interact with the computer system and trigger corresponding events, e.g., Wang [18] used recognition algorithms based on symbolic sequences and template matching to recognise seven gestures, including up, down, left, right, drawing a circle, etc. In addition, the recognition of specific body movements can be applied to the field of sport to record and analyse sport data and improve movement postures or as signal input in entertainment and gaming-related scenarios. For example, Cao et al. [19] used a 3-axis accelerometer built into a mobile phone to recognise three types of strokes in tennis and applied it to a tennis video game.In terms of recognition algorithms, classical machine learning models are currently the most commonly used. For example, Wang et al. [20] used SVM and artificial neural nets as classifiers to achieve the recognition of six upper limb movements by fusing several MEMS posture modules. Martin and Gavey [21] used SVM and BP neural network to achieve the recognition of horizontal, vertical, diagonal, and closed lines drawn on the human arm. Slavityak [22] used a similarity matching model based on least squares to achieve the classification of six dumbbell movements.However, there are few applications of deep learning techniques in the field of MEMS-based emotion recognition. Compared with classical machine learning algorithms, deep learning algorithms can better understand inter-interval sequence data and do not require tedious feature extraction and feature selection, but they require a high amount of training data. Convolutional neural network (CNN) and long short-term memory (LSTM) are two typical deep learning models. Convolutional neural networks were first proposed by [12, 15, 23] and used for image recognition, and later, 1D CNNs were also used for natural language processing (NLP). LSTM is a variant of recurrent neural networks, which are suitable for processing time series signals and have been widely used in speech recognition, stock prediction, etc. However, deep learning algorithms have not yet been applied to MEMS-based body movement recognition and have only been used in the field of HAR.


### 2.1. Machine Learning-Based Action Recognition

This section begins with an introduction to action recognition, where the data from the pose sensor are analysed using a classification model to identify the patterns embedded in the data and lose the classification of the actions. For the implementation of action recognition, two models are used, namely, SVM and deep neural networks [24]. For scenarios where the computing power is weak and the requirement for real-time performance is high, a simple and low computational model such as SVM is used for action recognition; for scenarios where the computing power is strong or the type of action is complex, a complex and computationally intensive deep neural network is used for action recognition.


### 2.2. Motion Recognition Algorithms

There are two key steps in SVM-based action recognition, namely, feature selection, feature extraction, and parameter optimisation, of which feature selection has the most significant impact on recognition results. Feature selection is a method of data dimensionality reduction [25]. For most practical applications of machine learning, the features of the original data in the original space may be redundant or noisy, and the features of the data are stacked together in a way that cannot be easily processed directly by the algorithm or affects the speed of computation, so feature extraction is required. Feature extraction is the transformation of the original data into a new space so that the patterns implied by the data can be more easily identified. Generally, the dimensionality of the extracted features is much smaller than that of the original data, so feature extraction can significantly speed up the algorithm. However, some of the original information are inevitably lost in the feature extraction process. If the information lost is not significant for the classification result, then this effect can be ignored. Otherwise, the loss of important information will significantly reduce the classification accuracy [26]. The penalty factor affects how much importance the SVM places on outliers in the data, and different penalty factors will produce different classification bounds. In the process of parameter optimisation, it is necessary to experiment with different kernel functions and penalty coefficients depending on the type of data in order to achieve the best classification results [27].The approach to feature extraction varies from application to application. For example, physically meaningful elements of an image are often used as features in image processing, including geometric features, texture features, Gabor features, and statistical features. In NLP, the feature extraction process often ignores the order and syntax of words and treats them as a collection of words that are independent of each other. In addition, principal component analysis (PCA), linear discriminant analysis (LDA), and singular value decomposition (SVD) are all common feature extraction algorithms [28].In this paper, four statistical features are extracted from the limb movement data, including the maximum value, minimum value, standard deviation, and mean value. The original signal generated by the posture sensor is a time series signal, for which the most common feature extraction method is to calculate the statistical values. The maximum and minimum values represent the limits of the amplitude of the action and reflect the range of the action, which can vary significantly from one action to another [29]. The mean value reflects the overall state of the movement and can also be associated with the type of movement. For example, for some movements, the limb is always moving horizontally, so the mean value of acceleration along the limb direction axis is always around zero; for other movements, the limb is always moving in the vertical plane, so the mean value of acceleration along the limb direction axis is around 1. The more vigorous the movement, the larger the standard deviation, and the smoother the movement, the smaller the standard deviation. As showed in Figure 1, by calculating these four statistics for each axis of the sensor output, a total of 36 statistical features were obtained.Figure 1
Feature extraction method.


### 2.3. Deep Learning-Based Action Recognition

The main difficulty in deep learning-based action recognition is how to train the network to converge using small datasets. For limb movement recognition, the sample size of a white-built database is much smaller than the currently popular publicly available data, and deep learning generally requires a high sample size, so it is difficult to learn enough information on a small dataset. There are two ways to solve this problem: first is the proper data preprocessing to ensure that the input requirements of the net terminal are met and no information is lost and second is the designing a suitable structure of the net terminal so that it can explore the information implied in the data while reducing the sample size requirement.There are many different types of deep learning models, including CNN, RNN, LSTM, self-encoders (AE), restricted Boltzmann machines (RBM), and generative adversarial networks (GAN). Different network structures are suitable for different problems, e.g., CNN is mostly used for image processing, long- and short-term memory networks for time series processing, self-encoders for clustering and data compression, and generative adversarial networks for image conversion. Typically, deep learning models require large datasets to be trained. Large public datasets are usually published by research institutions, but no large-scale datasets have been published in the field of limb movement recognition, which is one of the reasons why deep learning is difficult to apply to MEMS-based limb movement recognition.In this paper, a combined network model based on 1D CNN and LSTM is developed, which combines the features of both and can be well used to process time series signals from attitude sensors with low data volume requirements [30].The structure of the network and the way it preprocesses data is shown in Figure2. The network has two one-dimensional convolutional layers, a maximum pooling layer, a LSTM layer, and an output layer. Convolutional and LSTM layers each have 32 neurons, and P1-P7 represent the probability that the current input action data belongs to a certain category. The input to the network is a matrix with two dimensions, the time step and the sample wood dimension, respectively. As mentioned above, each of the sample logs connects the first and last nine axes of the original data. The time step corresponds to the value sampled by the sensor at a given moment in time. In addition, the total length of each data sample varies as the duration of each action recorded by the sensor varies. For programming reasons, zero values can be used in the application to fill each sample with the same length [31].Figure 2
Structure of the network and data preprocessing process.


### 2.4. Movement Count and Cycle Calculation Method

The raw data output from the posture sensor consists of acceleration, angular velocity, and Euler angles in theX, Y, and Z axes, the sensitive axis being the one that best characterises the movement of the limb. The sensitive axis is the one that best characterises the movement state of the limb among the nine axes of data. For each movement, there is a plane of movement, with some movements mainly in the X plane and others in the Z plane.The reason for this is twofold. Firstly, some of the nine axes often show jumps in the waveform for a raw signal. This phenomenon is concentrated in the three angular axes. For example, suppose the angle of an axis starts at 0 and as it increases to +180° and continues to increase, the angle suddenly changes to -180°. This phenomenon is caused by the attitude module’s own way of calculating angles, but it can have a negative effect on the period calculation, so the three angular axes should be excluded from the selection of the sensitive axes [32]. Next, the sensitive axes are selected as follows:
(1)A=A1,A2,⋯,A6T,Si2=1mAi1−A¯i2+A22−A¯32+⋯+Aim−A¯i2,i′=argmaxS12,where Ai is the vector representation of the i-th axis data in the original data and m is the number of data sampling points, i.e., the length of the data. The method calculates the variance of each axis, and the axis with the highest variance has the serial number A¯i, so that the i′rd axis is the selected sensitive axis. By performing the sensitive axis selection, the counting and periodic calculation method only needs to be performed on one axis, which not only increases the efficiency of the calculation but also allows for a higher accuracy rate. For the same type of movement, the sensitive axis is usually fixed as long as the sensor is worn in the same way. Therefore, after the initial selection of the sensitive axis, the sensitive axis can be tied to the type of action, and in subsequent actions, the sensitive axis can be determined directly from the tied relationship between the sensitive axis and the type of action, thus reducing the amount of system operations.Suppose a signalψt∈L2R with a Fourier variation of ψ^ω. When ψ^ω satisfies the condition
(2)Cψ=∫Rψ∧ω2ωdω<∞,ψt is known as a wavelet basis. The wavelet basis used in this paper is a cgau wavelet, which is a Gauss wavelet in complex form. When the wavelet basis ψt is telescoped or translated, we can obtain a wavelet sequence, namely,
(3)ψa,bt=1aψt−ba,a,b∈R,a≠0,where a is the scale factor of the wavelet transform and b is the translation factor.For the selected key axis signal 111, the continuous wavelet transform is as follows:(4)Wfa,b≤f,ψa,b≥a−1/2∫Rftψt−badt.Inverse conversion is calculated as follows:(5)ft=1Cψ∫−∞∞∫−∞∞1a2Wfa,bψt−badadb.After the wavelet transform of the key axis signal, the wavelet coefficient matrix can be obtainedAm×n, where m denotes the number of layers of the wavelet transform and n denotes the number of sampling points, i.e., the length of the signal.(6)aij∈Am×n,0<i≤m,0<j≤n,i∈N,j∈N.The wavelet energy matrixP is as follows:
(7)P=a112a122⋯a1n2a212a222⋯a2n2⋮⋮⋱⋮am12am22⋯amn2,where the elements in the energy matrix represent the amplitude of each harmonic component.Next, use the following vector:(8)C=c1,⋯,cm,cl=argmaxkplk1≤l≤m,1≤k≤n,l,k∈N.This means that the position of the component of maximum energy in each harmonic component occurs at each moment, i.e., the position of the fundamental frequency of the sensor signal, i.e., the wavelet scale, wherepl denotes the kth row of the matrix P and plk denotes the kth element of the plrd row.Each wavelet scale in the wavelet transforms corresponds to a frequency vectorF, which is determined by both the number of layers and the scale of the specific wavelet transform. The vector T, which reflects the period of the action at each sampling moment, can be expressed as follows:
(9)T=1Fc1,1Fc2,⋯,1Fcm.The period of each action can be obtained by calculating the difference between adjacent elements in this list. Furthermore, another way to calculate this is to bring the listT into Equation (9), thus obtaining the vector T′:
(10)T′=TL1,TL2,⋯,TLd.This vector represents the period of each action, whered is the length of the list Z, i.e., the number of actions, and the element Ti in T′ represents the i-th element of the vector T.


## 2.1. Machine Learning-Based Action Recognition

This section begins with an introduction to action recognition, where the data from the pose sensor are analysed using a classification model to identify the patterns embedded in the data and lose the classification of the actions. For the implementation of action recognition, two models are used, namely, SVM and deep neural networks [24]. For scenarios where the computing power is weak and the requirement for real-time performance is high, a simple and low computational model such as SVM is used for action recognition; for scenarios where the computing power is strong or the type of action is complex, a complex and computationally intensive deep neural network is used for action recognition.


## 2.2. Motion Recognition Algorithms

There are two key steps in SVM-based action recognition, namely, feature selection, feature extraction, and parameter optimisation, of which feature selection has the most significant impact on recognition results. Feature selection is a method of data dimensionality reduction [25]. For most practical applications of machine learning, the features of the original data in the original space may be redundant or noisy, and the features of the data are stacked together in a way that cannot be easily processed directly by the algorithm or affects the speed of computation, so feature extraction is required. Feature extraction is the transformation of the original data into a new space so that the patterns implied by the data can be more easily identified. Generally, the dimensionality of the extracted features is much smaller than that of the original data, so feature extraction can significantly speed up the algorithm. However, some of the original information are inevitably lost in the feature extraction process. If the information lost is not significant for the classification result, then this effect can be ignored. Otherwise, the loss of important information will significantly reduce the classification accuracy [26]. The penalty factor affects how much importance the SVM places on outliers in the data, and different penalty factors will produce different classification bounds. In the process of parameter optimisation, it is necessary to experiment with different kernel functions and penalty coefficients depending on the type of data in order to achieve the best classification results [27].The approach to feature extraction varies from application to application. For example, physically meaningful elements of an image are often used as features in image processing, including geometric features, texture features, Gabor features, and statistical features. In NLP, the feature extraction process often ignores the order and syntax of words and treats them as a collection of words that are independent of each other. In addition, principal component analysis (PCA), linear discriminant analysis (LDA), and singular value decomposition (SVD) are all common feature extraction algorithms [28].In this paper, four statistical features are extracted from the limb movement data, including the maximum value, minimum value, standard deviation, and mean value. The original signal generated by the posture sensor is a time series signal, for which the most common feature extraction method is to calculate the statistical values. The maximum and minimum values represent the limits of the amplitude of the action and reflect the range of the action, which can vary significantly from one action to another [29]. The mean value reflects the overall state of the movement and can also be associated with the type of movement. For example, for some movements, the limb is always moving horizontally, so the mean value of acceleration along the limb direction axis is always around zero; for other movements, the limb is always moving in the vertical plane, so the mean value of acceleration along the limb direction axis is around 1. The more vigorous the movement, the larger the standard deviation, and the smoother the movement, the smaller the standard deviation. As showed in Figure 1, by calculating these four statistics for each axis of the sensor output, a total of 36 statistical features were obtained.Figure 1
Feature extraction method.


## 2.3. Deep Learning-Based Action Recognition

The main difficulty in deep learning-based action recognition is how to train the network to converge using small datasets. For limb movement recognition, the sample size of a white-built database is much smaller than the currently popular publicly available data, and deep learning generally requires a high sample size, so it is difficult to learn enough information on a small dataset. There are two ways to solve this problem: first is the proper data preprocessing to ensure that the input requirements of the net terminal are met and no information is lost and second is the designing a suitable structure of the net terminal so that it can explore the information implied in the data while reducing the sample size requirement.There are many different types of deep learning models, including CNN, RNN, LSTM, self-encoders (AE), restricted Boltzmann machines (RBM), and generative adversarial networks (GAN). Different network structures are suitable for different problems, e.g., CNN is mostly used for image processing, long- and short-term memory networks for time series processing, self-encoders for clustering and data compression, and generative adversarial networks for image conversion. Typically, deep learning models require large datasets to be trained. Large public datasets are usually published by research institutions, but no large-scale datasets have been published in the field of limb movement recognition, which is one of the reasons why deep learning is difficult to apply to MEMS-based limb movement recognition.In this paper, a combined network model based on 1D CNN and LSTM is developed, which combines the features of both and can be well used to process time series signals from attitude sensors with low data volume requirements [30].The structure of the network and the way it preprocesses data is shown in Figure2. The network has two one-dimensional convolutional layers, a maximum pooling layer, a LSTM layer, and an output layer. Convolutional and LSTM layers each have 32 neurons, and P1-P7 represent the probability that the current input action data belongs to a certain category. The input to the network is a matrix with two dimensions, the time step and the sample wood dimension, respectively. As mentioned above, each of the sample logs connects the first and last nine axes of the original data. The time step corresponds to the value sampled by the sensor at a given moment in time. In addition, the total length of each data sample varies as the duration of each action recorded by the sensor varies. For programming reasons, zero values can be used in the application to fill each sample with the same length [31].Figure 2
Structure of the network and data preprocessing process.


## 2.4. Movement Count and Cycle Calculation Method

The raw data output from the posture sensor consists of acceleration, angular velocity, and Euler angles in theX, Y, and Z axes, the sensitive axis being the one that best characterises the movement of the limb. The sensitive axis is the one that best characterises the movement state of the limb among the nine axes of data. For each movement, there is a plane of movement, with some movements mainly in the X plane and others in the Z plane.The reason for this is twofold. Firstly, some of the nine axes often show jumps in the waveform for a raw signal. This phenomenon is concentrated in the three angular axes. For example, suppose the angle of an axis starts at 0 and as it increases to +180° and continues to increase, the angle suddenly changes to -180°. This phenomenon is caused by the attitude module’s own way of calculating angles, but it can have a negative effect on the period calculation, so the three angular axes should be excluded from the selection of the sensitive axes [32]. Next, the sensitive axes are selected as follows:
(1)A=A1,A2,⋯,A6T,Si2=1mAi1−A¯i2+A22−A¯32+⋯+Aim−A¯i2,i′=argmaxS12,where Ai is the vector representation of the i-th axis data in the original data and m is the number of data sampling points, i.e., the length of the data. The method calculates the variance of each axis, and the axis with the highest variance has the serial number A¯i, so that the i′rd axis is the selected sensitive axis. By performing the sensitive axis selection, the counting and periodic calculation method only needs to be performed on one axis, which not only increases the efficiency of the calculation but also allows for a higher accuracy rate. For the same type of movement, the sensitive axis is usually fixed as long as the sensor is worn in the same way. Therefore, after the initial selection of the sensitive axis, the sensitive axis can be tied to the type of action, and in subsequent actions, the sensitive axis can be determined directly from the tied relationship between the sensitive axis and the type of action, thus reducing the amount of system operations.Suppose a signalψt∈L2R with a Fourier variation of ψ^ω. When ψ^ω satisfies the condition
(2)Cψ=∫Rψ∧ω2ωdω<∞,ψt is known as a wavelet basis. The wavelet basis used in this paper is a cgau wavelet, which is a Gauss wavelet in complex form. When the wavelet basis ψt is telescoped or translated, we can obtain a wavelet sequence, namely,
(3)ψa,bt=1aψt−ba,a,b∈R,a≠0,where a is the scale factor of the wavelet transform and b is the translation factor.For the selected key axis signal 111, the continuous wavelet transform is as follows:(4)Wfa,b≤f,ψa,b≥a−1/2∫Rftψt−badt.Inverse conversion is calculated as follows:(5)ft=1Cψ∫−∞∞∫−∞∞1a2Wfa,bψt−badadb.After the wavelet transform of the key axis signal, the wavelet coefficient matrix can be obtainedAm×n, where m denotes the number of layers of the wavelet transform and n denotes the number of sampling points, i.e., the length of the signal.(6)aij∈Am×n,0<i≤m,0<j≤n,i∈N,j∈N.The wavelet energy matrixP is as follows:
(7)P=a112a122⋯a1n2a212a222⋯a2n2⋮⋮⋱⋮am12am22⋯amn2,where the elements in the energy matrix represent the amplitude of each harmonic component.Next, use the following vector:(8)C=c1,⋯,cm,cl=argmaxkplk1≤l≤m,1≤k≤n,l,k∈N.This means that the position of the component of maximum energy in each harmonic component occurs at each moment, i.e., the position of the fundamental frequency of the sensor signal, i.e., the wavelet scale, wherepl denotes the kth row of the matrix P and plk denotes the kth element of the plrd row.Each wavelet scale in the wavelet transforms corresponds to a frequency vectorF, which is determined by both the number of layers and the scale of the specific wavelet transform. The vector T, which reflects the period of the action at each sampling moment, can be expressed as follows:
(9)T=1Fc1,1Fc2,⋯,1Fcm.The period of each action can be obtained by calculating the difference between adjacent elements in this list. Furthermore, another way to calculate this is to bring the listT into Equation (9), thus obtaining the vector T′:
(10)T′=TL1,TL2,⋯,TLd.This vector represents the period of each action, whered is the length of the list Z, i.e., the number of actions, and the element Ti in T′ represents the i-th element of the vector T.


## 3. Experimental Procedure and Analysis of Results

In the previous presentation of this paper, the hardware and software design scheme, the data preprocessing, and identification methods as well as the counting and periodic calculation methods for the actions of multiuser action monitoring system were explained. Next, the relevant experimental procedure and the experimental results are presented [2].


### 3.1. Experimental Setup

In this paper, body movements were selected for identification, as showed in Figure3. These included four types of dumbbell movements and three types of leg exercises, namely, the dumbbell curling, side lifting, dumbbell shoulder press, dumbbell flying, sitting posture calf raising, standing posture calf raising, and heel raising. [14].Figure 3
Diagram of the seven body movements.Of the data, this study used a self-constructed dataset, which consisted of a total of 420 samples. A total of six participants, three males and three females, contributed to the dataset, each providing a sample of 70 data items, with 10 items for each type of movement. Only one stance acquisition module was worn by each participant when recording the data. For the dumbbell movements, the posture acquisition module was worn at the wrist and the lower limb movements; the posture acquisition module was worn at the ankle. The weight of the dumbbell used in the dumbbell movement was 25 kg. 80% of the total samples were used as the training set and 20% as the test set. For the deep learning model, 20% of the training set was used as the validation set.


### 3.2. Motion Recognition Experiments

For deep neural networks, one type of preprocessing is to join the first and last nine axes, as described in Section3 of this paper, and the other is to use linear discriminant analysis (LDA) to reduce their dimensionality.The results of the comparison experiments between the two processing methods are shown in Table1, which indicate that linear discriminant analysis is less accurate when used for action recognition. Figure 4 shows the trend of accuracy and loss in the training of the deep neural network. In Figure 4(a), we can see that the training and validation losses continue to decrease until the 200th round of training. Figure 4(b) represents changes in training accuracy and validation accuracy, during which the validation and training losses are basically the same.Table 1
Accuracy of different preprocessing methods.
Data preprocessing method of deep neural networkMotion recognition accuracyLDA dimensionality reduction87.79%Data end to end97.61%Figure 4
Loss and accuracy change curve of the network during training.
(a)
Variation in training loss and validation loss(b)
Changes in training accuracy and validation accuracyIn order to compare the effectiveness of different classification models, this paper next conducts experiments using different models. In addition to SVM and deep neural networks, a multilayer perceptron and least squares based on similarity matching model proposed by Akpan and Aldabbagh [12] was chosen as the two comparison algorithms in this paper. The final accuracy of each model was obtained through experiments on the test set. The multilayer perceptron is a representative forward neural network, and its use as a comparison algorithm can effectively set an accurate reference. As the number of layers implied by a multilayer perceptron is generally small, it is slow and ineffective on higher dimensional datasets, while the raw pose sensor data can often be thousands to tens of thousands of dimensions, so dimensionality reduction is required to feed the data into a multilayer perceptron. In this paper, the same feature extraction method as SVM is used, and the same 36 statistics are selected as features to compare the performance difference between the two on the same dataset.Another comparison algorithm is the least squares-based similarity matching algorithm proposed by Akpan and Aldabbagh [12]. This method first performs operations such as acceleration decomposition and period normalisation on the data and then builds a feature database and judges the action category based on the similarity between the test sample and the standard action in the database during classification; the details are shown in Figure 5.Figure 5
Action recognition accuracy of the four algorithms.From the above experimental results, it can be seen that both the deep learning model and the SVM achieved recognition accuracies above 96%, which are higher than the comparison algorithms, while the multilayer perceptron achieved the lowest accuracy among the four models. The deep learning model achieved a recognition accuracy of 97.61%, and the confusion matrix showed that only two dumbbell shoulder presses were misconceived as dumbbell side planks in the 84 test samples, indicating that the deep learning model proposed in this paper can be used well for small datasets and action recognition. The confusion matrix of the SVM shows that the method is prone to misclassification of the two types of leg movements because the two types of movements are similar and the SVM cannot perfectly separate the two types of movements based on the features from a single sensor alone.


### 3.3. Motion Counting and Cycle Calculation Experiments

The purpose of the action counting and cycle calculation experiment is to verify the accuracy of the counts and cycle calculations. For this experiment, the objectivity of the results is influenced to a large extent by the number of trials. In particular, the action counts and the validity of the analysis method can only be demonstrated by ensuring that the results are accurate for a sufficient number of trials. In this experiment, 50 repetitions were performed, a value which is much higher than the number of time required for a single exercise and which verifies the accuracy of the algorithm. In addition to recording the movements using the sensors, a stopwatch was used to time the cycles of each movement as a practical standard. The exact cycle counted and actual values for the 50 movements in this experiment are shown in Figure6.Figure 6
Action count and cycle calculation results.Firstly, as can be seen from the length of the two curves in the graph, the algorithm’s action counts are very accurate, with the count statistics of 50 times agreeing exactly with the actual values. Secondly, the overall fit of the two curves in the graph is good, with an average error of only 0.08 s and an average error rate of 4.03%. The maximum error in the calculation is 0.25 s, with a maximum error rate of 13.5%, occurring only at the end points of the curves. Therefore, this experiment proves that the overall effect of the over-zero detection and wavelet analysis method is good, and that the action counting and cycle calculation can be achieved more accurately even with a high number of actions.


## 3.1. Experimental Setup

In this paper, body movements were selected for identification, as showed in Figure3. These included four types of dumbbell movements and three types of leg exercises, namely, the dumbbell curling, side lifting, dumbbell shoulder press, dumbbell flying, sitting posture calf raising, standing posture calf raising, and heel raising. [14].Figure 3
Diagram of the seven body movements.Of the data, this study used a self-constructed dataset, which consisted of a total of 420 samples. A total of six participants, three males and three females, contributed to the dataset, each providing a sample of 70 data items, with 10 items for each type of movement. Only one stance acquisition module was worn by each participant when recording the data. For the dumbbell movements, the posture acquisition module was worn at the wrist and the lower limb movements; the posture acquisition module was worn at the ankle. The weight of the dumbbell used in the dumbbell movement was 25 kg. 80% of the total samples were used as the training set and 20% as the test set. For the deep learning model, 20% of the training set was used as the validation set.


## 3.2. Motion Recognition Experiments

For deep neural networks, one type of preprocessing is to join the first and last nine axes, as described in Section3 of this paper, and the other is to use linear discriminant analysis (LDA) to reduce their dimensionality.The results of the comparison experiments between the two processing methods are shown in Table1, which indicate that linear discriminant analysis is less accurate when used for action recognition. Figure 4 shows the trend of accuracy and loss in the training of the deep neural network. In Figure 4(a), we can see that the training and validation losses continue to decrease until the 200th round of training. Figure 4(b) represents changes in training accuracy and validation accuracy, during which the validation and training losses are basically the same.Table 1
Accuracy of different preprocessing methods.
Data preprocessing method of deep neural networkMotion recognition accuracyLDA dimensionality reduction87.79%Data end to end97.61%Figure 4
Loss and accuracy change curve of the network during training.
(a)
Variation in training loss and validation loss(b)
Changes in training accuracy and validation accuracyIn order to compare the effectiveness of different classification models, this paper next conducts experiments using different models. In addition to SVM and deep neural networks, a multilayer perceptron and least squares based on similarity matching model proposed by Akpan and Aldabbagh [12] was chosen as the two comparison algorithms in this paper. The final accuracy of each model was obtained through experiments on the test set. The multilayer perceptron is a representative forward neural network, and its use as a comparison algorithm can effectively set an accurate reference. As the number of layers implied by a multilayer perceptron is generally small, it is slow and ineffective on higher dimensional datasets, while the raw pose sensor data can often be thousands to tens of thousands of dimensions, so dimensionality reduction is required to feed the data into a multilayer perceptron. In this paper, the same feature extraction method as SVM is used, and the same 36 statistics are selected as features to compare the performance difference between the two on the same dataset.Another comparison algorithm is the least squares-based similarity matching algorithm proposed by Akpan and Aldabbagh [12]. This method first performs operations such as acceleration decomposition and period normalisation on the data and then builds a feature database and judges the action category based on the similarity between the test sample and the standard action in the database during classification; the details are shown in Figure 5.Figure 5
Action recognition accuracy of the four algorithms.From the above experimental results, it can be seen that both the deep learning model and the SVM achieved recognition accuracies above 96%, which are higher than the comparison algorithms, while the multilayer perceptron achieved the lowest accuracy among the four models. The deep learning model achieved a recognition accuracy of 97.61%, and the confusion matrix showed that only two dumbbell shoulder presses were misconceived as dumbbell side planks in the 84 test samples, indicating that the deep learning model proposed in this paper can be used well for small datasets and action recognition. The confusion matrix of the SVM shows that the method is prone to misclassification of the two types of leg movements because the two types of movements are similar and the SVM cannot perfectly separate the two types of movements based on the features from a single sensor alone.


## 3.3. Motion Counting and Cycle Calculation Experiments

The purpose of the action counting and cycle calculation experiment is to verify the accuracy of the counts and cycle calculations. For this experiment, the objectivity of the results is influenced to a large extent by the number of trials. In particular, the action counts and the validity of the analysis method can only be demonstrated by ensuring that the results are accurate for a sufficient number of trials. In this experiment, 50 repetitions were performed, a value which is much higher than the number of time required for a single exercise and which verifies the accuracy of the algorithm. In addition to recording the movements using the sensors, a stopwatch was used to time the cycles of each movement as a practical standard. The exact cycle counted and actual values for the 50 movements in this experiment are shown in Figure6.Figure 6
Action count and cycle calculation results.Firstly, as can be seen from the length of the two curves in the graph, the algorithm’s action counts are very accurate, with the count statistics of 50 times agreeing exactly with the actual values. Secondly, the overall fit of the two curves in the graph is good, with an average error of only 0.08 s and an average error rate of 4.03%. The maximum error in the calculation is 0.25 s, with a maximum error rate of 13.5%, occurring only at the end points of the curves. Therefore, this experiment proves that the overall effect of the over-zero detection and wavelet analysis method is good, and that the action counting and cycle calculation can be achieved more accurately even with a high number of actions.


## 4. Conclusions

This paper presents two types of algorithms for motion monitoring, namely, motion recognition algorithms and cycle computation algorithms. Firstly, two types of active recognition models are introduced, namely, SVM and deep neural networks. For SVM, the feature range is first introduced, then the county body method for feature extraction and feature recognition is introduced, and finally, the classification principle and the selection of key parameters for SVM are introduced. For deep neural networks, the purpose of data preprocessing and the specific ways are introduced first, then the common types of deep networks and their uses are introduced, then the characteristics of 1D CNN and LSTM are analysed and why these two types of networks are chosen to build the classification model are introduced, and the accuracy of action recognition reaches 97.61%, and the accuracy of support vector machine recognition reaches more than 96%.



---

*Source: 6293856-2022-05-05.xml*