1 Introduction

The researchers in biomechanics have improved a lot the understanding of the human lower limb, and especially the knee joint [1] and the ankle joint [2]. Indeed, these two joints have a complex architecture formed by nonsymmetric surfaces. Their motion is more complex than a revolute joint motion. In the case of the human knee, the joint is formed by different surfaces, the two nonsymmetrical femoral condyles and the tibial plateau. This architecture probably appeared in the evolution of many species of animals 320 million years ago. This common architecture of the knee has not really changed the last 300 million years despite an important diversity of the functional need [3]. The motions of the femur with respect to the tibia are limited due to many ligaments and the patella. In addition to the flexion in the sagittal plane, there is an internal rotation with a displacement of the Instantaneous Center of Rotation (ICR) of the knee joint and a posterior translation of the femur on the tibia. These motions are guided by the cruciate ligaments and the articular contacts [4] and [1]. These complex motions cannot be represented by one or two revolute joints. Different studies have confirmed these results by an observation of the motions of the human knee in the 3D space [5]. The modeling of the knee is still currently a great challenge. A novel approach for testing total knee replacements with respect to stability of the artificial knee joint is presented by Herrmann et al.; see [6]. For a method to include a multibody natural knee model within a forward dynamics simulation of a dual-limb squat, see [7]. Argotov [8] has proposed a modeling articular tibio-femoral contact through an asymptotic model of frictionless elliptical contact interaction between thin biphasic cartilage layers. Ribeiro et al. [9] have developed a computational multibody knee model to capture some of the fundamental properties of the human knee articulation.

To reproduce the displacement of the ICR of the knee joint, the four-bar linkage has been proposed by scientists in biomechanics; see, for example, [10], which was one of the first published works on this issue or [11], which studied the influence of four-bar linkage knees on prosthetic swing-phase floor clearance. This architecture forms a closed-loop mechanism, which allows a combined rotation and translation of the knee joint in the sagittal plane without any artificial ligament to keep the rigidity of the mechanism. In 1974, A. Menschik [12] proposed to represent the knee joint by a crossed four-bar linkage. This mechanism is the dual solution of the classical four-bar knee, but does not have any singularity of the input-output function that is governed by the driven input joint in the range of motion typically used. As a matter of fact, the kinematic singularities of the mechanism may limit its range of motion. The dimensions of the crossed four-bar linkage can be chosen by measuring on a real subject: (i) the length of the anterior and posterior ligaments; (ii) the position of the cross ligament attachments on the tibia and the femur, projected on the sagittal plane in the maximum extension position [13]. As a result, the motions of the mechanical knee joint in the sagittal plane should be similar to the motions of the human knee [4]. In this case, we can reproduce the motion of the knee joint with a posterior displacement of the contact point of the femur on the tibia as shown in Fig. 1.

Fig. 1
figure 1

Representation of the human knee joint composed of a four-bar linkage. Illustration of the posterior translation of the contact point between the femur and the tibia

Roboticists have come up with new and better bipedal robots recently. For instance, the HRP-2 [14] and the RABBIT [15], which are able to run, are quite efficient in terms of energy consumption. A. Grishin et al. [16] focused on the design of a bipedal robot with telescopic legs. T. Yang et al. [17] used a compliant knee based on a parallel manipulator to improve the walking motion. Some authors also dealt with the walking and running gaits using the toe rotation [1820]. Our objective is to improve the bipedal robot performance thanks to a new design of the knee joint. Several papers deal with the bipedal robots equipped with complex knees, like G. Gini et al. [21], which used knee joints based on the human knee surfaces. F. Wang et al. [22] developed a bipedal robot with two different joints, namely, a revolute joint and a four-bar linkage. However, the singularities of the input-output function of the common four-bar linkage, i.e., noncrossed four-bar linkage, usually limit the flexion of the knee. On the contrary, the flexion of the knee joint based on a crossed four-bar linkage is usually not too limited with the kinematic singularities. We also proved in [23] that a knee based on a crossed four-bar linkage is better than a knee designed with a revolute joint in terms of energy consumption.

This paper aims to study the performance of a planar bipedal robot equipped with knees based on crossed four-bar linkages for both families of cyclic walking gaits. Kinematic analysis is proposed to compare a four-bar linkage with respect to a crossed four-bar linkage. The first gait is composed of successive single support phases with stance flat-foot on the ground separated by impacts. The second gait is composed of finite time double support phases, single support phases, and impacts. During the double support phase, both feet rotate. This phase ends with a contact of one toe with the ground while the other foot is taking off. The single support phase ends with an impact of the swing foot heel, the toe of the other foot being in contact with the ground. We also present the dynamic model of a planar bipedal robot whose knees are composed of a crossed four-bar linkage. We developed a parametric optimization method to define a set of optimal reference trajectories for both cyclic gaits. We studied the energy consumption of the bipedal robot for different velocities. The main contribution of this paper is the design of a dynamical stable walking gait with double support phases, impacts, and single support phases for this bipedal robot. Note that there is a feet rotation around the front heel and the rear toe during the double support phases.

This paper is organized as follows. Section 2 presents the planar bipedal robot whose knees are based on four-bar linkages. A kinematic analysis of the proposed four-bar linkage is explained in Sect. 3. Section 4 is devoted to the dynamic models. Section 5 deals with the trajectory planning. Section 6 proposes numerical results about the evaluation of the energy consumption as a function of the bipedal robot velocity. Finally, Sect. 7 presents some conclusions and future works.

2 Presentation of the bipedal robot with knees composed of a four-bar linkage

Let us introduce the bipedal robot, which is depicted in Fig. 2. Table 1 gathers the physical data of the biped, which are taken from Hydroid, a humanoid bipedal robot [24].

Fig. 2
figure 2

Schematic of a planar bipedal robot. Absolute angular variables and torques

Table 1 Physical parameters of the bipedal robot

The dimensions of the four-bar linkage are chosen with respect to the human characteristics measured by J. Bradley et al. through radiography in [25].

Figures 2 and 3 depict the bipedal robot under study and its four-bar knee linkage. The angular variable α 1 is the actuated variable of the four-bar linkage. The orientation variable of each link of the biped and its four-bar knees is an absolute angle with respect to the (dotted drawn) global vertical axis.

Fig. 3
figure 3

Details of the four-bar joint and position of the Instantaneous Center of Rotation (ICR)

3 Kinematic analysis of the four-bar linkage

3.1 Position of the instantaneous center of rotation

It is noteworthy that Instantaneous Center of Rotation (ICR on Fig. 3) of the four-bar linkage moves with respect to the shin and the thigh. Figure 4 shows the motion of the ICR of the four-bar linkage with respect to point A.

Fig. 4
figure 4

Motion of the ICR of the four-bar linkage with respect to point A

3.2 Singularity analysis

Let us consider the closed loop four-bar linkage depicted in Fig. 5. We assume that the actuator is located in joint D, and applies a torque between links AD and CD. Variable α is the actuated joint angle.

Fig. 5
figure 5

Four-bar linkage

This section aims to compare the accessible motion of a crossed four-bar linkage and a classic four-bar linkage. In this vein, we determine the equation of motion that depends on the input angle α and the output angle θ only, according to the Freudenstein’s formalism [26]. In case the knee of the bipedal robot is composed of a four-bar linkage, the femur and the tibia are perpendicular to its lower and the upper bars. Consequently, the output angle θ is directly the flexion angle of a knee joint.

First, AB=a e 1, BC=b e 2, AD=c e 3, and DC=d e 4 where e i , i=1,2,3,4 are unit vectors such as

$$ \begin{array}{c@{\qquad}c@{\qquad}c@{\qquad}c} \mathbf{e}_{1}=\left ( \begin{array}{c} \cos\,\varphi\\ \sin\,\varphi\\ \end{array} \right ), & \mathbf{e}_{2}=\left ( \begin{array}{c} \cos\,\theta\\ \sin\,\theta\\ \end{array} \right ), & \mathbf{e}_{3}=\left ( \begin{array}{c} 1 \\ 0 \\ \end{array} \right ), & \mathbf{e}_{4}=\left ( \begin{array}{c} \cos\,\alpha\\ \sin\,\alpha\\ \end{array} \right ) \end{array} $$
(1)

From the closed loop kinematic chain A-B-C-D, we can write

$$ a \mathbf{e}_1 = -b \mathbf{e}_2 + c \mathbf{e}_3 + d \mathbf{e}_4 $$
(2)

By equating the 2-norm of both sides of Eq. (2), we obtain

$$ F(\alpha,\theta)=0 $$
(3)

with

$$ F(\alpha,\theta)=k_1+k_2\,\cos\, \alpha-k_3\,\cos\,\theta -\cos(\theta-\alpha) $$
(4)

where \(k_{1}=\frac{a^{2}+c^{2}+d^{2}-b^{2}}{2cd}\), \(k_{2}=\frac{a}{c}\) and \(k_{3}=\frac{a}{d}\). Equation (3) can be rewritten as follows:

$$ X\sin\,\alpha+Y\cos\,\alpha=Z $$
(5)

with X=−sin θ, Y=k 2−cos θ and Z=−k 1+k 3 cos θ. The function sin α and cos α are obtained from [27]:

$$ \left \{ \begin{array}{c} \sin\alpha= \dfrac{\mathit{XZ} +\epsilon Y \sqrt{X^2 + Y^2 - Z^2}}{X^2 + Y^2}\\ \\ \cos\alpha= \dfrac{\mathit{YZ} - \epsilon X \sqrt{X^2 + Y^2 - Z^2}}{X^2 + Y^2} \end{array} \right . $$
(6)

where ϵ=±1. So, we obtained α:

$$ \alpha= \mathrm{atan}\ 2 (\sin\alpha,\cos\alpha ) $$
(7)

The angular variable θ can be plotted as a function of the angular variable α. Singularities of the input-output function that is governed by the driven input joint appear when

$$ \begin{array}{c} \dfrac{\partial F}{\partial\alpha}=0 \quad \textrm{or}\quad \dfrac{\partial F}{\partial\theta}=0 \end{array} $$
(8)

with

$$ \dfrac{\partial F}{\partial\alpha}=-k_2\,\sin\, \alpha+\sin(\alpha-\theta) $$
(9)

and

$$ \dfrac{\partial F}{\partial\theta}=k_3\,\sin\, \theta-\sin(\alpha-\theta) $$
(10)

Figure 6 illustrates the output angle θ as a function of the input angle α for the four-bar linkage under study. Figure 7 illustrates the six postures of the four-bar linkage corresponding to the six points shown in the Fig. 6. We can notice that the mechanism reaches singular configurations when the output angle θ is equal to 60 and 300.

Fig. 6
figure 6

The output angle θ as a function of the input angle α for the four-bar linkage

Fig. 7
figure 7

Six postures of the four-bar linkage

In [28], the authors have introduced a transmission factor for a four-bar linkage. This factor depends on the transmission angle β in Fig. 5. We define the transmission factor for a given posture by

$$ \mu= |\sin\ \beta| $$
(11)

On Fig. 8, we present the transmission factor μ as a function of the output θ. On this figure, we can also notice the singular configuration for μ=0.

Fig. 8
figure 8

Transmission factor μ as a function of the output θ for the four-bar linkage

4 Dynamic model

4.1 General dynamic model in double support

The bipedal robot is equipped with two closed-loop knees. Let us introduce the constraint equations solving the dynamic model [29]. Equations for knee joints 1 and 2 are similar. For a sake of clarity, we consider knee joint 1 only. Let us write the vectorial equation BA+AD=BC+CD from Fig. 3. With this vectorial equality, two scalar equations of the closed-loop geometric constraints are defined as follows:

$$ \begin{array}{l} a\cos\,q_1-b\sin\,q_{g_{11}}+c\cos\, q_2+d\sin\, q_{g_{12}}=0\\ a\sin\, q_1+b\cos\, q_{g_{11}}+c\sin\, q_2-d\cos\, q_{g_{12}}=0 \end{array} $$
(12)

Their first and second time derivatives are

$$ \begin{array}{c} -a\dot{q}_1\sin\, q_1-b\dot{q}_{g_{11}}\cos\, q_{g_{11}}-c\dot{q}_2\sin \, q_2+d\dot{q}_{g_{12}}\cos\, q_{g_{12}}=0\\ a\dot{q}_1\cos\, q_1-b\dot{q}_{g_{11}}\sin\, q_{g_{11}}+c\dot{q}_2\cos \, q_2+d\dot{q}_{g_{12}}\sin\, q_{g_{12}}=0 \end{array} $$
(13)

and

$$ \begin{array}{l} -a\ddot{q}_1\sin\, q_1-b\ddot{q}_{g_{11}}\cos\, q_{g_{11}}-c\ddot {q}_2\sin\, q_2+d\ddot{q}_{g_{12}}\cos\, q_{g_{12}}\\ \quad{}-a\dot{q}_1^{2}\cos\, q_1+b\dot{q}_{g_{11}}^{2}\sin\, q_{g_{11}}-c\dot {q}_2^{2}\cos\, q_2-d\dot{q}_{g_{12}}^{2}\sin\, q_{g_{12}}=0\\ a\ddot{q}_1\cos\, q_1-b\ddot{q}_{g_{11}}\sin\, q_{g_{11}}+c\ddot {q}_2\cos\, q_2+d\ddot{q}_{g_{12}}\sin\, q_{g_{12}}\\ \quad{}-a\dot{q}_1^{2}\sin\, q_1-b\dot{q}_{g_{11}}^{2}\cos\, q_{g_{11}}-c\dot {q}_2^{2}\sin\, q_2+d\dot{q}_{g_{12}}^{2}\cos\, q_{g_{12}}=0. \end{array} $$
(14)

Through the virtual work principle [30], these constraint equations can be expressed in the dynamic model by adding term \(\mathbf {J}_{1}^{\textrm{t}}\boldsymbol{\lambda}\). Here, \(\mathbf{J_{1}}\) is the 2×13 Jacobian matrix such as Eqs. (13) and (14) can be rewritten under the compact forms

$$ \mathbf{J}_{1}\dot{\mathbf{x}}=0 $$
(15)

and

$$ \mathbf{J}_{1}\ddot{\mathbf{x}}+\dot{ \mathbf{J}}_{1}\dot{\mathbf{x}}=0 $$
(16)

and vector \(\boldsymbol{\lambda}=\mathbf{f}_{\mathbf{c}_{\mathrm{1}}}=[f_{x_{1}},f_{y_{1}}]^{\textrm{t}}\) defines the constraint force for the loop closure of the four-bar mechanism of the knee 1 (Fig. 3). We can apply the same principle for the knee joint 2 and through the Lagrange equations to obtain a dynamic model of the bipedal robot with the four-bar knees, which takes explicitly into account the contact with ground:

$$ \mathbf{A}(\mathbf{x})\ddot{\mathbf{x}}+\mathbf{h}(\mathbf{x},\dot{\mathbf{x}})= \begin{bmatrix}\mathbf{D}_{\boldsymbol{\varGamma}} & \mathbf{J}_{1}^\textrm{t} & \mathbf {J}_{2}^\textrm{t} \end{bmatrix} \begin{bmatrix}\boldsymbol{\varGamma}_{\mathbf{m}}\\ \mathbf{f_c} \end{bmatrix} +\mathbf{J}^\textrm{t}_{r_1} \mathbf{r}_{1}+\mathbf{J}^{\textrm {t}}_{r_{2}} \mathbf{r}_{2} $$
(17)

with the constraint equations:

$$\begin{aligned} &\mathbf{J}_{r_i}\ddot{\mathbf{x}}+\dot{\mathbf{J}}_{r_i}\dot{\mathbf{x}}= \mathbf{0}\quad\text{for }i=1\text{ to }2 \end{aligned}$$
(18)
$$\begin{aligned} &\begin{bmatrix}\mathbf{J}_{1} \\ \mathbf{J}_{2} \end{bmatrix} \ddot{\mathbf{x}}+ \begin{bmatrix}\dot{\mathbf{J}}_{1} \\ \dot{\mathbf{J}}_{2} \end{bmatrix} \dot{\mathbf{x}}=0. \end{aligned}$$
(19)

Here, \(\boldsymbol{\varGamma}_{\mathbf{m}}=[\varGamma_{p_{1}},\varGamma_{p_{2}},\varGamma_{1},\varGamma _{2},\varGamma_{3},\varGamma_{4}]^{\textrm{t}}\) is the vector of the applied joint torques and \(\mathbf{f}_{\mathbf{c}}=[\mathbf{f}_{\mathbf{c}_{\mathrm{1}}}^{\mathrm{t}},\mathbf {f}_{\mathbf{c}_{\mathrm{2}}}^{\mathrm{t}}]^{\mathrm{t}}\). The generalized vector x is such as

$$ \mathbf{x}=[q_{p_1},q_{p_2},q_1,q_2,q_3,q_4,q_5,q_{g_{11}},q_{g_{12}},q_{g_{21}},q_{g_{22}},x_h,y_h]^\textrm {t} $$

where x h and y h are the hip coordinates. A(x) is the 13×13 symmetric positive definite inertia matrix, \(\mathbf {h}(\mathbf{x},\dot{\mathbf{x}})\) is the 13×1 vector, which groups the centrifugal, Coriolis effects, and the gravity forces. Both matrices \(\mathbf{J}_{r_{1}}\) and \(\mathbf{J}_{r_{2}}\) are Jacobian matrices of the constraint equations in position and orientation for the two feet, respectively. Their size depends on the kind of contact between the stance foot and ground, which is described with Eq. (18). For example, let us consider foot 1. If the contact is flat foot on the ground, the orientation of foot 1 will be null and any point of its sole is a fixed point on the ground. Then the size of \(\mathbf {J}_{r_{1}}\) is (3×13). If there is a heel contact or a toe contact, it can described through a perfect joint pivot without any moment of the ground reaction. Then the size of \(\mathbf{J}_{r_{1}}\) becomes (2×13). D Γ is a 13×6 matrix composed of the 0 and ±1. Because the generalized vector is composed of absolute angle variables instead of joint variables we applied the principle of virtual work to calculate D Γ . Let us detail this calculation. The virtual work δW i (i=1,…,6) of each torque Γ mi , applied to the corresponding joint variable δθ i , is as follows:

$$\begin{aligned} \delta W_i &=\delta\theta_i \varGamma_{mi} \\ &=\mathbf{D}^\textrm{t}_{\varGamma_{m_i}} \delta\mathbf{x} \varGamma_{mi} \end{aligned}$$
(20)

Then the matrix of torques is \(\mathbf{D}_{\boldsymbol{\varGamma}}=[\mathbf{D}_{\varGamma _{m_{1}}},\ldots,\mathbf{D}_{\varGamma_{m_{i}}},\ldots,\mathbf{D}_{\varGamma_{m_{6}}}]\) with

$$ \mathbf{D}_{\varGamma_{m_i}} =\frac{\partial}{\partial\varGamma_{m_i}} \biggl( \frac{\partial\delta W}{\partial\delta\mathbf{x}} \biggr) $$
(21)

The principle of virtual work can be similarly used to obtain both matrices \(\mathbf{J}^{\textrm{t}}_{r_{1}}\) and \(\mathbf{J}^{\textrm{t}}_{r_{2}}\).

This dynamic model (17) with constraints (18)–(19) is valid in single and double support phases. During a single support phase, the ground reaction force is zero on the swing foot.

Remark

During the optimization process that we will present later, we calculate numerically, with a Newton–Raphson method, \(q_{g_{11}}\), \(q_{g_{12}}\), \(q_{g_{21}}\), and \(q_{g_{22}}\) as a function of the coordinates q 1, q 2, q 3, and q 4 through 12 for knee 1 and its equivalent for knee 2.

4.2 Reduced model in single support

The aim is to propose a dynamic model with an implicit liaison of the stance foot with the ground to calculate the torques during the optimization process, with the knowledge of the reference trajectories for the generalized coordinates. This reduced dynamic model is only valid if the stance foot does not take off, and there is no sliding during the swing phase.

Then, during the single support phase, there is a flat contact between the foot and the ground, i.e., there is no sliding motion, no take-off, and no rotation (\(q_{p_{1}}=0\)). In this case, the configuration of the biped can be described only with the articular variable. We can use a new generalized vector \(\mathbf{q} =[q_{p_{2}},q_{1},q_{2},q_{3},q_{4},q_{5},q_{g_{11}},q_{g_{12}},q_{g_{21}},q_{g_{22}}]^{\textrm{t}}\). The reduced dynamic model does not depend on the ground reaction force, which is applied in the stance flat-foot. The dynamic model in single support phase for the biped equipped with the four-bar knees is given by the simplification of the dynamic model (17) and (18)–(19):

$$ \mathbf{A(q)}\ddot{\mathbf{q}}+\mathbf{h}(\mathbf{q},\dot{\mathbf{q}})= \begin{bmatrix}\mathbf{D}_{\boldsymbol{\varGamma}} & \mathbf{J}_{1}^\textrm{t} & \mathbf {J}_2^\textrm{t} \end{bmatrix} \begin{bmatrix}\boldsymbol{\varGamma}_{\mathbf{m}} \\ \mathbf{f}_{c} \end{bmatrix} $$
(22)

with the constraint matrix equation,

$$ \begin{bmatrix}\mathbf{J}_{1} \\ \mathbf{J}_{2} \end{bmatrix} \ddot{\mathbf{q}}+ \begin{bmatrix}\dot{\mathbf{J}}_{1} \\ \dot{\mathbf{J}}_{2} \end{bmatrix} \dot{\mathbf{q}}=0 $$
(23)

Here, vector f c is such as \(\mathbf{f}_{c}=[\mathbf {f}_{c_{1}}^{\textrm{t}},\mathbf{f}_{c_{2}}^{\textrm{t}}]^{\textrm{t}}\). A(x) is the 10×10 symmetric positive definite inertia matrix, \(\mathbf{h}(\mathbf{x},\dot{\mathbf{x}})\) is the 10×1 vector, which groups the centrifugal, Coriolis effects, and the gravity forces. D Γ is a 10×6 matrix composed of the 0 and ±1 given by the principle of virtual work.

To define the constraints about the ground reaction, the no take-off of the stance flat-foot during the optimization process, we recall the calculation of position of the zero momentum point. The resultant force R of the ground reaction can be calculated by applying the second Newton law at the center of mass of the biped:

$$ m\boldsymbol{\gamma}=\mathbf{r}+m\mathbf{g}, $$
(24)

where m is the global mass of the biped, \(\boldsymbol{\gamma}=[\ddot {x}_{g},\ddot{y}_{g}]^{\textrm{t}}\) are the horizontal and vertical components of the acceleration for its center of mass in the world frame. g=[0,−g]t is the vector of the acceleration of the gravity. This equation allows directly to get r during the single support. Assuming the center of mass G f of the foot has for coordinates (s px , s py ), see Fig. 9. Let m f be the mass of the foot. The application point P of this resultant force r=[r x ,r y ,r z ]t of the ground reaction, where the moment m=[m x ,m y ,m z ]t has its components, which are null following axes x and z, m x =m z =0, is called the Zero Moment Point. One necessary and sufficient condition for the foot to keep the flat contact is that P belongs to the convex hull of the supporting area (Vukobratovic [31]). In this case, the ZMP is merged with the center of pressure. Let f O and m O be the force and the moment exerted by the mechanism above the ankle, defined by point O, of the supporting foot. Let us state the static equilibrium in rotation for the supporting foot:

$$ \mathbf{m}_{O}+\mathbf{OO}\times\mathbf{F}_{O}+ \mathbf{OG}_{f}\times m_{f}\mathbf{g}+\mathbf{OP}\times \mathbf{r}+\mathbf{m}=\mathbf{0}, $$
(25)

where OP, OG f , and OO are radius vectors from the origin of the coordinate system O. For the planar biped the coordinate of the ZMP can be obtained through the calculation of the global equilibrium of the bipedal robot around axis z, which gives

$$ l_{\mathrm{ZMP}}=\frac{\varGamma_{p_1}+s_{px}m_{f}g-H_pr_{x}}{r_{y}}, $$
(26)

where \(\varGamma_{p_{1}}\) is the applied torque on the ankle.

Fig. 9
figure 9

Details of the foot

To calculate the applied joint torques, which are used to obtain the energy consumption of each bipedal robot during the optimization process, we use the dynamic model (22).

We assume the friction effects due to the four-bar mechanism are negligible with respect to those in the gearbox of the actuators. Then only the performances of actuators are considered to compare the energy consumption for the biped equipped with both types of knee joints successively. No friction terms are included in the model.

4.3 Impact model

Usually during a biped’s gait, impacts occur, when the sole, the heel, or the toe of the swing foot swing touches the ground. For the walking optimal gaits, which will be defined later, the impact, occurring between different phases, will be included a priori in the optimization process. And the velocities just before impact and just after impact will be obtained from the known velocities of the generalized coordinates x. At the end of the optimization process, the walking gait must be cyclic and satisfy several constraints that we will also present later. Let T be the instant of an impact. We assume that the impact is absolutely inelastic and that the foot does not slip. Given these conditions, the ground reactions at the instant of an impact can be considered as impulsive forces and defined by Dirac delta-functions r j =i j δ(tT) (j=1,2). Here, i j = [i jx , i jy ]t is the magnitudes vector of the impulsive reaction in foot j (see [32]). Impact equations can be obtained through integration of the matrix motion equation (17) for the infinitesimal time from T to T +. The torques provided by the actuators in the joints, Coriolis and gravity forces have finite values. Thus, they do not influence the impact. Consequently, the impact equations can be written in the following matrix form:

$$ \begin{array}{c} \mathbf{A}\bigl(\mathbf{x}(T)\bigr)\bigl(\dot{\mathbf{x}}^+ -\dot{\mathbf{x}}^-\bigr)= \begin{bmatrix}\mathbf{J}_{1}^\textrm{t}&\quad\mathbf{J}_{2}^\textrm{t} \end{bmatrix} \mathbf{i}_{f_c}+\mathbf{J}_{r_1}^\textrm{t}\mathbf{i}_{1}+\mathbf{J}_{r_2}^\textrm {t}\mathbf{i}_{2} \end{array} $$
(27)

Here, x(T) denotes the configuration of the biped at instant t=T (this configuration does not change at the instant of the impact), \(\dot{\mathbf{x}}^{-}\) and \(\dot{\mathbf{x}}^{+}\) are respectively the velocity vectors just before and just after an inelastic impact. To take into account of the closed-loop of the four-bar knee linkage, we have to complete (27) with

$$ \begin{array}{c} \begin{bmatrix}\mathbf{J}_{1} \\ \mathbf{J}_{2} \end{bmatrix} \dot{\mathbf{x}}^{+}=\mathbf{0} \end{array} $$
(28)

The velocity of the contact part of the stance foot (j=1) before an impact is null.

$$ \mathbf{J}_{r_{1}}\dot{\mathbf{x}}^{-}=\mathbf{0} $$
(29)

The swing foot (j=2) after the impact becomes a stance foot. Therefore, the velocity of its contact part with the ground becomes zero after the impact,

$$ \mathbf{J}_{r_{2}}\dot{\mathbf{x}}^{+}=\mathbf{0} $$
(30)

Generally speaking, two results are possible after the impact, if we assume that there is no slipping of the stance feet. The stance foot lifts off the ground or both feet remain on the ground. In the first case, the vertical component of the velocity of the taking-off foot just after the impact must be directed upward. Also there is no interaction (no friction, no sticking) between the taking-off foot and the ground. The ground reaction in this taking-off leg tip must be null. In the second case, the stance foot velocity has to be zero just after the impact. The ground produces impulsive reactions (generally, i j ≠0, j=1,2) and the vertical components of the impulsive ground reactions in both feet are directed upward. For the second case, the passive impact equation (27) must be completed by one matrix equations.

$$ \mathbf{J}_{r_{1}}\dot{\mathbf{x}}^{+}=\mathbf{0} $$
(31)

In general, the result of an impact depends on two factors: the biped’s configuration at the instant of an impact and the direction of the swing foot velocity just before impact [32]. After an impact for a biped, there are two possible phases: a single support or a finite time double support. The resolution of the system composed (27), (28), (30), and eventually (31) gives the velocity vector \(\dot{\mathbf{x}}^{+}\) just after the impact, the impulsive reaction forces i 1, i 2 and the impulsive forces \(\mathbf{i}_{f_{c}} = [\mathbf{i}_{f_{c1}}^{\textrm{t}},\mathbf {i}_{f_{c2}}^{\textrm{t}}]^{\textrm{t}}\) relatively to the velocity vector \(\dot{\mathbf{x}}^{-}\) just before the impact.

To calculate the position of the ZMP at the impact with flat-foot, we have to take into account of the impulsive ground reaction in the global equilibrium of the stance foot and the result is

$$ l_{\mathrm{ZMP}}=-\frac{H_{p}~i_{jx}}{i_{jy}} $$
(32)

5 Gait optimization for the cyclic walking

5.1 Principle

The biped is driven by six torques, and its configuration is given by vector q of the generalized coordinates. To transform the optimization problem into a finite dimension problem, the joint motion is described as a parametric function. We choose, for each phase, a cubic spline function of time.

To insure continuity between two successive phases, the position and velocity of the biped at the beginning and at the end of each phase must be taken into account by the parameters of the cubic spline functions.

To design a cyclic walking gait, the behavior of the actuated joint variables are prescribed using cubic spline functions. The set of parameters are used to calculate these cubic spline functions, taking into account the properties of continuity between each step. From the final state of a step to the initial state of the following step, there is an exchange of the number of the joints, since the legs swap their roles, we have

$$ \begin{array}{c} q_{p1i}=q_{p2f},\qquad q_{1i}=q_{4f},\qquad q_{2i}=q_{3f,}\quad \textrm {and} \quad q_{5i}=q_{5f}. \end{array} $$
(33)

Values for these parameters are calculated by minimizing a criterion based on the energy consumption. Physical conditions of contact between the feet and the ground and limits on the actuators define nonlinear constraints of this optimization process.

5.2 Studied gaits

In the following, two gaits will be studied.

  • Gait 1: The cyclic motion is composed of single support phases; see Fig. 10. These single supports are separated by impulsive impacts. The supporting foot is always flat on the ground, the impacting foot is flat on the ground.

    Fig. 10
    figure 10

    Walking gait 1

  • Gait 2: The cyclic motion is composed of single support and double support phases; see Fig. 11. In the double support phase, both feet rotate. The double support is ended when one foot impacts the ground with the toe, the other foot takes off the ground. The single support takes place. At the end of the single support phase, the impacting foot touches the ground with its heel. The other foot keeps contact with the ground through its toe.

    Fig. 11
    figure 11

    Walking gait 2

5.3 Parametric functions: cubic spline

Cubic spline functions [33] are used to define the useful joint trajectories during a given phase of the walking gait,

$$ \varTheta_i(t)=\left \{ \begin{array}{l} \varphi_{i,1}(t) \quad\text{if } t_1 \leq t \leq t_2\\ \varphi_{i,2}(t) \quad\text{if } t_2 \leq t \leq t_3\\ \vdots\\ \varphi_{i,n-1}(t) \quad\text{if }t_{n-1} \leq t \leq t_n \end{array} \right . \quad i=1,2,\ldots,n_{j} $$
(34)

Here, n is the number of selected knots and n j is the number of joints. φ i,1(t),…,φ i,n−1(t) are polynomials of third-order such that

$$\varphi_{i,k}(t)=\sum_{j=0}^{3}a_{i,k}^j(t-t_k)^j ,\quad\text{for }t\in [t_k,t_{k+1}],\ k=1,\ldots,n-1 $$

where the coefficients \(a_{i,k}^{j}\) are calculated such that the trajectory, velocity, and acceleration are continuous in t 1,…,t n . The cubic spline functions are uniquely defined by specifying an initial angular position Θ i (0), an initial angular velocity \(\dot{\varTheta}_{i}(0)\) (both at t=t 1=0), a final configuration Θ i (T), and a final velocity \(\dot{\varTheta}_{i}(T)\) (both at t=t n =T), with n−2 intermediate configurations and T the duration of the phase. Consequently, the configurations will be defined by a small number of optimization parameters.

5.4 The different phases

5.4.1 The single support phase

The biped with a stance flat-foot is driven by six torques, and its configuration is given in single support phase by six generalized coordinates: \(q_{p_{2}}\), q 1, q 2, q 3, q 4, q 5, and n j =6. Let T be the duration of the single support phase. The cubic spline functions Θ i (t),  i=1,…,6 are defined for an initial value in position and velocity, an intermediate position and a final value in position and velocity, with three selected knots, n=3. The intermediate configuration for the biped is calculated at t=T/2. Thus, for each joint, we need to define five parameters of position and velocity to design the trajectories. If the gait is only composed of flat-foot single support phases and impacts, the final configuration is an instantaneous double support configuration with both flat-feet on the ground. Thus, only four independent variables are necessary to define it. We use the distance d between the front heel and the rear toe (Fig. 12), the position of the hip x h , y h , and the inclination of the torso q 5. If this phase is followed by a double support phase, the final configuration is a double support configuration with the heel of the front leg on the ground. Thus, five independent variables are necessary to define it. The angle of the front foot has to be added. The final velocity is described by six variables.

Fig. 12
figure 12

Ground reactions in double support phase and the center of mass of the biped

When functions Θ i (t), i=1,…,6 are chosen, the joint velocity and the joint acceleration can be deduced through the derivation of the polynomial function. The torques required to produce the given motion are calculated solving the inverse dynamic model (22). The reaction force are calculated through the matrix equation (24) with \(q_{p_{1}}=0\), \(\dot{q}_{p_{1}}=0\), and \(\ddot{q}_{p_{1}}=0\).

5.4.2 The double support phase

The biped with a stance flat-foot is driven by six torques. Its configuration is given in double support phase with five generalized coordinates only because the positions of the front heel and the rear toe are constant. These five independent coordinates are the orientation of feet \(q_{p_{1}}\) and \(q_{p_{2}}\), the orientation of the leg 1 q 1, q 2 and the inclination of the torso q 5. For these coordinates, cubic spline functions Θ i (t), i=1,…,n j =5 are defined with an initial value in position and velocity and a final value in position and velocity, with two selected knots, n=2. Thus, for each joint we need to define four parameters of position and velocity to design the trajectories. The final configuration of the biped is with one flat-foot on the ground. Thus, only four independent variables are necessary to define it. We use \(q_{p_{2}}\), q 1, q 2, and the inclination of the torso q 5. Only five components of the joint velocities are independent during this phase, thus the final velocity can be defined with five variables at maximum. At the end of this phase from the impact, which occurs on the front toe, six initial angular velocities can be determined for the next single phase. When functions Θ i (t), i=1,…,5 are chosen, the joint velocity and the joint acceleration can be deduced by the derivation of the polynomial function. For a given motion, the torques required could be calculated solving the inverse dynamic model (17). However, there are 14 unknown variables (six torques, four components for the internal forces in both knees and four components for both ground reactions), for 13 scalar equations only. Consequently, we have to prescribe one unknown variable like a parameter. To highlight this point, let us consider the global equilibrium in translation and rotation of the biped (35), with Fig. 12. For a given movement of the biped, it is possible to calculate the center of mass of the biped, its velocity, and acceleration. Then it is possible to calculate the global equilibrium in forces and moments in the center of mass. Assuming that both feet have only a contact point with the ground, this global equilibrium will be defined with three external forces, the gravity force and both ground reaction forces, and two moments with respect to the center of mass of the biped. These moments are produced through the ground reaction forces. The center of mass G of the biped is located with the coordinates x g and y g , r 1 and r 2 are the ground reaction acting in the front hell and the rear toe, δ g is the dynamic momentum of the biped with respect to its center of mass. We have four unknown variables, r 1x , r 2x , r 1y , and r 2y for three equations only.

$$ \left \{ \begin{array}{l} y_{g}(r_{1x}+r_{2x})+(d-x_{g})r_{2y}-x_{g}r_{1y} = \delta_{g} \\ r_{1x}+r_{2x} = m\ddot{x}_g \\ r_{1y}+r_{2y}-m g = m\ddot{y}_g \end{array} \right . $$
(35)

If the sum r 1x +r 2x is unique, there are an infinity of solutions for r 1x or r 2x , which satisfy (35). As a consequence r 2x can be defined as a second-order polynomial function in time:

$$ r_{2x}(t) = d_{0} + d_{1}t + d_{2}t^{2} $$
(36)

5.5 Number of optimization variables

Depending on the gait studied, the number of optimization variables can be deduced from the description of each phase. For the cyclic walking gait 1 depicted by cubic spline functions, the number of optimization variables is equal to 16.

$$\begin{aligned} \mathbf{P}&= \biggl[x_{h}(T),y_{h}(T),d,q_{5}(T),q_{p2}\biggl(\frac {T}{2}\biggr),q_{1}\biggl(\frac{T}{2}\biggr),q_{2}\biggl(\frac{T}{2}\biggr),q_{3}\biggl(\frac {T}{2}\biggr),q_{4}\biggl(\frac{T}{2}\biggr), \\ &q_{5}\biggl(\frac{T}{2}\biggr),\dot{q}_{p2}(T),\dot{q}_{1}(T),\dot {q}_{2}(T),\dot{q}_{3}(T),\dot{q}_{4}(T),\dot{q}_{5}(T) \biggr] \end{aligned}$$
(37)

For the cyclic walking gait 2, this number is equal to 29.

$$\begin{aligned} \mathbf{P}\, {=}\, \biggl[\!&q_{1}(T_{DS}),q_{2}(T_{DS}),q_{5}(T_{DS}),q_{p2}(T_{DS}),q_{p2}\biggl(\frac {T_{SS}}{2}\biggr),q_{1}\biggl(\frac{T_{SS}}{2}\biggr),q_{2}\biggl(\frac{T_{SS}}{2}\biggr),q_{3}\biggl(\frac {T_{SS}}{2}\biggr), \\ & q_{4}\biggl(\frac{T_{SS}}{2}\!\biggr), q_{5}\biggl(\frac{T_{SS}}{2}\!\biggr),\dot{q}_{p1}(T_{DS}),\dot {q}_{p2}(T_{DS}),\dot{q}_{1}(T_{DS}),\dot{q}_{2}(T_{DS}),\dot {q}_{5}(T_{DS}),x_{h}(T_{SS}),y_{h}(T_{SS}), \\ & q_{5}(T_{SS}),d,\dot{q}_{p2}(T_{SS}),\dot{q}_{1}(T_{SS}),\dot {q}_{2}(T_{SS}),\dot{q}_{3}(T_{SS}),\dot{q}_{4}(T_{SS}),\dot {q}_{5}(T_{SS}),d_{0}, d_{1},d_{2},T_{DS} \biggr] \end{aligned}$$
(38)

The variables T SS and T DS are the duration of the single support and the double support respectively for the cyclic walking gait 2. Only T DS is used as a parameter of the optimization problem. T SS is deduced from the walking velocity. These results are summarized and concatenated in Table 2.

Table 2 Number of optimization variables

5.6 Parametric optimization problem

By parameterizing the joint motion in terms of cubic spline functions, the optimization problem is reduced to a constrained parameter optimization problem of the form:

$$ \begin{array}{l@{\quad}l} \text{Minimize} &C_W (\mathbf{P})\\ \text{subject to} &\mathbf{g_j} (\mathbf{P})\leq0 \quad\text{for }j=1,2,\ldots l \end{array} $$
(39)

where P is the set of optimization variables. C W (P) is the criterion to minimize with l inequality constraints g j (P)≤0 to satisfy. The criterion and constraints are given in the following sections.

We used the SQP method (Sequential Quadratic Programming) [34, 35] with the fmincon function of Matlab® to solve this problem.

5.6.1 The criterion

Many criteria can be used to produce an optimal trajectory. A sthenic criterion is chosen to obtain optimal trajectories:

$$ {C}_{W}=\frac{1}{d}\int_{0}^{T}{ \sum_{i=1}^{6}{\varGamma_{m_i}^{\text {t}} \varGamma_{m_i}\ \textrm{d} t}}, $$
(40)

where T is the step duration and \(\varGamma_{m_{i}}\) is the torque applied to the joint i. During an optimization process the step length d is an optimization variable and the walking speed v is fixed, such as the step duration is directly given through the relation T=d/v.

The resulting optimal control is continuous and cancels the risks of a jerky functioning [36]. This smoothness property also guarantees a better numerical efficiency for the algorithm used for the optimization problem-solving

5.6.2 The constraints

Two types of constraints are used to obtain a realistic gait.

  • The necessary constraints, which ensure a valid walking gait.

    The first constraint ensures the supporting leg tip does not take off or slide on the ground. So, the ground reaction force is inside a friction cone, defined with the coefficient of friction f:

    $$\begin{aligned} \left\{ \begin{array}{ll} \max(-f~r_{iy}-r_{ix})\leq0\\ \max(-f~r_{iy}+r_{ix})\leq0 \end{array} \right. \end{aligned}$$
    (41)

    j=1 or 2. r x and r y are the normal and tangential component of the reaction force. Moreover, we can introduce a constraint on the ground reaction at the impact:

    $$\begin{aligned} \left\{ \begin{array}{ll} (-f~i_{1y}-i_{1x})\leq0\\ (-fi_{2y}+i_{2x})\leq0 \end{array} \right. \end{aligned}$$
    (42)

    To ensure the nonrotation of the supporting foot we introduce a constraint on the ZMP during the single support phase and at the instant of the impact:

    $$ (l_p-L_p)\leq l_{\mathrm{ZMP}} \leq l_p $$
    (43)

    Here, L p is the length of the foot and l p is the distance between the heel and the ankle along the horizontal axis; see Fig. 9.

    Just after the impact, the velocity of the taking-off foot should be directed upward. In consequence, the positivity of the vertical component of the velocities for the heel and the toes is added to the set of constraints.

    The last constraint allows to ensure the nonpenetration of the swinging foot in the ground.

  • The unnecessary constraints, which ensure a technological realistic gait.

    We introduced mechanical stops on the joint variables. Moreover, we limited the torques with a constraint, which sets a template of the maximum torque of the motor relatively to the velocity [15].

6 Results

In this part, we use the parametric optimization method, presented previously, to produce a set of optimal reference walking trajectories for the biped with four-bar knees. To estimate the effect of these knee joints, we compare with a set of optimal trajectories for the same bipedal robot equipped with revolute knee joints.

The numerical values of the parameters P obtained for a walking gait 1 at 2.2 Km/h are

$$\begin{aligned} \mathbf{P}= \bigl[& 0.1221 , 0.7938, 0.2485 ,-0.0338 , 0.0124 , 0.0165 , -0.0194, -0.0419 , \\ & {-}0.0894 , -0.0063 , 0.7358 , -2.6541 , 0.2075 , -1.6897 , 3.3207 , 0.8978 \bigr] \end{aligned}$$
(44)

The parameters P obtained for a walking gait 2 at 2.2 Km/h are

$$\begin{aligned} \mathbf{P}= \bigl[ &0.1339 , 0.2044 , -0.1649 , -0.0262 , -0.1649 , -0.1834 , -0.0071 , 0.0210, \\ &0.1863, -0.2859 , -0.1242 , -2.0181 , -2.2213 , -0.4860 ,-1.2059, 0.8486 , \\ & 0.1964 , 0.8611, -0.1824, 0.0782 ,-3.2424 , -1.3756 , -0.6881 , 0.6367 , \\ & {-}2.0984 , 0.3225 , 54.6085 ,-249.6218, 410.1424, 0.1306 \bigr] \end{aligned}$$
(45)

6.1 Simulation of walking gaits with single support and impulsive impact

For the cyclic walking gait 1, composed of single support phases and impulsive impacts, we obtain walking motions for different velocities.

Figure 13 gives the energy consumption of the bipedal robot as a function of the walking velocity for both solutions of knee joints. We can see a smaller energy consumption with the biped equipped of four-bar knees than with the biped, which uses single revolute knee joints.

Fig. 13
figure 13

Evolution of the energy consumption for the bipedal robot as a function of the walking velocity. Solid line: biped with four-bar knee linkages. Dashed line: biped with revolute knee joint

Figure 14 presents the vertical component of the ground reaction in the foot for different velocities. We can see the type of knee joint does not have many effects on the ground reaction force.

Fig. 14
figure 14

Evolution of the vertical component of the ground reaction during a walking gait for different walking velocities for both types of knee joints. Solid line: biped with four-bar knees. Dashed line: biped with revolute knees

The evolution of the ZMP for both solutions of knee joints is presented on the Fig. 15. We can see the position of the ZMP of the biped equipped with four-bar knee joints has less variations than a bipedal robot, which uses revolute knee joints.

Fig. 15
figure 15

Evolution of the position of the ZMP during a walking gait for different walking velocities for both types of knee joints. Solid line: biped with four-bar knees. Dashed line: biped with revolute knee joints. Dashed-dot line: Limit of the foot

To explain the reduction of the energy consumption let us draw the evolution of the vertical position of the hip and the evolution of the center of mass of the biped in the reference frame, Figs. 16 and 17. We can see a smaller variation of the vertical position of the hip and the vertical position of the center of mass for the biped equipped with four-bar knees. This result induces a smaller variation of the potential energy by using of four-bar knees; this may explain the reduction of the energy consumption.

Fig. 16
figure 16

Evolution of the hip joint position during a walking gait for different walking velocities. Solid line: biped with four-bar knees. Dashed line: biped with revolute knees

Fig. 17
figure 17

Evolution of the center of mass position during a walking gait with v=2.2 km/h. Solid line: biped with four-bar knees. Dashed line: biped with revolute knees

On this type of walking trajectories, we have proved that a bipedal robot equipped of four-bar knees has a better performance with respect to the energy consumption than a biped which uses revolute knees. This mechanism for the knees can reduced the energy consumption for the walking velocities lower than 2.9 km/h. This reduction can be explained by a greater space of admissible trajectories without violation of the constraints. These trajectories impracticable with the biped equipped with revolute knee joints admit a lower variation of the vertical position of the center of mass, which leads to a reduction of the variation of the potential energy.

In the next part, we generalized these results for the trajectories of type 2.

6.2 Simulation of walking gaits with double support, single support, and impact

For the cyclic walking gait 2, composed of single support phases, double support phases, and impacts, we calculate walking movements for different velocities.

Figure 18 gives the energy consumption of the bipedal robot as a function of the walking velocity. The energy consumption of bipedal robot is reduced through using the four-bar knees.

Fig. 18
figure 18

Evolution of the energy consumption of the bipedal robot as a function of the walking velocity. Solid line: biped with four-bar knees. Dashed line: biped with revolute knees

The energy consumption of the biped for the walking gait 2 is widely increased than the energy consumption for the walking gaits 1. This important difference of energy consumption can be explained by an increase of the potential energy variation between both types of walking gait. Figures 19 show the profile of the potential energy during the walking gaits 1 and 2 for the biped equipped with revolute knee joints and four-bar knee joints. We can note on this figure the duration of the step is increased for the walking trajectory of type 2 than the walking trajectory of type 1. This difference is due to an increase of the step length. Figure 19d for the biped with four-bar knees we observe that there is a discontinuity in the first derivative of the potential energy during the walking gait 2. It is due to the impact on the toe 1 at the end of the double support phase; see Fig. 11b. The discontinuities of the joint velocities lead to a discontinuity of the velocity of the center of mass. As a consequence, there is a discontinuity in the first derivative of the potential energy. We can observe a similar phenomenon for the biped with revolute joint knees. However, we can hardly see it in Fig. 19b because the impact of toe 1 is almost null. Moreover, Fig. 19d the maximum potential energy peaks for the crossed four bar knee are higher than for revolute knees. Indeed, the size of the biped is larger with the crossed four-bar knees than the revolute knees.

Fig. 19
figure 19

Evolution of the potential energy during a gait for both types of walking movement for the biped equipped with revolute knees and four-bar knees for trajectory types 1 and 2 for a step at 2.2 km/h. The dashed-dot lines give the end of the double support phase

As in the first type of trajectories, we compare the evolution of the position of the center of mass, on Fig. 20, for both solutions of knee joints. For the trajectories of type 2, we can see a reduction of the variation of the position of the center of mass of the biped by using of four-bar knees.

Fig. 20
figure 20

Evolution of the center of mass position during a walking gait for different velocities. Solid line: biped with four-bar knees. Dashed line: biped with revolute knees

Figure 21 presents the distribution, between the phases of double support and single support, of the energy consumption as a function of the walking velocity for the biped equipped of four-bar knees. The energy consumption during the double support phase takes the major part of the total energy consumption. Then the double support phase plays the role of a propulsive phase for the walking gait.

Fig. 21
figure 21

Evolutions of the energy consumption during the double support phase (Plus markers) and the energy consumption during the single support phase (Diamonds marker) of the bipedal robot in function the walking velocity

7 Conclusion

We have studied a closed-loop linkage for the knees of a planar bipedal robot for two types of walking gaits. The study of the singularities of the input-output function that is governed by the driven input joint of the closed-loop linkage shows that the four-bar mechanism is a good solution for the walking gaits of our biped. We have produced with a parametric optimization method a set of optimal reference walking trajectories for a bipedal robot. We have compared the energy consumption of a bipedal robot equipped with four-bar knees to the energy consumption of a bipedal robot equipped with revolute knees. This comparison has shown a lower energy consumption by using of four-bar knees.

The extension of this work to a 3D bipedal robots and experimental validations are part of the future work. Moreover, a measure of the evolution of the center of rotation of the human knee will be defined to determine the dimensions of the four-bar mechanism with a better accuracy.