A Solution of the Inverse Kinematics Problem for a 7-Degrees-of-Freedom Serial Redundant Manipulator Using Gröbner Bases Theory

,is article presents a solution of the inverse kinematics problem of 7-degrees-of-freedom serial redundant manipulators. A 7degrees-of-freedom (7-DoF) redundant manipulator can avoid obstacles and thus improve operational performance. However, its inverse kinematics is difficult to solve since it has one more DoF than that necessary for reaching the whole workspace, which causes infinite solutions. In this article, Gröbner bases theory is proposed to solve the inverse kinematics. First, the Denavit–Hartenberg model for the manipulator is established. Second, different joint configurations are obtained using Gröbner bases theory. All solutions are confirmed with the aid of algebraic computing software, confirming that this method is accurate and easy to be implemented.


Introduction
Two well-known classic problems in the kinematics of robotic manipulators are forward and inverse kinematics. e solution of the forward kinematic problem is independent of the geometry of the robot. e same does not occur with the inverse kinematics problem since the procedure to obtain the equations depends exclusively on the geometric configuration of the robotic manipulator.
is limitation makes this problem much more complicated due to the difficulty in finding a sequence of steps that facilitate resolution.
Denavit and Hartenberg [1] presented a convention to standardize the reference coordinate systems for spatial links; after ten years, the same authors developed the algorithm for solving the forward and inverse kinematics problems of articulated systems [2]. e importance of this algorithm for the kinematics analysis of robotic manipulators was presented by Paul [3] sixteen years after.
According to Sciavicco and Siciliano [4], when inverse kinematics is solved from the homogeneous transformation matrix, the following issues can be encountered: the need for additional methods and algorithms to solve the problem and the complexity of matrix calculations, which require more considerable computational efforts. An alternative method for the solution of inverse kinematics will be used in this article, namely, Gröbner bases theory.
e Gröbner bases theory 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 [5]. When finding solutions for this set of generators, those are also solutions for the whole set. With the help of algebraic computing software, all these solutions can be calculated, including cases which are not so easily solved using matrix algebra or geometric applications due to the complexity of the geometry of some manipulator robots.
An analysis of computational efficiency in the solution of the inverse kinematics problem of an anthropomorphic robot can be obtained in a previous publication [6]. Two approaches were investigated: the first approach used Paul's method and the second approach used Gröbner bases theory. Based on the computational performance data obtained, Gröbner bases theory is more efficient than Paul's method for solving the inverse kinematics of 6-degrees-offreedom anthropomorphic robots.
However, the present work intends to go further. It brings an efficient procedure to solve the inverse kinematic problem of a 7-DoF serial redundant manipulator using Gröbner bases theory.
A 7-DoF redundant manipulator has one more degree of freedom than that necessary for achieving a position and orientation of the robotic manipulator end effector. is extra DoF can be used to improve operational performance, such as avoid obstacles and prevent joint limits. Meanwhile, their inverse kinematics solution is challenging because of the extra degree of freedom, which causes infinite solutions.
Tolani et al. [7] presented a set of inverse kinematic realtime algorithms for a 7-DoF nonoffset serial arm. e authors presented a work using joint limit avoidance as a primary strategy for redundancy resolution, and two algorithms were introduced to address the inverse kinematics problem of under-constrained orientation and aiming, based on numerical approaches.
Kuhlemann et al. [8] presented a robust inverse kinematics algorithm that controls the manipulator elbow redundancy. eir work, however, only addresses the inverse kinematic computation and does not allude to joint limit avoidance methods.
With the development of intelligent algorithms, genetic algorithms and neural networks are used to solve the inverse kinematics of redundant manipulators. However, these two algorithms are complex and require many calculations, which is hard to implement in real-time systems. Furthermore, it is not possible to guarantee calculation accuracy. e main goal of this article is to solve the problem of the inverse kinematics of redundant manipulators using Gröbner bases theory, which will demonstrate that the proposed method is precise and computationally efficient.

Gröbner Bases Theory
e 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 [6].
According to Cox et al. [9], 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.
According to Sturmfels [10], a Gröbner basis can be computed so that the polynomials have a property known as the elimination property. is elimination property makes the computation of solutions of a polynomial system, which is a Gröbner basis to be mathematically efficient. rough retroactive substitutions, a solution can be found for the remaining set of variables.
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.
Buchberger's algorithm receives as input a finite set F � f 1 , f 2 , . . . , f n of polynomials and provides a set G, which is a Gröbner basis of F. is algorithm is shown in Figure 2.
e combination S(f, g) � L/lt(f)f − L/lt(g)g is called the S-polynomial of f and g, where (lt) stands for the leading term of each polynomial, and L � lcm(lp(f), lp(g)), the least common multiple among the leading power products (lp) of polynomials.
is algorithm computes successive truncated Gröbner bases, and it replaces the classical polynomial reduction found in Buchberger's algorithm by the simultaneous reduction of several polynomials.
In the present article, the Gröbner bases were computed on an extension of the field of rational numbers, namely, the rational numbers with specific square roots included. is procedure is run automatically by the software MAPLE when square roots are written in the input. erefore, the approximation is made only in the final evaluation of solutions, so the Gröbner bases computation does not get Buchberger's algorithm Gröbner basis Figure 1: Input and output of Buchberger's algorithm [6].
Output: G = GB (F). affected. Ten decimals were used in the approximation of the final solution.
With the aid 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, e.g., MAPLE, Singular, AXIOM, muMath, Macaulay, Mathematica, Reduce, and CoCoA.

The Denavit-Hartenberg Model of a 7-Degrees-of-Freedom Redundant Manipulator
e LBR iiwa 7 R800 from KUKA AG is an example of a robotic manipulator with 7-DoF and having only rotary joints, i.e., it is a 7R redundant manipulator. is redundant manipulator is shown in Figure 3, with its seven frames attached to the links.
For a kinematic chain with n joints and n − 1 links, each joint is assigned with a coordinate system (x, y, z). Each coordinate system can be aligned through a series of rotations and translations. us, each joint may be represented by a homogeneous transformation matrix that describes the specific rotation or translation required to align the joint i − 1 with the joint i, which can be the combination of a rotation and a translation matrix. e product of these matrices determines the final position of the n th joint, which represents the end effector of the robotic manipulator.
A homogeneous matrix (1) is used to describe the direction vectors for the axes x 2 , y 2 , and z 2 and a reference system 2 { } in terms of the direction vectors for the axes x 1 , y 1 , and z 1 of a reference system 1 { }: n y o y a y y n z o z a z z e two coordinate systems are represented in Figure 4. Transformation operators (rotation and translation) are used to align frames. A mn represents the homogeneous transformation matrix that relates points in the reference system n to the reference system m. In this way, A 0n � A 01 · A 12 · A 23 · . . . · A (n− 1)n . A Cartesian coordinate system must be assigned to each joint of the manipulator robot so that each connected link is assigned with a specific coordinate axis. Each coordinate system is determined based on the following rules: the z k− 1 axis lies along the axis of motion (rotation or translation) of the joint k; the x k axis is perpendicular to the z k− 1 axis, with its positive direction being towards the z k axis direction, and the y k axis is chosen so that the three axes form an orthogonal system satisfying the right-hand rule [13]. e four parameters a k , d k , α k , and θ k shown in Figure 5 represent a k , the distance along x k , from the origin O k to the intersection of the axes x k and z k− 1 , d k , the distance along z k− 1 , from O k− 1 to the intersection of the axes x k and z k− 1 , α k , the angle of the z k− 1 axis towards the z k axis, measured around the x k , and θ k , the angle of the x k− 1 axis towards the x k axis, measured around the z k− 1 axis (signal obtained by the right-hand rule). Joint 5 x 0 Figure 3: Establishing coordinate frames for the Kuka LBR iiwa 7 R800. Figure 4: Two coordinate frames displaced in the same threedimensional space.
According to Tsai [15], in the representation of Denavit-Hartenberg, each matrix is given by the product of four fundamental transformations involving rotations (R) and translations (Tr), as can be observed in (2). We use s θ k for sin(θ k ) and c θ k for cos(θ k ): e term R z k ,θ k represents the rotation θ k around the z k axis, Tr z k ,d k is the translation d k along the z k axis, Tr x k ,a k is the translation a k along the x k axis, and, finally, R x k ,α k represents the rotation α k around the x k axis.
is operation results in the matrix represented by (3). is matrix defines the mapping of coordinates between two consecutive manipulator links of the robot: Two of the four parameters used as a reference have a direct relationship with the component of the joint variables. For rotational joints, the joint variable is the angle θ k , while the joint variable is the distance between the links d k if it is prismatic. ese parameters are obtained from the algorithm proposed by Denavit and Hartenberg. By multiplying all the transformation matrices obtained by the Denavit-Hartenberg algorithm, we obtain the homogeneous transformation matrix that goes from the base to the end effector, that is, by varying k from 0 to n. is resulting matrix can be considered as the solution to the forward kinematics problem. Briefly, for a manipulator with n degrees of freedom, where each matrix A ij is a Denavit-Hartenberg matrix, defined in (3). All Denavit-Hartenberg parameters of this manipulator are listed in Table 1, where i represents the joint number.
After constructing all the transformation matrices (5) to (11) using the Denavit-Hartenberg parameters and multiplying them (12), we obtain the homogeneous transformation matrix (13), solution of the 7-DoF redundant manipulator forward kinematics problem. We now use s k for sin(θ k ) and c k for cos(θ k ):   Mathematical Problems in Engineering T � n x o x a x x n y o y a y y n z o z a z z where the entries of T are given by x � For the solution of inverse kinematics of a robotic manipulator with seven degrees of freedom, we have 12 equations and seven unknowns. However, among the nine equations that arise from the portion of the rotational matrix of T, only three are independent. ese added to the equations of the portion of the position vector of T, which results in six equations with seven unknowns. Such equations are nonlinear and transcendental, which can be quite tricky to solve.

Mathematical Problems in Engineering
According to Ghosal [16], in a redundant manipulator, the number of joint variables will always be higher than the number of equations.
For three-dimensional space, six variables can describe the position and orientation of the robotic manipulator end effector. erefore, a manipulator with six degrees of freedom can reach any given joints configuration in its working space. However, this kind of manipulator cannot reach a given pose if its link paths have obstacles or fail to realize a desired directional motion if its end effector is close to the singularity.

Inverse Kinematics Using Gröbner
Bases Theory e inverse kinematics problem consists of finding all combinations of joint configurations that will position the end effector of a robot at a given point in space [17]. 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.
Performing 5191 floating-point operations (169 additions, 606 multiplications, and 552 functions), four different joint configurations are obtained, as shown in Table 2.
e set of angles designated in this section can be seen in line 2 of Table 2. e corresponding postures for the four inverse kinematic solutions are shown in Figure 6. Adding

Mathematical Problems in Engineering
To confirm the computational efficiency for the solution of the inverse kinematics of 7-degrees-of-freedom serial redundant manipulators using Gröbner bases theory, a new configuration of joints will be analyzed. To meet this goal, they are replaced arbitrarily, and the following joint values, θ � [(π/6), 0, π, − (π/6), (π/3), − (π/3), (π/6)] radians, and the nonzero parameters, d 1 � 380, d 3 � 328, d 5 � 323, and d 7 � 80, were replaced in (12), thus obtaining From this point, equations (14) to (25) are rewritten by substituting n x , n y , n z , o x , o y , o z , a x , a y , a z , x, y, and z by the respective values of obtained numerical matrix, which exactly equals to matrix (47). All these 12 polynomials, added to the seven polynomials obtained from the fundamental trigonometric relation for each joint variable, are used to generate a Gröbner basis. Precisely, as in the previous configuration, the lexicographic order c 7 ≻s 7 ≻c 6 ≻s 6 ≻c 5 ≻ s 5 ≻c 4 ≻s 4 ≻c 3 ≻s 3 ≻c 2 ≻s 2 ≻c 1 ≻s 1 was also selected for this robot.
Performing 14089 floating-point operations (408 additions, 2161 multiplications, and 1440 functions), twelve different joint configurations are obtained, as can be seen in Table 3. e set of angles designated can be seen in line 5 of Table 3 One notes that the solve command is not used directly to solve the inverse kinematics problem, since it does not involve the Gröbner bases theory in its algorithms. Besides that, the solution is obtained not only by computing the Gröbner basis but also by applying the solve command. For instance, the variables s k and c k were assigned for sin(θ k ) and for cos(θ k ), new polynomials were included in the computation of the basis (related to the fundamental trigonometric relation), and a monomial order was chosen.

Conclusions
When using the Gröbner bases theory for the solution of inverse kinematics of 7-degrees-of-freedom serial redundant manipulators, one notes in the tests performed during this research that it is computationally efficient since the equations produced for determination of seven variables are mathematically simpler to be solved. Since through retroactive substitutions, all solutions can be determined to position and orient the robotic manipulator end effector in space.
e original equations that model the inverse kinematics of these manipulators cannot be solved at once using the solve command in MAPLE. Hence, in order to produce a new set of equations, Gröbner bases theory is studied. e choice of the monomial order in the Gröbner bases enables the solve command to compute the solutions of this problem with these new equations.
In the future work, it is intended to demonstrate that this method can also be computationally efficient when compared to other methods for solving the inverse kinematic problem of other classes of robotic manipulators, e.g., hyperredundant robots.
All solutions are confirmed with the aid of MAPLE, confirming that this method is accurate and easy to implement.

Data Availability
e MAPLE source code data used to support the findings of this study are available from the corresponding author upon request.  Mathematical Problems in Engineering 13