Keywords

1 Introduction

Simulation of human gait is a complex phenomenon. It is investigated on many levels e.g.: character animations, medical diagnosis or rehabilitation. The most basic form of human locomotion is walking and this movement is analyzed in this article. Healthy gait occurs when the right and left parts of the human body perform similar movements in relation to the anatomical planes of the body. The gait can be analyzed by deriving flat dynamic models describing the movements occurring in the sagittal and frontal plane of the body [1, 4, 6].

The authors consider that simulation due to its use in blending computer animation. Modern game engines offer a number of functionalities for that operation. They hold the key animation frames of skeletal poses. There can still be unsightly transitions between those keys. These types of problems are so far visible e.g. in sim racing (animation of the driver’s hands) or in the movement of humanoid bots. It is necessary to resort to musculoskeletal modeling to solve it. The authors decided on the already existing 6DOF model because more degrees of freedom are not needed for the previously described situations. The method of placing the muscles is shown on the left side in the Fig. 1. The calculations for controlling movement are contained in the muscle module that the authors have implemented by using the Usik’s mathematical model. It is a novelty because Usik’s model has not been used before for this type solution.

Fig. 1.
figure 1

(From the left) Forces in a lower limb and forces in a joint.

Dynamic inversion has been chosen for that solution. The input data were downloaded from the available database [2]. The output data was compared with the measurement one (Rigid Body Dynamic Library [2]) by comparing the ground reaction forces (vertical and horizontal one) (Fig. 1). This method of validation was chosen to compare the authors’ results to other solutions from recent years such as Belaise et al. [5], Sartori M. et al. [8], Yamasaki et al. [7], Wojnicz W. [6], Moissenet’s et al. [2]. The authors concluded that adding muscles using the Usik’s model can improve simulation results, especially for the initial and final phase of gait. Thanks to that it gives an optimistic, potential solution to the problem of biomechanically correct blending for human movement animation.

2 Methodology

As part of this work the following were carried out:

  • implementation of the 6DoF model in C++ with Vulkan API,

  • creation a parser for the .c3d format, in which the input data was stored,

  • creation of two gastrocnemius muscles based on the author’s model,

  • set the relationship between the 6DoF model and the muscle model,

  • saving parameters on charts during a gait simulation.

2.1 Skeletal Model

The selected biomechanical model is defined by two 6DoF models: open for one-legged support and closed for two-legged support. The complete systems of the equation are contained in publication [6]. The first of them was presented in this work in Eq. 1 and 2 to indicate the occurrence of the influence of mass (as a parameter) on a given segment.

$$\begin{aligned} \begin{aligned} A_{11}\cdot \ddot{\alpha _{1}} + A_{12}(\alpha _{1},\alpha _{2}) \cdot \ddot{\alpha _{2}} + A_{13}(\alpha _{1},\alpha _{3}) \cdot \ddot{\alpha _{3}} \\ +\,A_{14}(\alpha _{1},\alpha _{4}) \cdot \ddot{\alpha _{4}} + A_{15}(\alpha _{1},\alpha _{5}) \cdot \ddot{\alpha _{5}} \\ +\,A_{16}(\alpha _{1},\alpha _{6}) \cdot \ddot{\alpha _{6}} + A_{17}(\alpha _{1},\alpha _{7}) \cdot \ddot{\alpha _{7}} \\ = M_{1} - L_{1}\cdot sin(\alpha _{1}) \cdot F_{y} + L_{1} \cdot cos(\alpha _{1}) \cdot F_{z} \\ \end{aligned} \end{aligned}$$
(1)

where:

$$\begin{aligned} \begin{aligned} M_{1} = M_{ex1} - M_{12} - cos(\alpha _{1})\cdot (S_{1} \cdot m_{1} \cdot g + L_{1} \cdot g \cdot \sum _{i=2}^{7}m_{i}) \\ +\,L_{1} \cdot sin (\alpha _{j} - \alpha {1}) \cdot (\dot{\alpha _{j}})^{2} \cdot (S_{j} \cdot m_{j} + L_{j} \cdot \sum _{k=j+1}^{7}m_{k}) \\ +\,L_{1} \cdot sin (\alpha _{6} - \alpha {1}) \cdot (\dot{\alpha _{6}})^{2} \cdot S_{6} \cdot m_{6} \\ +\,L_{1} \cdot sin (\alpha _{7} - \alpha {1}) \cdot (\dot{\alpha _{7}})^{2} \cdot S_{7} \cdot m_{7} \\ for j = 2, 3, 4, 5 \\ ... \end{aligned} \end{aligned}$$
(2)

\(A_{i}\) - i-th segment, \(L_{i}\) - length of the segment, \(S_{i}\) - segment radius, \(M_{i}\) - moment derived from the ground reaction components, \(\alpha \) - rotational displacement of the segment, \(\dot{\alpha _{i}}\) - segment angular velocity, \(\ddot{\alpha _{j}}\) - segment angular acceleration, m - mass of the segment.

2.2 Muscle Modeling

The process of the muscle modeling had a three steps: generate a muscle fiber representation using a B-spline solid, create a model with virtual muscle fibers, apply Usik’s model as a behavior model [3].

2.3 3D Fiber Representation

The muscle fiber was chosen as the basic element and was implemented virtually as the volumetric B-spline solid (Fig. 2). A detailed description of the fiber formation method using by the authors was described in publication [3].

Fig. 2.
figure 2

A tesselated B-spline solid for a fiber muscle representation [3].

2.4 Muscle Model

For this solution, the gastrocnemius muscle was selected. It was created using the finite volume method with B-spline curves and Usik’s equations. This volume was a fiber representation with two attachment points. Control point was represented by the Eq. 3:

$$\begin{aligned} V(u,v,w)= \sum _{i=0}^{l}\sum _{j=0}^{m}\sum _{k=0}^{n}B_{i}^{u}(u)B_{j}^{v}(v)B_{k}^{w}(w)C_{ijk} \end{aligned}$$
(3)

where each \(C_{ijk} \in R^{3}\).

\(C = C_{ijk}\) - the set of points form a control point lattice which will influence the shape of the B-spline solid, V - a parametric solid given by the tritensor product of these B-spline basis functions (in this case, the polynomials \(B_{i}^{u}(u)B_{j}^{v}(v)B_{k}^{w}(w)\)) with the control points in C (Fig. 3).

Fig. 3.
figure 3

A fragment of a gastrocnemius muscle with the u, v, w coordinates for any control point. Those values are the Cartesian coordinates that compose the boundary and volume of the solid

2.5 Combination of Muscle Module with Skeletal Biomechanical Module

A module with two gastrocnemius muscles was added to the biomechanical skeletal model. During gait simulation, the forces were applying on each joint. They were as the base parameter of calf control points located at the muscle joints.

The use of the molecular weight of the k-th component is important in the proposed solution. This parameter is included in one of the equations from the Usik’s model, specifically in the mass balance equation of the k-th component (Eqs. 4).

$$\begin{aligned} \begin{aligned} \rho {\delta y_{k}^1} \div {\delta t} = Q_{k}^{out} - Q_{k}^{in} \\ \rho {\delta y_{k}^2} \div {\delta t} = Q_{k}^{in} + \sum _{k=1}^{n} M_{k} V_{kj} I_{j} \end{aligned} \end{aligned}$$
(4)

where k- k-th element, \(\rho \) - mass density, y- , t- time , \(Q^{out}\)- source density in exchange with the environment , \(Q^{in}\)- source density in inter-phase exchange, M- molecular weight, v- speed , I- chemical reaction rate.

K-th components are control points in the finite volumes of muscle fibers (Fig. 2). The sum of the molecules masses \(M_{k}\) from Eqs. 4 was treated as the mass \(m_{i}\) of the each knee joint segment in Eqs. 2 and 3 [9].

2.6 Results

Below is a summary of the author’s charts with the calculated data obtained after adding the author’s muscle. Table 1 and 2 contain values of the area under the curve of a given force during one walking cycle. The cycle has been divided into 100 compartments (Fig. 4).

Fig. 4.
figure 4

The upper graph shows the ground force response values for the Z-axis and the lower graph for the X-axis. Black curve - measurement data from [6], blue curve - data from [6], red curve - data from [2], orange curve - authors’ data. Red and blue areas are the possible limit of error. (Color figure online)

Interpolation of 4 and 5 degree polynomial was used. The charts provide an illustrative course of validation parameters.

Table 1 and 2 compare the values of the fields below the chart. This method was used due to the fact that the graphs from the simulations intersected with the graph from the measurements only in 3 places, which gave ease in applying the method of counting the areas under the graph as the final validation method.

Table 1. Validation parameters
Table 2. Validation parameters

3 Conclusions

It can be seen in Table 1 and 2 that the proprietary solution increased the correctness of the final results for the values of ground reaction forces. To further improve the results (bring the values from the simulation closer to the measured values), it is worth breaking the muscles into smaller sections, which would allow for a more accurate representation of the behavior of soft tissues.

Due to the better results, the next planned step is to create plug-in based on that solution for UE5 game engine as an open-source tool which would solve the problem described in the Introduction. If it turned out to be helpful, it would be worth extending this solution with other parts of the human body.