# A Multi-Objective Modified PSO for Inverse Kinematics of a 5-DOF Robotic Arm
## 3 Multi-Objective Inverse Kinematics Problem Statement
### Inverse Kinematics as a Multi-Objective Problem
### Mono-Objective, m-PSO, Single Target Point Evaluation

A feasible target point is fixed at the location (\(x=25.144\) cm, \(y=9.573\) cm, \(z=18.092\) cm), which corresponds to an random joints position \(q=\left[30^{\circ},\ 60^{\circ},\ 45^{\circ},\ 60^{\circ},\ 60^{\circ}\right]\). Then, the m-PSO mono-objective solver is asked to achieve this position. The test is operated with a swarm of 50 particles, \(w=0.8\) and \(c1=c2=1.493\) for the search behavior of the m-PSO, and \(c2=1.493\) and \(w=0.8\) for the exploitation behavior. This test was repeated 30 times, and for all tests, the proposal achieved a feasible solution of the problem with position errors ranging from \(3.01\times 10^{-10}\) to \(1.08\times 10^{-5}\) The average error is about \(2.01\times 10^{-6}\). A 3D representation of a solution is shown in Figure 4a; its corresponding fitness of up to 500 iterations appears in Figure 4b. It is important to note here that the obtained solutions through the computation, m-PSO, by about iteration 300, are precise enough for the real robotic arm used for a real practice test, since the printed robot resolution has about a 0.5 cm range, which means a quadratic position error of about \(1.0\times 10^{-4}\). The 3D representation of the robotic arm is performed using the Corke robotics toolbox [31]. ### MO-m-PSO with Position and Orientation Objectives

This test is equivalent to the first one but with an additional orientation constrain. The test concerns the multi-objective variant of m-PSO, MO-m-PSO. The target point (\(x=25.144\) cm, \(y=9.573\) cm, \(z=18.092\) cm) was chosen arbitrary by applying the forward kinematics of a particular configuration \([30^{\circ},60^{\circ},45^{\circ},60^{\circ},60^{\circ}]\). The desired orientation used in this test was formulated by \([\alpha=0^{\circ},\beta=-30^{\circ},\gamma=-23.8^{\circ}]\). Its forward kinematics homogeneous transformation matrix is as in Equation (16):

\[T= \begin{bmatrix}0.8660&0.2021&-0.4574&25.1441\\ 0.0000&0.9147&0.4042&9.5735\\ 0.5000&-0.3500&0.7921&18.0927\\ 0&0&0&1\end{bmatrix}  \tag{16}\]

According to Equation (16), the resulted orientation is defined by (\(\alpha=0^{\circ}\), \(\beta=-30^{\circ}\), \(\gamma=-23.84^{\circ}\)). Figure 5a shows the Pareto font for position/orientation objectives which allows to select the optimal solution corresponding to \(Q=[30.00^{\circ},59.16^{\circ},44.59^{\circ},54.63^{\circ},57.92^{\circ}]\), for which the corresponding 3D representation appears in Figure 5b. The test was repeated over 100 epochs, which allowed us to compute the mean position and orientation errors as well as the standard deviations. Results are presented in Table 2, which shows that the best position error is about \(3.81\times 10^{-10}\); this is not technically achievable with the current 5-DOF robotic arm. The best orientation error was about \(2.34\times 10^{-9}\) which is extremely precise for an educational robotic arm. The means and standard deviations of these errors are also presented in Table 2. The mean of position error is about 0.015, while the mean of orientation error is about 0.098. Figure 4: Mono-objective m-PSO for inverse kinematics: (**a**) 3D representation of the best solution using m-PSO, (**b**) m-PSO fitness evolution up to 500 iterations. ### Multiple Target Points for Statistical Analyses

The test consists of evaluating the capacity of MO-m-PSO to correctly solve a set of 100 random points generated in the workspace of the 5-DOF robotic arm; each point is associated with a random orientation. This test serves for a statistical analysis of the MO-m-PSO in solving the IK problem. The test conditions are the following: 100 search agents and 500 iterations for each target point. Table 3 shows the best, worst, mean, and standard deviation of the obtained solutions.