Open access peer-reviewed chapter

Forward and Inverse Kinematics Using Pseudoinverse and Transposition Method for Robotic Arm DOBOT

Written By

Ondrej Hock and Jozef Šedo

Submitted: 05 April 2017 Reviewed: 03 October 2017 Published: 20 December 2017

DOI: 10.5772/intechopen.71417

From the Edited Volume


Edited by Efren Gorrostieta Hurtado

Chapter metrics overview

2,704 Chapter Downloads

View Full Metrics


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.


  • 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].

Figure 1.

The schematic representation of forward and inverse kinematics.

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.

Figure 2.

DOBOT Magician [10].

Figure 3.

Simple specification of DOBOT [10].

AxisRangeMax speed (250 g workload)
Joint 1 base−90° to +90°320°/s
Joint 2 rear arm0° to +85°320°/s
Joint 3 fore arm−10° to +95°320°/s
Joint 4 rotation servo+90° to −90°480°/s

Table 1.

Axis movement of DOBOT Magician [10].

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 x1.

Figure 4.

Representation of DOBOT manipulator in 3D view.

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.

Figure 5.

Representation of DOBOT footprint.

Figure 6.

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)




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:




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.

Figure 7.

SimMechanics simulation 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.

Figure 8.

Simulation of DOBOT manipulator in Matlab environment.

Figure 9.

Endpoint coordinates of DOBOT manipulator.

Figure 10.

Reference angles, calculated angles, and error between these angles.

Figure 11.

The four parameters of classic DH convention are θi, di, ai, αi [4].

Figure 12.

Simulation result of Jacobian matrix pseudoinverse in inverse kinematics model of the DOBOT manipulator.

Figure 13.

Simulation results of DOBOT axis and total error of coordinates for Pseudoinverse method.

Figure 14.

Block diagram of Jacobian matrix transpose method simulation.

Figure 15.

Simulation result of Jacobian matrix transposition in inverse kinematics model of the DOBOT manipulator.

Figure 16.

Simulation results of DOBOT axis and total error of coordinates for Transposition method.


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:

  1. Twist angle αi

  2. Link length ai

  3. Link offset di

  4. 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 1113).


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


In rotation matrix and translation matrix, we can find the four parameters θi, di, ai, 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 Ai 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 Ai 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 P1, P2, and P3, 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):



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 JT from the right:


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


It leads to eigenvalue problem for JJT matrix. U is m × m square matrix, which contains eigenvectors of JJT 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 JT from the left:


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


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

Matrices JJT and JTJ 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=σi2, where 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 |mn|.

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




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 [13]. 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 partPseudoinverse method (number of iterations)Transposition method (number of iterations)
Part 1 (solid line)2255
Part 2 (dotted line)534
Part 3 (dashed line)668

Table 2.

Comparison of pseudoinverse and transposition method.

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.



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.


  1. 1. Buss SR. Introduction to inverse kinematics with Jacobian transpose, pseudoinverse and damped least squares methods. IEEE Journal of Robotics and Automation. 2004;17:1-19
  2. 2. Balestrino A, De Maria G, Sciavicco L. Robust control of robotic manipulators. In: Proceedings of the 9th IFAC World Congress; 1984;5:2435-2440
  3. 3. Wolovich WA, Elliot H. A computational technique for inverse kinematics. In: Proceedings of the 23rd IEEE Conference on Decision and Control; 1984. pp. 1359-1363
  4. 4. Denavit–Hartenberg [Internet]. 2017. Available from: [Accessed: 03-08-2017]
  5. 5. Desai JP. D-H Convention, Robot and Automation Handbook. USA: CRC Press; 2005 ISBN: 0-8493-1804-1
  6. 6. Rehiara AB. Kinematics of Adept Three Robot Arm. In: Satoru Goto, editor. Robot Arms. 2011. InTech. ISBN: 978-953-307-160-2. Available from: [Accessed: 01-08-2017]
  7. 7. The MathWorks, Inc., SimMechanics 2User’s Guide [Internet], 2007. Available from: [Accessed: 08-04-2017]
  8. 8. Bingul KS. The inverse kinematics solutions of industrial robot manipulators. In: IEEE Conference on Mechatronics; Istanbul, Turkey; 2004. pp. 274-279
  9. 9. Serdar Kucuk, Zafer Bingul. In: Sam Cubero, editor. Robot Kinematics: Forward and Inverse Kinematics, Industrial Robotics: Theory, Modelling and Control. 2006. InTech. ISBN: 3-86611-285-8. Available from: [Accessed 01-08-2017]
  10. 10. WebPage [Internet], 2017. Available from: [Accessed: April 04, 2017]

Written By

Ondrej Hock and Jozef Šedo

Submitted: 05 April 2017 Reviewed: 03 October 2017 Published: 20 December 2017