# An Approach to the Dynamics and Control of Uncertain Robot Manipulators
## 4 Application Example: A Redundant SCARA-Type Manipulator
### Kinematics Analysis  
The DH parameters can be used to write the transformations for each link. The general transformation between link \(i-1\) and \(i\) can be written as:  
\[i-1\Upsilon_{i}=\left[\begin{array}{cccc}\cos\theta_{i}&-\sin\theta_{i}\cos \alpha_{i}&\sin\theta_{i}\sin\alpha_{i}&a_{i}\cos\theta_{i}\\ \sin\theta_{i}&\cos\theta_{i}\cos\alpha_{i}&-\cos\theta_{i}\sin\alpha_{i}&a_ {i}\sin\theta_{i}\\ 0&\sin\alpha_{i}&\cos\alpha_{i}&d_{i}\\ 0&0&0&1\end{array}\right]. \tag{36}\]  
For the redundant manipulator, the DH parameters are shown in Table 1.  
It is straightforward to write the transformation matrix for each link of the manipulator by inserting the DH parameters from Table 1 in Equation (36). Then, the transformation matrix can be easily obtained from  
\begin{table}
\begin{tabular}{c|c c c c} \hline i & \(a_{i}\) & \(a_{i}\) & \(d_{i}\) & \(\theta_{i}\) \\ \hline
1 & 0 & 0 & \(l_{1}+d_{1}\) & 0 \\
2 & \(l_{2}\) & 0 & 0 & \(\theta_{2}\) \\
3 & \(l_{3}\) & 0 & 0 & \(\theta_{3}\) \\
4 & \(l_{4}\) & \(\pi\) & 0 & \(\theta_{4}\) \\
5 & 0 & 0 & \(l_{5}+d_{5}\) & 0 \\ \hline \end{tabular}
\end{table}
Table 1: DH parameters of a redundant manipulator.  
Figure 1: A redundant manipulator of the SCARA type.  
\[T=\left[\begin{array}{ccccc}C_{234}&S_{234}&0&l_{2}C_{2}+l_{3}C_{23}+l_{4}C_{234 }\\ S_{234}&-C_{234}&0&l_{2}S_{2}+l_{3}S_{23}+l_{4}S_{234}\\ 0&0&-1&l_{1}+d_{1}-l_{5}-d_{5}\\ 0&0&0&1\end{array}\right], \tag{37}\]  
where \(S_{2}=\sin\theta_{2}\), \(S_{23}=\sin(\theta_{2}+\theta_{3})\), \(S_{234}=\sin(\theta_{2}+\theta_{3}+\theta_{4})\), \(C_{2}=\cos\theta_{2}\), \(C_{23}=\cos(\theta_{2}+\theta_{3})\), \(C_{234}=\cos(\theta_{2}+\theta_{3}+\theta_{4})\).  
From Equation (37), we can obtain the position of the end-effector of the manipulator  
\[\begin{cases}x=l_{2}C_{2}+l_{3}C_{23}+l_{4}C_{234},\\ y=l_{2}S_{2}+l_{3}S_{23}+l_{4}S_{234},\\ z=l_{1}+d_{1}-l_{5}-d_{5}.\end{cases} \tag{38}\]  
Then, the constraint encountered by the manipulator can be written as the following:  
\[\begin{cases}x=r_{x}=\eta\cos(t/2)\cos(t)+x_{0},\\ y=r_{y}=\eta\sin(t/2)\cos(t)+y_{0},\\ z=r_{z}=0.2,\\ \theta_{1}=0.1+0.1\sin(t),\\ \theta_{3}=\pi/2.\end{cases} \tag{39}\]  
By differentiating Equation (39) with respect to time \(t\) twice and combining with Equation (8), we write the constraints in matrix form:  
\[\left\{\begin{array}{ccccc}A=&\left[\begin{array}{ccccc}0&-l_{2}S_{2}-l_{3 }S_{23}-l_{4}S_{234}&-l_{3}S_{23}-l_{4}S_{234}&-l_{4}S_{234}&0\\ 0&C_{2}l_{2}+l_{3}C_{23}+l_{4}C_{234}&C_{23}l_{3}+l_{4}C_{234}&l_{4}C_{234}&0\\ 1&0&0&0&-1\\ 1&0&0&0&0\\ 0&0&1&0&0\end{array}\right],\\ b=&\left[\begin{array}{ccccc}l_{2}C_{2}\theta_{2}^{2}+l_{3}(\dot{\theta}_{ 2}+\dot{\theta}_{3})^{2}C_{23}+l_{4}(\dot{\theta}_{2}+\dot{\theta}_{3}+\dot{ \theta}_{4})^{2}C_{234}-\frac{5}{4}\eta\cos\frac{t}{2}\cos t+\eta\sin\frac{t}{ 2}\sin t\\ l_{2}S_{2}\dot{\theta}_{2}^{2}+l_{3}(\dot{\theta}_{2}+\dot{\theta}_{3})^{2}S_{23 }+l_{4}(\dot{\theta}_{2}+\dot{\theta}_{3}+\dot{\theta}_{4})^{2}S_{234}-\frac{5 }{4}\eta\sin\frac{t}{2}\cos t-\eta\cos\frac{t}{2}\sin t\\ 0\\ -0.1\sin(t)\\ 0\end{array}\right].\end{array}\right. \tag{40}\]