## 2 Configuration Design of the Spatial 8R Mechanism Configuration
Taking the left-moving platform as an example, for the mechanism with few degrees of freedom, each branch chain will exert a constraint effect on the moving platform; thus, all the constraints loaded on the moving platform are the result of the joint action of all the constraint force  
Figure 1: Model of hip joint rehabilitation mechanism and coordinate system. systems. Due to the joint constraints of the 6R and 2R branches, the mechanism cannot move along the \(x\) axis, \(y\) axis or \(z\) axis or rotate around the \(z\) axis, but can rotate around the \(x\) axis and \(y\) axis to carry out forward flexion and extension, abduction and adduction of the hip, respectively. Suppose the kinematic spiral system of the fixed kinematic pair R\({}_{11}\), 5R branch chain, is  
\[\left\{\begin{array}{l}\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\Figure 1:0\Figure 1:1\Figure 1:2\Figure 1:3\Figure 1:4\$  
In Tables 1 and 2, \(\alpha_{i-1}\) is the rotation degree from \(z_{i-1}\) to \(z_{i}\) around the \(x_{i-1}\) axis. \(a_{i-1}\) is the distance from \(z_{i-1}\) to \(z_{i}\) along the \(x_{i}\) axis. \(\theta_{i}\) is the rotation degree from \(x_{i-1}\) to \(x_{i}\) around the \(z_{i}\) axis. \(d_{i}\) is the distance from \(x_{i-1}\) to \(x_{i}\) along the \(z_{i}\) axis. \(g\), \(m\), \(n\), \(k\), \(l_{1}\), \(l_{2}\) and \(l_{3}\) are constants, and \(\theta_{1}\), \(\theta_{2}\), \(\theta_{3}\), \(\theta_{4}\), \(\theta_{5}\), \(\theta_{6}\), \(\theta_{7}\) and \(\theta_{8}\) are variables. The general formula of matrix transformation between two adjacent coordinate systems, \(\{i\}\) and \(\{i-1\}\), is:  
\[ \begin{split}\underset{i}{}^{i-1}\mathbf{T}=\begin{bmatrix}c\theta_{ i}&-s\theta_{i}&0&a_{i-1}\\ s\theta_{i}c\alpha_{i-1}&c\theta_{i}c\alpha_{i-1}&-s\alpha_{i-1}&-d_{i}s \alpha_{i-1}\\ s\theta_{i}s\alpha_{i-1}&c\theta_{i}s\alpha_{i-1}&\alpha_{i-1}&d_{i}c \alpha_{i-1}\\ 0&0&0&1\end{bmatrix}\end{split}  \tag{3}\]  
where s stands for \(\sin\) and c stands for \(\cos\), the same as below. Then, based on the D-H parameters of the 6R branch chain in Table 1 and Equation (3), we can obtain the transformation matrix of each revolute pair of the 6R branch chain. For the 6R branch chain, the transformation matrix of each link is multiplied, and the transformation matrix of the 6R branch chain is obtained as follows:  
\[ \begin{split}\underset{6}{}^{0}\mathbf{T}_{1}=\underset{1}{}^{0}\mathbf{ T}_{2}^{2}\mathbf{T}_{3}^{3}\mathbf{T}_{4}^{4}\mathbf{T}_{5}^{4}\mathbf{T}_{6}^{5}\mathbf{T}\end{split}  \tag{4}\]  
Since joint 3 and joint 4 are parallel to each other,  
\[ \begin{split}\underset{4}{}^{2}\mathbf{T}_{1}=\underset{3}{}^{2}\bm {T}_{4}^{3}\mathbf{T}=\begin{bmatrix}c_{34}&-s_{34}&0&hc_{3}\\ 0&0&-1&0\\ s_{34}&c_{34}&0&hs_{3}\\ 0&0&0&1\end{bmatrix}\end{split}  \tag{5}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline \(i\) & \(\mathbf{a}_{i-1}\mathbf{I}^{(c)}\) & \(\mathbf{a}_{i-1}\mathbf{/mm}\) & \(\mathbf{\theta}_{i}\mathbf{/}^{(c)}\) & \(\mathbf{d}_{i}\mathbf{/mm}\) \\ \hline
1 & 90 & 8 & \(\theta_{1}\) & 0 \\
2 & 90 & 0 & \(\theta_{2}\) & \(\mathrm{l_{1}}\) \\
3 & 90 & 0 & \(\theta_{3}\) & 0 \\
4 & 0 & h & \(\theta_{4}\) & 0 \\
5 & 0 & m & \(\theta_{5}\) & 0 \\
6 & 90 & 0 & \(\theta_{6}\) & \(\mathrm{l_{2}}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: D-H parameters of 6R limb. \begin{table}
\begin{tabular}{c c c c} \hline \hline \(i\) & \(\mathbf{a}_{i-1}\mathbf{/}^{(c)}\) & \(\mathbf{a}_{i-1}\mathbf{/mm}\) & \(\mathbf{\theta}_{i}\mathbf{/}^{(c)}\) & \(\mathbf{d}_{i}\mathbf{/mm}\) \\ \hline
1 & 90 & k & \(\theta_{7}\) & 0 \\
2 & 90 & 0 & \(\theta_{8}\) & \(\mathrm{l_{3}}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: D-H parameters of 2R limb. Figure 2: Limb coordinate systems. where \(s_{i}\) stands for \(\sin(\theta_{i})\), \(c_{i}\) stands for \(\cos(\theta_{i})\),\(c_{ij}\) stands for \(\cos(\theta_{i}+\theta_{j})\), and \(s_{ij}\) stands for \(\sin(\theta_{i}+\theta_{j})\), the same as below. Finally, the transformation matrix of the 6R branch chain is obtained:  
\[