# Design and Analysis of a Chinese Medicine Based Humanoid Robotic Arm Massage System
## 3 Kinematic Analysis of the Humanoid Massage Robot Arm  
### Kinematic Positive Solutions  
In this subsection, the kinematic relationship between the joints of the robot and rigid bodies of the humanoid massage robot arm is described. The motion of forces and moments are not taken into account in this paper which involves the position, velocity, and acceleration of the moving object [27]. Kinematic analysis is an important basis for motion control, trajectory planning, and position control of the robotic arm. A forward kinematic mainly addresses the problem of the establishment of a motion equation and determines hand position. Figure 5 shows a schematic diagram of the kinematic coordinate system which is established using the \(D\)\(-\)\(H\) method of the humanoid massage robot arm. Here, \(L_{1}\) denotes the length of the upper arm and \(L_{2}\) is the length of the cubitus. There are 4 DOFs for the humanoid massage robot arm, i.e., \(\theta_{1}\) is the rotation angle of the upper arm, \(\theta_{2}\) is the rotation angle of the elbow, \(\theta_{3}\) is the rotation angle of the wrist, and \(\theta_{4}\) is the pitch angle of the wrist. The origin \(O_{3}\) coincides with the origin \(O_{4}\), and \(O_{5}\) is a hand center coordinate. The \(D\)\(-\)\(H\) parameters and joint variables are presented in Table 2 for the humanoid massage robotic arm. The transformation matrix of the \(D\)\(-\)\(H\) method for the adjacent coordinate system is generalized as follows.  
\[A_{i}=\left[\begin{array}{cccc}C_{i}&-S_{i}C\alpha_{i}&S_{i}S\alpha_{i}&a_{ i}C_{i}\\ S_{i}&C_{i}C\alpha_{i}&-CiS\alpha_{i}&a_{i}S_{i}\\ 0&S\alpha_{i}&C\alpha_{i}&d_{i}\\ 0&0&0&1\end{array}\right] \tag{1}\]  
where \(C_{i}=\cos\theta_{i}\), \(S_{i}=\sin\theta_{i}\), and \(C\alpha_{i}=\cos\alpha_{i}\), \(S\alpha_{i}=\sin\alpha_{i}\).  
\begin{table}
\begin{tabular}{c c c c c c} \hline
**Link** & **Variable** & \(\mathbf{\alpha_{i}}\) & \(\mathbf{a_{i}}\) & \(\mathbf{d_{i}}\) & \(\mathbf{\cos\alpha_{i}}\) & \(\mathbf{\sin\alpha_{i}}\) \\ \hline
1 & \(\theta_{1}\) & \(90^{\circ}\) & 0 & \(d_{1}\) & 0 & \(-\)1 \\
2 & \(\theta_{2}\) & \(90^{\circ}\) & 0 & \(d_{2}\) & 0 & 1 \\
3 & \(\theta_{3}\) & \(-90^{\circ}\) & 0 & \(d_{3}\) & 0 & \(-\)1 \\
4 & \(\theta_{4}\) & 0 & 0 & 0 & 1 & 0 \\ \hline \end{tabular}
\end{table}
Table 2: \(D\)\(-\)\(H\) parameters and joint variables of the humanoid massage robot arm.  
If the parameters in Table 2 are substituted into Equation (1), the transformation matrix \(A_{i}\) can be expressed as follows:  
\[A_{1}=\left[\begin{array}{cccc}C_{1}&0&-S_{1}&0\\ S_{1}&0&C_{1}&0\\ 0&-1&0&d_{1}\\ 0&0&0&1\end{array}\right],A_{2}=\left[\begin{array}{cccc}C_{2}&0&S_{2}&0\\ S_{2}&0&-C_{2}&0\\ 0&1&0&d_{2}\\ 0&0&0&1\end{array}\right],A_{3}=\left[\begin{array}{cccc}C_{3}&0&-S_{3}&0\\ S_{3}&0&C_{3}&0\\ 0&-1&0&d_{3}\\ 0&0&0&1\end{array}\right]\]  
and  
\[A_{4}=\left[\begin{array}{cccc}C_{4}&-S_{4}&0&0\\ S_{4}&C_{4}&0&0\\ 0&0&1&0\\ 0&0&0&1\end{array}\right]\]  
Therefore, the end position matrix is described as follows:  
\[T_{4}=A_{1}A_{2}A_{3}A_{4}=\left[\begin{array}{cccc}C_{4}&-S_{4}&0&0\\ S_{4}&C_{4}&0&0\\ 0&0&1&0\\ 0&0&0&1\end{array}\right]=\left[\begin{array}{cccc}n_{x}&o_{x}&a_{x}&p_{x} \\ n_{y}&o_{y}&a_{y}&p_{y}\\ n_{z}&o_{z}&a_{z}&p_{z}\\ 0&0&0&1\end{array}\right] \tag{2}\]  
where  
\[\begin{array}{l}n_{x}=c_{4}(s_{1}s_{3}c_{1}c_{2}c_{3})c_{1}s_{2}s_{4};\\ n_{y}=c_{4}(c_{1}s_{3}+s_{1}c_{2}c_{3})-s_{1}s_{2}s_{4};\\ n_{z}=-c_{2}s_{4}-s_{2}c_{3}c_{4};\\ o_{x}=s_{4}(s_{1}s_{3}-c_{1}c_{2}c_{3})-c_{1}s_{2}c_{4};\\ o_{y}=-s_{4}(c_{1}s_{3}+s_{1}c_{2}c_{3})-s_{1}s_{2}c_{4};\\ o_{z}=s_{2}c_{3}s_{4}-c_{2}c_{4};\\ a_{x}=-s_{1}c_{3}-c_{1}c_{2}s_{3};\\ a_{y}=c_{1}c_{3}-s_{1}c_{2}s_{3};\\ a_{z}=s_{2}s_{3};\\ p_{x}=d_{3}c_{1}s_{2}-d_{2}s_{1};\\ p_{y}=d_{2}c_{1}+d_{3}s_{1}s_{2};\\ p_{z}=d_{1}+d_{3}c_{2}.\end{array} \tag{3}\]  
Figure 5: Kinematics diagram of the robot arm using the \(D\)–\(H\) method.  
where, \(n\), \(o\), and \(a\) represent the postures of the base coordinate, and \(p\) represents the position of the base coordinate.