Abstract
This article presents an analysis of computational efficiency to solve the inverse kinematics problem of anthropomorphic robots. Two approaches are investigated: the first approach uses Paul’s method applied to the matrix obtained by the Denavit–Hartenberg algorithm and the second approach uses Gröbner bases theory. With each approach, the problem of inverse kinematics for an anthropomorphic robot will be solved. When comparing each method, this article will demonstrate that the method using Gröbner bases theory is more computationally efficient.
Keywords
Introduction
Two classic problems in the kinematics of robotic manipulators are forward kinematics (FK) and inverse kinematics (IK). In FK, the position and orientation of the end-effector are calculated from the joint variables. In the IK, the movements of individual joints are calculated from the position and orientation of the end-effector of a robotic manipulator.
According to Daya et al., 1 one of the biggest problems in kinematics and robot control lies in determining the solution of IK. Still, according to the same authors, as the complexity of the robotic manipulator increases, obtaining the IK is difficult and computationally expensive. Traditional methods, such as geometric, iterative, and algebraic, are inadequate as the geometric structure of the manipulator becomes more complicated.
Paul et al. 2 used matrix algebra to obtain a solution to the IK problem of a specific manipulator robot. Lee 3 and Yih and Youm 4 used a geometric approach to solve this problem. Subsequently, Huang and Milenkovic 5 and Manseur and Doty 6 developed iterative procedures to solve the IK problem.
Denavit and Hartenberg 7 introduced a convention to standardize the reference coordinate systems for spatial links; after a decade, the same authors presented an algorithm for solving the kinematics problems of articulated systems. 8 The importance of this algorithm for the kinematics analysis of robotic systems was studied by Paul 9 16 years ago.
An alternative method for the solution of IK will be used in this article, namely the Gröbner bases theory. The computational performance data obtained in this article will prove that this choice will reduce the computational cost for the solution of the IK problem of serial robotic manipulators compared to Paul’s method.
The Gröbner bases theory, developed by Bruno Buchberger in his PhD thesis, consists of an algebraic algorithm that can be applied to a given set of nonzero polynomials, producing a finite set of generators, so that it is possible to identify from these generators when a specific polynomial belongs to the original given set. 10 When finding solutions for this set of generators, those are also solutions for the whole set. With the aid of MAPLE, an algebraic computing software, all these solutions can be calculated, including cases not so easily solved using matrix algebra or geometric applications due to the complexity of the geometry of some manipulator robots.
Kendricks, 11 in her PhD thesis, compared the algorithm of Denavit and Hartenberg with Gröbner bases theory for the solution of the IK problem. Her analysis focused on the robot Fanuc A-510, a SCARA type robot, with three degrees of freedom.
To familiarize the reader with each method, the anthropomorphic robot Unimation PUMA 560, a manipulator with six rotary joints, will be used as a case study applying Paul’s method from the Denavit–Hartenberg matrix and the method proposed in this work to solve the IK problem. The main goal of this article is to analyze the computational efficiency in solving the problem of the IK of anthropomorphic robots using both methods.
Guzmán-Giménez et al. 12 presented a systematic procedure for the solution of IK problem of nonredundant open-chain robotic systems using Gröbner bases theory after solving the FK from the Denavit–Hartenberg algorithm; however, it is worth mentioning that the authors restricted themselves to the first three joints of the anthropomorphic robot Unimation PUMA 560.
Ni and Wu 13 presented an algorithm to solve the IK of a generic 6R robot based on matrix employing quaternions as spatial operators and the Gröbner bases theory. Through the algorithm presented by the authors, 16 different solutions are determined, but, among these, only four solutions are real. As this method is not compared to any other, its computational efficiency could not be confirmed.
Unlike Wang et al., 14 who also presented a solution for the IK of a 6R serial manipulator using Gröbner bases theory, a base with a reduced number of polynomials will be determined in this article, since these authors, using the solution method of the kinematics of mechanisms proposed by Duffy and Crane, 15 produced a Gröbner basis with 72 polynomials. With a reduced number of polynomials, which will be presented in this article, this base will increase the computational efficiency of the calculations to obtain all the joint configurations.
El-Sherbiny et al. 16 presented a comparative study between different soft-computing-based methods (artificial neural network, adaptive neuro-fuzzy inference system, and genetic algorithms) applied to the problem of IK. Their analysis focused on a serial manipulator with five degrees of freedom, and the results of the analysis demonstrate that the methods are not accurate and computationally efficient at the same time. The choice of method depends on the application, being necessary to decide which one has more priority, the calculation time or the accuracy.
However, the present work intends to go further. It brings an analysis of the computational efficiency in the solution of the IK problem of a serial manipulator with six degrees of freedom using Gröbner bases theory. The obtained results will be compared with those obtained by Paul’s method from the matrix obtained by the Denavit–Hartenberg algorithm, demonstrating that the Gröbner bases theory method is more computationally efficient and that the solutions obtained from this method are accurate.
Gröbner bases theory
The core of Gröbner bases theory is an algorithm used to solve systems of polynomial equations. It is known as Buchberger’s algorithm and applies computational algebra techniques to polynomial ideals, producing a so-called Gröbner basis, a new polynomial set.
Briefly, a Gröbner basis for a polynomial equation system is a new collection of polynomials in which the null set coincides with the solution set of the original system; however, this new system is simpler to solve. This definition justifies the choice of Gröbner bases theory to solve the IK of serial manipulators with the reduction of computational cost.
Gröbner bases theory is widely applied in other areas besides mathematics. For example, Cox et al. 17 have dedicated their work to the applications of Gröbner bases theory in geometry, graph theory, and robotics.
According to Sturmfels, 18 a Gröbner basis can be computed in order that the polynomials have a property known as the elimination property. This elimination property makes the computation of solutions of a polynomial system, which is a Gröbner basis to be mathematically efficient because, through retroactive substitutions, a solution can be found for the remaining set of variables, with a reduction in the number of floating-point operations.
For polynomials with several variables, the complexity for the determination of a Gröbner basis depends not only on the number of polynomials in the set but also on how their terms are ordered. The lexicographic order is particularly suitable for solving systems of polynomial equations. In a lexicographic order, a variable dominates any monomial involving only minor variables, regardless of the total degree. For example, for the lexicographic order
It can be seen in Figure 1 that all variables can be solved consecutively because the obtained Gröbner basis is a triangular equation system.

Input and output of Buchberger’s algorithm.
In some cases, one chooses to consider the total degree of a monomial and to order the monomials of larger degrees first. In this specific case, the graduated lexicographical order (grlex) is used. Another order is given by the reverse graduated lexicographic order (grevlex), which is commonly used because it generally provides the basis more quickly due to a reduction in computational cost.
Buchberger’s algorithm constructs a Gröbner basis starting from a finite set of polynomials. According to Cox et al., 17 to develop Buchberger’s algorithm, it is necessary to understand the nature of S-polynomials.
Let f and g be two nonzero polynomials and consider
As an example,
Note that the S-polynomial is produced to cancel the leading terms of the polynomials involved. The Buchberger’s algorithm receives as input a finite set
Algorithm for computing Gröbner bases.
Faugère 20 presented an efficient algorithm for computing Gröbner bases: the F4 algorithm. This algorithm computes successive truncated Gröbner bases, and it replaces the classical polynomial reduction found in the Buchberger’s algorithm by the simultaneous reduction of several polynomials. This powerful reduction mechanism utilizes symbolic precomputation and sparse linear algebra methods.
With the help of algebraic computing software, a Gröbner basis can be calculated more quickly. Many algebraic computing systems include packages to deal with Gröbner bases, for example, MAPLE, Singular, muMath, AXIOM, Mathematica, Macaulay, CoCoA, and Reduce.
Inverse kinematics using Paul’s method
The PUMA 560 is a robotic manipulator with six degrees of freedom and has only rotary joints, that is, it is a 6R mechanism. According to Ghosal, 21 PUMA 560 is a robotic manipulator extensively seen in textbooks, industry, and academic and research institutions.
The PUMA 560 is shown in Figure 2, with its six frames attached to the links.

Establishing coordinate frames for the Puma 560. Source: Adapted from Chakravarti and Sivakumar. 22
It can be seen that the reference system
According to Craig,
23
to determine a general transformation matrix T for the solution of the FK of the Puma 560 manipulator, it is necessary to construct a transformation that defines the system
Initially, three intermediate frames

Location of intermediate frames
Thus
It is used
All Denavit–Hartenberg parameters of this manipulator are listed in Table 1, where i represents the joint number.
Denavit–Hartenberg parameters of Puma 560.
After constructing all six transformation matrices using the Denavit–Hartenberg parameters and multiplying them (5), the homogeneous transformation matrix (6) is obtained
where the entries of T are given by
It is used
According to Craig,
23
for the solution of IK of a robotic manipulator with six degrees of freedom, there are 12 equations and 6 unknowns. However, among the nine equations that arise from the portion of the rotational matrix of
The systematic approach to solve kinematic equations, proposed by Paul, 9 rewrites FK equations in several different ways. Thus, both sides of the FK matrix equation are left and right multiplied by inverse transformation matrices. In doing so, one gets equivalent equations having the same solutions. Each matrix equation provides 12 nonlinear equations from the three main matrix lines. The fourth line of the matrix is always trivial. The main problem is to find, in this universe, suitable equations that can be solved analytically.
The solution of IK of this robotic manipulator, as determined by Craig, 23 is given by equations to
All the equations of the FK and IK of the PUMA 560 manipulator were deduced in detail by Craig 23 and Ghosal. 21
The tree structure in Figure 4 represents the order of computations to determine all eight joint configurations of the PUMA 560.

Echelon form of the eight inverse kinematics configurations of PUMA 560.
To measure the computational cost to determine all joint configurations to position and orient the end-effector arbitrarily in the space, the following joint values:
From this point, equations (7) to (18) have been rewritten by substituting nx, ny, nz, ox, oy, oz, ax, ay, az, x, y, and z by the respective values of the obtained numerical matrix.
The Solve command in MAPLE is used to find all the values of
Performing 34,514 floating-point operations (2409 additions, 4261 multiplications, 175 divisions, and 3393 functions), eight different joint configurations are obtained, as given in Table 2.
Joint configurations of the Puma 560, determined through Paul’s method.
This article will prove that using Gröbner bases theory, the computational cost to determine the solution of the IK of serial manipulators is considerably reduced.
Inverse kinematics using Gröbner bases theory
The IK problem consists of finding all combinations of joint configurations that will position the end-effector of a robot at a given point in space. 23 To solve this problem, one must determine polynomial equations that model the movement of the robotic arm in each joint configuration. With all these elements, one must seek a set of solutions from the possible movements of each joint.
The joint values are set to
From this point, equations (7) to (18) are rewritten by substituting nx, ny, nz, ox, oy, oz, ax, ay, az, x, y, and z by the respective values of the matrix (27). These 12 polynomials, added to the six polynomials obtained from the fundamental trigonometric relation for each joint angle, are used to generate a Gröbner basis.
The selected lexicographic order for this robot is the one shown in equation (28). This order represents the same sequence in which the variables were solved while applying Paul’s method presented in the third section
The same values assigned in the third section are used, intending to compare the computational efficiency to solve the IK problem using Paul’s method from the Denavit–Hartenberg matrix and Gröbner bases theory of the same 6R manipulator.
Performing 466 floating-point operations (46 additions, 100 multiplications, and 40 functions), the following Gröbner basis consisting of 12 polynomials is obtained using Faugère’s F4 algorithm 20
It is worth noting that this reduced number of polynomials, compared to the 72 polynomials found by Wang et al., 14 will positively reflect on the computational efficiency for the IK solution of a 6R serial manipulator.
To determine all the values of
Joint configurations of the Puma 560, obtained through Gröbner bases theory.
It is worth noting that all the equations presented in the third section, using Paul’s method to solve the IK of the PUMA 560 manipulator, were calculated using the computer algebra system MAPLE performing 34,514 floating-point operations to determine the eight different configurations, as given in Table 2.
Adding the 466 floating-point operations to obtain the Gröbner basis to the number of floating-point operations to obtain the eight different joint configurations through the generated Gröbner basis (954 flop), 1420 floating-point operations are obtained. There was a reduction from 34,514 to 1420 in the number of floating-point operations performed to solve the IK problem for this set of configurations.
Performance analysis
To confirm the computational efficiency for the solution of the IK of anthropomorphic robotic manipulators using Gröbner bases theory, 19 new joint configurations will be analyzed. The following joint values are used:
Unlike the results presented by Guzmán-Giménez et al., 12 all joint configurations provide the same amount of solutions determined by Paul’s method. The two methods were simulated in MAPLE, testing their ability to solve the IK problem, and all the 100 solutions obtained for both methods were compared, testing their efficiency in solving.
Comparisons of the number of mathematical operations performed using the two methods are shown in Figure 5. The x-axis presents a partition of 20 sets used to determine 100 different configurations for the PUMA 560 using Paul’s method and Gröbner bases theory, while the y-axis shows the total number of operations performed on a logarithmic scale.

(a–d) Amount of operations performed using the two methods.
The performance comparisons of the two methods are shown in Figure 6. The x-axis presents a partition of 20 sets used to determine 100 different configurations for the PUMA 560 using both methods, while the y-axis shows the total number of floating-point operations on a logarithmic scale.

Performance comparisons of the two methods.
It was possible to observe in Figure 5 that there was a significant reduction in the number of mathematical operations to obtain all solutions using Gröbner bases theory. As expected, the number of floating-point operations is reduced, as shown in Figure 6.
The histogram of the RMS errors in the calculations of all six joint angles of the PUMA 560 manipulator in all analyzed configurations is shown in Figure 7. The x-axis presents a partition of 100 sets of the obtained root mean square (RMS) errors in ascending order, while the y-axis shows the frequency of occurrence of each of these error sets. The RMS error is approximately

Histogram of the RMS errors in the computations of all six joint angles of the PUMA 560. RMS: root mean square.
It can be verified in the histogram presented that most of the obtained RMS errors occur within the first sets, the ones that represent less error. It can also be seen that the higher sets still represent very insignificant errors. Figure 8 shows the simulation results of joint variable errors in all 100 configurations analyzed.

Simulation results of joint variables errors. (a) θ1, (b) θ2, (c) θ3, (d) θ4, (e) θ5, and (f) θ6.
The comparative analysis of IK solutions is shown in Figure 9. The red dots represent the angles obtained through Paul’s method for each joint, while the continuous blue lines represent the angles obtained through Gröbner bases theory. The data show that the outputs follow those obtained by Paul’s method with high accuracy and a negligible error.

Comparative analysis of inverse kinematics solutions (
The histograms of the RMS errors in the calculations of all positions and rotation angles of the end-effector of the PUMA 560 are shown in Figure 10. The x-axis presents a partition of 100 sets of the obtained RMS errors, while the y-axis shows the frequency of occurrence of each of these error sets. The RMS error obtained is

Histograms of the RMS errors in the computations of all positions and rotation angles of the end-effector. RMS: root mean square.
All the histograms presented (Figures 7 and 10) show that most of the obtained RMS errors occur within the first sets, the ones that represent less error. It can also be seen that the higher sets still represent a completely insignificant error.
Figure 11 shows the simulation results of positioning and orientation errors in all 100 configurations analyzed.

(a–f) Results of simulation of positioning and orientation errors.
The comparative analysis of FK solutions is shown in Figure 12. The green dots represent the x, y, and z coordinates of the points obtained from the angles determined through Paul’s method, while the solid orange lines represent the coordinates of the points obtained from the angles determined through Gröbner bases theory. The blue dots represent the rotation angles obtained from the angles determined through Paul’s method, while the solid red lines represent the rotation angles obtained from the angles determined through Gröbner bases theory. The data show that the results continue to maintain high accuracy and negligible error.

(a–f) Comparative analysis of forward kinematics solutions.
El-Sherbiny et al.
16
presented a comparative study between three different soft-computing-based methods (artificial neural network, adaptive neuro-fuzzy inference system, and genetic algorithms) applied to the problem of IK. The analysis results demonstrate that the methods are not accurate and computationally efficient at the same time. Using the artificial neural network method with a minimized error function and the adaptive neuro-fuzzy inference system method with the same function, the calculation time is quite similar. The difference is in the accuracy of the end-effector position and the angle of rotation. When the genetic algorithm method is used, the position error is very low, which is less than
It is worth mentioning that in this work, the RMS error obtained is
Open problem: Analysis of singularities
Stifter 19 presented an algorithm to solve the IK of a 2R robot using Gröbner bases theory. The author presented a brief list of subjects that were not yet fully resolved but that could play an essential role in applying Gröbner bases theory for solving the problem of IK. The question about the possibility of determining singular configurations using a Gröbner basis is highlighted in this list.
Kendricks 11 used a Gröbner basis to determine the occurrence of a singularity of the workspace boundary, configuration when the manipulator is fully extended to the outer boundary or fully retracted to the inner boundary of its workspace. Her analysis focused on the robot Fanuc A-510, a SCARA type robot with three degrees of freedom, analyzing the discriminant of quadratic polynomials on the Gröbner basis generated to solve the IK of this serial robot. In this case, the author determined intervals of angles that produce a single real solution, whose discriminants in the quadratic equations are equal to zero.
The anthropomorphic robot Unimation PUMA 560, used as a case study in this work, has the last three axes intersecting at a point. As a consequence, the position of the end-effector is only a function of
To check whether it is possible to determine from a Gröbner base whether there is a singularity, equations (41) to (43) are rewritten by substituting x, y, and z by the respective values of the matrix (27). These three polynomials, added to the three polynomials obtained from the fundamental trigonometric relation for each joint variable, are used to generate a Gröbner basis.
The selected lexicographic order for this robot is the one shown in equation (44). This order represents the same sequence in which the first three joint variables were solved while applying Paul’s method presented in the third section
The following Gröbner basis consisting of six polynomials is obtained using Faugère’s F4 algorithm 20
Note that the first element in the basis is a quadratic polynomial in terms of s1. By examining the discriminant of this equation, it can be observed that there will be no real solutions for s1, when
Moreover, by analyzing the discriminant of the third element in the basis, there will be no real solutions to s3 when
To obtain a quadratic polynomial in terms of s2, a new lexicographic order for this robot is used:
Note that the third element in the basis is a quadratic polynomial in terms of s2. By examining the discriminant of this equation, it can be observed that there will be no real solutions for s2, when
When it is possible to determine an analytical solution for the IK of a manipulator robot using Gröbner bases theory, given a point
However, it is essential to highlight that when all six joint variables are considered in the model, the 6R manipulator presents more than four solutions; however, the Gröbner bases method does not produce analytical solutions, thus requiring numerical methods to find the final solution. In many industry fields, the determination of all rotation angles of the end-effector is indispensable; thus, it justifies the importance of determining all joint angles of a robotic manipulator.
Furthermore, although it is possible to determine angular intervals that produce points that are external to the manipulator’s workspace, singularities such as boundary singularity or inner singularity remain to be further studied.
Conclusions
When using the Gröbner bases method for the solution of IK of anthropomorphic robots, one notes in the tests performed during this research that it is computationally more efficient than Paul’s method since the equations produced for determination of six variables are mathematically simpler to be solved. Since through retroactive substitutions, all joint solutions can be determined to precisely position and orient the robotic manipulator end-effector in space.
According to the performance data obtained (number of floating-point operations) in all the configurations analyzed, it can be stated that the method proposed in this work for the solution of IK of anthropomorphic robots is more efficient computationally than Paul’s method.
In future work, it is intended to demonstrate that this method can also be computationally efficient compared to the other methods for solving the IK problem of redundant manipulators.
Footnotes
Code availability
The MAPLE source code data used to support the findings of this study are available from the corresponding author upon request.
Data availability
The data that support the findings of this study are available from the corresponding author upon request.
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This study was supported in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior—Brasil (CAPES) (Finance Code 001).
