## 2 Materials and Methods
### The Multi-Body Model
#### 2.1.2 Joint Kinematics Setup  
Having defined the two segments, two joints were implemented to simulate the knee and the ankle. Although the paper focuses on ankle joint motion, the knee was introduced only to achieve a more realistic representation of markers' trajectories in the global coordinate system (GCS). Due to its minor role in the methodology here discussed, the knee joint is approximated as a simple revolute, with a single rotational DoF acting between two frames: the first one translates horizontally along the \(X\)-axis of the GCS at constant speed, set equal to 1.4 m/s (average walking velocity); the second frame is integral with the shank and located at the knee center of rotation. By model definition, the knee AoR is parallel to the \(Z\)-axis of the GCS. As stated above, the translational DoF assigned to the knee joint allowed to generate marker coordinates whose magnitude (in mm) could result to be compatible with the actual trajectories recorded during a gait analysis in a movement analysis laboratory.  
As far as the ankle is concerned, the model allowed relative motion between a first (base) frame integral with the shank and located at the distal end of the segment and a second (follower) frame integral with the foot and located at the proximal end of the corresponding segment. In this case, in order to achieve a more complex and detailed description of the natural joint kinematics, a bushing joint (6 DoFs) was selected. Based on this approach, the simulated ankle joint enables three independent translations and three independent rotations along the base frame axes. Therefore, the model enables different motion configurations, for instance, by selecting only a single active DoF or multiple DoFs (up to 6).  
In order to run the model and generate the markers' trajectories, the complete joint kinematics must be provided as an input; hence, the rotation angle, angular velocity, and angular accelerations of each joint had to be defined in the first place. To this purpose, the three ankle rotation angles were defined as piecewise-defined functions of the gait cycle, by considering ranges of motion and curve trends respectful of natural joint kinematics. The translational DoFs along the antero-posterior, longitudinal, and lateral directions were defined with a similar approach; however, in this case, the ranges of motion were selected arbitrarily due to the lack of specific information from the literature. However, to avoid unrealistic joint configurations, the ranges of the translational DoFs were selected to achieve AoR translations coherent with the linear dispersion of helical axes observed on cadaver specimens [27]. Each ankle DoF signal could be easily varied in terms of magnitude and duration, hence enabling the possibility to test the model for different ranges of motion and speed. Figure 1b,c show the patterns of ankle and knee motion for a general tri-planar motion configuration, which considers 6 active DoFs at the ankle joint. Unlike the ankle joint, the knee, modeled as a simple revolute joint, only requires the definition of the flexion/extension DoF to run the model. The same pattern of knee motion shown in Figure 1b was considered for all the simulations, which always included three full gait cycles. As highlighted in Figure 1b,c, all the DoFs were smoothed by a low-pass filter (Butterworth, 4 th order) before they were provided as input to the model to remove the effect of undesired spikes in the velocity and acceleration signals.  
To summarize, the setup of joint kinematics in the model allows for customizing:  
1. The number of active DoFs allowed by the ankle joint (modeled as a bushing);
2. The range of motion of each active DoF;
3. The duration of each gait cycle, hence the speed of the motion patterns.