Single-Leg Structural Design and Foot Trajectory Planning for a Novel Bioinspired Quadruped Robot

To meet the stability requirements for moving quadruped robots, it is important to design a rational structure for a single leg and plan the trajectory of the foot. First, a novel electrically driven leg mechanism for a quadruped robot is designed in this paper to reduce the inertia of the leg swing. Second, a modified foot trajectory based on a compound cycloid is proposed, which has swingback and retraction motion and continuous velocity in the x-axis direction. .ird, a Simulink platform is built to verify the correctness of the proposed foot trajectory..e simulation result shows that when the flight phase and the stand phase switch, the impact of torque is smaller than the foot trajectory before modification. Finally, an experimental platform is constructed, and a control algorithm is written into the controller to realize the foot proposed trajectory. .e results of the experiment prove the feasibility of the leg mechanism and the rationality of the proposed foot trajectory.


Introduction
Robotics have become an active research area in recent years. Bioinspired foot robots have become a topic of interest in the field of robot research, because of their unique motion form, control method, and adaptability in complex environments [1,2]. e stability and load capacity of a quadruped robot are much better than those of the biped robot. e complexity of the mechanism and control strategy are simpler than those of hexapod and multilegged robots [3,4]. us, quadruped robots have a wide range of applications in military transportation, forest detection, and emergency rescue scenarios [5]. e main driving methods for bioinspired quadruped robots are electric drive and hydraulic drive [6]. For example, the BigDog and LS3 robots developed by Boston Dynamics [7,8], the HyQ robot designed by the Italian Institute of Technology [9,10], and the bioinspired quadruped robot developed by Shandong University [11] all use the hydraulic driving method. Hydraulic systems have the advantages of large output power [12], small inertia, and sensitive action. erefore, a hydraulically driven quadruped robot can achieve high load capacity and high control accuracy, but its ratio of self-weight and rated load is generally large, making it difficult to miniaturize the robot. Due to the presence of hydraulic components such as hydraulic cylinders, the inertia of the leg is large, so it is difficult to achieve high-speed running actions. In contrast, electrically powered quadruped robots, such as the LittleDog and SpotMini robots developed by Boston Dynamics [13,14], the Laikago robot designed by Unitree [15], and the MiniCheetah robot developed by MIT [16], have the advantages of low noise, convenient speed regulation, strong anti-interference ability, and stable speed. e leg structures of these robots often use joint motors to directly drive the leg motion or a synchronous belt to transmit the motion. However, electrical components such as joint motors increase the inertia of the leg, and the synchronous belt transmission method cannot sustain a large load. With the rapid development of hightorque motors and high-performance magnetic bearing [17], high-load and high-speed electrically driven quadruped robots have become an important research direction in recent years. erefore, it is meaningful to study the lowinertia and high-strength electrically driven leg structure.
Whatever the driving method of the robot is, the goal is to obtain better load capacity, adaptability, and stability in a complex environment. e factors that affect the stability of bioinspired quadruped robots are complex, and the control strategy is critical. In existing reports on advanced quadruped robots, the control algorithms are not open source. erefore, research on the control strategy of quadruped robots remains a topic of interest in current research. Singleleg trajectory planning is an important part of the quadruped robot's motion control and a key factor of the bioinspired quadruped robot's motion ability. erefore, an electrically driven leg mechanism for a quadruped robot is designed in this paper, and a compound cycloid foot trajectory with swing-back and retraction motion is proposed.
en, a single-leg simulation platform is built, and a kinematic and dynamic simulation of the proposed modified trajectory is carried out on the simulation platform. Finally, the experiment is carried out, and the feasibility of the leg mechanism and the rationality of this foot trajectory is verified by the simulation and experiment. is work lays a foundation for the development of the whole machine.

Brief Description of Mechanism
e driving mode of quadruped robots generally adopts hydraulic or electric drives. Electric drives have the advantages of high control accuracy and precise motion tracks compared with hydraulic drive modes, and the electric driving mode is suitable for light-and medium-load bioinspired quadruped robots.
us, the leg mechanism designed in this paper adopts an electric drive.
To improve the stability and movement ability of the quadruped robot [18], the leg of the quadruped robot designed in this paper adopts a knee and elbow face-to-face structure. e quadruped robot model is shown in Figure 1 and includes the machine body, waist structure, leg structure, and electrical components. e leg mechanism includes three degrees of freedom (DOF): hip joint side swing, hip joint front swing, and knee joint front swing.
Common leg structural models of quadruped robots include zoom structures and linkage structures. e zoom structure leg is highly efficient, and the control strategy is relatively simple, but it is often bulky and does not have bionic characteristics; therefore, it is inconvenient to install and is not conducive to robot miniaturization. For example, the ASV [19] robot developed by the Ohio State University adopts the zoom structure; its ratio of self-weight to bearing weight is only 0.08, and the performance of the whole machine is poor.
Linkage structure legs can be categorized as series types, parallel types, and parallel-series types. A series leg is simple in structure, easy to control, and has a large working space, but its load carrying capacity is relatively small, and installing the drive unit or transmission element at the joint increases the inertia of the leg, such as the ANYmal robot developed by ANYbotics [20].
Inspired by a cat's leg structure, Park et al. [21] designed a single-DOF parallel leg mechanism composed of 9 connecting rods and 1 spring. e experimental results showed that the robot of this leg mechanism can run on flat ground at a speed of 0.75 m/s. However, because the leg mechanism has only one active DOF, it is difficult to achieve a rich foot trajectory, and the foot trajectory formed during the movement is affected by the robot's weight and the terrain. For heavy loads and irregular terrain, the adaptability of this kind of leg structure needs to be further verified. e parallel-series leg has the advantages of a larger working space and high load capacity. For example, the Baby-Elephant robot designed by Shanghai Jiao Tong University [22] uses a parallel-series leg structure, but this leg structure does not have bionic characteristics. ere are often more DOFs, which complicates the control strategy, and more driving elements and transmission elements will also increase the inertia of the leg movement, which is not conducive to improving the maneuverability of the whole machine.
Although the leg structure of the quadruped robot has been studied by many scholars, designing a leg mechanism with both high mobility and high load capacity remains a research challenge. In this paper, a parallel leg structure of a quadruped robot is designed. e proposed leg mechanism can achieve a rich foot trajectory and has a large workspace and good rigidity and strength.
is kind of structure is compact and easy to install.
In this paper, the leg adopts rod mechanism whose force transmission is simple. To reduce the mass and inertia of the leg, the motor that drives the knee joint is integrated into the hip joint, as shown in Figure 2.
e front swing joints of the hip and knee include the motor flange plate, shank drive rod, intermediate connecting rod 1, intermediate connecting rod 2, joint bearing rod, thigh connecting rod, and shank connecting rod. Among these, the shank drive rod, intermediate connecting rod 1, intermediate connecting rod 2, and motor flange plate are simplified to form a parallelogram mechanism. e intermediate connecting rod 2, joint bearing rod, leg connecting rod, and leg connecting rod are simplified to form an antiparallelogram mechanism. e motor drives the shank drive rod to rotate through the output shaft of the reducer, and then the parallelogram and antiparallelogram mechanisms drive the shank connecting rod to realize forward swing. e design of the parallelogram mechanism and the antiparallelogram mechanism integrates the drive motor of the knee joint and the hip joint into the body part. erefore,  it avoids the motor following the swing of the leg when the leg moves forward and reduces the inertia when the leg swings.

Kinematic Modeling of Single-Leg Mechanism
To facilitate research, most scholars tend to simplify their models when planning the foot trajectory of quadruped robots; thus, the simplified model is shown in Figure 3.
According to the simplified model, there are three DOFs on a single leg. e DOF of hip joint lateral swing can realize the lateral swing of the leg. e DOF of hip joint front swing can achieve the back-and-forth swing of the thigh; and the DOF of the knee joint enables the back-and-forth swing of the shank. Among them, the DOF of hip joint lateral swing and the DOF of hip joint front swing can achieve rich foot trajectory in a 2D plane, and the DOF of the knee joint can adjust the stability of the whole machine so that the quadruped robot can adapt to complex terrain. To achieve a kinematic analysis of a single leg, the D-H coordinated system is established on the left hind leg model, as shown in Figure 4. e initial position of the coordinate system 0 coincides with coordinate system 1. e z-axis of frames 1, 2, and 3 coincides with the axis of each joint, the xaxis coincides with the connecting rod, and the y-axis is derived from the right-hand rule. e z-axis of frame 4 is perpendicular to the paper, and other axis directions are shown in Figure 4. According to the D-H method and the established coordinate system, the D-H parameters are obtained, as shown in Table 1 [23]. Figure 3 shows that each leg can be simplified into four parts, namely, the body, hip, thigh, and shank. ey are represented by i, corresponding to i � 1, 2, 3, and 4, respectively. en, the transformation matrix of the coordinate system on linkage i relative to the coordinate system on i � − 1 is obtained, as shown in the following equation: We substitute the data in Table 1 into equation (1) and then the transformation matrix can be obtained as 0 1 T, 1 2 T, 2 3 T, and 3 4 T. According to the formula 0 4 T is obtained, as shown in the following equation: where Let the coordinates of the foot end be ( p x , p y , p z ); then the forward kinematics model of the simplified single-leg model is  With formulas (5) can be obtained, which is the inverse kinematics model of the single leg of the quadruped robot.
e meaning of each symbol in the formula is the same as the previous formula.
According to the designed leg mechanism, its mechanism diagram is built as shown in Figure 5. e solid line in the figure is the leg linkage, and the dotted line is the auxiliary line. e parameters of each link are shown in Table 2.
As the diagram of leg mechanism shows, quadrilateral ABCD is a parallelogram and quadrilateral DEFG is an antiparallelogram; ∆DEG and ∆EDF are congruent triangles, the same as ∆FEG and ∆GDF. According to the geometric relations in Figure 5 and cosine theorem, the value of β 1 can be calculated under the condition of knowing θ 2 and θ 3 as follows: According to the mapping relationship between β 1 with θ 2 and θ 3 , the driving joint angle of the designed single-leg mechanism can be solved, and then a simulation and experiment can be carried out to verify the modified trajectory's rationality.

Workspace Analysis of the Leg Mechanism
e workspace of the leg mechanism of the quadruped robot refers to the set of spatial position points that can be reached by the reference point of the foot end, which is a key parameter used to evaluate the feasibility and efficiency of the leg mechanism of the quadruped robot. In this paper, the Monte Carlo method is used to calculate the robot's foot workspace in a 2D plane. e specific steps are as follows: (1) Calculate the positive kinematics model of the singleleg mechanism (2) Determine the range of motion angle of each joint and determine the constraint relationship between each angle (3) Program in MATLAB and draw the workspace of the single-leg mechanism e workspace obtained by MATLAB is shown in Figure 6. Figure 6 shows that the leg mechanism proposed in this article has a large workspace, can achieve a step height of more than 200 mm, and has a large step length.  Figure 4: Simplified single-leg model.

Trajectory Planning of Foot
e quadruped robot's leg alternates between the flight phase and stand phase while walking. e stand phase is the process from the foot end of one leg touching the ground to leaving the ground, bearing the weight of the whole body and adjusting the robot's stability. e flight phase is the process of the foot end from leaving the ground to touching the ground. e main parameters of the flight phase include step height and the step length, among which the step height determines the ability of the quadruped robot to overcome obstacles, and the step length determines the size of the stride length of the quadruped robot. erefore, gait planning mainly refers to the planning of the flight phase, and the track of the stand phase usually adopts a simple linear track.
Flight phase trajectory planning is a key step to achieve dynamic walking for a quadruped robot. To realize good stability during fast movement, foot trajectory planning should satisfy the following as much as possible: the trajectory of the foot should be a circular curve to ensure that the speed and acceleration of the foot are continuous without abrupt change and that the angular velocity and acceleration of the joint are smooth and continuous; there is no impact between the foot and the ground; that is, the velocity and acceleration are 0 when landing and leaving the ground; unnecessary motion should be avoided [6]; and the foot end and the ground should be prevented from producing relative slide as much as possible.
For the flight phase trajectory, a trajectory planning method based on a compound cycloid was proposed in [24], which was verified in [25]. To solve the problems of sliding and dragging when the robot's foot contacts the ground, [26] proposed a modification to the compound cycloid planning method. To solve the problem of a sudden change in acceleration when t � 0 and t � T m in the modified trajectory equation, [1,10] improved the displacement equation in the y-direction vertical to the ground and proposed a zeroimpact trajectory. e improved trajectory equation is  where S is the stride length of the flight phase; H is the step height of the flight phase; and T m is the period time of the flight phase. However, the above trajectory only considers the motion of the flight phase; that is, the speed and acceleration of the forward direction are 0 at the moment when the foot touches and leaves the ground, but the motion of the support phase is ignored. Considering that the robot is extremely fast in its running motion, the motion of the stand phase can be equivalent to the linear motion of uniform speed. erefore, at the moment of the transition between the flight phase and the stand phase, the x-direction that the robot forwards will generate a great acceleration, which will impact the motor at the joints and cause the vibration of the whole machine. Hildebrand studied the foot track of a fast-moving cheetah [27] and found that, during fast movement, the foot track of the cheetah was a closed curve, and the end of the foot retreated and swung back when landing and leaving the ground. e foot track is shown in Figure 7. Karssen et al. also found that swing-back and retraction of the leg could improve the stability and anti-interference ability of the robot during walking and running [28][29][30][31]. In addition, according to videos such as "Big-Dog" and "Spot-Mini" published by Boston Dynamics, it was also found that the robot adopts the foot trajectory with retraction motion and swing-back motion when moving forward.
From the above analysis, it can be seen that the speed and acceleration of the x-axis have a buffer when there is swingback and retraction movement. To reduce the impact phenomenon of the x-axis during the transition between the flight phase and the stand phase, the movement in the x-axis direction of equation (7) is modified, and the movement of retraction and swing-back is added on the basis of the original x-axis movement. Assuming that the period time T m of the flight phase remains unchanged, the original motion time of the x-axis changes to T n , and the motion time of both the retraction and the swing-back is T e ; then T m � T n + 2T e .
With reference to sinusoidal motion, for the swing-back motion, let the curve equation of acceleration be

e velocity equation obtained by integration is
We know from the two endpoints of the velocities that _ x � v � − (S/T m ) when t � 0. When t � T e , _ x � 0. erefore, it can be determined that A e � ((Sπ)/(2T m T e )) and C 1 � − (S/(2T m )). us, e equation of the swing-back motion curve can be obtained by integration: x � C 2 when t � 0, and when t � T e , x � (ST e /2T m ) + C 2 . erefore, C 2 is the coordinate value of x-axis from the location, and the value of the swing-back is (ST e /2T m ) which is related to the ratio of T e to T m .
Similarly, the curve equation of the retraction motion is where C 3 is the coordinate value of the initial point of the retraction on the x-axis, namely, the maximum point of movement in the x-axis direction. erefore, the modified trajectory curve equation can be obtained as follows: 6 Complexity where S is the step length, H is the step height, T m is the period of the flight phase and the stand phase, T e is the period of the swing-back movement and retraction movement of the flight phase, and T n is the main motion period of the removal of the swing-back and retraction of the flight phase. According to equation (13), the value of the swing-back and retraction is (ST e /2T m ); we can change it by choosing different ratio between T e and T m . e value is obtained by test method in this paper. e trajectory for the stance phase adopts a simple linear trajectory, and its expression is shown in the following formula: x � S T m ,

Simulation System.
SimMechanics is a MATLAB simulation toolbox that combines the functions of Simulink and MATLAB. It is convenient to use the block diagram of the SimMechanics module or directly import the 3D model from the 3D modeling software to conduct modeling and simulation of the mechanism. Moreover, the movement process of the mechanism can be visually displayed through the SimMechanics visualization tool [32], which provides a very simple and visual verification method for the foot track planning of the bioinspired quadruped robot. SolidWorks-MATLAB cosimulation was used to build the simulation system. is is a convenient way to import models from SolidWorks to SimMechanics, and the simulation system and model for SimMechanics are shown in Figure 8. en, the control module in SimMechanics is added to facilitate the writing of the control program. In the model, the length of the connecting rod is l 1 � 0, l 2 � 170 , and l 3 � 227. ere are two rotational DOFs in the hip joint and one rotational DOF in the knee joint. Each joint can be controlled by the driving joint angle of the control subsystem output, and then we can obtain the designed trajectory of the foot.
To obtain the trajectory curve of the foot simulation, it is necessary to add a corresponding coordinate system to the foot, set the relative position of the coordinate system, and add components such as an oscilloscope, as shown in Figure 9.
Let the period time of the flight phase and the stand phase be T m � 2 s and the period time of the swing-back and the retraction motion be T e � 0.4 s; the step length is S � 80 cm, and the step height is H � 50 cm. Add trajectory equation (7) into the control subsystem, and run the simulation. e trajectory curve obtained is shown in Figure 10, which verifies the correctness of the simulation system and the kinematic model.
Once the modified trajectory curve expression (13) is written into the control subsystem, the simulation is run, and we obtain the foot trajectory curve and motion cloud map, as shown in Figure 11. e modified foot track has obvious swing-back and retraction. According to (ST e /2T m ), the amount of swing-back and retraction can be calculated as 8 mm.

Analysis of Simulation Results.
rough simulation, the velocity and acceleration curves of the foot in the x-direction can be obtained, as shown in Figures 12 and 13. Figure 12 shows that the velocity of the trajectory curve before modification is discontinuous in the x-axis direction.

Complexity
Whenever the flight phase and the stand phase switch, there are always sudden changes in velocity, which will lead to a sudden change in acceleration and cause an impact in the xaxis direction. In the modified trajectory curve, the velocity in the x-axis direction transits smoothly when the flight phase and the stand phase switch. e acceleration curve is shown in Figure 13. It can be seen from the acceleration curve that there is a sudden change in acceleration when the flight phase and the stand phase switch, and the acceleration in the x-axis direction changes dramatically before modification. e acceleration mutation is diminished somewhat after modifying the trajectory. e driving torque of the shank motor and the thigh motor can be obtained through simulation, as shown in Figures 14 and 15. Compared with the trajectory in equation (7), it can be seen that the trajectory modified in this paper reduces the sudden change of the driving torque greatly when the flight phase and stand phase switch, which can reduce the vibration of the whole machine to a certain extent and improve the stability of the machine's walking gait. e above simulation results are obtained under the condition of no reaction forces with the ground. To simulate the worst stress situation under real conditions, the maximum reaction forces that change with time should be added to each contact point of the single leg. We can conduct inverse dynamics to properly calculate ground reaction forces on single leg. e mass of the bionic quadruped robot designed in this paper is expected to be 60 kg, and we assume that the robot is walking in a laboratory environment that has relatively flat ground; the coefficient of friction between the foot end and the ground is 0.3. en the reaction forces can be calculated based on these parameters. When the robot walks forward, the side swing joint is fixed, the weight of the   body is cast vertically on the support legs, and there is a vertically upward reaction force on the foot of the ground. In addition, there is friction between the foot and the ground. e stress on one leg is shown in Figure 16. e abovementioned reaction forces change with time; for example, the friction force and the reaction force of the ground to the foot only exist when they are in contact with the ground. When these reaction forces are added, the simulated joint torque curves after and before modification are shown in Figure 17.
We use the percentage reduction of torque mutation to measure the optimization degree of the modified trajectory, so the formula is where P to is the percentage reduction of torque mutation, ∇To 1 is the torque mutation value corresponding to the trajectory before modification, and ∇To 2 is the torque mutation value corresponding to the trajectory modification. en, the value in Figure 17 is substituted into formula (15).
e maximum torque mutation of the thigh motor decreased by approximately 17%, and the maximum torque mutation of the shank motor decreased by approximately 7%.
In order to further verify the feasibility of the trajectory proposed in this paper, the MATLAB-ADAMS joint simulation of the whole robot is carried out. e simulation process is shown in Figure 18.
In the simulation, we set the motion period of both the flight phase and the stand phase as 1 s; step length is 80 mm and step height is 50 mm. e robot adopts a short gait in the simulation. en, Figure 18 shows the motion during a specified period. e simulation time is set to 38.5 s. Figure 19 shows the position of the robot at the start and end of the simulation.
e simulation of the robot shows that the quadruped robot can walk stably on flat ground with a tort gait. erefore, the simulation proves the feasibility of the proposed trajectory.

Construction of Experimental Platform
It is very difficult and complex to carry out a dynamic robot walking experiment on a single-leg experimental platform. To verify the feasibility of the proposed single-leg mechanism and the rationality of the modified trajectory, we can track the foot trajectory during the experiment and compare it with the trajectory obtained from the simulation. en, we can derive the properties of the proposed trajectory based on the consistency of the two trajectories.
To realize the proposed trajectory and track it, a singleleg experimental platform is constructed, as shown in Figure 20. e platform includes a single-leg motion system and a measurement system. e mechanical part of the single-leg motion system uses a rigid link structure, with two DOFs of the hip joint front swing and the knee joint front swing, and its total mass is 6 kg. e Ethernet for Control Automation Technology (EtherCAT) fieldbus system is used to control the movement of the single leg.
e system uses Ethernet as the basic framework, which has the advantages of fast transmission speed and large data packet capacity. All the interfaces of the bus topology structure are located on the coupler, no additional switches are needed, and space can be effectively used. e main electrical components are shown in Table 3.
e measurement system adopts a standard laser tracker designed by Automated Precision Inc. (API), and the model is an R-20Radian. To track the movement trajectory of the foot, the reflector of the laser tracker is magnetically   attracted to the foot, and the spatial position of the foot relative to the measurement coordinate system is calculated by the principle of laser interference.
To realize the foot trajectory we designed, the Position, Velocity, and Time (PVT) interpolation algorithm is used to interpolate the motion curve of the joint. en, PMAC (Power PMAC IDE) is used for programming on a PC. e PC is connected to the controller with a network cable to complete the debugging and downloading of the control program. e control schematic is shown in Figure 21. e PMAC software's own drawing simulation tool was used to draw the foot trajectory in a single cycle, as shown in Figure 22. According to Figure 22, the step length is 80 mm, and the step height is 50 mm. e trajectory simulated by PMAC is consistent with the proposed trajectory, so the correctness of the proposed equation is preliminarily verified. e movement process of the leg mechanism during the experiment is shown in Figure 23. It can be seen that the leg mechanism can move correctly according to the planned trajectory, which proves the feasibility of the leg mechanism proposed in this article. Figure 24 is the foot trajectory recorded by the laser tracker during the moment of the experiment, which shows that the trajectory of the experiment is approximately the same as the trajectory obtained by the simulation. And according to the experimental data, the step height and step length of the experimental running track are about 50 mm and 80 mm, respectively, it is consistent with the simulation data. Figure 24 shows that the trajectory has obvious retraction and back-swing movement. e obtained retraction and back-swing movement can reduce the impact of speed in the x-axis direction, so the joint torque will also be reduced. In addition, it should be noted that the shaking phenomenon in Figure 24 is caused by the low machining accuracy and assembly clearance of the leg mechanism. e realization of the trajectory in the experiment indirectly proves the rationality of the trajectory proposed in this paper.

Conclusions
(1) In this paper, a novel electrically driven leg mechanism of a quadruped robot is designed, which reduces the inertia of the leg swing. (2) To reduce the torque mutation when the flight phase and stand phase switch, a foot trajectory based on the compound cycloid is proposed. e proposed foot trajectory has swing-back and retraction motion. (3) A Simulink simulation platform is built to realize the foot trajectory of the single-leg mechanism. e results of the simulation show that the mechanism can achieve the foot trajectory proposed and that the impact of joint motor torque is reduced to some extent. (4) A single-leg experimental platform was built, and the foot trajectory proposed in this paper was realized on the experimental platform. e realization of the trajectory proves the feasibility of the leg mechanism and the rationality of the proposed foot trajectory. Subsequent research will focus on the following aspects: the experiment of the trajectory proposed in this article is applied to the whole machine to verify its practicability; the leg mechanism has a smaller workspace than the series-type linkage structure leg, so we will further optimize the length of each rod to increase its workspace; through comparison with the trajectory before correction, it is not difficult to find that the trajectory proposed in this article is at the same step height. With the step length, the trajectory is longer, so there may be increased energy consumption. e trajectory is constantly optimized and improved to address these potential problems.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.