Modeling and Analysis of a Modular Multilegged Robot with Improved Fault Tolerance and Environmental Adaptability

Multilegged robots can adapt to complex terrains, an ability that is highly important for their research and development. To improve the adaptability and fault tolerance of such robots, the modular design concept is applied by an increase in the number of modules. A modular multilegged robot contains a trunk with six modular leg structures that can be removed at will. The interface design of the trunk and legs can achieve good tightness and high strength, thereby ensuring quick disassembly and that the trunk and legs will not fall off while the robot walks. On this basis, the gait of a robot with different numbers of modular legs is designed. Then, kinematic and dynamic models of the robots with different gaits are established, and the motion performance, which provides reference for motion control and motor selection, is analyzed. Experiments show that the robot with different numbers of legs has good motion performance. This study serves as a useful reference for the design of modular multilegged robots.


Introduction
With the deepening of human exploration of nature, the demand for robots' mobility has increased, requiring them to move autonomously in complex terrain environments.Multilegged robots have better motion ability than traditional wheeled and tracked robots in rugged terrain.At the same time, with the development of neuroscience and biomechanics, scientists urgently need suitable physical media and scientific tools similar to natural biology for testing and verifying their ideas and theories [1][2][3][4][5].
A six-legged robot is a typical multilegged robot, and it has been studied in detail by many researchers.For example, the DLR-Crawler, a small hexapod robot developed by the German Aerospace Center, is mainly used for outer space exploration.The robot is equipped with multifinger dexterous hands (DLR-Hand II) developed by the German Aerospace Center as a basic leg unit.Therefore, the leg kinematics is similar to that of the fingers; that is, it has four degrees of freedom (DOF).The DLR-Crawler is equipped with various sensors, including a six-dimensional force sensor, a joint torque sensor, a potentiometer, a gyroscope, and an accelerometer, which detect the robot's own state in real time [6][7][8].DLR-Crawler has mature structure and motion control system and is very representative in six-legged robots.The Lauron series hexapod robot, developed by the Karlsruhe University in Germany, has been updated to the fifth generation, and its mechanical structure and electrical system are becoming increasingly powerful and mature.Lauron series hexapod robots have increased their legs from three to four DOF since the fourth generation, further increasing their workspace and flexibility and improving their walking and climbing abilities.In terms of control system, Lauron V also adopts a hierarchical control structure and integrates attitude control strategy and leg reflection strategy to cope with a rugged terrain [9][10][11].Serial research has made Karlsruhe University accumulate a lot of experience in the development of sixlegged robots.The technology of the six-legged robots is becoming more and more mature, and the performance of the robots has been steadily improved.In addition, the sixlegged robot Messor (designed by the Poznan University of Technology) [12,13], NOROS-II (designed by Politecnico di Milano and Beihang University) [14,15], and TUM (designed by the University of Munich) [16,17] are typical six-legged robots with good motion performance.
In terms of leg configuration, the multi-DOF series is a commonly adopted mechanism due to its close similarity to the biological leg structure.For example, the leg of robot HyQ has four DOF.The hip joint has two DOF, which can achieve abduction/adduction and flexion/extension, and the knee joint has one DOF.Moreover, an additional DOF is appended between the lower leg and the robot foot to create a passive prismatic joint [18].To make the multilegged robot easy to control and highly stiff in structure, a one-DOF mechanism is applied to the leg design.For example, Ma et al. [19] applied the one-DOF, four-bar mechanism to the leg design of a multilegged robot, reducing control difficulty and improving movement stability.In addition, parallel [20,21], hybrid leg [22], and flexible [23][24][25] mechanisms are also applied to the leg design of the robot.
The above multilegged robots have good environmental adaptability.However, when the local structure of the robot is damaged, the robot loses its motion ability [26].Therefore, the fault tolerance of multilegged robots cannot be ignored [27].The tolerance and motion ability of robots can be improved via modularization.Modular robots are able to deliberately change their own shape by rearranging the connectivity of their parts in order to adapt to new circumstances, perform new tasks, or recover from damage.Over the last two decades, the field of modular robotics has advanced from proof-of-concept systems to elaborate physical implementations and simulations [28][29][30].An example is Melecubes, a modular robot proposed by Lipson et al. [31,32] of Cornell University in the United States in 2003.The module is a cube structure consisting of two bevels with one DOF and six connection surfaces.The motion of the module is based on the relative motion of the two ramps, and the magnetic connection mechanism is adopted.Melecubes has perfect functions and is very representative in the early modular robots.EDHMoR is a modular robot developed by Faina et al. [28].This modular robot consists of different functional modules, such as rotary hinge, and telescopic modules.Different types of modules have standard connection mechanisms and electrical interfaces that can be connected to each other to form robots with different configurations.This research's results make the motion form of modular robots richer and more adaptable to the environment.In 2015, Cully et al. [33] introduced an intelligent trial-and-error algorithm that allowed robots to adapt to damage in less than two minutes in large search spaces without requiring self-diagnosis or prespecified contingency plans, and experiments reveal successful adaptations for a legged robot injured in five different ways, including damaged, broken, and missing legs, and for a robotic arm with joints broken in 14 different ways.This research's results enables modular robots to have self-learning ability and self-adaptation to the environment.It has reference significance for the follow-up research of related robots.
Although the above research has been carried out on multilegged and modular robots, studies on the application of modularity to multilegged robots are few.The fault tolerance of multilegged robots still needs further improvement.In addition, means of performing gait design and performance analysis on modular multilegged robots is a problem to be solved.In this study, the inspiration of robot design comes from literature [34], and the one-DOF four-bar mechanism is used as the leg mechanism.Then, the kinematics and dynamics of this robot are analyzed in detail.Experimental results show that the robot with different numbers of modular legs has good motion performance.This finding also provides a basis for the fault tolerance research of multilegged robots.

Structural Design
The structure of the modular multilegged robot designed in this study comprises two parts: a trunk structure and six modular leg structures.
(1) Leg structure.The leg of most creatures consists of three main parts: thigh (femur), calf (tibia), and foot (tarsus), which comprise a typical multi-DOF series mechanism.To make the robot simple in structure, convenient to control, and have strong bearing capacity, the design idea of combining a four-bar mechanism with the rotating joint, whose axis is perpendicular to the trunk, is adopted.The three-dimensional structure of the leg is shown in Figure 1.Rotating joint 5 is mainly used to achieve the back and forth swing of the leg; the four-bar mechanism is mainly used to achieve the movement of the leg in one plane; and joint 4 is the active joint.At this time, the leg has two DOF, and the two joints are driven by the steering gears.Taking link 2 (parallel to the ground) as the reference, the movement range of the legs up and down is [−40 ∘ , 60 ∘ ].The swing range of the rotation joint is [−60 ∘ , 60 ∘ ].
To improve the impact resistance of the module leg structure, an O-shaped structure with rubber sleeves is designed, which helps reduce the impact load of the robot when colliding with the ground.Furthermore, the rubber sleeve is installed at the end of the leg to increase the friction between the leg and the ground and prevent slippage during movement.
(2) Trunk structure.The trunk structure of the modular multilegged robot is shown in Figure 2. It is an equilateral hexagon with a length of 40 mm.The connection positions between the trunk and the legs are evenly distributed on the six adjacent surfaces of the hexagon, so that the six legs can bear the load evenly.A supporting frame similar to a triangle is found at the bottom of each robot frame.The supporting frame is fixed on the trunk, and the contact surface with the ground is very smooth.In addition, it plays a role in positioning; the fuselage maintains a horizontal position, thereby positioning the six module legs horizontally.
The three-dimensional structure of the modular multilegged robot is shown in Figure 3.By selecting different numbers of leg structures, the robot can form different configurations to accomplish different tasks.When all the module legs are installed on the trunk, the robot becomes six-legged.In particular, the distribution of the leg modules should be in accordance with the characteristics of the creature.For example, if the three module legs are installed adjacent to each other, the robot cannot achieve good motion performance.

Gait Analysis of the Robot
The gait of the robot must be analyzed due to the difference in the number of legs of the modular robot.Taking the robot with one, two, and six modular legs as examples, the gait of the modular robot with different legs is shown in Figure 4.
(1) Gait of modular multilegged robot with one leg.When the robot has only one leg, it moves forward through the left and right swing of the leg, which can be seen in Figure 4(a).First, in the initial state, steering gear 2-1 (Figure 1) drives the leg to swing to the right, thereby making it offset by a small angle and thus ensuring that the motion trajectory of the robot is as straight as possible.Second, steering gear 1-1 (Figure 1) drives the leg to move so that the trunk is lifted, and steering gear 2 drives the leg to swing to the right to make the robot move forward.Finally, the above steps are repeated with the leg moving in opposite directions to complete a cycle of gait movement.
(2) Gait of modular robot with two legs.When the robot has two legs, the two legs are installed adjacent to each other, and the trajectory of the robot is the direction of its symmetry axis, which can be seen in Figure 4(b).First, with the cooperation of two steering gears on each leg, the two legs swing to the left and right, respectively, by the same angle, and the robot is ready to crawl.Then, the trunk is lifted under the action of steering gears 1-1 and 1-2.Second, the left leg swings counterclockwise under the action of steering gear 2-1, and the right leg swings clockwise under the drive of the gear 2-2.At this time, the robot moves forward.Finally, two legs return to the initial state and complete a gait cycle.
(5) Gait of modular robot with six legs.When the robot starts to move forward, the six modular legs are divided into two groups.The right foreleg, the right hind leg, and the left middle leg comprise group A, and the left foreleg, the left hind leg, and the right middle leg form group B. The robot crawls forward through the alternating movement of groups A and B. The gait of the robot with six legs can be seen in Figure 4(c).
The corresponding gait descriptions are shown in Table 1.In addition, the robot can move forward with four or five modular legs, and gait can be divided into two categories: alternating motion of a single modular leg or alternating movements of different groups with no less than two modular legs.Robot with one leg  First, the forward kinematics is analyzed; that is, the motor motion is identified for solving the motion rule of the leg.For a four-bar leg, the vector equation in coordinate system o-xyz can be shown as

Motion Performance Analysis
Equation ( 1) is projected onto the x-, y-, and z-axes, and the coordinates of M in the coordinate system o-xyz can be obtained as One leg

Get ready
Leg swings to the right (small angle).

Trunk is lifted.
Trunk moves forward.
Leg swings to the left (small angle).

Trunk is lifted.
Leg swings to the left (large angle); trunk moves forward.

Get ready
Legs 1 and 2 swing outwards (small angle).
Trunk is lifted.
Trunk moves forward.

Six legs
Get ready Legs 1, 3, and 5 are lifted.
Trunk moves forward.

Trunk
Swing axis where l 1 is the length of DM, l 4 is the length of AD, l 7 is the length of O 1 A, and l 8 is the length of OA.  1 is the angle between link AD and the y-axis,  2 is the angle by which the robot swings around the vertical axis, and  4 is the angle between link DC and the y-axis.In particular,  1 and  4 have coupling relations.In quadrilateral ABCD, the vector equation can be written as With projection of (3) onto the x A -and y A -axes, (3) can be written as where l 2 is the length of the link DC, l 5 is the length of the link BC, and l 6 is the length of the link AB.  3 is the angle between the link BC and the y A -axis.Equation ( 4) can then be reduced to where Then,  4 can be represented by  1 .
The coordinates of point M can be obtained according to (2) and (7), which are functions of  1 and  2 , respectively.The change rules of  1 and  2 directly determine the tip trajectory of the leg and thus the obstacle-crossing performance of the robot.Suppose that AB=15 mm, AD=50 mm, BC=40 mm, CD=13 mm, and CM=59.2 mm.When the leg swings forward and the variation law of  1 and  2 conforms to the primary (function-1), quadratic (function-2), cubic (function-3), and sine (function-4) functions, respectively (Figure 6(a)), the tip  trajectories of the leg can be seen in Figure 6(b).Figure 6 reveals that the difference of input law of active joints will cause great difference in tip trajectory.When the input law conforms to the first-order function, the tip trajectory of the leg has a cusp.At this time, although motor control is relatively simple, leg motion does not meet the requirement of smoothness.Therefore, the input law of active joints should be properly selected.According to the above analysis, inverse kinematic analysis is also needed, that is, setting the tip trajectory according to the environment and solving the change laws of the driving joints.Only two of the three coordinates of point M are linearly independent, because the leg mechanism has two DOF.Therefore, suppose that the coordinates of point M in a fixed coordinate system can be expressed as According to (1), ( 2), ( 3), ( 4), (5), and ( 7), the kinematic equation can be further expressed as The change of  1 and  2 can be obtained by (9).According to the characteristics of the terrain (size of obstacles), considering that parabolic foot trajectory has the characteristics of variable height, starting angle, and landing angle, when the terrain is relatively flat (Δh < T, T is the threshold), a parabolic tip trajectory can be used for improved moving velocity.Suppose that the expression of tip trajectory is The tip trajectory can be seen in Figure 7, and the change law of  1 and  2 can be seen in Figure 8.The change laws of  1 and  2 are smooth curves, and this condition is consistent with the above analysis results.This finding provides a reference for robot joint control.Based on the kinematic analysis of the leg in the swing phase, the kinematic analysis for the robot with different gaits is performed.
(a) Kinematic analysis of the robot with one modular leg.The motion process of the robot with one leg is shown in Figure 9.The coordinate origin of the system is coincided with point M. O 1 means the vertical axis.First, the end of the leg M (1) moves around O1 (1) to M (2) under the action of the actuator.Then, the center of mass O1 (1) moves around M (2) to O1 (2) to realize the first forward movement of the robot.Second, the end of leg M (2) moves around O1 (2) to M (3) under the action of the actuator, and then the center of mass O1 (2) moves around M (3) to O1 (3) , and the center of mass moves forward again.The above is a motion cycle.The robot repeats the movement of the above rules to achieve the forward movement of the robot with one leg.The coordinates of point O1 (1) in coordinate system O'-xy are expressed as where L is the length of O 1 M.The coordinates of point O1 (2)  in coordinate system O'-xy are expressed as where  1 and  2 can be seen in Figure 9.The walking gait of the robot with one leg is periodic; thus, O (k) 1 (k > 0, and k is an integer) is in the coordinate system O'-xy, which can be expressed as ( > 0, and  is an odd number.); ( > 0, and  is an even number.) Suppose that the length of L is 93.53 mm, and  1 =45 ∘ .When  2 =50 ∘ or  2 =90 ∘ , the trajectory of the trunk of the robot can be obtained according to ( 13)- (14), which are shown in Figure 10.When the robot has only one modular leg, its trajectory cannot be a straight line.It can only make the trunk move as straight as possible by changing the movement law of the leg.The smaller  2 , the smaller the step size of the robot (the step sizes are 0.0605 and 0.1787 m with  2 =50 ∘ and  2 =90 ∘ , resp.), which means that the robot's motion efficiency is low.However, the trajectory of the robot is close to the straight line (the deviations from the straight line are 0.0365 and 0.0488 m with  2 =50 ∘ and  2 =90 ∘ , resp.).
(b) Kinematic analysis of the robot with two modular legs.A motion schematic of the robot with two modular legs is shown in Figure 11.In the moving process, the coordinate of the center of mass in the fixed coordinate system o-xyz can be shown as where  11 is the rotation angle of steering engine 1-1, and  21 is the rotation angle of steering engine 2-1.l is the height from the center of mass to the ground in the initial state, and it can be written as The coordinates of the center of mass of link 1 can be expressed as where k=1,2 represents the parameters of the right and left legs, respectively.The coordinates of the center of mass of link 2 can be expressed as The coordinates of the center of mass of link 3 can be expressed as Equation ( 16) reveals that when the robot has two modular legs that are installed adjacent to each other, it can move along a straight line in the x-y plane.However, its trajectory is not a straight line in the xz plane but an arc.In the determination of the length of each link, the movement amplitude of the trunk along the z-axis is related to the variation of  1 and  2 .The trajectory of the trunk in three cases when the length of each link of the leg is the same as the example shown in Figure 6 is shown in Figure 12.When the starting and ending angles are equal for  1 and  2 , different expressions of  1 and  2 result in a trajectory with a large difference.In case 2, which is shown in Figure 12, the trunk trajectory is gradual, whereas that in case 3 has a sharp point, and the motion stability is relatively poor.In addition, the distance of trunk movement along the x-direction and the amplitude of trunk movement along the z-direction can be changed by modification of the initial and end values of  1  and  2 in a cycle.To reduce the fluctuation of the trunk, the range of motion of  1 and  2 can be appropriately reduced, but this will decrease the motion velocity.When more than two modular legs are installed on the trunk, the same kinematic analysis method can be used.

Dynamic Analysis.
For obtaining the driving torque of joints under different gaits, dynamic analysis is conducted.Suppose that the center of mass of each link of a four-bar leg is located in the geometric center, and the trunk is regarded as the frame.The dynamic characteristics of the swing and supporting phases are analyzed separately.
(1) Swing phase of the modular leg.According to kinematic analysis, the position coordinates of each link can be expressed as where where x i (i=1-3), y i (i=1-3), and z i (i=1-3) are the position projection of the center of mass of the i-th link in the x-, y-, and z-directions, respectively.Then, the velocity of each link can be obtained by deriving (19). where where v ix (i=1-3), v iy (i=1-3), and v iz (i=1-3) are the velocities of the i-th link along the x-, y-, and z-directions, respectively.Equation ( 4) shows that the coupling relationship between  3 and  1 can be expressed as Meanwhile, the total potential energy of the system can be expressed as The total kinetic energy of the system can be expressed as where  i (i=1-3) is the angle between the i-th link and the yaxis direction and J oi (i=1-3) is the moment of inertia of the i-th link.Equation ( 24) can also be written as Therefore, kinetic and potential energy are functions of  1 and  2 and θ 1 and θ 2 .Then, the Lagrangian dynamic equation can be written as The expression of the two driving torques of the robot is Therefore, two driving torques can be obtained.The changes of the driving torques of steering gear-1 and steering gear-2 when the changes of  1 and  2 with time are in accordance with the cubic curve (Figure 6) are shown in Figure 13.The maximum driving torque of steering gear-1 is approximately 0.01 Nm, and the maximum driving torque of steering gear-2 is about 0.06 Nm.For the robot with more than one leg mounted on the trunk, the dynamics modeling method is the same.
(2) Supporting phase of the modular leg.In the supporting phase, the modular leg is in contact with the ground, and the trunk moves forward through the actuation of the steering gears.Take the robot with two legs as an example.According to (15), the velocity of the trunk can be expressed as According to ( 16)-( 18), the velocity of each link can be expressed as The total kinetic energy of the system is The total potential energy of the system is Therefore, the driving torques of the robot in the supporting phase can be further obtained by the Lagrangian dynamic equation.In particular, when the robot moves forward in biped mode, it involves the allocation of driving torque.Suppose that the angles of the active joints change with time as a quadratic function.The change of the steering gear torque when the trunk mass is considered the load on both legs evenly is shown in Figure 14(a).Furthermore, the change of the steering gear torque when the trunk is regarded as a load on one leg and the other leg as a constraint on motion is shown in Figure 14(b).In practical control, driving torque can be allocated according to the actual situation, including terrain environment and motor state.Moreover, as shown in Figures 13 and 14, the driving torques of the steering engines in the supporting phase are much greater than that of the robot in the swing phase.Therefore, the driving torque of the robot in the supporting phase should be taken as a reference for the selection of steering gears.
The above analysis reveals that the length of the fourbar leg directly affects the motion performance of the robot, and the determination of its length should make the leg meet the following requirements.(a) The tip of the leg should be able to swing up and down with a large swing range.This ensures good flexibility in the legs.(b) Robots should have good motion stability, which requires that the length of link AD (BC) should not be too small to ensure a large stable region.(c) The joint force of the robot should be small, which makes the length of link AD (BC) not as long as possible.Taking link AD as an example, when the length of AD decreases, the motion range of the leg is limited, and the obstacle performance is not good.At the same time, it is not conducive to the stability of the robot, but joint strength may decrease.On the contrary, when the AD is too long, the driving force and joint forces required are too large, the energy consumption is greatly increased, but stability and obstacle surmounting are improved.Therefore, the length of each link should be determined by optimization method.For simplicity, the multiobjective optimization problem is transformed into a single objective optimization problem.The optimization objective function can be expressed as where m(F i ) is the mean value of the joint force; m(M) is the mean value of drive force; and H is the movement amplitude of tip of the leg along the vertical direction. max is the furthest distance from the end of the leg to the trunk, S 0 is the reference value, and  is the ratio coefficient.In calculation,  n =1/(i+2).Equation (34) shows that, by ensuring that the stable region of the motion robot is not less than the set value, the smaller the driving force and joint force and the higher the motion height of the tip of the leg, the better the motion performance of the robot.The search process is as follows: first, the value is taken sequentially in range of variables; second, the objective function is calculated.By cycling and comparing, a set of lengths of links satisfying stability constraint condition and minimizing the objective function are the desired results.Through the above method, the length of the four-bar leg and the motion ranges of the driving joints are finally determined.Suppose that S 0 =50 mm.

Magnetic Force Analysis.
The leg structure and trunk should be easily disassembled, because the modular design method is used.Therefore, magnet is used.Compared with the traditional connection method, such as bolt connection, the magnet fixing method is easier to disassemble, which is convenient for the assembly of modular six-legged robots.However, unlike the traditional connection method, the magnet suction mode suffers from a problem in which the module leg easily breaks away from the trunk during movement.The magnet suction needs to be calculated for ensuring that the robot does not detach from the trunk during movement.
A magnet group comprising four magnets is installed on the connection surface to provide magnetic force for the modular legs and trunk connection.These magnets are evenly distributed over the four corners of the connection surface (Figure 15).The coordinate system is shown in Figure 15.The x c -axis is perpendicular to the contact surface, and the y c -and z c -axes are parallel to the contact surface.If all four magnets are parallel, the connection plane of the leg module can move in the connection plane of the trunk.The leg module is prone to fall off when it is subjected to forces parallel to the yz plane.In order to improve the stability of leg, four magnets are rotated at an angle.At this time, the leg module cannot move in a plane relative to the connection surface of the trunk.The angle between each of the magnets is 90 ∘ , and the angle between each magnet and the contact surface is 30 ∘ .In this manner, the direction of the magnetic force f of each magnet can be determined, which can be expressed as where f x , f y , and f z are projections of magnetic forces on three axes.In the y c -direction and the z c -direction, the forces of the two adjacent magnets are equal in magnitude and opposite in direction, because the magnets on the coupling interface are symmetrically distributed.Thus, the combined force of the magnets in the y c -and z c -directions is 0.Then, the resultant force of the magnet on the connection surface can be expressed as According to (35)-(36), the type of magnet can be determined, and the modular leg can be firmly fixed on the     trunk in the movement process.In addition, the magnet group provides forces only along the x c -direction on the connection surface, and the resultant forces in the y c -and z c -directions are both 0. Thus, when the modular legs need to be dismantled, they can be easily removed from the trunk as long as they are rotated around the y c -or z c -axis, hence allowing for flexible dismantling.At this time, the moment can be expressed as where r is the radius of the cross section of the magnet and d is the distance between the centers of the cross sections of two adjacent magnets.

Simulation Analysis of Mechanical Properties.
To analyze structural strength, mechanical performance analysis is necessary.The main load-bearing structure of the robot includes the connection structure and trunk and the leg mechanism.Therefore, the mechanical properties of the two structures are analyzed.
For the connection structure, suppose that the weight of the trunk is about 1.5 kg, and the force that the vertical direction of each connection surface suffers is approximately 5 N.The material of connection structure is ABS plastic.The force analysis can be seen in Figure 16(a), and the stress, strain, and displacement diagrams are shown in Figure 17.For the modular leg, the support force of the ground to the leg is approximately 5 N.The force analysis can be seen in Figure 16(b), and the stress, strain, and displacement diagrams are shown in Figure 18.Figures 17 and 18 show that the change of stress, strain, and displacement is extremely small, which can fully meet the motion requirements.

Experiments
To verify the feasibility of the mechanism design, experiments are conducted.The prototype of the modular six-legged robot is shown in Figure 19.The main structure of the robot is created through 3D printing, using resin as material.The six sides of the trunk are hollowed to reduce the weight of the robot.The structure parameters of the modular six-legged robot are listed in Table 2.For the leg structure, AB=15 mm, AD=50 mm, BC=40 mm, CD=13 mm, and CM=59.2 mm.The robot is driven by a steering gear xp0933LV.The parameters of the steering gear are shown in Table 3.
(1) Robot with one modular leg.The robot with one modular leg relies mainly on the sliding of the module leg  on the ground to provide forward power.At this time, the trunk is in contact with the ground and is gliding on the ground.In the initial state, link 1 of the leg is parallel to the ground, and it has no offset relative to the vertical line of the connecting surface.The motion sequence diagram is shown in Figure 20(a), and the changes of the angle of the four-bar mechanism active joint and the angle of the robot swinging around the vertical axis in a cycle are shown in Figure 20(d).
As shown in Figure 20, the robot can move forward with one modular leg, which is consistent with the gait shown in Figure 4 and Table 1.At this time, the mobile velocity of the robot is approximately 0.01 m/s.
(2) Robot with two modular legs.The motion sequence and the change of active angles in one cycle for the robot with two modular legs are shown in Figures 20(b) and 20(e), respectively.At this time, the trajectory of the robot is approximately a straight line, and its velocity is 0.025 m/s.It is therefore more efficient than a robot with only one modular leg.
(3) Robot with six modular legs.The motion sequence and the change of active angles in one cycle for the robot with six modular legs are shown in Figures 20(c) and 20(f), respectively.At this time, the two groups of legs of the robot move alternately, and its velocity is 0.018 m/s.In particular, because of the large number of legs, the sliding of legs relative to the ground may produce cumulative errors, so it is necessary to ensure that the robot has great friction with the ground as far as possible.

Mathematical Problems in Engineering
Besides, the robot can move forward with four or five modular legs.When the robot moves with four modular legs, the motion law is the same as the robot with six modular legs; that is, two groups of legs move alternately.When the robot moves with five modular legs, the motion law is the same as the robot with four modular legs; that is, two groups of legs move alternately, and the other leg plays a supporting role.When the robot has three modular legs, the motion law is the same as the robot with two modular legs, and the other leg can be raised.Experimental results show that the modular multilegged robot with different legs can achieve stable motion, proving the feasibility of the design.

Conclusions
To improve the fault tolerance and environmental adaptability of the multilegged robot, a modular multilegged robot is developed in this study.The robot is composed of a hexagonal trunk and six modular legs.When different numbers of legs are installed on the trunk, the robot exhibits different motion characteristics.On the basis of the analysis of gait characteristics of robots with different modular legs, kinematic and dynamic models are established, and the law of leg motion and driving torque is obtained, which provides a reference for motion control.In particular, the length of each link of the leg, which may affect obstacle crossing performance, motion stability, and mechanical properties, and the drive angles, which may affect the amplitude of the trunk movement along the vertical direction, the motion velocity, and the tip trajectory of the leg, are determined.Experimental results show that the robot can achieve stable motion with different numbers of modular legs.Moreover, the positioning of the magnets can not only ensure that the legs and trunk will not fall off during movement but also facilitate disassembly, thereby meeting the requirements of modular design.This study provides a useful reference for the design of modular multilegged robots.

Figure 3 :
Figure 3: Three-dimensional model of modular multilegged robot.(a) Multilegged robot with six modular legs.(b) Multilegged robot with three modular legs.

4. 1 .
Kinematic Analysis.For realizing the specific motion rule of robots through control of the steering gears, kinematic analysis is conducted.The structural diagram of the robot with one leg is shown in Figure5.Point O is the center of mass of the trunk, and the coordinate origin of the fixed coordinate system of the robot o-xyz coincides with O.The direction of the z-axis is perpendicular to the ground and upward, the x-axis is perpendicular to the plane of the modular leg and outwards, and the y-axis can be determined by the right-hand rule.The coordinate system of the leg is o A -x A y A z A , and the axis direction is the same as that of the coordinate system oxyz.The axes of the two steering gears coincide with axis o 1 (swing axis) and axis A, respectively.

Figure 6 :
Figure 6: Tip trajectories of leg with different changes of active joints.(a) Angle change law of driving joints.(b) Tip trajectories of leg.

Figure 9 :Figure 10 :
Figure 9: Motion process of robot with one leg.

Figure 11 :
Figure 11: Schematic of motion process of robot with two legs.

Figure 12 :
Figure 12: Motion trajectory of robot with two legs.

Figure 13 :
Figure 13: Change of driving torques of robot in swing phase.

Figure 14 :
Figure 14: Change of driving torques of robot with two legs in supporting phase.(a) Both legs bear trunk load evenly.(b) One leg bears trunk load.
F i are the joint forces at the four hinges of the leg, and i=8.When the range of length of each link is [0, 60 mm], max(F i )=11.8N, max(M)= 17.4 Nm, and max(H)=0.021m.After calculation, the minimum value of the optimization objective function T is 0.4225.The parameters of the leg of the robot are as follows: AB=15 mm, AD=50 mm, BC=40 mm, CD=13 mm, and CM=59.2 mm.

Figure 15 :
Figure 15: Structure diagram of connection surface.

Figure 17 :
Figure 17: Mechanical properties of connection structures.

Figure 20 :
Figure 20: Experiment results for robot with different modular legs.(a) Motion sequence diagram of robot with one modular leg.(b) Motion sequence diagram of robot with two modular legs.(c) Motion sequence diagram of robot with six modular legs.(d) Angle change of active joint of robot with one modular leg.(e) Angle change of active joint of robot with two modular legs.(f) Angle change of active joints of robot with six modular legs.

Table 1 :
Description of gait of modular multilegged robot with different legs.

Table 3 :
Parameters of the steering gear.