## 2 Materials and Methods
### Loading of the Knee Model  
The external loads applied to the knee model were the ground reaction forces measured during walking and the muscle forces. The inertia components (moments and forces) associated to the movement of shank and foot were computed by applying an inverse dynamics analysis. Concerning the ground reaction forces (anterior/posterior, medial/lateral, vertical components), we deemed necessary to transfer them to the center of the knee joint because when they were applied to the foot, which was attached to the knee model, the moment they produced at the knee was affected by the position of the foot, which in turn was dependent on the knee moment, and thus, the system became unstable. When we moved the ground reaction force to the upper extremity of the tibia (the weights of foot and shank were subtracted to the vertical component), the corresponding transfer moment was applied to the tibia. As reported in Figure 4, the transfer moment is null during the swing phase because it is the moment that originally the ground reaction forces produced at the knee joint when they were applied in foot/ground contact area. Instead, the moment required to produce the knee flexion/extension includes the inertia components as well. In the absence of muscle forces, this moment was produced by the G&S mechanism. Its time course is reported in the right lowermost panel of Figure 4. As to the muscle forces, an optimization procedure was implemented to obtain an estimate of the muscle forces required to sustain the external knee joint moment. The criterion was the minimization of the maximum force (Min/Max criterion as suggested by [42]) in relation to the physiological cross-sectional area of the muscle (PCSA). For this computation, the muscles considered were not only those acting at the knee but also Iliacus, Psoas, Glutei (maximum, minimum and medium), Adductors (magnus, longus and brevis), Tensor fasciae latae, Soleus, Tibialis anterior and posterior and Peroneus, for a total of 23 muscles. The PCSA values for all the muscles were obtained from tables reported in [43]. The optimization was implemented with the following constraints:  
\[F_{i}\geq 0\ ;\ \ \ \ \sum_{i}F_{i}b_{ij}=M_{j} \tag{3}\]  
where \(F_{i}\) is the force of the muscle \(i\); \(M_{ij}\) is the moment produced by muscle \(i\) around the functional axis \(j\); \(b_{ij}\) is the lever arm of muscle \(i\) in relation to axis \(j\).  
The lever arms of the muscles could not be obtained by simple geometric considerations, because the lines of action of the force actuators representing the muscles changed along the movement, the tendons of some muscles wrapped over the bone surfaces, and these surfaces were not always aligned with the rotation axes. The lever arms were thus obtained by analyzing the moment produced by each muscle when it was activated with a predefined muscle force. For each muscle, a simulation with no gravity, no ground reaction forces and no mass of the segments was run. All muscle forces were set to zero except for the muscle considered. A constant force of 100 N was imposed on this muscle, and the resulting moments (flexion/extension, adduction/abduction and internal/externalrotation) were analyzed. At each joint (hip, knee and ankle), the lever arm corresponding to each rotational degree of freedom was computed as \(b_{ij}=\dfrac{M_{ij}}{F_{i}}\).  
Figure 5 reports the estimated muscle forces referring to the muscles of interest for the knee joint.