## 2 Materials and Methods
### Hill Muscle Model  
The Hill muscle model considers the muscle-tendon unit as a linear actuator between two attachment points \(A\) and \(B\) on the linked bodies (Figure 3) composed by the series of the tendon SE with length \(l_{t}\) and the muscle, that is modelled as a parallel between the contractile element CE and the passive element PE, with length \(l_{m}\) and inclined with respect to the action line by the pennation angle \(\alpha_{p}\)[26; 27; 28].  
The force \(F_{m}\) generated by the muscle-tendon series is shared by the tendon and the muscle, so it can be evaluated as the sum of the ones generated by the contractile element \(F_{CE}\), representing the active action due to the sarcomeres' contractions, and the passive element \(F_{PE}\), due to the muscular fibre tissue stiffness, projected on the action line through the pennation angle \(\alpha_{p}\). The active part \(F_{CE}\) depends on the activation level \(a\), a scalar number between 0 and 1 determined by the muscular recruitment criterion, the muscle fibre length \(l_{m}\) and deformation velocity \(v_{m}\) through the force-length-velocity relationships, while the passive force \(F_{PE}\) depends only on the muscle fibre length \(l_{m}\)[28; 29; 30], as written in (20) and depicted in the Figure 4:  
* according to the force-length relation \(f_{l}\), increasing the muscle fibre length, the active force increases until it reaches a peak (the maximum isometric force \(F_{0}\)) in correspondence with the optimal fibre length \(l_{0}\), then it decreases;
* the muscle generates a greater force than the maximum isometric one (in correspondence of zero deformation velocity) when it lengthens, with an asymptotic behaviour, and a lower force until it reaches the maximum contraction velocity \(v_{max}\), beyond which it is not able to produce actuation, following the force-velocity relation \(f_{v}\);  
Figure 3: Hill muscle scheme.  
the passive element opposes a growing resistance only if the muscle length is greater than the optimal fibre length \(l_{0}\), until it reaches a maximum value following the relation \(f_{PE}\).  
\[\left\{\begin{array}{c}\overline{l}=\frac{l_{m}}{l_{0}}\\ \overline{v}=\frac{v_{m}}{v_{max}}\end{array}\right.\rightarrow\left\{\begin{array} []{c}F_{CE}=af_{l}\big{(}\overline{l}\big{)}f_{v}(\overline{v})F_{0}\\ F_{PE}=f_{PE}\big{(}\overline{l}\big{)}F_{0}\end{array}\right.\rightarrow\,F_{ m}=(F_{CE}+F_{PE})\cos\alpha_{p} \tag{20}\]  
Generally it is assumed that the tendon dynamics is negligible, so that the tendon length \(l_{t}\) can be considered as a constant, and that the muscle width \(w_{m}\) keeps constant values, even in correspondence of the muscle optimal fibre length \(l_{0}\), when the muscle is inclined by the known optimal pennation angle \(\alpha_{0}\). Then, with reference to Figure 3, Equation (21) is used to calculate the muscle length \(l_{m}\), the muscle deformation velocity \(v_{m}\) and the pennation angle \(\alpha_{p}\), starting from the length \(l_{mt}\) and the deformation velocity \(v_{mt}\) of the muscle-tendon unit, which are known from kinematical analysis [25].  
\[\left\{\begin{array}{c}l_{mt}=l_{t}+l_{m}\cos\alpha_{p}\\ w_{m}=l_{m}\sin\alpha_{p}=l_{0}\sin\alpha_{0}\end{array}\right.\rightarrow\, \left\{\begin{array}{c}l_{m}=\sqrt{\left(l_{0}\sin\alpha_{0}\right)^{2}+ \left(l_{mt}-l_{t}\right)^{2}}\\ \alpha_{p}=\arctan\left(\frac{l_{0}\sin\alpha_{0}}{l_{mt}-l_{t}}\right)\end{array}\right. \tag{21}\]