Abstract
This work presents a methodology to solve the inverse kinematic problem for any kind of robot arm using optimization algorithms. Forward kinematic is usually a straightforward analysis for any robot while inverse kinematic is hard to be solved for many cases. Thus, depending on a set of the forward kinematic equation, the objective function can be formulated to be minimized to find the inverse position. This methodology makes the inverse kinematic very simple operation for all types of the robot, even for those who are complicated with a high degree of freedom. A particle example of 5DOF revolute joint arm was used to present this methodology with source code written in MATLAB for the objective function. Dynamic differential optimization algorithm DDAO was used to minimize the objective. DDAO has promising usage for embedded systems when prototyping a controller that estimates the inverse kinematic as per user request.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
- Inverse kinematics
- Optimization algorithms
- Robotics
- Dynamic differential optimization algorithm
- Particle swarm optimization
1 Introduction
Inverse kinematics [1] is the cornerstone for articulated robots in all daily life applications because all the rest of the robotic processes depends on its output. Articulated arm robot moves by giving joint input variables to the actuators [2], and accordingly, the tip of the arm moves in Cartesian space. This is called forward kinematic, and it is a straightforward operation that does not need serious computations or optimizations. We deal with the motion in Cartesian space because that what is desired for most of the application while the movement in the joint space still in the shadow. The most difficult process is when the inputs are the Cartesian coordinates, and the desired is to find the corresponding joint variables. This is called inverse kinematics which is what we usually deal with most of the robotic applications. In the automotive industry, robots follow a specific trajectory of Cartesian points to do some achievement like welding, cutting, grinding, painting, etc. [3]. Thus, inverse kinematics maps the motion of the tooltip (or just the extreme tip of the arm) from Cartesian space where the tip swims to the joint space where the actuators perform. It is worth mentioning that for simple topology robots, inverse kinematics can be simple and solved by many methods like geometric or analytical solutions. For a complicated high degree of freedom robots, the process will be hard or even impossible to be solved by traditional methods [4]. In this work, we are presenting the formulation of the objective function for inverse kinematics to be solved by any of the optimization algorithms. Dynamic annealed optimization algorithm (DDAO) [5], specifically, proposed to find the inverse solutions for robot arms. What is interesting in this algorithm is that it is independent of the population size, and that makes DDAO perfect for embedded systems applications as we will express in the respective sections.
2 DDAO
Dynamic differential optimization algorithm (DDAO) is a physically inspired optimization algorithm that mimics the process of production dual-phase steel. The mathematical model of the algorithm is expressed as follows:
where rem is the remonder after division on 2, we suggest the same procedure depending on the probability formula described by SA algorithm
where Sk is a new solution proposed for the iteration number (k), k = 1…n where n is the number of iterations, and Sci and Scj, are randomly chosen solutions from the population with random (i) and (j) indices. Sr is a randomly generated solution within the search space of the problem out of the population. P is the probability of accepting a new solution, \( \Delta E \) is the difference between the objective value of the proposed solution from Eq. (1) and the objective value of the solution SL, which is a solution of index L in the population, L = 1,…, population size. T is the temperature variable, which should start with high value and be updated during iterations constantly to a lower value. The proposed solution can be accepted if P > random number \( \in \left[ {0,1} \right] \). At the beginning of the search, T starts with high value; consequently, P will be close to one, according to Eq. (3). This means that a wide range of random numbers can be less that one and the solution will be selected. At the low value of T, the probability P will be close to zero; according to Eq. (3), this means that a very narrow range of random numbers could be less than P and the solution is less likely to be selected. The pseudocode illustrated below.
Initialize population Xi (i = 1,2,…,n) Initialize parameter T, cooling rate Calculate the cost of each solution Xb= The best solution While (t < Max iteration) Initialize sub-population S Calculate the cost of the sub-population Sort sub-population Sr= Best solution in sub-population Choose two random solutions Xm and Xn from population Calculate Sk from Eq. (1) Sort population X foreach solution in population X if there is an improvement Xi= Sk otherwise, replace the worst solution in population X using Eqs. (3) and (4) endif endfor Update Xb T = T*cooling rate t = t+1 endwhile return Xb
DDAO has a unique characteristic which is that it is independent of population size, this means that it uses the minimum size of the RAM when considering the population size of three individuals. Of course, other algorithms like particle swarm optimization [6], genetic algorithm [7], grey wolf optimization [8]. These algorithms can be used by setting population size as minimum as possible and what is the best algorithm for the inverse kinematic problem is left to the reader for future works.
3 Practical Example
In this study, LabVolt 5150 robot manipulator [9] is used to apply the proposed methodology of calculating the inverse kinematics using optimization algorithms. It is a 5 DOF manipulator; its rotational axes are base, shoulder, elbow, pitch and roller rotation, the manipulator equipped with a griper and all the revolute joints actuated by fife stepper motors. Figure 1 shows this robot manipulator, Fig. 2 expresses the configuration pace of the robot, and Fig. 3 reveals the frame assignment. According to the model shown in Fig. 2, the spatial parameters are estimated for each link, as shown in Table 1.
By using Denvit-Hartenberg convention [10], the homogenous transformation matrix HTM for the links are calculated as follows:
equation (10) is \( 4 \times 4 \) matrix holds the orientation and position vector of the end-effector with respect to the base frame, as revealed in Eq. (11) and Eq. (12).
4 Objective Function
This is the problem of finding the joint variables from the given position and orientation of the end-effector. While forward kinematics is detecting the position and orientation of the end effector from the given set of joint variables, inverse kinematics is the inverse operation, but it is somewhat complicated.
While forward equations are a straightforward process, we will rely on these equations to establish the objective function for the inverse problem.
Here we looking for an optimum set of joint variables that can lead to the minimum of a cost function, the only thing to do is developing cost function for the inverse Kinematic. Consider Fig. 4, for a specific robot configuration, the current position vector of the end-effector can be represented by the distance from the base of the end-effector of the manipulator while the desired position vector represents the task point. Obviously, if the difference between these two vectors is zero, then the tooltip will be in the right position at the task point, and this is the objective function f of the inverse problem
Where Ci denotes the instantaneous position vector, and De is the desired position vector. In other words, Eq. (14) is the function that has to be minimized as much as possible, and it just the distance between the end-effector and task point.
Where t refers to the task point coordinates which is given for the inverse kinematic problem.
If Eq. (15) has been used alone as an objective function, we may get the end-effector in the task point but with many choices of orientations.
5 The Procedure of the Objective Function
In this section, we shall model the objective function for the inverse kinematic of any robot manipulator. Figure 5 shows a schematic diagram for the inverse problem; it is more descriptive to explain the procedure by a set of notes as follows.
-
1.
Optimization algorithm sent the candidate solution, which is a set of possible joint variables, to the cost function to evaluate its fitness.
-
2.
Cost function contains the desire task point coordinates; it sends the possible solution to Forward function to get x, y, and z coordinates of the tooltip.
-
3.
Forward function contains all the forward kinematic equations of the robot arm, by substituting the candidate solution to that equations we can get the overall homogenous transformation matrix by a repeated call for HTM function. The output of the Forward function is the position vector of the total transformation matrix.
-
4.
Cost function will receive the position vector and apply Eq. (15) to the candidate vector and the desired task position vector. The result is the fitness of the solution that will be back to the main optimization algorithm.
This process is constant for all types of manipulators; the only thing to change is the forward kinematic equations and the task position vector. It is worth mentioning that not all optimization methods can return a guaranteed solution; this depends on the efficiency of the algorithm itself.
The implementation of this methodology has a great significance on robot autonation, consequently, facilate and increase the productivity especially in aumotive engineeering. The automotive enginnering has wide applications for robots where they can be used in many cases and many operations [11, 12].
6 Implementation of the Objective Function
The problem for LabVolt 5150 consists of five variables with lower and upper limits shown in Table 1, for a given point in space \( v \in R^{3} \) the objective is finding the best corresponding joint angles that drive the end-effector to that point. From optimization algorithm, the candidate solution (sol) is transferred to the cost function (cost):
For each candidate solution, we have to calculate the corresponding forward kinematic to find the position vector in Eq. (12) to be used in Eq. (15) to estimate the objective. Thus, the candidate solution v is transferred to the forward kinematic equations function (Forward). In this function, the spatial parameters are defined for each link considering data in Table 1:
For general usage, we have developed separated function (HTM) to return the homogenous transformation matrix described by Denavit matrix.
The source code described above is general, one can solve the inverse kinematic of any robot just by replacing the proper spatial parameters and define them in function (Forward). According to the number of links, less or more Denavit matrices can be estimated H_6,…, H_n. The function (HTM) is still valid for all types of robot manipulators without changes.
7 Conclusion
Optimization algorithms are proposed to find the solution for the inverse kinematic problem for robots of any type by optimizing the minimization objective function. The proposed optimization algorithm is dynamic differential annealed optimization, which is simple, fast, and uses low space of the memory of host machines or target devices. A practical example of 5DOF revolute joints manipulator, LabVolt 5150, was considered for the inverse problem. The described methodology is quite simple and can simplify the hard problem of inverse kinematic greatly and make it simple, straightforward operation. The proposed DDAO does not promise a perfect solution, and many other optimization algorithms should be tested to find a solution for the inverse problem, and that is proposed for future works.
References
Spong, M.W., Hutchinson, S., Vidyasagar, M.: Robot modeling and control (2006)
Craig, J.J.: Introduction to robotics: mechanics and control, 3/E. Pearson Education India (2009)
Ghafil, H.N., Jármai, K.: Optimization for Robot Modelling with MATLAB. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-40410-9
Lee, C.S.G.: A Geometric Approach in Solving the Inverse Kinematics of PUMA Robots–College of Engineering. The University of Michigan, Ann Arbor (1983)
Ghafil, H.N., Jármai, K.: Dynamic differential annealed optimization: new metaheuristic optimization algorithm for engineering applications. Appl. Soft Comput. 93, 106392 (2020)
Jiang, Y., Hu, T., Huang, C., Wu, X.: An improved particle swarm optimization algorithm. Appl. Math. Comput. 193(1), 231–239 (2007)
Whitley, D.: A genetic algorithm tutorial. Stat. Comput. 4(2), 65–85 (1994)
Mirjalili, S., Mirjalili, S.M., Lewis, A.: Grey wolf optimizer. Adv. Eng. Softw. 69, 46–61 (2014)
Al-Saedi, F.A.T., Mohammed, A.H.: Design and implementation of chess-playing robotic system. Int. J. Sci. Eng. Comput. Technol. 5(5), 90 (2015)
Bi, Z.M., Gruver, W.A., Zhang, W.-J., Lang, S.Y.T.: Automated modeling of modular robotic configurations. Rob. Auton. Syst. 54(12), 1015–1025 (2006)
Jármai, K., Bolló, B.: Vehicle and Automotive Engineering 2: Proceedings of the 2nd VAE2018, Miskolc, Hungary. Springer (2018). ISBN 978-3-319-75677-6
Jármai, K., Bolló, B.: Vehicle and Automotive Engineering: Proceedings of the JK2016, Miskolc, Hungary. Springer (2018). ISBN 978-3-319-51189-4
Acknowledgments
The research was supported by the Hungarian National Research, Development and Innovation Office - NKFIH under the project number K 134358.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Ghafil, H.N., Jármai, K. (2021). Optimization Algorithms for Inverse Kinematics of Robots with MATLAB Source Code. In: Jármai, K., Voith, K. (eds) Vehicle and Automotive Engineering 3. VAE 2020. Lecture Notes in Mechanical Engineering. Springer, Singapore. https://doi.org/10.1007/978-981-15-9529-5_40
Download citation
DOI: https://doi.org/10.1007/978-981-15-9529-5_40
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-15-9528-8
Online ISBN: 978-981-15-9529-5
eBook Packages: EngineeringEngineering (R0)