Open access peer-reviewed chapter

Optimization Approach for Inverse Kinematic Solution

By Panchanand Jha and Bibhuti Bhusan Biswal

Submitted: April 18th 2017Reviewed: October 3rd 2017Published: December 20th 2017

DOI: 10.5772/intechopen.71409

Downloaded: 1238


Inverse kinematics of serial or parallel manipulators can be computed from given Cartesian position and orientation of end effector and reverse of this would yield forward kinematics. Which is nothing but finding out end effector coordinates and angles from given joint angles. Forward kinematics of serial manipulators gives exact solution while inverse kinematics yields number of solutions. The complexity of inverse kinematic solution arises with the increment of degrees of freedom. Therefore it would be desired to adopt optimization techniques. Although the optimization techniques gives number of solution for inverse kinematics problem but it converses the best solution for the minimum function value. The selection of suitable optimization method will provides the global optimization solution, therefore, in this paper proposes quaternion derivation for 5R manipulator inverse kinematic solution which is later compared with teachers learner based optimization (TLBO) and genetic algorithm (GA) for the optimum convergence rate of inverse kinematic solution. An investigation has been made on the accuracies of adopted techniques and total computational time for inverse kinematic evaluations. It is found that TLBO is performing better as compared GA on the basis of fitness function and quaternion algebra gives better computational cost.


  • TLBO
  • GA
  • quaternion
  • kinematics

1. Introduction

Kinematic chain may consist of rigid/flexible links which are connected with joints or kinematics pair permitting relative motion of the connected bodies. In case of manipulator kinematics it can be categorized into forward and inverse kinematics. Forward kinematics for any serial manipulator is easy and mathematically simple to resolve but in case of inverse kinematics there is no unique solution, generally inverse kinematics gives multiple solutions. Hence, inverse kinematics solution is very much problematic and computationally expensive. For real time control of any configuration manipulator will be expensive and generally it takes long time. Forward kinematics of any manipulator can be understand with translation of position and orientation of end effector from joint space to Cartesian space and opposite of this is known as inverse kinematics. It is essential to calculate preferred joint angles so that the end effector can reach to the desired position and also for designing of the manipulator. Various industrial applications are based on inverse kinematics solutions. In real time environment it is obvious to have joint variables for fast transformation of end effector. For any configuration of industrial robot manipulator for n number of joints the forward kinematics will be given by,


where θi = θ(t), i = 1, 2, 3,  …,  n and position variables by yj = y(t), j = 1, 2, 3, …, m.

Inverse kinematics for n number of joints can be computed as,


Inverse kinematics solution of robot manipulators has been considered and developed different solution scheme in last recent year because of their multiple, nonlinear and uncertain solutions. There are different methodologies for solving inverse kinematics for example iterative, algebraic and geometric etc. [8] proposed inverse kinematic solution on the basis of quaternion transformation. [2036] have proposed application of quaternion algebra for the solution of inverse kinematics problem of different configurations of robot manipulator. [35] presented a quaternion method for the demonstrating kinematics and dynamics of rigid multi-body systems. [34] presented analytical solution of 5-dof manipulator considering singularity analysis. [11] presented quaternion based kinematics and dynamics solution of flexible manipulator. [14] proposed detailed derivation of inverse kinematics using exponential rotational matrices. On the other hand, after numerous surveys on conventional analytical and other Jacobian based inverse kinematics are quite complex as well as computationally exhaustive those are not exactly well suitable for the real time applications. Because of the above-mentioned reasons, various authors adopted optimization based inverse kinematic solution.

Optimization techniques are fruitful for solve inverse kinematics problem for different configurations of manipulator as well as spatial mechanisms. Conventional approaches such as Newton-Raphson can be used for nonlinear kinematic problems and predictor corrector type methods can compute differential problem of manipulator. But major drawback of these methods are Singularity or ill condition which converse to local solutions. Moreover, when initial guessing is not accurate then the method becomes unstable and does not converse to optimum solution. Therefore, recently developed metaheuristic techniques can be used to overcome the conventional optimization drawbacks. Literature survey shows the efficiency of these metaheuristic algorithms or bi-inspired optimization techniques are more convenient to achieve global optimum solutions. The major issue with these nature inspired algorithms is framing of objective function. Even these algorithms are direct search algorithms which do not require any gradient or differentiation of objective function. The comparison of the metaheuristic algorithm with heuristic algorithms is based on the convergence rate as it has been proved that the convergence of heuristic-based techniques is slower. Therefore, to adopt metaheuristic techniques such as GA, BBO, teachers learner based optimization (TLBO), ABC, ACO etc. will be suitable for enhancing the convergence rate and yielding global solution. From literature survey the teaching learning based optimization (TLBO) is similar to swarm based optimization in which the impact of learning methods from teacher to student and student to student has been highlighted. Wherein, the population or swarm is represented by group of students and these students gain knowledge from either teacher or students. If these student gain knowledge from teacher then it is called as teachers phase similarly when students learns form student then it is student phase. The output is considered as result or grades of students. Therefore, number for number of subjects resembles the variables of the function and grades or results gives fitness value, [5, 6]. There are numerous other population centered methods which have been effectively applied and shown efficiency [33]. However, all algorithms are not suitable for complex problem as proved by Wolpert and Macready. On the other hand, evolutionary strategy (ES) based methods such as GA, BBO etc. gives better results for various problems and these methods are also population based metaheuristic [16, 28]. Moreover [22] proposed inverse kinematic solution of redundant manipulator using modified genetic algorithm considering joint displacement (Δθ) error minimization and the positional error of end effector. [32] proposed inverse kinematic solution of PUMA 560 robot using cyclic coordinate descent (CCD) and Broyden-Fletcher-Shanno (BFS) technique. [23] proposed IK solution of 4-dof PUMA manipulator using genetic algorithm. This paper uses two different objective functions which are based on end-effector displacement and joint variable rotations. [18] proposed trajectory planning of 3-dof revolute manipulator using evolutionary algorithm. [25] proposed inverse kinematics solution and trajectory planning for D-joint robot manipulator based on deterministic global optimization based method. [1] proposed inverse kinematic solution of redundant manipulator using novel developed global optimization algorithm. [4] proposed inverse kinematic solution of PUMA robot manipulator using genetic programming. In this work, mathematical modeling is evolved using genetic programming through given direct kinematic equations. [17] proposed optimization of design parameter i.e. link length using for 2-dof manipulator. [15] proposed inverse kinematic solution of 2-dof articulated robot manipulator using real coded genetic algorithm. [19] proposed inverse kinematic solution scheme of 3-dof redundant manipulator based on reach hierarchy method. [30] proposed inverse kinematic solution of 3-dof PUMA manipulator for the major displacement propose. In this work they have adopted genetic algorithm with adaptive niching and clustering. [12] proposed inverse kinematic solution of 6-dof MOTOMAN robot manipulator for positioning of the end-effector. In this work they have adopted adaptive genetic algorithm for optimum placement of the end effector. [26] proposed inverse kinematic and trajectory generation of humanoid arm manipulator using forward recursion with backward cycle computation method. [21] proposed inverse kinematic solution for 6R revolute manipulator using real time optimization algorithm. [24] proposed kinematic solution using three different methods such as bee algorithm, neural network which is later optimized by bee algorithm and evolutionary algorithm. [2] proposed kinematic solution of 3-dof serial robot manipulator using real time genetic algorithm. [13] proposed inverse kinematic solution of 6-dof robot manipulator using immune genetic algorithm. [9] proposed conventional approach i.e. penalty function based optimization method for solving IK. Even though few methods can solve hard NP problems, but it requires high-performance computing system and intricate computer programming.

On the other hand, the use of optimization algorithms is not new in the field of multi-objective and NP-hard problem to arrive at a very reasonable optimized solution, the TLBO algorithm have not been tried to solve an inverse kinematics problems and trajectory of joint variables for robot manipulator. Moreover, computational cost for yielding the inverse kinematics solution with adopted algorithms has been compared without any specialized tuning of concern parameters. Therefore, the key purpose of this work is focused on minimizing the Euclidian distance of end effector position based resolution of inverse kinematics problem with comparison of GA and TLBO obtained solution for 5R robot manipulator. The results of all algorithm are computed from inverse kinematics equations and obtained resultant error for data statistics. In other words, end-effector coordinates utilized as an input for joint angle calculations. At the end 4th order spline formula is considered for generation of end effector trajectory and analogous joint angles of robotic arm using TLBO, GA and quaternion. The sectional organization of the paper henceforth is as follows: Section 2 pertains to the mathematical modeling of the 5R robot manipulator and detail derivation of forward and inverse kinematics of 5R manipulator using quaternion algebra. In Section 3 discuss about the inverse kinematic objective function formulation for 5R manipulator. The experimental results as obtained from simulations are discussed elaborately in Section 5.


2. Quaternion vector approach for mathematical modeling

This section deals with mathematical modeling of quaternion vector algebra and application for the derivation of inverse kinematics equations. Quaternion vector methods are fruitful for both rotation and translation of a point, line, etc. with references to origin coordinate system irrespective of homogeneous transformation matrix. The Interpolation of series of rotations and translations are quite complex using Euler’s angle method. In other words, the variables lies in isotropic space which is nothing but sphere surface topology and complex in nature. A brief formulation of quaternion mathematics is given in this section for assessment of references and to create background for mathematical derivation of inverse kinematic.

2.1. Rotation and translation from quaternion

The above discussions gives the importance of quaternions and the necessity of it. The quaternion rotation and translation are lies in four dimensional space therefore it is quite difficult to represent here or to imagine. Figure 1 represents the rotation through quaternion and Eq. (3) describes rotation of a point in a space mathematically.


Figure 1.

Rotation representation of point.

The 4-dimensional space, imagination of fourth axis is quite complex. Therefore, in Figure 1 a unit distance point around axis (X, Y, and Z) is given and which traces a circle. When this rotation circle is projected on a plane then the point P1 can be seen rotated through angle θto point P3 which crosses the mid-point P2. Therefore P1 point is transforming to P3 following by straight line makes cos(θ/2) and sin(θ/2).

Now two quaternions can be represented on the basis of above discussed concept. If there is subsequent rotation of two quaternion h1 and h2 then the composite rotations h1h2 can be given by From Figure 1, p1 is the point vector representing initial position and p3 is the point vector final condition to be transformed. Therefore,


Now pure translations trcan be done by quaternion operator that is given below,


Quaternion transform can be given by,


Therefore, an expression for the inverse of a quaternion can be given as,


where, −h−1 ⊗ P ⊗ h =  − P + [−2k(j × (−P)) + 2j × (j × (−P))] quaternion product, which is defined in the most general form for two quaternions h1 = (r1, j1), and h2 = (r2, j2) as


where j1 • j2 and j2 × j1 denote dot and cross products, between the 3-dimensional vectors j1 and j2. Clearly, quaternion multiplication is not commutative. The set of elements {±1, ±i, ±j, ±k} is known as the quaternion group of order 8 in multiplication.

Similarly vector transformation multiplication can be given as

H1H2=h1P1h2P2=h1h2,h1P2 h11+P1E9

where, h1P2 h11=P2+2r1j1×P2+2j1×j1×P2

2.2. Quaternion derivation for 5R manipulator kinematics

The configuration and base coordinate frame attachment of 5R manipulator is given in Figure 2(a) and MATLAB plot of 5R manipulator is presented in (b). Where θ1, θ2, θ3, θ4 and θ5 joint angles for are articulated arm and d1, d2 and d3 are the link offset. a1, and a2 represents link lengths.

Figure 2.

(a) Base frame and model of 5R manipulator; (b) configuration of 5R manipulator.

Now quaternion for successive transformation of each joint can be calculated from the Eq. (3) as follows,


Inverse of a dual quaternion can be calculated by Eq. (8),


Where in case of 5R manipulator arm n = 5. Now calculating quaternion vector products using Eq. (20)






Now calculating vector pair of quaternion using Eq. (29), to solve the inverse kinematics problem, the transformation quaternion of end effector of robot manipulator can be defined as


Now using Eq. (29), O2 will be given by,


where, o21=wC1¯+cS1¯, o22=aC1¯+bS1¯, o23=bC1¯aS1¯, o24=cC1¯wS1¯, o25=XC1¯a1+YS1¯, o26=YC1¯XS1¯, o27 = Z.



where, o31=C2¯o21+c(C2¯S2¯)w(S2¯S1¯), o32=C2¯o22+S2¯o23, o33=C2¯o23S2¯o22, o34=C2¯o24S2¯o21, o35 =  − ZS2 + XC1C2 + YS1C2 − a1C2, o36 = YC1 − XS1, o37 = a2 − ZC2 + XC1S2 + YS1S2 − a1S2.




Therefore, all the joint variables can be calculated by equating quaternion vector products and quaternion vector pairs i.e. Q1, Q2 and Q3 to O1, O2 and O3 respectively.


where, d4S2 + d4S2 − vx = Z, d4S2 + d4S2 = Z + vx, S2=Z+vxd4


3. Inverse kinematic solution scheme

In this section optimization algorithms are selected for computation of inverse kinematics solution of 5R manipulator. However, there are various types of optimization algorithms existed and can produce the desired IK solution, the major necessity is to achieve global optimum solution with fast convergence rate. Therefore, selection of appropriate optimization algorithm is important for fitness evaluations and GA is so far best known tool, but on the other hand TLBO has also proven its efficiency and performance. Finally selection of optimization algorithms has been made on global searching point, computational cost and quality of the result.

3.1. Optimization approach to solve inverse kinematics

Any Optimization algorithms which are capable of solving various multimodal functions can be implemented to find out the inverse kinematic solutions. The fitness function is given by the Eq. (46) fitness function F(x). Each individual represents a joint variable solution of the inverse kinematic problem for adopted population based metaheuristic algorithm. All individuals moving in D-dimensional search space and sharing the information to find out best fitness value of the function. Each individual contains set of joint angles (θ1, θ2, θ3, θ4 and θ5) of 5R manipulator. The optimum set of joint angle can be find by using appropriate optimization algorithm from given desired position of end effector (X, Y, Z). In case of inverse kinematics of 5R manipulator multiple solutions exist for the single position of the end effector so it is required to find out the best set of joint angle in order to minimize whole movement of manipulator.

For the optimization of joint angle rotation of robot manipulator, one can define objective function or fitness function from joint angle rotation difference and other can be defined from end effector position displacement. These are known as joint angle error and positional function method [3, 7, 10, 29].

3.1.1. Position based function

The current position of the manipulator is described by (39):


Desired position of end effector can be denoted by (40):


Current position of end effector will be compared with the desired position Pd. General equation for the fitness function is given in Eq. (41) that is based on the distance norm of homogeneous Euclidian distance between the current positions to the desired position of end effector Pdevaluated by number of iterations.


Current position Pccan be evaluated from Eqs. (34) through (38). Now putting the value of Pcon Eq. (42)


3.1.2. Joint angle error

Corresponding joint error can be given by the difference between current set of joint variables to the final required angles.


Therefore using square norm the objective function can be given as


Subjected to joint limits


Now overall error minimization can be given by using Eqs. (42) and (45),


where λis proportional weight factor for the minimization of the problem and calculation of the entire joint angles base on constraint can be achieved using fitness function (46). The performance of considered algorithm is checked with the parameters: a1 = 60 mm, a2 = 145 mm, d1 = 150 mm, d2 = 125 mm, d3 = 130 mm. Upper and lower limit of five joint angles are: θ1 = [0, 180]; θ2 = [0, 150]; θ3 = [0, 150], θ4 = [0, 85] and θ5 = [15, 45].

4. Results and discussions

TLBO and GA has been used to compute the inverse kinematics of 5-R manipulator and comparison of obtained results has been made on the basis of quality and performance. Table 1 gives the five random position of end effector and respective inverse kinematics solutions. Current work is performed in MATLAB R2013a. The data sets are obtained from Eq. (34) through (38). The data sets are generated using quaternion vector based inverse kinematics equations as given in Table 2. These generated data sets are used to compare the IK solution through adopted GA and TLBO. In Table 3, comparative evaluations of fitness function and obtained joint variables through TLBO and GA is presented.

PositionsJoint angles
P1(−76.09, 54.36, −61.94)84.55977.518101.7430.61638.697
P2(89.69, 192.55, 90.87)84.79197.25130.4450.77136.428
P3(−4.24, 94.08, 97.55)18.38478.68835.23477.70834.889
P4(29.10,154.02, −31.52)104.43115.47124.117.337233.774
P5(−184.33, −43.21, 8.27)39.177107.1397.05265.67215.374

Table 1.

Five different positions and joint variables.

SNPosition of joints determined through quaternion algebra

Table 2.

Desired joint variables determined through quaternion algebra.

PositionsTLBO joint anglesFunction value
P1(−76.09, 54.36, −61.94)86.59872.16572.16540.89430.4590
P2(89.69, 192.55, 90.87)83.87469.89569.89539.60730.760
P3(−4.24, 94.08, 97.55)84.51270.42770.42739.90930.6860
P4(29.10,154.02, −31.52)85.56671.30571.30540.40630.530
P5(−184.33, −43.21, 8.27)87.81873.18173.18141.46930.3640
PositionsGA Joint anglesFunction value
P1(−76.09, 54.36, −61.94)60.61949.50458.38462.28127.9030
P2(89.69, 192.55, 90.87)88.29334.09114.43915.24151.7380
P3(−4.24, 94.08, 97.55)55.00449.27463.94247.84233.6330
P4(29.10,154.02, −31.52)72.59422.68968.29785.88627.0440.0137
P5(−184.33, −43.21, 8.27)25.66970.58831.34166.80752.8840

Table 3.

TLBO results for joint variable and function value.

This work does not use special tuning of various parameters of GA and TLBO algorithm. In future research the sensitivity analysis can be performed to achieve better results. From Table 3, TLBO generated solutions for the position 4 is better as compared to GA in account of fitness function evaluation. There are different distance based norms, one of them is Euclidean distance norm and which is used here for minimum distance between the end effector positions. If the distance between two points reached to 0 or less than 0.001 than the evolutions of fitness function can be reached best or global minimum value. It is clear that the obtained fitness value is less than the defined distance norm so adopting these algorithms are fruitful and qualitative.

Figures 37 signify the best fitness function value and analogous joint variables for position 1. These figures show efficiency of adopted algorithms for IK solution of 5-R manipulator. The convergence of objective function evaluation lies to zero error for GA and TLBO algorithms while for position 4, GA yields 0.013 error. It means that GA is less performing as compared to TLBO. From Figures 812, the results obtained through GA shows in terms of convergence and histogram graph and the obtained joint angles are in radian which is later converted into degree and given in Table 3. The GA results are obtained through MATLAB toolbox and that shows the zero convergence in single run. Figures 812, it can be seen that the generated solutions for joint angles are multiple for single position and similarly there are multiple fitness function evaluations. The best fitness function achieved here using the termination criteria and the corresponding joint variables has taken for comparison.

Figure 3.

Joint variables and fitness function value for position P1.

Figure 4.

Joint variables and fitness function value for position P2.

Figure 5.

Joint variables and fitness function value for position P3.

Figure 6.

Joint variables and fitness function value for position P4.

Figure 7.

Joint variables and fitness function value for position P5.

Figure 8.

Joint variables and fitness function value for position P1.

Figure 9.

Joint variables and fitness function value for position P2.

Figure 10.

Joint variables and fitness function value for position P3.

Figure 11.

Joint variables and fitness function value for position P4.

Figure 12.

Joint variables and fitness function value for position P5.

The proposed work is performed in dual core system with 4 GB RAM computer. It has been observe that the convergence of the solution for GA is taking less computation time as compared to TLBO and quaternion algebra. Corresponding joint angles trajectory using 4th order cubic spline is presented in Figure 13. Using inverse kinematic solution joint variables are used to calculate the joint space trajectory for TLBO and GA as presented in Figures 14 and 15. Final time has been taken tf = 6 second for trajectory generation but to complete this trajectory overall computational time is 5.674 seconds. The computation time for TLBO is 15.671 seconds which is more than the GA i.e. 7.932 seconds. Therefore, on the basis of computational cost GA is performing better than TLBO while quaternion algebra taken least time (Table 4).

Figure 13.

Trajectory of joint angle for quaternion.

Figure 14.

Trajectory of joint angle for TLBO.

Figure 15.

Trajectory of joint angle for GA.

SNMethodComputational time
1TLBO15.671 s
2GA7.932 s
3Quaternion0.993 s

Table 4.

Computational time for inverse kinematic evaluations.

5. Conclusions

In this paper, the work discourses the problem associated to the optimization of positional and angular error of end effector using TLBO and GA for 5R robot manipulator. Metaheuristic algorithms like PSO, GA, ABC, etc. have been used in various field of industrial robotics but the most critical issue is to solve inverse kinematic problem for any configuration of robot manipulators. Most of the optimization approach are being used for numerical solution but it has been observed that the numerical solutions does not yield solution when the manipulator is in ill-conditioned besides this it has also been observed that classical optimization methods converge in local minima. Therefore in this work global optimization method like TLBO and GA is adopted and after analyzing the results it can be concluded that adopted optimization algorithms convergence rate is higher and complexity does not increase with the manipulator configuration. Although many researchers are tried to obtain global solution but the computations cost are more in the problem henceforth overcoming the problem of computational cost with quaternion objective function.

The adopted algorithms are very much appropriate for constrained and unconstrained problems. To estimate the effectiveness of considered algorithms, comparison has been made with quaternion algebra. Table 3 gives the comparative results of adopted algorithm and proposed quaternion solutions of 5-R manipulator. This work considered forward and inverse kinematic equations for preparing the objective function for TLBO and GA. These adopted algorithms has shown the potential of getting faster convergence and yielding global optimum solution for the stated problem. In future the tuning of various parameters of GA and TLBO can be considered so as to avoid trapping in local minimum point. Even the hybridization of these algorithms may be proposed and adopt for the IK problems.

© 2017 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

Panchanand Jha and Bibhuti Bhusan Biswal (December 20th 2017). Optimization Approach for Inverse Kinematic Solution, Kinematics, Efren Gorrostieta Hurtado, IntechOpen, DOI: 10.5772/intechopen.71409. Available from:

chapter statistics

1238total chapter downloads

2Crossref citations

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

Related Content

This Book

Next chapter

A Random Multi-Trajectory Generation Method for Online Emergency Threat Management (Analysis and Application in Path Planning Algorithm)

By Liang Yang, Yuqing He, Jizhong Xiao, Bing Li and Zhaoming Liu

Related Book

First chapter

A Review of Compliant Movement Primitives

By Miha Deniša, Tadej Petrič, Andrej Gams and Aleš Ude

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More About Us