^{1}

^{*}

^{1}

This article proposes a new algorithm of quaternion and dual quaternion in matrix form. It applies quaternion in special cases of rotated plane, transforming the sine and cosine of the rotation angle into matrix form, then exporting flat quaternions base in two matrix form. It establishes serial 6
*R* manipulator kinematic equations in the form of quaternion matrix. Then five variables are eliminated through linear elimination and application of lexicographic Groebner base. Thus, upper bound of the degree of the equation is determined, which is 16. In this way, a 16-degree equation with single variable is obtained without any extraneous root. This is the first time that quaternion matrix modeling has been used in 6R robot inverse kinematics analysis.

This article uses quaternion matrix to solve the problem of 6R robot inverse kinematics in the three-dimensional space. In fact, this problem has been solved in 1986 [^{2} common factors were extracted in Dixon Resultant. Thus, a 16-degree equation with single variable is obtained. Huang Xiguang [

A dual quaternion can be expressed as:

q ⌢ = a i + b j + c k + d + a 0 i ε + b 0 j ε + c 0 k ε + d 0 ε (1)

which the last four part can be written as

a 0 i ε + b 0 j ε + c 0 k ε + d 0 ε = [ d 0 + c 0 i a 0 + b 0 i − a 0 + b 0 i d 0 − c 0 i ] ε

which the part in the bracket can be transformed to matrix form using the method above, so the matrix form of dual quaternion can be expressed as:

q ⌢ = a i + b j + c k + d + a 0 i ε + b 0 j ε + c 0 k ε + d 0 ε = [ d + c i a + b i − a + b i d − c i ] + [ d 0 + c 0 i a 0 + b 0 i − a 0 + b 0 i d 0 − c 0 i ] ε

Using D-H method to build robot coordinate system, the relationship of two adjacent joint coordinate systems i-1 and i, can be described by the parameters in

In _{i} and transforming s_{i} along the same axis. Similarly, by rotating this new coordinate system on its axis X with angle α_{i} and transforming a_{i} along the same X, the coordinate system i can be obtained. This kinematics can be described in matrix form like this

Q i − 1 z ( θ i , s i ) Q i − 1 x ( α i − 1 i , a i − 1 i )

Q i − 1 z ( θ i , s i ) = Z i − 1 + ε Z i − 1 0 = Ζ i − 1 + ε S i − 1 Z i − 1 / 2

in which:

Z i − 1 = { 0 , 0 , sin θ 2 K , cos θ 2 } ⇒ ( X 0 0 X ¯ ) , X = cos θ 2 + i sin θ 2 = e i θ 2 , X ¯ = cos θ 2 − i sin θ 2 = e − i θ 2

s = { 0 , 0 , s 1 , 0 } ⇒ ( i s 1 0 0 − i s 1 ) .

So

Q i − 1 z ( θ i , s i ) = [ e i θ i 2 0 0 e − i θ i 2 ] + 1 2 [ i s 1 e i θ i 2 0 0 i s 1 e − i θ i 2 ] ε

among which the latter one is a conversion related to x-axis.

Q i − 1 x ( α i − 1 i , a i − 1 i ) = X i − 1 + ε X i − 1 0 = X i − 1 + ε A i − 1 X i − 1 / 2 ,

in which

X i − 1 = [ cos α 2 sin α 2 − sin α 2 cos α 2 ]

A i − 1 = [ 0 a − a 0 ]

Q i − 1 x ( α i − 1 i , a i − 1 i ) = [ cos α 2 sin α 2 − sin α 2 cos α 2 ] + 1 2 ε [ − a sin α 2 a cos α 2 − a cos α 2 − a sin α 2 ]

Inverse solution of position of 6R robot in three dimensions is that given the position and gesture and parameter s_{i}, a_{i}, α_{i} , find the input angles ( θ i ( i = 1 , 2 , ⋯ , 6 ) ) of every joints. 6R serial mechanism (

Q 1 z ( θ 1 , s 1 ) Q 1 x ( α 12 , a 12 ) Q 2 z ( θ 2 , s 2 ) Q 2 x ( α 23 , a 23 ) ⋯ Q 1 z ( θ 6 , s 6 ) Q 6 x ( α 61 , a 61 ) = M . (2)

θ_{i}, s_{i}, α_{i} and a_{i}_{ }in the equations are structural parameters of 6R robot manipulate arm. Q i Z ( θ i , S i ) and Q i x ( α i , a i ) are quaternion matrix transformations that rotate and move along z-axis and x-axis respectively. M is the expression in quaternion matrix form of the position and gesture of the end of the robot. For general 6R robot, unknown variables are θ i ( i = 1 , 2 , ⋯ , 6 ) and other variable are determined by the structure of robot which are known. Our goal is to find out the six angles. We use T_{i} and A_{i }to represent Q i Z ( θ i , S i ) and Q i x ( α i , a i ) . As Qiao [

T 1 A 1 T 2 A 2 T 3 = M A 3 − 1 A 4 − 1 T 4 − 1 A 6 − 1 T 6 − 1 A 5 − 1 T 5 − 1 . (3)

Assume that the left and right part in equation is T_{7} and T_{8} respectively, which are quaternions in matrix form. Using Mathematic 6.0, we get:

T 7 = U 1 + ε U 2 = [ u 11 u 13 u 12 u 14 ] + ε [ u 21 u 23 u 22 u 24 ] T 8 = V 1 + ε V 2 = [ v 11 v 13 v 12 v 14 ] + ε [ v 21 v 23 v 22 v 24 ] (4)

Since u 1 i = v 1 i _{ }and u 2 i = v 2 i ( i = 1 , 2 , 3 , 4 ) and we assume that e i θ j / 2 = x j , j = 1 , 2 , ⋯ , 6 , we can obtain eight equations below:

a i 1 x 1 x 2 x 3 + a i 2 x 1 x 2 x 3 − 1 + a i 3 x 1 x 2 − 1 x 3 + a i 4 x 1 − 1 x 2 x 3 + a i 5 x 1 − 1 x 2 − 1 x 3 + a i 6 x 1 x 2 − 1 x 3 − 1 + a i 7 x 1 − 1 x 2 x 3 − 1 + a i 8 x 1 − 1 x 2 − 1 x 3 − 1 = b i 1 x 4 x 5 x 6 + b i 2 x 4 x 5 x 6 − 1 + b i 3 x 4 − 1 x 5 x 6 + b i 4 x 4 x 5 − 1 x 6 + b i 5 x 4 x 5 − 1 x 6 − 1 + b i 6 x 4 − 1 x 5 − 1 x 6 + b i 7 x 4 − 1 x 5 x 6 − 1 + b i 8 x 4 − 1 x 5 − 1 x 6 − 1 ( i = 1 , 2, ⋯ , 8 ) (5)

where a_{i} and b_{i} are known parameters determined by the structure of mechanical arm.

Assume the right end of the eight Equations in (5) to be:

y 1 = x 4 x 5 x 6 ; y 2 = x 4 x 5 x 6 − 1 ; y 3 = x 4 x 5 − 1 x 6 ; y 5 = x 4 − 1 x 5 x 6 ; y 4 = x 4 x 5 − 1 x 6 − 1 ; y 6 = x 4 − 1 x 5 − 1 x 6 ; y 7 = x 4 − 1 x 5 x 6 − 1 ; y 8 = x 4 − 1 x 5 − 1 x 6 − 1

x 4 x 5 x 6 − y 1 = 0 ; x 4 x 5 − x 6 y 2 = 0 ; x 4 x 6 − x 5 y 3 = 0 ; x 5 x 6 − x 4 y 4 = 0 ; x 4 − x 5 x 6 y 5 = 0 ; x 6 − x 4 x 5 y 6 = 0 ; x 5 − x 4 x 6 y 7 = 0 ; 1 − x 4 x 5 x 6 y 8 = 0. (6)

Solve y_{i} and we can get eight equations below:

c i 1 x 1 x 2 x 3 + c i 2 x 1 x 2 x 3 − 1 + c i 3 x 1 x 2 − 1 x 3 + c i 4 x 1 − 1 x 2 x 3 + c i 5 x 1 x 2 − 1 x 3 − 1 + c i 6 x 1 − 1 x 2 x 3 − 1 + c i 7 x 1 − 1 x 2 − 1 x 3 + c i 8 x 1 − 1 x 2 − 1 x 3 − 1 = y i ( i = 1 , 2 , ⋯ , 8 ) (7)

where c_{i} are known parameters determined by the structure of mechanical arm.

In (7), we use lexicographic method to order, so x 4 > x 5 > x 6 , then we compute the Groebner base. Use algebraic system to perform symbolic operation, then we get 21 bases. However, 11 bases among them are eliminated because of containing x_{4}, x_{5} and x_{6}. Other ten lower-degree bases are selected as quadric bases:

− y 6 ∗ y 7 + y 5 ∗ y 8 = 0 ; − y 4 ∗ y 6 + y 3 ∗ y 8 = 0 ; − y 4 ∗ y 7 + y 2 ∗ y 8 = 0 ; − y 2 ∗ y 5 + y 1 ∗ y 7 = 0 ; − y 3 ∗ y 5 + y 1 ∗ y 6 = 0 ; − y 2 ∗ y 3 + y 1 ∗ y 4 = 0 ; − 1 + y 4 ∗ y 5 = 0 ; − 1 + y 3 ∗ y 7 = 0 ; − 1 + y 1 ∗ y 8 = 0 ; − 1 + y 2 ∗ y 6 = 0. (8)

Substitute y_{1}~y_{8} into Equation (8) and multiply x 1 2 x 2 2 x 3 2 to both sides, then we obtain 10 equations about x 1 2 , x 2 2 , x 3 2 whose degrees are no more than 4:

d i 1 + d i 2 x 1 2 + ⋯ + d i 27 x 1 4 x 2 4 x 3 4 = 0 ( i = 1 , ⋯ , 10 ) . (9)

For (9), assume x 1 2 = X 1 , x 2 2 = X 2 , x 3 2 = X 3 and simplify this equation by lexicographic Groebner base. Detailed steps are:

Use Mathematica on Intel Pentium IV, 2.93 GHz, RAM 1 G, PC and rank the Groebner bases in (9) according to X 1 > X 2 > X 3 . This process cost 5.657 seconds and we obtain 11 bases.

Seven of the 11 bases are shown below:

e i 1 + e i 2 X 1 + e i 3 X 1 2 + e i 4 X 2 + e i 5 X 1 X 2 + e i 6 X 2 2 + e i 7 X 2 3 ( i = 1 , 2 , ⋯ , 7 ) . (10)

Other four bases are abandoned because they have high degree of X_{1} and X_{2}. The coefficients e_{ij} in (10) are 4, 3, 1, 3, 2, 2, 1 algebraic expression of X_{3}.

The seven Equations in (10) can be transformed into matrix form:

N 7 × 7 T = 0 (11)

where T = [ 1 , X 1 , X 1 2 , X 2 , X 1 X 2 , X 2 2 , X 2 3 ] T .

In order to have solutions, the value of determinant of coefficient must be 0, that is

det ( N 7 × 7 ) = 0 . (12)

According to the analysis to the degree of X_{3}, matrix N_{7×7} has 16 degrees about X_{3}. So the degree of expansion is no more than 16.

According to (12), there is no need to extract any common factor and 16-degree input and output equations with single variable X_{3} can be obtained:

∑ i = 0 16 s i X 3 i = 0 (13)

where s_{i} are real coefficients determined by input parameters. Solve (13), 16 solutions will be obtained and through:

θ 3 = ln X 3 / i (14)

value of θ 3 is available.

Substitute x_{3} to (8) and extract eight equations to build an equation set; consider X 1 , X 1 2 , X 2 , X 1 X 2 , X 2 2 , X 2 3 as unknown variables and solve it. Then we can get X_{1} and X_{2}. Through (14), we can get θ_{1} and θ_{2}. Input θ_{1} and θ_{2} to (7), y_{i} can be solved. Then, by (6) and (14), θ_{4}, θ_{5} and θ_{6} are also available.

Use the parameters in example by Q. Shuguang, which the structural parameters are shown in

The results of back solution are shown in ^{th} solution equals to the initial value. In addition, the result in

Based on research of quaternion in matrix form, we apply it on the modeling of 6R robot. By using lexicographic Groebner base twice, we eliminate 3 variables

Index i | Moving distance along x-axis a_{i}/mm | Rotation angle around x-axis α_{i}/(˚) | Moving distance along z-axis s_{i}/mm | Rotation angle around z-axis θ_{i}/(˚) |
---|---|---|---|---|

1 | 100 | 90 | 900 | 80 |

2 | 400 | −90 | 100 | −16 |

3 | 800 | 45 | 200 | 110 |

4 | 125 | 90 | 300 | 70 |

5 | 200 | 30 | 700 | −30 |

6 | 300 | 50 | 300 | 20 |

Index | θ_{1}(˚) | θ_{2}(˚) | θ_{3}(˚) | θ_{4}(˚) | θ_{5}(˚) | θ_{6}(˚) |
---|---|---|---|---|---|---|

1 | 126.904 + 61.1805i | −160.617 − 29.2234i | 162.153 + 80.0235i | 131.966 − 81.8681i | 156.188 − 80.3445i | −10.6735 + 74.01i |

2 | 126.904 − 61.1805i | −160.617 + 29.2234i | 162.153 − 80.0235i | 131.966 + 81.8681i | 156.188 + 80.3445i | −10.6735 − 74.01i |

3 | −154.594 + 3.76672i | −56.7362 − 33.2051i | −119.269 − 28.7903i | 165.725 − 1.57149i | 59.3951 + 71.4594i | 6.67326 − 40.6869i |

4 | −154.594 − 3.76672i | −56.7362 + 33.2051i | −119.269 + 28.7903i | 165.725 + 1.57149i | 59.3951−71.4594i | 6.67326 + 40.6869i |

5 | 80 | −16 | 110 | 70 | −30 | 20 |

6 | 72.0137 | 3.45572 | 120.785 | 56.4888 | 19.0818 | −13.9585 |

7 | −3.33344 − 3.61438i | 8.78943 − 30.7833i | 171.434 + 30.7778i | 76.1364 − 72.1063i | 3.69214 + 39.4426i | −16.8816 − 54.9133i |

8 | −3.33344 + 3.61438i | 8.78943 + 30.7833i | 171.434 − 30.7778i | 76.1364 + 72.1063i | 3.69214 − 39.4426i | −16.8816 + 54.9133i |

9 | −69.6973 + 43.8222i | 15.5748 − 28.126i | −160.994 − 16.4298i | 112.288 − 59.3653 | 8.20624 + 62.8281 | −16.1271 − 50.7677i |

10 | −69.6973 − 43.8222i | 15.5748 + 28.126i | −160.994 + 16.4298ii | 112.288 + 59.3653 | 8.20624−62.8281 | −16.1271 + 50.7677i |

11 | −121.824 | 52.449 | −46.4873 | −7.0332 | 55.0851 | −102.853 |

12 | 34.4192 + 2.54131i | 94.567 − 5.42461i | 85.5904 + 5.78504i | 140.208 − 6.40323i | 109.799 − 10.493i | −33.5871 + 5.78306i |

13 | 34.4192 − 2.54131i | 94.567 + 5.42461i | 85.5904 − 5.78504i | 140.208 + 6.40323i | 109.799 + 10.493i | −33.5871 − 5.78306i |

14 | −110.338 | 105.204 | −67.5107 | 37.7924 | −146.258 | 58.386 |

15 | −41.4745 + 92.6597i | 173.727 + 9.92687i | −48.825 + 311.265i | −79.3546 + 5.61266i | −139.649 + 83.3555i | −139.951 − 275.645i |

16 | −41.4745 − 92.6597i | 173.727 − 9.92687i | −48.825 − 311.265i | −79.3546 − 5.61266i | −139.649 − 83.3555i | −139.951 + 275.645i |

and obtain 10 bases in the first time and 11 bases in the second time. Thus, the degree of variables decreases. Using 7 bases among them and resultant elimination, the analytical solution of the 16-degree equation is obtained and the numerical example gets the same result as the literature above. It is a convenient method which can be applied to inverse kinematics analysis of 6R robot in three dimensions, laying a new foundation for real application.

Ni, Z.S. and Wu, R.K. (2018) 6R Robot Inverse Solution Algorithm Based on Quaternion Matrix and Groebner Base. Advances in Linear Algebra & Matrix Theory, 8, 33-40. https://doi.org/10.4236/alamt.2018.81004