## 2 Materials and Methods
### Analytical Modelling of Flexible Mechanisms Using Euler-Bernoulli Beam Theory
In general, flexible beams are handled as the systems with distributed elasticity [23; 24], which can be described by the partial differential equations:  
\[\frac{\partial^{2}}{\partial x^{2}}\bigg{(}EI\frac{\partial^{2}u(x,t)}{\partial x ^{2}}\bigg{)}+\mu\frac{\partial^{2}u(x,t)}{\partial t^{2}}=f(x,t), \tag{1}\]  
\[u(x,t)\approx\sum_{i=1}^{n}N_{i}(x)q_{i}(t), \tag{2}\]  
where \(n\) is the number of considered finite elements with each of the same length \(l\); therefore, the beam length can be denoted as \(L=l*n\). On each element, two nodes are introduced. This leads to four state variables dedicated to each element. The state vector of the \(i\)th element can be written as \(\big{[}\ q_{2i-1}(t)\ q_{2i}(t)\ q_{2i+1}(t)\ q_{2i+2}(t)\ \big{]}^{T}\), where \(q_{2i-1}\) is the displacement of the node \(i-1\), \(q_{2i+1}\) denotes the displacement of the neighbouring node \(i\), \(q_{2i}\) is the angle in the node \(i-1\), and \(q_{2i+2}\) is the angle in the node \(i\). The corresponding shape functions \(N_{i}(x)\) are chosen as the cubic Hermitian functions [24] to meet the requirements following from Euler-Bernoulli beam theory ([21; 23; 25; 26]) regarding continuity between elements, continuity on borders, and completeness [23; 24]. To express the suitable coefficients \(N_{i}(x)\) and to establish the state variables, let us present the auxiliary function \(w_{i}(x,t)\),  
\[w^{i}(x,t)=\alpha_{1}+\alpha_{2}x+\alpha_{3}x^{2}+\alpha_{4}x^{3}, \tag{3}\]  
where \(\alpha\)s are the auxiliary time-variant functions. The boundary conditions are set to \(w_{1}^{i}(t)\triangleq w^{i}(0,t)=\alpha_{1}\), \(w_{2}^{i}\triangleq w^{i}(l,t)=\alpha_{1}+\alpha_{2}l+\alpha_{3}l^{2}+\alpha _{4}l^{3}\), \(\theta_{1}^{i}(t)\triangleq\frac{\partial w^{i}(x,t)}{\partial x}(0,t)=\alpha _{2}\), \(\theta_{2}^{i}(t)\triangleq\frac{\partial w^{i}(x,t)}{\partial x}(l)=\alpha_{ 2}+2\alpha_{3}l+3\alpha_{4}l^{2}\). These given requirements are gathered as  
\[\left[ \begin{array}{c}w_{1}^{i}\\ \theta_{1}^{i}\\ w_{2}^{i}\\ \theta_{2}^{i}\end{array} \right]=\left[ \begin{array}{cccc}1&0&0&0\\ 0&1&0&0\\ 1&l&l^{2}&l^{3}\\ 0&1&2l&3l^{2}\end{array} \right]\left[ \begin{array}{c}\alpha_{1}\\ \alpha_{2}\\ \alpha_{3}\\ \alpha_{4}\end{array} \right]  
\[\overline{Q}^{i}\triangleq\left[ \begin{array}{c}\theta(t)\\ q^{i}(t)\end{array} \right]\text{. The angle $\theta(t)$ represents the hub angle; see Figure 3. For the $i$th element, $x=s+(i-1)l$, and we finally express (2) in the form  
\[u^{i}(s,t)=\overline{N}^{i}(s)\overline{Q}^{i}(t)=\left[ \begin{array}{cc}s+( i-1)l&N^{i}(s)\end{array} \right]\left[ \begin{array}{c}\theta(t)\\ Q^{i}(t)\end{array} \right]\text{.} \tag{7}\]  
Considering (7), we can proceed with expressing the kinetic energy \(T_{i}\) and the potential energy \(V_{i}\) of the \(i\)th element. Specifically,  
\[T_{i}=\frac{1}{2}\int_{0}^{l}\left[\frac{\partial u_{i}(s,t)}{\partial t} \right]^{2}\rho S\;\text{ds}, \tag{8}\]  
where \(\rho\) denotes the arm material density [kg/m\({}^{3}\)] and \(S\) is the arm cross-surface area [m\({}^{2}\)]. From substituting of \(\frac{\partial u_{i}(s,t)}{\partial t}=\overline{N}_{i}(s)\overline{Q}_{i}(t)\), it follows that  
\[T_{i}=\frac{1}{2}\rho S\bar{Q}_{i}^{T}(t)M_{i}\;\bar{Q}_{j}(t), \tag{9}\]  
where \(M_{i}=\int_{0}^{l}\overline{N}_{i}^{T}(s)\overline{N}_{i}(s)\;\text{ds}\), and the mass matrix \(M_{i}\) is  
\[M_{i}=\left[