## 2 Mathematical Modelling
### Kinematics
#### 2.1.1 Forward Kinematics  
Forward kinematics are critical for variable stiffness link (VSL) manipulators to enable the end effector's precise positioning and orientation control. Since VSLs are designed to adapt to changing environments, accurate prediction of effector positions based on joint variables is essential for controlled object interactions. Forward kinematics enables the mapping of joint angles/positions to Cartesian end-effector coordinates through kinematic equations. This enables the planning and execution of precise, adaptable movements tailored to the task at hand. In applications such as medical robotics, which require delicate interventions, forward models ensure safety and effectiveness. This VSL manipulator uses pressure-mediated links with variable stiffness, with two-bar actuators providing rigidity while enabling pressure feedback for collision detection. Consequently, the flexibility of the links results in deviations from the end effector during motion. The Denavit-Hartenberg convention is used to develop joint coordinate frames and homogeneous transformations from which trigonometric relations predict the end-effector pose of the manipulator for given joint angles. The experiments presented later support the assumptions of the kinematic model in predicting motion geometry. The Sketch for the robotic arm, along with the arrangement of each joint's frame and lumped parameters is shown Figure 1. Table 1 presents the Denavit-Hartenberg (DH) parameters to derive forward kinematics using Denavit-Hartenberg method.  
Equation (1) determines the manipulator forward kinematics. This equation represents the transformation matrix between frame \(\mathrm{O}_{0}\) and frame \(\mathrm{O}_{3}\).  
\[{}^{0}T_{3}={}^{0}T_{1}{}^{1}T_{2}{}^{3}T_{2} \tag{1}\]  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**i** & \(\theta_{i}\) & \(\alpha_{i}\) & \(\alpha_{i}\) & \(\alpha_{i}\) \\ \hline
1 & \(q_{1}\) & 90 & 0 & \(l_{1}\) \\
2 & \(q_{2}\) & 0 & \(l_{2}\) & 0 \\
3 & \(q_{3}\) & 0 & \(l_{3}\) & 0 \\ \hline \hline \end{tabular}
\end{table}
Table 1: DH parameters to derive forward kinematics using Denavit–Hartenberg method.  
Figure 1: Sketch for the robotic arm, along with the arrangement of each joint’s frame and lumped parameters.  
Therefore, \({}^{0}T_{1},\ ^{1}T_{2}\) and \({}^{3}T_{2}\) can be obtained by Equations (2)-(4), as follows:  
\[{}^{0}T_{1}=\begin{bmatrix}cos(q_{1})&0&sin(q_{1})&0\\ sin(q_{1})&0&-cos(q_{1})&0\\ 0&0&0&0.04\\ 0&0&0&1\end{bmatrix} \tag{2}\]  
\[{}^{1}T_{2}=\begin{bmatrix}cos(q_{2})&-sin(q_{2})&0&0.29 cos(q_{2})\\ sin(q_{2})&cos(q_{2})&0&0.29 sin(q_{2})\\ 0&0&0&0\\ 0&0&0&1\end{bmatrix} \tag{3}\]  
\[{}^{2}T_{3}=\begin{bmatrix}cos(q_{3})&-sin(q_{3})&0&0.24 cos(q_{3})\\ sin(q_{3})&cos(q_{3})&0&0.24 sin(q_{3})\\ 0&0&1&0\\ 0&0&0&1\end{bmatrix} \tag{4}\]  
while (5) shows the transformation matrix between \(\mathrm{O}_{0}\) and \(\mathrm{O}_{3}\), where \(n_{x},\ n_{y},\ n_{z},\ o_{x},\ o_{y},\ o_{z},\ a_{x}\), \(a_{y}\), and \(a_{z}\) are for the orientation and \(p_{x},\ p_{y},\ \text{and}\ p_{z}\) are for the \(x\)-axis, \(y\)-axis, and \(z\)-axis position, respectively.  
\[{}^{0}T_{3}=\begin{bmatrix}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&0\end{bmatrix} \tag{5}\]  
Thus, the end effector position can be obtained through extracting the transformation matrix fourth column from base to the manipulator end effector.  
\[p_{x}=\cos(q_{1})(l_{2}\cos(q_{2})+l_{3}\cos(q_{2}+q_{3})) \tag{6}\]  
\[p_{y}=\sin(q_{1})(l_{2}\cos(q_{2})+l_{3}\cos(q_{2}+q_{3})) \tag{7}\]  
\[p_{z}=l_{1}+l_{2}\sin(q_{2})+l_{3}\sin(q_{2}+q_{3})) \tag{8}\]