In the field of robotics, legged systems offer superior mobility and terrain adaptability compared to wheeled platforms. However, the complexity of leg mechanisms poses significant challenges in motion planning and control, making gait design a critical research focus. While most studies concentrate on mammalian-inspired quadruped robots, this work addresses the less explored area of crawling-style locomotion, akin to reptilian movement. We present a comprehensive approach to gait planning for a bionic quadruped robot, leveraging Central Pattern Generators (CPGs) to generate stable rhythmic signals. By modeling the robot’s kinematics and designing a CPG-based controller, we enable versatile gait generation and velocity control, validated through simulations in the Pybullet environment.

Quadruped robots, often referred to as robot dogs, mimic biological locomotion to navigate unstructured environments. Traditional methods for gait planning, such as inverse kinematics based on real animal trajectories, are computationally intensive and prone to multiple solutions. To overcome these limitations, we employ CPGs, which are neural circuits capable of producing coordinated oscillatory signals without continuous sensory feedback. This approach simplifies the control architecture and enhances robustness. Our robot dog model features 42 degrees of freedom, with six per leg, but we focus on three key joints per leg for gait planning: two hip joints for forward/backward and up/down movements, and one knee joint for leg extension. This simplification allows efficient motion control while maintaining biological realism.
The kinematic analysis of the quadruped robot is foundational for understanding its motion capabilities. We use the modified Denavit-Hartenberg (D-H) method to model the robot’s leg structure, which provides a systematic representation of joint and link relationships. For instance, the transformation between adjacent links is given by the homogeneous transformation matrix:
$$^{i-1}_iT = \begin{bmatrix}
\cos\theta_i & -\sin\theta_i & 0 & a_{i-1} \\
\sin\theta_i \cos\alpha_{i-1} & \cos\theta_i \cos\alpha_{i-1} & -\sin\alpha_{i-1} & -\sin\alpha_{i-1} d_i \\
\sin\theta_i \sin\alpha_{i-1} & \cos\theta_i \sin\alpha_{i-1} & \cos\alpha_{i-1} & \cos\alpha_{i-1} d_i \\
0 & 0 & 0 & 1
\end{bmatrix}$$
where $\theta_i$ is the joint angle, $a_i$ is the link length, $\alpha_i$ is the twist angle, and $d_i$ is the link offset. For a single leg, the forward kinematics derive the end-effector position relative to the body frame. Assuming the body coordinate system $\{b\}$ has its origin at the robot’s center of mass, the position of the foot end $p$ in the body frame can be expressed as:
$$p_x = a_2 \cos\theta_1 \cos\theta_2 – a_3 (\cos\theta_1 \sin\theta_2 \sin\theta_3 – \cos\theta_1 \cos\theta_2 \cos\theta_3)$$
$$p_y = a_2 \sin\theta_1 \cos\theta_2 – a_3 (\sin\theta_1 \sin\theta_2 \sin\theta_3 – \sin\theta_1 \cos\theta_2 \cos\theta_3)$$
$$p_z = d_1 – a_3 (\cos\theta_2 \sin\theta_3 + \sin\theta_2 \cos\theta_3) – a_2 \sin\theta_2$$
Here, $a_2$ and $a_3$ represent link lengths, and $\theta_1$, $\theta_2$, $\theta_3$ are the joint angles for the hip and knee joints. The crawling speed of the quadruped robot is influenced by stride length and frequency. Under the assumption that the support phase legs maintain a constant hip2 joint angle and the knee joint adjusts to fix the foot-ground contact point, the theoretical forward velocity $v_b$ can be derived as:
$$v_b = \frac{\omega}{\pi} a_2 (\sin\theta_{1,\text{max}} – \sin\theta_{1,\text{min}})$$
where $\omega$ is the gait frequency, and $\theta_{1,\text{max}}$ and $\theta_{1,\text{min}}$ are the limits of the hip1 joint angle. This equation guides the parameter setting for the CPG model and mapping functions, ensuring the robot dog achieves desired locomotion speeds.
To generate rhythmic signals for gait control, we design a CPG network based on Hopf oscillators. Each oscillator is described by the following differential equations:
$$\dot{x} = \alpha (\mu – x^2 – y^2)x – \omega y$$
$$\dot{y} = \alpha (\mu – x^2 – y^2)y + \omega x$$
$$\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}}$$
Here, $x$ and $y$ are state variables, $\alpha$ controls convergence speed, $\mu$ is the squared radius of the limit cycle, $\omega_{\text{st}}$ and $\omega_{\text{sw}}$ are the stance and swing phase frequencies, $\beta$ is the duty ratio, and $a$ regulates the transition sharpness. The Hopf oscillator exhibits stable limit cycle behavior, as shown in phase plane plots, where trajectories from arbitrary initial conditions converge to a circle of radius $\sqrt{\mu}$. For the quadruped robot, we couple four oscillators in a network to coordinate the legs. The coupled CPG model is:
$$\begin{bmatrix} \dot{x}_j \\ \dot{y}_j \end{bmatrix} = \begin{bmatrix} \alpha(\mu – x_j^2 – y_j^2) & -\omega_j \\ \omega_j & \alpha(\mu – x_j^2 – y_j^2) \end{bmatrix} \begin{bmatrix} x_j \\ y_j \end{bmatrix} + \sum_{k=1}^{4} R(\phi^k_j) \begin{bmatrix} x_k \\ y_k \end{bmatrix}, \quad j,k = 1,2,3,4$$
$$R(\phi^k_j) = \begin{bmatrix} \cos\phi^k_j & -\sin\phi^k_j \\ \sin\phi^k_j & \cos\phi^k_j \end{bmatrix}$$
The coupling matrix $R(\phi^k_j)$ defines phase differences between oscillators, enabling synchronization for various gaits. The network topology facilitates inter-leg coordination, essential for stable locomotion of the robot dog.
Gait planning involves mapping the CPG outputs to joint angles through designed functions. For each leg, the joint angles $\theta_1$ (hip1), $\theta_2$ (hip2), and $\theta_3$ (knee) are computed as:
$$\theta_1 = r_1 x + b_1$$
$$\theta_2 = \begin{cases} r_2 y + b_2, & y \geq 0 \\ b_2, & y < 0 \end{cases}$$
$$\theta_3 = \begin{cases} r_3 y + b_3, & y \geq 0 \\ b_3, & y < 0 \end{cases}$$
where $r_i$ are mapping coefficients, and $b_i$ are offsets. For instance, $b_1 = -\pi/2$, $b_2 = 0$, and $b_3 = -\pi/2$ set the initial joint positions. The coefficients $r_i$ are determined based on desired joint ranges and kinematic constraints. For example, $r_1 = b_1 – \theta_{1,\text{max}}$, $r_2 = b_2 – \theta_{2,\text{max}}$, and $r_3 = \sin^{-1} \left( \frac{a_2 (1 – \cos \theta_{1,\text{max}})}{a_3} \right)$ ensure the foot remains stationary during the support phase, preventing slippage.
We design two primary gaits for the quadruped robot: trot and walk. The trot gait, a diagonal gait, has a duty ratio $\beta = 0.5$, meaning stance and swing phases each occupy half the cycle. The phase differences between legs are set to $\phi_{\text{trot}} = [0, \pi, \pi, 0; -\pi, 0, 0, -\pi; -\pi, 0, 0, -\pi; 0, \pi, \pi, 0]$. For a gait period of 1 second, $\omega = 2\pi$. The walk gait, with a duty ratio $\beta = 0.75$, ensures only one leg is in swing phase at any time. The phase differences are $\phi_{\text{walk}} = [0, \pi, 3\pi/2, \pi/2; -\pi, 0, \pi/2, -\pi/2; -3\pi/2, -\pi/2, 0, -\pi; -\pi/2, \pi/2, \pi, 0]$. The CPG parameters for these gaits are summarized in the table below:
| Gait | $\alpha$ | $a$ | $\mu$ | $\beta$ | $\omega_{\text{sw}}$ |
|---|---|---|---|---|---|
| Trot | 10 | 10 | 1 | 0.5 | $2\pi$ |
| Walk | 10 | 10 | 1 | 0.75 | $4\pi$ |
The mapping coefficients and joint limits for specific gait instances are provided in another table:
| Gait | $\theta_{1,\text{max}}$ | $\theta_{2,\text{max}}$ | $r_1$ | $r_2$ | $r_3$ |
|---|---|---|---|---|---|
| Trot1 | $\pi/4$ | $\pi/6$ | 0.79 | 0.52 | 0.17 |
| Trot2 | $\pi/6$ | $\pi/6$ | 0.52 | 0.52 | 0.08 |
| Walk | $\pi/6$ | $\pi/6$ | 0.52 | 0.52 | 0.08 |
Simulations in Pybullet validate the proposed approach. The robot dog model, with link lengths $a_2 = 70$ mm, $a_3 = 120$ mm, and $d_1 = 50$ mm, is imported via a URDF file. The CPG model generates joint angles in real-time, controlling the robot’s locomotion. For trot gaits, the theoretical velocities are $0.2$ m/s for Trot1 and $0.14$ m/s for Trot2, based on the kinematic analysis. Experimental results show that over 20 seconds, the robot covers approximately $3.83$ m and $2.4$ m in the forward direction for Trot1 and Trot2, respectively, aligning with predictions. Lateral displacement is observed but remains within acceptable bounds. Additionally, the Trot2 gait successfully navigates a $30^\circ$ slope, achieving a slope-corrected distance of $2.72$ m in 20 seconds, though with increased lateral drift. The walk gait, tested on flat ground and stairs, demonstrates an average speed of $0.1$ m/s and effective stair-climbing capability, with the robot’s center of mass rising from $0.17$ m to $0.23$ m over four steps.
In conclusion, our CPG-based gait planning method enables efficient and adaptable locomotion for bionic quadruped robots. The kinematic model provides a theoretical foundation for velocity control, while the Hopf oscillator network ensures stable, rhythmic output. Through parameter tuning, the robot dog achieves desired speeds and handles varied terrains. Future work will integrate sensory feedback for autonomous parameter adjustment, enhancing robustness in dynamic environments. This approach has practical implications for developing advanced quadruped robots capable of complex tasks in real-world scenarios.
