## 2 Design and Modelling of a 3D Printer with five Degrees of Freedom
### Dynamic Analysis
#### 2.3.1 Inverse Dynamics
\begin{bmatrix}1F_{6,1}+^{1}F_{6,2}\\ \vdots\\ 4F_{6,1}+^{4}F_{6,2}\end{bmatrix} = \begin{bmatrix}R_{N}\\ R_{S}\end{bmatrix} , \tag{18}\]  
Equations (19)-(22) express \(N\), \(S\), \(R_{N}\), and \(R_{S}\), respectively. \[N= \begin{bmatrix}(L_{1}\times\hat{n}_{1})^{T}&0&0\\ 0&\ddots&0\\ 0&0&(L_{4}\times\hat{n}_{4})^{T}\end{bmatrix} _{4\times 12}, \tag{19}\]  
\[S= \begin{bmatrix}(L_{1}\times\hat{s}_{1})&0&0\\ 0&\ddots&0\\ 0&0&(L_{4}\times\hat{s}_{4})\end{bmatrix} _{4\times 12}, \tag{20}\]\[R_{N}=2 \begin{bmatrix}\left(\gamma_{1}\times^{1}F_{G_{4}}+^{1}M_{G_{4}}\right) \cdot\hat{n}_{1}\\ \vdots\\ \left(\gamma_{4}\times^{4}F_{G_{4}}+^{4}M_{G_{4}}\right)\cdot\hat{n}_{4}\end{bmatrix} , \tag{21}\]  
\[R_{S}=2 \begin{bmatrix}\left(\gamma_{1}\times^{1}F_{G_{4}}+^{1}M_{G_{4}}\right) \cdot\hat{s}_{1}\\ \vdots\\ \left(\gamma_{4}\times^{4}F_{G_{4}}+^{4}M_{G_{4}}\right)\cdot\hat{s}_{4}\end{bmatrix} , \tag{22}\]  
To derive the dynamic model of the system, it is necessary to articulate the forces and moments exerted on the connections located on the top moving platform of the system, as seen in Figure 2. To achieve this objective, by referring to Figure 5, the cumulative forces exerted on the mobile platform can be mathematically represented using Equation (23). \[{}^{i}F_{R_{6}}=^{i}F_{6,1}+^{i}F_{6,2}-^{i}F_{G_{6}}\ \,i=1,3, \tag{23}\]  
In this context, the symbol \({}^{i}F_{R_{6}}\) denotes the forces exerted on the connection by the rotary joint, and can be mathematically represented by Equation (24). \[{}^{i}F_{G_{6}}=m_{6}\left(g-^{i}a_{Con}\right)\ \,i=1,3, \tag{24}\]  
Similarly, based on the free body diagram shown in Figure 2, the moment components along the axis passing through, \({}^{1}R_{6}\) and \({}^{3}R_{6}\), can be represented by the equilibrium equation provided in Equation (25). \[\left(r_{4}\times\left({}^{4}F_{7,1}+^{4}F_{7,2}\right)\right)\cdot\hat{i}+ \left(r_{2}\times\left({}^{2}F_{7,1}+^{2}F_{7,2}\right)\right)\cdot\hat{i}= \left(r_{G_{8}}\times F_{G_{8}}\right)\cdot\hat{i}+M_{G_{8}}\cdot\hat{i}+\left( r_{p}\times F_{\text{S}}\right)\cdot\hat{i}+M_{8}\cdot\hat{i}-^{1}M_{R_{6}}\cdot \hat{i}-^{3}M_{R_{6}}\cdot\hat{i}, \tag{25}\]  
Here, the symbol \({}^{i}M_{R_{6}}\), \(i=1,3\) indicates the moments exerted on the moving platform by the rotary joint of the connections. The symbols \(F_{8}\) and \(M_{8}\) represent the external forces and moments that are exerted on the moving platform, respectively. The forces and moments are explicitly represented by Equations (26) and (28). \[F_{G_{8}}=m_{8}(g-a_{CP}), \tag{26}\]  
\[M_{G_{8}}=-\left\{\hat{\theta}^{2}\hat{i}\times\left(I_{G_{8}}\hat{i}\right)+ \tilde{\theta}I_{G_{8}}\hat{i}\right\}, \tag{27}\]  
Considering the fact that \({}^{i}M_{R_{6}}\), \(i=1,3\) does not have any components along \(\hat{i}\), in other words, considering the \({}^{1}M_{R_{6}}\) \(\cdot\hat{i}=^{3}M_{R_{6}}\) \(\cdot\hat{i}=0\), relationship, Equation (25) can be rewritten as follows:  
\[\left(\hat{i}\times r_{4}\right)\cdot\left({}^{4}F_{7,1}+^{4}F_{7,2}\right)+ \left(\hat{i}\times r_{2}\right)\cdot\left({}^{2}F_{7,1}+^{2}F_{7,2}\right)= \left(r_{G_{8}}\times F_{G_{8}}+M_{G_{8}}+r_{P}\times F_{8}+M_{8}\right)\cdot \hat{i}, \tag{28}\]  
Furthermore, the total forces exerted on the mobile platform can be precisely described as stated in Equation (29). \[\left({}^{4}F_{7,1}+^{4}F_{7,2}\right)+\left({}^{2}F_{7,1}+^{2}F_{7,2}\right) +^{1}F_{R_{6}}+^{2}F_{R_{6}}4=F_{G_{8}}+F_{8}, \tag{29}\]  
By substituting the expression for \({}^{i}F_{R_{6}}\), \(i=1,3\) from Equation (23) into Equation (26), Equation (30) can be derived. \[\left({}^{1}F_{6,1}+^{1}F_{6,2}\right)+\left({}^{2}F_{7,1}+^{2}F_{7,2}\right)+ \left({}^{3}F_{6,1}+^{3}F_{6,2}\right)+\left({}^{4}F_{7,1}+^{4}F_{7,2}\right) ={}^{1}F_{G_{6}}+^{3}F_{G_{6}}+F_{G_{8}}+F_{8}, \tag{30}\]  
By using Equations (18), (28), and (30), the concept of force equality can be expressed in the form of a matrix, as shown in Equation (31). \[