1 Introduction

Humanoid and legged robots are increasingly demanded to operate in hazardous environments and assist the disabled and elderly. Controlling these highly articulated robots to dynamically interact with their surrounded environment becomes an imperative research topic [1,2,3,4]. For legged robots, contact behaviors are inherent due to their impact dynamics. However, achieving highly stable walking performance under impact dynamics is still one of the main challenges in the dynamic locomotion field.

To mitigate the contact impact, variable stiffness controllers have gained extensive attentions within the robotics and mechatronics community [5,6,7,8,9]. Design of variable stiffness actuators (VSA) has been widely explored in the field [10,11,12,13,14,15,16,17,18,19,20]. The VSA can be classified into two categories: active stiffness actuator and inherently compliant actuator [10]. The former one has the merit of fast response, but its bandwidth is usually limited and the energy cannot be restored [13]. As to the inherently compliant actuator, a classical one is the series elastic actuator (SEA) [21,22,23,24,25], which has low friction and larger force control bandwidth [17]. This kind of VSA has already been extensively studied on quadruped robot HyQ [26], biped robot Sarcos [16], and exoskeleton [27, 28]. Thanks to the merit of SEA’s stable force control [23, 29,30,31,32], impedance control [24, 33], and energy storage, it is especially suitable for variable stiffness control of robots [18].

Numerous efforts have been given to the areas of human motion [34,35,36,37] and control theory [5,6,7,8,9] to achieve variable stiffness control of biped robots. A significant walking template, i.e., spring-loaded inverted pendulum (SLIP), imitating human leg’s spring-like movement [38, 39], simplifies the highly complex muscle-actuated leg into a compressible massless linear spring [40, 41]. The SLIP model is applicable to variable stiffness control of virtual spring legs [6, 7, 9]. Ketelaar et al. designed a bipedal walking controller for variable stiffness actuators and applied the variable stiffness knee control based on variable spring-loaded inverted pendulum (V-SLIP) model. However, their walking gait cannot be sustained for a long duration [6]. Visser verified the robustness improvement of bipedal walking through a simulated variable stiffness actuator with an ideal environment [7]. Both Geyer and Rummel have exhaustively searched the parameter space with simulation and identified a stiffness range with self-stability [8, 9]. Rummel tested this method on a motor-actuated biped robot PogoWalker within the stiffness range via robust stability [9]. However, to the best of our knowledge, implementation details of this variable stiffness control have not been formally presented.

Fig. 1
figure 1

a Structure and size of the planar biped robot, b side view of single robot leg

To target high-performance variable stiffness control for the hydraulic biped robot, this study designs a novel variable series elasticity unit (VSEU) and applies this VSEU for torque control of a biped robot with compliant legs. The main contribution of this paper lies in proposing two online variable stiffness control algorithms for stable walking: (1) torque balance algorithm (TBA) and (2) surface fitting algorithm (SFA). These two algorithms employ different fitting approaches to compute closed-form solutions of four critical control parameters: knee angle, desired stiffness, SEA compression, and hydraulic actuator displacement, respectively. Virtual control is adopted in this study for controlling our biped robot [42,43,44]. The desired configuration of VSEU is computed to control the stiffness of the virtual leg at runtime. The effectiveness of these two algorithms during stance phases is successfully demonstrated in hardware experiments. In particular, impact at touchdown is substantially mitigated using the proposed algorithms. Pros and cons of these two algorithms are compared and analyzed in details. Accordingly, the experiment results indicate that both of the proposed algorithms achieve satisfactory tracking performance within limited stiffness scope. Nevertheless, TBA outperforms in terms of a larger stiffness control scope. We believe the fitting algorithms proposed in this study have great potentials to be leveraged to various modern humanoid and legged robots with highly nonlinear series elastic actuation.

The structure of this paper is organized as follows: Sect. 2 describes the design of biped robot platform and VSEU; Sect. 3 elaborates the methodology of online variable stiffness control scheme; Sect. 4 describes the walking experiment on the real robot platform; Sect. 5 gives the conclusion and evaluation of the algorithms adopted.

2 Experiment platform design

To test the proposed variable stiffness control algorithms, a planar hydraulic biped robot prototype for the experiment was designed. In Sects. 2.1 and 2.2, we introduced the design of the biped robot followed by the variable series elasticity unit (VSEU).

2.1 Planar biped robot design

The designed planar walking robot consists of two segmented legs, two thighs and two calfs (Fig. 1a). One portion of upper legs (AF in Fig. 1b) is above hip joints, where hydraulic actuators are mounted to drive knee joints. This design minimizes the rotational inertia of leg around the hip, which also minimizes the dynamics of the swing leg and makes the robot be consistent with the SLIP model. The upper and lower legs are made of titanium tubes which have low density but high strength.

Table 1 Comparison of joint range between human and robot
Fig. 2
figure 2

Variable series elasticity unit a 3D model and b real variable series elasticity unit. In b, spring A has a larger stiffness than spring B

The degrees of freedom of each leg are along the pitch axis so that the biped walking robot is restricted to the sagittal plane. In Fig. 1b, G is the knee joint, BD is the hydraulic actuator driving the hip joint F. EH is the series elasticity unit. The triangle part DFE, which rotates independently around the hip joint, connects actuators BD and EH. The motion ranges of hip and knee mimic human as shown in Table 1, and coordinates for the joint angle are notated in Fig. 1b. The potentiometer is mounted on EH to detect the spring compression and encoder is mounted on knee joint to detect joint angle.

2.2 Variable series elasticity unit design (VSEU)

Adopting torque control enables us to achieve compliant ground contact. To achieve this, we design variable series elastic unit (VSEU) composed of component A and B. On every actuated joint, “port a” is rigidly connected with the piston rod of the hydraulic actuator while “port b” is connected with the load as shown in Fig. 1. The interface between component A and B are two compressible linear springs. The novelty of VSEU lies in that the two springs on VSEU of knee joint have different stiffness. The springs have pre-compression in assembly VSEU and are not bounded or welded with the other mechanical parts. Assembly 1 is rigidly connected with assembly 2 as shown in Fig. 2a. The spring, which is compressed during the knee bending, has a relatively lower stiffness (see Spring B in Fig. 2b), while the other spring has a relatively larger stiffness (see Spring A in Fig. 2b). This design benefits not only the position control during swing phase but also torque control during stance phase. Hence it is especially suitable for legged robots because compliance is essentially important when the leg interacts with unknown height ground. On the other hand, swing leg requires accurate position control, and thus relatively stiff joints are necessary. Hence the elasticity unit is designed with adjustable asymmetric stiffness.

Table 2 Design parameters of variable series elasticity unit

This study focuses on force control of the knee joint. Linear force control is achieved through Eq. (1). The calculated output force is sent back to PD controller for the closed-loop control. Table 2 presents the parameters of VSEU for the knee joint.

$$\begin{aligned} {F}_{\mathrm{sea}} = k\cdot (x_{l0} {-}x_l) \end{aligned}$$
(1)

where \(x_{l0} \) is the original length of VSEU and \(x_l \) is the length after spring compression. The stiffness k is for spring B in Fig. 2b.

3 Online variable stiffness control

In this section, we will first analyze a virtual stiffness model for the leg. Based on this model, two variable stiffness control algorithms are introduced, i.e., torque balance algorithm and surface fitting algorithm, respectively.

3.1 Analysis of virtual leg stiffness

To apply online variable stiffness control algorithm on the compliant leg introduced in the previous section, we adopt a SLIP model for the robot. The virtual spring leg is placed between the hip and the point feet (see Fig. 3a). In the experiment, a 60-kg payload is mounted on the hip as shown in Fig. 8 of Sect. 4. The whole body’s weight is around 70 kg including the payload. The mass of each calf is 210 g. Hence the whole robot body’s weight is mainly concentrated on the hip, and it is reasonable to assume a massless leg. Also, we assume that the center of mass (CoM) is on the hip joint.

Fig. 3
figure 3

a SLIP model-based robot prototype, b knee joint’s kinematic structure

The angle of knee joint is defined as \(\alpha _\mathrm{knee}\), which is determined by hydraulic actuator’s displacement and series elastic unit’s spring compressed length. The length of virtual spring leg FI is determined by the angle \(\alpha _\mathrm{knee}\) (see Fig. 3). The output force of VSEU \((F_\mathrm{sea})\) is computed by the spring compression. Supposing that virtual legs’ original length FI is \(l_{0}\), when compressed by virtual force \(F_\mathrm{virtual}\) on virtual leg the length of FI becomes l, then the stiffness of the virtual leg is defined as

$$\begin{aligned} {K}_{\mathrm{virtual}} =\frac{{F}_{\mathrm{virtual}} }{{l}_{0} {-l}} \end{aligned}$$
(2)

We assume there is no angular momentum around the hip, then the virtual force is along the virtual leg and pointed from F to I. \(F_\mathrm{virtual}\) equals to the ground reaction force \(F_\mathrm{ground}\) but has an opposite direction. Hence the torque produced by the output force from VSEU \((F_\mathrm{sea})\) on G point \((T_\mathrm{sea})\) and the torque produced by ground reaction force \((F_\mathrm{ground})\) on G point \((T_\mathrm{Des})\) is equal but in an opposite direction. The relationship is expressed as

$$\begin{aligned} \left\{ {{\begin{array}{l} {{T}_{\mathrm{sea}} ={F}_{\mathrm{sea}} \cdot l_\mathrm{HG} \cdot \sin \beta } \\ {{T}_{\mathrm{des}} ={F}_{\mathrm{virtual}} \cdot l_\mathrm{GI} \cdot \sin \varepsilon } \\ {{T}_{\mathrm{sea}} ={T}_{\mathrm{des}} } \\ \end{array} }} \right. \end{aligned}$$
(3)

Each line corresponds to a constant knee. In the following part of this section, two variable stiffness control algorithms for the virtual leg are proposed and provide displacement of the hydraulic actuator at given virtual stiffness and spring compression. One is dubbed as torque balance algorithm, while the other is surface fitting algorithm.

3.2 Torque balance algorithm

The core idea of torque balance algorithm (TBA) is to establish an explicit mapping relationship between actuator’s displacement, desired virtual leg stiffness, and knee angle. The series elastic actuator (SEA) force exerted on point G is \(T_\mathrm{sea} {=F}_{\mathrm{sea}} \cdot {HG}\cdot {\sin (}\beta {)}\), where \({T}_{\mathrm{sea}} \) is the function of \(\alpha _\mathrm{knee} \) and \(x_d \), i.e., \({T}_{\mathrm{sea}} ={f}_{\mathrm{sea}} \left( {x_d ,\alpha _\mathrm{knee} } \right) \). More details are elaborated in “Appendix 1.” The torque produced by the virtual spring is derived by the knee angle and the virtual leg’s stiffness. According to Eqs. (2) and (3), we have \(T_{{\mathrm{Des}}} ={K}_{\mathrm{virtual}} \cdot \left( {{l}_{0} {-l}} \right) \cdot GI \cdot {\sin \varepsilon }.\) Considering \({\varepsilon =\alpha }_{\mathrm{knee}} /2\) and \({l}=GI \cdot {\sin {\varvec{\varepsilon }} }\), one has \(T_\mathrm{Des} =T_\mathrm{Des} \left( {{K}_{\mathrm{virtual}}, {\alpha }_{\mathrm{knee}} } \right) \). The two torques \({T}_{\mathrm{sea}}\) and \({T}_{\mathrm{Des}}\) are equal to each other. Hence, we obtain the relationship between the displacement of the hydraulic actuator and virtual leg’s stiffness.

According to the above analysis, the TBA can be derived in three steps: First, according to Eq. (3), Fig. 4 depicts a set of curves illustrating the relationship between the knee torque \({T}_{\mathrm{sea}} \) and the hydraulic actuator displacement \(x_d \) at given knee angle \(\alpha _\mathrm{knee} \).

Fig. 4
figure 4

Curve cluster of hydraulic actuator displacement and knee joint torque. Each line corresponds to a constant knee angle starting from \(10^{^{\circ }}\) to \(60^{^{\circ }}\) in \(5^{^{\circ }}\) step

This set of curves in Fig. 4 is fitted using Eq. (4),

$$\begin{aligned} T_\mathrm{sea} \left( {{x}_{d} {, \alpha }_{\mathrm{knee}} } \right) =\frac{{\alpha }^{\mathrm{T}}{P}^{{A}}{x}_{d} +{\alpha }^{\mathrm{T}}{P}^{{B}}}{{x}_{d}+ {\alpha }^{\mathrm{T}}{P}^{{C}}} \end{aligned}$$
(4)

where \({\alpha =[\alpha }_{\mathrm{knee}}^{2} {, \alpha }_{\mathrm{knee}} {,1]}^\mathrm{T}\), \(P^{A}{=[P}_{2}^{A} {,P}_{1}^{A} {,P}_{0}^{A} {]}^\mathrm{T}\), \(P^{B}{=[P}_{2}^{B} {, P}_{1}^{B} {,P}_{0}^{B} {]}^\mathrm{T}\), \(P^{C}{=[P}_{2}^{C} {, P}_{1}^{C} {,P}_{0}^{C} {]}^\mathrm{T}\). To easily get the fitting parameters when we chose different analytical function, we use MATLAB fitting functions for analyzing the algorithms in the Sect. 3.

The second step is to find an approximate explicit relationship between the joint torque \(T_\mathrm{Des}\) induced by the virtual leg and knee angle \({\alpha }_{\mathrm{knee}} \). At given stiffness \({K}_{\mathrm{virtual}} \), the curve \(T_\mathrm{Des} \sim {\alpha }_{\mathrm{knee}} \) is depicted in Fig. 5.

Fig. 5
figure 5

Curve cluster of knee joint angle and desired knee joint torque

Fig. 6
figure 6

Control scheme of variable stiffness control based on torque balance algorithm

This set of curves in Fig.5 is fitted in Eq. (5),

$$\begin{aligned}&{T}_{\mathrm{Des}} {(\alpha }_{\mathrm{knee}} {,K}_{\mathrm{virtual}} {)=}\mathop {\sum }\nolimits _{{i=0}}^{3} {P}_{i}^{D} \left( {{K}_{\mathrm{virtual}} } \right) \cdot \alpha _{\mathrm{knee}}^{i}\nonumber \\&\quad =\alpha ^{\mathrm{T}}{P}^{{D}}{(K}_{\mathrm{virtual}} {)} \end{aligned}$$
(5)

where \({P}^{{D}}{(K}_{\mathrm{virtual}} )\) is fitted by \({P}^{{D}}{(K}_{\mathrm{virtual}} {)}={K}_{\mathrm{virtual}} {P}_{a}^{D} +{P}_{b}^{D} \), \({P}_{a}^{D} =\left( {{P}_{{a1}}^{D} ,{P}_{{a2}}^{D} ,{P}_{{a3}}^{D} ,{P}_{{a4}}^{D} } \right) ^\mathrm{T}\) and \({P}_{b}^{D} =( {P}_{{b1}}^{D} ,{P}_{{b2}}^{D} ,{P}_{{b3}}^{D} ,{P}_{{b4}}^{D} )^\mathrm{T}\) are constant coefficient vectors.

In the last step, we derive the relationship between \(x_{d}\) and \(K_\mathrm{virtual}\) by equaling \(T_\mathrm{sea}\) to \(T_\mathrm{Des}\) and obtain

$$\begin{aligned} x_d^*= & {} \left( {\alpha ^\mathrm{T}P^{A}-\alpha ^\mathrm{T}P^{D}\left( {K_\mathrm{virtual} } \right) } \right) ^{-1}\nonumber \\&\quad \cdot {(\alpha }^{\mathrm{T}}{P}^{{B}}-{\alpha }^{\mathrm{T}}{P}^{{C}}{\alpha }^{\mathrm{T}}{P}^{{D}}\left( {{K}_{\mathrm{virtual}} } \right) {)} \end{aligned}$$
(6)

which is the variable stiffness controller of TBA. The control scheme is shown in Fig. 6. Desired virtual leg stiffness \(K_\mathrm{virtual}\) and knee angle \({\alpha }_{\mathrm{knee}} \) are the inputs of the stiffness controller, and they solve the desired hydraulic actuator displacement \(x_d^*\). This desired displacement is sent back to the PD controller of the hydraulic servo control. The PD controller controls hydraulic actuator’s position.

3.3 Surface fitting algorithm

From Eqs. (2) and (3), the virtual leg stiffness \(K_\mathrm{virtual}\) can be written as the function of \(x_d\) and \(x_l\),

$$\begin{aligned} {K}_{\mathrm{virtual}} {(x}_{d} {, x}_{l} {)=}\frac{{F}_{\mathrm{sea}} {(x}_{l} {)\cdot HG\cdot \sin (\beta (x}_{d} {, x}_{l} {))}}{GI\cdot {\sin (\varepsilon (x}_{d} {, x}_{l} {))\cdot (l}_{0} {-l(x}_{d} {, x}_{l} {))}} \end{aligned}$$
(7)

Details of \({ \beta (x}_{d} {, x}_{l} {)}\), \({\varepsilon (}x_l , x_d {)}\) and \({l (}x_l, x_d {)}\) are derived in “Appendix 2.” Figure 7 demonstrates the relationship between \(x_d \) and \(x_l \) for a variety of \(K_\mathrm{virtual}\) values when the virtual spring leg’s equivalence point is at knee joint angle of \(10^{^{\circ }}\) and \(30^{^{\circ }}\), respectively.

Fig. 7
figure 7

Contour lines of \(x_{d}\), \(x_{l,}\) and \(K_\mathrm{virtual}\) when virtual spring leg’s equivalent point is set at knee joint angle of \(10^{^{\circ }}\) (a) and \(30^{^{\circ }}\) (b). Within the reachable space of \(x_{d}\) and \(x_{l}\), when the virtual spring leg is balanced at knee joint angle of \(10^{^{\circ }}\), the maximum value of stiffness of virtual leg \(K_\mathrm{virtual}\) is 65 kN/mm. And when the virtual leg is balanced at knee joint angle of \(30^{^{\circ }}\), the maximum value of stiffness \(K_\mathrm{virtual}\) is 7.8 kN/m, which is a significant reduction compared with \(10^{^{\circ }}\)

SLIP model-based stable walking requires an equivalent leg stiffness to be 5–20 kN/m [40]. The knee angle of human is roughly \(10^{^{\circ }}\sim 68^{^{\circ }}\) during walking and \(10^{^{\circ }}\)\(30^{^{\circ }}\) during stance phase. Hence \(10^{^{\circ }}\) is chosen as the equivalent angle for the virtual leg in this study.

The set \({\Omega }=\{({K}_\mathrm{virtual} {, x}_{l} , x_d ){\vert }{K}_{\mathrm{virtual}} {(x}_{d} {, x}_{l} {)=F}_{\mathrm{sea}} {(x}_{l} {).HG.\sin (\beta (x}_{d} {, x}_{l} {))/}GI.{\sin (\varepsilon (x}_{d} {, x}_{l} {)).(l}_{0} {-l(x}_{d} {, x}_{l} {))}\)} is stored as discrete points and then we replot the 3D surface of \(x_{d }=x_{d }(K_\mathrm{virtual}\), \(x_{l})\) in Fig. 8 with \(x_{d}\) as the z axis. The basic idea of the surface fitting algorithm is to directly fit the 3D surface \(x_{d }=x_{d }(K_\mathrm{virtual}, x_{l})\). Utilizing the interpolation fitting method, we derive the relationship equation as below,

$$\begin{aligned} {x_d}\left( {{K}_\mathrm{virtual} {, x}_{l} } \right) ={{\varvec{x}}}_{{\varvec{l}}}^{{\varvec{T}}} {{\varvec{PK}}} \end{aligned}$$
(8)

where \({{\varvec{x}}}_l =\left( {1, x_l , x_l^2 , x_l^3 } \right) ^\mathrm{T}\), \({{\varvec{K}}}=( 1,{K}_\mathrm{virtual} ,{K}_\mathrm{virtual}^{2} ,{K}_\mathrm{virtual}^{3} )^\mathrm{T}\), \({{\varvec{P}}}=\left( {P_{ij} } \right) _{\mathbf{4}\times \mathbf{4}} \).

Fig. 8
figure 8

Colorful smooth surface is plotted by Eq. (7) and the dotted surface is plotted by Eq. (8)

It can be observed from Fig. 8 that for \(K_\mathrm{virtual} \in \left[ {{0, 15\,\mathrm{kN/m}}} \right] \), the fitting result matches well with the actual surface. However, for \(K_\mathrm{virtual}\in [{15,60\,\mathrm{kN/m}],}\) the fitting result shows remarkable deviation. It can be inferred that this algorithm is more applicable when the virtual stiffness is not large. When the virtual stiffness is larger than 15 kN/m, Eq. (8) cannot approximate the actual relationship of \(x_{d }=x_{d }(K_\mathrm{virtual}, x_{l})\) anymore. In Sect. 4, this will be further demonstrated in experiments.

The virtual leg’s variable stiffness control scheme using surface fitting algorithm is shown in Fig. 9. The VSEU’s displacement sensor detects spring’s compression \(x_{l}\) and then solves the compression force \((F_\mathrm{sea})\cdot x_{d}\) is the sensed position of hydraulic cylinder and \(x_d^*\) is the desired position for the hydraulic cylinder.

Fig. 9
figure 9

Control scheme of variable stiffness control based on surface fitting algorithm

Fig. 10
figure 10

a Real biped robot prototype and b the experiment platform

Desired virtual leg’s equivalent stiffness \(K_\mathrm{virtual}\) and compression value \(x_{l}\) are the inputs of the stiffness controller, which outputs the desired hydraulic actuator displacement \(x_d^*\), and further sends \(x_d^*\) to the PD controller for the hydraulic servo.

4 Experimental results

This section presents the experiment of variable stiffness control on our biped robot whose achievable stiffness of virtual leg ranges from 5 to 20 kN/m. The experiment shows that online variable stiffness control algorithms proposed in Sect. 3 can be implemented on the real robot by real-time control.

The biped robot prototype and experimental setup are shown in Fig. 10. The robot walks on a treadmill. A beam is connected between the red pillar and the robot as shown in Fig. 10b. The beam can rotate around the x and y axis, and restricts the robot’s lateral movement. The beam and the hip joint are coaxial along the z axis as shown in Fig. 10b. However, the robot can rotate independently around the z axis and maintain the freedom of two prismatic DoFs in the sagittal plane and one revolt DoF on hip. Actually, the robot walks along an arc centered at red pillar. Since the beam is 6 m long, for forward or backward walking distance of 0.5 m, the lateral position deviation is about 10 mm, which can be ignorable. Therefore, the planar robot walks approximately in the straight line. There is a load cell on each point foot to detect the ground reaction force.

4.1 Accuracy comparison of variable stiffness control

In this experiment, the variable stiffness controllers proposed in Sect. 3 were tested to achieve the virtual spring leg. The biped robot stood on the ground with its pitch angle fixed (z-axis in Fig. 10b). The desired stiffness of virtual leg was set to change from 5 to 20 kN/m with an initial value 20 kN/m. At the initial phase, the desired stiffness reduces to 5 kN/m, and then increased back to 20 kN/m. We computed the virtual leg stiffness according to Eq. (2). \(F_\mathrm{virtual}\) is approximately estimated based on the force sensors on the point feet, and the length of virtual spring leg \(l (x_{l}, x_{d})\) is computed according to “Appendix 2.” The torque balance algorithm (TBA), and surface fitting algorithm (SFA) were tested, respectively, and the results are presented in Fig. 11, in each plot of which the desired and experimental stiffness of virtual leg are compared.

Figure 11a, b shows TBA and the measured value of stiffness is smaller than the computed one. This may be caused by the bearing friction which reduces the effective spring force and the approximation errors of TBA itself. The errors of SFA, as shown in Fig. 11c, d, are mainly due to fitting equation’s goodness of fitting decreases as stiffness value increases, especially at the high stiffness range.

To compare the stiffness control performance based on TBA and SFA, stiffness deviations are compared in Fig. 12. The two curves from TBA and SFA both have small stiffness deviations between 5 and 13 kN/m and the deviations are tolerable. When the desired stiffness exceeds 15 kN/m, the errors from TBA become large but smaller than SFA. In comparison, TBA shows more accurate tracking performance than SFA especially within the stiffness range of 14–20 kN/m. Through comparison of these two control algorithms, the average accuracy of stiffness control based on TBA is better, while the SFA only performs good when the stiffness is lower than 15 kN/m.

Fig. 11
figure 11

Variable stiffness control based on the torque balance algorithm on the left (a) and right leg (b), variable stiffness control based the surface fitting algorithm on the left leg (c) and right leg (d)

Fig. 12
figure 12

Comparison of the torque balance algorithm and surface fitting algorithm

4.2 Walking impact evaluation experiment

This section shows the experiment of implementing variable stiffness control in a walking task. During the walking, the swing leg followed the planned trajectory through position control while during the stance phase the supporting leg adopted variable stiffness control. During early stance phase, when the leg landed, the desired stiffness was initially set to be 10 kN/m to achieve compliant performance to mitigate the foot-ground impact, and during the landing period the stiffness increased from 10 to 20 kN/m as shown in Fig. 13. It is demonstrated in Fig. 13 that the stiffness tracking performance is satisfactory.

The ground reaction force (GRF) measured through force sensors is plotted in Fig. 14. It can be seen that the GRF without stiffness control has a larger and sharper fluctuation during the landing phase, which is detrimental to the whole-body balance of the biped robot. On the contrary, the GRF with stiffness control is smoother. This result demonstrates that the proposed variable stiffness control helps absorb ground impact and thus is beneficial for improving walking stability.

Fig. 13
figure 13

Stiffness tracking during biped walking. The solid line is the experiment curve and the dotted one is the desired curve

Fig. 14
figure 14

Measured ground reaction force with (solid line) and without variable stiffness control (dotted line)

5 Conclusion and discussion

This study presented the design of a planar biped robot platform based on spring-loaded inverted pendulum (SLIP) model and the variable stiffness control of a virtual spring leg based on the novel variable series elastic unit (VSEU). To realize online variable stiffness control of virtual spring leg, we proposed two variable stiffness control methods: torque control algorithm (TBA) and surface fitting algorithm (SFA). Through comparing TBA and SFA in the experiment, it was found that TBA is able to follow the desired stiffness more precisely within the range from 5 to 20 kN/m, while SFA is only acceptable below 10 kN/m. The walking experiment also demonstrated that variable stiffness control achieved better impact absorbing performance. This is verified through comparing the ground reaction force (GRF) with and without variable stiffness control. The experimental result also implied that the proposed control algorithms benefit the biped stable walking. Limitations of this study lie in that both of the proposed variable stiffness control algorithms are effective within a limited stiffness scope and the VSEU occupies most of the weight and space of leg, which is not compact enough. However, the TBA and SFA provide valuable solutions for the nonlinear control, a common problem in the series elastics actuator (SEA) legged robot community. The basic idea of the fitting method can also be viewed as a specialized version of a neural network which is a useful technique for training an implicit and complicated mapping relationship. Future research directions will include (1) upgrading the design of VSEU to make it more compact, (2) improving the variable stiffness control through exploring more accurate mapping technique, (3) evaluating the effect of feedback latencies on the impedance performance and testing the high-impedance performance of distributed control architecture.