Individualized Generation of Appropriate Assistance Timings for Active Lower Limb Robots via Machine Learning

Background: Obtaining appropriate assistance timings for individual users of active lower limb assistant robots (ALLARs) is one of the major challenges that limit the practical application of robots since very small assistance timing errors greatly affect the robot's assistance effect. However, neither theoretical nor experimental methods can currently generate appropriate assistance timings due to their respective availability or accuracy limitations. Method: In this paper, we proposed a new method to generate appropriate assistance timings for individual users of ALLARs via machine learning. The method has the accuracy of theoretical methods and the availability of experimental methods. We established a database of ten static physiological parameters, three dynamic parameters, and theoretical appropriate assistance timings, and mapped the static physiological parameters and the dynamic parameters to the theoretical assistance timings using multilayer neuron networks. Fold-cross validation and determination efficient were used to test the fit of the model. The root mean square error between generated values and true values of each subject was compared to that between the mean of the sample and the true values of each subject to evaluate the data accuracy of our method. We also set ±2% error as the boundary of the practical accuracy and compared the practical accuracy when using our method to that when using the mean generally. Result: The model achieved a small standard deviation of the square root error in the 10-fold cross-validation experiment and a large determination coefficient. We reduced the data error of starting and ending assistance timing from 0.0265 and 0.0172 to 0.014 ± 0.000429 and 0.0079 ± 0.000875, respectively, and improved the practical accuracy of starting and ending assistance timing from 54.93% and 75.49% to 89.54% and 99.95%, respectively. Conclusion: The proposed method can generate an appropriate assistance timings for different users of ALLARs walking at different speeds. Moreover, a new reference for ending assistance timings is provided and the database can be used as a reference for futer research. The practical effect of the method will be tested in future work.


Background
In the past two decades, lower limb assistant robots have been playing an important role in the military, outdoor sports, search and rescue, and rehabilitation due to their ability to enhance human strength and reduce exercise metabolism [1,2].
Lower limb assistant robots can be classified as active lower limb assistant robots (ALLARs) and passive lower limb assistant robots (PLLARs), according to the availability of an external power source [3]. ALLARs use external power to assist joint motion of human lower limbs directly, while PLLARs often use a mechanism to improve the human motion [4][5][6][7]. Compared with PLLARs, which are often designed for specific motion, ALLARs have a wide range of motion adaptability in principle. Therefore, most commercial lower limb assistant robots are ALLARs.
In recent years, a large number of ALLARs with different structures, control methods, and interaction concepts have been developed [1,2,8].
The lightweight design, human-machine joint coupling, and appropriate assistance force affecting the assistance effect of ALLARs have been further explored and solved. Two representative robots are exosuits developed by Harvard University and the autonomous robots developed by MIT [3,5,9,10]. However, the assistance timings of the robots were rough and general in these studies. They ignored the effect of the differences of subjects and speed on the appropriate assistance timing.
The assistance timing of ALLARs is a key factor affecting their assistance effect. Intuitively, an inappropriate assistance timing will invalidate the assistant effect of ALLARs and even cause an extra burden for users. Results of experiments showed that a small error in assistance timings will greatly reduce the assistant effect of ALLARs. The results of several studies showed that a 10%, 11%, and 6% difference in the starting assistance timing caused an approximate maximum 17%, 88%, and 50% metabolic difference, respectively [11][12][13].
Therefore, the assistance effect is extremely sensitive to the assistance timing.
However, achieving an appropriate assistance timings is still a great challenge, although some theoretical and experimental methods were proposed [11][12][13][14]. The "appropriate" means "accurate, individualized and available". In theory, it is generally believed that it is appropriate for a robot to assist a human when the work of the robot coincides with that of human joints [14].  [13]. They claimed that starting assistance at 90% of the gait and exerting a peak assisting force at 17% of the gait achieved a minimal metabolism. Philippe Malcolm measured the metabolic cost of ten subjects walking with a simple ankle exoskeleton in 2012 and found that the optimal starting time for ankle assistance was 43% of the gait cycle [11]. Samuel Galle did a more precise walking experiment with an ankle robot in 2017 and found that the optimal starting time for ankle assistance was 42% of the gait cycle [12]. However, there were still some limitations in these experiments. First, a small number of data samples were not enough to prove the validity of the conclusions. Second, all of these experiments were carried out at a constant speed, ignoring the important influence of speed on gait and assistance timings [15]. It is also difficult to explore appropriate assistance timings for different users walking at different speeds because the number of experiments will greatly increase in this situation.
Finally, the experimental method can only obtain a general result that is not an optimal result for every ALLAR user, because different users with different height, weight, gender, and age have different gait; therefore, they require different appropriate assistance timings responding to their individualized gait [16,17]. Owing to the sensitivity of assistance timings to the assistance effect, these inaccurate experimental methods are also not feasible.
In this paper, we proposed a new method to generate accurate and available assistance timings for ALLARs with the advantages of theoretical and experimental methods. We used the state of joint power to judge the appropriate assistance timings and expressed it with the corresponding node of the gait cycle. Then, a method of machine learning was used to map dynamic parameters and individualized physiological parameters to the assistance timings. This approach solved the assistance timing generation problems caused by individualized gait, variable speed, and the number of data samples. This idea was inspired by the recent generation of individualized gait in the field of hemiplegia rehabilitation [18,19]. Different from the field of hemiplegia, where a constant gait is required, in the practical application of an active robot for normal people, the speed and foot-ground interaction will change at any time; therefore, assistance timings should be adjusted dynamically. In this paper, in addition to using the individualized physiological parameters that affect the individualized gait, we also introduced three  The heel height was defined as the distance from the center of rotation of the ankle joint to the ground.
The foot length was defined as the length of the sole.
These lengths were measured by a tape, and the measurements were conducted by a specific operator for a stable measurement errors.

Data preprocessing
Raw data containing joint motion and power of lower limbs and ground reaction force was

Multilayer neural networks
Multilayer neural networks were used to map the physiological and dynamic parameters to assistance timings. Structurally, multilayer artificial neural networks are composed of many single neurons [23]. A single artificial neuron mimics the function of a nerve cell, which receives excitation from an adjacent neuron and transmits it to the next adjacent neuron if the total received excitation exceeds a certain threshold ( Fig. 3 (a)).
The single neuron can be expressed with the following formula: where i is the serial number of the neurons; is the output of the i neuron; is the weight of the ; is the threshold; and f is the activation function. The capability of a single artificial neuron is limited, but multilayer neural networks can fit any function in theory [24]. The structure and compositions of multilayer neural networks are shown in Fig. 3 (b). The parameters of the input layer are the static and dynamic parameters, and the parameters of the output layer are assistance timings. A multilayer neural network is trained to minimize the difference between the output value and the real value, which usually means the loss function is optimized as follows: where is the ℎ group in a data set; is the total group number in the training sample; ̂ is the ℎ group predicted assistance timings; is the true values corresponding to ̂ in the training sample; and E is the value of the loss function.

Validation process
Cross-validation is often used to evaluate the accuracy of a model [25]. According to the number of samples, we used ten-fold cross-validation. We where is the determination coefficient; is the ℎ group in a data set; is the root mean square error; is the total group number in testing sample; ̂ is the ℎ group predicted assistance timings; is the true value corresponding to ̂ in the testing sample; ̅ is the mean of the true vlue in the testing sample.

Evaluation process
The average assistance timings of the data samples were consistent with the results of experimental methods in theory. Therefore, we compared the accuracy when using the individualized predicted value with that of the average value to evaluate our work. The accuracy contained data accuracy and practical accuracy. We evaluated the data accuracy by comparing the standard deviation of the sample and the root error mean square error between the predicted assistance timings and the true assistance timings. The standard deviation was regarded as the root mean error between the mean assistance timings of sample and the true assistance timings of each subject. The practical accuracy was defined as the proportion of people who used the given assistance timings but still had an optimal reduced metabolic cost. we set ±2% assistance timing error as the boundary of practical accuracy, which meant the given assistance did not exceed 2% of the theoretical optimal assistance timing. The boundary setting was subjective but reasonable and strict because there is still no accurate experimental data to support this boundary directly, and we referred to the general results of some of studies where 6%

(b) (a)
errors of the optimal assistance timings caused a 21% increase in metabolism [12]. We compared the proportion of people who used the mean value that did not deviate from the true value by 2% with the proportion of people who used the predicted value that did not deviate from the true value by 2% to test the practical accuracy.

Result
The distributions of some of the main physiological parameters are shown in Fig. 4. A comparable number of males and females were recruited for the experiment. For both gender, age, height, and weight showed a normal distribution. The results were consistent with expectations for the method of inviting subjects. Table 1 shows the result of the ten-fold cross-validation. The RMSEs of the predicted starting and ending assistance timings were 0.014 ±0.000429 and 0.0079±0.000875, respectively ( Fig. 5 (a)). The DEs of the starting and ending assistance timings were 0.7024±0.019119 and 0.770 ± 0.057117, respectively. The standard deviations of the starting and ending assistance timings were 0.0265 and 0.0172, respectively ( Fig.   5 (a)). Compared to generally using average assistance timings as the assistance timing for each user, using our method can reduce the error of the starting and ending assistance timing by 46.8% and 54.1%, respectively.  accuracy. Fig. 6 shows the predicted assistance timings and corrrespoding true assistance timings.
Intuitively, the distance between the predicted value and the corresponding true value was smaller than that between the average value and the real value for most of the subjects. We set ±2% as an acceptable practical error. The statistical results showed that within the error range, the practical accuracies of our method were 89.54% and 99.95% while those of the method using the average starting and ending assistance timings were 54.93% and 75.49%, respectively ( Fig.5 (b)).

(a) (b)
We improved the practical accuracy to a degree that our method could generate theoretical optimal assistance timings for almost all the users.

Fig. 6
Predicted assistance timings and corrrespoding true assistance timings. Red points are the true assistance timings, and blue points are the predicted assistance timings. Black lines indicated the corresponding relationship between the predicted value and the true value.

Discussion
The main contribution of this paper is that for the first, the contradiction between the sensitivity of the assistance effect to assistance timings in practical application and the accuracy and availability of the existing methods is addressed, making the selected assistance timings can effectively adapt to different subjects walking at different speeds. We propose a machine learning methodology to generate appropriate assistance timings for the users. Compared to methods that used general assistance timings for ALLAR users, the presented method can generate more accurate and individualized assistance timings. The accuracy of the results meets the practical application requirements for most of the users.

Validation and evaluation
The determination coefficient is often used to verify the fit of the regression model. The determination coefficient refers to the proportion of variation of the dependent variable explained by the regression relationship in its total variation [26]. The larger the coefficient of determination, the better the fit of the model.

Regression algorithm
At present, there are many powerful regression methods such as multilayer neural networks regression [23], support vector regression [28], and Gaussian process regression [29]. We chose to use multilayer neural networks because of their excellent nonlinear mapping capability. It has been confirmed that neural networks with three layers can fit any continuous nonlinear function perfectly [24]. Since the complexity of the relationship between the assistance timings and the 13 parameters was unknown, the model with the strongest mapping capability was preferred.

Conclusion
In summary, this paper proposed a statistical

Future work
In this paper, we only analyzed the error between the assistance timings generated by our method and the real assistance timings, and the accuracy rate within the error boundary of practical application. The error boundary for practical accuracy was assumed based on the results of previous studies. Future work will be performed to experimentally apply the proposed method to active robots and test the assistance effect. The results obtained from using the experimental method will be compared with current results to verify the effectiveness of the proposed method in the experiment.

Acknowledgements
The authors would like to thank Biao Liu and Xiaoming Xian for inviting the subjects. The authors would like to thank all the subjects for their participation in this study.

Authors' contributions
GH conceived the study design, designed the experiment, analyzed the data, discussed the result, and drafted the manuscript. ZZ collected the gait data and trained the multilayer neural networks. BL and JN measured the static physiological parameters of males and females, respectively. LX and YL were involved in the study design. All authors read and approved the final manuscript.

Funding
This work was supported by the National Natural Science Foundation of China (Grant No. 51575188).

Practicability of data and material
The datasets analyzed during the current study are available from the corresponding author on reasonable request.

Ethics approval and consent to participate
Informed consent was obtained from all participants to complete the protocol approved by the Guangzhou First People's Hospital Department of Ethics Committee.