1. Introduction
The modeling and design of a robot’s control system begins with the resolution of its kinematic problem, which is divided into two parts: the computation of the robot’s Forward Kinematics and the synthesis of the Inverse Kinematic Model (IKM).
The robot’s Forward Kinematics is the equation system that calculates the position and orientation of a specific point of the robot’s structure according to the actual state of all its actuators. This point is normally an important point of its structure, such as the end effector of a robotic arm or the center of mass of a mobile robot. The Forward Kinematics is necessary for modeling the robot’s movements, and it is also important for the synthesis of the Inverse Kinematic Model (IKM).
The IKM function is to calculate the control references required by the robot’s actuators, so the robotic system can reach a desired position or follow a predetermined path. This makes the IKM a fundamental part of the robot’s control system, as presented in
Figure 1.
There are different procedures to compute the Forward Kinematics of an open-chain robotic system, which include Denavit–Hartenberg’s algorithm [
1,
2,
3], dual quaternions [
4,
5], and the modeling by Displacement Matrices [
6]. All these procedures calculate the Forward Kinematics through the execution of systematic algorithms, which are completely independent of the mechanical complexity of the robot’s structure or its geometry.
On the other hand, the Inverse Kinematic Problem of open-chain robotic systems presents a greater challenge because the most commonly used methods to calculate the IKM, the geometric method, and the analytical method strongly depend on the analyzed robot’s geometry and do not offer a systematic procedure for the synthesis of the desired model. The geometric method divides the analyzed robot Inverse Kinematic Problem into several plane geometry problems, and solves those problems using trigonometric relations [
3,
7]. It is obvious, by its own definition, that this method depends heavily on the geometry of the robot’s structure, and any sequence of steps used to calculate the IKM of a robotic system may not be valid for any other different structure.
The analytic method for the calculation of the IKM solves the state vector of the robot’s actuators in the equation system that defines the Forward Kinematics [
8,
9,
10]. The drawback of this method is that the aforementioned equation system is composed of nonlinear equations, which forbids the use of traditional matrix algebra procedures. Instead, individual relations inside the analyzed equation system must be found, relations that are specific for each case. This implies that the analytic method is also non-systematic because the relations found to calculate the IKM of a robot with a certain structure, may not be valid or suitable for a different robot.
All the problems presented before have prompted the development of several projects that use different artificial intelligence techniques to solve the Inverse Kinematic Problem, such as Neural Networks [
11,
12,
13], Particle Swarm Optimization (PSO) [
14], PSO-optimized Neural Networks [
15], Neuro-evolutionary Algorithms (combination of Neural Networks and Genetic Algorithms) [
16], and PSO variants [
17]. These techniques normally calculate satisfactory solutions for the Inverse Kinematic Problem (IKP), without having any problems with the geometry of the robot’s structure. However, it is important to clarify that, while these methods solve the IKP, they do not synthesize an Inverse Kinematic Model (IKM). This implies that the position references that are offered as output do not come from a differentiable function; therefore, these procedures are not capable of computing the speed or acceleration references for the robot’s actuators. In addition, these methods could suffer from the known training problems of artificial intelligence techniques, such as the over-fitting of Neural Networks and Genetic Algorithms.
Nowadays, several projects are being developed in the field of Robotics that use Groebner Basis theory [
18] to implement systematic methods that solve the Kinematic Problem, in a way that is independent of the geometry of the robot’s structure. Among these projects, the works of Kendricks [
19] and Wang et al. [
20] stand out, which solve the Inverse Kinematic Problem of robotic manipulators using Groebner Bases. Abbasnejad et al. [
21] use this theory for the kinematic analysis of cable-driven robots. Rameau et al. [
22] employ it to calculate the mobility conditions of several mechanisms that can be used in robotic arms or parallel robots. The works of Gan et al. [
23] and Huang et al. [
24] use Groebner Basis theory for the resolution of the Kinematic Problem of parallel robots, while Uchida et al. [
25] employ it to triangularize the kinematic constraint equations of closed-chain robotic systems.
Most of the aforementioned works employ Groebner Bases to solve their corresponding Kinematic Problems, proving that the full set of solutions can be obtained using this theory. However, they do not provide a procedure to synthesize a Kinematic Model that can be used in the control system of the robot (see
Figure 1).
This work objective is to use Groebner Basis theory to develop a systematic procedure for the synthesis of the IKM of non-redundant open-chain robotic systems. This procedure is explained in
Section 3 and was used to synthesize the IKMs of two robots: a PUMA manipulator and a walking hexapod.
Section 2 presents the calculation by traditional methods of the kinematic models of the two mentioned robots, which are later used as reference models in the performance analysis of the developed procedure.
Section 4 shows the procedure’s performance analysis, comparing the outputs of the IKMs synthesized in this project with those of the reference models. The possible future works that arise from this project are summarized in
Section 5. In addition, finally
Section 6 presents the conclusions of the obtained results and the final remarks of this work.
3. Procedure to Synthesize the IKM Using Groebner Basis
The developed procedure for the calculation of the IKM of non-redundant open-chain robotic systems is divided into six steps:
It is important to highlight that all these steps are only executed once, out of line, to synthesize the IKM before the robotic system is activated. Therefore, the execution time of these steps does not affect in any way the online computation time of the IKM.
3.1. First Step: Information Input
The procedure begins requesting all the relevant information about the analyzed robot. The user has to supply only two data: the Denavit–Hartenberg (D–H) parameters of the robot and the movement range of its actuators.
The first data, the D–H parameters, are necessary to solve the Forward Kinematics problem, which is a required step to calculate the Groebner Basis that will constitute the IKM. These parameters represent the fundamental information of any robotic system, so they are also indispensable for all traditional methods that solve the Kinematic Problem.
The robot actuators’ movement range is employed to eliminate all the solutions that are not reachable by the robotic system. This way, the IKM is able to discard those solutions that are out of the robot’s workspace.
3.2. Second Step: Forward Kinematics
The second step in the developed procedure is the robot’s Forward Kinematics calculation, using the D–H parameters that were provided in the first step. This calculation is done applying the Denavit–Hartenberg method [
1], so this part of the procedure is similar to the presented in
Section 2.1 for the traditional methods.
The result of this second step is the homogeneous transformation matrix (
) between the origin of the coordinate system in the robot’s base and the one in its end effector. Therefore, after applying the developed procedure to the PUMA robot presented in
Figure 3, the result of this step is the same homogeneous matrix presented in Equation (
1).
3.3. Third Step: Obtention of the Polynomial Equation System
Once the robot’s Forward Kinematics is calculated, the equations that relate the pose of the end effector with the robot’s state can be extracted from the homogeneous transformation matrix obtained in the second step. In this work, for simplicity, we are only interested in the position of the end effector, which is only a part of its pose. However, all the calculations made in the developed procedure can be also extended to the orientation, to complete the whole pose.
Continuing with the case of the PUMA robot, these equations are the ones presented in Equation (
19), which correspond to the first three elements of the fourth column of Equation (
1):
As it can be seen in Equation (
19), the final result obtained from the robot’s Forward Kinematics is a trigonometric equation system that establish the position of the end effector, and it is from this equation system that the calculation of the IKM begins.
The previous equation system is completed with the corresponding trigonometric identities of all the robot’s rotational degrees of freedom (DoFs), identities of the form . Then, all the trigonometric expressions are expanded, and variable substitutions of the form and are applied. This step’s objective is to obtain a polynomial equation system where the variables are either a pair sine-cosine of a rotational DoF ( and ), or directly the position value of a prismatic DoF ().
For the case of the PUMA robot, this step’s output is the trigonometric equation system presented in Equation (
20). In this equation system,
,
, and
are the three components of the position vector of the PUMA’s wrist (
), and they are input parameters. The six variables of Equation (
20) that should be solved are
,
,
,
,
, and
.
3.4. Fourth Step: Monomial Order Selection
The polynomials that integrate the equation system shown in Equation (
20) would constitute the generators of an Ideal that will be the starting point for the Groebner Basis calculation [
18]. It is important to highlight that any solution of the calculated Groebner Basis is also a solution of the Ideal, which translates in a solution of the original polynomial equation system [
26]. Therefore, the obtention of this basis simplifies greatly the calculation of the IKM.
A fundamental step in the calculation of the Groebner Basis is the selection of the monomial order because this order will establish the way in which the variables are calculated while solving the obtained basis. Different monomial orders will produce different bases, but it is important to remember that the solution of all these bases is the same solution of the initial Ideal [
26].
The main three types of monomial orderings used in Groebner Bases calculations are: Lexicographic Order (lex), Graded Lexicographic Order (grlex) and Graded Reverse Lexicographic Order (grevlex) [
26]. Between these three types of monomial orderings, the one that assures the existence of a simple analytical solution for the calculated basis is the lexicographic order (lex) because this order arranges the monomials following a strict ordering in which a variable always precedes those of lesser value in the order. This strict order guarantees that the obtained basis is a triangular equation system, whose variables can be solved one at a time. In this project, we are interested in finding analytical solutions for the Inverse Kinematic Problem, and therefore we selected the lex order as the type of monomial ordering used for the calculated Groebner Basis.
Continuing with our example of the PUMA 560, the selected lex order for this robot is the one shown in Equation (
21). This selected lex order represents the same order in which the variables were solved while applying the geometric method presented in
Section 2.2:
3.5. Fifth Step: Groebner Basis Calculation
Once the lexicographic order is selected, the developed procedure proceeds to calculate the Groebner Basis of the polynomial equation system obtained in
Section 3.3. This basis calculation is executed in a two step process: First, an initial Groebner Basis is obtained using Faugère’s F4 algorithm [
27,
28], with a graded reverse lexicographic order (grevlex). After this first basis is calculated, an FGLM basis conversion, based on the algorithm developed by Faugere et al [
29], is made to convert the basis to the lexicographic order selected in the previous step.
This two-step process was selected because it has been proven that it is the most efficient way to calculate a Groebner Basis for a zero-order Ideal, i.e., an Ideal that has a finite amount of solutions, with six variables or less [
26]. This is exactly our case because the Kinematic Problem of the studied non-redundant open-chain robotic systems contains at most six variables: one or two for each of the three DoF (
,
and
), depending on whether it is a rotational DoF or a prismatic one. In addition, it also has a finite number of solutions: at most four, as is typical when solving the position of non-redundant open-chain robots.
When the developed procedure is applied to the PUMA 560, the output of this fifth step is the Groebner Basis presented in Equations (
22) to (
27). In these equations, all the parameters of the robot are already substituted by their numerical values. In order to reduce the computation time of the F4 algorithm, all these parameters were given as integer numbers. This means that a dimension conversion, from mm to tenths of mm, was done to the PUMA’s parameters (see
Table 2). This dimension conversion has to be taken into account in the last step of the procedure, to ensure that all the parameter dimensions and positions are in the same units:
As can be seen in the previous equations, the obtained Groebner Basis constitutes a triangular equation system that can be solved in a staggered way. This is because the first equation of the system, shown in Equation (
22), only depends on one variable, the lesser monomial in the selected lex order (see Equation (
21)). After that equation is solved, the second one has at most two variables, the one that was previously calculated in the first equation and a new one, while the third depends at most on three variables, two computed in the preceding equations and a new one, and so on. Solving this triangular equation system gives the solution for the all the variables of the original polynomial equation system, the one that was calculated in
Section 3.3.
3.6. Sixth Step: Final IKM Algorithm
The last step of the developed procedure consists of transforming the triangular polynomial equation system of the calculated Groebner Basis in an algorithm that implements the final IKM. As was shown in the previous step, this triangular equation system can be solved in a staggered way, solving one new variable in each equation, so it is just a matter of implementing a procedure that transforms this set of equations into an executable algorithm.
Table 5 shows all the possible polynomial equations that can be encountered by our procedure when computing the final IKM. The maximum possible degree of this polynomial equations is four because the Inverse Kinematic Problem of the positioning of non-redundant open-chain robotic systems has at most four solutions, as it was shown in
Section 2.2.
The lineal and quadratic equations that our procedure encounters are solved by the very well known algorithms for these types of polynomials. The bi-quadratic polynomial equation is solved as two concatenated quadratic equations. In addition, finally, the quartic equations that the developed procedure may encounter are solved using Salzer’s algorithm [
30]. It is important to highlight that is not necessary to prepare for the appearance of cubic equations because the solutions of the IKP of open-chain robotic systems always come in pairs [
3].
As was stated before, the variables of the obtained solution correspond to either a prismatic DoF (
) or a pair sine–cosine of a rotational DoF (
and
). Therefore, to finish the IKM synthesis of the analyzed robot, it is only necessary to compute the final value of the rotational DoFs, using the corresponding expression of the form presented in Equation (
28):
The output of this last step is the algorithm of the systematically generated IKM that solves all the polynomial equations obtained in the fifth step, implemented in two different languages: C++, as compiled code ready to be used in the robot’s microcontroller, and MATLAB
® script (R2017b, MathWorks
®, Natick, MA, USA). This IKM can be used directly in the robot’s control system, as the generator of the references for the multi-axis control (see
Figure 1), or to simulate the robot’s behavior.
The developed procedure can be used to synthesize the IKM in all the following types of open-chain robots [
31]:
Cartesian robotic systems.
SCARA robots.
Non-redundant robotic manipulators that satisfy the in-line wrist condition, like the PUMA 560 presented in this work.
Non-redundant open-chain robot whose IKM should only solve the positioning problem, as is the case of most multi-legged walking robots.
To demonstrate the application of this procedure to multi-legged walking robots, it was also used to synthesize the IKM of a leg of the hexapod robot shown in
Figure 2. As it was said before, the user just has to give as inputs the D–H parameters of the hexapod, presented in
Table 3, the restrictions of its actuators and a lexicographic order for the monomials. The selected lex order for this IKM is the one presented in Equation (
29), that constitutes the same order in which the variables were solved in
Section 2.2.2.
When the developed procedure is applied to the hexapod’s leg, the output of the fifth step is the Groebner Basis presented in Equations (
30) to (
35). The final output of the full procedure, as was also the case for the PUMA 560, is the IKM for the hexapod’s leg, implemented both in C++, as a compiled code ready to be used in robot’s microcontroller, and as a MATLAB
® script:
The performance analyses of the two synthesized IKMs are presented in
Section 4.
5. Future Work
After proving that the developed procedure can be successfully employed to synthesize the IKMs of a multi-legged walking robot (Lynxmotion’s BH3-R hexapod) and a non-redundant manipulator with an in-line wrist (PUMA 560), the next logical step is to extend the procedure to also cover the end effector’s orientation, in order to complete the calculation of the full pose of all types of non-redundant robots. It is important to highlight that the extension to the generic 6R manipulator will present more than four solutions, and therefore it will not be possible to find an analytical solution, like it was done in this project. That case will surely require the application of numerical methods to find the final solution. However, all the cases of non-redundant manipulators that have an in-line wrist, non-redundant multi-legged walking robots, Cartesian robotic systems, and SCARA robots would still have analytical solutions, as it was shown in this work.
Another proposed future work is the extension to redundant robots, to fully cover all the spectrum of open-chain robotic systems. The application of Groebner Basis theory to a redundant robot will surely produce an underdetermined equation system that has infinite solutions. The final solution of these types of equation systems will require the application of kinematic restrictions, such as Lagrange multipliers, as is common for redundant robotic systems.
6. Conclusions
This project presents a procedure that applies the Groebner Basis theory to synthesize the IKM of non-redundant open-chain robotic systems. The IKM calculations are performed in a systematic way that do not require any special knowledge of the robot’s mechanical structure, besides its Denavit–Hartenberg parameters and the movement range of its actuators. The procedure’s output is the IKM, both in C++ and as a MATLAB® script, which can be used directly in the robot’s control system or to simulate its behavior.
The performance analysis presented in
Section 4 shows that the synthesized IKMs are totally comparable, both in precision and computation time, with the kinematic models calculated by traditional methods. This implies that the developed procedure represents a systematic solution to the Kinematic Problem of non-redundant open-chain robotic systems that is independent of the robot’s mechanical structure or its geometry.
The IKMs synthesized in this work showed how the developed procedure can be applied to non-redundant manipulators that satisfy the in-line wrist condition, such as the PUMA 560, as well as multi-legged walking robots, like the Lynxmotion’s BH3-R hexapod. However, it can also be applied to all Cartesian robotic systems and SCARA robots, covering a large range of open-chain robotic systems.