Design and Experimental Research of 3-RRS Parallel Ankle Rehabilitation Robot

The ankle is a crucial joint that supports the human body weight. An ankle sprain will adversely affect the patient’s daily life, so it is of great significance to ensure its strength. To help patients with ankle dysfunction to carry out effective rehabilitation training, the bone structure and motion mechanism of the ankle were analyzed in this paper. Referring to the configuration of the lower-mobility parallel mechanism, a 3-RRS (R and S denote revolute and spherical joint respectively) parallel ankle rehabilitation robot (PARR) was proposed. The robot can realize both single and compound ankle rehabilitation training. The structure of the robot was introduced, and the kinematics model was established. The freedom of movement of the robot was analyzed using the screw theory, and the robot kinematics were analyzed using spherical analytics theory. A circular composite rehabilitation trajectory was planned, and the accuracy of the kinematics model was verified by virtual prototype simulation. The Multibody simulation results show that the trajectory of the target point is basically the same as the expected trajectory. The maximum trajectory error is about 2.5 mm in the simulation process, which is within the controllable range. The experimental results of the virtual prototype simulation show that the maximum angular deflection error of the three motors is 2° when running a circular trajectory, which meets the experimental requirements. Finally, a control strategy for passive rehabilitation training was designed, and the effectiveness of this control strategy was verified by a prototype experiment.


Introduction
Ankle sprains are a common type of musculoskeletal system injury, accounting for about 7% to 10% of patients with sports injuries [1]. When the human body performs upright sporting activities, the body weight is loaded on the ankle joint on both sides. Especially for athletes, during strenuous exercise, the load and impact on the ankle rise sharply, which easily leads to ankle joint overload and sprains [2,3]. If patients with an ankle sprain injury undertake rehabilitation training too late or inefficiently, it is easy for this injury to escalate to more serious conditions, such as chronic ankle instability [4]. Medical theory and clinical experiments proved that effective rehabilitation training can accelerate the process of ankle rehabilitation; the earlier the rehabilitation training is undertaken, the more conducive it is to the recovery of motor function [5]. However, the number of patients with ankle sprains is large, and the number of doctors who specialize in rehabilitation training is seriously inadequate [6]. Traditional manual rehabilitation training has low efficiency, and there are no uniform training parameters and indicators [7]. Therefore, it is of great relevance to develop an ankle rehabilitation robot to help patients with ankle joint dysfunction.

Ankle Motion Mechanism
The ankle joint is the most heavily loaded joint in the human body and is involved in the majority of movement postures of the lower limbs. Its bone structure consists of the tibia, the fibula's distal end, and the trochlea talus (see Figure 1a). The coordination of the ankle joint and knee joint enables the foot to adapt to walking on various surfaces [27,28].
The ankle joint is the most heavily loaded joint in the human body and is involved in the majority of movement postures of the lower limbs. Its bone structure consists of the tibia, the fibula's distal end, and the trochlea talus (see Figure 1a). The coordination of the ankle joint and knee joint enables the foot to adapt to walking on various surfaces [27,28].
The ankle joint has three motion forms: dorsiflexion/plantar flexion, adduction/abduction, and varus/valgus. The instep and the shank form a right angle when they are in a normal state. When the toe moves downward, the angle between the shank and the instep increases gradually, which is plantar flexion. The opposite movement is dorsiflexion. The outward rotation of the foot around the shank is known as abduction, and the opposite movement is known as adduction. The movement of raising the internal margin of the foot and lowering the external margin is varus, and the opposite movement is valgus. The motion model is constructed based on the form of ankle motion, as shown in Figure 1b The motion range of the ankle joint is affected by many factors, such as the joint surface area, the strength of the ligaments, and the volume and elasticity of muscles [29,30]. The motion range of the ankle is shown in Table 1. The talus is wide in the front and narrow in the back. When the ankle is in dorsiflexion, the wider part of the talus enters the malleolar cave. This can prevent excessive movement of the talus. The ankle joint is in a stable fastening state. When the ankle is in plantar flexion, the narrow part of the talus enters the malleolar cave. The ankle joint is in a loose state, and the talus can move in offset to the two sides. It is easy to cause a dislocation sprain of the ankle at this time. Compared to the medial malleolus, the lateral malleolus is long and low. Therefore, it is easy to cause an ankle varus injury in sports. Rehabilitation training after ankle damage can improve the strength of the muscles related to ankle movement, stimulate the activation of related neural mechanisms, and promote the recovery of normal ankle function. To achieve comprehensive ankle rehabilitation training, the ankle rehabilitation robot needs to be designed to work in two modes: single-DOF (degree of freedom) rehabilitation training with only one form of The ankle joint has three motion forms: dorsiflexion/plantar flexion, adduction/abduction, and varus/valgus. The instep and the shank form a right angle when they are in a normal state. When the toe moves downward, the angle between the shank and the instep increases gradually, which is plantar flexion. The opposite movement is dorsiflexion. The outward rotation of the foot around the shank is known as abduction, and the opposite movement is known as adduction. The movement of raising the internal margin of the foot and lowering the external margin is varus, and the opposite movement is valgus. The motion model is constructed based on the form of ankle motion, as shown in Figure 1b.
The motion range of the ankle joint is affected by many factors, such as the joint surface area, the strength of the ligaments, and the volume and elasticity of muscles [29,30]. The motion range of the ankle is shown in Table 1. The talus is wide in the front and narrow in the back. When the ankle is in dorsiflexion, the wider part of the talus enters the malleolar cave. This can prevent excessive movement of the talus. The ankle joint is in a stable fastening state. When the ankle is in plantar flexion, the narrow part of the talus enters the malleolar cave. The ankle joint is in a loose state, and the talus can move in offset to the two sides. It is easy to cause a dislocation sprain of the ankle at this time. Compared to the medial malleolus, the lateral malleolus is long and low. Therefore, it is easy to cause an ankle varus injury in sports. Rehabilitation training after ankle damage can improve the strength of the muscles related to ankle movement, stimulate the activation of related neural mechanisms, and promote the recovery of normal ankle function. To achieve comprehensive ankle rehabilitation training, the ankle rehabilitation robot needs to be designed to work in two modes: single-DOF (degree of freedom) rehabilitation training with only one form of exercise, and multi-DOF compound rehabilitation training with two or more forms of exercise simultaneously.

Mechanical Structure of the 3-RRS PARR
Compared to the 6-DOF parallel mechanism, the lower-mobility parallel mechanism has a concise configuration and a simple control strategy. This lower-mobility parallel mechanism is acceptable for ankle rehabilitation training [31,32]. Based on the 3-RRS parallel mechanism, a novel parallel ankle rehabilitation robot was proposed. The 3-RRS PARR has three degrees of rotational freedom, and its rotation center is fixed in the space. Through the design of the robot structure, the rotation center can coincide with the patient's ankle joint during the rehabilitation training process. Except for the rotation of three degrees of freedom, the ankle does not have axial movement during rehabilitation. The 3D model of the 3-RRS PARR was shown in Figure 2.
exercise, and multi-DOF compound rehabilitation training with two or more forms of exercise simultaneously.

Mechanical Structure of the 3-RRS PARR
Compared to the 6-DOF parallel mechanism, the lower-mobility parallel mechanism has a concise configuration and a simple control strategy. This lower-mobility parallel mechanism is acceptable for ankle rehabilitation training [31,32]. Based on the 3-RRS parallel mechanism, a novel parallel ankle rehabilitation robot was proposed.
The 3-RRS PARR has three degrees of rotational freedom, and its rotation center is fixed in the space. Through the design of the robot structure, the rotation center can coincide with the patient's ankle joint during the rehabilitation training process. Except for the rotation of three degrees of freedom, the ankle does not have axial movement during rehabilitation. The 3D model of the 3-RRS PARR was shown in Figure 2. The static platform and the moving platform of the 3-RRS PARR are connected by three branch chains. Each branch chain has three kinematic pairs. The branch chain is an RRS configuration, and kinematic pairs of the branch chains are the same. The ends of the branch chains are connected to the moving platform through a spherical joint. The rotation axes of the base shafts of three branch chains coincide on a common axis. The rotation axes of middle revolute pairs are perpendicular to each other in space. The common axis of the branch chains at the base revolute pair and the middle rotation axis intersect at a fixed point in space. The moving platform has a 3-DOF to rotate around the fixed point. The PARR is driven by a low-speed torque motor. Compared with a high-speed DC motor, a low-speed torque motor can work continuously in a locked-rotor state. Besides the motor, an adjustable pedal is installed on the moving platform. By adjusting the height and the length of the adjustable pedal, the patient's ankle joint coincides with the rotation center. This structural design ensures the patient's safety in the process of rehabilitation training, avoids secondary injury, and realizes human-machine compatibility.
The composition of the RRS branch chain is shown in Figure 3. The incremental encoder is installed on the motor, and the movement data of the crankshafts are monitored through the encoder. Both the motor base and crankshaft are installed on the static platform. The crankshaft and the static platform are connected through the base revolute pair (R). The crankshaft and the linkage are connected through the middle revolute pair (R). Finally, the linkage is connected to the moving platform through the spherical joint (S). The static platform and the moving platform of the 3-RRS PARR are connected by three branch chains. Each branch chain has three kinematic pairs. The branch chain is an RRS configuration, and kinematic pairs of the branch chains are the same. The ends of the branch chains are connected to the moving platform through a spherical joint. The rotation axes of the base shafts of three branch chains coincide on a common axis. The rotation axes of middle revolute pairs are perpendicular to each other in space. The common axis of the branch chains at the base revolute pair and the middle rotation axis intersect at a fixed point in space. The moving platform has a 3-DOF to rotate around the fixed point. The PARR is driven by a low-speed torque motor. Compared with a high-speed DC motor, a low-speed torque motor can work continuously in a locked-rotor state. Besides the motor, an adjustable pedal is installed on the moving platform. By adjusting the height and the length of the adjustable pedal, the patient's ankle joint coincides with the rotation center. This structural design ensures the patient's safety in the process of rehabilitation training, avoids secondary injury, and realizes human-machine compatibility.
The composition of the RRS branch chain is shown in Figure 3. The incremental encoder is installed on the motor, and the movement data of the crankshafts are monitored through the encoder. Both the motor base and crankshaft are installed on the static platform. The crankshaft and the static platform are connected through the base revolute pair (R). The crankshaft and the linkage are connected through the middle revolute pair (R). Finally, the linkage is connected to the moving platform through the spherical joint (S).

Robot Kinematics Modeling
According to the D-H matrix, the kinematics model of the 3-RRS parallel mechanism

Robot Kinematics Modeling
According to the D-H matrix, the kinematics model of the 3-RRS parallel mechanism is established (see Figure 4). The direction vectors connecting the center of the kinematic pair and the rotation center are expressed as u i , v i , w i (i = 1, 2, 3). The static coordinate system is O-XYZ, the origin of which is the rotation center O of the mechanism. The z-axis is perpendicular to the static platform, and the x-axis is in the plane formed by the vector w1 and the z-axis. The y-axis is determined according to the x-axis and z-axis with the right-handed spiral rule. The moving coordinate system is O-xyz, the origin of coordinates is rotation center O. The axes of Ox, Oy, Oz are respectively along the direction of w i . The angles between the axis of the middle revolute pair and the vertical direction in the moving coordinate system are both 54.74 • . Therefore, the axes of the direction vectors w i and v i are perpendicular to each other in space and intersect at rotation point O.

Robot Kinematics Modeling
According to the D-H matrix, the kinematics model of the 3-RRS parallel mechanism is established (see Figure 4). The direction vectors connecting the center of the kinematic pair and the rotation center are expressed as ui, vi, wi (i = 1,2,3). The static coordinate system is O-XYZ, the origin of which is the rotation center O of the mechanism. The z-axis is perpendicular to the static platform, and the x-axis is in the plane formed by the vector w1 and the z-axis. The y-axis is determined according to the x-axis and z-axis with the right-handed spiral rule. The moving coordinate system is O-xyz, the origin of coordinates is rotation center O. The axes of Ox, Oy, Oz are respectively along the direction of wi. The angles between the axis of the middle revolute pair and the vertical direction in the moving coordinate system are both 54.74°. Therefore, the axes of the direction vectors wi and vi are perpendicular to each other in space and intersect at rotation point O.

DOF Analysis of PARR
The DOF of the 3-RRS parallel mechanism is analyzed using the screw theory, which determines the common and virtual constraints of the mechanism [33]. The twist system of the branch chain can be expressed as:

DOF Analysis of PARR
The DOF of the 3-RRS parallel mechanism is analyzed using the screw theory, which determines the common and virtual constraints of the mechanism [33]. The twist system of the branch chain can be expressed as: According to the relationship between the wrench and twist in the screw theory, it can be established from the reverse screw that the branch chain is subject to forces in the directions of the x-axis, y-axis, and z-axis, without the force couple. Therefore, each branch chain has three rotational DOF, and there is no moving DOF. There is a spherical joint in the branch chain. Therefore, 3 i $ = (wi ; 0) = (a1, a2, a3; 0 0 0), where a1, a2, a3 is not 0. The twist of the spherical joint can be converted into: Due to the existence of the spherical joint, according to the analysis of the branch chain's DOF and the spherical joint, it can be found that the branch chain has two local DOF. Therefore, the motion of the branch chain can be simplified to the motion of the 3R structure. Since the whole mechanism consists of three branch chains, the general wrench consists of three branches of the wrench. The wrench of the 3-RRS parallel mechanism can be reduced to a base wrench system.
Micromachines 2022, 13, x FOR PEER REVIEW 6 of 16 The three kinematic pairs of each branch chain have different axes in space and intersect at point O. Therefore, 1 is linearly independent. According to the twist system, the basic screw system of the reverse screw can be obtained as: According to the relationship between the wrench and twist in the screw theory, it can be established from the reverse screw that the branch chain is subject to forces in the directions of the x-axis, y-axis, and z-axis, without the force couple. Therefore, each branch chain has three rotational DOF, and there is no moving DOF. There is a spherical joint in the branch chain. Therefore, 3 i $ = (wi ; 0) = (a1, a2, a3; 0 0 0), where a1, a2, a3 is not 0. The twist of the spherical joint can be converted into: Due to the existence of the spherical joint, according to the analysis of the branch chain's DOF and the spherical joint, it can be found that the branch chain has two local DOF. Therefore, the motion of the branch chain can be simplified to the motion of the 3R structure. Since the whole mechanism consists of three branch chains, the general wrench consists of three branches of the wrench. The wrench of the 3-RRS parallel mechanism can be reduced to a base wrench system.
Micromachines 2022, 13, x FOR PEER REVIEW 6 of 16 The three kinematic pairs of each branch chain have different axes in space and intersect at point O. Therefore, 1 is linearly independent. According to the twist system, the basic screw system of the reverse screw can be obtained as: According to the relationship between the wrench and twist in the screw theory, it can be established from the reverse screw that the branch chain is subject to forces in the directions of the x-axis, y-axis, and z-axis, without the force couple. Therefore, each branch chain has three rotational DOF, and there is no moving DOF. There is a spherical joint in the branch chain. Therefore, 3 i $ = (wi ; 0) = (a1, a2, a3; 0 0 0), where a1, a2, a3 is not 0. The twist of the spherical joint can be converted into: Due to the existence of the spherical joint, according to the analysis of the branch chain's DOF and the spherical joint, it can be found that the branch chain has two local DOF. Therefore, the motion of the branch chain can be simplified to the motion of the 3R structure. Since the whole mechanism consists of three branch chains, the general wrench consists of three branches of the wrench. The wrench of the 3-RRS parallel mechanism can be reduced to a base wrench system.
The three kinematic pairs of each branch chain have different axes in space and intersect at point O. Therefore, $ i1 , $ i2 , $ i3 is linearly independent. According to the twist system, the basic screw system of the reverse screw can be obtained as: The three kinematic pairs of each branch chain have different axes in space and intersect at point O. Therefore, 1 is linearly independent. According to the twist system, the basic screw system of the reverse screw can be obtained as: According to the relationship between the wrench and twist in the screw theory, it can be established from the reverse screw that the branch chain is subject to forces in the directions of the x-axis, y-axis, and z-axis, without the force couple. Therefore, each branch chain has three rotational DOF, and there is no moving DOF. There is a spherical joint in the branch chain. Therefore, 3 i $ = (wi ; 0) = (a1, a2, a3; 0 0 0), where a1, a2, a3 is not 0. The twist of the spherical joint can be converted into: Due to the existence of the spherical joint, according to the analysis of the branch chain's DOF and the spherical joint, it can be found that the branch chain has two local DOF. Therefore, the motion of the branch chain can be simplified to the motion of the 3R The three kinematic pairs of each branch chain have different axes in space and intersect at point O. Therefore, 1 is linearly independent. According to the twist system, the basic screw system of the reverse screw can be obtained as: According to the relationship between the wrench and twist in the screw theory, it can be established from the reverse screw that the branch chain is subject to forces in the directions of the x-axis, y-axis, and z-axis, without the force couple. Therefore, each branch chain has three rotational DOF, and there is no moving DOF. There is a spherical joint in the branch chain. Therefore, 3 i $ = (wi ; 0) = (a1, a2, a3; 0 0 0), where a1, a2, a3 is not 0. The twist of the spherical joint can be converted into: Due to the existence of the spherical joint, according to the analysis of the branch chain's DOF and the spherical joint, it can be found that the branch chain has two local The three kinematic pairs of each branch chain have different axes in space and intersect at point O. Therefore, 1 is linearly independent. According to the twist system, the basic screw system of the reverse screw can be obtained as: According to the relationship between the wrench and twist in the screw theory, it can be established from the reverse screw that the branch chain is subject to forces in the directions of the x-axis, y-axis, and z-axis, without the force couple. Therefore, each branch chain has three rotational DOF, and there is no moving DOF. There is a spherical joint in the branch chain. Therefore, 3 i $ = (wi ; 0) = (a1, a2, a3; 0 0 0), where a1, a2, a3 is not 0. The twist of the spherical joint can be converted into: Due to the existence of the spherical joint, according to the analysis of the branch the branch chain. Therefore, $ i3 = (w i ; 0) = (a 1 , a 2 , a 3 ; 0 0 0), where a 1 , a 2 , a 3 is not 0. The twist of the spherical joint can be converted into: Micromachines 2022, 13, x FOR PEER REVIEW 6 of 16 The three kinematic pairs of each branch chain have different axes in space and intersect at point O. Therefore, 1 i $ is linearly independent. According to the twist system, the basic screw system of the reverse screw can be obtained as: According to the relationship between the wrench and twist in the screw theory, it can be established from the reverse screw that the branch chain is subject to forces in the directions of the x-axis, y-axis, and z-axis, without the force couple. Therefore, each branch chain has three rotational DOF, and there is no moving DOF. There is a spherical joint in the branch chain. Therefore, 3 i $ = (wi ; 0) = (a1, a2, a3; 0 0 0), where a1, a2, a3 is not 0. The twist of the spherical joint can be converted into: Due to the existence of the spherical joint, according to the analysis of the branch chain's DOF and the spherical joint, it can be found that the branch chain has two local DOF. Therefore, the motion of the branch chain can be simplified to the motion of the 3R structure. Since the whole mechanism consists of three branch chains, the general wrench consists of three branches of the wrench. The wrench of the 3-RRS parallel mechanism can be reduced to a base wrench system.
Thus, the general constraint of the mechanism is 3. According to Equation (4), it is established that the mechanism is subject to forces in the direction of the x-axis, y-axis, and z-axis, and is not affected by the force couple. The inverse wrench of Equation (4) is deduced as: Equation (5) establishes the twist corresponding to the general wrench. It can be seen that the mechanism has three mutually perpendicular rotational degrees of freedom in space [34].
According to the modified Kutzbach-Gruble equation, the DOF of the mechanism can be calculated as: According to Equation (6), M is the number of degrees of freedom of the mechanism; d is the number of orders of the mechanism; n is the number of members in the mechanism; g is the number of kinematic pairs in the mechanism; i f is the number of degrees of freedom of the i -th kinematic sub;  is the number of general constraints of the mechanism; and ς is the number of local degrees of freedom of the mechanism.
According to the screw theory analysis results, the number of DOF corresponds to the rotation around the three axes. There are no redundant DOF in other directions. That Due to the existence of the spherical joint, according to the analysis of the branch chain's DOF and the spherical joint, it can be found that the branch chain has two local DOF. Therefore, the motion of the branch chain can be simplified to the motion of the 3R structure. Since the whole mechanism consists of three branch chains, the general wrench consists of three branches of the wrench. The wrench of the 3-RRS parallel mechanism can be reduced to a base wrench system.
According to the relationship between the wrench and twist in the screw theory, it can be established from the reverse screw that the branch chain is subject to forces in the directions of the x-axis, y-axis, and z-axis, without the force couple. Therefore, each branch chain has three rotational DOF, and there is no moving DOF. There is a spherical joint in the branch chain. Therefore, 3 i $ = (wi ; 0) = (a1, a2, a3; 0 0 0), where a1, a2, a3 is not 0. The twist of the spherical joint can be converted into: Due to the existence of the spherical joint, according to the analysis of the branch chain's DOF and the spherical joint, it can be found that the branch chain has two local DOF. Therefore, the motion of the branch chain can be simplified to the motion of the 3R structure. Since the whole mechanism consists of three branch chains, the general wrench consists of three branches of the wrench. The wrench of the 3-RRS parallel mechanism can be reduced to a base wrench system.
Thus, the general constraint of the mechanism is 3. According to Equation (4), it is established that the mechanism is subject to forces in the direction of the x-axis, y-axis, and z-axis, and is not affected by the force couple. The inverse wrench of Equation (4) is deduced as: Equation (5) establishes the twist corresponding to the general wrench. It can be seen that the mechanism has three mutually perpendicular rotational degrees of freedom in space [34].
According to the modified Kutzbach-Gruble equation, the DOF of the mechanism can be calculated as: According to Equation (6) Thus, the general constraint of the mechanism is 3. According to Equation (4), it is established that the mechanism is subject to forces in the direction of the x-axis, y-axis, and z-axis, and is not affected by the force couple. The inverse wrench of Equation (4) According to the relationship between the wrench and twist in the screw theory, it can be established from the reverse screw that the branch chain is subject to forces in the directions of the x-axis, y-axis, and z-axis, without the force couple. Therefore, each branch chain has three rotational DOF, and there is no moving DOF. There is a spherical joint in the branch chain. Therefore, 3 i $ = (wi ; 0) = (a1, a2, a3; 0 0 0), where a1, a2, a3 is not 0. The twist of the spherical joint can be converted into: Due to the existence of the spherical joint, according to the analysis of the branch chain's DOF and the spherical joint, it can be found that the branch chain has two local DOF. Therefore, the motion of the branch chain can be simplified to the motion of the 3R structure. Since the whole mechanism consists of three branch chains, the general wrench consists of three branches of the wrench. The wrench of the 3-RRS parallel mechanism can be reduced to a base wrench system.
Thus, the general constraint of the mechanism is 3. According to Equation (4), it is established that the mechanism is subject to forces in the direction of the x-axis, y-axis, and z-axis, and is not affected by the force couple. The inverse wrench of Equation (4) is deduced as: Equation (5) establishes the twist corresponding to the general wrench. It can be seen that the mechanism has three mutually perpendicular rotational degrees of freedom in space [34].
According to the modified Kutzbach-Gruble equation, the DOF of the mechanism Equation (5) establishes the twist corresponding to the general wrench. It can be seen that the mechanism has three mutually perpendicular rotational degrees of freedom in space [34].
According to the modified Kutzbach-Gruble equation, the DOF of the mechanism can be calculated as: According to Equation (6), M is the number of degrees of freedom of the mechanism; d is the number of orders of the mechanism; n is the number of members in the mechanism; g is the number of kinematic pairs in the mechanism; f i is the number of degrees of freedom of the i-th kinematic sub; λ is the number of general constraints of the mechanism; and ς is the number of local degrees of freedom of the mechanism.
According to the screw theory analysis results, the number of DOF corresponds to the rotation around the three axes. There are no redundant DOF in other directions. That is to say, the rotation center of the PARR is consistent with that of the ankle joint, which meets the requirements of ankle rehabilitation.

Inverse Kinematics Model
Here, α, β, and γ represent the attitude angles of the moving platform rotating around the static coordinate system's z-axis, y-axis, and x-axis, respectively. The process of solving the three input angles θ i (i = 1, 2, 3) of the mechanism through the attitude change angle α, β, γ of the moving platform is by the inverse kinematics solution of the PARR [35]. When the moving platform and the static platform are parallel, the position of the mechanism is defined as the initial pose. The angle between u i and v i is δ1, the angle between v i and w i is δ 2 , the angle between w i and the z-axis of the static coordinate system is ε 1 , and the angle between plane YOZ and plane w i OZ is ε i . When the PARR is in the initial pose, the direction vector connecting the rotation center of the mechanism and the center of the spherical joint can be expressed as: When the pose of the moving platform changes, the direction vector can be expressed as: The Euler rotation matrix is R = R(z,a)R(y,b)R(x,y).
According to the spherical analytic theory, the direction's cosine of v 1 in the initial pose can be expressed as: v 10 = [sin δ 1 sin θ 1 sin δ 1 cos θ 1 cos δ 1 ] According to the structural features of the PARR, the vectors of the middle revolute pairs of each branch chain are distributed uniformly; then, v 2 and v 3 can be obtained by rotating v 1 in the negative direction about the Z-axis, where ε ij is the angle between plane w i OZ and plane w j OZ. The general expression of the cosine of the vector of the middle revolute pair direction is as follows: According to the structural feature of the linkage, the two vectors v i and w i form a fixed angle, and the constraint equation is constructed based on this condition: Substituting and simplifying the constraint equation can be obtained with: A i , B i , and C i are expressions containing structural parameters, input angles, and output angles, assuming x i = tan θ i 2 , then sin , by trigonometric substitution. Equation (12) can be expressed as: When the attitude angle of the moving platform is known, input angles of the branch chains can be obtained:

Forward Kinematics Model
The process of solving the attitude change angles α, β, and γ of the moving platform through three input angles via θ i (i = 1, 2, 3) is the forward kinematics solution of the PARR. The angle between plane v 1 Ow 1 and plane u 1 Ov 1 is ψ 1 , and the angle between plane v 1 Ow 1 and plane w 1 Ow 2 is ψ 2 . According to the spherical analytic theory, the motion chain of the spherical polygon (see Figure 5) is established [36,37].

Forward Kinematics Model
The process of solving the attitude change angles α, β, and γ of the moving platform through three input angles via θi (i = 1,2,3) is the forward kinematics solution of the PARR. The angle between plane v1Ow1 and plane u1Ov1 is ψ1, and the angle between plane v1Ow1 and plane w1Ow2 is ψ2. According to the spherical analytic theory, the motion chain of the spherical polygon (see Figure 5) is established [36,37]. Figure 5. Motion chain of the spherical polygon.
The cosine of the direction vector of w1, w2, and w3 is expressed by spherical polygons 4321, 54,321, and 5'4321, respectively. In addition, vi has been solved in the inverse kinematics solution. Substituting wi and vi into the constraint equation of Equation (11) can be simplified as follows: Di, Ei, and Fi are expressions containing the structural parameters, input angle, external angle, and parameters ξ1 and ξ2. The unknown quantity ψi can be solved using a trigonometric function, as follows: In order to solve this efficiently, assuming Analyzing Equation (18) shows that there are eight sets of solutions for y. According to the structural features of the PARR, it can be seen that there is a unique solution for the mechanism, by substituting the solved ψ1 and ψ2 into wi. According to Equation (8), the following equation can be obtained: The cosine of the direction vector of w 1 , w 2 , and w 3 is expressed by spherical polygons 4321, 54,321, and 5 4321, respectively. In addition, v i has been solved in the inverse kinematics solution. Substituting w i and v i into the constraint equation of Equation (11) can be simplified as follows: D i , E i , and F i are expressions containing the structural parameters, input angle, external angle, and parameters ξ 1 and ξ 2 . The unknown quantity ψ i can be solved using a trigonometric function, as follows: In order to solve this efficiently, assuming y = tan ψ 2 2 , then sin θ i = 2ψ i Equation (17) can be reorganized as follows: Analyzing Equation (18) shows that there are eight sets of solutions for y. According to the structural features of the PARR, it can be seen that there is a unique solution for the mechanism, by substituting the solved ψ 1 and ψ 2 into w i . According to Equation (8), the following equation can be obtained: According to the matrix element correspondence principle, the corresponding attitude angle of the moving platform is: α = arcsin( n 23 cos β ) β = arcsin(−n 31 ) γ = arccos( n 11 cos β )

Numerical Example
Setting the mechanical structure angles δ 1 at 54.74 • , and the mechanical structure angles δ 2 at 40 • , based on the inverse kinematics model, the relationship between θ i (i = 1, 2, 3) and α, β, and γ are established, as shown in Figure 6. When the PARR performs varus/valgus rehabilitation training at the range of −30 •~3 0 • , the relationship between θ i (i = 1, 2, 3) and γ is as shown in Figure 6a. When the PARR performs dorsiflexion/plantar flexion rehabilitation training in the range of −40 •~3 0 • , the relationship between θ i (i = 1, 2, 3) and β is as shown in Figure 6b. When the PARR performs adduction/abduction rehabilitation training in the range of −30 •~3 0 • , the relationship between θ i (i = 1, 2, 3) and α is as shown in Figure 6c.

Numerical Example
Setting the mechanical structure angles δ1 at 54.74°, and the mechanical structure angles δ2 at 40°, based on the inverse kinematics model, the relationship between θi (i = 1,2,3) and α, β, and γ are established, as shown in Figure 6. When the PARR performs varus/valgus rehabilitation training at the range of −30°~30°, the relationship between θi (i = 1,2,3) and γ is as shown in Figure 6a. When the PARR performs dorsiflexion/plantar flexion rehabilitation training in the range of -40°~30°, the relationship between θi (i = 1,2,3) and β is as shown in Figure 6b. When the PARR performs adduction/abduction rehabilitation training in the range of −30°~30°, the relationship between θi (i = 1,2,3) and α is as shown in Figure 6c. There is no obvious mutation in the curve. It is evident that if stabilized input is given to the motor, the PARR can move smoothly. Compared with the motion range of the ankle given in Table 1, it can be seen that the rehabilitation training of all motions can be completed at 100%. Therefore, it was shown that the PARR system meets the actual rehabilitation training requirements.

Simulation Model
To verify the accuracy of the kinematics model and the feasibility of achieving ankle rehabilitation training, the simulation model of the PARR was established with the MATLAB Simulink toolbox (see Figure 7a). There is no obvious mutation in the curve. It is evident that if stabilized input is given to the motor, the PARR can move smoothly. Compared with the motion range of the ankle given in Table 1, it can be seen that the rehabilitation training of all motions can be completed at 100%. Therefore, it was shown that the PARR system meets the actual rehabilitation training requirements.

Simulation Model
To verify the accuracy of the kinematics model and the feasibility of achieving ankle rehabilitation training, the simulation model of the PARR was established with the MATLAB Simulink toolbox (see Figure 7a).
Signal alpha, signal beta, and signal gamma represent the rotational angle of the moving platform around the static coordinate system O-XYZ. The inverse kinematics model module can calculate the motion law of each motor. The PARR model module was used for the PARR simulation model. The transform sensor module is used to extract simulation data. The kinematics simulation results are compared and analyzed with the theoretical values. The picture of the PARR module is shown in Figure 7b. The picture of the Branch Simulation is shown in Figure 7c. It consists of a joint and mechanism, where the joint is two revolute joints and a spherical joint, and the mechanism is a crankshaft, linkage, and moving platform. The simulation model of the PARR is shown in Figure 8.

Kinematics Simulation Analysis
The feasibility of single-DOF rehabilitation training is shown in Figure 6. To realize the requirements of multi-DOF compound rehabilitation training, a circular motion trajectory with a radius of 87.5 mm on the YOZ projection plane was planned for this paper. This trajectory can realize compound rehabilitation training of ankle dorsiflexion/plantarflexion and adduction/abduction. The target point is 200 mm along the positive direction of the OX coordinate axis, as shown in Figure 9a. The movement state of the PARR simulation model under this trajectory is shown in Figure 9b. model module can calculate the motion law of each motor. The PARR model module was used for the PARR simulation model. The transform sensor module is used to extract simulation data. The kinematics simulation results are compared and analyzed with the theoretical values. The picture of the PARR module is shown in Figure 7b. The picture of the Branch Simulation is shown in Figure 7c. It consists of a joint and mechanism, where the joint is two revolute joints and a spherical joint, and the mechanism is a crankshaft, linkage, and moving platform. The simulation model of the PARR is shown in Figure 8.

Kinematics Simulation Analysis
The feasibility of single-DOF rehabilitation training is shown in Figure 6. To realize the requirements of multi-DOF compound rehabilitation training, a circular motion trajectory with a radius of 87.5 mm on the YOZ projection plane was planned for this paper. This trajectory can realize compound rehabilitation training of ankle dorsiflexion/plantarflexion and adduction/abduction. The target point is 200 mm along the positive direction of the OX coordinate axis, as shown in Figure 9a. The movement state of the PARR simulation model under this trajectory is shown in Figure 9b. model module can calculate the motion law of each motor. The PARR model module was used for the PARR simulation model. The transform sensor module is used to extract simulation data. The kinematics simulation results are compared and analyzed with the theoretical values. The picture of the PARR module is shown in Figure 7b. The picture of the Branch Simulation is shown in Figure 7c. It consists of a joint and mechanism, where the joint is two revolute joints and a spherical joint, and the mechanism is a crankshaft, linkage, and moving platform. The simulation model of the PARR is shown in Figure 8.

Kinematics Simulation Analysis
The feasibility of single-DOF rehabilitation training is shown in Figure 6. To realize the requirements of multi-DOF compound rehabilitation training, a circular motion trajectory with a radius of 87.5 mm on the YOZ projection plane was planned for this paper. This trajectory can realize compound rehabilitation training of ankle dorsiflexion/plantarflexion and adduction/abduction. The target point is 200 mm along the positive direction of the OX coordinate axis, as shown in Figure 9a. The movement state of the PARR simulation model under this trajectory is shown in Figure 9b.
t=0.5s t=1.5s t=2.5s t=3.5s The motion trajectory of the target point projected on the YOZ surface is shown Figure 10a. The error curve of the trajectory is shown in Figure 10b. The simulation resul show that the trajectory of the target point is basically the same as the expected trajector The maximum trajectory error is about 2.5 mm in the simulation process; the small errors may be due to model errors in the modeling process, which are within th controllable range. The curve has no large mutation. During ankle rehabilitation trainin the gravitational and inertial forces on the patient's leg are mainly carried by the suppo mechanism, such as the seat. Therefore, the external forces applied to the moving platfor The motion trajectory of the target point projected on the YOZ surface is shown in Figure 10a. The error curve of the trajectory is shown in Figure 10b. The simulation results show that the trajectory of the target point is basically the same as the expected trajectory. The maximum trajectory error is about 2.5 mm in the simulation process; the smaller errors may be due to model errors in the modeling process, which are within the controllable range. The curve has no large mutation. During ankle rehabilitation training, the gravitational and inertial forces on the patient's leg are mainly carried by the support mechanism, such as the seat. Therefore, the external forces applied to the moving platform are small. For the robot driving torque simulation analysis, a vertical downward force of 10 N is applied at the rotational centering point to simulate the external force applied during the rehabilitation movement. The driving torque is monitored by the simulation module. The curve of the motor driving torque is shown in Figure 10c. T1, T2, and T3 represent the motor driving torque. The smooth driving torque change curve is shown without sudden change. The prototype is driven by a 4.4 N·m DC torque motor, to meet the driving torque requirements. The motion trajectory of the target point projected on the YOZ surface is shown in Figure 10a. The error curve of the trajectory is shown in Figure 10b. The simulation results show that the trajectory of the target point is basically the same as the expected trajectory. The maximum trajectory error is about 2.5 mm in the simulation process; the smaller errors may be due to model errors in the modeling process, which are within the controllable range. The curve has no large mutation. During ankle rehabilitation training, the gravitational and inertial forces on the patient's leg are mainly carried by the support mechanism, such as the seat. Therefore, the external forces applied to the moving platform are small. For the robot driving torque simulation analysis, a vertical downward force of 10 N is applied at the rotational centering point to simulate the external force applied during the rehabilitation movement. The driving torque is monitored by the simulation module. The curve of the motor driving torque is shown in Figure 10c. T1, T2, and T3 represent the motor driving torque. The smooth driving torque change curve is shown without sudden change. The prototype is driven by a 4.4 N·m DC torque motor, to meet the driving torque requirements.
This verifies the feasibility of the PARR model designed in this paper for rehabilitation training.

Prototype Experiment
In the early stage of the rehabilitation process, the passive rehabilitation training mode is mainly used to train the range of motion of the patient's ankle joint. Since the This verifies the feasibility of the PARR model designed in this paper for rehabilitation training.

Prototype Experiment
In the early stage of the rehabilitation process, the passive rehabilitation training mode is mainly used to train the range of motion of the patient's ankle joint. Since the ankle joint is relatively stiff during this period, the patient cannot carry out activities by him-or herself; therefore, passive rehabilitation training should be carried out with the help of external forces. Passive rehabilitation training requires the following error to be as small as possible, so the position-speed double closed-loop control strategy was adopted, as shown in Figure 11. The inner loop is the speed control loop, using a proportional-integral controller, and the outer loop is the position control loop, using a proportional controller.
Micromachines 2022, 13, x FOR PEER REVIEW 12 of 16 ankle joint is relatively stiff during this period, the patient cannot carry out activities by him-or herself; therefore, passive rehabilitation training should be carried out with the help of external forces. Passive rehabilitation training requires the following error to be as small as possible, so the position-speed double closed-loop control strategy was adopted, as shown in Figure 11. The inner loop is the speed control loop, using a proportionalintegral controller, and the outer loop is the position control loop, using a proportional controller. The PARR experimental prototype was designed to test the circular rehabilitation motion track planned above. The experimental device is shown in Figure 12a. The experimental prototype is shown in Figure 12b. The encoder was used to measure the motor rotation. The adjustable pedal was removed to monitor the corner of the moving platform by Angle Sensor 1. Angle Sensor 2 was used for leveling the moving platform.  The PARR experimental prototype was designed to test the circular rehabilitation motion track planned above. The experimental device is shown in Figure 12a. The experimental prototype is shown in Figure 12b. The encoder was used to measure the motor rotation. The adjustable pedal was removed to monitor the corner of the moving platform by Angle Sensor 1. Angle Sensor 2 was used for leveling the moving platform.  The circular trajectory motion period was set to 7 s, and the rehabilitation trajectory motion experiment was carried out. As shown in Figure 13, it was verified that the PARR can drive the affected limb to complete the rehabilitation movement represented in the experiment, simulating the compound rehabilitation movement of an ankle joint. It can be seen from Figure 14a-d that the actual rotation law of the three motors can follow the expected motion law. The maximum following error is about 2°, which meets the experimental requirements. It can be seen from Figure 14e,f that the rotation law of the rotating center of the prototype test experiment conforms to expectations, without substantial mutation, and with a small error. The feasibility of the ankle rehabilitation robot was verified. During the experimental process, the small error in the turning angle of the dynamic platform may have been caused by an installation error in the prototype. In the subsequent experimental research, the robot prototype structure should be improved to eliminate and avoid the influence of prototype installation errors on the The circular trajectory motion period was set to 7 s, and the rehabilitation trajectory motion experiment was carried out. As shown in Figure 13, it was verified that the PARR can drive the affected limb to complete the rehabilitation movement represented in the experiment, simulating the compound rehabilitation movement of an ankle joint. It can be seen from Figure 14a-d that the actual rotation law of the three motors can follow the expected motion law. The maximum following error is about 2 • , which meets the experimental requirements. It can be seen from Figure 14e,f that the rotation law of the rotating center of the prototype test experiment conforms to expectations, without substantial mutation, and with a small error. The feasibility of the ankle rehabilitation robot was verified. During the experimental process, the small error in the turning angle of the dynamic platform may have been caused by an installation error in the prototype. In the subsequent experimental research, the robot prototype structure should be improved to eliminate and avoid the influence of prototype installation errors on the experimental results. In addition, dynamics analysis should be added to plan the output force of the resulting dynamic platform.
Micromachines 2022, 13, x FOR PEER REVIEW 13 of 16 experimental results. In addition, dynamics analysis should be added to plan the output force of the resulting dynamic platform.

Conclusions
To help patients with ankle dysfunction in rehabilitation training, based on the lower-mobility parallel mechanism, a novel 3-RRS parallel ankle rehabilitation robot was proposed in this paper. To obtain better kinematic characteristics in the process of rehabilitation training, the bone structure and motion mechanism of the ankle were

Conclusions
To help patients with ankle dysfunction in rehabilitation training, based on the lowermobility parallel mechanism, a novel 3-RRS parallel ankle rehabilitation robot was proposed in this paper. To obtain better kinematic characteristics in the process of rehabilitation training, the bone structure and motion mechanism of the ankle were analyzed, and the motion range of the ankle joint was detailed. Then, the structure and the kinematics model of the PARR were introduced. The DOF of the PARR was calculated using the screw theory, and the kinematics analysis of the PARR was analyzed with the spherical analytic theory. The feasibility of single-DOF rehabilitation training was proved with relevant numerical examples. The PARR simulation model was established by the MATLAB Simulink toolbox. A circular trajectory was planned and simulated. The Multibody simulation results show that the trajectory of the target point is basically the same as the expected trajectory. The maximum trajectory error is about 2.5 mm in the simulation process, which is within the controllable range. The feasibility of multi-DOF rehabilitation training was verified through a simulation analysis of the circular trajectory. A passive rehabilitation training control strategy was designed according to the rehabilitation training requirements. The experimental results of the virtual prototype simulation show that the maximum angular deflection error of the three motors is 2 • when running a circular trajectory, which meets the experimental requirements. Based on the above research, the feasibility of the 3-RRS PARR proposed in this paper was proved, and the foundation for the human-machine experiments was laid.
Regarding the existing research on ankle rehabilitation robots, comfort during rehabilitation is one of the urgent issues to be addressed. In follow-up research, the structural improvement and kinetic analysis of PARR should be combined with rehabilitation medicine to further improve human-machine compatibility. Further human-machine experiments will be conducted in the future to evaluate the reliability of the robot system.  Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.

Data Availability Statement:
The original data contributions presented in the study are included in the article; further inquiries can be directed to the corresponding authors.

Conflicts of Interest:
The authors declare no conflict of interest.