## 4 Simulation
### Solutions for a Random Single Given Pose  
For a random given pose of the end-effector within the workspace of the 5-UJ manipulator, for example, \(\mathbf{n}_{5}^{0}=\left(\begin{array}{cc}0.7277&0.6755&0.1192\end{array} \right)^{T}\), \(\mathbf{s}_{5}^{0}=\left(\begin{array}{cc}-0.6328&0.5940&0.4967\end{array} \right)^{T}\), \(\mathbf{a}_{5}^{0}=\left(\begin{array}{cc}0.2647&-0.4369&0.8597\end{array} \right)^{T}\), \(\mathbf{p}_{5}^{0}=\left(\begin{array}{cc}0.5476&-1.6509&4.5615\end{array} \right)^{T}\), it is in the narrow space whose boundary is a cylindrical surface with a radius of 0.55. By using Equations (10), and (12)-(16) with the selected intervals \(\Delta_{l_{v,4}}=\Delta_{l_{v,3}}=\Delta_{l_{v,2}}=0.001\), \(\Delta_{l_{Q3}}=\Delta_{l_{Q2}}=0.001\), and \(\Delta_{u}=0.001\) and the maximum envelope distances \(\delta_{1}=\cdots=\delta_{5}=0.2\), the range of these distances \(l_{v,4}\), \(l_{Q3}\), \(l_{Q3}\), \(l_{Q2}\), \(l_{v,2}\) can be further reduced. The reduced value range is presented in the form of a combination of these five distances, as shown in Figure 8. As it can be seen, the value ranges of \(l_{v,4}\), \(l_{Q3}\), \(l_{v,3}\), \(l_{Q2}\), \(l_{v,2}\) have great decrease comparing to the ones computed by Equation (11) and are close to their respective upper bonds. This is because that the smaller value of these distances indicates the larger joint angles and satisfying the need of harmony between these distances to make all joint angles within their limits is necessary. In fact, the function of Figure 8 is to provide the initial estimate for the value of these distances.  
To show multiple solution for a given pose, different value of \(l_{v,4}\) and some valid values of \(l_{Q3}\), \(l_{v,3}\), \(l_{Q2}\), \(l_{v,2}\) within the value ranges shown in Figure 8 are chosen to solve the above given pose using the proposed closed-form inverse kinematics. The value of \(l_{v,4}\) changes from 1.9573 to 1.9989 at 0.001 interval; the value of \(l_{Q3}\), \(l_{v,3}\), \(l_{Q2}\), \(l_{v,2}\) are equal to 2.9249, 1.9706, 1.9730, and 1.9690, respectively. The configuration of the manipulator plotted through using the forward kinematics is shown in Figure 9a. The corresponding joint angles are shown in Figure 9b.  
For some given target pose, different manipulator configurations can be provided by choosing different distances, for example, \(l_{v,4}\). This can be applied in obstacle avoidance. Moreover, according to Figure 9, the configurations of link 5 remain unchanged because of the existence of the general spherical wrist, i.e., the 5 th general spherical joint. Simultaneously, the solution changes in law with the change of the distance of \(l_{v,4}\).  
Figure 8: Combinations of introduced distances satisfying the constraints of Equations (10)–(16).  
1.9690, respectively. The results for the straight-line paths along the \(y\)-axis and \(z\)-axis are shown in Figures 11 and 12, respectively.  
Figure 10: Solution for the straight-line path along the \(x\)-axis: (**a**) configuration of the manipulator; (**b**) corresponding joint angles.  
Figure 11: Solution for the straight-line path along the \(y\)-axis: (**a**) configuration of the manipulator; (**b**) corresponding joint angles.  
According to Figures 10b, 11b and 12b, the solution changes continuously with the change of coordinate, while the five distances used remain the same.