## 4 Craniomy Trajectories by the Spherical Parallel Mechanism
### Kinematic and Static Analysis of the SPM
\begin{array}{c}\mathbf{z_{A2}}=\mathbf{R_{y}}(\lambda)\mathbf{R_{z} }(\theta_{A})\mathbf{R_{y}}(\alpha)\mathbf{z}\\ \mathbf{z_{B2}}=\mathbf{R_{z}}(-2\pi/3)\mathbf{R_{y}}(\lambda)\mathbf{R_{z}}( \theta_{B})\mathbf{R_{y}}(\alpha)\mathbf{z}\\ \mathbf{z_{C2}}=\mathbf{R_{z}}(2\pi/3)\mathbf{R_{y}}(\lambda)\mathbf{R_{z}}( \theta_{C})\mathbf{R_{y}}(\alpha)\mathbf{z}\end{array} \right., \tag{7}\]  
\[\left\{ \begin{array}{c}\mathbf{z_{A3}}=\mathbf{M_{E}}(\psi,\theta,\varphi) \mathbf{R_{y}}(\gamma)\mathbf{z}\\ \mathbf{z_{B3}}=\mathbf{M_{E}}(\psi,\theta,\varphi)\mathbf{R_{z}}(-2\pi/3) \mathbf{R_{y}}(\gamma)\mathbf{z}\\ \mathbf{z_{C3}}=\mathbf{M_{E}}(\psi,\theta,\varphi)\mathbf{R_{z}}(2\pi/3) \mathbf{R_{y}}(\gamma)\mathbf{z}\end{array} \right., \tag{8}\]  
where \(\mathbf{R_{u}}(\varepsilon)\) is a rotation matrix of angle \(\varepsilon\) around axis \(\mathbf{u}\). The orientation of the mechanism end effector is given by the rotation matrix \(\mathbf{M_{E}}\). For each leg, the literal expressions of all involved joint axes \(\mathbf{z_{k2}}\) and \(\mathbf{z_{k3}}\) coordinates are calculated and substituted into Equation (6). Then, the dot product of the developed expression will lead to an equation in the form where the active joint variable is isolated:  
\[L_{k}\cos\theta_{k}+M_{k}\sin\theta_{k}=N_{k}, \tag{9}\]  
where \(L_{k},M_{k}\) and \(N_{k}\) are literal expressions that include the end-effector coordinates \(\psi,\theta\) and \(\varphi\) and the mechanism linkage dimensions \(\alpha\), \(\beta\) and \(\gamma\). Their only function is to reduce  
Figure 9: (**a**) Construction of the SPM base. (**b**) Kinematic of the SPM end effector. the size of the equations. This leads for each leg to the following expression of the active joint coordinate:  
\[\theta_{k}=\cos^{-1}\left(N_{k}/\sqrt{{L_{k}}^{2}+{M_{k}}^{2}}\right)+\text{atan2 }(M_{k},L_{k}), \tag{10}\]  
The details of the resolution method can be found in [16]. The static model of the mechanism can be determined using its Jacobian matrix as follows:  
\[\boldsymbol{\tau}=\mathbf{J}^{\mathbf{T}}\mathbf{f}, \tag{11}\]  
With \(\boldsymbol{\tau}\) a vector containing the joint torques \(\tau_{A}\), \(\tau_{B}\) and \(\tau_{C}\) and \(\mathbf{f}\) the force expressed in the end-effector reference frame. The SPM Jacobian matrix can be found by differentiating the IKM given by Equation (6). Then, it can be written in a matrix form that gives the relationship between the joint velocities \(\dot{\mathbf{q}}\) and the end-effector velocity \(\boldsymbol{\omega}\) as:  
\[\mathbf{B}\dot{\mathbf{q}}=\mathbf{A}\boldsymbol{\omega}, \tag{12}\]  
where \(\mathbf{A}\) and \(\mathbf{B}\) can be determined using the revolute joint axes coordinates as followed:  
\[\mathbf{A}=\left[ \begin{array}{c}(\mathbf{z}_{\mathbf{A}2}\times\mathbf{z} _{\mathbf{A}3})^{\mathbf{T}}\\ (\mathbf{z}_{\mathbf{B}2}\times\mathbf{z}_{\mathbf{B}3})^{\mathbf{T}}\\ (\mathbf{z}_{\mathbf{C}2}\times\mathbf{z}_{\mathbf{C}3})^{\mathbf{T}}\end{array}  \right],\;\mathbf{B}=\left[ \begin{array}{c}\mathbf{z}_{\mathbf{A}1}\times \mathbf{z}_{\mathbf{A}2}\cdot\mathbf{z}_{\mathbf{A}3}&0&0\\ 0&\mathbf{z}_{\mathbf{B}1}\times\mathbf{z}_{\mathbf{B}2}\cdot\mathbf{z}_{ \mathbf{B}3}&0\\ 0&0&\mathbf{z}_{\mathbf{C}1}\times\mathbf{z}_{\mathbf{C}2}\cdot\mathbf{z}_{ \mathbf{C}3}\end{array} \right]. \tag{13}\]  
The mechanism Jacobian matrix \(\mathbf{J}\) can then be calculated as:  
\[\mathbf{J}=\mathbf{A}^{-1}\mathbf{B}. \tag{14}\]  
Based on the mechanism's static model, it is possible to calculate the joint torques required to generate a force of a given direction and magnitude for a given configuration of the mechanism.