Data-Driven Design of a Six-Bar Lower-Limb Rehabilitation Mechanism Based on Gait Trajectory Prediction

For patients who need lower-limb kinetism rehabilitation training, this paper proposes an effective data-driven approach seeking the design of 1-degree-of-freedom (DOF) six-bar rehab mechanism through gait prediction by body parameters. First, gait trajectories from 79 healthy volunteers are collected along with their body parameters. Then, the normalized gait samples are clustered and regressed into a limited number of representative trajectories with K-means algorithm, and the cluster index is recorded as the label for each trajectory. Next, a genetic-algorithm-optimized support vector machine method is adopted to establish a classifier for the trajectories, obtaining the correspondence between body parameters and cluster labels of gait trajectories. As a result, once a group of body parameters are input into the classifier, the suitable gait trajectory can be predicted for the specific patient. A GA-BFGS algorithm is developed for 1-DOF six-bar mechanism synthesis and a GUI design software is presented that shows how the data-driven design process is realized. The novelty of this paper is using clustering and prediction technique to accomplish the patient-mechanism matching, so that simple, low-priced 1-DOF mechanisms could be adopted for large number of various patients without expensive customized design for each individual. In the end, a gait rehab device design example is provided, and a prototype device driven by a constant speed motor is presented, which illustrates the feasibility of the proposed method.


I. INTRODUCTION
I N RECENT years, rehabilitation devices such as robots are widely adopted to help patients with lower limb kinetism disorder to carry out their rehab training. Compared with the traditional manual rehabilitation training, it has advantages of good repeatability, high efficiency and high precision, and thus has become a research hotspot. At present, lower limb rehabilitation robots are mainly divided into exoskeleton type and end-driven type [1]. Examples of the former include Lokomat from Swiss Hocoma Company [2] and HAL from University of Tsukuba [3]. End-driven rehab robots usually adopt an end-effector to lead the limb through a given motion. Researchers have investigated the efficacy of end-driven gait rehab robots [4], [5], [6], [7], in which Maranesi [7] found that the end-driven devices showed a significant improvement in independent walking ability in the trial of subacute stroke patients.
When designing the mechanism for end-driven rehab devices, multi-DOF and one-DOF structures are both feasible. The multi-DOF rehabilitation robots can generate different gait trajectories by programming, but their complex structures and larger number of actuators increase the difficulty of control and hereby their cost are relatively high, leading to the fact that most of the current rehabilitation patients still face the lack of training, especially in under-developed countries and places. Thus, many designers look into the rehabilitation devices based on simpler structures such as 1-DOF mechanisms. A four-bar linkage mechanism is proposed by Alves [8], and McCarthy [9] proposed a ten-bar linkage for gait training. Li et al. [10] also proposed a one-DOF six-bar mechanism to realize gait trajectories that constant speed motor is sufficient to control the mechanism. Due to the error in trajectory realizing with linkage mechanisms, researchers also seek the design with higher-pair mechanisms. Goncalves [11] proposed cam linkage mechanism for rehab devices. Shao et al. [12] designed a lower limb rehabilitation robot that required only constant-speed motors based on cam-linkages mechanism. Our group has also proposed kinematic-mapping-based approach to designed 1-DOF rehab mechanisms such as four-bar linkages for upper-limb rehab [13] and cam-linkages for lower-limb rehab [14]. However, a 1-DOF mechanism can only generate a unique trajectory, it might not suit well with different This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ patients who have various body parameters. Yet considering the design workload and cost, it is also impracticable to customize a rehabilitation mechanism for each individual, thus most current 1-DOF rehab devices just adopt a specific gait from a healthy subject, or some standard shapes such as circles or elliptic trajectories. Researchers have also investigated motion planning of lower-limb to achieve better rehab performance. Luu et al. [15] proposed an individual-specific gait pattern prediction model based on generalized regression neural networks. Zhou et al. [16] proposed a method for individualized gait generation based on recurrent neural Networks. Semwal et al. [17], [18] presented an approach of modelling joint trajectories of biped locomotion using hybrid automata. These artificial-intelligence-based methods prove to be effective in the rehab training on multi-DOF devices. Therefore it is also inspiring to adopt similar methods to provide a suitable motion trajectory in 1-DOF rehab device design.
Considering the body-parameter data of patients, this paper mainly seeks a data-driven design approach for economical 1-DOF rehab mechanism without neglecting of the suitability of training trajectories to different patients. Clustering and prediction techniques are employed to accomplish the patientmechanism matching. First a number of normal gaits are acquired from healthy subjects with various body parameters. These raw data are then normalized for the subsequent clustering, while the shape and velocity information of the gait trajectories are retained. A limited number of predicted trajectories (i.e. motion patterns) are established based on K-means clustering [19] and regression, and a classifier is constructed to obtain the correspondence between the gait clusters and body parameters by GA-optimized SVM [20], which proved to have a better accuracy compared with ELM and KNN. To design lower limb rehab mechanisms accordingly, in this paper we adopt 1-DOF six-bar linkages with constant-speed input as the motion executor. Setting the predicted trajectory as the task, GA-BFGS hybrid optimization algorithm is used to obtain the parameters of the six-bar mechanism, which combines the advantages of Genetic algorithm(GA)'s global searching [21] as well as BFGS (a kind of Quasi-Newton method)'s local searching [22]. A Data-driven Design GUI software interface is presented. As long as patients' body parameters are input into the trained classifier, the corresponding training trajectory and mechanism recommendation could be obtained. An example is provided to illustrate the application of the method in the design of 1-DOF lower limb rehabilitation mechanism, which can realize the patient-mechanism matching according to body parameters. The highlight of this paper is that with this data-driven design approach, to suit a large number of various patients, only a limited number of 1-DOF rehab mechanisms need to be designed instead of customizing one specific mechanism for each individual. Thus the proposed approach could reduce the design workload as well as the complexity and cost of rehab devices.
The organization of the paper is as follows: Section 2 presents the acquisition of gait trajectories from various subjects and how these trajectories are normalized to the same length while retaining the shape, velocity and sequencing information. In Section 3, clustering and prediction of gait trajectories are shown. Section 4 introduces GA-BFGS algorithm for mechanism synsthesis and shows how the data-driven design process is realized, and a GUI design software interface is presented. In the end, Section 5 provides an example to illustrate the application of the method in design of 1-DOF lower limb rehabilitation mechanism.

II. ACQUISITION AND NORMALIZATION
OF GAIT TRAJECTORY DATA To acquire different gait trajectories from healthy subjects with various body shape parameters, we recruit 79 volunteers and recorded their normal walking gaits with Kinect. Their associated information (gender, age, height, weight, thigh length, shank length, foot length, waistline and other body parameters) are also collected (approved by IRB board of Hefei University of Technology on Jan 10, 2021, with Protocol No. HFUT20210110001). Kinect is used as the motion capture device to record the position coordinates of the subject's left hip, left knee and left ankle in real time [23]. Noted that walking is actually a 3-dimensional motion in the sagittal plane, coronal plane and horizontal plane, but compared with the sagittal plane, the range of motion very small in other two planes which could be ignored [24]. Considering that, the three-dimensional trajectories of lower limb joints are projected onto the sagittal plane and only sagittal motion is taken here as task motion.
Also, since there usually exist some error in the joint position data of Kinect, it need to be corrected according to the constrains of the limb length, i.e., the distance between hip and knee is always equal to the thigh length and the distance between knee and ankle is always equal to the shank length. First, the hip angles and knee angles of each volunteer are inversely calculated according to the positions of lower limb joints to get joint angle sequences and they are smoothed by Gaussian filter. Finally, the corrected ankle joint trajectories could be calculated by the joint angles(θ thigh , θ shank ), thigh lengths l thigh , shank lengths l shank and kinematic model of human lower limb: x a = l thigh sin(θ thigh ) + l shank sin(θ shank ) y a = l thigh cos(θ thigh ) + l shank cos(θ shank ) where (x a , y a ) denotes the Cartisian coordinates of ankle joint in the saggital plane. Now the hip joint is considered as fixed in the origin, i.e., the rehabilitation training scene of this study is in a fixed place. In the end, a complete gait cycle iscaptured from the trajectory data of each volunteer to obtain the pretreated two-dimensional trajectory data. Figure 1 shows a sample volunteer's stick diagram of lower limb in a gait cycle on the sagittal plane. Due to the page limitation, the detailed information about data acquisition, projection, inverse kinematics and smoothing by Gaussian filter could be found in the supplement materials. Once the hip is fixed, the ankle trajectory in a gait cycle is a closed clockwise curve as in Fig. 1. As long as the ankle moves along this gait trajectory, leg will swing coordinately with the regulation of walk. So, ankle trajectories are taken as the task motion. During the motion capture process, the  length (number of points) of each trajectory is different due to the walking speed of each volunteer. Thus the trajectories need to be normalized such that they are trimed or expanded to the same length on the premise that their shape and velocity information are preserved. More importantly, the timing, order and sequencing of all the trajectories should be the same, i.e., the points with the same index should be at the same process percentage of each gait cycle. The purpose of normalization is to prepare the data for the construction of sample vectors of clustering and the upcoming motion prediction.
To describe the shape of each trajectory, the following definitions are given as in As shown in Fig. 2, the lower and upper parts of each trajectory are interpolated by piecewise cubic Hermite interpolation with respect to x-y to obtain the following formulas which can describe the shape of trajectory: To describe and retain the velocity and sequencing information of the trajectories, the timing of each points need to be investigated. The lower part of trajectory corresponds to the support phase of a gait cycle, during which the ankle moves backward with respect to the hip. The upper part of trajectory corresponds to the swing phase of a gait cycle,  during which the ankle moves forward. Relevant literature shows that the duration ratio of support phase to swing phase is about 3:2 [18], to which the collected data from our 79 subjects also mostly conformed. So we specify that the lower and upper part of each normalized trajectory contain 22 and 15 points respectively (including 2 shared boundary points so that the number of intervals are 21:14). Also, the time intervals between any two adjacent points of current trajectories are all set to equal (1/30s). Since the span of each trajectory along x-axis is much larger than that along y-axis, each trajectory's velocity information can be extracted according to the following method: Let t be the frame count of trajectory point, where t s (t s = 0), t t and t e be the frame counts of starting point, turning point and end point respectively. As shown in Fig. 3, the lower and upper parts of each trajectory are interpolated by cubic splines with respect to x − t to obtain the following expressions: Note that the velocity of trajectory in direction x at the SP, TP and EP equals 0, so the interpolation boundary conditions of lower and upper parts can be expressed as: Then, the intervals t of lower and upper parts are uniformly divided into 21 and 14 parts respectively and we put them into Eq. (3) to obtain a series of re-sampled x values as in Fig. 3.  Fig. 4, whose time intervals between any two adjacent points are equal. Thus we have obtained the normalized trajectories that have the same length and timing, while retaining their original shape, velocity and sequencing information. All the normalized trajectories are shown in Fig. 5, and the locations of them are also normalized, i.e., we translate all trajectories to let their centroids coincide so that the effect of mechanism location is eliminated.

III. PREDICTION OF GAIT TRAJECTORY BASED ON MACHINE LEARNING
Since rehab patients are usually not capable of providing a normal gait as the training reference, many current rehab devices just adopt objective training trajectories from a "medium" healthy subject, or use some standard shapes such as circles or elliptic trajectories. For 1-DOF rehab devices, they are designed to generate a specific motion pattern, it might not suit well with different patients who have various body parameters. Yet it is also impracticable to customize a rehab mechanism for each individual. To realize a more effective training, it is necessary to predict/recommend a suitable motion trajectory for rehab patients. In this paper we seek to use machine learning to realize this task.
To solve the problems above, the 79 gait trajectories from various subjects are first clustered and regressed into a limited number, and then a classification model is established to reflect the correspondence between gait trajectories and body parameters. Single-DOF rehabilitation mechanisms could hereby be designed according to the classification model. The framework of this data-driven design approach is as follows: first the 79 normalized gait trajectories sampled from healthy subjects are clustered into a limited number of groups, and each cluster contains similar trajectories. Then a representative trajectory regarded as the training trajectory is regressed from each cluster respectively. Now each training trajectory has a corresponding cluster index as the label, next, we establish a classifier between body parameters of healthy people and cluster labels of corresponding gait trajectories. As long as patients' body parameters are input into the classifier, the corresponding training trajectories can be predicted. Obviously, if we respectively design 1-DOF rehab mechanisms aiming at each training trajectory, the patient-mechanism matching according to body parameters can be realized. As a result, we could identify the corresponding 1-DOF rehab device for a patient through the prediction of gaits by his/her body parameters. This process is shown as in Fig. 6.

A. Clustering and Regression of Trajectories
Each closed normalized trajectory contains 35 nonredundant points, and the coordinates of trajectory points are used to compose the sample vectors for clustering: where (x i , y i )(i = 1, 2, .., 35) is the coordinates of the i -th trajectory point which is indexed according to its own frame sequence from the starting point. The sample vector basically contains the complete feature information of the trajectory itself. K-means algorithm is used to implement the clustering. Its idea is that the sample set is divided into several clusters according to the distances between samples so that the samples in the same cluster are as close as possible and the distances between clusters are as large as possible. Suppose that the sample set composed of sample vectors x is divided into k clusters, and the number of samples of each cluster C i (i = 1, 2, . . . k) is |Ci |, the goal of K-means is to minimize the following objective function: where μ i = 1 |C i | x∈C i x is the mean vector of cluster C i . To determine the appropriate cluster number k, we let k be 1, 2, 3, 4, 5 and 6 in turn and run K-means algorithm and calculate the objective function J based on Eq. (7). Since the initial mean vectors could affect the result of K-means, for each k we run the program for 10ˆ3 times and take the result with minimum value of J to prevent the iteration from falling into local optimum.
The running result of the program is shown in Fig. 7. When k is 2, the decrease of J value reaches an elbow joint, which indicates that the clustering effect is considered as good on condition that k ≥ 2. Thus we take k as 3 to reduce the workload of mechanism design. The 3 final mean vectors of 3 clusters are hereby taken as the regressed training trajectories as in Fig. 8. Figure 8 indicates the clustering result, it could be found that they are basically clustered based on the shape and their spans in direction x of trajectories. Moreover, the regressed trajectories of the three clusters are closed and contains velocity information, which could be taken as the target trajectory of 1-DOF mechanism design. Similarity matrix could evaluate the effect of clustering. Its computation is as follows: First, all the sample vectors are reordered according to their corresponding cluster labels to let the trajectories belonging to the same cluster be arranged together. Then the Euclidean distance between every 2 sample vectors is calculated to obtain the similarity matrix S: where m is the number of sample vectors. Figure 9 shows the visualization of the similarity matrix, it could be seen that the color of trajectories in the same cluster near the main diagonal tends to blue, which indicates that the trajectories in the same cluster have higher similarity while the color of other regions tends to yellow, which indicates that the trajectories in different clusters have lower similarity.  After clustering and regression, it actually means taking each regressed trajectory as the training trajectory for a certain group of patients with similar gaits and hereby they will share the same rehab mechanism. This not only considers the gait differences of patients to achieve the matching between patients and mechanisms and improve training quality, but also greatly reduces the workload and price of mechanism design and machine building.

B. Classification and Prediction of Gait Trajectories Based on Body Parameters
Now, a rehab patient needs to find his/her best suit of training motion and mechanism. Since the rehab patients usually cannot provide a normal motion, our task is to predict for them so that they could match a suitable one. In this paper, SVM is used to establish a classifier between body parameters and cluster labels of corresponding trajectories as in Fig. 8.
The SVM is a model for binary classification while the trajectory prediction problem of this paper is a three classification problem. Thus a SVM between every 2 classes of samples could be trained and we need to train 3 SVMs in total. Then the same sample with unknown label could be input to each SVM respectively and the label with the most votes is taken as its final label.
Before training SVMs, the sample set is mapped into the [0, 1] interval for normalization and is randomly divided into training set and test set by 7:3. The parameters C and σ are important to SVM which could affect the accuracy of classification, so it is necessary to determine the optimal value for them. In this paper, Genetic algorithm (GA)is used to search the optimal parameters C opt and σ opt and the average accuracy of 5-fold cross validation of training set is taken as the fitness value of GA. The process of SVM optimized by GA is shown in Fig. 10.
It needs to be pointed out that not all the features of body parameters have direct or significant influence to a person's gait. Some may not directly affect the gait and some may not have influence at all. Thus we construct several new features based on original ones, and One-way ANOVA method (F-test) is performed on all features to select appropriate ones for classification. The p-values of F-test are listed in Table.I. The smaller the p-value of feature, the more corelated the feature is to the gait. Note that gender is usually a discrete feature with only two values(0 or 1), so it is not suitable for F-test, but it is obviously a significant factor so we always include gender as a valid feature.
In this paper, considering the classification accuracy of F-test result, the features we select for GA-SVM gait classification are thigh length, shank length, (thigh length + shank length) / height and gender. Based on these sample vectors and their corresponding trajectory labels, we train the classifier according to the process in Fig.10. The classification results of training set and test set are listed in Table. II and Table. III respectively. To evaluate the performance of the classifier constructed by GA-SVM, we also adopt two other classical machine learning algorithms,  [25], and compared their accuracy with our GA-SVM on test sets as shown in Table.IV. It could be found that the accuracy of GA-SVM (82.6%) is higher than the other two (78.3% and 73.9%).
According to Table II, it could be found that on the training set, the accuracy is 82.1% (46/56). Also from Table III on the test set, 3 samples from class 1 and 1 sample from class 2 are incorrectly classified, the accuracy is 82.6% (19/23). This result shows that adopting the predicted gait obtained by body parameters is more than 82% likely to match the volunteer's own normal gait. So, using our algorithm to predict the gait trajectories for patients according to body parameters is feasible, especially in class 1 and class 2, which contain relatively larger quantity of samples.

IV. DATA-DRIVEN REHAB MECHANISM DESIGN BASED ON PREDICTED GAIT TRAJECTORIES
In the above sections we have established three types of lower-limb rehab training motion trajectories for patients with various body parameters. To actually conduct the rehab training, we need to find a proper mechanism to serve as the motion executer for each type of the trajectory. This task is  generally known as path synthesis [26], [27]. Considering the coordinates and the timing of the three trajectories in Fig.8, 1-DOF Watt-I six-bar linkages are adopted as the motion executor to lead through the task trajectories. The diagram of the Watt-I six-bar linkage is shown in Fig. 11.
A. Kinematic Analysis of the 1-DOF Watt-I Six-Bar Linkage where 1 it is easy to derive the coordinates (A x , A y )  and (B x , B y ) of A and B, respectively. Now we look into the two ternary links and obtain: Next we investigate the four-bar linkage B DEC, and the angle θ 5 between output link DE and the x-axis of x By could be derived similarly as Eq. (9): where r 2 = x 2 10 + x 2 11 − 2x 10 x 11 cosθ 4 ϕ 2 = arcsin x 10 sinθ 4 r 2 and finally, the coordinates of endpoint F in fixed frame xoy could be derived by: where and (F x , F y ) denote the coordinates of F in x By : F x = x 10 cosθ 4 +x 9 cos(θ 5 + η) F y = −x 10 sinθ 4 −x 9 sin(θ 5 + η)

B. Objective Function and Constraints
In this paper, we adopt 1-DOF six-bar linkages with constant-speed input as the motion executor, so that only a low-price regular motor is needed to actuate the device. Now that the kinematic representation for the coordinates of the end effector (F x , F y ) with the linkage parameters x = (x 1 x 9 , O x , O y , θ 0 , α 1 , β 1 , η) and initial input parameter (the initial angle θ 1 of the crank driven by the input motor) is established in previous subsection, we assume that n is the number of trajectory points, and the (x T j , y T j ) is the corresponding point on the task trajectory when input angle is θ 1 j , where j = 1, 2, . . . , n. In order to minimize the average error between the positions (F x , F y ) of end effector and the target points, the objective function is constructed as follows: where the kinematic constraints(e.g., boundary conditions, grashof conditions, assembly conditions, etc.) also need to be considered during the optimization of the linkage parameters. These kinematic constraints includes: a) The link length should be greater than 0: b) The Grashof Condi ti on of the input link such that it can rotate a complete circle and could be driven by a regular rotatery motor: c) The constraint on transmission angle (|γ min | ≤ 40) to assure a good dynamic performance: d) Assembly condition for the end-effector:

C. Optimization Algorithm and GUI Design
With the objective function and constraints, the next task is mechanism synthesis, i.e., to seek a group of x that minimize f (x) while satisfying the kinematic constraints. A GA-BFGS algorithm is developed in this section to find the value for x to generate recommended 1-DOF six-bar linkages for each type of motion trajectory.
Genetic algorithm (GA) has strong ability of global search while BFGS (a kind of Quasi-Newton method) is good at local search. Combining their respective advantages, the GA-BFGS hybrid algorithm to minimize objective function is proposed. First, GA is conducted to search globally, where the hyper-parameters are set as follows: Population size is 500, Number of Generation is 200, Crossover ratio is 0.8 and Mutation mode is adaptive feasible. Then, setting the satisfied solution vector from GA to be the initial value, we continue to search locally with BFGS meticulously to find a better result. GA-BFGS overcomes the defects of low search efficiency in the later stage of the GA algorithm and the sensitivity of the BFGS algorithm to the initial value, and thus has a high global convergence ability. The algorithm is illustrated as in Figure.12. It also need to be pointed out that since the input parameter and the timing of target trajectory points are also considered in the objective function, the result obtained with our approach is a mechanism driven by a constant-speed motor, which would further simplify the design and control complexity of the rehab devices, and greatly reduce the cost.
To integrate our data-driven design approach for the gait rehab training, we have developed a graphic user interface (GUI) as shown in Fig.13. The GUI is composed by three modules: 1) Body Parameter Input: users could input the parameters of their essential body features (TL, SL, (TL+SL)/Height, Gender) that corresponds to gait as introduced in Section 4, then click "Submit" button.
2) Gait Prediction: the gait category that predicted based on the submitted body parameters will display here. Users could click "Show Trajectory" to get a visual figure of that result, and its coordinates and timing data could also be exported. Fig. 12. The GA-BFGS algorithm adopted to generate recommended mechanism for the three trajectories in Fig.8. 3) Mechanism Recommendation: according to the gait trajectory that predicted by the input body parameters, the GUI would display the mechanism synthesis results of GA-BFGS algorithm. Users could choose a suitable one and start training process.
Therefore, once the body parameters are input into the GUI, we can predict the most suited training motion for various rehab patients and find the mechanism for them. The patient-device matching is hereby realized.

V. EXAMPLE
An example is presented to illustrate how the trajectory prediction method is applied in the design of 1-DOF lower limb rehabilitation mechanism to realize Patient-Mechanism Matching according to body parameters. To find a mechanism that best suits the female trainee's body shape, first her thigh length, shank length and height are obtained (47.5cm, 41.6cm and 171cm respectively). We then construct the sample vector i e = [47.5, 41.6, 0.52, 0] and input it to Gait Rehab Designer user interface, the output label is Type II. So, the training trajectory of this subject is selected to be type II. The kinematic parameters of the 1-DOF six-bar linkage are exported and listed in Table. V. Since the classifier is already trained, the mechanism recommendation could be obtained beforehand and saved for each type of task trajectories, therefore the running for results is almost instantly completed (in our example it is less than 0.1s). The comparison between mechanism trajectory and target trajectory is also shown in Fig. 14.
When the two ankles of the trainee are fixed at the end of this mechanisms with 180 • phase difference on both sides, only one drive with a constant speed motor is needed so    15. The prototype of the type II rehab mechanism and how it is applied in the rehab training. A short video of the training motion with this mechanism could be found in https://youtu.be/OqVSvimRecM. as to let the legs swing coordinately, which can realize lower limb rehabilitation training. Fig. 15 shows the prototype of this Type II rehab mechanism and how it is applied in the rehab training for the above-mentioned subject. The mechanism is mainly composed of the motion executor, the gravity support system and the frame. Since there is no extra constraint imposed on the trainee's knee joint, its motion could be corrected by the therapist as needed for better rehab training results [28], [29]. A short video of the training motion with this mechanism could be found in https://youtu.be/OqVSvimRecM. This mechanism is suitable for all patients whose body parameters are predicted as label 2 by the classifier. Thus the method not only considers the suitability of training trajectories but also greatly reduces the workload of mechanism design and complexity of rehabilitation mechanisms.

VI. CONCLUSION & DISCUSSION
The conclusion and novelty of this article is as follows: (1) A method of training trajectory prediction based on machine learning for lower limb rehab patients is proposed. By clustering and classification of normal gait data, 3 motion patterns are obtained and the prediction based on the correspondence between the body shape parameters and the motion pattern index can be achieved. The result shows that the accuracy of trajectory prediction according to body parameters reaches 82% both on training set and on test set which verifies the effectiveness of the method, i.e., adopting the predicted gait obtained by body parameters is 82% likely to match the volunteer's own normal gait.
(2)The application of the trajectory prediction method in data-driven design of 1-DOF lower limb rehabilitation mechanism is proposed. GA-BFGS algorithm is developed to find the optimal 1-DOF Watt I six-bar linkage that could trace the predicted gait trajectories with constant-speed-actuator. A GUI software is presented: Once the essential body parameters are input into the software, and taking predicted trajectory as target trajectory for dimensional synthesis of mechanism, the patient-mechanism matching can be realized.
The rehab-mechanism design approach proposed in this paper used clustering and prediction technique to accomplish the patient-mechanism matching. Only a limited number of representative task gait trajectories are needed to cover large amounts of patients with different body parameters, since patients with similar gaits could share the same training trajectory. The advantage of this approach is that the variety of users are taken into account during the patient-mechanism matching without expensive customized design for each individual. Based on this approach, only a limited number of simple, low-priced1-DOF rehabilitation devices need to be adopted for the majority of rehab patients with various body parameters.
This data-driven design approach for rehab device not only considers the suitability of training trajectories but also greatly reduces the workload of mechanism design as well as the cost and complexity of rehabilitation devices. In this way, it has the potential to be considered as a practical choice for rehab centers with low-budgets, especially in under-developed courtiers and areas. The future work of this approach includes the structural and functional optimization of lower limb rehabilitation devices, the realization of ankle movement during rehab training, and the expansion of clustering and classification data sets to better adapt larger population of users.

ACKNOWLEDGMENT
All findings and results presented in this paper are by those of the authors and do not represent the funding agencies.