Advances in Linear Algebra & Matrix Theory
Vol.08 No.01(2018), Article ID:82865,8 pages
10.4236/alamt.2018.81004

6R Robot Inverse Solution Algorithm Based on Quaternion Matrix and Groebner Base

Zhensong Ni, Ruikun Wu

School of Electronic and Information Engineering, Fuqing Branch of Fujian Normal University, Fuqing, China

Copyright © 2018 by authors and Scientific Research Publishing Inc.

This work is licensed under the Creative Commons Attribution International License (CC BY 4.0).

http://creativecommons.org/licenses/by/4.0/

Received: November 1, 2017; Accepted: March 4, 2018; Published: March 7, 2018

ABSTRACT

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 6R 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.

Keywords:

6R Robot, Quaternion Matrix, Groebner Base, Inverse Kinematics Analysis

1. Introduction

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 [1] , through Closed Displacement Equation established by Homogeneous Transforms Matrix. It makes use of the product of the closed equation to conduct linear combination and then gets a new series of related equations. Finally, it performs linear elimination according to the linear combination among equations and does final elimination by the resultant, obtaining the 16-degree equation with single variable in the end. The kinematic model of 6R robot can also be built using Dual quaternion or Double quaternion, but there are some problems existed. When Qiao Shuguang [2] used Double quaternion to solve the problem, 8 extraneous roots appear. In order to eliminate the extraneous roots, four 1 + t2 common factors were extracted in Dixon Resultant. Thus, a 16-degree equation with single variable is obtained. Huang Xiguang [3] and Gan Dongming [4] transformed the sine and cosine of one rotation angle into plural form instead of extracting common factors, but numerical calculation is needed. Because only in that way, ±12 degree equation can be transformed to ±8 degree equation, and then a 16-degree equation with single variable can be obtained. Even though they have obtained the single-variable equation, the deduction process depends on numerical computation lacking rigorous proof. A new algorithm using quaternion and dual quaternion in matrix form is put forward in this article. It applies quaternion in special cases of rotated plane, transforming the sine and cosine of the rotation angle into matrix form, then exporting flat quaternion base in two matrixes form. It establishes serial 6R 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 [5] [6] modeling has been used in 6R robot inverse kinematics analysis.

2. Homogeneous Transformations in the Form of Quaternion Matrix

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 Figure 1.

In Figure 1, a new coordinate system can be derived by the coordinate system i-1 rotating on its axis Z with angle θi and transforming si along the same axis. Similarly, by rotating this new coordinate system on its axis X with angle αi and transforming ai 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:

Figure 1. D-H coordinate transform.

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 ]

3. Closed-Form Kinematics Equations in Term of Double Quaternion Matrix

3.1. Mathematical Modeling

Inverse solution of position of 6R robot in three dimensions is that given the position and gesture and parameter si, ai, αi , find the input angles ( θ i ( i = 1 , 2 , , 6 ) ) of every joints. 6R serial mechanism (Figure 2) has six joints and it needs 6 three-dimension movements described in Figure 1. According to basic theories of quaternion matrix, the mathematical model of inverse solution of kinematics position of 6R serial mechanism in three dimensions can be expressed in matrix form:

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, si, αi and ai 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 Ti and Ai to represent Q i Z ( θ i , S i ) and Q i x ( α i , a i ) . As Qiao [2] said that two of the six variables on the left of Equation (2) can be moved to the right and then it can be solved by Dixon resultant. Here, we move three of six variables on the left to the right, then Equation (2) becomes:

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 T7 and T8 respectively, which are quaternions in matrix form. Using Mathematic 6.0, we get:

Figure 2. A general 6R manipulator.

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 ai and bi are known parameters determined by the structure of mechanical arm.

3.2. Eliminate x4, x5 and x6

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 yi 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 ci 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 x4, x5 and x6. 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 y1~y8 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 X1 and X2. The coefficients eij in (10) are 4, 3, 1, 3, 2, 2, 1 algebraic expression of X3.

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 X3, matrix N7×7 has 16 degrees about X3. 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 X3 can be obtained:

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

where si 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 x3 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 X1 and X2. Through (14), we can get θ1 and θ2. Input θ1 and θ2 to (7), yi can be solved. Then, by (6) and (14), θ4, θ5 and θ6 are also available.

3.3. Sample Analysis

Use the parameters in example by Q. Shuguang, which the structural parameters are shown in Table 1. According to the parameter above, we obtain the position and gesture matrix of the end of the mechanical arm, which has 16 groups of joint angles.

The results of back solution are shown in Table 2, in which there are four real solutions and the 14th solution equals to the initial value. In addition, the result in Table 2 is exactly the same as the result gained by program in [2] [7] and [8] . In this way, this algorithm is correct.

4. Conclusion

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

Table 1. Structural parameters of 6R robot.

Table 2. 16 groups of solutions of 6R robot.

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.

Cite this paper

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

References

  1. 1. Liao, Q.Z. and Liang, C.G. (1993) Synthesizing Spatial 7R Mechanism with 16-Assembly Configurations. Mechanisms and Machine Theory, 28, 715-720. https://doi.org/10.1016/0094-114X(93)90010-S

  2. 2. Qiao, S., Liao, Q., Wei, S. and Su, H.J. (2010) Inverse Kinematic Analysis of the General 6R Serial Manipulators Based on Double Quaternions. Mechanism and Machine Theory, 45, 193-197. https://doi.org/10.1016/j.mechmachtheory.2009.05.013

  3. 3. Huang, X.G. and Liao, Q.Z. (2010) New Algorithm for Inverse Kinematics of 6R Serial Robot Mechanism. Journal of Beijing University of Aeronautics and Astronautics, 36, 295-298.

  4. 4. Gan, D., Liao, Q., Wei, S., Dai, J.S. and Qiao, S. (2008) Dual Quaternion-Based Inverse Kinematics of the General Spatial 7R Mechanism. Journal of Mechanical Engineering Science, 222, 1593-1598. https://doi.org/10.1243/09544062JMES1082

  5. 5. Goodson, G.R. (1997) The Inverse-Similarity Problem for Real Orthogonal Matrices. American Mathematical Monthly, 104, 223-230. https://doi.org/10.2307/2974787

  6. 6. Stephen, J., Wine, S. and Le Bihan, N. (2006) Quaternion Singular Value Decomposition Based on Bidiagonalization to a Real or Complex Matrix Using Quaternion Householder Transformations. Applied Mathematics and Computation, 128, 727-738.

  7. 7. Ni, Z.S., Liao, Q.Z., Wei, S.M. and Li, R.H. (2009) Dual Four Element Method for Inverse Kinematics Analysis of Spatial 6R Manipulator. Journal of Mechanical Engineering, 45, 25-29. https://doi.org/10.3901/JME.2009.11.025

  8. 8. Ni, Z.S. (2010) A Study of Geometric Algebro Method on Some Issues for Kinematrics of Mechanisms. Beijing University of Posts and Telecommunications, Beijing.