Skip to main content
Biomimetics logoLink to Biomimetics
. 2025 Jun 7;10(6):381. doi: 10.3390/biomimetics10060381

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

Horacio Rostro-Gonzalez 1,2,*, Erick I Guerra-Hernandez 3, Patricia Batres-Mendoza 3, Andres A Garcia-Granada 2, Miroslava Cano-Lara 4, Andres Espinal 5
Editors: Stanislav N Gorb, Longjian Xue, Barbara Mazzolai, Phillip B Messersmith
PMCID: PMC12190837  PMID: 40558349

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.

Keywords: spiking neurons, Central Pattern Generators, legged robots, lomocotion, gait transitions

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.

Figure 1.

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.

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 Iext (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.

Figure 2.

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.

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:

Vi[k]=γVi[k1](1Z[K1])+j=1NWijZj[k1]+Iiext (1)

and

Zi=1ifVθ0otherwise (2)

Figure 3.

Figure 3

Topology of the Spiking Central Pattern Generator.

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 = 21) 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=080000000000704220120020950841024000000080000000000005000000600090003031000000050000000000504020000000000800000000000090040003020039010381504040 (3)

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.

Figure 4.

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).

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 ti(1),i=1,,M1, and tj(2),j=1,,M2, (where Mn 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 τij(1,2) (see Equation (4)), referring to the time lag within which two spikes from ti(1) and tj(2) are considered coincident.

τij(1,2)=min{ti+1(1)ti(1),ti(1)ti1(1),tj+1(1)tj(2),tj(2)tj1(2)}/2 (4)

Figure 5.

Figure 5

SPIKE- synchronization: (a) general scheme and (b) example of transition from jogging to running at time k=3.

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 Cj(2).

Ci1=1ifminj(|ti(1)tj(2)|)<τij(1,2)0otherwise (5)

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 Ck 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(tk) with C(tk)=C(k).

SC=1Mk=1MC(tk) (6)

where M=M1+M2 is the total number of spikes in the combined spike trains. Sc 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, Iext, γ, θ, N)

  •   2:

          for i=1 to N do

  •   3:

                sum = 0

  •   4:

                for j=1 to N do

  •   5:

                      sum=sum+W[i,j]·Z[i]

  •   6:

                end for

  •   7:

                V[i]=γ·V[i]·(1Z[i])+sum+Iext[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

Figure 6.

Figure 6

Spikes to PWM.

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.

Figure 7.

Figure 7

Hexapod robot interaction on regular and irregular surfaces.

Table 1.

Mean of 10 FSR readings across the four different surfaces.

Surface
Sand Ground Synthetic Grass Natural Grass
MEAN 14.77 KΩ 6.55 KΩ 9.29 KΩ 33.83 KΩ

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.

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.

k 0 1 2 3 4 5 Nearest Time Selected
0 0.00 0.25 0.50 0.50 0.50 0.25 2
1 0.25 0.00 0.25 0.50 0.50 0.50 3
2 0.50 0.25 0.00 0.25 0.50 0.50 0
3 0.50 0.50 0.25 0.00 0.25 0.50 0
4 0.50 0.50 0.50 0.25 0.00 0.25 0
5 0.25 0.50 0.50 0.50 0.25 0.00 1

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.

k 0 1 2 3 Nearest Time Selected
0 0.60 0.20 0.20 0.60 0
1 0.40 0.40 0.40 0.40 0
2 0.60 0.60 0.20 0.20 0
3 0.40 0.80 0.40 0.00 1
4 0.00 0.40 0.80 0.40 2
5 0.40 0.00 0.40 0.80 3

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.

k 0 1 2 3 Nearest Time Selected
0 0.20 0.60 0.60 0.20 1
1 0.40 0.40 0.40 0.40 0
2 0.20 0.20 0.60 0.60 2
3 0.40 0.00 0.40 0.80 3
4 0.80 0.40 0.00 0.40 0
5 0.40 0.80 0.40 0.00 1

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.

k 0 1 2 3 4 5 Nearest Time Selected
0 0.60 0.40 0.60 0.40 0.00 0.40 0
1 0.20 0.40 0.60 0.80 0.40 0.00 3
2 0.20 0.40 0.20 0.40 0.80 0.40 4
3 0.60 0.40 0.20 0.00 0.40 0.80 5

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.

k 0 1 2 3 4 5 Nearest Time Selected
0 0.20 0.40 0.20 0.40 0.80 0.40 4
1 0.60 0.40 0.20 0.00 0.40 0.80 5
2 0.60 0.40 0.60 0.40 0.00 0.40 0
3 0.20 0.40 0.60 0.80 0.40 0.00 3

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.

Figure 8.

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.

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.

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)
Transition Expected Measured Error
Jogging to Walking 1,644,939 1,648,263 3324
Running to Walking 1,644,939 1,649,566 4627
Walking to Jogging 1,244,965 1,248,307 3342
Running to Jogging 1,244,965 1,249,542 4577
Jogging to Running 1,246,622 1,251,403 4781
Walking to Running 1,246,622 1,250,229 3607
            mean 4043

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=VI, where I was measured during execution time.

Table 8.

Energy consumption (current, voltage, and power) of the hexapod robot’s electronics and servomotors under different gait patterns: running and walking/jogging.

Gait I (mA) V (V) P (W)
Running 227 6 13.62
Walking/Jogging 191 6 11.46

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.

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.

Appendix A. Gait Transitions

Figure A1.

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 A2.

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 A3.

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 A4.

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 A5.

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 A6.

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.

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.

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).

Conflicts of Interest

The authors declare no conflicts of interest.

Funding Statement

This research received no external funding.

Footnotes

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.

References

  • 1.Bjelonic M., Klemm V., Lee J., Hutter M. A Survey of Wheeled-Legged Robots. In: Cascalho J.M., Tokhi M.O., Silva M.F., Mendes A., Goher K., Funk M., editors. Robotics in Natural Settings. 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. doi: 10.1177/1729881419839596. [DOI] [Google Scholar]
  • 3.Or Y., Rimon E. Characterization of frictional multi-legged equilibrium postures on uneven terrains. Int. J. Robot. Res. 2017;36:105–128. doi: 10.1177/0278364916679719. [DOI] [Google Scholar]
  • 4.Ramirez J.P., Hamaza S. Multimodal Locomotion: Next Generation Aerial–Terrestrial Mobile Robotics. Adv. Intell. Syst. 2023:2300327. doi: 10.1002/aisy.202300327. [DOI] [Google Scholar]
  • 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. doi: 10.1016/j.heliyon.2024.e31847. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Bal C. Neural coupled central pattern generator based smooth gait transition of a biomimetic hexapod robot. Neurocomputing. 2021;420:210–226. doi: 10.1016/j.neucom.2020.07.114. [DOI] [Google Scholar]
  • 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. doi: 10.3390/app11031339. [DOI] [Google Scholar]
  • 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. doi: 10.1016/j.robot.2011.08.013. [DOI] [Google Scholar]
  • 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. doi: 10.1016/j.susmat.2024.e00930. [DOI] [Google Scholar]
  • 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. doi: 10.1038/s41467-024-47443-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 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. doi: 10.3389/fnhum.2021.779920. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Gast K., Kram R., Riemer R. Preferred walking speed on rough terrain: Is it all about energetics? J. Exp. Biol. 2019;222:jeb185447. doi: 10.1242/jeb.185447. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1126/science.288.5463.100. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1515/revneuro-2017-0102. [DOI] [PubMed] [Google Scholar]
  • 15.MacKay-Lyons M. Central Pattern Generation of Locomotion: A Review of the Evidence. Phys. Ther. 2002;82:69–83. doi: 10.1093/ptj/82.1.69. [DOI] [PubMed] [Google Scholar]
  • 16.Ijspeert A.J. Central pattern generators for locomotion control in animals and robots: A review. Neural Netw. 2008;21:642–653. doi: 10.1016/j.neunet.2008.03.014. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1016/j.neucom.2015.03.090. [DOI] [Google Scholar]
  • 18.Kiehn O. Decoding the organization of spinal circuits that control locomotion. Nat. Rev. Neurosci. 2016;17:224–238. doi: 10.1038/nrn.2016.9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 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. doi: 10.1016/j.neucom.2022.06.085. [DOI] [Google Scholar]
  • 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. doi: 10.1016/j.neucom.2019.11.007. [DOI] [Google Scholar]
  • 21.Ryu H.X., Kuo A.D. An optimality principle for locomotor central pattern generators. Sci. Rep. 2021;11:13140. doi: 10.1038/s41598-021-91714-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 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. doi: 10.1109/TNNLS.2013.2280596. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1002/aisy.202300783. [DOI] [Google Scholar]
  • 24.Ijspeert A.J. Biorobotics: Using robots to emulate and investigate agile locomotion. Science. 2014;346:196–203. doi: 10.1126/science.1254486. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1109/ACCESS.2017.2696985. [DOI] [Google Scholar]
  • 26.Cheng H.M., Mah K.K., Seluakumaran K. Defining Physiology: Principles, Themes, Concepts. Volume 2: Neurophysiology and Gastrointestinal Systems. Springer International Publishing; Cham, Switzerland: 2020. Electrical Properties of Neurons; pp. 81–94. [DOI] [Google Scholar]
  • 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. doi: 10.1038/s41467-017-02717-4. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 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. doi: 10.3389/fnbot.2016.00006. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 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. doi: 10.1242/jeb.073643. [DOI] [PubMed] [Google Scholar]
  • 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. doi: 10.1038/ncomms14494. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Kreuz T., Mulansky M., Bozanic N. SPIKY: A graphical user interface for monitoring spike train synchrony. J. Neurophysiol. 2015;113:3432–3445. doi: 10.1152/jn.00848.2014. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Furber S.B., Galluppi F., Temple S., Plana L.A. The SpiNNaker Project. Proc. IEEE. 2014;102:652–665. doi: 10.1109/JPROC.2014.2304638. [DOI] [Google Scholar]
  • 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. doi: 10.1109/MM.2018.112130359. [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

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).


Articles from Biomimetics are provided here courtesy of Multidisciplinary Digital Publishing Institute (MDPI)

RESOURCES