Known values of the four positions of the manipulator.

## Abstract

The chapter describes a new strategy to approach the solution of the inverse kinematics problem for robot manipulators. A method to determine a polynomial model approximation for the joints positions is described by applying the divided differences with a new point of view for lineal path in the end-effector of the robot manipulator. Results of the mathematical approach are analysed by obtaining the kinematics inverse model and the approximate model for lineal trajectories of a manipulator for three degrees of freedom. Finally, future research approaches are commented.

### Keywords

- inverse kinematics approach

## 1. Introduction

The modeling of robot manipulators with rotational joints has been extensively studied for decades. A robot manipulator is formed from the mechanical point of view by a kinematic chain of rigid bodies (links) which are joined together by linear or rotational joints. The modeling of the kinematics for a robot manipulator allows us to analyze the movements of the end-effector in order to perform a specific task.

To determine the kinematics model for a robot manipulator, conventionally there are two types of analysis, the first is called “Direct Kinematics Problem” and the second analysis is “Inverse Kinematics Problem.” Depending on what is required for a specific task in the manipulator, different mathematical models can be used to control the behavior of a wide variety of robot manipulators [1–3]. The Direct Kinematics Problem determines the position of the end-effector of the robot manipulator as a function of the degrees of freedom (joint), wherein each degree of freedom is an independent movement in the mechanical structure of the robot manipulator. In contrast, the Inverse Kinematics Problem is oriented to determine the variation of the degrees of freedom of the manipulator according to the kinematics of the end-effector of the robot manipulator. This last situation is usually more complex from the point of view of mathematical modeling and its solution, given the high nonlinearity of behavior of the robot manipulators. A further disadvantage of conventional models of the Inverse Kinematics Problem is called redundancy. This happens when more than one solution is obtained by the mathematical model of the robot manipulator, causing theoretical configurations that do not occur in practical movements of an industrial manipulator. Additionally, another problem that occurs in the analysis of manipulators is when matrices for translations and rotations are used in the modeling. There is the possibility that this inverse matrix shows singular points, causing undefined mathematical solutions. Translations and rotations are essentials to solve the Kinematics Inverse Problem, to do that, auxiliary reference systems are used to refer the kinematics of the end-effector in the reference inertial system. In this regard, this chapter shows a new strategy to solve the Inverse Kinematics Problem for manipulators with rotational joints by approximating with cubic polynomial functions that define the positions of the joints.

## 2. Solutions for the Inverse Kinematics Problem

One of the first methods developed to solve the inverse kinematics for manipulator is by "Algebraic Method". In general, the algebraic methods are obtained by vector equations that respond to the links geometry of the manipulator. By this way, trigonometric relationships and algebraic equations are obtained to get mathematical functions that determine the behavior of the degrees of freedom in the manipulator [4–6]. It might be supposed that this method is the most effective however; it presents mathematical uncertainties, inconsistencies, and considerable complexity.

Another method developed to determine inverse kinematics is by spatial geometry. This method is based on the decomposition of the spatial geometry of the manipulator in planar geometric systems. For many serial or parallel manipulators, this decomposition is simple when the axes of consecutive degrees of freedom present changes as 0°, 90°, and 270°. However, it is not always the case, so this method cannot always be applied. The inverse kinematics of each degree of freedom usually has more than one solution. Also, given the trigonometric relationships of mathematical models obtained, they cannot always be solved because it is more complex to obtain an exact solution for a greater number of degrees of freedom [7, 8].

One of the most used alternative to solve the inverse kinematics of robot manipulators is based on Newton methods. These algorithms seek target configurations which posed as solutions to minimization problem [9]. Due to extreme complexity, these methods are known to be less practical. There are also methods based on statistical filtering [10] and sequential iterative approaches [11]. However, these statistical methods suffer high computational cost.

Research about the use of polynomial functions with some relationships with the inverse kinematics problem for manipulators is not new. However, some of the applications are oriented to trajectory planning [12], and also to solve the inverse kinematics problem by polynomial of n-degrees by using genetic algorithms [13, 14].

This work presents a novel approach to the inverse kinematic problem by cubic polynomial functions which are built under the definition of new parameters and the divided differences recursive method. The present approach is different to other strategies to get a solution for inverse kinematics problem. The benefits of the proposed method are essentially the simplicity to obtain a polynomial function for rotational joints that solve the inverse kinematics problem (position, speed, and acceleration), and the warranty to get a unique solution with no singularities. However, as many of the mathematical models that attempt to describe a real physical phenomenon, the method has several restrictions: bi-dimensional work space, the end-effector paths are straight lines, two joints are free and a third joint have fixed orientation, and four points of the path trajectory are needed.

## 3. The method of divided differences

From the mathematics point of view, the divided differences is a recursive division process of increments. The method can be used to calculate the coefficients in the interpolation polynomial in the Newton form when data points (x_{i}, y_{i}) are known, where i is an integer ranging from 0 to (n−1) and n is the number of points.

By definition, it is called divided difference of * f*in the points (x

_{i}, y

_{i}) to the value

**[**f

**] which is calculated recursively by these equations [15]:**x

_{0}, x

_{1}, x

_{2}, .., x

_{k}

To properly apply the method, it is essential to order in a table the values corresponding to the points (x_{i}, y_{i}), so that the x_{i} column is sorted from the highest to lowest number, or vice versa. Considering an approach with four known points, the divided differences are defined as shown in Figure 1:

Such polynomial function f(x) is determined as:

or expressed in the reduced form:

## 4. Polynomial approach strategy

A new feature in the mathematical development shown in this work is to adapt the method of divided differences to approximate the functions that define the changes of the rotational joints θ_{1i}y θ_{2i}. For the approximation by polynomials, a table of four points known of the manipulator robot is formed; then the polynomial approach strategy can be applied. It is important to mention that for the analysis developed in this work, it is considered a robot manipulator with three rotational joints.

Point | x_{i} | y_{i} | θ_{1i} | θ_{2i} | θ_{3i} |
---|---|---|---|---|---|

_{1} | _{1} | θ_{11} | θ_{21} | θ_{31} | |

_{2} | _{2} | θ_{12} | θ_{22} | θ_{32} | |

_{3} | _{3} | θ_{13} | θ_{23} | θ_{33} | |

_{4} | _{4} | θ_{14} | θ_{24} | θ_{34} |

Before showing how to construct polynomials, it is relevant to note that the movement of the end-effector of the robot manipulator performs a linear motion by keeping constant the orientation of the end-effector (θ_{3}). In the case of analysis shown in the X-Y coordinate plane, the positions changes occur in both coordinates. In this case, proportionality of change of θ_{1}and θ_{2}will be done considering the changes of x with respect to y. This is because both coordinates participate proportionally varying θ_{1} and θ_{2}. To this end, we have defined two new indices denominated: incidence factor of x, and incidence factor of y. Both indices respond to the model of linear proportionality by the following equations:

Taking into account that the sum of the percentages of both coordinates is 100%, the incidence factor of y in θ (in percentage) is determined as:

For example, for the line defined by the equation y = x, the proportionality of the change is the same for both coordinates, so the variation of the x coordinate has a 50% incidence in the changes of θ_{1} and θ_{2}. Similarly, the variation of the y-coordinate has a 50% incidence in the changes of θ_{1} and θ_{2}.

The determination % of x is obtained by the value of the slope of the straight line m, the incidence factor of x in θ (percentage) is calculated using the following equation:

The absolute value of m is obtained because it is only of our interest to obtain the proportionality of the changes of the angles θ_{1} and θ_{2} as a function of lineal movements. So that,

similarly,

The tables to determine the polynomials that approximate the behavior of the angle θ_{1} are built based on the new approach strategy presented here, remaining as:

_{i} | ||
---|---|---|

_{1} | ||

_{2} | ||

_{3} | ||

_{4} |

_{i} | ||
---|---|---|

_{1} | ||

_{2} | ||

_{3} | ||

_{4} |

In a similar way,

_{i} | ||
---|---|---|

_{1} | ||

_{2} | ||

_{3} | ||

_{4} |

_{i} | ||
---|---|---|

_{1} | ||

_{2} | ||

_{3} | ||

_{4} |

One of the contributions of the strategy presented here is the composition of polynomial functions of the joints of the robot manipulator θ_{1}and θ_{2}, both as independent functions of "x" and "y". These compositions are defined as the following equations:

where a_{i}, b_{i} are coefficients obtained from Tables 2 and 3, and the coefficients c_{i}, d_{i} are obtained by Table 4 respectively. Thus, divided differences are shown in Figure 2.

where,

developing the general equation,

This equation allows us to obtain the model of the polynomial that approximates the angular position θ with respect to the variable x.

In developing this equation and simplifying results,

Similarly, the polynomial θ(y) is obtained, which has the following form:

Clearly, the differences divided for this equation refers to the rate of change of the θ with respect to y, being defined by the polynomial approximation model of joint θ_{1} and θ_{2} of the robot manipulator, which in simplified form are expressed as:

## 5. Development of the approach by polynomials

In this section, the strategy proposed to approach the Kinematics Inverse Problem by polynomial functions of the rotational joints of a robot manipulator is shown. The procedures to three different cases of lineal path in the end-effector are analysed: a) slope of a straight line, m = 1, b) slope of a straight line, m < 1 and c) slope of a straight line, m > 1. To show the procedures, it is important to describe the mechanical configuration of the robot manipulator that is shown in Figure 3.

The three degrees of freedom that are considered known in the plane of the robot manipulator moves are (_{3}). The link in the base of the robot manipulator is 35 units of effective length, the second link is 30 units of length, and third link is 10 units of length. The orientation of the end-effector is considered constant during the lineal movements.

Remembering that the procedure exposes that four positions of the configuration robot are known, the approach by polynomial function are described in the next lines:

a) Case 1. Slope of a straight line, m = 1.

In order to show the effectiveness of the developed strategy, the movement of the end-effector of the robot manipulator was selected by considering that the maximum length of the lineal trajectory is close to the effective length of link 1. For this case, the orientation of the end-effector is 90° and is keeping constant during its moves. Under these considerations, Figure 4 shows the selected lineal trajectory.

The values of the four known positions of the robot manipulator are shown in Table 6.

x | y | Θ_{1} [°] | Θ_{2} [°] | Θ_{3} [°] |
---|---|---|---|---|

−15 | 25 | 193.51° | 50.58° | 90° |

−5 | 35 | 158.15° | 23.53° | 90° |

0 | 40 | 144.28° | 18.59° | 90° |

10 | 50 | 121.37° | 19.71° | 90° |

The incidence factor of x in θ, according to Eq. (9) and the value of the slope of a straight line is calculated as:

Then, from Eq. (8) the incidence factor of y in θ takes the next value:

Considering both factors, the tables to obtain the polynomial functions for the joint θ_{1} are defined as:

_{i} | _{1i}(x) | |
---|---|---|

96.755 | ||

79.075 | ||

72.14 | ||

60.685 |

_{i} | _{1i}(y) | |
---|---|---|

96.755 | ||

79.075 | ||

72.14 | ||

60.685 |

The polynomial approach of Table 7 is determined by the divided differences according to Eqs. (14) to (19). In this way, next table shows the values obtained:

X_{i} | _{1i}(x) | Δ_{1i} | Δ_{2i} | Δ_{3i} |
---|---|---|---|---|

79.075 | −1.387 | 0.0161 | ||

72.14 | −1.1455 | |||

60.685 |

Applying Eq. (22) and simplifying results:

This polynomial function represents the incidence of x in joint of θ_{1}. To complete the approach, it is also necessary to add the incidence of y in the same joint of θ_{1}. So the polynomial approach from Table 8 is obtained by applying Eqs. (14) to (19).

Y_{i} | _{1i}(y) | Δ_{1i} | Δ_{2i} | Δ_{3i} |
---|---|---|---|---|

79.075 | −1.387 | 0.0161 | ||

72.14 | −1.1455 | |||

60.685 |

Applying Eq. (23) and simplifying it gives:

According to Eq. (24) the complete function approximation of θ_{1} becomes:

The next step is to obtain the function approximation of θ_{2}(x). According to the above procedure, the differences divided for Table 8 to get the polynomial approximation with respect of x takes the form:

X_{i} | _{2i}(x) | Δ_{1i} | Δ_{2i} | Δ_{3i} |
---|---|---|---|---|

11.765 | −0.494 | 0.0366 | ||

9.295 | 0.056 | |||

9.855 |

Applying Eq. (22) and simplifying it gives:

Similarly, the divided differences of Table 8 to get the polynomial approximation for θ_{2}(y) takes the form:

Y_{i} | _{2i}(y) | Δ_{1i} | Δ_{2i} | Δ_{3i} |
---|---|---|---|---|

11.765 | −0.494 | 0.0366 | ||

9.295 | 0.056 | |||

9.855 |

Applying Eq. (23) and simplifying it gives:

According to Eq. (25) the complete function approximation of θ_{2} becomes:

Obtaining result from the complete approximation by polynomials θ_{1} and θ_{2}:

After obtaining the desired approach, the next step is to check the positions of the end-effector of the robot manipulator in order to verify that a lineal trajectory is made. According to the Direct Kinematics Model of the robot manipulator, the approximate position of the end-effector is determined by:

Remembering that L_{1} = 35, L_{2} = 30, L_{3} = 10 y θ_{3} = 90°, the Eq. (36) is evaluated in the range

_{1}[°] | _{2}[°] | _{approx} | _{approx} | ||
---|---|---|---|---|---|

−15 | 25 | 193.497 | 50.580 | −14.983 | 25.007 |

−12.5 | 27.5 | 183.534 | 41.286 | −12.391 | 27.637 |

−10 | 30 | 174.368 | 33.782 | −9.896 | 30.116 |

−7.5 | 32.5 | 165.930 | 27.915 | −7.441 | 32.554 |

−5 | 35 | 158.149 | 23.530 | −4.980 | 35.004 |

−2.5 | 37.5 | 150.955 | 20.473 | −2.493 | 37.485 |

0 | 40 | 144.280 | 18.590 | 0.019 | 39.998 |

2.5 | 42.5 | 138.053 | 17.726 | 2.544 | 42.530 |

5 | 45 | 132.205 | 17.728 | 5.063 | 45.061 |

7.5 | 47.5 | 126.665 | 18.440 | 7.560 | 47.565 |

10 | 50 | 121.364 | 19.710 | 10.026 | 50.003 |

In order to ensure the validity of the polynomial function, the Error of x, Error of y, and Error(x, y) are calculated by the next equations:

Getting the following table for the values of Table 13:

Error of x | Error of y | Error (x, y) | ||
---|---|---|---|---|

−15 | 25 | −0.017 | −0.007 | 0.0179 |

−10 | 30 | −0.104 | −0.116 | 0.1555 |

−7.5 | 32.5 | −0.059 | −0.054 | 0.0801 |

−5 | 35 | −0.020 | −0.004 | 0.0206 |

−2.5 | 37.5 | −0.007 | 0.015 | 0.0161 |

0 | 40 | −0.019 | 0.002 | 0.0190 |

2.5 | 42.5 | −0.044 | −0.030 | 0.0529 |

5 | 45 | −0.063 | −0.061 | 0.0879 |

7.5 | 47.5 | −0.060 | −0.065 | 0.0881 |

The error of interest is the maximum error, in this case the maximum error is 0.1754 units and occurs in the point (−12.5, 27.5). The percentage of maximum error is determined by the following equation:

where (x_{i}, y_{i}) are the coordinates of the starting point and (x_{f}, y_{f}) are the coordinates of the endpoint. That is, for an error rate, the maximum error is compared with the path length. Substituting values in Eq. (40), it gives:

Considering that this value is acceptable, Eqs. (34) and (35) can be used to do a lineal trajectory in the end-effector of the robot manipulator.

b) Case 2. Slope of a straight line, m < 1.

Similarly, as in the previous case, the end-effector of the robot manipulator makes a lineal path, which is shown in Figure 5. In this case it is considered θ_{3} as a constant, with the value of 45°.

For this case, the values of four known positions of the manipulator robot are shown in the following table.

Θ_{1}[°] | Θ_{2}[°] | Θ_{3}[°] | ||
---|---|---|---|---|

−10 | 45 | 159.34 | 58.46 | 45 |

0 | 40 | 153.87 | 35.69 | 45 |

10 | 35 | 139.48 | 9.94 | 45 |

20 | 30 | 117.01 | -15.99 | 45 |

The four known positions correspond to the linear relationship y = −0.5 x + 40. Considering that slope: m = −0.5, the incidence factors can be calculated by the (8) and (9) equations, like this:

According to the presented strategy, the incidence table to approximate polynomial functions θ_{1} takes the next form:

_{i} | θ_{1i}(x) [°] | |
---|---|---|

−10 | 106.216 | |

0 | 102.569 | |

10 | 92.977 | |

20 | 77.998 |

_{i} | _{1i}(y) [°] | |
---|---|---|

45 | 53.108 | |

40 | 51.284 | |

35 | 46.488 | |

30 | 38.999 |

Calculating the polynomial approximation to θ_{1}(x), the next table is obtained:

X_{i} | _{1i}(x) | Δ_{1i} | Δ_{2i} | Δ_{3i} |
---|---|---|---|---|

−10 | ^{-5} | |||

0 | 102.569 | −0.9592 | −0.026935 | |

10 | 92.977 | −1.4979 | ||

20 | 77.998 |

Applying Eq. (22) and simplifying it gives:

Likewise,

Y_{i} | _{1i}(y) | Δ_{1i} | Δ_{2i} | Δ_{3i} |
---|---|---|---|---|

45 | 53.108 | |||

40 | 51.284 | 0.9592 | −0.05386 | |

35 | 46.488 | 1.4978 | ||

30 | 38.999 |

Applying Eq. (23) and simplifying it gives:

The complete function approximation of θ_{1} becomes:

Also, the tables to approximate polynomial functions θ_{2} are:

X_{i} | _{2i}(x) | |
---|---|---|

−10 | 38.969 | |

0 | 23.790 | |

10 | 6.626 | |

20 | −10.658 |

Y_{i} | _{2i}(y) | |
---|---|---|

45 | 19.484 | |

40 | 11.895 | |

35 | 3.313 | |

30 | −5.329 |

Calculating the polynomial approximation for the Tables 20 and 21, we obtain:

According to Eq. (25) the function approximation of θ_{2} becomes:

Determining the complete polynomial approximation of θ_{1} and θ_{2} by Eqs. (46) and (47) respectively, it results to:

Applying the direct kinematic model of the robot manipulator defined by Eq. (36), it proceeds to verify polynomials approach θ_{1} and θ_{2}. In this case, θ_{3} is a constant with the value of 45°, where y = −0.5 x + 40, with x ∈ (−10.20). Considering an increase Δx = 3 units, the following table is obtained:

_{1}[°] | _{2}[°] | _{approx} | _{approx} | ||
---|---|---|---|---|---|

−10 | 45 | 159.324 | 58.453 | −9.979 | 44.995 |

−7 | 43.5 | 158.669 | 52.102 | −7.103 | 43.476 |

−4 | 42 | 157.158 | 45.306 | −4.085 | 41.984 |

−1 | 40.5 | 154.815 | 38.142 | −1.007 | 40.493 |

2 | 39 | 151.662 | 30.685 | 2.065 | 38.994 |

5 | 37.5 | 147.721 | 23.009 | 5.093 | 37.489 |

8 | 36 | 143.016 | 15.192 | 8.065 | 35.989 |

11 | 34.5 | 137.568 | 7.308 | 10.995 | 34.502 |

14 | 33 | 131.401 | −0.566 | 13.923 | 33.028 |

17 | 31.5 | 124.536 | −8.357 | 16.910 | 31.543 |

20 | 30 | 116.997 | −15.987 | 20.023 | 29.995 |

Applying Eqs. (37), (38), and (39) the table of the errors become:

Error of x | Error of y | Error(x, y) | ||
---|---|---|---|---|

−10 | 45 | −0.021 | 0.005 | 0.0218 |

−4 | 42 | 0.085 | 0.016 | 0.0863 |

−1 | 40.5 | 0.007 | 0.007 | 0.0099 |

2 | 39 | −0.065 | 0.006 | 0.0654 |

5 | 37.5 | −0.093 | 0.011 | 0.0938 |

8 | 36 | −0.065 | 0.011 | 0.0656 |

11 | 34.5 | 0.005 | −0.002 | 0.0059 |

14 | 33 | 0.077 | −0.028 | 0.0816 |

17 | 31.5 | 0.090 | −0.043 | 0.0995 |

The maximum error occurs at (−7, 43.5). From Eq. (40) the maximum percentage of error becomes:

Similarly as in the previous case, this value is reasonably acceptable. So for this case, Eqs. (48) and (49) can be used to do the lineal trajectory in the end-effector of the robot manipulator.

c) Case 3. Slope of a straight line, m > 1.

As in the two previous cases, the end-effector of the robot performs a linear path. In this case, the geometric robot positions were made considering an infinite slope (x = constant). Figure 6 shows these positions, and the angle of the end-effector is considered constant with a value of 180°.

The values of the known positions are shown in the Table 24:

Θ_{1} [°] | Θ_{2} [°] | Θ_{3} [°] | ||
---|---|---|---|---|

−50 | −20 | 248.6 | 155.16 | 180 |

−50 | −10 | 239.46 | 137.78 | 180 |

−50 | 0 | 226.55 | 122.06 | 180 |

−50 | 15 | 203.45 | 105.24 | 180 |

Considering that slope: m = ∞, the incidence factors can be calculated by the (8) and (9) equations like this:

As expected, the change in x has no any incidence on changes in θ_{1} and θ_{2}, it is in this case that the change of y causes the change in both degrees of freedom of the robot manipulator.

The incidence tables to approximate polynomial functions θ_{1} and θ_{2} take the next form:

_{i} | _{1i}(X) [°] | |
---|---|---|

-20 | 248.6 | |

-10 | 239.46 | |

0 | 226.55 | |

4 | 15 | 203.45 |

_{i} | _{2i}(X) [°] | |
---|---|---|

-20 | 155.16 | |

-10 | 137.78 | |

0 | 122.06 | |

4 | 15 | 105.24 |

Performing the same procedure as in the previous cases, the desired functions of polynomial approximation are obtained for both Tables 25 and 26:

In this case θ_{3} = 180°, with

[°]_{1}(X, Y) | [°]_{2}(X, Y) | _{aprox} | ||
---|---|---|---|---|

−20 | 248.600 | 155.16 | −19.983 | −19.983 |

−16.5 | 245.925 | 148.990 | −16.500 | 0.000 |

−13 | 242.667 | 142.894 | −12.994 | −0.006 |

−9.5 | 238.891 | 136.940 | −9.484 | −0.016 |

−6 | 234.663 | 131.199 | −5.979 | −0.021 |

−2.5 | 230.048 | 125.743 | −2.481 | −0.019 |

1 | 225.110 | 120.644 | 1.014 | −0.014 |

4.5 | 219.917 | 115.972 | 4.512 | −0.012 |

8 | 214.532 | 111.799 | 8.015 | −0.015 |

11.5 | 209.021 | 108.198 | 11.520 | −0.020 |

15 | 203.450 | 105.239 | 15.017 | −0.017 |

The maximum error in this case is in y =−6. From Eq. (40) the maximum percentage of error becomes:

This value is so small that it can provide security to use the approximation obtained by Eqs. (53) and (54).

Until now, there have been three different cases that demonstrate an acceptable approximation in the position of θ_{1} and θ_{2} by polynomial functions. Given that the position of the end-effector of the robot is known, it is considered in this work that the speed and acceleration of the end-effector are well-known. Considering that the polynomial approximation for any degree of freedom has the following form:

Deriving this equation, the speed for any degree of freedom is defined as:

Deriving newly, the acceleration for any degree of freedom becomes:

By applying Eqs. (57) and (58), speed and acceleration for any degrees of freedom of the manipulator can be obtained respectively.

## 6. Conclusions

One of the basic activities related to the movement of industrial robots is the solution of the Inverse Kinematics Problem. This chapter has presented a new strategy that allows for an approximate solution without the use of conventional methods. However, the approach method has several restrictions. Thus, it is possible to achieve an alternative solution to the Inverse Kinematics Problem by polynomial functions that define the behaviour of the rotational joints. An advantage of this strategy is that it is easy to implement, and after getting the polynomial function for the position of the joints, the speed and acceleration can be obtained by conventional derivation.

Moreover, because this approach is made from four known configurations of the robot, it can be considered that the methodology described is a way of discretizing the continuous kinematics of the robot, which is an interpolation technique to the inverse kinematic problem.

Given the restrictions described in the analysed cases, further research is needed to determine if this strategy could be used for nonlinear paths; or for a kind of paths that require changes in the orientation of the end-effector, and also explore the possibility to extend the method for manipulator with more degrees of freedom.