## 4 Locomotion Simulation
### The Locomotion Simulation of an Earthworm-like Robot  
In order to simulate the locomotion of the earthworm-like robot, a flow chart of the calculations, which consists of three parts, is shown in Figure 9. It is assumed that each movement of the peristaltic wave adopts complete anchorage without slip. First, the parameters, including the geometric parameters (initial body length \(l_{0}\); the number of body segments \(TN\)) and material parameters (the linear spring with stiffness \(k\), spring stiffness \(k_{i}\), the viscous coefficient \(c_{i}\), and the equivalent mass \(m\)) are assigned. Then, after the input excitation voltage, the \(x_{i}\) is calculated by Equation (1). The minimum and maximum points of \(x_{i}\) are stored with _LMin[i]_ and _LMax[i]_, respectively. The body length \(l_{i}\) (\(t\)) of the actuated segment can be calculated by Equation (2). Finally, taking the position of the last body segment, \(p_{last}\), as a reference point, the peristalsis locomotion \(p_{i}\) path of the earthworm-like robot is obtained by updating the coordinates of the body segment, according to  
\[p_{i}=p_{last}+\sum_{m=i}^{TN}l_{TN-m+i} \tag{11}\]  
According to the routine of the earthworm-like robot locomotion simulation shown in Figure 9, a 12-segment earthworm-like locomotion robot is used for numerical illustration. The results of the modular gait transmission and displacement are shown for the unbroken/broken driven module under driven module waves with/without overlapping. Figure 10 shows the gait generation and locomotion for U-DM with three/four actuated segments under MG-I. For the earthworm-like robot with only one driven module, the number of actuated segments within the driven module determines the frequency and amplitude of the receding peristaltic wave. The characteristics of the wave determine the robot locomotion performance. In Figure 10a, the frequency of the receding peristaltic wave is 1/4, and the amplitude of the receding peristaltic wave is 3. In Figure 10b, the frequency of the receding peristaltic wave is 1/3, and the amplitude of the receding peristaltic wave is 4. Locomotion performance is positively correlated with the amplitude of the receding peristaltic wave. As shown in Figure 10, the earthworm-like robot with the driven module of four actuated segments has better locomotion performance than an earthworm-like robot with three actuated segments as the driven module. Figure 11 shows the gait generation and locomotion for one U-DM with four actuated segments. The locomotion displacements of the 12-segment robot under MG-II are shown in Figure 11. For the case in Figure 11a, two segments overlap in the driven module. The frequency of the receding peristaltic wave is 1/6, and the amplitude of the receding peristaltic wave is 2. The earthworm-like robot stretches two segments every time it updates, generating a displacement of 2 \(\Delta l\). For the case in Figure 11b, when the number of transmission segments is three, it assumes that one segment overlaps. The frequency  
of the receding peristaltic wave is \(1/4\), and the amplitude of the receding peristaltic wave is \(3\). The earthworm-like robot stretches three segments every time it updates, generating a displacement of \(3\)\(\Delta l\). Therefore, the locomotion speed of the earthworm-like robot is positively correlated with the amplitude of the receding peristaltic wave. Figure 10: Locomotion simulations of a 12-segment earthworm-like robot based on U-DM under MG-I. The line located in the number is the locomotion tracks of the body segments. (**a**) The U-DM contains three actuated segments. (**b**) The U-DM consists of four actuated segments. Figure 9: Routine of locomotion simulation of the earthworm-like robot driven by ultra-low frequency excitation. Figure 12 shows the locomotion for B-DM under MG-I. For the two cases compared in Figure 12, the driven modules both consist of four segments. In Figure 12a, two segments are assumed to be broken, while in Figure 12b, only one segment is broken.