## 2 Cooperative SCARA System
### Kinematic and Dynamic Analyses of the SCARA Robot
#### 2.1.1 Direct Kinematics  
The analysis of direct kinematics focuses on calculating the position and orientation of a robot's end effector based on the angles of its joints, omitting the forces that induce movement and focusing on the geometry of the system [45]. Figure 3 illustrates the kinematic model of the SCARA robot, which serves as the basis for determining the values of the Denavit-Hartenberg parameters \(\theta_{i}\), \(d_{i}\), \(a_{j}\)\(\propto\)\(a_{i}\), as detailed in Table 2. These values describe the spatial relationships between the robot's links.  
The homogeneous transformation matrices \(T_{i}^{(i-n)}\) represent the location and alignment of a body in an \(n\)-dimensional environment. These are composed of four submatrices: the rotation matrix \(R_{4}^{0}\), position vector \(P\), perspective transformation \(f\), and global scaling \(w\). Their analysis is presented in Equations (1)-(4).  
\[T_{i}^{i-1}=Rot(Z_{i-1},\theta_{i})\;Tras(Z_{i-1},d_{i})\;Tras(X_{i},a_{i})\;Rot (X_{i},\alpha_{i}) \tag{1}\]  
\[T_{4}^{0}=\;T_{1}^{0}T_{2}^{1}T_{3}^{2}T_{4}^{3}=\left[\begin{matrix}R_{4}^{0} &P\\ f&w\end{matrix}\right] \tag{2}\]  
\[R_{4}^{0}=\left[\begin{matrix}\cos(\theta_{1}+\theta_{2}-\theta_{4})&\sin( \theta_{1}+\theta_{2}-\theta_{4})&0\\ \sin(\theta_{1}+\theta_{2}-\theta_{4})&-\cos(\theta_{1}+\theta_{2}-\theta_{4} )&0\\ 0&0&1\end{matrix}\right] \tag{3}\]  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \(\mathbf{Joint_{i}}\) & \(\theta_{i}\) & \(\mathbf{d_{i}}\) & \(\mathbf{a_{i}}\) & \(\mathbf{c_{i}}\) \\ \hline
1 & \(\theta_{1}\) & \(d_{1}\) & \(a_{1}\) & 0 \\
2 & \(\theta_{2}\) & 0 & \(a_{2}\) & \(\pi\) \\
3 & 0 & \(d_{3}\) & 0 & 0 \\
4 & \(\theta_{4}\) & \(d_{4}\) & 0 & 0 \\ \hline \hline \end{tabular} where \(\theta_{i}\) angle formed by axes \(x_{i-1}\) and \(x_{i}\) measured in a plane perpendicular to the \(z_{i-1}\) axis; \(d_{i}\) distance along the \(z_{i-1}\) axis from the origin of the coordinate system \((i-1)\) to the intersection of the \(z_{i-1}\) and \(x_{i}\) axes; \(a_{i}\) distance along the \(x_{i}\) axis from the intersection of the \(z_{i-1}\) axis with the \(x_{i}\) axis to the origin of the \(i\)-th coordinate system for the rotational joints; prismatic joints are calculated as the shortest distance between the \(z_{i-1}\) and \(z_{i}\) axes; and \(\omega_{i}\): angle between the \(z_{i-1}\) and \(z_{i}\) axes, measured in a plane perpendicular to the \(x_{i}\) axis.  
\end{table}
Table 2: Denavit–Hartenberg parameters.  
Figure 3: Kinematic diagram of the SCARA robot, where \(a_{1}\): length of link one along the \(x\)-axis; \(a_{2}\): length of link two along the \(x\)-axis; \(d_{1}\): Length of the robot base along the \(z\)-axis (height of the robot base); \(d_{3}\): linear distance of the prismatic joint \(J_{3}\) that allows vertical movement of link three; \(d_{4}\): length of link one along the \(z\)-axis; \(\theta_{1}\): angle of the first rotational joint that connects the base to link one; \(\theta_{2}\): angle of the second rotational joint that connects link one to link two; and \(\theta_{4}\): angle of the fourth rotational joint that defines the orientation of link four relative to link three.  
\[\mathrm{P}=\begin{bmatrix}\mathrm{x}\\ \mathrm{y}\\ \mathrm{z}\end{bmatrix}=\begin{bmatrix}\mathrm{a}_{1}\cos(\theta_{1})+\mathrm{a}_ {2}\cos(\theta_{1}+\theta_{2})\\ \mathrm{a}_{1}\mathrm{sin}(\theta_{1})\ +\ \mathrm{a}_{2}\sin(\theta_{1}+\theta_{2})\\ \mathrm{d}_{1}-\mathrm{d}_{3}-\mathrm{d}_{4}\end{bmatrix} \tag{4}\]