## 4 Kinematics, Workspace, Singularity, and Simulation
### Rotational and Joint Workspaces  
Using Equation (1), the rotational workspace and joint workspace when the moving platform is rotated from \(-\pi/2\) to \(+\pi/2\) about three axes parallel to \(X_{\text{b}}\), \(Y_{\text{b}}\), and \(Z_{\text{b}}\), which intersect at point \(\text{O}_{\text{m}}\), are found. The distance between the base and moving platform along the \(Z\)-axis was considered fixed, where \(\text{I}=171.43\) mm (this length is measured from base platform to the centre of the spherical joint). Then, the rotational workspace and joint workspace for the full stroke length of the actuator are plotted. As it is known, the total stroke of the actuator is 50 mm, and the leg length of the robot varies in the range of \(146.43\) mm \(\leq\text{I}_{i}\leq 196.43\) mm. Figure 8 shows the rotational and joint workspace of the 3 UPU/S robot plotted within the limits of the leg length using MATLAB R2022a (MathWorks, Natick, MA, USA). The rotational workspace in two dimensions by setting \(\phi=0.52\) radian is shown in Figure 8b. Next, considering the ROM of the spherical joint, the rotational and joint workspaces of the robot are found. This is conducted by finding the angle between the vectors \(\overrightarrow{\text{I}_{i}}\) and \(\overrightarrow{\text{n}}\). Here, \(\overrightarrow{\text{I}_{i}}\) represents the vector associated with the legs of the robot and \(\overrightarrow{\text{n}}\) represents the normal vector of the moving platform. The vector \(\overrightarrow{\text{I}_{i}}\) has already been found while solving the inverse kinematics using Equation (5). The vector \(\overrightarrow{\text{n}}\) is normal to the plane formed by the centres of the three spherical joints at the moving platform. To find the plane, the position vector of all the three spherical joints connecting the moving platform with respect to the frame \(\{\text{b}\}\) is found. This has also been found out while solving the inverse kinematics problem using Equation (4). The vectors \(\overrightarrow{\text{a}}\) and \(\overrightarrow{\text{b}}\) (Figure 3) are obtained using Equation (6). \[ \begin{array}{c}\overrightarrow{\text{a}}=\overrightarrow{\text{B}_{2}}- \overrightarrow{\text{B}_{1}}\\ \overrightarrow{\text{b}}=\overrightarrow{\text{B}_{3}}- \overrightarrow{\text{B}_{1}}\end{array} \]  
Figure 7: Change in the leg length during ulnar deviation/radial deviation. \[\overset{\rightarrow}{n}=\overset{\rightarrow}{b}\times\overset{\rightarrow}{a} \tag{6}\]  
The angle (\(\alpha\)) between the vectors \(\overset{\rightarrow}{l_{i}}\) and \(\overset{\rightarrow}{n}\) is obtained using Equation (7). \[\sin\alpha=\frac{\left|\overset{\rightarrow}{l_{i}}\times\overset{\rightarrow} {n}\right|}{\left|\overset{\rightarrow}{l_{i}}\right|\left|\overset{ \rightarrow}{n}\right|}\]  
\[\cos\alpha=\frac{\overset{\rightarrow}{l_{i}}\overset{\rightarrow}{n}}{ \left|\overset{\rightarrow}{l_{i}}\right|\left|\overset{\rightarrow}{n}\right|}\]  
\[\tan\alpha=\sin\alpha/\cos\alpha \tag{7}\]  
The angle (\(\alpha\)) varies in the range of \(-0.698\) rad \(\leq\alpha\leq 0.698\) rad which represents the ROM of the spherical joint. The rotational and joint workspaces within the limits of leg length and within the limits of the ROM of spherical joints were plotted using MATLAB and are shown in Figure 9. This represents the actual rotational workspace and joint workspace of the robot. The rotational workspace and joint workspace in two dimensions are shown in Figure 9b by setting \(\phi\) = 0.52 radian. The rotational workspaces together for both cases are shown in Figure 10. The blue colour workspace in Figure 10 is for the case of considering only the limits of the legs and the red colour workspace considers both the leg limits and limits of the ROM of the spherical joints. The reduced workspace results from the influence of the limitation of the ROM of the spherical joints.