Axis movement of DOBOT Magician [10].

## Abstract

Kinematic structure of the DOBOT manipulator is presented in this chapter. Joint coordinates and end-effector coordinates of the manipulator are functions of independent coordinates, i.e., joint parameters. This chapter explained forward kinematics task and issue of inverse kinematics task on the structure of the DOBOT manipulator. Linearization of forward kinematic equations is made with usage of Taylor Series for multiple variables. The inversion of Jacobian matrix was used for numerical solution of the inverse kinematics task. The chapter contains analytical equations, which are solution of inverse kinematics task. It should be noted that the analytical solution exists only for simple kinematic structures, for example DOBOT manipulator structure. Subsequently, simulation of the inverse kinematics of the above-mentioned kinematic structure was performed in the Matlab Simulink environment using the SimMechanics toolbox.

### Keywords

- forward kinematics
- inverse kinematics
- Matlab Simulink simulation
- robotic arm
- Jacobian matrix
- pseudoinverse method
- SimMechanics

## 1. Introduction

Robots and manipulators are very important and powerful instruments of today’s industry. They are making lot of different tasks and operations and they do not require comfort, time for rest, or wage. However, it takes many time and capable workers for right robot function [6].

The movement of robot can be divided into forward and inverse kinematics. Forward kinematics described how robot’s move according to entered angles. There is always a solution for forward kinematics of manipulator. Solution for inverse kinematics is a more difficult problem than forward kinematics. The relationship between forward kinematics and inverse kinematics is illustrated in Figure 1. Inverse kinematics must be solving in reverse than forward kinematics. But we know to always find some solution for inverse kinematics of manipulator. There are only few groups of manipulators (manipulators with Euler wrist) with simple solution of inverse kinematics [8, 9].

Two main techniques for solving the inverse kinematics are analytical and numerical methods. In the first method, the joint variables are solved analytical, when we use classic sinus and cosine description. In the second method, the joint variables are described by the numerical techniques [9].

The whole chapter will be dedicated to the robot arm DOBOT Magician (hereafter DOBOT) shown in Figure 2. The basic parameters of the robotic manipulator are shown in Figure 3 and its motion parameters are shown in Table 1.

Axis | Range | Max speed (250 g workload) |
---|---|---|

Joint 1 base | −90° to +90° | 320°/s |

Joint 2 rear arm | 0° to +85° | 320°/s |

Joint 3 fore arm | −10° to +95° | 320°/s |

Joint 4 rotation servo | +90° to −90° | 480°/s |

This chapter is organized in the following manner. In the first section, we made the forward and inverse kinematics transformations for DOBOT manipulator. Secondly, we made the DOBOT Magician simulation in Matlab environment. Thirdly, we describe the explanation of Denavit-Hartenberg parameters. Finally, we made the pseudoinverse and transposition methods of Jacobian matrix in the inverse kinematics.

## 2. Kinematics structure RRR in 3D

Kinematic structure of the DOBOT manipulator is shown in Figure 4. It is created from three rotation joints and three links. Joint A rotates about the axis *z* and joints B and C rotate about the axis *x*_{1}.

Figure 5 shows a view from the direction of axis z and Figure 6 shows a perpendicular view of the plane defined by z axis and line c.

Kinematic equations of the points B, C, and D, respectively:

Where *ϕ*_{2} = *ϕ* + *γ*.

### 2.1. Forward kinematics

Forward kinematics task is defined by Eq. (10)

where

*X* is position vector of manipulator endpoint coordinates.

*Q* is vector of independent coordinates: *ϕ* = *ϕ*_{1}, *γ*, *δ*.

Because the function *X* = *f*(*Q*) is nonlinear, it is difficult to solve the inverse task *Q* = *f*(*X*) when looking for a vector of independent coordinates (rotation of individual manipulator joints) as a function of the desired manipulator endpoint coordinates. An analytical solution to the inverse task is possible only in the case of a relatively simple kinematic structure of the manipulator (see next chapter).

Therefore, the function *X* = *f*(*Q*) linearized using Taylor series, taking into account only the first four (linear) members of the development:

After editing:

We denoted:

Then, we obtained:

In matrix form:

Where matrix:

is Jacobian matrix. We denoted:

and

Then, we obtained the matrix equation, which represents linearized forward kinematics in incremental form:

After we multiplied the Eq. (32) with inverse matrix *J*^{−1} from the left, we obtained the equation of inverse kinematics.

Where *I* is the identity matrix. After that:

Derivative of the kinematic equations with respect to the independent coordinates for kinematic structure of DOBOT manipulator:

Jacobian matrix:

### 2.2. Analytical Solution of the Inverse Kinematics of DOBOT manipulator

The following equations are derived from Figure 4.

## 3. Simulation DOBOT Magician in Matlab environment

For simulation movement of the manipulator, Matlab Simulink environment and SimMechanics toolbox are suitable to use. Some blocks from SimMechanics toolbox are shown in Figure 7, which represents the model of DOBOT manipulator.

We used basic block from SimMechanics toolbox in simulation model:

Joint actuator

Revolute

Body

Body sensor

Machine environment

The joint actuator block transfers the requested angles to the connected joint. The revolute block defined the rotation of body in space. The body block describes the parameters of body, like dimension, inertia, etc. The body sensor block transfers the coordinates, velocity, and others to simulation, and the last block is the machine environment which defines the parameters of the environment in which the manipulator is located. You can find all necessary data about these blocks in [7].

The simulation model, shown in Figure 8, was designed for considerate results from SimMechanics model, model used D-H parameters and analytical model, which was described in previous chapter. Every result from these models is shown in Figure 9. The fourth part in Figure 9 is the results from analytical simulation model of inverse kinematics. Figure 10 represented the reference angles in the first part of the chart, calculated angles from analytical inverse kinematics model in the second part of chart, and finally the error between both angles. As we can see in Figure 10, the angles are same. This is proof that analytical model of DOBOT manipulator is usable for simulation and implementation to some DSP or microcontroller.

## 4. Denavit-Hartenberg parameters

The steps to get the position in using D-H convention are finding the Denavid-Hartenberg (D-H) parameters, building A matrices, and calculating T matrix with the coordinate position which is desired.

### 4.1. D-H parameters

D-H notation describes coordinates for different joints of a robotic manipulator in matrix entry. The method includes four parameters:

Twist angle

*α*_{i}Link length

*a*_{i}Link offset

*d*_{i}Joint angle

*θ*_{i}.

Based on the manipulator geometry, twist angle and link length are constants and link offset and joint angle are variables depending on the joint, which can be prismatic or revolute. The method has provided 10 steps to denote the systematic derivation of the D-H parameters, and you can find them in [5] or [6].

### 4.2. A matrix

The A matrix is a homogenous 4 × 4 transformation matrix. Matrix describes the position of a point on an object and the orientation of the object in a three-dimensional space [6]. The homogenous rotation matrix along an axis is described by the Eq. (57) (Figures 11–13).

The homogeneous translation matrix is described by Eq. (58).

In rotation matrix and translation matrix, we can find the four parameters *θ*_{i}, *d*_{i}, *a*_{i}, and *α*_{i}. These parameters derive from specific aspects of the geometric relationship between two coordinate frames. The four parameters are associated with link *i* and joint *i*. In Denavit-Hartenberg convention, each homogeneous transformation matrix *A*_{i} is represented as a product of four basic transformations as follows [6]:

D-H convention matrix is given in Eq. (60).

The previous matrix can be simplified by following equation *Ai* matrix. The matrix *A*_{i} is composed from 3 × 3 rotation matrix *Ri*, 3 × 1 translation vector *Pi*, 1 × 3 perspective vector and scaling factor.

### 4.3. T matrix

The T matrix can be formulated by Eq. (62). The matrix is a sequence of D-H matrices and is used for obtaining end-effector coordinates. The T matrix can be built from several A matrices depending on the number of manipulator joints.

Inside the *T* matrix is the translation vector *Pi*, which includes joint coordinates, where the *X*, *Y*, and *Z* positions are *P*_{1}, *P*_{2}, and *P*_{3}, respectively [6].

## 5. The pseudoinverse method

If the number of independent coordinates *n* (joint parameters) is larger than the number of reference manipulator endpoint coordinates *m* (three in Cartesian coordinate system for the point), it shows that a redundancy problem has occurred. In this case, it can exist in infinite combinations of independent coordinates for the only endpoint position. Jacobian matrix J has a size of *m* rows and *n* columns (*m* ≠ *n*), i.e., J is a non-square matrix. In general, it cannot be computed inverse matrix from non-square matrix.

In order to solve inverse kinematics task for this case, pseudoinverse of Jacobian matrix (denotes J^{+}) is used. This method uses singular value decomposition (SVD) of Jacobian matrix to determine J^{+}.

Every matrix J can be decomposed with the usage of SVD to three matrices Eq. (63):

Where

J is *m* × *n* matrix.

U is *m* × *m* orthogonal matrix, i.e. *U*^{−1} = *UT*.

V is *n* × *n* orthogonal matrix, i.e. *V*^{−1} = *VT*.

Σ is *m* × *n* diagonal matrix, which contains singular values of matrix J on its major diagonal.

Where *d* = *m* for *m* < *n* and *d* = *n* for *m* > *n*, because Σ is a non-square matrix.

To determine matrices U and Σ, we multiply matrix J by its transpose matrix J^{T} from the right:

We multiply the above Eq. (67) by matrix U from the right:

It leads to eigenvalue problem for JJ^{T} matrix. U is *m* × *m* square matrix, which contains eigenvectors of JJ^{T} matrix in its columns and ΣΣ^{T} is diagonal matrix of eigenvalues λ_{1}, …, λ_{m}.

To determine matrices V and Σ, we multiply matrix J by its transpose matrix J^{T} from the left:

We multiply the above Eq. (72) by matrix V from the right:

It leads to eigenvalue problem for J^{T}J matrix. V is *n* × *n* square matrix, which contains eigenvectors of J^{T}J matrix in its columns and Σ^{T}Σ is diagonal matrix of eigenvalues λ_{1}, …, λ_{n}.

Matrices JJ^{T} and J^{T}J are symmetric matrices and they have the same nonzero eigenvalues. Eigenvalues and eigenvectors of the real symmetric matrices are always real numbers and real vectors.

The eigenvalues are equal to square of the singular values: *i* = 1, …, *d*. The number of nonzero eigenvalues is *d* = *m* for *m* < *n* and *d* = *n* for *m* > *n*. The number of zero eigenvalues is |*m* − *n*|.

When values of matrices U, Σ, and V were computed, we can determine pseudoinverse of Jacobian matrix as follows:

Where

Now, we can solve inverse kinematics task for the cases, when Jacobian matrix is non-square:

Pseudoinverse J^{+}, also called Moore-Penrose inverse of Jacobian matrix, gives the best possible solution in the sense of least squares [1].

## 6. The Jacobian matrix transpose method

We designed Jacobian matrix transpose method simulation [1–3]. The basic idea was written using Eq. (79). We used the transpose of Jacobian matrix, instead of the inverse of Jacobian matrix, in this method. We set Δ*θ* equal to

Where α is:

Whole simulation is described by block diagram shown in Figure 14. In the first step, we defined requested error. This error represented difference between reference coordinates and actual coordinates. Error that we consider as unacceptable, we set to 200 μm. This is position repeatability of DOBOT. We calculate the increment of requesting angles *Δθ* in each iteration. In the first iteration, *Δθ* is equal to zero.

Figures 15 and 16 represent simulation result of DOBOT movement same as in simulation of Jacobian matrix pseudoinverse. Simulation was split on three parts. First part (solid line in chart) is movement from starting position to position (x, y, z) = (100, 150, 160) mm. Second part (dotted line in chart) is movement from previous position to position (50, 90, 80). And third part (dashed line in chart) is movement to position (150, 180, 140).

## 7. Conclusion

As we can see in simulation results from previous subchapters, every method for inverse kinematics has some positives and negatives. Comparison of both methods is shown in Table 2. Pseudoinverse method is faster than transposition method, but is harder to implement in a DSP or a microcontroller. In Matlab environment, pseudoinverse method is easily made by the pinv() command. If we want to simplify inverse kinematics and we don’t need fast calculating time, it is more readily to use transposition method. In the case of using DOBOT manipulator, it is considered to use the analytical model. In the case of more complicated manipulator, this method is inapplicable.

Simulation part | Pseudoinverse method (number of iterations) | Transposition method (number of iterations) |
---|---|---|

Part 1 (solid line) | 22 | 55 |

Part 2 (dotted line) | 5 | 34 |

Part 3 (dashed line) | 6 | 68 |

Comparison of both methods is shown in Table 2. As we can see in Table 2, the main criteria are number of iterations. Pseudoinverse method is much better, but only for simulation. If we can use this method in real-time application, like dSPACE from MathWorks^{®} or implementation to DSP, we will not achieve such results like in Table 2. It is caused by using singular value decomposition (SVD), which is very demanding for a computation performance. In the other case, transposition of Jacobian matrix is much easier for implementation and need lower performance.

In the next research, we considerate the use suitable iterative method, like damped least squares. We also designed several implementation methods of Jacobian matrix transposition to DSP (TMS430, C2000™). It is very important to try more implementation methods for the most possible shortening of the calculation time.

## Acknowledgments

The results of this work are supported by Grant No. APVV-15-0571: research of the optimum energy flow control in the electric vehicle system.