In recent years, the field of robotics has witnessed significant advancements, particularly in the development of legged systems that emulate biological locomotion. As a researcher focused on autonomous motion control and intelligent inspection, I have explored the challenges associated with traditional wheeled robots, which often lack the payload capacity and stability required for complex terrains. The quadruped robot, often referred to as a robot dog, presents a promising alternative due to its superior load-bearing capabilities and smooth motion. However, achieving stable and adaptive gait control remains a critical hurdle, primarily due to the intricate balance systems involved. Inspired by biological counterparts, such as the renowned BigDog from Boston Dynamics, this study delves into the application of Central Pattern Generators (CPGs) to regulate omnidirectional walking gaits for a quadruped robot. By integrating Matlab and Adams for virtual prototyping and simulation, I aim to address issues like low stability, poor control precision, and limited controllability in bionic quadruped robots.
The core of this work revolves around a CPG-based control model that leverages Hopf nonlinear oscillators to generate rhythmic signals for gait coordination. This approach enables seamless transitions between walk and trot gaits, facilitates turning maneuvers, and incorporates slope feedback for environmental adaptation. Through extensive simulations, I demonstrate that the CPG model enhances real-time performance, coordination, and accuracy compared to conventional methods. In this article, I will detail the kinematic analysis, gait generation principles, CPG network design, and simulation results, all from a first-person perspective as I conducted the research. The inclusion of mathematical formulations, parameter tables, and comparative analyses will provide a comprehensive understanding of how CPG regulation can revolutionize the locomotion of quadruped robots.
Kinematic Analysis of the Quadruped Robot
To establish a foundation for gait control, I began by analyzing the kinematics of the quadruped robot. The robot dog was modeled with a structure inspired by biological canines, featuring three-link serial manipulators for each leg. This design ensures agility and adaptability, crucial for navigating uneven surfaces. Using the Denavit-Hartenberg (D-H) method, I derived the coordinate systems and parameters for a single leg, such as the left front leg (LF), which served as a reference for the entire quadruped robot system. The D-H parameters are summarized in Table 1, where the link lengths and joint angles define the robot’s kinematic chain.
| Link | α (rad) | a (mm) | d (mm) | Offset (rad) | θ (rad) |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | θ1 |
| 1 | π/2 | L1 = 40 | 0 | 5π/6 | θ2 |
| 2 | 0 | L2 = 200 | 0 | π/3 | θ3 |
| 3 | 0 | L3 = 200 | 0 | 0 | 0 |
The forward kinematics equations for the foot-end position, derived from the transformation matrices, are expressed as follows:
$$ P_{LFx} = L_3 s_{23} + L_2 s_2 $$
$$ P_{LFy} = L_3 s_1 c_{23} – L_2 c_2 s_1 + L_1 s_1 $$
$$ P_{LFz} = -L_3 c_1 c_{23} – L_2 c_2 c_1 + L_1 c_1 $$
where \( s_{ij} = \sin(\theta_i) \cos(\theta_j) + \cos(\theta_i) \sin(\theta_j) \) and \( c_{ij} = \cos(\theta_i) \cos(\theta_j) + \sin(\theta_i) \sin(\theta_j) \). For inverse kinematics, given the foot-end coordinates \( [P_{LFx}, P_{LFy}, P_{LFz}]^T \), the joint angles can be computed as:
$$ \theta_1 = \arctan\left( \frac{P_{LFy} – \frac{W}{2}}{P_{LFz}} \right) $$
$$ \theta_3 = \arccos\left( \frac{(P_{LFx} – \frac{L}{2})^2 + (L_1 – \frac{P_{LFx}}{\cos \theta_1})^2 – L_3^2 – L_2^2}{2 L_2 L_3} \right) $$
$$ \theta_2 = \arcsin\left( \frac{P_{LFx} – \frac{L}{2}}{\sqrt{(L_3 \cos \theta_3 + L_2)^2 + (L_3 \sin \theta_3)^2}} \right) – \arctan\left( \frac{L_3 \sin \theta_3}{L_3 \cos \theta_3 + L_2} \right) $$
These equations enable precise control of the robot dog’s leg movements, forming the basis for gait generation. The joint angle limits, such as \( \theta_1 \in [-\pi/4, \pi/4] \), \( \theta_2 \in [-\pi/3, \pi/3] \), and \( \theta_3 \in [-3\pi/4, \pi/4] \), ensure feasible motion ranges for the quadruped robot during operation.
Gait Generation and CPG-Based Control
Gait generation is pivotal for stable locomotion in a quadruped robot. I focused on two primary gaits: walk and trot, each characterized by specific parameters like duty factor and phase relationships. The duty factor \( \beta \) is defined as the ratio of stance phase time \( T_{st} \) to the total gait cycle time \( T \):
$$ \beta = \frac{T_{st}}{T} = \frac{T_{st}}{T_{st} + T_{sw}} $$
where \( T_{sw} \) is the swing phase time. For static gaits like walk, \( \beta > 0.75 \), ensuring that at least three feet are on the ground simultaneously, enhancing stability. In contrast, dynamic gaits like trot have \( \beta < 0.75 \), with diagonal legs moving in synchrony, which allows for higher speeds but requires more complex balance control. The phase relationships between legs are illustrated in the gait timing diagrams, where walk gait exhibits a 0.25 cycle phase difference between adjacent legs, and trot gait has a 0.5 cycle phase difference between diagonal legs.
To achieve coordinated motion, I employed a CPG network based on Hopf oscillators. The CPG model generates rhythmic signals for each joint, enabling adaptive gait transitions and environmental feedback. The mathematical representation of a single Hopf oscillator is given by:
$$ \dot{x} = \alpha (\mu – \gamma^2) (x – \mu_1) – \omega (y – \mu_2) $$
$$ \dot{y} = \alpha (\mu – \gamma^2) (y – \mu_2) + \omega (x – \mu_1) $$
$$ \gamma^2 = (x – \mu_1)^2 + (y – \mu_2)^2 $$
$$ \omega = \frac{\omega_{st}}{e^{-\alpha y} + 1} + \frac{\omega_{sw}}{e^{\alpha y} + 1} $$
$$ \omega_{st} = \frac{\beta}{1 – \beta} \omega_{sw} $$
Here, \( x \) and \( y \) are state variables, \( \alpha \) controls convergence speed, \( \mu \) sets amplitude, \( \mu_1 \) and \( \mu_2 \) are feedback terms, and \( \omega \) is the frequency modulated by the duty factor. For the quadruped robot, I extended this to a network of four oscillators, one per leg, with coupling terms to maintain phase relationships. The complete CPG network equations are:
$$ \begin{bmatrix} \dot{x}_i \\ \dot{y}_i \end{bmatrix} = \begin{bmatrix} \alpha (\mu – \gamma_i^2) & -\omega_i \\ \omega_i & \alpha (\mu – \gamma_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} $$
$$ \gamma_i^2 = (x_i – u_1)^2 + (y_i – u_2)^2 $$
$$ \omega_i = \frac{\omega_{st}}{e^{-\alpha y_i} + 1} + \frac{\omega_{sw}}{e^{\alpha y_i} + 1} $$
$$ \omega_{st} = \frac{\beta}{1 – \beta} \omega_{sw} $$
$$ \theta_{hi} = x_i $$
$$ \theta_{ki} = \begin{cases} -\text{sgn}(\varphi) \frac{A_k}{A_h} y_i, & y_i < 0 \\ 0, & y_i \geq 0 \end{cases} $$
The rotation matrix \( R(\theta_j^i) \) defines the phase coupling between oscillators \( i \) and \( j \):
$$ R(\theta_j^i) = \begin{bmatrix} \cos \theta_j^i & -\sin \theta_j^i \\ \sin \theta_j^i & \cos \theta_j^i \end{bmatrix} $$
where \( \theta_j^i \) is the phase difference. For the robot dog, I set \( \varphi = 1 \) for elbow-style joint configuration. This model allows smooth gait transitions by adjusting \( \beta \) and phase differences; for instance, changing \( \beta \) from 0.75 (walk) to 0.5 (trot) alters the oscillator coupling, enabling dynamic gait switching. Additionally, intra-leg coordination uses a half-wave function to synchronize hip and knee joints, preventing issues like foot dragging or tripping. The knee joint control is defined as:
$$ \theta_k(t) = \begin{cases} 0, & \dot{\theta}_h < 0 \\ \text{sgn}(\psi) \cdot A_k \cdot \left(1 – \left( \frac{\theta_h(t)}{A_h} \right)^2 \right), & \dot{\theta}_h \geq 0 \end{cases} $$
$$ \psi = \begin{cases} -1, & \text{knee} \\ 1, & \text{elbow} \end{cases} $$
This ensures smooth, biologically inspired motion for the quadruped robot, enhancing its adaptability across various terrains.

Simulation Platform and Gait Regulation Analysis
To validate the CPG-based control model, I developed a virtual prototyping environment using Matlab’s Simulink and Adams. This joint simulation approach allowed me to test the robot dog’s locomotion under different conditions without physical prototypes. In Simulink, I constructed the CPG network model with manual control interfaces for gait switching, parameter adjustment, and feedback integration. The key simulation parameters for walk and trot gaits are listed in Table 2, which includes duty factors, speeds, cycle times, and joint amplitudes.
| Parameter | Walk Gait | Trot Gait |
|---|---|---|
| Duty Factor (β) | 0.75 | 0.5 |
| Speed (m/s) | 0.2 | 0.6 |
| Gait Cycle (s) | 0.8 | 0.4 |
| Foot Lift Height (m) | 0.02 | 0.02 |
| Hip Joint Amplitude (°) | 12.2 | 12.2 |
| Knee Joint Amplitude (°) | 7.6 | 7.6 |
For walk gait simulation, I set the gait state to 1 and β to 0.75 in Simulink. The Adams model responded with stable joint signals and motor angle data, as shown in the output curves. The robot dog maintained a steady speed of approximately 0.11 m/s, with Euler angles (pitch, roll, yaw) varying within ±6°, indicating high stability. The displacement curves confirmed straight-line motion without significant deviations. Similarly, for trot gait, setting gait state to 2 and β to 0.5 resulted in faster, dynamic locomotion with synchronized diagonal leg movements. The joint signals exhibited consistent phase relationships, and the simulation visuals confirmed the trot characteristics.
Gait transitions were tested by switching parameters in real-time. The CPG model facilitated smooth changes between walk and trot, with no abrupt jumps in joint signals. This demonstrates the robustness of the CPG approach for the quadruped robot, allowing adaptive speed and gait adjustments based on terrain demands. Turning maneuvers were implemented by modulating the hip joint signals during swing phases. The control equations for turning are:
$$ P_{i=1,3}(t) = \begin{cases} h_i(t), & \dot{h}_i > 0 \\ h_i\left(t – \frac{\pi}{2 \omega_{SW}}\right), & \dot{h}_{i+1} > 0 \\ P_i(t – t_s), & \text{else} \end{cases} $$
$$ P_{i=2,4}(t) = \begin{cases} h_i(t), & \dot{h}_i > 0 \\ h_i\left(t – \frac{\pi}{2 \omega_{SW}}\right), & \dot{h}_{i-1} > 0 \\ P_i(t – t_s), & \text{else} \end{cases} $$
$$ D_i(t) = \begin{cases} P_i(t), & i = 1,3 \\ -P_i(t), & i = 2,4 \end{cases} $$
where \( P_i(t) \) is the hip joint output, and \( D_i(t) \) is the modified signal for turning. Simulations showed that the robot dog could execute 180° turns within five gait cycles, with minimal path deviation, highlighting the precision of CPG-based control.
Slope adaptation was incorporated by adding feedback to the CPG network. Assuming a linear relationship between body tilt Δα and slope angle α, where Δα = k_1 α with k_1 = 0.24, the model adjusts joint outputs to maintain stability. The geometric analysis for slope climbing gives:
$$ \Delta \alpha = \arctan\left( \frac{\cos(\theta_0 – \Delta \theta) – \cos(\theta_0 + \Delta \theta)}{L + 2l \sin \theta_0 – l \sin(\theta_0 – \Delta \theta) – l \sin(\theta_0 + \Delta \theta)} \right) $$
In simulations on a 15° slope, the quadruped robot achieved stable ascent without slipping or stumbling, as evidenced by displacement and height curves. The feedback mechanism effectively compensated for terrain variations, underscoring the adaptability of the robot dog in complex environments.
Conclusion
In this study, I have demonstrated the efficacy of CPG-based gait regulation for a quadruped robot using Matlab and Adams simulations. The Hopf oscillator-based CPG model provides a flexible framework for generating stable walk and trot gaits, enabling smooth transitions, turning, and slope adaptation. Through kinematic analysis and extensive simulations, I confirmed that the robot dog exhibits enhanced coordination, real-time performance, and accuracy compared to traditional control methods. The integration of feedback mechanisms allows the quadruped robot to navigate uneven terrains autonomously, making it suitable for applications like inspection and exploration. Future work will focus on hardware implementation and testing under real-world conditions to further validate this approach. Overall, the CPG strategy represents a significant step forward in achieving robust and adaptive locomotion for legged robotic systems.
