# Forward Fall Detection Using Inertial Data and Machine Learning
## 2 Materials and Methods
### Generating the Fall Event Training Values Using a Digital Model  
To easily generate the necessary data for training artificial neural networks, in this study, the Open Sim program was used starting from the passive dynamic simulation walking model provided by [19; 20; 21; 23]. The necessary steps for creating the digital model are illustrated in the following flowchart:  
The first step was to generate the models' body geometries starting from a rigid platform and a four-link walker [19], which was further developed into an 11-segment model, by following the steps presented in Figure 5, using MATLAB and anthropometric data from the literature [21]. The model is presented in Figure 6 and its constituting body segments are defined as simple geometries. Figure 4: Recorded normalized acceleration values on the Gait event of Person 1. Figure 5: Flowchart for developing the digital model. The pelvis and torso are considered a single body from the anthropomorphic point, but are still differentiated to measure the acceleration in the pelvis zone. The moments and products of inertia of the body about its center of mass are expressed according to the body frame, as an exemplification; the mass center for the thigh is at the midpoint between the hip and knee joints, and the mass center for the shank is between the center of the shank. Joints are necessary to unite the bodies of the model to create a multibody graph. In Open Sim, every model starts with a Ground body. The kinematic relationship between two bodies, referred to as the parent and child bodies, is described by a joint, which is a collection of degrees of freedom [23]. The Frame class hierarchy was included in Open Sim 4.0 to provide flexibility in the definition of joints. Ground is the basic type of frame, followed by Body and PhysicalOffset-Frame. Since each of these three frames is either a rigid body or is fixed to a rigid body, they are collectively referred to as PhysicalFrames. A joint links two PhysicalFrames (parent and child) in OpenSim 4.0. A non-linear contact force model called the Hunt-Crossley force model [22] is used to simulate how two bodies interact when they come into touch. It considers the contact's damping and elastic properties simultaneously. In the Hunt-Crossley model, the force \(F\) is provided by:  
\[F=k\delta^{n}+c\delta^{n}\delta \tag{1}\]  
where:  
\(k\) is the stiffness coefficient. \(\delta\) is the penetration depth (deformation). \(n\) is the exponent related to the nature of contact (typically between 1.5 and 2 for biological tissues). \(c\) is the damping coefficient. \(\delta\) is the rate of change of deformation (velocity of penetration). In human movement dynamics, the Hunt-Crossley force principle [24] is mainly used to model and simulate contact forces between the human body and external surfaces. Figure 6: Developed model: (**a**) schematic representation of the segmented model; (**b**) Open Sim developed digital model. To define Coordinate Limit Forces in the dynamic simulation environment, the class that captures the parameters defining these forces is created with the help of MATLAB 2021, with the values shown in Table 2. The values have been changed empirically to make the digital model able to forward fall in a damped or undamped manner. For the left-hip coordinate-limit force the setup ensures that the hip joints are constrained within specified angular limits, with appropriate stiffness and damping applied as they approach these limits, which helps to prevent unrealistic or damaging joint movements during the simulation. Coordinate limit forces are also added to the right hip, left knee, torso, head, and arms. Contact geometries are defined in the simulation model according to the topology view shown in Figure 7. This involves creating a contact sphere for each set of contacts and setting its properties, such as radius, location, and frame, before adding it to the simulation model.