1 Introduction

Digital human models are useful for predicting and investigating the behavior of humans under different conditions, such as backward walking [1], walking on slopes [2], walking on slippery surfaces [3], walking with a backpack [4], and prosthesis development [5]. Joint angles, obtained by simulating different circumstances, describe the reference behavior during walking to investigate the variations in walking, improve walking assistive systems, and diagnose walking abnormalities, among others.

Different techniques have been used to understand human gait. The inverted pendulum model is one of the simplest and earliest models. The single-support phase of walking was simulated; however, the motion of each joint in the lower extremities was ignored [6]. Multibody models that divide the human body into rigid links connected by joints were used to calculate the kinematics and kinetics of human locomotion. Forward dynamic analyses of multibody models help generate motion by given forces at muscles or moments around joints [7]. Muscle-driven models are more complex because many active muscles are involved in gait [8]. Inverse dynamic analyses of multibody models calculate joint moments by the given joint motion and ground reaction forces [9]. Although forward and inverse dynamic analyses provide a good understanding of walking, inputted data of joint angles or moments are required. Recently, predictive dynamics using an optimization problem to simultaneously determine joint angles and moments have appeared. Predictive dynamic analysis of human movement has been used to determine walking behavior under different conditions, such as straight [10], loaded, and inclined walking [10, 11]. Therefore, predictive dynamic analyses were performed to determine the reference motion in this study.

The design variables of the optimization problem in predictive dynamics define the parameters required to solve the equation of system dynamics, and one practice in the literature is the generation of joint angles using design variables. In previous studies, B-splines [1] and polynomial functions [12] have been used to generate joint angles; however, joint-angle generation methods may produce unrealistic joint angle patterns, and harmony among the body limbs may be lost. Additional constraints that limit the range of joint angles and moments are considered to overcome this drawback [1]. Moreover, the number of design variables increased due to the generation of each joint motion separately. This study proposed an experiment-based joint angle generation method to produce more realistic joint angle patterns, eliminate additional constraints, and reduce the number of design variables.

We aimed to determine the modes of joint angles, reduce the number of parameters to describe joint angles, and determine energy-optimal and moment-optimal walking patterns. The joint angles were obtained for an extensive walking database, and a joint angle matrix was created. The modes of the joint angles were determined by applying singular value decomposition (SVD) to the joint angle matrix. Subsequently, the SVD-based joint angle generation method was proposed to reduce the number of design variables and create a set of actual joint angle modes for different optimization purposes. A two-dimensional (2D) multibody dynamic model of human walking was developed. Walking patterns under the conditions of minimized energy and minimum moment squares were obtained using the modes obtained by SVD.

2 Methods

2.1 Experiments and joint angle generation

The AIST gait database [13], which contains motion capture and ground reaction force data, was used in this study. VICON MX motion capture systems with cameras and force plates (AMTI, Watertown, MA, USA) were used at sampling frequencies of 200 and 1000 Hz, respectively. After that, a Butterworth filter was used for the marker and ground reaction force data at cutoff frequencies of 6 and 10 Hz, respectively. The participants of the experiments were able to walk freely without any assistance. The local ethical committee approved the experimental study, and written informed consent was obtained from the participants. Data from 225 subjects were used because no missing data existed, and subjects were older than 18 years old. The subjects walked at their preferred walking speed, and 10 trials for each subject were obtained.

The human body was divided into nine rigid bodies, which are as follows: the head, trunk, pelvis, two thighs, two shanks, and two feet in 2D space. The length of each rigid link was calculated, and the human body was reconstructed to eliminate kinematic consistencies due to marker misplacements, soft tissue movement, measurement errors, etc. The rigid bodies were connected by revolute joints. The experimental joint angles were calculated based on the rigid-body orientations of the human body, as presented in Fig. 1. Then, the joint angles were resampled at 120 data points because each gait dataset had different durations and data points. The joint angle vector, \(\mathbf{q}\), was created as a combination of the ankle, knee, hip, pelvis-trunk, and neck joint angles in Eq. (1). Subsequently, the joint angle matrix \(\mathbf{Q}\) was defined as a collection of joint angle vectors from \(\mathbf{q}_{\textbf{1}}\) to \(\mathbf{q}_{\mathbf{n}}\) as given in Eq. (2). \(n\) is the total number of gait cycles obtained by experiments. The singular value decomposition of the matrix \(\mathbf{Q}\) produces two orthonormal matrices, \(\mathbf{U}\) and \(\mathbf{V}\), and one diagonal matrix S, as given in Eq. (3).

$$\begin{aligned} & \mathbf{q} = [\mathbf{Ankle}^{\text{T}}_{120 \times 1} \mathbf{Knee}^{\text{T}}_{120 \times 1} \mathbf{PelvisTrunk}^{\text{T}}_{120 \times 1}\mathbf{Neck}^{\text{T}}_{120 \times 1}]^{\text{T}} \end{aligned}$$
(1)
$$\begin{aligned} & \mathbf{Q} = \left[ \textstyle\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c} \mathbf{q}_{\mathbf{1}} & \mathbf{q}_{\mathbf{2}} & \cdots & \mathbf{q}_{\mathbf{n} - \mathbf{1}} & \mathbf{q}_{\mathbf{n}}] \end{array}\displaystyle \right] \end{aligned}$$
(2)
$$\begin{aligned} & \mathbf{Q} = \mathbf{U} \times \mathbf{S} \times \mathbf{V}^{\mathbf{T}} \end{aligned}$$
(3)

The column-wise characteristics of matrix \(\mathbf{Q}\) were stored in matrix \(\mathbf{U}\). Each column of matrix \(\mathbf{U}\) shows the modes of the joint angles. The diagonal entries of the matrix \(\mathbf{S}\) are singular values that indicate the contribution of each joint mode. The contribution of the \(i\)th mode was the ratio of the square of the \(i\)th singular value to the sum of squares of the singular values. The multiplication of \(\mathbf{S} \times \mathbf{V}^{\mathbf{T}}\) contains the coefficients of each mode for each walking trial. The joint angle vector can be rewritten as a summation of the multiplication of the \(i\)th joint mode, \(\mathbf{u}_{\mathbf{i}}\), and the corresponding coefficient, \(c_{i}\), by considering the first \(m\) modes as given in Eq. (4).

$$ \mathbf{q}_{\mathbf{generated}} = \sum _{i = 1}^{m} \mathbf{u}_{\mathbf{i}} \times c_{i} $$
(4)

The mean value, \(\mu _{i}\), and standard deviation, \(\sigma _{i}\), of the coefficient, \(c_{i}\), of the ith joint angle mode were calculated. An alternative formulation to generate joint angles vector was given in Eq. (5) in terms of \(\mu _{i}\) and \(\sigma _{i}\). The design variable, \(x_{i}\), determined the deviation from the mean coefficient, \(\mu _{i}\), and the joint angle vector was generated. The overview of the joint angle generation method is shown in Fig. 2.

$$ \mathbf{q}_{\mathbf{generated}} = \sum _{i = 1}^{m} \mathbf{u}_{\mathbf{i}} \times (\mu _{i} + x_{i} \times \sigma _{i}) $$
(5)
Fig. 1
figure 1

The definition of rigid body orientations in y-z plane. Black lines and red circles are rigid links and revolute joints. Arrows define the direction of orientation of each rigid member. (Color figure online)

Fig. 2
figure 2

The overview of the joint angle generation method

2.2 Computational model of human walking

A two-dimensional multibody dynamic model of human walking was considered in this study for optimization purposes. The model has nine rigid bodies (head, trunk, pelvis, 2 thighs, 2 shanks, and 2 feet) and eight revolute joints (head-trunk, trunk-pelvis, 2 hip, 2 knee, and 2 ankle joints). The model had 11 degrees-of-freedom to define the intersegmental movement by 8 degrees-of-freedom and the global position by 3 degrees-of-freedom. The inertial properties of each link were estimated using anthropometric data [14]. The contact between the foot and ground was defined by an impact contact model as given in Eq. (6) where \(F_{N}\) is normal contact force, \(k\) is contact stiffness, \(e\) is stiffness exponent, \(c_{\mathit{max}}\) is damping at specified penetration depth, and \(x\) is the amount of penetration. \(c_{\mathit{max}}\) was assumed to increase until specified penetration and becomes constant for further penetration. Tangential force is obtained using the Coulomb friction model with static and dynamic friction coefficients. The parameters of the contact model were assumed as given in Table 1. Then, the computational model of human walking was created, and the multibody dynamics problem was solved using Altair MotionView/MotionSolve software.

$$ F_{N}=k \cdot x^{e}+ c_{\mathit{max}} \cdot \dot{x} $$
(6)

The inputs of the predictive dynamics model, in other words, design variables, were the coefficients of the joint angle modes, the initial rotation of the trunk, and the duration of the gait cycle. The coefficients were used to define the joint angles during one gait cycle using Eq. (5). The upper and lower bound of the design variables, \(x_{i}\), that define joint angles were determined as ±5 standard deviations. Since joint angles were defined in terms of the percent gait cycle, the duration of the gait cycle, \(T\), was used to define joint angles depending on the time between 0.5 and 1.5 seconds. The initial position and rotation of each body with respect to each other were obtained by using initial data points of joint angles. Then, the initial rotation of the trunk with respect to the global axis system was used to determine the rotation of each body in the global axis system. The initial orientation of the trunk was defined within the limits of \(\pi /2 \pm 0.5\) radian.

Table 1 Contact parameters of foot-ground contact model

The behavior of the joint angles was assumed to be periodic. Additionally, the movement of the legs was assumed to have a perfect symmetry, so that the joint angles of the right and left legs had a 50% gait cycle phase difference between each other. The joint angle data for all joints were created for five consecutive gait cycles. Then, inverse dynamic analyses of human walking with the ground contact model were performed, and joint moments were obtained. Fig. 3 shows the workflow of the computational model.

Fig. 3
figure 3

The workflow of the computational human walking model

2.3 Objective functions and constraints

Optimization problems were defined to determine the design variables by minimizing the objective functions under constraints. Objective functions related to joint moments and joint powers were chosen, which were obtained by multibody dynamic analyses of walking five consecutive gait cycles. The first objective function, \(f_{1}\), considers the normalized total positive joint power at all joints, as expressed in Eq. (7). The power of the \(i\)th joint, \(P_{i(t)}\), was calculated by the multiplication of angular velocity and joint moment. Then, the integral of the positive power during five consecutive gait cycles was divided into the duration of five gait cycles, \(T_{f} = 5\times T\). The total number of joints was denoted by \(n_{\mathit{joints}}\).

$$ f_{1} = \sum _{i = 1}^{n_{\mathit{joints}}} \left ( \frac{\int _{0}^{T_{f}} \max (0,P_{i(t)})\mathrm{dt}}{T_{f}} \right ) $$
(7)

The joint moment is another important index for walking strategies because people choose to avoid excessive loads. The second objective function, \(f_{2}\), was defined as the summation of the integral of normalized moment squares of all joints, as presented in Eq. (8). The joint moment of the \(i\)th joint was denoted by \(\tau \)i(t).

$$ f_{2} = \sum _{i = 1}^{n_{\mathit{joints}}} \left ( \frac{\int _{0}^{T_{f}} (\tau _{i(t)})^{2}\mathrm{dt}}{T_{f}} \right ) $$
(8)

The multibody dynamics equation is an equality constraint for the optimization problem. Therefore, the joint angles and moments were obtained based on the physics of the human walking model. Moreover, a couple of constraints should be considered to prevent the model from falling, \(h_{1}\) and \(h_{2}\), and to obtain the gait behavior at the desired walking speed, \(h_{3}\), for both optimization problems. The rotation of the head, \(\theta \)Head(t), and vertical displacement of the head, \(z\)Head(t), with respect to the global axis system were limited to ±10° and ±10 cm, respectively, as given in Eqs. (9) and (10). In addition, a ±10 cm difference between the horizontal displacement of the head, \(y\)Head(t), and the trajectory obtained at the desired walking speed, \(v\)target, was allowed, as presented in Eq. (11).

$$\begin{aligned} h_{1} &= \int _{0}^{T_{f}} \max \left ( \left | \theta _{\mathit{Head}(t)} \right | - 10, 0 \right )\ \mathrm{dt} = 0 \end{aligned}$$
(9)
$$\begin{aligned} h_{2} &= \int _{0}^{T_{f}} \max \left ( \left | z_{\mathit{Head}(t)} \right | - 0.1, 0 \right )\ \mathrm{dt} = 0 \end{aligned}$$
(10)
$$\begin{aligned} h_{3} &= \int _{0}^{T_{f}} \max \left ( \left | y_{\mathit{Head}(t)} - v_{target} \times t \right | - 0.1, 0 \right )\ \mathrm{dt} = 0 \end{aligned}$$
(11)

3 Results

The mean values and standard deviations of the joint modes are presented in Fig. 4. According to Fig. 4, the coefficients of all joint angle modes, except the first, have a mean value away from zero, and the standard deviation of the coefficients is the highest in the second mode. The first ten modes exhibit almost 99.9% of the gait characteristics of all participants.

Fig. 4
figure 4

The contribution of joint modes. Mean values and standard deviations of the coefficients of modes(a) and cumulative effect of joint modes (b). (Color figure online)

The effects of the first five modes on the joint angles were determined by changing the corresponding coefficients of the modes, as presented in Fig. 5. The first mode affects the range of ankle and hip joint motion, maximum flexion of the knee joint during the loading and swing phases, and initial orientation of the ankle, hip, pelvis-trunk, and neck joints. The contribution of the second mode is the adjustment of the range of ankle joint motion, minimum knee joint angle, and posture of the thighs, pelvis, trunk, and head. Although the ankle and knee joint motion was not significantly affected by the third mode, the relative orientations of the thigh, pelvis, trunk, and head were altered. The fourth mode was related to the stance characteristics of the ankle, knee, and hip joints. The fifth mode changes the slope of the ankle joint curve during the second rocker phase and the maximum and minimum ankle, knee, and hip joint angles.

Fig. 5
figure 5

The effect of each joint mode on ankle, knee, hip, pelvis-trunk, and neck joints for a complete gait cycle. (Color figure online)

Thereafter, two different optimization problems were considered to generate straight walking for a person with a height and weight of 170 cm and 70 kg, respectively. The optimal joint angles and corresponding joint moment, joint power, and gait cycle duration were obtained at walking speeds of 0.9, 1.1, 1.3, and 1.5 m/s, as given in Figs. 6 and 7 for the energy-optimal and squared moment-optimal walking cases. The initial joint angles, peak dorsiflexion and plantarflexion angles of the ankle joint, peak knee flexion motion during the loading and swing phases, peak extension and flexion of the hip joint, and range of pelvis-trunk joint motion were the most evident kinematic features affected by walking speed in both optimization cases. In both cases, the joint moments and joint powers showed similar adaptations related to walking speed. The duration of the gait cycle decreased with walking speed.

Fig. 6
figure 6

Ankle, knee, hip, and pelvis-trunk joint angles (a), joint moments (b), and joint powers (c) of the energy optimal results were given together with the duration of single gait cycle (d) at walking speeds of 0.9, 1.1, 1.3, and 1.5 m/s. (Color figure online)

Fig. 7
figure 7

Ankle, knee, hip, and pelvis-trunk joint angles (a), joint moments (b), and joint powers (c) of the moment square optimal results were given together with the duration of single gait cycle (d) at walking speeds of 0.9, 1.1, 1.3, and 1.5 m/s. (Color figure online)

Then, the objective functions were evaluated for the experimental data and given together with the simulated optimal values in Fig. 8. Since the participants of experiments have different masses, the joint moments were normalized by dividing them by the subjects’ weight, and objective function values for 1st and 2nd case were calculated. Energy-optimal walking had a lower objective function value than the experimental data at all walking speeds. However, the moment-square optimal walking was not lower than the experimental data and became closer to the minimum values at higher speeds.

Fig. 8
figure 8

The values of the objective functions of energy (a) and moment square (b) for experimental and optimal cases. Blue circles are objective function values calculated by using the experimental data, and red crosses are the optimal values of the objective function for a model with a height of 1.70 m and a weight of 70 kg. (Color figure online)

4 Discussion

This study proposed an SVD-based joint angle generation method that describes more human-like motion with fewer design variables. The walking database, which contains several people of different ages, sexes, heights, weights, and walking speeds, enabled the modeling of joint angles by considering natural variations in gait. In a 2D walking model, nine design variables were assigned to create all joint angles and were able to express 99.84% of the gait data. Design variables that generate joint angles were defined by considering the mean and standard deviation of the corresponding coefficient of the joint modes. This is because the standard deviation decreases in higher modes. The optimization problem can become more sensitive to higher modes and produce unrealistic joint angles.

The proposed SVD-based joint angle generation method expressed the variations during walking using fewer design variables. B-splines were used in previous studies to generate each joint angle separately, and seven design variables were used to generate the motion of a single joint [1]. Another study used fourth-order polynomials to express joint angle variations in time. The coefficients of polynomials were adjusted to express joint angles [12]. In the present study, all joint angles were generated using the SVD-based joint angle generation method, and only ten design variables were used.

Moreover, SVD-based joint angle generation considers the variations of all motion. A change in one of the parameters used in the SVD-based joint angle generation method affected all joint angles during walking based on experimental variations. However, previous methods mostly focused on the generation of each joint angle separately, and a change in one parameter of the joint angle generation method does not affect other joint motions. Therefore, there is a higher possibility of having unrealistic motion types, and several constraint equations were used. The biological limits of joint motion were considered by defining the lower and upper bounds [1]. In another study in robotics, the foot position during the start and finish of contact, maximum foot clearance on the swing, and height of the hip joint position were used to determine the motion [15]. The SVD-based joint angle generation method is advantageous for preserving the harmony between joints and reducing the possibility of having unrealistic motion types and the number of constraint equations.

Falling is an additional drawback that requires prevention. Excessive head rotation in the sagittal plane and vertical displacement of the head were considered indicators of falling. The rotation and vertical displacement of the head of a healthy person are approximately 2° and 10-35 mm, respectively, in the sagittal plane [16]. Therefore, by increasing the limits to understanding falling, the head’s allowable rotation and vertical displacements were determined to be ±10° and ±10 cm.

The effects of walking speed on joint angles, moments, and power were obtained for the optimal energy and moment square cases. According to Figs. 6 and 7, both joint moments and powers contain some noise. The main reason for the noise is the numerical differentiation of given joint angle data to obtain velocity and acceleration. Another reason for having noise is due to the contact model.

Although the optimal results were similar, there were some differences between the two optimal cases. The knee joint behavior during the swing phase showed differences between the two optimal cases. While walking speed increases the maximum knee flexion angle in the energy-optimal case, the maximum knee flexion angle reduces in the moment-square optimal case. Another difference was observed at the hip joint: The initial joint angles are different, but an increase in the range of motion is common in both optimal cases. The energy-optimal joint angles exhibited similar behavior to previous studies [17, 18]. Regarding joint moments, the ankle and knee joint moments behave differently than in previous studies [18] at a walking speed of 0.9 m/s for both optimal cases. The ground contact model may not represent the behavior at a slower walking speed, and a difference in the ankle joint moment occurs. Because the ankle joint moment has less moment during 20%-45% of the gait cycle, the knee joint has a higher moment than expected at the same interval. The joint powers also agree with previous studies [18]. Besides, the energy optimal results have a shorter gait cycle duration than the moment square optimal case.

The energy optimal results formed a lower bound on the distribution of the objective function values of the experimental data. However, the moment square optimal results could not achieve this goal. This may be due to oscillations in the joint moment data. The oscillation of the simulated moment data increased the cost function. Moreover, optimal cases were found for a model with a height and weight of 170 cm and 70 kg, respectively. The mass of each rigid body was estimated using anthropometric tables. Therefore, a minimum-bound solution for the population may not be possible.

This study had some limitations. The multibody model used in the study was investigated in the 2D sagittal plane only. The movement of the arms was neglected because walking is a lower limb-dominated behavior. Moreover, the joint modes used in this study were suitable only for walking. The scope of the study can be extended by including data on running, jumping, speeding up, and slowing down, among others. In addition, the objective functions are not perfect representations of the human walking strategy; furthermore, even every person may have a different walking strategy. Future studies may extend the scope of SVD-based gait optimization to running, inclined walking, the development of walking assistive devices, and so on.

5 Conclusion

In this study, we proposed an SVD-based gait optimization strategy. SVD reduces the dimensionality of the joint angles and creates a set of vectors called joint modes, which describe joint angles and their variations. The coefficients of each joint mode were considered as design variables. Subsequently, the ground reaction forces, joint moments, and joint powers were obtained using dynamic analyses. Objective functions were used to minimize the joint energy and joint moment square. The optimal walking patterns at different walking speeds were compared to experimental data and existing literature. The SVD-based gait optimization strategy is useful for future optimization studies that express gait variations with fewer design variables.