## 5 Simulation and Experimental Results
### Simulation Experiments  
The objective of these simulations is to compare the performance of various metaheuristic algorithms--BA (BA), differential evolution (DE), particle swarm optimization (PSO), invasive weed optimization (IWO), and the imperialist competitive algorithm (ICA)--in solving the inverse kinematics for both the position and orientation of the Puma 560 robot (6 DOF), Baxter robot (7 DOF), and KUKA iiwa robot (7 DOF). Moreover, simulations are performed using Matlab R2024b. Each simulation consists of \(G=300\) iterations and a population of \(N=30\) individuals. The following parameters were defined: \(k_{t}=1.5\), \(k_{R}=0.8\), \(\gamma=1000\), \(C_{R}=0.9\), and \(F=0.6\); the Denavit-Hartenberg (DH) convention was used to describe the kinematic structure of the manipulators used in the simulations. Table 2 presents the DH parameters for the Puma-560 manipulator. Table 3 provides the DH parameters of the Baxter manipulator. Table 4 lists the DH parameters for the KUKA iiwa manipulator. Moreover, the illustrations in Figures 1-3 show the coordinate frames' assignment for the considered manipulators. The joint limits for the Puma-560 robot are as follows:  
\[\mathbf{q}_{l}= \begin{bmatrix}-160&-45&-225&-110&-100&-266\end{bmatrix} ^{T}\]  
\[\mathbf{q}_{u}= \begin{bmatrix}160&225&45&170&100&266\end{bmatrix} ^{T}\]  
The joint limits for the Baxter robot are as follows:  
\[\mathbf{q}_{l}= \begin{bmatrix}-97.5&-123&-175&-3&-175&-90&-175\end{bmatrix} ^{T}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Joint** & **a [m]** & **a [rad]** & **d [m]** & \(\Theta\) [rad] \\ \hline
1 & 0 & \(-\pi/2\) & 0.360 & \(q_{1}\) \\
2 & 0 & \(\pi/2\) & 0 & \(q_{2}\) \\
3 & 0 & \(\pi/2\) & 0.420 & \(q_{3}\) \\
4 & 0 & \(-\pi/2\) & 0 & \(q_{4}\) \\
5 & 0 & \(-\pi/2\) & 0.400 & \(q_{5}\) \\
6 & 0 & \(\pi/2\) & 0 & \(q_{6}\) \\
7 & 0 & 0 & 0.126 & \(q_{7}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: KUKA iiwa manipulator DH parameters. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Joint** & **a [m]** & **a [rad]** & **d [m]** & \(\Theta\) [rad] \\ \hline
1 & 0 & \(\pi/2\) & 0 & \(q_{1}\) \\
2 & 0.4318 & 0 & 0 & \(q_{2}\) \\
3 & 0.0203 & \(-\pi/2\) & 0.15 & \(q_{3}\) \\
4 & 0 & \(\pi/2\) & 0.4318 & \(q_{4}\) \\
5 & 0 & \(-\pi/2\) & 0 & \(q_{5}\) \\
6 & 0 & 0 & 0 & \(q_{6}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Puma-560 manipulator DH parameters. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Joint** & **a [m]** & **a [rad]** & **d [m]** & \(\Theta\) [rad] \\ \hline
1 & 0 & \(-\pi/2\) & 0.360 & \(q_{1}\) \\
2 & 0 & \(\pi/2\) & 0 & \(q_{2}\) \\
3 & 0 & \(\pi/2\) & 0.420 & \(q_{3}\) \\
4 & 0 & \(-\pi/2\) & 0 & \(q_{4}\) \\
5 & 0 & \(-\pi/2\) & 0.400 & \(q_{5}\) \\
6 & 0 & \(\pi/2\) & 0 & \(q_{6}\) \\
7 & 0 & 0 & 0.126 & \(q_{7}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Baxter manipulator DH parameters. \[\mathbf{q}_{u}= \begin{bmatrix}97.5&60&175&150&175&120&175\end{bmatrix} ^{T}\]  
The joint limits for the KUKA iiwa robot are as follows:  
\[\mathbf{q}_{l}= \begin{bmatrix}-170&-120&-170&-120&-170&-120&-175\end{bmatrix} ^{T}\]  
\[\mathbf{q}_{u}= \begin{bmatrix}170&120&170&120&170&120&175\end{bmatrix} ^{T}\]  
In all cases, the equivalent values in radians are used in the algorithms. The desired end-effector poses are defined with a set of 100 random positions and orientations generated in a valid workspace for the robotic manipulators, as shown in Figure 4. All random poses are reachable. Moreover, the proposed approach runs for every randomly desired pose independently. The best fitness value of each run is kept for statistical analysis. Figure 1: Coordinate frames’ assignment for the Puma-560 manipulator. Figure 3: Coordinate frames’ assignment for the KUKA iiwa manipulator. Figure 2: Coordinate frames’ assignment for the Baxter manipulator. Comparisons aim to analyze the statistical variation in the results of each algorithm.