1 Background

Currently, quadruped robots are developing towards high performance. More and more domestic and foreign research institutions are carrying out in-depth research. Most quadruped mammals in nature locomote with their legs and feet, and have the huge advantages in environmental adaptability and kinematic flexibility. The study of quadruped bionic robot is playing a key role in promoting the application of quadruped robot in the future military, space exploration, safety and explosion protection, injuries rescue etc.

In order to realize the locomotion control of quadruped robot, the research on locomotion control of quadruped robot has been carried out at home and abroad. Boston Dynamics researched the mechanism of one-legged and multi-legged dynamic stability, and an inverted pendulum model was established, and also, the stable locomotion of quadruped robot under the complex terrain was realized [1]. Based on the principle of energy, Massachusetts Institute of Technology (MIT) established a model of the impulse force for quadruped robot, and the stability of the robot during bounding was realized [2], moreover, the impedance control model of foot was studied [3, 4]. ETH Zürich studied the virtual model of quadruped robot, and virtual forces are distributed to each stance leg by the distribution optimization algorithm, the joint compliance control was realized by mapping the joints [5]. Italian Institute of Technology presented a planning method of foot trajectory for quadruped robot based on linear inverted pendulum [6], at the same time, the impedance control model of foot was studied and the active compliance control of joint is realized [7]. Shandong University in China researched the locomotion planning model of quadruped robot, and established the impedance compliance control model between the foot and terrain [8,9,10].

Because the traditional wheel and tracked ground vehicle adapt to the complex terrain passively, therefore, it is difficult to maximize the mobility performance, compared with traditional ground vehicles, stride movements could be made by selecting discrete points of contact to pass across the rough terrain and complex obstacles, and adjust the attitude of the body in real time according to changes of the environment with the higher adaptability and flexibility. Complex environments such as plat eau, mountain, jungle, desert etc. are usually accompanied with disturbance of terrain fluctuation and other types of disturbance, the quadruped robot will be disturbed by external forces in the process of crossing through obstacles. To adapt different disturbed environments, the quadruped robot needs to adapt the posture of the body according to changes of environment, and establishes the adaptive control method to achieve the stable adjustment in complex environment.

Based on the situation above, to achieve the stable adaptation of quadruped robot in complex disturbance environment, we will design another different, simple and effective method with the lower cost to achieve the adaptive control under uneven terrain by simplifying the system as the virtual leg model, designing the foot behavior and establishing the foot and joint compliance controller based on the foot position and extern force. This research plans the foot trajectory of the robot based on the analysis of virtual leg dynamics model, and establishes the balance control model and compliance model between foot and environment to map to multi-DOF joints. The experimental verification of this method is carried out by establishing typical working conditions. Finally, the work of this paper is summarized and prospected.

2 Virtual Leg Model

As shown in Fig. 1, the quadruped robot includes four stance legs, each stance leg consists of three degrees of freedom, and the lateral and swing motion of legs could be realized. The robot could be simplified as the virtual leg model.

Fig. 1.
figure 1

The quadruped robot

During the motion of the quadruped robot, the leg state is divided into swing state and stance state. According the motion characteristic of trot gait, diagonal legs could be simplified the virtual leg. The virtual leg could generate the locomotion behavior equivalent to diagonal legs, and the stance state and the swing state could be seen as the two state of the virtual leg. The phase sequence of the trot gait is as follows.

As shown in Fig. 2, LF, RF, LH, RH are the left front, right front, left hind, right hind leg respectively. The rectangle filling area represents the stance duration of the leg, and the rest of the region corresponds to the swing cycle. The trot gait sets the same swing and stance duration, and the swing duration is set as \( T \).

Fig. 2.
figure 2

Phase sequence of trot gait

According the virtual leg model, as shown in Fig. 3, the dynamics is established as follows:

Fig. 3.
figure 3

Virtual leg model

$$ m\ddot{x} = F_{t} - \frac{\tau }{l}\cos \theta $$
(1)
$$ m\ddot{z} = F_{n} + \frac{\tau }{l}\sin \theta - mg $$
(2)
$$ I\ddot{\varphi } = \tau $$
(3)

Where, x and z are the linear forward and vertical position of the body respectively. \( m \) is the mass of the body. \( F_{t} \) and \( F_{n} \) are the linear forward and vertical force of the foot respectively. l and θ are the length and the direction of the virtual leg respectively. \( \varphi \) is the pitch angle of the body. \( I \) is the moment of inertia. \( \tau \) is the actuated torque. \( g \) is the acceleration of gravity.

3 Behavior of Foot

3.1 Motion of Foot

When the inertial force is not considered, the dynamics is as follows:

$$ m\ddot{x} = F_{t} $$
(4)
$$ m\ddot{z} = F_{n} - mg $$
(5)

According the Eq. 4, the linear forward motion is planned as follows:

$$ \ddot{x} = \frac{\rm{g}}{\rm{z}}x $$
(6)

When z is the constant, Eq. 6 is calculated as follows:

$$ x(t) = x(0)\cosh (\omega t) + \frac{{\dot{x}(0)}}{\omega }\sinh (\omega t) $$
(7)
$$ \dot{x}(t) = \omega x(0)\sinh (\omega t) + \dot{x}(0)\cosh (\omega t) $$
(8)

Where, \( \omega \) is the constant related to the center of mass of the body and the acceleration of gravity. \( x(0) \) and \( \dot{x}(0) \) are the initial linear forward foot position and foot velocity of the robot respectively.

Considering the symmetry of the linear forward motion, namely, \( x(0) = - x(T_{s} ){ = }\frac{\lambda }{2} \), \( \dot{x}(0) = \dot{x}(T_{\text{s}} ) \).

Where, \( \lambda \) is the linear forward span in the stance duration. \( T_{s} \) is the stance duration.

$$ \dot{x}(0){ = } - \frac{{\omega [1 + \cosh (\omega T_{s} )]}}{{{ \sinh }(\omega T_{s} )}}x(0) $$
(9)

The method that the lateral stance position of the foot is designed is the same as in the linear forward direction.

The trajectory of the vertical foot position is designed as follows (Fig. 4):

$$ z(t) = - A\,\cos (\frac{\pi }{\lambda }x) - z_{0} $$
(10)

Where, \( z_{0} \) is the constant height of the robot. \( A \) is the vertical amplitude in the stance duration.

Fig. 4.
figure 4

Foot stance trajectory

The swing trajectory is planned according to the foothold position and swing height of the leg smoothly. The swing phase could be designed as the simple trigonometric trajectory. The trajectory is designed as follows (Fig. 5):

Fig. 5.
figure 5

Swing trajectory of foot

$$ \begin{array}{*{20}l} {x = \lambda \left[ {1 - \cos (\frac{\pi }{T}t)} \right]} \hfill & {0 \le t \le T} \hfill \\ \end{array} $$
(11)
$$ z = \left\{ {\begin{array}{*{20}c} {\frac{{H_{m} }}{2}\left[ {1 - \cos (\frac{\pi }{{T_{h} }}t)} \right]} & {0 \le t \le T_{h} } \\ {\frac{{H_{m} }}{2}\left[ {1 + \cos (\pi \frac{{t - T_{h} }}{{T - T_{h} }})} \right]} & {T_{h} < t \le T} \\ \end{array} } \right. $$
(12)

3.2 Balance Control

Combining the control target of the controller with its own characteristics, spring-damp virtual components are established in the vertical direction of the robot (see Fig. 6). The changes in the posture of the body could be compensated by the planned foot trajectory with the corresponding stance legs.

Fig. 6.
figure 6

Spring-damp virtual components

$$ \Delta {\mathbf{p}} = {\mathbf{k}}_{pb} ({\varvec{\uppsi}}_{d} - {\varvec{\uppsi}}) $$
(13)

Where, \( {\mathbf{k}}_{pb} \) is the dynamics matrix between the body posture and the foot position. \( {\varvec{\uppsi}}_{d} \) and \( {\varvec{\uppsi}} \) are the desired and actual body posture vector respectively. \( \Delta {\mathbf{p}} \) is the foot position offset vector.

According to Eq. 5, considering the height and the weight of the body in the stance duration, the external force of the body could be established as follows:

$$ F_{n} = mg + k_{p} (z_{d} - z) - k_{d} \dot{z} $$
(14)

Where, \( k_{p} \) and \( k_{d} \) are the stiffness and the damping coefficients of body height controller respectively. \( z_{d} \) and \( z \) are the desired and actual body height of the robot respectively. \( \dot{z} \) is the actual body vertical velocity of the robot.

According to the vertical direction force with several stance legs, there exists a relation as follows:

$$ \sum\limits_{i = 1}^{\text{N}} {F_{n}^{i} } = F_{n} $$
(15)

Where, \( F_{n}^{i} \) is the foot-terrain force of the i th stance leg. N is the number of stance legs. \( F_{n} \) could be distributed according to the symmetry of the trot gait.

According to the planned foot stance trajectory and the designed external force of the body, a compliance controller between the foot and the terrain is established as follows:

$$ {\mathbf{F}}_{c}^{i} = k_{fp} ({\mathbf{p}}_{d}^{i} - {\mathbf{p}}^{i} ) - k_{fd} {\dot{\mathbf{p}}}^{i} + \left[ {\begin{array}{*{20}c} 0 & 0 & {F_{n}^{i} } \\ \end{array} } \right]^{T} $$
(16)

Where, \( k_{fp} \) and \( k_{fd} \) are the stiffness and the damping coefficients of compliance controller respectively. \( {\mathbf{p}}_{d}^{i} \) and \( {\mathbf{p}}^{i} \) are the desired and actual foot position vector of the robot respectively. \( {\dot{\mathbf{p}}}^{i} \) is the actual foot velocity vector of the robot. \( {\mathbf{F}}_{c}^{i} \) is the foot-terrain compliance force vector.

The force vector \( {\mathbf{F}}_{c}^{i} \) is mapped to joints by the Jacobian matrix \( {\mathbf{J}} \) of multi-DOF joints in the leg to achieve joint compliance control, namely, \( {\mathbf{T}}_{a}^{i} = {\mathbf{J}}^{{\mathbf{T}}} {\mathbf{F}}_{c}^{i} \), where, \( {\mathbf{T}}_{a}^{i} \) is the torque vector of joints for the i th stance leg. The Jacobian matrix \( {\mathbf{J}} \) represents the relationship between the foot linear velocity vector and joints velocity vector, namely, \( {\dot{\mathbf{p}}}^{i} = {\mathbf{J}\dot{\mathbf{q}}}^{i} \), where, \( {\dot{\mathbf{q}}}^{i} \) is the angular velocity vector of joints for the i th stance leg. Based on the leg kinematics, the Jacobian matrix \( {\mathbf{J}} \) could be calculated as follows:

$$ {\mathbf{J}} = \left[ {\begin{array}{*{20}c} 0 & { - (a_{2} c_{2} + a_{3} c_{23} )} & { - a_{3} c_{23} } \\ {c_{1} (a_{1} + a_{2} c_{2} + a_{3} c_{23} )} & { - s_{1} (a_{2} s_{2} + a_{3} s_{23} )} & { - a_{3} s_{1} s_{23} } \\ {s_{1} (a_{1} + a_{2} c_{2} + a_{3} c_{23} )} & {c_{1} (a_{2} s_{2} + a_{3} s_{23} )} & {a_{3} c_{1} c_{23} } \\ \end{array} } \right] $$
(17)

Where, \( s_{j} = \sin (q_{j} ) \), \( c_{j} = \cos (q_{j} ) \), \( s_{jk} = \sin (q_{j} + q_{k} ) \), \( c_{jk} = \cos (q_{j} + q_{k} ) \), \( q_{j} \) is the angle for the j th joint, \( a_{j} \) is the link length for the j th joint of the leg.

$$ {\mathbf{u}}_{j} (t) = {\mathbf{k}}_{{{\mathbf{qt}}}} ({\mathbf{q}}_{d} - {\mathbf{q}}) - {\mathbf{k}}_{{{\mathbf{vt}}}} {\dot{\mathbf{q}}} + {\mathbf{T}}_{a}^{i} $$
(18)

Where, \( {\mathbf{k}}_{{{\mathbf{qt}}}} \) and \( {\mathbf{k}}_{{{\mathbf{vt}}}} \) are the stiffness and the damping coefficients of joint controller respectively. \( {\mathbf{q}}_{d} \) and \( {\mathbf{q}} \) are the desired and actual joint position vector of the robot respectively. \( {\dot{\mathbf{q}}} \) is the actual joint angular velocity. \( {\mathbf{u}}_{j} (t) \) is the joint controller input.

3.3 Measurement of Robot

The actual posture angular of the robot could be measured by the IMU (Inertia Measurement Unit) mounted on the robot respectively. The actual foot position could be measured by the leg kinematics (see Fig. 7).

Fig. 7.
figure 7

Leg kinematics

The actual forward linear velocity of the robot could be estimated by the forward step length during the support period approximately.

$$ \dot{x} = \frac{\lambda }{{T_{s} }} $$
(19)

4 Simulation Experiment

A quadruped robot and interactive environment is established using real-time interactive multi-body dynamic engine Vortex developed by CM-Labs in Canada. The correctness and effectiveness of this method are validated by setting up obstacles and slope in the simulation environment with the trot gait. The heights of obstacles are set to 5 cm, 8 cm and 12 cm respectively, and the slope is set to 20°, and the interval between obstacles is set to 1 m.

The quadruped robot is about 135 kg in weight, and it is 1 m in length and 0.4 m in width, the height is 0.72 m when stopping and 0.8 m when walking. The robot parameters are set based on the real-world application of the quadruped robot. In the initial stage, the robot is in a flat condition far away from the obstacle. The maximum velocity is set to 0.4 m/s. The robot passes through obstacles and the slope with the trot gait, as shown in Fig. 8.

Fig. 8.
figure 8

Test environment of quadruped robot

Figure 9 shows the linear forward position of the foot for the robot, and the blue solid line represents the desired position, and the red dotted line represents the actual position. The trajectory includes the swing and the stance phase. The swing and stance phase realize the smooth changes. The corresponding difference between the maximum and minimum of the curve is the forward stance span \( \lambda \) of the foot.

Fig. 9.
figure 9

The vertical foot motion (Color figure online)

Figure 10 shows the vertical position of the foot for the robot, the blue solid line represents the desired position, and the red dotted line represents the actual position. The trajectory includes the swing and the stance phase. The robot uses trajectory planning method of foot in the process of motion. By changing the value of Th to adjust the time of the foot step height, the ability crossing obstacles could be improved to a certain extent (see Fig. 10b). The swing height of the leg is set to 0.16 m. The difference between the maximum and the value at the end of the swing phase is close to the swing height. In the whole process, the robot always tracks the desired position generated by the controller during the movement, and meets the requirements of the control accuracy.

Fig. 10.
figure 10

The vertical foot motion (Color figure online)

Figure 11 represents the vertical force between the foot and the terrain, the blue solid line represents the desired force, and the red dotted line represents the actual force.

Fig. 11.
figure 11

The vertical force of foot (Color figure online)

The compliant contact between the foot and the terrain is realized by using the compliance controller in this research. The change of the force meets the requirement of the height compliance of the robot. The actual force between the foot and the terrain is estimated by the dynamic model, which is used to test the effectiveness of the impedance force compliance controller.

The posture of the robot is as shown in Fig. 12, the red solid line represents the pitch angle, the green dotted line represents the yaw angle, and the blue dash-dotted line represents the roll angle.

Fig. 12.
figure 12

The body posture (Color figure online)

The attitude of the terrain is measured real-time. As shown in Fig. 12, before the obstacles and slope passing though, the body roll angle and pitch angle are near zero in most of the time, when crossing obstacles, the attitude changes. When climbing 20° slope, the pitch angle is estimated real-time and is close to the attitude angle of the terrain, and the body posture is stable in the process of motion.

5 Conclusion and Prospect

The multi-DOF mechanism of quadruped robot was simplified as the body-virtual leg system, and the body virtual leg dynamics model was established, on this basis, this paper finished the trajectory planning of foot-terrain contact, also, the compliance control model of the foot contact with the ground was established according to the external force exerted on the robot. By the mapping relationship between the foot and the joint space, the force was mapped to joint space to achieve the adaptive control of the robot under the complex dynamic environment.

This paper mainly carried on the analysis of the adaptive control under the rigid terrain, however, when the quadruped robot moved in mud, sand etc. terrains, the robot will occur the slippage and sinkage, therefore, the research will consider the terramechanics relationship between the foot and the soft terrain in the future work, and design the foot structure with the high performance to improve the mobility under the soft terrain.