Abstract
In the process of solving the inverse kinematics of six-degrees-of-freedom collaborative robots, the numerical solution has problems such as low accuracy and singular configurations. Moreover, due to the high coupling of its position and attitude, the direct closed-form solution fails. To address these problems, an inverse kinematics algorithm that combines closed-form and numerical solutions was proposed. The Jacobian matrix was established based on the forward kinematics equation of the six-degrees-of-freedom collaborative robot. Its inverse matrix was obtained by a singular value decomposition of the matrix using the Manocha elimination method to avoid the singularities of the Jacobian matrix. The optimal inverse kinematics solution was obtained using the Newton–Raphson iterative method. A computer simulation implemented in MATLAB and Visual C++ was used to evaluate the accuracy and speed of the proposed algorithm. The results of the trajectory planning experiments demonstrate that the algorithm satisfies the requirements for real-time smooth motion. This study of inverse kinematics lays the theoretical foundation for solutions to the inverse problem and real-time control of collaborative robots.
Keywords
Introduction
Because it is impossible to realize full automation in flexible production, man–machine collaboration is a feasible way to improve the productivity of semiautomated systems. 1 Collaborative robots, which have the characteristics of high flexibility, simple programming and rapid configuration, have a wide range of potential applications in the service industry, such as health care, education and retail. 2 In practical applications, the position and direction of the end effector are usually given or predetermined. Therefore, inverse kinematics plays a crucial role in solving the real-time control process and trajectory planning problems of robotic manipulators. 3 Furthermore, due to the inherent nature of the Non-deterministic Polynomial (NP) problem and complex nonlinear equations, computing the inverse kinematics solution of a multi-degree of freedom (DOF) serial robotic manipulator requires more computational resources and time compared to the forward kinematics. 4 There are two main methods for solving inverse kinematics: closed-form solutions and numerical solutions. 5 To improve flexibility, most collaborative robots adopt a design configuration that uses three parallel axes. There is no universal closed-form solution method for the inverse kinematics equation of this type of robot; therefore, many numerical solutions have been adopted. 6 However, numerical solutions have problems, such as low accuracy and complex solution processes. Because of the variable structure of the robot itself, the algorithm has different time and space requirements, and there are few algorithms that can satisfy these requirements. 7
In recent years, many researchers have made significant efforts to solve the inverse kinematics problem of six-degrees-of-freedom (6-DOF) robotic arm. Primrose was the first to demonstrate that the inverse solution of a 6 R robot with a general configuration has at most 16 sets of real roots. 8 Lee and Liang constructed 14 basic equations of inverse kinematics, used low-dimensional ideas to simplify the multivariate nonlinear equations into one-dimensional 16-degree equations, and finally obtained 16 exact solutions of inverse kinematics. The inversion process is very complicated. 9,10 Xu et al. proposed an analytic algorithm for the kinematics inverse algorithm for the palletizing robotics. This algorithm has practicality to a certain extent, but it always has a problem that the attitude corresponds to multiple analytical results, and the unique solution cannot be determined. 11 Wang et al. used a damped least-squares method to solve the inverse solution of a seven revolute-joint (7 R) 6-DOF robot by comparing the 7 R 6-DOF robot with the equivalent 6 R robot, but an approximate solution was not considered. 12,13 Chu et al. proposed a Robotics kinematics inverse algorithm based on the reconfigurable method. Simultaneously, the simulation robotic arm was designed based on the algorithm. The practice shows that the robotic arm under the algorithm is very flexible, but the design process is too complicated. The number of iterations of the solution result is too many, so the actual algorithm is not efficient. 14 Hang and Savkin have proposed using competitive neural networks to solve the inverse kinematics problem of robotics using mechanical arm grabbing, but they are limited to specific robotics, and they are not implemented in the actual algorithm verification. 15 Amici and Cappellini obtained an inverse solution through the numerical inversion of a Jacobian matrix combined with a soft computing method, but its accuracy was low. 16 Yuan-Yuan and Wei proposed a simulated annealing algorithm and genetic algorithm that could calculate the inverse solution of a robot. This approach can achieve a certain accuracy but requires a large amount of calculation. 17 Zhi-jian and Jian-hua proposed a fast selection algorithm for analytical solutions based on the mathematical characteristics and motion continuity of the problem but did not consider singular problems. 18
Most of the above robot kinematics inverse solutions have convergence problems, and the iterative process is too complicated, which affects the efficiency and quality of the entire algorithm. 19,20 At the same time, in the actual application of collaborative robots, because of factors such as special configurations or limitations of the approach, the traditional inverse solution is low in accuracy and prone to problems such as singular configurations. To solve these problems, an algorithm combining a closed-form solution with a numerical solution was proposed, and the inverse kinematics equation of a 6-DOF collaborative robot was constructed. To further reduce the computational complexity of joint quantization, this study introduces the Newton–Raphson iteration method to obtain optimal inverse kinematic solutions. To evaluate this approach, simulations and trajectory planning experiments were conducted, demonstrating its significant advantages compared to traditional inverse kinematics algorithms. The combined algorithm has faster solution and stability under higher precision and is not limited by the configuration of the manipulator; therefore, it can effectively solve the problem of inverse kinematics solution of the 6-DOF collaborative robot.
Forward kinematics analysis
A collaborative 6-DOF lightweight handling robot with a 3 kg load was designed. The structure of the robot was designed to be modular. Depending on the joints, the robot was divided into six modules, and the kinematic pair of each module was a rotary axis. The joints are divided into two categories, joints 1, 2, and 3, which are used for large motions and to determine the location of the claw, and smaller joints 4, 5, and 6 with mounting holes reserved at the end, which are utilized to determine the posture of the claw. A three-dimensional model of 6-DOF collaborative robot is shown in Figure 1.

6-DOF collaborative robot.
The inverse kinematics solution of the robot is based on the forward kinematics solution, and the position and orientation of the end are obtained by the forward solution, which is used as the input to calculate the inverse solution. 21 According to the structural parameters and dimensions of the 6-DOF lightweight collaborative robot, the Denavit–Hartenberg (D-H) parameter method 22 was used to establish the six-axis space coordinate system of the robot. The D-H model of the robot is shown in Figure 2, and its parameters are listed in Table 1.

D-H model.
Link parameters of 6-DOF collaborative robot.
6-DOF: six-degrees-of-freedom
The transformation matrix A i between two adjacent connecting rods is obtained according to the translation and rotation theory of the space coordinate system
In equation (1), cθi = cosθi , sθi = sinθi , cαi = cosαi , and sαi = sinαi .
The 6-DOF lightweight collaborative robot is connected to a flange at the base to fix the gripper. Hence, the homogeneous pose transformation matrix of the end gripper relative to the base coordinate system is expressed as follows
Based on the differential transformation method and the differential mapping relation between the Cartesian space and joint space, the Jacobian matrix
A singular configuration can be identified based on whether the determinant of the Jacobian matrix is zero. The determinant of the Jacobian matrix is
Equation (4) reveals that a singular configuration of the robot has no relationship with joints 1 and 6. Given the configuration of the robot, it is clear that joints 1 and 6 do not cause a singular configuration during a practical grasping task. Because of the chain coupling structure of the robot, the determinant of the Jacobian matrix is very complicated. The singular configurations that occur when
Inverse kinematics analysis
Inverse kinematics modelling
The inverse kinematics problem of a robot involves solving the angle of each joint of the robot when the position and orientation of the end-effector are given. Its solution enables the robot to realize kinematic simulation and trajectory planning. 23 Because the inverse solution of the collaborative robot is difficult to obtain, the inverse kinematics model is analyzed using a combination of a closed-form solution and numerical solution. The Manocha elimination method was used to determine the forward kinematics, and the key matrix of the inverse kinematics was obtained using singular value decomposition (SVD) and the Newton–Raphson iteration method. The key matrix is converted into a numerical matrix with the link parameters.
First, according to the homogeneous transformation matrix,
In equation (5), Q(i, j) and R(i, j) represent the elements in row i and column j of matrices Q and R, respectively, where i and j = 1, 2,…, 4.
The elements Q(i, j) and R(i, j) are regarded as functions of the joint variable θ i, namely,
In equation (6), the elements in the third and fourth columns on both sides are independent with θ
6, and the corresponding elements in the third column of matrices Q and R are equal. Both sides were obtained by multiplying by the orthogonal symmetric matrix and adding
In equation (7),
The corresponding elements in column 4 are equal and can be obtained in the same manner
In equation (8),
Vector P is used to represent matrix in equation (7), and vector L is used to represent matrix in equation (8). Fourteen linear independent equations are obtained from P, L, P·P, P·L, P×L, and (P·P)L−(2P·L)P, namely,
The above 14 equations are simplified as follows
In equation (10),
Using the Manocha elimination method, we have
Substituting this into equation (10), s
3 and c
3 of
In equation (12)
Moreover,
Inverse kinematics solution based on closed solution and numerical solution
The inverse kinematics equation expressed in matrix form is used for the symbolic operation, and the specific steps are as follows:
The solution process is illustrated in Figure 3. Considering that several link parameters of the cooperative robot are zero, many elements of the symbol matrix are zero. Using the known link parameters to eliminate the unknown parameters, the sign matrices for

Solution flowchart.
Parameters x
3, x
4, and x
5 can be solved after the key matrices are obtained using the closed-form and numerical methods. To avoid the effect of the cumulative error of floating-point calculations on the accuracy of the solution, the matrix decomposition method is adopted to ensure the accuracy of the solution. When
In equation (15), I and 0 represent the 12 ×12 identity and zero matrices, respectively.
The eigenvalue of M is the solution of x 3, and the corresponding eigenvector V is expressed as follows
Parameters x 3, x 4, and x 5 are solved using eigenvector V, and θ 3, θ 4, and θ 5 are subsequently solved. Next, θ 1 and θ 2 are solved using the matrix eigenvalue decomposition method. Finally, the joint angle θ 6 was obtained.
There is a sizable number of matrix operations during the calculation, and to meet the required accuracy, an eigenvector V with a larger absolute value is selected to solve θ
4 and θ
5 to reduce the influence of cumulative errors in the floating-point calculations. When
By choosing a larger eigenvector, the overall calculation process is guaranteed to be stable, and the cumulative errors in the calculation process can also be reduced.
Inverse kinematics verification
The effectiveness of the algorithm was verified on a computer configured with AMD Ryzen 7 5800 H with Radeon Graphics 3.20 GHz, 16.0 GB RAM and Windows 10 Professional operating system based on the parameters of each link of the robot and the pose matrix of the end point shown in equation (19). The abovementioned algorithms were implemented using Visual Studio 2019. Because there is no mathematical function library for matrix operations in C++, the MATLAB C++mathematical function library is called and the static link libraries are set in Visual C++. Thus, relevant functions can be called to calculate the matrix, thereby improving the efficiency of development. Combining the Newton–Raphson iterative algorithm, eight sets of inverse solutions for the robot were obtained, as shown in Table 2
Solution for the inverse kinematics of the eight groups.
In previous studies, some scholars used pose errors to establish fitness functions
Inverse kinematics solution time for three methods.
According to the data in Table 2, the inverse kinematics solution of the robot obtained using the elimination method is accurate to eight decimal places, which satisfies the positioning accuracy requirements of the robot.
The average solution time based on the improved fitness function combination method is 4 ms, and the average solution time of the original method is 32 ms. The hybrid programming approach of MATLAB and Visual C++ was used in this study, with an average computation time of 1.548 ms. The combination method exhibited a solution speed approximately 2.5 times faster than the method previously proposed in literature. When the inverse kinematics algorithm meets the accuracy requirements, the solution time is less than 4 ms, which meets the requirements for real-time inverse kinematics solution of the control system of the collaborative robot to realize grasping and sorting materials.
Experimental analysis of trajectory planning
The algorithm was employed in our 6 R-robot prototype to further verify the correctness and feasibility of the algorithm in the control of the robot moving along a predetermined trajectory. The experimental platform was set up as shown in Figure 4 and includes the robot body, control cabinet, laser tracker, target ball, and PC.

Experimental platform for trajectory planning.
The arc track of the grasping workpiece was considered as an example. First, the trajectory curve of the task space was planned and discretized, the number of space interpolation points was set to 100, and three points in any space were selected, as listed in Table 4. Second, the robot was instructed to execute arc interpolation planning using the inverse kinematics algorithm. The trajectory curve of the robot’s gripper was determined using a laser tracker to record the sample points every 300 ms, and the obtained coordinate points were sent to MATLAB. The actual and theoretical trajectories are compared in Figure 5.
Arbitrary space coordinates of three points.

Comparison of the actual and theoretical trajectories.
The actual trajectory had certain errors with respect to the theoretical trajectory. These errors were affected by the robot’s manufacturing accuracy, motion control accuracy, and how well the PID parameters are matched. Nevertheless, the maximum error is 2.459 mm, which meets the requirements of the robot’s trajectory planning in grasping-task scenarios.
Conclusion
In this study, an inverse kinematics algorithm that combines a closed-form solution and a numerical solution was proposed. The SVD based on the Manocha elimination method was used to solve the inverse matrix to avoid singularities in the Jacobian matrix. The Newton–Raphson iterative method was used to obtain the optimal solution of the inverse kinematics, which improved the accuracy of the solution.
The trajectory planning experiments showed that the resultant trajectory was smooth and the motion was stable during grasping tasks, which verifies that inverse kinematics modelling is reasonable and feasible. The algorithm has high solving accuracy, which can satisfy the requirements for smooth robot motion.
This study provides a theoretical basis for inverse kinematics solutions of series-coupled structure robots based on a combination of closed-form and numerical methods.
Footnotes
Data availability
The data supporting the findings of this study are included in this article.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research was supported by the General Project of the Beijing Municipal Education Commission (Grant Number KM201810017003).
