Terrain Adaptive Control for Quadruped Robots in Uneven Environments

In recent years, the development of quadruped robots, often referred to as robot dogs, has gained significant attention due to their potential in navigating unstructured terrains such as disaster sites, exploration zones, and industrial settings. However, maintaining stability on uneven ground remains a critical challenge. Traditional rigid-body quadruped robots frequently experience issues like leg dragging, body oscillations, and inadequate adaptation to terrain variations. To address these limitations, this article presents a comprehensive terrain adaptive control strategy for a quadruped robot with articulated body joints, leveraging multi-sensor information and a bio-inspired central pattern generator (CPG) network. By integrating real-time terrain perception with adaptive motion planning, this approach enhances the stability and robustness of the robot dog in dynamic environments.

The core of this work revolves around a quadruped robot model that mimics biological structures, featuring body (spinal) joints, hip abduction-adduction joints, hip flexion-extension joints, and knee joints. With 13 degrees of freedom, this design offers enhanced flexibility, allowing the robot to adjust its posture and foot trajectories dynamically. The robot dog’s kinematics are modeled using the Denavit-Hartenberg (D-H) parameters, enabling precise control of foot positions and body orientation. Key to this strategy is the use of multiple sensors, including inertial measurement units (IMUs) and foot pressure sensors, to classify terrain types—such as flat, convex, or concave surfaces—and trigger adaptive responses. The multilayer CPG control network coordinates limb movements and body joint adjustments, ensuring synchronized motion that adapts to terrain undulations. Through simulations and experiments, this method demonstrates reduced body angle fluctuations and improved stability margins, validating its effectiveness for real-world applications.

To establish a foundation for control, the kinematics of the quadruped robot are derived using coordinate systems and D-H parameters. The world reference frame is fixed to the ground, with the X-axis aligned forward, Z-axis upward against gravity, and Y-axis determined by the right-hand rule. The robot’s body frame is centered at its geometric middle, and leg joint frames are defined for each of the four legs—left front (LF), right front (RF), left hind (LH), and right hind (RH). Each leg comprises three revolute joints: abduction-adduction hip, flexion-extension hip, and knee. The D-H parameters for the RF leg, for instance, are summarized in Table 1, where $a_{i-1}$, $\alpha_{i-1}$, $d_i$, and $\theta_i$ represent link length, twist angle, offset, and joint angle, respectively.

Table 1: D-H Parameters for the Right Front Leg of the Quadruped Robot
i $a_{i-1}$ $\alpha_{i-1}$ $d_i$ $\theta_i$
1 0 0 0 $\theta_1$
2 $l_2$ 90° $l_1$ $\theta_2$
3 $l_3$ 0 0 $\theta_3$
4 $l_4$ 0 0 0

Using forward kinematics, the foot position $P$ of the RF leg in its base frame is expressed as:

$$P = \begin{bmatrix} P_x \\ P_y \\ P_z \end{bmatrix} = \begin{bmatrix} l_4 c_1 c_{23} + l_3 c_1 c_2 + l_2 c_1 + l_1 s_1 \\ l_4 s_1 c_{23} + l_3 s_1 c_2 + l_2 s_1 – l_1 c_1 \\ l_4 s_{23} + l_3 s_2 \end{bmatrix}$$

where $s_i = \sin \theta_i$, $c_i = \cos \theta_i$, $s_{ij} = \sin(\theta_i + \theta_j)$, and $c_{ij} = \cos(\theta_i + \theta_j)$ for $i, j = 1, 2, 3$. Inverse kinematics solutions yield joint angles from foot positions; for example, $\theta_1 = \tan^{-1}(P_x / P_y)$, with similar expressions for $\theta_2$ and $\theta_3$ involving intermediate variables. The body joint, denoted by $\theta_B$, connects the front and rear body segments, and its transformation to leg base frames is given by the homogeneous transformation matrix:

$$T = \begin{bmatrix} -c_{\theta_B} & 0 & s_{\theta_B} & \mu l_5 s_{\theta_B} \\ -s_{\theta_B} & 0 & -c_{\theta_B} & -\mu l_5 c_{\theta_B} \\ 0 & -1 & 0 & \phi l_6 \\ 0 & 0 & 0 & 1 \end{bmatrix}$$

where $\mu$ and $\phi$ are scaling factors accounting for leg-specific offsets. The body joint’s rotation influences the robot’s center of mass height $\Delta h_{\text{com}}$, calculated as:

$$\Delta h_{\text{com}} = \Delta h_1 + \Delta h_2 = (1 – \cos(\theta_s / 2)) h_F + \sin(\theta_s / 2) \cdot \frac{l}{2}$$

where $\theta_s$ is the body joint angle, $h_F$ is the height from foot to hip, and $l$ is the body segment length. This kinematic framework enables the quadruped robot to adjust its workspace dynamically, as shown in simulations where body joint angles of -10°, 0°, and 10° alter the reachable foot positions, enhancing adaptability.

Terrain perception and classification are critical for the robot dog to navigate uneven ground effectively. The strategy employs foot pressure sensors and IMU data to detect ground contact events and compute foot positions via forward kinematics. A flowchart guides the classification process: if a foot touches ground during the planned swing phase, the terrain is convex; if no contact occurs during the support phase, it is concave; otherwise, it is flat. The terrain inclination angles—pitch $\alpha_{\text{pitch}_d}$ and roll $\alpha_{\text{roll}_d}$—are derived from foot positions when all four legs are grounded or in diagonal support. For example, with four legs supporting, the pitch angle is:

$$\alpha_{\text{pitch}_d} = \arctan\left( \frac{Z_f – Z_h}{X_f – X_h} \right)$$

where $Z_f = (z_1 + z_2)/2$, $Z_h = (z_3 + z_4)/2$, $X_f = (x_1 + x_2)/2$, and $X_h = (x_3 + x_4)/2$. Similar calculations apply for roll angle. If only two diagonal legs support the robot, the formulas adapt accordingly. This real-time terrain assessment allows the quadruped robot to trigger adaptive controls when inclination thresholds exceed 5°, ensuring proactive adjustments.

The multilayer CPG control network orchestrates the locomotion of the quadruped robot, inspired by biological neural rhythms. It consists of intra-limb coordination for individual legs, inter-limb coordination for gait synchronization, and body-limb coupling for posture control. For intra-limb coordination, a Hopf oscillator model governs each leg’s hip and knee joints:

$$\begin{aligned}
\dot{x} &= \alpha (\mu – r^2) x – \omega y, \\
\dot{y} &= \alpha (\mu – r^2) y + \omega x, \\
r^2 &= x^2 + y^2, \\
\omega &= \frac{\omega_{\text{st}}}{e^{-a y} + 1} + \frac{\omega_{\text{sw}}}{e^{a y} + 1}, \\
\omega_{\text{st}} &= \frac{1 – \beta}{\beta} \omega_{\text{sw}}, \\
\theta_h &= x, \quad \theta_k = \begin{cases} \frac{\text{sgn}(\psi) A_k}{A_h} y & y \geq 0 \\ 0 & y < 0 \end{cases}
\end{aligned}$$

where $x$ and $y$ are state variables, $\alpha$ controls convergence, $\mu$ sets amplitude, $\omega$ is frequency, $\beta$ is the duty factor, and $\theta_h$ and $\theta_k$ are joint control signals. The abduction-adduction hip joint $\theta_{\text{sh}}$ is activated for turning: $\theta_{\text{sh}} = A_{\text{sh}} y$ if needed. Inter-limb coordination uses phase-coupled oscillators for the four legs:

$$\begin{bmatrix} \dot{x}_i \\ \dot{y}_i \end{bmatrix} = \begin{bmatrix} \alpha (\mu – r_i^2) & -\omega_i \\ \omega_i & \alpha (\mu – r_i^2) \end{bmatrix} \begin{bmatrix} x_i \\ y_i \end{bmatrix} + \sum_{j=1}^4 R(\theta_j^i) \begin{bmatrix} x_j \\ y_j \end{bmatrix}$$

where $R(\theta_j^i)$ is a rotation matrix for phase coupling. Body-limb coupling integrates the body joint oscillator with the LF leg’s hip oscillator:

$$\begin{bmatrix} \dot{x}_0 \\ \dot{y}_0 \end{bmatrix} = \begin{bmatrix} \alpha_0 (\mu – r_0^2) & -\omega_0 \\ \omega_0 & \alpha_0 (\mu – r_0^2) \end{bmatrix} \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} + \begin{bmatrix} \cos \theta_{10} & -\sin \theta_{10} \\ \sin \theta_{10} & \cos \theta_{10} \end{bmatrix} \begin{bmatrix} x_1 \\ y_1 \end{bmatrix}, \quad \theta_s = A_s y_0 + b$$

Here, $\theta_s$ is the body joint control signal, $A_s$ is amplitude, and $b$ is a bias. This coupling enables the robot dog to mimic spinal movements, improving terrain compliance. The CPG parameters, such as $\alpha = 20$, $\mu = 1$, $\omega = 2\pi$, and $\beta = 0.5$, generate stable limit cycles for rhythmic motion.

Adaptive adjustments in body posture and foot trajectories are triggered by sensor data to handle terrain irregularities. For body posture, the desired pitch and roll angles $\alpha_{\text{pitch}_r}$ and $\alpha_{\text{roll}_r}$ are updated based on terrain inclinations:

$$\alpha_{\text{pitch}_r}^{i+1} = \alpha_{\text{pitch}_r}^i + k_1 \alpha_{\text{pitch}_d}, \quad \alpha_{\text{roll}_r}^{i+1} = \alpha_{\text{roll}_r}^i + k_2 \alpha_{\text{roll}_d}$$

where $k_1$ and $k_2$ are gains set to zero within ±5° thresholds to minimize unnecessary adjustments. The inverse kinematics then compute joint angles to achieve these orientations, stabilizing the quadruped robot. For foot trajectory adaptation, the swing phase is divided into lift-off, stride, and touch-down subphases, with time coefficients $a_1$ and $a_2$. Knee and hip angles during swing are modulated as:

$$k_i = \begin{cases} k_{fi} + \frac{\alpha_1 (t – t_{fi})}{a_1 T_{\text{sw}}} & t_{fi} < t \leq a_1 T_{\text{sw}} \\ k_{fi} + \alpha_1 & a_1 T_{\text{sw}} < t < a_2 T_{\text{sw}} \\ k_{fi} + \alpha_1 – C_i & t \geq (1 – a_2) T_{\text{sw}} \end{cases}, \quad C_i = \frac{(k_{fi} + \alpha_1 + f_{ki})(t – (1 – a_2) T_{\text{sw}})}{(1 – a_2) T_{\text{sw}}}$$

and

$$h_i = \begin{cases} h_{fi} & t_{fi} < t \leq a_1 T_{\text{sw}} \\ h_{fi} + D_i & a_1 T_{\text{sw}} < t < a_2 T_{\text{sw}} \end{cases}, \quad D_i = \frac{(\beta_1 + f_{hi})(t – a_1 T_{\text{sw}})}{(a_2 – a_1) T_{\text{sw}}}$$

where $T_{\text{sw}}$ is swing duration, $t$ is current time, $k_{fi}$ and $h_{fi}$ are joint angles at reflex points, and $f_{ki}$, $f_{hi}$ are feedback terms for early or late ground contact. This bio-inspired reflex mechanism allows the robot dog to quickly adjust foot placement, reducing impacts and improving stability.

Simulations and experiments validate the terrain adaptive control strategy for the quadruped robot. In simulated uneven terrains, the robot dog employing this method shows smoother center of mass trajectories and reduced height variations compared to a baseline feedback control approach. The stability margin, defined as the minimum distance from the center of mass to the support polygon edge, increases significantly with the proposed strategy. Body orientation angles—pitch, roll, and yaw—exhibit smaller fluctuations, as summarized in Table 2. For instance, pitch angle variations reduce by 39.62%, roll by 17.17%, and yaw by 48.23%, highlighting enhanced motion steadiness.

Table 2: Comparison of Body Angle Fluctuations in Uneven Terrain for Quadruped Robot
Control Method Pitch Angle (rad) Roll Angle (rad) Yaw Angle (rad)
Baseline Feedback 0.419 0.361 0.425
Proposed Adaptive 0.253 0.299 0.220

Experimental results on a physical robot dog prototype confirm these findings. The robot features body joint motors, leg joints with high-torque actuators, IMUs, and foot pressure sensors. Using a walk gait, the quadruped robot successfully traverses uneven surfaces, adjusting its body posture and foot trajectories in real time. Body angle data collected during experiments show pitch variations of 0.185 rad, roll of 0.136 rad, and yaw of 0.200 rad, consistent with simulation trends. The CPG-based control, coupled with sensor-driven adaptations, enables the robot to maintain balance and minimize oscillations, even on challenging terrains with sudden height changes.

In conclusion, this article presents a robust terrain adaptive control strategy for a quadruped robot with articulated body joints, leveraging multi-sensor perception and a multilayer CPG network. The robot dog demonstrates improved stability through dynamic posture adjustments and refined foot trajectories, validated by simulations and real-world tests. Future work will focus on complex gait transitions and high-speed locomotion over highly rugged terrains, further advancing the capabilities of quadruped robots in unstructured environments. The integration of biomechanical principles with advanced control algorithms holds promise for next-generation autonomous systems, making the quadruped robot a versatile tool for various applications.

Scroll to Top