Development of a Non-Contacting Muscular Activity Measurement System for Evaluating Knee Extensors Training in Real-Time

To give people more specific information on the quality of their daily motion, it is necessary to continuously measure muscular activity during everyday occupations in an easy way. The traditional methods to measure muscle activity using a combination of surface electromyography (sEMG) sensors and optical motion capture system are expensive and not suitable for non-technical users and unstructured environment. For this reason, in our group we are researching methods to estimate leg muscle activity using non-contact wearable sensors, improving ease of movement and system usability. In a previous study, we developed a method to estimate muscle activity via only a single inertial measurement unit (IMU) on the shank. In this study, we describe a method to estimate muscle activity during walking via two IMU sensors, using an original sensing system and specifically developed estimation algorithms based on ANN techniques. The muscle activity estimation results, estimated by the proposed algorithm after optimization, showed a relatively high estimation accuracy with a correlation efficient of R2 = 0.48 and a standard deviation STD = 0.10, with a total system average delay of 192 ms. As the average interval between different gait phases in human gait is 250–1000 ms, a 192 ms delay is still acceptable for daily walking requirements. For this reason, compared with the previous study, the newly proposed system presents a higher accuracy and is better suitable for real-time leg muscle activity estimation during walking.


Introduction
Knee extensors play an essential role in human mobility [1]. In fact, knee extensors are crucial for activities of daily living (ADL), such as climbing stairs [2], standing up from a chair [3]; and play a fundamental role in many sports, such as volleyball [4], cycling, and basketball [5]. As with every muscle, the knee extensors need continuous training to maintain their strength. However, since they are activated only during very specific movements, it is difficult to estimate the training effect of ADL without any feedback devices. According to the U.S. National Health and Nutrition Examination Survey (NHANES), 45% of US adults self-reported that their training is sufficient, while less than 5% of them actually met the national physical activity recommendation when measured with quantitative analysis using various sensors [6]. Therefore, it was evident that quantitative muscle activity measurement during training can be useful to help people achieve their target by avoiding insufficient or excessive training.
In the past few years, the development of wearable measurement systems improved fast because people started paying more attention to their health status and had begun monitoring their own daily activity [7][8][9]. As walking is a universal, very basic activity for humans, it became a very popular baseline for everyday overall training estimation. At the present, many wearable devices, such as wristwatches and ankle bands, can detect the number of steps of a user during walking. However, the number of steps can offer only limited information about the quality of walking, and on the activation of specific muscular groups in the legs. For a more detailed evaluation of the training effect of walking on single muscle groups, gait analysis should be performed using real-time muscular activity data. In medical settings, muscular activity is usually assessed using surface electromyography (sEMG) [10][11][12]. The clinical usage of sEMG sensors is often referred to as kinesiological sEMG as it involves dynamic recording of muscular activity during intentional movements in functionally relevant tasks characterized by cyclic motion of limb segments such as walking and stepping [13][14][15]. In most gait analysis tests surface myoelectric signals are collected by about 10 sets of electrodes placed in a bipolar configuration connected to a preamplifier fitted a few centimeters away from the contact points. A central board is used to collect the synchronized data from all the sEMG sensors by wire cables or wireless transmission and to transfer the data to the receiving data processing unit. Muscle activity is then calculated from these surface myoelectric data. In more recent studies on gait analysis, optical motion capture systems have also been used for model-based estimation of the muscle activity [16]. Subjects were fitted with markers on all major joints of lower limbs and walked inside a room equipped with an optical motion measurement system which recorded the motions of all markers. Gait was then reconstructed using a kinematic model of the lower human body, and leg muscle activity was then estimated from the reconstructed gait. Instead of motion capture systems, multiple inertial measurement units (IMUs) have also been used in previous studies on gait analysis [17] and rehabilitation [18]. An IMU can measure motion parameters, such as acceleration and angular velocity. To estimate the human lower body link model one IMU must be placed on every link of the lower limbs kinematic chain [19]. The accuracy of IMU-based systems is comparable to the accuracy of motion capture systems [20], albeit their usability is higher as they do not require a fitted environment.
However, all these methods for measuring leg muscle activity have severe limitations, which limit their suitability for widespread adoption as muscle activity estimation systems during ADL. sEMG sensors are invasive as they require adequate skin preparation, such as shaving and removing the sebaceous film by alcohol, to ensure good electrode contact; and the signal processing phase is critical to remove noise and interferences which can corrupt the signal and lead to calculation errors [21]. Optical motion capture systems are expensive and require a specifically fitted room, which severely limits the workspace dimension and the situations in which they can be used. Multiple IMUs acquisition systems also require a long preparation time to fit all sensors in place and can grow very expensive due to the number of units to be used.
For this reason, in a past study, we have developed a system for kinematic modelbased leg muscular activity estimation using only one IMU sensor placed on the shank. However, the preliminary results of system testing showed that knee extensors activity estimation using a traditional human lower limb kinematic model was not sufficiently accurate for real-time analysis.
In this study, we present an updated measurement system and muscle activity estimation algorithm that overcomes all the limitations previously mentioned. The sensor system uses two IMUs, one on the shank and one on the knee joint. The IMUs collect motion data for the calculation of four gait parameters includes acceleration, velocity, angular velocity, and stride length to reconstruct a more precise gait model. ANN techniques, which are often used to solve predictive system problems [22,23], are embedded in the data processing algorithm, using gait parameters and individual biological data, such as BMI and the ratio between lower limb joints, to estimate the activity of the knee extensors. The muscle activity measured from sEMG sensors was used as ground truth at the training phase. We also present the results of a gait analysis experiment to evaluate both performance and reliability of this new system for estimation of knee extensors activity during walking. This paper is structured as following: Section 2 presents the materials and methods and introduces the system used. The experimental setup and algorithm are also described here. Section 3 presents results and Section 4 discusses the results and presents the future research needed to overcome the present problems.

Materials and Methods
The system overview is shown in Figure 1. The motion data collected from IMU sensors were used to calculate gait parameters. These gait parameters, together with muscular activity measured from sEMG sensors and body data were applied as input of the machine learning in the training phase. Once the training is finished, the model can estimate the muscular activity with gait parameters and body data. extensors. The muscle activity measured from sEMG sensors was used as ground truth at the training phase. We also present the results of a gait analysis experiment to evaluate both performance and reliability of this new system for estimation of knee extensors activity during walking. This paper is structured as following: Section 2 presents the materials and methods and introduces the system used. The experimental setup and algorithm are also described here. Section 3 presents results and Section 4 discusses the results and presents the future research needed to overcome the present problems.

Materials and Methods
The system overview is shown in Figure 1. The motion data collected from IMU sensors were used to calculate gait parameters. These gait parameters, together with muscular activity measured from sEMG sensors and body data were applied as input of the machine learning in the training phase. Once the training is finished, the model can estimate the muscular activity with gait parameters and body data.

Sensor System
The sensor system consisted of sEMG sensors and IMU sensors, both designed by our group. In particular, data from sEMG sensors were used only for neural network training and for the final algorithm validation, to compare the estimated muscle activity with the actual muscle activity directly measured via sEMG.
The sEMG sensor, named Waseda Bioinstrumentation sEMG (WB-EMMG) ( Figure  2a) [24], was developed based on ISEK [25] and SENIAM standards [26]. It has a good Signal Noise Rejection (SNR) thanks to its gold plated active electrodes [27], and an appropriate AD coupling and common mode noise rejection by design [24]. The specifications of the sEMG sensor are summarized in Table 1.

Sensor System
The sensor system consisted of sEMG sensors and IMU sensors, both designed by our group. In particular, data from sEMG sensors were used only for neural network training and for the final algorithm validation, to compare the estimated muscle activity with the actual muscle activity directly measured via sEMG.
The sEMG sensor, named Waseda Bioinstrumentation sEMG (WB-EMMG) (Figure 2a) [24], was developed based on ISEK [25] and SENIAM standards [26]. It has a good Signal Noise Rejection (SNR) thanks to its gold plated active electrodes [27], and an appropriate AD coupling and common mode noise rejection by design [24]. The specifications of the sEMG sensor are summarized in Table 1.   Figure  2b) [28] includes a tri-axial accelerometer, a tri-axial gyroscope, and a tri-axial magnetometer. It also has both a Bluetooth interface, which allows wireless data transmission for a maximum distance of 10 m, and a CAN bus interface, which allows synchronized data transfer via cable. The IMU specifications are summarized in Table 2. A diagram of the whole sensor system used in this study is shown in Figure 3. A Central board gathered all synchronized sEMG sensor data through CAN bus and sent it to a data processor through class1 Bluetooth interface, while IMUs sent motion data through class1 Bluetooth interface simultaneously. The data processor collected all synchronized sensors data and processed them in real-time.  The 9-axis IMU, named Waseda Bioinstrumentation Ver.4 IMU (WB-4 IMU) (Figure 2b) [28] includes a tri-axial accelerometer, a tri-axial gyroscope, and a tri-axial magnetometer. It also has both a Bluetooth interface, which allows wireless data transmission for a maximum distance of 10 m, and a CAN bus interface, which allows synchronized data transfer via cable. The IMU specifications are summarized in Table 2. A diagram of the whole sensor system used in this study is shown in Figure 3. A Central board gathered all synchronized sEMG sensor data through CAN bus and sent it to a data processor through class1 Bluetooth interface, while IMUs sent motion data through class1 Bluetooth interface simultaneously. The data processor collected all synchronized sensors data and processed them in real-time.

Experimental Protocol
In this study, 14 healthy subjects (8 males, 6 females, age: 21-41 years old) participated in the data collection experiment. Subjects' relevant physical parameters are shown in Table 3. All subjects gave their informed consent for inclusion before they participated in the study. The study was conducted in accordance with the Declaration of Helsinki, and the protocol was approved by the Ethics Committee of Waseda University (Protocol code: 2015-050 and Date of approval: 3 July 2015). Phases T1 and T2 were conducted on a flat surface indoors ( Figure 4). Gait data from both EMG and IMUs were recorded while the subjects walked normally, for 5 m, five times, at the same speed for each phase. In phase T1, subjects walked at a self-perceived normal pace, and in phase T2, at a self-perceived brisk pace. At the beginning and the end of each phase, and every time a 5 m walking distance repetition was completed, the subjects stood without moving for 3 s. The subjects wore their normal shoes during the experiment.

Experimental Protocol
In this study, 14 healthy subjects (8 males, 6 females, age: 21-41 years old) participated in the data collection experiment. Subjects' relevant physical parameters are shown in Table 3. All subjects gave their informed consent for inclusion before they participated in the study. The study was conducted in accordance with the Declaration of Helsinki, and the protocol was approved by the Ethics Committee of Waseda University (Protocol code: 2015-050 and Date of approval: 3 July 2015). The experiment protocol was composed of 5 phases as follows: Phases T1 and T2 were conducted on a flat surface indoors ( Figure 4). Gait data from both EMG and IMUs were recorded while the subjects walked normally, for 5 m, five times, at the same speed for each phase. In phase T1, subjects walked at a self-perceived normal pace, and in phase T2, at a self-perceived brisk pace. At the beginning and the end of each phase, and every time a 5 m walking distance repetition was completed, the subjects stood without moving for 3 s. The subjects wore their normal shoes during the experiment.

Experimental Protocol
In this study, 14 healthy subjects (8 males, 6 females, age: 21-41 years old) participated in the data collection experiment. Subjects' relevant physical parameters are shown in Table 3. All subjects gave their informed consent for inclusion before they participated in the study. The study was conducted in accordance with the Declaration of Helsinki, and the protocol was approved by the Ethics Committee of Waseda University (Protocol code: 2015-050 and Date of approval: 3 July 2015). The experiment protocol was composed of 5 phases as follows: T1: 5 m normal flat walking at self-pace for five times T2: 5 m normal flat walking at brisk pace for five times T3: MVC of knee extension muscle (Left) T4: MVC of knee extension muscle (Right) T5: Measurement of lower limb ratio and BMI Phases T1 and T2 were conducted on a flat surface indoors ( Figure 4). Gait data from both EMG and IMUs were recorded while the subjects walked normally, for 5 m, five times, at the same speed for each phase. In phase T1, subjects walked at a self-perceived normal pace, and in phase T2, at a self-perceived brisk pace. At the beginning and the end of each phase, and every time a 5 m walking distance repetition was completed, the subjects stood without moving for 3 s. The subjects wore their normal shoes during the experiment.  After the walking experiment, in phases T3 and T4 we measured the maximum voluntary contraction (MVC) of calf and thigh of subjects. In T3 (Figure 5a), subjects laid down and the maximum muscle activation of the thigh muscles on isometric contraction was measured via EMG sensors for 5 s. Subjects were asked to push their foot as much as possible with knees bent at 90 • while the shank was restrained by the experimenters. In T4 (Figure 5b), the subject sat on a chair and the maximum muscle activation of the calf muscles on isometric contraction was measured via EMG sensors for 5 s. Subjects were asked to push the anterior part of their foot against the wall as much as possible while the chair was kept in place by the experimenters. After the walking experiment, in phases T3 and T4 we measured the maximum voluntary contraction (MVC) of calf and thigh of subjects. In T3 (Figure 5a), subjects laid down and the maximum muscle activation of the thigh muscles on isometric contraction was measured via EMG sensors for 5 s. Subjects were asked to push their foot as much as possible with knees bent at 90° while the shank was restrained by the experimenters. In T4 (Figure 5b), the subject sat on a chair and the maximum muscle activation of the calf muscles on isometric contraction was measured via EMG sensors for 5 s. Subjects were asked to push the anterior part of their foot against the wall as much as possible while the chair was kept in place by the experimenters. Finally, in T5 the body measurements, weight, height, length of the calf, and length of the full leg, were taken to calculate the lower limb ratio and BMI. These parameters were calculated using the following formulas: The target knee extensor muscles in this study were the rectus femoris muscle (RFM) in the thigh and the outer gastrocnemius muscle (OGM) in the calf. For this reason, the sensors were placed as in Figure 6. below: the two EMG sensors were placed at 1/2 of the thigh length and at 1/3 of the calf length from the knee. There are individual variations in the actual conformation of the muscles, therefore, extra care was taken in ensuring an accurate placement of the sensor on the middle of the target muscles to minimize measurement errors. Finally, in T5 the body measurements, weight, height, length of the calf, and length of the full leg, were taken to calculate the lower limb ratio and BMI. These parameters were calculated using the following formulas: The target knee extensor muscles in this study were the rectus femoris muscle (RFM) in the thigh and the outer gastrocnemius muscle (OGM) in the calf. For this reason, the sensors were placed as in Figure 6. below: the two EMG sensors were placed at 1/2 of the thigh length and at 1/3 of the calf length from the knee. There are individual variations in the actual conformation of the muscles, therefore, extra care was taken in ensuring an accurate placement of the sensor on the middle of the target muscles to minimize measurement errors.
IMU sensors were positioned at the knee and the ankle, oriented so that the sensor Z-axis was perpendicular to the facing direction of the subjects. Unlike the EMG sensors, IMU sensors do not require direct contact with the skin. After positioning the sensors, the whole system was turned on and connected to the GUI on the data processor PC via Bluetooth. The target knee extensor muscles in this study were the rectus femoris muscle (RFM) in the thigh and the outer gastrocnemius muscle (OGM) in the calf. For this reason, the sensors were placed as in Figure 6. below: the two EMG sensors were placed at 1/2 of the thigh length and at 1/3 of the calf length from the knee. There are individual variations in the actual conformation of the muscles, therefore, extra care was taken in ensuring an accurate placement of the sensor on the middle of the target muscles to minimize measurement errors.

Muscle Activity Estimation
The muscle activity estimation algorithm was divided into two main parts. A block diagram of the algorithm is shown in Figure 7. IMU sensors were positioned at the knee and the ankle, oriented so that the sensor Zaxis was perpendicular to the facing direction of the subjects. Unlike the EMG sensors, IMU sensors do not require direct contact with the skin. After positioning the sensors, the whole system was turned on and connected to the GUI on the data processor PC via Bluetooth.

Muscle Activity Estimation
The muscle activity estimation algorithm was divided into two main parts. A block diagram of the algorithm is shown in Figure 7.

Gait Parameter Calculation
To estimate the leg muscles activity from the motion data measured via IMU, gait parameters must be calculated first. A block diagram of the gait parameters calculation algorithm is shown in Figure 8.

Gait Parameter Calculation
To estimate the leg muscles activity from the motion data measured via IMU, gait parameters must be calculated first. A block diagram of the gait parameters calculation algorithm is shown in Figure 8. The gait parameters calculation algorithm consists of the following steps: 1. Swing phase and stance phase detection: the angular velocity is used to determine the initial and terminal contact of the foot using the algorithm described in [29]. The gait cycle is then determined from the detection of the following events: An example of IMU gait data for one foot and gait parameter computation is shown in Figure 9. The stance phase is defined as the period from HS to TO while the swing phase is defined as the period from TO to the subsequent HS. The stance time and the swing time can then be calculated.
2. Peak detection in swing phase: The peak values of acceleration and angular velocity vectors during swing phase are calculated using the following formulas: The gait parameters calculation algorithm consists of the following steps: 1.
Swing phase and stance phase detection: the angular velocity is used to determine the initial and terminal contact of the foot using the algorithm described in [29]. The gait cycle is then determined from the detection of the following events: An example of IMU gait data for one foot and gait parameter computation is shown in Figure 9. The gait parameters calculation algorithm consists of the following steps: 1. Swing phase and stance phase detection: the angular velocity is used to determine the initial and terminal contact of the foot using the algorithm described in [29]. The gait cycle is then determined from the detection of the following events: An example of IMU gait data for one foot and gait parameter computation is shown in Figure 9. The stance phase is defined as the period from HS to TO while the swing phase is defined as the period from TO to the subsequent HS. The stance time and the swing time can then be calculated.
2. Peak detection in swing phase: The peak values of acceleration and angular velocity vectors during swing phase are calculated using the following formulas: The stance phase is defined as the period from HS to TO while the swing phase is defined as the period from TO to the subsequent HS. The stance time and the swing time can then be calculated.

2.
Peak detection in swing phase: The peak values of acceleration and angular velocity vectors during swing phase are calculated using the following formulas: Notably, an R-adaptive extended Kalman filter (EKF) was applied to the sensor data to increase the computational accuracy [30]. R is the covariance matrix of the acceleration, corrected to remove the effect of gravity [31]. In fact, to convert the coordinate system of the inertial sensor from local to global coordinates, the angle of rotation of the sensor in global coordinates must be calculated. The angle of rotation can be calculated from acceleration and angular velocity data. However, the angle obtained by integrating angular velocity accumulates integration error, while the value obtained by calculating the change of gravity direction from accelerometer data is affected by the acceleration error due to inertial force. Therefore, the EKF plays a fundamental role in increasing the accuracy of the whole sensor system against errors due to sensor data noise. In our case, the EKF uses accelerometer and gyroscope data for noise canceling and measurement accuracy improvement, as shown in the block diagram in Figure 10. Notably, an R-adaptive extended Kalman filter (EKF) was applied to the sensor data to increase the computational accuracy [30]. R is the covariance matrix of the acceleration, corrected to remove the effect of gravity [31]. In fact, to convert the coordinate system of the inertial sensor from local to global coordinates, the angle of rotation of the sensor in global coordinates must be calculated. The angle of rotation can be calculated from acceleration and angular velocity data. However, the angle obtained by integrating angular velocity accumulates integration error, while the value obtained by calculating the change of gravity direction from accelerometer data is affected by the acceleration error due to inertial force. Therefore, the EKF plays a fundamental role in increasing the accuracy of the whole sensor system against errors due to sensor data noise. In our case, the EKF uses accelerometer and gyroscope data for noise canceling and measurement accuracy improvement, as shown in the block diagram in Figure 10. In the prediction phase, the angle in the following instant in time is calculated by the current angle and angular velocity. In the update phase, the predicted angle is compensated by the angle calculated from the actual accelerometer data. The accuracy of the angle calculated from accelerometer data depends on the measurement condition, whether static or dynamic. To overcome this problem, the R-adaptive process minimizes the uncertainty in each measurement condition.
The formula for computing R is shown in Equations (5) and (6) [32]: R-adaptive is the acceleration norm minus gravity where N is the number of samples of the temporal window; is the estimated variance at step k; | | is the module of the acceleration measured by the accelerometer (in G) at the step . Contrary to the accelerometer, the uncertainty of gyroscope data does not depend on the measurement condition, so it is assumed to be equal to the variance of measurement noise.
3. Coordinate transformation: To calculate the actual motion of the ankle, the motion data measured by the IMU sensor in its local coordinate must be transformed into the global coordinate as shown in Figure 11. To do so, we used the quaternion calculated by EKF, which gives the attitude of the sensor in the 3D space. In the prediction phase, the angle in the following instant in time is calculated by the current angle and angular velocity. In the update phase, the predicted angle is compensated by the angle calculated from the actual accelerometer data. The accuracy of the angle calculated from accelerometer data depends on the measurement condition, whether static or dynamic. To overcome this problem, the R-adaptive process minimizes the uncertainty in each measurement condition.
The formula for computing R is shown in Equations (5) and (6) [32]: R-adaptive is the acceleration norm minus gravity where N is the number of samples of the temporal window; σ 2 k is the estimated variance at step k; ||a i || is the module of the acceleration measured by the accelerometer (in G) at the step i. Contrary to the accelerometer, the uncertainty of gyroscope data does not depend on the measurement condition, so it is assumed to be equal to the variance of measurement noise.

3.
Coordinate transformation: To calculate the actual motion of the ankle, the motion data measured by the IMU sensor in its local coordinate must be transformed into the global coordinate as shown in Figure 11. To do so, we used the quaternionq calculated by EKF, which gives the attitude of the sensor in the 3D space. 4. Zero Velocity Update: To cancel the integration error, we used the Zero Velocity Update (ZUPT) [33] algorithm to calculate the peak of the velocity and estimate the stride length. The peak of the velocity was calculated using the following set of equations: 5. Stride length calculation: the stride length was calculated from the walking distance in global coordinated, which is computed by integrating the velocity in time (Equation (11)). The walking distance computed using data from the sensor on the shank is shown in Figure 12.

4.
Zero Velocity Update: To cancel the integration error, we used the Zero Velocity Update (ZUPT) [33] algorithm to calculate the peak of the velocity and estimate the stride length. The peak of the velocity was calculated using the following set of equations:

5.
Stride length calculation: the stride length was calculated from the walking distance in global coordinated, which is computed by integrating the velocity in time (Equation (11)). The walking distance computed using data from the sensor on the shank is shown in Figure 12. Since the distance in global coordinates traveled by the sensor at the ankle is the distance traveled by the ankle itself, the sensor is stationary during the stance phase and moves forward during the swing phase. Therefore, the graph in figure 11 has a staircase shape. The stride length can be calculated from the walking distance via Equation (12). To Since the distance in global coordinates traveled by the sensor at the ankle is the distance traveled by the ankle itself, the sensor is stationary during the stance phase and moves forward during the swing phase. Therefore, the graph in Figure 11 has a staircase shape. The stride length can be calculated from the walking distance via Equation (12). To improve the algorithm accuracy against missteps, strides with a stride length of 30 cm or less are ignored [34].

Muscle Activity Measurement
In this study, we used machine learning techniques to build an adaptive model of muscle activity. In particular, we used an Artificial Neural Network (ANN) for model training. There are in fact many works using ANN for human analysis and adaptive modeling. In the initial stage of model training, the model was trained within a fullconnected network. The problems of the trained model were recorded and analyzed after obtaining the estimation results, and the model was refined. After a few refining iterations, having reached satisfactory training results, the model hyper-parameters were optimized. The network structure was also modified to improve the estimation accuracy. The ratio between training datasets and validation datasets is 8:2, while the validation datasets were selected by assigned random seed in algorithm.
Since the problems discussed in this study are value prediction problems, we are essentially facing a standard regression problem for classification. The model training in this study was conducted locally. The training framework and the software environments are shown in Table 4. The CUDA library is a parallel computing library that allows software to use certain types of graphics processing units (GPUs) for general purpose processing. It is applied in the project to get acceleration in machine learning. Tensorflow is a free and open-source platform for machine learning. Keras is also an open-source library that acts as an interface for the Tensorflow to enable fast experimentation with deep neural networks.
In the training phase, we used normalized MVC data R mvc instead of raw muscle activity EMG data. MVC normalization is a commonly used amplitude post-processing technique on EMG signals. The method utilizes a maximum root mean square (RMS) value from the recording of the MVC of the muscle to normalize subsequent EMG data series. The output is displayed as a percentage of the MVC (%MVC) value, which can be used to easily establish a common ground when comparing data between subjects and between different muscles. The R mvc calculated is used for neural network regression in order to find the correlation between gait parameters and muscle activity. Figure 13 shows the overall EMG data processing workflow.
technique on EMG signals. The method utilizes a maximum root mean square (RMS) value from the recording of the MVC of the muscle to normalize subsequent EMG data series. The output is displayed as a percentage of the MVC (%MVC) value, which can be used to easily establish a common ground when comparing data between subjects and between different muscles. The calculated is used for neural network regression in order to find the correlation between gait parameters and muscle activity. Figure 13 shows the overall EMG data processing workflow. From the EMG of one gait cycle the Root Mean Square (RMS) with 100 ms of window size (Equation (13)) is calculated, and subsequently normalized by MVC.

Results
In this study, a new method to estimate muscle activity of two muscles used in walking, the rectus femoris muscle in the thigh (RFM), and the outer gastrocnemius muscle in the calf (OGM) is presented. The real-time EMG muscle activity measurement was taken as the ground truth against which the model performance was evaluated. We compared the performance of the muscle activity estimation model with the actual muscle activity measured via EMG during walking. We used the coefficient of determination , calculated in Equation (14), as the index to evaluate the performance of the model: Where refers to the residual sum of squares, and refers to the total sum of squares.
For each muscle, the average muscle activity and the peak performance in one gait cycle were estimated. The results of the system performance experiment are shown in Table 5. The comparison between the muscle activity estimated by the proposed algorithm Figure 13. EMG data processing workflow.
From the EMG of one gait cycle the Root Mean Square (RMS) with 100 ms of window size (Equation (13)) is calculated, and subsequently normalized by MVC.

Results
In this study, a new method to estimate muscle activity of two muscles used in walking, the rectus femoris muscle in the thigh (RFM), and the outer gastrocnemius muscle in the calf (OGM) is presented. The real-time EMG muscle activity measurement was taken as the ground truth against which the model performance was evaluated. We compared the performance of the muscle activity estimation model with the actual muscle activity measured via EMG during walking. We used the coefficient of determination R 2 , calculated in Equation (14), as the index to evaluate the performance of the model: where SS res refers to the residual sum of squares, and SS tot refers to the total sum of squares. For each muscle, the average muscle activity and the peak performance in one gait cycle were estimated. The results of the system performance experiment are shown in Table 5. The comparison between the muscle activity estimated by the proposed algorithm and the actual % MVC calculated from EMG measurements showed a high estimation accuracy with a correlation efficient of R 2 = 0.89. The real-time performance was shown as Table 6.

Discussion
By default, the hyper-parameters of the model at this stage have not been optimized. From the views of results, the accuracy of the model is notably high, but weird where accuracy testing is 30% different between the training dataset and the testing dataset. Such a situation shows that the model is with low robustness at the same time. We achieved the model optimization to improve the robustness.

1.
Optimization of the Hyper-parameters: Hyper-parameters refer to the parameters that control the process of machine learning: loss function, learning rate, and optimization algorithm. The model optimization used in this study is "GrindSearch" [35]. This method is simply an exhaustive searching through a specified subset of hyperparameters of the learning algorithm to find the optimal combination. This method has two main limitations. First, this hyper-parameter optimization method is a brute force search method. Before using it, it is necessary to set a limited range for each hyper-parameter, and the obtained optimal result is only the best result in the set range. Second, because this method will exhaustively compare the performances of the algorithm for all the hyperparameters combinations within the given range, it is very time-consuming. Even in the limited hyperparameters subspace used in this study, it took a long time. The subset of hyperparameters optimized in this study is:  Table 7. This set of optimized hyperparameters leads to a relatively good performance, but also to a more complex structure of the model, which indirectly increases the difficulty of model training. For this reason, the optimized model is not suitable for online learning predictions. However, the model discussed in this study is only used for offline learning.

2.
Optimization of the network structure: the most common network structure for ANN is full connection, meaning that the nodes of each layer are connected to all the nodes of the adjacent layers. The advantage of such a structure is that it can learn the training data characteristics more comprehensively. However, sometimes, a full connected ANN might give too much weight to less important or interfering features, e.g., signal processing noise. In such cases, the resulting trained model is less robust, e.g., overly sensitive to noise, and easy to overfit if trained on a small dataset, which leads to lack of practical application value of the model. Therefore, in this study we used the "Dropout" method, to randomly discard some nodes connections (Figure 14). This process is equivalent to noise reduction. Before using the "Dropout" method, we only need to specify the percentage of node connections required to be dropped. We compared the performances of different neural networks obtained with this process separately and selected the structure with the best performance. In this study, 20% of the original full connected neural network connections were randomly discarded based on empirical values. is full connection, meaning that the nodes of each layer are connected to all the nodes of the adjacent layers. The advantage of such a structure is that it can learn the training data characteristics more comprehensively. However, sometimes, a full connected ANN might give too much weight to less important or interfering features, e.g., signal processing noise. In such cases, the resulting trained model is less robust, e.g., overly sensitive to noise, and easy to overfit if trained on a small dataset, which leads to lack of practical application value of the model. Therefore, in this study we used the "Dropout" method, to randomly discard some nodes connections (Figure 14). This process is equivalent to noise reduction. Before using the "Dropout" method, we only need to specify the percentage of node connections required to be dropped. We compared the performances of different neural networks obtained with this process separately and selected the structure with the best performance. In this study, 20% of the original full connected neural network connections were randomly discarded based on empirical values. The performance gap between the model on the training dataset and the test dataset is within 5%. In other words, after this optimization process, the general performance of the model has been improved.
The results estimated by the proposed algorithm after optimization (in Table 8 and Figure 15.) showed a relatively high estimation accuracy with a correlation efficient of = 0.48 (where significant difference between distributions was confirmed using the Steel-Dwass test). For the RFM, the muscle average activity estimation and the activity peak value estimation are comparable in terms of accuracy, while the first is more scattered compared to the latter. As for the OGM, the muscle average activity estimation and the activity peak value estimation are concentrated, while the first is slightly higher than the latter.  The performance gap between the model on the training dataset and the test dataset is within 5%. In other words, after this optimization process, the general performance of the model has been improved.
The results estimated by the proposed algorithm after optimization (in Table 8 and Figure 15) showed a relatively high estimation accuracy with a correlation efficient of R 2 = 0.48 (where significant difference between distributions was confirmed using the Steel-Dwass test). For the RFM, the muscle average activity estimation and the activity peak value estimation are comparable in terms of accuracy, while the first is more scattered compared to the latter. As for the OGM, the muscle average activity estimation and the activity peak value estimation are concentrated, while the first is slightly higher than the latter. It is important to note that the performance of real-time muscle activity estimation is affected by the signal transmission and processing delay of the current system. The measured average processing delay of the system is 72 ms, while the wireless communication average delay is 120 ms, with a total system average delay of 192 ms. Human regular walking frequency is between 1 Hz and 4 Hz [36], which means that the average interval between different gait phases is 250-1000 ms. For this reason, a 192 ms delay is still acceptable for daily walking requirements (total delay <250 ms). It is important to note that the performance of real-time muscle activity estimation is affected by the signal transmission and processing delay of the current system. The measured average processing delay of the system is 72 ms, while the wireless communication average delay is 120 ms, with a total system average delay of 192 ms. Human regular walking frequency is between 1 Hz and 4 Hz [36], which means that the average interval between different gait phases is 250-1000 ms. For this reason, a 192 ms delay is still acceptable for daily walking requirements (total delay <250 ms).
From the results, is near 0.5 which shows to be moderate effect size. We can say that the muscle activity estimation using proposed system is working while the estimation of the rectus femoris muscle is less accurate than the muscle activity estimation of the outer gastrocnemius muscle. The reason might be due to the scarce usage of the thigh muscle during normal walking. The function of the rectus femoris during walking is raising the leg during the swing phase and lifting the upper body during stance phase. During normal walking, the upper body will only be lifted slightly. According to a previous study [37], the activity of the rectus femoris muscle is about 26%MVC during normal walking while it is 67% MVC during stair climbing. This might also cause an error in the muscle average activity estimation, and this could explain why the activity peak value estimation of the rectus femoris muscle has better performance in comparison. As for the outer gastrocnemius muscle, both estimation results are good, and the average activity estimation is better. This is because the outer gastrocnemius muscle is frequently used in normal walking to maintain the balance of the whole body and for kicking off the ground during the stance phase.
During this study, some limitations have been discovered: 1. The model used in the study uses the EMG sensors measurements as the ground truth for MVC calculation. However, EMG measurement itself has intrinsic errors. For this reason, further improvements in prediction accuracy are required, possibly using more than one method to measure muscle activation and calculate the MVC; 2. The system in this study has data processing limitations. Before importing the model, the measured data must be filtered to remove noise and interference. As a result, the system must rely on adequate data preprocessing for correct real-time estimation of MVC values. From the results, R 2 is near 0.5 which shows to be moderate effect size. We can say that the muscle activity estimation using proposed system is working while the estimation of the rectus femoris muscle is less accurate than the muscle activity estimation of the outer gastrocnemius muscle. The reason might be due to the scarce usage of the thigh muscle during normal walking. The function of the rectus femoris during walking is raising the leg during the swing phase and lifting the upper body during stance phase. During normal walking, the upper body will only be lifted slightly. According to a previous study [37], the activity of the rectus femoris muscle is about 26%MVC during normal walking while it is 67% MVC during stair climbing. This might also cause an error in the muscle average activity estimation, and this could explain why the activity peak value estimation of the rectus femoris muscle has better performance in comparison. As for the outer gastrocnemius muscle, both estimation results are good, and the average activity estimation is better. This is because the outer gastrocnemius muscle is frequently used in normal walking to maintain the balance of the whole body and for kicking off the ground during the stance phase.
During this study, some limitations have been discovered: 1.
The model used in the study uses the EMG sensors measurements as the ground truth for MVC calculation. However, EMG measurement itself has intrinsic errors. For this reason, further improvements in prediction accuracy are required, possibly using more than one method to measure muscle activation and calculate the MVC; 2.
The system in this study has data processing limitations. Before importing the model, the measured data must be filtered to remove noise and interference. As a result, the system must rely on adequate data preprocessing for correct real-time estimation of MVC values.

Conclusions and Future Works
In this study, a real-time muscular activity measurement system using non-contact sensors was developed. The system uses two IMU sensors to collect the motion data during normal walking to estimate the knee extensor activity. An Artificial Neural Network was used in estimation model training. An evaluation experiment was also conducted to validate the estimation algorithm.
In this study, we have shown that it is possible to estimate knee extensors activity during simple walking at different speeds, without an EMG or a Ground Reaction Force