# 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
It is clear that when an orientation constraint is added to the inverse kinematics, the position errors obtained are more important than when the system operates without the orientation constrain, while in real industrial applications, the orientation respect may make a great difference between acceptable and non-acceptable solutions. Figure 6 shows both the position errors and the orientation errors for the 100 random test points, taking into consideration both the position and the orientation errors. The plots confirmed the results and showed that the orientation objective was achieved with a relative degradation of the position error, as in mono-objective m-PSO. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Error** & **Best** & **Worst** & **Mean** & **Std** \\ \hline
**Position (cm)** & \(1.88\times 10^{-9}\) & 2.925 & 1.450 & 1.897 \\
**Orientation** & \(1.65\times 10^{-10}\) & 0.643 & 0.091 & 0.126 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Statistical results of MO-M-PSO for IK problem. Figure 5: Multi-objective m-PSO for inverse kinematics with position and orientation objectives: (**a**) Pareto front for position error/orientation objectives, (**b**) visualization of robot arm. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Best** & **Worst** & **Mean** & **Std** \\ \hline
**Position error** & \(3.81\times 10^{-10}\) & 0.0492 & 0.0150 & 0.1973 \\
**Orientation** & \(2.34\times 10^{-9}\) & 0.6439 & 0.0918 & 0.2268 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Statistical results of MO-M-PSO target point with end-effector orientation. ### Multi-Objective m-PSO for Path Tracking with Fixed Orientation Simulation

The path tracking test consists of assessing the robot to track a circular path in a 3D workspace. The path is composed of a set of target points \(X_{t}=(x_{t},y_{t},z_{t})\) belonging to a planar circular path (see Figure 7c) and satisfying Equation (17):

\[ \begin{cases}&x_{t}(p)=x_{0}\\ y_{t}(p)=y_{0}+r\ cos(\theta_{s}\ p)\\ z_{t}(p)=z_{0}+r\ sin(\theta_{s}\ p)\end{cases}  \tag{17}\]

where \(\theta_{s}\) stands for the angular step, which depends on the number of points (steps) chosen in the trajectory, and the center of the circle position is at \(X_{o}=(x_{0},y_{0},z_{0})\). If the circle is sampled into \(np\) points, then the angular step \(\theta_{s}\) can be computed using Equation (18). \[\theta_{s}=\frac{2\pi}{np}\left[\text{rad}\right] \tag{18}\]

For this test, the circular path is designed as follows:

The workspace distances are specified in centimeter, cm. The circle center position is \(X_{o}=(x_{0}=15,y_{0}=0,z_{0}=12)\). The circle radius is \(r=8\) cm. The end-effector orientation is fixed so that it is maintained perpendicular to the plan of the circular trajectory, which leads to the following orientation constraints: \((\alpha=0^{\circ},\beta=0^{\circ})\), \(\gamma\) is free. Simulations showed that the circular path tracking was conducted in a very efficient manner. The mean error obtained over the 100 points was about 0.0325 cm, where the target path is in red while the obtained path is in black. The orientations were respected with high precision since the mean error is about \(5.732\times 10^{-5}\). The mean and standard deviation of position error and orientation are reported in Table 4, while Figure 7 shows the relative error obtained at each point. Desired and obtained path are visible in Figure 7a, while Figure 7b shows the joints' angular positions returned by MO-m-PSO for a circular path made of 50 points. A 3D representation of the arm at point 25 is presented in Figure 7c. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Best** & **Worst** & **Mean** & **Std** \\ \hline
**Position (cm)** & \(2.31\times 10^{-6}\) & \(0.268\) & \(0.032\) & \(0.191\) \\
**Orientation** & \(1.85\times 10^{-8}\) & \(4.58\times 10^{-4}\) & \(5.73\times 10^{-5}\) & \(0.002\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Statistical errors analysis of MO-M-PSO for circular path planning.