1.
Introduction
Robotics is an inspiring and ever-growing field of engineering with an array of applications across a broad range of industries. Robotics involves the design, development, simulation, management, use in administrative offices, exploration of space, and application of robots to automate tasks that would otherwise require a human work force. The robots of today help humans through their everyday routines and do many mundane tasks [1]. An industrial manipulator is a versatile robot that operates autonomously. Industrial manipulators are becoming increasingly popular in a broad range of industrial applications such as production lines, painting, welding, assembly, etc., due to their benefits of large workspace, compact construction, and excellent adaptability [2]. For these tasks to be done correctly, the robots must be accurate [3].
The KUKA KR 22 R1610-2 industrial manipulator is a specific model of robot produced by KUKA. It was chosen as an illustrative case study due to the unique characteristics that make it ideal for kinematic analysis. It has six degrees of freedom (6-DOF) with a spherical wrist, which allows for a wide range of motion and a high level of flexibility. This makes it an ideal subject for studying the kinematics of a robot with a high degree of complexity [4]. Compared to other robots, the KUKA KR 22 R1610-2 is a compact robot with a high payload capacity and reach, making it suitable for a wide range of applications, especially in small to medium-sized manufacturing [5].
The intricate issue of robot motion is known as robot kinematics [6]. Finding the conversion from cartesian space to joint space and back is connected to the kinematics issue [7]. Any robot manipulator's kinematics issue has two sorts of solutions: forward kinematics and inverse kinematics [8]. In robotics, forward kinematics is used to determine the position and orientation of the end effector, such as a gripper or tool, based on the angles of rotation of the joints of the robot's manipulator [9]. The process of forward kinematics typically involves solving a set of equations called the forward kinematics equations, which describe the relationship between the angles of rotation of the joints and the position and orientation of the end effector or bones in the system. To move the end effector into the desired position and orientation in a reference frame, a set of joint variables must be identified for the given end effector position and orientation. It is known as inverse kinematics [10].
Robotics research is based on manipulator kinematics, which shows the relationship between the robot's final position and its kinematic parameters [11]. Robot path planning and motion control research start with manipulator kinematics analysis [12]. Manipulators are rigid chains with revolute or prismatic joints. Manipulator joint locations are relative to adjacent joints. Notably, 4×4 homogeneous transformation matrices with robot orientation and position data define joint relationships [13]. Robot degrees of freedom depend on transformation matrices. These transformation matrices generate n-DOF manipulator orientation and position [6]. Forward kinematics calculates the robot manipulator's end effector location and orientation from joint angles [14]. The Denavit-Hartenberg (D-H) Convention determined the homogeneous matrix from four consecutive movements that integrate the end effector's translational and rotational motions concerning the manipulator base [15]. The manipulator's inverse kinematics are harder to solve [16]. Inverse kinematics has nonlinear equations, singularities, and many solutions [17]. The joint variable motions must be computed to discover all possible forms for going from the end effector position to the base position [18].
There are many types of kinematics solution methods that depend on the kinematics type. One solution method approach for forward kinematics serial chains is to simply concatenate transformations between frames set in neighboring links of the chain [19]. In inverse kinematics, several different methods have been proposed to solve this problem, including analytical methods, numerical methods, and machine learning-based methods [20]. Analytical methods, such as closed form solutions, are based on mathematical equations that can be used to calculate the joint angles of a robotic system. These methods are computationally efficient and provide accurate solutions, but they are often limited to specific types of robotic systems, such as serial robots, and may not be able to handle complex or variable systems [21]. Algebraic methods and geometric methods like the roboanalyzer and Peter Corke robotics toolbox are also analytical methods [22]. Various methods for solving inverse kinematics can be summarized and illustrated in Figure 1.
Roboanalyzer is a 3D model-based solution with multiple modules that may be used to efficiently visualize different robotics topics. It can display D-H parameter animation and conduct forward and inverse kinematics, as well as dynamic analyses of serial robots [23]. Peter Corke's robotics toolbox is an open-source toolbox for robotic systems. This toolbox contains a collection of functions and tools for robotic systems that allow users to easily implement and test robot control and vision algorithms [24]. Numerical methods, such as iterative methods, use numerical techniques to find a solution to the inverse kinematics problem. These methods are more flexible than analytical methods and can handle a wide range of robotic systems, but they can be computationally expensive and may not always converge to a solution. Symbolic elimination methods and continuation methods are also numerical methods [16]. Machine learning based methods use techniques from machine learning, such as artificial neural networks (ANNs), to learn from data and make predictions. These methods are effective for solving the inverse kinematics problem, particularly for complex and variable systems [25]. However, these methods require large amounts of data for training, and their performance can be influenced by the choice of hyper parameters. adaptive neuro fuzzy inference system (ANFIS), genetic algorithm (GA), bat algorithm (BA), differential search (DS), artificial bee colony (ABC), particle swarm optimization (PSO), and differential evolution (DE) are also machine learning based methods [26].
Particle swarm optimization is a population-based metaheuristic optimization algorithm developed by Kennedy and Eberhart in 1995. Inspired by the social behavior of bird flocking or fish schooling, PSO simulates the collaborative movement of particles in a search space to find optimal solutions. PSO maintains a population of candidate solutions, called particles, which fly through the search space and update their positions based on the influence of their own best-known position and the best-known position in the swarm [27]. PSO has been proven to be a promising alternative for solving IK problems. In PSO-based IK, the particles represent the joint angles, and their positions are updated according to the fitness function, which measures the distance between the current end-effector position and the desired one. The particles also communicate with each other to share information and improve their positions, mimicking the social behavior of birds or fish. One advantage of using PSO for IK is its ability to handle non-linear constraints. Unlike traditional methods, PSO does not require the computation of Jacobians or the inverse of the kinematic equations, making it more efficient and suitable for real-time applications. Furthermore, PSO is a population-based algorithm, meaning that it can explore a larger area of the search space and is less likely to get trapped in local optima [28].
In recent years, there has been a significant amount of research conducted in the field of inverse kinematics, with numerous studies addressing various aspects of the problem. One tool that has been integral to the advancement of the robotics field is Peter Corke's robotics toolbox for MATLAB. The toolbox provides users with the ability to quickly and easily design, program, and stimulate robotic systems. The robotics toolbox has been used to solve the inverse kinematics of a PUMA 560 robot and has been found to provide a simple and efficient solution [24]. According to Peter Corke, MATLAB has several toolboxes that can be used to improve the learning experience in robotics and vision.
Several studies have been conducted to examine the potential of using the robotics toolbox as a visualization and control tool for manipulator kinematics. In a study performed by Sadanand et al. [29], it was found that a virtual robot module within the toolbox could be an effective visualization tool for introducing robotics to students. Another study found that the robotics toolbox was able to determine the joint angles accurately and efficiently for a given end effector position of a 6-DOF manipulator [30]. In a study by Yu Long et al. [31], it was found that the robotics toolbox could control 7-DOF manipulators with high precision, allowing the robot to move along a desired path. Additionally, research by Long et al. [32] found that MATLAB and the robotics toolbox could be used for the simulation of robotic arms, and the developed simulation model was found to be accurate enough for use in industry applications.
Zhang et al.[33] studied the critical aspect of enhancing the positioning accuracy reliability of industrial robots by employing probability and evidence theories. By incorporating probability theory, which deals with the quantification of uncertainty, and evidence theory, which focuses on handling uncertainties and imprecise information, the researchers aim to advance the reliability of positioning accuracy in industrial robot systems. Probability theory-based methods are commonly used to evaluate the positioning accuracy reliability of industrial robots. The suggested aleatory-epistemic hybrid model describes parameters of industrial robots that are not always clear, which helps build the kinematic equation. The study establishes a probability-evidence hybrid reliability analysis model that provides a reliability interval for industrial robots under various thresholds. The effectiveness of the proposed method is demonstrated through the application of a six-degrees of freedom industrial robot. Zhang and Han [34] propose an efficient reliability analysis method to predict the kinematic reliability of robotic manipulators by accounting for the random dimensions and joint angles of robotic mechanisms. The method defines kinematic reliability as the probability that the actual position of an end-effector falls within a specified tolerance sphere centered at the target position. The motion error is indicated by a compound function of independent standard normal variables constructed by three co-dependent coordinates of the end-effector. The saddle point approximation is applied to compute kinematic reliability, resulting in satisfactory accuracy and efficiency compared to random simulation methods. Zhang et al. [35] performed an in-depth study of the reliability of kinematic trajectory accuracy for industrial robots while considering intercorrelations among multi-point positioning errors. The research highlights the significance of understanding and evaluating the reliability of kinematic trajectories in industrial robotic systems, which play a pivotal role in ensuring precise and efficient operations. By examining the intercorrelations among multi-point positioning errors, the study offers valuable insights into the complexities of industrial robot performance. This analysis is crucial for enhancing the overall accuracy and reliability of industrial robots, ultimately contributing to improved productivity and quality in manufacturing processes. Zhang et al.'s results show how multi-point positioning errors and the reliability of kinematic trajectories are closely connected.
Bahuguna et al. [36] solved the forward and inverse kinematics of a 6-DOF robot arm and showed that a roboanalyzer helped students understand robot motion and develop and analyze robotic devices. Thus, roboanalyzer are essential for robot kinematics education. Mehta et al. [23] created a roboanalyzer teaching pendant. An operator interfaces input commands, and a robot's graphical representation display the motion. The teaching pendant also generated robot program code for later usage. The technology accurately generated motion on multiple virtual robots. Gupta et al. [37] discussed how roboanalyzers may assist robot technicians to analyze problems quickly and efficiently. Roboanalyzer displays robot data in an easy-to-use graphical user interface, according to the creators. Roboanalyzer also lets technicians zoom in to review data and easily access faulty robot parts for diagnosis and repair. Othayoth et al. [38] developed a roboanalyzer to simplify robot kinematics analysis and simulation. Other roboanalyzer features include the ability to produce code for controlling a real-world robotic system and visualize its motion in 3D. SS Chauhan and Khare [18] conducted a study using the roboanalyzer software. Their investigation demonstrated that the robot could duplicate its desired movements and complete tasks efficiently. The analysis increased the robot's kinematic performance. The study shows that roboanalyzers help industrial robots do kinematic analysis. Chang [39] proposed a closed form solution to the challenging problem of controlling manipulators with kinematic redundancy. This solution focused on the use of a linear combination of the positioning and velocity task space components. By combining the two components, a more robust control system could be implemented, and a more stable solution could be found. Chang [40] provided a closed form approach for robot manipulator inverse kinematics with redundancy. The Generalized Inverse Jacobian (GINJ) approach underpinned this solution, which claimed to be more efficient than previous numerical methods. Chang's technique solved the inverse kinematics issue of robotic manipulators with redundancy simply and efficiently, advancing robotics. Chen and Gao [41] discussed the development of a closed form inverse kinematics solver for reconfigurable robots, with a specific focus on the closed form solution for the inverse kinematics problem of a reconfigurable robot. The algorithm proposed by the authors was tested on a reconfigurable robot, and the results showed that the algorithm provided satisfactory solutions for a variety of configurations.
Gao et al. [42] provided an extensive analysis of the uncertainties involved in the kinematics of cable-driven parallel robots. The research focuses on developing an error transfer model to quantify and assess the impact of uncertainties on the robot's kinematic performance. By incorporating uncertainties into the kinematic model, the study aims to provide a more comprehensive understanding of the robot's behavior under varying conditions. The research establishes an inverse kinematic model for a CDPR used for picking up medicines, considering the radii of fixed pulleys. The influence of the radii of fixed pulleys on errors in cable lengths is explored. An error transfer model and an evidence theory-based uncertainty analysis method (ETUAM) are presented to analyze the uncertain sources of cable lengths in CDPRs. The ETUAM demonstrates accuracy and efficiency in kinematic uncertainty analysis compared to the vertex method and Monte Carlo method. Zhang et al. [43] evaluate the effectiveness of statistical moment-based methods for assessing the reliability of industrial robots' positional accuracy. They explore the significance of statistical moments as key descriptors for characterizing the distribution of positional errors in robotic systems. Three different statistical moment-based methods are applied in the study: the sparse grid numerical integration (SGNI) method, the point estimation method (PEM), and the univariate dimension reduction method (UDRM). The kinematics model of industrial robots is established using the Denavit-Hartenberg method. The SGNI method is found to have the best computational accuracy, while the PEM method exhibits the highest computational efficiency among the three methods. The positional accuracy reliability of industrial robots is quantitatively evaluated using these methods and compared with the results from the monte carlo simulation (MCS) method. Zhao et al. [44] delved into the complexities of assessing the reliability of robotic manipulators in dynamic environments. The study addresses the issue of time-dependent system kinematic reliability analysis for robotic manipulators, which is an area that has receive limited investigation. The proposed method in the research is based on the first-passage method and calculates the outcrossing rate to determine the time-dependent system kinematic reliability. Using Lie group theory, the authors come up with a closed-form answer for the covariance of the joint distribution of the pose error and its derivative. The outcrossing rate is calculated by decomposing the outcrossing event of the pose error and determining the first-order moment of a truncated multivariate Gaussian. The paper deduces an analytical formula for the outcrossing rate based on the independent assumption that outcrossing events occur independently. The effectiveness of the proposed method is demonstrated using a six-degrees-of-freedom (6-DOF) robotic manipulator, and it is compared with Monte Carlo simulation and the finite-difference-based outcrossing rate method.
Danaci et al. [27] proposed a particle swarm optimization approach for solving the inverse kinematics problem in robotic manipulators. The PSO approach provides a comprehensive solution for both the position and orientation of the robot end effector. The results show that QPSO is more efficient than PSO, FA, and ABC for solving IK. Abdor-Sierra et al. [45] delved into a comparative analysis of metaheuristic algorithms to address the challenge of solving the inverse kinematics problem in robot manipulators. The study evaluates various metaheuristic algorithms, including genetic algorithms (GAs), particle swarm optimization (PSO), and artificial bee colony (ABC) optimization, among others, in tackling the inverse kinematics problem. Comparative analysis provides insights into the strengths and limitations of each algorithm in terms of convergence speed, solution quality, and computational complexity when applied to robot manipulators. Liu et al. [46] proposed a novel approach to solving the inverse kinematics problem for manipulators using a combination of Inverse Particle Swarm Optimization (IPSO) and Back-Propagation Neural Network (BPNN) algorithms. The proposed method aims to improve the accuracy and efficiency of inverse kinematics solutions for manipulators by integrating IPSO, which is known for its global optimization abilities, with BPNN, which is a powerful machine learning technique. The proposed method solves the inverse kinematics of the UR3 manipulator, and the output error of the joint angle obtained is less than 0.1 degrees.
Although the listed literature shows promising methods and significant results in addressing manipulator kinematics strategies there is still room for further research and improvements in the field of manipulator kinematics to fill the following research gaps:
● Despite the potential of using the robotics toolbox as a visualization and control tool for manipulator kinematics, there is a lack of studies that have examined KUKA KR 22 R1610-2 in industry applications.
● There is a gap in research on the use of roboanalyzers in industry applications, specifically in terms of their ability to assist with robot diagnosis and repair.
● There is a lack of research comparing different inverse kinematics methods and their potential advantages and disadvantages for specific manipulator types or applications.
● There is a need for further research on closed form inverse kinematics algorithms for continuum manipulators, as current methods may not be accurate when the manipulator is subject to external forces.
● The research on the closed form solution for the inverse kinematics problem of a reconfigurable robot is limited.
Overall, the research indicates that while there have been advances in the field, there is still room for further research and improvements in the field of manipulator kinematics. However, each of these methods has its own set of advantages and limitations, and the selection of the appropriate method is dependent on the specific characteristics of the robotic system and the requirements of the application. The present work aims to fill the presented research gaps and solve the manipulator kinematics problem using mathematical simulation with MATLAB, roboanalyzer software, the Peter Corke robotics toolbox, and the particle swarm optimization. The results of this study are then compared with the results available in the literature to assess their accuracy and efficiency. The goal is to obtain good agreement between the results of this study and those found in previous research. Additionally, this paper aims to evaluate the potential of using the robotics toolbox as a visualization and control tool for manipulator kinematics, the PSO as an optimization tool for solving the inverse kinematics problem, and the roboanalyzer software for robot kinematics education and analysis. This work provides the following contributions:
● Advanced Kinematic Analysis: Provides an in-depth examination of the KUKA KR 22 R1610-2, emphasizing operational strengths and practical limitations in industrial settings.
● Unique Simulation Framework: Introduces a novel, validated simulation framework for evaluating manipulator performance, offering precise simulations and predictions.
● Validated Research Methodologies: Empirically validates our analytical methods against existing literature, ensuring the accuracy, and reliability of our findings.
● Broad Applicability: Delivers actionable insights for the KUKA KR 22 R1610-2's use in industrial automation, robotics research, and education, fostering future advancements.
● Kinematics Analysis Using Particle Swarm Optimization (PSO): Applies the PSO algorithm to accurately solve the inverse kinematics problem for the KUKA KR 22 R1610-2, targeting precise end-effector positioning.
The structure of this paper is composed of four distinct sections. Section 2 provides a comprehensive examination of the kinematics of the manipulator, which is divided into two subsections: forward kinematics and inverse kinematics. In Section 3, the simulation results of forward and inverse kinematics are presented using mathematical simulation, the roboanalyzer software, the Peter Corke robotics toolbox, and particle swarm optimization. Section 4 offers an illustrative case study. In-depth discussion of the obtained results is presented in Section 5. Lastly, Section 6 presents the conclusions drawn from the research presented in the paper.
2.
Materials and methods
2.1. Kinematics analysis of manipulator using mathematical formulation
The study of mechanism motion without considering the driving forces is known as kinematic analysis. The primary goal of the kinematic analysis is to determine the characteristics of the end effector of a manipulator concerning the manipulator base, like its location, displacement, velocity, and acceleration. Kinematic analysis is based on the geometrical connection between the robotic linkages and their joints, which can be described with several scenarios of motion, such as Denavit-Hartenberg parameters, to investigate the robot's motion [47]. Kinematics plays a significant role in controlling serial manipulators in a variety of applications [48]. The solutions of any manipulator kinematics are divided into two categories: forward kinematics and inverse kinematics. The forward kinematics of the manipulator point to the calculation of its end effector orientation and position from the values of joint angles, while the inverse kinematics point to the calculation of the values of joint angles from the end effector orientation and position [49]. The forward and inverse kinematics of the manipulator must be solved for kinematic modeling [50]. Kinematics analysis can be summarized as shown in Figure 2.
2.1.1. Forward kinematics
Forward kinematics is known as the method of estimating the pose of the end effector (location and orientation) with specified joint angles [50]. To highlight the connection between the coordinate systems and to define the location and orientation of connecting links, each connecting link was developed in its own coordinate system [14]. The coordinate transformations are defined using the Denavit-Hartenberg convention (D-H parameters) approach, as shown in Figure 3 [52]. Joint angle, joint offset, link length, and twist angle are four factors that determine the transformation between coordinates associated with the joints between two links, which were described as shown in Tables 1 and 2 [53]. Forward kinematics is solved with the Denavit-Hartenberg convention method [30].
Each homogeneous transformation is the result of four fundamental transformations, as shown in Eqs (2.1) and (2.2) [54].
For a link n the transformation matrix is as follows:
As demonstrated in Figure 4 (a), the KUKA KR 22 R1610-2 industrial manipulator has six degrees of freedom. This manipulator is located at Horus University in Egypt's Faculty of Engineering. Figure 4 (b) depicts the manipulator dimensions, workspace, and joint-to-joint distances [4]. In Figure 4 (c), the first three axes of the robot, A1, A2, and A3, are referred to as "major axes" because they are responsible for determining the end effector position, whereas the other three axes, A4, A5, and A6, are referred to as "minor axes" because they are used for describing the end effector to the specified position, and the minor axes contribute to end effector orientation. Figure 4 (d) shows D-H parameter frames for each axis of rotation [30]. First, choose the z-axis along the joint rotation axis, then choose the x-axis based on the joint rotation direction. Industry and research utilize this. For forward and inverse kinematic analysis, this model is used [18].
The D-H parameters of the manipulator are shown in Table 3. If it used the D-H parameter as a guide, it could figure out the matrix transformation of each frame coordinate starting, at link n and going all the way up to link n+1 [2]. Because none of the joints can be entirely rotated by 360 degrees, all the joints have constraints on the lowest and greatest angle of rotation of which they are capable. These rotational limitations of movement for various joints are provided in Table 3. These limitations are going to be used in an inverse kinematics analysis later [18].
To solve forward kinematics and obtain the end effector's pose, first calculate each coordinate of the transformation separately using Eq (2.2) and then plug the values from Table 3 into Eq (2.2) to obtain transformation matrices of the six joints [12]. It is initiated by analyzing the kinematics of the first joint, situated at the base of the robot, and subsequently proceeding to the second joint, then the third joint, and so on, until the final analysis of the end effector is achieved [55]. The transformation matrices of the six joints are calculated as shown in Appendix A from Eqs (5.1)–(5.6).
T06 is a homogeneous transformation matrix of six degrees of freedom manipulator, and nx, ny, nz, ox, oy, oz, ax, ay, az, px, py, andpz are functions of θ1, θ2, θ3, θ4, θ5, and θ6 where nx, ny, nz, ox, oy, oz, ax, ay, and az express the orientation of the manipulator end effector and px, py, pz represent the position of the end effector [56]. The forward kinematics equations (total transformations) of the KUKA KR 22 R1610-2 manipulator are calculated using Eq (2.3) as shown in Eq (2.4)–(2.15). Cn stands for Cosθn, and Sn stands for Sinθn, and so on.
2.1.2. Inverse kinematics
Inverse kinematics is more complicated than forward kinematics [12]. Inverse kinematics plays a crucial role in trajectory planning and motion control; on the other side, forward kinematics estimates the pose of the end effector [14]. Many solutions, such as geometric and algebraic analysis, are employed to obtain the inverse kinematics when the manipulator's system structure is considered [50]. In inverse kinematics, for any location and orientation, the angles of joint θ1, θ2, θ3, θ4, θ5, and θ6 can be calculated [57]. To calculate the joint angles of a six degree of freedom manipulator, multiply the transformation matrix in Eq (2.3) by A−1n on both sides of the equation sequentially for n = 1, 2, 3, 4, 5, 6 as shown in Eqs (2.16)–(2.20), then solve the resulting equations derived by equating terms on both sides of matrices as shown in Eqs (2.21)–(2.42). The inverse of transformation matrices is calculated as shown in Appendix A, from Eq (5.7) to Eq (5.11).
The use of trigonometric equations aids in the development of simple solutions. Multiply the Eq (2.3) by A−11 on R.H.S. and L.H.S.:
Equating (R33) and (R34) elements of both matrices:
Multiply the Eq (2.21) by A−16 on R.H.S. and L.H.S.:
Equating (R14) and (R24) elements of both matrices:
Multiply the Eq (2.3) by A−11, A−12, A−13 on R.H.S. and L.H.S.:
Equating (R13), (R23), and (R33) elements of both matrices:
Multiply the Eq (2.3) by A−15, A−14, A−13, A−12, A−11 on R.H.S. and L.H.S.:
Equating (R31) and (R32) elements of both matrices:
2.2. Kinematics analysis of manipulator using toolbox and software
Inverse kinematics is a powerful tool used in robotics, animation, and computer aided design (CAD) to calculate the motion of a robotic arm or other mechanical systems. It is used to calculate the joint angles of a robotic arm or other mechanical systems to achieve a desired end effector position [38]. Inverse kinematics is a complex problem, and there are a variety of toolboxes and software packages available to help solve it, as shown in Figure 5. One of the most popular toolboxes for inverse kinematics is the robotics toolbox for MATLAB (the Peter Corke toolbox) [58]. This toolbox provides a set of functions and classes for solving inverse kinematics problems. It includes functions for calculating joint angles, forward and inverse kinematics, and dynamics. It also includes a graphical user interface (GUI) for visualizing the results of inverse kinematics calculations [24]. Another toolbox for inverse kinematics is the Open Dynamics Engine (ODE). ODE is an open-source library for simulating rigid body dynamics and has been used in robotics, animation, virtual reality, and mechatronics applications [59]. A software platform called roboanalyzer was created to solve forward and inverse kinematics using 3D modeling [60]. Robotica is a computer-aided design tool for robotic manipulators [61]. It includes a set of applications for Mathematica environments that allow for robot analysis [38]. Another program created to assist in the depiction of robot geometry is called Robot Draw [62]. Another software for inverse kinematics is Kinematics Visualizer. Kinematics Visualizer is software that is used to graphically represent the motion of objects in space. It can be used to analyze and understand the motion of mechanisms such as robots or machines [19].
Robotmaster is a software program designed for the offline programming of industrial robots. It is used in the manufacturing and automation industries to create, edit, and optimize robot trajectories, as well as manage and simulate robot work cells [63]. RoboDK is a comprehensive software package that includes a 3D simulation environment, a library of robot models, and a library of robot programs. The 3D simulation environment allows users to visualize and interact with their robot programs in a realistic 3D environment [64]. In this paper, for simulation and solving forward and inverse kinematics, the Peter Corke toolbox was used because the routines are typically written clearly to allow for easy learning, the code is mature and serves as a benchmark for other implementations of the same algorithms, and you can always modify the function to be more effective [24]. Roboanalyzer was used too because it is easy to use and has many features like a serial manipulator with prismatic and revolute joints, D-H parameters as input, the 3D model generated based on D-H parameters, the ability to visualize D-H parameters, forward and inverse kinematics, animation with a trace of the end effector, plot graphs, and so on [60]. Furthermore, the four methods (mathematical model, Peter Corke toolbox, roboanalyzer, and particle swarm optimization) were not used in previous research on the same manipulator.
2.3. Kinematics analysis of manipulator using particle soptimization
The Particle Swarm Optimization (PSO) approach is a metaheuristic algorithm based on the concept of swarm intelligence, which is a powerful technique for solving complex mathematical engineering problems. The PSO solves problems by using multiple agents called particles to investigate and compare the quality of a population of candidate solutions. Each particle iteratively moves from one candidate solution to another based on a mathematical formula. The formula involves the particle's current state, its own local best state (lbest), and the influence from the particle with the best solution (gbest) in the search space. The formula consists of two equations [27]:
The first equation calculates the velocity of the particle at iteration n (vn) based on its inertia (wvn), where current velocity (vn), inertia weight (w), cognitive parameter (c1), random numbers (r1) and (r2), and the difference between its local best state (plbest) and its current state (xn), as well as the difference between the global best state (pgbest) and its current state (xn). The personal influence term in the PSO algorithm is represented by c1r1(plbest −xn) and the social influence term in the PSO algorithm is represented by c2r2(pgbest −xn), where c2 is the social parameter. The second equation updates the current state of the particle (xn) by adding its velocity (vn) to its current state (xn). The inertia weight (w) and cognitive parameter (c1) are parameters that control the behavior of the PSO algorithm. The PSO algorithm uses these equations to iteratively update the states of the particles and search for the best solution in the search space.
The fitness function, represented as fn, is defined to evaluate the local and global best positions among the particles in the swarm. The fitness function is calculated as the distance between the desired end-effector pose, referred to as Pd, and the manipulator end-effector pose associated with the particle state at iteration n, referred to as Pn, as shown in Eq (2.45) [28].
The algorithm applies the PSO approach to solve the inverse kinematics problem for the KUKA KR 22 R1610-2 manipulator, with the desired end-effector pose set as the target position Pd.
3.
Results
The mathematical model, Peter Corke toolbox, particle swarm optimization, and roboanalyzer software are applied to the studied manipulator (KUKA KR 22 R1610-2). By changing the manipulator end effector positions and orientation as shown in Table 4, which describes the input positions of the manipulator end effector, different sets of angles can be observed as outputs of inverse kinematics analyses as shown in Tables 5–7. By changing the manipulator joint angle inputs as shown in Tables 8–10. Table 4, which describes different sets of angles, the output positions, and the orientation of the manipulator end effector, can be observed as a forward kinematics analysis. KUKA KR 22 R1610-2 manipulator has the following dimensions: d1 = 520 mm, d4 = 655 mm, d6 = 153 mm, a1 = 160 mm, a2 = 780 mm, a3 = 150 mm.
3.1. Inverse kinematics results
To obtain the possible solutions of θ1, θ2, θ3, θ4, θ5, θ6 for different cases, we used four kinematics analysis methods (the Peter Corke toolbox, roboanalyzer, mathematical model, and particle swarm optimization). For the mathematical model, the values listed in Table 4 are substituted for the previous Eqs (2.24), (2.30), (2.31), (2.34), (2.36), and (2.41), which describe the position and orientation of the end effector at a certain position. The same listed values in Table 4 were used for the Peter Corke toolbox and roboanalyzer to obtain the possible solutions of θ1, θ2, θ3, θ4, θ5, θ6. In each case, we have eight sets of solutions for joint rotation for a given position and orientation, but we have constraints on rotation angles as shown in Table 3, so some results will be one solution and other results will be more than one solution. Six random cases and one possible solution for each case have been selected to be studied.
3.1.1. Inverse kinematics results using Peter Corke toolbox
Table 5 describes the output joints' angles for the selected cases using the Peter Corke Toolbox. One solution has been selected after avoiding the rejected solutions according to the manipulator joints' limitations.
By using GUI in MATLAB and collaborating with Peter Corke toolbox, a representative manipulator simulation can be obtained for each case, as shown in Figure 6.
3.1.2. Inverse kinematics results using roboanalyzer
Table 6 describes the output joints' angles for the selected cases using roboanalyzer. One solution has been selected after avoiding the rejected solutions according to the manipulator joints' limitations.
By using the roboanalyzer simulator platform, a representative manipulator simulation can be obtained for each case, as shown in Figure 7.
3.1.3. Inverse kinematics results using the mathematical model
Using the mathematical model of inverse kinematics equations as described in Eqs (2.24), (2.30), (2.31), (2.34), (2.36), and (2.41). Table 7 presents the output joints' angles for the selected cases. To avoid the rejected solutions due to the constraints of the manipulator's joints, one solution has been chosen.
3.1.4. Inverse kinematics results using particle swarm optimization
Table 8 presents the angles of the output joints for the selected cases, which were determined using particle swarm optimization. A solution has been chosen after eliminating the rejected options based on the constraints of the manipulator joints.
3.2. Forward kinematics results
In forward kinematics, to obtain the position of the end effector of the manipulator (px,py and pz), the equations derived from the forward kinematics solution, from Eq (2.4) to Eq (2.15), are used. The outputs in Tables 5–8, which include the output angles of each joint according to inverse kinematics solutions, are used as inputs for forward kinematics for the same cases selected to be studied. Distinct positions are observed by changing the output of the inverse kinematics results of the four kinematics analysis methods (Peter Corke toolbox, roboanalyzer, mathematical model, and particle swarm optimization).
3.2.1. Forward kinematics results using Peter Corke toolbox
Table 9 shows the results of the forward kinematics of the chosen cases using the Peter Corke Toolbox. The inputs for solving forward kinematics were the output result angles of inverse kinematics solutions for the same case using Peter Corke toolbox, as indicated in Table 5.
3.2.2. Forward kinematics results using roboanalyzer
Table 10 describes the output positions of the selected cases using a roboanalyzer. The output result angles of inverse kinematics solutions for the same case using the roboanalyzer shown in Table 6 were the inputs that have been used to solve forward kinematics.
3.2.3. Forward kinematics results using the mathematical model
The mathematical model is used to solve forward kinematics, Table 11 shows the output positions of the selected cases. Table 7 shows the angles of the solutions to inverse kinematics for the same case using a mathematical model. These angles were used to solve forward kinematics.
3.2.4. Forward kinematics results using particle swarm optimization
The output positions of the selected cases are shown in Table 12, which displays the results of using particle swarm optimization to solve forward kinematics. Angles of solutions to inverse kinematics utilizing particle swarm optimization are shown in Table 8 for the identical instance. Forward kinematics was solved using these angles.
4.
Discussion
The above-mentioned results will be discussed in terms of the purpose of this paper, which is to define the most accurate method for accessing the manipulator's end effector to its target destination and to compare the time factor for executing the method in six different cases.
4.1. Performance metrics
The percentage of accuracy is calculated by estimating the mean absolute percentage error (MAPE) and subtracting it from 100% using Eq (4.2) [65]. The mean absolute percentage error is computed as shown in Eq (4.1) by dividing the absolute error of a point by the observed values for that point. Then, the average of those set percentages is taken, where X1 is the actual value (input), X2 is the observed value (output), and n is the number of fitted points. MAPE displays the amount of prediction error in comparison to the actual value [66].
4.2. Hardware and software specifications
A laptop with an intel Core i7 2nd Generation processor, eight gigabytes (GB) of random access memory (RAM), a 64 bit operating system, Windows 10,128 gigabytes (GB) of solid state drive (SSD) hard disk, and Intel (R) High Definition (HD) Graphics 3000 graphics card specifications are used.
4.3. Forward and inverse results discussion
First, Table 13 shows an accurate comparison between the input positions of inverse kinematics as target destinations and the output result positions of forward kinematics using the Peter Corke toolbox as the final destination of the end effector of the manipulator. The accuracy of the Peter Corke toolbox method in accessing the target can be determined through this comparison, as the average access accuracy for the six cases was 98.350%. As for the execution time of each case, 1.707 seconds were calculated as the average execution time for each case.
Second, Table 14 illustrates an exact comparison of inverse kinematics input positions as target destinations and forward kinematics output result positions using a roboanalyzer as the manipulator's end effector's final destination. Because the average access accuracy for the six cases was 99.987%, we can define how effectively the roboanalyzer approach performs at reaching targets using this comparison. As for the execution time of each case, 0.278 seconds were calculated as the average execution time.
Third, Table 15 provides a detailed comparison of the input positions of inverse kinematics as target destinations and the output result positions of forward kinematics using a mathematical model as the final destination of the end effector of the manipulator. This comparison shows that the average access accuracy for the six examples was 99.719%, so it can be used to judge how well the mathematical model method works for reaching goals. As for the execution time of each case, 0.281 seconds were calculated as the average execution time for each case.
Table 16 shows a detailed comparison of the results of forward kinematics with particle swarm optimization as the manipulator's end effector's end point and the input positions of inverse kinematics as target targets. In order to evaluate the efficacy of the particle swarm optimization method in reaching objectives, this comparison reveals that the average access accuracy for the six instances was 99.999%. The average execution time for each case was calculated to be 0.904 seconds.
4.4. End-effector pose error
The position error of the end-effector can be determined using the values Px, Py, and Pz in Eq (2.3) by calculating the Euclidean distance between the actual position and the evaluated position, represented by Eq (4.3) [45]. Through Tables 13–16, and utilizing Eq (4.3), the end-effector pose error was computed for each of the four methods. Table 17 presents the result comparison of the end-effector pose errors among the four methods.
When the accuracy of access for each of the four studied methods is known and compared, it is clear that PSO is the most accurate in terms of the average accuracy of reaching each case by 99.999% with execution time 0.904 second, compared to roboanalyzer with 99.987% with an execution time of 0.278 seconds, the mathematical model with 99.719% with an execution time of 0.281 seconds, and the Peter Corke toolbox with 98.35% with an execution time of 1.707 seconds. Following the computation of pose errors, it was observed that the RoboAnalyzer method exhibited the lowest average pose error, measuring at 0.011 mm. Subsequently, the PSO method ranked second, with a marginal difference, registering at 0.12 mm. The mathematical modeling method followed in third place, with a pose error value of 2.581 mm. Lastly, the Peter Cork method demonstrated the largest pose error, measuring 12.633 mm. Figure 8 describes the six points connected as a path for each of the four methods used compared with the input positions of inverse kinematics. The selection of the model depends on the specific requirements of the application. Choosing the PSO and RoboAnalyzer approaches is recommended when considering accuracy. On the other hand, the Peter Corke method is preferred when the most important factor is simplicity in the structure of the code. When it comes to applications where the speed of execution is crucial, the best choice is the RoboAnalyzer and mathematical model.
4.5. Universality and applicability
An additional case study was proposed to ensure the applicability of all the methods studied in this paper to any type of mechanism. These methods were applied to a 6-DOF manipulator called the IRB 120 ABB. Figure 9 (a) shows the work space and dimensions of the manipulator. Figure 9 (b) also shows the cartisian frames for each joint of the manipulator. Table 18 present the D-H parameters for IRB 120 ABB Robot.
The homogeneous matrix parameters, which describe the position and orientation of the manipulator end effector as a forward kinematic, are represented in Table 19. And it will be taken as input for the four studied methods. Each of the four studied methods was applied to two cases representing two different positions within the accessible workspace in order to ensure the universality of the studied methods. The results for the four methods were compared with the inputs in Table 20. The main absolute square error was used to evaluate the accuracy of the results using these methods, just as we had previously done.
By evaluating the accuracy of the results using the absolute square error, it was found that the most accurate method was PSO with an accuracy of 99.988%, then, RoboAnalyzer came in second place with an accuracy of 99.767%, the mathematical model came in third place with an accuracy of 98.129%, and finally Peter Corke ranked last with an accuracy of 97.716%. The quality of the PSO method confirms the previous conclusions from the previous studied case, demonstrating the universality of both the methods and the results.
5.
Conclusions
In this paper, a comprehensive kinematics analysis of the KUKA KR 22 R1610-2 industrial six degree of freedom manipulator is conducted utilizing four distinct methods: the Peter Corke toolbox and GUI implemented in MATLAB, the roboanalyzer software platform, mathematical model, and particle swarm optimization implemented in MATLAB. The accuracy of the inverse kinematics solutions, represented as target destinations, was evaluated by comparing them to the output positions obtained through forward kinematics, represented as final destinations, in six different cases. The accuracy was determined using the mean absolute percentage error. The PSO method emerged as the most accurate approach for achieving the target, followed by the RoboAnalyzer method, then the Peter Corke method, and finally the mathematical model method. The RoboAnalyzer method was the most effective in terms of execution time, followed by the mathematical model method, PSO, and the Peter Corke method.
The future work of this research is to study the analysis of continuum manipulators under external forces, which falls into the realm of dynamics. Closed-form solutions to inverse kinematics problems for reconfigurable robots are also among the future work. The advanced machine learning techniques can be applied to the inverse kinematics problem solution. Finally, we plan to explore enhancements to the iterative cycle methodology, with a specific focus on addressing factors that influence solution accuracy, including the end-effector pose error.
Use of AI tools declaration
The authors declare they have not used Artificial Intelligence (AI) tools in the creation of this article.
Acknowledgments
The authors extend their appreciation to the Deputyship for Research and Innovation, Ministry of Education in Saudi Arabia, for funding this research work through project number 445-9-953.
Conflict of interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Appendix A
The transformation matrices of the six joints.
A01 is a the transformation matrix for θ=θ1,d=d1,a=a1,α1=90∘
A12 is the transformation matrix for θ=θ2,d=0,a=a2,α2=180∘
A23 is the transformation matrix for θ=θ3,d=0,a=a3,α3=90∘
A34 is the transformation matrix for θ=θ4,d=d4,a=0,α4=90∘
A45 is the transformation matrix for θ5, d,d=0, a=0, α5=−90∘
A56 is the transformation matrix for θ=θ6,d=d6,a=0,α6=0∘
The inverse of transformation matrices of the six joints: