1 Introduction

Legged animals move in situational locomotion. In particular, quadrupeds have a wide variety of locomotion patterns (gaits), and they move efficiently by switching gaits according to their locomotion speed [1,2,3,4]. Therefore, implementing the system that generates animals’ gaits into robots may let the robots move flexibly and efficiently as animals do. Neurophysiological experiments have provided insights into the relationships of the nervous systems to gait generation [5,6,7,8,9,10,11]. The theory that quadruped animals unconsciously generate gaits by interacting with the central pattern generators (CPGs) and sensory inputs is currently widely accepted [12,13,14]. Although many neurophysiological experiments, the gait generating mechanisms much remain unknown [15, 16].

Besides neurophysiological studies try to understand animals’ complex nervous systems’ activity, there are engineering studies. For example, developing models that simulate CPGs and analyzing their behavior have been studied [17,18,19]. Furthermore, experiments with robot systems using CPG models to generate locomotion have shown advantages such as efficiency, adaptability, and stability [20,21,22,23,24]. However, these results do not necessarily indicate that animals are generating gaits by CPGs of the proposed structures because the structures of animals’ CPGs and the function of sensory inputs are unknown.

A study using a biped machine with passive joints revealed that the machine generates a gait placed on a shallow slope without any joint controlling system [25]. Another study using a quadruped machine showed that it generates quadruped animals’ gaits and switches the gait according to the body joints’ type and the slope angle [26, 27]. These results suggest even machines that passively move their joints without actively controlling the joints can generate gait using gravity. The finding that walking machines produce different gaits depending on body structure may relate animals’ different gaits for different species. Therefore, a gait generation method that appropriately incorporates the body’s structure is necessary to apply the animals’ gait generation mechanism to engineering.

Quadruped robot systems with active joints controlled by mathematical oscillators demonstrated that they could actively generate gaits. The robot generated gaits according to locomotion speed using toe pressures [28, 29]. The oscillators individually control the joints depending on the oscillators’ phases. The pressures accelerate and decelerate the oscillating speed, and it makes phase difference between the legs (i.e., gait) depending on differences in weight supported by each toe. Although they did not design the oscillator they used to control the joint on a biological basis, the suggestion that the toe pressure is closely related to the gait is consistent with the results of physiological experiments [30,31,32].

The authors attempt to realize a robot that can flexible and efficient walking like animals by implementing a bio-inspired gait generation method. The authors previously developed a quadruped robot system that implemented a gait generation method using pulse-type hardware neuron models (P-HNMs). The P-HNM is an analog circuit that emulates biological neurons’ function and can output electrical activity similar to the biological neurons [33]. We demonstrated that the robot system could actively generate the gaits by simply decreasing the joints’ angular velocity in response to pressures at the toes [34]. However, the robot system could maintain the gaits only for tens of seconds in the previous experiments. Therefore, we speculate that the cause was the mechanical and electrical disturbance elements and aimed to simulate the robot system in an ideal space to clarify the gait generation’s essence.

In this paper, the authors built a quadruped robot model on a dynamic simulator to remove the disturbance elements. Instead of using the P-HNMs’ role, we implemented an alternative gait generation method in which the joints’ angular velocity corresponds to normal forces.

2 Quadruped robot system

This chapter describes the previously developed quadruped robot system that we based to build a quadruped robot model on the dynamic simulator.

2.1 Mechanical structure

Figure 1 shows the quadruped robot system. The mechanical components of the robot system are a body frame and four sets of leg units. Every leg units have the same structure with two joints using servomotors each. The robot system has no degrees of freedom except for the leg units. The length from the joints’ axis on the body frame side to the toes is 138 mm, the length between the front and rear legs is 175 mm, and the length between the left and right legs is 101 mm. The total weight of the robot system is approximately 1.1 kg. The end of each leg has a pressure sensor and a rubber tip shown in Fig. 2. A single-board microcontroller mounted on the robot system individually controls each leg unit’s joints.

Fig. 1
figure 1

Quadruped robot system

Fig. 2
figure 2

Detail of leg tip

2.2 Leg controlling system

The quadruped robot system actively generates gaits by leg controlling systems. The leg controlling system’s components are the microcontroller and the leg unit, the P-HNM, and the pressure sensor. The P-HNM is an analog circuit with functions similar to biological neurons. The P-HNM consists of a cell body model and an inhibitory synaptic model shown in Fig. 3. Details of the cell body model and the inhibitory synaptic model are described in [33]. The P-HNM generates oscillating patterns of electrical activity vout shown in Fig. 4. The synaptic weight control voltage vw representing the inhibition’s strength extends the pulse period T.

Fig. 3
figure 3

Schematic diagram of P-HNM

Fig. 4
figure 4

Example of P-HNM’s output waveform (simulation result)

Figure 5 shows a summary of the microcontroller’s roles. The microcontroller applies the vw to the P-HNMs depending on each toe pressure. Therefore, the pulse period varies according to their corresponding toe pressure. Each P-HNM inputs the vout to the microcontroller’s different input pin to trigger interrupt commands. When the vout exceeds the interrupt trigger voltage (approximately 1.7 V), the microcontroller runs the corresponding leg’s interruption command. The interruption command changes the angle of joints at a constant angle θ. The toes follow a trajectory shown in Fig. 6a in turn to the target points when changing the angle. ϕi in Fig. 6a represents the phase of the leg movements in one cycle. The leg movement when following the target points is as shown in Fig. 6b. For example, if the P-HNM corresponding to the left forefoot triggers an interrupt command, the left forefoot’s joints will move θ toward the next target point. Thus, the quadruped robot system individually varies legs’ moving speed depending on the toe pressure.

Fig. 5
figure 5

Summary of microcontroller’s role

Fig. 6
figure 6

Leg movement and trajectory drawn by toes

2.3 Gait generation method

This section describes the relationship between the pressures and the joints’ angular velocity when the robot locomotes. Since the quadruped robot system controls the leg units individually, parameters are different for each leg. In the following equations, the subscript “i” means the parameter for the ith leg. The leg’s angular velocity can be expressed as the following equation:

$$\omega_{i} = \frac{\theta }{{T_{i} }},$$
(1)

where θ is an actuation angle that each time the P-HNM triggers the joints’ actuation. θ is a very small value for the angle that the joints need to drive in one cycle of leg motion shown in Fig. 6, and the toes gradually move from a target point to the next target point. The synaptic weight control voltage vw that the microcontroller applies to the P-HNM circuit boards can be expressed as the following equation:

$$v_{{{\text{w}}i}} = \sigma v_{{{\text{press}}i}}$$
(2)

where vpressi is the pressure sensors’ output voltages measured by the microcontroller. σ is a constant value for converting vpress to vw and represents the effect of pressure. The period Ti in which the P-HNMs output a pulse can be expressed by the following equation:

$$T_{i} = 5.0v_{{{\text{w}}i}}^{2} - 8.0v_{{{\text{w}}i}} + 3.9.$$
(3)

From the Eqs. (1) and (3), ωi is given by the following equation. Equation (4) indicates that the toe’s pressure reduces the angular velocity of the joints.

$$\omega_{i} = \frac{\theta }{{5.0v_{{{\text{w}}i}}^{2} - 8.0v_{{{\text{w}}i}} + 3.9}}.$$
(4)

This method is based on the method proposed by other researchers to feedback pressure to four decoupled phase oscillators individually [28,29,30]. In their method, the strength of the feedback to the oscillators varies according to the leg phase. In addition, the feedback accelerates or decelerates the angular velocity according to the leg phase. In contrast, our method does not use the leg phase to vary the angular velocity. Instead, the method feeds back the pressure that the toe receives to the P-HNM to decrease the angular velocity of the joint while not accelerating it.

3 Quadruped robot model

This section describes a quadruped robot model built on the dynamic simulator.

3.1 Modeling

The authors developed a quadruped robot model in the dynamic simulator (CoppeliaSim Coppelia Robotics AG). Figure 7 shows the quadruped robot model. We imported data in STL format we designed to fabricate the quadruped robot system’s parts into the dynamic simulator except for a few structures. The parts excluded are mainly the microcontroller and the circuit boards mounted on the robot’s body. Although the data are imported as random non-convex shapes, using them makes the simulations unstable and inaccurate. Therefore, we morphed the imported shapes into stable convex shapes. We set the parts’ mechanical properties of the quadruped robot model to the same values as those of the quadruped robot system. Table 1 shows the parts’ mechanical properties. The robot model’s whole mass is 1.0 kg.

Fig. 7
figure 7

Quadruped robot model

Table 1 Parts’ mechanical parameters

The quadruped robot model consists of a body structure and leg units. Figure 8 shows the structures’ detail. The body structure has four joints and a cubic weight to tune the center of mass. Each leg unit has a joint, Part 1, 2, 3, and a force sensor. The leg units have the same structure and mechanical properties. Since the not moving parts can be deemed as a single structure, the body frame and the structure of the servomotors attached to the body frame are merged into a single structure as the body structure for simplicity. Although each Part 1 consists of two structures separated by space, it was also merged into a single structure. All the joints are positioned in the servomotors’ axis. We attached the force sensor between Part 2 and 3. The leg modules rotate around the body structure’s joints, Part 2, 3, and the force sensors rotate around the leg units’ joints together.

Fig. 8
figure 8

Detail of body structure and leg unit

3.2 Alternative gait generation method

We programmed the simulator to control the robot model’s legs individually according to the toes’ pressures, similar to the quadruped robot system. Figure 9 shows a summary of how the programmed simulator operates. The simulator defines a different joint actuation period for each leg. Since the simulator defines every actuation period as 0 s in an initializing process, the joints immediately move in an actuation process. A sensing process will start after the initializing process. If the simulation time elapses any the actuation period, the simulator calculates the corresponding leg’s joints’ angle to be rotated in the actuation process. Then, the simulator calculates each actuation period according to the toes’ normal force. After these processes, the simulator advances the simulation one frame and actuates the legs’ joints. The time step of the simulations was 10 ms, and the simulator executes the sensing process and the actuation process in every time step. The simulator continues simulation, while the simulation time does not elapse a limit time. Trajectories that the quadruped robot model’s toes pass are identical to the quadruped robot system shown in Fig. 6. Target points’ phases are also equal. Although the sensors on the toes can measure forces in three axes, we programmed the simulator to use only normal forces to match the quadruped robot system’s gait generation method.

Fig. 9
figure 9

Summary of simulator’s operation

The following equations express parameters with primes to distinguish them from the quadruped robot system. Each leg’s joint actuation period T’ can be expressed as follows:

$$T_{i}^{^{\prime}} = T_{{\text{I}}} + N_{i} \sigma^{\prime},$$
(5)

where TI is a constant value that corresponds to the P-HNM’s pulse period when the normal force is zero in Eq. (3). In other words, Eq. (5) is a simplified quadratic function of Eq. (3) to a linear function. N is the normal force that the toes received from the floor. σ’ is a constant value representing the effect of the pressure.

The robot model rotates joints by a constant angle θ´ in each actuation period. Therefore, θ´ represents the locomotion speed. Hence, the joints’ angular velocity ω´ is given by the following equation. The weight supported by each leg tip changes the joints’ angular velocities, which generates phase differences between the legs.

$$\omega_{i}^{^{\prime}} = \frac{{\theta^{\prime}}}{{T_{{\text{I}}} + N_{i} \sigma^{\prime}}}.$$
(6)

4 Dynamic simulation

We simulated the quadruped robot model’s behavior in each condition by changing the value of θ´ from 0.20° to 1.7° in increments of 0.01° while retaining the constant values TI and σ´. The constants we set were TI = 20 ms and σ´ = 8.0. Each leg’s initial phases were 3π/2, and we let the quadruped robot model start moving its legs simultaneously on a wide enough plane. Although we will show transitions of phase differences, the robot model did not recognize and use them to control its legs, as described above.

The quadruped robot model actively generated different gait depending on the locomotion speed as the same as the quadruped robot system we have developed. Figures 10 and 11 show examples of how the quadruped robot model generated gaits. These are simulation results in which the quadruped robot model generated each gait most quickly in 5000-s simulations. Also, the results in which the quadruped robot model maintained the gaits for the longest time. The vertical axes in Figs. 10 and 11 represent the difference of the leg movements’ phases ϕi from the LF (left fore) leg to other legs. The LH, RF, and RH mean left hind, right fore, and right hind leg. The phase differences that the quadruped robot model generated in Fig. 10 are around 90° (0.5π rad). Moreover, the legs’ moving order is LF, RH, RF, LH; therefore, this is the walk gait. The θ´ in Fig. 10 is 0.99°. The phase differences the robot model generated in Fig. 11 are around 180° (π rad). Furthermore, the legs’ moving order is LF and RH, RF and LH; therefore, this is the trot gait. The θ´ in Fig. 11 is 1.09°. Our previously developed quadruped robot system could maintain gaits only for tens of seconds. In addition, we could sight the walk gait and trot gait only in two conditions. In contrast, the quadruped robot model could maintain gaits for thousands of seconds.

Fig. 10
figure 10

Example of generated gait (walk gait)

Fig. 11
figure 11

Example of generated gait (trot gait)

Figure 12 depicts relationships between angular velocities and generated gaits in simulation and experimental results. Since the variation in angular velocity against pressure is different for the robot system and the robot model, we defined the horizontal axis in Fig. 12 represents angular velocities when a leg tip is not on the floor. The white circles in Fig. 12 indicate conditions in which gaits were maintained for more than five cycles. Figure 12 shows that the robot model could generate each gait in a wide range. Also, Fig. 12 shows that the quadruped robot model tends to generate the walk gait at low speed and the trot gait at high speed.

Fig. 12
figure 12

Relationships between angular velocities and generated gaits

We speculate that the elimination of disturbances occurred in the robot system, and the simplification of the method caused these differences between the robot system and model.

5 Conclusion

In this paper, the authors described a quadruped robot model with an alternative gait generation method built on a dynamic simulator. We confirmed that the robot model could actively generate animals’ gaits due to simulations. The quadruped robot model generated animals’ walk gait and trot gait according to locomotion speed. In addition, the robot model could maintain gaits for a much longer cycle than the robot system. The simulation did not faithfully reproduce the robot system. However, since the simplified method could actively generate gaits, it may be close to the essential elements needed for active gait generation.

In the future, we will further analyze the behavior of the quadruped robot model to determine the essential elements.