## 2 Design and Modelling of a 3D Printer with five Degrees of Freedom
### Dynamic Analysis
#### 2.3.1 Inverse Dynamics
As commonly understood, all forces and torques may be determined based on the reference point of the overall coordinate system of the mechanism using the Euler equation, which is represented as \(\sum M_{o}=I_{o}\alpha+\omega\times I_{o}\omega\). In order to do this, we began by considering the moment equilibrium of both connections (\(k=1\), \(2\)) for each parallelogram around the points \(E_{i}\) and \(F_{i}\). Subsequently, we established their corresponding expressions reflected along the \(\hat{n}_{i}\) axis. The mathematical representation of this scenario is provided in Equations (11) and (12). Figure 5: Detailed free-body diagram of the mechanism. \[ \begin{pmatrix}u_{i,1}\times^{i}F_{3}+\gamma_{i}\times^{i}F_{G_{4}}+v_{i,1}\times^ {i}F_{5}\\ +L_{i}\times^{i}F_{6,1}+^{i}M_{G_{4}}\end{pmatrix} \cdot\hat{n}_{i}+ \begin{pmatrix} iM_{3,1}+^{i}M_{5,1}\end{pmatrix} \cdot\hat{n}_{i}=0\\ \begin{pmatrix}-u_{i,2}\times^{i}F_{3}+\gamma_{i}\times^{i}F_{G_{4}}-v_{i,2} \times^{i}F_{5}+L_{i}\times^{i}F_{6,2}\end{pmatrix} \cdot\hat{n}_{i}+ \begin{pmatrix} iM_{3,2}+^{i}M_{5,2}\end{pmatrix} \cdot\hat{n}_{i}=0\\ \begin{pmatrix}-u_{i,2}\times^{i}F_{3}+\gamma_{i}\times^{i}F_{G_{4}}-v_{i,2} \times^{i}F_{5}+L_{i}\times^{i}F_{6,2}\end{pmatrix} \cdot\hat{n}_{i}+ \begin{pmatrix} iM_{3,2}+^{i}M_{5,2}\end{pmatrix} \cdot\hat{n}_{i}=0\\ \begin{pmatrix}+M_{G_{4}}\end{pmatrix} \end{pmatrix}\end{pmatrix} \tag{12}\]  
The equations \({}^{i}F_{G_{4}}\) and \({}^{i}M_{G_{4}}\), which are presented in Equations (11) and (12), respectively, are defined as shown in Equations (13) and (14). \[{}^{i}F_{G_{4}}=m_{i}\Big{(}g-^{i}a_{i}\Big{)}, \tag{13}\]  
\[{}^{i}M_{G_{4}}=-\big{\{}\omega_{i}\times(I_{o,i}\omega_{i})+I_{o,i}\dot{ \omega_{i}}\big{\}}, \tag{14}\]  
Here, \(g\) is the gravitational acceleration and \(m_{i}\) is the mass of the leg of the parallelogram. \(I_{o,i}= \begin{pmatrix}O\\ L_{i}\end{pmatrix} I_{i}\Big{)}\Big{(} \begin{smallmatrix}O\\ L_{i}\end{smallmatrix} I_{i}^{T}\Big{)}\) is the inertia matrix. This matrix is expressed in the global reference frame of the parallelogram and the origin of the global frame. The expression \(I_{L_{i}}=I_{G_{i}}+m_{i}\|L_{i}\|^{2}diag(0,\;1,\;1)\) is the inertia matrix of the parallelogram with respect to the origin of the global reference coordinate system shown in Figure 3. \( \begin{smallmatrix}O\\ L_{i}\end{smallmatrix} T_{i}= \begin{bmatrix}\frac{L_{i}}{\|L_{i}\|}&\hat{n}_{i} \times\frac{L_{i}}{\|L_{i}\|}&\hat{n}_{i}\end{bmatrix} \), \(i=1,\ldots,4\) is the equation placed on the \(\{L_{i}\}\) leg according to the global coordinate system. It represents the transformation matrix of the local coordinate system. Equations (1) and (2) are added mathematically, and at the same time, considering that the legs in the system are connected to the system with the help of rotary joints, in other words, considering the equation provided in \({}^{i}M_{3,k}\cdot\hat{n}=^{i}M_{5,k}\cdot\hat{n}=0,k=1,2\), Equation (15) is obtained via the following:  
\[(L_{i}\times\hat{n}_{i})\cdot\Big{(}^{i}F_{6,1}+^{i}F_{6,2}\Big{)}=2\Big{(} \gamma_{i}\times^{i}F_{G_{4}}+^{i}M_{G_{4}}\Big{)}\cdot\hat{n}_{i}, \tag{15}\]  
Furthermore, by considering the balance of the moment components around \(E_{i},F_{i}\) along the \(\hat{s}_{i}\) axis of the local coordinate system associated with the parallelograms, we obtained Equation (16). \[\Big{(}L_{i}\times\Big{(}^{i}F_{6,1}+^{i}F_{6,2}\Big{)}\Big{)}\cdot\hat{s}_{i} +2\Big{(}\gamma_{i}\times^{i}F_{G_{4}}+^{i}M_{G_{4}}\Big{)}\cdot\hat{s}_{i}=0, \tag{16}\]  
By using the vector identity \((a\times b)\cdot c=(c\times a)\cdot b\), Equation (16) may be rewritten as Equation (17). \[(L_{i}\times\hat{s}_{i})\cdot\Big{(}^{i}F_{6,1}+^{i}F_{6,2}\Big{)}=2\Big{(} \gamma_{i}\times^{i}F_{G_{4}}+^{i}M_{G_{4}}\Big{)}\cdot\hat{s}_{i}, \tag{17}\]  
By substituting the formulas derived from Equations (15) and (17) into the corresponding arms of the parallelograms in each kinematic chain, we obtain the following systems of equations:  
\[ \begin{bmatrix}N\\ S\end{bmatrix} _{8\times 12}