Training Path Optimization Method of a Moveable Multifunction Rehabilitation Robot

Passive path tracking training is usually used for robot assisted lower limb rehabilitation. The movement of robot will cause the fluctuation of joint force. This letter presents an optimal training path planning algorithm to reduce the patient's joint force caused by a moveable multifunction rehabilitation robot during passive pedaling training. The dynamics model of the human-robot system is established, and the joint forces of the patient are analysed. The planning process is divided into a series of motion steps based on the original training path, at which the optimal algorithm is applied to search the best path. Then, the optimal path is fitted by Bezier curve to get a closed training trajectory. Finally, a Bionic Experiment Platform (BEP) and Human-robot Interaction Platform (HIP) are established to verify the effectiveness of the optimal algorithm. The (BEP) experimental results show that the knee joint force drops by an average of 12.71%, and the maximum drops by 15.41%.The HIP experiment results show that the interaction force drops by an average of 8.5%.


I. INTRODUCTION
S TROKE will affect patients' physical, emotional, and mental health, as well as their life safety, and the incidence is increasing because the population ages [1]. The mortality rate of stroke has been decreasing significantly with the advancement of medical knowledge, and the survival rate is steadily increasing, but patients who survive usually have functional impairment [2]. These functional impairment can be restored by regular and intensive repetitive rehabilitation training [2], [3]. Hence, lots of meaningful methods have been developed to improve the lower limb function by imitating some rehabilitation movements with the help of doctors [4]. However, the rehabilitation training executed by physiotherapists is repetitive, labor-intensive and usually costly [5], [6]. Rehabilitation robots that can free doctors from repetitive and heavy works are getting a boost in recent years, and lots of different types of robots have been developed, such as exoskeleton robots [7], [8], [9], stand/walking robots [10], [11], [12] and sitting/lying rehabilitation robots [13], [14]. This study just discusses the sitting/lying rehabilitation robots, and a novel sitting/lying-type Lower Limb Rehabilitation Robot (LLRR) named Multifunctional Moveable Rehabilitation Robot (MMRR) [15], [16] is presented. The MMRR is designed for home-based rehabilitation. Differs to the traditional sitting/lying-type LLRR, the MMRR combines the functions of lower limb rehabilitation, sit-to-stand transfer training and sitting/lying with a wheelchair, which can be served as a walker for daily use, besides lower limb rehabilitation. Different from other sitting to standing devices [17], [18], [19], the sit-to-stand transfer function is realized by three drivers, which can closely mimic the normal sit-to-stand movement of the trunk, shanks and thighs and can realize the three main phases of sit-to-stand movement [20]. In addition, the linear actuators are used to construct the lower limb rehabilitation mechanism that works like an end-effector robot, but can simulate the leg movements, such as hip flexion/extension, knee flexion/ extension and a more flexible pedal training. Furthermore, when training on the lower limb rehabilitation mechanism, the patients' joints do not need to match with the robot, which make the lower limb rehabilitation training easier than the other sitting/lying-type LLRR.
During the rehabilitation training, the human-robot interaction force, especially joint force, plays an important role in training. Musculoskeletal model [21] and joint torque sensors are commonly used to estimate the joint torques in cognitive humanrobot interface system [22], [23], [24] and physical human-robot interfaces system [25], respectively. These researches paid more attention to the acquisition of joint force to improve the humanrobot interaction adaptability in active power-assistance system. However, in passive rehabilitation training, the joint force caused by robot on the knee joint that is the most complicated and vulnerable component of the lower limbs [26], [27] should also be concerned, especially when the patients are in flaccid stage. For the MMRR, no exoskeleton is worn by the patient, and the rehabilitation movement will produce an extra force on the patients' joints in passive training mode. This extra force can be reduced by trajectory planning method. So far, most of trajectory planning methods in passive training are focus on the normal gait data, which are used as the reference database for trajectory planning, such as the method based on patients' physical characteristics [28] or physiological gait pattern [29], predicting the next step by using deep learning method [30] the complementary limb motion estimation method [31]. These method focus on how to mimic the normal gait of the lower limb, except the joint force generated by robot.
This paper focuses on the knee joint force caused by MMRR in flaccid stage rehabilitation training, and try to develop an optimal path planning method that can reduce load and joint force fluctuation on the knee joint. The dynamics model of the human-robot system is established. The force characteristics of the patient's joints during rehabilitation training are analyzed. Furthermore, an optimal algorithm is developed to reduce the joint force of patients. Finally, a Bionic Experiment Platform (BEP) is established to validate the effectiveness of this optimal algorithm, and human-robot interaction experiments are implemented to verify the performance of the optimal algorithm.

II. THE DYNAMICS MODEL
The prototype of the MMRR is shown in Fig. 1(a), which consists of backrest, cushion, leg module, movable platform and linear driving units. The movable platform plays the role of a wheeled chair and supporting platform which makes the MMRR can be used as a walker. As shown in Fig. 1(b), the backrest and leg module are connected with cushion by hinges. As a whole, they are supported by sliders and linear actuator 2 and realize all the rehabilitation functions of the MMRR. The cushion is installed on the movable platform by two orthogonal sliders used to restrict the motion of the cushion. The MMRR presented in this paper can realize moving and lower limb rehabilitation in addition to sitting/standing and sitting/lying, and all these functions share the same drivers. Furthermore, the sitting/standing function allows the lower limb to realize a "normal-like" movement. Lower limb rehabilitation is realized by leg training devices that provide assistive forces only at the patient's feet and carry the patient's lower limb to move in a plane.
This paper mainly focuses on the lower limb rehabilitation function of the robot. As shown in Fig. 1, this rehabilitation function is mainly realized by the leg module in sitting state. In this state, the lower limb rehabilitation device that is composed of the leg module, screw, and linear actuator 1 can be simplified as a two degrees of freedom planar mechanism. The foot pedal will carry the patient's feet to accomplish the rehabilitation training in the plane that is parallel to the sagittal plane. During the rehabilitation training, the axes of patient's joints need not to match with the rotation centers of the rehabilitation device  which make it easier for the patients to use. However, as no exoskeleton is worn by the patient, the rehabilitation movement will produce an extra force on the patients' joints. The dynamics model of the human-robot system is established to study the force characteristics of the patient's joint.
When conducting lower limb rehabilitating training in sitting state, the patient's lower limb moves in a plane. The generalized coordinate describing the movement of the lower limb of the patient is different from the lower limb rehabilitation device. The simplified model of the human-robot system is shown in Fig. 2, in which the cushion module is simplified as AOF, and the linear actuator 1 is simplified as prismatic joint FB. The leg module is simplified as link ADC, and the pedal is simplified as slider C that is driven by the screw. The lower limbs of the patient are simplified as non-uniform links: the thigh is simplified as IH, and the crus is simplified as HG. The foot is connected with the slider by hinge G, G and C are considered to be coincident with each other for simplification. During the lower limb rehabilitation training, the relative position of the hip and cushion module remains unchanged, and the connection between them is simplified as hinge I.
The kinematic chain of this rehabilitation training system is described in three motion spaces shown in Fig. 3: actuating space (AS), joint space (JS), and training space (TS). The AS consists of the motion of the actuator. The JS consists of motion of the lower limb rehabilitation device. The TS consists of motion of the lower limb. Meanwhile, the generalized coordinates of every space should be defined.
The coordinate system of the lower limb rehabilitation is shown in Fig. 2. In this study, (l r , l FB ), (l r , θ r ), (θ k , θ h ) are selected as the generalized coordinates in AS, JS and TS, respectively. The relationship between the generalized coordinates in different spaces can be written as The force diagram of the human-robot system is shown in Fig. 4. The actuate force F AS (ࢠR 2 ) consists of |F FB | and |F C | that are the driving forces of the prismatic joint FB and screw, respectively. F JS (ࢠR 2 ) is the human-robot interaction force in JS. The actuate force F AS can be written as (2) where l JS ,l JS ,l JS (ࢠR 2 ) are the motion vectors and defined by is the combined force of Coriolis and centrifugal forces of ADG, G(l JS )ࢠR 2 is the gravitational component of the human-robot system. F JS is the load in JS, its counter force F' JS is also the actuating force in TS and can be defined by principle of virtual displacement where L(θ TS )ࢠR 2×2 is the matrix of the instantaneous moment arm of point C point to I and H; F' JS ⊗ L(θ TS ) is the matrix of torques in TS and can be formulated as where θ T S ,θ T S ,θ T S ࢠR 2 are the vectors of generalized coordinates in TS. M u (θ TS )ࢠR 2×2 is the generalized mass matrix of IHG, V (θ T S ,θ T S ) ∈ R 2 is the combined forces of Coriolis and centrifugal of IHG, G(θ TS )ࢠR 2 means the gravitational component of IHG.
The hip joint force F h (ࢠR 2 ) and knee joint force F k (ࢠR 2 ) can be written as where m c , m t are the mass of the crus (HG) and thigh (IH), respectively; a c , and a t are the acceleration vector of center of mass of the crus and thigh, respectively.

III. DYNAMIC CHARACTERISTICS OF THE LOWER LIMB
Normal gait exercises are difficult to apply when the patients cannot voluntary control the affected limb [32]. Pedaling is an effective training method for reversing muscular weakness, in which the muscle activity pattern is similar to other forms of locomotion, including gait, and multiple muscle groups can be trained efficiently.
In this section, the joint forces of the patient in pedal training mode are analyzed, which provides a basis for the optimal motion planning. The parameters of the patient's lower limb are shown in Table I (refer to PRC National Standard GB10000-88 and GB/T 17245-2004 and fine-tuned according to the BEP experimental platform).
During pedal training, the foot of the patient is pulled by the robot and moves along a circle. As shown in Fig. 2, the origin of the coordinate locates at I.The center of the circle is set at (698 mm, −234 mm) and radius is set as 100 mm. α 0 is the rotation angle, and clockwise rotation is positive. The starting position of the trajectory is located at the lowest point of the circle, at which α 0 is 0°. The angular velocity is set as 60°/s (α 0 = 60°/s). The simulation results are shown in Fig. 5.
As shown in Fig. 5, in one training cycle, the maximum and minimum value of knee joint are 60N and 30N, respectively. When the patient is in flaccid stage, tone is initially reduced, and pulling the flaccid hemiplegic lower limb during the flaccid stage may have negative effect on the joint. Knee joint is the most vulnerable due to its specific structure. Researches shows that exercise frequency, loads and the range of the loads have some negative effects on the knee joint [33], [34]. Keeping the loads and its range at a relatively low level should be an optional method to avoid the risk of injury during training.
The following two methods are commonly used to reduce the knee joint force: one is changing the training speed to obtain a lower acceleration value or fluctuation; the other is to optimize the training path to decrease the joint force. To verify the effectiveness of changing the training speed, the knee joint forces at different training speeds are simulated, and the results are shown in Fig. 6. Due to the training speed is at a relatively low level, it is ineffective to change the training speed to reduce the joint forces, that is the joint forces relate to the training path.

IV. TRAINING PATH OPTIMIZATION
In traditional pedal training mode, the training path is a ideal circle. However, this will bring out unacceptable impulse. Aiming at reducing the knee joint forces, we tried to find an optimal trajectory that can reduce the unacceptable impulse of knee joint besides realize cycling training.
As shown in Fig. 7, the center of the ideal circle is O. To find the optimal training trajectory, the starting point C 0 of the training path is below the center of the ideal circle. The velocity v 0 at point C 0 is tangent to ideal circle. The optimal path is searched step by step to keep the optimal trajectory closed to the ideal circle. At each step, the optimizing algorithm is applied. In Fig. 7, d i-1 (i = 1, …, n) is the vector from point C i-1 to C i , and for the first step, d 0 is set as v 0 Δt. At step i, starting point C i is deduced by the last step i-1, and a sector centered at C i is defined to find the starting point of the step i+1 (C i+1 ).The sector fans out clockwise from the velocity vector of C i to line OC i , and its radius changes in the range of |d i-1 |±Δs to ensure that C i+1 locates in a limited area and the acceleration do not change dramatically.
The displacement vector of step i is defined as d i (γ i , |d i |), and the motion time Δt is constant at each step. Due to Δt is short enough, the velocity and acceleration of C i+1 can be written as: In the condition of C i-1 andḋ i−1 are known in step i-1, the joint force at C i can be deduced by combining (4), (6) and (7). The next is to determine C i+1 , at which the force acting on the knee joint reach the minimum. The force acting on the knee joint is selected as the cost function, and the methods of gradient descent (GD) and Lagrange multiplier (LM) are applied to search C i+1 .
The GD method begins at Q (seen in Fig. 7), at which γ i = 0. The cost function is expressed as The learning rate is set as λ = −0.001 in this study. At the end of one iteration, the new point and cost function are given by In this study the stop condition is set as ε = 0.0002. The iterative operation continues, until K' satisfies the following constraints Then, (γ i , |d i |) can be updated to (γ i , |d i |), and C i+1 can be determined. If C i+1 is out of the range of the sector, LM method is applied to research C i+1 . The Lagrange function can be expressed as where ϕ j (γ i , |d i |) is the boundary constraint of the sector at step i. The extreme point located at the boundary must satisfy Thus, the newly searched point (γ i , |d i |) will be the final point C i+1 . Based on the above algorithm, the optimized training path is shown in Fig. 8, which is composed of a series of discrete points and looks like a helix curve. However, this path cannot be used and will convergent to the center of the ideal circle finally. In pedal training mode, the training path should be a closed path to ensure the patients carry out rehabilitation training repeatedly. Therefore, the optimized training path must be fitted.
As shown in Fig. 8, the knee joint force reaches maximum when α ≈ 277°, and minimum when α ≈ 128°. The optimized path from α ≈ 128°to α ≈ 277°is shown as the yellow curve in Figs. 8 and 9, based on which the fitting path can be divided into two parts. One is the part I from α = 128°(CP 1 shown in Fig. 9) to α = 277°(CP 4 shown in Fig. 9), and the other is the part II from α = 277°to α = 128°. To make the path smooth, the moving direction should not change dramatically including the connections of CP 1 and CP 4 , which means that the part I and part II must be tangent to each other at the connections. Bezier curve is used to fit the two parts.
As shown in Fig. 9, control points (CP 1 to CP 6 ) and control lines (CL 1 to CL 6 ) are defined. At CP 1 and CP 4 , control lines CL 1 , CL 3 , CL 4 and CL 6 should be parallel to the velocity vector. At CP 1 and CP 4 , the fitted curves (part I and II) should have the same radius to ensure that the joint force changes smoothly. When the direction of the Bezier curve is determined, its radius can be defined by the distance between two control points. The fitting process can be described as follows: 1) As shown in Fig. 9, the optimized path from CP 1 to CP 4 is fitted firstly. The fitting path (part I) is determined by the fitting error set as 3.6% that is referred to the steady state error of the control system of the MMRR, and the length of CL 1 and CL 3 can be determined. 2) The control points CP 5 and CP 6 are used to obtain the fitting path (part II). Part I and part II should have the same curvature at CP 1 and CP 4 to satisfy lower impulse requirement. The curvature of part II at CP 1 (t = 0) and CP 4 (t = 1) can be expressed as where ψ (t) = dy/dt, ψ (t) = d 2 y/dt 2 , ϕ (t) = dx/dt, ϕ (t) = d 2 x/dt 2 In the case of third order Bezier curve in this paper, the derivative of the Bezier curve can be expressed as The second derivative of the Bezier curve can be given by Because the direction of CL 4 and CL 6 are defined, the horizontal and vertical coordinates of CP 5 and CP 6 are linear dependent. Therefore, ϕ (t), ψ (t), ϕ (t) and ψ (t) can be deduced by the horizontal coordinates of CP 5 and CP 6 . According to (14), the coordinates of CP 5 and CP 6 can be determined. Fig. 10 shows the joint forces on the fitting path. Comparing to the joint forces on the original path (the ideal circle), the knee joint force on the fitting path drops by an average of 8.79%, and its maximum value is reduced by 19.21%. The impulse on the knee joint has a decrease of 42.89%

A. Experiment on the Bionic Experiment Platform
To verify the effectiveness of the optimal algorithm, a bionic experiment platform (BEP) shown in Fig. 11 was established. The crus and thigh are replaced by two aluminum alloy links respectively, and a set of weights are used to compensate for the weight of the crus and thigh. For the bionic experiment platform, the geometric and inertial parameters can be acquired accurately, and furthermore, the uncertainty of the human can also be removed. The two aluminum alloy links are connected with each other by two force sensors (DYMH-103(30kg), Dayang Sensor Company, China) that can measure the joint forces in two directions (one aligns the crus and the other aligns the thigh), and their sensitivity is 1.5mv/v. The mass distribution of the two aluminum alloy links is uniform.
The parameters of BEP are shown in Tables I and II. In pedal training mode, the MMRR should follow the desired optimal trajectory, a proportional-derivative (PD) position controller is selected to ensure that the MMRR can complete the trajectory tracking task. As shown in Fig. 12, the kinematic model of MMRR receives position command (x,y) from the   optimal trajectory planner and generates the length L d of the linear drivers. Then L d is converted to θd by the kinematic model of linear drivers. θ d along with the actual position feedback θ a of the motors of the linear driver are processed by the PD controller to generate the control command of the MMRR. In Fig. 12, L 0 is the minimal length of the linear driver, s is the pitch of the linear driver.
Based on this BEP, the knee joint forces are tested in pedal training mode, and 10 repetitions of movement was recorded on each path. The experimental results are shown in Fig. 13, and the data of the joint force are shown in Table III.
As shown in Fig. 13(a), although the minimum of the knee joint force are close on the ideal circle and optimized path, the maximum of the knee joint force on the optimized path is lower than that of on the ideal circle. Furthermore, the force curve on the optimized path are flatter than the that of on the ideal circle, which means that the impulse on the optimized path is lower (seen in Fig. 13(b)).This is valuable to the patient in flaccid stage.
In Fig. 13, the knee joint forces and their differences between maximum and minimum after optimization has a significant reduction. The impulse on the knee joint also drops considerably. As shown in Table III, the maximum of knee joint force drops 15.41%, and the impulse drops by an average of 47.81%. Furthermore, by using this optimal algorithm, the driving force of linear actuator 1 (F FB ) drops by an average of 8.32%, which indicates that the mechanical performance requirement of the MMRR is also reduced.

B. Human-Robot Interaction Experiment
To verify the effectiveness of the optimal algorithm, the practical human-robot interaction experiments (shown in Fig. 14) are implemented. Six healthy adult males, free from musculoskeletal and neurological impairment participated in the experiments (age: 25.2 ± 2.4 years, body mass 70.3 ± 4.6 kg, height 174 ± 3.5 cm), and the kinetic parameters is recognized by using the least squares method. This trial has been approved by Human Participants Ethics Committee from Beijing University of Posts and Telecommunications, and written informed consent was obtained from each participant. The participants were instructed to relax their lower limbs during the experiments. Two force sensors are used to measure human-robot interaction force, one (DYMH-103(50kg)) is installed on the pedal and used to measure F JS , and the other (DYMH-103(100kg)) is installed on the output part of the linear actuator 1 and used to measure the driving force (F FB ). According to (6), the relationship between F JS and F' JS , the knee joint force F k can be expressed as: As mentioned in Section III, the effects of velocity and acceleration on F k are negligible, so the variation of F k can be reflect by F JS directly.
Before the experiment, the participants did a short period of training trials that help them become familiar with the process of the experiment with MMRR. In the human-robot interaction experiment, the lower limb of the participant was carried by the MMRR to complete the passive pedal rehabilitation training along the ideal circle and optimized path, respectively, and 10 repetitions of movement was recorded. The subjects were instructed to relax their lower limb, and the MMRR moved along the ideal circle and optimized path, respectively. For each participant, mean values and standard deviations were calculated for F JS and F FB . Fig. 15 shows mean value and standard   Table IV.
As shown in Fig. 15(a), pedal training experiments on two paths were repeatable as indicated by small standard deviations. The maximum difference of interaction force is near 270°, the minimum differences of interaction force is near 100°. These features are consistent to the optimal panning method showed in Fig. 9 (point CP 1 and Point CP 4 ). During the experiment, keeping the lower limb relax is not easy, especially when the lower limb is pulled to the far points (near 270°), at which the participants involuntarily want to control their leg to keep balance (although there is no risk of unbalance), this phenomenon can be validated by the larger standard deviations near the far points. However, doing simple training before the experiment was necessary and can help alleviate the influence of nervous. The value of F FB is associated with the interaction forces and the moment arm, as the training radius and interaction forces decrease on the optimal path, the driving forces also decreased (shown in Fig. 15(b)). Due to the moment arm of interaction force has a greater influence on the driving force, the maximum value of the driving force is reduced a lot.
As shown in Table IV, the interaction forces, driving force and fluctuations are all reduced on the optimal path, for the participant 4, the maximum interaction force drops 8.5%, and the fluctuation drops by 21.3% for the participant 3. The driving force of linear actuator 1 (F FB ) drops by an average of 9.2% for the participant 2. The proposed optimal path planning algorithm can have a better effect on human-robot interaction experiment.
Although the experimental results have verified the effectiveness of this method, as we know, for the patients with weakness muscle needs passive training and lower joint force to avoid causing pain, the benefit that this method can bring to patients are the result of long-term accumulation. The participants in the experiment are physically healthy, quantitative measures and results will be conducted on patient-based experiments, and research on other optimal solutions that can reduce the joint force is also the future work.

VI. CONCLUSION
To reduce the patients' knee joint force during pedal training, an optimal training path planning algorithm is presented. The dynamics model of human-robot system is established, and an optimal path planning method based on gradient descent and Bezier curve fitting method is presented. The planning process is divided into a series of motion steps based on the original ideal circle, at which the gradient descent and Lagrange multiplier methods are applied to search the optimal training path. Finally, Bezier curve is used to fitting the optimal path to get a closed training path. To validate the effectiveness of the optimal algorithm, both theoretical analysis and experiments are implemented. The results of simulation and experiment show that this optimal algorithm of training path can effectively reduce the joint force, and has a lower impulse on the joint.