# An Approach to the Dynamics and Control of Uncertain Robot Manipulators
## 4 Application Example: A Redundant SCARA-Type Manipulator
### Dynamics Analysis  
The dynamics equation of the manipulator can be written as:  
\[M\left(q\right)\ddot{q}+C\left(q,\dot{q}\right)+G\left(q,\dot{q}\right)=\tau, \tag{41}\]  
where \(\tau\) represents the generalized forces vector, \(M\) is the inertia matrix, \(C\) is the centrifugal and Coriolis forces vector, and \(G\) is the gravitational force vector.  
The inertia matrix is a symmetric positive definite matrix, which means \(M_{ij}=M_{ji}\). The inertia matrix for the manipulator system is given as follows:\[\left\{\begin{array}{l}M_{11}=m_{1}+m_{2}+m_{3}+m_{4}+m_{5},\ \ M_{15}=-m_{5},\ \ M_{12}=M_{13}=M_{14}=M_{25}=M_{35}=M_{45}=0,\\ M_{22}=l_{2}^{2}m_{2}+(l_{2}^{2}+l_{\text{C3}}^{2}+2l_{\text{J}}l_{\text{C4}} \text{C}_{3})m_{3}+(l_{2}^{2}+l_{3}^{2}+l_{\text{C4}}^{2}+2l_{\text{J}}l_{3})m _{4}+2(l_{3}l_{\text{C4}}\text{C}_{4}+l_{2}l_{\text{C4}}\text{C}_{34})m_{4}\\ +(l_{2}^{2}+l_{3}^{2}+l_{4}^{2}+2l_{\text{J}}l_{\text{C3}})m_{5}+2(l_{3}l_{4} \text{C}_{4}+l_{2}l_{\text{A5}}\text{C}_{34})m_{5}+l_{2 zz}+l_{3 zz}+l_{4 zz},\\ M_{23}=(l_{\text{C3}}^{2}+l_{3}l_{\text{C3}}\text{C}_{3})m_{3}+(l_{3}^{2}+l_{ \text{C4}}^{2}+l_{\text{J}}l_{3}\text{C}_{3}+2l_{\text{J}}l_{\text{C4}} \text{C}_{4})m_{4}+l_{2}l_{\text{A5}}\text{C}_{34}\text{C}_{5},\\ +(l_{3}^{2}+l_{4}^{2}+l_{\text{J}}l_{3}\text{C}_{3}+2l_{3}l_{\text{A}}\text{C}_ {4})m_{5}+l_{3 zz}+l_{4 zz},\\ M_{24}=(l_{\text{C4}}^{2}+l_{3}l_{\text{C4}}\text{C}_{4}+l_{2}l_{\text{C4}} \text{C}_{34})m_{4}+(l_{4}^{2}+l_{3}l_{\text{A}}\text{C}_{4}+l_{2}l_{\text{A 5}}\text{C}_{34})m_{5}+l_{4 zz},\\ M_{33}=l_{\text{C3}}^{2}m_{3}+(l_{3}^{2}+l_{\text{C4}}^{2}+2l_{3}l_{\text{C4}} \text{C}_{4})m_{4}+(l_{3}^{2}+l_{\text{A}}^{2}+2l_{3}l_{\text{A}}\text{C}_{4} )m_{5}+l_{3 zz}+l_{4 zz},\\ M_{34}=(l_{\text{C4}}^{2}+l_{\text{J}}l_{\text{C4}}^{2})m_{4}+(l_{4}^{2}+l_{ \text{J}}l_{\text{A5}}\text{C}_{4})m_{5}+l_{4 zz},\\ M_{44}=l_{\text{C4}}^{2}m_{5}+l_{\text{A}}^{2}m_{5}+l_{\text{A}}zz,\ \ \ \ M_{55}=m_{5}.\end{array}\right. \tag{42}\]  
The components of centrifugal and Coriolis forces \(C\) are given as:  
\[\left\{\begin{array}{l}C_{11}=C_{15}=0,\\ C_{12}=-(l_{2}S_{3}\dot{\theta}_{3}^{2}+2l_{2}S_{3}\dot{\theta}_{2}\dot{ \theta}_{3})(l_{\text{J}}m_{3}+l_{4}m_{4}+l_{3}m_{5})+(l_{2}S_{34}\dot{\theta} _{3}^{2}-2(l_{3}S_{4}+l_{2}S_{34})\dot{\theta}_{4})(l_{\text{C4}}m_{4}+l_{4}m _{5}),\\ +(l_{2}S_{34}\dot{\theta}_{2}\dot{\theta}_{3}-(\dot{\theta}_{4}^{2}+2\dot{ \theta}_{2}\dot{\theta}_{4})(l_{2}S_{34}))(l_{\text{C4}}m_{4}+l_{4}m_{5}),\\ C_{13}=(l_{\text{C3}}m_{3}+l_{3}m_{4}+l_{3}m_{5})l_{2}S_{3}\dot{\theta}_{2}^{2}+ (l_{2}S_{34}\dot{\theta}_{2}^{2}-(2(\dot{\theta}_{2}+\dot{\theta}_{3})+\dot{ \theta}_{4})l_{3}S_{4}\dot{\theta}_{4})(l_{\text{C4}}m_{4}+l_{4}m_{5}),\\ C_{14}=(l_{\text{C4}}m_{4}+l_{4}m_{5})(l_{3}S_{4}+l_{2}S_{34})\dot{\theta}_{2}^{2 }+(l_{3}S_{4}\dot{\theta}_{3}^{2}+2l_{3}\dot{\theta}_{2}\dot{\theta}_{3})(l_{ \text{C4}}m_{4}+l_{4}m_{5}).\end{array}\right. \tag{43}\]  
The components of the gravitational force are given by:  
\[G=\left[(m_{1}+m_{2}+m_{3}+m_{4}+m_{5})g,0,0,0,-m_{5}g\right]^{T}. \tag{44}\]  
According to the UK equation, the constraint force, which represents the inverse dynamics of the manipulator, can be written in the form  
\[Q^{c}=M^{\frac{1}{2}}(AM^{-\frac{1}{2}})^{+}(b-AM^{-1}(-C-G)). \tag{45}\]