Continuous Lower Limb Multi‐Intent Prediction for Electromyography‐Driven Intrinsic and Extrinsic Control

Currently, electromyography (EMG)‐driven lower limb control can be divided into computational intrinsic control and interactive extrinsic control based on the participation of neural information in the controllers. However, the former method lacks detailed measurements of the expected motion, whereas the latter is prone to errors in diverse movement situations. Based on this problem, a multi‐intent prediction scheme is proposed that analyzes both rhythmic locomotion and volitional movement intent for AI‐based intrinsic and extrinsic hybrid control (AIEC). A 1D residual shrinkage convolutional network is designed to extract EMG features. The motion state is continuously predicted with an accuracy of 91.66% and the angle completion is also estimated with R2$R^{2}$ of 0.9540 and 0.9456 for left and right knee angles, respectively. Additionally, the comparison test further indicates that the motion state classification is significantly improved in the multitask analysis compared with the single‐task approach. This work demonstrates and verifies a novel method in EMG studies that multi‐intent recognition not only compensates for the lack of information in the analysis of single rhythmic or volitional movement, but also enhances the comprehensive performance and makes AIEC feasible, which optimizes the current EMG‐driven control for ampler intent collection and more practical robotic control.


Introduction
An increasing number of people, particularly the elderly, suffer from muscle power loss or even paralysis owing to the aging population and the spread of chronic diseases. [1,2]The development of lower limb robots has offered assistance to this group of people in improving mobility, aiding rehabilitation, and conveniently performing daily activities.Several research institutions and companies have devoted themselves to relevant research and made progress in robotic theory and development.
User intent is necessary for robotic control to coordinate movements with human subjects to accomplish tasks.There are two common methods for human-machine interactions in this field. [3]One method involves accepting a prior signal directly from the user.Typical prior signals refer to signals sent from the musculoskeletal or nervous systems that intuitively reveal the user's motion intention.The other method uses posterior signals based on the user movement analysis.Such instructions generally include mechanical signals, such as encoders and inertial measurement unit (IMU) signals.Compared with posterior signals, prior signals have fewer limitations on user mobility but are less reliable.Electromyography (EMG) is a typical prior signal that is an additive effect of the motor unit action potentials (MUAPs) generated during muscle contraction. [4,5]In particular, EMG signals can be detected approximately 50-100 ms before the motion, [6] which provides a method for a more active and faster interaction with the robot, as shown in Figure 1.Therefore, useful information can be extracted from the EMG to predict human intentions for accurate robot actuation and control.
With the development of EMG technology, researchers have focused on using EMG as an interface to decode human motion for lower limb robotic control.Lower limb prosthesis control is generally divided into two categories: computational intrinsic control (CIC) and interactive extrinsic control (IEC). [7]With the development of neurorobots, this definition was extended [8] based on how neural information is used in EMG-driven controllers.In EMG-driven control, CIC predicts the correct movement state according to the EMG signal in rhythmic locomotion, and the control in each state is completed by the control board.These studies focused on improving the classification accuracy of additional motion classes.For example, EMG-mechanical fusion methods were proposed to continuously estimate multiple locomotion modes. [9,10]Similarly, three to five classes of daily real-life terrain were recognized via a single-channel EMG signal. [11]However, in this way, only the classified states can be selected and transferred.Detailed information on each state is not included.In contrast, other EMG-driven control groups concentrated on learning volitional movement from EMG signals, which is the IEC in EMG-driven lower limb prosthesis studies.Relevant research usually focuses on a more accurate performance of the joint trajectory or force estimation.
Flexion-extension (FE) angles are recognized based on EMG features extracted using deep belief networks and convolutional neural networks. [12,13]Some researchers mapped EMG to the joint torque and the performances of neural networks, polynomial regression, and linear regression were compared. [14,15]hese methods also lack information on robotic control to improve the control switches.For example, the same knee angle may occur in different scenarios, such as walking and climbing the stairs, where users require completely different robotic assistance.Without such information, lower limb robots face difficulties in dealing with different motion scenes and real-life terrain.
Generally, assistive robots are expected to actively assist in multifunctional daily tasks coordinated with human intent.Intent information for rhythmic locomotion and volitional movement are both significantly important.Therefore, in this study, we proposed a multi-intent analysis and prediction scheme to recognize these two types of information simultaneously.A robust deep-learning model was designed to extract complex EMG features with a 1D residual convolutional structure and a soft threshold to reduce unnecessary noise.As shown in Figure 2, both the motion state and knee angles can be recognized during dynamic lower limb activities, which can compensate for the lack of information in the analysis of single  rhythmic or volitional movements.When a user wants to go upstairs, their intentional movement and detailed knee angle can be analyzed simultaneously; therefore, the robot can change its operation mode and reach the target angle.Using the proposed analysis method, AI-based intrinsic and extrinsic hybrid control (AIEC) can be realized.AIEC will provide a novel method in future EMG-driven control to collect more user intentions and apply them to practical multifunctional assistance.

Dataset
We used the public dataset named ENcyclopedia of Able-bodied Bilateral Lower Limb Locomotor Signals (ENABL3S) to verify the proposed scheme. [16]This benchmark dataset was selected because it simultaneously recorded EMG signals, joint kinematic signals, and motion states during free switching between several daily lower limb activities.Ten healthy participants were recruited and equipped with wearable sensors, including bipolar EMG electrodes (DE2.1;Delsys, Boston, MA, USA) and electrogoniometers (SG150; Biometrics Ltd., Newport, UK).Electrodes were placed on both legs of the vastus lateralis (VL), rectus femoris (RF), biceps femoris (BF), semitendinosus (ST), tibialis anterior (TA), medial gastrocnemius (MG), and soleus (SOL).A goniometer was placed on the knee to measure the knee flexion/extension angle change.EMG signals were collected at a sampling rate of 1000 Hz, bandpass-filtered between 20 and 350 Hz, and notch-filtered at 60, 180, and 300 Hz.The goniometer sampling rate was 500 Hz.A 10 Hz low-pass filter was used for the angle signals.Each subject was required to perform 25 repetitions of a series of motions (seven motion states), including sitting (S), level ground walking (LW), 10°ascent/descent ramping (RA/RD), ascending/descending four stairs (SA/SD), and standing (St).The signals were divided into continuous overlapping windows to obtain sufficient information for model learning.For the requirement of interaction efficiency, [17] we selected an EMG window length of 300 ms with a 20 ms interval between the overlapping windows.The knee angle and motion state at the end of the window were set as labels for the EMG window.With EMG windows as input, the model was designed to estimate the user's intent, including both the movement state and specific knee-bending angle (Figure 3).

Deep 1D Residual Shrinkage Multitask Model
In this study, we superimposed 1D convolutional layers on our model design.The 1D convolution is different from the traditional 2D convolution.It only moves in the time direction to learn knowledge.This type of convolution not only reduces the redundant space-information dimension but is also suitable for extracting deep time-domain features.Consequently, superimposing typical structures can effectively handle 1D timing signals with complex features.
In addition, a residual structure was introduced in our design.The residual learning framework, first proposed in 2015, [18] made significant progress in image recognition.It overcame the problem of accuracy saturation as the network depth increased.With identity shortcuts, higher accuracy could be obtained from deeper networks, which could be optimized easily.
To adapt to the EMG signals containing high noise and redundant information, a soft threshold structure was added to our model.The soft-thresholding mechanism can be explained using Equation (1).In a common denoising method, threshold settings are used to delete unimportant features.However, setting this value is problematic.This can be solved by combining a deep neural network with a soft threshold as follows, [19,20] and the proper threshold can be automatically determined by network learning.
where x represents the input, y represents the output, and τ is the threshold value.
The specific design of our model is as follows.The model is primarily composed of 1D residual shrinkage convolution (ORSC) units (Figure 4).This unit comprises two Conv1D modules and a soft-threshold module.The Conv1D module includes a 1D convolutional layer with ReLU activation, followed by a batch normalization layer.The configurations include stride 1, the same padding, and L2 regularization.In the ORSC unit, the soft threshold for each channel of the feature map is calculated using the designed structure.Through absolute value and global average pooling, the threshold can be obtained by multiplying its output with a 0-1 ranged value learned by the subsequent two fully connected layers.This threshold is applied to the extracted feature maps.A shortcut structure is introduced to connect the soft-thresholding result with the input.
The overall structure of the proposed model is shown in Figure 4.The input EMG windows are processed using zero padding.This structure is designed to prevent information loss after the initial convolution.Subsequently, a Conv1D module with 64 filters extracts preliminary features from the EMG signals.
For each Conv1D module, the 1D convolutional layer effectively extracts the deep time information.The ReLU activation is also performed.Compared to other activation functions, it can accelerate network training, prevent vanishing gradients, and reduce overfitting.Then, batch normalization is added not only to accelerate training and avoid overfitting, but also to prevent gradient dispersion problems and improve the generalization ability of the network.Subsequently, maximum pooling is used to retain the main preliminary features.These preliminary features are then fed into a series of ORSC modules.In the ORSC structure, the input first passes through superimposed convolutional layers to extract deep patterns.Subsequently, the soft threshold structure automatically calculates the optimal threshold value during the training process.This threshold is applied to the extracted features to reduce redundant information and noise.The arc lines represent shortcuts for connections among ORSC modules.This shortcut is used to solve the gradient divergence problem with increasing network depth.In addition, it protects the information integrity.If the ORSC has different filters from the last ORSC, a Conv1D with stride 2 is added to match the dimensions at both ends, which are represented by arc-dotted lines.The features after the ORSC units with 128, 256, and 512 filters are downsampled by average pooling and then flattened to connect with Blocks A and B. Block A consists of two fully connected layers.Each layer has one unit that corresponded to the output lefts and right-knee angles.Block B is composed of a fully connected layer with seven units.Softmax activation is used to map the unit output to a value between 0 and 1, which is regarded as the probability of each motion state.Overall, with an EMG window, the model can continuously learn deep EMG features, exclude irrelevant information, automatically reduce redundant information, and map these features to knee angles and motion states.During the training process, the model outputs were compared with the ground truth after each batch to calculate the loss.Because there were multiple outputs, the performance was evaluated based on the sum of the weighted losses of angle estimation and state classification.The learning effects of these two tasks influenced the training process for updating and optimizing the model weights for the best learning performance.This model was constructed using Python 3.6.9,Keras 2.3.1, and TensorFlow 1.15.2, and trained on an NVIDIA DGX Station A100.

Performance Evaluation
Considering the difference between the left and right legs during locomotion, our model predicts the knee angle changes in both legs.The training loss of the angle estimation is defined by the mean squared error (MSE), as shown in Equation ( 2) and (3).θ represents the ground truth of angle, and θ represents the predicted angle of model.Moreover, the mean absolute error (MAE) and coefficient of determination (R 2 ) used for evaluation are defined in the following Equation ( 4)-( 7) where θ represents the average θ; subscript r represents the right knee, and l represents the left knee.
In addition, the model can classify motion states simultaneously.In total, seven states are recognized.The model was trained to minimize the sparse categorical cross-entropy loss (Equation ( 8)), in which the input label was not a one-hot style.The qðjÞ represents the ground truth and pðjÞ represents the predicted probability of class j.The class with the maximum probability was regarded as the classification result.Therefore, the model recognition performance was evaluated using sparse categorical accuracy (Equation ( 9)), which is the ratio of the correct classification judgment.N TP , N FP , N FN , and N TN represent the numbers of true positives, false positives, false negatives, and true negatives in our model prediction, respectively.In addition, we used the precision, recall, and F1-score to evaluate the classification performance.The definitions are shown in Equation ( 10)- (12).Lossðq, pÞ ¼ À X j qðjÞ log pðjÞ (8)

Approaches for Comparison
To further prove the advantages of our model, two other models, MyoNet and LIR-Net, [21,22] were selected for comparison.
The MyoNet was based on long-term recurrent convolution, and transfer learning was used for model training.Their work showed better performance than independent component analysis via entropy bound minimization (ICA-EBM) and the noise-assisted multivariate empirical mode decomposition (NA-MEMD) methods in terms of the recognition accuracy of sitting, standing, and walking. [23,24]MyoNet was selected because it exhibited better performance in both angle and state prediction compared to other lower limb multitask EMG studies.We recalculated MyoNet using ENABL3S for further comparison.The motion state has been increased, and the joint angle prediction block was doubled to compare the results of both legs.Additionally, another model, LIR-Net, based on the same dataset as ours, was used for comparison.Their work only classified five motion states using discrete EMG windows.Therefore, for comparison, we increased the LIR-Net output to classify seven states in the dynamic predictions.After short-time Fourier transform (STFT) and mel-spectrogram mapping, the processed signals were fed into a subsequent convolutional neural network.

Loss Weight Configuration
As our model target consisted of more than one task, the relative loss weight of each task was important for the model performance.We used two separate loss weights, one for the knee angle and the other for the motion state.Because the learning processes for the two angles were relatively consistent, the same weight was used for the knee angles of the left and right legs.
The weight ratio of state classification is defined as α.And Loss 1 , Loss 2 , and Loss 3 represent the losses of the left knee angle, right knee angle, and motion state recognition, respectively.The total loss is the sum of the weighted losses as defined in Equation ( 13)-( 16) as follows.
The magnitude of the loss of different tasks is likely to differ, and the direct sum of losses may cause multitask learning to be dominated or biased by a certain task.In addition, different tasks have different convergence speeds.Some tasks are relatively simple and fast, whereas others are difficult and slow.Therefore, setting α can significantly influence the training effect of the model.
According to our observations, when the ratio of α is 1, the magnitude of angle-prediction loss is significantly larger than that of the motion-classification loss.The former converges significantly faster than the latter.Based on these phenomena, we varied the weight loss ratio for these two tasks.Five ratios were tested and compared.The results are shown in Table 1.When the α increases from 0.1 to 100, small changes occur in the angle MSE, whereas the accuracy of the state classification continuously increases from 0.8837 AE 0.0349 to 0.9166 AE 0.0078.Although the accuracy performance of 1000 is also good, the MSE of both legs increases drastically.Consequently, a ratio of 100 is selected for our model.With this loss ratio, the average MSE performance of angle estimation reaches 42.28 AE 28.56 and 45.55 AE 31.05 for the left and right knee, respectively.The R l 2 and R r 2 values are 0.9540 AE 0.0292 and 0.9456 AE 0.0324, respectively.In the motion state classification, the loss reaches 0.59 AE 0.09 and accuracy is 0.9166 AE 0.0078.

Performance of Multi-Intent Prediction
With a loss ratio α of 100, we obtained the best model-testing results, including motion state recognition and angle prediction.The motion state classification during one repetition cycle is shown in Figure 5.The blue curve represents the change in the real motion state of subject 1, whereas the red curve represents the predicted state.The motion state is continuously recognized with dynamic lower limb locomotion.Generally, prediction can reveal the major states and detect state switches for different motions.Incorrect predictions typically occur at the intersections of different motions.This is because EMG signals tend to exhibit large changes when people suddenly change their movements, making it difficult for the model to predict these changes quickly and accurately.This relatively free and complicated motion style causes difficulties in motion state recognition.The angular performance is shown in Figure 5.The left and right angles are reversed during walking.The blue curve represents a continuous change in the true angle, whereas the red curve represents the predicted angle.In general, the prediction is continuous and fits the trend of the true angle at different stages.Similar to state estimation, some fluctuations usually occur at moments of motion transformation.Fluctuations also occur in the sitting state, which is relatively relaxed.In fact, the EMG signals are not stable or consistent in different sitting states because the degree of nerve relaxation is not consistent in short breaks during a series of continuous movements.This confuses the model when making more accurate predictions.In conclusion, in the dynamic movements of a subject, the simultaneous analyses of knee angle and motion state are effectively realized, which decode volitional movement and rhythmic locomotion for a more precise AIEC.The code for some of the prediction examples is provided in the GitHub repository (GitHub link: https://github.com/JiaqiXue98/Multi-Intent-Prediction-Based-on-EMG-.git).
The average confusion matrix of all test results is depicted in Figure 6.The labeled values represent the average accuracy of all the subjects.The recognition accuracies for S, LW, RA, RD, SA, SD, and St are 0.9228, 0.9267, 0.9354, 0.9627, 0.9321, 0.8944, and 0.8497, respectively.Except for SD and St, the accuracy for each class is greater than 0.9.This result indicates that the model can cover most lower limb motions with sufficient accuracy for EMG-driven control.The classification accuracy for St is relatively low because the model sometimes recognizes it as LW.This is because these two motions are performed in a standing state and do not involve vigorous exercise.The EMG signals are sometimes similar during St and LW, making it difficult for the model to distinguish between them in continuous real-time movements.In addition, we considered the performance of the motion state classification for the same joint angle.Two examples are shown in Figure S1, Supporting Information.In cases 1 (left knee angle of 130°) and 2 (right knee angle of 170°), different motion states are included and tested.The excellent performance in both cases (Table S1, Supporting Information) further demonstrates the robustness and accuracy of our model in dealing with rhythmic movement prediction with the same volitional intention.

Comparison with Different Models
To confirm model performance, we compared our model with two other models: MyoNet and LIR-Net. [21,22]For the MyoNet, the low pass filtering method "Empirical Iterative Algorithm" (EIA) was not included for angle result comparison.In addition, the angle-prediction block was doubled to ensure consistency with our model for exhaustive comparison.The signal windows were set as a 256 ms window with a 64 ms overlap according to their work.For the LIR-Net, because no specific overlapping length was stated in this study, the same window configuration as our model was utilized.The time-domain signals were processed via STFT and mel-spectrogram transformation to be fed into the CNN.The number of output units increased to 7. Evaluations of the different models are presented in Table 2.In the left knee angle prediction, our model obtains an average MAE and MSE of 3.25 and 42.28, respectively, which are both lower than those of MyoNet.Our model achieves a R 2 value of 0.9540, whereas the R 2 of MyoNet is 0.9183.The same situation is observed for the right knee angle.Consequently, our model outperforms the other models in terms of continuous angle prediction.For motion identification, the accuracy, precision, recall, and F1-score of our model are 0.9166, 0.9184, 0.9176, and 0.9170, respectively.It outperforms both MyoNet and LIR-Net.MyoNet obtains 0.8367, 0.8240, 0.8293, and 0.8179, whereas LIR-Net reaches 0.8904, 0.8900, 0.8961, and 0.8918 for accuracy, precision, recall, and F1-score, respectively.
The resulting distributions of the different models are shown in Figure 7.The MSE results are divided into two groups according to their distribution.This difference is mainly due to subject variation.Therefore, the two groups consist of different participants.Subjects 1, 2, 5, 8, 9, and 10 are in Group 1, whereas subjects 3, 4, 6, and 7 are in Group 2. In left knee angle estimation, our model and MyoNet of Group 1 (Figure 7a) obtain MSE and standard deviation of 20.73 AE 4.94 and 42.24 AE 10.22, respectively.Similar performance is acquired for right knee angle  and these two models reach 22.26 AE 6.79 and 40.94 AE 9.67 (Figure 7b), respectively.For Group 2, the mean MSE is relatively high.Our model and MyoNet obtain 74.59 AE 9.25 and 121.01 AE 9.59 for left knee angle recognition (Figure 7c), and 80.50 AE 10.12 and 121.54 AE 12.27 for right knee (Figure 7d), respectively.The results of the two groups or two legs show that the mean error of our model is significantly lower, and the distribution of results is more concentrated than that of MyoNet.Therefore, our model outperforms MyoNet in continuous and dynamic angle estimation.Owing to the different model structures, LIR-Net can participate in state-classification comparisons.In the motion state recognition, the distributions of our model and LIR-Net are similar, and their ranges are smaller than those of MyoNet.The mean classification value of our model is higher than those of the other two models.The accuracy results are 0.9166 AE 0.0078, 0.8367 AE 0.0302, and 0.8904 AE 0.0101 for our model, MyoNet, and LIR-Net (Figure 7e), respectively.Overall, based on both the angle-prediction and state-classification results, our model exhibits better performance in continuous and complex lower limb motion decoding, with more potential in a precise and fluent EMG-driven assistive system.

Verification of Multitask Effect
A typical advantage of this study is that the model simultaneously considers both volitional movement and rhythmic locomotion to provide an assistive system with sufficient information for the AIEC.To further study the effect of the multitask mechanism on the model design, we compared the performance of our multitask model with that of the single-task models.Correspondingly, the angle task model removed Block B, whereas the motion state task model removed Block A.
We summarized the comparison of the single-and multitask results for all subjects.The effects on the left and right legs were similar (Figure 8a,b).Although there were fluctuations from single-to multitask in different subjects, no major changes occurred in this angle prediction.The MSE value of some subjects decreased and that of others increased; however, no clear and largely changed trend was observed.For the classification accuracy (Figure 8c), there was a significant difference between the single-and multitask effects.The accuracy result of each subject increased significantly, with an average of 2.07%, with some increasing to approximately 4%.Consequently, the increase in tasks not only analyzed both rhythmic locomotion and volitional movement but also influenced the comprehensive effect that the performance of the volitional estimation was substantially enhanced.This phenomenon can be explained by the following reasons for multitask learning.First, the two tasks are correlated in this study.State transformations do not occur randomly at an angle, whereas some angles occur only in specific states.Therefore, learning one task benefits the model by learning another.Information from these two tasks can assist each other in learning.As squash and tennis skills build on each other, simultaneous learning of multiple learning tasks is also useful. [25,26]Second, multitask learning can improve the learning generalization.For the model learning, it tends to find different optimal features identified during the training process.There may also be features that are easy to extract during one task learning but difficult for another.Simultaneous learning provides opportunities for feature interaction.Third, in the analysis of such high-noise signals, multitask learning can offer a model with more convincing proof of irrelevant features. [27]inally, in our model, Blocks A and B share the parameters of the preceding feature extraction.This parameter-sharing style also reduces overfitting risk.To a certain extent, the weight loss setting also influences the effects of both tasks.

Discussion
In this study, we performed a multi-intent analysis of EMG-driven lower limb activities.A deep multitask learning model was designed to extract complex EMG features and simultaneously estimate both rhythmic and volitional movements for AIEC.Our scheme learns EMG features by superimposing 1D convolutional layers with a soft threshold structure to reduce noise.This approach can automatically learn the optimal features without a complicated handcrafted selection process.Early methods for EMG analysis have focused directly on signal-or-feature activation and control. [28,29]However, these methods are relatively unstable and are easily disturbed by noise.With the development of machine learning, intelligent classifiers and regressors have been developed for feature recognition.For example, the root mean square (RMS) for linear discriminant analysis (LDA) was extracted for application to lower limb three-motion classification. [30]Features including the mean absolute value (MAV), waveform length (WL), zero crossing (ZC), and slope sign change (SSC) were selected for dynamic Bayesian network classifiers for adaptive neural control. [31]However, feature selection is time-consuming, and it is difficult to find the optimal option for each person in every task.Therefore, in this study, we used deep learning to extract and identify the EMG features.Although the lower limb muscles usually overlap and are located deep under the skin, causing more difficulty than upper limb analysis, our model verified the usefulness of deep learning in extracting complicated EMG features.
In this study, we achieved continuous and smooth information processing.During major lower limb movements, such as walking and going upstairs, the EMG signal is not static. [32]herefore, lower limb prosthetic control requires a smooth EMG pattern recognition strategy that the continuous information is necessary to be offered.Regardless of the specific movement of the subject, the angle and motion states can be dynamically predicted using our model.Such a design can effectively aid the actual control of lower limb robots to realize realtime assistance.
Although rhythmic locomotion and volitional movement analyses are almost equally important in lower limb motion decoding, only few studies provide both types of motion information simultaneously in EMG-based lower limb analysis.In humanmachine interaction, the motion state intent can actuate the robot to assist in the corresponding motion, whereas specific value intent, such as angles, can further instruct the robot to reach the desired degree.A long-term recurrent convolution network, called "MyoNet," which uses transfer learning, was proposed for the classification of three motions and knee angle prediction. [21]n the model comparison part, we recalculated this model using ENABL3S, and the results proved that our model exhibited better performance in both learning tasks.Another deep learning method was designed for recognizing four gait phases and three joint angles. [33]This study focused on gait phases for which the classification accuracy reached 85.04%, and the MSE for angle prediction was 62.09.Our work obtained a better performance for both angle and state predictions.][35][36] These results are included in Table S2 and S3, Supporting Information.Our model accomplished dynamic intent prediction, classified more states than most previous studies with higher accuracy and F1-score, and realized precise angle estimation with better MSE and R 2 .In addition, we achieved both simultaneous motion state and angle prediction, which outperformed other methods; most studies could not achieve multiple tasks simultaneously.And we accomplished dynamic prediction that the continuous EMG input can be recognized, which is necessary in actual applications, but some works could not do it.
The shortcomings of our proposed approach mainly include two points.One is that we need to collect sufficient human data to provide enough effective information for the model training.The other is that the computation of the neural network especially using convolution structures has to cost sufficient computation resources.However, we believe that these two problems can be overcome in the near future because of the popularity of study in human data-based analysis and AI-based applications.
Overall, we proposed and realized a multi-intent analysis scheme for AIEC and verified the multitask effect in EMG-based studies.The control of volitional movement and rhythmic locomotion compensated for the shortcoming of each other, further revealed user intention, and could be applied for precise robotic control.In addition, we adjusted the weight loss of different tasks to balance the learning process.This step improved the overall performance and avoided the angle-task-dominated learning trend.Although the classification accuracy for the seven motions was not easy to enhance, our scheme successfully improved it to achieve an accuracy of over 0.9.The combined action of simultaneous multi-intent learning and weight loss adoption maintained good angle prediction performance and successfully improved the motion state classification accuracy.Learning the angle task led to a higher level of the motion state task.It is meaningful that lower limb EMG studies should not be limited to one task, as multitask methods can even enhance the performance of some tasks.

Conclusion
In this study, we constructed a novel deep neural network to realize multi-intent analysis, including simultaneous knee angle and motion state recognition.Based on our scheme, we analyzed the user intent, including rhythmic locomotion and volitional movements, for assistive robots for accurate AIEC.The proposed model utilizes a 1D residual shrinkage convolutional structure to extract the complex EMG features of the lower limb.A soft threshold was introduced to reduce noise during the process.The knee angles of both legs and motion states (S, LW, RA, RD, SA, SD, and St) were recognized during continuous lower limb movements.Through the adjustment of loss weight ratio, the classification accuracy increased to 91.66 AE 00.78%.The angle regression results exhibited R l 2 and R r 2 values of 0.9540 AE 0.0292 and 0.9456 AE 0.0324, respectively.In addition, we verified the multitask effect in the EMG analysis.The results indicated that the combination with the angle task significantly enhanced the performance of the motion state classification task.This effect has the potential for multitasking development in complex EMG-driven motion analysis.

Figure 1 .
Figure 1.EMG signal generated before motion can be utilized to reflect human intention for robot actuation and control.

Figure 2 .
Figure2.Proposed scheme using multitask approach for EMG-driven AIEC.Human intentions including rhythmic locomotion and volitional movement are predicted from EMG signals simultaneously to provide the control system with more specific information.

2. 2 . 1 .
Data Processing We divided ENABL3S, including the EMG signals, knee angles of the left/right leg, and motion states into training and testing sets.To simulate the robotic training scenes to as real as possible, the first 20 trials occupying approximately 80% of the total dataset were divided into training set, whereas the last five trials were regarded as testing set.The training set for each person included approximately 47 588 samples, whereas the testing set included approximately 10 822 samples.

Figure 3 .
Figure 3. Relationship between EMG signal, knee angle, and motion state.All signals are processed using sliding windows.

Figure 4 .
Figure 4. Structure of the proposed model.Conv1D is composed of a 1D convolutional layer followed by ReLU and batch normalization.ORSC represents 1D residual shrinkage convolutional structure.These modules are integrated in our multitask model to predict both rhythmic and volitional movement.

Figure 6 .
Figure 6.Confusion matrix of all subjects.Labeled values represent the average accuracy.

Figure 8 .
Figure 8.Comparison between single-and multitask performances for a) left knee angle estimation and b) right knee angle estimation.c) Comparison of motion state classification between single-and multitask performances.

Table 1 .
Comparison of loss weight ratio.

Table 2 .
Performance of different models in knee angle prediction and motion state classification.