#### Abstract

In order to better perform rehabilitation training on the ankle joint complex in the direction of dorsiflexion/plantarflexion and inversion/eversion, especially when performing the isokinetic muscle strength exercise, we need to calibrate the kinematic model to improve its control precision. The ankle rehabilitation robot we develop is a parallel mechanism, with its movements in the two directions driven by two linear motors. Inverse solution of positions is deduced and the output lengths of the two UPS kinematic branches are calibrated in the directions of dorsiflexion, plantarflexion, inversion, and eversion, respectively. Motion of each branch in different directions is fitted in high-order form according to experimental data. Variances, standard deviation, and goodness of fit are taken into consideration when choosing the best fitting curve, which ensures that each calibration can match the most appropriate fitting curve. Experiments are conducted to verify the effectiveness of the kinematic calibration after finishing the calibration, and the errors before and after calibration of the two kinematic chains in different directions are compared, respectively, which shows that the accuracy after calibration has been significantly improved.

#### 1. Introduction

Rehabilitation training is an effective way to help patients restore their ankle joint complex’s (AJC) motor abilities for patients with ankle injuries. The movement of AJC has three Degrees of Freedom (DOFs), Dorsiflexion/Plantarflexion (DO/PL), Inversion/Eversion (IN/EV), and Adduction/Abduction (AD/AB) [1], with its coordinate system definition shown as in Figure 1.

To augment conventional physical therapy, many robotic ankle rehabilitation devices have been developed to provide repetitive, task-specific, interactive treatment of the impaired limb and monitor its motor recovery [2–6]. Passive rehabilitation training, which means that the AJC is driven by the robot for rehabilitation at a predetermined trajectory, is often used in the early stage of ankle therapy. Many ankle rehabilitation robots have realized the trajectory tracking control for passive rehabilitation training [7–9]. To improve the effect of rehabilitation training, many active rehabilitation training methods including the active participation of patients have been developed such as the ARBOT [5], CARR [10], and Anklebot [11]. Among different kinds of ankle rehabilitation robots, the platform ones are better suited for ankle exercises [12], and parallel mechanism is the most common among them with the above-mentioned exercise modes [5, 6, 13, 14].

Besides that, isometric and isotonic exercises have also been developed for muscle strength exercises of AJC [5, 15]. However, there was no isokinetic muscle strength exercise specially developed for ankle rehabilitation robot, during which the exercise speed is constant, while the resistance encountered varies with the degree of exertion, so that the muscle tension of the moving ankle maintains the optimal state of strength training [16], and the isokinetic muscle strength exercise is usually used for strength training with only one DOF per time. There have been isokinetic exercises used for joint rehabilitation, such as the IsoMed-2000 developed by D. & R. Ferstl, Germany [17].

To realize the isokinetic muscle strength exercise in DO/PL and IN/EV direction using our developed 2-UPS/RRR parallel ankle rehabilitation robot (PARR), we need to have the precise kinematic model of the two UPS kinematic branches. U, P, S, and R stand for universal, prismatic, spherical, and revolute joint, respectively, and the underlined letter represents the actuated joint. Considering machining and assembly errors, the designed robot needs to be calibrated firstly to make the positional inverse solution obtained by theoretical analysis more accurately.

The conventional approach toward kinematic calibration generally begins with formulating the problem in terms of constraint equations that are derived from the kinematic model of the robot. In the data acquisition phase, the pose of the moving platform and the corresponding actuated joint coordinates are obtained. Finally, a suitable optimization method utilizes the obtained data to determine the actual geometry [18]. In contrast, an alternative response surface methodology based method is proposed for performing kinematic calibration that does not require constraint equations and additional input data [19] and physical experiments have been conducted on a 3-PSS/S mechanism to evaluate the accuracy. By analyzing different objective functions for the parameter identification of parallel mechanisms and studying the influence in the position and orientation errors to improve their accuracy, a new objective function considering deviation terms is presented in [20], showing better kinematic parameters identification performance corresponding with passive joints that cannot be measured. Reference [21] proposes a stepwise approach to kinematic calibration of a 5-DOF Gantry-Tau parallel kinematic machine and achieves accuracy of about 20 micrometers for the base actuators by using measurements from a laser tracker and least-squares estimates of polynomial functions. Besides that, the kinematic calibration problem of overconstrained PM is addressed in [22] to improve accuracy and promote its practical application. Instead of establishing conventional error mapping model, a nonlinear error model is built by inserting geometric errors of parts to the real inverse position analysis, and the nonlinear identification equations are directly solved by optimization technique, with results showing very good orientation accuracy. Besides that, maximum likelihood estimation (MLE) is also often used for the calibration of robot or sensors [23].

In this work, we focus on the kinematic calibration of our 2-UPS/RRR PARR according to field experiments and high-order data fitting, with variances, standard deviation, and goodness of fit as the criterion of fitting evaluation. The rest of the paper is organized as follows. Section 2 demonstrates the inverse solution of positions of the PARR. The kinematic calibration process is presented in Section 3. Section 4 displays the experiments and validation, while conclusions are drawn and discussed in Section 5.

#### 2. Inverse Solution of Positions of the PARR

##### 2.1. Mechanical Design of the PARR

The mechanical structure of the developed 2-UPS/RRR PARR is shown in Figure 2. The mechanism is very simple with only a fixed base, a moving platform, two UPS kinematic branches, and a series RRR constraint branch, with its three rotation axes orthogonal to one point. It has three DOFs, with its three rotational DOFs, respectively, equipped with absolute encoders (CALT HAN28E5V360A2, analog output, resolution ). The controller and the data acquisition system used in the robot are based on STM32F103ZET6, and the drivers used for the motors are HDT Servodrives DX060. The advantage of the designed PARR is that different patients’ rotation centers of the AJC can coincide with the mechanism’s rotation center in addition to its compact configuration. The estimated range of motion (ROM) of the human AJC in each direction is given in Table 1 [24], which is used as a reference to design the allowable motion range of the mechanical limits. Specifically, the limits for the rotation angles of the PARR are set as in Table 1, which determine the maximum allowable workspace (MAW) of the parallel mechanism and ensure that the robot is suitable for the left and right AJCs.

Details of mechanical design of the developed PARR are shown in our previous work [25]. During the ankle isokinetic muscle strength exercise, only the movements of DO/PL and IN/EV are usually considered. Therefore, here we just study the kinematic calibration of the two UPS kinematic branches actuated by two linear motors (SKF CAHB-10, driving distance of 150 mm).

##### 2.2. Coordinate System of the Parallel Mechanism

The kinematic coordinate system of the parallel 2-UPS/RRR rehabilitation robot is shown as in Figure 3(a) [26]. The fixed coordinate system and the moving coordinate system are established at the rotation center of the mechanism coinciding at the initial position, all along the directions of three rotation axes. The moving coordinate system is fixed on the moving platform of the parallel mechanism. , , and are the moving distances of the universal joint, spherical joint, and prismatic joint, respectively. The revolute joints , , and are orthogonal to point “*O*,” with their rotation angles being , , and in turn, respectively, where represents the angle of DO/PL and represents the angle of IN/EV (right foot here), while denotes the angle of AD/AB, and the angle value is defined to be positive with counterclockwise rotation.

**(a)**

**(b)**

The coordinate system of the UPS branch is shown in Figure 3(b), where is the coordinate system whose origin is at the center of the universal joint with its axis coinciding with the first axis of the universal joint and axis coinciding with second axis of the universal joint when the mechanism is in the initial position: . is the coordinate system whose origin is at the center of the universal joint with its axis coinciding with the second axis of the universal joint and coinciding with the mechanism rod vector , while the axis . is the coordinate system whose origin is at the center of the spherical joint with its three axes parallel with the corresponding axes of .

##### 2.3. Inverse Solution of Positions

The inverse solution of positions is to deduce the inputs of three branches based on the output angles of the moving platform around the fixed coordinate system, that is, the above-mentioned , , and . The rotating matrix of the moving platform relative to the fixed base can be expressed as in the following equation:where and are the abbreviations of and , respectively. Then, the position vector of the center of spherical joint in the coordinate system can be expressed as in the following two equations, respectively:where indicates the vector coordinates of point in the coordinate system, indicates the vector coordinates of point in the coordinate system and it is a constant, indicates the total length of the UPS kinematic branches, and indicates the vector coordinates of the point in the coordinate system and it is also a constant.

By combining (2) and (3), we can obtain (4), where represents the length of the inside vector.

According to the parameters of the developed 2-UPS/RRR PARR, the coordinate values of points and in the coordinate system are and , respectively. The coordinate values of points and in the coordinate system are and , respectively. Therefore, we can get the theoretical inverse solution of positions as in the following equation:

For our PARR, the angle of AD/AB is equal to the rotation angle of the servo motor due to the mechanical design of the parallel mechanism. Considering the isokinetic muscle strength exercise, the kinematic calibration here is mainly for the movement of DO/PL and IN/EV; that is, we need to compensate the output length of the two UPS kinematic branches to get the accurate relationship between and and .

From (5), we can get the initial values of and as in the following equation:

###### 2.3.1. Movement of DO/PL

During the movement of DO/PL , we can deduce the values of and as follows:

The length changes of and during DO/PL are as in (8), from which we can see that , and their direction is consistent.

###### 2.3.2. Movement of IN/EV

During the movement of IN/EV , we can deduce the values of and as follows:

The length changes of and during IN/EV are as in the following equation:

We can see that during the movement of IN/EV when and they change in the opposite direction. Based on the above analysis, and can be calibrated simultaneously during DO/PL, while during IN/EV, and need to be calibrated separately.

#### 3. Calibration Process of the Designed Parallel Mechanism

The error model of the kinematic calibration is as in (11), and we do not know the exact form of the errors in advance.

During the calibration, firstly, we control the output lengths of and using the position controller for the two linear actuators to realize the movement of DO/PL and IN/EV, respectively. Secondly, we record the corresponding output angles of DO/PL and IN/EV, that is , respectively. Finally, the recorded and are used to deduce the theoretical values of the lengths of and according to the inverse solution of positions. The difference between the theoretical values of and and the controlled lengths of and is used to calculate and compensate the errors.

##### 3.1. Calibration of and in DO/PL Direction

The result of calibration in DO/PL is as in Figure 4, from which we can see that the error trends in DO and PL are different, so we calibrate them separately.

###### 3.1.1. Error Calibration of and in DO Direction

The second-order fitting, third-order fitting, fourth-order fitting, fifth-order fitting, and sixth-order fitting are, respectively, performed on the errors between actual and theoretical values of and during the movement of DO, with their fitting results shown as in Figure 5. In order to better analyze the results, we calculate the variances, standard deviations, and goodness of fit of each of the fitting values with the errors, as shown in Table 2, where , , and represent the variance, standard deviation, and goodness of fit, respectively.

After comprehensive consideration of variances, standard deviations, goodness of fit, and computation complexity according to the fitting result, we define the criterion of choosing the optimal fitting curve as in the following equation:

According to Figure 5 and Table 2, we choose fifth-order fitting as the optimal fitting curve of error compensation of and in DO direction as in the following equation:

###### 3.1.2. Error Calibration of and in PL Direction

The second-order fitting, third-order fitting, fourth-order fitting, fifth-order fitting, and sixth-order fitting are, respectively, performed on the errors between actual values and theoretical values of and during the movement of PL, with their fitting results as in Figure 6. The variance, standard deviation, and goodness of fit of each of the fitting values with the errors are shown in Table 3.

According to Figure 6 and Table 3, we choose second-order fitting as the optimal fitting curve of error compensation of and in PL direction as in the following equation:

##### 3.2. Calibration of in IN/EV Direction

The result of calibration in the direction of IN/EV is as in Figure 7, from which we can see that the error trends in IN/EV are also different, so we will calibrate them separately.

###### 3.2.1. Error Calibration of in IN Direction

The second-order fitting, third-order fitting, fourth-order fitting, fifth-order fitting, and sixth-order fitting are, respectively, performed on the errors between actual values and theoretical values of during the movement of IN, with their fitting results shown as in Figure 8. The variance, standard deviation, and goodness of fit of each of the fitting values with the errors are shown in Table 4.

According to Figure 8 and Table 4, we choose third-order fitting as the optimal fitting curve of error compensation of in IN direction as in the following equation:

###### 3.2.2. Error Calibration of in EV Direction

The second-order fitting, third-order fitting, fourth-order fitting, fifth-order fitting, and sixth-order fitting are, respectively, performed on the errors between actual values and theoretical values of during the movement of EV, with their fitting results shown as in Figure 9. The variance, standard deviation, and goodness of fit of each of the fitting values with the errors are shown as in Table 5.

According to Figure 9 and Table 5, we choose second-order fitting as the optimal fitting curve of error compensation of in EV direction as in the following equation:

##### 3.3. Calibration of in IN/EV Direction

The result of calibration in the direction of IN/EV is as in Figure 10, from which we can see that the error trends in IN/EV are also different, so we also calibrate them separately.

###### 3.3.1. Error Calibration of in IN Direction

The second-order fitting, third-order fitting, fourth-order fitting, fifth-order fitting, and sixth-order fitting are, respectively, performed on the errors between actual values and theoretical values of during the movement of IN, with their fitting results shown as in Figure 11. The variance, standard deviation, and goodness of fit of each of the fitting values with the errors are shown in Table 6.

According to Figure 11 and Table 6, we choose third-order fitting as the optimal fitting curve of error compensation of in IN direction as in the following equation:

###### 3.3.2. Error Calibration of in EV Direction

The second-order fitting, third-order fitting, fourth-order fitting, fifth-order fitting, and sixth-order fitting are, respectively, performed on the errors between actual values and theoretical values of during the movement of EV, with their fitting results shown as in Figure 12. The variance, standard deviation, and goodness of fit of each of the fitting values with the errors are shown in Table 7.

According to Figure 12 and Table 7, we choose second-order fitting as the optimal fitting curve of error compensation of in EV direction as in the following equation:

##### 3.4. Calibration Results of and

Through the above analysis, we can obtain the calibration results of the controlled lengths of and for the two linear actuators, which are the calibrated inverse solutions of positions.

###### 3.4.1. Lengths of and during DO Are as in (19)

###### 3.4.2. Lengths of and during PL Are as in (20)

###### 3.4.3. Lengths of and during IN Are as in (21)

###### 3.4.4. Lengths of and during EV Are as in (22)

#### 4. Experiments and Validation

In order to better verify the calibration effect of the PARR, we conducted relevant experiments in the directions of DO/PL and IN/EV, respectively. The method is to control the input of and and record the output angles of and , used to deduce the controlled lengths of and according to the calibration results. By comparing the inputs of and with the deduced lengths of and according to the calibration results, we can judge whether the calibration result is valid or not.

Firstly, we control the lengths of and using position controller for the two linear actuators to realize the movements of DO/PL and IN/EV, respectively. The lengths of and are controlled to run (100 pulses) at a time. Then, we record the corresponding , respectively. Lastly, the theoretical inputs of and are deduced based on the calibration results from (19) to (22) and the obtained . By comparison with the theoretical inputs of and deduced from the inverse solution of positions without calibration, we can verify the effectiveness of the kinematic calibration of the parallel rehabilitation mechanism. The prototype of the 2-UPS/RRR PARR system used is as in Figure 13, with its human machine interface of the upper computer developed using C# programming language.

##### 4.1. Results of DO

The experiment results of and in DO () are as in Table 8, where denotes the controlled input length of with its unit being , is the detected angle of DO with its unit being , represents the theoretical input of without kinematic calibration, and denotes the theoretical input of with kinematic calibration, while and represent the corresponding errors, respectively. For the reason that , we just show in Table 8 for the sake of simplification.

In order to show the error changes before and after calibration more intuitively during the DO movement, we compare the errors before and after calibration in the same figure, as in Figure 14.

##### 4.2. Results of PL, IN, and EV

Similarly, we can obtain the experiment results of and in PL , IN , and EV , with their errors before and after calibration shown as in Figures 15–17, respectively.

##### 4.3. Discussion

###### 4.3.1. Comparison of Errors before and after Calibration

Based on the experiment results, the average errors before and after calibration are shown in Figure 18, where , , , and denote the errors of without calibration, errors of with calibration, errors of without calibration, and errors of with calibration, respectively. The average errors of after calibration in the four directions have reduced by , while the average errors of after calibration in the four directions have reduced by .

###### 4.3.2. Analysis of the Calibration Results

From (15) to (18), we can see that the calibration results of and in the IN and EV directions have almost the same behaviour and fitting orders, while from (13) and (14), we can see that and in the DO and PL directions have different behaviour and different fitting orders. The reason for this is that the two linear motors (SKF CAHB-10) used for actuating the two UPS kinematic branches are not servo motors and suffer from their nonlinear control, except for the mechanism’s machining and assembly errors. In spite of this, we can see from Figure 18 that the errors after calibration become very small and the precision is significantly improved. The fact that that there is no need to calibrate the PARR before each use needs to be specially noted. The calibration results have been added in the control system to improve the control precision for isokinetic muscle strength exercise.

#### 5. Conclusion

Kinematic calibration of the two UPS kinematic branches of the developed 2-UPS/RRR PARR is conducted and described in this paper in detail in order to improve the control precision for the rehabilitation training like isokinetic muscle strength exercise. Motion of each branch in different directions is fitted in high-order form according to experimental data. Variance, standard deviation, and goodness of fit are taken into consideration when choosing the best fitting curve. Experiments have been conducted, which show that the accuracy after calibration has been significantly improved and verify the effectiveness of the kinematic calibration.

In the future, we will study the repeatability performance of the kinematic calibration, as the repeatability of the kinematic calibration is an important aspect for the validation of the procedure. In addition, we will also focus on the kinematic calibration in the direction of AD/AB, compliant and interactive control strategies, as well as multimode rehabilitation training method.

#### Data Availability

All the data used to support the findings of this study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

#### Acknowledgments

The authors would like to acknowledge the support of the National Natural Science Foundation of China (nos. 61903011 and 51675008), the Natural Science Foundation of Beijing Education Committee (no. KM202010005021), Beijing Natural Science Foundation (no. 3204036), and the Beijing Postdoctoral Research Foundation (no. Q6001002201901).