Motion Planning for a Cable-Driven Lower Limb Rehabilitation Robot with Movable Distal Anchor Points

This article introduces a cable-driven lower limb rehabilitation robot with movable distal anchor points (M-CDLR). The traditional cable-driven parallel robots (CDPRs) control the moving platform by changing the length of cables, M-CDLR can also adjust the position of the distal anchor point when the moving platform moves. The M-CDLR this article proposed has gait and single-leg training modes, which correspond to the plane and space motion of the moving platform, respectively. After introducing the system structure configuration, the generalized kinematics and dynamics of M-CDLR are established. The fully constrained CDPRs can provide more stable rehabilitation training than the under-constrained one but requires more cables. Therefore, a motion planning method for the movable distal anchor point of M-CDLR is proposed to realize the theoretically fully constrained with fewer cables. Then the expected trajectory of the moving platform is obtained from the motion capture experiment, and the motion planning of M-CDLR under two training modes is simulated. The simulation results verify the effectiveness of the proposed motion planning method. This study serves as a basic theoretical study of the structure optimization and control strategy of M-CDLR.


Introduction
The medical rehabilitation of patients with nerve or joint injuries usually requires a lot of repetitive and personalized training. Conventional medical rehabilitation training is carried out manually by therapists, which is expensive and time-consuming for patients. The development of equipment that can assist patients by performing musculoskeletal movements will significantly improve rehabilitation efficiency and reduce the workload of therapists.
Cable-driven rehabilitation robot realizes repetitive movement training by pulling the patient's limbs with flexible cables. It has the advantages of good man-machine compatibility, adjustable stiffness, and diverse training forms. For example, STRING-MAN [1,2], hybrid-driven waist rehabilitation robot [3,4], cable-driven upper limb rehabilitation robot [5,6], and bionic muscle cable-driven lower limb rehabilitation robot [7,8]. The moving platform of a cabledriven rehabilitation robot should move accurately along a specific trajectory according to the rehabilitation needs, it has certain requirements for the stability and safety of the robot simultaneously. To satisfy the stability requirement, most cable-driven rehabilitation robots are fully constrained robots since the fully constrained CDPRs can have positive internal force (the cable tension of CDPRs when the external force is zero). Many researches have indicated that fully constrained CDPRs internal force has a great impact on reducing the vibration and improving the stiffness [9][10][11]. However, the number of cables m of the fully constrained CDPRs should be greater than the DOF n of the moving platform [12], and the excessive number of cables will lead to a complex workspace environment, which may cause the cables and human body collision. Alves ensures the positive internal force through an additional weight on the moving platform and the force exerted by the patient to simplify the system structure and reduce production costs [13]. However, this method is more suitable for the CDPR with a small workspace and low degree of freedom. If the moving 1 3 platform with additional weight accidentally collides with the human body, it may cause injury.
The Movable anchor point CDPR (M-CDPR) is a special kind of cable robot, it can change the position of the anchor point according to different purposes and have a larger workspace and better obstacle avoidance performance than traditional CDPRs. Therefore, many scholars have studied M-CDPR from different perspectives in recent years. Gagliardini [14][15][16] studied the reconfigurable cable-driven parallel robot (RCDPR) for sandblasting and painting, the reconfigurable cable connection points on the base frame of RCDPR are manually positioned at a discrete set of possible locations according to a prescribed path of the moving platform. In addition, other researches relate the reconfiguration method with workspace, stiffness or/and power consumption [17,18]. Workspace and trajectory planning of RCDPR are studied in [19,20], respectively. The above researches mainly focus on anchor point reconfiguration before the robot operation. Motoji [21] proposed a method to determine the position of the movable distal anchor point of M-CDPR. But this method has some limitations, it needs to plan the cable direction in advance, and the movement of some distal anchor points must be spatial. For the M-CDPRs obstacle avoidance research, Youssef [22,23] studied the fully constrained M-CDPR, its distal anchor points change their positions according to the distance between cables or between cable and human in real time to avoid collision. An [24] proposed a novel M-CDPR and studied its collision detection method and the obstacle avoidance algorithm when multiple moving or/and static obstacles exist. Furthermore, the towing system composed of multiple mobile cranes, unmanned aerial vehicles or ships can also be regarded as special M-CDPR [25,26], but this kind of robot system usually requires gravity to maintain force balance.
According to the above references, it is not difficult to conclude that traditional CDPRs for rehabilitation with high DOFs causes complex human-robot interactive environment, and the mechanical flexibility of M-CDPRs has the potential to improve the human-robot interactive environment and upgrade the cable-driven rehabilitation robot in many aspects. Therefore, based on M-CDPRs, this article proposes the M-CDLR. M-CDLR has multiple rehabilitation modes and movable distal anchor points. For the M-CDLR with m ≤ n , its Jacobian matrix can be adjusted by planning the motion of the movable distal anchor points, so that the system dynamic equation has solutions and the null space of the Jacobian matrix has a positive vector. Thereby fewer cables can be used to achieve fully constrained, which improves the human-robot interaction environment.
The rest of this article is organized as follows: Sect. 2 introduces the structure and rehabilitation modes of the M-CDLR. Section 3 establishes the generalized kinematics and dynamics of the M-CDLR. Section 4 presents the motion planning method for movable distal anchor points. Section 5 carries out the motion capture experiment and the motion planning simulation. Section 6 discusses the following research directions. Finally, Sect. 7 concludes this article.

Structure
The structure of the M-CDLR is shown in Fig. 1. The robot is composed of a fixed frame, handrail, body weight support mechanism, motor drive unit, movable anchor point, moving platform, and ball screw linear actuator. The body weight support mechanism consists of the cantilever and the harness, which is used to reduce the subject's weight during rehabilitation. The cantilever can rotate around a vertical axis and the harness can move along the cantilever to adjust the position of the rehabilitation subject in the workspace. The motor drive unit integrates the motor, driver, sensor and winch. The movable distal anchor point consists of a pulley and a movable guide rail. It can be divided into the horizontal movable anchor point and the vertical movable anchor point according to its motion path. Before the robot works, based on the requirements of rehabilitation mode, the configuration of the vertical movable anchor point can be adjusted by the coordination of a movable guide rail and a fixed guide rail, and the configuration of the horizontal movable anchor point can be adjusted by a movable guide rail. When the robot works, the ball screw linear actuator controls the position of the movable anchor point by controlling the position of the movable guide rail. The cable guidance paths through vertical and horizontal movable anchor points are shown in Fig. 2a, b, respectively.
The M-CDLR this article studied has Gait Rehabilitation Mode (GRM) and Single Leg Rehabilitation Mode (SLRM). In GRM, the connection method of the cable and the moving platform is shown in Fig. 3a. The feet of the rehabilitation subject are fixed on 2 moving platforms, each platform is driven by 3 cables. The movable distal anchor points on each moving platform are configurated in the same vertical plane, and the distance between the two vertical planes is determined by the rehabilitation subject's step width. Thereby the moving platform moves in a plane with 3-DOF. In SLRM, the connection method of the cable and the proximal anchor point on the moving platform is shown in Fig. 3b, a single foot of the rehabilitation subject is fixed on a moving platform driven by 6 cables to perform a 6-DOF spacial movement.

Kinematics and Dynamics
The scale and load of the cable-driven robot this article studied are relatively small, so the mass and elastic deformation of the cable are ignored. Considering the moving platform has planar motion and spacial motion under two rehabilitation modes of M-CDLR, the generalized kinematics and dynamics are established. The kinematic schematic of the M-CDLR is shown in Fig. 4. The global frame and the local frame are defined as F G {O G -XYZ} and F L {O L -X L Y L Z L }, and the origin of the local frame O L is fixed on the mass center of the moving platform. In F G , A i (i = 1-6) is the distal anchor point, before the robot works, the Y coordinate of A i can be adjusted and then fixed according to the physical signs of the rehabilitation subject and training content. When the robot works, the Z coordinate of A 1 ~ A 4 is variable, the X coordinate of A 5 and A 6 is variable, and the position of A i along the corresponding axis is c i . B i is the proximal anchor point on the moving platform. L i is the cable between A i and B i . So, the cable vector can be represented as: where r is the position vector of the moving platform, represents the position vector of A i and it is relative to c i , the cable vector is expressed as l i (c i ) similarly. The unit vector of the cable can be calculated as: Then the transpose Jacobian matrix J T of the M-CDLR is: where m is the number of cables, n is the DOF of the moving platform, c = c 1 , c 2 … c m T is the vector formed by the position of the movable distal anchor point. According to the Newton-Euler method, the dynamic equation of the robot is: T is the vector formed by cable tension, w = f x f y f z x y z T is the external force vector on the moving platform, a and are the linear acceleration and angular velocity of the moving platform, respectively. I is the inertial matrix of the moving platform.
In GRM, A 1 , A 2 and A 6 are in the same vertical plane, planar gait trajectory is achieved by controlling the moving platform through cables L 1 , L 2 , L 6 and movable distal anchor points A 1 , A 2 , A 6 , so m = 3 and n = 3. Same for L 3 , L 4 , L 5 and A 3 , A 4 , A 5 . In the SLRM, the spacial motion trajectory of the moving platform is achieved by all the 6 cables and movable distal anchor points, so m = 6 and n = 6.

Motion Planning Method
The motion planning for M-CDLR is to plan the motion of the movable distal anchor point according to the trajectory, posture, and motion state of the moving platform. The M-CDLR is more flexible than traditional CDPRs, so the motion planning method can be based on different purposes. This article proposes a motion planning method with the purpose of using fewer cables to achieve the theoretically fully constrained M-CDLR moving platform in a specific trajectory since the fully constrained cable robot has good stability, but more cables than under a constrained one, which is not conducive to human-robot interaction.
The dynamic equation of most CDPRs can be simplified as follows: where f e is the amount of external force vector including inertial force. In [12], a fully constrained pose of the moving platform is a pose in which, for any f e , there exists a f > 0 such that Eq. (5) is valid. The sufficient and necessary conditions for fully constrained CDPRs can be expressed as two conditions that are simultaneously held, which are: Condition A: The transpose Jacobian matrix J T has full rank. Condition B: There exists vector z > 0 in the null space of J T .
For traditional CDPRs with m > n , Condition A can hold, which means there is a vector v such that J T v = f e , and Condition B guarantees that can be found to make f = v + z > 0 hold. So, for M-CDLR with m ≤ n , if the movable distal anchor point is adjusted such that J T v = f e and J T z = 0 have solutions and z > 0 . Then the fully constrained conditions can be satisfied theoretically.

Motion Planning for GRM
In GRM, the two moving platforms have the same trajectory in the motion planes. So take the motion plane composed of A 1 , A 2 , A 6 as an example to illustrate the motion planning method for GRM. J T z = 0 can be written as: where J i is the column vector of J T (c) , and Let k 1 = −z 1 ∕z 3 and k 2 = −z 2 ∕z 3 , then the null space vector z = [k 1 , k 2 , −1] T < 0 , Eq. (6) can be rewritten into the scalar equations form: the analytic expressions of k 1 and k 2 are as follows: The sign of the numerator and denominator of is determined by the rotation direction from �������� ⃗ B 6 B 2 to u 2 and �������� ⃗ B 1 B 6 to u 1 . There is > 0 when the two rotation directions are the same. As shown in Fig. 5, the structure of the robot requires A 6 to be located under the moving platform, and u 6 points from B 6 to A 6 , so the Z L coordinate of u 6 (6), the direction of u 6 is opposite to z 1 u 1 + z 2 u 2 , which means z 1 z u1 + z 2 z u2 > 0 is required for z u6 < 0 . The proximal anchor points on the moving platform are all close to the X L O L Y L plane, so the directions of �������� ⃗ B 1 B 6 and �������� ⃗ B 6 B 2 can be approximately regarded as the same as the X L axis. Therefore, when the above-mentioned rotation directions are the same z L u1 and z L u2 have the same sign. It is obvious that there > 0 if and only if the mentioned above rotation directions are counterclockwise.
If J T z = 0 holds J T v = f e can be simplified as z 4 J 1 + z 5 J 2 − f e = 0 . Let k 3 = 1∕z 4 and k 4 = −z 5 ∕z 4 , the equations similar to Eq. (7) can be obtained. where ������� ⃗ B f B 1 is the vector from B f to B 1 . As shown in Fig. 5, B f is the equivalent action-point of f e on the moving platform.
The motion planning in GRM is to determine the position of the movable distal anchor point c = [c 1 c 2 c 6 ] T according to Eqs. (7) and (9)

Motion Planning for SLRM
In the SLRM, J T v = f e and J T z = 0 are rewritten as: . Equations (11) and (12) have 12 scalar equations and 18 unknowns, whose analytical solution is complex and whose numerical solution is computationally expensive. So, Eqs. (11) and (12) are solved separately. For Eq. (12), divide its left and right sides by arbitrarily z i , there are 6 scalar equations and 5 definite unknowns z j ∕z i (i ≠ j) , at least one of c i must be taken as an unknown to ensure the equations have a solution. The remaining c i is taken as known quantities after being solved by Eq. (11).
Considering that not all the distal anchor points have to be movable, Eq. (11) can be rewritten as: where p and q are the number of movable and fixed distal anchor point, respectively. k im and k js are scalar coefficients, J im (c im ) and J js are the column vectors of J T (c) , c im is the position of the ith movable distal anchor point. Equation (13) has 6 scalar equations and 2p + q unknowns, it can be solved when 2p + q ≥ 6.
To solve Eqs. (12) and (13) separately and ensure that both are valid at the same time. p + q of 6 distal anchor points need to be selected to solve Eq. (13), then substitute the solved anchor point positions into Eq. (12) to solve the remaining anchor point positions. This requires 2p + q ≥ 6 and p + q ≤ 5 . Both Eqs. (12) and (13) have unique solutions if the equality in the two inequalities holds, so this article ensures 2p + q > 6 and p + q < 5 to screen the most feasible c from multiple solutions.
Considering Eq. (12) has an inequality constraint and c has a feasible range, all equation-solving problem are transformed into the optimization problem.
where Fun = 0 is each sub-equation, c min and c max are the lower and upper bound of the feasible range of c . When ∑ Fun 2 approaches zero, the solution of the equations is obtained.
Assume that the moving platform trajectory is continuous with a duration of t. Divide t into time series with interval dt, the continuous trajectory becomes (t∕dt) + 1 moving platform pose data, then calculate c according to each pose data, t h e s e t C = c i |c i = [c j i ], i = 1, 2, … n, j = 1, 2, … 6 formed by c is the motion of the movable distal anchor point. In this article, the optimization problem is solved by the interior point method. The iterative algorithm is sensitive to initial value and the above optimization has multiple solutions, so the obtained optimal solution is probably the one closest to the initial value. The optimal solution can be approximately controlled by selecting the initial value. Therefore, the solution solved at time t i−1 is regarded as the initial value of the next calculation at time t i to make the motion of the movable distal anchor point continuous. For the initial value of the calculation at the initial time t 0 , Several initial values are randomly selected from the expected interval by uniform distribution to find the best motion.
After calculating set C for each selected initial value, the stepwise ratio is calculated for each set. The stepwise ratio represents the degree of the motion smoothness of the movable distal anchor point. If the stepwise ration is less than a certain number, the motion can be considered continuous and smooth. This article keeps the set C with s r < 0.1 and selects the one with the smallest movement range of the movable anchor point as the result.
For the motion planning of the SLRM, first select p + q distal anchor points for solving Eq.

Simulation Based on Motion Capture Experiment
In this part, based on motion capture experiment data, the motion planning of two rehabilitation modes of M-CDLR is simulated. First, the motion capture experiment and its data processing are briefly introduced. Second, based on the expected trajectory and posture of the moving platform extracted from motion capture data, the motion of the movable distal anchor point, cable tension and collision detection under two rehabilitation modes are simulated.

Motion Capture Experiment
This study uses the Nokov motion capture system to collect lower limb motion data. As shown in Fig. 7, 11 motion capture cameras are used in the experiment. The experimenter has 2 markers on the shoulder, 3 markers at the waist, 3 markers for each thigh and shank, 1 marker for each knee and each ankle, 4 markers on each foot. The experimenter performs 5 s static standing, 10 s straight walking and 3 times right leg stretches. The cameras capture the 3D position data of each marker, and the Seeker software of the motion capture system is used to preprocess the data, this step mainly establishes the marker model based on the data and repairs the loss or position mutation of markers in some frames. The established marker model and marker names are shown in Fig. 8. After the motion capture data preprocessing, it is necessary to extract the expected trajectory and posture of the moving platform from the data. In GRM, the upper body of the rehabilitation subject in M-CDLR is fixed by the body Determine c2, and calculate c1 based on Eq. (9) and (10) Is c1 feasible?
Substitute c1 and c2 into Eq. (7) and (8)    weight support mechanism, but the upper body of the experimenter moves relative to the global frame F G when capturing the motion of straight walking. So, take the midpoint of Torso1 and Torso2 as the fixed point. If the position of the fixed point is constant in F G , the position of any marker P marker can be calculated by the following equation.
where avg(P S Fix ) is the average value of the fixed-point position data in 5 s static standing, P W marker and P W Fix are the position data of the marker and fixed point in 10 s straight (15) P marker = avg(P S Fix ) + P W marker − P W Fix walking, respectively. Then divide the straight walking and single leg stretch motion capture data into multiple groups according to their cycle, select the group with the best smoothness and the slightest fluctuation for curve fitting. The coordinate-time curve is fitted with the Fourier series, the first and second derivatives of the Fourier series are used as velocity and acceleration. Figure 9a, b show the motion capture data and curve fitting result during a gait cycle and during a stretch, respectively. The marker R-foot2 is set as the origin of the local frame F L . Its motion data are the extracted trajectory of the moving platform. Assuming the axis direction of F L is the same as that of F G during static standing, the axis of F L can be expressed in F G according to the motion capture data of the markers on feet during walking and stretching. The transform matrix or the Euler angle from F L to F G can be calculated and regarded as the expected posture of the moving platform.

Simulation
The numerical simulation is carried out to verify the effectiveness of the proposed motion planning method. In the simulation, the proposed motion planning method takes the expected trajectory and posture of the moving platform as input and outputs the position of the movable distal anchor point. In addition, the cable tension is determined by a cable tension distribution method for fully constrained CDPRs to verify if the moving platform is fully constrained, and the minimum angle and distance between cables and the human body are figured to detect collision. If the motion of the movable distal anchor point and the cable tension obtained in the numerical simulation are continuous and within the feasible range, and no collision occurs between the cable and the human body, then the motion planning method is effective. In practical terms, the irregular shape and uneven mass of the moving platform cause the complexity of its mathematical model, and the precise mechanical model of the human lower limb should be dynamic. However, the focus of the simulation is to verify the motion planning method. To simplify the numerical simulation, the following assumptions are made: (1) The structure parameters of M-CDLR for simulation are shown in Table 1. The motion range of the movable distal anchor point is (c imax , c imax ), and the feasible range of the cable tension is (f imax , f imax ). where f m = (f max + f min )∕2 is the median of the feasible range of cable tension, A + T is the Moore-Penrose inverse of A T . Equation (16) is simple for cable tension distribution, and according to [27], the distributed cable tension is continuous and near f m .
In GRM, the two moving platforms perform plane motion with the same trajectory, so take the motion plane composed of A 1 , A 2 and A 6 as an example. The position vectors of proximal anchor points in The initial point of gait trajectory extracted from motion capture data is transformed to [L∕2, 0.3] T . To quantify the collision detection between the cable and the human body, as shown in Fig. 10, Sa1 and Sa2 are used to represent the safety angle, the former is defined by the angle between B 1 to Pelvis3 vector and u 1 , and the latter is defined by the angle between B 2 to R-knee and u 2 . When Sa1 and Sa2 are close to 0, it means the cable will collide with the human body. The position of the movable distal anchor point planned by the method in Sect. 4.1 is shown in Fig. 11a, the cable tension in the trajectory is shown in Fig. 11b, and the safety angle change diagram is shown in Fig. 11c. The range of the position of the movable distal anchor point in Fig. 11a is [0.4204 m, 1.441 m]. The range of the cable tension in Fig. 11b is [96.45 N, 208.5 N]. The position of the movable distal anchor point and the cable tension obtained by numerical simulation are continuous and within the feasible range. The minimum values of Sa1 and Sa2 are 30.2° and 10.7°, respectively. No collision occurs. It can be concluded that the motion planning method is effective for GRM.
In SLRM, the position vectors of proximal anchor points in The initial point of single leg stretching trajectory extracted from motion capture data is transformed to [L∕2, W∕2, 0.2] T . As shown in Fig. 12, the red line is the trajectory of the moving platform, located in the right front of the human body. The distal anchor point A 4 is fixed at [0, 1.2, 1] T to avoid a collision. For the collision detection, a polygonal envelope for left leg markers is conducted, in addition, considering the left leg markers are mainly distributed on the left side of the leg and foot, the Y axis span of the obstacle is twice that of the envelope cube. The shortest distances between cables L 3 , L 4 , L 5 and the obstacle are calculated by the OpenGJK fast detection algorithm [28]. Figure 13a, b show the positions of A i (i = 1-3) and A i (i = 5,6), respectively. Figure 13c shows the cable tension. The range of the positions of A i (i = 1-3) Table 1 The structure parameters of M-CDLR Name Value (m) Name Value The range of the cable tension in Fig. 13c is [23.80 N, 224.4 N]. The position of the movable distal anchor point and the cable tension obtained by numerical simulation are continuous and within the feasible range. The distance between the cables and the obstacle is shown in Fig. 13d. The minimum distance is 0.051 m, indicating that there is no collision between the cables and the human body. It can be concluded that the motion planning method is effective for SLRM.

Discussion
This article simplifies the dynamics and kinematics of M-CDLR, the dynamic human body mechanics characteristics and the influence of the movable distal anchor point on the cable are not considered. To achieve practical application, more accurate dynamics and kinematics models of M-CDLR and the human body need to be established. The proposed motion planning method can realize the theoretical fully constrained of the moving platform when the movable distal anchor point moves to the corresponding position. However, there will be errors in the actual control, the control strategy and error analysis are the following research focus. The simulation is to prove the feasibility of the proposed motion planning method, the structure parameters and simulation results are not optimal. The structural size, cable tension and motion characteristics of the movable anchor point can be further optimized.

Conclusion
This article presents an M-CDLR with gait rehabilitation mode and single leg rehabilitation mode. Its distal anchor point can move along a predetermined straight path, and the moving platform is controlled by the cable length and the movable distal anchor point. According to the established kinematics and dynamics of M-CDLR and the fully constrained conditions of the moving platform, a motion planning method for a movable distal anchor point is proposed, which enables M-CDLR to achieve fully constrained with fewer cables than traditional CDPRs. Through the motion capture experiment, the expected trajectories of the moving platform under two rehabilitation modes are obtained, and the motion of movable anchor points, cable tension and collision detection are simulated based on the expected trajectories. The simulation results show that the proposed motion

Data Availability
The datasets analyzed during the current research are available from the corresponding author on reasonable request.

Declarations
Conflict of interest All authors declare no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.