Next Article in Journal
Three Strategies Enhance the Bionic Coati Optimization Algorithm for Global Optimization and Feature Selection Problems
Next Article in Special Issue
Bioinspired Swimming Robots with 3D Biomimetic Shark Denticle Structures for Controlled Marangoni Propulsion
Previous Article in Journal
A Novel Nature-Inspired Optimization Algorithm: Grizzly Bear Fat Increase Optimizer
Previous Article in Special Issue
The Drosophila Connectome as a Computational Reservoir for Time-Series Prediction
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Enhancing Legged Robot Locomotion Through Smooth Transitions Using Spiking Central Pattern Generators

by
Horacio Rostro-Gonzalez
1,2,*,
Erick I. Guerra-Hernandez
3,
Patricia Batres-Mendoza
3,
Andres A. Garcia-Granada
2,
Miroslava Cano-Lara
4 and
Andres Espinal
5
1
GEPI Research Group, IQS—School of Engineering, Ramon Llull University, Via Augusta 390, 08017 Barcelona, Spain
2
Department of Electronics Engineering, DICIS—University of Guanajuato, Carretera Salamanca—Valle de Santiago km 3.5 + 1.8 kms, Salamanca 36885, Mexico
3
Laboratory of Artificial Intelligence, Robotics and Control, Faculty of Biological Systems and Technological Innovations, Benito Juárez Autonomous University of Oaxaca, Oaxaca 68120, Mexico
4
Department of Mechatronics, TecNM/ITS Irapuato, Irapuato 36821, Mexico
5
Department of Organizational Studies, University of Guanajuato, Fraccionamiento 1, Col. El Establo S/N, Marfil 36250, Mexico
*
Author to whom correspondence should be addressed.
Biomimetics 2025, 10(6), 381; https://doi.org/10.3390/biomimetics10060381
Submission received: 22 April 2025 / Revised: 22 May 2025 / Accepted: 4 June 2025 / Published: 7 June 2025
(This article belongs to the Special Issue Advances in Biomimetics: Patents from Nature)

Abstract

In this work, we propose the integration of a mechanism to enable smooth transitions between different locomotion patterns in a hexapod robot. Specifically, we utilize a spiking neural network (SNN) functioning as a Central Pattern Generator (CPG) to generate three distinct locomotion patterns, or gaits: walk, jog, and run. This network produces coordinated spike trains, mimicking those generated in the brain, which are translated into synchronized robot movements via PWM signals. Subsequently, these spike trains are compared using a similarity metric known as SPIKE-synchronization to identify the optimal point for transitioning from one gait to another. This approach aims to achieve three main objectives: first, to maintain the robot’s balance during transitions; second, to ensure that gait transitions are almost imperceptible; and third, to improve energy efficiency by reducing abrupt changes in the robot’s actuators (servomotors). To validate our proposal, we incorporated FSR sensors on the robot’s legs to detect the rigidity of the terrain it navigates. Based on the terrain’s rigidity, the robot dynamically transitions between gaits. The system was tested in real time on a physical hexapod robot across four different types of terrain. Although the method was validated exclusively on a hexapod robot, it can be extended to any legged robot.

1. Introduction

Legged robots have emerged as a class of robots capable of navigating diverse and challenging environments where wheeled or tracked systems often fall short [1,2]. From uneven terrains to cluttered indoor spaces, legged robots provide superior mobility by mimicking the movement patterns of biological organisms [3]. Their ability to traverse complex surfaces, such as rocky landscapes, stairs, or loose soil, makes them ideal for applications in search and rescue missions, space exploration, and industrial inspection [4]. However, one of the main challenges in developing robust and efficient legged robots lies in achieving smooth transitions between various gait patterns and operational conditions [5,6]. Abrupt shifts in motion, whether due to changes in speed, direction, or terrain type can lead to instability, energy inefficiency, and mechanical stress [7,8].
Legged robots rely on a variety of gaits, which are coordinated patterns of limb movement that allow them to walk, run, jump, or climb [9]. These gaits are typically selected based on environmental conditions and the desired speed or energy consumption of the robot [10]. For instance, walking gaits are preferred at low speeds on rough terrain for stability, while running gaits are more effective for high-speed movement on flat surfaces [11,12]. However, the transition between these gaits, especially in dynamic or unpredictable environments remains a challenge. Poorly timed or abrupt transitions can compromise balance, increase energy consumption, and cause mechanical failures [10]. Achieving smooth, adaptive transitions, such as from walking to running or during surface changes, is thus vital for maintaining the robot’s balance, stability, and efficiency [10].
In biological systems, animals transition effortlessly between gaits, adjusting their movement patterns based on terrain and speed [13]. This is enabled by Central Pattern Generators (CPGs), neural circuits capable of producing rhythmic outputs without requiring continuous sensory feedback [14,15]. These circuits are found in the spinal cords of vertebrates and control repetitive locomotion patterns such as walking, swimming, or flying [16]. Inspired by this biological mechanism, researchers have applied CPG-based control systems in robotics to generate smooth and adaptive limb coordination [5]. The use of spiking neurons within CPGs further enhances the biological realism and timing precision of these control systems [17], enabling robots to better emulate the gait modulation observed in animals [18].
Spiking neural networks (SNNs) have demonstrated great potential in bio-inspired robotic control due to their event-based, low-latency communication properties [19,20,21]. However, most existing studies using SNNs for locomotion rely on large-scale networks or are restricted to simulation environments, requiring high-performance computing platforms for real-time operation [22,23,24]. These factors limit their use in practical applications, especially on low-cost, resource-constrained robotic systems.
In this paper, we address this gap by introducing a novel, fully bio-inspired spiking CPG controller composed of only 12 neurons capable of producing distinct gait patterns and achieving smooth transitions between them. Gait changes are autonomously triggered based on terrain feedback, using a Force-Sensitive Resistor (FSR) sensor integrated into the hexapod’s leg. Crucially, this minimalist architecture enables real-time performance on low-power microcontrollers such as an Arduino board, demonstrating a level of computational and energy efficiency not seen in other SNN-based approaches.
Through simulation and extensive real-world experiments, we demonstrate that our system achieves nearly imperceptible gait transitions, with average stepping time errors below 5 milliseconds, while operating on minimal hardware. These results highlight a path forward for efficient, adaptive locomotion in field-ready legged robots.
The rest of this paper is organized as follows: Section 2 describes the robot architecture, the Spiking Central Pattern Generator (SCPG), the SPIKE-synchronization metric, and the hardware implementation. In Section 3, we present the performance of our approach under various conditions, along with a detailed performance analysis. Section 4 provides a discussion of the results, and finally, Section 5 concludes the paper.

Problem Statement

In [25], a spiking neural network was proposed to reproduce three biologically inspired gait patterns—walk, jog, and run—observed in stick insects, aimed at controlling the locomotion of legged robots. The transition between these gait patterns was managed by initializing a vector that defined the activation of each servomotor in the robot at time zero. In other words, for each gait pattern, there was an initial vector of pulse values (0 or 1), and from this vector, the spiking neural network, as described by Equations (1) and (2), generated the periodic activation of the neurons (or servos) during the execution of the gait sequence. An example of these vectors is shown in Figure 1. The issue with this approach is that the transition between patterns did not account for the current running time, leading to abrupt shifts that could affect or even damage the servos. This lack of proper synchronization increased the risk of the robot malfunctioning or crashing due to poor coordination between the servos during the transition.
To address this issue, the proposed solution in this research is to enable smooth transitions between gaits by monitoring the activation pulses (spikes) over time and selecting the optimal moment for transitioning. To achieve this, we use an event-based metric called SPIKE-synchronization, which will be explained in detail later.
When the network detects a change in I e x t (see Equation (1)) triggered by a sensor input, e.g., an FSR sensor, such as when the robot encounters an obstacle or when the terrain type changes, the system will evaluate the SPIKE-synchronization metric to determine the best timing for the gait transition. This ensures a smoother, more coordinated change, reducing the risk of servo damage or robot malfunction.

2. Materials and Methods

2.1. The Robot

In this work, we consider the hexapod robot shown in Figure 2, which consists of 12 servomotors, 2 per leg, responsible for controlling the coxa and femur. The control system includes an Arduino board and a servo controller capable of sending signals to all 12 servomotors simultaneously. Originally, this robot did not come equipped with any processing system, allowing for the integration of any processing unit. For this project, we selected an Arduino board since the neural network we developed comprises only 12 neurons. Additionally, force sensors (FSRs) have been installed at the base of the robot’s legs to enable it to detect the type of terrain it navigates (see Figure 2). These sensors allow the robot to assess terrain hardness and adjust its gait accordingly.
The following sections detail how the robot’s locomotion gaits are generated and how it interacts with its environment using the FSR sensors.

2.2. Spiking Central Pattern Generators

The robot’s locomotion is achieved through the synchronized activation of its six legs, each powered by two servomotors corresponding to the coxa and femur (see Figure 2), totaling 12 servomotors to control. This control is performed by a bio-inspired mechanism based on a Spiking Neural Network (SNN) (see Figure 3), which acts as a Central Pattern Generator [17], where each neuron corresponds to a servo. The spiking activity generated by the SNN controls the activation and deactivation of the servos, and is modeled by the following equations:
V i [ k ] = γ V i [ k 1 ] ( 1 Z [ K 1 ] ) + j = 1 N W i j Z j [ k 1 ] + I i e x t
and
Z i = 1 i f V θ 0 o t h e r w i s e
Equation (1) presents a discretized representation of the electrical activity in the brain, resulting from the interactions and information processing between neurons [26]. This equation is a simplified version of the widely recognized generalized Leaky Integrate-and-Fire (LIF) model [27].
Specifically, Equation (1) describes the behavior of the neuron’s membrane voltage (V). This equation is composed of three key components: the first (in purple) represents the neuron’s internal state, the second (in green) accounts for synaptic activity with other neurons, and the third (in blue) represents an external current (sensory information). In our case, this external current is responsible for triggering the gait transition based on the data collected by force sensors placed on the legs.
In this equation, the value of N is 12, which corresponds to the 6 coxae and 6 femurs of the robot. In this context, this equation describes the membrane voltage generated for the synchronous interaction of these 12 elements. The value of γ is a discharge factor for the neuron, which penalizes the membrane voltage if the neuron has not fired. The firing of the neuron is described by Equation (2), which produces a binary output: 1 when the neuron reaches a threshold and 0 when it does not. In the latter case, the gamma factor comes into play, affecting the voltage. Its value ranges from [ 0 , 1 ) . A value close to 0 indicates a strong impact on the membrane potential, while a value close to 1 results in minimal penalization. In our case, we considered γ = 0.5 . This value of γ was primarily chosen with digital hardware implementations in mind, as being a power of 2 (i.e., 0.5 = 2 1 ) allows for efficient implementation. However, this value can be any number between 0 and 1.
The value of Z in Equation (2) subsequently controls the activation or deactivation of a Pulse Width Modulation (PWM) signal, which drives the robot’s movement. This process is explained in Section 2.4.
W = 0 8 0 0 0 0 0 0 0 0 0 0 7 0 4 2 2 0 1 2 0 0 2 0 9 5 0 8 4 1 0 2 4 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 6 0 0 0 9 0 0 0 3 0 3 1 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 5 0 4 0 2 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 9 0 0 4 0 0 0 3 0 2 0 0 3 9 0 1 0 3 8 1 5 0 4 0 4 0
Figure 3 illustrates the schematic topology of the spiking neural network designed for generating three distinct gaits: walk, jog, and run. This topology was developed using a grammar evolutionary algorithm, as detailed in [28]. The synaptic weight matrix employed for creating these three locomotion patterns is given in Equation (3). An important aspect during the estimation of synaptic weights by the algorithm is that they were restricted to integer values only to further reduce the computational cost of implementing the system in hardware, as using only integer weights cuts in half the number of bits required compared to using real values for hardware representation. From this topology, we successfully generated gait patterns, as demonstrated in Figure 4, corresponding to each of the three gaits.
A notable aspect of the patterns observed in Figure 4 is their replication of the gait patterns found in insects, namely tripod and tetrapod gait patterns [29]. According to previous studies, the tripod gait facilitates faster locomotion, as evidenced in Figure 4 (see [30]). In contrast, the tetrapod gait is better suited for medium- and low-speed locomotion.

2.3. SPIKE-Synchronization

Once the different gait patterns are generated, the next step is to evaluate the hexapod robot’s ability to transition between them. For this, we use a mechanism known as SPIKE-synchronization, which allows us to assess the current gait state and identify the closest match to the desired target gait. This method applies to transitions aimed at both increasing and decreasing walking speed.
The SPIKE-synchronization is a parameter- and scale-free metric that quantifies the degree of synchrony between events, such as neuronal spikes (see Figure 5a), providing insights into the temporal alignment of these occurrences [31]. This similarity measure produces high values for two similar spike trains; in other words, it reaches a value of one if and only if the two spike trains consist solely of pairs of coincident spikes and a value of zero for spike trains without any coincidences. Let t i ( 1 ) , i = 1 , , M 1 , and t j ( 2 ) , j = 1 , , M 2 , (where M n is the number of spikes in spike train n, with n = 1 , 2 ) be the sequences of discrete spike times. As a starting point, SPIKE-synchronization requires the definition of coincidence detection, which commonly uses a coincidence window τ i j ( 1 , 2 ) (see Equation (4)), referring to the time lag within which two spikes from t i ( 1 ) and t j ( 2 ) are considered coincident.
τ i j ( 1 , 2 ) = min { t i + 1 ( 1 ) t i ( 1 ) , t i ( 1 ) t i 1 ( 1 ) , t j + 1 ( 1 ) t j ( 2 ) , t j ( 2 ) t j 1 ( 2 ) } / 2
The coincidence specification can be measured using the coincidence indicator in Equation (5), which assigns a value of one to each spike if it is part of a coincidence or zero if it is not; the same rule applies to C j ( 2 ) .
C i 1 = 1 if min j ( | t i ( 1 ) t j ( 2 ) | ) < τ i j ( 1 , 2 ) 0 otherwise
Once the coincidence indicator for each individual spike of the two spike trains is defined, the spike trains and their coincidence indicators are aggregated in order to obtain a combined similarity profile by establishing an overall spike index k, producing a consolidated set of coincidence indicators C k in which each coincidence produces a pair of consecutive ones. The SPIKE-synchronization in Equation (6) is defined as the average value of the profile C ( t k ) with C ( t k ) = C ( k ) .
S C = 1 M k = 1 M C ( t k )
where M = M 1 + M 2 is the total number of spikes in the combined spike trains. S c can be interpreted as a measure of the fraction of all coincident spikes in the two spike trains; thus, since the metric is defined as the proportion between the number of spike coincidences and the total number of spikes, it is a dimensionless quantity.
Figure 5b illustrates a transition from jogging to running at time step k = 3 . At this moment, the SPIKE-synchronization metric reaches the best match for a smoother transition.

2.4. Hardware Implementation

The Spiking Neural Network used in this study is relatively small, comprising only 12 neurons with a maximum connectivity of 144 when fully connected. However, this is not the case here, as several connection weights are zero (see Equation (3)). For this reason, we opted for a low-cost implementation using an Arduino UNO board. In the future, a neuromorphic system such as SpiNNaker [32] or Loihi [33] could be employed to incorporate a bio-inspired hardware component, as these architectures allow for the direct integration of spiking neuron models.
The 144 possible connections are represented as real (float) values, with each occupying 4 bytes, resulting in a total memory usage of 576 bytes. Considering the Arduino UNO has 32 kB of memory, this implementation utilizes only a small fraction of its capacity.
The other elements in Equation (1) consume minimal resources. The membrane potential requires a real-type variable as well, meaning a total of 12 values need to be stored at each time step, requiring an additional 48 bytes. The parameter γ is a constant value that consumes 4 more bytes. Lastly, Z is a vector of 12 boolean elements.
In total, the memory usage is around 700 bytes, which is approximately 2% of Arduino’s total available memory.
On the implementation itself, Equations (1) and (2) have been fully mapped in Arduino, generating a topology as shown in Figure 3, which is in charge of controlling each of the servo motors in the robot (see Algorithm 1). In principle, each of these neurons will be emitting binary pulses, which will represent activation or non-activation of the servo motors in a synchronous manner. However, for this to represent motion in the robot, a PWM signal as shown in Figure 6 must be used.
Algorithm 1 Spiking Neural Network (SNN) update algorithm
  1:
function SNN(V, Z, W, I ext , γ , θ , N)
  2:
      for  i = 1 to N do
  3:
            sum = 0
  4:
            for  j = 1 to N do
  5:
                   s u m = s u m + W [ i , j ] · Z [ i ]
  6:
            end for
  7:
             V [ i ] = γ · V [ i ] · ( 1 Z [ i ] ) + s u m + I ext [ i ]
  8:
            if  V [ i ] θ  then
  9:
                   Z [ i ] = 1
10:
            else
11:
                   Z [ i ] = 0
12:
            end if
13:
      end for
14:
      return V, Z
15:
end function
The conversion of spikes to PWM signals shown in Figure 6 allows the neuronal activity to be translated into control commands for the servomotors. In this case, a direct relationship is established between the firing frequency of the neuron and the duty cycle of the PWM signal. For the femur, when no spike is emitted by the neuron, a PWM signal with a duty cycle of 1500 μs is generated. However, when a spike occurs, the duty cycle increases to 1900 μs. In the right coxae, a similar behavior is observed but with inverted duty cycle values: 1700 μs when the neuron is at rest and 1300 μs during the emission of a spike. On the other hand, in the left coxae, this relationship is inverted, due to the fact that the servomotors are rotated 180° with respect to the right coxae, that is, the duty cycle is lower (1300 μs) when the neuron does not fire and higher (1700 μs) during the emission of a spike.

3. Results

To validate our method, we tested our hexapod robot’s navigation across four different surfaces—sand, ground, synthetic grass, and natural grass—as shown in Figure 7. Equipped with Force-Sensitive Resistor (FSR) sensors, the robot is capable of detecting variations in terrain based on changes in resistance measured by the sensors. Table 1 summarizes the mean resistance values observed for each type of terrain. These sensor readings serve as the input for triggering gait transitions in the robot. By identifying specific resistance thresholds associated with each surface, the robot can adapt its gait dynamically.
SPIKE-synchronization analysis for the different possible gait transitions is presented in Table 2, Table 3, Table 4, Table 5 and Table 6; the rows represent the different patterns at time k for the ongoing gait, and the columns correspond to the possible patterns of the transitioning gait, except for the last column, which indicates the selected time of the transitioning gait that best matches the ongoing gait at time k. Since a SPIKE-synchronization value closer to 1 indicates greater similarity, at each time step k, all potential states of the transitioning gait are evaluated with respect to the ongoing gait in order to identify the one that best matches, thus enabling a smooth transition; in cases where multiple patterns of the transitioning gait reach the highest value, the first one is selected for pairing.
In Figure 8, we illustrate a clear example of the transition from the ongoing gait (jog) to the transitioning gait (run) at early, middle, and late simulation times. Each figure includes a vertical dashed line marking the exact moment of transition from one gait to another.
According to Table 4, Figure 8a shows the jog gait at simulation time 0, which transitions to the run gait pattern at simulation time 1. Similarly, Figure 8b shows the jog gait at simulation time 4, transitioning to the run gait pattern at simulation time 5. Finally, Figure 8c shows the jog gait at simulation time 8, transitioning to the run gait pattern at simulation time 9. The complete set of gait transitions is shown in Appendix A, in Figure A1, Figure A2, Figure A3, Figure A4, Figure A5 and Figure A6. A total of 60 experiments were conducted, with 10 trials for each transition type. However, for clarity and better visualization, only five trials per transition are presented.
The dashed line represents the point at which the FSR sensor detected a change in terrain, prompting a gait transition. The spikes are color-coded: red represents the activation of the motor controlling the coxa, while blue corresponds to the femur.
Although the simulation time shown in Appendix A Figure A1, Figure A2, Figure A3, Figure A4, Figure A5 and Figure A6 extends up to 12 time steps, these Table 2, Table 3, Table 4, Table 5 and Table 6 display data only up to time step 5. This is due to the periodic nature of the gaits, where the pattern begins to repeat after this point. By focusing on the initial time steps, we can better analyze the effectiveness of the transitions without redundancy.
One particularly interesting observation in these graphs is the shift in balance structure when transitioning between jog/walk and run, or vice versa. During these transitions, the robot switches between tripod and tetrapod balance structures, as described in [29]. This shift highlights the adaptability of the system to changes in terrain and gait demands, demonstrating the robustness of the proposed approach.

Performance Evaluation

To quantitatively evaluate the performance of our approach, Table 7 presents a comparison of the stepping times (in microseconds) during gait transitions in the hexapod robot. The table includes the expected values, the experimentally measured values, and the corresponding errors for each transition. The results show that the average errors range from 3.3 to 4.8 milliseconds, with an overall mean error of 4.043 milliseconds.
Additionally, Table 8 presents the energy consumption, measured in terms of the current, voltage, and power of the electronics and servomotors of the hexapod robot under different gait patterns: running and walking/jogging. The data reflect the energy demands during stable operating conditions at 6 V, and the power was calculated using the equation P = V I , where I was measured during execution time.

4. Discussion

While biological inspiration has long guided research in robotic locomotion, the use of spiking neural networks (SNNs) in this field remains relatively limited. Most studies in gait generation rely on traditional control systems or oscillators, with only a few exploring the unique potential of spike-based, event-driven computation.
Among the existing SNN-based approaches, many employ large and complex networks to generate rhythmic locomotion patterns. For instance, systems such as those implemented on neuromorphic platforms like SpiNNaker or Loihi typically involve hundreds or even thousands of spiking neurons to model Central Pattern Generators (CPGs) or sensory–motor integration modules. Although these implementations have demonstrated biological plausibility and functional control, they come at the cost of high computational complexity and often require specialized hardware.
In contrast, our proposal introduces a fully bio-inspired architecture that operates with only 12 spiking neurons, which is significantly fewer than what has been reported in the literature. This minimalist design is capable of generating and transitioning between three distinct gait patterns—walk, jog, and run—without relying on complex training procedures or extensive synaptic configurations.
A key innovation in our system is the event-based transition mechanism, which is triggered by sensory input from a Force-Sensitive Resistor (FSR). This sensor detects terrain rigidity, allowing the robot to adapt its locomotion speed accordingly. To the best of our knowledge, no previous work has demonstrated such gait transitions driven by event-based sensory mechanisms in SNN-controlled robots.
Furthermore, the low computational demands of our network allow the entire system to run on a low-cost microcontroller platform, such as Arduino, as opposed to power-hungry processors or external compute units. This not only reduces cost and system complexity but also contributes to greater energy efficiency—an essential feature for autonomous, battery-powered robots.
As a future research direction, we envision extending this bio-inspired architecture by incorporating neuromorphic sensors, such as event-based vision sensors (e.g., Dynamic Vision Sensors (DVSs)) or tactile neuromorphic interfaces. These sensors would provide spiking input natively, enabling more seamless and biologically plausible integration with the SNN controller while also potentially allowing the robot to adapt to more complex and dynamic environments with enhanced sensory resolution and lower latency.

5. Conclusions

The aim of our work is to reduce the gap between basic research, as exemplified in our previous studies, where we successfully designed a unique Spiking Central Pattern Generator capable of generating multiple gaits and applied research, which is the current focus of our efforts to extend the capabilities of our proposal. In this regard, we explored the integration of a transition mechanism between gaits in the locomotion of a hexapod robot, aiming to make these transitions as smooth as possible. To achieve this, we utilized an event-based metric that measures the degree of similarity between two spike trains (neural activations). This metric was incorporated because the robot’s locomotion is controlled by a spiking neural network (SNN), which generates three gait patterns (walk, jog, and run) based on events, or spikes. These patterns are produced by a single network capable of transitioning from one gait to another, with the transitions triggered by the FSR readings based on the terrain conditions.
A critical aspect of our approach, as observed in real-world experiments showcasing the robot’s gait transitions, is the deliberate modulation of locomotion speed in response to the terrain. Specifically, the robot adjusts its velocity, slowing down or speeding up, based on the rigidity of the surface, as measured by an integrated Force-Sensitive Resistor (FSR) sensor. This adaptive behavior is fundamental to the system, allowing the robot to maintain stability and efficiency when navigating different environments. The observed delay during gait transitions, which reflects the time needed for the robot to adjust its speed, is quantitatively captured and discussed through the stepping time error presented in Table 7. Notably, the transition error is nearly imperceptible, with a maximum average stepping time error of 0.004781 s in the worst-case scenario.
We conducted numerous experiments on a real hexapod robotic platform with a low-cost processing unit, namely Arduino. While not every trial resulted in a perfectly smooth transition, the majority achieved transitions that were nearly imperceptible, highlighting the potential of the proposed approach to improve robotic locomotion performance.
Although experimentation was carried out on a six-legged platform, the methodology is extensible to robots with varying numbers of limbs. Furthermore, integrating neuromorphic platforms such as SpiNNaker or Loihi could enhance the system, advancing toward a fully bio-inspired robotic locomotion framework. This paves the way for more energy-efficient and adaptable robots capable of navigating complex environments with improved robustness and flexibility.

Author Contributions

Conceptualization, H.R.-G., A.A.G.-G. and A.E.; data curation, E.I.G.-H.; formal analysis, P.B.-M. and M.C.-L.; investigation, H.R.-G. and M.C.-L.; methodology, H.R.-G., P.B.-M., A.A.G.-G. and A.E.; resources, A.A.G.-G.; software, E.I.G.-H., P.B.-M. and A.E.; validation, E.I.G.-H. and M.C.-L.; visualization, M.C.-L.; writing—original draft, H.R.-G., P.B.-M. and A.E.; writing—review & editing, A.A.G.-G. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

No new data were generated for this research; however, real-world tests conducted on the robotic platform can be found at the following link: https://github.com/BioInspiredLab-UGTO/Smooth-CPG (accessed on 3 June 2025).

Acknowledgments

Horacio Rostro-Gonzalez thanks the University of Guanajuato for the support provided to help carry out this research as part of his postdoctoral stay at Universitat Ramon Llull.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Gait Transitions

Figure A1. Gait transition from jog to run at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Figure A1. Gait transition from jog to run at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Biomimetics 10 00381 g0a1
Figure A2. Gait transition from jog to walk at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Figure A2. Gait transition from jog to walk at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Biomimetics 10 00381 g0a2
Figure A3. Gait transition from run to jog at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Figure A3. Gait transition from run to jog at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Biomimetics 10 00381 g0a3
Figure A4. Gait transition from run to walk at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Figure A4. Gait transition from run to walk at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Biomimetics 10 00381 g0a4
Figure A5. Gait transition from walk to jog at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Figure A5. Gait transition from walk to jog at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Biomimetics 10 00381 g0a5
Figure A6. Gait transition from walk to run at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Figure A6. Gait transition from walk to run at different time steps. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Biomimetics 10 00381 g0a6

References

  1. Bjelonic, M.; Klemm, V.; Lee, J.; Hutter, M. A Survey of Wheeled-Legged Robots. In Robotics in Natural Settings; Cascalho, J.M., Tokhi, M.O., Silva, M.F., Mendes, A., Goher, K., Funk, M., Eds.; Springer International Publishing: Cham, Switzerland, 2023; pp. 83–94. [Google Scholar]
  2. Rubio, F.; Valero, F.; Llopis-Albert, C. A review of mobile robots: Concepts, methods, theoretical framework, and applications. Int. J. Adv. Robot. Syst. 2019, 16, 1729881419839596. [Google Scholar] [CrossRef]
  3. Or, Y.; Rimon, E. Characterization of frictional multi-legged equilibrium postures on uneven terrains. Int. J. Robot. Res. 2017, 36, 105–128. [Google Scholar] [CrossRef]
  4. Ramirez, J.P.; Hamaza, S. Multimodal Locomotion: Next Generation Aerial–Terrestrial Mobile Robotics. Adv. Intell. Syst. 2023, 2300327. [Google Scholar] [CrossRef]
  5. Helal, K.; Albadin, A.; Albitar, C.; Alsaba, M. Workspace trajectory generation with smooth gait transition using CPG-based locomotion control for hexapod robot. Heliyon 2024, 10, e31847. [Google Scholar] [CrossRef]
  6. Bal, C. Neural coupled central pattern generator based smooth gait transition of a biomimetic hexapod robot. Neurocomputing 2021, 420, 210–226. [Google Scholar] [CrossRef]
  7. Luneckas, M.; Luneckas, T.; Kriaučiūnas, J.; Udris, D.; Plonis, D.; Damaševičius, R.; Maskeliūnas, R. Hexapod Robot Gait Switching for Energy Consumption and Cost of Transport Management Using Heuristic Algorithms. Appl. Sci. 2021, 11, 1339. [Google Scholar] [CrossRef]
  8. Roy, S.S.; Pratihar, D.K. Effects of turning gait parameters on energy consumption and stability of a six-legged walking robot. Robot. Auton. Syst. 2012, 60, 72–82. [Google Scholar] [CrossRef]
  9. Yu, Z.; Duan, A.; Zhu, Z.; Zhang, W. Biomimetic soft-legged robotic locomotion, interactions and transitions in terrestrial, aquatic and multiple environments. Sustain. Mater. Technol. 2024, 40, e00930. [Google Scholar] [CrossRef]
  10. Shafiee, M.; Bellegarda, G.; Ijspeert, A. Viability leads to the emergence of gait transitions in learning agile quadrupedal locomotion on challenging terrains. Nat. Commun. 2024, 15, 3073. [Google Scholar] [CrossRef]
  11. Hirayama, K.; Otaka, Y.; Kurayama, T.; Takahashi, T.; Tomita, Y.; Inoue, S.; Honaga, K.; Kondo, K.; Osu, R. Efficiency and Stability of Step-To Gait in Slow Walking. Front. Hum. Neurosci. 2022, 15, 779920. [Google Scholar] [CrossRef]
  12. Gast, K.; Kram, R.; Riemer, R. Preferred walking speed on rough terrain: Is it all about energetics? J. Exp. Biol. 2019, 222, jeb185447. [Google Scholar] [CrossRef] [PubMed]
  13. Dickinson, M.H.; Farley, C.T.; Full, R.J.; Koehl, M.A.R.; Kram, R.; Lehman, S. How Animals Move: An Integrative View. Science 2000, 288, 100–106. [Google Scholar] [CrossRef] [PubMed]
  14. Steuer, I.; Guertin, P.A. Central pattern generators in the brainstem and spinal cord: An overview of basic principles, similarities and differences. Rev. Neurosci. 2019, 30, 107–164. [Google Scholar] [CrossRef] [PubMed]
  15. MacKay-Lyons, M. Central Pattern Generation of Locomotion: A Review of the Evidence. Phys. Ther. 2002, 82, 69–83. [Google Scholar] [CrossRef]
  16. Ijspeert, A.J. Central pattern generators for locomotion control in animals and robots: A review. Neural Netw. 2008, 21, 642–653. [Google Scholar] [CrossRef]
  17. Rostro-Gonzalez, H.; Cerna-Garcia, P.; Trejo-Caballero, G.; Garcia-Capulin, C.; Ibarra-Manzano, M.; Avina-Cervantes, J.; Torres-Huitzil, C. A CPG system based on spiking neurons for hexapod robot locomotion. Neurocomputing 2015, 170, 47–54. [Google Scholar] [CrossRef]
  18. Kiehn, O. Decoding the organization of spinal circuits that control locomotion. Nat. Rev. Neurosci. 2016, 17, 224–238. [Google Scholar] [CrossRef]
  19. Lopez-Osorio, P.; Patiño-Saucedo, A.; Dominguez-Morales, J.P.; Rostro-Gonzalez, H.; Perez-Peña, F. Neuromorphic adaptive spiking CPG towards bio-inspired locomotion. Neurocomputing 2022, 502, 57–70. [Google Scholar] [CrossRef]
  20. Gutierrez-Galan, D.; Dominguez-Morales, J.P.; Perez-Peña, F.; Jimenez-Fernandez, A.; Linares-Barranco, A. Neuropod: A real-time neuromorphic spiking CPG applied to robotics. Neurocomputing 2020, 381, 10–19. [Google Scholar] [CrossRef]
  21. Ryu, H.X.; Kuo, A.D. An optimality principle for locomotor central pattern generators. Sci. Rep. 2021, 11, 13140. [Google Scholar] [CrossRef]
  22. Yu, J.; Tan, M.; Chen, J.; Zhang, J. A Survey on CPG-Inspired Control Models and System Implementation. IEEE Trans. Neural Netw. Learn. Syst. 2014, 25, 441–456. [Google Scholar] [CrossRef] [PubMed]
  23. Fan, Y.; Pei, Z.; Wang, C.; Li, M.; Tang, Z.; Liu, Q. A Review of Quadruped Robots: Structure, Control, and Autonomous Motion. Adv. Intell. Syst. 2024, 6, 2300783. [Google Scholar] [CrossRef]
  24. Ijspeert, A.J. Biorobotics: Using robots to emulate and investigate agile locomotion. Science 2014, 346, 196–203. [Google Scholar] [CrossRef] [PubMed]
  25. Guerra-Hernandez, E.I.; Espinal, A.; Batres-Mendoza, P.; Garcia-Capulin, C.H.; De, J. Romero-Troncoso, R.; Rostro-Gonzalez, H. A FPGA-Based Neuromorphic Locomotion System for Multi-Legged Robots. IEEE Access 2017, 5, 8301–8312. [Google Scholar] [CrossRef]
  26. Cheng, H.M.; Mah, K.K.; Seluakumaran, K. Electrical Properties of Neurons. In Defining Physiology: Principles, Themes, Concepts. Volume 2: Neurophysiology and Gastrointestinal Systems; Springer International Publishing: Cham, Switzerland, 2020; pp. 81–94. [Google Scholar] [CrossRef]
  27. Teeter, C.; Iyer, R.; Menon, V.; Gouwens, N.; Feng, D.; Berg, J.; Szafer, A.; Cain, N.; Zeng, H.; Hawrylycz, M.; et al. Generalized leaky integrate-and-fire models classify multiple neuron types. Nat. Commun. 2018, 9, 709. [Google Scholar] [CrossRef]
  28. Espinal, A.; Rostro-Gonzalez, H.; Carpio, M.; Guerra-Hernandez, E.I.; Ornelas-Rodriguez, M.; Sotelo-Figueroa, M. Design of Spiking Central Pattern Generators for Multiple Locomotion Gaits in Hexapod Robots by Christiansen Grammar Evolution. Front. Neurorobotics 2016, 10, 6. [Google Scholar] [CrossRef]
  29. Grabowska, M.; Godlewska, E.; Schmidt, J.; Daun-Gruhn, S. Quadrupedal gaits in hexapod animals—Inter-leg coordination in free-walking adult stick insects. J. Exp. Biol. 2012, 215, 4255–4266. [Google Scholar] [CrossRef]
  30. Ramdya, P.; Thandiackal, R.; Cherney, R.; Asselborn, T.; Benton, R.; Ijspeert, A.J.; Floreano, D. Climbing favours the tripod gait over alternative faster insect gaits. Nat. Commun. 2017, 8, 14494. [Google Scholar] [CrossRef]
  31. Kreuz, T.; Mulansky, M.; Bozanic, N. SPIKY: A graphical user interface for monitoring spike train synchrony. J. Neurophysiol. 2015, 113, 3432–3445. [Google Scholar] [CrossRef]
  32. Furber, S.B.; Galluppi, F.; Temple, S.; Plana, L.A. The SpiNNaker Project. Proc. IEEE 2014, 102, 652–665. [Google Scholar] [CrossRef]
  33. Davies, M.; Srinivasa, N.; Lin, T.H.; Chinya, G.; Cao, Y.; Choday, S.H.; Dimou, G.; Joshi, P.; Imam, N.; Jain, S.; et al. Loihi: A Neuromorphic Manycore Processor with On-Chip Learning. IEEE Micro 2018, 38, 82–99. [Google Scholar] [CrossRef]
Figure 1. Locomotion pattern “walk”, where each colored line on the graph represents the activation of a servo at a given time. The vertical axis labels the servos (or neurons), with C and F indicating the coxa and femur, respectively, and R and L denoting the right and left sides.
Figure 1. Locomotion pattern “walk”, where each colored line on the graph represents the activation of a servo at a given time. The vertical axis labels the servos (or neurons), with C and F indicating the coxa and femur, respectively, and R and L denoting the right and left sides.
Biomimetics 10 00381 g001
Figure 2. Robot platform overview. The left image shows the hexapod robot structure, with the servomotors controlling the coxa (C) and femur (F) joints highlighted in red and blue, respectively. The labels R and L correspond to the right and left legs. The right image shows a detailed view of a robot limb, showing the femur (F) and coxa (C) servomotors. The coxa joint enables forward and backward movement of the leg, while the femur joint controls the lifting and lowering of the limb. An FSR (Force-Sensitive Resistor) sensor is attached to the distal end of one of the robot’s legs, indicated in yellow.
Figure 2. Robot platform overview. The left image shows the hexapod robot structure, with the servomotors controlling the coxa (C) and femur (F) joints highlighted in red and blue, respectively. The labels R and L correspond to the right and left legs. The right image shows a detailed view of a robot limb, showing the femur (F) and coxa (C) servomotors. The coxa joint enables forward and backward movement of the leg, while the femur joint controls the lifting and lowering of the limb. An FSR (Force-Sensitive Resistor) sensor is attached to the distal end of one of the robot’s legs, indicated in yellow.
Biomimetics 10 00381 g002
Figure 3. Topology of the Spiking Central Pattern Generator.
Figure 3. Topology of the Spiking Central Pattern Generator.
Biomimetics 10 00381 g003
Figure 4. Gait locomotion patterns for different movement speeds: walking (left), jogging (middle), and running (right). Colored lines indicate servo activations (red for the coxae and blue for the femurs).
Figure 4. Gait locomotion patterns for different movement speeds: walking (left), jogging (middle), and running (right). Colored lines indicate servo activations (red for the coxae and blue for the femurs).
Biomimetics 10 00381 g004
Figure 5. SPIKE- synchronization: (a) general scheme and (b) example of transition from jogging to running at time k = 3 .
Figure 5. SPIKE- synchronization: (a) general scheme and (b) example of transition from jogging to running at time k = 3 .
Biomimetics 10 00381 g005
Figure 6. Spikes to PWM.
Figure 6. Spikes to PWM.
Biomimetics 10 00381 g006
Figure 7. Hexapod robot interaction on regular and irregular surfaces.
Figure 7. Hexapod robot interaction on regular and irregular surfaces.
Biomimetics 10 00381 g007
Figure 8. Gait transition from jog to run at (a) early, (b) middle, and (c) late simulation time. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Figure 8. Gait transition from jog to run at (a) early, (b) middle, and (c) late simulation time. These plots present representative examples of neural spike activity during transitions. Red and blue traces correspond to activity in the coxa and femur joints, respectively, reflecting the activation or deactivation of the associated motors.
Biomimetics 10 00381 g008
Table 1. Mean of 10 FSR readings across the four different surfaces.
Table 1. Mean of 10 FSR readings across the four different surfaces.
Surface
Sand Ground Synthetic Grass Natural Grass
MEAN14.77 KΩ6.55 KΩ9.29 KΩ33.83 KΩ
Table 2. SPIKE-synchronization values for times of transition from walk (row) to jog (column) and the specific time to perform the transition. The same distance values are generated for the opposite case (from jog to walk). The values in bold indicate the optimal transition values according to the SPIKE-distance metric.
Table 2. SPIKE-synchronization values for times of transition from walk (row) to jog (column) and the specific time to perform the transition. The same distance values are generated for the opposite case (from jog to walk). The values in bold indicate the optimal transition values according to the SPIKE-distance metric.
k012345Nearest Time Selected
00.000.250.500.500.500.252
10.250.000.250.500.500.503
20.500.250.000.250.500.500
30.500.500.250.000.250.500
40.500.500.500.250.000.250
50.250.500.500.500.250.001
Table 3. SPIKE-synchronization values for times of transition from walk (row) to run (column) and the specific time to perform the transition. The values in bold indicate the optimal transition values according to the SPIKE-distance metric.
Table 3. SPIKE-synchronization values for times of transition from walk (row) to run (column) and the specific time to perform the transition. The values in bold indicate the optimal transition values according to the SPIKE-distance metric.
k0123Nearest Time Selected
00.600.200.200.600
10.400.400.400.400
20.600.600.200.200
30.400.800.400.001
40.000.400.800.402
50.400.000.400.803
Table 4. SPIKE-synchronization values for times of transition from jog (row) to run (column) and the specific time to perform the transition. The values in bold indicate the optimal transition values according to the SPIKE-distance metric.
Table 4. SPIKE-synchronization values for times of transition from jog (row) to run (column) and the specific time to perform the transition. The values in bold indicate the optimal transition values according to the SPIKE-distance metric.
k0123Nearest Time Selected
00.200.600.600.201
10.400.400.400.400
20.200.200.600.602
30.400.000.400.803
40.800.400.000.400
50.400.800.400.001
Table 5. SPIKE-synchronization values for times of transition from run (row) to walk (column) and the specific time to perform the transition. The values in bold indicate the optimal transition values according to the SPIKE-distance metric.
Table 5. SPIKE-synchronization values for times of transition from run (row) to walk (column) and the specific time to perform the transition. The values in bold indicate the optimal transition values according to the SPIKE-distance metric.
k012345Nearest Time Selected
00.600.400.600.400.000.400
10.200.400.600.800.400.003
20.200.400.200.400.800.404
30.600.400.200.000.400.805
Table 6. SPIKE-synchronization values for times of transition from run (row) to jog (column) and the specific time to perform the transition. The values in bold indicate the optimal transition values according to the SPIKE-distance metric.
Table 6. SPIKE-synchronization values for times of transition from run (row) to jog (column) and the specific time to perform the transition. The values in bold indicate the optimal transition values according to the SPIKE-distance metric.
k012345Nearest Time Selected
00.200.400.200.400.800.404
10.600.400.200.000.400.805
20.600.400.600.400.000.400
30.200.400.600.800.400.003
Table 7. Mean stepping time error between the robot’s legs during each transition under different conditions. The values reflect the temporal synchronization performance of the gait generated by the spiking neural network.
Table 7. Mean stepping time error between the robot’s legs during each transition under different conditions. The values reflect the temporal synchronization performance of the gait generated by the spiking neural network.
Stepping Time (μs)
TransitionExpectedMeasuredError
Jogging to Walking1,644,9391,648,2633324
Running to Walking1,644,9391,649,5664627
Walking to Jogging1,244,9651,248,3073342
Running to Jogging1,244,9651,249,5424577
Jogging to Running1,246,6221,251,4034781
Walking to Running1,246,6221,250,2293607
            mean 4043
Table 8. Energy consumption (current, voltage, and power) of the hexapod robot’s electronics and servomotors under different gait patterns: running and walking/jogging.
Table 8. Energy consumption (current, voltage, and power) of the hexapod robot’s electronics and servomotors under different gait patterns: running and walking/jogging.
GaitI (mA)V (V)P (W)
Running227613.62
Walking/Jogging191611.46
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Rostro-Gonzalez, H.; Guerra-Hernandez, E.I.; Batres-Mendoza, P.; Garcia-Granada, A.A.; Cano-Lara, M.; Espinal, A. Enhancing Legged Robot Locomotion Through Smooth Transitions Using Spiking Central Pattern Generators. Biomimetics 2025, 10, 381. https://doi.org/10.3390/biomimetics10060381

AMA Style

Rostro-Gonzalez H, Guerra-Hernandez EI, Batres-Mendoza P, Garcia-Granada AA, Cano-Lara M, Espinal A. Enhancing Legged Robot Locomotion Through Smooth Transitions Using Spiking Central Pattern Generators. Biomimetics. 2025; 10(6):381. https://doi.org/10.3390/biomimetics10060381

Chicago/Turabian Style

Rostro-Gonzalez, Horacio, Erick I. Guerra-Hernandez, Patricia Batres-Mendoza, Andres A. Garcia-Granada, Miroslava Cano-Lara, and Andres Espinal. 2025. "Enhancing Legged Robot Locomotion Through Smooth Transitions Using Spiking Central Pattern Generators" Biomimetics 10, no. 6: 381. https://doi.org/10.3390/biomimetics10060381

APA Style

Rostro-Gonzalez, H., Guerra-Hernandez, E. I., Batres-Mendoza, P., Garcia-Granada, A. A., Cano-Lara, M., & Espinal, A. (2025). Enhancing Legged Robot Locomotion Through Smooth Transitions Using Spiking Central Pattern Generators. Biomimetics, 10(6), 381. https://doi.org/10.3390/biomimetics10060381

Article Metrics

Back to TopTop