## 2 Cooperative SCARA System
### Kinematic and Dynamic Analyses of the SCARA Robot
#### 2.1.3 Dynamics  
The dynamics of a robot refer to the study of how forces and torques affect the movement of the robot. This includes an understanding of how external forces (such as gravity and friction) and internal forces (generated by the actuators of the robot) influence the acceleration and movement of various parts of the robot. Robot dynamics encompasses two main aspects: forward dynamics, which deals with calculating the forces and torques needed to produce a desired movement, and inverse dynamics, which focuses on determining the resulting movement given a set of applied forces and torques [49]. The angular positions of the rotational links are represented by \(\theta_{1}\), \(\theta_{2}\), and \(\theta_{4}\), and the corresponding linear distances are \(\mathrm{d_{1}}\) and \(\mathrm{d_{4}}\). Because the third link moves in a prismatic manner, its angle is zero, and its linear position is defined by \(\mathrm{d_{3}}\). Rotational movements occurred in the XY plane; therefore, the potential energy of these joints was negligible. In contrast, the third joint introduces combined inertia because it is responsible for moving masses \(\mathrm{m_{3}}\) and \(\mathrm{m_{4}}\). The dynamic model of the manipulator is represented in Equation (12), which describes the relationships between the forces, torques, and movements of the various joints of the robot. \[\mathrm{M_{i}}(\mathrm{q_{i}})\ddot{\mathrm{q_{i}}}+\mathrm{C_{i}}\bigl{(} \mathrm{q_{i}},\dot{\mathrm{q_{i}}}\bigr{)}\dot{\mathrm{q_{i}}}+\mathrm{G_{i }}(\mathrm{q_{i}})=\tau_{\mathrm{i}} \tag{12}\]  
\[\mathrm{M_{i}}= \begin{bmatrix}\mathrm{M_{11}}&\mathrm{M_{12}}&\mathrm{M_{13} }&\mathrm{M_{14}}\\ \mathrm{M_{21}}&\mathrm{M_{22}}&\mathrm{M_{23}}&\mathrm{M_{24}}\\ \mathrm{M_{31}}&\mathrm{M_{32}}&\mathrm{M_{33}}&\mathrm{M_{34}}\\ \mathrm{M_{41}}&\mathrm{M_{42}}&\mathrm{M_{43}}&\mathrm{M_{44}}\end{bmatrix}  \tag{13}\]  
\[\mathrm{M_{11}}=\mathrm{Izz_{1}}+\ \mathrm{Izz_{2}}+\mathrm{Izz_{3}}+ \mathrm{Izz_{4}}+\mathrm{a_{1}}^{2}\,\mathrm{m_{2}}+\ \mathrm{a_{1}}^{2}\mathrm{m_{3}}+\mathrm{a_{1}}^{2}\mathrm{m_{4}}+\mathrm{a_{2 }}^{2}\mathrm{m_{3}}+\mathrm{a_{2}}^{2}\mathrm{m_{4}}+\]  
\(\mathrm{2a_{1}a_{2}m_{3}cos}\left(\theta_{2}\right)\ldots+\ 2\mathrm{a_{1}a_{2}m_{4}cos} \left(\theta_{2}\right)\)  
\(\mathrm{M_{12}}=\mathrm{[PERSON]_{2}}+\mathrm{[PERSON]_{3}}+\mathrm{[PERSON]_{4}}+\mathrm{a _{2}}^{2}\mathrm{m_{3}}+\mathrm{a_{2}}^{2}\mathrm{m_{4}}+\ \mathrm{a_{1}a_{2}m_{3}cos} \left(\theta_{2}\right)+\mathrm{a_{1}a_{2}m_{4}cos}\left(\theta_{2}\right)\)  
\(\mathrm{M_{13}}=\mathrm{M_{31}}=\mathrm{M_{32}}=-\mathrm{M_{33}}\mathrm{=-[PERSON] _{3}}-\mathrm{[PERSON]_{4}}\)  
\(\mathrm{M_{14}}=\ \mathrm{M_{24}}=\mathrm{M_{34}}=\ \mathrm{M_{41}}=\ \mathrm{M_{42}}=\mathrm{M_{43}} =0\)  
\(\mathrm{M_{21}}=\mathrm{[PERSON]_{2}}+\mathrm{[PERSON]_{3}}+\mathrm{[PERSON]_{4}}+\mathrm{a _{2}}^{2}\mathrm{m_{3}}+\ \mathrm{a_{2}}^{2}\mathrm{m_{4}}+\mathrm{a_{1}a_{2}m_{3}cos} \left(\theta_{2}\right)+\mathrm{a_{1}a_{2}m_{4}cos}\left(\theta_{2}\right)\)  
\(\mathrm{M_{22}}=\mathrm{[PERSON]_{2}}+\mathrm{[PERSON]_{3}}+\mathrm{[PERSON]_{4}}+\mathrm{a _{2}}^{2}\mathrm{m_{3}}+\mathrm{a_{2\[\mathrm{G_{i}}\,=\, \begin{bmatrix}0\\ 0\\ -9.8067(\mathrm{m_{3}}+\mathrm{m_{4}})\\ 0\end{bmatrix}  \tag{15}\]  
\[\mathrm{q_{i}}= \begin{bmatrix}\theta_{1}\\ \theta_{2}\\ \theta_{4}\end{bmatrix} ;\dot{\mathrm{q_{i}}}= \begin{bmatrix}\dot{\theta}_{1}\\ \dot{\theta}_{2}\\ \dot{\mathrm{d_{3}}}\\ \dot{\theta}_{4}\end{bmatrix} ;\,\ddot{\mathrm{q_{i}}}= \begin{bmatrix}\ddot{ \theta}_{1}\\ \ddot{\theta}_{2}\\ \ddot{\mathrm{d_{3}}}\\ \ddot{\theta}_{4}\end{bmatrix}  \tag{16}\]  
where  
\(\mathrm{C_{i}}\): Coriolis matrix. \(\mathrm{G_{i}}\): Gravitational forces matrix. \(\mathrm{M_{i}}\): Inertia matrix. \(\mathrm{q_{i}}\): Position vector. \(\mathrm{\ddot{q_{i}}}\): Velocity vector. \(\mathrm{\ddot{q_{i}}}\): Acceleration vector. \(\mathrm{\tau_{i}}\): Torque vector. \(\mathrm{m_{1}},\;\mathrm{m_{2}},\;\mathrm{m_{3}},\;\mathrm{m_{4}}\): Masses of links one, two, three, and four, respectively.