Gait Generation and Control for a Hexapod Bionic Robot Based on Distributed Local Rules

The development of legged locomotion systems, particularly hexapod bionic robots, represents a significant endeavor in robotics aimed at navigating complex, unstructured terrains where conventional wheeled or tracked vehicles falter. This article presents a comprehensive framework for the gait generation and motion control of a modular hexapod bionic robot. We begin with a detailed kinematic analysis, establish fundamental periodic gaits, and then focus on a bio-inspired free gait generation strategy coordinated by a set of local rules. A specialized foot trajectory planning method is introduced to ensure smooth body motion during this adaptive walking. The effectiveness of the proposed methodology is validated through systematic simulation.

The mechanical architecture of our hexapod bionic robot is designed for high adaptability and modularity. The robot comprises a central body and six identical, modular legs. Each leg features three revolute joints, corresponding to the body-coxa (yaw), coxa-femur (pitch), and femur-tibia (pitch) joints, granting three degrees of freedom per limb. This symmetry and modularity enhance serviceability and control uniformity. The body houses the central processing unit, while each leg is instrumented with sensors: one-axis force sensors at the body-coxa and coxa-femur joints, and a three-axis force sensor at the foot (tibia end). This sensory suite enables real-time monitoring of interaction forces and joint torques, forming the basis for reactive control.

To mathematically describe the leg’s position, we assign a coordinate frame to each link following the Denavit-Hartenberg (D-H) convention. Frame {0} is attached to the body-coxa joint, {1} to the coxa-femur joint, {2} to the femur-tibia joint, and {3} to the foot tip. The D-H parameters for a leg segment are summarized in Table 1.

Table 1: Denavit-Hartenberg Parameters for a Single Leg of the Bionic Robot
Joint i θi αi ai di
1 θ1 -90° l1 0
2 θ2 l2 0
3 θ3 l3 0

The transformation from the body frame {B} to the foot tip frame {3} is given by:

$$ ^{B}\mathbf{T}_{3} = \text{Trans}(x_0, y_0, z_0) \cdot \text{Rot}(Z, \beta_1) \cdot \text{Rot}(Y, \beta_2) \cdot ^{0}\mathbf{T}_{1} \cdot ^{1}\mathbf{T}_{2} \cdot ^{2}\mathbf{T}_{3} $$

Here, $ (x_0, y_0, z_0) $ and $ \beta_1, \beta_2 $ define the position and orientation of the leg’s shoulder (coxa joint) relative to the body. The subsequent transformations are derived from the D-H parameters. The resulting foot position $ ^{B}\mathbf{P} = [P_x, P_y, P_z]^T $ in the body frame is:

$$
\begin{aligned}
P_x &= x_0 – S\beta_1(l_1S\theta_1 + l_2S\theta_1 C\theta_2 + l_3S\theta_1 C\theta_{23}) – C\beta_1 S\beta_2(l_2S\theta_2 + l_3S\theta_{23}) + C\beta_1 C\beta_2(l_1C\theta_1 + l_2C\theta_1 C\theta_2 + l_3C\theta_1 C\theta_{23}) \\
P_y &= y_0 – C\beta_1(l_1S\theta_1 + l_2S\theta_1 C\theta_2 + l_3S\theta_1 C\theta_{23}) – S\beta_1 S\beta_2(l_2S\theta_2 + l_3S\theta_{23}) + S\beta_1 C\beta_2(l_1C\theta_1 + l_2C\theta_1 C\theta_2 + l_3C\theta_1 C\theta_{23}) \\
P_z &= z_0 – S\beta_2(l_1C\theta_1 + l_2C\theta_1 C\theta_2 + l_3C\theta_1 C\theta_{23}) – C\beta_2(l_2S\theta_2 + l_3S\theta_{23})
\end{aligned}
$$

where $ S $ and $ C $ denote sine and cosine, and $ \theta_{23} = \theta_2 + \theta_3 $. Analyzing the reachable workspace of the foot tip is crucial for gait planning. A cross-section of this workspace, parallel to the body’s sagittal plane, typically resembles a distorted ellipse. For practical trajectory planning, we approximate it as a rectangle, defining the operational boundaries for the foot of the bionic robot during locomotion.

Legged locomotion is characterized by a periodic sequence of stance phases (leg on ground, propelling the body) and swing phases (leg lifted and moving forward). A gait defines the precise timing and coordination of these phases across all legs. Key parameters include the stride length $ S $, swing time $ t_{swing} $, stance time $ t_{stance} $, and cycle time $ T = t_{swing} + t_{stance} $. The duty factor $ \beta $ and the instantaneous stability margin $ \delta $ are defined as:

$$ \beta = \frac{t_{stance}}{T} = 1 – \frac{t_{swing}}{T} $$

$$ \delta = n \cdot \beta $$

where $ n=6 $ is the number of legs. For static stability, a minimum of three legs must be in stance, requiring $ \delta \geq 3 $ and thus $ \beta \geq 0.5 $. The average forward velocity $ v $ of the bionic robot is:

$$ v = \frac{S}{t_{stance}} = \frac{S}{t_{swing}} \left( \frac{1}{\beta} – 1 \right) = \frac{S}{t_{swing}} \left( \frac{n}{\delta} – 1 \right) $$

This reveals a fundamental trade-off: higher speed (lower $ \beta $ and $ \delta $) comes at the cost of reduced stability. With fixed $ S $ and $ t_{swing} $, gaits can be classified by their $ \delta $ value. Common periodic gaits for the hexapod bionic robot include:

Tripod Gait ($ \delta = 3, \beta=0.5 $): This is the fastest periodic gait. Legs are grouped into two alternating tripods: (L1, R2, L3) and (R1, L2, R3), where ‘L’ and ‘R’ denote left and right, numbered from front to rear. Each tripod swings while the other supports the body. The phase offset between groups is 0.5.

Tetrapod Gait ($ \delta = 4, \beta \approx 0.67 $): A slower, more stable gait. Typically, only two legs swing simultaneously. The phase distribution ensures that at least four legs are on the ground at any time, providing a larger stability polygon for the bionic robot.

Pentapod Gait ($ \delta = 5, \beta \approx 0.83 $): This is a very slow, highly stable gait where only one leg swings at a time. It is useful for precise foot placement or traversing extremely difficult terrain, maximizing the stability of the bionic robot.

Table 2: Comparison of Periodic Gaits for the Hexapod Bionic Robot (Assuming S=100mm, t_swing=1s)
Gait Type Duty Factor (β) Avg. Support Legs (δ) Average Velocity (mm/s) Primary Characteristic
Tripod 0.5 3 100 Maximum speed, minimal static stability
Tetrapod ~0.67 4 ~50 Balanced speed and stability
Pentapod ~0.83 5 ~20 Maximum static stability, low speed

While periodic gaits are efficient on flat terrain, they lack adaptability. Free gaits, generated in real-time based on sensory feedback and internal rules, offer superior adaptability. We adopt a decentralized control paradigm inspired by biological studies, where each leg has a local controller. The overall motion emerges from the interaction of these controllers following a set of local rules. To ensure smooth body motion during the aperiodic stepping sequence of a free gait, a specialized foot trajectory is essential.

The proposed trajectory, plotted in the body’s forward (x) and vertical (z) directions, is shown schematically. Key points are the Anterior Extreme Position (AEP), Posterior Extreme Position (PEP), and the highest point (H) during swing. The innovation lies in the introduction of transition buffers. Before the leg lifts off at the PEP (start of swing) and after it touches down at the AEP (start of stance), short buffer segments (B1 and B2) are inserted. During these buffers, the foot velocity is ramped smoothly to/from the body’s velocity. This prevents instantaneous changes in foot velocity relative to the ground, drastically reducing冲击 forces and enabling continuous body motion even with irregular leg timing. The trajectory is parameterized based on the bionic robot’s workspace. For our design, a stride length $ S_{max} = 200 $ mm and a maximum lift height $ H_{max} = 50 $ mm provide a good compromise between stride length and obstacle clearance capability.

The coordination between the six independent leg controllers is governed by four primary local rules, which modify the nominal PEP and AEP positions of each leg based on the state of neighboring legs. Let $ \text{state}(leg) \in \{\text{SWING}, \text{STANCE}\} $.

Rule 1 (Swing Inhibition): If a leg is in the SWING phase, all its adjacent legs (e.g., for a middle leg, the front and rear legs on the same side and the contralateral middle leg) are inhibited from initiating swing. This is implemented by temporarily shifting their PEP rearwards, delaying the swing onset. This rule prioritizes static stability.

Rule 2 (Swing Promotion via PEP): When a leg finishes its stance and reaches its nominal PEP, it is permitted to start swinging. Furthermore, it actively promotes the swing of a specific neighboring leg that is still in stance by forcing the latter’s PEP forward. A fixed swing promotion hierarchy is used: Rear legs promote middle legs, middle legs promote front legs, and ipsilateral legs have priority over contralateral ones (e.g., L3 promotes L2 before promoting R2). This rule injects coordination into the system.

Rule 3 (Swing Promotion via AEP): Conversely, when a leg begins stance (touches down at its AEP), it promotes the swing of a specific neighbor by shifting that neighbor’s AEP forward, encouraging it to lift off sooner. The promotion hierarchy is from rear to front: a rear leg promotes its ipsilateral middle leg, etc. Rules 2 and 3 together create a wave of coordination that propagates through the bionic robot’s body.

Rule 4 (Velocity Matching): A leg entering the stance phase must have its foot velocity matched to the commanded body velocity at the moment of ground contact. This is ensured by the trajectory planner, which uses the buffer zones to achieve the required velocity blend. This rule is fundamental for smooth locomotion of the bionic robot.

These rules operate concurrently. The control flow for each leg’s local controller is: 1) Check sensory input (e.g., ground contact). 2) Apply Rules 1-3 to potentially modify its own target PEP and AEP based on neighbor states. 3) Execute the appropriate phase (swing or stance) by following the buffered foot trajectory relative to the moving body frame, adhering to Rule 4. The swing/stance decision is made locally when the foot passes the (potentially modified) PEP or AEP.

To validate the entire framework, we constructed a simulation model. The bionic robot was modeled with accurate mass and inertia properties. The control algorithm was implemented, setting $ t_{swing} = 1 $ s and a target body velocity of 0.1 m/s. The legs were initialized with random, unstable phases that would cause a collapse under a fixed periodic gait. The simulation was run for several gait cycles.

The results demonstrate the self-organizing capability of the local rules. Within approximately 3 seconds, the initially chaotic leg phases synchronized into a stable, wave-like tripod-like pattern suitable for the commanded speed. The body moved forward at a nearly constant velocity, with minor oscillations due to discrete stepping. Crucially, the body did not stop or lurch significantly during phase transitions, validating the effectiveness of the buffered foot trajectory. The joint angles and velocities for all legs showed smooth, periodic profiles after the initial adjustment period, confirming the absence of violent motions. Figures 15-17 show sample joint data for the front, middle, and rear legs on one side, illustrating the coordinated but non-identical patterns that emerge from the local rules. Figure 18 confirms the stable body velocity achieved by the bionic robot.

Table 3: Summary of Key Contributions for the Bionic Robot Locomotion Control
Aspect Description Benefit for the Bionic Robot
Kinematic Model Complete forward kinematics with workspace analysis. Provides foundation for precise foot placement and trajectory planning.
Periodic Gait Analysis Formal relationship between speed (v), duty factor (β), and stability (δ). Offers benchmark gaits for efficient locomotion on flat terrain.
Buffered Foot Trajectory Swing/stance path with velocity transition buffers at phase boundaries. Enables smooth body motion and reduces冲击 during free gait execution.
Local Coordination Rules Four rules (Inhibition, PEP Promotion, AEP Promotion, Velocity Match) for decentralized control. Generates stable, adaptive free gaits from local interactions, without a central pattern generator.
Integrated Control Architecture Decentralized leg controllers using the above rules and trajectory. Allows the hexapod bionic robot to autonomously adjust its gait for continuous, stable walking.

This work presents a holistic approach to controlling a hexapod bionic robot. By combining a sound kinematic foundation, an analysis of efficient periodic gaits, a carefully designed foot trajectory for smoothness, and a set of bio-inspired local coordination rules, we enable the robot to perform both efficient structured walking and adaptive free gait walking. The simulation results confirm that the system can autonomously coordinate six legs to achieve stable, continuous locomotion from an arbitrary initial state. This decentralized, rule-based strategy is highly suitable for a bionic robot operating in unstructured environments, as it inherently supports reactive behaviors. Future work will focus on integrating more sophisticated terrain sensing (e.g., vision, lidar) to modulate the local rules for obstacle negotiation and slope adaptation, further enhancing the autonomy and robustness of the bionic robot platform.

Scroll to Top