The Optimal Locomotion of a Self-Propelled Worm Actuated by Two Square Waves

Worm-like locomotion at small scales induced by propagating a series of extensive or contraction waves has exhibited enormous possibilities in reproducing artificial mobile soft robotics. However, the optimal relation between locomotion performance and some important parameters, such as the distance between two adjacent waves, wave width, and body length, is still not clear. To solve this problem, this paper studies the optimal problem of a worm’s motion induced by two peristalsis waves in a viscous medium. Inspired by a worm’s motion, we consider that its body consists of two segments which can perform the respective shape change. Next, a quasi-static model describing the worm-like locomotion is used to investigate the relationship between its average velocity over the period and these parameters. Through the analysis of the relationship among these parameters, we find that there exist four different cases which should be addressed. Correspondingly, the average velocity in each case can be approximately derived. After that, optimization is carried out on each case to maximize the average velocity according to the Kuhn–Tucker Conditions. As a result, the optimal conditions of all of the cases are obtained. Finally, numerical and experimental verifications are carried out to demonstrate the correctness of the obtained results.


Introduction
Micro-robots, especially worm-like soft robots at a small scale, due to their extensive potential applications in disaster rescue, military detection, pipeline cleaning, medical treatment, etc., have attracted the attention of many scholars. As an example of a micro-robot, a continuous worm-like robot with a one-centimeter diameter, which uses shape memory alloy and a hydrostatic fluid as return spring, is presented [1]. The movement of fluid induced by the sequential constriction of a hoop actuator leads to the generation of peristaltic waves. As a result, the motion of the whole body is naturally caused. However, the optimal design of some parameters, such as body length, wave width, and the distance between two adjacent waves, is still not clear. To this end, this paper deals with the optimal problem of worm-like locomotion driven by two square waves.
The research on these worm-like robots is inspired by the locomotion mechanism of some limbless animals, such as earthworms, snails, caterpillars, and amoeba. Based on the mechanism of the periodic shape change of their bodies, which is induced by the propagation of a series of peristalsis waves, these animals can move in various environments. Compared with other animals with legs or wheels, they are capable of both rapid and dexterous movements in confined complex spaces. In the forward moving process, animals such as snails [2], earthworms [3][4][5], slugs [6], and terrestrial planarians [7] can express multiple peristalsis waves which can be run simultaneously over the length of body. In fact, the number of waves is regarded as a main factor of motion pattern in peristaltic crawling [8,9]. It has been shown that the simultaneous propagation of multiple waves along a worm's body is possible. However, many researchers have mainly paid attention to the locomotion mechanism of one wave when a worm-like locomotion system was studied [10][11][12][13][14], and did not consider the case of multiple waves.
On the other hand, a trend in the development of a worm-like robot is to increase the number of waves. In fact, a number of waves along the body of a worm-like robot is also possible [1, 5,[15][16][17][18][19].
A new continuous robot with the exterior braided mesh made of brake cable sheathing was designed. A technique using this braided mesh to produce smooth waves of motion along the body was presented [5]. At the end of this robot there is a cam, the length of which can be adjusted to change the shape of waveform. Additionally, with this style of cam mechanism, any whole number of waves is feasible. Meanwhile, the simulated model revealed that the one-wave model has more slip loss than the two-wave one. This result showed that an increase in the number of waves can reduce the slip backwards. Besides this, a discrete model of a metameric earthworm-like robot has been developed to study the relationship among gait patterns, physical parameters, and dynamic behavior [15]. It is worth noting that the number of peristalsis waves corresponds to the number of driving modules, which are regarded as the locomotion gaits. These gaits can be adjusted to adapt to a changing environment. However, the relationship between worm-like locomotion induced by multiple waves and some important parameters, such as the distance between adjacent waves, wave width, and body length, has rarely been reported.
The average velocity is one of the most important indexes to evaluate the locomotion performance of a worm-like system. The maximum improvement of the average velocity has been an active subject of scientific research. The gait parameters [15] and the phase coordination [20] have been used to study the locomotion of worm-like robots, and the optimal relation of the parameters was obtained to maximize the average velocity. The result revealed that a driving module is the optimal drive mode when the best average progression is attained. In addition, the worm could achieve the maximum crawling velocity by adjusting its tension distribution, and at this time the corresponding wave form was found [21]. The result showed an advantage in the increase of the number of waves along the worm body that can reduce the maximum tension of the body when the worm moves on a rough or sticky surface. Meanwhile, it led to decreases in wave speed and average velocity. However, the interaction force of the aforementioned studies concerning the maximum average velocity is mainly dry friction. After a brief review of this literature, it can be seen that very few studies of the optimal locomotion on parameters such as the distance between adjacent waves and body length have been considered in a linear viscous environment. Therefore, this paper studies the optimal relation between average velocity and these parameters so that the locomotion performance of a self-propelled system can be improved.
In this paper, we consider that worm-like locomotion is simultaneously driven by two square waves with the same travel speed along its body and assume that the worm is able to freely control its shape. As a result, we introduce the case in which the worm consists of two segments, each of which can deform independently [22,23]. Based on the above statement, this paper first explores the correlation between the average velocity of worm-like locomotion over one period and some important parameters by using the quasi-static model. After that, we find the optimal conditions under which the maximum velocity of the locomotion is attained according to the Kuhn-Tucker (KT) Conditions.
The rest of the paper is organized as follows. In Section 2, the reduced dynamic model is introduced to study worm-like locomotion. The square strain waves are utilized to calculate the expressions of the relative velocity and the relative displacement in each interval, and the expressions of average velocities in different cases are calculated by using the reduced model in Section 3. In Section 4, optimization is carried out to obtain the optimal conditions that correspond to the maximum average velocities. Then, the verifications of the optimal conditions and discussion are performed in Section 5. Finally, conclusions are given in Section 6.

The Mathematical Description of Worm-Like Locomotion
This section is devoted to the description of the model under consideration. In the following, the dynamic model and its reduced model, called the quasi-static model, will be introduced. To establish the relationship between worm-like locomotion and parameters such as the friction coefficient, linear density, wave width, and body length of the worm, a dynamic model of the locomotion [24] has been developed. This model, which describes one-dimensional motion of a worm along a straight line, is denoted by the following form .. where Here, Z denotes the coordinate along the worm's body (shown in Figure 1); Z 1 = 0, Z 2 = L correspond to the rear end and the front end, respectively; L is the body length of the worm in the reference configuration; x 1 (t) is the coordinate of the left edge of the worm's body measured from a point fixed in the current configuration and denotes the position of the worm; h(Z, t) is the relative displacement of the point at position Z to the rear end x 1 (t) and describes the shape of the worm as freely controllable; and l(t) = h(L, t) is the whole length of the deformed body. Here, the prime and the dot represent the derivative of h(Z, t) with respect to the position Z and the time t, respectively. ρ 0 is the linear density of the worm's body; µ is the viscous coefficient of the linear friction. This viscous friction is employed in this paper and is given as the following form where v(h, t) is the absolute velocity of the locomotion. It is seen from Figure 1 that the motion of the worm induced by shape change is described by with h(0, t) = 0, and h (Z, t) > 0, which implies that the adjacent parts cannot pass through each other in the deformation. Mathematically, it can be written as where (Z, t) > −1, and it is the local strain at the time t and the position Z.
Up to now, as seen from Equation (1), the coefficients of the equation related only to (z, τ) are determined by a specific strain wave. In the paper, to further obtain the solution of Equation (1), we introduce square strain waves (SSW) as a special type of (z, τ), which is presented as where 1 (t) = 1 , 2 (t) = 2 ; i (i = 1, 2) is the amplitude of strain wave; and 2 = γ 1 (γ ≥ 0). L 1 is the length of the rear segment of the worm's body with the strain 1 . In fact, this type of segmented strain employed has been introduced [22,23].
To simplify Equation (1), the dimensionless variables are given as where L 0 is the wave width, c the wave speed, and x the interval distance between two waves.
Given Equation (7), Equation (1) can be reduced to the following form ..
Further, it is found that Equation (8) can be reduced to a quasi-static approximation for a large friction, a low linear density, a long body length or a small wave speed when the locomotion is driven by the sine-squared strain wave in [24]. Based on the same method, this result can be also obtained by using the drive mode of the square wave. Therefore, this analysis process is omitted but the numerical verification in Section 5 will be given. The reduced result is displayed as where l 1 (τ) = L(1 + 0 q 1 (τ)) and q 1 (τ) = 1 λ λ 0 (z, τ)dz. Equation (10) is called the quasi-static model, meaning that the inertia effect is ignored. To conveniently analyze the motion of a crawler, this reduced model presented in [12][13][14] is employed in this paper.
It follows from Equations (5) and (7) that the dimensionless relation h (z, τ) can be given by where (z, τ) indicate various strain waves to drive the motion of the worm, for example the sine-squared strain wave [24]. In the following section, we consider (z, τ) to be a square strain wave (SSW).
Micromachines 2017, 8, 364 4 of 17 where Further, it is found that Equation (8) can be reduced to a quasi-static approximation for a large friction, a low linear density, a long body length or a small wave speed when the locomotion is driven by the sine-squared strain wave in [24]. Based on the same method, this result can be also obtained by using the drive mode of the square wave. Therefore, this analysis process is omitted but the numerical verification in Section 5 will be given. The reduced result is displayed as where ( ) ( ) ( ) Equation (10) is called the quasi-static model, meaning that the inertia effect is ignored. To conveniently analyze the motion of a crawler, this reduced model presented in [12][13][14] is employed in this paper.
It follows from Equations (5) and (7) that the dimensionless relation ( , ) h z τ ′ can be given by where ( , ) z τ  indicate various strain waves to drive the motion of the worm, for example the sine-squared strain wave [24]. In the following section, we consider ( , ) to be a square strain wave (SSW).

Square Strain Waves (SSW)
The aim of this section is to investigate the relationship between the average velocity of worm-like locomotion and some parameters concerning the body length, the distance between two strain waves, and the strain amplitudes. To this end, we first consider the drive mode of worm-like locomotion.
In this section, the motion of a worm caused by the simultaneous propagation of two square strain waves with the same travelling speed is typically considered. It should be noted that these two waves may be different when they locate in different positions of the body. Here, square strain waves (SSW) are presented in a dimensionless form in terms of Equations (6) and (7), namely

Square Strain Waves (SSW)
The aim of this section is to investigate the relationship between the average velocity of worm-like locomotion and some parameters concerning the body length, the distance between two strain waves, and the strain amplitudes. To this end, we first consider the drive mode of worm-like locomotion.
In this section, the motion of a worm caused by the simultaneous propagation of two square strain waves with the same travelling speed is typically considered. It should be noted that these two waves may be different when they locate in different positions of the body. Here, square strain waves (SSW) are presented in a dimensionless form in terms of Equations (6) and (7), namely where 1 (τ) = 1 , 1 (τ) = 2 ; here z and τ denote the dimensionless position and the dimensionless time, respectively. Meanwhile, the wave width becomes 1, the body length is λ, the wave speed is c and the distance between two waves is κ. These two waves travel rightwards along the worm's body with the wave speed c and take λ to span the whole body. Because different situations in which these waves locate in different positions in motion will lead to different results, it is found that there are four cases (see Figure 2) which can be addressed in the same way.
here z and τ denote the dimensionless position and the dimensionless time, respectively. Meanwhile, the wave width becomes 1, the body length is λ , the wave speed is c and the distance between two waves is κ . These two waves travel rightwards along the worm's body with the wave speed c and take λ to span the whole body. Because different situations in which these waves locate in different positions in motion will lead to different results, it is found that there are four cases (see Figure 2) which can be addressed in the same way. Specifically, the first case is that the right wave travels still in the second segment of the worm's body with the strain 2  , while the second case corresponds to that only a certain part of the right wave is located in the second segment of the body when the left wave just passes through the first segment However, if the right wave lies outside this interval, this forms the fourth case. In addition, the constraint condition 2 λ κ ≥ + should be satisfied in all of the above cases because the body length is greater than the sum of the width of two waves and the distance between them. For brevity, only the first case is described in detail. The same process for the other three cases is omitted, but these results will be given. Specifically, the first case is that the right wave travels still in the second segment of the worm's body with the strain 2 , while the second case corresponds to that only a certain part of the right wave is located in the second segment of the body when the left wave just passes through the first segment [0, λ 1 ) at the dimensionless time τ = κ + 1. The third case is that the left wave just reaches the position z = λ 1 ; meanwhile, one part of the right wave has been out of the interval [λ 1 , λ) at τ = κ. However, if the right wave lies outside this interval, this forms the fourth case. In addition, the constraint condition λ ≥ κ + 2 should be satisfied in all of the above cases because the body length is greater than the sum of the width of two waves and the distance between them. For brevity, only the first case is described in detail. The same process for the other three cases is omitted, but these results will be given.
This case is illustrated in Figure 3. When the square wave travels along the interval [0, λ 1 ], the strain amplitude of shape change is ε 1 , while that of another segment is ε 2 . Six stages take place from the beginning to end in Figure 3. This case is illustrated in Figure 3. When the square wave travels along the interval 1 [0, ] λ , the strain amplitude of shape change is 1 ε , while that of another segment is 2 ε . Six stages take place from the beginning to end in Figure 3. According to the expression of ( , ) h z τ ′ in each interval, the corresponding expressions of ( , ) h z τ and ( , ) h τ z  are yielded. First, the time-dependent stretch along the worm's body is given as By integrating Equation (13) with respect to z, one has Then, the derivative of Equation (14) with respect to τ derives Using Equation (14), the actual length of the worm is represented as h(z, τ) are yielded. First, the time-dependent stretch along the worm's body is given as By integrating Equation (13) with respect to z, one has Then, the derivative of Equation (14) with respect to τ derives Using Equation (14), the actual length of the worm is represented as Here b 11 (z, τ) in Equation (13), h 1 (z, τ) in Equation (14), b 12 (z, τ) in Equation (15), and q 1 (τ) in Equation (16) are given in Appendix A due to those complex forms.
Using Equation (17), the velocity of the left end of the worm's body .
Then, the average velocity of motion over one period can be derived Based on the aforementioned method, the average velocities of the other three cases are obtained and are specifically displayed as follows.
From the Equations (18)- (21), it can be found that the average velocities obtained in the four cases are quadratic in 1 , which is convenient for the optimization in the next section.

Optimization
In the third section, we have calculated the average velocities of all the possible cases according to the approximate quasi-static model. This section will explore the optimal conditions corresponding to the maximum values of those average velocities under inequality constraints. As can be seen from Equations (18)- (21) and the constraints, the optimized problems in these cases have a uniform form. Therefore, they can be addressed using the same method. In fact, the Kuhn-Tucker (KT) Conditions are an effective method to solve these problems. Details about the KT conditions are omitted here and can be found in [25].
The first case is addressed as follows. The optimized process of this case will be given in detail. To avoid the complex and similar calculations, the similar processes of the other three cases are omitted and only the final results will be displayed.
Case I. For λ ∈ [2κ + 3, +∞] To make full use of the KT Conditions, Equation (18) is denoted as Then, the maximum value of v 1 (λ, κ, γ) is equivalent to solving the minimum value of the function f 1 (λ, κ, γ) under the constraint conditions. That is, where According to the KT Conditions and Equation (23), one has where ∇ is the gradient of the corresponding functions. µ i for i = 1, 2, 3 are the non-negative constants. Further, Equation (24) can be reduced to the following form where ( f 1 ) λ , ( f 1 ) k , and ( f 1 ) γ denote the derivatives of f 1 with respect to the variables λ, κ, and γ, respectively. Next, Equation (25) is specifically solved to derive the optimal values. Here, one has for γ ≥ 0, λ ≥ 2κ + 3, κ ≥ 0. It is obvious that the function f 1 (λ, κ, γ) is strictly monotone and decreases with respect to γ. Thus, any solution of the equation ( f 1 ) γ − µ 3 = 0 in Equation (25) does not exist. Therefore, it is found that the parameters λ and κ can be optimized. According to Equation (25), one obtains where g 1 (κ, γ) = 23 − 10γ − 4κ(1 + 4κ) + γ 2 (11 − 4κ(7 + 4κ)). It can be shown that the optimal body length and the optimal relation related to γ and κ are obtained when γ ∈ (0, 1), i.e., 1 > 2 . If γ = 1, i.e., 1 = 2 , implying that the whole body of the worm performs the same shape changes in locomotion, then the optimal condition is that the optimal body length is four times the wave width and the distance between two waves is less than half a wave width. However, if γ > 1, i.e., 1 < 2 , at this time the optimal condition is that the distance between two waves is zero and the body length should be greater than the sum of two times the distance between two waves and three times the wave width. Next, the optimized results of the other three cases are given as follows. The explanations of these results are similar to the ones of the first case and are omitted here. The specific illustration of these cases will be seen in the later discussion of this section.
The above results reveal that the optimal conditions corresponding to the maximum average velocities are different when the relation between γ and 1 is varied. Meanwhile, the optimized results are depicted in another form in Figure 4. . g γ κ κ γ κ κ γ κ − − + + − + = It can be shown that the optimal body length and the optimal relation related to γ and κ are obtained when (0,1) γ ∈ , i.e., 1 2 >   . If 1 γ = , i.e., 1 2 =   , implying that the whole body of the worm performs the same shape changes in locomotion, then the optimal condition is that the optimal body length is four times the wave width and the distance between two waves is less than half a wave width. However, if 1 γ > , i.e., 1 2 <   , at this time the optimal condition is that the distance between two waves is zero and the body length should be greater than the sum of two times the distance between two waves and three times the wave width.
Next, the optimized results of the other three cases are given as follows. The explanations of these results are similar to the ones of the first case and are omitted here. The specific illustration of these cases will be seen in the later discussion of this section. Case II. For [    Next, more comprehensive explanations of these results are given. As can be seen from Figure 4, the optimal conditions for the best average progression have been obtained. To deepen the understanding of the above results, the further discussion is made from the viewpoint of the relationship between λ 1 and λ 2 , where λ 2 = λ − λ 1 . In fact, these two parameters are equivalent to the length of two body segments of the worm.
When λ 1 < λ 2 . The relation g 1 (κ, γ) = 0, λ = 2κ + 3 for 0 < γ ≤ 1 in case I and the same one for γ > 1 in case II are denoted by the blue line in Figure 4. It reveals that the distance between two waves is inversely proportional to the ratio of body length to wave width such that the maximum average velocity increases as the distance between two waves decreases along this line. In addition, the other relation κ = 0, λ > 2κ + 3 for γ > 1 in case I is also in this situation, which is denoted by the purple line in Figure 4. At this time, the optimal distance between two waves is zero when the maximum average velocity is achieved.
When λ 1 = λ 2 . The relation κ = 1, λ = 4 for 0 < γ < 1 in case II and the same one for 1 < γ < 3 in case case III are denoted by the horizontal red line in Figure 4. It means that the optimal distance between two waves is one wave width when the body length is four times the wave width. In addition, the optimal body length is also four times the wave width when γ = 1, which is depicted by the red vertical line in Figure 4. However, there is no restriction on the distance between two waves because their maximum average velocities are actually equal. In other words, the number of waves does not affect the worm's motion at this point.
When λ 1 > λ 2 . The relation g 3 (κ, γ) = 0, λ = 2κ + 1 for 0 < γ < 0.25 in case III and the one g 41 (κ, γ) = 0, λ = κ + 2 for 0 < γ < 1 in case IV are denoted by the black line and the green line in Figure 4, respectively. It is found that an increase in the distance between two waves leads to a decrease in the maximum average velocity along these two lines. However, the relation for 0.25 ≤ γ ≤ 1 in case III and the same one for γ ≥ 1 in case IV illustrate the opposite result that the distance between two waves is proportional to the maximum average velocity along the black line in Figure 4. Furthermore, it is clearly seen that the optimized result of each case corresponding to the space curve is depicted in Figure 5, which locates in the respective surface obtained by optimizing the average moving velocities v i (λ, κ, γ) for i = 1, 2, 3, 4 under various constraint conditions with respect to λ. Next, more comprehensive explanations of these results are given. As can be seen from Figure  4, the optimal conditions for the best average progression have been obtained. To deepen the understanding of the above results, the further discussion is made from the viewpoint of the relationship between 1  Figure 4. It reveals that the distance between two waves is inversely proportional to the ratio of body length to wave width such that the maximum average velocity increases as the distance between two waves decreases along this line. In addition, the other relation 2 3 0, + = > λ κ κ for 1 γ > in case I is also in this situation, which is denoted by the purple line in Figure 4. At this time, the optimal distance between two waves is zero when the maximum average velocity is achieved. in case case III are denoted by the horizontal red line in Figure 4. It means that the optimal distance between two waves is one wave width when the body length is four times the wave width. In addition, the optimal body length is also four times the wave width when 1 γ = , which is depicted by the red vertical line in Figure 4. However, there is no restriction on the distance between two waves because their maximum average velocities are actually equal. In other words, the number of waves does not affect the worm's motion at this point.  Figure 4, respectively. It is found that an increase in the distance between two waves leads to a decrease in the maximum average velocity along these two lines. However, the relation for 0.25 1 γ ≤ ≤ in case III and the same one for 1 γ ≥ in case IV illustrate the opposite result that the distance between two waves is proportional to the maximum average velocity along the black line in Figure 4. Furthermore, it is clearly seen that the optimized result of each case corresponding to the space curve is depicted in Figure 5, which locates in the respective surface obtained by optimizing the average moving velocities ( , , )

Verification and Discussion
The optimal relations among various parameters in the preceding section have been obtained through the method of KT Conditions. Thereafter, this section will verify the correctness of these results and the reasonableness of the employed model from two perspectives, one is a numerical method, the other is based on former experimental results which have been attained by operating an earthworm-like robot [26].
To carry out the numerical verification, some parameters of worm-like locomotion are chosen as γ = 0.5, 1, 1.5, 1 = −0.1, 0.1, and α = 1, 2, 5, 10. Using this verification method and these parameter values, we find that the results on the verified problems of all of the cases are basically similar. Hence, in order to avoid unnecessary repetition, we only consider the verified problems of Case I. Next, the detail explanations on different results in Figure 6 are given. The approximately analytical predictions, which are denoted by dotted dashed lines, are obtained by optimizing the average velocity Equation (18) regarding λ under the given values of γ and 1 . Meanwhile, the optimal relation λ = λ(κ, γ) corresponding to the maximum average velocity is derived. Based on this relation and the above-mentioned values γ, 1 , and α, the numerical results denoted by dashed lines and solid lines are depicted through the method of simulating the quasi-static equation and the dynamic equation, respectively. A comparison of these three results is done to illustrate the correctness of the theory optimization and the reasonableness of the quasi-static model. More specifically, Figure 6 reveals that the approximate analytical predictions agree well with the numerical results, and the positions of the maximum average velocities are almost the same. It means that the optimized results obtained in Section 4 are correct from this perspective. Additionally, as can be seen from the figure, the average velocities denoted by the solid lines tend to those denoted by the dashed lines when α is increased from 1 to 10, which implies that the dynamic model can be reduced to the quasi-static model for a large friction and a long body length but with a low line density or a small speed. From another perspective, it is found in [26] that there exist experimental results which can indirectly illustrate one of the optimized results. Based on the analysis of the optimized results of all of the cases, we find that the maximum average velocity is constant when γ = 1, λ = 4, and κ ∈ [0, 2], which means that the distance between two waves does not affect the worm's motion when keeping the strain waves along the worm's body unchanged. At this time, two waves can be considered as one wave, and the optimal wave width is half the body length. It is interesting that the existing experiment can reflect this result as well. Inspired by earthworms' muscular structure and their locomotion mechanism, Fang et al. firstly developed the general N-segment model of an earthworm-like robot with K driving modules in [26]. Here, the authors considered that the strain waves for driving the worm forward were approximately treated as driving modules, each of which was made up of n A anchoring segments, n R relaxing segments, and n R contracting segments. In fact, their actually deformed segments are n R and n A , implying that the ratio of the body length of a robot to the total deformed length of all the driving modules can be denoted by λ = N/(k(n A + n R )). A group of parameters (K, n A , n R ) was considered as one locomotion gait. The result on the gait optimization corresponding to the maximum average velocity was that: k = 1, n A = 1, n R = [N/2] − 1. Then, the sum of n R and n A is [N/2], which means that the optimally deformed length of a driving module is half the body length of the robot. This result is in agreement with the optimal result that the width of two waves is half the length of the worm when r = 1. After that, the experimental verification on the optimized results was carried out by designing and operating an eight-segment earthworm-like robot in a horizontal pipe. All of the admissible gaits for this robot were given and employed. The average velocity v corresponding to each gait was obtained from a theoretical prediction and an experimental measurement. To clearly illustrate the correctness of the optimal result from the viewpoint of the relationship between v and λ, the values of λ corresponding to some representative gaits are selected on the basis of different driving modules K(see Figure 15b-e in [26]). When K = 1, we can derive the value λ = λ 1i from the corresponding gait (n A , n R ) 1i for i = 1, 2, . . . , 6, where λ 11 = 8 7 , λ 12 = 4 3 , λ 13 = 8 5 , λ 14 = 2, λ 15 = 8 3 , and λ 16 = 4 and (n A , n R ) 11 = (6, 1), (n A , n R ) 12 = (4, 2), (n A , n R ) 13 = (2, 3), (n A , n R ) 14 = (1, 3), (n A , n R ) 15 = (1, 2) and (n A , n R ) 16 = (1, 1). When K = 2, similar to two strain waves, the value λ = λ 2j corresponding to the gait (n A , n R ) 2j for j = 1, 2 is also solved, where λ 21 = 2 and λ 22 = 4 3 and (n A , n R ) 21 = (1, 1) and (n A , n R ) 22 = (1, 2). Based on the above statement, both the theoretical and experimental values of the average velocity corresponding to each λ kl for k = 1, l = 1, 2, . . . , 6 and k = 2, l = 1, 2 are depicted in Figure 7. As can be seen from this figure, the maximum average velocities are realized when λ = 2, which means that the robot can achieve its optimal locomotion performance when the actually deformed length of the driving modules is half that of the earthworm-like robot. To some extent, this result indirectly illustrates that the optimal relations obtained in the preceding section are reasonable. However, this work is still required to be comprehensively verified by designing a continuous worm-like robot from the qualitative and quantitative aspects in the future because here the experimental verification is only based on an approximate earthworm-like robot prototype with relatively few segments. In the other hand, this result can be also verified from the viewpoint of the actual locomotion of the worm [3]. Specifically, it was experimentally observed that the width of a wave of circular contraction is half the body length when the worm moves forward.
The above statement has shown the reasonableness of the optimized results. Therefore, these results are used to discuss the effect of both two waves and one wave on locomotion. Here, one wave is the case that the distance between two waves is zero. As can be seen from Figure 6(a 3 , b 3 ), one wave is the optimal drive mode by comparison with two waves. Then, in Figure 6(a 2 , b 2 ), the distance between two waves does not change the value of the maximum average velocity when keeping the body length unchanged. This result shows that the number of waves does not affect the best forward progression of the worm when the motion is induced by square waves. However, it can be seen from Figure 6(a 1 , b 1 ) that there exists an optimal distance between two waves such that the moving velocity of the worm is improved. For example, in Figure 6(a 1 ), the value of the average velocity at κ = 0.78, λ = 4.56, γ = 0.5, and 1 = −0.1 is derived, which corresponds to the motion generated by two waves. Similarly, the value of the average velocity at κ = 0, λ = 4.56, γ = 0.5, and 1 = −0.1 is also calculated, which is the case of one wave. Through a comparison of these two values, the percentage of the improved velocity is 33.24% when the worm's motion is driven by two waves. The above discussion reveals that the number of waves can affect the locomotion of a worm-like system when the deformation of the worm's body in locomotion is varied.  Figure 7. As can be seen from this figure, the maximum average velocities are realized when 2 λ = , which means that the robot can achieve its optimal locomotion performance when the actually deformed length of the driving modules is half that of the earthworm-like robot. To some extent, this result indirectly illustrates that the optimal relations obtained in the preceding section are reasonable. However, this work is still required to be comprehensively verified by designing a continuous worm-like robot from the qualitative and quantitative aspects in the future because here the experimental verification is only based on an approximate earthworm-like robot prototype with relatively few segments. In the other hand, this result can be also verified from the viewpoint of the actual locomotion of the worm [3]. Specifically, it was experimentally observed that the width of a wave of circular contraction is half the body length when the worm moves forward.
The above statement has shown the reasonableness of the optimized results. Therefore, these results are used to discuss the effect of both two waves and one wave on locomotion. Here, one wave is the case that the distance between two waves is zero. As can be seen from Figure 6  wave is the optimal drive mode by comparison with two waves. Then, in Figure 6  is also calculated, which is the case of one wave. Through a comparison of these two values, the percentage of the improved velocity is 33.24% when the worm's motion is driven by two waves. The above discussion reveals that the number of waves can affect the locomotion of a worm-like system when the deformation of the worm's body in locomotion is varied.

Conclusions
This paper studies the optimization problem of worm-like locomotion induced by two square waves in a linear resistance medium. The relationship between the average velocity and parameters such as the distance between two waves, body length, and wave width is determined by using the reduced dynamic model. Through the optimization of these average locomotion velocities in various situations, the optimal conditions for the fastest average progression are obtained. In the optimal

Conclusions
This paper studies the optimization problem of worm-like locomotion induced by two square waves in a linear resistance medium. The relationship between the average velocity and parameters such as the distance between two waves, body length, and wave width is determined by using the reduced dynamic model. Through the optimization of these average locomotion velocities in various situations, the optimal conditions for the fastest average progression are obtained. In the optimal

Conclusions
This paper studies the optimization problem of worm-like locomotion induced by two square waves in a linear resistance medium. The relationship between the average velocity and parameters such as the distance between two waves, body length, and wave width is determined by using the reduced dynamic model. Through the optimization of these average locomotion velocities in various situations, the optimal conditions for the fastest average progression are obtained. In the optimal locomotion, there is a noticed case that the whole worm's body performs the same deformation. At this time, the optimal body length is four times the wave width but the distance between two waves does not affect the locomotion of the worm-like system. The other similar case is that the optimal body length is also four times the wave width, and the optimal distance between two waves is one wave width when the deformation of two segments are different and the length of these two segments is equal. Two specific cases reveal that the effect of the distance between two adjacent waves on locomotion is related to the shape change of a worm's body and the optimal width of two waves is half the body length. In addition, the results of a numerical simulation and the existing experimental ones from an earthworm-like robot prototype demonstrate the reasonableness of the optimal conditions. Meanwhile, the effect of both two waves and one wave on locomotion is discussed. The results show that the number of waves affects the moving velocity when the shape change of a worm's body is varied in locomotion. Finally, we hope that these results aid in the deeper understanding of worm-locomotion driven by propagating contractive or extensive waves and provide theoretical support for the design of worm-like soft robots at small scales. Author Contributions: Ziwang Jiang conceived the problem and wrote the paper. Jian Xu provided critical advises on the paper and improved the manuscript for final submission.